@douyinfe/semi-foundation 2.36.0 → 2.37.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 (47) hide show
  1. package/datePicker/datePicker.scss +4 -1
  2. package/datePicker/foundation.ts +2 -0
  3. package/datePicker/inputFoundation.ts +1 -0
  4. package/dropdown/foundation.ts +4 -3
  5. package/input/foundation.ts +2 -2
  6. package/lib/cjs/datePicker/datePicker.css +3 -1
  7. package/lib/cjs/datePicker/datePicker.scss +4 -1
  8. package/lib/cjs/datePicker/foundation.js +2 -0
  9. package/lib/cjs/datePicker/inputFoundation.js +1 -0
  10. package/lib/cjs/dropdown/foundation.js +5 -2
  11. package/lib/cjs/input/foundation.js +3 -2
  12. package/lib/cjs/notification/notification.css +6 -0
  13. package/lib/cjs/notification/notification.scss +8 -0
  14. package/lib/cjs/pagination/pagination.css +23 -0
  15. package/lib/cjs/pagination/pagination.scss +29 -0
  16. package/lib/cjs/pagination/variables.scss +1 -0
  17. package/lib/cjs/toast/toast.css +2 -0
  18. package/lib/cjs/toast/toast.scss +3 -0
  19. package/lib/cjs/tooltip/tooltip.css +5 -0
  20. package/lib/cjs/tooltip/tooltip.scss +7 -0
  21. package/lib/cjs/upload/foundation.js +1 -0
  22. package/lib/cjs/utils/getDataAttr.js +1 -1
  23. package/lib/es/datePicker/datePicker.css +3 -1
  24. package/lib/es/datePicker/datePicker.scss +4 -1
  25. package/lib/es/datePicker/foundation.js +2 -0
  26. package/lib/es/datePicker/inputFoundation.js +1 -0
  27. package/lib/es/dropdown/foundation.js +5 -2
  28. package/lib/es/input/foundation.js +3 -2
  29. package/lib/es/notification/notification.css +6 -0
  30. package/lib/es/notification/notification.scss +8 -0
  31. package/lib/es/pagination/pagination.css +23 -0
  32. package/lib/es/pagination/pagination.scss +29 -0
  33. package/lib/es/pagination/variables.scss +1 -0
  34. package/lib/es/toast/toast.css +2 -0
  35. package/lib/es/toast/toast.scss +3 -0
  36. package/lib/es/tooltip/tooltip.css +5 -0
  37. package/lib/es/tooltip/tooltip.scss +7 -0
  38. package/lib/es/upload/foundation.js +1 -0
  39. package/lib/es/utils/getDataAttr.js +1 -1
  40. package/notification/notification.scss +8 -0
  41. package/package.json +2 -2
  42. package/pagination/pagination.scss +29 -0
  43. package/pagination/variables.scss +1 -0
  44. package/toast/toast.scss +3 -0
  45. package/tooltip/tooltip.scss +7 -0
  46. package/upload/foundation.ts +1 -0
  47. package/utils/getDataAttr.ts +1 -1
@@ -993,13 +993,16 @@ $module-list: #{$prefix}-scrolllist;
993
993
  &:hover {
994
994
  .#{$module}-range-input-clearbtn {
995
995
  display: flex;
996
- color: $color-datepicker_range_input_clearbtn-icon-hover;
997
996
  cursor: pointer;
998
997
  }
999
998
 
1000
999
  .#{$module}-range-input-clearbtn ~ .#{$module}-range-input-suffix {
1001
1000
  display: none;
1002
1001
  }
1002
+
1003
+ .#{$module}-range-input-clearbtn:hover {
1004
+ color: $color-datepicker_range_input_clearbtn-icon-hover;
1005
+ }
1003
1006
  }
1004
1007
 
1005
1008
  &-disabled {
@@ -617,9 +617,11 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
617
617
  const inputValue = '';
618
618
  if (!this._isControlledComponent('value')) {
619
619
  this._updateValueAndInput(value, true, inputValue);
620
+ this._adapter.updateInsetInputValue(null);
620
621
  this.resetCachedSelectedValue(value);
621
622
  }
622
623
  this._notifyChange(value);
624
+ this._adapter.setRangeInputFocus(false);
623
625
  this._adapter.notifyClear(e);
624
626
  }
625
627
  // eslint-disable-next-line @typescript-eslint/no-empty-function
