@douyinfe/semi-foundation 2.3.1 → 2.5.0-beta.0

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 (143) hide show
  1. package/button/button.scss +6 -0
  2. package/button/variables.scss +9 -1
  3. package/cascader/cascader.scss +1 -0
  4. package/cascader/variables.scss +4 -2
  5. package/input/textarea.scss +15 -8
  6. package/input/variables.scss +1 -0
  7. package/inputNumber/constants.ts +1 -0
  8. package/inputNumber/foundation.ts +15 -1
  9. package/lib/cjs/autoComplete/autoComplete.css +1 -0
  10. package/lib/cjs/autoComplete/constants.d.ts +1 -1
  11. package/lib/cjs/button/button.css +6 -0
  12. package/lib/cjs/button/button.scss +6 -0
  13. package/lib/cjs/button/variables.scss +9 -1
  14. package/lib/cjs/cascader/cascader.css +1 -0
  15. package/lib/cjs/cascader/cascader.scss +1 -0
  16. package/lib/cjs/cascader/variables.scss +4 -2
  17. package/lib/cjs/dropdown/constants.d.ts +1 -1
  18. package/lib/cjs/input/textarea.css +15 -9
  19. package/lib/cjs/input/textarea.scss +15 -8
  20. package/lib/cjs/input/variables.scss +1 -0
  21. package/lib/cjs/inputNumber/constants.d.ts +1 -0
  22. package/lib/cjs/inputNumber/constants.js +2 -1
  23. package/lib/cjs/inputNumber/foundation.d.ts +5 -0
  24. package/lib/cjs/inputNumber/foundation.js +19 -0
  25. package/lib/cjs/modal/modal.css +2 -0
  26. package/lib/cjs/modal/modal.scss +2 -0
  27. package/lib/cjs/modal/variables.scss +7 -4
  28. package/lib/cjs/scrollList/scrollList.css +1 -0
  29. package/lib/cjs/scrollList/scrollList.scss +1 -0
  30. package/lib/cjs/scrollList/variables.scss +13 -12
  31. package/lib/cjs/select/constants.d.ts +1 -1
  32. package/lib/cjs/select/option.css +1 -0
  33. package/lib/cjs/select/option.scss +1 -0
  34. package/lib/cjs/select/optionFoundation.d.ts +1 -1
  35. package/lib/cjs/select/optionFoundation.js +3 -3
  36. package/lib/cjs/select/select.css +4 -0
  37. package/lib/cjs/select/select.scss +4 -2
  38. package/lib/cjs/select/variables.scss +11 -1
  39. package/lib/cjs/slider/foundation.js +2 -2
  40. package/lib/cjs/table/foundation.d.ts +2 -0
  41. package/lib/cjs/table/foundation.js +16 -4
  42. package/lib/cjs/table/table.css +3 -0
  43. package/lib/cjs/table/table.scss +4 -0
  44. package/lib/cjs/table/variables.scss +2 -2
  45. package/lib/cjs/tagInput/tagInput.css +1 -0
  46. package/lib/cjs/tagInput/tagInput.scss +3 -2
  47. package/lib/cjs/tagInput/variables.scss +8 -2
  48. package/lib/cjs/timePicker/foundation.d.ts +2 -1
  49. package/lib/cjs/timePicker/foundation.js +7 -1
  50. package/lib/cjs/tooltip/constants.d.ts +1 -1
  51. package/lib/cjs/tooltip/constants.js +1 -1
  52. package/lib/cjs/tooltip/foundation.js +65 -4
  53. package/lib/cjs/tree/foundation.d.ts +4 -1
  54. package/lib/cjs/tree/foundation.js +69 -20
  55. package/lib/cjs/tree/treeUtil.d.ts +1 -1
  56. package/lib/cjs/treeSelect/foundation.d.ts +3 -3
  57. package/lib/cjs/treeSelect/foundation.js +103 -35
  58. package/lib/cjs/treeSelect/treeSelect.css +1 -0
  59. package/lib/cjs/treeSelect/treeSelect.scss +2 -1
  60. package/lib/cjs/treeSelect/variables.scss +3 -1
  61. package/lib/cjs/upload/upload.css +49 -27
  62. package/lib/cjs/upload/upload.scss +66 -41
  63. package/lib/cjs/upload/variables.scss +3 -1
  64. package/lib/es/autoComplete/autoComplete.css +1 -0
  65. package/lib/es/autoComplete/constants.d.ts +1 -1
  66. package/lib/es/button/button.css +6 -0
  67. package/lib/es/button/button.scss +6 -0
  68. package/lib/es/button/variables.scss +9 -1
  69. package/lib/es/cascader/cascader.css +1 -0
  70. package/lib/es/cascader/cascader.scss +1 -0
  71. package/lib/es/cascader/variables.scss +4 -2
  72. package/lib/es/dropdown/constants.d.ts +1 -1
  73. package/lib/es/input/textarea.css +15 -9
  74. package/lib/es/input/textarea.scss +15 -8
  75. package/lib/es/input/variables.scss +1 -0
  76. package/lib/es/inputNumber/constants.d.ts +1 -0
  77. package/lib/es/inputNumber/constants.js +2 -1
  78. package/lib/es/inputNumber/foundation.d.ts +5 -0
  79. package/lib/es/inputNumber/foundation.js +18 -0
  80. package/lib/es/modal/modal.css +2 -0
  81. package/lib/es/modal/modal.scss +2 -0
  82. package/lib/es/modal/variables.scss +7 -4
  83. package/lib/es/scrollList/scrollList.css +1 -0
  84. package/lib/es/scrollList/scrollList.scss +1 -0
  85. package/lib/es/scrollList/variables.scss +13 -12
  86. package/lib/es/select/constants.d.ts +1 -1
  87. package/lib/es/select/option.css +1 -0
  88. package/lib/es/select/option.scss +1 -0
  89. package/lib/es/select/optionFoundation.d.ts +1 -1
  90. package/lib/es/select/optionFoundation.js +3 -3
  91. package/lib/es/select/select.css +4 -0
  92. package/lib/es/select/select.scss +4 -2
  93. package/lib/es/select/variables.scss +11 -1
  94. package/lib/es/slider/foundation.js +2 -2
  95. package/lib/es/table/foundation.d.ts +2 -0
  96. package/lib/es/table/foundation.js +16 -4
  97. package/lib/es/table/table.css +3 -0
  98. package/lib/es/table/table.scss +4 -0
  99. package/lib/es/table/variables.scss +2 -2
  100. package/lib/es/tagInput/tagInput.css +1 -0
  101. package/lib/es/tagInput/tagInput.scss +3 -2
  102. package/lib/es/tagInput/variables.scss +8 -2
  103. package/lib/es/timePicker/foundation.d.ts +2 -1
  104. package/lib/es/timePicker/foundation.js +7 -1
  105. package/lib/es/tooltip/constants.d.ts +1 -1
  106. package/lib/es/tooltip/constants.js +1 -1
  107. package/lib/es/tooltip/foundation.js +65 -4
  108. package/lib/es/tree/foundation.d.ts +4 -1
  109. package/lib/es/tree/foundation.js +69 -20
  110. package/lib/es/tree/treeUtil.d.ts +1 -1
  111. package/lib/es/treeSelect/foundation.d.ts +3 -3
  112. package/lib/es/treeSelect/foundation.js +102 -35
  113. package/lib/es/treeSelect/treeSelect.css +1 -0
  114. package/lib/es/treeSelect/treeSelect.scss +2 -1
  115. package/lib/es/treeSelect/variables.scss +3 -1
  116. package/lib/es/upload/upload.css +49 -27
  117. package/lib/es/upload/upload.scss +66 -41
  118. package/lib/es/upload/variables.scss +3 -1
  119. package/modal/modal.scss +2 -0
  120. package/modal/variables.scss +7 -4
  121. package/package.json +3 -3
  122. package/scrollList/scrollList.scss +1 -0
  123. package/scrollList/variables.scss +13 -12
  124. package/select/option.scss +1 -0
  125. package/select/optionFoundation.ts +3 -3
  126. package/select/select.scss +4 -2
  127. package/select/variables.scss +11 -1
  128. package/slider/foundation.ts +2 -2
  129. package/table/foundation.ts +23 -10
  130. package/table/table.scss +4 -0
  131. package/table/variables.scss +2 -2
  132. package/tagInput/tagInput.scss +3 -2
  133. package/tagInput/variables.scss +8 -2
  134. package/timePicker/foundation.ts +8 -3
  135. package/tooltip/constants.ts +2 -0
  136. package/tooltip/foundation.ts +52 -4
  137. package/tree/foundation.ts +56 -17
  138. package/tree/treeUtil.ts +1 -1
  139. package/treeSelect/foundation.ts +89 -41
  140. package/treeSelect/treeSelect.scss +2 -1
  141. package/treeSelect/variables.scss +3 -1
  142. package/upload/upload.scss +66 -41
  143. package/upload/variables.scss +3 -1
