@astryxdesign/core 0.7.2 → 0.7.3-canary.1379cb7
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/dist/Selector/SelectorOption.d.ts.map +1 -1
- package/dist/Selector/SelectorOption.js +1 -0
- package/dist/TimeInput/TimeInput.d.ts +2 -1
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +11 -2
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +14 -2
- package/dist/astryx.css +1 -0
- package/dist/utils/timeParser.d.ts +4 -0
- package/dist/utils/timeParser.d.ts.map +1 -1
- package/dist/utils/timeParser.js +9 -2
- package/package.json +4 -4
- package/scripts/agent-doc-state.mjs +35 -8
- package/src/BottomSheet/BottomSheet.spec.md +13 -6
- package/src/BottomSheet/BottomSheetSwitcher.spec.md +121 -51
- package/src/DateRangeInput/DateRangeInput.spec.md +13 -13
- package/src/Selector/Selector.spec.md +11 -11
- package/src/Selector/Selector.test.tsx +16 -0
- package/src/Selector/SelectorOption.tsx +4 -0
- package/src/Slider/Slider.spec.md +11 -11
- package/src/Table/Table.spec.md +2 -0
- package/src/Table/plugins/infiniteScroll/useTableInfiniteScroll.spec.md +244 -0
- package/src/Table/plugins/virtualization/useTableVirtualization.spec.md +266 -0
- package/src/TimeInput/TimeInput.doc.mjs +5 -3
- package/src/TimeInput/TimeInput.test.tsx +20 -0
- package/src/TimeInput/TimeInput.tsx +2 -1
- package/src/Tokenizer/Tokenizer.spec.md +28 -28
- package/src/Tooltip/__tests__/TooltipHoverBridge.a11y.chromium.spec.ts +74 -0
- package/src/Tooltip/useTooltip.test.tsx +23 -0
- package/src/Tooltip/useTooltip.tsx +22 -9
- package/src/Typeahead/Typeahead.test.tsx +89 -0
- package/src/Typeahead/Typeahead.tsx +15 -2
- package/src/utils/timeParser.test.ts +11 -0
- package/src/utils/timeParser.ts +9 -2
|
@@ -13,6 +13,7 @@ review_triggers: [public-api, behavior, layout, theming, accessibility]
|
|
|
13
13
|
verified_by:
|
|
14
14
|
[
|
|
15
15
|
packages/core/src/BottomSheet/BottomSheetSwitcher.test.tsx,
|
|
16
|
+
packages/core/src/BottomSheet/__tests__/BottomSheetNativeModal.a11y.browser.spec.ts,
|
|
16
17
|
apps/storybook/stories/BottomSheetSwitcher.stories.tsx,
|
|
17
18
|
scripts/check-knowledge.mjs,
|
|
18
19
|
]
|
|
@@ -34,16 +35,21 @@ system_specs: [spec:AST-002, spec:AST-027]
|
|
|
34
35
|
## Intent
|
|
35
36
|
|
|
36
37
|
BottomSheetSwitcher coordinates a mutually exclusive sequence of BottomSheet
|
|
37
|
-
children
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
children. This draft records verified shipped and remediated behavior, and the
|
|
39
|
+
hosting requirements its decision log decides — each child presented in its own
|
|
40
|
+
native dialog — without adding a prop, changing a default, or settling the
|
|
41
|
+
open modality, identifier, or theming decisions below. A row whose review state
|
|
42
|
+
is "Owner decision" is the decided requirement, not shipped behavior; the
|
|
43
|
+
representative states that name a sheet's own dialog, the retained dialog, or
|
|
44
|
+
the flow wrapper describe DEC-1's decided structure in the same way.
|
|
40
45
|
|
|
41
46
|
## Compatibility and migration
|
|
42
47
|
|
|
43
48
|
- Released default preserved: `yes`
|
|
44
|
-
- Compatibility class:
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
- Compatibility class: nonbreaking; public props, defaults, exports, visual
|
|
50
|
+
output, and transition behavior stay unchanged. The element the `ref` resolves
|
|
51
|
+
to, and that it changes on a handoff, is implementation rather than public
|
|
52
|
+
contract (DEC-2)
|
|
47
53
|
- Controlled/uncontrolled behavior: `activeSheet` remains fully controlled
|
|
48
54
|
- Migration decision: none
|
|
49
55
|
|
|
@@ -53,10 +59,16 @@ Consumer migration instructions belong in consumer docs and release notes.
|
|
|
53
59
|
|
|
54
60
|
**Owns**
|
|
55
61
|
|
|
56
|
-
-
|
|
62
|
+
- The presentation lifecycle of every directly nested BottomSheet child's native
|
|
63
|
+
dialog: which is presented, retained during a handoff, or closed.
|
|
57
64
|
- Which child sheet is active, retained during a handoff, or hidden.
|
|
58
|
-
-
|
|
59
|
-
and
|
|
65
|
+
- Which sheet dialog hosts the flow (its ref, `id`, and dismissal
|
|
66
|
+
registration) and which paints the flow's one scrim, plus
|
|
67
|
+
Escape/platform-close routing and final focus return for the flow. Focus
|
|
68
|
+
containment is the native modal dialog's; the flow's one page scroll lock is
|
|
69
|
+
held for the whole modal flow (DEC-1).
|
|
70
|
+
- The flow wrapper: the isolated surface that orders non-modal sheet dialogs
|
|
71
|
+
locally (`spec:AST-027` FR2).
|
|
60
72
|
|
|
61
73
|
**Does not own / non-goals**
|
|
62
74
|
|
|
@@ -69,30 +81,30 @@ Consumer migration instructions belong in consumer docs and release notes.
|
|
|
69
81
|
|
|
70
82
|
## Public concepts
|
|
71
83
|
|
|
72
|
-
| Concept | Closed values or states | Meaning
|
|
73
|
-
| ------------------- | ---------------------------------------------------- |
|
|
74
|
-
| Active sheet | `null` or one nested BottomSheet `sheetId` | Selects the only interactive child, or closes the flow
|
|
75
|
-
| Shared presentation | `true` / `false` through `hasScrim` | Selects the current modal scrim-backed host or non-modal no-scrim host
|
|
76
|
-
| Child identity | Non-empty `sheetId` on each direct BottomSheet child | Associates controlled selection, labeling, purpose, and transition state with a child
|
|
77
|
-
| Dismissal request | `onActiveSheetChange(null)` | Reports an allowed implicit close without taking control from the caller
|
|
78
|
-
| Dialog surface | inherited dialog props plus `ref` and `onCancel` |
|
|
84
|
+
| Concept | Closed values or states | Meaning | Availability by variant/orientation/state | Default | Owner | Stability | Invalid-value behavior |
|
|
85
|
+
| ------------------- | ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | -------------------------------------- | ------------------------------------------------------------------------- | --------- | ------------------------------------------------------------------------------------------ |
|
|
86
|
+
| Active sheet | `null` or one nested BottomSheet `sheetId` | Selects the only interactive child, or closes the flow | All presentations | `null` is closed; the prop is required | `component:BottomSheetSwitcher` | released | A non-matching or duplicate id is not given a safe public fallback by the current contract |
|
|
87
|
+
| Shared presentation | `true` / `false` through `hasScrim` | Selects the current modal scrim-backed host or non-modal no-scrim host | Entire flow | `true` | `component:BottomSheetSwitcher` | released | Boolean only |
|
|
88
|
+
| Child identity | Non-empty `sheetId` on each direct BottomSheet child | Associates controlled selection, labeling, purpose, and transition state with a child | Direct nested BottomSheet children | none | `component:BottomSheet` | released | Empty ids warn and stay hidden; duplicate-id behavior is not specified |
|
|
89
|
+
| Dismissal request | `onActiveSheetChange(null)` | Reports an allowed implicit close without taking control from the caller | Escape/platform close, scrim click, or swipe according to active child purpose | none | `component:BottomSheetSwitcher`; `family:overlay-dismissal` owns ordering | released | The caller may retain its controlled value |
|
|
90
|
+
| Dialog surface | inherited dialog props plus `ref` and `onCancel` | Dialog props and handlers, `onCancel` included, reach every sheet dialog; `ref`, `id`, and `data-testid` resolve to the host dialog, which is never null for an object ref while a sheet is mounted (owner decision, DEC-2) | Entire flow | none | `component:BottomSheetSwitcher` | released | Component-owned semantics and handlers retain precedence |
|
|
79
91
|
|
|
80
92
|
## Behavioral and layout contract
|
|
81
93
|
|
|
82
94
|
Draft requirements identify their basis so observed code is not mistaken for an
|
|
83
95
|
intentional decision. This draft cannot clear the gaps it records.
|
|
84
96
|
|
|
85
|
-
| ID | Candidate invariant
|
|
86
|
-
| --- |
|
|
87
|
-
| FR1 | Zero or one child sheet is interactive for each controlled `activeSheet` value; all other children are hidden or retained inert and `aria-hidden` during a transition.
|
|
88
|
-
| FR2 |
|
|
89
|
-
| FR3 | During a handoff, the entering sheet is above the retained sheet. A taller retained sheet aligns down to a shorter entering sheet, and the retained sheet fades only after required transform motion completes.
|
|
90
|
-
| FR4 | Closing retains the outgoing sheet through its exit, then closes the dialog. A modal flow restores focus to the element captured when that modal flow opened.
|
|
91
|
-
| FR5 | `hasScrim=true` uses `showModal()`, a native backdrop, focus containment, and page scroll lock. `hasScrim=false` uses `show()` without a backdrop or scroll lock and leaves the page interactive.
|
|
92
|
-
| FR6 | The active child purpose governs implicit dismissal: `info` allows Escape, scrim click, and swipe; `form` allows Escape; `required` blocks all three and exposes `alertdialog`.
|
|
93
|
-
| FR7 | While visible, the switcher participates in `family:overlay-dismissal`; one Escape or platform close request reaches only the topmost present layer, and descendants receive a deeper logical layer scope.
|
|
94
|
-
| FR8 | A stale gesture from an outgoing sheet cannot change the
|
|
95
|
-
| FR9 | The switcher forwards
|
|
97
|
+
| ID | Candidate invariant | Basis | Draft review state |
|
|
98
|
+
| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
99
|
+
| FR1 | Zero or one child sheet is interactive for each controlled `activeSheet` value; all other children are hidden or retained inert and `aria-hidden` during a transition. | Current source, docs, and tests | Verified shipped behavior |
|
|
100
|
+
| FR2 | Each child sheet owns one native dialog. Opening a sheet presents its dialog once; a handoff presents the entering sheet's dialog above the retained one and closes the retained dialog only after its panel has faded. Returning to a sheet whose dialog is still open beneath a newer one re-presents it so the interactive sheet is the topmost layer. | DEC-1 | Owner decision |
|
|
101
|
+
| FR3 | During a handoff, the entering sheet is above the retained sheet. A taller retained sheet aligns down to a shorter entering sheet, and the retained sheet fades only after required transform motion completes. | Current source and transition tests | Verified shipped behavior; exact visual treatment remains human-reviewed |
|
|
102
|
+
| FR4 | Closing retains the outgoing sheet through its exit, then closes the dialog. A modal flow restores focus to the element captured when that modal flow opened. | Current source and focus tests | Verified shipped behavior |
|
|
103
|
+
| FR5 | `hasScrim=true` uses `showModal()`, a native backdrop, and native focus containment, and locks page scroll: the page does not scroll while a modal flow is presented; the lock is held continuously across a handoff, never released and re-acquired between steps; it still holds beneath a `Dialog` opened from a step; it is released after the flow's exit (owner decision, DEC-1). `hasScrim=false` uses `show()` without a backdrop or scroll lock and leaves the page interactive (verified current behavior). In a non-modal flow the sheet dialogs order themselves with local values inside the switcher's isolated flow wrapper (owner decision, DEC-1); the page-level value that wrapper carries remains a `spec:AST-027` conformance gap. | DEC-1; `spec:AST-027` FR2, FR4, FR8 | Modal host and the wrapper's local ordering: owner decision. Non-modal `show()` host: verified current behavior. The wrapper's page-level value remains a `spec:AST-027` conformance gap |
|
|
104
|
+
| FR6 | The active child purpose governs implicit dismissal: `info` allows Escape, scrim click, and swipe; `form` allows Escape; `required` blocks all three and exposes `alertdialog`. | Current BottomSheet docs and switcher tests | Verified shipped behavior |
|
|
105
|
+
| FR7 | While visible, the switcher participates in `family:overlay-dismissal`; one Escape or platform close request reaches only the topmost present layer, and descendants receive a deeper logical layer scope. | `family:overlay-dismissal` and the audit regression test | Settled remediation in this audit |
|
|
106
|
+
| FR8 | One backdrop paints the flow's scrim at a time: the retained sheet's dialog keeps it through a handoff and the entering dialog takes it over without a fade when the retained dialog closes. A stale gesture from an outgoing sheet cannot change the flow's scrim, and unmounting a retained sheet cannot keep its dialog open or the flow's modal layer held. | DEC-1; current tests | Owner decision |
|
|
107
|
+
| FR9 | The switcher forwards neutral dialog attributes, styling inputs, and composed handlers, `onCancel` included, to every sheet dialog, so a handler fires for whichever sheet dialog raises the event; renders `id` and `data-testid` on the host dialog only, so each appears once in the document; attaches its ref to the host dialog; and preserves its owned ARIA and dismissal behavior. An object ref's `current` is never `null` while a sheet is mounted. A callback ref follows React's semantics on a handoff: a cleanup it returned runs when it detaches from the old host; a callback ref without a cleanup is called with `null` on detach, then with the new host. | DEC-1, DEC-2; `architecture:public-component-api` INV8 | Owner decision |
|
|
96
108
|
|
|
97
109
|
### Allowed variation
|
|
98
110
|
|
|
@@ -104,14 +116,17 @@ intentional decision. This draft cannot clear the gaps it records.
|
|
|
104
116
|
|
|
105
117
|
### Representative states
|
|
106
118
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
|
|
|
114
|
-
|
|
|
119
|
+
The states below describe DEC-1's decided structure where they name a sheet's
|
|
120
|
+
own dialog, the retained dialog, or the flow wrapper.
|
|
121
|
+
|
|
122
|
+
| State | Required invariant | Allowed variation |
|
|
123
|
+
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
124
|
+
| Closed | Every sheet dialog is closed and no child is interactive. | Child panels may remain mounted but hidden. |
|
|
125
|
+
| First open | Matching child is visible and interactive in its own dialog. | Child-owned height and content. |
|
|
126
|
+
| Handoff | Entering child is interactive in its own dialog; retained child's dialog stays open, inert, and hidden from accessibility APIs until it fades, and keeps painting the one scrim. | Alignment offset depends on measured panel geometry. |
|
|
127
|
+
| Closing | Outgoing child is retained inert while exit motion completes; modal focus and scroll ownership remain until close. | Theme-controlled duration. |
|
|
128
|
+
| Modal | Native modal host, backdrop, native focus containment, and the page scroll lock are active. | Active child's `purpose` controls implicit dismissal. |
|
|
129
|
+
| Non-modal | Native non-modal host has no backdrop or scroll lock and background content remains interactive. | The current clipping/stacking limitation is a conformance gap, not an allowed exception. |
|
|
115
130
|
|
|
116
131
|
### Transformation and precedence order
|
|
117
132
|
|
|
@@ -124,8 +139,12 @@ intentional decision. This draft cannot clear the gaps it records.
|
|
|
124
139
|
|
|
125
140
|
### Performance and resources
|
|
126
141
|
|
|
127
|
-
- **PR1 — One
|
|
128
|
-
|
|
142
|
+
- **PR1 — One painted scrim.** In a modal flow, at rest exactly one sheet
|
|
143
|
+
dialog is presented; during a handoff two are, with one backdrop painted.
|
|
144
|
+
Native modality holds across a modal flow's child handoffs because a sheet
|
|
145
|
+
dialog is modal throughout, and the one page scroll lock is held for the
|
|
146
|
+
whole flow rather than per step. A non-modal flow paints no backdrop and
|
|
147
|
+
holds no lock.
|
|
129
148
|
- **PR2 — Stable child registration.** Parent rerenders and changing consumer ref
|
|
130
149
|
identities do not unregister a mounted child or cancel an active handoff.
|
|
131
150
|
|
|
@@ -141,11 +160,11 @@ intentional decision. This draft cannot clear the gaps it records.
|
|
|
141
160
|
|
|
142
161
|
## Design relationships
|
|
143
162
|
|
|
144
|
-
| Anatomy or state | Design requirement
|
|
145
|
-
| ---------------- |
|
|
146
|
-
| Shared dialog | Transparent host for the flow's interaction and accessibility boundary
|
|
147
|
-
| Sheet panels | Delegate visible panel, content, handle, and gesture presentation to BottomSheet
|
|
148
|
-
| Scrim | Optional native backdrop that dims and blocks the page in modal presentation
|
|
163
|
+
| Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |
|
|
164
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | -------------- | ------------------ |
|
|
165
|
+
| Shared dialog | Transparent host for the flow's interaction and accessibility boundary; DEC-1 decides one such host per child sheet | Current source and public docs; DEC-1 for the per-sheet clause | Structural | FR2, FR5, AR1 |
|
|
166
|
+
| Sheet panels | Delegate visible panel, content, handle, and gesture presentation to BottomSheet | `component:BottomSheet` draft as observational context | Prominent | FR1, FR3 |
|
|
167
|
+
| Scrim | Optional native backdrop that dims and blocks the page in modal presentation; DEC-1 decides that one sheet dialog paints it at a time | Current source and public docs; DEC-1 for the one-painter clause | Supporting | FR5, FR8 |
|
|
149
168
|
|
|
150
169
|
### Theming anatomy
|
|
151
170
|
|
|
@@ -163,7 +182,7 @@ intentional decision. This draft cannot clear the gaps it records.
|
|
|
163
182
|
},
|
|
164
183
|
"Scrim": {
|
|
165
184
|
"none": {
|
|
166
|
-
"reason": "reachability-gap: The switcher-
|
|
185
|
+
"reason": "reachability-gap: The switcher-coordinated native backdrop paints the scrim but has no current public theming target."
|
|
167
186
|
}
|
|
168
187
|
}
|
|
169
188
|
}
|
|
@@ -183,17 +202,68 @@ intentional decision. This draft cannot clear the gaps it records.
|
|
|
183
202
|
|
|
184
203
|
## Verification map
|
|
185
204
|
|
|
186
|
-
| Contract | Verification
|
|
187
|
-
| ---------------- |
|
|
188
|
-
| FR1–FR4, FR8 | `BottomSheetSwitcher.test.tsx`
|
|
189
|
-
| FR5–FR7, AR1–AR3 | `BottomSheetSwitcher.test.tsx`;
|
|
190
|
-
| FR9 | `BottomSheetSwitcher.test.tsx`; export checks
|
|
191
|
-
| Theming anatomy | `scripts/check-knowledge.mjs`; theming tests
|
|
205
|
+
| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
|
|
206
|
+
| ---------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
|
|
207
|
+
| FR1–FR4, FR8 | `BottomSheetSwitcher.test.tsx` | closed, first open, handoffs in either completion order, rapid replacement, unmount, close | A child becomes interactive at the wrong time, a retained child disappears early, a second backdrop paints, or a sheet dialog's lifecycle breaks. | `audit:BottomSheetSwitcher/behavior` |
|
|
208
|
+
| FR5–FR7, AR1–AR3 | `BottomSheetSwitcher.test.tsx`; `BottomSheetNativeModal.a11y.browser.spec.ts` | modal/non-modal, info/form/required, nested layer, IME, focus return, scroll lock in engines, non-modal local ordering | Modality, dismissal order, naming, inertness, scroll lock, or focus behavior diverges, or a sheet dialog takes a page-level z-index. | `audit:BottomSheetSwitcher/accessibility` |
|
|
209
|
+
| FR9 | `BottomSheetSwitcher.test.tsx`; export checks | ref across open/handoff/close/unmount, callback-ref cleanup, `id` once, DOM/ARIA/data/events, class, style, xstyle | A supported input is dropped or duplicated, an object ref is null while a sheet is mounted or skips a cleanup, or an input overrides component-owned semantics accidentally. | `audit:BottomSheetSwitcher/api` |
|
|
210
|
+
| Theming anatomy | `scripts/check-knowledge.mjs`; theming tests | dialog, delegated sheet panel, scrim | A non-painting host gains a target, a delegated panel loses its owner, or the scrim gap disappears without review. | `audit:BottomSheetSwitcher/theming` |
|
|
192
211
|
|
|
193
212
|
## Decision log
|
|
194
213
|
|
|
195
|
-
|
|
196
|
-
|
|
214
|
+
### DEC-1 — Each step owns its native dialog; the switcher coordinates
|
|
215
|
+
|
|
216
|
+
**Reference:** `component:BottomSheetSwitcher/DEC-1`
|
|
217
|
+
**Decider:** imdreamrunner, 2026-10-20
|
|
218
|
+
|
|
219
|
+
A switcher step is a BottomSheet with its own native dialog, presented and
|
|
220
|
+
closed like a standalone sheet, so one DOM shape serves standalone sheets and
|
|
221
|
+
switcher steps alike and the browser supplies modality per step: an inert
|
|
222
|
+
page, focus containment, `cancel` for Escape and the platform close, and the
|
|
223
|
+
backdrop. The switcher owns only what no single dialog can decide: which dialog
|
|
224
|
+
is presented, retained, or closed; the one scrim handed from the retained
|
|
225
|
+
dialog to the entering one without a fade; re-presenting a sheet that is still
|
|
226
|
+
open beneath a newer one when the flow returns to it; focus kept in the active
|
|
227
|
+
sheet when a retained dialog closes; focus returned to the flow's opener;
|
|
228
|
+
`cancel` gated by the active step's `purpose` through the shared dismissal
|
|
229
|
+
stack; and the flow's one page scroll lock, held from the moment a modal flow
|
|
230
|
+
is presented until after its exit, so a handoff between two open dialogs never
|
|
231
|
+
releases and re-acquires it. The switcher's one element is a flow wrapper with
|
|
232
|
+
no box in a modal flow and, in a non-modal flow, the isolated surface inside
|
|
233
|
+
which the sheet dialogs order themselves with local values.
|
|
234
|
+
Rejected: one switcher-owned dialog hosting every step as a panel, because a
|
|
235
|
+
step is then not a sheet and every standalone-sheet mechanism needs a second,
|
|
236
|
+
switcher-only implementation.
|
|
237
|
+
Rejected: a script focus trap on top of native containment, because the
|
|
238
|
+
browser already contains focus in a modal dialog and the trap fights its
|
|
239
|
+
inertness.
|
|
240
|
+
Rejected: a page-level `z-index` on a non-modal step's dialog, because
|
|
241
|
+
`spec:AST-027` FR4 forbids a new page band; the wrapper is the isolation owner.
|
|
242
|
+
|
|
243
|
+
### DEC-2 — The host dialog's identity is implementation, not contract
|
|
244
|
+
|
|
245
|
+
**Reference:** `component:BottomSheetSwitcher/DEC-2`
|
|
246
|
+
**Decider:** imdreamrunner, 2026-10-20
|
|
247
|
+
|
|
248
|
+
The `ref`, `id`, and `data-testid` of the switcher reach the dialog hosting
|
|
249
|
+
the flow: the active sheet's, the exiting sheet's through its exit, and, while
|
|
250
|
+
the flow is closed, the dialog that hosted it last or the first mounted
|
|
251
|
+
sheet's, so an object ref is never `null` while a sheet is mounted and the
|
|
252
|
+
identifying attributes appear once. Which element that is, and that it changes
|
|
253
|
+
on a handoff, is implementation. The released documentation (v0.7.1
|
|
254
|
+
`BottomSheetSwitcher.doc.mjs`) describes the ref as "Ref forwarded to the one
|
|
255
|
+
shared native dialog." and the switcher as "Its ref and shared DOM props
|
|
256
|
+
target that dialog." Code that copies `ref.current` once at mount keeps a
|
|
257
|
+
real `<dialog>`, but after a handoff that element may no longer be the host;
|
|
258
|
+
read `ref.current` at use time, or use a callback ref, to follow the flow. DOM
|
|
259
|
+
props and handlers given to the switcher (`className`, `style`, `onCancel`,
|
|
260
|
+
`onToggle`, `aria-*`, and the rest) reach every sheet dialog, with `id` and
|
|
261
|
+
`data-testid` on the host only, so a handler fires for whichever sheet dialog
|
|
262
|
+
raises the event. The owner rules this hosting — the moving host and the
|
|
263
|
+
per-dialog props alike — nonbreaking under `spec:AST-017` FR3 because no
|
|
264
|
+
visual output and no public API surface changes.
|
|
265
|
+
Rejected: classifying the moving ref as a breaking change, because no public
|
|
266
|
+
API, documented interaction, or visual output changes.
|
|
197
267
|
|
|
198
268
|
## Open questions
|
|
199
269
|
|
|
@@ -90,12 +90,12 @@ preset-list anatomy and its additive theming surface.
|
|
|
90
90
|
|
|
91
91
|
### Representative states
|
|
92
92
|
|
|
93
|
-
| State | Required invariant
|
|
94
|
-
| ----------------- |
|
|
95
|
-
| No presets | No preset group or preset-button target renders.
|
|
96
|
-
| Presets, no match | Every button carries the preset target with no selected state.
|
|
97
|
-
| Applied preset | The matching button carries `aria-current="true"` and the target's selected state.
|
|
98
|
-
| Disabled preset | A preset that violates an endpoint date constraint or a range-span constraint is
|
|
93
|
+
| State | Required invariant | Allowed variation |
|
|
94
|
+
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
|
|
95
|
+
| No presets | No preset group or preset-button target renders. | Calendar configuration |
|
|
96
|
+
| Presets, no match | Every button carries the preset target with no selected state. | Preset count and labels |
|
|
97
|
+
| Applied preset | The matching button carries `aria-current="true"` and the target's selected state. | Selected range |
|
|
98
|
+
| Disabled preset | A preset that violates an endpoint date constraint or a range-span constraint is disabled per `spec:AST-085` and carries the target's disabled state. | Constraint source |
|
|
99
99
|
|
|
100
100
|
### Transformation and precedence order
|
|
101
101
|
|
|
@@ -120,8 +120,8 @@ No new performance or resource constraint is introduced.
|
|
|
120
120
|
- **AR2 — Current state.** The applied preset remains exposed with
|
|
121
121
|
`aria-current="true"`; theme state reflection is additive.
|
|
122
122
|
- **AR3 — Disabled state.** A preset that violates an endpoint date constraint or
|
|
123
|
-
a range-span constraint
|
|
124
|
-
not replace that behavior.
|
|
123
|
+
a range-span constraint is disabled and stays focusable (`spec:AST-085`); theme
|
|
124
|
+
state reflection does not replace that behavior.
|
|
125
125
|
|
|
126
126
|
## Design relationships
|
|
127
127
|
|
|
@@ -172,11 +172,11 @@ No new performance or resource constraint is introduced.
|
|
|
172
172
|
|
|
173
173
|
## Verification map
|
|
174
174
|
|
|
175
|
-
| Contract | Verification
|
|
176
|
-
| ------------------- |
|
|
177
|
-
| FR1, FR2, AR1–AR3 | `DateRangeInput.test.tsx
|
|
178
|
-
| FR3, FR4 | `DateRangeInput.test.tsx`, `themingTargets.test.ts`, generated probe theme
|
|
179
|
-
| Theming anatomy map | `scripts/check-knowledge.mjs`
|
|
175
|
+
| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
|
|
176
|
+
| ------------------- | --------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------ |
|
|
177
|
+
| FR1, FR2, AR1–AR3 | `DateRangeInput.test.tsx`; disabled-preset focusability (AR3) pending conformance | no match, applied preset, endpoint-invalid preset, span-invalid preset | Semantics or state attributes disappear | `audit:DateRangeInput/presets` |
|
|
178
|
+
| FR3, FR4 | `DateRangeInput.test.tsx`, `themingTargets.test.ts`, generated probe theme | group target, selected button, disabled button | Target class/state is missing, undocumented, or placed on the wrong element | `audit:DateRangeInput/theming` |
|
|
179
|
+
| Theming anatomy map | `scripts/check-knowledge.mjs` | all documented anatomy | Target ownership or anatomy names drift | `audit:DateRangeInput/theming` |
|
|
180
180
|
|
|
181
181
|
## Decision log
|
|
182
182
|
|
|
@@ -163,17 +163,17 @@ These requirements describe shipped behavior on current `main`.
|
|
|
163
163
|
|
|
164
164
|
### Representative states
|
|
165
165
|
|
|
166
|
-
| State | Required invariant
|
|
167
|
-
| ------------------------ |
|
|
168
|
-
| closed with no value | Label and placeholder identify the field
|
|
169
|
-
| closed with a value | Selected option is represented in the trigger
|
|
170
|
-
| pointer / popover | Anchored surface exposes the listbox without modal-dialog semantics
|
|
171
|
-
| compact coarse pointer | BottomSheet exposes a modal dialog containing the listbox
|
|
172
|
-
| searching | Visible options, keyboard navigation, and announced result count use one filter
|
|
173
|
-
| loading | Trigger is busy; empty and no-results output is suppressed
|
|
174
|
-
| disabled with reason | Trigger remains focusable
|
|
175
|
-
| read-only | Value stays focusable and submittable; menu, clear, and disclosure affordances are absent
|
|
176
|
-
| selected/unselected rows | Empty marks consume no width; visible marks retain space at the logical edge
|
|
166
|
+
| State | Required invariant | Allowed variation |
|
|
167
|
+
| ------------------------ | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
|
|
168
|
+
| closed with no value | Label and placeholder identify the field | Consumer placeholder text |
|
|
169
|
+
| closed with a value | Selected option is represented in the trigger | Custom `renderValue` content |
|
|
170
|
+
| pointer / popover | Anchored surface exposes the listbox without modal-dialog semantics | Default or explicit placement |
|
|
171
|
+
| compact coarse pointer | BottomSheet exposes a modal dialog containing the listbox | Default or explicit `adaptive`, or explicit `bottom-sheet` |
|
|
172
|
+
| searching | Visible options, keyboard navigation, and announced result count use one filter | Consumer search and empty text |
|
|
173
|
+
| loading | Trigger is busy; empty and no-results output is suppressed | Consumer loading duration |
|
|
174
|
+
| disabled with reason | Trigger remains focusable (`spec:AST-085`) and exposes the reason; activation stays blocked | Consumer reason text |
|
|
175
|
+
| read-only | Value stays focusable and submittable; menu, clear, and disclosure affordances are absent | Value rendering, status, and busy presentation |
|
|
176
|
+
| selected/unselected rows | Empty marks consume no width; visible marks retain space at the logical edge | State-dependent label position/width and themed indicators |
|
|
177
177
|
|
|
178
178
|
### Transformation and precedence order
|
|
179
179
|
|
|
@@ -4809,6 +4809,22 @@ describe('Selector in a narrow row', () => {
|
|
|
4809
4809
|
expect(root.getAttribute('style')).toContain('80');
|
|
4810
4810
|
expect(getComputedStyle(root).minWidth).toBe('0');
|
|
4811
4811
|
});
|
|
4812
|
+
|
|
4813
|
+
it('lets a narrow list shrink an option so its label can ellipsize', () => {
|
|
4814
|
+
render(
|
|
4815
|
+
<Selector
|
|
4816
|
+
label="Project"
|
|
4817
|
+
options={['An option with a deliberately long readable label']}
|
|
4818
|
+
value={undefined}
|
|
4819
|
+
onChange={() => {}}
|
|
4820
|
+
isDefaultOpen
|
|
4821
|
+
/>,
|
|
4822
|
+
);
|
|
4823
|
+
const option = screen
|
|
4824
|
+
.getByRole('option', {hidden: true})
|
|
4825
|
+
.querySelector('.astryx-selector-option')!;
|
|
4826
|
+
expect(getComputedStyle(option).minWidth).toBe('0');
|
|
4827
|
+
});
|
|
4812
4828
|
});
|
|
4813
4829
|
|
|
4814
4830
|
describe('Selector and option actions (not adopted)', () => {
|
|
@@ -22,6 +22,10 @@ const embeddedStyles = stylex.create({
|
|
|
22
22
|
paddingBlock: 0,
|
|
23
23
|
paddingInline: 0,
|
|
24
24
|
borderRadius: 0,
|
|
25
|
+
// The host row lays this out as a flex item, whose automatic minimum
|
|
26
|
+
// size is the full label width. Without the reset a long label runs
|
|
27
|
+
// past a narrow popover and is clipped instead of ellipsizing.
|
|
28
|
+
minWidth: 0,
|
|
25
29
|
},
|
|
26
30
|
});
|
|
27
31
|
|
|
@@ -134,8 +134,8 @@ value-tooltip behavior; AR1 records the keyboard model and its one correction.
|
|
|
134
134
|
thumb as one composite control: every thumb is `role="slider"` with an
|
|
135
135
|
accessible name (a range names each thumb), `aria-valuemin`, `aria-valuemax`,
|
|
136
136
|
`aria-valuenow`, `aria-valuetext` when a formatter changes the spoken value,
|
|
137
|
-
`aria-orientation`, and `aria-disabled` when disabled;
|
|
138
|
-
|
|
137
|
+
`aria-orientation`, and `aria-disabled` when disabled; every thumb is a Tab
|
|
138
|
+
stop, enabled or disabled (`spec:AST-085`).
|
|
139
139
|
ArrowUp and ArrowDown step by `step`; on a horizontal track the horizontal
|
|
140
140
|
arrows follow the track's direction — ArrowRight increases and ArrowLeft
|
|
141
141
|
decreases under LTR, and under RTL ArrowLeft increases and ArrowRight
|
|
@@ -225,15 +225,15 @@ separately listed value tooltip retains Tooltip's target.
|
|
|
225
225
|
|
|
226
226
|
## Verification map
|
|
227
227
|
|
|
228
|
-
| Contract | Verification
|
|
229
|
-
| ------------------- |
|
|
230
|
-
| FR1 | `Slider.test.tsx` structure, range, and marks suites
|
|
231
|
-
| AR1 | Slider accessibility contract (`internal/a11y-spec`, pending) bound to Slider
|
|
232
|
-
| FR2 | `Slider.test.tsx`, `themingTargets.test.ts`, generated probe theme, and Chromium
|
|
233
|
-
| FR3 | Source and consumer-doc review
|
|
234
|
-
| FR4 | Source inspection; focused tests cover label, status, and disabled-reason Tooltip only
|
|
235
|
-
| FR5 | Pending: `Slider.test.tsx` change-end cases driven by an owner that renders, clamps, or rejects the emitted value (not yet in the suite)
|
|
236
|
-
| Theming anatomy map | `scripts/check-knowledge.mjs`
|
|
228
|
+
| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
|
|
229
|
+
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
|
|
230
|
+
| FR1 | `Slider.test.tsx` structure, range, and marks suites | Single, range, horizontal, vertical, marks | Removing or misaligning stable parts breaks existing role, position, or mark assertions. | `audit:Slider/anatomy` |
|
|
231
|
+
| AR1 | Slider accessibility contract (`internal/a11y-spec`, pending) bound to Slider; disabled-thumb Tab stop pending conformance; in jsdom and Chromium; `Slider.test.tsx` keyboard suites, including "follows the mirrored track under RTL: ArrowLeft increases, ArrowRight decreases, Up/Down unchanged" and "keeps ArrowLeft decreasing on a vertical track under RTL"; the Page, Home/End and Up/Down cases under the contract | Single and range; horizontal LTR and RTL; vertical; disabled; formatted value | A thumb loses its role, name or value properties; an arrow, Page, Home or End key stops stepping or steps against the mirrored track; a range thumb crosses the other | `audit:Slider/accessibility` |
|
|
232
|
+
| FR2 | `Slider.test.tsx`, `themingTargets.test.ts`, generated probe theme, and Chromium | Root, horizontal/vertical control, disabled control, track, and thumb | A target class/state is missing, undocumented, or placed outside its owning anatomy. | `audit:Slider/theming` |
|
|
233
|
+
| FR3 | Source and consumer-doc review | Filled range, marks, labels, adjacent text value | A missing target is inaccurately documented as present or intentionally permanent. | `audit:Slider/theming` |
|
|
234
|
+
| FR4 | Source inspection; focused tests cover label, status, and disabled-reason Tooltip only | Label, status, value tooltip, disabled reason | Shared composition or its accessible association disappears; value-tooltip composition still lacks focused coverage. | `audit:Slider/anatomy` |
|
|
235
|
+
| FR5 | Pending: `Slider.test.tsx` change-end cases driven by an owner that renders, clamps, or rejects the emitted value (not yet in the suite) | Single and range; pointer release before and after the owner re-renders; each keyboard step | `onChangeEnd` reports a value the owner did not render, fires more than once per interaction, or skips a completed keyboard step | `audit:Slider/accessibility` |
|
|
236
|
+
| Theming anatomy map | `scripts/check-knowledge.mjs` | Canonical anatomy and four current local targets | Missing, extra, prefixed, stale, or unclaimed mappings fail repository validation. | `audit:Slider/theming` |
|
|
237
237
|
|
|
238
238
|
The focused Slider suite asserts the `slider-control` target's orientation and
|
|
239
239
|
disabled state. Source/metadata guards cover all four target declarations. The
|
package/src/Table/Table.spec.md
CHANGED