@astryxdesign/core 0.1.9-canary.d2d84f8 → 0.1.9-canary.e00a241

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 (414) hide show
  1. package/dist/Avatar/Avatar.d.ts +6 -1
  2. package/dist/Avatar/Avatar.d.ts.map +1 -1
  3. package/dist/Avatar/Avatar.js +46 -12
  4. package/dist/Avatar/AvatarStatusDot.d.ts +6 -4
  5. package/dist/Avatar/AvatarStatusDot.d.ts.map +1 -1
  6. package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
  7. package/dist/Breadcrumbs/BreadcrumbItem.js +11 -4
  8. package/dist/Breadcrumbs/index.d.ts +1 -0
  9. package/dist/Breadcrumbs/index.d.ts.map +1 -1
  10. package/dist/Breadcrumbs/index.js +2 -1
  11. package/dist/Calendar/Calendar.d.ts.map +1 -1
  12. package/dist/Calendar/Calendar.js +50 -9
  13. package/dist/Calendar/dayCellUtils.d.ts +4 -4
  14. package/dist/Calendar/dayCellUtils.js +2 -2
  15. package/dist/Calendar/styles.d.ts +30 -31
  16. package/dist/Calendar/styles.d.ts.map +1 -1
  17. package/dist/Calendar/styles.js +30 -31
  18. package/dist/Card/Card.js +1 -1
  19. package/dist/Carousel/Carousel.d.ts.map +1 -1
  20. package/dist/Carousel/Carousel.js +22 -12
  21. package/dist/Chat/ChatDictationButton.d.ts.map +1 -1
  22. package/dist/Chat/ChatDictationButton.js +3 -1
  23. package/dist/Chat/ChatMessageBubble.d.ts.map +1 -1
  24. package/dist/Chat/ChatMessageBubble.js +8 -8
  25. package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
  26. package/dist/Chat/ChatToolCalls.js +10 -3
  27. package/dist/CheckboxInput/CheckboxInput.js +4 -4
  28. package/dist/Citation/Citation.d.ts +22 -1
  29. package/dist/Citation/Citation.d.ts.map +1 -1
  30. package/dist/Citation/Citation.js +20 -6
  31. package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
  32. package/dist/CodeBlock/CodeBlock.js +13 -7
  33. package/dist/Collapsible/Collapsible.d.ts.map +1 -1
  34. package/dist/Collapsible/Collapsible.js +3 -1
  35. package/dist/CommandPalette/CommandPalette.d.ts +1 -1
  36. package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
  37. package/dist/CommandPalette/CommandPalette.js +42 -3
  38. package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
  39. package/dist/ContextMenu/ContextMenu.js +14 -5
  40. package/dist/ContextMenu/index.d.ts +1 -0
  41. package/dist/ContextMenu/index.d.ts.map +1 -1
  42. package/dist/ContextMenu/index.js +3 -1
  43. package/dist/DateInput/DateInput.d.ts +1 -0
  44. package/dist/DateInput/DateInput.d.ts.map +1 -1
  45. package/dist/DateInput/DateInput.js +31 -19
  46. package/dist/DateRangeInput/DateRangeInput.d.ts +1 -0
  47. package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
  48. package/dist/DateRangeInput/DateRangeInput.js +20 -19
  49. package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
  50. package/dist/DateTimeInput/DateTimeInput.js +23 -18
  51. package/dist/Divider/Divider.d.ts +2 -2
  52. package/dist/Divider/Divider.d.ts.map +1 -1
  53. package/dist/Divider/Divider.js +13 -0
  54. package/dist/DropdownMenu/DropdownMenu.d.ts +6 -0
  55. package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  56. package/dist/DropdownMenu/DropdownMenu.js +22 -5
  57. package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
  58. package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +4 -1
  59. package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
  60. package/dist/DropdownMenu/DropdownMenuItem.js +4 -1
  61. package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
  62. package/dist/DropdownMenu/DropdownMenuRadioItem.js +4 -1
  63. package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts +104 -0
  64. package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -0
  65. package/dist/DropdownMenu/DropdownMenuSubMenu.js +427 -0
  66. package/dist/DropdownMenu/index.d.ts +10 -0
  67. package/dist/DropdownMenu/index.d.ts.map +1 -1
  68. package/dist/DropdownMenu/index.js +13 -0
  69. package/dist/DropdownMenu/menuItemHover.d.ts +23 -0
  70. package/dist/DropdownMenu/menuItemHover.d.ts.map +1 -0
  71. package/dist/DropdownMenu/menuItemHover.js +33 -0
  72. package/dist/DropdownMenu/menuItemRoles.d.ts +8 -0
  73. package/dist/DropdownMenu/menuItemRoles.d.ts.map +1 -1
  74. package/dist/DropdownMenu/menuItemRoles.js +10 -1
  75. package/dist/DropdownMenu/renderDropdownItems.d.ts.map +1 -1
  76. package/dist/DropdownMenu/renderDropdownItems.js +21 -6
  77. package/dist/Field/Field.d.ts +3 -1
  78. package/dist/Field/Field.d.ts.map +1 -1
  79. package/dist/Field/Field.js +4 -1
  80. package/dist/Field/inputStyles.stylex.d.ts +1 -0
  81. package/dist/Field/inputStyles.stylex.d.ts.map +1 -1
  82. package/dist/Field/inputStyles.stylex.js +1 -0
  83. package/dist/FieldStatus/FieldStatus.d.ts +4 -1
  84. package/dist/FieldStatus/FieldStatus.d.ts.map +1 -1
  85. package/dist/FieldStatus/FieldStatus.js +4 -2
  86. package/dist/FileInput/FileInput.d.ts +1 -0
  87. package/dist/FileInput/FileInput.d.ts.map +1 -1
  88. package/dist/FileInput/FileInput.js +91 -65
  89. package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
  90. package/dist/HoverCard/useHoverCard.js +10 -4
  91. package/dist/Icon/Icon.d.ts +15 -1
  92. package/dist/Icon/Icon.d.ts.map +1 -1
  93. package/dist/Icon/Icon.js +19 -3
  94. package/dist/Lightbox/Lightbox.d.ts.map +1 -1
  95. package/dist/Lightbox/Lightbox.js +15 -9
  96. package/dist/List/List.d.ts.map +1 -1
  97. package/dist/List/List.js +6 -3
  98. package/dist/Markdown/Markdown.d.ts.map +1 -1
  99. package/dist/Markdown/Markdown.js +7 -0
  100. package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
  101. package/dist/MultiSelector/MultiSelector.js +65 -40
  102. package/dist/NumberInput/NumberInput.d.ts +1 -0
  103. package/dist/NumberInput/NumberInput.d.ts.map +1 -1
  104. package/dist/NumberInput/NumberInput.js +20 -17
  105. package/dist/Outline/Outline.js +2 -2
  106. package/dist/RadioList/RadioList.d.ts +2 -2
  107. package/dist/RadioList/RadioListItem.js +4 -4
  108. package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
  109. package/dist/Resizable/ResizeHandle.js +49 -19
  110. package/dist/SegmentedControl/SegmentedControlItem.d.ts +1 -1
  111. package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
  112. package/dist/SegmentedControl/SegmentedControlItem.js +2 -1
  113. package/dist/Selector/Selector.d.ts.map +1 -1
  114. package/dist/Selector/Selector.js +58 -16
  115. package/dist/SideNav/SideNav.d.ts.map +1 -1
  116. package/dist/SideNav/SideNav.js +5 -5
  117. package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
  118. package/dist/SideNav/SideNavCollapseButton.js +13 -10
  119. package/dist/SideNav/SideNavItem.d.ts +1 -1
  120. package/dist/SideNav/SideNavItem.d.ts.map +1 -1
  121. package/dist/SideNav/SideNavItem.js +12 -10
  122. package/dist/Slider/Slider.d.ts.map +1 -1
  123. package/dist/Slider/Slider.js +87 -34
  124. package/dist/Spinner/Spinner.d.ts +3 -2
  125. package/dist/Spinner/Spinner.d.ts.map +1 -1
  126. package/dist/Spinner/Spinner.js +11 -2
  127. package/dist/Switch/Switch.d.ts +8 -1
  128. package/dist/Switch/Switch.d.ts.map +1 -1
  129. package/dist/Switch/Switch.js +160 -91
  130. package/dist/TabList/TabList.d.ts +2 -11
  131. package/dist/TabList/TabList.d.ts.map +1 -1
  132. package/dist/TabList/TabList.js +5 -9
  133. package/dist/TabList/TabListContext.d.ts +0 -5
  134. package/dist/TabList/TabListContext.d.ts.map +1 -1
  135. package/dist/TabList/TabListContext.js +0 -5
  136. package/dist/Table/BaseTable.d.ts.map +1 -1
  137. package/dist/Table/BaseTable.js +30 -4
  138. package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -1
  139. package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +15 -11
  140. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
  141. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +36 -26
  142. package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
  143. package/dist/Table/plugins/selection/useTableSelection.js +3 -0
  144. package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
  145. package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +14 -6
  146. package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
  147. package/dist/Table/plugins/tree/useTableTreeData.js +29 -23
  148. package/dist/Table/types.d.ts +32 -0
  149. package/dist/Table/types.d.ts.map +1 -1
  150. package/dist/TextArea/TextArea.d.ts +1 -0
  151. package/dist/TextArea/TextArea.d.ts.map +1 -1
  152. package/dist/TextArea/TextArea.js +16 -19
  153. package/dist/TextInput/TextInput.d.ts +1 -0
  154. package/dist/TextInput/TextInput.d.ts.map +1 -1
  155. package/dist/TextInput/TextInput.js +18 -17
  156. package/dist/TimeInput/TimeInput.d.ts +1 -0
  157. package/dist/TimeInput/TimeInput.d.ts.map +1 -1
  158. package/dist/TimeInput/TimeInput.js +15 -17
  159. package/dist/Timestamp/Timestamp.d.ts +31 -3
  160. package/dist/Timestamp/Timestamp.d.ts.map +1 -1
  161. package/dist/Timestamp/Timestamp.js +47 -76
  162. package/dist/Timestamp/formatInstant.d.ts +41 -0
  163. package/dist/Timestamp/formatInstant.d.ts.map +1 -0
  164. package/dist/Timestamp/formatInstant.js +177 -0
  165. package/dist/Timestamp/index.d.ts +1 -0
  166. package/dist/Timestamp/index.d.ts.map +1 -1
  167. package/dist/Timestamp/tooltipEntries.d.ts +56 -0
  168. package/dist/Timestamp/tooltipEntries.d.ts.map +1 -0
  169. package/dist/Timestamp/tooltipEntries.js +163 -0
  170. package/dist/Token/Token.d.ts +30 -3
  171. package/dist/Token/Token.d.ts.map +1 -1
  172. package/dist/Token/Token.js +17 -2
  173. package/dist/Token/index.d.ts +1 -1
  174. package/dist/Token/index.d.ts.map +1 -1
  175. package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
  176. package/dist/Tokenizer/Tokenizer.js +2 -2
  177. package/dist/Tooltip/useTooltip.d.ts.map +1 -1
  178. package/dist/Tooltip/useTooltip.js +17 -1
  179. package/dist/TopNav/TopNavItem.d.ts +3 -1
  180. package/dist/TopNav/TopNavItem.d.ts.map +1 -1
  181. package/dist/TopNav/TopNavItem.js +30 -3
  182. package/dist/TreeList/TreeList.d.ts.map +1 -1
  183. package/dist/TreeList/TreeList.js +1 -0
  184. package/dist/TreeList/TreeListBranches.d.ts.map +1 -1
  185. package/dist/TreeList/TreeListBranches.js +8 -6
  186. package/dist/TreeList/TreeListItem.d.ts.map +1 -1
  187. package/dist/TreeList/TreeListItem.js +32 -14
  188. package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
  189. package/dist/Typeahead/BaseTypeahead.js +19 -10
  190. package/dist/Typeahead/Typeahead.js +1 -1
  191. package/dist/Typeahead/TypeaheadItem.d.ts +1 -1
  192. package/dist/Typeahead/TypeaheadItem.d.ts.map +1 -1
  193. package/dist/Typeahead/TypeaheadItem.js +20 -10
  194. package/dist/astryx.css +38 -14
  195. package/dist/astryx.umd.js +52 -52
  196. package/dist/astryx.umd.js.map +4 -4
  197. package/dist/hooks/index.d.ts +2 -0
  198. package/dist/hooks/index.d.ts.map +1 -1
  199. package/dist/hooks/index.js +1 -0
  200. package/dist/hooks/isRtlElement.d.ts +18 -0
  201. package/dist/hooks/isRtlElement.d.ts.map +1 -0
  202. package/dist/hooks/isRtlElement.js +27 -0
  203. package/dist/hooks/useAnnounce.d.ts +3 -0
  204. package/dist/hooks/useAnnounce.d.ts.map +1 -1
  205. package/dist/hooks/useAnnounce.js +39 -1
  206. package/dist/hooks/useFocusTrap.d.ts.map +1 -1
  207. package/dist/hooks/useFocusTrap.js +52 -11
  208. package/dist/hooks/useGridFocus.d.ts +6 -1
  209. package/dist/hooks/useGridFocus.d.ts.map +1 -1
  210. package/dist/hooks/useGridFocus.js +12 -9
  211. package/dist/hooks/useHotkeys.d.ts +9 -0
  212. package/dist/hooks/useHotkeys.d.ts.map +1 -1
  213. package/dist/hooks/useHotkeys.js +9 -0
  214. package/dist/hooks/useInputStatusIcon.d.ts +38 -0
  215. package/dist/hooks/useInputStatusIcon.d.ts.map +1 -0
  216. package/dist/hooks/useInputStatusIcon.js +158 -0
  217. package/dist/hooks/useListFocus.d.ts +39 -1
  218. package/dist/hooks/useListFocus.d.ts.map +1 -1
  219. package/dist/hooks/useListFocus.js +54 -9
  220. package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
  221. package/dist/theme/derivedVarRegistry.js +13 -0
  222. package/dist/utils/index.d.ts +1 -0
  223. package/dist/utils/index.d.ts.map +1 -1
  224. package/dist/utils/index.js +2 -1
  225. package/dist/utils/plainDate.d.ts +17 -0
  226. package/dist/utils/plainDate.d.ts.map +1 -1
  227. package/dist/utils/plainDate.js +23 -4
  228. package/dist/utils/rtlStyles.d.ts +24 -0
  229. package/dist/utils/rtlStyles.d.ts.map +1 -0
  230. package/dist/utils/rtlStyles.js +27 -0
  231. package/locales/en.json +76 -0
  232. package/locales/pseudo.json +57 -0
  233. package/package.json +6 -1
  234. package/src/Avatar/Avatar.doc.mjs +18 -4
  235. package/src/Avatar/Avatar.test.tsx +106 -0
  236. package/src/Avatar/Avatar.tsx +62 -10
  237. package/src/Avatar/AvatarStatusDot.doc.mjs +4 -4
  238. package/src/Avatar/AvatarStatusDot.tsx +6 -4
  239. package/src/AvatarGroup/AvatarGroup.test.tsx +16 -1
  240. package/src/Breadcrumbs/BreadcrumbItem.tsx +10 -10
  241. package/src/Breadcrumbs/Breadcrumbs.test.tsx +51 -0
  242. package/src/Breadcrumbs/index.ts +4 -0
  243. package/src/Button/Button.doc.mjs +0 -4
  244. package/src/Calendar/Calendar.test.tsx +170 -20
  245. package/src/Calendar/Calendar.tsx +73 -16
  246. package/src/Calendar/dayCellUtils.test.ts +18 -18
  247. package/src/Calendar/dayCellUtils.ts +2 -2
  248. package/src/Calendar/styles.ts +33 -39
  249. package/src/Card/Card.tsx +1 -1
  250. package/src/Carousel/Carousel.tsx +25 -6
  251. package/src/Chat/ChatComposer.doc.mjs +2 -2
  252. package/src/Chat/ChatComposerInput.doc.mjs +1 -1
  253. package/src/Chat/ChatDictationButton.tsx +7 -1
  254. package/src/Chat/ChatMessageBubble.tsx +15 -10
  255. package/src/Chat/ChatSystemMessage.test.tsx +5 -0
  256. package/src/Chat/ChatToolCalls.tsx +9 -2
  257. package/src/CheckboxInput/CheckboxInput.doc.mjs +6 -0
  258. package/src/CheckboxInput/CheckboxInput.tsx +4 -4
  259. package/src/CheckboxList/CheckboxList.doc.mjs +6 -0
  260. package/src/Citation/Citation.doc.mjs +4 -3
  261. package/src/Citation/Citation.test.tsx +97 -0
  262. package/src/Citation/Citation.tsx +43 -11
  263. package/src/CodeBlock/CodeBlock.tsx +35 -8
  264. package/src/Collapsible/Collapsible.doc.mjs +1 -0
  265. package/src/Collapsible/Collapsible.test.tsx +7 -0
  266. package/src/Collapsible/Collapsible.tsx +16 -6
  267. package/src/CommandPalette/CommandPalette.test.tsx +95 -1
  268. package/src/CommandPalette/CommandPalette.tsx +41 -2
  269. package/src/ContextMenu/ContextMenu.test.tsx +42 -0
  270. package/src/ContextMenu/ContextMenu.tsx +13 -11
  271. package/src/ContextMenu/index.ts +5 -0
  272. package/src/DateInput/DateInput.doc.mjs +15 -5
  273. package/src/DateInput/DateInput.test.tsx +210 -3
  274. package/src/DateInput/DateInput.tsx +41 -29
  275. package/src/DateRangeInput/DateRangeInput.doc.mjs +11 -3
  276. package/src/DateRangeInput/DateRangeInput.test.tsx +120 -3
  277. package/src/DateRangeInput/DateRangeInput.tsx +29 -27
  278. package/src/DateTimeInput/DateTimeInput.doc.mjs +22 -1
  279. package/src/DateTimeInput/DateTimeInput.test.tsx +112 -0
  280. package/src/DateTimeInput/DateTimeInput.tsx +44 -39
  281. package/src/Divider/Divider.test.tsx +32 -8
  282. package/src/Divider/Divider.tsx +14 -1
  283. package/src/DropdownMenu/DropdownMenu.test.tsx +60 -0
  284. package/src/DropdownMenu/DropdownMenu.tsx +31 -12
  285. package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +8 -2
  286. package/src/DropdownMenu/DropdownMenuItem.tsx +8 -2
  287. package/src/DropdownMenu/DropdownMenuRadioItem.tsx +8 -2
  288. package/src/DropdownMenu/DropdownMenuSubMenu.doc.mjs +88 -0
  289. package/src/DropdownMenu/DropdownMenuSubMenu.test.tsx +635 -0
  290. package/src/DropdownMenu/DropdownMenuSubMenu.tsx +553 -0
  291. package/src/DropdownMenu/index.ts +16 -0
  292. package/src/DropdownMenu/menuItemHover.ts +39 -0
  293. package/src/DropdownMenu/menuItemRoles.ts +9 -0
  294. package/src/DropdownMenu/renderDropdownItems.tsx +29 -15
  295. package/src/Field/Field.tsx +14 -9
  296. package/src/Field/inputStyles.stylex.ts +2 -0
  297. package/src/FieldStatus/FieldStatus.tsx +10 -4
  298. package/src/FileInput/FileInput.doc.mjs +13 -7
  299. package/src/FileInput/FileInput.test.tsx +84 -16
  300. package/src/FileInput/FileInput.tsx +96 -79
  301. package/src/HoverCard/useHoverCard.tsx +15 -3
  302. package/src/Icon/Icon.doc.mjs +13 -0
  303. package/src/Icon/Icon.test.tsx +89 -0
  304. package/src/Icon/Icon.tsx +51 -3
  305. package/src/Lightbox/Lightbox.tsx +11 -3
  306. package/src/List/List.test.tsx +17 -29
  307. package/src/List/List.tsx +6 -1
  308. package/src/Markdown/Markdown.test.tsx +21 -0
  309. package/src/Markdown/Markdown.tsx +4 -0
  310. package/src/MultiSelector/MultiSelector.doc.mjs +11 -0
  311. package/src/MultiSelector/MultiSelector.test.tsx +306 -3
  312. package/src/MultiSelector/MultiSelector.tsx +88 -57
  313. package/src/NumberInput/NumberInput.doc.mjs +11 -5
  314. package/src/NumberInput/NumberInput.test.tsx +48 -0
  315. package/src/NumberInput/NumberInput.tsx +25 -26
  316. package/src/Outline/Outline.test.tsx +12 -12
  317. package/src/Outline/Outline.tsx +2 -2
  318. package/src/RadioList/RadioList.doc.mjs +6 -0
  319. package/src/RadioList/RadioList.tsx +2 -2
  320. package/src/RadioList/RadioListItem.tsx +4 -4
  321. package/src/Resizable/ResizeHandle.test.tsx +94 -0
  322. package/src/Resizable/ResizeHandle.tsx +70 -20
  323. package/src/SegmentedControl/SegmentedControlItem.tsx +2 -0
  324. package/src/Selector/Selector.doc.mjs +8 -0
  325. package/src/Selector/Selector.test.tsx +328 -3
  326. package/src/Selector/Selector.tsx +70 -19
  327. package/src/SideNav/SideNav.tsx +1 -8
  328. package/src/SideNav/SideNavCollapseButton.tsx +9 -7
  329. package/src/SideNav/SideNavItem.tsx +5 -3
  330. package/src/Slider/Slider.doc.mjs +6 -0
  331. package/src/Slider/Slider.test.tsx +240 -12
  332. package/src/Slider/Slider.tsx +96 -23
  333. package/src/Spinner/Spinner.test.tsx +10 -8
  334. package/src/Spinner/Spinner.tsx +15 -5
  335. package/src/Switch/Switch.doc.mjs +142 -42
  336. package/src/Switch/Switch.test.tsx +22 -0
  337. package/src/Switch/Switch.tsx +90 -33
  338. package/src/TabList/TabList.doc.mjs +0 -6
  339. package/src/TabList/TabList.test.tsx +3 -15
  340. package/src/TabList/TabList.tsx +6 -17
  341. package/src/TabList/TabListContext.ts +0 -6
  342. package/src/Table/BaseTable.tsx +34 -2
  343. package/src/Table/Table.doc.mjs +11 -0
  344. package/src/Table/Table.test.tsx +85 -0
  345. package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +9 -6
  346. package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +24 -17
  347. package/src/Table/plugins/selection/useTableSelection.test.tsx +61 -3
  348. package/src/Table/plugins/selection/useTableSelection.tsx +3 -0
  349. package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +37 -8
  350. package/src/Table/plugins/tree/useTableTreeData.tsx +17 -13
  351. package/src/Table/types.ts +33 -0
  352. package/src/Table/useTableRowStatus.doc.mjs +1 -1
  353. package/src/TextArea/TextArea.doc.mjs +11 -5
  354. package/src/TextArea/TextArea.tsx +17 -26
  355. package/src/TextInput/TextInput.doc.mjs +11 -5
  356. package/src/TextInput/TextInput.test.tsx +130 -3
  357. package/src/TextInput/TextInput.tsx +18 -25
  358. package/src/Thumbnail/Thumbnail.doc.mjs +1 -1
  359. package/src/TimeInput/TimeInput.doc.mjs +11 -5
  360. package/src/TimeInput/TimeInput.tsx +14 -25
  361. package/src/Timestamp/Timestamp.doc.mjs +32 -6
  362. package/src/Timestamp/Timestamp.test.tsx +371 -0
  363. package/src/Timestamp/Timestamp.tsx +96 -93
  364. package/src/Timestamp/formatInstant.ts +218 -0
  365. package/src/Timestamp/index.ts +4 -0
  366. package/src/Timestamp/tooltipEntries.test.ts +552 -0
  367. package/src/Timestamp/tooltipEntries.ts +210 -0
  368. package/src/Token/Token.test.tsx +21 -15
  369. package/src/Token/Token.tsx +31 -14
  370. package/src/Token/index.ts +1 -1
  371. package/src/Tokenizer/Tokenizer.doc.mjs +8 -1
  372. package/src/Tokenizer/Tokenizer.tsx +4 -2
  373. package/src/Tooltip/Tooltip.test.tsx +46 -0
  374. package/src/Tooltip/useTooltip.tsx +20 -0
  375. package/src/TopNav/TopNav.test.tsx +93 -2
  376. package/src/TopNav/TopNavItem.doc.mjs +3 -3
  377. package/src/TopNav/TopNavItem.tsx +35 -6
  378. package/src/TopNav/TopNavMegaMenuFeaturedCard.doc.mjs +1 -1
  379. package/src/TreeList/TreeList.doc.mjs +6 -0
  380. package/src/TreeList/TreeList.test.tsx +50 -10
  381. package/src/TreeList/TreeList.tsx +5 -0
  382. package/src/TreeList/TreeListBranches.tsx +8 -6
  383. package/src/TreeList/TreeListItem.tsx +33 -11
  384. package/src/Typeahead/BaseTypeahead.tsx +29 -14
  385. package/src/Typeahead/Typeahead.doc.mjs +6 -0
  386. package/src/Typeahead/Typeahead.test.tsx +27 -0
  387. package/src/Typeahead/Typeahead.tsx +1 -1
  388. package/src/Typeahead/TypeaheadItem.tsx +2 -1
  389. package/src/__tests__/inputWidthContract.test.tsx +62 -0
  390. package/src/doc-mjs.d.ts +19 -0
  391. package/src/hooks/index.ts +6 -0
  392. package/src/hooks/isRtlElement.ts +27 -0
  393. package/src/hooks/useAnnounce.test.tsx +75 -2
  394. package/src/hooks/useAnnounce.ts +47 -1
  395. package/src/hooks/useFocusTrap.test.tsx +104 -0
  396. package/src/hooks/useFocusTrap.ts +61 -12
  397. package/src/hooks/useGridFocus.doc.mjs +3 -3
  398. package/src/hooks/useGridFocus.test.tsx +41 -0
  399. package/src/hooks/useGridFocus.ts +21 -10
  400. package/src/hooks/useHotkeys.ts +9 -0
  401. package/src/hooks/useInputStatusIcon.test.tsx +162 -0
  402. package/src/hooks/useInputStatusIcon.tsx +224 -0
  403. package/src/hooks/useListFocus.doc.mjs +25 -3
  404. package/src/hooks/useListFocus.test.tsx +153 -1
  405. package/src/hooks/useListFocus.ts +102 -9
  406. package/src/reset.css +0 -26
  407. package/src/reset.test.ts +60 -0
  408. package/src/theme/derivedVarRegistry.test.ts +1 -0
  409. package/src/theme/derivedVarRegistry.ts +6 -0
  410. package/src/theme/generateThemeRules.test.ts +42 -0
  411. package/src/utils/index.ts +2 -0
  412. package/src/utils/plainDate.test.ts +24 -6
  413. package/src/utils/plainDate.ts +18 -4
  414. package/src/utils/rtlStyles.ts +27 -0
