@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.
- 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/Icon/icons.js +135 -58
- package/es/Input/components/Password/index.d.ts +1 -1
- package/es/Input/components/TextArea/index.d.ts +1 -1
- 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/Table/interface.d.ts +1 -0
- package/es/Table/utils.js +15 -8
- 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/es/style/themes/default/scrollBar.less +10 -7
- 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/Icon/icons.js +135 -58
- package/lib/Input/components/Password/index.d.ts +1 -1
- package/lib/Input/components/TextArea/index.d.ts +1 -1
- 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/Table/interface.d.ts +1 -0
- package/lib/Table/utils.js +15 -8
- 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/lib/style/themes/default/scrollBar.less +10 -7
- package/package.json +3 -3
- package/es/Table/hooks/useTableColumn.d.ts +0 -28
- package/es/Table/hooks/useTableColumn.js +0 -53
- package/lib/Table/hooks/useTableColumn.d.ts +0 -28
- package/lib/Table/hooks/useTableColumn.js +0 -66
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);
|