@astryxdesign/core 0.7.17-canary.gffd1fc0 → 0.7.17

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 (950) hide show
  1. package/CHANGELOG.md +334 -0
  2. package/README.md +26 -9
  3. package/dist/AlertDialog/AlertDialog.d.ts +1 -1
  4. package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
  5. package/dist/AlertDialog/AlertDialog.js +6 -8
  6. package/dist/AppShell/AppShell.d.ts +7 -3
  7. package/dist/AppShell/AppShell.d.ts.map +1 -1
  8. package/dist/AppShell/AppShell.js +74 -36
  9. package/dist/AppShell/unreadWidthPoint.d.ts +29 -0
  10. package/dist/AppShell/unreadWidthPoint.d.ts.map +1 -0
  11. package/dist/AppShell/unreadWidthPoint.js +134 -0
  12. package/dist/AvatarGroup/AvatarGroupOverflow.d.ts +1 -1
  13. package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
  14. package/dist/AvatarGroup/AvatarGroupOverflow.js +5 -1
  15. package/dist/Badge/Badge.d.ts.map +1 -1
  16. package/dist/Badge/Badge.js +2 -2
  17. package/dist/Banner/Banner.d.ts +6 -4
  18. package/dist/Banner/Banner.d.ts.map +1 -1
  19. package/dist/Banner/Banner.js +32 -29
  20. package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
  21. package/dist/BottomSheet/BottomSheet.js +3 -1
  22. package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
  23. package/dist/BottomSheet/BottomSheetPanel.js +11 -7
  24. package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
  25. package/dist/BottomSheet/BottomSheetSwitcher.js +57 -2
  26. package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts +5 -0
  27. package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts.map +1 -1
  28. package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -1
  29. package/dist/BottomSheet/bottomSheetStack.js +6 -14
  30. package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
  31. package/dist/Breadcrumbs/BreadcrumbItem.js +12 -1
  32. package/dist/Button/Button.d.ts.map +1 -1
  33. package/dist/Button/Button.js +45 -7
  34. package/dist/Calendar/Calendar.js +8 -2
  35. package/dist/Calendar/styles.d.ts +10 -6
  36. package/dist/Calendar/styles.d.ts.map +1 -1
  37. package/dist/Calendar/styles.js +7 -3
  38. package/dist/Card/Card.d.ts.map +1 -1
  39. package/dist/Card/Card.js +23 -4
  40. package/dist/Chat/ChatComposer.d.ts +1 -1
  41. package/dist/Chat/ChatComposer.d.ts.map +1 -1
  42. package/dist/Chat/ChatComposer.js +4 -4
  43. package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
  44. package/dist/Chat/ChatComposerDrawer.js +8 -4
  45. package/dist/Chat/ChatDictationButton.d.ts.map +1 -1
  46. package/dist/Chat/ChatDictationButton.js +7 -0
  47. package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
  48. package/dist/Chat/ChatPastedTextToken.js +3 -9
  49. package/dist/Chat/ChatSendButton.d.ts.map +1 -1
  50. package/dist/Chat/ChatSendButton.js +3 -0
  51. package/dist/Chat/ChatSystemMessage.d.ts.map +1 -1
  52. package/dist/Chat/ChatSystemMessage.js +1 -0
  53. package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
  54. package/dist/Chat/ChatToolCalls.js +8 -0
  55. package/dist/Chat/pastedTextLabel.d.ts +4 -0
  56. package/dist/Chat/pastedTextLabel.d.ts.map +1 -0
  57. package/dist/Chat/pastedTextLabel.js +21 -0
  58. package/dist/Chat/useChatPasteAsToken.d.ts.map +1 -1
  59. package/dist/Chat/useChatPasteAsToken.js +8 -8
  60. package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
  61. package/dist/Chat/useTriggerMenu.js +3 -3
  62. package/dist/CheckboxInput/CheckboxInput.d.ts +2 -1
  63. package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
  64. package/dist/CheckboxInput/CheckboxInput.js +69 -18
  65. package/dist/Citation/Citation.d.ts.map +1 -1
  66. package/dist/Citation/Citation.js +8 -1
  67. package/dist/Code/Code.d.ts.map +1 -1
  68. package/dist/Code/Code.js +5 -1
  69. package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
  70. package/dist/CodeBlock/CodeBlock.js +39 -12
  71. package/dist/CodeBlock/highlightRanges.d.ts.map +1 -1
  72. package/dist/CodeBlock/highlightRanges.js +6 -5
  73. package/dist/Collapsible/Collapsible.d.ts.map +1 -1
  74. package/dist/Collapsible/Collapsible.js +2 -0
  75. package/dist/CommandPalette/CommandPaletteItem.d.ts.map +1 -1
  76. package/dist/CommandPalette/CommandPaletteItem.js +1 -0
  77. package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
  78. package/dist/ComplexSelector/ComplexSelector.js +8 -1
  79. package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
  80. package/dist/ContextMenu/ContextMenu.js +32 -5
  81. package/dist/DateInput/MonthScroller.d.ts.map +1 -1
  82. package/dist/DateInput/MonthScroller.js +1 -0
  83. package/dist/DateInput/PickerWheel.d.ts.map +1 -1
  84. package/dist/DateInput/PickerWheel.js +3 -2
  85. package/dist/DateInput/TouchDateField.d.ts.map +1 -1
  86. package/dist/DateInput/TouchDateField.js +2 -1
  87. package/dist/DateInput/Wheel.d.ts.map +1 -1
  88. package/dist/DateInput/Wheel.js +8 -8
  89. package/dist/DateInput/usePointerDragScroll.d.ts.map +1 -1
  90. package/dist/DateInput/usePointerDragScroll.js +5 -2
  91. package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
  92. package/dist/DateRangeInput/DateRangeInput.js +7 -0
  93. package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
  94. package/dist/DateTimeInput/TouchDateTimeField.js +2 -1
  95. package/dist/DateTimeInput/nativePickerSegmentStyles.d.ts +2 -2
  96. package/dist/Dialog/Dialog.d.ts.map +1 -1
  97. package/dist/Dialog/Dialog.js +104 -18
  98. package/dist/Dialog/DialogContext.d.ts +5 -4
  99. package/dist/Dialog/DialogContext.d.ts.map +1 -1
  100. package/dist/Dialog/DialogHeader.d.ts.map +1 -1
  101. package/dist/Dialog/DialogHeader.js +38 -12
  102. package/dist/Drawer/DrawerHeader.d.ts.map +1 -1
  103. package/dist/Drawer/DrawerHeader.js +23 -8
  104. package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  105. package/dist/DropdownMenu/DropdownMenu.js +23 -17
  106. package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
  107. package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +3 -3
  108. package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
  109. package/dist/DropdownMenu/DropdownMenuItem.js +3 -2
  110. package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
  111. package/dist/DropdownMenu/DropdownMenuRadioItem.js +3 -3
  112. package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
  113. package/dist/DropdownMenu/DropdownMenuSubMenu.js +19 -2
  114. package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts +6 -3
  115. package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts.map +1 -1
  116. package/dist/DropdownMenu/lazyMenuBottomSheet.js +31 -7
  117. package/dist/DropdownMenu/menuRowCorners.stylex.d.ts +24 -0
  118. package/dist/DropdownMenu/menuRowCorners.stylex.d.ts.map +1 -0
  119. package/dist/DropdownMenu/menuRowCorners.stylex.js +29 -0
  120. package/dist/EmptyState/EmptyState.d.ts.map +1 -1
  121. package/dist/EmptyState/EmptyState.js +2 -2
  122. package/dist/Field/FieldLabel.d.ts.map +1 -1
  123. package/dist/Field/FieldLabel.js +2 -2
  124. package/dist/Field/inputDisabledFocus.d.ts +4 -0
  125. package/dist/Field/inputDisabledFocus.d.ts.map +1 -1
  126. package/dist/Field/inputDisabledFocus.js +5 -0
  127. package/dist/Field/inputStyles.stylex.d.ts +31 -4
  128. package/dist/Field/inputStyles.stylex.d.ts.map +1 -1
  129. package/dist/Field/inputStyles.stylex.js +30 -5
  130. package/dist/Grid/Grid.d.ts +2 -1
  131. package/dist/Grid/Grid.d.ts.map +1 -1
  132. package/dist/Grid/Grid.js +5 -2
  133. package/dist/Heading/Heading.d.ts +1 -1
  134. package/dist/Heading/Heading.d.ts.map +1 -1
  135. package/dist/Heading/Heading.js +15 -1
  136. package/dist/Icon/Icon.d.ts +1 -1
  137. package/dist/Icon/Icon.d.ts.map +1 -1
  138. package/dist/Icon/Icon.js +32 -2
  139. package/dist/Indicator/CheckboxIndicator.d.ts.map +1 -1
  140. package/dist/Indicator/CheckboxIndicator.js +12 -6
  141. package/dist/Indicator/RadioIndicator.d.ts.map +1 -1
  142. package/dist/Indicator/RadioIndicator.js +18 -4
  143. package/dist/Indicator/indicatorRegistry.d.ts +3 -26
  144. package/dist/Indicator/indicatorRegistry.d.ts.map +1 -1
  145. package/dist/Indicator/indicatorRegistry.js +2 -11
  146. package/dist/Indicator/themeIndicators.d.ts +15 -0
  147. package/dist/Indicator/themeIndicators.d.ts.map +1 -0
  148. package/dist/Indicator/themeIndicators.js +21 -0
  149. package/dist/Indicator/types.d.ts +14 -0
  150. package/dist/Indicator/types.d.ts.map +1 -1
  151. package/dist/Indicator/useThemeIndicator.d.ts +3 -0
  152. package/dist/Indicator/useThemeIndicator.d.ts.map +1 -0
  153. package/dist/Indicator/useThemeIndicator.js +19 -0
  154. package/dist/Item/Item.d.ts +6 -2
  155. package/dist/Item/Item.d.ts.map +1 -1
  156. package/dist/Item/Item.js +30 -2
  157. package/dist/Kbd/Kbd.d.ts.map +1 -1
  158. package/dist/Kbd/Kbd.js +9 -2
  159. package/dist/Layer/layerExitCopy.d.ts.map +1 -1
  160. package/dist/Layer/layerExitCopy.js +1 -1
  161. package/dist/Layer/layerSlideRules.d.ts +23 -15
  162. package/dist/Layer/layerSlideRules.d.ts.map +1 -1
  163. package/dist/Layer/layerSlideRules.js +54 -54
  164. package/dist/Layer/useLayer.d.ts +41 -29
  165. package/dist/Layer/useLayer.d.ts.map +1 -1
  166. package/dist/Layer/useLayer.js +199 -126
  167. package/dist/Layer/useLayerKeyboardClearance.d.ts +5 -5
  168. package/dist/Layer/useLayerKeyboardClearance.d.ts.map +1 -1
  169. package/dist/Layer/useLayerKeyboardClearance.js +5 -5
  170. package/dist/Layout/LayoutContainerContext.d.ts +4 -0
  171. package/dist/Layout/LayoutContainerContext.d.ts.map +1 -0
  172. package/dist/Layout/LayoutContainerContext.js +20 -0
  173. package/dist/Layout/LayoutContainerScope.d.ts +15 -0
  174. package/dist/Layout/LayoutContainerScope.d.ts.map +1 -0
  175. package/dist/Layout/LayoutContainerScope.js +23 -0
  176. package/dist/Layout/LayoutContent.d.ts +2 -1
  177. package/dist/Layout/LayoutContent.d.ts.map +1 -1
  178. package/dist/Layout/LayoutContent.js +7 -2
  179. package/dist/Layout/LayoutFooter.d.ts.map +1 -1
  180. package/dist/Layout/LayoutFooter.js +5 -1
  181. package/dist/Layout/LayoutHeader.d.ts.map +1 -1
  182. package/dist/Layout/LayoutHeader.js +5 -1
  183. package/dist/Layout/containerCorners.stylex.d.ts +15 -7
  184. package/dist/Layout/containerCorners.stylex.d.ts.map +1 -1
  185. package/dist/Layout/containerCorners.stylex.js +16 -7
  186. package/dist/Lightbox/Lightbox.d.ts.map +1 -1
  187. package/dist/Lightbox/Lightbox.js +324 -6
  188. package/dist/Link/Link.d.ts.map +1 -1
  189. package/dist/Link/Link.js +1 -1
  190. package/dist/List/List.d.ts.map +1 -1
  191. package/dist/List/List.js +14 -6
  192. package/dist/List/ListContext.d.ts +38 -1
  193. package/dist/List/ListContext.d.ts.map +1 -1
  194. package/dist/List/ListContext.js +50 -2
  195. package/dist/List/ListItem.js +2 -2
  196. package/dist/Markdown/Markdown.d.ts.map +1 -1
  197. package/dist/Markdown/Markdown.js +85 -96
  198. package/dist/Markdown/plugins/HeadingLinksRenderer.d.ts.map +1 -1
  199. package/dist/Markdown/plugins/HeadingLinksRenderer.js +12 -5
  200. package/dist/Markdown/plugins/protocol.js +3 -3
  201. package/dist/MetadataList/MetadataListItem.d.ts.map +1 -1
  202. package/dist/MetadataList/MetadataListItem.js +11 -3
  203. package/dist/MobileNav/MobileNav.d.ts +1 -1
  204. package/dist/MobileNav/MobileNav.d.ts.map +1 -1
  205. package/dist/MobileNav/MobileNav.js +6 -3
  206. package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
  207. package/dist/MultiSelector/MultiSelector.js +33 -9
  208. package/dist/NavMenu/NavHeadingMenu.d.ts.map +1 -1
  209. package/dist/NavMenu/NavHeadingMenu.js +5 -2
  210. package/dist/NavMenu/NavHeadingMenuItem.d.ts.map +1 -1
  211. package/dist/NavMenu/NavHeadingMenuItem.js +1 -0
  212. package/dist/NavMenu/NavMenuContext.d.ts +7 -0
  213. package/dist/NavMenu/NavMenuContext.d.ts.map +1 -1
  214. package/dist/NavMenu/NavMenuContext.js +9 -0
  215. package/dist/NumberInput/NumberInput.d.ts.map +1 -1
  216. package/dist/NumberInput/NumberInput.js +8 -2
  217. package/dist/Outline/Outline.d.ts +7 -3
  218. package/dist/Outline/Outline.d.ts.map +1 -1
  219. package/dist/Outline/Outline.js +11 -3
  220. package/dist/Outline/useScrollSpy.d.ts +1 -1
  221. package/dist/Outline/useScrollSpy.d.ts.map +1 -1
  222. package/dist/Outline/useScrollSpy.js +6 -2
  223. package/dist/OverflowList/OverflowList.d.ts.map +1 -1
  224. package/dist/OverflowList/OverflowList.js +51 -25
  225. package/dist/Pagination/Pagination.d.ts.map +1 -1
  226. package/dist/Pagination/Pagination.js +33 -13
  227. package/dist/Popover/Popover.d.ts.map +1 -1
  228. package/dist/Popover/Popover.js +5 -1
  229. package/dist/Popover/popoverAnchor.d.ts +11 -0
  230. package/dist/Popover/popoverAnchor.d.ts.map +1 -0
  231. package/dist/Popover/popoverAnchor.js +33 -0
  232. package/dist/Popover/usePopover.d.ts +20 -3
  233. package/dist/Popover/usePopover.d.ts.map +1 -1
  234. package/dist/Popover/usePopover.js +110 -10
  235. package/dist/PowerSearch/PowerSearch.d.ts +1 -0
  236. package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
  237. package/dist/PowerSearch/PowerSearch.js +46 -9
  238. package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
  239. package/dist/PowerSearch/PowerSearchEditPopover.js +1 -1
  240. package/dist/PowerSearch/PowerSearchFilterEditor.d.ts.map +1 -1
  241. package/dist/PowerSearch/PowerSearchFilterEditor.js +7 -1
  242. package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
  243. package/dist/PowerSearch/PowerSearchToken.js +7 -0
  244. package/dist/PowerSearch/PowerSearchValueEditor.d.ts +2 -4
  245. package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
  246. package/dist/PowerSearch/PowerSearchValueEditor.js +6 -13
  247. package/dist/ProgressBar/ProgressBar.d.ts +5 -4
  248. package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
  249. package/dist/ProgressBar/ProgressBar.js +26 -26
  250. package/dist/RadioList/RadioList.d.ts.map +1 -1
  251. package/dist/RadioList/RadioList.js +51 -0
  252. package/dist/RadioList/RadioListItem.d.ts.map +1 -1
  253. package/dist/RadioList/RadioListItem.js +1 -1
  254. package/dist/Resizable/ResizeHandle.d.ts +1 -1
  255. package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
  256. package/dist/Resizable/ResizeHandle.js +1 -1
  257. package/dist/Resizable/resizableModel.d.ts +45 -3
  258. package/dist/Resizable/resizableModel.d.ts.map +1 -1
  259. package/dist/Resizable/resizableModel.js +91 -3
  260. package/dist/Resizable/resizeGesture.d.ts +3 -0
  261. package/dist/Resizable/resizeGesture.d.ts.map +1 -1
  262. package/dist/Resizable/resizeGesture.js +6 -0
  263. package/dist/Resizable/useResizable.d.ts +1 -33
  264. package/dist/Resizable/useResizable.d.ts.map +1 -1
  265. package/dist/Resizable/useResizable.js +8 -72
  266. package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
  267. package/dist/SegmentedControl/SegmentedControlItem.js +1 -0
  268. package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts +27 -5
  269. package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts.map +1 -1
  270. package/dist/SegmentedControl/useSegmentedTouchTracking.js +70 -8
  271. package/dist/Selector/Selector.d.ts.map +1 -1
  272. package/dist/Selector/Selector.js +34 -14
  273. package/dist/Selector/hooks.d.ts +5 -0
  274. package/dist/Selector/hooks.d.ts.map +1 -1
  275. package/dist/Selector/hooks.js +72 -16
  276. package/dist/Selector/useSelectorPresentation.d.ts.map +1 -1
  277. package/dist/Selector/useSelectorPresentation.js +9 -3
  278. package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
  279. package/dist/SideNav/SideNavHeading.js +18 -5
  280. package/dist/Slider/Slider.d.ts.map +1 -1
  281. package/dist/Slider/Slider.js +2 -2
  282. package/dist/Spinner/Spinner.d.ts.map +1 -1
  283. package/dist/Spinner/Spinner.js +47 -33
  284. package/dist/Stepper/Step.d.ts.map +1 -1
  285. package/dist/Stepper/Step.js +21 -12
  286. package/dist/Swipe/useSwipeAction.js +3 -3
  287. package/dist/Switch/Switch.d.ts.map +1 -1
  288. package/dist/Switch/Switch.js +64 -46
  289. package/dist/Switch/useSwitchTouch.d.ts +22 -1
  290. package/dist/Switch/useSwitchTouch.d.ts.map +1 -1
  291. package/dist/Switch/useSwitchTouch.js +54 -3
  292. package/dist/TabList/Tab.d.ts.map +1 -1
  293. package/dist/TabList/Tab.js +3 -3
  294. package/dist/Table/BaseTable.d.ts.map +1 -1
  295. package/dist/Table/BaseTable.js +37 -18
  296. package/dist/Table/Table.d.ts +4 -3
  297. package/dist/Table/Table.d.ts.map +1 -1
  298. package/dist/Table/Table.js +32 -14
  299. package/dist/Table/TableBody.d.ts.map +1 -1
  300. package/dist/Table/TableBody.js +5 -1
  301. package/dist/Table/TableCell.d.ts.map +1 -1
  302. package/dist/Table/TableCell.js +6 -0
  303. package/dist/Table/TableHeaderCell.d.ts +1 -1
  304. package/dist/Table/TableHeaderCell.d.ts.map +1 -1
  305. package/dist/Table/TableHeaderCell.js +42 -9
  306. package/dist/Table/TableRow.d.ts.map +1 -1
  307. package/dist/Table/TableRow.js +9 -1
  308. package/dist/Table/TableRowPlacementContext.d.ts +18 -0
  309. package/dist/Table/TableRowPlacementContext.d.ts.map +1 -0
  310. package/dist/Table/TableRowPlacementContext.js +41 -0
  311. package/dist/Table/TableSelectionToolbar.d.ts.map +1 -1
  312. package/dist/Table/TableSelectionToolbar.js +7 -0
  313. package/dist/Table/columnUtils.d.ts +5 -0
  314. package/dist/Table/columnUtils.d.ts.map +1 -1
  315. package/dist/Table/columnUtils.js +9 -1
  316. package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts.map +1 -1
  317. package/dist/Table/plugins/rowIndex/useTableRowIndex.js +2 -2
  318. package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
  319. package/dist/Table/plugins/sortable/useTableSortable.js +8 -3
  320. package/dist/Table/plugins/sortable/useTableSortableState.d.ts.map +1 -1
  321. package/dist/Table/plugins/sortable/useTableSortableState.js +10 -6
  322. package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
  323. package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +5 -1
  324. package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
  325. package/dist/Table/plugins/tree/useTableTreeData.js +76 -15
  326. package/dist/Table/table.stylex.d.ts +31 -5
  327. package/dist/Table/table.stylex.d.ts.map +1 -1
  328. package/dist/Table/table.stylex.js +33 -5
  329. package/dist/Table/types.d.ts +3 -1
  330. package/dist/Table/types.d.ts.map +1 -1
  331. package/dist/Text/TruncationTooltip.d.ts +35 -1
  332. package/dist/Text/TruncationTooltip.d.ts.map +1 -1
  333. package/dist/Text/TruncationTooltip.js +115 -0
  334. package/dist/Text/text.stylex.d.ts +2 -2
  335. package/dist/Text/useTruncation.d.ts.map +1 -1
  336. package/dist/Text/useTruncation.js +23 -4
  337. package/dist/TextArea/TextArea.d.ts.map +1 -1
  338. package/dist/TextArea/TextArea.js +15 -1
  339. package/dist/TextInput/TextInput.d.ts +9 -3
  340. package/dist/TextInput/TextInput.d.ts.map +1 -1
  341. package/dist/TextInput/TextInput.js +19 -18
  342. package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
  343. package/dist/Thumbnail/Thumbnail.js +13 -4
  344. package/dist/Timer/Timer.d.ts.map +1 -1
  345. package/dist/Timer/Timer.js +10 -7
  346. package/dist/Timestamp/Timestamp.d.ts.map +1 -1
  347. package/dist/Timestamp/Timestamp.js +55 -4
  348. package/dist/Toast/Toast.d.ts +1 -6
  349. package/dist/Toast/Toast.d.ts.map +1 -1
  350. package/dist/Toast/Toast.js +77 -44
  351. package/dist/Toast/ToastViewport.d.ts.map +1 -1
  352. package/dist/Toast/ToastViewport.js +48 -21
  353. package/dist/Toast/types.d.ts +8 -0
  354. package/dist/Toast/types.d.ts.map +1 -1
  355. package/dist/Toast/useToast.d.ts.map +1 -1
  356. package/dist/Toast/useToast.js +14 -7
  357. package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
  358. package/dist/ToggleButton/ToggleButton.js +14 -9
  359. package/dist/Token/Token.d.ts +1 -1
  360. package/dist/Token/Token.d.ts.map +1 -1
  361. package/dist/Token/Token.js +6 -2
  362. package/dist/Tokenizer/Tokenizer.d.ts +2 -2
  363. package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
  364. package/dist/Tokenizer/Tokenizer.js +102 -62
  365. package/dist/Toolbar/Toolbar.d.ts.map +1 -1
  366. package/dist/Toolbar/Toolbar.js +33 -5
  367. package/dist/Tooltip/Tooltip.d.ts +12 -1
  368. package/dist/Tooltip/Tooltip.d.ts.map +1 -1
  369. package/dist/Tooltip/Tooltip.js +31 -1
  370. package/dist/Tooltip/useTooltip.d.ts.map +1 -1
  371. package/dist/Tooltip/useTooltip.js +20 -1
  372. package/dist/TopNav/TopNav.d.ts.map +1 -1
  373. package/dist/TopNav/TopNav.js +24 -8
  374. package/dist/TopNav/TopNavContext.d.ts +13 -0
  375. package/dist/TopNav/TopNavContext.d.ts.map +1 -1
  376. package/dist/TopNav/TopNavContext.js +27 -1
  377. package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
  378. package/dist/TopNav/TopNavHeading.js +21 -9
  379. package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
  380. package/dist/TopNav/TopNavMegaMenu.js +25 -17
  381. package/dist/TopNav/TopNavMegaMenuFeaturedCard.d.ts.map +1 -1
  382. package/dist/TopNav/TopNavMegaMenuFeaturedCard.js +13 -2
  383. package/dist/TopNav/TopNavMegaMenuItem.d.ts +9 -1
  384. package/dist/TopNav/TopNavMegaMenuItem.d.ts.map +1 -1
  385. package/dist/TopNav/TopNavMegaMenuItem.js +14 -2
  386. package/dist/TopNav/TopNavMenu.d.ts +8 -0
  387. package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
  388. package/dist/TopNav/TopNavMenu.js +20 -5
  389. package/dist/TopNav/TopNavRenderContext.d.ts +13 -0
  390. package/dist/TopNav/TopNavRenderContext.d.ts.map +1 -1
  391. package/dist/TopNav/TopNavRenderContext.js +24 -9
  392. package/dist/TreeList/TreeList.d.ts.map +1 -1
  393. package/dist/TreeList/TreeList.js +7 -1
  394. package/dist/TreeList/TreeListItem.d.ts.map +1 -1
  395. package/dist/TreeList/TreeListItem.js +20 -2
  396. package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
  397. package/dist/Typeahead/BaseTypeahead.js +2 -1
  398. package/dist/Typeahead/Typeahead.d.ts.map +1 -1
  399. package/dist/Typeahead/Typeahead.js +24 -9
  400. package/dist/Typeahead/TypeaheadItem.d.ts.map +1 -1
  401. package/dist/Typeahead/TypeaheadItem.js +7 -0
  402. package/dist/astryx.css +215 -56
  403. package/dist/gestures/GestureHost.d.ts +7 -0
  404. package/dist/gestures/GestureHost.d.ts.map +1 -1
  405. package/dist/gestures/GestureHost.js +37 -0
  406. package/dist/hooks/anchoredHint.d.ts.map +1 -1
  407. package/dist/hooks/anchoredHint.js +0 -1
  408. package/dist/hooks/computeOverflow.d.ts.map +1 -1
  409. package/dist/hooks/computeOverflow.js +7 -0
  410. package/dist/hooks/focusableSelector.d.ts +16 -9
  411. package/dist/hooks/focusableSelector.d.ts.map +1 -1
  412. package/dist/hooks/focusableSelector.js +53 -2
  413. package/dist/hooks/scrollEdgeFade.d.ts +34 -0
  414. package/dist/hooks/scrollEdgeFade.d.ts.map +1 -0
  415. package/dist/hooks/scrollEdgeFade.js +173 -0
  416. package/dist/hooks/statusButtonPress.d.ts +15 -0
  417. package/dist/hooks/statusButtonPress.d.ts.map +1 -0
  418. package/dist/hooks/statusButtonPress.js +19 -0
  419. package/dist/hooks/useAnnounce.d.ts.map +1 -1
  420. package/dist/hooks/useAnnounce.js +2 -1
  421. package/dist/hooks/useFocusTrap.d.ts +26 -16
  422. package/dist/hooks/useFocusTrap.d.ts.map +1 -1
  423. package/dist/hooks/useFocusTrap.js +75 -112
  424. package/dist/hooks/useGroupPressTracking.d.ts +1 -1
  425. package/dist/hooks/useGroupPressTracking.js +1 -1
  426. package/dist/hooks/useOverflow.d.ts +25 -2
  427. package/dist/hooks/useOverflow.d.ts.map +1 -1
  428. package/dist/hooks/useOverflow.js +137 -8
  429. package/dist/hooks/useResolvedRequired.d.ts +27 -0
  430. package/dist/hooks/useResolvedRequired.d.ts.map +1 -1
  431. package/dist/hooks/useResolvedRequired.js +30 -1
  432. package/dist/hooks/useTreeFocus.d.ts.map +1 -1
  433. package/dist/hooks/useTreeFocus.js +4 -2
  434. package/dist/hooks/useTypeahead.d.ts.map +1 -1
  435. package/dist/hooks/useTypeahead.js +8 -8
  436. package/dist/i18n/InternationalizationContext.d.ts +13 -6
  437. package/dist/i18n/InternationalizationContext.d.ts.map +1 -1
  438. package/dist/i18n/InternationalizationContext.js +11 -6
  439. package/dist/i18n/InternationalizationProvider.d.ts.map +1 -1
  440. package/dist/i18n/InternationalizationProvider.js +7 -0
  441. package/dist/i18n/defaultTranslator.d.ts +17 -0
  442. package/dist/i18n/defaultTranslator.d.ts.map +1 -0
  443. package/dist/i18n/defaultTranslator.js +18 -0
  444. package/dist/i18n/firstStrongDirection.d.ts +3 -2
  445. package/dist/i18n/firstStrongDirection.d.ts.map +1 -1
  446. package/dist/i18n/firstStrongDirection.js +50 -12
  447. package/dist/i18n/generated-english/Chat/ChatPastedTextToken.generated.d.ts.map +1 -1
  448. package/dist/i18n/generated-english/Chat/ChatPastedTextToken.generated.js +1 -2
  449. package/dist/i18n/generated-english/Chat/pastedTextLabel.generated.d.ts +8 -0
  450. package/dist/i18n/generated-english/Chat/pastedTextLabel.generated.d.ts.map +1 -0
  451. package/dist/i18n/generated-english/Chat/pastedTextLabel.generated.js +12 -0
  452. package/dist/i18n/generated-english/Chat/useTriggerMenu.generated.d.ts.map +1 -1
  453. package/dist/i18n/generated-english/Chat/useTriggerMenu.generated.js +1 -0
  454. package/dist/i18n/generated-english/CodeBlock/CodeBlock.generated.d.ts.map +1 -1
  455. package/dist/i18n/generated-english/CodeBlock/CodeBlock.generated.js +2 -1
  456. package/dist/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.d.ts.map +1 -1
  457. package/dist/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.js +2 -1
  458. package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.d.ts.map +1 -1
  459. package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.js +1 -0
  460. package/dist/i18n/generated-english/Slider/Slider.generated.d.ts.map +1 -1
  461. package/dist/i18n/generated-english/Slider/Slider.generated.js +2 -1
  462. package/dist/i18n/generated-english/TextArea/TextArea.generated.d.ts.map +1 -1
  463. package/dist/i18n/generated-english/TextArea/TextArea.generated.js +1 -0
  464. package/dist/i18n/generated-english/TextInput/TextInput.generated.d.ts.map +1 -1
  465. package/dist/i18n/generated-english/TextInput/TextInput.generated.js +1 -0
  466. package/dist/i18n/generated-english/Timestamp/Timestamp.generated.d.ts.map +1 -1
  467. package/dist/i18n/generated-english/Timestamp/Timestamp.generated.js +2 -1
  468. package/dist/i18n/generated-english/Tokenizer/Tokenizer.generated.d.ts.map +1 -1
  469. package/dist/i18n/generated-english/Tokenizer/Tokenizer.generated.js +1 -0
  470. package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
  471. package/dist/i18n/generated-locales/en.generated.js +9 -0
  472. package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
  473. package/dist/i18n/generated-locales/pseudo.generated.js +9 -0
  474. package/dist/i18n/publicContext.d.ts.map +1 -1
  475. package/dist/i18n/publicContext.js +4 -2
  476. package/dist/i18n/translatingContext.d.ts +2 -0
  477. package/dist/i18n/translatingContext.d.ts.map +1 -0
  478. package/dist/i18n/translatingContext.js +25 -0
  479. package/dist/i18n/useComponentTranslator.d.ts.map +1 -1
  480. package/dist/i18n/useComponentTranslator.js +3 -2
  481. package/dist/i18n/useListFormatter.d.ts.map +1 -1
  482. package/dist/i18n/useListFormatter.js +3 -2
  483. package/dist/i18n/useTranslator.d.ts.map +1 -1
  484. package/dist/i18n/useTranslator.js +3 -2
  485. package/dist/internal/touch.d.ts +2 -0
  486. package/dist/internal/touch.d.ts.map +1 -1
  487. package/dist/internal/touch.js +5 -1
  488. package/dist/keyboard/keyboardHeight.d.ts +34 -3
  489. package/dist/keyboard/keyboardHeight.d.ts.map +1 -1
  490. package/dist/keyboard/keyboardHeight.js +101 -24
  491. package/dist/keyboard/keyboardTarget.d.ts +19 -16
  492. package/dist/keyboard/keyboardTarget.d.ts.map +1 -1
  493. package/dist/keyboard/keyboardTarget.js +529 -72
  494. package/dist/keyboard/useMobileKeyboard.d.ts.map +1 -1
  495. package/dist/keyboard/useMobileKeyboard.js +1 -8
  496. package/dist/palette/color.d.ts +23 -0
  497. package/dist/palette/color.d.ts.map +1 -0
  498. package/dist/palette/color.js +126 -0
  499. package/dist/palette/generator.d.ts +69 -0
  500. package/dist/palette/generator.d.ts.map +1 -0
  501. package/dist/palette/generator.js +778 -0
  502. package/dist/palette/index.d.ts +12 -0
  503. package/dist/palette/index.d.ts.map +1 -0
  504. package/dist/palette/index.js +13 -0
  505. package/dist/palette/mapping.d.ts +319 -0
  506. package/dist/palette/mapping.d.ts.map +1 -0
  507. package/dist/palette/mapping.js +1312 -0
  508. package/dist/palette/themePalette.d.ts +20 -0
  509. package/dist/palette/themePalette.d.ts.map +1 -0
  510. package/dist/palette/themePalette.js +145 -0
  511. package/dist/palette/types.d.ts +178 -0
  512. package/dist/palette/types.d.ts.map +1 -0
  513. package/dist/palette/types.js +1 -0
  514. package/dist/privateAttributes/mediaDarkPage.d.ts +5 -0
  515. package/dist/privateAttributes/mediaDarkPage.d.ts.map +1 -0
  516. package/dist/privateAttributes/mediaDarkPage.js +27 -0
  517. package/dist/privateAttributes/pressGroupItem.stylex.d.ts +2 -1
  518. package/dist/privateAttributes/pressGroupItem.stylex.d.ts.map +1 -1
  519. package/dist/privateAttributes/pressGroupItem.stylex.js +2 -1
  520. package/dist/privateAttributes/scheme.d.ts +10 -0
  521. package/dist/privateAttributes/scheme.d.ts.map +1 -0
  522. package/dist/privateAttributes/scheme.js +34 -0
  523. package/dist/privateAttributes/travelling.stylex.d.ts.map +1 -1
  524. package/dist/privateAttributes/travelling.stylex.js +2 -2
  525. package/dist/theme/MediaDarkPage.d.ts +18 -0
  526. package/dist/theme/MediaDarkPage.d.ts.map +1 -0
  527. package/dist/theme/MediaDarkPage.js +35 -0
  528. package/dist/theme/MediaTheme.d.ts.map +1 -1
  529. package/dist/theme/MediaTheme.js +9 -1
  530. package/dist/theme/Theme.d.ts.map +1 -1
  531. package/dist/theme/Theme.js +99 -31
  532. package/dist/theme/defineTheme.d.ts +31 -6
  533. package/dist/theme/defineTheme.d.ts.map +1 -1
  534. package/dist/theme/defineTheme.js +65 -29
  535. package/dist/theme/derivedVarRegistry.d.ts +19 -0
  536. package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
  537. package/dist/theme/derivedVarRegistry.js +49 -4
  538. package/dist/theme/expandRadiusScale.d.ts +1 -2
  539. package/dist/theme/expandRadiusScale.d.ts.map +1 -1
  540. package/dist/theme/expandRadiusScale.js +1 -5
  541. package/dist/theme/generateThemeRules.d.ts +10 -3
  542. package/dist/theme/generateThemeRules.d.ts.map +1 -1
  543. package/dist/theme/generateThemeRules.js +310 -207
  544. package/dist/theme/index.d.ts +2 -1
  545. package/dist/theme/index.d.ts.map +1 -1
  546. package/dist/theme/index.js +2 -1
  547. package/dist/theme/invertedSurfaceSide.d.ts +17 -0
  548. package/dist/theme/invertedSurfaceSide.d.ts.map +1 -0
  549. package/dist/theme/invertedSurfaceSide.js +47 -0
  550. package/dist/theme/resolveThemeValues.d.ts +5 -2
  551. package/dist/theme/resolveThemeValues.d.ts.map +1 -1
  552. package/dist/theme/resolveThemeValues.js +7 -1
  553. package/dist/theme/statusRoleDefaults.d.ts +43 -0
  554. package/dist/theme/statusRoleDefaults.d.ts.map +1 -0
  555. package/dist/theme/statusRoleDefaults.js +196 -0
  556. package/dist/theme/statusRoleDerivation.d.ts +4 -0
  557. package/dist/theme/statusRoleDerivation.d.ts.map +1 -1
  558. package/dist/theme/statusRoleDerivation.js +3 -1
  559. package/dist/theme/syntax/SyntaxTheme.d.ts.map +1 -1
  560. package/dist/theme/syntax/SyntaxTheme.js +7 -0
  561. package/dist/theme/themeAdaptations.d.ts +24 -1
  562. package/dist/theme/themeAdaptations.d.ts.map +1 -1
  563. package/dist/theme/themeAdaptations.js +48 -5
  564. package/dist/theme/tokenDefaults.d.ts +3 -0
  565. package/dist/theme/tokenDefaults.d.ts.map +1 -0
  566. package/dist/theme/tokenDefaults.js +30 -0
  567. package/dist/theme/tokenValues.d.ts +26 -0
  568. package/dist/theme/tokenValues.d.ts.map +1 -0
  569. package/dist/theme/tokenValues.js +180 -0
  570. package/dist/theme/tokens.d.ts +3 -2
  571. package/dist/theme/tokens.d.ts.map +1 -1
  572. package/dist/theme/tokens.js +7 -161
  573. package/dist/theme/tokens.stylex.d.ts +4 -4
  574. package/dist/theme/tokens.stylex.d.ts.map +1 -1
  575. package/dist/theme/tokens.stylex.js +7 -5
  576. package/dist/theme/useTheme.d.ts +40 -3
  577. package/dist/theme/useTheme.d.ts.map +1 -1
  578. package/dist/theme/useTheme.js +137 -32
  579. package/dist/utils/devWarning.d.ts +17 -0
  580. package/dist/utils/devWarning.d.ts.map +1 -1
  581. package/dist/utils/devWarning.js +20 -0
  582. package/dist/utils/focusOutline.stylex.d.ts.map +1 -1
  583. package/dist/utils/focusOutline.stylex.js +7 -4
  584. package/dist/utils/focusReturn.d.ts +110 -0
  585. package/dist/utils/focusReturn.d.ts.map +1 -1
  586. package/dist/utils/focusReturn.js +418 -12
  587. package/dist/utils/hitArea.d.ts +28 -0
  588. package/dist/utils/hitArea.d.ts.map +1 -1
  589. package/dist/utils/hitArea.js +52 -18
  590. package/dist/utils/inputStream.d.ts +27 -0
  591. package/dist/utils/inputStream.d.ts.map +1 -1
  592. package/dist/utils/inputStream.js +72 -5
  593. package/dist/utils/nodeType.d.ts +2 -0
  594. package/dist/utils/nodeType.d.ts.map +1 -1
  595. package/dist/utils/nodeType.js +10 -0
  596. package/dist/utils/timeFormat.d.ts +14 -4
  597. package/dist/utils/timeFormat.d.ts.map +1 -1
  598. package/dist/utils/timeFormat.js +42 -4
  599. package/dist/utils/touchPresentation.d.ts +2 -2
  600. package/dist/utils/touchPresentation.d.ts.map +1 -1
  601. package/dist/utils/touchPresentation.js +10 -7
  602. package/dist/utils/touchPresentation.stylex.d.ts +4 -3
  603. package/dist/utils/touchPresentation.stylex.d.ts.map +1 -1
  604. package/dist/utils/touchPresentation.stylex.js +3 -3
  605. package/dist/utils/touchQueries.d.ts +3 -2
  606. package/dist/utils/touchQueries.d.ts.map +1 -1
  607. package/dist/utils/touchQueries.js +3 -2
  608. package/dist/utils/typeaheadMatch.d.ts +13 -0
  609. package/dist/utils/typeaheadMatch.d.ts.map +1 -1
  610. package/dist/utils/typeaheadMatch.js +15 -1
  611. package/dist/virtualization/useInlineListWindow.d.ts.map +1 -1
  612. package/dist/virtualization/useInlineListWindow.js +38 -22
  613. package/locales/en.json +36 -0
  614. package/locales/pseudo.json +27 -0
  615. package/package.json +10 -5
  616. package/scripts/agent-doc-state.mjs +71 -4
  617. package/src/AlertDialog/AlertDialog.doc.mjs +5 -1
  618. package/src/AlertDialog/AlertDialog.tsx +34 -7
  619. package/src/AppShell/AppShell.doc.mjs +22 -0
  620. package/src/AppShell/AppShell.tsx +112 -65
  621. package/src/AppShell/unreadWidthPoint.ts +162 -0
  622. package/src/AvatarGroup/AvatarGroupOverflow.tsx +6 -1
  623. package/src/Badge/Badge.tsx +5 -2
  624. package/src/Banner/Banner.doc.mjs +15 -0
  625. package/src/Banner/Banner.tsx +56 -45
  626. package/src/BottomSheet/BottomSheet.doc.mjs +6 -3
  627. package/src/BottomSheet/BottomSheet.tsx +3 -0
  628. package/src/BottomSheet/BottomSheetPanel.tsx +15 -7
  629. package/src/BottomSheet/BottomSheetSwitcher.tsx +73 -1
  630. package/src/BottomSheet/BottomSheetSwitcherContext.ts +5 -0
  631. package/src/BottomSheet/bottomSheetStack.ts +6 -14
  632. package/src/Breadcrumbs/BreadcrumbItem.tsx +14 -1
  633. package/src/Button/Button.doc.mjs +9 -3
  634. package/src/Button/Button.tsx +65 -11
  635. package/src/Calendar/Calendar.doc.mjs +16 -0
  636. package/src/Calendar/Calendar.tsx +32 -20
  637. package/src/Calendar/styles.ts +12 -3
  638. package/src/Card/Card.doc.mjs +2 -2
  639. package/src/Card/Card.tsx +22 -3
  640. package/src/Chat/Chat.doc.mjs +1 -1
  641. package/src/Chat/ChatComposer.doc.mjs +3 -3
  642. package/src/Chat/ChatComposer.tsx +11 -5
  643. package/src/Chat/ChatComposerDrawer.tsx +11 -7
  644. package/src/Chat/ChatDictationButton.tsx +12 -0
  645. package/src/Chat/ChatMessageBubble.tsx +2 -2
  646. package/src/Chat/ChatPastedTextToken.tsx +3 -9
  647. package/src/Chat/ChatSendButton.tsx +5 -0
  648. package/src/Chat/ChatSystemMessage.tsx +1 -0
  649. package/src/Chat/ChatToolCalls.tsx +16 -0
  650. package/src/Chat/pastedTextLabel.ts +23 -0
  651. package/src/Chat/useChatPasteAsToken.ts +9 -8
  652. package/src/Chat/useTriggerMenu.tsx +4 -1
  653. package/src/CheckboxInput/CheckboxInput.doc.mjs +20 -0
  654. package/src/CheckboxInput/CheckboxInput.tsx +83 -26
  655. package/src/CheckboxList/CheckboxList.doc.mjs +15 -0
  656. package/src/CheckboxList/CheckboxListItem.doc.mjs +3 -3
  657. package/src/Citation/Citation.tsx +16 -1
  658. package/src/Code/Code.tsx +3 -0
  659. package/src/CodeBlock/CodeBlock.doc.mjs +7 -0
  660. package/src/CodeBlock/CodeBlock.tsx +60 -13
  661. package/src/CodeBlock/highlightRanges.ts +7 -5
  662. package/src/Collapsible/Collapsible.tsx +2 -0
  663. package/src/CommandPalette/CommandPaletteItem.tsx +1 -0
  664. package/src/ComplexSelector/ComplexSelector.doc.mjs +30 -2
  665. package/src/ComplexSelector/ComplexSelector.tsx +19 -1
  666. package/src/ContextMenu/ContextMenu.doc.mjs +5 -1
  667. package/src/ContextMenu/ContextMenu.tsx +44 -5
  668. package/src/ContextMenu/ContextMenuItem.doc.mjs +55 -5
  669. package/src/DateInput/MonthScroller.tsx +1 -0
  670. package/src/DateInput/PickerWheel.tsx +1 -0
  671. package/src/DateInput/TouchDateField.tsx +2 -0
  672. package/src/DateInput/Wheel.tsx +1 -0
  673. package/src/DateInput/usePointerDragScroll.ts +6 -2
  674. package/src/DateRangeInput/DateRangeInput.tsx +16 -0
  675. package/src/DateTimeInput/TouchDateTimeField.tsx +2 -0
  676. package/src/Dialog/Dialog.doc.mjs +11 -1
  677. package/src/Dialog/Dialog.tsx +116 -19
  678. package/src/Dialog/DialogContext.ts +5 -4
  679. package/src/Dialog/DialogHeader.tsx +50 -12
  680. package/src/Drawer/DrawerHeader.tsx +31 -6
  681. package/src/DropdownMenu/DropdownMenu.doc.mjs +20 -1
  682. package/src/DropdownMenu/DropdownMenu.tsx +29 -22
  683. package/src/DropdownMenu/DropdownMenuCheckboxItem.doc.mjs +4 -4
  684. package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +3 -2
  685. package/src/DropdownMenu/DropdownMenuItem.doc.mjs +5 -5
  686. package/src/DropdownMenu/DropdownMenuItem.tsx +3 -1
  687. package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +4 -4
  688. package/src/DropdownMenu/DropdownMenuRadioItem.tsx +3 -2
  689. package/src/DropdownMenu/DropdownMenuSubMenu.doc.mjs +3 -3
  690. package/src/DropdownMenu/DropdownMenuSubMenu.tsx +23 -1
  691. package/src/DropdownMenu/lazyMenuBottomSheet.ts +37 -9
  692. package/src/DropdownMenu/menuRowCorners.stylex.ts +40 -0
  693. package/src/EmptyState/EmptyState.tsx +2 -0
  694. package/src/Field/Field.doc.mjs +1 -1
  695. package/src/Field/FieldLabel.doc.mjs +3 -3
  696. package/src/Field/FieldLabel.tsx +9 -2
  697. package/src/Field/inputDisabledFocus.ts +18 -0
  698. package/src/Field/inputStyles.stylex.ts +52 -1
  699. package/src/Grid/Grid.doc.mjs +6 -3
  700. package/src/Grid/Grid.tsx +5 -2
  701. package/src/Heading/Heading.tsx +24 -1
  702. package/src/Icon/Icon.doc.mjs +1 -1
  703. package/src/Icon/Icon.tsx +40 -2
  704. package/src/Indicator/CheckboxIndicator.tsx +11 -6
  705. package/src/Indicator/Indicator.doc.mjs +1 -1
  706. package/src/Indicator/RadioIndicator.tsx +31 -4
  707. package/src/Indicator/indicatorRegistry.ts +7 -23
  708. package/src/Indicator/themeIndicators.ts +29 -0
  709. package/src/Indicator/types.ts +14 -0
  710. package/src/Indicator/useThemeIndicator.ts +24 -0
  711. package/src/Item/Item.doc.mjs +3 -3
  712. package/src/Item/Item.tsx +48 -7
  713. package/src/Kbd/Kbd.doc.mjs +6 -2
  714. package/src/Kbd/Kbd.tsx +16 -1
  715. package/src/Layer/layerExitCopy.ts +0 -1
  716. package/src/Layer/layerSlideRules.ts +62 -74
  717. package/src/Layer/useLayer.doc.mjs +2 -2
  718. package/src/Layer/useLayer.tsx +293 -137
  719. package/src/Layer/useLayerKeyboardClearance.ts +9 -12
  720. package/src/Layout/Layout.doc.mjs +3 -3
  721. package/src/Layout/LayoutContainerContext.ts +27 -0
  722. package/src/Layout/LayoutContainerScope.tsx +32 -0
  723. package/src/Layout/LayoutContent.tsx +5 -2
  724. package/src/Layout/LayoutFooter.tsx +3 -1
  725. package/src/Layout/LayoutHeader.tsx +3 -1
  726. package/src/Layout/containerCorners.stylex.ts +44 -7
  727. package/src/Lightbox/Lightbox.tsx +460 -8
  728. package/src/Link/Link.doc.mjs +18 -0
  729. package/src/Link/Link.tsx +3 -1
  730. package/src/List/List.tsx +14 -2
  731. package/src/List/ListContext.tsx +60 -1
  732. package/src/List/ListItem.doc.mjs +11 -9
  733. package/src/List/ListItem.tsx +4 -4
  734. package/src/Markdown/Markdown.doc.mjs +1 -1
  735. package/src/Markdown/Markdown.tsx +189 -190
  736. package/src/Markdown/plugins/HeadingLinksRenderer.tsx +14 -4
  737. package/src/Markdown/plugins/protocol.ts +3 -3
  738. package/src/MetadataList/MetadataListItem.tsx +18 -3
  739. package/src/MobileNav/MobileNav.doc.mjs +134 -52
  740. package/src/MobileNav/MobileNav.tsx +13 -9
  741. package/src/MultiSelector/MultiSelector.doc.mjs +2 -2
  742. package/src/MultiSelector/MultiSelector.tsx +51 -8
  743. package/src/NavMenu/NavHeadingMenu.tsx +5 -1
  744. package/src/NavMenu/NavHeadingMenuItem.tsx +1 -0
  745. package/src/NavMenu/NavMenu.doc.mjs +105 -2
  746. package/src/NavMenu/NavMenuContext.tsx +13 -0
  747. package/src/NumberInput/NumberInput.doc.mjs +12 -10
  748. package/src/NumberInput/NumberInput.tsx +19 -11
  749. package/src/Outline/Outline.doc.mjs +26 -8
  750. package/src/Outline/Outline.tsx +35 -5
  751. package/src/Outline/useScrollSpy.ts +8 -3
  752. package/src/OverflowList/OverflowList.doc.mjs +15 -0
  753. package/src/OverflowList/OverflowList.tsx +62 -26
  754. package/src/Pagination/Pagination.doc.mjs +12 -0
  755. package/src/Pagination/Pagination.tsx +40 -6
  756. package/src/Popover/Popover.doc.mjs +10 -0
  757. package/src/Popover/Popover.tsx +8 -4
  758. package/src/Popover/popoverAnchor.ts +47 -0
  759. package/src/Popover/usePopover.doc.mjs +16 -2
  760. package/src/Popover/usePopover.tsx +152 -16
  761. package/src/PowerSearch/PowerSearch.doc.mjs +8 -8
  762. package/src/PowerSearch/PowerSearch.tsx +65 -12
  763. package/src/PowerSearch/PowerSearchEditPopover.tsx +1 -0
  764. package/src/PowerSearch/PowerSearchFilterEditor.tsx +12 -0
  765. package/src/PowerSearch/PowerSearchToken.tsx +12 -0
  766. package/src/PowerSearch/PowerSearchValueEditor.tsx +14 -19
  767. package/src/ProgressBar/ProgressBar.doc.mjs +2 -2
  768. package/src/ProgressBar/ProgressBar.tsx +44 -30
  769. package/src/RadioList/RadioList.tsx +63 -0
  770. package/src/RadioList/RadioListItem.tsx +4 -1
  771. package/src/Resizable/ResizeHandle.tsx +2 -3
  772. package/src/Resizable/resizableModel.ts +105 -3
  773. package/src/Resizable/resizeGesture.ts +14 -0
  774. package/src/Resizable/useResizable.ts +14 -75
  775. package/src/SegmentedControl/SegmentedControlItem.tsx +1 -0
  776. package/src/SegmentedControl/useSegmentedTouchTracking.ts +76 -12
  777. package/src/Selector/Selector.doc.mjs +34 -7
  778. package/src/Selector/Selector.tsx +55 -25
  779. package/src/Selector/SelectorOption.doc.mjs +5 -5
  780. package/src/Selector/hooks.ts +92 -17
  781. package/src/Selector/useSelectorPresentation.ts +18 -3
  782. package/src/SideNav/SideNavHeading.tsx +15 -4
  783. package/src/SideNav/SideNavItem.doc.mjs +10 -10
  784. package/src/Slider/Slider.tsx +4 -1
  785. package/src/Spinner/Spinner.tsx +56 -41
  786. package/src/Stepper/Step.tsx +18 -3
  787. package/src/Stepper/Stepper.doc.mjs +14 -2
  788. package/src/Swipe/useSwipeAction.ts +3 -3
  789. package/src/Switch/Switch.doc.mjs +61 -5
  790. package/src/Switch/Switch.tsx +72 -35
  791. package/src/Switch/useSwitchTouch.ts +68 -3
  792. package/src/TabList/Tab.tsx +6 -0
  793. package/src/Table/BaseTable.tsx +73 -35
  794. package/src/Table/Table.doc.mjs +109 -5
  795. package/src/Table/Table.tsx +42 -17
  796. package/src/Table/TableBody.tsx +10 -1
  797. package/src/Table/TableCell.tsx +6 -0
  798. package/src/Table/TableHeaderCell.tsx +52 -7
  799. package/src/Table/TableRow.tsx +8 -1
  800. package/src/Table/TableRowPlacementContext.ts +58 -0
  801. package/src/Table/TableSelectionToolbar.tsx +12 -0
  802. package/src/Table/columnUtils.ts +9 -1
  803. package/src/Table/plugins/columnSettings/useTableColumnSettingsState.doc.mjs +1 -1
  804. package/src/Table/plugins/rowIndex/useTableRowIndex.tsx +1 -0
  805. package/src/Table/plugins/sortable/useTableSortable.tsx +15 -2
  806. package/src/Table/plugins/sortable/useTableSortableState.doc.mjs +5 -5
  807. package/src/Table/plugins/sortable/useTableSortableState.tsx +15 -8
  808. package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +8 -0
  809. package/src/Table/plugins/tree/useTableTreeData.tsx +90 -14
  810. package/src/Table/table.stylex.ts +44 -5
  811. package/src/Table/types.ts +3 -1
  812. package/src/Table/useTableColumnResize.doc.mjs +3 -3
  813. package/src/Table/useTableColumnSettings.doc.mjs +3 -3
  814. package/src/Table/useTableFilterState.doc.mjs +6 -3
  815. package/src/Table/useTableFiltering.doc.mjs +71 -4
  816. package/src/Table/useTableInfiniteScroll.doc.mjs +2 -2
  817. package/src/Table/useTablePagination.doc.mjs +24 -3
  818. package/src/Table/useTableSelection.doc.mjs +30 -6
  819. package/src/Table/useTableSelectionState.doc.mjs +30 -2
  820. package/src/Table/useTableSortable.doc.mjs +104 -17
  821. package/src/Table/useTableStickyColumns.doc.mjs +3 -3
  822. package/src/Table/useTableTreeData.doc.mjs +2 -2
  823. package/src/Text/Heading.doc.mjs +2 -2
  824. package/src/Text/Text.doc.mjs +1 -1
  825. package/src/Text/TruncationTooltip.tsx +168 -1
  826. package/src/Text/useTruncation.ts +20 -4
  827. package/src/TextArea/TextArea.doc.mjs +5 -5
  828. package/src/TextArea/TextArea.tsx +20 -1
  829. package/src/TextInput/TextInput.doc.mjs +5 -5
  830. package/src/TextInput/TextInput.tsx +23 -18
  831. package/src/Thumbnail/Thumbnail.tsx +2 -1
  832. package/src/Timer/Timer.tsx +21 -6
  833. package/src/Timestamp/Timestamp.tsx +67 -4
  834. package/src/Toast/Toast.doc.mjs +15 -5
  835. package/src/Toast/Toast.tsx +83 -62
  836. package/src/Toast/ToastViewport.tsx +62 -23
  837. package/src/Toast/types.ts +8 -0
  838. package/src/Toast/useToast.doc.mjs +80 -15
  839. package/src/Toast/useToast.tsx +18 -7
  840. package/src/ToggleButton/ToggleButton.doc.mjs +1 -1
  841. package/src/ToggleButton/ToggleButton.tsx +25 -2
  842. package/src/Token/Token.tsx +5 -1
  843. package/src/Tokenizer/Tokenizer.doc.mjs +15 -3
  844. package/src/Tokenizer/Tokenizer.tsx +130 -75
  845. package/src/Toolbar/Toolbar.tsx +55 -4
  846. package/src/Tooltip/Tooltip.tsx +34 -0
  847. package/src/Tooltip/useTooltip.tsx +26 -0
  848. package/src/TopNav/TopNav.doc.mjs +1 -1
  849. package/src/TopNav/TopNav.tsx +13 -3
  850. package/src/TopNav/TopNavContext.ts +31 -1
  851. package/src/TopNav/TopNavHeading.tsx +22 -9
  852. package/src/TopNav/TopNavMegaMenu.tsx +27 -18
  853. package/src/TopNav/TopNavMegaMenuFeaturedCard.tsx +14 -2
  854. package/src/TopNav/TopNavMegaMenuItem.doc.mjs +26 -5
  855. package/src/TopNav/TopNavMegaMenuItem.tsx +26 -2
  856. package/src/TopNav/TopNavMenu.doc.mjs +19 -8
  857. package/src/TopNav/TopNavMenu.tsx +34 -2
  858. package/src/TopNav/TopNavRenderContext.ts +30 -9
  859. package/src/TreeList/TreeList.tsx +12 -0
  860. package/src/TreeList/TreeListItem.tsx +26 -5
  861. package/src/Typeahead/BaseTypeahead.doc.mjs +6 -0
  862. package/src/Typeahead/BaseTypeahead.tsx +2 -0
  863. package/src/Typeahead/Typeahead.doc.mjs +15 -2
  864. package/src/Typeahead/Typeahead.tsx +37 -13
  865. package/src/Typeahead/TypeaheadItem.tsx +12 -0
  866. package/src/gestures/GestureHost.ts +34 -0
  867. package/src/gestures/README.md +9 -6
  868. package/src/hooks/anchoredHint.tsx +1 -2
  869. package/src/hooks/computeOverflow.ts +10 -0
  870. package/src/hooks/focusableSelector.ts +59 -2
  871. package/src/hooks/scrollEdgeFade.ts +129 -0
  872. package/src/hooks/statusButtonPress.ts +26 -0
  873. package/src/hooks/useAnnounce.ts +2 -1
  874. package/src/hooks/useFocusTrap.ts +110 -141
  875. package/src/hooks/useGroupPressTracking.ts +1 -1
  876. package/src/hooks/useOverflow.ts +227 -13
  877. package/src/hooks/useResolvedRequired.ts +50 -1
  878. package/src/hooks/useTreeFocus.ts +8 -4
  879. package/src/hooks/useTypeahead.ts +12 -10
  880. package/src/i18n/InternationalizationContext.ts +16 -7
  881. package/src/i18n/InternationalizationProvider.doc.mjs +1 -1
  882. package/src/i18n/InternationalizationProvider.tsx +12 -0
  883. package/src/i18n/defaultTranslator.ts +25 -0
  884. package/src/i18n/firstStrongDirection.ts +54 -13
  885. package/src/i18n/generated-english/Chat/ChatPastedTextToken.generated.ts +1 -2
  886. package/src/i18n/generated-english/Chat/pastedTextLabel.generated.ts +13 -0
  887. package/src/i18n/generated-english/Chat/useTriggerMenu.generated.ts +1 -0
  888. package/src/i18n/generated-english/CodeBlock/CodeBlock.generated.ts +2 -1
  889. package/src/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.ts +2 -1
  890. package/src/i18n/generated-english/MultiSelector/MultiSelector.generated.ts +1 -0
  891. package/src/i18n/generated-english/Slider/Slider.generated.ts +2 -1
  892. package/src/i18n/generated-english/TextArea/TextArea.generated.ts +1 -0
  893. package/src/i18n/generated-english/TextInput/TextInput.generated.ts +1 -0
  894. package/src/i18n/generated-english/Timestamp/Timestamp.generated.ts +2 -1
  895. package/src/i18n/generated-english/Tokenizer/Tokenizer.generated.ts +1 -0
  896. package/src/i18n/generated-locales/en.generated.ts +11 -0
  897. package/src/i18n/generated-locales/pseudo.generated.ts +11 -0
  898. package/src/i18n/publicContext.ts +4 -2
  899. package/src/i18n/translatingContext.ts +28 -0
  900. package/src/i18n/useComponentTranslator.ts +3 -2
  901. package/src/i18n/useListFormatter.ts +3 -2
  902. package/src/i18n/useTranslator.ts +3 -2
  903. package/src/internal/touch.ts +7 -0
  904. package/src/keyboard/README.md +58 -16
  905. package/src/keyboard/keyboardHeight.ts +138 -26
  906. package/src/keyboard/keyboardTarget.ts +667 -71
  907. package/src/keyboard/useMobileKeyboard.ts +1 -7
  908. package/src/palette/color.ts +205 -0
  909. package/src/palette/generator.ts +1134 -0
  910. package/src/palette/index.ts +35 -0
  911. package/src/palette/mapping.ts +1630 -0
  912. package/src/palette/themePalette.ts +175 -0
  913. package/src/palette/types.ts +194 -0
  914. package/src/privateAttributes/mediaDarkPage.ts +27 -0
  915. package/src/privateAttributes/pressGroupItem.stylex.ts +2 -1
  916. package/src/privateAttributes/scheme.ts +37 -0
  917. package/src/privateAttributes/travelling.stylex.ts +6 -4
  918. package/src/reset.css +1 -1
  919. package/src/theme/MediaDarkPage.tsx +41 -0
  920. package/src/theme/MediaTheme.tsx +8 -1
  921. package/src/theme/Theme.doc.mjs +4 -4
  922. package/src/theme/Theme.tsx +140 -35
  923. package/src/theme/defineTheme.ts +103 -40
  924. package/src/theme/derivedVarRegistry.ts +61 -4
  925. package/src/theme/expandRadiusScale.ts +1 -5
  926. package/src/theme/generateThemeRules.ts +398 -342
  927. package/src/theme/index.ts +2 -4
  928. package/src/theme/invertedSurfaceSide.ts +65 -0
  929. package/src/theme/resolveThemeValues.ts +8 -2
  930. package/src/theme/statusRoleDefaults.ts +330 -0
  931. package/src/theme/statusRoleDerivation.ts +2 -1
  932. package/src/theme/syntax/SyntaxTheme.tsx +12 -0
  933. package/src/theme/themeAdaptations.ts +53 -5
  934. package/src/theme/tokenDefaults.ts +44 -0
  935. package/src/theme/tokenValues.ts +193 -0
  936. package/src/theme/tokens.stylex.ts +7 -5
  937. package/src/theme/tokens.ts +14 -176
  938. package/src/theme/useTheme.ts +164 -35
  939. package/src/utils/devWarning.ts +24 -0
  940. package/src/utils/focusOutline.stylex.ts +7 -4
  941. package/src/utils/focusReturn.ts +578 -16
  942. package/src/utils/hitArea.ts +70 -33
  943. package/src/utils/inputStream.ts +81 -5
  944. package/src/utils/nodeType.ts +10 -0
  945. package/src/utils/timeFormat.ts +54 -4
  946. package/src/utils/touchPresentation.stylex.ts +7 -6
  947. package/src/utils/touchPresentation.ts +10 -7
  948. package/src/utils/touchQueries.ts +3 -2
  949. package/src/utils/typeaheadMatch.ts +20 -1
  950. package/src/virtualization/useInlineListWindow.ts +57 -33
