@bioturing/components 0.14.1 → 0.15.1

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/dist/components/Badge/component.js +21 -0
  2. package/dist/components/Badge/component.js.map +1 -0
  3. package/dist/components/Badge/style.css +1 -0
  4. package/dist/components/Breadcrumb/component.js +46 -0
  5. package/dist/components/Breadcrumb/component.js.map +1 -0
  6. package/dist/components/Breadcrumb/style.css +1 -0
  7. package/dist/components/Breadcrumb/useItemRender.js +27 -0
  8. package/dist/components/Breadcrumb/useItemRender.js.map +1 -0
  9. package/dist/components/Button/component.js +9 -0
  10. package/dist/components/Button/component.js.map +1 -0
  11. package/dist/components/Button/style.css +1 -0
  12. package/dist/components/Checkbox/component.js +11 -0
  13. package/dist/components/Checkbox/component.js.map +1 -0
  14. package/dist/components/Checkbox/style.css +1 -0
  15. package/dist/components/CodeBlock/component.js +127 -0
  16. package/dist/components/CodeBlock/component.js.map +1 -0
  17. package/dist/components/CodeBlock/style.css +1 -0
  18. package/dist/components/DSRoot/component.js +21 -0
  19. package/dist/components/DSRoot/component.js.map +1 -0
  20. package/dist/components/DSRoot/context.js +9 -0
  21. package/dist/components/DSRoot/context.js.map +1 -0
  22. package/dist/components/DSRoot/style.css +1 -0
  23. package/dist/components/DropdownMenu/component.js +103 -0
  24. package/dist/components/DropdownMenu/component.js.map +1 -0
  25. package/dist/components/DropdownMenu/style.css +1 -0
  26. package/dist/components/Empty/component.js +48 -0
  27. package/dist/components/Empty/component.js.map +1 -0
  28. package/dist/components/Empty/style.css +1 -0
  29. package/dist/components/Field/component.js +30 -0
  30. package/dist/components/Field/component.js.map +1 -0
  31. package/dist/components/Field/style.css +1 -0
  32. package/dist/components/Form/component.js +23 -0
  33. package/dist/components/Form/component.js.map +1 -0
  34. package/dist/components/Form/item.js +30 -0
  35. package/dist/components/Form/item.js.map +1 -0
  36. package/dist/components/Form/style.css +1 -0
  37. package/dist/components/IconButton/component.js +49 -0
  38. package/dist/components/IconButton/component.js.map +1 -0
  39. package/dist/components/IconButton/style.css +1 -0
  40. package/dist/components/Input/component.js +25 -0
  41. package/dist/components/Input/component.js.map +1 -0
  42. package/dist/components/Modal/Modal.js +161 -0
  43. package/dist/components/Modal/Modal.js.map +1 -0
  44. package/dist/components/Modal/ModalProvider.js +70 -0
  45. package/dist/components/Modal/ModalProvider.js.map +1 -0
  46. package/dist/components/Modal/ModalService.js +25 -0
  47. package/dist/components/Modal/ModalService.js.map +1 -0
  48. package/dist/components/Modal/constants.js +5 -0
  49. package/dist/components/Modal/constants.js.map +1 -0
  50. package/dist/components/Modal/functions.js +27 -0
  51. package/dist/components/Modal/functions.js.map +1 -0
  52. package/dist/components/Modal/index.js +20 -0
  53. package/dist/components/Modal/index.js.map +1 -0
  54. package/dist/components/Modal/style.css +1 -0
  55. package/dist/components/Popover/component.js +12 -0
  56. package/dist/components/Popover/component.js.map +1 -0
  57. package/dist/components/PopupPanel/component.js +190 -0
  58. package/dist/components/PopupPanel/component.js.map +1 -0
  59. package/dist/components/PopupPanel/constants.js +5 -0
  60. package/dist/components/PopupPanel/constants.js.map +1 -0
  61. package/dist/components/PopupPanel/style.css +1 -0
  62. package/dist/components/Radio/component.js +22 -0
  63. package/dist/components/Radio/component.js.map +1 -0
  64. package/dist/components/Radio/style.css +1 -0
  65. package/dist/components/ScrollArea/component.js +40 -0
  66. package/dist/components/ScrollArea/component.js.map +1 -0
  67. package/dist/components/ScrollArea/style.css +1 -0
  68. package/dist/components/Segmented/component.js +9 -0
  69. package/dist/components/Segmented/component.js.map +1 -0
  70. package/dist/components/Segmented/style.css +1 -0
  71. package/dist/components/Select/component.js +135 -0
  72. package/dist/components/Select/component.js.map +1 -0
  73. package/dist/components/Select/style.css +1 -0
  74. package/dist/components/Slider/component.js +23 -0
  75. package/dist/components/Slider/component.js.map +1 -0
  76. package/dist/components/Spin/component.js +12 -0
  77. package/dist/components/Spin/component.js.map +1 -0
  78. package/dist/components/Spin/style.css +1 -0
  79. package/dist/components/Splitter/component.js +40 -0
  80. package/dist/components/Splitter/component.js.map +1 -0
  81. package/dist/components/Splitter/style.css +1 -0
  82. package/dist/components/Stack/Stack.js +37 -0
  83. package/dist/components/Stack/Stack.js.map +1 -0
  84. package/dist/components/Stack/StackChild.js +57 -0
  85. package/dist/components/Stack/StackChild.js.map +1 -0
  86. package/dist/components/Stack/index.js +9 -0
  87. package/dist/components/Stack/index.js.map +1 -0
  88. package/dist/components/Stack/style.css +1 -0
  89. package/dist/components/Switch/component.js +9 -0
  90. package/dist/components/Switch/component.js.map +1 -0
  91. package/dist/components/Switch/style.css +1 -0
  92. package/dist/components/Table/component.js +68 -0
  93. package/dist/components/Table/component.js.map +1 -0
  94. package/dist/components/Table/style.css +1 -0
  95. package/dist/components/Tag/component.js +30 -0
  96. package/dist/components/Tag/component.js.map +1 -0
  97. package/dist/components/Tag/style.css +1 -0
  98. package/dist/components/ThemeProvider/component.js +41 -0
  99. package/dist/components/ThemeProvider/component.js.map +1 -0
  100. package/dist/components/ThemeProvider/style.css +1 -0
  101. package/dist/components/Toast/component.js +101 -0
  102. package/dist/components/Toast/component.js.map +1 -0
  103. package/dist/components/Toast/function.js +25 -0
  104. package/dist/components/Toast/function.js.map +1 -0
  105. package/dist/components/Toast/style.css +1 -0
  106. package/dist/components/Tooltip/component.js +26 -0
  107. package/dist/components/Tooltip/component.js.map +1 -0
  108. package/dist/components/Tooltip/style.css +1 -0
  109. package/dist/components/Tour/component.js +35 -0
  110. package/dist/components/Tour/component.js.map +1 -0
  111. package/dist/components/Tour/style.css +1 -0
  112. package/dist/components/Transition/component.js +44 -0
  113. package/dist/components/Transition/component.js.map +1 -0
  114. package/dist/components/Tree/components.js +67 -0
  115. package/dist/components/Tree/components.js.map +1 -0
  116. package/dist/components/Tree/helpers.js +53 -0
  117. package/dist/components/Tree/helpers.js.map +1 -0
  118. package/dist/components/Tree/useTreeCommon.js +86 -0
  119. package/dist/components/Tree/useTreeCommon.js.map +1 -0
  120. package/dist/components/Tree/useUniqueKeysTree.js +142 -0
  121. package/dist/components/Tree/useUniqueKeysTree.js.map +1 -0
  122. package/dist/components/Truncate/component.js +93 -0
  123. package/dist/components/Truncate/component.js.map +1 -0
  124. package/dist/components/Truncate/helpers.js +36 -0
  125. package/dist/components/Truncate/helpers.js.map +1 -0
  126. package/dist/components/Truncate/style.css +1 -0
  127. package/dist/components/Upload/component.js +39 -0
  128. package/dist/components/Upload/component.js.map +1 -0
  129. package/dist/components/Upload/dragger.js +23 -0
  130. package/dist/components/Upload/dragger.js.map +1 -0
  131. package/dist/components/Upload/hooks.js +18 -0
  132. package/dist/components/Upload/hooks.js.map +1 -0
  133. package/dist/components/Upload/item.js +84 -0
  134. package/dist/components/Upload/item.js.map +1 -0
  135. package/dist/components/Upload/utils.js +7 -0
  136. package/dist/components/Upload/utils.js.map +1 -0
  137. package/dist/components/VerticalCollapsiblePanel/component.js +125 -0
  138. package/dist/components/VerticalCollapsiblePanel/component.js.map +1 -0
  139. package/dist/components/VerticalCollapsiblePanel/style.css +1 -0
  140. package/dist/components/hooks/antd.js +22 -0
  141. package/dist/components/hooks/antd.js.map +1 -0
  142. package/dist/components/hooks/base-ui.js +47 -0
  143. package/dist/components/hooks/base-ui.js.map +1 -0
  144. package/dist/components/hooks/useCharts.js +28 -0
  145. package/dist/components/hooks/useCharts.js.map +1 -0
  146. package/dist/components/hooks/useControlledState.js +15 -0
  147. package/dist/components/hooks/useControlledState.js.map +1 -0
  148. package/dist/components/utils/WithAntdTokens.js +24 -0
  149. package/dist/components/utils/WithAntdTokens.js.map +1 -0
  150. package/dist/components/utils/antdUtils.js +58 -0
  151. package/dist/components/utils/antdUtils.js.map +1 -0
  152. package/dist/components/utils/cn.js +27 -0
  153. package/dist/components/utils/cn.js.map +1 -0
  154. package/dist/components/utils/isTracebackError.js +10 -0
  155. package/dist/components/utils/isTracebackError.js.map +1 -0
  156. package/dist/components/utils/reactToString.js +23 -0
  157. package/dist/components/utils/reactToString.js.map +1 -0
  158. package/dist/index.d.ts +2497 -2
  159. package/dist/index.js +188 -3376
  160. package/dist/index.js.map +1 -0
  161. package/dist/metadata.js +513 -0
  162. package/dist/metadata.js.map +1 -0
  163. package/dist/tailwind.css +1 -4
  164. package/dist/tailwind.d.ts +1 -0
  165. package/dist/tokens/and-theme/tokens.js +351 -0
  166. package/dist/tokens/and-theme/tokens.js.map +1 -0
  167. package/dist/tokens/charts/index.js +18 -0
  168. package/dist/tokens/charts/index.js.map +1 -0
  169. package/dist/tokens/charts/tokens.js +208 -0
  170. package/dist/tokens/charts/tokens.js.map +1 -0
  171. package/dist/tokens/utils.js +37 -0
  172. package/dist/tokens/utils.js.map +1 -0
  173. package/package.json +10 -108
  174. package/dist/Badge.js +0 -41
  175. package/dist/Breadcrumb.js +0 -92
  176. package/dist/Checkbox.js +0 -12
  177. package/dist/CodeBlock.js +0 -641
  178. package/dist/Collapse.js +0 -49
  179. package/dist/DSRoot.js +0 -1181
  180. package/dist/DropdownMenu.js +0 -211
  181. package/dist/Empty.js +0 -53
  182. package/dist/Field.js +0 -66
  183. package/dist/Form.js +0 -125
  184. package/dist/IconButton.js +0 -82
  185. package/dist/Input.js +0 -48
  186. package/dist/Modal.js +0 -430
  187. package/dist/Popover.js +0 -10
  188. package/dist/PopupPanel.css +0 -116
  189. package/dist/PopupPanel.js +0 -333
  190. package/dist/Radio.js +0 -24
  191. package/dist/ScrollArea.js +0 -50
  192. package/dist/Segmented.js +0 -10
  193. package/dist/Select.js +0 -157
  194. package/dist/Slider.js +0 -39
  195. package/dist/Spin.js +0 -33
  196. package/dist/Splitter.js +0 -47
  197. package/dist/Switch.js +0 -10
  198. package/dist/Table.js +0 -126
  199. package/dist/Tag.js +0 -24
  200. package/dist/ThemeProvider.js +0 -403
  201. package/dist/Toast.js +0 -1154
  202. package/dist/Tooltip.js +0 -36
  203. package/dist/Tour.js +0 -54
  204. package/dist/Tree.js +0 -318
  205. package/dist/Truncate.js +0 -160
  206. package/dist/Upload.js +0 -460
  207. package/dist/VerticalCollapsiblePanel.js +0 -413
  208. package/dist/components/Badge/component.d.ts +0 -3
  209. package/dist/components/Badge/index.d.ts +0 -1
  210. package/dist/components/Breadcrumb/component.d.ts +0 -5
  211. package/dist/components/Breadcrumb/index.d.ts +0 -2
  212. package/dist/components/Breadcrumb/types.d.ts +0 -18
  213. package/dist/components/Breadcrumb/useItemRender.d.ts +0 -6
  214. package/dist/components/Button/component.d.ts +0 -7
  215. package/dist/components/Button/index.d.ts +0 -1
  216. package/dist/components/Checkbox/component.d.ts +0 -10
  217. package/dist/components/Checkbox/index.d.ts +0 -1
  218. package/dist/components/CodeBlock/component.d.ts +0 -2
  219. package/dist/components/CodeBlock/index.d.ts +0 -2
  220. package/dist/components/CodeBlock/types.d.ts +0 -47
  221. package/dist/components/Collapse/component.d.ts +0 -13
  222. package/dist/components/Collapse/index.d.ts +0 -1
  223. package/dist/components/DSRoot/component.d.ts +0 -13
  224. package/dist/components/DSRoot/context.d.ts +0 -7
  225. package/dist/components/DSRoot/index.d.ts +0 -1
  226. package/dist/components/DropdownMenu/component.d.ts +0 -30
  227. package/dist/components/DropdownMenu/index.d.ts +0 -2
  228. package/dist/components/Empty/component.d.ts +0 -12
  229. package/dist/components/Empty/index.d.ts +0 -1
  230. package/dist/components/Field/component.d.ts +0 -41
  231. package/dist/components/Field/index.d.ts +0 -1
  232. package/dist/components/Form/component.d.ts +0 -18
  233. package/dist/components/Form/index.d.ts +0 -1
  234. package/dist/components/Form/item.d.ts +0 -5
  235. package/dist/components/IconButton/component.d.ts +0 -29
  236. package/dist/components/IconButton/index.d.ts +0 -1
  237. package/dist/components/Input/component.d.ts +0 -30
  238. package/dist/components/Input/index.d.ts +0 -1
  239. package/dist/components/Modal/Modal.d.ts +0 -84
  240. package/dist/components/Modal/ModalProvider.d.ts +0 -5
  241. package/dist/components/Modal/ModalService.d.ts +0 -33
  242. package/dist/components/Modal/constants.d.ts +0 -9
  243. package/dist/components/Modal/functions.d.ts +0 -27
  244. package/dist/components/Modal/index.d.ts +0 -14
  245. package/dist/components/Popover/component.d.ts +0 -9
  246. package/dist/components/Popover/index.d.ts +0 -1
  247. package/dist/components/PopupPanel/component.d.ts +0 -61
  248. package/dist/components/PopupPanel/constants.d.ts +0 -7
  249. package/dist/components/PopupPanel/index.d.ts +0 -1
  250. package/dist/components/Radio/component.d.ts +0 -7
  251. package/dist/components/Radio/index.d.ts +0 -2
  252. package/dist/components/Radio/interface.d.ts +0 -5
  253. package/dist/components/ScrollArea/component.d.ts +0 -10
  254. package/dist/components/ScrollArea/index.d.ts +0 -1
  255. package/dist/components/Segmented/component.d.ts +0 -9
  256. package/dist/components/Segmented/index.d.ts +0 -1
  257. package/dist/components/Select/component.d.ts +0 -23
  258. package/dist/components/Select/index.d.ts +0 -1
  259. package/dist/components/Slider/component.d.ts +0 -5
  260. package/dist/components/Slider/index.d.ts +0 -1
  261. package/dist/components/Spin/component.d.ts +0 -3
  262. package/dist/components/Spin/index.d.ts +0 -1
  263. package/dist/components/Splitter/component.d.ts +0 -12
  264. package/dist/components/Splitter/index.d.ts +0 -1
  265. package/dist/components/Switch/component.d.ts +0 -8
  266. package/dist/components/Switch/index.d.ts +0 -1
  267. package/dist/components/Table/component.d.ts +0 -19
  268. package/dist/components/Table/index.d.ts +0 -1
  269. package/dist/components/Tag/component.d.ts +0 -11
  270. package/dist/components/Tag/index.d.ts +0 -1
  271. package/dist/components/ThemeProvider/component.d.ts +0 -6
  272. package/dist/components/ThemeProvider/index.d.ts +0 -1
  273. package/dist/components/Toast/component.d.ts +0 -14
  274. package/dist/components/Toast/function.d.ts +0 -10
  275. package/dist/components/Toast/index.d.ts +0 -3
  276. package/dist/components/Toast/types.d.ts +0 -3
  277. package/dist/components/Tooltip/component.d.ts +0 -9
  278. package/dist/components/Tooltip/index.d.ts +0 -1
  279. package/dist/components/Tour/component.d.ts +0 -7
  280. package/dist/components/Tour/index.d.ts +0 -1
  281. package/dist/components/Transition/component.d.ts +0 -17
  282. package/dist/components/Transition/index.d.ts +0 -1
  283. package/dist/components/Tree/components.d.ts +0 -13
  284. package/dist/components/Tree/helpers.d.ts +0 -4
  285. package/dist/components/Tree/index.d.ts +0 -4
  286. package/dist/components/Tree/types.d.ts +0 -55
  287. package/dist/components/Tree/useTreeCommon.d.ts +0 -178
  288. package/dist/components/Tree/useUniqueKeysTree.d.ts +0 -33
  289. package/dist/components/Truncate/component.d.ts +0 -12
  290. package/dist/components/Truncate/helpers.d.ts +0 -5
  291. package/dist/components/Truncate/index.d.ts +0 -1
  292. package/dist/components/Upload/component.d.ts +0 -16
  293. package/dist/components/Upload/dragger.d.ts +0 -13
  294. package/dist/components/Upload/hooks.d.ts +0 -5
  295. package/dist/components/Upload/index.d.ts +0 -3
  296. package/dist/components/Upload/item.d.ts +0 -11
  297. package/dist/components/Upload/utils.d.ts +0 -1
  298. package/dist/components/VerticalCollapsiblePanel/component.d.ts +0 -64
  299. package/dist/components/VerticalCollapsiblePanel/index.d.ts +0 -1
  300. package/dist/components/hooks/antd.d.ts +0 -11
  301. package/dist/components/hooks/base-ui.d.ts +0 -7
  302. package/dist/components/hooks/index.d.ts +0 -4
  303. package/dist/components/hooks/useCharts.d.ts +0 -22
  304. package/dist/components/hooks/useControlledState.d.ts +0 -1
  305. package/dist/components/index.d.ts +0 -40
  306. package/dist/components/utils/WithAntdTokens.d.ts +0 -7
  307. package/dist/components/utils/antdUtils.d.ts +0 -15
  308. package/dist/components/utils/client.d.ts +0 -2
  309. package/dist/components/utils/cn.d.ts +0 -4
  310. package/dist/components/utils/index.d.ts +0 -3
  311. package/dist/components/utils/isTracebackError.d.ts +0 -1
  312. package/dist/components/utils/main.d.ts +0 -3
  313. package/dist/components/utils/reactToString.d.ts +0 -2
  314. package/dist/components/utils/types.d.ts +0 -9
  315. package/dist/hooks.js +0 -961
  316. package/dist/index.css +0 -116
  317. package/dist/style.css +0 -1392
  318. package/dist/style.js +0 -0
  319. package/dist/tailwind.js +0 -0
  320. package/dist/tokens/and-theme/index.d.ts +0 -1
  321. package/dist/tokens/and-theme/tokens.d.ts +0 -5
  322. package/dist/tokens/charts/index.d.ts +0 -6
  323. package/dist/tokens/charts/tokens.d.ts +0 -455
  324. package/dist/tokens/index.d.ts +0 -2
  325. package/dist/tokens/utils.d.ts +0 -16
  326. package/dist/utils.js +0 -120
