rsuite 5.37.3 → 5.37.4

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## [5.37.4](https://github.com/rsuite/rsuite/compare/v5.37.3...v5.37.4) (2023-08-11)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **DatePicker,DateRangePicker:** fix calendar styles per design ([#3325](https://github.com/rsuite/rsuite/issues/3325)) ([a7d1c08](https://github.com/rsuite/rsuite/commit/a7d1c08c44c6169bcd10b32dcb4bb9ebcbb93677))
6
+ - **InputGroup:** fix inside addon overlapping input text ([#3324](https://github.com/rsuite/rsuite/issues/3324)) ([8f1ff30](https://github.com/rsuite/rsuite/commit/8f1ff30634dbfcd20f05b63168e767723af5a968))
7
+ - **InputPicker:** Fix InputPicker select bug ([#3329](https://github.com/rsuite/rsuite/issues/3329)) ([c52756b](https://github.com/rsuite/rsuite/commit/c52756b8596c20d275a9d5d2d41b7a81d355920f))
8
+ - **OverlayTrigger:** fix handleClose will trigger twice ([#3286](https://github.com/rsuite/rsuite/issues/3286)) ([11b8eb8](https://github.com/rsuite/rsuite/commit/11b8eb8c6f43b46dcad5d1f800e6eb7a5374b0c2))
9
+ - **Picker:** change color of caret on option group title ([#3323](https://github.com/rsuite/rsuite/issues/3323)) ([0d7be85](https://github.com/rsuite/rsuite/commit/0d7be85eec97063b162877ff8169209070fb1d4a))
10
+
1
11
  ## [5.37.3](https://github.com/rsuite/rsuite/compare/v5.37.2...v5.37.3) (2023-08-02)
2
12
 
3
13
  ### Bug Fixes
@@ -346,6 +346,7 @@
346
346
  }
347
347
 
348
348
  // Calendar Table
349
+ // TODO-Doma Use CSS grid layout.
349
350
  .rs-calendar-table {
350
351
  display: table;
351
352
  table-layout: fixed;
@@ -438,7 +439,7 @@
438
439
 
439
440
  .rs-calendar-table-cell-week-number {
440
441
  display: table-cell;
441
- width: 1%;
442
+ min-width: 30px;
442
443
  padding: @calendar-table-cell-padding;
443
444
  text-align: center;
444
445
  vertical-align: middle;
@@ -473,13 +474,13 @@
473
474
 
474
475
  &-row {
475
476
  position: relative;
476
- padding-left: (40px + @calendar-picker-padding);
477
+ padding-left: @calendar-picker-padding + 38px; // 30px for the year label + 8px gap
477
478
  padding-right: @calendar-picker-padding;
478
479
  padding-top: 5px;
479
480
  padding-bottom: 5px;
480
481
 
481
482
  &:not(:last-child) {
482
- border-bottom: 1px dotted var(--rs-border-primary);
483
+ border-bottom: 1px dashed var(--rs-border-primary);
483
484
  }
484
485
  }
485
486
 
@@ -495,13 +496,14 @@
495
496
 
496
497
  &-list {
497
498
  display: block;
499
+ min-width: 30px * 6 + 4px * 5;
498
500
  .clearfix();
499
501
  }
500
502
 
501
503
  &-cell {
502
504
  display: inline-block;
503
505
  float: left;
504
- width: ~'calc((100% - @{calendar-table-cell-content-today-border-width} * 12 ) / 6)';
506
+ // width: ~'calc((100% - @{calendar-table-cell-content-today-border-width} * 12 ) / 6)';
505
507
  margin: 1px;
506
508
  text-align: center;
507
509
  vertical-align: middle;
@@ -49,9 +49,11 @@
49
49
 
50
50
  // Calendar in DatePicker popup
51
51
  .rs-picker-menu {
52
- @calendar-width: (
53
- @datepicker-calendar-cell-gap-x * 6 + 30px * 7 + @datepicker-calendar-padding-x * 2
54
- );
52
+ @calendar-width: 264px; // This is a fixed value per design.
53
+
54
+ @calendar-padding-x: 15px;
55
+ // The padding used when show week numbers.
56
+ @calendar-padding-x-condensed: 12px;
55
57
 
56
58
  .rs-picker-toolbar {
57
59
  max-width: 100%;
@@ -68,17 +70,25 @@
68
70
  margin: 0 auto;
69
71
 
70
72
  &-show-week-numbers {
71
- @calendar-width: (
72
- @datepicker-calendar-cell-gap-x * 7 + 30px * 8 + @datepicker-calendar-padding-x * 2
73
- );
73
+ @calendar-width: 278px; // This is a fixed value per design.
74
74
 
75
75
  min-width: @calendar-width;
76
+
77
+ & .rs-calendar-body {
78
+ padding-left: @calendar-padding-x-condensed;
79
+ padding-right: @calendar-padding-x-condensed;
80
+ }
76
81
  }
77
82
 
78
83
  &-header {
79
84
  width: 100%;
80
85
  }
81
86
 
87
+ &-body {
88
+ padding-left: @calendar-padding-x;
89
+ padding-right: @calendar-padding-x;
90
+ }
91
+
82
92
  &-table {
83
93
  width: unset;
84
94
  }
@@ -129,12 +129,12 @@
129
129
  display: block;
130
130
  width: 100%;
131
131
  border: none;
132
+ outline: none;
132
133
  padding-right: @input-group-padding-for-add-on-base;
133
134
  }
134
135
 
135
136
  .rs-input-group-btn,
136
137
  .rs-input-group-addon {
137
- position: absolute;
138
138
  z-index: @zindex-input-group-icon;
139
139
  flex: 0 0 auto;
140
140
  width: auto;
@@ -165,7 +165,7 @@
165
165
  top: 0;
166
166
  background: none;
167
167
  border: none;
168
- padding: 10px 13px;
168
+ padding: 10px 12px;
169
169
 
170
170
  &.rs-input-group-btn {
171
171
  padding: 8px 13px;
@@ -178,7 +178,7 @@
178
178
  .rs-input-group-addon ~ .rs-auto-complete > input.rs-input,
179
179
  .rs-input-group-addon ~ .rs-form-control-wrapper > input.rs-input,
180
180
  .rs-input-group-btn ~ .rs-form-control-wrapper > input.rs-input {
181
- padding-left: @input-group-padding-for-add-on-base;
181
+ padding-left: 0;
182
182
  padding-right: 12px;
183
183
  }
184
184
 
@@ -41,6 +41,7 @@
41
41
  top: @padding-y;
42
42
  right: @padding-x;
43
43
  padding: 3px;
44
+ color: var(--rs-text-secondary);
44
45
  }
45
46
  }
46
47
  }
@@ -536,9 +536,6 @@ var InputPicker = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
536
536
  (_triggerRef$current4 = triggerRef.current) === null || _triggerRef$current4 === void 0 ? void 0 : _triggerRef$current4.open();
537
537
  }
538
538
  }, [readOnly]);
539
- var handleBlur = (0, _react.useCallback)(function () {
540
- setOpen(false);
541
- }, []);
542
539
  var handleEnter = (0, _react.useCallback)(function () {
543
540
  focusInput();
544
541
  setOpen(true);
@@ -773,7 +770,7 @@ var InputPicker = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
773
770
  }, tagElements, displaySearchInput && /*#__PURE__*/_react.default.createElement(_InputSearch.default, (0, _extends2.default)({}, inputProps, {
774
771
  tabIndex: tabIndex,
775
772
  readOnly: readOnly,
776
- onBlur: (0, _utils.createChainedFunction)(handleBlur, onBlur),
773
+ onBlur: onBlur,
777
774
  onFocus: (0, _utils.createChainedFunction)(handleFocus, onFocus),
778
775
  inputRef: inputRef,
779
776
  onChange: handleSearch,
@@ -252,7 +252,7 @@ var OverlayTrigger = /*#__PURE__*/_react.default.forwardRef(function (props, ref
252
252
  }, [enterable, open, handleOpen]);
253
253
  var handleDelayedClose = (0, _react.useCallback)(function () {
254
254
  if (!enterable) {
255
- handleClose();
255
+ return handleClose();
256
256
  }
257
257
 
258
258
  isOnTrigger.current = false;
@@ -3211,7 +3211,7 @@ tbody.rs-anim-collapse.rs-anim-in {
3211
3211
  }
3212
3212
  .rs-calendar-table-cell-week-number {
3213
3213
  display: table-cell;
3214
- width: 1%;
3214
+ min-width: 30px;
3215
3215
  padding: 1px;
3216
3216
  text-align: center;
3217
3217
  vertical-align: middle;
@@ -3246,14 +3246,14 @@ tbody.rs-anim-collapse.rs-anim-in {
3246
3246
  }
3247
3247
  .rs-calendar-month-dropdown-row {
3248
3248
  position: relative;
3249
- padding-right: 52px;
3249
+ padding-right: 50px;
3250
3250
  padding-left: 12px;
3251
3251
  padding-top: 5px;
3252
3252
  padding-bottom: 5px;
3253
3253
  }
3254
3254
  .rs-calendar-month-dropdown-row:not(:last-child) {
3255
- border-bottom: 1px dotted #e5e5ea;
3256
- border-bottom: 1px dotted var(--rs-border-primary);
3255
+ border-bottom: 1px dashed #e5e5ea;
3256
+ border-bottom: 1px dashed var(--rs-border-primary);
3257
3257
  }
3258
3258
  .rs-calendar-month-dropdown-year {
3259
3259
  position: absolute;
@@ -3266,6 +3266,7 @@ tbody.rs-anim-collapse.rs-anim-in {
3266
3266
  }
3267
3267
  .rs-calendar-month-dropdown-list {
3268
3268
  display: block;
3269
+ min-width: 200px;
3269
3270
  }
3270
3271
  .rs-calendar-month-dropdown-list::before,
3271
3272
  .rs-calendar-month-dropdown-list::after {
@@ -3278,7 +3279,6 @@ tbody.rs-anim-collapse.rs-anim-in {
3278
3279
  .rs-calendar-month-dropdown-cell {
3279
3280
  display: inline-block;
3280
3281
  float: right;
3281
- width: calc((100% - 1px * 12 ) / 6);
3282
3282
  margin: 1px;
3283
3283
  text-align: center;
3284
3284
  vertical-align: middle;
@@ -4108,6 +4108,8 @@ label:hover .rs-checkbox-wrapper .rs-checkbox-inner::before {
4108
4108
  top: 8px;
4109
4109
  left: 12px;
4110
4110
  padding: 3px;
4111
+ color: #8e8e93;
4112
+ color: var(--rs-text-secondary);
4111
4113
  }
4112
4114
  .rs-picker-check-menu-items .rs-picker-menu-group.folded .rs-picker-menu-group-caret {
4113
4115
  -webkit-transform: rotate(-90deg);
@@ -4344,16 +4346,24 @@ label:hover .rs-checkbox-wrapper .rs-checkbox-inner::before {
4344
4346
  max-width: 400px;
4345
4347
  }
4346
4348
  .rs-picker-menu .rs-calendar {
4347
- min-width: 246px;
4349
+ min-width: 264px;
4348
4350
  display: block;
4349
4351
  margin: 0 auto;
4350
4352
  }
4351
4353
  .rs-picker-menu .rs-calendar-show-week-numbers {
4352
4354
  min-width: 278px;
4353
4355
  }
4356
+ .rs-picker-menu .rs-calendar-show-week-numbers .rs-calendar-body {
4357
+ padding-right: 12px;
4358
+ padding-left: 12px;
4359
+ }
4354
4360
  .rs-picker-menu .rs-calendar-header {
4355
4361
  width: 100%;
4356
4362
  }
4363
+ .rs-picker-menu .rs-calendar-body {
4364
+ padding-right: 15px;
4365
+ padding-left: 15px;
4366
+ }
4357
4367
  .rs-picker-menu .rs-calendar-table {
4358
4368
  width: unset;
4359
4369
  }
@@ -8026,11 +8036,11 @@ textarea.rs-input-sm {
8026
8036
  display: block;
8027
8037
  width: 100%;
8028
8038
  border: none;
8039
+ outline: none;
8029
8040
  padding-left: 36px;
8030
8041
  }
8031
8042
  .rs-input-group.rs-input-group-inside .rs-input-group-btn,
8032
8043
  .rs-input-group.rs-input-group-inside .rs-input-group-addon {
8033
- position: absolute;
8034
8044
  z-index: 4;
8035
8045
  -webkit-box-flex: 0;
8036
8046
  -ms-flex: 0 0 auto;
@@ -8091,7 +8101,7 @@ textarea.rs-input-sm {
8091
8101
  top: 0;
8092
8102
  background: none;
8093
8103
  border: none;
8094
- padding: 10px 13px;
8104
+ padding: 10px 12px;
8095
8105
  }
8096
8106
  .rs-input-group.rs-input-group-inside .rs-input-group-addon.rs-input-group-btn {
8097
8107
  padding: 8px 13px;
@@ -8102,7 +8112,7 @@ textarea.rs-input-sm {
8102
8112
  .rs-input-group.rs-input-group-inside .rs-input-group-addon ~ .rs-auto-complete > input.rs-input,
8103
8113
  .rs-input-group.rs-input-group-inside .rs-input-group-addon ~ .rs-form-control-wrapper > input.rs-input,
8104
8114
  .rs-input-group.rs-input-group-inside .rs-input-group-btn ~ .rs-form-control-wrapper > input.rs-input {
8105
- padding-right: 36px;
8115
+ padding-right: 0;
8106
8116
  padding-left: 12px;
8107
8117
  }
8108
8118
  .rs-input-group.rs-input-group-inside input.rs-input ~ .rs-input-group-btn,
@@ -12882,6 +12892,8 @@ textarea.rs-picker-menu .rs-picker-search-bar .rs-picker-search-bar-input {
12882
12892
  top: 8px;
12883
12893
  left: 12px;
12884
12894
  padding: 3px;
12895
+ color: #8e8e93;
12896
+ color: var(--rs-text-secondary);
12885
12897
  }
12886
12898
  .rs-picker-select-menu-items .rs-picker-menu-group.folded .rs-picker-menu-group-caret {
12887
12899
  -webkit-transform: rotate(-90deg);