@aloudata/aloudata-design 0.4.8-beta.14 → 0.4.8-beta.16

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 (73) hide show
  1. package/dist/Avatar/component/Avatar/index.js +16 -5
  2. package/dist/Breadcrumb/index.js +16 -6
  3. package/dist/Button/index.js +32 -15
  4. package/dist/Button/style/variables.less +3 -3
  5. package/dist/Checkbox/component/CheckboxGroup/index.js +10 -4
  6. package/dist/Checkbox/index.js +8 -1
  7. package/dist/Checkbox/type.js +1 -0
  8. package/dist/ConfigProvider/defaultRenderEmpty.js +5 -0
  9. package/dist/ConfigProvider/sizeContext.js +1 -1
  10. package/dist/Divider/index.js +3 -0
  11. package/dist/DoubleCircleIcon/index.js +9 -7
  12. package/dist/Dropdown/Button.js +11 -7
  13. package/dist/Dropdown/index.js +9 -3
  14. package/dist/Dropdown/style/index.less +4 -0
  15. package/dist/Empty/image/Data.js +2 -0
  16. package/dist/Empty/image/Search.js +2 -0
  17. package/dist/Empty/image/SearchSmall.js +2 -0
  18. package/dist/Empty/image/User.js +2 -0
  19. package/dist/Empty/image/WorkBook.js +2 -0
  20. package/dist/Empty/index.js +23 -13
  21. package/dist/Icon/components/Icon.js +13 -9
  22. package/dist/Icon/components/createFromScripts.js +8 -2
  23. package/dist/Input/components/Group/index.js +9 -4
  24. package/dist/Input/components/Input/index.js +9 -3
  25. package/dist/Input/components/Password/index.js +10 -5
  26. package/dist/Input/components/TextArea/index.js +11 -6
  27. package/dist/Input/style/index.less +1 -1
  28. package/dist/InputNumber/index.js +12 -7
  29. package/dist/Menu/SubMenu.js +6 -1
  30. package/dist/Menu/index.js +7 -2
  31. package/dist/Menu/style/index.less +5 -0
  32. package/dist/Modal/index.js +129 -107
  33. package/dist/Modal/locale.js +6 -4
  34. package/dist/Modal/style/index.less +2 -1
  35. package/dist/Navigator/components/Header/index.js +2 -0
  36. package/dist/Navigator/components/Menu/index.js +19 -8
  37. package/dist/Navigator/components/MenuItem/index.js +9 -6
  38. package/dist/Navigator/index.js +7 -5
  39. package/dist/Popconfirm/index.js +27 -19
  40. package/dist/Popover/index.js +9 -2
  41. package/dist/Radio/components/Group/index.js +34 -26
  42. package/dist/Radio/components/Radio/index.js +18 -10
  43. package/dist/Select/components/MultipleOption.js +6 -4
  44. package/dist/Select/components/SingleOption.js +7 -5
  45. package/dist/Select/index.js +94 -44
  46. package/dist/Select/style/index.less +1 -0
  47. package/dist/Spin/CustomIcon/index.js +2 -0
  48. package/dist/Spin/index.js +10 -1
  49. package/dist/Steps/components/ProcessIcon/index.js +2 -0
  50. package/dist/Steps/components/Step/index.js +8 -2
  51. package/dist/Steps/index.js +10 -8
  52. package/dist/Switch/index.js +30 -18
  53. package/dist/Table/Table.js +129 -86
  54. package/dist/Table/components/Empty/index.js +2 -0
  55. package/dist/Table/components/Loading/index.js +2 -0
  56. package/dist/Table/components/TableBodyRowList/index.js +39 -19
  57. package/dist/Table/components/TableHead/index.js +86 -55
  58. package/dist/Table/hooks/useFrame.js +24 -9
  59. package/dist/Table/style/index.less +1 -1
  60. package/dist/Table/utils.js +27 -8
  61. package/dist/Tabs/index.js +32 -17
  62. package/dist/Tooltip/index.js +12 -12
  63. package/dist/Tooltip/style/index.less +7 -1
  64. package/dist/Tree/index.js +4 -2
  65. package/dist/_utils/hooks/useControlledState.js +21 -9
  66. package/dist/_utils/hooks/useId.js +5 -4
  67. package/dist/_utils/hooks/usePrefixCls.js +5 -2
  68. package/dist/index.js +1 -2
  69. package/dist/locale-provider/index.js +33 -8
  70. package/dist/message/index.js +7 -3
  71. package/dist/notification/demo/index.js +1 -0
  72. package/dist/notification/index.js +48 -39
  73. package/package.json +2 -2
