@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,73 @@
1
1
  # @xds/core
2
2
 
3
+ # 0.1.7
4
+
5
+ #### Breaking Changes
6
+
7
+ - Table plugin render-prop interfaces (`TableRenderProps`, `HeaderRowRenderProps`, `HeaderCellRenderProps`, `BodyRowRenderProps`, `BodyCellRenderProps`, `ScrollWrapperRenderProps`) and the `scrollWrapper` component contract rename their StyleX array field `styles` → `xstyle`, matching the prop name sub-components receive it under. Custom plugin authors: rename `props.styles` reads and `styles:` writes in transform functions (#3679)
8
+ **Codemod:** `npx astryx upgrade --codemod rename-table-renderprops-styles-to-xstyle`
9
+
10
+ #### New Features
11
+
12
+ - Export the authoring factories from `@astryxdesign/core`: `createConfig` at `@astryxdesign/core/config` and `createIntegration`/`createPageTemplate`/`createBlockTemplate`/`createComponentDoc`/`createFunctionDoc`/`createDoc` at `@astryxdesign/core/authoring`. Authoring a config or integration no longer requires depending on the CLI. Existing `@astryxdesign/cli/*` imports keep working via re-export.
13
+ - Button: new `width` prop following the input field width convention (`SizeValue`: numbers are pixels, strings are used as-is). `width="100%"` removes the need for a `width: '100%'` xstyle override or a stretch layout wrapper for full-width CTAs in auth forms, dialogs, and mobile layouts (#2600).
14
+ - **Astryx components are now translatable.** Wrap your app in `<InternationalizationProvider locale="...">` and pass one or more locale catalogs to render astryx UI in the language of your choice; call `useTranslator()` inside your own components to translate consumer strings against the active locale. Astryx ships an English catalog with BCP 47 regional fallback (e.g. `pt-BR` → `pt` → `en`), so consumers who never render a provider see today's English strings unchanged.
15
+ - **Translation coverage now spans the full component set** — PowerSearch (UI chrome, value-editor labels/placeholders, the 21 built-in operator labels, and ICU-pluralized result counts), plus AlertDialog, AppShell, Banner, Breadcrumbs, Calendar, Chat, CommandPalette, ContextMenu, date/time inputs, Dialog, DropdownMenu, Lightbox, Link, Markdown, mobile/side/top nav, Outline, Popover, Resizable, Selector/MultiSelector, Table (and its filter/selection/sort plugins), Toast, Tokenizer, Typeahead, and related interactive affordances. Placeholder strings that used `...` are normalized to `…` (U+2026) in the English catalog; consumers who snapshot-test the exact three-dot form will see a diff, and consumers passing an explicit `placeholder` are unaffected.
16
+ - Two i18n-related **type refinements** (source-compatible for existing usage): `PowerSearchOperator` is now a discriminated union — `{key, value, label}` (raw text) or `{key, value, i18nKey}` (astryx-translated); passing `label` compiles and behaves unchanged, while a bare `{key, value}` (neither `label` nor `i18nKey`) becomes a compile-time error. `Markdown.renderBlock` gains a `t: TranslatorFn` parameter threaded from the top-level `Markdown`; direct `renderBlock` consumers pass a translator.
17
+ - New ESLint rules in `@astryx/eslint-plugin-astryx` (`astryx.configs.strict` / `recommended`): `@astryx/i18n-key-format` enforces camelCase path segments for `@astryx.*` catalog keys, and `@astryx/no-hardcoded-i18n-string` flags hardcoded English string literals on user-facing props — now also inside ternaries, logical expressions, and template literals (e.g. `aria-label={isOpen ? 'Close' : 'Open'}`). Both are filesystem-agnostic; downstream packages can enable them with the standard `files` / `ignores` pattern and will see additional violations flagged after upgrading.
18
+
19
+ #### Fixes
20
+
21
+ - Fix Banner chevron transition to honor `prefers-reduced-motion: reduce`.
22
+ - Round the trailing corner of the last ButtonGroup member, even when it renders a layer (#2508)
23
+ ButtonGroup keyed its trailing border-radius off `:last-child`. But several members render an invisible layer element _after_ their button — a `Button` with a `tooltip` returns `button + tooltip layer`, and `DropdownMenu` returns `trigger + popover`, both rendered inline by `useLayer` rather than portaled. The layer took the `:last-child` slot, so the real trailing button silently kept square outer corners and the group ended in a flat-edged stub.
24
+ - Calendar: month navigation now announces the newly visible month (e.g. "March 2026") to screen readers via a polite live region. Previously the grid changed silently. (#3724)
25
+ - Chat: opening a conversation that already has content (history, replay, session switching) no longer spring-scrolls from the top — the first fill positions instantly, whether the content is present at mount or arrives asynchronously. Subsequent growth (streaming) springs as before. `useChatStreamScroll`'s `scrollToBottom` accepts `{behavior: 'instant'}` for one-frame programmatic jumps, mirroring the DOM's `scrollTo({behavior})`. Exports the `ChatScrollToBottomOptions` type. (#3795)
26
+ - CheckboxInput/Switch: descriptions stay linked via aria-describedby when the label is visually hidden, instead of being orphaned in the DOM.
27
+ - CodeBlock keeps line numbers aligned with wrapped lines when `isWrapped` is enabled
28
+ - Forward rest props in Dialog and DialogHeader. DialogHeader now passes through data-testid, aria-*, and other attributes. Dialog's inline path forwards all rest props. Standard path spreads rest before contract props so onClick, onCancel, aria-modal, and role cannot be clobbered.
29
+ - Anchor --dense / --zh doc overlays to their base sections (#2182)
30
+ The compressed and translated reference docs were merged into the base doc **by array position**, so an overlay whose sections were ordered differently — or which omitted one — grafted every title onto the wrong body.
31
+ - FileInput: don't drop the drag-over highlight when dragging over dropzone children
32
+ Dragging a file across the dropzone's own icon/text fired a dragleave on the container and cleared the drag-over state, so the "Drop files here" highlight flickered mid-drag. A dragleave whose relatedTarget is still inside the dropzone is now ignored; only actually exiting the dropzone ends the drag-over state.
33
+ - Fix consumer rest props clobbering component contract props in ButtonGroup, Calendar, and Carousel
34
+ Components that set `role`, `aria-roledescription`, or `onKeyDown` on their root element now spread `{...rest}` before those props so a consumer cannot accidentally override the component's semantic contract. `onKeyDown` is composed via `composeEventHandlers` so both the consumer's and the component's handlers fire.
35
+ - Kbd: pass-through props no longer clobber the computed role and spoken accessible name (rest-spread precedence corrected, mirroring Avatar).
36
+ - Layer: centered layers near a viewport edge no longer render clipped (#3671). Flip fallbacks are a no-op for center alignment, so centered placements now append span-based `position-try-fallbacks` that slide the layer along its alignment axis.
37
+ - Link: disabled links no longer carry a live href/onClick — programmatic focus or AT activation can no longer trigger navigation.
38
+ - Selector: searching within the options popover now announces the number of matching results ("3 results" / "No results found") to screen readers, mirroring Typeahead. Previously filtering happened silently. (#3725)
39
+ - Table now honors the standard root styling props: `className`, `style`, `xstyle`, `id`, `aria-*`, `data-*`, and other HTML attributes reach the root `<table>` element instead of being silently dropped. `tableProps` is deprecated (still works, loses conflicts to direct props); the computed column min-width still wins over a consumer `style.minWidth`, but no longer clobbers it when columns compute none (#3679)
40
+ - Timestamp: the absolute-time tooltip is now reachable by keyboard — the timestamp is focusable while a tooltip is attached, per WCAG content-on-hover requirements.
41
+ - TopNav: the `<nav>` landmark now defaults its accessible name to "Top navigation" when the `label` prop is omitted, matching SideNav ("Side navigation"), Breadcrumbs, and Pagination. Previously an omitted `label` shipped an unnamed navigation landmark, leaving screen-reader users with multiple indistinguishable "navigation" landmarks on pages that compose SideNav + TopNav + Breadcrumbs. An explicit `label` still wins.
42
+
43
+ #### Documentation
44
+
45
+ - Point AI agents to the CLI from the core README.
46
+ `@astryxdesign/core`'s README now leads with a callout telling AI agents to run `npx astryx init` first, which installs the CLI's component index into `AGENTS.md`/`CLAUDE.md`. In an isolated cold-start test, this took agents from 0/5 to 4/5 on discovering and using the CLI (matching the AGENTS.md ceiling); a first-run nudge alone did 0/5.
47
+ - Surface literal values for union types in component docs (#1645)
48
+ Prop docs named their union types without ever showing the values behind them — `gap: SpacingStep`, `align: GridAlignment`, `sort: TableSortState<TSortKey>`, `status: InputStatus`. Readers without an IDE (agents especially) had to guess, and guessed wrong: `gap={16}` (pixels, not a scale step), `direction: 'desc'` (the type says `'descending'`).
49
+
50
+ #### Other Changes
51
+
52
+ - Migrate the duplicated charts/lab color parsers onto the shared `@astryxdesign/core/utils/color` module: adds `toGLFloats(rgba)` for RGBA→GL float conversion with a neutral non-NaN fallback, replacing the four `hexToGL` copies, and rebuilds `lerpHex`/`hexAlpha` on `parseHex`/`formatHex`/`parseColor`/`formatColor` (#3739)
53
+
54
+ #### Contributors
55
+
56
+ Thanks to everyone who contributed to this release:
57
+
58
+ - @AKnassa
59
+ - @arham766
60
+ - @bhamodi
61
+ - @cixzhang
62
+ - @ejhammond
63
+ - @jiunshinn
64
+ - @joeyfarina
65
+ - @nynexman4464
66
+ - @yyq1025
67
+ - @zeroryu
68
+
69
+ ---
70
+
3
71
  # 0.1.6
4
72
 
5
73
  #### New Features
package/README.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  Core UI components, theme system, and utilities for the Astryx design system. For project setup, see [Quick Start](#quick-start) below.
4
4
 
5
+ > **Building with an AI agent?** Add the CLI, then run `init`:
6
+ >
7
+ > ```bash
8
+ > npm install -D @astryxdesign/cli # or: pnpm add -D / yarn add -D / bun add -d
9
+ > npx astryx init # resolves to the CLI you just installed
10
+ > ```
11
+ >
12
+ > `init` writes the Astryx component index into your `AGENTS.md`/`CLAUDE.md` so your agent discovers components, templates, and design tokens instead of guessing. Need a single command without installing? Use the scoped package directly — `npx @astryxdesign/cli <cmd>` (or `pnpm dlx`/`bunx @astryxdesign/cli`). Bare `npx astryx` only works once `@astryxdesign/cli` is a dependency; before that npm resolves it to an unrelated package. See [XDS CLI](#xds-cli).
13
+
5
14
  ## Component Docs
6
15
 
7
16
  Look up any component's full API (props, types, best practices, and theming):
@@ -23,9 +32,9 @@ global navigation.
23
32
  Requires `@astryxdesign/cli` (`npm install -D @astryxdesign/cli`):
24
33
 
25
34
  ```bash
26
- npx astryx template --list # browse all page and block templates
27
- npx astryx template dashboard # emit full page source
28
- npx astryx template settings --skeleton # layout skeleton with spatial annotations
35
+ astryx template --list # browse all page and block templates
36
+ astryx template dashboard # emit full page source
37
+ astryx template settings --skeleton # layout skeleton with spatial annotations
29
38
  ```
30
39
 
31
40
  ## Astryx CLI
@@ -33,19 +42,21 @@ npx astryx template settings --skeleton # layout skeleton with spatial annotatio
33
42
  The CLI (`@astryxdesign/cli`) provides additional tooling:
34
43
 
35
44
  ```bash
36
- npx astryx --help # full listing of all commands
37
- npx astryx component Button # full docs + related block templates
38
- npx astryx docs # reference docs (principles, tokens, theming, styling)
39
- npx astryx docs theme # theming guide (Theme, defineTheme, light/dark)
40
- npx astryx docs tokens # spacing, color, radius, typography token reference
41
- npx astryx init # initialize Astryx in your project
42
- npx astryx theme build # build theme CSS for production
43
- npx astryx swizzle Button # eject component source for customization
44
- npx astryx upgrade --apply # run codemods to migrate between versions
45
- npx astryx discover # discover external Astryx packages
46
- npx astryx gap-report # report a missing capability
45
+ astryx --help # full listing of all commands
46
+ astryx component Button # full docs + related block templates
47
+ astryx docs # reference docs (principles, tokens, theming, styling)
48
+ astryx docs theme # theming guide (Theme, defineTheme, light/dark)
49
+ astryx docs tokens # spacing, color, radius, typography token reference
50
+ astryx init # initialize Astryx in your project
51
+ astryx theme build # build theme CSS for production
52
+ astryx swizzle Button # eject component source for customization
53
+ astryx upgrade --apply # run codemods to migrate between versions
54
+ astryx discover # discover external Astryx packages
55
+ astryx gap-report # report a missing capability
47
56
  ```
48
57
 
58
+ > Prefix these with your runner: `npx astryx …` / `pnpm exec astryx …` once the CLI is installed, or `npx @astryxdesign/cli …` to run without installing.
59
+
49
60
  ## Related Packages
50
61
 
51
62
  | Package | Description |
@@ -89,7 +89,7 @@ export interface AlertDialogProps extends BaseProps<HTMLDialogElement> {
89
89
  * />
90
90
  * ```
91
91
  */
92
- export declare function AlertDialog({ ref, isOpen, isInline, onOpenChange, title, description, cancelLabel, actionLabel, actionVariant, isActionLoading, onAction, width, xstyle, className, style, 'data-testid': testId, ...rest }: AlertDialogProps): React.JSX.Element;
92
+ export declare function AlertDialog({ ref, isOpen, isInline, onOpenChange, title, description, cancelLabel: cancelLabelFromProps, actionLabel, actionVariant, isActionLoading, onAction, width, xstyle, className, style, 'data-testid': testId, ...rest }: AlertDialogProps): React.JSX.Element;
93
93
  export declare namespace AlertDialog {
94
94
  var displayName: string;
95
95
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AlertDialog.d.ts","sourceRoot":"","sources":["../../src/AlertDialog/AlertDialog.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAA2B,MAAM,OAAO,CAAC;AAQhD,OAAO,EAAS,KAAK,aAAa,EAAC,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAI5C,MAAM,WAAW,gBAAiB,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IACpE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC;IAE3C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;OAGG;IACH,QAAQ,EAAE,MAAM,OAAO,CAAC;IAExB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,GAAG,EACH,MAAM,EACN,QAAQ,EACR,Y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AC,EAC1B,GAAG,EACH,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,WAAW,EACX,WAAW,EAAE,oBAAoB,EACjC,WAAW,EACX,aAA6B,EAC7B,eAAe,EACf,QAAQ,EACR,KAAW,EACX,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,IAAI,EACR,EAAE,gBAAgB,qBAwDlB;yBA1Ee,WAAW"}
@@ -26,6 +26,7 @@ import { Text } from "../Text/Text.js";
26
26
  import { Button } from "../Button/index.js";
27
27
  import { mergeProps } from "../utils/index.js";
28
28
  import { themeProps } from "../utils/themeProps.js";
29
+ import { useTranslator } from "../i18n/index.js";
29
30
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
30
31
  /**
31
32
  * A confirmation dialog for destructive or irreversible actions.
@@ -53,7 +54,7 @@ export function AlertDialog({
53
54
  onOpenChange,
54
55
  title,
55
56
  description,
56
- cancelLabel = 'Cancel',
57
+ cancelLabel: cancelLabelFromProps,
57
58
  actionLabel,
58
59
  actionVariant = 'destructive',
59
60
  isActionLoading,
@@ -65,6 +66,8 @@ export function AlertDialog({
65
66
  'data-testid': testId,
66
67
  ...rest
67
68
  }) {
69
+ const t = useTranslator();
70
+ const cancelLabel = cancelLabelFromProps ?? t('@astryx.alertDialog.cancel');
68
71
  const titleId = useId();
69
72
  const descriptionId = useId();
70
73
  const handleCancel = useCallback(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../src/AppShell/AppShell.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAmBf,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAkC5C;;;;;;G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aQuery } from "../hooks/useMediaQuery.js";
38
38
  import { observeResize, unobserveResize } from "../utils/sharedResizeObserver.js";
39
39
  import { themeProps } from "../utils/themeProps.js";
40
+ import { useTranslator } from "../i18n/index.js";
40
41
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
41
42
  const HasActivity = typeof React.Activity !== 'undefined';
42
43
  const ActivityWrapper = HasActivity ? ({
@@ -221,6 +222,7 @@ export function AppShell({
221
222
  ref,
222
223
  ...rest
223
224
  }) {
225
+ const t = useTranslator();
224
226
  // =========================================================================
225
227
  // Parse mobileNav prop — normalize to config, custom element, or disabled
226
228
  // =========================================================================
@@ -436,7 +438,7 @@ export function AppShell({
436
438
  className: "x78zum5 x6s0dn4 x1k15mir xf314gf"
437
439
  },
438
440
  role: "navigation",
439
- "aria-label": "Mobile navigation",
441
+ "aria-label": t('@astryx.appShell.mobileNavigation'),
440
442
  children: [/*#__PURE__*/_jsx(SideNavRenderContext, {
441
443
  value: "topbar",
442
444
  children: sideNav
@@ -53,7 +53,7 @@ export interface AvatarGroupProps extends BaseProps<HTMLDivElement> {
53
53
  * </AvatarGroup>
54
54
  * ```
55
55
  */
56
- export declare function AvatarGroup({ children, size, 'data-testid': testId, 'aria-label': ariaLabel, xstyle, className, style, ref, ...props }: AvatarGroupProps): ReactNode;
56
+ export declare function AvatarGroup({ children, size, 'data-testid': testId, 'aria-label': ariaLabelFromProps, xstyle, className, style, ref, ...props }: AvatarGroupProps): ReactNode;
57
57
  export declare namespace AvatarGroup {
58
58
  var displayName: string;
59
59
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarGroup.d.ts","sourceRoot":"","sources":["../../src/AvatarGroup/AvatarGroup.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAU,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC9C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,EA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aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,kBAAkB,EAChC,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,gBAAgB,GAAG,SAAS,CA6B9B;yBAvCe,WAAW"}
@@ -23,6 +23,7 @@ import * as stylex from '@stylexjs/stylex';
23
23
  import { mergeProps } from "../utils/index.js";
24
24
  import { AvatarGroupContext } from "./AvatarGroupContext.js";
25
25
  import { themeProps } from "../utils/themeProps.js";
26
+ import { useTranslator } from "../i18n/index.js";
26
27
  import { jsx as _jsx } from "react/jsx-runtime";
27
28
  const OVERLAP_RATIO = 0.25;
28
29
  const styles = {
@@ -55,13 +56,15 @@ export function AvatarGroup({
55
56
  children,
56
57
  size = 'small',
57
58
  'data-testid': testId,
58
- 'aria-label': ariaLabel = 'Avatars',
59
+ 'aria-label': ariaLabelFromProps,
59
60
  xstyle,
60
61
  className,
61
62
  style,
62
63
  ref,
63
64
  ...props
64
65
  }) {
66
+ const t = useTranslator();
67
+ const ariaLabel = ariaLabelFromProps ?? t('@astryx.avatarGroup.label');
65
68
  const numericSize = resolveSize(size);
66
69
  const overlap = Math.round(numericSize * OVERLAP_RATIO);
67
70
  const contextValue = useMemo(() => ({
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../src/Banner/Banner.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAkB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAsB5C;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,IAAI,CAAC;IACZ,OAAO,EAAE,IAAI,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,KAAK,EACL,WAAW,EACX,IAAI,EACJ,aAAqB,EACrB,SAAS,EACT,UAAU,EACV,SAAkB,EAClB,iBAAyB,EACzB,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,WAAW,sCAkIb;yBAlJe,MAAM"}
@@ -39,6 +39,7 @@ import { colorVars, spacingVars, radiusVars, fontWeightVars, typeScaleVars, bord
39
39
  import { mergeProps } from "../utils/index.js";
40
40
  import { edgeCompSlot } from "../Layout/edgeCompensation.stylex.js";
41
41
  import { themeProps } from "../utils/themeProps.js";
42
+ import { useTranslator } from "../i18n/index.js";
42
43
 
43
44
  // =============================================================================
44
45
  // Types
@@ -247,6 +248,7 @@ export function Banner({
247
248
  ref,
248
249
  ...rest
249
250
  }) {
251
+ const t = useTranslator();
250
252
  const [isDismissed, setIsDismissed] = useState(false);
251
253
  const [isExpanded, setIsExpanded] = useState(defaultIsExpanded);
252
254
  // Links the expand/collapse toggle to the content region it shows/hides so
@@ -319,15 +321,15 @@ export function Banner({
319
321
  children: [endContent, hasChildren && /*#__PURE__*/_jsx(Button, {
320
322
  variant: "ghost",
321
323
  size: "sm",
322
- label: isExpanded ? 'Collapse' : 'Expand',
323
- tooltip: isExpanded ? 'Collapse' : 'Expand',
324
+ label: isExpanded ? t('@astryx.banner.collapse') : t('@astryx.banner.expand'),
325
+ tooltip: isExpanded ? t('@astryx.banner.collapse') : t('@astryx.banner.expand'),
324
326
  icon: /*#__PURE__*/_jsx("span", {
325
327
  ...{
326
328
  0: {
327
- className: "x3nfvp2 x11xpdln xuedmi6 xlr8y92"
329
+ className: "x3nfvp2 x11xpdln xuedmi6 x12w9bfk xlr8y92"
328
330
  },
329
331
  1: {
330
- className: "x3nfvp2 x11xpdln xuedmi6 xlr8y92 x19jd1h0"
332
+ className: "x3nfvp2 x11xpdln xuedmi6 x12w9bfk xlr8y92 x19jd1h0"
331
333
  }
332
334
  }[!!isExpanded << 0],
333
335
  children: /*#__PURE__*/_jsx(Icon, {
@@ -343,8 +345,8 @@ export function Banner({
343
345
  }), isDismissable && /*#__PURE__*/_jsx(Button, {
344
346
  variant: "ghost",
345
347
  size: "sm",
346
- label: "Dismiss",
347
- tooltip: "Dismiss",
348
+ label: t('@astryx.banner.dismiss'),
349
+ tooltip: t('@astryx.banner.dismiss'),
348
350
  icon: /*#__PURE__*/_jsx(Icon, {
349
351
  icon: "close",
350
352
  size: "sm",
@@ -86,7 +86,7 @@ export interface BreadcrumbsProps extends BaseProps<HTMLElement> {
86
86
  * </Breadcrumbs>
87
87
  * ```
88
88
  */
89
- export declare function Breadcrumbs({ children, separator, variant, xstyle, className, style, label, ref, ...rest }: BreadcrumbsProps): import("react").JSX.Element;
89
+ export declare function Breadcrumbs({ children, separator, variant, xstyle, className, style, label: labelFromProps, ref, ...rest }: BreadcrumbsProps): import("react").JSX.Element;
90
90
  export declare namespace Breadcrumbs {
91
91
  var displayName: string;
92
92
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAyB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAI7D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAO5C;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,IAAI,CAAC;IACd,UAAU,EAAE,IAAI,CAAC;CAClB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,qBAAqB,CAAC;AAM7D,8FAA8F;AAC9F,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,kBAAkB,CAAC;IAC5B,SAAS,EAAE,SAAS,CAAC;CACt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C9D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC7B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA4BD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,SAAe,EACf,OAAmB,EACnB,MAAM,EACN,SAAS,EACT,KAAK,EACL,KAAK,EAAE,cAAc,EACrB,GAAG,EACH,GAAG,IAAI,EACR,EAAE,gBAAgB,+BAwBlB;yBAlCe,WAAW"}
@@ -21,6 +21,7 @@ import "../theme/tokens.stylex.js";
21
21
  import { spacingVars } from "../theme/tokens.stylex.js";
22
22
  import { mergeProps } from "../utils/index.js";
23
23
  import { themeProps } from "../utils/themeProps.js";
24
+ import { useTranslator } from "../i18n/index.js";
24
25
 
25
26
  // =============================================================================
26
27
  // Variant type
@@ -102,10 +103,12 @@ export function Breadcrumbs({
102
103
  xstyle,
103
104
  className,
104
105
  style,
105
- label = 'Breadcrumb',
106
+ label: labelFromProps,
106
107
  ref,
107
108
  ...rest
108
109
  }) {
110
+ const t = useTranslator();
111
+ const label = labelFromProps ?? t('@astryx.breadcrumbs.label');
109
112
  const ctxValue = useMemo(() => ({
110
113
  variant,
111
114
  separator
@@ -11,10 +11,11 @@
11
11
  * - /apps/storybook/stories/Button.stories.tsx (storybook stories)
12
12
  * - /packages/cli/templates/blocks/components/Button/ (showcase blocks)
13
13
  *
14
- * Last synced props: label, variant, size, isDisabled, isLoading, isInterruptible, clickAction, icon, isIconOnly, children, tooltip, endContent, href, as, target, rel
14
+ * Last synced props: label, variant, size, isDisabled, isLoading, isInterruptible, clickAction, icon, isIconOnly, width, children, tooltip, endContent, href, as, target, rel
15
15
  */
16
16
  import { type ReactNode } from 'react';
17
17
  import type { BaseProps } from '../BaseProps';
18
+ import type { SizeValue } from '../utils/types';
18
19
  import * as stylex from '@stylexjs/stylex';
19
20
  import type { LinkComponentType } from '../Link/types';
20
21
  declare const sizeStyles: Readonly<{
@@ -122,6 +123,12 @@ export interface ButtonProps extends BaseProps<HTMLButtonElement> {
122
123
  * @default false
123
124
  */
124
125
  isIconOnly?: boolean;
126
+ /**
127
+ * Width of the button. Numbers are treated as pixels, strings are used as-is
128
+ * (e.g. `'100%'` for a full-width button). By default the button sizes to
129
+ * its content.
130
+ */
131
+ width?: SizeValue;
125
132
  /**
126
133
  * Optional visible content. When provided, rendered instead of `label` as the
127
134
  * visible text (label still serves as the accessible name via aria-label).
@@ -181,11 +188,12 @@ export interface ButtonProps extends BaseProps<HTMLButtonElement> {
181
188
  * <Button label="Edit" icon={<PencilIcon />} />
182
189
  * <Button label="Messages" endContent={<Badge label={3} />} />
183
190
  * <Button label="Edit" icon={<PencilIcon />} endContent={<Badge label="New" />} />
191
+ * <Button label="Sign in" variant="primary" width="100%" />
184
192
  * <Button label="Visit site" href="https://example.com" variant="primary" />
185
193
  * <Button label="Open in new tab" href="https://example.com" target="_blank" rel="noopener noreferrer" />
186
194
  * ```
187
195
  */
188
- export declare function Button({ label, variant, size: sizeProp, type, isDisabled, isLoading, isInterruptible, clickAction, icon, isIconOnly, children, endContent, tooltip, href, as, target, rel, xstyle, className, style, ref, ...props }: ButtonProps): ReactNode;
196
+ export declare function Button({ label, variant, size: sizeProp, type, isDisabled, isLoading, isInterruptible, clickAction, icon, isIconOnly, width, children, endContent, tooltip, href, as, target, rel, xstyle, className, style, ref, ...props }: ButtonProps): ReactNode;
189
197
  export declare namespace Button {
190
198
  var displayName: string;
191
199
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO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
@@ -15,7 +15,7 @@
15
15
  * - /apps/storybook/stories/Button.stories.tsx (storybook stories)
16
16
  * - /packages/cli/templates/blocks/components/Button/ (showcase blocks)
17
17
  *
18
- * Last synced props: label, variant, size, isDisabled, isLoading, isInterruptible, clickAction, icon, isIconOnly, children, tooltip, endContent, href, as, target, rel
18
+ * Last synced props: label, variant, size, isDisabled, isLoading, isInterruptible, clickAction, icon, isIconOnly, width, children, tooltip, endContent, href, as, target, rel
19
19
  */
20
20
  import { useRef, useTransition } from 'react';
21
21
  import * as stylex from '@stylexjs/stylex';
@@ -98,6 +98,17 @@ const styles = {
98
98
  $$css: true
99
99
  }
100
100
  };
101
+
102
+ // Dynamic style for the consumer-controlled button width. Numbers are treated
103
+ // as pixels by StyleX; strings (e.g. '100%') are used as-is.
104
+ const dynamicStyles = {
105
+ width: width => [{
106
+ kzqmXN: width != null ? "x5lhr3w" : width,
107
+ $$css: true
108
+ }, {
109
+ "--x-width": (val => typeof val === "number" ? val + "px" : val != null ? val : undefined)(width)
110
+ }]
111
+ };
101
112
  const sizeStyles = {
102
113
  sm: {
103
114
  kZKoxP: "x6k0iem",
@@ -228,12 +239,42 @@ const loadingStyles = {
228
239
  $$css: true
229
240
  }
230
241
  };
242
+
243
+ /**
244
+ * "I am the last member of the group" — the trailing end cap.
245
+ *
246
+ * NOT `:last-child`: several members render an invisible layer element AFTER
247
+ * their button (a tooltip'd Button returns button + layer; DropdownMenu returns
248
+ * trigger + popover). `useLayer` renders those inline rather than portaling
249
+ * them, so the layer — not the button — took the `:last-child` slot and the real
250
+ * trailing button silently kept square corners (#2508).
251
+ *
252
+ * Layers always carry the native `popover` attribute (useLayer.tsx), and a
253
+ * popover is never an in-flow member — it is `display: none` until shown, then
254
+ * promoted to the top layer. So "last member" is: no following element sibling
255
+ * that isn't a popover.
256
+ *
257
+ * Reading it the other way round — marking the *buttons* and testing for a
258
+ * marked sibling — is the trap: it silently reclassifies anything it doesn't
259
+ * recognise as "not a member", so a member wrapped in a `display: contents`
260
+ * wrapper (Tooltip, HoverCard) or a raw child would make the button BEFORE it
261
+ * round mid-group. Ignoring known layers keeps the predicate conservative: an
262
+ * unrecognised sibling still counts, exactly as `:last-child` did, so the worst
263
+ * case degrades to the old behaviour instead of a wrong corner.
264
+ *
265
+ * Kept as a same-file const: StyleX only statically evaluates a selector key
266
+ * from a const in the same file.
267
+ *
268
+ * The leading edge still uses `:first-child` — a member's button always precedes
269
+ * its own layer, so the first button is genuinely `:first-child`.
270
+ */
271
+ const IS_LAST_ITEM = ':not(:has(~ *:not([popover])))';
231
272
  const groupStyles = {
232
273
  horizontal: {
233
274
  krdFHd: "x15mokao x8eehn2",
234
275
  kVL7Gh: "xbiv7yw x1xrp5p4",
235
- kfmiAY: "x1ga7v0g x11xp8u1",
236
- kT0f0o: "x16uus16 x747jw7",
276
+ kfmiAY: "x1ga7v0g xbfdvlp",
277
+ kT0f0o: "x16uus16 xajhecq",
237
278
  k2ei4v: "xgbv0en x1pjv70x",
238
279
  kVhnKS: "x1t7ytsu xyf0ibl",
239
280
  kGJrpR: "x1j92z86",
@@ -242,8 +283,8 @@ const groupStyles = {
242
283
  vertical: {
243
284
  krdFHd: "x15mokao x8eehn2",
244
285
  kfmiAY: "x1ga7v0g x2qxyot",
245
- kVL7Gh: "xbiv7yw x1yp72r9",
246
- kT0f0o: "x16uus16 x747jw7",
286
+ kVL7Gh: "xbiv7yw x12tyzlf",
287
+ kT0f0o: "x16uus16 xajhecq",
247
288
  kEafiO: "x11xkdxz x1g31smg",
248
289
  kPef9Z: "x13fuv20 x1d9v4yf",
249
290
  kLZC3w: "x1pc3f07",
@@ -280,6 +321,7 @@ const groupStyles = {
280
321
  * <Button label="Edit" icon={<PencilIcon />} />
281
322
  * <Button label="Messages" endContent={<Badge label={3} />} />
282
323
  * <Button label="Edit" icon={<PencilIcon />} endContent={<Badge label="New" />} />
324
+ * <Button label="Sign in" variant="primary" width="100%" />
283
325
  * <Button label="Visit site" href="https://example.com" variant="primary" />
284
326
  * <Button label="Open in new tab" href="https://example.com" target="_blank" rel="noopener noreferrer" />
285
327
  * ```
@@ -295,6 +337,7 @@ export function Button({
295
337
  clickAction,
296
338
  icon,
297
339
  isIconOnly = false,
340
+ width,
298
341
  children,
299
342
  endContent,
300
343
  tooltip,
@@ -387,7 +430,7 @@ export function Button({
387
430
  } : null;
388
431
 
389
432
  // Shared StyleX props for both button and link rendering
390
- const sharedStylexProps = stylex.props(styles.base, sizeStyles[size], variants[variant], isIconOnly && styles.iconOnly, buttonDisabled && styles.disabled, useAriaDisabled && styles.ariaDisabled, renderAsLink && styles.link, !buttonGroup && styles.pressable, buttonGroup && (buttonGroup.orientation === 'horizontal' ? groupStyles.horizontal : groupStyles.vertical), buttonGroup && (variant === 'primary' || variant === 'destructive') && (buttonGroup.orientation === 'horizontal' ? groupStyles.onSolidHorizontal : groupStyles.onSolidVertical), xstyle);
433
+ const sharedStylexProps = stylex.props(styles.base, sizeStyles[size], variants[variant], isIconOnly && styles.iconOnly, buttonDisabled && styles.disabled, useAriaDisabled && styles.ariaDisabled, renderAsLink && styles.link, !buttonGroup && styles.pressable, buttonGroup && (buttonGroup.orientation === 'horizontal' ? groupStyles.horizontal : groupStyles.vertical), buttonGroup && (variant === 'primary' || variant === 'destructive') && (buttonGroup.orientation === 'horizontal' ? groupStyles.onSolidHorizontal : groupStyles.onSolidVertical), width != null && dynamicStyles.width(width), xstyle);
391
434
  const sharedMergedProps = mergeProps(themeProps('button', {
392
435
  variant,
393
436
  size
@@ -4,9 +4,10 @@
4
4
  * @output Exports ButtonGroup component, context, and types
5
5
  * @position Groups buttons with connected styling; consumed by index.ts
6
6
  *
7
- * Children (Button, IconButton) consume the ButtonGroup context to
8
- * apply position-aware styles using CSS :first-child / :last-child
9
- * pseudo-classes — no cloneElement or wrapper divs needed.
7
+ * Children (Button, IconButton) consume the ButtonGroup context to apply
8
+ * position-aware styles in pure CSS — no cloneElement or wrapper divs needed.
9
+ * The end-cap radius rules live in Button.tsx; see IS_LAST_ITEM there for why
10
+ * the trailing edge cannot use :last-child (#2508).
10
11
  *
11
12
  * SYNC: When modified, update these files to stay in sync:
12
13
  * - /packages/core/src/ButtonGroup/ButtonGroup.doc.mjs (props table, features)
@@ -56,7 +57,10 @@ export interface ButtonGroupProps extends BaseProps<HTMLDivElement> {
56
57
  * handling (only on outer edges), and horizontal or vertical orientation.
57
58
  *
58
59
  * Children automatically detect the group via context and apply position-aware
59
- * styles using CSS :first-child / :last-child pseudo-classes.
60
+ * styles in pure CSS.
61
+ *
62
+ * Members that render their own layer — a Button with a `tooltip`, or a
63
+ * DropdownMenu — compose correctly, including as the trailing member.
60
64
  *
61
65
  * @example
62
66
  * ```
@@ -66,8 +70,19 @@ export interface ButtonGroupProps extends BaseProps<HTMLDivElement> {
66
70
  * <Button label="Paste" />
67
71
  * </ButtonGroup>
68
72
  * ```
73
+ *
74
+ * @example
75
+ * ```
76
+ * <ButtonGroup label="Approve action">
77
+ * <Button label="Allow once" variant="primary" />
78
+ * <DropdownMenu
79
+ * button={{label: 'Allow options', variant: 'primary', isIconOnly: true, icon: <Icon icon="chevronDown" />}}
80
+ * items={[{label: 'Allow for 30 minutes'}, {label: 'Always allow'}]}
81
+ * />
82
+ * </ButtonGroup>
83
+ * ```
69
84
  */
70
- export declare function ButtonGroup({ children, label, orientation, size: sizeProp, isDisabled, xstyle, className, style, ref, 'data-testid': testId, ...props }: ButtonGroupProps): ReactNode;
85
+ export declare function ButtonGroup({ children, label, orientation, size: sizeProp, isDisabled, xstyle, className, style, ref, 'data-testid': testId, onKeyDown, ...props }: ButtonGroupProps): ReactNode;
71
86
  export declare namespace ButtonGroup {
72
87
  var displayName: string;
73
88
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../../src/ButtonGroup/ButtonGroup.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAU,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAE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