@astryxdesign/core 0.7.6-canary.ec128c4 → 0.7.6-canary.f73623d

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 (454) hide show
  1. package/dist/AppShell/AppShell.d.ts.map +1 -1
  2. package/dist/AppShell/AppShell.js +183 -5
  3. package/dist/AppShell/observeMainOverflow.d.ts +9 -0
  4. package/dist/AppShell/observeMainOverflow.d.ts.map +1 -0
  5. package/dist/AppShell/observeMainOverflow.js +125 -0
  6. package/dist/Carousel/Carousel.d.ts +3 -1
  7. package/dist/Carousel/Carousel.d.ts.map +1 -1
  8. package/dist/Carousel/Carousel.js +12 -3
  9. package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
  10. package/dist/ComplexSelector/ComplexSelector.js +41 -4
  11. package/dist/DateInput/Wheel.d.ts.map +1 -1
  12. package/dist/DateInput/Wheel.js +11 -7
  13. package/dist/DateInput/usePointerDragScroll.d.ts +10 -1
  14. package/dist/DateInput/usePointerDragScroll.d.ts.map +1 -1
  15. package/dist/DateInput/usePointerDragScroll.js +25 -9
  16. package/dist/DateInput/useScrollSettle.d.ts +3 -1
  17. package/dist/DateInput/useScrollSettle.d.ts.map +1 -1
  18. package/dist/DateInput/useScrollSettle.js +37 -8
  19. package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  20. package/dist/DropdownMenu/DropdownMenu.js +28 -19
  21. package/dist/Item/Item.d.ts.map +1 -1
  22. package/dist/Item/Item.js +19 -6
  23. package/dist/Layer/useLayer.d.ts.map +1 -1
  24. package/dist/Layer/useLayer.js +27 -6
  25. package/dist/Link/Link.d.ts.map +1 -1
  26. package/dist/Link/Link.js +8 -3
  27. package/dist/Markdown/plugins/headingLinks.a11y.chromium.spec.js +1 -1
  28. package/dist/NavMenu/NavHeadingMenuItem.d.ts.map +1 -1
  29. package/dist/NavMenu/NavHeadingMenuItem.js +5 -29
  30. package/dist/NumberInput/NumberInput.d.ts.map +1 -1
  31. package/dist/NumberInput/NumberInput.js +23 -2
  32. package/dist/Outline/Outline.d.ts.map +1 -1
  33. package/dist/Outline/Outline.js +27 -0
  34. package/dist/Popover/Popover.d.ts.map +1 -1
  35. package/dist/Popover/Popover.js +32 -12
  36. package/dist/Popover/usePopover.d.ts.map +1 -1
  37. package/dist/Popover/usePopover.js +10 -3
  38. package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
  39. package/dist/PowerSearch/PowerSearch.js +37 -30
  40. package/dist/RadioList/RadioListItem.d.ts.map +1 -1
  41. package/dist/RadioList/RadioListItem.js +11 -3
  42. package/dist/SideNav/SideNavItem.d.ts +2 -2
  43. package/dist/SideNav/SideNavItem.d.ts.map +1 -1
  44. package/dist/SideNav/SideNavItem.js +18 -7
  45. package/dist/Skeleton/Skeleton.d.ts.map +1 -1
  46. package/dist/Skeleton/Skeleton.js +1 -1
  47. package/dist/Spinner/Spinner.d.ts.map +1 -1
  48. package/dist/Spinner/Spinner.js +1 -1
  49. package/dist/Stepper/Step.d.ts.map +1 -1
  50. package/dist/Stepper/Step.js +26 -6
  51. package/dist/Switch/Switch.d.ts.map +1 -1
  52. package/dist/Switch/Switch.js +10 -3
  53. package/dist/Table/Table.d.ts.map +1 -1
  54. package/dist/Table/Table.js +36 -10
  55. package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
  56. package/dist/Table/plugins/sortable/useTableSortable.js +46 -58
  57. package/dist/Toast/ToastViewport.d.ts.map +1 -1
  58. package/dist/Toast/ToastViewport.js +19 -3
  59. package/dist/ToggleButton/ToggleButtonGroup.d.ts +7 -1
  60. package/dist/ToggleButton/ToggleButtonGroup.d.ts.map +1 -1
  61. package/dist/ToggleButton/ToggleButtonGroup.js +16 -2
  62. package/dist/Token/Token.d.ts.map +1 -1
  63. package/dist/Token/Token.js +37 -5
  64. package/dist/Token/TokenLink.d.ts.map +1 -1
  65. package/dist/Token/TokenLink.js +14 -2
  66. package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
  67. package/dist/Tokenizer/Tokenizer.js +15 -4
  68. package/dist/Tokenizer/TokenizerClearAllMessageContext.d.ts +2 -0
  69. package/dist/Tokenizer/TokenizerClearAllMessageContext.d.ts.map +1 -0
  70. package/dist/Tokenizer/TokenizerClearAllMessageContext.js +17 -0
  71. package/dist/TreeList/TreeListItem.d.ts.map +1 -1
  72. package/dist/TreeList/TreeListItem.js +27 -4
  73. package/dist/Typeahead/BaseTypeahead.d.ts +4 -4
  74. package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
  75. package/dist/Typeahead/BaseTypeahead.js +43 -7
  76. package/dist/astryx.css +10 -3
  77. package/dist/gestures/GestureArena.d.ts +26 -1
  78. package/dist/gestures/GestureArena.d.ts.map +1 -1
  79. package/dist/gestures/GestureArena.js +71 -9
  80. package/dist/gestures/GestureHost.d.ts +2 -3
  81. package/dist/gestures/GestureHost.d.ts.map +1 -1
  82. package/dist/gestures/GestureHost.js +7 -7
  83. package/dist/gestures/GestureRecognizer.d.ts +3 -1
  84. package/dist/gestures/GestureRecognizer.d.ts.map +1 -1
  85. package/dist/gestures/GestureRecognizer.js +3 -1
  86. package/dist/gestures/PressTracker.d.ts +112 -0
  87. package/dist/gestures/PressTracker.d.ts.map +1 -0
  88. package/dist/gestures/PressTracker.js +267 -0
  89. package/dist/gestures/index.d.ts +37 -0
  90. package/dist/gestures/index.d.ts.map +1 -0
  91. package/dist/gestures/index.js +25 -0
  92. package/dist/gestures/useGestureRecognizer.d.ts +56 -0
  93. package/dist/gestures/useGestureRecognizer.d.ts.map +1 -0
  94. package/dist/gestures/useGestureRecognizer.js +226 -0
  95. package/dist/hooks/scrollKeyboardDelegation.d.ts.map +1 -1
  96. package/dist/hooks/scrollKeyboardDelegation.js +7 -3
  97. package/dist/hooks/useScrollOverflow.d.ts +2 -1
  98. package/dist/hooks/useScrollOverflow.d.ts.map +1 -1
  99. package/dist/hooks/useScrollOverflow.js +56 -10
  100. package/dist/i18n/generated-locales/af-ZA.generated.d.ts.map +1 -1
  101. package/dist/i18n/generated-locales/af-ZA.generated.js +0 -5
  102. package/dist/i18n/generated-locales/ar-SA.generated.d.ts.map +1 -1
  103. package/dist/i18n/generated-locales/ar-SA.generated.js +0 -5
  104. package/dist/i18n/generated-locales/ca-ES.generated.d.ts.map +1 -1
  105. package/dist/i18n/generated-locales/ca-ES.generated.js +0 -5
  106. package/dist/i18n/generated-locales/cs-CZ.generated.d.ts.map +1 -1
  107. package/dist/i18n/generated-locales/cs-CZ.generated.js +0 -5
  108. package/dist/i18n/generated-locales/da-DK.generated.d.ts.map +1 -1
  109. package/dist/i18n/generated-locales/da-DK.generated.js +0 -5
  110. package/dist/i18n/generated-locales/de-DE.generated.d.ts.map +1 -1
  111. package/dist/i18n/generated-locales/de-DE.generated.js +0 -5
  112. package/dist/i18n/generated-locales/el-GR.generated.d.ts.map +1 -1
  113. package/dist/i18n/generated-locales/el-GR.generated.js +0 -5
  114. package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
  115. package/dist/i18n/generated-locales/en.generated.js +3 -5
  116. package/dist/i18n/generated-locales/es-ES.generated.d.ts.map +1 -1
  117. package/dist/i18n/generated-locales/es-ES.generated.js +0 -5
  118. package/dist/i18n/generated-locales/fi-FI.generated.d.ts.map +1 -1
  119. package/dist/i18n/generated-locales/fi-FI.generated.js +0 -5
  120. package/dist/i18n/generated-locales/fr-FR.generated.d.ts.map +1 -1
  121. package/dist/i18n/generated-locales/fr-FR.generated.js +0 -5
  122. package/dist/i18n/generated-locales/he-IL.generated.d.ts.map +1 -1
  123. package/dist/i18n/generated-locales/he-IL.generated.js +0 -5
  124. package/dist/i18n/generated-locales/hu-HU.generated.d.ts.map +1 -1
  125. package/dist/i18n/generated-locales/hu-HU.generated.js +0 -5
  126. package/dist/i18n/generated-locales/it-IT.generated.d.ts.map +1 -1
  127. package/dist/i18n/generated-locales/it-IT.generated.js +0 -5
  128. package/dist/i18n/generated-locales/ja-JP.generated.d.ts.map +1 -1
  129. package/dist/i18n/generated-locales/ja-JP.generated.js +0 -5
  130. package/dist/i18n/generated-locales/ko-KR.generated.d.ts.map +1 -1
  131. package/dist/i18n/generated-locales/ko-KR.generated.js +0 -5
  132. package/dist/i18n/generated-locales/nl-NL.generated.d.ts.map +1 -1
  133. package/dist/i18n/generated-locales/nl-NL.generated.js +0 -5
  134. package/dist/i18n/generated-locales/no-NO.generated.d.ts.map +1 -1
  135. package/dist/i18n/generated-locales/no-NO.generated.js +0 -5
  136. package/dist/i18n/generated-locales/pl-PL.generated.d.ts.map +1 -1
  137. package/dist/i18n/generated-locales/pl-PL.generated.js +0 -5
  138. package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
  139. package/dist/i18n/generated-locales/pseudo.generated.js +3 -5
  140. package/dist/i18n/generated-locales/pt-BR.generated.d.ts.map +1 -1
  141. package/dist/i18n/generated-locales/pt-BR.generated.js +0 -5
  142. package/dist/i18n/generated-locales/pt-PT.generated.d.ts.map +1 -1
  143. package/dist/i18n/generated-locales/pt-PT.generated.js +0 -5
  144. package/dist/i18n/generated-locales/ro-RO.generated.d.ts.map +1 -1
  145. package/dist/i18n/generated-locales/ro-RO.generated.js +0 -5
  146. package/dist/i18n/generated-locales/ru-RU.generated.d.ts.map +1 -1
  147. package/dist/i18n/generated-locales/ru-RU.generated.js +0 -5
  148. package/dist/i18n/generated-locales/sr-SP.generated.d.ts.map +1 -1
  149. package/dist/i18n/generated-locales/sr-SP.generated.js +0 -5
  150. package/dist/i18n/generated-locales/sv-SE.generated.d.ts.map +1 -1
  151. package/dist/i18n/generated-locales/sv-SE.generated.js +0 -5
  152. package/dist/i18n/generated-locales/tr-TR.generated.d.ts.map +1 -1
  153. package/dist/i18n/generated-locales/tr-TR.generated.js +0 -5
  154. package/dist/i18n/generated-locales/uk-UA.generated.d.ts.map +1 -1
  155. package/dist/i18n/generated-locales/uk-UA.generated.js +0 -5
  156. package/dist/i18n/generated-locales/vi-VN.generated.d.ts.map +1 -1
  157. package/dist/i18n/generated-locales/vi-VN.generated.js +0 -5
  158. package/dist/i18n/generated-locales/zh-CN.generated.d.ts.map +1 -1
  159. package/dist/i18n/generated-locales/zh-CN.generated.js +0 -5
  160. package/dist/i18n/generated-locales/zh-TW.generated.d.ts.map +1 -1
  161. package/dist/i18n/generated-locales/zh-TW.generated.js +0 -5
  162. package/dist/motion/animator.d.ts +76 -7
  163. package/dist/motion/animator.d.ts.map +1 -1
  164. package/dist/motion/animator.js +589 -99
  165. package/dist/motion/coast.d.ts +4 -1
  166. package/dist/motion/coast.d.ts.map +1 -1
  167. package/dist/motion/coast.js +4 -2
  168. package/dist/motion/reducedMotion.d.ts.map +1 -1
  169. package/dist/motion/reducedMotion.js +6 -2
  170. package/dist/motion/reducedMotionPlan.d.ts +7 -0
  171. package/dist/motion/reducedMotionPlan.d.ts.map +1 -1
  172. package/dist/motion/reducedMotionPlan.js +14 -1
  173. package/dist/motion/resolveMotion.d.ts +42 -0
  174. package/dist/motion/resolveMotion.d.ts.map +1 -0
  175. package/dist/motion/resolveMotion.js +43 -0
  176. package/dist/motion/roleValue.d.ts +2 -1
  177. package/dist/motion/roleValue.d.ts.map +1 -1
  178. package/dist/motion/roleValue.js +2 -1
  179. package/dist/motion/uikit/timing.d.ts +7 -1
  180. package/dist/motion/uikit/timing.d.ts.map +1 -1
  181. package/dist/motion/uikit/timing.js +19 -1
  182. package/dist/theme/defineTheme.d.ts +19 -5
  183. package/dist/theme/defineTheme.d.ts.map +1 -1
  184. package/dist/theme/defineTheme.js +63 -3
  185. package/dist/theme/index.d.ts +1 -0
  186. package/dist/theme/index.d.ts.map +1 -1
  187. package/dist/theme/motionKnobs.d.ts +56 -0
  188. package/dist/theme/motionKnobs.d.ts.map +1 -0
  189. package/dist/theme/motionKnobs.js +48 -0
  190. package/dist/theme/resolveThemeValues.d.ts +11 -4
  191. package/dist/theme/resolveThemeValues.d.ts.map +1 -1
  192. package/dist/theme/resolveThemeValues.js +40 -4
  193. package/dist/theme/themeAdaptations.d.ts +7 -3
  194. package/dist/theme/themeAdaptations.d.ts.map +1 -1
  195. package/dist/theme/themeAdaptations.js +36 -7
  196. package/dist/theme/themeMotion.d.ts +96 -0
  197. package/dist/theme/themeMotion.d.ts.map +1 -0
  198. package/dist/theme/themeMotion.js +177 -0
  199. package/dist/theme/tokenReferences.d.ts +31 -0
  200. package/dist/theme/tokenReferences.d.ts.map +1 -0
  201. package/dist/theme/tokenReferences.js +132 -0
  202. package/dist/theme/tokens.d.ts +1 -0
  203. package/dist/theme/tokens.d.ts.map +1 -1
  204. package/dist/theme/tokens.js +9 -129
  205. package/dist/theme/tokens.stylex.d.ts +12 -0
  206. package/dist/theme/tokens.stylex.d.ts.map +1 -1
  207. package/dist/theme/tokens.stylex.js +12 -0
  208. package/dist/utils/focusOutline.stylex.d.ts +6 -0
  209. package/dist/utils/focusOutline.stylex.d.ts.map +1 -1
  210. package/dist/utils/focusOutline.stylex.js +7 -0
  211. package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
  212. package/dist/utils/interactionOverlay.stylex.js +17 -8
  213. package/dist/utils/pressFeedback.d.ts.map +1 -1
  214. package/dist/utils/pressFeedback.js +20 -1
  215. package/dist/utils/sharedMutationObserver.d.ts +19 -11
  216. package/dist/utils/sharedMutationObserver.d.ts.map +1 -1
  217. package/dist/utils/sharedMutationObserver.js +66 -26
  218. package/dist/utils/touchPresentation.d.ts +2 -2
  219. package/dist/utils/touchPresentation.d.ts.map +1 -1
  220. package/dist/utils/touchPresentation.js +8 -5
  221. package/dist/utils/touchQueries.d.ts +13 -0
  222. package/dist/utils/touchQueries.d.ts.map +1 -0
  223. package/dist/utils/touchQueries.js +15 -0
  224. package/dist/utils/useFocusAcrossSwap.d.ts +19 -0
  225. package/dist/utils/useFocusAcrossSwap.d.ts.map +1 -0
  226. package/dist/utils/useFocusAcrossSwap.js +41 -0
  227. package/locales/af-ZA.json +0 -21
  228. package/locales/ar-SA.json +0 -21
  229. package/locales/ca-ES.json +0 -21
  230. package/locales/cs-CZ.json +0 -21
  231. package/locales/da-DK.json +0 -21
  232. package/locales/de-DE.json +0 -21
  233. package/locales/el-GR.json +0 -21
  234. package/locales/en.json +12 -20
  235. package/locales/es-ES.json +0 -21
  236. package/locales/fi-FI.json +0 -21
  237. package/locales/fr-FR.json +0 -21
  238. package/locales/he-IL.json +0 -21
  239. package/locales/hu-HU.json +0 -21
  240. package/locales/it-IT.json +0 -21
  241. package/locales/ja-JP.json +0 -21
  242. package/locales/ko-KR.json +0 -21
  243. package/locales/nl-NL.json +0 -21
  244. package/locales/no-NO.json +0 -21
  245. package/locales/pl-PL.json +0 -21
  246. package/locales/pseudo.json +8 -14
  247. package/locales/pt-BR.json +0 -21
  248. package/locales/pt-PT.json +0 -21
  249. package/locales/ro-RO.json +0 -21
  250. package/locales/ru-RU.json +0 -21
  251. package/locales/sr-SP.json +0 -21
  252. package/locales/sv-SE.json +0 -21
  253. package/locales/tr-TR.json +0 -21
  254. package/locales/uk-UA.json +0 -21
  255. package/locales/vi-VN.json +0 -21
  256. package/locales/zh-CN.json +0 -21
  257. package/locales/zh-TW.json +0 -21
  258. package/package.json +4 -4
  259. package/src/AppShell/AppShell.doc.mjs +1 -1
  260. package/src/AppShell/AppShell.spec.md +9 -12
  261. package/src/AppShell/AppShell.test.tsx +164 -2
  262. package/src/AppShell/AppShell.tsx +225 -5
  263. package/src/AppShell/__tests__/AppShellMainKeyboard.a11y.browser.spec.ts +534 -0
  264. package/src/AppShell/observeMainOverflow.test.ts +173 -0
  265. package/src/AppShell/observeMainOverflow.ts +143 -0
  266. package/src/Carousel/Carousel.doc.mjs +1 -1
  267. package/src/Carousel/Carousel.spec.md +9 -9
  268. package/src/Carousel/Carousel.test.tsx +124 -3
  269. package/src/Carousel/Carousel.tsx +10 -2
  270. package/src/Carousel/__tests__/Carousel.a11y.known-failures.ts +1 -16
  271. package/src/Chat/ChatComposer.spec.md +75 -59
  272. package/src/Chat/ChatComposerTokenElement.spec.md +45 -33
  273. package/src/Chat/ChatDictationButton.spec.md +126 -81
  274. package/src/Chat/ChatLayout.spec.md +41 -36
  275. package/src/Chat/ChatLayoutScrollButton.spec.md +87 -103
  276. package/src/Chat/ChatSendButton.spec.md +78 -67
  277. package/src/CodeBlock/__tests__/CodeBlockCopyClearance.a11y.chromium.spec.ts +38 -3
  278. package/src/ComplexSelector/ComplexSelector.test.tsx +111 -0
  279. package/src/ComplexSelector/ComplexSelector.tsx +41 -4
  280. package/src/ContextMenu/ContextMenu.spec.md +84 -56
  281. package/src/ContextMenu/ContextMenuItem.spec.md +132 -0
  282. package/src/DateInput/DateInputTouch.test.tsx +44 -0
  283. package/src/DateInput/Wheel.tsx +9 -6
  284. package/src/DateInput/usePointerDragScroll.ts +34 -10
  285. package/src/DateInput/useScrollSettle.ts +38 -7
  286. package/src/DropdownMenu/DropdownMenu.spec.md +198 -218
  287. package/src/DropdownMenu/DropdownMenu.test.tsx +117 -0
  288. package/src/DropdownMenu/DropdownMenu.tsx +33 -18
  289. package/src/DropdownMenu/DropdownMenuCheckboxItem.spec.md +192 -0
  290. package/src/DropdownMenu/DropdownMenuDivider.spec.md +25 -31
  291. package/src/DropdownMenu/DropdownMenuGroup.spec.md +145 -0
  292. package/src/DropdownMenu/DropdownMenuItem.spec.md +48 -42
  293. package/src/DropdownMenu/DropdownMenuRadioGroup.spec.md +34 -37
  294. package/src/DropdownMenu/DropdownMenuRadioItem.spec.md +54 -53
  295. package/src/DropdownMenu/DropdownMenuSubMenu.spec.md +47 -41
  296. package/src/EmptyState/EmptyState.spec.md +35 -29
  297. package/src/Item/Item.test.tsx +60 -0
  298. package/src/Item/Item.tsx +14 -7
  299. package/src/Layer/useLayer.test.tsx +78 -3
  300. package/src/Layer/useLayer.tsx +27 -6
  301. package/src/Link/Link.spec.md +3 -2
  302. package/src/Link/Link.tsx +11 -0
  303. package/src/Link/__tests__/Link.truncation.a11y.chromium.spec.ts +58 -0
  304. package/src/Markdown/plugins/headingLinks.a11y.chromium.spec.ts +1 -1
  305. package/src/NavMenu/NavHeadingMenuItem.tsx +5 -39
  306. package/src/NumberInput/NumberInput.test.tsx +68 -7
  307. package/src/NumberInput/NumberInput.tsx +31 -1
  308. package/src/Outline/Outline.spec.md +165 -69
  309. package/src/Outline/Outline.test.tsx +67 -2
  310. package/src/Outline/Outline.tsx +23 -0
  311. package/src/Outline/modules/parseOutlineFromMarkdown.spec.md +3 -4
  312. package/src/OverflowList/OverflowList.spec.md +102 -55
  313. package/src/Pagination/Pagination.spec.md +158 -84
  314. package/src/Popover/Popover.test.tsx +84 -0
  315. package/src/Popover/Popover.tsx +34 -14
  316. package/src/Popover/__tests__/PopoverSecondDocument.a11y.chromium.spec.ts +70 -8
  317. package/src/Popover/usePopover.tsx +10 -3
  318. package/src/PowerSearch/PowerSearch.test.tsx +24 -0
  319. package/src/PowerSearch/PowerSearch.tsx +42 -31
  320. package/src/RadioList/RadioList.spec.md +1 -1
  321. package/src/RadioList/RadioList.test.tsx +84 -0
  322. package/src/RadioList/RadioListItem.tsx +11 -2
  323. package/src/Resizable/Resizable.spec.md +144 -124
  324. package/src/SideNav/SideNav.test.tsx +124 -4
  325. package/src/SideNav/SideNavItem.spec.md +14 -24
  326. package/src/SideNav/SideNavItem.tsx +27 -10
  327. package/src/Skeleton/Skeleton.tsx +3 -1
  328. package/src/Spinner/Spinner.tsx +3 -1
  329. package/src/Stepper/Step.spec.md +36 -42
  330. package/src/Stepper/Step.tsx +33 -6
  331. package/src/Stepper/Stepper.doc.mjs +1 -1
  332. package/src/Stepper/Stepper.test.tsx +69 -7
  333. package/src/Switch/Switch.spec.md +1 -1
  334. package/src/Switch/Switch.test.tsx +66 -1
  335. package/src/Switch/Switch.tsx +11 -3
  336. package/src/Table/Table.spec.md +1 -1
  337. package/src/Table/Table.test.tsx +32 -0
  338. package/src/Table/Table.tsx +43 -11
  339. package/src/Table/__tests__/Table.a11y.states.ts +1 -5
  340. package/src/Table/plugins/sortable/useTableSortable.test.tsx +73 -144
  341. package/src/Table/plugins/sortable/useTableSortable.tsx +44 -73
  342. package/src/Table/plugins/sortable/useTableSortableState.test.tsx +9 -21
  343. package/src/TimeInput/TimeInput.spec.md +13 -13
  344. package/src/Toast/Toast.spec.md +2 -5
  345. package/src/Toast/ToastViewport.test.tsx +79 -0
  346. package/src/Toast/ToastViewport.tsx +21 -3
  347. package/src/ToggleButton/ToggleButton.test.tsx +27 -0
  348. package/src/ToggleButton/ToggleButtonGroup.tsx +20 -1
  349. package/src/Token/Token.doc.mjs +2 -2
  350. package/src/Token/Token.spec.md +41 -51
  351. package/src/Token/Token.test.tsx +67 -0
  352. package/src/Token/Token.tsx +60 -5
  353. package/src/Token/TokenLink.tsx +21 -7
  354. package/src/Tokenizer/Tokenizer.spec.md +13 -1
  355. package/src/Tokenizer/Tokenizer.test.tsx +27 -0
  356. package/src/Tokenizer/Tokenizer.tsx +24 -10
  357. package/src/Tokenizer/TokenizerBottomSheet.test.tsx +8 -0
  358. package/src/Tokenizer/TokenizerClearAllMessageContext.ts +21 -0
  359. package/src/TreeList/TreeList.test.tsx +26 -0
  360. package/src/TreeList/TreeListItem.tsx +26 -4
  361. package/src/Typeahead/BaseTypeahead.doc.mjs +3 -3
  362. package/src/Typeahead/BaseTypeahead.spec.md +45 -45
  363. package/src/Typeahead/BaseTypeahead.tsx +48 -9
  364. package/src/Typeahead/Typeahead.test.tsx +120 -0
  365. package/src/__tests__/internalModulesNotExperimental.test.ts +88 -0
  366. package/src/__tests__/pressState.ts +8 -4
  367. package/src/gestures/GestureArena.ts +76 -11
  368. package/src/gestures/GestureHost.ts +6 -7
  369. package/src/gestures/GestureRecognizer.ts +3 -1
  370. package/src/gestures/PressTracker.ts +386 -0
  371. package/src/gestures/README.md +420 -0
  372. package/src/gestures/__tests__/GestureHost.test.ts +50 -1
  373. package/src/gestures/__tests__/PressTracker.test.ts +275 -0
  374. package/src/gestures/__tests__/arena.test.ts +35 -0
  375. package/src/gestures/__tests__/harness.ts +31 -2
  376. package/src/gestures/__tests__/pressTrackerFactory.test.ts +59 -0
  377. package/src/gestures/__tests__/useGestureRecognizer.test.tsx +570 -0
  378. package/src/gestures/index.ts +79 -0
  379. package/src/gestures/useGestureRecognizer.ts +305 -0
  380. package/src/hooks/scrollKeyboardDelegation.test.ts +33 -0
  381. package/src/hooks/scrollKeyboardDelegation.ts +9 -3
  382. package/src/hooks/useScrollOverflow.doc.mjs +1 -1
  383. package/src/hooks/useScrollOverflow.test.tsx +102 -1
  384. package/src/hooks/useScrollOverflow.ts +59 -10
  385. package/src/i18n/generated-locales/af-ZA.generated.ts +0 -7
  386. package/src/i18n/generated-locales/ar-SA.generated.ts +0 -6
  387. package/src/i18n/generated-locales/ca-ES.generated.ts +0 -7
  388. package/src/i18n/generated-locales/cs-CZ.generated.ts +0 -6
  389. package/src/i18n/generated-locales/da-DK.generated.ts +0 -6
  390. package/src/i18n/generated-locales/de-DE.generated.ts +0 -6
  391. package/src/i18n/generated-locales/el-GR.generated.ts +0 -7
  392. package/src/i18n/generated-locales/en.generated.ts +3 -6
  393. package/src/i18n/generated-locales/es-ES.generated.ts +0 -7
  394. package/src/i18n/generated-locales/fi-FI.generated.ts +0 -6
  395. package/src/i18n/generated-locales/fr-FR.generated.ts +0 -7
  396. package/src/i18n/generated-locales/he-IL.generated.ts +0 -6
  397. package/src/i18n/generated-locales/hu-HU.generated.ts +0 -6
  398. package/src/i18n/generated-locales/it-IT.generated.ts +0 -7
  399. package/src/i18n/generated-locales/ja-JP.generated.ts +0 -6
  400. package/src/i18n/generated-locales/ko-KR.generated.ts +0 -6
  401. package/src/i18n/generated-locales/nl-NL.generated.ts +0 -6
  402. package/src/i18n/generated-locales/no-NO.generated.ts +0 -6
  403. package/src/i18n/generated-locales/pl-PL.generated.ts +0 -7
  404. package/src/i18n/generated-locales/pseudo.generated.ts +3 -6
  405. package/src/i18n/generated-locales/pt-BR.generated.ts +0 -7
  406. package/src/i18n/generated-locales/pt-PT.generated.ts +0 -7
  407. package/src/i18n/generated-locales/ro-RO.generated.ts +0 -6
  408. package/src/i18n/generated-locales/ru-RU.generated.ts +0 -7
  409. package/src/i18n/generated-locales/sr-SP.generated.ts +0 -6
  410. package/src/i18n/generated-locales/sv-SE.generated.ts +0 -6
  411. package/src/i18n/generated-locales/tr-TR.generated.ts +0 -7
  412. package/src/i18n/generated-locales/uk-UA.generated.ts +0 -7
  413. package/src/i18n/generated-locales/vi-VN.generated.ts +0 -6
  414. package/src/i18n/generated-locales/zh-CN.generated.ts +0 -6
  415. package/src/i18n/generated-locales/zh-TW.generated.ts +0 -6
  416. package/src/motion/MEASUREMENTS.md +2 -1
  417. package/src/motion/README.md +102 -32
  418. package/src/motion/__tests__/animator.interaction.browser.spec.ts +843 -0
  419. package/src/motion/__tests__/motionBundle.ts +14 -0
  420. package/src/motion/animator.test.ts +978 -33
  421. package/src/motion/animator.ts +790 -104
  422. package/src/motion/coast.ts +10 -3
  423. package/src/motion/reducedMotion.ts +12 -2
  424. package/src/motion/reducedMotionPlan.test.ts +26 -0
  425. package/src/motion/reducedMotionPlan.ts +20 -1
  426. package/src/motion/resolveMotion.test.ts +123 -0
  427. package/src/motion/resolveMotion.ts +68 -0
  428. package/src/motion/roleValue.ts +2 -1
  429. package/src/motion/roles.test.ts +21 -4
  430. package/src/motion/uikit/tableImports.test.ts +293 -0
  431. package/src/motion/uikit/timing.ts +15 -1
  432. package/src/motion/uikit/values.test.ts +23 -12
  433. package/src/theme/Theme.doc.mjs +1 -1
  434. package/src/theme/defineTheme.ts +116 -7
  435. package/src/theme/expandMotionScale.test.ts +1 -1
  436. package/src/theme/index.ts +5 -0
  437. package/src/theme/motionKnobs.ts +82 -0
  438. package/src/theme/resolveThemeValues.ts +68 -6
  439. package/src/theme/themeAdaptations.ts +52 -12
  440. package/src/theme/themeMotion.test.ts +620 -0
  441. package/src/theme/themeMotion.ts +221 -0
  442. package/src/theme/tokenReferences.ts +149 -0
  443. package/src/theme/tokens.stylex.ts +10 -0
  444. package/src/theme/tokens.ts +15 -158
  445. package/src/utils/focusOutline.stylex.ts +28 -0
  446. package/src/utils/interactionOverlay.stylex.ts +12 -3
  447. package/src/utils/pressFeedback.test.ts +138 -0
  448. package/src/utils/pressFeedback.ts +34 -11
  449. package/src/utils/pressGesture.test.ts +9 -0
  450. package/src/utils/sharedMutationObserver.test.ts +54 -1
  451. package/src/utils/sharedMutationObserver.ts +87 -29
  452. package/src/utils/touchPresentation.ts +8 -5
  453. package/src/utils/touchQueries.ts +15 -0
  454. package/src/utils/useFocusAcrossSwap.ts +55 -0
