@aloudata/aloudata-design 0.4.0 → 0.4.1
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/dist/Button/style/index.less +1 -0
- package/dist/Menu/style/dropdown.less +51 -0
- package/dist/Menu/style/index.less +25 -35
- package/dist/Select/index.js +1 -0
- package/dist/Select/style/single.less +0 -1
- package/dist/Tree/index.d.ts +9 -4
- package/dist/Tree/index.js +3 -2
- package/dist/Upload/index.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
|
|
2
|
+
// Menu 和子menu的样式
|
|
3
|
+
.dropdown-menu-content {
|
|
4
|
+
background: @BG100;
|
|
5
|
+
border: 1px solid @BG70;
|
|
6
|
+
border-radius: 4px;
|
|
7
|
+
box-shadow: @shadow-L;
|
|
8
|
+
padding: 4px 0;
|
|
9
|
+
|
|
10
|
+
.ant-dropdown-menu-item-divider,
|
|
11
|
+
.ant-dropdown-menu-submenu-title-divider {
|
|
12
|
+
background-color: @BG70;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
|
|
16
|
+
background-color: unset;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ant-dropdown-menu-item {
|
|
20
|
+
padding: 6px 12px;
|
|
21
|
+
line-height: 20px;
|
|
22
|
+
font-size: 13px;
|
|
23
|
+
border-radius: 0;
|
|
24
|
+
|
|
25
|
+
&:hover {
|
|
26
|
+
background-color: @BG90;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.ant-dropdown-menu-item-disabled {
|
|
30
|
+
color: @NL50;
|
|
31
|
+
background-color: @BG100;
|
|
32
|
+
cursor: default;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ant-dropdown {
|
|
38
|
+
.ald-menu.ant-dropdown-menu {
|
|
39
|
+
.dropdown-menu-content();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ant-dropdown-menu-submenu {
|
|
44
|
+
.ant-dropdown-menu-sub {
|
|
45
|
+
.dropdown-menu-content();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ant-dropdown-menu-submenu-expand-icon {
|
|
50
|
+
top: 8px;
|
|
51
|
+
}
|
|
@@ -1,53 +1,43 @@
|
|
|
1
1
|
@import '../../style/index.less';
|
|
2
2
|
@import '../../Icon/index.less';
|
|
3
|
+
@import './dropdown.less';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
.
|
|
6
|
-
|
|
7
|
-
border: 1px solid @BG70;
|
|
8
|
-
border-radius: 4px;
|
|
9
|
-
box-shadow: @shadow-L;
|
|
10
|
-
padding: 4px 0;
|
|
11
|
-
|
|
12
|
-
.ant-dropdown-menu-item-divider,
|
|
13
|
-
.ant-dropdown-menu-submenu-title-divider {
|
|
14
|
-
background-color: @BG70;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
|
|
18
|
-
background-color: unset;
|
|
5
|
+
.ald-menu.ant-menu {
|
|
6
|
+
&.ant-menu-root.ant-menu-vertical {
|
|
7
|
+
border: none;
|
|
19
8
|
}
|
|
20
9
|
|
|
21
|
-
.ant-
|
|
10
|
+
.ant-menu-item,
|
|
11
|
+
.ant-menu-item-selected {
|
|
12
|
+
margin: 0;
|
|
13
|
+
height: initial;
|
|
22
14
|
padding: 6px 12px;
|
|
23
15
|
line-height: 20px;
|
|
24
16
|
font-size: 13px;
|
|
17
|
+
width: 100%;
|
|
25
18
|
border-radius: 0;
|
|
19
|
+
border: none;
|
|
20
|
+
background-color: @BG100;
|
|
21
|
+
color: @NL0;
|
|
22
|
+
transition: none;
|
|
26
23
|
|
|
27
24
|
&:hover {
|
|
28
|
-
background-color: @BG90;
|
|
25
|
+
background-color: @BG90 !important;
|
|
29
26
|
}
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
color:
|
|
33
|
-
background-color: @BG100;
|
|
34
|
-
cursor: default;
|
|
28
|
+
&:active {
|
|
29
|
+
background-color: none;
|
|
35
30
|
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
31
|
|
|
39
|
-
.ant-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
}
|
|
32
|
+
&:not(.ant-menu-item-selected):active {
|
|
33
|
+
background-color:@BG90 ;
|
|
34
|
+
}
|
|
44
35
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
&.ant-menu-item-disabled {
|
|
37
|
+
color: @NL50 !important;
|
|
38
|
+
transition: none;
|
|
39
|
+
background-color: @BG100 !important;
|
|
40
|
+
cursor: default;
|
|
41
|
+
}
|
|
48
42
|
}
|
|
49
43
|
}
|
|
50
|
-
|
|
51
|
-
.ant-dropdown-menu-submenu-expand-icon {
|
|
52
|
-
top: 8px;
|
|
53
|
-
}
|
package/dist/Select/index.js
CHANGED
|
@@ -53,6 +53,7 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
53
53
|
selectedOptions = _React$useState2[0],
|
|
54
54
|
setSelectedOptions = _React$useState2[1];
|
|
55
55
|
|
|
56
|
+
style.width = style.width || '100%';
|
|
56
57
|
var dropDownTimeRef = React.useRef(0);
|
|
57
58
|
|
|
58
59
|
var _React$useState3 = React.useState(open),
|
package/dist/Tree/index.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { DataNode } from 'antd/es/tree';
|
|
2
|
+
import RcTree from 'rc-tree';
|
|
2
3
|
import { AntdTreeNodeAttribute, AntTreeNode, AntTreeNodeCheckedEvent, AntTreeNodeExpandedEvent, AntTreeNodeMouseEvent, AntTreeNodeProps, AntTreeNodeSelectedEvent, TreeProps as AntdTreeProps } from 'antd/es/tree/Tree';
|
|
4
|
+
import { BasicDataNode } from 'rc-tree/lib/interface';
|
|
5
|
+
import React, { ForwardedRef } from 'react';
|
|
3
6
|
export type { DataNode, EventDataNode } from 'antd/es/tree';
|
|
4
7
|
export type { DirectoryTreeProps, ExpandAction as DirectoryTreeExpandAction, } from 'antd/es/tree/DirectoryTree';
|
|
5
|
-
declare type TreeProps = Omit<AntdTreeProps
|
|
6
|
-
declare function Tree(props: TreeProps): JSX.Element;
|
|
8
|
+
declare type TreeProps<T extends BasicDataNode = DataNode> = Omit<AntdTreeProps<T>, 'switcherIcon'>;
|
|
7
9
|
export type { TreeProps, AntTreeNode, AntTreeNodeMouseEvent, AntTreeNodeExpandedEvent, AntTreeNodeCheckedEvent, AntTreeNodeSelectedEvent, AntdTreeNodeAttribute, AntTreeNodeProps, };
|
|
8
|
-
|
|
10
|
+
declare const _default: <T extends BasicDataNode = DataNode>(props: TreeProps<T> & {
|
|
11
|
+
ref?: React.ForwardedRef<RcTree<DataNode>> | undefined;
|
|
12
|
+
}) => React.ReactElement;
|
|
13
|
+
export default _default;
|
package/dist/Tree/index.js
CHANGED
|
@@ -5,9 +5,10 @@ import { Tree as AntdTree } from 'antd';
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import theme from "../style/themes/default/themeColor.module.less";
|
|
7
7
|
|
|
8
|
-
function Tree(props) {
|
|
8
|
+
function Tree(props, ref) {
|
|
9
9
|
var restProps = Object.assign({}, props);
|
|
10
10
|
return /*#__PURE__*/React.createElement(AntdTree, _extends({}, restProps, {
|
|
11
|
+
ref: ref,
|
|
11
12
|
switcherIcon: /*#__PURE__*/React.createElement(ChevronDownLine, {
|
|
12
13
|
size: 14,
|
|
13
14
|
fill: theme.NL40
|
|
@@ -15,4 +16,4 @@ function Tree(props) {
|
|
|
15
16
|
}));
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
export default Tree;
|
|
19
|
+
export default /*#__PURE__*/React.forwardRef(Tree);
|
package/dist/Upload/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Upload } from 'antd';
|
|
2
|
-
export type { UploadProps, UploadListProps, UploadChangeParam, RcFile, } from 'antd/es/upload/interface';
|
|
2
|
+
export type { UploadProps, UploadListProps, UploadChangeParam, UploadFile, RcFile, } from 'antd/es/upload/interface';
|
|
3
3
|
export type { DraggerProps } from 'antd/es/upload/Dragger';
|
|
4
4
|
export default Upload;
|
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export type { ColProps } from './Col';
|
|
|
26
26
|
export type { TypographyProps } from './Typography';
|
|
27
27
|
export { default as Typography } from './Typography';
|
|
28
28
|
export { default as Upload } from './Upload';
|
|
29
|
-
export type { UploadProps } from './Upload';
|
|
29
|
+
export type { UploadProps, UploadFile } from './Upload';
|
|
30
30
|
export { default as ConfigProvider } from './ConfigProvider';
|
|
31
31
|
export { default as DatePicker } from './DatePicker';
|
|
32
32
|
export type { DatePickerProps } from './DatePicker';
|
package/package.json
CHANGED