@aloudata/aloudata-design 2.13.12 → 2.13.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aloudata/aloudata-design",
3
- "version": "2.13.12",
3
+ "version": "2.13.14",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",
@@ -1,68 +0,0 @@
1
- import React, { ReactElement } from 'react';
2
- import { ButtonType, Size } from '../Button';
3
- export type ActionType = 'hover' | 'click' | 'contextMenu';
4
- export interface IDropdownButton {
5
- /**
6
- * @description 类型
7
- * @type 'primary' | 'secondary' | 'danger' | 'text' | 'link'
8
- * @default primary
9
- */
10
- type?: ButtonType;
11
- /**
12
- * @description 尺寸
13
- * @type 'small' | 'default' | 'large'
14
- * @default large
15
- */
16
- size?: Size;
17
- /**
18
- * @description 是否禁用
19
- * @default false
20
- */
21
- disabled?: boolean;
22
- /**
23
- * @description 设置按钮的图标组件
24
- */
25
- icon?: React.ReactNode;
26
- /**
27
- * @description 设置按钮进入载入状态
28
- * @default false
29
- */
30
- loading?: boolean | {
31
- delay?: number;
32
- };
33
- /**
34
- * @description 菜单
35
- * @type Menu | () => Menu
36
- * @default -
37
- */
38
- overlay: ReactElement | (() => ReactElement);
39
- /**
40
- * @description 菜单弹出位置
41
- * @default bottomLeft
42
- */
43
- placement?: 'bottomLeft' | 'bottom' | 'bottomRight' | 'topLeft' | 'top' | 'topRight';
44
- /**
45
- * @description 触发下拉的行为
46
- * @type ActionType[], 其中 ActionType 为 'hover' | 'click' | 'contextMenu';
47
- * @default [hover]
48
- */
49
- trigger?: ActionType[];
50
- /**
51
- * @description 菜单是否显示
52
- * @default -
53
- */
54
- open?: boolean;
55
- /**
56
- * @description 菜单显示状态改变时调用,参数为 open,点击菜单按钮导致的消失不会触发
57
- * @default -
58
- */
59
- onOpenChange?: (open: boolean) => void;
60
- /**
61
- * @description 点击按钮时的回调
62
- * FIXME: onClick和trigger冲突,antd按钮和下拉菜单触发区域不同,需要和视觉确认
63
- */
64
- onClick?: React.MouseEventHandler<HTMLElement>;
65
- children?: React.ReactNode;
66
- className?: string;
67
- }
68
- export default function DropdownButton(props: IDropdownButton): React.JSX.Element;
@@ -1,25 +0,0 @@
1
- var _excluded = ["children", "overlay", "placement", "trigger", "open", "disabled", "onOpenChange"];
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; }
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; }
4
- import React from 'react';
5
- import Button from "../Button";
6
- import { FoldDownFill } from "../Icon";
7
- import Dropdown from "./index";
8
- export default function DropdownButton(props) {
9
- var children = props.children,
10
- overlay = props.overlay,
11
- placement = props.placement,
12
- trigger = props.trigger,
13
- open = props.open,
14
- disabled = props.disabled,
15
- onOpenChange = props.onOpenChange,
16
- buttonProps = _objectWithoutProperties(props, _excluded);
17
- return /*#__PURE__*/React.createElement(Dropdown, {
18
- overlay: overlay,
19
- placement: placement,
20
- trigger: trigger,
21
- open: open,
22
- disabled: disabled,
23
- onOpenChange: onOpenChange
24
- }, /*#__PURE__*/React.createElement(Button, buttonProps, children, /*#__PURE__*/React.createElement(FoldDownFill, null)));
25
- }