@kdcloudjs/kdesign 1.6.5 → 1.6.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.
Files changed (108) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/kdesign-complete.less +113 -106
  3. package/dist/kdesign.css +108 -84
  4. package/dist/kdesign.css.map +1 -1
  5. package/dist/kdesign.js +758 -513
  6. package/dist/kdesign.js.map +1 -1
  7. package/dist/kdesign.min.css +3 -3
  8. package/dist/kdesign.min.js +8 -8
  9. package/dist/kdesign.min.js.map +1 -1
  10. package/es/_utils/hooks.js +1 -9
  11. package/es/carousel/style/index.css +3 -0
  12. package/es/carousel/style/index.less +4 -0
  13. package/es/cascader/style/index.css +7 -7
  14. package/es/cascader/style/token.less +2 -2
  15. package/es/config-provider/compDefaultProps.d.ts +5 -0
  16. package/es/config-provider/compDefaultProps.js +6 -1
  17. package/es/date-picker/date-picker.js +11 -14
  18. package/es/date-picker/panel/month/month.d.ts +0 -1
  19. package/es/date-picker/panel/month/month.js +6 -4
  20. package/es/date-picker/range/input-range.js +41 -11
  21. package/es/date-picker/range-picker.js +8 -11
  22. package/es/date-picker/single/input-date.js +40 -10
  23. package/es/date-picker/style/index.css +27 -23
  24. package/es/date-picker/style/index.less +16 -33
  25. package/es/date-picker/style/mixin.less +7 -0
  26. package/es/date-picker/style/token.less +2 -1
  27. package/es/form/Field.d.ts +1 -0
  28. package/es/form/Field.js +9 -5
  29. package/es/form/FieldLabel.d.ts +1 -0
  30. package/es/form/FieldLabel.js +4 -2
  31. package/es/input/ClearableLabeledInput.js +23 -5
  32. package/es/input/TextArea.d.ts +1 -0
  33. package/es/input/TextArea.js +8 -6
  34. package/es/input/style/index.css +12 -8
  35. package/es/input/style/index.less +9 -5
  36. package/es/input/style/mixin.less +3 -3
  37. package/es/input/style/token.less +2 -0
  38. package/es/search/style/index.css +3 -1
  39. package/es/search/style/index.less +3 -1
  40. package/es/search/style/token.less +2 -1
  41. package/es/select/interface.d.ts +2 -0
  42. package/es/select/option.js +1 -1
  43. package/es/select/select.js +180 -128
  44. package/es/select/style/index.css +54 -24
  45. package/es/select/style/index.less +60 -43
  46. package/es/select/style/mixin.less +0 -2
  47. package/es/select/style/token.less +2 -0
  48. package/es/split-panel/style/index.css +0 -6
  49. package/es/split-panel/style/index.less +0 -3
  50. package/es/steps/style/index.css +0 -13
  51. package/es/steps/style/index.less +0 -11
  52. package/es/table/feature/mergeCellHover.d.ts +3 -0
  53. package/es/table/feature/mergeCellHover.js +7 -0
  54. package/es/table/interface.d.ts +8 -0
  55. package/es/table/table.d.ts +2 -2
  56. package/es/table/table.js +20 -6
  57. package/es/tooltip/style/index.css +1 -1
  58. package/es/tooltip/style/token.less +1 -1
  59. package/lib/_utils/hooks.js +1 -9
  60. package/lib/carousel/style/index.css +3 -0
  61. package/lib/carousel/style/index.less +4 -0
  62. package/lib/cascader/style/index.css +7 -7
  63. package/lib/cascader/style/token.less +2 -2
  64. package/lib/config-provider/compDefaultProps.d.ts +5 -0
  65. package/lib/config-provider/compDefaultProps.js +6 -1
  66. package/lib/date-picker/date-picker.js +10 -16
  67. package/lib/date-picker/panel/month/month.d.ts +0 -1
  68. package/lib/date-picker/panel/month/month.js +10 -8
  69. package/lib/date-picker/range/input-range.js +40 -11
  70. package/lib/date-picker/range-picker.js +7 -13
  71. package/lib/date-picker/single/input-date.js +37 -9
  72. package/lib/date-picker/style/index.css +27 -23
  73. package/lib/date-picker/style/index.less +16 -33
  74. package/lib/date-picker/style/mixin.less +7 -0
  75. package/lib/date-picker/style/token.less +2 -1
  76. package/lib/form/Field.d.ts +1 -0
  77. package/lib/form/Field.js +10 -6
  78. package/lib/form/FieldLabel.d.ts +1 -0
  79. package/lib/form/FieldLabel.js +4 -2
  80. package/lib/input/ClearableLabeledInput.js +34 -5
  81. package/lib/input/TextArea.d.ts +1 -0
  82. package/lib/input/TextArea.js +9 -7
  83. package/lib/input/style/index.css +12 -8
  84. package/lib/input/style/index.less +9 -5
  85. package/lib/input/style/mixin.less +3 -3
  86. package/lib/input/style/token.less +2 -0
  87. package/lib/search/style/index.css +3 -1
  88. package/lib/search/style/index.less +3 -1
  89. package/lib/search/style/token.less +2 -1
  90. package/lib/select/interface.d.ts +2 -0
  91. package/lib/select/option.js +1 -1
  92. package/lib/select/select.js +179 -126
  93. package/lib/select/style/index.css +54 -24
  94. package/lib/select/style/index.less +60 -43
  95. package/lib/select/style/mixin.less +0 -2
  96. package/lib/select/style/token.less +2 -0
  97. package/lib/split-panel/style/index.css +0 -6
  98. package/lib/split-panel/style/index.less +0 -3
  99. package/lib/steps/style/index.css +0 -13
  100. package/lib/steps/style/index.less +0 -11
  101. package/lib/table/feature/mergeCellHover.d.ts +3 -0
  102. package/lib/table/feature/mergeCellHover.js +15 -0
  103. package/lib/table/interface.d.ts +8 -0
  104. package/lib/table/table.d.ts +2 -2
  105. package/lib/table/table.js +20 -4
  106. package/lib/tooltip/style/index.css +1 -1
  107. package/lib/tooltip/style/token.less +1 -1
  108. package/package.json +1 -1
