haze-ui 1.29.0 → 1.31.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 (451) hide show
  1. package/README.md +93 -1
  2. package/cli/theme.mjs +446 -0
  3. package/dist/components/Accordion/Accordion.js +1 -0
  4. package/dist/components/Accordion/AccordionItem.js +3 -0
  5. package/dist/components/ActivityRail/ActivityRail.js +76 -0
  6. package/dist/components/ActivityRail/index.js +3 -0
  7. package/dist/components/Affix/Affix.js +1 -0
  8. package/dist/components/Alert/Alert.js +3 -0
  9. package/dist/components/Anchor/Anchor.js +21 -15
  10. package/dist/components/AppShell/AppShell.js +5 -0
  11. package/dist/components/ApprovalCard/ApprovalCard.js +8 -0
  12. package/dist/components/AspectRatio/AspectRatio.js +2 -0
  13. package/dist/components/AsyncSection/AsyncSection.js +8 -0
  14. package/dist/components/Avatar/Avatar.js +11 -6
  15. package/dist/components/AvatarGroup/AvatarGroup.js +9 -6
  16. package/dist/components/BackToTop/BackToTop.js +5 -4
  17. package/dist/components/Badge/Badge.js +1 -0
  18. package/dist/components/Banner/Banner.js +3 -0
  19. package/dist/components/BottomSheet/BottomSheet.js +22 -31
  20. package/dist/components/Breadcrumb/Breadcrumb.js +11 -7
  21. package/dist/components/Breadcrumb/BreadcrumbItem.js +2 -0
  22. package/dist/components/Button/Button.js +13 -11
  23. package/dist/components/Button/ButtonLink.js +15 -13
  24. package/dist/components/Calendar/Calendar.js +523 -368
  25. package/dist/components/Calendar/date.js +35 -10
  26. package/dist/components/Card/Card.js +1 -0
  27. package/dist/components/Carousel/Carousel.js +157 -60
  28. package/dist/components/Carousel/CarouselSlide.js +3 -1
  29. package/dist/components/Cascader/Cascader.js +48 -35
  30. package/dist/components/Chart/Chart.js +5 -4
  31. package/dist/components/Chart/chart-elements.js +14 -10
  32. package/dist/components/ChatContainer/ChatContainer.js +9 -7
  33. package/dist/components/ChatInput/ChatInput.js +12 -9
  34. package/dist/components/ChatMessage/ChatMessage.js +83 -44
  35. package/dist/components/Checkbox/CheckboxCore.js +2 -0
  36. package/dist/components/Chip/Chip.js +3 -0
  37. package/dist/components/CodeBlock/CodeBlock.js +18 -9
  38. package/dist/components/Collapsible/Collapsible.js +24 -21
  39. package/dist/components/ColorPicker/ColorPicker.js +85 -14
  40. package/dist/components/ColorPicker/ColorPickerCore.js +6 -0
  41. package/dist/components/ColorPicker/ColorPickerPanel.js +277 -0
  42. package/dist/components/ColorPicker/color-math.js +168 -0
  43. package/dist/components/ColorPicker/color-picker-styles.js +7 -0
  44. package/dist/components/ColorPicker/index.js +3 -3
  45. package/dist/components/Combobox/Combobox.js +31 -24
  46. package/dist/components/Combobox/ComboboxGroup.js +7 -5
  47. package/dist/components/Combobox/ComboboxOption.js +1 -0
  48. package/dist/components/Command/Command.js +44 -37
  49. package/dist/components/Command/CommandDialog.js +8 -8
  50. package/dist/components/ConfigProvider/ConfigContext.js +30 -0
  51. package/dist/components/ConfigProvider/ConfigProvider.js +14 -0
  52. package/dist/components/ConfigProvider/index.js +4 -0
  53. package/dist/components/ConfigProvider/useConfigDefaults.js +10 -0
  54. package/dist/components/ConfirmDialog/ConfirmDialog.js +18 -11
  55. package/dist/components/Container/Container.js +1 -0
  56. package/dist/components/ContextMenu/ContextMenu.js +7 -6
  57. package/dist/components/ContextMenu/ContextMenuContent.js +4 -4
  58. package/dist/components/ContextMenu/ContextMenuItem.js +1 -0
  59. package/dist/components/ContextMenu/ContextMenuSeparator.js +1 -0
  60. package/dist/components/ContextMenu/ContextMenuTrigger.js +1 -0
  61. package/dist/components/ConversationList/ConversationItem.js +4 -0
  62. package/dist/components/ConversationList/ConversationList.js +17 -7
  63. package/dist/components/CountUp/CountUp.js +6 -5
  64. package/dist/components/DataTable/CellEditor.js +4 -4
  65. package/dist/components/DataTable/DataTable.js +236 -168
  66. package/dist/components/DateRangePicker/DateRangePickerCore.js +9 -0
  67. package/dist/components/Datepicker/Datepicker.js +14 -11
  68. package/dist/components/Datepicker/DatepickerCore.js +75 -60
  69. package/dist/components/Datepicker/datetime.js +14 -3
  70. package/dist/components/Descriptions/Descriptions.js +6 -0
  71. package/dist/components/Dialog/Dialog.js +13 -11
  72. package/dist/components/DiffViewer/DiffViewer.js +22 -13
  73. package/dist/components/Disclosure/Disclosure.js +10 -7
  74. package/dist/components/Divider/Divider.js +2 -0
  75. package/dist/components/Drawer/Drawer.js +10 -9
  76. package/dist/components/DropdownMenu/DropdownMenu.js +58 -35
  77. package/dist/components/DropdownMenu/DropdownMenuCheckboxItem.js +63 -0
  78. package/dist/components/DropdownMenu/DropdownMenuContent.js +5 -5
  79. package/dist/components/DropdownMenu/DropdownMenuGroup.js +26 -0
  80. package/dist/components/DropdownMenu/DropdownMenuItem.js +29 -10
  81. package/dist/components/DropdownMenu/DropdownMenuRadioGroup.js +30 -0
  82. package/dist/components/DropdownMenu/DropdownMenuRadioItem.js +59 -0
  83. package/dist/components/DropdownMenu/DropdownMenuSeparator.js +1 -0
  84. package/dist/components/DropdownMenu/DropdownMenuSub.js +1 -0
  85. package/dist/components/DropdownMenu/DropdownMenuSubTrigger.js +1 -0
  86. package/dist/components/DropdownMenu/DropdownMenuTrigger.js +1 -0
  87. package/dist/components/DropdownMenu/dropdown-menu-item-styles.js +7 -0
  88. package/dist/components/DropdownMenu/index.js +12 -8
  89. package/dist/components/Ellipsis/Ellipsis.js +11 -8
  90. package/dist/components/Empty/Empty.js +4 -0
  91. package/dist/components/FileInput/FileInput.js +7 -5
  92. package/dist/components/FilePreview/FilePreview.js +19 -1
  93. package/dist/components/Flex/Flex.js +1 -0
  94. package/dist/components/FloatButton/FloatButton.js +4 -0
  95. package/dist/components/FloatButton/FloatButtonGroup.js +18 -13
  96. package/dist/components/Fullscreen/Fullscreen.js +6 -3
  97. package/dist/components/Grid/Grid.js +12 -7
  98. package/dist/components/Grid/GridItem.js +17 -7
  99. package/dist/components/Grid/grid-item-styles.js +58 -0
  100. package/dist/components/HoverCard/HoverCard.js +46 -43
  101. package/dist/components/Icon/Icon.js +1 -0
  102. package/dist/components/Image/Image.js +10 -7
  103. package/dist/components/Image/ImagePreview.js +42 -34
  104. package/dist/components/InlineCompletion/InlineCompletion.js +15 -11
  105. package/dist/components/InlineEdit/InlineEdit.js +8 -6
  106. package/dist/components/Input/InputCore.js +1 -0
  107. package/dist/components/JsonView/JsonView.js +104 -79
  108. package/dist/components/Kbd/Kbd.js +1 -0
  109. package/dist/components/List/List.js +15 -10
  110. package/dist/components/List/ListItem.js +1 -0
  111. package/dist/components/LocaleProvider/LocaleProvider.js +4 -4
  112. package/dist/components/LocaleProvider/ar-sa.js +31 -2
  113. package/dist/components/LocaleProvider/de-de.js +31 -2
  114. package/dist/components/LocaleProvider/es-es.js +31 -2
  115. package/dist/components/LocaleProvider/fr-fr.js +31 -2
  116. package/dist/components/LocaleProvider/it-it.js +31 -2
  117. package/dist/components/LocaleProvider/ja-jp.js +31 -2
  118. package/dist/components/LocaleProvider/ko-kr.js +31 -2
  119. package/dist/components/LocaleProvider/locale.js +31 -2
  120. package/dist/components/LocaleProvider/pt-br.js +31 -2
  121. package/dist/components/LocaleProvider/ru-ru.js +31 -2
  122. package/dist/components/LocaleProvider/zh-cn.js +31 -2
  123. package/dist/components/LogViewer/LogViewer.js +56 -38
  124. package/dist/components/MarkdownRenderer/MarkdownRenderer.js +6 -5
  125. package/dist/components/MarkdownRenderer/markdown-blocks.js +1 -1
  126. package/dist/components/Masonry/Masonry.js +13 -10
  127. package/dist/components/Mentions/MentionsCore.js +15 -11
  128. package/dist/components/Menu/Menu.js +58 -36
  129. package/dist/components/Menu/MenuCheckboxItem.js +63 -0
  130. package/dist/components/Menu/MenuDivider.js +1 -0
  131. package/dist/components/Menu/MenuGroup.js +26 -0
  132. package/dist/components/Menu/MenuItem.js +28 -9
  133. package/dist/components/Menu/MenuRadioGroup.js +30 -0
  134. package/dist/components/Menu/MenuRadioItem.js +59 -0
  135. package/dist/components/Menu/MenuSub.js +1 -0
  136. package/dist/components/Menu/MenuSubTrigger.js +1 -0
  137. package/dist/components/Menu/index.js +11 -7
  138. package/dist/components/Menu/menu-item-styles.js +7 -0
  139. package/dist/components/ModelPicker/ModelPicker.js +3 -0
  140. package/dist/components/NavigationBar/NavLink.js +7 -6
  141. package/dist/components/NavigationBar/NavigationBar.js +4 -0
  142. package/dist/components/NumberInput/NumberInputCore.js +4 -0
  143. package/dist/components/OTPInput/OTPInputCore.js +10 -7
  144. package/dist/components/Pagination/Pagination.js +125 -33
  145. package/dist/components/PasswordInput/PasswordInputCore.js +9 -6
  146. package/dist/components/Popover/Popover.js +9 -7
  147. package/dist/components/Progress/Progress.js +5 -0
  148. package/dist/components/PromptInput/PromptInput.js +49 -41
  149. package/dist/components/QRCode/QRCode.js +9 -7
  150. package/dist/components/Radio/Radio.js +2 -0
  151. package/dist/components/Radio/RadioGroupCore.js +7 -6
  152. package/dist/components/Rating/RatingCore.js +18 -15
  153. package/dist/components/Resizable/Resizable.js +269 -36
  154. package/dist/components/Result/Result.js +5 -0
  155. package/dist/components/ScrollArea/ScrollArea.js +1 -0
  156. package/dist/components/Segmented/SegmentedCore.js +9 -7
  157. package/dist/components/Select/Option.js +1 -0
  158. package/dist/components/Select/OptionGroup.js +1 -0
  159. package/dist/components/Select/SelectCore.js +11 -8
  160. package/dist/components/Select/SelectFloating.js +54 -36
  161. package/dist/components/Sidebar/Sidebar.js +52 -42
  162. package/dist/components/Signature/Signature.js +101 -91
  163. package/dist/components/Skeleton/Skeleton.js +1 -0
  164. package/dist/components/Slider/SliderCore.js +149 -43
  165. package/dist/components/Sources/Sources.js +31 -21
  166. package/dist/components/Sparkline/Sparkline.js +45 -0
  167. package/dist/components/Sparkline/index.js +3 -0
  168. package/dist/components/Sparkline/sparkline-styles.js +18 -0
  169. package/dist/components/Spinner/Spinner.js +1 -0
  170. package/dist/components/Stat/Stat.js +7 -0
  171. package/dist/components/StatusBar/StatusBar.js +47 -0
  172. package/dist/components/StatusBar/index.js +3 -0
  173. package/dist/components/StepTimeline/StepTimeline.js +6 -0
  174. package/dist/components/Stepper/Step.js +8 -1
  175. package/dist/components/Stepper/Stepper.js +7 -6
  176. package/dist/components/StreamingText/StreamingText.js +62 -29
  177. package/dist/components/SwipeAction/SwipeAction.js +11 -9
  178. package/dist/components/Switch/SwitchCore.js +9 -5
  179. package/dist/components/TabBar/TabBar.js +60 -0
  180. package/dist/components/TabBar/index.js +3 -0
  181. package/dist/components/Table/Table.js +2 -0
  182. package/dist/components/Table/TableBody.js +1 -0
  183. package/dist/components/Table/TableCell.js +1 -0
  184. package/dist/components/Table/TableHead.js +1 -0
  185. package/dist/components/Table/TableRow.js +1 -0
  186. package/dist/components/Tabs/SortableTabList.js +116 -0
  187. package/dist/components/Tabs/Tab.js +84 -16
  188. package/dist/components/Tabs/TabList.js +94 -37
  189. package/dist/components/Tabs/TabPanel.js +1 -0
  190. package/dist/components/Tabs/Tabs.js +1 -0
  191. package/dist/components/Tabs/edge-scroll.js +6 -0
  192. package/dist/components/Tabs/index.js +4 -3
  193. package/dist/components/Tabs/tab-metas.js +24 -0
  194. package/dist/components/Tag/Tag.js +2 -0
  195. package/dist/components/TagGroup/SortableTagGroup.js +7 -6
  196. package/dist/components/TagGroup/TagGroup.js +1 -0
  197. package/dist/components/TagGroup/TagGroupItem.js +3 -0
  198. package/dist/components/TagInput/SortableTagInputCore.js +16 -13
  199. package/dist/components/TagInput/TagInputCore.js +17 -12
  200. package/dist/components/Textarea/TextareaCore.js +1 -0
  201. package/dist/components/ThinkingIndicator/ThinkingIndicator.js +18 -4
  202. package/dist/components/TimePicker/TimePicker.js +30 -14
  203. package/dist/components/TimePicker/TimePickerCore.js +1 -0
  204. package/dist/components/TimePicker/TimePickerPanel.js +260 -0
  205. package/dist/components/TimePicker/time-picker-styles.js +7 -0
  206. package/dist/components/TimePicker/time.js +51 -0
  207. package/dist/components/Timeline/Timeline.js +14 -1
  208. package/dist/components/Toast/Toast.js +94 -48
  209. package/dist/components/Toast/ToastContainer.js +60 -56
  210. package/dist/components/Toast/ToastContext.js +3 -1
  211. package/dist/components/Toast/index.js +1 -1
  212. package/dist/components/Toast/{toast2.js → toast-channel.js} +21 -15
  213. package/dist/components/Toast/useToast.js +36 -11
  214. package/dist/components/Toggle/ToggleCore.js +1 -0
  215. package/dist/components/TokenCounter/TokenCounter.js +8 -1
  216. package/dist/components/ToolCallCard/ToolCallCard.js +18 -2
  217. package/dist/components/Toolbar/Toolbar.js +9 -8
  218. package/dist/components/Toolbar/ToolbarButton.js +1 -0
  219. package/dist/components/Toolbar/ToolbarSeparator.js +1 -0
  220. package/dist/components/Toolbar/ToolbarToggle.js +1 -0
  221. package/dist/components/Tooltip/Tooltip.js +46 -42
  222. package/dist/components/Tour/Tour.js +76 -65
  223. package/dist/components/Transfer/TransferCore.js +31 -17
  224. package/dist/components/Tree/SortableTree.js +151 -0
  225. package/dist/components/Tree/Tree.js +163 -154
  226. package/dist/components/Tree/TreeItem.js +52 -39
  227. package/dist/components/Tree/index.js +2 -1
  228. package/dist/components/Tree/sortable-tree-styles.js +7 -0
  229. package/dist/components/Tree/sortable-tree-utils.js +36 -0
  230. package/dist/components/TreeSelect/TreeSelect.js +44 -34
  231. package/dist/components/Typography/Typography.js +3 -0
  232. package/dist/components/Upload/Upload.js +12 -11
  233. package/dist/components/Upload/UploadCore.js +92 -65
  234. package/dist/components/Upload/UploadList.js +177 -105
  235. package/dist/components/VirtualList/VirtualList.js +239 -122
  236. package/dist/components/Watermark/Watermark.js +8 -6
  237. package/dist/components/Workbench/Workbench.js +144 -0
  238. package/dist/components/Workbench/index.js +3 -0
  239. package/dist/css/accordion.css +1 -1
  240. package/dist/css/activity-rail.css +2 -0
  241. package/dist/css/alert.css +1 -1
  242. package/dist/css/app-shell.css +1 -1
  243. package/dist/css/async-section.css +1 -1
  244. package/dist/css/banner.css +1 -1
  245. package/dist/css/bottom-sheet.css +1 -1
  246. package/dist/css/breadcrumb.css +1 -1
  247. package/dist/css/button.css +2 -2
  248. package/dist/css/calendar.css +1 -1
  249. package/dist/css/carousel.css +1 -1
  250. package/dist/css/chat-message.css +1 -1
  251. package/dist/css/checkbox.css +1 -1
  252. package/dist/css/color-picker.css +2 -0
  253. package/dist/css/combobox.css +2 -2
  254. package/dist/css/command.css +1 -1
  255. package/dist/css/context-menu.css +1 -1
  256. package/dist/css/date-range-picker.css +1 -1
  257. package/dist/css/dialog.css +1 -1
  258. package/dist/css/drawer.css +1 -1
  259. package/dist/css/dropdown-menu.css +7 -2
  260. package/dist/css/form.css +1 -1
  261. package/dist/css/grid.css +2 -1
  262. package/dist/css/hover-card.css +1 -1
  263. package/dist/css/input.css +1 -1
  264. package/dist/css/list.css +1 -1
  265. package/dist/css/menu.css +9 -4
  266. package/dist/css/pagination.css +1 -1
  267. package/dist/css/popover.css +1 -1
  268. package/dist/css/progress.css +1 -1
  269. package/dist/css/radio.css +1 -1
  270. package/dist/css/rating.css +1 -1
  271. package/dist/css/resizable.css +1 -1
  272. package/dist/css/segmented.css +1 -1
  273. package/dist/css/sidebar.css +1 -1
  274. package/dist/css/skeleton.css +1 -1
  275. package/dist/css/slider.css +1 -1
  276. package/dist/css/sparkline.css +2 -0
  277. package/dist/css/spinner.css +1 -1
  278. package/dist/css/status-bar.css +2 -0
  279. package/dist/css/stepper.css +1 -1
  280. package/dist/css/streaming-text.css +1 -1
  281. package/dist/css/switch.css +1 -1
  282. package/dist/css/tab-bar.css +2 -0
  283. package/dist/css/tabs.css +3 -2
  284. package/dist/css/tag.css +1 -1
  285. package/dist/css/textarea.css +1 -1
  286. package/dist/css/thinking-indicator.css +1 -1
  287. package/dist/css/time-picker.css +1 -0
  288. package/dist/css/toast.css +1 -1
  289. package/dist/css/toggle.css +1 -1
  290. package/dist/css/tokens.css +1 -1
  291. package/dist/css/tooltip.css +1 -1
  292. package/dist/css/tree.css +2 -1
  293. package/dist/css/upload.css +1 -1
  294. package/dist/css/virtual-list.css +1 -1
  295. package/dist/css/workbench.css +2 -0
  296. package/dist/css-manifest.json +38 -0
  297. package/dist/dates/adapter.js +21 -0
  298. package/dist/dates/buddhist.js +43 -0
  299. package/dist/dates/ethiopic.js +67 -0
  300. package/dist/dates/gregory.js +44 -0
  301. package/dist/dates/hebrew.js +95 -0
  302. package/dist/dates/islamic.js +87 -0
  303. package/dist/dates/japanese.js +41 -0
  304. package/dist/dates/persian.js +121 -0
  305. package/dist/dates/registry.js +23 -0
  306. package/dist/dates/timezone.js +29 -0
  307. package/dist/design-tokens/cyan-dark.json +355 -0
  308. package/dist/design-tokens/cyan-light.json +355 -0
  309. package/dist/design-tokens/orange-dark.json +355 -0
  310. package/dist/design-tokens/orange-light.json +355 -0
  311. package/dist/design-tokens/rose-dark.json +355 -0
  312. package/dist/design-tokens/rose-light.json +355 -0
  313. package/dist/design-tokens/teal-dark.json +355 -0
  314. package/dist/design-tokens/teal-light.json +355 -0
  315. package/dist/design-tokens/violet-dark.json +355 -0
  316. package/dist/design-tokens/violet-light.json +355 -0
  317. package/dist/form/FormItem.js +71 -63
  318. package/dist/form/FormList.js +6 -6
  319. package/dist/form/form-item-styles.js +7 -0
  320. package/dist/haze-ui.css +78 -57
  321. package/dist/index.js +261 -232
  322. package/dist/mcp-docs.json +1587 -113
  323. package/dist/registry.json +132 -22
  324. package/dist/tokens/index.js +7 -7
  325. package/dist/tokens/motion.js +9 -2
  326. package/dist/tokens/palette.js +244 -84
  327. package/dist/tokens/registry.js +18 -22
  328. package/dist/types/components/ActivityRail/ActivityRail.d.ts +30 -0
  329. package/dist/types/components/ActivityRail/index.d.ts +4 -0
  330. package/dist/types/components/Button/Button.d.ts +1 -1
  331. package/dist/types/components/Calendar/Calendar.d.ts +39 -14
  332. package/dist/types/components/Calendar/date.d.ts +51 -0
  333. package/dist/types/components/Calendar/index.d.ts +1 -1
  334. package/dist/types/components/Carousel/Carousel.d.ts +5 -1
  335. package/dist/types/components/Carousel/CarouselSlide.d.ts +3 -3
  336. package/dist/types/components/Chart/Chart.d.ts +13 -6
  337. package/dist/types/components/Chart/chart-elements.d.ts +27 -6
  338. package/dist/types/components/ChatMessage/ChatMessage.d.ts +10 -1
  339. package/dist/types/components/ColorPicker/ColorPicker.d.ts +44 -5
  340. package/dist/types/components/ColorPicker/ColorPickerPanel.d.ts +28 -0
  341. package/dist/types/components/ColorPicker/color-math.d.ts +63 -0
  342. package/dist/types/components/ColorPicker/color-picker-styles.d.ts +50 -0
  343. package/dist/types/components/ConfigProvider/ConfigContext.d.ts +67 -0
  344. package/dist/types/components/ConfigProvider/ConfigProvider.d.ts +25 -0
  345. package/dist/types/components/ConfigProvider/index.d.ts +4 -0
  346. package/dist/types/components/ConfigProvider/useConfigDefaults.d.ts +28 -0
  347. package/dist/types/components/ConversationList/ConversationList.d.ts +10 -1
  348. package/dist/types/components/Datepicker/Datepicker.d.ts +23 -10
  349. package/dist/types/components/Datepicker/DatepickerCore.d.ts +40 -10
  350. package/dist/types/components/Datepicker/datetime.d.ts +33 -11
  351. package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +12 -2
  352. package/dist/types/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +26 -0
  353. package/dist/types/components/DropdownMenu/DropdownMenuGroup.d.ts +16 -0
  354. package/dist/types/components/DropdownMenu/DropdownMenuItem.d.ts +7 -1
  355. package/dist/types/components/DropdownMenu/DropdownMenuRadioGroup.d.ts +21 -0
  356. package/dist/types/components/DropdownMenu/DropdownMenuRadioItem.d.ts +22 -0
  357. package/dist/types/components/DropdownMenu/dropdown-menu-item-styles.d.ts +29 -0
  358. package/dist/types/components/DropdownMenu/index.d.ts +9 -1
  359. package/dist/types/components/Fullscreen/Fullscreen.d.ts +1 -0
  360. package/dist/types/components/Grid/Grid.d.ts +8 -1
  361. package/dist/types/components/Grid/GridItem.d.ts +24 -1
  362. package/dist/types/components/Grid/grid-item-styles.d.ts +57 -0
  363. package/dist/types/components/HoverCard/HoverCard.d.ts +1 -1
  364. package/dist/types/components/List/List.d.ts +10 -1
  365. package/dist/types/components/LocaleProvider/locale.d.ts +31 -0
  366. package/dist/types/components/LogViewer/LogViewer.d.ts +10 -1
  367. package/dist/types/components/Menu/Menu.d.ts +11 -2
  368. package/dist/types/components/Menu/MenuCheckboxItem.d.ts +25 -0
  369. package/dist/types/components/Menu/MenuGroup.d.ts +16 -0
  370. package/dist/types/components/Menu/MenuItem.d.ts +7 -1
  371. package/dist/types/components/Menu/MenuRadioGroup.d.ts +20 -0
  372. package/dist/types/components/Menu/MenuRadioItem.d.ts +22 -0
  373. package/dist/types/components/Menu/index.d.ts +9 -1
  374. package/dist/types/components/Menu/menu-item-styles.d.ts +28 -0
  375. package/dist/types/components/NavigationBar/NavLink.d.ts +1 -1
  376. package/dist/types/components/Pagination/Pagination.d.ts +17 -3
  377. package/dist/types/components/Resizable/Resizable.d.ts +24 -7
  378. package/dist/types/components/Resizable/index.d.ts +1 -1
  379. package/dist/types/components/Sidebar/Sidebar.d.ts +1 -1
  380. package/dist/types/components/Slider/Slider.d.ts +24 -2
  381. package/dist/types/components/Slider/SliderCore.d.ts +41 -3
  382. package/dist/types/components/Sparkline/Sparkline.d.ts +31 -0
  383. package/dist/types/components/Sparkline/index.d.ts +3 -0
  384. package/dist/types/components/Sparkline/sparkline-styles.d.ts +26 -0
  385. package/dist/types/components/StatusBar/StatusBar.d.ts +18 -0
  386. package/dist/types/components/StatusBar/index.d.ts +3 -0
  387. package/dist/types/components/StreamingText/StreamingText.d.ts +8 -1
  388. package/dist/types/components/TabBar/TabBar.d.ts +23 -0
  389. package/dist/types/components/TabBar/index.d.ts +4 -0
  390. package/dist/types/components/Tabs/SortableTabList.d.ts +46 -0
  391. package/dist/types/components/Tabs/Tab.d.ts +54 -3
  392. package/dist/types/components/Tabs/TabList.d.ts +26 -2
  393. package/dist/types/components/Tabs/edge-scroll.d.ts +17 -0
  394. package/dist/types/components/Tabs/index.d.ts +3 -1
  395. package/dist/types/components/Tabs/tab-metas.d.ts +20 -0
  396. package/dist/types/components/TimePicker/TimePicker.d.ts +36 -4
  397. package/dist/types/components/TimePicker/TimePickerPanel.d.ts +26 -0
  398. package/dist/types/components/TimePicker/index.d.ts +1 -0
  399. package/dist/types/components/TimePicker/time-picker-styles.d.ts +30 -0
  400. package/dist/types/components/TimePicker/time.d.ts +49 -0
  401. package/dist/types/components/Toast/Toast.d.ts +19 -6
  402. package/dist/types/components/Toast/ToastContainer.d.ts +1 -1
  403. package/dist/types/components/Toast/ToastContext.d.ts +22 -2
  404. package/dist/types/components/Toast/index.d.ts +2 -2
  405. package/dist/types/components/Toast/{toast.d.ts → toast-channel.d.ts} +20 -14
  406. package/dist/types/components/Toast/useToast.d.ts +14 -4
  407. package/dist/types/components/Tooltip/Tooltip.d.ts +1 -1
  408. package/dist/types/components/Tree/SortableTree.d.ts +38 -0
  409. package/dist/types/components/Tree/Tree.d.ts +1 -1
  410. package/dist/types/components/Tree/index.d.ts +2 -0
  411. package/dist/types/components/Tree/sortable-tree-styles.d.ts +36 -0
  412. package/dist/types/components/Tree/sortable-tree-utils.d.ts +40 -0
  413. package/dist/types/components/Upload/Upload.d.ts +17 -10
  414. package/dist/types/components/Upload/UploadCore.d.ts +26 -12
  415. package/dist/types/components/Upload/UploadList.d.ts +10 -7
  416. package/dist/types/components/Upload/index.d.ts +1 -1
  417. package/dist/types/components/Upload/types.d.ts +33 -7
  418. package/dist/types/components/VirtualList/VirtualList.d.ts +98 -26
  419. package/dist/types/components/VirtualList/index.d.ts +1 -1
  420. package/dist/types/components/Workbench/Workbench.d.ts +50 -0
  421. package/dist/types/components/Workbench/index.d.ts +2 -0
  422. package/dist/types/dates/adapter.d.ts +101 -0
  423. package/dist/types/dates/buddhist.d.ts +14 -0
  424. package/dist/types/dates/ethiopic.d.ts +15 -0
  425. package/dist/types/dates/gregory.d.ts +10 -0
  426. package/dist/types/dates/hebrew.d.ts +19 -0
  427. package/dist/types/dates/index.d.ts +11 -0
  428. package/dist/types/dates/islamic.d.ts +17 -0
  429. package/dist/types/dates/japanese.d.ts +16 -0
  430. package/dist/types/dates/persian.d.ts +18 -0
  431. package/dist/types/dates/registry.d.ts +13 -0
  432. package/dist/types/dates/timezone.d.ts +36 -0
  433. package/dist/types/form/FormItem.d.ts +31 -1
  434. package/dist/types/form/form-item-styles.d.ts +24 -0
  435. package/dist/types/index.d.ts +31 -13
  436. package/dist/types/tokens/index.d.ts +4 -2
  437. package/dist/types/tokens/motion.d.ts +16 -0
  438. package/dist/types/tokens/palette.d.ts +59 -2
  439. package/dist/types/utils/menuItems.d.ts +126 -0
  440. package/dist/types/utils/menuRadio.d.ts +21 -0
  441. package/dist/types/utils/sortable.d.ts +8 -1
  442. package/dist/types/utils/use-end-reached.d.ts +56 -0
  443. package/dist/types/utils/viewport.d.ts +12 -0
  444. package/dist/utils/floating.js +45 -44
  445. package/dist/utils/menuItems.js +55 -0
  446. package/dist/utils/menuKeyboard.js +31 -31
  447. package/dist/utils/menuRadio.js +28 -0
  448. package/dist/utils/sortable.js +7 -5
  449. package/dist/utils/use-end-reached.js +46 -0
  450. package/dist/utils/viewport.js +20 -0
  451. package/package.json +26 -9
