@douyinfe/semi-foundation 2.25.0-beta.0 → 2.25.1

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 (81) hide show
  1. package/button/iconButton.scss +1 -0
  2. package/carousel/carousel.scss +4 -0
  3. package/input/input.scss +2 -0
  4. package/lib/cjs/button/iconButton.css +1 -0
  5. package/lib/cjs/button/iconButton.scss +1 -0
  6. package/lib/cjs/carousel/carousel.css +4 -0
  7. package/lib/cjs/carousel/carousel.scss +4 -0
  8. package/lib/cjs/input/input.css +13 -0
  9. package/lib/cjs/input/input.scss +2 -0
  10. package/lib/cjs/modal/modal.css +4 -0
  11. package/lib/cjs/modal/modal.scss +4 -0
  12. package/lib/cjs/notification/notification.css +12 -0
  13. package/lib/cjs/notification/notification.scss +13 -1
  14. package/lib/cjs/overflowList/constants.d.ts +6 -4
  15. package/lib/cjs/overflowList/constants.js +3 -1
  16. package/lib/cjs/overflowList/foundation.d.ts +3 -1
  17. package/lib/cjs/overflowList/foundation.js +59 -38
  18. package/lib/cjs/popover/popover.css +2 -0
  19. package/lib/cjs/popover/popover.scss +2 -0
  20. package/lib/cjs/sideSheet/sideSheet.css +10 -0
  21. package/lib/cjs/sideSheet/sideSheet.scss +10 -0
  22. package/lib/cjs/skeleton/skeleton.css +1 -0
  23. package/lib/cjs/skeleton/skeleton.scss +1 -0
  24. package/lib/cjs/spin/spin.css +2 -0
  25. package/lib/cjs/spin/spin.scss +2 -0
  26. package/lib/cjs/switch/switch.css +4 -0
  27. package/lib/cjs/switch/switch.scss +5 -0
  28. package/lib/cjs/tabs/tabs.css +4 -0
  29. package/lib/cjs/tabs/tabs.scss +4 -0
  30. package/lib/cjs/tagInput/tagInput.css +7 -9
  31. package/lib/cjs/tagInput/tagInput.scss +9 -12
  32. package/lib/cjs/toast/toast.css +2 -0
  33. package/lib/cjs/toast/toast.scss +2 -0
  34. package/lib/cjs/tooltip/tooltip.css +2 -0
  35. package/lib/cjs/tooltip/tooltip.scss +2 -0
  36. package/lib/es/button/iconButton.css +1 -0
  37. package/lib/es/button/iconButton.scss +1 -0
  38. package/lib/es/carousel/carousel.css +4 -0
  39. package/lib/es/carousel/carousel.scss +4 -0
  40. package/lib/es/input/input.css +13 -0
  41. package/lib/es/input/input.scss +2 -0
  42. package/lib/es/modal/modal.css +4 -0
  43. package/lib/es/modal/modal.scss +4 -0
  44. package/lib/es/notification/notification.css +12 -0
  45. package/lib/es/notification/notification.scss +13 -1
  46. package/lib/es/overflowList/constants.d.ts +6 -4
  47. package/lib/es/overflowList/constants.js +3 -1
  48. package/lib/es/overflowList/foundation.d.ts +3 -1
  49. package/lib/es/overflowList/foundation.js +59 -38
  50. package/lib/es/popover/popover.css +2 -0
  51. package/lib/es/popover/popover.scss +2 -0
  52. package/lib/es/sideSheet/sideSheet.css +10 -0
  53. package/lib/es/sideSheet/sideSheet.scss +10 -0
  54. package/lib/es/skeleton/skeleton.css +1 -0
  55. package/lib/es/skeleton/skeleton.scss +1 -0
  56. package/lib/es/spin/spin.css +2 -0
  57. package/lib/es/spin/spin.scss +2 -0
  58. package/lib/es/switch/switch.css +4 -0
  59. package/lib/es/switch/switch.scss +5 -0
  60. package/lib/es/tabs/tabs.css +4 -0
  61. package/lib/es/tabs/tabs.scss +4 -0
  62. package/lib/es/tagInput/tagInput.css +7 -9
  63. package/lib/es/tagInput/tagInput.scss +9 -12
  64. package/lib/es/toast/toast.css +2 -0
  65. package/lib/es/toast/toast.scss +2 -0
  66. package/lib/es/tooltip/tooltip.css +2 -0
  67. package/lib/es/tooltip/tooltip.scss +2 -0
  68. package/modal/modal.scss +4 -0
  69. package/notification/notification.scss +13 -1
  70. package/overflowList/constants.ts +4 -2
  71. package/overflowList/foundation.ts +46 -30
  72. package/package.json +2 -2
  73. package/popover/popover.scss +2 -0
  74. package/sideSheet/sideSheet.scss +10 -0
  75. package/skeleton/skeleton.scss +1 -0
  76. package/spin/spin.scss +2 -0
  77. package/switch/switch.scss +5 -0
  78. package/tabs/tabs.scss +4 -0
  79. package/tagInput/tagInput.scss +9 -12
  80. package/toast/toast.scss +2 -0
  81. package/tooltip/tooltip.scss +2 -0
