@aloudata/aloudata-design 1.9.7 → 1.9.10

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 (198) hide show
  1. package/dist/AldTable/helper.js +14 -21
  2. package/dist/AldTable/index.d.ts +2 -2
  3. package/dist/AldTable/index.js +38 -49
  4. package/dist/AldTable/style/index.less +4 -0
  5. package/dist/AldTable/types.d.ts +2 -1
  6. package/dist/App/index.js +2 -9
  7. package/dist/Avatar/component/Avatar/avatar.d.ts +2 -2
  8. package/dist/Avatar/component/Avatar/avatar.js +0 -2
  9. package/dist/Avatar/component/Avatar/index.d.ts +1 -1
  10. package/dist/Avatar/component/Avatar/index.js +6 -20
  11. package/dist/Breadcrumb/index.d.ts +1 -1
  12. package/dist/Breadcrumb/index.js +6 -16
  13. package/dist/Button/index.d.ts +4 -4
  14. package/dist/Button/index.js +21 -41
  15. package/dist/Checkbox/component/CheckboxGroup/index.d.ts +2 -2
  16. package/dist/Checkbox/component/CheckboxGroup/index.js +4 -10
  17. package/dist/Checkbox/index.d.ts +3 -3
  18. package/dist/Checkbox/index.js +5 -14
  19. package/dist/Checkbox/type.js +3 -4
  20. package/dist/ColorPicker/constant.js +2 -1
  21. package/dist/ColorPicker/index.d.ts +1 -1
  22. package/dist/ColorPicker/index.js +15 -42
  23. package/dist/ConfigProvider/defaultRenderEmpty.d.ts +1 -1
  24. package/dist/ConfigProvider/defaultRenderEmpty.js +0 -5
  25. package/dist/ConfigProvider/getUserList.d.ts +4 -4
  26. package/dist/ConfigProvider/getUserList.js +2 -2
  27. package/dist/ConfigProvider/hooks/useGetUserList.js +2 -5
  28. package/dist/ConfigProvider/index.js +2 -6
  29. package/dist/ConfigProvider/sizeContext.d.ts +1 -1
  30. package/dist/ConfigProvider/sizeContext.js +1 -1
  31. package/dist/DataPreviewTable/components/Body/Cell.d.ts +1 -1
  32. package/dist/DataPreviewTable/components/Body/Cell.js +4 -10
  33. package/dist/DataPreviewTable/components/Body/Error.d.ts +1 -1
  34. package/dist/DataPreviewTable/components/Body/Error.js +3 -5
  35. package/dist/DataPreviewTable/components/Body/SkeletonBody.d.ts +1 -1
  36. package/dist/DataPreviewTable/components/Body/SkeletonBody.js +10 -19
  37. package/dist/DataPreviewTable/components/Body/index.d.ts +1 -1
  38. package/dist/DataPreviewTable/components/Body/index.js +10 -19
  39. package/dist/DataPreviewTable/components/DragBar/index.d.ts +1 -1
  40. package/dist/DataPreviewTable/components/DragBar/index.js +14 -24
  41. package/dist/DataPreviewTable/components/Header/index.d.ts +2 -2
  42. package/dist/DataPreviewTable/components/Header/index.js +7 -15
  43. package/dist/DataPreviewTable/hooks/useDirection.js +32 -57
  44. package/dist/DataPreviewTable/index.js +22 -29
  45. package/dist/DataPreviewTable/interface.d.ts +2 -2
  46. package/dist/DataPreviewTable/interface.js +6 -9
  47. package/dist/DataPreviewTable/utils/findRange.js +2 -20
  48. package/dist/DataPreviewTable/utils/getColumnRange.js +3 -7
  49. package/dist/DataPreviewTable/utils/getRowRange.js +2 -8
  50. package/dist/DataPreviewTable/utils/getTableLayout.js +0 -1
  51. package/dist/DatePicker/index.d.ts +11 -11
  52. package/dist/DatePicker/index.js +85 -116
  53. package/dist/Divider/index.d.ts +1 -1
  54. package/dist/Divider/index.js +0 -3
  55. package/dist/DoubleCircleIcon/index.d.ts +2 -2
  56. package/dist/DoubleCircleIcon/index.js +7 -9
  57. package/dist/Dropdown/Button.d.ts +2 -2
  58. package/dist/Dropdown/Button.js +7 -11
  59. package/dist/Dropdown/index.d.ts +4 -4
  60. package/dist/Dropdown/index.js +11 -21
  61. package/dist/Dropdown/style/index.less +5 -0
  62. package/dist/Empty/image/Data.d.ts +2 -2
  63. package/dist/Empty/image/Data.js +0 -2
  64. package/dist/Empty/image/Search.d.ts +2 -2
  65. package/dist/Empty/image/Search.js +0 -2
  66. package/dist/Empty/image/SearchSmall.d.ts +2 -2
  67. package/dist/Empty/image/SearchSmall.js +0 -2
  68. package/dist/Empty/image/User.d.ts +2 -2
  69. package/dist/Empty/image/User.js +0 -2
  70. package/dist/Empty/image/WorkBook.d.ts +2 -2
  71. package/dist/Empty/image/WorkBook.js +0 -2
  72. package/dist/Empty/index.d.ts +1 -1
  73. package/dist/Empty/index.js +13 -23
  74. package/dist/Form/index.d.ts +4 -4
  75. package/dist/Form/index.js +16 -27
  76. package/dist/Icon/components/AlertTriangleDuotone.d.ts +1 -1
  77. package/dist/Icon/components/AlertTriangleDuotone.js +4 -11
  78. package/dist/Icon/components/CancelCircleDuotone.d.ts +1 -1
  79. package/dist/Icon/components/CancelCircleDuotone.js +9 -16
  80. package/dist/Icon/components/CheckCircleDuotone.d.ts +1 -1
  81. package/dist/Icon/components/CheckCircleDuotone.js +4 -11
  82. package/dist/Icon/components/Icon.d.ts +1 -1
  83. package/dist/Icon/components/Icon.js +9 -13
  84. package/dist/Icon/components/InfoCircleLine.d.ts +1 -1
  85. package/dist/Icon/components/InfoCircleLine.js +4 -11
  86. package/dist/Icon/components/createFromScripts.js +2 -8
  87. package/dist/IconButton/index.js +36 -57
  88. package/dist/IconButton/style/index.less +4 -0
  89. package/dist/Input/components/Group/index.d.ts +2 -2
  90. package/dist/Input/components/Group/index.js +4 -9
  91. package/dist/Input/components/Input/index.d.ts +2 -2
  92. package/dist/Input/components/Input/index.js +9 -17
  93. package/dist/Input/components/Password/index.js +4 -9
  94. package/dist/Input/components/TextArea/index.js +5 -10
  95. package/dist/InputNumber/index.d.ts +2 -2
  96. package/dist/InputNumber/index.js +13 -20
  97. package/dist/MemberPicker/components/MemberSelection.d.ts +2 -2
  98. package/dist/MemberPicker/components/MemberSelection.js +12 -20
  99. package/dist/MemberPicker/components/MultipleOption.d.ts +2 -2
  100. package/dist/MemberPicker/components/MultipleOption.js +8 -9
  101. package/dist/MemberPicker/components/NickLabel.js +2 -4
  102. package/dist/MemberPicker/components/Panel.d.ts +2 -2
  103. package/dist/MemberPicker/components/Panel.js +14 -25
  104. package/dist/MemberPicker/components/SelectedMemberTags.d.ts +2 -2
  105. package/dist/MemberPicker/components/SelectedMemberTags.js +2 -4
  106. package/dist/MemberPicker/components/SelectorFooter.d.ts +2 -2
  107. package/dist/MemberPicker/components/SingleOption.d.ts +2 -2
  108. package/dist/MemberPicker/components/SingleOption.js +9 -10
  109. package/dist/MemberPicker/index.js +46 -79
  110. package/dist/MemberPicker/interface.d.ts +2 -2
  111. package/dist/MemberPicker/utils/getUsersWithUserId.js +0 -1
  112. package/dist/Menu/Divider.d.ts +3 -3
  113. package/dist/Menu/MenuItem.d.ts +1 -1
  114. package/dist/Menu/SubMenu.d.ts +1 -1
  115. package/dist/Menu/SubMenu.js +1 -6
  116. package/dist/Menu/index.d.ts +2 -2
  117. package/dist/Menu/index.js +7 -16
  118. package/dist/Menu/style/dropdown.less +4 -2
  119. package/dist/Modal/index.d.ts +4 -4
  120. package/dist/Modal/index.js +108 -130
  121. package/dist/Modal/locale.js +4 -6
  122. package/dist/Navigator/components/Header/index.d.ts +2 -2
  123. package/dist/Navigator/components/Header/index.js +0 -2
  124. package/dist/Navigator/components/Menu/index.d.ts +2 -2
  125. package/dist/Navigator/components/Menu/index.js +8 -19
  126. package/dist/Navigator/components/MenuItem/index.d.ts +1 -1
  127. package/dist/Navigator/components/MenuItem/index.js +6 -9
  128. package/dist/Navigator/index.d.ts +1 -1
  129. package/dist/Navigator/index.js +5 -7
  130. package/dist/Pagination/index.d.ts +3 -3
  131. package/dist/Pagination/index.js +18 -43
  132. package/dist/Popconfirm/index.d.ts +2 -2
  133. package/dist/Popconfirm/index.js +19 -27
  134. package/dist/Popover/index.d.ts +2 -2
  135. package/dist/Popover/index.js +2 -9
  136. package/dist/Progress/index.js +21 -33
  137. package/dist/Radio/components/Group/index.d.ts +1 -1
  138. package/dist/Radio/components/Group/index.js +27 -36
  139. package/dist/Radio/components/Radio/index.d.ts +2 -2
  140. package/dist/Radio/components/Radio/index.js +10 -18
  141. package/dist/Radio/interface/radioGroup.d.ts +3 -3
  142. package/dist/Result/index.d.ts +7 -7
  143. package/dist/Result/index.js +17 -26
  144. package/dist/Result/noFound.js +0 -3
  145. package/dist/Result/serverError.js +0 -3
  146. package/dist/Result/unauthorized.js +1 -4
  147. package/dist/ScrollArea/index.js +6 -13
  148. package/dist/Select/components/MultipleOption.d.ts +2 -2
  149. package/dist/Select/components/MultipleOption.js +4 -8
  150. package/dist/Select/components/SingleOption.d.ts +2 -2
  151. package/dist/Select/components/SingleOption.js +5 -9
  152. package/dist/Select/index.d.ts +2 -2
  153. package/dist/Select/index.js +66 -134
  154. package/dist/Spin/CustomIcon/index.d.ts +2 -2
  155. package/dist/Spin/CustomIcon/index.js +0 -2
  156. package/dist/Spin/Icon/index.d.ts +2 -2
  157. package/dist/Spin/index.d.ts +2 -2
  158. package/dist/Spin/index.js +1 -10
  159. package/dist/Steps/components/ProcessIcon/index.d.ts +2 -2
  160. package/dist/Steps/components/ProcessIcon/index.js +0 -2
  161. package/dist/Steps/components/Step/index.d.ts +3 -3
  162. package/dist/Steps/components/Step/index.js +2 -8
  163. package/dist/Steps/index.d.ts +3 -3
  164. package/dist/Steps/index.js +8 -10
  165. package/dist/Switch/index.js +17 -30
  166. package/dist/Table/Table.js +88 -131
  167. package/dist/Table/components/Empty/index.d.ts +2 -2
  168. package/dist/Table/components/Empty/index.js +0 -2
  169. package/dist/Table/components/Loading/index.d.ts +2 -2
  170. package/dist/Table/components/Loading/index.js +0 -2
  171. package/dist/Table/components/TableBodyRowList/index.d.ts +2 -2
  172. package/dist/Table/components/TableBodyRowList/index.js +19 -39
  173. package/dist/Table/components/TableHead/index.d.ts +1 -1
  174. package/dist/Table/components/TableHead/index.js +56 -82
  175. package/dist/Table/hooks/useFrame.d.ts +1 -1
  176. package/dist/Table/hooks/useFrame.js +9 -24
  177. package/dist/Table/interface.d.ts +1 -1
  178. package/dist/Table/utils.js +8 -28
  179. package/dist/Tabs/TabPane.d.ts +2 -2
  180. package/dist/Tabs/index.d.ts +2 -2
  181. package/dist/Tabs/index.js +18 -33
  182. package/dist/Tooltip/index.d.ts +2 -2
  183. package/dist/Tooltip/index.js +12 -12
  184. package/dist/Tree/demo/basic/index.d.ts +2 -2
  185. package/dist/Tree/index.d.ts +1 -1
  186. package/dist/Tree/index.js +2 -4
  187. package/dist/_utils/hooks/useControlledState.js +9 -21
  188. package/dist/_utils/hooks/useId.js +4 -5
  189. package/dist/_utils/hooks/usePrefixCls.js +2 -5
  190. package/dist/index.js +3 -1
  191. package/dist/locale-provider/context.d.ts +1 -1
  192. package/dist/locale-provider/index.d.ts +1 -1
  193. package/dist/locale-provider/index.js +8 -33
  194. package/dist/message/index.js +3 -7
  195. package/dist/notification/demo/index.d.ts +2 -2
  196. package/dist/notification/demo/index.js +0 -1
  197. package/dist/notification/index.js +23 -32
  198. package/package.json +1 -1
