Expand description
The form controls (a themed surface expands each into its recipe parts):
Input/Textarea, Select (the combobox, its popup a LAYER), DatePicker and
DateRangePicker (one calendar layer), TimePicker (a list layer),
NumberField (steppers), ChipInput (chips + suggestions layer), FileUpload
(drop zone + files), Checkbox/Switch, Radio, Slider and the Form that
collects them. A field’s failed checks (after a refused submit) show
under it as <field id>.error and put its parts in the invalid state.
Modules§
- dates
- Calendar arithmetic for the pickers (proleptic Gregorian, no clock).
Constants§
- CHOICE_
PICTURE_ ASPECT - A ChoiceTiles picture’s width / height (
plan-card.jsontiles.pictureAspect).
Functions§
- choice_
toggle - A press on option
value:singlepicks it;multipletoggles it in the list, kept in OPTION order. The new comma-joined value. - choice_
values - The values a ChoiceTiles
valuepicks: one forsingle, the comma-joined list formultiple(empty entries dropped). - clamp_
number_ value - The reference’s
clamp: into[min, max], thenNumber(v.toFixed(p)). - decimals_
of - The reference’s
decimalsOf(step): the digits after the.ofString(step). - format_
bytes format_bytes_withthrough the English formatter.- format_
bytes_ with - A byte count as the web shows it (
Intlstyle: "unit", short): 1024 steps, at most one fraction digit, throughFormatter::bytes(47.1 kBin the English fallback). - format_
number_ value - A NumberField’s value as it shows:
Intl.NumberFormat("en", {minimum + maximumFractionDigits: precision}): the SHORTEST round-trip decimal rounded half away from zero (1.005→1.01,2.5→3), grouped. - format_
time - js_
number_ string - JavaScript’s
String(n)(crate::json::number_to_string). - number_
prop - A numeric NumberField prop the reference’s way (
num): numbers and numeric strings; absent, null or""= none. - number_
step_ precision - A NumberField’s step (
step || 1) and precision (precision, else the step’s decimals), as the reference reads them. - parse_
time HH:mm→ minutes since midnight.- to_
fixed - JavaScript’s
n.toFixed(p): the EXACT binary value rounded half away from zero ((2.5).toFixed(0)=3,(1.005).toFixed(2)=1.00).