@@ -25,6 +25,7 @@ $module: #{$prefix}-button;
25
25
  width: 16px;
26
26
  height: 16px;
27
27
  animation: .6s linear infinite #{$prefix}-animation-rotate;
28
+ animation-fill-mode: forwards;
28
29
  }
29
30
  }
30
31
  }
@@ -44,21 +44,25 @@ $module: #{$prefix}-carousel;
44
44
  .#{$module}-content-item-slide-out {
45
45
  display: block;
46
46
  animation: #{$module}-content-item-keyframe-slide-out;
47
+ animation-fill-mode: forwards;
47
48
  }
48
49
 
49
50
  .#{$module}-content-item-slide-in {
50
51
  display: block;
51
52
  animation: #{$module}-content-item-keyframe-slide-in;
53
+ animation-fill-mode: forwards;
52
54
  }
53
55
  }
54
56
 
55
57
  &-reverse {
56
58
  .#{$module}-content-item-slide-out {
57
59
  animation: #{$module}-content-item-keyframe-slide-out-reverse;
60
+ animation-fill-mode: forwards;
58
61
  }
59
62
 
60
63
  .#{$module}-content-item-slide-in {
61
64
  animation: #{$module}-content-item-keyframe-slide-in-reverse;
65
+ animation-fill-mode: forwards;
62
66
  }
63
67
  }
64
68
  }
package/input/input.scss CHANGED
@@ -593,6 +593,7 @@ $module: #{$prefix}-input;
593
593
 
594
594
  // select与autocomplete的border-radius都是基于select
595
595
  .#{$prefix}-select,
596
+ .#{$prefix}-tagInput,
596
597
  .#{$prefix}-cascader,
597
598
  .#{$prefix}-tree-select,
598
599
  & > .#{$module}-wrapper {
@@ -624,6 +625,7 @@ $module: #{$prefix}-input;
624
625
 
625
626
  .#{$prefix}-input-number,
626
627
  .#{$prefix}-datepicker,
628
+ .#{$prefix}-timepicker,
627
629
  .#{$prefix}-autocomplete {
628
630
  border-radius: 0;
629
631
 
@@ -18,6 +18,7 @@
18
18
  width: 16px;
19
19
  height: 16px;
20
20
  animation: 0.6s linear infinite semi-animation-rotate;
21
+ animation-fill-mode: forwards;
21
22
  }
22
23
  .semi-button.semi-button-with-icon-only {
23
24
  padding-left: 8px;
@@ -25,6 +25,7 @@ $module: #{$prefix}-button;
25
25
  width: 16px;
26
26
  height: 16px;
27
27
  animation: .6s linear infinite #{$prefix}-animation-rotate;
28
+ animation-fill-mode: forwards;
28
29
  }
29
30
  }
30
31
  }
@@ -34,16 +34,20 @@
34
34
  .semi-carousel-content-slide .semi-carousel-content-item-slide-out {
35
35
  display: block;
36
36
  animation: semi-carousel-content-item-keyframe-slide-out;
37
+ animation-fill-mode: forwards;
37
38
  }
38
39
  .semi-carousel-content-slide .semi-carousel-content-item-slide-in {
39
40
  display: block;
40
41
  animation: semi-carousel-content-item-keyframe-slide-in;
42
+ animation-fill-mode: forwards;
41
43
  }
42
44
  .semi-carousel-content-reverse .semi-carousel-content-item-slide-out {
43
45
  animation: semi-carousel-content-item-keyframe-slide-out-reverse;
46
+ animation-fill-mode: forwards;
44
47
  }
45
48
  .semi-carousel-content-reverse .semi-carousel-content-item-slide-in {
46
49
  animation: semi-carousel-content-item-keyframe-slide-in-reverse;
50
+ animation-fill-mode: forwards;
47
51
  }
