@umriss-ui/core 0.9.2 → 0.10.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 CHANGED
@@ -29,6 +29,212 @@ package stood at `0.1.0` the whole time, because it had exactly one caller and t
29
29
  caller lay in the same repository — and are grouped by unit of delivery, not by
30
30
  commit.
31
31
 
32
+ ## 0.10.0 – Everything the comparison asked for (Sep. 2026)
33
+
34
+ ### Added
35
+
36
+ - **`--u-shadow-sticky`**: the colour a sticking part's shadow starts from -
37
+ `@umriss-ui/table`'s pinned blocks and its stuck group header. Light as
38
+ before; dark is black at 50 % instead of the text colour at 9 %, which read
39
+ as a glow on the dark ground.
40
+ - **The Windows contrast mode** (`forced-colors: active`, forced-colors 01,
41
+ 02). Forced colours drop every box-shadow and repaint every ground, and the
42
+ library draws its rings, edges and depth as box-shadows: a focused control
43
+ lost its ring, a button became a word, a field a line of text, a menu text
44
+ floating over the page. Every ring now carries `outline: 2px solid
45
+ transparent` and every edge or depth `outline: 1px solid transparent` - both
46
+ invisible until forced colours paint them in a system colour - and the states
47
+ that were a ground alone take a system colour: the tab's underline, the
48
+ switch that is on, the progress bar's and the meter's fill, the checkbox's
49
+ mixed dash, the radio's dot and the divider's line; the list cursor of
50
+ `Combobox` and `CommandPalette`, the active `TreeView` node and the chosen
51
+ days, range and preset of the date pickers an outline in the selection
52
+ colour. Buttons, badges, tags and `MultiSelect`'s chips keep an edge. Nothing
53
+ changes outside forced colours.
54
+ - **`docs/llms-full.md`**, the package's documentation as one Markdown file for
55
+ a coding agent, in the npm package and pinned to its version: every demo page
56
+ with its import line, its examples' source, its props tables and why it is
57
+ built as it is, and the declaration of every other export. The same text
58
+ stands online as <https://romanhaendler.github.io/umriss-ui/core/llms-full.txt>,
59
+ with an index of the pages beside it (`llms.txt`).
60
+ - **Every component takes a `ref`, a `className`, a `style` and the rest of
61
+ the DOM props** at the element a caller lays out - a tooltip on a `Stat`, a
62
+ measured `Card`, a `data-testid` anywhere. New for `Badge`, `Card`,
63
+ `CardHeader`, `CardBody`, `Combobox`, `CommandPalette`, `ConfirmDialog`,
64
+ `EmptyState`, `FormField`, `Meter`, `Modal`, `ModalHeader`, `ModalBody`,
65
+ `ModalFooter`, `MenuItem`, `MenuSeparator`, `MultiSelect`, `Skeleton`,
66
+ `Sparkline`, `Spinner`, `Stat`, `Tabs`, `TabList`, `Tab`, `TabPanel`,
67
+ `TreeView`, `TreeSearch` and the four pickers. The `<dialog>` takes it for
68
+ `Modal`, `ConfirmDialog` and `CommandPalette`; the field's wrapper for the
69
+ pickers, `Combobox` and `MultiSelect` (the id from `FormField` stays on the
70
+ control inside); the `role="tree"` list for `TreeView`. All of them are
71
+ `forwardRef` components, so the ref also arrives under React 18.
72
+ - **`Tabs` work uncontrolled**: `defaultValue` names the first tab, and the
73
+ tabs switch on their own; `value` and `onChange` are both optional now.
74
+ Without either, every tab is a tab stop until one is chosen.
75
+ - **`Card` can be controlled**: `collapsed` folds it from outside, and
76
+ `onCollapsedChange` reports the header's button - controlled, the card
77
+ folds once `collapsed` follows; beside `defaultCollapsed` it is a message.
78
+ - **`Switch`**: on or off, taking effect at once - a native checkbox under
79
+ `role="switch"` with its label beside it, `checked`/`defaultChecked`, sizes
80
+ `sm` and `md`, `invalid` (set by `FormField` with an error). The class goes
81
+ to the label, ref and rest to the input, as for `Checkbox`.
82
+ - **`Slider`**: one value on the native range input, drawn with tokens -
83
+ `value`/`defaultValue` with `onChange(value)`, `min`, `max`, `step`, `marks`
84
+ (a number, or `{ value, label }`), `format` for the mono readout
85
+ (`showValue`) and `aria-valuetext`. Arrows by a step, PageUp/PageDown by a
86
+ tenth of the range, Home/End to the bounds, the same on every engine.
87
+ - **`Drawer`**: the `Modal`'s dialog entering from an edge, `side="right" |
88
+ "left"`, with `ModalHeader`, `ModalBody` and `ModalFooter` inside; its width
89
+ is the new token `--u-drawer-width` (400px).
90
+ - **`ProgressBar`**: how far a task has come, `role="progressbar"` -
91
+ determinate with `value` from 0 to 1, indeterminate without; `valueText`
92
+ for a count, `showLabel` for the percentage. No tone: progress is no
93
+ verdict. New token `--u-duration-sweep` for the indeterminate bar.
94
+ - **`Accordion` / `AccordionItem`**: sections behind headers that are buttons
95
+ with `aria-expanded` inside a heading (`headingLevel`), `type="single" |
96
+ "multiple"`, `value`/`defaultValue` as a list with `onChange`, arrow keys,
97
+ Home and End between the headers, `disabled` items.
98
+ - **`Breadcrumb`**: `items` from the root to the current page, the last
99
+ `aria-current="page"`, each a link (`href`), a button (`onSelect`) or both -
100
+ with `onSelect` the caller routes. Where the trail does not fit, its middle
101
+ levels fold into a menu, measured from the trail's own widths.
102
+ - **`Combobox`, `MultiSelect` and `CommandPalette` say what VoiceOver leaves
103
+ out of a list**, through one polite live region the library shares: the
104
+ number of options on opening and on every letter of the search ("4
105
+ options", the empty text where none is left), the option the arrow keys
106
+ moved onto with its state ("Gamma, selected", "Beta, unavailable"; the
107
+ palette's find with its group), and in the multi-select what Enter in the
108
+ search, a chip or Backspace added or removed. It speaks once the keys rest
109
+ for 150 ms, the charts' readout pause, and inside a `<dialog>` from the
110
+ dialog's own region.
111
+ - **`Splitter`**: two panes and the line between them, the APG window
112
+ splitter - `orientation="horizontal"` side by side or `"vertical"` stacked,
113
+ `value`/`defaultValue` as the first pane's share in per cent with
114
+ `onChange(value)`, `min`, `max` and `step`. The line is a focusable
115
+ `role="separator"` (`separatorLabel` names it after the first pane): the
116
+ pointer drags it, the arrows of its axis move it, Home and End take it to
117
+ the bounds, Enter collapses the first pane to `min` and restores it.
118
+ - **`Stepper`**: where a procedure stands - `steps` (`label`, `description`,
119
+ `failed`) and the index `current`, as an ordered list in a row or a column
120
+ (`orientation`). The current step is `aria-current="step"`; every other
121
+ step's state - done, upcoming, failed - is a word beside its label for a
122
+ screen reader and a tick, number or cross in its marker. It has no keys:
123
+ moving on is the caller's.
124
+ - **`FileInput`**: the native file input behind a key, inside a zone that
125
+ takes a drop. `accept` and `multiple` hold for a drop as they hold in the
126
+ dialog (a refused file is named beneath the list), the chosen files stand
127
+ listed with their size and a cross each, `value` with `onChange(files)` or
128
+ uncontrolled, `invalid` from `FormField`. What a drop or a removal leaves
129
+ is written back into the input, so a form sends what the list shows. The
130
+ class goes to the zone, ref and rest to the input. Nothing is uploaded.
131
+
132
+ ### Changed
133
+
134
+ - **`scheduleKeyHelp` names T beside the brackets**, in English and German:
135
+ `@umriss-ui/schedule` takes `t` and Shift+T as equals of `]` and `[`, since
136
+ a German keyboard reaches the brackets only with AltGr. A wording of one's
137
+ own keeps its text until it says so too.
138
+
139
+ - **The final polish of the new components and of forced colours**
140
+ (core-foundations 07, core-layout-extras 04, forced-colors 04). The
141
+ indeterminate `ProgressBar` rests with its segment in the middle of the
142
+ track, its ends fading, and sweeps from there - with animations off it no
143
+ longer reads as a share done. The key of a `Breadcrumb`'s folded levels is
144
+ as tall and as wide as a small key and underlines its dots; the trail
145
+ grows to that height when it folds. An invalid `Slider` draws its track
146
+ with the fields' danger edge. The `Splitter`'s line carries the grip glyph
147
+ in its middle, quiet at rest and darker under the pointer. Under forced
148
+ colours the primary `Button` has an edge of two pixels (the second
149
+ inside, so it stands as large as its neighbours) and a `Badge` keeps its
150
+ dot in the text colour.
151
+
152
+ - **A new key in `Wording`: a shelf as one word** (for `@umriss-ui/table`'s
153
+ alarm list, whose availability is now a badge), in English and German:
154
+ `availabilityShelvedShort` ("Shelved", "Zurückgestellt"). The sentence
155
+ `availabilityShelved` stays - in the badge's tooltip and in what is
156
+ spoken. An application that implements the whole `Wording` type itself no
157
+ longer compiles until it adds it.
158
+
159
+ - **Two new keys in `Wording`: a table over a server** (for
160
+ `@umriss-ui/table`'s manual mode), in English and German:
161
+ `selectAllOnPage` ("Select all on this page") and `exportPageLabel`
162
+ ("Export page"). A partial wording passed to the provider is merged as
163
+ before; an application that implements the whole `Wording` type itself no
164
+ longer compiles until it adds these two.
165
+ - **`pageOfPages` takes the numbers formatted as well**: a third, optional
166
+ argument `{ page, total }` carries them in the provider's formats, and the
167
+ English and German wording write those - "Page 1 of 100,000", "Seite 1 von
168
+ 100.000", since a table over a server has that many pages. Below a thousand
169
+ pages nothing changes, and a wording of one's own that reads two arguments
170
+ still compiles.
171
+ - **Eleven new keys in `Wording`, for `Splitter`, `Stepper` and
172
+ `FileInput`**, in English and German: `splitter` (the separator's name
173
+ where the caller gives none), `stepDone`, `stepUpcoming` and `stepFailed`
174
+ (a step's state beside its label), `chooseFile` and `chooseFiles` (the
175
+ key), `dropFile` and `dropFiles` (the words beside it), `removeFile(name)`
176
+ and `fileNotAccepted(name)`. A partial wording passed to the provider is
177
+ merged as before; an application that implements the whole `Wording` type
178
+ itself no longer compiles until it adds these eleven.
179
+ - **Four new keys in `Wording`: what the lists announce**, in English and
180
+ German: `optionCount(count)`, `optionActive(label, { selected, disabled,
181
+ group })`, `optionAdded(label)` and `optionRemoved(label)`. A partial
182
+ wording passed to the provider is merged as before; an application that
183
+ implements the whole `Wording` type itself no longer compiles until it adds
184
+ these four.
185
+ - **`CommandPalette` no longer renders a `role="status"` element of its own.**
186
+ The count of finds is spoken through the shared region, which the palette's
187
+ `<dialog>` now holds as its last child once something was said; it is also
188
+ said on opening when `restingItems` stand, and for a query that finds
189
+ nothing (`paletteNoFinds`).
190
+ - **A new key in `Wording`: `editCell(column, row)`**, the name of a cell's
191
+ editor in `@umriss-ui/table`'s grid mode ("Edit Setpoint: TIC-101"), in
192
+ English and German. A partial wording passed to the provider is merged as
193
+ before; an application that implements the whole `Wording` type itself no
194
+ longer compiles until it adds it.
195
+ - **Three new keys in `Wording`: the column menu's pin keys** (for
196
+ `@umriss-ui/table`'s pinned columns), in English and German:
197
+ `pinColumnToStart(column)`, `pinColumnToEnd(column)` and
198
+ `unpinColumn(column)`. A partial wording passed to the provider is merged as
199
+ before; an application that implements the whole `Wording` type itself no
200
+ longer compiles until it adds these three.
201
+ - **Five new keys in `Wording`: the wording of an alarm's availability** (for
202
+ `@umriss-ui/table`'s alarm model and list), in English and German:
203
+ `availabilityShelved(until, by)`, `availabilitySuppressedByDesign`,
204
+ `availabilityOutOfService`, `hiddenFromOperation(count)` and
205
+ `columnAvailability`. A partial wording passed to the provider is merged as
206
+ before; an application that implements the whole `Wording` type itself no
207
+ longer compiles until it adds these five.
208
+ - **Three more keys in `Wording`, for the new components**, in English and
209
+ German: `progress` (a `ProgressBar`'s name where the caller gives none),
210
+ `breadcrumb` (the landmark's name) and `breadcrumbFolded` (the key of the
211
+ folded levels). The same holds as above: a partial wording merges, a whole
212
+ `Wording` of an application's own needs the three.
213
+ - **What `...rest` may not override.** `Stat` keeps its role and the name it
214
+ has read, `Meter` its role and `aria-value*`, `Spinner`, `TreeView`,
215
+ `TabList`, `TabPanel` and `MenuItem` their role, `Tab` its role, ids and
216
+ tab stop, even where a caller passes the same attribute. A caller's
217
+ `aria-label` still names a `Meter`, a `Spinner`, a `Modal` or the
218
+ `CommandPalette`.
219
+ - **A caller's handler runs first and can prevent the component's own**:
220
+ `onCancel` and `onMouseDown` of `Modal` and `CommandPalette` (a
221
+ `preventDefault` keeps the window standing), `onKeyDown` of `Combobox` and
222
+ `CommandPalette` (heard in the capture phase, before the field inside),
223
+ `onClick` and `onKeyDown` of `MultiSelect`'s field, and `onClick` of `Tab`
224
+ and `MenuItem`, which ran first before but could not prevent.
225
+
226
+ ### Fixed
227
+
228
+ - **A drawer from the right no longer shoots in too far and jumps back.**
229
+ The browser gives a modal dialog `overflow: auto`; the focus landing in the
230
+ sheet while it still stood off-screen scrolled the dialog towards it. The
231
+ drawer's dialog is clipped now.
232
+ - **A drawer from the left fades as it leaves**; its entrance rule outweighed
233
+ the exit and it vanished at once.
234
+ - **"1 hr"**, not "1 hrs", in the English `hoursShort`.
235
+
236
+ ---
237
+
32
238
  ## 0.9.2 – Today's dot, one chevron (Sep. 2026)
33
239
 
34
240
  ### Changed
package/README.md CHANGED
@@ -14,6 +14,11 @@ pnpm add @umriss-ui/core
14
14
  ```
15
15
 
16
16
  The demo is the documentation: <https://romanhaendler.github.io/umriss-ui/core/>.
17
+ For a coding agent the same material stands as one Markdown file inside the
18
+ installed package, `docs/llms-full.md`, pinned to that version — every page
19
+ with its examples' source, its props tables and why it is built as it is, and
20
+ the declaration of every other export; online, for the latest version,
21
+ <https://romanhaendler.github.io/umriss-ui/core/llms.txt>.
17
22
  In an application:
18
23
 
19
24
  ```tsx
@@ -146,23 +151,36 @@ The table and the alarm list are not part of this package. They live in
146
151
  | `CrossGlyph` / `PlusGlyph` / `MinusGlyph` / `AngleGlyph` / `CalendarGlyph` / `ClockGlyph` / `GripGlyph` / `GridGlyph` / `MeasureGlyph` | the shared character set, one stroke width at one nominal size; specification in `docs/glyphs.md` |
147
152
  | `Sparkline` | a miniature history line with an area gradient and an accent end point – for trends in cells |
148
153
  | `Spinner` | a functional loading indicator |
154
+ | `Switch` | on or off, taking effect at once: a native checkbox under `role="switch"`, the label beside it, two sizes, invalid through `FormField`; the thumb travels on the path transition |
155
+ | `Slider` | one value between two bounds on the native range input, drawn with tokens: `min`/`max`/`step`, marks with optional words, `format` for the mono readout and `aria-valuetext`; arrows, PageUp/PageDown by a tenth, Home/End - the same on every engine |
156
+ | `Drawer` | the `Modal`'s dialog entering from an edge (`side="right" \| "left"`): focus trap, Escape and focus return from the browser, `ModalHeader`/`ModalBody`/`ModalFooter` inside, its width the token `--u-drawer-width`; modal only |
157
+ | `ProgressBar` | how far a task has come (`role="progressbar"`), determinate from 0 to 1 or indeterminate without a value; `valueText` for a count; no tone, because progress is no verdict - that is the `Meter` |
158
+ | `Accordion` / `AccordionItem` | sections behind headers that are buttons with `aria-expanded`: `type="single" \| "multiple"`, controlled or uncontrolled, arrow keys between the headers; the height animates as the card's collapse does |
159
+ | `Breadcrumb` | where a page stands: `<nav>` with an ordered list, the last item `aria-current="page"`, items as links or buttons (routing is the caller's); when narrow the middle levels fold into a `Menu`, measured rather than guessed |
160
+ | `Splitter` | two panes and the line between them (the APG window splitter): side by side or stacked, the first pane's share in per cent, controlled or uncontrolled, `min`/`max`; drag, the arrows of its axis, Home/End, Enter collapses and restores |
161
+ | `Stepper` | where a procedure stands: an ordered list of steps, done, current (`aria-current="step"`), upcoming or failed - each said as a word beside its label and drawn as a number, tick or cross; in a row or a column; moving on is the caller's |
162
+ | `FileInput` | the native file input behind a key, inside a zone that takes a drop: `accept` and `multiple` hold for the drop as for the dialog, the chosen files listed with their size and a cross each, controlled or uncontrolled, invalid through `FormField`; no upload |
149
163
 
150
164
  ## Principles for new components
151
165
 
152
166
  1. Pass `forwardRef`, `className` and `...rest` through to the root element –
153
167
  every component that renders a root element. Excepted are the wrappers that
154
168
  have none: `Popover` renders into a portal, `Tooltip` around the caller's
155
- child, `Menu` and `ToastProvider` are composed of other parts. **Not yet met**
156
- (library-audit, ticket 09): `Badge`, `Card`, `Combobox`, `CommandPalette`,
157
- `EmptyState`, `FormField`, `Modal`, `MultiSelect`, `Skeleton`, `Spinner`,
158
- `Stat`, `Tabs`, `TreeView`, `TreeSearch`, `ConfirmDialog`, `Sparkline`,
159
- `Meter` and the four pickers.
169
+ child, `Menu`, `ContextMenu` and `ToastProvider` are composed of other
170
+ parts, and the providers render no element at all. The ref goes
171
+ to the element a caller lays out: the `<dialog>` of `Modal`, `Drawer`,
172
+ `ConfirmDialog` and `CommandPalette`, the field's wrapper of the pickers
173
+ and the combobox family, the `role="tree"` list of `TreeView`. The native
174
+ fields that wear a wrapper (`Checkbox`, `Switch`, `Slider`, `NumberInput`,
175
+ `Select`, `FileInput`, a clearable `Input`) put the class on the wrapper and
176
+ ref and rest on the control. The component's own
177
+ `role`, the `aria-*` it computes and its handlers are not replaced by
178
+ `rest`: a caller's handler runs first and can `preventDefault`. Held by
179
+ `tests-unit/passthrough.test.tsx`, which renders every export.
160
180
  2. Support controlled **and** uncontrolled use (`value`/`defaultValue`).
161
181
  Deliberately controlled only: `Combobox` and `MultiSelect` – the field keeps
162
- no second state beside the caller's – as well as `Modal` and `CommandPalette`,
163
- because opening is the caller's decision. **Not yet met** (ticket 09): `Tabs`
164
- is controlled only and is to get `defaultValue`, `Card` is uncontrolled only
165
- and is to get `collapsed`/`onCollapsedChange`.
182
+ no second state beside the caller's – as well as `Modal`, `Drawer` and
183
+ `CommandPalette`, because opening is the caller's decision.
166
184
  3. Keyboard operation and `aria` attributes are part of the definition of done.
167
185
  4. No business logic: a mapping such as "status X is green" is the application's
168
186
  to make.
@@ -176,9 +194,13 @@ The table and the alarm list are not part of this package. They live in
176
194
 
177
195
  ## Roadmap
178
196
 
179
- The core scope is complete, and so are the command palette and `Dock`. What is
180
- open: a text tone of its own for danger and warning
181
- (`.scratch/tone-contrast/spec.md`), the `forwardRef`/`className`/`rest` and
182
- controlled/uncontrolled renames of `library-audit` ticket 09, and — if it ever
183
- earns it — collapsing the dock onto its grip, which is out of scope today
184
- because it doubles the state space.
197
+ The core scope is complete, and so are the command palette, `Dock`, the
198
+ danger text tone, the pass-through of rules 1 and 2 above, the six basic
199
+ components and the layout extras, forced colours and the listbox
200
+ announcements. What is still open is one check a person makes: the listbox
201
+ announcements heard through VoiceOver (`.scratch/listbox-announcements/`,
202
+ ticket 02).
203
+
204
+ Collapsing the dock onto its grip stays out of scope, because it doubles the
205
+ state space. What core will not build at all stands in
206
+ [ADR-0032](../../docs/adr/0032-what-umriss-is-not.md).