@dloizides/ui-layout 1.9.1 → 1.10.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,165 +1,197 @@
1
- # Changelog
2
-
3
- ## 1.9.1
4
-
5
- - **Fix (keyboard a11y, affects every consumer): Enter CLOSED the inline menu instead of SELECTING
6
- the highlighted option.** The trigger keeps DOM focus while the menu is open, and react-native-web
7
- maps Enter on a focused Touchable to `onPress`. React dispatches that from its ROOT container
8
- listener — an ancestor of the trigger, but a *descendant* of `document` — so the menu's BUBBLING
9
- `document` keydown listener ran second: the trigger toggled the menu shut, React unmounted the
10
- popover, the effect cleanup removed the very listener the event was still travelling toward, and
11
- `document` never saw the Enter. Keyboard users could open a dropdown and arrow through it but
12
- could never CHOOSE with the keyboard (mouse selection was unaffected, which is why it went
13
- unnoticed).
14
- - **Fix:** the menu's key handler now runs in the **capture** phase and `stopPropagation`s the keys
15
- an open menu owns (↑/↓/Home/End/Enter/Escape), so it runs ahead of React's listener and the
16
- trigger cannot re-toggle behind it. Found while browser-verifying the AML v2 topbar dropdowns.
17
-
18
- ## 1.9.0
19
-
20
- - **`ModalDropdown`: `menuMinWidth` — a width FLOOR for the open inline menu (additive, optional).**
21
- The menu matches the TRIGGER's width, which is right for a full-width field but leaves a compact
22
- anchor (the 1.8.0 `renderTrigger` case: a locale pill, an avatar chip, an icon button) with a menu
23
- too narrow to read its own option labels — a 52px "EN ▾" pill produced a 52px menu whose rows were
24
- clipped to a dark strip. `menuMinWidth` floors it; a wider trigger still wins.
25
- - **Backward-compatible:** omitted, the width is the trigger's, exactly as before.
26
-
27
- ## 1.8.0
28
-
29
- - **`ModalDropdown`: `renderTrigger` — a custom ANCHOR slot (additive, optional).** The dropdown's
30
- default trigger is a bordered field box, which is wrong for a *menu* anchored to a compact chip
31
- (a locale pill, an avatar/user chip, an icon button). Callers can now supply
32
- `renderTrigger={({ label, isOpen }) => …}` and own the anchor's visuals entirely; the default box
33
- is then not rendered. The a11y wrapper stays with the dropdown — `role=button`, `aria-expanded`,
34
- the accessible label + hint, and the `testID` are still applied — so a custom trigger *cannot*
35
- drop the accessible contract, and the portalled, keyboard-navigable (↑/↓/Home/End/Enter/Escape),
36
- never-clipped menu comes along for free.
37
- - **`ModalDropdown`: `optionTestID` — custom per-option testIDs (additive, optional).** Options
38
- still default to `` `${testID}-option-${value}` ``; a caller turning an existing flat control into
39
- a dropdown can now keep its established selectors stable
40
- (`optionTestID={(code) => `lang-${code}`}`).
41
- - **Backward-compatible:** both props are optional and, when omitted, the render tree is unchanged —
42
- erevna / katalogos / kefi / agora are unaffected and need no markup changes.
43
-
44
- ## 1.7.1
45
-
46
- Fix: the modal-variant dismiss backdrop was a pressable WRAPPING the option buttons,
47
- producing invalid DOM on web ("<button> cannot contain a nested <button>") + a React
48
- console.error. The backdrop is now an absolute-fill SIBLING behind the dialog — same
49
- tap-to-dismiss behaviour, no nesting. No API change.
50
-
51
-
52
- ## 1.7.0
53
-
54
- - **`ModalDropdown` inline-menu (`variant={DropdownVariant.Menu}`) z-index / clipping fix.** On
55
- wide/desktop web the open inline menu painted UNDERNEATH later content (adjacent filter fields,
56
- the results table, cards) so options were hidden/clipped. Root cause: react-native-web renders
57
- **every `View`** with `position: relative; z-index: 0`, making each View its own stacking context —
58
- so the popover's `zIndex: 1000` was trapped inside its anchor / the app's field wrapper and could
59
- never rise above later-painting siblings.
60
- - **Fix:** on web the menu is now rendered in a **portal to `document.body`** with `position: fixed`
61
- at the trigger's measured viewport rect (recomputed on scroll/resize) and a high `zIndex`. A portal
62
- escapes every ancestor stacking context AND every ancestor `overflow: hidden`, so the menu always
63
- paints on top and is never clipped — the same "menu above the table" outcome as
64
- `@dloizides/ui-tables` `SizeDropdown`. The anchor wrapper is also lifted to a raised `zIndex` while
65
- open (defence-in-depth; the primary lift on native).
66
- - **Native-safe:** the portal + `document`/`window` listeners are all behind `Platform.OS === 'web'`;
67
- native keeps the in-tree `position:absolute` popover + `elevation`. `react-dom` is added as an
68
- **optional** peer (already present in every react-native-web consumer).
69
- - Outside-click dismissal now consults the portalled popover's own node too, so clicking an option
70
- still selects (a portalled option is no longer a DOM descendant of the anchor). Keyboard nav
71
- (↑/↓, Home/End, Enter, Escape), `role="menu"`/`menuitem`, `aria-expanded`/`aria-selected`, and the
72
- modal variant on narrow/native are all unchanged.
73
- - **Additive / backward-compatible:** the `ModalDropdown` API is unchanged; erevna / katalogos / kefi
74
- are unaffected.
75
-
76
- ## 1.6.0
77
-
78
- - **Accessibility (WCAG 2.1 AA) hardening — additive + backward-compatible.**
79
- - `AccordionItem`: the rotating chevron (plain) and leading ▸ marker (boxed) are purely
80
- decorative — the open/closed state is already on the header via `aria-expanded` — so they are
81
- now `aria-hidden` / `accessibilityElementsHidden` to keep them out of the screen-reader tree.
82
- - `Accordion`: the expand/collapse `LayoutAnimation` and the chevron rotation now honour
83
- `prefers-reduced-motion: reduce`, snapping instantly for users who request reduced motion
84
- (WCAG 2.3.3, web only).
85
- - `ModalDropdown`: the trigger now also emits `accessibilityState.expanded` (native parity for
86
- the existing web `aria-expanded`).
87
-
88
- ## 1.5.0
89
-
90
- - `Accordion` / `AccordionItem` gain a `variant` prop (`'plain' | 'boxed'`, default `'plain'`).
91
- `plain` is the original borderless look (hairline dividers, right-hand chevron flipping 180° on
92
- open) — existing consumers render **identically**, no change. `boxed` is the AML v1 console
93
- `<details>` look: each item is its own bordered, rounded box (spaced by a gap) with a **leading
94
- ▸ marker** that rotates 90° on open and a muted, 600-weight summary. The full API is preserved
95
- (controlled/uncontrolled, `allowMultiple`, `defaultOpen`, a11y `aria-expanded`/region, the
96
- open/close LayoutAnimation + chevron rotation). Additive + backward-compatible.
97
-
98
- ## 1.4.0
99
-
100
- - Add **`SegmentedControl`** — a single rounded pill *track* holding N mutually-exclusive
101
- segments (the iOS-style segmented / tab toggle). The selected segment lifts onto a raised
102
- surface (`colors.surface`) with a subtle shadow; the rest stay transparent over the soft
103
- track (`colors.background`). Promoted from the v1 AML console's `.lf-mode` mode switch so
104
- erevna/katalogos/kefi share ONE toggle instead of hand-rolling two primary/ghost buttons.
105
- - **Generic over the value union** (`SegmentedControl<'peps' | 'leaders'>`) for a typed
106
- `onChange`; each segment carries its own `label` / `value` / optional `testID` +
107
- `accessibilityLabel` / `accessibilityHint`.
108
- - **a11y**: the group renders as a `tablist`, each segment as a `tab` with
109
- `accessibilityState={{ selected }}` (react-native-web forwards `role` + `aria-selected`).
110
- - **Themed** entirely from the `@dloizides/ui-feedback` theme (surface / background / border /
111
- text colours); no colour literal except the selected-segment drop shadow.
112
- - **Additive / backward-compatible**: purely new exports (`SegmentedControl`,
113
- `SegmentedControlProps`, `SegmentedOption`). Existing consumers are unaffected.
114
-
115
- ## 1.3.0
116
-
117
- - Add **`Accordion`** + **`AccordionItem`** — a themed expand/collapse disclosure group that
118
- replaces per-app hand-rolled `<details>` / expanders (AML "More options" + expandable
119
- matched-candidate rows, Erevna survey groups, Katalogos menu sections…).
120
- - Compound API: an `Accordion` container owns the open state and shares it with `AccordionItem`
121
- children via context. Each item = a pressable header (title left, optional `right`
122
- adornment/badge slot, a rotating chevron) over a collapsible body `region`.
123
- - **Controlled** (`openIds` + `onOpenChange`) **and uncontrolled** (`defaultOpenIds`, plus
124
- per-item `defaultOpen`). `allowMultiple` (default `true`) vs single-open. Per-item `disabled`.
125
- - **a11y**: header is an accessible `button` (`accessibilityRole="button"`,
126
- `accessibilityState={{ expanded }}`, web `aria-expanded` + `aria-controls`); body is a
127
- `role="region"`. Renders as a native `<button>`, so **Enter / Space toggle** it.
128
- - **Themed** entirely from the `@dloizides/ui-feedback` theme (border / surface / text colours),
129
- no hardcoded palette; renders borderless so it nests inside a `Section` / `Card`.
130
- - **Animated** open/close via a guarded `LayoutAnimation` (web- and native-safe no-op fallback,
131
- never throws) + an `Animated` chevron rotation. Hook-safe (lazy `useState`, no ref reads in render).
132
- - **Additive / backward-compatible**: purely new exports (`Accordion`, `AccordionItem`,
133
- `AccordionProps`, `AccordionItemProps`). Existing consumers (erevna / katalogos / aml-v2) are
134
- unaffected.
135
-
136
- ## 1.2.0
137
-
138
- - `ModalDropdown` can now render as an **inline anchored menu** (native `<select>` feel), not only a
139
- modal. New `variant?: DropdownVariant` prop (`Menu` | `Modal`) selects the presentation per screen.
140
- - **Responsive default** (when `variant` is omitted): inline `Menu` on wide/desktop web
141
- (viewport ≥ 768px), `Modal` on narrow/mobile and on any native platform. An explicit `variant`
142
- overrides the auto choice.
143
- - The inline menu anchors under the trigger, is dismissible via click-outside / `Esc`, is
144
- keyboard-navigable (↑/↓, `Home`/`End`, `Enter`), scrolls when long, and does not push layout.
145
- The modal path is unchanged. Both variants share the same option-rendering/selection logic
146
- (`OptionRow`), so nothing is duplicated.
147
- - **Additive / backward-compatible**: existing `ModalDropdown` callers (erevna / katalogos / aml-v2)
148
- keep their exact API and now get the inline-on-desktop menu automatically. New export:
149
- `DropdownVariant` (a runtime enum — deliberately not `const enum`, which cannot cross a published
150
- package boundary under `isolatedModules`).
151
-
152
- ## 1.1.0
153
-
154
- - Add `ModalShell` — slide-up full-screen modal with a themed header (title + close) and scrollable body.
155
- Composes `Heading` (this package) + `SvgIcon` (`@dloizides/ui-icons`). This was the batch-1 deferred
156
- ModalShell, now landed (ui-icons + Heading both shared). Adds `@dloizides/ui-icons` + `react-native-svg`
157
- as peers.
158
-
159
- ## 1.0.0
160
-
161
- Initial release (Capability Wave C1, batch 5 — the ui-layout pivot after full settings-hub proved
162
- not cleanly extractable). Extracted the proven (erevna+katalogos identical) presentational primitives
163
- that the settings screens (and others) reuse: `Section`, `Heading`, `StatusBadge`, `UpgradePrompt`,
164
- `ModalDropdown` + `useFocusTrap`. Share the `@dloizides/ui-feedback` context (`useUi`). `Heading`
165
- unblocks the deferred ModalShell. `Breadcrumb` deferred (couples to the app's router + breadcrumb map).
1
+ # Changelog
2
+
3
+ ## 1.10.0
4
+
5
+ Two defects found by browser visual QA of the inline dropdown menu against a live app.
6
+
7
+ - **Fix (HIGH, affects every consumer): the open inline menu detached from its trigger.** On web the
8
+ menu is portalled to `document.body` with `position: fixed` at the trigger's measured rect.
9
+ `fixed` is viewport-relative, so that coordinate is only valid until something moves the trigger.
10
+ A `scroll`/`resize` listener on `window` was already in place (since 1.7.0) and does handle plain
11
+ scrolling � but it left three real gaps:
12
+ - **Layout changes that fire no scroll event at all** � an accordion above the trigger expanding,
13
+ a sticky header resizing, a banner appearing, an async list rendering. The trigger moved, nothing
14
+ scrolled, no listener fired, and the menu stayed behind. Now covered by a `ResizeObserver` on the
15
+ anchor and on `document.body`.
16
+ - **The trigger leaving the viewport.** Repositioning cannot help here � the menu just follows its
17
+ trigger off-screen and hangs over unrelated content with nothing on screen explaining it. The
18
+ menu now **closes** once the trigger is fully out of view.
19
+ - **Layout thrash.** The handler ran a synchronous `getBoundingClientRect()` (a forced reflow) plus
20
+ a React state update on *every* scroll event. Work is now coalesced into one
21
+ `requestAnimationFrame` per frame.
22
+ Scroll is now observed in the **capture** phase on `document` rather than `window`, so a scroll in
23
+ any ancestor scroll container counts. Tracking moved into a dedicated `useAnchorTracking` hook.
24
+ Native is unaffected (the popover is in-tree and moves with its anchor).
25
+ - **Fix (a11y): `accessibilityHint` never reached a screen reader.** The prop is part of the public
26
+ API and every caller passes one, but react-native-web does not map it � the trigger carried
27
+ `aria-label` and `aria-expanded` and **no hint of any kind**, so the text was silently thrown away
28
+ (older react-native-web versions additionally leaked it to the DOM, logging
29
+ `React does not recognize the accessibilityHint prop on a DOM element`). On web the hint is now
30
+ rendered into a visually-hidden node referenced by `aria-describedby` � the same wiring
31
+ `@dloizides/ui-forms`' `Field` uses for its error line � and the RN-only prop is no longer passed
32
+ on web at all. Native still receives `accessibilityHint` unchanged.
33
+ - **No API change.** Both fixes are internal; every existing caller benefits without edits.
34
+
35
+ ## 1.9.1
36
+
37
+ - **Fix (keyboard a11y, affects every consumer): Enter CLOSED the inline menu instead of SELECTING
38
+ the highlighted option.** The trigger keeps DOM focus while the menu is open, and react-native-web
39
+ maps Enter on a focused Touchable to `onPress`. React dispatches that from its ROOT container
40
+ listener — an ancestor of the trigger, but a *descendant* of `document` — so the menu's BUBBLING
41
+ `document` keydown listener ran second: the trigger toggled the menu shut, React unmounted the
42
+ popover, the effect cleanup removed the very listener the event was still travelling toward, and
43
+ `document` never saw the Enter. Keyboard users could open a dropdown and arrow through it but
44
+ could never CHOOSE with the keyboard (mouse selection was unaffected, which is why it went
45
+ unnoticed).
46
+ - **Fix:** the menu's key handler now runs in the **capture** phase and `stopPropagation`s the keys
47
+ an open menu owns (↑/↓/Home/End/Enter/Escape), so it runs ahead of React's listener and the
48
+ trigger cannot re-toggle behind it. Found while browser-verifying the AML v2 topbar dropdowns.
49
+
50
+ ## 1.9.0
51
+
52
+ - **`ModalDropdown`: `menuMinWidth` — a width FLOOR for the open inline menu (additive, optional).**
53
+ The menu matches the TRIGGER's width, which is right for a full-width field but leaves a compact
54
+ anchor (the 1.8.0 `renderTrigger` case: a locale pill, an avatar chip, an icon button) with a menu
55
+ too narrow to read its own option labels — a 52px "EN ▾" pill produced a 52px menu whose rows were
56
+ clipped to a dark strip. `menuMinWidth` floors it; a wider trigger still wins.
57
+ - **Backward-compatible:** omitted, the width is the trigger's, exactly as before.
58
+
59
+ ## 1.8.0
60
+
61
+ - **`ModalDropdown`: `renderTrigger` — a custom ANCHOR slot (additive, optional).** The dropdown's
62
+ default trigger is a bordered field box, which is wrong for a *menu* anchored to a compact chip
63
+ (a locale pill, an avatar/user chip, an icon button). Callers can now supply
64
+ `renderTrigger={({ label, isOpen }) => …}` and own the anchor's visuals entirely; the default box
65
+ is then not rendered. The a11y wrapper stays with the dropdown — `role=button`, `aria-expanded`,
66
+ the accessible label + hint, and the `testID` are still applied — so a custom trigger *cannot*
67
+ drop the accessible contract, and the portalled, keyboard-navigable (↑/↓/Home/End/Enter/Escape),
68
+ never-clipped menu comes along for free.
69
+ - **`ModalDropdown`: `optionTestID` — custom per-option testIDs (additive, optional).** Options
70
+ still default to `` `${testID}-option-${value}` ``; a caller turning an existing flat control into
71
+ a dropdown can now keep its established selectors stable
72
+ (`optionTestID={(code) => `lang-${code}`}`).
73
+ - **Backward-compatible:** both props are optional and, when omitted, the render tree is unchanged —
74
+ erevna / katalogos / kefi / agora are unaffected and need no markup changes.
75
+
76
+ ## 1.7.1
77
+
78
+ Fix: the modal-variant dismiss backdrop was a pressable WRAPPING the option buttons,
79
+ producing invalid DOM on web ("<button> cannot contain a nested <button>") + a React
80
+ console.error. The backdrop is now an absolute-fill SIBLING behind the dialog — same
81
+ tap-to-dismiss behaviour, no nesting. No API change.
82
+
83
+
84
+ ## 1.7.0
85
+
86
+ - **`ModalDropdown` inline-menu (`variant={DropdownVariant.Menu}`) z-index / clipping fix.** On
87
+ wide/desktop web the open inline menu painted UNDERNEATH later content (adjacent filter fields,
88
+ the results table, cards) so options were hidden/clipped. Root cause: react-native-web renders
89
+ **every `View`** with `position: relative; z-index: 0`, making each View its own stacking context —
90
+ so the popover's `zIndex: 1000` was trapped inside its anchor / the app's field wrapper and could
91
+ never rise above later-painting siblings.
92
+ - **Fix:** on web the menu is now rendered in a **portal to `document.body`** with `position: fixed`
93
+ at the trigger's measured viewport rect (recomputed on scroll/resize) and a high `zIndex`. A portal
94
+ escapes every ancestor stacking context AND every ancestor `overflow: hidden`, so the menu always
95
+ paints on top and is never clipped — the same "menu above the table" outcome as
96
+ `@dloizides/ui-tables` `SizeDropdown`. The anchor wrapper is also lifted to a raised `zIndex` while
97
+ open (defence-in-depth; the primary lift on native).
98
+ - **Native-safe:** the portal + `document`/`window` listeners are all behind `Platform.OS === 'web'`;
99
+ native keeps the in-tree `position:absolute` popover + `elevation`. `react-dom` is added as an
100
+ **optional** peer (already present in every react-native-web consumer).
101
+ - Outside-click dismissal now consults the portalled popover's own node too, so clicking an option
102
+ still selects (a portalled option is no longer a DOM descendant of the anchor). Keyboard nav
103
+ (↑/↓, Home/End, Enter, Escape), `role="menu"`/`menuitem`, `aria-expanded`/`aria-selected`, and the
104
+ modal variant on narrow/native are all unchanged.
105
+ - **Additive / backward-compatible:** the `ModalDropdown` API is unchanged; erevna / katalogos / kefi
106
+ are unaffected.
107
+
108
+ ## 1.6.0
109
+
110
+ - **Accessibility (WCAG 2.1 AA) hardening — additive + backward-compatible.**
111
+ - `AccordionItem`: the rotating chevron (plain) and leading ▸ marker (boxed) are purely
112
+ decorative — the open/closed state is already on the header via `aria-expanded` — so they are
113
+ now `aria-hidden` / `accessibilityElementsHidden` to keep them out of the screen-reader tree.
114
+ - `Accordion`: the expand/collapse `LayoutAnimation` and the chevron rotation now honour
115
+ `prefers-reduced-motion: reduce`, snapping instantly for users who request reduced motion
116
+ (WCAG 2.3.3, web only).
117
+ - `ModalDropdown`: the trigger now also emits `accessibilityState.expanded` (native parity for
118
+ the existing web `aria-expanded`).
119
+
120
+ ## 1.5.0
121
+
122
+ - `Accordion` / `AccordionItem` gain a `variant` prop (`'plain' | 'boxed'`, default `'plain'`).
123
+ `plain` is the original borderless look (hairline dividers, right-hand chevron flipping 180° on
124
+ open) — existing consumers render **identically**, no change. `boxed` is the AML v1 console
125
+ `<details>` look: each item is its own bordered, rounded box (spaced by a gap) with a **leading
126
+ ▸ marker** that rotates 90° on open and a muted, 600-weight summary. The full API is preserved
127
+ (controlled/uncontrolled, `allowMultiple`, `defaultOpen`, a11y `aria-expanded`/region, the
128
+ open/close LayoutAnimation + chevron rotation). Additive + backward-compatible.
129
+
130
+ ## 1.4.0
131
+
132
+ - Add **`SegmentedControl`** — a single rounded pill *track* holding N mutually-exclusive
133
+ segments (the iOS-style segmented / tab toggle). The selected segment lifts onto a raised
134
+ surface (`colors.surface`) with a subtle shadow; the rest stay transparent over the soft
135
+ track (`colors.background`). Promoted from the v1 AML console's `.lf-mode` mode switch so
136
+ erevna/katalogos/kefi share ONE toggle instead of hand-rolling two primary/ghost buttons.
137
+ - **Generic over the value union** (`SegmentedControl<'peps' | 'leaders'>`) for a typed
138
+ `onChange`; each segment carries its own `label` / `value` / optional `testID` +
139
+ `accessibilityLabel` / `accessibilityHint`.
140
+ - **a11y**: the group renders as a `tablist`, each segment as a `tab` with
141
+ `accessibilityState={{ selected }}` (react-native-web forwards `role` + `aria-selected`).
142
+ - **Themed** entirely from the `@dloizides/ui-feedback` theme (surface / background / border /
143
+ text colours); no colour literal except the selected-segment drop shadow.
144
+ - **Additive / backward-compatible**: purely new exports (`SegmentedControl`,
145
+ `SegmentedControlProps`, `SegmentedOption`). Existing consumers are unaffected.
146
+
147
+ ## 1.3.0
148
+
149
+ - Add **`Accordion`** + **`AccordionItem`** — a themed expand/collapse disclosure group that
150
+ replaces per-app hand-rolled `<details>` / expanders (AML "More options" + expandable
151
+ matched-candidate rows, Erevna survey groups, Katalogos menu sections…).
152
+ - Compound API: an `Accordion` container owns the open state and shares it with `AccordionItem`
153
+ children via context. Each item = a pressable header (title left, optional `right`
154
+ adornment/badge slot, a rotating chevron) over a collapsible body `region`.
155
+ - **Controlled** (`openIds` + `onOpenChange`) **and uncontrolled** (`defaultOpenIds`, plus
156
+ per-item `defaultOpen`). `allowMultiple` (default `true`) vs single-open. Per-item `disabled`.
157
+ - **a11y**: header is an accessible `button` (`accessibilityRole="button"`,
158
+ `accessibilityState={{ expanded }}`, web `aria-expanded` + `aria-controls`); body is a
159
+ `role="region"`. Renders as a native `<button>`, so **Enter / Space toggle** it.
160
+ - **Themed** entirely from the `@dloizides/ui-feedback` theme (border / surface / text colours),
161
+ no hardcoded palette; renders borderless so it nests inside a `Section` / `Card`.
162
+ - **Animated** open/close via a guarded `LayoutAnimation` (web- and native-safe no-op fallback,
163
+ never throws) + an `Animated` chevron rotation. Hook-safe (lazy `useState`, no ref reads in render).
164
+ - **Additive / backward-compatible**: purely new exports (`Accordion`, `AccordionItem`,
165
+ `AccordionProps`, `AccordionItemProps`). Existing consumers (erevna / katalogos / aml-v2) are
166
+ unaffected.
167
+
168
+ ## 1.2.0
169
+
170
+ - `ModalDropdown` can now render as an **inline anchored menu** (native `<select>` feel), not only a
171
+ modal. New `variant?: DropdownVariant` prop (`Menu` | `Modal`) selects the presentation per screen.
172
+ - **Responsive default** (when `variant` is omitted): inline `Menu` on wide/desktop web
173
+ (viewport ≥ 768px), `Modal` on narrow/mobile and on any native platform. An explicit `variant`
174
+ overrides the auto choice.
175
+ - The inline menu anchors under the trigger, is dismissible via click-outside / `Esc`, is
176
+ keyboard-navigable (↑/↓, `Home`/`End`, `Enter`), scrolls when long, and does not push layout.
177
+ The modal path is unchanged. Both variants share the same option-rendering/selection logic
178
+ (`OptionRow`), so nothing is duplicated.
179
+ - **Additive / backward-compatible**: existing `ModalDropdown` callers (erevna / katalogos / aml-v2)
180
+ keep their exact API and now get the inline-on-desktop menu automatically. New export:
181
+ `DropdownVariant` (a runtime enum — deliberately not `const enum`, which cannot cross a published
182
+ package boundary under `isolatedModules`).
183
+
184
+ ## 1.1.0
185
+
186
+ - Add `ModalShell` — slide-up full-screen modal with a themed header (title + close) and scrollable body.
187
+ Composes `Heading` (this package) + `SvgIcon` (`@dloizides/ui-icons`). This was the batch-1 deferred
188
+ ModalShell, now landed (ui-icons + Heading both shared). Adds `@dloizides/ui-icons` + `react-native-svg`
189
+ as peers.
190
+
191
+ ## 1.0.0
192
+
193
+ Initial release (Capability Wave C1, batch 5 — the ui-layout pivot after full settings-hub proved
194
+ not cleanly extractable). Extracted the proven (erevna+katalogos identical) presentational primitives
195
+ that the settings screens (and others) reuse: `Section`, `Heading`, `StatusBadge`, `UpgradePrompt`,
196
+ `ModalDropdown` + `useFocusTrap`. Share the `@dloizides/ui-feedback` context (`useUi`). `Heading`
197
+ unblocks the deferred ModalShell. `Breadcrumb` deferred (couples to the app's router + breadcrumb map).
package/README.md CHANGED
@@ -76,6 +76,10 @@ The apps supply the header hint string via the shared translate: key `common.acc
76
76
  - **Wide / desktop web** (viewport ≥ 768px) → an **inline anchored menu** that opens directly
77
77
  under the trigger (native `<select>` feel): dismissible via click-outside / `Esc`,
78
78
  keyboard-navigable (↑/↓, `Home`/`End`, `Enter`), scrolls when long, and never pushes layout.
79
+ It is portalled to `document.body` so no ancestor stacking context or `overflow` can trap or
80
+ clip it, and it **stays glued to its trigger**: it re-anchors on scroll (in any ancestor scroll
81
+ container), on resize, and on layout changes that fire no scroll event at all, then **closes**
82
+ once the trigger scrolls out of the viewport rather than floating over unrelated content.
79
83
  - **Narrow / mobile, or any native platform** → the original **modal** / bottom-sheet.
80
84
 
81
85
  Pass `variant` to force either behaviour regardless of viewport — the prop overrides the auto choice:
@@ -94,6 +98,10 @@ import { ModalDropdown, DropdownVariant } from '@dloizides/ui-layout';
94
98
  <ModalDropdown /* …props… */ variant={DropdownVariant.Modal} />
95
99
  ```
96
100
 
101
+ `accessibilityHint` reaches assistive tech on both platforms: natively via `accessibilityHint`, and
102
+ on web via a visually-hidden node referenced by the trigger's `aria-describedby` (react-native-web
103
+ does not map the RN prop, so the hint would otherwise be silently dropped).
104
+
97
105
  The public API is additive — callers that never pass `variant` keep working and now
98
106
  get the inline-on-desktop menu for free.
99
107