gxxc-ui 1.0.0

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.
Files changed (143) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +41 -0
  3. package/dist/AmountCellUI/index.d.ts +11 -0
  4. package/dist/AmountCellUI/index.js +123 -0
  5. package/dist/AnchorUI/demo/anchor-button.d.ts +3 -0
  6. package/dist/AnchorUI/demo/anchor-button.js +85 -0
  7. package/dist/AnchorUI/demo/use-anchor.d.ts +3 -0
  8. package/dist/AnchorUI/demo/use-anchor.js +69 -0
  9. package/dist/AnchorUI/index.d.ts +4 -0
  10. package/dist/AnchorUI/index.js +56 -0
  11. package/dist/AnchorUI/index.scss +21 -0
  12. package/dist/BackUI/index.d.ts +14 -0
  13. package/dist/BackUI/index.js +35 -0
  14. package/dist/BackUI/index.scss +26 -0
  15. package/dist/BroadcastUI/index.d.ts +12 -0
  16. package/dist/BroadcastUI/index.js +62 -0
  17. package/dist/BroadcastUI/index.scss +43 -0
  18. package/dist/ButtonUI/index.d.ts +9 -0
  19. package/dist/ButtonUI/index.js +17 -0
  20. package/dist/ButtonUI/index.scss +6 -0
  21. package/dist/CellUI/index.d.ts +13 -0
  22. package/dist/CellUI/index.js +78 -0
  23. package/dist/CellUI/index.scss +28 -0
  24. package/dist/Components/index.d.ts +2 -0
  25. package/dist/Components/index.js +4 -0
  26. package/dist/DateUI/index.d.ts +5 -0
  27. package/dist/DateUI/index.js +116 -0
  28. package/dist/DateUI/index.scss +3 -0
  29. package/dist/DescriptionsUI/index.d.ts +19 -0
  30. package/dist/DescriptionsUI/index.js +72 -0
  31. package/dist/DescriptionsUI/index.scss +88 -0
  32. package/dist/EmptyUI/emptyImage.d.ts +3 -0
  33. package/dist/EmptyUI/emptyImage.js +12 -0
  34. package/dist/EmptyUI/index.d.ts +9 -0
  35. package/dist/EmptyUI/index.js +13 -0
  36. package/dist/EmptyUI/index.scss +10 -0
  37. package/dist/FilterUI/index.d.ts +28 -0
  38. package/dist/FilterUI/index.js +252 -0
  39. package/dist/FilterUI/index.scss +80 -0
  40. package/dist/FormUI/index.d.ts +4 -0
  41. package/dist/FormUI/index.js +45 -0
  42. package/dist/FormUI/index.scss +64 -0
  43. package/dist/IconUI/index.d.ts +27 -0
  44. package/dist/IconUI/index.js +22 -0
  45. package/dist/IconUI/material/dictionary.d.ts +4 -0
  46. package/dist/IconUI/material/dictionary.js +71 -0
  47. package/dist/IconUI/material/dictionary.scss +58 -0
  48. package/dist/IconUI/material/material.d.ts +16 -0
  49. package/dist/IconUI/material/material.js +476 -0
  50. package/dist/IconUI/material/rally.d.ts +22 -0
  51. package/dist/IconUI/material/rally.js +50 -0
  52. package/dist/ImageUI/index.d.ts +13 -0
  53. package/dist/ImageUI/index.js +159 -0
  54. package/dist/ImageUI/index.scss +59 -0
  55. package/dist/InputUI/index.d.ts +7 -0
  56. package/dist/InputUI/index.js +114 -0
  57. package/dist/InputUI/index.scss +24 -0
  58. package/dist/LoadingUI/index.d.ts +4 -0
  59. package/dist/LoadingUI/index.js +13 -0
  60. package/dist/LoadingUI/index.scss +47 -0
  61. package/dist/MessageUI/index.d.ts +3 -0
  62. package/dist/MessageUI/index.js +9 -0
  63. package/dist/MessageUI/index.scss +50 -0
  64. package/dist/ModalUI/index.d.ts +4 -0
  65. package/dist/ModalUI/index.js +98 -0
  66. package/dist/ModalUI/index.scss +45 -0
  67. package/dist/NotificationUI/index.d.ts +3 -0
  68. package/dist/NotificationUI/index.js +30 -0
  69. package/dist/NotificationUI/index.scss +0 -0
  70. package/dist/PasswordStrongUI/index.d.ts +8 -0
  71. package/dist/PasswordStrongUI/index.js +67 -0
  72. package/dist/PasswordStrongUI/index.scss +35 -0
  73. package/dist/RichEditorUI/index.d.ts +10 -0
  74. package/dist/RichEditorUI/index.js +68 -0
  75. package/dist/RichEditorUI/index.scss +20 -0
  76. package/dist/SearchUI/index.d.ts +4 -0
  77. package/dist/SearchUI/index.js +55 -0
  78. package/dist/SearchUI/index.scss +20 -0
  79. package/dist/SelectUI/index.d.ts +13 -0
  80. package/dist/SelectUI/index.js +87 -0
  81. package/dist/SelectUI/index.scss +13 -0
  82. package/dist/StatisticUI/index.d.ts +20 -0
  83. package/dist/StatisticUI/index.js +70 -0
  84. package/dist/StatisticUI/index.scss +6 -0
  85. package/dist/SwitchUI/index.d.ts +4 -0
  86. package/dist/SwitchUI/index.js +24 -0
  87. package/dist/SwitchUI/index.scss +0 -0
  88. package/dist/TableUI/demo/index.scss +7 -0
  89. package/dist/TableUI/demo/setting.d.ts +4 -0
  90. package/dist/TableUI/demo/setting.js +107 -0
  91. package/dist/TableUI/index.d.ts +12 -0
  92. package/dist/TableUI/index.js +109 -0
  93. package/dist/TableUI/index.scss +40 -0
  94. package/dist/TableUI/material/Button/index.d.ts +4 -0
  95. package/dist/TableUI/material/Button/index.js +20 -0
  96. package/dist/TableUI/material/Button/index.scss +35 -0
  97. package/dist/TableUI/material/HideMultipleLines/index.d.ts +4 -0
  98. package/dist/TableUI/material/HideMultipleLines/index.js +48 -0
  99. package/dist/TableUI/material/HideMultipleLines/index.scss +11 -0
  100. package/dist/TableUI/material/MultiLine/index.d.ts +4 -0
  101. package/dist/TableUI/material/MultiLine/index.js +23 -0
  102. package/dist/TableUI/material/MultiLine/index.scss +25 -0
  103. package/dist/TableUI/material/Operate/index.d.ts +3 -0
  104. package/dist/TableUI/material/Operate/index.js +43 -0
  105. package/dist/TableUI/material/Operate/index.scss +25 -0
  106. package/dist/TableUI/material/Setting/index.d.ts +3 -0
  107. package/dist/TableUI/material/Setting/index.js +211 -0
  108. package/dist/TableUI/material/Setting/index.scss +52 -0
  109. package/dist/TagUI/index.d.ts +17 -0
  110. package/dist/TagUI/index.js +118 -0
  111. package/dist/TagUI/index.scss +41 -0
  112. package/dist/TestUI/index.d.ts +3 -0
  113. package/dist/TestUI/index.js +5 -0
  114. package/dist/TestUI/index.scss +0 -0
  115. package/dist/TextUI/index.d.ts +7 -0
  116. package/dist/TextUI/index.js +17 -0
  117. package/dist/TextUI/index.scss +10 -0
  118. package/dist/Tiga/demo/demoQuick.d.ts +3 -0
  119. package/dist/Tiga/demo/demoQuick.js +104 -0
  120. package/dist/Tiga/demo/demoQuickType.d.ts +8 -0
  121. package/dist/Tiga/demo/demoQuickType.js +94 -0
  122. package/dist/Tiga/index.d.ts +4 -0
  123. package/dist/Tiga/index.js +68 -0
  124. package/dist/Tiga/index.scss +0 -0
  125. package/dist/Tiga/material/quickType.d.ts +29 -0
  126. package/dist/Tiga/material/quickType.js +75 -0
  127. package/dist/UploadUI/index.d.ts +23 -0
  128. package/dist/UploadUI/index.js +383 -0
  129. package/dist/UploadUI/index.scss +202 -0
  130. package/dist/UploadUI/type.d.ts +4 -0
  131. package/dist/UploadUI/type.js +30 -0
  132. package/dist/VesselUI/index.d.ts +3 -0
  133. package/dist/VesselUI/index.js +199 -0
  134. package/dist/VesselUI/type.d.ts +64 -0
  135. package/dist/VesselUI/type.js +1 -0
  136. package/dist/VideoPreviewUI/index.d.ts +11 -0
  137. package/dist/VideoPreviewUI/index.js +65 -0
  138. package/dist/VideoPreviewUI/index.scss +32 -0
  139. package/dist/assets/index.d.ts +1 -0
  140. package/dist/assets/index.js +1 -0
  141. package/dist/index.d.ts +34 -0
  142. package/dist/index.js +34 -0
  143. package/package.json +87 -0