@@ -2,8 +2,8 @@ import _ from 'lodash';
2
2
  import React from 'react';
3
3
  export function getTableColumns(_ref) {
4
4
  var columns = _ref.columns,
5
- columnSizing = _ref.columnSizing,
6
- totalWidth = _ref.totalWidth;
5
+ columnSizing = _ref.columnSizing,
6
+ totalWidth = _ref.totalWidth;
7
7
  var columnWidths = getColumnWidths(columns, columnSizing, totalWidth);
8
8
  return _.map(columns, function (col, index) {
9
9
  return {
@@ -15,9 +15,7 @@ export function getTableColumns(_ref) {
15
15
  }, col.title) : col.title,
16
16
  Cell: function Cell(_ref2) {
17
17
  var row = _ref2.row;
18
-
19
18
  var colValue = _.get(row.original, col.dataIndex || '');
20
-
21
19
  var node = col.render ? col.render(colValue, row.original, row.index) : colValue;
22
20
  return /*#__PURE__*/React.createElement("div", {
23
21
  className: prefixCls('td-default')
@@ -29,6 +27,7 @@ export function getTableColumns(_ref) {
29
27
  };
30
28
  });
31
29
  }
30
+
32
31
  /**
33
32
  * 计算
34
33
  * @param columns
@@ -36,29 +35,23 @@ export function getTableColumns(_ref) {
36
35
  * @param totalWidth
37
36
  * @returns
38
37
  */
39
-
40
38
  export function getColumnWidths(columns, columnSizing, totalWidth) {
41
39
  // 可改变列宽情况,react-table 可拖动列宽要求列宽值必须是数字,因为将百分比列宽转换为数字
42
- var DEFAULT_WIDTH = 150; // 计算出每个列的具体宽度值
43
-
40
+ var DEFAULT_WIDTH = 150;
41
+ // 计算出每个列的具体宽度值
44
42
  var columnWidths = _.map(columns, function (col) {
45
43
  var width = col.width;
46
-
47
44
  if (typeof width === 'number') {
48
45
  return width;
49
46
  }
50
-
51
47
  if (typeof width === 'string' && isPercentage(width)) {
52
48
  var widthNum = getNumberFromPercentageStr(width);
53
49
  return widthNum * totalWidth / 100;
54
50
  }
55
-
56
51
  return DEFAULT_WIDTH;
57
52
  });
58
-
59
- var totalColumnWidth = _.sum(columnWidths); // 如果实际宽度大于列总宽度之和,则将多余的宽度按列宽的比例分配给各个列
60
-
61
-
53
+ var totalColumnWidth = _.sum(columnWidths);
54
+ // 如果实际宽度大于列总宽度之和,则将多余的宽度按列宽的比例分配给各个列
62
55
  if (totalWidth !== totalColumnWidth) {
63
56
  // 如果实际宽度大于或小于列总宽度之和,则将差额的宽度按列宽的比例分配给各个列
64
57
  var widthDiff = totalWidth - totalColumnWidth;
@@ -67,31 +60,31 @@ export function getColumnWidths(columns, columnSizing, totalWidth) {
67
60
  });
68
61
  var newColumnWidths = columnWidths.map(function (width, index) {
69
62
  return width + widthDiff * widthRatios[index];
70
- }); // 计算新的列宽度总和
71
-
72
- var newTotalColumnWidth = _.sum(newColumnWidths); // 计算并处理可能存在的误差
63
+ });
73
64
 
65
+ // 计算新的列宽度总和
66
+ var newTotalColumnWidth = _.sum(newColumnWidths);
74
67
 
75
- var errorWidth = totalWidth - newTotalColumnWidth; // 将误差加到最后一个列宽上
68
+ // 计算并处理可能存在的误差
69
+ var errorWidth = totalWidth - newTotalColumnWidth;
76
70
 
71
+ // 将误差加到最后一个列宽上
77
72
  newColumnWidths[newColumnWidths.length - 1] += errorWidth;
78
73
  return newColumnWidths;
79
74
  } else {
80
75
  return columnWidths;
81
76
  }
82
77
  }
