@umriss-ui/core 0.3.0 → 0.3.2

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
@@ -50,6 +50,103 @@ module on the caller's side that carries `"use client"` and imports from there.
50
50
 
51
51
  ---
52
52
 
53
+ ## 0.3.2 – Phones, touch and a review (Sep. 2026)
54
+
55
+ ### Changed
56
+
57
+ - **A handler a caller hands in runs beside the component's own instead of
58
+ replacing it.** `Tab` took an `onClick`, `MenuItem` an `onClick`, `TabList`,
59
+ `Tag` and `RadioGroup` an `onKeyDown`, `NumberInput` an `onFocus`, `onBlur`
60
+ and `onKeyDown`, and `TreeView` an `onFocus`, `onBlur` and `onScroll` through
61
+ their spread props - and with them the component's own work: a tab that did
62
+ not switch, an entry that left its menu open, a tag Delete did not remove, a
63
+ radio group the arrows did not move, a tree whose focus stopped following the
64
+ active node. `NumberInput` was the sharpest case: a form library's `onBlur`
65
+ took the commit on leaving, and the field then counted as focused for good
66
+ and took no value from outside any more. The caller's handler now runs first;
67
+ where a key handler calls `preventDefault()`, the component leaves that key
68
+ alone.
69
+ - **Paging a calendar takes the active day along.** The arrow buttons of all
70
+ four pickers move the active day - which carries the grid's one tab stop - by
71
+ the same month, the 31st landing on the last day of a shorter month. Left
72
+ behind in the month paged away from, it took the stop with it, and Tab went
73
+ past the grid. The focus stays on the arrow that paged.
74
+
75
+ ### Fixed
76
+
77
+ - **A popover never leaves the window.** Its panel is capped at the window with
78
+ eight pixels of air (`max-width: calc(100vw - 16px)`, `max-height:
79
+ calc(100dvh - 16px)`) and scrolls in itself beyond that; a panel that fits
80
+ neither above nor below its trigger is pulled into the window, over the
81
+ trigger if need be, instead of hanging out of it.
82
+ - **A popover measures its panel exactly.** It read the rounded
83
+ `offsetWidth`/`offsetHeight`, and half a pixel decided whether a panel at the
84
+ window's edge fitted or stuck out.
85
+ - **The range pickers fit a phone.** Below 760px the presets of
86
+ `DateRangePicker` and `DateTimeRangePicker` stand above the months as a row;
87
+ below 600px the two months stand one below the other.
88
+ - **The × of `Select` and of the pickers stands on a touch screen.** It faded
89
+ in on hover, which a finger has not; on `(hover: none)` it now stands whenever
90
+ there is a value.
91
+ - **`Sparkline` keeps its width in a flex row.** It shrank with the row; it is
92
+ now `flex: none`.
93
+ - **Escape closes the popover and nothing more.** A menu, picker or select panel
94
+ inside a `Modal` took the modal down with it, because the same key is the
95
+ dialog's close request. The popover now keeps the key to itself.
96
+ - **The first opening moves the focus as well.** `Menu` and `ContextMenu` put
97
+ the focus on their first entry, `MultiSelect` into its search and the pickers
98
+ onto the active day - but not on the first opening of each: the panel was
99
+ hidden (`visibility: hidden`) until its first measurement, and a hidden
100
+ element takes no focus. It is now transparent for that pass, which is never
101
+ painted. `Menu` and `MultiSelect` also moved their focus in an effect that ran
102
+ before the panel stood; they now do it the moment it arrives, as `ContextMenu`
103
+ already did.
104
+ - **Tab out of an open menu goes on from the trigger.** The panel is portalled
105
+ to the end of the page, and a Tab from an entry went to the top of the page.
106
+ `Menu` and `ContextMenu` now give the focus back first, and the Tab moves on
107
+ from there.
108
+ - **`Modal` is named by its header.** `ModalHeader`'s `title` promised to name
109
+ the window for the screen reader; a `<dialog>` takes no name from its
110
+ content, so it said only "dialog". The dialog now points at the heading with
111
+ `aria-labelledby` - an `aria-labelledby` or `aria-label` of the caller's still
112
+ wins.
113
+ - **An uncontrolled `RadioGroup` is entered at its choice.** It wrote a tab stop
114
+ on the initial option and, since no render follows a choice, kept it there:
115
+ Tab came back to the initial option rather than the chosen one. Uncontrolled,
116
+ it now leaves the tab stop to the browser's own rule for radio groups.
117
+ - **`Tooltip` adds to its target's description.** While it stood, it replaced
118
+ the target's own `aria-describedby`, and a field's hint went silent.
119
+ - **An input method's Enter chooses nothing.** In `CommandPalette`, `Combobox`
120
+ and the search of `MultiSelect`, the Enter that ends a composition (Japanese,
121
+ Chinese, Korean) was taken as a choice.
122
+ - **`NumberInput` writes its first value in the notation of the formats.** The
123
+ first render used the default notation and the next one corrected it, so an
124
+ application with `GERMAN_FORMATS` saw `1,234.5` for a frame. Its description
125
+ still spoke of German notation as well; it names the formats now.
126
+ - **The line under the chosen tab follows a late font.** It was measured before
127
+ the font had loaded and stood a pixel or two beside its tab until the window
128
+ changed size; it is measured again once the fonts are ready.
129
+ - **A `Dock` unmounted in the middle of a drag ends the drag.** Its Escape
130
+ listener on the window outlived it, and a later Escape reported a place for a
131
+ dock that no longer existed.
132
+ - **`Alert`'s `dismissLabel` names its real default** - the wording's "Close
133
+ message", not "Close".
134
+
135
+ ---
136
+
137
+ ## 0.3.1 – The README catches up (Sep. 2026)
138
+
139
+ Nothing in the code changed. The README that shipped with `0.3.0` still said
140
+ the formats default to German notation, and so did the line on `NumberInput`;
141
+ both describe ADR-0024 now, with the import that takes `GERMAN_FORMATS` beside
142
+ `GERMAN_WORDING`.
143
+
144
+ The `0.3.0` entry below listed `formatsFor(locale)` as added. It is not
145
+ exported — it builds `DEFAULT_FORMATS` and `GERMAN_FORMATS` inside the package
146
+ and nothing else — and the entry is gone.
147
+
148
+ ---
149
+
53
150
  ## 0.3.0 – English formats, and the context menu (Sep. 2026)