48
52
  .semi-carousel-indicator {
49
53
  display: flex;
@@ -44,21 +44,25 @@ $module: #{$prefix}-carousel;
44
44
  .#{$module}-content-item-slide-out {
45
45
  display: block;
46
46
  animation: #{$module}-content-item-keyframe-slide-out;
47
+ animation-fill-mode: forwards;
47
48
  }
48
49
 
49
50
  .#{$module}-content-item-slide-in {
50
51
  display: block;
51
52
  animation: #{$module}-content-item-keyframe-slide-in;
53
+ animation-fill-mode: forwards;
52
54
  }
53
55
  }
54
56
 
55
57
  &-reverse {
56
58
  .#{$module}-content-item-slide-out {
57
59
  animation: #{$module}-content-item-keyframe-slide-out-reverse;
60
+ animation-fill-mode: forwards;
58
61
  }
59
62
 
60
63
  .#{$module}-content-item-slide-in {
61
64
  animation: #{$module}-content-item-keyframe-slide-in-reverse;
65
+ animation-fill-mode: forwards;
62
66
  }
63
67
  }
64
68
  }
@@ -451,26 +451,31 @@
451
451
  flex-wrap: wrap;
452
452
  }
453
453
  .semi-input-group .semi-select,
454
+ .semi-input-group .semi-tagInput,
454
455
  .semi-input-group .semi-cascader,
455
456
  .semi-input-group .semi-tree-select, .semi-input-group > .semi-input-wrapper {
456
457
  border-radius: 0;
457
458
  }
458
459
  .semi-input-group .semi-select:first-child,
460
+ .semi-input-group .semi-tagInput:first-child,
459
461
  .semi-input-group .semi-cascader:first-child,
460
462
  .semi-input-group .semi-tree-select:first-child, .semi-input-group > .semi-input-wrapper:first-child {
461
463
  border-radius: var(--semi-border-radius-small) 0 0 var(--semi-border-radius-small);
462
464
  }
463
465
  .semi-input-group .semi-select:last-child,
466
+ .semi-input-group .semi-tagInput:last-child,
464
467
  .semi-input-group .semi-cascader:last-child,
465
468
  .semi-input-group .semi-tree-select:last-child, .semi-input-group > .semi-input-wrapper:last-child {
466
469
  border-radius: 0 var(--semi-border-radius-small) var(--semi-border-radius-small) 0;
467
470
  }
468
471
  .semi-input-group .semi-select:not(:last-child),
472
+ .semi-input-group .semi-tagInput:not(:last-child),
469
473
  .semi-input-group .semi-cascader:not(:last-child),
470
474
  .semi-input-group .semi-tree-select:not(:last-child), .semi-input-group > .semi-input-wrapper:not(:last-child) {
471
475
  position: relative;
472
476
  }
473
477
  .semi-input-group .semi-select:not(:last-child)::after,
478
+ .semi-input-group .semi-tagInput:not(:last-child)::after,
474
479
  .semi-input-group .semi-cascader:not(:last-child)::after,
475
480
  .semi-input-group .semi-tree-select:not(:last-child)::after, .semi-input-group > .semi-input-wrapper:not(:last-child)::after {
476
481
  content: "";
@@ -483,11 +488,13 @@
483
488
  }
484
489
  .semi-input-group .semi-input-number,
485
490
  .semi-input-group .semi-datepicker,
491
+ .semi-input-group .semi-timepicker,
486
492
  .semi-input-group .semi-autocomplete {
487
493
  border-radius: 0;
488
494
  }
489
495
  .semi-input-group .semi-input-number .semi-datepicker-range-input,
490
496
  .semi-input-group .semi-datepicker .semi-datepicker-range-input,
497
+ .semi-input-group .semi-timepicker .semi-datepicker-range-input,
491
498
  .semi-input-group .semi-autocomplete .semi-datepicker-range-input {
492
499
  border-radius: 0;
493
500
  }
@@ -495,6 +502,8 @@
495
502
  .semi-input-group .semi-input-number:first-child .semi-datepicker-range-input,
496
503
  .semi-input-group .semi-datepicker:first-child .semi-input-wrapper,
497
504
  .semi-input-group .semi-datepicker:first-child .semi-datepicker-range-input,
