@astryxdesign/core 0.1.6-canary.1b61ba6 → 0.1.6-canary.1d64659

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 (418) hide show
  1. package/README.md +0 -2
  2. package/dist/AlertDialog/AlertDialog.d.ts +1 -1
  3. package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
  4. package/dist/AlertDialog/AlertDialog.js +1 -4
  5. package/dist/AppShell/AppShell.d.ts.map +1 -1
  6. package/dist/AppShell/AppShell.js +1 -3
  7. package/dist/AvatarGroup/AvatarGroup.d.ts +1 -1
  8. package/dist/AvatarGroup/AvatarGroup.d.ts.map +1 -1
  9. package/dist/AvatarGroup/AvatarGroup.js +1 -4
  10. package/dist/Banner/Banner.d.ts.map +1 -1
  11. package/dist/Banner/Banner.js +6 -8
  12. package/dist/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  13. package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  14. package/dist/Breadcrumbs/Breadcrumbs.js +1 -4
  15. package/dist/Button/Button.d.ts.map +1 -1
  16. package/dist/Button/Button.js +4 -34
  17. package/dist/ButtonGroup/ButtonGroup.d.ts +5 -20
  18. package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
  19. package/dist/ButtonGroup/ButtonGroup.js +11 -27
  20. package/dist/Calendar/Calendar.d.ts.map +1 -1
  21. package/dist/Calendar/Calendar.js +5 -8
  22. package/dist/Carousel/Carousel.d.ts +1 -1
  23. package/dist/Carousel/Carousel.d.ts.map +1 -1
  24. package/dist/Carousel/Carousel.js +5 -8
  25. package/dist/Chat/ChatComposer.d.ts.map +1 -1
  26. package/dist/Chat/ChatComposer.js +1 -4
  27. package/dist/Chat/ChatComposerDrawer.d.ts +1 -1
  28. package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
  29. package/dist/Chat/ChatComposerDrawer.js +2 -9
  30. package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
  31. package/dist/Chat/ChatComposerInput.js +2 -6
  32. package/dist/Chat/ChatLayout.d.ts +11 -1
  33. package/dist/Chat/ChatLayout.d.ts.map +1 -1
  34. package/dist/Chat/ChatLayout.js +4 -6
  35. package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
  36. package/dist/Chat/ChatLayoutScrollButton.js +2 -4
  37. package/dist/Chat/ChatMessage.d.ts +1 -1
  38. package/dist/Chat/ChatMessage.d.ts.map +1 -1
  39. package/dist/Chat/ChatMessage.js +2 -8
  40. package/dist/Chat/ChatMessageBubble.d.ts +1 -1
  41. package/dist/Chat/ChatMessageBubble.d.ts.map +1 -1
  42. package/dist/Chat/ChatMessageBubble.js +1 -3
  43. package/dist/Chat/ChatMessageList.d.ts +1 -1
  44. package/dist/Chat/ChatMessageList.d.ts.map +1 -1
  45. package/dist/Chat/ChatMessageList.js +1 -3
  46. package/dist/Chat/ChatMessageMetadata.d.ts.map +1 -1
  47. package/dist/Chat/ChatMessageMetadata.js +8 -13
  48. package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
  49. package/dist/Chat/ChatPastedTextToken.js +1 -3
  50. package/dist/Chat/ChatSendButton.d.ts.map +1 -1
  51. package/dist/Chat/ChatSendButton.js +1 -3
  52. package/dist/Chat/index.d.ts +1 -1
  53. package/dist/Chat/index.d.ts.map +1 -1
  54. package/dist/Chat/useChatStreamScroll.d.ts +1 -12
  55. package/dist/Chat/useChatStreamScroll.d.ts.map +1 -1
  56. package/dist/Chat/useChatStreamScroll.js +6 -43
  57. package/dist/Chat/useSpeechRecognition.d.ts.map +1 -1
  58. package/dist/Chat/useSpeechRecognition.js +2 -4
  59. package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
  60. package/dist/Chat/useTriggerMenu.js +2 -4
  61. package/dist/CheckboxList/CheckboxList.d.ts +1 -1
  62. package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
  63. package/dist/CheckboxList/CheckboxList.js +1 -3
  64. package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
  65. package/dist/CheckboxList/CheckboxListItem.js +1 -3
  66. package/dist/Citation/Citation.d.ts.map +1 -1
  67. package/dist/Citation/Citation.js +2 -10
  68. package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
  69. package/dist/CodeBlock/CodeBlock.js +2 -4
  70. package/dist/CommandPalette/CommandPalette.d.ts +1 -1
  71. package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
  72. package/dist/CommandPalette/CommandPalette.js +3 -8
  73. package/dist/CommandPalette/CommandPaletteInput.d.ts +1 -1
  74. package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
  75. package/dist/CommandPalette/CommandPaletteInput.js +1 -4
  76. package/dist/CommandPalette/CommandPaletteList.d.ts +1 -1
  77. package/dist/CommandPalette/CommandPaletteList.d.ts.map +1 -1
  78. package/dist/CommandPalette/CommandPaletteList.js +1 -4
  79. package/dist/ContextMenu/ContextMenu.d.ts +1 -1
  80. package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
  81. package/dist/ContextMenu/ContextMenu.js +1 -4
  82. package/dist/DateInput/DateInput.d.ts +1 -1
  83. package/dist/DateInput/DateInput.d.ts.map +1 -1
  84. package/dist/DateInput/DateInput.js +5 -10
  85. package/dist/DateRangeInput/DateRangeInput.d.ts +1 -1
  86. package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
  87. package/dist/DateRangeInput/DateRangeInput.js +6 -11
  88. package/dist/DateTimeInput/DateTimeInput.d.ts +1 -1
  89. package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
  90. package/dist/DateTimeInput/DateTimeInput.js +7 -15
  91. package/dist/Dialog/Dialog.d.ts.map +1 -1
  92. package/dist/Dialog/Dialog.js +12 -15
  93. package/dist/Dialog/DialogHeader.d.ts +1 -1
  94. package/dist/Dialog/DialogHeader.d.ts.map +1 -1
  95. package/dist/Dialog/DialogHeader.js +3 -7
  96. package/dist/DropdownMenu/DropdownMenu.d.ts +1 -1
  97. package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  98. package/dist/DropdownMenu/DropdownMenu.js +5 -11
  99. package/dist/FileInput/FileInput.d.ts.map +1 -1
  100. package/dist/FileInput/FileInput.js +1 -11
  101. package/dist/Lightbox/Lightbox.d.ts.map +1 -1
  102. package/dist/Lightbox/Lightbox.js +4 -6
  103. package/dist/Link/Link.d.ts +1 -1
  104. package/dist/Link/Link.d.ts.map +1 -1
  105. package/dist/Link/Link.js +1 -4
  106. package/dist/Markdown/Markdown.d.ts.map +1 -1
  107. package/dist/Markdown/Markdown.js +8 -10
  108. package/dist/MobileNav/MobileNav.d.ts.map +1 -1
  109. package/dist/MobileNav/MobileNav.js +2 -4
  110. package/dist/MobileNav/MobileNavToggle.d.ts +1 -1
  111. package/dist/MobileNav/MobileNavToggle.d.ts.map +1 -1
  112. package/dist/MobileNav/MobileNavToggle.js +1 -4
  113. package/dist/MoreMenu/MoreMenu.d.ts +1 -1
  114. package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
  115. package/dist/MoreMenu/MoreMenu.js +1 -4
  116. package/dist/MultiSelector/MultiSelector.d.ts +1 -1
  117. package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
  118. package/dist/MultiSelector/MultiSelector.js +6 -13
  119. package/dist/NavItem/index.d.ts +9 -0
  120. package/dist/NavItem/index.d.ts.map +1 -0
  121. package/dist/NavItem/index.js +10 -0
  122. package/dist/NumberInput/NumberInput.d.ts.map +1 -1
  123. package/dist/NumberInput/NumberInput.js +1 -5
  124. package/dist/Outline/Outline.d.ts +1 -1
  125. package/dist/Outline/Outline.d.ts.map +1 -1
  126. package/dist/Outline/Outline.js +1 -4
  127. package/dist/Pagination/Pagination.d.ts +1 -1
  128. package/dist/Pagination/Pagination.d.ts.map +1 -1
  129. package/dist/Pagination/Pagination.js +11 -38
  130. package/dist/Popover/usePopover.d.ts.map +1 -1
  131. package/dist/Popover/usePopover.js +1 -4
  132. package/dist/PowerSearch/PowerSearch.d.ts +1 -1
  133. package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
  134. package/dist/PowerSearch/PowerSearch.js +12 -22
  135. package/dist/PowerSearch/PowerSearchEditPopover.d.ts +1 -1
  136. package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
  137. package/dist/PowerSearch/PowerSearchEditPopover.js +20 -26
  138. package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
  139. package/dist/PowerSearch/PowerSearchToken.js +3 -7
  140. package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
  141. package/dist/PowerSearch/PowerSearchValueEditor.js +21 -34
  142. package/dist/PowerSearch/formatFilterValue.d.ts +1 -2
  143. package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
  144. package/dist/PowerSearch/formatFilterValue.js +9 -19
  145. package/dist/PowerSearch/index.d.ts +1 -2
  146. package/dist/PowerSearch/index.d.ts.map +1 -1
  147. package/dist/PowerSearch/index.js +0 -1
  148. package/dist/PowerSearch/types.d.ts +2 -28
  149. package/dist/PowerSearch/types.d.ts.map +1 -1
  150. package/dist/PowerSearch/usePowerSearchConfig.d.ts.map +1 -1
  151. package/dist/PowerSearch/usePowerSearchConfig.js +27 -27
  152. package/dist/PowerSearch/usePowerSearchSource.d.ts.map +1 -1
  153. package/dist/PowerSearch/usePowerSearchSource.js +8 -15
  154. package/dist/Resizable/ResizeHandle.d.ts +1 -1
  155. package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
  156. package/dist/Resizable/ResizeHandle.js +1 -4
  157. package/dist/Selector/Selector.d.ts.map +1 -1
  158. package/dist/Selector/Selector.js +5 -11
  159. package/dist/SideNav/SideNav.d.ts.map +1 -1
  160. package/dist/SideNav/SideNav.js +2 -4
  161. package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
  162. package/dist/SideNav/SideNavCollapseButton.js +1 -3
  163. package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
  164. package/dist/SideNav/SideNavHeading.js +3 -5
  165. package/dist/SideNav/SideNavItem.d.ts.map +1 -1
  166. package/dist/SideNav/SideNavItem.js +1 -7
  167. package/dist/TabList/TabList.d.ts +1 -1
  168. package/dist/TabList/TabList.d.ts.map +1 -1
  169. package/dist/TabList/TabList.js +1 -4
  170. package/dist/Table/BaseTable.d.ts.map +1 -1
  171. package/dist/Table/BaseTable.js +16 -29
  172. package/dist/Table/Table.d.ts.map +1 -1
  173. package/dist/Table/Table.js +3 -5
  174. package/dist/Table/plugins/columnResize/useTableColumnResize.js +1 -1
  175. package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
  176. package/dist/Table/plugins/filtering/useTableFiltering.js +19 -56
  177. package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -1
  178. package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +4 -11
  179. package/dist/Table/plugins/pagination/useTablePagination.d.ts.map +1 -1
  180. package/dist/Table/plugins/pagination/useTablePagination.js +3 -6
  181. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
  182. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +6 -8
  183. package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
  184. package/dist/Table/plugins/selection/useTableSelection.js +2 -5
  185. package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
  186. package/dist/Table/plugins/sortable/useTableSortable.js +4 -6
  187. package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +2 -2
  188. package/dist/Table/types.d.ts +10 -17
  189. package/dist/Table/types.d.ts.map +1 -1
  190. package/dist/TextInput/TextInput.d.ts.map +1 -1
  191. package/dist/TextInput/TextInput.js +1 -5
  192. package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
  193. package/dist/Thumbnail/Thumbnail.js +2 -8
  194. package/dist/TimeInput/TimeInput.d.ts +1 -1
  195. package/dist/TimeInput/TimeInput.d.ts.map +1 -1
  196. package/dist/TimeInput/TimeInput.js +2 -7
  197. package/dist/Toast/Toast.d.ts.map +1 -1
  198. package/dist/Toast/Toast.js +1 -3
  199. package/dist/Toast/ToastViewport.d.ts.map +1 -1
  200. package/dist/Toast/ToastViewport.js +1 -3
  201. package/dist/Token/Token.d.ts.map +1 -1
  202. package/dist/Token/Token.js +2 -8
  203. package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
  204. package/dist/Tokenizer/Tokenizer.js +1 -3
  205. package/dist/TopNav/TopNav.d.ts +1 -1
  206. package/dist/TopNav/TopNav.d.ts.map +1 -1
  207. package/dist/TopNav/TopNav.js +1 -4
  208. package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
  209. package/dist/TopNav/TopNavHeading.js +3 -5
  210. package/dist/TreeList/TreeList.d.ts.map +1 -1
  211. package/dist/TreeList/TreeList.js +1 -5
  212. package/dist/TreeList/TreeListItem.d.ts.map +1 -1
  213. package/dist/TreeList/TreeListItem.js +1 -7
  214. package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
  215. package/dist/Typeahead/BaseTypeahead.js +4 -8
  216. package/dist/Typeahead/Typeahead.d.ts.map +1 -1
  217. package/dist/Typeahead/Typeahead.js +1 -3
  218. package/dist/VisuallyHidden/VisuallyHidden.d.ts +0 -1
  219. package/dist/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
  220. package/dist/VisuallyHidden/VisuallyHidden.js +0 -1
  221. package/dist/astryx.css +1 -3
  222. package/dist/astryx.umd.js +60 -62
  223. package/dist/astryx.umd.js.map +4 -4
  224. package/dist/index.d.ts +0 -1
  225. package/dist/index.d.ts.map +1 -1
  226. package/dist/index.js +0 -3
  227. package/package.json +2 -23
  228. package/src/AlertDialog/AlertDialog.tsx +1 -4
  229. package/src/AppShell/AppShell.doc.mjs +2 -8
  230. package/src/AppShell/AppShell.tsx +1 -3
  231. package/src/AvatarGroup/AvatarGroup.tsx +1 -4
  232. package/src/Banner/Banner.tsx +5 -10
  233. package/src/Breadcrumbs/Breadcrumbs.tsx +1 -4
  234. package/src/Button/Button.tsx +4 -34
  235. package/src/ButtonGroup/ButtonGroup.test.tsx +2 -386
  236. package/src/ButtonGroup/ButtonGroup.tsx +11 -27
  237. package/src/Calendar/Calendar.tsx +5 -8
  238. package/src/Card/Card.doc.mjs +3 -3
  239. package/src/Carousel/Carousel.tsx +7 -10
  240. package/src/Chat/ChatComposer.tsx +1 -5
  241. package/src/Chat/ChatComposerDrawer.tsx +2 -9
  242. package/src/Chat/ChatComposerInput.tsx +4 -10
  243. package/src/Chat/ChatLayout.test.tsx +2 -127
  244. package/src/Chat/ChatLayout.tsx +12 -5
  245. package/src/Chat/ChatLayoutScrollButton.tsx +2 -4
  246. package/src/Chat/ChatMessage.tsx +1 -5
  247. package/src/Chat/ChatMessageBubble.tsx +0 -2
  248. package/src/Chat/ChatMessageList.doc.mjs +1 -1
  249. package/src/Chat/ChatMessageList.tsx +0 -2
  250. package/src/Chat/ChatMessageMetadata.tsx +9 -15
  251. package/src/Chat/ChatPastedTextToken.tsx +1 -3
  252. package/src/Chat/ChatSendButton.tsx +1 -3
  253. package/src/Chat/ChatToolCalls.doc.mjs +1 -1
  254. package/src/Chat/index.ts +0 -1
  255. package/src/Chat/useChatStreamScroll.ts +11 -67
  256. package/src/Chat/useSpeechRecognition.ts +2 -11
  257. package/src/Chat/useTriggerMenu.tsx +2 -4
  258. package/src/CheckboxList/CheckboxList.doc.mjs +1 -1
  259. package/src/CheckboxList/CheckboxList.tsx +0 -2
  260. package/src/CheckboxList/CheckboxListItem.tsx +1 -7
  261. package/src/Citation/Citation.tsx +2 -4
  262. package/src/ClickableCard/ClickableCard.doc.mjs +1 -1
  263. package/src/CodeBlock/CodeBlock.tsx +2 -4
  264. package/src/CommandPalette/CommandPalette.tsx +3 -10
  265. package/src/CommandPalette/CommandPaletteInput.test.tsx +1 -1
  266. package/src/CommandPalette/CommandPaletteInput.tsx +1 -5
  267. package/src/CommandPalette/CommandPaletteList.tsx +1 -4
  268. package/src/ContextMenu/ContextMenu.tsx +1 -4
  269. package/src/DateInput/DateInput.doc.mjs +2 -2
  270. package/src/DateInput/DateInput.tsx +5 -13
  271. package/src/DateRangeInput/DateRangeInput.doc.mjs +1 -1
  272. package/src/DateRangeInput/DateRangeInput.tsx +6 -14
  273. package/src/DateTimeInput/DateTimeInput.doc.mjs +2 -2
  274. package/src/DateTimeInput/DateTimeInput.tsx +7 -17
  275. package/src/Dialog/Dialog.tsx +15 -11
  276. package/src/Dialog/DialogHeader.tsx +3 -7
  277. package/src/DropdownMenu/DropdownMenu.tsx +8 -12
  278. package/src/Field/Field.doc.mjs +2 -2
  279. package/src/FileInput/FileInput.test.tsx +1 -40
  280. package/src/FileInput/FileInput.tsx +1 -12
  281. package/src/Grid/Grid.doc.mjs +5 -5
  282. package/src/InputGroup/InputGroup.doc.mjs +1 -1
  283. package/src/Lightbox/Lightbox.doc.mjs +2 -7
  284. package/src/Lightbox/Lightbox.tsx +4 -6
  285. package/src/Link/Link.tsx +1 -4
  286. package/src/Markdown/Markdown.tsx +4 -12
  287. package/src/MobileNav/MobileNav.tsx +2 -4
  288. package/src/MobileNav/MobileNavToggle.tsx +3 -5
  289. package/src/MoreMenu/MoreMenu.tsx +1 -4
  290. package/src/MultiSelector/MultiSelector.tsx +5 -14
  291. package/src/NavItem/index.ts +11 -0
  292. package/src/NumberInput/NumberInput.tsx +1 -3
  293. package/src/Outline/Outline.tsx +1 -4
  294. package/src/OverflowList/OverflowList.doc.mjs +2 -2
  295. package/src/Pagination/Pagination.tsx +12 -35
  296. package/src/Popover/usePopover.tsx +1 -6
  297. package/src/PowerSearch/PowerSearch.doc.mjs +4 -4
  298. package/src/PowerSearch/PowerSearch.tsx +10 -22
  299. package/src/PowerSearch/PowerSearchEditPopover.tsx +20 -27
  300. package/src/PowerSearch/PowerSearchToken.tsx +6 -17
  301. package/src/PowerSearch/PowerSearchValueEditor.tsx +21 -34
  302. package/src/PowerSearch/formatFilterValue.ts +8 -21
  303. package/src/PowerSearch/index.ts +0 -5
  304. package/src/PowerSearch/types.ts +9 -33
  305. package/src/PowerSearch/usePowerSearchConfig.ts +27 -59
  306. package/src/PowerSearch/usePowerSearchSource.ts +8 -17
  307. package/src/RadioList/RadioList.doc.mjs +1 -1
  308. package/src/Resizable/ResizeHandle.tsx +1 -4
  309. package/src/Section/Section.doc.mjs +4 -4
  310. package/src/SelectableCard/SelectableCard.doc.mjs +1 -1
  311. package/src/Selector/Selector.tsx +6 -11
  312. package/src/SideNav/SideNav.tsx +2 -4
  313. package/src/SideNav/SideNavCollapseButton.tsx +1 -3
  314. package/src/SideNav/SideNavHeading.tsx +3 -5
  315. package/src/SideNav/SideNavItem.tsx +1 -3
  316. package/src/Slider/Slider.doc.mjs +2 -2
  317. package/src/Stack/Stack.doc.mjs +10 -10
  318. package/src/Switch/Switch.doc.mjs +2 -2
  319. package/src/TabList/TabList.tsx +1 -4
  320. package/src/Table/BaseTable.tsx +19 -36
  321. package/src/Table/Table.test.tsx +1 -132
  322. package/src/Table/Table.tsx +4 -6
  323. package/src/Table/plugins/columnResize/useTableColumnResize.tsx +1 -1
  324. package/src/Table/plugins/filtering/useTableFiltering.tsx +30 -31
  325. package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +4 -6
  326. package/src/Table/plugins/pagination/useTablePagination.tsx +1 -4
  327. package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +8 -9
  328. package/src/Table/plugins/selection/useTableSelection.tsx +7 -6
  329. package/src/Table/plugins/sortable/useTableSortable.tsx +5 -8
  330. package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +4 -4
  331. package/src/Table/types.ts +12 -18
  332. package/src/Table/useTableFiltering.doc.mjs +2 -2
  333. package/src/Table/useTableSortable.doc.mjs +11 -11
  334. package/src/Text/Text.doc.mjs +2 -2
  335. package/src/TextInput/TextInput.tsx +1 -3
  336. package/src/Thumbnail/Thumbnail.tsx +2 -4
  337. package/src/TimeInput/TimeInput.doc.mjs +2 -2
  338. package/src/TimeInput/TimeInput.tsx +2 -6
  339. package/src/Timestamp/Timestamp.doc.mjs +4 -4
  340. package/src/Toast/Toast.tsx +1 -3
  341. package/src/Toast/ToastViewport.tsx +1 -3
  342. package/src/Token/Token.tsx +2 -4
  343. package/src/Tokenizer/Tokenizer.doc.mjs +2 -2
  344. package/src/Tokenizer/Tokenizer.tsx +4 -4
  345. package/src/Toolbar/Toolbar.doc.mjs +1 -1
  346. package/src/TopNav/TopNav.tsx +1 -4
  347. package/src/TopNav/TopNavHeading.tsx +3 -5
  348. package/src/TreeList/TreeList.tsx +1 -5
  349. package/src/TreeList/TreeListItem.tsx +1 -6
  350. package/src/Typeahead/BaseTypeahead.tsx +4 -11
  351. package/src/Typeahead/Typeahead.doc.mjs +1 -1
  352. package/src/Typeahead/Typeahead.tsx +1 -3
  353. package/src/VisuallyHidden/VisuallyHidden.tsx +0 -1
  354. package/src/index.ts +0 -3
  355. package/dist/PowerSearch/resolveOperatorLabel.d.ts +0 -23
  356. package/dist/PowerSearch/resolveOperatorLabel.d.ts.map +0 -1
  357. package/dist/PowerSearch/resolveOperatorLabel.js +0 -28
  358. package/dist/authoring/doc.d.ts +0 -145
  359. package/dist/authoring/doc.d.ts.map +0 -1
  360. package/dist/authoring/doc.js +0 -100
  361. package/dist/authoring/index.d.ts +0 -29
  362. package/dist/authoring/index.d.ts.map +0 -1
  363. package/dist/authoring/index.js +0 -28
  364. package/dist/authoring/integration.d.ts +0 -35
  365. package/dist/authoring/integration.d.ts.map +0 -1
  366. package/dist/authoring/integration.js +0 -30
  367. package/dist/authoring/template.d.ts +0 -66
  368. package/dist/authoring/template.d.ts.map +0 -1
  369. package/dist/authoring/template.js +0 -55
  370. package/dist/config.d.ts +0 -80
  371. package/dist/config.d.ts.map +0 -1
  372. package/dist/config.js +0 -40
  373. package/dist/i18n/InternationalizationContext.d.ts +0 -12
  374. package/dist/i18n/InternationalizationContext.d.ts.map +0 -1
  375. package/dist/i18n/InternationalizationContext.js +0 -29
  376. package/dist/i18n/InternationalizationProvider.d.ts +0 -62
  377. package/dist/i18n/InternationalizationProvider.d.ts.map +0 -1
  378. package/dist/i18n/InternationalizationProvider.js +0 -44
  379. package/dist/i18n/index.d.ts +0 -24
  380. package/dist/i18n/index.d.ts.map +0 -1
  381. package/dist/i18n/index.js +0 -21
  382. package/dist/i18n/resolve.d.ts +0 -22
  383. package/dist/i18n/resolve.d.ts.map +0 -1
  384. package/dist/i18n/resolve.js +0 -141
  385. package/dist/i18n/translator.d.ts +0 -25
  386. package/dist/i18n/translator.d.ts.map +0 -1
  387. package/dist/i18n/translator.js +0 -1
  388. package/dist/i18n/types.d.ts +0 -47
  389. package/dist/i18n/types.d.ts.map +0 -1
  390. package/dist/i18n/types.js +0 -1
  391. package/dist/i18n/useTranslator.d.ts +0 -15
  392. package/dist/i18n/useTranslator.d.ts.map +0 -1
  393. package/dist/i18n/useTranslator.js +0 -39
  394. package/locales/en.json +0 -746
  395. package/locales/pseudo.json +0 -560
  396. package/src/Chat/useChatStreamScroll.test.tsx +0 -168
  397. package/src/PowerSearch/formatFilterValue.test.ts +0 -282
  398. package/src/PowerSearch/resolveOperatorLabel.ts +0 -34
  399. package/src/authoring/doc.ts +0 -166
  400. package/src/authoring/index.test.ts +0 -52
  401. package/src/authoring/index.ts +0 -50
  402. package/src/authoring/integration.ts +0 -42
  403. package/src/authoring/template.ts +0 -74
  404. package/src/config.test.ts +0 -16
  405. package/src/config.ts +0 -92
  406. package/src/docPropLiterals.test.ts +0 -938
  407. package/src/i18n/InternationalizationContext.ts +0 -39
  408. package/src/i18n/InternationalizationProvider.doc.mjs +0 -72
  409. package/src/i18n/InternationalizationProvider.tsx +0 -83
  410. package/src/i18n/__tests__/e2e-pagination.test.tsx +0 -172
  411. package/src/i18n/__tests__/e2e-powersearch.test.tsx +0 -130
  412. package/src/i18n/__tests__/resolve.test.ts +0 -284
  413. package/src/i18n/index.ts +0 -32
  414. package/src/i18n/resolve.ts +0 -165
  415. package/src/i18n/translator.ts +0 -31
  416. package/src/i18n/types.ts +0 -53
  417. package/src/i18n/useTranslator.doc.mjs +0 -46
  418. package/src/i18n/useTranslator.ts +0 -50
