@kep-platform/basic-component 0.0.43 → 0.0.45
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/BoxShadowBox/BoxShadowBox.js +3 -4
- package/dist/Button/Button.js +13 -14
- package/dist/Columns/Columns.js +13 -17
- package/dist/Flex/flex.js +7 -11
- package/dist/Grid/Col.js +3 -4
- package/dist/Grid/Row.js +3 -4
- package/dist/Indent/Indent.js +3 -4
- package/dist/Input/Input.js +3 -4
- package/dist/List/List.js +5 -9
- package/dist/Menu/Menu.js +5 -9
- package/dist/Pagination/Pagination.js +3 -4
- package/dist/PopupBox/PopupBox.js +4 -5
- package/dist/Select/Select.js +12 -28
- package/dist/Space/Space.js +4 -8
- package/dist/Spin/Spin.js +4 -8
- package/dist/Table/Table.js +15 -46
- package/dist/Tag/Tag.js +3 -4
- package/dist/Tree/MainProperties.js +4 -8
- package/dist/Tree/Tree.js +7 -14
- package/dist/Tree/TreeNode.js +10 -20
- package/dist/Tree/test.js +3 -4
- package/dist/ViewPort/Ripple.js +4 -5
- package/dist/ViewPort/ViewPort.d.ts +0 -1
- package/dist/ViewPort/ViewPort.js +4 -8
- package/dist/ViewPort/ViewPortStore.d.ts +7 -0
- package/dist/ViewPort/ViewPortStore.js +11 -6
- package/dist/ViewPort/ViewPortWindow.d.ts +7 -14
- package/dist/ViewPort/ViewPortWindow.js +44 -36
- package/dist/ViewPort/test.js +10 -14
- package/dist/Window/Window.js +17 -54
- package/dist/Window/WindowController.js +3 -4
- package/dist/Window/WindowOption.js +4 -5
- package/dist/Window/WindowStore.d.ts +5 -2
- package/dist/Window/WindowStore.js +14 -6
- package/dist/Window/test.js +18 -46
- package/dist/__styles/GlobalStyles.js +3 -1
- package/package.json +7 -7
@@ -1,12 +1,11 @@
|
|
1
|
+
var _templateObject;
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
1
3
|
import styled from 'styled-components';
|
2
4
|
var BoxShadowBox = styled('div').withConfig({
|
3
5
|
shouldForwardProp: function shouldForwardProp(prop) {
|
4
6
|
return !['offsetLeft'].includes(prop);
|
5
7
|
}
|
6
|
-
}).
|
7
|
-
displayName: "BoxShadowBox",
|
8
|
-
componentId: "basic-component-347b__sc-18cvhyx-0"
|
9
|
-
})(["z-index:", ";width:", ";box-shadow:var(--kep-platform-box-shadow-inset);background-color:transparent;position:absolute;top:0;left:", ";height:", ";transition:opacity 0.5s;"], function (props) {
|
8
|
+
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n z-index: ", ";\n width: ", ";\n box-shadow: var(--kep-platform-box-shadow-inset);\n background-color: transparent;\n position: absolute;\n top: 0;\n left: ", ";\n height: ", ";\n transition: opacity 0.5s;\n"])), function (props) {
|
10
9
|
return props.width ? 999 : -1;
|
11
10
|
}, function (props) {
|
12
11
|
return props.width;
|
package/dist/Button/Button.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
var _excluded = ["type", "size"];
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
2
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
4
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
5
|
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."); }
|
@@ -8,47 +9,45 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
8
9
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
9
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
10
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
12
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
11
13
|
import React, { forwardRef, useEffect, useState } from 'react';
|
12
14
|
import styled, { css, keyframes } from 'styled-components';
|
13
15
|
import theme from "../__consts/theme";
|
14
16
|
// 定义关键帧动画
|
15
17
|
|
16
|
-
var defaultShadowAnimation = keyframes(["0%{box-shadow:0 0 0 0 ", "
|
17
|
-
var dangerShadowAnimation = keyframes(["0%{box-shadow:0 0 0 0 ", "
|
18
|
+
var defaultShadowAnimation = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n box-shadow: 0 0 0 0 ", ";;\n }\n 50% {\n box-shadow: 0 0 0 4px ", ";;\n }\n 100% {\n box-shadow: 0 0 0 0 ", ";;\n }\n "])), theme.lightenPrimaryColor, theme.lightenPrimaryColor, theme.lightenPrimaryColor);
|
19
|
+
var dangerShadowAnimation = keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n box-shadow: 0 0 0 0 ", ";;\n }\n 50% {\n box-shadow: 0 0 0 4px ", ";;\n }\n 100% {\n box-shadow: 0 0 0 0 ", ";;\n }\n "])), theme.lightenDangerColor, theme.lightenDangerColor, theme.lightenDangerColor);
|
18
20
|
var StyledButton = styled('button').withConfig({
|
19
21
|
shouldForwardProp: function shouldForwardProp(prop) {
|
20
22
|
return !['isActive'].includes(prop);
|
21
23
|
}
|
22
|
-
}).
|
23
|
-
displayName: "StyledButton",
|
24
|
-
componentId: "basic-component-347b__sc-nyef9a-0"
|
25
|
-
})(["font-weight:", ";outline:none;border-width:", ";border-style:solid;padding:var(--kep-platform-padding-block) var(--kep-platform-padding-inline);font-size:var(--kep-platform-font-size);", ";", " ", " ", " &:hover{opacity:0.7;}"], function (props) {
|
24
|
+
})(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-weight: ", ";\n outline: none;\n border-width: ", ";\n border-style: solid;\n padding: var(--kep-platform-padding-block) var(--kep-platform-padding-inline);\n font-size: var(--kep-platform-font-size);\n ", ";\n /* type \u63A7\u5236 */\n ", "\n /* \u662F\u5426\u70B9\u51FBactive */\n ", "\n /* size\u63A7\u5236 */\n ", "\n &:hover {\n opacity: 0.7;\n }\n"])), function (props) {
|
26
25
|
return props.theme.buttonFontWeight || theme.fontWeight;
|
27
26
|
}, function (props) {
|
28
27
|
return props.theme.background || theme.borderWidth;
|
29
28
|
}, function (props) {
|
30
|
-
if (props.theme.buttonBorderRadius) return css(["border-radius:", "
|
29
|
+
if (props.theme.buttonBorderRadius) return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-radius: ", ";\n "])), props.theme.buttonBorderRadius);else return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border-radius: var(--kep-platform-border-radius);\n "])));
|
31
30
|
}, function (props) {
|
32
31
|
switch (props.type) {
|
33
32
|
case 'danger':
|
34
|
-
return css(["color:var(--kep-platform-color-white)
|
33
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: var(--kep-platform-color-white);\n border-color: transparent;\n background-color: var(--kep-platform-red);\n "])));
|
35
34
|
case 'default':
|
36
|
-
return css(["color:", "
|
35
|
+
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n color: ", ";\n border-color: var(--kep-platform-color-border);\n background-color: ", ";\n &:hover {\n border-color: var(--kep-platform-color-primary);\n color: var(--kep-platform-color-primary);\n }\n "])), theme.color, theme.backgroundColor);
|
37
36
|
case 'primary':
|
38
|
-
return css(["color:", "
|
37
|
+
return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n color: ", ";\n border-color: transparent;\n background-color: ", ";\n "])), theme.backgroundColor, theme.primaryColor);
|
39
38
|
}
|
40
39
|
}, function (props) {
|
41
40
|
if (props.isActive) {
|
42
|
-
if (props.type === 'danger') return css(["animation:", " 0.5s linear
|
43
|
-
return css(["animation:", " 0.5s linear
|
41
|
+
if (props.type === 'danger') return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n animation: ", " 0.5s linear;\n "])), dangerShadowAnimation);else {
|
42
|
+
return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n animation: ", " 0.5s linear;\n "])), defaultShadowAnimation);
|
44
43
|
}
|
45
44
|
}
|
46
45
|
}, function (props) {
|
47
46
|
switch (props.size) {
|
48
47
|
case 'small':
|
49
|
-
return css(["padding:var(--kep-platform-padding-block-sm) var(--kep-platform-padding-inline-sm)
|
48
|
+
return css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n padding: var(--kep-platform-padding-block-sm) var(--kep-platform-padding-inline-sm);\n font-size: var(--kep-platform-font-size-sm);\n border-radius: var(--kep-platform-border-radius-sm);\n "])));
|
50
49
|
case 'large':
|
51
|
-
return css(["padding:var(--kep-platform-padding-block-lg) var(--kep-platform-padding-inline-lg)
|
50
|
+
return css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n padding: var(--kep-platform-padding-block-lg) var(--kep-platform-padding-inline-lg);\n font-size: var(--kep-platform-font-size-lg);\n border-radius: var(--kep-platform-border-radius-lg);\n "])));
|
52
51
|
}
|
53
52
|
});
|
54
53
|
var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
package/dist/Columns/Columns.js
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
var _excluded = ["columns", "rowData", "rowIndex", "isFlex", "leftBase", "columnsKey"],
|
2
2
|
_excluded2 = ["dataIndex", "render", "key"];
|
3
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
3
4
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
4
5
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
5
6
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
7
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
6
8
|
import { observer } from 'mobx-react-lite';
|
7
9
|
import React, { useMemo } from 'react';
|
8
10
|
import styled, { css } from 'styled-components';
|
@@ -13,48 +15,42 @@ var ColumnList = styled(List).withConfig({
|
|
13
15
|
shouldForwardProp: function shouldForwardProp(prop) {
|
14
16
|
return !['widthSum', 'bordered', 'isFlex', 'rowIndex'].includes(prop);
|
15
17
|
}
|
16
|
-
})
|
17
|
-
displayName: "ColumnList",
|
18
|
-
componentId: "basic-component-347b__sc-1hh0w2t-0"
|
19
|
-
})(["", ""], function (props) {
|
18
|
+
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n"])), function (props) {
|
20
19
|
if (props.isFlex) {
|
21
|
-
return css(["display:flex
|
20
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n "])));
|
22
21
|
} else {
|
23
|
-
return css(["width:", "px
|
22
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: ", "px;\n "])), props.widthSum);
|
24
23
|
}
|
25
24
|
});
|
26
25
|
export var Column = styled(ListItem).withConfig({
|
27
26
|
shouldForwardProp: function shouldForwardProp(prop) {
|
28
27
|
return !['width', 'isFlex', 'bordered', 'hideInTable', 'filter', 'sorter', 'rowIndex', 'focused'].includes(prop);
|
29
28
|
}
|
30
|
-
})
|
31
|
-
displayName: "Column",
|
32
|
-
componentId: "basic-component-347b__sc-1hh0w2t-1"
|
33
|
-
})(["padding:var(--kep-platform-padding-xs);text-align:", ";white-space:break-spaces;word-break:break-all;border-bottom:var(--kep-platform-line-width) var(--kep-platform-line-type) var(--kep-platform-color-border-secondary);", " background-color:var(--kep-platform-color-bg-base);", ":hover &{background-color:var(--kep-platform-color-bg-hover);}", " ", " ", ""], function (props) {
|
29
|
+
})(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: var(--kep-platform-padding-xs);\n text-align: ", ";\n white-space: break-spaces;\n word-break: break-all;\n border-bottom: var(--kep-platform-line-width) var(--kep-platform-line-type)\n var(--kep-platform-color-border-secondary);\n ", "\n background-color: var(--kep-platform-color-bg-base);\n ", ":hover & {\n background-color: var(--kep-platform-color-bg-hover);\n }\n ", "\n ", "\n ", "\n"])), function (props) {
|
34
30
|
return props.align;
|
35
31
|
}, function (props) {
|
36
32
|
if (props.bordered) {
|
37
|
-
return css(["border:var(--kep-platform-line-width) var(--kep-platform-line-type)
|
33
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border: var(--kep-platform-line-width) var(--kep-platform-line-type)\n var(--kep-platform-color-border-secondary);\n border-top-width: 0;\n border-left-width: 0;\n "])));
|
38
34
|
}
|
39
35
|
}, ColumnList, function (props) {
|
40
36
|
if (props.isFlex) {
|
41
|
-
return css(["flex:", "
|
37
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n flex: ", ";\n "])), props.width || DefaultColumnWidth);
|
42
38
|
} else {
|
43
|
-
return css(["width:", "px
|
39
|
+
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: ", "px;\n "])), props.width || DefaultColumnWidth);
|
44
40
|
}
|
45
41
|
}, function (props) {
|
46
42
|
if (props.fixed && !props.isFlex) {
|
47
|
-
return css(["position:sticky
|
43
|
+
return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n position: sticky;\n "])));
|
48
44
|
}
|
49
45
|
}, function (props) {
|
50
46
|
if (props.fixed === 'left' && !props.isFlex) {
|
51
|
-
return css(["left:", "
|
47
|
+
return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n left: ", ";\n z-index: var(--kep-platform-z-index-fixed);\n "])), props.left);
|
52
48
|
}
|
53
49
|
if (props.fixed === 'right' && !props.isFlex) {
|
54
|
-
return css(["right:", "
|
50
|
+
return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n right: ", ";\n z-index: var(--kep-platform-z-index-fixed) - 1;\n "])), props.right);
|
55
51
|
}
|
56
52
|
if (props.focused) {
|
57
|
-
return css(["z-index:20 !important
|
53
|
+
return css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n z-index: 20 !important;\n "])));
|
58
54
|
}
|
59
55
|
});
|
60
56
|
var displayColumnsCache = {};
|
package/dist/Flex/flex.js
CHANGED
@@ -1,22 +1,18 @@
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
1
3
|
import styled, { css } from 'styled-components';
|
2
|
-
export var Flex = styled.div
|
3
|
-
displayName: "Flex",
|
4
|
-
componentId: "basic-component-347b__sc-14xikkf-0"
|
5
|
-
})(["display:flex;flex-direction:", ";align-items:", ";", ""], function (props) {
|
4
|
+
export var Flex = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: ", ";\n align-items: ", ";\n ", "\n"])), function (props) {
|
6
5
|
return props.direction || 'row';
|
7
6
|
}, function (props) {
|
8
7
|
return props.alignItems || 'center';
|
9
8
|
}, function (props) {
|
10
9
|
if (props.width) {
|
11
|
-
return css(["width:", "px
|
10
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: ", "px;\n "])), props.width);
|
12
11
|
} else {
|
13
|
-
return css(["width:100
|
12
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n "])));
|
14
13
|
}
|
15
14
|
});
|
16
|
-
export var FlexItem = styled.div
|
17
|
-
displayName: "FlexItem",
|
18
|
-
componentId: "basic-component-347b__sc-14xikkf-1"
|
19
|
-
})(["flex:", ";text-align:", ";cursor:", ";overflow:hidden;text-overflow:ellipsis;white-space:nowrap;", ";"], function (props) {
|
15
|
+
export var FlexItem = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: ", ";\n text-align: ", ";\n cursor: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n ", ";\n"])), function (props) {
|
20
16
|
return props.flex;
|
21
17
|
}, function (props) {
|
22
18
|
return props.align;
|
@@ -24,6 +20,6 @@ export var FlexItem = styled.div.withConfig({
|
|
24
20
|
return props.cursor || 'default';
|
25
21
|
}, function (props) {
|
26
22
|
if (props.width) {
|
27
|
-
return css(["width:", "px
|
23
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: ", "px;\n "])), props.width);
|
28
24
|
}
|
29
25
|
});
|
package/dist/Grid/Col.js
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
+
var _templateObject;
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
1
3
|
import React from 'react';
|
2
4
|
import styled from 'styled-components';
|
3
|
-
export var StyledCol = styled.div
|
4
|
-
displayName: "StyledCol",
|
5
|
-
componentId: "basic-component-347b__sc-1arnr37-0"
|
6
|
-
})(["flex-basis:calc(100% * ", " / 24);"], function (props) {
|
5
|
+
export var StyledCol = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex-basis: calc(100% * ", " / 24); /* \u53608\u4EFD */\n"])), function (props) {
|
7
6
|
return props.span;
|
8
7
|
});
|
9
8
|
var Col = function Col(props) {
|
package/dist/Grid/Row.js
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
var _excluded = ["children"];
|
2
|
+
var _templateObject;
|
2
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
4
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
6
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
5
7
|
import React from 'react';
|
6
8
|
import styled from 'styled-components';
|
7
9
|
import theme from "../__consts/theme";
|
8
10
|
import Col, { StyledCol } from "./Col";
|
9
|
-
var StyledRow = styled.div
|
10
|
-
displayName: "StyledRow",
|
11
|
-
componentId: "basic-component-347b__sc-15h2ba-0"
|
12
|
-
})(["display:flex;flex-wrap:wrap;margin:", ";& > ", "{padding:", ";}"], function (props) {
|
11
|
+
var StyledRow = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap; /* \u5141\u8BB8\u5B50\u7EC4\u4EF6\u6362\u884C */\n margin: ", ";\n & > ", " {\n padding: ", ";\n }\n"])), function (props) {
|
13
12
|
if (props.gap) {
|
14
13
|
if (typeof props.gap === 'number') {
|
15
14
|
var margin = (props.gap || parseInt(theme.gap)) / 2;
|
package/dist/Indent/Indent.js
CHANGED
@@ -1,13 +1,12 @@
|
|
1
|
+
var _templateObject;
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
1
3
|
import styled from 'styled-components';
|
2
4
|
var indentWidthRegx = /(\d*)(\D+)/;
|
3
5
|
/* 缩进组件,默认单位是rem,默认长度是1,默认层级是1 */
|
4
6
|
var defaultIndentUnit = 'px';
|
5
7
|
var defaultIndentWidth = 16;
|
6
8
|
var lengthUnits = ['px', 'rem', 'pt', 'em', '%'];
|
7
|
-
var Indent = styled.div
|
8
|
-
displayName: "Indent",
|
9
|
-
componentId: "basic-component-347b__sc-1w1dll1-0"
|
10
|
-
})(["width:", ";"], function (props) {
|
9
|
+
var Indent = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: ", ";\n"])), function (props) {
|
11
10
|
if (!props.indentWidth) {
|
12
11
|
return props.level * defaultIndentWidth + defaultIndentUnit;
|
13
12
|
}
|
package/dist/Input/Input.js
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
var _excluded = ["value", "onChange"];
|
2
|
+
var _templateObject;
|
2
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
4
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
6
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
5
7
|
import React from 'react';
|
6
8
|
import styled from 'styled-components';
|
7
|
-
var StyledInput = styled.input
|
8
|
-
displayName: "StyledInput",
|
9
|
-
componentId: "basic-component-347b__sc-ojuww7-0"
|
10
|
-
})(["outline:none;box-shadow:none;border:1px solid var(--kep-platform-color-border);border-radius:var(--kep-platform-border-radius-sm);&:hover{border-color:var(--kep-platform-color-primary);}"]);
|
9
|
+
var StyledInput = styled.input(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n outline: none;\n box-shadow: none;\n border: 1px solid var(--kep-platform-color-border);\n border-radius: var(--kep-platform-border-radius-sm);\n &:hover {\n border-color: var(--kep-platform-color-primary);\n }\n"])));
|
11
10
|
export default function Input(props) {
|
12
11
|
var value = props.value,
|
13
12
|
_onChange = props.onChange,
|
package/dist/List/List.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
var _excluded = ["onClick"],
|
2
2
|
_excluded2 = ["items", "direction", "itemRender", "children"],
|
3
3
|
_excluded3 = ["key", "title"];
|
4
|
+
var _templateObject, _templateObject2, _templateObject3;
|
4
5
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
5
6
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
6
7
|
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."); }
|
@@ -10,28 +11,23 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
10
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
11
12
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
12
13
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
14
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
13
15
|
import { useClickOutsize } from '@kep-platform/hooks';
|
14
16
|
import React, { useCallback, useRef, useState } from 'react';
|
15
17
|
import styled, { css } from 'styled-components';
|
16
18
|
|
17
19
|
//因为UL自带有title属性
|
18
20
|
|
19
|
-
var StyledUL = styled.ul
|
20
|
-
displayName: "StyledUL",
|
21
|
-
componentId: "basic-component-347b__sc-1ombcxm-0"
|
22
|
-
})(["display:flex;flex-direction:", ";"], function (props) {
|
21
|
+
var StyledUL = styled.ul(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: ", ";\n"])), function (props) {
|
23
22
|
return props.direction || 'row';
|
24
23
|
});
|
25
24
|
export var StyledLi = styled('li').withConfig({
|
26
25
|
shouldForwardProp: function shouldForwardProp(prop) {
|
27
26
|
return !['focused'].includes(prop);
|
28
27
|
}
|
29
|
-
})
|
30
|
-
displayName: "StyledLi",
|
31
|
-
componentId: "basic-component-347b__sc-1ombcxm-1"
|
32
|
-
})(["flex:0 0 auto;", ""], function (props) {
|
28
|
+
})(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex: 0 0 auto;\n ", "\n"])), function (props) {
|
33
29
|
if (props.focused) {
|
34
|
-
return css(["z-index:20 !important
|
30
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n z-index: 20 !important;\n "])));
|
35
31
|
}
|
36
32
|
});
|
37
33
|
export var ListItem = function ListItem(props) {
|
package/dist/Menu/Menu.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
var _excluded = ["children", "onSelect", "activeKey", "trigger"];
|
2
|
+
var _templateObject, _templateObject2, _templateObject3;
|
2
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
4
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
@@ -8,24 +9,19 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
8
9
|
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; }
|
9
10
|
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; } }
|
10
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
12
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
11
13
|
import React, { useCallback, useEffect, useState } from 'react';
|
12
14
|
import styled, { css } from 'styled-components';
|
13
15
|
import { List, ListItem } from "../List";
|
14
16
|
import { Popup } from "../PopupBox";
|
15
|
-
var MenuList = styled(List)
|
16
|
-
displayName: "MenuList",
|
17
|
-
componentId: "basic-component-347b__sc-d665dh-0"
|
18
|
-
})([""]);
|
17
|
+
var MenuList = styled(List)(_templateObject || (_templateObject = _taggedTemplateLiteral([""])));
|
19
18
|
var MenuListItem = styled(ListItem).withConfig({
|
20
19
|
shouldForwardProp: function shouldForwardProp(prop) {
|
21
20
|
return !['active'].includes(prop);
|
22
21
|
}
|
23
|
-
})
|
24
|
-
displayName: "MenuListItem",
|
25
|
-
componentId: "basic-component-347b__sc-d665dh-1"
|
26
|
-
})(["background-color:var(--kep-platform-color-bg-base);border-radius:var(--kep-platform-border-radius-sm);margin:var(--kep-platform-margin-xxxs);padding:0 var(--kep-platform-padding-xs);height:var(--kep-platform-menu-item-height);line-height:var(--kep-platform-menu-item-line-height);color:var(--kep-platform-color-text) !important;&:hover{background-color:var(--kep-platform-color-bg-hover);}", ""], function (props) {
|
22
|
+
})(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: var(--kep-platform-color-bg-base);\n border-radius: var(--kep-platform-border-radius-sm);\n margin: var(--kep-platform-margin-xxxs);\n padding: 0 var(--kep-platform-padding-xs);\n height: var(--kep-platform-menu-item-height);\n line-height: var(--kep-platform-menu-item-line-height);\n color: var(--kep-platform-color-text) !important;\n &:hover {\n background-color: var(--kep-platform-color-bg-hover);\n }\n ", "\n"])), function (props) {
|
27
23
|
if (props.active) {
|
28
|
-
return css(["background-color:var(--kep-platform-color-bg-active) !important
|
24
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-color: var(--kep-platform-color-bg-active) !important;\n color: var(--kep-platform-color-text-active) !important;\n "])));
|
29
25
|
}
|
30
26
|
});
|
31
27
|
function Menu(_ref) {
|
@@ -1,16 +1,15 @@
|
|
1
1
|
var _excluded = ["justifyContent"];
|
2
|
+
var _templateObject;
|
2
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
4
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
6
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
5
7
|
import RCPagination from 'rc-pagination';
|
6
8
|
import React from 'react';
|
7
9
|
import styled from 'styled-components';
|
8
10
|
import { Button } from "../Button";
|
9
11
|
import { Select } from "../Select";
|
10
|
-
var StyledRCPagination = styled(RCPagination).
|
11
|
-
displayName: "StyledRCPagination",
|
12
|
-
componentId: "basic-component-347b__sc-11dkd3-0"
|
13
|
-
})(["list-style:none;display:flex;justify-content:", ";align-items:center;& > *{margin:0 var(--kep-platform-margin-xxs);}& .rc-pagination-item{cursor:pointer;padding:var(--kep-platform-padding-xxs) var(--kep-platform-padding-xs);border:1px solid transparent;border-radius:var(--kep-platform-border-radius-sm);& a{color:var(--kep-platform-color-text);}&:hover{background-color:var(--kep-platform-color-bg-hover);}&.rc-pagination-item-active{border:1px solid var(--kep-platform-color-primary);a{color:var(--kep-platform-color-primary);}}}& .rc-pagination-prev{}& .rc-pagination-disabled{}& .rc-pagination-next{}& .rc-pagintaion-options{}& .rc-pagination-jump-next{}& .rc-pagination-options-quick-jumper{& input{margin:0 var(--kep-platform-margin-xs);border-radius:var(--kep-platform-border-radius-sm);border:1px solid var(--kep-platform-color-border);padding:var(--kep-platform-padding-xxs) var(--kep-platform-padding-xs);&:active,&:focus{border-color:var(--kep-platform-color-primary);}}}"], function (props) {
|
12
|
+
var StyledRCPagination = styled(RCPagination)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n list-style: none;\n display: flex;\n justify-content: ", ";\n align-items: center;\n & > * {\n margin: 0 var(--kep-platform-margin-xxs);\n }\n & .rc-pagination-item {\n cursor: pointer;\n padding: var(--kep-platform-padding-xxs) var(--kep-platform-padding-xs);\n border: 1px solid transparent;\n border-radius: var(--kep-platform-border-radius-sm);\n & a {\n color: var(--kep-platform-color-text);\n }\n &:hover {\n background-color: var(--kep-platform-color-bg-hover);\n }\n &.rc-pagination-item-active {\n border: 1px solid var(--kep-platform-color-primary);\n a {\n color: var(--kep-platform-color-primary);\n }\n }\n }\n & .rc-pagination-prev {\n }\n & .rc-pagination-disabled {\n }\n\n & .rc-pagination-next {\n }\n\n & .rc-pagintaion-options {\n }\n\n & .rc-pagination-jump-next {\n }\n & .rc-pagination-options-quick-jumper {\n & input {\n margin: 0 var(--kep-platform-margin-xs);\n border-radius: var(--kep-platform-border-radius-sm);\n border: 1px solid var(--kep-platform-color-border);\n padding: var(--kep-platform-padding-xxs) var(--kep-platform-padding-xs);\n &:active,\n &:focus {\n border-color: var(--kep-platform-color-primary);\n }\n }\n }\n"])), function (props) {
|
14
13
|
return props.justifyContent;
|
15
14
|
});
|
16
15
|
var Pagination = function Pagination(_ref) {
|
@@ -1,9 +1,11 @@
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3;
|
1
2
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
2
3
|
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
4
|
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
5
|
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
6
|
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
7
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
8
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
7
9
|
import { useClickOutsize } from '@kep-platform/hooks';
|
8
10
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
9
11
|
import styled, { css } from 'styled-components';
|
@@ -11,11 +13,8 @@ var PopupBox = styled('div').withConfig({
|
|
11
13
|
shouldForwardProp: function shouldForwardProp(prop) {
|
12
14
|
return !['left', 'right', 'top', 'bottom', 'visible'].includes(prop);
|
13
15
|
}
|
14
|
-
})
|
15
|
-
|
16
|
-
componentId: "basic-component-347b__sc-80rdwc-0"
|
17
|
-
})(["background-color:var(--kep-platform-color-bg-base);padding:var(--kep-platform-padding-xs);border-radius:var(--kep-platform-border-radius-sm);position:fixed;box-shadow:var(--kep-platform-box-shadow);z-index:999;", ";"], function (props) {
|
18
|
-
if (props.visible) return css(["left:", "px;top:", "px;"], props.left || -999, props.top || -999);else return css(["left:-9999px;top:-9999px;"]);
|
16
|
+
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: var(--kep-platform-color-bg-base);\n padding: var(--kep-platform-padding-xs);\n border-radius: var(--kep-platform-border-radius-sm);\n position: fixed;\n box-shadow: var(--kep-platform-box-shadow);\n z-index: 999;\n ", ";\n"])), function (props) {
|
17
|
+
if (props.visible) return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n left: ", "px;\n top: ", "px;\n "])), props.left || -999, props.top || -999);else return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n left: -9999px;\n top: -9999px;\n "])));
|
19
18
|
});
|
20
19
|
export function Popup(props) {
|
21
20
|
var children = props.children,
|
package/dist/Select/Select.js
CHANGED
@@ -1,54 +1,38 @@
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
1
2
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
2
3
|
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
4
|
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
5
|
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
6
|
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
7
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
8
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
7
9
|
import { useClickOutsize } from '@kep-platform/hooks';
|
8
10
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
9
11
|
import styled, { css, keyframes } from 'styled-components';
|
10
12
|
import { List, ListItem } from "../List";
|
11
|
-
var SelectContainer = styled.div
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
var SelectTrigger = styled.div.withConfig({
|
16
|
-
displayName: "SelectTrigger",
|
17
|
-
componentId: "basic-component-347b__sc-z3izsh-1"
|
18
|
-
})(["display:flex;height:40px;line-height:calc(40px - 2 * var(--kep-platform-padding-xxs));border:1px solid var(--kep-platform-color-border);border-radius:var(--kep-platform-border-radius);padding:var(--kep-platform-padding-xxs) var(--kep-platform-padding-xs);"]);
|
19
|
-
var SelectInput = styled.input.withConfig({
|
20
|
-
displayName: "SelectInput",
|
21
|
-
componentId: "basic-component-347b__sc-z3izsh-2"
|
22
|
-
})(["border-width:0;"]);
|
23
|
-
var fadeIn = keyframes(["0%{opacity:0;}100%{opacity:1;}"]);
|
13
|
+
var SelectContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 200px;\n position: relative;\n"])));
|
14
|
+
var SelectTrigger = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n height: 40px;\n line-height: calc(40px - 2 * var(--kep-platform-padding-xxs));\n border: 1px solid var(--kep-platform-color-border);\n border-radius: var(--kep-platform-border-radius);\n padding: var(--kep-platform-padding-xxs) var(--kep-platform-padding-xs);\n"])));
|
15
|
+
var SelectInput = styled.input(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-width: 0;\n"])));
|
16
|
+
var fadeIn = keyframes(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n"])));
|
24
17
|
var SelectPannel = styled('div').withConfig({
|
25
18
|
shouldForwardProp: function shouldForwardProp(prop) {
|
26
19
|
return !['visible'].includes(prop);
|
27
20
|
}
|
28
|
-
})
|
29
|
-
displayName: "SelectPannel",
|
30
|
-
componentId: "basic-component-347b__sc-z3izsh-3"
|
31
|
-
})(["position:absolute;left:0;top:40px;width:100%;box-shadow:var(--kep-platform-box-shadow);border-radius:var(--kep-platform-border-radius);z-index:var(--kep-platform-z-index-popup-base);", ""], function (props) {
|
21
|
+
})(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n left: 0;\n top: 40px;\n width: 100%;\n box-shadow: var(--kep-platform-box-shadow);\n border-radius: var(--kep-platform-border-radius);\n z-index: var(--kep-platform-z-index-popup-base);\n ", "\n"])), function (props) {
|
32
22
|
if (props.visible) {
|
33
|
-
return css(["animation:", " 0.3s ease-in
|
23
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n animation: ", " 0.3s ease-in;\n "])), fadeIn);
|
34
24
|
} else {
|
35
|
-
return css(["visibility:hidden
|
25
|
+
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n visibility: hidden;\n "])));
|
36
26
|
}
|
37
27
|
});
|
38
|
-
var SelectList = styled(List)
|
39
|
-
displayName: "SelectList",
|
40
|
-
componentId: "basic-component-347b__sc-z3izsh-4"
|
41
|
-
})([""]);
|
28
|
+
var SelectList = styled(List)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral([""])));
|
42
29
|
var SelectListItem = styled(ListItem).withConfig({
|
43
30
|
shouldForwardProp: function shouldForwardProp(prop) {
|
44
31
|
return !['active'].includes(prop);
|
45
32
|
}
|
46
|
-
})
|
47
|
-
displayName: "SelectListItem",
|
48
|
-
componentId: "basic-component-347b__sc-z3izsh-5"
|
49
|
-
})(["background-color:var(--kep-platform-color-bg-base);border-radius:var(--kep-platform-border-radius-sm);margin:var(--kep-platform-margin-xxxs);padding:0 var(--kep-platform-padding-xs);height:var(--kep-platform-menu-item-height);line-height:var(--kep-platform-menu-item-line-height);&:hover{background-color:var(--kep-platform-color-bg-hover);}", ""], function (props) {
|
33
|
+
})(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n background-color: var(--kep-platform-color-bg-base);\n border-radius: var(--kep-platform-border-radius-sm);\n margin: var(--kep-platform-margin-xxxs);\n padding: 0 var(--kep-platform-padding-xs);\n height: var(--kep-platform-menu-item-height);\n line-height: var(--kep-platform-menu-item-line-height);\n &:hover {\n background-color: var(--kep-platform-color-bg-hover);\n }\n ", "\n"])), function (props) {
|
50
34
|
if (props.active) {
|
51
|
-
return css(["background-color:var(--kep-platform-color-bg-active) !important
|
35
|
+
return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background-color: var(--kep-platform-color-bg-active) !important;\n color: var(--kep-platform-color-text-active) !important;\n "])));
|
52
36
|
}
|
53
37
|
});
|
54
38
|
export default function Select(props) {
|
package/dist/Space/Space.js
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
var _excluded = ["size"];
|
2
|
+
var _templateObject, _templateObject2;
|
2
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
4
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
6
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
5
7
|
import React from 'react';
|
6
8
|
import styled from 'styled-components';
|
7
|
-
var StyledSpace = styled.ul
|
8
|
-
displayName: "StyledSpace",
|
9
|
-
componentId: "basic-component-347b__sc-90tegf-0"
|
10
|
-
})(["list-style:none;display:inline-flex;align-items:center;flex-direction:", ";gap:", ";"], function (props) {
|
9
|
+
var StyledSpace = styled.ul(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n list-style: none;\n display: inline-flex;\n align-items: center;\n flex-direction: ", ";\n gap: ", ";\n"])), function (props) {
|
11
10
|
return props.direction;
|
12
11
|
}, function (props) {
|
13
12
|
switch (props.size) {
|
@@ -20,10 +19,7 @@ var StyledSpace = styled.ul.withConfig({
|
|
20
19
|
return 'var(--kep-platform-padding-xs)';
|
21
20
|
}
|
22
21
|
});
|
23
|
-
export var SpaceItem = styled.li
|
24
|
-
displayName: "SpaceItem",
|
25
|
-
componentId: "basic-component-347b__sc-90tegf-1"
|
26
|
-
})(["margin:0;padding:0;"]);
|
22
|
+
export var SpaceItem = styled.li(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 0;\n padding: 0;\n"])));
|
27
23
|
var Space = function Space(_ref) {
|
28
24
|
var _ref$size = _ref.size,
|
29
25
|
size = _ref$size === void 0 ? 'middle' : _ref$size,
|
package/dist/Spin/Spin.js
CHANGED
@@ -1,18 +1,14 @@
|
|
1
|
+
var _templateObject, _templateObject2;
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
1
3
|
import LoadingOutlined from '@ant-design/icons/LoadingOutlined';
|
2
4
|
import React from 'react';
|
3
5
|
import styled from 'styled-components';
|
4
|
-
var SpinContainer = styled.div
|
5
|
-
displayName: "SpinContainer",
|
6
|
-
componentId: "basic-component-347b__sc-1s1g2fa-0"
|
7
|
-
})(["position:relative;"]);
|
6
|
+
var SpinContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n"])));
|
8
7
|
var SpinMark = styled('div').withConfig({
|
9
8
|
shouldForwardProp: function shouldForwardProp(prop) {
|
10
9
|
return !['spinning'].includes(prop);
|
11
10
|
}
|
12
|
-
}).
|
13
|
-
displayName: "SpinMark",
|
14
|
-
componentId: "basic-component-347b__sc-1s1g2fa-1"
|
15
|
-
})(["position:absolute;inset:0 0 0 0;background-color:rgba(255,255,255,0.706);display:flex;justify-content:center;align-items:center;color:var(--kep-platform-color-primary);"]);
|
11
|
+
})(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n inset: 0 0 0 0;\n background-color: rgba(255, 255, 255, 0.706);\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--kep-platform-color-primary);\n"])));
|
16
12
|
export default function Spin(props) {
|
17
13
|
return /*#__PURE__*/React.createElement(SpinContainer, null, props.children, /*#__PURE__*/React.createElement(SpinMark, {
|
18
14
|
spinning: props.spinning,
|