@@ -1,4 +1,4 @@
1
- @import "./variables.scss";
1
+ @import './variables.scss';
2
2
 
3
3
  $module: #{$prefix}-upload;
4
4
 
@@ -47,7 +47,7 @@ $module: #{$prefix}-upload;
47
47
  align-items: center;
48
48
  }
49
49
 
50
- &[x-prompt-pos="right"] {
50
+ &[x-prompt-pos='right'] {
51
51
  .#{$module}-add {
52
52
  display: inline-flex;
53
53
  }
@@ -57,7 +57,7 @@ $module: #{$prefix}-upload;
57
57
  }
58
58
  }
59
59
 
60
- &[x-prompt-pos="bottom"] {
60
+ &[x-prompt-pos='bottom'] {
61
61
  .#{$module}-add {
62
62
  display: flex;
63
63
  }
@@ -72,15 +72,14 @@ $module: #{$prefix}-upload;
72
72
  }
73
73
  }
74
74
 
75
- &[x-prompt-pos="left"] {
75
+ &[x-prompt-pos='left'] {
76
76
  .#{$module}-add {
77
77
  display: inline-flex;
78
- order: 2;
79
78
  }
80
79
 
81
80
  .#{$module}-prompt {
82
81
  display: inline-flex;
83
- order: 1;
82
+ order: -1;
84
83
  }
