haze-ui 1.24.1 → 1.26.0

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 (422) hide show
  1. package/README.md +237 -0
  2. package/dist/components/Accordion/Accordion.js +1 -0
  3. package/dist/components/Accordion/AccordionItem.js +1 -0
  4. package/dist/components/Accordion/index.js +1 -0
  5. package/dist/components/Affix/Affix.js +1 -0
  6. package/dist/components/Affix/index.js +1 -0
  7. package/dist/components/Alert/Alert.js +20 -18
  8. package/dist/components/Alert/index.js +1 -0
  9. package/dist/components/ApprovalCard/ApprovalCard.js +28 -25
  10. package/dist/components/ApprovalCard/index.js +1 -0
  11. package/dist/components/AspectRatio/AspectRatio.js +1 -0
  12. package/dist/components/AspectRatio/index.js +1 -0
  13. package/dist/components/AsyncSection/AsyncSection.js +33 -30
  14. package/dist/components/AsyncSection/index.js +1 -0
  15. package/dist/components/Avatar/Avatar.js +1 -0
  16. package/dist/components/Avatar/index.js +1 -0
  17. package/dist/components/AvatarGroup/AvatarGroup.js +30 -0
  18. package/dist/components/AvatarGroup/index.js +3 -0
  19. package/dist/components/BackToTop/BackToTop.js +16 -14
  20. package/dist/components/BackToTop/index.js +1 -0
  21. package/dist/components/Badge/Badge.js +1 -0
  22. package/dist/components/Badge/index.js +1 -0
  23. package/dist/components/Banner/Banner.js +20 -18
  24. package/dist/components/Banner/index.js +1 -0
  25. package/dist/components/BottomSheet/BottomSheet.js +1 -0
  26. package/dist/components/BottomSheet/index.js +1 -0
  27. package/dist/components/Breadcrumb/Breadcrumb.js +19 -17
  28. package/dist/components/Breadcrumb/BreadcrumbItem.js +1 -0
  29. package/dist/components/Breadcrumb/index.js +1 -0
  30. package/dist/components/Button/Button.js +1 -0
  31. package/dist/components/Button/ButtonLink.js +1 -0
  32. package/dist/components/Button/index.js +1 -0
  33. package/dist/components/Button/styles.js +1 -0
  34. package/dist/components/Calendar/Calendar.js +124 -0
  35. package/dist/components/Calendar/date.js +54 -0
  36. package/dist/components/Calendar/index.js +3 -0
  37. package/dist/components/Card/Card.js +1 -0
  38. package/dist/components/Card/index.js +1 -0
  39. package/dist/components/Carousel/Carousel.js +43 -40
  40. package/dist/components/Carousel/CarouselSlide.js +1 -0
  41. package/dist/components/Carousel/index.js +1 -0
  42. package/dist/components/Cascader/Cascader.js +228 -0
  43. package/dist/components/Cascader/index.js +3 -0
  44. package/dist/components/ChatContainer/ChatContainer.js +1 -0
  45. package/dist/components/ChatContainer/index.js +1 -0
  46. package/dist/components/ChatInput/ChatInput.js +31 -29
  47. package/dist/components/ChatInput/index.js +1 -0
  48. package/dist/components/ChatMessage/ChatMessage.js +29 -27
  49. package/dist/components/ChatMessage/index.js +1 -0
  50. package/dist/components/Checkbox/Checkbox.js +1 -0
  51. package/dist/components/Checkbox/CheckboxCore.js +1 -0
  52. package/dist/components/Checkbox/index.js +1 -0
  53. package/dist/components/Chip/Chip.js +21 -19
  54. package/dist/components/Chip/index.js +1 -0
  55. package/dist/components/CodeBlock/CodeBlock.js +1 -0
  56. package/dist/components/CodeBlock/index.js +1 -0
  57. package/dist/components/Collapsible/Collapsible.js +1 -0
  58. package/dist/components/Collapsible/index.js +1 -0
  59. package/dist/components/ColorPicker/ColorPicker.js +1 -0
  60. package/dist/components/ColorPicker/ColorPickerCore.js +29 -26
  61. package/dist/components/ColorPicker/index.js +1 -0
  62. package/dist/components/Combobox/Combobox.js +70 -41
  63. package/dist/components/Combobox/ComboboxOption.js +9 -5
  64. package/dist/components/Combobox/index.js +1 -0
  65. package/dist/components/Command/Command.js +1 -0
  66. package/dist/components/Command/index.js +1 -0
  67. package/dist/components/ConfirmDialog/ConfirmDialog.js +41 -39
  68. package/dist/components/ConfirmDialog/index.js +1 -0
  69. package/dist/components/Container/Container.js +1 -0
  70. package/dist/components/Container/index.js +1 -0
  71. package/dist/components/ContextMenu/ContextMenu.js +1 -0
  72. package/dist/components/ContextMenu/ContextMenuContent.js +1 -0
  73. package/dist/components/ContextMenu/ContextMenuContext.js +1 -0
  74. package/dist/components/ContextMenu/ContextMenuItem.js +1 -0
  75. package/dist/components/ContextMenu/ContextMenuSeparator.js +1 -0
  76. package/dist/components/ContextMenu/ContextMenuTrigger.js +1 -0
  77. package/dist/components/ContextMenu/index.js +1 -0
  78. package/dist/components/ConversationList/ConversationItem.js +1 -0
  79. package/dist/components/ConversationList/ConversationList.js +1 -0
  80. package/dist/components/ConversationList/index.js +1 -0
  81. package/dist/components/DataTable/DataTable.js +193 -0
  82. package/dist/components/DataTable/index.js +3 -0
  83. package/dist/components/DateRangePicker/DateRangePicker.js +1 -0
  84. package/dist/components/DateRangePicker/DateRangePickerCore.js +22 -19
  85. package/dist/components/DateRangePicker/index.js +1 -0
  86. package/dist/components/Datepicker/Datepicker.js +11 -8
  87. package/dist/components/Datepicker/DatepickerCore.js +19 -16
  88. package/dist/components/Datepicker/index.js +1 -0
  89. package/dist/components/Dialog/Dialog.js +1 -0
  90. package/dist/components/Dialog/index.js +1 -0
  91. package/dist/components/DiffViewer/DiffViewer.js +1 -0
  92. package/dist/components/DiffViewer/index.js +1 -0
  93. package/dist/components/Disclosure/Disclosure.js +1 -0
  94. package/dist/components/Disclosure/index.js +1 -0
  95. package/dist/components/Divider/Divider.js +1 -0
  96. package/dist/components/Divider/index.js +1 -0
  97. package/dist/components/Drawer/Drawer.js +1 -0
  98. package/dist/components/Drawer/index.js +1 -0
  99. package/dist/components/DropdownMenu/DropdownMenu.js +1 -0
  100. package/dist/components/DropdownMenu/DropdownMenuContent.js +1 -0
  101. package/dist/components/DropdownMenu/DropdownMenuContext.js +1 -0
  102. package/dist/components/DropdownMenu/DropdownMenuItem.js +1 -0
  103. package/dist/components/DropdownMenu/DropdownMenuSeparator.js +1 -0
  104. package/dist/components/DropdownMenu/DropdownMenuTrigger.js +1 -0
  105. package/dist/components/DropdownMenu/index.js +1 -0
  106. package/dist/components/Empty/Empty.js +22 -19
  107. package/dist/components/Empty/index.js +1 -0
  108. package/dist/components/FileInput/FileInput.js +15 -13
  109. package/dist/components/FileInput/index.js +1 -0
  110. package/dist/components/Flex/Flex.js +1 -0
  111. package/dist/components/Flex/index.js +1 -0
  112. package/dist/components/Grid/Grid.js +1 -0
  113. package/dist/components/Grid/GridItem.js +1 -0
  114. package/dist/components/Grid/index.js +1 -0
  115. package/dist/components/HoverCard/HoverCard.js +54 -0
  116. package/dist/components/HoverCard/index.js +3 -0
  117. package/dist/components/Icon/Icon.js +1 -0
  118. package/dist/components/Icon/index.js +1 -0
  119. package/dist/components/Image/Image.js +1 -0
  120. package/dist/components/Image/index.js +1 -0
  121. package/dist/components/InlineEdit/InlineEdit.js +33 -31
  122. package/dist/components/InlineEdit/index.js +1 -0
  123. package/dist/components/Input/Input.js +1 -0
  124. package/dist/components/Input/InputCore.js +1 -0
  125. package/dist/components/Input/index.js +1 -0
  126. package/dist/components/Kbd/Kbd.js +22 -0
  127. package/dist/components/Kbd/index.js +3 -0
  128. package/dist/components/List/List.js +1 -0
  129. package/dist/components/List/ListItem.js +1 -0
  130. package/dist/components/List/index.js +1 -0
  131. package/dist/components/LocaleProvider/LocaleContext.js +6 -0
  132. package/dist/components/LocaleProvider/LocaleProvider.js +22 -0
  133. package/dist/components/LocaleProvider/index.js +6 -0
  134. package/dist/components/LocaleProvider/locale.js +132 -0
  135. package/dist/components/LocaleProvider/useStrings.js +27 -0
  136. package/dist/components/LocaleProvider/zh-cn.js +128 -0
  137. package/dist/components/LogViewer/LogViewer.js +45 -43
  138. package/dist/components/LogViewer/index.js +1 -0
  139. package/dist/components/MarkdownRenderer/MarkdownRenderer.js +20 -19
  140. package/dist/components/MarkdownRenderer/index.js +1 -0
  141. package/dist/components/MarkdownRenderer/markdown-blocks.js +42 -0
  142. package/dist/components/Mentions/Mentions.js +17 -0
  143. package/dist/components/Mentions/MentionsCore.js +116 -0
  144. package/dist/components/Mentions/index.js +4 -0
  145. package/dist/components/Menu/Menu.js +1 -0
  146. package/dist/components/Menu/MenuDivider.js +1 -0
  147. package/dist/components/Menu/MenuItem.js +1 -0
  148. package/dist/components/Menu/index.js +1 -0
  149. package/dist/components/ModelPicker/ModelPicker.js +17 -15
  150. package/dist/components/ModelPicker/index.js +1 -0
  151. package/dist/components/NavigationBar/NavLink.js +1 -0
  152. package/dist/components/NavigationBar/NavigationBar.js +1 -0
  153. package/dist/components/NavigationBar/index.js +1 -0
  154. package/dist/components/NumberInput/NumberInput.js +1 -0
  155. package/dist/components/NumberInput/NumberInputCore.js +35 -33
  156. package/dist/components/NumberInput/index.js +1 -0
  157. package/dist/components/OTPInput/OTPInput.js +1 -0
  158. package/dist/components/OTPInput/OTPInputCore.js +36 -30
  159. package/dist/components/OTPInput/index.js +1 -0
  160. package/dist/components/Pagination/Pagination.js +32 -30
  161. package/dist/components/Pagination/index.js +1 -0
  162. package/dist/components/PasswordInput/PasswordInput.js +1 -0
  163. package/dist/components/PasswordInput/PasswordInputCore.js +23 -21
  164. package/dist/components/PasswordInput/index.js +1 -0
  165. package/dist/components/Popover/Popover.js +1 -0
  166. package/dist/components/Popover/index.js +1 -0
  167. package/dist/components/Progress/Progress.js +41 -39
  168. package/dist/components/Progress/index.js +1 -0
  169. package/dist/components/Radio/Radio.js +1 -0
  170. package/dist/components/Radio/RadioContext.js +1 -0
  171. package/dist/components/Radio/RadioGroup.js +1 -0
  172. package/dist/components/Radio/RadioGroupCore.js +1 -0
  173. package/dist/components/Radio/index.js +1 -0
  174. package/dist/components/Rating/Rating.js +1 -0
  175. package/dist/components/Rating/RatingCore.js +29 -26
  176. package/dist/components/Rating/index.js +1 -0
  177. package/dist/components/Resizable/Resizable.js +1 -0
  178. package/dist/components/Resizable/index.js +1 -0
  179. package/dist/components/ScrollArea/ScrollArea.js +1 -0
  180. package/dist/components/ScrollArea/index.js +1 -0
  181. package/dist/components/Segmented/Segmented.js +1 -0
  182. package/dist/components/Segmented/SegmentedCore.js +1 -0
  183. package/dist/components/Segmented/index.js +1 -0
  184. package/dist/components/Select/Option.js +1 -0
  185. package/dist/components/Select/Select.js +1 -0
  186. package/dist/components/Select/SelectCore.js +1 -0
  187. package/dist/components/Select/index.js +1 -0
  188. package/dist/components/Sidebar/Sidebar.js +113 -0
  189. package/dist/components/Sidebar/index.js +3 -0
  190. package/dist/components/Skeleton/Skeleton.js +1 -0
  191. package/dist/components/Skeleton/index.js +1 -0
  192. package/dist/components/Slider/Slider.js +1 -0
  193. package/dist/components/Slider/SliderCore.js +1 -0
  194. package/dist/components/Slider/index.js +1 -0
  195. package/dist/components/Spinner/Spinner.js +15 -12
  196. package/dist/components/Spinner/index.js +1 -0
  197. package/dist/components/Stat/Stat.js +1 -0
  198. package/dist/components/Stat/index.js +1 -0
  199. package/dist/components/StepTimeline/StepTimeline.js +1 -0
  200. package/dist/components/StepTimeline/index.js +1 -0
  201. package/dist/components/Stepper/Step.js +1 -0
  202. package/dist/components/Stepper/Stepper.js +1 -0
  203. package/dist/components/Stepper/StepperContext.js +1 -0
  204. package/dist/components/Stepper/index.js +1 -0
  205. package/dist/components/StreamingText/StreamingText.js +39 -18
  206. package/dist/components/StreamingText/index.js +1 -0
  207. package/dist/components/SwipeAction/SwipeAction.js +1 -0
  208. package/dist/components/SwipeAction/index.js +1 -0
  209. package/dist/components/Switch/Switch.js +1 -0
  210. package/dist/components/Switch/SwitchCore.js +1 -0
  211. package/dist/components/Switch/index.js +1 -0
  212. package/dist/components/Table/Table.js +1 -0
  213. package/dist/components/Table/TableBody.js +1 -0
  214. package/dist/components/Table/TableCell.js +1 -0
  215. package/dist/components/Table/TableHead.js +1 -0
  216. package/dist/components/Table/TableRow.js +1 -0
  217. package/dist/components/Table/index.js +1 -0
  218. package/dist/components/Tabs/Tab.js +1 -0
  219. package/dist/components/Tabs/TabList.js +1 -0
  220. package/dist/components/Tabs/TabPanel.js +1 -0
  221. package/dist/components/Tabs/Tabs.js +1 -0
  222. package/dist/components/Tabs/TabsContext.js +1 -0
  223. package/dist/components/Tabs/index.js +1 -0
  224. package/dist/components/Tag/Tag.js +17 -14
  225. package/dist/components/Tag/index.js +1 -0
  226. package/dist/components/TagGroup/TagGroup.js +1 -0
  227. package/dist/components/TagGroup/TagGroupItem.js +13 -10
  228. package/dist/components/TagGroup/index.js +1 -0
  229. package/dist/components/TagInput/TagInput.js +1 -0
  230. package/dist/components/TagInput/TagInputCore.js +53 -50
  231. package/dist/components/TagInput/index.js +1 -0
  232. package/dist/components/Textarea/Textarea.js +1 -0
  233. package/dist/components/Textarea/TextareaCore.js +1 -0
  234. package/dist/components/Textarea/index.js +1 -0
  235. package/dist/components/ThinkingIndicator/ThinkingIndicator.js +14 -11
  236. package/dist/components/ThinkingIndicator/index.js +1 -0
  237. package/dist/components/TimePicker/TimePicker.js +1 -0
  238. package/dist/components/TimePicker/TimePickerCore.js +1 -0
  239. package/dist/components/TimePicker/index.js +1 -0
  240. package/dist/components/Timeline/Timeline.js +1 -0
  241. package/dist/components/Timeline/index.js +1 -0
  242. package/dist/components/Toast/Toast.js +36 -30
  243. package/dist/components/Toast/ToastContainer.js +45 -28
  244. package/dist/components/Toast/ToastContext.js +1 -0
  245. package/dist/components/Toast/index.js +5 -3
  246. package/dist/components/Toast/toast2.js +45 -0
  247. package/dist/components/Toast/useToast.js +1 -0
  248. package/dist/components/TokenCounter/TokenCounter.js +20 -18
  249. package/dist/components/TokenCounter/index.js +1 -0
  250. package/dist/components/ToolCallCard/ToolCallCard.js +40 -37
  251. package/dist/components/ToolCallCard/index.js +1 -0
  252. package/dist/components/Toolbar/Toolbar.js +60 -0
  253. package/dist/components/Toolbar/ToolbarButton.js +26 -0
  254. package/dist/components/Toolbar/ToolbarContext.js +9 -0
  255. package/dist/components/Toolbar/ToolbarSeparator.js +23 -0
  256. package/dist/components/Toolbar/index.js +5 -0
  257. package/dist/components/Tooltip/Tooltip.js +1 -0
  258. package/dist/components/Tooltip/index.js +1 -0
  259. package/dist/components/Tour/Tour.js +198 -0
  260. package/dist/components/Tour/index.js +3 -0
  261. package/dist/components/Transfer/Transfer.js +1 -0
  262. package/dist/components/Transfer/TransferCore.js +62 -67
  263. package/dist/components/Transfer/index.js +1 -0
  264. package/dist/components/Tree/Tree.js +1 -0
  265. package/dist/components/Tree/TreeItem.js +57 -55
  266. package/dist/components/Tree/index.js +1 -0
  267. package/dist/components/Tree/utils.js +1 -0
  268. package/dist/components/Typography/Typography.js +1 -0
  269. package/dist/components/Typography/index.js +1 -0
  270. package/dist/components/Upload/Upload.js +1 -0
  271. package/dist/components/Upload/UploadCore.js +37 -35
  272. package/dist/components/Upload/index.js +1 -0
  273. package/dist/components/VirtualList/VirtualList.js +141 -26
  274. package/dist/components/VirtualList/index.js +1 -0
  275. package/dist/css/accordion.css +1 -1
  276. package/dist/css/affix.css +1 -1
  277. package/dist/css/alert.css +1 -1
  278. package/dist/css/approval-card.css +1 -1
  279. package/dist/css/async-section.css +1 -1
  280. package/dist/css/avatar-group.css +2 -0
  281. package/dist/css/back-to-top.css +1 -1
  282. package/dist/css/breadcrumb.css +1 -1
  283. package/dist/css/button.css +1 -1
  284. package/dist/css/calendar.css +2 -0
  285. package/dist/css/carousel.css +1 -1
  286. package/dist/css/cascader.css +2 -0
  287. package/dist/css/chat-input.css +1 -1
  288. package/dist/css/chat-message.css +1 -1
  289. package/dist/css/checkbox.css +1 -1
  290. package/dist/css/chip.css +1 -1
  291. package/dist/css/code-block.css +1 -1
  292. package/dist/css/color-picker.css +1 -1
  293. package/dist/css/combobox.css +1 -1
  294. package/dist/css/command.css +1 -1
  295. package/dist/css/container.css +1 -1
  296. package/dist/css/context-menu.css +1 -1
  297. package/dist/css/conversation-list.css +1 -1
  298. package/dist/css/data-table.css +2 -0
  299. package/dist/css/date-range-picker.css +1 -1
  300. package/dist/css/datepicker.css +1 -2
  301. package/dist/css/diff-viewer.css +1 -1
  302. package/dist/css/disclosure.css +1 -1
  303. package/dist/css/dropdown-menu.css +1 -1
  304. package/dist/css/file-input.css +1 -1
  305. package/dist/css/hover-card.css +2 -0
  306. package/dist/css/inline-edit.css +1 -1
  307. package/dist/css/input.css +1 -1
  308. package/dist/css/kbd.css +2 -0
  309. package/dist/css/list.css +1 -1
  310. package/dist/css/log-viewer.css +1 -1
  311. package/dist/css/markdown-renderer.css +1 -1
  312. package/dist/css/mentions.css +2 -0
  313. package/dist/css/menu.css +1 -1
  314. package/dist/css/model-picker.css +1 -1
  315. package/dist/css/navigation-bar.css +2 -2
  316. package/dist/css/number-input.css +1 -1
  317. package/dist/css/otp-input.css +1 -1
  318. package/dist/css/pagination.css +1 -1
  319. package/dist/css/password-input.css +1 -1
  320. package/dist/css/progress.css +1 -1
  321. package/dist/css/radio.css +1 -1
  322. package/dist/css/rating.css +1 -1
  323. package/dist/css/resizable.css +1 -1
  324. package/dist/css/segmented.css +1 -1
  325. package/dist/css/select.css +1 -1
  326. package/dist/css/sidebar.css +2 -0
  327. package/dist/css/slider.css +1 -1
  328. package/dist/css/step-timeline.css +1 -1
  329. package/dist/css/stepper.css +1 -1
  330. package/dist/css/streaming-text.css +1 -1
  331. package/dist/css/swipe-action.css +1 -1
  332. package/dist/css/switch.css +1 -1
  333. package/dist/css/table.css +1 -1
  334. package/dist/css/tabs.css +1 -1
  335. package/dist/css/tag-input.css +1 -1
  336. package/dist/css/tag.css +1 -1
  337. package/dist/css/textarea.css +1 -1
  338. package/dist/css/time-picker.css +1 -1
  339. package/dist/css/token-counter.css +1 -1
  340. package/dist/css/tokens.css +1 -1
  341. package/dist/css/toolbar.css +4 -0
  342. package/dist/css/tour.css +2 -0
  343. package/dist/css/tree.css +1 -1
  344. package/dist/css/upload.css +1 -1
  345. package/dist/css/virtual-list.css +1 -1
  346. package/dist/css-manifest.json +29 -1
  347. package/dist/form/FormItem.js +1 -0
  348. package/dist/form/index.js +1 -0
  349. package/dist/haze-ui.css +74 -63
  350. package/dist/hooks/useClipboard.js +30 -0
  351. package/dist/hooks/useDebouncedCallback.js +17 -0
  352. package/dist/hooks/useDebouncedValue.js +12 -0
  353. package/dist/hooks/useMediaQuery.js +13 -0
  354. package/dist/hooks/usePrefersReducedMotion.js +9 -0
  355. package/dist/hooks/useTitle.js +1 -0
  356. package/dist/index.js +139 -115
  357. package/dist/registry.json +247 -0
  358. package/dist/tokens/colors.js +1 -0
  359. package/dist/tokens/index.js +1 -0
  360. package/dist/tokens/motion.js +1 -0
  361. package/dist/tokens/oklch.js +1 -0
  362. package/dist/tokens/palette.js +1 -0
  363. package/dist/tokens/registry.js +1 -0
  364. package/dist/tokens/spacing.js +1 -0
  365. package/dist/tokens/typography.js +1 -0
  366. package/dist/types/components/AvatarGroup/AvatarGroup.d.ts +9 -0
  367. package/dist/types/components/AvatarGroup/index.d.ts +2 -0
  368. package/dist/types/components/Calendar/Calendar.d.ts +21 -0
  369. package/dist/types/components/Calendar/date.d.ts +79 -0
  370. package/dist/types/components/Calendar/index.d.ts +2 -0
  371. package/dist/types/components/Cascader/Cascader.d.ts +26 -0
  372. package/dist/types/components/Cascader/index.d.ts +2 -0
  373. package/dist/types/components/Combobox/Combobox.d.ts +7 -1
  374. package/dist/types/components/Combobox/ComboboxOption.d.ts +13 -1
  375. package/dist/types/components/DataTable/DataTable.d.ts +102 -0
  376. package/dist/types/components/DataTable/index.d.ts +2 -0
  377. package/dist/types/components/Datepicker/Datepicker.d.ts +3 -1
  378. package/dist/types/components/Datepicker/DatepickerCore.d.ts +3 -1
  379. package/dist/types/components/HoverCard/HoverCard.d.ts +49 -0
  380. package/dist/types/components/HoverCard/index.d.ts +2 -0
  381. package/dist/types/components/Kbd/Kbd.d.ts +6 -0
  382. package/dist/types/components/Kbd/index.d.ts +2 -0
  383. package/dist/types/components/LocaleProvider/LocaleContext.d.ts +19 -0
  384. package/dist/types/components/LocaleProvider/LocaleProvider.d.ts +16 -0
  385. package/dist/types/components/LocaleProvider/index.d.ts +7 -0
  386. package/dist/types/components/LocaleProvider/locale.d.ts +182 -0
  387. package/dist/types/components/LocaleProvider/useStrings.d.ts +10 -0
  388. package/dist/types/components/LocaleProvider/zh-cn.d.ts +13 -0
  389. package/dist/types/components/MarkdownRenderer/markdown-blocks.d.ts +6 -0
  390. package/dist/types/components/Mentions/Mentions.d.ts +17 -0
  391. package/dist/types/components/Mentions/MentionsCore.d.ts +21 -0
  392. package/dist/types/components/Mentions/index.d.ts +4 -0
  393. package/dist/types/components/Sidebar/Sidebar.d.ts +64 -0
  394. package/dist/types/components/Sidebar/index.d.ts +4 -0
  395. package/dist/types/components/Toast/index.d.ts +2 -0
  396. package/dist/types/components/Toast/toast.d.ts +46 -0
  397. package/dist/types/components/Toolbar/Toolbar.d.ts +16 -0
  398. package/dist/types/components/Toolbar/ToolbarButton.d.ts +20 -0
  399. package/dist/types/components/Toolbar/ToolbarContext.d.ts +5 -0
  400. package/dist/types/components/Toolbar/ToolbarSeparator.d.ts +14 -0
  401. package/dist/types/components/Toolbar/index.d.ts +6 -0
  402. package/dist/types/components/Tour/Tour.d.ts +46 -0
  403. package/dist/types/components/Tour/index.d.ts +2 -0
  404. package/dist/types/components/VirtualList/VirtualList.d.ts +58 -4
  405. package/dist/types/components/VirtualList/index.d.ts +1 -1
  406. package/dist/types/hooks/index.d.ts +6 -0
  407. package/dist/types/hooks/useClipboard.d.ts +31 -0
  408. package/dist/types/hooks/useDebouncedCallback.d.ts +21 -0
  409. package/dist/types/hooks/useDebouncedValue.d.ts +20 -0
  410. package/dist/types/hooks/useMediaQuery.d.ts +17 -0
  411. package/dist/types/hooks/usePrefersReducedMotion.d.ts +14 -0
  412. package/dist/types/index.d.ts +28 -4
  413. package/dist/utils/classnames.js +1 -0
  414. package/dist/utils/collision.js +1 -0
  415. package/dist/utils/floating.js +1 -0
  416. package/dist/utils/focus-scope.js +1 -0
  417. package/dist/utils/focus.js +1 -0
  418. package/dist/utils/menuKeyboard.js +1 -0
  419. package/dist/utils/presence.js +1 -0
  420. package/package.json +34 -18
  421. package/dist/components/Datepicker/Calendar.js +0 -120
  422. package/dist/types/components/Datepicker/Calendar.d.ts +0 -8