@@ -1,33 +1,44 @@
1
1
  var _excluded = ["size", "showFullValue", "children"];
2
+
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); }
4
+
3
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; }
6
+
4
7
  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
+
5
9
  import * as React from 'react';
6
10
  import InternalAvatar from 'antd/es/avatar/avatar';
7
11
  import classNames from 'classnames';
8
12
  var ZERO = 0;
13
+
9
14
  var Avatar = function Avatar(props) {
10
15
  var _props$size = props.size,
11
- size = _props$size === void 0 ? 'middle' : _props$size,
12
- _props$showFullValue = props.showFullValue,
13
- showFullValue = _props$showFullValue === void 0 ? false : _props$showFullValue,
14
- children = props.children,
15
- restProps = _objectWithoutProperties(props, _excluded);
16
+ size = _props$size === void 0 ? 'middle' : _props$size,
17
+ _props$showFullValue = props.showFullValue,
18
+ showFullValue = _props$showFullValue === void 0 ? false : _props$showFullValue,
19
+ children = props.children,
20
+ restProps = _objectWithoutProperties(props, _excluded);
21
+
16
22
  var getSizeClass = function getSizeClass(avatarSize) {
17
23
  if (['large', 'small', 'mini'].includes("".concat(avatarSize))) {
18
24
  return classNames('ald-avatar', "ald-avatar-".concat(avatarSize));
19
25
  }
26
+
20
27
  return classNames('ald-avatar', 'ald-avatar-middle');
21
28
  };
29
+
22
30
  var getChildren = function getChildren() {
23
31
  if (!showFullValue && typeof children === 'string') {
24
32
  return children[ZERO].toLocaleUpperCase();
25
33
  }
34
+
26
35
  return children;
27
36
  };
37
+
28
38
  return /*#__PURE__*/React.createElement(InternalAvatar, _extends({
29
39
  size: typeof size === 'number' ? size : undefined,
30
40
  className: getSizeClass(size)
31
41
  }, restProps), getChildren());
32
42
  };
43
+
33
44
  export default Avatar;
@@ -1,37 +1,47 @@
1
1
  var _excluded = ["className", "separator"],
2
- _excluded2 = ["className"];
2
+ _excluded2 = ["className"];
3
+
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); }
5
+
4
6
  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
+
5
8
  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
+
6
10
  import React from 'react';
7
11
  import { Breadcrumb as AntdBreadcrumb } from 'antd';
8
12
  import classNames from 'classnames';
13
+
9
14
  var Breadcrumb = function Breadcrumb(props) {
10
15
  var className = props.className,
11
- separator = props.separator,
12
- restProps = _objectWithoutProperties(props, _excluded);
16
+ separator = props.separator,
17
+ restProps = _objectWithoutProperties(props, _excluded);
18
+
13
19
  var getSeparator = function getSeparator() {
14
20
  if (separator === null) {
15
21
  return separator;
16
22
  }
23
+
17
24
  return separator || /*#__PURE__*/React.createElement("span", {
18
25
  className: "default-separator"
19
26
  });
20
27
  };
28
+
21
29
  return /*#__PURE__*/React.createElement(AntdBreadcrumb, _extends({}, restProps, {
22
30
  separator: getSeparator(),
23
31
  className: classNames('ald-breadcrumb', className)
24
32
  }));
25
33
  };