@@ -54,6 +54,7 @@ import {resolveStyleColor} from '../Text/Text';
54
54
  import type {LayerPlacement} from '../Layer';
55
55
  import {mergeProps} from '../utils/mergeProps';
56
56
  import {useMergedRefs} from '../hooks/useMergedRefs';
57
+ import {useDevWarning} from '../hooks/useDevWarning';
57
58
  import type {BaseProps} from '../BaseProps';
58
59
  import {themeProps} from '../utils/themeProps';
59
60
  import type {HeadingTypeMap} from './index';
@@ -199,6 +200,20 @@ const levelToTag = {
199
200
  6: 'h6',
200
201
  } as const;
201
202
 
203
+ /** The level a heading renders at when its `level` is missing or not 1–6. */
204
+ const FALLBACK_LEVEL = 2;
205
+
206
+ /** `level` as a number from 1 to 6, or the fallback level. */
207
+ function resolveLevel(level: unknown): HeadingLevel {
208
+ const value =
209
+ typeof level === 'number' || typeof level === 'string'
210
+ ? Number(level)
211
+ : Number.NaN;
212
+ return Number.isInteger(value) && value >= 1 && value <= 6
213
+ ? (value as HeadingLevel)
214
+ : FALLBACK_LEVEL;
215
+ }
216
+
202
217
  /**
203
218
  * Heading - Semantic heading component
204
219
  *
@@ -216,7 +231,7 @@ const levelToTag = {
216
231
  * ```
217
232
  */