@@ -0,0 +1,107 @@
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; }
7
+ import React, { useState, useEffect } from 'react';
8
+ import { TableUI } from "../..";
9
+ import "./index.scss";
10
+ var columns = [{
11
+ title: '姓名',
12
+ dataIndex: 'name',
13
+ key: 'name'
14
+ }, {
15
+ title: '年龄',
16
+ dataIndex: 'age',
17
+ key: 'age'
18
+ }, {
19
+ title: '电话',
20
+ dataIndex: 'phone',
21
+ key: 'phone'
22
+ }];
23
+ var initialTableHeader = [{
24
+ name: '姓名',
25
+ key: 'name',
26
+ sort: 1,
27
+ selected: true,
28
+ disable: false,
29
+ width: 220
30
+ }, {
31
+ name: '年龄',
32
+ key: 'age',
33
+ sort: 2,
34
+ selected: true,
35
+ disable: false,
36
+ width: 220
37
+ }, {
38
+ name: '电话',
39
+ key: 'phone',
40
+ sort: 3,
41
+ selected: false,
42
+ disable: true,
43
+ width: 220
44
+ }];
45
+ var dataSource = [{
46
+ name: '刘备',
47
+ age: 22,
48
+ phone: 15692837652
49
+ }, {
50
+ name: '关羽',
51
+ age: 21,
52
+ phone: 17697787678
53
+ }, {
54
+ name: '张飞',
55
+ age: 18,
56
+ phone: 12392880611
57
+ }];
58
+ var DemoSetting = function DemoSetting() {
59
+ var current = 1;
60
+ var pageSize = 2;
61
+ var total = 3;
62
+ var _useState = useState(false),
63
+ _useState2 = _slicedToArray(_useState, 2),
64
+ status = _useState2[0],
65
+ setStatus = _useState2[1];
66
+ var _useState3 = useState(initialTableHeader),
67
+ _useState4 = _slicedToArray(_useState3, 2),
68
+ headerList = _useState4[0],
69
+ setHeaderList = _useState4[1];
70
+ var _useState5 = useState(columns),
71
+ _useState6 = _slicedToArray(_useState5, 2),
72
+ newColumns = _useState6[0],
73
+ setNewColumns = _useState6[1];
74
+ useEffect(function () {
75
+ var list = [];
76
+ headerList === null || headerList === void 0 || headerList.forEach(function (i) {
77
+ newColumns.forEach(function (j) {
78
+ if (i.key === j.key) {
79
+ list.push(j);
80
+ }
81
+ });
82
+ });
83
+ setNewColumns(list);
84
+ }, [headerList]);
85
+ return /*#__PURE__*/React.createElement("div", {
86
+ className: "demo-setting"
87
+ }, /*#__PURE__*/React.createElement("div", {
88
+ className: "demo-setting-operate"
89
+ }, /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement(TableUI.Setting, {
90
+ openModifyHeader: status,
91
+ setOpenModifyHeader: function setOpenModifyHeader(e) {
92
+ return setStatus(e);
93
+ },
94
+ tableHeader: headerList,
95
+ getTableheader: function getTableheader(value) {
96
+ return setHeaderList(value);
97
+ },
98
+ scrollHeight: window.innerHeight - 400
99
+ })), /*#__PURE__*/React.createElement(TableUI, {
100
+ dataSource: dataSource,
101
+ columns: newColumns,
102
+ current: current,
103
+ pageSize: pageSize,
104
+ total: total
105
+ }));
106
+ };
107
+ export default DemoSetting;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ /** 表格组件 */
4
+ declare const TableUI: {
5
+ (props: any): React.JSX.Element;
6
+ Operate: (props: any) => React.JSX.Element;
7
+ Button: (props: any) => React.JSX.Element;
8
+ MultiLine: (props: any) => React.JSX.Element;
9
+ HideMultipleLines: (props: any) => React.JSX.Element;
10
+ Setting: (props: any) => React.JSX.Element;
11
+ };
12
+ export default TableUI;
@@ -0,0 +1,109 @@
1
+ var _excluded = ["rowKey", "dataSource", "columns", "mask", "current", "pageSize", "total", "pageSizeOptions", "simplePagination", "lastPage", "nextPage", "clickSimplePagination", "emptyText"];
2
+ 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
+ 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
+ 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; }
5
+ import { ConfigProvider, Table } from 'antd';
6
+ import zhCN from 'antd/locale/zh_CN';
7
+ import React from 'react';
8
+ import { ButtonUI, EmptyUI, IconUI } from "./..";
9
+ import "./index.scss";
10
+ import { Button as TableUI_Button } from "./material/Button";
11
+ import { HideMultipleLines as TableUI_HideMultipleLines } from "./material/HideMultipleLines";
12
+ import { MultiLine as TableUI_MultiLine } from "./material/MultiLine";
13
+ import { Operate as TableUI_Operate } from "./material/Operate";
14
+ import { Setting as TableUI_Setting } from "./material/Setting";
15
+
16
+ /** 表格组件 */
17
+ var TableUI = function TableUI(props) {
18
+ var rowKey = props.rowKey,
19
+ _props$dataSource = props.dataSource,
20
+ dataSource = _props$dataSource === void 0 ? [] : _props$dataSource,
21
+ _props$columns = props.columns,
22
+ columns = _props$columns === void 0 ? [] : _props$columns,
23
+ _props$mask = props.mask,
24
+ mask = _props$mask === void 0 ? false : _props$mask,
25
+ _props$current = props.current,
26
+ current = _props$current === void 0 ? 0 : _props$current,
27
+ _props$pageSize = props.pageSize,
28
+ pageSize = _props$pageSize === void 0 ? 0 : _props$pageSize,
29
+ _props$total = props.total,
30
+ total = _props$total === void 0 ? 0 : _props$total,
31
+ _props$pageSizeOption = props.pageSizeOptions,
32
+ pageSizeOptions = _props$pageSizeOption === void 0 ? ['20', '30', '50', '100'] : _props$pageSizeOption,
33
+ _props$simplePaginati = props.simplePagination,
34
+ simplePagination = _props$simplePaginati === void 0 ? false : _props$simplePaginati,
35
+ lastPage = props.lastPage,
36
+ nextPage = props.nextPage,
37
+ clickSimplePagination = props.clickSimplePagination,
38
+ _props$emptyText = props.emptyText,
39
+ emptyText = _props$emptyText === void 0 ? /*#__PURE__*/React.createElement(EmptyUI, null) : _props$emptyText,
40
+ otherProps = _objectWithoutProperties(props, _excluded);
41
+ return /*#__PURE__*/React.createElement("div", {
42
+ className: "".concat(mask ? 'sic-tableui-mask' : '', " sic-tableui")
43
+ }, /*#__PURE__*/React.createElement(ConfigProvider, {
44
+ locale: zhCN
45
+ }, /*#__PURE__*/React.createElement(Table, _extends({
46
+ rowKey: rowKey,
47
+ columns: columns,
48
+ dataSource: dataSource,
49
+ scroll: {
50
+ x: '100%'
51
+ },
52
+ bordered: true,
53
+ pagination: simplePagination ? false : {
54
+ position: ['bottomCenter'],
55
+ showSizeChanger: true,
56
+ showQuickJumper: true,
57
+ current: current,
58
+ pageSize: pageSize,
59
+ total: total,
60
+ showTotal: function showTotal() {
61
+ return "\u5171 ".concat(total, " \u6761");
62
+ },
63
+ defaultPageSize: pageSizeOptions[0],
64
+ pageSizeOptions: pageSizeOptions
65
+ },
66
+ locale: {
67
+ emptyText: emptyText
68
+ },
69
+ onRow: function onRow() {
70
+ return {
71
+ onClick: function onClick(e) {
72
+ var _target$parentElement;
73
+ var target = e.currentTarget;
74
+ // 移除其他行的选中样式
75
+ (_target$parentElement = target.parentElement) === null || _target$parentElement === void 0 || _target$parentElement.querySelectorAll('tr').forEach(function (row) {
76
+ row.classList.remove('sic-tableui-row-selected');
77
+ });
78
+ // 添加当前行的选中样式
79
+ target.classList.add('sic-tableui-row-selected');
80
+ }
81
+ };
82
+ }
83
+ }, otherProps)), simplePagination && /*#__PURE__*/React.createElement("div", {
84
+ className: "sic-tableui-simplePagination"
85
+ }, !!total && /*#__PURE__*/React.createElement("div", null, "\u5171 ", total, " \u6761"), /*#__PURE__*/React.createElement(ButtonUI, {
86
+ icon: /*#__PURE__*/React.createElement(IconUI, {
87
+ name: "Left"
88
+ }),
89
+ iconPosition: "start",
90
+ disabled: !lastPage,
91
+ onClick: function onClick() {
92
+ return clickSimplePagination('last');
93
+ }
94
+ }, "\u4E0A\u4E00\u9875"), /*#__PURE__*/React.createElement(ButtonUI, {
95
+ icon: /*#__PURE__*/React.createElement(IconUI, {
96
+ name: "Right"
97
+ }),
98
+ disabled: !nextPage,
99
+ onClick: function onClick() {
100
+ return clickSimplePagination('next');
101
+ }
102
+ }, "\u4E0B\u4E00\u9875"))));
103
+ };
104
+ TableUI.Operate = TableUI_Operate;
105
+ TableUI.Button = TableUI_Button;
106
+ TableUI.MultiLine = TableUI_MultiLine;
107
+ TableUI.HideMultipleLines = TableUI_HideMultipleLines;
108
+ TableUI.Setting = TableUI_Setting;
109
+ export default TableUI;
@@ -0,0 +1,40 @@
1
+ .sic-tableui {
2
+ .ant-table-thead > tr > th {
3
+ box-sizing: border-box;
4
+ padding: 12px 0;
5
+ text-align: center;
6
+ }
7
+ .ant-table-tbody {
8
+ > tr > td {
9
+ padding: 0;
10
+ font-size: 13px;
11
+ text-align: center;
12
+ }
13
+ tr.sic-tableui-row-selected td {
14
+ background-color: var(--themeColor2);
15
+ }
16
+ .ant-table-row > .ant-table-cell-row-hover {
17
+ background-color: var(--themeColor2);
18
+ }
19
+ }
20
+ .ant-table-pagination.ant-pagination {
21
+ margin: 12px auto;
22
+ }
23
+
24
+ &-mask {
25
+ height: 100%;
26
+ left: 0;
27
+ opacity: 0.3;
28
+ top: 0;
29
+ z-index: 1;
30
+ border-radius: 8px;
31
+ cursor: not-allowed;
32
+ }
33
+ &-simplePagination {
34
+ display: flex;
35
+ align-items: center;
36
+ justify-content: center;
37
+ gap: 20px;
38
+ margin: 12px auto;
39
+ }
40
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ /** 表格组件-按钮功能 */
4
+ export declare const Button: (props: any) => React.JSX.Element;
@@ -0,0 +1,20 @@
1
+ var _excluded = ["type", "icon", "children", "className", "style"];
2
+ 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
+ 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
+ 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; }
5
+ import React from 'react';
6
+ import "./index.scss";
7
+ /** 表格组件-按钮功能 */
8
+ export var Button = function Button(props) {
9
+ var _props$type = props.type,
10
+ type = _props$type === void 0 ? 'default' : _props$type,
11
+ icon = props.icon,
12
+ children = props.children,
13
+ className = props.className,
14
+ style = props.style,
15
+ otherProps = _objectWithoutProperties(props, _excluded);
16
+ return /*#__PURE__*/React.createElement("div", _extends({
17
+ className: "sic-tableui-button ".concat(!!type && "sic-tableui-button-".concat(type), " ").concat(className !== null && className !== void 0 ? className : ''),
18
+ style: style
19
+ }, otherProps), children, icon);
20
+ };
@@ -0,0 +1,35 @@
1
+ .sic-tableui-button {
2
+ box-sizing: border-box;
3
+ padding: 0 8px;
4
+ height: 28px;
5
+ font-size: 12px;
6
+ line-height: 1;
7
+ font-weight: bold;
8
+ white-space: nowrap;
9
+ border-radius: 4px;
10
+ display: inline-flex;
11
+ align-items: center;
12
+ justify-content: center;
13
+ gap: 4px;
14
+ border: 1px solid #e3e3e3;
15
+ cursor: pointer;
16
+ }
17
+ .sic-tableui-button:hover {
18
+ border-color: var(--themeColor);
19
+ color: var(--themeColor);
20
+ }
21
+ .sic-tableui-button-danger {
22
+ color: var(--red);
23
+ }
24
+ .sic-tableui-button-danger:hover {
25
+ border-color: var(--red);
26
+ color: var(--red);
27
+ }
28
+ .sic-tableui-button-disable {
29
+ color: #999;
30
+ }
31
+ .sic-tableui-button-disable:hover {
32
+ border: 1px solid #e3e3e3;
33
+ color: #999;
34
+ cursor: no-drop;
35
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ /** 表格组件-多行隐藏 */
4
+ export declare const HideMultipleLines: (props: any) => React.JSX.Element;
@@ -0,0 +1,48 @@
1
+ import { Tooltip } from 'antd';
2
+ import React from 'react';
3
+ import { ButtonUI, IconUI } from "../../..";
4
+ import "./index.scss";
5
+
6
+ /** 表格组件-多行隐藏 */
7
+ export var HideMultipleLines = function HideMultipleLines(props) {
8
+ var children = props.children,
9
+ _props$line = props.line,
10
+ line = _props$line === void 0 ? 2 : _props$line,
11
+ moreShowLine = props.moreShowLine,
12
+ className = props.className;
13
+ var moreIcon = function moreIcon() {
14
+ return /*#__PURE__*/React.createElement(Tooltip, {
15
+ placement: "right",
16
+ title: /*#__PURE__*/React.createElement("div", {
17
+ style: {
18
+ textAlign: 'center'
19
+ }
20
+ }, (children === null || children === void 0 ? void 0 : children.length) > line && children.map(function (item, index) {
21
+ return (moreShowLine && index < moreShowLine || !moreShowLine) && /*#__PURE__*/React.createElement("div", {
22
+ key: index
23
+ }, item);
24
+ }), moreShowLine && (children === null || children === void 0 ? void 0 : children.length) > moreShowLine && /*#__PURE__*/React.createElement(IconUI, {
25
+ name: "More",
26
+ theme: "filled",
27
+ size: "14",
28
+ fill: "#fff"
29
+ })),
30
+ trigger: "click"
31
+ }, (children === null || children === void 0 ? void 0 : children.length) > line && /*#__PURE__*/React.createElement(ButtonUI, {
32
+ type: "primary",
33
+ size: "small",
34
+ icon: /*#__PURE__*/React.createElement(IconUI, {
35
+ name: "Right"
36
+ })
37
+ }, "\u66F4\u591A"));
38
+ };
39
+ return /*#__PURE__*/React.createElement("div", {
40
+ className: "sic-tableui-hideMultipleLines ".concat(className)
41
+ }, /*#__PURE__*/React.createElement("div", {
42
+ className: "sic-tableui-hideMultipleLines-content"
43
+ }, (children === null || children === void 0 ? void 0 : children.length) > 0 && children.map(function (item, index) {
44
+ return index < line && /*#__PURE__*/React.createElement("div", {
45
+ key: index
46
+ }, item);
47
+ })), moreIcon());
48
+ };
@@ -0,0 +1,11 @@
1
+ .sic-tableui-hideMultipleLines {
2
+ position: relative;
3
+ width: 100%;
4
+ display: flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ font-size: 14px;
8
+ &-content {
9
+ line-height: 1.5em;
10
+ }
11
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ /** 表格组件-多行展示 */
4
+ export declare const MultiLine: (props: any) => React.JSX.Element;
@@ -0,0 +1,23 @@
1
+ var _excluded = ["children"];
2
+ 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
+ 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
+ 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; }
5
+ import React from 'react';
6
+ import { CellUI } from "../../..";
7
+ import "./index.scss";
8
+
9
+ /** 表格组件-多行展示 */
10
+ export var MultiLine = function MultiLine(props) {
11
+ var children = props.children,
12
+ otherProps = _objectWithoutProperties(props, _excluded);
13
+ return /*#__PURE__*/React.createElement("div", _extends({
14
+ className: "sic-tableui-multiLine"
15
+ }, otherProps), (children === null || children === void 0 ? void 0 : children.length) > 0 && children.map(function (item, index) {
16
+ return /*#__PURE__*/React.createElement("div", {
17
+ key: index,
18
+ className: "sic-tableui-multiLine-item"
19
+ }, /*#__PURE__*/React.createElement(CellUI, {
20
+ line: 1
21
+ }, item));
22
+ }));
23
+ };
@@ -0,0 +1,25 @@
1
+ .sic-tableui-multiLine {
2
+ width: 100%;
3
+ .ant-table-tbody > tr > td {
4
+ padding: 0;
5
+ }
6
+ &-item {
7
+ box-sizing: border-box;
8
+ width: 100%;
9
+ min-height: 35px;
10
+ border-bottom: 1px solid #f0f0f0;
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+ &-value {
15
+ width: 100%;
16
+ white-space: nowrap;
17
+ overflow: hidden;
18
+ text-overflow: ellipsis;
19
+ }
20
+ }
21
+
22
+ &-item:last-child {
23
+ border-bottom: none;
24
+ }
25
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ export declare const Operate: (props: any) => React.JSX.Element;
@@ -0,0 +1,43 @@
1
+ import { Popover } from 'antd';
2
+ import React from 'react';
3
+ import { IconUI, TextUI } from "../../..";
4
+ import "./index.scss";
5
+ export var Operate = function Operate(props) {
6
+ var child = props.child,
7
+ _props$maxCount = props.maxCount,
8
+ maxCount = _props$maxCount === void 0 ? 2 : _props$maxCount;
9
+ // 渲染默认展示的标签
10
+ var renderItem = function renderItem(childrenArray) {
11
+ return childrenArray.slice(0, maxCount).map(function (item, index) {
12
+ return /*#__PURE__*/React.createElement("div", {
13
+ className: "sicTableuiOperate-item",
14
+ key: index
15
+ }, item, index < maxCount - 1 && index < (childrenArray === null || childrenArray === void 0 ? void 0 : childrenArray.length) - 1 && /*#__PURE__*/React.createElement("div", {
16
+ className: "sicTableuiOperate-item-divider"
17
+ }, "|"));
18
+ });
19
+ };
20
+ // 渲染默认隐藏的标签
21
+ var renderPopoverContent = function renderPopoverContent(childrenArray) {
22
+ return childrenArray.slice(maxCount).map(function (item, index) {
23
+ return /*#__PURE__*/React.createElement("div", {
24
+ key: index
25
+ }, item);
26
+ });
27
+ };
28
+ var renderChildren = function renderChildren() {
29
+ var childrenArray = React.Children.toArray(child().props.children);
30
+ return /*#__PURE__*/React.createElement(React.Fragment, null, renderItem(childrenArray), (childrenArray === null || childrenArray === void 0 ? void 0 : childrenArray.length) > maxCount && /*#__PURE__*/React.createElement(Popover, {
31
+ rootClassName: "sicTableuiOperate-popover",
32
+ trigger: "click",
33
+ placement: "bottom",
34
+ content: renderPopoverContent(childrenArray)
35
+ }, /*#__PURE__*/React.createElement(IconUI, {
36
+ className: "sicTableuiOperate-more",
37
+ name: "More"
38
+ })), (childrenArray === null || childrenArray === void 0 ? void 0 : childrenArray.length) === 0 && /*#__PURE__*/React.createElement(TextUI, null, " - "));
39
+ };
40
+ return /*#__PURE__*/React.createElement("div", {
41
+ className: "sicTableuiOperate"
42
+ }, renderChildren());
43
+ };
@@ -0,0 +1,25 @@
1
+ .sicTableuiOperate {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ white-space: nowrap;
6
+ &-item {
7
+ display: flex;
8
+ align-items: center;
9
+ &-divider {
10
+ box-sizing: border-box;
11
+ padding: 0 6px;
12
+ color: #ccc;
13
+ }
14
+ }
15
+ &-more {
16
+ box-sizing: border-box;
17
+ padding-left: 6px;
18
+ color: #7e7e7e;
19
+ font-size: 18px;
20
+ cursor: pointer;
21
+ }
22
+ }
23
+ .sicTableuiOperate-popover .ant-popover-inner {
24
+ padding: 6px 8px;
25
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ export declare const Setting: (props: any) => React.JSX.Element;