@@ -1,13 +1,45 @@
1
1
  import type { ComponentPropsWithoutRef, Ref } from 'react';
2
2
  import type { ControlOrValue } from 'react-use-control';
3
+ import type { TimeParts, TimePickerFormat } from './time';
3
4
  type TimePickerProps = {
4
5
  value?: ControlOrValue<string>;
6
+ /** Panel visibility; defaults to the trigger's own toggle state. */
7
+ open?: ControlOrValue<boolean>;
5
8
  onChange?: (value: string) => void;
9
+ /**
10
+ * Column granularity and the value's serialization shape. The panel
11
+ * shows hour/minute columns for `'HH:mm'` (default) and adds a second
12
+ * column for `'HH:mm:ss'`; `value` always serializes to match.
13
+ */
14
+ format?: TimePickerFormat;
15
+ /** Hour column step — only multiples of it are offered. Default 1. */
16
+ hourStep?: number;
17
+ /** Minute column step — only multiples of it are offered. Default 1. */
18
+ minuteStep?: number;
19
+ /** Second column step — only multiples of it are offered. Default 1. */
20
+ secondStep?: number;
21
+ /**
22
+ * Presents a 12-hour clock column plus an AM/PM column. The value
23
+ * stays 24-hour `"HH:mm[:ss]"` either way (12:34 AM is `00:34`).
24
+ */
25
+ use12Hours?: boolean;
26
+ /**
27
+ * Disables candidate times on the panel's columns: return `true` to
28
+ * make that cell unselectable (muted + not clickable). Each candidate
29
+ * is judged against the currently selected parts of the other
30
+ * fields, so a disabled hour re-evaluates as minutes change.
31
+ */
32
+ disabledTime?: (parts: TimeParts) => boolean;
33
+ /**
34
+ * Falls back to the bare native `<input type="time">` form
35
+ * (TimePickerCore) — the panel props above do not apply to it.
36
+ */
37
+ native?: boolean;
6
38
  placeholder?: string;
7
39
  className?: string;
8
- /** Forwarded to the underlying `<input>` — the element form bridges
9
- * and `ref.current.focus()` reach. */
40
+ /** Forwarded to the trigger `<input>` — the element form bridges and
41
+ * `ref.current.focus()` reach. */
10
42
  ref?: Ref<HTMLInputElement>;
11
- } & Omit<ComponentPropsWithoutRef<'input'>, 'value' | 'onChange' | 'type' | 'placeholder'>;
12
- export default function TimePicker({ value: valueControl, onChange, placeholder, className, ref, ...rest }: TimePickerProps): import("react").JSX.Element;
43
+ } & Omit<ComponentPropsWithoutRef<'input'>, 'value' | 'onChange' | 'type' | 'placeholder' | 'defaultValue'>;
44
+ export default function TimePicker({ value: valueControl, open: openControl, onChange, format, hourStep, minuteStep, secondStep, use12Hours, disabledTime, native, placeholder, className, ref, ...rest }: TimePickerProps): import("react").JSX.Element;
13
45
  export type { TimePickerProps };
