@umriss-ui/core 0.54.0 → 0.55.1
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/API.md +33 -2
- package/CHANGELOG.md +19 -0
- package/README.md +2 -1
- package/dist/core.css +1 -1
- package/dist/core.js +4176 -3819
- package/dist/de.d.ts +35 -0
- package/dist/index.d.ts +93 -2
- package/dist/wording/de.js +23 -0
- package/docs/llms-full.md +509 -106
- package/package.json +1 -1
package/docs/llms-full.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @umriss-ui/core 0.
|
|
1
|
+
# @umriss-ui/core 0.55.1
|
|
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
|
|
|
@@ -53,7 +53,7 @@ From `ButtonProps` — the full table stands on [Button](#button).
|
|
|
53
53
|
- No font is loaded or bundled.
|
|
54
54
|
- Chrome 123, Firefox 120 and Safari 17.5 or newer; an older browser discards the tokens and shows the components unstyled.
|
|
55
55
|
|
|
56
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
56
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
57
57
|
|
|
58
58
|
### UmrissProvider
|
|
59
59
|
|
|
@@ -264,7 +264,7 @@ type ToastPosition = "top-start" | "top-center" | "top-end" | "bottom-start" | "
|
|
|
264
264
|
|
|
265
265
|
- No theme and no default variants for components: a component is configured by its own props.
|
|
266
266
|
|
|
267
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
267
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
268
268
|
|
|
269
269
|
## Customising
|
|
270
270
|
|
|
@@ -467,25 +467,28 @@ Every token the components draw with, grouped as the stylesheet groups them. A s
|
|
|
467
467
|
|
|
468
468
|
| Token | Light | Dark | Description |
|
|
469
469
|
|---|---|---|---|
|
|
470
|
-
| `--u-color-bg` | `#fafafa` | `#
|
|
471
|
-
| `--u-color-surface` | `#ffffff` | `#
|
|
472
|
-
| `--u-color-surface-sunken` | `#f4f4f5` | `#
|
|
473
|
-
| `--u-color-surface-pressed` | `#e9e9eb` | `#
|
|
470
|
+
| `--u-color-bg` | `#fafafa` | `#121213` | The dark grounds step by lightness, because a shadow on a near-black ground shows nothing: page to surface and surface to raised are each about 3.6 L* apart, hover and pressed about 2.6, measured with the 1 % viewing flare of IEC 61966-2-1 that compresses the dark end. |
|
|
471
|
+
| `--u-color-surface` | `#ffffff` | `#1e1e20` | — |
|
|
472
|
+
| `--u-color-surface-sunken` | `#f4f4f5` | `#252528` | — |
|
|
473
|
+
| `--u-color-surface-pressed` | `#e9e9eb` | `#2c2c30` | The pressed step of a quiet key: what sinks to the sunken surface under the pointer sinks once more while it is pressed (the interaction-state canon). The three `-pressed` surfaces exist because a hover for each ground needs something stronger. |
|
|
474
|
+
| `--u-color-surface-raised` | `#ffffff` | `#28282c` | An overlay's ground and its hover and pressed steps, one step above the surface it opens over; the overlays take them through `raised` in `#own-styles`. Light: the surface's own values, the shadow lifts it. |
|
|
475
|
+
| `--u-color-surface-raised-sunken` | `#f4f4f5` | `#2f2f33` | — |
|
|
476
|
+
| `--u-color-surface-raised-pressed` | `#e9e9eb` | `#36363a` | — |
|
|
474
477
|
| `--u-color-text` | `#171717` | `#ededed` | — |
|
|
475
|
-
| `--u-color-text-secondary` | `#565656` | `#
|
|
476
|
-
| `--u-color-text-muted` | `#666666` | `#
|
|
478
|
+
| `--u-color-text-secondary` | `#565656` | `#b0b0b6` | — |
|
|
479
|
+
| `--u-color-text-muted` | `#666666` | `#9e9ea4` | 4.5:1 on every ground it stands on in both themes, the pressed surface included (contrast.test.ts). |
|
|
477
480
|
|
|
478
481
|
##### Edges as shadows (instead of borders)
|
|
479
482
|
|
|
480
483
|
| Token | Light | Dark | Description |
|
|
481
484
|
|---|---|---|---|
|
|
482
|
-
| `--u-edge-color` | `rgba(23, 23, 23, 0.08)` | `rgba(255, 255, 255, 0.
|
|
483
|
-
| `--u-edge-color-strong` | `rgba(23, 23, 23, 0.17)` | `rgba(255, 255, 255, 0.
|
|
485
|
+
| `--u-edge-color` | `rgba(23, 23, 23, 0.08)` | `rgba(255, 255, 255, 0.14)` | — |
|
|
486
|
+
| `--u-edge-color-strong` | `rgba(23, 23, 23, 0.17)` | `rgba(255, 255, 255, 0.24)` | — |
|
|
484
487
|
| `--u-edge` | `0 0 0 1px var(`--u-edge-color`)` | same | — |
|
|
485
488
|
| `--u-edge-strong` | `0 0 0 1px var(`--u-edge-color-strong`)` | same | — |
|
|
486
|
-
| `--u-hairline` | `rgba(23, 23, 23, 0.06)` | `rgba(255, 255, 255, 0.
|
|
489
|
+
| `--u-hairline` | `rgba(23, 23, 23, 0.06)` | `rgba(255, 255, 255, 0.10)` | inner dividing lines |
|
|
487
490
|
| `--u-color-edge-hover` | `color-mix(in srgb, var(`--u-color-text`) 30%, transparent)` | same | The edge of a field under the pointer. |
|
|
488
|
-
| `--u-hairline-strong` | `rgba(23, 23, 23, 0.12)` | `rgba(255, 255, 255, 0.
|
|
491
|
+
| `--u-hairline-strong` | `rgba(23, 23, 23, 0.12)` | `rgba(255, 255, 255, 0.18)` | e.g. under table heads |
|
|
489
492
|
|
|
490
493
|
##### Ink as interaction (the primary button)
|
|
491
494
|
|
|
@@ -820,7 +823,7 @@ From `StatProps` — the full table stands on [Stat](#stat).
|
|
|
820
823
|
- 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.
|
|
821
824
|
- 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; inside a dialog the toasts take the tokens of the dialog's place. Give [UmrissProvider](#umrissprovider) a `portalTarget` inside the region, or override on `:root` - as for the toasts' distance from the window's edge and its sides, `--u-toast-inset-top`, `--u-toast-inset-bottom`, `--u-toast-inset-start` and `--u-toast-inset-end`.
|
|
822
825
|
|
|
823
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
826
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
824
827
|
|
|
825
828
|
### Sizes
|
|
826
829
|
|
|
@@ -1238,7 +1241,7 @@ type ControlSize = "sm" | "md";
|
|
|
1238
1241
|
- A field does not grow to fill a row: give it room with the row's own layout (`flex: 1` on its FormField, or a grid).
|
|
1239
1242
|
- A place that sizes itself by its content and has no width to stop at - an `auto` grid track, an inline block, a row that does not wrap - gives a field at least its natural width, as it gives a native input its own; on a narrow screen let such a row wrap, or size the track with `minmax(0, auto)`.
|
|
1240
1243
|
|
|
1241
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
1244
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
1242
1245
|
|
|
1243
1246
|
### Language
|
|
1244
1247
|
|
|
@@ -1614,6 +1617,34 @@ Every entry of `Wording`: the English of `DEFAULT_WORDING` beside the German of
|
|
|
1614
1617
|
| `dateRangeClear` | Clear range | Zeitraum leeren | — |
|
|
1615
1618
|
| `dateTimeRangePanel` | Select range with time | Zeitraum mit Uhrzeit wählen | Accessible name of the panel in the range with time of day. |
|
|
1616
1619
|
| `dateTimeRangeClear` | Clear range with time | Zeitraum mit Uhrzeit leeren | The clearing x of the range with time - kept apart from the range without, so that an application can call the two differently. |
|
|
1620
|
+
|
|
1621
|
+
##### Colour
|
|
1622
|
+
|
|
1623
|
+
| Key | English | German | Description |
|
|
1624
|
+
|---|---|---|---|
|
|
1625
|
+
| `colorPlaceholder` | Select colour | Farbe wählen | — |
|
|
1626
|
+
| `colorTrigger(hex)` | `` (hex ? `Colour ${hex}` : "Colour: none") `` | `` (hex ? `Farbe ${hex}` : "Farbe: keine") `` | The name of the ColorPicker trigger where nothing else names it: the colour as hex, or `null` for none. |
|
|
1627
|
+
| `colorPanel` | Choose colour | Farbe wählen | Accessible name of the ColorPicker panel, where its field names it no other way. |
|
|
1628
|
+
| `colorHex` | Hex | Hex | The name and the visible label of the hex field. |
|
|
1629
|
+
| `colorBefore` | Before | Vorher | — |
|
|
1630
|
+
| `colorAfter` | After | Nachher | — |
|
|
1631
|
+
| `colorNone` | None | Keine | Stands for no colour in the strip that compares the colour the panel opened with and the colour now. |
|
|
1632
|
+
| `colorBeforeAfter(before, after)` | `` `Before ${before}, after ${after}` `` | `` `Vorher ${before}, nachher ${after}` `` | The strip as one sentence, for a screen reader. |
|
|
1633
|
+
| `colorDone` | Done | Fertig | — |
|
|
1634
|
+
| `colorSwatches` | Swatches | Farbfelder | Name of the row of the application's own colours. |
|
|
1635
|
+
| `colorSurfaceLight` | Light | Hell | The name of core's light surface in the contrast readout. |
|
|
1636
|
+
| `colorSurfaceDark` | Dark | Dunkel | The name of core's dark surface in the contrast readout. |
|
|
1637
|
+
| `colorPass` | Pass | Bestanden | The verdict of the contrast readout at 3:1 and above, and below it; words, so that the colour is not the only sign. |
|
|
1638
|
+
| `colorFail` | Fail | Nicht bestanden | — |
|
|
1639
|
+
| `colorRed` | Red | Rot | Names of the red, green and blue fields of the ColorPicker panel. |
|
|
1640
|
+
| `colorGreen` | Green | Grün | — |
|
|
1641
|
+
| `colorBlue` | Blue | Blau | — |
|
|
1642
|
+
| `colorEyedropper` | Pick a colour from the screen | Farbe vom Bildschirm aufnehmen | The button that picks a colour from the screen. |
|
|
1643
|
+
| `colorSquare` | Saturation and brightness | Sättigung und Helligkeit | Names of the square and the hue strip, the square's role description, and what they say as value. |
|
|
1644
|
+
| `colorSquareRole` | two-axis colour area | zweiachsige Farbfläche | — |
|
|
1645
|
+
| `colorSquareValue(saturation, brightness)` | `` `Saturation ${saturation} %, brightness ${brightness} %` `` | `` `Sättigung ${saturation} %, Helligkeit ${brightness} %` `` | — |
|
|
1646
|
+
| `colorHue` | Hue | Farbton | — |
|
|
1647
|
+
| `colorHueValue(degrees)` | `` `${degrees} degrees` `` | `` `${degrees} Grad` `` | — |
|
|
1617
1648
|
| `previousMonth` | Previous month | Voriger Monat | — |
|
|
1618
1649
|
| `nextMonth` | Next month | Nächster Monat | — |
|
|
1619
1650
|
| `monthSelect` | Month | Monat | Name of the calendar head's month list. |
|
|
@@ -2205,6 +2236,29 @@ Everything the library puts out as text.
|
|
|
2205
2236
|
| `dateRangeClear` *required* | `string` | — | |
|
|
2206
2237
|
| `dateTimeRangePanel` *required* | `string` | — | Accessible name of the panel in the range with time of day. |
|
|
2207
2238
|
| `dateTimeRangeClear` *required* | `string` | — | The clearing x of the range with time - kept apart from the range without, so that an application can call the two differently. |
|
|
2239
|
+
| `colorPlaceholder` *required* | `string` | — | |
|
|
2240
|
+
| `colorTrigger` *required* | `(hex: string \| null) => string` | — | The name of the ColorPicker trigger where nothing else names it: the colour as hex, or `null` for none. |
|
|
2241
|
+
| `colorPanel` *required* | `string` | — | Accessible name of the ColorPicker panel, where its field names it no other way. |
|
|
2242
|
+
| `colorHex` *required* | `string` | — | The name and the visible label of the hex field. |
|
|
2243
|
+
| `colorBefore` *required* | `string` | — | |
|
|
2244
|
+
| `colorAfter` *required* | `string` | — | |
|
|
2245
|
+
| `colorNone` *required* | `string` | — | Stands for no colour in the strip that compares the colour the panel opened with and the colour now. |
|
|
2246
|
+
| `colorBeforeAfter` *required* | `(before: string, after: string) => string` | — | The strip as one sentence, for a screen reader. |
|
|
2247
|
+
| `colorDone` *required* | `string` | — | |
|
|
2248
|
+
| `colorSwatches` *required* | `string` | — | Name of the row of the application's own colours. |
|
|
2249
|
+
| `colorSurfaceLight` *required* | `string` | — | The name of core's light surface in the contrast readout. |
|
|
2250
|
+
| `colorSurfaceDark` *required* | `string` | — | The name of core's dark surface in the contrast readout. |
|
|
2251
|
+
| `colorPass` *required* | `string` | — | The verdict of the contrast readout at 3:1 and above, and below it; words, so that the colour is not the only sign. |
|
|
2252
|
+
| `colorFail` *required* | `string` | — | |
|
|
2253
|
+
| `colorRed` *required* | `string` | — | Names of the red, green and blue fields of the ColorPicker panel. |
|
|
2254
|
+
| `colorGreen` *required* | `string` | — | |
|
|
2255
|
+
| `colorBlue` *required* | `string` | — | |
|
|
2256
|
+
| `colorEyedropper` *required* | `string` | — | The button that picks a colour from the screen. |
|
|
2257
|
+
| `colorSquare` *required* | `string` | — | Names of the square and the hue strip, the square's role description, and what they say as value. |
|
|
2258
|
+
| `colorSquareRole` *required* | `string` | — | |
|
|
2259
|
+
| `colorSquareValue` *required* | `(saturation: number, brightness: number) => string` | — | |
|
|
2260
|
+
| `colorHue` *required* | `string` | — | |
|
|
2261
|
+
| `colorHueValue` *required* | `(degrees: number) => string` | — | |
|
|
2208
2262
|
| `previousMonth` *required* | `string` | — | |
|
|
2209
2263
|
| `nextMonth` *required* | `string` | — | |
|
|
2210
2264
|
| `monthSelect` *required* | `string` | — | Name of the calendar head's month list. |
|
|
@@ -2577,10 +2631,10 @@ Everything the library puts out as text.
|
|
|
2577
2631
|
|
|
2578
2632
|
#### Known limits
|
|
2579
2633
|
|
|
2580
|
-
- Two languages ship; a third is a `Wording` object of your own. No right-to-left ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
2634
|
+
- Two languages ship; a third is a `Wording` object of your own. No right-to-left ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md)).
|
|
2581
2635
|
- It holds only what the components say themselves; your labels, titles and data are yours to translate.
|
|
2582
2636
|
|
|
2583
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
2637
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
2584
2638
|
|
|
2585
2639
|
## Layout
|
|
2586
2640
|
|
|
@@ -2882,9 +2936,9 @@ The keys of [Button](#button) apply here.
|
|
|
2882
2936
|
|
|
2883
2937
|
| Prop | Type | Default | Description |
|
|
2884
2938
|
|---|---|---|---|
|
|
2885
|
-
| `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), [Gaps](#stack-and-grid), [Wrapping](#stack-and-grid) and
|
|
2886
|
-
| `gap` | `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 row](#stack-and-grid), [Gaps](#stack-and-grid) and
|
|
2887
|
-
| `align` | `CSSProperties["alignItems"]` | — | Alignment across the direction – `alignItems` unchanged.<br>Shown in: [A row](#stack-and-grid), [Gaps](#stack-and-grid), [A tour summary](#stack-and-grid) and
|
|
2939
|
+
| `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), [Gaps](#stack-and-grid), [Wrapping](#stack-and-grid) and 77 more |
|
|
2940
|
+
| `gap` | `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 row](#stack-and-grid), [Gaps](#stack-and-grid) and 191 more |
|
|
2941
|
+
| `align` | `CSSProperties["alignItems"]` | — | Alignment across the direction – `alignItems` unchanged.<br>Shown in: [A row](#stack-and-grid), [Gaps](#stack-and-grid), [A tour summary](#stack-and-grid) and 87 more |
|
|
2888
2942
|
| `justify` | `CSSProperties["justifyContent"]` | — | Distribution along the direction – `justifyContent` unchanged.<br>Shown in: [A row](#stack-and-grid), [A tour summary](#stack-and-grid), [Name the same action in every row (VisuallyHidden)](#visuallyhidden) and 9 more |
|
|
2889
2943
|
| `wrap` | `boolean` | `false` | Lets the children wrap when the line does not suffice.<br>Shown in: [Gaps](#stack-and-grid), [Wrapping](#stack-and-grid), [Sized to the value (Sizes)](#sizes) and 33 more |
|
|
2890
2944
|
| `ref` | `Ref<HTMLDivElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
@@ -2896,8 +2950,8 @@ Also takes every attribute of `<div>`.
|
|
|
2896
2950
|
| Prop | Type | Default | Description |
|
|
2897
2951
|
|---|---|---|---|
|
|
2898
2952
|
| `columns` | `number \| readonly ``GridColumnWidth``[]` | `2` | How many columns, all of one width - or a list with one width per column: a number in pixels, or `"fill"` for a share of what is left. Overridden by minItemWidth.<br>Shown in: [Fixed columns](#stack-and-grid), [Columns of their own widths](#stack-and-grid), [A token for one region (Theming)](#theming) and 5 more |
|
|
2899
|
-
| `minItemWidth` | `string` | — | Responsive: as many columns as fit at this minimum width; wins over `columns`, a list included.<br>Shown in: [Columns by width](#stack-and-grid), [A tour summary](#stack-and-grid), [A dark region (Theming)](#theming) and
|
|
2900
|
-
| `gap` | `SpaceStep`<br>`1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8` | `4` | Spacing as a step of the 4 px spacing steps (1–8); applies in both directions.<br>Shown in: [Fixed columns](#stack-and-grid), [Columns by width](#stack-and-grid), [Columns of their own widths](#stack-and-grid) and
|
|
2953
|
+
| `minItemWidth` | `string` | — | Responsive: as many columns as fit at this minimum width; wins over `columns`, a list included.<br>Shown in: [Columns by width](#stack-and-grid), [A tour summary](#stack-and-grid), [A dark region (Theming)](#theming) and 61 more |
|
|
2954
|
+
| `gap` | `SpaceStep`<br>`1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8` | `4` | Spacing as a step of the 4 px spacing steps (1–8); applies in both directions.<br>Shown in: [Fixed columns](#stack-and-grid), [Columns by width](#stack-and-grid), [Columns of their own widths](#stack-and-grid) and 68 more |
|
|
2901
2955
|
| `ref` | `Ref<HTMLDivElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
2902
2956
|
|
|
2903
2957
|
Also takes every attribute of `<div>`.
|
|
@@ -2927,7 +2981,7 @@ type GridColumnWidth = number | "fill";
|
|
|
2927
2981
|
- No breakpoints and no responsive props: a grid follows the width through `minItemWidth`, anything else is your stylesheet's.
|
|
2928
2982
|
- Tiles are not arranged by the user: for a dashboard the reader arranges, see `@umriss-ui/dashboard` ([ADR-0064](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0064-a-dashboard-a-user-arranges-is-a-sequence-on-fixed-columns.md)).
|
|
2929
2983
|
|
|
2930
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
2984
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
2931
2985
|
|
|
2932
2986
|
### Divider
|
|
2933
2987
|
|
|
@@ -3747,7 +3801,7 @@ Also takes every attribute of `<div>` – without `children`, `defaultValue`, `o
|
|
|
3747
3801
|
- Two panes per splitter, no more. Tiles are not arranged by the user: for a dashboard the reader arranges, see `@umriss-ui/dashboard` ([ADR-0064](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0064-a-dashboard-a-user-arranges-is-a-sequence-on-fixed-columns.md)).
|
|
3748
3802
|
- It does not remember the share beyond its own life; keep it in the user's settings through `value` and `onChange`.
|
|
3749
3803
|
|
|
3750
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
3804
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
3751
3805
|
|
|
3752
3806
|
## Typography
|
|
3753
3807
|
|
|
@@ -4104,11 +4158,11 @@ export default function IncidentSummary() {
|
|
|
4104
4158
|
|
|
4105
4159
|
| Prop | Type | Default | Description |
|
|
4106
4160
|
|---|---|---|---|
|
|
4107
|
-
| `as` | `ElementType` | `"p"` | Element to render as.<br>Shown in: [Tones and weights](#typography-2), [Set an incident summary](#typography-2), [Use the language in your own components (Language)](#language) and
|
|
4108
|
-
| `size` | `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-2), [Sizes](#typography-2), [Tones and weights](#typography-2) and
|
|
4161
|
+
| `as` | `ElementType` | `"p"` | Element to render as.<br>Shown in: [Tones and weights](#typography-2), [Set an incident summary](#typography-2), [Use the language in your own components (Language)](#language) and 23 more |
|
|
4162
|
+
| `size` | `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-2), [Sizes](#typography-2), [Tones and weights](#typography-2) and 150 more |
|
|
4109
4163
|
| `weight` | `TextWeight`<br>`"regular" \| "medium" \| "semibold"` | `"regular"` | Font weight from the token set.<br>Shown in: [Configurator](#typography-2), [Tones and weights](#typography-2), [Tracking and leading](#typography-2) and 18 more |
|
|
4110
|
-
| `tone` | `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-2), [Tones and weights](#typography-2), [Tracking and leading](#typography-2) and
|
|
4111
|
-
| `mono` | `boolean` | `false` | Geist Mono with tabular figures – for numbers and identifiers.<br>Shown in: [Configurator](#typography-2), [Numbers and identifiers](#typography-2), [Handle long values](#typography-2) and
|
|
4164
|
+
| `tone` | `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-2), [Tones and weights](#typography-2), [Tracking and leading](#typography-2) and 105 more |
|
|
4165
|
+
| `mono` | `boolean` | `false` | Geist Mono with tabular figures – for numbers and identifiers.<br>Shown in: [Configurator](#typography-2), [Numbers and identifiers](#typography-2), [Handle long values](#typography-2) and 37 more |
|
|
4112
4166
|
| `tracking` | `TextTracking`<br>`"normal" \| "tight" \| "display" \| "caps"` | `"normal"` | Letter spacing from the token set. `caps` belongs with letterspaced capitals.<br>Shown in: [Configurator](#typography-2), [Tracking and leading](#typography-2), [Set an incident summary](#typography-2) |
|
|
4113
4167
|
| `leading` | `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-2), [Tracking and leading](#typography-2) |
|
|
4114
4168
|
| `ref` | `Ref<HTMLElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
@@ -4183,10 +4237,10 @@ type TextLeading = "normal" | "tight";
|
|
|
4183
4237
|
#### Known limits
|
|
4184
4238
|
|
|
4185
4239
|
- No truncation and no line length: both depend on the column, which only the application knows.
|
|
4186
|
-
- No prose styles for lists, quotes or rich text ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
4240
|
+
- No prose styles for lists, quotes or rich text ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md)).
|
|
4187
4241
|
- `Link` renders a plain `a` and knows no router; pass it the address your router resolves.
|
|
4188
4242
|
|
|
4189
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
4243
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
4190
4244
|
|
|
4191
4245
|
### VisuallyHidden
|
|
4192
4246
|
|
|
@@ -4310,7 +4364,7 @@ Also takes every attribute of the chosen element – without `as`, `ref`.
|
|
|
4310
4364
|
|
|
4311
4365
|
- It hides from the eye only; to hide something from everyone, do not render it.
|
|
4312
4366
|
|
|
4313
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
4367
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
4314
4368
|
|
|
4315
4369
|
## Actions
|
|
4316
4370
|
|
|
@@ -4596,8 +4650,8 @@ Under forced colours every variant keeps an outline where its edge would lie, an
|
|
|
4596
4650
|
|
|
4597
4651
|
| Prop | Type | Default | Description |
|
|
4598
4652
|
|---|---|---|---|
|
|
4599
|
-
| `variant` | `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), [Variants](#button), [Sizes](#button) and
|
|
4600
|
-
| `size` | `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), [Sizes](#button), [Add an icon](#button) and
|
|
4653
|
+
| `variant` | `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), [Variants](#button), [Sizes](#button) and 61 more |
|
|
4654
|
+
| `size` | `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), [Sizes](#button), [Add an icon](#button) and 65 more |
|
|
4601
4655
|
| `loading` | `boolean` | `false` | Shows a loading indicator and locks the button.<br>Shown in: [Configurator](#button), [Loading and disabled](#button), [Submit a form](#button) and 4 more |
|
|
4602
4656
|
| `ref` | `Ref<HTMLButtonElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
4603
4657
|
|
|
@@ -4639,7 +4693,7 @@ type ControlSize = "sm" | "md";
|
|
|
4639
4693
|
- The label stays on one line; keep it short rather than let it wrap.
|
|
4640
4694
|
- No icon slot: an icon goes among the children, before the label, and the button sets its size.
|
|
4641
4695
|
|
|
4642
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
4696
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
4643
4697
|
|
|
4644
4698
|
### IconButton
|
|
4645
4699
|
|
|
@@ -4948,7 +5002,7 @@ export default function Toolbar() {
|
|
|
4948
5002
|
|---|---|---|---|
|
|
4949
5003
|
| `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), [Name the icon](#iconbutton), [Variants](#iconbutton) and 6 more |
|
|
4950
5004
|
| `variant` | `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), [Variants](#iconbutton), [Sizes](#iconbutton) and 3 more |
|
|
4951
|
-
| `size` | `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), [Sizes](#iconbutton), [Build a toolbar](#iconbutton) and
|
|
5005
|
+
| `size` | `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), [Sizes](#iconbutton), [Build a toolbar](#iconbutton) and 65 more |
|
|
4952
5006
|
| `loading` | `boolean` | `false` | Shows a loading indicator and locks the button. From `ButtonProps`.<br>Shown in: [Configurator](#iconbutton), [Loading and disabled](#iconbutton), [Configurator (Button)](#button) and 4 more |
|
|
4953
5007
|
| `ref` | `Ref<HTMLButtonElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
4954
5008
|
|
|
@@ -4996,7 +5050,7 @@ type ControlSize = "sm" | "md";
|
|
|
4996
5050
|
- The tooltip always shows the name; a hint that says more than the name is a `Tooltip` around a `Button`.
|
|
4997
5051
|
- A touch screen shows no tooltip: choose icons whose meaning is common, or a `Button` with a label.
|
|
4998
5052
|
|
|
4999
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
5053
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
5000
5054
|
|
|
5001
5055
|
### ButtonGroup
|
|
5002
5056
|
|
|
@@ -5356,7 +5410,7 @@ type ControlSize = "sm" | "md";
|
|
|
5356
5410
|
|
|
5357
5411
|
- No toggle or segmented state; a choice that stays is a radio group.
|
|
5358
5412
|
|
|
5359
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
5413
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
5360
5414
|
|
|
5361
5415
|
## Forms
|
|
5362
5416
|
|
|
@@ -5713,7 +5767,7 @@ Also takes every attribute of `<input>` – without `size`, `value`.
|
|
|
5713
5767
|
- No input masks or formatting while typing; check the value on leave or on submit.
|
|
5714
5768
|
- No validation of its own: the error is the application's, handed to the `FormField`.
|
|
5715
5769
|
|
|
5716
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
5770
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
5717
5771
|
|
|
5718
5772
|
### FormField
|
|
5719
5773
|
|
|
@@ -5729,7 +5783,7 @@ Every field of Forms, Choosing and Dates and times reads its id, description, in
|
|
|
5729
5783
|
|
|
5730
5784
|
A FormField keeps no space around itself: the fields of a form stand in a [Stack](#stack-and-grid) or another container with a gap, which spaces them, so an error never touches the next label.
|
|
5731
5785
|
|
|
5732
|
-
Give a field a `name` and a `<form>` (or a React 19 `<form action>`) receives its value in `FormData`: the Combobox the value, not the label; the MultiSelect one entry per value; DatePicker `YYYY-MM-DD`; DateTimePicker ISO with the offset; a range picker `<name>Start` and `<name>End` (`startName`, `endName` rename them); NumberInput the plain number; empty `""`. `formValue` writes a value another way.
|
|
5786
|
+
Give a field a `name` and a `<form>` (or a React 19 `<form action>`) receives its value in `FormData`: the Combobox the value, not the label; the MultiSelect one entry per value; ColorPicker the lowercase `#rrggbb`; DatePicker `YYYY-MM-DD`; DateTimePicker ISO with the offset; a range picker `<name>Start` and `<name>End` (`startName`, `endName` rename them); NumberInput the plain number; empty `""`. `formValue` writes a value another way.
|
|
5733
5787
|
|
|
5734
5788
|
#### Examples
|
|
5735
5789
|
|
|
@@ -6024,9 +6078,9 @@ The keys of [Input](#input), [NumberInput](#numberinput), [Checkbox](#checkbox),
|
|
|
6024
6078
|
|
|
6025
6079
|
| Prop | Type | Default | Description |
|
|
6026
6080
|
|---|---|---|---|
|
|
6027
|
-
| `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), [Label and hint](#formfield), [Show an error](#formfield) and
|
|
6028
|
-
| `hint` | `ReactNode` | — | Help text below the field. Replaced by `error`.<br>Shown in: [Configurator](#formfield), [Label and hint](#formfield), [Show an error](#formfield) and
|
|
6029
|
-
| `error` | `ReactNode` | — | Error message; it marks the field as invalid at the same time.<br>Shown in: [Configurator](#formfield), [Show an error](#formfield), [Check an invoice on submit](#formfield) and
|
|
6081
|
+
| `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), [Label and hint](#formfield), [Show an error](#formfield) and 106 more |
|
|
6082
|
+
| `hint` | `ReactNode` | — | Help text below the field. Replaced by `error`.<br>Shown in: [Configurator](#formfield), [Label and hint](#formfield), [Show an error](#formfield) and 44 more |
|
|
6083
|
+
| `error` | `ReactNode` | — | Error message; it marks the field as invalid at the same time.<br>Shown in: [Configurator](#formfield), [Show an error](#formfield), [Check an invoice on submit](#formfield) and 25 more |
|
|
6030
6084
|
| `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 ([ADR-0060](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0060-validation-and-a-layout-editor-are-never-time-zones-not-yet.md)).<br>Shown in: [Configurator](#formfield), [Mark a field as required](#formfield), [Check an invoice on submit](#formfield) and 10 more |
|
|
6031
6085
|
| `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) |
|
|
6032
6086
|
| `labelPlacement` | `"top" \| "start"` | `"top"` | Where the label stands: `"top"` above the field (the default) or `"start"` beside it, in a column as wide as `--u-label-width`, level on the first baseline. `"start"` is for a column of fields and fills its place; where the row cannot hold the label and 12rem of field, the field wraps under the label. A `Grid` of fields keeps `"top"`.<br>Shown in: [Put the labels in a column](#formfield) |
|
|
@@ -6039,7 +6093,7 @@ Also takes every attribute of `<div>`.
|
|
|
6039
6093
|
- No validation: the caller's form library decides; pass `error` ([ADR-0060](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0060-validation-and-a-layout-editor-are-never-time-zones-not-yet.md)). No form state and no submit handling either.
|
|
6040
6094
|
- One field per `FormField`; a group of fields that share one label is a fieldset of your own.
|
|
6041
6095
|
|
|
6042
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
6096
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
6043
6097
|
|
|
6044
6098
|
### Textarea
|
|
6045
6099
|
|
|
@@ -6229,7 +6283,7 @@ Also takes every attribute of `<textarea>` – without `cols`, `value`.
|
|
|
6229
6283
|
|
|
6230
6284
|
- Plain text only: no formatting, mentions or rich text.
|
|
6231
6285
|
|
|
6232
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
6286
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
6233
6287
|
|
|
6234
6288
|
### NumberInput
|
|
6235
6289
|
|
|
@@ -6479,8 +6533,8 @@ export default function YearWithoutGrouping() {
|
|
|
6479
6533
|
| `chars` | `number` | — | The width in characters - room for the number; the field adds its own padding and steppers, and the room for a `prefix` and `suffix` given as text. Given, the field is that wide wherever it stands, and never wider than its place. Without it the field fills its place, and is 10 characters wide where the place asks - in a toolbar or a row.<br>Shown in: [Configurator](#numberinput), [Sized to the value (Sizes)](#sizes) |
|
|
6480
6534
|
| `invalid` | `boolean` | — | Marks the field as invalid. `FormField` sets it itself as soon as it carries an `error` – by hand only needed without `FormField`.<br>Shown in: [Configurator](#numberinput), [With an error](#numberinput) |
|
|
6481
6535
|
| `ref` | `Ref<HTMLInputElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
6482
|
-
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [States and a form (TimeInput)](#timeinput) |
|
|
6483
|
-
| `formValue` | `(value: number) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield) |
|
|
6536
|
+
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [In a form (ColorPicker)](#colorpicker), [States and a form (TimeInput)](#timeinput) |
|
|
6537
|
+
| `formValue` | `(value: number) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [In a form (ColorPicker)](#colorpicker) |
|
|
6484
6538
|
|
|
6485
6539
|
Also takes every attribute of `<input>` – without `defaultValue`, `name`, `onChange`, `prefix`, `size`, `type`, `value`.
|
|
6486
6540
|
|
|
@@ -6489,7 +6543,7 @@ Also takes every attribute of `<input>` – without `defaultValue`, `name`, `onC
|
|
|
6489
6543
|
- No expressions: “12*4” is not calculated.
|
|
6490
6544
|
- No currency conversion; the unit is a label.
|
|
6491
6545
|
|
|
6492
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
6546
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
6493
6547
|
|
|
6494
6548
|
### Slider
|
|
6495
6549
|
|
|
@@ -6678,7 +6732,7 @@ type SliderMark = number | { value: number; label?: ReactNode };
|
|
|
6678
6732
|
- One thumb: a range with two ends is the RangeSlider.
|
|
6679
6733
|
- Marks show values; they do not catch the thumb.
|
|
6680
6734
|
|
|
6681
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
6735
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
6682
6736
|
|
|
6683
6737
|
### RangeSlider
|
|
6684
6738
|
|
|
@@ -6819,7 +6873,7 @@ type RangeSliderValue = readonly [from: number, to: number];
|
|
|
6819
6873
|
- No marks on the track; use the Slider's where marks are needed.
|
|
6820
6874
|
- The ends may meet; no minimum gap between them is kept.
|
|
6821
6875
|
|
|
6822
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
6876
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
6823
6877
|
|
|
6824
6878
|
### Checkbox
|
|
6825
6879
|
|
|
@@ -7192,7 +7246,7 @@ Also takes every attribute of `<input>` – without `role`, `size`, `type`.
|
|
|
7192
7246
|
|
|
7193
7247
|
- No pending or loading state; while your application applies the change, disable the switch or say so beside it.
|
|
7194
7248
|
|
|
7195
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
7249
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
7196
7250
|
|
|
7197
7251
|
### RadioGroup
|
|
7198
7252
|
|
|
@@ -7646,7 +7700,7 @@ Also takes every attribute of `<div>` – without `defaultValue`, `onChange`.
|
|
|
7646
7700
|
- Two to four short possibilities: a word that does not fit its place ends in an ellipsis.
|
|
7647
7701
|
- No icons and no line of explanation in a segment; several chosen at once is not this control.
|
|
7648
7702
|
|
|
7649
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
7703
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
7650
7704
|
|
|
7651
7705
|
### FileInput
|
|
7652
7706
|
|
|
@@ -7987,7 +8041,7 @@ Also takes every attribute of `<input>` – without `defaultValue`, `onChange`,
|
|
|
7987
8041
|
|
|
7988
8042
|
- No upload, no progress and no size limit of its own; those belong to the application sending the files.
|
|
7989
8043
|
|
|
7990
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
8044
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
7991
8045
|
|
|
7992
8046
|
## Choosing
|
|
7993
8047
|
|
|
@@ -8186,7 +8240,7 @@ Also takes every attribute of `<select>` – without `defaultValue`, `size`, `va
|
|
|
8186
8240
|
|
|
8187
8241
|
- The list shows the options' text: no icons, descriptions or search inside it - the Combobox searches.
|
|
8188
8242
|
|
|
8189
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
8243
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
8190
8244
|
|
|
8191
8245
|
### Combobox
|
|
8192
8246
|
|
|
@@ -8583,8 +8637,8 @@ export default function ANewValue() {
|
|
|
8583
8637
|
| `loading` | `boolean` | `false` | Results are on their way: the list shows the wording's "Loading" line where it would show the empty text, below any `options` given, and is `aria-busy`.<br>Shown in: [Search with the server](#combobox) |
|
|
8584
8638
|
| `creatable` | `boolean` | `false` | For string values: typed text that fits no option's label is offered as a last row, `Add "text"`, and Enter or a click makes it the value - reported through `onValueChange` like a choice. The field then shows the text itself, and the form posts it.<br>Shown in: [A value that is new](#combobox) |
|
|
8585
8639
|
| `ref` | `Ref<HTMLInputElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
8586
|
-
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [States and a form (TimeInput)](#timeinput) |
|
|
8587
|
-
| `formValue` | `(value: T) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield) |
|
|
8640
|
+
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [In a form (ColorPicker)](#colorpicker), [States and a form (TimeInput)](#timeinput) |
|
|
8641
|
+
| `formValue` | `(value: T) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [In a form (ColorPicker)](#colorpicker) |
|
|
8588
8642
|
|
|
8589
8643
|
###### Events
|
|
8590
8644
|
|
|
@@ -8608,7 +8662,7 @@ Also takes every attribute of `<input>` – without `defaultValue`, `onChange`.
|
|
|
8608
8662
|
- Only an option can be chosen, unless `creatable` takes typed text as the value (string values only).
|
|
8609
8663
|
- No request of its own: `onSearch` reports the typed text and you fetch, debounce and cancel; `filter={false}` shows what you return.
|
|
8610
8664
|
|
|
8611
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
8665
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
8612
8666
|
|
|
8613
8667
|
### MultiSelect
|
|
8614
8668
|
|
|
@@ -8897,8 +8951,8 @@ export default function ThousandsOfAssets() {
|
|
|
8897
8951
|
| `invalid` | `boolean` | — | Marks the field as invalid. `FormField` sets it itself as soon as it carries an `error` – by hand only necessary without `FormField`.<br>Shown in: [Configurator](#multiselect), [With an error](#multiselect) |
|
|
8898
8952
|
| `clearable` | `boolean` | `false` | Shows a cross beside the chips that empties the selection, as "Select none" does: a chosen value whose option is disabled stays. The field keeps room for it, chosen values or none, so that it never moves.<br>Shown in: [Configurator](#multiselect), [Filter incidents by service](#multiselect), [Thousands of assets](#multiselect) and 1 more |
|
|
8899
8953
|
| `ref` | `Ref<HTMLButtonElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
8900
|
-
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [States and a form (TimeInput)](#timeinput) |
|
|
8901
|
-
| `formValue` | `(value: T) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield) |
|
|
8954
|
+
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [In a form (ColorPicker)](#colorpicker), [States and a form (TimeInput)](#timeinput) |
|
|
8955
|
+
| `formValue` | `(value: T) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [In a form (ColorPicker)](#colorpicker) |
|
|
8902
8956
|
|
|
8903
8957
|
Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
8904
8958
|
|
|
@@ -8910,6 +8964,290 @@ Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
|
8910
8964
|
| `label` *required* | `string` | — | What is shown – in the panel and as a chip in the field.<br>Shown in: [States](#multiselect), [Filter incidents by service](#multiselect), [Dispatch a tour (Scenarios)](#dispatch-a-tour) |
|
|
8911
8965
|
| `disabled` | `boolean` | — | Shows the row but does not let it be ticked. A value already chosen stays chosen: disabled means "do not change", not "gone".<br>Shown in: [States](#multiselect) |
|
|
8912
8966
|
|
|
8967
|
+
### ColorPicker
|
|
8968
|
+
|
|
8969
|
+
One colour, chosen on a square and a hue strip, typed as hex or as red, green and blue, or picked from the screen, from the application's own swatches (colour field): the line of a series, a tag, a state. The panel reads the colour against light and dark surfaces and compares it with the colour it opened with.
|
|
8970
|
+
|
|
8971
|
+
```ts
|
|
8972
|
+
import { ColorPicker } from "@umriss-ui/core";
|
|
8973
|
+
```
|
|
8974
|
+
|
|
8975
|
+
The value is a lowercase `#rrggbb` string or `null`; a given value in any hex spelling (`#ABC`, `2563EB`) is read, and anything else warns in development and reads as `null`. It reports on every settled step, so what the colour is for can follow at once.
|
|
8976
|
+
|
|
8977
|
+
Escape and Cancel put the opening colour back, with one more `onValueChange`; Done, a click outside, a Tab out and a scroll keep the colour. The focus returns to the field in every case.
|
|
8978
|
+
|
|
8979
|
+
#### Examples
|
|
8980
|
+
|
|
8981
|
+
##### A colour
|
|
8982
|
+
|
|
8983
|
+
The value is a lowercase `#rrggbb` string or `null`. Type or paste a hex colour in the panel (`#2563eb`, `2563EB`, `#26e`); `onValueChange` runs as soon as the text is a whole colour. Done or a click outside keeps the colour, Cancel or Escape puts the old one back.
|
|
8984
|
+
|
|
8985
|
+
```tsx
|
|
8986
|
+
import { useState } from "react";
|
|
8987
|
+
import { ColorPicker, FormField, Stack, Text } from "@umriss-ui/core";
|
|
8988
|
+
|
|
8989
|
+
export default function AColour() {
|
|
8990
|
+
const [colour, setColour] = useState<string | null>("#2563eb");
|
|
8991
|
+
|
|
8992
|
+
return (
|
|
8993
|
+
<Stack gap={3} style={{ maxWidth: 320 }}>
|
|
8994
|
+
<FormField label="Line colour">
|
|
8995
|
+
<ColorPicker value={colour} onValueChange={setColour} />
|
|
8996
|
+
</FormField>
|
|
8997
|
+
<Text size="xs" tone="muted" mono>
|
|
8998
|
+
value: {colour === null ? "null" : colour}
|
|
8999
|
+
</Text>
|
|
9000
|
+
</Stack>
|
|
9001
|
+
);
|
|
9002
|
+
}
|
|
9003
|
+
```
|
|
9004
|
+
|
|
9005
|
+
##### States
|
|
9006
|
+
|
|
9007
|
+
`size="sm"` suits dense forms, `defaultValue` starts an uncontrolled field, `chars` fixes the width, errors come from the `FormField` (or `invalid` by hand), and `disabled` locks field and panel.
|
|
9008
|
+
|
|
9009
|
+
```tsx
|
|
9010
|
+
import { ColorPicker, FormField, Grid } from "@umriss-ui/core";
|
|
9011
|
+
|
|
9012
|
+
export default function States() {
|
|
9013
|
+
return (
|
|
9014
|
+
<Grid minItemWidth="220px" gap={4}>
|
|
9015
|
+
<FormField label="Tag" hint="Small size, uncontrolled.">
|
|
9016
|
+
<ColorPicker size="sm" defaultValue="#7c3aed" />
|
|
9017
|
+
</FormField>
|
|
9018
|
+
<FormField label="Line" error="This colour cannot be read on the dark theme.">
|
|
9019
|
+
<ColorPicker defaultValue="#161618" />
|
|
9020
|
+
</FormField>
|
|
9021
|
+
<FormField label="Set by the theme" hint="Locked.">
|
|
9022
|
+
<ColorPicker value="#059669" onValueChange={() => {}} disabled />
|
|
9023
|
+
</FormField>
|
|
9024
|
+
<FormField label="Accent" hint="Empty, with its own placeholder, ten characters wide.">
|
|
9025
|
+
<ColorPicker placeholder="Theme colour" chars={10} />
|
|
9026
|
+
</FormField>
|
|
9027
|
+
<FormField label="Border">
|
|
9028
|
+
<ColorPicker aria-label="Border colour" invalid />
|
|
9029
|
+
</FormField>
|
|
9030
|
+
</Grid>
|
|
9031
|
+
);
|
|
9032
|
+
}
|
|
9033
|
+
```
|
|
9034
|
+
|
|
9035
|
+
##### The series colours of a trend
|
|
9036
|
+
|
|
9037
|
+
A property panel beside the chart it sets. `onValueChange` runs on every move of the square or the strip and on every arrow key, so the lines follow while the reader drags; Escape and Cancel put the colour back. The square takes the arrows (Shift for ten steps), the strip the arrows and Page Up and Page Down.
|
|
9038
|
+
|
|
9039
|
+
```tsx
|
|
9040
|
+
import { useState } from "react";
|
|
9041
|
+
import { Card, CardBody, ColorPicker, FormField, Grid, Stack, Text } from "@umriss-ui/core";
|
|
9042
|
+
|
|
9043
|
+
const ZONES = [
|
|
9044
|
+
{ id: "z1", name: "Zone 1", color: "#2563eb", points: "0,60 20,52 40,56 60,40 80,44 100,30 120,34" },
|
|
9045
|
+
{ id: "z2", name: "Zone 2", color: "#059669", points: "0,70 20,66 40,60 60,62 80,50 100,52 120,46" },
|
|
9046
|
+
{ id: "z3", name: "Zone 3", color: "#d97706", points: "0,40 20,44 40,30 60,34 80,22 100,26 120,18" },
|
|
9047
|
+
] as const;
|
|
9048
|
+
|
|
9049
|
+
export default function SeriesOfATrend() {
|
|
9050
|
+
const [colours, setColours] = useState<Record<string, string | null>>(Object.fromEntries(ZONES.map((zone) => [zone.id, zone.color])));
|
|
9051
|
+
|
|
9052
|
+
return (
|
|
9053
|
+
<Grid minItemWidth="260px" gap={4}>
|
|
9054
|
+
<Card>
|
|
9055
|
+
<CardBody>
|
|
9056
|
+
<Stack gap={3}>
|
|
9057
|
+
{ZONES.map((zone) => (
|
|
9058
|
+
<FormField key={zone.id} label={zone.name}>
|
|
9059
|
+
<ColorPicker value={colours[zone.id]} onValueChange={(next) => setColours((all) => ({ ...all, [zone.id]: next }))} />
|
|
9060
|
+
</FormField>
|
|
9061
|
+
))}
|
|
9062
|
+
</Stack>
|
|
9063
|
+
</CardBody>
|
|
9064
|
+
</Card>
|
|
9065
|
+
<Card>
|
|
9066
|
+
<CardBody>
|
|
9067
|
+
<Stack gap={2}>
|
|
9068
|
+
<Text size="sm" tone="muted">
|
|
9069
|
+
Furnace temperature, last 6 h
|
|
9070
|
+
</Text>
|
|
9071
|
+
<svg viewBox="0 0 120 80" role="img" aria-label="Three lines, one per zone" style={{ display: "block", width: "100%" }}>
|
|
9072
|
+
{ZONES.map((zone) => (
|
|
9073
|
+
<polyline key={zone.id} points={zone.points} fill="none" stroke={colours[zone.id] ?? "currentColor"} strokeWidth="2" strokeLinejoin="round" strokeLinecap="round" />
|
|
9074
|
+
))}
|
|
9075
|
+
</svg>
|
|
9076
|
+
</Stack>
|
|
9077
|
+
</CardBody>
|
|
9078
|
+
</Card>
|
|
9079
|
+
</Grid>
|
|
9080
|
+
);
|
|
9081
|
+
}
|
|
9082
|
+
```
|
|
9083
|
+
|
|
9084
|
+
##### Choose from a palette
|
|
9085
|
+
|
|
9086
|
+
`swatches` hands in the colours your organisation agreed on, each with a `name` for the hover and the screen reader. The swatch that matches the colour is pressed; a click applies it like any other step. Free choice stays: the square and the hex field are still there.
|
|
9087
|
+
|
|
9088
|
+
```tsx
|
|
9089
|
+
import { useState } from "react";
|
|
9090
|
+
import { ColorPicker, FormField, Stack, Text } from "@umriss-ui/core";
|
|
9091
|
+
|
|
9092
|
+
const PALETTE = [
|
|
9093
|
+
{ name: "Ocean", value: "#2563eb" },
|
|
9094
|
+
{ name: "Forest", value: "#059669" },
|
|
9095
|
+
{ name: "Amber", value: "#d97706" },
|
|
9096
|
+
{ name: "Coral", value: "#f97316" },
|
|
9097
|
+
{ name: "Berry", value: "#be123c" },
|
|
9098
|
+
{ name: "Violet", value: "#7c3aed" },
|
|
9099
|
+
{ name: "Slate", value: "#475569" },
|
|
9100
|
+
{ name: "Ink", value: "#161618" },
|
|
9101
|
+
];
|
|
9102
|
+
|
|
9103
|
+
export default function FromAPalette() {
|
|
9104
|
+
const [colour, setColour] = useState<string | null>("#059669");
|
|
9105
|
+
|
|
9106
|
+
return (
|
|
9107
|
+
<Stack gap={3} style={{ maxWidth: 320 }}>
|
|
9108
|
+
<FormField label="Task category">
|
|
9109
|
+
<ColorPicker value={colour} onValueChange={setColour} swatches={PALETTE} />
|
|
9110
|
+
</FormField>
|
|
9111
|
+
<Text size="xs" tone="muted" mono>
|
|
9112
|
+
value: {colour === null ? "null" : colour}
|
|
9113
|
+
</Text>
|
|
9114
|
+
</Stack>
|
|
9115
|
+
);
|
|
9116
|
+
}
|
|
9117
|
+
```
|
|
9118
|
+
|
|
9119
|
+
##### Contrast against your surfaces
|
|
9120
|
+
|
|
9121
|
+
The panel reads the colour against core's light and dark surface and says Pass or Fail at 3:1 - the bound for a line or a mark, not for text. `contrastAgainst` names your own surfaces instead; an empty list hides the readout.
|
|
9122
|
+
|
|
9123
|
+
```tsx
|
|
9124
|
+
import { ColorPicker, FormField, Grid } from "@umriss-ui/core";
|
|
9125
|
+
|
|
9126
|
+
/* The two values of core's `--u-color-surface` token (light, dark). */
|
|
9127
|
+
const LIGHT = "#ffffff";
|
|
9128
|
+
const DARK = "#161618";
|
|
9129
|
+
|
|
9130
|
+
const SURFACES = [
|
|
9131
|
+
{ name: "Plan", value: "#f4f1ea" },
|
|
9132
|
+
{ name: "Night plan", value: "#1c2430" },
|
|
9133
|
+
{ name: "Map", value: "#cfe3d4" },
|
|
9134
|
+
];
|
|
9135
|
+
|
|
9136
|
+
export default function ContrastAgainstYourSurfaces() {
|
|
9137
|
+
return (
|
|
9138
|
+
<Grid minItemWidth="260px" gap={4}>
|
|
9139
|
+
<FormField label="Core's surfaces" hint="The default: light and dark.">
|
|
9140
|
+
<ColorPicker defaultValue="#7c9cff" contrastAgainst={[{ name: "Light", value: LIGHT }, { name: "Dark", value: DARK }]} />
|
|
9141
|
+
</FormField>
|
|
9142
|
+
<FormField label="Your surfaces" hint="Three backgrounds the line must stay visible on.">
|
|
9143
|
+
<ColorPicker defaultValue="#d97706" contrastAgainst={SURFACES} />
|
|
9144
|
+
</FormField>
|
|
9145
|
+
<FormField label="No readout" hint="An empty list.">
|
|
9146
|
+
<ColorPicker defaultValue="#475569" contrastAgainst={[]} />
|
|
9147
|
+
</FormField>
|
|
9148
|
+
</Grid>
|
|
9149
|
+
);
|
|
9150
|
+
}
|
|
9151
|
+
```
|
|
9152
|
+
|
|
9153
|
+
##### In a form
|
|
9154
|
+
|
|
9155
|
+
Give the field a `name` and a plain `<form>` - or a React 19 `<form action>` - receives the colour as lowercase `#rrggbb`, or an empty text when none is set; a disabled field posts nothing. `formValue` writes it another way, `clearable` adds a cross and a Clear button, and a reset puts the default colour back.
|
|
9156
|
+
|
|
9157
|
+
```tsx
|
|
9158
|
+
import { useState } from "react";
|
|
9159
|
+
import { Button, ColorPicker, FormField, Grid, Stack, Text } from "@umriss-ui/core";
|
|
9160
|
+
|
|
9161
|
+
export default function InAForm() {
|
|
9162
|
+
const [posted, setPosted] = useState<string[]>([]);
|
|
9163
|
+
|
|
9164
|
+
return (
|
|
9165
|
+
<form
|
|
9166
|
+
action={(data) => setPosted([...data.entries()].map(([name, value]) => `${name} = ${String(value)}`))}
|
|
9167
|
+
style={{ maxWidth: 560 }}
|
|
9168
|
+
>
|
|
9169
|
+
<Stack gap={4}>
|
|
9170
|
+
<Grid minItemWidth="220px" gap={4}>
|
|
9171
|
+
<FormField label="Brand colour">
|
|
9172
|
+
<ColorPicker name="accent" defaultValue="#2563eb" clearable />
|
|
9173
|
+
</FormField>
|
|
9174
|
+
<FormField label="Line, without the hash">
|
|
9175
|
+
<ColorPicker name="line" defaultValue="#161618" formValue={(hex) => hex.slice(1)} />
|
|
9176
|
+
</FormField>
|
|
9177
|
+
<FormField label="Highlight" hint="Empty, so it posts an empty text.">
|
|
9178
|
+
<ColorPicker name="highlight" clearable />
|
|
9179
|
+
</FormField>
|
|
9180
|
+
<FormField label="Set by the theme" hint="Locked, so it posts nothing.">
|
|
9181
|
+
<ColorPicker name="locked" defaultValue="#059669" disabled />
|
|
9182
|
+
</FormField>
|
|
9183
|
+
</Grid>
|
|
9184
|
+
<Stack direction="row" gap={3} align="center">
|
|
9185
|
+
<Button type="submit" variant="primary" size="sm">
|
|
9186
|
+
Send
|
|
9187
|
+
</Button>
|
|
9188
|
+
<Button type="reset" variant="ghost" size="sm">
|
|
9189
|
+
Reset
|
|
9190
|
+
</Button>
|
|
9191
|
+
</Stack>
|
|
9192
|
+
{posted.length > 0 && (
|
|
9193
|
+
<Text as="pre" size="sm" data-testid="posted" style={{ margin: 0 }}>
|
|
9194
|
+
{posted.join("\n")}
|
|
9195
|
+
</Text>
|
|
9196
|
+
)}
|
|
9197
|
+
</Stack>
|
|
9198
|
+
</form>
|
|
9199
|
+
);
|
|
9200
|
+
}
|
|
9201
|
+
```
|
|
9202
|
+
|
|
9203
|
+
#### When to use something else
|
|
9204
|
+
|
|
9205
|
+
- One of a few named options → RadioGroup
|
|
9206
|
+
- A day or a moment → DatePicker
|
|
9207
|
+
|
|
9208
|
+
#### Keyboard
|
|
9209
|
+
|
|
9210
|
+
| Key | Action |
|
|
9211
|
+
|---|---|
|
|
9212
|
+
| `Enter, Space or Arrow Down` | On the field, opens the panel. |
|
|
9213
|
+
| `Escape` | Puts back the colour the panel opened with and closes it. |
|
|
9214
|
+
|
|
9215
|
+
#### API
|
|
9216
|
+
|
|
9217
|
+
##### `ColorPickerProps`
|
|
9218
|
+
|
|
9219
|
+
| Prop | Type | Default | Description |
|
|
9220
|
+
|---|---|---|---|
|
|
9221
|
+
| `defaultValue` | `string \| null` | `null` | Uncontrolled: the colour to start at.<br>Shown in: [States](#colorpicker), [Contrast against your surfaces](#colorpicker), [In a form](#colorpicker) |
|
|
9222
|
+
| `value` | `string \| null` | — | The colour as a hex string - `#2563eb`, `2563EB` and `#26e` are read; `null` means none. Anything else warns in development and reads as `null`. It leaves as lowercase `#rrggbb`.<br>Shown in: [A colour](#colorpicker), [States](#colorpicker), [The series colours of a trend](#colorpicker) and 1 more |
|
|
9223
|
+
| `onValueChange` | `(value: string \| null) => void` | — | Runs on every settled step - a hex value as soon as it is a whole colour - and once more with the colour the panel opened with when Cancel or Escape put it back.<br>Shown in: [A colour](#colorpicker), [States](#colorpicker), [The series colours of a trend](#colorpicker) and 1 more |
|
|
9224
|
+
| `placeholder` | `string` | — | What stands in the empty field.<br>Shown in: [States](#colorpicker) |
|
|
9225
|
+
| `clearable` | `boolean` | `false` | A cross on the trigger and Clear in the panel set `null`.<br>Shown in: [In a form](#colorpicker) |
|
|
9226
|
+
| `disabled` | `boolean` | `false` | Locks the field and the panel.<br>Shown in: [States](#colorpicker), [In a form](#colorpicker) |
|
|
9227
|
+
| `invalid` | `boolean` | — | Marks the field as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`.<br>Shown in: [States](#colorpicker) |
|
|
9228
|
+
| `size` | `"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for a toolbar and dense forms, `md` otherwise.<br>Shown in: [States](#colorpicker) |
|
|
9229
|
+
| `chars` | `number` | — | The width in characters - room for the value; the field adds its own padding, swatch and chevron. Given, the field is that wide wherever it stands, and never wider than its place. Without it the field fills its place, and where the place asks - in a toolbar or a row - it is as wide as a hex value.<br>Shown in: [States](#colorpicker) |
|
|
9230
|
+
| `swatches` | `readonly ``ColorSwatch``[]` | no default | The application's own colours as one-click choices in the panel, named for a screen reader and on hover; the one matching the colour is pressed.<br>Shown in: [Choose from a palette](#colorpicker) |
|
|
9231
|
+
| `contrastAgainst` | `readonly ``ColorSwatch``[]` | core's light and dark surface | The surfaces the panel measures the colour against, each with its contrast ratio and Pass or Fail at 3:1 (WCAG 1.4.11 - for marks and lines, not text). An empty list hides the readout.<br>Shown in: [Contrast against your surfaces](#colorpicker) |
|
|
9232
|
+
| `ref` | `Ref<HTMLButtonElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
9233
|
+
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [In a form](#colorpicker), [Post to a form (FormField)](#formfield), [States and a form (TimeInput)](#timeinput) |
|
|
9234
|
+
| `formValue` | `(value: string) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [In a form](#colorpicker), [Post to a form (FormField)](#formfield) |
|
|
9235
|
+
|
|
9236
|
+
Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
9237
|
+
|
|
9238
|
+
##### `ColorSwatch`
|
|
9239
|
+
|
|
9240
|
+
| Prop | Type | Default | Description |
|
|
9241
|
+
|---|---|---|---|
|
|
9242
|
+
| `name` *required* | `string` | — | What the colour is called: said by a screen reader and shown on hover (swatch), or the surface's name in the readout.<br>Shown in: [Contrast against your surfaces](#colorpicker) |
|
|
9243
|
+
| `value` *required* | `string` | — | A hex colour, `#2563eb` or `2563EB`.<br>Shown in: [Contrast against your surfaces](#colorpicker) |
|
|
9244
|
+
|
|
9245
|
+
#### Known limits
|
|
9246
|
+
|
|
9247
|
+
- Hex only: no alpha, no `rgb()`, `hsl()` or `oklch()`.
|
|
9248
|
+
|
|
9249
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
9250
|
+
|
|
8913
9251
|
## Dates and times
|
|
8914
9252
|
|
|
8915
9253
|
Where a user picks a day, a moment or a span of them from a calendar that opens.
|
|
@@ -9102,8 +9440,8 @@ export default function FromTheFirstReadingToToday() {
|
|
|
9102
9440
|
| `min` | `Date` | — | The earliest day the picker offers, inclusive. Only its calendar day counts - in the formats' zone, when one is named - not its time of day. A value given outside is shown as given.<br>Shown in: [From the first reading to today](#datepicker) |
|
|
9103
9441
|
| `max` | `Date` | — | The latest day the picker offers, inclusive; read as `min` is.<br>Shown in: [From the first reading to today](#datepicker) |
|
|
9104
9442
|
| `ref` | `Ref<HTMLButtonElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
9105
|
-
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [States and a form (TimeInput)](#timeinput) |
|
|
9106
|
-
| `formValue` | `(value: Date) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield) |
|
|
9443
|
+
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [In a form (ColorPicker)](#colorpicker), [States and a form (TimeInput)](#timeinput) |
|
|
9444
|
+
| `formValue` | `(value: Date) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [In a form (ColorPicker)](#colorpicker) |
|
|
9107
9445
|
|
|
9108
9446
|
Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
9109
9447
|
|
|
@@ -9112,7 +9450,7 @@ Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
|
9112
9450
|
- No typing of a date into the field.
|
|
9113
9451
|
- umriss shows the reader's time ([ADR-0060](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0060-validation-and-a-layout-editor-are-never-time-zones-not-yet.md)).
|
|
9114
9452
|
|
|
9115
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
9453
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
9116
9454
|
|
|
9117
9455
|
### DateTimePicker
|
|
9118
9456
|
|
|
@@ -9273,8 +9611,8 @@ export default function WithAnError() {
|
|
|
9273
9611
|
| `min` | `Date` | — | The earliest day the picker offers, inclusive. Only its calendar day counts - in the formats' zone, when one is named - not its time of day. A value given outside is shown as given. |
|
|
9274
9612
|
| `max` | `Date` | — | The latest day the picker offers, inclusive; read as `min` is. |
|
|
9275
9613
|
| `ref` | `Ref<HTMLButtonElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
9276
|
-
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [States and a form (TimeInput)](#timeinput) |
|
|
9277
|
-
| `formValue` | `(value: Date) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield) |
|
|
9614
|
+
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [In a form (ColorPicker)](#colorpicker), [States and a form (TimeInput)](#timeinput) |
|
|
9615
|
+
| `formValue` | `(value: Date) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [In a form (ColorPicker)](#colorpicker) |
|
|
9278
9616
|
|
|
9279
9617
|
Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
9280
9618
|
|
|
@@ -9282,7 +9620,7 @@ Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
|
9282
9620
|
|
|
9283
9621
|
- umriss shows the reader's time ([ADR-0060](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0060-validation-and-a-layout-editor-are-never-time-zones-not-yet.md)).
|
|
9284
9622
|
|
|
9285
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
9623
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
9286
9624
|
|
|
9287
9625
|
### TimeInput
|
|
9288
9626
|
|
|
@@ -9391,8 +9729,8 @@ export default function StatesAndAForm() {
|
|
|
9391
9729
|
| `invalid` | `boolean` | — | Marks the field as invalid. Inside a `FormField` with an `error`, it is set already.<br>Shown in: [Configurator](#timeinput) |
|
|
9392
9730
|
| `size` | `"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | The size of the fields.<br>Shown in: [Configurator](#timeinput) |
|
|
9393
9731
|
| `ref` | `Ref<HTMLInputElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
9394
|
-
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [States and a form](#timeinput), [Post to a form (FormField)](#formfield) |
|
|
9395
|
-
| `formValue` | `(value: string) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield) |
|
|
9732
|
+
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [States and a form](#timeinput), [Post to a form (FormField)](#formfield), [In a form (ColorPicker)](#colorpicker) |
|
|
9733
|
+
| `formValue` | `(value: string) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [In a form (ColorPicker)](#colorpicker) |
|
|
9396
9734
|
|
|
9397
9735
|
Also takes every attribute of `<input>` – without `defaultValue`, `max`, `min`, `name`, `onChange`, `size`, `step`, `type`, `value`.
|
|
9398
9736
|
|
|
@@ -9400,7 +9738,7 @@ Also takes every attribute of `<input>` – without `defaultValue`, `max`, `min`
|
|
|
9400
9738
|
|
|
9401
9739
|
- No 12-hour clock and no time zone: a time of day is the text it is written as.
|
|
9402
9740
|
|
|
9403
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
9741
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
9404
9742
|
|
|
9405
9743
|
### DateRangePicker
|
|
9406
9744
|
|
|
@@ -9611,8 +9949,8 @@ export default function PresetsCutToABound() {
|
|
|
9611
9949
|
| `ref` | `Ref<HTMLButtonElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
9612
9950
|
| `startName` | `string` | `${name}Start` | The name the start is posted under. From `FormPostRangeProps`.<br>Shown in: [Post to a form (FormField)](#formfield) |
|
|
9613
9951
|
| `endName` | `string` | `${name}End` | The name the end is posted under. From `FormPostRangeProps`.<br>Shown in: [Post to a form (FormField)](#formfield) |
|
|
9614
|
-
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [States and a form (TimeInput)](#timeinput) |
|
|
9615
|
-
| `formValue` | `(value: Date) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield) |
|
|
9952
|
+
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [In a form (ColorPicker)](#colorpicker), [States and a form (TimeInput)](#timeinput) |
|
|
9953
|
+
| `formValue` | `(value: Date) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [In a form (ColorPicker)](#colorpicker) |
|
|
9616
9954
|
|
|
9617
9955
|
Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
9618
9956
|
|
|
@@ -9643,7 +9981,7 @@ the moment of the click.
|
|
|
9643
9981
|
|
|
9644
9982
|
- One span; no list of separate days.
|
|
9645
9983
|
|
|
9646
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
9984
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
9647
9985
|
|
|
9648
9986
|
### DateTimeRangePicker
|
|
9649
9987
|
|
|
@@ -9826,8 +10164,8 @@ export default function WithAnError() {
|
|
|
9826
10164
|
| `ref` | `Ref<HTMLButtonElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
9827
10165
|
| `startName` | `string` | `${name}Start` | The name the start is posted under. From `FormPostRangeProps`.<br>Shown in: [Post to a form (FormField)](#formfield) |
|
|
9828
10166
|
| `endName` | `string` | `${name}End` | The name the end is posted under. From `FormPostRangeProps`.<br>Shown in: [Post to a form (FormField)](#formfield) |
|
|
9829
|
-
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [States and a form (TimeInput)](#timeinput) |
|
|
9830
|
-
| `formValue` | `(value: Date) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield) |
|
|
10167
|
+
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [In a form (ColorPicker)](#colorpicker), [States and a form (TimeInput)](#timeinput) |
|
|
10168
|
+
| `formValue` | `(value: Date) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [In a form (ColorPicker)](#colorpicker) |
|
|
9831
10169
|
|
|
9832
10170
|
Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
9833
10171
|
|
|
@@ -9859,7 +10197,7 @@ the moment of the click.
|
|
|
9859
10197
|
- umriss shows the reader's time ([ADR-0060](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0060-validation-and-a-layout-editor-are-never-time-zones-not-yet.md)).
|
|
9860
10198
|
- No recurring windows.
|
|
9861
10199
|
|
|
9862
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
10200
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
9863
10201
|
|
|
9864
10202
|
## Feedback
|
|
9865
10203
|
|
|
@@ -10009,7 +10347,7 @@ Also takes every attribute of `<svg>`.
|
|
|
10009
10347
|
|
|
10010
10348
|
- One shape and no figure: for how far a job has come, use a [ProgressBar](#progressbar).
|
|
10011
10349
|
|
|
10012
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
10350
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
10013
10351
|
|
|
10014
10352
|
### ProgressBar
|
|
10015
10353
|
|
|
@@ -10192,7 +10530,7 @@ Also takes every attribute of `<div>`.
|
|
|
10192
10530
|
|
|
10193
10531
|
- No colour of verdict and no steps of its own; for a job in steps, stack one bar per step.
|
|
10194
10532
|
|
|
10195
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
10533
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
10196
10534
|
|
|
10197
10535
|
### Skeleton
|
|
10198
10536
|
|
|
@@ -10349,7 +10687,7 @@ Also takes every attribute of `<span>`.
|
|
|
10349
10687
|
|
|
10350
10688
|
- It draws a shape and nothing else; the rows, cards and layout it stands in for are yours.
|
|
10351
10689
|
|
|
10352
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
10690
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
10353
10691
|
|
|
10354
10692
|
### Alert
|
|
10355
10693
|
|
|
@@ -10567,7 +10905,7 @@ type AlertTone = "neutral" | "accent" | "success" | "warning" | "danger";
|
|
|
10567
10905
|
- No timer: an alert stays until you remove it. A message that goes by itself is a toast.
|
|
10568
10906
|
- No stack or queue of messages; place each alert where its matter is.
|
|
10569
10907
|
|
|
10570
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
10908
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
10571
10909
|
|
|
10572
10910
|
### Toast
|
|
10573
10911
|
|
|
@@ -11125,7 +11463,7 @@ type ToastCloseReason = "timeout" | "dismiss" | "action";
|
|
|
11125
11463
|
- No queue: a toast over the limit pushes the oldest timed one out rather than waiting. Lasting and `loading` toasts are not capped: the deck holds every one of them beside the timed ones.
|
|
11126
11464
|
- Without the Popover API the deck moves with a dialog that transforms itself: inside a dialog the toasts stand in the top layer only where the browser has it, and elsewhere they are a fixed box in the dialog.
|
|
11127
11465
|
|
|
11128
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
11466
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
11129
11467
|
|
|
11130
11468
|
### EmptyState
|
|
11131
11469
|
|
|
@@ -11433,7 +11771,7 @@ export default function ACalculation() {
|
|
|
11433
11771
|
- No interactive content and no rich layout inside: it is read, never used.
|
|
11434
11772
|
- No placement option: it stands above its element and flips below where there is no room.
|
|
11435
11773
|
|
|
11436
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
11774
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
11437
11775
|
|
|
11438
11776
|
### Popover
|
|
11439
11777
|
|
|
@@ -11687,7 +12025,7 @@ export default function ASettingInAPanel() {
|
|
|
11687
12025
|
| Prop | Type | Default | Description |
|
|
11688
12026
|
|---|---|---|---|
|
|
11689
12027
|
| `open` *required* | `boolean` | — | Whether the surface stands. Controlled: the popover never opens itself.<br>Shown in: [An anchored surface](#popover), [Take the width of the trigger](#popover), [Filter a list from a panel](#popover) and 2 more |
|
|
11690
|
-
| `onOpenChange` *required* | `(open: boolean) => void` | — | Reports every wish to change the state – outside click, Escape, scrolling. Whether it closes as a result is the caller's decision
|
|
12028
|
+
| `onOpenChange` *required* | `(open: boolean, reason?: ``PopoverCloseReason``) => void` | — | Reports every wish to change the state – outside click, Escape, scrolling. Whether it closes as a result is the caller's decision. A wish to close carries its `PopoverCloseReason`.<br>Shown in: [An anchored surface](#popover), [Take the width of the trigger](#popover), [Filter a list from a panel](#popover) and 2 more |
|
|
11691
12029
|
| `anchorRef` *required* | `RefObject<HTMLElement \| null>` | — | Trigger the panel hangs from (the reference for the position).<br>Shown in: [An anchored surface](#popover), [Take the width of the trigger](#popover), [Filter a list from a panel](#popover) and 2 more |
|
|
11692
12030
|
| `focusRef` | `RefObject<HTMLElement \| null>` | `anchorRef` | Element that receives the focus on closing. Needed where the anchor is a non-focusable shell and the actual trigger sits inside it. |
|
|
11693
12031
|
| `insideRefs` | `ReadonlyArray<RefObject<HTMLElement \| null>>` | — | Further elements whose click does not count as an outside click (e.g. the clear ×). |
|
|
@@ -11722,6 +12060,16 @@ export default function ASettingInAPanel() {
|
|
|
11722
12060
|
|
|
11723
12061
|
##### Types on this page
|
|
11724
12062
|
|
|
12063
|
+
###### `PopoverCloseReason`
|
|
12064
|
+
|
|
12065
|
+
Why a popover asks to close: Escape, a click outside, a scroll
|
|
12066
|
+
(`hideOnScroll`), the anchor clipped away by a scrolling container, a Tab
|
|
12067
|
+
out of the panel (`closeOnTabOut`).
|
|
12068
|
+
|
|
12069
|
+
```ts
|
|
12070
|
+
type PopoverCloseReason = "escape" | "outside" | "scroll" | "clipped" | "tab";
|
|
12071
|
+
```
|
|
12072
|
+
|
|
11725
12073
|
###### `Align`
|
|
11726
12074
|
|
|
11727
12075
|
Where the panel lines up with its anchor along the side it stands on.
|
|
@@ -11735,7 +12083,7 @@ type Align = "start" | "end" | "center";
|
|
|
11735
12083
|
- No padding and no inner layout: it brings the overlay's surface - ground, corners, shadow - and the rest is yours. A `className` restates the surface where one needs another.
|
|
11736
12084
|
- It does not trap focus; a surface the user must answer is a [Modal](#modal).
|
|
11737
12085
|
|
|
11738
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
12086
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
11739
12087
|
|
|
11740
12088
|
### Menu
|
|
11741
12089
|
|
|
@@ -11972,7 +12320,7 @@ Also takes every attribute of `<button>` – without `onSelect`.
|
|
|
11972
12320
|
|
|
11973
12321
|
- No submenus, no checkable entries and no type-ahead.
|
|
11974
12322
|
|
|
11975
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
12323
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
11976
12324
|
|
|
11977
12325
|
### ContextMenu
|
|
11978
12326
|
|
|
@@ -12189,7 +12537,7 @@ export default function OnARow() {
|
|
|
12189
12537
|
- It listens to no right-click itself: the element and the point are yours, through the hook.
|
|
12190
12538
|
- No submenus, no checkable entries and no type-ahead, as in the menu.
|
|
12191
12539
|
|
|
12192
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
12540
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
12193
12541
|
|
|
12194
12542
|
### Modal
|
|
12195
12543
|
|
|
@@ -12646,7 +12994,7 @@ type ModalSize = "sm" | "md" | "lg";
|
|
|
12646
12994
|
|
|
12647
12995
|
- No non-modal window and no dragging or resizing: a panel that leaves the page usable is layout – a [Splitter](#splitter).
|
|
12648
12996
|
|
|
12649
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
12997
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
12650
12998
|
|
|
12651
12999
|
### Drawer
|
|
12652
13000
|
|
|
@@ -13079,7 +13427,7 @@ Also takes every attribute of `<dialog>` – without `onClose`.
|
|
|
13079
13427
|
- Modal on purpose, with no non-modal mode: a panel beside a page the user keeps working in is layout, not an overlay.
|
|
13080
13428
|
- Only the left and right edges; nothing slides in from the top or bottom.
|
|
13081
13429
|
|
|
13082
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
13430
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
13083
13431
|
|
|
13084
13432
|
### ConfirmDialog
|
|
13085
13433
|
|
|
@@ -13256,7 +13604,7 @@ Also takes every attribute of `<dialog>` – without `children`, `onClose`, `ope
|
|
|
13256
13604
|
|
|
13257
13605
|
- A title, a description and two buttons, nothing more: fields belong in a [Modal](#modal).
|
|
13258
13606
|
|
|
13259
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
13607
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
13260
13608
|
|
|
13261
13609
|
### CommandPalette
|
|
13262
13610
|
|
|
@@ -13558,7 +13906,7 @@ Also takes every attribute of `<dialog>` – without `children`, `onClose`, `ope
|
|
|
13558
13906
|
- No memory of past choices and no ranking of its own beyond the match: recency and frequency are weights you keep.
|
|
13559
13907
|
- No nested steps or arguments: a command that needs input opens your own form after it is chosen.
|
|
13560
13908
|
|
|
13561
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
13909
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
13562
13910
|
|
|
13563
13911
|
## Navigation
|
|
13564
13912
|
|
|
@@ -13878,7 +14226,7 @@ Also takes every attribute of the rendered element.
|
|
|
13878
14226
|
|
|
13879
14227
|
- It neither routes nor reads the address: the trail is what you pass.
|
|
13880
14228
|
|
|
13881
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
14229
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
13882
14230
|
|
|
13883
14231
|
### Tabs
|
|
13884
14232
|
|
|
@@ -14243,7 +14591,7 @@ Also takes every attribute of `<div>`.
|
|
|
14243
14591
|
|
|
14244
14592
|
- More tabs than fit scroll sideways within the list; there is no overflow menu, and no closing or reordering of tabs.
|
|
14245
14593
|
|
|
14246
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
14594
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
14247
14595
|
|
|
14248
14596
|
### Accordion
|
|
14249
14597
|
|
|
@@ -14487,7 +14835,7 @@ Also takes every attribute of `<div>` – without `title`.
|
|
|
14487
14835
|
|
|
14488
14836
|
- A folded section's content stays rendered; for heavy content, render it only while its section is open.
|
|
14489
14837
|
|
|
14490
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
14838
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
14491
14839
|
|
|
14492
14840
|
### Stepper
|
|
14493
14841
|
|
|
@@ -14720,7 +15068,7 @@ Also takes every attribute of the rendered element.
|
|
|
14720
15068
|
- The steps are read, not navigated: no keys, no clicks, and no next or back of its own. Moving on is your application's decision, by a done step's label as a button or by buttons of its own.
|
|
14721
15069
|
- No branching or optional steps; pass the steps that apply.
|
|
14722
15070
|
|
|
14723
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
15071
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
14724
15072
|
|
|
14725
15073
|
### TreeView
|
|
14726
15074
|
|
|
@@ -15401,7 +15749,7 @@ to render and the heights of the filler rows around it.
|
|
|
15401
15749
|
- No dragging nodes to rearrange them.
|
|
15402
15750
|
- It fetches nothing and handles no loading errors: retries and messages stay in your application ([ADR-0005](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0005-what-cannot-be-checked.md)).
|
|
15403
15751
|
|
|
15404
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
15752
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
15405
15753
|
|
|
15406
15754
|
### Benchmark
|
|
15407
15755
|
|
|
@@ -15811,7 +16159,7 @@ type AvatarSize = "sm" | "md";
|
|
|
15811
16159
|
|
|
15812
16160
|
- No stack of avatars and no presence dot.
|
|
15813
16161
|
|
|
15814
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
16162
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
15815
16163
|
|
|
15816
16164
|
### Badge
|
|
15817
16165
|
|
|
@@ -16001,7 +16349,7 @@ type BadgeTone = "neutral" | "accent" | "success" | "warning" | "danger";
|
|
|
16001
16349
|
- It cannot be clicked or removed; a label the user acts on is a [Tag](#tag).
|
|
16002
16350
|
- It counts nothing itself: capping at “99+” is yours.
|
|
16003
16351
|
|
|
16004
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
16352
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
16005
16353
|
|
|
16006
16354
|
### Tag
|
|
16007
16355
|
|
|
@@ -16268,7 +16616,7 @@ type TagTone = "neutral" | "accent" | "success" | "warning" | "danger";
|
|
|
16268
16616
|
- No field for typing new tags: a tag input is a [MultiSelect](#multiselect).
|
|
16269
16617
|
- Tags are not toggles: a set of choices to switch on and off is a group of [Checkbox](#checkbox) or a [ButtonGroup](#buttongroup).
|
|
16270
16618
|
|
|
16271
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
16619
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
16272
16620
|
|
|
16273
16621
|
### Stat
|
|
16274
16622
|
|
|
@@ -17157,7 +17505,7 @@ type Severity = "warning" | "alarm";
|
|
|
17157
17505
|
- No trend arrow: a direction from two noisy points is read as information it does not carry; the history line shows the shape.
|
|
17158
17506
|
- It fetches and polls nothing: freshness is judged from the `asOf` you give it.
|
|
17159
17507
|
|
|
17160
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
17508
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
17161
17509
|
|
|
17162
17510
|
### Meter
|
|
17163
17511
|
|
|
@@ -17327,7 +17675,7 @@ type MeterTone = "neutral" | "accent" | "success" | "warning" | "danger";
|
|
|
17327
17675
|
|
|
17328
17676
|
- No limit marks, target tick or scale on the bar; for a value against limits use a [Stat](#stat).
|
|
17329
17677
|
|
|
17330
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
17678
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
17331
17679
|
|
|
17332
17680
|
### Sparkline
|
|
17333
17681
|
|
|
@@ -17585,7 +17933,7 @@ Also takes every attribute of `<span>`.
|
|
|
17585
17933
|
|
|
17586
17934
|
- No axes, labels, tooltip or points to hover: the value stands beside it.
|
|
17587
17935
|
|
|
17588
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
17936
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.55.1/docs/adr/0032-what-umriss-is-not.md).
|
|
17589
17937
|
|
|
17590
17938
|
## API index
|
|
17591
17939
|
|
|
@@ -17648,7 +17996,7 @@ Used on [Breadcrumb](#breadcrumb) and [Scenarios](#scenarios).
|
|
|
17648
17996
|
|
|
17649
17997
|
[Button](#button) – Starts one action when pressed: save, send, deploy, delete. Its variant says how much weight the action carries beside its neighbours, and while the action runs it shows that it is busy and cannot be pressed twice.
|
|
17650
17998
|
|
|
17651
|
-
Used on [Installation](#installation), [UmrissProvider](#umrissprovider), [Theming](#theming), [Sizes](#sizes), [Language](#language), [Stack and Grid](#stack-and-grid), [Divider](#divider), [Card](#card), [Splitter](#splitter), [VisuallyHidden](#visuallyhidden), [Button](#button), [IconButton](#iconbutton), [ButtonGroup](#buttongroup), [Input](#input), [FormField](#formfield), [Textarea](#textarea), [RangeSlider](#rangeslider), [FileInput](#fileinput), [Combobox](#combobox), [TimeInput](#timeinput), [Spinner](#spinner), [ProgressBar](#progressbar), [Skeleton](#skeleton), [Alert](#alert), [Toast](#toast-1), [EmptyState](#emptystate), [Tooltip](#tooltip), [Popover](#popover), [Menu](#menu), [Modal](#modal), [Drawer](#drawer), [ConfirmDialog](#confirmdialog), [CommandPalette](#commandpalette), [Breadcrumb](#breadcrumb), [Accordion](#accordion), [Stepper](#stepper), [TreeView](#treeview), [Benchmark](#benchmark), [Badge](#badge), [Tag](#tag) and [Scenarios](#scenarios).
|
|
17999
|
+
Used on [Installation](#installation), [UmrissProvider](#umrissprovider), [Theming](#theming), [Sizes](#sizes), [Language](#language), [Stack and Grid](#stack-and-grid), [Divider](#divider), [Card](#card), [Splitter](#splitter), [VisuallyHidden](#visuallyhidden), [Button](#button), [IconButton](#iconbutton), [ButtonGroup](#buttongroup), [Input](#input), [FormField](#formfield), [Textarea](#textarea), [RangeSlider](#rangeslider), [FileInput](#fileinput), [Combobox](#combobox), [ColorPicker](#colorpicker), [TimeInput](#timeinput), [Spinner](#spinner), [ProgressBar](#progressbar), [Skeleton](#skeleton), [Alert](#alert), [Toast](#toast-1), [EmptyState](#emptystate), [Tooltip](#tooltip), [Popover](#popover), [Menu](#menu), [Modal](#modal), [Drawer](#drawer), [ConfirmDialog](#confirmdialog), [CommandPalette](#commandpalette), [Breadcrumb](#breadcrumb), [Accordion](#accordion), [Stepper](#stepper), [TreeView](#treeview), [Benchmark](#benchmark), [Badge](#badge), [Tag](#tag) and [Scenarios](#scenarios).
|
|
17652
18000
|
|
|
17653
18001
|
##### `ButtonGroup`
|
|
17654
18002
|
|
|
@@ -17671,14 +18019,14 @@ function CalendarGlyph({ ref, size, range, ...rest }: GlyphProps & {
|
|
|
17671
18019
|
|
|
17672
18020
|
[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.
|
|
17673
18021
|
|
|
17674
|
-
Used on [UmrissProvider](#umrissprovider), [Theming](#theming), [Sizes](#sizes), [Stack and Grid](#stack-and-grid), [Card](#card), [Splitter](#splitter), [Typography](#typography-2), [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), [Stat](#stat) and [Scenarios](#scenarios).
|
|
18022
|
+
Used on [UmrissProvider](#umrissprovider), [Theming](#theming), [Sizes](#sizes), [Stack and Grid](#stack-and-grid), [Card](#card), [Splitter](#splitter), [Typography](#typography-2), [Button](#button), [NumberInput](#numberinput), [Slider](#slider), [Switch](#switch), [SegmentedControl](#segmentedcontrol), [FileInput](#fileinput), [Combobox](#combobox), [ColorPicker](#colorpicker), [Spinner](#spinner), [ProgressBar](#progressbar), [EmptyState](#emptystate), [CommandPalette](#commandpalette), [Breadcrumb](#breadcrumb), [Tabs](#tabs), [Accordion](#accordion), [Stepper](#stepper), [Stat](#stat) and [Scenarios](#scenarios).
|
|
17675
18023
|
|
|
17676
18024
|
##### `CardBody`
|
|
17677
18025
|
|
|
17678
18026
|
[Card](#card) – The content of a `Card`; the part that folds away in a collapsible card.
|
|
17679
18027
|
`flush` removes the padding for a table or a log.
|
|
17680
18028
|
|
|
17681
|
-
Used on [UmrissProvider](#umrissprovider), [Theming](#theming), [Sizes](#sizes), [Stack and Grid](#stack-and-grid), [Card](#card), [Typography](#typography-2), [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), [Stat](#stat) and [Scenarios](#scenarios).
|
|
18029
|
+
Used on [UmrissProvider](#umrissprovider), [Theming](#theming), [Sizes](#sizes), [Stack and Grid](#stack-and-grid), [Card](#card), [Typography](#typography-2), [Button](#button), [NumberInput](#numberinput), [Slider](#slider), [Switch](#switch), [SegmentedControl](#segmentedcontrol), [FileInput](#fileinput), [Combobox](#combobox), [ColorPicker](#colorpicker), [Spinner](#spinner), [ProgressBar](#progressbar), [EmptyState](#emptystate), [Breadcrumb](#breadcrumb), [Tabs](#tabs), [Accordion](#accordion), [Stepper](#stepper), [Stat](#stat) and [Scenarios](#scenarios).
|
|
17682
18030
|
|
|
17683
18031
|
##### `CardHeader`
|
|
17684
18032
|
|
|
@@ -17701,6 +18049,12 @@ A clock face at a quarter past - the time pickers' character.
|
|
|
17701
18049
|
function ClockGlyph({ ref, size, ...rest }: GlyphProps): import("react").JSX.Element;
|
|
17702
18050
|
```
|
|
17703
18051
|
|
|
18052
|
+
##### `ColorPicker`
|
|
18053
|
+
|
|
18054
|
+
[ColorPicker](#colorpicker) – One colour, chosen on a square and a hue strip, typed as hex or as red, green and blue, or picked from the screen, from the application's own swatches (colour field): the line of a series, a tag, a state. The panel reads the colour against light and dark surfaces and compares it with the colour it opened with.
|
|
18055
|
+
|
|
18056
|
+
Used on [ColorPicker](#colorpicker).
|
|
18057
|
+
|
|
17704
18058
|
##### `Combobox`
|
|
17705
18059
|
|
|
17706
18060
|
[Combobox](#combobox) – One choice from a long list, found by typing (autocomplete, typeahead, searchable select): a driver, a service, an account. The list filters along while the value stays exactly one.
|
|
@@ -17780,6 +18134,14 @@ Used on [Stack and Grid](#stack-and-grid), [Divider](#divider), [Switch](#switch
|
|
|
17780
18134
|
|
|
17781
18135
|
Used on [Modal](#modal), [Drawer](#drawer), [CommandPalette](#commandpalette) and [Scenarios](#scenarios).
|
|
17782
18136
|
|
|
18137
|
+
##### `DropperGlyph`
|
|
18138
|
+
|
|
18139
|
+
An eyedropper: a pipette with its bulb at the top and its tip at the bottom left.
|
|
18140
|
+
|
|
18141
|
+
```ts
|
|
18142
|
+
function DropperGlyph({ ref, size, ...rest }: GlyphProps): import("react").JSX.Element;
|
|
18143
|
+
```
|
|
18144
|
+
|
|
17783
18145
|
##### `EmptyState`
|
|
17784
18146
|
|
|
17785
18147
|
[EmptyState](#emptystate) – What stands where a list or panel has nothing to show: what is missing, why, and the way forward (also called a blank slate). Reach for it for a first use, a filter that found nothing, or a queue that is clear.
|
|
@@ -17805,7 +18167,7 @@ Used on [Sizes](#sizes) and [FileInput](#fileinput).
|
|
|
17805
18167
|
|
|
17806
18168
|
[FormField](#formfield) – The frame around a field: its label, a hint below it and the error that replaces the hint (validation messages). Wrap every field in one, so the question, the help and the problem are read out together.
|
|
17807
18169
|
|
|
17808
|
-
Used on [UmrissProvider](#umrissprovider), [Sizes](#sizes), [Language](#language), [Button](#button), [Input](#input), [FormField](#formfield), [Textarea](#textarea), [NumberInput](#numberinput), [Slider](#slider), [RangeSlider](#rangeslider), [Checkbox](#checkbox), [Switch](#switch), [RadioGroup](#radiogroup), [SegmentedControl](#segmentedcontrol), [FileInput](#fileinput), [Select](#select), [Combobox](#combobox), [MultiSelect](#multiselect), [DatePicker](#datepicker), [DateTimePicker](#datetimepicker), [TimeInput](#timeinput), [DateRangePicker](#daterangepicker), [DateTimeRangePicker](#datetimerangepicker), [Alert](#alert), [Toast](#toast-1), [Popover](#popover), [Modal](#modal), [Drawer](#drawer), [Breadcrumb](#breadcrumb), [Accordion](#accordion), [TreeView](#treeview) and [Scenarios](#scenarios).
|
|
18170
|
+
Used on [UmrissProvider](#umrissprovider), [Sizes](#sizes), [Language](#language), [Button](#button), [Input](#input), [FormField](#formfield), [Textarea](#textarea), [NumberInput](#numberinput), [Slider](#slider), [RangeSlider](#rangeslider), [Checkbox](#checkbox), [Switch](#switch), [RadioGroup](#radiogroup), [SegmentedControl](#segmentedcontrol), [FileInput](#fileinput), [Select](#select), [Combobox](#combobox), [MultiSelect](#multiselect), [ColorPicker](#colorpicker), [DatePicker](#datepicker), [DateTimePicker](#datetimepicker), [TimeInput](#timeinput), [DateRangePicker](#daterangepicker), [DateTimeRangePicker](#datetimerangepicker), [Alert](#alert), [Toast](#toast-1), [Popover](#popover), [Modal](#modal), [Drawer](#drawer), [Breadcrumb](#breadcrumb), [Accordion](#accordion), [TreeView](#treeview) and [Scenarios](#scenarios).
|
|
17809
18171
|
|
|
17810
18172
|
##### `FormFieldBoundary`
|
|
17811
18173
|
|
|
@@ -17826,7 +18188,7 @@ function FormFieldBoundary({ children }: {
|
|
|
17826
18188
|
[Stack and Grid](#stack-and-grid) – Children in a grid: a fixed number of columns, a list of column widths,
|
|
17827
18189
|
or as many columns as fit at `minItemWidth`.
|
|
17828
18190
|
|
|
17829
|
-
Used on [Theming](#theming), [Sizes](#sizes), [Language](#language), [Stack and Grid](#stack-and-grid), [Card](#card), [Splitter](#splitter), [Typography](#typography-2), [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), [TimeInput](#timeinput), [DateRangePicker](#daterangepicker), [DateTimeRangePicker](#datetimerangepicker), [Modal](#modal), [Drawer](#drawer), [CommandPalette](#commandpalette), [Breadcrumb](#breadcrumb), [Tabs](#tabs), [TreeView](#treeview), [Stat](#stat), [Meter](#meter) and [Scenarios](#scenarios).
|
|
18191
|
+
Used on [Theming](#theming), [Sizes](#sizes), [Language](#language), [Stack and Grid](#stack-and-grid), [Card](#card), [Splitter](#splitter), [Typography](#typography-2), [Input](#input), [FormField](#formfield), [Textarea](#textarea), [NumberInput](#numberinput), [Slider](#slider), [Checkbox](#checkbox), [Switch](#switch), [RadioGroup](#radiogroup), [FileInput](#fileinput), [Select](#select), [Combobox](#combobox), [MultiSelect](#multiselect), [ColorPicker](#colorpicker), [DatePicker](#datepicker), [DateTimePicker](#datetimepicker), [TimeInput](#timeinput), [DateRangePicker](#daterangepicker), [DateTimeRangePicker](#datetimerangepicker), [Modal](#modal), [Drawer](#drawer), [CommandPalette](#commandpalette), [Breadcrumb](#breadcrumb), [Tabs](#tabs), [TreeView](#treeview), [Stat](#stat), [Meter](#meter) and [Scenarios](#scenarios).
|
|
17830
18192
|
|
|
17831
18193
|
##### `GridGlyph`
|
|
17832
18194
|
|
|
@@ -18079,7 +18441,7 @@ Used on [Splitter](#splitter) and [CommandPalette](#commandpalette).
|
|
|
18079
18441
|
[Stack and Grid](#stack-and-grid) – Children below or beside one another, spaced by a step of the spacing
|
|
18080
18442
|
scale.
|
|
18081
18443
|
|
|
18082
|
-
Used on [UmrissProvider](#umrissprovider), [Theming](#theming), [Sizes](#sizes), [Language](#language), [Stack and Grid](#stack-and-grid), [Divider](#divider), [Card](#card), [Splitter](#splitter), [Typography](#typography-2), [VisuallyHidden](#visuallyhidden), [Button](#button), [IconButton](#iconbutton), [ButtonGroup](#buttongroup), [Input](#input), [FormField](#formfield), [Textarea](#textarea), [NumberInput](#numberinput), [Slider](#slider), [RangeSlider](#rangeslider), [Checkbox](#checkbox), [Switch](#switch), [SegmentedControl](#segmentedcontrol), [FileInput](#fileinput), [Select](#select), [Combobox](#combobox), [MultiSelect](#multiselect), [DatePicker](#datepicker), [DateTimePicker](#datetimepicker), [TimeInput](#timeinput), [DateRangePicker](#daterangepicker), [DateTimeRangePicker](#datetimerangepicker), [Spinner](#spinner), [ProgressBar](#progressbar), [Skeleton](#skeleton), [Alert](#alert), [Toast](#toast-1), [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), [Avatar](#avatar), [Badge](#badge), [Tag](#tag), [Stat](#stat), [Meter](#meter), [Sparkline](#sparkline) and [Scenarios](#scenarios).
|
|
18444
|
+
Used on [UmrissProvider](#umrissprovider), [Theming](#theming), [Sizes](#sizes), [Language](#language), [Stack and Grid](#stack-and-grid), [Divider](#divider), [Card](#card), [Splitter](#splitter), [Typography](#typography-2), [VisuallyHidden](#visuallyhidden), [Button](#button), [IconButton](#iconbutton), [ButtonGroup](#buttongroup), [Input](#input), [FormField](#formfield), [Textarea](#textarea), [NumberInput](#numberinput), [Slider](#slider), [RangeSlider](#rangeslider), [Checkbox](#checkbox), [Switch](#switch), [SegmentedControl](#segmentedcontrol), [FileInput](#fileinput), [Select](#select), [Combobox](#combobox), [MultiSelect](#multiselect), [ColorPicker](#colorpicker), [DatePicker](#datepicker), [DateTimePicker](#datetimepicker), [TimeInput](#timeinput), [DateRangePicker](#daterangepicker), [DateTimeRangePicker](#datetimerangepicker), [Spinner](#spinner), [ProgressBar](#progressbar), [Skeleton](#skeleton), [Alert](#alert), [Toast](#toast-1), [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), [Avatar](#avatar), [Badge](#badge), [Tag](#tag), [Stat](#stat), [Meter](#meter), [Sparkline](#sparkline) and [Scenarios](#scenarios).
|
|
18083
18445
|
|
|
18084
18446
|
##### `Stat`
|
|
18085
18447
|
|
|
@@ -18134,7 +18496,7 @@ Used on [CommandPalette](#commandpalette), [Tabs](#tabs) and [Scenarios](#scenar
|
|
|
18134
18496
|
|
|
18135
18497
|
[Tag](#tag) – A short label on content that the user can remove where you allow it (also called a chip). Reach for it for active filters, chosen values and assignments.
|
|
18136
18498
|
|
|
18137
|
-
Used on [Stack and Grid](#stack-and-grid), [EmptyState](#emptystate), [Tag](#tag) and [Scenarios](#scenarios).
|
|
18499
|
+
Used on [Stack and Grid](#stack-and-grid), [ColorPicker](#colorpicker), [EmptyState](#emptystate), [Tag](#tag) and [Scenarios](#scenarios).
|
|
18138
18500
|
|
|
18139
18501
|
##### `TagGroup`
|
|
18140
18502
|
|
|
@@ -18148,7 +18510,7 @@ Used on [EmptyState](#emptystate), [Tag](#tag) and [Scenarios](#scenarios).
|
|
|
18148
18510
|
[Typography](#typography-2) – Body text from the token set; `as` chooses the element, independent of the
|
|
18149
18511
|
size.
|
|
18150
18512
|
|
|
18151
|
-
Used on [UmrissProvider](#umrissprovider), [Theming](#theming), [Sizes](#sizes), [Language](#language), [Stack and Grid](#stack-and-grid), [Divider](#divider), [Card](#card), [Splitter](#splitter), [Typography](#typography-2), [VisuallyHidden](#visuallyhidden), [Button](#button), [IconButton](#iconbutton), [ButtonGroup](#buttongroup), [Input](#input), [FormField](#formfield), [Textarea](#textarea), [NumberInput](#numberinput), [Slider](#slider), [RangeSlider](#rangeslider), [Checkbox](#checkbox), [Switch](#switch), [SegmentedControl](#segmentedcontrol), [FileInput](#fileinput), [Select](#select), [Combobox](#combobox), [MultiSelect](#multiselect), [DatePicker](#datepicker), [DateTimePicker](#datetimepicker), [TimeInput](#timeinput), [DateRangePicker](#daterangepicker), [DateTimeRangePicker](#datetimerangepicker), [Spinner](#spinner), [ProgressBar](#progressbar), [Skeleton](#skeleton), [Toast](#toast-1), [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), [Benchmark](#benchmark), [Avatar](#avatar), [Badge](#badge), [Tag](#tag), [Stat](#stat), [Meter](#meter), [Sparkline](#sparkline) and [Scenarios](#scenarios).
|
|
18513
|
+
Used on [UmrissProvider](#umrissprovider), [Theming](#theming), [Sizes](#sizes), [Language](#language), [Stack and Grid](#stack-and-grid), [Divider](#divider), [Card](#card), [Splitter](#splitter), [Typography](#typography-2), [VisuallyHidden](#visuallyhidden), [Button](#button), [IconButton](#iconbutton), [ButtonGroup](#buttongroup), [Input](#input), [FormField](#formfield), [Textarea](#textarea), [NumberInput](#numberinput), [Slider](#slider), [RangeSlider](#rangeslider), [Checkbox](#checkbox), [Switch](#switch), [SegmentedControl](#segmentedcontrol), [FileInput](#fileinput), [Select](#select), [Combobox](#combobox), [MultiSelect](#multiselect), [ColorPicker](#colorpicker), [DatePicker](#datepicker), [DateTimePicker](#datetimepicker), [TimeInput](#timeinput), [DateRangePicker](#daterangepicker), [DateTimeRangePicker](#datetimerangepicker), [Spinner](#spinner), [ProgressBar](#progressbar), [Skeleton](#skeleton), [Toast](#toast-1), [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), [Benchmark](#benchmark), [Avatar](#avatar), [Badge](#badge), [Tag](#tag), [Stat](#stat), [Meter](#meter), [Sparkline](#sparkline) and [Scenarios](#scenarios).
|
|
18152
18514
|
|
|
18153
18515
|
##### `Textarea`
|
|
18154
18516
|
|
|
@@ -18894,6 +19256,14 @@ Its table stands on [Card](#card).
|
|
|
18894
19256
|
|
|
18895
19257
|
Its table stands on [Checkbox](#checkbox).
|
|
18896
19258
|
|
|
19259
|
+
##### `ColorPickerProps`
|
|
19260
|
+
|
|
19261
|
+
Its table stands on [ColorPicker](#colorpicker).
|
|
19262
|
+
|
|
19263
|
+
##### `ColorSwatch`
|
|
19264
|
+
|
|
19265
|
+
Its table stands on [ColorPicker](#colorpicker).
|
|
19266
|
+
|
|
18897
19267
|
##### `ComboboxOption`
|
|
18898
19268
|
|
|
18899
19269
|
Its table stands on [Combobox](#combobox).
|
|
@@ -19344,6 +19714,16 @@ maximum fraction digits. An Intl digit option given beside it wins.
|
|
|
19344
19714
|
type NumberOptions = Intl.NumberFormatOptions & { decimals?: number };
|
|
19345
19715
|
```
|
|
19346
19716
|
|
|
19717
|
+
##### `PopoverCloseReason`
|
|
19718
|
+
|
|
19719
|
+
Why a popover asks to close: Escape, a click outside, a scroll
|
|
19720
|
+
(`hideOnScroll`), the anchor clipped away by a scrolling container, a Tab
|
|
19721
|
+
out of the panel (`closeOnTabOut`).
|
|
19722
|
+
|
|
19723
|
+
```ts
|
|
19724
|
+
type PopoverCloseReason = "escape" | "outside" | "scroll" | "clipped" | "tab";
|
|
19725
|
+
```
|
|
19726
|
+
|
|
19347
19727
|
##### `PopoverProps`
|
|
19348
19728
|
|
|
19349
19729
|
Its table stands on [Popover](#popover).
|
|
@@ -19917,6 +20297,29 @@ Everything the library puts out as text.
|
|
|
19917
20297
|
| `dateRangeClear` *required* | `string` | — | |
|
|
19918
20298
|
| `dateTimeRangePanel` *required* | `string` | — | Accessible name of the panel in the range with time of day. |
|
|
19919
20299
|
| `dateTimeRangeClear` *required* | `string` | — | The clearing x of the range with time - kept apart from the range without, so that an application can call the two differently. |
|
|
20300
|
+
| `colorPlaceholder` *required* | `string` | — | |
|
|
20301
|
+
| `colorTrigger` *required* | `(hex: string \| null) => string` | — | The name of the ColorPicker trigger where nothing else names it: the colour as hex, or `null` for none. |
|
|
20302
|
+
| `colorPanel` *required* | `string` | — | Accessible name of the ColorPicker panel, where its field names it no other way. |
|
|
20303
|
+
| `colorHex` *required* | `string` | — | The name and the visible label of the hex field. |
|
|
20304
|
+
| `colorBefore` *required* | `string` | — | |
|
|
20305
|
+
| `colorAfter` *required* | `string` | — | |
|
|
20306
|
+
| `colorNone` *required* | `string` | — | Stands for no colour in the strip that compares the colour the panel opened with and the colour now. |
|
|
20307
|
+
| `colorBeforeAfter` *required* | `(before: string, after: string) => string` | — | The strip as one sentence, for a screen reader. |
|
|
20308
|
+
| `colorDone` *required* | `string` | — | |
|
|
20309
|
+
| `colorSwatches` *required* | `string` | — | Name of the row of the application's own colours. |
|
|
20310
|
+
| `colorSurfaceLight` *required* | `string` | — | The name of core's light surface in the contrast readout. |
|
|
20311
|
+
| `colorSurfaceDark` *required* | `string` | — | The name of core's dark surface in the contrast readout. |
|
|
20312
|
+
| `colorPass` *required* | `string` | — | The verdict of the contrast readout at 3:1 and above, and below it; words, so that the colour is not the only sign. |
|
|
20313
|
+
| `colorFail` *required* | `string` | — | |
|
|
20314
|
+
| `colorRed` *required* | `string` | — | Names of the red, green and blue fields of the ColorPicker panel. |
|
|
20315
|
+
| `colorGreen` *required* | `string` | — | |
|
|
20316
|
+
| `colorBlue` *required* | `string` | — | |
|
|
20317
|
+
| `colorEyedropper` *required* | `string` | — | The button that picks a colour from the screen. |
|
|
20318
|
+
| `colorSquare` *required* | `string` | — | Names of the square and the hue strip, the square's role description, and what they say as value. |
|
|
20319
|
+
| `colorSquareRole` *required* | `string` | — | |
|
|
20320
|
+
| `colorSquareValue` *required* | `(saturation: number, brightness: number) => string` | — | |
|
|
20321
|
+
| `colorHue` *required* | `string` | — | |
|
|
20322
|
+
| `colorHueValue` *required* | `(degrees: number) => string` | — | |
|
|
19920
20323
|
| `previousMonth` *required* | `string` | — | |
|
|
19921
20324
|
| `nextMonth` *required* | `string` | — | |
|
|
19922
20325
|
| `monthSelect` *required* | `string` | — | Name of the calendar head's month list. |
|