@@ -1,413 +0,0 @@
1
- import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
2
- import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
3
- import * as __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__ from "@base-ui-components/react";
4
- import * as __WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__ from "@bioturing/assets";
5
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_config_provider_6a57beb3__ from "antd/es/config-provider";
6
- import * as __WEBPACK_EXTERNAL_MODULE_antd_es_theme_useToken_e8911485__ from "antd/es/theme/useToken";
7
- import "tailwind-merge";
8
- import * as __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_use_render_2fb9dc6d__ from "@base-ui-components/react/use-render";
9
- import * as __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_merge_props_04b69945__ from "@base-ui-components/react/merge-props";
10
- import * as __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_utils_d48cdb94__ from "@base-ui-components/react/utils";
11
- import * as __WEBPACK_EXTERNAL_MODULE_react_dom_7136dc57__ from "react-dom";
12
- import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
13
- function cx(...args) {
14
- const classes = [];
15
- for (const arg of args)if (arg) {
16
- if ("string" == typeof arg || "number" == typeof arg) classes.push(String(arg));
17
- else if (Array.isArray(arg)) classes.push(...cx(...arg));
18
- else if ("object" == typeof arg) {
19
- for (const [key, value] of Object.entries(arg))if (value) classes.push(key);
20
- }
21
- }
22
- return classes;
23
- }
24
- function clsx(...args) {
25
- return cx(...args).join(" ");
26
- }
27
- "use client";
28
- const useAntdCssVarClassname = ()=>{
29
- var _token_;
30
- const token = (0, __WEBPACK_EXTERNAL_MODULE_antd_es_theme_useToken_e8911485__["default"])();
31
- return null == (_token_ = token[4]) ? void 0 : _token_.key;
32
- };
33
- const useCls = ()=>{
34
- const { getPrefixCls } = (0, __WEBPACK_EXTERNAL_MODULE_react__.useContext)(__WEBPACK_EXTERNAL_MODULE_antd_es_config_provider_6a57beb3__["default"].ConfigContext);
35
- return (...args)=>cx(...args).map((cls)=>getPrefixCls(cls)).join(" ");
36
- };
37
- "use client";
38
- function useControlledState(value, onChange, defaultValue) {
39
- const [internalState, setInternalState] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(defaultValue);
40
- const isControlled = void 0 !== value;
41
- const setState = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((next)=>{
42
- const nextValue = "function" == typeof next ? next(value) : next;
43
- if ("function" == typeof onChange) onChange(nextValue);
44
- if (!isControlled) setInternalState(next);
45
- }, [
46
- value,
47
- onChange,
48
- isControlled
49
- ]);
50
- const state = isControlled ? value : internalState;
51
- return [
52
- state,
53
- setState
54
- ];
55
- }
56
- "use client";
57
- const useEnhancedEffect = "undefined" != typeof window ? __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect : __WEBPACK_EXTERNAL_MODULE_react__.useEffect;
58
- function useEventCallback(fn) {
59
- const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(fn);
60
- useEnhancedEffect(()=>{
61
- ref.current = fn;
62
- });
63
- return (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((...args)=>{
64
- var _ref_current;
65
- return null == (_ref_current = ref.current) ? void 0 : _ref_current.call(ref, ...args);
66
- }, []);
67
- }
68
- function useLatestRef(value) {
69
- const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(value);
70
- useEnhancedEffect(()=>{
71
- ref.current = value;
72
- });
73
- return ref;
74
- }
75
- function useAnimationsFinished(ref, waitForNextTick = false) {
76
- const frameRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(-1);
77
- const timeoutRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(-1);
78
- const cancelTasks = useEventCallback(()=>{
79
- cancelAnimationFrame(frameRef.current);
80
- clearTimeout(timeoutRef.current);
81
- });
82
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>cancelTasks, [
83
- cancelTasks
84
- ]);
85
- return useEventCallback((fnToExecute)=>{
86
- cancelTasks();
87
- const element = ref.current;
88
- if (!element) return;
89
- if ("function" != typeof element.getAnimations) fnToExecute();
90
- else frameRef.current = requestAnimationFrame(()=>{
91
- function exec() {
92
- if (!element) return;
93
- Promise.allSettled(element.getAnimations().map((anim)=>anim.finished)).then(()=>{
94
- (0, __WEBPACK_EXTERNAL_MODULE_react_dom_7136dc57__.flushSync)(fnToExecute);
95
- });
96
- }
97
- if (waitForNextTick) timeoutRef.current = window.setTimeout(exec);
98
- else exec();
99
- });
100
- });
101
- }
102
- "use client";
103
- const Transition = (props)=>{
104
- const { children = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {}), className, starting, ending, show = true, keepMounted = false, ...otherProps } = props;
105
- const { mounted, setMounted, transitionStatus } = (0, __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_utils_d48cdb94__.useTransitionStatus)(show);
106
- const showRef = useLatestRef(show);
107
- const combinedClassName = clsx(className, "starting" === transitionStatus && "string" == typeof starting && starting, "ending" === transitionStatus && "string" == typeof ending && ending);
108
- const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
109
- const runOnceAnimationsFinish = useAnimationsFinished(ref, show);
110
- const { renderElement } = (0, __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_use_render_2fb9dc6d__.useRender)({
111
- render: "function" == typeof children ? children(otherProps, {}) : children,
112
- props: (0, __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_merge_props_04b69945__.mergeProps)({
113
- ...otherProps,
114
- ref,
115
- className: combinedClassName,
116
- ...{
117
- "data-starting": "starting" === transitionStatus ? "true" : void 0,
118
- "data-ending": "ending" === transitionStatus ? "true" : void 0
119
- },
120
- style: {
121
- ..."starting" === transitionStatus && "object" == typeof starting ? starting : {},
122
- ..."ending" === transitionStatus && "object" == typeof ending ? ending : {}
123
- }
124
- })
125
- });
126
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
127
- if (keepMounted) return;
128
- runOnceAnimationsFinish(()=>{
129
- if (show === showRef.current) setMounted(show);
130
- });
131
- }, [
132
- show,
133
- keepMounted,
134
- runOnceAnimationsFinish,
135
- setMounted,
136
- showRef
137
- ]);
138
- return mounted ? renderElement() : null;
139
- };
140
- "use client";
141
- const IconButtonImpl = (props, ref)=>{
142
- const { label, size = "medium", negativeMargin = true, children, className, tooltipProps = {}, as, href, target, rel, download, hrefLang, referrerPolicy, ...rest } = props;
143
- const cls = useCls();
144
- const antdCssVarClassname = useAntdCssVarClassname();
145
- const buttonClasses = [
146
- cls("icon-button"),
147
- cls(`icon-button-${size}`),
148
- cls(negativeMargin ? "icon-button-negative-margin" : ""),
149
- antdCssVarClassname,
150
- className
151
- ].filter(Boolean).join(" ");
152
- const Component = as || (href ? "a" : "button");
153
- const anchorProps = "a" === Component ? {
154
- ...void 0 !== target && {
155
- target
156
- },
157
- ...void 0 !== rel && {
158
- rel
159
- },
160
- ...void 0 !== download && {
161
- download
162
- },
163
- ...void 0 !== hrefLang && {
164
- hrefLang
165
- },
166
- ...void 0 !== referrerPolicy && {
167
- referrerPolicy
168
- }
169
- } : {};
170
- const elementProps = {
171
- ref,
172
- className: buttonClasses,
173
- ..."button" === Component && {
174
- type: "button"
175
- },
176
- ...href && {
177
- href
178
- },
179
- ...anchorProps,
180
- ...rest
181
- };
182
- const element = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Component, {
183
- ...elementProps,
184
- children: children
185
- });
186
- return label ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Tooltip, {
187
- title: label,
188
- arrow: false,
189
- ...tooltipProps,
190
- children: element
191
- }) : element;
192
- };
193
- const IconButton = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(IconButtonImpl);
194
- const measureText = (container)=>{
195
- const span = document.createElement("span");
196
- span.style.opacity = "0";
197
- span.style.position = "absolute";
198
- span.style.top = "-1000px";
199
- span.style.left = "-1000px";
200
- span.style.whiteSpace = "nowrap";
201
- span.style.pointerEvents = "none";
202
- container.appendChild(span);
203
- return {
204
- measure: (text)=>{
205
- span.innerText = text;
206
- return span.clientWidth;
207
- },
208
- destroy: ()=>{
209
- container.removeChild(span);
210
- }
211
- };
212
- };
213
- const getMiddleTruncatedString = (text, ellipsis, container)=>{
214
- var _Object_values_reverse_find;
215
- if (!text) return text;
216
- const { measure: getTextWidth, destroy: destroyMeasure } = measureText(container);
217
- const textWidth = getTextWidth(text);
218
- const containerWidth = container.clientWidth;
219
- const initialOffset = Math.floor(containerWidth / textWidth * text.length);
220
- if (textWidth <= containerWidth) {
221
- destroyMeasure();
222
- return text;
223
- }
224
- let offset = initialOffset;
225
- const attempts = {};
226
- const maxAttempts = 20;
227
- const buffer = 10;
228
- while(Object.values(attempts).length <= maxAttempts){
229
- if (attempts[offset]) break;
230
- if (offset <= 1) {
231
- attempts[0] = [
232
- 0,
233
- ellipsis
234
- ];
235
- break;
236
- }
237
- const start = text.slice(0, Math.ceil((offset - ellipsis.length) / 2 - 1)).trimEnd();
238
- const end = text.slice(Math.floor((offset - ellipsis.length) / 2) - offset).trimStart();
239
- const truncatedStr = start + ellipsis + end;
240
- const width = getTextWidth(truncatedStr);
241
- attempts[offset] = [
242
- width,
243
- truncatedStr
244
- ];
245
- if (width >= containerWidth) offset -= 2;
246
- else {
247
- if (containerWidth - width < buffer) break;
248
- offset += 2;
249
- }
250
- }
251
- destroyMeasure();
252
- return (null == (_Object_values_reverse_find = Object.values(attempts).reverse().find(([width])=>width < containerWidth)) ? void 0 : _Object_values_reverse_find[1]) ?? Object.values(attempts)[0][1];
253
- };
254
- "use client";
255
- const Truncate = ({ children, position = "end", className, style, ...rest })=>{
256
- const cls = useCls();
257
- const containerRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
258
- const [isTruncated, setIsTruncated] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
259
- const [truncatedText, setTruncatedText] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(children);
260
- const text = children;
261
- const getContainerStyles = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
262
- const baseStyles = {
263
- overflow: "hidden",
264
- whiteSpace: "nowrap",
265
- textOverflow: "clip",
266
- flexGrow: 1,
267
- minWidth: 0,
268
- maxWidth: "100%",
269
- display: "block",
270
- ...style
271
- };
272
- if ("end" === position) return {
273
- ...baseStyles,
274
- textOverflow: "ellipsis"
275
- };
276
- return baseStyles;
277
- }, [
278
- position,
279
- style
280
- ]);
281
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect)(()=>{
282
- const container = containerRef.current;
283
- if (!container) return;
284
- let cancellationToken = {
285
- cancelled: false
286
- };
287
- const calculateTruncatedString = ()=>{
288
- if (cancellationToken) cancellationToken.cancelled = true;
289
- const requestCancellationToken = {
290
- cancelled: false
291
- };
292
- cancellationToken = requestCancellationToken;
293
- const truncated = getMiddleTruncatedString(text, "\u2026", container);
294
- if (requestCancellationToken.cancelled) return;
295
- setTruncatedText(truncated);
296
- };
297
- if ("middle" == position) {
298
- var _window_document_fonts_ready, _window_document_fonts;
299
- null == (_window_document_fonts = window.document.fonts) || null == (_window_document_fonts_ready = _window_document_fonts.ready) || _window_document_fonts_ready.then(calculateTruncatedString);
300
- }
301
- if ("end" == position) setTruncatedText(text);
302
- const observer = new ResizeObserver(()=>{
303
- if ("middle" == position) window.requestAnimationFrame(calculateTruncatedString);
304
- if ("end" == position) {
305
- const isOverflowing = container.scrollWidth > container.clientWidth;
306
- if (isOverflowing) setIsTruncated(true);
307
- }
308
- });
309
- observer.observe(container);
310
- return ()=>{
311
- cancellationToken.cancelled = true;
312
- observer.disconnect();
313
- };
314
- }, [
315
- text,
316
- position
317
- ]);
318
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
319
- ref: containerRef,
320
- style: getContainerStyles(),
321
- className: clsx(cls("truncate"), className),
322
- title: isTruncated ? text : void 0,
323
- ...rest,
324
- children: text === truncatedText ? text : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
325
- children: truncatedText
326
- })
327
- });
328
- };
329
- "use client";
330
- const VerticalCollapsiblePanel = ({ children, title, defaultOpen = false, open: controlledOpen, onOpenChange, className, headerClassName, headerInnerClassName, bodyClassName, contentPadding = "16px", afterTitle, actions, useTitleAsTrigger = true, keepMounted = false })=>{
331
- const cls = useCls();
332
- const [isOpen, setIsOpen] = useControlledState(controlledOpen, onOpenChange, defaultOpen);
333
- const [isBodyOpen, setIsBodyOpen] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(isOpen);
334
- const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
335
- const runOnceAnimationsFinish = useAnimationsFinished(ref, isOpen);
336
- const cssVars = useAntdCssVarClassname();
337
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
338
- runOnceAnimationsFinish(()=>{
339
- setIsBodyOpen(isOpen);
340
- });
341
- }, [
342
- isOpen,
343
- runOnceAnimationsFinish
344
- ]);
345
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.Collapsible.Root, {
346
- className: clsx(cls("collapsible-panel"), cssVars, className),
347
- open: isOpen,
348
- onOpenChange: setIsOpen,
349
- ref: ref,
350
- children: [
351
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
352
- className: clsx(cls("collapsible-panel-header"), headerClassName),
353
- children: [
354
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
355
- className: clsx(cls("collapsible-panel-header-inner"), headerInnerClassName),
356
- children: [
357
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
358
- className: cls("collapsible-panel-header-text"),
359
- onClick: useTitleAsTrigger ? ()=>setIsOpen((open)=>!open) : void 0,
360
- style: useTitleAsTrigger ? {
361
- cursor: "pointer"
362
- } : {},
363
- children: "string" == typeof title ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Truncate, {
364
- children: title
365
- }) : title
366
- }),
367
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
368
- className: cls("collapsible-panel-header-actions"),
369
- children: [
370
- isOpen && actions,
371
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.Collapsible.Trigger, {
372
- className: cls("collapsible-panel-trigger"),
373
- render: isOpen ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(IconButton, {
374
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.MinusCircle, {
375
- weight: "bold",
376
- className: clsx(cls("collapsible-panel-caret"), isOpen && cls("collapsible-panel-caret-open"))
377
- })
378
- }) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(IconButton, {
379
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.PlusCircle, {
380
- weight: "bold",
381
- className: clsx(cls("collapsible-panel-caret"), isOpen && cls("collapsible-panel-caret-open"))
382
- })
383
- })
384
- })
385
- ]
386
- })
387
- ]
388
- }),
389
- isOpen && afterTitle && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
390
- className: cls("collapsible-panel-header-after"),
391
- children: afterTitle
392
- })
393
- ]
394
- }),
395
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.Collapsible.Panel, {
396
- className: cls("collapsible-panel-content"),
397
- style: void 0 !== contentPadding ? {
398
- "--ds-content-padding": false === contentPadding || 0 === contentPadding ? "0" : "number" == typeof contentPadding ? `${contentPadding}px` : contentPadding
399
- } : {},
400
- keepMounted: keepMounted,
401
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Transition, {
402
- show: isBodyOpen,
403
- className: clsx(cls("collapsible-panel-body"), bodyClassName),
404
- keepMounted: true,
405
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
406
- children: children
407
- })
408
- })
409
- })
410
- ]
411
- });
412
- };
413
- export { VerticalCollapsiblePanel };
@@ -1,3 +0,0 @@
1
- import { type BadgeProps as AntdBadgeProps } from "antd/es/badge";
2
- export type BadgeProps = AntdBadgeProps;
3
- export declare const Badge: ({ count, showZero, ...rest }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from "./component";
@@ -1,5 +0,0 @@
1
- import { type BreadcrumbProps, type BreadcrumbItemProps } from "./types";
2
- export declare const Breadcrumb: (({ className, items, noWrap, itemRender: outsideItemRender, ...rest }: BreadcrumbProps) => import("react/jsx-runtime").JSX.Element) & {
3
- Item: (props: BreadcrumbItemProps) => import("react/jsx-runtime").JSX.Element;
4
- Separator: (props: React.HTMLAttributes<HTMLSpanElement>) => import("react/jsx-runtime").JSX.Element;
5
- };
@@ -1,2 +0,0 @@
1
- export * from "./types";
2
- export * from "./component";
@@ -1,18 +0,0 @@
1
- import { type BreadcrumbProps as AntBreadcrumbProps, type BreadcrumbItemProps as AntBreadcrumbItemProps } from "antd/es/breadcrumb";
2
- import { type BreadcrumbItemType as AntdBreadcrumbItemType, type BreadcrumbSeparatorType } from "antd/es/breadcrumb/Breadcrumb";
3
- export * from "./types";
4
- type AnyObject = Record<PropertyKey, any>;
5
- type BaseBreadcrumbItemType = AntdBreadcrumbItemType & {
6
- icon?: React.ReactNode;
7
- };
8
- export type BreadcrumbItemType = Partial<BaseBreadcrumbItemType & BreadcrumbSeparatorType>;
9
- export interface BreadcrumbProps<T extends AnyObject = AnyObject> extends Omit<AntBreadcrumbProps<T>, "items" | "itemRender"> {
10
- /**
11
- * No wrap
12
- */
13
- noWrap?: boolean;
14
- items: BreadcrumbItemType[];
15
- itemRender?: (route: BreadcrumbItemType, params: T, routes: BreadcrumbItemType[], paths: string[]) => React.ReactNode;
16
- }
17
- export interface BreadcrumbItemProps extends AntBreadcrumbItemProps {
18
- }
@@ -1,6 +0,0 @@
1
- import type { BreadcrumbProps } from "./types";
2
- type AddParameters<TFunction extends (...args: any) => any, TParameters extends [...args: any]> = (...args: [...Parameters<TFunction>, ...TParameters]) => ReturnType<TFunction>;
3
- type ItemRender = NonNullable<BreadcrumbProps["itemRender"]>;
4
- type InternalItemRenderParams = AddParameters<ItemRender, [href?: string]>;
5
- export default function useItemRender(prefixCls: string, itemRender?: ItemRender): InternalItemRenderParams;
6
- export {};
@@ -1,7 +0,0 @@
1
- import { type ButtonProps as AntdButtonProps } from "antd/es/button";
2
- export type ButtonProps = AntdButtonProps;
3
- declare const ButtonInner: ({ style, ...rest }: ButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => import("react/jsx-runtime").JSX.Element;
4
- export declare const Button: (props: ButtonProps & {
5
- ref?: React.ForwardedRef<HTMLButtonElement | HTMLAnchorElement>;
6
- }) => ReturnType<typeof ButtonInner>;
7
- export {};
@@ -1 +0,0 @@
1
- export * from "./component";
@@ -1,10 +0,0 @@
1
- import { Checkbox as AntCheckbox, type CheckboxProps as AntCheckboxProps } from "antd";
2
- export interface CheckboxProps extends AntCheckboxProps {
3
- }
4
- declare const MainCheckboxInner: (props: CheckboxProps, ref: React.Ref<React.ComponentRef<typeof AntCheckbox>>) => import("react/jsx-runtime").JSX.Element;
5
- export declare const Checkbox: ((props: CheckboxProps & {
6
- ref?: React.ForwardedRef<React.ComponentRef<typeof AntCheckbox>>;
7
- }) => ReturnType<typeof MainCheckboxInner>) & {
8
- Group: <T = any>(props: import("antd/es/checkbox").CheckboxGroupProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement;
9
- };
10
- export {};
@@ -1 +0,0 @@
1
- export * from "./component";
@@ -1,2 +0,0 @@
1
- import type { CodeBlockProps } from "./types";
2
- export declare const CodeBlock: ({ code, children, lang: defaultLang, className, options, activeOption: controlledActiveOption, defaultActiveOption, onActiveOptionChange, copyText, copySuccessText, ...rest }: CodeBlockProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- export * from "./component";
2
- export * from "./types";
@@ -1,47 +0,0 @@
1
- import { HighlightProps } from "prism-react-renderer";
2
- export interface CodeOption {
3
- label: string;
4
- code: string;
5
- lang?: HighlightProps["language"];
6
- }
7
- export interface CodeBlockProps extends React.ComponentPropsWithRef<"div"> {
8
- /**
9
- * The code to be highlighted
10
- */
11
- code?: string;
12
- /**
13
- * The language of the code
14
- * @default "tsx"
15
- */
16
- lang?: string;
17
- /**
18
- * Additional class name for the component
19
- */
20
- className?: string;
21
- /**
22
- * Options for the code block
23
- * @default []
24
- */
25
- options?: CodeOption[];
26
- /**
27
- * The active option when the component is controlled
28
- */
29
- activeOption?: number;
30
- /**
31
- * The default active option when the component is uncontrolled
32
- * @default 0
33
- */
34
- defaultActiveOption?: number;
35
- /**
36
- * Callback function when the active option changes
37
- */
38
- onActiveOptionChange?: (option: number) => void;
39
- /**
40
- * Copy text label
41
- */
42
- copyText?: string;
43
- /**
44
- * Copy success text label
45
- */
46
- copySuccessText?: string;
47
- }
@@ -1,13 +0,0 @@
1
- import { type CollapseProps as AntCollapseProps, type CollapsePanelProps as AntCollapsePanelProps } from "antd";
2
- import { type ForwardedRef } from "react";
3
- export interface CollapseProps extends AntCollapseProps {
4
- }
5
- export interface CollapsePanelProps extends AntCollapsePanelProps {
6
- }
7
- declare const CollapseInner: (props: CollapseProps, ref: ForwardedRef<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
8
- export declare const Collapse: ((props: CollapseProps & {
9
- ref?: React.ForwardedRef<HTMLDivElement>;
10
- }) => ReturnType<typeof CollapseInner>) & {
11
- Panel: (props: CollapsePanelProps) => import("react/jsx-runtime").JSX.Element;
12
- };
13
- export {};
@@ -1 +0,0 @@
1
- export * from "./component";
@@ -1,13 +0,0 @@
1
- import { type ThemeProviderProps } from "../ThemeProvider/component";
2
- export interface DSRootProps extends ThemeProviderProps {
3
- /**
4
- * Classname passed to App component
5
- */
6
- className?: string;
7
- /**
8
- * Element to which the theme classes are appended
9
- * @default "html"
10
- */
11
- appendClassesTo?: string | HTMLElement;
12
- }
13
- export declare const DSRoot: ({ className, appendClassesTo, children, theme, ...props }: DSRootProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- export declare const DSRootContextProvider: React.Provider<{
3
- theme: "light" | "dark";
4
- }>;
5
- export declare const useDS: () => {
6
- theme: "light" | "dark";
7
- };
@@ -1 +0,0 @@
1
- export * from "./component";
@@ -1,30 +0,0 @@
1
- import { Menu } from "@base-ui-components/react/menu";
2
- import { type PopoverProps } from "antd/es/popover";
3
- export type DropdownMenuItemType = {
4
- type: "item";
5
- label?: React.ReactNode;
6
- disabled?: boolean;
7
- icon?: React.ReactNode;
8
- key: React.Key;
9
- onClick?: React.HTMLAttributes<HTMLElement>["onClick"];
10
- onMouseEnter?: React.HTMLAttributes<HTMLElement>["onMouseEnter"];
11
- onMouseLeave?: React.HTMLAttributes<HTMLElement>["onMouseLeave"];
12
- onMouseOver?: React.HTMLAttributes<HTMLElement>["onMouseOver"];
13
- onMouseOut?: React.HTMLAttributes<HTMLElement>["onMouseOut"];
14
- danger?: boolean;
15
- ref?: React.Ref<HTMLElement>;
16
- } | {
17
- type: "divider";
18
- } | {
19
- type: "header";
20
- title?: React.ReactNode;
21
- };
22
- export interface DropdownMenuProps {
23
- items: DropdownMenuItemType[];
24
- children?: React.ComponentProps<typeof Menu.Trigger>["render"];
25
- placement?: PopoverProps["placement"];
26
- openOnHover?: boolean;
27
- open?: boolean;
28
- onOpenChange?: (open: boolean) => void;
29
- }
30
- export declare const DropdownMenu: ({ children, items, placement, openOnHover, open: outsideOpen, onOpenChange: outsideOnOpenChange, }: DropdownMenuProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- export * from "./component";
2
- export * from "../utils";
@@ -1,12 +0,0 @@
1
- import * as React from "react";
2
- import { type EmptyProps as AntEmptyProps } from "antd/es/empty";
3
- export interface EmptyProps extends AntEmptyProps {
4
- /**
5
- * Empty icon size
6
- * @default 'medium'
7
- */
8
- size?: "small" | "medium" | "large";
9
- }
10
- export declare const EmptyIcon: React.FC<React.ComponentPropsWithRef<"svg">>;
11
- export declare const Empty: ({ image, size, className, ...rest }: EmptyProps) => import("react/jsx-runtime").JSX.Element;
12
- export default Empty;
@@ -1 +0,0 @@
1
- export * from "./component";