@@ -14,6 +14,24 @@ export interface UseListFocusOptions {
14
14
  * @default '[role="menuitem"]'
15
15
  */
16
16
  itemSelector?: string;
17
+ /**
18
+ * Selector identifying a list boundary — used to scope a list that contains
19
+ * *nested* lists of the same kind (e.g. a menu with submenu flyouts).
20
+ *
21
+ * Overlays like submenu flyouts render inline (native popover, not a
22
+ * portal), so a nested list's items are DOM descendants of the parent list.
23
+ * Without scoping, the parent's `querySelectorAll` sweeps the nested items
24
+ * into its roving order (leaving hidden items `.focus()` can't land on), and
25
+ * key events from the nested list bubble into the parent's handler (moving
26
+ * focus twice). When set, `useListFocus`:
27
+ * - counts an item as its own only when the item's nearest
28
+ * `boundarySelector` ancestor is this list's container, and
29
+ * - ignores key events whose nearest `boundarySelector` ancestor is not
30
+ * this list's container (i.e. they originated in a nested list).
31
+ *
32
+ * Typically `'[role="menu"]'` for menus. Omit for flat lists.
33
+ */
34
+ boundarySelector?: string;
17
35
  /**
18
36
  * Whether arrow navigation wraps around at the ends.
19
37
  * @default true
@@ -38,7 +56,12 @@ export interface UseListFocusOptions {
38
56
  * Whether the list is in a right-to-left context. When true, ArrowLeft and
39
57
  * ArrowRight are swapped so horizontal navigation follows visual direction.
40
58
  * Only affects horizontal (`'horizontal'`/`'both'`) navigation.
41
- * @default false
59
+ *
60
+ * When omitted, the direction is auto-detected from the container's computed
61
+ * `direction` (read lazily on keydown, only for horizontal arrow keys), so
62
+ * lists inside `dir="rtl"` subtrees flip automatically. Pass an explicit
63
+ * boolean to override detection.
64
+ * @default undefined (auto-detect from the container)
42
65
  */
43
66
  isRtl?: boolean;
44
67
  /**
@@ -96,6 +119,21 @@ export interface UseListFocusReturn<T extends HTMLElement = HTMLElement> {
96
119
  * Focus the last enabled item. Returns true when an item was focused.
97
120
  */
98
121
  focusLast: () => boolean;
122
+ /**
123
+ * Whether a key event belongs to this list level (vs. a nested list that
124
+ * shares the same `boundarySelector`). Useful when a consumer wraps
125
+ * `handleKeyDown` with extra behavior (Enter/Space activation, typeahead)
126
+ * and must apply it only to events this level owns. Always true when no
127
+ * `boundarySelector` is configured.
128
+ */
129
+ ownsEvent: (e: React.KeyboardEvent) => boolean;
130
+ /**
131
+ * The current, in-DOM-order list of this level's focusable items (already
132
+ * scoped by `boundarySelector`). Exposed so consumers can build typeahead
133
+ * targets from the same source of truth as roving focus, rather than
134
+ * re-querying and re-filtering.
135
+ */
136
+ getItems: () => HTMLElement[];
99
137
  }