505
+ .semi-input-group .semi-timepicker:first-child .semi-input-wrapper,
506
+ .semi-input-group .semi-timepicker:first-child .semi-datepicker-range-input,
498
507
  .semi-input-group .semi-autocomplete:first-child .semi-input-wrapper,
499
508
  .semi-input-group .semi-autocomplete:first-child .semi-datepicker-range-input {
500
509
  border-radius: var(--semi-border-radius-small) 0 0 var(--semi-border-radius-small);
@@ -503,17 +512,21 @@
503
512
  .semi-input-group .semi-input-number:last-child .semi-datepicker-range-input,
504
513
  .semi-input-group .semi-datepicker:last-child .semi-input-wrapper,
505
514
  .semi-input-group .semi-datepicker:last-child .semi-datepicker-range-input,
515
+ .semi-input-group .semi-timepicker:last-child .semi-input-wrapper,
516
+ .semi-input-group .semi-timepicker:last-child .semi-datepicker-range-input,
506
517
  .semi-input-group .semi-autocomplete:last-child .semi-input-wrapper,
507
518
  .semi-input-group .semi-autocomplete:last-child .semi-datepicker-range-input {
508
519
  border-radius: 0 var(--semi-border-radius-small) var(--semi-border-radius-small) 0;
509
520
  }
510
521
  .semi-input-group .semi-input-number:not(:last-child),
511
522
  .semi-input-group .semi-datepicker:not(:last-child),
523
+ .semi-input-group .semi-timepicker:not(:last-child),
512
524
  .semi-input-group .semi-autocomplete:not(:last-child) {
513
525
  position: relative;
514
526
  }
515
527
  .semi-input-group .semi-input-number:not(:last-child)::after,
516
528
  .semi-input-group .semi-datepicker:not(:last-child)::after,
529
+ .semi-input-group .semi-timepicker:not(:last-child)::after,
517
530
  .semi-input-group .semi-autocomplete:not(:last-child)::after {
518
531
  content: "";
519
532
  background-color: var(--semi-color-border);
@@ -593,6 +593,7 @@ $module: #{$prefix}-input;
593
593
 
594
594
  // select与autocomplete的border-radius都是基于select
595
595
  .#{$prefix}-select,
596
+ .#{$prefix}-tagInput,
596
597
  .#{$prefix}-cascader,
597
598
  .#{$prefix}-tree-select,
598
599
  & > .#{$module}-wrapper {
@@ -624,6 +625,7 @@ $module: #{$prefix}-input;
624
625
 
625
626
  .#{$prefix}-input-number,
626
627
  .#{$prefix}-datepicker,
628
+ .#{$prefix}-timepicker,
627
629
  .#{$prefix}-autocomplete {
628
630
  border-radius: 0;
629
631
 
@@ -163,18 +163,22 @@
163
163
 
164
164
  .semi-modal-content-animate-show {
165
165
  animation: 120ms semi-modal-content-keyframe-show cubic-bezier(0.215, 0.61, 0.355, 1) 0ms forwards;
166
+ animation-fill-mode: forwards;
166
167
  }
167
168
 
168
169
  .semi-modal-content-animate-hide {
169
170
  animation: 120ms semi-modal-content-keyframe-hide cubic-bezier(0.215, 0.61, 0.355, 1) 0ms forwards;
171
+ animation-fill-mode: forwards;
170
172
  }
171
173
 
172
174
  .semi-modal-mask-animate-show {
173
175
  animation: 90ms semi-modal-mask-keyframe-show cubic-bezier(0.215, 0.61, 0.355, 1) 0ms forwards;
176
+ animation-fill-mode: forwards;
174
177
  }
175
178
 
176
179
  .semi-modal-mask-animate-hide {
177
180
  animation: 90ms semi-modal-mask-keyframe-hide cubic-bezier(0.215, 0.61, 0.355, 1) 0ms forwards;
181
+ animation-fill-mode: forwards;
178
182
  }
179
183
 
180
184
  @keyframes semi-modal-content-keyframe-show {
@@ -209,18 +209,22 @@ $module: #{$prefix}-modal;
209
209
 
210
210
  .#{$module}-content-animate-show {
211
211
  animation: $animation_duration-modal-show #{$module}-content-keyframe-show $animation_function-modal-show $animation_delay-modal-show forwards;
212
+ animation-fill-mode: forwards;
212
213
  }
213
214
 
214
215
  .#{$module}-content-animate-hide {
215
216
  animation: $animation_duration-modal-hide #{$module}-content-keyframe-hide $animation_function-modal-hide $animation_delay-modal-hide forwards;
217
+ animation-fill-mode: forwards;
216
218
  }
217
219
 
218
220
  .#{$module}-mask-animate-show {
219
221
  animation: $animation_duration-modal_mask-show #{$module}-mask-keyframe-show $animation_function-modal_mask-show $animation_delay-modal_mask-show forwards;
222
+ animation-fill-mode: forwards;
220
223
  }
