haze-ui 1.30.0 → 1.32.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 (330) hide show
  1. package/README.md +67 -1
  2. package/dist/components/ActivityRail/ActivityRail.js +76 -0
  3. package/dist/components/ActivityRail/index.js +3 -0
  4. package/dist/components/BottomSheet/BottomSheet.js +12 -26
  5. package/dist/components/Button/Button.js +33 -15
  6. package/dist/components/Button/ButtonLink.js +12 -21
  7. package/dist/components/Button/styles.js +2 -2
  8. package/dist/components/Cascader/Cascader.js +11 -11
  9. package/dist/components/ColorPicker/ColorPicker.js +4 -4
  10. package/dist/components/Combobox/Combobox.js +128 -119
  11. package/dist/components/Command/Command.js +9 -9
  12. package/dist/components/ConfigProvider/ConfigContext.js +16 -0
  13. package/dist/components/ConfirmDialog/confirm.js +41 -0
  14. package/dist/components/ConfirmDialog/index.js +2 -1
  15. package/dist/components/ConversationList/ConversationList.js +16 -7
  16. package/dist/components/DataTable/DataTable.js +24 -24
  17. package/dist/components/DateTimePicker/DateTimePicker.js +25 -0
  18. package/dist/components/DateTimePicker/index.js +3 -0
  19. package/dist/components/Datepicker/Datepicker.js +8 -7
  20. package/dist/components/Datepicker/DatepickerCore.js +60 -59
  21. package/dist/components/Drawer/Drawer.js +45 -40
  22. package/dist/components/Fieldset/Fieldset.js +25 -0
  23. package/dist/components/Fieldset/index.js +2 -0
  24. package/dist/components/Highlight/Highlight.js +19 -0
  25. package/dist/components/Highlight/index.js +2 -0
  26. package/dist/components/Indicator/Indicator.js +37 -0
  27. package/dist/components/Indicator/index.js +2 -0
  28. package/dist/components/InlineCompletion/InlineCompletion.js +4 -4
  29. package/dist/components/Input/Input.js +9 -7
  30. package/dist/components/Input/InputCore.js +32 -13
  31. package/dist/components/List/List.js +14 -10
  32. package/dist/components/LoadingOverlay/LoadingOverlay.js +30 -0
  33. package/dist/components/LoadingOverlay/index.js +3 -0
  34. package/dist/components/LocaleProvider/ar-sa.js +11 -0
  35. package/dist/components/LocaleProvider/de-de.js +11 -0
  36. package/dist/components/LocaleProvider/es-es.js +11 -0
  37. package/dist/components/LocaleProvider/fr-fr.js +11 -0
  38. package/dist/components/LocaleProvider/it-it.js +11 -0
  39. package/dist/components/LocaleProvider/ja-jp.js +11 -0
  40. package/dist/components/LocaleProvider/ko-kr.js +11 -0
  41. package/dist/components/LocaleProvider/locale.js +11 -0
  42. package/dist/components/LocaleProvider/pt-br.js +11 -0
  43. package/dist/components/LocaleProvider/ru-ru.js +11 -0
  44. package/dist/components/LocaleProvider/zh-cn.js +11 -0
  45. package/dist/components/LogViewer/LogViewer.js +45 -38
  46. package/dist/components/Mark/Mark.js +20 -0
  47. package/dist/components/Mark/index.js +2 -0
  48. package/dist/components/Mentions/MentionsCore.js +3 -3
  49. package/dist/components/Menu/MenuItem.js +6 -4
  50. package/dist/components/NumberFormatter/NumberFormatter.js +16 -0
  51. package/dist/components/NumberFormatter/index.js +2 -0
  52. package/dist/components/OTPInput/OTPInputCore.js +7 -6
  53. package/dist/components/PasswordInput/PasswordInputCore.js +27 -26
  54. package/dist/components/Rating/RatingCore.js +18 -18
  55. package/dist/components/Resizable/Resizable.js +266 -36
  56. package/dist/components/Select/Select.js +28 -23
  57. package/dist/components/Select/SelectCore.js +26 -23
  58. package/dist/components/Select/SelectFloating.js +157 -153
  59. package/dist/components/Sparkline/Sparkline.js +45 -0
  60. package/dist/components/Sparkline/index.js +3 -0
  61. package/dist/components/Sparkline/sparkline-styles.js +18 -0
  62. package/dist/components/Spoiler/Spoiler.js +36 -0
  63. package/dist/components/Spoiler/index.js +3 -0
  64. package/dist/components/StatusBar/StatusBar.js +47 -0
  65. package/dist/components/StatusBar/index.js +3 -0
  66. package/dist/components/TabBar/TabBar.js +60 -0
  67. package/dist/components/TabBar/index.js +3 -0
  68. package/dist/components/Tabs/SortableTabList.js +116 -0
  69. package/dist/components/Tabs/Tab.js +83 -16
  70. package/dist/components/Tabs/TabList.js +94 -38
  71. package/dist/components/Tabs/edge-scroll.js +6 -0
  72. package/dist/components/Tabs/index.js +4 -3
  73. package/dist/components/Tabs/tab-metas.js +24 -0
  74. package/dist/components/TagGroup/SortableTagGroup.js +32 -20
  75. package/dist/components/TagGroup/TagGroup.js +23 -9
  76. package/dist/components/TagGroup/TagGroupItem.js +21 -15
  77. package/dist/components/TagInput/SortableTagInputCore.js +11 -11
  78. package/dist/components/TagInput/TagInputCore.js +10 -10
  79. package/dist/components/TimePicker/TimePickerPanel.js +3 -3
  80. package/dist/components/Toast/ToastContainer.js +5 -5
  81. package/dist/components/Toast/index.js +1 -1
  82. package/dist/components/Toast/{toast2.js → toast-channel.js} +1 -1
  83. package/dist/components/Toast/useToast.js +1 -1
  84. package/dist/components/Tree/SortableTree.js +39 -39
  85. package/dist/components/TreeSelect/TreeSelect.js +6 -6
  86. package/dist/components/VirtualList/VirtualList.js +133 -121
  87. package/dist/components/VisuallyHidden/VisuallyHidden.js +15 -0
  88. package/dist/components/VisuallyHidden/index.js +2 -0
  89. package/dist/components/Workbench/Workbench.js +144 -0
  90. package/dist/components/Workbench/index.js +3 -0
  91. package/dist/css/accordion.css +2 -0
  92. package/dist/css/activity-rail.css +4 -0
  93. package/dist/css/affix.css +2 -0
  94. package/dist/css/alert.css +2 -0
  95. package/dist/css/anchor.css +2 -0
  96. package/dist/css/app-shell.css +3 -1
  97. package/dist/css/approval-card.css +2 -0
  98. package/dist/css/aspect-ratio.css +2 -0
  99. package/dist/css/async-section.css +2 -0
  100. package/dist/css/avatar-group.css +2 -0
  101. package/dist/css/avatar.css +2 -0
  102. package/dist/css/back-to-top.css +2 -0
  103. package/dist/css/badge.css +2 -0
  104. package/dist/css/banner.css +2 -0
  105. package/dist/css/bottom-sheet.css +2 -0
  106. package/dist/css/breadcrumb.css +3 -1
  107. package/dist/css/button.css +3 -2
  108. package/dist/css/calendar.css +2 -0
  109. package/dist/css/card.css +2 -0
  110. package/dist/css/carousel.css +2 -0
  111. package/dist/css/cascader.css +2 -0
  112. package/dist/css/chart.css +2 -0
  113. package/dist/css/chat-container.css +2 -0
  114. package/dist/css/chat-input.css +2 -0
  115. package/dist/css/chat-message.css +2 -0
  116. package/dist/css/checkbox.css +3 -1
  117. package/dist/css/chip.css +2 -0
  118. package/dist/css/code-block.css +2 -0
  119. package/dist/css/collapsible.css +2 -0
  120. package/dist/css/color-picker.css +2 -0
  121. package/dist/css/combobox.css +2 -0
  122. package/dist/css/command.css +3 -1
  123. package/dist/css/confirm-dialog.css +2 -0
  124. package/dist/css/container.css +2 -0
  125. package/dist/css/context-menu.css +3 -1
  126. package/dist/css/conversation-list.css +2 -0
  127. package/dist/css/count-up.css +2 -0
  128. package/dist/css/data-table.css +2 -0
  129. package/dist/css/date-range-picker.css +3 -1
  130. package/dist/css/datepicker.css +2 -0
  131. package/dist/css/descriptions.css +2 -0
  132. package/dist/css/dialog.css +2 -0
  133. package/dist/css/diff-viewer.css +2 -0
  134. package/dist/css/disclosure.css +2 -0
  135. package/dist/css/divider.css +2 -0
  136. package/dist/css/drawer.css +3 -1
  137. package/dist/css/dropdown-menu.css +4 -2
  138. package/dist/css/ellipsis.css +2 -0
  139. package/dist/css/empty.css +2 -0
  140. package/dist/css/fieldset.css +4 -0
  141. package/dist/css/file-input.css +2 -0
  142. package/dist/css/file-preview.css +2 -0
  143. package/dist/css/flex.css +2 -0
  144. package/dist/css/float-button.css +2 -0
  145. package/dist/css/form.css +2 -0
  146. package/dist/css/grid.css +2 -0
  147. package/dist/css/hover-card.css +3 -1
  148. package/dist/css/icon.css +2 -0
  149. package/dist/css/image.css +2 -0
  150. package/dist/css/indicator.css +4 -0
  151. package/dist/css/inline-completion.css +2 -0
  152. package/dist/css/inline-edit.css +2 -0
  153. package/dist/css/input.css +3 -1
  154. package/dist/css/json-view.css +2 -0
  155. package/dist/css/kbd.css +2 -0
  156. package/dist/css/list.css +3 -1
  157. package/dist/css/loading-overlay.css +4 -0
  158. package/dist/css/log-viewer.css +2 -0
  159. package/dist/css/mark.css +4 -0
  160. package/dist/css/markdown-renderer.css +2 -0
  161. package/dist/css/masonry.css +2 -0
  162. package/dist/css/mentions.css +2 -0
  163. package/dist/css/menu.css +5 -3
  164. package/dist/css/model-picker.css +2 -0
  165. package/dist/css/navigation-bar.css +2 -0
  166. package/dist/css/number-input.css +2 -0
  167. package/dist/css/otp-input.css +2 -0
  168. package/dist/css/pagination.css +2 -0
  169. package/dist/css/password-input.css +3 -1
  170. package/dist/css/popover.css +3 -1
  171. package/dist/css/progress.css +2 -0
  172. package/dist/css/prompt-input.css +2 -0
  173. package/dist/css/qr-code.css +2 -0
  174. package/dist/css/radio.css +3 -1
  175. package/dist/css/rating.css +2 -0
  176. package/dist/css/resizable.css +3 -1
  177. package/dist/css/result.css +2 -0
  178. package/dist/css/scroll-area.css +2 -0
  179. package/dist/css/segmented.css +3 -1
  180. package/dist/css/select.css +2 -0
  181. package/dist/css/sidebar.css +3 -1
  182. package/dist/css/signature.css +2 -0
  183. package/dist/css/skeleton.css +2 -0
  184. package/dist/css/slider.css +3 -1
  185. package/dist/css/sources.css +2 -0
  186. package/dist/css/sparkline.css +4 -0
  187. package/dist/css/spinner.css +2 -0
  188. package/dist/css/spoiler.css +4 -0
  189. package/dist/css/stat.css +2 -0
  190. package/dist/css/status-bar.css +4 -0
  191. package/dist/css/step-timeline.css +2 -0
  192. package/dist/css/stepper.css +2 -0
  193. package/dist/css/streaming-text.css +2 -0
  194. package/dist/css/swipe-action.css +2 -0
  195. package/dist/css/switch.css +3 -1
  196. package/dist/css/tab-bar.css +4 -0
  197. package/dist/css/table.css +2 -0
  198. package/dist/css/tabs.css +5 -2
  199. package/dist/css/tag-group.css +2 -0
  200. package/dist/css/tag-input.css +2 -0
  201. package/dist/css/tag.css +3 -1
  202. package/dist/css/textarea.css +2 -0
  203. package/dist/css/thinking-indicator.css +2 -0
  204. package/dist/css/time-picker.css +2 -0
  205. package/dist/css/timeline.css +2 -0
  206. package/dist/css/toast.css +2 -0
  207. package/dist/css/toggle.css +2 -0
  208. package/dist/css/token-counter.css +2 -0
  209. package/dist/css/tokens.css +2 -0
  210. package/dist/css/tool-call-card.css +2 -0
  211. package/dist/css/toolbar.css +2 -0
  212. package/dist/css/tooltip.css +2 -0
  213. package/dist/css/tour.css +2 -0
  214. package/dist/css/transfer.css +2 -0
  215. package/dist/css/tree-select.css +2 -0
  216. package/dist/css/tree.css +3 -1
  217. package/dist/css/typography.css +2 -0
  218. package/dist/css/upload.css +2 -0
  219. package/dist/css/virtual-list.css +2 -0
  220. package/dist/css/visually-hidden.css +4 -0
  221. package/dist/css/watermark.css +2 -0
  222. package/dist/css/workbench.css +4 -0
  223. package/dist/css-manifest.json +202 -1
  224. package/dist/dates/adapter.js +9 -1
  225. package/dist/dates/buddhist.js +43 -0
  226. package/dist/dates/ethiopic.js +67 -0
  227. package/dist/dates/hebrew.js +95 -0
  228. package/dist/dates/japanese.js +41 -0
  229. package/dist/dates/persian.js +121 -0
  230. package/dist/dates/registry.js +14 -4
  231. package/dist/haze-ui.css +435 -29
  232. package/dist/headless/index.js +18 -17
  233. package/dist/hooks/useBusyPressable.js +10 -0
  234. package/dist/index.js +263 -241
  235. package/dist/mcp-docs.json +1073 -33
  236. package/dist/registry.json +256 -14
  237. package/dist/types/components/ActivityRail/ActivityRail.d.ts +30 -0
  238. package/dist/types/components/ActivityRail/index.d.ts +4 -0
  239. package/dist/types/components/Button/Button.d.ts +50 -5
  240. package/dist/types/components/Button/ButtonLink.d.ts +27 -15
  241. package/dist/types/components/Button/styles.d.ts +34 -0
  242. package/dist/types/components/Combobox/Combobox.d.ts +20 -2
  243. package/dist/types/components/Combobox/index.d.ts +1 -1
  244. package/dist/types/components/ConfigProvider/ConfigContext.d.ts +20 -0
  245. package/dist/types/components/ConfirmDialog/ConfirmDialog.d.ts +1 -1
  246. package/dist/types/components/ConfirmDialog/confirm.d.ts +33 -0
  247. package/dist/types/components/ConfirmDialog/index.d.ts +2 -0
  248. package/dist/types/components/ConversationList/ConversationList.d.ts +10 -1
  249. package/dist/types/components/DateTimePicker/DateTimePicker.d.ts +36 -0
  250. package/dist/types/components/DateTimePicker/index.d.ts +2 -0
  251. package/dist/types/components/Datepicker/Datepicker.d.ts +3 -3
  252. package/dist/types/components/Datepicker/DatepickerCore.d.ts +3 -3
  253. package/dist/types/components/Drawer/Drawer.d.ts +15 -2
  254. package/dist/types/components/Drawer/index.d.ts +1 -1
  255. package/dist/types/components/Fieldset/Fieldset.d.ts +16 -0
  256. package/dist/types/components/Fieldset/index.d.ts +2 -0
  257. package/dist/types/components/Highlight/Highlight.d.ts +27 -0
  258. package/dist/types/components/Highlight/index.d.ts +2 -0
  259. package/dist/types/components/Indicator/Indicator.d.ts +24 -0
  260. package/dist/types/components/Indicator/index.d.ts +2 -0
  261. package/dist/types/components/Input/Input.d.ts +8 -2
  262. package/dist/types/components/Input/InputCore.d.ts +11 -2
  263. package/dist/types/components/List/List.d.ts +10 -1
  264. package/dist/types/components/LoadingOverlay/LoadingOverlay.d.ts +25 -0
  265. package/dist/types/components/LoadingOverlay/index.d.ts +2 -0
  266. package/dist/types/components/LocaleProvider/locale.d.ts +11 -0
  267. package/dist/types/components/LogViewer/LogViewer.d.ts +10 -1
  268. package/dist/types/components/Mark/Mark.d.ts +12 -0
  269. package/dist/types/components/Mark/index.d.ts +2 -0
  270. package/dist/types/components/Menu/MenuItem.d.ts +15 -4
  271. package/dist/types/components/NumberFormatter/NumberFormatter.d.ts +23 -0
  272. package/dist/types/components/NumberFormatter/index.d.ts +2 -0
  273. package/dist/types/components/Resizable/Resizable.d.ts +24 -7
  274. package/dist/types/components/Resizable/index.d.ts +1 -1
  275. package/dist/types/components/Select/Select.d.ts +23 -2
  276. package/dist/types/components/Select/SelectCore.d.ts +4 -1
  277. package/dist/types/components/Select/SelectFloating.d.ts +6 -1
  278. package/dist/types/components/Select/index.d.ts +1 -1
  279. package/dist/types/components/Sparkline/Sparkline.d.ts +31 -0
  280. package/dist/types/components/Sparkline/index.d.ts +3 -0
  281. package/dist/types/components/Sparkline/sparkline-styles.d.ts +26 -0
  282. package/dist/types/components/Spoiler/Spoiler.d.ts +20 -0
  283. package/dist/types/components/Spoiler/index.d.ts +2 -0
  284. package/dist/types/components/StatusBar/StatusBar.d.ts +18 -0
  285. package/dist/types/components/StatusBar/index.d.ts +3 -0
  286. package/dist/types/components/TabBar/TabBar.d.ts +23 -0
  287. package/dist/types/components/TabBar/index.d.ts +4 -0
  288. package/dist/types/components/Tabs/SortableTabList.d.ts +46 -0
  289. package/dist/types/components/Tabs/Tab.d.ts +54 -3
  290. package/dist/types/components/Tabs/TabList.d.ts +26 -2
  291. package/dist/types/components/Tabs/edge-scroll.d.ts +17 -0
  292. package/dist/types/components/Tabs/index.d.ts +3 -1
  293. package/dist/types/components/Tabs/tab-metas.d.ts +20 -0
  294. package/dist/types/components/TagGroup/SortableTagGroup.d.ts +5 -1
  295. package/dist/types/components/TagGroup/TagGroup.d.ts +24 -2
  296. package/dist/types/components/TagGroup/index.d.ts +1 -1
  297. package/dist/types/components/Toast/index.d.ts +2 -2
  298. package/dist/types/components/Toast/useToast.d.ts +1 -1
  299. package/dist/types/components/VirtualList/VirtualList.d.ts +20 -1
  300. package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts +4 -0
  301. package/dist/types/components/VisuallyHidden/index.d.ts +2 -0
  302. package/dist/types/components/Workbench/Workbench.d.ts +50 -0
  303. package/dist/types/components/Workbench/index.d.ts +2 -0
  304. package/dist/types/dates/adapter.d.ts +33 -6
  305. package/dist/types/dates/buddhist.d.ts +14 -0
  306. package/dist/types/dates/ethiopic.d.ts +15 -0
  307. package/dist/types/dates/hebrew.d.ts +19 -0
  308. package/dist/types/dates/index.d.ts +5 -0
  309. package/dist/types/dates/japanese.d.ts +16 -0
  310. package/dist/types/dates/persian.d.ts +18 -0
  311. package/dist/types/dates/registry.d.ts +1 -1
  312. package/dist/types/headless/index.d.ts +9 -0
  313. package/dist/types/hooks/index.d.ts +13 -0
  314. package/dist/types/hooks/useBusyPressable.d.ts +33 -0
  315. package/dist/types/hooks/useElementSize.d.ts +38 -0
  316. package/dist/types/hooks/useIdle.d.ts +45 -0
  317. package/dist/types/hooks/useMutationObserver.d.ts +35 -0
  318. package/dist/types/hooks/useNetwork.d.ts +31 -0
  319. package/dist/types/hooks/useOrientation.d.ts +23 -0
  320. package/dist/types/hooks/useResizeObserver.d.ts +48 -0
  321. package/dist/types/index.d.ts +37 -9
  322. package/dist/types/utils/sortable.d.ts +8 -1
  323. package/dist/types/utils/use-end-reached.d.ts +56 -0
  324. package/dist/types/utils/viewport.d.ts +12 -0
  325. package/dist/utils/sortable-shared.js +3 -3
  326. package/dist/utils/sortable.js +15 -14
  327. package/dist/utils/use-end-reached.js +46 -0
  328. package/dist/utils/viewport.js +20 -0
  329. package/package.json +13 -5
  330. /package/dist/types/components/Toast/{toast.d.ts → toast-channel.d.ts} +0 -0