@@ -248,6 +248,9 @@
248
248
  .kd-select-visible .kd-select-icon-active {
249
249
  color: #3761ca;
250
250
  }
251
+ .kd-select-visible .kd-select-selection-item {
252
+ color: var(--kd-c-select-placeholder-color-text, #b2b2b2);
253
+ }
251
254
  .kd-select-icon-arrow {
252
255
  display: -webkit-inline-box;
253
256
  display: -ms-inline-flexbox;
@@ -278,36 +281,20 @@
278
281
  }
279
282
  .kd-select-icon-clear {
280
283
  opacity: 0;
284
+ z-index: 1;
285
+ position: absolute;
286
+ background: #fff;
281
287
  -webkit-transition: opacity 0.15s ease;
282
288
  transition: opacity 0.15s ease;
283
289
  }
284
290
  .kd-select-icon-clear:hover {
285
291
  color: var(--kd-c-select-color-border-hover, var(--kd-g-color-theme, #5582f3));
286
292
  }
287
- .kd-select-selection-search {
288
- position: absolute;
289
- top: 0;
290
- bottom: 0;
291
- left: 11px;
292
- }
293
- .kd-select-selection-search-input {
294
- opacity: 0;
295
- margin: 0;
296
- padding: 0;
297
- background: 0 0;
298
- border: none;
299
- outline: none;
300
- -webkit-appearance: none;
301
- -moz-appearance: none;
302
- appearance: none;
303
- }
304
- .kd-select-selection-search-input:hover {
305
- cursor: pointer;
306
- }
307
293
  .kd-select-focused {
308
294
  border-color: var(--kd-c-select-color-border-foucs, var(--kd-g-color-theme, #5582f3)) !important;
309
295
  }
310
296
  .kd-select-placeholder {
297
+ position: absolute;
311
298
  color: var(--kd-c-select-placeholder-color-text, #b2b2b2);
312
299
  overflow: hidden;
313
300
  white-space: nowrap;
@@ -331,7 +318,7 @@
331
318
  border: 1px solid var(--kd-c-select-color-border-hover, var(--kd-g-color-theme, #5582f3));
332
319
  }
333
320
  .kd-select-bordered .kd-select-suffix {
334
- right: 10px;
321
+ padding-right: 8px;
335
322
  }
336
323
  .kd-select-wrapper {
337
324
  -webkit-transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
@@ -352,6 +339,7 @@
352
339
  box-sizing: border-box;
353
340
  overflow-y: auto;
354
341
  overflow-x: hidden;
342
+ position: relative;
355
343
  }
356
344
  .kd-select-dropdown {
357
345
  display: block;
@@ -433,19 +421,16 @@
433
421
  .kd-select-size-small {
434
422
  min-height: var(--kd-c-select-sizing-height-small, 24px);
435
423
  max-height: calc(var(--kd-c-select-sizing-height-small, 24px) * 3 - 10px);
436
- line-height: var(--kd-c-select-line-height-small, 14px);
437
424
  font-size: var(--kd-c-select-font-size-small, 12px);
438
425
  }
439
426
  .kd-select-size-middle {
440
427
  min-height: var(--kd-c-select-sizing-height-middle, 30px);
441
428
  max-height: calc(var(--kd-c-select-sizing-height-middle, 30px) * 3 - 10px);
442
- line-height: var(--kd-c-select-line-height-middle, 22px);
443
429
  font-size: var(--kd-c-select-font-size-middle, 14px);
444
430
  }
445
431
  .kd-select-size-large {
446
432
  min-height: var(--kd-c-select-sizing-height-large, 36px);
447
433
  max-height: calc(var(--kd-c-select-sizing-height-large, 36px) * 3 - 10px);
448
- line-height: var(--kd-c-select-line-height-large, 28px);
449
434
  font-size: var(--kd-c-select-font-size-large, 16px);
450
435
  }
451
436
  .kd-select-suffix {
@@ -467,6 +452,20 @@
467
452
  justify-content: center;
468
453
  margin-left: 8px;
469
454
  }
455
+ .kd-select-single .kd-select-selection-search {
456
+ position: absolute;
457
+ right: 28px;
458
+ left: 0;
459
+ height: 100%;
460
+ }
461
+ .kd-select-single .kd-select-selection-search-input {
462
+ outline: 0;
463
+ border-radius: 0;
464
+ border: none;
465
+ background: transparent;
466
+ height: 100%;
467
+ width: 100%;
468
+ }
470
469
  .kd-select-single-focused {
471
470
  border-color: var(--kd-c-select-color-border-foucs, var(--kd-g-color-theme, #5582f3)) !important;
472
471
  }
@@ -483,6 +482,12 @@
483
482
  .kd-select-single:hover .kd-select-icon-clear {
484
483
  opacity: 1;
485
484
  }
485
+ .kd-select-single .kd-select-icon-clear {
486
+ color: var(--kd-c-select-icon-clear-color-text, #d9d9d9);
487
+ }
488
+ .kd-select-single .kd-select-icon-clear:hover {
489
+ color: var(--kd-c-select-icon-clear-color-text-hover, #999);
490
+ }
486
491
  .kd-select-single-text {
487
492
  color: var(--kd-c-select-single-color-text, var(--kd-g-color-text-primary, #212121));
488
493
  overflow: hidden;
@@ -561,6 +566,25 @@
561
566
  width: 100%;
562
567
  min-width: 20px;
563
568
  }
569
+ .kd-select-multiple .kd-select-selection-search {
570
+ position: relative;
571
+ max-width: 100%;
572
+ }
573
+ .kd-select-multiple .kd-select-selection-search-input {
574
+ outline: 0;
575
+ border-radius: 0;
576
+ border: none;
577
+ background: transparent;
578
+ width: 100%;
579
+ }
580
+ .kd-select-multiple .kd-select-selection-search-mirror {
581
+ position: absolute;
582
+ top: 0;
583
+ left: 0;
584
+ z-index: 999;
585
+ white-space: pre;
586
+ visibility: hidden;
587
+ }
564
588
  .kd-select-multiple-disabled {
565
589
  cursor: not-allowed;
566
590
  background-color: var(--kd-c-select-color-background-disabled, #f5f5f5);
@@ -572,6 +596,12 @@
572
596
  .kd-select-multiple:hover .kd-select-icon-clear {
573
597
  opacity: 1;
574
598
  }
599
+ .kd-select-multiple .kd-select-icon-clear {
600
+ color: var(--kd-c-select-icon-clear-color-text, #d9d9d9);
601
+ }
602
+ .kd-select-multiple .kd-select-icon-clear:hover {
603
+ color: var(--kd-c-select-icon-clear-color-text-hover, #999);
604
+ }
575
605
  .kd-select-multiple-selector {
576
606
  position: relative;
577
607
  cursor: text;
@@ -22,6 +22,9 @@
22
22
  .@{select-prefix-cls}-icon-active {
23
23
  color: #3761ca;
24
24
  }
25
+ .@{select-prefix-cls}-selection-item {
26
+ color: @select-placeholder-color;
27
+ }
25
28
  }
26
29
 
27
30
  &-icon {
@@ -46,6 +49,9 @@
46
49
 
47
50
  &-clear {
48
51
  opacity: 0;
52
+ z-index: 1;
53
+ position: absolute;
54
+ background: #fff;
49
55
  transition: opacity 0.15s ease;
50
56
  &:hover {
51
57
  color: @select-g-color-border-hover;
@@ -53,30 +59,11 @@
53
59
  }
54
60
  }
55
61
 
56
- &-selection-search {
57
- position: absolute;
58
- top: 0;
59
- bottom: 0;
60
- left: 11px;
61
- &-input {
62
- opacity: 0;
63
- margin: 0;
64
- padding: 0;
65
- background: 0 0;
66
- border: none;
67
- outline: none;
68
- appearance: none;
69
- &:hover {
70
- cursor: pointer;
71
- }
72
- }
73
- }
74
-
75
62
  &-focused {
76
63
  .focusColor();
77
- // border-bottom: 1px solid #5582F3 ;
78
64
  }
79
65
  &-placeholder {
66
+ position: absolute;
80
67
  color: @select-placeholder-color;
81
68
  overflow: hidden;
82
69
  white-space: nowrap;
@@ -103,7 +90,7 @@
103
90
  }
104
91
 
105
92
  .@{select-prefix-cls}-suffix {
106
- right: 10px;
93
+ padding-right: 8px;
107
94
  }
108
95
  }
109
96
 
@@ -119,6 +106,7 @@
119
106
  box-sizing: border-box;
120
107
  overflow-y: auto;
121
108
  overflow-x: hidden;
109
+ position: relative;
122
110
  }
123
111
 
124
112
  &-dropdown {
@@ -180,7 +168,6 @@
180
168
 
181
169
  &-selected:not(&-disabled) {
182
170
  color: @select-item-selected-color;
183
- // font-weight: @select-item-selected-font-weight;
184
171
  background-color: @select-item-selected-bg;
185
172
  }
186
173
 
@@ -216,6 +203,22 @@
216
203
  margin-left: 8px;
217
204
  }
218
205
  &-single {
206
+ .@{select-prefix-cls}-selection {
207
+ &-search {
208
+ position: absolute;
209
+ right: 28px;
210
+ left: 0;
211
+ height: 100%;
212
+ &-input {
213
+ outline: 0;
214
+ border-radius: 0;
215
+ border: none;
216
+ background: transparent;
217
+ height: 100%;
218
+ width: 100%;
219
+ }
220
+ }
221
+ }
219
222
  &-focused {
220
223
  .focusColor();
221
224
  }
@@ -233,6 +236,13 @@
233
236
  &:hover .@{select-prefix-cls}-icon-clear {
234
237
  opacity: 1;
235
238
  }
239
+
240
+ .@{select-prefix-cls}-icon-clear {
241
+ color: @select-clear-color;
242
+ &:hover {
243
+ color: @select-clear-color-hover;
244
+ }
245
+ }
236
246
  &-text {
237
247
  color: @select-single-color-text;
238
248
  .over();
@@ -243,7 +253,6 @@
243
253
  }
244
254
 
245
255
  .@{select-prefix-cls}-selection-item {
246
- // position: relative;
247
256
  display: inline-flex;
248
257
  box-sizing: border-box;
249
258
  align-items: center;
@@ -252,12 +261,6 @@
252
261
  height: 20px;
253
262
  line-height: 20px;
254
263
  margin: 2px 8px 2px 0;
255
- // margin: 2px 4px 2px 0;
256
- // margin-right: 4px;
257
- // padding-left: 8px;
258
- // background: #fafafa;
259
- // border: 1px solid #d9d9d9;
260
- // border-radius: 2px;
261
264
  cursor: default;
262
265
  user-select: none;
263
266
  &-small {
@@ -289,24 +292,13 @@
289
292
  border: 1px solid #ccc;
290
293
  color: #212121;
291
294
  }
292
- // &-remove {
293
- // text-align: center;
294
- // text-transform: none;
295
- // display: inline-flex;
296
- // color: rgba(0, 0, 0, 0.45);
297
- // line-height: inherit;
298
- // cursor: pointer;
299
- // &:hover {
300
- // color: #212121;
301
- // }
302
- // }
295
+
303
296
  &-span {
304
297
  position: relative;
305
298
  margin-left: 0.5px;
306
299
  box-sizing: border-box;
307
300
  }
308
301
  &-input {
309
- // opacity: 0;
310
302
  cursor: text;
311
303
  margin: 0;
312
304
  padding: 0;
@@ -321,6 +313,27 @@
321
313
 
322
314
  // 多选
323
315
  &-multiple {
316
+ .@{select-prefix-cls}-selection {
317
+ &-search {
318
+ position: relative;
319
+ max-width: 100%;
320
+ &-input {
321
+ outline: 0;
322
+ border-radius: 0;
323
+ border: none;
324
+ background: transparent;
325
+ width: 100%;
326
+ }
327
+ &-mirror {
328
+ position: absolute;
329
+ top: 0;
330
+ left: 0;
331
+ z-index: 999;
332
+ white-space: pre;
333
+ visibility: hidden;
334
+ }
335
+ }
336
+ }
324
337
  &-disabled {
325
338
  cursor: not-allowed;
326
339
  background-color: @select-color-background-disabled;
@@ -333,6 +346,12 @@
333
346
  &:hover .@{select-prefix-cls}-icon-clear {
334
347
  opacity: 1;
335
348
  }
349
+ .@{select-prefix-cls}-icon-clear {
350
+ color: @select-clear-color;
351
+ &:hover {
352
+ color: @select-clear-color-hover;
353
+ }
354
+ }
336
355
  &-selector {
337
356
  position: relative;
338
357
  cursor: text;
@@ -378,5 +397,3 @@
378
397
  transition: all calc(@transition-duration - 0.1s) @ease;
379
398
  }
380
399
  }
381
-
382
-
@@ -12,14 +12,12 @@
12
12
  }
13
13
 
14
14
  .focusColor() {
15
- // border-bottom: 1px solid #5582F3;
16
15
  border-color: @select-g-color-border-foucs !important;
17
16
  }
18
17
 
19
18
  .select-input-size(@height, @maxHeight, @lineHeight, @fontSize) {
20
19
  min-height: @height;
21
20
  max-height: calc(@maxHeight * 3 - 10px);
22
- line-height: @lineHeight;
23
21
  font-size: @fontSize;
24
22
  }
25
23
 
@@ -21,6 +21,8 @@
21
21
  @select-color-text-disabled: var(~'@{select-custom-prefix}-color-text-disabled', @color-disabled);
22
22
  @select-arrow-icon-color-text-disabled: var(~'@{select-custom-prefix}-arrow-icon-color-text-disabled', #b2b2b2);
23
23
  @select-single-color-text: var(~'@{select-custom-prefix}-single-color-text', @color-text-primary);
24
+ @select-clear-color: var(~'@{select-custom-prefix}-icon-clear-color-text', #d9d9d9);
25
+ @select-clear-color-hover: var(~'@{select-custom-prefix}-icon-clear-color-text-hover', #999);
24
26
 
25
27
  // font
26
28
  @select-list-font-size: var(~'@{select-custom-prefix}-dropdown-font-size', 12px); // 下拉列表文字大小
@@ -114,8 +114,6 @@
114
114
  .kd-split-panel {
115
115
  position: absolute;
116
116
  overflow: hidden;
117
- -webkit-transition: all calc(0.3s - 0.1s) cubic-bezier(0, 0.4, 0.4, 1);
118
- transition: all calc(0.3s - 0.1s) cubic-bezier(0, 0.4, 0.4, 1);
119
117
  }
120
118
  .kd-split-panel.left-panel,
121
119
  .kd-split-panel.right-panel {
@@ -154,8 +152,6 @@
154
152
  -webkit-transform: translate(-50%, -50%);
155
153
  transform: translate(-50%, -50%);
156
154
  z-index: 10;
157
- -webkit-transition: all calc(0.3s - 0.1s) cubic-bezier(0, 0.4, 0.4, 1);
158
- transition: all calc(0.3s - 0.1s) cubic-bezier(0, 0.4, 0.4, 1);
159
155
  }
160
156
  .kd-split-trigger-con.is-active .kd-split-trigger-arrow {
161
157
  border-color: var(--kd-c-split-panel-arrow-color-background, #999);
@@ -192,8 +188,6 @@
192
188
  -webkit-box-pack: center;
193
189
  -ms-flex-pack: center;
194
190
  justify-content: center;
195
- -webkit-transition: all calc(0.3s - 0.1s) cubic-bezier(0, 0.4, 0.4, 1);
196
- transition: all calc(0.3s - 0.1s) cubic-bezier(0, 0.4, 0.4, 1);
197
191
  -webkit-box-sizing: border-box;
198
192
  box-sizing: border-box;
199
193
  border: var(--kd-c-split-panel-arrow-sizing-border, 1px) solid transparent;
@@ -17,7 +17,6 @@
17
17
  &-panel {
18
18
  position: absolute;
19
19
  overflow: hidden;
20
- transition: all calc(@transition-duration - 0.1s) @ease-out;
21
20
  &.left-panel, &.right-panel {
22
21
  top: 0;
23
22
  bottom: 0;
@@ -54,7 +53,6 @@
54
53
  position: absolute;
55
54
  transform: translate(-50%, -50%);
56
55
  z-index: 10;
57
- transition: all calc(@transition-duration - 0.1s) @ease-out;
58
56
  &.is-active {
59
57
  .@{split-prefix-cls}-trigger-arrow {
60
58
  border-color: @split-panel-trigger-arrow-color;
@@ -95,7 +93,6 @@
95
93
  display: inline-flex;
96
94
  align-items: center;
97
95
  justify-content: center;
98
- transition: all calc(@transition-duration - 0.1s) @ease-out;
99
96
  box-sizing: border-box;
100
97
  border: @split-panel-arrow-border-width solid transparent;
101
98
  .@{kd-prefix}icon {
@@ -164,9 +164,6 @@
164
164
  -webkit-box-direction: normal;
165
165
  -ms-flex-direction: column;
166
166
  flex-direction: column;
167
- -webkit-box-pack: center;
168
- -ms-flex-pack: center;
169
- justify-content: center;
170
167
  }
171
168
  .kd-steps-item-iconContainer {
172
169
  display: -webkit-box;
@@ -233,21 +230,11 @@
233
230
  line-height: 20px;
234
231
  font-size: var(--kd-c-steps-font-size, var(--kd-g-font-size-small, 12px));
235
232
  color: var(--kd-c-steps-color-wait, #999);
236
- overflow: hidden;
237
- text-overflow: ellipsis;
238
- word-break: break-word;
239
- display: -webkit-box;
240
- -webkit-box-orient: vertical;
241
233
  }
242
234
  .kd-steps-item-content .kd-steps-item-description {
243
235
  line-height: 20px;
244
236
  font-size: var(--kd-c-steps-font-size, var(--kd-g-font-size-small, 12px));
245
237
  color: var(--kd-c-steps-color-wait, #999);
246
- overflow: hidden;
247
- text-overflow: ellipsis;
248
- word-break: break-word;
249
- display: -webkit-box;
250
- -webkit-box-orient: vertical;
251
238
  width: var(--kd-c-steps-vertical-description-sizing-width, 200px);
252
239
  }
253
240
  .kd-steps-item-process {
@@ -69,7 +69,6 @@
69
69
  width: 100%;
70
70
  display: flex;
71
71
  flex-direction: column;
72
- justify-content: center;
73
72
  }
74
73
 
75
74
  &-iconContainer {
@@ -126,22 +125,12 @@
126
125
  line-height: 20px;
127
126
  font-size: @steps-font-size;
128
127
  color: @steps-color-wait;
129
- overflow: hidden;
130
- text-overflow: ellipsis;
131
- word-break: break-word;
132
- display: -webkit-box;
133
- -webkit-box-orient: vertical;
134
128
  }
135
129
 
136
130
  .@{steps-prefix-cls}-item-description {
137
131
  line-height: 20px;
138
132
  font-size: @steps-font-size;
139
133
  color: @steps-color-wait;
140
- overflow: hidden;
141
- text-overflow: ellipsis;
142
- word-break: break-word;
143
- display: -webkit-box;
144
- -webkit-box-orient: vertical;
145
134
  width: @steps-vertical-description-sizing-width;
146
135
  }
147
136
  }
@@ -0,0 +1,3 @@
1
+ import { TablePipeline } from '../interface';
2
+ declare function mergeCellHover(pipeline: TablePipeline): void;
3
+ export default mergeCellHover;
@@ -0,0 +1,7 @@
1
+ import { features } from '@kdcloudjs/table';
2
+
3
+ function mergeCellHover(pipeline) {
4
+ pipeline.use(features.mergeCellHover());
5
+ }
6
+
7
+ export default mergeCellHover;
@@ -10,6 +10,14 @@ declare type TablePropsOfComponents = Pick<BaseTableProps, 'components'> & {
10
10
  };
11
11
  };
12
12
  declare type TablePropsOfExtend = Omit<BaseTableProps, 'components'>;
13
+ export declare type TableApi = {
14
+ getColumns: () => any[];
15
+ getDataSource: () => any[];
16
+ getFooterDataSource: () => any[];
17
+ };
18
+ export declare type TableInstance = {
19
+ api: TableApi;
20
+ };
13
21
  export interface TableProps extends TablePropsOfExtend, TablePropsOfComponents {
14
22
  rowSelection?: TableRowSelection;
15
23
  prefixCls?: string;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { TableProps } from './interface';
3
- declare function Table(props: TableProps): JSX.Element;
3
+ declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<unknown>>;
4
4
  export default Table;
package/es/table/table.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/extends";
2
2
  import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
3
3
  import _sortInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/sort";
4
- import React, { useContext } from 'react';
4
+ import React, { forwardRef, useContext, useImperativeHandle, useRef } from 'react';
5
5
  import { Table as BaseTable, useTablePipeline } from '@kdcloudjs/table';
6
6
  import ConfigContext from '../config-provider/ConfigContext';
7
7
  import Checkbox from '../checkbox/index';
@@ -18,9 +18,9 @@ import useColumnResize from './feature/columnResize';
18
18
  import useColumnDrag from './feature/columnDrag';
19
19
  import useContextMenu from './feature/contextMenu';
20
20
  import useRangeSelection from './feature/useRangeSelection';
21
+ import useMergeCellHover from './feature/mergeCellHover';
21
22
  import devWarning from '../_utils/devwarning';
22
-
23
- function Table(props) {
23
+ var Table = /*#__PURE__*/forwardRef(function (props, ref) {
24
24
  var columns = props.columns,
25
25
  dataSource = props.dataSource,
26
26
  columnDrag = props.columnDrag,
@@ -68,19 +68,32 @@ function Table(props) {
68
68
  columns: columns,
69
69
  dataSource: dataSource
70
70
  });
71
+ var pipelineRef = useRef(pipeline);
72
+ pipelineRef.current = pipeline;
71
73
 
72
74
  if (footerDataSource) {
73
75
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
74
76
  // @ts-ignore
75
77
  pipeline.footerDataSource(footerDataSource);
76
78
  }
79
+
80
+ useImperativeHandle(ref, function () {
81
+ var _a, _b, _c;
82
+
83
+ return {
84
+ api: {
85
+ getColumns: (_a = pipelineRef.current.getColumns) === null || _a === void 0 ? void 0 : _a.bind(pipelineRef.current),
86
+ getDataSource: (_b = pipelineRef.current.getDataSource) === null || _b === void 0 ? void 0 : _b.bind(pipelineRef.current),
87
+ getFooterDataSource: (_c = pipelineRef.current.getFooterDataSource) === null || _c === void 0 ? void 0 : _c.bind(pipelineRef.current)
88
+ }
89
+ };
90
+ });
77
91
  /* -------------------------------------------------------------------------- */
78
92
 
79
93
  /* features */
80
94
 
81
95
  /* -------------------------------------------------------------------------- */
82
96
 
83
-
84
97
  useRowSelection(pipeline, rowSelection);
85
98
  useRowDetail(pipeline, rowDetail);
86
99
  useFilter(pipeline, filter);
@@ -91,6 +104,7 @@ function Table(props) {
91
104
  useColumnDrag(pipeline, columnDrag);
92
105
  useContextMenu(pipeline, contextMenu);
93
106
  useRangeSelection(pipeline, rangeSelection);
107
+ useMergeCellHover(pipeline);
94
108
  /* -------------------------------------------------------------------------- */
95
109
 
96
110
  /* after useTablePipeline, merge pipeline.getProps result */
@@ -135,6 +149,6 @@ function Table(props) {
135
149
  scrollbarWidth: scrollbarWidth,
136
150
  scrollLoad: scrollLoad
137
151
  }));
138
- }
139
-
152
+ });
153
+ Table.displayName = 'Table';
140
154
  export default Table;
@@ -114,7 +114,7 @@
114
114
  -webkit-font-feature-settings: 'tnum';
115
115
  font-feature-settings: 'tnum';
116
116
  max-width: var(--kd-c-tooltip-sizing-max-width, 360px);
117
- padding: var(--kd-c-tooltip-spacing-padding-vertical, 8px) var(--kd-c-tooltip-spacing-padding-vertical, 12px);
117
+ padding: var(--kd-c-tooltip-spacing-padding-vertical, 8px) var(--kd-c-tooltip-spacing-padding-horizontal, 12px);
118
118
  color: var(--kd-c-tooltip-color-text, var(--kd-g-color-text-primary, #212121));
119
119
  border-radius: var(--kd-c-tooltip-radius-border, var(--kd-g-radius-border, 2px));
120
120
  font-size: var(--kd-c-tooltip-color-text, var(--kd-g-font-size-small, 12px));
@@ -11,7 +11,7 @@
11
11
 
12
12
  // spacing
13
13
  @tooltip-vertical-gap: var(~'@{tooltip-custom-prefix}-spacing-padding-vertical', 8px);
14
- @tooltip-horizontal-gap: var(~'@{tooltip-custom-prefix}-spacing-padding-vertical', 12px);
14
+ @tooltip-horizontal-gap: var(~'@{tooltip-custom-prefix}-spacing-padding-horizontal', 12px);
15
15
 
16
16
  // sizing
17
17
  @tooltip-max-width: var(~'@{tooltip-custom-prefix}-sizing-max-width', 360px);
@@ -252,15 +252,7 @@ function useResizeObserver(element, handler) {
252
252
  }, contentRect);
253
253
  ['width', 'height', 'x', 'y', 'bottom', 'top', 'left', 'right'].forEach(function (prop) {
254
254
  rect[prop] = contentRect[prop];
255
- }); // rect.width = contentRect.width
256
- // rect.height = contentRect.height
257
- // rect.x = contentRect.x
258
- // rect.y = contentRect.y
259
- // rect.bottom = contentRect.bottom
260
- // rect.top = contentRect.top
261
- // rect.left = contentRect.left
262
- // rect.right = contentRect.right
263
-
255
+ });
264
256
  handler && handler(rect);
265
257
  };
266
258
 
@@ -109,6 +109,7 @@
109
109
  }
110
110
  .kd-carousel-list {
111
111
  list-style: none;
112
+ padding: 0;
112
113
  display: -webkit-box;
113
114
  display: -ms-flexbox;
114
115
  display: flex;
@@ -182,6 +183,8 @@
182
183
  }
183
184
  .kd-carousel-slidebar {
184
185
  position: absolute;
186
+ list-style: none;
187
+ padding: 0;
185
188
  }
186
189
  .kd-carousel-slidebar-left {
187
190
  display: -webkit-box;
@@ -13,6 +13,7 @@
13
13
 
14
14
  &-list {
15
15
  list-style: none;
16
+ padding: 0;
16
17
  display: flex;
17
18
  flex-direction: row;
18
19
  position: relative;
@@ -79,6 +80,9 @@
79
80
 
80
81
  &-slidebar {
81
82
  position: absolute;
83
+ list-style: none;
84
+ padding: 0;
85
+
82
86
  &-left {
83
87
  .vertical;
84
88
  left: @carousel-dots-margin-left;