@astryxdesign/core 0.1.6 → 0.1.7-canary.04cd8f7

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 (571) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/README.md +25 -14
  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 +4 -1
  6. package/dist/AppShell/AppShell.d.ts.map +1 -1
  7. package/dist/AppShell/AppShell.js +3 -1
  8. package/dist/AvatarGroup/AvatarGroup.d.ts +1 -1
  9. package/dist/AvatarGroup/AvatarGroup.d.ts.map +1 -1
  10. package/dist/AvatarGroup/AvatarGroup.js +4 -1
  11. package/dist/Banner/Banner.d.ts.map +1 -1
  12. package/dist/Banner/Banner.js +8 -6
  13. package/dist/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  14. package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  15. package/dist/Breadcrumbs/Breadcrumbs.js +4 -1
  16. package/dist/Button/Button.d.ts +10 -2
  17. package/dist/Button/Button.d.ts.map +1 -1
  18. package/dist/Button/Button.js +49 -6
  19. package/dist/ButtonGroup/ButtonGroup.d.ts +20 -5
  20. package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
  21. package/dist/ButtonGroup/ButtonGroup.js +27 -11
  22. package/dist/Calendar/Calendar.d.ts.map +1 -1
  23. package/dist/Calendar/Calendar.js +29 -7
  24. package/dist/Carousel/Carousel.d.ts +1 -1
  25. package/dist/Carousel/Carousel.d.ts.map +1 -1
  26. package/dist/Carousel/Carousel.js +8 -5
  27. package/dist/Chat/ChatComposer.d.ts.map +1 -1
  28. package/dist/Chat/ChatComposer.js +4 -1
  29. package/dist/Chat/ChatComposerDrawer.d.ts +1 -1
  30. package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
  31. package/dist/Chat/ChatComposerDrawer.js +9 -2
  32. package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
  33. package/dist/Chat/ChatComposerInput.js +6 -2
  34. package/dist/Chat/ChatLayout.d.ts +1 -11
  35. package/dist/Chat/ChatLayout.d.ts.map +1 -1
  36. package/dist/Chat/ChatLayout.js +6 -4
  37. package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
  38. package/dist/Chat/ChatLayoutScrollButton.js +4 -2
  39. package/dist/Chat/ChatMessage.d.ts +1 -1
  40. package/dist/Chat/ChatMessage.d.ts.map +1 -1
  41. package/dist/Chat/ChatMessage.js +8 -2
  42. package/dist/Chat/ChatMessageBubble.d.ts +1 -1
  43. package/dist/Chat/ChatMessageBubble.d.ts.map +1 -1
  44. package/dist/Chat/ChatMessageBubble.js +3 -1
  45. package/dist/Chat/ChatMessageList.d.ts +1 -1
  46. package/dist/Chat/ChatMessageList.d.ts.map +1 -1
  47. package/dist/Chat/ChatMessageList.js +3 -1
  48. package/dist/Chat/ChatMessageMetadata.d.ts.map +1 -1
  49. package/dist/Chat/ChatMessageMetadata.js +13 -8
  50. package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
  51. package/dist/Chat/ChatPastedTextToken.js +3 -1
  52. package/dist/Chat/ChatSendButton.d.ts.map +1 -1
  53. package/dist/Chat/ChatSendButton.js +3 -1
  54. package/dist/Chat/index.d.ts +1 -1
  55. package/dist/Chat/index.d.ts.map +1 -1
  56. package/dist/Chat/useChatStreamScroll.d.ts +12 -1
  57. package/dist/Chat/useChatStreamScroll.d.ts.map +1 -1
  58. package/dist/Chat/useChatStreamScroll.js +43 -6
  59. package/dist/Chat/useSpeechRecognition.d.ts.map +1 -1
  60. package/dist/Chat/useSpeechRecognition.js +4 -2
  61. package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
  62. package/dist/Chat/useTriggerMenu.js +4 -2
  63. package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
  64. package/dist/CheckboxInput/CheckboxInput.js +4 -2
  65. package/dist/CheckboxList/CheckboxList.d.ts +1 -1
  66. package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
  67. package/dist/CheckboxList/CheckboxList.js +3 -1
  68. package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
  69. package/dist/CheckboxList/CheckboxListItem.js +3 -1
  70. package/dist/Citation/Citation.d.ts.map +1 -1
  71. package/dist/Citation/Citation.js +10 -2
  72. package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
  73. package/dist/CodeBlock/CodeBlock.js +71 -53
  74. package/dist/Collapsible/Collapsible.d.ts +11 -1
  75. package/dist/Collapsible/Collapsible.d.ts.map +1 -1
  76. package/dist/Collapsible/Collapsible.js +36 -4
  77. package/dist/CommandPalette/CommandPalette.d.ts +1 -1
  78. package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
  79. package/dist/CommandPalette/CommandPalette.js +8 -3
  80. package/dist/CommandPalette/CommandPaletteInput.d.ts +1 -1
  81. package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
  82. package/dist/CommandPalette/CommandPaletteInput.js +4 -1
  83. package/dist/CommandPalette/CommandPaletteList.d.ts +1 -1
  84. package/dist/CommandPalette/CommandPaletteList.d.ts.map +1 -1
  85. package/dist/CommandPalette/CommandPaletteList.js +4 -1
  86. package/dist/ContextMenu/ContextMenu.d.ts +1 -1
  87. package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
  88. package/dist/ContextMenu/ContextMenu.js +8 -4
  89. package/dist/ContextMenu/index.d.ts +3 -0
  90. package/dist/ContextMenu/index.d.ts.map +1 -1
  91. package/dist/ContextMenu/index.js +7 -1
  92. package/dist/DateInput/DateInput.d.ts +1 -1
  93. package/dist/DateInput/DateInput.d.ts.map +1 -1
  94. package/dist/DateInput/DateInput.js +10 -5
  95. package/dist/DateRangeInput/DateRangeInput.d.ts +1 -1
  96. package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
  97. package/dist/DateRangeInput/DateRangeInput.js +11 -6
  98. package/dist/DateTimeInput/DateTimeInput.d.ts +1 -1
  99. package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
  100. package/dist/DateTimeInput/DateTimeInput.js +15 -7
  101. package/dist/Dialog/Dialog.d.ts.map +1 -1
  102. package/dist/Dialog/Dialog.js +15 -12
  103. package/dist/Dialog/DialogHeader.d.ts +1 -1
  104. package/dist/Dialog/DialogHeader.d.ts.map +1 -1
  105. package/dist/Dialog/DialogHeader.js +7 -3
  106. package/dist/DropdownMenu/DropdownMenu.d.ts +1 -1
  107. package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  108. package/dist/DropdownMenu/DropdownMenu.js +19 -9
  109. package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts +89 -0
  110. package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -0
  111. package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +170 -0
  112. package/dist/DropdownMenu/DropdownMenuContext.d.ts +17 -1
  113. package/dist/DropdownMenu/DropdownMenuContext.d.ts.map +1 -1
  114. package/dist/DropdownMenu/DropdownMenuContext.js +18 -0
  115. package/dist/DropdownMenu/DropdownMenuRadioGroup.d.ts +69 -0
  116. package/dist/DropdownMenu/DropdownMenuRadioGroup.d.ts.map +1 -0
  117. package/dist/DropdownMenu/DropdownMenuRadioGroup.js +70 -0
  118. package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts +69 -0
  119. package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -0
  120. package/dist/DropdownMenu/DropdownMenuRadioItem.js +178 -0
  121. package/dist/DropdownMenu/index.d.ts +5 -1
  122. package/dist/DropdownMenu/index.d.ts.map +1 -1
  123. package/dist/DropdownMenu/index.js +10 -1
  124. package/dist/DropdownMenu/menuItemRoles.d.ts +13 -0
  125. package/dist/DropdownMenu/menuItemRoles.d.ts.map +1 -0
  126. package/dist/DropdownMenu/menuItemRoles.js +15 -0
  127. package/dist/EmptyState/EmptyState.d.ts +4 -1
  128. package/dist/EmptyState/EmptyState.d.ts.map +1 -1
  129. package/dist/FileInput/FileInput.d.ts.map +1 -1
  130. package/dist/FileInput/FileInput.js +11 -1
  131. package/dist/Icon/Icon.d.ts +17 -12
  132. package/dist/Icon/Icon.d.ts.map +1 -1
  133. package/dist/Icon/Icon.js +28 -20
  134. package/dist/Kbd/Kbd.js +1 -1
  135. package/dist/Layer/useLayer.d.ts +10 -0
  136. package/dist/Layer/useLayer.d.ts.map +1 -1
  137. package/dist/Layer/useLayer.js +23 -1
  138. package/dist/Lightbox/Lightbox.d.ts.map +1 -1
  139. package/dist/Lightbox/Lightbox.js +6 -4
  140. package/dist/Link/Link.d.ts +5 -1
  141. package/dist/Link/Link.d.ts.map +1 -1
  142. package/dist/Link/Link.js +32 -1
  143. package/dist/Markdown/Markdown.d.ts.map +1 -1
  144. package/dist/Markdown/Markdown.js +10 -8
  145. package/dist/MobileNav/MobileNav.d.ts.map +1 -1
  146. package/dist/MobileNav/MobileNav.js +4 -2
  147. package/dist/MobileNav/MobileNavToggle.d.ts +1 -1
  148. package/dist/MobileNav/MobileNavToggle.d.ts.map +1 -1
  149. package/dist/MobileNav/MobileNavToggle.js +4 -1
  150. package/dist/MoreMenu/MoreMenu.d.ts +1 -1
  151. package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
  152. package/dist/MoreMenu/MoreMenu.js +4 -1
  153. package/dist/MultiSelector/MultiSelector.d.ts +1 -1
  154. package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
  155. package/dist/MultiSelector/MultiSelector.js +13 -6
  156. package/dist/NumberInput/NumberInput.d.ts.map +1 -1
  157. package/dist/NumberInput/NumberInput.js +5 -1
  158. package/dist/Outline/Outline.d.ts +1 -1
  159. package/dist/Outline/Outline.d.ts.map +1 -1
  160. package/dist/Outline/Outline.js +4 -1
  161. package/dist/Pagination/Pagination.d.ts +1 -1
  162. package/dist/Pagination/Pagination.d.ts.map +1 -1
  163. package/dist/Pagination/Pagination.js +38 -11
  164. package/dist/Popover/usePopover.d.ts.map +1 -1
  165. package/dist/Popover/usePopover.js +4 -1
  166. package/dist/PowerSearch/PowerSearch.d.ts +1 -1
  167. package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
  168. package/dist/PowerSearch/PowerSearch.js +22 -12
  169. package/dist/PowerSearch/PowerSearchEditPopover.d.ts +1 -1
  170. package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
  171. package/dist/PowerSearch/PowerSearchEditPopover.js +26 -20
  172. package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
  173. package/dist/PowerSearch/PowerSearchToken.js +7 -3
  174. package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
  175. package/dist/PowerSearch/PowerSearchValueEditor.js +34 -21
  176. package/dist/PowerSearch/formatFilterValue.d.ts +2 -1
  177. package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
  178. package/dist/PowerSearch/formatFilterValue.js +19 -9
  179. package/dist/PowerSearch/index.d.ts +2 -1
  180. package/dist/PowerSearch/index.d.ts.map +1 -1
  181. package/dist/PowerSearch/index.js +1 -0
  182. package/dist/PowerSearch/resolveOperatorLabel.d.ts +23 -0
  183. package/dist/PowerSearch/resolveOperatorLabel.d.ts.map +1 -0
  184. package/dist/PowerSearch/resolveOperatorLabel.js +28 -0
  185. package/dist/PowerSearch/types.d.ts +28 -2
  186. package/dist/PowerSearch/types.d.ts.map +1 -1
  187. package/dist/PowerSearch/usePowerSearchConfig.d.ts.map +1 -1
  188. package/dist/PowerSearch/usePowerSearchConfig.js +27 -27
  189. package/dist/PowerSearch/usePowerSearchSource.d.ts.map +1 -1
  190. package/dist/PowerSearch/usePowerSearchSource.js +15 -8
  191. package/dist/Resizable/ResizeHandle.d.ts +1 -1
  192. package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
  193. package/dist/Resizable/ResizeHandle.js +4 -1
  194. package/dist/Selector/Selector.d.ts.map +1 -1
  195. package/dist/Selector/Selector.js +52 -14
  196. package/dist/SideNav/SideNav.d.ts.map +1 -1
  197. package/dist/SideNav/SideNav.js +4 -2
  198. package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
  199. package/dist/SideNav/SideNavCollapseButton.js +3 -1
  200. package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
  201. package/dist/SideNav/SideNavHeading.js +5 -3
  202. package/dist/SideNav/SideNavItem.d.ts.map +1 -1
  203. package/dist/SideNav/SideNavItem.js +7 -1
  204. package/dist/Switch/Switch.d.ts.map +1 -1
  205. package/dist/Switch/Switch.js +4 -2
  206. package/dist/TabList/Tab.d.ts.map +1 -1
  207. package/dist/TabList/Tab.js +2 -2
  208. package/dist/TabList/TabList.d.ts +1 -1
  209. package/dist/TabList/TabList.d.ts.map +1 -1
  210. package/dist/TabList/TabList.js +6 -1
  211. package/dist/TabList/TabMenu.d.ts.map +1 -1
  212. package/dist/TabList/TabMenu.js +1 -1
  213. package/dist/Table/BaseTable.d.ts.map +1 -1
  214. package/dist/Table/BaseTable.js +29 -16
  215. package/dist/Table/Table.d.ts.map +1 -1
  216. package/dist/Table/Table.js +5 -3
  217. package/dist/Table/index.d.ts +2 -0
  218. package/dist/Table/index.d.ts.map +1 -1
  219. package/dist/Table/index.js +1 -0
  220. package/dist/Table/plugins/columnResize/useTableColumnResize.js +1 -1
  221. package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
  222. package/dist/Table/plugins/filtering/useTableFiltering.js +56 -19
  223. package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts +1 -1
  224. package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -1
  225. package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +12 -5
  226. package/dist/Table/plugins/pagination/useTablePagination.d.ts.map +1 -1
  227. package/dist/Table/plugins/pagination/useTablePagination.js +6 -3
  228. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
  229. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +8 -6
  230. package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts +1 -1
  231. package/dist/Table/plugins/rowIndex/useTableRowIndex.js +1 -1
  232. package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
  233. package/dist/Table/plugins/selection/useTableSelection.js +5 -2
  234. package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
  235. package/dist/Table/plugins/sortable/useTableSortable.js +6 -4
  236. package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +2 -2
  237. package/dist/Table/plugins/tree/index.d.ts +5 -0
  238. package/dist/Table/plugins/tree/index.d.ts.map +1 -0
  239. package/dist/Table/plugins/tree/index.js +4 -0
  240. package/dist/Table/plugins/tree/useTableTreeData.d.ts +38 -0
  241. package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -0
  242. package/dist/Table/plugins/tree/useTableTreeData.js +358 -0
  243. package/dist/Table/plugins/tree/useTableTreeState.d.ts +51 -0
  244. package/dist/Table/plugins/tree/useTableTreeState.d.ts.map +1 -0
  245. package/dist/Table/plugins/tree/useTableTreeState.js +175 -0
  246. package/dist/Table/types.d.ts +17 -10
  247. package/dist/Table/types.d.ts.map +1 -1
  248. package/dist/Table/useBaseTablePlugins.d.ts.map +1 -1
  249. package/dist/Table/useBaseTablePlugins.js +6 -3
  250. package/dist/TextInput/TextInput.d.ts.map +1 -1
  251. package/dist/TextInput/TextInput.js +5 -1
  252. package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
  253. package/dist/Thumbnail/Thumbnail.js +8 -2
  254. package/dist/TimeInput/TimeInput.d.ts +1 -1
  255. package/dist/TimeInput/TimeInput.d.ts.map +1 -1
  256. package/dist/TimeInput/TimeInput.js +7 -2
  257. package/dist/Timestamp/Timestamp.d.ts.map +1 -1
  258. package/dist/Timestamp/Timestamp.js +18 -3
  259. package/dist/Toast/Toast.d.ts.map +1 -1
  260. package/dist/Toast/Toast.js +3 -1
  261. package/dist/Toast/ToastViewport.d.ts.map +1 -1
  262. package/dist/Toast/ToastViewport.js +3 -1
  263. package/dist/Token/Token.d.ts.map +1 -1
  264. package/dist/Token/Token.js +8 -2
  265. package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
  266. package/dist/Tokenizer/Tokenizer.js +3 -1
  267. package/dist/Toolbar/Toolbar.d.ts.map +1 -1
  268. package/dist/Toolbar/Toolbar.js +8 -1
  269. package/dist/TopNav/TopNav.d.ts +2 -1
  270. package/dist/TopNav/TopNav.d.ts.map +1 -1
  271. package/dist/TopNav/TopNav.js +4 -1
  272. package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
  273. package/dist/TopNav/TopNavHeading.js +5 -3
  274. package/dist/TreeList/TreeList.d.ts.map +1 -1
  275. package/dist/TreeList/TreeList.js +5 -1
  276. package/dist/TreeList/TreeListItem.d.ts.map +1 -1
  277. package/dist/TreeList/TreeListItem.js +7 -1
  278. package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
  279. package/dist/Typeahead/BaseTypeahead.js +8 -4
  280. package/dist/Typeahead/Typeahead.d.ts.map +1 -1
  281. package/dist/Typeahead/Typeahead.js +3 -1
  282. package/dist/VisuallyHidden/VisuallyHidden.d.ts +1 -0
  283. package/dist/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
  284. package/dist/VisuallyHidden/VisuallyHidden.js +1 -0
  285. package/dist/astryx.css +38 -4
  286. package/dist/astryx.umd.js +62 -60
  287. package/dist/astryx.umd.js.map +4 -4
  288. package/dist/authoring/doc.d.ts +145 -0
  289. package/dist/authoring/doc.d.ts.map +1 -0
  290. package/dist/authoring/doc.js +100 -0
  291. package/dist/authoring/index.d.ts +29 -0
  292. package/dist/authoring/index.d.ts.map +1 -0
  293. package/dist/authoring/index.js +28 -0
  294. package/dist/authoring/integration.d.ts +35 -0
  295. package/dist/authoring/integration.d.ts.map +1 -0
  296. package/dist/authoring/integration.js +30 -0
  297. package/dist/authoring/template.d.ts +66 -0
  298. package/dist/authoring/template.d.ts.map +1 -0
  299. package/dist/authoring/template.js +55 -0
  300. package/dist/config.d.ts +80 -0
  301. package/dist/config.d.ts.map +1 -0
  302. package/dist/config.js +40 -0
  303. package/dist/docs-types.d.ts +13 -4
  304. package/dist/docs-types.d.ts.map +1 -1
  305. package/dist/i18n/InternationalizationContext.d.ts +12 -0
  306. package/dist/i18n/InternationalizationContext.d.ts.map +1 -0
  307. package/dist/i18n/InternationalizationContext.js +29 -0
  308. package/dist/i18n/InternationalizationProvider.d.ts +61 -0
  309. package/dist/i18n/InternationalizationProvider.d.ts.map +1 -0
  310. package/dist/i18n/InternationalizationProvider.js +44 -0
  311. package/dist/i18n/index.d.ts +24 -0
  312. package/dist/i18n/index.d.ts.map +1 -0
  313. package/dist/i18n/index.js +21 -0
  314. package/dist/i18n/resolve.d.ts +22 -0
  315. package/dist/i18n/resolve.d.ts.map +1 -0
  316. package/dist/i18n/resolve.js +141 -0
  317. package/dist/i18n/translator.d.ts +25 -0
  318. package/dist/i18n/translator.d.ts.map +1 -0
  319. package/dist/i18n/translator.js +1 -0
  320. package/dist/i18n/types.d.ts +47 -0
  321. package/dist/i18n/types.d.ts.map +1 -0
  322. package/dist/i18n/types.js +1 -0
  323. package/dist/i18n/useTranslator.d.ts +15 -0
  324. package/dist/i18n/useTranslator.d.ts.map +1 -0
  325. package/dist/i18n/useTranslator.js +39 -0
  326. package/dist/index.d.ts +1 -0
  327. package/dist/index.d.ts.map +1 -1
  328. package/dist/index.js +3 -0
  329. package/dist/theme/Theme.js +1 -1
  330. package/dist/theme/defineTheme.d.ts +1 -1
  331. package/dist/theme/defineTheme.js +1 -1
  332. package/dist/theme/hct.d.ts +0 -1
  333. package/dist/theme/hct.d.ts.map +1 -1
  334. package/dist/theme/hct.js +0 -3
  335. package/dist/utils/color.d.ts +13 -1
  336. package/dist/utils/color.d.ts.map +1 -1
  337. package/dist/utils/color.js +23 -1
  338. package/dist/utils/index.d.ts +1 -1
  339. package/dist/utils/index.d.ts.map +1 -1
  340. package/dist/utils/index.js +1 -1
  341. package/locales/en.json +754 -0
  342. package/locales/pseudo.json +566 -0
  343. package/package.json +23 -2
  344. package/src/AlertDialog/AlertDialog.doc.mjs +5 -0
  345. package/src/AlertDialog/AlertDialog.tsx +4 -1
  346. package/src/AppShell/AppShell.doc.mjs +8 -2
  347. package/src/AppShell/AppShell.tsx +3 -1
  348. package/src/AvatarGroup/AvatarGroup.tsx +4 -1
  349. package/src/Banner/Banner.tsx +10 -5
  350. package/src/Breadcrumbs/Breadcrumbs.tsx +4 -1
  351. package/src/Button/Button.doc.mjs +8 -0
  352. package/src/Button/Button.test.tsx +27 -0
  353. package/src/Button/Button.tsx +51 -5
  354. package/src/ButtonGroup/ButtonGroup.test.tsx +386 -2
  355. package/src/ButtonGroup/ButtonGroup.tsx +27 -11
  356. package/src/Calendar/Calendar.test.tsx +103 -2
  357. package/src/Calendar/Calendar.tsx +29 -6
  358. package/src/Card/Card.doc.mjs +3 -3
  359. package/src/Carousel/Carousel.tsx +10 -7
  360. package/src/Chat/ChatComposer.tsx +5 -1
  361. package/src/Chat/ChatComposerDrawer.tsx +9 -2
  362. package/src/Chat/ChatComposerInput.tsx +10 -4
  363. package/src/Chat/ChatLayout.test.tsx +127 -2
  364. package/src/Chat/ChatLayout.tsx +5 -12
  365. package/src/Chat/ChatLayoutScrollButton.tsx +4 -2
  366. package/src/Chat/ChatMessage.tsx +5 -1
  367. package/src/Chat/ChatMessageBubble.tsx +2 -0
  368. package/src/Chat/ChatMessageList.doc.mjs +1 -1
  369. package/src/Chat/ChatMessageList.tsx +2 -0
  370. package/src/Chat/ChatMessageMetadata.tsx +15 -9
  371. package/src/Chat/ChatPastedTextToken.tsx +3 -1
  372. package/src/Chat/ChatSendButton.tsx +3 -1
  373. package/src/Chat/ChatToolCalls.doc.mjs +1 -1
  374. package/src/Chat/index.ts +1 -0
  375. package/src/Chat/useChatStreamScroll.test.tsx +168 -0
  376. package/src/Chat/useChatStreamScroll.ts +67 -11
  377. package/src/Chat/useSpeechRecognition.ts +11 -2
  378. package/src/Chat/useTriggerMenu.tsx +4 -2
  379. package/src/CheckboxInput/CheckboxInput.doc.mjs +1 -1
  380. package/src/CheckboxInput/CheckboxInput.test.tsx +16 -0
  381. package/src/CheckboxInput/CheckboxInput.tsx +4 -2
  382. package/src/CheckboxList/CheckboxList.doc.mjs +6 -1
  383. package/src/CheckboxList/CheckboxList.tsx +2 -0
  384. package/src/CheckboxList/CheckboxListItem.tsx +7 -1
  385. package/src/Citation/Citation.tsx +4 -2
  386. package/src/ClickableCard/ClickableCard.doc.mjs +1 -1
  387. package/src/CodeBlock/CodeBlock.tsx +91 -40
  388. package/src/Collapsible/Collapsible.doc.mjs +7 -0
  389. package/src/Collapsible/Collapsible.test.tsx +80 -0
  390. package/src/Collapsible/Collapsible.tsx +58 -5
  391. package/src/CommandPalette/CommandPalette.tsx +10 -3
  392. package/src/CommandPalette/CommandPaletteInput.test.tsx +1 -1
  393. package/src/CommandPalette/CommandPaletteInput.tsx +5 -1
  394. package/src/CommandPalette/CommandPaletteList.tsx +4 -1
  395. package/src/ContextMenu/ContextMenu.test.tsx +75 -1
  396. package/src/ContextMenu/ContextMenu.tsx +14 -6
  397. package/src/ContextMenu/index.ts +15 -0
  398. package/src/DateInput/DateInput.doc.mjs +2 -2
  399. package/src/DateInput/DateInput.test.tsx +17 -5
  400. package/src/DateInput/DateInput.tsx +13 -5
  401. package/src/DateRangeInput/DateRangeInput.doc.mjs +1 -1
  402. package/src/DateRangeInput/DateRangeInput.tsx +14 -6
  403. package/src/DateTimeInput/DateTimeInput.doc.mjs +2 -2
  404. package/src/DateTimeInput/DateTimeInput.tsx +17 -7
  405. package/src/Dialog/Dialog.tsx +11 -15
  406. package/src/Dialog/DialogHeader.tsx +7 -3
  407. package/src/DropdownMenu/DropdownMenu.doc.mjs +23 -0
  408. package/src/DropdownMenu/DropdownMenu.tsx +23 -14
  409. package/src/DropdownMenu/DropdownMenuCheckboxItem.doc.mjs +95 -0
  410. package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +237 -0
  411. package/src/DropdownMenu/DropdownMenuContext.tsx +29 -1
  412. package/src/DropdownMenu/DropdownMenuItem.doc.mjs +7 -1
  413. package/src/DropdownMenu/DropdownMenuRadioGroup.doc.mjs +80 -0
  414. package/src/DropdownMenu/DropdownMenuRadioGroup.tsx +119 -0
  415. package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +80 -0
  416. package/src/DropdownMenu/DropdownMenuRadioItem.tsx +232 -0
  417. package/src/DropdownMenu/DropdownMenuSelectable.test.tsx +163 -0
  418. package/src/DropdownMenu/index.ts +23 -3
  419. package/src/DropdownMenu/menuItemRoles.ts +22 -0
  420. package/src/EmptyState/EmptyState.doc.mjs +3 -3
  421. package/src/EmptyState/EmptyState.tsx +4 -1
  422. package/src/Field/Field.doc.mjs +3 -3
  423. package/src/Field/FieldLabel.doc.mjs +1 -1
  424. package/src/FileInput/FileInput.test.tsx +40 -1
  425. package/src/FileInput/FileInput.tsx +12 -1
  426. package/src/Grid/Grid.doc.mjs +5 -5
  427. package/src/Icon/Icon.test.tsx +46 -0
  428. package/src/Icon/Icon.tsx +37 -24
  429. package/src/InputGroup/InputGroup.doc.mjs +1 -1
  430. package/src/Kbd/Kbd.test.tsx +26 -0
  431. package/src/Kbd/Kbd.tsx +1 -1
  432. package/src/Layer/useLayer.doc.mjs +8 -5
  433. package/src/Layer/useLayer.test.tsx +136 -1
  434. package/src/Layer/useLayer.tsx +34 -2
  435. package/src/Lightbox/Lightbox.doc.mjs +7 -2
  436. package/src/Lightbox/Lightbox.tsx +6 -4
  437. package/src/Link/Link.test.tsx +74 -2
  438. package/src/Link/Link.tsx +48 -1
  439. package/src/Markdown/Markdown.tsx +12 -4
  440. package/src/MobileNav/MobileNav.tsx +4 -2
  441. package/src/MobileNav/MobileNavToggle.tsx +5 -3
  442. package/src/MoreMenu/MoreMenu.tsx +4 -1
  443. package/src/MultiSelector/MultiSelector.tsx +14 -5
  444. package/src/NumberInput/NumberInput.doc.mjs +2 -2
  445. package/src/NumberInput/NumberInput.tsx +3 -1
  446. package/src/Outline/Outline.tsx +4 -1
  447. package/src/OverflowList/OverflowList.doc.mjs +2 -2
  448. package/src/Pagination/Pagination.tsx +35 -12
  449. package/src/Popover/usePopover.tsx +6 -1
  450. package/src/PowerSearch/PowerSearch.doc.mjs +9 -4
  451. package/src/PowerSearch/PowerSearch.tsx +22 -10
  452. package/src/PowerSearch/PowerSearchEditPopover.tsx +27 -20
  453. package/src/PowerSearch/PowerSearchToken.tsx +17 -6
  454. package/src/PowerSearch/PowerSearchValueEditor.tsx +34 -21
  455. package/src/PowerSearch/formatFilterValue.test.ts +282 -0
  456. package/src/PowerSearch/formatFilterValue.ts +21 -8
  457. package/src/PowerSearch/index.ts +5 -0
  458. package/src/PowerSearch/resolveOperatorLabel.ts +34 -0
  459. package/src/PowerSearch/types.ts +33 -9
  460. package/src/PowerSearch/usePowerSearchConfig.ts +59 -27
  461. package/src/PowerSearch/usePowerSearchSource.ts +17 -8
  462. package/src/RadioList/RadioList.doc.mjs +1 -1
  463. package/src/Resizable/ResizeHandle.tsx +4 -1
  464. package/src/Section/Section.doc.mjs +4 -4
  465. package/src/SelectableCard/SelectableCard.doc.mjs +1 -1
  466. package/src/Selector/Selector.doc.mjs +6 -3
  467. package/src/Selector/Selector.test.tsx +114 -6
  468. package/src/Selector/Selector.tsx +68 -17
  469. package/src/Selector/SelectorOption.doc.mjs +1 -1
  470. package/src/SideNav/SideNav.tsx +4 -2
  471. package/src/SideNav/SideNavCollapseButton.tsx +3 -1
  472. package/src/SideNav/SideNavHeading.tsx +5 -3
  473. package/src/SideNav/SideNavItem.doc.mjs +2 -2
  474. package/src/SideNav/SideNavItem.tsx +3 -1
  475. package/src/Slider/Slider.doc.mjs +2 -2
  476. package/src/Stack/Stack.doc.mjs +10 -10
  477. package/src/Switch/Switch.doc.mjs +3 -3
  478. package/src/Switch/Switch.test.tsx +16 -0
  479. package/src/Switch/Switch.tsx +4 -2
  480. package/src/TabList/Tab.tsx +5 -1
  481. package/src/TabList/TabList.doc.mjs +3 -3
  482. package/src/TabList/TabList.test.tsx +66 -0
  483. package/src/TabList/TabList.tsx +12 -1
  484. package/src/TabList/TabMenu.tsx +4 -1
  485. package/src/Table/BaseTable.tsx +36 -19
  486. package/src/Table/Table.doc.mjs +2 -0
  487. package/src/Table/Table.test.tsx +132 -1
  488. package/src/Table/Table.tsx +6 -4
  489. package/src/Table/index.ts +7 -0
  490. package/src/Table/plugins/columnResize/useTableColumnResize.tsx +1 -1
  491. package/src/Table/plugins/filtering/useTableFiltering.tsx +31 -30
  492. package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +7 -5
  493. package/src/Table/plugins/pagination/useTablePagination.tsx +4 -1
  494. package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +9 -8
  495. package/src/Table/plugins/rowIndex/useTableRowIndex.tsx +1 -1
  496. package/src/Table/plugins/selection/useTableSelection.tsx +6 -7
  497. package/src/Table/plugins/sortable/useTableSortable.tsx +8 -5
  498. package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +4 -4
  499. package/src/Table/plugins/tree/index.ts +12 -0
  500. package/src/Table/plugins/tree/useTableTreeData-perf.test.tsx +163 -0
  501. package/src/Table/plugins/tree/useTableTreeData.test.tsx +594 -0
  502. package/src/Table/plugins/tree/useTableTreeData.tsx +495 -0
  503. package/src/Table/plugins/tree/useTableTreeState.test.tsx +636 -0
  504. package/src/Table/plugins/tree/useTableTreeState.tsx +253 -0
  505. package/src/Table/types.ts +18 -12
  506. package/src/Table/useBaseTablePlugins.ts +6 -2
  507. package/src/Table/useTableFiltering.doc.mjs +2 -2
  508. package/src/Table/useTableGroupedRows.doc.mjs +3 -3
  509. package/src/Table/useTableSortable.doc.mjs +11 -11
  510. package/src/Table/useTableTreeData.doc.mjs +75 -0
  511. package/src/Table/useTableTreeState.doc.mjs +98 -0
  512. package/src/Text/Text.doc.mjs +2 -2
  513. package/src/TextArea/TextArea.doc.mjs +1 -1
  514. package/src/TextInput/TextInput.doc.mjs +1 -1
  515. package/src/TextInput/TextInput.tsx +3 -1
  516. package/src/Thumbnail/Thumbnail.tsx +4 -2
  517. package/src/TimeInput/TimeInput.doc.mjs +2 -2
  518. package/src/TimeInput/TimeInput.tsx +6 -2
  519. package/src/Timestamp/Timestamp.doc.mjs +4 -4
  520. package/src/Timestamp/Timestamp.test.tsx +120 -7
  521. package/src/Timestamp/Timestamp.tsx +21 -1
  522. package/src/Toast/Toast.tsx +3 -1
  523. package/src/Toast/ToastViewport.tsx +3 -1
  524. package/src/Token/Token.tsx +4 -2
  525. package/src/Tokenizer/Tokenizer.doc.mjs +2 -2
  526. package/src/Tokenizer/Tokenizer.tsx +4 -4
  527. package/src/Toolbar/Toolbar.doc.mjs +1 -1
  528. package/src/Toolbar/Toolbar.tsx +10 -3
  529. package/src/TopNav/TopNav.doc.mjs +1 -0
  530. package/src/TopNav/TopNav.test.tsx +30 -0
  531. package/src/TopNav/TopNav.tsx +6 -4
  532. package/src/TopNav/TopNavHeading.tsx +5 -3
  533. package/src/TreeList/TreeList.tsx +5 -1
  534. package/src/TreeList/TreeListItem.tsx +6 -1
  535. package/src/Typeahead/BaseTypeahead.tsx +11 -4
  536. package/src/Typeahead/Typeahead.doc.mjs +1 -1
  537. package/src/Typeahead/Typeahead.tsx +3 -1
  538. package/src/VisuallyHidden/VisuallyHidden.tsx +1 -0
  539. package/src/authoring/doc.ts +166 -0
  540. package/src/authoring/index.test.ts +52 -0
  541. package/src/authoring/index.ts +50 -0
  542. package/src/authoring/integration.ts +42 -0
  543. package/src/authoring/template.ts +74 -0
  544. package/src/config.test.ts +16 -0
  545. package/src/config.ts +92 -0
  546. package/src/docPropLiterals.test.ts +938 -0
  547. package/src/docs-types.ts +15 -10
  548. package/src/i18n/InternationalizationContext.ts +39 -0
  549. package/src/i18n/InternationalizationProvider.doc.mjs +72 -0
  550. package/src/i18n/InternationalizationProvider.tsx +82 -0
  551. package/src/i18n/__tests__/e2e-pagination.test.tsx +172 -0
  552. package/src/i18n/__tests__/e2e-powersearch.test.tsx +130 -0
  553. package/src/i18n/__tests__/resolve.test.ts +284 -0
  554. package/src/i18n/index.ts +32 -0
  555. package/src/i18n/resolve.ts +165 -0
  556. package/src/i18n/translator.ts +31 -0
  557. package/src/i18n/types.ts +53 -0
  558. package/src/i18n/useTranslator.doc.mjs +46 -0
  559. package/src/i18n/useTranslator.ts +50 -0
  560. package/src/index.ts +3 -0
  561. package/src/theme/Theme.doc.mjs +4 -4
  562. package/src/theme/Theme.tsx +1 -1
  563. package/src/theme/defineTheme.ts +1 -1
  564. package/src/theme/hct.ts +0 -4
  565. package/src/utils/color.test.ts +101 -1
  566. package/src/utils/color.ts +23 -1
  567. package/src/utils/index.ts +8 -1
  568. package/dist/NavItem/index.d.ts +0 -9
  569. package/dist/NavItem/index.d.ts.map +0 -1
  570. package/dist/NavItem/index.js +0 -10
  571. package/src/NavItem/index.ts +0 -11
