@astryxdesign/core 0.7.1 → 0.7.2-canary.020e1fe

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.
Files changed (377) hide show
  1. package/dist/AppShell/AppShell.d.ts.map +1 -1
  2. package/dist/AppShell/AppShell.js +40 -1
  3. package/dist/AspectRatio/AspectRatio.d.ts +6 -8
  4. package/dist/AspectRatio/AspectRatio.d.ts.map +1 -1
  5. package/dist/AspectRatio/AspectRatio.js +44 -3
  6. package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
  7. package/dist/Breadcrumbs/BreadcrumbItem.js +5 -2
  8. package/dist/Button/Button.d.ts.map +1 -1
  9. package/dist/Button/Button.js +38 -14
  10. package/dist/CheckboxInput/CheckboxInput.d.ts +1 -1
  11. package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
  12. package/dist/CheckboxInput/CheckboxInput.js +3 -1
  13. package/dist/CheckboxList/CheckboxListItem.d.ts +9 -1
  14. package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
  15. package/dist/CheckboxList/CheckboxListItem.js +4 -2
  16. package/dist/CommandPalette/CommandPaletteInput.d.ts +1 -1
  17. package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
  18. package/dist/CommandPalette/CommandPaletteInput.js +37 -5
  19. package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
  20. package/dist/ContextMenu/ContextMenu.js +5 -2
  21. package/dist/Dialog/Dialog.d.ts.map +1 -1
  22. package/dist/Dialog/Dialog.js +20 -8
  23. package/dist/Drawer/Drawer.d.ts +191 -0
  24. package/dist/Drawer/Drawer.d.ts.map +1 -0
  25. package/dist/Drawer/Drawer.js +382 -0
  26. package/dist/Drawer/DrawerHeader.d.ts +85 -0
  27. package/dist/Drawer/DrawerHeader.d.ts.map +1 -0
  28. package/dist/Drawer/DrawerHeader.js +134 -0
  29. package/dist/Drawer/index.d.ts +11 -0
  30. package/dist/Drawer/index.d.ts.map +1 -0
  31. package/dist/Drawer/index.js +11 -0
  32. package/dist/Drawer/useDrawerDialogPresence.d.ts +42 -0
  33. package/dist/Drawer/useDrawerDialogPresence.d.ts.map +1 -0
  34. package/dist/Drawer/useDrawerDialogPresence.js +236 -0
  35. package/dist/DropdownMenu/DropdownMenu.d.ts +1 -1
  36. package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  37. package/dist/DropdownMenu/DropdownMenu.js +83 -11
  38. package/dist/DropdownMenu/DropdownMenuContext.d.ts +17 -0
  39. package/dist/DropdownMenu/DropdownMenuContext.d.ts.map +1 -1
  40. package/dist/DropdownMenu/DropdownMenuContext.js +21 -0
  41. package/dist/DropdownMenu/DropdownMenuDivider.d.ts +5 -3
  42. package/dist/DropdownMenu/DropdownMenuDivider.d.ts.map +1 -1
  43. package/dist/DropdownMenu/DropdownMenuDivider.js +7 -3
  44. package/dist/DropdownMenu/DropdownMenuGroup.d.ts +6 -4
  45. package/dist/DropdownMenu/DropdownMenuGroup.d.ts.map +1 -1
  46. package/dist/DropdownMenu/DropdownMenuGroup.js +4 -3
  47. package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
  48. package/dist/DropdownMenu/DropdownMenuSubMenu.js +19 -8
  49. package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts +24 -0
  50. package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts.map +1 -0
  51. package/dist/DropdownMenu/lazyMenuBottomSheet.js +46 -0
  52. package/dist/EmptyState/EmptyState.d.ts.map +1 -1
  53. package/dist/EmptyState/EmptyState.js +4 -10
  54. package/dist/Field/Field.d.ts +1 -1
  55. package/dist/Field/Field.d.ts.map +1 -1
  56. package/dist/Field/Field.js +8 -4
  57. package/dist/Grid/GridSpan.d.ts.map +1 -1
  58. package/dist/Grid/GridSpan.js +1 -0
  59. package/dist/Heading/Heading.d.ts.map +1 -1
  60. package/dist/Heading/Heading.js +4 -2
  61. package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
  62. package/dist/HoverCard/useHoverCard.js +10 -2
  63. package/dist/Item/Item.d.ts +6 -2
  64. package/dist/Item/Item.d.ts.map +1 -1
  65. package/dist/Item/Item.js +19 -4
  66. package/dist/Layer/layerViewportInset.stylex.d.ts +6 -2
  67. package/dist/Layer/layerViewportInset.stylex.d.ts.map +1 -1
  68. package/dist/Layer/layerViewportInset.stylex.js +6 -2
  69. package/dist/Layer/useLayer.d.ts.map +1 -1
  70. package/dist/Layer/useLayer.js +13 -7
  71. package/dist/Layer/useLayerDismissal.d.ts +1 -1
  72. package/dist/Layer/useLayerDismissal.js +1 -1
  73. package/dist/Layout/container.stylex.d.ts +5 -5
  74. package/dist/Layout/container.stylex.js +4 -4
  75. package/dist/List/List.d.ts +46 -19
  76. package/dist/List/List.d.ts.map +1 -1
  77. package/dist/List/List.js +28 -10
  78. package/dist/List/ListContext.d.ts +8 -3
  79. package/dist/List/ListContext.d.ts.map +1 -1
  80. package/dist/List/ListContext.js +7 -2
  81. package/dist/List/ListItem.d.ts +13 -5
  82. package/dist/List/ListItem.d.ts.map +1 -1
  83. package/dist/List/ListItem.js +21 -8
  84. package/dist/List/index.d.ts +1 -1
  85. package/dist/List/index.d.ts.map +1 -1
  86. package/dist/Markdown/Markdown.d.ts.map +1 -1
  87. package/dist/Markdown/Markdown.js +8 -1
  88. package/dist/Markdown/plugins/frontmatter.d.ts.map +1 -1
  89. package/dist/Markdown/plugins/frontmatter.js +7 -3
  90. package/dist/MetadataList/MetadataList.d.ts.map +1 -1
  91. package/dist/MetadataList/MetadataList.js +5 -1
  92. package/dist/MetadataList/MetadataListContext.d.ts +1 -1
  93. package/dist/MetadataList/MetadataListContext.d.ts.map +1 -1
  94. package/dist/MobileNav/MobileNav.d.ts +9 -0
  95. package/dist/MobileNav/MobileNav.d.ts.map +1 -1
  96. package/dist/MobileNav/MobileNav.js +30 -3
  97. package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
  98. package/dist/MultiSelector/MultiSelector.js +22 -8
  99. package/dist/MultiSelector/OptionActions.a11y.chromium.spec.js +100 -2
  100. package/dist/MultiSelector/hooks.d.ts.map +1 -1
  101. package/dist/MultiSelector/hooks.js +3 -1
  102. package/dist/Pagination/Pagination.d.ts +8 -5
  103. package/dist/Pagination/Pagination.d.ts.map +1 -1
  104. package/dist/Pagination/Pagination.js +21 -8
  105. package/dist/Popover/Popover.js +2 -2
  106. package/dist/PowerSearch/PowerSearch.js +1 -1
  107. package/dist/RadioList/RadioList.d.ts +1 -1
  108. package/dist/RadioList/RadioList.d.ts.map +1 -1
  109. package/dist/RadioList/RadioList.js +6 -2
  110. package/dist/RadioList/RadioListItem.d.ts +9 -1
  111. package/dist/RadioList/RadioListItem.d.ts.map +1 -1
  112. package/dist/RadioList/RadioListItem.js +2 -0
  113. package/dist/Selector/hooks.d.ts.map +1 -1
  114. package/dist/Selector/hooks.js +6 -2
  115. package/dist/SideNav/SideNavItem.d.ts +8 -1
  116. package/dist/SideNav/SideNavItem.d.ts.map +1 -1
  117. package/dist/SideNav/SideNavItem.js +71 -9
  118. package/dist/Switch/Switch.d.ts +1 -1
  119. package/dist/Switch/Switch.d.ts.map +1 -1
  120. package/dist/Switch/Switch.js +13 -1
  121. package/dist/TabList/TabMenu.d.ts +2 -2
  122. package/dist/TabList/TabMenu.d.ts.map +1 -1
  123. package/dist/TabList/TabMenu.js +6 -3
  124. package/dist/Text/Text.d.ts.map +1 -1
  125. package/dist/Text/Text.js +4 -2
  126. package/dist/Text/useTruncation.d.ts +7 -5
  127. package/dist/Text/useTruncation.d.ts.map +1 -1
  128. package/dist/Text/useTruncation.js +16 -5
  129. package/dist/ToggleButton/ToggleButton.d.ts +3 -2
  130. package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
  131. package/dist/ToggleButton/ToggleButton.js +12 -1
  132. package/dist/Tooltip/useTooltip.d.ts.map +1 -1
  133. package/dist/Tooltip/useTooltip.js +11 -0
  134. package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
  135. package/dist/TopNav/TopNavMegaMenu.js +3 -3
  136. package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
  137. package/dist/TopNav/TopNavMenu.js +3 -3
  138. package/dist/TreeList/TreeList.d.ts.map +1 -1
  139. package/dist/TreeList/TreeList.js +1 -0
  140. package/dist/TreeList/TreeListBranches.d.ts.map +1 -1
  141. package/dist/TreeList/TreeListBranches.js +2 -2
  142. package/dist/TreeList/TreeListItem.d.ts.map +1 -1
  143. package/dist/TreeList/TreeListItem.js +57 -9
  144. package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
  145. package/dist/Typeahead/BaseTypeahead.js +26 -0
  146. package/dist/astryx.css +47 -13
  147. package/dist/hooks/useEntryAnimation.d.ts +2 -1
  148. package/dist/hooks/useEntryAnimation.d.ts.map +1 -1
  149. package/dist/hooks/useEntryAnimation.js +14 -12
  150. package/dist/hooks/useIsHydrating.d.ts +6 -0
  151. package/dist/hooks/useIsHydrating.d.ts.map +1 -0
  152. package/dist/hooks/useIsHydrating.js +30 -0
  153. package/dist/hooks/useMenuHover.d.ts.map +1 -1
  154. package/dist/hooks/useMenuHover.js +18 -13
  155. package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
  156. package/dist/i18n/generated-locales/en.generated.js +112 -1
  157. package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
  158. package/dist/i18n/generated-locales/pseudo.generated.js +112 -1
  159. package/dist/index.d.ts +1 -0
  160. package/dist/index.d.ts.map +1 -1
  161. package/dist/index.js +1 -0
  162. package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
  163. package/dist/theme/derivedVarRegistry.js +0 -3
  164. package/dist/utils/focusOutline.stylex.d.ts +4 -0
  165. package/dist/utils/focusOutline.stylex.d.ts.map +1 -1
  166. package/dist/utils/focusOutline.stylex.js +4 -0
  167. package/dist/utils/plainDate.d.ts.map +1 -1
  168. package/dist/utils/plainDate.js +15 -9
  169. package/dist/utils/sharedMutationObserver.d.ts +21 -0
  170. package/dist/utils/sharedMutationObserver.d.ts.map +1 -0
  171. package/dist/utils/sharedMutationObserver.js +69 -0
  172. package/locales/en.json +444 -0
  173. package/locales/pseudo.json +333 -0
  174. package/package.json +9 -4
  175. package/scripts/agent-doc-state.mjs +38 -0
  176. package/scripts/postinstall.mjs +1 -1
  177. package/src/AppShell/AppShell.tsx +45 -1
  178. package/src/AspectRatio/AspectRatio.test.tsx +44 -43
  179. package/src/AspectRatio/AspectRatio.tsx +38 -18
  180. package/src/AspectRatio/__tests__/AspectRatioFitLayers.a11y.browser.spec.ts +157 -0
  181. package/src/Avatar/Avatar.doc.mjs +5 -3
  182. package/src/AvatarGroup/AvatarGroup.doc.mjs +3 -2
  183. package/src/Breadcrumbs/BreadcrumbItem.tsx +4 -1
  184. package/src/Breadcrumbs/Breadcrumbs.test.tsx +30 -1
  185. package/src/Button/Button.doc.mjs +2 -2
  186. package/src/Button/Button.test.tsx +155 -9
  187. package/src/Button/Button.tsx +39 -16
  188. package/src/Button/__tests__/Button.a11y.known-failures.ts +1 -62
  189. package/src/Button/__tests__/Button.a11y.states.ts +0 -10
  190. package/src/Card/Card.doc.mjs +1 -1
  191. package/src/Chat/__tests__/ChatMessageMetadata.a11y.chromium.spec.ts +3 -1
  192. package/src/CheckboxInput/CheckboxInput.test.tsx +34 -0
  193. package/src/CheckboxInput/CheckboxInput.tsx +3 -1
  194. package/src/CheckboxList/CheckboxList.test.tsx +22 -0
  195. package/src/CheckboxList/CheckboxListItem.doc.mjs +16 -0
  196. package/src/CheckboxList/CheckboxListItem.tsx +10 -0
  197. package/src/Code/Code.doc.mjs +1 -0
  198. package/src/CommandPalette/CommandPalette.doc.mjs +2 -0
  199. package/src/CommandPalette/CommandPaletteInput.test.tsx +53 -4
  200. package/src/CommandPalette/CommandPaletteInput.tsx +33 -3
  201. package/src/CommandPalette/__tests__/CommandPaletteInputAudit.a11y.chromium.spec.ts +335 -0
  202. package/src/CommandPalette/__tests__/CommandPaletteItemAudit.a11y.chromium.spec.ts +292 -0
  203. package/src/ContextMenu/ContextMenu.doc.mjs +2 -3
  204. package/src/ContextMenu/ContextMenu.tsx +4 -1
  205. package/src/ContextMenu/__tests__/ContextMenuAudit.a11y.chromium.spec.ts +438 -0
  206. package/src/Dialog/Dialog.test.tsx +46 -0
  207. package/src/Dialog/Dialog.tsx +20 -7
  208. package/src/Dialog/__tests__/Dialog.a11y.known-failures.ts +0 -14
  209. package/src/Drawer/Drawer.doc.mjs +473 -0
  210. package/src/Drawer/Drawer.spec.md +357 -0
  211. package/src/Drawer/Drawer.test.tsx +1300 -0
  212. package/src/Drawer/Drawer.tsx +613 -0
  213. package/src/Drawer/DrawerDirection.test.tsx +127 -0
  214. package/src/Drawer/DrawerHeader.doc.mjs +293 -0
  215. package/src/Drawer/DrawerHeader.test.tsx +102 -0
  216. package/src/Drawer/DrawerHeader.tsx +235 -0
  217. package/src/Drawer/__tests__/DrawerAudit.a11y.chromium.spec.ts +401 -0
  218. package/src/Drawer/__tests__/DrawerHeaderAudit.a11y.chromium.spec.ts +297 -0
  219. package/src/Drawer/index.ts +13 -0
  220. package/src/Drawer/useDrawerDialogPresence.ts +284 -0
  221. package/src/DropdownMenu/DropdownMenu.ssr.test.tsx +57 -0
  222. package/src/DropdownMenu/DropdownMenu.test.tsx +79 -18
  223. package/src/DropdownMenu/DropdownMenu.tsx +83 -12
  224. package/src/DropdownMenu/DropdownMenuContext.tsx +24 -0
  225. package/src/DropdownMenu/DropdownMenuDivider.doc.mjs +2 -2
  226. package/src/DropdownMenu/DropdownMenuDivider.spec.md +192 -0
  227. package/src/DropdownMenu/DropdownMenuDivider.tsx +9 -5
  228. package/src/DropdownMenu/DropdownMenuGroup.doc.mjs +169 -10
  229. package/src/DropdownMenu/DropdownMenuGroup.tsx +6 -4
  230. package/src/DropdownMenu/DropdownMenuLazySheet.test.tsx +126 -0
  231. package/src/DropdownMenu/DropdownMenuSubMenu.test.tsx +185 -0
  232. package/src/DropdownMenu/DropdownMenuSubMenu.tsx +19 -5
  233. package/src/DropdownMenu/__tests__/DropdownMenuDividerAudit.a11y.chromium.spec.ts +280 -0
  234. package/src/DropdownMenu/__tests__/DropdownMenuGroupAudit.a11y.chromium.spec.ts +334 -0
  235. package/src/DropdownMenu/__tests__/Menu.a11y.chromium.spec.ts +145 -0
  236. package/src/DropdownMenu/__tests__/Menu.a11y.known-failures.ts +26 -0
  237. package/src/DropdownMenu/__tests__/Menu.a11y.renders.tsx +65 -0
  238. package/src/DropdownMenu/__tests__/Menu.a11y.states.ts +138 -0
  239. package/src/DropdownMenu/__tests__/Menu.a11y.test.tsx +136 -0
  240. package/src/DropdownMenu/__tests__/warmMenuBottomSheet.tsx +43 -0
  241. package/src/DropdownMenu/lazyMenuBottomSheet.ts +71 -0
  242. package/src/EmptyState/EmptyState.doc.mjs +3 -2
  243. package/src/EmptyState/EmptyState.spec.md +189 -0
  244. package/src/EmptyState/EmptyState.test.tsx +74 -3
  245. package/src/EmptyState/EmptyState.tsx +4 -8
  246. package/src/Field/Field.doc.mjs +14 -8
  247. package/src/Field/Field.spec.md +217 -0
  248. package/src/Field/Field.test.tsx +60 -2
  249. package/src/Field/Field.tsx +17 -8
  250. package/src/Field/FieldLabel.doc.mjs +133 -26
  251. package/src/Field/FieldLabel.spec.md +172 -0
  252. package/src/Field/__tests__/FieldLabelAudit.a11y.chromium.spec.ts +296 -0
  253. package/src/Grid/GridSpan.tsx +3 -0
  254. package/src/Heading/Heading.test.tsx +57 -0
  255. package/src/Heading/Heading.tsx +6 -2
  256. package/src/HoverCard/HoverCard.test.tsx +58 -0
  257. package/src/HoverCard/useHoverCard.tsx +10 -2
  258. package/src/Icon/Icon.doc.mjs +36 -0
  259. package/src/IconButton/IconButton.doc.mjs +2 -2
  260. package/src/IconButton/IconButton.test.tsx +3 -1
  261. package/src/Item/Item.doc.mjs +12 -8
  262. package/src/Item/Item.spec.md +226 -0
  263. package/src/Item/Item.test.tsx +61 -0
  264. package/src/Item/Item.tsx +40 -4
  265. package/src/Layer/layerViewportInset.source-build.test.mjs +90 -0
  266. package/src/Layer/layerViewportInset.stylex.ts +6 -2
  267. package/src/Layer/layerViewportInset.test.ts +1 -0
  268. package/src/Layer/useLayer.tsx +24 -13
  269. package/src/Layer/useLayerDismissal.ts +1 -1
  270. package/src/Layout/LayoutHeader.doc.mjs +5 -0
  271. package/src/Layout/container.stylex.ts +6 -6
  272. package/src/List/List.doc.mjs +14 -1
  273. package/src/List/List.spec.md +129 -77
  274. package/src/List/List.test.tsx +163 -94
  275. package/src/List/List.tsx +74 -18
  276. package/src/List/ListContext.tsx +9 -3
  277. package/src/List/ListItem.doc.mjs +24 -5
  278. package/src/List/ListItem.tsx +56 -27
  279. package/src/List/index.ts +1 -1
  280. package/src/Markdown/Markdown.tsx +14 -1
  281. package/src/Markdown/plugins/frontmatter.test.tsx +25 -0
  282. package/src/Markdown/plugins/frontmatter.ts +7 -3
  283. package/src/MetadataList/MetadataList.doc.mjs +3 -3
  284. package/src/MetadataList/MetadataList.test.tsx +38 -0
  285. package/src/MetadataList/MetadataList.tsx +8 -1
  286. package/src/MetadataList/MetadataListContext.tsx +1 -1
  287. package/src/MobileNav/MobileNav.tsx +30 -3
  288. package/src/MobileNav/MobileNavCloseEdgeCases.test.tsx +173 -15
  289. package/src/MoreMenu/MoreMenu.test.tsx +5 -1
  290. package/src/MultiSelector/MultiSelector.test.tsx +159 -0
  291. package/src/MultiSelector/MultiSelector.tsx +40 -7
  292. package/src/MultiSelector/OptionActions.a11y.chromium.spec.ts +112 -2
  293. package/src/MultiSelector/hooks.ts +3 -1
  294. package/src/MultiSelector/useMultiCombobox.doc.mjs +267 -0
  295. package/src/Pagination/Pagination.doc.mjs +7 -7
  296. package/src/Pagination/Pagination.spec.md +9 -9
  297. package/src/Pagination/Pagination.test.tsx +242 -0
  298. package/src/Pagination/Pagination.tsx +27 -11
  299. package/src/Popover/Popover.test.tsx +2 -2
  300. package/src/Popover/Popover.tsx +4 -4
  301. package/src/PowerSearch/PowerSearch.test.tsx +85 -0
  302. package/src/PowerSearch/PowerSearch.tsx +2 -2
  303. package/src/ProgressBar/ProgressBar.doc.mjs +1 -0
  304. package/src/RadioList/RadioList.fr10.test.tsx +45 -2
  305. package/src/RadioList/RadioList.test.tsx +22 -0
  306. package/src/RadioList/RadioList.tsx +4 -1
  307. package/src/RadioList/RadioListItem.doc.mjs +16 -0
  308. package/src/RadioList/RadioListItem.tsx +10 -1
  309. package/src/Resizable/useResizable.doc.mjs +2 -0
  310. package/src/ScrollableArea/ScrollableArea.doc.mjs +1 -1
  311. package/src/Selector/hooks.ts +6 -2
  312. package/src/Selector/useCombobox.doc.mjs +237 -0
  313. package/src/SideNav/SideNav.spec.md +227 -0
  314. package/src/SideNav/SideNav.test.tsx +179 -0
  315. package/src/SideNav/SideNavItem.doc.mjs +2 -2
  316. package/src/SideNav/SideNavItem.tsx +96 -17
  317. package/src/Slider/Slider.spec.md +39 -18
  318. package/src/Spinner/Spinner.doc.mjs +1 -1
  319. package/src/Switch/Switch.test.tsx +49 -0
  320. package/src/Switch/Switch.tsx +11 -0
  321. package/src/TabList/TabList.spec.md +57 -44
  322. package/src/TabList/TabList.test.tsx +67 -0
  323. package/src/TabList/TabMenu.doc.mjs +4 -3
  324. package/src/TabList/TabMenu.tsx +7 -4
  325. package/src/Text/Text.test.tsx +57 -0
  326. package/src/Text/Text.tsx +6 -2
  327. package/src/Text/useTruncation.test.tsx +69 -0
  328. package/src/Text/useTruncation.ts +16 -5
  329. package/src/TimeInput/TimeInput.fr10.test.tsx +15 -0
  330. package/src/Timestamp/Timestamp.doc.mjs +1 -1
  331. package/src/ToggleButton/ToggleButton.test.tsx +95 -0
  332. package/src/ToggleButton/ToggleButton.tsx +12 -1
  333. package/src/ToggleButton/ToggleButtonGroup.doc.mjs +4 -0
  334. package/src/Tokenizer/Tokenizer.test.tsx +54 -1
  335. package/src/Toolbar/Toolbar.test.tsx +0 -8
  336. package/src/Toolbar/__tests__/Toolbar.a11y.chromium.spec.ts +163 -0
  337. package/src/Toolbar/__tests__/Toolbar.a11y.renders.tsx +63 -0
  338. package/src/Toolbar/__tests__/Toolbar.a11y.states.ts +142 -0
  339. package/src/Toolbar/__tests__/Toolbar.a11y.test.tsx +126 -0
  340. package/src/Tooltip/Tooltip.test.tsx +31 -0
  341. package/src/Tooltip/useTooltip.test.tsx +13 -0
  342. package/src/Tooltip/useTooltip.tsx +11 -0
  343. package/src/TopNav/TopNavMegaMenu.test.tsx +22 -0
  344. package/src/TopNav/TopNavMegaMenu.tsx +7 -3
  345. package/src/TopNav/TopNavMenu.test.tsx +19 -0
  346. package/src/TopNav/TopNavMenu.tsx +11 -3
  347. package/src/TreeList/TreeList.doc.mjs +1 -0
  348. package/src/TreeList/TreeList.spec.md +29 -17
  349. package/src/TreeList/TreeList.test.tsx +327 -6
  350. package/src/TreeList/TreeList.tsx +5 -1
  351. package/src/TreeList/TreeListBranches.tsx +6 -0
  352. package/src/TreeList/TreeListItem.tsx +88 -13
  353. package/src/Typeahead/BaseTypeahead.tsx +26 -0
  354. package/src/Typeahead/Typeahead.test.tsx +260 -2
  355. package/src/docPropLiterals.test.ts +36 -10
  356. package/src/hooks/useEntryAnimation.doc.mjs +4 -4
  357. package/src/hooks/useEntryAnimation.ssr.test.tsx +143 -0
  358. package/src/hooks/useEntryAnimation.ts +15 -16
  359. package/src/hooks/useIsHydrating.test.tsx +70 -0
  360. package/src/hooks/useIsHydrating.ts +31 -0
  361. package/src/hooks/useMenuHover.ts +18 -13
  362. package/src/i18n/InternationalizationProvider.doc.mjs +8 -0
  363. package/src/i18n/InternationalizationProvider.spec.md +252 -0
  364. package/src/i18n/__tests__/InternationalizationProvider.test.tsx +128 -0
  365. package/src/i18n/generated-locales/en.generated.ts +121 -0
  366. package/src/i18n/generated-locales/pseudo.generated.ts +121 -0
  367. package/src/i18n/useTranslator.test.tsx +37 -0
  368. package/src/index.ts +1 -0
  369. package/src/postinstall.test.mjs +46 -0
  370. package/src/reset.css +0 -29
  371. package/src/theme/derivedVarRegistry.test.ts +7 -3
  372. package/src/theme/derivedVarRegistry.ts +0 -3
  373. package/src/utils/focusOutline.stylex.ts +4 -0
  374. package/src/utils/plainDate.test.ts +37 -1
  375. package/src/utils/plainDate.ts +15 -5
  376. package/src/utils/sharedMutationObserver.test.ts +53 -0
  377. package/src/utils/sharedMutationObserver.ts +78 -0