83
-
84
78
  function getNumberFromPercentageStr(str) {
85
79
  var numberStr = str.replace('%', '');
86
80
  return parseFloat(numberStr);
87
81
  }
82
+
88
83
  /**
89
84
  * 判断是否百分比字符串
90
85
  * @param str
91
86
  * @returns
92
87
  */
93
-
94
-
95
88
  export function isPercentage(str) {
96
89
  var regex = /^100(\.\d+)?%?$|^\d{1,2}(\.\d+)?%$/;
97
90
  return regex.test(str);
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { ITableProps } from './types';
3
- declare function AldTable<TDataItem extends object>(props: ITableProps<TDataItem>): JSX.Element;
3
+ declare function AldTable<TDataItem extends object>(props: ITableProps<TDataItem>): React.JSX.Element;
4
4
  export default AldTable;
@@ -1,19 +1,14 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1
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); }
2
-
3
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
-
3
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
5
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
5
6
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
-
7
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."); }
8
-
9
8
  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); }
10
-
11
- 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; }
12
-
13
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
14
-
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; }
10
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
15
11
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
-
17
12
  import classnames from 'classnames';
18
13
  import _ from 'lodash';
19
14
  import ResizeObserver from 'rc-resize-observer';
@@ -23,56 +18,49 @@ import { Empty, Pagination, ScrollArea, Spin } from '..';
23
18
  import { getTableColumns, prefixCls } from "./helper";