34
+
26
35
  var BreadcrumbItem = function BreadcrumbItem(props) {
27
36
  var className = props.className,
28
- restProps = _objectWithoutProperties(props, _excluded2);
37
+ restProps = _objectWithoutProperties(props, _excluded2);
38
+
29
39
  return /*#__PURE__*/React.createElement(AntdBreadcrumb.Item, _extends({}, restProps, {
30
40
  className: classNames('ald-breadcrumb-item', className)
31
41
  }));
32
- };
42
+ }; // eslint-disable-next-line no-underscore-dangle
43
+
33
44
 
34
- // eslint-disable-next-line no-underscore-dangle
35
45
  BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
36
46
  Breadcrumb.Item = BreadcrumbItem;
37
47
  export default Breadcrumb;
@@ -1,13 +1,17 @@
1
1
  var _excluded = ["type", "size", "shape", "loading", "disabled", "icon", "className"];
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); }
2
+
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
+
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; }
6
+
5
7
  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
+
6
9
  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
+
7
11
  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; }
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); }
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
+
11
15
  import { LoadingLine } from '@aloudata/icons-react';
12
16
  import { Button as AntdButton } from 'antd';
13
17
  import classNames from 'classnames';
@@ -21,18 +25,22 @@ export function getButtonType(buttonType) {
21
25
  if (!['primary', 'secondary', 'dangerous', 'text', 'link'].includes(buttonType)) {
22
26
  return 'default';
23
27
  }
28
+
24
29
  if (buttonType === 'dangerous') {
25
30
  return 'primary';
26
31
  }
32
+
27
33
  if (buttonType === 'secondary') {
28
34
  return 'default';
29
35
  }
36
+
30
37
  return buttonType;
31
38
  }
32
39
  export function getDangerStatus(buttonType) {
33
40
  if (buttonType === 'dangerous') {
34
41
  return true;
35
42
  }
43
+
36
44
  return false;
37
45
  }
38
46
  export function getButtonSizeClass(ButtonSize) {
@@ -42,15 +50,18 @@ export function getIconSize(ButtonSize) {
42
50
  if (ButtonSize === 'large') {
43
51
  return ICON_LARGE;
44
52
  }
53
+
45
54
  if (ButtonSize === 'small') {
46
55
  return ICON_SMALL;
47
56
  }
57
+
48
58
  return ICON_MIDDLE;
49
59
  }
50
60
  export function getShape(ButtonShape) {
51
61
  if (ButtonShape === 'circle') {
52
62
  return ButtonShape;
53
63
  }
64
+
54
65
  return 'default';
55
66
  }
56
67
  export var setIcon = function setIcon(iconNode, size, loading) {
@@ -60,10 +71,12 @@ export var setIcon = function setIcon(iconNode, size, loading) {
60
71
  size: ICON_LARGE,
61
72
  fill: 'currentColor'
62
73
  }, iconNode.props);
74
+
63
75
  p.className = classNames("".concat(iconPrefixCls, "-icon-left"), p.className, iconPrefixCls);
64
76
  p.size = getIconSize(size);
65
77
  return /*#__PURE__*/React.cloneElement(iconNode, p);
66
78
  }
79
+
67
80
  if (loading) {
68
81
  return /*#__PURE__*/React.createElement(LoadingLine, {
69
82
  spin: true,
@@ -72,21 +85,24 @@ export var setIcon = function setIcon(iconNode, size, loading) {
72
85
  fill: "currentColor"
73
86
  });
74
87
  }
88
+
75
89
  return /*#__PURE__*/React.createElement(React.Fragment, null);
76
90
  };
