@douyinfe/semi-foundation 2.32.1 → 2.32.2

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.
@@ -546,7 +546,7 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
546
546
  this._updateValueAndInput(result, input === '', input);
547
547
  // Updates the selected value when entering a valid date
548
548
  const changedDates = this._getChangedDates(result);
549
- if (!this._someDateDisabled(changedDates)) {
549
+ if (!this._someDateDisabled(changedDates, result)) {
550
550
  if (!isEqual(result, stateValue)) {
551
551
  this._notifyChange(result);
552
552
  }
@@ -571,7 +571,7 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
571
571
 
572
572
  if ((result && result.length)) {
573
573
  const changedDates = this._getChangedDates(result);
574
- if (!this._someDateDisabled(changedDates)) {
574
+ if (!this._someDateDisabled(changedDates, result)) {
575
575
  if (!isEqual(result, stateValue)) {
576
576
  if (!this._isControlledComponent() && !this._adapter.needConfirm()) {
577
577
  this._adapter.updateValue(result);
@@ -591,7 +591,7 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
591
591
  _updateCachedSelectedValueFromInput(input: string) {
592
592
  const looseResult = this.getLooseDateFromInput(input);
593
593
  const changedLooseResult = this._getChangedDates(looseResult);
594
- if (!this._someDateDisabled(changedLooseResult)) {
594
+ if (!this._someDateDisabled(changedLooseResult, looseResult)) {
595
595
  this.resetCachedSelectedValue(looseResult);
596
596
  }
597
597
  }
@@ -683,7 +683,7 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
683
683
  this._updateValueAndInput(parsedResult);
684
684
  const { value: stateValue } = this.getStates();
685
685
  const changedDates = this._getChangedDates(parsedResult);
686
- if (!this._someDateDisabled(changedDates) && !isEqual(parsedResult, stateValue)) {
686
+ if (!this._someDateDisabled(changedDates, parsedResult) && !isEqual(parsedResult, stateValue)) {
687
687
  this._notifyChange(parsedResult);
688
688
  }
689
689
  }
@@ -983,7 +983,7 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
983
983
 
984
984
  const changedDates = this._getChangedDates(_value);
985
985
  // You cannot update the value directly when needConfirm, you can only change the value through handleConfirm
986
- if (!this._isControlledComponent() && !this._someDateDisabled(changedDates) && !this._adapter.needConfirm()) {
986
+ if (!this._isControlledComponent() && !this._someDateDisabled(changedDates, _value) && !this._adapter.needConfirm()) {
987
987
  this._adapter.updateValue(_value);
988
988
  }
989
989
  }
@@ -1012,7 +1012,7 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
1012
1012
  const changedDates = this._getChangedDates(dates);
1013
1013
 
1014
1014
  let inputValue, insetInputValue;
1015
- if (!this._someDateDisabled(changedDates)) {
1015
+ if (!this._someDateDisabled(changedDates, dates)) {
1016
1016
  this.resetCachedSelectedValue(dates);
1017
1017
  inputValue = this._isMultiple() ? this.formatMultipleDates(dates) : this.formatDates(dates);
1018
1018
  if (insetInput) {
@@ -1252,22 +1252,22 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
1252
1252
 
1253
1253
  /**
1254
1254
  * Whether a date is disabled
1255
- * @param {Array} value
1255
+ * @param value The date that needs to be judged whether to disable
1256
+ * @param selectedValue Selected date, when selecting a range, pass this date to the second parameter of `disabledDate`
1256
1257
  */
1257
- _someDateDisabled(value: Date[]) {
1258
- const stateValue = this.getState('value');
1258
+ _someDateDisabled(value: Date[], selectedValue: Date[]) {
1259
1259
  const { rangeInputFocus } = this.getStates();
1260
1260
  const disabledOptions = { rangeStart: '', rangeEnd: '', rangeInputFocus };
1261
1261
 
1262
1262
  // DisabledDate needs to pass the second parameter
1263
- if (this._isRangeType() && Array.isArray(stateValue)) {
1264
- if (isValid(stateValue[0])) {
1265
- const rangeStart = format(stateValue[0], 'yyyy-MM-dd');
1263
+ if (this._isRangeType() && Array.isArray(selectedValue)) {
1264
+ if (isValid(selectedValue[0])) {
1265
+ const rangeStart = format(selectedValue[0], 'yyyy-MM-dd');
1266
1266
  disabledOptions.rangeStart = rangeStart;
1267
1267
  }
1268
1268
 
1269
- if (isValid(stateValue[1])) {
1270
- const rangeEnd = format(stateValue[1], 'yyyy-MM-dd');
1269
+ if (isValid(selectedValue[1])) {
1270
+ const rangeEnd = format(selectedValue[1], 'yyyy-MM-dd');
1271
1271
  disabledOptions.rangeEnd = rangeEnd;
1272
1272
  }
1273
1273
  }
@@ -475,9 +475,10 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
475
475
  _getChangedDates(dates: Date[]): any[];
476
476
  /**
477
477
  * Whether a date is disabled
478
- * @param {Array} value
478
+ * @param value The date that needs to be judged whether to disable
479
+ * @param selectedValue Selected date, when selecting a range, pass this date to the second parameter of `disabledDate`
479
480
  */
480
- _someDateDisabled(value: Date[]): boolean;
481
+ _someDateDisabled(value: Date[], selectedValue: Date[]): boolean;
481
482
  /**
482
483
  * Format locale date
483
484
  * locale get from LocaleProvider
@@ -476,7 +476,7 @@ class DatePickerFoundation extends _foundation.default {
476
476
 
477
477
  const changedDates = this._getChangedDates(result);
478
478
 
479
- if (!this._someDateDisabled(changedDates)) {
479
+ if (!this._someDateDisabled(changedDates, result)) {
480
480
  if (!(0, _isEqual2.default)(result, stateValue)) {
481
481
  this._notifyChange(result);
482
482
  }
@@ -512,7 +512,7 @@ class DatePickerFoundation extends _foundation.default {
512
512
  if (result && result.length) {
513
513
  const changedDates = this._getChangedDates(result);
514
514
 
515
- if (!this._someDateDisabled(changedDates)) {
515
+ if (!this._someDateDisabled(changedDates, result)) {
516
516
  if (!(0, _isEqual2.default)(result, stateValue)) {
517
517
  if (!this._isControlledComponent() && !this._adapter.needConfirm()) {
518
518
  this._adapter.updateValue(result);
@@ -539,7 +539,7 @@ class DatePickerFoundation extends _foundation.default {
539
539
 
540
540
  const changedLooseResult = this._getChangedDates(looseResult);
541
541
 
542
- if (!this._someDateDisabled(changedLooseResult)) {
542
+ if (!this._someDateDisabled(changedLooseResult, looseResult)) {
543
543
  this.resetCachedSelectedValue(looseResult);
544
544
  }
545
545
  }
@@ -644,7 +644,7 @@ class DatePickerFoundation extends _foundation.default {
644
644
 
645
645
  const changedDates = this._getChangedDates(parsedResult);
646
646
 
647
- if (!this._someDateDisabled(changedDates) && !(0, _isEqual2.default)(parsedResult, stateValue)) {
647
+ if (!this._someDateDisabled(changedDates, parsedResult) && !(0, _isEqual2.default)(parsedResult, stateValue)) {
648
648
  this._notifyChange(parsedResult);
649
649
  }
650
650
  }
@@ -998,7 +998,7 @@ class DatePickerFoundation extends _foundation.default {
998
998
  const changedDates = this._getChangedDates(_value); // You cannot update the value directly when needConfirm, you can only change the value through handleConfirm
999
999
 
1000
1000
 
1001
- if (!this._isControlledComponent() && !this._someDateDisabled(changedDates) && !this._adapter.needConfirm()) {
1001
+ if (!this._isControlledComponent() && !this._someDateDisabled(changedDates, _value) && !this._adapter.needConfirm()) {
1002
1002
  this._adapter.updateValue(_value);
1003
1003
  }
1004
1004
  }
@@ -1041,7 +1041,7 @@ class DatePickerFoundation extends _foundation.default {
1041
1041
 
1042
1042
  let inputValue, insetInputValue;
1043
1043
 
1044
- if (!this._someDateDisabled(changedDates)) {
1044
+ if (!this._someDateDisabled(changedDates, dates)) {
1045
1045
  this.resetCachedSelectedValue(dates);
1046
1046
  inputValue = this._isMultiple() ? this.formatMultipleDates(dates) : this.formatDates(dates);
1047
1047
 
@@ -1348,12 +1348,12 @@ class DatePickerFoundation extends _foundation.default {
1348
1348
  }
1349
1349
  /**
1350
1350
  * Whether a date is disabled
1351
- * @param {Array} value
1351
+ * @param value The date that needs to be judged whether to disable
1352
+ * @param selectedValue Selected date, when selecting a range, pass this date to the second parameter of `disabledDate`
1352
1353
  */
1353
1354
 
1354
1355
 
1355
- _someDateDisabled(value) {
1356
- const stateValue = this.getState('value');
1356
+ _someDateDisabled(value, selectedValue) {
1357
1357
  const {
1358
1358
  rangeInputFocus
1359
1359
  } = this.getStates();
@@ -1363,14 +1363,14 @@ class DatePickerFoundation extends _foundation.default {
1363
1363
  rangeInputFocus
1364
1364
  }; // DisabledDate needs to pass the second parameter
1365
1365
 
1366
- if (this._isRangeType() && Array.isArray(stateValue)) {
1367
- if ((0, _dateFns.isValid)(stateValue[0])) {
1368
- const rangeStart = (0, _dateFns.format)(stateValue[0], 'yyyy-MM-dd');
1366
+ if (this._isRangeType() && Array.isArray(selectedValue)) {
1367
+ if ((0, _dateFns.isValid)(selectedValue[0])) {
1368
+ const rangeStart = (0, _dateFns.format)(selectedValue[0], 'yyyy-MM-dd');
1369
1369
  disabledOptions.rangeStart = rangeStart;
1370
1370
  }
1371
1371
 
1372
- if ((0, _dateFns.isValid)(stateValue[1])) {
1373
- const rangeEnd = (0, _dateFns.format)(stateValue[1], 'yyyy-MM-dd');
1372
+ if ((0, _dateFns.isValid)(selectedValue[1])) {
1373
+ const rangeEnd = (0, _dateFns.format)(selectedValue[1], 'yyyy-MM-dd');
1374
1374
  disabledOptions.rangeEnd = rangeEnd;
1375
1375
  }
1376
1376
  }
@@ -11,17 +11,9 @@
11
11
  padding: 24px 24px 24px 20px;
12
12
  position: relative;
13
13
  }
14
- .semi-popconfirm-inner .semi-popconfirm-btn-close {
15
- position: absolute;
16
- right: 0;
17
- top: 0;
18
- margin-top: 24px;
19
- margin-right: 24px;
20
- }
21
14
  .semi-popconfirm-header {
22
15
  display: flex;
23
16
  justify-content: flex-start;
24
- margin-right: 68px;
25
17
  }
26
18
  .semi-popconfirm-header-title {
27
19
  font-size: 16px;
@@ -41,6 +33,7 @@
41
33
  }
42
34
  .semi-popconfirm-header-body {
43
35
  display: inline-flex;
36
+ flex-grow: 1;
44
37
  flex-direction: column;
45
38
  }
46
39
  .semi-popconfirm-body {
@@ -66,10 +59,6 @@
66
59
  .semi-popover-with-arrow .semi-popconfirm-inner {
67
60
  padding: 12px 12px 12px 8px;
68
61
  }
69
- .semi-popover-with-arrow .semi-popconfirm-inner .semi-popconfirm-btn-close {
70
- margin-top: 12px;
71
- margin-right: 12px;
72
- }
73
62
 
74
63
  .semi-popconfirm-rtl {
75
64
  direction: rtl;
@@ -77,15 +66,8 @@
77
66
  .semi-popconfirm-rtl .semi-popconfirm-inner {
78
67
  padding: 24px 20px 24px 24px;
79
68
  }
80
- .semi-popconfirm-rtl .semi-popconfirm-inner .semi-popconfirm-btn-close {
81
- right: auto;
82
- left: 0;
83
- margin-right: 0;
84
- margin-left: 24px;
85
- }
86
69
  .semi-popconfirm-rtl .semi-popconfirm-header {
87
70
  margin-right: 0;
88
- margin-left: 68px;
89
71
  }
90
72
  .semi-popconfirm-rtl .semi-popconfirm-header-icon {
91
73
  margin-right: 0;
@@ -104,8 +86,4 @@
104
86
  }
105
87
  .semi-popover-with-arrow.semi-popconfirm-rtl .semi-popconfirm-inner {
106
88
  padding: 12px 8px 12px 12px;
107
- }
108
- .semi-popover-with-arrow.semi-popconfirm-rtl .semi-popconfirm-inner .semi-popconfirm-btn-close {
109
- margin-right: 0;
110
- margin-left: 12px;
111
89
  }
@@ -12,20 +12,11 @@ $module: #{$prefix}-popconfirm;
12
12
  flex-direction: column;
13
13
  padding: $spacing-popconfirm-top $spacing-popconfirm-top $spacing-popconfirm-top $spacing-popconfirm-bottom;
14
14
  position: relative;
15
-
16
- .#{$module}-btn-close {
17
- position: absolute;
18
- right: $spacing-popconfirm_inner_close_btn-right;
19
- top: $spacing-popconfirm_inner_close_btn-top;
20
- margin-top: $spacing-popconfirm_btn_close-margin;
21
- margin-right: $spacing-popconfirm_btn_close-margin;
22
- }
23
15
  }
24
16
 
25
17
  &-header {
26
18
  display: flex;
27
19
  justify-content: flex-start;
28
- margin-right: $spacing-popconfirm_header-marginRight;
29
20
 
30
21
  &-title {
31
22
  @include font-size-header-6;
@@ -49,6 +40,7 @@ $module: #{$prefix}-popconfirm;
49
40
 
50
41
  &-body {
51
42
  display: inline-flex;
43
+ flex-grow: 1;
52
44
  flex-direction: column;
53
45
  }
54
46
  }
@@ -84,11 +76,6 @@ $module: #{$prefix}-popconfirm;
84
76
  .#{$prefix}-popover-with-arrow {
85
77
  .#{$module}-inner {
86
78
  padding: $spacing-popconfirm_popover_with_arrow_inner-padding;
87
-
88
- .#{$module}-btn-close {
89
- margin-top: $spacing-popconfirm_popover_with_arrow_inner_btn_close-marginTop;
90
- margin-right: $spacing-popconfirm_popover_with_arrow_inner_btn_close-marginRight;
91
- }
92
79
  }
93
80
  }
94
81
 
@@ -9,20 +9,12 @@ $module: #{$prefix}-popconfirm;
9
9
  &-inner {
10
10
  .#{$module}-rtl & {
11
11
  padding: $spacing-popconfirm-top $spacing-popconfirm-bottom $spacing-popconfirm-top $spacing-popconfirm-top;
12
-
13
- .#{$module}-btn-close {
14
- right: auto;
15
- left: 0;
16
- margin-right: 0;
17
- margin-left: $spacing-popconfirm_btn_close-margin;
18
- }
19
12
  }
20
13
  }
21
14
 
22
15
  &-header {
23
16
  .#{$module}-rtl & {
24
17
  margin-right: 0;
25
- margin-left: $spacing-popconfirm_header-marginRight;
26
18
 
27
19
  &-icon {
28
20
  margin-right: 0;
@@ -49,11 +41,6 @@ $module: #{$prefix}-popconfirm;
49
41
 
50
42
  .#{$module}-inner {
51
43
  padding: $spacing-popconfirm_popover_with_arrow_inner_rtl-padding;
52
-
53
- .#{$module}-btn-close {
54
- margin-right: 0;
55
- margin-left: $spacing-popconfirm_popover_with_arrow_inner_btn_close-marginRight;
56
- }
57
44
  }
58
45
  }
59
46
 
@@ -13,9 +13,6 @@ $spacing-popconfirm-top: 24px; // 顶部内边距
13
13
  $spacing-popconfirm-bottom: 20px; // 底部内边距
14
14
  $spacing-popconfirm_btn_close-margin: 24px; // 关闭按钮顶部 & 右侧外边距
15
15
  $spacing-popconfirm_with_arrow-padding: 12px; // 顶部内边距
16
- $spacing-popconfirm_inner_close_btn-top: 0; // 关闭按钮距顶部距离
17
- $spacing-popconfirm_inner_close_btn-right: 0; // 关闭按钮距右侧距离
18
- $spacing-popconfirm_header-marginRight: $spacing-popconfirm_btn_close-margin + $width-popconfirm_close_btn + 20px; // header 右侧外边距
19
16
  $spacing-popconfirm_header_title-marginBottom: 8px; // header 标题底部外边距
20
17
  $spacing-popconfirm_header_content_p-padding: 0; // header 正文内边距
21
18
  $spacing-popconfirm_header_content_p-margin: 0; // header 正文外边距
@@ -26,7 +23,6 @@ $spacing-popconfirm_footer_btn-marginRight: 8px; // footer 按钮右侧外边距
26
23
  $spacing-popconfirm_popover_with_arrow_inner-padding: ($spacing-popconfirm-top - $spacing-popconfirm_with_arrow-padding) ($spacing-popconfirm-top - $spacing-popconfirm_with_arrow-padding) ($spacing-popconfirm-top - $spacing-popconfirm_with_arrow-padding) ($spacing-popconfirm-bottom - $spacing-popconfirm_with_arrow-padding); // 带三角形箭头时的内边距
27
24
  $spacing-popconfirm_popover_with_arrow_inner_rtl-padding: ($spacing-popconfirm-top - $spacing-popconfirm_with_arrow-padding) ($spacing-popconfirm-bottom - $spacing-popconfirm_with_arrow-padding) ($spacing-popconfirm-top - $spacing-popconfirm_with_arrow-padding) ($spacing-popconfirm-top - $spacing-popconfirm_with_arrow-padding); // 带三角形箭头时的内边距(rtl)
28
25
  $spacing-popconfirm_popover_with_arrow_inner_btn_close-marginTop: $spacing-popconfirm_btn_close-margin - $spacing-popconfirm_with_arrow-padding; // 带三角形箭头时关闭按钮的顶部外边距
29
- $spacing-popconfirm_popover_with_arrow_inner_btn_close-marginRight: $spacing-popconfirm_btn_close-margin - $spacing-popconfirm_with_arrow-padding; // 带三角形箭头时关闭按钮的右侧外边距
30
26
  $spacing-popconfirm_header_icon-marginRight: 12px; // header 图标的右侧外边距
31
27
 
32
28
  // Font
@@ -92,6 +92,15 @@
92
92
  .semi-sidesheet-size-large {
93
93
  width: 920px;
94
94
  }
95
+ .semi-sidesheet-size-small.semi-sidesheet {
96
+ width: 448px;
97
+ }
98
+ .semi-sidesheet-size-medium.semi-sidesheet {
99
+ width: 684px;
100
+ }
101
+ .semi-sidesheet-size-large.semi-sidesheet {
102
+ width: 920px;
103
+ }
95
104
  .semi-sidesheet-content {
96
105
  height: 100%;
97
106
  display: flex;
@@ -116,6 +116,18 @@ $module: #{$prefix}-sidesheet;
116
116
  width: $width-sideSheet_size-large;
117
117
  }
118
118
 
119
+ &-size-small.#{$module} {
120
+ width: $width-sideSheet_size-small;
121
+ }
122
+
123
+ &-size-medium.#{$module} {
124
+ width: $width-sideSheet_size-medium;
125
+ }
126
+
127
+ &-size-large.#{$module} {
128
+ width: $width-sideSheet_size-large;
129
+ }
130
+
119
131
 
120
132
 
121
133
  &-content {
@@ -109,7 +109,7 @@
109
109
  }
110
110
  .semi-typography-action-copy {
111
111
  display: inline-flex;
112
- vertical-align: text-bottom;
112
+ vertical-align: middle;
113
113
  padding: 0;
114
114
  margin-left: 4px;
115
115
  }
@@ -123,7 +123,7 @@
123
123
  color: var(--semi-color-text-2);
124
124
  }
125
125
  .semi-typography-action-copied .semi-icon {
126
- vertical-align: text-bottom;
126
+ vertical-align: middle;
127
127
  color: var(--semi-color-success);
128
128
  }
129
129
  .semi-typography-paragraph {
@@ -140,7 +140,7 @@ $module: #{$prefix}-typography;
140
140
 
141
141
  &-action-copy {
142
142
  display: inline-flex;
143
- vertical-align: text-bottom;
143
+ vertical-align: middle;
144
144
  padding: $spacing-typography_copyIcon-padding;
145
145
  margin-left: $spacing-typography_copyIcon-marginLeft;
146
146
  }
@@ -156,7 +156,7 @@ $module: #{$prefix}-typography;
156
156
  color: $color-typography_copied-text-success;
157
157
 
158
158
  .#{$prefix}-icon {
159
- vertical-align: text-bottom;
159
+ vertical-align: middle;
160
160
  color: $color-typography_copied-icon-success;
161
161
  }
162
162
  }
@@ -475,9 +475,10 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
475
475
  _getChangedDates(dates: Date[]): any[];
476
476
  /**
477
477
  * Whether a date is disabled
478
- * @param {Array} value
478
+ * @param value The date that needs to be judged whether to disable
479
+ * @param selectedValue Selected date, when selecting a range, pass this date to the second parameter of `disabledDate`
479
480
  */
480
- _someDateDisabled(value: Date[]): boolean;
481
+ _someDateDisabled(value: Date[], selectedValue: Date[]): boolean;
481
482
  /**
482
483
  * Format locale date
483
484
  * locale get from LocaleProvider
@@ -451,7 +451,7 @@ export default class DatePickerFoundation extends BaseFoundation {
451
451
 
452
452
  const changedDates = this._getChangedDates(result);
453
453
 
454
- if (!this._someDateDisabled(changedDates)) {
454
+ if (!this._someDateDisabled(changedDates, result)) {
455
455
  if (!_isEqual(result, stateValue)) {
456
456
  this._notifyChange(result);
457
457
  }
@@ -487,7 +487,7 @@ export default class DatePickerFoundation extends BaseFoundation {
487
487
  if (result && result.length) {
488
488
  const changedDates = this._getChangedDates(result);
489
489
 
490
- if (!this._someDateDisabled(changedDates)) {
490
+ if (!this._someDateDisabled(changedDates, result)) {
491
491
  if (!_isEqual(result, stateValue)) {
492
492
  if (!this._isControlledComponent() && !this._adapter.needConfirm()) {
493
493
  this._adapter.updateValue(result);
@@ -514,7 +514,7 @@ export default class DatePickerFoundation extends BaseFoundation {
514
514
 
515
515
  const changedLooseResult = this._getChangedDates(looseResult);
516
516
 
517
- if (!this._someDateDisabled(changedLooseResult)) {
517
+ if (!this._someDateDisabled(changedLooseResult, looseResult)) {
518
518
  this.resetCachedSelectedValue(looseResult);
519
519
  }
520
520
  }
@@ -619,7 +619,7 @@ export default class DatePickerFoundation extends BaseFoundation {
619
619
 
620
620
  const changedDates = this._getChangedDates(parsedResult);
621
621
 
622
- if (!this._someDateDisabled(changedDates) && !_isEqual(parsedResult, stateValue)) {
622
+ if (!this._someDateDisabled(changedDates, parsedResult) && !_isEqual(parsedResult, stateValue)) {
623
623
  this._notifyChange(parsedResult);
624
624
  }
625
625
  }
@@ -973,7 +973,7 @@ export default class DatePickerFoundation extends BaseFoundation {
973
973
  const changedDates = this._getChangedDates(_value); // You cannot update the value directly when needConfirm, you can only change the value through handleConfirm
974
974
 
975
975
 
976
- if (!this._isControlledComponent() && !this._someDateDisabled(changedDates) && !this._adapter.needConfirm()) {
976
+ if (!this._isControlledComponent() && !this._someDateDisabled(changedDates, _value) && !this._adapter.needConfirm()) {
977
977
  this._adapter.updateValue(_value);
978
978
  }
979
979
  }
@@ -1019,7 +1019,7 @@ export default class DatePickerFoundation extends BaseFoundation {
1019
1019
 
1020
1020
  let inputValue, insetInputValue;
1021
1021
 
1022
- if (!this._someDateDisabled(changedDates)) {
1022
+ if (!this._someDateDisabled(changedDates, dates)) {
1023
1023
  this.resetCachedSelectedValue(dates);
1024
1024
  inputValue = this._isMultiple() ? this.formatMultipleDates(dates) : this.formatDates(dates);
1025
1025
 
@@ -1326,12 +1326,12 @@ export default class DatePickerFoundation extends BaseFoundation {
1326
1326
  }
1327
1327
  /**
1328
1328
  * Whether a date is disabled
1329
- * @param {Array} value
1329
+ * @param value The date that needs to be judged whether to disable
1330
+ * @param selectedValue Selected date, when selecting a range, pass this date to the second parameter of `disabledDate`
1330
1331
  */
1331
1332
 
1332
1333
 
1333
- _someDateDisabled(value) {
1334
- const stateValue = this.getState('value');
1334
+ _someDateDisabled(value, selectedValue) {
1335
1335
  const {
1336
1336
  rangeInputFocus
1337
1337
  } = this.getStates();
@@ -1341,14 +1341,14 @@ export default class DatePickerFoundation extends BaseFoundation {
1341
1341
  rangeInputFocus
1342
1342
  }; // DisabledDate needs to pass the second parameter
1343
1343
 
1344
- if (this._isRangeType() && Array.isArray(stateValue)) {
1345
- if (isValid(stateValue[0])) {
1346
- const rangeStart = format(stateValue[0], 'yyyy-MM-dd');
1344
+ if (this._isRangeType() && Array.isArray(selectedValue)) {
1345
+ if (isValid(selectedValue[0])) {
1346
+ const rangeStart = format(selectedValue[0], 'yyyy-MM-dd');
1347
1347
  disabledOptions.rangeStart = rangeStart;
1348
1348
  }
1349
1349
 
1350
- if (isValid(stateValue[1])) {
1351
- const rangeEnd = format(stateValue[1], 'yyyy-MM-dd');
1350
+ if (isValid(selectedValue[1])) {
1351
+ const rangeEnd = format(selectedValue[1], 'yyyy-MM-dd');
1352
1352
  disabledOptions.rangeEnd = rangeEnd;
1353
1353
  }
1354
1354
  }
@@ -11,17 +11,9 @@
11
11
  padding: 24px 24px 24px 20px;
12
12
  position: relative;
13
13
  }
14
- .semi-popconfirm-inner .semi-popconfirm-btn-close {
15
- position: absolute;
16
- right: 0;
17
- top: 0;
18
- margin-top: 24px;
19
- margin-right: 24px;
20
- }
21
14
  .semi-popconfirm-header {
22
15
  display: flex;
23
16
  justify-content: flex-start;
24
- margin-right: 68px;
25
17
  }
26
18
  .semi-popconfirm-header-title {
27
19
  font-size: 16px;
@@ -41,6 +33,7 @@
41
33
  }
42
34
  .semi-popconfirm-header-body {
43
35
  display: inline-flex;
36
+ flex-grow: 1;
44
37
  flex-direction: column;
45
38
  }
46
39
  .semi-popconfirm-body {
@@ -66,10 +59,6 @@
66
59
  .semi-popover-with-arrow .semi-popconfirm-inner {
67
60
  padding: 12px 12px 12px 8px;
68
61
  }
69
- .semi-popover-with-arrow .semi-popconfirm-inner .semi-popconfirm-btn-close {
70
- margin-top: 12px;
71
- margin-right: 12px;
72
- }
73
62
 
74
63
  .semi-popconfirm-rtl {
75
64
  direction: rtl;
@@ -77,15 +66,8 @@
77
66
  .semi-popconfirm-rtl .semi-popconfirm-inner {
78
67
  padding: 24px 20px 24px 24px;
79
68
  }
80
- .semi-popconfirm-rtl .semi-popconfirm-inner .semi-popconfirm-btn-close {
81
- right: auto;
82
- left: 0;
83
- margin-right: 0;
84
- margin-left: 24px;
85
- }
86
69
  .semi-popconfirm-rtl .semi-popconfirm-header {
87
70
  margin-right: 0;
88
- margin-left: 68px;
89
71
  }
90
72
  .semi-popconfirm-rtl .semi-popconfirm-header-icon {
91
73
  margin-right: 0;
@@ -104,8 +86,4 @@
104
86
  }
105
87
  .semi-popover-with-arrow.semi-popconfirm-rtl .semi-popconfirm-inner {
106
88
  padding: 12px 8px 12px 12px;
107
- }
108
- .semi-popover-with-arrow.semi-popconfirm-rtl .semi-popconfirm-inner .semi-popconfirm-btn-close {
109
- margin-right: 0;
110
- margin-left: 12px;
111
89
  }
@@ -12,20 +12,11 @@ $module: #{$prefix}-popconfirm;
12
12
  flex-direction: column;
13
13
  padding: $spacing-popconfirm-top $spacing-popconfirm-top $spacing-popconfirm-top $spacing-popconfirm-bottom;
14
14
  position: relative;
15
-
16
- .#{$module}-btn-close {
17
- position: absolute;
18
- right: $spacing-popconfirm_inner_close_btn-right;
19
- top: $spacing-popconfirm_inner_close_btn-top;
20
- margin-top: $spacing-popconfirm_btn_close-margin;
21
- margin-right: $spacing-popconfirm_btn_close-margin;
22
- }
23
15
  }
24
16
 
25
17
  &-header {
26
18
  display: flex;
27
19
  justify-content: flex-start;
28
- margin-right: $spacing-popconfirm_header-marginRight;
29
20
 
30
21
  &-title {
31
22
  @include font-size-header-6;
@@ -49,6 +40,7 @@ $module: #{$prefix}-popconfirm;
49
40
 
50
41
  &-body {
51
42
  display: inline-flex;
43
+ flex-grow: 1;
52
44
  flex-direction: column;
53
45
  }
54
46
  }
@@ -84,11 +76,6 @@ $module: #{$prefix}-popconfirm;
84
76
  .#{$prefix}-popover-with-arrow {
85
77
  .#{$module}-inner {
86
78
  padding: $spacing-popconfirm_popover_with_arrow_inner-padding;
87
-
88
- .#{$module}-btn-close {
89
- margin-top: $spacing-popconfirm_popover_with_arrow_inner_btn_close-marginTop;
90
- margin-right: $spacing-popconfirm_popover_with_arrow_inner_btn_close-marginRight;
91
- }
92
79
  }
93
80
  }
94
81
 
@@ -9,20 +9,12 @@ $module: #{$prefix}-popconfirm;
9
9
  &-inner {
10
10
  .#{$module}-rtl & {
11
11
  padding: $spacing-popconfirm-top $spacing-popconfirm-bottom $spacing-popconfirm-top $spacing-popconfirm-top;
12
-
13
- .#{$module}-btn-close {
14
- right: auto;
15
- left: 0;
16
- margin-right: 0;
17
- margin-left: $spacing-popconfirm_btn_close-margin;
18
- }
19
12
  }
20
13
  }
21
14
 
22
15
  &-header {
23
16
  .#{$module}-rtl & {
24
17
  margin-right: 0;
25
- margin-left: $spacing-popconfirm_header-marginRight;
26
18
 
27
19
  &-icon {
28
20
  margin-right: 0;
@@ -49,11 +41,6 @@ $module: #{$prefix}-popconfirm;
49
41
 
50
42
  .#{$module}-inner {
51
43
  padding: $spacing-popconfirm_popover_with_arrow_inner_rtl-padding;
52
-
53
- .#{$module}-btn-close {
54
- margin-right: 0;
55
- margin-left: $spacing-popconfirm_popover_with_arrow_inner_btn_close-marginRight;
56
- }
57
44
  }
58
45
  }
59
46
 
@@ -13,9 +13,6 @@ $spacing-popconfirm-top: 24px; // 顶部内边距
13
13
  $spacing-popconfirm-bottom: 20px; // 底部内边距
14
14
  $spacing-popconfirm_btn_close-margin: 24px; // 关闭按钮顶部 & 右侧外边距
15
15
  $spacing-popconfirm_with_arrow-padding: 12px; // 顶部内边距
16
- $spacing-popconfirm_inner_close_btn-top: 0; // 关闭按钮距顶部距离
17
- $spacing-popconfirm_inner_close_btn-right: 0; // 关闭按钮距右侧距离
18
- $spacing-popconfirm_header-marginRight: $spacing-popconfirm_btn_close-margin + $width-popconfirm_close_btn + 20px; // header 右侧外边距
19
16
  $spacing-popconfirm_header_title-marginBottom: 8px; // header 标题底部外边距
20
17
  $spacing-popconfirm_header_content_p-padding: 0; // header 正文内边距
21
18
  $spacing-popconfirm_header_content_p-margin: 0; // header 正文外边距
@@ -26,7 +23,6 @@ $spacing-popconfirm_footer_btn-marginRight: 8px; // footer 按钮右侧外边距
26
23
  $spacing-popconfirm_popover_with_arrow_inner-padding: ($spacing-popconfirm-top - $spacing-popconfirm_with_arrow-padding) ($spacing-popconfirm-top - $spacing-popconfirm_with_arrow-padding) ($spacing-popconfirm-top - $spacing-popconfirm_with_arrow-padding) ($spacing-popconfirm-bottom - $spacing-popconfirm_with_arrow-padding); // 带三角形箭头时的内边距
27
24
  $spacing-popconfirm_popover_with_arrow_inner_rtl-padding: ($spacing-popconfirm-top - $spacing-popconfirm_with_arrow-padding) ($spacing-popconfirm-bottom - $spacing-popconfirm_with_arrow-padding) ($spacing-popconfirm-top - $spacing-popconfirm_with_arrow-padding) ($spacing-popconfirm-top - $spacing-popconfirm_with_arrow-padding); // 带三角形箭头时的内边距(rtl)
28
25
  $spacing-popconfirm_popover_with_arrow_inner_btn_close-marginTop: $spacing-popconfirm_btn_close-margin - $spacing-popconfirm_with_arrow-padding; // 带三角形箭头时关闭按钮的顶部外边距
29
- $spacing-popconfirm_popover_with_arrow_inner_btn_close-marginRight: $spacing-popconfirm_btn_close-margin - $spacing-popconfirm_with_arrow-padding; // 带三角形箭头时关闭按钮的右侧外边距
30
26
  $spacing-popconfirm_header_icon-marginRight: 12px; // header 图标的右侧外边距
31
27
 
32
28
  // Font
@@ -92,6 +92,15 @@
92
92
  .semi-sidesheet-size-large {
93
93
  width: 920px;
94
94
  }
95
+ .semi-sidesheet-size-small.semi-sidesheet {
96
+ width: 448px;
97
+ }
98
+ .semi-sidesheet-size-medium.semi-sidesheet {
99
+ width: 684px;
100
+ }
101
+ .semi-sidesheet-size-large.semi-sidesheet {
102
+ width: 920px;
103
+ }
95
104
  .semi-sidesheet-content {
96
105
  height: 100%;
97
106
  display: flex;
@@ -116,6 +116,18 @@ $module: #{$prefix}-sidesheet;
116
116
  width: $width-sideSheet_size-large;
117
117
  }
118
118
 
119
+ &-size-small.#{$module} {
120
+ width: $width-sideSheet_size-small;
121
+ }
122
+
123
+ &-size-medium.#{$module} {
124
+ width: $width-sideSheet_size-medium;
125
+ }
126
+
127
+ &-size-large.#{$module} {
128
+ width: $width-sideSheet_size-large;
129
+ }
130
+
119
131
 
120
132
 
121
133
  &-content {
@@ -109,7 +109,7 @@
109
109
  }
110
110
  .semi-typography-action-copy {
111
111
  display: inline-flex;
112
- vertical-align: text-bottom;
112
+ vertical-align: middle;
113
113
  padding: 0;
114
114
  margin-left: 4px;
115
115
  }
@@ -123,7 +123,7 @@
123
123
  color: var(--semi-color-text-2);
124
124
  }
125
125
  .semi-typography-action-copied .semi-icon {
126
- vertical-align: text-bottom;
126
+ vertical-align: middle;
127
127
  color: var(--semi-color-success);
128
128
  }
129
129
  .semi-typography-paragraph {
@@ -140,7 +140,7 @@ $module: #{$prefix}-typography;
140
140
 
141
141
  &-action-copy {
142
142
  display: inline-flex;
143
- vertical-align: text-bottom;
143
+ vertical-align: middle;
144
144
  padding: $spacing-typography_copyIcon-padding;
145
145
  margin-left: $spacing-typography_copyIcon-marginLeft;
146
146
  }
@@ -156,7 +156,7 @@ $module: #{$prefix}-typography;
156
156
  color: $color-typography_copied-text-success;
157
157
 
158
158
  .#{$prefix}-icon {
159
- vertical-align: text-bottom;
159
+ vertical-align: middle;
160
160
  color: $color-typography_copied-icon-success;
161
161
  }
162
162
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.32.1",
3
+ "version": "2.32.2",
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": "cf24900a712ebce46d0c0e06aa31dcc97519fe13",
26
+ "gitHead": "312de35a97b05593fee8063c5b33881a166de04c",
27
27
  "devDependencies": {
28
28
  "@babel/plugin-transform-runtime": "^7.15.8",
29
29
  "@babel/preset-env": "^7.15.8",
@@ -12,20 +12,11 @@ $module: #{$prefix}-popconfirm;
12
12
  flex-direction: column;
13
13
  padding: $spacing-popconfirm-top $spacing-popconfirm-top $spacing-popconfirm-top $spacing-popconfirm-bottom;
14
14
  position: relative;
15
-
16
- .#{$module}-btn-close {
17
- position: absolute;
18
- right: $spacing-popconfirm_inner_close_btn-right;
19
- top: $spacing-popconfirm_inner_close_btn-top;
20
- margin-top: $spacing-popconfirm_btn_close-margin;
21
- margin-right: $spacing-popconfirm_btn_close-margin;
22
- }
23
15
  }
24
16
 
25
17
  &-header {
26
18
  display: flex;
27
19
  justify-content: flex-start;
28
- margin-right: $spacing-popconfirm_header-marginRight;
29
20
 
30
21
  &-title {
31
22
  @include font-size-header-6;
@@ -49,6 +40,7 @@ $module: #{$prefix}-popconfirm;
49
40
 
50
41
  &-body {
51
42
  display: inline-flex;
43
+ flex-grow: 1;
52
44
  flex-direction: column;
53
45
  }
54
46
  }
@@ -84,11 +76,6 @@ $module: #{$prefix}-popconfirm;
84
76
  .#{$prefix}-popover-with-arrow {
85
77
  .#{$module}-inner {
86
78
  padding: $spacing-popconfirm_popover_with_arrow_inner-padding;
87
-
88
- .#{$module}-btn-close {
89
- margin-top: $spacing-popconfirm_popover_with_arrow_inner_btn_close-marginTop;
90
- margin-right: $spacing-popconfirm_popover_with_arrow_inner_btn_close-marginRight;
91
- }
92
79
  }
93
80
  }
94
81
 
@@ -9,20 +9,12 @@ $module: #{$prefix}-popconfirm;
9
9
  &-inner {
10
10
  .#{$module}-rtl & {
11
11
  padding: $spacing-popconfirm-top $spacing-popconfirm-bottom $spacing-popconfirm-top $spacing-popconfirm-top;
12
-
13
- .#{$module}-btn-close {
14
- right: auto;
15
- left: 0;
16
- margin-right: 0;
17
- margin-left: $spacing-popconfirm_btn_close-margin;
18
- }
19
12
  }
20
13
  }