24
19
  // 32 行高 + 1 底线高度
25
20
  var HEADER_HEIGHT = 33;
26
-
27
21
  function AldTable(props) {
28
22
  var columns = props.columns,
29
- data = props.data,
30
- rowKey = props.rowKey,
31
- columnSizing = props.columnSizing,
32
- sticky = props.sticky,
33
- loading = props.loading,
34
- pagination = props.pagination,
35
- _props$scroll = props.scroll,
36
- scroll = _props$scroll === void 0 ? {} : _props$scroll;
37
-
23
+ data = props.data,
24
+ rowKey = props.rowKey,
25
+ columnSizing = props.columnSizing,
26
+ sticky = props.sticky,
27
+ loading = props.loading,
28
+ pagination = props.pagination,
29
+ _props$scroll = props.scroll,
30
+ scroll = _props$scroll === void 0 ? {} : _props$scroll,
31
+ emptyComponent = props.empty;
38
32
  var _useState = useState(null),
39
- _useState2 = _slicedToArray(_useState, 2),
40
- totalSize = _useState2[0],
41
- setTotalSize = _useState2[1];
42
-
33
+ _useState2 = _slicedToArray(_useState, 2),
34
+ totalSize = _useState2[0],
35
+ setTotalSize = _useState2[1];
43
36
  var tableColumns = useMemo(function () {
44
37
  if (!totalSize) {
45
38
  return [];
46
39
  }
47
-
48
40
  return getTableColumns({
49
41
  columns: columns,
50
42
  columnSizing: !!columnSizing,
51
43
  totalWidth: totalSize.width
52
44
  });
53
45
  }, [columns, totalSize, columnSizing]);
54
-
55
46
  var _useTable = useTable({
56
- columns: tableColumns,
57
- data: data,
58
- getRowId: function getRowId(row, index) {
59
- var rowKeyStr = index;
60
-
61
- if (typeof rowKey === 'function') {
62
- rowKeyStr = rowKey(row);
63
- } else if (rowKey !== undefined) {
64
- rowKeyStr = _.get(row, rowKey, index);
47
+ columns: tableColumns,
48
+ data: data,
49
+ getRowId: function getRowId(row, index) {
50
+ var rowKeyStr = index;
51
+ if (typeof rowKey === 'function') {
52
+ rowKeyStr = rowKey(row);
53
+ } else if (rowKey !== undefined) {
54
+ rowKeyStr = _.get(row, rowKey, index);
55
+ }
56
+ return _.toString(rowKeyStr);
65
57
  }
66
-
67
- return _.toString(rowKeyStr);
68
- }
69
- }, useBlockLayout, useResizeColumns),
70
- getTableProps = _useTable.getTableProps,
71
- getTableBodyProps = _useTable.getTableBodyProps,
72
- rows = _useTable.rows,
73
- prepareRow = _useTable.prepareRow,
74
- headerGroups = _useTable.headerGroups;
75
-
58
+ }, useBlockLayout, useResizeColumns),
59
+ getTableProps = _useTable.getTableProps,
60
+ getTableBodyProps = _useTable.getTableBodyProps,
61
+ rows = _useTable.rows,
62
+ prepareRow = _useTable.prepareRow,
63
+ headerGroups = _useTable.headerGroups;
76
64
  var y = scroll.y;
