@kep-platform/basic-component 0.0.12 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Table/Table.d.ts +4 -1
- package/dist/Table/Table.js +29 -13
- package/dist/Tree/BOMTree.js +24 -21
- package/dist/Tree/MainProperties.d.ts +2 -2
- package/dist/Tree/MainProperties.js +9 -5
- package/dist/Tree/Tree.js +33 -118
- package/dist/Tree/TreeNode.d.ts +3 -2
- package/dist/Tree/TreeNode.js +107 -28
- package/dist/__styles/GlobalStyles.js +1 -1
- package/package.json +3 -3
package/dist/Table/Table.d.ts
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
import React, { ReactNode } from 'react';
|
2
2
|
type SorterDesc = Record<string, Sorter>;
|
3
3
|
type FilterDesc = Record<string, string>;
|
4
|
+
export type Scroll = {
|
5
|
+
y: number;
|
6
|
+
};
|
4
7
|
export type TableProps = {
|
5
8
|
dataSource: Record<string, any>[];
|
6
9
|
columns: ColumnType[];
|
7
10
|
rowKey: string;
|
8
11
|
actions?: ReactNode[];
|
9
12
|
title?: ReactNode;
|
10
|
-
scroll?:
|
13
|
+
scroll?: Scroll;
|
11
14
|
onChange?: (pagination?: Pagination, sorter?: SorterDesc, fitler?: FilterDesc) => void;
|
12
15
|
headerRender?: (column: ColumnType) => ReactNode;
|
13
16
|
groupBy?: string;
|
package/dist/Table/Table.js
CHANGED
@@ -15,7 +15,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
15
|
import CaretDownOutlined from '@ant-design/icons/CaretDownOutlined';
|
16
16
|
import CaretUpOutlined from '@ant-design/icons/CaretUpOutlined';
|
17
17
|
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
18
|
-
import styled from 'styled-components';
|
18
|
+
import styled, { css } from 'styled-components';
|
19
19
|
import { BoxShadowBox } from "../BoxShadowBox";
|
20
20
|
import { Column, Columns } from "../Columns";
|
21
21
|
import { DefaultColumnWidth } from "../Columns/Columns";
|
@@ -38,7 +38,7 @@ var TableToolbar = styled.div.withConfig({
|
|
38
38
|
var TableHeaderRow = styled(Columns).withConfig({
|
39
39
|
displayName: "TableHeaderRow",
|
40
40
|
componentId: "basic-component-347b__sc-12r61fm-3"
|
41
|
-
})(["border-bottom:var(--kep-platform-line-width) solid var(--kep-platform-color-table-border);& ", "{background-color:var(--kep-platform-header-bg);font-weight:600;position:sticky;&:not(:last-child):after{content:'';width:1px;height:calc(100% - 2 * var(--kep-platform-padding-xs));position:absolute;top:var(--kep-platform-padding-xs);right:0;background-color:var(--kep-platform-color-border-secondary);}}"], Column);
|
41
|
+
})(["border-bottom:var(--kep-platform-line-width) solid var(--kep-platform-color-table-border);position:sticky;top:0;left:0;z-index:calc(var(--kep-platform-z-index-fixed) + 5);& ", "{background-color:var(--kep-platform-header-bg);font-weight:600;position:sticky;&:not(:last-child):after{content:'';width:1px;height:calc(100% - 2 * var(--kep-platform-padding-xs));position:absolute;top:var(--kep-platform-padding-xs);right:0;background-color:var(--kep-platform-color-border-secondary);}}"], Column);
|
42
42
|
var TableBody = styled(List).withConfig({
|
43
43
|
displayName: "TableBody",
|
44
44
|
componentId: "basic-component-347b__sc-12r61fm-4"
|
@@ -50,7 +50,12 @@ var TableBodyRow = styled(ListItem).withConfig({
|
|
50
50
|
var TableContent = styled.div.withConfig({
|
51
51
|
displayName: "TableContent",
|
52
52
|
componentId: "basic-component-347b__sc-12r61fm-6"
|
53
|
-
})(["position:relative;overflow:auto;border-radius:var(--kep-platform-border-radius);box-shadow:var(--kep-platform-box-shadow-tertiary);"])
|
53
|
+
})(["position:relative;overflow:auto;border-radius:var(--kep-platform-border-radius);box-shadow:var(--kep-platform-box-shadow-tertiary);", ""], function (props) {
|
54
|
+
var _props$scroll;
|
55
|
+
if ((_props$scroll = props.scroll) !== null && _props$scroll !== void 0 && _props$scroll.y) {
|
56
|
+
return css(["height:", "px;"], props.scroll.y);
|
57
|
+
}
|
58
|
+
});
|
54
59
|
var SortIconList = styled(List).withConfig({
|
55
60
|
displayName: "SortIconList",
|
56
61
|
componentId: "basic-component-347b__sc-12r61fm-7"
|
@@ -132,11 +137,7 @@ export default function Table(_ref3) {
|
|
132
137
|
scroll = _ref3.scroll,
|
133
138
|
_onChange2 = _ref3.onChange,
|
134
139
|
headerRender = _ref3.headerRender,
|
135
|
-
|
136
|
-
pagination = _ref3$pagination === void 0 ? {
|
137
|
-
current: 1,
|
138
|
-
pageSize: 10
|
139
|
-
} : _ref3$pagination;
|
140
|
+
pagination = _ref3.pagination;
|
140
141
|
var _useState = useState(null),
|
141
142
|
_useState2 = _slicedToArray(_useState, 2),
|
142
143
|
sorterController = _useState2[0],
|
@@ -177,15 +178,28 @@ export default function Table(_ref3) {
|
|
177
178
|
}, 0);
|
178
179
|
}, [columns]);
|
179
180
|
var formatedDataSource = useMemo(function () {
|
181
|
+
var formatedDataSource;
|
182
|
+
/* 分页过滤 */
|
183
|
+
if (pagination && dataSource.length > (pagination.pageSize || 10)) {
|
184
|
+
var startIndex = ((pagination.current || 1) - 1) * (pagination.pageSize || 10);
|
185
|
+
var endIndex = startIndex + (pagination.pageSize || 10) - 1;
|
186
|
+
formatedDataSource = dataSource.filter(function (_, index) {
|
187
|
+
return index >= startIndex && index <= endIndex;
|
188
|
+
});
|
189
|
+
} else {
|
190
|
+
formatedDataSource = dataSource;
|
191
|
+
}
|
192
|
+
/* 排序 */
|
180
193
|
if (sorterController && sorterController.sorterType !== undefined) {
|
181
194
|
var sortedColumn = columns.find(function (column) {
|
182
195
|
return column.key === sorterController.columnKey;
|
183
196
|
});
|
184
197
|
var sorterFunc = typeof (sortedColumn === null || sortedColumn === void 0 ? void 0 : sortedColumn.sorter) === 'function' ? sortedColumn.sorter : undefined;
|
185
|
-
|
198
|
+
formatedDataSource = sortObjectsByProperty(formatedDataSource, sorterController.columnKey, sorterController.sorterType, sorterFunc);
|
186
199
|
}
|
187
|
-
|
188
|
-
|
200
|
+
/* 条件过滤 */
|
201
|
+
return formatedDataSource;
|
202
|
+
}, [sorterController, dataSource, columns, pagination]);
|
189
203
|
return /*#__PURE__*/React.createElement(TableContainer, null, /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
190
204
|
span: 8
|
191
205
|
}, /*#__PURE__*/React.createElement(TableTitle, null, title)), /*#__PURE__*/React.createElement(Col, {
|
@@ -209,8 +223,10 @@ export default function Table(_ref3) {
|
|
209
223
|
boxShadowBox.current.style.opacity = '1';
|
210
224
|
}
|
211
225
|
boxShadowBox.current.style.left = tableContainer.scrollLeft + scrollLeftOffset + 'px';
|
226
|
+
boxShadowBox.current.style.top = tableContainer.scrollTop + 'px';
|
212
227
|
}
|
213
|
-
}
|
228
|
+
},
|
229
|
+
scroll: scroll
|
214
230
|
}, scroll && /*#__PURE__*/React.createElement(BoxShadowBox, {
|
215
231
|
ref: boxShadowBox,
|
216
232
|
width: "10px",
|
@@ -231,7 +247,7 @@ export default function Table(_ref3) {
|
|
231
247
|
columns: columns,
|
232
248
|
isFlex: !scroll
|
233
249
|
}));
|
234
|
-
}))), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Pagination, _extends({}, pagination, {
|
250
|
+
}))), /*#__PURE__*/React.createElement("br", null), pagination && /*#__PURE__*/React.createElement(Pagination, _extends({}, pagination, {
|
235
251
|
total: pagination.total || dataSource.length,
|
236
252
|
justifyContent: "right",
|
237
253
|
onChange: function onChange(current, pageSize) {
|
package/dist/Tree/BOMTree.js
CHANGED
@@ -4,9 +4,10 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
7
|
-
import { GlobalStyles
|
7
|
+
import { GlobalStyles } from "./..";
|
8
8
|
import React, { useState } from 'react';
|
9
9
|
import styled from 'styled-components';
|
10
|
+
import Tree from "./Tree";
|
10
11
|
var Title = styled.div.withConfig({
|
11
12
|
displayName: "Title",
|
12
13
|
componentId: "basic-component-347b__sc-klaw2r-0"
|
@@ -24,6 +25,7 @@ export default (function () {
|
|
24
25
|
key: '1',
|
25
26
|
title: 'jss',
|
26
27
|
count: 1,
|
28
|
+
groupBy: 'count',
|
27
29
|
children: [{
|
28
30
|
key: '4',
|
29
31
|
title: 'skjdfkljasklfjkljdsklajfkl就是要长一的点点滴滴的点点滴滴哒哒哒哒哒哒哒哒哒哒哒哒哒哒',
|
@@ -41,24 +43,25 @@ export default (function () {
|
|
41
43
|
key: '2121212121212',
|
42
44
|
title: '2',
|
43
45
|
count: 1,
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
46
|
+
groupBy: 'count',
|
47
|
+
children: [{
|
48
|
+
key: '3',
|
49
|
+
title: 'jss',
|
50
|
+
name: 'jss',
|
51
|
+
children: [],
|
52
|
+
count: 2
|
53
|
+
}, {
|
54
|
+
key: '10',
|
55
|
+
title: 'jss',
|
56
|
+
name: 'jss',
|
57
|
+
children: [],
|
58
|
+
count: 2
|
59
|
+
}, {
|
60
|
+
key: '20',
|
61
|
+
title: '3',
|
62
|
+
children: [],
|
63
|
+
count: 2
|
64
|
+
}]
|
62
65
|
}];
|
63
66
|
var columns = [{
|
64
67
|
key: 'key',
|
@@ -94,6 +97,7 @@ export default (function () {
|
|
94
97
|
$css: []
|
95
98
|
}), /*#__PURE__*/React.createElement(Tree, {
|
96
99
|
title: /*#__PURE__*/React.createElement(Title, null, "\u6807\u8BC6"),
|
100
|
+
multiple: true,
|
97
101
|
titleWidth: 400,
|
98
102
|
contextMenuRender: contextMenuRender,
|
99
103
|
treeData: treeData,
|
@@ -105,7 +109,6 @@ export default (function () {
|
|
105
109
|
},
|
106
110
|
onExpand: function onExpand(expandedKeys) {
|
107
111
|
return setExpandedKeys(expandedKeys);
|
108
|
-
}
|
109
|
-
groupBy: "count"
|
112
|
+
}
|
110
113
|
}));
|
111
114
|
});
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { ReactNode } from 'react';
|
2
|
-
export declare const MainArea: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("../Flex").FlexItemProps
|
2
|
+
export declare const MainArea: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HtmlHTMLAttributes<HTMLDivElement> | keyof import("../Flex").FlexItemProps> & import("../Flex").FlexItemProps & React.HtmlHTMLAttributes<HTMLDivElement>, "ref"> & {
|
3
3
|
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
4
4
|
}, never>> & string;
|
5
5
|
type MainPropertyProps = {
|
@@ -8,5 +8,5 @@ type MainPropertyProps = {
|
|
8
8
|
property?: ReactNode;
|
9
9
|
isFlex: boolean;
|
10
10
|
};
|
11
|
-
export declare const MainProperty: React.
|
11
|
+
export declare const MainProperty: React.ForwardRefExoticComponent<MainPropertyProps & React.RefAttributes<HTMLDivElement>>;
|
12
12
|
export {};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { forwardRef } from 'react';
|
2
2
|
import styled from 'styled-components';
|
3
3
|
import { Flex, FlexItem } from "../Flex";
|
4
4
|
export var MainArea = styled(FlexItem).withConfig({
|
@@ -10,14 +10,18 @@ var PropertiesArea = styled(FlexItem).withConfig({
|
|
10
10
|
componentId: "basic-component-347b__sc-u1pspr-1"
|
11
11
|
})([""]);
|
12
12
|
/* 有属性就渲染属性,没有属性就不处理 */
|
13
|
-
export var MainProperty = function
|
13
|
+
export var MainProperty = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
14
14
|
var mainWidth = _ref.mainWidth,
|
15
15
|
main = _ref.main,
|
16
16
|
property = _ref.property,
|
17
17
|
isFlex = _ref.isFlex;
|
18
|
-
if (property) return /*#__PURE__*/React.createElement(Flex,
|
18
|
+
if (property) return /*#__PURE__*/React.createElement(Flex, {
|
19
|
+
ref: ref
|
20
|
+
}, /*#__PURE__*/React.createElement(MainArea, {
|
19
21
|
width: mainWidth
|
20
22
|
}, main), /*#__PURE__*/React.createElement(PropertiesArea, {
|
21
23
|
flex: isFlex ? 1 : undefined
|
22
|
-
}, property));else return main
|
23
|
-
|
24
|
+
}, property));else return /*#__PURE__*/React.cloneElement(main, {
|
25
|
+
ref: ref
|
26
|
+
});
|
27
|
+
});
|
package/dist/Tree/Tree.js
CHANGED
@@ -1,17 +1,15 @@
|
|
1
|
-
function
|
2
|
-
function
|
3
|
-
function
|
4
|
-
function
|
5
|
-
|
6
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
7
|
-
import React, { useMemo, useRef, useState } from 'react';
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
4
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
5
|
+
import React, { useMemo, useRef } from 'react';
|
8
6
|
import styled, { css } from 'styled-components';
|
9
7
|
import { BoxShadowBox } from "../BoxShadowBox";
|
10
8
|
import { Column, Columns } from "../Columns";
|
11
9
|
import { DefaultColumnWidth } from "../Columns/Columns";
|
12
10
|
import { List } from "../List";
|
13
|
-
import { MainArea } from "./MainProperties";
|
14
|
-
import {
|
11
|
+
import { MainArea, MainProperty } from "./MainProperties";
|
12
|
+
import { TreeNodeController, nodeTypeMap } from "./TreeNode";
|
15
13
|
var TreeContainer = styled.div.withConfig({
|
16
14
|
displayName: "TreeContainer",
|
17
15
|
componentId: "basic-component-347b__sc-n4lkq9-0"
|
@@ -33,35 +31,7 @@ var TreeHeader = styled.div.withConfig({
|
|
33
31
|
return css(["width:", "px;"], props.width);
|
34
32
|
}
|
35
33
|
}, Column, MainArea);
|
36
|
-
var rootLevel =
|
37
|
-
var TreeGroupNode = styled.div.withConfig({
|
38
|
-
displayName: "TreeGroupNode",
|
39
|
-
componentId: "basic-component-347b__sc-n4lkq9-3"
|
40
|
-
})(["height:40px;line-height:40px;padding:0 16px;color:var(--kep-platform-color-primary);cursor:pointer;border:1px dotted var(--kep-platform-color-primary);"]);
|
41
|
-
var TreeNodeGroup = function TreeNodeGroup(props) {
|
42
|
-
var _useState = useState(false),
|
43
|
-
_useState2 = _slicedToArray(_useState, 2),
|
44
|
-
expanded = _useState2[0],
|
45
|
-
setExpanded = _useState2[1];
|
46
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TreeGroupNode, {
|
47
|
-
onClick: function onClick() {
|
48
|
-
return setExpanded(!expanded);
|
49
|
-
}
|
50
|
-
}, props.groupName, "\uFF1A", props.groupValue), expanded && props.children);
|
51
|
-
};
|
52
|
-
function groupTreeNodeByPropertyName(arr, propertyName, fieldNames) {
|
53
|
-
var grouped = arr.reduce(function (acc, obj) {
|
54
|
-
var key = obj[propertyName] || obj[fieldNames.key];
|
55
|
-
if (key) {
|
56
|
-
if (!acc[key]) {
|
57
|
-
acc[key] = [];
|
58
|
-
}
|
59
|
-
acc[key].push(obj);
|
60
|
-
} else {}
|
61
|
-
return acc;
|
62
|
-
}, {});
|
63
|
-
return grouped;
|
64
|
-
}
|
34
|
+
var rootLevel = -1;
|
65
35
|
var Tree = function Tree(_ref) {
|
66
36
|
var treeData = _ref.treeData,
|
67
37
|
_ref$columns = _ref.columns,
|
@@ -90,15 +60,17 @@ var Tree = function Tree(_ref) {
|
|
90
60
|
_ref$multiple = _ref.multiple,
|
91
61
|
multiple = _ref$multiple === void 0 ? false : _ref$multiple,
|
92
62
|
_ref$bordered = _ref.bordered,
|
93
|
-
bordered = _ref$bordered === void 0 ? false : _ref$bordered
|
94
|
-
|
95
|
-
|
63
|
+
bordered = _ref$bordered === void 0 ? false : _ref$bordered;
|
64
|
+
var rootNode = useMemo(function () {
|
65
|
+
return _defineProperty(_defineProperty(_defineProperty({}, fieldNames.key, 'root'), "nodeType", nodeTypeMap.virtual), "children", treeData);
|
66
|
+
}, [treeData]);
|
67
|
+
|
96
68
|
/* 复用Columns组件显示行,构造一个类似表格头数据来适应Columns组件的数据结构 */
|
97
69
|
var treeHeaderRowData = useMemo(function () {
|
98
70
|
var data = {};
|
99
|
-
if (columns) columns.forEach(function (
|
100
|
-
var title =
|
101
|
-
dataIndex =
|
71
|
+
if (columns) columns.forEach(function (_ref3) {
|
72
|
+
var title = _ref3.title,
|
73
|
+
dataIndex = _ref3.dataIndex;
|
102
74
|
data[dataIndex] = title;
|
103
75
|
});
|
104
76
|
return data;
|
@@ -143,15 +115,6 @@ var Tree = function Tree(_ref) {
|
|
143
115
|
}
|
144
116
|
return newColumns;
|
145
117
|
}, [columns, fieldNames]);
|
146
|
-
var treeNodeGroup = useMemo(function () {
|
147
|
-
if (groupBy) return groupTreeNodeByPropertyName(treeData, groupBy, fieldNames);
|
148
|
-
}, [treeData, groupBy]);
|
149
|
-
var groupByTitle = useMemo(function () {
|
150
|
-
var _columns$find;
|
151
|
-
return (_columns$find = columns.find(function (column) {
|
152
|
-
return column.dataIndex === groupBy;
|
153
|
-
})) === null || _columns$find === void 0 ? void 0 : _columns$find.title;
|
154
|
-
}, [columns, groupBy]);
|
155
118
|
var boxShadowBox = useRef(null);
|
156
119
|
/* 树组件的结构其实比较简单,就是一个树标题(TableMode下),然后树节点形成的列表 */
|
157
120
|
return /*#__PURE__*/React.createElement(TreeContainer, {
|
@@ -187,71 +150,23 @@ var Tree = function Tree(_ref) {
|
|
187
150
|
isFlex: isFlex
|
188
151
|
})), /*#__PURE__*/React.createElement(TreeBody, {
|
189
152
|
direction: "column"
|
190
|
-
},
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
titleRender: titleRender
|
208
|
-
});
|
209
|
-
}), treeNodeGroup && groupBy && Object.keys(treeNodeGroup).map(function (key) {
|
210
|
-
var group = treeNodeGroup[key];
|
211
|
-
if (group.length < 2) {
|
212
|
-
return /*#__PURE__*/React.createElement(TreeNodeController, {
|
213
|
-
key: group[0][fieldNames.key],
|
214
|
-
selectedKeys: selectedKeys,
|
215
|
-
onSelect: onSelect,
|
216
|
-
expandedKeys: expandedKeys,
|
217
|
-
onExpand: onExpand,
|
218
|
-
width: isTableMode && !isFlex ? rowWidth : undefined,
|
219
|
-
node: group[0],
|
220
|
-
fieldNames: fieldNames,
|
221
|
-
isFlex: isFlex,
|
222
|
-
isTableMode: !!isTableMode,
|
223
|
-
columns: columns,
|
224
|
-
multiple: multiple,
|
225
|
-
level: rootLevel,
|
226
|
-
mainWidth: titleWidth,
|
227
|
-
contextMenuRender: contextMenuRender,
|
228
|
-
titleRender: titleRender
|
229
|
-
});
|
230
|
-
}
|
231
|
-
return /*#__PURE__*/React.createElement(TreeNodeGroup, {
|
232
|
-
groupName: groupByTitle,
|
233
|
-
key: key,
|
234
|
-
groupValue: key
|
235
|
-
}, treeNodeGroup[key].map(function (node) {
|
236
|
-
return /*#__PURE__*/React.createElement(TreeNodeController, {
|
237
|
-
key: node[fieldNames.key],
|
238
|
-
selectedKeys: selectedKeys,
|
239
|
-
onSelect: onSelect,
|
240
|
-
expandedKeys: expandedKeys,
|
241
|
-
onExpand: onExpand,
|
242
|
-
width: isTableMode && !isFlex ? rowWidth : undefined,
|
243
|
-
node: node,
|
244
|
-
fieldNames: fieldNames,
|
245
|
-
isFlex: isFlex,
|
246
|
-
isTableMode: !!isTableMode,
|
247
|
-
columns: columns,
|
248
|
-
multiple: multiple,
|
249
|
-
level: rootLevel + 1,
|
250
|
-
mainWidth: titleWidth,
|
251
|
-
contextMenuRender: contextMenuRender,
|
252
|
-
titleRender: titleRender
|
253
|
-
});
|
254
|
-
}));
|
153
|
+
}, /*#__PURE__*/React.createElement(TreeNodeController, {
|
154
|
+
key: rootNode[fieldNames.key],
|
155
|
+
selectedKeys: selectedKeys,
|
156
|
+
onSelect: onSelect,
|
157
|
+
expandedKeys: expandedKeys,
|
158
|
+
onExpand: onExpand,
|
159
|
+
width: isTableMode && !isFlex ? rowWidth : undefined,
|
160
|
+
node: rootNode,
|
161
|
+
fieldNames: fieldNames,
|
162
|
+
isFlex: isFlex,
|
163
|
+
isTableMode: isTableMode,
|
164
|
+
columns: columns,
|
165
|
+
multiple: multiple,
|
166
|
+
level: rootLevel,
|
167
|
+
mainWidth: titleWidth,
|
168
|
+
contextMenuRender: contextMenuRender,
|
169
|
+
titleRender: titleRender
|
255
170
|
})));
|
256
171
|
};
|
257
172
|
export default Tree;
|
package/dist/Tree/TreeNode.d.ts
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import React, { Key, ReactNode } from 'react';
|
2
|
-
import { MainProperty } from './MainProperties';
|
3
2
|
export type TreeNodeControllerProps = {
|
4
3
|
node: TreeNodeType;
|
5
4
|
selectedKeys: Key[];
|
@@ -17,5 +16,7 @@ export type TreeNodeControllerProps = {
|
|
17
16
|
contextMenuRender?: (node: TreeNodeType) => MenuItem[];
|
18
17
|
titleRender?: ((node: TreeNodeType) => ReactNode | null) | null | undefined;
|
19
18
|
};
|
19
|
+
export declare const nodeTypeMap: {
|
20
|
+
virtual: string;
|
21
|
+
};
|
20
22
|
export declare const TreeNodeController: React.FC<TreeNodeControllerProps>;
|
21
|
-
export { MainProperty };
|
package/dist/Tree/TreeNode.js
CHANGED
@@ -1,5 +1,11 @@
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
1
7
|
import { CaretRightOutlined } from '@ant-design/icons';
|
2
|
-
import React, { useCallback, useMemo } from 'react';
|
8
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
3
9
|
import styled, { css } from 'styled-components';
|
4
10
|
import { Column, Columns } from "../Columns";
|
5
11
|
import { Flex, FlexItem } from "../Flex";
|
@@ -27,6 +33,62 @@ var TreeNode = styled(ListItem).withConfig({
|
|
27
33
|
return css(["background-color:var(--kep-platform-color-bg-active) !important;color:var(--kep-platform-color-text-active) !important;& ", ",& ", "{background-color:var(--kep-platform-color-bg-active) !important;color:var(--kep-platform-color-text-active) !important;}& ", "{overflow-x:auto;& > ", "{width:auto;}}"], Column, MainArea, MainArea, Flex);
|
28
34
|
}
|
29
35
|
});
|
36
|
+
var TreeNodeGroupNode = styled.li.withConfig({
|
37
|
+
displayName: "TreeNodeGroupNode",
|
38
|
+
componentId: "basic-component-347b__sc-tzoomn-2"
|
39
|
+
})(["height:40px;line-height:40px;background-color:var(--kep-platform-color-primary);color:var(--kep-platform-color-white);& span{color:var(--kep-platform-color-white) !important;}cursor:pointer;", ""], function (props) {
|
40
|
+
if (props.width) {
|
41
|
+
return css(["width:", "px;"], props.width);
|
42
|
+
}
|
43
|
+
});
|
44
|
+
var TreeNodeGroup = function TreeNodeGroup(props) {
|
45
|
+
var _useState = useState(false),
|
46
|
+
_useState2 = _slicedToArray(_useState, 2),
|
47
|
+
expanded = _useState2[0],
|
48
|
+
setExpanded = _useState2[1];
|
49
|
+
if (React.Children.toArray(props.children).length > 1) return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TreeNodeGroupNode, {
|
50
|
+
width: props.width,
|
51
|
+
onClick: function onClick() {
|
52
|
+
return setExpanded(!expanded);
|
53
|
+
}
|
54
|
+
}, /*#__PURE__*/React.createElement(Flex, {
|
55
|
+
width: props.mainWidth,
|
56
|
+
style: {
|
57
|
+
position: 'sticky',
|
58
|
+
left: 0
|
59
|
+
}
|
60
|
+
}, /*#__PURE__*/React.createElement(FlexItem, null, /*#__PURE__*/React.createElement(Indent, {
|
61
|
+
level: props.level
|
62
|
+
})), /*#__PURE__*/React.createElement(FlexItem, {
|
63
|
+
width: 24,
|
64
|
+
align: "center",
|
65
|
+
cursor: "pointer"
|
66
|
+
}, /*#__PURE__*/React.createElement(ExpandedIcon, {
|
67
|
+
expanded: expanded
|
68
|
+
})), /*#__PURE__*/React.createElement(FlexItem, {
|
69
|
+
flex: 1
|
70
|
+
}, props.groupName, " : ", props.groupValue))), expanded && React.Children.map(props.children, function (child) {
|
71
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
72
|
+
level: props.level + 1
|
73
|
+
});
|
74
|
+
}));else return props.children;
|
75
|
+
};
|
76
|
+
function groupTreeNodeByPropertyName(arr, propertyName, fieldNames) {
|
77
|
+
var grouped = arr.reduce(function (acc, obj) {
|
78
|
+
var key = obj[propertyName || fieldNames.key] || obj[fieldNames.key];
|
79
|
+
if (key) {
|
80
|
+
if (!acc[key]) {
|
81
|
+
acc[key] = [];
|
82
|
+
}
|
83
|
+
acc[key].push(obj);
|
84
|
+
} else {}
|
85
|
+
return acc;
|
86
|
+
}, {});
|
87
|
+
return grouped;
|
88
|
+
}
|
89
|
+
export var nodeTypeMap = {
|
90
|
+
virtual: 'virtual'
|
91
|
+
};
|
30
92
|
export var TreeNodeController = function TreeNodeController(_ref) {
|
31
93
|
var node = _ref.node,
|
32
94
|
_ref$selectedKeys = _ref.selectedKeys,
|
@@ -52,8 +114,17 @@ export var TreeNodeController = function TreeNodeController(_ref) {
|
|
52
114
|
return selectedKeys.includes(node[fieldNames.key]);
|
53
115
|
}, [selectedKeys, fieldNames, node]);
|
54
116
|
var expanded = useMemo(function () {
|
55
|
-
return expandedKeys.includes(node[fieldNames.key]);
|
117
|
+
return expandedKeys.includes(node[fieldNames.key]) || node.nodeType === nodeTypeMap.virtual;
|
56
118
|
}, [expandedKeys, fieldNames, node]);
|
119
|
+
var treeNodeGroup = useMemo(function () {
|
120
|
+
return groupTreeNodeByPropertyName(node.children || [], node.groupBy, fieldNames);
|
121
|
+
}, [node.children, node.groupBy]);
|
122
|
+
var groupTitle = useMemo(function () {
|
123
|
+
var _columns$find;
|
124
|
+
return (_columns$find = columns.find(function (column) {
|
125
|
+
return column.dataIndex === node.groupBy;
|
126
|
+
})) === null || _columns$find === void 0 ? void 0 : _columns$find.title;
|
127
|
+
}, [columns, node.groupBy]);
|
57
128
|
var onClickNodeHandler = useCallback(function (e) {
|
58
129
|
if (multiple) {
|
59
130
|
if (selected) {
|
@@ -96,11 +167,7 @@ export var TreeNodeController = function TreeNodeController(_ref) {
|
|
96
167
|
});
|
97
168
|
}
|
98
169
|
}, [expandedKeys, onExpand, expanded]);
|
99
|
-
var
|
100
|
-
selected: selectedKeys.includes(node[fieldNames.key]),
|
101
|
-
width: width,
|
102
|
-
onClick: onClickNodeHandler
|
103
|
-
}, /*#__PURE__*/React.createElement(MainProperty, {
|
170
|
+
var nodeEntity = /*#__PURE__*/React.createElement(MainProperty, {
|
104
171
|
isFlex: isFlex,
|
105
172
|
mainWidth: mainWidth,
|
106
173
|
main: /*#__PURE__*/React.createElement(Flex, null, /*#__PURE__*/React.createElement(FlexItem, null, /*#__PURE__*/React.createElement(Indent, {
|
@@ -121,29 +188,41 @@ export var TreeNodeController = function TreeNodeController(_ref) {
|
|
121
188
|
rowData: node,
|
122
189
|
isFlex: isFlex
|
123
190
|
})
|
124
|
-
})
|
125
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
191
|
+
});
|
192
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, node.nodeType !== nodeTypeMap.virtual && /*#__PURE__*/React.createElement(TreeNode, {
|
193
|
+
selected: selectedKeys.includes(node[fieldNames.key]),
|
194
|
+
width: width,
|
195
|
+
onClick: onClickNodeHandler
|
196
|
+
}, contextMenuRender ? /*#__PURE__*/React.createElement(Menu.Popup, {
|
126
197
|
trigger: "contextmenu",
|
127
198
|
items: contextMenuRender(node)
|
128
|
-
},
|
129
|
-
return /*#__PURE__*/React.createElement(
|
199
|
+
}, nodeEntity) : nodeEntity), expanded && treeNodeGroup && Object.keys(treeNodeGroup).map(function (groupKey) {
|
200
|
+
return /*#__PURE__*/React.createElement(TreeNodeGroup, {
|
130
201
|
width: width,
|
131
|
-
selectedKeys: selectedKeys,
|
132
|
-
key: childNode[fieldNames.key],
|
133
|
-
node: childNode,
|
134
|
-
fieldNames: fieldNames,
|
135
|
-
isFlex: isFlex,
|
136
|
-
isTableMode: isTableMode,
|
137
|
-
columns: columns,
|
138
|
-
onSelect: onSelect,
|
139
|
-
multiple: multiple,
|
140
|
-
level: childLevel,
|
141
202
|
mainWidth: mainWidth,
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
})
|
203
|
+
key: groupKey,
|
204
|
+
groupValue: groupKey,
|
205
|
+
groupName: groupTitle,
|
206
|
+
level: childLevel
|
207
|
+
}, treeNodeGroup[groupKey].map(function (childNode) {
|
208
|
+
return /*#__PURE__*/React.createElement(TreeNodeController, {
|
209
|
+
width: width,
|
210
|
+
selectedKeys: selectedKeys,
|
211
|
+
key: childNode[fieldNames.key],
|
212
|
+
node: childNode,
|
213
|
+
fieldNames: fieldNames,
|
214
|
+
isFlex: isFlex,
|
215
|
+
isTableMode: isTableMode,
|
216
|
+
columns: columns,
|
217
|
+
onSelect: onSelect,
|
218
|
+
multiple: multiple,
|
219
|
+
level: childLevel,
|
220
|
+
mainWidth: mainWidth,
|
221
|
+
onExpand: onExpand,
|
222
|
+
expandedKeys: expandedKeys,
|
223
|
+
contextMenuRender: contextMenuRender,
|
224
|
+
titleRender: titleRender
|
225
|
+
});
|
226
|
+
}));
|
147
227
|
}));
|
148
|
-
};
|
149
|
-
export { MainProperty };
|
228
|
+
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// GlobalStyles.js
|
2
2
|
import { createGlobalStyle } from 'styled-components';
|
3
|
-
var GlobalStyles = createGlobalStyle([":root{--kep-platform-black:#000000;--kep-platform-blue:#1677ff;--kep-platform-purple:#722ED1;--kep-platform-cyan:#13C2C2;--kep-platform-green:#52C41A;--kep-platform-magenta:#EB2F96;--kep-platform-pink:#eb2f96;--kep-platform-red:#F5222D;--kep-platform-orange:#FA8C16;--kep-platform-yellow:#FADB14;--kep-platform-volcano:#FA541C;--kep-platform-geekblue:#2F54EB;--kep-platform-gold:#FAAD14;--kep-platform-lime:#A0D911;--kep-platform-color-primary:#1677ff;--kep-platform-color-success:#52c41a;--kep-platform-color-warning:#faad14;--kep-platform-color-error:#ff4d4f;--kep-platform-color-info:#1677ff;--kep-platform-color-link:#1677ff;--kep-platform-color-text-base:#000;--kep-platform-color-bg-base:#fff;--kep-platform-blue-1:#e6f4ff;--kep-platform-blue-2:#bae0ff;--kep-platform-blue-3:#91caff;--kep-platform-blue-4:#69b1ff;--kep-platform-blue-5:#4096ff;--kep-platform-blue-6:#1677ff;--kep-platform-blue-7:#0958d9;--kep-platform-blue-8:#003eb3;--kep-platform-blue-9:#002c8c;--kep-platform-blue-10:#001d66;--kep-platform-purple-1:#f9f0ff;--kep-platform-purple-2:#efdbff;--kep-platform-purple-3:#d3adf7;--kep-platform-purple-4:#b37feb;--kep-platform-purple-5:#9254de;--kep-platform-purple-6:#722ed1;--kep-platform-purple-7:#531dab;--kep-platform-purple-8:#391085;--kep-platform-purple-9:#22075e;--kep-platform-purple-10:#120338;--kep-platform-cyan-1:#e6fffb;--kep-platform-cyan-2:#b5f5ec;--kep-platform-cyan-3:#87e8de;--kep-platform-cyan-4:#5cdbd3;--kep-platform-cyan-5:#36cfc9;--kep-platform-cyan-6:#13c2c2;--kep-platform-cyan-7:#08979c;--kep-platform-cyan-8:#006d75;--kep-platform-cyan-9:#00474f;--kep-platform-cyan-10:#002329;--kep-platform-green-1:#f6ffed;--kep-platform-green-2:#d9f7be;--kep-platform-green-3:#b7eb8f;--kep-platform-green-4:#95de64;--kep-platform-green-5:#73d13d;--kep-platform-green-6:#52c41a;--kep-platform-green-7:#389e0d;--kep-platform-green-8:#237804;--kep-platform-green-9:#135200;--kep-platform-green-10:#092b00;--kep-platform-magenta-1:#fff0f6;--kep-platform-magenta-2:#ffd6e7;--kep-platform-magenta-3:#ffadd2;--kep-platform-magenta-4:#ff85c0;--kep-platform-magenta-5:#f759ab;--kep-platform-magenta-6:#eb2f96;--kep-platform-magenta-7:#c41d7f;--kep-platform-magenta-8:#9e1068;--kep-platform-magenta-9:#780650;--kep-platform-magenta-10:#520339;--kep-platform-pink-1:#fff0f6;--kep-platform-pink-2:#ffd6e7;--kep-platform-pink-3:#ffadd2;--kep-platform-pink-4:#ff85c0;--kep-platform-pink-5:#f759ab;--kep-platform-pink-6:#eb2f96;--kep-platform-pink-7:#c41d7f;--kep-platform-pink-8:#9e1068;--kep-platform-pink-9:#780650;--kep-platform-pink-10:#520339;--kep-platform-red-1:#fff1f0;--kep-platform-red-2:#ffccc7;--kep-platform-red-3:#ffa39e;--kep-platform-red-4:#ff7875;--kep-platform-red-5:#ff4d4f;--kep-platform-red-6:#f5222d;--kep-platform-red-7:#cf1322;--kep-platform-red-8:#a8071a;--kep-platform-red-9:#820014;--kep-platform-red-10:#5c0011;--kep-platform-orange-1:#fff7e6;--kep-platform-orange-2:#ffe7ba;--kep-platform-orange-3:#ffd591;--kep-platform-orange-4:#ffc069;--kep-platform-orange-5:#ffa940;--kep-platform-orange-6:#fa8c16;--kep-platform-orange-7:#d46b08;--kep-platform-orange-8:#ad4e00;--kep-platform-orange-9:#873800;--kep-platform-orange-10:#612500;--kep-platform-yellow-1:#feffe6;--kep-platform-yellow-2:#ffffb8;--kep-platform-yellow-3:#fffb8f;--kep-platform-yellow-4:#fff566;--kep-platform-yellow-5:#ffec3d;--kep-platform-yellow-6:#fadb14;--kep-platform-yellow-7:#d4b106;--kep-platform-yellow-8:#ad8b00;--kep-platform-yellow-9:#876800;--kep-platform-yellow-10:#614700;--kep-platform-volcano-1:#fff2e8;--kep-platform-volcano-2:#ffd8bf;--kep-platform-volcano-3:#ffbb96;--kep-platform-volcano-4:#ff9c6e;--kep-platform-volcano-5:#ff7a45;--kep-platform-volcano-6:#fa541c;--kep-platform-volcano-7:#d4380d;--kep-platform-volcano-8:#ad2102;--kep-platform-volcano-9:#871400;--kep-platform-volcano-10:#610b00;--kep-platform-geekblue-1:#f0f5ff;--kep-platform-geekblue-2:#d6e4ff;--kep-platform-geekblue-3:#adc6ff;--kep-platform-geekblue-4:#85a5ff;--kep-platform-geekblue-5:#597ef7;--kep-platform-geekblue-6:#2f54eb;--kep-platform-geekblue-7:#1d39c4;--kep-platform-geekblue-8:#10239e;--kep-platform-geekblue-9:#061178;--kep-platform-geekblue-10:#030852;--kep-platform-gold-1:#fffbe6;--kep-platform-gold-2:#fff1b8;--kep-platform-gold-3:#ffe58f;--kep-platform-gold-4:#ffd666;--kep-platform-gold-5:#ffc53d;--kep-platform-gold-6:#faad14;--kep-platform-gold-7:#d48806;--kep-platform-gold-8:#ad6800;--kep-platform-gold-9:#874d00;--kep-platform-gold-10:#613400;--kep-platform-lime-1:#fcffe6;--kep-platform-lime-2:#f4ffb8;--kep-platform-lime-3:#eaff8f;--kep-platform-lime-4:#d3f261;--kep-platform-lime-5:#bae637;--kep-platform-lime-6:#a0d911;--kep-platform-lime-7:#7cb305;--kep-platform-lime-8:#5b8c00;--kep-platform-lime-9:#3f6600;--kep-platform-lime-10:#254000;--kep-platform-color-text:rgba(0,0,0,0.88);--kep-platform-color-text-active:var(--kep-platform-blue-6);--kep-platform-color-text-secondary:rgba(0,0,0,0.65);--kep-platform-color-text-tertiary:rgba(0,0,0,0.45);--kep-platform-color-text-quaternary:rgba(0,0,0,0.25);--kep-platform-color-fill:rgba(0,0,0,0.15);--kep-platform-color-fill-secondary:rgba(0,0,0,0.06);--kep-platform-color-fill-tertiary:rgba(0,0,0,0.04);--kep-platform-color-fill-quaternary:rgba(0,0,0,0.02);--kep-platform-color-bg-hover:#f7f7f7;--kep-platform-color-bg-layout:#f5f5f5;--kep-platform-color-bg-container:#ffffff;--kep-platform-color-bg-elevated:#ffffff;--kep-platform-color-bg-spotlight:rgba(0,0,0,0.85);--kep-platform-color-bg-blur:transparent;--kep-platform-color-border:#e4e9ec;--kep-platform-color-border-secondary:#f0f0f0;--kep-platform-color-primary-bg:#e6f4ff;--kep-platform-color-primary-bg-hover:#bae0ff;--kep-platform-color-primary-border:#91caff;--kep-platform-color-primary-border-hover:#69b1ff;--kep-platform-color-primary-hover:#4096ff;--kep-platform-color-primary-active:#0958d9;--kep-platform-color-primary-text-hover:#4096ff;--kep-platform-color-primary-text:#1677ff;--kep-platform-color-primary-text-active:#0958d9;--kep-platform-color-success-bg:#f6ffed;--kep-platform-color-success-bg-hover:#d9f7be;--kep-platform-color-success-border:#b7eb8f;--kep-platform-color-success-border-hover:#95de64;--kep-platform-color-success-hover:#95de64;--kep-platform-color-success-active:#389e0d;--kep-platform-color-success-text-hover:#73d13d;--kep-platform-color-success-text:#52c41a;--kep-platform-color-success-text-active:#389e0d;--kep-platform-color-error-bg:#fff2f0;--kep-platform-color-error-bg-hover:#fff1f0;--kep-platform-color-error-bg-active:#ffccc7;--kep-platform-color-error-border:#ffccc7;--kep-platform-color-error-border-hover:#ffa39e;--kep-platform-color-error-hover:#ff7875;--kep-platform-color-error-active:#d9363e;--kep-platform-color-error-text-hover:#ff7875;--kep-platform-color-error-text:#ff4d4f;--kep-platform-color-error-text-active:#d9363e;--kep-platform-color-warning-bg:#fffbe6;--kep-platform-color-warning-bg-hover:#fff1b8;--kep-platform-color-warning-border:#ffe58f;--kep-platform-color-warning-border-hover:#ffd666;--kep-platform-color-warning-hover:#ffd666;--kep-platform-color-warning-active:#d48806;--kep-platform-color-warning-text-hover:#ffc53d;--kep-platform-color-warning-text:#faad14;--kep-platform-color-warning-text-active:#d48806;--kep-platform-color-info-bg:#e6f4ff;--kep-platform-color-info-bg-hover:#bae0ff;--kep-platform-color-info-border:#91caff;--kep-platform-color-info-border-hover:#69b1ff;--kep-platform-color-info-hover:#69b1ff;--kep-platform-color-info-active:#0958d9;--kep-platform-color-info-text-hover:#4096ff;--kep-platform-color-info-text:#1677ff;--kep-platform-color-info-text-active:#0958d9;--kep-platform-color-link-hover:#69b1ff;--kep-platform-color-link-active:#0958d9;--kep-platform-color-bg-mask:rgba(0,0,0,0.45);--kep-platform-color-white:#fff;--kep-platform-color-fill-content:rgba(0,0,0,0.06);--kep-platform-color-fill-content-hover:rgba(0,0,0,0.15);--kep-platform-color-fill-alter:rgba(0,0,0,0.02);--kep-platform-color-bg-container-disabled:rgba(0,0,0,0.04);--kep-platform-color-border-bg:#ffffff;--kep-platform-color-scrollbar-thumb:var(--kep-platform-color-border);--kep-platform-color-scrollbar-thumb-hover:var(--kep-platform-color-primary-hover);--kep-platform-color-split:rgba(5,5,5,0.06);--kep-platform-color-table-border:#f0f0f0;--kep-platform-color-text-placeholder:rgba(0,0,0,0.25);--kep-platform-color-text-disabled:rgba(0,0,0,0.25);--kep-platform-color-text-heading:rgba(0,0,0,0.88);--kep-platform-color-text-label:rgba(0,0,0,0.65);--kep-platform-color-text-description:rgba(0,0,0,0.45);--kep-platform-color-text-light-solid:#fff;--kep-platform-color-highlight:#ff4d4f;--kep-platform-color-bg-text-hover:rgba(0,0,0,0.06);--kep-platform-color-bg-text-active:rgba(0,0,0,0.15);--kep-platform-color-icon:rgba(0,0,0,0.45);--kep-platform-color-icon-hover:rgba(0,0,0,0.88);--kep-platform-color-error-outline:rgba(255,38,5,0.06);--kep-platform-color-warning-outline:rgba(255,215,5,0.1);--kep-platform-control-item-bg-hover:rgba(0,0,0,0.04);--kep-platform-control-item-bg-active:#e6f4ff;--kep-platform-control-item-bg-active-hover:#bae0ff;--kep-platform-control-item-bg-active-disabled:rgba(0,0,0,0.15);--kep-platform-control-tmp-outline:rgba(0,0,0,0.02);--kep-platform-control-outline:rgba(5,145,255,0.1);--kep-platform-box-shadow:0 6px 16px 0 rgba(0,0,0,0.08),0 3px 6px -4px rgba(0,0,0,0.12),0 9px 28px 8px rgba(0,0,0,0.05);--kep-platform-box-shadow-inset:inset 10px 0 8px -8px rgba(0,0,0,0.08);--kep-platform-box-shadow-secondary:0 6px 16px 0 rgba(0,0,0,0.08),0 3px 6px -4px rgba(0,0,0,0.12),0 9px 28px 8px rgba(0,0,0,0.05);--kep-platform-box-shadow-tertiary:0 1px 2px 0 rgba(0,0,0,0.03),0 1px 6px -1px rgba(0,0,0,0.02),0 2px 4px 0 rgba(0,0,0,0.02);--kep-platform-box-shadow-popover-arrow:2px 2px 5px rgba(0,0,0,0.05);--kep-platform-box-shadow-card:0 1px 2px -2px rgba(0,0,0,0.16),0 3px 6px 0 rgba(0,0,0,0.12),0 5px 12px 4px rgba(0,0,0,0.09);--kep-platform-box-shadow-drawer-right:-6px 0 16px 0 rgba(0,0,0,0.08),-3px 0 6px -4px rgba(0,0,0,0.12),-9px 0 28px 8px rgba(0,0,0,0.05);--kep-platform-box-shadow-drawer-left:6px 0 16px 0 rgba(0,0,0,0.08),3px 0 6px -4px rgba(0,0,0,0.12),9px 0 28px 8px rgba(0,0,0,0.05);--kep-platform-box-shadow-drawer-up:0 6px 16px 0 rgba(0,0,0,0.08),0 3px 6px -4px rgba(0,0,0,0.12),0 9px 28px 8px rgba(0,0,0,0.05);--kep-platform-box-shadow-drawer-down:0 -6px 16px 0 rgba(0,0,0,0.08),0 -3px 6px -4px rgba(0,0,0,0.12),0 -9px 28px 8px rgba(0,0,0,0.05);--kep-platform-color-tree-node-hover:#fafafa;--kep-platform-color-bg-active:#e6f4ff;--kep-platform-box-shadow-tabs-overflow-left:inset 10px 0 8px -8px rgba(0,0,0,0.08);--kep-platform-box-shadow-tabs-overflow-right:inset -10px 0 8px -8px rgba(0,0,0,0.08);--kep-platform-box-shadow-tabs-overflow-top:inset 0 10px 8px -8px rgba(0,0,0,0.08);--kep-platform-box-shadow-tabs-overflow-bottom:inset 0 -10px 8px -8px rgba(0,0,0,0.08);--kep-platform-header-bg:#fafafa;--kep-platform-color-scrollbar-track:#fafafa;--kep-platform-motion-ease-out-circ:cubic-bezier(0.08,0.82,0.17,1);--kep-platform-motion-ease-in-out-circ:cubic-bezier(0.78,0.14,0.15,0.86);--kep-platform-motion-ease-out:cubic-bezier(0.215,0.61,0.355,1);--kep-platform-motion-ease-in-out:cubic-bezier(0.645,0.045,0.355,1);--kep-platform-motion-ease-out-back:cubic-bezier(0.12,0.4,0.29,1.46);--kep-platform-motion-ease-in-back:cubic-bezier(0.71,-0.46,0.88,0.6);--kep-platform-motion-ease-in-quint:cubic-bezier(0.755,0.05,0.855,0.06);--kep-platform-motion-ease-out-quint:cubic-bezier(0.23,1,0.32,1);--kep-platform-motion-duration-fast:0.1s;--kep-platform-motion-duration-mid:0.2s;--kep-platform-motion-duration-slow:0.3s;--kep-platform-font-size:16px;--kep-platform-font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji';--kep-platform-font-family-code:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;--kep-platform-font-size-sm:14px;--kep-platform-font-size-lg:18px;--kep-platform-font-size-xl:20px;--kep-platform-font-size-heading-1:38px;--kep-platform-font-size-heading-2:30px;--kep-platform-font-size-heading-3:24px;--kep-platform-font-size-heading-4:20px;--kep-platform-font-size-heading-5:16px;--kep-platform-font-height:22px;--kep-platform-font-height-lg:24px;--kep-platform-font-height-sm:20px;--kep-platform-font-weight-base:400;--kep-platform-font-weight-strong:600;--kep-platform-link-decoration:none;--kep-platform-link-hover-decoration:none;--kep-platform-link-focus-decoration:none;--kep-platform-line-width:1px;--kep-platform-line-type:solid;--kep-platform-line-height:1.5714285714285714;--kep-platform-line-height-lg:1.5;--kep-platform-line-height-sm:1.6666666666666667;--kep-platform-line-height-heading-1:1.2105263157894737;--kep-platform-line-height-heading-2:1.2666666666666666;--kep-platform-line-height-heading-3:1.3333333333333333;--kep-platform-line-height-heading-4:1.4;--kep-platform-line-height-heading-5:1.5;--kep-platform-line-width-bold:2px;--kep-platform-font-size-icon:12px;--kep-platform-font-size-code:12px;--kep-platform-text-align:left;--kep-platform-border-radius:6px;--kep-platform-border-radius-xs:2px;--kep-platform-border-radius-sm:4px;--kep-platform-border-radius-lg:8px;--kep-platform-border-radius-outer:4px;--kep-platform-z-index-base:0;--kep-platform-z-index-popup-base:1000;--kep-platform-z-index-fixed:10;--kep-platform-opacity-loading:0.65;--kep-platform-control-padding-horizontal:12px;--kep-platform-control-padding-horizontal-sm:8px;--kep-platform-padding-xxs:4px;--kep-platform-padding-xs:8px;--kep-platform-padding-sm:12px;--kep-platform-padding:16px;--kep-platform-padding-md:20px;--kep-platform-padding-lg:24px;--kep-platform-padding-xl:32px;--kep-platform-padding-block-sm:0;--kep-platform-padding-block:4px;--kep-platform-padding-block-lg:7px;--kep-platform-padding-inline-sm:7px;--kep-platform-padding-inline:15px;--kep-platform-padding-inline-lg:15px;--kep-platform-padding-content-horizontal-lg:24px;--kep-platform-padding-content-vertical-lg:16px;--kep-platform-padding-content-horizontal:16px;--kep-platform-padding-content-vertical:12px;--kep-platform-padding-content-horizontal-sm:16px;--kep-platform-padding-content-vertical-sm:8px;--kep-platform-margin-xxxs:2px;--kep-platform-margin-xxs:4px;--kep-platform-margin-xs:8px;--kep-platform-margin-sm:12px;--kep-platform-margin:16px;--kep-platform-margin-md:20px;--kep-platform-margin-lg:24px;--kep-platform-margin-xl:32px;--kep-platform-margin-xxl:48px;--kep-platform-width-scrollbar:8px;--kep-platform-height-scrollbar:8px;--kep-platform-menu-item-height:40px;--kep-platform-menu-item-line-height:40px;}*,*::before,*::after{box-sizing:border-box;}body{margin:0;font-family:var(--kep-platform-font-family);font-size:var(--kep-platform-font-size);font-weight:var(--kep-platform-font-weight-base);line-height:var(--kep-platform-line-height);color:var(--kep-platform-color-text);text-align:var(--kep-platform-text-align);background-color:var(--kep-platform-color-bg-base);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:var(--kep-platform-black);}[tabindex='-1']:focus:not(:focus-visible){outline:0 !important;}hr{margin:--kep-platform-margin-sm 0;height:var(--kep-platform-line-width);color:var(--kep-platform-color-border);background-color:currentColor;border:0;}hr:not([size]){height:var(--kep-platform-line-width);}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:0;font-family:var(--kep-platform-font-family);font-style:var(--kep-platform-link-decoration);font-weight:var(--kep-platform-font-weight-strong);line-height:var(--kep-platform-line-height);color:var(--kep-platform-color-text-secondary);}h1{font-size:var(--kep-platform-font-size-heading-1);}h2{font-size:var(--kep-platform-font-size-heading-2);}h3{font-size:var(--kep-platform-font-size-heading-3);}h4{font-size:var(--kep-platform-font-size-heading-4);}h5{font-size:var(--kep-platform-font-size-heading-5);}h6{font-size:var(--kep-platform-font-size-heading-6);}p{margin-top:0;margin-bottom:0 !important;}abbr[title],abbr[data-original-title]{text-decoration:underline;text-decoration:underline dotted;cursor:help;text-decoration-skip-ink:none;}address{margin-bottom:1rem;font-style:normal;line-height:inherit;}ol,ul{padding-left:0;list-style:none;}ol,ul,dl{margin-top:0;margin-bottom:0;}ol ol,ul ul,ol ul,ul ol{margin-bottom:0;}dt{font-weight:var(--kep-platform-font-weight-base);}dd{margin-bottom:0.5rem;margin-left:0;}blockquote{margin:0 0 1rem;}b,strong{font-weight:var(--kep-platform-font-weight-strong);}small{font-size:var(--kep-platform-font-size-sm);}sub,sup{position:relative;font-size:var(--kep-platform-font-size-sm);line-height:0;vertical-align:baseline;}sub{bottom:-0.25em;}sup{top:-0.5em;}a{color:var(--kep-platform-color-link);text-decoration:var(--kep-platform-link-decoration);cursor:pointer;&:hover{color:var(--kep-platform-color-link-hover);text-decoration:--kep-platform-link-hover-decoration}}pre,code,kbd,samp{font-family:var(--kep-platform-font-family-code);font-size:var(--kep-platform-font-size-code);}pre{display:block;margin-top:0;margin-bottom:var(--kep-platform-margin);overflow:auto;font-size:var(--kep-platform-font-size-code);color:var(--kep-platform-color-text-label);code{font-size:inherit;color:inherit;word-break:normal;}}code{font-size:var(--kep-platform-font-size-code);color:var(--kep-platform-color-text-quaternary);word-wrap:break-word;a > &{color:inherit;}}figure{margin:0 0 1rem;}img{vertical-align:middle;}svg{overflow:hidden;vertical-align:middle;}table{border-collapse:collapse;}caption{padding-top:0.5rem;padding-bottom:0.5rem;color:var(--kep-platform-color-text-secondary);text-align:left;caption-side:bottom;}th{text-align:inherit;}label{display:inline-block;margin-bottom:0.5rem;}button{border-radius:0;}input,button,select,optgroup,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit;}button,input{overflow:visible;}button,select{text-transform:none;}select{word-wrap:normal;}[list]::-webkit-calendar-picker-indicator{display:none;}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{appearance:button;&:not(:disabled){cursor:pointer;}}button:focus{outline:none;}input:focus{outline:none;}::-moz-focus-inner{padding:0;border-style:none;}input[type='date'],input[type='time'],input[type='datetime-local'],input[type='month']{appearance:textfield;}::-webkit-scrollbar{width:var(--kep-platform-width-scrollbar);height:var(--kep-platform-height-scrollbar);}::-webkit-scrollbar-track{border-radius:var(--kep-platform-border-radius);background-color:var(--kep-platform-color-scrollbar-track);}::-webkit-scrollbar-thumb{background-color:var(--kep-platform-color-scrollbar-thumb);border-radius:var(--kep-platform-border-radius);}::-webkit-scrollbar-thumb:hover{background-color:var(--kep-platform-color-scrollbar-thumb-hover);}textarea{overflow:auto;resize:vertical;}fieldset{min-width:0;padding:0;margin:0;border:0;}legend{float:left;width:100%;padding:0;margin-bottom:var(--kep-platform-margin);font-size:var(--kep-platform-font-size);font-weight:var(--kep-platform-font-weight-base);line-height:inherit;color:inherit;white-space:normal;}mark{padding:var(--kep-platform-padding-sm);background-color:var(--kep-platform-padding-sm);}progress{vertical-align:baseline;}::-webkit-datetime-edit{overflow:visible;line-height:0;}[type='search']{outline-offset:-2px;appearance:textfield;}::-webkit-search-decoration{-webkit-appearance:none;}::-webkit-color-swatch-wrapper{padding:0;}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button;}output{display:inline-block;}summary{display:list-item;cursor:pointer;}template{display:none;}main{display:block;}[hidden]{display:none !important;}", ""], function (props) {
|
3
|
+
var GlobalStyles = createGlobalStyle([":root{--kep-platform-black:#000000;--kep-platform-blue:#1677ff;--kep-platform-purple:#722ED1;--kep-platform-cyan:#13C2C2;--kep-platform-green:#52C41A;--kep-platform-magenta:#EB2F96;--kep-platform-pink:#eb2f96;--kep-platform-red:#F5222D;--kep-platform-orange:#FA8C16;--kep-platform-yellow:#FADB14;--kep-platform-volcano:#FA541C;--kep-platform-geekblue:#2F54EB;--kep-platform-gold:#FAAD14;--kep-platform-lime:#A0D911;--kep-platform-color-primary:#1677ff;--kep-platform-color-success:#52c41a;--kep-platform-color-warning:#faad14;--kep-platform-color-error:#ff4d4f;--kep-platform-color-info:#1677ff;--kep-platform-color-link:#1677ff;--kep-platform-color-text-base:#000;--kep-platform-color-bg-base:#fff;--kep-platform-blue-1:#e6f4ff;--kep-platform-blue-2:#bae0ff;--kep-platform-blue-3:#91caff;--kep-platform-blue-4:#69b1ff;--kep-platform-blue-5:#4096ff;--kep-platform-blue-6:#1677ff;--kep-platform-blue-7:#0958d9;--kep-platform-blue-8:#003eb3;--kep-platform-blue-9:#002c8c;--kep-platform-blue-10:#001d66;--kep-platform-purple-1:#f9f0ff;--kep-platform-purple-2:#efdbff;--kep-platform-purple-3:#d3adf7;--kep-platform-purple-4:#b37feb;--kep-platform-purple-5:#9254de;--kep-platform-purple-6:#722ed1;--kep-platform-purple-7:#531dab;--kep-platform-purple-8:#391085;--kep-platform-purple-9:#22075e;--kep-platform-purple-10:#120338;--kep-platform-cyan-1:#e6fffb;--kep-platform-cyan-2:#b5f5ec;--kep-platform-cyan-3:#87e8de;--kep-platform-cyan-4:#5cdbd3;--kep-platform-cyan-5:#36cfc9;--kep-platform-cyan-6:#13c2c2;--kep-platform-cyan-7:#08979c;--kep-platform-cyan-8:#006d75;--kep-platform-cyan-9:#00474f;--kep-platform-cyan-10:#002329;--kep-platform-green-1:#f6ffed;--kep-platform-green-2:#d9f7be;--kep-platform-green-3:#b7eb8f;--kep-platform-green-4:#95de64;--kep-platform-green-5:#73d13d;--kep-platform-green-6:#52c41a;--kep-platform-green-7:#389e0d;--kep-platform-green-8:#237804;--kep-platform-green-9:#135200;--kep-platform-green-10:#092b00;--kep-platform-magenta-1:#fff0f6;--kep-platform-magenta-2:#ffd6e7;--kep-platform-magenta-3:#ffadd2;--kep-platform-magenta-4:#ff85c0;--kep-platform-magenta-5:#f759ab;--kep-platform-magenta-6:#eb2f96;--kep-platform-magenta-7:#c41d7f;--kep-platform-magenta-8:#9e1068;--kep-platform-magenta-9:#780650;--kep-platform-magenta-10:#520339;--kep-platform-pink-1:#fff0f6;--kep-platform-pink-2:#ffd6e7;--kep-platform-pink-3:#ffadd2;--kep-platform-pink-4:#ff85c0;--kep-platform-pink-5:#f759ab;--kep-platform-pink-6:#eb2f96;--kep-platform-pink-7:#c41d7f;--kep-platform-pink-8:#9e1068;--kep-platform-pink-9:#780650;--kep-platform-pink-10:#520339;--kep-platform-red-1:#fff1f0;--kep-platform-red-2:#ffccc7;--kep-platform-red-3:#ffa39e;--kep-platform-red-4:#ff7875;--kep-platform-red-5:#ff4d4f;--kep-platform-red-6:#f5222d;--kep-platform-red-7:#cf1322;--kep-platform-red-8:#a8071a;--kep-platform-red-9:#820014;--kep-platform-red-10:#5c0011;--kep-platform-orange-1:#fff7e6;--kep-platform-orange-2:#ffe7ba;--kep-platform-orange-3:#ffd591;--kep-platform-orange-4:#ffc069;--kep-platform-orange-5:#ffa940;--kep-platform-orange-6:#fa8c16;--kep-platform-orange-7:#d46b08;--kep-platform-orange-8:#ad4e00;--kep-platform-orange-9:#873800;--kep-platform-orange-10:#612500;--kep-platform-yellow-1:#feffe6;--kep-platform-yellow-2:#ffffb8;--kep-platform-yellow-3:#fffb8f;--kep-platform-yellow-4:#fff566;--kep-platform-yellow-5:#ffec3d;--kep-platform-yellow-6:#fadb14;--kep-platform-yellow-7:#d4b106;--kep-platform-yellow-8:#ad8b00;--kep-platform-yellow-9:#876800;--kep-platform-yellow-10:#614700;--kep-platform-volcano-1:#fff2e8;--kep-platform-volcano-2:#ffd8bf;--kep-platform-volcano-3:#ffbb96;--kep-platform-volcano-4:#ff9c6e;--kep-platform-volcano-5:#ff7a45;--kep-platform-volcano-6:#fa541c;--kep-platform-volcano-7:#d4380d;--kep-platform-volcano-8:#ad2102;--kep-platform-volcano-9:#871400;--kep-platform-volcano-10:#610b00;--kep-platform-geekblue-1:#f0f5ff;--kep-platform-geekblue-2:#d6e4ff;--kep-platform-geekblue-3:#adc6ff;--kep-platform-geekblue-4:#85a5ff;--kep-platform-geekblue-5:#597ef7;--kep-platform-geekblue-6:#2f54eb;--kep-platform-geekblue-7:#1d39c4;--kep-platform-geekblue-8:#10239e;--kep-platform-geekblue-9:#061178;--kep-platform-geekblue-10:#030852;--kep-platform-gold-1:#fffbe6;--kep-platform-gold-2:#fff1b8;--kep-platform-gold-3:#ffe58f;--kep-platform-gold-4:#ffd666;--kep-platform-gold-5:#ffc53d;--kep-platform-gold-6:#faad14;--kep-platform-gold-7:#d48806;--kep-platform-gold-8:#ad6800;--kep-platform-gold-9:#874d00;--kep-platform-gold-10:#613400;--kep-platform-lime-1:#fcffe6;--kep-platform-lime-2:#f4ffb8;--kep-platform-lime-3:#eaff8f;--kep-platform-lime-4:#d3f261;--kep-platform-lime-5:#bae637;--kep-platform-lime-6:#a0d911;--kep-platform-lime-7:#7cb305;--kep-platform-lime-8:#5b8c00;--kep-platform-lime-9:#3f6600;--kep-platform-lime-10:#254000;--kep-platform-color-text:rgba(0,0,0,0.88);--kep-platform-color-text-active:var(--kep-platform-blue-6);--kep-platform-color-text-secondary:rgba(0,0,0,0.65);--kep-platform-color-text-tertiary:rgba(0,0,0,0.45);--kep-platform-color-text-quaternary:rgba(0,0,0,0.25);--kep-platform-color-fill:rgba(0,0,0,0.15);--kep-platform-color-fill-secondary:rgba(0,0,0,0.06);--kep-platform-color-fill-tertiary:rgba(0,0,0,0.04);--kep-platform-color-fill-quaternary:rgba(0,0,0,0.02);--kep-platform-color-bg-hover:#f7f7f7;--kep-platform-color-bg-layout:#f5f5f5;--kep-platform-color-bg-container:#ffffff;--kep-platform-color-bg-elevated:#ffffff;--kep-platform-color-bg-spotlight:rgba(0,0,0,0.85);--kep-platform-color-bg-blur:transparent;--kep-platform-color-border:#e4e9ec;--kep-platform-color-border-secondary:#f0f0f0;--kep-platform-color-primary-bg:#e6f4ff;--kep-platform-color-primary-bg-hover:#bae0ff;--kep-platform-color-primary-border:#91caff;--kep-platform-color-primary-border-hover:#69b1ff;--kep-platform-color-primary-hover:#4096ff;--kep-platform-color-primary-active:#0958d9;--kep-platform-color-primary-text-hover:#4096ff;--kep-platform-color-primary-text:#1677ff;--kep-platform-color-primary-text-active:#0958d9;--kep-platform-color-success-bg:#f6ffed;--kep-platform-color-success-bg-hover:#d9f7be;--kep-platform-color-success-border:#b7eb8f;--kep-platform-color-success-border-hover:#95de64;--kep-platform-color-success-hover:#95de64;--kep-platform-color-success-active:#389e0d;--kep-platform-color-success-text-hover:#73d13d;--kep-platform-color-success-text:#52c41a;--kep-platform-color-success-text-active:#389e0d;--kep-platform-color-error-bg:#fff2f0;--kep-platform-color-error-bg-hover:#fff1f0;--kep-platform-color-error-bg-active:#ffccc7;--kep-platform-color-error-border:#ffccc7;--kep-platform-color-error-border-hover:#ffa39e;--kep-platform-color-error-hover:#ff7875;--kep-platform-color-error-active:#d9363e;--kep-platform-color-error-text-hover:#ff7875;--kep-platform-color-error-text:#ff4d4f;--kep-platform-color-error-text-active:#d9363e;--kep-platform-color-warning-bg:#fffbe6;--kep-platform-color-warning-bg-hover:#fff1b8;--kep-platform-color-warning-border:#ffe58f;--kep-platform-color-warning-border-hover:#ffd666;--kep-platform-color-warning-hover:#ffd666;--kep-platform-color-warning-active:#d48806;--kep-platform-color-warning-text-hover:#ffc53d;--kep-platform-color-warning-text:#faad14;--kep-platform-color-warning-text-active:#d48806;--kep-platform-color-info-bg:#e6f4ff;--kep-platform-color-info-bg-hover:#bae0ff;--kep-platform-color-info-border:#91caff;--kep-platform-color-info-border-hover:#69b1ff;--kep-platform-color-info-hover:#69b1ff;--kep-platform-color-info-active:#0958d9;--kep-platform-color-info-text-hover:#4096ff;--kep-platform-color-info-text:#1677ff;--kep-platform-color-info-text-active:#0958d9;--kep-platform-color-link-hover:#69b1ff;--kep-platform-color-link-active:#0958d9;--kep-platform-color-bg-mask:rgba(0,0,0,0.45);--kep-platform-color-white:#fff;--kep-platform-color-fill-content:rgba(0,0,0,0.06);--kep-platform-color-fill-content-hover:rgba(0,0,0,0.15);--kep-platform-color-fill-alter:rgba(0,0,0,0.02);--kep-platform-color-bg-container-disabled:rgba(0,0,0,0.04);--kep-platform-color-border-bg:#ffffff;--kep-platform-color-scrollbar-thumb:var(--kep-platform-color-border);--kep-platform-color-scrollbar-thumb-hover:var(--kep-platform-color-primary-hover);--kep-platform-color-split:rgba(5,5,5,0.06);--kep-platform-color-table-border:#f0f0f0;--kep-platform-color-text-placeholder:rgba(0,0,0,0.25);--kep-platform-color-text-disabled:rgba(0,0,0,0.25);--kep-platform-color-text-heading:rgba(0,0,0,0.88);--kep-platform-color-text-label:rgba(0,0,0,0.65);--kep-platform-color-text-description:rgba(0,0,0,0.45);--kep-platform-color-text-light-solid:#fff;--kep-platform-color-highlight:#ff4d4f;--kep-platform-color-bg-text-hover:rgba(0,0,0,0.06);--kep-platform-color-bg-text-active:rgba(0,0,0,0.15);--kep-platform-color-icon:rgba(0,0,0,0.45);--kep-platform-color-icon-hover:rgba(0,0,0,0.88);--kep-platform-color-error-outline:rgba(255,38,5,0.06);--kep-platform-color-warning-outline:rgba(255,215,5,0.1);--kep-platform-control-item-bg-hover:rgba(0,0,0,0.04);--kep-platform-control-item-bg-active:#e6f4ff;--kep-platform-control-item-bg-active-hover:#bae0ff;--kep-platform-control-item-bg-active-disabled:rgba(0,0,0,0.15);--kep-platform-control-tmp-outline:rgba(0,0,0,0.02);--kep-platform-control-outline:rgba(5,145,255,0.1);--kep-platform-box-shadow:0 6px 16px 0 rgba(0,0,0,0.08),0 3px 6px -4px rgba(0,0,0,0.12),0 9px 28px 8px rgba(0,0,0,0.05);--kep-platform-box-shadow-inset:inset 10px 0 8px -8px rgba(0,0,0,0.08);--kep-platform-box-shadow-secondary:0 6px 16px 0 rgba(0,0,0,0.08),0 3px 6px -4px rgba(0,0,0,0.12),0 9px 28px 8px rgba(0,0,0,0.05);--kep-platform-box-shadow-tertiary:0 1px 2px 0 rgba(0,0,0,0.03),0 1px 6px -1px rgba(0,0,0,0.02),0 2px 4px 0 rgba(0,0,0,0.02);--kep-platform-box-shadow-popover-arrow:2px 2px 5px rgba(0,0,0,0.05);--kep-platform-box-shadow-card:0 1px 2px -2px rgba(0,0,0,0.16),0 3px 6px 0 rgba(0,0,0,0.12),0 5px 12px 4px rgba(0,0,0,0.09);--kep-platform-box-shadow-drawer-right:-6px 0 16px 0 rgba(0,0,0,0.08),-3px 0 6px -4px rgba(0,0,0,0.12),-9px 0 28px 8px rgba(0,0,0,0.05);--kep-platform-box-shadow-drawer-left:6px 0 16px 0 rgba(0,0,0,0.08),3px 0 6px -4px rgba(0,0,0,0.12),9px 0 28px 8px rgba(0,0,0,0.05);--kep-platform-box-shadow-drawer-up:0 6px 16px 0 rgba(0,0,0,0.08),0 3px 6px -4px rgba(0,0,0,0.12),0 9px 28px 8px rgba(0,0,0,0.05);--kep-platform-box-shadow-drawer-down:0 -6px 16px 0 rgba(0,0,0,0.08),0 -3px 6px -4px rgba(0,0,0,0.12),0 -9px 28px 8px rgba(0,0,0,0.05);--kep-platform-color-tree-node-hover:#fafafa;--kep-platform-color-bg-active:#e6f4ff;--kep-platform-box-shadow-tabs-overflow-left:inset 10px 0 8px -8px rgba(0,0,0,0.08);--kep-platform-box-shadow-tabs-overflow-right:inset -10px 0 8px -8px rgba(0,0,0,0.08);--kep-platform-box-shadow-tabs-overflow-top:inset 0 10px 8px -8px rgba(0,0,0,0.08);--kep-platform-box-shadow-tabs-overflow-bottom:inset 0 -10px 8px -8px rgba(0,0,0,0.08);--kep-platform-header-bg:#fafafa;--kep-platform-color-scrollbar-track:#fafafa;--kep-platform-motion-ease-out-circ:cubic-bezier(0.08,0.82,0.17,1);--kep-platform-motion-ease-in-out-circ:cubic-bezier(0.78,0.14,0.15,0.86);--kep-platform-motion-ease-out:cubic-bezier(0.215,0.61,0.355,1);--kep-platform-motion-ease-in-out:cubic-bezier(0.645,0.045,0.355,1);--kep-platform-motion-ease-out-back:cubic-bezier(0.12,0.4,0.29,1.46);--kep-platform-motion-ease-in-back:cubic-bezier(0.71,-0.46,0.88,0.6);--kep-platform-motion-ease-in-quint:cubic-bezier(0.755,0.05,0.855,0.06);--kep-platform-motion-ease-out-quint:cubic-bezier(0.23,1,0.32,1);--kep-platform-motion-duration-fast:0.1s;--kep-platform-motion-duration-mid:0.2s;--kep-platform-motion-duration-slow:0.3s;--kep-platform-font-size:16px;--kep-platform-font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji';--kep-platform-font-family-code:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;--kep-platform-font-size-sm:14px;--kep-platform-font-size-lg:18px;--kep-platform-font-size-xl:20px;--kep-platform-font-size-heading-1:38px;--kep-platform-font-size-heading-2:30px;--kep-platform-font-size-heading-3:24px;--kep-platform-font-size-heading-4:20px;--kep-platform-font-size-heading-5:16px;--kep-platform-font-height:22px;--kep-platform-font-height-lg:24px;--kep-platform-font-height-sm:20px;--kep-platform-font-weight-base:400;--kep-platform-font-weight-strong:600;--kep-platform-link-decoration:none;--kep-platform-link-hover-decoration:none;--kep-platform-link-focus-decoration:none;--kep-platform-line-width:1px;--kep-platform-line-type:solid;--kep-platform-line-height:1.5714285714285714;--kep-platform-line-height-lg:1.5;--kep-platform-line-height-sm:1.6666666666666667;--kep-platform-line-height-heading-1:1.2105263157894737;--kep-platform-line-height-heading-2:1.2666666666666666;--kep-platform-line-height-heading-3:1.3333333333333333;--kep-platform-line-height-heading-4:1.4;--kep-platform-line-height-heading-5:1.5;--kep-platform-line-width-bold:2px;--kep-platform-font-size-icon:12px;--kep-platform-font-size-code:12px;--kep-platform-text-align:left;--kep-platform-border-radius:6px;--kep-platform-border-radius-xs:2px;--kep-platform-border-radius-sm:4px;--kep-platform-border-radius-lg:8px;--kep-platform-border-radius-outer:4px;--kep-platform-z-index-base:0;--kep-platform-z-index-popup-base:1000;--kep-platform-z-index-fixed:5;--kep-platform-opacity-loading:0.65;--kep-platform-control-padding-horizontal:12px;--kep-platform-control-padding-horizontal-sm:8px;--kep-platform-padding-xxs:4px;--kep-platform-padding-xs:8px;--kep-platform-padding-sm:12px;--kep-platform-padding:16px;--kep-platform-padding-md:20px;--kep-platform-padding-lg:24px;--kep-platform-padding-xl:32px;--kep-platform-padding-block-sm:0;--kep-platform-padding-block:4px;--kep-platform-padding-block-lg:7px;--kep-platform-padding-inline-sm:7px;--kep-platform-padding-inline:15px;--kep-platform-padding-inline-lg:15px;--kep-platform-padding-content-horizontal-lg:24px;--kep-platform-padding-content-vertical-lg:16px;--kep-platform-padding-content-horizontal:16px;--kep-platform-padding-content-vertical:12px;--kep-platform-padding-content-horizontal-sm:16px;--kep-platform-padding-content-vertical-sm:8px;--kep-platform-margin-xxxs:2px;--kep-platform-margin-xxs:4px;--kep-platform-margin-xs:8px;--kep-platform-margin-sm:12px;--kep-platform-margin:16px;--kep-platform-margin-md:20px;--kep-platform-margin-lg:24px;--kep-platform-margin-xl:32px;--kep-platform-margin-xxl:48px;--kep-platform-width-scrollbar:8px;--kep-platform-height-scrollbar:8px;--kep-platform-menu-item-height:40px;--kep-platform-menu-item-line-height:40px;}*,*::before,*::after{box-sizing:border-box;}body{margin:0;font-family:var(--kep-platform-font-family);font-size:var(--kep-platform-font-size);font-weight:var(--kep-platform-font-weight-base);line-height:var(--kep-platform-line-height);color:var(--kep-platform-color-text);text-align:var(--kep-platform-text-align);background-color:var(--kep-platform-color-bg-base);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:var(--kep-platform-black);}[tabindex='-1']:focus:not(:focus-visible){outline:0 !important;}hr{margin:--kep-platform-margin-sm 0;height:var(--kep-platform-line-width);color:var(--kep-platform-color-border);background-color:currentColor;border:0;}hr:not([size]){height:var(--kep-platform-line-width);}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:0;font-family:var(--kep-platform-font-family);font-style:var(--kep-platform-link-decoration);font-weight:var(--kep-platform-font-weight-strong);line-height:var(--kep-platform-line-height);color:var(--kep-platform-color-text-secondary);}h1{font-size:var(--kep-platform-font-size-heading-1);}h2{font-size:var(--kep-platform-font-size-heading-2);}h3{font-size:var(--kep-platform-font-size-heading-3);}h4{font-size:var(--kep-platform-font-size-heading-4);}h5{font-size:var(--kep-platform-font-size-heading-5);}h6{font-size:var(--kep-platform-font-size-heading-6);}p{margin-top:0;margin-bottom:0 !important;}abbr[title],abbr[data-original-title]{text-decoration:underline;text-decoration:underline dotted;cursor:help;text-decoration-skip-ink:none;}address{margin-bottom:1rem;font-style:normal;line-height:inherit;}ol,ul{padding-left:0;list-style:none;}ol,ul,dl{margin-top:0;margin-bottom:0;}ol ol,ul ul,ol ul,ul ol{margin-bottom:0;}dt{font-weight:var(--kep-platform-font-weight-base);}dd{margin-bottom:0.5rem;margin-left:0;}blockquote{margin:0 0 1rem;}b,strong{font-weight:var(--kep-platform-font-weight-strong);}small{font-size:var(--kep-platform-font-size-sm);}sub,sup{position:relative;font-size:var(--kep-platform-font-size-sm);line-height:0;vertical-align:baseline;}sub{bottom:-0.25em;}sup{top:-0.5em;}a{color:var(--kep-platform-color-link);text-decoration:var(--kep-platform-link-decoration);cursor:pointer;&:hover{color:var(--kep-platform-color-link-hover);text-decoration:--kep-platform-link-hover-decoration}}pre,code,kbd,samp{font-family:var(--kep-platform-font-family-code);font-size:var(--kep-platform-font-size-code);}pre{display:block;margin-top:0;margin-bottom:var(--kep-platform-margin);overflow:auto;font-size:var(--kep-platform-font-size-code);color:var(--kep-platform-color-text-label);code{font-size:inherit;color:inherit;word-break:normal;}}code{font-size:var(--kep-platform-font-size-code);color:var(--kep-platform-color-text-quaternary);word-wrap:break-word;a > &{color:inherit;}}figure{margin:0 0 1rem;}img{vertical-align:middle;}svg{overflow:hidden;vertical-align:middle;}table{border-collapse:collapse;}caption{padding-top:0.5rem;padding-bottom:0.5rem;color:var(--kep-platform-color-text-secondary);text-align:left;caption-side:bottom;}th{text-align:inherit;}label{display:inline-block;margin-bottom:0.5rem;}button{border-radius:0;}input,button,select,optgroup,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit;}button,input{overflow:visible;}button,select{text-transform:none;}select{word-wrap:normal;}[list]::-webkit-calendar-picker-indicator{display:none;}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{appearance:button;&:not(:disabled){cursor:pointer;}}button:focus{outline:none;}input:focus{outline:none;}::-moz-focus-inner{padding:0;border-style:none;}input[type='date'],input[type='time'],input[type='datetime-local'],input[type='month']{appearance:textfield;}::-webkit-scrollbar{width:var(--kep-platform-width-scrollbar);height:var(--kep-platform-height-scrollbar);}::-webkit-scrollbar-track{border-radius:var(--kep-platform-border-radius);background-color:var(--kep-platform-color-scrollbar-track);}::-webkit-scrollbar-thumb{background-color:var(--kep-platform-color-scrollbar-thumb);border-radius:var(--kep-platform-border-radius);}::-webkit-scrollbar-thumb:hover{background-color:var(--kep-platform-color-scrollbar-thumb-hover);}textarea{overflow:auto;resize:vertical;}fieldset{min-width:0;padding:0;margin:0;border:0;}legend{float:left;width:100%;padding:0;margin-bottom:var(--kep-platform-margin);font-size:var(--kep-platform-font-size);font-weight:var(--kep-platform-font-weight-base);line-height:inherit;color:inherit;white-space:normal;}mark{padding:var(--kep-platform-padding-sm);background-color:var(--kep-platform-padding-sm);}progress{vertical-align:baseline;}::-webkit-datetime-edit{overflow:visible;line-height:0;}[type='search']{outline-offset:-2px;appearance:textfield;}::-webkit-search-decoration{-webkit-appearance:none;}::-webkit-color-swatch-wrapper{padding:0;}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button;}output{display:inline-block;}summary{display:list-item;cursor:pointer;}template{display:none;}main{display:block;}[hidden]{display:none !important;}", ""], function (props) {
|
4
4
|
return props.$css;
|
5
5
|
});
|
6
6
|
export default GlobalStyles;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@kep-platform/basic-component",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.14",
|
4
4
|
"description": "A react library developed with dumi",
|
5
5
|
"module": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -74,10 +74,10 @@
|
|
74
74
|
"react-dom": "^18.0.0",
|
75
75
|
"stylelint": "^14.9.1"
|
76
76
|
},
|
77
|
-
"gitHead": "
|
77
|
+
"gitHead": "b346fc9c989221248d4882e8c3f7833e53750e92",
|
78
78
|
"dependencies": {
|
79
79
|
"@ant-design/icons": "^5.3.7",
|
80
|
-
"@kep-platform/hooks": "^0.0.
|
80
|
+
"@kep-platform/hooks": "^0.0.14",
|
81
81
|
"color": "^4.2.3",
|
82
82
|
"rc-pagination": "^4.1.0",
|
83
83
|
"styled-components": "^6.1.11"
|