@@ -50,7 +50,7 @@ export const docs = {
50
50
  },
51
51
  {
52
52
  name: 'gap',
53
- type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
53
+ type: 'SpacingStep',
54
54
  description:
55
55
  'Gap between items as a spacing token step (0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10).',
56
56
  default: '2',
@@ -116,7 +116,7 @@ export const docsZh = {
116
116
  },
117
117
  {
118
118
  name: 'gap',
119
- type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
119
+ type: 'SpacingStep',
120
120
  description:
121
121
  '项目间距,使用间距步进值(0、0.5、1、1.5、2、3、4、5、6、8、10)。',
122
122
  default: '2',
@@ -39,7 +39,6 @@ import {useListFocus} from '../hooks/useListFocus';
39
39
  import {mergeProps} from '../utils';
40
40
  import type {BaseProps} from '../BaseProps';
41
41
  import {themeProps} from '../utils/themeProps';
42
- import {useTranslator} from '../i18n/useTranslator';
43
42
 
44
43
  // =============================================================================
45
44
  // Types
@@ -345,7 +344,7 @@ export function Pagination({
345
344
  siblingCount = 1,
346
345
  size = 'md',
347
346
  isDisabled = false,
348
- label: labelFromProps,
347
+ label = 'Pagination',
349
348
  'data-testid': testId,
350
349
  xstyle,
351
350
  className,
@@ -355,14 +354,6 @@ export function Pagination({
355
354
  }: PaginationProps) {
356
355
  const [, startTransition] = useTransition();
357
356
 
358
- // Resolve system strings once per render. Prop overrides win.
359
- const t = useTranslator();
360
- const label = labelFromProps ?? t('@astryx.pagination.label');
361
- const previousLabel = t('@astryx.pagination.previous');
362
- const nextLabel = t('@astryx.pagination.next');
363
- const pageIndicatorsLabel = t('@astryx.pagination.pageIndicators');
364
- const itemsPerPageLabel = t('@astryx.pagination.itemsPerPage');
365
-
366
357
  // pageSize is typed as number, so 0, NaN, and negatives are valid at the
367
358
  // type level but yield Infinity/NaN page counts, and
368
359
  // Array.from({length: Infinity}) crashes the dots variant. Coerce to a
@@ -427,11 +418,8 @@ export function Pagination({
427
418
  onChange(newPage);
428
419
  announce(
429
420
  computedTotalPages != null
430
- ? t('@astryx.pagination.pageOfTotal', {
431
- current: newPage,
432
- total: computedTotalPages,
433
- })
434
- : t('@astryx.pagination.pageAnnounce', {current: newPage}),
421
+ ? `Page ${newPage} of ${computedTotalPages}`
422
+ : `Page ${newPage}`,
435
423
  );
436
424
  startTransition(async () => {
437
425
  setOptimisticPage(newPage);
@@ -523,10 +511,8 @@ export function Pagination({
523
511
  return (
524
512
  <Button
525
513
  key={item}
526
- label={t('@astryx.pagination.goToPage', {page: item})}
527
- aria-label={t('@astryx.pagination.goToPage', {
528
- page: item,
529
- })}
514
+ label={`Go to page ${item}`}
515
+ aria-label={`Go to page ${item}`}
530
516
  variant="ghost"
531
517
  size={buttonSize}
532
518
  onClick={() => handlePageChange(item)}
@@ -548,11 +534,7 @@ export function Pagination({
548
534
  return (
549
535
  <span {...stylex.props(styles.infoText)}>
550
536
  <Text type="body" size="sm" color="secondary">
551
- {t('@astryx.pagination.count', {
552
- from: rangeStart,
553
- to: rangeEnd,
554
- total: totalItems,
555
- })}
537
+ {`${rangeStart}\u2013${rangeEnd} of ${totalItems}`}
556
538
  </Text>
557
539
  </span>
558
540
  );
@@ -565,10 +547,7 @@ export function Pagination({
565
547
  return (
566
548
  <span {...stylex.props(styles.infoText)}>
567
549
  <Text type="body" size="sm" color="secondary">
568
- {t('@astryx.pagination.pageOfTotal', {
569
- current: optimisticPage,
570
- total: computedTotalPages,
571
- })}
550
+ {`Page ${optimisticPage} of ${computedTotalPages}`}
572
551
  </Text>
573
552
  </span>
574
553
  );
@@ -584,7 +563,7 @@ export function Pagination({
584
563
  ref={dotsListRef}
585
564
  {...stylex.props(styles.dotsContainer)}
586
565
  role="group"
587
- aria-label={pageIndicatorsLabel}
566
+ aria-label="Page indicators"
588
567
  onKeyDown={handleDotsKeyDown}
589
568
  onFocus={handleDotsFocus}>
590
569
  {Array.from({length: computedTotalPages}, (_, i) => {
@@ -594,9 +573,7 @@ export function Pagination({
594
573
  key={i + 1}
595
574
  type="button"
596
575
  data-page={i + 1}
597
- aria-label={t('@astryx.pagination.goToPage', {
598
- page: i + 1,
599
- })}
576
+ aria-label={`Go to page ${i + 1}`}
600
577
  aria-current={isActive ? 'page' : undefined}
601
578
  // The active dot is the single roving tab stop; useListFocus
602
579
  // maintains it as focus and the active page move.
@@ -647,7 +624,7 @@ export function Pagination({
647
624
  <div {...stylex.props(styles.pageSizeSelector)}>
648
625
  <div {...stylex.props(styles.pageSizeSelectorControl)}>
649
626
  <Selector
650
- label={itemsPerPageLabel}
627
+ label="Items per page"
651
628
  isLabelHidden
652
629
  options={pageSizeOptions.map(opt => String(opt))}
653
630
  value={String(pageSize)}
@@ -660,7 +637,7 @@ export function Pagination({
660
637
  )}
661
638
  <div {...stylex.props(styles.controls)}>
662
639
  <Button
663
- label={previousLabel}
640
+ label="Go to previous page"
664
641
  variant="ghost"
665
642
  size={buttonSize}
666
643
  icon={<Icon icon="chevronLeft" size={isSm ? 'sm' : 'md'} />}
@@ -672,7 +649,7 @@ export function Pagination({
672
649
  {renderIndicator()}
673
650
 
674
651
  <Button
675
- label={nextLabel}
652
+ label="Go to next page"
676
653
  variant="ghost"
677
654
  size={buttonSize}
678
655
  icon={<Icon icon="chevronRight" size={isSm ? 'sm' : 'md'} />}
@@ -27,7 +27,6 @@ import {
27
27
  shadowVars,
28
28
  } from '../theme/tokens.stylex';
29
29
  import {Button} from '../Button';
30
- import {useTranslator} from '../i18n';
31
30
 
32
31
  const styles = stylex.create({
33
32
  // Default popover surface — background, radius, shadow.
@@ -310,16 +309,12 @@ export function usePopover(options: UsePopoverOptions = {}): UsePopoverReturn {
310
309
  hasAutoFocus = true,
311
310
  hasSurface = true,
312
311
  hasCloseButton = true,
313
- closeButtonLabel: closeButtonLabelFromProps,
312
+ closeButtonLabel = 'Close popover',
314
313
  dialogLabel,
315
314
  role = 'dialog',
316
315
  isModal = true,
317
316
  } = options;
318
317
 
319
- const t = useTranslator();
320
- const closeButtonLabel =
321
- closeButtonLabelFromProps ?? t('@astryx.popover.close');
322
-
323
318
  // Track the trigger element for returning focus
324
319
  const triggerElementRef = useRef<HTMLElement | null>(null);
325
320
 
@@ -23,7 +23,7 @@ export const docs = {
23
23
  },
24
24
  {
25
25
  name: 'onChange',
26
- type: "(filters: ReadonlyArray<PowerSearchFilter>, changeType: 'add' | 'edit' | 'remove', index: number) => void",
26
+ type: '(filters: ReadonlyArray<PowerSearchFilter>, changeType: PowerSearchChangeType, index: number) => void',
27
27
  description:
28
28
  "Called when filters change. changeType is 'add', 'edit', or 'remove'. index is the affected filter's position.",
29
29
  required: true,
@@ -79,7 +79,7 @@ export const docs = {
79
79
  },
80
80
  {
81
81
  name: 'status',
82
- type: "{type: 'warning' | 'error' | 'success', message?: string}",
82
+ type: 'InputStatus',
83
83
  description:
84
84
  'Validation status object with type and optional message.',
85
85
  },
@@ -177,7 +177,7 @@ export const docsZh = {
177
177
  },
178
178
  {
179
179
  name: 'onChange',
180
- type: "(filters: ReadonlyArray<PowerSearchFilter>, changeType: 'add' | 'edit' | 'remove', index: number) => void",
180
+ type: '(filters: ReadonlyArray<PowerSearchFilter>, changeType: PowerSearchChangeType, index: number) => void',
181
181
  description:
182
182
  "当过滤器变更时调用。changeType 为 'add'、'edit' 或 'remove'。index 为受影响的过滤器位置。",
183
183
  required: true,
@@ -232,7 +232,7 @@ export const docsZh = {
232
232
  },
233
233
  {
234
234
  name: 'status',
235
- type: "{type: 'warning' | 'error' | 'success', message?: string}",
235
+ type: 'InputStatus',
236
236
  description: '带有类型和可选消息的验证状态对象。',
237
237
  },
238
238
  {
@@ -52,9 +52,7 @@ import {useInternalConfig} from './useInternalConfig';
52
52
  import {usePowerSearchSource} from './usePowerSearchSource';
53
53
  import {formatFilterValue} from './formatFilterValue';
54
54
  import {PowerSearchEditPopover} from './PowerSearchEditPopover';
55
- import {resolveOperatorLabel} from './resolveOperatorLabel';
56
55
  import {themeProps} from '../utils/themeProps';
57
- import {useTranslator} from '../i18n';
58
56
  import type {
59
57
  PowerSearchConfig,
60
58
  PowerSearchFilter,
@@ -515,9 +513,9 @@ export function PowerSearch({
515
513
  config: configProp,
516
514
  filters,
517
515
  onChange,
518
- label: labelFromProps,
516
+ label = 'Search',
519
517
  isLabelHidden = true,
520
- placeholder: placeholderFromProps,
518
+ placeholder = 'Search...',
521
519
  hasAutoFocus = false,
522
520
  hasClear = true,
523
521
  isReadOnly = false,
@@ -528,7 +526,7 @@ export function PowerSearch({
528
526
  onBlur,
529
527
  status,
530
528
  maxTokenLength = 40,
531
- popoverSaveButtonLabel: popoverSaveButtonLabelFromProps,
529
+ popoverSaveButtonLabel = 'Apply',
532
530
  timezoneID,
533
531
  tokenOverflowBehavior,
534
532
  endContent,
@@ -545,12 +543,6 @@ export function PowerSearch({
545
543
  const size = useSize(sizeProp, 'md');
546
544
  const config = useInternalConfig(configProp);
547
545
  const searchSource = usePowerSearchSource(config);
548
- const t = useTranslator();
549
- const label = labelFromProps ?? t('@astryx.powersearch.label');
550
- const placeholder =
551
- placeholderFromProps ?? t('@astryx.powersearch.placeholder');
552
- const popoverSaveButtonLabel =
553
- popoverSaveButtonLabelFromProps ?? t('@astryx.powersearch.editor.apply');
554
546
  const tokenizerRef = useRef<TokenizerHandle>(null);
555
547
 
556
548
  const [popoverState, setPopoverStateRaw] = useState<PopoverState>({
@@ -606,15 +598,13 @@ export function PowerSearch({
606
598
  return filters.map((filter, index) => {
607
599
  const field = config.getField(filter.field);
608
600
  const operator = config.getOperator(filter.field, filter.operator);
609
- const resolvedOp = operator ? resolveOperatorLabel(operator, t) : '';
610
- const operatorLabel = resolvedOp ? `: ${resolvedOp}` : '';
601
+ const operatorLabel = operator?.label ? `: ${operator.label}` : '';
611
602
  const valueStr = operator
612
603
  ? formatFilterValue(
613
604
  config,
614
605
  operator.value,
615
606
  filter.value,
616
607
  maxTokenLength,
617
- t,
618
608
  timezoneID,
619
609
  )
620
610
  : '';
@@ -634,7 +624,7 @@ export function PowerSearch({
634
624
  },
635
625
  };
636
626
  });
637
- }, [filters, config, maxTokenLength, timezoneID, t]);
627
+ }, [filters, config, maxTokenLength, timezoneID]);
638
628
 
639
629
  // Handle tokenizer onChange (field selected from typeahead)
640
630
  const handleTokenizerChange = useCallback(
@@ -797,7 +787,7 @@ export function PowerSearch({
797
787
 
798
788
  // Default token rendering
799
789
  const fieldLabel = field?.label ?? '';
800
- const operatorLabel = operator ? resolveOperatorLabel(operator, t) : '';
790
+ const operatorLabel = operator?.label ?? '';
801
791
  const tokenLabel = `${fieldLabel}: ${operatorLabel}`.trim();
802
792
  const adjustedMaxLength = Math.max(
803
793
  maxTokenLength - fieldLabel.length - operatorLabel.length,
@@ -853,7 +843,6 @@ export function PowerSearch({
853
843
  isDisabled,
854
844
  handleTokenClick,
855
845
  componentOverrides,
856
- t,
857
846
  ],
858
847
  );
859
848
 
@@ -959,18 +948,17 @@ export function PowerSearch({
959
948
  ]);
960
949
 
961
950
  // Plain-text form of the result count, shared by the visible label and the
962
- // screen-reader announcement so the two never drift. The ICU plural handles
963
- // the number formatting + `result` vs `results` in one message so translators
964
- // can match the locale's plural rules.
951
+ // screen-reader announcement so the two never drift.
965
952
  const resultCountText = useMemo((): string | null => {
966
953
  if (resultCount == null) {
967
954
  return null;
968
955
  }
969
956
  if (typeof resultCount === 'number') {
970
- return t('@astryx.powersearch.resultCount', {count: resultCount});
957
+ const formatted = new Intl.NumberFormat().format(resultCount);
958
+ return `${formatted} ${resultCount === 1 ? 'result' : 'results'}`;
971
959
  }
972
960
  return resultCount;
973
- }, [resultCount, t]);
961
+ }, [resultCount]);
974
962
 
975
963
  // Announce result-count changes to screen readers through a polite live
976
964
  // region, mirroring the way Typeahead announces its dropdown result count.
@@ -19,10 +19,8 @@ import {Selector} from '../Selector';
19
19
  import {HStack, VStack} from '../Stack';
20
20
  import {Icon} from '../Icon';
21
21
  import {TreeList, type TreeListItemData} from '../TreeList';
22
- import {useTranslator} from '../i18n';
23
22
  import {spacingVars, typeScaleVars} from '../theme/tokens.stylex';
24
23
  import {PowerSearchValueEditor} from './PowerSearchValueEditor';
25
- import {resolveOperatorLabel} from './resolveOperatorLabel';
26
24
  import type {InternalConfig} from './useInternalConfig';
27
25
  import type {
28
26
  PowerSearchFilter,
@@ -240,7 +238,6 @@ function NestedSubFilterRow({
240
238
  onChange,
241
239
  isReadOnly,
242
240
  }: NestedSubFilterRowProps) {
243
- const t = useTranslator();
244
241
  const fieldOptions = useMemo(
245
242
  () =>
246
243
  config.getVisibleFields().map(field => ({
@@ -254,9 +251,9 @@ function NestedSubFilterRow({
254
251
  const operators = config.getVisibleOperators(subFilter.field);
255
252
  return operators.map(op => ({
256
253
  value: op.key,
257
- label: resolveOperatorLabel(op, t),
254
+ label: op.label,
258
255
  }));
259
- }, [config, subFilter.field, t]);
256
+ }, [config, subFilter.field]);
260
257
 
261
258
  const currentOperator = subFilter.operator
262
259
  ? config.getOperator(subFilter.field, subFilter.operator)
@@ -311,7 +308,7 @@ function NestedSubFilterRow({
311
308
  <HStack gap={2} vAlign="center">
312
309
  <div {...stylex.props(styles.nestedFieldSelector)}>
313
310
  <Selector
314
- label={t('@astryx.powersearch.editor.field')}
311
+ label="Field"
315
312
  isLabelHidden
316
313
  options={fieldOptions}
317
314
  value={subFilter.field}
@@ -323,7 +320,7 @@ function NestedSubFilterRow({
323
320
  {operatorOptions.length > 0 && (
324
321
  <div {...stylex.props(styles.nestedOperatorSelector)}>
325
322
  <Selector
326
- label={t('@astryx.powersearch.editor.operator')}
323
+ label="Operator"
327
324
  isLabelHidden
328
325
  options={operatorOptions}
329
326
  value={subFilter.operator}
@@ -369,7 +366,6 @@ function NestedEditor({
369
366
  onPartialFilterChange,
370
367
  isReadOnly,
371
368
  }: NestedEditorProps) {
372
- const t = useTranslator();
373
369
  const [subFilters, setSubFilters] = useState<EditablePartialFilter[]>(() => {
374
370
  if (partialFilter.value && partialFilter.value.type === 'nested') {
375
371
  return partialFilter.value.value.map(f => initEditableFilter(config, f));
@@ -472,7 +468,7 @@ function NestedEditor({
472
468
  id: `${itemPath.join('-')}-add`,
473
469
  label: (
474
470
  <Button
475
- label={t('@astryx.powersearch.editor.addFilter')}
471
+ label="+ Add filter"
476
472
  onClick={() => handleAdd(itemPath)}
477
473
  variant="ghost"
478
474
  size="sm"
@@ -495,7 +491,7 @@ function NestedEditor({
495
491
  children,
496
492
  endContent: !isReadOnly ? (
497
493
  <Button
498
- label={t('@astryx.powersearch.editor.removeFilter')}
494
+ label="Remove filter"
499
495
  icon={<Icon icon="close" size="sm" />}
500
496
  variant="ghost"
501
497
  size="sm"
@@ -519,7 +515,7 @@ function NestedEditor({
519
515
  ),
520
516
  endContent: !isReadOnly ? (
521
517
  <Button
522
- label={t('@astryx.powersearch.editor.removeFilter')}
518
+ label="Remove filter"
523
519
  icon={<Icon icon="close" size="sm" />}
524
520
  variant="ghost"
525
521
  size="sm"
@@ -540,7 +536,7 @@ function NestedEditor({
540
536
  id: 'add-filter',
541
537
  label: (
542
538
  <Button
543
- label={t('@astryx.powersearch.editor.addFilter')}
539
+ label="+ Add filter"
544
540
  onClick={() => handleAdd([])}
545
541
  variant="ghost"
546
542
  size="sm"
@@ -554,7 +550,7 @@ function NestedEditor({
554
550
  {operatorOptions.length > 1 ? (
555
551
  <div {...stylex.props(styles.operatorSelector)}>
556
552
  <Selector
557
- label={t('@astryx.powersearch.editor.groupOperator')}
553
+ label="Group operator"
558
554
  isLabelHidden
559
555
  options={operatorOptions}
560
556
  value={partialFilter.operator}
@@ -564,7 +560,7 @@ function NestedEditor({
564
560
  />
565
561
  </div>
566
562
  ) : (
567
- (operatorOptions[0]?.label ?? t('@astryx.powersearch.editor.group'))
563
+ (operatorOptions[0]?.label ?? 'Group')
568
564
  )}
569
565
  </div>
570
566
  );
@@ -591,12 +587,9 @@ export function PowerSearchEditPopover({
591
587
  mode,
592
588
  onSave,
593
589
  onCancel,
594
- saveButtonLabel: saveButtonLabelFromProps,
590
+ saveButtonLabel = 'Apply',
595
591
  isReadOnly = false,
596
592
  }: PowerSearchEditPopoverProps) {
597
- const t = useTranslator();
598
- const saveButtonLabel =
599
- saveButtonLabelFromProps ?? t('@astryx.powersearch.editor.apply');
600
593
  const [partialFilter, setPartialFilter] =
601
594
  useState<PartialFilter>(initialFilter);
602
595
  const valueEditorRef = useRef<HTMLDivElement>(null);
@@ -635,9 +628,9 @@ export function PowerSearchEditPopover({
635
628
  const operators = config.getVisibleOperators(partialFilter.field);
636
629
  return operators.map(op => ({
637
630
  value: op.key,
638
- label: resolveOperatorLabel(op, t),
631
+ label: op.label,
639
632
  }));
640
- }, [config, partialFilter.field, t]);
633
+ }, [config, partialFilter.field]);
641
634
 
642
635
  const handleFieldChange = useCallback(
643
636
  (fieldKey: string) => {
@@ -739,7 +732,7 @@ export function PowerSearchEditPopover({
739
732
  <HStack gap={2}>
740
733
  <div {...stylex.props(styles.fieldSelector)}>
741
734
  <Selector
742
- label={t('@astryx.powersearch.editor.field')}
735
+ label="Field"
743
736
  isLabelHidden
744
737
  options={fieldOptions}
745
738
  value={partialFilter.field}
@@ -763,7 +756,7 @@ export function PowerSearchEditPopover({
763
756
  <HStack gap={2} hAlign="between">
764
757
  {!isReadOnly && mode === 'edit' ? (
765
758
  <Button
766
- label={t('@astryx.powersearch.editor.delete')}
759
+ label="Delete"
767
760
  onClick={handleDelete}
768
761
  variant="ghost"
769
762
  size="sm"
@@ -773,7 +766,7 @@ export function PowerSearchEditPopover({
773
766
  )}
774
767
  <HStack gap={2}>
775
768
  <Button
776
- label={t('@astryx.powersearch.editor.cancel')}
769
+ label="Cancel"
777
770
  onClick={onCancel}
778
771
  variant="ghost"
779
772
  size="sm"
@@ -798,7 +791,7 @@ export function PowerSearchEditPopover({
798
791
  <HStack gap={2}>
799
792
  <div {...stylex.props(styles.fieldSelector)}>
800
793
  <Selector
801
- label={t('@astryx.powersearch.editor.field')}
794
+ label="Field"
802
795
  isLabelHidden
803
796
  options={fieldOptions}
804
797
  value={partialFilter.field}
@@ -810,7 +803,7 @@ export function PowerSearchEditPopover({
810
803
  {showOperatorSelector && operatorOptions.length > 0 && (
811
804
  <div {...stylex.props(styles.operatorSelector)}>
812
805
  <Selector
813
- label={t('@astryx.powersearch.editor.operator')}
806
+ label="Operator"
814
807
  isLabelHidden
815
808
  options={operatorOptions}
816
809
  value={partialFilter.operator}
@@ -839,7 +832,7 @@ export function PowerSearchEditPopover({
839
832
  <HStack gap={2} hAlign="between">
840
833
  {!isReadOnly && mode === 'edit' ? (
841
834
  <Button
842
- label={t('@astryx.powersearch.editor.delete')}
835
+ label="Delete"
843
836
  onClick={handleDelete}
844
837
  variant="ghost"
845
838
  size="sm"
@@ -849,7 +842,7 @@ export function PowerSearchEditPopover({
849
842
  )}
850
843
  <HStack gap={2}>
851
844
  <Button
852
- label={t('@astryx.powersearch.editor.cancel')}
845
+ label="Cancel"
853
846
  onClick={onCancel}
854
847
  variant="ghost"
855
848
  size="sm"
@@ -12,10 +12,8 @@
12
12
  import React from 'react';
13
13
  import * as stylex from '@stylexjs/stylex';
14
14
  import {Token} from '../Token';
15
- import {useTranslator} from '../i18n';
16
15
  import {fontWeightVars} from '../theme/tokens.stylex';
17
16
  import {formatFilterValue} from './formatFilterValue';
18
- import {resolveOperatorLabel} from './resolveOperatorLabel';
19
17
  import {useInternalConfig} from './useInternalConfig';
20
18
  import type {PowerSearchTokenProps} from './types';
21
19
 
@@ -43,17 +41,13 @@ export function PowerSearchToken({
43
41
  isDisabled,
44
42
  }: PowerSearchTokenProps) {
45
43
  const config = useInternalConfig(configProp);
46
- const t = useTranslator();
47
44
 
48
45
  const fieldLabel = field.label;
49
- const resolvedOperatorLabel = resolveOperatorLabel(operator, t);
50
- const operatorLabel = resolvedOperatorLabel
51
- ? `: ${resolvedOperatorLabel}`
52
- : '';
46
+ const operatorLabel = operator.label ? `: ${operator.label}` : '';
53
47
  const tokenLabel = `${fieldLabel}${operatorLabel}`;
54
48
 
55
49
  const adjustedMaxLength = Math.max(
56
- maxLength - fieldLabel.length - resolvedOperatorLabel.length,
50
+ maxLength - fieldLabel.length - (operator.label?.length ?? 0),
57
51
  10,
58
52
  );
59
53
 
@@ -62,7 +56,6 @@ export function PowerSearchToken({
62
56
  operator.value,
63
57
  filter.value,
64
58
  adjustedMaxLength,
65
- t,
66
59
  );
67
60
 
68
61
  const valueContent = valueStr ? (
@@ -73,14 +66,10 @@ export function PowerSearchToken({
73
66
  <Token
74
67
  label={tokenLabel}
75
68
  endContent={valueContent}
76
- onClick={
77
- onClick
78
- ? (e: React.MouseEvent) => {
79
- e.stopPropagation();
80
- onClick();
81
- }
82
- : undefined
83
- }
69
+ onClick={onClick ? (e: React.MouseEvent) => {
70
+ e.stopPropagation();
71
+ onClick();
72
+ } : undefined}
84
73
  onRemove={onRemove}
85
74
  isDisabled={isDisabled}
86
75
  />