77
65
  var tableProps = useMemo(function () {
78
66
  return getTableProps({});
@@ -105,10 +93,12 @@ function AldTable(props) {
105
93
  tip: "Loading..."
106
94
  }, /*#__PURE__*/React.createElement("div", {
107
95
  className: prefixCls('body')
108
- }, rows.length === 0 && !loading ? /*#__PURE__*/React.createElement(Empty, {
96
+ }, rows.length === 0 && !loading ? emptyComponent || /*#__PURE__*/React.createElement("div", {
97
+ className: prefixCls('empty')
98
+ }, /*#__PURE__*/React.createElement(Empty, {
109
99
  title: "No Data",
110
100
  image: Empty.PRESENTED_IMAGE_SEARCH
111
- }) : _.map(rows, function (row) {
101
+ })) : _.map(rows, function (row) {
112
102
  prepareRow(row);
113
103
  return /*#__PURE__*/React.createElement("div", _extends({
114
104
  className: prefixCls('tr')
@@ -149,5 +139,4 @@ function AldTable(props) {
149
139
  className: prefixCls('pagination')
150
140
  }, /*#__PURE__*/React.createElement(Pagination, pagination)));
151
141
  }
152
-
153
142
  export default AldTable;
@@ -108,3 +108,7 @@
108
108
  .ald-tmp-table-body-scroll {
109
109
  overflow: auto;
110
110
  }
111
+
112
+ .ald-tmp-table-empty {
113
+ margin-top: 80px;
114
+ }
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { IPaginationProps } from '../Pagination/types';
3
3
  export interface ITableProps<TDataItem extends object> {
4
4
  columns: ITableColumn<TDataItem>[];
@@ -14,6 +14,7 @@ export interface ITableProps<TDataItem extends object> {
14
14
  y?: number | string;
15
15
  };
16
16
  pagination?: IPaginationProps;
17
+ empty?: React.ReactNode;
17
18
  }
18
19
  export interface ITableColumn<TDataItem = unknown> {
19
20
  title: string | React.ReactNode;
package/dist/App/index.js CHANGED
@@ -1,21 +1,15 @@
1
1
  var _excluded = ["children", "className"];
2
-
3
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); }
4
-
5
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; }
6
-
7
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; }
8
-
9
5
  import { legacyLogicalPropertiesTransformer, StyleProvider } from '@ant-design/cssinjs';
10
6
  import { App, ConfigProvider } from 'antd';
11
7
  import classNames from 'classnames';
12
8
  import React from 'react';
13
-
14
9
  var AldApp = function AldApp(_ref) {
15
10
  var children = _ref.children,
16
- className = _ref.className,
17
- restProps = _objectWithoutProperties(_ref, _excluded);
18
-
11
+ className = _ref.className,
12
+ restProps = _objectWithoutProperties(_ref, _excluded);
19
13
  return /*#__PURE__*/React.createElement(StyleProvider, {
20
14
  hashPriority: "high",
21
15
  transformers: [legacyLogicalPropertiesTransformer]
@@ -29,5 +23,4 @@ var AldApp = function AldApp(_ref) {
29
23
  }
30
24
  }, children)));
31
25
  };
32
-
33
26
  export default AldApp;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- declare const SearchSmall: () => JSX.Element;
1
+ import * as React from 'react';
2
+ declare const SearchSmall: () => React.JSX.Element;
3
3
  export default SearchSmall;
@@ -1,5 +1,4 @@
1
1
  import * as React from 'react';
2
-
3
2
  var SearchSmall = function SearchSmall() {
4
3
  return /*#__PURE__*/React.createElement("svg", {
5
4
  version: "1.1",
@@ -21,5 +20,4 @@ var SearchSmall = function SearchSmall() {
21
20
  d: "M63,45.8c1.7-2.6,2.6-5.6,2.6-8.7c0-4.1-1.6-8.1-4.6-11c-2.9-2.9-6.9-4.6-11-4.6c-3.1,0-6.1,0.9-8.7,2.6 s-4.6,4.2-5.8,7c-1.2,2.9-1.5,6-0.9,9c0.6,3,2.1,5.8,4.3,8c2.2,2.2,5,3.7,8,4.3c3,0.6,6.2,0.3,9-0.9C58.8,50.4,61.3,48.4,63,45.8z M50,93.8c13.4,0,25.4-6,33.4-15.5C75.6,68.4,63.5,62.1,50,62.1c-13.5,0-25.6,6.3-33.4,16.2C24.6,87.7,36.6,93.8,50,93.8z"
22
21
  }));
23
22
  };
24
-
25
23
  export default SearchSmall;
@@ -2,7 +2,7 @@ import { AvatarProps as antdAvatarProps } from 'antd/lib/avatar/avatar';
2
2
  import Group from 'antd/lib/avatar/group';
3
3
  import * as React from 'react';
4
4
  export type { GroupProps } from 'antd/lib/avatar/group';
5
- declare type TSize = 'large' | 'middle' | 'small' | number;
5
+ type TSize = 'large' | 'middle' | 'small' | number;
6
6
  export interface IAvatarProps extends Omit<antdAvatarProps, 'size'> {
7
7
  /**
8
8
  * @description 指定头像的形状
@@ -1,53 +1,40 @@
1
1
  var _excluded = ["size", "showFullValue", "children", "src"];
2
-
3
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); }
4
-
5
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; }
6
-
7
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; }
8
-
9
5
  import InternalAvatar from 'antd/lib/avatar/avatar';
10
6
  import classNames from 'classnames';
11
7
  import * as React from 'react';
12
8
  import DefaultAvatar from "./avatar";
13
9
  var ZERO = 0;
14
-
15
10
  var Avatar = function Avatar(props) {
16
11
  var _props$size = props.size,
17
- size = _props$size === void 0 ? 'middle' : _props$size,
18
- _props$showFullValue = props.showFullValue,
19
- showFullValue = _props$showFullValue === void 0 ? false : _props$showFullValue,
20
- children = props.children,
21
- src = props.src,
22
- restProps = _objectWithoutProperties(props, _excluded);
23
-
12
+ size = _props$size === void 0 ? 'middle' : _props$size,
13
+ _props$showFullValue = props.showFullValue,
14
+ showFullValue = _props$showFullValue === void 0 ? false : _props$showFullValue,
15
+ children = props.children,
16
+ src = props.src,
17
+ restProps = _objectWithoutProperties(props, _excluded);
24
18
  var getSizeClass = function getSizeClass(avatarSize) {
25
19
  var defaultAvatarClassName = '';
26
-
27
20
  if (typeof src === 'undefined' && typeof children === 'undefined') {
28
21
  defaultAvatarClassName = 'ald-avatar-default';
29
22
  }
30
-
31
23
  if (['large', 'small', 'mini'].includes("".concat(avatarSize))) {
32
24
  return classNames('ald-avatar', defaultAvatarClassName, "ald-avatar-".concat(avatarSize));
33
25
  }
34
-
35
26
  return classNames('ald-avatar', defaultAvatarClassName, 'ald-avatar-middle');
36
27
  };
37
-
38
28
  var getChildren = function getChildren() {
39
29
  if (!showFullValue && typeof children === 'string') {
40
30
  return children[ZERO].toLocaleUpperCase();
41
31
  }
42
-
43
32
  return children;
44
33
  };
45
-
46
34
  var defaultSrc = React.useMemo(function () {
47
35
  if (typeof src === 'undefined' && typeof children === 'undefined') {
48
36
  return /*#__PURE__*/React.createElement(DefaultAvatar, null);
49
37
  }
50
-
51
38
  return src;
52
39
  }, [src, children]);
