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