@@ -0,0 +1,26 @@
1
+ import type { ComponentPropsWithoutRef, Ref } from 'react';
2
+ import type { TimeParts, TimePickerFormat } from './time';
3
+ /**
4
+ * One enabled/disabled decision for a candidate cell. The predicate is
5
+ * evaluated against the currently selected parts for the other fields
6
+ * (see `disabledTime` on TimePickerProps).
7
+ */
8
+ type TimePredicate = (parts: TimeParts) => boolean;
9
+ type TimePickerPanelProps = {
10
+ value: string;
11
+ onChange: (value: string) => void;
12
+ open: boolean;
13
+ onOpenChange: (open: boolean) => void;
14
+ format: TimePickerFormat;
15
+ hourStep: number;
16
+ minuteStep: number;
17
+ secondStep: number;
18
+ use12Hours: boolean;
19
+ disabledTime?: TimePredicate;
20
+ placeholder?: string;
21
+ className?: string;
22
+ /** Forwarded to the trigger `<input>` — focus bridges reach it. */
23
+ ref?: Ref<HTMLInputElement>;
24
+ } & Omit<ComponentPropsWithoutRef<'input'>, 'value' | 'onChange' | 'type' | 'placeholder' | 'defaultValue'>;
25
+ export default function TimePickerPanel({ value, onChange, open, onOpenChange, format, hourStep, minuteStep, secondStep, use12Hours, disabledTime, placeholder, className, onKeyDown: consumerKeyDown, ref, ...rest }: TimePickerPanelProps): import("react").JSX.Element;
26
+ export {};
@@ -2,3 +2,4 @@ export { default as TimePicker } from './TimePicker';
2
2
  export type { TimePickerProps } from './TimePicker';
