@aloudata/aloudata-design 0.3.2 → 0.3.5
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 +1 -0
- package/es/Button/index.js +3 -2
- package/es/Button/style/index.less +135 -126
- package/es/Button/style/variables.less +53 -53
- package/es/Checkbox/index.d.ts +1 -0
- package/es/ConfigProvider/defaultRenderEmpty.d.ts +4 -0
- package/es/ConfigProvider/defaultRenderEmpty.js +37 -0
- package/es/ConfigProvider/sizeContext.d.ts +9 -0
- package/es/ConfigProvider/sizeContext.js +12 -0
- package/es/Dropdown/Button.js +3 -2
- package/es/Empty/image/Authority.d.ts +1 -0
- package/es/Empty/image/Dataspace.d.ts +1 -0
- package/es/Empty/image/Search.d.ts +1 -0
- package/es/Empty/image/Simple.d.ts +1 -0
- package/es/Empty/image/Worksheet.d.ts +1 -0
- package/es/Empty/image/empty.d.ts +1 -0
- package/es/Icon/icons.json +418 -0
- package/es/Input/components/Group/index.d.ts +3 -1
- package/es/Input/components/Group/index.js +6 -12
- package/es/Input/components/Input/index.d.ts +3 -2
- package/es/Input/components/Input/index.js +11 -23
- package/es/Input/components/Password/index.js +11 -16
- package/es/Input/components/TextArea/index.d.ts +8 -1
- package/es/Input/components/TextArea/index.js +8 -1
- package/es/Input/style/index.less +180 -102
- package/es/InputNumber/index.d.ts +1 -0
- package/es/InputNumber/style/index.less +69 -69
- package/es/Menu/Divider.d.ts +1 -0
- package/es/Modal/index.js +4 -7
- package/es/Modal/style/index.less +48 -45
- package/es/Navigator/components/Header/index.d.ts +1 -0
- package/es/Navigator/components/Menu/index.d.ts +1 -0
- package/es/PageHeader/index.d.ts +3 -0
- package/es/PageHeader/index.js +3 -0
- package/es/PageHeader/style/index.d.ts +2 -0
- package/es/PageHeader/style/index.js +2 -0
- package/es/PageHeader/style/index.less +1 -0
- package/es/Popover/index.d.ts +1 -0
- package/es/Radio/components/Group/index.d.ts +6 -0
- package/es/Radio/components/Group/index.js +74 -0
- package/es/Radio/components/Radio/index.d.ts +3 -0
- package/es/Radio/components/Radio/index.js +95 -0
- package/es/Radio/index.d.ts +9 -2
- package/es/Radio/index.js +5 -3
- package/es/Radio/interface/radio.d.ts +24 -0
- package/es/Radio/interface/radio.js +1 -0
- package/es/Radio/interface/radioGroup.d.ts +42 -0
- package/es/Radio/interface/radioGroup.js +1 -0
- package/es/Radio/style/index.less +348 -0
- package/es/Select/index.js +1 -1
- package/es/Select/rc-select/OptionList.js +3 -2
- package/es/Select/rc-select/hooks/useOptions.d.ts +1 -1
- package/es/Select/style/index.less +50 -49
- package/es/Select/style/variables.less +45 -45
- package/es/Select/utils/iconUtil.d.ts +2 -2
- package/es/Select/utils/iconUtil.js +6 -4
- package/es/Steps/components/ProcessIcon/index.d.ts +6 -0
- package/es/Steps/components/ProcessIcon/index.js +8 -0
- package/es/Steps/components/Step/index.d.ts +20 -0
- package/es/Steps/components/Step/index.js +45 -0
- package/es/Steps/index.d.ts +36 -2
- package/es/Steps/index.js +30 -1
- package/es/Steps/matchMedia.mock.d.ts +1 -0
- package/es/Steps/matchMedia.mock.js +17 -0
- package/es/Steps/style/index.less +251 -0
- package/es/Switch/index.d.ts +46 -2
- package/es/Switch/index.js +71 -1
- package/es/Switch/style/index.less +129 -0
- package/es/Table/Table.d.ts +2 -1
- package/es/Table/Table.js +223 -330
- package/es/Table/components/Empty/index.d.ts +3 -0
- package/es/Table/components/Empty/index.js +16 -0
- package/es/Table/components/Loading/index.d.ts +3 -0
- package/es/Table/components/Loading/index.js +18 -0
- package/es/Table/components/TableBodyRowList/index.d.ts +13 -0
- package/es/Table/components/TableBodyRowList/index.js +91 -0
- package/es/Table/components/TableHead/index.d.ts +23 -0
- package/es/Table/components/TableHead/index.js +262 -0
- package/es/Table/constant.d.ts +1 -0
- package/es/Table/constant.js +1 -0
- package/es/Table/hooks/useFrame.d.ts +7 -0
- package/es/Table/hooks/useFrame.js +90 -0
- package/es/Table/hooks/useTableColumn.d.ts +28 -0
- package/es/Table/hooks/useTableColumn.js +53 -0
- package/es/Table/interface.d.ts +3 -2
- package/es/Table/style/index.less +41 -37
- package/es/Table/style/index.less.d.ts +126 -0
- package/es/Table/style/variable.less +10 -0
- package/es/Table/style/variable.less.d.ts +7 -0
- package/es/Table/utils.d.ts +15 -0
- package/es/Table/utils.js +131 -0
- package/es/Tabs/index.js +3 -2
- package/es/Tabs/style/index.less +25 -25
- package/es/_utils/hooks/useId.d.ts +4 -0
- package/es/_utils/hooks/useId.js +23 -0
- package/es/index.d.ts +7 -5
- package/es/index.js +2 -1
- package/es/locale-provider/index.d.ts +5 -1
- package/es/style/index.d.ts +0 -1
- package/es/style/index.js +0 -1
- package/es/style/index.less +2 -2
- package/es/style/themes/default/index.less +30 -30
- package/lib/Breadcrumb/index.d.ts +1 -0
- package/lib/Button/index.js +5 -3
- package/lib/Button/style/index.less +135 -126
- package/lib/Button/style/variables.less +53 -53
- package/lib/Checkbox/index.d.ts +1 -0
- package/lib/ConfigProvider/defaultRenderEmpty.d.ts +4 -0
- package/lib/ConfigProvider/defaultRenderEmpty.js +55 -0
- package/lib/ConfigProvider/sizeContext.d.ts +9 -0
- package/lib/ConfigProvider/sizeContext.js +30 -0
- package/lib/Dropdown/Button.js +7 -5
- package/lib/Empty/image/Authority.d.ts +1 -0
- package/lib/Empty/image/Dataspace.d.ts +1 -0
- package/lib/Empty/image/Search.d.ts +1 -0
- package/lib/Empty/image/Simple.d.ts +1 -0
- package/lib/Empty/image/Worksheet.d.ts +1 -0
- package/lib/Empty/image/empty.d.ts +1 -0
- package/lib/Icon/icons.json +418 -0
- package/lib/Input/components/Group/index.d.ts +3 -1
- package/lib/Input/components/Group/index.js +7 -12
- package/lib/Input/components/Input/index.d.ts +3 -2
- package/lib/Input/components/Input/index.js +13 -23
- package/lib/Input/components/Password/index.js +13 -17
- package/lib/Input/components/TextArea/index.d.ts +8 -1
- package/lib/Input/components/TextArea/index.js +10 -1
- package/lib/Input/style/index.less +180 -102
- package/lib/InputNumber/index.d.ts +1 -0
- package/lib/InputNumber/style/index.less +69 -69
- package/lib/Menu/Divider.d.ts +1 -0
- package/lib/Modal/index.js +8 -10
- package/lib/Modal/style/index.less +48 -45
- package/lib/Navigator/components/Header/index.d.ts +1 -0
- package/lib/Navigator/components/Menu/index.d.ts +1 -0
- package/lib/PageHeader/index.d.ts +3 -0
- package/lib/PageHeader/index.js +15 -0
- package/lib/PageHeader/style/index.d.ts +2 -0
- package/lib/PageHeader/style/index.js +5 -0
- package/lib/PageHeader/style/index.less +1 -0
- package/lib/Popover/index.d.ts +1 -0
- package/lib/Radio/components/Group/index.d.ts +6 -0
- package/lib/Radio/components/Group/index.js +95 -0
- package/lib/Radio/components/Radio/index.d.ts +3 -0
- package/lib/Radio/components/Radio/index.js +115 -0
- package/lib/Radio/index.d.ts +9 -2
- package/lib/Radio/index.js +5 -3
- package/lib/Radio/interface/radio.d.ts +24 -0
- package/lib/Radio/interface/radio.js +5 -0
- package/lib/Radio/interface/radioGroup.d.ts +42 -0
- package/lib/Radio/interface/radioGroup.js +5 -0
- package/lib/Radio/style/index.less +348 -0
- package/lib/Select/index.js +1 -1
- package/lib/Select/rc-select/OptionList.js +7 -5
- package/lib/Select/rc-select/hooks/useOptions.d.ts +1 -1
- package/lib/Select/style/index.less +50 -49
- package/lib/Select/style/variables.less +45 -45
- package/lib/Select/utils/iconUtil.d.ts +2 -2
- package/lib/Select/utils/iconUtil.js +10 -8
- package/lib/Steps/components/ProcessIcon/index.d.ts +6 -0
- package/lib/Steps/components/ProcessIcon/index.js +19 -0
- package/lib/Steps/components/Step/index.d.ts +20 -0
- package/lib/Steps/components/Step/index.js +61 -0
- package/lib/Steps/index.d.ts +36 -2
- package/lib/Steps/index.js +34 -1
- package/lib/Steps/matchMedia.mock.d.ts +1 -0
- package/lib/Steps/matchMedia.mock.js +17 -0
- package/lib/Steps/style/index.less +251 -0
- package/lib/Switch/index.d.ts +46 -2
- package/lib/Switch/index.js +78 -1
- package/lib/Switch/style/index.less +129 -0
- package/lib/Table/Table.d.ts +2 -1
- package/lib/Table/Table.js +229 -332
- package/lib/Table/components/Empty/index.d.ts +3 -0
- package/lib/Table/components/Empty/index.js +28 -0
- package/lib/Table/components/Loading/index.d.ts +3 -0
- package/lib/Table/components/Loading/index.js +31 -0
- package/lib/Table/components/TableBodyRowList/index.d.ts +13 -0
- package/lib/Table/components/TableBodyRowList/index.js +110 -0
- package/lib/Table/components/TableHead/index.d.ts +23 -0
- package/lib/Table/components/TableHead/index.js +286 -0
- package/lib/Table/constant.d.ts +1 -0
- package/lib/Table/constant.js +1 -0
- package/lib/Table/hooks/useFrame.d.ts +7 -0
- package/lib/Table/hooks/useFrame.js +98 -0
- package/lib/Table/hooks/useTableColumn.d.ts +28 -0
- package/lib/Table/hooks/useTableColumn.js +66 -0
- package/lib/Table/interface.d.ts +3 -2
- package/lib/Table/style/index.less +41 -37
- package/lib/Table/style/index.less.d.ts +126 -0
- package/lib/Table/style/variable.less +10 -0
- package/lib/Table/style/variable.less.d.ts +7 -0
- package/lib/Table/utils.d.ts +15 -0
- package/lib/Table/utils.js +147 -0
- package/lib/Tabs/index.js +5 -3
- package/lib/Tabs/style/index.less +25 -25
- package/lib/_utils/hooks/useId.d.ts +4 -0
- package/lib/_utils/hooks/useId.js +36 -0
- package/lib/index.d.ts +7 -5
- package/lib/index.js +8 -0
- package/lib/locale-provider/index.d.ts +5 -1
- package/lib/style/index.d.ts +0 -1
- package/lib/style/index.js +0 -2
- package/lib/style/index.less +2 -2
- package/lib/style/themes/default/index.less +30 -30
- package/package.json +2 -1
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/* stylelint-disable property-no-unknown */
|
|
2
2
|
|
|
3
|
-
@
|
|
4
|
-
@
|
|
3
|
+
@import '../../style/index.less';
|
|
4
|
+
@import '../../Empty/style/index.less';
|
|
5
|
+
@import '../../message/style/index.less';
|
|
6
|
+
@import './variable.less';
|
|
5
7
|
|
|
6
8
|
.ald-table {
|
|
7
9
|
display: flex;
|
|
8
10
|
flex-direction: column;
|
|
9
11
|
width: 100%;
|
|
10
|
-
height: 100%;
|
|
11
12
|
overflow: hidden;
|
|
13
|
+
user-select: none;
|
|
12
14
|
|
|
13
15
|
&-page-loading {
|
|
14
16
|
opacity: 0;
|
|
@@ -21,6 +23,17 @@
|
|
|
21
23
|
overflow: hidden;
|
|
22
24
|
}
|
|
23
25
|
|
|
26
|
+
&-inner-wrap {
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 100%;
|
|
29
|
+
overflow-x: overlay;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-tableHeadScrollWrap {
|
|
33
|
+
width: 100%;
|
|
34
|
+
overflow-x: hidden;
|
|
35
|
+
}
|
|
36
|
+
|
|
24
37
|
&-cell {
|
|
25
38
|
flex-grow: 1;
|
|
26
39
|
height: unset;
|
|
@@ -35,8 +48,7 @@
|
|
|
35
48
|
}
|
|
36
49
|
|
|
37
50
|
&-row {
|
|
38
|
-
|
|
39
|
-
height: 48px;
|
|
51
|
+
height: @table-head-row-height;
|
|
40
52
|
|
|
41
53
|
&-ellipsis {
|
|
42
54
|
.ald-table-cell {
|
|
@@ -48,8 +60,12 @@
|
|
|
48
60
|
}
|
|
49
61
|
|
|
50
62
|
&-thead {
|
|
63
|
+
flex: 1;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
|
|
51
66
|
.ald-table-row {
|
|
52
|
-
|
|
67
|
+
min-width: 9999px; // 防止拖动时的闪动
|
|
68
|
+
height: @table-head-row-height;
|
|
53
69
|
}
|
|
54
70
|
|
|
55
71
|
.ald-table-cell {
|
|
@@ -57,7 +73,7 @@
|
|
|
57
73
|
padding: 14px 24px;
|
|
58
74
|
color: @NL50;
|
|
59
75
|
line-height: 20px;
|
|
60
|
-
background-color: @
|
|
76
|
+
background-color: @BG95;
|
|
61
77
|
|
|
62
78
|
.ald-table-cell-content {
|
|
63
79
|
overflow: hidden;
|
|
@@ -72,7 +88,7 @@
|
|
|
72
88
|
z-index: 1;
|
|
73
89
|
display: inline-block;
|
|
74
90
|
width: 12px;
|
|
75
|
-
height:
|
|
91
|
+
height: 14px;
|
|
76
92
|
transform: translateY(-50%);
|
|
77
93
|
touch-action: none;
|
|
78
94
|
|
|
@@ -80,7 +96,7 @@
|
|
|
80
96
|
display: block;
|
|
81
97
|
width: 1px;
|
|
82
98
|
height: 100%;
|
|
83
|
-
background-color: @
|
|
99
|
+
background-color: @BG70;
|
|
84
100
|
content: '';
|
|
85
101
|
}
|
|
86
102
|
}
|
|
@@ -103,11 +119,12 @@
|
|
|
103
119
|
}
|
|
104
120
|
|
|
105
121
|
.ald-table-row {
|
|
106
|
-
height:
|
|
122
|
+
height: @table-body-row-height;
|
|
107
123
|
|
|
108
124
|
.ald-table-cell {
|
|
109
|
-
|
|
110
|
-
|
|
125
|
+
display: flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
padding-left: 24px;
|
|
111
128
|
}
|
|
112
129
|
|
|
113
130
|
&:hover {
|
|
@@ -124,10 +141,18 @@
|
|
|
124
141
|
}
|
|
125
142
|
}
|
|
126
143
|
|
|
144
|
+
&-tbody&-tbody-innerScroll {
|
|
145
|
+
overflow: hidden;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&-row-list-wrap {
|
|
149
|
+
overflow: unset;
|
|
150
|
+
}
|
|
151
|
+
|
|
127
152
|
&-loading {
|
|
128
|
-
height:
|
|
153
|
+
height: @table-body-row-height;
|
|
129
154
|
color: @NL80;
|
|
130
|
-
line-height: @table-row-height;
|
|
155
|
+
line-height: @table-body-row-height;
|
|
131
156
|
text-align: center;
|
|
132
157
|
|
|
133
158
|
&-icon {
|
|
@@ -145,6 +170,7 @@
|
|
|
145
170
|
align-items: center;
|
|
146
171
|
justify-content: center;
|
|
147
172
|
padding-top: 84px;
|
|
173
|
+
padding-bottom: 84px;
|
|
148
174
|
}
|
|
149
175
|
}
|
|
150
176
|
|
|
@@ -170,33 +196,11 @@
|
|
|
170
196
|
}
|
|
171
197
|
}
|
|
172
198
|
|
|
173
|
-
/* stylelint-disable-next-line selector-class-pattern */
|
|
174
|
-
&-list&-innerScroll {
|
|
175
|
-
height: 100%;
|
|
176
|
-
overflow: overlay !important;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
199
|
// 当出现多行的时候 会顶出一个滚动条 通过复写三方库的样式覆盖
|
|
180
200
|
&-list&-canNotInnerScroll {
|
|
181
201
|
overflow: hidden !important;
|
|
182
202
|
}
|
|
183
203
|
|
|
184
|
-
&-list {
|
|
185
|
-
&::-webkit-scrollbar-thumb {
|
|
186
|
-
background: @NL90;
|
|
187
|
-
background-clip: padding-box;
|
|
188
|
-
border: 3px solid transparent;
|
|
189
|
-
border-radius: 6px;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
&::-webkit-scrollbar {
|
|
193
|
-
width: 12px;
|
|
194
|
-
height: 12px;
|
|
195
|
-
min-height: 12px;
|
|
196
|
-
background-color: transparent;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
204
|
&-sortIcon {
|
|
201
205
|
margin-top: -2px;
|
|
202
206
|
margin-left: 4px;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// This file is automatically generated.
|
|
2
|
+
// Please do not change this file!
|
|
3
|
+
interface CssExports {
|
|
4
|
+
'B10': string;
|
|
5
|
+
'B20': string;
|
|
6
|
+
'B30': string;
|
|
7
|
+
'B40': string;
|
|
8
|
+
'B50': string;
|
|
9
|
+
'B60': string;
|
|
10
|
+
'B70': string;
|
|
11
|
+
'B80': string;
|
|
12
|
+
'B90': string;
|
|
13
|
+
'B95': string;
|
|
14
|
+
'B98': string;
|
|
15
|
+
'BG0': string;
|
|
16
|
+
'BG10': string;
|
|
17
|
+
'BG100': string;
|
|
18
|
+
'BG20': string;
|
|
19
|
+
'BG30': string;
|
|
20
|
+
'BG40': string;
|
|
21
|
+
'BG50': string;
|
|
22
|
+
'BG60': string;
|
|
23
|
+
'BG70': string;
|
|
24
|
+
'BG80': string;
|
|
25
|
+
'BG90': string;
|
|
26
|
+
'BG95': string;
|
|
27
|
+
'BG97': string;
|
|
28
|
+
'BLACK': string;
|
|
29
|
+
'IMAGE_HOLDER': string;
|
|
30
|
+
'MATE': string;
|
|
31
|
+
'ND0': string;
|
|
32
|
+
'ND10': string;
|
|
33
|
+
'ND20': string;
|
|
34
|
+
'ND30': string;
|
|
35
|
+
'ND40': string;
|
|
36
|
+
'ND50': string;
|
|
37
|
+
'ND60': string;
|
|
38
|
+
'ND70': string;
|
|
39
|
+
'ND80': string;
|
|
40
|
+
'ND90': string;
|
|
41
|
+
'ND95': string;
|
|
42
|
+
'ND97': string;
|
|
43
|
+
'NL0': string;
|
|
44
|
+
'NL10': string;
|
|
45
|
+
'NL20': string;
|
|
46
|
+
'NL30': string;
|
|
47
|
+
'NL40': string;
|
|
48
|
+
'NL50': string;
|
|
49
|
+
'NL60': string;
|
|
50
|
+
'NL70': string;
|
|
51
|
+
'NL80': string;
|
|
52
|
+
'NL90': string;
|
|
53
|
+
'NL95': string;
|
|
54
|
+
'NL97': string;
|
|
55
|
+
'SA10': string;
|
|
56
|
+
'SA20': string;
|
|
57
|
+
'SA30': string;
|
|
58
|
+
'SA40': string;
|
|
59
|
+
'SA50': string;
|
|
60
|
+
'SA60': string;
|
|
61
|
+
'SA70': string;
|
|
62
|
+
'SA80': string;
|
|
63
|
+
'SA90': string;
|
|
64
|
+
'SA95': string;
|
|
65
|
+
'SA98': string;
|
|
66
|
+
'SB10': string;
|
|
67
|
+
'SB20': string;
|
|
68
|
+
'SB30': string;
|
|
69
|
+
'SB40': string;
|
|
70
|
+
'SB50': string;
|
|
71
|
+
'SB60': string;
|
|
72
|
+
'SB70': string;
|
|
73
|
+
'SB80': string;
|
|
74
|
+
'SB90': string;
|
|
75
|
+
'SB95': string;
|
|
76
|
+
'SB98': string;
|
|
77
|
+
'SC10': string;
|
|
78
|
+
'SC20': string;
|
|
79
|
+
'SC30': string;
|
|
80
|
+
'SC40': string;
|
|
81
|
+
'SC50': string;
|
|
82
|
+
'SC60': string;
|
|
83
|
+
'SC70': string;
|
|
84
|
+
'SC80': string;
|
|
85
|
+
'SC90': string;
|
|
86
|
+
'SC95': string;
|
|
87
|
+
'SC98': string;
|
|
88
|
+
'SHADOW_L': string;
|
|
89
|
+
'TableHeadRowHeight': string;
|
|
90
|
+
'WHITE': string;
|
|
91
|
+
'ald-empty': string;
|
|
92
|
+
'ald-empty-description': string;
|
|
93
|
+
'ald-empty-image': string;
|
|
94
|
+
'ald-empty-img': string;
|
|
95
|
+
'ald-empty-large': string;
|
|
96
|
+
'ald-empty-small': string;
|
|
97
|
+
'ald-empty-title': string;
|
|
98
|
+
'ald-table': string;
|
|
99
|
+
'ald-table-bar': string;
|
|
100
|
+
'ald-table-canNotInnerScroll': string;
|
|
101
|
+
'ald-table-cell': string;
|
|
102
|
+
'ald-table-cell-content': string;
|
|
103
|
+
'ald-table-column-resizable': string;
|
|
104
|
+
'ald-table-empty-icon': string;
|
|
105
|
+
'ald-table-header': string;
|
|
106
|
+
'ald-table-header-left': string;
|
|
107
|
+
'ald-table-header-right': string;
|
|
108
|
+
'ald-table-init-loading': string;
|
|
109
|
+
'ald-table-inner-wrap': string;
|
|
110
|
+
'ald-table-list': string;
|
|
111
|
+
'ald-table-loading': string;
|
|
112
|
+
'ald-table-loading-icon': string;
|
|
113
|
+
'ald-table-page-loading': string;
|
|
114
|
+
'ald-table-row': string;
|
|
115
|
+
'ald-table-row-ellipsis': string;
|
|
116
|
+
'ald-table-row-list-wrap': string;
|
|
117
|
+
'ald-table-row-selected': string;
|
|
118
|
+
'ald-table-sortIcon': string;
|
|
119
|
+
'ald-table-table-wrap': string;
|
|
120
|
+
'ald-table-tableHeadScrollWrap': string;
|
|
121
|
+
'ald-table-tbody': string;
|
|
122
|
+
'ald-table-tbody-innerScroll': string;
|
|
123
|
+
'ald-table-thead': string;
|
|
124
|
+
}
|
|
125
|
+
export const cssExports: CssExports;
|
|
126
|
+
export default cssExports;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IColumn } from './interface';
|
|
2
|
+
export interface IWidthDetail {
|
|
3
|
+
width: number;
|
|
4
|
+
isSpecific: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function getColumnsWidthMap<T>(columns: IColumn<T>[], clientWidth: number, lastWidthMap?: Map<string, IWidthDetail>): {
|
|
7
|
+
columnsWidthMap: Map<string, IWidthDetail>;
|
|
8
|
+
totalColumnWidth: number;
|
|
9
|
+
};
|
|
10
|
+
export declare function isPercentageWidth(width: string): boolean;
|
|
11
|
+
export declare function isSpecificPxWidth(width: string): boolean;
|
|
12
|
+
export declare function getValidWidthByNumber(width: number): number;
|
|
13
|
+
export declare function getValidScrollThreshold(height: string | number, clientHeight: number): number;
|
|
14
|
+
export declare function getPercentageValue(percentage: string, containerNum: number): number;
|
|
15
|
+
export declare function getPxValue(px: string): number;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
var ZERO = 0;
|
|
2
|
+
var NOT_SET = -1;
|
|
3
|
+
var COLUMN_MIN_WIDTH = 72;
|
|
4
|
+
var HUNDRED = 100; // TODO: 添加单侧
|
|
5
|
+
|
|
6
|
+
export function getColumnsWidthMap(columns, clientWidth, lastWidthMap) {
|
|
7
|
+
var settedTotalWidth = ZERO;
|
|
8
|
+
var unsetWidthIndex = [];
|
|
9
|
+
var widthMap = new Map();
|
|
10
|
+
var totalColumnWidth = ZERO;
|
|
11
|
+
columns.forEach(function (item, index) {
|
|
12
|
+
var _lastWidthMap$get;
|
|
13
|
+
|
|
14
|
+
var key = index.toString();
|
|
15
|
+
var width = getWidthByColumnsWidth(clientWidth, item.width); // 首先判断是否是否是容器宽度的变化
|
|
16
|
+
|
|
17
|
+
var isSpecific = lastWidthMap ? (_lastWidthMap$get = lastWidthMap.get(key)) === null || _lastWidthMap$get === void 0 ? void 0 : _lastWidthMap$get.isSpecific : isSpecificWidth(item.width);
|
|
18
|
+
|
|
19
|
+
if (lastWidthMap && isSpecific) {
|
|
20
|
+
var _lastWidthMap$get2;
|
|
21
|
+
|
|
22
|
+
width = (_lastWidthMap$get2 = lastWidthMap.get(key)) === null || _lastWidthMap$get2 === void 0 ? void 0 : _lastWidthMap$get2.width;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (width === NOT_SET) {
|
|
26
|
+
unsetWidthIndex.push(key);
|
|
27
|
+
} else {
|
|
28
|
+
settedTotalWidth += width;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
widthMap.set(key, {
|
|
32
|
+
width: width,
|
|
33
|
+
isSpecific: isSpecific
|
|
34
|
+
});
|
|
35
|
+
}); // 设定宽度大于容器宽度时
|
|
36
|
+
|
|
37
|
+
if (settedTotalWidth < clientWidth) {
|
|
38
|
+
unsetWidthIndex.map(function (item) {
|
|
39
|
+
var _widthMap$get;
|
|
40
|
+
|
|
41
|
+
return widthMap.set(item, {
|
|
42
|
+
isSpecific: (_widthMap$get = widthMap.get(item)) === null || _widthMap$get === void 0 ? void 0 : _widthMap$get.isSpecific,
|
|
43
|
+
width: 72
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
} // 设定宽度小于容器宽度时
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
if (unsetWidthIndex.length > ZERO) {
|
|
50
|
+
var leftWidth = clientWidth - settedTotalWidth;
|
|
51
|
+
var average = getValidWidthByNumber(leftWidth / unsetWidthIndex.length);
|
|
52
|
+
unsetWidthIndex.map(function (item) {
|
|
53
|
+
var _widthMap$get2;
|
|
54
|
+
|
|
55
|
+
return widthMap.set(item, {
|
|
56
|
+
isSpecific: (_widthMap$get2 = widthMap.get(item)) === null || _widthMap$get2 === void 0 ? void 0 : _widthMap$get2.isSpecific,
|
|
57
|
+
width: average
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
columns.forEach(function (item, index) {
|
|
63
|
+
var _widthMap$get3;
|
|
64
|
+
|
|
65
|
+
var key = index.toString();
|
|
66
|
+
var width = (_widthMap$get3 = widthMap.get(key)) === null || _widthMap$get3 === void 0 ? void 0 : _widthMap$get3.width;
|
|
67
|
+
totalColumnWidth += width;
|
|
68
|
+
});
|
|
69
|
+
return {
|
|
70
|
+
columnsWidthMap: widthMap,
|
|
71
|
+
totalColumnWidth: totalColumnWidth
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function getWidthByColumnsWidth(clientWidth, width) {
|
|
76
|
+
if (width === undefined) {
|
|
77
|
+
return NOT_SET;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (typeof width === 'number') {
|
|
81
|
+
return getValidWidthByNumber(width);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (isPercentageWidth(width)) {
|
|
85
|
+
return getPercentageValue(width, clientWidth);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (isSpecificPxWidth(width)) {
|
|
89
|
+
var specificNum = getPxValue(width);
|
|
90
|
+
return getValidWidthByNumber(specificNum);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return NOT_SET;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function isPercentageWidth(width) {
|
|
97
|
+
return /[0-9]{1,}%$/.test(width);
|
|
98
|
+
}
|
|
99
|
+
export function isSpecificPxWidth(width) {
|
|
100
|
+
return /[0-9]{1,}(px)$/.test(width);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function isSpecificWidth(width) {
|
|
104
|
+
return typeof width === 'number' || !!(width && isSpecificPxWidth(width));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function getValidWidthByNumber(width) {
|
|
108
|
+
return width < COLUMN_MIN_WIDTH ? COLUMN_MIN_WIDTH : width;
|
|
109
|
+
}
|
|
110
|
+
export function getValidScrollThreshold(height, clientHeight) {
|
|
111
|
+
var scrollThreshold = ZERO;
|
|
112
|
+
|
|
113
|
+
if (typeof height === 'string') {
|
|
114
|
+
if (isPercentageWidth(height)) {
|
|
115
|
+
scrollThreshold = getPercentageValue(height, clientHeight);
|
|
116
|
+
} else {
|
|
117
|
+
scrollThreshold = getPxValue(height);
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
scrollThreshold = height;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return scrollThreshold;
|
|
124
|
+
}
|
|
125
|
+
export function getPercentageValue(percentage, containerNum) {
|
|
126
|
+
var percent = Math.floor(Number(percentage.replace('%', '')) / HUNDRED);
|
|
127
|
+
return getValidWidthByNumber(containerNum * percent);
|
|
128
|
+
}
|
|
129
|
+
export function getPxValue(px) {
|
|
130
|
+
return Number(px.replace('px', ''));
|
|
131
|
+
}
|
package/es/Tabs/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "@aloudata/icons-react/styles/index.less";
|
|
2
|
+
import _More from "@aloudata/icons-react/es/icons/More";
|
|
1
3
|
import "antd/es/tabs/style";
|
|
2
4
|
import _Tabs from "antd/es/tabs";
|
|
3
5
|
var _excluded = ["size", "className", "popupClassName", "adaptHeight"];
|
|
@@ -14,7 +16,6 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
14
16
|
|
|
15
17
|
import React from 'react'; // import AntdTabs, { TabsProps } from 'antd/lib/tabs';
|
|
16
18
|
|
|
17
|
-
import More from '../Icon/icons/More';
|
|
18
19
|
import TabPane from './TabPane';
|
|
19
20
|
import classNames from 'classnames';
|
|
20
21
|
export default function Tabs(props) {
|
|
@@ -33,7 +34,7 @@ export default function Tabs(props) {
|
|
|
33
34
|
return /*#__PURE__*/React.createElement(_Tabs, Object.assign({
|
|
34
35
|
moreIcon: /*#__PURE__*/React.createElement("div", {
|
|
35
36
|
className: "ald-tabs-moreIcon"
|
|
36
|
-
}, /*#__PURE__*/React.createElement(
|
|
37
|
+
}, /*#__PURE__*/React.createElement(_More, {
|
|
37
38
|
color: "currentColor"
|
|
38
39
|
})),
|
|
39
40
|
tabBarGutter: 24,
|
package/es/Tabs/style/index.less
CHANGED
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
@import '../../style/index.less';
|
|
3
3
|
@import '../../Button/style/index.less';
|
|
4
4
|
//status- default
|
|
5
|
-
@
|
|
6
|
-
@
|
|
5
|
+
@tabs-color: @NL30;
|
|
6
|
+
@tabs-fontWeight: 400;
|
|
7
7
|
//active
|
|
8
|
-
@
|
|
9
|
-
@
|
|
8
|
+
@tabs-color-active: @B60;
|
|
9
|
+
@tabs-fontWeight-active: 600;
|
|
10
10
|
|
|
11
11
|
//middle - default
|
|
12
|
-
@
|
|
13
|
-
@
|
|
14
|
-
@
|
|
12
|
+
@tabs-font-size: 14px;
|
|
13
|
+
@tabs-line-height: 20px;
|
|
14
|
+
@tabs-ink-link-bar-height: 2px;
|
|
15
15
|
//large
|
|
16
|
-
@
|
|
17
|
-
@
|
|
18
|
-
@
|
|
19
|
-
// @
|
|
16
|
+
@tabs-font-size-large: 16px;
|
|
17
|
+
@tabs-line-height-large: 24px;
|
|
18
|
+
@tabs-ink-link-bar-height-large: 3px;
|
|
19
|
+
// @tabs-
|
|
20
20
|
.ant-tabs.ald-tabs {
|
|
21
21
|
&.ant-tabs {
|
|
22
22
|
color: @NL30;
|
|
@@ -24,29 +24,29 @@
|
|
|
24
24
|
|
|
25
25
|
.ant-tabs-tab {
|
|
26
26
|
padding: 8px 0;
|
|
27
|
-
color: @
|
|
28
|
-
font-weight: @
|
|
29
|
-
font-size: @
|
|
30
|
-
line-height: @
|
|
27
|
+
color: @tabs-color;
|
|
28
|
+
font-weight: @tabs-fontWeight;
|
|
29
|
+
font-size: @tabs-font-size;
|
|
30
|
+
line-height: @tabs-line-height;
|
|
31
31
|
|
|
32
32
|
&:hover {
|
|
33
33
|
color: inherit;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
&.ant-tabs-tab-active {
|
|
37
|
-
font-weight: @
|
|
37
|
+
font-weight: @tabs-fontWeight-active;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
|
|
42
|
-
color: @
|
|
43
|
-
font-weight: @
|
|
42
|
+
color: @tabs-color-active;
|
|
43
|
+
font-weight: @tabs-fontWeight-active;
|
|
44
44
|
text-shadow: none;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.ant-tabs-ink-bar {
|
|
48
|
-
height: @
|
|
49
|
-
background: @
|
|
48
|
+
height: @tabs-ink-link-bar-height;
|
|
49
|
+
background: @tabs-color-active;
|
|
50
50
|
border-top-left-radius: 2px;
|
|
51
51
|
border-top-right-radius: 2px;
|
|
52
52
|
}
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
/* large size */
|
|
55
55
|
&.ant-tabs-large {
|
|
56
56
|
.ant-tabs-tab {
|
|
57
|
-
font-size: @
|
|
58
|
-
line-height: @
|
|
57
|
+
font-size: @tabs-font-size-large;
|
|
58
|
+
line-height: @tabs-line-height-large;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.ant-tabs-ink-bar {
|
|
62
|
-
height: @
|
|
62
|
+
height: @tabs-ink-link-bar-height-large;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.ald-tabs-moreIcon {
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
|
|
72
72
|
&.ald-tabs-default {
|
|
73
73
|
.ant-tabs-tab {
|
|
74
|
-
font-size: @
|
|
75
|
-
line-height: @
|
|
74
|
+
font-size: @tabs-font-size;
|
|
75
|
+
line-height: @tabs-line-height;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
.ald-tabs-moreIcon {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import canUseDom from 'rc-util/lib/Dom/canUseDom';
|
|
3
|
+
var uuid = 0;
|
|
4
|
+
/** Is client side and not jsdom */
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
6
|
+
|
|
7
|
+
export var isBrowserClient = process.env.NODE_ENV !== 'test' && canUseDom();
|
|
8
|
+
/** Get unique id for accessibility usage */
|
|
9
|
+
|
|
10
|
+
export function getUUID() {
|
|
11
|
+
var retId; // Test never reach
|
|
12
|
+
|
|
13
|
+
/* istanbul ignore if */
|
|
14
|
+
|
|
15
|
+
if (isBrowserClient) {
|
|
16
|
+
retId = uuid;
|
|
17
|
+
uuid += 1;
|
|
18
|
+
} else {
|
|
19
|
+
retId = 'TEST_OR_SSR';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return retId;
|
|
23
|
+
}
|
package/es/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference path="../typings.d.ts" />
|
|
2
2
|
export { default as Button } from './Button';
|
|
3
|
-
export type { IButtonProps as ButtonProps,
|
|
3
|
+
export type { IButtonProps as ButtonProps, ButtonType } from './Button';
|
|
4
4
|
export { default as Dropdown } from './Dropdown';
|
|
5
5
|
export type { ActionType, IDropdownProps as DropdownProps, PlacementType } from './Dropdown';
|
|
6
6
|
export { MenuClickEventHandler } from 'rc-menu/lib/interface';
|
|
7
7
|
export { default as Menu } from './Menu';
|
|
8
8
|
export type { IMenuProps as MenuProps } from './Menu';
|
|
9
9
|
export { default as Input } from './Input';
|
|
10
|
-
export type { IInputProps as InputProps,
|
|
10
|
+
export type { IInputProps as InputProps, InputRef, TextAreaRef } from './Input';
|
|
11
11
|
export { default as Tabs } from './Tabs';
|
|
12
12
|
export type { ITabsProps as TabsProps, TabsSize } from './Tabs';
|
|
13
13
|
export { default as Tooltip } from './Tooltip';
|
|
@@ -46,9 +46,9 @@ export type { SpaceProps } from './Space';
|
|
|
46
46
|
export { default as Space } from './Space';
|
|
47
47
|
export type { SpinProps } from './Spin';
|
|
48
48
|
export { default as Spin } from './Spin';
|
|
49
|
-
export type { SwitchProps } from './Switch';
|
|
49
|
+
export type { ISwitchProps as SwitchProps } from './Switch';
|
|
50
50
|
export { default as Switch } from './Switch';
|
|
51
|
-
export type { StepProps, StepsProps } from './Steps';
|
|
51
|
+
export type { IStepProps as StepProps, IStepsProps as StepsProps } from './Steps';
|
|
52
52
|
export { default as Steps } from './Steps';
|
|
53
53
|
export { default as Form } from './Form';
|
|
54
54
|
export type { FormInstance, FormProps, FormItemProps } from './Form';
|
|
@@ -57,7 +57,7 @@ export type { DividerProps } from './Divider';
|
|
|
57
57
|
export { default as Drawer } from './Drawer';
|
|
58
58
|
export type { DrawerProps } from './Drawer';
|
|
59
59
|
export { default as Radio } from './Radio';
|
|
60
|
-
export type { RadioProps,
|
|
60
|
+
export type { RadioProps, RadioGroupProps } from './Radio';
|
|
61
61
|
export { default as Checkbox } from './Checkbox';
|
|
62
62
|
export type { CheckboxProps, CheckboxOptionType } from './Checkbox';
|
|
63
63
|
export { default as Modal } from './Modal';
|
|
@@ -73,3 +73,5 @@ export type { IEmptyProps as EmptyProps } from './Empty';
|
|
|
73
73
|
export { default as Avatar } from './Avatar';
|
|
74
74
|
export type { IAvatarProps as AvatarProps } from './Avatar';
|
|
75
75
|
export { default as Icon } from './Icon';
|
|
76
|
+
export type { PageHeaderProps } from './PageHeader';
|
|
77
|
+
export { default as PageHeader } from './PageHeader';
|
package/es/index.js
CHANGED
|
@@ -36,4 +36,5 @@ export { default as InputNumber } from './InputNumber';
|
|
|
36
36
|
export { default as Breadcrumb } from './Breadcrumb';
|
|
37
37
|
export { default as Empty } from './Empty';
|
|
38
38
|
export { default as Avatar } from './Avatar';
|
|
39
|
-
export { default as Icon } from './Icon';
|
|
39
|
+
export { default as Icon } from './Icon';
|
|
40
|
+
export { default as PageHeader } from './PageHeader';
|
|
@@ -4,10 +4,13 @@ import type { PickerLocale as DatePickerLocale } from 'antd/es/date-picker/gener
|
|
|
4
4
|
import type { TransferLocale as TransferLocaleForEmpty } from 'antd/es/empty';
|
|
5
5
|
import type { ModalLocale } from 'antd/es/modal/locale';
|
|
6
6
|
import type { PaginationLocale } from 'antd/es/pagination/Pagination';
|
|
7
|
-
import type { PopconfirmLocale } from 'antd/es/popconfirm';
|
|
8
7
|
import type { TableLocale } from 'antd/es/table/interface';
|
|
9
8
|
import type { TransferLocale } from 'antd/es/transfer';
|
|
10
9
|
import type { UploadLocale } from 'antd/es/upload/interface';
|
|
10
|
+
interface PopconfirmLocale {
|
|
11
|
+
okText: string;
|
|
12
|
+
cancelText: string;
|
|
13
|
+
}
|
|
11
14
|
export declare const ANT_MARK = "internalMark";
|
|
12
15
|
export interface Locale {
|
|
13
16
|
locale: string;
|
|
@@ -59,3 +62,4 @@ export default class LocaleProvider extends React.Component<LocaleProviderProps,
|
|
|
59
62
|
};
|
|
60
63
|
render(): JSX.Element;
|
|
61
64
|
}
|
|
65
|
+
export {};
|
package/es/style/index.d.ts
CHANGED
package/es/style/index.js
CHANGED