@antscorp/antsomi-ui 1.3.5-beta.694 → 1.3.5-beta.695
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.
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Tree as AntdTree } from 'antd';
|
|
4
4
|
import type { TreeProps, TreeDataNode } from 'antd';
|
|
5
|
+
declare const StandardTree: React.FC<TreeProps>;
|
|
5
6
|
export declare const Tree: string & import("styled-components").StyledComponentBase<(<T extends import("rc-tree").BasicDataNode | TreeDataNode = TreeDataNode>(props: TreeProps<T> & {
|
|
6
7
|
children?: React.ReactNode;
|
|
7
8
|
} & React.RefAttributes<import("rc-tree").default<TreeDataNode>>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
|
|
@@ -22,5 +23,6 @@ export declare const Tree: string & import("styled-components").StyledComponentB
|
|
|
22
23
|
};
|
|
23
24
|
}, {}> & {
|
|
24
25
|
DirectoryTree: typeof AntdTree.DirectoryTree;
|
|
26
|
+
StandardTree: typeof StandardTree;
|
|
25
27
|
};
|
|
26
28
|
export type { TreeProps, TreeDataNode };
|
|
@@ -10,17 +10,19 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import React from 'react';
|
|
13
|
+
import { Tree as AntdTree } from 'antd';
|
|
13
14
|
// styled
|
|
14
|
-
import {
|
|
15
|
+
import { StyledTreeDirectory } from './styled';
|
|
15
16
|
// icon
|
|
16
17
|
import { ExpandMoreIcon } from '../../icons';
|
|
17
18
|
const StandardTree = props => {
|
|
18
|
-
const { switcherIcon = React.createElement(ExpandMoreIcon,
|
|
19
|
-
return React.createElement(
|
|
19
|
+
const { switcherIcon = React.createElement(ExpandMoreIcon, { size: 20 }) } = props, restProps = __rest(props, ["switcherIcon"]);
|
|
20
|
+
return React.createElement(AntdTree, Object.assign({ switcherIcon: switcherIcon }, restProps));
|
|
21
|
+
// return <StyledTree switcherIcon={(props) => <ExpandMoreIcon size={20} />} {...restProps} />;
|
|
20
22
|
};
|
|
21
|
-
export const Tree =
|
|
23
|
+
export const Tree = AntdTree;
|
|
22
24
|
const DirectoryTree = props => {
|
|
23
|
-
const { switcherIcon = React.createElement(ExpandMoreIcon,
|
|
25
|
+
const { switcherIcon = React.createElement(ExpandMoreIcon, { size: 20 }) } = props, restProps = __rest(props, ["switcherIcon"]);
|
|
24
26
|
return React.createElement(StyledTreeDirectory, Object.assign({ switcherIcon: switcherIcon }, restProps));
|
|
25
27
|
};
|
|
26
28
|
Tree.DirectoryTree = DirectoryTree;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { Tree } from 'antd';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
export const StyledTree = styled(Tree) `
|
|
4
|
+
/* .antsomi-tree-treenode.placement-right { */
|
|
4
5
|
.antsomi-tree-treenode {
|
|
5
6
|
.antsomi-tree-switcher {
|
|
6
7
|
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
7
10
|
order: 10;
|
|
8
|
-
&_close {
|
|
11
|
+
/* &_close {
|
|
9
12
|
transform: rotate(-90deg);
|
|
10
|
-
}
|
|
13
|
+
} */
|
|
11
14
|
}
|
|
12
15
|
}
|
|
13
16
|
`;
|
|
@@ -16,6 +19,9 @@ export const StyledTreeDirectory = styled(Tree.DirectoryTree) `
|
|
|
16
19
|
.antsomi-tree-switcher {
|
|
17
20
|
display: flex;
|
|
18
21
|
order: 10;
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: center;
|
|
19
25
|
&_close {
|
|
20
26
|
transform: rotate(-90deg);
|
|
21
27
|
}
|
package/es/constants/theme.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
1
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6;
|
|
2
2
|
// Types
|
|
3
3
|
import { theme } from 'antd';
|
|
4
4
|
// Variables
|
|
@@ -177,8 +177,10 @@ THEME.components = {
|
|
|
177
177
|
borderRadiusSM: 5,
|
|
178
178
|
},
|
|
179
179
|
Tree: {
|
|
180
|
+
directoryNodeSelectedBg: 'transparent',
|
|
181
|
+
directoryNodeSelectedColor: (_w = THEME.token) === null || _w === void 0 ? void 0 : _w.colorText,
|
|
180
182
|
controlInteractiveSize: 18,
|
|
181
|
-
colorBorder: (
|
|
183
|
+
colorBorder: (_x = THEME.token) === null || _x === void 0 ? void 0 : _x.colorPrimary,
|
|
182
184
|
nodeHoverBg: 'transparent',
|
|
183
185
|
lineWidth: 2,
|
|
184
186
|
borderRadiusSM: 5,
|
|
@@ -196,7 +198,7 @@ THEME.components = {
|
|
|
196
198
|
paddingMD: 0,
|
|
197
199
|
},
|
|
198
200
|
Tabs: {
|
|
199
|
-
itemColor: (
|
|
201
|
+
itemColor: (_y = THEME.token) === null || _y === void 0 ? void 0 : _y.bw8,
|
|
200
202
|
horizontalItemPadding: '17px 30px',
|
|
201
203
|
horizontalItemGutter: 0,
|
|
202
204
|
lineWidthBold: 3,
|
|
@@ -208,7 +210,7 @@ THEME.components = {
|
|
|
208
210
|
lineHeight: 1.143,
|
|
209
211
|
lineHeightLG: 1.143,
|
|
210
212
|
lineHeightSM: 1.143,
|
|
211
|
-
itemHoverColor: (
|
|
213
|
+
itemHoverColor: (_z = THEME.token) === null || _z === void 0 ? void 0 : _z.colorPrimary,
|
|
212
214
|
},
|
|
213
215
|
Collapse: {
|
|
214
216
|
headerBg: '#FFF',
|
|
@@ -216,13 +218,13 @@ THEME.components = {
|
|
|
216
218
|
headerPadding: '15px 10px',
|
|
217
219
|
},
|
|
218
220
|
Switch: {
|
|
219
|
-
colorTextQuaternary: (
|
|
220
|
-
colorTextTertiary: (
|
|
221
|
+
colorTextQuaternary: (_0 = THEME.token) === null || _0 === void 0 ? void 0 : _0.bw0,
|
|
222
|
+
colorTextTertiary: (_1 = THEME.token) === null || _1 === void 0 ? void 0 : _1.bw0,
|
|
221
223
|
handleSize: 8,
|
|
222
224
|
handleSizeSM: 7,
|
|
223
225
|
trackMinWidth: 27,
|
|
224
226
|
trackHeight: 16,
|
|
225
|
-
handleBg: (
|
|
227
|
+
handleBg: (_2 = THEME.token) === null || _2 === void 0 ? void 0 : _2.colorPrimary,
|
|
226
228
|
},
|
|
227
229
|
Popover: {
|
|
228
230
|
borderRadiusLG: 10,
|
|
@@ -234,11 +236,11 @@ THEME.components = {
|
|
|
234
236
|
paddingXXS: 8,
|
|
235
237
|
controlItemBgHover: '#F2F9FF',
|
|
236
238
|
controlItemBgActive: '#DEEFFE',
|
|
237
|
-
colorPrimary: (
|
|
239
|
+
colorPrimary: (_3 = THEME.token) === null || _3 === void 0 ? void 0 : _3.colorText,
|
|
238
240
|
controlItemBgActiveHover: '#DEEFFE',
|
|
239
241
|
},
|
|
240
242
|
Tooltip: {
|
|
241
|
-
colorBgSpotlight: (
|
|
243
|
+
colorBgSpotlight: (_4 = THEME.token) === null || _4 === void 0 ? void 0 : _4.bw8,
|
|
242
244
|
fontSize: 11,
|
|
243
245
|
},
|
|
244
246
|
Menu: {
|
|
@@ -248,8 +250,8 @@ THEME.components = {
|
|
|
248
250
|
itemMarginBlock: 5,
|
|
249
251
|
itemBorderRadius: 5,
|
|
250
252
|
subMenuItemBg: 'transparent',
|
|
251
|
-
itemDisabledColor: (
|
|
252
|
-
itemActiveBg: (
|
|
253
|
+
itemDisabledColor: (_5 = THEME.token) === null || _5 === void 0 ? void 0 : _5.colorTextDisabled,
|
|
254
|
+
itemActiveBg: (_6 = THEME.token) === null || _6 === void 0 ? void 0 : _6.blue1_1,
|
|
253
255
|
},
|
|
254
256
|
Form: {
|
|
255
257
|
itemMarginBottom: 15,
|