53
40
  return /*#__PURE__*/React.createElement(InternalAvatar, _extends({
@@ -56,5 +43,4 @@ var Avatar = function Avatar(props) {
56
43
  src: defaultSrc
57
44
  }, restProps), getChildren());
58
45
  };
59
-
60
46
  export default Avatar;
@@ -5,7 +5,7 @@ interface IBreadcrumbItemInterface extends React.FC<BreadcrumbItemProps> {
5
5
  __ANT_BREADCRUMB_ITEM: boolean;
6
6
  }
7
7
  declare const Breadcrumb: {
8
- (props: BreadcrumbProps): JSX.Element;
8
+ (props: BreadcrumbProps): React.JSX.Element;
9
9
  Item: IBreadcrumbItemInterface;
10
10
  };
11
11
  export default Breadcrumb;
@@ -1,47 +1,37 @@
1
1
  var _excluded = ["className", "separator"],
2
- _excluded2 = ["className"];
3
-
2
+ _excluded2 = ["className"];
4
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); }
5
-
6
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; }
7
-
8
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; }
9
-
10
6
  import React from 'react';
11
7
  import { Breadcrumb as AntdBreadcrumb } from 'antd';
12
8
  import classNames from 'classnames';
13
-
14
9
  var Breadcrumb = function Breadcrumb(props) {
15
10
  var className = props.className,
16
- separator = props.separator,
17
- restProps = _objectWithoutProperties(props, _excluded);
18
-
11
+ separator = props.separator,
12
+ restProps = _objectWithoutProperties(props, _excluded);
19
13
  var getSeparator = function getSeparator() {
20
14
  if (separator === null) {
21
15
  return separator;
22
16
  }
23
-
24
17
  return separator || /*#__PURE__*/React.createElement("span", {
25
18
  className: "default-separator"
26
19
  });
27
20
  };
28
-
29
21
  return /*#__PURE__*/React.createElement(AntdBreadcrumb, _extends({}, restProps, {
30
22
  separator: getSeparator(),
31
23
  className: classNames('ald-breadcrumb', className)
32
24
  }));
33
25
  };
