@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.
- package/dist/components/Badge/component.js +21 -0
- package/dist/components/Badge/component.js.map +1 -0
- package/dist/components/Badge/style.css +1 -0
- package/dist/components/Breadcrumb/component.js +46 -0
- package/dist/components/Breadcrumb/component.js.map +1 -0
- package/dist/components/Breadcrumb/style.css +1 -0
- package/dist/components/Breadcrumb/useItemRender.js +27 -0
- package/dist/components/Breadcrumb/useItemRender.js.map +1 -0
- package/dist/components/Button/component.js +9 -0
- package/dist/components/Button/component.js.map +1 -0
- package/dist/components/Button/style.css +1 -0
- package/dist/components/Checkbox/component.js +11 -0
- package/dist/components/Checkbox/component.js.map +1 -0
- package/dist/components/Checkbox/style.css +1 -0
- package/dist/components/CodeBlock/component.js +127 -0
- package/dist/components/CodeBlock/component.js.map +1 -0
- package/dist/components/CodeBlock/style.css +1 -0
- package/dist/components/DSRoot/component.js +21 -0
- package/dist/components/DSRoot/component.js.map +1 -0
- package/dist/components/DSRoot/context.js +9 -0
- package/dist/components/DSRoot/context.js.map +1 -0
- package/dist/components/DSRoot/style.css +1 -0
- package/dist/components/DropdownMenu/component.js +103 -0
- package/dist/components/DropdownMenu/component.js.map +1 -0
- package/dist/components/DropdownMenu/style.css +1 -0
- package/dist/components/Empty/component.js +48 -0
- package/dist/components/Empty/component.js.map +1 -0
- package/dist/components/Empty/style.css +1 -0
- package/dist/components/Field/component.js +30 -0
- package/dist/components/Field/component.js.map +1 -0
- package/dist/components/Field/style.css +1 -0
- package/dist/components/Form/component.js +23 -0
- package/dist/components/Form/component.js.map +1 -0
- package/dist/components/Form/item.js +30 -0
- package/dist/components/Form/item.js.map +1 -0
- package/dist/components/Form/style.css +1 -0
- package/dist/components/IconButton/component.js +49 -0
- package/dist/components/IconButton/component.js.map +1 -0
- package/dist/components/IconButton/style.css +1 -0
- package/dist/components/Input/component.js +25 -0
- package/dist/components/Input/component.js.map +1 -0
- package/dist/components/Modal/Modal.js +161 -0
- package/dist/components/Modal/Modal.js.map +1 -0
- package/dist/components/Modal/ModalProvider.js +70 -0
- package/dist/components/Modal/ModalProvider.js.map +1 -0
- package/dist/components/Modal/ModalService.js +25 -0
- package/dist/components/Modal/ModalService.js.map +1 -0
- package/dist/components/Modal/constants.js +5 -0
- package/dist/components/Modal/constants.js.map +1 -0
- package/dist/components/Modal/functions.js +27 -0
- package/dist/components/Modal/functions.js.map +1 -0
- package/dist/components/Modal/index.js +20 -0
- package/dist/components/Modal/index.js.map +1 -0
- package/dist/components/Modal/style.css +1 -0
- package/dist/components/Popover/component.js +12 -0
- package/dist/components/Popover/component.js.map +1 -0
- package/dist/components/PopupPanel/component.js +190 -0
- package/dist/components/PopupPanel/component.js.map +1 -0
- package/dist/components/PopupPanel/constants.js +5 -0
- package/dist/components/PopupPanel/constants.js.map +1 -0
- package/dist/components/PopupPanel/style.css +1 -0
- package/dist/components/Radio/component.js +22 -0
- package/dist/components/Radio/component.js.map +1 -0
- package/dist/components/Radio/style.css +1 -0
- package/dist/components/ScrollArea/component.js +40 -0
- package/dist/components/ScrollArea/component.js.map +1 -0
- package/dist/components/ScrollArea/style.css +1 -0
- package/dist/components/Segmented/component.js +9 -0
- package/dist/components/Segmented/component.js.map +1 -0
- package/dist/components/Segmented/style.css +1 -0
- package/dist/components/Select/component.js +135 -0
- package/dist/components/Select/component.js.map +1 -0
- package/dist/components/Select/style.css +1 -0
- package/dist/components/Slider/component.js +23 -0
- package/dist/components/Slider/component.js.map +1 -0
- package/dist/components/Spin/component.js +12 -0
- package/dist/components/Spin/component.js.map +1 -0
- package/dist/components/Spin/style.css +1 -0
- package/dist/components/Splitter/component.js +40 -0
- package/dist/components/Splitter/component.js.map +1 -0
- package/dist/components/Splitter/style.css +1 -0
- package/dist/components/Stack/Stack.js +37 -0
- package/dist/components/Stack/Stack.js.map +1 -0
- package/dist/components/Stack/StackChild.js +57 -0
- package/dist/components/Stack/StackChild.js.map +1 -0
- package/dist/components/Stack/index.js +9 -0
- package/dist/components/Stack/index.js.map +1 -0
- package/dist/components/Stack/style.css +1 -0
- package/dist/components/Switch/component.js +9 -0
- package/dist/components/Switch/component.js.map +1 -0
- package/dist/components/Switch/style.css +1 -0
- package/dist/components/Table/component.js +68 -0
- package/dist/components/Table/component.js.map +1 -0
- package/dist/components/Table/style.css +1 -0
- package/dist/components/Tag/component.js +30 -0
- package/dist/components/Tag/component.js.map +1 -0
- package/dist/components/Tag/style.css +1 -0
- package/dist/components/ThemeProvider/component.js +41 -0
- package/dist/components/ThemeProvider/component.js.map +1 -0
- package/dist/components/ThemeProvider/style.css +1 -0
- package/dist/components/Toast/component.js +101 -0
- package/dist/components/Toast/component.js.map +1 -0
- package/dist/components/Toast/function.js +25 -0
- package/dist/components/Toast/function.js.map +1 -0
- package/dist/components/Toast/style.css +1 -0
- package/dist/components/Tooltip/component.js +26 -0
- package/dist/components/Tooltip/component.js.map +1 -0
- package/dist/components/Tooltip/style.css +1 -0
- package/dist/components/Tour/component.js +35 -0
- package/dist/components/Tour/component.js.map +1 -0
- package/dist/components/Tour/style.css +1 -0
- package/dist/components/Transition/component.js +44 -0
- package/dist/components/Transition/component.js.map +1 -0
- package/dist/components/Tree/components.js +67 -0
- package/dist/components/Tree/components.js.map +1 -0
- package/dist/components/Tree/helpers.js +53 -0
- package/dist/components/Tree/helpers.js.map +1 -0
- package/dist/components/Tree/useTreeCommon.js +86 -0
- package/dist/components/Tree/useTreeCommon.js.map +1 -0
- package/dist/components/Tree/useUniqueKeysTree.js +142 -0
- package/dist/components/Tree/useUniqueKeysTree.js.map +1 -0
- package/dist/components/Truncate/component.js +93 -0
- package/dist/components/Truncate/component.js.map +1 -0
- package/dist/components/Truncate/helpers.js +36 -0
- package/dist/components/Truncate/helpers.js.map +1 -0
- package/dist/components/Truncate/style.css +1 -0
- package/dist/components/Upload/component.js +39 -0
- package/dist/components/Upload/component.js.map +1 -0
- package/dist/components/Upload/dragger.js +23 -0
- package/dist/components/Upload/dragger.js.map +1 -0
- package/dist/components/Upload/hooks.js +18 -0
- package/dist/components/Upload/hooks.js.map +1 -0
- package/dist/components/Upload/item.js +84 -0
- package/dist/components/Upload/item.js.map +1 -0
- package/dist/components/Upload/utils.js +7 -0
- package/dist/components/Upload/utils.js.map +1 -0
- package/dist/components/VerticalCollapsiblePanel/component.js +125 -0
- package/dist/components/VerticalCollapsiblePanel/component.js.map +1 -0
- package/dist/components/VerticalCollapsiblePanel/style.css +1 -0
- package/dist/components/hooks/antd.js +22 -0
- package/dist/components/hooks/antd.js.map +1 -0
- package/dist/components/hooks/base-ui.js +47 -0
- package/dist/components/hooks/base-ui.js.map +1 -0
- package/dist/components/hooks/useCharts.js +28 -0
- package/dist/components/hooks/useCharts.js.map +1 -0
- package/dist/components/hooks/useControlledState.js +15 -0
- package/dist/components/hooks/useControlledState.js.map +1 -0
- package/dist/components/utils/WithAntdTokens.js +24 -0
- package/dist/components/utils/WithAntdTokens.js.map +1 -0
- package/dist/components/utils/antdUtils.js +58 -0
- package/dist/components/utils/antdUtils.js.map +1 -0
- package/dist/components/utils/cn.js +27 -0
- package/dist/components/utils/cn.js.map +1 -0
- package/dist/components/utils/isTracebackError.js +10 -0
- package/dist/components/utils/isTracebackError.js.map +1 -0
- package/dist/components/utils/reactToString.js +23 -0
- package/dist/components/utils/reactToString.js.map +1 -0
- package/dist/index.d.ts +2497 -2
- package/dist/index.js +188 -3376
- package/dist/index.js.map +1 -0
- package/dist/metadata.js +513 -0
- package/dist/metadata.js.map +1 -0
- package/dist/tailwind.css +1 -4
- package/dist/tailwind.d.ts +1 -0
- package/dist/tokens/and-theme/tokens.js +351 -0
- package/dist/tokens/and-theme/tokens.js.map +1 -0
- package/dist/tokens/charts/index.js +18 -0
- package/dist/tokens/charts/index.js.map +1 -0
- package/dist/tokens/charts/tokens.js +208 -0
- package/dist/tokens/charts/tokens.js.map +1 -0
- package/dist/tokens/utils.js +37 -0
- package/dist/tokens/utils.js.map +1 -0
- package/package.json +10 -108
- package/dist/Badge.js +0 -41
- package/dist/Breadcrumb.js +0 -92
- package/dist/Checkbox.js +0 -12
- package/dist/CodeBlock.js +0 -641
- package/dist/Collapse.js +0 -49
- package/dist/DSRoot.js +0 -1181
- package/dist/DropdownMenu.js +0 -211
- package/dist/Empty.js +0 -53
- package/dist/Field.js +0 -66
- package/dist/Form.js +0 -125
- package/dist/IconButton.js +0 -82
- package/dist/Input.js +0 -48
- package/dist/Modal.js +0 -430
- package/dist/Popover.js +0 -10
- package/dist/PopupPanel.css +0 -116
- package/dist/PopupPanel.js +0 -333
- package/dist/Radio.js +0 -24
- package/dist/ScrollArea.js +0 -50
- package/dist/Segmented.js +0 -10
- package/dist/Select.js +0 -157
- package/dist/Slider.js +0 -39
- package/dist/Spin.js +0 -33
- package/dist/Splitter.js +0 -47
- package/dist/Switch.js +0 -10
- package/dist/Table.js +0 -126
- package/dist/Tag.js +0 -24
- package/dist/ThemeProvider.js +0 -403
- package/dist/Toast.js +0 -1154
- package/dist/Tooltip.js +0 -36
- package/dist/Tour.js +0 -54
- package/dist/Tree.js +0 -318
- package/dist/Truncate.js +0 -160
- package/dist/Upload.js +0 -460
- package/dist/VerticalCollapsiblePanel.js +0 -413
- package/dist/components/Badge/component.d.ts +0 -3
- package/dist/components/Badge/index.d.ts +0 -1
- package/dist/components/Breadcrumb/component.d.ts +0 -5
- package/dist/components/Breadcrumb/index.d.ts +0 -2
- package/dist/components/Breadcrumb/types.d.ts +0 -18
- package/dist/components/Breadcrumb/useItemRender.d.ts +0 -6
- package/dist/components/Button/component.d.ts +0 -7
- package/dist/components/Button/index.d.ts +0 -1
- package/dist/components/Checkbox/component.d.ts +0 -10
- package/dist/components/Checkbox/index.d.ts +0 -1
- package/dist/components/CodeBlock/component.d.ts +0 -2
- package/dist/components/CodeBlock/index.d.ts +0 -2
- package/dist/components/CodeBlock/types.d.ts +0 -47
- package/dist/components/Collapse/component.d.ts +0 -13
- package/dist/components/Collapse/index.d.ts +0 -1
- package/dist/components/DSRoot/component.d.ts +0 -13
- package/dist/components/DSRoot/context.d.ts +0 -7
- package/dist/components/DSRoot/index.d.ts +0 -1
- package/dist/components/DropdownMenu/component.d.ts +0 -30
- package/dist/components/DropdownMenu/index.d.ts +0 -2
- package/dist/components/Empty/component.d.ts +0 -12
- package/dist/components/Empty/index.d.ts +0 -1
- package/dist/components/Field/component.d.ts +0 -41
- package/dist/components/Field/index.d.ts +0 -1
- package/dist/components/Form/component.d.ts +0 -18
- package/dist/components/Form/index.d.ts +0 -1
- package/dist/components/Form/item.d.ts +0 -5
- package/dist/components/IconButton/component.d.ts +0 -29
- package/dist/components/IconButton/index.d.ts +0 -1
- package/dist/components/Input/component.d.ts +0 -30
- package/dist/components/Input/index.d.ts +0 -1
- package/dist/components/Modal/Modal.d.ts +0 -84
- package/dist/components/Modal/ModalProvider.d.ts +0 -5
- package/dist/components/Modal/ModalService.d.ts +0 -33
- package/dist/components/Modal/constants.d.ts +0 -9
- package/dist/components/Modal/functions.d.ts +0 -27
- package/dist/components/Modal/index.d.ts +0 -14
- package/dist/components/Popover/component.d.ts +0 -9
- package/dist/components/Popover/index.d.ts +0 -1
- package/dist/components/PopupPanel/component.d.ts +0 -61
- package/dist/components/PopupPanel/constants.d.ts +0 -7
- package/dist/components/PopupPanel/index.d.ts +0 -1
- package/dist/components/Radio/component.d.ts +0 -7
- package/dist/components/Radio/index.d.ts +0 -2
- package/dist/components/Radio/interface.d.ts +0 -5
- package/dist/components/ScrollArea/component.d.ts +0 -10
- package/dist/components/ScrollArea/index.d.ts +0 -1
- package/dist/components/Segmented/component.d.ts +0 -9
- package/dist/components/Segmented/index.d.ts +0 -1
- package/dist/components/Select/component.d.ts +0 -23
- package/dist/components/Select/index.d.ts +0 -1
- package/dist/components/Slider/component.d.ts +0 -5
- package/dist/components/Slider/index.d.ts +0 -1
- package/dist/components/Spin/component.d.ts +0 -3
- package/dist/components/Spin/index.d.ts +0 -1
- package/dist/components/Splitter/component.d.ts +0 -12
- package/dist/components/Splitter/index.d.ts +0 -1
- package/dist/components/Switch/component.d.ts +0 -8
- package/dist/components/Switch/index.d.ts +0 -1
- package/dist/components/Table/component.d.ts +0 -19
- package/dist/components/Table/index.d.ts +0 -1
- package/dist/components/Tag/component.d.ts +0 -11
- package/dist/components/Tag/index.d.ts +0 -1
- package/dist/components/ThemeProvider/component.d.ts +0 -6
- package/dist/components/ThemeProvider/index.d.ts +0 -1
- package/dist/components/Toast/component.d.ts +0 -14
- package/dist/components/Toast/function.d.ts +0 -10
- package/dist/components/Toast/index.d.ts +0 -3
- package/dist/components/Toast/types.d.ts +0 -3
- package/dist/components/Tooltip/component.d.ts +0 -9
- package/dist/components/Tooltip/index.d.ts +0 -1
- package/dist/components/Tour/component.d.ts +0 -7
- package/dist/components/Tour/index.d.ts +0 -1
- package/dist/components/Transition/component.d.ts +0 -17
- package/dist/components/Transition/index.d.ts +0 -1
- package/dist/components/Tree/components.d.ts +0 -13
- package/dist/components/Tree/helpers.d.ts +0 -4
- package/dist/components/Tree/index.d.ts +0 -4
- package/dist/components/Tree/types.d.ts +0 -55
- package/dist/components/Tree/useTreeCommon.d.ts +0 -178
- package/dist/components/Tree/useUniqueKeysTree.d.ts +0 -33
- package/dist/components/Truncate/component.d.ts +0 -12
- package/dist/components/Truncate/helpers.d.ts +0 -5
- package/dist/components/Truncate/index.d.ts +0 -1
- package/dist/components/Upload/component.d.ts +0 -16
- package/dist/components/Upload/dragger.d.ts +0 -13
- package/dist/components/Upload/hooks.d.ts +0 -5
- package/dist/components/Upload/index.d.ts +0 -3
- package/dist/components/Upload/item.d.ts +0 -11
- package/dist/components/Upload/utils.d.ts +0 -1
- package/dist/components/VerticalCollapsiblePanel/component.d.ts +0 -64
- package/dist/components/VerticalCollapsiblePanel/index.d.ts +0 -1
- package/dist/components/hooks/antd.d.ts +0 -11
- package/dist/components/hooks/base-ui.d.ts +0 -7
- package/dist/components/hooks/index.d.ts +0 -4
- package/dist/components/hooks/useCharts.d.ts +0 -22
- package/dist/components/hooks/useControlledState.d.ts +0 -1
- package/dist/components/index.d.ts +0 -40
- package/dist/components/utils/WithAntdTokens.d.ts +0 -7
- package/dist/components/utils/antdUtils.d.ts +0 -15
- package/dist/components/utils/client.d.ts +0 -2
- package/dist/components/utils/cn.d.ts +0 -4
- package/dist/components/utils/index.d.ts +0 -3
- package/dist/components/utils/isTracebackError.d.ts +0 -1
- package/dist/components/utils/main.d.ts +0 -3
- package/dist/components/utils/reactToString.d.ts +0 -2
- package/dist/components/utils/types.d.ts +0 -9
- package/dist/hooks.js +0 -961
- package/dist/index.css +0 -116
- package/dist/style.css +0 -1392
- package/dist/style.js +0 -0
- package/dist/tailwind.js +0 -0
- package/dist/tokens/and-theme/index.d.ts +0 -1
- package/dist/tokens/and-theme/tokens.d.ts +0 -5
- package/dist/tokens/charts/index.d.ts +0 -6
- package/dist/tokens/charts/tokens.d.ts +0 -455
- package/dist/tokens/index.d.ts +0 -2
- package/dist/tokens/utils.d.ts +0 -16
- 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 +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,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,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 +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,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";
|