@aloudata/aloudata-design 0.4.0-beta.5 → 0.4.0-beta.7

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 (49) hide show
  1. package/es/Breadcrumb/index.d.ts +5 -2
  2. package/es/Breadcrumb/index.js +17 -7
  3. package/es/Checkbox/style/index.less +0 -4
  4. package/es/Dropdown/Button.d.ts +4 -4
  5. package/es/Dropdown/Button.js +5 -5
  6. package/es/Dropdown/index.d.ts +5 -5
  7. package/es/Dropdown/index.js +5 -5
  8. package/es/Icon/icons.js +135 -58
  9. package/es/Input/components/Password/index.d.ts +1 -1
  10. package/es/Input/components/TextArea/index.d.ts +1 -1
  11. package/es/{Popconfim → Popconfirm}/index.d.ts +0 -0
  12. package/es/{Popconfim → Popconfirm}/index.js +0 -0
  13. package/es/{Popconfim → Popconfirm}/style/index.d.ts +0 -0
  14. package/es/{Popconfim → Popconfirm}/style/index.js +0 -0
  15. package/es/{Popconfim → Popconfirm}/style/index.less +0 -0
  16. package/es/Table/interface.d.ts +1 -0
  17. package/es/Table/utils.js +15 -8
  18. package/es/Tooltip/index.d.ts +2 -2
  19. package/es/Tooltip/index.js +4 -4
  20. package/es/index.d.ts +2 -2
  21. package/es/index.js +1 -1
  22. package/es/style/themes/default/scrollBar.less +10 -7
  23. package/lib/Breadcrumb/index.d.ts +5 -2
  24. package/lib/Breadcrumb/index.js +17 -8
  25. package/lib/Checkbox/style/index.less +0 -4
  26. package/lib/Dropdown/Button.d.ts +4 -4
  27. package/lib/Dropdown/Button.js +5 -5
  28. package/lib/Dropdown/index.d.ts +5 -5
  29. package/lib/Dropdown/index.js +5 -5
  30. package/lib/Icon/icons.js +135 -58
  31. package/lib/Input/components/Password/index.d.ts +1 -1
  32. package/lib/Input/components/TextArea/index.d.ts +1 -1
  33. package/lib/{Popconfim → Popconfirm}/index.d.ts +0 -0
  34. package/lib/{Popconfim → Popconfirm}/index.js +0 -0
  35. package/lib/{Popconfim → Popconfirm}/style/index.d.ts +0 -0
  36. package/lib/{Popconfim → Popconfirm}/style/index.js +0 -0
  37. package/lib/{Popconfim → Popconfirm}/style/index.less +0 -0
  38. package/lib/Table/interface.d.ts +1 -0
  39. package/lib/Table/utils.js +15 -8
  40. package/lib/Tooltip/index.d.ts +2 -2
  41. package/lib/Tooltip/index.js +4 -4
  42. package/lib/index.d.ts +2 -2
  43. package/lib/index.js +3 -3
  44. package/lib/style/themes/default/scrollBar.less +10 -7
  45. package/package.json +3 -3
  46. package/es/Table/hooks/useTableColumn.d.ts +0 -28
  47. package/es/Table/hooks/useTableColumn.js +0 -53
  48. package/lib/Table/hooks/useTableColumn.d.ts +0 -28
  49. package/lib/Table/hooks/useTableColumn.js +0 -66
@@ -1,8 +1,11 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { BreadcrumbItemProps, BreadcrumbProps } from 'antd';
3
3
  export type { BreadcrumbItemProps, BreadcrumbProps };
4
+ interface IBreadcrumbItemInterface extends React.FC<BreadcrumbItemProps> {
5
+ __ANT_BREADCRUMB_ITEM: boolean;
6
+ }
4
7
  declare const Breadcrumb: {
5
8
  (props: BreadcrumbProps): JSX.Element;
6
- Item(props: BreadcrumbItemProps): JSX.Element;
9
+ Item: IBreadcrumbItemInterface;
7
10
  };
8
11
  export default Breadcrumb;
@@ -9,28 +9,38 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
9
9
 
10
10
  import React from 'react';