91
+
77
92
  function Button(props) {
78
93
  var _props$type = props.type,
79
- type = _props$type === void 0 ? 'secondary' : _props$type,
80
- _props$size = props.size,
81
- size = _props$size === void 0 ? 'middle' : _props$size,
82
- _props$shape = props.shape,
83
- shape = _props$shape === void 0 ? 'default' : _props$shape,
84
- _props$loading = props.loading,
85
- loading = _props$loading === void 0 ? false : _props$loading,
86
- disabled = props.disabled,
87
- icon = props.icon,
88
- className = props.className,
89
- rest = _objectWithoutProperties(props, _excluded);
94
+ type = _props$type === void 0 ? 'secondary' : _props$type,
95
+ _props$size = props.size,
96
+ size = _props$size === void 0 ? 'middle' : _props$size,
97
+ _props$shape = props.shape,
98
+ shape = _props$shape === void 0 ? 'default' : _props$shape,
99
+ _props$loading = props.loading,
100
+ loading = _props$loading === void 0 ? false : _props$loading,
101
+ disabled = props.disabled,
102
+ icon = props.icon,
103
+ className = props.className,
104
+ rest = _objectWithoutProperties(props, _excluded);
105
+
90
106
  return /*#__PURE__*/React.createElement(AntdButton, _extends({}, rest, {
91
107
  disabled: loading ? true : disabled,
92
108
  icon: setIcon(icon, size, loading),
@@ -96,4 +112,5 @@ function Button(props) {
96
112
  shape: getShape(shape)
97
113
  }), props.children);
98
114
  }
115
+
99
116
  export default Button;
@@ -7,19 +7,19 @@
7
7
  @button-height-large: 36px;
8
8
  @button-text-size-large: 16px;
9
9
  @button-border-radius-large: 6px;
10
- @button-border-padding-large: 6px 24px;
10
+ @button-border-padding-large: 5px 23px;
11
11
  @button-left-icon-margin-right-large: 8px;
12
12
 
13
13
  @button-height-middle: 32px;
14
14
  @button-text-size-middle: 13px;
15
15
  @button-border-radius-middle: 4px;
16
- @button-border-padding-middle: 6px 20px;
16
+ @button-border-padding-middle: 5px 19px;
17
17
  @button-left-icon-margin-right-middle: 4px;
18
18
 
19
19
  @button-height-small: 28px;
20
20
  @button-text-size-small: 12px;
21
21
  @button-border-radius-small: 4px;
22
- @button-border-padding-small: 6px 16px;
22
+ @button-border-padding-small: 5px 15px;
23
23
  @button-left-icon-margin-right-small: 4px;
24
24
 
25
25
  // @button-height-mini: 24px;
@@ -1,22 +1,28 @@
1
1
  var _excluded = ["className", "direction"];
2
+
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); }
4
+
3
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; }
6
+
4
7
  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
+
5
9
  import { Checkbox as AntdCheckbox } from 'antd';
6
10
  import classNames from 'classnames';
7
11
  import React from 'react';
8
- import { EDirection } from "../../type";
9
- // "vertical" | "horizontal"
12
+ import { EDirection } from "../../type"; // "vertical" | "horizontal"
10
13
 
11
14
  var AntdCheckboxGroup = AntdCheckbox.Group;
15
+
12
16
  var CheckboxGroup = function CheckboxGroup(props) {
13
17
  var className = props.className,
14
- direction = props.direction,
15
- otherProps = _objectWithoutProperties(props, _excluded);
18
+ direction = props.direction,
19
+ otherProps = _objectWithoutProperties(props, _excluded);
20
+
16
21
  return /*#__PURE__*/React.createElement(AntdCheckboxGroup, _extends({
17
22
  className: classNames('ald-checkbox', className, {
18
23
  'ald-checkout-group-vertical': direction === EDirection.VERTICAL
19
24
  })
20
25
  }, otherProps));
21
26
  };
27
+
22
28
  export default CheckboxGroup;
@@ -1,17 +1,24 @@
1
1
  var _excluded = ["className"];
2
+
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); }
4
+
3
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; }
6
+
4
7
  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
+
5
9
  import React from 'react';
6
10
  import { Checkbox as AntdCheckbox } from 'antd';
7
11
  import classNames from 'classnames';
8
12
  import CheckboxGroup from "./component/CheckboxGroup";
13
+
9
14
  function Checkbox(props) {
10
15
  var className = props.className,
11
- otherProps = _objectWithoutProperties(props, _excluded);
16
+ otherProps = _objectWithoutProperties(props, _excluded);
17
+
12
18
  return /*#__PURE__*/React.createElement(AntdCheckbox, _extends({
13
19
  className: classNames('ald-checkbox', className)
14
20
  }, otherProps));
15
21
  }
