rsuite 5.4.2 → 5.4.3
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/Button/styles/index.less +1 -5
- package/CHANGELOG.md +7 -0
- package/Drawer/styles/index.less +3 -0
- package/Dropdown/styles/index.less +1 -0
- package/Dropdown/styles/mixin.less +0 -2
- package/Navbar/styles/index.less +8 -3
- package/Sidenav/styles/index.less +6 -0
- package/cjs/CheckPicker/CheckPicker.d.ts +5 -2
- package/cjs/CheckPicker/test/CheckPicker.test.js +8 -0
- package/cjs/SelectPicker/SelectPicker.d.ts +5 -2
- package/cjs/SelectPicker/test/SelectPicker.test.js +8 -0
- package/dist/rsuite-rtl.css +297 -138
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +297 -138
- package/dist/rsuite.js +4 -4
- package/dist/rsuite.min.css +1 -1
- package/dist/rsuite.min.css.map +1 -1
- package/dist/rsuite.min.js +1 -1
- package/dist/rsuite.min.js.map +1 -1
- package/esm/CheckPicker/CheckPicker.d.ts +5 -2
- package/esm/CheckPicker/test/CheckPicker.test.js +7 -0
- package/esm/SelectPicker/SelectPicker.d.ts +5 -2
- package/esm/SelectPicker/test/SelectPicker.test.js +7 -0
- package/package.json +2 -2
- package/styles/color-modes/dark.less +1 -0
- package/styles/color-modes/high-contrast.less +1 -0
- package/styles/color-modes/light.less +1 -0
- package/styles/mixins/utilities.less +17 -5
package/Button/styles/index.less
CHANGED
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
text-align: center;
|
|
15
15
|
vertical-align: middle;
|
|
16
16
|
cursor: pointer;
|
|
17
|
-
outline: 0 !important;
|
|
18
17
|
white-space: nowrap;
|
|
19
18
|
transition: @btn-transition;
|
|
20
19
|
// Reset border style in all browser
|
|
@@ -31,10 +30,7 @@
|
|
|
31
30
|
|
|
32
31
|
.rs-btn-md();
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
outline: 0;
|
|
36
|
-
box-shadow: var(--rs-state-focus-shadow);
|
|
37
|
-
}
|
|
33
|
+
.with-focus-ring();
|
|
38
34
|
|
|
39
35
|
.button-activated({
|
|
40
36
|
color: var(--rs-btn-default-hover-text);
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [5.4.3](https://github.com/rsuite/rsuite/compare/v5.4.2...v5.4.3) (2021-12-30)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **Drawer:** fix Drawer cannot be closed when backdrop is clicked ([#2259](https://github.com/rsuite/rsuite/issues/2259)) ([a49ee03](https://github.com/rsuite/rsuite/commit/a49ee03db33c11db30597221ca61ce6daa088c4b))
|
|
6
|
+
- **Picker:** add ref to PickerComponentProps ([#2261](https://github.com/rsuite/rsuite/issues/2261)) ([6e3e6c5](https://github.com/rsuite/rsuite/commit/6e3e6c57932af142dc1a74da6b7fffb57ae628ca))
|
|
7
|
+
|
|
1
8
|
## [5.4.2](https://github.com/rsuite/rsuite/compare/v5.4.1...v5.4.2) (2021-12-24)
|
|
2
9
|
|
|
3
10
|
### Bug Fixes
|
package/Drawer/styles/index.less
CHANGED
package/Navbar/styles/index.less
CHANGED
|
@@ -73,8 +73,6 @@
|
|
|
73
73
|
.rs-navbar-brand,
|
|
74
74
|
.rs-navbar-item,
|
|
75
75
|
.rs-navbar-nav > .rs-dropdown-item {
|
|
76
|
-
outline: 0;
|
|
77
|
-
|
|
78
76
|
&,
|
|
79
77
|
&:hover,
|
|
80
78
|
&:focus,
|
|
@@ -83,7 +81,9 @@
|
|
|
83
81
|
}
|
|
84
82
|
|
|
85
83
|
&:focus-visible {
|
|
86
|
-
|
|
84
|
+
// Navbar is usually placed by the top edge of the page
|
|
85
|
+
// thus use an inset focus ring to prevent overflow clipping
|
|
86
|
+
.focus-ring(inset);
|
|
87
87
|
|
|
88
88
|
.high-contrast-mode({
|
|
89
89
|
.focus-ring(slim-inset);
|
|
@@ -108,6 +108,11 @@
|
|
|
108
108
|
.rs-navbar-nav > .rs-dropdown .rs-dropdown-toggle {
|
|
109
109
|
&:extend(.rs-navbar-item);
|
|
110
110
|
|
|
111
|
+
&:focus,
|
|
112
|
+
&:focus-visible {
|
|
113
|
+
&:extend(.rs-navbar-item:focus-visible);
|
|
114
|
+
}
|
|
115
|
+
|
|
111
116
|
padding-right: @navbar-item-padding-x+ @dropdown-caret-width+ @dropdown-caret-padding;
|
|
112
117
|
|
|
113
118
|
.high-contrast-mode({
|
|
@@ -110,6 +110,12 @@
|
|
|
110
110
|
width: 100%;
|
|
111
111
|
white-space: normal;
|
|
112
112
|
|
|
113
|
+
// Sidenav is usually placed by the left/right edge of the page
|
|
114
|
+
// thus use an inset focus ring to prevent overflow clipping
|
|
115
|
+
&:focus {
|
|
116
|
+
.focus-ring(inset);
|
|
117
|
+
}
|
|
118
|
+
|
|
113
119
|
> .rs-icon:not(.rs-dropdown-toggle-caret) {
|
|
114
120
|
font-size: @sidenav-level1-item-font-size;
|
|
115
121
|
margin-right: @sidenav-icon-spacing;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { Ref } from 'react';
|
|
2
2
|
import { PickerLocale } from '../locales';
|
|
3
|
+
import { PickerInstance } from '../Picker';
|
|
3
4
|
import { ItemDataType, FormControlPickerProps } from '../@types/common';
|
|
4
5
|
import type { MultipleSelectProps } from '../SelectPicker';
|
|
5
6
|
export declare type ValueType = (number | string)[];
|
|
@@ -10,7 +11,9 @@ export interface CheckPickerProps<T> extends FormControlPickerProps<T[], PickerL
|
|
|
10
11
|
countable?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export interface CheckPickerComponent {
|
|
13
|
-
<T>(props: CheckPickerProps<T>
|
|
14
|
+
<T>(props: CheckPickerProps<T> & {
|
|
15
|
+
ref?: Ref<PickerInstance>;
|
|
16
|
+
}): JSX.Element | null;
|
|
14
17
|
displayName?: string;
|
|
15
18
|
propTypes?: React.WeakValidationMap<CheckPickerProps<any>>;
|
|
16
19
|
}
|
|
@@ -73,4 +73,12 @@ _react.default.createElement(_CheckPicker.default, {
|
|
|
73
73
|
onChange: function onChange(newValue) {
|
|
74
74
|
(0, _tsExpect.expectType)(newValue);
|
|
75
75
|
}
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
var pickerRef = /*#__PURE__*/_react.default.createRef();
|
|
79
|
+
|
|
80
|
+
/*#__PURE__*/
|
|
81
|
+
_react.default.createElement(_CheckPicker.default, {
|
|
82
|
+
ref: pickerRef,
|
|
83
|
+
data: []
|
|
76
84
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { Ref } from 'react';
|
|
2
2
|
import { PickerLocale } from '../locales';
|
|
3
|
+
import { PickerInstance } from '../Picker';
|
|
3
4
|
import { FormControlPickerProps, ItemDataType } from '../@types/common';
|
|
4
5
|
import { ListProps } from 'react-virtualized/dist/commonjs/List';
|
|
5
6
|
export interface SelectProps<T> {
|
|
@@ -42,7 +43,9 @@ export interface MultipleSelectProps<T> extends Omit<SelectProps<T>, 'renderValu
|
|
|
42
43
|
export interface SelectPickerProps<T> extends FormControlPickerProps<T, PickerLocale, ItemDataType<T>>, SelectProps<T> {
|
|
43
44
|
}
|
|
44
45
|
export interface SelectPickerComponent {
|
|
45
|
-
<T>(props: SelectPickerProps<T>
|
|
46
|
+
<T>(props: SelectPickerProps<T> & {
|
|
47
|
+
ref?: Ref<PickerInstance>;
|
|
48
|
+
}): JSX.Element | null;
|
|
46
49
|
displayName?: string;
|
|
47
50
|
propTypes?: React.WeakValidationMap<SelectPickerProps<any>>;
|
|
48
51
|
}
|
|
@@ -59,4 +59,12 @@ _react.default.createElement(_SelectPicker.default, {
|
|
|
59
59
|
onChange: function onChange(newValue) {
|
|
60
60
|
(0, _tsExpect.expectType)(newValue);
|
|
61
61
|
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
var pickerRef = /*#__PURE__*/_react.default.createRef();
|
|
65
|
+
|
|
66
|
+
/*#__PURE__*/
|
|
67
|
+
_react.default.createElement(_SelectPicker.default, {
|
|
68
|
+
ref: pickerRef,
|
|
69
|
+
data: []
|
|
62
70
|
});
|