218
233
  export function Heading({
219
- level,
234
+ level: requestedLevel,
220
235
  type,
221
236
  weight,
222
237
  accessibilityLevel,
@@ -236,6 +251,14 @@ export function Heading({
236
251
  ref,
237
252
  ...props
238
253
  }: HeadingProps) {
254
+ // JavaScript callers and generated pages can omit `level`. The heading still
255
+ // renders, with a section heading's element and scale, instead of crashing.
256
+ const level = resolveLevel(requestedLevel);
257
+ useDevWarning(
258
+ 'Heading',
259
+ `level must be 1, 2, 3, 4, 5 or 6, but it is ${typeof requestedLevel === 'string' ? JSON.stringify(requestedLevel) : String(requestedLevel)}. The heading renders as level ${level}. Pass the outline level, for example <Heading level={2}>.`,
260
+ level !== requestedLevel,
261
+ );
239
262
  const Component = levelToTag[level];
240
263
 
241
264
  // If accessibilityLevel differs from visual level, use aria-level
@@ -73,7 +73,7 @@ export const docs = {
73
73
  name: 'icon',
74
74
  type: 'IconName | NamespacedIconName | ComponentType<SVGProps>',
75
75
  description:
76
- 'Semantic icon name or SVG component. Valid semantic names: close, chevronDown, chevronLeft, chevronRight, chevronsLeft, chevronsRight, check, success, error, warning, info, calendar, clock, externalLink, menu, moreHorizontal, search, upload, arrowUp, arrowDown, arrowsUpDown, funnel, eyeSlash, viewColumns, copy, checkDouble, wrench, stop, microphone. A namespaced key such as `richtext:bold` names a glyph that one component or library registers, and a theme can replace it by key; a namespaced key that nothing registers renders nothing. For any icon not in this list, pass an SVG component directly (e.g. import from lucide-react or @heroicons/react). Note: this prop is called `icon`, not `name`.',
76
+ 'Semantic icon name or SVG component. Valid semantic names: close, chevronDown, chevronLeft, chevronRight, chevronsLeft, chevronsRight, check, success, error, warning, info, calendar, clock, externalLink, menu, moreHorizontal, search, upload, arrowUp, arrowDown, arrowsUpDown, funnel, eyeSlash, viewColumns, copy, checkDouble, wrench, stop, microphone. A namespaced key such as `richtext:bold` names a glyph that one component or library registers, and a theme can replace it by key; a namespaced key that nothing registers renders nothing. For any icon not in this list, pass an SVG component directly (e.g. import from lucide-react or @heroicons/react). Note: this prop is called `icon`, not `name`; a call with only `name` renders that glyph and warns in development.',
77
77
  required: true,
78
78
  },
79
79
  {
package/src/Icon/Icon.tsx CHANGED
@@ -42,6 +42,7 @@ import {mergeProps} from '../utils/mergeProps';
42
42
  import {mergeRefs} from '../utils/mergeRefs';
43
43
  import {themeProps} from '../utils/themeProps';
44
44
  import {useIconSize} from './IconDefaultSizeContext';
45
+ import {useDevWarning} from '../hooks/useDevWarning';
45
46
  import {iconSizeStyles, type IconSize} from './IconSize.stylex';
46
47
 
47
48
  export type {IconSize} from './IconSize.stylex';
@@ -308,7 +309,7 @@ function getIconA11yProps(label: string | undefined): IconA11yProps {
308
309
  * ```
309
310
  */
310
311
  export function Icon({
311
- icon,
312
+ icon: iconProp,
312
313
  color = 'inherit',
313
314
  size: sizeProp,
314
315
  variant,
@@ -317,8 +318,14 @@ export function Icon({
317
318
  className,
318
319
  style,
319
320
  xstyle,
320
- ...props
321
+ ...restProps
321
322
  }: IconProps) {
323
+ const {icon, props} = readGlyph(iconProp, restProps);
324
+ useDevWarning(
325
+ 'Icon',
326
+ 'takes its glyph in `icon`, not `name`. Pass it as icon, for example <Icon icon="close" />.',
327
+ icon !== iconProp,
328
+ );
322
329
  const size = useIconSize(sizeProp);
323
330
  // Derive ARIA from `label`: decorative (aria-hidden) by default, or a
324
331
  // meaningful image (role="img" + aria-label) when `label` is non-empty.
@@ -375,6 +382,37 @@ export function Icon({
375
382
 
376
383
  Icon.displayName = 'Icon';
377
384
 
385
+ /** Other icon libraries call the glyph prop `name`. */
386
+ function readGlyph<Rest extends object>(
387
+ icon: IconProps['icon'] | undefined,
388
+ rest: Rest,
389
+ ): {icon: IconProps['icon']; props: Rest} {
390
+ if (icon != null || !('name' in rest) || !isGlyphSource(rest.name)) {
391
+ return {icon: icon as IconProps['icon'], props: rest};
392
+ }
393
+ const {name, ...props} = rest as Rest & {name: IconProps['icon']};
394
+ return {icon: name, props: props as Rest};
395
+ }
396
+
397
+ /** React's component types that are objects: forwardRef, memo and lazy. */
398
+ const objectComponentTypes = new Set<symbol>([
399
+ Symbol.for('react.forward_ref'),
400
+ Symbol.for('react.memo'),
401
+ Symbol.for('react.lazy'),
402
+ ]);
403
+
404
+ function isGlyphSource(value: unknown): boolean {
405
+ return (
406
+ (typeof value === 'string' && value !== '') ||
407
+ typeof value === 'function' ||
408
+ (typeof value === 'object' &&
409
+ value !== null &&
410
+ objectComponentTypes.has(
411
+ (value as {$$typeof?: symbol}).$$typeof as symbol,
412
+ ))
413
+ );
414
+ }
415
+
378
416
  // =============================================================================
379
417
  // Internal: Registry Icon Renderer
380
418
  // =============================================================================
@@ -134,24 +134,29 @@ const boxSizeStyles = stylex.create({
134
134
  },
135
135
  });
136
136
 
137
+ // The marks keep their share of the box, so a theme that sizes the box
138
+ // (`checkbox-indicator` width and height) gets a mark that fits it. A
139
+ // percentage reads the box's content box, so the border is added back first:
140
+ // at the shipped 20px and 24px boxes the marks stay exactly 12px and 14px,
141
+ // whatever `--border-width` a theme sets.
137
142
  const checkmarkSizeStyles = stylex.create({
138
143
  sm: {
139
- width: 12,
140
- height: 12,
144
+ width: `calc((100% + 2 * ${borderVars['--border-width']}) * 12 / 20)`,
145
+ height: `calc((100% + 2 * ${borderVars['--border-width']}) * 12 / 20)`,
141
146
  },
142
147
  md: {
143
- width: 14,
144
- height: 14,
148
+ width: `calc((100% + 2 * ${borderVars['--border-width']}) * 14 / 24)`,
149
+ height: `calc((100% + 2 * ${borderVars['--border-width']}) * 14 / 24)`,
145
150
  },
146
151
  });
147
152
 
148
153
  const indeterminateSizeStyles = stylex.create({
149
154
  sm: {
150
- width: 10,
155
+ width: `calc((100% + 2 * ${borderVars['--border-width']}) / 2)`,
151
156
  height: 2,
152
157
  },
153
158
  md: {
154
- width: 12,
159
+ width: `calc((100% + 2 * ${borderVars['--border-width']}) / 2)`,
155
160
  height: 2,
156
161
  },
157
162
  });
@@ -20,7 +20,7 @@ export const docs = {
20
20
  'swap',
21
21
  ],
22
22
  description:
23
- 'Decorative control visuals: the mark on a chosen option, the box a checkbox draws, the circle a radio draws. Rendered by Selector, CheckboxInput, RadioList, and menu selection rows. Replace one by name through defineTheme({indicators}) and every component drawing it follows.',
23
+ 'Decorative control visuals: the mark on a chosen option, the box a checkbox draws, the circle a radio draws. Rendered by Selector, CheckboxInput, RadioList, and menu selection rows. Replace one by name through defineTheme({indicators}) and every component drawing it follows. Two names have no built-in: `spinner` (state `busy`) replaces the ring a Spinner turns, and `tree-disclosure` (states `collapsed` and `expanded`) replaces the chevron of a TreeList row.',
24
24
  components: [
25
25
  {
26
26
  name: 'CheckboxIndicator',
@@ -109,14 +109,41 @@ const circleSizeStyles = stylex.create({
109
109
  },
110
110
  });
111
111
 
112
+ // The dot keeps its share of the circle, so a theme that sizes the circle
113
+ // (`radio-indicator` width and height) gets a dot that stays centered inside
114
+ // it. A percentage reads the circle's content box, so the border is added back
115
+ // first: at the shipped 20px and 24px circles the dot stays exactly 8px and
116
+ // 10px, whatever `--border-width` a theme sets. Where the browser has
117
+ // `round()`, the share is rounded to whole pixels: Chromium draws a dot of a
118
+ // fractional size (a 13px circle, or a border set directly rather than through
119
+ // the token) as a rounded square despite its 50% radius. The rounded value
120
+ // sits behind `@supports`, so a browser without `round()` keeps the exact
121
+ // share instead of dropping the declaration (a value holding `var()` is only
122
+ // checked once the variable is substituted).
123
+ const share = (s: string) =>
124
+ `calc((100% + 2 * ${borderVars['--border-width']}) * ${s})`;
125
+ const ROUND = '@supports (width: round(1px, 1px))';
126
+
112
127
  const dotSizeStyles = stylex.create({
113
128
  sm: {
114
- width: 8,
115
- height: 8,
129
+ width: {
130
+ default: share('8 / 20'),
131
+ [ROUND]: `round(${share('8 / 20')}, 1px)`,
132
+ },
133
+ height: {
134
+ default: share('8 / 20'),
135
+ [ROUND]: `round(${share('8 / 20')}, 1px)`,
136
+ },
116
137
  },
117
138
  md: {
118
- width: 10,
119
- height: 10,
139
+ width: {
140
+ default: share('10 / 24'),
141
+ [ROUND]: `round(${share('10 / 24')}, 1px)`,
142
+ },
143
+ height: {
144
+ default: share('10 / 24'),
145
+ [ROUND]: `round(${share('10 / 24')}, 1px)`,
146
+ },
120
147
  },
121
148
  });
122
149
 
@@ -24,17 +24,14 @@
24
24
  * `undefined` at runtime.
25
25
  */
26
26
 
27
- import type {DefinedTheme} from '../theme/defineTheme';
28
- import {getRegisteredTheme} from '../theme/themeRegistry';
29
27
  import {CheckboxIndicator} from './CheckboxIndicator';
30
28
  import {CheckIndicator} from './CheckIndicator';
31
29
  import {RadioIndicator} from './RadioIndicator';
32
- import type {
33
- IndicatorComponent,
34
- IndicatorMap,
35
- IndicatorName,
36
- IndicatorRegistry,
37
- } from './types';
30
+ import {
31
+ getThemeIndicators,
32
+ type IndicatorRegistrySource,
33
+ } from './themeIndicators';
34
+ import type {IndicatorComponent, IndicatorMap, IndicatorName} from './types';
38
35
 
39
36
  /**
40
37
  * The indicator names Astryx ships a default for.
@@ -52,7 +49,7 @@ export type CoreIndicatorName = 'check' | 'checkbox' | 'radio';
52
49
  *
53
50
  * Typed per family (rather than as one widened component type) so a default
54
51
  * declared here has to accept the states its family passes — the same rule
55
- * {@link IndicatorRegistry} holds replacements to.
52
+ * `IndicatorRegistry` holds replacements to.
56
53
  */
57
54
  export const defaultIndicators: {
58
55
  [N in CoreIndicatorName]: IndicatorComponent<IndicatorMap[N]>;
@@ -62,20 +59,7 @@ export const defaultIndicators: {
62
59
  radio: RadioIndicator,
63
60
  };
64
61
 
65
- export type IndicatorRegistrySource = DefinedTheme | string | null | undefined;
66
-
67
- function getTheme(source: IndicatorRegistrySource): DefinedTheme | null {
68
- if (source == null) {
69
- return null;
70
- }
71
- return typeof source === 'string' ? getRegisteredTheme(source) : source;
72
- }
73
-
74
- function getThemeIndicators(
75
- source: IndicatorRegistrySource,
76
- ): IndicatorRegistry | null {
77
- return getTheme(source)?.indicators ?? null;
78
- }
62
+ export type {IndicatorRegistrySource};
79
63
 
80
64
  /**
81
65
  * Resolve an indicator component by name, preferring the theme's override and
@@ -0,0 +1,29 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file themeIndicators.ts
5
+ * @input A theme, or a registered theme's name
6
+ * @output Exports IndicatorRegistrySource and getThemeIndicators: the
7
+ * indicators a theme supplies, without the built-ins
8
+ * @position The one theme lookup for indicators: the registry reads it before
9
+ * its built-ins, and a host that draws its own picture unless a theme
10
+ * supplies one reads it alone
11
+ */
12
+
13
+ import type {DefinedTheme} from '../theme/defineTheme';
14
+ import {getRegisteredTheme} from '../theme/themeRegistry';
15
+ import type {IndicatorRegistry} from './types';
16
+
17
+ export type IndicatorRegistrySource = DefinedTheme | string | null | undefined;
18
+
19
+ /** The indicators a theme supplies, or null when it supplies none. */
20
+ export function getThemeIndicators(
21
+ source: IndicatorRegistrySource,
22
+ ): IndicatorRegistry | null {
23
+ if (source == null) {
24
+ return null;
25
+ }
26
+ const theme =
27
+ typeof source === 'string' ? getRegisteredTheme(source) : source;
28
+ return theme?.indicators ?? null;
29
+ }
@@ -56,6 +56,10 @@ export interface IndicatorFamilyMap {
56
56
  singleSelection: 'unchecked' | 'checked';
57
57
  /** Which of these are chosen? Checkboxes, including the partial state. */
58
58
  multiSelection: 'unchecked' | 'checked' | 'indeterminate';
59
+ /** Is work in progress? A busy indicator has one state. */
60
+ activity: 'busy';
61
+ /** Is this branch open? The `aria-expanded` words. */
62
+ disclosure: 'collapsed' | 'expanded';
59
63
  }
60
64
 
61
65
  export type IndicatorFamily = keyof IndicatorFamilyMap & string;
@@ -176,6 +180,16 @@ export interface IndicatorMap {
176
180
  radio: 'singleSelection';
177
181
  /** The box of a checkbox control, including its partial state. */
178
182
  checkbox: 'multiSelection';
183
+ /**
184
+ * The picture a Spinner turns. No built-in: with no theme entry, Spinner
185
+ * draws its own ring.
186
+ */
187
+ spinner: 'activity';
188
+ /**
189
+ * The open/closed mark of a TreeList branch. No built-in: with no theme
190
+ * entry, the row draws its rotating chevron.
191
+ */
192
+ 'tree-disclosure': 'disclosure';
179
193
  }
180
194
 
181
195
  export type IndicatorName = keyof IndicatorMap & string;
@@ -0,0 +1,24 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ /**
6
+ * @file useThemeIndicator.ts
7
+ * @input Indicator name
8
+ * @output Exports useThemeIndicator: the active theme's own indicator for a
9
+ * name, or undefined
10
+ * @position Client hook for a host that draws its own picture unless the
11
+ * theme supplies one (Spinner, TreeList). It finds the theme as useIndicator
12
+ * does, the nearest Theme or else the root theme, and never loads the
13
+ * built-in indicators
14
+ */
15
+
16
+ import {useThemeName} from '../theme/useTheme';
17
+ import {getThemeIndicators} from './themeIndicators';
18
+ import type {IndicatorComponent, IndicatorMap, IndicatorName} from './types';
19
+
20
+ export function useThemeIndicator<N extends IndicatorName>(
21
+ name: N,
22
+ ): IndicatorComponent<IndicatorMap[N]> | undefined {
23
+ return getThemeIndicators(useThemeName())?.[name];
24
+ }
@@ -161,7 +161,7 @@ export const docs = {
161
161
  name: 'interactiveRef',
162
162
  type: 'RefObject<HTMLElement | null>',
163
163
  description:
164
- "Ref to a nested control (e.g. a checkbox in startContent) that owns the item's keyboard access and action. The row becomes an enlarged click/tap target that delegates surface clicks to it (useClickableContainer) and renders no invisible button/anchor, so the row adds no second tab stop (WCAG 4.1.2). Mutually exclusive with onClick/href; those are ignored when set.",
164
+ "Ref to a nested control (e.g. a checkbox in startContent) that owns the item's keyboard access and action. The row becomes an enlarged click/tap target that delegates surface clicks to it (useClickableContainer) and renders no invisible button/anchor, so the row adds no second tab stop (WCAG 4.1.2). Mutually exclusive with onClick/href; those are ignored when set. While the row is selected it writes aria-current on the control unless the control has its own; do not set the row\'s value on the control yourself.",
165
165
  },
166
166
  {
167
167
  name: 'href',
@@ -352,7 +352,7 @@ export const docsZh = {
352
352
  descriptionLines: '描述截断前的最大行数。',
353
353
  onClick: '点击处理函数。使项目可点击,具有按钮语义。',
354
354
  interactiveRef:
355
- '指向嵌套控件(如 startContent 中的复选框)的 ref,该控件承载项目的键盘访问和操作。行成为更大的点击/触摸目标,将表面点击委托给该控件(useClickableContainer),且不渲染不可见按钮/锚点,因此行不会增加第二个 Tab 停留点(WCAG 4.1.2)。与 onClick/href 互斥——设置后二者将被忽略。',
355
+ '指向嵌套控件(如 startContent 中的复选框)的 ref,该控件承载项目的键盘访问和操作。行成为更大的点击/触摸目标,将表面点击委托给该控件(useClickableContainer),且不渲染不可见按钮/锚点,因此行不会增加第二个 Tab 停留点(WCAG 4.1.2)。与 onClick/href 互斥——设置后二者将被忽略。行被选中时,若控件没有自己的 aria-current,行会在控件上写入它;不要在控件上自行设置相同的值。',
356
356
  href: '链接 URL。通过不可见锚点元素使项目成为链接。',
357
357
  target:
358
358
  '链接目标。仅与 href 一起使用。target="_blank" 会自动添加 noopener noreferrer。',
@@ -491,7 +491,7 @@ export const docsDense = {
491
491
  descriptionLines: 'Max description lines before truncation.',
492
492
  onClick: 'Click handler; enables button semantics.',
493
493
  interactiveRef:
494
- "Ref to a nested control that owns the item's keyboard access/action; row delegates surface clicks to it (useClickableContainer), no invisible button/anchor, no second tab stop (WCAG 4.1.2). Mutually exclusive with onClick/href.",
494
+ "Ref to a nested control that owns the item's keyboard access/action; row delegates surface clicks to it (useClickableContainer), no invisible button/anchor, no second tab stop (WCAG 4.1.2). Mutually exclusive with onClick/href. When selected, the row writes aria-current on the control.",
495
495
  href: 'Link URL; enables anchor semantics. Follows the shared navigation rule (see Link href).',
496
496
  target:
497
497
  'Link target, only with href. target="_blank" auto-adds noopener noreferrer.',
package/src/Item/Item.tsx CHANGED
@@ -61,6 +61,7 @@ import {ItemListRowContext} from './ItemListRowContext';
61
61
  import {ItemMarkerColumnsContext} from './ItemMarkerColumnsContext';
62
62
  import {ItemTrailingContext} from './ItemTrailingContext';
63
63
  import {useMergedRefs} from '../hooks/useMergedRefs';
64
+ import {useIsomorphicLayoutEffect} from '../hooks/useIsomorphicLayoutEffect';
64
65
  import {computeTargetAndRel} from '../Link/computeTargetAndRel';
65
66
  import {useLinkComponent} from '../Link/useLinkComponent';
66
67
  import {
@@ -231,7 +232,9 @@ export interface ItemProps extends BaseProps<HTMLElement> {
231
232
  * control itself, and on any other nested interactive element, are left to
232
233
  * that element. Mutually exclusive with `onClick`/`href` — when
233
234
  * `interactiveRef` is set those are ignored (the nested control is the sole
234
- * action).
235
+ * action). While the row is selected, it writes `aria-current` on the
236
+ * control unless the control has its own marker; a control should not set
237
+ * the row's value itself, because the row removes it when deselected.
235
238
  */
236
239
  interactiveRef?: React.RefObject<HTMLElement | null>;
237
240
 
@@ -265,7 +268,9 @@ export interface ItemProps extends BaseProps<HTMLElement> {
265
268
  * the state is exposed as `aria-selected`; otherwise (e.g. a listitem or a
266
269
  * bare div, where `aria-selected` is invalid ARIA) it falls back to
267
270
  * `aria-current="true"` so assistive tech is still told which item is
268
- * selected. A consumer-provided `aria-current` always wins.
271
+ * selected. A consumer-provided `aria-current` always wins. On an
272
+ * interactive row (`onClick`, `href` or `interactiveRef`) the marker sits on
273
+ * the element that takes focus, so a screen reader announces it there.
269
274
  * @default false
270
275
  */
271
276
  isSelected?: boolean;
@@ -774,6 +779,42 @@ export function Item({
774
779
  // (axe: aria-allowed-attr), so selection stays visual-only there — callers
775
780
  // that need selection semantics pass a permitted role.
776
781
  const allowsAriaSelected = role != null && ARIA_SELECTED_ROLES.has(role);
782
+ const ariaCurrent =
783
+ restProps['aria-current'] ??
784
+ (isSelected && !allowsAriaSelected ? true : undefined);
785
+ // A screen reader announces the marker on the element that takes focus. On
786
+ // an interactive row that is the row's own button or link, or the control
787
+ // it delegates to. A row whose root takes focus (a parent role, a link
788
+ // root) keeps the marker on the root.
789
+ const currentOnFocusTarget =
790
+ !hasParentRole &&
791
+ !isLinkRoot &&
792
+ (isDelegate || href != null || onClick != null);
793
+ const controlCurrent =
794
+ ariaCurrent === false || ariaCurrent === 'false' ? undefined : ariaCurrent;
795
+ // Syncs `aria-current` on the caller's delegated control, a DOM node the row
796
+ // does not render and cannot see mount or change. On each commit the row
797
+ // marks it while it has no marker. Cleanup removes only the value the row
798
+ // wrote.
799
+ useIsomorphicLayoutEffect(() => {
800
+ const control = interactiveRef?.current;
801
+ if (
802
+ !isDelegate ||
803
+ !currentOnFocusTarget ||
804
+ control == null ||
805
+ controlCurrent === undefined ||
806
+ control.hasAttribute('aria-current')
807
+ ) {
808
+ return;
809
+ }
810
+ const written = String(controlCurrent);
811
+ control.setAttribute('aria-current', written);
812
+ return () => {
813
+ if (control.getAttribute('aria-current') === written) {
814
+ control.removeAttribute('aria-current');
815
+ }
816
+ };
817
+ });
777
818
 
778
819
  // The description element's id, published through ItemDescriptionContext so a
779
820
  // control Item renders in a slot can point at it with `aria-describedby`.
@@ -913,6 +954,7 @@ export function Item({
913
954
  {...(isDisabled
914
955
  ? {role: 'link', 'aria-disabled': true, tabIndex: 0}
915
956
  : {href, target, rel})}
957
+ aria-current={ariaCurrent}
916
958
  {...focusOwnerProps}
917
959
  {...stylex.props(
918
960
  styles.invisibleAnchor,
@@ -926,6 +968,7 @@ export function Item({
926
968
  ref={actionButtonRef}
927
969
  type="button"
928
970
  onClick={onClick}
971
+ aria-current={ariaCurrent}
929
972
  aria-disabled={isDisabled || undefined}
930
973
  {...(isDisabled
931
974
  ? disabledInteractionProps<HTMLButtonElement>()
@@ -1014,11 +1057,9 @@ export function Item({
1014
1057
  // aria-selected is invalid on roles that don't permit it (listitem, a
1015
1058
  // bare div, etc.). For those, convey selection via aria-current — valid
1016
1059
  // on any element — so the state still reaches AT. Written after
1017
- // {...restProps} so it must defer to a consumer-provided aria-current.
1018
- aria-current={
1019
- restProps['aria-current'] ??
1020
- (isSelected && !allowsAriaSelected ? true : undefined)
1021
- }
1060
+ // {...restProps}: an interactive row moves the marker, a caller's
1061
+ // included, to the element that takes focus.
1062
+ aria-current={currentOnFocusTarget ? undefined : ariaCurrent}
1022
1063
  aria-disabled={isDisabled || undefined}
1023
1064
  {...(isInteractive ? pressable : undefined)}
1024
1065
  {...mergeProps(
@@ -94,8 +94,12 @@ export const docs = {
94
94
  description: 'Ref forwarded to the shortcut group element.',
95
95
  },
96
96
  ],
97
+ // A shortcut of two keys, so a preview shows the keys side by side.
98
+ playground: {
99
+ defaults: {keys: 'mod+k'},
100
+ },
97
101
  theming: {
98
- targets: [{className: 'astryx-kbd'}],
102
+ targets: [{className: 'astryx-kbd'}, {className: 'astryx-kbd-key'}],
99
103
  },
100
104
  usage: {
101
105
  anatomy,
@@ -142,7 +146,7 @@ export const docsZh = {
142
146
  },
143
147
  ],
144
148
  theming: {
145
- targets: [{className: 'astryx-kbd'}],
149
+ targets: [{className: 'astryx-kbd'}, {className: 'astryx-kbd-key'}],
146
150
  },
147
151
  usage: {
148
152
  anatomy,
package/src/Kbd/Kbd.tsx CHANGED
@@ -19,6 +19,7 @@ import {mergeProps} from '../utils';
19
19
  import {isApplePlatform} from '../utils/isApplePlatform';
20
20
  import type {BaseProps} from '../BaseProps';
21
21
  import {themeProps} from '../utils/themeProps';
22
+ import {devPropError} from '../utils/devWarning';
22
23
  import type {TranslatorFn} from '../i18n';
23
24
  import {
24
25
  colorVars,
@@ -34,6 +35,10 @@ import {
34
35
  } from '../i18n/useComponentTranslator';
35
36
  import english from '../i18n/generated-english/Kbd/Kbd.generated';
36
37
 
38
+ // Bundlers replace this value at build time. The declaration lets a product
39
+ // without Node's types type-check this file.
40
+ declare const process: {readonly env: {readonly NODE_ENV?: string}};
41
+
37
42
  registerEnglishFallback(english);
38
43
 
39
44
  const styles = stylex.create({
@@ -190,6 +195,13 @@ export interface KbdProps extends BaseProps<HTMLSpanElement> {
190
195
  * ```
191
196
  */
192
197
  export function Kbd({keys, ref, xstyle, className, style, ...rest}: KbdProps) {
198
+ if (process.env.NODE_ENV !== 'production' && typeof keys !== 'string') {
199
+ throw devPropError(
200
+ 'Kbd',
201
+ 'keys',
202
+ 'must be a string of keys joined by "+", for example <Kbd keys="mod+k" />. Kbd does not read children.',
203
+ );
204
+ }
193
205
  const t = useComponentTranslator();
194
206
  const isMac = useSyncExternalStore(
195
207
  subscribeToPlatformChanges,
@@ -233,7 +245,10 @@ export function Kbd({keys, ref, xstyle, className, style, ...rest}: KbdProps) {
233
245
  style,
234
246
  )}>
235
247
  {parts.map(({key, reactKey}) => (
236
- <kbd key={reactKey} aria-hidden="true" {...stylex.props(styles.kbd)}>
248
+ <kbd
249
+ key={reactKey}
250
+ aria-hidden="true"
251
+ {...mergeProps(themeProps('kbd-key'), stylex.props(styles.kbd))}>
237
252
  {getKeyDisplay(key, isMac, t)}
238
253
  </kbd>
239
254
  ))}
@@ -51,7 +51,6 @@ const PRESENTED_PROPERTIES = [
51
51
  /** Inline properties the copy must not keep from the live layer. */
52
52
  const LIVE_ONLY_PROPERTIES = [
53
53
  'position-anchor',
54
- 'position-area',
55
54
  'position-try-fallbacks',
56
55
  'inset',
57
56
  'right',