rsuite 5.16.0 → 5.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [5.16.1](https://github.com/rsuite/rsuite/compare/v5.16.0...v5.16.1) (2022-07-15)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **InputNumber:** fix unexpected focus ring when used within an InputGroup ([#2585](https://github.com/rsuite/rsuite/issues/2585)) ([6f76b57](https://github.com/rsuite/rsuite/commit/6f76b5752bca2e11639d7fe34dd927dd84c98f73))
6
+ - **SelectPicker,CheckPicker:** add missing label prop declaration ([#2586](https://github.com/rsuite/rsuite/issues/2586)) ([e1a8cfe](https://github.com/rsuite/rsuite/commit/e1a8cfe32223ec210ac9a5ff793b973d4bcac131))
7
+
1
8
  # [5.16.0](https://github.com/rsuite/rsuite/compare/v5.15.2...v5.16.0) (2022-07-07)
2
9
 
3
10
  ### Features
@@ -27,7 +27,7 @@
27
27
  }
28
28
 
29
29
  &:focus {
30
- box-shadow: var(--rs-state-focus-shadow);
30
+ .focus-ring();
31
31
  }
32
32
 
33
33
  &:disabled {
@@ -30,7 +30,11 @@
30
30
 
31
31
  &:not(.rs-input-group-disabled).rs-input-group-focus,
32
32
  &:focus-within {
33
- box-shadow: var(--rs-state-focus-shadow);
33
+ .focus-ring();
34
+ }
35
+
36
+ & & {
37
+ outline: none !important;
34
38
  }
35
39
 
36
40
  .rs-input-number,
@@ -39,7 +43,7 @@
39
43
  .rs-picker-date .rs-picker-toggle {
40
44
  border: none;
41
45
  border-radius: 0;
42
- box-shadow: none;
46
+ outline: none;
43
47
  }
44
48
 
45
49
  // Reset border
@@ -47,7 +51,7 @@
47
51
  .rs-input {
48
52
  border: none;
49
53
  border-radius: 0;
50
- box-shadow: none;
54
+ outline: none;
51
55
  }
52
56
 
53
57
  .rs-input-number:not(:last-child) .rs-input-number {
@@ -144,7 +148,7 @@
144
148
  .reset-inside-input-group-btn-size(base);
145
149
 
146
150
  &:focus {
147
- box-shadow: none;
151
+ outline: none;
148
152
  }
149
153
 
150
154
  // reset border radius
@@ -1,10 +1,10 @@
1
1
  import React, { Ref } from 'react';
2
2
  import { PickerLocale } from '../locales';
3
- import { PickerInstance } from '../Picker';
3
+ import { PickerInstance, PickerToggleProps } from '../Picker';
4
4
  import { ItemDataType, FormControlPickerProps } from '../@types/common';
5
5
  import type { MultipleSelectProps } from '../SelectPicker';
6
6
  export declare type ValueType = (number | string)[];
7
- export interface CheckPickerProps<T> extends FormControlPickerProps<T[], PickerLocale, ItemDataType<T>>, MultipleSelectProps<T> {
7
+ export interface CheckPickerProps<T> extends FormControlPickerProps<T[], PickerLocale, ItemDataType<T>>, MultipleSelectProps<T>, Pick<PickerToggleProps, 'label'> {
8
8
  /** Top the selected option in the options */
9
9
  sticky?: boolean;
10
10
  /** A picker that can be counted */
@@ -81,4 +81,11 @@ var pickerRef = /*#__PURE__*/_react.default.createRef();
81
81
  _react.default.createElement(_CheckPicker.default, {
82
82
  ref: pickerRef,
83
83
  data: []
84
+ }); // With a label
85
+
86
+
87
+ /*#__PURE__*/
88
+ _react.default.createElement(_CheckPicker.default, {
89
+ label: "User",
90
+ data: []
84
91
  });
@@ -1,6 +1,6 @@
1
1
  import React, { Ref } from 'react';
2
2
  import { PickerLocale } from '../locales';
3
- import { PickerInstance } from '../Picker';
3
+ import { PickerInstance, PickerToggleProps } from '../Picker';
4
4
  import { FormControlPickerProps, ItemDataType } from '../@types/common';
5
5
  import { ListProps } from 'react-virtualized/dist/commonjs/List';
6
6
  export interface SelectProps<T> {
@@ -40,7 +40,7 @@ export interface MultipleSelectProps<T> extends Omit<SelectProps<T>, 'renderValu
40
40
  /** Custom render selected items */
41
41
  renderValue?: (value: T[], item: ItemDataType<T>[], selectedElement: React.ReactNode) => React.ReactNode;
42
42
  }
43
- export interface SelectPickerProps<T> extends FormControlPickerProps<T, PickerLocale, ItemDataType<T>>, SelectProps<T> {
43
+ export interface SelectPickerProps<T> extends FormControlPickerProps<T, PickerLocale, ItemDataType<T>>, SelectProps<T>, Pick<PickerToggleProps, 'label'> {
44
44
  }
45
45
  export interface SelectPickerComponent {
46
46
  <T>(props: SelectPickerProps<T> & {
@@ -67,4 +67,11 @@ var pickerRef = /*#__PURE__*/_react.default.createRef();
67
67
  _react.default.createElement(_SelectPicker.default, {
68
68
  ref: pickerRef,
69
69
  data: []
70
+ }); // With a label
71
+
72
+
73
+ /*#__PURE__*/
74
+ _react.default.createElement(_SelectPicker.default, {
75
+ label: "User",
76
+ data: []
70
77
  });
@@ -7875,10 +7875,11 @@ textarea.rs-input {
7875
7875
  outline: 0;
7876
7876
  }
7877
7877
  .rs-input:focus {
7878
- -webkit-box-shadow: 0 0 0 3px rgba(52, 152, 255, 0.25);
7879
- -webkit-box-shadow: var(--rs-state-focus-shadow);
7880
- box-shadow: 0 0 0 3px rgba(52, 152, 255, 0.25);
7881
- box-shadow: var(--rs-state-focus-shadow);
7878
+ outline: 3px solid rgba(52, 152, 255, 0.25);
7879
+ outline: 3px solid var(--rs-color-focus-ring);
7880
+ }
7881
+ .rs-theme-high-contrast .rs-input:focus {
7882
+ outline-offset: 2px;
7882
7883
  }
7883
7884
  .rs-input:disabled {
7884
7885
  background-color: #f7f7fa;
@@ -7962,10 +7963,15 @@ textarea.rs-input-sm {
7962
7963
  }
7963
7964
  .rs-input-group:not(.rs-input-group-disabled).rs-input-group-focus,
7964
7965
  .rs-input-group:focus-within {
7965
- -webkit-box-shadow: 0 0 0 3px rgba(52, 152, 255, 0.25);
7966
- -webkit-box-shadow: var(--rs-state-focus-shadow);
7967
- box-shadow: 0 0 0 3px rgba(52, 152, 255, 0.25);
7968
- box-shadow: var(--rs-state-focus-shadow);
7966
+ outline: 3px solid rgba(52, 152, 255, 0.25);
7967
+ outline: 3px solid var(--rs-color-focus-ring);
7968
+ }
7969
+ .rs-theme-high-contrast .rs-input-group:not(.rs-input-group-disabled).rs-input-group-focus,
7970
+ .rs-theme-high-contrast .rs-input-group:focus-within {
7971
+ outline-offset: 2px;
7972
+ }
7973
+ .rs-input-group .rs-input-group {
7974
+ outline: none !important;
7969
7975
  }
7970
7976
  .rs-input-group .rs-input-number,
7971
7977
  .rs-input-group .rs-input-group-addon,
@@ -7973,14 +7979,12 @@ textarea.rs-input-sm {
7973
7979
  .rs-input-group .rs-picker-date .rs-picker-toggle {
7974
7980
  border: none;
7975
7981
  border-radius: 0;
7976
- -webkit-box-shadow: none;
7977
- box-shadow: none;
7982
+ outline: none;
7978
7983
  }
7979
7984
  .rs-input-group:not(.rs-input-group-inside) .rs-input {
7980
7985
  border: none;
7981
7986
  border-radius: 0;
7982
- -webkit-box-shadow: none;
7983
- box-shadow: none;
7987
+ outline: none;
7984
7988
  }
7985
7989
  .rs-input-group:not(.rs-input-group-inside) .rs-input-number:not(:last-child) .rs-input-number-btn-group-vertical {
7986
7990
  border-radius: 0;
@@ -8094,8 +8098,7 @@ textarea.rs-input-sm {
8094
8098
  line-height: 1.42857143;
8095
8099
  }
8096
8100
  .rs-input-group.rs-input-group-inside .rs-input-group-btn:focus {
8097
- -webkit-box-shadow: none;
8098
- box-shadow: none;
8101
+ outline: none;
8099
8102
  }
8100
8103
  .rs-input-group.rs-input-group-inside .rs-input-group-btn:first-child {
8101
8104
  border-bottom-right-radius: 6px;
@@ -11729,10 +11732,11 @@ textarea.rs-picker-menu .rs-picker-search-bar .rs-picker-search-bar-input {
11729
11732
  outline: 0;
11730
11733
  }
11731
11734
  .rs-picker-menu .rs-picker-search-bar .rs-picker-search-bar-input:focus {
11732
- -webkit-box-shadow: 0 0 0 3px rgba(52, 152, 255, 0.25);
11733
- -webkit-box-shadow: var(--rs-state-focus-shadow);
11734
- box-shadow: 0 0 0 3px rgba(52, 152, 255, 0.25);
11735
- box-shadow: var(--rs-state-focus-shadow);
11735
+ outline: 3px solid rgba(52, 152, 255, 0.25);
11736
+ outline: 3px solid var(--rs-color-focus-ring);
11737
+ }
11738
+ .rs-theme-high-contrast .rs-picker-menu .rs-picker-search-bar .rs-picker-search-bar-input:focus {
11739
+ outline-offset: 2px;
11736
11740
  }
11737
11741
  .rs-picker-menu .rs-picker-search-bar .rs-picker-search-bar-input:disabled {
11738
11742
  background-color: #f7f7fa;