54
151
 
55
152
  ### Changed
@@ -78,9 +175,6 @@ module on the caller's side that carries `"use client"` and imports from there.
78
175
 
79
176
  ### Added
80
177
 
81
- - **`formatsFor(locale)`** builds a complete `Formats` for a locale - the
82
- product's options (day first, two digits, 24-hour clock, per cent without
83
- decimals) over the locale's separators and words.
84
178
  - **`separatorsOf(formats)`** and `DEFAULT_SEPARATORS`: the group and decimal
85
179
  separator a notation writes, measured rather than declared.
86
180
  - **Three wording entries for `@umriss-ui/schedule`'s lane groups**:
@@ -89,11 +183,12 @@ module on the caller's side that carries `"use client"` and imports from there.
89
183
  `Wording` of its own gains three required entries — which the type says, at
90
184
  compile time, as it is meant to (ADR-0019).
91
185
 
92
- ### The first release that is not a candidate
186
+ ### Released together
93
187
 
94
- `@umriss-ui/core` was already on `latest`; `@umriss-ui/charts` and
95
- `@umriss-ui/schedule` join it with this delivery, and the three are released
96
- together because the schedule stands on both.
188
+ `@umriss-ui/core` was already on `latest`; `@umriss-ui/charts`,
189
+ `@umriss-ui/table` and `@umriss-ui/schedule` join it with this delivery, and
190
+ the four are released together: the schedule stands on core and charts, and the
191
+ table's candidate peered on `^0.2.0` and would have refused this core.
97
192
 
98
193
  ## The context menu (Sep. 2026)
99
194
 
