@bioturing/components 0.13.3 → 0.14.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/CodeBlock.js +277 -132
- package/dist/DSRoot.js +309 -149
- package/dist/DropdownMenu.js +6 -1
- package/dist/Modal.js +9 -6
- package/dist/PopupPanel.css +116 -0
- package/dist/PopupPanel.js +333 -0
- package/dist/ScrollArea.js +4 -1
- package/dist/Select.js +127 -11
- package/dist/Table.js +3 -2
- package/dist/ThemeProvider.js +273 -131
- package/dist/Toast.js +286 -138
- package/dist/Upload.js +43 -1
- package/dist/components/{src/components/DSRoot → DSRoot}/component.d.ts +1 -1
- package/dist/components/DSRoot/context.d.ts +7 -0
- package/dist/components/{src/components/DropdownMenu → DropdownMenu}/component.d.ts +6 -1
- package/dist/components/{src/components/Modal → Modal}/Modal.d.ts +16 -1
- package/dist/components/{src/components/Modal → Modal}/index.d.ts +1 -1
- package/dist/components/PopupPanel/component.d.ts +61 -0
- package/dist/components/PopupPanel/constants.d.ts +7 -0
- package/dist/components/{src/components/Select → Select}/component.d.ts +13 -1
- package/dist/components/{src/components/Table → Table}/component.d.ts +1 -1
- package/dist/components/VerticalCollapsiblePanel/index.d.ts +1 -0
- package/dist/components/{src/components/hooks → hooks}/base-ui.d.ts +2 -2
- package/dist/components/{src/components/hooks → hooks}/index.d.ts +1 -0
- package/dist/components/hooks/useCharts.d.ts +22 -0
- package/dist/components/{src/components/index.d.ts → index.d.ts} +1 -0
- package/dist/components/{src/components/utils → utils}/antdUtils.d.ts +5 -0
- package/dist/hooks.js +961 -0
- package/dist/index.css +116 -0
- package/dist/index.js +1194 -242
- package/dist/style.css +157 -7
- package/dist/tokens/and-theme/index.d.ts +1 -0
- package/dist/{components/src/tokens/index.d.ts → tokens/and-theme/tokens.d.ts} +2 -0
- package/dist/tokens/charts/index.d.ts +6 -0
- package/dist/tokens/charts/tokens.d.ts +455 -0
- package/dist/tokens/index.d.ts +2 -0
- package/dist/tokens/utils.d.ts +16 -0
- package/dist/utils.js +43 -1
- package/package.json +17 -6
- package/dist/assets/src/icons/custom/ANOVAAnalysis.d.ts +0 -7
- package/dist/assets/src/icons/custom/AUCell.d.ts +0 -7
- package/dist/assets/src/icons/custom/Alphabet.d.ts +0 -7
- package/dist/assets/src/icons/custom/BarChart.d.ts +0 -7
- package/dist/assets/src/icons/custom/BoxPlot.d.ts +0 -7
- package/dist/assets/src/icons/custom/BubbleHeatmap.d.ts +0 -7
- package/dist/assets/src/icons/custom/CDR3Spectratyping.d.ts +0 -7
- package/dist/assets/src/icons/custom/CancerPrediction.d.ts +0 -7
- package/dist/assets/src/icons/custom/Cell.d.ts +0 -7
- package/dist/assets/src/icons/custom/CellCellCommunication.d.ts +0 -7
- package/dist/assets/src/icons/custom/CellSearch.d.ts +0 -7
- package/dist/assets/src/icons/custom/CellTypeDeconvolution.d.ts +0 -7
- package/dist/assets/src/icons/custom/CellTypePrediction.d.ts +0 -7
- package/dist/assets/src/icons/custom/Cells.d.ts +0 -7
- package/dist/assets/src/icons/custom/Circos.d.ts +0 -7
- package/dist/assets/src/icons/custom/Clonotype.d.ts +0 -7
- package/dist/assets/src/icons/custom/CoexpressionPlot.d.ts +0 -7
- package/dist/assets/src/icons/custom/Composition.d.ts +0 -7
- package/dist/assets/src/icons/custom/DEG.d.ts +0 -7
- package/dist/assets/src/icons/custom/Digits.d.ts +0 -7
- package/dist/assets/src/icons/custom/DiversityAnalysis.d.ts +0 -7
- package/dist/assets/src/icons/custom/Embedding.d.ts +0 -7
- package/dist/assets/src/icons/custom/EnrichmentTest.d.ts +0 -7
- package/dist/assets/src/icons/custom/Eppendorf.d.ts +0 -7
- package/dist/assets/src/icons/custom/FileArrowRight.d.ts +0 -7
- package/dist/assets/src/icons/custom/FolderArrowRight.d.ts +0 -7
- package/dist/assets/src/icons/custom/Heatmap.d.ts +0 -7
- package/dist/assets/src/icons/custom/ImageSegmentation.d.ts +0 -7
- package/dist/assets/src/icons/custom/IntersectionPlot.d.ts +0 -7
- package/dist/assets/src/icons/custom/LouvainClustering.d.ts +0 -7
- package/dist/assets/src/icons/custom/MarkerGenes.d.ts +0 -7
- package/dist/assets/src/icons/custom/MixedView.d.ts +0 -7
- package/dist/assets/src/icons/custom/NeighborhoodAnalysis.d.ts +0 -7
- package/dist/assets/src/icons/custom/PenSize.d.ts +0 -7
- package/dist/assets/src/icons/custom/Pertubation.d.ts +0 -7
- package/dist/assets/src/icons/custom/Pseudotime.d.ts +0 -7
- package/dist/assets/src/icons/custom/RegionSegmentation.d.ts +0 -7
- package/dist/assets/src/icons/custom/ScatterPlotTissueImageView.d.ts +0 -7
- package/dist/assets/src/icons/custom/ScatterPlotView.d.ts +0 -7
- package/dist/assets/src/icons/custom/SegmentSelection.d.ts +0 -7
- package/dist/assets/src/icons/custom/SpatialCellProportion.d.ts +0 -7
- package/dist/assets/src/icons/custom/Species.d.ts +0 -7
- package/dist/assets/src/icons/custom/SubClustering.d.ts +0 -7
- package/dist/assets/src/icons/custom/TSNEUMAP.d.ts +0 -7
- package/dist/assets/src/icons/custom/TissueImageScatterPlotView.d.ts +0 -7
- package/dist/assets/src/icons/custom/TissueImageView.d.ts +0 -7
- package/dist/assets/src/icons/custom/TwoD.d.ts +0 -7
- package/dist/assets/src/icons/custom/VennDiagramAnalysis.d.ts +0 -7
- package/dist/assets/src/icons/custom/ViolinPlot.d.ts +0 -7
- package/dist/assets/src/icons/custom/index.d.ts +0 -49
- package/dist/assets/src/icons/index.d.ts +0 -2
- package/dist/assets/src/icons/phosphor.d.ts +0 -1
- package/dist/assets/src/index.d.ts +0 -2
- package/dist/assets/src/logos/BBrowserX.d.ts +0 -9
- package/dist/assets/src/logos/BioStudio.d.ts +0 -9
- package/dist/assets/src/logos/BioTuring.d.ts +0 -9
- package/dist/assets/src/logos/BioTuringAlpha.d.ts +0 -9
- package/dist/assets/src/logos/BioVinci.d.ts +0 -9
- package/dist/assets/src/logos/Lens.d.ts +0 -9
- package/dist/assets/src/logos/Pixel.d.ts +0 -9
- package/dist/assets/src/logos/SmartBulk.d.ts +0 -9
- package/dist/assets/src/logos/SpatialX.d.ts +0 -9
- package/dist/assets/src/logos/Talk2Data.d.ts +0 -9
- package/dist/assets/src/logos/Vinci.d.ts +0 -9
- package/dist/assets/src/logos/index.d.ts +0 -11
- package/dist/components/src/components/DropdownMenu/utils.d.ts +0 -5
- package/dist/components/{src/components/Badge → Badge}/component.d.ts +0 -0
- package/dist/components/{src/components/Badge → Badge}/index.d.ts +0 -0
- package/dist/components/{src/components/Breadcrumb → Breadcrumb}/component.d.ts +0 -0
- package/dist/components/{src/components/Breadcrumb → Breadcrumb}/index.d.ts +0 -0
- package/dist/components/{src/components/Breadcrumb → Breadcrumb}/types.d.ts +0 -0
- package/dist/components/{src/components/Breadcrumb → Breadcrumb}/useItemRender.d.ts +0 -0
- package/dist/components/{src/components/Button → Button}/component.d.ts +0 -0
- package/dist/components/{src/components/Button → Button}/index.d.ts +0 -0
- package/dist/components/{src/components/Checkbox → Checkbox}/component.d.ts +0 -0
- package/dist/components/{src/components/Checkbox → Checkbox}/index.d.ts +0 -0
- package/dist/components/{src/components/CodeBlock → CodeBlock}/component.d.ts +0 -0
- package/dist/components/{src/components/CodeBlock → CodeBlock}/index.d.ts +0 -0
- package/dist/components/{src/components/CodeBlock → CodeBlock}/types.d.ts +0 -0
- package/dist/components/{src/components/Collapse → Collapse}/component.d.ts +0 -0
- package/dist/components/{src/components/Collapse → Collapse}/index.d.ts +0 -0
- package/dist/components/{src/components/DSRoot → DSRoot}/index.d.ts +0 -0
- package/dist/components/{src/components/DropdownMenu → DropdownMenu}/index.d.ts +0 -0
- package/dist/components/{src/components/Empty → Empty}/component.d.ts +0 -0
- package/dist/components/{src/components/Empty → Empty}/index.d.ts +0 -0
- package/dist/components/{src/components/Field → Field}/component.d.ts +0 -0
- package/dist/components/{src/components/Field → Field}/index.d.ts +0 -0
- package/dist/components/{src/components/Form → Form}/component.d.ts +0 -0
- package/dist/components/{src/components/Form → Form}/index.d.ts +0 -0
- package/dist/components/{src/components/Form → Form}/item.d.ts +0 -0
- package/dist/components/{src/components/IconButton → IconButton}/component.d.ts +0 -0
- package/dist/components/{src/components/IconButton → IconButton}/index.d.ts +0 -0
- package/dist/components/{src/components/Input → Input}/component.d.ts +0 -0
- package/dist/components/{src/components/Input → Input}/index.d.ts +0 -0
- package/dist/components/{src/components/Modal → Modal}/ModalProvider.d.ts +0 -0
- package/dist/components/{src/components/Modal → Modal}/ModalService.d.ts +0 -0
- package/dist/components/{src/components/Modal → Modal}/constants.d.ts +0 -0
- package/dist/components/{src/components/Modal → Modal}/functions.d.ts +0 -0
- package/dist/components/{src/components/Popover → Popover}/component.d.ts +0 -0
- package/dist/components/{src/components/Popover → Popover}/index.d.ts +0 -0
- package/dist/components/{src/components/ScrollArea → PopupPanel}/index.d.ts +0 -0
- package/dist/components/{src/components/Radio → Radio}/component.d.ts +0 -0
- package/dist/components/{src/components/Radio → Radio}/index.d.ts +0 -0
- package/dist/components/{src/components/Radio → Radio}/interface.d.ts +0 -0
- package/dist/components/{src/components/ScrollArea → ScrollArea}/component.d.ts +0 -0
- package/dist/components/{src/components/Segmented → ScrollArea}/index.d.ts +0 -0
- package/dist/components/{src/components/Segmented → Segmented}/component.d.ts +0 -0
- package/dist/components/{src/components/Select → Segmented}/index.d.ts +0 -0
- package/dist/components/{src/components/Slider → Select}/index.d.ts +0 -0
- package/dist/components/{src/components/Slider → Slider}/component.d.ts +0 -0
- package/dist/components/{src/components/Spin → Slider}/index.d.ts +0 -0
- package/dist/components/{src/components/Spin → Spin}/component.d.ts +0 -0
- package/dist/components/{src/components/Splitter → Spin}/index.d.ts +0 -0
- package/dist/components/{src/components/Splitter → Splitter}/component.d.ts +0 -0
- package/dist/components/{src/components/Switch → Splitter}/index.d.ts +0 -0
- package/dist/components/{src/components/Switch → Switch}/component.d.ts +0 -0
- package/dist/components/{src/components/Table → Switch}/index.d.ts +0 -0
- package/dist/components/{src/components/Tag → Table}/index.d.ts +0 -0
- package/dist/components/{src/components/Tag → Tag}/component.d.ts +0 -0
- package/dist/components/{src/components/ThemeProvider → Tag}/index.d.ts +0 -0
- package/dist/components/{src/components/ThemeProvider → ThemeProvider}/component.d.ts +0 -0
- package/dist/components/{src/components/Tooltip → ThemeProvider}/index.d.ts +0 -0
- package/dist/components/{src/components/Toast → Toast}/component.d.ts +0 -0
- package/dist/components/{src/components/Toast → Toast}/function.d.ts +0 -0
- package/dist/components/{src/components/Toast → Toast}/index.d.ts +0 -0
- package/dist/components/{src/components/Toast → Toast}/types.d.ts +0 -0
- package/dist/components/{src/components/Tooltip → Tooltip}/component.d.ts +0 -0
- package/dist/components/{src/components/Tour → Tooltip}/index.d.ts +0 -0
- package/dist/components/{src/components/Tour → Tour}/component.d.ts +0 -0
- package/dist/components/{src/components/Transition → Tour}/index.d.ts +0 -0
- package/dist/components/{src/components/Transition → Transition}/component.d.ts +0 -0
- package/dist/components/{src/components/Truncate → Transition}/index.d.ts +0 -0
- package/dist/components/{src/components/Tree → Tree}/components.d.ts +0 -0
- package/dist/components/{src/components/Tree → Tree}/helpers.d.ts +0 -0
- package/dist/components/{src/components/Tree → Tree}/index.d.ts +0 -0
- package/dist/components/{src/components/Tree → Tree}/types.d.ts +0 -0
- package/dist/components/{src/components/Tree → Tree}/useTreeCommon.d.ts +44 -44
- /package/dist/components/{src/components/Tree → Tree}/useUniqueKeysTree.d.ts +0 -0
- /package/dist/components/{src/components/Truncate → Truncate}/component.d.ts +0 -0
- /package/dist/components/{src/components/Truncate → Truncate}/helpers.d.ts +0 -0
- /package/dist/components/{src/components/VerticalCollapsiblePanel → Truncate}/index.d.ts +0 -0
- /package/dist/components/{src/components/Upload → Upload}/component.d.ts +0 -0
- /package/dist/components/{src/components/Upload → Upload}/dragger.d.ts +0 -0
- /package/dist/components/{src/components/Upload → Upload}/hooks.d.ts +0 -0
- /package/dist/components/{src/components/Upload → Upload}/index.d.ts +0 -0
- /package/dist/components/{src/components/Upload → Upload}/item.d.ts +0 -0
- /package/dist/components/{src/components/Upload → Upload}/utils.d.ts +0 -0
- /package/dist/components/{src/components/VerticalCollapsiblePanel → VerticalCollapsiblePanel}/component.d.ts +0 -0
- /package/dist/components/{src/components/hooks → hooks}/antd.d.ts +0 -0
- /package/dist/components/{src/components/hooks → hooks}/useControlledState.d.ts +0 -0
- /package/dist/components/{src/components/utils → utils}/WithAntdTokens.d.ts +0 -0
- /package/dist/components/{src/components/utils → utils}/client.d.ts +0 -0
- /package/dist/components/{src/components/utils → utils}/cn.d.ts +0 -0
- /package/dist/components/{src/components/utils → utils}/index.d.ts +0 -0
- /package/dist/components/{src/components/utils → utils}/isTracebackError.d.ts +0 -0
- /package/dist/components/{src/components/utils → utils}/main.d.ts +0 -0
- /package/dist/components/{src/components/utils → utils}/reactToString.d.ts +0 -0
- /package/dist/components/{src/components/utils → utils}/types.d.ts +0 -0
- /package/dist/{components/src/index.d.ts → index.d.ts} +0 -0
package/dist/hooks.js
ADDED
|
@@ -0,0 +1,961 @@
|
|
|
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 };
|