@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
package/dist/hooks.js
DELETED
|
@@ -1,961 +0,0 @@
|
|
|
1
|
-
import * as __WEBPACK_EXTERNAL_MODULE_antd_es_theme_57fdaa32__ from "antd/es/theme";
|
|
2
|
-
import * as __WEBPACK_EXTERNAL_MODULE_antd_es_grid_ec1d1712__ from "antd/es/grid";
|
|
3
|
-
import * as __WEBPACK_EXTERNAL_MODULE_antd_es_app_useApp_90d95086__ from "antd/es/app/useApp";
|
|
4
|
-
import * as __WEBPACK_EXTERNAL_MODULE_antd_es_form_Form_38f624ac__ from "antd/es/form/Form";
|
|
5
|
-
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
6
|
-
import * as __WEBPACK_EXTERNAL_MODULE_react_dom_7136dc57__ from "react-dom";
|
|
7
|
-
"use client";
|
|
8
|
-
const useToken = __WEBPACK_EXTERNAL_MODULE_antd_es_theme_57fdaa32__["default"].useToken;
|
|
9
|
-
const useBreakpoint = __WEBPACK_EXTERNAL_MODULE_antd_es_grid_ec1d1712__["default"].useBreakpoint;
|
|
10
|
-
const useMessage = ()=>{
|
|
11
|
-
const { message } = (0, __WEBPACK_EXTERNAL_MODULE_antd_es_app_useApp_90d95086__["default"])();
|
|
12
|
-
return message;
|
|
13
|
-
};
|
|
14
|
-
const useModal = ()=>{
|
|
15
|
-
const { modal } = (0, __WEBPACK_EXTERNAL_MODULE_antd_es_app_useApp_90d95086__["default"])();
|
|
16
|
-
return modal;
|
|
17
|
-
};
|
|
18
|
-
"use client";
|
|
19
|
-
const useEnhancedEffect = "undefined" != typeof window ? __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect : __WEBPACK_EXTERNAL_MODULE_react__.useEffect;
|
|
20
|
-
function useEventCallback(fn) {
|
|
21
|
-
const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(fn);
|
|
22
|
-
useEnhancedEffect(()=>{
|
|
23
|
-
ref.current = fn;
|
|
24
|
-
});
|
|
25
|
-
return (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((...args)=>{
|
|
26
|
-
var _ref_current;
|
|
27
|
-
return null == (_ref_current = ref.current) ? void 0 : _ref_current.call(ref, ...args);
|
|
28
|
-
}, []);
|
|
29
|
-
}
|
|
30
|
-
function useLatestRef(value) {
|
|
31
|
-
const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(value);
|
|
32
|
-
useEnhancedEffect(()=>{
|
|
33
|
-
ref.current = value;
|
|
34
|
-
});
|
|
35
|
-
return ref;
|
|
36
|
-
}
|
|
37
|
-
function useAnimationsFinished(ref, waitForNextTick = false) {
|
|
38
|
-
const frameRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(-1);
|
|
39
|
-
const timeoutRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(-1);
|
|
40
|
-
const cancelTasks = useEventCallback(()=>{
|
|
41
|
-
cancelAnimationFrame(frameRef.current);
|
|
42
|
-
clearTimeout(timeoutRef.current);
|
|
43
|
-
});
|
|
44
|
-
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>cancelTasks, [
|
|
45
|
-
cancelTasks
|
|
46
|
-
]);
|
|
47
|
-
return useEventCallback((fnToExecute)=>{
|
|
48
|
-
cancelTasks();
|
|
49
|
-
const element = ref.current;
|
|
50
|
-
if (!element) return;
|
|
51
|
-
if ("function" != typeof element.getAnimations) fnToExecute();
|
|
52
|
-
else frameRef.current = requestAnimationFrame(()=>{
|
|
53
|
-
function exec() {
|
|
54
|
-
if (!element) return;
|
|
55
|
-
Promise.allSettled(element.getAnimations().map((anim)=>anim.finished)).then(()=>{
|
|
56
|
-
(0, __WEBPACK_EXTERNAL_MODULE_react_dom_7136dc57__.flushSync)(fnToExecute);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
if (waitForNextTick) timeoutRef.current = window.setTimeout(exec);
|
|
60
|
-
else exec();
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
"use client";
|
|
65
|
-
function useControlledState(value, onChange, defaultValue) {
|
|
66
|
-
const [internalState, setInternalState] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(defaultValue);
|
|
67
|
-
const isControlled = void 0 !== value;
|
|
68
|
-
const setState = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((next)=>{
|
|
69
|
-
const nextValue = "function" == typeof next ? next(value) : next;
|
|
70
|
-
if ("function" == typeof onChange) onChange(nextValue);
|
|
71
|
-
if (!isControlled) setInternalState(next);
|
|
72
|
-
}, [
|
|
73
|
-
value,
|
|
74
|
-
onChange,
|
|
75
|
-
isControlled
|
|
76
|
-
]);
|
|
77
|
-
const state = isControlled ? value : internalState;
|
|
78
|
-
return [
|
|
79
|
-
state,
|
|
80
|
-
setState
|
|
81
|
-
];
|
|
82
|
-
}
|
|
83
|
-
"use client";
|
|
84
|
-
const DSRootContext = __WEBPACK_EXTERNAL_MODULE_react__["default"].createContext({
|
|
85
|
-
theme: "light"
|
|
86
|
-
});
|
|
87
|
-
DSRootContext.Provider;
|
|
88
|
-
const useDS = ()=>__WEBPACK_EXTERNAL_MODULE_react__["default"].useContext(DSRootContext);
|
|
89
|
-
const getTokensByTheme = (originTokens, theme)=>{
|
|
90
|
-
const tokens = {};
|
|
91
|
-
Object.entries(originTokens).forEach(([key, value])=>{
|
|
92
|
-
if (value && "object" == typeof value && "light" in value && "dark" in value) {
|
|
93
|
-
const tokenValue = value;
|
|
94
|
-
tokens[key] = tokenValue[theme];
|
|
95
|
-
} else if ("string" == typeof value) tokens[key] = value;
|
|
96
|
-
});
|
|
97
|
-
return tokens;
|
|
98
|
-
};
|
|
99
|
-
const getColorsByTheme = (colorsOrTokens, theme)=>{
|
|
100
|
-
if (Array.isArray(colorsOrTokens)) return colorsOrTokens.map((color)=>color[theme]);
|
|
101
|
-
return Object.values(getTokensByTheme(colorsOrTokens, theme));
|
|
102
|
-
};
|
|
103
|
-
function resolveColorTokens(colors) {
|
|
104
|
-
const resolved = {};
|
|
105
|
-
const raw = colors;
|
|
106
|
-
const resolve = (key)=>{
|
|
107
|
-
if (resolved[key]) return resolved[key];
|
|
108
|
-
const value = raw[key];
|
|
109
|
-
if (!value) return {
|
|
110
|
-
light: "",
|
|
111
|
-
dark: ""
|
|
112
|
-
};
|
|
113
|
-
if ("string" == typeof value) {
|
|
114
|
-
const match = value.match(/^\{(.+)\}$/);
|
|
115
|
-
if (!match) throw new Error(`Invalid reference token: ${String(key)}`);
|
|
116
|
-
const resolvedValue = resolve(match[1]);
|
|
117
|
-
resolved[key] = resolvedValue;
|
|
118
|
-
return resolvedValue;
|
|
119
|
-
}
|
|
120
|
-
const light = "string" == typeof value.light && /^\{.+\}$/.test(value.light) ? resolve(value.light.slice(1, -1)).light : value.light;
|
|
121
|
-
const dark = "string" == typeof value.dark && /^\{.+\}$/.test(value.dark) ? resolve(value.dark.slice(1, -1)).dark : value.dark;
|
|
122
|
-
resolved[key] = {
|
|
123
|
-
light,
|
|
124
|
-
dark
|
|
125
|
-
};
|
|
126
|
-
return resolved[key];
|
|
127
|
-
};
|
|
128
|
-
Object.keys(raw).forEach((key)=>{
|
|
129
|
-
resolve(key);
|
|
130
|
-
});
|
|
131
|
-
return Object.fromEntries(Object.entries(resolved).filter(([_, value])=>value && value.light && value.dark));
|
|
132
|
-
}
|
|
133
|
-
const antdColorTokens = {
|
|
134
|
-
colorText: {
|
|
135
|
-
light: "rgba(0, 0, 0, 0.88)",
|
|
136
|
-
dark: "rgba(255, 255, 255, 0.85)"
|
|
137
|
-
},
|
|
138
|
-
colorTextSecondary: {
|
|
139
|
-
light: "rgba(0, 0, 0, 0.65)",
|
|
140
|
-
dark: "rgba(255, 255, 255, 0.65)"
|
|
141
|
-
},
|
|
142
|
-
colorTextTertiary: {
|
|
143
|
-
light: "rgba(0, 0, 0, 0.45)",
|
|
144
|
-
dark: "rgba(255, 255, 255, 0.45)"
|
|
145
|
-
},
|
|
146
|
-
colorTextQuaternary: {
|
|
147
|
-
light: "rgba(0, 0, 0, 0.25)",
|
|
148
|
-
dark: "rgba(255, 255, 255, 0.25)"
|
|
149
|
-
},
|
|
150
|
-
colorPrimary: {
|
|
151
|
-
light: "#175CD3",
|
|
152
|
-
dark: "#2E90FA"
|
|
153
|
-
},
|
|
154
|
-
colorPrimaryBg: {
|
|
155
|
-
light: "#E9F2FF",
|
|
156
|
-
dark: "#152137"
|
|
157
|
-
},
|
|
158
|
-
colorPrimaryBgHover: {
|
|
159
|
-
light: "#D1E9FF",
|
|
160
|
-
dark: "#112545"
|
|
161
|
-
},
|
|
162
|
-
colorPrimaryBorder: {
|
|
163
|
-
light: "#84CAFF",
|
|
164
|
-
dark: "#1C3959"
|
|
165
|
-
},
|
|
166
|
-
colorPrimaryBorderHover: {
|
|
167
|
-
light: "#53B1FD",
|
|
168
|
-
dark: "#204C7C"
|
|
169
|
-
},
|
|
170
|
-
colorPrimaryHover: {
|
|
171
|
-
light: "#1570EF",
|
|
172
|
-
dark: "#50A0E8"
|
|
173
|
-
},
|
|
174
|
-
colorPrimaryActive: {
|
|
175
|
-
light: "#175CD3",
|
|
176
|
-
dark: "#2565AB"
|
|
177
|
-
},
|
|
178
|
-
colorPrimaryTextHover: {
|
|
179
|
-
light: "#1570EF",
|
|
180
|
-
dark: "#50A0E8"
|
|
181
|
-
},
|
|
182
|
-
colorPrimaryTextActive: {
|
|
183
|
-
light: "#175CD3",
|
|
184
|
-
dark: "#2565AB"
|
|
185
|
-
},
|
|
186
|
-
colorInfo: {
|
|
187
|
-
light: "#175CD3",
|
|
188
|
-
dark: "#2E90FA"
|
|
189
|
-
},
|
|
190
|
-
colorInfoBg: {
|
|
191
|
-
light: "#E9F2FF",
|
|
192
|
-
dark: "#152137"
|
|
193
|
-
},
|
|
194
|
-
colorInfoBgHover: {
|
|
195
|
-
light: "#D1E9FF",
|
|
196
|
-
dark: "#112545"
|
|
197
|
-
},
|
|
198
|
-
colorInfoBorder: {
|
|
199
|
-
light: "#84CAFF",
|
|
200
|
-
dark: "#1C3959"
|
|
201
|
-
},
|
|
202
|
-
colorInfoBorderHover: {
|
|
203
|
-
light: "#53B1FD",
|
|
204
|
-
dark: "#204C7C"
|
|
205
|
-
},
|
|
206
|
-
colorInfoHover: {
|
|
207
|
-
light: "#1570EF",
|
|
208
|
-
dark: "#50A0E8"
|
|
209
|
-
},
|
|
210
|
-
colorInfoActive: {
|
|
211
|
-
light: "#175CD3",
|
|
212
|
-
dark: "#2565AB"
|
|
213
|
-
},
|
|
214
|
-
colorInfoTextHover: {
|
|
215
|
-
light: "#1570EF",
|
|
216
|
-
dark: "#50A0E8"
|
|
217
|
-
},
|
|
218
|
-
colorInfoTextActive: {
|
|
219
|
-
light: "#175CD3",
|
|
220
|
-
dark: "#2565AB"
|
|
221
|
-
},
|
|
222
|
-
colorSuccess: {
|
|
223
|
-
light: "#4CB200",
|
|
224
|
-
dark: "#389E0D"
|
|
225
|
-
},
|
|
226
|
-
colorSuccessBg: {
|
|
227
|
-
light: "#F6FFF0",
|
|
228
|
-
dark: "#162100"
|
|
229
|
-
},
|
|
230
|
-
colorSuccessBgHover: {
|
|
231
|
-
light: "#D9F7BE",
|
|
232
|
-
dark: "#1D2B00"
|
|
233
|
-
},
|
|
234
|
-
colorSuccessBorder: {
|
|
235
|
-
light: "#B7EB8F",
|
|
236
|
-
dark: "#274916"
|
|
237
|
-
},
|
|
238
|
-
colorSuccessBorderHover: {
|
|
239
|
-
light: "#95DE64",
|
|
240
|
-
dark: "#306317"
|
|
241
|
-
},
|
|
242
|
-
colorSuccessHover: {
|
|
243
|
-
light: "#73D13D",
|
|
244
|
-
dark: "#52C41A"
|
|
245
|
-
},
|
|
246
|
-
colorSuccessActive: {
|
|
247
|
-
light: "#389E0D",
|
|
248
|
-
dark: "#237804"
|
|
249
|
-
},
|
|
250
|
-
colorSuccessTextHover: {
|
|
251
|
-
light: "#237804",
|
|
252
|
-
dark: "#52C41A"
|
|
253
|
-
},
|
|
254
|
-
colorSuccessTextActive: {
|
|
255
|
-
light: "#092B00",
|
|
256
|
-
dark: "#237804"
|
|
257
|
-
},
|
|
258
|
-
colorWarning: {
|
|
259
|
-
light: "#FA8C16",
|
|
260
|
-
dark: "#D48806"
|
|
261
|
-
},
|
|
262
|
-
colorWarningBg: {
|
|
263
|
-
light: "#FFF7E6",
|
|
264
|
-
dark: "#281800"
|
|
265
|
-
},
|
|
266
|
-
colorWarningBgHover: {
|
|
267
|
-
light: "#FFE7BA",
|
|
268
|
-
dark: "#3D2200"
|
|
269
|
-
},
|
|
270
|
-
colorWarningBorder: {
|
|
271
|
-
light: "#FFD591",
|
|
272
|
-
dark: "#443B16"
|
|
273
|
-
},
|
|
274
|
-
colorWarningBorderHover: {
|
|
275
|
-
light: "#FFC069",
|
|
276
|
-
dark: "#594E1A"
|
|
277
|
-
},
|
|
278
|
-
colorWarningHover: {
|
|
279
|
-
light: "#FFA940",
|
|
280
|
-
dark: "#E8B339"
|
|
281
|
-
},
|
|
282
|
-
colorWarningActive: {
|
|
283
|
-
light: "#D46B08",
|
|
284
|
-
dark: "#AA7714"
|
|
285
|
-
},
|
|
286
|
-
colorWarningTextHover: {
|
|
287
|
-
light: "#AD4E00",
|
|
288
|
-
dark: "#E8B339"
|
|
289
|
-
},
|
|
290
|
-
colorWarningTextActive: {
|
|
291
|
-
light: "#873800",
|
|
292
|
-
dark: "#AA7714"
|
|
293
|
-
},
|
|
294
|
-
colorError: {
|
|
295
|
-
light: "#D92D20",
|
|
296
|
-
dark: "#CF3D33"
|
|
297
|
-
},
|
|
298
|
-
colorErrorBg: {
|
|
299
|
-
light: "#FEF3F2",
|
|
300
|
-
dark: "#291414"
|
|
301
|
-
},
|
|
302
|
-
colorErrorBgHover: {
|
|
303
|
-
light: "#FEE4E2",
|
|
304
|
-
dark: "#411A18"
|
|
305
|
-
},
|
|
306
|
-
colorErrorBorder: {
|
|
307
|
-
light: "#FDA29B",
|
|
308
|
-
dark: "#562222"
|
|
309
|
-
},
|
|
310
|
-
colorErrorBorderHover: {
|
|
311
|
-
light: "#F97066",
|
|
312
|
-
dark: "#772A24"
|
|
313
|
-
},
|
|
314
|
-
colorErrorHover: {
|
|
315
|
-
light: "#F04438",
|
|
316
|
-
dark: "#E5695A"
|
|
317
|
-
},
|
|
318
|
-
colorErrorActive: {
|
|
319
|
-
light: "#D92D20",
|
|
320
|
-
dark: "#A3332B"
|
|
321
|
-
},
|
|
322
|
-
colorErrorTextHover: {
|
|
323
|
-
light: "#F04438",
|
|
324
|
-
dark: "#E5695A"
|
|
325
|
-
},
|
|
326
|
-
colorErrorTextActive: {
|
|
327
|
-
light: "#D92D20",
|
|
328
|
-
dark: "#A3332B"
|
|
329
|
-
},
|
|
330
|
-
colorFill: {
|
|
331
|
-
light: "rgba(0, 0, 0, 0.15)",
|
|
332
|
-
dark: "rgba(255, 255, 255, 0.15)"
|
|
333
|
-
},
|
|
334
|
-
colorFillSecondary: {
|
|
335
|
-
light: "rgba(0, 0, 0, 0.06)",
|
|
336
|
-
dark: "rgba(255, 255, 255, 0.06)"
|
|
337
|
-
},
|
|
338
|
-
colorFillTertiary: {
|
|
339
|
-
light: "rgba(0, 0, 0, 0.04)",
|
|
340
|
-
dark: "rgba(255, 255, 255, 0.04)"
|
|
341
|
-
},
|
|
342
|
-
colorFillQuaternary: {
|
|
343
|
-
light: "rgba(0, 0, 0, 0.02)",
|
|
344
|
-
dark: "rgba(255, 255, 255, 0.02)"
|
|
345
|
-
},
|
|
346
|
-
colorFillAlter: {
|
|
347
|
-
light: "rgba(0, 0, 0, 0.02)",
|
|
348
|
-
dark: "rgba(255, 255, 255, 0.02)"
|
|
349
|
-
},
|
|
350
|
-
colorBorder: {
|
|
351
|
-
light: "rgba(0, 0, 0, 0.16)",
|
|
352
|
-
dark: "rgba(255, 255, 255, 0.16)"
|
|
353
|
-
},
|
|
354
|
-
colorBorderSecondary: {
|
|
355
|
-
light: "rgba(0, 0, 0, 0.06)",
|
|
356
|
-
dark: "rgba(255, 255, 255, 0.06)"
|
|
357
|
-
},
|
|
358
|
-
colorIcon: {
|
|
359
|
-
light: "rgba(0, 0, 0, 0.58)",
|
|
360
|
-
dark: "rgba(255, 255, 255, 0.58)"
|
|
361
|
-
},
|
|
362
|
-
colorIconHover: {
|
|
363
|
-
light: "rgba(0, 0, 0, 0.88)",
|
|
364
|
-
dark: "rgba(255, 255, 255, 0.88)"
|
|
365
|
-
},
|
|
366
|
-
colorBgContainer: {
|
|
367
|
-
light: "#FFFFFF",
|
|
368
|
-
dark: "#26262C"
|
|
369
|
-
},
|
|
370
|
-
colorBgElevated: {
|
|
371
|
-
light: "#FFFFFF",
|
|
372
|
-
dark: "#2F2F37"
|
|
373
|
-
},
|
|
374
|
-
colorBgLayout: {
|
|
375
|
-
light: "#F5F5F5",
|
|
376
|
-
dark: "#1A1A1E"
|
|
377
|
-
},
|
|
378
|
-
colorBgSpotlight: {
|
|
379
|
-
light: "rgba(0, 0, 0, 0.85)",
|
|
380
|
-
dark: "#505D5D"
|
|
381
|
-
},
|
|
382
|
-
colorBgMask: {
|
|
383
|
-
light: "rgba(0, 0, 0, 0.45)",
|
|
384
|
-
dark: "rgba(0, 0, 0, 0.45)"
|
|
385
|
-
},
|
|
386
|
-
colorBgBase: {
|
|
387
|
-
light: "#FFFFFF",
|
|
388
|
-
dark: "#13131A"
|
|
389
|
-
},
|
|
390
|
-
controlOutline: {
|
|
391
|
-
light: "rgba(0, 0, 0, 0.12)",
|
|
392
|
-
dark: "rgba(255, 255, 255, 0.12)"
|
|
393
|
-
}
|
|
394
|
-
};
|
|
395
|
-
const sharedTokens = {
|
|
396
|
-
fontFamily: "var(--ds-inter)",
|
|
397
|
-
fontFamilyCode: "var(--ds-roboto-mono)",
|
|
398
|
-
fontSizeHeading1: 36,
|
|
399
|
-
fontSizeHeading2: 30,
|
|
400
|
-
fontSizeHeading3: 24,
|
|
401
|
-
fontSizeHeading4: 20,
|
|
402
|
-
fontSizeHeading5: 16,
|
|
403
|
-
lineHeightHeading1: 40 / 36,
|
|
404
|
-
lineHeightHeading2: 1.2,
|
|
405
|
-
lineHeightHeading3: 32 / 24,
|
|
406
|
-
lineHeightHeading4: 1.4,
|
|
407
|
-
lineHeightHeading5: 1.5,
|
|
408
|
-
lineHeight: 20 / 14,
|
|
409
|
-
lineHeightLG: 1.5,
|
|
410
|
-
lineHeightSM: 16 / 12,
|
|
411
|
-
fontWeightStrong: 600,
|
|
412
|
-
boxShadow: "0px 1px 2px rgba(0, 0, 0, 0.06), 0px 1px 6px rgba(0, 0, 0, 0.04), 0px 2px 10px rgba(0, 0, 0, 0.04)",
|
|
413
|
-
boxShadowSecondary: "0px 0px 1px 0px var(--ds-color-border-modal), 0px 3px 6px 1px rgba(0, 0, 0, 0.08), 0px 6px 26px 2px rgba(0, 0, 0, 0.08), 0px 4px 52px 0px rgba(0, 0, 0, 0.05)",
|
|
414
|
-
colorBgSpotlight: "rgba(0, 0, 0, 0.85)"
|
|
415
|
-
};
|
|
416
|
-
const sharedThemeConfig = {
|
|
417
|
-
cssVar: true,
|
|
418
|
-
components: {
|
|
419
|
-
Input: {},
|
|
420
|
-
InputNumber: {},
|
|
421
|
-
Button: {
|
|
422
|
-
defaultShadow: void 0,
|
|
423
|
-
primaryShadow: void 0,
|
|
424
|
-
dangerShadow: void 0
|
|
425
|
-
},
|
|
426
|
-
Select: {},
|
|
427
|
-
Segmented: {
|
|
428
|
-
controlHeightLG: 36,
|
|
429
|
-
controlHeightSM: 24
|
|
430
|
-
},
|
|
431
|
-
Breadcrumb: {
|
|
432
|
-
separatorColor: "var(--ds-color-border)"
|
|
433
|
-
},
|
|
434
|
-
Slider: {
|
|
435
|
-
trackBg: "var(--ds-color-primary)",
|
|
436
|
-
trackHoverBg: "var(--ds-color-primary-hover)",
|
|
437
|
-
trackBgDisabled: "var(--ds-color-text-disabled)",
|
|
438
|
-
railBg: "var(--ds-control-outline)",
|
|
439
|
-
railHoverBg: "var(--ds-color-border)",
|
|
440
|
-
handleColor: "var(--ds-color-primary)",
|
|
441
|
-
handleActiveColor: "var(--ds-color-primary-active)",
|
|
442
|
-
handleColorDisabled: "var(--ds-color-text-disabled)",
|
|
443
|
-
dotBorderColor: "var(--ds-color-primary)",
|
|
444
|
-
dotActiveBorderColor: "var(--ds-color-primary-active)"
|
|
445
|
-
},
|
|
446
|
-
Form: {
|
|
447
|
-
itemMarginBottom: 16,
|
|
448
|
-
labelColor: "var(--ds-color-text)"
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
};
|
|
452
|
-
({
|
|
453
|
-
token: {
|
|
454
|
-
...getTokensByTheme(antdColorTokens, "light"),
|
|
455
|
-
...sharedTokens
|
|
456
|
-
},
|
|
457
|
-
...sharedThemeConfig
|
|
458
|
-
});
|
|
459
|
-
({
|
|
460
|
-
token: {
|
|
461
|
-
...getTokensByTheme(antdColorTokens, "dark"),
|
|
462
|
-
...sharedTokens
|
|
463
|
-
},
|
|
464
|
-
...sharedThemeConfig
|
|
465
|
-
});
|
|
466
|
-
const rawChartColorTokens = {
|
|
467
|
-
colorChartsRed300: {
|
|
468
|
-
light: "#ea7158",
|
|
469
|
-
dark: "#d63f38"
|
|
470
|
-
},
|
|
471
|
-
colorChartsRed400: {
|
|
472
|
-
light: "#dc5032",
|
|
473
|
-
dark: "#ed5958"
|
|
474
|
-
},
|
|
475
|
-
colorChartsRed500: {
|
|
476
|
-
light: "#d13313",
|
|
477
|
-
dark: "#fe6e73"
|
|
478
|
-
},
|
|
479
|
-
colorChartsRed600: {
|
|
480
|
-
light: "#ba2e0f",
|
|
481
|
-
dark: "#ff8a8a"
|
|
482
|
-
},
|
|
483
|
-
colorChartsRed700: {
|
|
484
|
-
light: "#a82a0c",
|
|
485
|
-
dark: "#ffa09e"
|
|
486
|
-
},
|
|
487
|
-
colorChartsRed800: {
|
|
488
|
-
light: "#972709",
|
|
489
|
-
dark: "#ffb3b0"
|
|
490
|
-
},
|
|
491
|
-
colorChartsRed900: {
|
|
492
|
-
light: "#892407",
|
|
493
|
-
dark: "#ffc4c0"
|
|
494
|
-
},
|
|
495
|
-
colorChartsRed1000: {
|
|
496
|
-
light: "#7d2105",
|
|
497
|
-
dark: "#ffd2cf"
|
|
498
|
-
},
|
|
499
|
-
colorChartsRed1100: {
|
|
500
|
-
light: "#721e03",
|
|
501
|
-
dark: "#ffe0dd"
|
|
502
|
-
},
|
|
503
|
-
colorChartsRed1200: {
|
|
504
|
-
light: "#671c00",
|
|
505
|
-
dark: "#ffecea"
|
|
506
|
-
},
|
|
507
|
-
colorChartsOrange300: {
|
|
508
|
-
light: "#e07941",
|
|
509
|
-
dark: "#c55305"
|
|
510
|
-
},
|
|
511
|
-
colorChartsOrange400: {
|
|
512
|
-
light: "#cc5f21",
|
|
513
|
-
dark: "#de6923"
|
|
514
|
-
},
|
|
515
|
-
colorChartsOrange500: {
|
|
516
|
-
light: "#bc4d01",
|
|
517
|
-
dark: "#f27c36"
|
|
518
|
-
},
|
|
519
|
-
colorChartsOrange600: {
|
|
520
|
-
light: "#a84401",
|
|
521
|
-
dark: "#f89256"
|
|
522
|
-
},
|
|
523
|
-
colorChartsOrange700: {
|
|
524
|
-
light: "#983c02",
|
|
525
|
-
dark: "#fca572"
|
|
526
|
-
},
|
|
527
|
-
colorChartsOrange800: {
|
|
528
|
-
light: "#8a3603",
|
|
529
|
-
dark: "#ffb68b"
|
|
530
|
-
},
|
|
531
|
-
colorChartsOrange900: {
|
|
532
|
-
light: "#7e3103",
|
|
533
|
-
dark: "#ffc6a4"
|
|
534
|
-
},
|
|
535
|
-
colorChartsOrange1000: {
|
|
536
|
-
light: "#732c02",
|
|
537
|
-
dark: "#ffd4bb"
|
|
538
|
-
},
|
|
539
|
-
colorChartsOrange1100: {
|
|
540
|
-
light: "#692801",
|
|
541
|
-
dark: "#ffe1cf"
|
|
542
|
-
},
|
|
543
|
-
colorChartsOrange1200: {
|
|
544
|
-
light: "#602400",
|
|
545
|
-
dark: "#ffede2"
|
|
546
|
-
},
|
|
547
|
-
colorChartsYellow300: {
|
|
548
|
-
light: "#b2911c",
|
|
549
|
-
dark: "#977001"
|
|
550
|
-
},
|
|
551
|
-
colorChartsYellow400: {
|
|
552
|
-
light: "#9c7b0b",
|
|
553
|
-
dark: "#b08400"
|
|
554
|
-
},
|
|
555
|
-
colorChartsYellow500: {
|
|
556
|
-
light: "#8a6b05",
|
|
557
|
-
dark: "#c59600"
|
|
558
|
-
},
|
|
559
|
-
colorChartsYellow600: {
|
|
560
|
-
light: "#7b5f04",
|
|
561
|
-
dark: "#d3a61c"
|
|
562
|
-
},
|
|
563
|
-
colorChartsYellow700: {
|
|
564
|
-
light: "#6f5504",
|
|
565
|
-
dark: "#dfb52c"
|
|
566
|
-
},
|
|
567
|
-
colorChartsYellow800: {
|
|
568
|
-
light: "#654d03",
|
|
569
|
-
dark: "#eac33a"
|
|
570
|
-
},
|
|
571
|
-
colorChartsYellow900: {
|
|
572
|
-
light: "#5d4503",
|
|
573
|
-
dark: "#f1cf65"
|
|
574
|
-
},
|
|
575
|
-
colorChartsYellow1000: {
|
|
576
|
-
light: "#553f03",
|
|
577
|
-
dark: "#f7db8a"
|
|
578
|
-
},
|
|
579
|
-
colorChartsYellow1100: {
|
|
580
|
-
light: "#4d3901",
|
|
581
|
-
dark: "#fce5a8"
|
|
582
|
-
},
|
|
583
|
-
colorChartsYellow1200: {
|
|
584
|
-
light: "#483300",
|
|
585
|
-
dark: "#ffefc9"
|
|
586
|
-
},
|
|
587
|
-
colorChartsGreen300: {
|
|
588
|
-
light: "#67a353",
|
|
589
|
-
dark: "#48851a"
|
|
590
|
-
},
|
|
591
|
-
colorChartsGreen400: {
|
|
592
|
-
light: "#41902c",
|
|
593
|
-
dark: "#5a9b29"
|
|
594
|
-
},
|
|
595
|
-
colorChartsGreen500: {
|
|
596
|
-
light: "#1f8104",
|
|
597
|
-
dark: "#69ae34"
|
|
598
|
-
},
|
|
599
|
-
colorChartsGreen600: {
|
|
600
|
-
light: "#1a7302",
|
|
601
|
-
dark: "#7dbd4c"
|
|
602
|
-
},
|
|
603
|
-
colorChartsGreen700: {
|
|
604
|
-
light: "#176702",
|
|
605
|
-
dark: "#8fca61"
|
|
606
|
-
},
|
|
607
|
-
colorChartsGreen800: {
|
|
608
|
-
light: "#145d02",
|
|
609
|
-
dark: "#9fd673"
|
|
610
|
-
},
|
|
611
|
-
colorChartsGreen900: {
|
|
612
|
-
light: "#125502",
|
|
613
|
-
dark: "#b2df8d"
|
|
614
|
-
},
|
|
615
|
-
colorChartsGreen1000: {
|
|
616
|
-
light: "#104d01",
|
|
617
|
-
dark: "#c5e7a8"
|
|
618
|
-
},
|
|
619
|
-
colorChartsGreen1100: {
|
|
620
|
-
light: "#0f4601",
|
|
621
|
-
dark: "#d5efbe"
|
|
622
|
-
},
|
|
623
|
-
colorChartsGreen1200: {
|
|
624
|
-
light: "#0d4000",
|
|
625
|
-
dark: "#e4f7d5"
|
|
626
|
-
},
|
|
627
|
-
colorChartsTeal300: {
|
|
628
|
-
light: "#2ea597",
|
|
629
|
-
dark: "#018977"
|
|
630
|
-
},
|
|
631
|
-
colorChartsTeal400: {
|
|
632
|
-
light: "#1c8e81",
|
|
633
|
-
dark: "#009d89"
|
|
634
|
-
},
|
|
635
|
-
colorChartsTeal500: {
|
|
636
|
-
light: "#0d7d70",
|
|
637
|
-
dark: "#00b09b"
|
|
638
|
-
},
|
|
639
|
-
colorChartsTeal600: {
|
|
640
|
-
light: "#096f64",
|
|
641
|
-
dark: "#40bfa9"
|
|
642
|
-
},
|
|
643
|
-
colorChartsTeal700: {
|
|
644
|
-
light: "#06645a",
|
|
645
|
-
dark: "#5fccb7"
|
|
646
|
-
},
|
|
647
|
-
colorChartsTeal800: {
|
|
648
|
-
light: "#045b52",
|
|
649
|
-
dark: "#77d7c3"
|
|
650
|
-
},
|
|
651
|
-
colorChartsTeal900: {
|
|
652
|
-
light: "#03524a",
|
|
653
|
-
dark: "#94e0d0"
|
|
654
|
-
},
|
|
655
|
-
colorChartsTeal1000: {
|
|
656
|
-
light: "#014b44",
|
|
657
|
-
dark: "#ace9db"
|
|
658
|
-
},
|
|
659
|
-
colorChartsTeal1100: {
|
|
660
|
-
light: "#01443e",
|
|
661
|
-
dark: "#c2f0e6"
|
|
662
|
-
},
|
|
663
|
-
colorChartsTeal1200: {
|
|
664
|
-
light: "#003e38",
|
|
665
|
-
dark: "#d7f7f0"
|
|
666
|
-
},
|
|
667
|
-
colorChartsBlue1300: {
|
|
668
|
-
light: "#529ccb",
|
|
669
|
-
dark: "#00819c"
|
|
670
|
-
},
|
|
671
|
-
colorChartsBlue1400: {
|
|
672
|
-
light: "#3184c2",
|
|
673
|
-
dark: "#0497ba"
|
|
674
|
-
},
|
|
675
|
-
colorChartsBlue1500: {
|
|
676
|
-
light: "#0273bb",
|
|
677
|
-
dark: "#08aad2"
|
|
678
|
-
},
|
|
679
|
-
colorChartsBlue1600: {
|
|
680
|
-
light: "#0166ab",
|
|
681
|
-
dark: "#44b9dd"
|
|
682
|
-
},
|
|
683
|
-
colorChartsBlue1700: {
|
|
684
|
-
light: "#015b9d",
|
|
685
|
-
dark: "#63c6e7"
|
|
686
|
-
},
|
|
687
|
-
colorChartsBlue1800: {
|
|
688
|
-
light: "#015292",
|
|
689
|
-
dark: "#79d2f0"
|
|
690
|
-
},
|
|
691
|
-
colorChartsBlue1900: {
|
|
692
|
-
light: "#014a87",
|
|
693
|
-
dark: "#98dcf5"
|
|
694
|
-
},
|
|
695
|
-
colorChartsBlue11000: {
|
|
696
|
-
light: "#01437d",
|
|
697
|
-
dark: "#b3e4f8"
|
|
698
|
-
},
|
|
699
|
-
colorChartsBlue11100: {
|
|
700
|
-
light: "#003c75",
|
|
701
|
-
dark: "#caedfc"
|
|
702
|
-
},
|
|
703
|
-
colorChartsBlue11200: {
|
|
704
|
-
light: "#00366d",
|
|
705
|
-
dark: "#ddf4ff"
|
|
706
|
-
},
|
|
707
|
-
colorChartsBlue2300: {
|
|
708
|
-
light: "#688ae8",
|
|
709
|
-
dark: "#486de8"
|
|
710
|
-
},
|
|
711
|
-
colorChartsBlue2400: {
|
|
712
|
-
light: "#5978e3",
|
|
713
|
-
dark: "#6384f5"
|
|
714
|
-
},
|
|
715
|
-
colorChartsBlue2500: {
|
|
716
|
-
light: "#4066df",
|
|
717
|
-
dark: "#7698fe"
|
|
718
|
-
},
|
|
719
|
-
colorChartsBlue2600: {
|
|
720
|
-
light: "#3759ce",
|
|
721
|
-
dark: "#8ea9ff"
|
|
722
|
-
},
|
|
723
|
-
colorChartsBlue2700: {
|
|
724
|
-
light: "#314fbf",
|
|
725
|
-
dark: "#a2b8ff"
|
|
726
|
-
},
|
|
727
|
-
colorChartsBlue2800: {
|
|
728
|
-
light: "#2c46b1",
|
|
729
|
-
dark: "#b1c5ff"
|
|
730
|
-
},
|
|
731
|
-
colorChartsBlue2900: {
|
|
732
|
-
light: "#273ea5",
|
|
733
|
-
dark: "#c3d1ff"
|
|
734
|
-
},
|
|
735
|
-
colorChartsBlue21000: {
|
|
736
|
-
light: "#23379b",
|
|
737
|
-
dark: "#d2dcff"
|
|
738
|
-
},
|
|
739
|
-
colorChartsBlue21100: {
|
|
740
|
-
light: "#1f3191",
|
|
741
|
-
dark: "#dfe6ff"
|
|
742
|
-
},
|
|
743
|
-
colorChartsBlue21200: {
|
|
744
|
-
light: "#1b2b88",
|
|
745
|
-
dark: "#ecf0ff"
|
|
746
|
-
},
|
|
747
|
-
colorChartsPurple300: {
|
|
748
|
-
light: "#a783e1",
|
|
749
|
-
dark: "#8d59de"
|
|
750
|
-
},
|
|
751
|
-
colorChartsPurple400: {
|
|
752
|
-
light: "#9469d6",
|
|
753
|
-
dark: "#a173ea"
|
|
754
|
-
},
|
|
755
|
-
colorChartsPurple500: {
|
|
756
|
-
light: "#8456ce",
|
|
757
|
-
dark: "#b088f5"
|
|
758
|
-
},
|
|
759
|
-
colorChartsPurple600: {
|
|
760
|
-
light: "#7749bf",
|
|
761
|
-
dark: "#bf9bf9"
|
|
762
|
-
},
|
|
763
|
-
colorChartsPurple700: {
|
|
764
|
-
light: "#6b40b2",
|
|
765
|
-
dark: "#cbabfc"
|
|
766
|
-
},
|
|
767
|
-
colorChartsPurple800: {
|
|
768
|
-
light: "#6237a7",
|
|
769
|
-
dark: "#d6baff"
|
|
770
|
-
},
|
|
771
|
-
colorChartsPurple900: {
|
|
772
|
-
light: "#59309d",
|
|
773
|
-
dark: "#dfc8ff"
|
|
774
|
-
},
|
|
775
|
-
colorChartsPurple1000: {
|
|
776
|
-
light: "#512994",
|
|
777
|
-
dark: "#e8d5ff"
|
|
778
|
-
},
|
|
779
|
-
colorChartsPurple1100: {
|
|
780
|
-
light: "#4a238b",
|
|
781
|
-
dark: "#efe2ff"
|
|
782
|
-
},
|
|
783
|
-
colorChartsPurple1200: {
|
|
784
|
-
light: "#431d84",
|
|
785
|
-
dark: "#f5edff"
|
|
786
|
-
},
|
|
787
|
-
colorChartsPink300: {
|
|
788
|
-
light: "#da7596",
|
|
789
|
-
dark: "#c64a70"
|
|
790
|
-
},
|
|
791
|
-
colorChartsPink400: {
|
|
792
|
-
light: "#ce567c",
|
|
793
|
-
dark: "#d56889"
|
|
794
|
-
},
|
|
795
|
-
colorChartsPink500: {
|
|
796
|
-
light: "#c33d69",
|
|
797
|
-
dark: "#e07f9d"
|
|
798
|
-
},
|
|
799
|
-
colorChartsPink600: {
|
|
800
|
-
light: "#b1325c",
|
|
801
|
-
dark: "#eb92ad"
|
|
802
|
-
},
|
|
803
|
-
colorChartsPink700: {
|
|
804
|
-
light: "#a32952",
|
|
805
|
-
dark: "#f5a2bb"
|
|
806
|
-
},
|
|
807
|
-
colorChartsPink800: {
|
|
808
|
-
light: "#962249",
|
|
809
|
-
dark: "#ffb0c8"
|
|
810
|
-
},
|
|
811
|
-
colorChartsPink900: {
|
|
812
|
-
light: "#8b1b42",
|
|
813
|
-
dark: "#ffc1d4"
|
|
814
|
-
},
|
|
815
|
-
colorChartsPink1000: {
|
|
816
|
-
light: "#81143b",
|
|
817
|
-
dark: "#ffd1de"
|
|
818
|
-
},
|
|
819
|
-
colorChartsPink1100: {
|
|
820
|
-
light: "#780d35",
|
|
821
|
-
dark: "#ffdfe8"
|
|
822
|
-
},
|
|
823
|
-
colorChartsPink1200: {
|
|
824
|
-
light: "#6f062f",
|
|
825
|
-
dark: "#ffecf1"
|
|
826
|
-
},
|
|
827
|
-
colorChartsStatusCritical: {
|
|
828
|
-
light: "{colorChartsRed1000}",
|
|
829
|
-
dark: "{colorChartsRed300}"
|
|
830
|
-
},
|
|
831
|
-
colorChartsStatusHigh: {
|
|
832
|
-
light: "{colorChartsRed600}",
|
|
833
|
-
dark: "{colorChartsRed500}"
|
|
834
|
-
},
|
|
835
|
-
colorChartsStatusMedium: {
|
|
836
|
-
light: "{colorChartsOrange400}",
|
|
837
|
-
dark: "{colorChartsOrange600}"
|
|
838
|
-
},
|
|
839
|
-
colorChartsStatusLow: {
|
|
840
|
-
light: "{colorChartsYellow300}",
|
|
841
|
-
dark: "{colorChartsYellow700}"
|
|
842
|
-
},
|
|
843
|
-
colorChartsStatusPositive: {
|
|
844
|
-
light: "{colorChartsGreen300}",
|
|
845
|
-
dark: "{colorChartsGreen500}"
|
|
846
|
-
},
|
|
847
|
-
colorChartsStatusInfo: {
|
|
848
|
-
light: "{colorChartsBlue1400}",
|
|
849
|
-
dark: "{colorChartsBlue1500}"
|
|
850
|
-
},
|
|
851
|
-
colorChartsStatusNeutral: antdColorTokens.colorTextSecondary,
|
|
852
|
-
colorChartsThresholdNegative: antdColorTokens.colorError,
|
|
853
|
-
colorChartsThresholdPositive: antdColorTokens.colorSuccess,
|
|
854
|
-
colorChartsThresholdInfo: antdColorTokens.colorInfo,
|
|
855
|
-
colorChartsThresholdNeutral: antdColorTokens.colorTextTertiary,
|
|
856
|
-
colorChartsLineGrid: {
|
|
857
|
-
light: "#DADADC",
|
|
858
|
-
dark: "#434347"
|
|
859
|
-
},
|
|
860
|
-
colorChartsLineTick: "{colorChartsLineGrid}",
|
|
861
|
-
colorChartsLineAxis: {
|
|
862
|
-
light: "#C8C8CB",
|
|
863
|
-
dark: "#73737A"
|
|
864
|
-
},
|
|
865
|
-
colorChartsLabelAxis: {
|
|
866
|
-
light: "#7C7C83",
|
|
867
|
-
dark: "#898990"
|
|
868
|
-
},
|
|
869
|
-
colorChartsPaletteCategorical1: "{colorChartsBlue2300}",
|
|
870
|
-
colorChartsPaletteCategorical2: "{colorChartsPink500}",
|
|
871
|
-
colorChartsPaletteCategorical3: "{colorChartsTeal300}",
|
|
872
|
-
colorChartsPaletteCategorical4: "{colorChartsPurple500}",
|
|
873
|
-
colorChartsPaletteCategorical5: "{colorChartsOrange300}",
|
|
874
|
-
colorChartsPaletteCategorical6: "{colorChartsBlue2600}",
|
|
875
|
-
colorChartsPaletteCategorical7: "{colorChartsPink800}",
|
|
876
|
-
colorChartsPaletteCategorical8: "{colorChartsTeal600}",
|
|
877
|
-
colorChartsPaletteCategorical9: "{colorChartsPurple800}",
|
|
878
|
-
colorChartsPaletteCategorical10: "{colorChartsOrange600}",
|
|
879
|
-
colorChartsPaletteCategorical11: "{colorChartsBlue2900}",
|
|
880
|
-
colorChartsPaletteCategorical12: "{colorChartsPink1100}",
|
|
881
|
-
colorChartsPaletteCategorical13: "{colorChartsTeal900}",
|
|
882
|
-
colorChartsPaletteCategorical14: "{colorChartsPurple1100}",
|
|
883
|
-
colorChartsPaletteCategorical15: "{colorChartsOrange900}",
|
|
884
|
-
colorChartsPaletteCategorical16: "{colorChartsBlue21200}",
|
|
885
|
-
colorChartsPaletteCategorical17: "{colorChartsPink400}",
|
|
886
|
-
colorChartsPaletteCategorical18: "{colorChartsTeal1200}",
|
|
887
|
-
colorChartsPaletteCategorical19: "{colorChartsPurple400}",
|
|
888
|
-
colorChartsPaletteCategorical20: "{colorChartsOrange1200}",
|
|
889
|
-
colorChartsPaletteCategorical21: "{colorChartsBlue2500}",
|
|
890
|
-
colorChartsPaletteCategorical22: "{colorChartsPink700}",
|
|
891
|
-
colorChartsPaletteCategorical23: "{colorChartsTeal500}",
|
|
892
|
-
colorChartsPaletteCategorical24: "{colorChartsPurple700}",
|
|
893
|
-
colorChartsPaletteCategorical25: "{colorChartsOrange500}",
|
|
894
|
-
colorChartsPaletteCategorical26: "{colorChartsBlue2800}",
|
|
895
|
-
colorChartsPaletteCategorical27: "{colorChartsPink1000}",
|
|
896
|
-
colorChartsPaletteCategorical28: "{colorChartsTeal800}",
|
|
897
|
-
colorChartsPaletteCategorical29: "{colorChartsPurple1000}",
|
|
898
|
-
colorChartsPaletteCategorical30: "{colorChartsOrange800}",
|
|
899
|
-
colorChartsPaletteCategorical31: "{colorChartsBlue21100}",
|
|
900
|
-
colorChartsPaletteCategorical32: "{colorChartsPink300}",
|
|
901
|
-
colorChartsPaletteCategorical33: "{colorChartsTeal1100}",
|
|
902
|
-
colorChartsPaletteCategorical34: "{colorChartsPurple300}",
|
|
903
|
-
colorChartsPaletteCategorical35: "{colorChartsOrange1100}",
|
|
904
|
-
colorChartsPaletteCategorical36: "{colorChartsBlue2400}",
|
|
905
|
-
colorChartsPaletteCategorical37: "{colorChartsPink600}",
|
|
906
|
-
colorChartsPaletteCategorical38: "{colorChartsTeal400}",
|
|
907
|
-
colorChartsPaletteCategorical39: "{colorChartsPurple600}",
|
|
908
|
-
colorChartsPaletteCategorical40: "{colorChartsOrange400}",
|
|
909
|
-
colorChartsPaletteCategorical41: "{colorChartsBlue2700}",
|
|
910
|
-
colorChartsPaletteCategorical42: "{colorChartsPink900}",
|
|
911
|
-
colorChartsPaletteCategorical43: "{colorChartsTeal700}",
|
|
912
|
-
colorChartsPaletteCategorical44: "{colorChartsPurple900}",
|
|
913
|
-
colorChartsPaletteCategorical45: "{colorChartsOrange700}",
|
|
914
|
-
colorChartsPaletteCategorical46: "{colorChartsBlue21000}",
|
|
915
|
-
colorChartsPaletteCategorical47: "{colorChartsPink1200}",
|
|
916
|
-
colorChartsPaletteCategorical48: "{colorChartsTeal1000}",
|
|
917
|
-
colorChartsPaletteCategorical49: "{colorChartsPurple1200}",
|
|
918
|
-
colorChartsPaletteCategorical50: "{colorChartsOrange1000}"
|
|
919
|
-
};
|
|
920
|
-
const chartColorTokens = resolveColorTokens(rawChartColorTokens);
|
|
921
|
-
const categoricalChartColorKeys = Object.keys(chartColorTokens).filter((key)=>key.startsWith("colorChartsPaletteCategorical"));
|
|
922
|
-
const categoricalChartColorTokens = categoricalChartColorKeys.reduce((acc, key)=>{
|
|
923
|
-
acc[key] = chartColorTokens[key];
|
|
924
|
-
return acc;
|
|
925
|
-
}, {});
|
|
926
|
-
categoricalChartColorKeys.map((key)=>chartColorTokens[key]);
|
|
927
|
-
const useCharts = ()=>{
|
|
928
|
-
const { theme } = useDS();
|
|
929
|
-
const themedChartColorTokens = getTokensByTheme(chartColorTokens, theme);
|
|
930
|
-
const axisLineColor = themedChartColorTokens["colorChartsLineAxis"];
|
|
931
|
-
const splitLineColor = themedChartColorTokens["colorChartsLineGrid"];
|
|
932
|
-
const axisLabelColor = themedChartColorTokens["colorChartsLabelAxis"];
|
|
933
|
-
const categoricalColors = getColorsByTheme(categoricalChartColorTokens, theme);
|
|
934
|
-
const echartsAxisConfig = {
|
|
935
|
-
axisLine: {
|
|
936
|
-
lineStyle: {
|
|
937
|
-
color: axisLineColor
|
|
938
|
-
}
|
|
939
|
-
},
|
|
940
|
-
splitLine: {
|
|
941
|
-
lineStyle: {
|
|
942
|
-
color: splitLineColor
|
|
943
|
-
}
|
|
944
|
-
},
|
|
945
|
-
axisLabel: {
|
|
946
|
-
color: axisLabelColor,
|
|
947
|
-
fontFamily: "InterVariable"
|
|
948
|
-
}
|
|
949
|
-
};
|
|
950
|
-
return {
|
|
951
|
-
axisLineColor,
|
|
952
|
-
splitLineColor,
|
|
953
|
-
axisLabelColor,
|
|
954
|
-
categoricalColors,
|
|
955
|
-
echartsAxisConfig
|
|
956
|
-
};
|
|
957
|
-
};
|
|
958
|
-
var __webpack_exports__useApp = __WEBPACK_EXTERNAL_MODULE_antd_es_app_useApp_90d95086__["default"];
|
|
959
|
-
var __webpack_exports__useForm = __WEBPACK_EXTERNAL_MODULE_antd_es_form_Form_38f624ac__.useForm;
|
|
960
|
-
var __webpack_exports__useWatch = __WEBPACK_EXTERNAL_MODULE_antd_es_form_Form_38f624ac__.useWatch;
|
|
961
|
-
export { useAnimationsFinished, useBreakpoint, useCharts, useControlledState, useEnhancedEffect, useEventCallback, useLatestRef, useMessage, useModal, useToken, __webpack_exports__useApp as useApp, __webpack_exports__useForm as useForm, __webpack_exports__useWatch as useWatch };
|