3
3
  export { default as TimePickerCore } from './TimePickerCore';
4
4
  export type { TimePickerCoreProps } from './TimePickerCore';
5
+ export type { TimeParts, TimePickerFormat } from './time';
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Linaria classes for the TimePicker panel form (TimePicker.tsx /
3
+ * TimePickerPanel.tsx). Lives in a sibling file — component files only
4
+ * export components and types (react-refresh/only-export-components).
5
+ */
6
+ export declare const wrapper: import("@linaria/core").LinariaClassName;
7
+ /** Readonly trigger input (Datepicker's trigger look). */
8
+ export declare const trigger: import("@linaria/core").LinariaClassName;
9
+ /** Panel visual skin applied on every rendering tier. */
10
+ export declare const panel: import("@linaria/core").LinariaClassName;
11
+ export declare const columns: import("@linaria/core").LinariaClassName;
12
+ /**
13
+ * One column frame: fixed height (7 option rows), the highlight band
14
+ * behind the center row, and the scrolling list on top of it. The band
15
+ * is where a committed selection scrolls to, so it stays put while the
16
+ * list moves under it.
17
+ */
18
+ export declare const columnWrap: import("@linaria/core").LinariaClassName;
19
+ /**
20
+ * The scrolling option list. Padding of three rows lets the first and
21
+ * last options center in the band like every other row. Positioned
22
+ * above the wrap's ::before band.
23
+ */
24
+ export declare const columnList: import("@linaria/core").LinariaClassName;
25
+ export declare const columnOption: import("@linaria/core").LinariaClassName;
26
+ export declare const columnOptionSelected: import("@linaria/core").LinariaClassName;
27
+ export declare const columnOptionDisabled: import("@linaria/core").LinariaClassName;
28
+ /** Panel footer: the "Now" action row. */
29
+ export declare const footer: import("@linaria/core").LinariaClassName;
30
+ export declare const nowButton: import("@linaria/core").LinariaClassName;
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Time-of-day value helpers for the TimePicker panel form.
3
+ *
4
+ * The value is a 24-hour `"HH:mm"` / `"HH:mm:ss"` string (per `format`,
5
+ * always zero-padded). With `use12Hours` the columns present a 12-hour
6
+ * clock plus an AM/PM column, but serialization stays 24-hour — `12:34`
7
+ * is midday, `00:34` (12:34 AM) is half past midnight.
8
+ */
9
+ /** 24-hour time-of-day, the serialization coordinate of every form. */
10
+ export type TimeParts = {
11
+ hour: number;
12
+ minute: number;
13
+ second: number;
14
+ };
15
+ /** Column granularity and the value's serialization shape. */
16
+ export type TimePickerFormat = 'HH:mm' | 'HH:mm:ss';
17
+ /**
18
+ * Parse a `"HH:mm"`/`"HH:mm:ss"` value into 24-hour parts. A missing
19
+ * second field reads as `0`. Returns `null` for empty or impossible
20
+ * times (`"25:00"`, `"12:61"`) so the caller can treat it as "unset".
21
+ */
22
+ export declare function parseTimeValue(value: string): TimeParts | null;
23
+ /** Serialize 24-hour parts per `format`, zero-padded. */
24
+ export declare function formatTimeValue(parts: TimeParts, format: TimePickerFormat): string;
25
+ /** 24-hour hour → 12-hour clock hour: 0→12, 13→1, 12→12. */
26
+ export declare function to12Hour(hour: number): number;
27
+ /** 12-hour clock hour + period → 24-hour hour: (12, AM)→0, (12, PM)→12. */
28
+ export declare function from12Hour(hour12: number, pm: boolean): number;
29
+ /**
30
+ * The values of one step grid: multiples of `step` from 0 through `max`
31
+ * inclusive (`max` itself lands on the grid only when divisible).
32
+ */
33
+ export declare function stepValues(max: number, step: number): number[];
34
+ /**
35
+ * The 12-hour column's display order — 12 first, then 1 through 11
36
+ * (AntD's order) — filtered to the `step` grid. `12` sits on the grid
37
+ * whenever `step` divides 12 or 0, matching the 24-hour grid's 0/12.
38
+ */
39
+ export declare function hour12Values(step: number): number[];
40
+ /**
41
+ * Next enabled value walking from `from` by `±step` around the
42
+ * `0..max` ring (negative `step` walks down). Skips candidates
43
+ * rejected by `isEnabled`; after a full lap without a hit returns
44
+ * `null` (every grid value is disabled — caller keeps the current
45
+ * value). A `step` of 0 is treated as 1.
46
+ */
47
+ export declare function stepValue(from: number, step: number, max: number, isEnabled: (value: number) => boolean): number | null;
48
+ /** Two-digit, zero-padded column label (`0` → `"00"`). */
49
+ export declare function pad2(value: number): string;
@@ -1,4 +1,5 @@
1
1
  import type { ComponentPropsWithRef, ReactNode } from 'react';