221
224
 
222
225
  .#{$module}-mask-animate-hide {
223
226
  animation: $animation_duration-modal_mask-hide #{$module}-mask-keyframe-hide $animation_function-modal_mask-hide $animation_delay-modal_mask-hide forwards;
227
+ animation-fill-mode: forwards;
224
228
  }
225
229
 
226
230
 
@@ -264,39 +264,51 @@
264
264
  }
265
265
  .semi-notification-notice-animation-show_top {
266
266
  animation: semi-notification-slideShow_top 300ms cubic-bezier(0.62, 0.63, 0, 1.13) 0ms;
267
+ animation-fill-mode: forwards;
267
268
  }
268
269
  .semi-notification-notice-animation-hide_top {
269
270
  animation: semi-notification-slideHide_top 300ms cubic-bezier(0.62, 0.63, 0, 1.13) 0ms;
271
+ animation-fill-mode: forwards;
270
272
  }
271
273
  .semi-notification-notice-animation-show_topLeft {
272
274
  animation: semi-notification-slideShow_topLeft 300ms cubic-bezier(0.62, 0.63, 0, 1.13) 0ms;
275
+ animation-fill-mode: forwards;
273
276
  }
274
277
  .semi-notification-notice-animation-hide_topLeft {
275
278
  animation: semi-notification-slideHide_topLeft 300ms cubic-bezier(0.62, 0.63, 0, 1.13) 0ms;
279
+ animation-fill-mode: forwards;
276
280
  }
277
281
  .semi-notification-notice-animation-show_topRight {
278
282
  animation: semi-notification-slideShow_topRight 300ms cubic-bezier(0.62, 0.63, 0, 1.13) 0ms;
283
+ animation-fill-mode: forwards;
279
284
  }
280
285
  .semi-notification-notice-animation-hide_topRight {
281
286
  animation: semi-notification-slideHide_topRight 300ms cubic-bezier(0.62, 0.63, 0, 1.13) 0ms;
287
+ animation-fill-mode: forwards;
282
288
  }
283
289
  .semi-notification-notice-animation-show_bottom {
284
290
  animation: semi-notification-slideShow_bottom 300ms cubic-bezier(0.62, 0.63, 0, 1.13) 0ms;
291
+ animation-fill-mode: forwards;
285
292
  }
286
293
  .semi-notification-notice-animation-hide_bottom {
287
294
  animation: semi-notification-slideHide_bottom 300ms cubic-bezier(0.62, 0.63, 0, 1.13) 0ms;
295
+ animation-fill-mode: forwards;
288
296
  }
289
297
  .semi-notification-notice-animation-show_bottomLeft {
290
298
  animation: semi-notification-slideShow_bottomLeft 300ms cubic-bezier(0.62, 0.63, 0, 1.13) 0ms;
299
+ animation-fill-mode: forwards;
291
300
  }
292
301
  .semi-notification-notice-animation-hide_bottomLeft {
293
302
  animation: semi-notification-slideHide_bottomLeft 300ms cubic-bezier(0.62, 0.63, 0, 1.13) 0ms;
303
+ animation-fill-mode: forwards;
294
304
  }
295
305
  .semi-notification-notice-animation-show_bottomRight {
296
306
  animation: semi-notification-slideShow_bottomRight 300ms cubic-bezier(0.62, 0.63, 0, 1.13) 0ms;
307
+ animation-fill-mode: forwards;
297
308
  }
298
309
  .semi-notification-notice-animation-hide_bottomRight {
299
310
  animation: semi-notification-slideHide_bottomRight 300ms cubic-bezier(0.62, 0.63, 0, 1.13) 0ms;
311
+ animation-fill-mode: forwards;
300
312
  }
301
313
 
302
314
  .semi-notification-notice.semi-notification-notice-rtl {
@@ -299,53 +299,65 @@ $module: #{$prefix}-notification;
299
299
  }
300
300
  }
301
301
 
302
-
302
+
303
303
 
