@kdcloudjs/kdesign 1.5.2 → 1.5.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.
Files changed (107) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dist/default-theme.js +4 -4
  3. package/dist/kdesign-complete.less +169 -88
  4. package/dist/kdesign.css +165 -86
  5. package/dist/kdesign.css.map +1 -1
  6. package/dist/kdesign.js +335 -220
  7. package/dist/kdesign.js.map +1 -1
  8. package/dist/kdesign.min.css +4 -4
  9. package/dist/kdesign.min.js +6 -6
  10. package/dist/kdesign.min.js.map +1 -1
  11. package/es/_utils/usePopper.js +17 -8
  12. package/es/alert/alert.js +2 -2
  13. package/es/alert/style/index.css +27 -11
  14. package/es/alert/style/index.less +24 -10
  15. package/es/alert/style/mixin.less +8 -2
  16. package/es/alert/style/token.less +16 -8
  17. package/es/config-provider/compDefaultProps.d.ts +1 -0
  18. package/es/config-provider/compDefaultProps.js +2 -1
  19. package/es/drawer/drawer.js +1 -0
  20. package/es/dropdown/dropdown.js +16 -6
  21. package/es/dropdown/style/index.css +13 -14
  22. package/es/dropdown/style/index.less +4 -5
  23. package/es/dropdown/style/token.less +6 -5
  24. package/es/input/ClearableLabeledInput.js +5 -5
  25. package/es/input/style/index.css +5 -0
  26. package/es/input/style/index.less +5 -0
  27. package/es/radio/style/index.css +7 -1
  28. package/es/radio/style/index.less +9 -1
  29. package/es/search/style/index.css +3 -3
  30. package/es/select/select.js +1 -1
  31. package/es/spin/style/index.css +25 -26
  32. package/es/spin/style/index.less +18 -19
  33. package/es/spin/style/token.less +9 -3
  34. package/es/stepper/stepper.js +9 -4
  35. package/es/stepper/style/index.css +2 -0
  36. package/es/stepper/style/index.less +2 -0
  37. package/es/stepper/style/token.less +1 -2
  38. package/es/style/icon/kdicon.css +2 -1
  39. package/es/style/icon/kdicon.woff +0 -0
  40. package/es/style/themes/default.less +3 -4
  41. package/es/tabs/style/index.css +1 -0
  42. package/es/tabs/style/index.less +1 -0
  43. package/es/timeline/style/index.css +22 -21
  44. package/es/timeline/style/index.less +2 -2
  45. package/es/timeline/style/token.less +4 -7
  46. package/es/tooltip/tooltip.js +1 -1
  47. package/es/tree/style/index.css +56 -7
  48. package/es/tree/style/index.less +26 -18
  49. package/es/tree/style/mixin.less +25 -1
  50. package/es/tree/style/token.less +6 -4
  51. package/es/tree/tree.d.ts +2 -0
  52. package/es/tree/tree.js +77 -20
  53. package/es/tree/treeHooks.d.ts +1 -1
  54. package/es/tree/treeHooks.js +3 -4
  55. package/es/tree/treeNode.d.ts +1 -0
  56. package/es/tree/treeNode.js +45 -49
  57. package/es/tree/utils/treeUtils.d.ts +6 -3
  58. package/es/tree/utils/treeUtils.js +66 -42
  59. package/lib/_utils/usePopper.js +17 -8
  60. package/lib/alert/alert.js +2 -2
  61. package/lib/alert/style/index.css +27 -11
  62. package/lib/alert/style/index.less +24 -10
  63. package/lib/alert/style/mixin.less +8 -2
  64. package/lib/alert/style/token.less +16 -8
  65. package/lib/config-provider/compDefaultProps.d.ts +1 -0
  66. package/lib/config-provider/compDefaultProps.js +2 -1
  67. package/lib/drawer/drawer.js +1 -0
  68. package/lib/dropdown/dropdown.js +15 -6
  69. package/lib/dropdown/style/index.css +13 -14
  70. package/lib/dropdown/style/index.less +4 -5
  71. package/lib/dropdown/style/token.less +6 -5
  72. package/lib/input/ClearableLabeledInput.js +5 -5
  73. package/lib/input/style/index.css +5 -0
  74. package/lib/input/style/index.less +5 -0
  75. package/lib/radio/style/index.css +7 -1
  76. package/lib/radio/style/index.less +9 -1
  77. package/lib/search/style/index.css +3 -3
  78. package/lib/select/select.js +1 -1
  79. package/lib/spin/style/index.css +25 -26
  80. package/lib/spin/style/index.less +18 -19
  81. package/lib/spin/style/token.less +9 -3
  82. package/lib/stepper/stepper.js +9 -4
  83. package/lib/stepper/style/index.css +2 -0
  84. package/lib/stepper/style/index.less +2 -0
  85. package/lib/stepper/style/token.less +1 -2
  86. package/lib/style/icon/kdicon.css +2 -1
  87. package/lib/style/icon/kdicon.woff +0 -0
  88. package/lib/style/themes/default.less +3 -4
  89. package/lib/tabs/style/index.css +1 -0
  90. package/lib/tabs/style/index.less +1 -0
  91. package/lib/timeline/style/index.css +22 -21
  92. package/lib/timeline/style/index.less +2 -2
  93. package/lib/timeline/style/token.less +4 -7
  94. package/lib/tooltip/tooltip.js +1 -1
  95. package/lib/tree/style/index.css +56 -7
  96. package/lib/tree/style/index.less +26 -18
  97. package/lib/tree/style/mixin.less +25 -1
  98. package/lib/tree/style/token.less +6 -4
  99. package/lib/tree/tree.d.ts +2 -0
  100. package/lib/tree/tree.js +78 -20
  101. package/lib/tree/treeHooks.d.ts +1 -1
  102. package/lib/tree/treeHooks.js +3 -4
  103. package/lib/tree/treeNode.d.ts +1 -0
  104. package/lib/tree/treeNode.js +46 -48
  105. package/lib/tree/utils/treeUtils.d.ts +6 -3
  106. package/lib/tree/utils/treeUtils.js +64 -42
  107. package/package.json +1 -1
