@kep-platform/basic-component 0.0.63 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
package/dist/Columns/Columns.js
CHANGED
@@ -26,7 +26,7 @@ export var Column = styled(ListItem).withConfig({
|
|
26
26
|
shouldForwardProp: function shouldForwardProp(prop) {
|
27
27
|
return !['width', 'isFlex', 'bordered', 'hideInTable', 'filter', 'sorter', 'rowIndex', 'focused'].includes(prop);
|
28
28
|
}
|
29
|
-
})(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: var(--kep-platform-padding-xs);\n text-align: ", ";\n white-space:
|
29
|
+
})(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: var(--kep-platform-padding-xs);\n text-align: ", ";\n white-space: nowrap;\n text-overflow: ellipsis;\n word-break: break-all;\n overflow: hidden;\n min-width: 0;\n max-width: 100%;\n border-bottom: var(--kep-platform-line-width) var(--kep-platform-line-type) 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) {
|
30
30
|
return props.align;
|
31
31
|
}, function (props) {
|
32
32
|
if (props.bordered) {
|
@@ -121,9 +121,11 @@ export default observer(function Columns(_ref) {
|
|
121
121
|
render = _ref3.render,
|
122
122
|
key = _ref3.key,
|
123
123
|
listItemRestProps = _objectWithoutProperties(_ref3, _excluded2);
|
124
|
+
var title = (render === null || render === void 0 ? void 0 : render(rowData[dataIndex], rowData, rowIndex)) || rowData[dataIndex];
|
124
125
|
return /*#__PURE__*/React.createElement(Column, _extends({}, listItemRestProps, {
|
125
126
|
key: key,
|
126
|
-
isFlex: isFlex
|
127
|
-
|
127
|
+
isFlex: isFlex,
|
128
|
+
title: typeof title === 'string' ? title : ''
|
129
|
+
}), title);
|
128
130
|
}));
|
129
131
|
});
|
package/dist/List/List.js
CHANGED
@@ -46,7 +46,6 @@ export var ListItem = function ListItem(props) {
|
|
46
46
|
setFocused(false);
|
47
47
|
});
|
48
48
|
return /*#__PURE__*/React.createElement(StyledLi, _extends({}, rest, {
|
49
|
-
title: "li",
|
50
49
|
focused: focused,
|
51
50
|
onClick: onClickHandler,
|
52
51
|
ref: ref
|
@@ -67,9 +66,12 @@ var List = function List(_ref) {
|
|
67
66
|
var key = item.key,
|
68
67
|
title = item.title,
|
69
68
|
rest = _objectWithoutProperties(item, _excluded3);
|
69
|
+
var titleStr = itemRender ? itemRender(item, index) : title;
|
70
70
|
return /*#__PURE__*/React.createElement(ListItem, _extends({
|
71
71
|
key: key
|
72
|
-
}, rest
|
72
|
+
}, rest, {
|
73
|
+
title: typeof titleStr === 'string' ? titleStr : ''
|
74
|
+
}), titleStr);
|
73
75
|
}) : children);
|
74
76
|
};
|
75
77
|
export default List;
|
@@ -9,7 +9,7 @@ import React from 'react';
|
|
9
9
|
import styled from 'styled-components';
|
10
10
|
import { Button } from "../Button";
|
11
11
|
import { Select } from "../Select";
|
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:
|
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 font-size: 14px;\n cursor: pointer;\n padding: 0 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: 0 var(--kep-platform-padding-xxs);\n &:active,\n &:focus {\n border-color: var(--kep-platform-color-primary);\n }\n }\n }\n"])), function (props) {
|
13
13
|
return props.justifyContent;
|
14
14
|
});
|
15
15
|
var Pagination = function Pagination(_ref) {
|
@@ -20,10 +20,14 @@ var Pagination = function Pagination(_ref) {
|
|
20
20
|
justifyContent: justifyContent
|
21
21
|
}, rest, {
|
22
22
|
nextIcon: function nextIcon() {
|
23
|
-
return /*#__PURE__*/React.createElement(Button,
|
23
|
+
return /*#__PURE__*/React.createElement(Button, {
|
24
|
+
size: "small"
|
25
|
+
}, "\u4E0B\u4E00\u9875");
|
24
26
|
},
|
25
27
|
prevIcon: function prevIcon() {
|
26
|
-
return /*#__PURE__*/React.createElement(Button,
|
28
|
+
return /*#__PURE__*/React.createElement(Button, {
|
29
|
+
size: "small"
|
30
|
+
}, "\u4E0A\u4E00\u9875");
|
27
31
|
},
|
28
32
|
jumpNextIcon: function jumpNextIcon() {
|
29
33
|
return /*#__PURE__*/React.createElement("span", {
|
package/dist/Select/Select.js
CHANGED
@@ -11,7 +11,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
11
11
|
import styled, { css, keyframes } from 'styled-components';
|
12
12
|
import { List, ListItem } from "../List";
|
13
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:
|
14
|
+
var SelectTrigger = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n height: 32px;\n font-size: 14px;\n line-height: calc(32px - 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: 0 var(--kep-platform-padding-xs);\n"])));
|
15
15
|
var SelectInput = styled.input(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-width: 0;\n"])));
|
16
16
|
var fadeIn = keyframes(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n"])));
|
17
17
|
var SelectPannel = styled('div').withConfig({
|
@@ -30,7 +30,7 @@ var SelectListItem = styled(ListItem).withConfig({
|
|
30
30
|
shouldForwardProp: function shouldForwardProp(prop) {
|
31
31
|
return !['active'].includes(prop);
|
32
32
|
}
|
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) {
|
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 font-size: 14px;\n height: var(--kep-platform-menu-item-height-sm);\n line-height: var(--kep-platform-menu-item-line-height-sm);\n &:hover {\n background-color: var(--kep-platform-color-bg-hover);\n }\n ", "\n"])), function (props) {
|
34
34
|
if (props.active) {
|
35
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 "])));
|
36
36
|
}
|
package/dist/Table/Table.js
CHANGED
@@ -414,7 +414,7 @@ export default function Table(_ref3) {
|
|
414
414
|
columns: formatedColumns,
|
415
415
|
isFlex: isFlex
|
416
416
|
}));else return undefined;
|
417
|
-
})) : empty), pagination !== false && ((pagination === null || pagination === void 0 ? void 0 : pagination.total) || dataSource.length) !== 0 && /*#__PURE__*/React.createElement(Pagination, _extends({}, pagination, {
|
417
|
+
})) : empty), /*#__PURE__*/React.createElement("br", null), pagination !== false && ((pagination === null || pagination === void 0 ? void 0 : pagination.total) || dataSource.length) !== 0 && /*#__PURE__*/React.createElement(Pagination, _extends({}, pagination, {
|
418
418
|
total: (pagination === null || pagination === void 0 ? void 0 : pagination.total) || dataSource.length,
|
419
419
|
justifyContent: "right",
|
420
420
|
onChange: function onChange(current, pageSize) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@kep-platform/basic-component",
|
3
|
-
"version": "0.0
|
3
|
+
"version": "0.1.0",
|
4
4
|
"description": "A react library developed with dumi",
|
5
5
|
"license": "MIT",
|
6
6
|
"module": "dist/index.js",
|
@@ -47,7 +47,7 @@
|
|
47
47
|
},
|
48
48
|
"dependencies": {
|
49
49
|
"@ant-design/icons": "^5.3.7",
|
50
|
-
"@kep-platform/hooks": "^0.0
|
50
|
+
"@kep-platform/hooks": "^0.1.0",
|
51
51
|
"color": "^4.2.3",
|
52
52
|
"rc-pagination": "^4.1.0"
|
53
53
|
},
|
@@ -87,5 +87,5 @@
|
|
87
87
|
"authors": [
|
88
88
|
"less-step-jss 1599925910@qq.com"
|
89
89
|
],
|
90
|
-
"gitHead": "
|
90
|
+
"gitHead": "8d6892601e5d0b0c30ddf1c3b7944324c647b8e5"
|
91
91
|
}
|