11
11
  import classNames from 'classnames';
12
- var BreadcrumbItem = _Breadcrumb.Item;
13
12
 
14
13
  var Breadcrumb = function Breadcrumb(props) {
15
14
  var className = props.className,
16
15
  separator = props.separator,
17
16
  restProps = _objectWithoutProperties(props, _excluded);
18
17
 
19
- return /*#__PURE__*/React.createElement(_Breadcrumb, Object.assign({}, restProps, {
20
- separator: separator || /*#__PURE__*/React.createElement("span", {
18
+ var getSeparator = function getSeparator() {
19
+ if (separator === null) {
20
+ return separator;
21
+ }
22
+
23
+ return separator || /*#__PURE__*/React.createElement("span", {
21
24
  className: "default-separator"
22
- }),
25
+ });
26
+ };
27
+
28
+ return /*#__PURE__*/React.createElement(_Breadcrumb, Object.assign({}, restProps, {
29
+ separator: getSeparator(),
23
30
  className: classNames('ald-breadcrumb', className)
24
31
  }));
25
32
  };
26
33
 
27
- Breadcrumb.Item = function (props) {
34
+ var BreadcrumbItem = function BreadcrumbItem(props) {
28
35
  var className = props.className,
29
36
  restProps = _objectWithoutProperties(props, _excluded2);
30
37
 
31
- return /*#__PURE__*/React.createElement(BreadcrumbItem, Object.assign({}, restProps, {
38
+ return /*#__PURE__*/React.createElement(_Breadcrumb.Item, Object.assign({}, restProps, {
32
39
  className: classNames('ald-breadcrumb-item', className)
33
40
  }));
34
- };
41
+ }; // eslint-disable-next-line no-underscore-dangle
42
+
35
43
 
44
+ BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
45
+ Breadcrumb.Item = BreadcrumbItem;
36
46
  export default Breadcrumb;
@@ -95,10 +95,6 @@
95
95
 
96
96
  .ant-checkbox-group.ald-checkbox,
97
97
  .ant-checkbox-wrapper.ald-checkbox {
98
- &:hover .ant-checkbox-inner {
99
- border-color: @B60;
100
- }
101
-
102
98
  .ant-checkbox-input:focus + .ant-checkbox-inner {
103
99
  border-color: @NL60;
104
100
  }
@@ -41,7 +41,7 @@ export interface IDropdownButton {
41
41
  * @description 菜单弹出位置
42
42
  * @default bottomLeft
43
43
  */
44
- placement?: 'bottomLeft' | 'bottomCenter' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight';
44
+ placement?: 'bottomLeft' | 'bottom' | 'bottomRight' | 'topLeft' | 'top' | 'topRight';
45
45
  /**
46
46
  * @description 触发下拉的行为
47
47
  * @type ActionType[], 其中 ActionType 为 'hover' | 'click' | 'contextMenu';
@@ -52,12 +52,12 @@ export interface IDropdownButton {
52
52
  * @description 菜单是否显示
53
53
  * @default -
54
54
  */
55
- visible?: boolean;
55
+ open?: boolean;
56
56
  /**
57
- * @description 菜单显示状态改变时调用,参数为 visible,点击菜单按钮导致的消失不会触发
57
+ * @description 菜单显示状态改变时调用,参数为 open,点击菜单按钮导致的消失不会触发
58
58
  * @default -
59
59
  */
60
- onVisibleChange?: (visible: boolean) => void;
60
+ onOpenChange?: (open: boolean) => void;
61
61
  /**
62
62
  * @description 点击按钮时的回调
63
63
  * FIXME: onClick和trigger冲突,antd按钮和下拉菜单触发区域不同,需要和视觉确认
@@ -1,6 +1,6 @@
1
1
  import "@aloudata/icons-react/styles/index.less";
2
2
  import _ArrowsDownLine from "@aloudata/icons-react/es/icons/ArrowsDownLine";
3
- var _excluded = ["children", "overlay", "placement", "trigger", "visible", "disabled", "onVisibleChange"];
3
+ var _excluded = ["children", "overlay", "placement", "trigger", "open", "disabled", "onOpenChange"];
4
4
 
5
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
6
 
@@ -16,18 +16,18 @@ export default function DropdownButton(props) {
16
16
  overlay = props.overlay,
17
17
  placement = props.placement,
18
18
  trigger = props.trigger,
19
- visible = props.visible,
19
+ open = props.open,
20
20
  disabled = props.disabled,
21
- onVisibleChange = props.onVisibleChange,
21
+ onOpenChange = props.onOpenChange,
22
22
  buttonProps = _objectWithoutProperties(props, _excluded);
23
23
 
24
24
  return /*#__PURE__*/React.createElement(Dropdown, {
25
25
  overlay: overlay,
26
26
  placement: placement,
27
27
  trigger: trigger,
28
- visible: visible,
28
+ open: open,
29
29
  disabled: disabled,
30
- onVisibleChange: onVisibleChange
30
+ onOpenChange: onOpenChange
31
31
  }, /*#__PURE__*/React.createElement(Button, Object.assign({}, buttonProps), children, /*#__PURE__*/React.createElement(_ArrowsDownLine, {
32
32
  fill: "currentColor"
33
33
  })));
@@ -13,7 +13,7 @@ declare type Align = {
13
13
  useCssTransform?: boolean;
14
14
  };
15
15
  export declare type ActionType = 'hover' | 'click' | 'contextMenu';
16
- export declare type PlacementType = 'bottomLeft' | 'bottomCenter' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight';
16
+ export declare type PlacementType = 'bottomLeft' | 'bottom' | 'bottomRight' | 'topLeft' | 'top' | 'topRight';
17
17
  export interface IDropdownProps {
18
18
  /**
19
19
  * @description 位置状态
@@ -45,7 +45,7 @@ export interface IDropdownProps {
45
45
  * @description 菜单弹出位置
46
46
  * @default bottomLeft
47
47
  */
48
- placement?: 'bottomLeft' | 'bottomCenter' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight';
48
+ placement?: 'bottomLeft' | 'bottom' | 'bottomRight' | 'topLeft' | 'top' | 'topRight';
49
49
  /**
50
50
  * @description 触发下拉的行为
51
51
  * @type ActionType[], 其中 ActionType 为 'hover' | 'click' | 'contextMenu';
@@ -56,12 +56,12 @@ export interface IDropdownProps {
56
56
  * @description 菜单是否显示
57
57
  * @default -
58
58
  */
59
- visible?: boolean;
59
+ open?: boolean;
60
60
  /**
61
- * @description 菜单显示状态改变时调用,参数为 visible,点击菜单按钮导致的消失不会触发
61
+ * @description 菜单显示状态改变时调用,参数为 open,点击菜单按钮导致的消失不会触发
62
62
  * @default -
63
63
  */
64
- onVisibleChange?: (visible: boolean) => void;
64
+ onOpenChange?: (open: boolean) => void;
65
65
  /**
66
66
  * @description 下拉框的属性
67
67
  * @default -
@@ -1,6 +1,6 @@
1
1
  import "antd/es/dropdown/style";
2
2
  import _Dropdown from "antd/es/dropdown";
3
- var _excluded = ["children", "visible"];
3
+ var _excluded = ["children", "open"];
4
4
 
5
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
6
 
@@ -11,14 +11,14 @@ import React from 'react';
11
11
  import DropdownButton from './Button';
12
12
  export default function Dropdown(props) {
13
13
  var children = props.children,
14
- visible = props.visible,
15
- otherProps = _objectWithoutProperties(props, _excluded); // antd根据visible字段是否存在来判断visible是否是可控模式
14
+ open = props.open,
15
+ otherProps = _objectWithoutProperties(props, _excluded); // antd 根据 open 字段是否存在来判断 open 是否是可控模式
16
16
 
17
17
 
18
18
  var antdDropdownProps = otherProps;
19
19
 
20
- if (visible !== undefined) {
21
- antdDropdownProps.visible = visible;
20
+ if (open !== undefined) {
21
+ antdDropdownProps.open = open;
22
22
  }
23
23
 
24
24
  return /*#__PURE__*/React.createElement(_Dropdown, Object.assign({}, antdDropdownProps), children);