@@ -99,6 +99,7 @@
99
99
  .kdicon-fixed-solid:before { content: "\e65f"; }
100
100
  .kdicon-fixed-window:before { content: "\e6d1"; }
101
101
  .kdicon-fixed:before { content: "\e6e3"; }
102
+ .kdicon-fold:before { content: "\e71d"; }
102
103
  .kdicon-foldmenu:before { content: "\e70e"; }
103
104
  .kdicon-font-background-solid:before { content: "\e673"; }
104
105
  .kdicon-font-color-solid:before { content: "\e674"; }
@@ -209,7 +210,7 @@
209
210
  .kdicon-two-window:before { content: "\e6f6"; }
210
211
  .kdicon-underline-solid:before { content: "\e671"; }
211
212
  .kdicon-unfold-all:before { content: "\e6ad"; }
212
- .kdicon-unfold:before { content: "\e6bb"; }
213
+ .kdicon-unfold:before { content: "\e71e"; }
213
214
  .kdicon-unfoldmenu:before { content: "\e70d"; }
214
215
  .kdicon-unlock-solid:before { content: "\e666"; }
215
216
  .kdicon-unlock:before { content: "\e69e"; }
Binary file
@@ -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: #2386ee;
64
- @logo-color-2: #00ccfe;
65
- @logo-color-3: #05c8c8;
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;
@@ -294,6 +294,7 @@
294
294
  min-width: 120px;
295
295
  height: 100%;
296
296
  font-size: 0;
297
+ border-top: 1px solid transparent;
297
298
  }
298
299
  .kd-tabs-navs-card.kd-tabs-navs-left::before,
299
300
  .kd-tabs-navs-card.kd-tabs-navs-right::before,
@@ -156,6 +156,7 @@
156
156
  min-width: 120px;
157
157
  height: 100%;
158
158
  font-size: 0;
159
+ border-top: 1px solid transparent;
159
160
  &::before, &::after {
160
161
  position: absolute;
161
162
  content: '';
@@ -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, 26px);
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: 1px;
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: 1px;
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: 8px;
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',26px);
26
+ @timeline-item-padding-bottom: var(~'@{timeline-prefix}-spacing-padding-bottom',24px);
30
27
 
31
28
 
32
29
 
@@ -41,7 +41,7 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function (props, ref) {
41
41
 
42
42
  var prefixCls = getPrefixCls(pkgPrefixCls, 'tooltip', customPrefixcls);
43
43
  var tiplocator = /*#__PURE__*/React.cloneElement(React.Children.count(children) === 1 && children.type ? children : /*#__PURE__*/React.createElement("span", null, children), {
44
- ref: ref
44
+ ref: children.ref || ref
45
45
  });
46
46
  var popperProps = (0, _extends2.default)((0, _extends2.default)({}, allProps), {
47
47
  prefixCls: prefixCls,
@@ -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, 22px);
180
- width: var(--kd-c-tree-expand-icon-sizing-width, 22px);
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, 20px);
195
- width: var(--kd-c-tree-node-icon-sizing-width, 20px);
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, 20px);
289
- width: var(--kd-c-tree-node-icon-sizing-width, 20px);
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;
@@ -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
- &-item-hover {
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
- background-color: @tree-node-checked-bg-color !important;
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 {
@@ -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
+ }
@@ -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', 22px);
20
- @tree-expand-icon-width: var(~'@{tree-prefix}-expand-icon-sizing-width', 22px);
21
- @tree-node-icon-height: var(~'@{tree-prefix}-node-icon-sizing-height', 20px);
22
- @tree-node-icon-width: var(~'@{tree-prefix}-node-icon-sizing-width', 20px);
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);
@@ -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;