@kdcloudjs/kdesign 1.5.4 → 1.5.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/CHANGELOG.md +61 -0
- package/dist/default-theme.js +4 -4
- package/dist/kdesign-complete.less +159 -85
- package/dist/kdesign.css +153 -83
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +220 -151
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +6 -6
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/usePopper.js +17 -8
- package/es/alert/alert.js +2 -2
- package/es/alert/style/index.css +27 -11
- package/es/alert/style/index.less +24 -10
- package/es/alert/style/mixin.less +8 -2
- package/es/alert/style/token.less +16 -8
- package/es/config-provider/compDefaultProps.d.ts +1 -0
- package/es/config-provider/compDefaultProps.js +2 -1
- package/es/dropdown/style/index.css +13 -14
- package/es/dropdown/style/index.less +4 -5
- package/es/dropdown/style/token.less +6 -5
- package/es/radio/style/index.css +6 -0
- package/es/radio/style/index.less +8 -0
- package/es/search/style/index.css +3 -3
- package/es/spin/style/index.css +25 -26
- package/es/spin/style/index.less +18 -19
- package/es/spin/style/token.less +9 -3
- package/es/style/themes/default.less +3 -4
- package/es/timeline/style/index.css +22 -21
- package/es/timeline/style/index.less +2 -2
- package/es/timeline/style/token.less +4 -7
- package/es/tree/style/index.css +56 -7
- package/es/tree/style/index.less +26 -18
- package/es/tree/style/mixin.less +25 -1
- package/es/tree/style/token.less +6 -4
- package/es/tree/tree.d.ts +2 -0
- package/es/tree/tree.js +65 -11
- package/es/tree/treeHooks.js +0 -1
- package/es/tree/treeNode.d.ts +1 -0
- package/es/tree/treeNode.js +45 -49
- package/es/tree/utils/treeUtils.js +2 -2
- package/lib/_utils/usePopper.js +17 -8
- package/lib/alert/alert.js +2 -2
- package/lib/alert/style/index.css +27 -11
- package/lib/alert/style/index.less +24 -10
- package/lib/alert/style/mixin.less +8 -2
- package/lib/alert/style/token.less +16 -8
- package/lib/config-provider/compDefaultProps.d.ts +1 -0
- package/lib/config-provider/compDefaultProps.js +2 -1
- package/lib/dropdown/style/index.css +13 -14
- package/lib/dropdown/style/index.less +4 -5
- package/lib/dropdown/style/token.less +6 -5
- package/lib/radio/style/index.css +6 -0
- package/lib/radio/style/index.less +8 -0
- package/lib/search/style/index.css +3 -3
- package/lib/spin/style/index.css +25 -26
- package/lib/spin/style/index.less +18 -19
- package/lib/spin/style/token.less +9 -3
- package/lib/style/themes/default.less +3 -4
- package/lib/timeline/style/index.css +22 -21
- package/lib/timeline/style/index.less +2 -2
- package/lib/timeline/style/token.less +4 -7
- package/lib/tree/style/index.css +56 -7
- package/lib/tree/style/index.less +26 -18
- package/lib/tree/style/mixin.less +25 -1
- package/lib/tree/style/token.less +6 -4
- package/lib/tree/tree.d.ts +2 -0
- package/lib/tree/tree.js +67 -11
- package/lib/tree/treeHooks.js +0 -1
- package/lib/tree/treeNode.d.ts +1 -0
- package/lib/tree/treeNode.js +46 -48
- package/lib/tree/utils/treeUtils.js +2 -2
- package/package.json +1 -1
package/es/spin/style/index.less
CHANGED
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
// right: 0;
|
|
13
13
|
|
|
14
14
|
.@{spin-prefix-cls}-dot-spin {
|
|
15
|
-
width:
|
|
16
|
-
height:
|
|
17
|
-
padding:
|
|
15
|
+
width: @spin-page-dot-spin-sizing;
|
|
16
|
+
height: @spin-page-dot-spin-sizing;
|
|
17
|
+
padding: @spin-page-dot-spin-spacing-padding;
|
|
18
18
|
// background: @logo-color-1;
|
|
19
19
|
box-sizing: border-box;
|
|
20
20
|
display: flex;
|
|
@@ -24,10 +24,9 @@
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.@{spin-prefix-cls}-dot-item {
|
|
27
|
-
.dot(@spin-page-
|
|
27
|
+
.dot(@spin-page-dot-item-sizing, @spin-dot-color-first);
|
|
28
28
|
|
|
29
29
|
&:nth-child(2n+1) {
|
|
30
|
-
margin-right: 10px;
|
|
31
30
|
animation: pageLoading 1s .3s ease-in-out infinite
|
|
32
31
|
}
|
|
33
32
|
|
|
@@ -48,7 +47,7 @@
|
|
|
48
47
|
|
|
49
48
|
@keyframes pageLoading {
|
|
50
49
|
50% {
|
|
51
|
-
transform: scale(1.
|
|
50
|
+
transform: scale(1.25);
|
|
52
51
|
}
|
|
53
52
|
100% {
|
|
54
53
|
transform: scale(1);
|
|
@@ -72,22 +71,22 @@
|
|
|
72
71
|
&:nth-child(2n+1) {
|
|
73
72
|
animation: containerLoading 1s .6s ease-in-out infinite
|
|
74
73
|
}
|
|
75
|
-
|
|
74
|
+
|
|
76
75
|
&:nth-child(2n+2) {
|
|
77
76
|
background-color: @spin-dot-color-second;
|
|
78
77
|
animation: containerLoading 1s .45s ease-in-out infinite
|
|
79
78
|
}
|
|
80
|
-
|
|
79
|
+
|
|
81
80
|
&:nth-child(2n+3) {
|
|
82
81
|
background-color: @spin-dot-color-third;
|
|
83
82
|
animation: containerLoading 1s .3s ease-in-out infinite
|
|
84
83
|
}
|
|
85
|
-
|
|
84
|
+
|
|
86
85
|
&:nth-child(2n+4) {
|
|
87
86
|
background-color: @spin-dot-color-fourth;
|
|
88
87
|
animation: containerLoading 1s .15s ease-in-out infinite
|
|
89
88
|
}
|
|
90
|
-
|
|
89
|
+
|
|
91
90
|
@keyframes containerLoading {
|
|
92
91
|
50% {
|
|
93
92
|
transform: translateY(-10px);
|
|
@@ -103,24 +102,24 @@
|
|
|
103
102
|
// 组件加载动画
|
|
104
103
|
&-component {
|
|
105
104
|
.@{spin-prefix-cls}-dot-spin {
|
|
106
|
-
width:
|
|
107
|
-
height:
|
|
108
|
-
border:
|
|
105
|
+
width: @spin-component-spin-size;
|
|
106
|
+
height: @spin-component-spin-size;
|
|
107
|
+
border: @spin-component-spin-border solid @spin-component-dot-color-border;
|
|
109
108
|
border-radius: 50%;
|
|
110
109
|
position: relative;
|
|
111
110
|
box-sizing: border-box;
|
|
112
111
|
|
|
113
112
|
.@{spin-prefix-cls}-dot-item {
|
|
114
|
-
width:
|
|
115
|
-
height:
|
|
113
|
+
width: @spin-component-spin-size;
|
|
114
|
+
height: @spin-component-spin-size;
|
|
116
115
|
box-sizing: border-box;
|
|
117
|
-
border:
|
|
116
|
+
border: @spin-component-spin-border solid transparent;
|
|
118
117
|
// border-top-color: #5582f3;
|
|
119
118
|
border-right-color: @spin-component-dot-item-color-border;
|
|
120
119
|
border-radius: 50%;
|
|
121
120
|
position: absolute;
|
|
122
|
-
top: -
|
|
123
|
-
left: -
|
|
121
|
+
top: calc(-1 * @spin-component-spin-border);
|
|
122
|
+
left: calc(-1 * @spin-component-spin-border);
|
|
124
123
|
transform: rotate(-45deg);
|
|
125
124
|
animation: componentRotate 1s linear infinite;
|
|
126
125
|
|
|
@@ -161,4 +160,4 @@
|
|
|
161
160
|
flex-direction: column;
|
|
162
161
|
align-items: center;
|
|
163
162
|
}
|
|
164
|
-
}
|
|
163
|
+
}
|
package/es/spin/style/token.less
CHANGED
|
@@ -7,9 +7,15 @@
|
|
|
7
7
|
@spin-dot-color-second: var(~'@{spin-custom-prefix}-dot-color-backgroung-second', @color-logo-2);
|
|
8
8
|
@spin-dot-color-third: var(~'@{spin-custom-prefix}-dot-color-backgroung-third', @color-logo-3);
|
|
9
9
|
@spin-dot-color-fourth: var(~'@{spin-custom-prefix}-dot-color-backgroung-fourth', @color-logo-4);
|
|
10
|
-
@spin-component-dot-color-border: var(~'@{spin-custom-prefix}-component-dot-color-border', #
|
|
10
|
+
@spin-component-dot-color-border: var(~'@{spin-custom-prefix}-component-dot-color-border', #ebebeb);
|
|
11
11
|
@spin-component-dot-item-color-border: var(~'@{spin-custom-prefix}-component-dot-item-color-border', @color-theme);
|
|
12
12
|
|
|
13
13
|
// sizing
|
|
14
|
-
@spin-page-
|
|
15
|
-
@spin-
|
|
14
|
+
@spin-page-dot-item-sizing: var(~'@{spin-custom-prefix}-page-dot-item-sizing-square', 16px);
|
|
15
|
+
@spin-page-dot-spin-sizing: var(~'@{spin-custom-prefix}-page-dot-spin-sizing-square', 48px);
|
|
16
|
+
@spin-container-size: var(~'@{spin-custom-prefix}-dot-container-sizing-square', 5px);
|
|
17
|
+
@spin-component-spin-size: var(~'@{spin-custom-prefix}-dot-component-sizing-square', 24px);
|
|
18
|
+
@spin-component-spin-border: var(~'@{spin-custom-prefix}-dot-component-sizing-border', 2px);
|
|
19
|
+
|
|
20
|
+
// spacing
|
|
21
|
+
@spin-page-dot-spin-spacing-padding: var(~'@{spin-custom-prefix}-page-dot-spin-spacing-padding', 4px);
|
|
@@ -54,15 +54,14 @@
|
|
|
54
54
|
@bg2: #f2f2f2; // 底色灰背景
|
|
55
55
|
@bg3: rgba(255, 255, 255, 0.65); // 次级底色背景
|
|
56
56
|
@contain-bg: #fafafa; // 容器内的灰背景
|
|
57
|
-
@radius-size: 2px; // 圆角值
|
|
58
57
|
@input-color: #999; // 线型录入的默认态
|
|
59
58
|
@strong-border-color: #d9d9d9; // 强线条 --带操作
|
|
60
59
|
@strong-border-color-1: #d9d9d9; // 强线条 --分割内容/容器包裹线
|
|
61
60
|
@strong-border-color-2: rgba(217, 217, 217, 0.65); // 次级边框
|
|
62
61
|
@weak-border-color: #e5e5e5; // 弱线条 -- 需要多层级时
|
|
63
|
-
@logo-color-1: #
|
|
64
|
-
@logo-color-2: #
|
|
65
|
-
@logo-color-3: #
|
|
62
|
+
@logo-color-1: #2486ee;
|
|
63
|
+
@logo-color-2: #02ccfe;
|
|
64
|
+
@logo-color-3: #05c8c7;
|
|
66
65
|
@logo-color-4: #a06eff;
|
|
67
66
|
// @shadow-on-hover: ; // 悬停时阴影
|
|
68
67
|
@white: #fff;
|
|
@@ -107,11 +107,12 @@
|
|
|
107
107
|
.kd-timeline {
|
|
108
108
|
-webkit-box-sizing: border-box;
|
|
109
109
|
box-sizing: border-box;
|
|
110
|
+
padding: 0;
|
|
110
111
|
font-variant: tabular-nums;
|
|
111
112
|
-webkit-font-feature-settings: 'tnum';
|
|
112
113
|
font-feature-settings: 'tnum';
|
|
113
114
|
margin: 0;
|
|
114
|
-
padding: 0;
|
|
115
|
+
padding: 0 4px;
|
|
115
116
|
overflow: hidden;
|
|
116
117
|
list-style: none;
|
|
117
118
|
}
|
|
@@ -125,13 +126,13 @@
|
|
|
125
126
|
font-feature-settings: 'tnum';
|
|
126
127
|
position: relative;
|
|
127
128
|
margin: 0;
|
|
128
|
-
padding-bottom: var(--kd-c-timeline-spacing-padding-bottom,
|
|
129
|
+
padding-bottom: var(--kd-c-timeline-spacing-padding-bottom, 24px);
|
|
129
130
|
font-size: var(--kd-c-timeline-content-font-size, var(--kd-g-font-size-small, 12px));
|
|
130
131
|
}
|
|
131
132
|
.kd-timeline .kd-timeline-item-tail {
|
|
132
133
|
position: absolute;
|
|
133
|
-
left: calc((9px - 1px) / 2);
|
|
134
|
-
height: calc(100% - 9px * 2 + 4px);
|
|
134
|
+
left: calc((var(--kd-c-timeline-dot-sizing, 9px) - 1px) / 2);
|
|
135
|
+
height: calc(100% - var(--kd-c-timeline-dot-sizing, 9px) * 2 + 4px);
|
|
135
136
|
border-left: var(--kd-c-timeline-sizing-width, 1px) solid var(--kd-c-timeline-line-color, var(--kd-g-color-border-weak, #e5e5e5));
|
|
136
137
|
}
|
|
137
138
|
.kd-timeline .kd-timeline-item.pending .kd-timeline-item-dot {
|
|
@@ -144,8 +145,8 @@
|
|
|
144
145
|
-webkit-box-sizing: border-box;
|
|
145
146
|
box-sizing: border-box;
|
|
146
147
|
position: absolute;
|
|
147
|
-
width: 9px;
|
|
148
|
-
height: 9px;
|
|
148
|
+
width: var(--kd-c-timeline-dot-sizing, 9px);
|
|
149
|
+
height: var(--kd-c-timeline-dot-sizing, 9px);
|
|
149
150
|
border-radius: 50%;
|
|
150
151
|
-webkit-transform: translateY(-50%);
|
|
151
152
|
transform: translateY(-50%);
|
|
@@ -168,7 +169,7 @@
|
|
|
168
169
|
}
|
|
169
170
|
.kd-timeline .kd-timeline-item-dot.custom {
|
|
170
171
|
position: absolute;
|
|
171
|
-
left: calc(9px / 2);
|
|
172
|
+
left: calc(var(--kd-c-timeline-dot-sizing, 9px) / 2);
|
|
172
173
|
width: auto;
|
|
173
174
|
height: auto;
|
|
174
175
|
margin-top: 0;
|
|
@@ -183,7 +184,7 @@
|
|
|
183
184
|
}
|
|
184
185
|
.kd-timeline .kd-timeline-item-content {
|
|
185
186
|
position: relative;
|
|
186
|
-
margin: 0 0 0 calc(2 * (9px - var(--kd-c-timeline-sizing-width, 1px)) + 8px);
|
|
187
|
+
margin: 0 0 0 calc(2 * (var(--kd-c-timeline-dot-sizing, 9px) - var(--kd-c-timeline-sizing-width, 1px)) + 8px);
|
|
187
188
|
word-break: break-word;
|
|
188
189
|
color: var(--kd-c-timeline-content-color-text, var(--kd-g-color-text-primary, #212121));
|
|
189
190
|
}
|
|
@@ -203,7 +204,7 @@
|
|
|
203
204
|
left: 50%;
|
|
204
205
|
}
|
|
205
206
|
.kd-timeline.alternate .kd-timeline-item-dot {
|
|
206
|
-
margin-left: calc(-1 * (9px - 1px) / 2);
|
|
207
|
+
margin-left: calc(-1 * (var(--kd-c-timeline-dot-sizing, 9px) - 1px) / 2);
|
|
207
208
|
}
|
|
208
209
|
.kd-timeline.alternate .kd-timeline-item-dot.custom {
|
|
209
210
|
margin-left: 1px;
|
|
@@ -225,24 +226,24 @@
|
|
|
225
226
|
right: 4.5px;
|
|
226
227
|
}
|
|
227
228
|
.kd-timeline.right .kd-timeline-item-dot {
|
|
228
|
-
margin-right: calc(-1 * (9px - 1px) / 2);
|
|
229
|
+
margin-right: calc(-1 * (var(--kd-c-timeline-dot-sizing, 9px) - 1px) / 2);
|
|
229
230
|
}
|
|
230
231
|
.kd-timeline.right .kd-timeline-item-dot.custom {
|
|
231
|
-
margin-right:
|
|
232
|
+
margin-right: -18px;
|
|
232
233
|
}
|
|
233
234
|
.kd-timeline.right .kd-timeline-item .kd-timeline-item-content {
|
|
234
235
|
left: 0;
|
|
235
236
|
text-align: right;
|
|
236
|
-
margin: 0 calc(2 * (9px - var(--kd-c-timeline-sizing-width, 1px)) + 8px) 0 0;
|
|
237
|
+
margin: 0 calc(2 * (var(--kd-c-timeline-dot-sizing, 9px) - var(--kd-c-timeline-sizing-width, 1px)) + 8px) 0 0;
|
|
237
238
|
width: auto;
|
|
238
239
|
}
|
|
239
240
|
.kd-timeline.label.left .kd-timeline-item-tail,
|
|
240
241
|
.kd-timeline.label.left .kd-timeline-item-dot,
|
|
241
242
|
.kd-timeline.label.left .kd-timeline-item-dot.custom {
|
|
242
|
-
left: calc((2 * 8px) + (9px / 2));
|
|
243
|
+
left: calc((2 * 8px) + (var(--kd-c-timeline-dot-sizing, 9px) / 2));
|
|
243
244
|
}
|
|
244
245
|
.kd-timeline.label.left .kd-timeline-item-dot {
|
|
245
|
-
margin-left: calc(-1 * (9px - 1px) / 2);
|
|
246
|
+
margin-left: calc(-1 * (var(--kd-c-timeline-dot-sizing, 9px) - 1px) / 2);
|
|
246
247
|
}
|
|
247
248
|
.kd-timeline.label.left .kd-timeline-item-dot.custom {
|
|
248
249
|
margin-left: 1px;
|
|
@@ -253,7 +254,7 @@
|
|
|
253
254
|
color: var(--kd-c-timeline-label-color-text, #666666);
|
|
254
255
|
}
|
|
255
256
|
.kd-timeline.label.left .kd-timeline-item .kd-timeline-item-content {
|
|
256
|
-
left: calc(9px + 7.5px);
|
|
257
|
+
left: calc(var(--kd-c-timeline-dot-sizing, 9px) + 7.5px);
|
|
257
258
|
text-align: left;
|
|
258
259
|
margin-right: 16px;
|
|
259
260
|
}
|
|
@@ -261,13 +262,13 @@
|
|
|
261
262
|
.kd-timeline.label.right .kd-timeline-item-dot,
|
|
262
263
|
.kd-timeline.label.right .kd-timeline-item-dot.custom {
|
|
263
264
|
left: auto;
|
|
264
|
-
right: calc((2 * 8px) + (9px / 2));
|
|
265
|
+
right: calc((2 * 8px) + (var(--kd-c-timeline-dot-sizing, 9px) / 2));
|
|
265
266
|
}
|
|
266
267
|
.kd-timeline.label.right .kd-timeline-item-dot {
|
|
267
|
-
margin-right: calc(-1 * (9px - 1px) / 2);
|
|
268
|
+
margin-right: calc(-1 * (var(--kd-c-timeline-dot-sizing, 9px) - 1px) / 2);
|
|
268
269
|
}
|
|
269
270
|
.kd-timeline.label.right .kd-timeline-item-dot.custom {
|
|
270
|
-
right: calc(-1 * (9px - 1px) / 2);
|
|
271
|
+
right: calc(-1 * (var(--kd-c-timeline-dot-sizing, 9px) - 1px) / 2);
|
|
271
272
|
}
|
|
272
273
|
.kd-timeline.label.right .kd-timeline-item .kd-timeline-item-label {
|
|
273
274
|
position: absolute;
|
|
@@ -276,7 +277,7 @@
|
|
|
276
277
|
}
|
|
277
278
|
.kd-timeline.label.right .kd-timeline-item .kd-timeline-item-content {
|
|
278
279
|
left: auto;
|
|
279
|
-
right: calc(9px + 7.5px);
|
|
280
|
+
right: calc(var(--kd-c-timeline-dot-sizing, 9px) + 7.5px);
|
|
280
281
|
text-align: right;
|
|
281
282
|
margin-left: 17px;
|
|
282
283
|
}
|
|
@@ -287,8 +288,8 @@
|
|
|
287
288
|
}
|
|
288
289
|
.kd-timeline.label.alternate .kd-timeline-item:nth-child(2n) .kd-timeline-item-label {
|
|
289
290
|
position: absolute;
|
|
290
|
-
left: calc(50% + (2 * (9px - var(--kd-c-timeline-sizing-width, 1px)) + 8px) - 9px / 2);
|
|
291
|
-
width: calc(50% - (2 * (9px - var(--kd-c-timeline-sizing-width, 1px)) + 8px) + 9px / 2);
|
|
291
|
+
left: calc(50% + (2 * (var(--kd-c-timeline-dot-sizing, 9px) - var(--kd-c-timeline-sizing-width, 1px)) + 8px) - var(--kd-c-timeline-dot-sizing, 9px) / 2);
|
|
292
|
+
width: calc(50% - (2 * (var(--kd-c-timeline-dot-sizing, 9px) - var(--kd-c-timeline-sizing-width, 1px)) + 8px) + var(--kd-c-timeline-dot-sizing, 9px) / 2);
|
|
292
293
|
text-align: left;
|
|
293
294
|
}
|
|
294
295
|
.kd-timeline.pending .kd-timeline-item.last .kd-timeline-item-tail {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
.@{timeline-prefix-cls} {
|
|
10
10
|
.reset-component;
|
|
11
11
|
margin: 0;
|
|
12
|
-
padding: 0;
|
|
12
|
+
padding: 0 4px;
|
|
13
13
|
overflow: hidden;
|
|
14
14
|
list-style: none;
|
|
15
15
|
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
margin-right:calc(-1 * (@timeline-dot-size - 1px) / 2) ;
|
|
149
149
|
|
|
150
150
|
&.custom {
|
|
151
|
-
margin-right:
|
|
151
|
+
margin-right: -18px;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
.@{timeline-item-prefix-cls}-content {
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
@import '../../style/themes/token.less';
|
|
2
2
|
|
|
3
3
|
@timeline-prefix: '--@{kd-prefix}-c-timeline';
|
|
4
|
-
@timeline-gap:
|
|
5
|
-
|
|
6
|
-
// @timeline-dot-size: var(~'@{timeline-prefix}-dot-sizing',9px);
|
|
7
|
-
@timeline-dot-size: 9px;
|
|
8
|
-
|
|
4
|
+
@timeline-gap: 8px;
|
|
9
5
|
|
|
6
|
+
@timeline-dot-size: var(~'@{timeline-prefix}-dot-sizing',9px);
|
|
7
|
+
// @timeline-dot-size: 9px;
|
|
10
8
|
|
|
11
9
|
// color
|
|
12
10
|
@timeline-finished-color: var(~'@{timeline-prefix}-finished-color',@color-theme);
|
|
@@ -17,7 +15,6 @@
|
|
|
17
15
|
@timeline-label-color-text: var(~'@{timeline-prefix}-label-color-text',#666666);
|
|
18
16
|
@timeline-content-color-text: var(~'@{timeline-prefix}-content-color-text',@color-text-primary);
|
|
19
17
|
|
|
20
|
-
|
|
21
18
|
// font
|
|
22
19
|
@timeline-content-font-size-small: var(~'@{timeline-prefix}-content-font-size',@font-size-small);
|
|
23
20
|
|
|
@@ -26,7 +23,7 @@
|
|
|
26
23
|
@timeline-width: var(~'@{timeline-prefix}-sizing-width',1px);
|
|
27
24
|
|
|
28
25
|
// spacing
|
|
29
|
-
@timeline-item-padding-bottom: var(~'@{timeline-prefix}-spacing-padding-bottom',
|
|
26
|
+
@timeline-item-padding-bottom: var(~'@{timeline-prefix}-spacing-padding-bottom',24px);
|
|
30
27
|
|
|
31
28
|
|
|
32
29
|
|
package/es/tree/style/index.css
CHANGED
|
@@ -101,6 +101,24 @@
|
|
|
101
101
|
普通组件内部自身层级应设置在0-100间
|
|
102
102
|
*/
|
|
103
103
|
/* ----------- zIndex ——————---- end */
|
|
104
|
+
.node-hover-hover {
|
|
105
|
+
-webkit-transition: background-color var(--kd-c-tree-motion-duration, var(--kd-g-duration, 0.3s)), color var(--kd-c-tree-motion-duration, var(--kd-g-duration, 0.3s));
|
|
106
|
+
transition: background-color var(--kd-c-tree-motion-duration, var(--kd-g-duration, 0.3s)), color var(--kd-c-tree-motion-duration, var(--kd-g-duration, 0.3s));
|
|
107
|
+
}
|
|
108
|
+
.node-hover-hover:hover {
|
|
109
|
+
background-color: var(--kd-c-tree-node-color-backgroung-hover, var(--kd-g-color-hover, #f5f5f5));
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
}
|
|
112
|
+
.node-selected {
|
|
113
|
+
background-color: var(--kd-c-tree-node-color-backgroung-checked, var(--kd-g-color-theme-3, #e3eeff)) !important;
|
|
114
|
+
color: var(--kd-c-tree-node-color-text-checked, var(--kd-g-color-theme, #5582f3));
|
|
115
|
+
}
|
|
116
|
+
.node-selected .kd-tree-node-title {
|
|
117
|
+
color: var(--kd-c-tree-node-color-text-checked, var(--kd-g-color-theme, #5582f3));
|
|
118
|
+
}
|
|
119
|
+
.node-selected .kd-tree-node-icon {
|
|
120
|
+
color: var(--kd-c-tree-node-color-text-checked, var(--kd-g-color-theme, #5582f3));
|
|
121
|
+
}
|
|
104
122
|
.kd-tree {
|
|
105
123
|
position: relative;
|
|
106
124
|
overflow: auto;
|
|
@@ -136,6 +154,15 @@
|
|
|
136
154
|
-ms-flex-align: center;
|
|
137
155
|
align-items: center;
|
|
138
156
|
}
|
|
157
|
+
.kd-tree-node-root .kd-spin-dot-spin {
|
|
158
|
+
border: none;
|
|
159
|
+
width: var(--kd-c-tree-expand-icon-loading-sizing-width, 16px);
|
|
160
|
+
height: var(--kd-c-tree-expand-icon-loading-sizing-height, 16px);
|
|
161
|
+
}
|
|
162
|
+
.kd-tree-node-root .kd-spin-dot-spin .kd-spin-dot-item {
|
|
163
|
+
width: var(--kd-c-tree-expand-icon-loading-sizing-width, 16px);
|
|
164
|
+
height: var(--kd-c-tree-expand-icon-loading-sizing-height, 16px);
|
|
165
|
+
}
|
|
139
166
|
.kd-tree-node-fb-children-pointerEvents * {
|
|
140
167
|
pointer-events: none;
|
|
141
168
|
}
|
|
@@ -176,8 +203,8 @@
|
|
|
176
203
|
}
|
|
177
204
|
.kd-tree-node-icon {
|
|
178
205
|
cursor: pointer;
|
|
179
|
-
height: var(--kd-c-tree-expand-icon-sizing-height,
|
|
180
|
-
width: var(--kd-c-tree-expand-icon-sizing-width,
|
|
206
|
+
height: var(--kd-c-tree-expand-icon-sizing-height, 16px);
|
|
207
|
+
width: var(--kd-c-tree-expand-icon-sizing-width, 16px);
|
|
181
208
|
display: -webkit-box;
|
|
182
209
|
display: -ms-flexbox;
|
|
183
210
|
display: flex;
|
|
@@ -190,9 +217,13 @@
|
|
|
190
217
|
font-size: var(--kd-c-tree-node-icon-font-size, 16px);
|
|
191
218
|
color: var(--kd-c-tree-node-icon-color-text, #666666);
|
|
192
219
|
}
|
|
220
|
+
.kd-tree-node-icon-hover:hover {
|
|
221
|
+
background-color: var(--kd-c-tree-node-color-backgroung-hover, var(--kd-g-color-hover, #f5f5f5));
|
|
222
|
+
cursor: pointer;
|
|
223
|
+
}
|
|
193
224
|
.kd-tree-node-icon-hidden {
|
|
194
|
-
height: var(--kd-c-tree-node-icon-sizing-height,
|
|
195
|
-
width: var(--kd-c-tree-node-icon-sizing-width,
|
|
225
|
+
height: var(--kd-c-tree-node-icon-sizing-height, 16px);
|
|
226
|
+
width: var(--kd-c-tree-node-icon-sizing-width, 16px);
|
|
196
227
|
-ms-flex-negative: 0;
|
|
197
228
|
flex-shrink: 0;
|
|
198
229
|
opacity: 0;
|
|
@@ -233,10 +264,28 @@
|
|
|
233
264
|
-ms-flex-align: center;
|
|
234
265
|
align-items: center;
|
|
235
266
|
height: 100%;
|
|
267
|
+
padding-left: 4px;
|
|
268
|
+
}
|
|
269
|
+
.kd-tree-node-title-wrap-hover {
|
|
270
|
+
-webkit-transition: background-color var(--kd-c-tree-motion-duration, var(--kd-g-duration, 0.3s)), color var(--kd-c-tree-motion-duration, var(--kd-g-duration, 0.3s));
|
|
271
|
+
transition: background-color var(--kd-c-tree-motion-duration, var(--kd-g-duration, 0.3s)), color var(--kd-c-tree-motion-duration, var(--kd-g-duration, 0.3s));
|
|
272
|
+
}
|
|
273
|
+
.kd-tree-node-title-wrap-hover:hover {
|
|
274
|
+
background-color: var(--kd-c-tree-node-color-backgroung-hover, var(--kd-g-color-hover, #f5f5f5));
|
|
275
|
+
cursor: pointer;
|
|
276
|
+
}
|
|
277
|
+
.kd-tree-node-title-wrap-selected {
|
|
278
|
+
background-color: var(--kd-c-tree-node-color-backgroung-checked, var(--kd-g-color-theme-3, #e3eeff)) !important;
|
|
279
|
+
color: var(--kd-c-tree-node-color-text-checked, var(--kd-g-color-theme, #5582f3));
|
|
280
|
+
}
|
|
281
|
+
.kd-tree-node-title-wrap-selected .kd-tree-node-title {
|
|
282
|
+
color: var(--kd-c-tree-node-color-text-checked, var(--kd-g-color-theme, #5582f3));
|
|
283
|
+
}
|
|
284
|
+
.kd-tree-node-title-wrap-selected .kd-tree-node-icon {
|
|
285
|
+
color: var(--kd-c-tree-node-color-text-checked, var(--kd-g-color-theme, #5582f3));
|
|
236
286
|
}
|
|
237
287
|
.kd-tree-node-title {
|
|
238
288
|
white-space: nowrap;
|
|
239
|
-
margin-left: 6px;
|
|
240
289
|
}
|
|
241
290
|
.kd-tree-node-selected {
|
|
242
291
|
background-color: var(--kd-c-tree-node-color-backgroung-checked, var(--kd-g-color-theme-3, #e3eeff)) !important;
|
|
@@ -285,8 +334,8 @@
|
|
|
285
334
|
transform: translateY(-50%);
|
|
286
335
|
}
|
|
287
336
|
.kd-tree-node-leaf-icon {
|
|
288
|
-
height: var(--kd-c-tree-node-icon-sizing-height,
|
|
289
|
-
width: var(--kd-c-tree-node-icon-sizing-width,
|
|
337
|
+
height: var(--kd-c-tree-node-icon-sizing-height, 16px);
|
|
338
|
+
width: var(--kd-c-tree-node-icon-sizing-width, 16px);
|
|
290
339
|
display: -webkit-box;
|
|
291
340
|
display: -ms-flexbox;
|
|
292
341
|
display: flex;
|
package/es/tree/style/index.less
CHANGED
|
@@ -28,6 +28,17 @@
|
|
|
28
28
|
display: flex;
|
|
29
29
|
justify-content: flex-start;
|
|
30
30
|
align-items: center;
|
|
31
|
+
|
|
32
|
+
.@{kd-prefix}-spin-dot-spin {
|
|
33
|
+
border: none;
|
|
34
|
+
width: @tree-expand-icon-loading-width;
|
|
35
|
+
height: @tree-expand-icon-loading-height;
|
|
36
|
+
|
|
37
|
+
.@{kd-prefix}-spin-dot-item {
|
|
38
|
+
width: @tree-expand-icon-loading-width;
|
|
39
|
+
height: @tree-expand-icon-loading-height;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
31
42
|
}
|
|
32
43
|
&-fb-children-pointerEvents * {
|
|
33
44
|
pointer-events: none;
|
|
@@ -35,13 +46,8 @@
|
|
|
35
46
|
&-item {
|
|
36
47
|
display: flex;
|
|
37
48
|
align-items: center;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
transition: background-color @tree-transition-duration, color @tree-transition-duration;
|
|
41
|
-
}
|
|
42
|
-
&-item-hover:hover {
|
|
43
|
-
background-color: @tree-node-hover-bg-color;
|
|
44
|
-
cursor: pointer;
|
|
49
|
+
|
|
50
|
+
.node-hover()
|
|
45
51
|
}
|
|
46
52
|
|
|
47
53
|
&-indent {
|
|
@@ -70,6 +76,11 @@
|
|
|
70
76
|
align-items: center;
|
|
71
77
|
font-size: @tree-node-icon-size;
|
|
72
78
|
color: @tree-node-icon-color-text;
|
|
79
|
+
|
|
80
|
+
&-hover:hover {
|
|
81
|
+
background-color: @tree-node-hover-bg-color;
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
}
|
|
73
84
|
}
|
|
74
85
|
&-icon-hidden {
|
|
75
86
|
height: @tree-node-icon-height;
|
|
@@ -99,22 +110,19 @@
|
|
|
99
110
|
display: flex;
|
|
100
111
|
align-items: center;
|
|
101
112
|
height: 100%;
|
|
113
|
+
padding-left: 4px;
|
|
114
|
+
|
|
115
|
+
.node-hover();
|
|
116
|
+
|
|
117
|
+
&-selected {
|
|
118
|
+
.node-selected()
|
|
119
|
+
}
|
|
102
120
|
}
|
|
103
121
|
&-title {
|
|
104
122
|
white-space: nowrap;
|
|
105
|
-
margin-left: 6px;
|
|
106
123
|
}
|
|
107
124
|
&-selected {
|
|
108
|
-
|
|
109
|
-
color: @tree-node-checked-text-color;
|
|
110
|
-
|
|
111
|
-
.@{tree-node-prefix-cls}-title {
|
|
112
|
-
color: @tree-node-checked-text-color;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.@{tree-node-prefix-cls}-icon {
|
|
116
|
-
color: @tree-node-checked-text-color;
|
|
117
|
-
}
|
|
125
|
+
.node-selected()
|
|
118
126
|
}
|
|
119
127
|
|
|
120
128
|
&-draggabled {
|
package/es/tree/style/mixin.less
CHANGED
|
@@ -1 +1,25 @@
|
|
|
1
|
-
@import './token.less';
|
|
1
|
+
@import './token.less';
|
|
2
|
+
|
|
3
|
+
.node-hover {
|
|
4
|
+
&-hover {
|
|
5
|
+
transition: background-color @tree-transition-duration, color @tree-transition-duration;
|
|
6
|
+
|
|
7
|
+
&:hover {
|
|
8
|
+
background-color: @tree-node-hover-bg-color;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.node-selected {
|
|
15
|
+
background-color: @tree-node-checked-bg-color !important;
|
|
16
|
+
color: @tree-node-checked-text-color;
|
|
17
|
+
|
|
18
|
+
.@{tree-node-prefix-cls}-title {
|
|
19
|
+
color: @tree-node-checked-text-color;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.@{tree-node-prefix-cls}-icon {
|
|
23
|
+
color: @tree-node-checked-text-color;
|
|
24
|
+
}
|
|
25
|
+
}
|
package/es/tree/style/token.less
CHANGED
|
@@ -16,10 +16,12 @@
|
|
|
16
16
|
@tree-node-drag-line-border-color: var(~'@{tree-prefix}-node-drag-line-color-background', #276FF5);
|
|
17
17
|
|
|
18
18
|
// sizing
|
|
19
|
-
@tree-expand-icon-height: var(~'@{tree-prefix}-expand-icon-sizing-height',
|
|
20
|
-
@tree-expand-icon-width: var(~'@{tree-prefix}-expand-icon-sizing-width',
|
|
21
|
-
@tree-
|
|
22
|
-
@tree-
|
|
19
|
+
@tree-expand-icon-height: var(~'@{tree-prefix}-expand-icon-sizing-height', 16px);
|
|
20
|
+
@tree-expand-icon-width: var(~'@{tree-prefix}-expand-icon-sizing-width', 16px);
|
|
21
|
+
@tree-expand-icon-loading-height: var(~'@{tree-prefix}-expand-icon-loading-sizing-height', 16px);
|
|
22
|
+
@tree-expand-icon-loading-width: var(~'@{tree-prefix}-expand-icon-loading-sizing-width', 16px);
|
|
23
|
+
@tree-node-icon-height: var(~'@{tree-prefix}-node-icon-sizing-height', 16px);
|
|
24
|
+
@tree-node-icon-width: var(~'@{tree-prefix}-node-icon-sizing-width', 16px);
|
|
23
25
|
|
|
24
26
|
// font
|
|
25
27
|
@tree-font-size: var(~'@{tree-prefix}-font-size', @font-size-small);
|
package/es/tree/tree.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export interface TreeProps {
|
|
|
24
24
|
virtual?: boolean;
|
|
25
25
|
scrollToKey?: string;
|
|
26
26
|
selectedKeys?: string[];
|
|
27
|
+
loadData?: () => void;
|
|
27
28
|
onCheck?: (checkedKeys: string[], { checked, node, event, halfCheckedKeys }: any) => void;
|
|
28
29
|
onExpand?: (expandedKeys: string[], { expanded, node }: any) => void;
|
|
29
30
|
onSelect?: ({ checked, node, event }: any) => void;
|
|
@@ -36,6 +37,7 @@ export interface TreeProps {
|
|
|
36
37
|
setTreeNodeClassName?: (node: any) => string;
|
|
37
38
|
setTreeNodeStyle?: (node: any) => Map<string, string>;
|
|
38
39
|
estimatedItemSize?: number;
|
|
40
|
+
expandOnClickNode?: boolean;
|
|
39
41
|
}
|
|
40
42
|
export declare type TreeNodeData = {
|
|
41
43
|
checkable?: boolean;
|