34
-
35
26
  var BreadcrumbItem = function BreadcrumbItem(props) {
36
27
  var className = props.className,
37
- restProps = _objectWithoutProperties(props, _excluded2);
38
-
28
+ restProps = _objectWithoutProperties(props, _excluded2);
39
29
  return /*#__PURE__*/React.createElement(AntdBreadcrumb.Item, _extends({}, restProps, {
40
30
  className: classNames('ald-breadcrumb-item', className)
41
31
  }));
42
- }; // eslint-disable-next-line no-underscore-dangle
43
-
32
+ };
44
33
 
34
+ // eslint-disable-next-line no-underscore-dangle
45
35
  BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
46
36
  Breadcrumb.Item = BreadcrumbItem;
47
37
  export default Breadcrumb;
@@ -1,8 +1,8 @@
1
1
  import type { ButtonProps as AntdButtonProps, ButtonType as AntdButtonType } from 'antd/lib/button';
2
2
  import React from 'react';
3
3
  export declare const btnPrefix = "ald-btn";
4
- export declare type ButtonType = 'primary' | 'secondary' | 'dangerous' | 'text' | 'link';
5
- export declare type Size = 'small' | 'middle' | 'large';
4
+ export type ButtonType = 'primary' | 'secondary' | 'dangerous' | 'text' | 'link';
5
+ export type Size = 'small' | 'middle' | 'large';
6
6
  export interface IButtonProps extends Omit<AntdButtonProps, 'type' | 'dangerous' | 'shape' | 'icon' | 'href' | 'target' | 'onClick' | 'loading'> {
7
7
  /**
8
8
  * @description 类型
@@ -53,6 +53,6 @@ export declare function getIconSize(ButtonSize: Size): number;
53
53
  export declare function getShape(ButtonShape: 'circle' | 'default'): 'circle' | 'default';
54
54
  export declare const setIcon: (iconNode: React.ReactElement, size: Size, loading: boolean | {
55
55
  delay?: number | undefined;
56
- }) => JSX.Element;
57
- declare function Button(props: IButtonProps): JSX.Element;
56
+ }) => React.JSX.Element;
57
+ declare function Button(props: IButtonProps): React.JSX.Element;
58
58
  export default Button;
@@ -1,17 +1,13 @@
1
1
  var _excluded = ["type", "size", "shape", "loading", "disabled", "icon", "className", "prefixCls"];
2
-
2
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
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); }
4
-
5
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; }
6
-
7
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
-
9
6
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
10
-
11
7
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
12
-
13
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14
-
8
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
15
11
  import { LoadingLine } from '@aloudata/icons-react';
16
12
  import { Button as AntdButton } from 'antd';
17
13
  import { useCompactItemContext } from 'antd/lib/space/Compact';
@@ -27,22 +23,18 @@ export function getButtonType(buttonType) {
27
23
  if (!['primary', 'secondary', 'dangerous', 'text', 'link'].includes(buttonType)) {
28
24
  return 'default';
29
25
  }
30
-
31
26
  if (buttonType === 'dangerous') {
32
27
  return 'primary';
33
28
  }
34
-
35
29
  if (buttonType === 'secondary') {
36
30
  return 'default';
37
31
  }
38
-
39
32
  return buttonType;
40
33
  }
41
34
  export function getDangerStatus(buttonType) {
42
35
  if (buttonType === 'dangerous') {
43
36
  return true;
44
37
  }
45
-
46
38
  return false;
47
39
  }
48
40
  export function getButtonSizeClass(ButtonSize) {
@@ -52,18 +44,15 @@ export function getIconSize(ButtonSize) {
52
44
  if (ButtonSize === 'large') {
53
45
  return ICON_LARGE;
54
46
  }
55
-
56
47
  if (ButtonSize === 'small') {
57
48
  return ICON_SMALL;
58
49
  }
59
-
60
50
  return ICON_MIDDLE;
61
51
  }
62
52
  export function getShape(ButtonShape) {
63
53
  if (ButtonShape === 'circle') {
64
54
  return ButtonShape;
65
55
  }
66
-
67
56
  return 'default';
68
57
  }
69
58
  export var setIcon = function setIcon(iconNode, size, loading) {
@@ -73,11 +62,9 @@ export var setIcon = function setIcon(iconNode, size, loading) {
73
62
  size: ICON_LARGE,
74
63
  fill: 'currentColor'
75
64
  }, iconNode.props);
76
-
77
65
  p.size = getIconSize(size);
78
66
  return /*#__PURE__*/React.cloneElement(iconNode, p);
79
67
  }