21
14
 
22
15
  &-header {
23
16
  .#{$module}-rtl & {
24
17
  margin-right: 0;
25
- margin-left: $spacing-popconfirm_header-marginRight;
26
18
 
27
19
  &-icon {
28
20
  margin-right: 0;
@@ -49,11 +41,6 @@ $module: #{$prefix}-popconfirm;
49
41
 
50
42
  .#{$module}-inner {
51
43
  padding: $spacing-popconfirm_popover_with_arrow_inner_rtl-padding;
52
-
53
- .#{$module}-btn-close {
54
- margin-right: 0;
55
- margin-left: $spacing-popconfirm_popover_with_arrow_inner_btn_close-marginRight;
56
- }
57
44
  }
58
45
  }
59
46
 
@@ -13,9 +13,6 @@ $spacing-popconfirm-top: 24px; // 顶部内边距
13
13
  $spacing-popconfirm-bottom: 20px; // 底部内边距
14
14
  $spacing-popconfirm_btn_close-margin: 24px; // 关闭按钮顶部 & 右侧外边距
15
15
  $spacing-popconfirm_with_arrow-padding: 12px; // 顶部内边距
16
- $spacing-popconfirm_inner_close_btn-top: 0; // 关闭按钮距顶部距离
17
- $spacing-popconfirm_inner_close_btn-right: 0; // 关闭按钮距右侧距离
18
- $spacing-popconfirm_header-marginRight: $spacing-popconfirm_btn_close-margin + $width-popconfirm_close_btn + 20px; // header 右侧外边距
19
16
  $spacing-popconfirm_header_title-marginBottom: 8px; // header 标题底部外边距
