@astryxdesign/core 0.6.1 → 0.6.2-canary.176dfa6
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 +33 -0
- package/dist/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +3 -1
- package/dist/BottomSheet/BottomSheetPanel.d.ts +7 -5
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +56 -19
- package/dist/DateRangeInput/DateRangeInput.d.ts +3 -0
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +16 -9
- package/dist/Dialog/DialogHeader.d.ts +1 -1
- package/dist/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.js +10 -7
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +9 -3
- package/dist/Markdown/Markdown.d.ts +10 -2
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +58 -14
- package/dist/Markdown/index.d.ts +1 -1
- package/dist/Markdown/index.d.ts.map +1 -1
- package/dist/Markdown/parser.d.ts +126 -12
- package/dist/Markdown/parser.d.ts.map +1 -1
- package/dist/Markdown/parser.js +369 -34
- package/dist/Markdown/utils.d.ts +1 -1
- package/dist/Markdown/utils.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +46 -30
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +5 -2
- package/dist/Spinner/Spinner.d.ts +1 -1
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +23 -15
- package/dist/ToggleButton/ToggleButton.d.ts +2 -1
- package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButton.js +7 -1
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +15 -6
- package/dist/astryx.css +5 -2
- package/dist/hooks/scrollKeyboardDelegation.d.ts +3 -0
- package/dist/hooks/scrollKeyboardDelegation.d.ts.map +1 -0
- package/dist/hooks/scrollKeyboardDelegation.js +146 -0
- package/dist/hooks/useScrollableArea.d.ts +6 -2
- package/dist/hooks/useScrollableArea.d.ts.map +1 -1
- package/dist/hooks/useScrollableArea.js +17 -5
- package/locales/en.json +16 -0
- package/locales/pseudo.json +12 -0
- package/package.json +7 -5
- package/scripts/agent-doc-state.mjs +1 -1
- package/src/BottomSheet/BottomSheet.doc.mjs +8 -1
- package/src/BottomSheet/BottomSheet.spec.md +46 -20
- package/src/BottomSheet/BottomSheet.test.tsx +6 -3
- package/src/BottomSheet/BottomSheet.tsx +3 -1
- package/src/BottomSheet/BottomSheetKeyboard.test.tsx +195 -0
- package/src/BottomSheet/BottomSheetPanel.test.tsx +11 -1
- package/src/BottomSheet/BottomSheetPanel.tsx +49 -16
- package/src/BottomSheet/__tests__/BottomSheetKeyboard.a11y.browser.spec.ts +344 -0
- package/src/DateRangeInput/DateRangeInput.doc.mjs +35 -7
- package/src/DateRangeInput/DateRangeInput.spec.md +203 -0
- package/src/DateRangeInput/DateRangeInput.test.tsx +100 -4
- package/src/DateRangeInput/DateRangeInput.tsx +29 -20
- package/src/Dialog/Dialog.doc.mjs +3 -0
- package/src/Dialog/Dialog.spec.md +1 -1
- package/src/Dialog/DialogHeader.doc.mjs +38 -0
- package/src/Dialog/DialogHeader.test.tsx +49 -0
- package/src/Dialog/DialogHeader.tsx +23 -4
- package/src/Dialog/modules/DialogHeader.spec.md +152 -0
- package/src/FileInput/FileInput.doc.mjs +2 -0
- package/src/FileInput/FileInput.spec.md +199 -0
- package/src/FileInput/FileInput.test.tsx +14 -0
- package/src/FileInput/FileInput.tsx +13 -3
- package/src/Markdown/Markdown.doc.mjs +167 -42
- package/src/Markdown/Markdown.public.test.ts +157 -0
- package/src/Markdown/Markdown.spec.md +149 -70
- package/src/Markdown/Markdown.test.tsx +107 -3
- package/src/Markdown/Markdown.tsx +116 -35
- package/src/Markdown/incremental.test.ts +175 -7
- package/src/Markdown/index.ts +6 -0
- package/src/Markdown/parser.perf.test.ts +3 -1
- package/src/Markdown/parser.test.ts +122 -0
- package/src/Markdown/parser.ts +609 -81
- package/src/Markdown/utils.ts +6 -0
- package/src/PowerSearch/PowerSearchEditPopover.test.tsx +150 -1
- package/src/PowerSearch/PowerSearchEditPopover.tsx +51 -28
- package/src/ScrollableArea/modules/useScrollableArea.spec.md +50 -22
- package/src/Slider/Slider.doc.mjs +16 -0
- package/src/Slider/Slider.spec.md +61 -47
- package/src/Slider/Slider.test.tsx +18 -0
- package/src/Slider/Slider.tsx +12 -6
- package/src/Spinner/Spinner.doc.mjs +6 -3
- package/src/Spinner/Spinner.test.tsx +37 -0
- package/src/Spinner/Spinner.tsx +31 -14
- package/src/ToggleButton/ToggleButton.test.tsx +133 -0
- package/src/ToggleButton/ToggleButton.tsx +9 -2
- package/src/ToggleButton/__tests__/ToggleButton.a11y.chromium.spec.ts +209 -0
- package/src/Tokenizer/Tokenizer.spec.md +142 -75
- package/src/Typeahead/BaseTypeahead.spec.md +4 -3
- package/src/Typeahead/BaseTypeahead.tsx +15 -6
- package/src/Typeahead/Typeahead.test.tsx +53 -0
- package/src/hooks/scrollKeyboardDelegation.test.ts +155 -0
- package/src/hooks/scrollKeyboardDelegation.ts +233 -0
- package/src/hooks/useScrollableArea.doc.mjs +15 -3
- package/src/hooks/useScrollableArea.test.tsx +59 -1
- package/src/hooks/useScrollableArea.ts +34 -10
- package/src/theme/derivedVarRegistry.test.ts +6 -4
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file useScrollableArea.ts
|
|
7
|
-
* @input Logical scroll intent, keyboard
|
|
8
|
-
* @output Safe prop getters and stable per-axis effective scroll state
|
|
7
|
+
* @input Logical scroll intent, focus-time keyboard delegation, caller-owned viewport/content props
|
|
8
|
+
* @output Safe prop getters, native keyboard entry, and stable per-axis effective scroll state
|
|
9
9
|
* @position Canonical behavior core for ScrollableArea and structure-owning adopters
|
|
10
10
|
*
|
|
11
11
|
* SYNC: When modified, update:
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { useCallback, useMemo, useRef, useState } from 'react';
|
|
17
17
|
import * as stylex from '@stylexjs/stylex';
|
|
18
|
+
import { attachScrollKeyboardDelegation } from "./scrollKeyboardDelegation.js";
|
|
18
19
|
import { useIsomorphicLayoutEffect } from "./useIsomorphicLayoutEffect.js";
|
|
19
20
|
import { mergeProps } from "../utils/mergeProps.js";
|
|
20
21
|
import { mergeRefs } from "../utils/mergeRefs.js";
|
|
@@ -172,6 +173,9 @@ export function useScrollableArea({
|
|
|
172
173
|
viewport.addEventListener('animationend', scheduleMeasure);
|
|
173
174
|
content.addEventListener('transitionend', scheduleMeasure);
|
|
174
175
|
content.addEventListener('animationend', scheduleMeasure);
|
|
176
|
+
|
|
177
|
+
// Geometry invalidation is independent of keyboard eligibility. The latter
|
|
178
|
+
// is inspected only on native keyboard entry, never by these observers.
|
|
175
179
|
const mutationObserver = typeof MutationObserver === 'undefined' ? null : new MutationObserver(scheduleMeasure);
|
|
176
180
|
mutationObserver?.observe(viewport, {
|
|
177
181
|
attributes: true,
|
|
@@ -219,6 +223,13 @@ export function useScrollableArea({
|
|
|
219
223
|
inline: axisIsRequested(axis, 'inline') ? measured.inline : INACTIVE_AXIS_STATE,
|
|
220
224
|
block: axisIsRequested(axis, 'block') ? measured.block : INACTIVE_AXIS_STATE
|
|
221
225
|
}), [axis, measured]);
|
|
226
|
+
const hasEffectiveAxis = state.inline.isScrollable || state.block.isScrollable;
|
|
227
|
+
useIsomorphicLayoutEffect(() => {
|
|
228
|
+
if (keyboardAccess.owner !== 'contentOrViewport' || !hasEffectiveAxis || viewport == null || content == null) {
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
return attachScrollKeyboardDelegation(viewport, content);
|
|
232
|
+
}, [content, hasEffectiveAxis, keyboardAccess.owner, viewport]);
|
|
222
233
|
const getViewportProps = useCallback((props = {}) => {
|
|
223
234
|
const hasEffectiveAxis = state.inline.isScrollable || state.block.isScrollable;
|
|
224
235
|
const requestedX = axisIsRequested(axis, 'inline') && mapping.inline === 'x' || axisIsRequested(axis, 'block') && mapping.block === 'x';
|
|
@@ -237,7 +248,8 @@ export function useScrollableArea({
|
|
|
237
248
|
style: withoutOwnedOverflow(domProps.style)
|
|
238
249
|
};
|
|
239
250
|
const styledProps = mergeProps(callerProps, stylex.props(xstyle, styles.overflow(containsSticky ? scrollsOnX ? 'auto' : 'hidden' : 'clip', containsSticky ? scrollsOnY ? 'auto' : 'hidden' : 'clip')));
|
|
240
|
-
const
|
|
251
|
+
const viewportIsKeyboardOwner = keyboardAccess.owner !== 'content';
|
|
252
|
+
const keepsProgrammaticFocus = (!viewportIsKeyboardOwner || !hasEffectiveAxis) && viewport != null && typeof document !== 'undefined' && document.activeElement === viewport;
|
|
241
253
|
const behaviorStyle = {
|
|
242
254
|
...styledProps.style
|
|
243
255
|
};
|
|
@@ -251,10 +263,10 @@ export function useScrollableArea({
|
|
|
251
263
|
if (axisIsRequested(axis, 'block')) {
|
|
252
264
|
behaviorStyle[blockPhysical === 'x' ? 'overscrollBehaviorX' : 'overscrollBehaviorY'] = containBlock ? 'contain' : 'auto';
|
|
253
265
|
}
|
|
254
|
-
const keyboardProps = keyboardAccess.owner
|
|
266
|
+
const keyboardProps = keyboardAccess.owner !== 'content' ? {
|
|
255
267
|
role: keyboardAccess.role ?? 'group',
|
|
256
268
|
'aria-label': keyboardAccess.label,
|
|
257
|
-
tabIndex: hasEffectiveAxis ? 0 : keepsProgrammaticFocus ? -1 : undefined
|
|
269
|
+
tabIndex: viewportIsKeyboardOwner && hasEffectiveAxis ? 0 : keepsProgrammaticFocus ? -1 : undefined
|
|
258
270
|
} : {};
|
|
259
271
|
const result = {
|
|
260
272
|
...styledProps,
|
package/locales/en.json
CHANGED
|
@@ -447,6 +447,18 @@
|
|
|
447
447
|
"defaultMessage": "Next",
|
|
448
448
|
"description": "Screen-reader-only label on the right-arrow button in a Lightbox (navigates to next media item). Pairs with `lightbox.previous`."
|
|
449
449
|
},
|
|
450
|
+
"@astryx.chatTypingIndicator.one": {
|
|
451
|
+
"defaultMessage": "{name} is typing…",
|
|
452
|
+
"description": "Politely announced status naming the single person currently typing in a chat. `name` is a display name supplied by the app. Present-progressive form; the trailing ellipsis is the single … character."
|
|
453
|
+
},
|
|
454
|
+
"@astryx.chatTypingIndicator.many": {
|
|
455
|
+
"defaultMessage": "{names} are typing…",
|
|
456
|
+
"description": "Politely announced status when more than one person is typing in a chat. `names` is already joined for the locale by Intl.ListFormat, so translations must not add their own conjunction — place `{names}` where the joined list belongs."
|
|
457
|
+
},
|
|
458
|
+
"@astryx.chatTypingIndicator.others": {
|
|
459
|
+
"defaultMessage": "{count, number} {count, plural, one {other} other {others}}",
|
|
460
|
+
"description": "Overflow element for the chat typing status when three or more people type: the first name is shown and the rest collapse into this phrase, which is then joined to the name by Intl.ListFormat. Renders as the last list item, e.g. \"Ana and 2 others\"."
|
|
461
|
+
},
|
|
450
462
|
"@astryx.listInput.emptyTitle": {
|
|
451
463
|
"defaultMessage": "No {itemName}s yet",
|
|
452
464
|
"description": "EmptyState title shown inside a lab ListInput when its collection has no records. `{itemName}` is the consumer's singular noun for one record (e.g. \"guest\"); the source appends a literal \"s\" to pluralize it, which only works for regular English plurals. If your language cannot pluralize an interpolated noun this way, rephrase around `{itemName}` instead (e.g. \"No {itemName} added yet\")."
|
|
@@ -935,6 +947,10 @@
|
|
|
935
947
|
"defaultMessage": "Loading",
|
|
936
948
|
"description": "Screen-reader-only live-region announcement while a Button is in its loading state (spinner shown, action in flight). Progressive sense (\"work in progress\"), not a noun. Kept separate from `typeahead.loading` — translations may diverge."
|
|
937
949
|
},
|
|
950
|
+
"@astryx.spinner.loading": {
|
|
951
|
+
"defaultMessage": "Loading",
|
|
952
|
+
"description": "Screen-reader-only default name for a standalone Spinner's role=\"status\" element, used when the consumer supplies neither `aria-label` nor a visible string label. Present-progressive form. Kept separate from `button.loading` and `typeahead.loading` — translations may diverge."
|
|
953
|
+
},
|
|
938
954
|
"@astryx.chatComposerDrawer.expand": {
|
|
939
955
|
"defaultMessage": "Expand {label}",
|
|
940
956
|
"description": "Screen-reader-only label on the ChatComposerDrawer toggle when the drawer is collapsed. `{label}` is the drawer's visible name — example: `Expand Attachments`. Pairs with `collapse`."
|
package/locales/pseudo.json
CHANGED
|
@@ -335,6 +335,15 @@
|
|
|
335
335
|
"@astryx.lightbox.next": {
|
|
336
336
|
"defaultMessage": "⟦Ñéẋţ⟧"
|
|
337
337
|
},
|
|
338
|
+
"@astryx.chatTypingIndicator.one": {
|
|
339
|
+
"defaultMessage": "⟦{name} íš ţýþíñĝ…⟧"
|
|
340
|
+
},
|
|
341
|
+
"@astryx.chatTypingIndicator.many": {
|
|
342
|
+
"defaultMessage": "⟦{names} àřé ţýþíñĝ…⟧"
|
|
343
|
+
},
|
|
344
|
+
"@astryx.chatTypingIndicator.others": {
|
|
345
|
+
"defaultMessage": "⟦{count, number} {count, plural, one {other} other {others}}⟧"
|
|
346
|
+
},
|
|
338
347
|
"@astryx.listInput.emptyTitle": {
|
|
339
348
|
"defaultMessage": "⟦Ñó {itemName}š ýéţ⟧"
|
|
340
349
|
},
|
|
@@ -701,6 +710,9 @@
|
|
|
701
710
|
"@astryx.button.loading": {
|
|
702
711
|
"defaultMessage": "⟦Łóàðíñĝ⟧"
|
|
703
712
|
},
|
|
713
|
+
"@astryx.spinner.loading": {
|
|
714
|
+
"defaultMessage": "⟦Łóàðíñĝ⟧"
|
|
715
|
+
},
|
|
704
716
|
"@astryx.chatComposerDrawer.expand": {
|
|
705
717
|
"defaultMessage": "⟦Éẋþàñð {label}⟧"
|
|
706
718
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2-canary.176dfa6",
|
|
4
4
|
"displayName": "Astryx Core",
|
|
5
5
|
"description": "The component library. Accessible, themeable React components with built-in spacing, dark mode, and StyleX styling.",
|
|
6
6
|
"author": "Meta Open Source",
|
|
@@ -672,16 +672,18 @@
|
|
|
672
672
|
"react-dom": ">=19.0.0"
|
|
673
673
|
},
|
|
674
674
|
"devDependencies": {
|
|
675
|
-
"@
|
|
675
|
+
"@astryxdesign/a11y-spec": "0.6.2-canary.176dfa6",
|
|
676
|
+
"@astryxdesign/cli": "0.6.2-canary.176dfa6",
|
|
677
|
+
"@babel/cli": "^7.29.7",
|
|
676
678
|
"@babel/core": "^7.29.7",
|
|
677
|
-
"@babel/preset-react": "^
|
|
679
|
+
"@babel/preset-react": "^7.29.7",
|
|
678
680
|
"@babel/preset-typescript": "^7.29.7",
|
|
681
|
+
"@heroicons/react": "^2.2.0",
|
|
679
682
|
"@stylexjs/babel-plugin": "^0.19.0",
|
|
680
683
|
"@testing-library/dom": "^10.0.0",
|
|
681
684
|
"@testing-library/jest-dom": "^6.6.0",
|
|
682
685
|
"@testing-library/react": "^16.3.2",
|
|
683
|
-
"@
|
|
684
|
-
"@astryxdesign/cli": "0.6.1"
|
|
686
|
+
"@types/babel__core": "^7.20.5"
|
|
685
687
|
},
|
|
686
688
|
"dependencies": {
|
|
687
689
|
"intl-messageformat": "^11.2.9"
|
|
@@ -57,7 +57,7 @@ export const LEGACY_MARKER_END = '<!-- XDS:END -->';
|
|
|
57
57
|
* targets are user-chosen and not enumerable here.)
|
|
58
58
|
*/
|
|
59
59
|
export const AGENT_DOC_PATHS = [
|
|
60
|
-
AGENTS_MD, // Codex / ChatGPT / generic
|
|
60
|
+
AGENTS_MD, // Codex / ChatGPT / Muse / generic
|
|
61
61
|
CLAUDE_MD, // Claude Code (root)
|
|
62
62
|
CLAUDE_DIR_MD, // Claude Code (.claude/CLAUDE.md)
|
|
63
63
|
CURSOR_RULES, // Cursor
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @file BottomSheet.doc.mjs
|
|
5
|
+
* @input BottomSheet props, sheet anatomy, and focus-time keyboard scrolling behavior
|
|
6
|
+
* @output Consumer documentation and examples for BottomSheet
|
|
7
|
+
* @position CLI and rendered component documentation
|
|
8
|
+
*/
|
|
9
|
+
|
|
3
10
|
/** @type {import('@astryxdesign/cli/authoring').ComponentAnatomyElement[]} */
|
|
4
11
|
const anatomy = [
|
|
5
12
|
{
|
|
@@ -130,7 +137,7 @@ export const docs = {
|
|
|
130
137
|
name: 'children',
|
|
131
138
|
type: 'ReactNode',
|
|
132
139
|
description:
|
|
133
|
-
"Sheet content,
|
|
140
|
+
"Sheet content in a scrollable area. The named body is keyboard reachable while overflowing. Forward Tab entry may move directly to the first native link or button; input controls, composite widgets, and nested scroll areas retain the body stop. Shift+Tab from a delegated first child skips the body. Fitting content adds no body stop. The internal observed content box preserves block flow and percentage heights. If it includes a text-entry control that can bring up the mobile keyboard, use height='tall' and keep the sheet fully expanded while editing.",
|
|
134
141
|
required: true,
|
|
135
142
|
},
|
|
136
143
|
{
|
|
@@ -14,6 +14,9 @@ verified_by:
|
|
|
14
14
|
[
|
|
15
15
|
packages/core/src/BottomSheet/BottomSheet.test.tsx,
|
|
16
16
|
packages/core/src/BottomSheet/BottomSheetPanel.test.tsx,
|
|
17
|
+
packages/core/src/BottomSheet/BottomSheetKeyboard.test.tsx,
|
|
18
|
+
packages/core/src/BottomSheet/__tests__/BottomSheetKeyboard.a11y.browser.spec.ts,
|
|
19
|
+
apps/storybook/stories/BottomSheet.stories.tsx,
|
|
17
20
|
scripts/check-knowledge.mjs,
|
|
18
21
|
]
|
|
19
22
|
modules: []
|
|
@@ -22,7 +25,7 @@ design_specs: []
|
|
|
22
25
|
architecture:
|
|
23
26
|
[architecture:component-theming-surface, architecture:layer-runtime]
|
|
24
27
|
contributing: []
|
|
25
|
-
system_specs: []
|
|
28
|
+
system_specs: [spec:AST-025]
|
|
26
29
|
---
|
|
27
30
|
|
|
28
31
|
# BottomSheet component contract
|
|
@@ -30,14 +33,15 @@ system_specs: []
|
|
|
30
33
|
## Intent
|
|
31
34
|
|
|
32
35
|
BottomSheet presents caller-provided content in a panel that rises from the
|
|
33
|
-
bottom edge. This draft records current consumer anatomy
|
|
34
|
-
|
|
36
|
+
bottom edge. This draft records current consumer anatomy, keyboard-reachable
|
|
37
|
+
scrolling, and theming reachability without changing public API.
|
|
35
38
|
|
|
36
39
|
## Compatibility and migration
|
|
37
40
|
|
|
38
41
|
- Released default preserved: `yes`
|
|
39
|
-
- Compatibility class: additive
|
|
40
|
-
targets, and
|
|
42
|
+
- Compatibility class: additive internal content box and shared scroll behavior;
|
|
43
|
+
public props, defaults, targets, and caller child ordering inside the content box
|
|
44
|
+
remain unchanged
|
|
41
45
|
- Controlled/uncontrolled behavior: unchanged
|
|
42
46
|
- Migration decision: none
|
|
43
47
|
|
|
@@ -48,7 +52,8 @@ Consumer migration instructions belong in consumer docs and release notes.
|
|
|
48
52
|
**Owns**
|
|
49
53
|
|
|
50
54
|
- The visual Sheet panel and its current `bottom-sheet` target.
|
|
51
|
-
- The scrolling Content area
|
|
55
|
+
- The scrolling Content area, its shared viewport/content-box integration, and
|
|
56
|
+
automatic keyboard-path selection.
|
|
52
57
|
- Standalone sheet presentation, including its optional native-dialog Scrim.
|
|
53
58
|
|
|
54
59
|
**Does not own / non-goals**
|
|
@@ -67,10 +72,11 @@ in `BottomSheet.doc.mjs`.
|
|
|
67
72
|
|
|
68
73
|
## Behavioral and layout contract
|
|
69
74
|
|
|
70
|
-
| ID | Candidate invariant
|
|
71
|
-
| --- |
|
|
72
|
-
| FR1 | The current presented sheet contains one Sheet panel, one scrolling Content area, and one decorative Handle; a Scrim is present only in scrim-backed presentation.
|
|
73
|
-
| FR2 | The Sheet panel carries `bottom-sheet`; Content area, Handle, and Scrim carry no BottomSheet public target.
|
|
75
|
+
| ID | Candidate invariant | Basis | Draft review state |
|
|
76
|
+
| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | -------------------------------------------------- |
|
|
77
|
+
| FR1 | The current presented sheet contains one Sheet panel, one scrolling Content area, and one decorative Handle; a Scrim is present only in scrim-backed presentation. | Current source, docs, and tests | Verified current behavior; no new behavior decided |
|
|
78
|
+
| FR2 | The Sheet panel carries `bottom-sheet`; Content area, Handle, and Scrim carry no BottomSheet public target. | Current source, docs, and tests | Verified current behavior; no target change |
|
|
79
|
+
| FR3 | Content renders in one real observed content box. Effective overflow, containment, and keyboard access come from `useScrollableArea`; the named overflowing body delegates forward Tab entry to a safe first sequential native link/button. | `spec:AST-025`; issue #5207; tests | Focus-time prototype for owner review |
|
|
74
80
|
|
|
75
81
|
### Allowed variation
|
|
76
82
|
|
|
@@ -96,8 +102,14 @@ in `BottomSheet.doc.mjs`.
|
|
|
96
102
|
|
|
97
103
|
## Accessibility contract
|
|
98
104
|
|
|
99
|
-
|
|
100
|
-
|
|
105
|
+
- **AR1 — Keyboard scroll path.** The named body is a tab stop while effectively
|
|
106
|
+
overflowing. On forward Tab entry, the shared hook may delegate to the first
|
|
107
|
+
sequential native link/button outside navigation-key-owning surfaces. It keeps
|
|
108
|
+
the body stop for excluded content and skips the body on reverse traversal
|
|
109
|
+
from the delegated first child.
|
|
110
|
+
- **AR2 — Focus continuity.** Content, overflow, or eligibility changes MUST NOT
|
|
111
|
+
move focus. Pointer/programmatic body focus never delegates. A focused body
|
|
112
|
+
losing overflow remains programmatically focusable.
|
|
101
113
|
|
|
102
114
|
## Design relationships
|
|
103
115
|
|
|
@@ -143,18 +155,20 @@ a decision that they must remain unthemeable.
|
|
|
143
155
|
mapping, and factual `none` dispositions.
|
|
144
156
|
- `architecture:layer-runtime` owns the current native-dialog host distinction
|
|
145
157
|
and records that sheets retain local scrim and swipe behavior.
|
|
158
|
+
- `spec:AST-025` owns effective scroll measurement, overflow and containment,
|
|
159
|
+
automatic keyboard-owner selection, and focus continuity.
|
|
146
160
|
- `family:overlay-dismissal` owns shared Escape and platform-close ordering and
|
|
147
161
|
records BottomSheet's current local-only adoption gap. This anatomy backfill
|
|
148
162
|
does not migrate that runtime behavior.
|
|
149
163
|
|
|
150
164
|
## Verification map
|
|
151
165
|
|
|
152
|
-
| Contract | Verification
|
|
153
|
-
| ------------------- |
|
|
154
|
-
| FR1 | `BottomSheet.test.tsx` render, content, Handle, and scrim behavior suites
|
|
155
|
-
| FR2 | Panel target assertion, source inspection, and theming target inventories
|
|
156
|
-
| Layout evidence
|
|
157
|
-
| Theming anatomy map | `scripts/check-knowledge.mjs`
|
|
166
|
+
| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
|
|
167
|
+
| ------------------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- | --------------------------------- |
|
|
168
|
+
| FR1 | `BottomSheet.test.tsx` render, content, Handle, and scrim behavior suites | Modal, non-modal, and switcher presentations | Removing a documented part fails existing content, structure, or dismissal assertions. | `audit:BottomSheet/anatomy` |
|
|
169
|
+
| FR2 | Panel target assertion, source inspection, and theming target inventories | Sheet panel, Content area, Handle, and Scrim | Removing the panel target or documenting an unshipped child target fails evidence or inventory. | `audit:BottomSheet/theming` |
|
|
170
|
+
| FR3, AR1–AR2 | `BottomSheetKeyboard.test.tsx`; `BottomSheetKeyboard.a11y.browser.spec.ts`; open Storybook stories | fitting/overflow, plain text, usable/unusable/dynamic descendants, focus | Missing/duplicate keyboard access, stale ownership, focus movement, or broken content-box layout fails. | `audit:BottomSheet/accessibility` | | Layout evidence | `BottomSheetPanel.test.tsx` | Floating Handle and scrolling Content area | Reordering or merging the stable parts fails existing panel structure and style assertions. | `audit:BottomSheet/anatomy` |
|
|
171
|
+
| Theming anatomy map | `scripts/check-knowledge.mjs` | Canonical anatomy and current target inventory | Missing, extra, prefixed, stale, or multiply assigned mappings fail repository validation. | `audit:BottomSheet/theming` |
|
|
158
172
|
|
|
159
173
|
Existing tests directly assert the Sheet panel target, Content area placement,
|
|
160
174
|
Handle structure, and scrim behavior. Source and public target metadata confirm
|
|
@@ -162,8 +176,20 @@ that the other three parts have no public target.
|
|
|
162
176
|
|
|
163
177
|
## Decision log
|
|
164
178
|
|
|
165
|
-
|
|
166
|
-
|
|
179
|
+
### DEC-1 — BottomSheet adopts automatic shared keyboard ownership
|
|
180
|
+
|
|
181
|
+
**Reference:** `component:BottomSheet/DEC-1`
|
|
182
|
+
**Decider:** cixzhang, 2026-09-13
|
|
183
|
+
|
|
184
|
+
BottomSheet supplies its existing label to
|
|
185
|
+
`keyboardAccess.owner="contentOrViewport"`. The shared hook keeps the overflowing
|
|
186
|
+
body named and tabbable, delegating forward keyboard entry to a safe first native
|
|
187
|
+
link/button. Pointer/programmatic focus and excluded content keep the body path. BottomSheet retains `stickyContainment="always"` because the
|
|
188
|
+
body deliberately remains the sheet-local Sticky boundary.
|
|
189
|
+
|
|
190
|
+
A real flow-root content box supplies the hook's observation seam while preserving
|
|
191
|
+
representative margin, float, percentage-height, flex/grid-child, and hug-height
|
|
192
|
+
behavior.
|
|
167
193
|
|
|
168
194
|
## Open questions
|
|
169
195
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* @file BottomSheet.test.tsx
|
|
5
5
|
* @input Uses vitest, @testing-library/react, BottomSheet component
|
|
6
|
-
* @output Unit tests for BottomSheet
|
|
6
|
+
* @output Unit tests for BottomSheet behavior and observed content anatomy
|
|
7
7
|
* @position Core testing; validates BottomSheet.tsx implementation
|
|
8
8
|
*
|
|
9
9
|
* SYNC: When BottomSheet.tsx changes, update tests to match new behavior
|
|
@@ -290,7 +290,7 @@ describe('BottomSheet', () => {
|
|
|
290
290
|
expect(onClick).toHaveBeenCalledTimes(1);
|
|
291
291
|
});
|
|
292
292
|
|
|
293
|
-
it('keeps consumer content
|
|
293
|
+
it('keeps consumer content first and last inside the observed content box', () => {
|
|
294
294
|
render(
|
|
295
295
|
<BottomSheet isOpen onOpenChange={() => {}} label="Filters">
|
|
296
296
|
<div data-testid="consumer-content">Sheet content</div>
|
|
@@ -300,7 +300,10 @@ describe('BottomSheet', () => {
|
|
|
300
300
|
const consumer = screen.getByTestId('consumer-content');
|
|
301
301
|
|
|
302
302
|
expect(body.children).toHaveLength(1);
|
|
303
|
-
|
|
303
|
+
const content = body.lastElementChild;
|
|
304
|
+
expect(content).toHaveAttribute('data-scroll-content');
|
|
305
|
+
expect(content?.lastElementChild).toBe(consumer);
|
|
306
|
+
expect(consumer.matches(':first-child')).toBe(true);
|
|
304
307
|
expect(consumer.matches(':last-child')).toBe(true);
|
|
305
308
|
});
|
|
306
309
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file BottomSheet.tsx
|
|
7
|
-
* @input Uses React, StyleX, core hooks/utils, BottomSheetPanel, BottomSheetSwitcherContext
|
|
7
|
+
* @input Uses React, StyleX, core hooks/utils, named BottomSheetPanel, BottomSheetSwitcherContext
|
|
8
8
|
* @output Exports BottomSheet component and BottomSheetProps
|
|
9
9
|
* @position Public BottomSheet router plus private standalone/switcher hosts
|
|
10
10
|
*
|
|
@@ -379,6 +379,7 @@ function StandaloneBottomSheet({
|
|
|
379
379
|
ref={ref}
|
|
380
380
|
state={panelState}
|
|
381
381
|
height={height}
|
|
382
|
+
label={label}
|
|
382
383
|
snapPoints={snapPoints}
|
|
383
384
|
isSwipeDismissAllowed={purpose === 'info'}
|
|
384
385
|
isPageScrollLocked={shouldPresent && hasScrim}
|
|
@@ -537,6 +538,7 @@ function SwitcherBottomSheetItem({
|
|
|
537
538
|
ref={ref}
|
|
538
539
|
state={panelState}
|
|
539
540
|
height={height}
|
|
541
|
+
label={label}
|
|
540
542
|
snapPoints={snapPoints}
|
|
541
543
|
isSwipeDismissAllowed={purpose === 'info'}
|
|
542
544
|
isPageScrollLocked={hasScrim}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file BottomSheetKeyboard.test.tsx
|
|
5
|
+
* @input BottomSheetPanel, real shared scroll behavior, and explicit DOM geometry
|
|
6
|
+
* @output Regression coverage for viewport access, entry-time eligibility, and focus continuity
|
|
7
|
+
* @position BottomSheet integration tests; browser stories verify native key scrolling
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import {act, fireEvent, render, screen, waitFor} from '@testing-library/react';
|
|
11
|
+
import {useState, type ReactNode} from 'react';
|
|
12
|
+
import {afterEach, beforeEach, describe, expect, it, vi} from 'vitest';
|
|
13
|
+
import {BottomSheetPanel} from './BottomSheetPanel';
|
|
14
|
+
|
|
15
|
+
function Fixture({children}: {children: ReactNode}) {
|
|
16
|
+
return (
|
|
17
|
+
<BottomSheetPanel
|
|
18
|
+
label="Reading details"
|
|
19
|
+
state={{kind: 'open', entering: false}}
|
|
20
|
+
height="capped"
|
|
21
|
+
onDismiss={() => {}}
|
|
22
|
+
onScrimOpacity={() => {}}>
|
|
23
|
+
{children}
|
|
24
|
+
</BottomSheetPanel>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function body() {
|
|
29
|
+
return screen.getByRole('group', {name: 'Reading details'});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async function measure(scrollHeight: number, scrollWidth = 300) {
|
|
33
|
+
const viewport = body();
|
|
34
|
+
// jsdom does not resolve the shared hook's dynamic StyleX CSS variable.
|
|
35
|
+
viewport.style.overflowY = 'auto';
|
|
36
|
+
viewport.style.overflowX = 'auto';
|
|
37
|
+
for (const [key, value] of Object.entries({
|
|
38
|
+
clientHeight: 100,
|
|
39
|
+
clientWidth: 300,
|
|
40
|
+
scrollHeight,
|
|
41
|
+
scrollWidth,
|
|
42
|
+
})) {
|
|
43
|
+
Object.defineProperty(viewport, key, {configurable: true, value});
|
|
44
|
+
}
|
|
45
|
+
fireEvent(window, new Event('resize'));
|
|
46
|
+
await waitFor(() => {
|
|
47
|
+
expect(viewport.dataset.scrollableBlock === 'true').toBe(
|
|
48
|
+
scrollHeight > 101,
|
|
49
|
+
);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
beforeEach(() => {
|
|
54
|
+
// jsdom has no layout. Visibility-specific cases still use real computed
|
|
55
|
+
// style/hidden/inert checks; native layout is covered in Storybook.
|
|
56
|
+
vi.spyOn(HTMLElement.prototype, 'getClientRects').mockReturnValue([
|
|
57
|
+
new DOMRect(0, 0, 20, 20),
|
|
58
|
+
] as unknown as DOMRectList);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
afterEach(() => {
|
|
62
|
+
vi.restoreAllMocks();
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
describe('BottomSheet keyboard scrolling', () => {
|
|
66
|
+
it('adds a named body tab stop only while text-only content overflows', async () => {
|
|
67
|
+
render(<Fixture>Reading details body</Fixture>);
|
|
68
|
+
await measure(100);
|
|
69
|
+
expect(body()).not.toHaveAttribute('tabindex');
|
|
70
|
+
await measure(300);
|
|
71
|
+
expect(body()).toHaveAttribute('tabindex', '0');
|
|
72
|
+
expect(body()).toHaveStyle({overscrollBehaviorY: 'contain'});
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
it('preserves current body focus when overflow disappears', async () => {
|
|
76
|
+
render(<Fixture>Reading details body</Fixture>);
|
|
77
|
+
await measure(300);
|
|
78
|
+
act(() => body().focus());
|
|
79
|
+
await measure(100);
|
|
80
|
+
expect(body()).toHaveFocus();
|
|
81
|
+
expect(body()).toHaveAttribute('tabindex', '-1');
|
|
82
|
+
expect(body()).toHaveStyle({overscrollBehaviorY: 'auto'});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
it('retains keyboard access to content that overflows only horizontally', async () => {
|
|
86
|
+
render(<Fixture>Wide reading content</Fixture>);
|
|
87
|
+
await measure(100, 600);
|
|
88
|
+
await waitFor(() =>
|
|
89
|
+
expect(body()).toHaveAttribute('data-scrollable-inline', 'true'),
|
|
90
|
+
);
|
|
91
|
+
expect(body()).toHaveAttribute('tabindex', '0');
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
it('keeps the named viewport available alongside focusable content', async () => {
|
|
95
|
+
render(
|
|
96
|
+
<Fixture>
|
|
97
|
+
<button type="button">Continue reading</button>
|
|
98
|
+
</Fixture>,
|
|
99
|
+
);
|
|
100
|
+
await measure(300);
|
|
101
|
+
expect(body()).toHaveAttribute('tabindex', '0');
|
|
102
|
+
act(() => screen.getByRole('button').focus());
|
|
103
|
+
expect(screen.getByRole('button')).toHaveFocus();
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
it.each([
|
|
107
|
+
<button type="button" key="disabled" disabled>
|
|
108
|
+
Unavailable
|
|
109
|
+
</button>,
|
|
110
|
+
<button type="button" key="hidden" hidden>
|
|
111
|
+
Hidden
|
|
112
|
+
</button>,
|
|
113
|
+
<button type="button" key="negative" tabIndex={-2}>
|
|
114
|
+
Programmatic only
|
|
115
|
+
</button>,
|
|
116
|
+
<button type="button" key="visibility" style={{visibility: 'hidden'}}>
|
|
117
|
+
Hidden by CSS
|
|
118
|
+
</button>,
|
|
119
|
+
<div key="inert" inert>
|
|
120
|
+
<button type="button">Inert</button>
|
|
121
|
+
</div>,
|
|
122
|
+
<fieldset key="fieldset" disabled>
|
|
123
|
+
<button type="button">Disabled by fieldset</button>
|
|
124
|
+
</fieldset>,
|
|
125
|
+
])(
|
|
126
|
+
'ignores a descendant that cannot supply sequential keyboard access (%#)',
|
|
127
|
+
async child => {
|
|
128
|
+
render(<Fixture>{child}</Fixture>);
|
|
129
|
+
await measure(300);
|
|
130
|
+
expect(body()).toHaveAttribute('tabindex', '0');
|
|
131
|
+
},
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
it('does not move focus when a nested child changes', async () => {
|
|
135
|
+
let setHasControl: (value: boolean) => void = () => {};
|
|
136
|
+
function AsyncContent() {
|
|
137
|
+
const [hasControl, update] = useState(false);
|
|
138
|
+
setHasControl = update;
|
|
139
|
+
return hasControl ? (
|
|
140
|
+
<button type="button">Loaded action</button>
|
|
141
|
+
) : (
|
|
142
|
+
<p>Loading text</p>
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
render(
|
|
146
|
+
<Fixture>
|
|
147
|
+
<AsyncContent />
|
|
148
|
+
</Fixture>,
|
|
149
|
+
);
|
|
150
|
+
await measure(300);
|
|
151
|
+
act(() => body().focus());
|
|
152
|
+
act(() => setHasControl(true));
|
|
153
|
+
expect(body()).toHaveAttribute('tabindex', '0');
|
|
154
|
+
expect(body()).toHaveFocus();
|
|
155
|
+
act(() => setHasControl(false));
|
|
156
|
+
await waitFor(() => expect(body()).toHaveAttribute('tabindex', '0'));
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
it('retains the viewport when an existing descendant becomes disabled', async () => {
|
|
160
|
+
render(
|
|
161
|
+
<Fixture>
|
|
162
|
+
<button type="button">Continue reading</button>
|
|
163
|
+
</Fixture>,
|
|
164
|
+
);
|
|
165
|
+
await measure(300);
|
|
166
|
+
screen.getByRole('button').setAttribute('disabled', '');
|
|
167
|
+
await waitFor(() => expect(body()).toHaveAttribute('tabindex', '0'));
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
it.each(['content', 'ancestor'])(
|
|
171
|
+
'retains the viewport when %s data attributes change child visibility',
|
|
172
|
+
async target => {
|
|
173
|
+
const {container} = render(
|
|
174
|
+
<Fixture>
|
|
175
|
+
<style>
|
|
176
|
+
{'[data-actions="hidden"] button { visibility: hidden; }'}
|
|
177
|
+
</style>
|
|
178
|
+
<div data-testid="conditional-content">
|
|
179
|
+
<button type="button">Conditional action</button>
|
|
180
|
+
</div>
|
|
181
|
+
</Fixture>,
|
|
182
|
+
);
|
|
183
|
+
await measure(300);
|
|
184
|
+
expect(body()).toHaveAttribute('tabindex', '0');
|
|
185
|
+
const owner =
|
|
186
|
+
target === 'content'
|
|
187
|
+
? screen.getByTestId('conditional-content')
|
|
188
|
+
: container;
|
|
189
|
+
owner.setAttribute('data-actions', 'hidden');
|
|
190
|
+
await waitFor(() => expect(body()).toHaveAttribute('tabindex', '0'));
|
|
191
|
+
owner.removeAttribute('data-actions');
|
|
192
|
+
expect(body()).toHaveAttribute('tabindex', '0');
|
|
193
|
+
},
|
|
194
|
+
);
|
|
195
|
+
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* @file BottomSheetPanel.test.tsx
|
|
5
5
|
* @input Uses vitest, Testing Library, BottomSheetPanel
|
|
6
|
-
* @output Tests the shared sheet surface motion
|
|
6
|
+
* @output Tests the shared sheet surface motion and keyboard scroll contracts
|
|
7
7
|
* @position Internal presentation tests shared by standalone and switcher modes
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -50,6 +50,7 @@ function renderPanel(
|
|
|
50
50
|
) {
|
|
51
51
|
return render(
|
|
52
52
|
<BottomSheetPanel
|
|
53
|
+
label="Sheet details"
|
|
53
54
|
state={state}
|
|
54
55
|
height="hug"
|
|
55
56
|
style={panelTransitionStyle}
|
|
@@ -92,6 +93,7 @@ describe('BottomSheetPanel', () => {
|
|
|
92
93
|
const onMotionComplete = vi.fn();
|
|
93
94
|
const {rerender} = render(
|
|
94
95
|
<BottomSheetPanel
|
|
96
|
+
label="Sheet details"
|
|
95
97
|
state={{kind: 'retained', motion: 'covered', alignmentOffset: 0}}
|
|
96
98
|
height="hug"
|
|
97
99
|
style={panelTransitionStyle}
|
|
@@ -104,6 +106,7 @@ describe('BottomSheetPanel', () => {
|
|
|
104
106
|
|
|
105
107
|
rerender(
|
|
106
108
|
<BottomSheetPanel
|
|
109
|
+
label="Sheet details"
|
|
107
110
|
state={{kind: 'open', entering: true}}
|
|
108
111
|
height="hug"
|
|
109
112
|
style={panelTransitionStyle}
|
|
@@ -139,6 +142,7 @@ describe('BottomSheetPanel', () => {
|
|
|
139
142
|
|
|
140
143
|
rerender(
|
|
141
144
|
<BottomSheetPanel
|
|
145
|
+
label="Sheet details"
|
|
142
146
|
state={{kind: 'exiting'}}
|
|
143
147
|
height="hug"
|
|
144
148
|
style={panelTransitionStyle}
|
|
@@ -166,6 +170,7 @@ describe('BottomSheetPanel', () => {
|
|
|
166
170
|
const onMotionComplete = vi.fn();
|
|
167
171
|
render(
|
|
168
172
|
<BottomSheetPanel
|
|
173
|
+
label="Sheet details"
|
|
169
174
|
state={{kind: 'open', entering: true}}
|
|
170
175
|
height="hug"
|
|
171
176
|
onDismiss={() => {}}
|
|
@@ -184,6 +189,7 @@ describe('BottomSheetPanel', () => {
|
|
|
184
189
|
const onMotionComplete = vi.fn();
|
|
185
190
|
render(
|
|
186
191
|
<BottomSheetPanel
|
|
192
|
+
label="Sheet details"
|
|
187
193
|
state={{kind: 'open', entering: true}}
|
|
188
194
|
height="hug"
|
|
189
195
|
style={{
|
|
@@ -211,6 +217,7 @@ describe('BottomSheetPanel', () => {
|
|
|
211
217
|
const panelRef = vi.fn();
|
|
212
218
|
const {rerender, unmount} = render(
|
|
213
219
|
<BottomSheetPanel
|
|
220
|
+
label="Sheet details"
|
|
214
221
|
ref={panelRef}
|
|
215
222
|
state={{kind: 'open', entering: false}}
|
|
216
223
|
height="hug"
|
|
@@ -223,6 +230,7 @@ describe('BottomSheetPanel', () => {
|
|
|
223
230
|
expect(panelRef).toHaveBeenCalledTimes(1);
|
|
224
231
|
rerender(
|
|
225
232
|
<BottomSheetPanel
|
|
233
|
+
label="Sheet details"
|
|
226
234
|
ref={panelRef}
|
|
227
235
|
state={{kind: 'open', entering: false}}
|
|
228
236
|
height="hug"
|
|
@@ -361,6 +369,7 @@ describe('BottomSheetPanel', () => {
|
|
|
361
369
|
|
|
362
370
|
const {container: closing} = render(
|
|
363
371
|
<BottomSheetPanel
|
|
372
|
+
label="Sheet details"
|
|
364
373
|
state={{kind: 'exiting'}}
|
|
365
374
|
height="hug"
|
|
366
375
|
onDismiss={() => {}}
|
|
@@ -379,6 +388,7 @@ describe('BottomSheetPanel', () => {
|
|
|
379
388
|
|
|
380
389
|
const {container: resting} = render(
|
|
381
390
|
<BottomSheetPanel
|
|
391
|
+
label="Sheet details"
|
|
382
392
|
state={{kind: 'open', entering: false}}
|
|
383
393
|
height="hug"
|
|
384
394
|
onDismiss={() => {}}
|