@@ -31,6 +31,7 @@ import type {InputStatus} from '../Field/types';
31
31
  import {useTooltip} from '../Tooltip';
32
32
  import {useResolvedRequired} from '../hooks/useResolvedRequired';
33
33
  import {composeEventHandlers, mergeProps} from '../utils';
34
+ import {joinAriaIDs} from '../utils/inputAria';
34
35
  import {
35
36
  type FieldInputBaseProps,
36
37
  useFieldInputStyling,
@@ -216,6 +217,7 @@ export function RadioList({
216
217
  htmlName,
217
218
  children,
218
219
  onFocus,
220
+ 'aria-labelledby': ariaLabelledByProp,
219
221
  'aria-describedby': ariaDescribedByProp,
220
222
  ...restProps
221
223
  }: RadioListProps) {
@@ -399,7 +401,8 @@ export function RadioList({
399
401
  disabledMessageTooltip.ref(el);
400
402
  }}
401
403
  role="radiogroup"
402
- aria-labelledby={labelID}
404
+ // A caller aria-labelledby names the group together with its label.
405
+ aria-labelledby={joinAriaIDs(labelID, ariaLabelledByProp)}
403
406
  onFocus={composeEventHandlers(handleFocus, onFocus)}
404
407
  aria-describedby={
405
408
  [
@@ -43,6 +43,13 @@ export const docs = {
43
43
  description:
44
44
  'Secondary content displayed below the label. Links and buttons keep their own click behaviour — the row only delegates clicks from its non-interactive surface to the radio.',
45
45
  },
46
+ {
47
+ name: 'align',
48
+ type: "'center' | 'start' | 'first-line'",
49
+ description:
50
+ 'Vertical alignment of the start and end content against the label, passed through to Item unchanged. `first-line` keeps a small mark (a radio) level with the first line of a wrapped label. See Item.align.',
51
+ default: "'center'",
52
+ },
46
53
  {
47
54
  name: 'isDisabled',
48
55
  type: 'boolean',
@@ -117,6 +124,13 @@ export const docsZh = {
117
124
  description:
118
125
  '显示在标签下方的次要内容。链接和按钮保留自身的点击行为——整行仅将非交互区域的点击委派给单选框。',
119
126
  },
127
+ {
128
+ name: 'align',
129
+ type: "'center' | 'start' | 'first-line'",
130
+ description:
131
+ '起始和结束内容相对于标签的垂直对齐方式,原样传递给 Item。`first-line` 让小标记(单选按钮)与换行标签的第一行保持水平。参见 Item.align。',
132
+ default: "'center'",
133
+ },
120
134
  {
121
135
  name: 'isDisabled',
122
136
  type: 'boolean',
@@ -142,6 +156,8 @@ export const docsDense = {
142
156
  displayName: 'Radio List Item',
143
157
  description: 'Individual radio item w/ label, description, content slots.',
144
158
  propDescriptions: {
159
+ align:
160
+ "Start/end content alignment, passed to Item: 'center' (default), 'start', or 'first-line' (centered on the label's first line).",
145
161
  label:
146
162
  'Primary label. String or ReactNode; nested controls keep their behavior.',
147
163
  'aria-label':
@@ -29,7 +29,7 @@ import {indicatorScope} from '../Indicator/indicator.markers.stylex';
29
29
  import {useIndicatorFocusRing} from '../hooks/useIndicatorFocusRing';
30
30
  import {usePressFeedback} from '../hooks/usePressFeedback';
31
31
  import {useIndicator} from '../Indicator';
32
- import {Item} from '../Item';
32
+ import {Item, type ItemAlign} from '../Item';
33
33
  import {themeProps} from '../utils/themeProps';
34
34
 
35
35
  // The touch press's paint, declared by the shared overlay styles on the
@@ -156,6 +156,13 @@ const rowStyles = stylex.create({
156
156
 
157
157
  export interface RadioListItemProps extends BaseProps<HTMLDivElement> {
158
158
  ref?: React.Ref<HTMLDivElement>;
159
+ /**
160
+ * Vertical alignment of the start and end content against the label,
161
+ * forwarded to Item. Use `first-line` to keep the radio level with the
162
+ * first line of a wrapped label.
163
+ * @default 'center'
164
+ */
165
+ align?: ItemAlign;
159
166
  /**
160
167
  * Primary label for the radio item.
161
168
  *
@@ -232,6 +239,7 @@ export function RadioListItem({
232
239
  isDisabled: isItemDisabled = false,
233
240
  startContent,
234
241
  endContent,
242
+ align,
235
243
  xstyle,
236
244
  className,
237
245
  style,
@@ -366,6 +374,7 @@ export function RadioListItem({
366
374
  ) : undefined
367
375
  }
368
376
  endContent={endContent}
377
+ align={align}
369
378
  xstyle={
370
379
  [
371
380
  // Hover reaches the radio visual through this ancestor marker rather
@@ -14,6 +14,8 @@ export const docs = {
14
14
  'sidebar',
15
15
  'divider',
16
16
  'splitter',
17
+ 'splitpane',
18
+ 'resizablepanels',
17
19
  ],
18
20
  params: [
19
21
  {
@@ -5,7 +5,7 @@ export const docs = {
5
5
  name: 'ScrollableArea',
6
6
  displayName: 'Scrollable Area',
7
7
  category: 'Layout',
8
- keywords: ['scroll', 'overflow', 'viewport', 'logical axis', 'keyboard', 'overscroll', 'sticky', 'scrollbar', 'padding', 'full bleed'],
8
+ keywords: ['scroll', 'overflow', 'viewport', 'logical axis', 'keyboard', 'overscroll', 'sticky', 'scrollbar', 'padding', 'full bleed', 'scrollarea', 'scrollview'],
9
9
  usage: {
10
10
  description: 'Provides a native scroll viewport and a real observed content box. The viewport enters the tab order only while a requested logical axis is effectively scrollable, and containment applies only to effective axes.',
11
11
  bestPractices: [
@@ -6,8 +6,12 @@
6
6
  * @file hooks.ts
7
7
  * @input Uses untransformed DOM layout geometry from the Selector's outer
8
8
  * anchor, listbox, and selected option
9
- * @output Hooks for Selector
10
- * @position Internal hooks; used by Selector.tsx
9
+ * @output Hooks for Selector: useSelectedItemOffset, and useCombobox (public,
10
+ * exported from the Selector entry point; also used by CommandPalette)
11
+ * @position Selector hooks; used by Selector.tsx and CommandPalette
12
+ *
13
+ * SYNC: When useCombobox's options or return change, update:
14
+ * - /packages/core/src/Selector/useCombobox.doc.mjs
11
15
  */
12
16
 
13
17
  import {useCallback, useState} from 'react';
@@ -0,0 +1,237 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /** @type {import('@astryxdesign/cli/authoring').HookDoc} */
4
+ export const docs = {
5
+ name: 'useCombobox',
6
+ displayName: 'useCombobox',
7
+ group: 'Selector',
8
+ keywords: [
9
+ 'combobox',
10
+ 'listbox',
11
+ 'select',
12
+ 'dropdown',
13
+ 'highlight',
14
+ 'active option',
15
+ 'aria-activedescendant',
16
+ 'keyboard',
17
+ 'arrow keys',
18
+ 'headless',
19
+ 'apg',
20
+ 'accessibility',
21
+ 'a11y',
22
+ ],
23
+ params: [
24
+ {
25
+ name: 'options',
26
+ type: 'UseComboboxOptions',
27
+ description: 'Configuration object.',
28
+ required: true,
29
+ },
30
+ {
31
+ name: 'options.selectableItems',
32
+ type: 'SelectorOptionData[]',
33
+ description:
34
+ 'The options in the same order as they render. Options with `disabled` cannot be picked and are skipped while moving through the open list; ArrowDown or ArrowUp that opens the list still lands on the first or last option.',
35
+ required: true,
36
+ },
37
+ {
38
+ name: 'options.isOpen',
39
+ type: 'boolean',
40
+ description: 'Whether the list is shown. The caller owns this state.',
41
+ required: true,
42
+ },
43
+ {
44
+ name: 'options.onOpen',
45
+ type: '() => unknown',
46
+ description:
47
+ 'Called to show the list. Return `false` to refuse; the hook then leaves the highlight alone.',
48
+ required: true,
49
+ },
50
+ {
51
+ name: 'options.onClose',
52
+ type: '() => void',
53
+ description:
54
+ 'Called when the hook hides the list; the hook resets the highlight first. When the caller closes the list itself (an outside press, say), it should also call `setHighlightedIndex(-1)`.',
55
+ required: true,
56
+ },
57
+ {
58
+ name: 'options.listboxId',
59
+ type: 'string',
60
+ description:
61
+ "The listbox element's id. Option ids are derived from it through `getItemId`.",
62
+ required: true,
63
+ },
64
+ {
65
+ name: 'options.value',
66
+ type: 'string',
67
+ description:
68
+ 'The selected value. Without search, opening by a press, Enter or Space highlights it, or the first option when nothing is selected; ArrowDown and ArrowUp open on the first and last option.',
69
+ },
70
+ {
71
+ name: 'options.onSelect',
72
+ type: '(value: string) => void',
73
+ description:
74
+ 'Called with the picked value. Picking also closes the list.',
75
+ },
76
+ {
77
+ name: 'options.onClear',
78
+ type: '() => void',
79
+ description:
80
+ 'Clears the value. When provided, Delete or Backspace on the closed control clears it, so clearing is not pointer-only. Ignored while the list is open or with `hasSearch`.',
81
+ },
82
+ {
83
+ name: 'options.hasSearch',
84
+ type: 'boolean',
85
+ description:
86
+ 'Whether the list has its own search field. Space then types instead of picking, opening by a press or Enter does not pre-highlight (ArrowDown and ArrowUp still open on the first and last option), and printable keys on the closed control go to `onSearchSeed`.',
87
+ default: 'false',
88
+ },
89
+ {
90
+ name: 'options.onSearchSeed',
91
+ type: '(char: string) => void',
92
+ description:
93
+ 'With `hasSearch`, receives each printable character except Space typed while the control has focus, opening the list first when it is closed, so type-to-find needs no separate open step.',
94
+ },
95
+ {
96
+ name: 'options.isDisabled',
97
+ type: 'boolean',
98
+ description: 'Whether the control ignores clicks and keys.',
99
+ default: 'false',
100
+ },
101
+ ],
102
+ returns: [
103
+ {
104
+ name: 'highlightedIndex',
105
+ type: 'number',
106
+ description:
107
+ 'Index of the active option, or -1 when none is active. With `hasSearch`, opening by a press or Enter does not set one, so it stays -1 after the hook itself closes the list; ArrowDown and ArrowUp still open on the first or last option. Render it as the active option and name it in `aria-activedescendant` only while it points at a rendered option.',
108
+ },
109
+ {
110
+ name: 'setHighlightedIndex',
111
+ type: '(index: number) => void',
112
+ description:
113
+ 'Sets the active option, for example from a filter that changes the options.',
114
+ },
115
+ {
116
+ name: 'getItemId',
117
+ type: '(index: number) => string',
118
+ description:
119
+ "The id to render on the option at `index`. Set the control's `aria-activedescendant` to `isOpen && highlightedIndex >= 0 && highlightedIndex < selectableItems.length ? getItemId(highlightedIndex) : undefined`, so it never names an option that does not exist, including in an empty list.",
120
+ },
121
+ {
122
+ name: 'onTriggerClick',
123
+ type: '() => void',
124
+ description: 'Toggles the list from a press on the control.',
125
+ },
126
+ {
127
+ name: 'onKeyDown',
128
+ type: '(e: React.KeyboardEvent) => void',
129
+ description:
130
+ 'Key handler for the control that keeps focus. ArrowDown and ArrowUp open the list or move the active option; Enter (and Space without search) picks it or opens the list; Escape and Tab close it; Home, End, PageUp and PageDown jump to the first or last option. An editable control that keeps Home and End for the caret does not pass them to this handler, as CommandPalette does.',
131
+ },
132
+ {
133
+ name: 'onItemSelect',
134
+ type: '(item: SelectorOptionData) => void',
135
+ description: 'Picks an option from a press on it, then closes the list.',
136
+ },
137
+ {
138
+ name: 'onItemMouseEnter',
139
+ type: '(item: SelectorOptionData, index: number) => void',
140
+ description:
141
+ 'Makes the hovered option active without scrolling the list or moving focus.',
142
+ },
143
+ ],
144
+ usage: {
145
+ description:
146
+ 'Tracks the active option of a single-select combobox and handles its keys, while DOM focus stays on the control. It powers Selector and CommandPalette; use it to build a combobox those components do not cover. It renders nothing and sets no attributes: the caller renders the control, the listbox and the options, and wires `role`, `aria-expanded`, `aria-controls` and `aria-activedescendant` from what it returns.',
147
+ bestPractices: [
148
+ {
149
+ guidance: true,
150
+ description:
151
+ "Render each option with `id={getItemId(index)}` and set the control's `aria-activedescendant` only while `isOpen` and `highlightedIndex` points at a rendered option, as CommandPalette does.",
152
+ },
153
+ {
154
+ guidance: true,
155
+ description:
156
+ "For type-to-select without a search field, run useTypeahead's handler first and fall through to this `onKeyDown` when it returns false, as Selector does.",
157
+ },
158
+ {
159
+ guidance: true,
160
+ description:
161
+ 'Announce the number of results through useAnnounce when the options change for a new query.',
162
+ },
163
+ {
164
+ guidance: false,
165
+ description:
166
+ 'Move DOM focus onto the options; the active option is announced through `aria-activedescendant` while focus stays on the control.',
167
+ },
168
+ ],
169
+ },
170
+ relatedComponents: ['Selector', 'CommandPalette'],
171
+ relatedHooks: ['useMultiCombobox', 'useTypeahead', 'useAnnounce'],
172
+ importPath: '@astryxdesign/core/Selector',
173
+ category: 'focus',
174
+ };
175
+
176
+ /** @type {import('@astryxdesign/cli/authoring').HookTranslationDoc} */
177
+ export const docsDense = {
178
+ description:
179
+ 'Single-select combobox state + keys; focus stays on control. Powers Selector / CommandPalette. Renders nothing, sets no attrs: caller renders control / listbox / options and wires role, aria-expanded, aria-controls, aria-activedescendant.',
180
+ paramDescriptions: {
181
+ options: 'config.',
182
+ 'options.selectableItems':
183
+ 'options in render order; disabled ones not pickable, skipped while moving in open list (ArrowDown/Up opening still lands first / last).',
184
+ 'options.isOpen': 'list shown; caller owns state.',
185
+ 'options.onOpen':
186
+ 'show list; return false to refuse (highlight untouched).',
187
+ 'options.onClose':
188
+ 'hook hides list; resets highlight first. caller closing itself (outside press): also setHighlightedIndex(-1).',
189
+ 'options.listboxId': 'listbox id; option ids derive from it (getItemId).',
190
+ 'options.value':
191
+ 'selected value; w/o search, press / Enter / Space opening highlights it (else first); ArrowDown/Up open on first / last.',
192
+ 'options.onSelect': 'called w/ picked value; picking closes.',
193
+ 'options.onClear':
194
+ 'clears value; Delete / Backspace on closed control. ignored when open or hasSearch.',
195
+ 'options.hasSearch':
196
+ 'list has own search field: Space types, press / Enter opening does not pre-highlight (ArrowDown/Up still first / last), printable keys on closed control -> onSearchSeed.',
197
+ 'options.onSearchSeed':
198
+ 'w/ hasSearch, each printable char except Space typed while control focused (opens first if closed).',
199
+ 'options.isDisabled': 'ignore clicks + keys.',
200
+ },
201
+ returnDescriptions: {
202
+ highlightedIndex:
203
+ 'active option index, -1 = none. hasSearch: press / Enter opening sets none (stays -1 after hook closes); ArrowDown/Up still first / last. name in aria-activedescendant only when it points at a rendered option.',
204
+ setHighlightedIndex: 'set active option (e.g. after filtering).',
205
+ getItemId:
206
+ 'id for option at index; aria-activedescendant = isOpen && highlightedIndex >= 0 && highlightedIndex < selectableItems.length ? getItemId(highlightedIndex) : undefined (empty list safe).',
207
+ onTriggerClick: 'toggle list from a press on control.',
208
+ onKeyDown:
209
+ 'control keydown: ArrowDown/Up open or move; Enter (Space w/o search) picks or opens; Escape / Tab close; Home / End / PageUp / PageDown jump. editable control keeping Home / End for caret: do not pass them.',
210
+ onItemSelect: 'pick from a press, then close.',
211
+ onItemMouseEnter: 'hover makes option active; no scroll, no focus move.',
212
+ },
213
+ usage: {
214
+ description:
215
+ 'Headless single-select combobox: active option + keys, focus stays on control. Caller renders + wires ARIA.',
216
+ bestPractices: [
217
+ {
218
+ guidance: true,
219
+ description:
220
+ 'Option id = getItemId(index); aria-activedescendant only while open and highlightedIndex points at a rendered option.',
221
+ },
222
+ {
223
+ guidance: true,
224
+ description:
225
+ 'Type-to-select w/o search: run useTypeahead first, fall through when it returns false.',
226
+ },
227
+ {
228
+ guidance: true,
229
+ description: 'Announce result count via useAnnounce on new query.',
230
+ },
231
+ {
232
+ guidance: false,
233
+ description: 'Move DOM focus onto options; use aria-activedescendant.',
234
+ },
235
+ ],
236
+ },
237
+ };
@@ -0,0 +1,227 @@
1
+ ---
2
+ schema_version: 3
3
+ template_version: 7
4
+ kind: component
5
+ id: component:SideNav
6
+ authority: current
7
+ archive_reason: null
8
+ superseded_by: null
9
+ approved_by: cixzhang
10
+ approved_at: 2026-10-16
11
+ owners: [cixzhang]
12
+ review_triggers: [layout, behavior, accessibility]
13
+ verified_by:
14
+ [
15
+ packages/core/src/SideNav/SideNav.test.tsx,
16
+ apps/storybook/stories/SideNav.stories.tsx,
17
+ scripts/check-knowledge.mjs,
18
+ ]
19
+ modules: []
20
+ families: [family:navigation-destinations]
21
+ design_specs: []
22
+ architecture:
23
+ [
24
+ architecture:component-theming-surface,
25
+ architecture:interaction-modality,
26
+ architecture:internationalization,
27
+ architecture:public-component-api,
28
+ ]
29
+ contributing: []
30
+ system_specs: [spec:AST-017/FR3]
31
+ ---
32
+
33
+ # SideNav component contract
34
+
35
+ <!-- Describe the system, not the project: present tense, what it does. No proposals, history, pull requests, or research in the record; see docs/contributing/spec-writing.md and report its rubric results in the pull request. -->
36
+
37
+ This record governs how nested SideNavItem rows are drawn: their width, where
38
+ their nesting indent sits, and what the indent area does. It covers SideNav,
39
+ SideNavSection, and SideNavItem only as far as that geometry depends on them.
40
+ SideNavItem's link and destination safety is governed by
41
+ `family:navigation-destinations`; other SideNav behavior remains described by
42
+ its source, tests, and consumer docs until a record claims it.
43
+
44
+ ## Contract at a glance
45
+
46
+ | Area | Contract |
47
+ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
48
+ | Public contract | None. No prop, value, default, or theme target changes. |
49
+ | Behavior | Every SideNavItem row spans the full width of its nav list at any depth. Depth shows as inline-start indent inside the row: one `--spacing-6` step per level, added to the row's own padding. |
50
+ | End-user impact | A person scanning a nested nav sees hover, pressed, selected, and focus fills that line up with the top-level rows, and can click a nested row's indent to activate it, as they would its label. |
51
+ | Builder impact | No new choice or prop. Icons and labels keep their per-depth position. Content placed directly inside a SideNavItem that is not itself a SideNavItem sits at the nav list edge, because the nested group adds no inset; no supported setting insets it. |
52
+ | Compatibility/readiness | Nonbreaking change of visual direction (`spec:AST-017/FR3`). The collapsed rail and top-level rows are unchanged. Authority is current; implementation may be staged. |
53
+ | Review checks | Reject a nested row narrower than a top-level row, an indent drawn outside the row, an indent area that shows feedback but does not activate, a clipped focus ring, or an indent in the flyout's top level. |
54
+ | Governing rules | DD1 and FR3–FR5 below; `family:navigation-destinations` for destinations; `architecture:internationalization` for logical direction. |
55
+
56
+ This table is a review projection; the body below is authoritative.
57
+
58
+ ## Intent
59
+
60
+ SideNav is the vertical navigation region of an app. SideNavItem rows can nest
61
+ to show a hierarchy of destinations. Nesting must read as one list of equal
62
+ rows, so the eye compares labels and states across depths rather than seeing a
63
+ second, narrower kind of row. SideNav owns this because only SideNavItem knows
64
+ a row's depth and its row padding.
65
+
66
+ ## Compatibility and migration
67
+
68
+ - Released default preserved: `no`; nested rows change from inset to full width.
69
+ Top-level rows and the collapsed rail are unchanged.
70
+ - Compatibility class: nonbreaking appearance change of visual direction under
71
+ `spec:AST-017/FR3`; no public API, accepted input, or accessibility semantic
72
+ changes.
73
+ - Controlled/uncontrolled behavior: unchanged.
74
+ - Migration decision: none; there is no supported way to keep the inset look.
75
+
76
+ Consumer migration instructions belong in consumer docs and release notes.
77
+
78
+ ## Ownership boundary
79
+
80
+ **Owns**
81
+
82
+ - The width of every expanded SideNavItem row, at every depth.
83
+ - Where a nested row's indent sits, its step, and how it adds to the row's
84
+ padding.
85
+ - What the indent area paints and what a click on it does.
86
+ - Whether the nested group clips its rows.
87
+
88
+ **Does not own / non-goals**
89
+
90
+ - Destination acceptance, blocking, and router handoff — owned by
91
+ `family:navigation-destinations`.
92
+ - The collapsed item's tooltip and how it attaches — outside this record.
93
+ - Exact fill colors, radius, row height, and row padding per size — owned by
94
+ the shared nav item styles and the `side-nav-item` theme target.
95
+ - Layout of caller content placed directly inside a SideNavItem that is not a
96
+ SideNavItem — owned by the product callsite.
97
+ - SideNavHeading, SideNavCollapseButton, and the SideNav header, footer, and
98
+ resize zones.
99
+
100
+ ## Public concepts
101
+
102
+ | Concept | Closed values or states | Meaning | Availability by variant/orientation/state | Default | Owner | Stability | Invalid-value behavior |
103
+ | ------------- | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------- | ------- | ------------------- | --------- | ---------------------- |
104
+ | Nesting depth | `0`, `1`, `2`, … (derived, not a prop) | The number of SideNavItem ancestors of a row within the same list. A collapsed rail's flyout restarts at 0. | Expanded rail; mobile drawer; flyout | `0` | `component:SideNav` | stable | Not caller-settable |
105
+ | Row size | `sm`, `md`, `lg` (existing SideNavItem `size`) | Sets the row's height and base inline padding; the indent adds to that padding. | Every row | `md` | `component:SideNav` | stable | Rejected by the type |
106
+
107
+ ## Behavioral and layout contract
108
+
109
+ | ID | Invariant | Basis | Draft review state |
110
+ | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | -------------------------------------------- |
111
+ | FR1 | SideNav renders its navigation children in a scrollable list, which may be grouped by SideNavSection. A SideNavItem with children renders them, after its own row, in a group labelled by the parent's label; unless `collapsible` is `false`, the group expands and collapses and is hidden from assistive technology and inert while collapsed. | Current source, docs, and tests | Current behavior |
112
+ | FR2 | In a collapsed rail, a SideNavItem without an icon is not rendered; a leaf item renders icon-only, named by a non-blank caller `aria-label` or else its label; an item with children renders an icon-only trigger that opens a flyout listing its children as the flyout's top level. | Current source, docs, and tests | Current behavior |
113
+ | FR3 | In an expanded rail, in a flyout, and in the mobile navigation drawer, every SideNavItem row MUST span the full inline size of its list at any depth. A row at depth `n` MUST start its content `n` × `--spacing-6` beyond the row's own inline-start padding for its size, inside the row; the nested group MUST add no inset. A flyout's top level is depth 0. | `component:SideNav/DEC-1` | Settled intent; implementation may be staged |
114
+ | FR4 | The indent area MUST be part of the row's target: a click there, including a modified or middle click on a link row, does what the same click on the row's primary element does. When the row also carries an independent expand toggle or `actions`, the indent belongs to the primary link or button, and the toggle and actions keep their own activation at the row's trailing edge. | `component:SideNav/DEC-1`; `family:navigation-destinations` | Settled intent; implementation may be staged |
115
+ | FR5 | An expanded nested group MUST NOT clip its rows once it has finished opening, so a nested row's focus ring paints in full. The group MAY clip while collapsed and while it opens or closes. | `component:SideNav/DEC-1` | Settled intent; implementation may be staged |
116
+
117
+ ### Allowed variation
118
+
119
+ - **AV1 — Depth and size.** Any depth and any row size may appear; FR3 holds for
120
+ each row from its own size's padding.
121
+ - **AV2 — Theme tokens.** A theme that changes `--spacing-6` or the row padding
122
+ tokens changes the step or the base with them.
123
+ - **AV3 — Row implementation.** The element that carries the indent may change
124
+ while the painted row stays full width and the indent stays clickable.
125
+
126
+ ### Representative states
127
+
128
+ | State | Required invariant | Allowed variation |
129
+ | ------------------------------------- | ----------------------------------------------------------------------------------------- | ------------------------------- |
130
+ | Depth 1–3, `md` | Row width equals a top-level row's; content starts one step further in per level. | Labels, icons, selection. |
131
+ | `sm` and `lg` nested rows | Indent adds to that size's base padding. | Row height by size. |
132
+ | Nested row with own link and children | Full-width row; indent is part of the link; the expand toggle stays at the trailing edge. | Collapsed or expanded children. |
133
+ | Nested row with `actions` | Full-width row; indent is part of the primary element; actions stay at the trailing edge. | Action content. |
134
+ | Keyboard focus on a nested row | The focus ring paints in full around the row. | Ring style by theme. |
135
+ | Right-to-left | Indent sits at the inline start (right); same widths. | Writing direction. |
136
+ | Collapsed rail | Icon-only items; the flyout's top level has no indent; deeper flyout levels indent. | Flyout content. |
137
+
138
+ ### Transformation and precedence order
139
+
140
+ - **ORD1 — Row inline-start padding.** The row's size padding, then plus depth ×
141
+ `--spacing-6`. A caller's `style` on a nested item composes after the indent in the
142
+ shared order (`architecture:public-component-api`): properties the caller does
143
+ not set keep the indent, and a caller-set inline-start padding replaces it.
144
+
145
+ ### Performance and resources
146
+
147
+ - **PR1 — No measurement.** Depth and indent come from composition; no
148
+ measurement, observer, or extra render pass is added.
149
+
150
+ ## Accessibility contract
151
+
152
+ - **AR1 — Presentation only.** Width and indent MUST NOT change any row's role,
153
+ accessible name, state, DOM order, or tab order.
154
+ - **AR2 — Visible focus.** A nested row's focus indicator MUST paint in full at
155
+ every depth (FR5).
156
+
157
+ ## Design relationships
158
+
159
+ | Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |
160
+ | ---------------- | ------------------------------------------------------------------ | ------------------------ | -------------- | ------------------ |
161
+ | Navigation items | Nested rows read as equal rows of one list; depth reads as indent. | Owner choice (DD1) | Prominent | FR3–FR5 |
162
+
163
+ ### Design decisions
164
+
165
+ <!-- design-decisions:v1 -->
166
+
167
+ | ID | Decision | Intent or reason | Applies to | Allowed variation |
168
+ | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
169
+ | DD1 | Every SideNavItem row spans the full width of its nav list at any depth; nesting shows as indent inside the row, ahead of its content. Hover, pressed, selected, and focus paint the whole row, indent included. | Fills line up across depths, so the nav reads as one list of equal rows while labels keep their per-level alignment; the indent belongs to the row's primary target rather than sitting beside it as a gap. | SideNavItem rows at every depth, at rest and through hover, pressed, selected, disabled, and focus | Themes restyle fill, radius, and padding through the `side-nav-item` target; the step follows `--spacing-6`. |
170
+
171
+ ## Family and system relationships
172
+
173
+ - `family:navigation-destinations` owns the accept/block result for a
174
+ SideNavItem `href`; the indent area activates the same destination the primary
175
+ element does (FR4).
176
+ - `architecture:internationalization` owns logical direction; the indent is
177
+ inline-start and mirrors under right-to-left.
178
+ - `architecture:interaction-modality` owns shared focus-visible behavior; FR5
179
+ keeps the ring visible at every depth.
180
+ - `architecture:component-theming-surface` owns the `side-nav-item` target;
181
+ this record adds no target or state.
182
+ - `architecture:public-component-api` owns how caller styling inputs compose;
183
+ ORD1 places the indent before a caller's `style`.
184
+ - `spec:AST-017/FR3` classifies the change as a nonbreaking change of visual
185
+ direction.
186
+ - `component:TreeList` DD1–DD3 record the same row geometry for TreeList. They
187
+ are precedent, not authority here; each component owns its own rows.
188
+
189
+ ## Verification map
190
+
191
+ | Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
192
+ | --------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
193
+ | FR1, FR2 | `SideNav.test.tsx` nesting, collapsible, and collapsed-rail suites | Nested, collapsible, collapsed rail, flyout | Removing the labelled group, its collapsed inert state, or the collapsed icon-only and flyout paths fails. | `audit:SideNav/anatomy` |
194
+ | FR3, ORD1 | Focused `SideNav.test.tsx` indent coverage, required with implementation | Depth 1 and 2; `sm` and `md`; split and actions rows; caller `style`; flyout | A group inset, a missing or wrong indent, a dropped caller `style`, an indent that overrides a caller-set inline-start padding, or an indented flyout top level fails. | `audit:SideNav/layout` |
195
+ | FR3, DD1 | Real-browser geometry over the SideNav nested stories | Depths 1–3; `sm`, `md`, `lg`; light and dark; right-to-left; mobile drawer | A nested row's box narrower than a top-level row's, or a label moved from its per-depth position, fails. | `audit:SideNav/layout` |
196
+ | FR4 | Real-browser click in the indent area of plain, split, and actions rows | Link and button rows; plain, modified, and middle clicks; nested rows with toggle and actions | A click in the indent that does nothing or differs from the same click on the primary element, or a toggle or action that activates the row, fails. | `audit:SideNav/behavior` |
197
+ | FR5, AR2 | `SideNav.test.tsx` group clipping case and real-browser keyboard focus on nested rows | Only-child and last nested rows; after opening; collapsed | A focus ring cut at any edge of an expanded group, or an expanded group that still clips, fails. | `audit:SideNav/a11y` |
198
+ | FR2, FR3 | Real-browser collapsed rail and flyout | Collapsed rail with nested children | Any change to the collapsed rail, or an indent on the flyout's top level, fails. | `audit:SideNav/layout` |
199
+ | AR1 | Accessibility-tree comparison of nested rows | Plain, split, and actions rows | Any change in role, name, state, or order fails. | `audit:SideNav/a11y` |
200
+
201
+ ## Decision log
202
+
203
+ <!-- Record the boundary or requirement, not how it was reached. A rejected alternative is at most one line here, kept only when it is consequential and likely to recur. -->
204
+
205
+ ### DEC-1 — Nested rows are full width; depth is indent inside the row
206
+
207
+ **Reference:** `component:SideNav/DEC-1`
208
+ **Decider:** cixzhang, 2026-10-16
209
+
210
+ A nested row that starts at its indent paints its fills from a different edge
211
+ than the rows above it, so it reads as a different, narrower component. A row that
212
+ spans the full width with its indent inside lines up every fill and keeps each
213
+ label at its per-depth position. The indent is part of the row's primary
214
+ target, so it acts as well as lights up. Full-width rows reach the nested group's
215
+ edges, so an open group must not clip them, or their focus ring is cut off.
216
+
217
+ Rejected: indenting the nested group from outside the rows, because fills then
218
+ start at a different edge per depth.
219
+
220
+ ## Open questions
221
+
222
+ None.
223
+
224
+ ## Content boundary
225
+
226
+ This file does not duplicate consumer prop tables/examples, current audit
227
+ results, implementation steps, or family/system rules. It links to their owners.