@umriss-ui/core 0.52.0 → 0.54.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/API.md +12 -21
- package/CHANGELOG.md +34 -0
- package/dist/core.js +3361 -3356
- package/dist/index.d.ts +38 -33
- package/docs/llms-full.md +94 -156
- package/package.json +1 -1
package/docs/llms-full.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @umriss-ui/core 0.
|
|
1
|
+
# @umriss-ui/core 0.54.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
|
|
|
@@ -53,7 +53,7 @@ From `ButtonProps` — the full table stands on [Button](#button).
|
|
|
53
53
|
- No font is loaded or bundled.
|
|
54
54
|
- Chrome 123, Firefox 120 and Safari 17.5 or newer; an older browser discards the tokens and shows the components unstyled.
|
|
55
55
|
|
|
56
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
56
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
57
57
|
|
|
58
58
|
### UmrissProvider
|
|
59
59
|
|
|
@@ -264,7 +264,7 @@ type ToastPosition = "top-start" | "top-center" | "top-end" | "bottom-start" | "
|
|
|
264
264
|
|
|
265
265
|
- No theme and no default variants for components: a component is configured by its own props.
|
|
266
266
|
|
|
267
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
267
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
268
268
|
|
|
269
269
|
## Customising
|
|
270
270
|
|
|
@@ -820,7 +820,7 @@ From `StatProps` — the full table stands on [Stat](#stat).
|
|
|
820
820
|
- A token that names another resolves where it is declared: set `--u-color-accent` on a region, and `--u-focus-ring`, which names it on `:root`, still draws the application's accent there. Set the naming token in the region too.
|
|
821
821
|
- A panel opened in a portal - a popover, a tooltip, a toast - takes the tokens and the `color-scheme` of the place it lands, not of the region it was opened from; inside a dialog the toasts take the tokens of the dialog's place. Give [UmrissProvider](#umrissprovider) a `portalTarget` inside the region, or override on `:root` - as for the toasts' distance from the window's edge and its sides, `--u-toast-inset-top`, `--u-toast-inset-bottom`, `--u-toast-inset-start` and `--u-toast-inset-end`.
|
|
822
822
|
|
|
823
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
823
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
824
824
|
|
|
825
825
|
### Sizes
|
|
826
826
|
|
|
@@ -1238,7 +1238,7 @@ type ControlSize = "sm" | "md";
|
|
|
1238
1238
|
- A field does not grow to fill a row: give it room with the row's own layout (`flex: 1` on its FormField, or a grid).
|
|
1239
1239
|
- A place that sizes itself by its content and has no width to stop at - an `auto` grid track, an inline block, a row that does not wrap - gives a field at least its natural width, as it gives a native input its own; on a narrow screen let such a row wrap, or size the track with `minmax(0, auto)`.
|
|
1240
1240
|
|
|
1241
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
1241
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
1242
1242
|
|
|
1243
1243
|
### Language
|
|
1244
1244
|
|
|
@@ -2577,10 +2577,10 @@ Everything the library puts out as text.
|
|
|
2577
2577
|
|
|
2578
2578
|
#### Known limits
|
|
2579
2579
|
|
|
2580
|
-
- Two languages ship; a third is a `Wording` object of your own. No right-to-left ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
2580
|
+
- Two languages ship; a third is a `Wording` object of your own. No right-to-left ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md)).
|
|
2581
2581
|
- It holds only what the components say themselves; your labels, titles and data are yours to translate.
|
|
2582
2582
|
|
|
2583
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
2583
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
2584
2584
|
|
|
2585
2585
|
## Layout
|
|
2586
2586
|
|
|
@@ -2927,7 +2927,7 @@ type GridColumnWidth = number | "fill";
|
|
|
2927
2927
|
- No breakpoints and no responsive props: a grid follows the width through `minItemWidth`, anything else is your stylesheet's.
|
|
2928
2928
|
- Tiles are not arranged by the user: for a dashboard the reader arranges, see `@umriss-ui/dashboard` ([ADR-0064](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0064-a-dashboard-a-user-arranges-is-a-sequence-on-fixed-columns.md)).
|
|
2929
2929
|
|
|
2930
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
2930
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
2931
2931
|
|
|
2932
2932
|
### Divider
|
|
2933
2933
|
|
|
@@ -3479,7 +3479,7 @@ export default function OneAboveTheOther() {
|
|
|
3479
3479
|
|
|
3480
3480
|
##### Keep the share
|
|
3481
3481
|
|
|
3482
|
-
Control `value` with `
|
|
3482
|
+
Control `value` with `onValueChange` to keep the share in the user's settings, or to set it from a button. Focus the separator and the arrow keys move it by `step`, here ten per cent at a time.
|
|
3483
3483
|
|
|
3484
3484
|
```tsx
|
|
3485
3485
|
import { useState } from "react";
|
|
@@ -3502,7 +3502,7 @@ export default function KeepTheShare() {
|
|
|
3502
3502
|
</Text>
|
|
3503
3503
|
</Stack>
|
|
3504
3504
|
<Card style={{ height: 180 }}>
|
|
3505
|
-
<Splitter value={share}
|
|
3505
|
+
<Splitter value={share} onValueChange={setShare} min={20} max={80} step={10} separatorLabel="People" style={{ height: "100%" }}>
|
|
3506
3506
|
<div style={{ padding: 16 }}>
|
|
3507
3507
|
<Text size="sm">People of the Web team</Text>
|
|
3508
3508
|
</div>
|
|
@@ -3732,6 +3732,7 @@ export default function ThreePanes() {
|
|
|
3732
3732
|
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | How the two panes stand: `horizontal` side by side, `vertical` one above the other - a trend above, its alarms below.<br>Shown in: [One above the other](#splitter), [Three panes](#splitter) |
|
|
3733
3733
|
| `defaultValue` | `number` | `50` | Uncontrolled: the share to start at.<br>Shown in: [Two panes](#splitter), [One above the other](#splitter), [Three panes](#splitter) |
|
|
3734
3734
|
| `value` | `number` | — | Controlled: the first pane's share of the room, in per cent.<br>Shown in: [Keep the share](#splitter) |
|
|
3735
|
+
| `onValueChange` | `(value: number) => void` | — | Reports every move, by pointer or key, as the first pane's share.<br>Shown in: [Keep the share](#splitter) |
|
|
3735
3736
|
| `min` | `number` | `0` | The smallest share of the first pane, and where Enter collapses it to.<br>Shown in: [One above the other](#splitter), [Keep the share](#splitter), [Three panes](#splitter) |
|
|
3736
3737
|
| `max` | `number` | `100` | The largest share of the first pane.<br>Shown in: [One above the other](#splitter), [Keep the share](#splitter), [Three panes](#splitter) |
|
|
3737
3738
|
| `step` | `number` | `5` | How far an arrow key moves the separator, in per cent.<br>Shown in: [Keep the share](#splitter) |
|
|
@@ -3739,12 +3740,6 @@ export default function ThreePanes() {
|
|
|
3739
3740
|
| `children` *required* | `[ReactNode, ReactNode]` | — | The first pane and the second, in this order.<br>Shown in: [Two panes](#splitter), [One above the other](#splitter), [Keep the share](#splitter) and 1 more |
|
|
3740
3741
|
| `ref` | `Ref<HTMLDivElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
3741
3742
|
|
|
3742
|
-
###### Events
|
|
3743
|
-
|
|
3744
|
-
| Prop | Type | Default | Description |
|
|
3745
|
-
|---|---|---|---|
|
|
3746
|
-
| `onChange` | `(value: number) => void` | — | Reports every move, by pointer or key, as the first pane's share.<br>Shown in: [Keep the share](#splitter) |
|
|
3747
|
-
|
|
3748
3743
|
Also takes every attribute of `<div>` – without `children`, `defaultValue`, `onChange`.
|
|
3749
3744
|
|
|
3750
3745
|
#### Known limits
|
|
@@ -3752,7 +3747,7 @@ Also takes every attribute of `<div>` – without `children`, `defaultValue`, `o
|
|
|
3752
3747
|
- Two panes per splitter, no more. Tiles are not arranged by the user: for a dashboard the reader arranges, see `@umriss-ui/dashboard` ([ADR-0064](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0064-a-dashboard-a-user-arranges-is-a-sequence-on-fixed-columns.md)).
|
|
3753
3748
|
- It does not remember the share beyond its own life; keep it in the user's settings through `value` and `onChange`.
|
|
3754
3749
|
|
|
3755
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
3750
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
3756
3751
|
|
|
3757
3752
|
## Typography
|
|
3758
3753
|
|
|
@@ -4188,10 +4183,10 @@ type TextLeading = "normal" | "tight";
|
|
|
4188
4183
|
#### Known limits
|
|
4189
4184
|
|
|
4190
4185
|
- No truncation and no line length: both depend on the column, which only the application knows.
|
|
4191
|
-
- No prose styles for lists, quotes or rich text ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
4186
|
+
- No prose styles for lists, quotes or rich text ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md)).
|
|
4192
4187
|
- `Link` renders a plain `a` and knows no router; pass it the address your router resolves.
|
|
4193
4188
|
|
|
4194
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
4189
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
4195
4190
|
|
|
4196
4191
|
### VisuallyHidden
|
|
4197
4192
|
|
|
@@ -4315,7 +4310,7 @@ Also takes every attribute of the chosen element – without `as`, `ref`.
|
|
|
4315
4310
|
|
|
4316
4311
|
- It hides from the eye only; to hide something from everyone, do not render it.
|
|
4317
4312
|
|
|
4318
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
4313
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
4319
4314
|
|
|
4320
4315
|
## Actions
|
|
4321
4316
|
|
|
@@ -4644,7 +4639,7 @@ type ControlSize = "sm" | "md";
|
|
|
4644
4639
|
- The label stays on one line; keep it short rather than let it wrap.
|
|
4645
4640
|
- No icon slot: an icon goes among the children, before the label, and the button sets its size.
|
|
4646
4641
|
|
|
4647
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
4642
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
4648
4643
|
|
|
4649
4644
|
### IconButton
|
|
4650
4645
|
|
|
@@ -5001,7 +4996,7 @@ type ControlSize = "sm" | "md";
|
|
|
5001
4996
|
- The tooltip always shows the name; a hint that says more than the name is a `Tooltip` around a `Button`.
|
|
5002
4997
|
- A touch screen shows no tooltip: choose icons whose meaning is common, or a `Button` with a label.
|
|
5003
4998
|
|
|
5004
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
4999
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
5005
5000
|
|
|
5006
5001
|
### ButtonGroup
|
|
5007
5002
|
|
|
@@ -5361,7 +5356,7 @@ type ControlSize = "sm" | "md";
|
|
|
5361
5356
|
|
|
5362
5357
|
- No toggle or segmented state; a choice that stays is a radio group.
|
|
5363
5358
|
|
|
5364
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
5359
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
5365
5360
|
|
|
5366
5361
|
## Forms
|
|
5367
5362
|
|
|
@@ -5718,7 +5713,7 @@ Also takes every attribute of `<input>` – without `size`, `value`.
|
|
|
5718
5713
|
- No input masks or formatting while typing; check the value on leave or on submit.
|
|
5719
5714
|
- No validation of its own: the error is the application's, handed to the `FormField`.
|
|
5720
5715
|
|
|
5721
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
5716
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
5722
5717
|
|
|
5723
5718
|
### FormField
|
|
5724
5719
|
|
|
@@ -6044,7 +6039,7 @@ Also takes every attribute of `<div>`.
|
|
|
6044
6039
|
- No validation: the caller's form library decides; pass `error` ([ADR-0060](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0060-validation-and-a-layout-editor-are-never-time-zones-not-yet.md)). No form state and no submit handling either.
|
|
6045
6040
|
- One field per `FormField`; a group of fields that share one label is a fieldset of your own.
|
|
6046
6041
|
|
|
6047
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
6042
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
6048
6043
|
|
|
6049
6044
|
### Textarea
|
|
6050
6045
|
|
|
@@ -6234,7 +6229,7 @@ Also takes every attribute of `<textarea>` – without `cols`, `value`.
|
|
|
6234
6229
|
|
|
6235
6230
|
- Plain text only: no formatting, mentions or rich text.
|
|
6236
6231
|
|
|
6237
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
6232
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
6238
6233
|
|
|
6239
6234
|
### NumberInput
|
|
6240
6235
|
|
|
@@ -6487,12 +6482,6 @@ export default function YearWithoutGrouping() {
|
|
|
6487
6482
|
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [States and a form (TimeInput)](#timeinput) |
|
|
6488
6483
|
| `formValue` | `(value: number) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield) |
|
|
6489
6484
|
|
|
6490
|
-
###### Events
|
|
6491
|
-
|
|
6492
|
-
| Prop | Type | Default | Description |
|
|
6493
|
-
|---|---|---|---|
|
|
6494
|
-
| `onChange` | `(value: number \| null) => void` | — | *Deprecated* since 0.52 - use `onValueChange`; it goes in the next minor release. The former name of `onValueChange`. From `DeprecatedOnChange`. |
|
|
6495
|
-
|
|
6496
6485
|
Also takes every attribute of `<input>` – without `defaultValue`, `name`, `onChange`, `prefix`, `size`, `type`, `value`.
|
|
6497
6486
|
|
|
6498
6487
|
#### Known limits
|
|
@@ -6500,7 +6489,7 @@ Also takes every attribute of `<input>` – without `defaultValue`, `name`, `onC
|
|
|
6500
6489
|
- No expressions: “12*4” is not calculated.
|
|
6501
6490
|
- No currency conversion; the unit is a label.
|
|
6502
6491
|
|
|
6503
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
6492
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
6504
6493
|
|
|
6505
6494
|
### Slider
|
|
6506
6495
|
|
|
@@ -6663,7 +6652,7 @@ export default function SplitABudget() {
|
|
|
6663
6652
|
|---|---|---|---|
|
|
6664
6653
|
| `defaultValue` | `number` | `min` | Uncontrolled: the value to start at.<br>Shown in: [Configurator](#slider), [Slider](#slider), [Units and marks](#slider) |
|
|
6665
6654
|
| `value` | `number` | — | Controlled: the value; `undefined` reads as `min`.<br>Shown in: [Set roughly, then exactly](#slider), [Split a budget](#slider), [Browse down and back up (Breadcrumb)](#breadcrumb) and 2 more |
|
|
6666
|
-
| `onValueChange` | `(value: number) => void` | — | Reports every change, by pointer or key, as a number on the step.<br>Shown in: [Set roughly, then exactly](#slider), [Split a budget](#slider), [Browse down and back up (Breadcrumb)](#breadcrumb) and 2 more |
|
|
6655
|
+
| `onValueChange` | `(value: number) => void` | — | Reports every change, by pointer or key, as a number on the step; `onChange` is the input's native event.<br>Shown in: [Set roughly, then exactly](#slider), [Split a budget](#slider), [Browse down and back up (Breadcrumb)](#breadcrumb) and 2 more |
|
|
6667
6656
|
| `min` | `number` | `0` | The smallest value.<br>Shown in: [Configurator](#slider), [Slider](#slider), [Units and marks](#slider) and 4 more |
|
|
6668
6657
|
| `max` | `number` | `100` | The largest value.<br>Shown in: [Configurator](#slider), [Slider](#slider), [Units and marks](#slider) and 4 more |
|
|
6669
6658
|
| `step` | `number` | `1` | The step the value moves by, by pointer or key.<br>Shown in: [Configurator](#slider), [Slider](#slider), [Units and marks](#slider) and 3 more |
|
|
@@ -6672,13 +6661,7 @@ export default function SplitABudget() {
|
|
|
6672
6661
|
| `showValue` | `boolean` | `true` | The value in mono beside the track.<br>Shown in: [Configurator](#slider), [Units and marks](#slider), [Set roughly, then exactly](#slider) and 1 more |
|
|
6673
6662
|
| `ref` | `Ref<HTMLInputElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
6674
6663
|
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
| Prop | Type | Default | Description |
|
|
6678
|
-
|---|---|---|---|
|
|
6679
|
-
| `onChange` | `(value: number) => void` | — | *Deprecated* since 0.52 - use `onValueChange`; it goes in the next minor release. The former name of `onValueChange`. From `DeprecatedOnChange`. |
|
|
6680
|
-
|
|
6681
|
-
Also takes every attribute of `<input>` – without `defaultValue`, `max`, `min`, `onChange`, `step`, `type`, `value`.
|
|
6664
|
+
Also takes every attribute of `<input>` – without `defaultValue`, `max`, `min`, `step`, `type`, `value`.
|
|
6682
6665
|
|
|
6683
6666
|
##### Types on this page
|
|
6684
6667
|
|
|
@@ -6695,7 +6678,7 @@ type SliderMark = number | { value: number; label?: ReactNode };
|
|
|
6695
6678
|
- One thumb: a range with two ends is the RangeSlider.
|
|
6696
6679
|
- Marks show values; they do not catch the thumb.
|
|
6697
6680
|
|
|
6698
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
6681
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
6699
6682
|
|
|
6700
6683
|
### RangeSlider
|
|
6701
6684
|
|
|
@@ -6836,7 +6819,7 @@ type RangeSliderValue = readonly [from: number, to: number];
|
|
|
6836
6819
|
- No marks on the track; use the Slider's where marks are needed.
|
|
6837
6820
|
- The ends may meet; no minimum gap between them is kept.
|
|
6838
6821
|
|
|
6839
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
6822
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
6840
6823
|
|
|
6841
6824
|
### Checkbox
|
|
6842
6825
|
|
|
@@ -7209,7 +7192,7 @@ Also takes every attribute of `<input>` – without `role`, `size`, `type`.
|
|
|
7209
7192
|
|
|
7210
7193
|
- No pending or loading state; while your application applies the change, disable the switch or say so beside it.
|
|
7211
7194
|
|
|
7212
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
7195
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
7213
7196
|
|
|
7214
7197
|
### RadioGroup
|
|
7215
7198
|
|
|
@@ -7367,12 +7350,6 @@ export default function States() {
|
|
|
7367
7350
|
| `name` | `string` | a generated one | Name of the radio group within the form. |
|
|
7368
7351
|
| `ref` | `Ref<HTMLDivElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
7369
7352
|
|
|
7370
|
-
###### Events
|
|
7371
|
-
|
|
7372
|
-
| Prop | Type | Default | Description |
|
|
7373
|
-
|---|---|---|---|
|
|
7374
|
-
| `onChange` | `(value: T) => void` | — | *Deprecated* since 0.52 - use `onValueChange`; it goes in the next minor release. The former name of `onValueChange`. From `DeprecatedOnChange`. |
|
|
7375
|
-
|
|
7376
7353
|
Also takes every attribute of `<div>` – without `defaultValue`, `onChange`.
|
|
7377
7354
|
|
|
7378
7355
|
##### `RadioOption<T extends string | number>`
|
|
@@ -7653,12 +7630,6 @@ export default function DrawnAsAField() {
|
|
|
7653
7630
|
| `name` | `string` | a generated one | Name of the radio group within the form. |
|
|
7654
7631
|
| `ref` | `Ref<HTMLDivElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
7655
7632
|
|
|
7656
|
-
###### Events
|
|
7657
|
-
|
|
7658
|
-
| Prop | Type | Default | Description |
|
|
7659
|
-
|---|---|---|---|
|
|
7660
|
-
| `onChange` | `(value: T) => void` | — | *Deprecated* since 0.52 - use `onValueChange`; it goes in the next minor release. The former name of `onValueChange`. From `DeprecatedOnChange`. |
|
|
7661
|
-
|
|
7662
7633
|
Also takes every attribute of `<div>` – without `defaultValue`, `onChange`.
|
|
7663
7634
|
|
|
7664
7635
|
##### `SegmentedOption<T extends string | number>`
|
|
@@ -7675,7 +7646,7 @@ Also takes every attribute of `<div>` – without `defaultValue`, `onChange`.
|
|
|
7675
7646
|
- Two to four short possibilities: a word that does not fit its place ends in an ellipsis.
|
|
7676
7647
|
- No icons and no line of explanation in a segment; several chosen at once is not this control.
|
|
7677
7648
|
|
|
7678
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
7649
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
7679
7650
|
|
|
7680
7651
|
### FileInput
|
|
7681
7652
|
|
|
@@ -8010,19 +7981,13 @@ export default function ProgressAndThumbnails() {
|
|
|
8010
7981
|
| `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) |
|
|
8011
7982
|
| `ref` | `Ref<HTMLInputElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
8012
7983
|
|
|
8013
|
-
###### Events
|
|
8014
|
-
|
|
8015
|
-
| Prop | Type | Default | Description |
|
|
8016
|
-
|---|---|---|---|
|
|
8017
|
-
| `onChange` | `(files: File[]) => void` | — | *Deprecated* since 0.52 - use `onValueChange`; it goes in the next minor release. The former name of `onValueChange`. From `DeprecatedOnChange`. |
|
|
8018
|
-
|
|
8019
7984
|
Also takes every attribute of `<input>` – without `defaultValue`, `onChange`, `size`, `type`, `value`.
|
|
8020
7985
|
|
|
8021
7986
|
#### Known limits
|
|
8022
7987
|
|
|
8023
7988
|
- No upload, no progress and no size limit of its own; those belong to the application sending the files.
|
|
8024
7989
|
|
|
8025
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
7990
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
8026
7991
|
|
|
8027
7992
|
## Choosing
|
|
8028
7993
|
|
|
@@ -8221,7 +8186,7 @@ Also takes every attribute of `<select>` – without `defaultValue`, `size`, `va
|
|
|
8221
8186
|
|
|
8222
8187
|
- The list shows the options' text: no icons, descriptions or search inside it - the Combobox searches.
|
|
8223
8188
|
|
|
8224
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
8189
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
8225
8190
|
|
|
8226
8191
|
### Combobox
|
|
8227
8192
|
|
|
@@ -8627,7 +8592,6 @@ export default function ANewValue() {
|
|
|
8627
8592
|
|---|---|---|---|
|
|
8628
8593
|
| `onSearch` | `(text: string) => void` | — | Runs on every change of the typed text - the clearing cross's too, with `""` - and not on opening or closing. For an application that fetches the matches itself: debounce and cancelling stale requests are yours.<br>Shown in: [Search with the server](#combobox) |
|
|
8629
8594
|
| `onCreate` | `(text: string) => void` | — | With `creatable`: runs when the typed text was taken as the value, so the application can add it to `options`.<br>Shown in: [A value that is new](#combobox) |
|
|
8630
|
-
| `onChange` | `(value: T \| null) => void` | — | *Deprecated* since 0.52 - use `onValueChange`; it goes in the next minor release. The former name of `onValueChange`. From `DeprecatedOnChange`. |
|
|
8631
8595
|
|
|
8632
8596
|
Also takes every attribute of `<input>` – without `defaultValue`, `onChange`.
|
|
8633
8597
|
|
|
@@ -8644,7 +8608,7 @@ Also takes every attribute of `<input>` – without `defaultValue`, `onChange`.
|
|
|
8644
8608
|
- Only an option can be chosen, unless `creatable` takes typed text as the value (string values only).
|
|
8645
8609
|
- No request of its own: `onSearch` reports the typed text and you fetch, debounce and cancel; `filter={false}` shows what you return.
|
|
8646
8610
|
|
|
8647
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
8611
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
8648
8612
|
|
|
8649
8613
|
### MultiSelect
|
|
8650
8614
|
|
|
@@ -8936,12 +8900,6 @@ export default function ThousandsOfAssets() {
|
|
|
8936
8900
|
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [States and a form (TimeInput)](#timeinput) |
|
|
8937
8901
|
| `formValue` | `(value: T) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield) |
|
|
8938
8902
|
|
|
8939
|
-
###### Events
|
|
8940
|
-
|
|
8941
|
-
| Prop | Type | Default | Description |
|
|
8942
|
-
|---|---|---|---|
|
|
8943
|
-
| `onChange` | `(value: T[]) => void` | — | *Deprecated* since 0.52 - use `onValueChange`; it goes in the next minor release. The former name of `onValueChange`. From `DeprecatedOnChange`. |
|
|
8944
|
-
|
|
8945
8903
|
Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
8946
8904
|
|
|
8947
8905
|
##### `MultiSelectOption<T extends string | number = string>`
|
|
@@ -9147,12 +9105,6 @@ export default function FromTheFirstReadingToToday() {
|
|
|
9147
9105
|
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [States and a form (TimeInput)](#timeinput) |
|
|
9148
9106
|
| `formValue` | `(value: Date) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield) |
|
|
9149
9107
|
|
|
9150
|
-
###### Events
|
|
9151
|
-
|
|
9152
|
-
| Prop | Type | Default | Description |
|
|
9153
|
-
|---|---|---|---|
|
|
9154
|
-
| `onChange` | `(date: Date \| null) => void` | — | *Deprecated* since 0.52 - use `onValueChange`; it goes in the next minor release. The former name of `onValueChange`. From `DeprecatedOnChange`. |
|
|
9155
|
-
|
|
9156
9108
|
Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
9157
9109
|
|
|
9158
9110
|
#### Known limits
|
|
@@ -9160,7 +9112,7 @@ Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
|
9160
9112
|
- No typing of a date into the field.
|
|
9161
9113
|
- umriss shows the reader's time ([ADR-0060](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0060-validation-and-a-layout-editor-are-never-time-zones-not-yet.md)).
|
|
9162
9114
|
|
|
9163
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
9115
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
9164
9116
|
|
|
9165
9117
|
### DateTimePicker
|
|
9166
9118
|
|
|
@@ -9324,19 +9276,13 @@ export default function WithAnError() {
|
|
|
9324
9276
|
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [States and a form (TimeInput)](#timeinput) |
|
|
9325
9277
|
| `formValue` | `(value: Date) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield) |
|
|
9326
9278
|
|
|
9327
|
-
###### Events
|
|
9328
|
-
|
|
9329
|
-
| Prop | Type | Default | Description |
|
|
9330
|
-
|---|---|---|---|
|
|
9331
|
-
| `onChange` | `(date: Date \| null) => void` | — | *Deprecated* since 0.52 - use `onValueChange`; it goes in the next minor release. The former name of `onValueChange`. From `DeprecatedOnChange`. |
|
|
9332
|
-
|
|
9333
9279
|
Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
9334
9280
|
|
|
9335
9281
|
#### Known limits
|
|
9336
9282
|
|
|
9337
9283
|
- umriss shows the reader's time ([ADR-0060](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0060-validation-and-a-layout-editor-are-never-time-zones-not-yet.md)).
|
|
9338
9284
|
|
|
9339
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
9285
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
9340
9286
|
|
|
9341
9287
|
### TimeInput
|
|
9342
9288
|
|
|
@@ -9454,7 +9400,7 @@ Also takes every attribute of `<input>` – without `defaultValue`, `max`, `min`
|
|
|
9454
9400
|
|
|
9455
9401
|
- No 12-hour clock and no time zone: a time of day is the text it is written as.
|
|
9456
9402
|
|
|
9457
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
9403
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
9458
9404
|
|
|
9459
9405
|
### DateRangePicker
|
|
9460
9406
|
|
|
@@ -9668,12 +9614,6 @@ export default function PresetsCutToABound() {
|
|
|
9668
9614
|
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [States and a form (TimeInput)](#timeinput) |
|
|
9669
9615
|
| `formValue` | `(value: Date) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield) |
|
|
9670
9616
|
|
|
9671
|
-
###### Events
|
|
9672
|
-
|
|
9673
|
-
| Prop | Type | Default | Description |
|
|
9674
|
-
|---|---|---|---|
|
|
9675
|
-
| `onChange` | `(range: DateRange \| null) => void` | — | *Deprecated* since 0.52 - use `onValueChange`; it goes in the next minor release. The former name of `onValueChange`. From `DeprecatedOnChange`. |
|
|
9676
|
-
|
|
9677
9617
|
Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
9678
9618
|
|
|
9679
9619
|
##### Types on this page
|
|
@@ -9703,7 +9643,7 @@ the moment of the click.
|
|
|
9703
9643
|
|
|
9704
9644
|
- One span; no list of separate days.
|
|
9705
9645
|
|
|
9706
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
9646
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
9707
9647
|
|
|
9708
9648
|
### DateTimeRangePicker
|
|
9709
9649
|
|
|
@@ -9889,12 +9829,6 @@ export default function WithAnError() {
|
|
|
9889
9829
|
| `name` | `string` | — | Posts the value under this name in a `<form>` (a hidden input), as a native control would; empty posts `""`. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield), [States and a form (TimeInput)](#timeinput) |
|
|
9890
9830
|
| `formValue` | `(value: Date) => string` | — | Replaces the default text a value is posted as. It is called with each value that is set - for a `MultiSelect` once per entry, for a range picker once per end - never for an empty field. From `FormPostProps`.<br>Shown in: [Post to a form (FormField)](#formfield) |
|
|
9891
9831
|
|
|
9892
|
-
###### Events
|
|
9893
|
-
|
|
9894
|
-
| Prop | Type | Default | Description |
|
|
9895
|
-
|---|---|---|---|
|
|
9896
|
-
| `onChange` | `(range: DateRange \| null) => void` | — | *Deprecated* since 0.52 - use `onValueChange`; it goes in the next minor release. The former name of `onValueChange`. From `DeprecatedOnChange`. |
|
|
9897
|
-
|
|
9898
9832
|
Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
9899
9833
|
|
|
9900
9834
|
##### Types on this page
|
|
@@ -9925,7 +9859,7 @@ the moment of the click.
|
|
|
9925
9859
|
- umriss shows the reader's time ([ADR-0060](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0060-validation-and-a-layout-editor-are-never-time-zones-not-yet.md)).
|
|
9926
9860
|
- No recurring windows.
|
|
9927
9861
|
|
|
9928
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
9862
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
9929
9863
|
|
|
9930
9864
|
## Feedback
|
|
9931
9865
|
|
|
@@ -10075,7 +10009,7 @@ Also takes every attribute of `<svg>`.
|
|
|
10075
10009
|
|
|
10076
10010
|
- One shape and no figure: for how far a job has come, use a [ProgressBar](#progressbar).
|
|
10077
10011
|
|
|
10078
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
10012
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
10079
10013
|
|
|
10080
10014
|
### ProgressBar
|
|
10081
10015
|
|
|
@@ -10258,7 +10192,7 @@ Also takes every attribute of `<div>`.
|
|
|
10258
10192
|
|
|
10259
10193
|
- No colour of verdict and no steps of its own; for a job in steps, stack one bar per step.
|
|
10260
10194
|
|
|
10261
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
10195
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
10262
10196
|
|
|
10263
10197
|
### Skeleton
|
|
10264
10198
|
|
|
@@ -10415,7 +10349,7 @@ Also takes every attribute of `<span>`.
|
|
|
10415
10349
|
|
|
10416
10350
|
- It draws a shape and nothing else; the rows, cards and layout it stands in for are yours.
|
|
10417
10351
|
|
|
10418
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
10352
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
10419
10353
|
|
|
10420
10354
|
### Alert
|
|
10421
10355
|
|
|
@@ -10633,7 +10567,7 @@ type AlertTone = "neutral" | "accent" | "success" | "warning" | "danger";
|
|
|
10633
10567
|
- No timer: an alert stays until you remove it. A message that goes by itself is a toast.
|
|
10634
10568
|
- No stack or queue of messages; place each alert where its matter is.
|
|
10635
10569
|
|
|
10636
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
10570
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
10637
10571
|
|
|
10638
10572
|
### Toast
|
|
10639
10573
|
|
|
@@ -11191,7 +11125,7 @@ type ToastCloseReason = "timeout" | "dismiss" | "action";
|
|
|
11191
11125
|
- No queue: a toast over the limit pushes the oldest timed one out rather than waiting. Lasting and `loading` toasts are not capped: the deck holds every one of them beside the timed ones.
|
|
11192
11126
|
- Without the Popover API the deck moves with a dialog that transforms itself: inside a dialog the toasts stand in the top layer only where the browser has it, and elsewhere they are a fixed box in the dialog.
|
|
11193
11127
|
|
|
11194
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
11128
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
11195
11129
|
|
|
11196
11130
|
### EmptyState
|
|
11197
11131
|
|
|
@@ -11499,7 +11433,7 @@ export default function ACalculation() {
|
|
|
11499
11433
|
- No interactive content and no rich layout inside: it is read, never used.
|
|
11500
11434
|
- No placement option: it stands above its element and flips below where there is no room.
|
|
11501
11435
|
|
|
11502
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
11436
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
11503
11437
|
|
|
11504
11438
|
### Popover
|
|
11505
11439
|
|
|
@@ -11801,7 +11735,7 @@ type Align = "start" | "end" | "center";
|
|
|
11801
11735
|
- No padding and no inner layout: it brings the overlay's surface - ground, corners, shadow - and the rest is yours. A `className` restates the surface where one needs another.
|
|
11802
11736
|
- It does not trap focus; a surface the user must answer is a [Modal](#modal).
|
|
11803
11737
|
|
|
11804
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
11738
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
11805
11739
|
|
|
11806
11740
|
### Menu
|
|
11807
11741
|
|
|
@@ -12038,7 +11972,7 @@ Also takes every attribute of `<button>` – without `onSelect`.
|
|
|
12038
11972
|
|
|
12039
11973
|
- No submenus, no checkable entries and no type-ahead.
|
|
12040
11974
|
|
|
12041
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
11975
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
12042
11976
|
|
|
12043
11977
|
### ContextMenu
|
|
12044
11978
|
|
|
@@ -12255,7 +12189,7 @@ export default function OnARow() {
|
|
|
12255
12189
|
- It listens to no right-click itself: the element and the point are yours, through the hook.
|
|
12256
12190
|
- No submenus, no checkable entries and no type-ahead, as in the menu.
|
|
12257
12191
|
|
|
12258
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
12192
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
12259
12193
|
|
|
12260
12194
|
### Modal
|
|
12261
12195
|
|
|
@@ -12712,7 +12646,7 @@ type ModalSize = "sm" | "md" | "lg";
|
|
|
12712
12646
|
|
|
12713
12647
|
- No non-modal window and no dragging or resizing: a panel that leaves the page usable is layout – a [Splitter](#splitter).
|
|
12714
12648
|
|
|
12715
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
12649
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
12716
12650
|
|
|
12717
12651
|
### Drawer
|
|
12718
12652
|
|
|
@@ -13145,7 +13079,7 @@ Also takes every attribute of `<dialog>` – without `onClose`.
|
|
|
13145
13079
|
- Modal on purpose, with no non-modal mode: a panel beside a page the user keeps working in is layout, not an overlay.
|
|
13146
13080
|
- Only the left and right edges; nothing slides in from the top or bottom.
|
|
13147
13081
|
|
|
13148
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
13082
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
13149
13083
|
|
|
13150
13084
|
### ConfirmDialog
|
|
13151
13085
|
|
|
@@ -13322,7 +13256,7 @@ Also takes every attribute of `<dialog>` – without `children`, `onClose`, `ope
|
|
|
13322
13256
|
|
|
13323
13257
|
- A title, a description and two buttons, nothing more: fields belong in a [Modal](#modal).
|
|
13324
13258
|
|
|
13325
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
13259
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
13326
13260
|
|
|
13327
13261
|
### CommandPalette
|
|
13328
13262
|
|
|
@@ -13624,7 +13558,7 @@ Also takes every attribute of `<dialog>` – without `children`, `onClose`, `ope
|
|
|
13624
13558
|
- No memory of past choices and no ranking of its own beyond the match: recency and frequency are weights you keep.
|
|
13625
13559
|
- No nested steps or arguments: a command that needs input opens your own form after it is chosen.
|
|
13626
13560
|
|
|
13627
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
13561
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
13628
13562
|
|
|
13629
13563
|
## Navigation
|
|
13630
13564
|
|
|
@@ -13944,7 +13878,7 @@ Also takes every attribute of the rendered element.
|
|
|
13944
13878
|
|
|
13945
13879
|
- It neither routes nor reads the address: the trail is what you pass.
|
|
13946
13880
|
|
|
13947
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
13881
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
13948
13882
|
|
|
13949
13883
|
### Tabs
|
|
13950
13884
|
|
|
@@ -13997,7 +13931,7 @@ export default function OneViewAtATime() {
|
|
|
13997
13931
|
|
|
13998
13932
|
##### Keep the tab in the address
|
|
13999
13933
|
|
|
14000
|
-
Control `value` with `
|
|
13934
|
+
Control `value` with `onValueChange` when the visible tab belongs in the address, so a link or a reload opens the same view.
|
|
14001
13935
|
|
|
14002
13936
|
```tsx
|
|
14003
13937
|
import { useState } from "react";
|
|
@@ -14008,7 +13942,7 @@ export default function KeepTheTabInTheAddress() {
|
|
|
14008
13942
|
|
|
14009
13943
|
return (
|
|
14010
13944
|
<Stack gap={3}>
|
|
14011
|
-
<Tabs value={tab}
|
|
13945
|
+
<Tabs value={tab} onValueChange={setTab}>
|
|
14012
13946
|
<TabList aria-label="Tour T-01">
|
|
14013
13947
|
<Tab value="stops">Stops</Tab>
|
|
14014
13948
|
<Tab value="vehicle">Vehicle</Tab>
|
|
@@ -14282,14 +14216,9 @@ export default function MoreTabsThanRoom() {
|
|
|
14282
14216
|
|---|---|---|---|
|
|
14283
14217
|
| `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), [Loading and empty panels](#tabs), [An invoice in tabs](#tabs) and 2 more |
|
|
14284
14218
|
| `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) |
|
|
14219
|
+
| `onValueChange` | `(value: string) => void` | — | Receives the value of the chosen tab. Controlled, the tab switches only once `value` follows; uncontrolled it is merely a message.<br>Shown in: [Keep the tab in the address](#tabs) |
|
|
14285
14220
|
| `ref` | `Ref<HTMLDivElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
14286
14221
|
|
|
14287
|
-
###### Events
|
|
14288
|
-
|
|
14289
|
-
| Prop | Type | Default | Description |
|
|
14290
|
-
|---|---|---|---|
|
|
14291
|
-
| `onChange` | `(value: string) => void` | — | Receives the value of the chosen tab. Controlled, the tab switches only once `value` follows; uncontrolled it is merely a message.<br>Shown in: [Keep the tab in the address](#tabs) |
|
|
14292
|
-
|
|
14293
14222
|
Also takes every attribute of `<div>` – without `defaultValue`, `onChange`.
|
|
14294
14223
|
|
|
14295
14224
|
##### `TabProps`
|
|
@@ -14314,7 +14243,7 @@ Also takes every attribute of `<div>`.
|
|
|
14314
14243
|
|
|
14315
14244
|
- More tabs than fit scroll sideways within the list; there is no overflow menu, and no closing or reordering of tabs.
|
|
14316
14245
|
|
|
14317
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
14246
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
14318
14247
|
|
|
14319
14248
|
### Accordion
|
|
14320
14249
|
|
|
@@ -14386,7 +14315,7 @@ export default function SeveralOpen() {
|
|
|
14386
14315
|
|
|
14387
14316
|
##### Open and fold all
|
|
14388
14317
|
|
|
14389
|
-
Control `value` with `
|
|
14318
|
+
Control `value` with `onValueChange` when a toolbar opens every section at once, or an address keeps which stand open.
|
|
14390
14319
|
|
|
14391
14320
|
```tsx
|
|
14392
14321
|
import { useState } from "react";
|
|
@@ -14414,7 +14343,7 @@ export default function OpenAndFoldAll() {
|
|
|
14414
14343
|
{open.length} of {SECTIONS.length} open
|
|
14415
14344
|
</Text>
|
|
14416
14345
|
</Stack>
|
|
14417
|
-
<Accordion type="multiple" value={open}
|
|
14346
|
+
<Accordion type="multiple" value={open} onValueChange={setOpen}>
|
|
14418
14347
|
{SECTIONS.map((s) => (
|
|
14419
14348
|
<AccordionItem key={s.value} value={s.value} title={s.title}>
|
|
14420
14349
|
{s.text}
|
|
@@ -14537,15 +14466,10 @@ export default function LongSettingsInSections() {
|
|
|
14537
14466
|
| `type` | `"single" \| "multiple"` | `"single"` | `single` keeps at most one section open, `multiple` any number.<br>Shown in: [Several open, one locked](#accordion), [Open and fold all](#accordion), [Long settings in sections](#accordion) |
|
|
14538
14467
|
| `defaultValue` | `readonly string[]` | `[]` | Uncontrolled: the sections open at the start.<br>Shown in: [One section at a time](#accordion), [Several open, one locked](#accordion), [Long settings in sections](#accordion) |
|
|
14539
14468
|
| `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) |
|
|
14469
|
+
| `onValueChange` | `(value: string[]) => void` | — | Reports the open sections after a header's click. Controlled, the accordion follows once `value` does; uncontrolled it is a message.<br>Shown in: [Open and fold all](#accordion) |
|
|
14540
14470
|
| `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), [Long settings in sections](#accordion) |
|
|
14541
14471
|
| `ref` | `Ref<HTMLDivElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [Check an invoice on submit (FormField)](#formfield), [An anchored surface (Popover)](#popover) and 5 more |
|
|
14542
14472
|
|
|
14543
|
-
###### Events
|
|
14544
|
-
|
|
14545
|
-
| Prop | Type | Default | Description |
|
|
14546
|
-
|---|---|---|---|
|
|
14547
|
-
| `onChange` | `(value: string[]) => void` | — | Reports the open sections after a header's click. Controlled, the accordion follows once `value` does; uncontrolled it is a message.<br>Shown in: [Open and fold all](#accordion) |
|
|
14548
|
-
|
|
14549
14473
|
Also takes every attribute of `<div>` – without `defaultValue`, `onChange`.
|
|
14550
14474
|
|
|
14551
14475
|
##### `AccordionItemProps`
|
|
@@ -14563,7 +14487,7 @@ Also takes every attribute of `<div>` – without `title`.
|
|
|
14563
14487
|
|
|
14564
14488
|
- A folded section's content stays rendered; for heavy content, render it only while its section is open.
|
|
14565
14489
|
|
|
14566
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
14490
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
14567
14491
|
|
|
14568
14492
|
### Stepper
|
|
14569
14493
|
|
|
@@ -14796,7 +14720,7 @@ Also takes every attribute of the rendered element.
|
|
|
14796
14720
|
- The steps are read, not navigated: no keys, no clicks, and no next or back of its own. Moving on is your application's decision, by a done step's label as a button or by buttons of its own.
|
|
14797
14721
|
- No branching or optional steps; pass the steps that apply.
|
|
14798
14722
|
|
|
14799
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
14723
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
14800
14724
|
|
|
14801
14725
|
### TreeView
|
|
14802
14726
|
|
|
@@ -14904,7 +14828,7 @@ const READER: NodeReader<Member> = { key: (m) => m.id, children: (m) => m.childr
|
|
|
14904
14828
|
|
|
14905
14829
|
export default function TickASelection() {
|
|
14906
14830
|
const [checked, setChecked] = useState<ReadonlySet<string>>(() => new Set(["arjun", "chloe"]));
|
|
14907
|
-
const tree = useTree(TEAMS, { reader: READER, checked,
|
|
14831
|
+
const tree = useTree(TEAMS, { reader: READER, checked, onCheckedChange: setChecked, defaultExpanded: ["web"] });
|
|
14908
14832
|
|
|
14909
14833
|
return (
|
|
14910
14834
|
<Stack gap={2}>
|
|
@@ -15027,7 +14951,7 @@ const READER: NodeReader<Node> = { key: (n) => n.id, children: (n) => n.children
|
|
|
15027
14951
|
|
|
15028
14952
|
export default function SearchWithThePath() {
|
|
15029
14953
|
const [term, setTerm] = useState("check");
|
|
15030
|
-
const tree = useTree(TEAMS, { reader: READER, search: term,
|
|
14954
|
+
const tree = useTree(TEAMS, { reader: READER, search: term, onSearchChange: setTerm });
|
|
15031
14955
|
|
|
15032
14956
|
return (
|
|
15033
14957
|
<Stack gap={2} style={{ maxWidth: 320 }}>
|
|
@@ -15078,7 +15002,7 @@ const READER: NodeReader<Node> = { key: (n) => n.id, children: (n) => n.children
|
|
|
15078
15002
|
|
|
15079
15003
|
export default function WithAnError() {
|
|
15080
15004
|
const [checked, setChecked] = useState<ReadonlySet<string>>(() => new Set());
|
|
15081
|
-
const tree = useTree(TEAMS, { reader: READER, checked,
|
|
15005
|
+
const tree = useTree(TEAMS, { reader: READER, checked, onCheckedChange: setChecked, defaultExpanded: ["payments"] });
|
|
15082
15006
|
const messageId = useId();
|
|
15083
15007
|
const error = checked.size === 0 ? "Tick at least one service, or the alert rule watches nothing." : undefined;
|
|
15084
15008
|
|
|
@@ -15230,7 +15154,7 @@ export default function SearchCheckAndReveal() {
|
|
|
15230
15154
|
const withChecks = useTree(filing, {
|
|
15231
15155
|
reader: READER,
|
|
15232
15156
|
checked,
|
|
15233
|
-
|
|
15157
|
+
onCheckedChange: setChecked,
|
|
15234
15158
|
onLoadChildren: load,
|
|
15235
15159
|
defaultExpanded: ["contracts", "framework", "documents"],
|
|
15236
15160
|
defaultActive: "fc-nimbrel",
|
|
@@ -15248,7 +15172,7 @@ export default function SearchCheckAndReveal() {
|
|
|
15248
15172
|
const searched = useTree(filing, {
|
|
15249
15173
|
reader: READER,
|
|
15250
15174
|
search: term,
|
|
15251
|
-
|
|
15175
|
+
onSearchChange: setTerm,
|
|
15252
15176
|
});
|
|
15253
15177
|
|
|
15254
15178
|
const chosen = useMemo(() => [...checked].sort().join(", "), [checked]);
|
|
@@ -15477,7 +15401,7 @@ to render and the heights of the filler rows around it.
|
|
|
15477
15401
|
- No dragging nodes to rearrange them.
|
|
15478
15402
|
- It fetches nothing and handles no loading errors: retries and messages stay in your application ([ADR-0005](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0005-what-cannot-be-checked.md)).
|
|
15479
15403
|
|
|
15480
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
15404
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
15481
15405
|
|
|
15482
15406
|
### Benchmark
|
|
15483
15407
|
|
|
@@ -15887,7 +15811,7 @@ type AvatarSize = "sm" | "md";
|
|
|
15887
15811
|
|
|
15888
15812
|
- No stack of avatars and no presence dot.
|
|
15889
15813
|
|
|
15890
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
15814
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
15891
15815
|
|
|
15892
15816
|
### Badge
|
|
15893
15817
|
|
|
@@ -16077,7 +16001,7 @@ type BadgeTone = "neutral" | "accent" | "success" | "warning" | "danger";
|
|
|
16077
16001
|
- It cannot be clicked or removed; a label the user acts on is a [Tag](#tag).
|
|
16078
16002
|
- It counts nothing itself: capping at “99+” is yours.
|
|
16079
16003
|
|
|
16080
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
16004
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
16081
16005
|
|
|
16082
16006
|
### Tag
|
|
16083
16007
|
|
|
@@ -16344,7 +16268,7 @@ type TagTone = "neutral" | "accent" | "success" | "warning" | "danger";
|
|
|
16344
16268
|
- No field for typing new tags: a tag input is a [MultiSelect](#multiselect).
|
|
16345
16269
|
- Tags are not toggles: a set of choices to switch on and off is a group of [Checkbox](#checkbox) or a [ButtonGroup](#buttongroup).
|
|
16346
16270
|
|
|
16347
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
16271
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
16348
16272
|
|
|
16349
16273
|
### Stat
|
|
16350
16274
|
|
|
@@ -17233,7 +17157,7 @@ type Severity = "warning" | "alarm";
|
|
|
17233
17157
|
- No trend arrow: a direction from two noisy points is read as information it does not carry; the history line shows the shape.
|
|
17234
17158
|
- It fetches and polls nothing: freshness is judged from the `asOf` you give it.
|
|
17235
17159
|
|
|
17236
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
17160
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
17237
17161
|
|
|
17238
17162
|
### Meter
|
|
17239
17163
|
|
|
@@ -17403,7 +17327,7 @@ type MeterTone = "neutral" | "accent" | "success" | "warning" | "danger";
|
|
|
17403
17327
|
|
|
17404
17328
|
- No limit marks, target tick or scale on the bar; for a value against limits use a [Stat](#stat).
|
|
17405
17329
|
|
|
17406
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
17330
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
17407
17331
|
|
|
17408
17332
|
### Sparkline
|
|
17409
17333
|
|
|
@@ -17661,7 +17585,7 @@ Also takes every attribute of `<span>`.
|
|
|
17661
17585
|
|
|
17662
17586
|
- No axes, labels, tooltip or points to hover: the value stands beside it.
|
|
17663
17587
|
|
|
17664
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
17588
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.54.0/docs/adr/0032-what-umriss-is-not.md).
|
|
17665
17589
|
|
|
17666
17590
|
## API index
|
|
17667
17591
|
|
|
@@ -18597,6 +18521,19 @@ that during development.
|
|
|
18597
18521
|
function duplicateKey<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>): S | null;
|
|
18598
18522
|
```
|
|
18599
18523
|
|
|
18524
|
+
##### `formatDuration`
|
|
18525
|
+
|
|
18526
|
+
A span as hours and minutes from the wording's short units ("1 hr 30 min").
|
|
18527
|
+
The span is rounded to the whole minute, so 1 h 29 min 40 s reads as
|
|
18528
|
+
1 hr 30 min everywhere; a span of no minutes reads "0 min", a negative one
|
|
18529
|
+
as its size. With `days` the whole days lead and the hours stay below 24.
|
|
18530
|
+
|
|
18531
|
+
```ts
|
|
18532
|
+
function formatDuration(ms: number, wording: Wording, options?: {
|
|
18533
|
+
days?: boolean;
|
|
18534
|
+
}): string;
|
|
18535
|
+
```
|
|
18536
|
+
|
|
18600
18537
|
##### `formatsFor`
|
|
18601
18538
|
|
|
18602
18539
|
Every format of one locale, built once.
|
|
@@ -18677,8 +18614,8 @@ The scroll position at which a row is visible - or null where it already is.
|
|
|
18677
18614
|
This is the arithmetic the keyboard handling hangs on: without it the focus
|
|
18678
18615
|
moves into a row that is not rendered.
|
|
18679
18616
|
|
|
18680
|
-
The sticky header
|
|
18681
|
-
|
|
18617
|
+
The sticky header stands above row 0, so it pushes every row down by its
|
|
18618
|
+
height, and once scrolled it covers the upper edge of the viewport.
|
|
18682
18619
|
|
|
18683
18620
|
```ts
|
|
18684
18621
|
function scrollForRow(index: number, { rowHeight, scrollTop, viewportHeight, headerHeight }: RowPlacement): number | null;
|
|
@@ -19507,7 +19444,7 @@ What `scrollForRow` needs to know about a scroll area.
|
|
|
19507
19444
|
| `rowHeight` *required* | `number` | — | |
|
|
19508
19445
|
| `scrollTop` *required* | `number` | — | |
|
|
19509
19446
|
| `viewportHeight` *required* | `number` | — | |
|
|
19510
|
-
| `headerHeight` | `number` | — | Height of the sticky header; it covers the upper edge. |
|
|
19447
|
+
| `headerHeight` | `number` | — | Height of the sticky header; it stands above row 0 and covers the upper edge. |
|
|
19511
19448
|
|
|
19512
19449
|
##### `RowWindow`
|
|
19513
19450
|
|
|
@@ -19805,23 +19742,24 @@ either uncontrolled (`default…`) or controlled with its `on…` handler.
|
|
|
19805
19742
|
| `reader` *required* | `NodeReader``<K, S>` | — | <br>Shown in: [A tree (TreeView)](#treeview), [Tick a selection (TreeView)](#treeview), [Load branches on demand (TreeView)](#treeview) and 5 more |
|
|
19806
19743
|
| `defaultExpanded` | `Iterable<S>` | — | Initial values, where the tree holds its own state.<br>Shown in: [A tree (TreeView)](#treeview), [Tick a selection (TreeView)](#treeview), [With an error (TreeView)](#treeview) and 3 more |
|
|
19807
19744
|
| `expanded` | `ReadonlySet<S>` | — | Controlled from outside; where set, it wins over the tree's own state. |
|
|
19745
|
+
| `onExpandedChange` | `(next: ReadonlySet<S>) => void` | — | |
|
|
19808
19746
|
| `defaultChecked` | `Iterable<S>` | — | |
|
|
19809
19747
|
| `checked` | `ReadonlySet<S>` | — | <br>Shown in: [Tick a selection (TreeView)](#treeview), [With an error (TreeView)](#treeview), [Search, check and reveal in a large tree (TreeView)](#treeview) |
|
|
19748
|
+
| `onCheckedChange` | `(next: ReadonlySet<S>) => void` | — | <br>Shown in: [Tick a selection (TreeView)](#treeview), [With an error (TreeView)](#treeview), [Search, check and reveal in a large tree (TreeView)](#treeview) |
|
|
19810
19749
|
| `defaultActive` | `S \| null` | — | <br>Shown in: [A tree (TreeView)](#treeview), [Search, check and reveal in a large tree (TreeView)](#treeview), [Measure a large tree (Benchmark)](#benchmark) |
|
|
19811
19750
|
| `active` | `S \| null` | — | <br>Shown in: [Dispatch a tour (Scenarios)](#dispatch-a-tour) |
|
|
19751
|
+
| `onActiveChange` | `(next: S \| null) => void` | — | <br>Shown in: [Dispatch a tour (Scenarios)](#dispatch-a-tour) |
|
|
19812
19752
|
| `anchor` | `S \| null` | — | Where a range gesture spans from. Steerable from outside like the other four values, so that a range is repeatable. |
|
|
19753
|
+
| `onAnchorChange` | `(next: S \| null) => void` | — | |
|
|
19754
|
+
| `defaultSearch` | `string` | — | |
|
|
19813
19755
|
| `search` | `string` | — | <br>Shown in: [Search with the path (TreeView)](#treeview), [Search, check and reveal in a large tree (TreeView)](#treeview) |
|
|
19756
|
+
| `onSearchChange` | `(text: string) => void` | — | <br>Shown in: [Search with the path (TreeView)](#treeview), [Search, check and reveal in a large tree (TreeView)](#treeview) |
|
|
19814
19757
|
| `virtual` | `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), [Measure a large tree (Benchmark)](#benchmark) |
|
|
19815
19758
|
|
|
19816
19759
|
###### Events
|
|
19817
19760
|
|
|
19818
19761
|
| Prop | Type | Default | Description |
|
|
19819
19762
|
|---|---|---|---|
|
|
19820
|
-
| `onExpanded` | `(next: ReadonlySet<S>) => void` | — | |
|
|
19821
|
-
| `onChecked` | `(next: ReadonlySet<S>) => void` | — | <br>Shown in: [Tick a selection (TreeView)](#treeview), [With an error (TreeView)](#treeview), [Search, check and reveal in a large tree (TreeView)](#treeview) |
|
|
19822
|
-
| `onActive` | `(next: S \| null) => void` | — | <br>Shown in: [Dispatch a tour (Scenarios)](#dispatch-a-tour) |
|
|
19823
|
-
| `onAnchor` | `(next: S \| null) => void` | — | |
|
|
19824
|
-
| `onSearch` | `(text: string) => void` | — | <br>Shown in: [Search with the path (TreeView)](#treeview), [Search, check and reveal in a large tree (TreeView)](#treeview) |
|
|
19825
19763
|
| `onActivate` | `(node: K) => void` | — | Enter on a node, or a click on its label. |
|
|
19826
19764
|
| `onLoadChildren` | `(node: K) => void` | — | An unloaded branch has been expanded: now would be the moment to fetch its children. The tree fetches nothing – it is driven by nested data, and whoever adds to them sees it render anew. Concurrency, errors and cancellation thereby stay outside ([ADR-0005](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0005-what-cannot-be-checked.md)).<br>Shown in: [Load branches on demand (TreeView)](#treeview), [Search, check and reveal in a large tree (TreeView)](#treeview) |
|
|
19827
19765
|
|
|
@@ -21137,7 +21075,7 @@ function Content() {
|
|
|
21137
21075
|
reader: READER,
|
|
21138
21076
|
defaultExpanded: DEPOTS.map((one) => one.id),
|
|
21139
21077
|
active: vehicleId,
|
|
21140
|
-
|
|
21078
|
+
onActiveChange: (next) => {
|
|
21141
21079
|
/* A depot is a heading, not a vehicle. */
|
|
21142
21080
|
if (next === null || VEHICLES.some((one) => one.id === next)) {
|
|
21143
21081
|
const nextDepot = VEHICLES.find((one) => one.id === next)?.depot;
|