@aloudata/aloudata-design 0.4.0-beta.5 → 0.4.0-beta.6
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.
- package/es/Breadcrumb/index.d.ts +5 -2
- package/es/Breadcrumb/index.js +17 -7
- package/es/Checkbox/style/index.less +0 -4
- package/es/Dropdown/Button.d.ts +4 -4
- package/es/Dropdown/Button.js +5 -5
- package/es/Dropdown/index.d.ts +5 -5
- package/es/Dropdown/index.js +5 -5
- package/es/{Popconfim → Popconfirm}/index.d.ts +0 -0
- package/es/{Popconfim → Popconfirm}/index.js +0 -0
- package/es/{Popconfim → Popconfirm}/style/index.d.ts +0 -0
- package/es/{Popconfim → Popconfirm}/style/index.js +0 -0
- package/es/{Popconfim → Popconfirm}/style/index.less +0 -0
- package/es/Tooltip/index.d.ts +2 -2
- package/es/Tooltip/index.js +4 -4
- package/es/index.d.ts +2 -2
- package/es/index.js +1 -1
- package/lib/Breadcrumb/index.d.ts +5 -2
- package/lib/Breadcrumb/index.js +17 -8
- package/lib/Checkbox/style/index.less +0 -4
- package/lib/Dropdown/Button.d.ts +4 -4
- package/lib/Dropdown/Button.js +5 -5
- package/lib/Dropdown/index.d.ts +5 -5
- package/lib/Dropdown/index.js +5 -5
- package/lib/{Popconfim → Popconfirm}/index.d.ts +0 -0
- package/lib/{Popconfim → Popconfirm}/index.js +0 -0
- package/lib/{Popconfim → Popconfirm}/style/index.d.ts +0 -0
- package/lib/{Popconfim → Popconfirm}/style/index.js +0 -0
- package/lib/{Popconfim → Popconfirm}/style/index.less +0 -0
- package/lib/Tooltip/index.d.ts +2 -2
- package/lib/Tooltip/index.js +4 -4
- package/lib/index.d.ts +2 -2
- package/lib/index.js +3 -3
- package/package.json +2 -2
package/es/Breadcrumb/index.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
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
|
|
9
|
+
Item: IBreadcrumbItemInterface;
|
|
7
10
|
};
|
|
8
11
|
export default Breadcrumb;
|
package/es/Breadcrumb/index.js
CHANGED
|
@@ -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
|
-
|
|
20
|
-
|
|
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
|
-
|
|
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(
|
|
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;
|
package/es/Dropdown/Button.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export interface IDropdownButton {
|
|
|
41
41
|
* @description 菜单弹出位置
|
|
42
42
|
* @default bottomLeft
|
|
43
43
|
*/
|
|
44
|
-
placement?: 'bottomLeft' | '
|
|
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
|
-
|
|
55
|
+
open?: boolean;
|
|
56
56
|
/**
|
|
57
|
-
* @description 菜单显示状态改变时调用,参数为
|
|
57
|
+
* @description 菜单显示状态改变时调用,参数为 open,点击菜单按钮导致的消失不会触发
|
|
58
58
|
* @default -
|
|
59
59
|
*/
|
|
60
|
-
|
|
60
|
+
onOpenChange?: (open: boolean) => void;
|
|
61
61
|
/**
|
|
62
62
|
* @description 点击按钮时的回调
|
|
63
63
|
* FIXME: onClick和trigger冲突,antd按钮和下拉菜单触发区域不同,需要和视觉确认
|
package/es/Dropdown/Button.js
CHANGED
|
@@ -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", "
|
|
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
|
-
|
|
19
|
+
open = props.open,
|
|
20
20
|
disabled = props.disabled,
|
|
21
|
-
|
|
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
|
-
|
|
28
|
+
open: open,
|
|
29
29
|
disabled: disabled,
|
|
30
|
-
|
|
30
|
+
onOpenChange: onOpenChange
|
|
31
31
|
}, /*#__PURE__*/React.createElement(Button, Object.assign({}, buttonProps), children, /*#__PURE__*/React.createElement(_ArrowsDownLine, {
|
|
32
32
|
fill: "currentColor"
|
|
33
33
|
})));
|
package/es/Dropdown/index.d.ts
CHANGED
|
@@ -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' | '
|
|
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' | '
|
|
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
|
-
|
|
59
|
+
open?: boolean;
|
|
60
60
|
/**
|
|
61
|
-
* @description 菜单显示状态改变时调用,参数为
|
|
61
|
+
* @description 菜单显示状态改变时调用,参数为 open,点击菜单按钮导致的消失不会触发
|
|
62
62
|
* @default -
|
|
63
63
|
*/
|
|
64
|
-
|
|
64
|
+
onOpenChange?: (open: boolean) => void;
|
|
65
65
|
/**
|
|
66
66
|
* @description 下拉框的属性
|
|
67
67
|
* @default -
|
package/es/Dropdown/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "antd/es/dropdown/style";
|
|
2
2
|
import _Dropdown from "antd/es/dropdown";
|
|
3
|
-
var _excluded = ["children", "
|
|
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
|
-
|
|
15
|
-
otherProps = _objectWithoutProperties(props, _excluded); // antd根据
|
|
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 (
|
|
21
|
-
antdDropdownProps.
|
|
20
|
+
if (open !== undefined) {
|
|
21
|
+
antdDropdownProps.open = open;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
return /*#__PURE__*/React.createElement(_Dropdown, Object.assign({}, antdDropdownProps), children);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/es/Tooltip/index.d.ts
CHANGED
|
@@ -46,12 +46,12 @@ export interface ITooltipProps {
|
|
|
46
46
|
* @description 用于手动控制浮层显隐
|
|
47
47
|
* @default -
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
open?: boolean;
|
|
50
50
|
/**
|
|
51
51
|
* @description 显示隐藏的回调
|
|
52
52
|
* @default -
|
|
53
53
|
*/
|
|
54
|
-
|
|
54
|
+
onOpenChange?: (open: boolean) => void;
|
|
55
55
|
/**
|
|
56
56
|
* @description 卡片类名
|
|
57
57
|
* @default -
|
package/es/Tooltip/index.js
CHANGED
|
@@ -4,8 +4,8 @@ import classNames from 'classnames';
|
|
|
4
4
|
export default function Tooltip(props) {
|
|
5
5
|
var children = props.children,
|
|
6
6
|
title = props.title,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
open = props.open,
|
|
8
|
+
onOpenChange = props.onOpenChange,
|
|
9
9
|
trigger = props.trigger,
|
|
10
10
|
zIndex = props.zIndex,
|
|
11
11
|
placement = props.placement,
|
|
@@ -18,8 +18,8 @@ export default function Tooltip(props) {
|
|
|
18
18
|
return /*#__PURE__*/React.createElement(AntdTooltip, {
|
|
19
19
|
title: title,
|
|
20
20
|
overlayClassName: classNames('ald-tooltip-overlay', overlayClassName),
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
open: open,
|
|
22
|
+
onOpenChange: onOpenChange,
|
|
23
23
|
trigger: trigger,
|
|
24
24
|
zIndex: zIndex,
|
|
25
25
|
placement: placement,
|
package/es/index.d.ts
CHANGED
|
@@ -77,5 +77,5 @@ export type { IAvatarProps as AvatarProps } from './Avatar';
|
|
|
77
77
|
export { default as Icon } from './Icon';
|
|
78
78
|
export type { PageHeaderProps } from './PageHeader';
|
|
79
79
|
export { default as PageHeader } from './PageHeader';
|
|
80
|
-
export type { PopconfirmProps } from './
|
|
81
|
-
export { default as
|
|
80
|
+
export type { PopconfirmProps } from './Popconfirm';
|
|
81
|
+
export { default as Popconfirm } from './Popconfirm';
|
package/es/index.js
CHANGED
|
@@ -39,4 +39,4 @@ export { default as Empty } from './Empty';
|
|
|
39
39
|
export { default as Avatar } from './Avatar';
|
|
40
40
|
export { default as Icon } from './Icon';
|
|
41
41
|
export { default as PageHeader } from './PageHeader';
|
|
42
|
-
export { default as
|
|
42
|
+
export { default as Popconfirm } from './Popconfirm';
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
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
|
|
9
|
+
Item: IBreadcrumbItemInterface;
|
|
7
10
|
};
|
|
8
11
|
export default Breadcrumb;
|
package/lib/Breadcrumb/index.js
CHANGED
|
@@ -22,29 +22,38 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
22
22
|
|
|
23
23
|
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; }
|
|
24
24
|
|
|
25
|
-
var BreadcrumbItem = _breadcrumb.default.Item;
|
|
26
|
-
|
|
27
25
|
var Breadcrumb = function Breadcrumb(props) {
|
|
28
26
|
var className = props.className,
|
|
29
27
|
separator = props.separator,
|
|
30
28
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
var getSeparator = function getSeparator() {
|
|
31
|
+
if (separator === null) {
|
|
32
|
+
return separator;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return separator || /*#__PURE__*/_react.default.createElement("span", {
|
|
34
36
|
className: "default-separator"
|
|
35
|
-
})
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement(_breadcrumb.default, Object.assign({}, restProps, {
|
|
41
|
+
separator: getSeparator(),
|
|
36
42
|
className: (0, _classnames.default)('ald-breadcrumb', className)
|
|
37
43
|
}));
|
|
38
44
|
};
|
|
39
45
|
|
|
40
|
-
|
|
46
|
+
var BreadcrumbItem = function BreadcrumbItem(props) {
|
|
41
47
|
var className = props.className,
|
|
42
48
|
restProps = _objectWithoutProperties(props, _excluded2);
|
|
43
49
|
|
|
44
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement(_breadcrumb.default.Item, Object.assign({}, restProps, {
|
|
45
51
|
className: (0, _classnames.default)('ald-breadcrumb-item', className)
|
|
46
52
|
}));
|
|
47
|
-
};
|
|
53
|
+
}; // eslint-disable-next-line no-underscore-dangle
|
|
54
|
+
|
|
48
55
|
|
|
56
|
+
BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
|
|
57
|
+
Breadcrumb.Item = BreadcrumbItem;
|
|
49
58
|
var _default = Breadcrumb;
|
|
50
59
|
exports.default = _default;
|
package/lib/Dropdown/Button.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export interface IDropdownButton {
|
|
|
41
41
|
* @description 菜单弹出位置
|
|
42
42
|
* @default bottomLeft
|
|
43
43
|
*/
|
|
44
|
-
placement?: 'bottomLeft' | '
|
|
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
|
-
|
|
55
|
+
open?: boolean;
|
|
56
56
|
/**
|
|
57
|
-
* @description 菜单显示状态改变时调用,参数为
|
|
57
|
+
* @description 菜单显示状态改变时调用,参数为 open,点击菜单按钮导致的消失不会触发
|
|
58
58
|
* @default -
|
|
59
59
|
*/
|
|
60
|
-
|
|
60
|
+
onOpenChange?: (open: boolean) => void;
|
|
61
61
|
/**
|
|
62
62
|
* @description 点击按钮时的回调
|
|
63
63
|
* FIXME: onClick和trigger冲突,antd按钮和下拉菜单触发区域不同,需要和视觉确认
|
package/lib/Dropdown/Button.js
CHANGED
|
@@ -17,7 +17,7 @@ require("../Button/style");
|
|
|
17
17
|
|
|
18
18
|
var _index2 = _interopRequireDefault(require("./index"));
|
|
19
19
|
|
|
20
|
-
var _excluded = ["children", "overlay", "placement", "trigger", "
|
|
20
|
+
var _excluded = ["children", "overlay", "placement", "trigger", "open", "disabled", "onOpenChange"];
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
@@ -30,18 +30,18 @@ function DropdownButton(props) {
|
|
|
30
30
|
overlay = props.overlay,
|
|
31
31
|
placement = props.placement,
|
|
32
32
|
trigger = props.trigger,
|
|
33
|
-
|
|
33
|
+
open = props.open,
|
|
34
34
|
disabled = props.disabled,
|
|
35
|
-
|
|
35
|
+
onOpenChange = props.onOpenChange,
|
|
36
36
|
buttonProps = _objectWithoutProperties(props, _excluded);
|
|
37
37
|
|
|
38
38
|
return /*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
39
39
|
overlay: overlay,
|
|
40
40
|
placement: placement,
|
|
41
41
|
trigger: trigger,
|
|
42
|
-
|
|
42
|
+
open: open,
|
|
43
43
|
disabled: disabled,
|
|
44
|
-
|
|
44
|
+
onOpenChange: onOpenChange
|
|
45
45
|
}, /*#__PURE__*/_react.default.createElement(_Button.default, Object.assign({}, buttonProps), children, /*#__PURE__*/_react.default.createElement(_ArrowsDownLine2.default, {
|
|
46
46
|
fill: "currentColor"
|
|
47
47
|
})));
|
package/lib/Dropdown/index.d.ts
CHANGED
|
@@ -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' | '
|
|
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' | '
|
|
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
|
-
|
|
59
|
+
open?: boolean;
|
|
60
60
|
/**
|
|
61
|
-
* @description 菜单显示状态改变时调用,参数为
|
|
61
|
+
* @description 菜单显示状态改变时调用,参数为 open,点击菜单按钮导致的消失不会触发
|
|
62
62
|
* @default -
|
|
63
63
|
*/
|
|
64
|
-
|
|
64
|
+
onOpenChange?: (open: boolean) => void;
|
|
65
65
|
/**
|
|
66
66
|
* @description 下拉框的属性
|
|
67
67
|
* @default -
|
package/lib/Dropdown/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
13
13
|
|
|
14
14
|
var _Button = _interopRequireDefault(require("./Button"));
|
|
15
15
|
|
|
16
|
-
var _excluded = ["children", "
|
|
16
|
+
var _excluded = ["children", "open"];
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
@@ -23,14 +23,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
23
23
|
|
|
24
24
|
function Dropdown(props) {
|
|
25
25
|
var children = props.children,
|
|
26
|
-
|
|
27
|
-
otherProps = _objectWithoutProperties(props, _excluded); // antd根据
|
|
26
|
+
open = props.open,
|
|
27
|
+
otherProps = _objectWithoutProperties(props, _excluded); // antd 根据 open 字段是否存在来判断 open 是否是可控模式
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
var antdDropdownProps = otherProps;
|
|
31
31
|
|
|
32
|
-
if (
|
|
33
|
-
antdDropdownProps.
|
|
32
|
+
if (open !== undefined) {
|
|
33
|
+
antdDropdownProps.open = open;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
return /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({}, antdDropdownProps), children);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/Tooltip/index.d.ts
CHANGED
|
@@ -46,12 +46,12 @@ export interface ITooltipProps {
|
|
|
46
46
|
* @description 用于手动控制浮层显隐
|
|
47
47
|
* @default -
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
open?: boolean;
|
|
50
50
|
/**
|
|
51
51
|
* @description 显示隐藏的回调
|
|
52
52
|
* @default -
|
|
53
53
|
*/
|
|
54
|
-
|
|
54
|
+
onOpenChange?: (open: boolean) => void;
|
|
55
55
|
/**
|
|
56
56
|
* @description 卡片类名
|
|
57
57
|
* @default -
|
package/lib/Tooltip/index.js
CHANGED
|
@@ -16,8 +16,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
16
16
|
function Tooltip(props) {
|
|
17
17
|
var children = props.children,
|
|
18
18
|
title = props.title,
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
open = props.open,
|
|
20
|
+
onOpenChange = props.onOpenChange,
|
|
21
21
|
trigger = props.trigger,
|
|
22
22
|
zIndex = props.zIndex,
|
|
23
23
|
placement = props.placement,
|
|
@@ -30,8 +30,8 @@ function Tooltip(props) {
|
|
|
30
30
|
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
31
31
|
title: title,
|
|
32
32
|
overlayClassName: (0, _classnames.default)('ald-tooltip-overlay', overlayClassName),
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
open: open,
|
|
34
|
+
onOpenChange: onOpenChange,
|
|
35
35
|
trigger: trigger,
|
|
36
36
|
zIndex: zIndex,
|
|
37
37
|
placement: placement,
|
package/lib/index.d.ts
CHANGED
|
@@ -77,5 +77,5 @@ export type { IAvatarProps as AvatarProps } from './Avatar';
|
|
|
77
77
|
export { default as Icon } from './Icon';
|
|
78
78
|
export type { PageHeaderProps } from './PageHeader';
|
|
79
79
|
export { default as PageHeader } from './PageHeader';
|
|
80
|
-
export type { PopconfirmProps } from './
|
|
81
|
-
export { default as
|
|
80
|
+
export type { PopconfirmProps } from './Popconfirm';
|
|
81
|
+
export { default as Popconfirm } from './Popconfirm';
|
package/lib/index.js
CHANGED
|
@@ -135,10 +135,10 @@ Object.defineProperty(exports, "PageHeader", {
|
|
|
135
135
|
return _PageHeader.default;
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
|
-
Object.defineProperty(exports, "
|
|
138
|
+
Object.defineProperty(exports, "Popconfirm", {
|
|
139
139
|
enumerable: true,
|
|
140
140
|
get: function get() {
|
|
141
|
-
return
|
|
141
|
+
return _Popconfirm.default;
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
144
|
Object.defineProperty(exports, "Popover", {
|
|
@@ -330,6 +330,6 @@ var _Icon = _interopRequireDefault(require("./Icon"));
|
|
|
330
330
|
|
|
331
331
|
var _PageHeader = _interopRequireDefault(require("./PageHeader"));
|
|
332
332
|
|
|
333
|
-
var
|
|
333
|
+
var _Popconfirm = _interopRequireDefault(require("./Popconfirm"));
|
|
334
334
|
|
|
335
335
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aloudata/aloudata-design",
|
|
3
|
-
"version": "0.4.0-beta.
|
|
3
|
+
"version": "0.4.0-beta.6",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@aloudata/icons-react": "^0.0.10",
|
|
56
56
|
"@ant-design/icons": "^4.7.0",
|
|
57
|
-
"antd": "^4.
|
|
57
|
+
"antd": "^4.23.5",
|
|
58
58
|
"babel-preset-react-app": "^10.0.1",
|
|
59
59
|
"classnames": "^2.3.1",
|
|
60
60
|
"lodash": "^4.17.21",
|