@astryxdesign/core 0.1.5 → 0.1.6-canary.02f2602

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 (564) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +2 -0
  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 +21 -18
  6. package/dist/AlertDialog/useImperativeAlertDialog.d.ts +0 -2
  7. package/dist/AlertDialog/useImperativeAlertDialog.d.ts.map +1 -1
  8. package/dist/AlertDialog/useImperativeAlertDialog.js +3 -5
  9. package/dist/AppShell/AppShell.d.ts.map +1 -1
  10. package/dist/AppShell/AppShell.js +55 -53
  11. package/dist/AspectRatio/AspectRatio.js +5 -5
  12. package/dist/Avatar/Avatar.js +19 -19
  13. package/dist/Avatar/AvatarStatusDot.js +5 -5
  14. package/dist/AvatarGroup/AvatarGroup.d.ts +1 -1
  15. package/dist/AvatarGroup/AvatarGroup.d.ts.map +1 -1
  16. package/dist/AvatarGroup/AvatarGroup.js +9 -6
  17. package/dist/AvatarGroup/AvatarGroupOverflow.js +5 -5
  18. package/dist/Badge/Badge.js +3 -3
  19. package/dist/Banner/Banner.d.ts.map +1 -1
  20. package/dist/Banner/Banner.js +32 -30
  21. package/dist/Blockquote/Blockquote.js +7 -7
  22. package/dist/Breadcrumbs/BreadcrumbItem.js +17 -17
  23. package/dist/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  24. package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  25. package/dist/Breadcrumbs/Breadcrumbs.js +11 -8
  26. package/dist/Button/Button.d.ts.map +1 -1
  27. package/dist/Button/Button.js +53 -23
  28. package/dist/ButtonGroup/ButtonGroup.d.ts +20 -5
  29. package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
  30. package/dist/ButtonGroup/ButtonGroup.js +34 -18
  31. package/dist/Calendar/Calendar.d.ts.map +1 -1
  32. package/dist/Calendar/Calendar.js +51 -48
  33. package/dist/Card/Card.js +3 -3
  34. package/dist/Carousel/Carousel.d.ts +1 -1
  35. package/dist/Carousel/Carousel.d.ts.map +1 -1
  36. package/dist/Carousel/Carousel.js +27 -24
  37. package/dist/Center/Center.js +3 -3
  38. package/dist/Chat/ChatComposer.d.ts.map +1 -1
  39. package/dist/Chat/ChatComposer.js +27 -24
  40. package/dist/Chat/ChatComposerDrawer.d.ts +1 -1
  41. package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
  42. package/dist/Chat/ChatComposerDrawer.js +23 -16
  43. package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
  44. package/dist/Chat/ChatComposerInput.js +20 -16
  45. package/dist/Chat/ChatDictationButton.js +10 -10
  46. package/dist/Chat/ChatLayout.d.ts +1 -11
  47. package/dist/Chat/ChatLayout.d.ts.map +1 -1
  48. package/dist/Chat/ChatLayout.js +23 -21
  49. package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
  50. package/dist/Chat/ChatLayoutScrollButton.js +13 -11
  51. package/dist/Chat/ChatMessage.d.ts +1 -1
  52. package/dist/Chat/ChatMessage.d.ts.map +1 -1
  53. package/dist/Chat/ChatMessage.js +20 -14
  54. package/dist/Chat/ChatMessageBubble.d.ts +1 -1
  55. package/dist/Chat/ChatMessageBubble.d.ts.map +1 -1
  56. package/dist/Chat/ChatMessageBubble.js +10 -8
  57. package/dist/Chat/ChatMessageList.d.ts +1 -1
  58. package/dist/Chat/ChatMessageList.d.ts.map +1 -1
  59. package/dist/Chat/ChatMessageList.js +17 -15
  60. package/dist/Chat/ChatMessageMetadata.d.ts.map +1 -1
  61. package/dist/Chat/ChatMessageMetadata.js +24 -19
  62. package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
  63. package/dist/Chat/ChatPastedTextToken.js +16 -14
  64. package/dist/Chat/ChatSendButton.d.ts.map +1 -1
  65. package/dist/Chat/ChatSendButton.js +6 -4
  66. package/dist/Chat/ChatSystemMessage.js +11 -11
  67. package/dist/Chat/ChatTokenizedText.js +8 -8
  68. package/dist/Chat/ChatToolCalls.js +73 -73
  69. package/dist/Chat/useSpeechRecognition.d.ts.map +1 -1
  70. package/dist/Chat/useSpeechRecognition.js +4 -2
  71. package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
  72. package/dist/Chat/useTriggerMenu.js +19 -17
  73. package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
  74. package/dist/CheckboxInput/CheckboxInput.js +26 -24
  75. package/dist/CheckboxList/CheckboxList.d.ts +1 -1
  76. package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
  77. package/dist/CheckboxList/CheckboxList.js +12 -10
  78. package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
  79. package/dist/CheckboxList/CheckboxListItem.js +8 -6
  80. package/dist/Citation/Citation.d.ts.map +1 -1
  81. package/dist/Citation/Citation.js +20 -12
  82. package/dist/ClickableCard/ClickableCard.js +6 -6
  83. package/dist/Code/Code.js +3 -3
  84. package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
  85. package/dist/CodeBlock/CodeBlock.js +114 -96
  86. package/dist/Collapsible/Collapsible.js +11 -11
  87. package/dist/Collapsible/CollapsibleGroup.js +7 -7
  88. package/dist/CommandPalette/CommandPalette.d.ts +1 -1
  89. package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
  90. package/dist/CommandPalette/CommandPalette.js +39 -34
  91. package/dist/CommandPalette/CommandPaletteEmpty.js +3 -3
  92. package/dist/CommandPalette/CommandPaletteFooter.js +16 -16
  93. package/dist/CommandPalette/CommandPaletteGroup.js +5 -5
  94. package/dist/CommandPalette/CommandPaletteInput.d.ts +1 -1
  95. package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
  96. package/dist/CommandPalette/CommandPaletteInput.js +17 -14
  97. package/dist/CommandPalette/CommandPaletteItem.js +3 -3
  98. package/dist/CommandPalette/CommandPaletteList.d.ts +1 -1
  99. package/dist/CommandPalette/CommandPaletteList.d.ts.map +1 -1
  100. package/dist/CommandPalette/CommandPaletteList.js +7 -4
  101. package/dist/ContextMenu/ContextMenu.d.ts +1 -1
  102. package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
  103. package/dist/ContextMenu/ContextMenu.js +14 -11
  104. package/dist/DateInput/DateInput.d.ts +1 -1
  105. package/dist/DateInput/DateInput.d.ts.map +1 -1
  106. package/dist/DateInput/DateInput.js +28 -23
  107. package/dist/DateRangeInput/DateRangeInput.d.ts +1 -1
  108. package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
  109. package/dist/DateRangeInput/DateRangeInput.js +32 -27
  110. package/dist/DateTimeInput/DateTimeInput.d.ts +1 -1
  111. package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
  112. package/dist/DateTimeInput/DateTimeInput.js +41 -33
  113. package/dist/Dialog/Dialog.js +9 -9
  114. package/dist/Dialog/DialogHeader.d.ts.map +1 -1
  115. package/dist/Dialog/DialogHeader.js +20 -18
  116. package/dist/Dialog/useImperativeDialog.js +3 -3
  117. package/dist/Divider/Divider.js +7 -7
  118. package/dist/DropdownMenu/DropdownMenu.d.ts +1 -1
  119. package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  120. package/dist/DropdownMenu/DropdownMenu.js +21 -15
  121. package/dist/DropdownMenu/DropdownMenuItem.js +3 -3
  122. package/dist/DropdownMenu/renderDropdownItems.js +10 -10
  123. package/dist/EmptyState/EmptyState.d.ts +4 -1
  124. package/dist/EmptyState/EmptyState.d.ts.map +1 -1
  125. package/dist/EmptyState/EmptyState.js +9 -9
  126. package/dist/Field/Field.js +17 -17
  127. package/dist/Field/FieldLabel.js +15 -15
  128. package/dist/Field/InputClearButton.js +5 -5
  129. package/dist/FieldStatus/FieldStatus.js +3 -3
  130. package/dist/FileInput/FileInput.d.ts.map +1 -1
  131. package/dist/FileInput/FileInput.js +34 -30
  132. package/dist/FormLayout/FormLayout.js +5 -5
  133. package/dist/Grid/Grid.js +3 -3
  134. package/dist/Grid/GridSpan.js +3 -3
  135. package/dist/HStack/HStack.js +3 -3
  136. package/dist/Heading/Heading.js +10 -10
  137. package/dist/HoverCard/HoverCard.js +9 -9
  138. package/dist/HoverCard/useHoverCard.js +3 -3
  139. package/dist/Icon/Icon.js +11 -11
  140. package/dist/Icon/defaultIcons.js +116 -116
  141. package/dist/IconButton/IconButton.js +3 -3
  142. package/dist/InputGroup/InputGroup.js +9 -9
  143. package/dist/InputGroup/InputGroupText.js +3 -3
  144. package/dist/Item/Item.js +17 -17
  145. package/dist/Kbd/Kbd.js +5 -5
  146. package/dist/Layer/LayerProvider.js +7 -7
  147. package/dist/Layer/useLayer.js +5 -5
  148. package/dist/Layout/Layout.js +21 -21
  149. package/dist/Layout/LayoutContent.js +3 -3
  150. package/dist/Layout/LayoutFooter.js +5 -5
  151. package/dist/Layout/LayoutHeader.js +5 -5
  152. package/dist/Layout/LayoutPanel.js +3 -3
  153. package/dist/Lightbox/Lightbox.d.ts.map +1 -1
  154. package/dist/Lightbox/Lightbox.js +35 -33
  155. package/dist/Lightbox/useLightbox.d.ts +0 -1
  156. package/dist/Lightbox/useLightbox.d.ts.map +1 -1
  157. package/dist/Lightbox/useLightbox.js +3 -4
  158. package/dist/Link/Link.d.ts +5 -3
  159. package/dist/Link/Link.d.ts.map +1 -1
  160. package/dist/Link/Link.js +47 -18
  161. package/dist/Link/LinkProvider.js +3 -3
  162. package/dist/Link/useLinkify.js +3 -3
  163. package/dist/List/List.js +11 -11
  164. package/dist/List/ListItem.js +11 -11
  165. package/dist/Markdown/Markdown.d.ts.map +1 -1
  166. package/dist/Markdown/Markdown.js +111 -109
  167. package/dist/MetadataList/MetadataList.js +10 -10
  168. package/dist/MetadataList/MetadataListItem.js +15 -15
  169. package/dist/MobileNav/MobileNav.d.ts.map +1 -1
  170. package/dist/MobileNav/MobileNav.js +19 -17
  171. package/dist/MobileNav/MobileNavToggle.d.ts +1 -1
  172. package/dist/MobileNav/MobileNavToggle.d.ts.map +1 -1
  173. package/dist/MobileNav/MobileNavToggle.js +9 -6
  174. package/dist/MoreMenu/MoreMenu.d.ts +1 -1
  175. package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
  176. package/dist/MoreMenu/MoreMenu.js +7 -4
  177. package/dist/MultiSelector/MultiSelector.d.ts +1 -1
  178. package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
  179. package/dist/MultiSelector/MultiSelector.js +69 -62
  180. package/dist/NavIcon/NavIcon.js +3 -3
  181. package/dist/NavMenu/NavHeadingMenu.js +5 -5
  182. package/dist/NavMenu/NavHeadingMenuItem.js +8 -8
  183. package/dist/NumberInput/NumberInput.d.ts.map +1 -1
  184. package/dist/NumberInput/NumberInput.js +21 -17
  185. package/dist/Outline/Outline.d.ts +1 -1
  186. package/dist/Outline/Outline.d.ts.map +1 -1
  187. package/dist/Outline/Outline.js +19 -16
  188. package/dist/OverflowList/OverflowList.js +8 -8
  189. package/dist/Overlay/Overlay.js +3 -3
  190. package/dist/Overlay/OverlayScrim.js +5 -5
  191. package/dist/Overlay/useOverlay.d.ts +0 -3
  192. package/dist/Overlay/useOverlay.d.ts.map +1 -1
  193. package/dist/Overlay/useOverlay.js +3 -6
  194. package/dist/Pagination/Pagination.d.ts +1 -1
  195. package/dist/Pagination/Pagination.d.ts.map +1 -1
  196. package/dist/Pagination/Pagination.js +73 -46
  197. package/dist/Popover/Popover.js +16 -16
  198. package/dist/Popover/usePopover.d.ts.map +1 -1
  199. package/dist/Popover/usePopover.js +11 -8
  200. package/dist/PowerSearch/PowerSearch.d.ts +1 -1
  201. package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
  202. package/dist/PowerSearch/PowerSearch.js +95 -85
  203. package/dist/PowerSearch/PowerSearchEditPopover.d.ts +1 -1
  204. package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
  205. package/dist/PowerSearch/PowerSearchEditPopover.js +109 -103
  206. package/dist/PowerSearch/PowerSearchFilterEditor.js +3 -3
  207. package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
  208. package/dist/PowerSearch/PowerSearchToken.js +12 -8
  209. package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
  210. package/dist/PowerSearch/PowerSearchValueEditor.js +88 -75
  211. package/dist/PowerSearch/formatFilterValue.d.ts +2 -1
  212. package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
  213. package/dist/PowerSearch/formatFilterValue.js +19 -9
  214. package/dist/PowerSearch/index.d.ts +2 -1
  215. package/dist/PowerSearch/index.d.ts.map +1 -1
  216. package/dist/PowerSearch/index.js +1 -0
  217. package/dist/PowerSearch/resolveOperatorLabel.d.ts +23 -0
  218. package/dist/PowerSearch/resolveOperatorLabel.d.ts.map +1 -0
  219. package/dist/PowerSearch/resolveOperatorLabel.js +28 -0
  220. package/dist/PowerSearch/types.d.ts +28 -2
  221. package/dist/PowerSearch/types.d.ts.map +1 -1
  222. package/dist/PowerSearch/usePowerSearchConfig.d.ts.map +1 -1
  223. package/dist/PowerSearch/usePowerSearchConfig.js +27 -27
  224. package/dist/PowerSearch/usePowerSearchSource.d.ts.map +1 -1
  225. package/dist/PowerSearch/usePowerSearchSource.js +15 -8
  226. package/dist/ProgressBar/ProgressBar.js +13 -13
  227. package/dist/RadioList/RadioList.js +7 -7
  228. package/dist/RadioList/RadioListItem.js +18 -18
  229. package/dist/Resizable/ResizeHandle.d.ts +1 -1
  230. package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
  231. package/dist/Resizable/ResizeHandle.js +10 -7
  232. package/dist/Section/Section.js +5 -5
  233. package/dist/SegmentedControl/SegmentedControl.js +5 -5
  234. package/dist/SegmentedControl/SegmentedControlItem.js +7 -7
  235. package/dist/SelectableCard/SelectableCard.js +5 -5
  236. package/dist/Selector/Selector.d.ts.map +1 -1
  237. package/dist/Selector/Selector.js +57 -51
  238. package/dist/Selector/SelectorOption.js +3 -3
  239. package/dist/SideNav/SideNav.d.ts.map +1 -1
  240. package/dist/SideNav/SideNav.js +38 -36
  241. package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
  242. package/dist/SideNav/SideNavCollapseButton.js +8 -6
  243. package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
  244. package/dist/SideNav/SideNavHeading.js +92 -90
  245. package/dist/SideNav/SideNavItem.d.ts.map +1 -1
  246. package/dist/SideNav/SideNavItem.js +49 -43
  247. package/dist/SideNav/SideNavSection.js +14 -14
  248. package/dist/Skeleton/Skeleton.js +3 -3
  249. package/dist/Slider/Slider.js +23 -23
  250. package/dist/Spinner/Spinner.js +9 -9
  251. package/dist/StatusDot/StatusDot.js +5 -5
  252. package/dist/Switch/Switch.d.ts.map +1 -1
  253. package/dist/Switch/Switch.js +29 -27
  254. package/dist/TabList/Tab.js +18 -18
  255. package/dist/TabList/TabList.d.ts +1 -1
  256. package/dist/TabList/TabList.d.ts.map +1 -1
  257. package/dist/TabList/TabList.js +9 -6
  258. package/dist/TabList/TabMenu.js +23 -23
  259. package/dist/Table/BaseTable.d.ts.map +1 -1
  260. package/dist/Table/BaseTable.js +39 -37
  261. package/dist/Table/Table.d.ts.map +1 -1
  262. package/dist/Table/Table.js +10 -8
  263. package/dist/Table/TableBody.js +3 -3
  264. package/dist/Table/TableCell.js +3 -3
  265. package/dist/Table/TableFooter.js +3 -3
  266. package/dist/Table/TableHeader.js +3 -3
  267. package/dist/Table/TableHeaderCell.js +3 -3
  268. package/dist/Table/TableRow.js +5 -5
  269. package/dist/Table/index.d.ts +4 -0
  270. package/dist/Table/index.d.ts.map +1 -1
  271. package/dist/Table/index.js +2 -0
  272. package/dist/Table/plugins/columnResize/useTableColumnResize.js +9 -9
  273. package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
  274. package/dist/Table/plugins/filtering/useTableFiltering.js +127 -90
  275. package/dist/Table/plugins/groupedRows/index.d.ts +3 -0
  276. package/dist/Table/plugins/groupedRows/index.d.ts.map +1 -0
  277. package/dist/Table/plugins/groupedRows/index.js +3 -0
  278. package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts +78 -0
  279. package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -0
  280. package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +257 -0
  281. package/dist/Table/plugins/pagination/useTablePagination.d.ts.map +1 -1
  282. package/dist/Table/plugins/pagination/useTablePagination.js +12 -9
  283. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts +1 -1
  284. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
  285. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +30 -28
  286. package/dist/Table/plugins/rowIndex/index.d.ts +3 -0
  287. package/dist/Table/plugins/rowIndex/index.d.ts.map +1 -0
  288. package/dist/Table/plugins/rowIndex/index.js +3 -0
  289. package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts +50 -0
  290. package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts.map +1 -0
  291. package/dist/Table/plugins/rowIndex/useTableRowIndex.js +91 -0
  292. package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
  293. package/dist/Table/plugins/selection/useTableSelection.js +23 -20
  294. package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
  295. package/dist/Table/plugins/sortable/useTableSortable.js +23 -21
  296. package/dist/Table/tableContextMenu.js +9 -9
  297. package/dist/Text/Text.js +10 -10
  298. package/dist/TextArea/TextArea.js +14 -14
  299. package/dist/TextInput/TextInput.d.ts.map +1 -1
  300. package/dist/TextInput/TextInput.js +20 -16
  301. package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
  302. package/dist/Thumbnail/Thumbnail.js +37 -31
  303. package/dist/TimeInput/TimeInput.d.ts +1 -1
  304. package/dist/TimeInput/TimeInput.d.ts.map +1 -1
  305. package/dist/TimeInput/TimeInput.js +28 -23
  306. package/dist/Timestamp/Timestamp.d.ts.map +1 -1
  307. package/dist/Timestamp/Timestamp.js +29 -14
  308. package/dist/Toast/Toast.d.ts.map +1 -1
  309. package/dist/Toast/Toast.js +17 -15
  310. package/dist/Toast/ToastViewport.d.ts.map +1 -1
  311. package/dist/Toast/ToastViewport.js +14 -12
  312. package/dist/Toast/useToast.js +4 -4
  313. package/dist/ToggleButton/ToggleButton.js +12 -12
  314. package/dist/ToggleButton/ToggleButtonGroup.js +5 -5
  315. package/dist/Token/Token.d.ts.map +1 -1
  316. package/dist/Token/Token.js +29 -23
  317. package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
  318. package/dist/Tokenizer/Tokenizer.js +33 -31
  319. package/dist/Toolbar/Toolbar.js +18 -18
  320. package/dist/Tooltip/Tooltip.js +11 -11
  321. package/dist/Tooltip/useTooltip.js +3 -3
  322. package/dist/TopNav/TopNav.d.ts +2 -1
  323. package/dist/TopNav/TopNav.d.ts.map +1 -1
  324. package/dist/TopNav/TopNav.js +36 -33
  325. package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
  326. package/dist/TopNav/TopNavHeading.js +72 -70
  327. package/dist/TopNav/TopNavItem.js +5 -5
  328. package/dist/TopNav/TopNavMegaMenu.js +30 -30
  329. package/dist/TopNav/TopNavMegaMenuFeaturedCard.js +10 -10
  330. package/dist/TopNav/TopNavMegaMenuItem.js +16 -16
  331. package/dist/TopNav/TopNavMenu.js +32 -32
  332. package/dist/TreeList/TreeList.d.ts.map +1 -1
  333. package/dist/TreeList/TreeList.js +13 -9
  334. package/dist/TreeList/TreeListBranches.js +11 -11
  335. package/dist/TreeList/TreeListItem.d.ts.map +1 -1
  336. package/dist/TreeList/TreeListItem.js +37 -31
  337. package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
  338. package/dist/Typeahead/BaseTypeahead.js +26 -22
  339. package/dist/Typeahead/Typeahead.d.ts.map +1 -1
  340. package/dist/Typeahead/Typeahead.js +15 -13
  341. package/dist/Typeahead/TypeaheadItem.js +10 -10
  342. package/dist/VStack/VStack.js +3 -3
  343. package/dist/VisuallyHidden/VisuallyHidden.d.ts +1 -3
  344. package/dist/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
  345. package/dist/VisuallyHidden/VisuallyHidden.js +1 -3
  346. package/dist/astryx.css +20 -2
  347. package/dist/astryx.umd.js +66 -64
  348. package/dist/astryx.umd.js.map +4 -4
  349. package/dist/authoring/doc.d.ts +145 -0
  350. package/dist/authoring/doc.d.ts.map +1 -0
  351. package/dist/authoring/doc.js +100 -0
  352. package/dist/authoring/index.d.ts +29 -0
  353. package/dist/authoring/index.d.ts.map +1 -0
  354. package/dist/authoring/index.js +28 -0
  355. package/dist/authoring/integration.d.ts +35 -0
  356. package/dist/authoring/integration.d.ts.map +1 -0
  357. package/dist/authoring/integration.js +30 -0
  358. package/dist/authoring/template.d.ts +66 -0
  359. package/dist/authoring/template.d.ts.map +1 -0
  360. package/dist/authoring/template.js +55 -0
  361. package/dist/config.d.ts +80 -0
  362. package/dist/config.d.ts.map +1 -0
  363. package/dist/config.js +40 -0
  364. package/dist/hooks/useKeyboardHint.js +9 -9
  365. package/dist/i18n/InternationalizationContext.d.ts +12 -0
  366. package/dist/i18n/InternationalizationContext.d.ts.map +1 -0
  367. package/dist/i18n/InternationalizationContext.js +29 -0
  368. package/dist/i18n/InternationalizationProvider.d.ts +62 -0
  369. package/dist/i18n/InternationalizationProvider.d.ts.map +1 -0
  370. package/dist/i18n/InternationalizationProvider.js +44 -0
  371. package/dist/i18n/index.d.ts +24 -0
  372. package/dist/i18n/index.d.ts.map +1 -0
  373. package/dist/i18n/index.js +21 -0
  374. package/dist/i18n/resolve.d.ts +22 -0
  375. package/dist/i18n/resolve.d.ts.map +1 -0
  376. package/dist/i18n/resolve.js +141 -0
  377. package/dist/i18n/translator.d.ts +25 -0
  378. package/dist/i18n/translator.d.ts.map +1 -0
  379. package/dist/i18n/translator.js +1 -0
  380. package/dist/i18n/types.d.ts +47 -0
  381. package/dist/i18n/types.d.ts.map +1 -0
  382. package/dist/i18n/types.js +1 -0
  383. package/dist/i18n/useTranslator.d.ts +15 -0
  384. package/dist/i18n/useTranslator.d.ts.map +1 -0
  385. package/dist/i18n/useTranslator.js +39 -0
  386. package/dist/index.d.ts +1 -0
  387. package/dist/index.d.ts.map +1 -1
  388. package/dist/index.js +3 -0
  389. package/dist/theme/MediaTheme.js +3 -3
  390. package/dist/theme/Theme.js +7 -7
  391. package/dist/theme/syntax/SyntaxTheme.js +5 -5
  392. package/locales/en.json +746 -0
  393. package/locales/pseudo.json +560 -0
  394. package/package.json +24 -3
  395. package/src/AlertDialog/AlertDialog.doc.mjs +5 -0
  396. package/src/AlertDialog/AlertDialog.tsx +4 -1
  397. package/src/AlertDialog/useImperativeAlertDialog.tsx +0 -2
  398. package/src/AppShell/AppShell.doc.mjs +8 -2
  399. package/src/AppShell/AppShell.tsx +3 -1
  400. package/src/AvatarGroup/AvatarGroup.tsx +4 -1
  401. package/src/Banner/Banner.tsx +10 -5
  402. package/src/Breadcrumbs/Breadcrumbs.tsx +4 -1
  403. package/src/Button/Button.tsx +34 -4
  404. package/src/ButtonGroup/ButtonGroup.test.tsx +386 -2
  405. package/src/ButtonGroup/ButtonGroup.tsx +27 -11
  406. package/src/Calendar/Calendar.tsx +8 -5
  407. package/src/Card/Card.doc.mjs +3 -3
  408. package/src/Carousel/Carousel.tsx +10 -7
  409. package/src/Chat/ChatComposer.tsx +5 -1
  410. package/src/Chat/ChatComposerDrawer.tsx +9 -2
  411. package/src/Chat/ChatComposerInput.tsx +10 -4
  412. package/src/Chat/ChatLayout.tsx +5 -12
  413. package/src/Chat/ChatLayoutScrollButton.tsx +4 -2
  414. package/src/Chat/ChatMessage.tsx +5 -1
  415. package/src/Chat/ChatMessageBubble.tsx +2 -0
  416. package/src/Chat/ChatMessageList.doc.mjs +1 -1
  417. package/src/Chat/ChatMessageList.tsx +2 -0
  418. package/src/Chat/ChatMessageMetadata.tsx +15 -9
  419. package/src/Chat/ChatPastedTextToken.tsx +3 -1
  420. package/src/Chat/ChatSendButton.tsx +3 -1
  421. package/src/Chat/ChatToolCalls.doc.mjs +1 -1
  422. package/src/Chat/useSpeechRecognition.ts +11 -2
  423. package/src/Chat/useTriggerMenu.tsx +4 -2
  424. package/src/CheckboxInput/CheckboxInput.test.tsx +16 -0
  425. package/src/CheckboxInput/CheckboxInput.tsx +4 -2
  426. package/src/CheckboxList/CheckboxList.doc.mjs +6 -1
  427. package/src/CheckboxList/CheckboxList.tsx +2 -0
  428. package/src/CheckboxList/CheckboxListItem.tsx +7 -1
  429. package/src/Citation/Citation.tsx +4 -2
  430. package/src/ClickableCard/ClickableCard.doc.mjs +1 -1
  431. package/src/CodeBlock/CodeBlock.tsx +91 -40
  432. package/src/Collapsible/Collapsible.doc.mjs +3 -3
  433. package/src/CommandPalette/CommandPalette.tsx +10 -3
  434. package/src/CommandPalette/CommandPaletteInput.test.tsx +1 -1
  435. package/src/CommandPalette/CommandPaletteInput.tsx +5 -1
  436. package/src/CommandPalette/CommandPaletteList.tsx +4 -1
  437. package/src/ContextMenu/ContextMenu.tsx +4 -1
  438. package/src/DateInput/DateInput.doc.mjs +2 -2
  439. package/src/DateInput/DateInput.tsx +13 -5
  440. package/src/DateRangeInput/DateRangeInput.doc.mjs +7 -7
  441. package/src/DateRangeInput/DateRangeInput.tsx +14 -6
  442. package/src/DateTimeInput/DateTimeInput.doc.mjs +2 -2
  443. package/src/DateTimeInput/DateTimeInput.tsx +17 -7
  444. package/src/Dialog/DialogHeader.tsx +4 -2
  445. package/src/DropdownMenu/DropdownMenu.tsx +12 -8
  446. package/src/EmptyState/EmptyState.doc.mjs +3 -3
  447. package/src/EmptyState/EmptyState.tsx +4 -1
  448. package/src/Field/Field.doc.mjs +2 -2
  449. package/src/FileInput/FileInput.tsx +3 -1
  450. package/src/Grid/Grid.doc.mjs +5 -5
  451. package/src/InputGroup/InputGroup.doc.mjs +1 -1
  452. package/src/Layer/useLayer.doc.mjs +2 -2
  453. package/src/Lightbox/Lightbox.doc.mjs +7 -2
  454. package/src/Lightbox/Lightbox.tsx +6 -4
  455. package/src/Lightbox/useLightbox.tsx +0 -1
  456. package/src/Link/Link.test.tsx +74 -2
  457. package/src/Link/Link.tsx +48 -3
  458. package/src/Markdown/Markdown.tsx +12 -4
  459. package/src/MobileNav/MobileNav.tsx +4 -2
  460. package/src/MobileNav/MobileNavToggle.tsx +5 -3
  461. package/src/MoreMenu/MoreMenu.tsx +4 -1
  462. package/src/MultiSelector/MultiSelector.tsx +14 -5
  463. package/src/NumberInput/NumberInput.tsx +3 -1
  464. package/src/Outline/Outline.tsx +4 -1
  465. package/src/OverflowList/OverflowList.doc.mjs +2 -2
  466. package/src/Overlay/useOverlay.tsx +0 -3
  467. package/src/Pagination/Pagination.tsx +35 -12
  468. package/src/Popover/usePopover.tsx +6 -1
  469. package/src/PowerSearch/PowerSearch.doc.mjs +9 -4
  470. package/src/PowerSearch/PowerSearch.tsx +22 -10
  471. package/src/PowerSearch/PowerSearchEditPopover.tsx +27 -20
  472. package/src/PowerSearch/PowerSearchToken.tsx +17 -6
  473. package/src/PowerSearch/PowerSearchValueEditor.tsx +34 -21
  474. package/src/PowerSearch/formatFilterValue.test.ts +282 -0
  475. package/src/PowerSearch/formatFilterValue.ts +21 -8
  476. package/src/PowerSearch/index.ts +5 -0
  477. package/src/PowerSearch/resolveOperatorLabel.ts +34 -0
  478. package/src/PowerSearch/types.ts +33 -9
  479. package/src/PowerSearch/usePowerSearchConfig.ts +59 -27
  480. package/src/PowerSearch/usePowerSearchSource.ts +17 -8
  481. package/src/RadioList/RadioList.doc.mjs +1 -1
  482. package/src/Resizable/ResizeHandle.tsx +4 -1
  483. package/src/Section/Section.doc.mjs +4 -4
  484. package/src/SelectableCard/SelectableCard.doc.mjs +1 -1
  485. package/src/Selector/Selector.tsx +11 -6
  486. package/src/SideNav/SideNav.tsx +4 -2
  487. package/src/SideNav/SideNavCollapseButton.tsx +3 -1
  488. package/src/SideNav/SideNavHeading.tsx +5 -3
  489. package/src/SideNav/SideNavItem.tsx +3 -1
  490. package/src/Slider/Slider.doc.mjs +2 -2
  491. package/src/Stack/Stack.doc.mjs +10 -10
  492. package/src/Switch/Switch.doc.mjs +2 -2
  493. package/src/Switch/Switch.test.tsx +16 -0
  494. package/src/Switch/Switch.tsx +4 -2
  495. package/src/TabList/TabList.tsx +4 -1
  496. package/src/Table/BaseTable.tsx +8 -1
  497. package/src/Table/Table.doc.mjs +1 -1
  498. package/src/Table/Table.tsx +3 -1
  499. package/src/Table/index.ts +7 -0
  500. package/src/Table/plugins/filtering/useTableFiltering.tsx +31 -30
  501. package/src/Table/plugins/groupedRows/index.ts +7 -0
  502. package/src/Table/plugins/groupedRows/useTableGroupedRows.test.tsx +231 -0
  503. package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +351 -0
  504. package/src/Table/plugins/pagination/useTablePagination.tsx +4 -1
  505. package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +8 -4
  506. package/src/Table/plugins/rowIndex/index.ts +4 -0
  507. package/src/Table/plugins/rowIndex/useTableRowIndex.test.tsx +132 -0
  508. package/src/Table/plugins/rowIndex/useTableRowIndex.tsx +114 -0
  509. package/src/Table/plugins/selection/useTableSelection.tsx +6 -7
  510. package/src/Table/plugins/sortable/useTableSortable.tsx +8 -5
  511. package/src/Table/useTableFiltering.doc.mjs +2 -2
  512. package/src/Table/useTableGroupedRows.doc.mjs +71 -0
  513. package/src/Table/useTableRowIndex.doc.mjs +50 -0
  514. package/src/Table/useTableSortable.doc.mjs +11 -11
  515. package/src/Text/Text.doc.mjs +2 -2
  516. package/src/TextInput/TextInput.tsx +3 -1
  517. package/src/Thumbnail/Thumbnail.tsx +4 -2
  518. package/src/TimeInput/TimeInput.doc.mjs +2 -2
  519. package/src/TimeInput/TimeInput.tsx +6 -2
  520. package/src/Timestamp/Timestamp.doc.mjs +4 -4
  521. package/src/Timestamp/Timestamp.test.tsx +120 -7
  522. package/src/Timestamp/Timestamp.tsx +21 -1
  523. package/src/Toast/Toast.tsx +3 -1
  524. package/src/Toast/ToastViewport.tsx +3 -1
  525. package/src/Token/Token.tsx +4 -2
  526. package/src/Tokenizer/Tokenizer.doc.mjs +2 -2
  527. package/src/Tokenizer/Tokenizer.tsx +4 -4
  528. package/src/Toolbar/Toolbar.doc.mjs +1 -1
  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 -3
  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 +902 -0
  547. package/src/hooks/useHotkeys.doc.mjs +5 -5
  548. package/src/i18n/InternationalizationContext.ts +39 -0
  549. package/src/i18n/InternationalizationProvider.doc.mjs +72 -0
  550. package/src/i18n/InternationalizationProvider.tsx +83 -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/dist/NavItem/index.d.ts +0 -9
  562. package/dist/NavItem/index.d.ts.map +0 -1
  563. package/dist/NavItem/index.js +0 -10
  564. package/src/NavItem/index.ts +0 -11