100
138
  /**
101
139
  * Hook for managing keyboard navigation within a linear list.
@@ -1 +1 @@
1
- {"version":3,"file":"useListFocus.d.ts","sourceRoot":"","sources":["../../src/hooks/useListFocus.ts"],"names":[],"mappings":"AAkBA;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAEtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;IAEnC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;;;;;;;;;OAYG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW;IACrE;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAEnC;;OAEG;IACH,aAAa,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;IAEhD;;;;OAIG;IACH,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAE3C;;OAEG;IACH,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEnC;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,KAAK,IAAI,CAAC;IAEhD;;;;OAIG;IACH,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAE3C;;OAEG;IACH,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEnC;;OAEG;IACH,UAAU,EAAE,MAAM,OAAO,CAAC;IAE1B;;OAEG;IACH,SAAS,EAAE,MAAM,OAAO,CAAC;IAEzB;;;;;;OAMG;IACH,SAAS,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,OAAO,CAAC;IAE/C;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,WAAW,EAAE,CAAC;CAC/B;AA+FD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAC9D,OAAO,GAAE,mBAAwB,GAChC,kBAAkB,CAAC,CAAC,CAAC,CAwVvB"}
@@ -4,15 +4,19 @@
4
4
 
5
5
  /**
6
6
  * @file useListFocus.ts
7
- * @input Uses React useCallback, useRef, useIsomorphicLayoutEffect
7
+ * @input Uses React useCallback, useRef, useIsomorphicLayoutEffect,
8
+ * isRtlElement
8
9
  * @output Exports useListFocus hook for linear list keyboard navigation
9
10
  * @position Core hook; used by TabMenu for dropdown menu navigation, Toolbar
10
11
  * for roving tabindex, ButtonGroup, ContextMenu, NavHeadingMenu, and more.
12
+ * Auto-detects RTL from the container's computed direction so horizontal
13
+ * arrow keys follow visual direction (WCAG 1.3.2).
11
14
  *
12
15
  * SYNC: When modified, update:
13
16
  * - /packages/core/src/hooks/index.ts
14
17
  */