22
+
16
23
  Checkbox.Group = CheckboxGroup;
17
24
  export default Checkbox;
@@ -1,4 +1,5 @@
1
1
  export var EDirection;
2
+
2
3
  (function (EDirection) {
3
4
  EDirection["VERTICAL"] = "vertical";
4
5
  EDirection["HORIZONTAL"] = "horizontal";
@@ -1,16 +1,19 @@
1
1
  import * as React from 'react';
2
2
  import { ConfigConsumer } from '.';
3
3
  import Empty from "../Empty";
4
+
4
5
  var defaultRenderEmpty = function defaultRenderEmpty(componentName) {
5
6
  return /*#__PURE__*/React.createElement(ConfigConsumer, null, function (_ref) {
6
7
  var getPrefixCls = _ref.getPrefixCls;
7
8
  var prefix = getPrefixCls('empty');
9
+
8
10
  switch (componentName) {
9
11
  case 'Table':
10
12
  case 'List':
11
13
  return /*#__PURE__*/React.createElement(Empty, {
12
14
  image: Empty.PRESENTED_IMAGE_SIMPLE
13
15
  });
16
+
14
17
  case 'Select':
15
18
  case 'TreeSelect':
16
19
  case 'Cascader':
@@ -23,10 +26,12 @@ var defaultRenderEmpty = function defaultRenderEmpty(componentName) {
23
26
  });
24
27
 
25
28
  /* istanbul ignore next */
29
+
26
30
  default:
27
31
  // Should never hit if we take all the component into consider.
28
32
  return /*#__PURE__*/React.createElement(Empty, null);
29
33
  }
30
34
  });
31
35
  };
36
+
32
37
  export default defaultRenderEmpty;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  var SizeContext = /*#__PURE__*/React.createContext(undefined);
3
3
  export var SizeContextProvider = function SizeContextProvider(_ref) {
4
4
  var children = _ref.children,
5
- size = _ref.size;
5
+ size = _ref.size;
6
6
  return /*#__PURE__*/React.createElement(SizeContext.Consumer, null, function (originSize) {
7
7
  return /*#__PURE__*/React.createElement(SizeContext.Provider, {
8
8
  value: size || originSize
@@ -1,10 +1,13 @@
1
1
  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
+
2
3
  import { Divider as AntdDivider } from 'antd';
3
4
  import classNames from 'classnames';
4
5
  import React from 'react';
6
+
5
7
  var Divider = function Divider(props) {
6
8
  return /*#__PURE__*/React.createElement(AntdDivider, _extends({}, props, {
7
9
  className: classNames('ald-divider', props.className)
8
10
  }));
9
11
  };
12
+
10
13
  export default Divider;
@@ -1,20 +1,21 @@
1
1
  import classnames from 'classnames';
2
2
  import React from 'react';
3
3
  import "./style/index.less";
4
- var INNER_SIZE_RATIO = 0.75;
4
+ var INNER_SIZE_RATIO = 0.75; // 外面有两个圆,中间是个图标
5
5
 
6
- // 外面有两个圆,中间是个图标
7
6
  var DoubleCircleIcon = function DoubleCircleIcon(props) {
8
7
  var outColor = props.outColor,
9
- size = props.size,
10
- innerColor = props.innerColor,
11
- children = props.children,
12
- _props$type = props.type,
13
- type = _props$type === void 0 ? 'info' : _props$type;
8
+ size = props.size,
9
+ innerColor = props.innerColor,
10
+ children = props.children,
11
+ _props$type = props.type,
12
+ type = _props$type === void 0 ? 'info' : _props$type;
14
13
  var innerSize;
14
+
15
15
  if (size) {
16
16
  innerSize = size * INNER_SIZE_RATIO;
17
17
  }
18
+
18
19
  return /*#__PURE__*/React.createElement("div", {
19
20
  style: {
20
21
  background: outColor,
@@ -31,4 +32,5 @@ var DoubleCircleIcon = function DoubleCircleIcon(props) {
31
32
  className: 'inner'
32
33
  }, children));
33
34
  };
35
+
34
36
  export default DoubleCircleIcon;
@@ -1,6 +1,9 @@
1
1
  var _excluded = ["children", "overlay", "placement", "trigger", "open", "disabled", "onOpenChange"];
2
+
2
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
+
3
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
+
4
7
  import React from 'react';
5
8
  import Button from "../Button";
6
9
  import "../Button/style";
@@ -8,13 +11,14 @@ import Dropdown from "./index";
8
11
  import { FoldDownFill } from '@aloudata/icons-react';
9
12
  export default function DropdownButton(props) {
10
13
  var children = props.children,
11
- overlay = props.overlay,
12
- placement = props.placement,
13
- trigger = props.trigger,
14
- open = props.open,
15
- disabled = props.disabled,
16
- onOpenChange = props.onOpenChange,
17
- buttonProps = _objectWithoutProperties(props, _excluded);
14
+ overlay = props.overlay,
15
+ placement = props.placement,
16
+ trigger = props.trigger,
17
+ open = props.open,
18
+ disabled = props.disabled,
19
+ onOpenChange = props.onOpenChange,
20
+ buttonProps = _objectWithoutProperties(props, _excluded);
21
+
18
22
  return /*#__PURE__*/React.createElement(Dropdown, {
19
23
  overlay: overlay,
20
24
  placement: placement,
@@ -1,18 +1,24 @@
1
1
  var _excluded = ["children", "open"];
2
+
2
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
+
3
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
+
4
7
  import React from 'react';
5
8
  import { Dropdown as AntdDropdown } from 'antd';
6
9
  import DropdownButton from "./Button";
7
10
  export default function Dropdown(props) {
8
11
  var children = props.children,
9
- open = props.open,
10
- otherProps = _objectWithoutProperties(props, _excluded);
11
- // antd 根据 open 字段是否存在来判断 open 是否是可控模式
12
+ open = props.open,
13
+ otherProps = _objectWithoutProperties(props, _excluded); // antd 根据 open 字段是否存在来判断 open 是否是可控模式
14
+
15
+
12
16
  var antdDropdownProps = otherProps;
17
+
13
18
  if (open !== undefined) {
14
19
  antdDropdownProps.open = open;
15
20
  }
21
+
16
22
  return /*#__PURE__*/React.createElement(AntdDropdown, antdDropdownProps, children);
17
23
  }
18
24
  Dropdown.Button = DropdownButton;
@@ -12,6 +12,10 @@
12
12
  padding: 4px;
13
13
  color: @NL0;
14
14
  box-shadow: @shadow-L;
15
+
16
+ .ant-dropdown-menu-submenu-title{
17
+ font-size: 13px;
18
+ }
15
19
  }
16
20
 
17
21
  .ant-dropdown-menu-submenu > .ant-dropdown-menu {
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+
2
3
  var Data = function Data() {
3
4
  return /*#__PURE__*/React.createElement("svg", {
4
5
  className: "ald-empty-image",
@@ -217,4 +218,5 @@ var Data = function Data() {
217
218
  stopColor: "#F5F6F7"
218
219
  }))));
219
220
  };
221
+
220
222
  export default Data;
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+
2
3
  var Search = function Search() {
3
4
  return /*#__PURE__*/React.createElement("svg", {
4
5
  className: "ald-empty-image",
@@ -207,4 +208,5 @@ var Search = function Search() {
207
208
  stopColor: "#EAECF0"
208
209
  }))));
209
210
  };
211
+
210
212
  export default Search;
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+
2
3
  var SearchSmall = function SearchSmall() {
3
4
  return /*#__PURE__*/React.createElement("svg", {
4
5
  width: "40",
@@ -20,4 +21,5 @@ var SearchSmall = function SearchSmall() {
20
21
  fill: "#667085"
21
22
  }));
22
23
  };
24
+
23
25
  export default SearchSmall;
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+
2
3
  var User = function User() {
3
4
  return /*#__PURE__*/React.createElement("svg", {
4
5
  className: "ald-empty-image",
@@ -194,4 +195,5 @@ var User = function User() {
194
195
  stopColor: "white"
195
196
  }))));
196
197
  };
198
+
197
199
  export default User;
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+
2
3
  var WorkBook = function WorkBook() {
3
4
  return /*#__PURE__*/React.createElement("svg", {
4
5
  className: "ald-empty-image",
@@ -200,4 +201,5 @@ var WorkBook = function WorkBook() {
200
201
  stopColor: "white"
201
202
  }))));
202
203
  };
204
+
203
205
  export default WorkBook;
@@ -1,11 +1,13 @@
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); }
2
1
  var _excluded = ["className", "image", "description", "title", "size", "children", "imageStyle", "footerClassNames"];