@@ -14,14 +14,22 @@
14
14
 
15
15
  import {useMemo} from 'react';
16
16
  import type {SearchSource} from '../Typeahead/types';
17
+ import {useTranslator} from '../i18n';
18
+ import {resolveOperatorLabel} from './resolveOperatorLabel';
17
19
  import type {InternalConfig} from './useInternalConfig';
18
20
  import type {PowerSearchItem, PowerSearchOperator, FilterValue} from './types';
19
21
 
20
22
  export function usePowerSearchSource(
21
23
  config: InternalConfig,
22
24
  ): SearchSource<PowerSearchItem> {
25
+ const t = useTranslator();
23
26
  return useMemo(() => {
24
27
  const allItems = buildFieldItems(config);
28
+ // Resolver stays inline — `t()` internally memoizes both catalog
29
+ // lookups and parsed IntlMessageFormat instances, so calling it
30
+ // per keystroke is already O(1).
31
+ const opLabel = (op: PowerSearchOperator): string =>
32
+ resolveOperatorLabel(op, t);
25
33
 
26
34
  return {
27
35
  search(query: string): PowerSearchItem[] {
@@ -68,14 +76,15 @@ export function usePowerSearchSource(
68
76
 
69
77
  // Check each field+operator combo against the query
70
78
  for (const op of field.operators) {
71
- const combinedLabel = `${field.label} ${op.label}`.toLowerCase();
79
+ const combinedLabel =
80
+ `${field.label} ${opLabel(op)}`.toLowerCase();
72
81
  if (combinedLabel.includes(lower)) {
73
82
  const id = `${field.key}:${op.key}`;
74
83
  if (!seen.has(id)) {
75
84
  seen.add(id);
76
85
  results.push({
77
86
  id,
78
- label: `${field.label} ${op.label}`,
87
+ label: `${field.label} ${opLabel(op)}`,
79
88
  auxiliaryData: {
80
89
  fieldKey: field.key,
81
90
  operatorKey: op.key,
@@ -100,7 +109,7 @@ export function usePowerSearchSource(
100
109
  // Try "<field> <operator> <value>" first (longer match wins)
101
110
  let hasExactOperatorMatch = false;
102
111
  for (const op of field.operators) {
103
- const prefix = `${fieldLabel} ${op.label.toLowerCase()} `;
112
+ const prefix = `${fieldLabel} ${opLabel(op).toLowerCase()} `;
104
113
  if (lower.startsWith(prefix) && lower.length > prefix.length) {
105
114
  const rawValue = query.slice(prefix.length);
106
115
  const matches = resolveValueMatches(op, rawValue);
@@ -113,7 +122,7 @@ export function usePowerSearchSource(
113
122
  seen.add(id);
114
123
  results.push({
115
124
  id,
116
- label: `${field.label} ${op.label} ${match.quoted ? `"${match.displayValue}"` : match.displayValue}`,
125
+ label: `${field.label} ${opLabel(op)} ${match.quoted ? `"${match.displayValue}"` : match.displayValue}`,
117
126
  auxiliaryData: {
118
127
  fieldKey: field.key,
119
128
  operatorKey: op.key,
@@ -136,7 +145,7 @@ export function usePowerSearchSource(
136
145
  // Check the remainder isn't the start of an operator name
137
146
  const remainder = lower.slice(fieldPrefix.length);
138
147
  const isOperatorPrefix = field.operators.some(op =>
139
- op.label.toLowerCase().startsWith(remainder),
148
+ opLabel(op).toLowerCase().startsWith(remainder),
140
149
  );
141
150
  if (!isOperatorPrefix) {
142
151
  const rawValue = query.slice(fieldPrefix.length);
@@ -148,7 +157,7 @@ export function usePowerSearchSource(
148
157
  seen.add(id);
149
158
  results.push({
150
159
  id,
151
- label: `${field.label} ${op.label} ${match.quoted ? `"${match.displayValue}"` : match.displayValue}`,
160
+ label: `${field.label} ${opLabel(op)} ${match.quoted ? `"${match.displayValue}"` : match.displayValue}`,
152
161
  auxiliaryData: {
153
162
  fieldKey: field.key,
154
163
  operatorKey: op.key,
@@ -171,7 +180,7 @@ export function usePowerSearchSource(
171
180
  f =>
172
181
  f.label.toLowerCase() === lower ||
173
182
  f.operators.some(
174
- op => `${f.label} ${op.label}`.toLowerCase() === lower,
183
+ op => `${f.label} ${opLabel(op)}`.toLowerCase() === lower,
175
184
  ),
176
185
  );
177
186
  if (contentFieldKey && !hasExactMatch) {
@@ -197,7 +206,7 @@ export function usePowerSearchSource(
197
206
  return allItems;
198
207
  },
199
208
  };
200
- }, [config]);
209
+ }, [config, t]);
201
210
  }
202
211
 
203
212
  interface ValueMatch {
@@ -100,7 +100,7 @@ export const docs = {
100
100
  },
101
101
  {
102
102
  name: 'status',
103
- type: 'InputStatus',
103
+ type: "{type: 'warning' | 'error' | 'success', message?: string}",
104
104
  description: 'Status indicator ({ type, message }).',
105
105
  },
106
106
  {
@@ -33,6 +33,7 @@ import {
33
33
  import {mergeProps, mergeRefs} from '../utils';
34
34
  import type {ResizableProps} from './useResizable';
35
35
  import {themeProps} from '../utils/themeProps';
36
+ import {useTranslator} from '../i18n';
36
37
 
37
38
  const KEYBOARD_STEP = 10;
38
39
  const KEYBOARD_LARGE_STEP = 50;
@@ -307,7 +308,7 @@ export function ResizeHandle({
307
308
  hasDivider = false,
308
309
  isAlwaysVisible = true,
309
310
  pillPlacement = 'auto',
310
- label = 'Resize handle',
311
+ label: labelFromProps,
311
312
  resizable,
312
313
  children,
313
314
  xstyle,
@@ -315,6 +316,8 @@ export function ResizeHandle({
315
316
  ref,
316
317
  ...props
317
318
  }: ResizeHandleProps) {
319
+ const t = useTranslator();
320
+ const label = labelFromProps ?? t('@astryx.resizable.handle.label');
318
321
  const handleRef = useRef<HTMLDivElement>(null);
319
322
  // Removes the in-flight drag's window listeners (and resets body styles).
320
323
  // Held in a ref so unmount can tear down a drag that never got a pointerup.
@@ -49,13 +49,13 @@ export const docs = {
49
49
  },
50
50
  {
51
51
  name: 'padding',
52
- type: 'SpacingStep',
52
+ type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
53
53
  description: 'Internal padding using the spacing scale (0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10). Use padding={0} for edge-to-edge content.',
54
54
  default: '4',
55
55
  },
56
56
  {
57
57
  name: 'paddingBlock',
58
- type: 'SpacingStep',
58
+ type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
59
59
  description: 'Block (vertical) padding override. Overrides only the block-axis padding while preserving inline padding from `padding` or the container theme default. Accepts the spacing scale (0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10).',
60
60
  },
61
61
  {
@@ -131,13 +131,13 @@ export const docsZh = {
131
131
  },
132
132
  {
133
133
  name: 'padding',
134
- type: 'SpacingStep',
134
+ type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
135
135
  description: '使用间距比例的内部内边距(0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10)。使用 padding={0} 实现全宽内容。',
136
136
  default: '4',
137
137
  },
138
138
  {
139
139
  name: 'paddingBlock',
140
- type: 'SpacingStep',
140
+ type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
141
141
  description: '块(垂直)方向内边距覆盖。仅覆盖块轴内边距,同时保留来自 padding 或容器主题默认值的行内内边距。使用间距比例(0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10)。',
142
142
  },
143
143
  {
@@ -25,7 +25,7 @@ export const docs = {
25
25
  {name: 'onChange', type: '(isSelected: boolean) => void', description: 'Called when toggled.', required: true},
26
26
  {name: 'isDisabled', type: 'boolean', description: 'Disables the card.', default: 'false'},
27
27
  {name: 'children', type: 'ReactNode', description: 'Card content.'},
28
- {name: 'padding', type: "SpacingStep", description: 'Inner padding.', default: '4'},
28
+ {name: 'padding', type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10', description: 'Inner padding.', default: '4'},
29
29
  {name: 'variant', type: "'default' | 'transparent' | 'muted' | 'blue' | 'cyan' | 'gray' | 'green' | 'orange' | 'pink' | 'purple' | 'red' | 'teal' | 'yellow'", description: 'Background color variant.', default: "'default'"},
30
30
  {name: 'width', type: 'SizeValue', description: 'Card width.'},
31
31
  {name: 'height', type: 'SizeValue', description: 'Card height.'},
@@ -72,6 +72,7 @@ import {themeProps} from '../utils/themeProps';
72
72
  import {groupStyles} from '../InputGroup/groupStyles';
73
73
  import {useInputGroup} from '../InputGroup/InputGroupContext';
74
74
  import {VisuallyHidden} from '../VisuallyHidden';
75
+ import {useTranslator} from '../i18n';
75
76
 
76
77
  const styles = stylex.create({
77
78
  // Trigger container — the enhanced click target wrapping the combobox button and clear button as siblings
@@ -524,8 +525,7 @@ type SelectorPropsClearable<T extends SelectorOptionType = SelectorOptionType> =
524
525
  };
525
526
 
526
527
  export type SelectorProps<T extends SelectorOptionType = SelectorOptionType> =
527
- | SelectorPropsNonClearable<T>
528
- | SelectorPropsClearable<T>;
528
+ SelectorPropsNonClearable<T> | SelectorPropsClearable<T>;
529
529
 
530
530
  /**
531
531
  * Default option renderer
@@ -553,6 +553,7 @@ function DefaultOption({option}: {option: SelectorOptionData}) {
553
553
  export function Selector<T extends SelectorOptionType>(
554
554
  props: SelectorProps<T>,
555
555
  ) {
556
+ const t = useTranslator();
556
557
  const {
557
558
  label,
558
559
  isLabelHidden = false,
@@ -566,7 +567,7 @@ export function Selector<T extends SelectorOptionType>(
566
567
  onChange,
567
568
  changeAction,
568
569
  isLoading = false,
569
- placeholder = 'Select...',
570
+ placeholder: placeholderFromProps,
570
571
  size: sizeProp,
571
572
  status,
572
573
  labelTooltip,
@@ -574,7 +575,7 @@ export function Selector<T extends SelectorOptionType>(
574
575
  htmlName,
575
576
  renderOption,
576
577
  hasSearch = false,
577
- searchPlaceholder = 'Search...',
578
+ searchPlaceholder: searchPlaceholderFromProps,
578
579
  placement,
579
580
  isDefaultOpen = false,
580
581
  'data-testid': testId,
@@ -585,6 +586,9 @@ export function Selector<T extends SelectorOptionType>(
585
586
  hasClear: hasClearProp,
586
587
  ...rest
587
588
  } = props as SelectorPropsClearable<T>;
589
+ const placeholder = placeholderFromProps ?? t('@astryx.selector.placeholder');
590
+ const searchPlaceholder =
591
+ searchPlaceholderFromProps ?? t('@astryx.selector.searchPlaceholder');
588
592
  const hasClear = hasClearProp === true;
589
593
  const size = useSize(sizeProp, 'md');
590
594
 
@@ -803,7 +807,7 @@ export function Selector<T extends SelectorOptionType>(
803
807
  ? getItemId(highlightedIndex)
804
808
  : undefined
805
809
  }
806
- aria-label="Search options"
810
+ aria-label={t('@astryx.selector.searchOptions')}
807
811
  type="text"
808
812
  value={searchQuery}
809
813
  onChange={e => setSearchQuery(e.target.value)}
@@ -835,6 +839,7 @@ export function Selector<T extends SelectorOptionType>(
835
839
  popover.isOpen,
836
840
  highlightedIndex,
837
841
  getItemId,
842
+ t,
838
843
  ]);
839
844
 
840
845
  // Render an individual item
@@ -1014,7 +1019,7 @@ export function Selector<T extends SelectorOptionType>(
1014
1019
  <button
1015
1020
  type="button"
1016
1021
  onClick={handleClear}
1017
- aria-label={`Clear ${label}`}
1022
+ aria-label={t('@astryx.selector.clearLabel', {label})}
1018
1023
  {...stylex.props(styles.clearButton)}>
1019
1024
  <Icon icon="close" size="sm" color="secondary" />
1020
1025
  </button>
@@ -45,6 +45,7 @@ import {useResizable} from '../Resizable/useResizable';
45
45
  import type {ResizableConfig} from '../Resizable/useResizable';
46
46
  import {ResizeHandle} from '../Resizable/ResizeHandle';
47
47
  import {themeProps} from '../utils/themeProps';
48
+ import {useTranslator} from '../i18n';
48
49
 
49
50
  // =============================================================================
50
51
  // Constants
@@ -330,6 +331,7 @@ export function SideNav({
330
331
  handleRef,
331
332
  ...props
332
333
  }: SideNavProps) {
334
+ const t = useTranslator();
333
335
  // Parse collapsible prop
334
336
  const collapsibleConfig = typeof collapsible === 'object' ? collapsible : {};
335
337
  const isCollapsible = !!collapsible;
@@ -504,7 +506,7 @@ export function SideNav({
504
506
  <nav
505
507
  ref={mergeRefs(ref, navRef)}
506
508
  role="navigation"
507
- aria-label="Side navigation"
509
+ aria-label={t('@astryx.sideNav.label')}
508
510
  data-testid={testId}
509
511
  {...mergeProps(
510
512
  themeProps('side-nav'),
@@ -569,7 +571,7 @@ export function SideNav({
569
571
  pillPlacement="end"
570
572
  isAlwaysVisible={false}
571
573
  resizable={resizableHook.props}
572
- label="Resize sidebar"
574
+ label={t('@astryx.sideNav.resizeSidebar')}
573
575
  />
574
576
  </div>
575
577
  ) : (
@@ -30,6 +30,7 @@ import {
30
30
  type SideNavImperativeCollapseHandle,
31
31
  } from './SideNavCollapseContext';
32
32
  import {useAppShellMobile} from '../AppShell/AppShellMobileContext';
33
+ import {useTranslator} from '../i18n';
33
34
 
34
35
  // =============================================================================
35
36
  // Styles
@@ -105,6 +106,7 @@ export function SideNavCollapseButton({
105
106
  onClick: onClickProp,
106
107
  ...props
107
108
  }: SideNavCollapseButtonProps) {
109
+ const t = useTranslator();
108
110
  const {isCollapsed, toggle, isCollapsible} =
109
111
  useSideNavCollapseState(handleRef);
110
112
  const {isMobile} = useAppShellMobile();
@@ -118,7 +120,7 @@ export function SideNavCollapseButton({
118
120
  return (
119
121
  <Button
120
122
  ref={ref}
121
- label={label ?? (isCollapsed ? 'Expand sidebar' : 'Collapse sidebar')}
123
+ label={label ?? (isCollapsed ? t('@astryx.sideNavCollapseButton.expandSidebar') : t('@astryx.sideNavCollapseButton.collapseSidebar'))}
122
124
  variant="ghost"
123
125
  {...props}
124
126
  onClick={composeEventHandlers(onClickProp, toggle)}
@@ -44,6 +44,7 @@ import type {BaseProps} from '../BaseProps';
44
44
  import {useMenuHover} from '../hooks/useMenuHover';
45
45
  import {NavHeadingCloseContext} from '../NavMenu/NavMenuContext';
46
46
  import {themeProps} from '../utils/themeProps';
47
+ import {useTranslator} from '../i18n';
47
48
 
48
49
  // =============================================================================
49
50
  // Styles
@@ -342,13 +343,14 @@ export function SideNavHeading({
342
343
  ref,
343
344
  ...props
344
345
  }: SideNavHeadingProps) {
346
+ const t = useTranslator();
345
347
  const LinkComponent = useLinkComponent(as);
346
348
  const {isCollapsed} = useSideNavCollapse();
347
349
  const rootRef = useRef<HTMLDivElement>(null);
348
350
  const collapsedItemRef = useRef<HTMLElement>(null);
349
351
 
350
352
  const popover = usePopover({
351
- dialogLabel: 'Navigation menu',
353
+ dialogLabel: t('@astryx.sideNav.heading.dialogLabel'),
352
354
  hasCloseButton: false,
353
355
  });
354
356
 
@@ -603,7 +605,7 @@ export function SideNavHeading({
603
605
  {renderTextContent(
604
606
  <button
605
607
  type="button"
606
- aria-label="Open menu"
608
+ aria-label={t('@astryx.sideNav.heading.openMenu')}
607
609
  onClick={e => {
608
610
  e.stopPropagation();
609
611
  triggerProps.onClick();
@@ -665,7 +667,7 @@ export function SideNavHeading({
665
667
  showChevron ? (
666
668
  <button
667
669
  type="button"
668
- aria-label="Open menu"
670
+ aria-label={t('@astryx.sideNav.heading.openMenu')}
669
671
  onClick={e => {
670
672
  e.stopPropagation();
671
673
  triggerProps.onClick();
@@ -54,6 +54,7 @@ import {getIcon} from '../Icon/globalIconRegistry';
54
54
  import {useSideNavRenderMode} from './SideNavRenderContext';
55
55
  import {useAppShellMobile} from '../AppShell/AppShellMobileContext';
56
56
  import {themeProps} from '../utils/themeProps';
57
+ import {useTranslator} from '../i18n';
57
58
 
58
59
  // =============================================================================
59
60
  // Styles
@@ -356,6 +357,7 @@ export function SideNavItem({
356
357
  'data-testid': testId,
357
358
  ref,
358
359
  }: SideNavItemProps) {
360
+ const t = useTranslator();
359
361
  const {isCollapsed} = useSideNavCollapse();
360
362
  const renderMode = useSideNavRenderMode();
361
363
  const {closeMobileNav} = useAppShellMobile();
@@ -626,7 +628,7 @@ export function SideNavItem({
626
628
  <button
627
629
  type="button"
628
630
  onClick={handleToggleClick}
629
- aria-label={isItemCollapsed ? `Expand ${label}` : `Collapse ${label}`}
631
+ aria-label={isItemCollapsed ? t('@astryx.sideNavItem.expand', {label}) : t('@astryx.sideNavItem.collapse', {label})}
630
632
  aria-expanded={!isItemCollapsed}
631
633
  aria-controls={`${id}-children`}
632
634
  {...stylex.props(styles.expandToggle)}>
@@ -132,7 +132,7 @@ export const docs = {
132
132
  },
133
133
  {
134
134
  name: 'status',
135
- type: 'InputStatus',
135
+ type: "{type: 'warning' | 'error' | 'success', message?: string}",
136
136
  description:
137
137
  'Status indicator object (`{ type, message }`) for validation feedback.',
138
138
  },
@@ -286,7 +286,7 @@ export const docsZh = {
286
286
  },
287
287
  {
288
288
  name: 'status',
289
- type: 'InputStatus',
289
+ type: "{type: 'warning' | 'error' | 'success', message?: string}",
290
290
  description:
291
291
  '验证反馈的状态指示器对象(`{ type, message }`)。',
292
292
  },
@@ -24,25 +24,25 @@ export const docs = {
24
24
  props: [
25
25
  {
26
26
  name: 'gap',
27
- type: 'SpacingStep',
27
+ type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
28
28
  description:
29
29
  'Spacing step (number literal): 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10. Pass as a JSX number expression e.g. gap={4}, NOT a string like gap="4".',
30
30
  },
31
31
  {
32
32
  name: 'padding',
33
- type: 'SpacingStep',
33
+ type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
34
34
  description:
35
35
  'Inner padding on all sides, using the spacing scale (0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10). Matches the padding prop on Card, LayoutContent, and LayoutPanel. Pass as a JSX number expression e.g. padding={3}.',
36
36
  },
37
37
  {
38
38
  name: 'paddingInline',
39
- type: 'SpacingStep',
39
+ type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
40
40
  description:
41
41
  'Inline (horizontal) padding, using the spacing scale. Overrides padding on the inline axis when both are set.',
42
42
  },
43
43
  {
44
44
  name: 'paddingBlock',
45
- type: 'SpacingStep',
45
+ type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
46
46
  description:
47
47
  'Block (vertical) padding, using the spacing scale. Overrides padding on the block axis when both are set.',
48
48
  },
@@ -127,25 +127,25 @@ export const docs = {
127
127
  props: [
128
128
  {
129
129
  name: 'gap',
130
- type: 'SpacingStep',
130
+ type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
131
131
  description:
132
132
  'Spacing step (number literal): 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10. Pass as a JSX number expression e.g. gap={4}, NOT a string like gap="4".',
133
133
  },
134
134
  {
135
135
  name: 'padding',
136
- type: 'SpacingStep',
136
+ type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
137
137
  description:
138
138
  'Inner padding on all sides, using the spacing scale (0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10). Matches the padding prop on Card, LayoutContent, and LayoutPanel. Pass as a JSX number expression e.g. padding={3}.',
139
139
  },
140
140
  {
141
141
  name: 'paddingInline',
142
- type: 'SpacingStep',
142
+ type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
143
143
  description:
144
144
  'Inline (horizontal) padding, using the spacing scale. Overrides padding on the inline axis when both are set.',
145
145
  },
146
146
  {
147
147
  name: 'paddingBlock',
148
- type: 'SpacingStep',
148
+ type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
149
149
  description:
150
150
  'Block (vertical) padding, using the spacing scale. Overrides padding on the block axis when both are set.',
151
151
  },
@@ -289,7 +289,7 @@ export const docsZh = {
289
289
  props: [
290
290
  {
291
291
  name: 'gap',
292
- type: 'SpacingStep',
292
+ type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
293
293
  description:
294
294
  '间距步进(数字字面量):0、0.5、1、1.5、2、3、4、5、6、8、10。在 JSX 中使用数字表达式 e.g. gap={4},不要使用字符串 gap="4"。',
295
295
  },
@@ -358,7 +358,7 @@ export const docsZh = {
358
358
  props: [
359
359
  {
360
360
  name: 'gap',
361
- type: 'SpacingStep',
361
+ type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
362
362
  description:
363
363
  '间距步进(数字字面量):0、0.5、1、1.5、2、3、4、5、6、8、10。在 JSX 中使用数字表达式 e.g. gap={4},不要使用字符串 gap="4"。',
364
364
  },
@@ -90,7 +90,7 @@ export const docs = {
90
90
  },
91
91
  {
92
92
  name: 'status',
93
- type: 'InputStatus',
93
+ type: "{type: 'warning' | 'error' | 'success', message?: string}",
94
94
  description:
95
95
  'Status indicator with type and message. Displays a colored message box below the switch and sets aria-invalid when type is "error".',
96
96
  },
@@ -236,7 +236,7 @@ export const docsZh = {
236
236
  },
237
237
  {
238
238
  name: 'status',
239
- type: 'InputStatus',
239
+ type: "{type: 'warning' | 'error' | 'success', message?: string}",
240
240
  description:
241
241
  '带类型和消息的状态指示器。在开关下方显示彩色消息框,当类型为 "error" 时设置 aria-invalid。',
242
242
  },
@@ -197,6 +197,22 @@ describe('Switch', () => {
197
197
  expect(screen.getByLabelText('Toggle row')).toBeInTheDocument();
198
198
  });
199
199
 
200
+ it('keeps description linked via aria-describedby when isLabelHidden', () => {
201
+ render(
202
+ <Switch
203
+ label="Toggle row"
204
+ isLabelHidden
205
+ description="Enables sync for this row"
206
+ value={false}
207
+ onChange={() => {}}
208
+ />,
209
+ );
210
+ const switchEl = screen.getByRole('switch');
211
+ const description = screen.getByText('Enables sync for this row');
212
+ expect(description.id).not.toBe('');
213
+ expect(switchEl.getAttribute('aria-describedby')).toContain(description.id);
214
+ });
215
+
200
216
  it('shows label visually by default', () => {
201
217
  render(
202
218
  <Switch label="Enable notifications" value={false} onChange={() => {}} />,
@@ -393,9 +393,11 @@ export function Switch({
393
393
  });
394
394
 
395
395
  // Build aria-describedby from description and status message
396
- // Only include descriptionID when the element actually renders
396
+ // Only include descriptionID when the element actually renders.
397
+ // FieldLabel renders the description (with descriptionID) even when the
398
+ // label is visually hidden — it's sr-only, so keep it linked.
397
399
  const describedByParts: string[] = [];
398
- if (description && !isLabelHidden) {
400
+ if (description) {
399
401
  describedByParts.push(descriptionID);
400
402
  }
401
403
  if (status?.message) {
@@ -29,6 +29,7 @@ import {useListFocus} from '../hooks/useListFocus';
29
29
  import {useKeyboardHint} from '../hooks/useKeyboardHint';
30
30
  import {EDGE_COMP_ATTR} from '../Layout/edgeCompensation.stylex';
31
31
  import {themeProps} from '../utils/themeProps';
32
+ import {useTranslator} from '../i18n';
32
33
 
33
34
  /**
34
35
  * Selector matching the focusable stops in the tab strip: every Tab
@@ -129,11 +130,13 @@ export function TabList({
129
130
  onKeyDown: onKeyDownProp,
130
131
  onFocus: onFocusProp,
131
132
  onBlur: onBlurProp,
132
- 'aria-label': ariaLabel = 'Tabs',
133
+ 'aria-label': ariaLabelFromProps,
133
134
  'aria-orientation': _ariaOrientation,
134
135
  [EDGE_COMP_ATTR]: _edgeCompAttr,
135
136
  ...restProps
136
137
  }: TabListProps) {
138
+ const t = useTranslator();
139
+ const ariaLabel = ariaLabelFromProps ?? t('@astryx.tabList.label');
137
140
  const size = useSize(sizeProp, 'md');
138
141
 
139
142
  // Roving-tabindex keyboard navigation across the tab strip via the shared
@@ -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: {
@@ -326,6 +327,7 @@ function BaseTableInner<T extends Record<string, unknown>>({
326
327
  emptyState,
327
328
  ref,
328
329
  }: BaseTableProps<T> & {ref?: Ref<HTMLTableElement>}): ReactElement {
330
+ const t = useTranslator();
329
331
  // Use stable empty array when no plugins provided
330
332
  const plugins = pluginsProp ?? (EMPTY_PLUGINS as TablePlugin<T>[]);
331
333
 
@@ -527,7 +529,12 @@ function BaseTableInner<T extends Record<string, unknown>>({
527
529
  emptyState !== false && (
528
530
  <tr>
529
531
  <td colSpan={resolvedColumns.length}>
530
- {emptyState ?? <EmptyState title="No data" isCompact />}
532
+ {emptyState ?? (
533
+ <EmptyState
534
+ title={t('@astryx.table.noData')}
535
+ isCompact
536
+ />
537
+ )}
531
538
  </td>
532
539
  </tr>
533
540
  )}
@@ -45,7 +45,7 @@ export const docs = {
45
45
  {
46
46
  name: 'columns',
47
47
  type: 'TableColumn<T>[]',
48
- description: 'Column definitions: each column has {key, header, width?, align?, renderCell?}. The `header` field sets the column heading text. If omitted, columns are auto-generated from data object keys. The `width` field is typed as `ColumnWidth` (not a number) use `proportional(n)` or `pixel(n)` helpers imported from `@astryxdesign/core/Table`. Example: `width: pixel(120)` for 120px fixed, `width: proportional(1)` for flex distribution.',
48
+ description: 'Column definitions: each column has {key, header, width?, align?, renderCell?}. The `header` field sets the column heading text. If omitted, columns are auto-generated from data object keys. The `width` field is typed as `ColumnWidth` (not a number); use `proportional(n)` or `pixel(n)` helpers imported from `@astryxdesign/core/Table`. Example: `width: pixel(120)` for 120px fixed, `width: proportional(1)` for flex distribution.',
49
49
  },
50
50
  {
51
51
  name: 'idKey',
@@ -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
@@ -147,6 +148,7 @@ function TableScrollWrapper({
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'),
@@ -26,6 +26,8 @@ export {useTableColumnSettings} from './plugins/columnSettings';
26
26
  export {useTableColumnSettingsState} from './plugins/columnSettings';
27
27
  export {useTableColumnResize} from './plugins/columnResize';
28
28
  export {useTableStickyColumns} from './plugins/stickyColumns';
29
+ export {useTableGroupedRows} from './plugins/groupedRows';
30
+ export {useTableRowIndex} from './plugins/rowIndex';
29
31
  export {
30
32
  useTableRowExpansion,
31
33
  useTableRowExpansionState,
@@ -102,6 +104,11 @@ export type {
102
104
  export type {UseTableColumnResizeConfig} from './plugins/columnResize';
103
105
  export type {UseTableStickyColumnsConfig} from './plugins/stickyColumns';
104
106
  export type {UseTableRowExpansionConfig} from './plugins/rowExpansion';
107
+ export type {UseTableRowIndexConfig} from './plugins/rowIndex';
108
+ export type {
109
+ UseTableGroupedRowsConfig,
110
+ UseTableGroupedRowsResult,
111
+ } from './plugins/groupedRows';
105
112
  export type {
106
113
  UseTableFilteringConfig,
107
114
  TableFilterState,