@lobehub/ui 5.51.1 → 5.52.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 (326) hide show
  1. package/es/Accordion/Accordion.mjs +1 -1
  2. package/es/Accordion/Accordion.mjs.map +1 -1
  3. package/es/ActionIconGroup/type.d.mts +2 -1
  4. package/es/Alert/Alert.mjs +1 -1
  5. package/es/AutoComplete/Select.mjs +1 -1
  6. package/es/Avatar/Avatar.mjs +2 -2
  7. package/es/Burger/Burger.mjs +2 -2
  8. package/es/Burger/Burger.mjs.map +1 -1
  9. package/es/Button/Button.mjs +1 -1
  10. package/es/CodeDiff/DiffPanel.mjs +1 -1
  11. package/es/CodeDiff/DiffPanel.mjs.map +1 -1
  12. package/es/Collapse/Collapse.mjs +1 -1
  13. package/es/ColorSwatches/ColorSwatches.mjs +21 -21
  14. package/es/ColorSwatches/ColorSwatches.mjs.map +1 -1
  15. package/es/ColorSwatches/style.mjs +3 -12
  16. package/es/ColorSwatches/style.mjs.map +1 -1
  17. package/es/DatePicker/DatePicker.mjs +1 -1
  18. package/es/DraggablePanel/DraggablePanel.mjs +1 -1
  19. package/es/Drawer/Drawer.mjs +1 -1
  20. package/es/EditableText/ControlInput.d.mts +2 -2
  21. package/es/EditableText/ControlInput.mjs +1 -1
  22. package/es/EditableText/ControlInput.mjs.map +1 -1
  23. package/es/EditableText/EditableText.mjs +1 -0
  24. package/es/EditableText/EditableText.mjs.map +1 -1
  25. package/es/EditableText/type.d.mts +5 -1
  26. package/es/EmojiPicker/AvatarUploader.mjs +76 -71
  27. package/es/EmojiPicker/AvatarUploader.mjs.map +1 -1
  28. package/es/EmojiPicker/EmojiPicker.mjs +12 -6
  29. package/es/EmojiPicker/EmojiPicker.mjs.map +1 -1
  30. package/es/EmojiPicker/style.mjs +32 -9
  31. package/es/EmojiPicker/style.mjs.map +1 -1
  32. package/es/EmojiPicker/type.d.mts +2 -1
  33. package/es/Form/Form.mjs +1 -1
  34. package/es/Form/components/FormDivider.mjs +1 -1
  35. package/es/Form/components/FormItem.mjs +1 -1
  36. package/es/Form/components/FormSubmitFooter.mjs +1 -1
  37. package/es/Form/components/FormTitle.mjs +1 -1
  38. package/es/GroupAvatar/GroupAvatar.mjs +1 -1
  39. package/es/GroupAvatar/GroupAvatar.mjs.map +1 -1
  40. package/es/GroupAvatar/type.d.mts +2 -1
  41. package/es/Highlighter/Highlighter.mjs +1 -1
  42. package/es/Highlighter/Highlighter.mjs.map +1 -1
  43. package/es/Highlighter/LangSelect.mjs +23 -13
  44. package/es/Highlighter/LangSelect.mjs.map +1 -1
  45. package/es/Highlighter/style.mjs +1 -1
  46. package/es/Highlighter/style.mjs.map +1 -1
  47. package/es/HtmlPreview/HtmlPreview.mjs +28 -1
  48. package/es/HtmlPreview/HtmlPreview.mjs.map +1 -1
  49. package/es/Image/viewer/ImageViewer.mjs +1 -1
  50. package/es/Image/viewer/ImageViewer.mjs.map +1 -1
  51. package/es/Image/viewer/Toolbar.mjs +1 -1
  52. package/es/Input/Input.mjs +1 -1
  53. package/es/Input/InputNumber.mjs +1 -1
  54. package/es/Input/InputOPT.mjs +1 -1
  55. package/es/Input/InputPassword.mjs +1 -1
  56. package/es/Input/TextArea.mjs +1 -1
  57. package/es/Menu/Menu.mjs +1 -1
  58. package/es/Menu/index.d.mts +2 -1
  59. package/es/Menu/index.mjs +1 -1
  60. package/es/Menu/itemInterface.d.mts +71 -0
  61. package/es/Menu/type.d.mts +8 -8
  62. package/es/Mermaid/Mermaid.mjs +1 -1
  63. package/es/Mermaid/Mermaid.mjs.map +1 -1
  64. package/es/Modal/Modal.mjs +1 -1
  65. package/es/SearchBar/SearchBar.mjs +1 -1
  66. package/es/SearchBar/SearchBar.mjs.map +1 -1
  67. package/es/SearchBar/type.d.mts +2 -2
  68. package/es/Segmented/Segmented.mjs +1 -1
  69. package/es/Select/Select.mjs +1 -1
  70. package/es/SliderWithInput/SliderWithInput.mjs +1 -1
  71. package/es/Tabs/Tabs.mjs +1 -1
  72. package/es/Tag/Tag.mjs +1 -1
  73. package/es/ThemeProvider/ConfigProvider.mjs +1 -1
  74. package/es/ThemeProvider/ThemeProvider.mjs +1 -1
  75. package/es/ThemeSwitch/ThemeSwitch.mjs +1 -1
  76. package/es/Toc/Toc.mjs +1 -1
  77. package/es/Toc/TocMobile.mjs +1 -1
  78. package/es/awesome/AgentSkillCard/AgentSkillCard.mjs +1 -1
  79. package/es/awesome/Hero/Hero.mjs +1 -1
  80. package/es/awesome/LandingSection/LandingSection.mjs +1 -1
  81. package/es/base-ui/Anchor/Anchor.d.mts +6 -0
  82. package/es/base-ui/Anchor/Anchor.mjs +141 -0
  83. package/es/base-ui/Anchor/Anchor.mjs.map +1 -0
  84. package/es/base-ui/Anchor/index.d.mts +3 -0
  85. package/es/base-ui/Anchor/style.mjs +80 -0
  86. package/es/base-ui/Anchor/style.mjs.map +1 -0
  87. package/es/base-ui/Anchor/type.d.mts +20 -0
  88. package/es/base-ui/AutoComplete/AutoComplete.mjs.map +1 -1
  89. package/es/base-ui/Avatar/Avatar.mjs +1 -1
  90. package/es/base-ui/Breadcrumb/Breadcrumb.d.mts +6 -0
  91. package/es/base-ui/Breadcrumb/Breadcrumb.mjs +58 -0
  92. package/es/base-ui/Breadcrumb/Breadcrumb.mjs.map +1 -0
  93. package/es/base-ui/Breadcrumb/index.d.mts +3 -0
  94. package/es/base-ui/Breadcrumb/style.mjs +65 -0
  95. package/es/base-ui/Breadcrumb/style.mjs.map +1 -0
  96. package/es/base-ui/Breadcrumb/type.d.mts +24 -0
  97. package/es/base-ui/Burger/Burger.d.mts +6 -0
  98. package/es/base-ui/Burger/Burger.mjs +69 -0
  99. package/es/base-ui/Burger/Burger.mjs.map +1 -0
  100. package/es/base-ui/Burger/index.d.mts +3 -0
  101. package/es/base-ui/Burger/style.mjs +63 -0
  102. package/es/base-ui/Burger/style.mjs.map +1 -0
  103. package/es/base-ui/Burger/type.d.mts +23 -0
  104. package/es/base-ui/Carousel/Carousel.d.mts +6 -0
  105. package/es/base-ui/Carousel/Carousel.mjs +157 -0
  106. package/es/base-ui/Carousel/Carousel.mjs.map +1 -0
  107. package/es/base-ui/Carousel/index.d.mts +3 -0
  108. package/es/base-ui/Carousel/style.mjs +88 -0
  109. package/es/base-ui/Carousel/style.mjs.map +1 -0
  110. package/es/base-ui/Carousel/type.d.mts +23 -0
  111. package/es/base-ui/ColorPicker/ColorPicker.d.mts +6 -0
  112. package/es/base-ui/ColorPicker/ColorPicker.mjs +227 -0
  113. package/es/base-ui/ColorPicker/ColorPicker.mjs.map +1 -0
  114. package/es/base-ui/ColorPicker/SaturationArea.mjs +64 -0
  115. package/es/base-ui/ColorPicker/SaturationArea.mjs.map +1 -0
  116. package/es/base-ui/ColorPicker/color.mjs +28 -0
  117. package/es/base-ui/ColorPicker/color.mjs.map +1 -0
  118. package/es/base-ui/ColorPicker/index.d.mts +3 -0
  119. package/es/base-ui/ColorPicker/style.mjs +180 -0
  120. package/es/base-ui/ColorPicker/style.mjs.map +1 -0
  121. package/es/base-ui/ColorPicker/type.d.mts +20 -0
  122. package/es/base-ui/ContextMenu/ContextMenuHost.mjs.map +1 -1
  123. package/es/base-ui/ContextMenu/renderItems.d.mts +0 -1
  124. package/es/base-ui/ContextMenu/renderItems.mjs.map +1 -1
  125. package/es/base-ui/DatePicker/CalendarPanel.mjs +188 -0
  126. package/es/base-ui/DatePicker/CalendarPanel.mjs.map +1 -0
  127. package/es/base-ui/DatePicker/DatePicker.d.mts +6 -0
  128. package/es/base-ui/DatePicker/DatePicker.mjs +88 -0
  129. package/es/base-ui/DatePicker/DatePicker.mjs.map +1 -0
  130. package/es/base-ui/DatePicker/DateRangePicker.d.mts +6 -0
  131. package/es/base-ui/DatePicker/DateRangePicker.mjs +128 -0
  132. package/es/base-ui/DatePicker/DateRangePicker.mjs.map +1 -0
  133. package/es/base-ui/DatePicker/PickerShell.mjs +43 -0
  134. package/es/base-ui/DatePicker/PickerShell.mjs.map +1 -0
  135. package/es/base-ui/DatePicker/calendar.d.mts +5 -0
  136. package/es/base-ui/DatePicker/calendar.mjs +46 -0
  137. package/es/base-ui/DatePicker/calendar.mjs.map +1 -0
  138. package/es/base-ui/DatePicker/index.d.mts +5 -0
  139. package/es/base-ui/DatePicker/style.mjs +193 -0
  140. package/es/base-ui/DatePicker/style.mjs.map +1 -0
  141. package/es/base-ui/DatePicker/type.d.mts +35 -0
  142. package/es/base-ui/Descriptions/Descriptions.d.mts +6 -0
  143. package/es/base-ui/Descriptions/Descriptions.mjs +62 -0
  144. package/es/base-ui/Descriptions/Descriptions.mjs.map +1 -0
  145. package/es/base-ui/Descriptions/index.d.mts +3 -0
  146. package/es/base-ui/Descriptions/style.mjs +64 -0
  147. package/es/base-ui/Descriptions/style.mjs.map +1 -0
  148. package/es/base-ui/Descriptions/type.d.mts +28 -0
  149. package/es/base-ui/Divider/Divider.d.mts +6 -0
  150. package/es/base-ui/Divider/Divider.mjs +30 -0
  151. package/es/base-ui/Divider/Divider.mjs.map +1 -0
  152. package/es/base-ui/Divider/index.d.mts +3 -0
  153. package/es/base-ui/Divider/style.mjs +59 -0
  154. package/es/base-ui/Divider/style.mjs.map +1 -0
  155. package/es/base-ui/Divider/type.d.mts +12 -0
  156. package/es/base-ui/DraggablePanel/atoms.mjs +56 -49
  157. package/es/base-ui/DraggablePanel/atoms.mjs.map +1 -1
  158. package/es/base-ui/DraggablePanel/style.mjs +30 -25
  159. package/es/base-ui/DraggablePanel/style.mjs.map +1 -1
  160. package/es/base-ui/Drawer/atoms.mjs.map +1 -1
  161. package/es/base-ui/DropdownMenu/atoms.mjs +1 -1
  162. package/es/base-ui/DropdownMenu/atoms.mjs.map +1 -1
  163. package/es/base-ui/DropdownMenu/renderItems.d.mts +0 -1
  164. package/es/base-ui/DropdownMenu/renderItems.mjs.map +1 -1
  165. package/es/base-ui/Form/components/FormTitle.mjs +1 -1
  166. package/es/base-ui/Form/components/FormTitle.mjs.map +1 -1
  167. package/es/base-ui/Form/type.d.mts +2 -2
  168. package/es/base-ui/Input/ClearButton.mjs +32 -0
  169. package/es/base-ui/Input/ClearButton.mjs.map +1 -0
  170. package/es/base-ui/Input/Input.mjs +30 -4
  171. package/es/base-ui/Input/Input.mjs.map +1 -1
  172. package/es/base-ui/Input/InputNumber.mjs +43 -22
  173. package/es/base-ui/Input/InputNumber.mjs.map +1 -1
  174. package/es/base-ui/Input/TextArea.mjs +50 -13
  175. package/es/base-ui/Input/TextArea.mjs.map +1 -1
  176. package/es/base-ui/Input/clearNativeValue.mjs +12 -0
  177. package/es/base-ui/Input/clearNativeValue.mjs.map +1 -0
  178. package/es/base-ui/Input/pressEnter.mjs +6 -0
  179. package/es/base-ui/Input/pressEnter.mjs.map +1 -0
  180. package/es/base-ui/Input/style.d.mts +6 -2
  181. package/es/base-ui/Input/style.mjs +67 -4
  182. package/es/base-ui/Input/style.mjs.map +1 -1
  183. package/es/base-ui/Input/type.d.mts +13 -2
  184. package/es/base-ui/List/List.d.mts +6 -0
  185. package/es/base-ui/List/List.mjs +50 -0
  186. package/es/base-ui/List/List.mjs.map +1 -0
  187. package/es/base-ui/List/ListRow.mjs +74 -0
  188. package/es/base-ui/List/ListRow.mjs.map +1 -0
  189. package/es/base-ui/List/index.d.mts +3 -0
  190. package/es/base-ui/List/style.mjs +146 -0
  191. package/es/base-ui/List/style.mjs.map +1 -0
  192. package/es/base-ui/List/type.d.mts +48 -0
  193. package/es/base-ui/Modal/atoms.mjs.map +1 -1
  194. package/es/base-ui/Modal/imperative.mjs +1 -1
  195. package/es/base-ui/Modal/imperative.mjs.map +1 -1
  196. package/es/base-ui/Modal/type.d.mts +1 -0
  197. package/es/base-ui/Popover/PopoverPortal.mjs.map +1 -1
  198. package/es/base-ui/Progress/Progress.mjs +16 -14
  199. package/es/base-ui/Progress/Progress.mjs.map +1 -1
  200. package/es/base-ui/Progress/style.mjs +16 -25
  201. package/es/base-ui/Progress/style.mjs.map +1 -1
  202. package/es/base-ui/QRCode/QRCode.d.mts +6 -0
  203. package/es/base-ui/QRCode/QRCode.mjs +105 -0
  204. package/es/base-ui/QRCode/QRCode.mjs.map +1 -0
  205. package/es/base-ui/QRCode/index.d.mts +3 -0
  206. package/es/base-ui/QRCode/qrPath.mjs +16 -0
  207. package/es/base-ui/QRCode/qrPath.mjs.map +1 -0
  208. package/es/base-ui/QRCode/style.mjs +52 -0
  209. package/es/base-ui/QRCode/style.mjs.map +1 -0
  210. package/es/base-ui/QRCode/type.d.mts +19 -0
  211. package/es/base-ui/Rate/Rate.d.mts +6 -0
  212. package/es/base-ui/Rate/Rate.mjs +111 -0
  213. package/es/base-ui/Rate/Rate.mjs.map +1 -0
  214. package/es/base-ui/Rate/index.d.mts +3 -0
  215. package/es/base-ui/Rate/style.mjs +81 -0
  216. package/es/base-ui/Rate/style.mjs.map +1 -0
  217. package/es/base-ui/Rate/type.d.mts +19 -0
  218. package/es/base-ui/Select/atoms.mjs.map +1 -1
  219. package/es/base-ui/Select/hooks.mjs.map +1 -1
  220. package/es/base-ui/Statistic/Statistic.d.mts +6 -0
  221. package/es/base-ui/Statistic/Statistic.mjs +42 -0
  222. package/es/base-ui/Statistic/Statistic.mjs.map +1 -0
  223. package/es/base-ui/Statistic/formatValue.d.mts +5 -0
  224. package/es/base-ui/Statistic/formatValue.mjs +23 -0
  225. package/es/base-ui/Statistic/formatValue.mjs.map +1 -0
  226. package/es/base-ui/Statistic/index.d.mts +4 -0
  227. package/es/base-ui/Statistic/style.mjs +34 -0
  228. package/es/base-ui/Statistic/style.mjs.map +1 -0
  229. package/es/base-ui/Statistic/type.d.mts +23 -0
  230. package/es/base-ui/Steps/Steps.d.mts +6 -0
  231. package/es/base-ui/Steps/Steps.mjs +74 -0
  232. package/es/base-ui/Steps/Steps.mjs.map +1 -0
  233. package/es/base-ui/Steps/index.d.mts +3 -0
  234. package/es/base-ui/Steps/style.mjs +155 -0
  235. package/es/base-ui/Steps/style.mjs.map +1 -0
  236. package/es/base-ui/Steps/type.d.mts +32 -0
  237. package/es/base-ui/Table/FilterMenu.mjs +45 -0
  238. package/es/base-ui/Table/FilterMenu.mjs.map +1 -0
  239. package/es/base-ui/Table/Table.d.mts +10 -0
  240. package/es/base-ui/Table/Table.mjs +134 -0
  241. package/es/base-ui/Table/Table.mjs.map +1 -0
  242. package/es/base-ui/Table/TableBody.mjs +59 -0
  243. package/es/base-ui/Table/TableBody.mjs.map +1 -0
  244. package/es/base-ui/Table/TableHead.mjs +50 -0
  245. package/es/base-ui/Table/TableHead.mjs.map +1 -0
  246. package/es/base-ui/Table/features.mjs +12 -0
  247. package/es/base-ui/Table/features.mjs.map +1 -0
  248. package/es/base-ui/Table/fixedOffsets.mjs +29 -0
  249. package/es/base-ui/Table/fixedOffsets.mjs.map +1 -0
  250. package/es/base-ui/Table/index.d.mts +3 -0
  251. package/es/base-ui/Table/style.mjs +168 -0
  252. package/es/base-ui/Table/style.mjs.map +1 -0
  253. package/es/base-ui/Table/toColumnDefs.mjs +26 -0
  254. package/es/base-ui/Table/toColumnDefs.mjs.map +1 -0
  255. package/es/base-ui/Table/type.d.mts +68 -0
  256. package/es/base-ui/Table/useTableState.mjs +99 -0
  257. package/es/base-ui/Table/useTableState.mjs.map +1 -0
  258. package/es/base-ui/Toast/imperative.mjs.map +1 -1
  259. package/es/base-ui/Tooltip/TooltipGroup.mjs.map +1 -1
  260. package/es/base-ui/Tooltip/TooltipStandalone.mjs.map +1 -1
  261. package/es/base-ui/index.d.mts +66 -21
  262. package/es/base-ui/index.mjs +42 -26
  263. package/es/base-ui/panelStyles.mjs +95 -0
  264. package/es/base-ui/panelStyles.mjs.map +1 -0
  265. package/es/chat/ChatList/components/HistoryDivider.mjs +9 -6
  266. package/es/chat/ChatList/components/HistoryDivider.mjs.map +1 -1
  267. package/es/chat/MessageModal/MessageModal.mjs +1 -1
  268. package/es/chat/TokenTag/TokenTag.mjs +1 -1
  269. package/es/color/CssVar/VarRow.mjs +1 -1
  270. package/es/color/CssVar/index.mjs +1 -1
  271. package/es/dashboard/FilterSidebar/FilterSidebar.mjs +1 -1
  272. package/es/i18n/resources/en/burger.d.mts +8 -0
  273. package/es/i18n/resources/en/burger.mjs +9 -0
  274. package/es/i18n/resources/en/burger.mjs.map +1 -0
  275. package/es/i18n/resources/en/colorPicker.d.mts +12 -0
  276. package/es/i18n/resources/en/colorPicker.mjs +13 -0
  277. package/es/i18n/resources/en/colorPicker.mjs.map +1 -0
  278. package/es/i18n/resources/en/common.d.mts +1 -0
  279. package/es/i18n/resources/en/common.mjs +1 -0
  280. package/es/i18n/resources/en/common.mjs.map +1 -1
  281. package/es/i18n/resources/en/datePicker.d.mts +13 -0
  282. package/es/i18n/resources/en/datePicker.mjs +14 -0
  283. package/es/i18n/resources/en/datePicker.mjs.map +1 -0
  284. package/es/i18n/resources/en/index.d.mts +15 -11
  285. package/es/i18n/resources/en/index.mjs +9 -1
  286. package/es/i18n/resources/en/index.mjs.map +1 -1
  287. package/es/i18n/resources/en/qrCode.d.mts +9 -0
  288. package/es/i18n/resources/en/qrCode.mjs +10 -0
  289. package/es/i18n/resources/en/qrCode.mjs.map +1 -0
  290. package/es/i18n/resources/zhCn/burger.d.mts +8 -0
  291. package/es/i18n/resources/zhCn/burger.mjs +9 -0
  292. package/es/i18n/resources/zhCn/burger.mjs.map +1 -0
  293. package/es/i18n/resources/zhCn/colorPicker.d.mts +12 -0
  294. package/es/i18n/resources/zhCn/colorPicker.mjs +13 -0
  295. package/es/i18n/resources/zhCn/colorPicker.mjs.map +1 -0
  296. package/es/i18n/resources/zhCn/common.d.mts +1 -0
  297. package/es/i18n/resources/zhCn/common.mjs +1 -0
  298. package/es/i18n/resources/zhCn/common.mjs.map +1 -1
  299. package/es/i18n/resources/zhCn/datePicker.d.mts +13 -0
  300. package/es/i18n/resources/zhCn/datePicker.mjs +14 -0
  301. package/es/i18n/resources/zhCn/datePicker.mjs.map +1 -0
  302. package/es/i18n/resources/zhCn/index.d.mts +15 -11
  303. package/es/i18n/resources/zhCn/index.mjs +9 -1
  304. package/es/i18n/resources/zhCn/index.mjs.map +1 -1
  305. package/es/i18n/resources/zhCn/qrCode.d.mts +9 -0
  306. package/es/i18n/resources/zhCn/qrCode.mjs +10 -0
  307. package/es/i18n/resources/zhCn/qrCode.mjs.map +1 -0
  308. package/es/i18n/types.d.mts +14 -10
  309. package/es/index.d.mts +12 -11
  310. package/es/index.mjs +23 -23
  311. package/es/mdx/Cards/Card.d.mts +2 -2
  312. package/es/mdx/Cards/Card.mjs +1 -1
  313. package/es/mdx/Cards/Card.mjs.map +1 -1
  314. package/es/mdx/Mdx/index.mjs +1 -1
  315. package/es/mdx/Mdx/index.mjs.map +1 -1
  316. package/es/mdx/Tabs/index.d.mts +2 -2
  317. package/es/mdx/Tabs/index.mjs +7 -2
  318. package/es/mdx/Tabs/index.mjs.map +1 -1
  319. package/es/mdx/Tabs/style.mjs +33 -1
  320. package/es/mdx/Tabs/style.mjs.map +1 -1
  321. package/es/mdx/mdxComponents/Citation/PopoverPanel.mjs +1 -1
  322. package/es/mdx/mdxComponents/Citation/PopoverPanel.mjs.map +1 -1
  323. package/es/static-css/baseline.mjs +1 -4
  324. package/es/static-css/baseline.mjs.map +1 -1
  325. package/es/static-css/buildAntdStaticCss.mjs +1 -1
  326. package/package.json +3 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toColumnDefs.mjs","names":[],"sources":["../../../src/base-ui/Table/toColumnDefs.ts"],"sourcesContent":["import type { ColumnDef, RowData } from '@tanstack/react-table';\n\nimport type { TableFeatureSet } from './features';\nimport type { FilterValue, TableColumn } from './type';\n\nexport const getColumnId = (column: TableColumn<any>, index: number): string =>\n String(column.key ?? column.dataIndex ?? `__column_${index}`);\n\nexport const getCellValue = <T>(record: T, column: TableColumn<T>): unknown =>\n column.dataIndex ? record[column.dataIndex] : undefined;\n\nconst isEmptyFilter = (value: unknown) => !Array.isArray(value) || value.length === 0;\n\nexport const toColumnDefs = <T extends RowData>(\n columns: TableColumn<T>[],\n): ColumnDef<TableFeatureSet, T, unknown>[] =>\n columns.map((column, index) => {\n const needsStableId = Boolean(column.sorter) || Boolean(column.filters?.length);\n if (needsStableId && column.key == null && column.dataIndex == null) {\n throw new Error('[Table] sortable or filterable columns need a `key` or `dataIndex`');\n }\n\n const comparator = typeof column.sorter === 'function' ? column.sorter : undefined;\n const { onFilter } = column;\n\n const filterFn = onFilter\n ? Object.assign(\n (row: { original: T }, _columnId: string, filterValue: FilterValue[]) =>\n filterValue.some((value) => onFilter(value, row.original)),\n { autoRemove: isEmptyFilter },\n )\n : undefined;\n\n return {\n accessorFn: (record: T) => getCellValue(record, column),\n enableColumnFilter: Boolean(column.filters?.length),\n enableSorting: Boolean(column.sorter),\n filterFn,\n id: getColumnId(column, index),\n sortDescFirst: column.sortDirections?.[0] === 'descend',\n ...(comparator && {\n sortFn: (rowA: { original: T }, rowB: { original: T }) =>\n comparator(rowA.original, rowB.original),\n sortUndefined: false,\n }),\n } as unknown as ColumnDef<TableFeatureSet, T, unknown>;\n });\n"],"mappings":";AAKA,MAAa,eAAe,QAA0B,UACpD,OAAO,OAAO,OAAO,OAAO,aAAa,YAAY,OAAO;AAE9D,MAAa,gBAAmB,QAAW,WACzC,OAAO,YAAY,OAAO,OAAO,aAAa,KAAA;AAEhD,MAAM,iBAAiB,UAAmB,CAAC,MAAM,QAAQ,KAAK,KAAK,MAAM,WAAW;AAEpF,MAAa,gBACX,YAEA,QAAQ,KAAK,QAAQ,UAAU;CAE7B,KADsB,QAAQ,OAAO,MAAM,KAAK,QAAQ,OAAO,SAAS,MAAM,MACzD,OAAO,OAAO,QAAQ,OAAO,aAAa,MAC7D,MAAM,IAAI,MAAM,oEAAoE;CAGtF,MAAM,aAAa,OAAO,OAAO,WAAW,aAAa,OAAO,SAAS,KAAA;CACzE,MAAM,EAAE,aAAa;CAErB,MAAM,WAAW,WACb,OAAO,QACJ,KAAsB,WAAmB,gBACxC,YAAY,MAAM,UAAU,SAAS,OAAO,IAAI,QAAQ,CAAC,GAC3D,EAAE,YAAY,cAAc,CAC9B,IACA,KAAA;CAEJ,OAAO;EACL,aAAa,WAAc,aAAa,QAAQ,MAAM;EACtD,oBAAoB,QAAQ,OAAO,SAAS,MAAM;EAClD,eAAe,QAAQ,OAAO,MAAM;EACpC;EACA,IAAI,YAAY,QAAQ,KAAK;EAC7B,eAAe,OAAO,iBAAiB,OAAO;EAC9C,GAAI,cAAc;GAChB,SAAS,MAAuB,SAC9B,WAAW,KAAK,UAAU,KAAK,QAAQ;GACzC,eAAe;EACjB;CACF;AACF,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { CSSProperties, HTMLAttributes, Key, ReactNode, Ref, TdHTMLAttributes } from "react";