package/README.md CHANGED
@@ -5,7 +5,7 @@ Guiding idea: **precise and quiet, with palpable quality** – depth comes from
5
5
  soft shadows and fine light edges, not from hard outlines or effects.
6
6
 
7
7
  The design language — "Ink & Paper", the dark theme, motion — is written down
8
- once for all three packages in [`../../docs/design-language.md`](../../docs/design-language.md).
8
+ once for all four packages in [`../../docs/design-language.md`](../../docs/design-language.md).
9
9
 
10
10
  ## Use
11
11
 
@@ -82,8 +82,18 @@ import { GERMAN_WORDING } from "@umriss-ui/core/wording/de";
82
82
  ```
83
83
 
84
84
  Both objects are typed `Wording`, so a missing entry is a compile error rather
85
- than a gap that shows up in the interface (ADR-0018, ADR-0019). The formats are
86
- a separate seam and still default to German notation.
85
+ than a gap that shows up in the interface (ADR-0018, ADR-0019).
86
+
87
+ The formats — dates, numbers, durations — are a seam of their own. The default
88
+ is English notation on a 24-hour clock (`17/03/2026`, `09:05`, `1,234.5`), and
89
+ the same subpath ships `GERMAN_FORMATS` beside the German wording, so a German
90
+ application takes both halves of its language in one import (ADR-0024):
91
+
92
+ ```tsx
93
+ import { GERMAN_FORMATS, GERMAN_WORDING } from "@umriss-ui/core/wording/de";
94
+
95
+ <UmrissProvider language={{ wording: GERMAN_WORDING, formats: GERMAN_FORMATS }}>…</UmrissProvider>;
96
+ ```
87
97
 
88
98
  ## Components
89
99
 
@@ -122,14 +132,14 @@ The table and the alarm list are not part of this package. They live in
122
132
  | `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 |
123
133
  | `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 |
124
134
  | `Badge` | a status label with a dot, five tones; slightly rounded by default, `pill` for counters |
125
- | `NumberInput` | numeric input in the notation the formats seam provides, today German (comma, thousands dots on leaving the field), `decimals` (0 = whole numbers), `min`/`max`, arrow keys with Shift ×10, an integrated spinner column at the right inner edge, `prefix`/`suffix` adornments (€, %) |
135
+ | `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 (€, %) |
126
136
  | `Meter` | a narrow fill bar (0–1) with a mono percentage label, five tones – for utilisation in cells; `label` names what is being measured |
127
137
  | `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 |
128
138
  | `LanguageProvider` / `useFormats` / `useWording` | formatting and wording as an overridable seam; the wording is a directory of entries, not a translation call. English is the default, German ships as `@umriss-ui/core/wording/de` |
129
139
  | `Dock` | a tool strip over *one* surface: four named resting places at the edges of the host, moved by the grip (dragging snaps, the four arrow keys are the four places), orientation follows the edge; translucent material like the palette; a place without room refuses visibly; `mode` marks at most one tool and belongs to the caller |
130
- | `DateRangePicker` | a period in two clicks across two chained months: backwards is allowed (the ends swap silently), a preview band on hovering, quick choices from the wording |
140
+ | `DateRangePicker` | a period in two clicks across two chained months: backwards is allowed (the ends swap silently), a preview band on hovering, quick choices from the wording; on a phone the months stand one below the other |
131
141
  | `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 |
132
- | `Popover` | the one closable, anchored surface underneath Menu, Combobox and the pickers: portal (nearest `<dialog>`, then the portal target, then the body), position with clamping and flipping, outside click, Escape with focus returned |
142
+ | `Popover` | the one closable, anchored surface underneath Menu, Combobox and the pickers: portal (nearest `<dialog>`, then the portal target, then the body), position with clamping and flipping, never larger than the window (it scrolls in itself beyond that), outside click, Escape with focus returned |
133
143
  | `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 |
134
144
  | `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 freshness |
135
145
  | `CommandPalette` / `useCommandPaletteShortcut` | a command palette: subsequence search with rank and highlighted finds, groups, a populated resting state; opens on Ctrl/⌘+K and `/` |