@astryxdesign/core 0.7.1 → 0.7.2-canary.01eab6a
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/AspectRatio/AspectRatio.d.ts +6 -8
- package/dist/AspectRatio/AspectRatio.d.ts.map +1 -1
- package/dist/AspectRatio/AspectRatio.js +44 -3
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +5 -2
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +38 -14
- package/dist/CheckboxInput/CheckboxInput.d.ts +1 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +3 -1
- package/dist/CheckboxList/CheckboxListItem.d.ts +9 -1
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +4 -2
- package/dist/CommandPalette/CommandPaletteInput.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteInput.js +37 -5
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +5 -2
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +20 -8
- package/dist/Drawer/Drawer.d.ts +191 -0
- package/dist/Drawer/Drawer.d.ts.map +1 -0
- package/dist/Drawer/Drawer.js +382 -0
- package/dist/Drawer/DrawerHeader.d.ts +85 -0
- package/dist/Drawer/DrawerHeader.d.ts.map +1 -0
- package/dist/Drawer/DrawerHeader.js +134 -0
- package/dist/Drawer/index.d.ts +11 -0
- package/dist/Drawer/index.d.ts.map +1 -0
- package/dist/Drawer/index.js +11 -0
- package/dist/Drawer/useDrawerDialogPresence.d.ts +42 -0
- package/dist/Drawer/useDrawerDialogPresence.d.ts.map +1 -0
- package/dist/Drawer/useDrawerDialogPresence.js +236 -0
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +47 -4
- package/dist/DropdownMenu/DropdownMenuContext.d.ts +17 -0
- package/dist/DropdownMenu/DropdownMenuContext.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuContext.js +21 -0
- package/dist/DropdownMenu/DropdownMenuDivider.d.ts +5 -3
- package/dist/DropdownMenu/DropdownMenuDivider.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuDivider.js +7 -3
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +19 -8
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +4 -10
- package/dist/Field/Field.d.ts +1 -1
- package/dist/Field/Field.d.ts.map +1 -1
- package/dist/Field/Field.js +8 -4
- package/dist/Grid/GridSpan.d.ts.map +1 -1
- package/dist/Grid/GridSpan.js +1 -0
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +4 -2
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +10 -2
- package/dist/Item/Item.d.ts +6 -2
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +19 -4
- package/dist/Layer/layerViewportInset.stylex.d.ts +6 -2
- package/dist/Layer/layerViewportInset.stylex.d.ts.map +1 -1
- package/dist/Layer/layerViewportInset.stylex.js +6 -2
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +13 -7
- package/dist/Layer/useLayerDismissal.d.ts +1 -1
- package/dist/Layer/useLayerDismissal.js +1 -1
- package/dist/Layout/container.stylex.d.ts +5 -5
- package/dist/Layout/container.stylex.js +4 -4
- package/dist/List/List.d.ts +46 -19
- package/dist/List/List.d.ts.map +1 -1
- package/dist/List/List.js +28 -10
- package/dist/List/ListContext.d.ts +8 -3
- package/dist/List/ListContext.d.ts.map +1 -1
- package/dist/List/ListContext.js +7 -2
- package/dist/List/ListItem.d.ts +13 -5
- package/dist/List/ListItem.d.ts.map +1 -1
- package/dist/List/ListItem.js +21 -8
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.d.ts.map +1 -1
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +8 -1
- package/dist/Markdown/plugins/frontmatter.d.ts.map +1 -1
- package/dist/Markdown/plugins/frontmatter.js +7 -3
- package/dist/MetadataList/MetadataList.d.ts.map +1 -1
- package/dist/MetadataList/MetadataList.js +5 -1
- package/dist/MetadataList/MetadataListContext.d.ts +1 -1
- package/dist/MetadataList/MetadataListContext.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +22 -8
- package/dist/MultiSelector/OptionActions.a11y.chromium.spec.js +100 -2
- package/dist/MultiSelector/hooks.d.ts.map +1 -1
- package/dist/MultiSelector/hooks.js +3 -1
- package/dist/Pagination/Pagination.d.ts +8 -5
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +21 -8
- package/dist/Popover/Popover.js +2 -2
- package/dist/PowerSearch/PowerSearch.js +1 -1
- package/dist/RadioList/RadioList.d.ts +1 -1
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +6 -2
- package/dist/RadioList/RadioListItem.d.ts +9 -1
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +2 -0
- package/dist/Selector/hooks.d.ts.map +1 -1
- package/dist/Selector/hooks.js +6 -2
- package/dist/SideNav/SideNavItem.d.ts +8 -1
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +71 -9
- package/dist/Switch/Switch.d.ts +1 -1
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +13 -1
- package/dist/TabList/TabMenu.d.ts +2 -2
- package/dist/TabList/TabMenu.d.ts.map +1 -1
- package/dist/TabList/TabMenu.js +6 -3
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/Text/Text.js +4 -2
- package/dist/Text/useTruncation.d.ts +7 -5
- package/dist/Text/useTruncation.d.ts.map +1 -1
- package/dist/Text/useTruncation.js +16 -5
- package/dist/ToggleButton/ToggleButton.d.ts +3 -2
- package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButton.js +12 -1
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +11 -0
- package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenu.js +3 -3
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +3 -3
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +1 -0
- package/dist/TreeList/TreeListBranches.d.ts.map +1 -1
- package/dist/TreeList/TreeListBranches.js +2 -2
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +57 -9
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +26 -0
- package/dist/astryx.css +47 -13
- package/dist/hooks/useEntryAnimation.d.ts +2 -1
- package/dist/hooks/useEntryAnimation.d.ts.map +1 -1
- package/dist/hooks/useEntryAnimation.js +14 -12
- package/dist/hooks/useIsHydrating.d.ts +6 -0
- package/dist/hooks/useIsHydrating.d.ts.map +1 -0
- package/dist/hooks/useIsHydrating.js +30 -0
- package/dist/hooks/useMenuHover.d.ts.map +1 -1
- package/dist/hooks/useMenuHover.js +18 -13
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +112 -1
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +112 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +0 -3
- package/dist/utils/focusOutline.stylex.d.ts +4 -0
- package/dist/utils/focusOutline.stylex.d.ts.map +1 -1
- package/dist/utils/focusOutline.stylex.js +4 -0
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +15 -9
- package/dist/utils/sharedMutationObserver.d.ts +21 -0
- package/dist/utils/sharedMutationObserver.d.ts.map +1 -0
- package/dist/utils/sharedMutationObserver.js +69 -0
- package/locales/en.json +444 -0
- package/locales/pseudo.json +333 -0
- package/package.json +9 -4
- package/src/AspectRatio/AspectRatio.test.tsx +44 -43
- package/src/AspectRatio/AspectRatio.tsx +38 -18
- package/src/AspectRatio/__tests__/AspectRatioFitLayers.a11y.browser.spec.ts +157 -0
- package/src/Avatar/Avatar.doc.mjs +5 -3
- package/src/AvatarGroup/AvatarGroup.doc.mjs +3 -2
- package/src/Breadcrumbs/BreadcrumbItem.tsx +4 -1
- package/src/Breadcrumbs/Breadcrumbs.test.tsx +30 -1
- package/src/Button/Button.doc.mjs +2 -2
- package/src/Button/Button.test.tsx +155 -9
- package/src/Button/Button.tsx +39 -16
- package/src/Button/__tests__/Button.a11y.known-failures.ts +1 -62
- package/src/Button/__tests__/Button.a11y.states.ts +0 -10
- package/src/Chat/__tests__/ChatMessageMetadata.a11y.chromium.spec.ts +3 -1
- package/src/CheckboxInput/CheckboxInput.test.tsx +34 -0
- package/src/CheckboxInput/CheckboxInput.tsx +3 -1
- package/src/CheckboxList/CheckboxList.test.tsx +22 -0
- package/src/CheckboxList/CheckboxListItem.doc.mjs +16 -0
- package/src/CheckboxList/CheckboxListItem.tsx +10 -0
- package/src/CommandPalette/CommandPaletteInput.test.tsx +53 -4
- package/src/CommandPalette/CommandPaletteInput.tsx +33 -3
- package/src/CommandPalette/__tests__/CommandPaletteInputAudit.a11y.chromium.spec.ts +335 -0
- package/src/CommandPalette/__tests__/CommandPaletteItemAudit.a11y.chromium.spec.ts +292 -0
- package/src/ContextMenu/ContextMenu.doc.mjs +2 -3
- package/src/ContextMenu/ContextMenu.tsx +4 -1
- package/src/ContextMenu/__tests__/ContextMenuAudit.a11y.chromium.spec.ts +438 -0
- package/src/Dialog/Dialog.test.tsx +46 -0
- package/src/Dialog/Dialog.tsx +20 -7
- package/src/Dialog/__tests__/Dialog.a11y.known-failures.ts +0 -14
- package/src/Drawer/Drawer.doc.mjs +472 -0
- package/src/Drawer/Drawer.spec.md +357 -0
- package/src/Drawer/Drawer.test.tsx +1300 -0
- package/src/Drawer/Drawer.tsx +613 -0
- package/src/Drawer/DrawerDirection.test.tsx +127 -0
- package/src/Drawer/DrawerHeader.doc.mjs +293 -0
- package/src/Drawer/DrawerHeader.test.tsx +102 -0
- package/src/Drawer/DrawerHeader.tsx +235 -0
- package/src/Drawer/__tests__/DrawerAudit.a11y.chromium.spec.ts +401 -0
- package/src/Drawer/__tests__/DrawerHeaderAudit.a11y.chromium.spec.ts +297 -0
- package/src/Drawer/index.ts +13 -0
- package/src/Drawer/useDrawerDialogPresence.ts +284 -0
- package/src/DropdownMenu/DropdownMenu.test.tsx +62 -13
- package/src/DropdownMenu/DropdownMenu.tsx +47 -4
- package/src/DropdownMenu/DropdownMenuContext.tsx +24 -0
- package/src/DropdownMenu/DropdownMenuDivider.doc.mjs +2 -2
- package/src/DropdownMenu/DropdownMenuDivider.spec.md +192 -0
- package/src/DropdownMenu/DropdownMenuDivider.tsx +9 -5
- package/src/DropdownMenu/DropdownMenuSubMenu.test.tsx +185 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +19 -5
- package/src/DropdownMenu/__tests__/DropdownMenuDividerAudit.a11y.chromium.spec.ts +280 -0
- package/src/DropdownMenu/__tests__/Menu.a11y.chromium.spec.ts +145 -0
- package/src/DropdownMenu/__tests__/Menu.a11y.known-failures.ts +26 -0
- package/src/DropdownMenu/__tests__/Menu.a11y.renders.tsx +65 -0
- package/src/DropdownMenu/__tests__/Menu.a11y.states.ts +138 -0
- package/src/DropdownMenu/__tests__/Menu.a11y.test.tsx +136 -0
- package/src/EmptyState/EmptyState.doc.mjs +3 -2
- package/src/EmptyState/EmptyState.spec.md +189 -0
- package/src/EmptyState/EmptyState.test.tsx +74 -3
- package/src/EmptyState/EmptyState.tsx +4 -8
- package/src/Field/Field.doc.mjs +14 -8
- package/src/Field/Field.spec.md +217 -0
- package/src/Field/Field.test.tsx +60 -2
- package/src/Field/Field.tsx +17 -8
- package/src/Grid/GridSpan.tsx +3 -0
- package/src/Heading/Heading.test.tsx +57 -0
- package/src/Heading/Heading.tsx +6 -2
- package/src/HoverCard/HoverCard.test.tsx +58 -0
- package/src/HoverCard/useHoverCard.tsx +10 -2
- package/src/IconButton/IconButton.doc.mjs +2 -2
- package/src/IconButton/IconButton.test.tsx +3 -1
- package/src/Item/Item.doc.mjs +12 -8
- package/src/Item/Item.spec.md +226 -0
- package/src/Item/Item.test.tsx +61 -0
- package/src/Item/Item.tsx +40 -4
- package/src/Layer/layerViewportInset.source-build.test.mjs +90 -0
- package/src/Layer/layerViewportInset.stylex.ts +6 -2
- package/src/Layer/layerViewportInset.test.ts +1 -0
- package/src/Layer/useLayer.tsx +24 -13
- package/src/Layer/useLayerDismissal.ts +1 -1
- package/src/Layout/container.stylex.ts +6 -6
- package/src/List/List.doc.mjs +14 -1
- package/src/List/List.spec.md +129 -77
- package/src/List/List.test.tsx +163 -94
- package/src/List/List.tsx +74 -18
- package/src/List/ListContext.tsx +9 -3
- package/src/List/ListItem.doc.mjs +24 -5
- package/src/List/ListItem.tsx +56 -27
- package/src/List/index.ts +1 -1
- package/src/Markdown/Markdown.tsx +14 -1
- package/src/Markdown/plugins/frontmatter.test.tsx +25 -0
- package/src/Markdown/plugins/frontmatter.ts +7 -3
- package/src/MetadataList/MetadataList.doc.mjs +2 -2
- package/src/MetadataList/MetadataList.test.tsx +38 -0
- package/src/MetadataList/MetadataList.tsx +8 -1
- package/src/MetadataList/MetadataListContext.tsx +1 -1
- package/src/MultiSelector/MultiSelector.test.tsx +159 -0
- package/src/MultiSelector/MultiSelector.tsx +40 -7
- package/src/MultiSelector/OptionActions.a11y.chromium.spec.ts +112 -2
- package/src/MultiSelector/hooks.ts +3 -1
- package/src/MultiSelector/useMultiCombobox.doc.mjs +267 -0
- package/src/Pagination/Pagination.doc.mjs +7 -7
- package/src/Pagination/Pagination.spec.md +9 -9
- package/src/Pagination/Pagination.test.tsx +242 -0
- package/src/Pagination/Pagination.tsx +27 -11
- package/src/Popover/Popover.test.tsx +2 -2
- package/src/Popover/Popover.tsx +4 -4
- package/src/PowerSearch/PowerSearch.test.tsx +85 -0
- package/src/PowerSearch/PowerSearch.tsx +2 -2
- package/src/RadioList/RadioList.fr10.test.tsx +45 -2
- package/src/RadioList/RadioList.test.tsx +22 -0
- package/src/RadioList/RadioList.tsx +4 -1
- package/src/RadioList/RadioListItem.doc.mjs +16 -0
- package/src/RadioList/RadioListItem.tsx +10 -1
- package/src/Selector/hooks.ts +6 -2
- package/src/Selector/useCombobox.doc.mjs +237 -0
- package/src/SideNav/SideNav.test.tsx +179 -0
- package/src/SideNav/SideNavItem.doc.mjs +2 -2
- package/src/SideNav/SideNavItem.tsx +96 -17
- package/src/Slider/Slider.spec.md +39 -18
- package/src/Switch/Switch.test.tsx +49 -0
- package/src/Switch/Switch.tsx +11 -0
- package/src/TabList/TabList.spec.md +57 -44
- package/src/TabList/TabList.test.tsx +67 -0
- package/src/TabList/TabMenu.doc.mjs +4 -3
- package/src/TabList/TabMenu.tsx +7 -4
- package/src/Text/Text.test.tsx +57 -0
- package/src/Text/Text.tsx +6 -2
- package/src/Text/useTruncation.test.tsx +69 -0
- package/src/Text/useTruncation.ts +16 -5
- package/src/TimeInput/TimeInput.fr10.test.tsx +15 -0
- package/src/ToggleButton/ToggleButton.test.tsx +95 -0
- package/src/ToggleButton/ToggleButton.tsx +12 -1
- package/src/Tokenizer/Tokenizer.test.tsx +54 -1
- package/src/Tooltip/Tooltip.test.tsx +31 -0
- package/src/Tooltip/useTooltip.test.tsx +13 -0
- package/src/Tooltip/useTooltip.tsx +11 -0
- package/src/TopNav/TopNavMegaMenu.test.tsx +22 -0
- package/src/TopNav/TopNavMegaMenu.tsx +7 -3
- package/src/TopNav/TopNavMenu.test.tsx +19 -0
- package/src/TopNav/TopNavMenu.tsx +11 -3
- package/src/TreeList/TreeList.doc.mjs +1 -0
- package/src/TreeList/TreeList.spec.md +29 -17
- package/src/TreeList/TreeList.test.tsx +327 -6
- package/src/TreeList/TreeList.tsx +5 -1
- package/src/TreeList/TreeListBranches.tsx +6 -0
- package/src/TreeList/TreeListItem.tsx +88 -13
- package/src/Typeahead/BaseTypeahead.tsx +26 -0
- package/src/Typeahead/Typeahead.test.tsx +260 -2
- package/src/docPropLiterals.test.ts +36 -10
- package/src/hooks/useEntryAnimation.doc.mjs +4 -4
- package/src/hooks/useEntryAnimation.ssr.test.tsx +143 -0
- package/src/hooks/useEntryAnimation.ts +15 -16
- package/src/hooks/useIsHydrating.test.tsx +70 -0
- package/src/hooks/useIsHydrating.ts +31 -0
- package/src/hooks/useMenuHover.ts +18 -13
- package/src/i18n/InternationalizationProvider.doc.mjs +8 -0
- package/src/i18n/InternationalizationProvider.spec.md +252 -0
- package/src/i18n/__tests__/InternationalizationProvider.test.tsx +128 -0
- package/src/i18n/generated-locales/en.generated.ts +121 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +121 -0
- package/src/i18n/useTranslator.test.tsx +37 -0
- package/src/index.ts +1 -0
- package/src/reset.css +0 -29
- package/src/theme/derivedVarRegistry.test.ts +7 -3
- package/src/theme/derivedVarRegistry.ts +0 -3
- package/src/utils/focusOutline.stylex.ts +4 -0
- package/src/utils/plainDate.test.ts +37 -1
- package/src/utils/plainDate.ts +15 -5
- package/src/utils/sharedMutationObserver.test.ts +53 -0
- package/src/utils/sharedMutationObserver.ts +78 -0
|
@@ -34,13 +34,20 @@ an additive target for the interactive control surface.
|
|
|
34
34
|
|
|
35
35
|
## Compatibility and migration
|
|
36
36
|
|
|
37
|
-
- Released default preserved: `
|
|
37
|
+
- Released default preserved: `no` — FR5 changes the released `onChangeEnd`
|
|
38
|
+
payload; every other released default is unchanged
|
|
38
39
|
- Compatibility class: additive target and state reflection; default styling,
|
|
39
40
|
DOM semantics, and public props remain unchanged, and the one keyboard change
|
|
40
41
|
AR1 names — the horizontal arrows follow the track's direction under RTL —
|
|
41
42
|
ships as a behavior fix
|
|
43
|
+
- `onChangeEnd` payload (FR5): a new contract decision (`spec:AST-017/FR33`),
|
|
44
|
+
not a correction. Released victim: an owner that moves `value` only from
|
|
45
|
+
`onChangeEnd`, with no `onChange`, moves by keyboard today and does not under
|
|
46
|
+
FR5, so the change is breaking (`spec:AST-017/FR1`) and ships as
|
|
47
|
+
`[breaking]` in a declared minor (`spec:AST-017/FR31`).
|
|
42
48
|
- Controlled/uncontrolled behavior: unchanged; Slider remains controlled
|
|
43
|
-
- Migration decision:
|
|
49
|
+
- Migration decision: an owner that moves `value` only from `onChangeEnd`
|
|
50
|
+
moves it from `onChange` instead (FR5)
|
|
44
51
|
|
|
45
52
|
Consumer migration instructions belong in consumer docs and release notes.
|
|
46
53
|
|
|
@@ -64,18 +71,20 @@ Consumer migration instructions belong in consumer docs and release notes.
|
|
|
64
71
|
|
|
65
72
|
## Public concepts
|
|
66
73
|
|
|
67
|
-
The record adds one public theming target
|
|
68
|
-
|
|
74
|
+
The record adds one public theming target, names the keyboard model (AR1), and
|
|
75
|
+
states which value `onChangeEnd` carries (FR5) without adding or changing a
|
|
76
|
+
component prop or value domain. Consumer props,
|
|
69
77
|
modes, states, and usage remain documented in `Slider.doc.mjs`.
|
|
70
78
|
|
|
71
79
|
## Behavioral and layout contract
|
|
72
80
|
|
|
73
|
-
| ID | Candidate invariant
|
|
74
|
-
| --- |
|
|
75
|
-
| FR1 | The current render places a filled range, one or two thumbs, and optional tick marks over the background track.
|
|
76
|
-
| FR2 | `Slider`, `Interactive control`, `Track`, and `Thumb` carry the `slider`, `slider-control`, `slider-track`, and `slider-thumb` targets respectively.
|
|
77
|
-
| FR3 | Filled range, tick marks, mark labels, and adjacent text value display are stable rendered parts without their own current Slider target.
|
|
78
|
-
| FR4 | Label and status presentation continue to use Field and FieldStatus; value tooltips continue to use Tooltip.
|
|
81
|
+
| ID | Candidate invariant | Basis | Review state |
|
|
82
|
+
| --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | -------------------------------------------------- |
|
|
83
|
+
| FR1 | The current render places a filled range, one or two thumbs, and optional tick marks over the background track. | Current source, docs, and focused tests | Verified current behavior; no new behavior decided |
|
|
84
|
+
| FR2 | `Slider`, `Interactive control`, `Track`, and `Thumb` carry the `slider`, `slider-control`, `slider-track`, and `slider-thumb` targets respectively. | Current source, public docs, and DEC-1 | Approved additive target contract |
|
|
85
|
+
| FR3 | Filled range, tick marks, mark labels, and adjacent text value display are stable rendered parts without their own current Slider target. | Current source and public docs | Verified current asymmetry; not ratified as policy |
|
|
86
|
+
| FR4 | Label and status presentation continue to use Field and FieldStatus; value tooltips continue to use Tooltip. | Current source and focused tests | Verified composition boundary |
|
|
87
|
+
| FR5 | `onChangeEnd` fires once when an interaction ends — a pointer drag or track press is released or cancelled, or a keyboard step (arrow, Page, Home, End) completes — and carries the value the owner renders after its synchronous response to that interaction's `onChange` calls, including any clamp, snap, or rejection; it never carries a value Slider emitted that the owner did not render. A range reports both values the same way. | Maintainer decision (DEC-3) | Approved |
|
|
79
88
|
|
|
80
89
|
### Observed current target asymmetry
|
|
81
90
|
|
|
@@ -106,6 +115,8 @@ either component's remaining target shape.
|
|
|
106
115
|
|
|
107
116
|
- ORD1: an arrow or Page key result snaps to the nearest step, then clamps to
|
|
108
117
|
the bounds; Home and End go to `min` and `max` (AR1).
|
|
118
|
+
- ORD2: within one interaction, Slider calls `onChange`, the owner responds and
|
|
119
|
+
renders, then `onChangeEnd` reports the rendered value (FR5).
|
|
109
120
|
- The anatomy decision (DEC-1) introduces no value, snapping, geometry,
|
|
110
121
|
interaction, or styling precedence rule of its own.
|
|
111
122
|
|
|
@@ -214,14 +225,15 @@ separately listed value tooltip retains Tooltip's target.
|
|
|
214
225
|
|
|
215
226
|
## Verification map
|
|
216
227
|
|
|
217
|
-
| Contract | Verification | Representative states
|
|
218
|
-
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
219
|
-
| FR1 | `Slider.test.tsx` structure, range, and marks suites | Single, range, horizontal, vertical, marks
|
|
220
|
-
| AR1 | Slider accessibility contract (`internal/a11y-spec`, pending) bound to Slider, 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
|
|
221
|
-
| FR2 | `Slider.test.tsx`, `themingTargets.test.ts`, generated probe theme, and Chromium | Root, horizontal/vertical control, disabled control, track, and thumb
|
|
222
|
-
| FR3 | Source and consumer-doc review | Filled range, marks, labels, adjacent text value
|
|
223
|
-
| FR4 | Source inspection; focused tests cover label, status, and disabled-reason Tooltip only | Label, status, value tooltip, disabled reason
|
|
224
|
-
|
|
|
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, 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` |
|
|
225
237
|
|
|
226
238
|
The focused Slider suite asserts the `slider-control` target's orientation and
|
|
227
239
|
disabled state. Source/metadata guards cover all four target declarations. The
|
|
@@ -250,6 +262,15 @@ A thumb already plays the slider role as one composite control, so it carries th
|
|
|
250
262
|
|
|
251
263
|
Rejected: keeping ArrowRight as "increase" under RTL; a Tab stop or arrow model per range thumb that differs from the single thumb.
|
|
252
264
|
|
|
265
|
+
### DEC-3 — `onChangeEnd` reports the value the owner renders
|
|
266
|
+
|
|
267
|
+
**Reference:** `component:Slider/DEC-3`
|
|
268
|
+
**Decider:** `cixzhang`, `2026-10-16`
|
|
269
|
+
|
|
270
|
+
`onChangeEnd` marks the end of an interaction, so it reports what the slider shows when the interaction ends: the controlled value after the owner has answered `onChange`. An owner that clamps, snaps, or rejects a value therefore receives the value it kept, and the commit agrees with the thumb (FR5).
|
|
271
|
+
|
|
272
|
+
Rejected: reporting the last value Slider emitted through `onChange`.
|
|
273
|
+
|
|
253
274
|
## Open questions
|
|
254
275
|
|
|
255
276
|
- **OQ1 — After a joint ProgressBar and Slider family audit, should any shared
|
|
@@ -834,6 +834,55 @@ describe('Switch', () => {
|
|
|
834
834
|
expect(root).toHaveAttribute('id', 'switch-1');
|
|
835
835
|
expect(root).toHaveAttribute('aria-label', 'Toggle notifications');
|
|
836
836
|
});
|
|
837
|
+
|
|
838
|
+
it('composes a caller aria-describedby onto the switch control', () => {
|
|
839
|
+
const {container} = render(
|
|
840
|
+
<>
|
|
841
|
+
<p id="external-hint">Applies to every repository</p>
|
|
842
|
+
<Switch
|
|
843
|
+
label="Notifications"
|
|
844
|
+
description="Sends a daily digest"
|
|
845
|
+
value={false}
|
|
846
|
+
onChange={() => {}}
|
|
847
|
+
data-testid="my-switch"
|
|
848
|
+
aria-describedby="external-hint"
|
|
849
|
+
/>
|
|
850
|
+
</>,
|
|
851
|
+
);
|
|
852
|
+
const control = screen.getByRole('switch');
|
|
853
|
+
const description = screen.getByText('Sends a daily digest');
|
|
854
|
+
expect(control.getAttribute('aria-describedby')?.split(' ')).toEqual([
|
|
855
|
+
'external-hint',
|
|
856
|
+
description.id,
|
|
857
|
+
]);
|
|
858
|
+
expect(control).toHaveAccessibleDescription(
|
|
859
|
+
'Applies to every repository Sends a daily digest',
|
|
860
|
+
);
|
|
861
|
+
// The id reference lives on the control only, not on the field wrapper.
|
|
862
|
+
const root = container.querySelector('[data-testid="my-switch"]');
|
|
863
|
+
expect(root).not.toHaveAttribute('aria-describedby');
|
|
864
|
+
});
|
|
865
|
+
|
|
866
|
+
it('names the switch control from a caller aria-labelledby', () => {
|
|
867
|
+
const {container} = render(
|
|
868
|
+
<>
|
|
869
|
+
<span id="row-title">Release notes</span>
|
|
870
|
+
<Switch
|
|
871
|
+
label="Pin Release notes"
|
|
872
|
+
isLabelHidden
|
|
873
|
+
value={false}
|
|
874
|
+
onChange={() => {}}
|
|
875
|
+
data-testid="my-switch"
|
|
876
|
+
aria-labelledby="row-title"
|
|
877
|
+
/>
|
|
878
|
+
</>,
|
|
879
|
+
);
|
|
880
|
+
const control = screen.getByRole('switch', {name: 'Release notes'});
|
|
881
|
+
expect(control).toHaveAttribute('aria-labelledby', 'row-title');
|
|
882
|
+
// The id reference lives on the control only, not on the field wrapper.
|
|
883
|
+
const root = container.querySelector('[data-testid="my-switch"]');
|
|
884
|
+
expect(root).not.toHaveAttribute('aria-labelledby');
|
|
885
|
+
});
|
|
837
886
|
});
|
|
838
887
|
|
|
839
888
|
describe('pressed state', () => {
|
package/src/Switch/Switch.tsx
CHANGED
|
@@ -566,6 +566,8 @@ export function Switch({
|
|
|
566
566
|
className,
|
|
567
567
|
style,
|
|
568
568
|
ref,
|
|
569
|
+
'aria-describedby': ariaDescribedByProp,
|
|
570
|
+
'aria-labelledby': ariaLabelledByProp,
|
|
569
571
|
...rest
|
|
570
572
|
}: SwitchProps) {
|
|
571
573
|
const t = useTranslator();
|
|
@@ -610,7 +612,12 @@ export function Switch({
|
|
|
610
612
|
// Only include descriptionID when the element actually renders.
|
|
611
613
|
// FieldLabel renders the description (with descriptionID) even when the
|
|
612
614
|
// label is visually hidden — it's sr-only, so keep it linked.
|
|
615
|
+
// A consumer's own `aria-describedby` describes the control, so it comes
|
|
616
|
+
// first here rather than landing on the field wrapper via `...rest`.
|
|
613
617
|
const describedByParts: string[] = [];
|
|
618
|
+
if (ariaDescribedByProp) {
|
|
619
|
+
describedByParts.push(ariaDescribedByProp);
|
|
620
|
+
}
|
|
614
621
|
if (description) {
|
|
615
622
|
describedByParts.push(descriptionID);
|
|
616
623
|
}
|
|
@@ -658,6 +665,10 @@ export function Switch({
|
|
|
658
665
|
}}
|
|
659
666
|
onFocus={onFocus}
|
|
660
667
|
onBlur={onBlur}
|
|
668
|
+
// A caller's `aria-labelledby` names the control (a visible title
|
|
669
|
+
// elsewhere in the row, for example), so it reaches the input rather
|
|
670
|
+
// than the field wrapper via `...rest`.
|
|
671
|
+
aria-labelledby={ariaLabelledByProp}
|
|
661
672
|
aria-describedby={ariaDescribedBy}
|
|
662
673
|
aria-invalid={status?.type === 'error' ? true : undefined}
|
|
663
674
|
aria-busy={isBusy || undefined}
|
|
@@ -31,10 +31,10 @@ system_specs: [spec:AST-002/DEC-1, spec:AST-002/DEC-2, spec:AST-017/DEC-1]
|
|
|
31
31
|
|
|
32
32
|
| Area | Contract |
|
|
33
33
|
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
34
|
-
| Public contract | Canonicalize the existing
|
|
34
|
+
| Public contract | Canonicalize the existing mode as `edge?: 'padded' \| 'bleed'` (default `'padded'`) from the shared `edge` vocabulary; deprecate `isFullBleed` as an alias of `edge="bleed"` and remove it in the next minor release. |
|
|
35
35
|
| Behavior | Move first and last visible tab content toward the host content line, reaching it when the host inset is at least the edge-tab padding, while preserving tab interaction padding, focus-ring room, overflow controls, selection-indicator geometry, and the optional divider rail. |
|
|
36
36
|
| End-user impact | Edge tabs lose unnecessary extra inset where host geometry permits and remain fully interactive without clipped focus, selection, overflow, or divider treatment. |
|
|
37
|
-
| Builder impact | Existing `isFullBleed` callsites keep working during the deprecation window and migrate mechanically to `
|
|
37
|
+
| Builder impact | Existing `isFullBleed` callsites keep working during the deprecation window and migrate mechanically to `edge="bleed"`. |
|
|
38
38
|
| Compatibility/readiness | Current behavior is shipped; the canonical alias is additive, while removing the released legacy prop is a separately implemented breaking change in the next minor release. |
|
|
39
39
|
| Review checks | Reject a behavior change disguised as a rename, directional values without overflow/indicator proof, or early removal of the legacy prop. |
|
|
40
40
|
| Governing rules | `architecture:container-padding/INV9–INV11`; `spec:AST-002/DEC-1–DEC-2`; `spec:AST-017/DEC-1`. |
|
|
@@ -43,12 +43,13 @@ This table is a review projection; the body below is authoritative.
|
|
|
43
43
|
|
|
44
44
|
## Intent
|
|
45
45
|
|
|
46
|
-
TabList's current opt-in is edge
|
|
47
|
-
host inset, moves visible edge-tab content toward the surrounding content line,
|
|
46
|
+
TabList's current opt-in is the shared `bleed` edge treatment: it consumes the
|
|
47
|
+
full inherited host inset, moves visible edge-tab content toward the surrounding content line,
|
|
48
48
|
and retains Tab-owned interaction padding plus TabList-owned divider, overflow,
|
|
49
49
|
and indicator geometry. Content reaches the host line only when that inset is at
|
|
50
50
|
least the edge tab's own padding. The public `isFullBleed` name is misleading
|
|
51
|
-
because the strip
|
|
51
|
+
because the strip keeps a content line: it restores uncovered content inset
|
|
52
|
+
after the outer box expands, which `architecture:container-padding` names `bleed`.
|
|
52
53
|
|
|
53
54
|
## Compatibility and migration
|
|
54
55
|
|
|
@@ -61,21 +62,21 @@ because the strip restores uncovered content inset after the outer box expands.
|
|
|
61
62
|
|
|
62
63
|
During the compatibility window:
|
|
63
64
|
|
|
64
|
-
- `
|
|
65
|
-
- omitted `
|
|
65
|
+
- `edge="bleed"` is the canonical spelling, and omitted `edge` means `padded`;
|
|
66
|
+
- omitted `edge` plus `isFullBleed={true}` selects `bleed`;
|
|
66
67
|
- `isFullBleed` is deprecated and maintained examples use the canonical prop;
|
|
67
|
-
- if both props are supplied, explicit `
|
|
68
|
-
|
|
68
|
+
- if both props are supplied, explicit `edge` is canonical and the legacy
|
|
69
|
+
boolean cannot override it.
|
|
69
70
|
|
|
70
71
|
The removal release MUST include a `[breaking]` Changeset for
|
|
71
72
|
`@astryxdesign/core`, consumer release notes, and an `astryx upgrade` codemod that rewrites
|
|
72
|
-
`isFullBleed` to `
|
|
73
|
+
`isFullBleed` to `edge="bleed"`.
|
|
73
74
|
|
|
74
75
|
## Ownership boundary
|
|
75
76
|
|
|
76
77
|
**Owns**
|
|
77
78
|
|
|
78
|
-
- The TabList-wide edge
|
|
79
|
+
- The TabList-wide `bleed` edge treatment and its compatibility alias.
|
|
79
80
|
- The relationship between the outer TabList box, inner strip padding, edge tabs,
|
|
80
81
|
focus-ring room, overflow controls, and selection indicator.
|
|
81
82
|
- Which logical edges are supported by the public mode.
|
|
@@ -84,33 +85,34 @@ The removal release MUST include a `[breaking]` Changeset for
|
|
|
84
85
|
|
|
85
86
|
- Host padding publication, nesting, or overlay resets — owned by
|
|
86
87
|
`architecture:container-padding`.
|
|
87
|
-
- Button or List edge
|
|
88
|
-
-
|
|
88
|
+
- Button or List edge projections.
|
|
89
|
+
- The `flush` or `outset` values, or per-edge application, without separate
|
|
90
|
+
proof and owner approval.
|
|
89
91
|
- A change to navigation/tab semantics, selection state, keyboard behavior, or
|
|
90
92
|
overflow ownership.
|
|
91
93
|
|
|
92
94
|
## Public concepts
|
|
93
95
|
|
|
94
|
-
| Concept
|
|
95
|
-
|
|
|
96
|
-
| Edge
|
|
97
|
-
| Legacy alias
|
|
96
|
+
| Concept | Closed values or states | Meaning | Availability by variant/orientation/state | Default | Owner | Stability | Invalid-value behavior |
|
|
97
|
+
| -------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ------------------ | ------------------- | ------------------------------- | -------------------------------------------- |
|
|
98
|
+
| Edge treatment | omitted, `padded`, `bleed` | `bleed`: consume both inherited inline host insets and move edge-tab content toward the host lines while retaining local interaction and strip-owned geometry; `padded`: current default geometry | Navigation and tabs patterns across current layout/overflow states | omitted (`padded`) | `component:TabList` | accepted; canonical API pending | Other values are rejected by the public type |
|
|
99
|
+
| Legacy alias | omitted, `false`, `true` | Compatibility spelling for `padded` or `bleed` | Until the next minor release | omitted/`false` | `component:TabList` | deprecated | `true` maps to `bleed`; explicit `edge` wins |
|
|
98
100
|
|
|
99
101
|
## Behavioral and layout contract
|
|
100
102
|
|
|
101
|
-
| ID | Invariant
|
|
102
|
-
| --- |
|
|
103
|
-
| FR1 | The current opt-in MUST remain
|
|
104
|
-
| FR2 | Compensation MUST preserve Tab interaction padding, focus-ring room, overflow detection and controls, scroll access, selection-indicator geometry, and the optional divider rail's expanded inline span.
|
|
105
|
-
| FR3 | `
|
|
106
|
-
| FR4 | During the deprecation window, omitted `
|
|
107
|
-
| FR5 | `isFullBleed` MUST be removed in the next minor release only after maintained docs/examples use `
|
|
108
|
-
| FR6 | `
|
|
103
|
+
| ID | Invariant | Basis | Status |
|
|
104
|
+
| --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | -------------------------------------------------------- |
|
|
105
|
+
| FR1 | The current opt-in MUST remain the `bleed` treatment: the outer TabList box consumes the full inherited inline host inset and any `hasDivider` rail spans that expanded width; the inner strip restores `max(host inset - edge-tab padding, 0)` at each logical edge. Visible edge-tab content reaches the host line only when the host inset is at least the tab padding; otherwise it moves toward that line without crossing the host boundary. | Current source and `component:TabList/DEC-1` | Shipped behavior |
|
|
106
|
+
| FR2 | Compensation MUST preserve Tab interaction padding, focus-ring room, overflow detection and controls, scroll access, selection-indicator geometry, and the optional divider rail's expanded inline span. | Current source plus owner direction | Shipped behavior; expanded evidence required with rename |
|
|
107
|
+
| FR3 | `edge?: 'padded' \| 'bleed'` MUST become the canonical API, with `bleed` selecting FR1–FR2 geometry and `padded` the omitted default, without changing either. | `architecture:container-padding/INV10`; `component:TabList/DEC-1` | Accepted contract; implementation pending |
|
|
108
|
+
| FR4 | During the deprecation window, omitted `edge` plus `isFullBleed={true}` MUST produce the canonical `bleed` behavior. Explicit `edge` MUST remain authoritative when both props are supplied. | Compatibility decision | Accepted contract; implementation pending |
|
|
109
|
+
| FR5 | `isFullBleed` MUST be removed in the next minor release only after maintained docs/examples use `edge`, both paths have compatibility evidence, and the removal includes a `[breaking]` Changeset plus an `astryx upgrade` codemod for mechanical consumer migration. | `component:TabList/DEC-1`; `spec:AST-017/DEC-1` | Accepted contract; implementation pending |
|
|
110
|
+
| FR6 | `flush`, `outset`, and per-edge application MUST remain rejected until overflow, clipping, scroll-control, focus-ring, indicator, direction, and theme-padding evidence receives owner approval. | Shared edge vocabulary and TabList boundary | Accepted boundary |
|
|
109
111
|
|
|
110
112
|
### Allowed variation
|
|
111
113
|
|
|
112
114
|
- Layout, size, role, selected value, labels, tab content, and overflow mode may
|
|
113
|
-
vary while the same
|
|
115
|
+
vary while the same `bleed` meaning is preserved.
|
|
114
116
|
- The implementation may retain the current outer-box/inner-strip technique or
|
|
115
117
|
replace it with equivalent geometry that satisfies FR1–FR2.
|
|
116
118
|
- A host may be painted or bounded only where TabList's component-specific
|
|
@@ -118,20 +120,20 @@ The removal release MUST include a `[breaking]` Changeset for
|
|
|
118
120
|
|
|
119
121
|
### Representative states
|
|
120
122
|
|
|
121
|
-
| State
|
|
122
|
-
|
|
|
123
|
-
| Default/omitted
|
|
124
|
-
| Canonical
|
|
125
|
-
| Divider
|
|
126
|
-
| Legacy alias
|
|
127
|
-
| Overflowing strip
|
|
128
|
-
| Focused edge tab
|
|
123
|
+
| State | Required invariant | Allowed variation |
|
|
124
|
+
| ----------------- | ------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- |
|
|
125
|
+
| Default/omitted | Current TabList box, strip, and tab geometry are unchanged. | Any current layout, role, or overflow mode. |
|
|
126
|
+
| Canonical `bleed` | Outer box consumes each host inset; edge content reaches the host line only when that inset is at least the tab padding. | Host inset smaller than, equal to, or larger than edge-tab padding; asymmetric insets; LTR/RTL. |
|
|
127
|
+
| Divider | `hasDivider` rail spans the expanded outer inline width. | Fitting or overflowing strips. |
|
|
128
|
+
| Legacy alias | `isFullBleed={true}` matches canonical `bleed` geometry during the compatibility window. | The canonical prop may also be present. |
|
|
129
|
+
| Overflowing strip | Scroll access, edge fades, controls, and selected-tab reveal remain correct. | Start/end overflow independently. |
|
|
130
|
+
| Focused edge tab | The focus ring remains visible and local to the tab. | Keyboard or pointer focus. |
|
|
129
131
|
|
|
130
132
|
### Transformation and precedence order
|
|
131
133
|
|
|
132
|
-
- **ORD1 — Public input.** Resolve explicit `
|
|
133
|
-
`isFullBleed={true}` to `
|
|
134
|
-
|
|
134
|
+
- **ORD1 — Public input.** Resolve explicit `edge`; otherwise map
|
|
135
|
+
`isFullBleed={true}` to `bleed` during the compatibility window; otherwise use
|
|
136
|
+
`padded`.
|
|
135
137
|
- **ORD2 — Host geometry.** Read the matching inherited logical host insets, with
|
|
136
138
|
missing values falling back to zero.
|
|
137
139
|
- **ORD3 — Component geometry.** Resolve edge-tab padding and focus/indicator
|
|
@@ -145,10 +147,10 @@ The removal release MUST include a `[breaking]` Changeset for
|
|
|
145
147
|
|
|
146
148
|
## Accessibility contract
|
|
147
149
|
|
|
148
|
-
- **AR1 — Interaction remains stable.**
|
|
150
|
+
- **AR1 — Interaction remains stable.** The `bleed` treatment MUST NOT change the
|
|
149
151
|
tab/nav pattern, accessible names, selected state, keyboard movement, tab stop,
|
|
150
152
|
focus target, or controlled value behavior.
|
|
151
|
-
- **AR2 — Overflow remains reachable.**
|
|
153
|
+
- **AR2 — Overflow remains reachable.** `bleed` geometry MUST NOT clip or
|
|
152
154
|
hide a focus ring, selected indicator, visible tab content, or an overflow
|
|
153
155
|
control required to reach offscreen tabs.
|
|
154
156
|
|
|
@@ -162,8 +164,8 @@ The removal release MUST include a `[breaking]` Changeset for
|
|
|
162
164
|
|
|
163
165
|
## Family and system relationships
|
|
164
166
|
|
|
165
|
-
- `architecture:container-padding` owns host publication, the shared
|
|
166
|
-
|
|
167
|
+
- `architecture:container-padding` owns host publication, the shared `edge`
|
|
168
|
+
vocabulary, logical-edge semantics, and overlay reset.
|
|
167
169
|
- `architecture:public-component-api` and `spec:AST-002` own public API
|
|
168
170
|
admission; `spec:AST-017/DEC-1` owns the breaking classification and migration
|
|
169
171
|
evidence required when the released alias is removed.
|
|
@@ -189,9 +191,20 @@ TabList's current mode consumes the full inherited inline host inset, keeps an
|
|
|
189
191
|
optional divider across that expanded width, and restores only the portion of
|
|
190
192
|
content inset not already supplied by edge-tab padding. The user-facing intent is
|
|
191
193
|
therefore edge compensation, not a promise that tab content itself reaches an
|
|
192
|
-
outer edge.
|
|
193
|
-
|
|
194
|
-
|
|
194
|
+
outer edge. DEC-2 sets the canonical spelling; `isFullBleed` remains a
|
|
195
|
+
compatibility alias until its `[breaking]` next-minor removal, with the required
|
|
196
|
+
codemod and release evidence.
|
|
197
|
+
|
|
198
|
+
### DEC-2 — TabList spells its mode with the shared edge vocabulary
|
|
199
|
+
|
|
200
|
+
**Reference:** `component:TabList/DEC-2`
|
|
201
|
+
|
|
202
|
+
**Decider:** cixzhang, 2026-10-16
|
|
203
|
+
|
|
204
|
+
`architecture:container-padding` names TabList's geometry `bleed`: paint reaches
|
|
205
|
+
the host's padding edge and content stays on the host content line, or at the
|
|
206
|
+
edge tab's own padding when the host inset is smaller. `edge="bleed"` is the
|
|
207
|
+
canonical spelling, so TabList and List share one prop name and one value set.
|
|
195
208
|
|
|
196
209
|
## Open questions
|
|
197
210
|
|
|
@@ -783,6 +783,73 @@ describe('TabMenu', () => {
|
|
|
783
783
|
});
|
|
784
784
|
});
|
|
785
785
|
|
|
786
|
+
describe('TabMenu host attributes', () => {
|
|
787
|
+
const menuOptions = [
|
|
788
|
+
{value: 'analytics', label: 'Analytics'},
|
|
789
|
+
{value: 'reports', label: 'Reports'},
|
|
790
|
+
];
|
|
791
|
+
|
|
792
|
+
it('forwards host attributes to the trigger, not the popup', () => {
|
|
793
|
+
render(
|
|
794
|
+
<TabList value="home" onChange={() => {}}>
|
|
795
|
+
<Tab value="home" label="Home" />
|
|
796
|
+
<TabMenu
|
|
797
|
+
label="More"
|
|
798
|
+
options={menuOptions}
|
|
799
|
+
id="more-tabs"
|
|
800
|
+
aria-label="More views"
|
|
801
|
+
data-view="overflow"
|
|
802
|
+
/>
|
|
803
|
+
</TabList>,
|
|
804
|
+
);
|
|
805
|
+
|
|
806
|
+
const trigger = screen.getByRole('button', {name: 'More views'});
|
|
807
|
+
expect(trigger).toHaveAttribute('id', 'more-tabs');
|
|
808
|
+
expect(trigger).toHaveAttribute('data-view', 'overflow');
|
|
809
|
+
const menu = screen.getByRole('menu', {name: 'More', hidden: true});
|
|
810
|
+
expect(trigger).toHaveAttribute('aria-controls', menu.id);
|
|
811
|
+
});
|
|
812
|
+
|
|
813
|
+
it('runs drag-and-drop handlers on the trigger', () => {
|
|
814
|
+
const onDragOver = vi.fn();
|
|
815
|
+
const onDrop = vi.fn();
|
|
816
|
+
render(
|
|
817
|
+
<TabList value="home" onChange={() => {}}>
|
|
818
|
+
<Tab value="home" label="Home" />
|
|
819
|
+
<TabMenu
|
|
820
|
+
label="More"
|
|
821
|
+
options={menuOptions}
|
|
822
|
+
onDragOver={onDragOver}
|
|
823
|
+
onDrop={onDrop}
|
|
824
|
+
/>
|
|
825
|
+
</TabList>,
|
|
826
|
+
);
|
|
827
|
+
const trigger = screen.getByRole('button', {name: 'More'});
|
|
828
|
+
fireEvent.dragOver(trigger);
|
|
829
|
+
fireEvent.drop(trigger);
|
|
830
|
+
expect(onDragOver).toHaveBeenCalledTimes(1);
|
|
831
|
+
expect(onDrop).toHaveBeenCalledTimes(1);
|
|
832
|
+
expect(trigger).toHaveAttribute('aria-expanded', 'false');
|
|
833
|
+
});
|
|
834
|
+
|
|
835
|
+
it('onClick preserves the toggle', async () => {
|
|
836
|
+
const user = userEvent.setup();
|
|
837
|
+
const onClick = vi.fn((event: React.MouseEvent<HTMLButtonElement>) => {
|
|
838
|
+
event.preventDefault();
|
|
839
|
+
});
|
|
840
|
+
render(
|
|
841
|
+
<TabList value="home" onChange={() => {}}>
|
|
842
|
+
<Tab value="home" label="Home" />
|
|
843
|
+
<TabMenu label="More" options={menuOptions} onClick={onClick} />
|
|
844
|
+
</TabList>,
|
|
845
|
+
);
|
|
846
|
+
const trigger = screen.getByRole('button', {name: 'More'});
|
|
847
|
+
await user.click(trigger);
|
|
848
|
+
expect(onClick).toHaveBeenCalledTimes(1);
|
|
849
|
+
expect(trigger).toHaveAttribute('aria-expanded', 'true');
|
|
850
|
+
});
|
|
851
|
+
});
|
|
852
|
+
|
|
786
853
|
describe('TabMenu keyboard navigation (roving tabindex)', () => {
|
|
787
854
|
const menuOptions = [
|
|
788
855
|
{value: 'analytics', label: 'Analytics'},
|
|
@@ -7,7 +7,7 @@ export const docs = {
|
|
|
7
7
|
subComponentOf: 'TabList',
|
|
8
8
|
displayName: 'Tab Menu',
|
|
9
9
|
isHiddenFromOverview: true,
|
|
10
|
-
description: "Overflow menu trigger that opens a dropdown of additional tab options, showing the selected option's label as the trigger text.",
|
|
10
|
+
description: "Overflow menu trigger that opens a dropdown of additional tab options, showing the selected option's label as the trigger text. Host attributes and DOM event handlers (id, aria-*, data-*, drag and drop) reach the trigger button, not the popup or its options. The button keeps its role, tab stop, and menu disclosure attributes.",
|
|
11
11
|
// TabMenu requires TabList context; wrap it so the preview doesn't throw.
|
|
12
12
|
// The wrapper value matches none of the options, so the trigger shows its
|
|
13
13
|
// own label (the idle overflow state).
|
|
@@ -42,7 +42,7 @@ export const docsZh = {
|
|
|
42
42
|
name: 'TabMenu',
|
|
43
43
|
isHiddenFromOverview: true,
|
|
44
44
|
displayName: 'Tab Menu',
|
|
45
|
-
description: '
|
|
45
|
+
description: '溢出菜单触发器,打开包含额外标签选项的下拉菜单,将选中选项的标签显示为触发器文本。宿主属性和 DOM 事件处理器(id、aria-*、data-*、拖放)传递给触发按钮,而不是弹出菜单或选项。按钮保留自己的角色、Tab 停靠点及菜单展开属性。',
|
|
46
46
|
props: [
|
|
47
47
|
{
|
|
48
48
|
name: 'label',
|
|
@@ -63,7 +63,8 @@ export const docsDense = {
|
|
|
63
63
|
name: 'TabMenu',
|
|
64
64
|
isHiddenFromOverview: true,
|
|
65
65
|
displayName: 'Tab Menu',
|
|
66
|
-
description:
|
|
66
|
+
description:
|
|
67
|
+
"Overflow menu trigger; shows selected option's label. Host attributes/DOM handlers reach the trigger button, not the popup/options; role, tab stop and disclosure attributes stay owned.",
|
|
67
68
|
propDescriptions: {
|
|
68
69
|
label: 'Trigger text (when no option selected) + dropdown heading.',
|
|
69
70
|
options: 'Menu options array rendered in dropdown.',
|
package/src/TabList/TabMenu.tsx
CHANGED
|
@@ -37,7 +37,7 @@ import {useListFocus} from '../hooks/useListFocus';
|
|
|
37
37
|
import {useTabListContext} from './TabListContext';
|
|
38
38
|
import type {TabListSize} from './TabListContext';
|
|
39
39
|
import {tabScope} from './tab.markers.stylex';
|
|
40
|
-
import {mergeProps} from '../utils';
|
|
40
|
+
import {composeEventHandlers, mergeProps} from '../utils';
|
|
41
41
|
import {useMergedRefs} from '../hooks/useMergedRefs';
|
|
42
42
|
import type {BaseProps} from '../BaseProps';
|
|
43
43
|
import {themeProps} from '../utils/themeProps';
|
|
@@ -51,9 +51,9 @@ export interface TabMenuOption {
|
|
|
51
51
|
icon?: ReactNode | IconType;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
export interface TabMenuProps extends
|
|
54
|
+
export interface TabMenuProps extends Omit<
|
|
55
55
|
BaseProps<HTMLButtonElement>,
|
|
56
|
-
'
|
|
56
|
+
'role' | 'tabIndex' | 'aria-haspopup' | 'aria-expanded' | 'aria-controls'
|
|
57
57
|
> {
|
|
58
58
|
ref?: React.Ref<HTMLButtonElement>;
|
|
59
59
|
/**
|
|
@@ -263,6 +263,8 @@ export function TabMenu({
|
|
|
263
263
|
xstyle,
|
|
264
264
|
className,
|
|
265
265
|
style,
|
|
266
|
+
onClick,
|
|
267
|
+
...rest
|
|
266
268
|
}: TabMenuProps) {
|
|
267
269
|
const tabListCtx = useTabListContext();
|
|
268
270
|
const menuId = useId();
|
|
@@ -346,6 +348,7 @@ export function TabMenu({
|
|
|
346
348
|
return (
|
|
347
349
|
<>
|
|
348
350
|
<button
|
|
351
|
+
{...rest}
|
|
349
352
|
ref={setButtonRef}
|
|
350
353
|
type="button"
|
|
351
354
|
aria-haspopup="menu"
|
|
@@ -353,7 +356,7 @@ export function TabMenu({
|
|
|
353
356
|
aria-controls={menuId}
|
|
354
357
|
data-tab-menu=""
|
|
355
358
|
tabIndex={hasSelectedOption ? 0 : -1}
|
|
356
|
-
onClick={handleToggle}
|
|
359
|
+
onClick={composeEventHandlers(handleToggle, onClick)}
|
|
357
360
|
{...mergeProps(
|
|
358
361
|
themeProps('tab-menu'),
|
|
359
362
|
focusOutlineProps.focusVisible(
|