85
84
 
86
85
  .#{$module}-file-list {
@@ -247,7 +246,6 @@ $module: #{$prefix}-upload;
247
246
  }
248
247
 
249
248
  &-icon {
250
-
251
249
  &-loading,
252
250
  &-error {
253
251
  font-size: $width-upload_file_card-icon;
@@ -275,7 +273,6 @@ $module: #{$prefix}-upload;
275
273
  }
276
274
 
277
275
  .#{$module}-file-card {
278
-
279
276
  &-info-validate-message {
280
277
  color: $color-upload_file_card_fail_info-text;
281
278
  }
@@ -288,26 +285,18 @@ $module: #{$prefix}-upload;
288
285
  &-picture {
289
286
  display: flex;
290
287
 
291
- &[x-prompt-pos="bottom"] {
288
+ &[x-prompt-pos='bottom'] {
292
289
  flex-direction: column;
293
290
 
294
291
  .#{$module}-prompt {
295
292
  order: 1;
296
293
  }
297
-
298
- .#{$module}-add {
299
- order: 0;
300
- }
301
294
  }
302
295
 
303
- &[x-prompt-pos="right"] {
296
+ &[x-prompt-pos='right'] {
304
297
  .#{$module}-prompt {
305
298
  order: 1;
306
299
  }
307
-
308
- .#{$module}-add {
309
- order: 0;
310
- }
311
300
  }
312
301
 
313
302
  &-add {
@@ -321,7 +310,6 @@ $module: #{$prefix}-upload;
321
310
  border: $width-upload_picture_add-border dashed $color-upload-border;
322
311
  color: $color-upload-icon;
323
312
  border-radius: $radius-upload_picture_add;
324
- order: 2;
325
313
  cursor: pointer;
326
314
 
327
315
  &:hover {
@@ -370,38 +358,32 @@ $module: #{$prefix}-upload;
370
358
  }
371
359
 
372
360
  &-close {
373
- width: $width-upload_picture_file_card_close;
374
- height: $width-upload_picture_file_card_close;
375
- background-color: $color-upload_pic_remove-bg;
361
+ visibility: hidden;
362
+ display: inline-flex;
376
363
  position: absolute;
377
364
  top: $spacing-upload_picture_file_card_close-top;
378
365
  right: $spacing-upload_picture_file_card_close-right;
379
- @include all-center;
380
- display: none;
381
366
  border-radius: $radius-upload_picture_file_card_close;
382
- color: white;
383
367
  cursor: pointer;
384
368
  transition: all 0s;
385
369
  }
386
-
387
- &:hover {
388
- .#{$module}-picture-file-card-close {
389
- display: flex;
390
- }
391
-
392
- .#{$module}-picture-file-card-replace {
393
- visibility: visible;
394
- }
370
+ &-icon-close {
371
+ font-size: $width-upload_picture_file_card_close;
372
+ color: $color-upload_picture_file_card_close-icon;
395
373
  }
396
374
 
397
- .#{$prefix}-progress-circle {
375
+ &::before {
376
+ visibility: hidden;
377
+ background-color: $color-upload_picture_file_card_hover-bg;
378
+ content: '';
398
379
  position: absolute;
399
- top: 50%;
400
- left: 50%;
401
- transform: translate(-50%, -50%);
380
+ left: 0;
381
+ right: 0;
382
+ top: 0;
383
+ bottom: 0;
402
384
  }