80
-
81
68
  if (loading) {
82
69
  return /*#__PURE__*/React.createElement(LoadingLine, {
83
70
  spin: true,
@@ -85,36 +72,30 @@ export var setIcon = function setIcon(iconNode, size, loading) {
85
72
  fill: "currentColor"
86
73
  });
87
74
  }
88
-
89
75
  return /*#__PURE__*/React.createElement(React.Fragment, null);
90
76
  };
91
-
92
77
  function Button(props) {
93
78
  var _props$type = props.type,
94
- type = _props$type === void 0 ? 'secondary' : _props$type,
95
- customSize = props.size,
96
- _props$shape = props.shape,
97
- shape = _props$shape === void 0 ? 'default' : _props$shape,
98
- _props$loading = props.loading,
99
- loading = _props$loading === void 0 ? false : _props$loading,
100
- disabled = props.disabled,
101
- icon = props.icon,
102
- className = props.className,
103
- customizePrefixCls = props.prefixCls,
104
- rest = _objectWithoutProperties(props, _excluded);
105
-
79
+ type = _props$type === void 0 ? 'secondary' : _props$type,
80
+ customSize = props.size,
81
+ _props$shape = props.shape,
82
+ shape = _props$shape === void 0 ? 'default' : _props$shape,
83
+ _props$loading = props.loading,
84
+ loading = _props$loading === void 0 ? false : _props$loading,
85
+ disabled = props.disabled,
86
+ icon = props.icon,
87
+ className = props.className,
88
+ customizePrefixCls = props.prefixCls,
89
+ rest = _objectWithoutProperties(props, _excluded);
106
90
  var contentSize = useContext(SizeContext);
107
-
108
91
  var _React$useContext = React.useContext(ConfigContext),
109
- getPrefixCls = _React$useContext.getPrefixCls,
110
- direction = _React$useContext.direction;
111
-
112
- var prefixCls = getPrefixCls('btn', customizePrefixCls); // ===================== Compact Item =====================
113
-
92
+ getPrefixCls = _React$useContext.getPrefixCls,
93
+ direction = _React$useContext.direction;
94
+ var prefixCls = getPrefixCls('btn', customizePrefixCls);
95
+ // ===================== Compact Item =====================
114
96
  var _useCompactItemContex = useCompactItemContext(prefixCls, direction),
115
- compactSize = _useCompactItemContex.compactSize,
116
- compactItemClassnames = _useCompactItemContex.compactItemClassnames;
117
-
97
+ compactSize = _useCompactItemContex.compactSize,
98
+ compactItemClassnames = _useCompactItemContex.compactItemClassnames;
118
99
  var size = compactSize || customSize || contentSize || 'middle';
119
100
  return /*#__PURE__*/React.createElement(AntdButton, _extends({}, rest, {
120
101
  disabled: loading ? true : disabled,
@@ -125,5 +106,4 @@ function Button(props) {
125
106
  shape: getShape(shape)
126
107
  }), props.children);
127
108
  }
128
-
129
109
  export default Button;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { ICheckboxGroupProps } from '../../type';
3
- declare const CheckboxGroup: (props: ICheckboxGroupProps) => JSX.Element;
3
+ declare const CheckboxGroup: (props: ICheckboxGroupProps) => React.JSX.Element;
4
4
  export default CheckboxGroup;