304
304
  &-animation-show_top{
305
305
  animation: #{$module}-slideShow_top $animation_duration-notification-show $animation_function-notification-show $animation_delay-notification-show;
306
+ animation-fill-mode: forwards;
306
307
  }
307
308
 
308
309
  &-animation-hide_top{
309
310
  animation: #{$module}-slideHide_top $animation_duration-notification-hide $animation_function-notification-hide $animation_delay-notification-hide;
311
+ animation-fill-mode: forwards;
310
312
  }
311
313
 
312
314
  &-animation-show_topLeft{
313
315
  animation: #{$module}-slideShow_topLeft $animation_duration-notification-show $animation_function-notification-show $animation_delay-notification-show;
316
+ animation-fill-mode: forwards;
314
317
  }
315
318
 
316
319
  &-animation-hide_topLeft{
317
320
  animation: #{$module}-slideHide_topLeft $animation_duration-notification-hide $animation_function-notification-hide $animation_delay-notification-hide;
321
+ animation-fill-mode: forwards;
318
322
  }
319
323
 
320
324
  &-animation-show_topRight{
321
325
  animation: #{$module}-slideShow_topRight $animation_duration-notification-show $animation_function-notification-show $animation_delay-notification-show;
326
+ animation-fill-mode: forwards;
322
327
  }
323
328
 
324
329
  &-animation-hide_topRight{
325
330
  animation: #{$module}-slideHide_topRight $animation_duration-notification-hide $animation_function-notification-hide $animation_delay-notification-hide;
331
+ animation-fill-mode: forwards;
326
332
  }
327
333
 
328
334
  &-animation-show_bottom{
329
335
  animation: #{$module}-slideShow_bottom $animation_duration-notification-show $animation_function-notification-show $animation_delay-notification-show;
336
+ animation-fill-mode: forwards;
330
337
  }
331
338
 
332
339
  &-animation-hide_bottom{
333
340
  animation: #{$module}-slideHide_bottom $animation_duration-notification-hide $animation_function-notification-hide $animation_delay-notification-hide;
341
+ animation-fill-mode: forwards;
334
342
  }
335
343
 
336
344
  &-animation-show_bottomLeft{
337
345
  animation: #{$module}-slideShow_bottomLeft $animation_duration-notification-show $animation_function-notification-show $animation_delay-notification-show;
346
+ animation-fill-mode: forwards;
338
347
  }
339
348
 
340
349
  &-animation-hide_bottomLeft{
341
350
  animation: #{$module}-slideHide_bottomLeft $animation_duration-notification-hide $animation_function-notification-hide $animation_delay-notification-hide;
351
+ animation-fill-mode: forwards;
342
352
  }
343
353
  &-animation-show_bottomRight{
344
354
  animation: #{$module}-slideShow_bottomRight $animation_duration-notification-show $animation_function-notification-show $animation_delay-notification-show;
355
+ animation-fill-mode: forwards;
345
356
  }
346
357
 
347
358
  &-animation-hide_bottomRight{
348
359
  animation: #{$module}-slideHide_bottomRight $animation_duration-notification-hide $animation_function-notification-hide $animation_delay-notification-hide;
360
+ animation-fill-mode: forwards;
349
361
  }
350
362
  }
351
363
  }
@@ -2,7 +2,7 @@ declare const cssClasses: {
2
2
  PREFIX: string;
3
3
  };
