rsuite 5.0.0-beta.5 → 5.0.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.
- package/Animation/styles/index.less +16 -16
- package/Animation/styles/mixin.less +2 -2
- package/Button/styles/index.less +36 -1
- package/Button/styles/mixin.less +7 -1
- package/CHANGELOG.md +47 -4
- package/Calendar/styles/index.less +7 -1
- package/Checkbox/styles/index.less +18 -2
- package/DatePicker/styles/index.less +6 -2
- package/Drawer/styles/index.less +11 -2
- package/Drawer/styles/mixin.less +2 -2
- package/Dropdown/styles/index.less +4 -0
- package/Form/styles/mixin.less +6 -0
- package/InputGroup/styles/index.less +4 -0
- package/Message/styles/index.less +16 -0
- package/Modal/styles/index.less +3 -2
- package/Nav/styles/index.less +18 -2
- package/Navbar/styles/index.less +68 -34
- package/Notification/styles/index.less +9 -3
- package/Pagination/styles/index.less +12 -1
- package/Pagination/styles/mixin.less +7 -0
- package/Picker/styles/index.less +25 -3
- package/Picker/styles/mixin.less +7 -2
- package/Popover/styles/index.less +23 -30
- package/Popover/styles/mixins.less +72 -0
- package/README.md +4 -4
- package/Radio/styles/index.less +16 -0
- package/RadioGroup/styles/index.less +4 -0
- package/Rate/styles/index.less +13 -2
- package/Ripple/styles/index.less +8 -4
- package/Sidenav/styles/index.less +160 -47
- package/Table/styles/index.less +8 -0
- package/TagInput/package.json +7 -0
- package/TagInput/styles/index.less +13 -0
- package/Toggle/styles/index.less +29 -19
- package/Tooltip/styles/index.less +32 -38
- package/Tooltip/styles/mixins.less +72 -0
- package/Uploader/styles/index.less +11 -1
- package/cjs/@types/common.d.ts +2 -0
- package/cjs/Animation/Bounce.js +10 -4
- package/cjs/Animation/Collapse.d.ts +1 -48
- package/cjs/Animation/Collapse.js +60 -106
- package/cjs/Animation/Fade.js +10 -5
- package/cjs/Animation/Slide.js +8 -4
- package/cjs/Carousel/Carousel.d.ts +7 -0
- package/cjs/Carousel/Carousel.js +24 -11
- package/cjs/CheckTree/index.js +14 -5
- package/cjs/CheckTreePicker/CheckTreePicker.js +9 -5
- package/cjs/DatePicker/DatePicker.d.ts +5 -1
- package/cjs/DatePicker/DatePicker.js +2 -13
- package/cjs/DateRangePicker/Calendar.d.ts +2 -1
- package/cjs/DateRangePicker/Calendar.js +4 -3
- package/cjs/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/cjs/DateRangePicker/DateRangePicker.js +58 -43
- package/cjs/DateRangePicker/utils.d.ts +1 -1
- package/cjs/DateRangePicker/utils.js +9 -5
- package/cjs/Dropdown/Dropdown.js +31 -18
- package/cjs/Dropdown/DropdownContext.d.ts +4 -1
- package/cjs/Dropdown/DropdownItem.js +31 -4
- package/cjs/Dropdown/DropdownState.d.ts +37 -0
- package/cjs/Dropdown/DropdownState.js +66 -0
- package/cjs/Dropdown/DropdownToggle.js +3 -6
- package/cjs/InputNumber/InputNumber.js +11 -10
- package/cjs/InputPicker/InputPicker.d.ts +16 -3
- package/cjs/InputPicker/InputPicker.js +85 -44
- package/cjs/List/ListItem.d.ts +1 -1
- package/cjs/Menu/MenuItem.js +1 -1
- package/cjs/MultiCascader/MultiCascader.js +4 -3
- package/cjs/Nav/NavItem.js +11 -63
- package/cjs/Navbar/NavbarItem.d.ts +19 -0
- package/cjs/Navbar/NavbarItem.js +93 -0
- package/cjs/Pagination/Pagination.js +1 -1
- package/cjs/Picker/PickerToggle.js +2 -2
- package/cjs/Picker/utils.d.ts +1 -1
- package/cjs/Picker/utils.js +26 -22
- package/cjs/Progress/ProgressCircle.js +15 -15
- package/cjs/SelectPicker/SelectPicker.d.ts +1 -3
- package/cjs/Sidenav/SidenavDropdown.js +6 -1
- package/cjs/Sidenav/SidenavItem.js +46 -12
- package/cjs/Slider/Slider.js +2 -1
- package/cjs/TagInput/index.d.ts +13 -0
- package/cjs/TagInput/index.js +58 -0
- package/cjs/TagPicker/index.d.ts +10 -2
- package/cjs/TagPicker/index.js +25 -6
- package/cjs/Tree/Tree.d.ts +0 -2
- package/cjs/Tree/Tree.js +13 -4
- package/cjs/Tree/TreeContext.d.ts +7 -0
- package/cjs/Tree/TreeContext.js +13 -0
- package/cjs/TreePicker/TreeNode.js +10 -3
- package/cjs/TreePicker/TreePicker.js +22 -10
- package/cjs/Uploader/UploadFileItem.d.ts +5 -0
- package/cjs/Uploader/UploadFileItem.js +4 -3
- package/cjs/Uploader/Uploader.d.ts +8 -3
- package/cjs/Uploader/Uploader.js +12 -6
- package/cjs/index.d.ts +2 -0
- package/cjs/index.js +5 -1
- package/cjs/utils/ajaxUpload.d.ts +5 -1
- package/cjs/utils/ajaxUpload.js +24 -13
- package/cjs/utils/constants.d.ts +1 -0
- package/cjs/utils/constants.js +1 -0
- package/cjs/utils/dateUtils.d.ts +1 -0
- package/cjs/utils/dateUtils.js +5 -1
- package/cjs/utils/useInternalId.d.ts +4 -0
- package/cjs/utils/useInternalId.js +24 -0
- package/cjs/utils/useUniqueId.d.ts +1 -1
- package/cjs/utils/useUniqueId.js +1 -1
- package/dist/rsuite-rtl.css +1614 -221
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +1618 -221
- package/dist/rsuite.js +288 -288
- 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/@types/common.d.ts +2 -0
- package/esm/Animation/Bounce.js +8 -4
- package/esm/Animation/Collapse.d.ts +1 -48
- package/esm/Animation/Collapse.js +59 -104
- package/esm/Animation/Fade.js +8 -4
- package/esm/Animation/Slide.js +6 -3
- package/esm/Carousel/Carousel.d.ts +7 -0
- package/esm/Carousel/Carousel.js +25 -12
- package/esm/CheckTree/index.js +11 -5
- package/esm/CheckTreePicker/CheckTreePicker.js +8 -6
- package/esm/DatePicker/DatePicker.d.ts +5 -1
- package/esm/DatePicker/DatePicker.js +2 -13
- package/esm/DateRangePicker/Calendar.d.ts +2 -1
- package/esm/DateRangePicker/Calendar.js +4 -3
- package/esm/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/esm/DateRangePicker/DateRangePicker.js +27 -12
- package/esm/DateRangePicker/utils.d.ts +1 -1
- package/esm/DateRangePicker/utils.js +7 -3
- package/esm/Dropdown/Dropdown.js +30 -19
- package/esm/Dropdown/DropdownContext.d.ts +4 -1
- package/esm/Dropdown/DropdownItem.js +30 -6
- package/esm/Dropdown/DropdownState.d.ts +37 -0
- package/esm/Dropdown/DropdownState.js +55 -0
- package/esm/Dropdown/DropdownToggle.js +3 -6
- package/esm/InputNumber/InputNumber.js +11 -10
- package/esm/InputPicker/InputPicker.d.ts +16 -3
- package/esm/InputPicker/InputPicker.js +84 -45
- package/esm/List/ListItem.d.ts +1 -1
- package/esm/Menu/MenuItem.js +1 -1
- package/esm/MultiCascader/MultiCascader.js +4 -3
- package/esm/Nav/NavItem.js +12 -61
- package/esm/Navbar/NavbarItem.d.ts +19 -0
- package/esm/Navbar/NavbarItem.js +73 -0
- package/esm/Pagination/Pagination.js +1 -1
- package/esm/Picker/PickerToggle.js +2 -2
- package/esm/Picker/utils.d.ts +1 -1
- package/esm/Picker/utils.js +26 -22
- package/esm/Progress/ProgressCircle.js +15 -15
- package/esm/SelectPicker/SelectPicker.d.ts +1 -3
- package/esm/Sidenav/SidenavDropdown.js +5 -1
- package/esm/Sidenav/SidenavItem.js +47 -13
- package/esm/Slider/Slider.js +2 -1
- package/esm/TagInput/index.d.ts +13 -0
- package/esm/TagInput/index.js +44 -0
- package/esm/TagPicker/index.d.ts +10 -2
- package/esm/TagPicker/index.js +23 -6
- package/esm/Tree/Tree.d.ts +0 -2
- package/esm/Tree/Tree.js +10 -4
- package/esm/Tree/TreeContext.d.ts +7 -0
- package/esm/Tree/TreeContext.js +3 -0
- package/esm/TreePicker/TreeNode.js +10 -4
- package/esm/TreePicker/TreePicker.js +23 -12
- package/esm/Uploader/UploadFileItem.d.ts +5 -0
- package/esm/Uploader/UploadFileItem.js +2 -3
- package/esm/Uploader/Uploader.d.ts +8 -3
- package/esm/Uploader/Uploader.js +12 -6
- package/esm/index.d.ts +2 -0
- package/esm/index.js +1 -0
- package/esm/utils/ajaxUpload.d.ts +5 -1
- package/esm/utils/ajaxUpload.js +24 -13
- package/esm/utils/constants.d.ts +1 -0
- package/esm/utils/constants.js +1 -0
- package/esm/utils/dateUtils.d.ts +1 -0
- package/esm/utils/dateUtils.js +1 -0
- package/esm/utils/useInternalId.d.ts +4 -0
- package/esm/utils/useInternalId.js +16 -0
- package/esm/utils/useUniqueId.d.ts +1 -1
- package/esm/utils/useUniqueId.js +1 -1
- package/package.json +4 -9
- package/styles/color-modes/dark.less +28 -5
- package/styles/color-modes/high-contrast.less +317 -0
- package/styles/color-modes/light.less +24 -1
- package/styles/color-modes.less +5 -0
- package/styles/colors/high-contrast.less +105 -0
- package/styles/index.less +1 -0
- package/styles/mixins/color-modes.less +6 -0
- package/styles/mixins/listbox.less +13 -1
- package/styles/mixins/menu.less +7 -0
- package/styles/mixins/utilities.less +9 -1
- package/styles/variables.less +11 -0
package/Navbar/styles/index.less
CHANGED
|
@@ -33,65 +33,95 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
&:focus {
|
|
36
|
-
.rs-
|
|
37
|
-
.rs-
|
|
36
|
+
.rs-navbar-item:focus-visible,
|
|
37
|
+
.rs-navbar-item.rs-navbar-item-focus,
|
|
38
38
|
.rs-dropdown .rs-dropdown-toggle:focus-visible,
|
|
39
39
|
.rs-dropdown.rs-dropdown-focus .rs-dropdown-toggle {
|
|
40
|
+
z-index: 1;
|
|
41
|
+
|
|
40
42
|
.focus-ring();
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
.high-contrast-mode({
|
|
45
|
+
.focus-ring(slim-inset);
|
|
46
|
+
});
|
|
43
47
|
}
|
|
44
48
|
}
|
|
49
|
+
}
|
|
45
50
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
// Nav item content
|
|
52
|
+
.rs-navbar-item {
|
|
53
|
+
// Reset padding
|
|
54
|
+
padding: @navbar-item-padding-y @navbar-item-padding-x;
|
|
55
|
+
height: @navbar-height;
|
|
56
|
+
border-radius: 0;
|
|
57
|
+
color: inherit;
|
|
58
|
+
float: left;
|
|
59
|
+
background-color: transparent;
|
|
60
|
+
position: relative;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
}
|
|
54
63
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
64
|
+
// Focus style
|
|
65
|
+
.rs-navbar-brand,
|
|
66
|
+
.rs-navbar-item,
|
|
67
|
+
.rs-navbar-nav > .rs-dropdown-item {
|
|
68
|
+
outline: 0;
|
|
59
69
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
70
|
+
&:focus-visible {
|
|
71
|
+
.focus-ring();
|
|
72
|
+
|
|
73
|
+
.high-contrast-mode({
|
|
74
|
+
.focus-ring(slim-inset);
|
|
75
|
+
});
|
|
63
76
|
|
|
64
|
-
|
|
65
|
-
> .rs-dropdown {
|
|
66
|
-
margin: 0 !important;
|
|
77
|
+
z-index: 2;
|
|
67
78
|
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.rs-navbar-item,
|
|
82
|
+
.rs-navbar-nav > .rs-dropdown {
|
|
83
|
+
margin: 0 !important;
|
|
84
|
+
}
|
|
68
85
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
86
|
+
// DropDown
|
|
87
|
+
.rs-navbar-nav > .rs-dropdown .rs-dropdown-toggle {
|
|
88
|
+
&:extend(.rs-navbar-item);
|
|
72
89
|
|
|
73
|
-
|
|
90
|
+
padding-right: @navbar-item-padding-x+ @dropdown-caret-width+ @dropdown-caret-padding;
|
|
74
91
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
92
|
+
.high-contrast-mode({
|
|
93
|
+
border: none;
|
|
94
|
+
|
|
95
|
+
&:focus-visible {
|
|
96
|
+
.focus-ring(slim-inset);
|
|
78
97
|
}
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
.rs-dropdown-toggle-caret {
|
|
101
|
+
top: @navbar-item-padding-y;
|
|
102
|
+
right: @navbar-item-padding-x;
|
|
79
103
|
}
|
|
80
104
|
}
|
|
81
105
|
|
|
106
|
+
.rs-navbar-item.rs-navbar-item-active {
|
|
107
|
+
.high-contrast-mode({
|
|
108
|
+
text-decoration: underline;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
82
112
|
// Default Navbar
|
|
83
113
|
.rs-navbar-default {
|
|
84
114
|
background-color: var(--rs-navbar-default-bg);
|
|
85
115
|
color: var(--rs-navbar-default-text);
|
|
86
116
|
|
|
87
|
-
.rs-
|
|
117
|
+
.rs-navbar-item:hover,
|
|
88
118
|
.rs-dropdown .rs-dropdown-toggle:hover,
|
|
89
119
|
.rs-dropdown.rs-dropdown-open .rs-dropdown-toggle {
|
|
90
120
|
background-color: var(--rs-navbar-default-hover-bg);
|
|
91
121
|
color: var(--rs-navbar-default-hover-text);
|
|
92
122
|
}
|
|
93
123
|
|
|
94
|
-
.rs-
|
|
124
|
+
.rs-navbar-item.rs-navbar-item-active,
|
|
95
125
|
.rs-dropdown .rs-dropdown-menu-active ~ .rs-dropdown-toggle {
|
|
96
126
|
color: var(--rs-navbar-default-selected-text);
|
|
97
127
|
}
|
|
@@ -102,7 +132,7 @@
|
|
|
102
132
|
background-color: var(--rs-navbar-inverse-bg);
|
|
103
133
|
color: var(--rs-navbar-inverse-text);
|
|
104
134
|
|
|
105
|
-
.rs-
|
|
135
|
+
.rs-navbar-item,
|
|
106
136
|
.rs-dropdown .rs-dropdown-toggle {
|
|
107
137
|
&:hover,
|
|
108
138
|
&:focus {
|
|
@@ -111,9 +141,13 @@
|
|
|
111
141
|
}
|
|
112
142
|
|
|
113
143
|
// Active
|
|
114
|
-
.rs-
|
|
144
|
+
.rs-navbar-item.rs-navbar-item-active,
|
|
115
145
|
.rs-dropdown .rs-dropdown-menu-active ~ .rs-dropdown-toggle {
|
|
116
146
|
background-color: var(--rs-navbar-inverse-selected-bg);
|
|
147
|
+
|
|
148
|
+
.high-contrast-mode({
|
|
149
|
+
color: var(--rs-navbar-inverse-selected-text);
|
|
150
|
+
});
|
|
117
151
|
}
|
|
118
152
|
}
|
|
119
153
|
|
|
@@ -122,7 +156,7 @@
|
|
|
122
156
|
background-color: transparent;
|
|
123
157
|
color: var(--rs-navbar-subtle-text);
|
|
124
158
|
|
|
125
|
-
.rs-
|
|
159
|
+
.rs-navbar-item,
|
|
126
160
|
.rs-dropdown .rs-dropdown-toggle {
|
|
127
161
|
&:hover,
|
|
128
162
|
&:focus {
|
|
@@ -132,7 +166,7 @@
|
|
|
132
166
|
}
|
|
133
167
|
|
|
134
168
|
// Active
|
|
135
|
-
.rs-
|
|
169
|
+
.rs-navbar-item.rs-navbar-item-active,
|
|
136
170
|
.rs-dropdown .rs-dropdown-menu-active ~ .rs-dropdown-toggle {
|
|
137
171
|
color: var(--rs-navbar-subtle-selected-text);
|
|
138
172
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@import '../../styles/common';
|
|
1
2
|
@import '../../toaster/styles/animation';
|
|
2
3
|
@import 'mixin';
|
|
3
4
|
|
|
@@ -14,6 +15,10 @@
|
|
|
14
15
|
display: inline-block;
|
|
15
16
|
flex: 0 0 auto;
|
|
16
17
|
animation-fill-mode: forwards;
|
|
18
|
+
border-radius: @notify-border-radius;
|
|
19
|
+
background: var(--rs-bg-overlay);
|
|
20
|
+
box-shadow: @notify-box-shadow;
|
|
21
|
+
overflow: hidden;
|
|
17
22
|
|
|
18
23
|
// Multiple notification should have spacing
|
|
19
24
|
// Hiding notification haven't spacing.
|
|
@@ -21,12 +26,13 @@
|
|
|
21
26
|
margin-top: 10px;
|
|
22
27
|
}
|
|
23
28
|
|
|
29
|
+
.high-contrast-mode({
|
|
30
|
+
border: 1px solid var(--rs-border-primary);
|
|
31
|
+
});
|
|
32
|
+
|
|
24
33
|
// Notification content
|
|
25
34
|
&-content {
|
|
26
|
-
background: var(--rs-bg-overlay);
|
|
27
|
-
box-shadow: @notify-box-shadow;
|
|
28
35
|
padding: @notify-padding;
|
|
29
|
-
border-radius: @notify-border-radius;
|
|
30
36
|
max-width: @notify-max-width;
|
|
31
37
|
}
|
|
32
38
|
|
|
@@ -86,7 +86,18 @@
|
|
|
86
86
|
height: @line-height-computed;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
.high-contrast-mode({
|
|
90
|
+
transition: none;
|
|
91
|
+
color: var(--rs-pagination-item-text);
|
|
92
|
+
|
|
93
|
+
&:hover,
|
|
94
|
+
&:focus-visible {
|
|
95
|
+
color: var(--rs-pagination-item-current-text);
|
|
96
|
+
text-decoration: underline;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
&&-active {
|
|
90
101
|
.pagination-active();
|
|
91
102
|
}
|
|
92
103
|
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
@import '../../styles/mixins/color-modes';
|
|
2
|
+
|
|
1
3
|
.pagination-active() {
|
|
2
4
|
.rs-btn-ghost();
|
|
5
|
+
|
|
6
|
+
.high-contrast-mode({
|
|
7
|
+
color: var(--rs-pagination-item-current-text);
|
|
8
|
+
text-decoration: underline;
|
|
9
|
+
});
|
|
3
10
|
}
|
|
4
11
|
|
|
5
12
|
.pagination-active-size(@padding-vertical:@padding-y, @padding-horizontal:@padding-x) {
|
package/Picker/styles/index.less
CHANGED
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
|
|
61
61
|
&-value-count {
|
|
62
62
|
margin: 0 @picker-value-count-margin;
|
|
63
|
-
background-color: var(--rs-picker-count);
|
|
64
|
-
color:
|
|
63
|
+
background-color: var(--rs-picker-count-bg);
|
|
64
|
+
color: var(--rs-picker-count-text);
|
|
65
65
|
border-radius: @picker-value-count-border-radius;
|
|
66
66
|
padding: 0 @picker-value-count-padding;
|
|
67
67
|
line-height: @line-height-computed;
|
|
@@ -128,6 +128,10 @@
|
|
|
128
128
|
.rs-picker-toggle {
|
|
129
129
|
.rs-picker-default & {
|
|
130
130
|
transition: @picker-transition;
|
|
131
|
+
|
|
132
|
+
.high-contrast-mode({
|
|
133
|
+
transition: none;
|
|
134
|
+
});
|
|
131
135
|
}
|
|
132
136
|
|
|
133
137
|
.rs-picker-default:not(.rs-picker-disabled) & {
|
|
@@ -270,6 +274,10 @@
|
|
|
270
274
|
// Remove transition
|
|
271
275
|
transition: none;
|
|
272
276
|
|
|
277
|
+
.high-contrast-mode({
|
|
278
|
+
border: 1px solid var(--rs-border-primary);
|
|
279
|
+
});
|
|
280
|
+
|
|
273
281
|
// Increase z-index when modal opened.
|
|
274
282
|
.rs-modal-open & {
|
|
275
283
|
z-index: (@zindex-modal + @zindex-picker-toggle);
|
|
@@ -345,8 +353,14 @@
|
|
|
345
353
|
|
|
346
354
|
&:not(.rs-checkbox-disabled):hover,
|
|
347
355
|
&:focus,
|
|
348
|
-
|
|
356
|
+
&&-focus {
|
|
349
357
|
.listbox-option-active(true);
|
|
358
|
+
|
|
359
|
+
.high-contrast-mode({
|
|
360
|
+
.rs-check-tree-node-text-wrapper {
|
|
361
|
+
text-decoration: underline;
|
|
362
|
+
}
|
|
363
|
+
});
|
|
350
364
|
}
|
|
351
365
|
|
|
352
366
|
.rs-checkbox-checker {
|
|
@@ -361,8 +375,16 @@
|
|
|
361
375
|
transition: @picker-item-transition;
|
|
362
376
|
line-height: @line-height-computed;
|
|
363
377
|
|
|
378
|
+
.high-contrast-mode({
|
|
379
|
+
transition: none;
|
|
380
|
+
});
|
|
381
|
+
|
|
364
382
|
&::before {
|
|
365
383
|
background-color: var(--rs-bg-overlay);
|
|
384
|
+
|
|
385
|
+
.high-contrast-mode({
|
|
386
|
+
background: none;
|
|
387
|
+
});
|
|
366
388
|
}
|
|
367
389
|
|
|
368
390
|
/* stylelint-disable-next-line */ // This class name provide by Virtualized.
|
package/Picker/styles/mixin.less
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@import '../../styles/variables';
|
|
2
|
+
@import '../../styles/mixins/color-modes';
|
|
2
3
|
@import '../../Dropdown/styles/mixin';
|
|
3
4
|
|
|
4
5
|
// Picker Menu items common styles
|
|
@@ -100,9 +101,13 @@
|
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
.picker-calendar-cell-content-selected() {
|
|
103
|
-
color:
|
|
104
|
+
color: var(--rs-calendar-date-selected-text);
|
|
104
105
|
background-color: var(--rs-bg-active);
|
|
105
106
|
box-shadow: none;
|
|
107
|
+
|
|
108
|
+
.high-contrast-mode({
|
|
109
|
+
text-decoration: underline;
|
|
110
|
+
});
|
|
106
111
|
}
|
|
107
112
|
|
|
108
113
|
.picker-calendar-title-show() {
|
|
@@ -120,7 +125,7 @@
|
|
|
120
125
|
.rs-picker-cleanable & {
|
|
121
126
|
padding-right: (
|
|
122
127
|
@padding-horizontal + @dropdown-caret-width + @dropdown-caret-padding + @clean-btn-width +
|
|
123
|
-
|
|
128
|
+
@clean-btn-margin
|
|
124
129
|
);
|
|
125
130
|
}
|
|
126
131
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@import '../../styles/common';
|
|
2
|
+
@import 'mixins';
|
|
2
3
|
|
|
3
4
|
//
|
|
4
5
|
// Popovers
|
|
@@ -17,20 +18,25 @@
|
|
|
17
18
|
opacity: 0;
|
|
18
19
|
.drop-shadow(var(--rs-popover-shadow));
|
|
19
20
|
|
|
20
|
-
&.fade {
|
|
21
|
+
&.rs-anim-fade {
|
|
21
22
|
transition: opacity 0.1s linear, transform 0.1s ease-out;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
&.in {
|
|
25
|
+
&.rs-anim-in {
|
|
25
26
|
opacity: 1;
|
|
26
27
|
transition: opacity 0.15s linear, transform 0.15s ease-in;
|
|
27
28
|
}
|
|
28
29
|
|
|
30
|
+
.high-contrast-mode({
|
|
31
|
+
border: 1px solid var(--rs-border-primary);
|
|
32
|
+
});
|
|
33
|
+
|
|
29
34
|
// Arrow is outer, Arrow:after is inner
|
|
30
35
|
> .rs-popover-arrow {
|
|
31
36
|
border-width: @popover-arrow-outer-width;
|
|
32
37
|
|
|
33
38
|
&,
|
|
39
|
+
&::before,
|
|
34
40
|
&::after {
|
|
35
41
|
position: absolute;
|
|
36
42
|
display: block;
|
|
@@ -40,10 +46,21 @@
|
|
|
40
46
|
border-style: solid;
|
|
41
47
|
}
|
|
42
48
|
|
|
49
|
+
&::before,
|
|
43
50
|
&::after {
|
|
44
51
|
border-width: @popover-arrow-width;
|
|
45
52
|
content: '';
|
|
46
53
|
}
|
|
54
|
+
|
|
55
|
+
&::before {
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.high-contrast-mode({
|
|
60
|
+
&::before {
|
|
61
|
+
display: block;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
47
64
|
}
|
|
48
65
|
|
|
49
66
|
// Popover Title
|
|
@@ -71,15 +88,9 @@
|
|
|
71
88
|
|
|
72
89
|
> .rs-popover-arrow {
|
|
73
90
|
margin-left: -@popover-arrow-outer-width;
|
|
74
|
-
border-bottom-width: 0;
|
|
75
91
|
bottom: -@popover-arrow-outer-width;
|
|
76
92
|
|
|
77
|
-
|
|
78
|
-
bottom: 1px;
|
|
79
|
-
margin-left: -@popover-arrow-width;
|
|
80
|
-
border-bottom-width: 0;
|
|
81
|
-
border-top-color: var(--rs-bg-overlay);
|
|
82
|
-
}
|
|
93
|
+
.with-popover-arrow(bottom);
|
|
83
94
|
}
|
|
84
95
|
}
|
|
85
96
|
|
|
@@ -92,14 +103,8 @@
|
|
|
92
103
|
> .rs-popover-arrow {
|
|
93
104
|
left: -@popover-arrow-outer-width;
|
|
94
105
|
margin-top: -@popover-arrow-outer-width;
|
|
95
|
-
border-left-width: 0;
|
|
96
106
|
|
|
97
|
-
|
|
98
|
-
left: 1px;
|
|
99
|
-
bottom: -@popover-arrow-width;
|
|
100
|
-
border-left-width: 0;
|
|
101
|
-
border-right-color: var(--rs-bg-overlay);
|
|
102
|
-
}
|
|
107
|
+
.with-popover-arrow(left);
|
|
103
108
|
}
|
|
104
109
|
}
|
|
105
110
|
|
|
@@ -111,14 +116,8 @@
|
|
|
111
116
|
> .rs-popover-arrow {
|
|
112
117
|
right: -@popover-arrow-outer-width;
|
|
113
118
|
margin-top: -@popover-arrow-outer-width;
|
|
114
|
-
border-right-width: 0;
|
|
115
119
|
|
|
116
|
-
|
|
117
|
-
right: 1px;
|
|
118
|
-
border-right-width: 0;
|
|
119
|
-
border-left-color: var(--rs-bg-overlay);
|
|
120
|
-
bottom: -@popover-arrow-width;
|
|
121
|
-
}
|
|
120
|
+
.with-popover-arrow(right);
|
|
122
121
|
}
|
|
123
122
|
}
|
|
124
123
|
|
|
@@ -131,15 +130,9 @@
|
|
|
131
130
|
|
|
132
131
|
> .rs-popover-arrow {
|
|
133
132
|
margin-left: -@popover-arrow-outer-width;
|
|
134
|
-
border-top-width: 0;
|
|
135
133
|
top: -@popover-arrow-outer-width;
|
|
136
134
|
|
|
137
|
-
|
|
138
|
-
top: 1px;
|
|
139
|
-
margin-left: -@popover-arrow-width;
|
|
140
|
-
border-top-width: 0;
|
|
141
|
-
border-bottom-color: var(--rs-bg-overlay);
|
|
142
|
-
}
|
|
135
|
+
.with-popover-arrow(top);
|
|
143
136
|
}
|
|
144
137
|
}
|
|
145
138
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
@import '../../styles/variables';
|
|
2
|
+
@import '../../styles/mixins/hacks';
|
|
3
|
+
@import '../../styles/mixins/color-modes';
|
|
4
|
+
|
|
5
|
+
// Draw a triangle towards given direction
|
|
6
|
+
// .popover-arrow(@direction, @size, @color)
|
|
7
|
+
//
|
|
8
|
+
// @direction: top | right | bottom | left
|
|
9
|
+
// @size: Size (height) of the triangle
|
|
10
|
+
// @color: Filling color of the triangle
|
|
11
|
+
|
|
12
|
+
.popover-arrow(top, @size, @color) {
|
|
13
|
+
top: -@size;
|
|
14
|
+
// FIXED: The problem of the 1 pixel white border in Edge/IE11 browser .
|
|
15
|
+
.ie11-edge-direction(top, -(@size+1px));
|
|
16
|
+
|
|
17
|
+
margin-left: -@size;
|
|
18
|
+
border-width: 0 @size @size;
|
|
19
|
+
border-bottom-color: @color;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.popover-arrow(bottom, @size, @color) {
|
|
23
|
+
bottom: -@size;
|
|
24
|
+
// FIXED: The problem of the 1 pixel white border in Edge/IE11 browser .
|
|
25
|
+
.ie11-edge-direction(bottom, -(@size+1px));
|
|
26
|
+
|
|
27
|
+
margin-left: -@size;
|
|
28
|
+
border-width: @size @size 0;
|
|
29
|
+
border-top-color: @color;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* rtl:begin:ignore */
|
|
33
|
+
.popover-arrow(right, @size, @color) {
|
|
34
|
+
right: -@size;
|
|
35
|
+
// FIXED: The problem of the 1 pixel white border in Edge/IE11 browser .
|
|
36
|
+
.ie11-edge-direction(right, -(@size+1px));
|
|
37
|
+
|
|
38
|
+
margin-top: -@size;
|
|
39
|
+
border-width: @size 0 @size @size;
|
|
40
|
+
border-left-color: @color;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.popover-arrow(left, @size, @color) {
|
|
44
|
+
left: -@size;
|
|
45
|
+
// FIXED: The problem of the 1 pixel white border in Edge/IE11 browser .
|
|
46
|
+
.ie11-edge-direction(left, -(@size+1px));
|
|
47
|
+
|
|
48
|
+
margin-top: -@size;
|
|
49
|
+
border-width: @size @size @size 0;
|
|
50
|
+
border-right-color: @color;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* rtl:end:ignore */
|
|
54
|
+
|
|
55
|
+
// Append Popover's arrow to Popover
|
|
56
|
+
// @direction: The arrow's pointing direction. It's usually opposite of popover's placement
|
|
57
|
+
// e.g. popover[placement="top"] has an arrow[direction="bottom"]
|
|
58
|
+
// @size: The arrow's size (height)
|
|
59
|
+
// @bg: The arrow's background color, usually equal to popover's background
|
|
60
|
+
// @border: The arrow's border color, usually equal to popover's border (which only take effect
|
|
61
|
+
// in high-contrast theme)
|
|
62
|
+
.with-popover-arrow(@direction, @size: @popover-arrow-width, @bg: var(--rs-bg-overlay), @border: var(--rs-border-primary)) {
|
|
63
|
+
&::after {
|
|
64
|
+
.popover-arrow(@direction, @size, @bg);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.high-contrast-mode({
|
|
68
|
+
&::before {
|
|
69
|
+
.popover-arrow(@direction, @size + 1px, @border);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
package/README.md
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
<p align="center">
|
|
3
2
|
<a href="https://rsuitejs.com" target="_blank" rel="noopener noreferrer">
|
|
4
3
|
<img src="https://user-images.githubusercontent.com/1203827/65102389-7be3f100-d9fd-11e9-859e-ae9617ed2f91.png" alt="React Suite logo">
|
|
@@ -47,13 +46,13 @@ React Suite supports server side rendering. Support [Next.js](https://github.com
|
|
|
47
46
|
React Suite is available as an [npm package][npm-home].
|
|
48
47
|
|
|
49
48
|
```bash
|
|
50
|
-
npm i rsuite
|
|
49
|
+
npm i rsuite --save
|
|
51
50
|
```
|
|
52
51
|
|
|
53
52
|
or if you prefer Yarn
|
|
54
53
|
|
|
55
54
|
```bash
|
|
56
|
-
yarn add rsuite
|
|
55
|
+
yarn add rsuite
|
|
57
56
|
```
|
|
58
57
|
|
|
59
58
|
## Usage
|
|
@@ -79,8 +78,9 @@ You can go through [full documentation][rsuite-doc-guide] or start with followin
|
|
|
79
78
|
- [Right-to-left][rsuite-doc-guide-rtl]
|
|
80
79
|
- [Components][rsuite-components-overview]
|
|
81
80
|
|
|
82
|
-
**
|
|
81
|
+
**Historic version**
|
|
83
82
|
|
|
83
|
+
- [Version 4.\*](https://v3.rsuitejs.com/)
|
|
84
84
|
- [Version 3.\*](https://v3.rsuitejs.com/)
|
|
85
85
|
- [Version 2.\*](https://v2.rsuitejs.com/)
|
|
86
86
|
|
package/Radio/styles/index.less
CHANGED
|
@@ -58,6 +58,10 @@
|
|
|
58
58
|
visibility: hidden;
|
|
59
59
|
transition: transform 0.2s linear, opacity 0.2s linear;
|
|
60
60
|
|
|
61
|
+
.high-contrast-mode({
|
|
62
|
+
transition: none;
|
|
63
|
+
});
|
|
64
|
+
|
|
61
65
|
.rs-radio-checked & {
|
|
62
66
|
transform: scale(1.5);
|
|
63
67
|
opacity: 0;
|
|
@@ -81,6 +85,10 @@
|
|
|
81
85
|
|
|
82
86
|
transition: background 0.2s linear, border 0.2s linear, box-shadow 0.2s linear;
|
|
83
87
|
|
|
88
|
+
.high-contrast-mode({
|
|
89
|
+
transition: none;
|
|
90
|
+
});
|
|
91
|
+
|
|
84
92
|
.rs-radio:hover & {
|
|
85
93
|
border-color: var(--rs-radio-checked-bg);
|
|
86
94
|
}
|
|
@@ -97,6 +105,10 @@
|
|
|
97
105
|
|
|
98
106
|
.rs-radio.rs-radio-disabled.rs-radio-checked & {
|
|
99
107
|
opacity: 0.3;
|
|
108
|
+
|
|
109
|
+
.high-contrast-mode({
|
|
110
|
+
opacity: 0.5;
|
|
111
|
+
});
|
|
100
112
|
}
|
|
101
113
|
}
|
|
102
114
|
|
|
@@ -112,6 +124,10 @@
|
|
|
112
124
|
transform: scale(0);
|
|
113
125
|
transition: opacity 0.2s ease-in, transform 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46);
|
|
114
126
|
|
|
127
|
+
.high-contrast-mode({
|
|
128
|
+
transition: none;
|
|
129
|
+
});
|
|
130
|
+
|
|
115
131
|
.rs-radio-checked & {
|
|
116
132
|
transform: scale(1);
|
|
117
133
|
opacity: 1;
|
package/Rate/styles/index.less
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
.rs-rate {
|
|
7
7
|
position: relative;
|
|
8
8
|
display: inline-flex;
|
|
9
|
-
color: var(--rs-
|
|
9
|
+
color: var(--rs-rate-symbol-checked);
|
|
10
10
|
list-style: none;
|
|
11
11
|
vertical-align: middle;
|
|
12
12
|
margin: 0;
|
|
@@ -29,8 +29,15 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
&-after {
|
|
32
|
-
color: var(--rs-
|
|
32
|
+
color: var(--rs-rate-symbol);
|
|
33
33
|
filter: grayscale(1);
|
|
34
|
+
|
|
35
|
+
.high-contrast-mode({
|
|
36
|
+
> .rs-icon {
|
|
37
|
+
fill: none;
|
|
38
|
+
stroke: currentColor;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
34
41
|
}
|
|
35
42
|
|
|
36
43
|
&-before,
|
|
@@ -51,6 +58,10 @@
|
|
|
51
58
|
&-full &-after {
|
|
52
59
|
color: inherit;
|
|
53
60
|
filter: none;
|
|
61
|
+
|
|
62
|
+
> .rs-icon {
|
|
63
|
+
fill: currentColor;
|
|
64
|
+
}
|
|
54
65
|
}
|
|
55
66
|
|
|
56
67
|
&-vertical {
|
package/Ripple/styles/index.less
CHANGED
|
@@ -8,10 +8,6 @@
|
|
|
8
8
|
transform: scale(0);
|
|
9
9
|
transition: 0s;
|
|
10
10
|
|
|
11
|
-
& when (@enable-ripple-effect = false) {
|
|
12
|
-
display: none !important;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
11
|
&-rippling {
|
|
16
12
|
transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
|
|
17
13
|
opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -28,5 +24,13 @@
|
|
|
28
24
|
top: 0;
|
|
29
25
|
left: 0;
|
|
30
26
|
pointer-events: none;
|
|
27
|
+
|
|
28
|
+
& when (@enable-ripple-effect = false) {
|
|
29
|
+
display: none !important;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.high-contrast-mode({
|
|
33
|
+
display: none !important;
|
|
34
|
+
});
|
|
31
35
|
}
|
|
32
36
|
}
|