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