4
4
  declare const strings: {
5
- BOUNDARY_SET: string[];
5
+ BOUNDARY_SET: ("end" | "start")[];
6
6
  POSITION_SET: string[];
7
7
  MODE_SET: string[];
8
8
  MODE_MAP: {
@@ -10,8 +10,8 @@ declare const strings: {
10
10
  SCROLL: string;
11
11
  };
12
12
  BOUNDARY_MAP: {
13
- START: string;
14
- END: string;
13
+ readonly START: "start";
14
+ readonly END: "end";
15
15
  };
16
16
  OVERFLOW_DIR: {
17
17
  NONE: number;
@@ -19,5 +19,7 @@ declare const strings: {
19
19
  SHRINK: number;
20
20
  };
21
21
  };
22
- declare const numbers: {};
22
+ declare const numbers: {
23
+ MINIMUM_HTML_ELEMENT_WIDTH: number;
24
+ };
23
25
  export { cssClasses, strings, numbers };
@@ -33,5 +33,7 @@ const strings = {
33
33
  OVERFLOW_DIR
34
34
  };
35
35
  exports.strings = strings;
36
- const numbers = {};
36
+ const numbers = {
37
+ MINIMUM_HTML_ELEMENT_WIDTH: 4
38
+ };
37
39
  exports.numbers = numbers;
@@ -3,6 +3,7 @@ export interface OverflowListAdapter extends DefaultAdapter {
3
3
  updateStates: (state: any) => void;
4
4
  updateVisibleState: (visible: Map<string, boolean>) => void;
5
5
  notifyIntersect: (res: any) => void;
6
+ getItemSizeMap: () => Map<string, number>;
6
7
  }
7
8
  declare class OverflowListFoundation extends BaseFoundation<OverflowListAdapter> {
8
9
  constructor(adapter: OverflowListAdapter);
@@ -10,6 +11,7 @@ declare class OverflowListFoundation extends BaseFoundation<OverflowListAdapter>
10
11
  isScrollMode: () => boolean;
11
12
  getOverflowItem(): Array<Array<Record<string, any>>>;
12
13
  handleIntersect(entries: Array<IntersectionObserverEntry>): void;
13
- handlePartition(growing: number): void;
14
+ getReversedItems: () => any;
15
+ handleCollapseOverflow(): void;
14
16
  }
15
17
  export default OverflowListFoundation;
@@ -29,6 +29,13 @@ class OverflowListFoundation extends _foundation.default {
29
29
  } = this.getProps();
30
30
  return renderMode === 'scroll';
31
31
  };
32
+
33
+ this.getReversedItems = () => {
34
+ const {
35
+ items
36
+ } = this.getProps();
37
+ return (0, _cloneDeep2.default)(items).reverse();
38
+ };
32
39
  }
33
40
 
34
41
  getOverflowItem() {
@@ -95,54 +102,68 @@ class OverflowListFoundation extends _foundation.default {
95
102
  this._adapter.notifyIntersect(res);
96
103
  }
97
104
 
98
- handlePartition(growing) {
105
+ handleCollapseOverflow() {
106
+ const {
107
+ minVisibleItems,
108
+ collapseFrom
109
+ } = this.getProps();
99
110
  const {
100
- direction,
101
- overflow,
102
- lastOverflowCount,
103
- visible
111
+ overflowWidth,
112
+ containerWidth,
113
+ pivot: statePivot,
114
+ overflowStatus
104
115
  } = this.getStates();
105
116
  const {
106
- minVisibleItems,
107
- collapseFrom,
108
- items
117
+ items,
118
+ onOverflow
109
119
  } = this.getProps();
110
- let updateState = {};
120
+ let itemWidths = overflowWidth,
121
+ _pivot = 0;
122
+ let overflowed = false;
111
123
 
112
- if (growing === OverflowDirection.NONE) {
113
- updateState = {
114
- direction: OverflowDirection.NONE
115
- };
116
- }
124
+ for (const size of this._adapter.getItemSizeMap().values()) {
125
+ itemWidths += size; // 触发overflow
117
126
 
118
- if (growing === OverflowDirection.GROW) {
119
- const updatedOverflowCount = direction === OverflowDirection.NONE ? overflow.length : lastOverflowCount;
120
- updateState = {
121
- direction: OverflowDirection.GROW,
122
- lastOverflowCount: updatedOverflowCount,
123
- overflow: [],
124
- visible: items
125
- };
126
- }
127
+ if (itemWidths > containerWidth) {
128
+ overflowed = true;
129
+ break;
130
+ } // 顺利遍历完整个列表,说明不存在overflow,直接渲染全部
127
131
 
128
- if (growing === OverflowDirection.SHRINK && visible.length > minVisibleItems) {
129
- const collapseFromStart = collapseFrom === Boundary.START;
130
- const newVisible = visible.slice();
131
- const next = collapseFromStart ? newVisible.shift() : newVisible.pop();
132
-
133
- if (next !== undefined) {
134
- updateState = {
135
- // set SHRINK mode unless a GROW is already in progress.
136
- // GROW shows all items then shrinks until it settles, so we
137
- // preserve the fact that the original trigger was a GROW.
138
- direction: direction !== OverflowDirection.GROW ? OverflowDirection.SHRINK : direction,
139
- overflow: collapseFromStart ? [...overflow, next] : [next, ...overflow],
140
- visible: newVisible
141
- };
132
+
133
+ if (_pivot === items.length - 1) {
134
+ this._adapter.updateStates({
135
+ overflowStatus: "normal",
136
+ pivot: items.length - 1,
137
+ visible: items,
138
+ overflow: []
139
+ });
140
+
141
+ break;
142
142
  }
143
+
144
+ _pivot++;
143
145
  }
144
146
 
145
- this._adapter.updateStates(updateState);
147
+ if (overflowed) {
148
+ const pivot = Math.max(minVisibleItems, _pivot);
149
+ const isCollapseFromStart = collapseFrom === Boundary.START;
150
+ const visible = isCollapseFromStart ? this.getReversedItems().slice(0, pivot).reverse() : items.slice(0, pivot);
151
+ const overflow = isCollapseFromStart ? this.getReversedItems().slice(pivot).reverse() : items.slice(pivot);
152
+
153
+ this._adapter.updateStates({
154
+ overflowStatus: "overflowed",
155
+ pivot: pivot,
156
+ visible,
157
+ overflow
158
+ }); // trigger onOverflow
159
+
160
+
161
+ if (statePivot !== pivot) {
162
+ onOverflow(overflow);
163
+ }
164
+
165
+ return;
166
+ }
146
167
  }
147
168
 
148
169
  }
@@ -54,9 +54,11 @@
54
54
  }
55
55
  .semi-popover-animation-show {
56
56
  animation: semi-popover-zoomIn 100ms cubic-bezier(0.215, 0.61, 0.355, 1);
57
+ animation-fill-mode: forwards;
57
58
  }
58
59
  .semi-popover-animation-hide {
59
60
  animation: semi-popover-zoomOut 100ms cubic-bezier(0.215, 0.61, 0.355, 1);
61
+ animation-fill-mode: forwards;
60
62
  }
61
63
 
62
64
  .semi-popover-wrapper .semi-popover-icon-arrow {
@@ -79,10 +79,12 @@ $module-icon: #{$module}-icon-arrow;
79
79
  }
80
80
  &-animation-show{
81
81
  animation: #{$module}-zoomIn $animation_duration-popover-in $animation_function-popover-in;
82
+ animation-fill-mode: forwards;
82
83
  }
83
84
 
84
85
  &-animation-hide{
85
86
  animation: #{$module}-zoomOut $animation_duration-popover-out $animation_function-popover-out;
87
+ animation-fill-mode: forwards;
86
88
  }
87
89
  }
88
90
 
@@ -186,33 +186,43 @@
186
186
  }