2
+ //#region src/base-ui/Table/type.d.ts
3
+ type SortOrder = 'ascend' | 'descend';
4
+ type FilterValue = string | number | boolean;
5
+ interface TableColumn<T> {
6
+ align?: 'left' | 'center' | 'right';
7
+ className?: string;
8
+ dataIndex?: Extract<keyof T, string>;
9
+ defaultSortOrder?: SortOrder;
10
+ ellipsis?: boolean;
11
+ filters?: {
12
+ text: ReactNode;
13
+ value: FilterValue;
14
+ }[];
15
+ fixed?: 'left' | 'right';
16
+ key?: Key;
17
+ onCell?: (record: T, index: number) => TdHTMLAttributes<HTMLTableCellElement>;
18
+ onFilter?: (value: FilterValue, record: T) => boolean;
19
+ render?: (value: any, record: T, index: number) => ReactNode;
20
+ sortDirections?: SortOrder[];
21
+ sorter?: boolean | ((a: T, b: T) => number);
22
+ title?: ReactNode;
23
+ width?: number | string;
24
+ }
25
+ interface TablePaginationConfig {
26
+ current?: number;
27
+ defaultCurrent?: number;
28
+ defaultPageSize?: number;
29
+ onChange?: (page: number, pageSize: number) => void;
30
+ onShowSizeChange?: (current: number, size: number) => void;
31
+ pageSize?: number;
32
+ pageSizeOptions?: number[];
33
+ showSizeChanger?: boolean;
34
+ total?: number;
35
+ }
36
+ interface TableSorterResult<T> {
37
+ column?: TableColumn<T>;
38
+ columnKey?: Key;
39
+ order?: SortOrder;
40
+ }
41
+ type TableFilters = Record<string, FilterValue[] | null>;
42
+ type TableSemanticName = 'body' | 'cell' | 'header' | 'row' | 'wrapper';
43
+ interface TableProps<T> {
44
+ bordered?: boolean;
45
+ className?: string;
46
+ classNames?: Partial<Record<TableSemanticName, string>>;
47
+ columns: TableColumn<T>[];
48
+ dataSource?: T[];
49
+ emptyText?: ReactNode;
50
+ loading?: boolean;
51
+ onChange?: (pagination: TablePaginationConfig, filters: TableFilters, sorter: TableSorterResult<T>) => void;
52
+ onRow?: (record: T, index: number) => HTMLAttributes<HTMLTableRowElement>;
53
+ pagination?: false | TablePaginationConfig;
54
+ ref?: Ref<HTMLDivElement>;
55
+ rowClassName?: string | ((record: T, index: number) => string);
56
+ rowKey: Extract<keyof T, string> | ((record: T) => Key);
57
+ scroll?: {
58
+ x?: number | string;
59
+ y?: number | string;
60
+ };
61
+ size?: 'small' | 'middle';
62
+ style?: CSSProperties;
63
+ styles?: Partial<Record<TableSemanticName, CSSProperties>>;
64
+ tableLayout?: 'auto' | 'fixed';
65
+ }
66
+ //#endregion
67
+ export { FilterValue, SortOrder, TableColumn, TableFilters, TablePaginationConfig, TableProps, TableSemanticName, TableSorterResult };
68
+ //# sourceMappingURL=type.d.mts.map
@@ -0,0 +1,99 @@
1
+ import { getColumnId } from "./toColumnDefs.mjs";
2
+ import { useState } from "react";
3
+ //#region src/base-ui/Table/useTableState.ts
4
+ const resolve = (updater, previous) => typeof updater === "function" ? updater(previous) : updater;
5
+ const initialSorting = (columns) => {
6
+ const index = columns.findIndex((column) => column.defaultSortOrder);
7
+ if (index === -1) return [];
8
+ return [{
9
+ desc: columns[index].defaultSortOrder === "descend",
10
+ id: getColumnId(columns[index], index)
11
+ }];
12
+ };
13
+ const useTableState = ({ columns, onChange, pagination }) => {
14
+ const config = pagination === false ? void 0 : pagination ?? {};
15
+ const columnIds = columns.map((column, index) => getColumnId(column, index));
16
+ const [sorting, setSorting] = useState(() => initialSorting(columns));
17
+ const [columnFilters, setColumnFilters] = useState([]);
18
+ const [innerPage, setInnerPage] = useState({
19
+ pageIndex: (config?.defaultCurrent ?? 1) - 1,
20
+ pageSize: config?.defaultPageSize ?? 10
21
+ });
22
+ const page = {
23
+ pageIndex: config?.current === void 0 ? innerPage.pageIndex : config.current - 1,
24
+ pageSize: config?.pageSize ?? innerPage.pageSize
25
+ };
26
+ const toFilters = (state) => Object.fromEntries(columns.map((column, index) => [column, columnIds[index]]).filter(([column]) => column.filters?.length).map(([, id]) => [id, state.find((filter) => filter.id === id)?.value ?? null]));
27
+ const toSorter = (state) => {
28
+ const [active] = state;
29
+ if (!active) return {};
30
+ return {
31
+ column: columns[columnIds.indexOf(active.id)],
32
+ columnKey: active.id,
33
+ order: active.desc ? "descend" : "ascend"
34
+ };
35
+ };
36
+ const toPaginationArg = (next) => config ? {
37
+ ...config,
38
+ current: next.pageIndex + 1,
39
+ pageSize: next.pageSize
40
+ } : {};
41
+ const report = (nextPage, nextFilters, nextSorting) => onChange?.(toPaginationArg(nextPage), toFilters(nextFilters), toSorter(nextSorting));
42
+ const changePage = (next) => {
43
+ setInnerPage(next);
44
+ const sizeChanged = next.pageSize !== page.pageSize;
45
+ if (sizeChanged) config?.onShowSizeChange?.(next.pageIndex + 1, next.pageSize);
46
+ if (sizeChanged || next.pageIndex !== page.pageIndex) config?.onChange?.(next.pageIndex + 1, next.pageSize);
47
+ };
48
+ const clampPage = (pageIndex) => {
49
+ if (config?.current === void 0) {
50
+ setInnerPage((previous) => ({
51
+ ...previous,
52
+ pageIndex
53
+ }));
54
+ return;
55
+ }
56
+ config.onChange?.(pageIndex + 1, page.pageSize);
57
+ };
58
+ const onSortingChange = (updater) => {
59
+ const next = resolve(updater, sorting);
60
+ const firstPage = {
61
+ ...page,
62
+ pageIndex: 0
63
+ };
64
+ setSorting(next);
65
+ changePage(firstPage);
66
+ report(firstPage, columnFilters, next);
67
+ };
68
+ const onColumnFiltersChange = (updater) => {
69
+ const next = resolve(updater, columnFilters);
70
+ const firstPage = {
71
+ ...page,
72
+ pageIndex: 0
73
+ };
74
+ setColumnFilters(next);
75
+ changePage(firstPage);
76
+ report(firstPage, next, sorting);
77
+ };
78
+ const onPaginationChange = (updater) => {
79
+ const next = resolve(updater, page);
80
+ changePage(next);
81
+ report(next, columnFilters, sorting);
82
+ };
83
+ return {
84
+ clampPage,
85
+ columnFilters,
86
+ columnIds,
87
+ config,
88
+ manualSorting: columns.some((column) => column.sorter === true),
89
+ onColumnFiltersChange,
90
+ onPaginationChange,
91
+ onSortingChange,
92
+ page,
93
+ sorting
94
+ };
95
+ };
96
+ //#endregion
97
+ export { useTableState };
98
+
99
+ //# sourceMappingURL=useTableState.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTableState.mjs","names":[],"sources":["../../../src/base-ui/Table/useTableState.ts"],"sourcesContent":["import type {\n ColumnFiltersState,\n PaginationState,\n SortingState,\n Updater,\n} from '@tanstack/react-table';\nimport { useState } from 'react';\n\nimport { getColumnId } from './toColumnDefs';\nimport type {\n TableColumn,\n TableFilters,\n TablePaginationConfig,\n TableProps,\n TableSorterResult,\n} from './type';\n\nconst resolve = <S>(updater: Updater<S>, previous: S): S =>\n typeof updater === 'function' ? (updater as (old: S) => S)(previous) : updater;\n\nconst initialSorting = (columns: TableColumn<any>[]): SortingState => {\n const index = columns.findIndex((column) => column.defaultSortOrder);\n if (index === -1) return [];\n return [\n { desc: columns[index].defaultSortOrder === 'descend', id: getColumnId(columns[index], index) },\n ];\n};\n\nexport const useTableState = <T>({\n columns,\n onChange,\n pagination,\n}: Pick<TableProps<T>, 'columns' | 'onChange' | 'pagination'>) => {\n const config: TablePaginationConfig | undefined =\n pagination === false ? undefined : (pagination ?? {});\n const columnIds = columns.map((column, index) => getColumnId(column, index));\n\n const [sorting, setSorting] = useState<SortingState>(() => initialSorting(columns));\n const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([]);\n const [innerPage, setInnerPage] = useState<PaginationState>({\n pageIndex: (config?.defaultCurrent ?? 1) - 1,\n pageSize: config?.defaultPageSize ?? 10,\n });\n\n const page: PaginationState = {\n pageIndex: config?.current === undefined ? innerPage.pageIndex : config.current - 1,\n pageSize: config?.pageSize ?? innerPage.pageSize,\n };\n\n const toFilters = (state: ColumnFiltersState): TableFilters =>\n Object.fromEntries(\n columns\n .map((column, index) => [column, columnIds[index]] as const)\n .filter(([column]) => column.filters?.length)\n .map(([, id]) => [\n id,\n (state.find((filter) => filter.id === id)?.value as TableFilters[string]) ?? null,\n ]),\n );\n\n const toSorter = (state: SortingState): TableSorterResult<T> => {\n const [active] = state;\n if (!active) return {};\n const index = columnIds.indexOf(active.id);\n return {\n column: columns[index],\n columnKey: active.id,\n order: active.desc ? 'descend' : 'ascend',\n };\n };\n\n const toPaginationArg = (next: PaginationState): TablePaginationConfig =>\n config ? { ...config, current: next.pageIndex + 1, pageSize: next.pageSize } : {};\n\n const report = (\n nextPage: PaginationState,\n nextFilters: ColumnFiltersState,\n nextSorting: SortingState,\n ) => onChange?.(toPaginationArg(nextPage), toFilters(nextFilters), toSorter(nextSorting));\n\n const changePage = (next: PaginationState) => {\n setInnerPage(next);\n const sizeChanged = next.pageSize !== page.pageSize;\n if (sizeChanged) config?.onShowSizeChange?.(next.pageIndex + 1, next.pageSize);\n if (sizeChanged || next.pageIndex !== page.pageIndex) {\n config?.onChange?.(next.pageIndex + 1, next.pageSize);\n }\n };\n\n const clampPage = (pageIndex: number) => {\n if (config?.current === undefined) {\n setInnerPage((previous) => ({ ...previous, pageIndex }));\n return;\n }\n config.onChange?.(pageIndex + 1, page.pageSize);\n };\n\n const onSortingChange = (updater: Updater<SortingState>) => {\n const next = resolve(updater, sorting);\n const firstPage = { ...page, pageIndex: 0 };\n setSorting(next);\n changePage(firstPage);\n report(firstPage, columnFilters, next);\n };\n\n const onColumnFiltersChange = (updater: Updater<ColumnFiltersState>) => {\n const next = resolve(updater, columnFilters);\n const firstPage = { ...page, pageIndex: 0 };\n setColumnFilters(next);\n changePage(firstPage);\n report(firstPage, next, sorting);\n };\n\n const onPaginationChange = (updater: Updater<PaginationState>) => {\n const next = resolve(updater, page);\n changePage(next);\n report(next, columnFilters, sorting);\n };\n\n return {\n clampPage,\n columnFilters,\n columnIds,\n config,\n manualSorting: columns.some((column) => column.sorter === true),\n onColumnFiltersChange,\n onPaginationChange,\n onSortingChange,\n page,\n sorting,\n };\n};\n"],"mappings":";;;AAiBA,MAAM,WAAc,SAAqB,aACvC,OAAO,YAAY,aAAc,QAA0B,QAAQ,IAAI;AAEzE,MAAM,kBAAkB,YAA8C;CACpE,MAAM,QAAQ,QAAQ,WAAW,WAAW,OAAO,gBAAgB;CACnE,IAAI,UAAU,IAAI,OAAO,CAAC;CAC1B,OAAO,CACL;EAAE,MAAM,QAAQ,MAAM,CAAC,qBAAqB;EAAW,IAAI,YAAY,QAAQ,QAAQ,KAAK;CAAE,CAChG;AACF;AAEA,MAAa,iBAAoB,EAC/B,SACA,UACA,iBACgE;CAChE,MAAM,SACJ,eAAe,QAAQ,KAAA,IAAa,cAAc,CAAC;CACrD,MAAM,YAAY,QAAQ,KAAK,QAAQ,UAAU,YAAY,QAAQ,KAAK,CAAC;CAE3E,MAAM,CAAC,SAAS,cAAc,eAA6B,eAAe,OAAO,CAAC;CAClF,MAAM,CAAC,eAAe,oBAAoB,SAA6B,CAAC,CAAC;CACzE,MAAM,CAAC,WAAW,gBAAgB,SAA0B;EAC1D,YAAY,QAAQ,kBAAkB,KAAK;EAC3C,UAAU,QAAQ,mBAAmB;CACvC,CAAC;CAED,MAAM,OAAwB;EAC5B,WAAW,QAAQ,YAAY,KAAA,IAAY,UAAU,YAAY,OAAO,UAAU;EAClF,UAAU,QAAQ,YAAY,UAAU;CAC1C;CAEA,MAAM,aAAa,UACjB,OAAO,YACL,QACG,KAAK,QAAQ,UAAU,CAAC,QAAQ,UAAU,MAAM,CAAU,CAAC,CAC3D,QAAQ,CAAC,YAAY,OAAO,SAAS,MAAM,CAAC,CAC5C,KAAK,GAAG,QAAQ,CACf,IACC,MAAM,MAAM,WAAW,OAAO,OAA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;CACjC;CAEA,MAAM,sBAAsB,YAAsC;EAChE,MAAM,OAAO,QAAQ,SAAS,IAAI;EAClC,WAAW,IAAI;EACf,OAAO,MAAM,eAAe,OAAO;CACrC;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA,eAAe,QAAQ,MAAM,WAAW,OAAO,WAAW,IAAI;EAC9D;EACA;EACA;EACA;EACA;CACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"imperative.mjs","names":["BaseToast"],"sources":["../../../src/base-ui/Toast/imperative.tsx"],"sourcesContent":["'use client';\n\nimport { Toast as BaseToast } from '@base-ui/react/toast';\nimport { cx } from 'antd-style';\nimport { memo, useEffect, useId, useState, useSyncExternalStore } from 'react';\n\nimport { useIsClient } from '@/hooks/useIsClient';\nimport { useAppElement } from '@/ThemeProvider';\n\nimport { acquireLayerZIndex } from '../zIndex';\nimport { ToastContext } from './context';\nimport { isActiveToastHost, registerToastHost, subscribeToastHost } from './hostGuard';\nimport {\n __resetPendingToastQueueForTests,\n markToastHostNotReady,\n markToastHostReady,\n runWhenToastHostReady,\n} from './pendingQueue';\nimport { viewportVariants } from './style';\nimport ToastItem from './Toast';\nimport {\n type ToastAPI,\n type ToastInstance,\n type ToastOptions,\n type ToastPosition,\n type ToastPromiseOptions,\n type ToastType,\n} from './type';\n\n// All possible positions\nconst ALL_POSITIONS: ToastPosition[] = [\n 'top',\n 'top-left',\n 'top-right',\n 'bottom',\n 'bottom-left',\n 'bottom-right',\n];\n\n// Global state management\ninterface ToastState {\n duration: number;\n limit: number;\n position: ToastPosition;\n swipeDirection: ('left' | 'right' | 'up' | 'down') | ('left' | 'right' | 'up' | 'down')[];\n}\n\nlet globalState: ToastState = {\n duration: 5000,\n limit: 5,\n position: 'bottom-right',\n swipeDirection: ['down', 'right'],\n};\n\n// Toast managers for each position\nconst toastManagers: Record<ToastPosition, ReturnType<typeof BaseToast.createToastManager>> = {\n 'bottom': BaseToast.createToastManager(),\n 'bottom-left': BaseToast.createToastManager(),\n 'bottom-right': BaseToast.createToastManager(),\n 'top': BaseToast.createToastManager(),\n 'top-left': BaseToast.createToastManager(),\n 'top-right': BaseToast.createToastManager(),\n};\n\ninterface ActiveToast {\n superseded: boolean;\n}\n\nconst activeToasts: Record<ToastPosition, Map<string, ActiveToast>> = {\n 'bottom': new Map(),\n 'bottom-left': new Map(),\n 'bottom-right': new Map(),\n 'top': new Map(),\n 'top-left': new Map(),\n 'top-right': new Map(),\n};\n\nconst getManager = (position: ToastPosition) => toastManagers[position];\n\nlet toastIdCounter = 0;\nconst generateToastId = (): string =>\n `toast-${Date.now().toString(36)}-${(toastIdCounter++).toString(36)}`;\n\nconst findActivePosition = (id: string) => ALL_POSITIONS.find((pos) => activeToasts[pos].has(id));\n\n// Base UI prepends every new toast, so the last entry we registered is the one\n// currently rendered at the front of the stack.\nconst isFrontMost = (position: ToastPosition, id: string) =>\n Array.from(activeToasts[position].keys()).at(-1) === id;\n\nconst normalizeOptions = (\n optionsOrMessage: Omit<ToastOptions, 'type'> | string,\n type: ToastType,\n): ToastOptions => {\n if (typeof optionsOrMessage === 'string') {\n return {\n description: optionsOrMessage,\n type,\n };\n }\n return {\n ...optionsOrMessage,\n type,\n };\n};\n\nconst createToastInstance = (id: string, position: ToastPosition): ToastInstance => ({\n close: () => runWhenToastHostReady(() => getManager(position).close(id)),\n id,\n update: (options) => {\n runWhenToastHostReady(() =>\n getManager(position).update(id, {\n data: options,\n description: options.description,\n title: options.title,\n }),\n );\n },\n});\n\n// createToastManager() is a stateless emitter (see @base-ui/react/toast/createToastManager):\n// add/close/update just broadcast to whatever is currently subscribed, and the\n// ToastProvider that owns the real toast state only subscribes from a passive\n// useEffect. Calls made while no host is ready (e.g. mid-handoff between the\n// previously-active ToastHost unmounting and its successor's Provider\n// subscribing) would otherwise be silently dropped, so every manager call is\n// routed through runWhenToastHostReady to queue until a host is listening.\nconst addToast = (options: ToastOptions): ToastInstance => {\n const position = options.placement ?? globalState.position;\n const manager = getManager(position);\n const { id: dedupeId, onClose, onRemove } = options;\n\n if (dedupeId) {\n const prevPosition = findActivePosition(dedupeId);\n // Already the front-most toast: let Base UI upsert it in place so it only\n // refreshes its content and timer, without replaying the slide-in animation.\n const shouldPromote =\n prevPosition && !(prevPosition === position && isFrontMost(position, dedupeId));\n\n if (shouldPromote) {\n // Closing marks the toast as `ending`, which makes the following `add`\n // drop it and prepend a fresh one — Base UI's own upsert keeps the\n // original slot instead.\n activeToasts[prevPosition].get(dedupeId)!.superseded = true;\n activeToasts[prevPosition].delete(dedupeId);\n runWhenToastHostReady(() => getManager(prevPosition).close(dedupeId));\n }\n }\n\n const id = dedupeId ?? generateToastId();\n const active: ActiveToast = { superseded: false };\n activeToasts[position].set(id, active);\n runWhenToastHostReady(() => {\n manager.add({\n id,\n data: options,\n description: options.description,\n onClose: () => {\n if (active.superseded) return;\n onClose?.();\n },\n onRemove: () => {\n if (active.superseded) return;\n activeToasts[position].delete(id);\n onRemove?.();\n },\n timeout: options.duration ?? globalState.duration,\n title: options.title,\n });\n });\n return createToastInstance(id, position);\n};\n\nconst dismissToast = (id?: string) => {\n if (id) {\n // Try to close from all managers since we don't know which position the toast is in\n for (const [position, manager] of Object.entries(toastManagers)) {\n activeToasts[position as ToastPosition].delete(id);\n runWhenToastHostReady(() => manager.close(id));\n }\n } else {\n // Clear all toasts\n for (const [position, manager] of Object.entries(toastManagers)) {\n const ids = Array.from(activeToasts[position as ToastPosition].keys());\n activeToasts[position as ToastPosition].clear();\n runWhenToastHostReady(() => {\n for (const toastId of ids) {\n manager.close(toastId);\n }\n });\n }\n }\n};\n\nconst createSuccessToast = (\n optionsOrMessage: Omit<ToastOptions, 'type'> | string,\n): ToastInstance => {\n return addToast(normalizeOptions(optionsOrMessage, 'success'));\n};\n\nconst createErrorToast = (optionsOrMessage: Omit<ToastOptions, 'type'> | string): ToastInstance => {\n return addToast(normalizeOptions(optionsOrMessage, 'error'));\n};\n\nconst createInfoToast = (optionsOrMessage: Omit<ToastOptions, 'type'> | string): ToastInstance => {\n return addToast(normalizeOptions(optionsOrMessage, 'info'));\n};\n\nconst createWarningToast = (\n optionsOrMessage: Omit<ToastOptions, 'type'> | string,\n): ToastInstance => {\n return addToast(normalizeOptions(optionsOrMessage, 'warning'));\n};\n\nconst createLoadingToast = (\n optionsOrMessage: Omit<ToastOptions, 'type'> | string,\n): ToastInstance => {\n const options = normalizeOptions(optionsOrMessage, 'loading');\n // Loading toasts don't auto-dismiss by default\n return addToast({ duration: 0, ...options });\n};\n\nasync function promiseToast<T>(promise: Promise<T>, options: ToastPromiseOptions<T>): Promise<T> {\n const loadingOptions =\n typeof options.loading === 'string'\n ? { description: options.loading }\n : (options.loading as ToastOptions);\n\n const loadingToast = addToast({\n closable: false,\n duration: 0,\n type: 'loading',\n ...loadingOptions,\n });\n\n try {\n const result = await promise;\n\n loadingToast.close();\n\n const successOptions = (() => {\n if (typeof options.success === 'string') {\n return { description: options.success };\n }\n if (typeof options.success === 'function') {\n return { description: options.success(result) };\n }\n return options.success as ToastOptions;\n })();\n\n addToast({ type: 'success', ...successOptions });\n\n return result;\n } catch (error) {\n loadingToast.close();\n\n const errorOptions = (() => {\n if (typeof options.error === 'string') {\n return { description: options.error };\n }\n if (typeof options.error === 'function') {\n return { description: options.error(error as Error) };\n }\n return options.error as ToastOptions;\n })();\n\n addToast({ type: 'error', ...errorOptions });\n\n throw error;\n }\n}\n\n// Base toast function\nconst baseToast = (options: ToastOptions): ToastInstance => {\n return addToast({ type: 'default', ...options });\n};\n\n// Toast API\nexport const toast: ToastAPI = Object.assign(baseToast, {\n dismiss: dismissToast,\n error: createErrorToast,\n info: createInfoToast,\n loading: createLoadingToast,\n promise: promiseToast,\n success: createSuccessToast,\n warning: createWarningToast,\n});\n\n// Toast List Component\nconst ToastList = memo(() => {\n const { toasts } = BaseToast.useToastManager();\n return toasts.map((t) => <ToastItem key={t.id} toast={t} />);\n});\n\nToastList.displayName = 'ToastList';\n\nexport interface ToastHostProps {\n className?: string;\n /**\n * Default duration for toasts\n * @default 5000\n */\n duration?: number;\n /**\n * Maximum number of toasts\n * @default 5\n */\n limit?: number;\n /**\n * Toast position\n * @default 'bottom-right'\n */\n position?: ToastPosition;\n /**\n * Root element for portal\n */\n root?: HTMLElement | ShadowRoot | null;\n /**\n * Swipe direction to dismiss\n * @default ['down', 'right']\n */\n swipeDirection?: ('left' | 'right' | 'up' | 'down') | ('left' | 'right' | 'up' | 'down')[];\n}\n\nexport const ToastHost = memo(\n ({\n root,\n className,\n duration = 5000,\n limit = 5,\n position = 'bottom-right',\n swipeDirection = ['down', 'right'],\n }: ToastHostProps) => {\n const isClient = useIsClient();\n const appElement = useAppElement();\n const [viewportZIndex, setViewportZIndex] = useState<number | undefined>(undefined);\n const hostId = useId();\n\n useEffect(() => registerToastHost(hostId), [hostId]);\n\n const isActive = useSyncExternalStore(\n subscribeToastHost,\n () => isActiveToastHost(hostId),\n () => false,\n );\n\n useEffect(() => {\n if (!isActive) return;\n globalState = {\n duration,\n limit,\n position,\n swipeDirection,\n };\n }, [duration, limit, position, swipeDirection, isActive]);\n\n useEffect(() => {\n if (!isActive) return;\n setViewportZIndex(acquireLayerZIndex('toast'));\n }, [isActive]);\n\n useEffect(() => {\n if (!isActive || !isClient) return undefined;\n // Runs after the six BaseToast.Provider children below have committed\n // and subscribed (child effects run before the parent's), so the\n // managers are guaranteed to have a live listener once this fires.\n markToastHostReady();\n return () => {\n markToastHostNotReady();\n };\n }, [isActive, isClient]);\n\n if (!isClient || !isActive) return null;\n\n const container = root ?? appElement ?? document.body;\n\n return ALL_POSITIONS.map((pos) => (\n <ToastContext key={pos} value={{ position: pos, swipeDirection }}>\n <BaseToast.Provider limit={limit} timeout={duration} toastManager={getManager(pos)}>\n <BaseToast.Portal container={container}>\n <BaseToast.Viewport\n className={cx(viewportVariants({ position: pos }), className)}\n style={{ zIndex: viewportZIndex }}\n >\n <ToastList />\n </BaseToast.Viewport>\n </BaseToast.Portal>\n </BaseToast.Provider>\n </ToastContext>\n ));\n },\n);\n\nToastHost.displayName = 'ToastHost';\n\n// Hook to use toast manager\nexport const useToast = () => toast;\n\nexport const __resetToastStateForTests = (): void => {\n globalState = {\n duration: 5000,\n limit: 5,\n position: 'bottom-right',\n swipeDirection: ['down', 'right'],\n };\n for (const position of ALL_POSITIONS) {\n toastManagers[position] = BaseToast.createToastManager();\n activeToasts[position].clear();\n }\n __resetPendingToastQueueForTests();\n};\n"],"mappings":";;;;;;;;;;;;;;AA8BA,MAAM,gBAAiC;CACrC;CACA;CACA;CACA;CACA;CACA;AACF;AAUA,IAAI,cAA0B;CAC5B,UAAU;CACV,OAAO;CACP,UAAU;CACV,gBAAgB,CAAC,QAAQ,OAAO;AAClC;AAGA,MAAM,gBAAwF;CAC5F,UAAUA,MAAU,mBAAmB;CACvC,eAAeA,MAAU,mBAAmB;CAC5C,gBAAgBA,MAAU,mBAAmB;CAC7C,OAAOA,MAAU,mBAAmB;CACpC,YAAYA,MAAU,mBAAmB;CACzC,aAAaA,MAAU,mBAAmB;AAC5C;AAMA,MAAM,eAAgE;CACpE,0BAAU,IAAI,IAAI;CAClB,+BAAe,IAAI,IAAI;CACvB,gCAAgB,IAAI,IAAI;CACxB,uBAAO,IAAI,IAAI;CACf,4BAAY,IAAI,IAAI;CACpB,6BAAa,IAAI,IAAI;AACvB;AAEA,MAAM,cAAc,aAA4B,cAAc;AAE9D,IAAI,iBAAiB;AACrB,MAAM,wBACJ,SAAS,KAAK,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,IAAI,iBAAA,CAAkB,SAAS,EAAE;AAEpE,MAAM,sBAAsB,OAAe,cAAc,MAAM,QAAQ,aAAa,IAAI,CAAC,IAAI,EAAE,CAAC;AAIhG,MAAM,eAAe,UAAyB,OAC5C,MAAM,KAAK,aAAa,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM;AAEvD,MAAM,oBACJ,kBACA,SACiB;CACjB,IAAI,OAAO,qBAAqB,UAC9B,OAAO;EACL,aAAa;EACb;CACF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F,GAAG;EAAC;EAAU;EAAO;EAAU;EAAgB;CAAQ,CAAC;CAExD,gBAAgB;EACd,IAAI,CAAC,UAAU;EACf,kBAAkB,mBAAmB,OAAO,CAAC;CAC/C,GAAG,CAAC,QAAQ,CAAC;CAEb,gBAAgB;EACd,IAAI,CAAC,YAAY,CAAC,UAAU,OAAO,KAAA;EAInC,mBAAmB;EACnB,aAAa;GACX,sBAAsB;EACxB;CACF,GAAG,CAAC,UAAU,QAAQ,CAAC;CAEvB,IAAI,CAAC,YAAY,CAAC,UAAU,OAAO;CAEnC,MAAM,YAAY,QAAQ,cAAc,SAAS;CAEjD,OAAO,cAAc,KAAK,QACxB,oBAAC,cAAD;EAAwB,OAAO;GAAE,UAAU;GAAK;EAAe;EAC7D,UAAA,oBAACA,MAAU,UAAX;GAA2B;GAAO,SAAS;GAAU,cAAc,WAAW,GAAG;GAC/E,UAAA,oBAACA,MAAU,QAAX;IAA6B;IAC3B,UAAA,oBAACA,MAAU,UAAX;KACE,WAAW,GAAG,iBAAiB,EAAE,UAAU,IAAI,CAAC,GAAG,SAAS;KAC5D,OAAO,EAAE,QAAQ,eAAe;KAEhC,UAAA,oBAAC,WAAD,CAAY,CAAA;IACM,CAAA;GACJ,CAAA;EACA,CAAA;CACR,GAXK,GAWL,CACf;AACH,CACF;AAEA,UAAU,cAAc;AAGxB,MAAa,iBAAiB"}
1
+ {"version":3,"file":"imperative.mjs","names":["BaseToast"],"sources":["../../../src/base-ui/Toast/imperative.tsx"],"sourcesContent":["'use client';\n\nimport { Toast as BaseToast } from '@base-ui/react/toast';\nimport { cx } from 'antd-style';\nimport { memo, useEffect, useId, useState, useSyncExternalStore } from 'react';\n\nimport { useIsClient } from '@/hooks/useIsClient';\nimport { useAppElement } from '@/ThemeProvider/AppElementContext';\n\nimport { acquireLayerZIndex } from '../zIndex';\nimport { ToastContext } from './context';\nimport { isActiveToastHost, registerToastHost, subscribeToastHost } from './hostGuard';\nimport {\n __resetPendingToastQueueForTests,\n markToastHostNotReady,\n markToastHostReady,\n runWhenToastHostReady,\n} from './pendingQueue';\nimport { viewportVariants } from './style';\nimport ToastItem from './Toast';\nimport {\n type ToastAPI,\n type ToastInstance,\n type ToastOptions,\n type ToastPosition,\n type ToastPromiseOptions,\n type ToastType,\n} from './type';\n\n// All possible positions\nconst ALL_POSITIONS: ToastPosition[] = [\n 'top',\n 'top-left',\n 'top-right',\n 'bottom',\n 'bottom-left',\n 'bottom-right',\n];\n\n// Global state management\ninterface ToastState {\n duration: number;\n limit: number;\n position: ToastPosition;\n swipeDirection: ('left' | 'right' | 'up' | 'down') | ('left' | 'right' | 'up' | 'down')[];\n}\n\nlet globalState: ToastState = {\n duration: 5000,\n limit: 5,\n position: 'bottom-right',\n swipeDirection: ['down', 'right'],\n};\n\n// Toast managers for each position\nconst toastManagers: Record<ToastPosition, ReturnType<typeof BaseToast.createToastManager>> = {\n 'bottom': BaseToast.createToastManager(),\n 'bottom-left': BaseToast.createToastManager(),\n 'bottom-right': BaseToast.createToastManager(),\n 'top': BaseToast.createToastManager(),\n 'top-left': BaseToast.createToastManager(),\n 'top-right': BaseToast.createToastManager(),\n};\n\ninterface ActiveToast {\n superseded: boolean;\n}\n\nconst activeToasts: Record<ToastPosition, Map<string, ActiveToast>> = {\n 'bottom': new Map(),\n 'bottom-left': new Map(),\n 'bottom-right': new Map(),\n 'top': new Map(),\n 'top-left': new Map(),\n 'top-right': new Map(),\n};\n\nconst getManager = (position: ToastPosition) => toastManagers[position];\n\nlet toastIdCounter = 0;\nconst generateToastId = (): string =>\n `toast-${Date.now().toString(36)}-${(toastIdCounter++).toString(36)}`;\n\nconst findActivePosition = (id: string) => ALL_POSITIONS.find((pos) => activeToasts[pos].has(id));\n\n// Base UI prepends every new toast, so the last entry we registered is the one\n// currently rendered at the front of the stack.\nconst isFrontMost = (position: ToastPosition, id: string) =>\n Array.from(activeToasts[position].keys()).at(-1) === id;\n\nconst normalizeOptions = (\n optionsOrMessage: Omit<ToastOptions, 'type'> | string,\n type: ToastType,\n): ToastOptions => {\n if (typeof optionsOrMessage === 'string') {\n return {\n description: optionsOrMessage,\n type,\n };\n }\n return {\n ...optionsOrMessage,\n type,\n };\n};\n\nconst createToastInstance = (id: string, position: ToastPosition): ToastInstance => ({\n close: () => runWhenToastHostReady(() => getManager(position).close(id)),\n id,\n update: (options) => {\n runWhenToastHostReady(() =>\n getManager(position).update(id, {\n data: options,\n description: options.description,\n title: options.title,\n }),\n );\n },\n});\n\n// createToastManager() is a stateless emitter (see @base-ui/react/toast/createToastManager):\n// add/close/update just broadcast to whatever is currently subscribed, and the\n// ToastProvider that owns the real toast state only subscribes from a passive\n// useEffect. Calls made while no host is ready (e.g. mid-handoff between the\n// previously-active ToastHost unmounting and its successor's Provider\n// subscribing) would otherwise be silently dropped, so every manager call is\n// routed through runWhenToastHostReady to queue until a host is listening.\nconst addToast = (options: ToastOptions): ToastInstance => {\n const position = options.placement ?? globalState.position;\n const manager = getManager(position);\n const { id: dedupeId, onClose, onRemove } = options;\n\n if (dedupeId) {\n const prevPosition = findActivePosition(dedupeId);\n // Already the front-most toast: let Base UI upsert it in place so it only\n // refreshes its content and timer, without replaying the slide-in animation.\n const shouldPromote =\n prevPosition && !(prevPosition === position && isFrontMost(position, dedupeId));\n\n if (shouldPromote) {\n // Closing marks the toast as `ending`, which makes the following `add`\n // drop it and prepend a fresh one — Base UI's own upsert keeps the\n // original slot instead.\n activeToasts[prevPosition].get(dedupeId)!.superseded = true;\n activeToasts[prevPosition].delete(dedupeId);\n runWhenToastHostReady(() => getManager(prevPosition).close(dedupeId));\n }\n }\n\n const id = dedupeId ?? generateToastId();\n const active: ActiveToast = { superseded: false };\n activeToasts[position].set(id, active);\n runWhenToastHostReady(() => {\n manager.add({\n id,\n data: options,\n description: options.description,\n onClose: () => {\n if (active.superseded) return;\n onClose?.();\n },\n onRemove: () => {\n if (active.superseded) return;\n activeToasts[position].delete(id);\n onRemove?.();\n },\n timeout: options.duration ?? globalState.duration,\n title: options.title,\n });\n });\n return createToastInstance(id, position);\n};\n\nconst dismissToast = (id?: string) => {\n if (id) {\n // Try to close from all managers since we don't know which position the toast is in\n for (const [position, manager] of Object.entries(toastManagers)) {\n activeToasts[position as ToastPosition].delete(id);\n runWhenToastHostReady(() => manager.close(id));\n }\n } else {\n // Clear all toasts\n for (const [position, manager] of Object.entries(toastManagers)) {\n const ids = Array.from(activeToasts[position as ToastPosition].keys());\n activeToasts[position as ToastPosition].clear();\n runWhenToastHostReady(() => {\n for (const toastId of ids) {\n manager.close(toastId);\n }\n });\n }\n }\n};\n\nconst createSuccessToast = (\n optionsOrMessage: Omit<ToastOptions, 'type'> | string,\n): ToastInstance => {\n return addToast(normalizeOptions(optionsOrMessage, 'success'));\n};\n\nconst createErrorToast = (optionsOrMessage: Omit<ToastOptions, 'type'> | string): ToastInstance => {\n return addToast(normalizeOptions(optionsOrMessage, 'error'));\n};\n\nconst createInfoToast = (optionsOrMessage: Omit<ToastOptions, 'type'> | string): ToastInstance => {\n return addToast(normalizeOptions(optionsOrMessage, 'info'));\n};\n\nconst createWarningToast = (\n optionsOrMessage: Omit<ToastOptions, 'type'> | string,\n): ToastInstance => {\n return addToast(normalizeOptions(optionsOrMessage, 'warning'));\n};\n\nconst createLoadingToast = (\n optionsOrMessage: Omit<ToastOptions, 'type'> | string,\n): ToastInstance => {\n const options = normalizeOptions(optionsOrMessage, 'loading');\n // Loading toasts don't auto-dismiss by default\n return addToast({ duration: 0, ...options });\n};\n\nasync function promiseToast<T>(promise: Promise<T>, options: ToastPromiseOptions<T>): Promise<T> {\n const loadingOptions =\n typeof options.loading === 'string'\n ? { description: options.loading }\n : (options.loading as ToastOptions);\n\n const loadingToast = addToast({\n closable: false,\n duration: 0,\n type: 'loading',\n ...loadingOptions,\n });\n\n try {\n const result = await promise;\n\n loadingToast.close();\n\n const successOptions = (() => {\n if (typeof options.success === 'string') {\n return { description: options.success };\n }\n if (typeof options.success === 'function') {\n return { description: options.success(result) };\n }\n return options.success as ToastOptions;\n })();\n\n addToast({ type: 'success', ...successOptions });\n\n return result;\n } catch (error) {\n loadingToast.close();\n\n const errorOptions = (() => {\n if (typeof options.error === 'string') {\n return { description: options.error };\n }\n if (typeof options.error === 'function') {\n return { description: options.error(error as Error) };\n }\n return options.error as ToastOptions;\n })();\n\n addToast({ type: 'error', ...errorOptions });\n\n throw error;\n }\n}\n\n// Base toast function\nconst baseToast = (options: ToastOptions): ToastInstance => {\n return addToast({ type: 'default', ...options });\n};\n\n// Toast API\nexport const toast: ToastAPI = Object.assign(baseToast, {\n dismiss: dismissToast,\n error: createErrorToast,\n info: createInfoToast,\n loading: createLoadingToast,\n promise: promiseToast,\n success: createSuccessToast,\n warning: createWarningToast,\n});\n\n// Toast List Component\nconst ToastList = memo(() => {\n const { toasts } = BaseToast.useToastManager();\n return toasts.map((t) => <ToastItem key={t.id} toast={t} />);\n});\n\nToastList.displayName = 'ToastList';\n\nexport interface ToastHostProps {\n className?: string;\n /**\n * Default duration for toasts\n * @default 5000\n */\n duration?: number;\n /**\n * Maximum number of toasts\n * @default 5\n */\n limit?: number;\n /**\n * Toast position\n * @default 'bottom-right'\n */\n position?: ToastPosition;\n /**\n * Root element for portal\n */\n root?: HTMLElement | ShadowRoot | null;\n /**\n * Swipe direction to dismiss\n * @default ['down', 'right']\n */\n swipeDirection?: ('left' | 'right' | 'up' | 'down') | ('left' | 'right' | 'up' | 'down')[];\n}\n\nexport const ToastHost = memo(\n ({\n root,\n className,\n duration = 5000,\n limit = 5,\n position = 'bottom-right',\n swipeDirection = ['down', 'right'],\n }: ToastHostProps) => {\n const isClient = useIsClient();\n const appElement = useAppElement();\n const [viewportZIndex, setViewportZIndex] = useState<number | undefined>(undefined);\n const hostId = useId();\n\n useEffect(() => registerToastHost(hostId), [hostId]);\n\n const isActive = useSyncExternalStore(\n subscribeToastHost,\n () => isActiveToastHost(hostId),\n () => false,\n );\n\n useEffect(() => {\n if (!isActive) return;\n globalState = {\n duration,\n limit,\n position,\n swipeDirection,\n };\n }, [duration, limit, position, swipeDirection, isActive]);\n\n useEffect(() => {\n if (!isActive) return;\n setViewportZIndex(acquireLayerZIndex('toast'));\n }, [isActive]);\n\n useEffect(() => {\n if (!isActive || !isClient) return undefined;\n // Runs after the six BaseToast.Provider children below have committed\n // and subscribed (child effects run before the parent's), so the\n // managers are guaranteed to have a live listener once this fires.\n markToastHostReady();\n return () => {\n markToastHostNotReady();\n };\n }, [isActive, isClient]);\n\n if (!isClient || !isActive) return null;\n\n const container = root ?? appElement ?? document.body;\n\n return ALL_POSITIONS.map((pos) => (\n <ToastContext key={pos} value={{ position: pos, swipeDirection }}>\n <BaseToast.Provider limit={limit} timeout={duration} toastManager={getManager(pos)}>\n <BaseToast.Portal container={container}>\n <BaseToast.Viewport\n className={cx(viewportVariants({ position: pos }), className)}\n style={{ zIndex: viewportZIndex }}\n >\n <ToastList />\n </BaseToast.Viewport>\n </BaseToast.Portal>\n </BaseToast.Provider>\n </ToastContext>\n ));\n },\n);\n\nToastHost.displayName = 'ToastHost';\n\n// Hook to use toast manager\nexport const useToast = () => toast;\n\nexport const __resetToastStateForTests = (): void => {\n globalState = {\n duration: 5000,\n limit: 5,\n position: 'bottom-right',\n swipeDirection: ['down', 'right'],\n };\n for (const position of ALL_POSITIONS) {\n toastManagers[position] = BaseToast.createToastManager();\n activeToasts[position].clear();\n }\n __resetPendingToastQueueForTests();\n};\n"],"mappings":";;;;;;;;;;;;;;AA8BA,MAAM,gBAAiC;CACrC;CACA;CACA;CACA;CACA;CACA;AACF;AAUA,IAAI,cAA0B;CAC5B,UAAU;CACV,OAAO;CACP,UAAU;CACV,gBAAgB,CAAC,QAAQ,OAAO;AAClC;AAGA,MAAM,gBAAwF;CAC5F,UAAUA,MAAU,mBAAmB;CACvC,eAAeA,MAAU,mBAAmB;CAC5C,gBAAgBA,MAAU,mBAAmB;CAC7C,OAAOA,MAAU,mBAAmB;CACpC,YAAYA,MAAU,mBAAmB;CACzC,aAAaA,MAAU,mBAAmB;AAC5C;AAMA,M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BAAiB,EAAE,UAAU,IAAI,CAAC,GAAG,SAAS;KAC5D,OAAO,EAAE,QAAQ,eAAe;KAEhC,UAAA,oBAAC,WAAD,CAAY,CAAA;IACM,CAAA;GACJ,CAAA;EACA,CAAA;CACR,GAXK,GAWL,CACf;AACH,CACF;AAEA,UAAU,cAAc;AAGxB,MAAa,iBAAiB"}
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipGroup.mjs","names":["BaseTooltip"],"sources":["../../../src/base-ui/Tooltip/TooltipGroup.tsx"],"sourcesContent":["'use client';\n\nimport { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';\nimport { cx } from 'antd-style';\nimport { type FC, useCallback, useRef, useState } from 'react';\n\nimport { getFloatingCollisionPadding } from '@/base-ui/floating';\nimport { useFloatingLayer } from '@/hooks/useFloatingLayer';\nimport { useAppElement } from '@/ThemeProvider';\nimport {\n useDestroyOnInvalidActiveTriggerElement,\n useHidePopupWhenPositionerAtOrigin,\n usePopupHandleStore,\n} from '@/utils/destroyOnInvalidActiveTriggerElement';\nimport { placementMap } from '@/utils/placement';\nimport { useRepopOnFarTriggerSwitch } from '@/utils/useRepopOnFarTriggerSwitch';\n\nimport { TooltipArrowIcon } from './ArrowIcon';\nimport {\n TooltipGroupHandleContext,\n type TooltipGroupItem,\n TooltipGroupPropsContext,\n} from './groupContext';\nimport { styles } from './style';\nimport TooltipContent from './TooltipContent';\nimport { type TooltipGroupProps } from './type';\n\nconst TooltipGroup: FC<TooltipGroupProps> = ({\n children,\n disableDestroyOnInvalidTrigger = false,\n disableZeroOriginGuard = false,\n layoutAnimation = true,\n popupContainer,\n ...sharedProps\n}) => {\n const [{ handle, key }, setHandleState] = useState(() => ({\n handle: BaseTooltip.createHandle<TooltipGroupItem>(),\n key: 0,\n }));\n const activeItemRef = useRef<TooltipGroupItem | null>(null);\n\n const destroy = useCallback(() => {\n activeItemRef.current = null;\n setHandleState(({ key }) => ({\n handle: BaseTooltip.createHandle<TooltipGroupItem>(),\n key: key + 1,\n }));\n }, []);\n\n const handleOpenChange = useCallback((open: boolean) => {\n activeItemRef.current?.onOpenChange?.(open);\n }, []);\n\n const appElement = useAppElement();\n const floatingLayerContainer = useFloatingLayer();\n const portalContainer = floatingLayerContainer ?? appElement;\n\n const store = usePopupHandleStore(handle);\n useDestroyOnInvalidActiveTriggerElement(store, destroy, {\n enabled: !disableDestroyOnInvalidTrigger,\n });\n useHidePopupWhenPositionerAtOrigin(store, { enabled: !disableZeroOriginGuard });\n const repop = useRepopOnFarTriggerSwitch(store, { enabled: layoutAnimation });\n\n return (\n <TooltipGroupHandleContext value={handle}>\n <TooltipGroupPropsContext value={sharedProps}>\n {/* Outside Root on purpose: the handle/key reset remounts Root's subtree; children must\n survive it. Triggers bind to the group via the handle, not DOM nesting. */}\n {children}\n <BaseTooltip.Root handle={handle} key={key} onOpenChange={handleOpenChange}>\n {({ payload }) => {\n const item = (payload as TooltipGroupItem | null) ?? null;\n activeItemRef.current = item;\n\n if (!item || (item.title == null && !item.hotkey)) {\n return null;\n }\n\n const arrow = item.arrow ?? false;\n const placement = item.placement ?? 'top';\n const placementConfig = placementMap[placement] ?? placementMap.top;\n const baseSideOffset = arrow ? 8 : 6;\n\n const resolvedClassNames = {\n arrow: cx(styles.arrow, item.classNames?.arrow),\n popup: cx(\n styles.popup,\n item.className,\n item.classNames?.root,\n item.classNames?.container,\n ),\n positioner: styles.positioner,\n viewport: cx(styles.viewport, item.classNames?.content),\n };\n\n const resolvedStyleProps = (() => {\n if (typeof item.styles === 'function') return undefined;\n return item.styles;\n })();\n\n const resolvedStyles = {\n arrow: resolvedStyleProps?.arrow,\n popup: {\n ...resolvedStyleProps?.root,\n ...resolvedStyleProps?.container,\n },\n positioner: {\n zIndex: item.zIndex ?? 114_514,\n },\n viewport: resolvedStyleProps?.content,\n };\n\n const body = (\n <BaseTooltip.Viewport\n className={resolvedClassNames.viewport}\n data-repop={repop || undefined}\n style={resolvedStyles.viewport}\n >\n <TooltipContent\n hotkey={item.hotkey}\n hotkeyProps={item.hotkeyProps}\n title={item.title}\n />\n </BaseTooltip.Viewport>\n );\n\n const popup = (\n <BaseTooltip.Positioner\n align={placementConfig.align}\n className={resolvedClassNames.positioner}\n data-layout-animation={layoutAnimation || undefined}\n data-placement={placement}\n data-repop={repop || undefined}\n side={placementConfig.side}\n sideOffset={baseSideOffset}\n style={resolvedStyles.positioner}\n {...item.positionerProps}\n collisionPadding={\n item.positionerProps?.collisionPadding ?? getFloatingCollisionPadding()\n }\n >\n <BaseTooltip.Popup\n className={resolvedClassNames.popup}\n data-layout-animation={layoutAnimation || undefined}\n data-repop={repop || undefined}\n style={resolvedStyles.popup}\n {...item.popupProps}\n >\n {arrow && (\n <BaseTooltip.Arrow\n className={resolvedClassNames.arrow}\n style={resolvedStyles.arrow}\n >\n {TooltipArrowIcon}\n </BaseTooltip.Arrow>\n )}\n {body}\n </BaseTooltip.Popup>\n </BaseTooltip.Positioner>\n );\n\n const resolvedPortalContainer =\n item.popupContainer ?? popupContainer ?? portalContainer;\n\n return resolvedPortalContainer ? (\n <BaseTooltip.Portal container={resolvedPortalContainer}>{popup}</BaseTooltip.Portal>\n ) : null;\n }}\n </BaseTooltip.Root>\n </TooltipGroupPropsContext>\n </TooltipGroupHandleContext>\n );\n};\n\nTooltipGroup.displayName = 'TooltipGroup';\n\nexport default TooltipGroup;\n"],"mappings":";;;;;;;;;;;;;;;;AA2BA,MAAM,gBAAuC,EAC3C,UACA,iCAAiC,OACjC,yBAAyB,OACzB,kBAAkB,MAClB,gBACA,GAAG,kBACC;CACJ,MAAM,CAAC,EAAE,QAAQ,OAAO,kBAAkB,gBAAgB;EACxD,QAAQA,QAAY,aAA+B;EACnD,KAAK;CACP,EAAE;CACF,MAAM,gBAAgB,OAAgC,IAAI;CAE1D,MAAM,UAAU,kBAAkB;EAChC,cAAc,UAAU;EACxB,gBAAgB,EAAE,WAAW;GAC3B,QAAQA,QAAY,aAA+B;GACnD,KAAK,MAAM;EACb,EAAE;CACJ,GAAG,C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ACzB;MACA,UAAU,oBAAoB;KAChC;KAEA,MAAM,OACJ,oBAACA,QAAY,UAAb;MACE,WAAW,mBAAmB;MAC9B,cAAY,SAAS,KAAA;MACrB,OAAO,eAAe;MAEtB,UAAA,oBAAC,gBAAD;OACE,QAAQ,KAAK;OACb,aAAa,KAAK;OAClB,OAAO,KAAK;MACb,CAAA;KACmB,CAAA;KAGxB,MAAM,QACJ,oBAACA,QAAY,YAAb;MACE,OAAO,gBAAgB;MACvB,WAAW,mBAAmB;MAC9B,yBAAuB,mBAAmB,KAAA;MAC1C,kBAAgB;MAChB,cAAY,SAAS,KAAA;MACrB,MAAM,gBAAgB;MACtB,YAAY;MACZ,OAAO,eAAe;MACtB,GAAI,KAAK;MACT,kBACE,KAAK,iBAAiB,oBAAoB,4BAA4B;MAGxE,UAAA,qBAACA,QAAY,OAAb;OACE,WAAW,mBAAmB;OAC9B,yBAAuB,mBAAmB,KAAA;OAC1C,cAAY,SAAS,KAAA;OACrB,OAAO,eAAe;OACtB,GAAI,KAAK;OALX,UAAA,CAOG,SACC,oBAACA,QAAY,OAAb;QACE,WAAW,mBAAmB;QAC9B,OAAO,eAAe;QAErB,UAAA;OACgB,CAAA,GAEpB,IACgB;;KACG,CAAA;KAG1B,MAAM,0BACJ,KAAK,kBAAkB,kBAAkB;KAE3C,OAAO,0BACL,oBAACA,QAAY,QAAb;MAAoB,WAAW;MAA0B,UAAA;KAA0B,CAAA,IACjF;IACN;GACgB,GAnGqB,GAmGrB,CACM;;CACD,CAAA;AAE/B;AAEA,aAAa,cAAc"}
1
+ {"version":3,"file":"TooltipGroup.mjs","names":["BaseTooltip"],"sources":["../../../src/base-ui/Tooltip/TooltipGroup.tsx"],"sourcesContent":["'use client';\n\nimport { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';\nimport { cx } from 'antd-style';\nimport { type FC, useCallback, useRef, useState } from 'react';\n\nimport { getFloatingCollisionPadding } from '@/base-ui/floating';\nimport { useFloatingLayer } from '@/hooks/useFloatingLayer';\nimport { useAppElement } from '@/ThemeProvider/AppElementContext';\nimport {\n useDestroyOnInvalidActiveTriggerElement,\n useHidePopupWhenPositionerAtOrigin,\n usePopupHandleStore,\n} from '@/utils/destroyOnInvalidActiveTriggerElement';\nimport { placementMap } from '@/utils/placement';\nimport { useRepopOnFarTriggerSwitch } from '@/utils/useRepopOnFarTriggerSwitch';\n\nimport { TooltipArrowIcon } from './ArrowIcon';\nimport {\n TooltipGroupHandleContext,\n type TooltipGroupItem,\n TooltipGroupPropsContext,\n} from './groupContext';\nimport { styles } from './style';\nimport TooltipContent from './TooltipContent';\nimport { type TooltipGroupProps } from './type';\n\nconst TooltipGroup: FC<TooltipGroupProps> = ({\n children,\n disableDestroyOnInvalidTrigger = false,\n disableZeroOriginGuard = false,\n layoutAnimation = true,\n popupContainer,\n ...sharedProps\n}) => {\n const [{ handle, key }, setHandleState] = useState(() => ({\n handle: BaseTooltip.createHandle<TooltipGroupItem>(),\n key: 0,\n }));\n const activeItemRef = useRef<TooltipGroupItem | null>(null);\n\n const destroy = useCallback(() => {\n activeItemRef.current = null;\n setHandleState(({ key }) => ({\n handle: BaseTooltip.createHandle<TooltipGroupItem>(),\n key: key + 1,\n }));\n }, []);\n\n const handleOpenChange = useCallback((open: boolean) => {\n activeItemRef.current?.onOpenChange?.(open);\n }, []);\n\n const appElement = useAppElement();\n const floatingLayerContainer = useFloatingLayer();\n const portalContainer = floatingLayerContainer ?? appElement;\n\n const store = usePopupHandleStore(handle);\n useDestroyOnInvalidActiveTriggerElement(store, destroy, {\n enabled: !disableDestroyOnInvalidTrigger,\n });\n useHidePopupWhenPositionerAtOrigin(store, { enabled: !disableZeroOriginGuard });\n const repop = useRepopOnFarTriggerSwitch(store, { enabled: layoutAnimation });\n\n return (\n <TooltipGroupHandleContext value={handle}>\n <TooltipGroupPropsContext value={sharedProps}>\n {/* Outside Root on purpose: the handle/key reset remounts Root's subtree; children must\n survive it. Triggers bind to the group via the handle, not DOM nesting. */}\n {children}\n <BaseTooltip.Root handle={handle} key={key} onOpenChange={handleOpenChange}>\n {({ payload }) => {\n const item = (payload as TooltipGroupItem | null) ?? null;\n activeItemRef.current = item;\n\n if (!item || (item.title == null && !item.hotkey)) {\n return null;\n }\n\n const arrow = item.arrow ?? false;\n const placement = item.placement ?? 'top';\n const placementConfig = placementMap[placement] ?? placementMap.top;\n const baseSideOffset = arrow ? 8 : 6;\n\n const resolvedClassNames = {\n arrow: cx(styles.arrow, item.classNames?.arrow),\n popup: cx(\n styles.popup,\n item.className,\n item.classNames?.root,\n item.classNames?.container,\n ),\n positioner: styles.positioner,\n viewport: cx(styles.viewport, item.classNames?.content),\n };\n\n const resolvedStyleProps = (() => {\n if (typeof item.styles === 'function') return undefined;\n return item.styles;\n })();\n\n const resolvedStyles = {\n arrow: resolvedStyleProps?.arrow,\n popup: {\n ...resolvedStyleProps?.root,\n ...resolvedStyleProps?.container,\n },\n positioner: {\n zIndex: item.zIndex ?? 114_514,\n },\n viewport: resolvedStyleProps?.content,\n };\n\n const body = (\n <BaseTooltip.Viewport\n className={resolvedClassNames.viewport}\n data-repop={repop || undefined}\n style={resolvedStyles.viewport}\n >\n <TooltipContent\n hotkey={item.hotkey}\n hotkeyProps={item.hotkeyProps}\n title={item.title}\n />\n </BaseTooltip.Viewport>\n );\n\n const popup = (\n <BaseTooltip.Positioner\n align={placementConfig.align}\n className={resolvedClassNames.positioner}\n data-layout-animation={layoutAnimation || undefined}\n data-placement={placement}\n data-repop={repop || undefined}\n side={placementConfig.side}\n sideOffset={baseSideOffset}\n style={resolvedStyles.positioner}\n {...item.positionerProps}\n collisionPadding={\n item.positionerProps?.collisionPadding ?? getFloatingCollisionPadding()\n }\n >\n <BaseTooltip.Popup\n className={resolvedClassNames.popup}\n data-layout-animation={layoutAnimation || undefined}\n data-repop={repop || undefined}\n style={resolvedStyles.popup}\n {...item.popupProps}\n >\n {arrow && (\n <BaseTooltip.Arrow\n className={resolvedClassNames.arrow}\n style={resolvedStyles.arrow}\n >\n {TooltipArrowIcon}\n </BaseTooltip.Arrow>\n )}\n {body}\n </BaseTooltip.Popup>\n </BaseTooltip.Positioner>\n );\n\n const resolvedPortalContainer =\n item.popupContainer ?? popupContainer ?? portalContainer;\n\n return resolvedPortalContainer ? (\n <BaseTooltip.Portal container={resolvedPortalContainer}>{popup}</BaseTooltip.Portal>\n ) : null;\n }}\n </BaseTooltip.Root>\n </TooltipGroupPropsContext>\n </TooltipGroupHandleContext>\n );\n};\n\nTooltipGroup.displayName = 'TooltipGroup';\n\nexport default TooltipGroup;\n"],"mappings":";;;;;;;;;;;;;;;;AA2BA,MAAM,gBAAuC,EAC3C,UACA,iCAAiC,OACjC,yBAAyB,OACzB,kBAAkB,MAClB,gBACA,GAAG,kBACC;CACJ,MAAM,CAAC,EAAE,QAAQ,OAAO,kBAAkB,gBAAgB;EACxD,QAAQA,QAAY,aAA+B;EACnD,KAAK;CACP,EAAE;CACF,MAAM,gBAAgB,OAAgC,IAAI;CAE1D,MAAM,UAAU,kBAAkB;EAChC,cAAc,UAAU;EACxB,gBAAgB,EAAE,WAAW;GAC3B,QAAQA,QAAY,aAA+B;GACnD,KAAK,MAAM;EACb,EAAE;CACJ,GAAG,CAAC,CAAC;CAEL,MAAM,mBAAmB,aAAa,SAAkB;EACtD,cAAc,SAAS,eAAe,IAAI;CAC5C,GAAG,CAAC,CAAC;CAEL,MAAM,aAAa,cAAc;CAEjC,MAAM,kBADyB,iBACc,KAAK;CAElD,MAAM,QAAQ,oBAAoB,MAAM;CACxC,wCAAwC,OAAO,SAAS,EACtD,SAAS,CAAC,+BACZ,CAAC;CACD,mCAAmC,OAAO,EAAE,SAAS,CAAC,uBAAuB,CAAC;CAC9E,MAAM,QAAQ,2BAA2B,OAAO,EAAE,SAAS,gBAAgB,CAAC;CAE5E,OACE,oBAAC,2BAAD;EAA2B,OAAO;EAChC,UAAA,qBAAC,0BAAD;GAA0B,OAAO;GAAjC,UAAA,CAGG,UACD,oBAACA,QAAY,MAAb;IAA0B;IAA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GxE,UAAA,qBAACA,QAAY,OAAb;OACE,WAAW,mBAAmB;OAC9B,yBAAuB,mBAAmB,KAAA;OAC1C,cAAY,SAAS,KAAA;OACrB,OAAO,eAAe;OACtB,GAAI,KAAK;OALX,UAAA,CAOG,SACC,oBAACA,QAAY,OAAb;QACE,WAAW,mBAAmB;QAC9B,OAAO,eAAe;QAErB,UAAA;OACgB,CAAA,GAEpB,IACgB;;KACG,CAAA;KAG1B,MAAM,0BACJ,KAAK,kBAAkB,kBAAkB;KAE3C,OAAO,0BACL,oBAACA,QAAY,QAAb;MAAoB,WAAW;MAA0B,UAAA;KAA0B,CAAA,IACjF;IACN;GACgB,GAnGqB,GAmGrB,CACM;;CACD,CAAA;AAE/B;AAEA,aAAa,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipStandalone.mjs","names":["BaseTooltip"],"sources":["../../../src/base-ui/Tooltip/TooltipStandalone.tsx"],"sourcesContent":["'use client';\n\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';\nimport { cx } from 'antd-style';\nimport {\n cloneElement,\n isValidElement,\n memo,\n type Ref,\n useCallback,\n useMemo,\n useState,\n} from 'react';\nimport { mergeRefs } from 'react-merge-refs';\n\nimport { getFloatingCollisionPadding } from '@/base-ui/floating';\nimport { useFloatingLayer } from '@/hooks/useFloatingLayer';\nimport { useIsClient } from '@/hooks/useIsClient';\nimport { useNativeButton } from '@/hooks/useNativeButton';\nimport { useAppElement } from '@/ThemeProvider';\nimport { placementMap } from '@/utils/placement';\n\nimport { TooltipArrowIcon } from './ArrowIcon';\nimport { styles } from './style';\nimport TooltipContent from './TooltipContent';\nimport { type TooltipProps } from './type';\n\nconst DEFAULT_OPEN_DELAY = 400;\nconst DEFAULT_CLOSE_DELAY = 100;\n\n/**\n * Tooltip component - displays small contextual hints on hover/focus\n * Compatible with Ant Design Tooltip-like API (subset)\n */\nexport const TooltipStandalone = memo<TooltipProps>(\n ({\n children,\n title,\n arrow = false,\n className,\n classNames,\n closeDelay,\n defaultOpen = false,\n disabled = false,\n getPopupContainer,\n hotkey,\n hotkeyProps,\n mouseEnterDelay,\n mouseLeaveDelay,\n onOpenChange,\n open,\n openDelay,\n placement = 'top',\n popupContainer,\n styles: styleProps,\n zIndex,\n ref: refProp,\n positionerProps,\n triggerProps,\n popupProps,\n portalProps,\n standalone: _standalone,\n ...restProps\n }) => {\n const isClient = useIsClient();\n const [uncontrolledOpen, setUncontrolledOpen] = useState(Boolean(defaultOpen));\n const [triggerNode, setTriggerNode] = useState<HTMLElement | null>(null);\n const triggerCallbackRef = useCallback((node: HTMLElement | null) => {\n if (node) setTriggerNode(node);\n }, []);\n\n const mergedOpen = open ?? uncontrolledOpen;\n const resolvedOpen = disabled ? false : mergedOpen;\n\n const handleOpenChange = useCallback(\n (nextOpen: boolean) => {\n if (disabled && nextOpen) return;\n onOpenChange?.(nextOpen);\n if (open === undefined) {\n setUncontrolledOpen(nextOpen);\n }\n },\n [disabled, onOpenChange, open],\n );\n\n const resolvedOpenDelay = useMemo(() => {\n if (openDelay !== undefined) return openDelay;\n if (mouseEnterDelay !== undefined) return mouseEnterDelay * 1000;\n return DEFAULT_OPEN_DELAY;\n }, [mouseEnterDelay, openDelay]);\n\n const resolvedCloseDelay = useMemo(() => {\n if (closeDelay !== undefined) return closeDelay;\n if (mouseLeaveDelay !== undefined) return mouseLeaveDelay * 1000;\n return DEFAULT_CLOSE_DELAY;\n }, [closeDelay, mouseLeaveDelay]);\n\n const placementConfig = placementMap[placement] ?? placementMap.top;\n const baseSideOffset = arrow ? 8 : 6;\n\n const appElement = useAppElement();\n const floatingLayerContainer = useFloatingLayer();\n const portalContainer = floatingLayerContainer ?? appElement;\n\n const { isNativeButtonTriggerElement } = useNativeButton({\n children,\n });\n\n const resolvedClassNames = useMemo(\n () => ({\n arrow: cx(styles.arrow, classNames?.arrow),\n popup: cx(styles.popup, className, classNames?.root, classNames?.container),\n positioner: styles.positioner,\n viewport: cx(styles.viewport, classNames?.content),\n }),\n [className, classNames?.arrow, classNames?.container, classNames?.content, classNames?.root],\n );\n\n const resolvedStyleProps = useMemo(() => {\n if (typeof styleProps === 'function') return undefined;\n return styleProps;\n }, [styleProps]);\n\n const resolvedStyles = useMemo(\n () => ({\n arrow: resolvedStyleProps?.arrow,\n popup: {\n ...resolvedStyleProps?.root,\n ...resolvedStyleProps?.container,\n },\n positioner: {\n zIndex: zIndex ?? 114_514,\n },\n viewport: resolvedStyleProps?.content,\n }),\n [resolvedStyleProps, zIndex],\n );\n\n const triggerElement = useMemo(() => {\n const popupTriggerId =\n isValidElement(children) &&\n (children as any).props['aria-haspopup'] !== undefined &&\n (children as any).props.id !== undefined\n ? (children as any).props.id\n : undefined;\n\n const baseTriggerProps = {\n closeDelay: resolvedCloseDelay,\n delay: resolvedOpenDelay,\n disabled,\n ...triggerProps,\n id: popupTriggerId ?? triggerProps?.id,\n };\n\n if (isValidElement(children)) {\n return (\n <BaseTooltip.Trigger\n {...baseTriggerProps}\n render={(props) => {\n // Base UI's trigger props include `type=\"button\"` by default.\n // If we render into a non-<button> element, that prop is invalid and can warn.\n const resolvedProps = (() => {\n if (isNativeButtonTriggerElement) return props as any;\n // eslint-disable-next-line unused-imports/no-unused-vars\n const { type, ref: triggerRef, ...triggerRest } = props as any;\n return triggerRest;\n })();\n\n const childProps = (children as any).props;\n const mergedProps = mergeProps(restProps, childProps, resolvedProps);\n const shouldPreservePopupTriggerId =\n childProps['aria-haspopup'] !== undefined && childProps.id !== undefined;\n\n return cloneElement(children as any, {\n ...mergedProps,\n id: shouldPreservePopupTriggerId ? childProps.id : mergedProps.id,\n ref: mergeRefs([\n (children as any).ref,\n (props as any).ref,\n refProp,\n triggerCallbackRef,\n ]),\n });\n }}\n />\n );\n }\n\n return (\n <BaseTooltip.Trigger\n {...baseTriggerProps}\n ref={mergeRefs([refProp, triggerCallbackRef]) as Ref<HTMLButtonElement>}\n >\n {children}\n </BaseTooltip.Trigger>\n );\n }, [\n children,\n disabled,\n isNativeButtonTriggerElement,\n refProp,\n resolvedCloseDelay,\n resolvedOpenDelay,\n restProps,\n triggerCallbackRef,\n triggerProps,\n ]);\n\n const customContainer = useMemo(() => {\n if (popupContainer) return popupContainer;\n if (!getPopupContainer || !isClient || !triggerNode) return undefined;\n return getPopupContainer(triggerNode);\n }, [popupContainer, getPopupContainer, isClient, triggerNode]);\n\n const popup = useMemo(\n () => (\n <BaseTooltip.Positioner\n align={placementConfig.align}\n className={resolvedClassNames.positioner}\n data-placement={placement}\n side={placementConfig.side}\n sideOffset={baseSideOffset}\n style={resolvedStyles.positioner}\n {...positionerProps}\n collisionPadding={positionerProps?.collisionPadding ?? getFloatingCollisionPadding()}\n >\n <BaseTooltip.Popup\n className={resolvedClassNames.popup}\n style={resolvedStyles.popup}\n {...popupProps}\n >\n {arrow && (\n <BaseTooltip.Arrow className={resolvedClassNames.arrow} style={resolvedStyles.arrow}>\n {TooltipArrowIcon}\n </BaseTooltip.Arrow>\n )}\n <BaseTooltip.Viewport\n className={resolvedClassNames.viewport}\n style={resolvedStyles.viewport}\n >\n <TooltipContent hotkey={hotkey} hotkeyProps={hotkeyProps} title={title} />\n </BaseTooltip.Viewport>\n </BaseTooltip.Popup>\n </BaseTooltip.Positioner>\n ),\n [\n arrow,\n baseSideOffset,\n hotkey,\n hotkeyProps,\n placement,\n placementConfig.align,\n placementConfig.side,\n popupProps,\n positionerProps,\n resolvedClassNames,\n resolvedStyles,\n title,\n ],\n );\n\n if (title == null && !hotkey) {\n return children;\n }\n\n const resolvedPortalContainer = customContainer ?? portalContainer;\n\n return (\n <BaseTooltip.Root\n defaultOpen={defaultOpen}\n disabled={disabled}\n open={resolvedOpen}\n onOpenChange={handleOpenChange}\n >\n {triggerElement}\n {resolvedPortalContainer ? (\n <BaseTooltip.Portal container={resolvedPortalContainer} {...portalProps}>\n {popup}\n </BaseTooltip.Portal>\n ) : null}\n </BaseTooltip.Root>\n );\n },\n);\n\nTooltipStandalone.displayName =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H;EACV,MAAM;EACN,cAAc;EAJhB,UAAA,CAMG,gBACA,0BACC,oBAACA,QAAY,QAAb;GAAoB,WAAW;GAAyB,GAAI;GACzD,UAAA;EACiB,CAAA,IAClB,IACY;;AAEtB,CACF;AAEA,kBAAkB,cAAc"}
1
+ {"version":3,"file":"TooltipStandalone.mjs","names":["BaseTooltip"],"sources":["../../../src/base-ui/Tooltip/TooltipStandalone.tsx"],"sourcesContent":["'use client';\n\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';\nimport { cx } from 'antd-style';\nimport {\n cloneElement,\n isValidElement,\n memo,\n type Ref,\n useCallback,\n useMemo,\n useState,\n} from 'react';\nimport { mergeRefs } from 'react-merge-refs';\n\nimport { getFloatingCollisionPadding } from '@/base-ui/floating';\nimport { useFloatingLayer } from '@/hooks/useFloatingLayer';\nimport { useIsClient } from '@/hooks/useIsClient';\nimport { useNativeButton } from '@/hooks/useNativeButton';\nimport { useAppElement } from '@/ThemeProvider/AppElementContext';\nimport { placementMap } from '@/utils/placement';\n\nimport { TooltipArrowIcon } from './ArrowIcon';\nimport { styles } from './style';\nimport TooltipContent from './TooltipContent';\nimport { type TooltipProps } from './type';\n\nconst DEFAULT_OPEN_DELAY = 400;\nconst DEFAULT_CLOSE_DELAY = 100;\n\n/**\n * Tooltip component - displays small contextual hints on hover/focus\n * Compatible with Ant Design Tooltip-like API (subset)\n */\nexport const TooltipStandalone = memo<TooltipProps>(\n ({\n children,\n title,\n arrow = false,\n className,\n classNames,\n closeDelay,\n defaultOpen = false,\n disabled = false,\n getPopupContainer,\n hotkey,\n hotkeyProps,\n mouseEnterDelay,\n mouseLeaveDelay,\n onOpenChange,\n open,\n openDelay,\n placement = 'top',\n popupContainer,\n styles: styleProps,\n zIndex,\n ref: refProp,\n positionerProps,\n triggerProps,\n popupProps,\n portalProps,\n standalone: _standalone,\n ...restProps\n }) => {\n const isClient = useIsClient();\n const [uncontrolledOpen, setUncontrolledOpen] = useState(Boolean(defaultOpen));\n const [triggerNode, setTriggerNode] = useState<HTMLElement | null>(null);\n const triggerCallbackRef = useCallback((node: HTMLElement | null) => {\n if (node) setTriggerNode(node);\n }, []);\n\n const mergedOpen = open ?? uncontrolledOpen;\n const resolvedOpen = disabled ? false : mergedOpen;\n\n const handleOpenChange = useCallback(\n (nextOpen: boolean) => {\n if (disabled && nextOpen) return;\n onOpenChange?.(nextOpen);\n if (open === undefined) {\n setUncontrolledOpen(nextOpen);\n }\n },\n [disabled, onOpenChange, open],\n );\n\n const resolvedOpenDelay = useMemo(() => {\n if (openDelay !== undefined) return openDelay;\n if (mouseEnterDelay !== undefined) return mouseEnterDelay * 1000;\n return DEFAULT_OPEN_DELAY;\n }, [mouseEnterDelay, openDelay]);\n\n const resolvedCloseDelay = useMemo(() => {\n if (closeDelay !== undefined) return closeDelay;\n if (mouseLeaveDelay !== undefined) return mouseLeaveDelay * 1000;\n return DEFAULT_CLOSE_DELAY;\n }, [closeDelay, mouseLeaveDelay]);\n\n const placementConfig = placementMap[placement] ?? placementMap.top;\n const baseSideOffset = arrow ? 8 : 6;\n\n const appElement = useAppElement();\n const floatingLayerContainer = useFloatingLayer();\n const portalContainer = floatingLayerContainer ?? appElement;\n\n const { isNativeButtonTriggerElement } = useNativeButton({\n children,\n });\n\n const resolvedClassNames = useMemo(\n () => ({\n arrow: cx(styles.arrow, classNames?.arrow),\n popup: cx(styles.popup, className, classNames?.root, classNames?.container),\n positioner: styles.positioner,\n viewport: cx(styles.viewport, classNames?.content),\n }),\n [className, classNames?.arrow, classNames?.container, classNames?.content, classNames?.root],\n );\n\n const resolvedStyleProps = useMemo(() => {\n if (typeof styleProps === 'function') return undefined;\n return styleProps;\n }, [styleProps]);\n\n const resolvedStyles = useMemo(\n () => ({\n arrow: resolvedStyleProps?.arrow,\n popup: {\n ...resolvedStyleProps?.root,\n ...resolvedStyleProps?.container,\n },\n positioner: {\n zIndex: zIndex ?? 114_514,\n },\n viewport: resolvedStyleProps?.content,\n }),\n [resolvedStyleProps, zIndex],\n );\n\n const triggerElement = useMemo(() => {\n const popupTriggerId =\n isValidElement(children) &&\n (children as any).props['aria-haspopup'] !== undefined &&\n (children as any).props.id !== undefined\n ? (children as any).props.id\n : undefined;\n\n const baseTriggerProps = {\n closeDelay: resolvedCloseDelay,\n delay: resolvedOpenDelay,\n disabled,\n ...triggerProps,\n id: popupTriggerId ?? triggerProps?.id,\n };\n\n if (isValidElement(children)) {\n return (\n <BaseTooltip.Trigger\n {...baseTriggerProps}\n render={(props) => {\n // Base UI's trigger props include `type=\"button\"` by default.\n // If we render into a non-<button> element, that prop is invalid and can warn.\n const resolvedProps = (() => {\n if (isNativeButtonTriggerElement) return props as any;\n // eslint-disable-next-line unused-imports/no-unused-vars\n const { type, ref: triggerRef, ...triggerRest } = props as any;\n return triggerRest;\n })();\n\n const childProps = (children as any).props;\n const mergedProps = mergeProps(restProps, childProps, resolvedProps);\n const shouldPreservePopupTriggerId =\n childProps['aria-haspopup'] !== undefined && childProps.id !== undefined;\n\n return cloneElement(children as any, {\n ...mergedProps,\n id: shouldPreservePopupTriggerId ? childProps.id : mergedProps.id,\n ref: mergeRefs([\n (children as any).ref,\n (props as any).ref,\n refProp,\n triggerCallbackRef,\n ]),\n });\n }}\n />\n );\n }\n\n return (\n <BaseTooltip.Trigger\n {...baseTriggerProps}\n ref={mergeRefs([refProp, triggerCallbackRef]) as Ref<HTMLButtonElement>}\n >\n {children}\n </BaseTooltip.Trigger>\n );\n }, [\n children,\n disabled,\n isNativeButtonTriggerElement,\n refProp,\n resolvedCloseDelay,\n resolvedOpenDelay,\n restProps,\n triggerCallbackRef,\n triggerProps,\n ]);\n\n const customContainer = useMemo(() => {\n if (popupContainer) return popupContainer;\n if (!getPopupContainer || !isClient || !triggerNode) return undefined;\n return getPopupContainer(triggerNode);\n }, [popupContainer, getPopupContainer, isClient, triggerNode]);\n\n const popup = useMemo(\n () => (\n <BaseTooltip.Positioner\n align={placementConfig.align}\n className={resolvedClassNames.positioner}\n data-placement={placement}\n side={placementConfig.side}\n sideOffset={baseSideOffset}\n style={resolvedStyles.positioner}\n {...positionerProps}\n collisionPadding={positionerProps?.collisionPadding ?? getFloatingCollisionPadding()}\n >\n <BaseTooltip.Popup\n className={resolvedClassNames.popup}\n style={resolvedStyles.popup}\n {...popupProps}\n >\n {arrow && (\n <BaseTooltip.Arrow className={resolvedClassNames.arrow} style={resolvedStyles.arrow}>\n {TooltipArrowIcon}\n </BaseTooltip.Arrow>\n )}\n <BaseTooltip.Viewport\n className={resolvedClassNames.viewport}\n style={resolvedStyles.viewport}\n >\n <TooltipContent hotkey={hotkey} hotkeyProps={hotkeyProps} title={title} />\n </BaseTooltip.Viewport>\n </BaseTooltip.Popup>\n </BaseTooltip.Positioner>\n ),\n [\n arrow,\n baseSideOffset,\n hotkey,\n hotkeyProps,\n placement,\n placementConfig.align,\n placementConfig.side,\n popupProps,\n positionerProps,\n resolvedClassNames,\n resolvedStyles,\n title,\n ],\n );\n\n if (title == null && !hotkey) {\n return children;\n }\n\n const resolvedPortalContainer = customContainer ?? portalContainer;\n\n return (\n <BaseTooltip.Root\n defaultOpen={defaultOpen}\n disabled={disabled}\n open={resolvedOpen}\n onOpenChange={handleOpenChange}\n >\n {triggerElement}\n {resolvedPortalContainer ? (\n <BaseTooltip.Portal container={resolvedPortalContainer} {...portalProps}>\n {popup}\n </BaseTooltip.Portal>\n ) : null}\n </BaseTooltip.Root>\n );\n },\n);\n\nTooltipStandalone.displayName = 'TooltipStandalone';\n"],"mappings":";;;;;;;;;;;;;;;;;AA4BA,MAAM,qBAAqB;AAC3B,MAAM,sBAAsB;;;;;AAM5B,MAAa,oBAAoB,MAC9B,EACC,UACA,OACA,QAAQ,OACR,WACA,YACA,YACA,cAAc,OACd,WAAW,OACX,mBACA,QACA,aACA,iBACA,iBACA,cACA,MACA,WACA,YAAY,OACZ,gBACA,QAAQ,YACR,QACA,KAAK,SACL,iBACA,cACA,YACA,aACA,YAAY,aACZ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B,cAAc;EACpC,IAAI,gBAAgB,OAAO;EAC3B,IAAI,CAAC,qBAAqB,CAAC,YAAY,CAAC,aAAa,OAAO,KAAA;EAC5D,OAAO,kBAAkB,WAAW;CACtC,GAAG;EAAC;EAAgB;EAAmB;EAAU;CAAW,CAAC;CAE7D,MAAM,QAAQ,cAEV,oBAACA,QAAY,YAAb;EACE,OAAO,gBAAgB;EACvB,WAAW,mBAAmB;EAC9B,kBAAgB;EAChB,MAAM,gBAAgB;EACtB,YAAY;EACZ,OAAO,eAAe;EACtB,GAAI;EACJ,kBAAkB,iBAAiB,oBAAoB,4BAA4B;EAEnF,UAAA,qBAACA,QAAY,OAAb;GACE,WAAW,mBAAmB;GAC9B,OAAO,eAAe;GACtB,GAAI;GAHN,UAAA,CAKG,SACC,oBAACA,QAAY,OAAb;IAAmB,WAAW,mBAAmB;IAAO,OAAO,eAAe;IAC3E,UAAA;GACgB,CAAA,GAErB,oBAACA,QAAY,UAAb;IACE,WAAW,mBAAmB;IAC9B,OAAO,eAAe;IAEtB,UAAA,oBAAC,gBAAD;KAAwB;KAAqB;KAAoB;IAAQ,CAAA;GACrD,CAAA,CACL;;CACG,CAAA,GAE1B;EACE;EACA;EACA;EACA;EACA;EACA,gBAAgB;EAChB,gBAAgB;EAChB;EACA;EACA;EACA;EACA;CACF,CACF;CAEA,IAAI,SAAS,QAAQ,CAAC,QACpB,OAAO;CAGT,MAAM,0BAA0B,mBAAmB;CAEnD,OACE,qBAACA,QAAY,MAAb;EACe;EACH;EACV,MAAM;EACN,cAAc;EAJhB,UAAA,CAMG,gBACA,0BACC,oBAACA,QAAY,QAAb;GAAoB,WAAW;GAAyB,GAAI;GACzD,UAAA;EACiB,CAAA,IAClB,IACY;;AAEtB,CACF;AAEA,kBAAkB,cAAc"}
@@ -20,6 +20,17 @@ import { ContextMenuTrigger } from "./ContextMenu/ContextMenuTrigger.mjs";
20
20
  import { ContextMenuHost } from "./ContextMenu/ContextMenuHost.mjs";
21
21
  import { ContextMenuInterceptor, closeContextMenu, setContextMenuInterceptor, showContextMenu, updateContextMenuItems } from "./ContextMenu/store.mjs";
22
22
  import "./ContextMenu/index.mjs";
23
+ import { InputClassNames, InputNumberProps, InputOTPProps, InputPasswordProps, InputProps, InputSize, InputStyles, InputVariant, TextAreaAutoSize, TextAreaProps } from "./Input/type.mjs";
24
+ import Input from "./Input/Input.mjs";
25
+ import InputNumber from "./Input/InputNumber.mjs";
26
+ import InputOTP from "./Input/InputOTP.mjs";
27
+ import InputPassword from "./Input/InputPassword.mjs";
28
+ import { rootVariants, styles as styles$7 } from "./Input/style.mjs";
29
+ import TextArea from "./Input/TextArea.mjs";
30
+ import "./Input/index.mjs";
31
+ import { AvatarClassNames, AvatarGroupItemType, AvatarGroupProps, AvatarProps, AvatarStyles } from "./Avatar/type.mjs";
32
+ import AvatarGroup from "./Avatar/AvatarGroup/index.mjs";
33
+ import Avatar from "./Avatar/index.mjs";
23
34
  import { PopoverArrowIcon } from "./Popover/ArrowIcon.mjs";
24
35
  import { PopoverBackdropProps, PopoverPlacement, PopoverPopupProps, PopoverPortalProps, PopoverPositionerProps, PopoverProps, PopoverTrigger, PopoverTriggerComponentProps } from "./Popover/type.mjs";
25
36
  import { PopoverArrow, PopoverArrowAtomProps, PopoverBackdrop, PopoverPopup, PopoverPopupAtomProps, PopoverPortal, PopoverPortalAtomProps, PopoverPositioner, PopoverPositionerAtomProps, PopoverRoot, PopoverTriggerElement, PopoverTriggerElementProps, PopoverViewport, PopoverViewportAtomProps } from "./Popover/atoms.mjs";
@@ -49,6 +60,15 @@ import { UploadChangeInfo, UploadProps } from "./Upload/type.mjs";
49
60
  import Upload from "./Upload/Upload.mjs";
50
61
  import UploadDragger from "./Upload/UploadDragger.mjs";
51
62
  import "./Upload/index.mjs";
63
+ import { TagClassNames, TagProps, TagShape, TagSize, TagStyles, TagVariant } from "./Tag/type.mjs";
64
+ import Tag from "./Tag/Tag.mjs";
65
+ import { colorsPreset, colorsPresetSystem, presetColors, presetSystemColors } from "./Tag/utils.mjs";
66
+ import "./Tag/index.mjs";
67
+ import { TabsClassNames, TabsIndicatorProps, TabsItem, TabsListProps, TabsOrientation, TabsPanelProps, TabsProps, TabsRootProps, TabsSize, TabsStyles, TabsTabProps, TabsVariant } from "./Tabs/type.mjs";
68
+ import { styles as styles$11 } from "./Tabs/style.mjs";
69
+ import { TabsIndicator, TabsList, TabsPanel, TabsRoot, TabsTab, useTabsContext } from "./Tabs/atoms.mjs";
70
+ import Tabs from "./Tabs/Tabs.mjs";
71
+ import "./Tabs/index.mjs";
52
72
  import { ScrollAreaProps } from "./ScrollArea/type.mjs";
53
73
  import { ScrollArea } from "./ScrollArea/ScrollArea.mjs";
54
74
  import "./ScrollArea/index.mjs";
@@ -64,26 +84,30 @@ import { AlertClassNames, AlertCloseConfig, AlertProps, AlertRef, AlertStyles, A
64
84
  import Alert from "./Alert/Alert.mjs";
65
85
  import { styles as styles$2 } from "./Alert/style.mjs";
66
86
  import "./Alert/index.mjs";
67
- import { InputClassNames, InputNumberProps, InputOTPProps, InputPasswordProps, InputProps, InputSize, InputStyles, InputVariant, TextAreaAutoSize, TextAreaProps } from "./Input/type.mjs";
68
- import Input from "./Input/Input.mjs";
69
- import InputNumber from "./Input/InputNumber.mjs";
70
- import InputOTP from "./Input/InputOTP.mjs";
71
- import InputPassword from "./Input/InputPassword.mjs";
72
- import { rootVariants, styles as styles$7 } from "./Input/style.mjs";
73
- import TextArea from "./Input/TextArea.mjs";
74
- import "./Input/index.mjs";
87
+ import { AnchorItem, AnchorProps } from "./Anchor/type.mjs";
88
+ import Anchor from "./Anchor/Anchor.mjs";
89
+ import "./Anchor/index.mjs";
75
90
  import { AutoCompleteOption, AutoCompleteProps } from "./AutoComplete/type.mjs";
76
91
  import AutoComplete from "./AutoComplete/AutoComplete.mjs";
77
92
  import { styles as styles$3 } from "./AutoComplete/style.mjs";
78
93
  import "./AutoComplete/index.mjs";
79
- import { AvatarClassNames, AvatarGroupItemType, AvatarGroupProps, AvatarProps, AvatarStyles } from "./Avatar/type.mjs";
80
- import AvatarGroup from "./Avatar/AvatarGroup/index.mjs";
81
- import Avatar from "./Avatar/index.mjs";
94
+ import { BreadcrumbItem, BreadcrumbProps } from "./Breadcrumb/type.mjs";
95
+ import Breadcrumb from "./Breadcrumb/Breadcrumb.mjs";
96
+ import "./Breadcrumb/index.mjs";
97
+ import { ListClickInfo, ListDividerType, ListItem, ListItemType, ListProps, ListSemanticName } from "./List/type.mjs";
98
+ import List from "./List/List.mjs";
99
+ import "./List/index.mjs";
100
+ import { BurgerProps } from "./Burger/type.mjs";
101
+ import Burger from "./Burger/Burger.mjs";
102
+ import "./Burger/index.mjs";
82
103
  import { ButtonIconPosition, ButtonOutdent, ButtonProps, ButtonShape, ButtonSize, ButtonType } from "./Button/type.mjs";
83
104
  import Button from "./Button/Button.mjs";
84
105
  import _default, { SplitButtonMenuProps, SplitButtonProps } from "./Button/SplitButton.mjs";
85
106
  import { buttonPaddingInline, styles as styles$4 } from "./Button/style.mjs";
86
107
  import "./Button/index.mjs";
108
+ import { CarouselProps, CarouselRef } from "./Carousel/type.mjs";
109
+ import Carousel from "./Carousel/Carousel.mjs";
110
+ import "./Carousel/index.mjs";
87
111
  import { CheckboxGroupOption, CheckboxGroupProps, CheckboxProps, CheckboxShape } from "./Checkbox/type.mjs";
88
112
  import Checkbox from "./Checkbox/Checkbox.mjs";
89
113
  import CheckboxGroup from "./Checkbox/CheckboxGroup.mjs";
@@ -92,7 +116,21 @@ import "./Checkbox/index.mjs";
92
116
  import { CollapsibleProps } from "./Collapsible/type.mjs";
93
117
  import Collapsible from "./Collapsible/Collapsible.mjs";
94
118
  import "./Collapsible/index.mjs";
119
+ import { ColorPickerProps } from "./ColorPicker/type.mjs";
120
+ import ColorPicker from "./ColorPicker/ColorPicker.mjs";
121
+ import "./ColorPicker/index.mjs";
95
122
  import { ControlSize, controlHeight } from "./controlSize.mjs";
123
+ import { CalendarMode } from "./DatePicker/calendar.mjs";
124
+ import { DatePickerProps, DateRangePickerProps, DateRangeValue } from "./DatePicker/type.mjs";
125
+ import DatePicker from "./DatePicker/DatePicker.mjs";
126
+ import DateRangePicker from "./DatePicker/DateRangePicker.mjs";
127
+ import "./DatePicker/index.mjs";
128
+ import { DescriptionsItem, DescriptionsProps } from "./Descriptions/type.mjs";
129
+ import Descriptions from "./Descriptions/Descriptions.mjs";
130
+ import "./Descriptions/index.mjs";
131
+ import { DividerOrientation, DividerProps } from "./Divider/type.mjs";
132
+ import Divider from "./Divider/Divider.mjs";
133
+ import "./Divider/index.mjs";
96
134
  import { DraggablePanelBody, DraggablePanelBodyProps, DraggablePanelContainer, DraggablePanelContainerProps, DraggablePanelContent, DraggablePanelContentProps, DraggablePanelFooter, DraggablePanelFooterProps, DraggablePanelHandle, DraggablePanelHandleProps, DraggablePanelHeader, DraggablePanelHeaderProps, DraggablePanelRoot, DraggablePanelRootProps, DraggablePanelToggle, DraggablePanelToggleProps } from "./DraggablePanel/atoms.mjs";
97
135
  import { useDraggablePanelContext } from "./DraggablePanel/context.mjs";
98
136
  import { DraggablePanelPlacement, DraggablePanelProps, DraggablePanelSize } from "./DraggablePanel/type.mjs";
@@ -133,11 +171,17 @@ import FormSubmitFooter from "./Form/components/FormSubmitFooter.mjs";
133
171
  import FormTitle from "./Form/components/FormTitle.mjs";
134
172
  import { useFormContext } from "./Form/context.mjs";
135
173
  import { Form } from "./Form/index.mjs";
174
+ import { QRCodeErrorLevel, QRCodeProps, QRCodeStatus } from "./QRCode/type.mjs";
175
+ import QRCode from "./QRCode/QRCode.mjs";
176
+ import "./QRCode/index.mjs";
136
177
  import { RadioGroupOption, RadioGroupProps, RadioProps } from "./Radio/type.mjs";
137
178
  import Radio from "./Radio/Radio.mjs";
138
179
  import RadioGroup from "./Radio/RadioGroup.mjs";
139
180
  import { styles as styles$8 } from "./Radio/style.mjs";
140
181
  import "./Radio/index.mjs";
182
+ import { RateProps } from "./Rate/type.mjs";
183
+ import Rate from "./Rate/Rate.mjs";
184
+ import "./Rate/index.mjs";
141
185
  import { SegmentedClassNames, SegmentedOption, SegmentedOptions, SegmentedOrientation, SegmentedProps, SegmentedSize, SegmentedStyles, SegmentedVariant } from "./Segmented/type.mjs";
142
186
  import { SegmentedIndicator, SegmentedIndicatorProps, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, SegmentedItemProps, SegmentedRoot, SegmentedRootProps } from "./Segmented/atoms.mjs";
143
187
  import Segmented from "./Segmented/Segmented.mjs";
@@ -155,20 +199,21 @@ import Slider from "./Slider/Slider.mjs";
155
199
  import SliderWithInput from "./Slider/SliderWithInput.mjs";
156
200
  import { styles as styles$9 } from "./Slider/style.mjs";
157
201
  import "./Slider/index.mjs";
202
+ import { formatStatisticValue } from "./Statistic/formatValue.mjs";
203
+ import { StatisticProps } from "./Statistic/type.mjs";
204
+ import Statistic from "./Statistic/Statistic.mjs";
205
+ import "./Statistic/index.mjs";
206
+ import { StepItem, StepStatus, StepsProps } from "./Steps/type.mjs";
207
+ import Steps from "./Steps/Steps.mjs";
208
+ import "./Steps/index.mjs";
158
209
  import { SwitchChangeEventHandler, SwitchClassNames, SwitchClickEventHandler, SwitchContextType, SwitchIconPosition, SwitchIconProps, SwitchProps, SwitchRootProps, SwitchSize, SwitchStyles, SwitchThumbProps } from "./Switch/type.mjs";
159
210
  import { styles as styles$10 } from "./Switch/style.mjs";
160
211
  import { SwitchIcon, SwitchRoot, SwitchThumb, useSwitchContext } from "./Switch/atoms.mjs";
161
212
  import Switch from "./Switch/Switch.mjs";
162
213
  import "./Switch/index.mjs";
163
- import { TabsClassNames, TabsIndicatorProps, TabsItem, TabsListProps, TabsOrientation, TabsPanelProps, TabsProps, TabsRootProps, TabsSize, TabsStyles, TabsTabProps, TabsVariant } from "./Tabs/type.mjs";
164
- import { styles as styles$11 } from "./Tabs/style.mjs";
165
- import { TabsIndicator, TabsList, TabsPanel, TabsRoot, TabsTab, useTabsContext } from "./Tabs/atoms.mjs";
166
- import Tabs from "./Tabs/Tabs.mjs";
167
- import "./Tabs/index.mjs";
168
- import { TagClassNames, TagProps, TagShape, TagSize, TagStyles, TagVariant } from "./Tag/type.mjs";
169
- import Tag from "./Tag/Tag.mjs";
170
- import { colorsPreset, colorsPresetSystem, presetColors, presetSystemColors } from "./Tag/utils.mjs";
171
- import "./Tag/index.mjs";
214
+ import { FilterValue, SortOrder, TableColumn, TableFilters, TablePaginationConfig, TableProps, TableSemanticName, TableSorterResult } from "./Table/type.mjs";
215
+ import Table from "./Table/Table.mjs";
216
+ import "./Table/index.mjs";
172
217
  import { groupStyles, styles as styles$12, variants } from "./Text/style.mjs";
173
218
  import { TextClassNames, TextProps, TextStyles } from "./Text/type.mjs";
174
219
  import Text from "./Text/Text.mjs";
@@ -183,4 +228,4 @@ import { TreeClassNames, TreeDataNode, TreeFlatRow, TreeProps, TreeStyles } from
183
228
  import Tree from "./Tree/Tree.mjs";
184
229
  import { conductCheck, flattenVisible, getAllKeys } from "./Tree/utils.mjs";
185
230
  import "./Tree/index.mjs";
186
- export { Accordion, type AccordionClassNames, AccordionHeader, type AccordionHeaderProps, type AccordionIndicatorPlacement, AccordionItem, type AccordionItemProps, type AccordionItemType, AccordionPanel, type AccordionPanelProps, type AccordionProps, AccordionRoot, type AccordionRootProps, type AccordionStyles, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, ActionIcon, type ActionIconClassNames, type ActionIconOutdent, type ActionIconProps, type ActionIconSize, type ActionIconStyles, type ActionIconVariant, Alert, type AlertClassNames, type AlertCloseConfig, type AlertProps, type AlertRef, type AlertStyles, type AlertType, type AlertVariant, AutoComplete, type AutoCompleteOption, type AutoCompleteProps, Avatar, type AvatarClassNames, AvatarGroup, type AvatarGroupItemType, type AvatarGroupProps, type AvatarProps, type AvatarStyles, Badge, type BadgeProps, type BadgeSize, type BadgeStatus, type BaseModalProps, Button, type ButtonIconPosition, type ButtonOutdent, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonType, Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, type CheckboxShape, Collapsible, type CollapsibleProps, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuInterceptor, type ContextMenuItem, ContextMenuTrigger, type ControlSize, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelContent, type DraggablePanelContentProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHandle, type DraggablePanelHandleProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelPlacement, type DraggablePanelProps, DraggablePanelRoot, type DraggablePanelRootProps, type DraggablePanelSize, DraggablePanelToggle, type DraggablePanelToggleProps, Drawer, DrawerBackdrop, type DrawerBackdropProps, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerPlacement, DrawerPopup, type DrawerPopupProps, DrawerPortal, type DrawerPortalProps, type DrawerProps, type DrawerPush, DrawerRoot, type DrawerRootProps, type DrawerSemanticNames, type DrawerSemanticStyles, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, type DropdownMenuCheckboxItemProps, DropdownMenuFooter, type DropdownMenuFooterProps, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuHeader, type DropdownMenuHeaderProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemDesc, type DropdownMenuItemDescProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, DropdownMenuItemLabelGroup, type DropdownMenuItemLabelGroupProps, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type DropdownMenuPlacement, DropdownMenuPopup, type DropdownMenuPopupProps, DropdownMenuPortal, type DropdownMenuPortalProps, DropdownMenuPositioner, type DropdownMenuPositionerProps, type DropdownMenuProps, DropdownMenuRoot, DropdownMenuScrollViewport, type DropdownMenuScrollViewportProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, type DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, type DropdownMenuSubmenuTriggerProps, DropdownMenuSwitchItem, type DropdownMenuSwitchItemProps, type DropdownMenuSwitchItem$1 as DropdownMenuSwitchItemType, DropdownMenuTrigger, type DropdownMenuTriggerProps, type FloatingCollisionPadding, FloatingPanel, type FloatingPanelOffset, type FloatingPanelPlacement, type FloatingPanelProps, FloatingSheet, type FloatingSheetProps, FocusScope, type FocusScopeProps, Form, type FormContextValue, FormDivider, type FormDividerProps, FormField, type FormFieldProps, FormFlatGroup, type FormFlatGroupProps, FormFooter, type FormFooterProps, FormGroup, type FormGroupItemType, type FormGroupProps, type FormLayout, type FormProps, FormSubmitFooter, type FormSubmitFooterProps, FormTitle, type FormTitleProps, type FormValues, type FormVariant, type IconSpaceMode, type ImperativeModalProps, Input, type InputClassNames, InputNumber, type InputNumberProps, InputOTP, type InputOTPProps, InputPassword, type InputPasswordProps, type InputProps, type InputSize, type InputStyles, type InputVariant, type ItemsType, Modal, ModalBackdrop, type ModalBackdropProps, ModalClose, type ModalCloseProps, type ModalComponentProps, type ModalConfirmConfig, ModalContent, type ModalContentProps, ModalContext, type ModalContextValue, ModalDescription, type ModalDescriptionProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, ModalHost, type ModalHostProps, type ModalInstance, ModalPopup, type ModalPopupProps, ModalPortal, type ModalPortalProps, ModalRoot, type ModalRootProps, type ModalSystem, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, ModalViewport, type ModalViewportProps, Pagination, type PaginationProps, type PaginationSize, Popover, PopoverArrow, type PopoverArrowAtomProps, PopoverArrowIcon, PopoverBackdrop, type PopoverBackdropProps, type PopoverContextValue, PopoverGroup, type PopoverGroupHandle, type PopoverGroupItem, type PopoverPlacement, PopoverPopup, type PopoverPopupAtomProps, type PopoverPopupProps, PopoverPortal, type PopoverPortalAtomProps, type PopoverPortalProps, PopoverPositioner, type PopoverPositionerAtomProps, type PopoverPositionerProps, type PopoverProps, PopoverProvider, PopoverRoot, type PopoverTrigger, type PopoverTriggerComponentProps, PopoverTriggerElement, type PopoverTriggerElementProps, PopoverViewport, type PopoverViewportAtomProps, Progress, type ProgressProps, type ProgressSize, type ProgressStatus, type ProgressType, type ProgressVariant, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, Result, type ResultProps, type ResultStatus, ScrollArea, ScrollAreaContent, type ScrollAreaContentProps, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaRoot, type ScrollAreaRootProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, Segmented, type SegmentedClassNames, SegmentedIndicator, type SegmentedIndicatorProps, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, type SegmentedItemProps, type SegmentedOption, type SegmentedOptions, type SegmentedOrientation, type SegmentedProps, SegmentedRoot, type SegmentedRootProps, type SegmentedSize, type SegmentedStyles, type SegmentedVariant, Select, SelectArrow, type SelectArrowProps, SelectBackdrop, type SelectBehaviorVariant, type SelectClassNames, SelectGroup, SelectGroupLabel, type SelectGroupLabelProps, type SelectGroupProps, SelectIcon, type SelectIconProps, type SelectIndicatorVariant, SelectItem, SelectItemIndicator, type SelectItemIndicatorProps, type SelectItemProps, SelectItemText, type SelectItemTextProps, SelectList, type SelectListProps, type SelectOption, type SelectOptionGroup, type SelectOptions, SelectPopup, type SelectPopupProps, SelectPortal, type SelectPortalProps, SelectPositioner, type SelectPositionerProps, type SelectProps, SelectRoot, type SelectRootChangeEventDetails, SelectScrollDownArrow, type SelectScrollDownArrowProps, SelectScrollUpArrow, type SelectScrollUpArrowProps, SelectSeparator, type SelectSize, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, type SelectVariant, Skeleton, type SkeletonAnimation, SkeletonAvatar, type SkeletonAvatarProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, Slider, type SliderProps, SliderWithInput, type SliderWithInputProps, Spin, type SpinProps, type SpinSize, type SpinVariant, _default as SplitButton, type SplitButtonMenuProps, type SplitButtonProps, Switch, type SwitchChangeEventHandler, type SwitchClassNames, type SwitchClickEventHandler, type SwitchContextType, SwitchIcon, type SwitchIconPosition, type SwitchIconProps, type SwitchProps, SwitchRoot, type SwitchRootProps, type SwitchSize, type SwitchStyles, SwitchThumb, type SwitchThumbProps, Tabs, type TabsClassNames, TabsIndicator, type TabsIndicatorProps, type TabsItem, TabsList, type TabsListProps, type TabsOrientation, TabsPanel, type TabsPanelProps, type TabsProps, TabsRoot, type TabsRootProps, type TabsSize, type TabsStyles, TabsTab, type TabsTabProps, type TabsVariant, Tag, type TagClassNames, type TagProps, type TagShape, type TagSize, type TagStyles, type TagVariant, Text, TextArea, type TextAreaAutoSize, type TextAreaProps, type TextClassNames, type TextProps, type TextStyles, type ToastAPI, ToastHost, type ToastHostProps, type ToastInstance, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastProps, type ToastType, ToggleGroup, type ToggleGroupClassNames, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, type ToggleGroupItemProps, type ToggleGroupOption, type ToggleGroupProps, ToggleGroupRoot, type ToggleGroupRootProps, type ToggleGroupSize, type ToggleGroupStyles, type ToggleGroupVariant, Tooltip, TooltipGroup, type TooltipGroupProps, type TooltipPlacement, type TooltipPopupComponentProps, type TooltipPortalProps, type TooltipPositionerProps, type TooltipProps, type TooltipTriggerComponentProps, Tree, type TreeClassNames, type TreeDataNode, type TreeFlatRow, type TreeProps, type TreeStyles, Upload, type UploadChangeInfo, UploadDragger, type UploadProps, type UseScopeArrowNavOptions, type UseScopeSwitcherOptions, type VirtualListProps, styles as accordionStyles, styles$1 as actionIconStyles, styles$2 as alertStyles, styles$3 as autoCompleteStyles, backdropTransition, buttonPaddingInline, styles$4 as buttonStyles, styles$5 as checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, conductCheck, confirmModal, controlHeight, createModal, createModalSystem, drawerBackdropTransition, flattenVisible, focusScopeItem, styles$6 as focusScopeStyles, getActiveScopeId, getAllKeys, getDrawerMotionConfig, getFloatingCollisionPadding, getLastFocusedItem, styles$7 as inputStyles, rootVariants as inputVariants, modalMotionConfig, notifyScopeItemFocus, parseTrigger, presetColors, presetSystemColors, styles$8 as radioStyles, registerScope, renderDropdownMenuItems, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, showContextMenu, styles$9 as sliderStyles, styles$10 as switchStyles, styles$11 as tabsStyles, groupStyles as textGroupStyles, styles$12 as textStyles, variants as textVariants, toast, styles$13 as toggleGroupStyles, styles$14 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useModalActions, useModalContext, useModalOpen, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useToast };
231
+ export { Accordion, type AccordionClassNames, AccordionHeader, type AccordionHeaderProps, type AccordionIndicatorPlacement, AccordionItem, type AccordionItemProps, type AccordionItemType, AccordionPanel, type AccordionPanelProps, type AccordionProps, AccordionRoot, type AccordionRootProps, type AccordionStyles, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, ActionIcon, type ActionIconClassNames, type ActionIconOutdent, type ActionIconProps, type ActionIconSize, type ActionIconStyles, type ActionIconVariant, Alert, type AlertClassNames, type AlertCloseConfig, type AlertProps, type AlertRef, type AlertStyles, type AlertType, type AlertVariant, Anchor, type AnchorItem, type AnchorProps, AutoComplete, type AutoCompleteOption, type AutoCompleteProps, Avatar, type AvatarClassNames, AvatarGroup, type AvatarGroupItemType, type AvatarGroupProps, type AvatarProps, type AvatarStyles, Badge, type BadgeProps, type BadgeSize, type BadgeStatus, type BaseModalProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Burger, type BurgerProps, Button, type ButtonIconPosition, type ButtonOutdent, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonType, type CalendarMode, Carousel, type CarouselProps, type CarouselRef, Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, type CheckboxShape, Collapsible, type CollapsibleProps, ColorPicker, type ColorPickerProps, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuInterceptor, type ContextMenuItem, ContextMenuTrigger, type ControlSize, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, type DateRangeValue, Descriptions, type DescriptionsItem, type DescriptionsProps, Divider, type DividerOrientation, type DividerProps, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelContent, type DraggablePanelContentProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHandle, type DraggablePanelHandleProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelPlacement, type DraggablePanelProps, DraggablePanelRoot, type DraggablePanelRootProps, type DraggablePanelSize, DraggablePanelToggle, type DraggablePanelToggleProps, Drawer, DrawerBackdrop, type DrawerBackdropProps, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerPlacement, DrawerPopup, type DrawerPopupProps, DrawerPortal, type DrawerPortalProps, type DrawerProps, type DrawerPush, DrawerRoot, type DrawerRootProps, type DrawerSemanticNames, type DrawerSemanticStyles, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, type DropdownMenuCheckboxItemProps, DropdownMenuFooter, type DropdownMenuFooterProps, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuHeader, type DropdownMenuHeaderProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemDesc, type DropdownMenuItemDescProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, DropdownMenuItemLabelGroup, type DropdownMenuItemLabelGroupProps, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type DropdownMenuPlacement, DropdownMenuPopup, type DropdownMenuPopupProps, DropdownMenuPortal, type DropdownMenuPortalProps, DropdownMenuPositioner, type DropdownMenuPositionerProps, type DropdownMenuProps, DropdownMenuRoot, DropdownMenuScrollViewport, type DropdownMenuScrollViewportProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, type DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, type DropdownMenuSubmenuTriggerProps, DropdownMenuSwitchItem, type DropdownMenuSwitchItemProps, type DropdownMenuSwitchItem$1 as DropdownMenuSwitchItemType, DropdownMenuTrigger, type DropdownMenuTriggerProps, type FilterValue, type FloatingCollisionPadding, FloatingPanel, type FloatingPanelOffset, type FloatingPanelPlacement, type FloatingPanelProps, FloatingSheet, type FloatingSheetProps, FocusScope, type FocusScopeProps, Form, type FormContextValue, FormDivider, type FormDividerProps, FormField, type FormFieldProps, FormFlatGroup, type FormFlatGroupProps, FormFooter, type FormFooterProps, FormGroup, type FormGroupItemType, type FormGroupProps, type FormLayout, type FormProps, FormSubmitFooter, type FormSubmitFooterProps, FormTitle, type FormTitleProps, type FormValues, type FormVariant, type IconSpaceMode, type ImperativeModalProps, Input, type InputClassNames, InputNumber, type InputNumberProps, InputOTP, type InputOTPProps, InputPassword, type InputPasswordProps, type InputProps, type InputSize, type InputStyles, type InputVariant, type ItemsType, List, type ListClickInfo, type ListDividerType, type ListItem, type ListItemType, type ListProps, type ListSemanticName, Modal, ModalBackdrop, type ModalBackdropProps, ModalClose, type ModalCloseProps, type ModalComponentProps, type ModalConfirmConfig, ModalContent, type ModalContentProps, ModalContext, type ModalContextValue, ModalDescription, type ModalDescriptionProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, ModalHost, type ModalHostProps, type ModalInstance, ModalPopup, type ModalPopupProps, ModalPortal, type ModalPortalProps, ModalRoot, type ModalRootProps, type ModalSystem, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, ModalViewport, type ModalViewportProps, Pagination, type PaginationProps, type PaginationSize, Popover, PopoverArrow, type PopoverArrowAtomProps, PopoverArrowIcon, PopoverBackdrop, type PopoverBackdropProps, type PopoverContextValue, PopoverGroup, type PopoverGroupHandle, type PopoverGroupItem, type PopoverPlacement, PopoverPopup, type PopoverPopupAtomProps, type PopoverPopupProps, PopoverPortal, type PopoverPortalAtomProps, type PopoverPortalProps, PopoverPositioner, type PopoverPositionerAtomProps, type PopoverPositionerProps, type PopoverProps, PopoverProvider, PopoverRoot, type PopoverTrigger, type PopoverTriggerComponentProps, PopoverTriggerElement, type PopoverTriggerElementProps, PopoverViewport, type PopoverViewportAtomProps, Progress, type ProgressProps, type ProgressSize, type ProgressStatus, type ProgressType, type ProgressVariant, QRCode, type QRCodeErrorLevel, type QRCodeProps, type QRCodeStatus, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, Rate, type RateProps, Result, type ResultProps, type ResultStatus, ScrollArea, ScrollAreaContent, type ScrollAreaContentProps, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaRoot, type ScrollAreaRootProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, Segmented, type SegmentedClassNames, SegmentedIndicator, type SegmentedIndicatorProps, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, type SegmentedItemProps, type SegmentedOption, type SegmentedOptions, type SegmentedOrientation, type SegmentedProps, SegmentedRoot, type SegmentedRootProps, type SegmentedSize, type SegmentedStyles, type SegmentedVariant, Select, SelectArrow, type SelectArrowProps, SelectBackdrop, type SelectBehaviorVariant, type SelectClassNames, SelectGroup, SelectGroupLabel, type SelectGroupLabelProps, type SelectGroupProps, SelectIcon, type SelectIconProps, type SelectIndicatorVariant, SelectItem, SelectItemIndicator, type SelectItemIndicatorProps, type SelectItemProps, SelectItemText, type SelectItemTextProps, SelectList, type SelectListProps, type SelectOption, type SelectOptionGroup, type SelectOptions, SelectPopup, type SelectPopupProps, SelectPortal, type SelectPortalProps, SelectPositioner, type SelectPositionerProps, type SelectProps, SelectRoot, type SelectRootChangeEventDetails, SelectScrollDownArrow, type SelectScrollDownArrowProps, SelectScrollUpArrow, type SelectScrollUpArrowProps, SelectSeparator, type SelectSize, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, type SelectVariant, Skeleton, type SkeletonAnimation, SkeletonAvatar, type SkeletonAvatarProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, Slider, type SliderProps, SliderWithInput, type SliderWithInputProps, type SortOrder, Spin, type SpinProps, type SpinSize, type SpinVariant, _default as SplitButton, type SplitButtonMenuProps, type SplitButtonProps, Statistic, type StatisticProps, type StepItem, type StepStatus, Steps, type StepsProps, Switch, type SwitchChangeEventHandler, type SwitchClassNames, type SwitchClickEventHandler, type SwitchContextType, SwitchIcon, type SwitchIconPosition, type SwitchIconProps, type SwitchProps, SwitchRoot, type SwitchRootProps, type SwitchSize, type SwitchStyles, SwitchThumb, type SwitchThumbProps, Table, type TableColumn, type TableFilters, type TablePaginationConfig, type TableProps, type TableSemanticName, type TableSorterResult, Tabs, type TabsClassNames, TabsIndicator, type TabsIndicatorProps, type TabsItem, TabsList, type TabsListProps, type TabsOrientation, TabsPanel, type TabsPanelProps, type TabsProps, TabsRoot, type TabsRootProps, type TabsSize, type TabsStyles, TabsTab, type TabsTabProps, type TabsVariant, Tag, type TagClassNames, type TagProps, type TagShape, type TagSize, type TagStyles, type TagVariant, Text, TextArea, type TextAreaAutoSize, type TextAreaProps, type TextClassNames, type TextProps, type TextStyles, type ToastAPI, ToastHost, type ToastHostProps, type ToastInstance, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastProps, type ToastType, ToggleGroup, type ToggleGroupClassNames, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, type ToggleGroupItemProps, type ToggleGroupOption, type ToggleGroupProps, ToggleGroupRoot, type ToggleGroupRootProps, type ToggleGroupSize, type ToggleGroupStyles, type ToggleGroupVariant, Tooltip, TooltipGroup, type TooltipGroupProps, type TooltipPlacement, type TooltipPopupComponentProps, type TooltipPortalProps, type TooltipPositionerProps, type TooltipProps, type TooltipTriggerComponentProps, Tree, type TreeClassNames, type TreeDataNode, type TreeFlatRow, type TreeProps, type TreeStyles, Upload, type UploadChangeInfo, UploadDragger, type UploadProps, type UseScopeArrowNavOptions, type UseScopeSwitcherOptions, type VirtualListProps, styles as accordionStyles, styles$1 as actionIconStyles, styles$2 as alertStyles, styles$3 as autoCompleteStyles, backdropTransition, buttonPaddingInline, styles$4 as buttonStyles, styles$5 as checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, conductCheck, confirmModal, controlHeight, createModal, createModalSystem, drawerBackdropTransition, flattenVisible, focusScopeItem, styles$6 as focusScopeStyles, formatStatisticValue, getActiveScopeId, getAllKeys, getDrawerMotionConfig, getFloatingCollisionPadding, getLastFocusedItem, styles$7 as inputStyles, rootVariants as inputVariants, modalMotionConfig, notifyScopeItemFocus, parseTrigger, presetColors, presetSystemColors, styles$8 as radioStyles, registerScope, renderDropdownMenuItems, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, showContextMenu, styles$9 as sliderStyles, styles$10 as switchStyles, styles$11 as tabsStyles, groupStyles as textGroupStyles, styles$12 as textStyles, variants as textVariants, toast, styles$13 as toggleGroupStyles, styles$14 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useModalActions, useModalContext, useModalOpen, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useToast };