20
17
  $spacing-popconfirm_header_content_p-padding: 0; // header 正文内边距
21
18
  $spacing-popconfirm_header_content_p-margin: 0; // header 正文外边距
@@ -26,7 +23,6 @@ $spacing-popconfirm_footer_btn-marginRight: 8px; // footer 按钮右侧外边距
26
23
  $spacing-popconfirm_popover_with_arrow_inner-padding: ($spacing-popconfirm-top - $spacing-popconfirm_with_arrow-padding) ($spacing-popconfirm-top - $spacing-popconfirm_with_arrow-padding) ($spacing-popconfirm-top - $spacing-popconfirm_with_arrow-padding) ($spacing-popconfirm-bottom - $spacing-popconfirm_with_arrow-padding); // 带三角形箭头时的内边距
27
24
  $spacing-popconfirm_popover_with_arrow_inner_rtl-padding: ($spacing-popconfirm-top - $spacing-popconfirm_with_arrow-padding) ($spacing-popconfirm-bottom - $spacing-popconfirm_with_arrow-padding) ($spacing-popconfirm-top - $spacing-popconfirm_with_arrow-padding) ($spacing-popconfirm-top - $spacing-popconfirm_with_arrow-padding); // 带三角形箭头时的内边距(rtl)
28
25
  $spacing-popconfirm_popover_with_arrow_inner_btn_close-marginTop: $spacing-popconfirm_btn_close-margin - $spacing-popconfirm_with_arrow-padding; // 带三角形箭头时关闭按钮的顶部外边距