15
18
  import { useCallback, useRef } from 'react';
19
+ import { isRtlElement } from "./isRtlElement.js";
16
20
  import { useIsomorphicLayoutEffect } from "./useIsomorphicLayoutEffect.js";
17
21
 
18
22
  /**
@@ -161,11 +165,12 @@ function shouldDeferToCaret(target, key) {
161
165
  export function useListFocus(options = {}) {
162
166
  const {
163
167
  itemSelector = '[role="menuitem"]',
168
+ boundarySelector,
164
169
  wrap = true,
165
170
  onEscape,
166
171
  orientation = 'vertical',
167
172
  hasHomeEnd = true,
168
- isRtl = false,
173
+ isRtl,
169
174
  hasRovingTabIndex = false,
170
175
  hasCaretGuard = false
171
176
  } = options;
@@ -184,11 +189,38 @@ export function useListFocus(options = {}) {
184
189
  * Get all focusable items in the list.
185
190
  */
186
191
  const getItems = useCallback(() => {
187
- if (!listRef.current) {
192
+ const listEl = listRef.current;
193
+ if (!listEl) {
188
194
  return [];
189
195
  }
190
- return Array.from(listRef.current.querySelectorAll(itemSelector));
191
- }, [itemSelector]);
196
+ const matched = Array.from(listEl.querySelectorAll(itemSelector));
197
+ // When a boundary is set, keep only items that belong to THIS list level —
198
+ // i.e. whose nearest boundary ancestor is our own container. This excludes
199
+ // items inside nested lists (e.g. inline submenu flyouts) that would
200
+ // otherwise be swept in by querySelectorAll.
201
+ if (!boundarySelector) {
202
+ return matched;
203
+ }
204
+ return matched.filter(el => el.closest(boundarySelector) === listEl);
205
+ }, [itemSelector, boundarySelector]);
206
+
207
+ /**
208
+ * Whether a key event belongs to this list level rather than a nested list.
209
+ * With a boundary set, an event that originated inside a nested boundary
210
+ * (e.g. a submenu flyout) has bubbled up to us and must be ignored so we
211
+ * don't double-handle navigation. Without a boundary, every event is ours.
212
+ */
213
+ const ownsEvent = useCallback(e => {
214
+ const listEl = listRef.current;
215
+ if (!listEl || !boundarySelector) {
216
+ return true;
217
+ }
218
+ const target = e.target;
219
+ if (!target) {
220
+ return true;
221
+ }
222
+ return target.closest(boundarySelector) === listEl;
223
+ }, [boundarySelector]);
192
224
 
