@umriss-ui/core 0.3.1 → 0.4.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
@@ -50,6 +50,118 @@ module on the caller's side that carries `"use client"` and imports from there.
50
50
 
51
51
  ---
52
52
 
53
+ ## 0.4.0 – One focus, and fields on the iPhone (Sep. 2026)
54
+
55
+ ### Changed
56
+
57
+ - **Focus is a crisp two-pixel accent edge, on every component.**
58
+ `--u-focus-ring` was a soft 4px glow at 20 %, and fields drew an accent edge
59
+ inside it; now it is `0 0 0 2px` in the accent, for fields, buttons,
60
+ checkboxes, radios, tags, rows and links alike. An invalid field keeps its
61
+ danger colour while focused (new token `--u-focus-ring-danger`). A caller who
62
+ set `--u-focus-ring` keeps their value.
63
+ - **On a touch screen, fields write at 16px** (`pointer: coarse`). Below that,
64
+ Safari on iOS zoomed the page into the field and left it zoomed.
65
+ - **A loading button is no longer faded to half.** It stays locked, but at full
66
+ strength, so its spinner is visible - in the dark theme it all but vanished.
67
+
68
+ ### Fixed
69
+
70
+ - **Popovers stand in the visible part of the window.** They measured it with
71
+ `innerWidth`/`innerHeight`; on an iPhone with the page zoomed and the keyboard
72
+ up, a combobox's list stood above the field and cut off at the left. They now
73
+ read `visualViewport` and follow it as the keyboard comes and goes. The same
74
+ measure places the tooltip.
75
+ - **No browser outline beside the focus edge.** Input, Combobox, Select and the
76
+ DatePicker trigger lacked `outline: none`; Safari drew its blue ring outside
77
+ the accent edge.
78
+ - **TreeView's loading spinner** takes the secondary text colour instead of the
79
+ muted one, which was barely visible on the dark surface.
80
+
81
+ ## 0.3.2 – Phones, touch and a review (Sep. 2026)
82
+
83
+ ### Changed
84
+
85
+ - **A handler a caller hands in runs beside the component's own instead of
86
+ replacing it.** `Tab` took an `onClick`, `MenuItem` an `onClick`, `TabList`,
87
+ `Tag` and `RadioGroup` an `onKeyDown`, `NumberInput` an `onFocus`, `onBlur`
88
+ and `onKeyDown`, and `TreeView` an `onFocus`, `onBlur` and `onScroll` through
89
+ their spread props - and with them the component's own work: a tab that did
90
+ not switch, an entry that left its menu open, a tag Delete did not remove, a
91
+ radio group the arrows did not move, a tree whose focus stopped following the
92
+ active node. `NumberInput` was the sharpest case: a form library's `onBlur`
93
+ took the commit on leaving, and the field then counted as focused for good
94
+ and took no value from outside any more. The caller's handler now runs first;
95
+ where a key handler calls `preventDefault()`, the component leaves that key
96
+ alone.
97
+ - **Paging a calendar takes the active day along.** The arrow buttons of all
98
+ four pickers move the active day - which carries the grid's one tab stop - by
99
+ the same month, the 31st landing on the last day of a shorter month. Left
100
+ behind in the month paged away from, it took the stop with it, and Tab went
101
+ past the grid. The focus stays on the arrow that paged.
102
+
103
+ ### Fixed
104
+
105
+ - **A popover never leaves the window.** Its panel is capped at the window with
106
+ eight pixels of air (`max-width: calc(100vw - 16px)`, `max-height:
107
+ calc(100dvh - 16px)`) and scrolls in itself beyond that; a panel that fits
108
+ neither above nor below its trigger is pulled into the window, over the
109
+ trigger if need be, instead of hanging out of it.
110
+ - **A popover measures its panel exactly.** It read the rounded
111
+ `offsetWidth`/`offsetHeight`, and half a pixel decided whether a panel at the
112
+ window's edge fitted or stuck out.
113
+ - **The range pickers fit a phone.** Below 760px the presets of
114
+ `DateRangePicker` and `DateTimeRangePicker` stand above the months as a row;
115
+ below 600px the two months stand one below the other.
116
+ - **The × of `Select` and of the pickers stands on a touch screen.** It faded
117
+ in on hover, which a finger has not; on `(hover: none)` it now stands whenever
118
+ there is a value.
119
+ - **`Sparkline` keeps its width in a flex row.** It shrank with the row; it is
120
+ now `flex: none`.
121
+ - **Escape closes the popover and nothing more.** A menu, picker or select panel
122
+ inside a `Modal` took the modal down with it, because the same key is the
123
+ dialog's close request. The popover now keeps the key to itself.
124
+ - **The first opening moves the focus as well.** `Menu` and `ContextMenu` put
125
+ the focus on their first entry, `MultiSelect` into its search and the pickers
126
+ onto the active day - but not on the first opening of each: the panel was
127
+ hidden (`visibility: hidden`) until its first measurement, and a hidden
128
+ element takes no focus. It is now transparent for that pass, which is never
129
+ painted. `Menu` and `MultiSelect` also moved their focus in an effect that ran
130
+ before the panel stood; they now do it the moment it arrives, as `ContextMenu`
131
+ already did.
132
+ - **Tab out of an open menu goes on from the trigger.** The panel is portalled
133
+ to the end of the page, and a Tab from an entry went to the top of the page.
134
+ `Menu` and `ContextMenu` now give the focus back first, and the Tab moves on
135
+ from there.
136
+ - **`Modal` is named by its header.** `ModalHeader`'s `title` promised to name
137
+ the window for the screen reader; a `<dialog>` takes no name from its
138
+ content, so it said only "dialog". The dialog now points at the heading with
139
+ `aria-labelledby` - an `aria-labelledby` or `aria-label` of the caller's still
140
+ wins.
141
+ - **An uncontrolled `RadioGroup` is entered at its choice.** It wrote a tab stop
142
+ on the initial option and, since no render follows a choice, kept it there:
143
+ Tab came back to the initial option rather than the chosen one. Uncontrolled,
144
+ it now leaves the tab stop to the browser's own rule for radio groups.
145
+ - **`Tooltip` adds to its target's description.** While it stood, it replaced
146
+ the target's own `aria-describedby`, and a field's hint went silent.
147
+ - **An input method's Enter chooses nothing.** In `CommandPalette`, `Combobox`
148
+ and the search of `MultiSelect`, the Enter that ends a composition (Japanese,
149
+ Chinese, Korean) was taken as a choice.
150
+ - **`NumberInput` writes its first value in the notation of the formats.** The
151
+ first render used the default notation and the next one corrected it, so an
152
+ application with `GERMAN_FORMATS` saw `1,234.5` for a frame. Its description
153
+ still spoke of German notation as well; it names the formats now.
154
+ - **The line under the chosen tab follows a late font.** It was measured before
155
+ the font had loaded and stood a pixel or two beside its tab until the window
156
+ changed size; it is measured again once the fonts are ready.
157
+ - **A `Dock` unmounted in the middle of a drag ends the drag.** Its Escape
158
+ listener on the window outlived it, and a later Escape reported a place for a
159
+ dock that no longer existed.
160
+ - **`Alert`'s `dismissLabel` names its real default** - the wording's "Close
161
+ message", not "Close".
162
+
163
+ ---
164
+
53
165
  ## 0.3.1 – The README catches up (Sep. 2026)
54
166
 
55
167
  Nothing in the code changed. The README that shipped with `0.3.0` still said
package/README.md CHANGED
@@ -137,9 +137,9 @@ The table and the alarm list are not part of this package. They live in
137
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 |
138
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` |
139
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 |
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 |
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 |
141
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 |
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, 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 |
143
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 |
144
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 |
145
145
  | `CommandPalette` / `useCommandPaletteShortcut` | a command palette: subsequence search with rank and highlighted finds, groups, a populated resting state; opens on Ctrl/⌘+K and `/` |