@dloizides/ui-layout 1.49.2 → 1.50.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
@@ -1,708 +1,713 @@
1
- # Changelog
2
-
3
- ## Unreleased
4
-
5
- ## 1.49.2
6
- - Breadcrumb and UnderlineTabs take an optional `accessibilityHint`, passed to the strip element.
7
-
8
- ## 1.49.1
9
- - IdChip: `value` may be null or empty; the chip then copies nothing, is disabled and hides the copy glyph (was: copied the placeholder).
10
-
11
- MODC-1 D-MC-641 "One page layout for all pages", UI-ATOMIC-1.
12
-
13
- - New organism `SectionIndexLayout`: from `SECTION_INDEX_BREAKPOINT` (1024) an "On this page" index (molecule `SectionIndex`) beside every section stacked, a press scrolls to its section; below it a wrapping row of chips (molecule `SectionChips`) shows one section at a time, the first by default, so nothing is removed. Hit boxes >= 44 px; labels are pre-localized props. Options, defaults keep the plain behaviour: `density` (`SectionDensity` comfortable or dense gaps), `stickyIndex` (web, default false), `chipOverflow` (`ChipOverflow` wrap or scroll).
14
-
15
- ## 1.44.0
16
-
17
- MODC-1 "Module C unified console" (AC-UI-1, AC-UI-7), UI-ATOMIC-1 "Reuse first, extract what is new, layer atom / molecule / organism".
18
-
19
- - `StatusBadge` takes `tone` (`BadgeTone`: neutral, info, success, warning, danger) with the fill from the theme scale main (or deep) step and the ink from `resolveOnBrand`, so text is >= 4.5:1; `color` / `backgroundColor` are now optional and still win when passed. A tone no theme fill can carry falls back to theme text on the elevated surface. ui-tables `StatusTone` is to map onto `BadgeTone`.
20
- - New atom `CountBadge`: a count pill capped as `max+` (default 99), hidden at zero unless `showZero`, tone from `BadgeTone`. Plain text, no live region; new i18n key `common.countBadgeLabel` (`{{p1}}` = count).
21
- - New organism `SplitPanes`: two panes side by side or stacked (`SplitLayout` auto / stack / side); side by side each pane has `minWidth: 0` so its text wraps at 360 (TEXT-FIT-1).
22
-
23
- ## 1.39.0
24
-
25
- INVOICE-6 "Ready-to-send invoice emails with contacts and a sent log", UI-COMPOSE-1 "Extract shared UI from the start": extracted from invoice-web.
26
-
27
- - New `SideSheet`: a panel from the bottom on a phone and from the right at the wide breakpoint, with `title`, a scrollable body and a required `footer` slot. Closes on scrim, Escape and hardware back; traps focus, names the initial focus with `initialFocusTestID`, returns focus to the opener and locks page scroll.
28
- - New `LAYOUT_TEST_IDS.sideSheet`.
29
-
30
- ## 1.38.2
31
-
32
- DROPDOWN-WIDTH-1 "A menu opened from a compact trigger is wide enough to read".
33
-
34
- - `ModalDropdown` with `renderTrigger` and no `menuMinWidth`: the inline menu is now at least 160px wide. An explicit `menuMinWidth` still wins; a default-trigger field keeps its trigger width.
35
-
36
- ## 1.37.0
37
-
38
- INVOICE-FU-9 "INVOICE-5 shared look leftovers", AC-PAGE-1.
39
-
40
- - New `PageFrame`: lays children out at a fixed page size (`A4_PAGE` 794x1123 by default, `pageSize` configurable) and scales the page down to the container width, never up, so line breaks match the printed page.
41
- - New `pageScale` / `scaledFrame` helpers for the scale math.
42
-
43
- ## 1.34.0
44
-
45
- INVOICE-3 "Invoice interface over a user-chosen folder": extracted from invoice-web.
46
-
47
- - New `AppText` + `TextKind`: text in six fixed sizes.
48
- - New `ScreenColumn`: the bounded, centred column a screen sits in.
49
- - New `useIsWideViewport`: the hook form of `isWideWebViewport`.
50
- - `Section` gains `variant` (`SectionVariant.Card`), `testID`, and `style` widened to `StyleProp<ViewStyle>`. Default look unchanged.
51
-
52
-
53
- ## 1.32.0
54
-
55
- ### Added
56
-
57
- - `StatusBadge` `icon`: an optional decorative slot before the label. INVOICE-3 "Invoice interface over a user-chosen folder".
58
- - `StickyPreview`: sticks to the top of the visible viewport; shows its `full` slot, or its `compact` slot once scrolled past, while the on-screen keyboard is open, or on `forceCompact`.
59
- - `useVisibleViewport`, `isKeyboardOpen`: read the Visual Viewport offset and keyboard state.
60
-
61
- ## 1.30.0
62
-
63
- ### Added
64
-
65
- - `ModalDropdown` `menuHeading`: a visible, non-focusable heading (role heading) at the top of the open
66
- menu or modal; it also becomes the menu's accessible name. KEFI-EDITOR-HEADER-1 "Compact the landing editor header".
67
-
68
- ## 1.29.0
69
-
70
- ### Added
71
-
72
- - `Modal` `initialFocusTestID`: the testID of the control focused when the dialog opens (web), for
73
- FOCUS-1 "Every screen names its initial focus". `useFocusTrap` takes it as an optional 3rd argument.
74
-
75
- ### Fixed
76
-
77
- - `useFocusTrap` no longer steals focus from a child that set `autoFocus`: the first-focusable
78
- fallback runs only when focus is not already inside the dialog (kefi-web create-attendee modal
79
- opened on its close button). Focus restore on close skips an element that lives inside the dialog.
80
-
81
- ## 1.26.3
82
-
83
- ### Fixed
84
-
85
- - `ModalDropdown` / `InlineMenu`: a closed-but-still-fading popover was INTERACTIVE for the whole
86
- 120ms exit animation — no `pointerEvents`, no `aria-hidden` — so a fast second click could select
87
- an option from a menu the user had already dismissed, and screen readers still saw the options.
88
- The popover now goes inert the instant `isOpen` goes false (`aria-hidden` on the menu node,
89
- `pointerEvents: 'none'` on the animated wrapper, and the select handler refuses a closed menu).
90
- The fade is unchanged. Covered by `ModalDropdown.openState.test.tsx` — the fade is held open
91
- deliberately, since the reduced-motion test harness collapses it to 0ms.
92
-
93
- ## 1.26.2
94
-
95
- ### Fixed
96
- - **`useAnchorTracking` no longer re-renders an open menu whose anchor has not moved.** `readAnchorRect`
97
- returns a fresh object on every measurement, and the hook wrote it to state unconditionally, so
98
- `Object.is` never matched and React re-rendered on every scheduled measurement. Because the hook's
99
- own `ResizeObserver` watches `document.body` — which the menu is portalled into — the re-render
100
- could re-arm the observer that caused it, giving a self-sustaining loop (`Maximum update depth
101
- exceeded` under test). In a browser the menu's box never settled, which Playwright reports as
102
- "element is not stable" and then "element was detached from the DOM"; it broke every click on a
103
- `navbar-overflow-menu` option. The rect is now compared BY VALUE, so an unmoved anchor writes no
104
- state. Pinned by `src/ModalDropdown/useAnchorTracking.stability.test.tsx`.
105
-
106
- ## 1.26.1
107
-
108
- ### Fixed
109
-
110
- - **`ModalDropdown` (popover variant) — a CLOSING menu no longer swallows the next keystroke.**
111
- `InlineMenu` hard-coded `enabled: true` for `useMenuKeyboard`, so its DOCUMENT-CAPTURE keydown
112
- listener lived as long as the component was MOUNTED — and `ModalDropdown` deliberately keeps it
113
- mounted past logical close so the exit fade can play. For that whole window the trigger already
114
- reported `aria-expanded="false"` while a live handler `preventDefault()`ed and
115
- `stopPropagation()`ed the user's Enter, so react-native-web's `<button>` never received the
116
- browser-synthesised click and the menu could not be reopened from the keyboard.
117
-
118
- The menu's keyboard now follows the owner's LOGICAL open state, threaded down as a new required
119
- `isOpen` prop on `InlineMenu`, rather than its mount. MOUNTED IS NOT OPEN.
120
-
121
- Note for anyone extending this: passing `menuAnim.mounted` as `isOpen` reproduces the same bug
122
- one level up, and there is a test that fails if you do.
123
-
124
-
125
- ## 1.26.0
126
-
127
- **New `BuildInfoFooter` — a small, themable "which build am I running?" caption for the portals.**
128
-
129
- The FE half of the "know what's deployed" work: every RN-web portal can now show a compact,
130
- unobtrusive footer like `v<buildVersion>` (optionally `· api <sha7>`). `@dloizides/pwa-sw` already
131
- stamps a per-build `BUILD_VERSION` into the generated service worker, but that value lives only
132
- inside `service-worker.js` and is not exposed to page runtime — so the component stays dumb and
133
- takes the build id as a prop (each app inlines it at build time, e.g. `EXPO_PUBLIC_BUILD_VERSION`).
134
-
135
- - **`BuildInfoFooter`** — props `buildVersion` (required), optional `apiBaseUrl` (best-effort GET
136
- `${base}/version` → `.commit`, appended as `· api <sha7>`; any failure silently shows the version
137
- alone), optional `apiCommit` (skip the fetch), `fetchImpl` (test seam), plus the usual `testID` /
138
- `accessibilityLabel` / `accessibilityHint` / `style`. Muted caption via the theme's
139
- `textSecondary` — no raw colours.
140
- - New exports: `formatBuildInfo`, `shortenCommit`, `trimTrailingSlash`, `useApiCommit`,
141
- `BUILD_INFO_PREFIX`, `API_COMMIT_SEPARATOR`, `VersionResponse`.
142
- - New kit i18n key `LAYOUT_I18N.buildInfoHint` (`common.buildInfoHint`) and testID
143
- `LAYOUT_TEST_IDS.buildInfoFooter` (`build-info-footer`).
144
-
145
- ## 1.24.0
146
-
147
- **The inline dropdown popover now stays inside the viewport — a floored menu can no longer spill off the right edge.**
148
-
149
- `buildPortalPopoverStyle` positioned the fixed popover at `left: rect.left` with no horizontal
150
- clamp. That was fine while the menu matched its trigger's width, but a COMPACT trigger with a
151
- `menuMinWidth` floor (e.g. the `@dloizides/ui-nav` "More ▾" overflow menu, whose trigger sits near
152
- the right of the bar) opens a menu WIDER than its trigger — which then extended past the right edge
153
- of the viewport and clipped its lower/right content ("some items get hidden").
154
-
155
- - **`buildPortalPopoverStyle(rect, minWidth, viewportWidth?)`** takes an optional `viewportWidth`.
156
- When given, the popover's `left` is clamped so its right edge clears `MENU_VIEWPORT_MARGIN` (8px) —
157
- sliding it left, right-aligning it to the trigger in the limit — while never crossing the left
158
- margin. `viewportWidth = 0` (the default, and the native/pure path) keeps the exact prior
159
- trigger-anchored behaviour, so every existing caller is unchanged.
160
- - **`InlineMenu`** passes `window.innerWidth` on web (re-read whenever the tracked trigger rect
161
- re-measures on scroll/resize); native is untouched.
162
- - New export `MENU_VIEWPORT_MARGIN`.
163
-
164
- ## 1.23.0
165
-
166
- **Modals, the dropdown popover and the accordion body now ANIMATE on web — adopts `@dloizides/ui-motion`.**
167
-
168
- On react-native-web, RN's `Modal animationType` and `LayoutAnimation` are effectively no-ops, so
169
- `Modal`, `ModalShell`, the `ModalDropdown` popover and the `Accordion` body all SNAPPED open/closed
170
- on the web build (all 7 portals). This wires those surfaces to `@dloizides/ui-motion`, which drives
171
- enter/exit with RN `Animated` (works on web AND native) and collapses every animation to instant
172
- under the OS "reduce motion" preference. **No public APIs changed** — every prop, testID and a11y
173
- attribute is identical; this is a purely visual upgrade.
174
-
175
- - **`Modal`** — the backdrop now **fades** (opacity) and the panel **fades + scales in** (0.96→1) on
176
- open, reversing on close, via `useEnterExit`. The RN `Modal` host is kept **mounted through the
177
- exit** (driven by `useEnterExit`'s `mounted` flag, not `visible`) so the close animation can play
178
- instead of the host unmounting instantly — the trick that made `animationType` a no-op on web. The
179
- scrim moved to its own animated layer behind the tap-catcher; close-on-backdrop, Escape, focus
180
- trap, scroll-lock and every testID are unchanged.
181
- - **`ModalShell`** — the full-screen sheet **fades + scales in** on open (replacing the native-only
182
- `animationType="slide"`), mounted through the exit the same way.
183
- - **`ModalDropdown`** — the popover (the inline anchored menu on web-desktop, the centered modal on
184
- mobile/native) **fades + scales in** from the anchor on open (`transformOrigin: top`), with a snappy
185
- ~120ms curve so the close reads as near-instant. `useAnchorTracking`, the web portal, keyboard nav
186
- and outside-click detection are untouched (the fade/scale rides an INNER wrapper so the popover's
187
- own DOM node — which the outside-click/portal logic depends on — is unchanged).
188
- - **`Accordion`** — the item body now renders inside ui-motion's **`<Collapse>`** (measured, animated
189
- height) instead of RN `LayoutAnimation`, so the body animates on web too. The chevron rotation is
190
- unchanged. Behaviour note: `<Collapse>` keeps the body **mounted at all times** (clipped to height 0
191
- when closed) so `aria-controls` always resolves and screen readers reach the content — the open
192
- state is conveyed by the header's `aria-expanded` (the value handed to `<Collapse open>`). The
193
- internal `accordionAnimation.ts` (`LayoutAnimation` helper) was removed.
194
- - **New dependency `@dloizides/ui-motion` (`^1.0.1`)** — the shared RN/RN-web motion kit
195
- (`useEnterExit`, `Collapse`, reduced-motion-aware).
196
-
197
- Additive and back-compatible for consumers. Covered by the existing `Modal`, `ModalShell`,
198
- `ModalDropdown` (web + native) and `Accordion` suites; the accordion tests now assert open state via
199
- `aria-expanded`/the `Collapse` container rather than body-text presence (the body is always mounted).
200
- The Jest env is pinned to reduced-motion so enter/exit resolve synchronously in tests.
201
-
202
- ## 1.22.0
203
-
204
- **Two shared modal primitives: a themed centered `Modal` dialog and a `ConfirmDialog` popup.**
205
-
206
- Until now the kit had no shared centered dialog — only `ModalShell` (a full-screen slide-up sheet)
207
- and `ModalDropdown` (a selector). Each portal hand-rolled its own edit dialog (e.g. kefi-web's
208
- `PromoterActionModal`) and confirmed destructive actions with an ugly inline table row. These two
209
- primitives replace both, so all 7 portals share one accessible, themed implementation.
210
-
211
- - **New component `Modal`** — a centered dialog overlay for RN + RN-web: a scrim, a rounded themed
212
- surface, an optional header (`title` + a top-right **✕ close** — a 44dp `IconButton` with a web
213
- `tooltip`/aria-label "Close"), a scrollable body (`children`), and an optional `footer`. Dismissal
214
- funnels to `onClose` from four routes: the ✕, a **backdrop** press, **Escape** on web
215
- (`useEscapeKey`), and the hardware back button on native (RN `Modal`'s `onRequestClose`). It is
216
- `role="dialog"` + `aria-modal` (`accessibilityViewIsModal`), **focus-trapped** on web
217
- (`useFocusTrap`, restoring focus to the opener on close) and **scroll-locked** (`useScrollLock`).
218
- Props: `visible`, `onClose`, `title?`, `children?`, `footer?`, `size?` (`sm`/`md`/`lg`, default
219
- `md`), `showClose?` (default `true`), `testID?` (default `modal`), `accessibilityLabel?`. testIDs:
220
- `${testID}-close`, `${testID}-backdrop`. All colours read from `useUi()` — no raw literals.
221
- - **New component `ConfirmDialog`** — built ON `Modal`, for confirmations. Renders the `message`
222
- plus a Cancel + Confirm button row (from `@dloizides/ui-buttons`). `destructive` paints the
223
- Confirm with the `danger` (red) variant for irreversible actions. **Cancel is first in the DOM so
224
- the focus trap lands on the SAFE action**; the ✕ is hidden (Cancel is the explicit dismiss). While
225
- `busy`, Confirm shows a spinner and Cancel is disabled. Cancel / backdrop / Escape → `onCancel`.
226
- Props: `visible`, `title`, `message`, `confirmLabel?`, `cancelLabel?`, `destructive?`, `onConfirm`,
227
- `onCancel`, `busy?`, `testID?` (default `confirm-dialog`). testIDs: `${testID}-confirm`,
228
- `${testID}-cancel`, `${testID}-message`.
229
- - **New exported type `ModalSize`** (`'sm' | 'md' | 'lg'`) — a plain string union (matching the
230
- kit's `ButtonSize` convention; no `const enum` crosses the package boundary).
231
- - **New i18n keys** the host must provide: `common.close` (✕ label), plus for `ConfirmDialog`
232
- defaults `common.confirm` / `common.confirmHint` / `common.cancel` / `common.cancelHint`. Reuses the
233
- existing `common.closeDialogHint`, `common.dialog`, `common.dismissDropdown(Hint)` keys.
234
- - **New peer dependency `@dloizides/ui-buttons` (`>=1.8.0`)** — `ConfirmDialog` reuses its `Button`,
235
- `Modal` reuses its `IconButton` for the ✕, rather than reinventing button chrome.
236
-
237
- Additive: `ModalShell`, `ModalDropdown` and every existing export/selector are untouched. Covered by
238
- `Modal.test.tsx`, `ConfirmDialog.test.tsx`, `useEscapeKey.test.ts`, `useScrollLock.test.ts`.
239
-
240
- > Note: `@dloizides/ui-feedback` also exports a lighter `ConfirmDialog` (no ✕ / Escape / focus-trap,
241
- > own buttons). This ui-layout one is the richer, `Modal`-based dialog the portals should adopt.
242
-
243
- ## 1.21.0
244
-
245
- **The collapsed `Tabs` menu can now present as a HAMBURGER (☰) — the universal mobile-nav affordance.**
246
-
247
- The collapsed organizer nav reads better on a phone as a ☰ hamburger than as a caret field.
248
- This adds an opt-in so a consumer can choose either presentation; the default is unchanged.
249
-
250
- - **New opt-in prop `ModalDropdown.showHamburger?: boolean` (default `false`).** When set, the
251
- DEFAULT trigger renders a ☰ glyph LEADING the active option's label, with the same bordered
252
- field box, theme tokens and ≥44dp (`MIN_TOUCH_TARGET`) hit target as the caret variant. It
253
- **takes precedence over `showCaret`** (a hamburger already IS the "this is a menu" cue, so the
254
- trailing caret would be redundant) and, like `showCaret`, is ignored when a custom `renderTrigger`
255
- is supplied. The glyph is a font character (U+2630) — no icon package enters this contract-pure
256
- kit — and its colour comes from `colors.textSecondary` (no raw literals). It is decorative: the
257
- trigger's `aria-label` still names the control, so screen readers do not announce the glyph.
258
- - **New exported enum `TabsCollapsedTrigger { Caret, Hamburger }`** + new optional prop
259
- **`Tabs.collapsedTrigger` / `TabsMenu.collapsedTrigger` (default `Caret`).** Selects how the
260
- COLLAPSED (mobile) tab menu trigger presents; only affects the collapsed form, the wide pill
261
- strip is identical either way. Exported as a regular (runtime) enum for the same reason as
262
- `DropdownVariant` — a `const enum` cannot cross the published-package boundary under
263
- `isolatedModules`.
264
-
265
- Backward-compatible: two new optional props + one new enum, all defaulting to the prior behaviour;
266
- no testID/selector changes. Per-tab E2E selectors (`{idPrefix}-menu` trigger, `{idPrefix}-tab-{key}`
267
- / descriptor option testIDs) are untouched. No new i18n keys (the existing `common.tabsMenuHint`
268
- serves both presentations). Covered by component tests (`ModalDropdown.test.tsx`,
269
- `Tabs.collapsed.test.tsx`).
270
-
271
- ## 1.20.0
272
-
273
- **The collapsed `Tabs` menu now READS as a menu — a caret affordance + guaranteed focus.**
274
-
275
- On the live phone-width organizer nav (`app.kefi.dloizides.com/organizer/passes`) the
276
- collapsed trigger showed only the active label ("Passes") with no menu cue — styled like a
277
- static chip/pill — so users could not tell it was a section switcher. This adds a clear
278
- menu affordance and locks in keyboard focusability.
279
-
280
- - **New opt-in prop `ModalDropdown.showCaret?: boolean` (default `false`).** When set, the
281
- DEFAULT trigger renders a ▾ caret pinned to its trailing edge that rotates to point up
282
- while the menu is open, with a ≥44dp (`MIN_TOUCH_TARGET`) hit target and the existing
283
- bordered field box + theme tokens. **Every existing field-style dropdown in the kit is
284
- unchanged** because the caret is off by default, and it is ignored when a custom
285
- `renderTrigger` is supplied (that caller owns its own visuals). The caret is a font glyph
286
- (U+25BE), so no icon package enters this contract-pure kit, and its colour comes from
287
- `colors.textSecondary` (no raw literals). It is decorative — the trigger's `aria-label`
288
- still names the control, so screen readers do not announce the glyph.
289
- - **`TabsMenu` opts into `showCaret`**, so the collapsed `Tabs` section switcher now looks
290
- like a proper control instead of a chip. No change to the public `Tabs` / `TabsMenu` API.
291
- - **Focusability:** under react-native-web the trigger renders as a native `<button>`
292
- (role=button, no `tabindex="-1"`), so it is keyboard-reachable and Enter/Space activate
293
- it. A regression test asserts the collapsed trigger is not `tabindex="-1"`. (The
294
- `tabindex="-1"` seen on the live DOM came from the older deployed version; it does not
295
- reproduce on this source — proven by the rendered-DOM assertion, not assumed.)
296
-
297
- Backward-compatible: one new optional prop, no testID/selector changes. Per-tab E2E
298
- selectors (`{idPrefix}-menu` trigger, `{idPrefix}-tab-{key}` / descriptor option testIDs)
299
- are untouched. No new i18n keys.
300
-
301
- `ui-showcase` does not yet import `Tabs`/`ModalDropdown` (only `SegmentedControl`,
302
- `CopyableId`, `TruncatedText`), so this is covered by component tests
303
- (`ModalDropdown.test.tsx`, `Tabs.collapsed.test.tsx`); a showcase specimen is a follow-up.
304
-
305
- ## 1.19.0
306
-
307
- **`Tabs` collapses to a real mobile menu below a breakpoint.**
308
-
309
- On a phone the horizontal pill strip "is not a real menu and not mobile friendly" — a
310
- scrolling chip row is hard to use with 7–8 tabs (the kefi organizer dashboard:
311
- Overview / Passes / Attendees / Promoters / Door / Ledger / Messaging / Settings). `Tabs`
312
- now renders responsively:
313
-
314
- - **Wide (>= `collapseBelow`, default 768, web only):** the existing horizontal
315
- `role=tablist` / `role=tab` strip — unchanged, fully backward-compatible.
316
- - **Narrow (< breakpoint) or native:** a genuine menu — a trigger button showing the
317
- active section that opens a vertical list of all sections. Delegates to the kit's
318
- existing `ModalDropdown` (menu/listbox semantics, focus trap, dismiss backdrop, dual-
319
- platform a11y) rather than reimplementing a dropdown.
320
-
321
- Backward-compatible: the public API is unchanged except one new optional prop,
322
- `collapseBelow?: number` (default = the shared kit breakpoint, 768; pass `0` to keep the
323
- row on any web width, or a large number to force the menu). The collapse threshold reuses
324
- the SAME viewport rule (`MENU_BREAKPOINT`) that `ModalDropdown` uses for its menu-vs-modal
325
- split, so the whole layout kit changes shape at one consistent breakpoint.
326
-
327
- **E2E survival:** per-tab selectors keep working in BOTH modes. Each collapsed menu row's
328
- `testID` is the tab descriptor's own `testID` when supplied, otherwise the same
329
- `{idPrefix}-tab-{key}` pattern the wide strip uses for its tab element ids (the menu must
330
- be opened first, as with any select). Requires one new host i18n key,
331
- `common.tabsMenuHint` (the accessible hint on the collapsed trigger).
332
-
333
- ## 1.17.0
334
-
335
- **New `Tabs` primitive — a controlled tabbed section shell.**
336
-
337
- Adds `Tabs`: a wrapping/scrolling pill tab strip plus the active tab's panel, wired
338
- as a proper `tablist` / `tab` / `tabpanel` (aria-selected, aria-controls,
339
- aria-labelledby). Controlled (`activeKey` + `onChange`), so the selected tab can be
340
- driven from a route param or storage. Labels are pre-localized strings; colours read
341
- from the `@dloizides/ui-feedback` theme (no FM/router/store imports), consistent with
342
- the rest of the kit.
343
-
344
- Extracted so the seven portals share ONE tab shell instead of hand-rolling a bar per
345
- app — first consumer is the kefi-web organizer dashboard, split from one enormous page
346
- into menu tabs.
347
-
348
- ## 1.16.1
349
-
350
- **`Heading` supports levels 1-6 instead of `<h1>` only.**
351
-
352
- `Heading` rendered `<h1>` unconditionally, so any screen needing sub-structure either
353
- shipped multiple `<h1>`s or avoided the component. The Digital Kin guide editor did the
354
- latter — styled `<Text>` instead — and shipped **zero headings**: measured on the live
355
- CMS, `document.querySelectorAll('h1,h2,h3,h4,h5,h6').length === 0` for the entire page.
356
-
357
- So there was no `<h1>` naming the guide being edited and nothing marking the steps
358
- section. Screen-reader users could not navigate by heading, and styling was standing in
359
- for structure.
360
-
361
- After: `h1` names the guide, `h2` marks the steps section, `h3` per step.
362
-
363
-
364
- ## 1.15.1
365
-
366
- - **Fix (`CopyableId` truncated the value with room to spare).** 1.15.0 gave the value wrapper
367
- `flexShrink: 1`, which makes it SHRINK-WRAP its content — so the width the component measures to
368
- decide how much to show was derived from the very string it was computing: truncate → wrapper
369
- narrows → re-measure smaller → truncate harder. Verified in Chrome via `apps/ui-showcase`: a
370
- 506px-wide container and a 306px one rendered the SAME 196px string, i.e. a 36-character GUID was
371
- cut to 26 characters with ~300px going unused.
372
-
373
- The wrapper is now `flex: 1`, so it fills the row's leftover width and its size is independent of
374
- its content. Re-verified at four widths: 520px and 320px now render the full 36-character GUID
375
- untruncated; 200px and 120px middle-truncate with both ends intact, and nothing overflows.
376
-
377
- This is the SAME failure mode `useAvailableWidth` documents for `TruncatedText` (measure the
378
- parent, never the element, or the output feeds back into the input) — reintroduced one level up
379
- by the new wrapper. Unit tests cannot catch it: the truncation helpers are pure and passed
380
- throughout, and jsdom reports zero widths, so only a real browser shows it.
381
-
382
- - **New: `CopyableId` accepts `style`** for its outer container. Hosts need this to give the
383
- control a width that does not derive from its own content (a `flexBasis`, a `width`, or
384
- `flex: 1`) — without one, a shrink-to-fit parent reintroduces the feedback loop above at the
385
- host level. Documented on the prop.
386
-
387
- ## 1.15.0
388
-
389
- - **New: `CopyableId`** — show a long machine identifier (a GUID, a reference, a correlation id)
390
- so a human can both READ enough of it to tell two apart and TAKE it in one action. Composes the
391
- existing `TruncatedText`, so the middle-truncation work is reused rather than re-derived.
392
-
393
- Driven by the AML console needing to surface a screening ID an analyst can copy and re-screen
394
- with, but it is deliberately domain-free: every portal has identifiers it currently either hides
395
- or dumps raw into a table cell.
396
-
397
- Three things this gets right that a naive copy button does not:
398
-
399
- 1. **It copies the FULL value, never the display string.** A truncated GUID that a user
400
- hand-selects yields `3f2a9c81…d4e7`, ellipsis and all, which silently fails wherever it is
401
- pasted. Showing a truncated identifier with no copy affordance is strictly WORSE than not
402
- showing it. The full value is always the accessible name and the web tooltip.
403
- 2. **Middle truncation, not tail.** Two GUIDs from one table share a prefix far more often than
404
- intuition suggests, and `numberOfLines={1}` renders them IDENTICALLY. The tail is what tells
405
- them apart, so both ends survive.
406
- 3. **A failed copy is SHOWN, not swallowed.** `navigator.clipboard` is not merely unreliable —
407
- it is `undefined` outside a secure context, which is how every staging box and LAN preview in
408
- this fleet is served, i.e. exactly where people hand-test. `copyText` therefore falls back to
409
- `document.execCommand` over an off-screen textarea, and returns a boolean rather than
410
- assuming. On total failure the control renders a distinct `common.copyFailed` state; a silent
411
- failure would leave the user believing they hold an identifier they do not.
412
-
413
- The status is carried in the control's accessible **NAME**, not its hint, because
414
- `accessibilityHint` is dropped by react-native-web and never reaches the DOM — a screen-reader
415
- user would otherwise get no confirmation at all.
416
-
417
- No native clipboard dependency is taken. Hosts on React Native inject a `writer`
418
- (`Clipboard.setString`); an injected writer that throws falls through to the DOM paths.
419
-
420
- New `LAYOUT_I18N` keys — hosts binding a missing-key guard to that map (as aml-v2 does) will
421
- fail their catalog test until these are defined: `common.copy`, `common.copyHint`,
422
- `common.copied`, `common.copyFailed`, `common.copyableIdHint`.
423
-
424
- ## 1.12.2
425
-
426
- - **Fix (`TruncatedText` STILL did not middle-truncate; 1.12.1's fix was the wrong mechanism).**
427
- 1.12.1 moved the `onLayout` measurement from the `<Text>` to a wrapping `<View>`. Verified in
428
- Chrome: that did not fire either, and neither did a `ResizeObserver` on the same node — zero
429
- callbacks from all three mechanisms under react-native-web 0.21.
430
-
431
- Width now comes from `useAvailableWidth`, which on web reads the **parent's** inner width
432
- straight off the DOM in a ref callback, plus a `resize` listener. The parent is measured
433
- rather than the element because the element shrink-wraps its own text, so measuring it would
434
- feed the output back into the input and oscillate. Native keeps `onLayout`, where it works.
435
-
436
- Confirmed in Chrome at four container widths — the same URL renders as
437
- `timesofindia.indiatimes.com/cit…ties/articleshow/114237788.cms` (520px) down to
438
- `timeso…88.cms` (120px), with no element exceeding its container at either a 1400px or a
439
- 420px viewport.
440
-
441
- Note for anyone extending this: unit tests cannot catch this class of bug here. The
442
- truncation helpers are pure and passed throughout all three versions; what was broken was
443
- whether the measurement ever ran in a real browser.
444
-
445
- ## 1.12.1
446
-
447
- - **Fix (`TruncatedText` did not actually middle-truncate).** 1.12.0 measured its available
448
- width with `onLayout` **on the `<Text>` itself, which never fires under RN-web**. The width
449
- stayed 0, the character budget stayed 0, and the component silently fell back to rendering
450
- the full string — i.e. to exactly the tail-only CSS ellipsis it exists to replace. It
451
- compiled, typechecked and passed all its unit tests throughout, because the truncation
452
- helpers are pure and were never the broken part; only a browser could see it. Measured in
453
- Chrome at a 120px container: text rendered `timesofindia.indiatimes.com/city/delhi/delhi-…`
454
- with **no `…` character present** — CSS clipping, not middle truncation.
455
-
456
- The width is now measured on a wrapping `<View>`, which does fire `onLayout`. The overflow
457
- guarantee was never affected (the element stayed inside its parent in both versions); what
458
- was lost was the informative half of the behaviour.
459
-
460
- ## 1.12.0
461
-
462
- - **New: `TruncatedText`** — a single-line text/link that middle-truncates to fit its container
463
- and cannot overflow at any width. Promoted out of the AML console, where a full adverse-media
464
- article URL rendered as raw `<Text>` and blew out its table row.
465
-
466
- Three things that look like they would solve this and do not, all verified against
467
- react-native-web 0.21 rather than assumed:
468
-
469
- 1. `numberOfLines={1}` alone truncates at the **tail** (RN-web compiles it to
470
- `text-overflow: ellipsis`). Every URL from one publisher then collapses to the same
471
- `timesofindia.indiatimes.com/city/de…` prefix and the reader cannot tell the articles
472
- apart. There is no CSS for middle truncation, so it is computed in JS.
473
- 2. `title={full}` is **silently dropped** — RN-web's `<Text>` forwards only `href`, `lang`
474
- and `pointerEvents` beyond the shared whitelist. The tooltip is set on the host node
475
- through a ref instead.
476
- 3. JS truncation alone can mis-estimate an unusual glyph mix, so `numberOfLines={1}` is ALSO
477
- applied as a hard backstop. Overflow is impossible by construction, not by tuning.
478
-
479
- The full value always stays reachable — as the accessible name and, on web, the native
480
- tooltip. Also exported: the pure `truncateMiddle` / `formatUrlForDisplay` helpers and
481
- `ELLIPSIS`.
482
-
483
- ## 1.11.0
484
-
485
- - **Fix (HIGH — 1.10.0's out-of-view close never fired in the real runtime).** 1.10.0 added
486
- "close the menu once the trigger leaves the viewport". Repositioning worked, but the close was
487
- measured **against the viewport**, and **RN-web apps never scroll the document** — every screen
488
- renders inside a `ScrollView`, so scrolling happens in an inner `<div>` and `window.scrollY`
489
- stays 0 forever. A trigger scrolled out of that inner scroller is invisible to the user while its
490
- rect sits comfortably inside the viewport, so the check could not fire on any screen of any
491
- portal. Measured in Chrome: trigger at `top: -37` (fully above the scroller), menu still rendered.
492
- Visibility is now measured against the **clip window** — the viewport intersected with every
493
- clipping ancestor — which is what makes it work inside an inner scroll container.
494
- - **Fix: "entirely out of view" was also the wrong threshold.** When a scroll container reaches the
495
- end of its range the trigger stops with a few pixels still showing (4px in the reported case), so
496
- "fully out" was *unreachable* and the menu never closed however far the user scrolled. There is
497
- now a minimum-visible-pixel floor (`MIN_VISIBLE_PX`).
498
- - **Guard: the menu never closes on its FIRST measurement**, so opening a dropdown whose trigger is
499
- already partly clipped still works; only movement after opening can close it.
500
- - **The zero-area "not laid out yet" guard is unchanged in intent but now provably size-only** — it
501
- asks about the element's own box, never its position, so it cannot swallow a genuine hidden case.
502
- - **New: `LAYOUT_I18N`** — the manifest of every translation key this package resolves, mirroring
503
- `TABLE_I18N` / `FILTERS_I18N` from `@dloizides/ui-tables` so hosts can bind an existing
504
- missing-key guard to it with no new pattern. The kit is fallback-free, so a key a host forgets
505
- reaches users as a raw dotted name; hand-maintained key lists rot (one portal was found missing
506
- 26 kit keys, another had `common.accordionToggleHint` undefined while `Accordion` was mounted).
507
- Every `t(...)` call in the package now references the map, and the suite fails on a raw key
508
- literal or a stale entry — so the manifest cannot drift from the code.
509
- - **Fix: the 1.10.0 CHANGELOG entry was written in cp1252**, leaving the published file invalid
510
- UTF-8. Re-encoded.
511
- - **No breaking change.** `LAYOUT_I18N` is additive and the key strings are unchanged, so existing
512
- translation files keep working untouched.
513
-
514
- ## 1.10.0
515
-
516
- Two defects found by browser visual QA of the inline dropdown menu against a live app.
517
-
518
- - **Fix (HIGH, affects every consumer): the open inline menu detached from its trigger.** On web the
519
- menu is portalled to `document.body` with `position: fixed` at the trigger's measured rect.
520
- `fixed` is viewport-relative, so that coordinate is only valid until something moves the trigger.
521
- A `scroll`/`resize` listener on `window` was already in place (since 1.7.0) and does handle plain
522
- scrolling — but it left three real gaps:
523
- - **Layout changes that fire no scroll event at all** — an accordion above the trigger expanding,
524
- a sticky header resizing, a banner appearing, an async list rendering. The trigger moved, nothing
525
- scrolled, no listener fired, and the menu stayed behind. Now covered by a `ResizeObserver` on the
526
- anchor and on `document.body`.
527
- - **The trigger leaving the viewport.** Repositioning cannot help here — the menu just follows its
528
- trigger off-screen and hangs over unrelated content with nothing on screen explaining it. The
529
- menu now **closes** once the trigger is fully out of view.
530
- - **Layout thrash.** The handler ran a synchronous `getBoundingClientRect()` (a forced reflow) plus
531
- a React state update on *every* scroll event. Work is now coalesced into one
532
- `requestAnimationFrame` per frame.
533
- Scroll is now observed in the **capture** phase on `document` rather than `window`, so a scroll in
534
- any ancestor scroll container counts. Tracking moved into a dedicated `useAnchorTracking` hook.
535
- Native is unaffected (the popover is in-tree and moves with its anchor).
536
- - **Fix (a11y): `accessibilityHint` never reached a screen reader.** The prop is part of the public
537
- API and every caller passes one, but react-native-web does not map it — the trigger carried
538
- `aria-label` and `aria-expanded` and **no hint of any kind**, so the text was silently thrown away
539
- (older react-native-web versions additionally leaked it to the DOM, logging
540
- `React does not recognize the accessibilityHint prop on a DOM element`). On web the hint is now
541
- rendered into a visually-hidden node referenced by `aria-describedby` — the same wiring
542
- `@dloizides/ui-forms`' `Field` uses for its error line — and the RN-only prop is no longer passed
543
- on web at all. Native still receives `accessibilityHint` unchanged.
544
- - **No API change.** Both fixes are internal; every existing caller benefits without edits.
545
-
546
- ## 1.9.1
547
-
548
- - **Fix (keyboard a11y, affects every consumer): Enter CLOSED the inline menu instead of SELECTING
549
- the highlighted option.** The trigger keeps DOM focus while the menu is open, and react-native-web
550
- maps Enter on a focused Touchable to `onPress`. React dispatches that from its ROOT container
551
- listener — an ancestor of the trigger, but a *descendant* of `document` — so the menu's BUBBLING
552
- `document` keydown listener ran second: the trigger toggled the menu shut, React unmounted the
553
- popover, the effect cleanup removed the very listener the event was still travelling toward, and
554
- `document` never saw the Enter. Keyboard users could open a dropdown and arrow through it but
555
- could never CHOOSE with the keyboard (mouse selection was unaffected, which is why it went
556
- unnoticed).
557
- - **Fix:** the menu's key handler now runs in the **capture** phase and `stopPropagation`s the keys
558
- an open menu owns (↑/↓/Home/End/Enter/Escape), so it runs ahead of React's listener and the
559
- trigger cannot re-toggle behind it. Found while browser-verifying the AML v2 topbar dropdowns.
560
-
561
- ## 1.9.0
562
-
563
- - **`ModalDropdown`: `menuMinWidth` — a width FLOOR for the open inline menu (additive, optional).**
564
- The menu matches the TRIGGER's width, which is right for a full-width field but leaves a compact
565
- anchor (the 1.8.0 `renderTrigger` case: a locale pill, an avatar chip, an icon button) with a menu
566
- too narrow to read its own option labels — a 52px "EN ▾" pill produced a 52px menu whose rows were
567
- clipped to a dark strip. `menuMinWidth` floors it; a wider trigger still wins.
568
- - **Backward-compatible:** omitted, the width is the trigger's, exactly as before.
569
-
570
- ## 1.8.0
571
-
572
- - **`ModalDropdown`: `renderTrigger` — a custom ANCHOR slot (additive, optional).** The dropdown's
573
- default trigger is a bordered field box, which is wrong for a *menu* anchored to a compact chip
574
- (a locale pill, an avatar/user chip, an icon button). Callers can now supply
575
- `renderTrigger={({ label, isOpen }) => …}` and own the anchor's visuals entirely; the default box
576
- is then not rendered. The a11y wrapper stays with the dropdown — `role=button`, `aria-expanded`,
577
- the accessible label + hint, and the `testID` are still applied — so a custom trigger *cannot*
578
- drop the accessible contract, and the portalled, keyboard-navigable (↑/↓/Home/End/Enter/Escape),
579
- never-clipped menu comes along for free.
580
- - **`ModalDropdown`: `optionTestID` — custom per-option testIDs (additive, optional).** Options
581
- still default to `` `${testID}-option-${value}` ``; a caller turning an existing flat control into
582
- a dropdown can now keep its established selectors stable
583
- (`optionTestID={(code) => `lang-${code}`}`).
584
- - **Backward-compatible:** both props are optional and, when omitted, the render tree is unchanged —
585
- erevna / katalogos / kefi / agora are unaffected and need no markup changes.
586
-
587
- ## 1.7.1
588
-
589
- Fix: the modal-variant dismiss backdrop was a pressable WRAPPING the option buttons,
590
- producing invalid DOM on web ("<button> cannot contain a nested <button>") + a React
591
- console.error. The backdrop is now an absolute-fill SIBLING behind the dialog — same
592
- tap-to-dismiss behaviour, no nesting. No API change.
593
-
594
-
595
- ## 1.7.0
596
-
597
- - **`ModalDropdown` inline-menu (`variant={DropdownVariant.Menu}`) z-index / clipping fix.** On
598
- wide/desktop web the open inline menu painted UNDERNEATH later content (adjacent filter fields,
599
- the results table, cards) so options were hidden/clipped. Root cause: react-native-web renders
600
- **every `View`** with `position: relative; z-index: 0`, making each View its own stacking context —
601
- so the popover's `zIndex: 1000` was trapped inside its anchor / the app's field wrapper and could
602
- never rise above later-painting siblings.
603
- - **Fix:** on web the menu is now rendered in a **portal to `document.body`** with `position: fixed`
604
- at the trigger's measured viewport rect (recomputed on scroll/resize) and a high `zIndex`. A portal
605
- escapes every ancestor stacking context AND every ancestor `overflow: hidden`, so the menu always
606
- paints on top and is never clipped — the same "menu above the table" outcome as
607
- `@dloizides/ui-tables` `SizeDropdown`. The anchor wrapper is also lifted to a raised `zIndex` while
608
- open (defence-in-depth; the primary lift on native).
609
- - **Native-safe:** the portal + `document`/`window` listeners are all behind `Platform.OS === 'web'`;
610
- native keeps the in-tree `position:absolute` popover + `elevation`. `react-dom` is added as an
611
- **optional** peer (already present in every react-native-web consumer).
612
- - Outside-click dismissal now consults the portalled popover's own node too, so clicking an option
613
- still selects (a portalled option is no longer a DOM descendant of the anchor). Keyboard nav
614
- (↑/↓, Home/End, Enter, Escape), `role="menu"`/`menuitem`, `aria-expanded`/`aria-selected`, and the
615
- modal variant on narrow/native are all unchanged.
616
- - **Additive / backward-compatible:** the `ModalDropdown` API is unchanged; erevna / katalogos / kefi
617
- are unaffected.
618
-
619
- ## 1.6.0
620
-
621
- - **Accessibility (WCAG 2.1 AA) hardening — additive + backward-compatible.**
622
- - `AccordionItem`: the rotating chevron (plain) and leading ▸ marker (boxed) are purely
623
- decorative — the open/closed state is already on the header via `aria-expanded` — so they are
624
- now `aria-hidden` / `accessibilityElementsHidden` to keep them out of the screen-reader tree.
625
- - `Accordion`: the expand/collapse `LayoutAnimation` and the chevron rotation now honour
626
- `prefers-reduced-motion: reduce`, snapping instantly for users who request reduced motion
627
- (WCAG 2.3.3, web only).
628
- - `ModalDropdown`: the trigger now also emits `accessibilityState.expanded` (native parity for
629
- the existing web `aria-expanded`).
630
-
631
- ## 1.5.0
632
-
633
- - `Accordion` / `AccordionItem` gain a `variant` prop (`'plain' | 'boxed'`, default `'plain'`).
634
- `plain` is the original borderless look (hairline dividers, right-hand chevron flipping 180° on
635
- open) — existing consumers render **identically**, no change. `boxed` is the AML v1 console
636
- `<details>` look: each item is its own bordered, rounded box (spaced by a gap) with a **leading
637
- ▸ marker** that rotates 90° on open and a muted, 600-weight summary. The full API is preserved
638
- (controlled/uncontrolled, `allowMultiple`, `defaultOpen`, a11y `aria-expanded`/region, the
639
- open/close LayoutAnimation + chevron rotation). Additive + backward-compatible.
640
-
641
- ## 1.4.0
642
-
643
- - Add **`SegmentedControl`** — a single rounded pill *track* holding N mutually-exclusive
644
- segments (the iOS-style segmented / tab toggle). The selected segment lifts onto a raised
645
- surface (`colors.surface`) with a subtle shadow; the rest stay transparent over the soft
646
- track (`colors.background`). Promoted from the v1 AML console's `.lf-mode` mode switch so
647
- erevna/katalogos/kefi share ONE toggle instead of hand-rolling two primary/ghost buttons.
648
- - **Generic over the value union** (`SegmentedControl<'peps' | 'leaders'>`) for a typed
649
- `onChange`; each segment carries its own `label` / `value` / optional `testID` +
650
- `accessibilityLabel` / `accessibilityHint`.
651
- - **a11y**: the group renders as a `tablist`, each segment as a `tab` with
652
- `accessibilityState={{ selected }}` (react-native-web forwards `role` + `aria-selected`).
653
- - **Themed** entirely from the `@dloizides/ui-feedback` theme (surface / background / border /
654
- text colours); no colour literal except the selected-segment drop shadow.
655
- - **Additive / backward-compatible**: purely new exports (`SegmentedControl`,
656
- `SegmentedControlProps`, `SegmentedOption`). Existing consumers are unaffected.
657
-
658
- ## 1.3.0
659
-
660
- - Add **`Accordion`** + **`AccordionItem`** — a themed expand/collapse disclosure group that
661
- replaces per-app hand-rolled `<details>` / expanders (AML "More options" + expandable
662
- matched-candidate rows, Erevna survey groups, Katalogos menu sections…).
663
- - Compound API: an `Accordion` container owns the open state and shares it with `AccordionItem`
664
- children via context. Each item = a pressable header (title left, optional `right`
665
- adornment/badge slot, a rotating chevron) over a collapsible body `region`.
666
- - **Controlled** (`openIds` + `onOpenChange`) **and uncontrolled** (`defaultOpenIds`, plus
667
- per-item `defaultOpen`). `allowMultiple` (default `true`) vs single-open. Per-item `disabled`.
668
- - **a11y**: header is an accessible `button` (`accessibilityRole="button"`,
669
- `accessibilityState={{ expanded }}`, web `aria-expanded` + `aria-controls`); body is a
670
- `role="region"`. Renders as a native `<button>`, so **Enter / Space toggle** it.
671
- - **Themed** entirely from the `@dloizides/ui-feedback` theme (border / surface / text colours),
672
- no hardcoded palette; renders borderless so it nests inside a `Section` / `Card`.
673
- - **Animated** open/close via a guarded `LayoutAnimation` (web- and native-safe no-op fallback,
674
- never throws) + an `Animated` chevron rotation. Hook-safe (lazy `useState`, no ref reads in render).
675
- - **Additive / backward-compatible**: purely new exports (`Accordion`, `AccordionItem`,
676
- `AccordionProps`, `AccordionItemProps`). Existing consumers (erevna / katalogos / aml-v2) are
677
- unaffected.
678
-
679
- ## 1.2.0
680
-
681
- - `ModalDropdown` can now render as an **inline anchored menu** (native `<select>` feel), not only a
682
- modal. New `variant?: DropdownVariant` prop (`Menu` | `Modal`) selects the presentation per screen.
683
- - **Responsive default** (when `variant` is omitted): inline `Menu` on wide/desktop web
684
- (viewport ≥ 768px), `Modal` on narrow/mobile and on any native platform. An explicit `variant`
685
- overrides the auto choice.
686
- - The inline menu anchors under the trigger, is dismissible via click-outside / `Esc`, is
687
- keyboard-navigable (↑/↓, `Home`/`End`, `Enter`), scrolls when long, and does not push layout.
688
- The modal path is unchanged. Both variants share the same option-rendering/selection logic
689
- (`OptionRow`), so nothing is duplicated.
690
- - **Additive / backward-compatible**: existing `ModalDropdown` callers (erevna / katalogos / aml-v2)
691
- keep their exact API and now get the inline-on-desktop menu automatically. New export:
692
- `DropdownVariant` (a runtime enum — deliberately not `const enum`, which cannot cross a published
693
- package boundary under `isolatedModules`).
694
-
695
- ## 1.1.0
696
-
697
- - Add `ModalShell` — slide-up full-screen modal with a themed header (title + close) and scrollable body.
698
- Composes `Heading` (this package) + `SvgIcon` (`@dloizides/ui-icons`). This was the batch-1 deferred
699
- ModalShell, now landed (ui-icons + Heading both shared). Adds `@dloizides/ui-icons` + `react-native-svg`
700
- as peers.
701
-
702
- ## 1.0.0
703
-
704
- Initial release (Capability Wave C1, batch 5 — the ui-layout pivot after full settings-hub proved
705
- not cleanly extractable). Extracted the proven (erevna+katalogos identical) presentational primitives
706
- that the settings screens (and others) reuse: `Section`, `Heading`, `StatusBadge`, `UpgradePrompt`,
707
- `ModalDropdown` + `useFocusTrap`. Share the `@dloizides/ui-feedback` context (`useUi`). `Heading`
708
- unblocks the deferred ModalShell. `Breadcrumb` deferred (couples to the app's router + breadcrumb map).
1
+ # Changelog
2
+
3
+ ## 1.50.0
4
+
5
+ - `SplitPanes` takes `startWidth`: fixes the start pane (a list rail) at that width while side by side, like `endWidth`; stacked it stays full width.
6
+ - `rowSelection(isDesktop, rowKey, { selectedKey, shownKey })`: desktop marks the shown row with `AccentBar`, a phone outlines only the tapped row (`Outline`). From invoice-web (INV-EXTRACT-1 W12).
7
+
8
+ ## Unreleased
9
+
10
+ ## 1.49.2
11
+ - Breadcrumb and UnderlineTabs take an optional `accessibilityHint`, passed to the strip element.
12
+
13
+ ## 1.49.1
14
+ - IdChip: `value` may be null or empty; the chip then copies nothing, is disabled and hides the copy glyph (was: copied the placeholder).
15
+
16
+ MODC-1 D-MC-641 "One page layout for all pages", UI-ATOMIC-1.
17
+
18
+ - New organism `SectionIndexLayout`: from `SECTION_INDEX_BREAKPOINT` (1024) an "On this page" index (molecule `SectionIndex`) beside every section stacked, a press scrolls to its section; below it a wrapping row of chips (molecule `SectionChips`) shows one section at a time, the first by default, so nothing is removed. Hit boxes >= 44 px; labels are pre-localized props. Options, defaults keep the plain behaviour: `density` (`SectionDensity` comfortable or dense gaps), `stickyIndex` (web, default false), `chipOverflow` (`ChipOverflow` wrap or scroll).
19
+
20
+ ## 1.44.0
21
+
22
+ MODC-1 "Module C unified console" (AC-UI-1, AC-UI-7), UI-ATOMIC-1 "Reuse first, extract what is new, layer atom / molecule / organism".
23
+
24
+ - `StatusBadge` takes `tone` (`BadgeTone`: neutral, info, success, warning, danger) with the fill from the theme scale main (or deep) step and the ink from `resolveOnBrand`, so text is >= 4.5:1; `color` / `backgroundColor` are now optional and still win when passed. A tone no theme fill can carry falls back to theme text on the elevated surface. ui-tables `StatusTone` is to map onto `BadgeTone`.
25
+ - New atom `CountBadge`: a count pill capped as `max+` (default 99), hidden at zero unless `showZero`, tone from `BadgeTone`. Plain text, no live region; new i18n key `common.countBadgeLabel` (`{{p1}}` = count).
26
+ - New organism `SplitPanes`: two panes side by side or stacked (`SplitLayout` auto / stack / side); side by side each pane has `minWidth: 0` so its text wraps at 360 (TEXT-FIT-1).
27
+
28
+ ## 1.39.0
29
+
30
+ INVOICE-6 "Ready-to-send invoice emails with contacts and a sent log", UI-COMPOSE-1 "Extract shared UI from the start": extracted from invoice-web.
31
+
32
+ - New `SideSheet`: a panel from the bottom on a phone and from the right at the wide breakpoint, with `title`, a scrollable body and a required `footer` slot. Closes on scrim, Escape and hardware back; traps focus, names the initial focus with `initialFocusTestID`, returns focus to the opener and locks page scroll.
33
+ - New `LAYOUT_TEST_IDS.sideSheet`.
34
+
35
+ ## 1.38.2
36
+
37
+ DROPDOWN-WIDTH-1 "A menu opened from a compact trigger is wide enough to read".
38
+
39
+ - `ModalDropdown` with `renderTrigger` and no `menuMinWidth`: the inline menu is now at least 160px wide. An explicit `menuMinWidth` still wins; a default-trigger field keeps its trigger width.
40
+
41
+ ## 1.37.0
42
+
43
+ INVOICE-FU-9 "INVOICE-5 shared look leftovers", AC-PAGE-1.
44
+
45
+ - New `PageFrame`: lays children out at a fixed page size (`A4_PAGE` 794x1123 by default, `pageSize` configurable) and scales the page down to the container width, never up, so line breaks match the printed page.
46
+ - New `pageScale` / `scaledFrame` helpers for the scale math.
47
+
48
+ ## 1.34.0
49
+
50
+ INVOICE-3 "Invoice interface over a user-chosen folder": extracted from invoice-web.
51
+
52
+ - New `AppText` + `TextKind`: text in six fixed sizes.
53
+ - New `ScreenColumn`: the bounded, centred column a screen sits in.
54
+ - New `useIsWideViewport`: the hook form of `isWideWebViewport`.
55
+ - `Section` gains `variant` (`SectionVariant.Card`), `testID`, and `style` widened to `StyleProp<ViewStyle>`. Default look unchanged.
56
+
57
+
58
+ ## 1.32.0
59
+
60
+ ### Added
61
+
62
+ - `StatusBadge` `icon`: an optional decorative slot before the label. INVOICE-3 "Invoice interface over a user-chosen folder".
63
+ - `StickyPreview`: sticks to the top of the visible viewport; shows its `full` slot, or its `compact` slot once scrolled past, while the on-screen keyboard is open, or on `forceCompact`.
64
+ - `useVisibleViewport`, `isKeyboardOpen`: read the Visual Viewport offset and keyboard state.
65
+
66
+ ## 1.30.0
67
+
68
+ ### Added
69
+
70
+ - `ModalDropdown` `menuHeading`: a visible, non-focusable heading (role heading) at the top of the open
71
+ menu or modal; it also becomes the menu's accessible name. KEFI-EDITOR-HEADER-1 "Compact the landing editor header".
72
+
73
+ ## 1.29.0
74
+
75
+ ### Added
76
+
77
+ - `Modal` `initialFocusTestID`: the testID of the control focused when the dialog opens (web), for
78
+ FOCUS-1 "Every screen names its initial focus". `useFocusTrap` takes it as an optional 3rd argument.
79
+
80
+ ### Fixed
81
+
82
+ - `useFocusTrap` no longer steals focus from a child that set `autoFocus`: the first-focusable
83
+ fallback runs only when focus is not already inside the dialog (kefi-web create-attendee modal
84
+ opened on its close button). Focus restore on close skips an element that lives inside the dialog.
85
+
86
+ ## 1.26.3
87
+
88
+ ### Fixed
89
+
90
+ - `ModalDropdown` / `InlineMenu`: a closed-but-still-fading popover was INTERACTIVE for the whole
91
+ 120ms exit animation — no `pointerEvents`, no `aria-hidden` — so a fast second click could select
92
+ an option from a menu the user had already dismissed, and screen readers still saw the options.
93
+ The popover now goes inert the instant `isOpen` goes false (`aria-hidden` on the menu node,
94
+ `pointerEvents: 'none'` on the animated wrapper, and the select handler refuses a closed menu).
95
+ The fade is unchanged. Covered by `ModalDropdown.openState.test.tsx` — the fade is held open
96
+ deliberately, since the reduced-motion test harness collapses it to 0ms.
97
+
98
+ ## 1.26.2
99
+
100
+ ### Fixed
101
+ - **`useAnchorTracking` no longer re-renders an open menu whose anchor has not moved.** `readAnchorRect`
102
+ returns a fresh object on every measurement, and the hook wrote it to state unconditionally, so
103
+ `Object.is` never matched and React re-rendered on every scheduled measurement. Because the hook's
104
+ own `ResizeObserver` watches `document.body` — which the menu is portalled into — the re-render
105
+ could re-arm the observer that caused it, giving a self-sustaining loop (`Maximum update depth
106
+ exceeded` under test). In a browser the menu's box never settled, which Playwright reports as
107
+ "element is not stable" and then "element was detached from the DOM"; it broke every click on a
108
+ `navbar-overflow-menu` option. The rect is now compared BY VALUE, so an unmoved anchor writes no
109
+ state. Pinned by `src/ModalDropdown/useAnchorTracking.stability.test.tsx`.
110
+
111
+ ## 1.26.1
112
+
113
+ ### Fixed
114
+
115
+ - **`ModalDropdown` (popover variant) — a CLOSING menu no longer swallows the next keystroke.**
116
+ `InlineMenu` hard-coded `enabled: true` for `useMenuKeyboard`, so its DOCUMENT-CAPTURE keydown
117
+ listener lived as long as the component was MOUNTED — and `ModalDropdown` deliberately keeps it
118
+ mounted past logical close so the exit fade can play. For that whole window the trigger already
119
+ reported `aria-expanded="false"` while a live handler `preventDefault()`ed and
120
+ `stopPropagation()`ed the user's Enter, so react-native-web's `<button>` never received the
121
+ browser-synthesised click and the menu could not be reopened from the keyboard.
122
+
123
+ The menu's keyboard now follows the owner's LOGICAL open state, threaded down as a new required
124
+ `isOpen` prop on `InlineMenu`, rather than its mount. MOUNTED IS NOT OPEN.
125
+
126
+ Note for anyone extending this: passing `menuAnim.mounted` as `isOpen` reproduces the same bug
127
+ one level up, and there is a test that fails if you do.
128
+
129
+
130
+ ## 1.26.0
131
+
132
+ **New `BuildInfoFooter` — a small, themable "which build am I running?" caption for the portals.**
133
+
134
+ The FE half of the "know what's deployed" work: every RN-web portal can now show a compact,
135
+ unobtrusive footer like `v<buildVersion>` (optionally `· api <sha7>`). `@dloizides/pwa-sw` already
136
+ stamps a per-build `BUILD_VERSION` into the generated service worker, but that value lives only
137
+ inside `service-worker.js` and is not exposed to page runtime — so the component stays dumb and
138
+ takes the build id as a prop (each app inlines it at build time, e.g. `EXPO_PUBLIC_BUILD_VERSION`).
139
+
140
+ - **`BuildInfoFooter`** — props `buildVersion` (required), optional `apiBaseUrl` (best-effort GET
141
+ `${base}/version` → `.commit`, appended as `· api <sha7>`; any failure silently shows the version
142
+ alone), optional `apiCommit` (skip the fetch), `fetchImpl` (test seam), plus the usual `testID` /
143
+ `accessibilityLabel` / `accessibilityHint` / `style`. Muted caption via the theme's
144
+ `textSecondary` — no raw colours.
145
+ - New exports: `formatBuildInfo`, `shortenCommit`, `trimTrailingSlash`, `useApiCommit`,
146
+ `BUILD_INFO_PREFIX`, `API_COMMIT_SEPARATOR`, `VersionResponse`.
147
+ - New kit i18n key `LAYOUT_I18N.buildInfoHint` (`common.buildInfoHint`) and testID
148
+ `LAYOUT_TEST_IDS.buildInfoFooter` (`build-info-footer`).
149
+
150
+ ## 1.24.0
151
+
152
+ **The inline dropdown popover now stays inside the viewport — a floored menu can no longer spill off the right edge.**
153
+
154
+ `buildPortalPopoverStyle` positioned the fixed popover at `left: rect.left` with no horizontal
155
+ clamp. That was fine while the menu matched its trigger's width, but a COMPACT trigger with a
156
+ `menuMinWidth` floor (e.g. the `@dloizides/ui-nav` "More ▾" overflow menu, whose trigger sits near
157
+ the right of the bar) opens a menu WIDER than its trigger — which then extended past the right edge
158
+ of the viewport and clipped its lower/right content ("some items get hidden").
159
+
160
+ - **`buildPortalPopoverStyle(rect, minWidth, viewportWidth?)`** takes an optional `viewportWidth`.
161
+ When given, the popover's `left` is clamped so its right edge clears `MENU_VIEWPORT_MARGIN` (8px) —
162
+ sliding it left, right-aligning it to the trigger in the limit — while never crossing the left
163
+ margin. `viewportWidth = 0` (the default, and the native/pure path) keeps the exact prior
164
+ trigger-anchored behaviour, so every existing caller is unchanged.
165
+ - **`InlineMenu`** passes `window.innerWidth` on web (re-read whenever the tracked trigger rect
166
+ re-measures on scroll/resize); native is untouched.
167
+ - New export `MENU_VIEWPORT_MARGIN`.
168
+
169
+ ## 1.23.0
170
+
171
+ **Modals, the dropdown popover and the accordion body now ANIMATE on web — adopts `@dloizides/ui-motion`.**
172
+
173
+ On react-native-web, RN's `Modal animationType` and `LayoutAnimation` are effectively no-ops, so
174
+ `Modal`, `ModalShell`, the `ModalDropdown` popover and the `Accordion` body all SNAPPED open/closed
175
+ on the web build (all 7 portals). This wires those surfaces to `@dloizides/ui-motion`, which drives
176
+ enter/exit with RN `Animated` (works on web AND native) and collapses every animation to instant
177
+ under the OS "reduce motion" preference. **No public APIs changed** — every prop, testID and a11y
178
+ attribute is identical; this is a purely visual upgrade.
179
+
180
+ - **`Modal`** — the backdrop now **fades** (opacity) and the panel **fades + scales in** (0.96→1) on
181
+ open, reversing on close, via `useEnterExit`. The RN `Modal` host is kept **mounted through the
182
+ exit** (driven by `useEnterExit`'s `mounted` flag, not `visible`) so the close animation can play
183
+ instead of the host unmounting instantly — the trick that made `animationType` a no-op on web. The
184
+ scrim moved to its own animated layer behind the tap-catcher; close-on-backdrop, Escape, focus
185
+ trap, scroll-lock and every testID are unchanged.
186
+ - **`ModalShell`** — the full-screen sheet **fades + scales in** on open (replacing the native-only
187
+ `animationType="slide"`), mounted through the exit the same way.
188
+ - **`ModalDropdown`** — the popover (the inline anchored menu on web-desktop, the centered modal on
189
+ mobile/native) **fades + scales in** from the anchor on open (`transformOrigin: top`), with a snappy
190
+ ~120ms curve so the close reads as near-instant. `useAnchorTracking`, the web portal, keyboard nav
191
+ and outside-click detection are untouched (the fade/scale rides an INNER wrapper so the popover's
192
+ own DOM node — which the outside-click/portal logic depends on — is unchanged).
193
+ - **`Accordion`** — the item body now renders inside ui-motion's **`<Collapse>`** (measured, animated
194
+ height) instead of RN `LayoutAnimation`, so the body animates on web too. The chevron rotation is
195
+ unchanged. Behaviour note: `<Collapse>` keeps the body **mounted at all times** (clipped to height 0
196
+ when closed) so `aria-controls` always resolves and screen readers reach the content — the open
197
+ state is conveyed by the header's `aria-expanded` (the value handed to `<Collapse open>`). The
198
+ internal `accordionAnimation.ts` (`LayoutAnimation` helper) was removed.
199
+ - **New dependency `@dloizides/ui-motion` (`^1.0.1`)** — the shared RN/RN-web motion kit
200
+ (`useEnterExit`, `Collapse`, reduced-motion-aware).
201
+
202
+ Additive and back-compatible for consumers. Covered by the existing `Modal`, `ModalShell`,
203
+ `ModalDropdown` (web + native) and `Accordion` suites; the accordion tests now assert open state via
204
+ `aria-expanded`/the `Collapse` container rather than body-text presence (the body is always mounted).
205
+ The Jest env is pinned to reduced-motion so enter/exit resolve synchronously in tests.
206
+
207
+ ## 1.22.0
208
+
209
+ **Two shared modal primitives: a themed centered `Modal` dialog and a `ConfirmDialog` popup.**
210
+
211
+ Until now the kit had no shared centered dialog — only `ModalShell` (a full-screen slide-up sheet)
212
+ and `ModalDropdown` (a selector). Each portal hand-rolled its own edit dialog (e.g. kefi-web's
213
+ `PromoterActionModal`) and confirmed destructive actions with an ugly inline table row. These two
214
+ primitives replace both, so all 7 portals share one accessible, themed implementation.
215
+
216
+ - **New component `Modal`** — a centered dialog overlay for RN + RN-web: a scrim, a rounded themed
217
+ surface, an optional header (`title` + a top-right **✕ close** — a 44dp `IconButton` with a web
218
+ `tooltip`/aria-label "Close"), a scrollable body (`children`), and an optional `footer`. Dismissal
219
+ funnels to `onClose` from four routes: the ✕, a **backdrop** press, **Escape** on web
220
+ (`useEscapeKey`), and the hardware back button on native (RN `Modal`'s `onRequestClose`). It is
221
+ `role="dialog"` + `aria-modal` (`accessibilityViewIsModal`), **focus-trapped** on web
222
+ (`useFocusTrap`, restoring focus to the opener on close) and **scroll-locked** (`useScrollLock`).
223
+ Props: `visible`, `onClose`, `title?`, `children?`, `footer?`, `size?` (`sm`/`md`/`lg`, default
224
+ `md`), `showClose?` (default `true`), `testID?` (default `modal`), `accessibilityLabel?`. testIDs:
225
+ `${testID}-close`, `${testID}-backdrop`. All colours read from `useUi()` — no raw literals.
226
+ - **New component `ConfirmDialog`** — built ON `Modal`, for confirmations. Renders the `message`
227
+ plus a Cancel + Confirm button row (from `@dloizides/ui-buttons`). `destructive` paints the
228
+ Confirm with the `danger` (red) variant for irreversible actions. **Cancel is first in the DOM so
229
+ the focus trap lands on the SAFE action**; the ✕ is hidden (Cancel is the explicit dismiss). While
230
+ `busy`, Confirm shows a spinner and Cancel is disabled. Cancel / backdrop / Escape → `onCancel`.
231
+ Props: `visible`, `title`, `message`, `confirmLabel?`, `cancelLabel?`, `destructive?`, `onConfirm`,
232
+ `onCancel`, `busy?`, `testID?` (default `confirm-dialog`). testIDs: `${testID}-confirm`,
233
+ `${testID}-cancel`, `${testID}-message`.
234
+ - **New exported type `ModalSize`** (`'sm' | 'md' | 'lg'`) — a plain string union (matching the
235
+ kit's `ButtonSize` convention; no `const enum` crosses the package boundary).
236
+ - **New i18n keys** the host must provide: `common.close` (✕ label), plus for `ConfirmDialog`
237
+ defaults `common.confirm` / `common.confirmHint` / `common.cancel` / `common.cancelHint`. Reuses the
238
+ existing `common.closeDialogHint`, `common.dialog`, `common.dismissDropdown(Hint)` keys.
239
+ - **New peer dependency `@dloizides/ui-buttons` (`>=1.8.0`)** — `ConfirmDialog` reuses its `Button`,
240
+ `Modal` reuses its `IconButton` for the ✕, rather than reinventing button chrome.
241
+
242
+ Additive: `ModalShell`, `ModalDropdown` and every existing export/selector are untouched. Covered by
243
+ `Modal.test.tsx`, `ConfirmDialog.test.tsx`, `useEscapeKey.test.ts`, `useScrollLock.test.ts`.
244
+
245
+ > Note: `@dloizides/ui-feedback` also exports a lighter `ConfirmDialog` (no ✕ / Escape / focus-trap,
246
+ > own buttons). This ui-layout one is the richer, `Modal`-based dialog the portals should adopt.
247
+
248
+ ## 1.21.0
249
+
250
+ **The collapsed `Tabs` menu can now present as a HAMBURGER (☰) — the universal mobile-nav affordance.**
251
+
252
+ The collapsed organizer nav reads better on a phone as a ☰ hamburger than as a caret field.
253
+ This adds an opt-in so a consumer can choose either presentation; the default is unchanged.
254
+
255
+ - **New opt-in prop `ModalDropdown.showHamburger?: boolean` (default `false`).** When set, the
256
+ DEFAULT trigger renders a ☰ glyph LEADING the active option's label, with the same bordered
257
+ field box, theme tokens and ≥44dp (`MIN_TOUCH_TARGET`) hit target as the caret variant. It
258
+ **takes precedence over `showCaret`** (a hamburger already IS the "this is a menu" cue, so the
259
+ trailing caret would be redundant) and, like `showCaret`, is ignored when a custom `renderTrigger`
260
+ is supplied. The glyph is a font character (U+2630) — no icon package enters this contract-pure
261
+ kit — and its colour comes from `colors.textSecondary` (no raw literals). It is decorative: the
262
+ trigger's `aria-label` still names the control, so screen readers do not announce the glyph.
263
+ - **New exported enum `TabsCollapsedTrigger { Caret, Hamburger }`** + new optional prop
264
+ **`Tabs.collapsedTrigger` / `TabsMenu.collapsedTrigger` (default `Caret`).** Selects how the
265
+ COLLAPSED (mobile) tab menu trigger presents; only affects the collapsed form, the wide pill
266
+ strip is identical either way. Exported as a regular (runtime) enum for the same reason as
267
+ `DropdownVariant` — a `const enum` cannot cross the published-package boundary under
268
+ `isolatedModules`.
269
+
270
+ Backward-compatible: two new optional props + one new enum, all defaulting to the prior behaviour;
271
+ no testID/selector changes. Per-tab E2E selectors (`{idPrefix}-menu` trigger, `{idPrefix}-tab-{key}`
272
+ / descriptor option testIDs) are untouched. No new i18n keys (the existing `common.tabsMenuHint`
273
+ serves both presentations). Covered by component tests (`ModalDropdown.test.tsx`,
274
+ `Tabs.collapsed.test.tsx`).
275
+
276
+ ## 1.20.0
277
+
278
+ **The collapsed `Tabs` menu now READS as a menu — a caret affordance + guaranteed focus.**
279
+
280
+ On the live phone-width organizer nav (`app.kefi.dloizides.com/organizer/passes`) the
281
+ collapsed trigger showed only the active label ("Passes") with no menu cue — styled like a
282
+ static chip/pill — so users could not tell it was a section switcher. This adds a clear
283
+ menu affordance and locks in keyboard focusability.
284
+
285
+ - **New opt-in prop `ModalDropdown.showCaret?: boolean` (default `false`).** When set, the
286
+ DEFAULT trigger renders a ▾ caret pinned to its trailing edge that rotates to point up
287
+ while the menu is open, with a ≥44dp (`MIN_TOUCH_TARGET`) hit target and the existing
288
+ bordered field box + theme tokens. **Every existing field-style dropdown in the kit is
289
+ unchanged** because the caret is off by default, and it is ignored when a custom
290
+ `renderTrigger` is supplied (that caller owns its own visuals). The caret is a font glyph
291
+ (U+25BE), so no icon package enters this contract-pure kit, and its colour comes from
292
+ `colors.textSecondary` (no raw literals). It is decorative — the trigger's `aria-label`
293
+ still names the control, so screen readers do not announce the glyph.
294
+ - **`TabsMenu` opts into `showCaret`**, so the collapsed `Tabs` section switcher now looks
295
+ like a proper control instead of a chip. No change to the public `Tabs` / `TabsMenu` API.
296
+ - **Focusability:** under react-native-web the trigger renders as a native `<button>`
297
+ (role=button, no `tabindex="-1"`), so it is keyboard-reachable and Enter/Space activate
298
+ it. A regression test asserts the collapsed trigger is not `tabindex="-1"`. (The
299
+ `tabindex="-1"` seen on the live DOM came from the older deployed version; it does not
300
+ reproduce on this source — proven by the rendered-DOM assertion, not assumed.)
301
+
302
+ Backward-compatible: one new optional prop, no testID/selector changes. Per-tab E2E
303
+ selectors (`{idPrefix}-menu` trigger, `{idPrefix}-tab-{key}` / descriptor option testIDs)
304
+ are untouched. No new i18n keys.
305
+
306
+ `ui-showcase` does not yet import `Tabs`/`ModalDropdown` (only `SegmentedControl`,
307
+ `CopyableId`, `TruncatedText`), so this is covered by component tests
308
+ (`ModalDropdown.test.tsx`, `Tabs.collapsed.test.tsx`); a showcase specimen is a follow-up.
309
+
310
+ ## 1.19.0
311
+
312
+ **`Tabs` collapses to a real mobile menu below a breakpoint.**
313
+
314
+ On a phone the horizontal pill strip "is not a real menu and not mobile friendly" — a
315
+ scrolling chip row is hard to use with 7–8 tabs (the kefi organizer dashboard:
316
+ Overview / Passes / Attendees / Promoters / Door / Ledger / Messaging / Settings). `Tabs`
317
+ now renders responsively:
318
+
319
+ - **Wide (>= `collapseBelow`, default 768, web only):** the existing horizontal
320
+ `role=tablist` / `role=tab` strip — unchanged, fully backward-compatible.
321
+ - **Narrow (< breakpoint) or native:** a genuine menu — a trigger button showing the
322
+ active section that opens a vertical list of all sections. Delegates to the kit's
323
+ existing `ModalDropdown` (menu/listbox semantics, focus trap, dismiss backdrop, dual-
324
+ platform a11y) rather than reimplementing a dropdown.
325
+
326
+ Backward-compatible: the public API is unchanged except one new optional prop,
327
+ `collapseBelow?: number` (default = the shared kit breakpoint, 768; pass `0` to keep the
328
+ row on any web width, or a large number to force the menu). The collapse threshold reuses
329
+ the SAME viewport rule (`MENU_BREAKPOINT`) that `ModalDropdown` uses for its menu-vs-modal
330
+ split, so the whole layout kit changes shape at one consistent breakpoint.
331
+
332
+ **E2E survival:** per-tab selectors keep working in BOTH modes. Each collapsed menu row's
333
+ `testID` is the tab descriptor's own `testID` when supplied, otherwise the same
334
+ `{idPrefix}-tab-{key}` pattern the wide strip uses for its tab element ids (the menu must
335
+ be opened first, as with any select). Requires one new host i18n key,
336
+ `common.tabsMenuHint` (the accessible hint on the collapsed trigger).
337
+
338
+ ## 1.17.0
339
+
340
+ **New `Tabs` primitive — a controlled tabbed section shell.**
341
+
342
+ Adds `Tabs`: a wrapping/scrolling pill tab strip plus the active tab's panel, wired
343
+ as a proper `tablist` / `tab` / `tabpanel` (aria-selected, aria-controls,
344
+ aria-labelledby). Controlled (`activeKey` + `onChange`), so the selected tab can be
345
+ driven from a route param or storage. Labels are pre-localized strings; colours read
346
+ from the `@dloizides/ui-feedback` theme (no FM/router/store imports), consistent with
347
+ the rest of the kit.
348
+
349
+ Extracted so the seven portals share ONE tab shell instead of hand-rolling a bar per
350
+ app — first consumer is the kefi-web organizer dashboard, split from one enormous page
351
+ into menu tabs.
352
+
353
+ ## 1.16.1
354
+
355
+ **`Heading` supports levels 1-6 instead of `<h1>` only.**
356
+
357
+ `Heading` rendered `<h1>` unconditionally, so any screen needing sub-structure either
358
+ shipped multiple `<h1>`s or avoided the component. The Digital Kin guide editor did the
359
+ latter — styled `<Text>` instead — and shipped **zero headings**: measured on the live
360
+ CMS, `document.querySelectorAll('h1,h2,h3,h4,h5,h6').length === 0` for the entire page.
361
+
362
+ So there was no `<h1>` naming the guide being edited and nothing marking the steps
363
+ section. Screen-reader users could not navigate by heading, and styling was standing in
364
+ for structure.
365
+
366
+ After: `h1` names the guide, `h2` marks the steps section, `h3` per step.
367
+
368
+
369
+ ## 1.15.1
370
+
371
+ - **Fix (`CopyableId` truncated the value with room to spare).** 1.15.0 gave the value wrapper
372
+ `flexShrink: 1`, which makes it SHRINK-WRAP its content — so the width the component measures to
373
+ decide how much to show was derived from the very string it was computing: truncate → wrapper
374
+ narrows → re-measure smaller → truncate harder. Verified in Chrome via `apps/ui-showcase`: a
375
+ 506px-wide container and a 306px one rendered the SAME 196px string, i.e. a 36-character GUID was
376
+ cut to 26 characters with ~300px going unused.
377
+
378
+ The wrapper is now `flex: 1`, so it fills the row's leftover width and its size is independent of
379
+ its content. Re-verified at four widths: 520px and 320px now render the full 36-character GUID
380
+ untruncated; 200px and 120px middle-truncate with both ends intact, and nothing overflows.
381
+
382
+ This is the SAME failure mode `useAvailableWidth` documents for `TruncatedText` (measure the
383
+ parent, never the element, or the output feeds back into the input) — reintroduced one level up
384
+ by the new wrapper. Unit tests cannot catch it: the truncation helpers are pure and passed
385
+ throughout, and jsdom reports zero widths, so only a real browser shows it.
386
+
387
+ - **New: `CopyableId` accepts `style`** for its outer container. Hosts need this to give the
388
+ control a width that does not derive from its own content (a `flexBasis`, a `width`, or
389
+ `flex: 1`) — without one, a shrink-to-fit parent reintroduces the feedback loop above at the
390
+ host level. Documented on the prop.
391
+
392
+ ## 1.15.0
393
+
394
+ - **New: `CopyableId`** — show a long machine identifier (a GUID, a reference, a correlation id)
395
+ so a human can both READ enough of it to tell two apart and TAKE it in one action. Composes the
396
+ existing `TruncatedText`, so the middle-truncation work is reused rather than re-derived.
397
+
398
+ Driven by the AML console needing to surface a screening ID an analyst can copy and re-screen
399
+ with, but it is deliberately domain-free: every portal has identifiers it currently either hides
400
+ or dumps raw into a table cell.
401
+
402
+ Three things this gets right that a naive copy button does not:
403
+
404
+ 1. **It copies the FULL value, never the display string.** A truncated GUID that a user
405
+ hand-selects yields `3f2a9c81…d4e7`, ellipsis and all, which silently fails wherever it is
406
+ pasted. Showing a truncated identifier with no copy affordance is strictly WORSE than not
407
+ showing it. The full value is always the accessible name and the web tooltip.
408
+ 2. **Middle truncation, not tail.** Two GUIDs from one table share a prefix far more often than
409
+ intuition suggests, and `numberOfLines={1}` renders them IDENTICALLY. The tail is what tells
410
+ them apart, so both ends survive.
411
+ 3. **A failed copy is SHOWN, not swallowed.** `navigator.clipboard` is not merely unreliable —
412
+ it is `undefined` outside a secure context, which is how every staging box and LAN preview in
413
+ this fleet is served, i.e. exactly where people hand-test. `copyText` therefore falls back to
414
+ `document.execCommand` over an off-screen textarea, and returns a boolean rather than
415
+ assuming. On total failure the control renders a distinct `common.copyFailed` state; a silent
416
+ failure would leave the user believing they hold an identifier they do not.
417
+
418
+ The status is carried in the control's accessible **NAME**, not its hint, because
419
+ `accessibilityHint` is dropped by react-native-web and never reaches the DOM — a screen-reader
420
+ user would otherwise get no confirmation at all.
421
+
422
+ No native clipboard dependency is taken. Hosts on React Native inject a `writer`
423
+ (`Clipboard.setString`); an injected writer that throws falls through to the DOM paths.
424
+
425
+ New `LAYOUT_I18N` keys — hosts binding a missing-key guard to that map (as aml-v2 does) will
426
+ fail their catalog test until these are defined: `common.copy`, `common.copyHint`,
427
+ `common.copied`, `common.copyFailed`, `common.copyableIdHint`.
428
+
429
+ ## 1.12.2
430
+
431
+ - **Fix (`TruncatedText` STILL did not middle-truncate; 1.12.1's fix was the wrong mechanism).**
432
+ 1.12.1 moved the `onLayout` measurement from the `<Text>` to a wrapping `<View>`. Verified in
433
+ Chrome: that did not fire either, and neither did a `ResizeObserver` on the same node — zero
434
+ callbacks from all three mechanisms under react-native-web 0.21.
435
+
436
+ Width now comes from `useAvailableWidth`, which on web reads the **parent's** inner width
437
+ straight off the DOM in a ref callback, plus a `resize` listener. The parent is measured
438
+ rather than the element because the element shrink-wraps its own text, so measuring it would
439
+ feed the output back into the input and oscillate. Native keeps `onLayout`, where it works.
440
+
441
+ Confirmed in Chrome at four container widths — the same URL renders as
442
+ `timesofindia.indiatimes.com/cit…ties/articleshow/114237788.cms` (520px) down to
443
+ `timeso…88.cms` (120px), with no element exceeding its container at either a 1400px or a
444
+ 420px viewport.
445
+
446
+ Note for anyone extending this: unit tests cannot catch this class of bug here. The
447
+ truncation helpers are pure and passed throughout all three versions; what was broken was
448
+ whether the measurement ever ran in a real browser.
449
+
450
+ ## 1.12.1
451
+
452
+ - **Fix (`TruncatedText` did not actually middle-truncate).** 1.12.0 measured its available
453
+ width with `onLayout` **on the `<Text>` itself, which never fires under RN-web**. The width
454
+ stayed 0, the character budget stayed 0, and the component silently fell back to rendering
455
+ the full string — i.e. to exactly the tail-only CSS ellipsis it exists to replace. It
456
+ compiled, typechecked and passed all its unit tests throughout, because the truncation
457
+ helpers are pure and were never the broken part; only a browser could see it. Measured in
458
+ Chrome at a 120px container: text rendered `timesofindia.indiatimes.com/city/delhi/delhi-…`
459
+ with **no `…` character present** — CSS clipping, not middle truncation.
460
+
461
+ The width is now measured on a wrapping `<View>`, which does fire `onLayout`. The overflow
462
+ guarantee was never affected (the element stayed inside its parent in both versions); what
463
+ was lost was the informative half of the behaviour.
464
+
465
+ ## 1.12.0
466
+
467
+ - **New: `TruncatedText`** — a single-line text/link that middle-truncates to fit its container
468
+ and cannot overflow at any width. Promoted out of the AML console, where a full adverse-media
469
+ article URL rendered as raw `<Text>` and blew out its table row.
470
+
471
+ Three things that look like they would solve this and do not, all verified against
472
+ react-native-web 0.21 rather than assumed:
473
+
474
+ 1. `numberOfLines={1}` alone truncates at the **tail** (RN-web compiles it to
475
+ `text-overflow: ellipsis`). Every URL from one publisher then collapses to the same
476
+ `timesofindia.indiatimes.com/city/de…` prefix and the reader cannot tell the articles
477
+ apart. There is no CSS for middle truncation, so it is computed in JS.
478
+ 2. `title={full}` is **silently dropped** — RN-web's `<Text>` forwards only `href`, `lang`
479
+ and `pointerEvents` beyond the shared whitelist. The tooltip is set on the host node
480
+ through a ref instead.
481
+ 3. JS truncation alone can mis-estimate an unusual glyph mix, so `numberOfLines={1}` is ALSO
482
+ applied as a hard backstop. Overflow is impossible by construction, not by tuning.
483
+
484
+ The full value always stays reachable — as the accessible name and, on web, the native
485
+ tooltip. Also exported: the pure `truncateMiddle` / `formatUrlForDisplay` helpers and
486
+ `ELLIPSIS`.
487
+
488
+ ## 1.11.0
489
+
490
+ - **Fix (HIGH — 1.10.0's out-of-view close never fired in the real runtime).** 1.10.0 added
491
+ "close the menu once the trigger leaves the viewport". Repositioning worked, but the close was
492
+ measured **against the viewport**, and **RN-web apps never scroll the document** — every screen
493
+ renders inside a `ScrollView`, so scrolling happens in an inner `<div>` and `window.scrollY`
494
+ stays 0 forever. A trigger scrolled out of that inner scroller is invisible to the user while its
495
+ rect sits comfortably inside the viewport, so the check could not fire on any screen of any
496
+ portal. Measured in Chrome: trigger at `top: -37` (fully above the scroller), menu still rendered.
497
+ Visibility is now measured against the **clip window** — the viewport intersected with every
498
+ clipping ancestor — which is what makes it work inside an inner scroll container.
499
+ - **Fix: "entirely out of view" was also the wrong threshold.** When a scroll container reaches the
500
+ end of its range the trigger stops with a few pixels still showing (4px in the reported case), so
501
+ "fully out" was *unreachable* and the menu never closed however far the user scrolled. There is
502
+ now a minimum-visible-pixel floor (`MIN_VISIBLE_PX`).
503
+ - **Guard: the menu never closes on its FIRST measurement**, so opening a dropdown whose trigger is
504
+ already partly clipped still works; only movement after opening can close it.
505
+ - **The zero-area "not laid out yet" guard is unchanged in intent but now provably size-only** — it
506
+ asks about the element's own box, never its position, so it cannot swallow a genuine hidden case.
507
+ - **New: `LAYOUT_I18N`** — the manifest of every translation key this package resolves, mirroring
508
+ `TABLE_I18N` / `FILTERS_I18N` from `@dloizides/ui-tables` so hosts can bind an existing
509
+ missing-key guard to it with no new pattern. The kit is fallback-free, so a key a host forgets
510
+ reaches users as a raw dotted name; hand-maintained key lists rot (one portal was found missing
511
+ 26 kit keys, another had `common.accordionToggleHint` undefined while `Accordion` was mounted).
512
+ Every `t(...)` call in the package now references the map, and the suite fails on a raw key
513
+ literal or a stale entry — so the manifest cannot drift from the code.
514
+ - **Fix: the 1.10.0 CHANGELOG entry was written in cp1252**, leaving the published file invalid
515
+ UTF-8. Re-encoded.
516
+ - **No breaking change.** `LAYOUT_I18N` is additive and the key strings are unchanged, so existing
517
+ translation files keep working untouched.
518
+
519
+ ## 1.10.0
520
+
521
+ Two defects found by browser visual QA of the inline dropdown menu against a live app.
522
+
523
+ - **Fix (HIGH, affects every consumer): the open inline menu detached from its trigger.** On web the
524
+ menu is portalled to `document.body` with `position: fixed` at the trigger's measured rect.
525
+ `fixed` is viewport-relative, so that coordinate is only valid until something moves the trigger.
526
+ A `scroll`/`resize` listener on `window` was already in place (since 1.7.0) and does handle plain
527
+ scrolling — but it left three real gaps:
528
+ - **Layout changes that fire no scroll event at all** — an accordion above the trigger expanding,
529
+ a sticky header resizing, a banner appearing, an async list rendering. The trigger moved, nothing
530
+ scrolled, no listener fired, and the menu stayed behind. Now covered by a `ResizeObserver` on the
531
+ anchor and on `document.body`.
532
+ - **The trigger leaving the viewport.** Repositioning cannot help here — the menu just follows its
533
+ trigger off-screen and hangs over unrelated content with nothing on screen explaining it. The
534
+ menu now **closes** once the trigger is fully out of view.
535
+ - **Layout thrash.** The handler ran a synchronous `getBoundingClientRect()` (a forced reflow) plus
536
+ a React state update on *every* scroll event. Work is now coalesced into one
537
+ `requestAnimationFrame` per frame.
538
+ Scroll is now observed in the **capture** phase on `document` rather than `window`, so a scroll in
539
+ any ancestor scroll container counts. Tracking moved into a dedicated `useAnchorTracking` hook.
540
+ Native is unaffected (the popover is in-tree and moves with its anchor).
541
+ - **Fix (a11y): `accessibilityHint` never reached a screen reader.** The prop is part of the public
542
+ API and every caller passes one, but react-native-web does not map it — the trigger carried
543
+ `aria-label` and `aria-expanded` and **no hint of any kind**, so the text was silently thrown away
544
+ (older react-native-web versions additionally leaked it to the DOM, logging
545
+ `React does not recognize the accessibilityHint prop on a DOM element`). On web the hint is now
546
+ rendered into a visually-hidden node referenced by `aria-describedby` — the same wiring
547
+ `@dloizides/ui-forms`' `Field` uses for its error line — and the RN-only prop is no longer passed
548
+ on web at all. Native still receives `accessibilityHint` unchanged.
549
+ - **No API change.** Both fixes are internal; every existing caller benefits without edits.
550
+
551
+ ## 1.9.1
552
+
553
+ - **Fix (keyboard a11y, affects every consumer): Enter CLOSED the inline menu instead of SELECTING
554
+ the highlighted option.** The trigger keeps DOM focus while the menu is open, and react-native-web
555
+ maps Enter on a focused Touchable to `onPress`. React dispatches that from its ROOT container
556
+ listener — an ancestor of the trigger, but a *descendant* of `document` — so the menu's BUBBLING
557
+ `document` keydown listener ran second: the trigger toggled the menu shut, React unmounted the
558
+ popover, the effect cleanup removed the very listener the event was still travelling toward, and
559
+ `document` never saw the Enter. Keyboard users could open a dropdown and arrow through it but
560
+ could never CHOOSE with the keyboard (mouse selection was unaffected, which is why it went
561
+ unnoticed).
562
+ - **Fix:** the menu's key handler now runs in the **capture** phase and `stopPropagation`s the keys
563
+ an open menu owns (↑/↓/Home/End/Enter/Escape), so it runs ahead of React's listener and the
564
+ trigger cannot re-toggle behind it. Found while browser-verifying the AML v2 topbar dropdowns.
565
+
566
+ ## 1.9.0
567
+
568
+ - **`ModalDropdown`: `menuMinWidth` — a width FLOOR for the open inline menu (additive, optional).**
569
+ The menu matches the TRIGGER's width, which is right for a full-width field but leaves a compact
570
+ anchor (the 1.8.0 `renderTrigger` case: a locale pill, an avatar chip, an icon button) with a menu
571
+ too narrow to read its own option labels — a 52px "EN ▾" pill produced a 52px menu whose rows were
572
+ clipped to a dark strip. `menuMinWidth` floors it; a wider trigger still wins.
573
+ - **Backward-compatible:** omitted, the width is the trigger's, exactly as before.
574
+
575
+ ## 1.8.0
576
+
577
+ - **`ModalDropdown`: `renderTrigger` — a custom ANCHOR slot (additive, optional).** The dropdown's
578
+ default trigger is a bordered field box, which is wrong for a *menu* anchored to a compact chip
579
+ (a locale pill, an avatar/user chip, an icon button). Callers can now supply
580
+ `renderTrigger={({ label, isOpen }) => …}` and own the anchor's visuals entirely; the default box
581
+ is then not rendered. The a11y wrapper stays with the dropdown — `role=button`, `aria-expanded`,
582
+ the accessible label + hint, and the `testID` are still applied — so a custom trigger *cannot*
583
+ drop the accessible contract, and the portalled, keyboard-navigable (↑/↓/Home/End/Enter/Escape),
584
+ never-clipped menu comes along for free.
585
+ - **`ModalDropdown`: `optionTestID` — custom per-option testIDs (additive, optional).** Options
586
+ still default to `` `${testID}-option-${value}` ``; a caller turning an existing flat control into
587
+ a dropdown can now keep its established selectors stable
588
+ (`optionTestID={(code) => `lang-${code}`}`).
589
+ - **Backward-compatible:** both props are optional and, when omitted, the render tree is unchanged —
590
+ erevna / katalogos / kefi / agora are unaffected and need no markup changes.
591
+
592
+ ## 1.7.1
593
+
594
+ Fix: the modal-variant dismiss backdrop was a pressable WRAPPING the option buttons,
595
+ producing invalid DOM on web ("<button> cannot contain a nested <button>") + a React
596
+ console.error. The backdrop is now an absolute-fill SIBLING behind the dialog — same
597
+ tap-to-dismiss behaviour, no nesting. No API change.
598
+
599
+
600
+ ## 1.7.0
601
+
602
+ - **`ModalDropdown` inline-menu (`variant={DropdownVariant.Menu}`) z-index / clipping fix.** On
603
+ wide/desktop web the open inline menu painted UNDERNEATH later content (adjacent filter fields,
604
+ the results table, cards) so options were hidden/clipped. Root cause: react-native-web renders
605
+ **every `View`** with `position: relative; z-index: 0`, making each View its own stacking context —
606
+ so the popover's `zIndex: 1000` was trapped inside its anchor / the app's field wrapper and could
607
+ never rise above later-painting siblings.
608
+ - **Fix:** on web the menu is now rendered in a **portal to `document.body`** with `position: fixed`
609
+ at the trigger's measured viewport rect (recomputed on scroll/resize) and a high `zIndex`. A portal
610
+ escapes every ancestor stacking context AND every ancestor `overflow: hidden`, so the menu always
611
+ paints on top and is never clipped — the same "menu above the table" outcome as
612
+ `@dloizides/ui-tables` `SizeDropdown`. The anchor wrapper is also lifted to a raised `zIndex` while
613
+ open (defence-in-depth; the primary lift on native).
614
+ - **Native-safe:** the portal + `document`/`window` listeners are all behind `Platform.OS === 'web'`;
615
+ native keeps the in-tree `position:absolute` popover + `elevation`. `react-dom` is added as an
616
+ **optional** peer (already present in every react-native-web consumer).
617
+ - Outside-click dismissal now consults the portalled popover's own node too, so clicking an option
618
+ still selects (a portalled option is no longer a DOM descendant of the anchor). Keyboard nav
619
+ (↑/↓, Home/End, Enter, Escape), `role="menu"`/`menuitem`, `aria-expanded`/`aria-selected`, and the
620
+ modal variant on narrow/native are all unchanged.
621
+ - **Additive / backward-compatible:** the `ModalDropdown` API is unchanged; erevna / katalogos / kefi
622
+ are unaffected.
623
+
624
+ ## 1.6.0
625
+
626
+ - **Accessibility (WCAG 2.1 AA) hardening — additive + backward-compatible.**
627
+ - `AccordionItem`: the rotating chevron (plain) and leading ▸ marker (boxed) are purely
628
+ decorative — the open/closed state is already on the header via `aria-expanded` — so they are
629
+ now `aria-hidden` / `accessibilityElementsHidden` to keep them out of the screen-reader tree.
630
+ - `Accordion`: the expand/collapse `LayoutAnimation` and the chevron rotation now honour
631
+ `prefers-reduced-motion: reduce`, snapping instantly for users who request reduced motion
632
+ (WCAG 2.3.3, web only).
633
+ - `ModalDropdown`: the trigger now also emits `accessibilityState.expanded` (native parity for
634
+ the existing web `aria-expanded`).
635
+
636
+ ## 1.5.0
637
+
638
+ - `Accordion` / `AccordionItem` gain a `variant` prop (`'plain' | 'boxed'`, default `'plain'`).
639
+ `plain` is the original borderless look (hairline dividers, right-hand chevron flipping 180° on
640
+ open) — existing consumers render **identically**, no change. `boxed` is the AML v1 console
641
+ `<details>` look: each item is its own bordered, rounded box (spaced by a gap) with a **leading
642
+ ▸ marker** that rotates 90° on open and a muted, 600-weight summary. The full API is preserved
643
+ (controlled/uncontrolled, `allowMultiple`, `defaultOpen`, a11y `aria-expanded`/region, the
644
+ open/close LayoutAnimation + chevron rotation). Additive + backward-compatible.
645
+
646
+ ## 1.4.0
647
+
648
+ - Add **`SegmentedControl`** — a single rounded pill *track* holding N mutually-exclusive
649
+ segments (the iOS-style segmented / tab toggle). The selected segment lifts onto a raised
650
+ surface (`colors.surface`) with a subtle shadow; the rest stay transparent over the soft
651
+ track (`colors.background`). Promoted from the v1 AML console's `.lf-mode` mode switch so
652
+ erevna/katalogos/kefi share ONE toggle instead of hand-rolling two primary/ghost buttons.
653
+ - **Generic over the value union** (`SegmentedControl<'peps' | 'leaders'>`) for a typed
654
+ `onChange`; each segment carries its own `label` / `value` / optional `testID` +
655
+ `accessibilityLabel` / `accessibilityHint`.
656
+ - **a11y**: the group renders as a `tablist`, each segment as a `tab` with
657
+ `accessibilityState={{ selected }}` (react-native-web forwards `role` + `aria-selected`).
658
+ - **Themed** entirely from the `@dloizides/ui-feedback` theme (surface / background / border /
659
+ text colours); no colour literal except the selected-segment drop shadow.
660
+ - **Additive / backward-compatible**: purely new exports (`SegmentedControl`,
661
+ `SegmentedControlProps`, `SegmentedOption`). Existing consumers are unaffected.
662
+
663
+ ## 1.3.0
664
+
665
+ - Add **`Accordion`** + **`AccordionItem`** — a themed expand/collapse disclosure group that
666
+ replaces per-app hand-rolled `<details>` / expanders (AML "More options" + expandable
667
+ matched-candidate rows, Erevna survey groups, Katalogos menu sections…).
668
+ - Compound API: an `Accordion` container owns the open state and shares it with `AccordionItem`
669
+ children via context. Each item = a pressable header (title left, optional `right`
670
+ adornment/badge slot, a rotating chevron) over a collapsible body `region`.
671
+ - **Controlled** (`openIds` + `onOpenChange`) **and uncontrolled** (`defaultOpenIds`, plus
672
+ per-item `defaultOpen`). `allowMultiple` (default `true`) vs single-open. Per-item `disabled`.
673
+ - **a11y**: header is an accessible `button` (`accessibilityRole="button"`,
674
+ `accessibilityState={{ expanded }}`, web `aria-expanded` + `aria-controls`); body is a
675
+ `role="region"`. Renders as a native `<button>`, so **Enter / Space toggle** it.
676
+ - **Themed** entirely from the `@dloizides/ui-feedback` theme (border / surface / text colours),
677
+ no hardcoded palette; renders borderless so it nests inside a `Section` / `Card`.
678
+ - **Animated** open/close via a guarded `LayoutAnimation` (web- and native-safe no-op fallback,
679
+ never throws) + an `Animated` chevron rotation. Hook-safe (lazy `useState`, no ref reads in render).
680
+ - **Additive / backward-compatible**: purely new exports (`Accordion`, `AccordionItem`,
681
+ `AccordionProps`, `AccordionItemProps`). Existing consumers (erevna / katalogos / aml-v2) are
682
+ unaffected.
683
+
684
+ ## 1.2.0
685
+
686
+ - `ModalDropdown` can now render as an **inline anchored menu** (native `<select>` feel), not only a
687
+ modal. New `variant?: DropdownVariant` prop (`Menu` | `Modal`) selects the presentation per screen.
688
+ - **Responsive default** (when `variant` is omitted): inline `Menu` on wide/desktop web
689
+ (viewport ≥ 768px), `Modal` on narrow/mobile and on any native platform. An explicit `variant`
690
+ overrides the auto choice.
691
+ - The inline menu anchors under the trigger, is dismissible via click-outside / `Esc`, is
692
+ keyboard-navigable (↑/↓, `Home`/`End`, `Enter`), scrolls when long, and does not push layout.
693
+ The modal path is unchanged. Both variants share the same option-rendering/selection logic
694
+ (`OptionRow`), so nothing is duplicated.
695
+ - **Additive / backward-compatible**: existing `ModalDropdown` callers (erevna / katalogos / aml-v2)
696
+ keep their exact API and now get the inline-on-desktop menu automatically. New export:
697
+ `DropdownVariant` (a runtime enum — deliberately not `const enum`, which cannot cross a published
698
+ package boundary under `isolatedModules`).
699
+
700
+ ## 1.1.0
701
+
702
+ - Add `ModalShell` — slide-up full-screen modal with a themed header (title + close) and scrollable body.
703
+ Composes `Heading` (this package) + `SvgIcon` (`@dloizides/ui-icons`). This was the batch-1 deferred
704
+ ModalShell, now landed (ui-icons + Heading both shared). Adds `@dloizides/ui-icons` + `react-native-svg`
705
+ as peers.
706
+
707
+ ## 1.0.0
708
+
709
+ Initial release (Capability Wave C1, batch 5 — the ui-layout pivot after full settings-hub proved
710
+ not cleanly extractable). Extracted the proven (erevna+katalogos identical) presentational primitives
711
+ that the settings screens (and others) reuse: `Section`, `Heading`, `StatusBadge`, `UpgradePrompt`,
712
+ `ModalDropdown` + `useFocusTrap`. Share the `@dloizides/ui-feedback` context (`useUi`). `Heading`
713
+ unblocks the deferred ModalShell. `Breadcrumb` deferred (couples to the app's router + breadcrumb map).