2
+ import type { ToastAction } from './ToastContext';
2
3
  /**
3
4
  * Semantic slot classes (AntD v6 `classNames` shape) for the toast
4
5
  * family. Toasts are usually fired imperatively (`useToast()` /
@@ -18,21 +19,33 @@ type ToastClassNames = {
18
19
  item?: string;
19
20
  /** The body wrapper around the toast content. */
20
21
  content?: string;
22
+ /** The action button (only rendered for toasts carrying an action). */
23
+ action?: string;
24
+ /** The bold title line (only rendered for toasts carrying a title). */
25
+ title?: string;
21
26
  /** The dismiss × button. */
22
27
  close?: string;
23
28
  };
24
29
  type ToastProps = {
25
- variant?: 'info' | 'success' | 'warning' | 'danger';
30
+ variant?: 'info' | 'success' | 'warning' | 'danger' | 'loading';
31
+ /**
32
+ * Action button rendered right of the content and left of the dismiss
33
+ * × — a real focusable button (see {@link ToastAction}). `close`
34
+ * defaults to `true`: the toast dismisses right after `onClick` runs.
35
+ */
36
+ action?: ToastAction;
37
+ /** Bold first line rendered above the content. */
38
+ title?: ReactNode;
26
39
  onClose: () => void;
27
40
  duration: number;
28
41
  children: ReactNode;
29
42
  /**
30
43
  * Semantic slot classes (AntD v6 `classNames` shape) — see
31
- * {@link ToastClassNames}. Only `item`/`content`/`close` apply to a
32
- * directly rendered toast; `viewport` is a `ToastContainer` part.
33
- * Omitting it changes nothing.
44
+ * {@link ToastClassNames}. Only `item`/`content`/`action`/`title`/
45
+ * `close` apply to a directly rendered toast; `viewport` is a
46
+ * `ToastContainer` part. Omitting it changes nothing.
34
47
  */
35
48
  classNames?: ToastClassNames;
36
- } & Omit<ComponentPropsWithRef<'div'>, 'children' | 'onClose'>;
37
- export default function Toast({ variant, onClose, duration, children, classNames, className, ...rest }: ToastProps): import("react").JSX.Element;
49
+ } & Omit<ComponentPropsWithRef<'div'>, 'children' | 'onClose' | 'title'>;
50
+ export default function Toast({ variant, action, title, onClose, duration, children, classNames, className, ...rest }: ToastProps): import("react").JSX.Element;
38
51
  export type { ToastProps, ToastClassNames };
@@ -23,5 +23,5 @@ export declare const toastPlacements: {
23
23
  readonly 'bottom-left': import("@linaria/core").LinariaClassName;
24
24
  readonly 'bottom-right': import("@linaria/core").LinariaClassName;
25
25
  };