@@ -964,10 +964,71 @@ describe('SideNavItem', () => {
964
964
  expect(button).not.toHaveAttribute('aria-current');
965
965
  });
966
966
 
967
- it('disables the button when isDisabled', () => {
967
+ // spec:AST-085 FR1, FR2: a disabled item stays focusable but is inert.
968
+ it('keeps a disabled item focusable and exposes aria-disabled', () => {
968
969
  render(<SideNavItem label="Dashboard" isDisabled />);
969
- const button = screen.getByRole('button');
970
- expect(button).toBeDisabled();
970
+ const button = screen.getByRole('button', {name: 'Dashboard'});
971
+ expect(button).not.toHaveAttribute('disabled');
972
+ expect(button).toHaveAttribute('aria-disabled', 'true');
973
+ button.focus();
974
+ expect(button).toHaveFocus();
975
+ });
976
+
977
+ it('does not run onClick on a disabled item from a click, Enter or Space', async () => {
978
+ const user = userEvent.setup();
979
+ const handleClick = vi.fn();
980
+ render(<SideNavItem label="Dashboard" onClick={handleClick} isDisabled />);
981
+ const button = screen.getByRole('button', {name: 'Dashboard'});
982
+ fireEvent.click(button);
983
+ button.focus();
984
+ await user.keyboard('{Enter}');
985
+ await user.keyboard(' ');
986
+ expect(handleClick).not.toHaveBeenCalled();
987
+ });
988
+
989
+ it('renders a disabled item with href as a focusable button that does not navigate', () => {
990
+ const handleClick = vi.fn();
991
+ render(
992
+ <SideNavItem
993
+ label="Dashboard"
994
+ href="/dashboard"
995
+ onClick={handleClick}
996
+ isDisabled
997
+ />,
998
+ );
999
+ expect(screen.queryByRole('link')).toBeNull();
1000
+ const button = screen.getByRole('button', {name: 'Dashboard'});
1001
+ expect(button).not.toHaveAttribute('disabled');
1002
+ expect(button).not.toHaveAttribute('href');
1003
+ expect(button).toHaveAttribute('aria-disabled', 'true');
1004
+ fireEvent.click(button);
1005
+ expect(handleClick).not.toHaveBeenCalled();
1006
+ });
1007
+
1008
+ it('exposes aria-disabled on the primary of a disabled split row', () => {
1009
+ render(
1010
+ <SideNavItem label="Settings" href="/settings" collapsible isDisabled>
1011
+ <SideNavItem label="General" href="/settings/general" />
1012
+ </SideNavItem>,
1013
+ );
1014
+ const primary = screen.getByRole('button', {name: 'Settings'});
1015
+ expect(primary).not.toHaveAttribute('disabled');
1016
+ expect(primary).toHaveAttribute('aria-disabled', 'true');
1017
+ });
1018
+
1019
+ it('keeps focus on an item that becomes disabled while focused', () => {
1020
+ const item = (isDisabled: boolean) => (
1021
+ <SideNavItem
1022
+ label="Dashboard"
1023
+ onClick={() => {}}
1024
+ isDisabled={isDisabled}
1025
+ />
1026
+ );
1027
+ const {rerender} = render(item(false));
1028
+ const button = screen.getByRole('button', {name: 'Dashboard'});
1029
+ button.focus();
1030
+ rerender(item(true));
1031
+ expect(screen.getByRole('button', {name: 'Dashboard'})).toHaveFocus();
971
1032
  });
972
1033
 
973
1034
  it('calls onClick handler', async () => {
@@ -2447,6 +2508,18 @@ describe('SideNavItem — mobile drawer close-on-activate', () => {
2447
2508
  expect(closeMobileNav).not.toHaveBeenCalled();
2448
2509
  });
2449
2510
 
2511
+ it('does not close the mobile nav when a disabled item is activated', async () => {
2512
+ const user = userEvent.setup();
2513
+ const {closeMobileNav} = renderInDrawer(
2514
+ <SideNavItem label="Home" href="/" isDisabled data-testid="item" />,
2515
+ );
2516
+ const item = screen.getByTestId('item');
2517
+ fireEvent.click(item);
2518
+ item.focus();
2519
+ await user.keyboard('{Enter}');
2520
+ expect(closeMobileNav).not.toHaveBeenCalled();
2521
+ });
2522
+
2450
2523
  it('does not close the mobile nav when a row action is clicked', async () => {
2451
2524
  const user = userEvent.setup();
2452
2525
  const onActionClick = vi.fn();
@@ -2495,7 +2568,7 @@ describe('SideNav keyboard operation', () => {
2495
2568
  expect(screen.getByRole('button', {name: 'Settings'})).toHaveFocus();
2496
2569
  });
2497
2570
 
2498
- it('skips a disabled item in the tab order', async () => {
2571
+ it('keeps a disabled item in the tab order', async () => {
2499
2572
  const user = userEvent.setup();
2500
2573
  render(
2501
2574
  <SideNav>
@@ -2508,6 +2581,8 @@ describe('SideNav keyboard operation', () => {
2508
2581
  await user.tab();
2509
2582
  expect(screen.getByRole('button', {name: 'Dashboard'})).toHaveFocus();
2510
2583
  await user.tab();
2584
+ expect(screen.getByRole('button', {name: 'Archived'})).toHaveFocus();
2585
+ await user.tab();
2511
2586
  expect(screen.getByRole('button', {name: 'Settings'})).toHaveFocus();
2512
2587
  });
2513
2588
 
@@ -4001,6 +4076,51 @@ describe('SideNavItem collapsed-from-mount rail tooltip', () => {
4001
4076
  expect(spy.mock.contexts).toContain(layer);
4002
4077
  });
4003
4078
 
4079
+ it('describes a disabled rail item on the control that takes focus', async () => {
4080
+ // spec:AST-085 FR5: the disabled control keeps its tab stop, so the label
4081
+ // tooltip has to describe it, not the row around it.
4082
+ renderRail(
4083
+ <SideNavItem
4084
+ label="Analytics (Coming Soon)"
4085
+ icon={StubIcon}
4086
+ href="/analytics"
4087
+ isDisabled
4088
+ />,
4089
+ );
4090
+ await act(async () => {});
4091
+ const button = screen.getByRole('button', {
4092
+ name: 'Analytics (Coming Soon)',
4093
+ });
4094
+ expect(button).not.toHaveAttribute('disabled');
4095
+ expect(button).toHaveAttribute('aria-disabled', 'true');
4096
+ expect(railTooltipFor(button)).toHaveTextContent('Analytics (Coming Soon)');
4097
+ expect(button.parentElement).not.toHaveAttribute('aria-describedby');
4098
+ });
4099
+
4100
+ it('shows a disabled rail item its label when Tab focuses it', async () => {
4101
+ // The row listens for the tooltip, but it is not focusable itself, so it
4102
+ // has to hear the focus that bubbles up from the control.
4103
+ const user = userEvent.setup();
4104
+ const spy = vi.spyOn(HTMLElement.prototype, 'showPopover');
4105
+ showPopover = spy;
4106
+ renderRail(
4107
+ <SideNavItem
4108
+ label="Analytics (Coming Soon)"
4109
+ icon={StubIcon}
4110
+ href="/analytics"
4111
+ isDisabled
4112
+ />,
4113
+ );
4114
+ await act(async () => {});
4115
+ const button = screen.getByRole('button', {
4116
+ name: 'Analytics (Coming Soon)',
4117
+ });
4118
+
4119
+ await user.tab();
4120
+ expect(button).toHaveFocus();
4121
+ expect(spy.mock.contexts).toContain(railTooltipFor(button));
4122
+ });
4123
+
4004
4124
  it('describes the link once a disabled item is enabled in the rail', () => {
4005
4125
  const item = (isDisabled: boolean) => (
4006
4126
  <SideNavItem
@@ -39,7 +39,7 @@ system_specs: [spec:AST-085]
39
39
  | Behavior | One SideNav row: a link or button with optional icon and passive end content, optional row-level actions beside it, and optional nested children that can expand and collapse. In a collapsed rail it is icon-only with a tooltip or a flyout. |
40
40
  | End-user impact | Users see and hear the current page, reach row actions before nested items, expand or collapse groups without navigating, and return to the page after choosing a destination in the mobile drawer. |
41
41
  | Builder impact | None. |
42
- | Compatibility/readiness | Records shipped behavior; no public change. Four implementation gaps (see Current-state impact). |
42
+ | Compatibility/readiness | Records shipped behavior; no public change. Three implementation gaps (see Current-state impact). |
43
43
  | Review checks | Reject an interactive control rendered inside the primary element, a link that also toggles collapse, a toggle or action that activates the row, collapsed children that stay reachable, or a drawer activation that leaves the drawer open after navigating. |
44
44
  | Governing rules | `component:SideNav` FR1–FR5, DD1 (nesting and row geometry); `family:navigation-destinations`; `architecture:interaction-modality`; `architecture:public-component-api`. |
45
45
 
@@ -68,10 +68,6 @@ Consumer migration instructions belong in consumer docs and release notes.
68
68
 
69
69
  ## Current-state impact
70
70
 
71
- - **A disabled item leaves the tab order.** A disabled item renders a
72
- `<button>` with the native `disabled` attribute, so it is skipped by Tab and
73
- exposes no focusable disabled state. `spec:AST-085` FR1 has a disabled control
74
- expose `aria-disabled="true"` and keep its tab stop.
75
71
  - **A disabled parent stays operable in a collapsed rail.** In a collapsed rail,
76
72
  a disabled item with children renders its flyout trigger with neither
77
73
  `disabled` nor `aria-disabled`, so it keeps its tab stop and announces no
@@ -125,7 +121,7 @@ Consumer migration instructions belong in consumer docs and release notes.
125
121
 
126
122
  | ID | Invariant | Basis |
127
123
  | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
128
- | FR1 | The primary element is the `as` component, else the `LinkProvider` link, else `<a>`, when `href` is set and the item is enabled; otherwise a `<button type="button">`. A disabled item MUST stay focusable with `aria-disabled="true"` and keep its tab stop (`spec:AST-085` FR1). Implementation gap: a disabled item renders native `disabled` instead, which removes it from the tab order. It shows the icon (`selectedIcon` when selected and given), the label, `endContent`, and, for a whole-row collapsible item, a chevron. `endContent` is passive and renders inside the primary element. | Current source and tests |
124
+ | FR1 | The primary element is the `as` component, else the `LinkProvider` link, else `<a>`, when `href` is set and the item is enabled; otherwise a `<button type="button">`. A disabled item stays focusable with `aria-disabled="true"`, keeps its tab stop, and keeps focus when it becomes disabled (`spec:AST-085` FR1, FR4). It shows the icon (`selectedIcon` when selected and given), the label, `endContent`, and, for a whole-row collapsible item, a chevron. `endContent` is passive and renders inside the primary element. | Current source and tests |
129
125
  | FR2 | In an expanded rail and on a collapsed leaf, `isSelected` sets `aria-current="page"` on the primary element, never on a row wrapper. A collapsed parent's flyout trigger carries no `aria-current`. | Current source and tests |
130
126
  | FR3 | A disabled item does not fire `onClick` or navigate. Its row actions stay operable. | Current source and tests |
131
127
  | FR4 | `actions` render as siblings of the primary element at the row's trailing edge, after the toggle and before nested children in DOM and focus order, at the row's control size (`sm`) unless a control sets its own (`architecture:component-size-cascade`). Clicking an action neither activates nor toggles the row. A row wrapper exists only when there are actions or an independent toggle; a falsy `actions` adds none. | Current source and tests |
@@ -146,16 +142,16 @@ Consumer migration instructions belong in consumer docs and release notes.
146
142
 
147
143
  ### Representative states
148
144
 
149
- | State | Required invariant | Allowed variation |
150
- | -------------------------- | -------------------------------------------------------------------------------------- | ----------------- |
151
- | Link, selected | `aria-current="page"` on the link; selected icon if given. | Fill. |
152
- | Disabled button | `aria-disabled`; focusable; no `onClick`. Implementation gap: native `disabled` (FR1). | Muted styling. |
153
- | Collapsible without action | Whole row toggles; chevron turns. | — |
154
- | Collapsible with `href` | Link navigates; separate toggle button collapses. | — |
155
- | Actions | Actions after toggle, before children; never activate the row. | Action content. |
156
- | Collapsed rail leaf | Icon-only; tooltip with label. | — |
157
- | Collapsed rail parent | Icon-only trigger; flyout with header and children. | Delay. |
158
- | Mobile drawer | Activation closes the drawer. | — |
145
+ | State | Required invariant | Allowed variation |
146
+ | -------------------------- | -------------------------------------------------------------- | ----------------- |
147
+ | Link, selected | `aria-current="page"` on the link; selected icon if given. | Fill. |
148
+ | Disabled button | `aria-disabled`; focusable; no `onClick`. | Muted styling. |
149
+ | Collapsible without action | Whole row toggles; chevron turns. | — |
150
+ | Collapsible with `href` | Link navigates; separate toggle button collapses. | — |
151
+ | Actions | Actions after toggle, before children; never activate the row. | Action content. |
152
+ | Collapsed rail leaf | Icon-only; tooltip with label. | — |
153
+ | Collapsed rail parent | Icon-only trigger; flyout with header and children. | Delay. |
154
+ | Mobile drawer | Activation closes the drawer. | — |
159
155
 
160
156
  ### Transformation and precedence order
161
157
 
@@ -211,16 +207,10 @@ is recorded. Row geometry visual intent is `component:SideNav` DD1.
211
207
  | FR11 | `SideNav.test.tsx` focus ring suite | Plain, split, actions rows | Missing shared ring classes fail. | `audit:SideNavItem/accessibility` |
212
208
  | FR3, FR7, FR9 | `SideNav.test.tsx` keyboard operation and focus management suites | Tab order, Enter/Space toggle, flyout Escape | Lost order, a stranded focus, or no focus return fails. | `audit:SideNavItem/accessibility` |
213
209
 
214
- Pending conformance: the SideNavItem suite's native-`disabled` assertion and
215
- the keyboard suite's disabled Tab-skip assertion pin FR1's implementation gap;
216
- they change when disabled items follow `spec:AST-085`.
217
-
218
210
  Read from source, with no focused test yet:
219
211
 
220
- - FR1 and ORD1–ORD2: a disabled item with `href` rendering a button, the
221
- required focusable `aria-disabled` shape (no item renders it yet), the
222
- button's `type="button"`, the icon, the selected-icon swap, and the whole-row
223
- chevron.
212
+ - FR1 and ORD1–ORD2: the button's `type="button"`, the icon, the
213
+ selected-icon swap, and the whole-row chevron.
224
214
  - FR4: the actions' trailing-edge placement and the wrapper for an independent
225
215
  toggle without actions.
226
216
  - FR5: the forwarded `ref` and `xstyle` on the outer box.
@@ -13,8 +13,8 @@
13
13
  * provided and fall back to `label` when it is missing or blank. Their label
14
14
  * tooltip binds to the interactive control through a callback ref, so hover,
15
15
  * keyboard focus, and `aria-describedby` follow the control from the first
16
- * collapsed render. A disabled control takes neither pointer nor focus, so its
17
- * row is the tooltip's trigger instead.
16
+ * collapsed render. A disabled control takes no pointer, so its row listens
17
+ * for the tooltip instead, while the control keeps focus and the description.
18
18
  *
19
19
  * Collapsed items with children open their submenu flyout through
20
20
  * `useMenuHover`, the shared hover-intent hook (same one `SideNavHeading` and
@@ -74,6 +74,7 @@ import {
74
74
  import {useSideNavRenderMode} from './SideNavRenderContext';
75
75
  import {useAppShellMobile} from '../AppShell/AppShellMobileContext';
76
76
  import {themeProps} from '../utils/themeProps';
77
+ import {disabledInteractionProps} from '../utils/disabledInteraction';
77
78
  import {useTranslator} from '../i18n';
78
79
 
79
80
  import {useMergedRefs} from '../hooks/useMergedRefs';
@@ -324,6 +325,8 @@ interface NavItemElementProps {
324
325
  /**
325
326
  * Renders `<a>` (via LinkComponent) when `href` is set, otherwise `<button>`.
326
327
  * Centralizes the link-vs-button decision used across all SideNavItem paths.
328
+ * A disabled item is a `<button>` that keeps its tab stop and exposes
329
+ * `aria-disabled`, but is inert (spec:AST-085 FR1, FR2).
327
330
  */
328
331
  function NavItemElement({
329
332
  href,
@@ -351,8 +354,16 @@ function NavItemElement({
351
354
  ref={ref as React.Ref<HTMLButtonElement>}
352
355
  type="button"
353
356
  onClick={onClick}
354
- disabled={isDisabled}
355
- {...rest}>
357
+ {...rest}
358
+ {...(isDisabled
359
+ ? {
360
+ 'aria-disabled': true,
361
+ ...disabledInteractionProps(
362
+ rest.onKeyDown as
363
+ React.KeyboardEventHandler<HTMLButtonElement> | undefined,
364
+ ),
365
+ }
366
+ : null)}>
356
367
  {children}
357
368
  </button>
358
369
  );
@@ -539,6 +550,10 @@ export function SideNavItem({
539
550
  const isRailLeaf = isCollapsed && !hasChildren;
540
551
  const railTooltip = useTooltip({
541
552
  placement: 'end',
553
+ // A disabled leaf's row is the trigger (see the collapsed path). It is not
554
+ // focusable itself, so `auto` would never hear the focus that bubbles up
555
+ // from its control.
556
+ focusTrigger: 'always',
542
557
  isEnabled: isRailLeaf,
543
558
  isOpen: isRailLeaf ? undefined : false,
544
559
  });
@@ -702,14 +717,17 @@ export function SideNavItem({
702
717
 
703
718
  // Items without children: icon-only link or button, its label in a
704
719
  // tooltip. The control is the trigger, so the element that takes focus is
705
- // the one described. A disabled control takes neither pointer
706
- // (`navItemStyles.disabled`) nor focus, so its row is the trigger instead.
720
+ // the one described. A disabled control takes no pointer
721
+ // (`navItemStyles.disabled`), so its row listens for the tooltip instead;
722
+ // the control still takes focus (focusin reaches the row) and stays the
723
+ // element described (spec:AST-085 FR5).
707
724
  const isRowTrigger = isDisabled;
708
725
  const collapsedAriaProps = {
709
726
  'aria-current': isSelected ? ('page' as const) : undefined,
710
- 'aria-describedby': isRowTrigger
711
- ? rest['aria-describedby']
712
- : joinIds(rest['aria-describedby'], railTooltip.describedBy),
727
+ 'aria-describedby': joinIds(
728
+ rest['aria-describedby'],
729
+ railTooltip.describedBy,
730
+ ),
713
731
  'aria-disabled': isDisabled || undefined,
714
732
  'aria-label': collapsedAccessibleLabel,
715
733
  'data-testid': testId,
@@ -732,7 +750,6 @@ export function SideNavItem({
732
750
  return (
733
751
  <div
734
752
  ref={isRowTrigger ? railTooltip.ref : undefined}
735
- aria-describedby={isRowTrigger ? railTooltip.describedBy : undefined}
736
753
  {...stylex.props(styles.root, xstyle)}>
737
754
  {collapsedElement}
738
755
  {railTooltip.renderTooltip(label)}
@@ -97,7 +97,9 @@ const styles = stylex.create({
97
97
  },
98
98
  animate: {
99
99
  animationDirection: 'alternate',
100
- animationDuration: durationVars['--duration-medium-max'],
100
+ // The loop reads the duration before a theme's tempo scales it
101
+ // (spec:AST-108 FR4).
102
+ animationDuration: `var(--_astryx-pre-tempo-duration-medium-max, ${durationVars['--duration-medium-max']})`,
101
103
  animationIterationCount: 'infinite',
102
104
  // Disable the pulse under reduced-motion; the static placeholder still
103
105
  // reads as loading (complex-20).
@@ -334,7 +334,9 @@ const styles = stylex.create({
334
334
  // it (a frozen spinner reads as broken), matching ProgressBar's approach.
335
335
  // The role="status" + "Loading" label still convey busy state (obs-6).
336
336
  animationDuration: {
337
- default: durationVars['--duration-slow-min'],
337
+ // The loop reads the duration before a theme's tempo scales it
338
+ // (spec:AST-108 FR4).
339
+ default: `var(--_astryx-pre-tempo-duration-slow-min, ${durationVars['--duration-slow-min']})`,
338
340
  '@media (prefers-reduced-motion: reduce)': '3s',
339
341
  },
340
342
  animationIterationCount: 'infinite',
@@ -28,15 +28,15 @@ system_specs: [spec:AST-085]
28
28
 
29
29
  ## Contract at a glance
30
30
 
31
- | Area | Contract |
32
- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
33
- | Public contract | `Step` with `step`, `label`, `description`, `children`, `status`, `indicator` (`auto`, `number`, `none`, or a node; default `auto`), `isDisabled`, `isOptional`, `endContent`, and `density`. |
34
- | Behavior | One list item of a Stepper. Its progress (completed, in progress, not started) comes from its `step` index against the Stepper's active step; it is a button that asks to go to that step when the Stepper has `onStepClick`, it is enabled, and the Stepper is not compact. |
35
- | End-user impact | Users see each step's progress (number, ring, or check) and its status cue where one applies; screen-reader users hear the current step, a status word, and a "Go to step N" name on clickable steps; keyboard users Tab between enabled clickable steps. |
36
- | Builder impact | None. |
37
- | Compatibility/readiness | Records shipped behavior; no public change. Three implementation gaps (see Current-state impact). |
38
- | Review checks | Reject status conveyed only by color under `indicator="auto"`, an indicator exposed to assistive technology, a disabled step that activates, or `aria-current` on anything but the in-progress step. |
39
- | Governing rules | `component:Stepper` (targets, connector, label paint, compact layout); `architecture:interaction-modality`. |
31
+ | Area | Contract |
32
+ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
33
+ | Public contract | `Step` with `step`, `label`, `description`, `children`, `status`, `indicator` (`auto`, `number`, `none`, or a node; default `auto`), `isDisabled`, `isOptional`, `endContent`, and `density`. |
34
+ | Behavior | One list item of a Stepper. Its progress (completed, in progress, not started) comes from its `step` index against the Stepper's active step; it is a button that asks to go to that step when the Stepper has `onStepClick` and is not compact; a disabled step keeps its button, `aria-disabled`, and never activates. |
35
+ | End-user impact | Users see each step's progress (number, ring, or check) and its status cue where one applies; screen-reader users hear the current step, a status word, a "Go to step N" name and the step's description on clickable steps; keyboard users Tab between clickable steps, disabled ones included. |
36
+ | Builder impact | None. |
37
+ | Compatibility/readiness | Records shipped behavior; no public change. Two implementation gaps (see Current-state impact). |
38
+ | Review checks | Reject status conveyed only by color under `indicator="auto"`, an indicator exposed to assistive technology, a disabled step that activates, or `aria-current` on anything but the in-progress step. |
39
+ | Governing rules | `component:Stepper` (targets, connector, label paint, compact layout); `architecture:interaction-modality`. |
40
40
 
41
41
  This table is a review projection; the body below is authoritative.
42
42
 
@@ -56,12 +56,6 @@ Consumer migration instructions belong in consumer docs and release notes.
56
56
 
57
57
  ## Current-state impact
58
58
 
59
- - **A disabled step leaves the tab order.** In a clickable Stepper outside
60
- compact mode a disabled Step renders no button, so keyboard users cannot reach
61
- it or learn that it is disabled, and a focused step that becomes disabled
62
- loses its button, dropping focus to the page. `spec:AST-085` FR1, FR4, and FR5
63
- have a disabled control stay focusable, keep focus, and expose
64
- `aria-disabled="true"`.
65
59
  - **Other indicator modes show status by color alone, or not at all.** With
66
60
  `indicator="number"`, a reached step shows status only through badge color
67
61
  and a not-started step shows none. A custom node shows status only through
@@ -70,9 +64,9 @@ Consumer migration instructions belong in consumer docs and release notes.
70
64
  its `status`, so in both cases status shows only in the visually hidden word. WCAG 1.4.1 requires information
71
65
  not to be conveyed by color alone.
72
66
  - **A clickable step's name hides its other text.** The button's name is the
73
- step number, label, and status word, and nothing describes it, so the
74
- description, the "Optional" cue, and `endContent` never reach assistive
75
- technology on a clickable step. WCAG 1.3.1 requires information shown to be
67
+ step number, label, and status word, and only the description describes it,
68
+ so the "Optional" cue and `endContent` never reach assistive technology on a
69
+ clickable step. WCAG 1.3.1 requires information shown to be
76
70
  available programmatically.
77
71
 
78
72
  ## Ownership boundary
@@ -105,17 +99,17 @@ Consumer migration instructions belong in consumer docs and release notes.
105
99
 
106
100
  ## Behavioral and layout contract
107
101
 
108
- | ID | Invariant | Basis |
109
- | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------- |
110
- | FR1 | A Step renders one `<li>`. Its progress is `in-progress` when `step` equals the Stepper's active step, `completed` when it is lower, and `not-started` when higher; only the in-progress step carries `aria-current="step"`. It registers its index and a live disabled check with the Stepper. | Current source and tests |
111
- | FR2 | With `onStepClick` on the Stepper, an enabled Step outside compact mode wraps its indicator, label, and description in a `<button>` (the content slot stays outside it) named by `@astryx.step.goToStep` ("Go to step N: label") or `.goToStepWithStatus` when a status word applies; activation (click, Enter, Space) calls `onStepClick(step)`. Completed, in-progress, and upcoming steps are all clickable. Any Step without `onStepClick` renders no button. A disabled Step in a clickable Stepper outside compact mode MUST stay focusable with `aria-disabled="true"` and keep its tab stop (`spec:AST-085` FR1, FR5). Implementation gap: it renders no button, so it leaves the tab order, exposes no disabled state, and drops focus when it becomes disabled while focused (`spec:AST-085` FR4). | Current source and tests |
112
- | FR3 | `indicator="auto"` shows the number while not started, the ring while in progress, and a check once completed; `number` always shows the number; `none` shows nothing; a non-string node renders as given; any other string falls back to the ring while not started or in progress and the check once completed, with no number, status glyph, or status color. Indicators are `aria-hidden`. | Current source and tests |
113
- | FR4 | `status` never recolors the progress bar. Under `indicator="auto"` it recolors a non-current step with `success`, `warning`, or `error` and shows a distinct status glyph (replacing the number on not-started steps); the current step's ring and `accent` keep progress color. Under `number` it recolors reached badges only. | Current source and tests |
114
- | FR5 | Each Step exposes a visually hidden status word: `error` or `warning` for those statuses, `completed` when completed or `success`, in every layout. | Current source and tests |
115
- | FR6 | `isDisabled` dims the indicator with fixed paint and no theme state (the label's disabled paint and its `disabled` selector are `component:Stepper` FR10) and blocks activation (FR2's implementation gap). `isOptional` appends the translated `@astryx.step.optional` ("Optional") after the label. `endContent` sits at the end of the label row. | Current source and tests |
116
- | FR7 | `density` sets the Step's padding: block padding in every layout, plus inline padding for spacious separated steps and both axes for vertical on-track steps; it falls back to the Stepper's density. | Current source |
117
- | FR8 | `children` render below the label and description; in a compact horizontal Stepper they stay mounted, hidden with the expanded details, so local state survives. The label stays on one line and ellipsizes; its full text remains in the accessible name. | Current source, docs, and tests |
118
- | FR9 | The step button paints the shared focus outline. | Current source |
102
+ | ID | Invariant | Basis |
103
+ | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
104
+ | FR1 | A Step renders one `<li>`. Its progress is `in-progress` when `step` equals the Stepper's active step, `completed` when it is lower, and `not-started` when higher; only the in-progress step carries `aria-current="step"`. It registers its index and a live disabled check with the Stepper. | Current source and tests |
105
+ | FR2 | With `onStepClick` on the Stepper, an enabled Step outside compact mode wraps its indicator, label, and description in a `<button>` (the content slot stays outside it) named by `@astryx.step.goToStep` ("Go to step N: label") or `.goToStepWithStatus` when a status word applies; activation (click, Enter, Space) calls `onStepClick(step)`. Completed, in-progress, and upcoming steps are all clickable. Any Step without `onStepClick` renders no button. A disabled Step in a clickable Stepper outside compact mode keeps its button, focusable with `aria-disabled="true"` and the same name, keeps its tab stop and its focus when it becomes disabled while focused, and does not activate (`spec:AST-085` FR1, FR4). A clickable Step's description describes its button, so a disabled step's reason reaches assistive technology (`spec:AST-085` FR5). | Current source and tests |
106
+ | FR3 | `indicator="auto"` shows the number while not started, the ring while in progress, and a check once completed; `number` always shows the number; `none` shows nothing; a non-string node renders as given; any other string falls back to the ring while not started or in progress and the check once completed, with no number, status glyph, or status color. Indicators are `aria-hidden`. | Current source and tests |
107
+ | FR4 | `status` never recolors the progress bar. Under `indicator="auto"` it recolors a non-current step with `success`, `warning`, or `error` and shows a distinct status glyph (replacing the number on not-started steps); the current step's ring and `accent` keep progress color. Under `number` it recolors reached badges only. | Current source and tests |
108
+ | FR5 | Each Step exposes a visually hidden status word: `error` or `warning` for those statuses, `completed` when completed or `success`, in every layout. | Current source and tests |
109
+ | FR6 | `isDisabled` dims the indicator with fixed paint and no theme state (the label's disabled paint and its `disabled` selector are `component:Stepper` FR10) and blocks activation (FR2). `isOptional` appends the translated `@astryx.step.optional` ("Optional") after the label. `endContent` sits at the end of the label row. | Current source and tests |
110
+ | FR7 | `density` sets the Step's padding: block padding in every layout, plus inline padding for spacious separated steps and both axes for vertical on-track steps; it falls back to the Stepper's density. | Current source |
111
+ | FR8 | `children` render below the label and description; in a compact horizontal Stepper they stay mounted, hidden with the expanded details, so local state survives. The label stays on one line and ellipsizes; its full text remains in the accessible name. | Current source, docs, and tests |
112
+ | FR9 | The step button paints the shared focus outline. | Current source |
119
113
 
120
114
  ### Allowed variation
121
115
 
@@ -129,7 +123,7 @@ Consumer migration instructions belong in consumer docs and release notes.
129
123
  | Completed, clickable | Check indicator; "completed" text; named button. | Status color. |
130
124
  | In progress | `aria-current="step"`; ring indicator. | — |
131
125
  | Not started with error | Error glyph replaces the number; "error" text. | — |
132
- | Disabled | Dimmed; no activation. Implementation gap: no button (FR2). | — |
126
+ | Disabled | Dimmed; focusable and `aria-disabled`; no activation (FR2). | — |
133
127
  | Compact horizontal | No button; content mounted but hidden. | — |
134
128
 
135
129
  ### Transformation and precedence order
@@ -152,11 +146,11 @@ Consumer migration instructions belong in consumer docs and release notes.
152
146
  hidden word (Current-state
153
147
  impact).
154
148
  - **AR3 — Clickable name.** FR2's button name includes the step number, label,
155
- and status word. Implementation gap: a clickable step's description, optional
156
- cue, and `endContent` are not exposed (Current-state impact).
157
- - **AR4 — Keyboard.** Clickable steps are reached with Tab in document order and
158
- activate with Enter or Space; today disabled steps are skipped (FR2's
159
- implementation gap).
149
+ and status word, and the step's description describes it. Implementation gap:
150
+ a clickable step's optional cue and `endContent` are not exposed
151
+ (Current-state impact).
152
+ - **AR4 — Keyboard.** Clickable steps, disabled ones included, are reached with
153
+ Tab in document order; enabled ones activate with Enter or Space.
160
154
 
161
155
  ## Design relationships
162
156
 
@@ -175,13 +169,13 @@ Consumer migration instructions belong in consumer docs and release notes.
175
169
 
176
170
  ## Verification map
177
171
 
178
- | Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
179
- | ------------ | ------------------------------------------------------------------- | ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
180
- | FR1 | `Stepper.test.tsx` list and aria-current tests | Each progress | Wrong current step fails. | `audit:Step/accessibility` |
181
- | FR2, AR3–AR4 | `Stepper.test.tsx` onStepClick, keyboard, and accessible-name tests | Completed, active, upcoming, disabled | A missing button or wrong name fails; the disabled-step and Tab-skip assertions pin FR2's implementation gap (pending conformance). | `audit:Step/behavior` |
182
- | FR3, FR4 | `Stepper.test.tsx` step-number, indicator, and status glyph tests | Each indicator mode and status | Wrong glyph or recolored bar fails. | `audit:Step/behavior` |
183
- | FR8 | `Stepper.test.tsx` compact content-mount tests | Both indicator positions | Step content that loses its state while hidden in a compact Stepper fails. | `audit:Step/behavior` |
184
- | FR5, AR2 | `Stepper.test.tsx` hidden status text tests | Separated and on-track | Missing status text fails. | `audit:Step/accessibility` |
172
+ | Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
173
+ | ------------ | ------------------------------------------------------------------- | ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
174
+ | FR1 | `Stepper.test.tsx` list and aria-current tests | Each progress | Wrong current step fails. | `audit:Step/accessibility` |
175
+ | FR2, AR3–AR4 | `Stepper.test.tsx` onStepClick, keyboard, and accessible-name tests | Completed, active, upcoming, disabled | A missing button or wrong name fails, and so does a disabled step that leaves the tab order, loses focus when it becomes disabled, lacks `aria-disabled`, or activates. | `audit:Step/behavior` |
176
+ | FR3, FR4 | `Stepper.test.tsx` step-number, indicator, and status glyph tests | Each indicator mode and status | Wrong glyph or recolored bar fails. | `audit:Step/behavior` |
177
+ | FR8 | `Stepper.test.tsx` compact content-mount tests | Both indicator positions | Step content that loses its state while hidden in a compact Stepper fails. | `audit:Step/behavior` |
178
+ | FR5, AR2 | `Stepper.test.tsx` hidden status text tests | Separated and on-track | Missing status text fails. | `audit:Step/accessibility` |
185
179
 
186
180
  Read from source, with no focused test yet:
187
181