@@ -261,6 +261,7 @@ export default class InputFoundation extends BaseFoundation<DateInputAdapter> {
261
261
  case 'dateTime':
262
262
  case 'dateTimeRange':
263
263
  [datePlaceholder, timePlaceholder] = insetInputFormat.split(' ');
264
+ break;
264
265
  case 'monthRange':
265
266
  datePlaceholder = insetInputFormat + rangeSeparator + insetInputFormat;
266
267
  break;
@@ -13,7 +13,7 @@ export default class DropdownFoundation extends BaseFoundation<DropdownAdapter>
13
13
  this._adapter.notifyVisibleChange(visible);
14
14
 
15
15
  const { trigger } = this.getProps();
16
- if (visible && trigger === "click"){
16
+ if (visible && trigger === "click") {
17
17
  const popupId = this._adapter.getPopupId();
18
18
  this.setFocusToFirstMenuItem(popupId);
19
19
  }
@@ -37,6 +37,7 @@ export default class DropdownFoundation extends BaseFoundation<DropdownAdapter>
37
37
 
38
38
  handleKeyDown(event: any): void {
39
39
  const id = event.target?.attributes['data-popupid']?.value;
40
+ const { visible } = this._adapter.getStates();
40
41
  switch (event.key) {
41
42
  case ' ':
42
43
  case 'Enter':
@@ -46,11 +47,11 @@ export default class DropdownFoundation extends BaseFoundation<DropdownAdapter>
46
47
  break;
47
48
  case 'ArrowDown':
48
49
  this.setFocusToFirstMenuItem(id);
49
- handlePrevent(event);
50
+ visible && handlePrevent(event);
50
51
  break;
51
52
  case 'ArrowUp':
52
53
  this.setFocusToLastMenuItem(id);
53
- handlePrevent(event);
54
+ visible && handlePrevent(event);
54
55
  break;
55
56
  default:
56
57
  break;
@@ -270,8 +270,8 @@ class InputFoundation extends BaseFoundation<InputAdapter> {
270
270
 
271
271
  isAllowClear() {
272
272
  const { value, isFocus, isHovering } = this._adapter.getStates();
273
- const { showClear, disabled } = this._adapter.getProps();
274
- const allowClear = value && showClear && !disabled && (isFocus || isHovering);
273
+ const { showClear, disabled, showClearIgnoreDisabled } = this._adapter.getProps();
274
+ const allowClear = value && showClear && (!disabled || showClearIgnoreDisabled) && (isFocus || isHovering);
275
275
  return allowClear;
276
276
  }
277
277
 
@@ -664,12 +664,14 @@
664
664
  }
665
665
  .semi-datepicker-range-input:hover .semi-datepicker-range-input-clearbtn {
666
666
  display: flex;
667
- color: var(--semi-color-primary-hover);
668
667
  cursor: pointer;
669
668
  }
670
669
  .semi-datepicker-range-input:hover .semi-datepicker-range-input-clearbtn ~ .semi-datepicker-range-input-suffix {
671
670
  display: none;
672
671
  }
672
+ .semi-datepicker-range-input:hover .semi-datepicker-range-input-clearbtn:hover {
673
+ color: var(--semi-color-primary-hover);
674
+ }
673
675
  .semi-datepicker-range-input-disabled {
674
676
  cursor: not-allowed;
675
677
  color: var(--semi-color-disabled-text);
@@ -993,13 +993,16 @@ $module-list: #{$prefix}-scrolllist;
993
993
  &:hover {
994
994
  .#{$module}-range-input-clearbtn {
995
995
  display: flex;
996
- color: $color-datepicker_range_input_clearbtn-icon-hover;
997
996
  cursor: pointer;
998
997
  }
999
998
 
1000
999
  .#{$module}-range-input-clearbtn ~ .#{$module}-range-input-suffix {
1001
1000
  display: none;
1002
1001
  }
1002
+
1003
+ .#{$module}-range-input-clearbtn:hover {
1004
+ color: $color-datepicker_range_input_clearbtn-icon-hover;
1005
+ }
1003
1006
  }
1004
1007
 
1005
1008
  &-disabled {
@@ -434,9 +434,11 @@ class DatePickerFoundation extends _foundation.default {
434
434
  const inputValue = '';
435
435
  if (!this._isControlledComponent('value')) {
436
436
  this._updateValueAndInput(value, true, inputValue);
437
+ this._adapter.updateInsetInputValue(null);
437
438
  this.resetCachedSelectedValue(value);
438
439
  }
439
440
  this._notifyChange(value);
441
+ this._adapter.setRangeInputFocus(false);
440
442
  this._adapter.notifyClear(e);
441
443
  }
442
444
  // eslint-disable-next-line @typescript-eslint/no-empty-function
@@ -216,6 +216,7 @@ class InputFoundation extends _foundation.default {
216
216
  case 'dateTime':
217
217
  case 'dateTimeRange':
218
218
  [datePlaceholder, timePlaceholder] = insetInputFormat.split(' ');
219
+ break;
219
220
  case 'monthRange':
220
221
  datePlaceholder = insetInputFormat + rangeSeparator + insetInputFormat;
221
222
  break;
@@ -35,6 +35,9 @@ class DropdownFoundation extends _foundation.default {
35
35
  handleKeyDown(event) {
36
36
  var _a, _b;
37
37
  const id = (_b = (_a = event.target) === null || _a === void 0 ? void 0 : _a.attributes['data-popupid']) === null || _b === void 0 ? void 0 : _b.value;
38
+ const {
39
+ visible
40
+ } = this._adapter.getStates();
38
41
  switch (event.key) {
39
42
  case ' ':
40
43
  case 'Enter':
@@ -44,11 +47,11 @@ class DropdownFoundation extends _foundation.default {
44
47
  break;
45
48
  case 'ArrowDown':
46
49
  this.setFocusToFirstMenuItem(id);
47
- (0, _a11y.handlePrevent)(event);
50
+ visible && (0, _a11y.handlePrevent)(event);
48
51
  break;
49
52
  case 'ArrowUp':
50
53
  this.setFocusToLastMenuItem(id);
51
- (0, _a11y.handlePrevent)(event);
54
+ visible && (0, _a11y.handlePrevent)(event);
52
55
  break;
53
56
  default:
54
57
  break;
@@ -261,9 +261,10 @@ class InputFoundation extends _foundation.default {
261
261
  } = this._adapter.getStates();
262
262
  const {
263
263
  showClear,
264
- disabled
264
+ disabled,
265
+ showClearIgnoreDisabled
265
266
  } = this._adapter.getProps();
266
- const allowClear = value && showClear && !disabled && (isFocus || isHovering);
267
+ const allowClear = value && showClear && (!disabled || showClearIgnoreDisabled) && (isFocus || isHovering);
267
268
  return allowClear;
268
269
  }
269
270
  handleClickPrefixOrSuffix(e) {
@@ -105,14 +105,18 @@
105
105
  font-weight: 600;
106
106
  color: var(--semi-color-text-0);
107
107
  margin-bottom: 4px;
108
+ word-wrap: break-word;
109
+ overflow-wrap: break-word;
108
110
  }
109
111
  .semi-notification-notice-inner {
110
112
  display: flex;
111
113
  width: 100%;
114
+ min-width: 0;
112
115
  }
113
116
  .semi-notification-notice-content-wrapper {
114
117
  flex: 1 1 auto;
115
118
  margin-right: 8px;
119
+ min-width: 0;
116
120
  }
117
121
  .semi-notification-notice-content {
118
122
  font-size: 14px;
@@ -120,6 +124,8 @@
120
124
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
121
125
  font-weight: 400;
122
126
  color: var(--semi-color-text-1);
127
+ word-wrap: break-word;
128
+ overflow-wrap: break-word;
123
129
  }
124
130
  .semi-notification-notice-icon-close {
125
131
  height: 24px;
@@ -123,16 +123,21 @@ $module: #{$prefix}-notification;
123
123
  font-weight: $font-notification_notice_title-fontWeight;
124
124
  color: $color-notification_title-text;
125
125
  margin-bottom: $spacing-notification_notice_title-marginBottom;
126
+ // word-wrap is an alias of overflow-wrap, word-wrap can take effect on more browsers, in order to prevent future changes, use both
127
+ word-wrap: break-word;
128
+ overflow-wrap: break-word;
126
129
  }
127
130
 
128
131
  &-inner {
129
132
  display: flex;
130
133
  width: 100%;
134
+ min-width: 0;
131
135
  }
132
136
 
133
137
  &-content-wrapper {
134
138
  flex: 1 1 auto;
135
139
  margin-right: $spacing-notification_notice_content_wrapper-marginRight;
140
+ min-width: 0;
136
141
  }
137
142
 
138
143
  &-content {
@@ -140,6 +145,9 @@ $module: #{$prefix}-notification;
140
145
  font-weight: $font-notification_notice_content-fontWeight;
141
146
  color: $color-notification_content-text;
142
147
  // padding-top: $spacing-extra-tight;
148
+ // word-wrap is an alias of overflow-wrap, word-wrap can take effect on more browsers, in order to prevent future changes, use both
149
+ word-wrap: break-word;
150
+ overflow-wrap: break-word;
143
151
  }
144
152
 
145
153
  &-icon-close {
@@ -18,6 +18,12 @@
18
18
  color: var(--semi-color-text-2);
19
19
  padding: 0 0;
20
20
  }
21
+ .semi-page-disabled {
22
+ cursor: not-allowed;
23
+ }
24
+ .semi-page-disabled .semi-page-total {
25
+ color: var(--semi-color-disabled-text);
26
+ }
21
27
  .semi-page-item {
22
28
  font-size: 14px;
23
29
  line-height: 20px;
@@ -78,6 +84,23 @@
78
84
  min-width: 44px;
79
85
  margin: 0;
80
86
  }
87
+ .semi-page-item-all-disabled {
88
+ border-color: transparent;
89
+ color: var(--semi-color-disabled-text);
90
+ background-color: transparent;
91
+ cursor: not-allowed;
92
+ }
93
+ .semi-page-item-all-disabled:hover {
94
+ background-color: transparent;
95
+ color: var(--semi-color-disabled-text);
96
+ }
97
+ .semi-page-item-all-disabled-active {
98
+ background-color: var(--semi-color-disabled-fill);
99
+ font-weight: 600;
100
+ }
101
+ .semi-page-item-all-disabled-active:hover {
102
+ background-color: var(--semi-color-disabled-fill);
103
+ }
81
104
  .semi-page-total {
82
105
  font-size: 14px;
83
106
  line-height: 20px;
@@ -20,6 +20,14 @@ $module: #{$prefix}-page;
20
20
  padding: $spacing-pagination_small-paddingY $spacing-pagination_small-paddingX;
21
21
  }
22
22
 
23
+ &-disabled {
24
+ cursor: not-allowed;
25
+
26
+ .#{$module}-total {
27
+ color: $color-pagination_item-text-disabled;
28
+ }
29
+ }
30
+
23
31
  &-item {
24
32
  @include font-size-regular;
25
33
  min-width: $width-pagination_item-minWidth;
@@ -86,6 +94,27 @@ $module: #{$prefix}-page;
86
94
  min-width: $width-pagination_item_small-minWidth;
87
95
  margin: $spacing-pagination_item_small-margin;
88
96
  }
97
+
98
+ &-all-disabled {
99
+ border-color: $color-pagination_item-border-disabled;
100
+ color: $color-pagination_item-text-disabled;
101
+ background-color: $color-pagination_item-bg-disabled;
102
+ cursor: not-allowed;
103
+
104
+ &:hover {
105
+ background-color: transparent;
106
+ color: $color-pagination_item-text-disabled;
107
+ }
108
+
109
+ &-active {
110
+ background-color: $color-pagination_item-bg-selected-disabled;
111
+ font-weight: $font-pagination_item_active-fontWeight;
112
+
113
+ &:hover {
114
+ background-color: $color-pagination_item-bg-selected-disabled;
115
+ }
116
+ }
117
+ }
89
118
  }
90
119
 
91
120
  &-total {
@@ -10,6 +10,7 @@ $color-pagination_item-bg-active: var(--semi-color-fill-1); // 翻页器 页码
10
10
  $color-pagination_item-text-disabled: var(--semi-color-disabled-text); // 翻页器 页码 禁用态文字颜色
11
11
  $color-pagination_item-icon-disabled: var(--semi-color-disabled-text); // 翻页器 页码 禁用态图标颜色
12
12
  $color-pagination_item-bg-disabled: transparent; // 翻页器 页码 禁用态背景颜色
13
+ $color-pagination_item-bg-selected-disabled: var(--semi-color-disabled-fill); // 翻页器 页码 选中禁用态背景颜色
13
14
  $color-pagination_item-text-selected: var(--semi-color-primary); // 翻页器 页码 选中态文字颜色
14
15
  $color-pagination_item-bg-selected: var(--semi-color-primary-light-default); // 翻页器 页码 选中态背景颜色
15
16
  $color-pagination_quickjump_text-disabled: var(--semi-color-disabled-text); // 翻页器 快速跳转禁用态文字颜色
@@ -36,6 +36,8 @@
36
36
  margin-left: 12px;
37
37
  margin-right: 12px;
38
38
  text-align: left;
39
+ word-wrap: break-word;
40
+ overflow-wrap: break-word;
39
41
  }
40
42
  .semi-toast-light.semi-toast-warning .semi-toast-content {
41
43
  background-color: var(--semi-color-warning-light-default);
@@ -39,6 +39,9 @@ $icon: #{$prefix}-toast-icon;
39
39
  margin-left: $spacing-toast_content_text-marginLeft;
40
40
  margin-right: $spacing-toast_content_text-marginRight;
41
41
  text-align: left;
42
+ // word-wrap is an alias of overflow-wrap, word-wrap can take effect on more browsers, in order to prevent future changes, use both
43
+ word-wrap: break-word;
44
+ overflow-wrap: break-word;
42
45
  }
43
46
  }
44
47
 
@@ -49,6 +49,8 @@
49
49
  font-size: 14px;
50
50
  left: 0;
51
51
  top: 0;
52
+ word-wrap: break-word;
53
+ overflow-wrap: break-word;
52
54
  font-size: 14px;
53
55
  line-height: 20px;
54
56
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
@@ -58,6 +60,9 @@
58
60
  .semi-tooltip-wrapper-show {
59
61
  opacity: 1;
60
62
  }
63
+ .semi-tooltip-content {
64
+ min-Width: 0;
65
+ }
61
66
  .semi-tooltip-trigger {
62
67
  display: inline-block;
63
68
  width: auto;
@@ -65,6 +65,9 @@ $module-icon: #{$module}-icon-arrow;
65
65
  font-size: $font-tooltip-fontSize;
66
66
  left: 0;
67
67
  top: 0;
68
+ // word-wrap is an alias of overflow-wrap, word-wrap can take effect on more browsers, in order to prevent future changes, use both
69
+ word-wrap: break-word;
70
+ overflow-wrap: break-word;
68
71
 
69
72
  @include font-size-regular;
70
73
  opacity: 0;
@@ -75,6 +78,10 @@ $module-icon: #{$module}-icon-arrow;
75
78
  }
76
79
  }
77
80
 
81
+ &-content {
82
+ min-Width: 0
83
+ }
84
+
78
85
  &-trigger {
79
86
  display: inline-block;
80
87
  width: auto;
@@ -488,6 +488,7 @@ class UploadFoundation extends _foundation.default {
488
488
  newFileList[index].fileInstance = fileInstance;
489
489
  newFileList[index].size = (0, _utils.getFileSize)(fileInstance.size);
490
490
  newFileList[index].name = fileInstance.name;
491
+ newFileList[index].url = this._createURL(fileInstance);
491
492
  }
492
493
  newFileList[index].shouldUpload = shouldUpload;
493
494
  }
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = getDataAttr;
7
7
  function getDataAttr(props) {
8
8
  return Object.keys(props).reduce((prev, key) => {
9
- if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {
9
+ if (key.substr(0, 5) === 'data-') {
10
10
  prev[key] = props[key];
11
11
  }
12
12
  return prev;
@@ -664,12 +664,14 @@
664
664
  }
665
665
  .semi-datepicker-range-input:hover .semi-datepicker-range-input-clearbtn {
666
666
  display: flex;
667
- color: var(--semi-color-primary-hover);
668
667
  cursor: pointer;
669
668
  }
670
669
  .semi-datepicker-range-input:hover .semi-datepicker-range-input-clearbtn ~ .semi-datepicker-range-input-suffix {
671
670
  display: none;
672
671
  }
672
+ .semi-datepicker-range-input:hover .semi-datepicker-range-input-clearbtn:hover {
673
+ color: var(--semi-color-primary-hover);
674
+ }
673
675
  .semi-datepicker-range-input-disabled {
674
676
  cursor: not-allowed;
675
677
  color: var(--semi-color-disabled-text);
@@ -993,13 +993,16 @@ $module-list: #{$prefix}-scrolllist;
993
993
  &:hover {
994
994
  .#{$module}-range-input-clearbtn {
995
995
  display: flex;
996
- color: $color-datepicker_range_input_clearbtn-icon-hover;
997
996
  cursor: pointer;
998
997
  }
999
998
 
1000
999
  .#{$module}-range-input-clearbtn ~ .#{$module}-range-input-suffix {
1001
1000
  display: none;
1002
1001
  }
1002
+
1003
+ .#{$module}-range-input-clearbtn:hover {
1004
+ color: $color-datepicker_range_input_clearbtn-icon-hover;
1005
+ }
1003
1006
  }
1004
1007
 
1005
1008
  &-disabled {
@@ -426,9 +426,11 @@ export default class DatePickerFoundation extends BaseFoundation {
426
426
  const inputValue = '';
427
427
  if (!this._isControlledComponent('value')) {
428
428
  this._updateValueAndInput(value, true, inputValue);
429
+ this._adapter.updateInsetInputValue(null);
429
430
  this.resetCachedSelectedValue(value);
430
431
  }
431
432
  this._notifyChange(value);
433
+ this._adapter.setRangeInputFocus(false);
432
434
  this._adapter.notifyClear(e);
433
435
  }
434
436
  // eslint-disable-next-line @typescript-eslint/no-empty-function
@@ -208,6 +208,7 @@ export default class InputFoundation extends BaseFoundation {
208
208
  case 'dateTime':
209
209
  case 'dateTimeRange':
210
210
  [datePlaceholder, timePlaceholder] = insetInputFormat.split(' ');
211
+ break;
211
212
  case 'monthRange':
212
213
  datePlaceholder = insetInputFormat + rangeSeparator + insetInputFormat;
213
214
  break;
@@ -28,6 +28,9 @@ export default class DropdownFoundation extends BaseFoundation {
28
28
  handleKeyDown(event) {
29
29
  var _a, _b;
30
30
  const id = (_b = (_a = event.target) === null || _a === void 0 ? void 0 : _a.attributes['data-popupid']) === null || _b === void 0 ? void 0 : _b.value;
31
+ const {
32
+ visible
33
+ } = this._adapter.getStates();
31
34
  switch (event.key) {
32
35
  case ' ':
33
36
  case 'Enter':
@@ -37,11 +40,11 @@ export default class DropdownFoundation extends BaseFoundation {
37
40
  break;
38
41
  case 'ArrowDown':
39
42
  this.setFocusToFirstMenuItem(id);
40
- handlePrevent(event);
43
+ visible && handlePrevent(event);
41
44
  break;
42
45
  case 'ArrowUp':
43
46
  this.setFocusToLastMenuItem(id);
44
- handlePrevent(event);
47
+ visible && handlePrevent(event);
45
48
  break;
46
49
  default:
47
50
  break;
@@ -254,9 +254,10 @@ class InputFoundation extends BaseFoundation {
254
254
  } = this._adapter.getStates();
255
255
  const {
256
256
  showClear,
257
- disabled
257
+ disabled,
258
+ showClearIgnoreDisabled
258
259
  } = this._adapter.getProps();
259
- const allowClear = value && showClear && !disabled && (isFocus || isHovering);
260
+ const allowClear = value && showClear && (!disabled || showClearIgnoreDisabled) && (isFocus || isHovering);
260
261
  return allowClear;
261
262
  }
262
263
  handleClickPrefixOrSuffix(e) {
@@ -105,14 +105,18 @@
105
105
  font-weight: 600;
106
106
  color: var(--semi-color-text-0);
107
107
  margin-bottom: 4px;
108
+ word-wrap: break-word;
109
+ overflow-wrap: break-word;
108
110
  }
109
111
  .semi-notification-notice-inner {
110
112
  display: flex;
111
113
  width: 100%;
114
+ min-width: 0;
112
115
  }
113
116
  .semi-notification-notice-content-wrapper {
114
117
  flex: 1 1 auto;
115
118
  margin-right: 8px;
119
+ min-width: 0;
116
120
  }
117
121
  .semi-notification-notice-content {
118
122
  font-size: 14px;
@@ -120,6 +124,8 @@
120
124
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
121
125
  font-weight: 400;
122
126
  color: var(--semi-color-text-1);
127
+ word-wrap: break-word;
128
+ overflow-wrap: break-word;
123
129
  }
124
130
  .semi-notification-notice-icon-close {
125
131
  height: 24px;
@@ -123,16 +123,21 @@ $module: #{$prefix}-notification;
123
123
  font-weight: $font-notification_notice_title-fontWeight;
124
124
  color: $color-notification_title-text;
125
125
  margin-bottom: $spacing-notification_notice_title-marginBottom;
126
+ // word-wrap is an alias of overflow-wrap, word-wrap can take effect on more browsers, in order to prevent future changes, use both
127
+ word-wrap: break-word;
128
+ overflow-wrap: break-word;
126
129
  }
127
130
 
128
131
  &-inner {
129
132
  display: flex;
130
133
  width: 100%;
134
+ min-width: 0;
131
135
  }
132
136
 
133
137
  &-content-wrapper {
134
138
  flex: 1 1 auto;
135
139
  margin-right: $spacing-notification_notice_content_wrapper-marginRight;
140
+ min-width: 0;
136
141
  }
137
142
 
138
143
  &-content {
@@ -140,6 +145,9 @@ $module: #{$prefix}-notification;
140
145
  font-weight: $font-notification_notice_content-fontWeight;
141
146
  color: $color-notification_content-text;
142
147
  // padding-top: $spacing-extra-tight;
148
+ // word-wrap is an alias of overflow-wrap, word-wrap can take effect on more browsers, in order to prevent future changes, use both
149
+ word-wrap: break-word;
150
+ overflow-wrap: break-word;
143
151
  }
144
152
 
145
153
  &-icon-close {
@@ -18,6 +18,12 @@
18
18
  color: var(--semi-color-text-2);
19
19
  padding: 0 0;
20
20
  }
21
+ .semi-page-disabled {
22
+ cursor: not-allowed;
23
+ }
24
+ .semi-page-disabled .semi-page-total {
25
+ color: var(--semi-color-disabled-text);
26
+ }
21
27
  .semi-page-item {
22
28
  font-size: 14px;
23
29
  line-height: 20px;
@@ -78,6 +84,23 @@
78
84
  min-width: 44px;
79
85
  margin: 0;
80
86
  }
87
+ .semi-page-item-all-disabled {
88
+ border-color: transparent;
89
+ color: var(--semi-color-disabled-text);
90
+ background-color: transparent;
91
+ cursor: not-allowed;
92
+ }
93
+ .semi-page-item-all-disabled:hover {
94
+ background-color: transparent;
95
+ color: var(--semi-color-disabled-text);
96
+ }
97
+ .semi-page-item-all-disabled-active {
98
+ background-color: var(--semi-color-disabled-fill);
99
+ font-weight: 600;
100
+ }
101
+ .semi-page-item-all-disabled-active:hover {
102
+ background-color: var(--semi-color-disabled-fill);
103
+ }
81
104
  .semi-page-total {
82
105
  font-size: 14px;
83
106
  line-height: 20px;
@@ -20,6 +20,14 @@ $module: #{$prefix}-page;
20
20
  padding: $spacing-pagination_small-paddingY $spacing-pagination_small-paddingX;
21
21
  }
22
22
 
23
+ &-disabled {
24
+ cursor: not-allowed;
25
+
26
+ .#{$module}-total {
27
+ color: $color-pagination_item-text-disabled;
28
+ }
29
+ }
30
+
23
31
  &-item {
24
32
  @include font-size-regular;
25
33
  min-width: $width-pagination_item-minWidth;
@@ -86,6 +94,27 @@ $module: #{$prefix}-page;
86
94
  min-width: $width-pagination_item_small-minWidth;
87
95
  margin: $spacing-pagination_item_small-margin;
88
96
  }
97
+
98
+ &-all-disabled {
99
+ border-color: $color-pagination_item-border-disabled;
100
+ color: $color-pagination_item-text-disabled;
101
+ background-color: $color-pagination_item-bg-disabled;
102
+ cursor: not-allowed;
103
+
104
+ &:hover {
105
+ background-color: transparent;
106
+ color: $color-pagination_item-text-disabled;
107
+ }
108
+
109
+ &-active {
110
+ background-color: $color-pagination_item-bg-selected-disabled;
111
+ font-weight: $font-pagination_item_active-fontWeight;
112
+
113
+ &:hover {
114
+ background-color: $color-pagination_item-bg-selected-disabled;
115
+ }
116
+ }
117
+ }
89
118
  }
90
119
 
91
120
  &-total {
@@ -10,6 +10,7 @@ $color-pagination_item-bg-active: var(--semi-color-fill-1); // 翻页器 页码
10
10
  $color-pagination_item-text-disabled: var(--semi-color-disabled-text); // 翻页器 页码 禁用态文字颜色
11
11
  $color-pagination_item-icon-disabled: var(--semi-color-disabled-text); // 翻页器 页码 禁用态图标颜色
12
12
  $color-pagination_item-bg-disabled: transparent; // 翻页器 页码 禁用态背景颜色
13
+ $color-pagination_item-bg-selected-disabled: var(--semi-color-disabled-fill); // 翻页器 页码 选中禁用态背景颜色
13
14
  $color-pagination_item-text-selected: var(--semi-color-primary); // 翻页器 页码 选中态文字颜色
14
15
  $color-pagination_item-bg-selected: var(--semi-color-primary-light-default); // 翻页器 页码 选中态背景颜色
15
16
  $color-pagination_quickjump_text-disabled: var(--semi-color-disabled-text); // 翻页器 快速跳转禁用态文字颜色
@@ -36,6 +36,8 @@
36
36
  margin-left: 12px;
37
37
  margin-right: 12px;
38
38
  text-align: left;
39
+ word-wrap: break-word;
40
+ overflow-wrap: break-word;
39
41
  }
40
42
  .semi-toast-light.semi-toast-warning .semi-toast-content {
41
43
  background-color: var(--semi-color-warning-light-default);
@@ -39,6 +39,9 @@ $icon: #{$prefix}-toast-icon;
39
39
  margin-left: $spacing-toast_content_text-marginLeft;
40
40
  margin-right: $spacing-toast_content_text-marginRight;
41
41
  text-align: left;
42
+ // word-wrap is an alias of overflow-wrap, word-wrap can take effect on more browsers, in order to prevent future changes, use both
43
+ word-wrap: break-word;
44
+ overflow-wrap: break-word;
42
45
  }
43
46
  }
44
47
 
@@ -49,6 +49,8 @@
49
49
  font-size: 14px;
50
50
  left: 0;
51
51
  top: 0;
52
+ word-wrap: break-word;
53
+ overflow-wrap: break-word;
52
54
  font-size: 14px;
53
55
  line-height: 20px;
54
56
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
@@ -58,6 +60,9 @@
58
60
  .semi-tooltip-wrapper-show {
59
61
  opacity: 1;
60
62
  }
63
+ .semi-tooltip-content {
64
+ min-Width: 0;
65
+ }
61
66
  .semi-tooltip-trigger {
62
67
  display: inline-block;
63
68
  width: auto;
@@ -65,6 +65,9 @@ $module-icon: #{$module}-icon-arrow;
65
65
  font-size: $font-tooltip-fontSize;
66
66
  left: 0;
67
67
  top: 0;
68
+ // word-wrap is an alias of overflow-wrap, word-wrap can take effect on more browsers, in order to prevent future changes, use both
69
+ word-wrap: break-word;
70
+ overflow-wrap: break-word;
68
71
 
69
72
  @include font-size-regular;
70
73
  opacity: 0;
@@ -75,6 +78,10 @@ $module-icon: #{$module}-icon-arrow;
75
78
  }
76
79
  }
77
80
 
81
+ &-content {
82
+ min-Width: 0
83
+ }
84
+
78
85
  &-trigger {
79
86
  display: inline-block;
80
87
  width: auto;
@@ -481,6 +481,7 @@ class UploadFoundation extends BaseFoundation {
481
481
  newFileList[index].fileInstance = fileInstance;
482
482
  newFileList[index].size = getFileSize(fileInstance.size);
483
483
  newFileList[index].name = fileInstance.name;
484
+ newFileList[index].url = this._createURL(fileInstance);
484
485
  }
485
486
  newFileList[index].shouldUpload = shouldUpload;
486
487
  }
@@ -1,6 +1,6 @@
1
1
  export default function getDataAttr(props) {
2
2
  return Object.keys(props).reduce((prev, key) => {
3
- if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {
3
+ if (key.substr(0, 5) === 'data-') {
4
4
  prev[key] = props[key];
5
5
  }
6
6
  return prev;
@@ -123,16 +123,21 @@ $module: #{$prefix}-notification;
123
123
  font-weight: $font-notification_notice_title-fontWeight;
124
124
  color: $color-notification_title-text;
125
125
  margin-bottom: $spacing-notification_notice_title-marginBottom;
126
+ // word-wrap is an alias of overflow-wrap, word-wrap can take effect on more browsers, in order to prevent future changes, use both
127
+ word-wrap: break-word;
128
+ overflow-wrap: break-word;
126
129
  }
127
130
 
128
131
  &-inner {
129
132
  display: flex;
130
133
  width: 100%;
134
+ min-width: 0;
131
135
  }
132
136
 
133
137
  &-content-wrapper {
134
138
  flex: 1 1 auto;
135
139
  margin-right: $spacing-notification_notice_content_wrapper-marginRight;
140
+ min-width: 0;
136
141
  }
137
142
 
138
143
  &-content {
@@ -140,6 +145,9 @@ $module: #{$prefix}-notification;
140
145
  font-weight: $font-notification_notice_content-fontWeight;
141
146
  color: $color-notification_content-text;
142
147
  // padding-top: $spacing-extra-tight;
148
+ // word-wrap is an alias of overflow-wrap, word-wrap can take effect on more browsers, in order to prevent future changes, use both
149
+ word-wrap: break-word;
150
+ overflow-wrap: break-word;
143
151
  }
144
152
 
145
153
  &-icon-close {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.36.0",
3
+ "version": "2.37.0",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build:lib": "node ./scripts/compileLib.js",
@@ -23,7 +23,7 @@
23
23
  "*.scss",
24
24
  "*.css"
25
25
  ],
26
- "gitHead": "597a4a6279411ed623d2072f1bcde3f2f3983985",
26
+ "gitHead": "3d2a2680186785f167b1bb0f9c719a2945c3c1f0",
27
27
  "devDependencies": {
28
28
  "@babel/plugin-transform-runtime": "^7.15.8",
29
29
  "@babel/preset-env": "^7.15.8",
@@ -20,6 +20,14 @@ $module: #{$prefix}-page;
20
20
  padding: $spacing-pagination_small-paddingY $spacing-pagination_small-paddingX;
21
21
  }
22
22
 
23
+ &-disabled {
24
+ cursor: not-allowed;
25
+
26
+ .#{$module}-total {
27
+ color: $color-pagination_item-text-disabled;
28
+ }
29
+ }
30
+
23
31
  &-item {
24
32
  @include font-size-regular;
25
33
  min-width: $width-pagination_item-minWidth;
@@ -86,6 +94,27 @@ $module: #{$prefix}-page;
86
94
  min-width: $width-pagination_item_small-minWidth;
87
95
  margin: $spacing-pagination_item_small-margin;
88
96
  }
97
+
98
+ &-all-disabled {
99
+ border-color: $color-pagination_item-border-disabled;
100
+ color: $color-pagination_item-text-disabled;
101
+ background-color: $color-pagination_item-bg-disabled;
102
+ cursor: not-allowed;
103
+
104
+ &:hover {
105
+ background-color: transparent;
106
+ color: $color-pagination_item-text-disabled;
107
+ }
108
+
109
+ &-active {
110
+ background-color: $color-pagination_item-bg-selected-disabled;
111
+ font-weight: $font-pagination_item_active-fontWeight;
112
+
113
+ &:hover {
114
+ background-color: $color-pagination_item-bg-selected-disabled;
115
+ }
116
+ }
117
+ }
89
118
  }
90
119
 
91
120
  &-total {
@@ -10,6 +10,7 @@ $color-pagination_item-bg-active: var(--semi-color-fill-1); // 翻页器 页码
10
10
  $color-pagination_item-text-disabled: var(--semi-color-disabled-text); // 翻页器 页码 禁用态文字颜色
11
11
  $color-pagination_item-icon-disabled: var(--semi-color-disabled-text); // 翻页器 页码 禁用态图标颜色
12
12
  $color-pagination_item-bg-disabled: transparent; // 翻页器 页码 禁用态背景颜色
13
+ $color-pagination_item-bg-selected-disabled: var(--semi-color-disabled-fill); // 翻页器 页码 选中禁用态背景颜色
13
14
  $color-pagination_item-text-selected: var(--semi-color-primary); // 翻页器 页码 选中态文字颜色
14
15
  $color-pagination_item-bg-selected: var(--semi-color-primary-light-default); // 翻页器 页码 选中态背景颜色
15
16
  $color-pagination_quickjump_text-disabled: var(--semi-color-disabled-text); // 翻页器 快速跳转禁用态文字颜色
package/toast/toast.scss CHANGED
@@ -39,6 +39,9 @@ $icon: #{$prefix}-toast-icon;
39
39
  margin-left: $spacing-toast_content_text-marginLeft;
40
40
  margin-right: $spacing-toast_content_text-marginRight;
41
41
  text-align: left;
42
+ // word-wrap is an alias of overflow-wrap, word-wrap can take effect on more browsers, in order to prevent future changes, use both
43
+ word-wrap: break-word;
44
+ overflow-wrap: break-word;
42
45
  }
43
46
  }
44
47
 
@@ -65,6 +65,9 @@ $module-icon: #{$module}-icon-arrow;
65
65
  font-size: $font-tooltip-fontSize;
66
66
  left: 0;
67
67
  top: 0;
68
+ // word-wrap is an alias of overflow-wrap, word-wrap can take effect on more browsers, in order to prevent future changes, use both
69
+ word-wrap: break-word;
70
+ overflow-wrap: break-word;
68
71
 
69
72
  @include font-size-regular;
70
73
  opacity: 0;
@@ -75,6 +78,10 @@ $module-icon: #{$module}-icon-arrow;
75
78
  }
76
79
  }
77
80
 
81
+ &-content {
82
+ min-Width: 0
83
+ }
84
+
78
85
  &-trigger {
79
86
  display: inline-block;
80
87
  width: auto;
@@ -487,6 +487,7 @@ class UploadFoundation<P = Record<string, any>, S = Record<string, any>> extends
487
487
  newFileList[index].fileInstance = fileInstance;
488
488
  newFileList[index].size = getFileSize(fileInstance.size);
489
489
  newFileList[index].name = fileInstance.name;
490
+ newFileList[index].url = this._createURL(fileInstance);
490
491
  }
491
492
  newFileList[index].shouldUpload = shouldUpload;
492
493
  }
@@ -1,6 +1,6 @@
1
1
  export default function getDataAttr(props: Record<string, any>) {
2
2
  return Object.keys(props).reduce((prev, key) => {
3
- if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {
3
+ if (key.substr(0, 5) === 'data-') {
4
4
  prev[key] = props[key];
5
5
  }
6
6
  return prev;