26
- export default function ToastContainer({ children, maxCount, placement, classNames, }: ToastContainerProps): import("react").JSX.Element;
26
+ export default function ToastContainer({ children, maxCount: maxCountProp, placement: placementProp, classNames, }: ToastContainerProps): import("react").JSX.Element;
27
27
  export type { ToastContainerProps, ToastPlacement };
@@ -1,10 +1,26 @@
1
1
  import type { ReactNode } from 'react';
2
- type ToastVariant = 'info' | 'success' | 'warning' | 'danger';
2
+ type ToastVariant = 'info' | 'success' | 'warning' | 'danger' | 'loading';
3
+ /**
4
+ * Action button carried by a toast: rendered right of the content and
5
+ * left of the dismiss ×, as a real focusable `<button>`.
6
+ */
7
+ type ToastAction = {
8
+ /** Button label. */
9
+ label: ReactNode;
10
+ /** Runs when the action button is activated. */
11
+ onClick: () => void;
12
+ /** Dismiss the toast right after `onClick` runs. Default `true`. */
13
+ close?: boolean;
14
+ };
3
15
  type ToastItem = {
4
16
  id: number;
5
17
  variant: ToastVariant;
6
18
  content: ReactNode;
7
19
  duration: number;
20
+ /** Action button — omitted renders no button. */
21
+ action?: ToastAction;
22
+ /** Bold first line rendered above the content. */
23
+ title?: ReactNode;
8
24
  };
9
25
  /**
10
26
  * Patch accepted by `toast.update(id, patch)` and `useToast().update(id,
@@ -19,6 +35,10 @@ type ToastUpdateOptions = {
19
35
  /** New auto-dismiss budget in ms. Changing it re-arms the countdown
20
36
  * from the full value; leaving it out keeps the running countdown. */
21
37
  duration?: number;
38
+ /** Replacement (or first) action button. */
39
+ action?: ToastAction;
40
+ /** Replacement (or first) title line. */
41
+ title?: ReactNode;
22
42
  };
23
43
  /** The `toast.promise` phases whose default copy lives in the locale pack. */
24
44
  type ToastDeferredCopyKey = 'loading' | 'success' | 'error';