@@ -122,7 +122,10 @@ const styles = stylex.create({
122
122
  },
123
123
  indicator: {
124
124
  position: 'absolute',
125
- bottom: '-1px',
125
+ // Mirrors Tab's indicator: sits on the bottom edge by default (-1px), or
126
+ // drops onto the divider rail when an ancestor (TabList `hasDivider` or a
127
+ // Toolbar with a bottom divider) sets `--_tab-indicator-bottom`.
128
+ bottom: 'var(--_tab-indicator-bottom, -1px)',
126
129
  left: spacingVars['--spacing-3'],
127
130
  right: spacingVars['--spacing-3'],
128
131
  height: '2px',
@@ -45,6 +45,7 @@ import {mergeProps} from '../utils';
45
45
  import {EmptyState} from '../EmptyState';
46
46
  import {Text} from '../Text';
47
47
  import {themeProps} from '../utils/themeProps';
48
+ import {useTranslator} from '../i18n';
48
49
 
49
50
  const styles = stylex.create({
50
51
  table: {
@@ -162,7 +163,7 @@ function TableRowInner<T extends Record<string, unknown>>({
162
163
 
163
164
  const initialBodyCellRenderProps: BodyCellRenderProps = {
164
165
  htmlProps: initialCellHtmlProps,
165
- styles: [],
166
+ xstyle: [],
166
167
  columnIndex,
167
168
  columns: columns as ReadonlyArray<TableColumn<Record<string, unknown>>>,
168
169
  };
@@ -206,7 +207,7 @@ function TableRowInner<T extends Record<string, unknown>>({
206
207
  key={col.key}
207
208
  {...cellRenderProps.htmlProps}
208
209
  contextMenuActions={cellRenderProps.contextMenuActions}
209
- xstyle={cellRenderProps.styles}>
210
+ xstyle={cellRenderProps.xstyle}>
210
211
  {content}
211
212
  </CellComponent>
212
213
  );
@@ -218,7 +219,7 @@ function TableRowInner<T extends Record<string, unknown>>({
218
219
  p => p.transformBodyRow,
219
220
  {
220
221
  htmlProps: {},
221
- styles: [],
222
+ xstyle: [],
222
223
  children: <>{cells}</>,
223
224
  } satisfies BodyRowRenderProps,
224
225
  item,
@@ -230,7 +231,7 @@ function TableRowInner<T extends Record<string, unknown>>({
230
231
  key={rowKey}
231
232
  ref={rowRenderProps.ref}
232
233
  {...rowRenderProps.htmlProps}
233
- xstyle={rowRenderProps.styles}>
234
+ xstyle={rowRenderProps.xstyle}>
234
235
  {rowRenderProps.children}
235
236
  </RowComponent>
236
237
  );
@@ -324,8 +325,13 @@ function BaseTableInner<T extends Record<string, unknown>>({
324
325
  textOverflow = 'wrap',
325
326
  scrollWrapper: ScrollWrapper,
326
327
  emptyState,
328
+ xstyle,
329
+ className,
330
+ style,
327
331
  ref,
332
+ ...rest
328
333
  }: BaseTableProps<T> & {ref?: Ref<HTMLTableElement>}): ReactElement {
334
+ const t = useTranslator();
329
335
  // Use stable empty array when no plugins provided
330
336
  const plugins = pluginsProp ?? (EMPTY_PLUGINS as TablePlugin<T>[]);
331
337
 
@@ -365,7 +371,7 @@ function BaseTableInner<T extends Record<string, unknown>>({
365
371
  // --- Plugin pipeline: table ---
366
372
  const tableRenderProps = applyPlugins(plugins, p => p.transformTable, {
367
373
  htmlProps: {...userTableProps},
368
- styles: children ? [styles.table, styles.tableAutoLayout] : [styles.table],
374
+ xstyle: children ? [styles.table, styles.tableAutoLayout] : [styles.table],
369
375
  } satisfies TableRenderProps);
370
376
 
371
377
  // --- Plugin pipeline: header cells ---
@@ -386,7 +392,7 @@ function BaseTableInner<T extends Record<string, unknown>>({
386
392
 
387
393
  const initialHeaderRenderProps: HeaderCellRenderProps = {
388
394
  htmlProps: initialHeaderHtmlProps,
389
- styles: [],
395
+ xstyle: [],
390
396
  content: headerContent,
391
397
  columnIndex,
392
398
  columns: resolvedColumns as ReadonlyArray<
@@ -447,7 +453,7 @@ function BaseTableInner<T extends Record<string, unknown>>({
447
453
  {...mergedHtmlProps}
448
454
  {...headerTitleProp}
449
455
  contextMenuActions={cellRenderProps.contextMenuActions}
450
- xstyle={cellRenderProps.styles}>
456
+ xstyle={cellRenderProps.xstyle}>
451
457
  {headerInner}
452
458
  </HeaderCellComponent>
453
459
  );
@@ -459,7 +465,7 @@ function BaseTableInner<T extends Record<string, unknown>>({
459
465
  p => p.transformHeaderRow,
460
466
  {
461
467
  htmlProps: {},
462
- styles: [],
468
+ xstyle: [],
463
469
  children: <>{headerCells}</>,
464
470
  } satisfies HeaderRowRenderProps,
465
471
  );
@@ -468,12 +474,15 @@ function BaseTableInner<T extends Record<string, unknown>>({
468
474
  const hasData = data != null && data.length > 0;
469
475
  const hasColumns = resolvedColumns.length > 0;
470
476
 
477
+ // Style precedence: deprecated tableProps.style < consumer style < the
478
+ // computed column min-width (structural — derived from column defs, so it
479
+ // must win when present; when absent, a consumer minWidth survives).
471
480
  const tableStyle: React.CSSProperties = {
472
481
  ...tableRenderProps.htmlProps.style,
473
- minWidth:
474
- resolvedWidths.tableMinWidth > 0
475
- ? `${resolvedWidths.tableMinWidth}px`
476
- : undefined,
482
+ ...style,
483
+ ...(resolvedWidths.tableMinWidth > 0
484
+ ? {minWidth: `${resolvedWidths.tableMinWidth}px`}
485
+ : null),
477
486
  };
478
487
 
479
488
  let tableElement: ReactNode = (
@@ -482,10 +491,13 @@ function BaseTableInner<T extends Record<string, unknown>>({
482
491
  {...tableRenderProps.htmlProps}
483
492
  {...mergeProps(
484
493
  themeProps('base-table'),
485
- stylex.props(...tableRenderProps.styles),
486
- tableRenderProps.htmlProps.className,
494
+ stylex.props(...tableRenderProps.xstyle, xstyle),
495
+ [tableRenderProps.htmlProps.className, className]
496
+ .filter(Boolean)
497
+ .join(' ') || undefined,
498
+ tableStyle,
487
499
  )}
488
- style={tableStyle}>
500
+ {...rest}>
489
501
  {children ? (
490
502
  children
491
503
  ) : (
@@ -495,7 +507,7 @@ function BaseTableInner<T extends Record<string, unknown>>({
495
507
  <RowComponent
496
508
  {...headerRowRenderProps.htmlProps}
497
509
  isHeaderRow
498
- xstyle={headerRowRenderProps.styles}>
510
+ xstyle={headerRowRenderProps.xstyle}>
499
511
  {headerRowRenderProps.children}
500
512
  </RowComponent>
501
513
  </TableHeader>
@@ -527,7 +539,12 @@ function BaseTableInner<T extends Record<string, unknown>>({
527
539
  emptyState !== false && (
528
540
  <tr>
529
541
  <td colSpan={resolvedColumns.length}>
530
- {emptyState ?? <EmptyState title="No data" isCompact />}
542
+ {emptyState ?? (
543
+ <EmptyState
544
+ title={t('@astryx.table.noData')}
545
+ isCompact
546
+ />
547
+ )}
531
548
  </td>
532
549
  </tr>
533
550
  )}
@@ -551,14 +568,14 @@ function BaseTableInner<T extends Record<string, unknown>>({
551
568
  p => p.transformScrollWrapper,
552
569
  {
553
570
  htmlProps: {},
554
- styles: [],
571
+ xstyle: [],
555
572
  } satisfies ScrollWrapperRenderProps,
556
573
  );
557
574
 
558
575
  tableElement = (
559
576
  <ScrollWrapper
560
577
  htmlProps={scrollWrapperRenderProps.htmlProps}
561
- styles={scrollWrapperRenderProps.styles}
578
+ xstyle={scrollWrapperRenderProps.xstyle}
562
579
  beforeTable={scrollWrapperRenderProps.beforeTable}
563
580
  afterTable={scrollWrapperRenderProps.afterTable}>
564
581
  {tableElement}
@@ -111,6 +111,8 @@ export const docs = {
111
111
  {name: 'useTableSelection'},
112
112
  {name: 'useTableSelectionState'},
113
113
  {name: 'useTableSortable'},
114
+ {name: 'useTableTreeData'},
115
+ {name: 'useTableTreeState'},
114
116
  {name: 'useTablePagination'},
115
117
  {name: 'useTableColumnSettings'},
116
118
  {name: 'useTableFiltering'},
@@ -11,6 +11,7 @@
11
11
 
12
12
  import {describe, it, expect, vi} from 'vitest';
13
13
  import {render, screen} from '@testing-library/react';
14
+ import * as stylex from '@stylexjs/stylex';
14
15
  import {BaseTable} from './BaseTable';
15
16
  import {Table} from './Table';
16
17
  import {TableRow} from './TableRow';
@@ -414,6 +415,136 @@ describe('BaseTable', () => {
414
415
  );
415
416
  });
416
417
 
418
+ describe('root element styling props (#3679)', () => {
419
+ it('applies className to the table element', () => {
420
+ render(<Table data={users} columns={columns} className="custom-table" />);
421
+ expect(screen.getByRole('table').className).toContain('custom-table');
422
+ });
423
+
424
+ it('applies style to the table element', () => {
425
+ render(<Table data={users} columns={columns} style={{opacity: 0.9}} />);
426
+ expect(screen.getByRole('table').style.opacity).toBe('0.9');
427
+ });
428
+
429
+ it('accepts xstyle without error', () => {
430
+ render(<Table data={users} columns={columns} xstyle={undefined} />);
431
+ expect(screen.getByRole('table')).toBeInTheDocument();
432
+ });
433
+
434
+ it('spreads id and aria attributes onto the table element', () => {
435
+ render(
436
+ <Table
437
+ data={users}
438
+ columns={columns}
439
+ id="users-table"
440
+ aria-label="Users"
441
+ data-analytics="tables"
442
+ />,
443
+ );
444
+ const table = screen.getByRole('table', {name: 'Users'});
445
+ expect(table.id).toBe('users-table');
446
+ expect(table).toHaveAttribute('data-analytics', 'tables');
447
+ });
448
+
449
+ it('composes with deprecated tableProps, direct props winning conflicts', () => {
450
+ render(
451
+ <Table
452
+ data={users}
453
+ columns={columns}
454
+ className="direct"
455
+ style={{opacity: 1}}
456
+ tableProps={{
457
+ className: 'legacy',
458
+ style: {color: 'red', opacity: 0.5},
459
+ }}
460
+ />,
461
+ );
462
+ const table = screen.getByRole('table');
463
+ expect(table.className).toContain('legacy');
464
+ expect(table.className).toContain('direct');
465
+ // Direct style wins the conflicting key; non-conflicting legacy survives.
466
+ expect(table.style.opacity).toBe('1');
467
+ expect(table.style.color).toBe('red');
468
+ });
469
+
470
+ it('keeps the computed column min-width over a consumer style.minWidth', () => {
471
+ const {tableMinWidth} = resolveColumnWidths(columns);
472
+ render(
473
+ <Table data={users} columns={columns} style={{minWidth: '10px'}} />,
474
+ );
475
+ expect(screen.getByRole('table').style.minWidth).toBe(
476
+ `${tableMinWidth}px`,
477
+ );
478
+ });
479
+
480
+ it('lets a consumer style.minWidth survive when columns compute none', () => {
481
+ const plain: TableColumn<User>[] = [{key: 'name'}, {key: 'age'}];
482
+ render(<Table data={users} columns={plain} style={{minWidth: '10px'}} />);
483
+ expect(screen.getByRole('table').style.minWidth).toBe('10px');
484
+ });
485
+
486
+ it('direct id and aria attributes beat the same keys in tableProps', () => {
487
+ render(
488
+ <Table
489
+ data={users}
490
+ columns={columns}
491
+ id="direct-id"
492
+ aria-label="Direct"
493
+ tableProps={{id: 'legacy-id', 'aria-label': 'Legacy'}}
494
+ />,
495
+ );
496
+ const table = screen.getByRole('table', {name: 'Direct'});
497
+ expect(table.id).toBe('direct-id');
498
+ });
499
+
500
+ it('keeps the astryx theme classes alongside a consumer className', () => {
501
+ render(<Table data={users} columns={columns} className="custom-table" />);
502
+ const table = screen.getByRole('table');
503
+ expect(table.className).toContain('astryx-base-table');
504
+ expect(table.className).toContain('astryx-table');
505
+ expect(table.className).toContain('custom-table');
506
+ });
507
+
508
+ it('passes event handlers through to the table element', async () => {
509
+ const onClick = vi.fn();
510
+ render(<Table data={users} columns={columns} onClick={onClick} />);
511
+ screen
512
+ .getByRole('table')
513
+ .dispatchEvent(new MouseEvent('click', {bubbles: true}));
514
+ expect(onClick).toHaveBeenCalledTimes(1);
515
+ });
516
+
517
+ it('applies dynamic xstyle values to the table element', () => {
518
+ const dynamic = stylex.create({
519
+ opacity: (value: number) => ({opacity: value}),
520
+ });
521
+ render(
522
+ <Table data={users} columns={columns} xstyle={dynamic.opacity(0.42)} />,
523
+ );
524
+ expect(screen.getByRole('table').getAttribute('style')).toContain('0.42');
525
+ });
526
+
527
+ it('honors className in children mode', () => {
528
+ render(
529
+ <Table className="custom-table">
530
+ <tbody>
531
+ <TableRow>
532
+ <TableCell>Cell</TableCell>
533
+ </TableRow>
534
+ </tbody>
535
+ </Table>,
536
+ );
537
+ expect(screen.getByRole('table').className).toContain('custom-table');
538
+ });
539
+
540
+ it('honors className on an unwrapped BaseTable (no scrollWrapper)', () => {
541
+ render(
542
+ <BaseTable data={users} columns={columns} className="custom-table" />,
543
+ );
544
+ expect(screen.getByRole('table').className).toContain('custom-table');
545
+ });
546
+ });
547
+
417
548
  describe('plugin pipeline', () => {
418
549
  it('applies transformTable plugin', () => {
419
550
  const plugin: TablePlugin<User> = {
@@ -826,7 +957,7 @@ describe('Table', () => {
826
957
  const userPlugin: TablePlugin<User> = {
827
958
  transformTable: props => {
828
959
  // XDS plugin should have already added styles
829
- expect(props.styles.length).toBeGreaterThan(1);
960
+ expect(props.xstyle.length).toBeGreaterThan(1);
830
961
  return {
831
962
  ...props,
832
963
  htmlProps: {...props.htmlProps, 'data-testid': 'after-xds'},
@@ -31,6 +31,7 @@ import type {
31
31
  TableRenderProps,
32
32
  } from './types';
33
33
  import type {StyleXStyles} from '../theme/types';
34
+ import {useTranslator} from '../i18n';
34
35
 
35
36
  // =============================================================================
36
37
  // Table Types
@@ -135,7 +136,7 @@ const scrollWrapperStyles = stylex.create({
135
136
  function TableScrollWrapper({
136
137
  children,
137
138
  htmlProps,
138
- styles: pluginStyles,
139
+ xstyle: pluginStyles,
139
140
  beforeTable,
140
141
  afterTable,
141
142
  }: {
@@ -143,10 +144,11 @@ function TableScrollWrapper({
143
144
  htmlProps?: React.HTMLAttributes<HTMLDivElement> & {
144
145
  ref?: React.Ref<HTMLDivElement>;
145
146
  };
146
- styles?: StyleXStyles[];
147
+ xstyle?: StyleXStyles[];
147
148
  beforeTable?: React.ReactNode;
148
149
  afterTable?: React.ReactNode;
149
150
  }) {
151
+ const t = useTranslator();
150
152
  const {ref, ...restHtmlProps} = htmlProps ?? {};
151
153
  return (
152
154
  <div
@@ -158,7 +160,7 @@ function TableScrollWrapper({
158
160
  // htmlProps.
159
161
  tabIndex={0}
160
162
  role="group"
161
- aria-label="Table"
163
+ aria-label={t('@astryx.table.label')}
162
164
  {...restHtmlProps}
163
165
  {...mergeProps(
164
166
  themeProps('table-scroll-wrapper'),
@@ -194,7 +196,7 @@ function buildTableStylePlugin<
194
196
  ? `${existingClass} ${tableClass}`
195
197
  : tableClass,
196
198
  },
197
- styles: [...props.styles, tableStyles.base],
199
+ xstyle: [...props.xstyle, tableStyles.base],
198
200
  };
199
201
  },
200
202
  };
@@ -32,6 +32,7 @@ export {
32
32
  useTableRowExpansion,
33
33
  useTableRowExpansionState,
34
34
  } from './plugins/rowExpansion';
35
+ export {useTableTreeData, useTableTreeState} from './plugins/tree';
35
36
  export {resolveContextActions} from './tableContextMenu';
36
37
  export {
37
38
  useTableFiltering,
@@ -109,6 +110,12 @@ export type {
109
110
  UseTableGroupedRowsConfig,
110
111
  UseTableGroupedRowsResult,
111
112
  } from './plugins/groupedRows';
113
+ export type {
114
+ TableTreeRowMeta,
115
+ UseTableTreeDataConfig,
116
+ UseTableTreeStateConfig,
117
+ UseTableTreeStateResult,
118
+ } from './plugins/tree';
112
119
  export type {
113
120
  UseTableFilteringConfig,
114
121
  TableFilterState,
@@ -857,7 +857,7 @@ export function useTableColumnResize<T extends Record<string, unknown>>(
857
857
  {handle}
858
858
  </>
859
859
  ),
860
- styles: [...props.styles, headerCellRelative.base],
860
+ xstyle: [...props.xstyle, headerCellRelative.base],
861
861
  };
862
862
  },
863
863
  }),
@@ -42,6 +42,7 @@ import type {
42
42
  HeaderCellRenderProps,
43
43
  } from '../../types';
44
44
  import {proportional} from '../../columnUtils';
45
+ import {useTranslator} from '../../../i18n';
45
46
  import type {
46
47
  PowerSearchConfig,
47
48
  PowerSearchField,
@@ -263,10 +264,7 @@ function tableValueToFilterValue(
263
264
  * };
264
265
  * ```
265
266
  */
266
- export type TableFilterState = Record<
267
- string,
268
- TableFilterValue | undefined
269
- >;
267
+ export type TableFilterState = Record<string, TableFilterValue | undefined>;
270
268
 
271
269
  /**
272
270
  * Display variant for the filter UI.
@@ -299,10 +297,7 @@ export interface UseTableFilteringConfig {
299
297
  /** Current filter state — map from column key to filter value. */
300
298
  filters: TableFilterState;
301
299
  /** Called when the user changes a filter value. `null` clears the filter. */
302
- onFilterChange: (
303
- columnKey: string,
304
- value: TableFilterValue | null,
305
- ) => void;
300
+ onFilterChange: (columnKey: string, value: TableFilterValue | null) => void;
306
301
  /**
307
302
  * Display variant for filter controls.
308
303
  *
@@ -424,6 +419,7 @@ function TextFilterControl({
424
419
  size: 'sm' | 'md';
425
420
  hasClear?: boolean;
426
421
  }) {
422
+ const t = useTranslator();
427
423
  const store = useFilterStore();
428
424
  const config = store.getConfig();
429
425
  const value = config.filters[columnKey];
@@ -431,7 +427,7 @@ function TextFilterControl({
431
427
 
432
428
  return (
433
429
  <TextInput
434
- label={`Filter ${header}`}
430
+ label={t('@astryx.tableFiltering.filterByColumn', {header})}
435
431
  isLabelHidden
436
432
  value={strValue}
437
433
  onChange={(newValue: string) => {
@@ -439,7 +435,7 @@ function TextFilterControl({
439
435
  .getConfig()
440
436
  .onFilterChange(columnKey, newValue === '' ? null : newValue);
441
437
  }}
442
- placeholder={`Filter ${header}`}
438
+ placeholder={t('@astryx.tableFiltering.filterByColumn', {header})}
443
439
  size={size}
444
440
  hasClear={hasClear}
445
441
  />
@@ -459,6 +455,7 @@ function NumberFilterControl({
459
455
  size: 'sm' | 'md';
460
456
  hasClear?: boolean;
461
457
  }) {
458
+ const t = useTranslator();
462
459
  const store = useFilterStore();
463
460
  const config = store.getConfig();
464
461
  const value = config.filters[columnKey];
@@ -476,11 +473,11 @@ function NumberFilterControl({
476
473
  if (hasClear) {
477
474
  return (
478
475
  <NumberInput
479
- label={`Filter ${header}`}
476
+ label={t('@astryx.tableFiltering.filterByColumn', {header})}
480
477
  isLabelHidden
481
478
  value={numValue}
482
479
  onChange={handleChange}
483
- placeholder={`Filter ${header}`}
480
+ placeholder={t('@astryx.tableFiltering.filterByColumn', {header})}
484
481
  min={operatorValue.minValue ?? null}
485
482
  max={operatorValue.maxValue ?? null}
486
483
  step={step}
@@ -492,11 +489,11 @@ function NumberFilterControl({
492
489
 
493
490
  return (
494
491
  <NumberInput
495
- label={`Filter ${header}`}
492
+ label={t('@astryx.tableFiltering.filterByColumn', {header})}
496
493
  isLabelHidden
497
494
  value={numValue}
498
495
  onChange={handleChange}
499
- placeholder={`Filter ${header}`}
496
+ placeholder={t('@astryx.tableFiltering.filterByColumn', {header})}
500
497
  min={operatorValue.minValue ?? null}
501
498
  max={operatorValue.maxValue ?? null}
502
499
  step={step}
@@ -518,6 +515,7 @@ function SelectorFilterControl({
518
515
  size: 'sm' | 'md';
519
516
  hasClear?: boolean;
520
517
  }) {
518
+ const t = useTranslator();
521
519
  const store = useFilterStore();
522
520
  const config = store.getConfig();
523
521
  const value = config.filters[columnKey];
@@ -543,12 +541,12 @@ function SelectorFilterControl({
543
541
  if (hasClear) {
544
542
  return (
545
543
  <Selector
546
- label={`Filter ${header}`}
544
+ label={t('@astryx.tableFiltering.filterByColumn', {header})}
547
545
  isLabelHidden
548
546
  options={options}
549
547
  value={strValue || null}
550
548
  onChange={handleChange}
551
- placeholder="All"
549
+ placeholder={t('@astryx.table.filter.allPlaceholder')}
552
550
  size={size}
553
551
  hasClear
554
552
  />
@@ -557,12 +555,12 @@ function SelectorFilterControl({
557
555
 
558
556
  return (
559
557
  <Selector
560
- label={`Filter ${header}`}
558
+ label={t('@astryx.tableFiltering.filterByColumn', {header})}
561
559
  isLabelHidden
562
560
  options={options}
563
561
  value={strValue}
564
562
  onChange={handleChange}
565
- placeholder="All"
563
+ placeholder={t('@astryx.table.filter.allPlaceholder')}
566
564
  size={size}
567
565
  />
568
566
  );
@@ -581,6 +579,7 @@ function MultiSelectorFilterControl({
581
579
  size: 'sm' | 'md';
582
580
  hasClear?: boolean;
583
581
  }) {
582
+ const t = useTranslator();
584
583
  const store = useFilterStore();
585
584
  const config = store.getConfig();
586
585
  const value = config.filters[columnKey];
@@ -593,7 +592,7 @@ function MultiSelectorFilterControl({
593
592
 
594
593
  return (
595
594
  <MultiSelector
596
- label={`Filter ${header}`}
595
+ label={t('@astryx.tableFiltering.filterByColumn', {header})}
597
596
  isLabelHidden
598
597
  options={options}
599
598
  value={arrValue}
@@ -602,7 +601,7 @@ function MultiSelectorFilterControl({
602
601
  .getConfig()
603
602
  .onFilterChange(columnKey, newValue.length === 0 ? null : newValue);
604
603
  }}
605
- placeholder="All"
604
+ placeholder={t('@astryx.table.filter.allPlaceholder')}
606
605
  size={size}
607
606
  hasSelectAll
608
607
  hasSearch={false}
@@ -622,12 +621,13 @@ function DateFilterControl({
622
621
  size: 'sm' | 'md';
623
622
  hasClear?: boolean;
624
623
  }) {
624
+ const t = useTranslator();
625
625
  const store = useFilterStore();
626
626
  const value = store.getConfig().filters[columnKey] as string | undefined;
627
627
 
628
628
  return (
629
629
  <DateInput
630
- label={`Filter ${header}`}
630
+ label={t('@astryx.tableFiltering.filterByColumn', {header})}
631
631
  isLabelHidden
632
632
  value={(value as ISODateString | undefined) ?? undefined}
633
633
  onChange={newValue => {
@@ -650,12 +650,13 @@ function TimeFilterControl({
650
650
  size: 'sm' | 'md';
651
651
  hasClear?: boolean;
652
652
  }) {
653
+ const t = useTranslator();
653
654
  const store = useFilterStore();
654
655
  const value = store.getConfig().filters[columnKey] as string | undefined;
655
656
 
656
657
  return (
657
658
  <TimeInput
658
- label={`Filter ${header}`}
659
+ label={t('@astryx.tableFiltering.filterByColumn', {header})}
659
660
  isLabelHidden
660
661
  value={(value as ISOTimeString | undefined) ?? undefined}
661
662
  onChange={newValue => {
@@ -680,6 +681,7 @@ function StringListFilterControl({
680
681
  size: 'sm' | 'md';
681
682
  hasClear?: boolean;
682
683
  }) {
684
+ const t = useTranslator();
683
685
  const store = useFilterStore();
684
686
  const value =
685
687
  (store.getConfig().filters[columnKey] as string[] | undefined) ?? [];
@@ -699,7 +701,7 @@ function StringListFilterControl({
699
701
 
700
702
  return (
701
703
  <Tokenizer
702
- label={`Filter ${header}`}
704
+ label={t('@astryx.tableFiltering.filterByColumn', {header})}
703
705
  isLabelHidden
704
706
  searchSource={searchSource}
705
707
  value={value.map(v => ({id: v, label: v}))}
@@ -821,6 +823,7 @@ function PopoverFilterTrigger({
821
823
  header: string;
822
824
  operatorValue: OperatorValue;
823
825
  }) {
826
+ const t = useTranslator();
824
827
  const store = useFilterStore();
825
828
  const config = store.getConfig();
826
829
  const value = config.filters[columnKey];
@@ -876,7 +879,7 @@ function PopoverFilterTrigger({
876
879
  <Popover
877
880
  isOpen={isOpen}
878
881
  onOpenChange={handleOpen}
879
- label={`Filter ${header}`}
882
+ label={t('@astryx.tableFiltering.filterByColumn', {header})}
880
883
  placement="below"
881
884
  alignment="start"
882
885
  content={
@@ -890,14 +893,14 @@ function PopoverFilterTrigger({
890
893
  />
891
894
  <div {...stylex.props(filterStyles.popoverActions)}>
892
895
  <Button
893
- label="Reset"
896
+ label={t('@astryx.table.filter.reset')}
894
897
  variant="ghost"
895
898
  size="sm"
896
899
  onClick={handleClear}
897
900
  />
898
901
  <div {...stylex.props(filterStyles.popoverActionsSpacer)} />
899
902
  <Button
900
- label="Apply"
903
+ label={t('@astryx.table.filter.apply')}
901
904
  variant="primary"
902
905
  size="sm"
903
906
  onClick={handleApply}
@@ -908,7 +911,7 @@ function PopoverFilterTrigger({
908
911
  }>
909
912
  <button
910
913
  type="button"
911
- aria-label={`Filter ${header}`}
914
+ aria-label={t('@astryx.tableFiltering.filterByColumn', {header})}
912
915
  aria-haspopup="dialog"
913
916
  {...stylex.props(
914
917
  filterStyles.triggerButton,
@@ -928,9 +931,7 @@ function PopoverFilterTrigger({
928
931
  // Helper
929
932
  // =============================================================================
930
933
 
931
- function getHeaderString(
932
- column: TableColumn<Record<string, unknown>>,
933
- ): string {
934
+ function getHeaderString(column: TableColumn<Record<string, unknown>>): string {
934
935
  if (typeof column.header === 'string') {
935
936
  return column.header;
936
937
  }