403
-
404
385
  &-retry {
386
+ visibility: hidden;
405
387
  background-color: $color-upload_file_card_retry-bg;
406
388
  width: $width-upload_file_card_retry;
407
389
  height: $width-upload_file_card_retry;
@@ -416,7 +398,6 @@ $module: #{$prefix}-upload;
416
398
  justify-content: center;
417
399
  cursor: pointer;
418
400
  }
419
-
420
401
  &-icon-retry {
421
402
  transform: scale(-1, 1);
422
403
  font-size: $width-upload_file_card_retry-icon;
@@ -432,6 +413,17 @@ $module: #{$prefix}-upload;
432
413
  color: $color-upload_replace-text;
433
414
  transform: translate3D(-50%, -50%, 0);
434
415
  }
416
+
417
+ &-preview {
418
+ visibility: hidden;
419
+ display: inline-flex;
420
+ position: absolute;
421
+ cursor: pointer;
422
+ top: 50%;
423
+ left: 50%;
424
+ transform: translate3D(-50%, -50%, 0);
425
+ }
426
+
435
427
  &-pic-info {
436
428
  display: inline-flex;
437
429
  box-sizing: border-box;
@@ -468,6 +460,39 @@ $module: #{$prefix}-upload;
468
460
  &-error {
469
461
  outline: 1px solid $color-upload_picture_file_card_error-border;
470
462
  }
463
+
464
+ &:hover {
465
+ &::before {
466
+ visibility: visible;
467
+ }
468
+
469
+ .#{$module}-picture-file-card-close {
470
+ visibility: visible;
471
+ }
472
+ .#{$module}-picture-file-card-replace {
473
+ visibility: visible;
474
+ }
475
+
476
+ .#{$module}-picture-file-card-retry {
477
+ visibility: visible;
478
+ }
479
+ .#{$module}-picture-file-card-preview {
480
+ visibility: visible;
481
+ }
482
+ }
483
+
484
+ &-uploading {
485
+ &::before {
486
+ visibility: visible;
487
+ }
488
+ }
489
+
490
+ .#{$prefix}-progress-circle {
491
+ position: absolute;
492
+ top: 50%;
493
+ left: 50%;
494
+ transform: translate(-50%, -50%);
495
+ }
471
496
  }
472
497
  }
473
498
 
@@ -542,4 +567,4 @@ $module: #{$prefix}-upload;
542
567
  }
543
568
  }
544
569
 
545
- @import "./rtl.scss";
570
+ @import './rtl.scss';
@@ -16,7 +16,7 @@ $color-upload_drag_area_tips-text: var(--semi-color-primary); // 上传可拖拽
16
16
  $color-upload_file_card_fail_info-text: var(--semi-color-danger); // 上传文件卡片失败提示信息文本颜色
17
17
  $color-upload_file_card_preview_placeholder-bg: rgba(var(--semi-grey-3), 1); // 文件卡片默认预览背景颜色
18
18
  $color-upload_file_card_preview_placeholder-text: rgba(var(--semi-white), 1); // 文件卡片默认预览图颜色
19
- $color-upload_file_card_retry-bg: #fff; // 重新上传按钮背景颜色
19
+ $color-upload_file_card_retry-bg: var(--semi-color-white); // 重新上传按钮背景颜色
20
20
  $color-upload_file_card_retry-text: var(--semi-color-primary); // 重新上传按钮文本颜色
21
21
  $color-upload-icon: var(--semi-color-tertiary); // 图片墙上传图标加号颜色
22
22
  $color-upload_pic_add-bg-active: var(--semi-color-fill-2); // 图片墙上传背景色 - 按下
@@ -26,6 +26,8 @@ $color-upload_pic_remove-bg: var(--semi-color-overlay-bg); // 图片墙上传移
26
26
  $color-upload_picture_file_card_loading_error-icon: var(--semi-color-danger); // 图片墙上传移除图标颜色
27
27
  $color-upload_picture_file_card_error-border: var(--semi-color-danger); // 图片墙上传移除图标颜色
28
28
  $color-upload_picture_file_card_pic_info-text: var(--semi-color-white); // 图片墙图片信息(序号)文字颜色
29
+ $color-upload_picture_file_card_close-icon: var(--semi-color-white); // 图片墙关闭图标颜色
30
+ $color-upload_picture_file_card_hover-bg: var(--semi-color-overlay-bg); // 图片墙预览悬浮背景色
29
31
  $color-upload_preview-icon: var(--semi-color-text-2); // 上传文件卡片文本颜色
30
32
  $color-upload_retry-text: var(--semi-color-primary); // 上传文件卡片重新上传按钮文本颜色
31
33
  $color-upload_replace-text: var(--semi-color-white); // 上传文件卡片重新替换按钮文本颜色