187
187
  .semi-sidesheet-animation-content_show_top {
188
188
  animation: semi-sidesheet-slideShow_top 180ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms;
189
+ animation-fill-mode: forwards;
189
190
  }
190
191
  .semi-sidesheet-animation-content_hide_top {
191
192
  animation: semi-sidesheet-slideHide_top 180ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms;
193
+ animation-fill-mode: forwards;
192
194
  }
193
195
  .semi-sidesheet-animation-content_show_bottom {
194
196
  animation: semi-sidesheet-slideShow_bottom 180ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms;
197
+ animation-fill-mode: forwards;
195
198
  }
196
199
  .semi-sidesheet-animation-content_hide_bottom {
197
200
  animation: semi-sidesheet-slideHide_bottom 180ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms;
201
+ animation-fill-mode: forwards;
198
202
  }
199
203
  .semi-sidesheet-animation-content_show_left {
200
204
  animation: semi-sidesheet-slideShow_left 180ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms;
205
+ animation-fill-mode: forwards;
201
206
  }
202
207
  .semi-sidesheet-animation-content_hide_left {
203
208
  animation: semi-sidesheet-slideHide_left 180ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms;
209
+ animation-fill-mode: forwards;
204
210
  }
205
211
  .semi-sidesheet-animation-content_show_right {
206
212
  animation: semi-sidesheet-slideShow_right 180ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms;
213
+ animation-fill-mode: forwards;
207
214
  }
208
215
  .semi-sidesheet-animation-content_hide_right {
209
216
  animation: semi-sidesheet-slideHide_right 180ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms;
217
+ animation-fill-mode: forwards;
210
218
  }
211
219
  .semi-sidesheet-animation-mask_show {
212
220
  animation: semi-sidesheet-opacityShow 180ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms;
221
+ animation-fill-mode: forwards;
213
222
  }
214
223
  .semi-sidesheet-animation-mask_hide {
215
224
  animation: semi-sidesheet-opacityHide 180ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms;
225
+ animation-fill-mode: forwards;
216
226
  }
217
227
 
218
228
  .semi-sidesheet-fixed .semi-sidesheet-inner {