29
- $spacing-popconfirm_popover_with_arrow_inner_btn_close-marginRight: $spacing-popconfirm_btn_close-margin - $spacing-popconfirm_with_arrow-padding; // 带三角形箭头时关闭按钮的右侧外边距
30
26
  $spacing-popconfirm_header_icon-marginRight: 12px; // header 图标的右侧外边距
31
27
 
32
28
  // Font
@@ -116,6 +116,18 @@ $module: #{$prefix}-sidesheet;
116
116
  width: $width-sideSheet_size-large;
117
117
  }
118
118
 
119
+ &-size-small.#{$module} {
120
+ width: $width-sideSheet_size-small;
121
+ }
122
+
123
+ &-size-medium.#{$module} {
124
+ width: $width-sideSheet_size-medium;
125
+ }
126
+
127
+ &-size-large.#{$module} {
128
+ width: $width-sideSheet_size-large;
129
+ }
130
+
119
131
 
120
132
 
121
133
  &-content {
@@ -140,7 +140,7 @@ $module: #{$prefix}-typography;
140
140
 
141
141
  &-action-copy {
142
142
  display: inline-flex;
143
- vertical-align: text-bottom;
143
+ vertical-align: middle;
144
144
  padding: $spacing-typography_copyIcon-padding;
145
145
  margin-left: $spacing-typography_copyIcon-marginLeft;
146
146
  }
@@ -156,7 +156,7 @@ $module: #{$prefix}-typography;
156
156
  color: $color-typography_copied-text-success;
157
157
 
158
158
  .#{$prefix}-icon {
159
- vertical-align: text-bottom;
159
+ vertical-align: middle;
160
160
  color: $color-typography_copied-icon-success;
161
161
  }
162
162
  }