@@ -8,7 +8,16 @@ type LogEntry = {
8
8
  type LogViewerProps = {
9
9
  logs: LogEntry[];
10
10
  filter?: ControlOrValue<LogLevel | null>;
11
+ /**
12
+ * Infinite-scroll trigger on the log body's scrollport: fired when the
13
+ * scroll position comes within 200px of the end. Entering the zone
14
+ * fires once; staying inside does not re-fire; scrolling back out
15
+ * re-arms, and growth of the rendered (filtered) entries re-arms too,
16
+ * so a still-short list chains straight into the next page. Typical
17
+ * use: append the next page of `logs`. Ignored when not provided.
18
+ */
19
+ onLoadMore?: () => void;
11
20
  className?: string;
12
21
  };
13
- export default function LogViewer({ logs, filter: filterControl, className }: LogViewerProps): import("react").JSX.Element;
22
+ export default function LogViewer({ logs, filter: filterControl, onLoadMore, className }: LogViewerProps): import("react").JSX.Element;
14
23
  export type { LogViewerProps, LogEntry, LogLevel };
@@ -0,0 +1,12 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ type MarkProps = {
3
+ /** Highlight tone — maps to the semantic status tokens. */
4
+ color?: 'warning' | 'primary' | 'success' | 'danger';
5
+ } & Omit<ComponentPropsWithoutRef<'mark'>, 'color'>;
6
+ /**
7
+ * Text-level highlight — the semantic `<mark>` skinned with the status
8
+ * tokens. For search-result highlighting of arbitrary substrings use
9
+ * Highlight, which composes this element.
10
+ */
11
+ export default function Mark({ color, className, ...rest }: MarkProps): import("react").JSX.Element;
12
+ export type { MarkProps };
@@ -0,0 +1,2 @@
1
+ export { default as Mark } from './Mark';
2
+ export type { MarkProps } from './Mark';
@@ -1,5 +1,5 @@
1
- import type { ReactNode } from 'react';
2
- type MenuItemProps = {
1
+ import type { ComponentPropsWithRef, ElementType, ReactNode } from 'react';
2
+ type MenuItemOwnProps = {
3
3
  onSelect?: () => void;
4
4
  disabled?: boolean;
5
5
  /** Danger skin for destructive actions: danger-colored text and interaction states. */
@@ -11,5 +11,16 @@ type MenuItemProps = {
11
11
  className?: string;
12
12
  children: ReactNode;
13
13
  };
14
- export default function MenuItem({ onSelect, disabled, danger, icon, kbdLabel, className, children, }: MenuItemProps): import("react").JSX.Element;
15
- export type { MenuItemProps };
14
+ /**
15
+ * Polymorphic like Button's `as`: the item skin and the menuitem wiring
16
+ * (role, roving tabIndex, disabled/aria handling) always land on the
17
+ * rendered element; the target's own props flow through. `as='a'`
18
+ * renders a navigation menuitem with link semantics (href).
19
+ */
20
+ type MenuItemProps<T extends ElementType = 'button'> = MenuItemOwnProps & {
21
+ /** Render element — 'button' (default) or 'a' (or a router Link
22
+ * component forwarding props to an anchor). */
23
+ as?: T;
24
+ } & Omit<ComponentPropsWithRef<T>, keyof MenuItemOwnProps | 'as'>;
25
+ export default function MenuItem<T extends ElementType = 'button'>({ onSelect, disabled, danger, icon, kbdLabel, className, children, as, ...rest }: MenuItemProps<T>): import("react").JSX.Element;
26
+ export type { MenuItemOwnProps, MenuItemProps };
@@ -0,0 +1,23 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ type NumberFormatterProps = {
3
+ /** The numeric value to render. */
4
+ value: number;
5
+ /** Intl.NumberFormat options minus locale. */
6
+ formatOptions?: Intl.NumberFormatOptions;
7
+ /** Explicit locale. Defaults to the runtime default (SSR-stable).
8
+ *
9
+ * Note: this formatter is RSC-safe (no hooks) and therefore does NOT
10
+ * read the LocaleProvider chain — pass `locale` explicitly inside a
11
+ * localized tree. */
12
+ locale?: string;
13
+ /** Text prepended/appended outside the formatted number. */
14
+ prefix?: string;
15
+ suffix?: string;
16
+ } & Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'prefix'>;
17
+ /**
18
+ * Presentational number formatting — a thin, token-free numeric text
19
+ * node driven by Intl. Stat's display value is the styled display
20
+ * surface; this is the formatter for inline text ("共 12,345 条").
21
+ */
22
+ export default function NumberFormatter({ value, formatOptions, locale, prefix, suffix, ...rest }: NumberFormatterProps): import("react").JSX.Element;
23
+ export type { NumberFormatterProps };
@@ -0,0 +1,2 @@
1
+ export { default as NumberFormatter } from './NumberFormatter';
2
+ export type { NumberFormatterProps } from './NumberFormatter';
@@ -1,18 +1,35 @@
1
- import type { ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, CSSProperties, ReactNode } from 'react';
2
+ import type { ControlOrValue } from 'react-use-control';
2
3
  type ResizableGroupProps = {
3
4
  direction?: 'horizontal' | 'vertical';
4
5
  children: ReactNode;
5
6
  className?: string;
7
+ style?: CSSProperties;
8
+ /** Fired when a drag or keyboard resize ends: the effective px size of
9
+ * every explicitly sized panel, keyed by panel id — a shape ready to
10
+ * persist. Collapsed panels report 0. */
11
+ onResizeCommit?: (sizes: Record<string, number>) => void;
6
12
  };
7
- export declare function ResizableGroup({ direction, children, className, }: ResizableGroupProps): import("react").JSX.Element;
13
+ export declare function ResizableGroup({ direction, children, className, style, onResizeCommit, }: ResizableGroupProps): import("react").JSX.Element;
8
14
  type ResizablePanelProps = {
15
+ /** Stable identity within the group — the key `onResizeCommit` reports. */
16
+ id: string;
17
+ /** Initial/fallback px size. Omit to make the panel flexible (it grows
18
+ * into the space the fixed panels leave). */
9
19
  defaultSize?: number;
20
+ /** px pins honored by both pointer drags and keyboard steps. */
21
+ minSize?: number;
22
+ maxSize?: number;
23
+ /** Opt-in to the collapse feature; without it `collapsed` is inert. */
24
+ collapsible?: boolean;
25
+ collapsed?: ControlOrValue<boolean>;
26
+ onCollapsedChange?: (collapsed: boolean) => void;
10
27
  children: ReactNode;
11
28
  className?: string;
12
- };
13
- export declare function ResizablePanel({ defaultSize, children, className, }: ResizablePanelProps): import("react").JSX.Element;
29
+ } & Omit<ComponentPropsWithoutRef<'div'>, 'id'>;
30
+ export declare function ResizablePanel({ id, defaultSize, minSize, maxSize, collapsible, collapsed: collapsedControl, onCollapsedChange, children, className, style, ...rest }: ResizablePanelProps): import("react").JSX.Element;
14
31
  type ResizableHandleProps = {
15
32
  className?: string;
16
- };
17
- export declare function ResizableHandle({ className }: ResizableHandleProps): import("react").JSX.Element;
18
- export type { ResizableGroupProps, ResizablePanelProps, ResizableHandleProps };
33
+ } & Omit<ComponentPropsWithoutRef<'div'>, 'className'>;
34
+ export declare function ResizableHandle({ className, ...rest }: ResizableHandleProps): import("react").JSX.Element;
35
+ export type { ResizableGroupProps, ResizablePanelProps, ResizableHandleProps, };
@@ -1,4 +1,4 @@
1
1
  export { ResizableGroup, ResizablePanel, ResizableHandle } from './Resizable';
2
- export type { ResizableGroupProps, ResizablePanelProps, ResizableHandleProps } from './Resizable';
2
+ export type { ResizableGroupProps, ResizablePanelProps, ResizableHandleProps, } from './Resizable';
3
3
  export { ResizableGroup as SplitterGroup, ResizablePanel as SplitterPanel, ResizableHandle as SplitterHandle, } from './Resizable';
4
4
  export type { ResizableGroupProps as SplitterGroupProps, ResizablePanelProps as SplitterPanelProps, ResizableHandleProps as SplitterHandleProps, } from './Resizable';
@@ -1,6 +1,24 @@
1
1
  import type { ComponentPropsWithoutRef, ReactNode, Ref } from 'react';
2
2
  import type { ControlOrValue } from 'react-use-control';
3
3
  import type { SelectVirtualizedConfig } from './SelectFloating';
4
+ /**
5
+ * Semantic slot classes (AntD v6 `classNames` shape), following the
6
+ * data-slot names: `trigger` is the focusable control (native `<select>`
7
+ * in plain mode, trigger `<button>` in floating modes); `content` is the
8
+ * floating panel; `option`, `clearButton`, `item`, `searchInput` cover
9
+ * the rest. Slots not rendered by the current mode are ignored. A
10
+ * ConfigProvider `Select.classNames` section merges under the prop.
11
+ */
12
+ type SelectClassNames = {
13
+ trigger?: string;
14
+ content?: string;
15
+ option?: string;
16
+ clearButton?: string;
17
+ /** Selected-value chip in multiple mode (data-slot='item'). */
18
+ item?: string;
19
+ /** Panel-top filter input in searchable mode (data-slot='input'). */
20
+ searchInput?: string;
21
+ };
4
22
  type SelectProps = {
5
23
  /** `string` in single mode, `string[]` when `multiple` is set. */
6
24
  value?: ControlOrValue<string | string[]>;
@@ -70,6 +88,9 @@ type SelectProps = {
70
88
  */
71
89
  placeholder?: string;
72
90
  size?: 'sm' | 'md' | 'lg';
91
+ /** Slot classes (see {@link SelectClassNames}); merged over any
92
+ * ConfigProvider `Select.classNames` section, per key. */
93
+ classNames?: SelectClassNames;
73
94
  /**
74
95
  * Forwarded to the focusable element — the native `<select>` in plain
75
96
  * and clearable single mode, the trigger `<button>` when `multiple`
@@ -79,5 +100,5 @@ type SelectProps = {
79
100
  ref?: Ref<HTMLSelectElement | HTMLButtonElement>;
80
101
  children: ReactNode;
81
102
  } & Omit<ComponentPropsWithoutRef<'select'>, 'value' | 'size' | 'multiple'>;
82
- export default function Select({ value: valueControl, multiple, searchable, clearable, loading, onSearch, maxTagCount, virtualized, size, className, children, onChange, onValuesChange, placeholder, ref, ...rest }: SelectProps): import("react").JSX.Element;
83
- export type { SelectProps };
103
+ export default function Select({ value: valueControl, multiple, searchable, clearable, loading, onSearch, maxTagCount, virtualized, size, className, classNames, children, onChange, onValuesChange, placeholder, ref, ...rest }: SelectProps): import("react").JSX.Element;
104
+ export type { SelectClassNames, SelectProps };
@@ -1,5 +1,6 @@
1
1
  import type { ComponentPropsWithoutRef, ReactNode, Ref } from 'react';
2
2
  import type { SelectVirtualizedConfig } from './SelectFloating';
3
+ import type { SelectClassNames } from './Select';
3
4
  type SelectCoreProps = {
4
5
  /** `string` in single mode, `string[]` when `multiple` is set. */
5
6
  value: string | string[];
@@ -75,6 +76,8 @@ type SelectCoreProps = {
75
76
  virtualized?: boolean | SelectVirtualizedConfig;
76
77
  children: ReactNode;
77
78
  className?: string;
79
+ /** Slot classes (see SelectProps.classNames in ./Select). */
80
+ classNames?: SelectClassNames;
78
81
  /**
79
82
  * Forwarded to the focusable element — the native `<select>` in plain
80
83
  * and clearable single mode, the trigger `<button>` when `multiple`
@@ -82,5 +85,5 @@ type SelectCoreProps = {
82
85
  */
83
86
  ref?: Ref<HTMLSelectElement | HTMLButtonElement>;
84
87
  } & Omit<ComponentPropsWithoutRef<'select'>, 'value' | 'onChange' | 'size' | 'multiple'>;
85
- export default function SelectCore({ value, onChange, onNativeChange, multiple, searchable, clearable, loading, onSearch, maxTagCount, size, virtualized, className, placeholder, children, ref, ...rest }: SelectCoreProps): import("react").JSX.Element;
88
+ export default function SelectCore({ value, onChange, onNativeChange, multiple, searchable, clearable, loading, onSearch, maxTagCount, size, virtualized, className, classNames, placeholder, children, ref, ...rest }: SelectCoreProps): import("react").JSX.Element;
86
89
  export type { SelectCoreProps };
@@ -1,4 +1,5 @@
1
1
  import type { ComponentPropsWithoutRef, Ref } from 'react';
2
+ import type { SelectClassNames } from './Select';
2
3
  import type { SelectEntryData } from './select-options';
3
4
  /** Metrics override for the `virtualized` option list of the floating
4
5
  * Select paths (multiple, or single with `searchable`). */
@@ -37,6 +38,10 @@ type SelectFloatingProps = {
37
38
  /** Falls back to the `select.placeholder` locale string. */
38
39
  placeholder?: string;
39
40
  size?: 'sm' | 'md' | 'lg';
41
+ /** Slot classes, following data-slot names (see SelectProps.classNames
42
+ * in ./Select; the Select wrapper merges its ConfigProvider section
43
+ * under this prop already). */
44
+ classNames?: SelectClassNames;
40
45
  /**
41
46
  * Render a search input at the top of the panel that filters the
42
47
  * options (case-insensitive substring over the label text). Typing
@@ -90,5 +95,5 @@ type SelectFloatingProps = {
90
95
  /** Forwarded to the trigger `<button>` element. */
91
96
  ref?: Ref<HTMLButtonElement>;
92
97
  } & Omit<ComponentPropsWithoutRef<'button'>, 'value' | 'onChange' | 'size' | 'type' | 'children'>;
93
- export default function SelectFloating({ value, onChange, entries, multiple, placeholder, searchable, clearable, loading, onSearch, maxTagCount, size, virtualized, className, ref, ...rest }: SelectFloatingProps): import("react").JSX.Element;
98
+ export default function SelectFloating({ value, onChange, entries, multiple, placeholder, searchable, clearable, loading, onSearch, maxTagCount, size, virtualized, className, classNames, ref, ...rest }: SelectFloatingProps): import("react").JSX.Element;
94
99
  export type { SelectFloatingProps, SelectVirtualizedConfig };
@@ -1,5 +1,5 @@
1
1
  export { default as Select } from './Select';
2
- export type { SelectProps } from './Select';
2
+ export type { SelectClassNames, SelectProps } from './Select';
3
3
  export { default as SelectCore } from './SelectCore';
4
4
  export type { SelectCoreProps } from './SelectCore';
5
5
  export { default as Option } from './Option';
@@ -0,0 +1,31 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ /**
3
+ * Sparkline — a stateless inline-SVG mini trend chart (no recharts, no
4
+ * hooks, RSC-safe). Point coordinates are normalized into a square
5
+ * `0 0 100 100` viewBox stretched by `preserveAspectRatio="none"`, so
6
+ * `width`/`height` size the rendered box freely without touching geometry;
7
+ * `vector-effect="non-scaling-stroke"` keeps the 2px stroke crisp under
8
+ * that non-uniform stretch.
9
+ *
10
+ * Accessibility contract: a sparkline is decorative by default — it
11
+ * renders `aria-hidden="true"` and no role. Naming it (`aria-label` or
12
+ * `aria-labelledby`) switches it to `role="img"` carrying that name (a
13
+ * name makes the image addressable; no name keeps it out of the tree
14
+ * entirely, which axe requires of every meaningful image). Every other
15
+ * native `<svg>` attribute is forwarded via `...rest`.
16
+ */
17
+ type SparklineProps = {
18
+ /** Y values to plot, in series order; at least two points draw a path. */
19
+ data: readonly number[];
20
+ /** Rendered box width in px (geometry stays viewBox-normalized). */
21
+ width?: number;
22
+ /** Rendered box height in px. */
23
+ height?: number;
24
+ /** `area` adds a translucent token fill under the line. */
25
+ variant?: 'line' | 'area';
26
+ /** Semantic stroke color for the trend. */
27
+ tone?: 'primary' | 'success' | 'danger' | 'warning' | 'info';
28
+ className?: string;
29
+ } & Omit<ComponentPropsWithoutRef<'svg'>, 'children'>;
30
+ export default function Sparkline({ data, width, height, variant, tone, className, ...rest }: SparklineProps): import("react").JSX.Element;
31
+ export type { SparklineProps };
@@ -0,0 +1,3 @@
1
+ export { default as Sparkline } from './Sparkline';
2
+ export type { SparklineProps } from './Sparkline';
3
+ export { toneStrokes as sparklineToneStrokes, toneFills as sparklineToneFills } from './sparkline-styles';
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Shared Sparkline skin — the base class plus tone→stroke / tone→fill
3
+ * variant maps the `Sparkline` component wears. Living in their own module
4
+ * keeps the component file free of style internals (react-refresh
5
+ * boundary) and lets the maps ship as public constants
6
+ * (`sparklineToneStrokes` / `sparklineToneFills`) for consumers composing
7
+ * custom SVG elements with the same skin; split-css groups the emitted
8
+ * CSS into `haze-ui/css/sparkline.css` with them.
9
+ */
10
+ export declare const base: import("@linaria/core").LinariaClassName;
11
+ /** Stroke color per tone; worn by the line path. */
12
+ export declare const toneStrokes: {
13
+ readonly primary: import("@linaria/core").LinariaClassName;
14
+ readonly success: import("@linaria/core").LinariaClassName;
15
+ readonly danger: import("@linaria/core").LinariaClassName;
16
+ readonly warning: import("@linaria/core").LinariaClassName;
17
+ readonly info: import("@linaria/core").LinariaClassName;
18
+ };
19
+ /** Translucent area fill per tone; worn by the fill path of the `area` variant. */
20
+ export declare const toneFills: {
21
+ readonly primary: import("@linaria/core").LinariaClassName;
22
+ readonly success: import("@linaria/core").LinariaClassName;
23
+ readonly danger: import("@linaria/core").LinariaClassName;
24
+ readonly warning: import("@linaria/core").LinariaClassName;
25
+ readonly info: import("@linaria/core").LinariaClassName;
26
+ };
@@ -0,0 +1,20 @@
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import type { ControlOrValue } from 'react-use-control';
3
+ /**
4
+ * Collapsed-long-content gate ("show more / less"). The content box is
5
+ * height-capped while collapsed with a fade at the cut edge; the toggle
6
+ * button flips the state. Controllable via ControlOrValue<boolean>.
7
+ */
8
+ type SpoilerProps = {
9
+ /** Collapsed/expanded state — see useControl (initial boolean). */
10
+ expanded?: ControlOrValue<boolean>;
11
+ /** Max height in px of the collapsed content preview. */
12
+ maxHeight?: number;
13
+ /** Toggle copy override (defaults to the spoiler locale strings). */
14
+ showLabel?: string;
15
+ hideLabel?: string;
16
+ children: ReactNode;
17
+ className?: string;
18
+ } & Omit<ComponentPropsWithoutRef<'div'>, 'children'>;
19
+ export default function Spoiler({ expanded: expandedControl, maxHeight, showLabel, hideLabel, className, children, ...rest }: SpoilerProps): import("react").JSX.Element;
20
+ export type { SpoilerProps };
@@ -0,0 +1,2 @@
1
+ export { default as Spoiler } from './Spoiler';
2
+ export type { SpoilerProps } from './Spoiler';
@@ -0,0 +1,18 @@
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ type StatusBarProps = {
3
+ /** Items pinned to the leading edge of the bar. */
4
+ left?: ReactNode;
5
+ /** Items pinned to the trailing edge of the bar. */
6
+ right?: ReactNode;
7
+ } & Omit<ComponentPropsWithoutRef<'footer'>, 'children'>;
8
+ type StatusItemProps = {
9
+ children: ReactNode;
10
+ /** Keeps the item visible below the mobile breakpoint where lesser items fold away. */
11
+ priority?: boolean;
12
+ /** Presence upgrades the item to a real button; called on activation (click, Enter, Space). */
13
+ onSelect?: () => void;
14
+ } & Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'onSelect'>;
15
+ export default function StatusBar({ left, right, className, ...rest }: StatusBarProps): import("react").JSX.Element;
16
+ declare function StatusItem({ priority, onSelect, className, children, ...rest }: StatusItemProps): import("react").JSX.Element;
17
+ export { StatusItem };
18
+ export type { StatusBarProps, StatusItemProps };
@@ -0,0 +1,3 @@
1
+ export { default as StatusBar } from './StatusBar';
2
+ export { StatusItem } from './StatusBar';
3
+ export type { StatusBarProps, StatusItemProps } from './StatusBar';
@@ -0,0 +1,23 @@
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ type TabBarProps = {
3
+ /** TabBarItem list; one row, evenly distributed (scrolls when crowded). */
4
+ children: ReactNode;
5
+ } & Omit<ComponentPropsWithoutRef<'nav'>, 'children'>;
6
+ export default function TabBar({ children, className, ...rest }: TabBarProps): import("react").JSX.Element;
7
+ type TabBarItemProps = {
8
+ /** Icon content; rendered inside a fixed-size, aria-hidden slot. */
9
+ icon: ReactNode;
10
+ /** Visible caption under the icon; also the item's accessible name. */
11
+ label: string;
12
+ /** Notification count/dot rendered as a small Badge on the icon corner. */
13
+ badge?: ReactNode;
14
+ /** Marks the item as the current view (aria-current="true"). */
15
+ active?: boolean;
16
+ /** Called when a non-active item is activated (click or Enter/Space). */
17
+ onSelect?: () => void;
18
+ /** Called when the already-active item is activated again — the
19
+ * "reselect pops back to root" affordance. onSelect is not re-fired. */
20
+ onReselect?: () => void;
21
+ } & Omit<ComponentPropsWithoutRef<'button'>, 'type' | 'children' | 'onSelect'>;
22
+ export declare function TabBarItem({ icon, label, badge, active, onSelect, onReselect, className, onClick, ...rest }: TabBarItemProps): import("react").JSX.Element;
23
+ export type { TabBarProps, TabBarItemProps };
@@ -0,0 +1,4 @@
1
+ export { default as TabBar } from './TabBar';
2
+ export type { TabBarProps } from './TabBar';
3
+ export { TabBarItem } from './TabBar';
4
+ export type { TabBarItemProps } from './TabBar';
@@ -0,0 +1,46 @@
1
+ import type { ReactNode } from 'react';
2
+ /**
3
+ * Drag-and-drop reorderable variant of the Tabs strip — built on the
4
+ * @dnd-kit dependency (the plain TabList never touches it). It is a
5
+ * drop-in `<TabList>` replacement inside `<Tabs>`: the strip keeps the
6
+ * WAI-ARIA tabs model (roving tabindex, arrow-key selection, Home/End)
7
+ * and every `<Tab>` affordance (closable ×, icon, status dot) renders
8
+ * exactly as before.
9
+ *
10
+ * Keyboard sorting follows the shared sensor seam (`Space` lifts the
11
+ * focused tab, arrows walk, `Space` drops, `Escape` cancels) — while
12
+ * inside the sortable strip `Space`/`Enter` lift a drag instead of
13
+ * activating the tab (selection already follows the arrows per the
14
+ * tabs pattern, so nothing is lost). A drag never changes which tab is
15
+ * active: the selection is captured at lift and restored at drop, so
16
+ * reordering cannot move the selection with an index.
17
+ *
18
+ * While a tab is airborne, holding the pointer within
19
+ * `AUTO_SCROLL_EDGE` of either strip end auto-scrolls the hidden
20
+ * viewport — the Chrome-tabs gesture for reaching tabs that
21
+ * compressed past their floor. dnd-kit's own autoScroll is
22
+ * bypassed in favor of this explicit loop: the strip's flex
23
+ * compression reflows item rects mid-drag, which the rect-based
24
+ * detector tracks poorly. The loop arms for pointer drags only —
25
+ * a keyboard lift never feeds the pointer-position ref, so letting
26
+ * it run would scroll the strip under a stale clientX.
27
+ *
28
+ * The sortable wrappers sit between the tablist and its `<Tab>`
29
+ * children, which the plain TabList's menu collector cannot see
30
+ * through — the metas are collected over the unwrapped children
31
+ * here instead and handed down (`tabMetas`), keeping the ⋯
32
+ * overflow menu working unchanged.
33
+ */
34
+ type SortableTabListProps = {
35
+ children: ReactNode;
36
+ className?: string;
37
+ /**
38
+ * Receives `nextOrder` — the new sequence of original child indices —
39
+ * after a completed drag. Reorder the `<Tab>` children you pass
40
+ * accordingly; without a handler a drop only animates back to the
41
+ * source position.
42
+ */
43
+ onReorder?: (nextOrder: number[]) => void;
44
+ };
45
+ export default function SortableTabList({ className, onReorder, children, }: SortableTabListProps): import("react").JSX.Element;
46
+ export type { SortableTabListProps };
@@ -1,8 +1,59 @@
1
- import type { ReactNode } from 'react';
1
+ import type { KeyboardEvent as ReactKeyboardEvent, MouseEvent as ReactMouseEvent, ReactNode } from 'react';
2
+ /** Document-tab status flavors — each maps to a dot color (see `TabStatusDot`). */
3
+ type TabStatus = 'dirty' | 'error' | 'syncing';
2
4
  type TabProps = {
3
5
  value: string;
6
+ /**
7
+ * Inline-start icon slot, decorative (`aria-hidden`) — pair it with a
8
+ * text label so the meaning survives screen readers.
9
+ */
10
+ icon?: ReactNode;
11
+ /**
12
+ * Document-tab status indicator: a small dot after the label —
13
+ * `dirty` renders neutral (text-secondary), `error` danger,
14
+ * `syncing` primary. The dot itself is color-only decoration; the
15
+ * SR-visible status word appended to the tab's accessible name comes
16
+ * from `statusLabel` (or its per-status default).
17
+ */
18
+ status?: TabStatus;
19
+ /**
20
+ * Overrides the status word appended to the accessible name when
21
+ * `status` is set — the i18n hook for SR users (the dot alone cannot
22
+ * carry meaning). Defaults come from the `tabs` locale pack
23
+ * (Unsaved changes / Error / Syncing).
24
+ */
25
+ statusLabel?: ReactNode;
26
+ /**
27
+ * Renders the × close affordance. Purely notifying: activating it
28
+ * calls `onClose` and nothing else — removing the tab from the
29
+ * (controlled) tabs array and picking the next active tab are the
30
+ * consumer's job. If the active tab is closed and the consumer does
31
+ * not remove it, the selection stays put on the still-rendered tab.
32
+ *
33
+ * Keyboard: the × is a real button, but not a tab stop — the strip
34
+ * keeps its single roving stop per the tabs pattern, and closing by
35
+ * keyboard rides the Delete key on the focused tab (APG deletable
36
+ * tabs).
37
+ */
38
+ closable?: boolean;
39
+ /** Overrides the × button's aria-label (i18n hook). */
40
+ closeLabel?: string;
41
+ /**
42
+ * Called when the user requests a close — × click, or Delete on the
43
+ * focused tab. The × click is stopped before it can reach the strip,
44
+ * so closing never selects the tab.
45
+ */
46
+ onClose?: (event: ReactMouseEvent<HTMLSpanElement> | ReactKeyboardEvent<HTMLDivElement>) => void;
4
47
  className?: string;
5
48
  children: ReactNode;
6
49
  };
7
- export default function Tab({ value, className, children }: TabProps): import("react").JSX.Element;
8
- export type { TabProps };
50
+ /**
51
+ * The decorative status dot shared by `Tab` and the TabList overflow
52
+ * menu. Color-only by design (`aria-hidden`) — the SR-visible meaning
53
+ * rides the tab's accessible name via `statusLabel`.
54
+ */
55
+ export declare function TabStatusDot({ status }: {
56
+ status: TabStatus;
57
+ }): import("react").JSX.Element;
58
+ export default function Tab({ value, icon, status, statusLabel, closable, closeLabel, onClose, className, children, }: TabProps): import("react").JSX.Element;
59
+ export type { TabProps, TabStatus };
@@ -1,7 +1,22 @@
1
- import type { ReactNode } from 'react';
1
+ import type { RefObject, ReactNode } from 'react';
2
+ import type { TabMeta } from './tab-metas';
2
3
  type TabListProps = {
3
4
  className?: string;
5
+ /** External handle on the strip's scroll viewport. SortableTabList
6
+ * passes its own ref so the drag clamp can measure the exact
7
+ * element the wrappers report as offsetParent. */
8
+ listRef?: RefObject<HTMLDivElement | null>;
9
+ /** Overrides the ⋯ overflow trigger's aria-label (i18n hook). */
10
+ overflowLabel?: string;
4
11
  children: ReactNode;
12
+ /**
13
+ * Pre-collected tab metadata for the overflow menu — the
14
+ * SortableTabList passes its own collection because its
15
+ * `<Tab>` children sit inside sortable wrappers the
16
+ * internal collector cannot see through. Omit to collect
17
+ * from `children` (the plain-strip path).
18
+ */
19
+ tabMetas?: TabMeta[];
5
20
  };
6
21
  /**
7
22
  * The tab strip: a roving-tabindex list per the WAI-ARIA tabs pattern —
@@ -9,6 +24,15 @@ type TabListProps = {
9
24
  * (selection follows focus), Home/End jump to the ends. Under
10
25
  * `dir="rtl"` the horizontal arrows mirror (← advances), read from the
11
26
  * DOM at event time so the keys follow the mirrored strip.
27
+ *
28
+ * Document-tab overflow: the strip itself stays `overflow-x: auto`
29
+ * (scrolling is the baseline, and the only gesture on touch), while a
30
+ * `⋯` menu button appears beside it once the tabs no longer fit. The
31
+ * menu lists every tab — name, icon and status dot — as a radio group
32
+ * bound to the active value, so any tab stays selectable even when
33
+ * scrolled out of view. Overflow is measured from `scrollWidth` vs
34
+ * `clientWidth` through a ResizeObserver (jsdom has neither layout nor
35
+ * the observer; there the strip simply renders menu-less).
12
36
  */
13
- export default function TabList({ className, children }: TabListProps): import("react").JSX.Element;
37
+ export default function TabList({ className, listRef: listRefProp, overflowLabel, children, tabMetas, }: TabListProps): import("react").JSX.Element;
14
38
  export type { TabListProps };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Edge auto-scroll math for SortableTabList — sibling module per
3
+ * the react-refresh only-export-components rule (Button/styles.ts,
4
+ * Grid/grid-item-styles.ts precedents). Pure so tests can
5
+ * exercise the gesture without layout. Not part of the barrel.
6
+ */
7
+ /** Distance from either strip end that arms the auto-scroll, and
8
+ * the steady scroll pace applied per animation frame. */
9
+ export declare const AUTO_SCROLL_EDGE = 48;
10
+ export declare const AUTO_SCROLL_STEP = 10;
11
+ /** Per-frame auto-scroll delta for a pointer hovering the strip's
12
+ * ends: positive scrolls toward the right end, negative toward the
13
+ * left, zero mid-strip. The edge zones are inclusive. */
14
+ export declare function edgeScrollDelta(stripRect: {
15
+ left: number;
16
+ right: number;
17
+ }, pointerX: number): number;
@@ -4,6 +4,8 @@ export type { TabsClassNames } from './TabsContext';
4
4
  export { default as TabList } from './TabList';
5
5
  export type { TabListProps } from './TabList';
6
6
  export { default as Tab } from './Tab';
7
- export type { TabProps } from './Tab';
7
+ export type { TabProps, TabStatus } from './Tab';
8
8
  export { default as TabPanel } from './TabPanel';
9
9
  export type { TabPanelProps } from './TabPanel';
10
+ export { default as SortableTabList } from './SortableTabList';
11
+ export type { SortableTabListProps } from './SortableTabList';
@@ -0,0 +1,20 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { TabStatus } from './Tab';
3
+ export type TabMeta = {
4
+ value: string;
5
+ label: ReactNode;
6
+ icon?: ReactNode;
7
+ status?: TabStatus;
8
+ };
9
+ /**
10
+ * `<Tab>` children in DOM order for the overflow menu: arrays and
11
+ * Fragments flatten. Anything else between the tabs is left alone —
12
+ * it stays reachable through the strip's scroll, it just is not
13
+ * listed in the menu. Exported so SortableTabList — whose `<Tab>`
14
+ * children sit inside sortable wrappers this collector cannot see
15
+ * through — can gather the same metas itself and hand them over.
16
+ *
17
+ * Lives in a sibling file (not TabList.tsx) so the component file
18
+ * keeps a components-only export surface for react-refresh.
19
+ */
20
+ export declare function collectTabMetas(children: ReactNode): TabMeta[];
@@ -1,4 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
+ import { type TagGroupClassNames } from './TagGroup';
2
3
  /**
3
4
  * Drag-and-drop reorderable variant of TagGroup — built on @dnd-kit
4
5
  * (a haze-ui dependency), so this module statically imports the dnd
@@ -10,6 +11,9 @@ import type { ReactNode } from 'react';
10
11
  type SortableTagGroupProps = {
11
12
  children: ReactNode;
12
13
  className?: string;
14
+ /** Slot classes — same contract as TagGroup's `classNames`; item-level
15
+ * keys are inherited by the TagGroupItem children. */
16
+ classNames?: TagGroupClassNames;
13
17
  /**
14
18
  * Receives `nextOrder` — the new sequence of original child indices —
15
19
  * after a completed drag. Reorder the children you pass accordingly;
@@ -17,5 +21,5 @@ type SortableTagGroupProps = {
17
21
  */
18
22
  onReorder?: (nextOrder: number[]) => void;
19
23
  };
20
- export default function SortableTagGroup({ children, className, onReorder, }: SortableTagGroupProps): import("react").JSX.Element;
24
+ export default function SortableTagGroup({ children, className, classNames, onReorder, }: SortableTagGroupProps): import("react").JSX.Element;
21
25
  export type { SortableTagGroupProps };