package/README.md CHANGED
@@ -10,10 +10,19 @@ English | [简体中文](./README-zh_CN.md)
10
10
  ## Features
11
11
 
12
12
  - Integrated [react use control](https://github.com/wmzy/react-use-control) provides component internal states
13
+ - Built for React 19+ (`ref` as a prop, `ControlOrValue<T>` state protocol) — no React 18 compatibility layer
13
14
  - Keep strict, provide lightweight, composable, and easily extendable components
14
15
  - Support themes customization
15
16
  - Support Tree-shaking
16
17
 
18
+ ## Why npm-distributed (not copy-paste)
19
+
20
+ **Interaction states are formulas, not values.** Every hover/active/subtle/focus-ring color is a CSS relative-color expression — `oklch(from var(--haze-color-primary) calc(l - 0.045) c h)` — baked into `tokens.css`. Override `--haze-color-primary` on a theme class and the entire interaction-state family re-derives at runtime in the browser, no rebuild, no codegen. In a copy-paste setup every pasted file owns its own copy of that formula, and each theme tweak means re-applying it by hand, file by file.
21
+
22
+ **`haze-ui/css-manifest.json` is machine-readable data.** The authoritative export → CSS-file mapping (family absorption included) is regenerated on every build, so bundler plugins and codemods read one source of truth instead of re-deriving kebab-case file names. A directory of pasted components has no equivalent — the mapping exists only in your head or your fork, and it drifts.
23
+
24
+ **The `ControlOrValue<T>` protocol needs a real runtime.** One prop — `checked?: Control<T> | T` — covers controlled *and* uncontrolled usage because `react-use-control` carries the wiring; a published package is the contract that keeps that behavior identical across every component and version. None of this is hostile to the shadcn / Base UI ecosystem: haze-ui tokens are plain CSS custom properties, so they interoperate with a Tailwind v4 `@theme` block, and haze components compose alongside copy-pasted primitives wherever each fits.
25
+
17
26
  ## Getting Started
18
27
 
19
28
  ### Installation
@@ -24,6 +33,46 @@ npm i haze-ui
24
33
  pnpm add haze-ui
25
34
  ```
26
35
 
36
+ ### React 19+ by design
37
+
38
+ The peer range is `react: ^19.0.0` on purpose — haze-ui is built on
39
+ modern React rather than carrying a compatibility layer for 18:
40
+
41
+ - **`ref` as a prop.** React 19 passes `ref` to function components
42
+ directly, so components that expose refs accept one prop instead of a
43
+ `forwardRef` wrapper layer.
44
+ - **A modern-platform baseline.** Floating panels (Popover, DropdownMenu,
45
+ Tooltip, ContextMenu, Combobox, Datepicker) choose between three tiers
46
+ by feature detection — native `popover` + CSS anchor positioning,
47
+ `popover` alone, or a JS fallback — with the newest platform features
48
+ as the primary path, not an enhancement layered on top.
49
+ - **`ControlOrValue<T>`** — the `Control<T> | T` state protocol — is
50
+ designed for modern React semantics throughout.
51
+
52
+ On React 18? Upgrade first. haze-ui ships no React 18 compatibility
53
+ layer, and none is planned.
54
+
55
+ ### Optional peer dependencies
56
+
57
+ haze-ui's only required runtime dependency is `react-use-control` — the
58
+ engine behind `ControlOrValue<T>`. Two integrations are optional peers,
59
+ installed only when you use the components that need them:
60
+
61
+ ```sh
62
+ npm i react-f0rm # FormItem (peer range ^1.1.1)
63
+ npm i @tanstack/react-table # DataTable (peer range ^9.2.4)
64
+ ```
65
+
66
+ Everything else — `Button`, `Input`, `Dialog`, `Select`, … — runs with
67
+ nothing beyond `react` and `react-use-control`. The dist is ESM with
68
+ `preserveModules` and side-effect-free JS, so bundlers (Next.js, Vite,
69
+ webpack, Turbopack, Rollup) tree-shake the unused re-export chains and
70
+ never resolve peers you haven't installed: `import { Button } from
71
+ 'haze-ui'` works without `react-f0rm`. Only bundler-less consumers
72
+ (bare Node ESM importing the barrel, which links the module graph
73
+ eagerly) must install both peers; the `haze-ui/form` and
74
+ `haze-ui/components/DataTable` subpaths bypass the barrel entirely.
75
+
27
76
  ### Browser support
28
77
 
29
78
  Since v1.13, haze-ui colors are generated in **OKLCH**, with interaction
@@ -75,6 +124,27 @@ included); `noCss` lists pure-logic exports with no css of their own.
75
124
  Bundler plugins and codemods should read this manifest instead of
76
125
  re-deriving file names — the mapping changes in lockstep with the build.
77
126
 
127
+ ### Server Components (Next.js App Router)
128
+
129
+ Every JS module in `dist/` starts with the `'use client'` directive,
130
+ injected at build time — the same convention Radix, Base UI and React
131
+ Aria ship. In an App Router project you import haze-ui straight from
132
+ your client components; there is no need for a wrapper module that
133
+ re-exports the library under its own `'use client'` banner:
134
+
135
+ ```jsx
136
+ // any client component — import straight from the package
137
+ import { Button } from 'haze-ui';
138
+
139
+ export function Actions() {
140
+ return <Button>Start</Button>;
141
+ }
142
+ ```
143
+
144
+ CSS loading is unchanged from the two modes above — `haze-ui/styles.css`
145
+ in the root layout, or the `haze-ui/css/*` subpaths. A runnable Next.js
146
+ 15 project lives in [`examples/nextjs`](./examples/nextjs).
147
+
78
148
  ## ButtonLink: a real anchor with the Button skin
79
149
 
80
150
  Navigation that must look like a button should still *be* a link —
@@ -152,6 +222,53 @@ function SettingsView() {
152
222
  }
153
223
  ```
154
224
 
225
+ ## Design tokens export (Figma)
226
+
227
+ `toDesignTokens()` converts the token registry into a [W3C Design Tokens](https://tr.designtokens.org/) JSON file — grouped by category (`color` / `font` / `spacing` / `dimension` / `shadow`), each token carrying a W3C `$type` and the source CSS variable in `$extensions['haze-ui.css-var']`, with `$value` being the resolved value of the chosen theme (`light` by default). The Theme Editor ships a one-click entry: the **Export W3C tokens (.json)** button in the toolbar downloads the file for the mode currently being edited, live edits included. The exported file can be imported directly into Figma Tokens / Tokens Studio.
228
+
229
+ ```json
230
+ {
231
+ "color": {
232
+ "color-primary": {
233
+ "$value": "oklch(0.563 0.241 260.8)",
234
+ "$type": "color",
235
+ "$extensions": { "haze-ui.css-var": "--haze-color-primary" }
236
+ }
237
+ },
238
+ "spacing": {
239
+ "space-2": {
240
+ "$value": "8px",
241
+ "$type": "dimension",
242
+ "$extensions": { "haze-ui.css-var": "--haze-space-2" }
243
+ }
244
+ }
245
+ }
246
+ ```
247
+
248
+ ## AI-friendly distribution
249
+
250
+ **llms.txt** — a markdown overview of the whole library (the `ControlOrValue<T>`
251
+ state protocol, both CSS loading modes, all 101 components grouped with one-line
252
+ purposes, the token system, the floating-overlay tiers, form integration) written
253
+ for AI coding tools and crawlers. It lives at the repo root
254
+ ([llms.txt](./llms.txt)) and, on the docs site, at
255
+ <https://wmzy.github.io/haze-ui/llms.txt> (`build:demo` copies it into `dist/`).
256
+
257
+ **registry.json** — a shadcn/ui-compatible registry shipped as the
258
+ `haze-ui/registry.json` npm artifact (regenerated by `scripts/generate-registry.mjs`
259
+ on every build), also reachable at <https://unpkg.com/haze-ui/registry.json>.
260
+ Consume it with the shadcn CLI:
261
+
262
+ ```sh
263
+ pnpm dlx shadcn@latest add https://unpkg.com/haze-ui/registry.json
264
+ ```
265
+
266
+ To be precise about coverage: it contains only the **agent components** (the
267
+ AI & Chat group plus AsyncSection). Each item is a wrapper file, not vendored
268
+ source — it re-exports the published component and imports its stylesheet, so
269
+ haze-ui stays an npm dependency that keeps updating underneath; treat the
270
+ generated file as your customization layer.
271
+
155
272
  ## react-f0rm Integration
156
273
 
157
274
  react-f0rm owns form field state, and its headless `useField` hook is
@@ -424,6 +541,95 @@ All three are optional; omit them and the field behaves exactly as
424
541
  before (immediate validation per the form's `mode`, immediate error
425
542
  display, `validate`-only).
426
543
 
544
+ ## Accessibility & RTL
545
+
546
+ Accessibility is a baseline, not an opt-in: every component's test suite
547
+ includes axe checks, and the token sheet ships a global
548
+ `@media (prefers-reduced-motion: reduce)` block that collapses every
549
+ animation duration token to `0ms` — motion-sensitive users get instant
550
+ state changes with no per-component wiring.
551
+
552
+ haze-ui supports RTL via CSS logical properties wherever a side is
553
+ semantic (the *start/end* of reading flow), not just decorative. Set
554
+ `dir="rtl"` (or `direction: rtl`) on an ancestor and those sides mirror
555
+ automatically — no component props change. A regression smoke test
556
+ (`src/lib/rtl.test.tsx`) renders Progress, Alert, Badge, Tag and Dialog
557
+ in a `dir="rtl"` subtree asserting rendering, axe cleanliness and
558
+ unchanged aria contracts.
559
+
560
+ ### Direction-responsive by construction (no physical CSS)
561
+
562
+ - **Progress (bar)** — the fill is a normal-flow block with a percentage
563
+ `width`, so it grows from the inline-start edge (right in RTL) with no
564
+ `left`/`right` in its CSS.
565
+ - **Slider** — a native `<input type="range">`; the browser mirrors fill
566
+ and thumb under `dir="rtl"`.
567
+ - **Flex gap / `flex-direction: row`** — gap and row order follow the
568
+ writing mode, so icon-to-label spacing in Tag, ChatMessage, Alert, etc.
569
+ mirrors for free.
570
+ - **Carousel track scrolling** — uses `scrollIntoView({ inline: 'start' })`,
571
+ a logical scroll position.
572
+
573
+ ### Fixed: physical → logical conversions
574
+
575
+ | File | Change |
576
+ | --- | --- |
577
+ | `Carousel.tsx` | prev/next buttons `left`/`right` → `inset-inline-start`/`inset-inline-end`, plus a `[dir='rtl']` `scale: -1 1` mirror so the `‹`/`›` glyphs point along the reading direction |
578
+ | `ChatMessage.tsx` | bubble tail corners `border-bottom-right-radius` / `border-bottom-left-radius` → `border-end-end-radius` / `border-end-start-radius` (tail follows the bubble's anchored side) |
579
+ | `Chip.tsx` | close-button `margin-left` → `margin-inline-start` |
580
+ | `Container.tsx` | `margin-left/right: auto` → `margin-inline: auto`; `padding-left/right` → `padding-inline` |
581
+ | `ContextMenuItem.tsx`, `DropdownMenuItem.tsx`, `MenuItem.tsx`, `ConversationItem.tsx` | `text-align: left` → `text-align: start` |
582
+ | `DiffViewer.tsx` | line-number gutter `text-align: right` → `end`, `border-right` → `border-inline-end` (gutter stays on the leading side) |
583
+ | `List.tsx` | `padding-left` → `padding-inline-start` (list indent), both variants |
584
+ | `NavigationBar.tsx` | end-slot `margin-left: auto` → `margin-inline-start: auto` |
585
+ | `StepTimeline.tsx` | connector line `left` → `inset-inline-start` (stays under the inline-start marker column) |
586
+ | `Stepper/Step.tsx` | connector `left: 50%` → `inset-inline-start: 50%` (extends toward the next step) |
587
+ | `TableHead.tsx` | `th { text-align: left }` → `start` |
588
+ | `TreeItem.tsx` | checkbox/icon `margin-right` → `margin-inline-end`; indent guide `border-left` → `border-inline-start` |
589
+
590
+ Kept physical on purpose — glyph geometry or symmetric layout, not
591
+ reading-flow sides: the rotated border chevrons in Accordion/Disclosure,
592
+ Checkbox's rotated checkmark, Radio's centered dot, Affix's symmetric
593
+ `left: 0; right: 0` stretch.
594
+
595
+ ### Partial support: known gaps
596
+
597
+ - **Floating panels (Popover, DropdownMenu, Tooltip, ContextMenu,
598
+ Combobox, Datepicker)** — placements are physical sides
599
+ (`'left'`/`'right'`/`'bottom-end'`, …). The CSS anchor-positioning
600
+ `position-area` grid keywords and the JS collision math
601
+ (`utils/collision.ts`, viewport coordinates) are physical; migrating to
602
+ logical `position-area` keywords is a tracked future change. In RTL the
603
+ panels position identically to LTR.
604
+ - **Input adornments** — `SelectCore` / `ModelPicker` chevrons
605
+ (`background-position: right …` + `padding-right`) and
606
+ `PasswordInputCore`'s absolute reveal button sit on the physical right
607
+ with matching padding. Consistent under RTL, but not mirrored.
608
+ - **Progress (circle)** — SVG `stroke-dashoffset` fill runs clockwise
609
+ regardless of direction (SVG has no inline axis).
610
+ - **Physical-by-design placement APIs** — `Drawer` `placement`
611
+ (`'left'`/`'right'`), `Toast` placement (`'top-left'`, …),
612
+ `SwipeAction` left/right action edges, `BackToTop`'s bottom-right
613
+ corner, `CodeBlock`'s top-right language badge: the side is the API,
614
+ so it stays physical.
615
+
616
+ ### Workaround for remaining gaps
617
+
618
+ Wrap with `dir="rtl"` for everything above; for the physical-by-design
619
+ cases, override with logical insets through the `className` every
620
+ component accepts:
621
+
622
+ ```jsx
623
+ <Drawer placement="right" className="rtl-drawer" />
624
+ ```
625
+
626
+ ```css
627
+ [dir='rtl'] .rtl-drawer {
628
+ /* nudge a physical placement back to the reading-flow side */
629
+ inset-inline-end: 0;
630
+ }
631
+ ```
632
+
427
633
  ## Related Projects
428
634
 
429
635
  - [react-use-control](https://github.com/wmzy/react-use-control)
@@ -458,3 +664,34 @@ import 'haze-ui/css/button.css';
458
664
 
459
665
  No — haze-ui is ESM-only (`"type": "module"`). Use a bundler or runtime
460
666
  with ESM support (Vite, webpack 5, Next.js, Node ≥ 18, …).
667
+
668
+ ### Does haze-ui support React 18?
669
+
670
+ No — the peer range is `react@^19.0.0` by design (see
671
+ [React 19+ by design](#react-19-by-design)). Upgrade to React 19 first;
672
+ haze-ui ships no React 18 compatibility layer.
673
+
674
+ ### How do I detect (or degrade) the relative-color syntax?
675
+
676
+ Since v1.13, theme interaction states are derived with CSS relative
677
+ colors, so the browser baseline from [Browser support](#browser-support)
678
+ applies — Chrome/Edge 119+, Safari 16.4+, Firefox 128+, with no HSL/hex
679
+ fallbacks shipped. To gate your own fallback styling on support, probe
680
+ the syntax in CSS:
681
+
682
+ ```css
683
+ @supports (color: oklch(from red calc(l + 0.05) 0 h)) {
684
+ /* relative colors available: derive custom states from tokens */
685
+ }
686
+ ```
687
+
688
+ or from JS before deciding which stylesheet to load:
689
+
690
+ ```js
691
+ if (CSS.supports('color: oklch(from red calc(l + 0.05) 0 h)')) {
692
+ // relative colors available — load the v1.13+ token sheet
693
+ } else {
694
+ // below baseline: pin a pre-OKLCH version or ship your own fallbacks
695
+ }
696
+ ```
697
+
@@ -1,4 +1,5 @@
1
1
 
2
+ "use client";
2
3
  import { classnames as e } from "../../utils/classnames.js";
3
4
  /* empty css */
4
5
  import { jsx as t } from "react/jsx-runtime";
@@ -1,4 +1,5 @@
1
1
 
2
+ "use client";
2
3
  import { classnames as e } from "../../utils/classnames.js";
3
4
  /* empty css */
4
5
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import e from "./Accordion.js";
2
3
  import t from "./AccordionItem.js";
3
4
  export { e as Accordion, t as AccordionItem };
@@ -1,4 +1,5 @@
1
1
 
2
+ "use client";
2
3
  import { classnames as e } from "../../utils/classnames.js";
3
4
  /* empty css */
4
5
  import { jsx as t } from "react/jsx-runtime";
@@ -1,2 +1,3 @@
1
+ "use client";
1
2
  import e from "./Affix.js";
2
3
  export { e as Affix };
@@ -1,37 +1,39 @@
1
1
 
2
+ "use client";
2
3
  import { classnames as e } from "../../utils/classnames.js";
4
+ import { useStrings as t } from "../LocaleProvider/useStrings.js";
3
5
  /* empty css */
4
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
5
- import { useControl as r } from "react-use-control";
6
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
7
+ import { useControl as i } from "react-use-control";
6
8
  //#region src/lib/components/Alert/Alert.tsx
7
- var i = "haze-Alert__base", a = {
9
+ var a = "haze-Alert__base", o = {
8
10
  info: "haze-Alert__info",
9
11
  success: "haze-Alert__success",
10
12
  warning: "haze-Alert__warning",
11
13
  danger: "haze-Alert__danger"
12
- }, o = "haze-Alert__contentStyle", s = "haze-Alert__closeBtn";
13
- function c({ visible: c, onClose: l, variant: u = "info", closable: d = !1, className: f, children: p }) {
14
- let [m, h] = r(c, !0);
15
- return m ? /* @__PURE__ */ n("div", {
14
+ }, s = "haze-Alert__contentStyle", c = "haze-Alert__closeBtn";
15
+ function l({ visible: l, onClose: u, variant: d = "info", closable: f = !1, className: p, children: m }) {
16
+ let [h, g] = i(l, !0), _ = t("alert");
17
+ return h ? /* @__PURE__ */ r("div", {
16
18
  role: "alert",
17
19
  className: e([
18
- i,
19
- a[u],
20
- f
20
+ a,
21
+ o[d],
22
+ p
21
23
  ]),
22
- children: [/* @__PURE__ */ t("div", {
23
- className: o,
24
- children: p
25
- }), d && /* @__PURE__ */ t("button", {
26
- type: "button",
24
+ children: [/* @__PURE__ */ n("div", {
27
25
  className: s,
28
- "aria-label": "Close",
26
+ children: m
27
+ }), f && /* @__PURE__ */ n("button", {
28
+ type: "button",
29
+ className: c,
30
+ "aria-label": _.close,
29
31
  onClick: () => {
30
- h(!1), l?.();
32
+ g(!1), u?.();
31
33
  },
32
34
  children: "×"
33
35
  })]
34
36
  }) : null;
35
37
  }
36
38
  //#endregion
37
- export { c as default };
39
+ export { l as default };
@@ -1,2 +1,3 @@
1
+ "use client";
1
2
  import e from "./Alert.js";
2
3
  export { e as Alert };
@@ -1,43 +1,46 @@
1
1
 
2
+ "use client";
2
3
  import { classnames as e } from "../../utils/classnames.js";
4
+ import { useStrings as t } from "../LocaleProvider/useStrings.js";
3
5
  /* empty css */
4
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
6
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
7
  //#region src/lib/components/ApprovalCard/ApprovalCard.tsx
6
- var r = "haze-ApprovalCard__card", i = "haze-ApprovalCard__header", a = "haze-ApprovalCard__body", o = "haze-ApprovalCard__desc", s = "haze-ApprovalCard__content", c = "haze-ApprovalCard__actions", l = "haze-ApprovalCard__btn", u = "haze-ApprovalCard__denyBtn", d = "haze-ApprovalCard__approveBtn";
7
- function f({ title: f = "Approval Required", description: p, onApprove: m, onDeny: h, approveText: g = "Approve", denyText: _ = "Deny", children: v, className: y }) {
8
- return /* @__PURE__ */ n("div", {
9
- className: e([r, y]),
8
+ var i = "haze-ApprovalCard__card", a = "haze-ApprovalCard__header", o = "haze-ApprovalCard__body", s = "haze-ApprovalCard__desc", c = "haze-ApprovalCard__content", l = "haze-ApprovalCard__actions", u = "haze-ApprovalCard__btn", d = "haze-ApprovalCard__denyBtn", f = "haze-ApprovalCard__approveBtn";
9
+ function p({ title: p, description: m, onApprove: h, onDeny: g, approveText: _, denyText: v, children: y, className: b }) {
10
+ let x = t("approvalCard"), S = p ?? x.title, C = _ ?? x.approve, w = v ?? x.deny;
11
+ return /* @__PURE__ */ r("div", {
12
+ className: e([i, b]),
10
13
  children: [
11
- /* @__PURE__ */ t("div", {
12
- className: e([i]),
13
- children: f
14
- }),
15
14
  /* @__PURE__ */ n("div", {
16
15
  className: e([a]),
17
- children: [p && /* @__PURE__ */ t("div", {
18
- className: e([o]),
19
- children: p
20
- }), v && /* @__PURE__ */ t("div", {
16
+ children: S
17
+ }),
18
+ /* @__PURE__ */ r("div", {
19
+ className: e([o]),
20
+ children: [m && /* @__PURE__ */ n("div", {
21
21
  className: e([s]),
22
- children: v
22
+ children: m
23
+ }), y && /* @__PURE__ */ n("div", {
24
+ className: e([c]),
25
+ children: y
23
26
  })]
24
27
  }),
25
- /* @__PURE__ */ n("div", {
26
- className: e([c]),
27
- children: [/* @__PURE__ */ t("button", {
28
+ /* @__PURE__ */ r("div", {
29
+ className: e([l]),
30
+ children: [/* @__PURE__ */ n("button", {
28
31
  type: "button",
29
- onClick: h,
30
- className: e([l, u]),
31
- children: _
32
- }), /* @__PURE__ */ t("button", {
32
+ onClick: g,
33
+ className: e([u, d]),
34
+ children: w
35
+ }), /* @__PURE__ */ n("button", {
33
36
  type: "button",
34
- onClick: m,
35
- className: e([l, d]),
36
- children: g
37
+ onClick: h,
38
+ className: e([u, f]),
39
+ children: C
37
40
  })]
38
41
  })
39
42
  ]
40
43
  });
41
44
  }
42
45
  //#endregion
43
- export { f as default };
46
+ export { p as default };
@@ -1,2 +1,3 @@
1
+ "use client";
1
2
  import e from "./ApprovalCard.js";
2
3
  export { e as ApprovalCard };
@@ -1,4 +1,5 @@
1
1
 
2
+ "use client";
2
3
  import { classnames as e } from "../../utils/classnames.js";
3
4
  /* empty css */
4
5
  import { jsx as t } from "react/jsx-runtime";
@@ -1,2 +1,3 @@
1
+ "use client";
1
2
  import e from "./AspectRatio.js";
2
3
  export { e as AspectRatio };
@@ -1,62 +1,65 @@
1
1
 
2
+ "use client";
2
3
  import { classnames as e } from "../../utils/classnames.js";
4
+ import { useStrings as t } from "../LocaleProvider/useStrings.js";
3
5
  /* empty css */
4
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
6
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
7
  //#region src/lib/components/AsyncSection/AsyncSection.tsx
6
- var r = "haze-AsyncSection__base", i = "haze-AsyncSection__placeholder", a = "haze-AsyncSection__spin", o = "haze-AsyncSection__errorBox", s = "haze-AsyncSection__errorMessage", c = "haze-AsyncSection__retryButton";
7
- function l({ loading: l = !1, error: u, onRetry: d, loadingText: f = "Loading…", errorText: p, retryText: m = "Retry", className: h, children: g }) {
8
- if (l) return /* @__PURE__ */ t("section", {
8
+ var i = "haze-AsyncSection__base", a = "haze-AsyncSection__placeholder", o = "haze-AsyncSection__spin", s = "haze-AsyncSection__errorBox", c = "haze-AsyncSection__errorMessage", l = "haze-AsyncSection__retryButton";
9
+ function u({ loading: u = !1, error: d, onRetry: f, loadingText: p, errorText: m, retryText: h, className: g, children: _ }) {
10
+ let v = t("asyncSection"), y = p ?? v.loading, b = h ?? v.retry;
11
+ if (u) return /* @__PURE__ */ n("section", {
9
12
  "aria-busy": "true",
10
- className: e([r, h]),
11
- children: n("div", {
13
+ className: e([i, g]),
14
+ children: r("div", {
12
15
  role: "status",
13
- className: e([i]),
14
- children: [/* @__PURE__ */ t("span", {
16
+ className: e([a]),
17
+ children: [/* @__PURE__ */ n("span", {
15
18
  "aria-hidden": "true",
16
- className: e([a]),
17
- children: /* @__PURE__ */ n("svg", {
19
+ className: e([o]),
20
+ children: /* @__PURE__ */ r("svg", {
18
21
  viewBox: "0 0 24 24",
19
22
  fill: "none",
20
23
  xmlns: "http://www.w3.org/2000/svg",
21
- children: [/* @__PURE__ */ t("circle", {
24
+ children: [/* @__PURE__ */ n("circle", {
22
25
  cx: "12",
23
26
  cy: "12",
24
27
  r: "10",
25
28
  stroke: "var(--haze-color-border)",
26
29
  strokeWidth: "3"
27
- }), /* @__PURE__ */ t("path", {
30
+ }), /* @__PURE__ */ n("path", {
28
31
  d: "M12 2a10 10 0 0 1 10 10",
29
32
  stroke: "var(--haze-color-primary)",
30
33
  strokeWidth: "3",
31
34
  strokeLinecap: "round"
32
35
  })]
33
36
  })
34
- }), f]
37
+ }), y]
35
38
  })
36
39
  });
37
- if (u != null) {
38
- let i = p ?? (u instanceof Error && u.message ? u.message : void 0) ?? "Something went wrong";
39
- return /* @__PURE__ */ t("section", {
40
- className: e([r, h]),
41
- children: n("div", {
40
+ if (d != null) {
41
+ let t = m ?? (d instanceof Error && d.message ? d.message : void 0) ?? v.error;
42
+ return /* @__PURE__ */ n("section", {
43
+ className: e([i, g]),
44
+ children: r("div", {
42
45
  role: "alert",
43
- className: e([o]),
44
- children: [/* @__PURE__ */ t("p", {
45
- className: e([s]),
46
- children: i
47
- }), d && /* @__PURE__ */ t("button", {
48
- type: "button",
49
- onClick: d,
46
+ className: e([s]),
47
+ children: [/* @__PURE__ */ n("p", {
50
48
  className: e([c]),
51
- children: m
49
+ children: t
50
+ }), f && /* @__PURE__ */ n("button", {
51
+ type: "button",
52
+ onClick: f,
53
+ className: e([l]),
54
+ children: b
52
55
  })]
53
56
  })
54
57
  });
55
58
  }
56
- return /* @__PURE__ */ t("section", {
57
- className: e([r, h]),
58
- children: g
59
+ return /* @__PURE__ */ n("section", {
60
+ className: e([i, g]),
61
+ children: _
59
62
  });
60
63
  }
61
64
  //#endregion
62
- export { l as default };
65
+ export { u as default };
@@ -1,2 +1,3 @@
1
+ "use client";
1
2
  import e from "./AsyncSection.js";
2
3
  export { e as AsyncSection };
@@ -1,4 +1,5 @@
1
1
 
2
+ "use client";
2
3
  import { classnames as e } from "../../utils/classnames.js";
3
4
  /* empty css */
4
5
  import { jsx as t } from "react/jsx-runtime";
@@ -1,2 +1,3 @@
1
+ "use client";
1
2
  import e from "./Avatar.js";
2
3
  export { e as Avatar };
@@ -0,0 +1,30 @@
1
+
2
+ "use client";
3
+ import { classnames as e } from "../../utils/classnames.js";
4
+ import { formatString as t } from "../LocaleProvider/locale.js";
5
+ import { useStrings as n } from "../LocaleProvider/useStrings.js";
6
+ /* empty css */
7
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
8
+ import { Children as a } from "react";
9
+ //#region src/lib/components/AvatarGroup/AvatarGroup.tsx
10
+ var o = "haze-AvatarGroup__base", s = "haze-AvatarGroup__item", c = "haze-AvatarGroup__itemStacked", l = "haze-AvatarGroup__overflowChip";
11
+ function u({ max: u, total: d, className: f, children: p, ...m }) {
12
+ let h = n("avatarGroup"), g = a.toArray(p), _ = u === void 0 ? g.length : Math.max(u, 0), v = g.length > _, y = v ? g.slice(0, _) : g, b = d ?? g.length - _;
13
+ return /* @__PURE__ */ i("div", {
14
+ ...m,
15
+ className: e([o, f]),
16
+ children: [y.map((t, n) => /* @__PURE__ */ r("span", {
17
+ className: e([s, n > 0 && c]),
18
+ children: t
19
+ }, n)), v && /* @__PURE__ */ r("span", {
20
+ className: e([
21
+ s,
22
+ l,
23
+ y.length > 0 && c
24
+ ]),
25
+ children: t(h.more, { count: b })
26
+ })]
27
+ });
28
+ }
29
+ //#endregion
30
+ export { u as default };
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import e from "./AvatarGroup.js";
3
+ export { e as AvatarGroup };