2
+
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
- 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; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- 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); }
4
+
5
+ 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; }
6
+
7
7
  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; }
8
+
8
9
  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; }
10
+
9
11
  import * as React from 'react';
10
12
  import classNames from 'classnames';
11
13
  import UserEmptyImg from "./image/User";
@@ -18,21 +20,24 @@ var userEmptyImg = /*#__PURE__*/React.createElement(UserEmptyImg, null);
18
20
  var workbookEmptyImg = /*#__PURE__*/React.createElement(WorkbookEmptyImg, null);
19
21
  var dataEmptyImg = /*#__PURE__*/React.createElement(DataEmptyImg, null);
20
22
  var searchEmptySmallImage = /*#__PURE__*/React.createElement(SearchEmptySmallImage, null);
23
+
21
24
  var Empty = function Empty(props) {
22
25
  var className = props.className,
23
- _props$image = props.image,
24
- image = _props$image === void 0 ? searchEmptyImg : _props$image,
25
- description = props.description,
26
- title = props.title,
27
- size = props.size,
28
- children = props.children,
29
- imageStyle = props.imageStyle,
30
- footerClassNames = props.footerClassNames,
31
- restProps = _objectWithoutProperties(props, _excluded);
26
+ _props$image = props.image,
27
+ image = _props$image === void 0 ? searchEmptyImg : _props$image,
28
+ description = props.description,
29
+ title = props.title,
30
+ size = props.size,
31
+ children = props.children,
32
+ imageStyle = props.imageStyle,
33
+ footerClassNames = props.footerClassNames,
34
+ restProps = _objectWithoutProperties(props, _excluded);
35
+
32
36
  var prefixCls = 'ald-empty';
33
37
  var des = typeof description !== 'undefined' ? description : null;
34
38
  var alt = typeof des === 'string' ? des : 'empty';
35
39
  var imageNode = null;
40
+
36
41
  if (typeof image === 'string') {
37
42
  imageNode = /*#__PURE__*/React.createElement("img", {
38
43
  alt: alt,
@@ -41,15 +46,19 @@ var Empty = function Empty(props) {
41
46
  } else {
42
47
  imageNode = image;
43
48
  }
49
+
44
50
  var getSize = function getSize(ESize) {
45
51
  if (ESize === undefined) {
46
52
  return 'large';
47
53
  }
54
+
48
55
  if (['small', 'large'].includes(ESize)) {
49
56
  return ESize;
50
57
  }
58
+
51
59
  return 'large';
52
60
  };
61
+
53
62
  return /*#__PURE__*/React.createElement("div", _extends({
54
63
  className: classNames(prefixCls, _defineProperty({}, "".concat(prefixCls, "-").concat(getSize(size)), getSize(size)), className)
55
64
  }, restProps), /*#__PURE__*/React.createElement("div", {
@@ -63,6 +72,7 @@ var Empty = function Empty(props) {
63
72
  className: classNames("".concat(prefixCls, "-footer"), footerClassNames)
64
73
  }, children));
65
74
  };
75
+
66
76
  Empty.PRESENTED_IMAGE_SEARCH = searchEmptyImg;
67
77
  Empty.PRESENTED_IMAGE_USER = userEmptyImg;
68
78
  Empty.PRESENTED_IMAGE_WORKBOOK = workbookEmptyImg;