@kep-platform/basic-component 0.0.60 → 0.0.64

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.
@@ -21,7 +21,7 @@ var StyledButton = styled('button').withConfig({
21
21
  shouldForwardProp: function shouldForwardProp(prop) {
22
22
  return !['isActive'].includes(prop);
23
23
  }
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) {
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 word-break: normal;\n white-space: nowrap;\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) {
25
25
  return props.theme.buttonFontWeight || theme.fontWeight;
26
26
  }, function (props) {
27
27
  return props.theme.background || theme.borderWidth;
@@ -26,11 +26,11 @@ 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: 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) {
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) {
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 "])));
33
+ return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border: var(--kep-platform-line-width) var(--kep-platform-line-type) var(--kep-platform-color-border-secondary);\n border-top-width: 0;\n border-left-width: 0;\n "])));
34
34
  }
35
35
  }, ColumnList, function (props) {
36
36
  if (props.isFlex) {
@@ -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
- }), (render === null || render === void 0 ? void 0 : render(rowData[dataIndex], rowData, rowIndex)) || rowData[dataIndex]);
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), itemRender ? itemRender(item, index) : title);
72
+ }, rest, {
73
+ title: typeof titleStr === 'string' ? titleStr : ''
74
+ }), titleStr);
73
75
  }) : children);
74
76
  };
75
77
  export default List;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kep-platform/basic-component",
3
- "version": "0.0.60",
3
+ "version": "0.0.64",
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.60",
50
+ "@kep-platform/hooks": "^0.0.64",
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": "05d862e763f6127675b8c148c87e1671f18ac33e"
90
+ "gitHead": "d4c2c36b1c71bd4a464aa96976f51f4e9eca87ec"
91
91
  }