@umriss-ui/core 0.25.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/llms-full.md CHANGED
@@ -1,4 +1,4 @@
1
- # @umriss-ui/core 0.25.0
1
+ # @umriss-ui/core 0.27.0
2
2
 
3
3
  > React component library for data-dense dashboards and tools - forms, date pickers, overlays, a tree view and a command palette. Precise, quiet, professional.
4
4
 
@@ -56,7 +56,7 @@ import {
56
56
  useToast,
57
57
  } from "@umriss-ui/core";
58
58
  import type { LimitSet } from "@umriss-ui/core";
59
- import { Chart, LimitLine, Line, Tooltip, XAxis, YAxis } from "@umriss-ui/charts";
59
+ import { LimitLine, Tooltip, useChart } from "@umriss-ui/charts";
60
60
  import { AlarmList, alarmModel, useTableSelection } from "@umriss-ui/table";
61
61
 
62
62
  /* Data from the operations world, written out here so the example runs on its own. */
@@ -279,6 +279,7 @@ const OWN = new Set(["checkout-latency", "checkout-errors"]);
279
279
 
280
280
  function Content() {
281
281
  const { toast } = useToast();
282
+ const { Chart, XAxis, YAxis, Line } = useChart(TODAY);
282
283
  const [alerts, setAlerts] = useState<readonly Alert[]>(() => ALERTS.filter((one) => OWN.has(one.type)));
283
284
  const [resolved, setResolved] = useState<number | null>(null);
284
285
  const [resolving, setResolving] = useState(false);
@@ -388,11 +389,11 @@ function Content() {
388
389
  <Card data-callout="3">
389
390
  <CardHeader title="p95 latency since 08:00" />
390
391
  <CardBody>
391
- <Chart data={TODAY} height={200} ariaLabel={`${SERVICE.name}, p95 latency since 08:00`}>
392
- <XAxis accessor={(d: MetricPoint) => d.t} time />
393
- <YAxis accessor={(d: MetricPoint) => d.p95} domain={[0, 700]} label="ms" />
392
+ <Chart height={200} ariaLabel={`${SERVICE.name}, p95 latency since 08:00`}>
393
+ <XAxis value="t" time />
394
+ <YAxis domain={[0, 700]} label="ms" />
394
395
  <LimitLine value={SERVICE.latencySlo} severity="alarm" label="Objective" />
395
- <Line accessor={(d: MetricPoint) => d.p95} name="p95" format={(v) => `${Math.round(v)} ms`} />
396
+ <Line value="p95" name="p95" format={(v) => `${Math.round(v)} ms`} />
396
397
  <Tooltip mode="x" />
397
398
  </Chart>
398
399
  </CardBody>
@@ -1632,9 +1633,9 @@ import {
1632
1633
  Text,
1633
1634
  } from "@umriss-ui/core";
1634
1635
  import type { FreshnessAges, LimitSet } from "@umriss-ui/core";
1635
- import { Chart, ControlChart, DataTable, LimitBand, LimitLine, Line, Tooltip, XAxis, YAxis } from "@umriss-ui/charts";
1636
+ import { ControlChart, DataTable, LimitBand, LimitLine, Tooltip, useChart } from "@umriss-ui/charts";
1636
1637
  import { AlarmList, alarmModel, isHidden, useTableSelection } from "@umriss-ui/table";
1637
- import { Lane, Schedule, Subtasks } from "@umriss-ui/schedule";
1638
+ import { useSchedule } from "@umriss-ui/schedule";
1638
1639
  import type { Subtask, Task } from "@umriss-ui/schedule";
1639
1640
  import { Calculation, Difference, Given, Product, Quotient, Ref } from "@umriss-ui/calculation";
1640
1641
 
@@ -2111,6 +2112,7 @@ function skipTo(event: MouseEvent<HTMLAnchorElement>, id: string) {
2111
2112
  }
2112
2113
 
2113
2114
  export default function ControlRoom() {
2115
+ const { Schedule, Lane, Subtasks } = useSchedule({ initialView: { domain: PLAN_DOMAIN } });
2114
2116
  const { minute, wall, running, setRunning } = usePlantMinute();
2115
2117
  const now = at(minute);
2116
2118
  const reading = SHIFT.readings[minute]!;
@@ -2128,6 +2130,8 @@ export default function ControlRoom() {
2128
2130
  () => upTo(SHIFT.samples, minute).map((one) => ({ ...one, t: at(one.minute) })),
2129
2131
  [minute],
2130
2132
  );
2133
+ const kilnTrend = useChart(trend);
2134
+ const tileLength = useChart(measured);
2131
2135
  const alarms = useMemo(
2132
2136
  () =>
2133
2137
  alarmModel(
@@ -2210,15 +2214,15 @@ export default function ControlRoom() {
2210
2214
  </Region>
2211
2215
 
2212
2216
  <Region id="room-trend" title="Kiln trend" callout="3">
2213
- <Chart data={trend} height={240} ariaLabel="Kiln K1, zone 3, over the shift">
2214
- <XAxis accessor={(d: Point) => d.t} domain={[at(0), at(LAST)]} time />
2215
- <YAxis accessor={(d: Point) => d.kiln} domain={[1170, 1250]} label="°C" />
2217
+ <kilnTrend.Chart height={240} ariaLabel="Kiln K1, zone 3, over the shift">
2218
+ <kilnTrend.XAxis value="t" domain={[at(0), at(LAST)]} time />
2219
+ <kilnTrend.YAxis domain={[1170, 1250]} label="°C" />
2216
2220
  <LimitBand from={KILN.tolerance[0]} to={KILN.tolerance[1]} severity="warning" label="Tolerance" />
2217
2221
  <LimitLine value={KILN.alarm} severity="alarm" label="Alarm limit" />
2218
- <Line accessor={(d: Point) => d.kiln} name="Zone 3" format={(v) => `${v.toFixed(1)} °C`} />
2222
+ <kilnTrend.Line value="kiln" name="Zone 3" format={(v) => `${v.toFixed(1)} °C`} />
2219
2223
  <Tooltip mode="x" />
2220
2224
  <DataTable />
2221
- </Chart>
2225
+ </kilnTrend.Chart>
2222
2226
  </Region>
2223
2227
 
2224
2228
  <Region id="room-alarms" title="Alarms" quiet callout="4">
@@ -2236,13 +2240,13 @@ export default function ControlRoom() {
2236
2240
  </Region>
2237
2241
 
2238
2242
  <Region id="room-quality" title="Tile length">
2239
- <Chart data={measured} height={220} ariaLabel="Tile length after firing, individuals chart">
2240
- <XAxis accessor={(d: Measured) => d.t} domain={[at(0), at(LAST)]} time />
2241
- <YAxis accessor={(d: Measured) => d.length} domain={[597, 602]} label="mm" />
2243
+ <tileLength.Chart height={220} ariaLabel="Tile length after firing, individuals chart">
2244
+ <tileLength.XAxis value="t" domain={[at(0), at(LAST)]} time />
2245
+ <tileLength.YAxis domain={[597, 602]} label="mm" />
2242
2246
  <LimitLine value={601.5} severity="alarm" label="USL" />
2243
2247
  <LimitLine value={598.5} severity="alarm" label="LSL" />
2244
2248
  <ControlChart
2245
- accessor={(d: Measured) => d.length}
2249
+ value="length"
2246
2250
  data={measured}
2247
2251
  origin={REFERENCE}
2248
2252
  name="Length"
@@ -2251,7 +2255,7 @@ export default function ControlRoom() {
2251
2255
  violationName="Length - rule violation"
2252
2256
  />
2253
2257
  <Tooltip mode="x" />
2254
- </Chart>
2258
+ </tileLength.Chart>
2255
2259
  </Region>
2256
2260
 
2257
2261
  <Region
@@ -2266,7 +2270,6 @@ export default function ControlRoom() {
2266
2270
  >
2267
2271
  <Schedule
2268
2272
  ariaLabel="Plan of the early shift: press, dryer and kiln"
2269
- initialDomain={PLAN_DOMAIN}
2270
2273
  height={196}
2271
2274
  now={now}
2272
2275
  selectedTask={batch}
@@ -2896,6 +2899,15 @@ The travel of the grip is the knob to turn when the gesture feels lifeless: [ADR
2896
2899
  | `--u-dock-refusal-duration` | `1400ms` | same | — |
2897
2900
  | `--u-drawer-width` | `400px` | same | The width of a drawer (core-foundations 03). A token rather than a size prop: a detail beside a process picture wants one width across an application, and one drawer that needs another sets it in its `style`. |
2898
2901
 
2902
+ ##### Toast (toast-inset-tokens)
2903
+
2904
+ How far the toasts stand from the window's top and bottom edge - set it to keep them clear of a fixed header or a toolbar at the bottom. The region hangs in `body`, so set them on `:root`; a media query of your own may set another value per width.
2905
+
2906
+ | Token | Light | Dark | Description |
2907
+ |---|---|---|---|
2908
+ | `--u-toast-inset-top` | `var(`[--u-space-5](#token-u-space-5)`)` | same | for the three `top-*` positions; `var(--u-space-4)` up to 600 px wide |
2909
+ | `--u-toast-inset-bottom` | `var(`[--u-space-5](#token-u-space-5)`)` | same | for the three `bottom-*` positions; `var(--u-space-4)` up to 600 px wide |
2910
+
2899
2911
  ##### Shadow stacks: every step has one job
2900
2912
 
2901
2913
  Card: edge, contact with the ground, soft depth. Overlay: edge, near shadow, depth.
@@ -3000,6 +3012,10 @@ The charts' own tokens, set on a chart's root. A token whose value names a core
3000
3012
  | `--uc-color-pressed` | `var(`[--u-color-surface-pressed](#token-u-color-surface-pressed)`, #e9e9eb)` | same | — |
3001
3013
  | `--uc-transition-state` | `var(`[--u-transition](#token-u-transition)`, 120ms cubic-bezier(0.22, 1, 0.36, 1))` | same | — |
3002
3014
  | `--uc-transition` | `80ms var(`[--u-ease-out](#token-u-ease-out)`, cubic-bezier(0.22, 1, 0.36, 1))` | same | The tooltip's fade: its own short duration - it follows the pointer and must not lag behind it - on core's curve where core is loaded. |
3015
+ | `--uc-delay-stale` | `var(`[--u-delay-stale](#token-u-delay-stale)`, 200ms)` | same | A course being reloaded dims as the table's rows do ([ADR-0042](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0042-a-rows-height-never-follows-what-it-shows.md)): only after this delay, so that a quick answer never flickers. |
3016
+ | `--uc-silhouette` | `color-mix(in srgb, var(`[--u-color-text](#token-u-color-text)`, #18181b) 10%, transparent)` | same | The shapes of the silhouette a chart shows while it waits for its rows (chart-loading 03): faint in the text colour, as the table's placeholders. |
3017
+ | `--uc-ease-swell` | `var(`[--u-ease-swell](#token-u-ease-swell)`, ease-in-out)` | same | The easing of the band that sweeps the silhouette: it swells as the table's shimmer does. |
3018
+ | `--uc-fade` | `var(`[--u-duration-medium](#token-u-duration-medium)`, 240ms) var(`[--u-ease-out](#token-u-ease-out)`, cubic-bezier(0.22, 1, 0.36, 1))` | same | The silhouette fading out and the course in, once the rows are there: core's motion for a layout change. |
3003
3019
 
3004
3020
  #### Keyboard
3005
3021
 
@@ -3072,7 +3088,7 @@ From `BadgeProps` — the full table stands on [Badge](#/badge/type-BadgeProps).
3072
3088
 
3073
3089
  - No theme object, no theme provider and no theme switch: a theme is a set of token overrides in your stylesheet, the mode is the page's `color-scheme` ([ADR-0021](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0021-the-styles-load-themselves-and-touch-nothing-else.md)).
3074
3090
  - A token that names another resolves where it is declared: set `--u-color-accent` on a region, and `--u-focus-ring`, which names it on `:root`, still draws the application's accent there. Set the naming token in the region too.
3075
- - A panel opened in a portal - a popover, a tooltip, a toast - takes the tokens and the `color-scheme` of the place it lands, not of the region it was opened from. Give [UmrissProvider](#/umrissprovider) a `portalTarget` inside the region, or override on `:root`.
3091
+ - A panel opened in a portal - a popover, a tooltip, a toast - takes the tokens and the `color-scheme` of the place it lands, not of the region it was opened from. Give [UmrissProvider](#/umrissprovider) a `portalTarget` inside the region, or override on `:root` - as for the toasts' distance from the window's edge, `--u-toast-inset-top` and `--u-toast-inset-bottom`.
3076
3092
 
3077
3093
  What umriss deliberately does not build, and why: [ADR-0032](https://romanhaendler.github.io/umriss-ui/what-umriss-ui-is-not/).
3078
3094
 
@@ -3337,6 +3353,72 @@ export default function NarrowPlaces() {
3337
3353
  }
3338
3354
  ```
3339
3355
 
3356
+ ##### A row of fields
3357
+
3358
+ Fields side by side share one line: their labels on one line, their boxes on one height, their words on the line the select's value stands on. A segmented control is as tall as a field; a horizontal radio group is as tall as a control, and so are a checkbox and a switch in a field, so their words stand on that line too - at either size.
3359
+
3360
+ ```tsx
3361
+ import { Checkbox, ControlSizeProvider, FormField, RadioGroup, SegmentedControl, Select, Stack, Switch } from "@umriss-ui/core";
3362
+ import type { ControlSize } from "@umriss-ui/core";
3363
+
3364
+ function Row({ size }: { size: ControlSize }) {
3365
+ return (
3366
+ <Stack role="group" aria-label={size === "sm" ? "Small" : "Medium"} direction="row" gap={3} wrap>
3367
+ <FormField label="Caster">
3368
+ <Select defaultValue="">
3369
+ <option value="">Every caster</option>
3370
+ <option>Caster 1</option>
3371
+ <option>Caster 2</option>
3372
+ </Select>
3373
+ </FormField>
3374
+ <FormField label="Strand">
3375
+ <Select defaultValue="">
3376
+ <option value="">Every strand</option>
3377
+ <option>Strand 1</option>
3378
+ <option>Strand 2</option>
3379
+ </Select>
3380
+ </FormField>
3381
+ <FormField label="State of the data">
3382
+ <RadioGroup
3383
+ orientation="horizontal"
3384
+ defaultValue="raw"
3385
+ options={[
3386
+ { value: "raw", label: "Raw" },
3387
+ { value: "cleaned", label: "Cleaned" },
3388
+ ]}
3389
+ />
3390
+ </FormField>
3391
+ <FormField label="Values">
3392
+ <SegmentedControl
3393
+ defaultValue="measured"
3394
+ options={[
3395
+ { value: "measured", label: "Measured" },
3396
+ { value: "forecast", label: "Forecast" },
3397
+ ]}
3398
+ />
3399
+ </FormField>
3400
+ <FormField label="Archive">
3401
+ <Checkbox label="Show archived" />
3402
+ </FormField>
3403
+ <FormField label="Updates">
3404
+ <Switch label="Live" defaultChecked />
3405
+ </FormField>
3406
+ </Stack>
3407
+ );
3408
+ }
3409
+
3410
+ export default function ARowOfFields() {
3411
+ return (
3412
+ <Stack gap={5}>
3413
+ <Row size="md" />
3414
+ <ControlSizeProvider size="sm">
3415
+ <Row size="sm" />
3416
+ </ControlSizeProvider>
3417
+ </Stack>
3418
+ );
3419
+ }
3420
+ ```
3421
+
3340
3422
  #### When to use something else
3341
3423
 
3342
3424
  - A width the layout decides - two columns, a field beside a button → Stack and Grid
@@ -3352,8 +3434,8 @@ The keys of [Button](#/button/keyboard-button), [ButtonGroup](#/buttongroup/keyb
3352
3434
 
3353
3435
  | Prop | Type | Default | Description |
3354
3436
  |---|---|---|---|
3355
- | `size` *required* | [`ControlSize`](#type-ControlSize)<br>`"sm" \| "md"` | — | The size of every control inside that does not say its own.<br>Shown in: [One size for a place](#/sizes/one-size-for-a-place) |
3356
- | `children` *required* | `ReactNode` | — | The place the size holds for.<br>Shown in: [One size for a place](#/sizes/one-size-for-a-place) |
3437
+ | `size` *required* | [`ControlSize`](#type-ControlSize)<br>`"sm" \| "md"` | — | The size of every control inside that does not say its own.<br>Shown in: [One size for a place](#/sizes/one-size-for-a-place), [A row of fields](#/sizes/a-row-of-fields), [Drawn as a field (SegmentedControl)](#/segmentedcontrol/drawn-as-a-field) |
3438
+ | `children` *required* | `ReactNode` | — | The place the size holds for.<br>Shown in: [One size for a place](#/sizes/one-size-for-a-place), [A row of fields](#/sizes/a-row-of-fields), [Drawn as a field (SegmentedControl)](#/segmentedcontrol/drawn-as-a-field) |
3357
3439
 
3358
3440
  ##### Types on this page
3359
3441
 
@@ -3784,7 +3866,7 @@ Every entry of `Wording`: the English of `DEFAULT_WORDING` beside the German of
3784
3866
  | `pinToEndHint` | Pin to end | Am Ende fixieren | — |
3785
3867
  | `unpinHint` | Unpin | Fixierung lösen | — |
3786
3868
  | `exportLabel` | Export | Exportieren | The export button. |
3787
- | `exportPageLabel` | Export page | Seite exportieren | The export button of a table in manual mode, which holds and writes one page. |
3869
+ | `exportPageLabel` | Export page | Seite exportieren | The export button of a table in server mode, which holds and writes one page. |
3788
3870
  | `exportFileName` | table.csv | tabelle.csv | The export's file name, where the application names none. |
3789
3871
  | `tableSearchPlaceholder` | Search … | Suchen … | Placeholder and accessible name of the search field. |
3790
3872
  | `tableSearchLabel` | Search table | Tabelle durchsuchen | — |
@@ -3792,7 +3874,7 @@ Every entry of `Wording`: the English of `DEFAULT_WORDING` beside the German of
3792
3874
  | `filterHint` | Filter | Filtern | The tooltip over that button. |
3793
3875
  | `selectRow(row)` | `` `Select ${row}` `` | `` `${row} auswählen` `` | The selection of one row, named after its row header. |
3794
3876
  | `selectAllRows` | Select all | Alle auswählen | The selection of every row in the filtered set. |
3795
- | `selectAllOnPage` | Select all on this page | Alle auf dieser Seite auswählen | The same checkbox in manual mode, where the table holds one page of a server's. |
3877
+ | `selectAllOnPage` | Select all on this page | Alle auf dieser Seite auswählen | The same checkbox in server mode, where the table holds one page of a server's. |
3796
3878
  | `expandRowNamed(row)` | `` `Expand ${row}` `` | `` `${row} aufklappen` `` | The expand button, named after the row header. |
3797
3879
  | `collapseRowNamed(row)` | `` `Collapse ${row}` `` | `` `${row} zuklappen` `` | — |
3798
3880
  | `rowActions` | Actions | Aktionen | Header of the actions column - for the screen reader, not visible. |
@@ -4003,7 +4085,10 @@ Every entry of `ChartsWording` from `@umriss-ui/charts`, which a chart takes thr
4003
4085
  | `stackTotal` | Total | Summe | The last row of a stack in the tooltip and the readout: the sum of its members at the point (charts-stacking K4). |
4004
4086
  | `percent(value)` | `` `${value}%` `` | `` `${value} %` `` | A share in a normalised stack, its number already formatted (K5). |
4005
4087
  | `walkHelp` | Left and right arrows move through the values, up and down change the series, Home and End go to the first and the last, Escape clears. | Pfeil links und rechts gehen durch die Werte, Pfeil hoch und runter wechseln die Serie, Pos1 und Ende springen zum ersten und letzten Wert, Escape hebt die Markierung auf. | The keys that walk the chart. |
4006
- | `zoomHelp` | Plus and minus zoom, Shift with left or right pans, 0 shows everything. | Plus und Minus zoomen, Umschalt mit Pfeil links oder rechts verschiebt, 0 zeigt alles. | The keys that zoom and pan it - only where the chart can be zoomed. |
4088
+ | `zoomHelp` | Plus and minus zoom, Shift with left or right pans, 0 goes back to the axis' own span. | Plus und Minus zoomen, Umschalt mit Pfeil links oder rechts verschiebt, 0 kehrt zum eigenen Bereich der Achse zurück. | The keys that zoom and pan it - only where the chart can be zoomed. |
4089
+ | `legendHelp` | In the legend, Enter hides or shows a series, Shift+Enter shows only it. | In der Legende blendet Enter eine Serie aus oder ein, Umschalt+Enter zeigt nur sie. | The keys of the legend's entries - only where it has one to press. |
4090
+ | `allShown` | Nothing would be left to see, so every series is shown. | Sonst wäre nichts mehr zu sehen, darum werden alle Serien gezeigt. | Read out where hiding would leave nothing to see, and every series is shown instead. |
4091
+ | `showAll` | Show all | Alles zeigen | The control over a zoomed plot that brings every zoomed axis back to its own domain (component-view 04). |
4007
4092
  | `showData` | Show data | Daten zeigen | The data table's disclosure key, closed and open (charts-alternatives C1). |
4008
4093
  | `hideData` | Hide data | Daten verbergen | — |
4009
4094
  | `positionColumn` | Position | Position | The heading of the table's x column where its axis has no `label`, and of a matrix' row column where its y axis has none. |
@@ -4195,7 +4280,7 @@ Everything the library puts out as text.
4195
4280
  | `pinToEndHint` *required* | `string` | — | |
4196
4281
  | `unpinHint` *required* | `string` | — | |
4197
4282
  | `exportLabel` *required* | `string` | — | The export button. |
4198
- | `exportPageLabel` *required* | `string` | — | The export button of a table in manual mode, which holds and writes one page. |
4283
+ | `exportPageLabel` *required* | `string` | — | The export button of a table in server mode, which holds and writes one page. |
4199
4284
  | `exportFileName` *required* | `string` | — | The export's file name, where the application names none. |
4200
4285
  | `tableSearchPlaceholder` *required* | `string` | — | Placeholder and accessible name of the search field. |
4201
4286
  | `tableSearchLabel` *required* | `string` | — | |
@@ -4203,7 +4288,7 @@ Everything the library puts out as text.
4203
4288
  | `filterHint` *required* | `string` | — | The tooltip over that button. |
4204
4289
  | `selectRow` *required* | `(row: string) => string` | — | The selection of one row, named after its row header. |
4205
4290
  | `selectAllRows` *required* | `string` | — | The selection of every row in the filtered set. |
4206
- | `selectAllOnPage` *required* | `string` | — | The same checkbox in manual mode, where the table holds one page of a server's. |
4291
+ | `selectAllOnPage` *required* | `string` | — | The same checkbox in server mode, where the table holds one page of a server's. |
4207
4292
  | `expandRowNamed` *required* | `(row: string) => string` | — | The expand button, named after the row header. |
4208
4293
  | `collapseRowNamed` *required* | `(row: string) => string` | — | |
4209
4294
  | `rowActions` *required* | `string` | — | Header of the actions column - for the screen reader, not visible. |
@@ -4649,11 +4734,11 @@ The keys of [Button](#/button/keyboard-button) apply here.
4649
4734
 
4650
4735
  | Prop | Type | Default | Description |
4651
4736
  |---|---|---|---|
4652
- | `direction` | `"row" \| "column"` | `"column"` | Below one another or beside one another. Below is the direction content stands in anyway, without being asked.<br>Shown in: [A row](#/stack-and-grid/a-row), [Gaps](#/stack-and-grid/gaps), [Wrapping](#/stack-and-grid/wrapping) and 66 more |
4653
- | `gap` | [`SpaceStep`](#type-SpaceStep)<br>`1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8` | `3` | Spacing as a step of the 4 px spacing steps (1–8).<br>Shown in: [A column](#/stack-and-grid/a-column), [A row](#/stack-and-grid/a-row), [Gaps](#/stack-and-grid/gaps) and 161 more |
4737
+ | `direction` | `"row" \| "column"` | `"column"` | Below one another or beside one another. Below is the direction content stands in anyway, without being asked.<br>Shown in: [A row](#/stack-and-grid/a-row), [Gaps](#/stack-and-grid/gaps), [Wrapping](#/stack-and-grid/wrapping) and 68 more |
4738
+ | `gap` | [`SpaceStep`](#type-SpaceStep)<br>`1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8` | `3` | Spacing as a step of the 4 px spacing steps (1–8).<br>Shown in: [A column](#/stack-and-grid/a-column), [A row](#/stack-and-grid/a-row), [Gaps](#/stack-and-grid/gaps) and 165 more |
4654
4739
  | `align` | `CSSProperties["alignItems"]` | — | Alignment across the direction – `alignItems` unchanged.<br>Shown in: [A row](#/stack-and-grid/a-row), [Gaps](#/stack-and-grid/gaps), [A tour summary](#/stack-and-grid/a-tour-summary) and 77 more |
4655
4740
  | `justify` | `CSSProperties["justifyContent"]` | — | Distribution along the direction – `justifyContent` unchanged.<br>Shown in: [A row](#/stack-and-grid/a-row), [A tour summary](#/stack-and-grid/a-tour-summary), [Name the same action in every row (VisuallyHidden)](#/visuallyhidden/actions-in-rows) and 9 more |
4656
- | `wrap` | `boolean` | `false` | Lets the children wrap when the line does not suffice.<br>Shown in: [Gaps](#/stack-and-grid/gaps), [Wrapping](#/stack-and-grid/wrapping), [Sized to the value (Sizes)](#/sizes/sized-to-the-value) and 29 more |
4741
+ | `wrap` | `boolean` | `false` | Lets the children wrap when the line does not suffice.<br>Shown in: [Gaps](#/stack-and-grid/gaps), [Wrapping](#/stack-and-grid/wrapping), [Sized to the value (Sizes)](#/sizes/sized-to-the-value) and 32 more |
4657
4742
 
4658
4743
  Also takes every attribute of `<div>`.
4659
4744
 
@@ -6264,11 +6349,11 @@ export default function IncidentSummary() {
6264
6349
 
6265
6350
  | Prop | Type | Default | Description |
6266
6351
  |---|---|---|---|
6267
- | `as` | `ElementType` | `"p"` | Element to render as.<br>Shown in: [Tones and weights](#/typography/tones-and-weights), [Set an incident summary](#/typography/incident-summary), [Use the language in your own components (Language)](#/language/own-components) and 17 more |
6268
- | `size` | [`TextSize`](#type-TextSize)<br>`"xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `"md"` | Type size from the token set. It is independent of the element: a `p` may be small without becoming a different element.<br>Shown in: [Configurator](#/typography/configurator-typography), [Sizes](#/typography/sizes), [Tones and weights](#/typography/tones-and-weights) and 128 more |
6352
+ | `as` | `ElementType` | `"p"` | Element to render as.<br>Shown in: [Tones and weights](#/typography/tones-and-weights), [Set an incident summary](#/typography/incident-summary), [Use the language in your own components (Language)](#/language/own-components) and 16 more |
6353
+ | `size` | [`TextSize`](#type-TextSize)<br>`"xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `"md"` | Type size from the token set. It is independent of the element: a `p` may be small without becoming a different element.<br>Shown in: [Configurator](#/typography/configurator-typography), [Sizes](#/typography/sizes), [Tones and weights](#/typography/tones-and-weights) and 129 more |
6269
6354
  | `weight` | [`TextWeight`](#type-TextWeight)<br>`"regular" \| "medium" \| "semibold"` | `"regular"` | Font weight from the token set.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tones and weights](#/typography/tones-and-weights), [Tracking and leading](#/typography/tracking-and-leading) and 16 more |
6270
6355
  | `tone` | [`TextTone`](#type-TextTone)<br>`"default" \| "secondary" \| "muted"` | `"default"` | How loud the text is. `secondary` and `muted` step back without falling below the contrast threshold.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tones and weights](#/typography/tones-and-weights), [Tracking and leading](#/typography/tracking-and-leading) and 94 more |
6271
- | `mono` | `boolean` | `false` | Geist Mono with tabular figures – for numbers and identifiers.<br>Shown in: [Configurator](#/typography/configurator-typography), [Numbers and identifiers](#/typography/numbers), [Handle long values](#/typography/long-values) and 29 more |
6356
+ | `mono` | `boolean` | `false` | Geist Mono with tabular figures – for numbers and identifiers.<br>Shown in: [Configurator](#/typography/configurator-typography), [Numbers and identifiers](#/typography/numbers), [Handle long values](#/typography/long-values) and 30 more |
6272
6357
  | `tracking` | [`TextTracking`](#type-TextTracking)<br>`"normal" \| "tight" \| "display" \| "caps"` | `"normal"` | Letter spacing from the token set. `caps` belongs with letterspaced capitals.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tracking and leading](#/typography/tracking-and-leading), [Set an incident summary](#/typography/incident-summary) |
6273
6358
  | `leading` | [`TextLeading`](#type-TextLeading)<br>`"normal" \| "tight"` | `"normal"` | Line spacing. `tight` for multi-line headings and key figures, where the normal spacing lets the lines fall apart.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tracking and leading](#/typography/tracking-and-leading) |
6274
6359
 
@@ -6758,7 +6843,7 @@ Under forced colours every variant keeps an outline where its edge would lie, an
6758
6843
  |---|---|---|---|
6759
6844
  | `variant` | [`ButtonVariant`](#type-ButtonVariant)<br>`"primary" \| "secondary" \| "ghost" \| "plain" \| "danger"` | `"secondary"` | How loud the button is. `primary` exactly once per surface - two main actions side by side are no longer a main action. `ghost` is quiet in the accent, `plain` quiet and neutral.<br>Shown in: [Configurator](#/button/configurator-button), [Variants](#/button/variants), [Sizes](#/button/sizes) and 51 more |
6760
6845
  | `size` | [`ButtonSize`](#type-ButtonSize)<br>`"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for buttons in header bars and table rows, `md` otherwise.<br>Shown in: [Configurator](#/button/configurator-button), [Sizes](#/button/sizes), [Add an icon](#/button/with-an-icon) and 55 more |
6761
- | `loading` | `boolean` | `false` | Shows a loading indicator and locks the button.<br>Shown in: [Configurator](#/button/configurator-button), [Loading and disabled](#/button/loading-and-disabled), [Submit a form](#/button/submit-a-form) and 3 more |
6846
+ | `loading` | `boolean` | `false` | Shows a loading indicator and locks the button.<br>Shown in: [Configurator](#/button/configurator-button), [Loading and disabled](#/button/loading-and-disabled), [Submit a form](#/button/submit-a-form) and 4 more |
6762
6847
 
6763
6848
  Also takes every attribute of `<button>`.
6764
6849
 
@@ -7111,7 +7196,7 @@ export default function Toolbar() {
7111
7196
  | `children` *required* | `ReactNode` | — | The icon: an SVG, a glyph of the set or an icon font's element. The button sets its size - `--u-icon-size`, `--u-icon-size-sm` at `sm`.<br>Shown in: [Configurator](#/iconbutton/configurator-iconbutton), [Name the icon](#/iconbutton/name-the-icon), [Variants](#/iconbutton/variants) and 5 more |
7112
7197
  | `variant` | [`ButtonVariant`](#type-ButtonVariant)<br>`"primary" \| "secondary" \| "ghost" \| "plain" \| "danger"` | `"plain"` | How loud the button is; `plain` is quiet and neutral, and the rest mean what they mean on a `Button`.<br>Shown in: [Configurator](#/iconbutton/configurator-iconbutton), [Variants](#/iconbutton/variants), [Sizes](#/iconbutton/sizes) and 3 more |
7113
7198
  | `size` | [`ButtonSize`](#type-ButtonSize)<br>`"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for buttons in header bars and table rows, `md` otherwise. From `ButtonProps`.<br>Shown in: [Configurator](#/iconbutton/configurator-iconbutton), [Sizes](#/iconbutton/sizes), [Build a toolbar](#/iconbutton/a-toolbar) and 55 more |
7114
- | `loading` | `boolean` | `false` | Shows a loading indicator and locks the button. From `ButtonProps`.<br>Shown in: [Configurator](#/iconbutton/configurator-iconbutton), [Loading and disabled](#/iconbutton/loading-and-disabled), [Configurator (Button)](#/button/configurator-button) and 3 more |
7199
+ | `loading` | `boolean` | `false` | Shows a loading indicator and locks the button. From `ButtonProps`.<br>Shown in: [Configurator](#/iconbutton/configurator-iconbutton), [Loading and disabled](#/iconbutton/loading-and-disabled), [Configurator (Button)](#/button/configurator-button) and 4 more |
7115
7200
 
7116
7201
  ###### Accessibility
7117
7202
 
@@ -7472,7 +7557,7 @@ Also takes every attribute of `<div>`.
7472
7557
  | `size` | [`ButtonSize`](#type-ButtonSize)<br>`"sm" \| "md"` | the size around it, else `"md"` | `sm` for buttons in header bars and table rows, `md` otherwise.<br>Shown in: [Disable while nothing is selected](#/buttongroup/disabled-until-selected), [Build an invoice toolbar](#/buttongroup/invoice-toolbar) |
7473
7558
  | `menuLabel` | `string` | the wording's "More actions" | Label of the trigger. |
7474
7559
  | `align` | `"start" \| "end"` | `"end"` | Alignment of the menu relative to the trigger.<br>Shown in: [Offer variants of the main action](#/buttongroup/split-button) |
7475
- | `loading` | `boolean` | `false` | Shows a loading indicator and locks the button. From `ButtonProps`.<br>Shown in: [Configurator (Button)](#/button/configurator-button), [Loading and disabled (Button)](#/button/loading-and-disabled), [Submit a form (Button)](#/button/submit-a-form) and 3 more |
7560
+ | `loading` | `boolean` | `false` | Shows a loading indicator and locks the button. From `ButtonProps`.<br>Shown in: [Configurator (Button)](#/button/configurator-button), [Loading and disabled (Button)](#/button/loading-and-disabled), [Submit a form (Button)](#/button/submit-a-form) and 4 more |
7476
7561
 
7477
7562
  ###### Events
7478
7563
 
@@ -7981,10 +8066,10 @@ The keys of [Input](#/input/keyboard-input), [NumberInput](#/numberinput/keyboar
7981
8066
 
7982
8067
  | Prop | Type | Default | Description |
7983
8068
  |---|---|---|---|
7984
- | `label` *required* | `ReactNode` | — | The label of the field. It is mandatory: a field without a name is a field without a question for a screen reader.<br>Shown in: [Configurator](#/formfield/configurator-formfield), [Label and hint](#/formfield/label-and-hint), [Show an error](#/formfield/show-an-error) and 70 more |
7985
- | `hint` | `ReactNode` | — | Help text below the field. Replaced by `error`.<br>Shown in: [Configurator](#/formfield/configurator-formfield), [Label and hint](#/formfield/label-and-hint), [Show an error](#/formfield/show-an-error) and 32 more |
7986
- | `error` | `ReactNode` | — | Error message; it marks the field as invalid at the same time.<br>Shown in: [Configurator](#/formfield/configurator-formfield), [Show an error](#/formfield/show-an-error), [Check an invoice on submit](#/formfield/check-an-invoice-on-submit) and 21 more |
7987
- | `required` | `boolean` | `false` | Sets the required mark on the label and `aria-required` on the field - on Input, Select, Textarea, NumberInput, Combobox, RadioGroup and Checkbox. The triggers of the pickers and of the MultiSelect are buttons, on which `aria-required` is not a permitted attribute; there the mark carries it alone. It validates nothing - validation belongs to the caller.<br>Shown in: [Configurator](#/formfield/configurator-formfield), [Mark a field as required](#/formfield/mark-a-field-as-required), [Check an invoice on submit](#/formfield/check-an-invoice-on-submit) and 8 more |
8069
+ | `label` *required* | `ReactNode` | — | The label of the field. It is mandatory: a field without a name is a field without a question for a screen reader.<br>Shown in: [Configurator](#/formfield/configurator-formfield), [Label and hint](#/formfield/label-and-hint), [Show an error](#/formfield/show-an-error) and 76 more |
8070
+ | `hint` | `ReactNode` | — | Help text below the field. Replaced by `error`.<br>Shown in: [Configurator](#/formfield/configurator-formfield), [Label and hint](#/formfield/label-and-hint), [Show an error](#/formfield/show-an-error) and 33 more |
8071
+ | `error` | `ReactNode` | — | Error message; it marks the field as invalid at the same time.<br>Shown in: [Configurator](#/formfield/configurator-formfield), [Show an error](#/formfield/show-an-error), [Check an invoice on submit](#/formfield/check-an-invoice-on-submit) and 22 more |
8072
+ | `required` | `boolean` | `false` | Sets the required mark on the label and `aria-required` on the field - on Input, Select, Textarea, NumberInput, Combobox, RadioGroup and Checkbox. The triggers of the pickers and of the MultiSelect are buttons, on which `aria-required` is not a permitted attribute; there the mark carries it alone. It validates nothing - validation belongs to the caller.<br>Shown in: [Configurator](#/formfield/configurator-formfield), [Mark a field as required](#/formfield/mark-a-field-as-required), [Check an invoice on submit](#/formfield/check-an-invoice-on-submit) and 9 more |
7988
8073
  | `fieldId` | `string` | — | Optional: a fixed id for the input element (instead of a generated one).<br>Shown in: [Sum up a form's errors (Alert)](#/alert/above-a-form) |
7989
8074
 
7990
8075
  Also takes every attribute of `<div>`.
@@ -8736,7 +8821,7 @@ export default function SelectAllWithAMixedState() {
8736
8821
 
8737
8822
  | Prop | Type | Default | Description |
8738
8823
  |---|---|---|---|
8739
- | `label` | `ReactNode` | — | Label to the right of the checkbox.<br>Shown in: [Configurator](#/checkbox/configurator-checkbox), [Checkbox](#/checkbox/checkbox), [States](#/checkbox/states) and 9 more |
8824
+ | `label` | `ReactNode` | — | Label to the right of the checkbox.<br>Shown in: [Configurator](#/checkbox/configurator-checkbox), [Checkbox](#/checkbox/checkbox), [States](#/checkbox/states) and 10 more |
8740
8825
  | `indeterminate` | `boolean` | `false` | Partially checked (e.g. "select all" with a mixed selection).<br>Shown in: [Configurator](#/checkbox/configurator-checkbox), [States](#/checkbox/states), [Select all with a mixed state](#/checkbox/select-all-with-a-mixed-state) |
8741
8826
 
8742
8827
  Also takes every attribute of `<input>` – without `size`, `type`.
@@ -8940,7 +9025,7 @@ export default function SettingsOfAService() {
8940
9025
 
8941
9026
  | Prop | Type | Default | Description |
8942
9027
  |---|---|---|---|
8943
- | `label` | `ReactNode` | — | Label to the right of the switch.<br>Shown in: [Configurator](#/switch/configurator-switch), [On and off](#/switch/on-and-off), [States and sizes](#/switch/states-and-sizes) and 11 more |
9028
+ | `label` | `ReactNode` | — | Label to the right of the switch.<br>Shown in: [Configurator](#/switch/configurator-switch), [On and off](#/switch/on-and-off), [States and sizes](#/switch/states-and-sizes) and 12 more |
8944
9029
  | `size` | `"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for a toolbar and dense forms, `md` otherwise.<br>Shown in: [Configurator](#/switch/configurator-switch), [States and sizes](#/switch/states-and-sizes) |
8945
9030
  | `invalid` | `boolean` | — | Marks the switch as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`.<br>Shown in: [Configurator](#/switch/configurator-switch), [With an error](#/switch/with-an-error) |
8946
9031
 
@@ -9081,6 +9166,7 @@ export default function States() {
9081
9166
 
9082
9167
  #### When to use something else
9083
9168
 
9169
+ - Two to four short options without explanations, standing among fields → SegmentedControl
9084
9170
  - More than about five options, or options that need no explanation → Select
9085
9171
  - A single yes or no → Checkbox
9086
9172
  - Several options at once → MultiSelect
@@ -9099,10 +9185,10 @@ export default function States() {
9099
9185
 
9100
9186
  | Prop | Type | Default | Description |
9101
9187
  |---|---|---|---|
9102
- | `options` *required* | `readonly `[`RadioOption`](#type-RadioOption)`<T>[]` | — | The possibilities, in the order in which they are meant to stand.<br>Shown in: [Configurator](#/radiogroup/configurator-radiogroup), [Radio group](#/radiogroup/radio-group), [Descriptions](#/radiogroup/descriptions) and 4 more |
9103
- | `defaultValue` | `T \| null` | — | Initial value of an uncontrolled group. Not together with `value`.<br>Shown in: [Configurator](#/radiogroup/configurator-radiogroup), [States](#/radiogroup/states) |
9188
+ | `options` *required* | `readonly `[`RadioOption`](#type-RadioOption)`<T>[]` | — | The possibilities, in the order in which they are meant to stand.<br>Shown in: [Configurator](#/radiogroup/configurator-radiogroup), [Radio group](#/radiogroup/radio-group), [Descriptions](#/radiogroup/descriptions) and 5 more |
9189
+ | `defaultValue` | `T \| null` | — | Initial value of an uncontrolled group. Not together with `value`.<br>Shown in: [Configurator](#/radiogroup/configurator-radiogroup), [States](#/radiogroup/states), [A row of fields (Sizes)](#/sizes/a-row-of-fields) |
9104
9190
  | `value` | `T \| null` | — | The chosen possibility; `null` means: none yet. Together with `onChange` the group is controlled.<br>Shown in: [Radio group](#/radiogroup/radio-group), [Descriptions](#/radiogroup/descriptions), [Side by side](#/radiogroup/side-by-side) and 2 more |
9105
- | `orientation` | `"vertical" \| "horizontal"` | `"vertical"` | Arrangement: one below the other, or side by side.<br>Shown in: [Configurator](#/radiogroup/configurator-radiogroup), [Side by side](#/radiogroup/side-by-side) |
9191
+ | `orientation` | `"vertical" \| "horizontal"` | `"vertical"` | Arrangement: one below the other, or side by side.<br>Shown in: [Configurator](#/radiogroup/configurator-radiogroup), [Side by side](#/radiogroup/side-by-side), [A row of fields (Sizes)](#/sizes/a-row-of-fields) |
9106
9192
  | `size` | `"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for a toolbar and dense forms, `md` otherwise.<br>Shown in: [Configurator](#/radiogroup/configurator-radiogroup), [States](#/radiogroup/states) |
9107
9193
  | `disabled` | `boolean` | `false` | Disables the whole group. `RadioOption` disables single possibilities.<br>Shown in: [Configurator](#/radiogroup/configurator-radiogroup), [States](#/radiogroup/states) |
9108
9194
  | `name` | `string` | a generated one | Name of the radio group within the form. |
@@ -9119,11 +9205,304 @@ Also takes every attribute of `<div>` – without `defaultValue`, `onChange`.
9119
9205
 
9120
9206
  | Prop | Type | Default | Description |
9121
9207
  |---|---|---|---|
9122
- | `value` *required* | `T` | — | What comes back when this possibility is chosen.<br>Shown in: [Radio group](#/radiogroup/radio-group), [Descriptions](#/radiogroup/descriptions), [Side by side](#/radiogroup/side-by-side) and 2 more |
9123
- | `label` *required* | `ReactNode` | — | What stands beside it.<br>Shown in: [Radio group](#/radiogroup/radio-group), [Descriptions](#/radiogroup/descriptions), [Side by side](#/radiogroup/side-by-side) and 2 more |
9208
+ | `value` *required* | `T` | — | What comes back when this possibility is chosen.<br>Shown in: [Radio group](#/radiogroup/radio-group), [Descriptions](#/radiogroup/descriptions), [Side by side](#/radiogroup/side-by-side) and 3 more |
9209
+ | `label` *required* | `ReactNode` | — | What stands beside it.<br>Shown in: [Radio group](#/radiogroup/radio-group), [Descriptions](#/radiogroup/descriptions), [Side by side](#/radiogroup/side-by-side) and 3 more |
9124
9210
  | `description` | `ReactNode` | — | Line of explanation under the label; it is read out as well.<br>Shown in: [Descriptions](#/radiogroup/descriptions), [Approve spending against a budget (Scenarios)](#/scenarios/approve-spending), [Set up a team (Scenarios)](#/scenarios/set-up-a-team) |
9125
9211
  | `disabled` | `boolean` | — | Takes the possibility out of the choice but leaves it visible: a choice that does not exist is a different statement from one that may not be made.<br>Shown in: [Descriptions](#/radiogroup/descriptions), [Approve spending against a budget (Scenarios)](#/scenarios/approve-spending) |
9126
9212
 
9213
+ ### SegmentedControl
9214
+
9215
+ One choice out of a few short possibilities, drawn as one control with a segment for each (segmented button, button toggle): a sunken track, the choice lifted out of it. As tall as a select, so it stands in a row of fields too.
9216
+
9217
+ ```ts
9218
+ import { SegmentedControl } from "@umriss-ui/core";
9219
+ ```
9220
+
9221
+ Demo page: https://romanhaendler.github.io/umriss-ui/core/segmentedcontrol/
9222
+
9223
+ A screen reader hears a radio group, each segment a radio with its position and whether it is chosen; the control is one tab stop, and the arrow keys move and choose at once, skipping disabled possibilities.
9224
+
9225
+ Each segment is as wide as its word, and the width never follows the choice. `fill` takes the width of the place instead and shares it equally; an option's `icon` stands before its word.
9226
+
9227
+ Two drawings: `inset`, the default - a sunken track with the choice lifted out of it; and `field` - a field's edge, the choice filled with ink, for a row whose fields it should match box for box. Both are a control's height with their words on a select's line, and the keys are the same.
9228
+
9229
+ #### Examples
9230
+
9231
+ ##### Segmented control
9232
+
9233
+ Pass `options`, `value` and `onChange`; `value` is `null` until something is chosen.
9234
+
9235
+ ```tsx
9236
+ import { useState } from "react";
9237
+ import { SegmentedControl, Text, Stack } from "@umriss-ui/core";
9238
+
9239
+ export default function SegmentedControlExample() {
9240
+ const [period, setPeriod] = useState<"hour" | "day" | "week" | null>("day");
9241
+
9242
+ return (
9243
+ <Stack gap={3} align="flex-start">
9244
+ <SegmentedControl
9245
+ aria-label="Period"
9246
+ value={period}
9247
+ onChange={setPeriod}
9248
+ options={[
9249
+ { value: "hour", label: "Hour" },
9250
+ { value: "day", label: "Day" },
9251
+ { value: "week", label: "Week" },
9252
+ ]}
9253
+ />
9254
+ <Text size="xs" tone="muted" mono>
9255
+ period: {period ?? "none"}
9256
+ </Text>
9257
+ </Stack>
9258
+ );
9259
+ }
9260
+ ```
9261
+
9262
+ ##### In a field
9263
+
9264
+ Inside a `FormField` the control is named by the field's label and takes its hint or error, required and invalid state by itself.
9265
+
9266
+ ```tsx
9267
+ import { useState } from "react";
9268
+ import { FormField, SegmentedControl } from "@umriss-ui/core";
9269
+
9270
+ export default function InAField() {
9271
+ const [state, setState] = useState<"raw" | "cleaned">("raw");
9272
+
9273
+ return (
9274
+ <FormField
9275
+ label="State of the data"
9276
+ required
9277
+ error={state === "raw" ? "A report is drawn from cleaned data." : undefined}
9278
+ >
9279
+ <SegmentedControl
9280
+ value={state}
9281
+ onChange={setState}
9282
+ options={[
9283
+ { value: "raw", label: "Raw data" },
9284
+ { value: "cleaned", label: "Cleaned data" },
9285
+ ]}
9286
+ />
9287
+ </FormField>
9288
+ );
9289
+ }
9290
+ ```
9291
+
9292
+ ##### States and sizes
9293
+
9294
+ `size` is `md` or `sm`; a `ControlSizeProvider` sets it for a place. `disabled` closes the whole control, `disabled` on an option closes that possibility and leaves it in view - the arrow keys skip it.
9295
+
9296
+ ```tsx
9297
+ import { FormField, SegmentedControl, Stack } from "@umriss-ui/core";
9298
+
9299
+ const PERIODS = [
9300
+ { value: "hour", label: "Hour" },
9301
+ { value: "day", label: "Day" },
9302
+ { value: "week", label: "Week" },
9303
+ ] as const;
9304
+
9305
+ export default function StatesAndSizes() {
9306
+ return (
9307
+ <Stack direction="row" gap={5} wrap>
9308
+ <FormField label="Medium">
9309
+ <SegmentedControl defaultValue="day" options={PERIODS} />
9310
+ </FormField>
9311
+ <FormField label="Small">
9312
+ <SegmentedControl size="sm" defaultValue="day" options={PERIODS} />
9313
+ </FormField>
9314
+ <FormField label="Disabled">
9315
+ <SegmentedControl disabled defaultValue="day" options={PERIODS} />
9316
+ </FormField>
9317
+ <FormField label="One possibility closed" hint="No forecast for this line yet.">
9318
+ <SegmentedControl
9319
+ defaultValue="measured"
9320
+ options={[
9321
+ { value: "measured", label: "Measured" },
9322
+ { value: "forecast", label: "Forecast", disabled: true },
9323
+ ]}
9324
+ />
9325
+ </FormField>
9326
+ </Stack>
9327
+ );
9328
+ }
9329
+ ```
9330
+
9331
+ ##### Long words in a narrow place
9332
+
9333
+ The control is as wide as its words and never wider than its place: on a phone, words that do not fit end in an ellipsis. Short words are the form's strength - past three or four of them, a Select is the better choice.
9334
+
9335
+ ```tsx
9336
+ import { FormField, SegmentedControl } from "@umriss-ui/core";
9337
+
9338
+ export default function LongWordsInANarrowPlace() {
9339
+ return (
9340
+ <FormField label="Readings">
9341
+ <SegmentedControl
9342
+ defaultValue="raw"
9343
+ options={[
9344
+ { value: "raw", label: "Raw readings from the sensors" },
9345
+ { value: "cleaned", label: "Cleaned and validated readings" },
9346
+ ]}
9347
+ />
9348
+ </FormField>
9349
+ );
9350
+ }
9351
+ ```
9352
+
9353
+ ##### A theme switch
9354
+
9355
+ A choice that stands on its own, in a menu or a settings panel. `fill` takes the panel's width and shares it equally between the segments; an option's `icon` stands before its word, at the size the control gives it.
9356
+
9357
+ ```tsx
9358
+ import { Card, CardBody, FormField, SegmentedControl } from "@umriss-ui/core";
9359
+
9360
+ /* Icons from outside the set: any SVG, sized by the control. */
9361
+ const stroke = { fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" } as const;
9362
+
9363
+ function Sun() {
9364
+ return (
9365
+ <svg viewBox="0 0 24 24" {...stroke}>
9366
+ <circle cx="12" cy="12" r="4" />
9367
+ <path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4" />
9368
+ </svg>
9369
+ );
9370
+ }
9371
+
9372
+ function Moon() {
9373
+ return (
9374
+ <svg viewBox="0 0 24 24" {...stroke}>
9375
+ <path d="M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5z" />
9376
+ </svg>
9377
+ );
9378
+ }
9379
+
9380
+ function Monitor() {
9381
+ return (
9382
+ <svg viewBox="0 0 24 24" {...stroke}>
9383
+ <rect x="3" y="4" width="18" height="12" rx="2" />
9384
+ <path d="M8 20h8M12 16v4" />
9385
+ </svg>
9386
+ );
9387
+ }
9388
+
9389
+ export default function ThemeSwitch() {
9390
+ return (
9391
+ <Card style={{ maxWidth: 320 }}>
9392
+ <CardBody>
9393
+ <FormField label="Theme">
9394
+ <SegmentedControl
9395
+ fill
9396
+ defaultValue="system"
9397
+ options={[
9398
+ { value: "light", label: "Light", icon: <Sun /> },
9399
+ { value: "dark", label: "Dark", icon: <Moon /> },
9400
+ { value: "system", label: "System", icon: <Monitor /> },
9401
+ ]}
9402
+ />
9403
+ </FormField>
9404
+ </CardBody>
9405
+ </Card>
9406
+ );
9407
+ }
9408
+ ```
9409
+
9410
+ ##### Drawn as a field
9411
+
9412
+ `variant="field"` gives it a field's edge and fills the choice with ink, for a row whose fields it should match box for box. Inset or a field, it is a control's height and its words stand on the select's line - at either size.
9413
+
9414
+ ```tsx
9415
+ import { ControlSizeProvider, FormField, SegmentedControl, Select, Stack } from "@umriss-ui/core";
9416
+ import type { ControlSize } from "@umriss-ui/core";
9417
+
9418
+ function Row({ size }: { size: ControlSize }) {
9419
+ return (
9420
+ <Stack role="group" aria-label={size === "sm" ? "Small" : "Medium"} direction="row" gap={3} wrap>
9421
+ <FormField label="Caster">
9422
+ <Select defaultValue="">
9423
+ <option value="">Every caster</option>
9424
+ <option>Caster 1</option>
9425
+ </Select>
9426
+ </FormField>
9427
+ <FormField label="Values">
9428
+ <SegmentedControl
9429
+ variant="field"
9430
+ defaultValue="measured"
9431
+ options={[
9432
+ { value: "measured", label: "Measured" },
9433
+ { value: "forecast", label: "Forecast" },
9434
+ ]}
9435
+ />
9436
+ </FormField>
9437
+ </Stack>
9438
+ );
9439
+ }
9440
+
9441
+ export default function DrawnAsAField() {
9442
+ return (
9443
+ <Stack gap={5}>
9444
+ <Row size="md" />
9445
+ <ControlSizeProvider size="sm">
9446
+ <Row size="sm" />
9447
+ </ControlSizeProvider>
9448
+ </Stack>
9449
+ );
9450
+ }
9451
+ ```
9452
+
9453
+ #### When to use something else
9454
+
9455
+ - Possibilities that need a line of explanation each → RadioGroup
9456
+ - More than about four possibilities, or long ones → Select
9457
+ - A single yes or no → Switch
9458
+
9459
+ #### Keyboard
9460
+
9461
+ | Key | Action |
9462
+ |---|---|
9463
+ | `Tab` | Moves into the control, onto the chosen segment, and out again. |
9464
+ | `Arrow Right / Arrow Down` | Chooses the next segment, wrapping at the end. |
9465
+ | `Arrow Left / Arrow Up` | Chooses the previous segment. |
9466
+
9467
+ #### API
9468
+
9469
+ ##### `SegmentedControlProps<T extends string>`
9470
+
9471
+ | Prop | Type | Default | Description |
9472
+ |---|---|---|---|
9473
+ | `options` *required* | `readonly `[`SegmentedOption`](#type-SegmentedOption)`<T>[]` | — | The possibilities, two to four, in the order in which they stand.<br>Shown in: [Configurator](#/segmentedcontrol/configurator-segmentedcontrol), [Segmented control](#/segmentedcontrol/segmented-control), [In a field](#/segmentedcontrol/in-a-field) and 5 more |
9474
+ | `defaultValue` | `T \| null` | — | Initial value of an uncontrolled control. Not together with `value`.<br>Shown in: [Configurator](#/segmentedcontrol/configurator-segmentedcontrol), [States and sizes](#/segmentedcontrol/states-and-sizes), [Long words in a narrow place](#/segmentedcontrol/long-words-in-a-narrow-place) and 3 more |
9475
+ | `value` | `T \| null` | — | The chosen possibility; `null` means: none yet. Together with `onChange` the control is controlled.<br>Shown in: [Segmented control](#/segmentedcontrol/segmented-control), [In a field](#/segmentedcontrol/in-a-field) |
9476
+ | `size` | `"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for a toolbar and dense forms, `md` otherwise.<br>Shown in: [Configurator](#/segmentedcontrol/configurator-segmentedcontrol), [States and sizes](#/segmentedcontrol/states-and-sizes) |
9477
+ | `variant` | `"field" \| "inset"` | `"inset"` | How it is drawn. `inset`: a sunken track without an edge, the choice a surface lifted out of it. `field`: a field's edge, the choice filled with ink - for a row whose fields it should match box for box.<br>Shown in: [Configurator](#/segmentedcontrol/configurator-segmentedcontrol), [Drawn as a field](#/segmentedcontrol/drawn-as-a-field) |
9478
+ | `fill` | `boolean` | `false` | Takes the whole width its place gives it, as a field in a column does, and shares it equally between the segments. Without it the control is as wide as its words.<br>Shown in: [Configurator](#/segmentedcontrol/configurator-segmentedcontrol), [A theme switch](#/segmentedcontrol/a-theme-switch) |
9479
+ | `disabled` | `boolean` | `false` | Disables the whole control. `SegmentedOption` disables single possibilities.<br>Shown in: [Configurator](#/segmentedcontrol/configurator-segmentedcontrol), [States and sizes](#/segmentedcontrol/states-and-sizes) |
9480
+ | `name` | `string` | a generated one | Name of the radio group within the form. |
9481
+
9482
+ ###### Events
9483
+
9484
+ | Prop | Type | Default | Description |
9485
+ |---|---|---|---|
9486
+ | `onChange` | `(value: T) => void` | — | Runs on every choice – on the one made with the arrow keys as well.<br>Shown in: [Segmented control](#/segmentedcontrol/segmented-control), [In a field](#/segmentedcontrol/in-a-field) |
9487
+
9488
+ Also takes every attribute of `<div>` – without `defaultValue`, `onChange`.
9489
+
9490
+ ##### `SegmentedOption<T extends string>`
9491
+
9492
+ | Prop | Type | Default | Description |
9493
+ |---|---|---|---|
9494
+ | `value` *required* | `T` | — | What comes back when this possibility is chosen.<br>Shown in: [Segmented control](#/segmentedcontrol/segmented-control), [In a field](#/segmentedcontrol/in-a-field), [States and sizes](#/segmentedcontrol/states-and-sizes) and 4 more |
9495
+ | `label` *required* | `ReactNode` | — | The segment's word - a short one; a long label ends in an ellipsis.<br>Shown in: [Segmented control](#/segmentedcontrol/segmented-control), [In a field](#/segmentedcontrol/in-a-field), [States and sizes](#/segmentedcontrol/states-and-sizes) and 4 more |
9496
+ | `icon` | `ReactNode` | — | An icon before the word: an SVG, a glyph of the set or an icon font's element. The control sets its size - `--u-icon-size`, `--u-icon-size-sm` at `sm` - and hides it from assistive technology: the word names the possibility.<br>Shown in: [A theme switch](#/segmentedcontrol/a-theme-switch) |
9497
+ | `disabled` | `boolean` | — | Takes the possibility out of the choice but leaves it visible.<br>Shown in: [States and sizes](#/segmentedcontrol/states-and-sizes) |
9498
+
9499
+ #### Known limits
9500
+
9501
+ - Two to four short possibilities: a word that does not fit its place ends in an ellipsis.
9502
+ - No icons and no line of explanation in a segment; several chosen at once is not this control.
9503
+
9504
+ What umriss deliberately does not build, and why: [ADR-0032](https://romanhaendler.github.io/umriss-ui/what-umriss-ui-is-not/).
9505
+
9127
9506
  ### FileInput
9128
9507
 
9129
9508
  Choose files from the system's dialog or drop them on the zone (file picker, upload field). The chosen files are listed with their size and can be removed one by one.
@@ -10982,11 +11361,11 @@ export default function Colour() {
10982
11361
 
10983
11362
  ##### Refresh a panel in place
10984
11363
 
10985
- While a panel reloads, a spinner in its head says so and the old figures stay readable below it.
11364
+ While a panel reloads, the button that started it carries the spinner - `loading` on a `Button` - and the old figures stay readable below it. The button stays, so the head keeps its height.
10986
11365
 
10987
11366
  ```tsx
10988
11367
  import { useEffect, useState } from "react";
10989
- import { Button, Card, CardBody, CardHeader, Spinner, Stack, Text } from "@umriss-ui/core";
11368
+ import { Button, Card, CardBody, CardHeader, Stack, Text } from "@umriss-ui/core";
10990
11369
 
10991
11370
  export default function APanelRefreshing() {
10992
11371
  const [loading, setLoading] = useState(false);
@@ -11002,18 +11381,9 @@ export default function APanelRefreshing() {
11002
11381
  <CardHeader
11003
11382
  title="Open incidents"
11004
11383
  actions={
11005
- loading ? (
11006
- <Stack direction="row" gap={2} align="center">
11007
- <Spinner size={12} aria-label="Refreshing the incidents" />
11008
- <Text as="span" size="xs" tone="muted">
11009
- Refreshing
11010
- </Text>
11011
- </Stack>
11012
- ) : (
11013
- <Button size="sm" variant="ghost" onClick={() => setLoading(true)}>
11014
- Refresh
11015
- </Button>
11016
- )
11384
+ <Button size="sm" variant="ghost" loading={loading} onClick={() => setLoading(true)}>
11385
+ Refresh
11386
+ </Button>
11017
11387
  }
11018
11388
  />
11019
11389
  <CardBody>
@@ -11049,7 +11419,7 @@ With reduced motion it turns at less than half its speed instead of stopping, so
11049
11419
 
11050
11420
  | Prop | Type | Default | Description |
11051
11421
  |---|---|---|---|
11052
- | `size` | `number` | `14` | Edge length in pixels.<br>Shown in: [Sizes](#/spinner/sizes), [Colour](#/spinner/colour), [Refresh a panel in place](#/spinner/a-panel-refreshing) |
11422
+ | `size` | `number` | `14` | Edge length in pixels.<br>Shown in: [Sizes](#/spinner/sizes), [Colour](#/spinner/colour) |
11053
11423
 
11054
11424
  Also takes every attribute of `<svg>`.
11055
11425
 
@@ -11931,7 +12301,7 @@ export default function AfterAnAction() {
11931
12301
 
11932
12302
  ##### Where they stand
11933
12303
 
11934
- `toast.position` in the `UmrissProvider` puts every toast of the application at one edge and one place along it; the deck grows away from that edge. On a phone they take the window's width, and only the edge counts.
12304
+ `toast.position` in the `UmrissProvider` puts every toast of the application at one edge and one place along it; the deck grows away from that edge. On a phone they take the window's width, and only the edge counts. How far they stand from the edge is `--u-toast-inset-top` and `--u-toast-inset-bottom` on `:root` - below a fixed header, above a toolbar at the bottom.
11935
12305
 
11936
12306
  ```tsx
11937
12307
  import { useMemo, useState } from "react";
@@ -17809,14 +18179,14 @@ const CalendarGlyph: import("react").ForwardRefExoticComponent<Omit<GlyphProps &
17809
18179
 
17810
18180
  [Card](#/card) – A surface that holds one block of a screen together: a head with its title and actions, and a body (also called a panel or tile). Reach for it for each block of a dashboard or a detail view.
17811
18181
 
17812
- Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [Theming](#/theming), [Sizes](#/sizes), [Stack and Grid](#/stack-and-grid), [Card](#/card), [Splitter](#/splitter), [Typography](#/typography), [Button](#/button), [NumberInput](#/numberinput), [Slider](#/slider), [Switch](#/switch), [FileInput](#/fileinput), [Combobox](#/combobox), [Spinner](#/spinner), [ProgressBar](#/progressbar), [EmptyState](#/emptystate), [CommandPalette](#/commandpalette), [Breadcrumb](#/breadcrumb), [Tabs](#/tabs), [Accordion](#/accordion), [Stepper](#/stepper) and [Stat](#/stat).
18182
+ Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [Theming](#/theming), [Sizes](#/sizes), [Stack and Grid](#/stack-and-grid), [Card](#/card), [Splitter](#/splitter), [Typography](#/typography), [Button](#/button), [NumberInput](#/numberinput), [Slider](#/slider), [Switch](#/switch), [SegmentedControl](#/segmentedcontrol), [FileInput](#/fileinput), [Combobox](#/combobox), [Spinner](#/spinner), [ProgressBar](#/progressbar), [EmptyState](#/emptystate), [CommandPalette](#/commandpalette), [Breadcrumb](#/breadcrumb), [Tabs](#/tabs), [Accordion](#/accordion), [Stepper](#/stepper) and [Stat](#/stat).
17813
18183
 
17814
18184
  ##### `CardBody`
17815
18185
 
17816
18186
  [Card](#/card) – The content of a `Card`; the part that folds away in a collapsible card.
17817
18187
  `flush` removes the padding for a table or a log.
17818
18188
 
17819
- Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [Theming](#/theming), [Sizes](#/sizes), [Stack and Grid](#/stack-and-grid), [Card](#/card), [Typography](#/typography), [Button](#/button), [NumberInput](#/numberinput), [Slider](#/slider), [Switch](#/switch), [FileInput](#/fileinput), [Combobox](#/combobox), [Spinner](#/spinner), [ProgressBar](#/progressbar), [EmptyState](#/emptystate), [Breadcrumb](#/breadcrumb), [Tabs](#/tabs), [Accordion](#/accordion), [Stepper](#/stepper) and [Stat](#/stat).
18189
+ Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [Theming](#/theming), [Sizes](#/sizes), [Stack and Grid](#/stack-and-grid), [Card](#/card), [Typography](#/typography), [Button](#/button), [NumberInput](#/numberinput), [Slider](#/slider), [Switch](#/switch), [SegmentedControl](#/segmentedcontrol), [FileInput](#/fileinput), [Combobox](#/combobox), [Spinner](#/spinner), [ProgressBar](#/progressbar), [EmptyState](#/emptystate), [Breadcrumb](#/breadcrumb), [Tabs](#/tabs), [Accordion](#/accordion), [Stepper](#/stepper) and [Stat](#/stat).
17820
18190
 
17821
18191
  ##### `CardHeader`
17822
18192
 
@@ -17829,7 +18199,7 @@ Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [Theming](#/theming
17829
18199
 
17830
18200
  [Checkbox](#/checkbox) – A yes or no that counts when the form is saved (tick box). It also shows the mixed state of a parent whose children are partly checked.
17831
18201
 
17832
- Used on [Scenarios](#/), [Theming](#/theming), [ButtonGroup](#/buttongroup), [FormField](#/formfield), [Checkbox](#/checkbox), [Popover](#/popover), [Drawer](#/drawer) and [CommandPalette](#/commandpalette).
18202
+ Used on [Scenarios](#/), [Theming](#/theming), [Sizes](#/sizes), [ButtonGroup](#/buttongroup), [FormField](#/formfield), [Checkbox](#/checkbox), [Popover](#/popover), [Drawer](#/drawer) and [CommandPalette](#/commandpalette).
17833
18203
 
17834
18204
  ##### `ClockGlyph`
17835
18205
 
@@ -17869,7 +18239,7 @@ Used on [ContextMenu](#/contextmenu).
17869
18239
  it unless it says its own. A popover, dialog or tooltip opened from inside
17870
18240
  starts without it.
17871
18241
 
17872
- Used on [Sizes](#/sizes).
18242
+ Used on [Sizes](#/sizes) and [SegmentedControl](#/segmentedcontrol).
17873
18243
 
17874
18244
  ##### `CrossGlyph`
17875
18245
 
@@ -17940,7 +18310,7 @@ Used on [Sizes](#/sizes) and [FileInput](#/fileinput).
17940
18310
 
17941
18311
  [FormField](#/formfield) – The frame around a field: its label, a hint below it and the error that replaces the hint. Wrap every field in one, so the question, the help and the problem are read out together.
17942
18312
 
17943
- Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [Sizes](#/sizes), [Language](#/language), [Button](#/button), [Input](#/input), [FormField](#/formfield), [Textarea](#/textarea), [NumberInput](#/numberinput), [Slider](#/slider), [Checkbox](#/checkbox), [Switch](#/switch), [RadioGroup](#/radiogroup), [FileInput](#/fileinput), [Select](#/select), [Combobox](#/combobox), [MultiSelect](#/multiselect), [DatePicker](#/datepicker), [DateTimePicker](#/datetimepicker), [DateRangePicker](#/daterangepicker), [DateTimeRangePicker](#/datetimerangepicker), [Alert](#/alert), [Modal](#/modal), [Breadcrumb](#/breadcrumb), [Accordion](#/accordion) and [TreeView](#/treeview).
18313
+ Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [Sizes](#/sizes), [Language](#/language), [Button](#/button), [Input](#/input), [FormField](#/formfield), [Textarea](#/textarea), [NumberInput](#/numberinput), [Slider](#/slider), [Checkbox](#/checkbox), [Switch](#/switch), [RadioGroup](#/radiogroup), [SegmentedControl](#/segmentedcontrol), [FileInput](#/fileinput), [Select](#/select), [Combobox](#/combobox), [MultiSelect](#/multiselect), [DatePicker](#/datepicker), [DateTimePicker](#/datetimepicker), [DateRangePicker](#/daterangepicker), [DateTimeRangePicker](#/datetimerangepicker), [Alert](#/alert), [Modal](#/modal), [Breadcrumb](#/breadcrumb), [Accordion](#/accordion) and [TreeView](#/treeview).
17944
18314
 
17945
18315
  ##### `FormFieldBoundary`
17946
18316
 
@@ -18149,13 +18519,19 @@ Used on [Scenarios](#/), [ProgressBar](#/progressbar) and [Stepper](#/stepper).
18149
18519
 
18150
18520
  [RadioGroup](#/radiogroup) – One choice out of a few that all stay in view (radio buttons, option group). Each option may carry a sentence that explains it.
18151
18521
 
18152
- Used on [Scenarios](#/) and [RadioGroup](#/radiogroup).
18522
+ Used on [Scenarios](#/), [Sizes](#/sizes) and [RadioGroup](#/radiogroup).
18523
+
18524
+ ##### `SegmentedControl`
18525
+
18526
+ [SegmentedControl](#/segmentedcontrol) – One choice out of a few short possibilities, drawn as one control with a segment for each (segmented button, button toggle): a sunken track, the choice lifted out of it. As tall as a select, so it stands in a row of fields too.
18527
+
18528
+ Used on [Sizes](#/sizes) and [SegmentedControl](#/segmentedcontrol).
18153
18529
 
18154
18530
  ##### `Select`
18155
18531
 
18156
18532
  [Select](#/select) – One choice from a short, known list (dropdown). Under a mouse and the keys it opens the Combobox's list; under a finger the system's picker, a wheel on the phone.
18157
18533
 
18158
- Used on [Scenarios](#/), [Sizes](#/sizes), [FormField](#/formfield), [Select](#/select), [Popover](#/popover), [Modal](#/modal), [CommandPalette](#/commandpalette), [Accordion](#/accordion) and [Tag](#/tag).
18534
+ Used on [Scenarios](#/), [Sizes](#/sizes), [FormField](#/formfield), [SegmentedControl](#/segmentedcontrol), [Select](#/select), [Popover](#/popover), [Modal](#/modal), [CommandPalette](#/commandpalette), [Accordion](#/accordion) and [Tag](#/tag).
18159
18535
 
18160
18536
  ##### `Skeleton`
18161
18537
 
@@ -18200,7 +18576,7 @@ Used on [Splitter](#/splitter) and [CommandPalette](#/commandpalette).
18200
18576
  [Stack and Grid](#/stack-and-grid) – Children below or beside one another, spaced by a step of the spacing
18201
18577
  scale.
18202
18578
 
18203
- Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [Theming](#/theming), [Sizes](#/sizes), [Language](#/language), [Stack and Grid](#/stack-and-grid), [Divider](#/divider), [Card](#/card), [Splitter](#/splitter), [Dock](#/dock), [Typography](#/typography), [VisuallyHidden](#/visuallyhidden), [Button](#/button), [IconButton](#/iconbutton), [ButtonGroup](#/buttongroup), [Input](#/input), [FormField](#/formfield), [Textarea](#/textarea), [NumberInput](#/numberinput), [Slider](#/slider), [Checkbox](#/checkbox), [Switch](#/switch), [FileInput](#/fileinput), [Select](#/select), [Combobox](#/combobox), [MultiSelect](#/multiselect), [DatePicker](#/datepicker), [DateTimePicker](#/datetimepicker), [DateRangePicker](#/daterangepicker), [DateTimeRangePicker](#/datetimerangepicker), [Spinner](#/spinner), [ProgressBar](#/progressbar), [Skeleton](#/skeleton), [Alert](#/alert), [Toast](#/toast), [EmptyState](#/emptystate), [Tooltip](#/tooltip), [Popover](#/popover), [Menu](#/menu), [ContextMenu](#/contextmenu), [Modal](#/modal), [Drawer](#/drawer), [ConfirmDialog](#/confirmdialog), [CommandPalette](#/commandpalette), [Breadcrumb](#/breadcrumb), [Tabs](#/tabs), [Accordion](#/accordion), [Stepper](#/stepper), [TreeView](#/treeview), [Badge](#/badge), [Tag](#/tag), [Stat](#/stat), [Meter](#/meter) and [Sparkline](#/sparkline).
18579
+ Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [Theming](#/theming), [Sizes](#/sizes), [Language](#/language), [Stack and Grid](#/stack-and-grid), [Divider](#/divider), [Card](#/card), [Splitter](#/splitter), [Dock](#/dock), [Typography](#/typography), [VisuallyHidden](#/visuallyhidden), [Button](#/button), [IconButton](#/iconbutton), [ButtonGroup](#/buttongroup), [Input](#/input), [FormField](#/formfield), [Textarea](#/textarea), [NumberInput](#/numberinput), [Slider](#/slider), [Checkbox](#/checkbox), [Switch](#/switch), [SegmentedControl](#/segmentedcontrol), [FileInput](#/fileinput), [Select](#/select), [Combobox](#/combobox), [MultiSelect](#/multiselect), [DatePicker](#/datepicker), [DateTimePicker](#/datetimepicker), [DateRangePicker](#/daterangepicker), [DateTimeRangePicker](#/datetimerangepicker), [Spinner](#/spinner), [ProgressBar](#/progressbar), [Skeleton](#/skeleton), [Alert](#/alert), [Toast](#/toast), [EmptyState](#/emptystate), [Tooltip](#/tooltip), [Popover](#/popover), [Menu](#/menu), [ContextMenu](#/contextmenu), [Modal](#/modal), [Drawer](#/drawer), [ConfirmDialog](#/confirmdialog), [CommandPalette](#/commandpalette), [Breadcrumb](#/breadcrumb), [Tabs](#/tabs), [Accordion](#/accordion), [Stepper](#/stepper), [TreeView](#/treeview), [Badge](#/badge), [Tag](#/tag), [Stat](#/stat), [Meter](#/meter) and [Sparkline](#/sparkline).
18204
18580
 
18205
18581
  ##### `Stat`
18206
18582
 
@@ -18225,7 +18601,7 @@ Used on [Scenarios](#/), [Theming](#/theming), [Sizes](#/sizes), [Switch](#/swit
18225
18601
  [Tabs](#/tabs) – One tab of a `TabList`; choosing it shows the `TabPanel` of the same
18226
18602
  `value`.
18227
18603
 
18228
- Used on [Scenarios](#/), [Card](#/card), [Dock](#/dock), [Typography](#/typography), [VisuallyHidden](#/visuallyhidden), [Button](#/button), [IconButton](#/iconbutton), [ButtonGroup](#/buttongroup), [Input](#/input), [Textarea](#/textarea), [RadioGroup](#/radiogroup), [Select](#/select), [Alert](#/alert), [Toast](#/toast), [Tooltip](#/tooltip), [Menu](#/menu), [Modal](#/modal), [Drawer](#/drawer), [ConfirmDialog](#/confirmdialog), [Breadcrumb](#/breadcrumb), [Tabs](#/tabs), [Accordion](#/accordion) and [Tag](#/tag).
18604
+ Used on [Scenarios](#/), [Card](#/card), [Dock](#/dock), [Typography](#/typography), [VisuallyHidden](#/visuallyhidden), [Button](#/button), [IconButton](#/iconbutton), [ButtonGroup](#/buttongroup), [Input](#/input), [Textarea](#/textarea), [RadioGroup](#/radiogroup), [SegmentedControl](#/segmentedcontrol), [Select](#/select), [Alert](#/alert), [Toast](#/toast), [Tooltip](#/tooltip), [Menu](#/menu), [Modal](#/modal), [Drawer](#/drawer), [ConfirmDialog](#/confirmdialog), [Breadcrumb](#/breadcrumb), [Tabs](#/tabs), [Accordion](#/accordion) and [Tag](#/tag).
18229
18605
 
18230
18606
  ##### `TabList`
18231
18607
 
@@ -18269,7 +18645,7 @@ Used on [Scenarios](#/), [EmptyState](#/emptystate) and [Tag](#/tag).
18269
18645
  [Typography](#/typography) – Body text from the token set; `as` chooses the element, independent of the
18270
18646
  size.
18271
18647
 
18272
- Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [Theming](#/theming), [Sizes](#/sizes), [Language](#/language), [Stack and Grid](#/stack-and-grid), [Divider](#/divider), [Card](#/card), [Splitter](#/splitter), [Dock](#/dock), [Typography](#/typography), [VisuallyHidden](#/visuallyhidden), [Button](#/button), [IconButton](#/iconbutton), [ButtonGroup](#/buttongroup), [Input](#/input), [FormField](#/formfield), [Textarea](#/textarea), [NumberInput](#/numberinput), [Slider](#/slider), [Switch](#/switch), [FileInput](#/fileinput), [Select](#/select), [Combobox](#/combobox), [MultiSelect](#/multiselect), [DatePicker](#/datepicker), [DateTimePicker](#/datetimepicker), [DateRangePicker](#/daterangepicker), [DateTimeRangePicker](#/datetimerangepicker), [Spinner](#/spinner), [ProgressBar](#/progressbar), [Skeleton](#/skeleton), [Toast](#/toast), [EmptyState](#/emptystate), [Tooltip](#/tooltip), [Popover](#/popover), [Menu](#/menu), [ContextMenu](#/contextmenu), [Modal](#/modal), [Drawer](#/drawer), [ConfirmDialog](#/confirmdialog), [CommandPalette](#/commandpalette), [Breadcrumb](#/breadcrumb), [Tabs](#/tabs), [Accordion](#/accordion), [Stepper](#/stepper), [TreeView](#/treeview), [Badge](#/badge), [Tag](#/tag), [Stat](#/stat), [Meter](#/meter) and [Sparkline](#/sparkline).
18648
+ Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [Theming](#/theming), [Sizes](#/sizes), [Language](#/language), [Stack and Grid](#/stack-and-grid), [Divider](#/divider), [Card](#/card), [Splitter](#/splitter), [Dock](#/dock), [Typography](#/typography), [VisuallyHidden](#/visuallyhidden), [Button](#/button), [IconButton](#/iconbutton), [ButtonGroup](#/buttongroup), [Input](#/input), [FormField](#/formfield), [Textarea](#/textarea), [NumberInput](#/numberinput), [Slider](#/slider), [Switch](#/switch), [SegmentedControl](#/segmentedcontrol), [FileInput](#/fileinput), [Select](#/select), [Combobox](#/combobox), [MultiSelect](#/multiselect), [DatePicker](#/datepicker), [DateTimePicker](#/datetimepicker), [DateRangePicker](#/daterangepicker), [DateTimeRangePicker](#/datetimerangepicker), [Spinner](#/spinner), [ProgressBar](#/progressbar), [Skeleton](#/skeleton), [Toast](#/toast), [EmptyState](#/emptystate), [Tooltip](#/tooltip), [Popover](#/popover), [Menu](#/menu), [ContextMenu](#/contextmenu), [Modal](#/modal), [Drawer](#/drawer), [ConfirmDialog](#/confirmdialog), [CommandPalette](#/commandpalette), [Breadcrumb](#/breadcrumb), [Tabs](#/tabs), [Accordion](#/accordion), [Stepper](#/stepper), [TreeView](#/treeview), [Badge](#/badge), [Tag](#/tag), [Stat](#/stat), [Meter](#/meter) and [Sparkline](#/sparkline).
18273
18649
 
18274
18650
  ##### `Textarea`
18275
18651
 
@@ -19036,6 +19412,8 @@ otherwise.
19036
19412
  type ControlSize = "sm" | "md";
19037
19413
  ```
19038
19414
 
19415
+ Used on [Sizes](#/sizes) and [SegmentedControl](#/segmentedcontrol).
19416
+
19039
19417
  ##### `ControlSizeProviderProps`
19040
19418
 
19041
19419
  Its table stands on [Sizes](#/sizes/type-ControlSizeProviderProps).
@@ -19436,6 +19814,14 @@ of the filler rows that stand for the rest.
19436
19814
  | `before` *required* | `number` | — | Height of the filler row above, in pixels. |
19437
19815
  | `after` *required* | `number` | — | Height of the filler row below, in pixels. |
19438
19816
 
19817
+ ##### `SegmentedControlProps`
19818
+
19819
+ Its table stands on [SegmentedControl](#/segmentedcontrol/type-SegmentedControlProps).
19820
+
19821
+ ##### `SegmentedOption`
19822
+
19823
+ Its table stands on [SegmentedControl](#/segmentedcontrol/type-SegmentedOption).
19824
+
19439
19825
  ##### `SelectProps`
19440
19826
 
19441
19827
  Its table stands on [Select](#/select/type-SelectProps).
@@ -19925,7 +20311,7 @@ Everything the library puts out as text.
19925
20311
  | `pinToEndHint` *required* | `string` | — | |
19926
20312
  | `unpinHint` *required* | `string` | — | |
19927
20313
  | `exportLabel` *required* | `string` | — | The export button. |
19928
- | `exportPageLabel` *required* | `string` | — | The export button of a table in manual mode, which holds and writes one page. |
20314
+ | `exportPageLabel` *required* | `string` | — | The export button of a table in server mode, which holds and writes one page. |
19929
20315
  | `exportFileName` *required* | `string` | — | The export's file name, where the application names none. |
19930
20316
  | `tableSearchPlaceholder` *required* | `string` | — | Placeholder and accessible name of the search field. |
19931
20317
  | `tableSearchLabel` *required* | `string` | — | |
@@ -19933,7 +20319,7 @@ Everything the library puts out as text.
19933
20319
  | `filterHint` *required* | `string` | — | The tooltip over that button. |
19934
20320
  | `selectRow` *required* | `(row: string) => string` | — | The selection of one row, named after its row header. |
19935
20321
  | `selectAllRows` *required* | `string` | — | The selection of every row in the filtered set. |
19936
- | `selectAllOnPage` *required* | `string` | — | The same checkbox in manual mode, where the table holds one page of a server's. |
20322
+ | `selectAllOnPage` *required* | `string` | — | The same checkbox in server mode, where the table holds one page of a server's. |
19937
20323
  | `expandRowNamed` *required* | `(row: string) => string` | — | The expand button, named after the row header. |
19938
20324
  | `collapseRowNamed` *required* | `(row: string) => string` | — | |
19939
20325
  | `rowActions` *required* | `string` | — | Header of the actions column - for the screen reader, not visible. |
@@ -20141,6 +20527,7 @@ Used on [UmrissProvider](#/umrissprovider) and [Language](#/language).
20141
20527
  | Prop | Type | Default | Description |
20142
20528
  |---|---|---|---|
20143
20529
  | `id` *required* | `string` | — | |
20530
+ | `labelId` *required* | `string` | — | The label's own id. `label htmlFor` names only what HTML can label - an input, a select, a button; a group (`role="radiogroup"`) is named through `aria-labelledby` with this. |
20144
20531
  | `describedBy` | `string` | — | |
20145
20532
  | `invalid` *required* | `boolean` | — | |
20146
20533
  | `required` *required* | `boolean` | — | A required field. Every field whose role carries it turns this into `aria-required` - just as it does with `aria-describedby` and `aria-invalid`. |