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

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