@umriss-ui/core 0.43.0 → 0.45.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 +52 -0
- package/README.md +49 -11
- package/dist/core.css +1 -1
- package/dist/core.js +4593 -4139
- package/dist/de.d.ts +42 -0
- package/dist/formats-Bo0qM01D.js +97 -0
- package/dist/index.d.ts +197 -51
- package/dist/wording/de.js +18 -2
- package/docs/llms-full.md +1238 -303
- package/package.json +1 -1
- package/dist/formats-BccAYWgq.js +0 -80
package/CHANGELOG.md
CHANGED
|
@@ -27,6 +27,58 @@ package stood at `0.1.0` the whole time, because it had exactly one caller and t
|
|
|
27
27
|
caller lay in the same repository — and are grouped by unit of delivery, not by
|
|
28
28
|
commit.
|
|
29
29
|
|
|
30
|
+
## 0.45.0 – A plant's time, and dates a finger reaches (Oct. 2026)
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
|
|
34
|
+
- **A named time zone** (ADR-0076): `timeZone` in the formats, an IANA name, is the zone every date and time is written in, every day is cut in and every picker picks in; without it the reader's zone holds as before. `Formats` gains `locale`, `timeZone` and `timeZoneName`, `formatsFor(locale, timeZone)` builds a set, and `useTimeZoneLabel()` returns the zone's name where the reader's own zone is another. With a zone named a server writes the instants; only the label waits for the page to hydrate. `zoneFields`, `zoneInstant` and `zoneDayStart` are the seam the other packages read. In development, a DatePicker or DateRangePicker day value off the named zone's midnight warns once.
|
|
35
|
+
- **The calendar jumps.** The four date pickers' calendar has a month and a year Select between its arrows (in the month pair, on the left month), and the grid takes PageUp and PageDown (a month), Shift with them (a year), Home and End (Monday and Sunday of the week). `Formats.monthName` writes the month alone.
|
|
36
|
+
- **A date can be typed** in the DatePicker panel's foot, in the order of the formats in use (`17.03.1985`, `17031985`, `1985-03-17`); a digit pressed on the grid starts it.
|
|
37
|
+
- **`min` and `max`** on DatePicker, DateTimePicker, DateRangePicker and DateTimeRangePicker - inclusive, by the zone's day - bound the calendar, its years and months, the typed date, Today, Now and the presets.
|
|
38
|
+
- **Long option lists.** The Combobox's list and the Select's own list draw only the options in view above 500 options, the MultiSelect its checkboxes; drawn options carry `aria-setsize` and `aria-posinset`, and Home and End reach the ends of a list that long.
|
|
39
|
+
- **A Combobox that searches with the application:** `onSearch` reports what is typed, `filter={false}` shows the application's results as given, and `loading` shows a Loading line and marks the list busy. The chosen label stays when a search replaces the options.
|
|
40
|
+
- **`Quality`** (`"good" | "uncertain" | "bad"`, ADR-0077) and `Stat`'s `quality`: an uncertain or bad reading keeps its number, verdict and age, says its quality in a word and in the tile's name, and is marked by a dotted or wavy line under the figure.
|
|
41
|
+
- **`MoreGlyph`**, three dots to the glyph specification.
|
|
42
|
+
- **`useCommandPaletteShortcut(onOpen, { slash })`**: `slash: false` makes "/" no shortcut (WCAG 2.1.4); `CommandPaletteShortcutOptions` is exported.
|
|
43
|
+
- **`labelPlacement` on `FormField`**: `"start"` puts the label beside the field, in a column as wide as the new token `--u-label-width` (10rem).
|
|
44
|
+
- **New wording keys**, English and German: `monthSelect`, `yearSelect`, `typeDate`, `notADate`, `dateOutOfRange`, `qualityGood`, `qualityUncertain` and `qualityBad`.
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- **`Formats` has four more required members:** `locale`, `timeZone`, `timeZoneName` and `monthName`.
|
|
49
|
+
- Migration: a set spread from `DEFAULT_FORMATS` or `GERMAN_FORMATS` needs nothing; a `Formats` written from scratch adds `locale: "en-GB"`, `timeZone: undefined`, `timeZoneName: () => ""` and a `monthName`.
|
|
50
|
+
- **A wording written out in full needs the new keys** above.
|
|
51
|
+
- Migration: add the eight keys to a custom wording object, or spread the shipped one and override.
|
|
52
|
+
- **NumberInput asks for the text keyboard while a negative value is allowed** (`min` unset or below 0), because a phone's number pad has no minus key.
|
|
53
|
+
- Migration: a NumberInput without `min` now shows the text keyboard on a phone; add `min={0}`, or the caller's own `inputMode`, to keep the pad.
|
|
54
|
+
- **The DateTimePicker's time fields draw no arrows under a coarse pointer**; the digits are typed.
|
|
55
|
+
- Migration: none needed; a fine pointer keeps the arrows.
|
|
56
|
+
- **`clearable` governs clearing as a whole** on the four date pickers: without it the open panel shows no Clear either, so a field without `clearable` offers no way to empty its value.
|
|
57
|
+
- Migration: an application that wants the panel's Clear passes `clearable`, which also shows the cross in the field.
|
|
58
|
+
- **Lists above 500 options are windowed** (see Added): an option outside the view is not in the document.
|
|
59
|
+
- Migration: none for a list of up to 500 options; a test that looks for an option far down a longer list scrolls to it or types to filter first.
|
|
60
|
+
|
|
61
|
+
### Fixed
|
|
62
|
+
|
|
63
|
+
- **A Select, Combobox or Menu opened inside a Popover's panel belongs to it**: a pick in its list no longer closes the panel, and Escape closes only the innermost open surface.
|
|
64
|
+
- **Typing `0930` into the DateTimePicker's time fields gives 09:30 on iOS**: each digit counts, whatever the caret and the selection.
|
|
65
|
+
- **A MultiSelect opened by a touch no longer raises the keyboard**: the focus goes to its first enabled option.
|
|
66
|
+
- **The palette's "/" no longer opens** from a select or from an element with the role textbox, searchbox or combobox, and neither shortcut opens inside a modal dialog; the guard holds in an engine without `:modal`, as jsdom.
|
|
67
|
+
|
|
68
|
+
## 0.44.0 – The old names go, and server mode answers (Oct. 2026)
|
|
69
|
+
|
|
70
|
+
### Added
|
|
71
|
+
|
|
72
|
+
- **New wording keys** for what the table's server mode and export say, in English and German: `tryAgain`, `exporting`, `exportFailed`, `selectedOnPage`, `selectAllMatching`, `allMatchingSelected`, `footerOfMatches` and `exportSheetName` (the Excel sheet's name). The table, schedule and calculation move with them.
|
|
73
|
+
- **A scenario, Mark a stretch,** on the control room page: a trend reports a range, the scenario holds it as one value, an alarm table takes it as a row filter and the trend draws it back as a band.
|
|
74
|
+
|
|
75
|
+
### Changed
|
|
76
|
+
|
|
77
|
+
- **`ariaLabel` on `TreeView`, `Popover` and `ContextMenu` is removed** (ADR-0068); 0.43.0 renamed it `aria-label` and kept the old name for one minor.
|
|
78
|
+
- Migration: write `aria-label` (TypeScript flags every use of `ariaLabel`).
|
|
79
|
+
- **A wording written out in full needs the new keys** above, as it did for earlier additions; a wording built on the shipped English or German needs nothing.
|
|
80
|
+
- Migration: add the eight keys to a custom wording object, or spread the shipped one and override.
|
|
81
|
+
|
|
30
82
|
## 0.43.0 – One root contract, and a finger as a pointer (Oct. 2026)
|
|
31
83
|
|
|
32
84
|
### Added
|
package/README.md
CHANGED
|
@@ -75,7 +75,7 @@ export function OrdersTable({ rows }: { rows: Order[] }) {
|
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
On a server, and until the page has hydrated, a date or time is empty, because only the browser
|
|
78
|
-
knows the reader's zone.
|
|
78
|
+
knows the reader's zone - unless the application names a time zone in its formats (see Time zone).
|
|
79
79
|
|
|
80
80
|
The calculation is the one view a Server Component writes itself: its tree is read where it is
|
|
81
81
|
written (see `@umriss-ui/calculation`). The reasons are in
|
|
@@ -197,7 +197,8 @@ token away.
|
|
|
197
197
|
|
|
198
198
|
**Browsers:** Chrome 123, Firefox 120, Safari 17.5 or newer. `light-dark()` is
|
|
199
199
|
older nowhere; an older browser discards the tokens and shows the interface
|
|
200
|
-
unstyled.
|
|
200
|
+
unstyled. An application checks the floor itself with
|
|
201
|
+
`CSS.supports("color", "light-dark(red, red)")`.
|
|
201
202
|
|
|
202
203
|
## Testing
|
|
203
204
|
|
|
@@ -329,6 +330,43 @@ import { GERMAN_FORMATS, GERMAN_WORDING } from "@umriss-ui/core/wording/de";
|
|
|
329
330
|
<UmrissProvider language={{ wording: GERMAN_WORDING, formats: GERMAN_FORMATS }}>…</UmrissProvider>;
|
|
330
331
|
```
|
|
331
332
|
|
|
333
|
+
### Time zone
|
|
334
|
+
|
|
335
|
+
Every instant is shown in the reader's time zone. An application whose screen belongs to one place - a
|
|
336
|
+
plant in Berlin, read from Chicago - names that zone in the formats, an IANA name:
|
|
337
|
+
|
|
338
|
+
```tsx
|
|
339
|
+
<UmrissProvider language={{ formats: { timeZone: "Europe/Berlin" } }}>…</UmrissProvider>;
|
|
340
|
+
|
|
341
|
+
// German notation in the zone: spread the set
|
|
342
|
+
<UmrissProvider language={{ formats: { ...GERMAN_FORMATS, timeZone: "Europe/Berlin" } }}>…</UmrissProvider>;
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
A switch between the plant's time and the reader's is a provider whose formats name the zone or not;
|
|
346
|
+
[the control room scenario](demo/scenarios/05-watch-a-kiln-line.tsx) shows it, with its charts, table and
|
|
347
|
+
schedule following:
|
|
348
|
+
|
|
349
|
+
```tsx
|
|
350
|
+
const parent = useLanguage().formats;
|
|
351
|
+
const formats = useMemo(() => (plantTime ? { ...parent, timeZone: "Europe/Berlin" } : parent), [parent, plantTime]);
|
|
352
|
+
<LanguageProvider formats={formats}>…</LanguageProvider>;
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
`useFormats().timeZone` tells the zone in use. A section in another zone is a nested `LanguageProvider`
|
|
356
|
+
that names it; under a language, nest `{ ...useLanguage().formats, timeZone }`, since a bare `{ timeZone }`
|
|
357
|
+
merges over the English set and drops the parent's language. A misspelled name throws Intl's `RangeError` where the formats are merged, so a screen never
|
|
358
|
+
shows the reader's time while claiming the plant's.
|
|
359
|
+
|
|
360
|
+
- **What follows the zone:** every date and time the formats write (`date`, `dateShort`, `month`,
|
|
361
|
+
`dateLong`, `time`, `dateTime`, `offset`, `timeZoneName`), so a table's cells, its day groups and its day
|
|
362
|
+
filter. A date entry you replaced stays yours.
|
|
363
|
+
- **What stays the reader's:** the language, "now", and ages such as "3 minutes ago".
|
|
364
|
+
- **The label:** `useTimeZoneLabel()` returns the zone's generic name (`formats.timeZoneName`) where the
|
|
365
|
+
formats name a zone, the page has hydrated and the reader's own zone is another, and `null` otherwise.
|
|
366
|
+
A table puts it in the head of its time columns.
|
|
367
|
+
- **The server:** with a zone named, the server writes every instant, because the zone does not depend
|
|
368
|
+
on the reader; only the label waits for hydration.
|
|
369
|
+
|
|
332
370
|
## Components
|
|
333
371
|
|
|
334
372
|
The table is not part of this package. It lives in
|
|
@@ -368,7 +406,7 @@ The table is not part of this package. It lives in
|
|
|
368
406
|
| `MultiSelect` | multiple selection: the field always stays on one line and measures the space (as many chips as fit, the rest as "+N"); chips are remove buttons (hover shows ×, a click deletes, backspace deletes the last, roving tabindex with arrow keys), and the "+N" counter opens the selected view directly; a panel with a search field (autofocus, Enter toggles the first hit), a view switch "all \| selected (N)" (the list always in natural order, deselected rows stay visible in the selected view until the view changes), and all/none/invert acting on the filtered set of the active view; optionally `clearable`, a × that empties what "none" would, its room kept in the field's width; `Input`'s two sizes |
|
|
369
407
|
| `Card` / `CardHeader` / `CardBody` | panels with an eyebrow, actions, optionally collapsible; `flush` for borderless tables; a dividing line under the head only through `divider` (for borderless data) – otherwise white space carries the hierarchy |
|
|
370
408
|
| `Badge` | a status label with a dot, five tones; slightly rounded by default, `pill` for counters |
|
|
371
|
-
| `NumberInput` | numeric input in the notation the formats seam provides (group separators on leaving the field; it reads back what it writes, whatever the notation), `decimals` (0 = whole numbers), `min`/`max`, arrow keys with Shift ×10, an integrated spinner column at the right inner edge, `prefix`/`suffix` adornments (€, %) |
|
|
409
|
+
| `NumberInput` | numeric input in the notation the formats seam provides (group separators on leaving the field; it reads back what it writes, whatever the notation), `decimals` (0 = whole numbers), `min`/`max`, arrow keys with Shift ×10, an integrated spinner column at the right inner edge, `prefix`/`suffix` adornments (€, %); it asks for the text keyboard while a negative value is allowed, so `min={0}` keeps the number pad on a phone |
|
|
372
410
|
| `Meter` | a narrow fill bar (0–1) with a mono percentage label, five tones – for utilisation in cells; `label` names what is being measured |
|
|
373
411
|
| `ControlSizeProvider` | one size for the controls in a place - a toolbar, a dense form: every control with `size` inside takes it unless it says its own. A popover, dialog or tooltip opened from there starts without it |
|
|
374
412
|
| `UmrissProvider` | one place to set things: density, portal target, toasts, language. **Optional** – without it everything behaves as it does unconfigured. It holds no theme (light and dark are the application's `color-scheme`) and writes nothing onto the document |
|
|
@@ -377,9 +415,9 @@ The table is not part of this package. It lives in
|
|
|
377
415
|
| `DateTimeRangePicker` | a period with a time at both ends: "all day" as the default, time fields that advance, Enter accepts; the clock change is handled per end |
|
|
378
416
|
| `Popover` | the one closable, anchored surface underneath Menu, Combobox and the pickers: portal (nearest `<dialog>`, then the portal target, then the body), position with flipping above and below and across its trigger's edges, a panel that fits nowhere cut to the larger side instead of laid over its trigger, clamping as the last resort, never larger than the window (it scrolls in itself beyond that), outside click, Escape with focus returned |
|
|
379
417
|
| `TreeView` / `TreeSearch` / `useTree` | a tree with exactly one active node and optional ticking (cascade, indeterminate, locked, unloaded); arrow keys, type to jump, range selection, virtualisation. The search keeps its term in the tree |
|
|
380
|
-
| `Stat` | a metric: one value, read against its limits – the verdict as a word and a colour, the deviation from the target value, history and
|
|
381
|
-
| `CommandPalette` / `useCommandPaletteShortcut` | a command palette: subsequence search with rank and highlighted finds, groups, keywords a candidate is found by, at most `maxFinds` finds with a line for the rest, a populated resting state; opens on Ctrl/⌘+K and `/` |
|
|
382
|
-
| `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` |
|
|
418
|
+
| `Stat` | a metric: one value, read against its limits – the verdict as a word and a colour, the deviation from the target value, history, freshness and the source's quality |
|
|
419
|
+
| `CommandPalette` / `useCommandPaletteShortcut` | a command palette: subsequence search with rank and highlighted finds, groups, keywords a candidate is found by, at most `maxFinds` finds with a line for the rest, a populated resting state; opens on Ctrl/⌘+K and `/` (`slash: false` switches the single key off, WCAG 2.1.4; neither opens inside a modal dialog) |
|
|
420
|
+
| `CrossGlyph` / `PlusGlyph` / `MinusGlyph` / `AngleGlyph` / `CalendarGlyph` / `ClockGlyph` / `GripGlyph` / `GridGlyph` / `MeasureGlyph` / `MoreGlyph` | the shared character set, one stroke width at one nominal size; specification in `docs/glyphs.md` |
|
|
383
421
|
| `Sparkline` | a miniature history line with an area gradient and an accent end point – for trends in cells |
|
|
384
422
|
| `Spinner` | a functional loading indicator |
|
|
385
423
|
| `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 |
|
|
@@ -432,8 +470,7 @@ The table is not part of this package. It lives in
|
|
|
432
470
|
a layer (ADR-0021; the guards in `tests-unit/stylesheets.test.ts` hold it).
|
|
433
471
|
6. Everything is English – identifiers, props and prose (ADR-0018, which
|
|
434
472
|
reversed ADR-0015). The accessible name is spelled `aria-label` everywhere
|
|
435
|
-
(ADR-0068).
|
|
436
|
-
deprecated alias for one further minor.
|
|
473
|
+
(ADR-0068).
|
|
437
474
|
7. A field's root composes `extent` from `#own-styles`: it fills the place
|
|
438
475
|
that gives it a width, is its natural width where the place asks, and is
|
|
439
476
|
never wider than its place; what it shows never moves it (ADR-0041). A field
|
|
@@ -454,11 +491,12 @@ The core scope is complete, and so are the command palette, the
|
|
|
454
491
|
danger text tone, the pass-through of rules 1 and 2 above, the six basic
|
|
455
492
|
components and the layout extras, forced colours, the listbox
|
|
456
493
|
announcements, the fields' widths and sizes (ADR-0041), the four shapes of a
|
|
457
|
-
root (ADR-0068)
|
|
494
|
+
root (ADR-0068), the targets under a finger (ADR-0070), long option lists, a date
|
|
495
|
+
that can be typed and bounded, and a source's quality (ADR-0077).
|
|
458
496
|
|
|
459
497
|
What core will not build at all stands in
|
|
460
498
|
[ADR-0032](../../docs/adr/0032-what-umriss-is-not.md). Validation is the
|
|
461
|
-
caller's, and umriss shows the reader's time
|
|
462
|
-
([ADR-
|
|
499
|
+
caller's, and umriss shows the reader's time unless the application names a zone
|
|
500
|
+
([ADR-0076](../../docs/adr/0076-an-application-names-the-time-zone-its-instants-are-shown-in.md)); a dashboard
|
|
463
501
|
a user arranges is its own package, `@umriss-ui/dashboard`
|
|
464
502
|
([ADR-0064](../../docs/adr/0064-a-dashboard-a-user-arranges-is-a-sequence-on-fixed-columns.md)).
|