@@ -53,4 +73,4 @@ type ToastContextValue = {
53
73
  export declare const ToastProvider: import("react").Provider<ToastContextValue | undefined>;
54
74
  export declare function useToastContext(): ToastContextValue;
55
75
  export { applyToastPatch, deferredCopyKey, deferredToastCopy, };
56
- export type { ToastDeferredCopy, ToastDeferredCopyKey, ToastItem, ToastContextValue, ToastUpdateOptions, ToastVariant, };
76
+ export type { ToastAction, ToastDeferredCopy, ToastDeferredCopyKey, ToastItem, ToastContextValue, ToastUpdateOptions, ToastVariant, };
@@ -3,5 +3,5 @@ export type { ToastProps, ToastClassNames } from './Toast';
3
3
  export { default as ToastContainer } from './ToastContainer';
4
4
  export type { ToastContainerProps } from './ToastContainer';
5
5
  export { default as useToast } from './useToast';
6
- export { toast } from './toast';
7
- export type { ToastOptions, ToastVariant } from './toast';
6
+ export { toast } from './toast-channel';
7
+ export type { ToastAction, ToastOptions, ToastVariant } from './toast-channel';
@@ -1,9 +1,14 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { ToastDeferredCopyKey, ToastItem, ToastUpdateOptions, ToastVariant } from './ToastContext';
2
+ import type { ToastAction, ToastDeferredCopyKey, ToastItem, ToastUpdateOptions, ToastVariant } from './ToastContext';
3
3
  /** Options accepted by `toast()` — the same call shape `useToast()` takes. */
4
4
  type ToastOptions = {
5
5
  variant?: ToastVariant;
6
6
  duration?: number;
7
+ /** Action button rendered right of the content (left of the dismiss ×);
8
+ * `close` defaults to `true` — the toast dismisses after `onClick`. */
9
+ action?: ToastAction;
10
+ /** Bold first line rendered above the content. */
11
+ title?: ReactNode;
7
12
  };
8
13
  /** Options accepted by the variant sugar methods (`toast.success()` …). */
9
14
  type ToastVariantOptions = Omit<ToastOptions, 'variant'>;
@@ -42,10 +47,10 @@ export declare function nextToastId(): number;
42
47
  * Returns the toast id, usable with `toast.dismiss(id)` and
43
48
  * `toast.update(id, patch)`.
44
49
  *
45
- * Mirrors the `useToast()` call shape (content + `{variant, duration}`,
46
- * defaulting to `info` / 3000ms). With no container mounted the toast is
47
- * silently queued (never throws) and replayed when a `ToastContainer`
48
- * mounts.
50
+ * Mirrors the `useToast()` call shape (content + `{variant, duration,
51
+ * action, title}`, defaulting to `info` / 3000ms). With no container
52
+ * mounted the toast is silently queued (never throws) and replayed when
53
+ * a `ToastContainer` mounts.
49
54
  */
50
55
  declare function toast(content: ReactNode, options?: ToastOptions): number;
51
56
  declare namespace toast {
@@ -53,20 +58,21 @@ declare namespace toast {
53
58
  var success: (content: ReactNode, options?: ToastVariantOptions) => number;
54
59
  var warning: (content: ReactNode, options?: ToastVariantOptions) => number;
55
60
  var danger: (content: ReactNode, options?: ToastVariantOptions) => number;
61
+ var loading: (content: ReactNode, options?: ToastVariantOptions) => number;
56
62
  var dismiss: (id?: number) => void;
57
63
  var update: (id: number, patch: ToastUpdateOptions) => void;
58
64
  var promise: <T>(p: Promise<T>, options?: ToastPromiseOptions<T>) => Promise<T>;
59
65
  }
60
66
  /**
61
- * Shared engine behind `toast.promise` and `useToast().promise`: fires the
62
- * loading toast through `show` (persistent — duration 0), then patches it
63
- * in place when the promise settles, so the toast never remounts and its
64
- * animations never replay. Returns the original promise untouched:
65
- * rejections keep propagating to the caller's `await`/`catch`, and a
66
- * loading toast dismissed before settling is simply not found by the
67
- * update — it never resurrects.
67
+ * Shared engine behind `toast.promise` and `useToast().promise`: fires
68
+ * the loading toast through `showLoading` (spinner icon, persistent —
69
+ * duration 0), then patches it in place when the promise settles, so the
70
+ * toast never remounts and its animations never replay. Returns the
71
+ * original promise untouched: rejections keep propagating to the
72
+ * caller's `await`/`catch`, and a loading toast dismissed before
73
+ * settling is simply not found by the update — it never resurrects.
68
74
  */
69
- export declare function driveToastPromise<T>(show: (content: ReactNode, options?: ToastOptions) => number, updateById: (id: number, patch: ToastUpdateOptions) => void, promise: Promise<T>, options?: ToastPromiseOptions<T>): Promise<T>;
75
+ export declare function driveToastPromise<T>(showLoading: (content: ReactNode) => number, updateById: (id: number, patch: ToastUpdateOptions) => void, promise: Promise<T>, options?: ToastPromiseOptions<T>): Promise<T>;
70
76
  /**
71
77
  * Called from `ToastContainer`'s mount effect. The first subscriber also
72
78
  * replays everything queued before any container existed, in call order;
@@ -74,4 +80,4 @@ export declare function driveToastPromise<T>(show: (content: ReactNode, options?
74
80
  */
75
81
  export declare function subscribeToastChannel(channel: ToastChannel): () => void;
76
82
  export { toast };
77
- export type { ToastDeferredCopyKey, ToastOptions, ToastPhaseContent, ToastPromiseOptions, ToastUpdateOptions, ToastVariant, ToastVariantOptions, };
83
+ export type { ToastAction, ToastDeferredCopyKey, ToastOptions, ToastPhaseContent, ToastPromiseOptions, ToastUpdateOptions, ToastVariant, ToastVariantOptions, };
@@ -1,13 +1,23 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { ToastOptions, ToastPromiseOptions, ToastUpdateOptions } from './toast';
2
+ import type { ToastOptions, ToastPromiseOptions, ToastUpdateOptions, ToastVariantOptions } from './toast-channel';
3
3
  /**
4
4
  * The `useToast()` return value: the toast trigger itself (returns the id,
5
- * usable with `update`) plus `update` and `promise` — one-to-one with the
6
- * module-level `toast` API, but routed through the enclosing container's
7
- * context instead of the first-mounted channel subscriber.
5
+ * usable with `update`) plus `loading`/`update`/`promise` — one-to-one
6
+ * with the module-level `toast` API, but routed through the enclosing
7
+ * container's context instead of the first-mounted channel subscriber.
8
8
  */
9
9
  type ShowToast = {
10
10
  (content: ReactNode, options?: ToastOptions): number;
11
+ /** Info toast — see `toast.info`. */
12
+ info: (content: ReactNode, options?: ToastVariantOptions) => number;
13
+ /** Success toast — see `toast.success`. */
14
+ success: (content: ReactNode, options?: ToastVariantOptions) => number;
15
+ /** Warning toast — see `toast.warning`. */
16
+ warning: (content: ReactNode, options?: ToastVariantOptions) => number;
17
+ /** Danger toast — see `toast.danger`. */
18
+ danger: (content: ReactNode, options?: ToastVariantOptions) => number;
19
+ /** Loading toast with the spinner icon — see `toast.loading`. */
20
+ loading: (content: ReactNode, options?: ToastVariantOptions) => number;
11
21
  /** Patches a toast in place — see `toast.update`. */
12
22
  update: (id: number, patch: ToastUpdateOptions) => void;
13
23
  /** Loading → success/danger lifecycle — see `toast.promise`. */
@@ -12,5 +12,5 @@ type TooltipProps = {
12
12
  className?: string;
13
13
  children: ReactNode;
14
14
  };
15
- export default function Tooltip({ content, position, delay, open: openControl, collisionPadding, className, children, }: TooltipProps): import("react").JSX.Element;
15
+ export default function Tooltip({ content, position, delay: delayProp, open: openControl, collisionPadding, className, children, }: TooltipProps): import("react").JSX.Element;
16
16
  export type { TooltipProps };
@@ -0,0 +1,38 @@
1
+ import type { SortableTreeMoveInfo } from './sortable-tree-utils';
2
+ import type { TreeProps } from './types';
3
+ /**
4
+ * Props for `SortableTree` — the full `TreeProps` field set (the tree
5
+ * keeps all of its expand/select/check/keyboard/virtual behavior) plus
6
+ * the drag contract. The internal injection seams are hidden: drag
7
+ * reordering owns them.
8
+ */
9
+ export type SortableTreeProps = {
10
+ /**
11
+ * Reports a completed drag: the dragged `key` should become the child
12
+ * at `index` of `parentKey` (`null` = root level), computed after
13
+ * removing the node from its old spot — splice it right in. Update
14
+ * `treeData` accordingly (controlled, one-way — the same philosophy as
15
+ * `SortableTagGroup`); without a handler a drop only animates back to
16
+ * the source position. The node's whole subtree travels with it.
17
+ */
18
+ onMove?: (info: SortableTreeMoveInfo) => void;
19
+ /**
20
+ * `false` (default): the whole row is the drag activator — an 8px
21
+ * pointer move threshold keeps clicks, expands and checks untouched.
22
+ * `true`: only the leading grip icon starts pointer drags; keyboard
23
+ * drags (Space lifts on the focused row) work either way.
24
+ */
25
+ dragHandle?: boolean;
26
+ } & Omit<TreeProps, 'rowWrap' | 'keyboardNavigation'>;
27
+ /**
28
+ * Drag-and-drop reorderable variant of Tree — built on the @dnd-kit
29
+ * dependency (the plain `Tree` never touches it): same-level reorders
30
+ * and cross-parent moves, the dragged node's whole subtree follows, and
31
+ * keyboard sortable works with Space / arrows / Space / Escape on the
32
+ * focused row. Dropping onto a row inserts right after it, so a drop on
33
+ * a child of another parent reparents; nodes never drop into their own
34
+ * subtree. All tree state stays controlled — `onMove` reports
35
+ * `{ key, parentKey, index }` and the consumer updates `treeData`.
36
+ */
37
+ export default function SortableTree({ treeData, disabled, dragHandle, titleRender, searchValue, expandedKeys, onExpand, onMove, className, ...rest }: SortableTreeProps): import("react").JSX.Element;
38
+ export type { SortableTreeMoveInfo };
@@ -1,3 +1,3 @@
1
1
  import type { TreeProps, TreeVirtualizedConfig } from './types';
2
- export default function Tree({ treeData, multiple, checkable, checkStrictly, selectable, disabled, blockNode, showLine, showIcon, switcherIcon, loadingIcon, titleRender, iconRender, virtualized, loadData, searchValue, expandedKeys: expandedKeysControl, selectedKeys: selectedKeysControl, checkedKeys: checkedKeysControl, className, onExpand, onSelect, onCheck, }: TreeProps): import("react").JSX.Element;
2
+ export default function Tree({ treeData, multiple, checkable, checkStrictly, selectable, disabled, blockNode, showLine, showIcon, switcherIcon, loadingIcon, titleRender, iconRender, virtualized, loadData, searchValue, rowWrap, keyboardNavigation, expandedKeys: expandedKeysControl, selectedKeys: selectedKeysControl, checkedKeys: checkedKeysControl, className, onExpand, onSelect, onCheck, }: TreeProps): import("react").JSX.Element;
3
3
  export type { TreeProps, TreeVirtualizedConfig };
@@ -1,2 +1,4 @@
1
1
  export { default as Tree } from './Tree';
2
+ export { default as SortableTree } from './SortableTree';
2
3
  export type { TreeProps, TreeNodeData } from './types';
4
+ export type { SortableTreeProps, SortableTreeMoveInfo } from './SortableTree';
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Linaria classes for SortableTree — sibling file per the repo convention
3
+ * (sortable-tree- prefix keeps the class slug distinct from every other
4
+ * *-styles.ts, the tag-group-styles precedent). The classes land in the
5
+ * `tree` css family automatically (same component directory).
6
+ */
7
+ /**
8
+ * The sortable node wrapper around every treeitem (the element that
9
+ * carries useSortable's ref). `position: relative` anchors the dragging
10
+ * row's z-index stack; the inline transform/transition (from
11
+ * sortableItemStyle) animates the drag and the snap-back.
12
+ */
13
+ export declare const row: import("@linaria/core").LinariaClassName;
14
+ /**
15
+ * Whole-row drag affordance (`dragHandle: false`): the wrapper grabs the
16
+ * pointer for PointerSensor (touch-action: none) and shows the grab
17
+ * cursor — the treeitem's own `cursor: pointer` is inherited over so the
18
+ * row reads as draggable while the switcher/checkbox keep their cursors.
19
+ * Clicks still work: PointerSensor's 8px distance constraint keeps plain
20
+ * taps from ever starting a drag.
21
+ */
22
+ export declare const rowDraggable: import("@linaria/core").LinariaClassName;
23
+ /** The dragged row stacks above its siblings while it flies. */
24
+ export declare const rowDragging: import("@linaria/core").LinariaClassName;
25
+ /**
26
+ * Rows inside the dragged subtree dim while their ancestor flies — the
27
+ * subtree follows as one block, so its rows are never drop targets.
28
+ */
29
+ export declare const rowInSubtree: import("@linaria/core").LinariaClassName;
30
+ /**
31
+ * The drag grip (`dragHandle: true`): pointer-activated only and hidden
32
+ * from the accessibility tree — keyboard drags stay on the treeitem row
33
+ * (Space lifts, arrows move, Space drops), keeping the tree's single
34
+ * roving tab stop intact.
35
+ */
36
+ export declare const grip: import("@linaria/core").LinariaClassName;
@@ -0,0 +1,40 @@
1
+ import type { TreeNodeData } from './types';
2
+ /**
3
+ * Pure move math for SortableTree — no React, no dnd, fully unit-testable.
4
+ * The drag runtime reports a target row; these functions turn that into the
5
+ * `onMove` payload and back into a controlled treeData update.
6
+ */
7
+ /** Payload `SortableTree` reports after a completed drag. */
8
+ export type SortableTreeMoveInfo = {
9
+ /** The dragged node's key. */
10
+ key: string;
11
+ /** The new parent's key — `null` for the root level. */
12
+ parentKey: string | null;
13
+ /**
14
+ * Insertion index among the **new** parent's children, computed after
15
+ * removing the dragged node from the tree — `splice(index, 0, node)`
16
+ * lands exactly.
17
+ */
18
+ index: number;
19
+ };
20
+ /** Every key in the node's own subtree, including itself. */
21
+ export declare function subtreeKeys(node: TreeNodeData): Set<string>;
22
+ /**
23
+ * Resolve a completed drag into the `onMove` payload. Dropping onto a row
24
+ * inserts the dragged node **right after it** — as the target's next
25
+ * sibling at the target's level — so a drop on a same-level row reorders
26
+ * and a drop on a child of another parent reparents. Returns `null` when
27
+ * nothing should happen: drop on itself, on one of its own descendants
28
+ * (the subtree travels as one block and cannot move into itself), back
29
+ * onto its own current position, or an unknown key.
30
+ */
31
+ export declare function resolveTreeMove(data: TreeNodeData[], dragKey: string, overKey: string): SortableTreeMoveInfo | null;
32
+ /**
33
+ * Apply a reported move to a tree array — the controlled `treeData`
34
+ * update a consumer makes in `onMove`: detach the node with its whole
35
+ * subtree, then splice it into the new parent's children. Returns fresh
36
+ * arrays on every changed path (originals untouched). A parent key that
37
+ * no longer resolves falls back to appending at the root level rather
38
+ * than dropping the node.
39
+ */
40
+ export declare function applyTreeMove(data: TreeNodeData[], info: SortableTreeMoveInfo): TreeNodeData[];
@@ -1,9 +1,11 @@
1
1
  import type { ReactNode, Ref } from 'react';
2
2
  import type { ControlOrValue } from 'react-use-control';
3
- import type { UploadFileStatus, UploadHandle, UploadListItemRender, UploadRequest } from './types';
3
+ import type { UploadFileStatus, UploadHandle, UploadListItemRender, UploadRequest, UploadValueItem } from './types';
4
4
  type UploadProps = {
5
- /** Selected files; uncontrolled (accumulating internally) when omitted. */
6
- value?: ControlOrValue<File[]>;
5
+ /** Selected files — local `File` picks mixed freely with `UploadFile`
6
+ * echo entries (files already on the server); uncontrolled
7
+ * (accumulating internally) when omitted. */
8
+ value?: ControlOrValue<UploadValueItem[]>;
7
9
  accept?: string;
8
10
  /** Renders the drag-and-drop drop area (default) or a plain
9
11
  * click-only picker area — see `UploadCoreProps.droppable`. */
@@ -35,9 +37,13 @@ type UploadProps = {
35
37
  showUploadList?: boolean | {
36
38
  itemRender?: UploadListItemRender;
37
39
  };
38
- /** Rendering style of the built-in list (`text` rows or a
39
- * `picture-card` thumbnail grid) — see `UploadCoreProps.listType`. */
40
- listType?: 'text' | 'picture-card';
40
+ /** Rendering style of the built-in list (`text` rows, a `picture`
41
+ * row with a 32px inline thumbnail, or a `picture-card` thumbnail
42
+ * grid) — see `UploadCoreProps.listType`. */
43
+ listType?: 'text' | 'picture' | 'picture-card';
44
+ /** Click handler for `picture` / `picture-card` thumbnails (e.g. a
45
+ * lightbox) — see `UploadCoreProps.onPreview`. */
46
+ onPreview?: (file: UploadValueItem) => void;
41
47
  /** Overrides the built-in remove-button label — see
42
48
  * `UploadCoreProps.removeLabel`. */
43
49
  removeLabel?: string;
@@ -47,13 +53,14 @@ type UploadProps = {
47
53
  /** Status-machine snapshot callback — see
48
54
  * `UploadCoreProps.onStatusChange`. */
49
55
  onStatusChange?: (files: UploadFileStatus[]) => void;
50
- /** Fires with the freshly picked files only — the accumulated list is
51
- * the `value` channel (or internal state when uncontrolled).
52
- * Removals and `clear()` do not fire this (they are not picks). */
56
+ /** Fires with the freshly picked files only (always local `File`s)
57
+ * — the accumulated list is the `value` channel (or internal state
58
+ * when uncontrolled). Removals and `clear()` do not fire this (they
59
+ * are not picks). */
53
60
  onChange?: (files: File[]) => void;
54
61
  className?: string;
55
62
  children?: ReactNode;
56
63
  ref?: Ref<UploadHandle>;
57
64
  };
58
- export default function Upload({ value: valueControl, accept, droppable, beforeUpload, maxCount, multiple, request, action, method, headers, name, data, manual, showUploadList, listType, removeLabel, directory, onStatusChange, onChange, className, children, ref, }: UploadProps): import("react").JSX.Element;
65
+ export default function Upload({ value: valueControl, accept, droppable, beforeUpload, maxCount, multiple, request, action, method, headers, name, data, manual, showUploadList, listType, onPreview, removeLabel, directory, onStatusChange, onChange, className, children, ref, }: UploadProps): import("react").JSX.Element;
59
66
  export type { UploadProps };
@@ -1,13 +1,17 @@
1
1
  import type { ComponentPropsWithoutRef, ReactNode, Ref } from 'react';
2
- import type { UploadFileStatus, UploadHandle, UploadListItemRender, UploadRequest } from './types';
2
+ import type { UploadFileStatus, UploadHandle, UploadListItemRender, UploadRequest, UploadValueItem } from './types';
3
3
  type UploadCoreProps = {
4
4
  /** The selected files — the field value, emitted verbatim (as the
5
- * complete next list) by `onChange`. */
6
- value: File[];
5
+ * complete next list) by `onChange`. Local `File` picks mix freely
6
+ * with `UploadFile` echo entries describing files already on the
7
+ * server; echo entries only render (and stay removable), they never
8
+ * enter the upload pipeline. */
9
+ value: UploadValueItem[];
7
10
  /** Emits the next file list: a single pick replaces `value`, a
8
11
  * `multiple` pick appends to it. Removals from the built-in list
9
- * (and `clear()`) also flow through here. */
10
- onChange: (files: File[]) => void;
12
+ * (and `clear()`) also flow through here — echo entries come back
13
+ * as the very objects the consumer passed in. */
14
+ onChange: (files: UploadValueItem[]) => void;
11
15
  /** Comma-separated accept tokens (`.txt`, `image/*`, `text/plain`) —
12
16
  * the same grammar the native picker uses. Dropped files that do not
13
17
  * match are discarded silently (the native dialog already enforces
@@ -74,12 +78,21 @@ type UploadCoreProps = {
74
78
  };
75
79
  /**
76
80
  * Rendering style of the built-in list (default `text`): `text`
77
- * rows, or a `picture-card` grid of square thumbnail cards —
78
- * object-URL previews for image files (revoked once the card leaves),
79
- * a type-icon fallback for the rest, an upload mask with the live
80
- * percent, and a danger border + retry on error.
81
+ * rows; `picture` — a text row with a 32px inline thumbnail before
82
+ * the name (a `url` image for `UploadFile` echoes, an object-URL
83
+ * preview for image files, a type-icon fallback otherwise); or a
84
+ * `picture-card` grid of square thumbnail cards with the upload
85
+ * mask, danger border + retry on error, and corner remove button.
81
86
  */
82
- listType?: 'text' | 'picture-card';
87
+ listType?: 'text' | 'picture' | 'picture-card';
88
+ /**
89
+ * Click handler for the thumbnails of `picture` / `picture-card`
90
+ * lists — the natural spot to open a lightbox (wire it to
91
+ * `Image`/`ImagePreview`). Receives the value item the thumbnail
92
+ * describes. The remove/retry/cancel buttons sit outside the hit
93
+ * area and keep working.
94
+ */
95
+ onPreview?: (file: UploadValueItem) => void;
83
96
  /**
84
97
  * Overrides the built-in remove-button label (list rows and
85
98
  * picture-card corners); defaults to the locale string.
@@ -95,12 +108,13 @@ type UploadCoreProps = {
95
108
  /**
96
109
  * Fires whenever the tracked entries change (added, removed, status
97
110
  * or percent) with the complete snapshot in value order. Only tracks
98
- * while `request`/`action` or `showUploadList` is in play.
111
+ * while `request`/`action` or `showUploadList` is in play. `UploadFile`
112
+ * echoes report their terminal `status`/`percent` like any row.
99
113
  */
100
114
  onStatusChange?: (files: UploadFileStatus[]) => void;
101
115
  className?: string;
102
116
  children?: ReactNode;
103
117
  ref?: Ref<UploadHandle>;
104
118
  } & Omit<ComponentPropsWithoutRef<'div'>, 'value' | 'onChange' | 'children' | 'onClick' | 'onDrop' | 'onDragOver' | 'onDragEnter' | 'onDragLeave' | 'onKeyDown' | 'role' | 'tabIndex'>;
105
- export default function UploadCore({ value, onChange, accept, droppable, beforeUpload, maxCount, multiple, request, action, method, headers, name, data, manual, showUploadList, listType, removeLabel, directory, onStatusChange, className, children, ref, ...rest }: UploadCoreProps): import("react").JSX.Element;
119
+ export default function UploadCore({ value, onChange, accept, droppable, beforeUpload, maxCount, multiple, request, action, method, headers, name, data, manual, showUploadList, listType, onPreview, removeLabel, directory, onStatusChange, className, children, ref, ...rest }: UploadCoreProps): import("react").JSX.Element;
106
120
  export type { UploadCoreProps };