@umriss-ui/core 0.34.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +15 -3
- package/dist/core.css +1 -1
- package/dist/core.js +4410 -4330
- package/dist/formats-D0YRBdnl.js +62 -0
- package/dist/index.d.ts +135 -145
- package/dist/wording/de.js +5 -5
- package/docs/llms-full.md +396 -39
- package/package.json +3 -3
- package/dist/formats-DrB9TuzO.js +0 -65
package/docs/llms-full.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @umriss-ui/core 0.
|
|
1
|
+
# @umriss-ui/core 0.35.0
|
|
2
2
|
|
|
3
3
|
> React component library for data-dense dashboards and tools - forms, date pickers, overlays, a tree view and a command palette. Precise, quiet, professional.
|
|
4
4
|
|
|
@@ -2390,7 +2390,7 @@ npm install @umriss-ui/core
|
|
|
2390
2390
|
|
|
2391
2391
|
Demo page: https://romanhaendler.github.io/umriss-ui/core/installation/
|
|
2392
2392
|
|
|
2393
|
-
The command installs the package alone: React
|
|
2393
|
+
The command installs the package alone: React 19 or newer is its only peer and stays the application's own. Importing a component brings its stylesheet along; `@umriss-ui/core/styles.css` stays exported for setups that link stylesheets by hand. The styles touch nothing outside the components: no rule on `html`, `body` or `*` ([ADR-0021](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0021-the-styles-load-themselves-and-touch-nothing-else.md)).
|
|
2394
2394
|
|
|
2395
2395
|
Colours, sizes, fonts and light and dark are tokens, `--u-…` custom properties you override with ordinary CSS: [Theming](#/theming) lists them. The fonts are the application's: the tokens name Geist first and fall back to the system fonts, and nothing is loaded. For Geist, install `@fontsource/geist-sans` (400, 500, 600) and `@fontsource/geist-mono` (400).
|
|
2396
2396
|
|
|
@@ -4773,6 +4773,7 @@ The keys of [Button](#/button/keyboard-button) apply here.
|
|
|
4773
4773
|
| `align` | `CSSProperties["alignItems"]` | — | Alignment across the direction – `alignItems` unchanged.<br>Shown in: [A row](#/stack-and-grid/a-row), [Gaps](#/stack-and-grid/gaps), [A tour summary](#/stack-and-grid/a-tour-summary) and 77 more |
|
|
4774
4774
|
| `justify` | `CSSProperties["justifyContent"]` | — | Distribution along the direction – `justifyContent` unchanged.<br>Shown in: [A row](#/stack-and-grid/a-row), [A tour summary](#/stack-and-grid/a-tour-summary), [Name the same action in every row (VisuallyHidden)](#/visuallyhidden/actions-in-rows) and 9 more |
|
|
4775
4775
|
| `wrap` | `boolean` | `false` | Lets the children wrap when the line does not suffice.<br>Shown in: [Gaps](#/stack-and-grid/gaps), [Wrapping](#/stack-and-grid/wrapping), [Sized to the value (Sizes)](#/sizes/sized-to-the-value) and 32 more |
|
|
4776
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
4776
4777
|
|
|
4777
4778
|
Also takes every attribute of `<div>`.
|
|
4778
4779
|
|
|
@@ -4783,6 +4784,7 @@ Also takes every attribute of `<div>`.
|
|
|
4783
4784
|
| `columns` | `number \| readonly `[`GridColumnWidth`](#type-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/fixed-columns), [Columns of their own widths](#/stack-and-grid/columns-of-their-own-widths), [A token for one region (Theming)](#/theming/a-token-for-one-region) and 5 more |
|
|
4784
4785
|
| `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/columns-by-width), [A tour summary](#/stack-and-grid/a-tour-summary), [A dark region (Theming)](#/theming/a-dark-region) and 51 more |
|
|
4785
4786
|
| `gap` | [`SpaceStep`](#type-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/fixed-columns), [Columns by width](#/stack-and-grid/columns-by-width), [Columns of their own widths](#/stack-and-grid/columns-of-their-own-widths) and 58 more |
|
|
4787
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
4786
4788
|
|
|
4787
4789
|
Also takes every attribute of `<div>`.
|
|
4788
4790
|
|
|
@@ -4915,6 +4917,7 @@ The keys of [Button](#/button/keyboard-button) apply here.
|
|
|
4915
4917
|
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | Horizontally it separates rows, vertically it separates columns.<br>Shown in: [Configurator](#/divider/configurator-divider), [Upright in a bar](#/divider/upright-in-a-bar) |
|
|
4916
4918
|
| `strong` | `boolean` | `false` | A stronger line - for section boundaries rather than row separation.<br>Shown in: [Configurator](#/divider/configurator-divider), [Strength and label](#/divider/strength-and-label), [Upright in a bar](#/divider/upright-in-a-bar) |
|
|
4917
4919
|
| `label` | `ReactNode` | — | A label in the middle. It makes the line a named separator.<br>Shown in: [Configurator](#/divider/configurator-divider), [Strength and label](#/divider/strength-and-label) |
|
|
4920
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
4918
4921
|
|
|
4919
4922
|
Also takes every attribute of `<div>`.
|
|
4920
4923
|
|
|
@@ -5186,6 +5189,7 @@ The keys of [Button](#/button/keyboard-button) apply here.
|
|
|
5186
5189
|
| `defaultCollapsed` | `boolean` | `false` | Initial state of the collapse mechanism; afterwards it belongs to the card. Only effective together with `collapsible`.<br>Shown in: [Fold the body](#/card/fold-the-body) |
|
|
5187
5190
|
| `collapsed` | `boolean` | — | Controlled: whether the body is folded away - for a card folded from outside, or one whose state is kept in an address. Only effective together with `collapsible`.<br>Shown in: [Fold from outside](#/card/fold-from-outside) |
|
|
5188
5191
|
| `onCollapsedChange` | `(collapsed: boolean) => void` | — | Reports the wish of the header's button. Controlled, the card folds only once `collapsed` follows; uncontrolled it is merely a message.<br>Shown in: [Fold from outside](#/card/fold-from-outside) |
|
|
5192
|
+
| `ref` | `Ref<HTMLElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
5189
5193
|
|
|
5190
5194
|
Also takes every attribute of the rendered element.
|
|
5191
5195
|
|
|
@@ -5197,6 +5201,7 @@ Also takes every attribute of the rendered element.
|
|
|
5197
5201
|
| `eyebrow` | `ReactNode` | — | Small all-caps label above the title, e.g. a category.<br>Shown in: [Eyebrow and actions](#/card/eyebrow-and-actions), [A flush body](#/card/a-flush-body), [Fold the body](#/card/fold-the-body) and 17 more |
|
|
5198
5202
|
| `actions` | `ReactNode` | — | Right-aligned area, e.g. buttons or badges.<br>Shown in: [Eyebrow and actions](#/card/eyebrow-and-actions), [Fold the body](#/card/fold-the-body), [Cards on a dashboard](#/card/cards-on-a-dashboard) and 13 more |
|
|
5199
5203
|
| `divider` | `boolean` | `false` | A dividing line below the head. Only set it where the body needs it - typically with flush data (flush tables, logs). With normal content the white space carries the hierarchy on its own.<br>Shown in: [A flush body](#/card/a-flush-body) |
|
|
5204
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
5200
5205
|
|
|
5201
5206
|
Also takes every attribute of `<div>` – without `title`.
|
|
5202
5207
|
|
|
@@ -5205,6 +5210,7 @@ Also takes every attribute of `<div>` – without `title`.
|
|
|
5205
5210
|
| Prop | Type | Default | Description |
|
|
5206
5211
|
|---|---|---|---|
|
|
5207
5212
|
| `flush` | `boolean` | `false` | Removes the inner padding, e.g. for flush tables.<br>Shown in: [A flush body](#/card/a-flush-body) |
|
|
5213
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
5208
5214
|
|
|
5209
5215
|
Also takes every attribute of `<div>`.
|
|
5210
5216
|
|
|
@@ -5623,6 +5629,7 @@ export default function ThreePanes() {
|
|
|
5623
5629
|
| `step` | `number` | `5` | How far an arrow key moves the separator, in per cent.<br>Shown in: [Keep the share](#/splitter/keep-the-share) |
|
|
5624
5630
|
| `separatorLabel` | `string` | the wording's "Resize the panes" | The separator's name. The APG names it after the first pane ("Trend").<br>Shown in: [One above the other](#/splitter/one-above-the-other), [Keep the share](#/splitter/keep-the-share), [Three panes](#/splitter/three-panes) |
|
|
5625
5631
|
| `children` *required* | `[ReactNode, ReactNode]` | — | The first pane and the second, in this order.<br>Shown in: [Two panes](#/splitter/two-panes), [One above the other](#/splitter/one-above-the-other), [Keep the share](#/splitter/keep-the-share) and 1 more |
|
|
5632
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
5626
5633
|
|
|
5627
5634
|
###### Events
|
|
5628
5635
|
|
|
@@ -5996,13 +6003,14 @@ export default function IncidentSummary() {
|
|
|
5996
6003
|
|
|
5997
6004
|
| Prop | Type | Default | Description |
|
|
5998
6005
|
|---|---|---|---|
|
|
5999
|
-
| `as` | `ElementType` | `"p"` | Element to render as.<br>Shown in: [Tones and weights](#/typography/tones-and-weights), [Set an incident summary](#/typography/incident-summary), [Use the language in your own components (Language)](#/language/own-components) and
|
|
6006
|
+
| `as` | `ElementType` | `"p"` | Element to render as.<br>Shown in: [Tones and weights](#/typography/tones-and-weights), [Set an incident summary](#/typography/incident-summary), [Use the language in your own components (Language)](#/language/own-components) and 17 more |
|
|
6000
6007
|
| `size` | [`TextSize`](#type-TextSize)<br>`"xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `"md"` | Type size from the token set. It is independent of the element: a `p` may be small without becoming a different element.<br>Shown in: [Configurator](#/typography/configurator-typography), [Sizes](#/typography/sizes), [Tones and weights](#/typography/tones-and-weights) and 128 more |
|
|
6001
6008
|
| `weight` | [`TextWeight`](#type-TextWeight)<br>`"regular" \| "medium" \| "semibold"` | `"regular"` | Font weight from the token set.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tones and weights](#/typography/tones-and-weights), [Tracking and leading](#/typography/tracking-and-leading) and 15 more |
|
|
6002
6009
|
| `tone` | [`TextTone`](#type-TextTone)<br>`"default" \| "secondary" \| "muted"` | `"default"` | How loud the text is. `secondary` and `muted` step back without falling below the contrast threshold.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tones and weights](#/typography/tones-and-weights), [Tracking and leading](#/typography/tracking-and-leading) and 93 more |
|
|
6003
|
-
| `mono` | `boolean` | `false` | Geist Mono with tabular figures – for numbers and identifiers.<br>Shown in: [Configurator](#/typography/configurator-typography), [Numbers and identifiers](#/typography/numbers), [Handle long values](#/typography/long-values) and
|
|
6010
|
+
| `mono` | `boolean` | `false` | Geist Mono with tabular figures – for numbers and identifiers.<br>Shown in: [Configurator](#/typography/configurator-typography), [Numbers and identifiers](#/typography/numbers), [Handle long values](#/typography/long-values) and 31 more |
|
|
6004
6011
|
| `tracking` | [`TextTracking`](#type-TextTracking)<br>`"normal" \| "tight" \| "display" \| "caps"` | `"normal"` | Letter spacing from the token set. `caps` belongs with letterspaced capitals.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tracking and leading](#/typography/tracking-and-leading), [Set an incident summary](#/typography/incident-summary) |
|
|
6005
6012
|
| `leading` | [`TextLeading`](#type-TextLeading)<br>`"normal" \| "tight"` | `"normal"` | Line spacing. `tight` for multi-line headings and key figures, where the normal spacing lets the lines fall apart.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tracking and leading](#/typography/tracking-and-leading) |
|
|
6013
|
+
| `ref` | `Ref<HTMLElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
6006
6014
|
|
|
6007
6015
|
Also takes every attribute of the rendered element.
|
|
6008
6016
|
|
|
@@ -6014,6 +6022,7 @@ Also takes every attribute of the rendered element.
|
|
|
6014
6022
|
| `size` | [`TextSize`](#type-TextSize)<br>`"xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | the size matching the level | Optical size; independent of the level.<br>Shown in: [Tones and weights](#/typography/tones-and-weights), [Choose the level apart from the size](#/typography/level-and-size), [Set an incident summary](#/typography/incident-summary) and 4 more |
|
|
6015
6023
|
| `weight` | [`TextWeight`](#type-TextWeight)<br>`"regular" \| "medium" \| "semibold"` | `"semibold"` | Font weight from the token set.<br>Shown in: [Tones and weights](#/typography/tones-and-weights) |
|
|
6016
6024
|
| `tone` | [`TextTone`](#type-TextTone)<br>`"default" \| "secondary" \| "muted"` | `"default"` | How loud the heading is.<br>Shown in: [Choose the level apart from the size](#/typography/level-and-size) |
|
|
6025
|
+
| `ref` | `Ref<HTMLHeadingElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
6017
6026
|
|
|
6018
6027
|
Also takes every attribute of the heading.
|
|
6019
6028
|
|
|
@@ -6023,6 +6032,7 @@ Also takes every attribute of the heading.
|
|
|
6023
6032
|
|---|---|---|---|
|
|
6024
6033
|
| `size` | [`TextSize`](#type-TextSize)<br>`"xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `"md"` | Size from the token set – a link has to match its body text.<br>Shown in: [Watch a kiln line over a shift (Scenarios)](#/scenarios/watch-a-kiln-line) |
|
|
6025
6034
|
| `external` | `boolean` | `false` | Opens in a new tab and sets the necessary protective attributes.<br>Shown in: [Link out of the application](#/typography/external-link), [Set an incident summary](#/typography/incident-summary) |
|
|
6035
|
+
| `ref` | `Ref<HTMLAnchorElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
6026
6036
|
|
|
6027
6037
|
Also takes every attribute of `<a>`.
|
|
6028
6038
|
|
|
@@ -6193,8 +6203,9 @@ export default function ActionsInRows() {
|
|
|
6193
6203
|
|---|---|---|---|
|
|
6194
6204
|
| `as` | `E` | `"span"` | Element to render as.<br>Shown in: [Add a skip link](#/visuallyhidden/skip-link) |
|
|
6195
6205
|
| `focusable` | `boolean` | `false` | Becomes visible as soon as the content receives the focus (skip link).<br>Shown in: [Add a skip link](#/visuallyhidden/skip-link) |
|
|
6206
|
+
| `ref` | `Ref<HTMLElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
6196
6207
|
|
|
6197
|
-
Also takes every attribute of the chosen element – without `as`.
|
|
6208
|
+
Also takes every attribute of the chosen element – without `as`, `ref`.
|
|
6198
6209
|
|
|
6199
6210
|
#### Known limits
|
|
6200
6211
|
|
|
@@ -6489,8 +6500,9 @@ Under forced colours every variant keeps an outline where its edge would lie, an
|
|
|
6489
6500
|
| Prop | Type | Default | Description |
|
|
6490
6501
|
|---|---|---|---|
|
|
6491
6502
|
| `variant` | [`ButtonVariant`](#type-ButtonVariant)<br>`"primary" \| "secondary" \| "ghost" \| "plain" \| "danger"` | `"secondary"` | How loud the button is. `primary` exactly once per surface - two main actions side by side are no longer a main action. `ghost` is quiet in the accent, `plain` quiet and neutral.<br>Shown in: [Configurator](#/button/configurator-button), [Variants](#/button/variants), [Sizes](#/button/sizes) and 51 more |
|
|
6492
|
-
| `size` | [`ButtonSize`](#type-ButtonSize)<br>`"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for buttons in header bars and table rows, `md` otherwise.<br>Shown in: [Configurator](#/button/configurator-button), [Sizes](#/button/sizes), [Add an icon](#/button/with-an-icon) and
|
|
6503
|
+
| `size` | [`ButtonSize`](#type-ButtonSize)<br>`"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for buttons in header bars and table rows, `md` otherwise.<br>Shown in: [Configurator](#/button/configurator-button), [Sizes](#/button/sizes), [Add an icon](#/button/with-an-icon) and 56 more |
|
|
6493
6504
|
| `loading` | `boolean` | `false` | Shows a loading indicator and locks the button.<br>Shown in: [Configurator](#/button/configurator-button), [Loading and disabled](#/button/loading-and-disabled), [Submit a form](#/button/submit-a-form) and 4 more |
|
|
6505
|
+
| `ref` | `Ref<HTMLButtonElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
6494
6506
|
|
|
6495
6507
|
Also takes every attribute of `<button>`.
|
|
6496
6508
|
|
|
@@ -6841,8 +6853,9 @@ export default function Toolbar() {
|
|
|
6841
6853
|
|---|---|---|---|
|
|
6842
6854
|
| `children` *required* | `ReactNode` | — | The icon: an SVG, a glyph of the set or an icon font's element. The button sets its size - `--u-icon-size`, `--u-icon-size-sm` at `sm`.<br>Shown in: [Configurator](#/iconbutton/configurator-iconbutton), [Name the icon](#/iconbutton/name-the-icon), [Variants](#/iconbutton/variants) and 5 more |
|
|
6843
6855
|
| `variant` | [`ButtonVariant`](#type-ButtonVariant)<br>`"primary" \| "secondary" \| "ghost" \| "plain" \| "danger"` | `"plain"` | How loud the button is; `plain` is quiet and neutral, and the rest mean what they mean on a `Button`.<br>Shown in: [Configurator](#/iconbutton/configurator-iconbutton), [Variants](#/iconbutton/variants), [Sizes](#/iconbutton/sizes) and 3 more |
|
|
6844
|
-
| `size` | [`ButtonSize`](#type-ButtonSize)<br>`"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for buttons in header bars and table rows, `md` otherwise. From `ButtonProps`.<br>Shown in: [Configurator](#/iconbutton/configurator-iconbutton), [Sizes](#/iconbutton/sizes), [Build a toolbar](#/iconbutton/a-toolbar) and
|
|
6856
|
+
| `size` | [`ButtonSize`](#type-ButtonSize)<br>`"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for buttons in header bars and table rows, `md` otherwise. From `ButtonProps`.<br>Shown in: [Configurator](#/iconbutton/configurator-iconbutton), [Sizes](#/iconbutton/sizes), [Build a toolbar](#/iconbutton/a-toolbar) and 56 more |
|
|
6845
6857
|
| `loading` | `boolean` | `false` | Shows a loading indicator and locks the button. From `ButtonProps`.<br>Shown in: [Configurator](#/iconbutton/configurator-iconbutton), [Loading and disabled](#/iconbutton/loading-and-disabled), [Configurator (Button)](#/button/configurator-button) and 4 more |
|
|
6858
|
+
| `ref` | `Ref<HTMLButtonElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
6846
6859
|
|
|
6847
6860
|
###### Accessibility
|
|
6848
6861
|
|
|
@@ -7184,6 +7197,7 @@ export default function InvoiceToolbar() {
|
|
|
7184
7197
|
| Prop | Type | Default | Description |
|
|
7185
7198
|
|---|---|---|---|
|
|
7186
7199
|
| `size` | [`ButtonSize`](#type-ButtonSize)<br>`"sm" \| "md"` | the size around it, else `"md"` | The size of the buttons in it that do not say their own - one group, one height.<br>Shown in: [Variants and sizes](#/buttongroup/variants-and-sizes) |
|
|
7200
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
7187
7201
|
|
|
7188
7202
|
###### Accessibility
|
|
7189
7203
|
|
|
@@ -7204,6 +7218,7 @@ Also takes every attribute of `<div>`.
|
|
|
7204
7218
|
| `menuLabel` | `string` | the wording's "More actions" | Label of the trigger. |
|
|
7205
7219
|
| `align` | `"start" \| "end"` | `"end"` | Alignment of the menu relative to the trigger.<br>Shown in: [Offer variants of the main action](#/buttongroup/split-button) |
|
|
7206
7220
|
| `loading` | `boolean` | `false` | Shows a loading indicator and locks the button. From `ButtonProps`.<br>Shown in: [Configurator (Button)](#/button/configurator-button), [Loading and disabled (Button)](#/button/loading-and-disabled), [Submit a form (Button)](#/button/submit-a-form) and 4 more |
|
|
7221
|
+
| `ref` | `Ref<HTMLButtonElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
7207
7222
|
|
|
7208
7223
|
###### Events
|
|
7209
7224
|
|
|
@@ -7519,6 +7534,7 @@ export default function TakeADeliveryAddress() {
|
|
|
7519
7534
|
| `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](#/input/configurator-input), [With an error](#/input/with-an-error), [With an error (TreeView)](#/treeview/with-an-error) |
|
|
7520
7535
|
| `numeric` | `boolean` | `false` | Right-aligned tabular figures in Geist Mono, e.g. for key figures.<br>Shown in: [Configurator](#/input/configurator-input), [Align reference numbers](#/input/align-reference-numbers), [Take a delivery address](#/input/take-a-delivery-address) and 2 more |
|
|
7521
7536
|
| `clearable` | `boolean` | `false` | Shows a gently appearing cross where there is content, which clears the input. Requires a controlled field (value) and onClear.<br>Shown in: [Clear the field](#/input/clear-the-field), [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still) |
|
|
7537
|
+
| `ref` | `Ref<HTMLInputElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
7522
7538
|
|
|
7523
7539
|
###### Events
|
|
7524
7540
|
|
|
@@ -7717,6 +7733,7 @@ The keys of [Input](#/input/keyboard-input), [NumberInput](#/numberinput/keyboar
|
|
|
7717
7733
|
| `error` | `ReactNode` | — | Error message; it marks the field as invalid at the same time.<br>Shown in: [Configurator](#/formfield/configurator-formfield), [Show an error](#/formfield/show-an-error), [Check an invoice on submit](#/formfield/check-an-invoice-on-submit) and 22 more |
|
|
7718
7734
|
| `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/configurator-formfield), [Mark a field as required](#/formfield/mark-a-field-as-required), [Check an invoice on submit](#/formfield/check-an-invoice-on-submit) and 9 more |
|
|
7719
7735
|
| `fieldId` | `string` | — | Optional: a fixed id for the input element (instead of a generated one).<br>Shown in: [Sum up a form's errors (Alert)](#/alert/above-a-form) |
|
|
7736
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
7720
7737
|
|
|
7721
7738
|
Also takes every attribute of `<div>`.
|
|
7722
7739
|
|
|
@@ -7907,6 +7924,7 @@ With `showCount` the characters left stand in a polite live region: a screen rea
|
|
|
7907
7924
|
| `maxRows` | `number` | — | Upper bound for `autoGrow` in rows; beyond it the field scrolls.<br>Shown in: [Grow with the text](#/textarea/grow-with-the-text), [Resolve an incident (Scenarios)](#/scenarios/resolve-an-incident), [Approve spending against a budget (Scenarios)](#/scenarios/approve-spending) |
|
|
7908
7925
|
| `showCount` | `boolean` | `false` | Shows at the bottom right how many characters still fit. Needs `maxLength`.<br>Shown in: [Count the characters](#/textarea/count-the-characters) |
|
|
7909
7926
|
| `resize` | `"none" \| "vertical"` | `"none"` while the field grows by itself, else `"vertical"` | Whether the browser's handle for dragging is offered.<br>Shown in: [Configurator](#/textarea/configurator-textarea) |
|
|
7927
|
+
| `ref` | `Ref<HTMLTextAreaElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
7910
7928
|
|
|
7911
7929
|
Also takes every attribute of `<textarea>` – without `cols`.
|
|
7912
7930
|
|
|
@@ -8143,6 +8161,7 @@ export default function PriceAnInvoiceLine() {
|
|
|
8143
8161
|
| `size` | `"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for a toolbar and dense forms, `md` otherwise.<br>Shown in: [Configurator](#/numberinput/configurator-numberinput), [States](#/numberinput/states), [Set up a team (Scenarios)](#/scenarios/set-up-a-team) |
|
|
8144
8162
|
| `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/configurator-numberinput), [Sized to the value (Sizes)](#/sizes/sized-to-the-value) |
|
|
8145
8163
|
| `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/configurator-numberinput), [With an error](#/numberinput/with-an-error) |
|
|
8164
|
+
| `ref` | `Ref<HTMLInputElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
8146
8165
|
|
|
8147
8166
|
###### Events
|
|
8148
8167
|
|
|
@@ -8327,6 +8346,7 @@ export default function SplitABudget() {
|
|
|
8327
8346
|
| `marks` | `readonly `[`SliderMark`](#type-SliderMark)`[]` | — | Values marked on the track; an object with a `label` writes the word beneath its mark. A mark shows a value, it does not catch the thumb.<br>Shown in: [Units and marks](#/slider/units-and-marks), [Set roughly, then exactly](#/slider/set-roughly-then-exactly), [Split a budget](#/slider/split-a-budget) and 1 more |
|
|
8328
8347
|
| `format` | `(value: number) => string` | the number in the formats' notation, with as many decimals as the step has | The value as text: for the readout and for the screen reader (`aria-valuetext`).<br>Shown in: [Units and marks](#/slider/units-and-marks), [Set roughly, then exactly](#/slider/set-roughly-then-exactly), [Split a budget](#/slider/split-a-budget) and 3 more |
|
|
8329
8348
|
| `showValue` | `boolean` | `true` | The value in mono beside the track.<br>Shown in: [Configurator](#/slider/configurator-slider), [Units and marks](#/slider/units-and-marks), [Set roughly, then exactly](#/slider/set-roughly-then-exactly) and 1 more |
|
|
8349
|
+
| `ref` | `Ref<HTMLInputElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
8330
8350
|
|
|
8331
8351
|
###### Events
|
|
8332
8352
|
|
|
@@ -8469,6 +8489,7 @@ export default function SelectAllWithAMixedState() {
|
|
|
8469
8489
|
|---|---|---|---|
|
|
8470
8490
|
| `label` | `ReactNode` | — | Label to the right of the checkbox.<br>Shown in: [Configurator](#/checkbox/configurator-checkbox), [Checkbox](#/checkbox/checkbox), [States](#/checkbox/states) and 10 more |
|
|
8471
8491
|
| `indeterminate` | `boolean` | `false` | Partially checked (e.g. "select all" with a mixed selection).<br>Shown in: [Configurator](#/checkbox/configurator-checkbox), [States](#/checkbox/states), [Select all with a mixed state](#/checkbox/select-all-with-a-mixed-state) |
|
|
8492
|
+
| `ref` | `Ref<HTMLInputElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
8472
8493
|
|
|
8473
8494
|
Also takes every attribute of `<input>` – without `size`, `type`.
|
|
8474
8495
|
|
|
@@ -8674,6 +8695,7 @@ export default function SettingsOfAService() {
|
|
|
8674
8695
|
| `label` | `ReactNode` | — | Label to the right of the switch.<br>Shown in: [Configurator](#/switch/configurator-switch), [On and off](#/switch/on-and-off), [States and sizes](#/switch/states-and-sizes) and 12 more |
|
|
8675
8696
|
| `size` | `"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for a toolbar and dense forms, `md` otherwise.<br>Shown in: [Configurator](#/switch/configurator-switch), [States and sizes](#/switch/states-and-sizes) |
|
|
8676
8697
|
| `invalid` | `boolean` | — | Marks the switch as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`.<br>Shown in: [Configurator](#/switch/configurator-switch), [With an error](#/switch/with-an-error) |
|
|
8698
|
+
| `ref` | `Ref<HTMLInputElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
8677
8699
|
|
|
8678
8700
|
Also takes every attribute of `<input>` – without `role`, `size`, `type`.
|
|
8679
8701
|
|
|
@@ -8838,6 +8860,7 @@ export default function States() {
|
|
|
8838
8860
|
| `size` | `"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for a toolbar and dense forms, `md` otherwise.<br>Shown in: [Configurator](#/radiogroup/configurator-radiogroup), [States](#/radiogroup/states) |
|
|
8839
8861
|
| `disabled` | `boolean` | `false` | Disables the whole group. `RadioOption` disables single possibilities.<br>Shown in: [Configurator](#/radiogroup/configurator-radiogroup), [States](#/radiogroup/states) |
|
|
8840
8862
|
| `name` | `string` | a generated one | Name of the radio group within the form. |
|
|
8863
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
8841
8864
|
|
|
8842
8865
|
###### Events
|
|
8843
8866
|
|
|
@@ -9124,6 +9147,7 @@ export default function DrawnAsAField() {
|
|
|
9124
9147
|
| `fill` | `boolean` | `false` | Takes the whole width its place gives it, as a field in a column does, and shares it equally between the segments. Without it the control is as wide as its words.<br>Shown in: [Configurator](#/segmentedcontrol/configurator-segmentedcontrol), [A theme switch](#/segmentedcontrol/a-theme-switch) |
|
|
9125
9148
|
| `disabled` | `boolean` | `false` | Disables the whole control. `SegmentedOption` disables single possibilities.<br>Shown in: [Configurator](#/segmentedcontrol/configurator-segmentedcontrol), [States and sizes](#/segmentedcontrol/states-and-sizes) |
|
|
9126
9149
|
| `name` | `string` | a generated one | Name of the radio group within the form. |
|
|
9150
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
9127
9151
|
|
|
9128
9152
|
###### Events
|
|
9129
9153
|
|
|
@@ -9384,6 +9408,7 @@ export default function ImportBudgets() {
|
|
|
9384
9408
|
|---|---|---|---|
|
|
9385
9409
|
| `value` | `readonly File[]` | — | Controlled: the chosen files. Uncontrolled, the input keeps its own and starts empty.<br>Shown in: [Several files](#/fileinput/several-files), [With an error](#/fileinput/with-an-error), [Require a file before sending](#/fileinput/require-a-file-before-sending) and 1 more |
|
|
9386
9410
|
| `invalid` | `boolean` | — | Marks the input as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`.<br>Shown in: [With an error](#/fileinput/with-an-error) |
|
|
9411
|
+
| `ref` | `Ref<HTMLInputElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
9387
9412
|
|
|
9388
9413
|
###### Events
|
|
9389
9414
|
|
|
@@ -9581,6 +9606,7 @@ export default function ClearTheChoice() {
|
|
|
9581
9606
|
| `chars` | `number` | — | The width in characters - room for the chosen option; the field adds its own padding, chevron and cross. Given, the field is that wide wherever it stands, and never wider than its place. Without it the field fills its place, and is 20 characters wide where the place asks - never as wide as its longest option.<br>Shown in: [Configurator](#/select/configurator-select), [A row of fields (Sizes)](#/sizes/a-row-of-fields) |
|
|
9582
9607
|
| `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](#/select/configurator-select), [With an error](#/select/with-an-error) |
|
|
9583
9608
|
| `clearable` | `boolean` | `false` | Shows a × once a selection has been made, which fades in on hover/focus and empties the selection. Requires a controlled field (value) and onClear; sensible for optional selects with a placeholder option.<br>Shown in: [Clear the choice](#/select/clear-the-choice) |
|
|
9609
|
+
| `ref` | `Ref<HTMLSelectElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
9584
9610
|
|
|
9585
9611
|
###### Events
|
|
9586
9612
|
|
|
@@ -9839,6 +9865,7 @@ export default function AssignAnIncident() {
|
|
|
9839
9865
|
| `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](#/combobox/configurator-combobox), [With an error](#/combobox/with-an-error) |
|
|
9840
9866
|
| `emptyText` | `string` | — | Text shown for an empty search result.<br>Shown in: [States](#/combobox/states) |
|
|
9841
9867
|
| `clearable` | `boolean` | `false` | Shows a cross on selection or input that clears field and selection.<br>Shown in: [Configurator](#/combobox/configurator-combobox), [Combobox](#/combobox/pick-a-driver), [Assign an incident](#/combobox/assign-an-incident) and 2 more |
|
|
9868
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
9842
9869
|
|
|
9843
9870
|
###### Events
|
|
9844
9871
|
|
|
@@ -10119,6 +10146,7 @@ export default function FilterIncidentsByService() {
|
|
|
10119
10146
|
| `disabled` | `boolean` | `false` | Locks field and panel.<br>Shown in: [Configurator](#/multiselect/configurator-multiselect), [States](#/multiselect/states), [Dispatch a tour (Scenarios)](#/scenarios/dispatch-a-tour) |
|
|
10120
10147
|
| `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/configurator-multiselect), [With an error](#/multiselect/with-an-error) |
|
|
10121
10148
|
| `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/configurator-multiselect), [Filter incidents by service](#/multiselect/filter-incidents-by-service), [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still) |
|
|
10149
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
10122
10150
|
|
|
10123
10151
|
###### Events
|
|
10124
10152
|
|
|
@@ -10304,6 +10332,7 @@ export default function CheckADueDate() {
|
|
|
10304
10332
|
| `size` | `"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for a toolbar and dense forms, `md` otherwise.<br>Shown in: [Configurator](#/datepicker/configurator-datepicker), [States](#/datepicker/states) |
|
|
10305
10333
|
| `chars` | `number` | — | The width in characters - room for the value; the field adds its own padding, glyph and cross. 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 its longest value in the formats in use, so a date never truncates.<br>Shown in: [Configurator](#/datepicker/configurator-datepicker) |
|
|
10306
10334
|
| `clearable` | `boolean` | `false` | Shows a cross where a value is set, which fades in on hover/focus and clears the value.<br>Shown in: [Configurator](#/datepicker/configurator-datepicker), [Pick a day](#/datepicker/pick-a-day), [States](#/datepicker/states) and 4 more |
|
|
10335
|
+
| `ref` | `Ref<HTMLSpanElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
10307
10336
|
|
|
10308
10337
|
###### Events
|
|
10309
10338
|
|
|
@@ -10475,6 +10504,7 @@ export default function WithAnError() {
|
|
|
10475
10504
|
| `chars` | `number` | — | The width in characters - room for the value; the field adds its own padding, glyph and cross. 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 its longest value in the formats in use, so a date never truncates.<br>Shown in: [Configurator](#/datetimepicker/configurator-datetimepicker) |
|
|
10476
10505
|
| `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](#/datetimepicker/configurator-datetimepicker), [With an error](#/datetimepicker/with-an-error) |
|
|
10477
10506
|
| `clearable` | `boolean` | `false` | Shows a cross where a value is set, which fades in on hover/focus and clears the value.<br>Shown in: [Configurator](#/datetimepicker/configurator-datetimepicker), [Set an instant](#/datetimepicker/set-an-instant), [States](#/datetimepicker/states) |
|
|
10507
|
+
| `ref` | `Ref<HTMLSpanElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
10478
10508
|
|
|
10479
10509
|
###### Events
|
|
10480
10510
|
|
|
@@ -10671,6 +10701,7 @@ export default function WithAnError() {
|
|
|
10671
10701
|
| `chars` | `number` | — | The width in characters - room for the value; the field adds its own padding, glyph and cross. 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 its longest value in the formats in use, so a date never truncates.<br>Shown in: [Configurator](#/daterangepicker/configurator-daterangepicker) |
|
|
10672
10702
|
| `clearable` | `boolean` | `false` | Shows a cross where a value is set, which fades in on hover/focus and clears the value.<br>Shown in: [Configurator](#/daterangepicker/configurator-daterangepicker), [A span of days](#/daterangepicker/a-span-of-days), [Presets](#/daterangepicker/presets) and 2 more |
|
|
10673
10703
|
| `presets` | [`RangePreset`](#type-RangePreset)`[]` | `DEFAULT_PRESETS`, in the wording's labels | The quick-select column in the panel. An empty array hides the column.<br>Shown in: [Presets](#/daterangepicker/presets) |
|
|
10704
|
+
| `ref` | `Ref<HTMLSpanElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
10674
10705
|
|
|
10675
10706
|
###### Events
|
|
10676
10707
|
|
|
@@ -10885,6 +10916,7 @@ export default function WithAnError() {
|
|
|
10885
10916
|
| `chars` | `number` | — | The width in characters - room for the value; the field adds its own padding, glyph and cross. 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 its longest value in the formats in use, so a date never truncates.<br>Shown in: [Configurator](#/datetimerangepicker/configurator-datetimerangepicker) |
|
|
10886
10917
|
| `clearable` | `boolean` | `false` | Shows a cross where a value is set, which fades in on hover/focus and clears the value.<br>Shown in: [Configurator](#/datetimerangepicker/configurator-datetimerangepicker), [A downtime window](#/datetimerangepicker/a-downtime-window), [States](#/datetimerangepicker/states) |
|
|
10887
10918
|
| `presets` | [`RangePreset`](#type-RangePreset)`[]` | `DEFAULT_PRESETS`, in the wording's labels | The quick-select column in the panel; presets apply for the whole day and close immediately. An empty array hides the column.<br>Shown in: [With seconds](#/datetimerangepicker/with-seconds) |
|
|
10919
|
+
| `ref` | `Ref<HTMLSpanElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
10888
10920
|
|
|
10889
10921
|
###### Events
|
|
10890
10922
|
|
|
@@ -11066,6 +11098,7 @@ With reduced motion it turns at less than half its speed instead of stopping, so
|
|
|
11066
11098
|
| Prop | Type | Default | Description |
|
|
11067
11099
|
|---|---|---|---|
|
|
11068
11100
|
| `size` | `number` | `14` | Edge length in pixels.<br>Shown in: [Sizes](#/spinner/sizes), [Colour](#/spinner/colour) |
|
|
11101
|
+
| `ref` | `Ref<SVGSVGElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
11069
11102
|
|
|
11070
11103
|
Also takes every attribute of `<svg>`.
|
|
11071
11104
|
|
|
@@ -11250,6 +11283,7 @@ Under forced colours the track takes an edge and the fill the system's selection
|
|
|
11250
11283
|
| `label` | `string` | the wording's "Progress" | What is progressing, e.g. "Import of the invoice records". A progress bar needs a name from the author.<br>Shown in: [How far a job has come](#/progressbar/how-far), [Count instead of a share](#/progressbar/a-count), [Run without a known end](#/progressbar/without-an-end) and 3 more |
|
|
11251
11284
|
| `valueText` | `string` | — | What a screen reader says instead of the percentage, where a count says it better - "3 of 12 files".<br>Shown in: [Count instead of a share](#/progressbar/a-count), [Follow a job through its steps](#/progressbar/a-close-in-steps), [A deployment (Stepper)](#/stepper/a-deployment) |
|
|
11252
11285
|
| `showLabel` | `boolean` | `false` | The percentage beside the bar (Geist Mono). Never for an indeterminate bar - it has no figure to show.<br>Shown in: [Configurator](#/progressbar/configurator-progressbar), [How far a job has come](#/progressbar/how-far), [Follow a job through its steps](#/progressbar/a-close-in-steps) and 1 more |
|
|
11286
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
11253
11287
|
|
|
11254
11288
|
Also takes every attribute of `<div>`.
|
|
11255
11289
|
|
|
@@ -11408,6 +11442,7 @@ With reduced motion the shimmer stops, and the shape stands in a still, faint gr
|
|
|
11408
11442
|
| `width` | `string \| number` | `"100%"` | Width, e.g. "120px" or "60%".<br>Shown in: [Configurator](#/skeleton/configurator-skeleton), [Lines of text to come](#/skeleton/lines), [Shapes](#/skeleton/shapes) and 2 more |
|
|
11409
11443
|
| `height` | `string \| number` | `"12px"` | Height, e.g. "12px" or 16.<br>Shown in: [Configurator](#/skeleton/configurator-skeleton), [Shapes](#/skeleton/shapes), [Hold a list's place while it loads](#/skeleton/a-list-loading) |
|
|
11410
11444
|
| `circle` | `boolean` | `false` | Circular shape, e.g. for an avatar placeholder.<br>Shown in: [Configurator](#/skeleton/configurator-skeleton), [Shapes](#/skeleton/shapes), [Hold a list's place while it loads](#/skeleton/a-list-loading) |
|
|
11445
|
+
| `ref` | `Ref<HTMLSpanElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
11411
11446
|
|
|
11412
11447
|
Also takes every attribute of `<span>`.
|
|
11413
11448
|
|
|
@@ -11609,6 +11644,7 @@ The title is a paragraph, not a heading, so an alert does not enter the page's o
|
|
|
11609
11644
|
| `title` | `ReactNode` | — | Heading; without it the body text carries the message on its own.<br>Shown in: [A message](#/alert/a-message), [Tones](#/alert/tones), [Offer the way forward](#/alert/with-actions) and 5 more |
|
|
11610
11645
|
| `actions` | `ReactNode` | — | Actions below the text, e.g. "Try again".<br>Shown in: [Offer the way forward](#/alert/with-actions), [Sum up a form's errors](#/alert/above-a-form), [A deployment (Stepper)](#/stepper/a-deployment) |
|
|
11611
11646
|
| `dismissLabel` | `string` | the wording's "Close message" | Label of the dismiss cross. |
|
|
11647
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
11612
11648
|
|
|
11613
11649
|
###### Events
|
|
11614
11650
|
|
|
@@ -12250,6 +12286,7 @@ The keys of [Button](#/button/keyboard-button) and [Tag](#/tag/keyboard-tag) app
|
|
|
12250
12286
|
| `description` | `ReactNode` | — | One sentence on why nothing is here and what would put something here.<br>Shown in: [Nothing yet](#/emptystate/nothing-yet), [Say why a filter found nothing](#/emptystate/a-filter-found-nothing), [Mark good news in a panel](#/emptystate/in-a-panel) and 3 more |
|
|
12251
12287
|
| `action` | `ReactNode` | — | The way into the next action, e.g. a button.<br>Shown in: [Nothing yet](#/emptystate/nothing-yet), [Say why a filter found nothing](#/emptystate/a-filter-found-nothing), [Cards on a dashboard (Card)](#/card/cards-on-a-dashboard) and 1 more |
|
|
12252
12288
|
| `icon` | `ReactNode` | — | Optional symbol above the title.<br>Shown in: [Mark good news in a panel](#/emptystate/in-a-panel) |
|
|
12289
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
12253
12290
|
|
|
12254
12291
|
Also takes every attribute of `<div>` – without `title`.
|
|
12255
12292
|
|
|
@@ -12870,6 +12907,7 @@ export default function PerRow() {
|
|
|
12870
12907
|
| Prop | Type | Default | Description |
|
|
12871
12908
|
|---|---|---|---|
|
|
12872
12909
|
| `tone` | `"default" \| "danger"` | `"default"` | "danger" for destructive actions.<br>Shown in: [Run actions from a trigger](#/menu/actions), [Disable an entry, mark a destructive one](#/menu/disabled-and-danger), [Act on a row](#/menu/per-row) and 5 more |
|
|
12910
|
+
| `ref` | `Ref<HTMLButtonElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
12873
12911
|
|
|
12874
12912
|
###### Events
|
|
12875
12913
|
|
|
@@ -13389,6 +13427,7 @@ export default function MustBeAnswered() {
|
|
|
13389
13427
|
| `open` *required* | `boolean` | — | Whether the window stands. Controlled: the opening is the caller's decision, and only the caller knows whether something may be open.<br>Shown in: [A window that holds focus](#/modal/a-window), [Sizes](#/modal/sizes), [Scroll long content](#/modal/long-content) and 9 more |
|
|
13390
13428
|
| `size` | [`ModalSize`](#type-ModalSize)<br>`"sm" \| "md" \| "lg"` | `"md"` | The width of the window. The height comes from the content; only the body scrolls, header and footer stand fast.<br>Shown in: [Sizes](#/modal/sizes), [Scroll long content](#/modal/long-content), [Guard unsaved changes](#/modal/unsaved-changes) and 2 more |
|
|
13391
13429
|
| `closeOnBackdrop` | `boolean` | `true` | Closes on a click on the backdrop.<br>Shown in: [A window that must be answered](#/modal/must-be-answered) |
|
|
13430
|
+
| `ref` | `Ref<HTMLDialogElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
13392
13431
|
|
|
13393
13432
|
###### Events
|
|
13394
13433
|
|
|
@@ -13405,6 +13444,7 @@ Also takes every attribute of `<dialog>` – without `onClose`.
|
|
|
13405
13444
|
| `title` *required* | `ReactNode` | — | The heading of the window. It names it for the screen reader at the same time – a dialog without a name says only "dialog".<br>Shown in: [A window that holds focus](#/modal/a-window), [Sizes](#/modal/sizes), [Scroll long content](#/modal/long-content) and 9 more |
|
|
13406
13445
|
| `description` | `ReactNode` | — | One sentence below the heading: what is to be decided here.<br>Shown in: [A window that holds focus](#/modal/a-window), [Scroll long content](#/modal/long-content), [Guard unsaved changes](#/modal/unsaved-changes) and 7 more |
|
|
13407
13446
|
| `hideClose` | `boolean` | `false` | Hides the close button.<br>Shown in: [A window that must be answered](#/modal/must-be-answered) |
|
|
13447
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
13408
13448
|
|
|
13409
13449
|
Also takes every attribute of `<div>` – without `title`.
|
|
13410
13450
|
|
|
@@ -13724,6 +13764,7 @@ export default function BesideAServiceList() {
|
|
|
13724
13764
|
| `side` | `"right" \| "left"` | `"right"` | The edge the drawer stands at and enters from.<br>Shown in: [From the left, and wider](#/drawer/left-and-wider) |
|
|
13725
13765
|
| `open` *required* | `boolean` | — | Whether the window stands. Controlled: the opening is the caller's decision, and only the caller knows whether something may be open. From `ModalProps`.<br>Shown in: [A detail from the edge](#/drawer/a-detail-from-the-edge), [From the left, and wider](#/drawer/left-and-wider), [Open a service's detail from its list](#/drawer/beside-a-service-list) and 9 more |
|
|
13726
13766
|
| `closeOnBackdrop` | `boolean` | `true` | Closes on a click on the backdrop. From `ModalProps`.<br>Shown in: [A window that must be answered (Modal)](#/modal/must-be-answered) |
|
|
13767
|
+
| `ref` | `Ref<HTMLDialogElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
13727
13768
|
|
|
13728
13769
|
###### Events
|
|
13729
13770
|
|
|
@@ -13902,6 +13943,7 @@ export default function WhileItRuns() {
|
|
|
13902
13943
|
| `cancelLabel` | `string` | the wording's "Cancel" | Label of the cancelling button.<br>Shown in: [Guard unsaved changes (Modal)](#/modal/unsaved-changes) |
|
|
13903
13944
|
| `tone` | `"primary" \| "danger"` | `"primary"` | "danger" for destructive actions.<br>Shown in: [The one question](#/confirmdialog/the-one-question), [Ask before a commitment](#/confirmdialog/a-commitment), [Stay open while it runs](#/confirmdialog/while-it-runs) and 2 more |
|
|
13904
13945
|
| `loading` | `boolean` | `false` | Locks the actions while the confirmation is running.<br>Shown in: [Stay open while it runs](#/confirmdialog/while-it-runs) |
|
|
13946
|
+
| `ref` | `Ref<HTMLDialogElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
13905
13947
|
|
|
13906
13948
|
###### Events
|
|
13907
13949
|
|
|
@@ -14190,6 +14232,7 @@ export default function SearchHundredsOfPages() {
|
|
|
14190
14232
|
| `items` *required* | `readonly `[`CommandPaletteItem`](#type-CommandPaletteItem)`[]` | — | The candidates that are searched. They belong to the caller: the palette keeps no memory and does not reorder them.<br>Shown in: [Run a command](#/commandpalette/commands), [Show recent choices first](#/commandpalette/recent-first), [Open it with a shortcut](#/commandpalette/shortcut) and 2 more |
|
|
14191
14233
|
| `restingItems` | `readonly `[`CommandPaletteItem`](#type-CommandPaletteItem)`[]` | — | What stands there as long as nothing is typed. Without a value: nothing, and the window is only the field. A LIST and not a switch, because the interesting question is not "all or none" but "which". Whoever really wants to show everything passes `restingItems={items}`; whoever wants to show the five most recently used passes those - and a switch cannot do that. With long lists "all" is also exactly the state this component did away with: a list that is already full can only shrink. The rows stand in THIS order and without marks: without a query there is no rank and nothing to mark. Rank and weight therefore play no part here; the order belongs to the caller.<br>Shown in: [Run a command](#/commandpalette/commands), [Show recent choices first](#/commandpalette/recent-first) |
|
|
14192
14234
|
| `maxFinds` | `number` | every find | The most finds that stand at once - the best by rank. A last line says how many more there are, and typing on narrows them. For a long list of candidates, where a single letter finds hundreds and drawing them all would make every keystroke wait.<br>Shown in: [Search hundreds of pages](#/commandpalette/search-hundreds-of-pages) |
|
|
14235
|
+
| `ref` | `Ref<HTMLDialogElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
14193
14236
|
|
|
14194
14237
|
###### Events
|
|
14195
14238
|
|
|
@@ -14518,6 +14561,7 @@ export default function BrowseDownAndBackUp() {
|
|
|
14518
14561
|
| Prop | Type | Default | Description |
|
|
14519
14562
|
|---|---|---|---|
|
|
14520
14563
|
| `items` *required* | `readonly `[`BreadcrumbEntry`](#type-BreadcrumbEntry)`[]` | — | The trail from the root to the current page; the last is the page.<br>Shown in: [A trail](#/breadcrumb/a-trail), [Route it yourself](#/breadcrumb/route-it-yourself), [Fold when narrow](#/breadcrumb/fold-when-narrow) and 3 more |
|
|
14564
|
+
| `ref` | `Ref<HTMLElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
14521
14565
|
|
|
14522
14566
|
Also takes every attribute of the rendered element.
|
|
14523
14567
|
|
|
@@ -14847,6 +14891,7 @@ export default function AnInvoiceInTabs() {
|
|
|
14847
14891
|
|---|---|---|---|
|
|
14848
14892
|
| `defaultValue` | `string` | — | Uncontrolled: the tab that stands first. Afterwards the choice belongs to the tabs - for a switch no address and no handler needs to know.<br>Shown in: [One view at a time](#/tabs/one-view-at-a-time), [Loading and empty panels](#/tabs/loading-and-empty-panels), [An invoice in tabs](#/tabs/an-invoice-in-tabs) and 1 more |
|
|
14849
14893
|
| `value` | `string` | — | The value of the visible tab. Controlled, `Tabs` remember nothing, so that the tab can come out of an address.<br>Shown in: [Keep the tab in the address](#/tabs/keep-the-tab-in-the-address) |
|
|
14894
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
14850
14895
|
|
|
14851
14896
|
###### Events
|
|
14852
14897
|
|
|
@@ -14861,6 +14906,7 @@ Also takes every attribute of `<div>` – without `defaultValue`, `onChange`.
|
|
|
14861
14906
|
| Prop | Type | Default | Description |
|
|
14862
14907
|
|---|---|---|---|
|
|
14863
14908
|
| `value` *required* | `string` | — | The value this tab reports – and under which its panel stands.<br>Shown in: [One view at a time](#/tabs/one-view-at-a-time), [Keep the tab in the address](#/tabs/keep-the-tab-in-the-address), [Loading and empty panels](#/tabs/loading-and-empty-panels) and 2 more |
|
|
14909
|
+
| `ref` | `Ref<HTMLButtonElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
14864
14910
|
|
|
14865
14911
|
Also takes every attribute of `<button>`.
|
|
14866
14912
|
|
|
@@ -14869,6 +14915,7 @@ Also takes every attribute of `<button>`.
|
|
|
14869
14915
|
| Prop | Type | Default | Description |
|
|
14870
14916
|
|---|---|---|---|
|
|
14871
14917
|
| `value` *required* | `string` | — | The value of the tab this panel belongs to. Only the matching panel stands in the document – a hidden panel would keep focus, scroll position and live regions that nobody sees.<br>Shown in: [One view at a time](#/tabs/one-view-at-a-time), [Keep the tab in the address](#/tabs/keep-the-tab-in-the-address), [Loading and empty panels](#/tabs/loading-and-empty-panels) and 2 more |
|
|
14918
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
14872
14919
|
|
|
14873
14920
|
Also takes every attribute of `<div>`.
|
|
14874
14921
|
|
|
@@ -15102,6 +15149,7 @@ export default function LongSettingsInSections() {
|
|
|
15102
15149
|
| `defaultValue` | `readonly string[]` | `[]` | Uncontrolled: the sections open at the start.<br>Shown in: [One section at a time](#/accordion/one-section-at-a-time), [Several open, one locked](#/accordion/several-open), [Long settings in sections](#/accordion/long-settings-in-sections) |
|
|
15103
15150
|
| `value` | `readonly string[]` | — | Controlled: the values of the open sections. A list for both types, so that switching the type changes nothing else.<br>Shown in: [Open and fold all](#/accordion/open-and-fold-all) |
|
|
15104
15151
|
| `headingLevel` | `2 \| 3 \| 4 \| 5 \| 6` | `3` | The level of the heading each header stands in - the one that fits the page's outline.<br>Shown in: [Several open, one locked](#/accordion/several-open), [Long settings in sections](#/accordion/long-settings-in-sections) |
|
|
15152
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
15105
15153
|
|
|
15106
15154
|
###### Events
|
|
15107
15155
|
|
|
@@ -15118,6 +15166,7 @@ Also takes every attribute of `<div>` – without `defaultValue`, `onChange`.
|
|
|
15118
15166
|
| `value` *required* | `string` | — | What names the section in the accordion's `value`.<br>Shown in: [One section at a time](#/accordion/one-section-at-a-time), [Several open, one locked](#/accordion/several-open), [Open and fold all](#/accordion/open-and-fold-all) and 1 more |
|
|
15119
15167
|
| `title` *required* | `ReactNode` | — | The header's text. It names the section's region too.<br>Shown in: [One section at a time](#/accordion/one-section-at-a-time), [Several open, one locked](#/accordion/several-open), [Open and fold all](#/accordion/open-and-fold-all) and 1 more |
|
|
15120
15168
|
| `disabled` | `boolean` | `false` | A section that cannot be opened now; its header stays in the list.<br>Shown in: [Several open, one locked](#/accordion/several-open) |
|
|
15169
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
15121
15170
|
|
|
15122
15171
|
Also takes every attribute of `<div>` – without `title`.
|
|
15123
15172
|
|
|
@@ -15320,6 +15369,7 @@ Under forced colours the lines between the steps take the system's text colour,
|
|
|
15320
15369
|
| `steps` *required* | `readonly `[`StepperStep`](#type-StepperStep)`[]` | — | The steps in the order they are walked.<br>Shown in: [Where a procedure stands](#/stepper/where-a-procedure-stands), [Steps in a column](#/stepper/steps-in-a-column), [A failed step](#/stepper/a-failed-step) and 6 more |
|
|
15321
15370
|
| `current` *required* | `number` | — | The index of the step being worked on. The steps before it are done, the ones after it upcoming; past the last step, every step is done.<br>Shown in: [Where a procedure stands](#/stepper/where-a-procedure-stands), [Steps in a column](#/stepper/steps-in-a-column), [A failed step](#/stepper/a-failed-step) and 6 more |
|
|
15322
15371
|
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | `horizontal` in a row, `vertical` in a column for steps with longer descriptions.<br>Shown in: [Steps in a column](#/stepper/steps-in-a-column), [A failed step](#/stepper/a-failed-step), [An invoice in tabs (Tabs)](#/tabs/an-invoice-in-tabs) |
|
|
15372
|
+
| `ref` | `Ref<HTMLOListElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
15323
15373
|
|
|
15324
15374
|
Also takes every attribute of the rendered element.
|
|
15325
15375
|
|
|
@@ -15895,15 +15945,16 @@ export default function SearchCheckAndReveal() {
|
|
|
15895
15945
|
|
|
15896
15946
|
| Prop | Type | Default | Description |
|
|
15897
15947
|
|---|---|---|---|
|
|
15898
|
-
| `tree` *required* | [`Tree`](#type-Tree)`<K, S>` | — | The tree from `useTree`. It is the whole state: flattening, active node, checks, anchor. The view holds nothing beside it.<br>Shown in: [A tree](#/treeview/a-tree), [Tick a selection](#/treeview/tick-a-selection), [Load branches on demand](#/treeview/load-branches-on-demand) and
|
|
15948
|
+
| `tree` *required* | [`Tree`](#type-Tree)`<K, S>` | — | The tree from `useTree`. It is the whole state: flattening, active node, checks, anchor. The view holds nothing beside it.<br>Shown in: [A tree](#/treeview/a-tree), [Tick a selection](#/treeview/tick-a-selection), [Load branches on demand](#/treeview/load-branches-on-demand) and 5 more |
|
|
15899
15949
|
| `checkable` | `boolean` | `false` | Show ticks. Without them a tree remains that knows only an active node - and no space is kept free for them.<br>Shown in: [Tick a selection](#/treeview/tick-a-selection), [With an error](#/treeview/with-an-error), [Search, check and reveal in a large tree](#/treeview/search-check-and-reveal) |
|
|
15900
|
-
| `children` *required* | `(entry: `[`FlatteningEntry`](#type-FlatteningEntry)`<K, S>) => ReactNode` | — | What the node says.<br>Shown in: [A tree](#/treeview/a-tree), [Tick a selection](#/treeview/tick-a-selection), [Load branches on demand](#/treeview/load-branches-on-demand) and
|
|
15950
|
+
| `children` *required* | `(entry: `[`FlatteningEntry`](#type-FlatteningEntry)`<K, S>) => ReactNode` | — | What the node says.<br>Shown in: [A tree](#/treeview/a-tree), [Tick a selection](#/treeview/tick-a-selection), [Load branches on demand](#/treeview/load-branches-on-demand) and 5 more |
|
|
15951
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
15901
15952
|
|
|
15902
15953
|
###### Accessibility
|
|
15903
15954
|
|
|
15904
15955
|
| Prop | Type | Default | Description |
|
|
15905
15956
|
|---|---|---|---|
|
|
15906
|
-
| `ariaLabel` *required* | `string` | — | Required: the tree is a structure of its own and needs a name.<br>Shown in: [A tree](#/treeview/a-tree), [Tick a selection](#/treeview/tick-a-selection), [Load branches on demand](#/treeview/load-branches-on-demand) and
|
|
15957
|
+
| `ariaLabel` *required* | `string` | — | Required: the tree is a structure of its own and needs a name.<br>Shown in: [A tree](#/treeview/a-tree), [Tick a selection](#/treeview/tick-a-selection), [Load branches on demand](#/treeview/load-branches-on-demand) and 5 more |
|
|
15907
15958
|
|
|
15908
15959
|
Also takes every attribute of `<div>` – without `children`.
|
|
15909
15960
|
|
|
@@ -15917,6 +15968,7 @@ Also takes every attribute of `<div>` – without `children`.
|
|
|
15917
15968
|
| `invalid` | `boolean` | — | Marks the field as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`. From `InputProps`.<br>Shown in: [With an error](#/treeview/with-an-error), [Configurator (Input)](#/input/configurator-input), [With an error (Input)](#/input/with-an-error) |
|
|
15918
15969
|
| `numeric` | `boolean` | `false` | Right-aligned tabular figures in Geist Mono, e.g. for key figures. From `InputProps`.<br>Shown in: [Configurator (Input)](#/input/configurator-input), [Align reference numbers (Input)](#/input/align-reference-numbers), [Take a delivery address (Input)](#/input/take-a-delivery-address) and 2 more |
|
|
15919
15970
|
| `clearable` | `boolean` | `false` | Shows a gently appearing cross where there is content, which clears the input. Requires a controlled field (value) and onClear. From `InputProps`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [Clear the field (Input)](#/input/clear-the-field) |
|
|
15971
|
+
| `ref` | `Ref<HTMLInputElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
15920
15972
|
|
|
15921
15973
|
###### Events
|
|
15922
15974
|
|
|
@@ -15962,7 +16014,7 @@ among its siblings.
|
|
|
15962
16014
|
|
|
15963
16015
|
| Prop | Type | Default | Description |
|
|
15964
16016
|
|---|---|---|---|
|
|
15965
|
-
| `node` *required* | `K` | — | <br>Shown in: [A tree](#/treeview/a-tree), [Tick a selection](#/treeview/tick-a-selection), [Load branches on demand](#/treeview/load-branches-on-demand) and
|
|
16017
|
+
| `node` *required* | `K` | — | <br>Shown in: [A tree](#/treeview/a-tree), [Tick a selection](#/treeview/tick-a-selection), [Load branches on demand](#/treeview/load-branches-on-demand) and 5 more |
|
|
15966
16018
|
| `key` *required* | `S` | — | |
|
|
15967
16019
|
| `level` *required* | `number` | — | Roots stand at 0. Drives the indentation and what is read out. |
|
|
15968
16020
|
| `label` *required* | `string` | — | The node's text; here, so that typeahead can be a pure function over the flattening and needs no reader. |
|
|
@@ -16016,6 +16068,291 @@ to render and the heights of the filler rows around it.
|
|
|
16016
16068
|
|
|
16017
16069
|
What umriss deliberately does not build, and why: [ADR-0032](https://romanhaendler.github.io/umriss-ui/what-umriss-ui-is-not/).
|
|
16018
16070
|
|
|
16071
|
+
### Benchmark
|
|
16072
|
+
|
|
16073
|
+
A large virtualised tree, measured in this browser rather than claimed: the first render, a walk down it with the arrow keys and a scroll.
|
|
16074
|
+
|
|
16075
|
+
```ts
|
|
16076
|
+
import { useVirtual } from "@umriss-ui/core";
|
|
16077
|
+
```
|
|
16078
|
+
|
|
16079
|
+
Demo page: https://romanhaendler.github.io/umriss-ui/core/benchmark/
|
|
16080
|
+
|
|
16081
|
+
The figures in `packages/core/docs/capabilities-tree.md` come from here. The page adds nothing to the tree; it times it from outside.
|
|
16082
|
+
|
|
16083
|
+
#### Examples
|
|
16084
|
+
|
|
16085
|
+
##### Measure a large tree
|
|
16086
|
+
|
|
16087
|
+
Set a node count and press the buttons: the first render, a walk down the tree with the arrow keys and a scroll are timed in this browser.
|
|
16088
|
+
|
|
16089
|
+
```tsx
|
|
16090
|
+
/* What a large virtualised tree costs, measured from outside: the first render,
|
|
16091
|
+
a walk of the Active node with the arrow keys, and a scroll. Nothing here is
|
|
16092
|
+
a prop of the tree. Not photographed: it measures the moment it runs.
|
|
16093
|
+
|
|
16094
|
+
The scripted runs start from a button and are driven by the page itself, so
|
|
16095
|
+
a person and a script read the same figures. `data-role` names every control
|
|
16096
|
+
and every figure; `status` reads idle, running or done.
|
|
16097
|
+
|
|
16098
|
+
What a figure covers: script, React's commit and a forced layout - the
|
|
16099
|
+
clock stops after two macrotasks and a layout read, not at the paint, so
|
|
16100
|
+
that frame quantisation does not enter the figure. */
|
|
16101
|
+
|
|
16102
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
16103
|
+
import { Button, Text, TreeView, useTree } from "@umriss-ui/core";
|
|
16104
|
+
import type { NodeReader } from "@umriss-ui/core";
|
|
16105
|
+
|
|
16106
|
+
interface Unit {
|
|
16107
|
+
id: string;
|
|
16108
|
+
name: string;
|
|
16109
|
+
children?: Unit[];
|
|
16110
|
+
}
|
|
16111
|
+
|
|
16112
|
+
const SIZES = [10_000, 50_000, 100_000] as const;
|
|
16113
|
+
const ROW = 26;
|
|
16114
|
+
const KEYS = 200;
|
|
16115
|
+
const SCROLLS = 100;
|
|
16116
|
+
/* Rows per scroll step: far enough to replace the window every time. */
|
|
16117
|
+
const SCROLL_ROWS = 10;
|
|
16118
|
+
|
|
16119
|
+
/** A forest of folders (6 groups of 7 leaves each, 49 nodes per root) cut off at
|
|
16120
|
+
`count` nodes; every folder is open, so the visible rows are the nodes. */
|
|
16121
|
+
function build(count: number): { roots: Unit[]; open: string[] } {
|
|
16122
|
+
const roots: Unit[] = [];
|
|
16123
|
+
const open: string[] = [];
|
|
16124
|
+
let made = 0;
|
|
16125
|
+
const node = (id: string, children?: Unit[]): Unit => ({ id, name: `Node ${id}`, children });
|
|
16126
|
+
for (let r = 0; made < count; r++) {
|
|
16127
|
+
const groups: Unit[] = [];
|
|
16128
|
+
open.push(`r${r}`);
|
|
16129
|
+
made++;
|
|
16130
|
+
for (let g = 0; g < 6 && made < count; g++) {
|
|
16131
|
+
const leaves: Unit[] = [];
|
|
16132
|
+
made++;
|
|
16133
|
+
open.push(`r${r}-${g}`);
|
|
16134
|
+
for (let l = 0; l < 7 && made < count; l++) {
|
|
16135
|
+
leaves.push(node(`r${r}-${g}-${l}`));
|
|
16136
|
+
made++;
|
|
16137
|
+
}
|
|
16138
|
+
groups.push(node(`r${r}-${g}`, leaves));
|
|
16139
|
+
}
|
|
16140
|
+
roots.push(node(`r${r}`, groups));
|
|
16141
|
+
}
|
|
16142
|
+
return { roots, open };
|
|
16143
|
+
}
|
|
16144
|
+
|
|
16145
|
+
const READER: NodeReader<Unit> = {
|
|
16146
|
+
key: (unit) => unit.id,
|
|
16147
|
+
children: (unit) => unit.children,
|
|
16148
|
+
label: (unit) => unit.name,
|
|
16149
|
+
};
|
|
16150
|
+
|
|
16151
|
+
type Status = "idle" | "running" | "done";
|
|
16152
|
+
type Figures = { firstRender: number | null; perKey: number | null; perScroll: number | null };
|
|
16153
|
+
|
|
16154
|
+
/** Two macrotasks, then a layout read: React has committed by then. */
|
|
16155
|
+
function settled(): Promise<void> {
|
|
16156
|
+
const tick = () =>
|
|
16157
|
+
new Promise<void>((resolve) => {
|
|
16158
|
+
const channel = new MessageChannel();
|
|
16159
|
+
channel.port1.onmessage = () => resolve();
|
|
16160
|
+
channel.port2.postMessage(null);
|
|
16161
|
+
});
|
|
16162
|
+
return tick()
|
|
16163
|
+
.then(tick)
|
|
16164
|
+
.then(() => void document.body.offsetHeight);
|
|
16165
|
+
}
|
|
16166
|
+
|
|
16167
|
+
function Body({ built, onShown }: { built: { roots: Unit[]; open: string[] }; onShown: () => void }) {
|
|
16168
|
+
const tree = useTree(built.roots, {
|
|
16169
|
+
reader: READER,
|
|
16170
|
+
defaultExpanded: built.open,
|
|
16171
|
+
defaultActive: built.roots[0]?.id ?? null,
|
|
16172
|
+
virtual: { rowHeight: ROW },
|
|
16173
|
+
});
|
|
16174
|
+
useEffect(onShown, [onShown]);
|
|
16175
|
+
return (
|
|
16176
|
+
<TreeView tree={tree} ariaLabel="Benchmark tree" style={{ height: 320 }}>
|
|
16177
|
+
{(entry) => entry.node.name}
|
|
16178
|
+
</TreeView>
|
|
16179
|
+
);
|
|
16180
|
+
}
|
|
16181
|
+
|
|
16182
|
+
/** The clock, behind a function so that it is read in handlers only. */
|
|
16183
|
+
const now = () => performance.now();
|
|
16184
|
+
|
|
16185
|
+
const show = (ms: number | null) => (ms === null ? "-" : ms.toFixed(2));
|
|
16186
|
+
|
|
16187
|
+
export default function Benchmark() {
|
|
16188
|
+
const [size, setSize] = useState<(typeof SIZES)[number]>(SIZES[0]);
|
|
16189
|
+
const [built, setBuilt] = useState(() => build(SIZES[0]));
|
|
16190
|
+
const [status, setStatus] = useState<Status>("idle");
|
|
16191
|
+
const [figures, setFigures] = useState<Figures>({ firstRender: null, perKey: null, perScroll: null });
|
|
16192
|
+
const [run, setRun] = useState(0);
|
|
16193
|
+
const started = useRef<number | null>(null);
|
|
16194
|
+
const host = useRef<HTMLDivElement>(null);
|
|
16195
|
+
|
|
16196
|
+
const choose = (n: (typeof SIZES)[number]) => {
|
|
16197
|
+
if (status === "running") return;
|
|
16198
|
+
const next = build(n);
|
|
16199
|
+
setStatus("running");
|
|
16200
|
+
setFigures({ firstRender: null, perKey: null, perScroll: null });
|
|
16201
|
+
started.current = now();
|
|
16202
|
+
setSize(n);
|
|
16203
|
+
setBuilt(next);
|
|
16204
|
+
setRun((r) => r + 1);
|
|
16205
|
+
};
|
|
16206
|
+
|
|
16207
|
+
/* Stable between renders: the body's effect runs on mount only, which is
|
|
16208
|
+
the first render of a run (the body is keyed by the run, so the
|
|
16209
|
+
same size again renders anew). */
|
|
16210
|
+
const onShown = useCallback(() => {
|
|
16211
|
+
const from = started.current;
|
|
16212
|
+
if (from === null) return;
|
|
16213
|
+
started.current = null;
|
|
16214
|
+
void settled().then(() => {
|
|
16215
|
+
setFigures((f) => ({ ...f, firstRender: performance.now() - from }));
|
|
16216
|
+
setStatus("done");
|
|
16217
|
+
});
|
|
16218
|
+
}, []);
|
|
16219
|
+
|
|
16220
|
+
const tree = () => host.current?.querySelector<HTMLElement>('[role="tree"]') ?? null;
|
|
16221
|
+
|
|
16222
|
+
const walk = async () => {
|
|
16223
|
+
const root = tree();
|
|
16224
|
+
const active = root?.querySelector<HTMLElement>('[role="treeitem"][tabindex="0"]');
|
|
16225
|
+
if (status === "running" || !root || !active) return;
|
|
16226
|
+
setStatus("running");
|
|
16227
|
+
active.focus();
|
|
16228
|
+
await settled();
|
|
16229
|
+
let total = 0;
|
|
16230
|
+
for (let i = 0; i < KEYS; i++) {
|
|
16231
|
+
const target = document.activeElement ?? root;
|
|
16232
|
+
const from = performance.now();
|
|
16233
|
+
target.dispatchEvent(new KeyboardEvent("keydown", { key: "ArrowDown", bubbles: true, cancelable: true }));
|
|
16234
|
+
await settled();
|
|
16235
|
+
total += performance.now() - from;
|
|
16236
|
+
}
|
|
16237
|
+
setFigures((f) => ({ ...f, perKey: total / KEYS }));
|
|
16238
|
+
setStatus("done");
|
|
16239
|
+
};
|
|
16240
|
+
|
|
16241
|
+
const scroll = async () => {
|
|
16242
|
+
const root = tree();
|
|
16243
|
+
if (status === "running" || !root) return;
|
|
16244
|
+
setStatus("running");
|
|
16245
|
+
root.scrollTop = 0;
|
|
16246
|
+
await settled();
|
|
16247
|
+
let from = 0;
|
|
16248
|
+
/* A capture listener on the window runs before React's own at the root, so
|
|
16249
|
+
the clock starts as the scroll event is dispatched. */
|
|
16250
|
+
const start = () => {
|
|
16251
|
+
from = performance.now();
|
|
16252
|
+
};
|
|
16253
|
+
window.addEventListener("scroll", start, { capture: true });
|
|
16254
|
+
let total = 0;
|
|
16255
|
+
for (let i = 0; i < SCROLLS; i++) {
|
|
16256
|
+
/* A step that moves nothing fires no event; the run goes on after a
|
|
16257
|
+
moment instead of waiting for one that never comes. */
|
|
16258
|
+
const fired = new Promise<void>((resolve) => {
|
|
16259
|
+
root.addEventListener("scroll", () => resolve(), { once: true });
|
|
16260
|
+
setTimeout(resolve, 500);
|
|
16261
|
+
});
|
|
16262
|
+
from = performance.now();
|
|
16263
|
+
root.scrollTop += SCROLL_ROWS * ROW;
|
|
16264
|
+
await fired;
|
|
16265
|
+
await settled();
|
|
16266
|
+
total += performance.now() - from;
|
|
16267
|
+
}
|
|
16268
|
+
window.removeEventListener("scroll", start, { capture: true });
|
|
16269
|
+
setFigures((f) => ({ ...f, perScroll: total / SCROLLS }));
|
|
16270
|
+
setStatus("done");
|
|
16271
|
+
};
|
|
16272
|
+
|
|
16273
|
+
return (
|
|
16274
|
+
<>
|
|
16275
|
+
<div style={{ display: "flex", flexWrap: "wrap", gap: "0.5rem" }}>
|
|
16276
|
+
{SIZES.map((n) => (
|
|
16277
|
+
<Button key={n} size="sm" data-role={`size-${n}`} aria-pressed={n === size} onClick={() => choose(n)}>
|
|
16278
|
+
{n.toLocaleString("en-US")} nodes
|
|
16279
|
+
</Button>
|
|
16280
|
+
))}
|
|
16281
|
+
<Button size="sm" data-role="walk" onClick={walk}>
|
|
16282
|
+
Walk {KEYS} keys
|
|
16283
|
+
</Button>
|
|
16284
|
+
<Button size="sm" data-role="scroll" onClick={scroll}>
|
|
16285
|
+
Scroll {SCROLLS} steps
|
|
16286
|
+
</Button>
|
|
16287
|
+
</div>
|
|
16288
|
+
<dl style={{ display: "flex", flexWrap: "wrap", gap: "1.5rem", margin: 0 }}>
|
|
16289
|
+
<div>
|
|
16290
|
+
<Text as="dt">Status</Text>
|
|
16291
|
+
<Text as="dd" mono style={{ margin: 0 }} data-role="status">{status}</Text>
|
|
16292
|
+
</div>
|
|
16293
|
+
<div>
|
|
16294
|
+
<Text as="dt">Nodes</Text>
|
|
16295
|
+
<Text as="dd" mono style={{ margin: 0 }} data-role="nodes">{size}</Text>
|
|
16296
|
+
</div>
|
|
16297
|
+
<div>
|
|
16298
|
+
<Text as="dt">First render (ms)</Text>
|
|
16299
|
+
<Text as="dd" mono style={{ margin: 0 }} data-role="first-render">{show(figures.firstRender)}</Text>
|
|
16300
|
+
</div>
|
|
16301
|
+
<div>
|
|
16302
|
+
<Text as="dt">Per key (ms)</Text>
|
|
16303
|
+
<Text as="dd" mono style={{ margin: 0 }} data-role="per-key">{show(figures.perKey)}</Text>
|
|
16304
|
+
</div>
|
|
16305
|
+
<div>
|
|
16306
|
+
<Text as="dt">Per scroll event (ms)</Text>
|
|
16307
|
+
<Text as="dd" mono style={{ margin: 0 }} data-role="per-scroll">{show(figures.perScroll)}</Text>
|
|
16308
|
+
</div>
|
|
16309
|
+
</dl>
|
|
16310
|
+
<div ref={host}>
|
|
16311
|
+
<Body key={run} built={built} onShown={onShown} />
|
|
16312
|
+
</div>
|
|
16313
|
+
</>
|
|
16314
|
+
);
|
|
16315
|
+
}
|
|
16316
|
+
```
|
|
16317
|
+
|
|
16318
|
+
#### Keyboard
|
|
16319
|
+
|
|
16320
|
+
The keys of [TreeView](#/treeview/keyboard-treeview) apply here.
|
|
16321
|
+
|
|
16322
|
+
#### Props on this page
|
|
16323
|
+
|
|
16324
|
+
From `TextProps` — the full table stands on [Typography](#/typography/type-TextProps).
|
|
16325
|
+
|
|
16326
|
+
| Prop | Type | Default | Description |
|
|
16327
|
+
|---|---|---|---|
|
|
16328
|
+
| [`as`](#/typography/TextProps-as) | `ElementType` | `"p"` | Element to render as. |
|
|
16329
|
+
| [`mono`](#/typography/TextProps-mono) | `boolean` | `false` | Geist Mono with tabular figures – for numbers and identifiers. |
|
|
16330
|
+
|
|
16331
|
+
From `ButtonProps` — the full table stands on [Button](#/button/type-ButtonProps).
|
|
16332
|
+
|
|
16333
|
+
| Prop | Type | Default | Description |
|
|
16334
|
+
|---|---|---|---|
|
|
16335
|
+
| [`size`](#/button/ButtonProps-size) | [`ButtonSize`](#/button/type-ButtonSize)<br>`"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for buttons in header bars and table rows, `md` otherwise. |
|
|
16336
|
+
|
|
16337
|
+
From `IconButtonProps` — the full table stands on [IconButton](#/iconbutton/type-IconButtonProps).
|
|
16338
|
+
|
|
16339
|
+
| Prop | Type | Default | Description |
|
|
16340
|
+
|---|---|---|---|
|
|
16341
|
+
| [`size`](#/iconbutton/IconButtonProps-size) | [`ButtonSize`](#/iconbutton/type-ButtonSize)<br>`"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for buttons in header bars and table rows, `md` otherwise. From `ButtonProps`. |
|
|
16342
|
+
|
|
16343
|
+
From `TreeViewProps` — the full table stands on [TreeView](#/treeview/type-TreeViewProps).
|
|
16344
|
+
|
|
16345
|
+
| Prop | Type | Default | Description |
|
|
16346
|
+
|---|---|---|---|
|
|
16347
|
+
| [`tree`](#/treeview/TreeViewProps-tree) *required* | [`Tree`](#/treeview/type-Tree)`<K, S>` | — | The tree from `useTree`. It is the whole state: flattening, active node, checks, anchor. The view holds nothing beside it. |
|
|
16348
|
+
| [`children`](#/treeview/TreeViewProps-children) *required* | `(entry: `[`FlatteningEntry`](#/treeview/type-FlatteningEntry)`<K, S>) => ReactNode` | — | What the node says. |
|
|
16349
|
+
|
|
16350
|
+
###### Accessibility
|
|
16351
|
+
|
|
16352
|
+
| Prop | Type | Default | Description |
|
|
16353
|
+
|---|---|---|---|
|
|
16354
|
+
| [`ariaLabel`](#/treeview/TreeViewProps-ariaLabel) *required* | `string` | — | Required: the tree is a structure of its own and needs a name. |
|
|
16355
|
+
|
|
16019
16356
|
## Data display
|
|
16020
16357
|
|
|
16021
16358
|
Single values and labels, read at a glance.
|
|
@@ -16190,6 +16527,7 @@ The keys of [Button](#/button/keyboard-button) apply here.
|
|
|
16190
16527
|
|---|---|---|---|
|
|
16191
16528
|
| `tone` | [`BadgeTone`](#type-BadgeTone)<br>`"neutral" \| "accent" \| "success" \| "warning" \| "danger"` | `"neutral"` | What the badge stands for. There is always a word beside it: a colour on its own is not a statement.<br>Shown in: [Configurator](#/badge/configurator-badge), [Tones](#/badge/tones), [Counters](#/badge/counters) and 19 more |
|
|
16192
16529
|
| `pill` | `boolean` | `false` | Fully rounded pill shape - for counters and key figures. The default is the slightly rounded badge shape for status labels.<br>Shown in: [Configurator](#/badge/configurator-badge), [Counters](#/badge/counters), [Fold the body (Card)](#/card/fold-the-body) and 1 more |
|
|
16530
|
+
| `ref` | `Ref<HTMLSpanElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
16193
16531
|
|
|
16194
16532
|
Also takes every attribute of `<span>`.
|
|
16195
16533
|
|
|
@@ -16439,6 +16777,7 @@ export default function AFilterBar() {
|
|
|
16439
16777
|
| `children` *required* | `ReactNode` | — | The text of the label – short enough to stand on one line.<br>Shown in: [Configurator](#/tag/configurator-tag), [A tag](#/tag/a-tag), [Tones](#/tag/tones) and 5 more |
|
|
16440
16778
|
| `removeLabel` | `string` | — | Label of the remove key. Needed as soon as the content is not text – no sentence can be formed out of a node.<br>Shown in: [Remove tags from a group](#/tag/removable) |
|
|
16441
16779
|
| `disabled` | `boolean` | `false` | Takes the remove key away from the tag without hiding it: disabled is a statement about the key and not about the label.<br>Shown in: [Configurator](#/tag/configurator-tag), [Remove tags from a group](#/tag/removable) |
|
|
16780
|
+
| `ref` | `Ref<HTMLSpanElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
16442
16781
|
|
|
16443
16782
|
###### Events
|
|
16444
16783
|
|
|
@@ -16450,6 +16789,10 @@ Also takes every attribute of `<span>` – without `onRemove`.
|
|
|
16450
16789
|
|
|
16451
16790
|
##### `TagGroupProps`
|
|
16452
16791
|
|
|
16792
|
+
| Prop | Type | Default | Description |
|
|
16793
|
+
|---|---|---|---|
|
|
16794
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
16795
|
+
|
|
16453
16796
|
###### Accessibility
|
|
16454
16797
|
|
|
16455
16798
|
| Prop | Type | Default | Description |
|
|
@@ -17242,6 +17585,7 @@ It announces nothing: a value that changes or a verdict that turns is read when
|
|
|
17242
17585
|
| `history` | `readonly number[]` | — | Values in chronological order; yields the history line, across the tile beneath the figures, or beside them in a tile of 380 px and more.<br>Shown in: [Add a history](#/stat/history), [Give the history room](#/stat/give-the-history-room), [Watch a kiln zone](#/stat/a-kiln-zone) and 4 more |
|
|
17243
17586
|
| `asOf` | `Date \| number \| null` | — | When the value was true – not when it was fetched.<br>Shown in: [Show how fresh a value is](#/stat/freshness), [Watch the services that page at night](#/stat/a-service-overview), [Watch a kiln line over a shift (Scenarios)](#/scenarios/watch-a-kiln-line) |
|
|
17244
17587
|
| `ages` | [`FreshnessAges`](#type-FreshnessAges) | — | Without ages there is no freshness display and no cadence.<br>Shown in: [Show how fresh a value is](#/stat/freshness), [Watch the services that page at night](#/stat/a-service-overview), [Watch a kiln line over a shift (Scenarios)](#/scenarios/watch-a-kiln-line) |
|
|
17588
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
17245
17589
|
|
|
17246
17590
|
Also takes every attribute of `<div>` – without `children`.
|
|
17247
17591
|
|
|
@@ -17464,6 +17808,7 @@ It is no live region: a new value is read when a reader reaches the bar. Under f
|
|
|
17464
17808
|
| `tone` | [`MeterTone`](#type-MeterTone)<br>`"neutral" \| "accent" \| "success" \| "warning" \| "danger"` | `"accent"` | The colour of the bar. It comes from an assessment and not from taste: beside the bar there is always the number or a word, so that the colour is never the only statement.<br>Shown in: [Configurator](#/meter/configurator-meter), [Tones](#/meter/tones), [Compare a team's capacity](#/meter/team-capacity) and 2 more |
|
|
17465
17809
|
| `showLabel` | `boolean` | `true` | The percentage to the right of the bar (Geist Mono).<br>Shown in: [Configurator](#/meter/configurator-meter), [A share](#/meter/a-share), [Compare a team's capacity](#/meter/team-capacity) and 2 more |
|
|
17466
17810
|
| `label` | `string` | the wording's "Fill level" | What is being measured, e.g. "Utilisation". A role of `meter` needs a name from the author - the visible percentage inside it does not count for that, and neither does the column heading beside it. Whoever knows what the bar measures says it better than the general term.<br>Shown in: [A share](#/meter/a-share), [Tones](#/meter/tones), [Compare a team's capacity](#/meter/team-capacity) and 2 more |
|
|
17811
|
+
| `ref` | `Ref<HTMLSpanElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
17467
17812
|
|
|
17468
17813
|
Also takes every attribute of `<span>`.
|
|
17469
17814
|
|
|
@@ -17733,6 +18078,7 @@ export default function InATable() {
|
|
|
17733
18078
|
| `width` | `number \| "fill"` | `96` | Width in pixels; the default is a row width, not a chart width. `"fill"` takes the width of its container, as a tile's history does; the line keeps its stroke and the end point stays round.<br>Shown in: [Configurator](#/sparkline/configurator-sparkline), [Size and tone](#/sparkline/size-and-tone), [One above the other (Splitter)](#/splitter/one-above-the-other) and 1 more |
|
|
17734
18079
|
| `height` | `number` | `28` | Height in pixels; the default is as high as a table row. With `width` `"fill"` a stylesheet may set the height instead: the drawing follows its box.<br>Shown in: [Configurator](#/sparkline/configurator-sparkline), [Size and tone](#/sparkline/size-and-tone), [One above the other (Splitter)](#/splitter/one-above-the-other) and 1 more |
|
|
17735
18080
|
| `tone` | `"ink" \| "accent"` | `"ink"` | The line is ink, not meaning: `accent` only where exactly one line among several is to be emphasised.<br>Shown in: [Configurator](#/sparkline/configurator-sparkline), [Size and tone](#/sparkline/size-and-tone) |
|
|
18081
|
+
| `ref` | `Ref<HTMLSpanElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
17736
18082
|
|
|
17737
18083
|
Also takes every attribute of `<span>`.
|
|
17738
18084
|
|
|
@@ -17778,7 +18124,7 @@ The chevron that expands and collapses a branch. Drawn pointing right;
|
|
|
17778
18124
|
rotate it by 90 degrees for an open branch.
|
|
17779
18125
|
|
|
17780
18126
|
```ts
|
|
17781
|
-
|
|
18127
|
+
function AngleGlyph({ ref, size, ...rest }: GlyphProps): import("react").JSX.Element;
|
|
17782
18128
|
```
|
|
17783
18129
|
|
|
17784
18130
|
Used on [CommandPalette](#/commandpalette).
|
|
@@ -17799,7 +18145,7 @@ Used on [Scenarios](#/) and [Breadcrumb](#/breadcrumb).
|
|
|
17799
18145
|
|
|
17800
18146
|
[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.
|
|
17801
18147
|
|
|
17802
|
-
Used on [Scenarios](#/), [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), [FileInput](#/fileinput), [Combobox](#/combobox), [Spinner](#/spinner), [ProgressBar](#/progressbar), [Skeleton](#/skeleton), [Alert](#/alert), [Toast](#/toast), [EmptyState](#/emptystate), [Tooltip](#/tooltip), [Popover](#/popover), [Menu](#/menu), [Modal](#/modal), [Drawer](#/drawer), [ConfirmDialog](#/confirmdialog), [CommandPalette](#/commandpalette), [Breadcrumb](#/breadcrumb), [Accordion](#/accordion), [Stepper](#/stepper), [TreeView](#/treeview), [Badge](#/badge) and [Tag](#/tag).
|
|
18148
|
+
Used on [Scenarios](#/), [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), [FileInput](#/fileinput), [Combobox](#/combobox), [Spinner](#/spinner), [ProgressBar](#/progressbar), [Skeleton](#/skeleton), [Alert](#/alert), [Toast](#/toast), [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) and [Tag](#/tag).
|
|
17803
18149
|
|
|
17804
18150
|
##### `ButtonGroup`
|
|
17805
18151
|
|
|
@@ -17813,9 +18159,9 @@ A calendar leaf: a sheet with its header and two rings. With `range`, a
|
|
|
17813
18159
|
bar across the sheet stands for the span a range picker chooses.
|
|
17814
18160
|
|
|
17815
18161
|
```ts
|
|
17816
|
-
|
|
18162
|
+
function CalendarGlyph({ ref, size, range, ...rest }: GlyphProps & {
|
|
17817
18163
|
range?: boolean;
|
|
17818
|
-
}
|
|
18164
|
+
}): import("react").JSX.Element;
|
|
17819
18165
|
```
|
|
17820
18166
|
|
|
17821
18167
|
##### `Card`
|
|
@@ -17849,7 +18195,7 @@ Used on [Scenarios](#/), [Theming](#/theming), [Sizes](#/sizes), [ButtonGroup](#
|
|
|
17849
18195
|
A clock face at a quarter past - the time pickers' character.
|
|
17850
18196
|
|
|
17851
18197
|
```ts
|
|
17852
|
-
|
|
18198
|
+
function ClockGlyph({ ref, size, ...rest }: GlyphProps): import("react").JSX.Element;
|
|
17853
18199
|
```
|
|
17854
18200
|
|
|
17855
18201
|
##### `Combobox`
|
|
@@ -17890,7 +18236,7 @@ The cross that clears a field, removes a tag or a chip, and closes a
|
|
|
17890
18236
|
dialog, a toast or an alert - one drawing at the size of its place.
|
|
17891
18237
|
|
|
17892
18238
|
```ts
|
|
17893
|
-
|
|
18239
|
+
function CrossGlyph({ ref, size, ...rest }: GlyphProps): import("react").JSX.Element;
|
|
17894
18240
|
```
|
|
17895
18241
|
|
|
17896
18242
|
Used on [IconButton](#/iconbutton).
|
|
@@ -17976,7 +18322,7 @@ The grid laid over an area. Two by two lines; the frame is missing on
|
|
|
17976
18322
|
purpose, otherwise it would be a window.
|
|
17977
18323
|
|
|
17978
18324
|
```ts
|
|
17979
|
-
|
|
18325
|
+
function GridGlyph({ ref, size, ...rest }: GlyphProps): import("react").JSX.Element;
|
|
17980
18326
|
```
|
|
17981
18327
|
|
|
17982
18328
|
Used on [CommandPalette](#/commandpalette).
|
|
@@ -17987,7 +18333,7 @@ The grip a drag is taken by: two grooves. Dots are fill, and point 4 of
|
|
|
17987
18333
|
the specification draws with the stroke.
|
|
17988
18334
|
|
|
17989
18335
|
```ts
|
|
17990
|
-
|
|
18336
|
+
function GripGlyph({ ref, size, ...rest }: GlyphProps): import("react").JSX.Element;
|
|
17991
18337
|
```
|
|
17992
18338
|
|
|
17993
18339
|
##### `Heading`
|
|
@@ -18033,7 +18379,7 @@ Measuring: a line with two end marks. Not a ruler with a scale: the teeth
|
|
|
18033
18379
|
would be a grey stripe at ten nominal units.
|
|
18034
18380
|
|
|
18035
18381
|
```ts
|
|
18036
|
-
|
|
18382
|
+
function MeasureGlyph({ ref, size, ...rest }: GlyphProps): import("react").JSX.Element;
|
|
18037
18383
|
```
|
|
18038
18384
|
|
|
18039
18385
|
##### `Menu`
|
|
@@ -18054,7 +18400,7 @@ Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [IconButton](#/icon
|
|
|
18054
18400
|
Fine dividing line between groups of menu entries.
|
|
18055
18401
|
|
|
18056
18402
|
```ts
|
|
18057
|
-
|
|
18403
|
+
function MenuSeparator({ ref, className, ...rest }: HTMLAttributes<HTMLDivElement> & RefProp<HTMLDivElement>): import("react").JSX.Element;
|
|
18058
18404
|
```
|
|
18059
18405
|
|
|
18060
18406
|
Used on [Scenarios](#/), [IconButton](#/iconbutton), [ButtonGroup](#/buttongroup), [Menu](#/menu) and [ContextMenu](#/contextmenu).
|
|
@@ -18070,7 +18416,7 @@ Used on [Scenarios](#/), [Drawer](#/drawer) and [Meter](#/meter).
|
|
|
18070
18416
|
The minus of `NumberInput`'s step buttons.
|
|
18071
18417
|
|
|
18072
18418
|
```ts
|
|
18073
|
-
|
|
18419
|
+
function MinusGlyph({ ref, size, ...rest }: GlyphProps): import("react").JSX.Element;
|
|
18074
18420
|
```
|
|
18075
18421
|
|
|
18076
18422
|
Used on [IconButton](#/iconbutton).
|
|
@@ -18087,7 +18433,7 @@ The content of a `Modal` or `Drawer` - the part that scrolls while head and
|
|
|
18087
18433
|
foot stand fast.
|
|
18088
18434
|
|
|
18089
18435
|
```ts
|
|
18090
|
-
|
|
18436
|
+
function ModalBody({ ref, className, children, ...rest }: HTMLAttributes<HTMLDivElement> & RefProp<HTMLDivElement>): import("react").JSX.Element;
|
|
18091
18437
|
```
|
|
18092
18438
|
|
|
18093
18439
|
Used on [Scenarios](#/), [Sizes](#/sizes), [Modal](#/modal) and [Drawer](#/drawer).
|
|
@@ -18097,7 +18443,7 @@ Used on [Scenarios](#/), [Sizes](#/sizes), [Modal](#/modal) and [Drawer](#/drawe
|
|
|
18097
18443
|
The foot of a `Modal` or `Drawer`, for its buttons; they stand at the end.
|
|
18098
18444
|
|
|
18099
18445
|
```ts
|
|
18100
|
-
|
|
18446
|
+
function ModalFooter({ ref, className, children, ...rest }: HTMLAttributes<HTMLDivElement> & RefProp<HTMLDivElement>): import("react").JSX.Element;
|
|
18101
18447
|
```
|
|
18102
18448
|
|
|
18103
18449
|
Used on [Scenarios](#/), [Sizes](#/sizes), [Modal](#/modal) and [Drawer](#/drawer).
|
|
@@ -18126,7 +18472,7 @@ Used on [Scenarios](#/), [Sizes](#/sizes), [Language](#/language), [FormField](#
|
|
|
18126
18472
|
The plus of `NumberInput`'s step buttons.
|
|
18127
18473
|
|
|
18128
18474
|
```ts
|
|
18129
|
-
|
|
18475
|
+
function PlusGlyph({ ref, size, ...rest }: GlyphProps): import("react").JSX.Element;
|
|
18130
18476
|
```
|
|
18131
18477
|
|
|
18132
18478
|
Used on [IconButton](#/iconbutton).
|
|
@@ -18237,7 +18583,7 @@ The row of `Tab`s inside `Tabs`. The arrow keys, Home and End move
|
|
|
18237
18583
|
between the tabs and choose them.
|
|
18238
18584
|
|
|
18239
18585
|
```ts
|
|
18240
|
-
|
|
18586
|
+
function TabList({ ref, className, children, onKeyDown, ...rest }: HTMLAttributes<HTMLDivElement> & RefProp<HTMLDivElement>): import("react").JSX.Element;
|
|
18241
18587
|
```
|
|
18242
18588
|
|
|
18243
18589
|
Used on [Scenarios](#/) and [Tabs](#/tabs).
|
|
@@ -18273,7 +18619,7 @@ Used on [Scenarios](#/), [EmptyState](#/emptystate) and [Tag](#/tag).
|
|
|
18273
18619
|
[Typography](#/typography) – Body text from the token set; `as` chooses the element, independent of the
|
|
18274
18620
|
size.
|
|
18275
18621
|
|
|
18276
|
-
Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [Theming](#/theming), [Sizes](#/sizes), [Language](#/language), [Stack and Grid](#/stack-and-grid), [Divider](#/divider), [Card](#/card), [Splitter](#/splitter), [Typography](#/typography), [VisuallyHidden](#/visuallyhidden), [Button](#/button), [IconButton](#/iconbutton), [ButtonGroup](#/buttongroup), [Input](#/input), [FormField](#/formfield), [Textarea](#/textarea), [NumberInput](#/numberinput), [Slider](#/slider), [Switch](#/switch), [SegmentedControl](#/segmentedcontrol), [FileInput](#/fileinput), [Select](#/select), [Combobox](#/combobox), [MultiSelect](#/multiselect), [DatePicker](#/datepicker), [DateTimePicker](#/datetimepicker), [DateRangePicker](#/daterangepicker), [DateTimeRangePicker](#/datetimerangepicker), [Spinner](#/spinner), [ProgressBar](#/progressbar), [Skeleton](#/skeleton), [Toast](#/toast), [EmptyState](#/emptystate), [Tooltip](#/tooltip), [Popover](#/popover), [Menu](#/menu), [ContextMenu](#/contextmenu), [Modal](#/modal), [Drawer](#/drawer), [ConfirmDialog](#/confirmdialog), [CommandPalette](#/commandpalette), [Breadcrumb](#/breadcrumb), [Tabs](#/tabs), [Accordion](#/accordion), [Stepper](#/stepper), [TreeView](#/treeview), [Badge](#/badge), [Tag](#/tag), [Stat](#/stat), [Meter](#/meter) and [Sparkline](#/sparkline).
|
|
18622
|
+
Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [Theming](#/theming), [Sizes](#/sizes), [Language](#/language), [Stack and Grid](#/stack-and-grid), [Divider](#/divider), [Card](#/card), [Splitter](#/splitter), [Typography](#/typography), [VisuallyHidden](#/visuallyhidden), [Button](#/button), [IconButton](#/iconbutton), [ButtonGroup](#/buttongroup), [Input](#/input), [FormField](#/formfield), [Textarea](#/textarea), [NumberInput](#/numberinput), [Slider](#/slider), [Switch](#/switch), [SegmentedControl](#/segmentedcontrol), [FileInput](#/fileinput), [Select](#/select), [Combobox](#/combobox), [MultiSelect](#/multiselect), [DatePicker](#/datepicker), [DateTimePicker](#/datetimepicker), [DateRangePicker](#/daterangepicker), [DateTimeRangePicker](#/datetimerangepicker), [Spinner](#/spinner), [ProgressBar](#/progressbar), [Skeleton](#/skeleton), [Toast](#/toast), [EmptyState](#/emptystate), [Tooltip](#/tooltip), [Popover](#/popover), [Menu](#/menu), [ContextMenu](#/contextmenu), [Modal](#/modal), [Drawer](#/drawer), [ConfirmDialog](#/confirmdialog), [CommandPalette](#/commandpalette), [Breadcrumb](#/breadcrumb), [Tabs](#/tabs), [Accordion](#/accordion), [Stepper](#/stepper), [TreeView](#/treeview), [Benchmark](#/benchmark), [Badge](#/badge), [Tag](#/tag), [Stat](#/stat), [Meter](#/meter) and [Sparkline](#/sparkline).
|
|
18277
18623
|
|
|
18278
18624
|
##### `Textarea`
|
|
18279
18625
|
|
|
@@ -18312,7 +18658,7 @@ Used on [TreeView](#/treeview).
|
|
|
18312
18658
|
|
|
18313
18659
|
[TreeView](#/treeview) – A hierarchy the user expands, walks with the keys and optionally ticks (also called a tree or outline). Reach for it for folders, teams and cost-centre structures; large trees stay quick because only the visible rows are drawn.
|
|
18314
18660
|
|
|
18315
|
-
Used on [Scenarios](#/)
|
|
18661
|
+
Used on [Scenarios](#/), [TreeView](#/treeview) and [Benchmark](#/benchmark).
|
|
18316
18662
|
|
|
18317
18663
|
##### `UmrissProvider`
|
|
18318
18664
|
|
|
@@ -18450,7 +18796,7 @@ restored from a link.
|
|
|
18450
18796
|
function useTree<K, S extends Key = string>(roots: readonly K[], options: TreeOptions<K, S>): Tree<K, S>;
|
|
18451
18797
|
```
|
|
18452
18798
|
|
|
18453
|
-
Used on [Scenarios](#/)
|
|
18799
|
+
Used on [Scenarios](#/), [TreeView](#/treeview) and [Benchmark](#/benchmark).
|
|
18454
18800
|
|
|
18455
18801
|
##### `useUmriss`
|
|
18456
18802
|
|
|
@@ -18473,6 +18819,8 @@ adds up over many rows to a scrollbar that lies.
|
|
|
18473
18819
|
function useVirtual(count: number, options: VirtualOptions): VirtualRows;
|
|
18474
18820
|
```
|
|
18475
18821
|
|
|
18822
|
+
Used on [Benchmark](#/benchmark).
|
|
18823
|
+
|
|
18476
18824
|
##### `useWording`
|
|
18477
18825
|
|
|
18478
18826
|
Only the wording.
|
|
@@ -18955,7 +19303,7 @@ among its siblings.
|
|
|
18955
19303
|
|
|
18956
19304
|
| Prop | Type | Default | Description |
|
|
18957
19305
|
|---|---|---|---|
|
|
18958
|
-
| `node` *required* | `K` | — | <br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and
|
|
19306
|
+
| `node` *required* | `K` | — | <br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and 5 more |
|
|
18959
19307
|
| `key` *required* | `S` | — | |
|
|
18960
19308
|
| `level` *required* | `number` | — | Roots stand at 0. Drives the indentation and what is read out. |
|
|
18961
19309
|
| `label` *required* | `string` | — | The node's text; here, so that typeahead can be a pure function over the flattening and needs no reader. |
|
|
@@ -19039,6 +19387,7 @@ The props of a glyph: an SVG's attributes and its edge length.
|
|
|
19039
19387
|
| Prop | Type | Default | Description |
|
|
19040
19388
|
|---|---|---|---|
|
|
19041
19389
|
| `size` | `number` | `12` | Edge length in pixels. The default is the size the glyph is drawn at in the components. |
|
|
19390
|
+
| `ref` | `Ref<SVGSVGElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
19042
19391
|
|
|
19043
19392
|
Also takes every attribute of `<svg>` – without `children`, `viewBox`.
|
|
19044
19393
|
|
|
@@ -19190,14 +19539,14 @@ thereby stays entirely the caller's.
|
|
|
19190
19539
|
|
|
19191
19540
|
| Prop | Type | Default | Description |
|
|
19192
19541
|
|---|---|---|---|
|
|
19193
|
-
| `key` *required* | `(node: K) => S` | — | <br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and
|
|
19194
|
-
| `children` *required* | `(node: K) => readonly K[] \| undefined` | — | `undefined` means leaf, an empty list means empty branch - the difference is visible and intended.<br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and
|
|
19195
|
-
| `label` *required* | `(node: K) => string` | — | Text the search checks against.<br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and
|
|
19542
|
+
| `key` *required* | `(node: K) => S` | — | <br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and 5 more |
|
|
19543
|
+
| `children` *required* | `(node: K) => readonly K[] \| undefined` | — | `undefined` means leaf, an empty list means empty branch - the difference is visible and intended.<br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and 5 more |
|
|
19544
|
+
| `label` *required* | `(node: K) => string` | — | Text the search checks against.<br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and 5 more |
|
|
19196
19545
|
| `disabled` | `(node: K) => boolean` | — | May this node be checked? Without an answer: everyone may. Disabled is a statement about the checkbox, not about the node - it stays navigable ([ADR-0005](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0005-what-cannot-be-checked.md)).<br>Shown in: [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal) |
|
|
19197
19546
|
| `unloaded` | `(node: K) => boolean` | — | Can this branch have children that are not present? Without an answer: no.<br>Shown in: [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand), [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal) |
|
|
19198
19547
|
| `matches` | `(node: K) => boolean` | — | Does this node match? Given, it filters instead of the search text, which is then not read - a table matches by its columns and filters, not by one label. The path rule stays the same. |
|
|
19199
19548
|
|
|
19200
|
-
Used on [Scenarios](#/)
|
|
19549
|
+
Used on [Scenarios](#/), [TreeView](#/treeview) and [Benchmark](#/benchmark).
|
|
19201
19550
|
|
|
19202
19551
|
##### `NumberInputProps`
|
|
19203
19552
|
|
|
@@ -19244,6 +19593,14 @@ the moment of the click.
|
|
|
19244
19593
|
| `label` *required* | `string` | — | <br>Shown in: [Presets (DateRangePicker)](#/daterangepicker/presets) |
|
|
19245
19594
|
| `range` *required* | `() => `[`DateRange`](#type-DateRange) | — | <br>Shown in: [Presets (DateRangePicker)](#/daterangepicker/presets) |
|
|
19246
19595
|
|
|
19596
|
+
##### `RefProp<E extends Element>`
|
|
19597
|
+
|
|
19598
|
+
The `ref` of a component: the element it renders at its root.
|
|
19599
|
+
|
|
19600
|
+
| Prop | Type | Default | Description |
|
|
19601
|
+
|---|---|---|---|
|
|
19602
|
+
| `ref` | `Ref<E>` | — | Receives the component's root element.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
19603
|
+
|
|
19247
19604
|
##### `RowPlacement`
|
|
19248
19605
|
|
|
19249
19606
|
What `scrollForRow` needs to know about a scroll area.
|
|
@@ -19525,16 +19882,16 @@ either uncontrolled (`default…`) or controlled with its `on…` handler.
|
|
|
19525
19882
|
|
|
19526
19883
|
| Prop | Type | Default | Description |
|
|
19527
19884
|
|---|---|---|---|
|
|
19528
|
-
| `reader` *required* | [`NodeReader`](#type-NodeReader)`<K, S>` | — | <br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and
|
|
19529
|
-
| `defaultExpanded` | `Iterable<S>` | — | Initial values, where the tree holds its own state.<br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [With an error (TreeView)](#/treeview/with-an-error) and
|
|
19885
|
+
| `reader` *required* | [`NodeReader`](#type-NodeReader)`<K, S>` | — | <br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and 5 more |
|
|
19886
|
+
| `defaultExpanded` | `Iterable<S>` | — | Initial values, where the tree holds its own state.<br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [With an error (TreeView)](#/treeview/with-an-error) and 3 more |
|
|
19530
19887
|
| `expanded` | `ReadonlySet<S>` | — | Controlled from outside; where set, it wins over the tree's own state. |
|
|
19531
19888
|
| `defaultChecked` | `Iterable<S>` | — | |
|
|
19532
19889
|
| `checked` | `ReadonlySet<S>` | — | <br>Shown in: [Tick a selection (TreeView)](#/treeview/tick-a-selection), [With an error (TreeView)](#/treeview/with-an-error), [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal) |
|
|
19533
|
-
| `defaultActive` | `S \| null` | — | <br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal) |
|
|
19890
|
+
| `defaultActive` | `S \| null` | — | <br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal), [Measure a large tree (Benchmark)](#/benchmark/benchmark) |
|
|
19534
19891
|
| `active` | `S \| null` | — | <br>Shown in: [Dispatch a tour (Scenarios)](#/scenarios/dispatch-a-tour) |
|
|
19535
19892
|
| `anchor` | `S \| null` | — | Where a range gesture spans from. Steerable from outside like the other four values, so that a range is repeatable. |
|
|
19536
19893
|
| `search` | `string` | — | <br>Shown in: [Search with the path (TreeView)](#/treeview/search-with-the-path), [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal) |
|
|
19537
|
-
| `virtual` | [`VirtualOptions`](#type-VirtualOptions) | — | Render only what stands in the scroll area. Optional: without it every row is rendered and no row height is needed.<br>Shown in: [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal) |
|
|
19894
|
+
| `virtual` | [`VirtualOptions`](#type-VirtualOptions) | — | Render only what stands in the scroll area. Optional: without it every row is rendered and no row height is needed.<br>Shown in: [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal), [Measure a large tree (Benchmark)](#/benchmark/benchmark) |
|
|
19538
19895
|
|
|
19539
19896
|
###### Events
|
|
19540
19897
|
|
|
@@ -19605,7 +19962,7 @@ The options of `useVirtual`.
|
|
|
19605
19962
|
|
|
19606
19963
|
| Prop | Type | Default | Description |
|
|
19607
19964
|
|---|---|---|---|
|
|
19608
|
-
| `rowHeight` *required* | `number` | — | Expected row height in pixels. It is re-measured on a real row after the first render; the value given is the starting point, so that the first window is not empty.<br>Shown in: [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal) |
|
|
19965
|
+
| `rowHeight` *required* | `number` | — | Expected row height in pixels. It is re-measured on a real row after the first render; the value given is the starting point, so that the first window is not empty.<br>Shown in: [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal), [Measure a large tree (Benchmark)](#/benchmark/benchmark) |
|
|
19609
19966
|
| `overscan` | `number` | `4` | Rows above and below the visible area. |
|
|
19610
19967
|
|
|
19611
19968
|
##### `VirtualRows`
|