193
225
  /**
194
226
  * Find the next enabled item index from `start`, moving by `step`, optionally
@@ -341,6 +373,13 @@ export function useListFocus(options = {}) {
341
373
  return;
342
374
  }
343
375
 
376
+ // Ignore events that bubbled up from a nested list (e.g. a submenu
377
+ // flyout, which renders inline inside this container). That level owns
378
+ // and already handled them; re-handling here would move focus twice.
379
+ if (!ownsEvent(e)) {
380
+ return;
381
+ }
382
+
344
383
  // Escape is handled regardless of orientation. Preserve the historical
345
384
  // behavior of always consuming Escape here (preventDefault) so consumers
346
385
  // that relied on it are unaffected.
@@ -353,11 +392,15 @@ export function useListFocus(options = {}) {
353
392
  const vertical = orientation === 'vertical' || orientation === 'both';
354
393
 
355
394
  // Resolve which keys advance vs retreat, honoring RTL for horizontal.
395
+ // Direction is resolved lazily — getComputedStyle runs only when a
396
+ // horizontal arrow key is actually pressed (SSR-safe, no layout thrash
397
+ // on unrelated keys) — and an explicit `isRtl` always wins.
356
398
  const nextKeys = [];
357
399
  const prevKeys = [];
358
400
  if (horizontal) {
359
- nextKeys.push(isRtl ? 'ArrowLeft' : 'ArrowRight');
360
- prevKeys.push(isRtl ? 'ArrowRight' : 'ArrowLeft');
401
+ const rtl = e.key === 'ArrowLeft' || e.key === 'ArrowRight' ? isRtl ?? isRtlElement(listRef.current) : false;
402
+ nextKeys.push(rtl ? 'ArrowLeft' : 'ArrowRight');
403
+ prevKeys.push(rtl ? 'ArrowRight' : 'ArrowLeft');
361
404
  }
362
405
  if (vertical) {
363
406
  nextKeys.push('ArrowDown');
@@ -397,13 +440,15 @@ export function useListFocus(options = {}) {
397
440
  focusLast();
398
441
  }
399
442
  e.preventDefault();
400
- }, [getCurrentIndex, getItems, wrap, orientation, isRtl, hasHomeEnd, hasCaretGuard, findEnabledIndex, focusIndex, focusFirst, focusLast, onEscape]);
443
+ }, [getCurrentIndex, getItems, wrap, orientation, isRtl, hasHomeEnd, hasCaretGuard, findEnabledIndex, focusIndex, focusFirst, focusLast, onEscape, ownsEvent]);
401
444
  return {
402
445
  listRef,
403
446
  handleKeyDown,
404
447
  handleFocus,
405
448
  focusItem,
406
449
  focusFirst,
407
- focusLast
450
+ focusLast,
451
+ ownsEvent,
452
+ getItems
408
453
  };
409
454
  }
@@ -1 +1 @@
1
- {"version":3,"file":"derivedVarRegistry.d.ts","sourceRoot":"","sources":["../../src/theme/derivedVarRegistry.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,WAAW,eAAe;IAC9B,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,iFAAiF;IACjF,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,CA2BhE,CAAC;AAEF;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GACf,eAAe,EAAE,CAMnB"}
1
+ {"version":3,"file":"derivedVarRegistry.d.ts","sourceRoot":"","sources":["../../src/theme/derivedVarRegistry.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,WAAW,eAAe;IAC9B,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,iFAAiF;IACjF,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,CAiChE,CAAC;AAEF;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GACf,eAAe,EAAE,CAMnB"}
@@ -26,6 +26,19 @@
26
26
  * entries share the same property.
27
27
  */
28
28
  export const derivedVarRegistry = {
29
+ avatar: [{
30
+ property: 'fontSize',
31
+ vars: ['--_avatar-fallback-font-size']
32
+ }, {
33
+ property: 'fontWeight',
34
+ vars: ['--_avatar-fallback-font-weight']
35
+ }, {
36
+ property: 'color',
37
+ vars: ['--_avatar-fallback-color']
38
+ }, {
39
+ property: 'backgroundColor',
40
+ vars: ['--_avatar-fallback-background']
41
+ }],
29
42
  banner: [{
30
43
  property: 'borderRadius',
31
44
  vars: ['--_banner-radius']
@@ -27,4 +27,5 @@ export type { InputARIA, InputARIAInputGroup } from './inputAria';
27
27
  export { parseHex, parseRgb, parseColor, formatHex, formatColor, toGLFloats, } from './color';
28
28
  export type { RGBA } from './color';
29
29
  export { devWarn, devError, warnOnce, formatDevMessage } from './devWarning';
30
+ export { rtlStyles } from './rtlStyles';
30
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,YAAY,EAAC,SAAS,EAAC,MAAM,SAAS,CAAC;AAEvC,YAAY,EAAC,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;AAEhF,OAAO,EACL,cAAc,EACd,SAAS,EACT,QAAQ,EACR,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,wBAAwB,EACxB,uBAAuB,EACvB,8BAA8B,EAC9B,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,8BAA8B,EAC9B,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,aAAa,CAAC;AACrB,YAAY,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAElD,OAAO,EACL,YAAY,EACZ,aAAa,EACb,oBAAoB,EACpB,oBAAoB,E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AAM,wBAAwB,CAAC;AAC5D,OAAO,EAAC,UAAU,EAAE,mBAAmB,EAAC,MAAM,cAAc,CAAC;AAC7D,YAAY,EACV,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,UAAU,GACX,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,cAAc,CAAC;AACtD,YAAY,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAC,aAAa,EAAE,eAAe,EAAC,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AACzC,YAAY,EAAC,SAAS,EAAE,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAEhE,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,SAAS,EACT,WAAW,EACX,UAAU,GACX,MAAM,SAAS,CAAC;AACjB,YAAY,EAAC,IAAI,EAAC,MAAM,SAAS,CAAC;AAElC,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAE3E,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC"}
@@ -21,4 +21,5 @@ export { observeResize, unobserveResize } from "./sharedResizeObserver.js";
21
21
  export { isRenderable } from "./isRenderable.js";
22
22
  export { getInputARIA } from "./inputAria.js";
23
23
  export { parseHex, parseRgb, parseColor, formatHex, formatColor, toGLFloats } from "./color.js";
24
- export { devWarn, devError, warnOnce, formatDevMessage } from "./devWarning.js";
24
+ export { devWarn, devError, warnOnce, formatDevMessage } from "./devWarning.js";
25
+ export { rtlStyles } from "./rtlStyles.js";
@@ -16,6 +16,23 @@ export declare function getDaysInMonth(year: number, month: number): number;
16
16
  export declare function plainDateDayOfWeek(pd: PlainDate): number;
17
17
  export declare function plainDateAddMonths(pd: PlainDate, n: number): PlainDate;
18
18
  export declare function plainDateAddDays(pd: PlainDate, n: number): PlainDate;
19
+ /**
20
+ * The wall-clock fields an instant reads as in a given zone.
21
+ *
22
+ * A fixed `'en-US'` locale with `hourCycle: 'h23'` keeps the parts numeric and
23
+ * stable whatever locale the viewer has, so callers can assemble machine
24
+ * shapes (`YYYY-MM-DD`, `HH:mm:ss`) from them. Exported for Timestamp, whose
25
+ * `system_*` formats are built from these fields rather than through `Intl`
26
+ * formatting.
27
+ */
28
+ export declare function getTimeZoneParts(instant: number, timezoneID: string): {
29
+ year: number;
30
+ month: number;
31
+ day: number;
32
+ hour: number;
33
+ minute: number;
34
+ second: number;
35
+ };
19
36
  export declare function plainDateToInstant(date: PlainDate, timezoneID: string, hour?: number, minute?: number): number;
20
37
  export declare function plainDateFromInstant(instant: number, timezoneID: string): PlainDate;
21
38
  export declare function plainDateIsBefore(a: PlainDate, b: PlainDate): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"plainDate.d.ts","sourceRoot":"","sources":["../../src/utils/plainDate.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAAK,EAAC,aAAa,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;AAE1D,YAAY,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAE3C,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,GACV,SAAS,CAcX;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,SAAS,CAG9D;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,SAAS,GAAG,aAAa,CAK3D;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,SAAS,GAAG,IAAI,CAEnD;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,IAAI,GAAG,SAAS,CAMpD;AAED,wBAAgB,cAAc,IAAI,SAAS,CAE1C;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK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AgB,GAC1B,MAAM,GAAG,WAAW,GAAG,cAAc,GAAG,aAAa,CAAC;AAExD;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAC7C,OAAO,CAAC,gBAAgB,EAAE,aAAa,CAAC,EACxC,IAAI,CAAC,qBAAqB,CAK3B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,SAAS,EACb,MAAM,EAAE,gBAAgB,GACvB,MAAM,CAKR"}
@@ -58,16 +58,35 @@ export function plainDateDayOfWeek(pd) {
58
58
  return plainDateToDate(pd).getDay();
59
59
  }
60
60
  export function plainDateAddMonths(pd, n) {
61
- const d = plainDateToDate(pd);
62
- d.setMonth(d.getMonth() + n);
63
- return plainDateFromDate(d);
61
+ // Pure month arithmetic with day clamping (Temporal.PlainDate.add
62
+ // semantics): Jan 31 + 1 month is Feb 28/29, not Mar 2/3. Date#setMonth
63
+ // would overflow the excess days into the following month instead.
64
+ const totalMonths = pd.year * 12 + (pd.month - 1) + n;
65
+ const year = Math.floor(totalMonths / 12);
66
+ const month = (totalMonths % 12 + 12) % 12 + 1;
67
+ const day = Math.min(pd.day, getDaysInMonth(year, month));
68
+ return {
69
+ year,
70
+ month,
71
+ day
72
+ };
64
73
  }
65
74
  export function plainDateAddDays(pd, n) {
66
75
  const d = plainDateToDate(pd);
67
76
  d.setDate(d.getDate() + n);
68
77
  return plainDateFromDate(d);
69
78
  }
70
- function getTimeZoneParts(instant, timezoneID) {
79
+
80
+ /**
81
+ * The wall-clock fields an instant reads as in a given zone.
82
+ *
83
+ * A fixed `'en-US'` locale with `hourCycle: 'h23'` keeps the parts numeric and
84
+ * stable whatever locale the viewer has, so callers can assemble machine
85
+ * shapes (`YYYY-MM-DD`, `HH:mm:ss`) from them. Exported for Timestamp, whose
86
+ * `system_*` formats are built from these fields rather than through `Intl`
87
+ * formatting.
88
+ */
89
+ export function getTimeZoneParts(instant, timezoneID) {
71
90
  const parts = new Intl.DateTimeFormat('en-US', {
72
91
  timeZone: timezoneID,
73
92
  year: 'numeric',
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @file rtlStyles.ts
3
+ * @input None
4
+ * @output Shared StyleX style that horizontally mirrors an element under RTL
5
+ * @position Core utility; applied to directional-icon wrappers in Calendar,
6
+ * Lightbox, and the Table expand/disclosure plugins
7
+ *
8
+ * `mirror` flips its element on the horizontal axis only when an ancestor
9
+ * carries `dir="rtl"`. Using `scaleX(-1)` (not `scale(-1, -1)`) keeps the
10
+ * vertical axis intact, and applying it OUTSIDE any state-driven rotation lets
11
+ * it compose correctly — e.g. a Table disclosure chevron still rotates to point
12
+ * down when expanded under RTL. The `:is([dir="rtl"] *)` selector matches the
13
+ * MobileNav drawer convention; a bare `direction: rtl` alone won't trigger it.
14
+ *
15
+ * SYNC: When modified, update:
16
+ * - /packages/core/src/utils/index.ts
17
+ */
18
+ import * as stylex from '@stylexjs/stylex';
19
+ export declare const rtlStyles: Readonly<{
20
+ readonly mirror: Readonly<{
21
+ readonly transform: stylex.StyleXClassNameFor<"transform", "scaleX(-1)" | null>;
22
+ }>;
23
+ }>;
24
+ //# sourceMappingURL=rtlStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rtlStyles.d.ts","sourceRoot":"","sources":["../../src/utils/rtlStyles.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAE3C,eAAO,MAAM,SAAS;;;;EAIpB,CAAC"}
@@ -0,0 +1,27 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file rtlStyles.ts
5
+ * @input None
6
+ * @output Shared StyleX style that horizontally mirrors an element under RTL
7
+ * @position Core utility; applied to directional-icon wrappers in Calendar,
8
+ * Lightbox, and the Table expand/disclosure plugins
9
+ *
10
+ * `mirror` flips its element on the horizontal axis only when an ancestor
11
+ * carries `dir="rtl"`. Using `scaleX(-1)` (not `scale(-1, -1)`) keeps the
12
+ * vertical axis intact, and applying it OUTSIDE any state-driven rotation lets
13
+ * it compose correctly — e.g. a Table disclosure chevron still rotates to point
14
+ * down when expanded under RTL. The `:is([dir="rtl"] *)` selector matches the
15
+ * MobileNav drawer convention; a bare `direction: rtl` alone won't trigger it.
16
+ *
17
+ * SYNC: When modified, update:
18
+ * - /packages/core/src/utils/index.ts
19
+ */
20
+
21
+ import * as stylex from '@stylexjs/stylex';
22
+ export const rtlStyles = {
23
+ mirror: {
24
+ k3aq6I: "xgtlewx",
25
+ $$css: true
26
+ }
27
+ };
package/locales/en.json CHANGED
@@ -235,6 +235,10 @@
235
235
  "defaultMessage": "Mobile navigation",
236
236
  "description": "Screen-reader-only accessible name for the mobile-only navigation region on small viewports. \"Mobile\" = phone/tablet (small screen), not \"movable\"."
237
237
  },
238
+ "@astryx.avatar.nameWithStatus": {
239
+ "defaultMessage": "{name}, {status}",
240
+ "description": "Screen-reader accessible name for an Avatar showing a status indicator; composes the person's name with the status label, e.g. \"Jane Doe, Online\". {name} = the avatar's name/alt text, {status} = the status dot's label. Adjust separator and order per locale."
241
+ },
238
242
  "@astryx.avatarGroup.label": {
239
243
  "defaultMessage": "Avatars",
240
244
  "description": "Screen-reader-only fallback name for a horizontal cluster of user avatar images. Plural noun; consumers usually override with \"Team members\", \"Attendees\", etc."
@@ -255,6 +259,34 @@
255
259
  "defaultMessage": "Next month",
256
260
  "description": "Screen-reader-only label on the right-arrow button in a Calendar's month header (navigates one month forward). Pairs with `calendar.previousMonth`."
257
261
  },
262
+ "@astryx.calendar.daySelected": {
263
+ "defaultMessage": "{date}, selected",
264
+ "description": "Accessible name for the Calendar day button that is the current single-mode selection. `{date}` is the localized full date, e.g. \"Thursday, January 15, 2026\". The trailing state word tells screen-reader users the focused day is selected."
265
+ },
266
+ "@astryx.calendar.dayRangeStart": {
267
+ "defaultMessage": "{date}, range start",
268
+ "description": "Accessible name for the Calendar day button that begins the selected date range (or the first pick of an in-progress range). `{date}` is the localized full date."
269
+ },
270
+ "@astryx.calendar.dayRangeEnd": {
271
+ "defaultMessage": "{date}, range end",
272
+ "description": "Accessible name for the Calendar day button that ends the selected date range. `{date}` is the localized full date. Pairs with `calendar.dayRangeStart`."
273
+ },
274
+ "@astryx.calendar.dayRangeStartAndEnd": {
275
+ "defaultMessage": "{date}, range start and range end",
276
+ "description": "Accessible name for a Calendar day button that both begins and ends a completed one-day range. `{date}` is the localized full date."
277
+ },
278
+ "@astryx.calendar.dayInRange": {
279
+ "defaultMessage": "{date}, in range",
280
+ "description": "Accessible name for a Calendar day button strictly inside the selected date range (not an endpoint). `{date}` is the localized full date."
281
+ },
282
+ "@astryx.calendar.rangeStartAnnounce": {
283
+ "defaultMessage": "Start date {date}. Select an end date.",
284
+ "description": "Screen-reader announcement after the first pick of a Calendar range selection. `{date}` is the localized full date. Prompts the user that a second pick completes the range."
285
+ },
286
+ "@astryx.calendar.rangeCompleteAnnounce": {
287
+ "defaultMessage": "Selected range: {start} to {end}.",
288
+ "description": "Screen-reader announcement after the second pick completes a Calendar range selection. `{start}` and `{end}` are localized full dates in chronological order."
289
+ },
258
290
  "@astryx.carousel.label": {
259
291
  "defaultMessage": "Carousel",
260
292
  "description": "Screen-reader-only fallback name for a horizontally-scrolling row of items. If \"carousel\" is unfamiliar in your locale, prefer the standard term (e.g. \"slider\")."
@@ -311,6 +343,18 @@
311
343
  "defaultMessage": "Type to search",
312
344
  "description": "Onboarding empty-state text shown inside a CommandPalette on first open, before the user has typed anything. Imperative sentence fragment."
313
345
  },
346
+ "@astryx.commandPalette.resultCount": {
347
+ "defaultMessage": "{count, number} {count, plural, one {result} other {results}}",
348
+ "description": "Screen-reader-only announcement of how many commands match the CommandPalette query as the user types. Example: `12 results`, `1 result`; keep compact."
349
+ },
350
+ "@astryx.commandPalette.noResultsFor": {
351
+ "defaultMessage": "No results for {query}",
352
+ "description": "Screen-reader-only announcement when a CommandPalette query matches nothing. `{query}` is the user's verbatim search text; keep it last if your language allows so truncation-by-AT still conveys the outcome."
353
+ },
354
+ "@astryx.commandPalette.loading": {
355
+ "defaultMessage": "Loading",
356
+ "description": "Screen-reader-only announcement that a CommandPalette search has started and results are being fetched. Present-progressive form; matches the visible spinner."
357
+ },
314
358
  "@astryx.dateRangeInput.presetDateRanges": {
315
359
  "defaultMessage": "Preset date ranges",
316
360
  "description": "Screen-reader-only accessible name for the sidebar of quick-pick preset ranges inside a DateRangeInput popover (e.g. \"Last 7 days\", \"This month\")."
@@ -647,6 +691,14 @@
647
691
  "defaultMessage": "Collapse {label}",
648
692
  "description": "Screen-reader-only label on the ChatComposerDrawer toggle when the drawer is expanded. Example: `Collapse Attachments`. Pairs with `expand`."
649
693
  },
694
+ "@astryx.chatDictationButton.startDictation": {
695
+ "defaultMessage": "Start dictation",
696
+ "description": "Accessible label for the microphone button when idle (not listening)."
697
+ },
698
+ "@astryx.chatDictationButton.stopDictation": {
699
+ "defaultMessage": "Stop dictation",
700
+ "description": "Accessible label for the microphone button when actively listening."
701
+ },
650
702
  "@astryx.chatLayout.newMessages": {
651
703
  "defaultMessage": "New messages",
652
704
  "description": "Text on a floating pill at the bottom of a chat viewport when unseen messages arrive below the fold; clicking scrolls to bottom. Keep short — narrow pill."
@@ -667,6 +719,14 @@
667
719
  "defaultMessage": "Send",
668
720
  "description": "Primary button label on the chat submit button (paperplane icon). Imperative verb; pairs with `Stop`. Very short."
669
721
  },
722
+ "@astryx.chatToolCalls.error": {
723
+ "defaultMessage": "Error: {message}",
724
+ "description": "Screen-reader text for a tool call that failed. {message} is the error detail."
725
+ },
726
+ "@astryx.chatToolCalls.groupLabel": {
727
+ "defaultMessage": "{count} tool calls",
728
+ "description": "Summary label shown in the group header when multiple tool calls are expanded. {count} is the number of calls."
729
+ },
670
730
  "@astryx.chatTriggerMenu.suggestions": {
671
731
  "defaultMessage": "Suggestions",
672
732
  "description": "Screen-reader-only fallback label for the popover listbox opened by a trigger character (`@`, `/`) in the chat composer when the trigger provides no specific label."
@@ -691,6 +751,10 @@
691
751
  "defaultMessage": "Clear {label}",
692
752
  "description": "Screen-reader-only label on the X that removes the selected file from a FileInput. Example: `Clear Attachment`, `Clear Résumé`."
693
753
  },
754
+ "@astryx.fileInput.required": {
755
+ "defaultMessage": "Required",
756
+ "description": "Screen-reader-only description on the FileInput trigger indicating the field must be filled in. Mirrors the visible `Required` indicator next to the field label; conveyed via description because aria-required is not supported on role=\"button\"."
757
+ },
694
758
  "@astryx.fileInput.triggerWithFiles": {
695
759
  "defaultMessage": "{label}, {fileNames}",
696
760
  "description": "Accessible name for a FileInput trigger that has files attached, composing the field label with the selected filenames. Example: `Attachments, report.pdf, notes.txt`."
@@ -707,6 +771,18 @@
707
771
  "defaultMessage": "Clear all {label}",
708
772
  "description": "Screen-reader-only label on the X that clears every selected value from a MultiSelector. Example: `Clear all Countries`. `{label}` is typically already plural in English."
709
773
  },
774
+ "@astryx.input.statusButton.error": {
775
+ "defaultMessage": "Error details",
776
+ "description": "Accessible name for the focusable status icon button inside an input when statusVariant is 'tooltip' and the status type is error. Activating or focusing the button reveals the error message in a tooltip. Keep it short — it labels an icon-only button."
777
+ },
778
+ "@astryx.input.statusButton.warning": {
779
+ "defaultMessage": "Warning details",
780
+ "description": "Accessible name for the focusable status icon button inside an input when statusVariant is 'tooltip' and the status type is warning. Activating or focusing the button reveals the warning message in a tooltip."
781
+ },
782
+ "@astryx.input.statusButton.success": {
783
+ "defaultMessage": "Success details",
784
+ "description": "Accessible name for the focusable status icon button inside an input when statusVariant is 'tooltip' and the status type is success. Activating or focusing the button reveals the success message in a tooltip."
785
+ },
710
786
  "@astryx.numberInput.clearLabel": {
711
787
  "defaultMessage": "Clear {label}",
712
788
  "description": "Screen-reader-only label on the X that clears the value from a NumberInput. Example: `Clear Age`, `Clear Quantity`."
@@ -176,6 +176,9 @@
176
176
  "@astryx.appShell.mobileNavigation": {
177
177
  "defaultMessage": "⟦Ṁóƀíłé ñàṽíĝàţíóñ⟧"
178
178
  },
179
+ "@astryx.avatar.nameWithStatus": {
180
+ "defaultMessage": "⟦{name}, {status}⟧"
181
+ },
179
182
  "@astryx.avatarGroup.label": {
180
183
  "defaultMessage": "⟦Àṽàţàřš⟧"
181
184
  },
@@ -191,6 +194,27 @@
191
194
  "@astryx.calendar.nextMonth": {
192
195
  "defaultMessage": "⟦Ñéẋţ ɱóñţĥ⟧"
193
196
  },
197
+ "@astryx.calendar.daySelected": {
198
+ "defaultMessage": "⟦{date}, šéłéçţéð⟧"
199
+ },
200
+ "@astryx.calendar.dayRangeStart": {
201
+ "defaultMessage": "⟦{date}, řàñĝé šţàřţ⟧"
202
+ },
203
+ "@astryx.calendar.dayRangeEnd": {
204
+ "defaultMessage": "⟦{date}, řàñĝé éñð⟧"
205
+ },
206
+ "@astryx.calendar.dayRangeStartAndEnd": {
207
+ "defaultMessage": "⟦{date}, řàñĝé šţàřţ àñð řàñĝé éñð⟧"
208
+ },
209
+ "@astryx.calendar.dayInRange": {
210
+ "defaultMessage": "⟦{date}, íñ řàñĝé⟧"
211
+ },
212
+ "@astryx.calendar.rangeStartAnnounce": {
213
+ "defaultMessage": "⟦Šţàřţ ðàţé {date}. Šéłéçţ àñ éñð ðàţé.⟧"
214
+ },
215
+ "@astryx.calendar.rangeCompleteAnnounce": {
216
+ "defaultMessage": "⟦Šéłéçţéð řàñĝé: {start} ţó {end}.⟧"
217
+ },
194
218
  "@astryx.carousel.label": {
195
219
  "defaultMessage": "⟦Çàřóúšéł⟧"
196
220
  },
@@ -233,6 +257,15 @@
233
257
  "@astryx.commandPalette.emptyBootstrap": {
234
258
  "defaultMessage": "⟦Ţýþé ţó šéàřçĥ⟧"
235
259
  },
260
+ "@astryx.commandPalette.resultCount": {
261
+ "defaultMessage": "⟦{count, number} {count, plural, one {result} other {results}}⟧"
262
+ },
263
+ "@astryx.commandPalette.noResultsFor": {
264
+ "defaultMessage": "⟦Ñó řéšúłţš ƒóř {query}⟧"
265
+ },
266
+ "@astryx.commandPalette.loading": {
267
+ "defaultMessage": "⟦Łóàðíñĝ⟧"
268
+ },
236
269
  "@astryx.dateRangeInput.presetDateRanges": {
237
270
  "defaultMessage": "⟦Þřéšéţ ðàţé řàñĝéš⟧"
238
271
  },
@@ -485,6 +518,12 @@
485
518
  "@astryx.chatComposerDrawer.collapse": {
486
519
  "defaultMessage": "⟦Çółłàþšé {label}⟧"
487
520
  },
521
+ "@astryx.chatDictationButton.startDictation": {
522
+ "defaultMessage": "⟦Šţàřţ ðíçţàţíóñ⟧"
523
+ },
524
+ "@astryx.chatDictationButton.stopDictation": {
525
+ "defaultMessage": "⟦Šţóþ ðíçţàţíóñ⟧"
526
+ },
488
527
  "@astryx.chatLayout.newMessages": {
489
528
  "defaultMessage": "⟦Ñéŵ ɱéššàĝéš⟧"
490
529
  },
@@ -500,6 +539,12 @@
500
539
  "@astryx.chatSendButton.send": {
501
540
  "defaultMessage": "⟦Šéñð⟧"
502
541
  },
542
+ "@astryx.chatToolCalls.error": {
543
+ "defaultMessage": "⟦Éřřóř: {message}⟧"
544
+ },
545
+ "@astryx.chatToolCalls.groupLabel": {
546
+ "defaultMessage": "⟦{count} ţóół çàłłš⟧"
547
+ },
503
548
  "@astryx.chatTriggerMenu.suggestions": {
504
549
  "defaultMessage": "⟦Šúĝĝéšţíóñš⟧"
505
550
  },
@@ -518,6 +563,9 @@
518
563
  "@astryx.fileInput.clearLabel": {
519
564
  "defaultMessage": "⟦Çłéàř {label}⟧"
520
565
  },
566
+ "@astryx.fileInput.required": {
567
+ "defaultMessage": "⟦Řéɋúířéð⟧"
568
+ },
521
569
  "@astryx.fileInput.triggerWithFiles": {
522
570
  "defaultMessage": "⟦{label}, {fileNames}⟧"
523
571
  },
@@ -530,6 +578,15 @@
530
578
  "@astryx.multiSelector.clearAll": {
531
579
  "defaultMessage": "⟦Çłéàř àłł {label}⟧"
532
580
  },
581
+ "@astryx.input.statusButton.error": {
582
+ "defaultMessage": "⟦Éřřóř ðéţàíłš⟧"
583
+ },
584
+ "@astryx.input.statusButton.warning": {
585
+ "defaultMessage": "⟦Ŵàřñíñĝ ðéţàíłš⟧"
586
+ },
587
+ "@astryx.input.statusButton.success": {
588
+ "defaultMessage": "⟦Šúççéšš ðéţàíłš⟧"
589
+ },
533
590
  "@astryx.numberInput.clearLabel": {
534
591
  "defaultMessage": "⟦Çłéàř {label}⟧"
535
592
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/core",
3
- "version": "0.1.9-canary.d2d84f8",
3
+ "version": "0.1.9-canary.e00a241",
4
4
  "displayName": "Astryx Core",
5
5
  "description": "The component library. Accessible, themeable React components with built-in spacing, dark mode, and StyleX styling.",
6
6
  "author": "Meta Open Source",
@@ -54,6 +54,11 @@
54
54
  "types": "./src/tailwind-theme.css.d.ts",
55
55
  "default": "./src/tailwind-theme.css"
56
56
  },
57
+ "./BaseProps": {
58
+ "source": "./src/BaseProps.ts",
59
+ "types": "./dist/BaseProps.d.ts",
60
+ "default": "./dist/BaseProps.js"
61
+ },
57
62
  "./naming": {
58
63
  "source": "./src/naming.ts",
59
64
  "types": "./dist/naming.d.ts",