rsuite 4.8.5 → 4.8.9
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 +49 -0
- package/dist/rsuite.js +21 -21
- package/dist/rsuite.min.js +1 -1
- package/dist/rsuite.min.js.map +1 -1
- package/dist/styles/rsuite-dark-rtl.css +46 -52
- package/dist/styles/rsuite-dark-rtl.min.css +1 -1
- package/dist/styles/rsuite-dark-rtl.min.css.map +1 -1
- package/dist/styles/rsuite-dark.css +46 -52
- package/dist/styles/rsuite-dark.min.css +1 -1
- package/dist/styles/rsuite-dark.min.css.map +1 -1
- package/dist/styles/rsuite-default-rtl.css +46 -52
- package/dist/styles/rsuite-default-rtl.min.css +1 -1
- package/dist/styles/rsuite-default-rtl.min.css.map +1 -1
- package/dist/styles/rsuite-default.css +46 -52
- package/dist/styles/rsuite-default.min.css +1 -1
- package/dist/styles/rsuite-default.min.css.map +1 -1
- package/es/Alert/styles/common.less +1 -1
- package/es/AutoComplete/styles/common.less +3 -3
- package/es/Avatar/styles/common.less +5 -5
- package/es/Avatar/styles/mixin.less +1 -1
- package/es/Button/styles/common.less +6 -6
- package/es/Button/styles/mixin.less +17 -17
- package/es/ButtonGroup/styles/common.less +5 -5
- package/es/Calendar/styles/common.less +14 -14
- package/es/Carousel/styles/common.less +1 -1
- package/es/Cascader/Cascader.js +2 -1
- package/es/Cascader/styles/common.less +4 -4
- package/es/CheckPicker/CheckPicker.js +2 -1
- package/es/CheckPicker/styles/common.less +2 -2
- package/es/CheckTreePicker/CheckTreePicker.js +2 -1
- package/es/CheckTreePicker/styles/common.less +5 -5
- package/es/Checkbox/styles/common.less +3 -3
- package/es/Checkbox/styles/mixin.less +1 -1
- package/es/DatePicker/DatePicker.js +2 -1
- package/es/DatePicker/styles/common.less +1 -1
- package/es/DateRangePicker/DateRangePicker.js +2 -1
- package/es/Drawer/styles/common.less +5 -5
- package/es/Dropdown/Dropdown.js +13 -4
- package/es/Dropdown/styles/common.less +3 -3
- package/es/FlexboxGrid/styles/common.less +1 -1
- package/es/Form/styles/common.less +2 -1
- package/es/Form/styles/mixin.less +4 -4
- package/es/FormControl/styles/common.less +0 -1
- package/es/FormGroup/styles/common.less +1 -1
- package/es/Grid/styles/common.less +1 -1
- package/es/Grid/styles/mixin.less +2 -2
- package/es/HelpBlock/styles/common.less +1 -1
- package/es/IconButton/styles/common.less +16 -14
- package/es/Input/styles/common.less +6 -10
- package/es/InputGroup/styles/common.less +1 -1
- package/es/InputNumber/styles/mixin.less +2 -2
- package/es/InputPicker/InputAutosize.js +11 -6
- package/es/InputPicker/styles/common.less +4 -4
- package/es/Loader/styles/common.less +3 -3
- package/es/Loader/styles/mixin.less +2 -2
- package/es/Message/styles/common.less +3 -3
- package/es/Modal/BaseModal.js +1 -1
- package/es/Modal/Modal.js +5 -5
- package/es/Modal/ModalDialog.js +3 -1
- package/es/Modal/styles/common.less +5 -5
- package/es/MultiCascader/MultiCascader.js +2 -1
- package/es/MultiCascader/styles/common.less +1 -1
- package/es/Nav/styles/common.less +2 -2
- package/es/Navbar/styles/common.less +2 -2
- package/es/Notification/styles/common.less +4 -4
- package/es/Overlay/Overlay.js +1 -1
- package/es/Pagination/styles/common.less +2 -2
- package/es/Pagination/styles/mixin.less +6 -7
- package/es/Panel/Panel.js +0 -1
- package/es/Panel/styles/common.less +1 -1
- package/es/Picker/DropdownMenu.js +3 -1
- package/es/Picker/propTypes.js +1 -1
- package/es/Picker/styles/common.less +28 -28
- package/es/Picker/styles/mixin.less +3 -3
- package/es/Popover/styles/common.less +4 -4
- package/es/Progress/styles/common.less +5 -5
- package/es/Radio/styles/common.less +5 -5
- package/es/Rate/styles/common.less +2 -2
- package/es/SelectPicker/SelectPicker.js +2 -1
- package/es/SelectPicker/styles/common.less +4 -4
- package/es/Sidenav/styles/common.less +3 -3
- package/es/Slider/styles/common.less +9 -9
- package/es/Steps/styles/common.less +13 -13
- package/es/Table/styles/common.less +6 -10
- package/es/Tag/styles/common.less +2 -2
- package/es/TagPicker/styles/common.less +4 -4
- package/es/Timeline/styles/common.less +5 -5
- package/es/Timeline/styles/mixin.less +1 -1
- package/es/Toggle/styles/mixin.less +5 -5
- package/es/Tooltip/styles/common.less +4 -4
- package/es/TreePicker/TreePicker.js +2 -1
- package/es/TreePicker/styles/common.less +3 -3
- package/es/Uploader/styles/common.less +17 -17
- package/es/styles/mixins/utilities.less +1 -1
- package/es/styles/variables.less +58 -48
- package/es/utils/index.js +2 -1
- package/lib/Alert/styles/common.less +1 -1
- package/lib/AutoComplete/styles/common.less +3 -3
- package/lib/Avatar/styles/common.less +5 -5
- package/lib/Avatar/styles/mixin.less +1 -1
- package/lib/Button/styles/common.less +6 -6
- package/lib/Button/styles/mixin.less +17 -17
- package/lib/ButtonGroup/styles/common.less +5 -5
- package/lib/Calendar/styles/common.less +14 -14
- package/lib/Carousel/styles/common.less +1 -1
- package/lib/Cascader/Cascader.js +2 -1
- package/lib/Cascader/styles/common.less +4 -4
- package/lib/CheckPicker/CheckPicker.js +2 -1
- package/lib/CheckPicker/styles/common.less +2 -2
- package/lib/CheckTreePicker/CheckTreePicker.js +2 -1
- package/lib/CheckTreePicker/styles/common.less +5 -5
- package/lib/Checkbox/styles/common.less +3 -3
- package/lib/Checkbox/styles/mixin.less +1 -1
- package/lib/DatePicker/DatePicker.js +2 -1
- package/lib/DatePicker/styles/common.less +1 -1
- package/lib/DateRangePicker/DateRangePicker.js +2 -1
- package/lib/Drawer/styles/common.less +5 -5
- package/lib/Dropdown/Dropdown.js +13 -3
- package/lib/Dropdown/styles/common.less +3 -3
- package/lib/FlexboxGrid/styles/common.less +1 -1
- package/lib/Form/styles/common.less +2 -1
- package/lib/Form/styles/mixin.less +4 -4
- package/lib/FormControl/styles/common.less +0 -1
- package/lib/FormGroup/styles/common.less +1 -1
- package/lib/Grid/styles/common.less +1 -1
- package/lib/Grid/styles/mixin.less +2 -2
- package/lib/HelpBlock/styles/common.less +1 -1
- package/lib/IconButton/styles/common.less +16 -14
- package/lib/Input/styles/common.less +6 -10
- package/lib/InputGroup/styles/common.less +1 -1
- package/lib/InputNumber/styles/mixin.less +2 -2
- package/lib/InputPicker/InputAutosize.js +11 -6
- package/lib/InputPicker/styles/common.less +4 -4
- package/lib/Loader/styles/common.less +3 -3
- package/lib/Loader/styles/mixin.less +2 -2
- package/lib/Message/styles/common.less +3 -3
- package/lib/Modal/BaseModal.js +1 -1
- package/lib/Modal/Modal.js +5 -5
- package/lib/Modal/ModalDialog.js +3 -1
- package/lib/Modal/styles/common.less +5 -5
- package/lib/MultiCascader/MultiCascader.js +2 -1
- package/lib/MultiCascader/styles/common.less +1 -1
- package/lib/Nav/styles/common.less +2 -2
- package/lib/Navbar/styles/common.less +2 -2
- package/lib/Notification/styles/common.less +4 -4
- package/lib/Overlay/Overlay.js +1 -1
- package/lib/Pagination/styles/common.less +2 -2
- package/lib/Pagination/styles/mixin.less +6 -7
- package/lib/Panel/Panel.js +0 -1
- package/lib/Panel/styles/common.less +1 -1
- package/lib/Picker/DropdownMenu.js +3 -1
- package/lib/Picker/propTypes.js +1 -1
- package/lib/Picker/styles/common.less +28 -28
- package/lib/Picker/styles/mixin.less +3 -3
- package/lib/Popover/styles/common.less +4 -4
- package/lib/Progress/styles/common.less +5 -5
- package/lib/Radio/styles/common.less +5 -5
- package/lib/Rate/styles/common.less +2 -2
- package/lib/SelectPicker/SelectPicker.js +2 -1
- package/lib/SelectPicker/styles/common.less +4 -4
- package/lib/Sidenav/styles/common.less +3 -3
- package/lib/Slider/styles/common.less +9 -9
- package/lib/Steps/styles/common.less +13 -13
- package/lib/Table/styles/common.less +6 -10
- package/lib/Tag/styles/common.less +2 -2
- package/lib/TagPicker/styles/common.less +4 -4
- package/lib/Timeline/styles/common.less +5 -5
- package/lib/Timeline/styles/mixin.less +1 -1
- package/lib/Toggle/styles/mixin.less +5 -5
- package/lib/Tooltip/styles/common.less +4 -4
- package/lib/TreePicker/TreePicker.js +2 -1
- package/lib/TreePicker/styles/common.less +3 -3
- package/lib/Uploader/styles/common.less +17 -17
- package/lib/styles/mixins/utilities.less +1 -1
- package/lib/styles/variables.less +58 -48
- package/lib/utils/index.js +7 -2
- package/package.json +7 -5
- package/src/Alert/styles/common.less +1 -1
- package/src/AutoComplete/styles/common.less +3 -3
- package/src/Avatar/styles/common.less +5 -5
- package/src/Avatar/styles/mixin.less +1 -1
- package/src/Button/styles/common.less +6 -6
- package/src/Button/styles/mixin.less +17 -17
- package/src/ButtonGroup/styles/common.less +5 -5
- package/src/Calendar/styles/common.less +14 -14
- package/src/Carousel/styles/common.less +1 -1
- package/src/Cascader/Cascader.tsx +1 -0
- package/src/Cascader/styles/common.less +4 -4
- package/src/Cascader/test/CascaderSpec.js +1 -0
- package/src/CheckPicker/CheckPicker.tsx +1 -0
- package/src/CheckPicker/styles/common.less +2 -2
- package/src/CheckPicker/test/CheckPickerSpec.js +1 -0
- package/src/CheckTreePicker/CheckTreePicker.tsx +1 -0
- package/src/CheckTreePicker/styles/common.less +5 -5
- package/src/CheckTreePicker/test/CheckTreePickerSpec.js +1 -0
- package/src/Checkbox/styles/common.less +3 -3
- package/src/Checkbox/styles/mixin.less +1 -1
- package/src/DatePicker/DatePicker.tsx +1 -0
- package/src/DatePicker/styles/common.less +1 -1
- package/src/DatePicker/test/DatePickerSpec.js +1 -0
- package/src/DateRangePicker/DateRangePicker.tsx +1 -0
- package/src/DateRangePicker/test/DateRangePickerSpec.js +1 -0
- package/src/Drawer/styles/common.less +5 -5
- package/src/Drawer/test/DrawerSpec.js +14 -0
- package/src/Dropdown/Dropdown.tsx +20 -6
- package/src/Dropdown/styles/common.less +3 -3
- package/src/FlexboxGrid/styles/common.less +1 -1
- package/src/Form/styles/common.less +2 -1
- package/src/Form/styles/mixin.less +4 -4
- package/src/FormControl/styles/common.less +0 -1
- package/src/FormGroup/styles/common.less +1 -1
- package/src/Grid/styles/common.less +1 -1
- package/src/Grid/styles/mixin.less +2 -2
- package/src/HelpBlock/styles/common.less +1 -1
- package/src/IconButton/styles/common.less +16 -14
- package/src/Input/styles/common.less +6 -10
- package/src/Input/test/InputStylesSpec.js +0 -8
- package/src/InputGroup/styles/common.less +1 -1
- package/src/InputNumber/styles/mixin.less +2 -2
- package/src/InputPicker/InputAutosize.tsx +15 -10
- package/src/InputPicker/styles/common.less +4 -4
- package/src/Loader/styles/common.less +3 -3
- package/src/Loader/styles/mixin.less +2 -2
- package/src/Message/styles/common.less +3 -3
- package/src/Modal/BaseModal.tsx +1 -6
- package/src/Modal/Modal.tsx +5 -5
- package/src/Modal/ModalDialog.tsx +3 -1
- package/src/Modal/styles/common.less +5 -5
- package/src/Modal/test/ModalSpec.js +13 -0
- package/src/MultiCascader/MultiCascader.tsx +1 -0
- package/src/MultiCascader/styles/common.less +1 -1
- package/src/MultiCascader/test/MultiCascaderSpec.js +1 -0
- package/src/Nav/styles/common.less +2 -2
- package/src/Navbar/styles/common.less +2 -2
- package/src/Notification/styles/common.less +4 -4
- package/src/Overlay/Overlay.tsx +1 -1
- package/src/Pagination/styles/common.less +2 -2
- package/src/Pagination/styles/mixin.less +6 -7
- package/src/Panel/Panel.tsx +0 -1
- package/src/Panel/styles/common.less +1 -1
- package/src/Picker/DropdownMenu.tsx +3 -1
- package/src/Picker/propTypes.ts +1 -1
- package/src/Picker/styles/common.less +28 -28
- package/src/Picker/styles/mixin.less +3 -3
- package/src/Picker/test/DropdownMenuSpec.js +21 -0
- package/src/Popover/styles/common.less +4 -4
- package/src/Popover/test/PopoverStylesSpec.js +1 -1
- package/src/Progress/styles/common.less +5 -5
- package/src/Radio/styles/common.less +5 -5
- package/src/Rate/styles/common.less +2 -2
- package/src/SelectPicker/SelectPicker.tsx +1 -0
- package/src/SelectPicker/styles/common.less +4 -4
- package/src/SelectPicker/test/SelectPickerSpec.js +1 -0
- package/src/Sidenav/styles/common.less +3 -3
- package/src/Slider/styles/common.less +9 -9
- package/src/Steps/styles/common.less +13 -13
- package/src/Table/styles/common.less +6 -10
- package/src/Tag/styles/common.less +2 -2
- package/src/TagPicker/styles/common.less +4 -4
- package/src/Timeline/styles/common.less +5 -5
- package/src/Timeline/styles/mixin.less +1 -1
- package/src/Toggle/styles/mixin.less +5 -5
- package/src/Tooltip/styles/common.less +4 -4
- package/src/TreePicker/TreePicker.tsx +1 -0
- package/src/TreePicker/styles/common.less +3 -3
- package/src/TreePicker/test/TreePickerSpec.js +1 -0
- package/src/Uploader/styles/common.less +17 -17
- package/src/styles/mixins/utilities.less +1 -1
- package/src/styles/variables.less +58 -48
- package/src/utils/index.ts +1 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// --------------------------------------------------
|
|
5
5
|
|
|
6
6
|
.@{ns}navbar {
|
|
7
|
-
.clearfix;
|
|
7
|
+
.clearfix();
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.@{ns}navbar-header {
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
|
|
60
60
|
.@{ns}dropdown .@{ns}dropdown-toggle,
|
|
61
61
|
.@{ns}nav-item > .@{ns}nav-item-content {
|
|
62
|
-
.navbar-default-item-content;
|
|
62
|
+
.navbar-default-item-content();
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.@{ns}nav-item-active > .@{ns}nav-item-content,
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
|
|
53
53
|
// Title
|
|
54
54
|
&-title {
|
|
55
|
-
.ellipsis;
|
|
55
|
+
.ellipsis();
|
|
56
56
|
.ie-text-align(left);
|
|
57
57
|
|
|
58
58
|
color: @notify-title-font-color;
|
|
59
59
|
font-size: @notify-title-font-size;
|
|
60
|
-
line-height: unit(@notify-title-icon-size / @notify-title-font-size);
|
|
60
|
+
line-height: unit((@notify-title-icon-size / @notify-title-font-size));
|
|
61
61
|
|
|
62
62
|
> p {
|
|
63
63
|
margin: 0;
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
&-title-with-icon {
|
|
75
|
-
.ellipsis;
|
|
75
|
+
.ellipsis();
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
// Description
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
cursor: pointer;
|
|
100
100
|
|
|
101
101
|
&-x::before {
|
|
102
|
-
.icon-font;
|
|
102
|
+
.icon-font();
|
|
103
103
|
|
|
104
104
|
content: @default-close-btn-content;
|
|
105
105
|
}
|
package/src/Overlay/Overlay.tsx
CHANGED
|
@@ -32,7 +32,7 @@ const Overlay = ({ animation = true, children, transition = Fade, ...rest }: Ove
|
|
|
32
32
|
|
|
33
33
|
Overlay.propTypes = {
|
|
34
34
|
animation: PropTypes.bool,
|
|
35
|
-
container: PropTypes.
|
|
35
|
+
container: PropTypes.any,
|
|
36
36
|
children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
37
37
|
onRendered: PropTypes.func,
|
|
38
38
|
className: PropTypes.string,
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
|
|
20
20
|
&:not(.@{ns}pagination-btn-disabled) > a {
|
|
21
21
|
transition: @pagination-transition;
|
|
22
|
-
.button-ripple;
|
|
22
|
+
.button-ripple();
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
> a {
|
|
26
26
|
.btn-sm(base);
|
|
27
|
-
.btn-transition;
|
|
27
|
+
.btn-transition();
|
|
28
28
|
.btn-subtle-variant(@pagination-hover-bg);
|
|
29
29
|
|
|
30
30
|
position: relative;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
.pagination-active(@font-color) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
background-color: transparent;
|
|
5
|
-
}
|
|
6
|
-
.active;
|
|
2
|
+
color: @font-color;
|
|
3
|
+
background-color: transparent;
|
|
7
4
|
|
|
8
5
|
&:hover,
|
|
9
6
|
&:focus,
|
|
10
7
|
&.focus {
|
|
11
|
-
|
|
8
|
+
color: @font-color;
|
|
9
|
+
background-color: transparent;
|
|
12
10
|
}
|
|
13
11
|
|
|
14
12
|
&:active {
|
|
@@ -16,7 +14,8 @@
|
|
|
16
14
|
&:hover,
|
|
17
15
|
&:focus,
|
|
18
16
|
&.focus {
|
|
19
|
-
|
|
17
|
+
color: @font-color;
|
|
18
|
+
background-color: transparent;
|
|
20
19
|
}
|
|
21
20
|
}
|
|
22
21
|
}
|
package/src/Panel/Panel.tsx
CHANGED
|
@@ -18,7 +18,6 @@ class Panel extends React.Component<PanelProps, PanelState> {
|
|
|
18
18
|
shaded: PropTypes.bool,
|
|
19
19
|
bodyFill: PropTypes.bool,
|
|
20
20
|
header: PropTypes.any,
|
|
21
|
-
id: PropTypes.oneOf([PropTypes.number, PropTypes.string]),
|
|
22
21
|
defaultExpanded: PropTypes.bool,
|
|
23
22
|
expanded: PropTypes.bool,
|
|
24
23
|
eventKey: PropTypes.any,
|
|
@@ -194,7 +194,8 @@ class DropdownMenu extends React.Component<DropdownMenuProps, DropdownMenuState>
|
|
|
194
194
|
className={classNames({
|
|
195
195
|
folded: foldedGroupKeys.some(key => key === groupValue)
|
|
196
196
|
})}
|
|
197
|
-
key={groupValue}
|
|
197
|
+
key={`group-${groupValue}`}
|
|
198
|
+
data-key={`group-${groupValue}`}
|
|
198
199
|
onClick={this.handleGroupTitleClick.bind(null, groupValue)}
|
|
199
200
|
>
|
|
200
201
|
{renderMenuGroup ? renderMenuGroup(groupValue, item) : groupValue}
|
|
@@ -210,6 +211,7 @@ class DropdownMenu extends React.Component<DropdownMenuProps, DropdownMenuState>
|
|
|
210
211
|
|
|
211
212
|
return (
|
|
212
213
|
<DropdownMenuItem
|
|
214
|
+
data-key={itemKey}
|
|
213
215
|
style={style}
|
|
214
216
|
key={itemKey}
|
|
215
217
|
disabled={disabled}
|
package/src/Picker/propTypes.ts
CHANGED
|
@@ -12,7 +12,7 @@ export const pickerPropTypes = {
|
|
|
12
12
|
appearance: PropTypes.oneOf(['default', 'subtle']),
|
|
13
13
|
block: PropTypes.bool,
|
|
14
14
|
containerPadding: PropTypes.number,
|
|
15
|
-
container: PropTypes.
|
|
15
|
+
container: PropTypes.any,
|
|
16
16
|
disabled: PropTypes.bool,
|
|
17
17
|
toggleComponentClass: PropTypes.elementType,
|
|
18
18
|
menuClassName: PropTypes.string,
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
|
|
53
53
|
&-value-list {
|
|
54
54
|
flex: 0 1 auto;
|
|
55
|
-
.ellipsis-basic;
|
|
55
|
+
.ellipsis-basic();
|
|
56
56
|
.ie-display(block);
|
|
57
57
|
.ie-max-width(100%);
|
|
58
58
|
}
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
.@{ns}picker-subtle & {
|
|
99
|
-
.btn-subtle;
|
|
99
|
+
.btn-subtle();
|
|
100
100
|
|
|
101
101
|
transition: none;
|
|
102
102
|
|
|
@@ -109,16 +109,16 @@
|
|
|
109
109
|
|
|
110
110
|
/* stylelint-disable-next-line */ // Custom button sizes
|
|
111
111
|
.@{ns}picker-toggle.@{ns}btn {
|
|
112
|
-
.picker-button-caret-md;
|
|
113
|
-
.tag-picker-search-input-md;
|
|
114
|
-
.date-picker-button-caret-md;
|
|
112
|
+
.picker-button-caret-md();
|
|
113
|
+
.tag-picker-search-input-md();
|
|
114
|
+
.date-picker-button-caret-md();
|
|
115
115
|
.date-picker-button-size(base);
|
|
116
116
|
|
|
117
117
|
&-lg {
|
|
118
|
-
.picker-button-caret-lg;
|
|
118
|
+
.picker-button-caret-lg();
|
|
119
119
|
.picker-default-button-reset-padding-left(large);
|
|
120
|
-
.tag-picker-search-input-lg;
|
|
121
|
-
.date-picker-button-caret-lg;
|
|
120
|
+
.tag-picker-search-input-lg();
|
|
121
|
+
.date-picker-button-caret-lg();
|
|
122
122
|
.date-picker-button-size(large);
|
|
123
123
|
|
|
124
124
|
.btn-lg(base);
|
|
@@ -129,46 +129,46 @@
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
&-md {
|
|
132
|
-
.picker-button-caret-md;
|
|
132
|
+
.picker-button-caret-md();
|
|
133
133
|
.picker-default-button-reset-padding-left(base);
|
|
134
|
-
.tag-picker-search-input-md;
|
|
135
|
-
.date-picker-button-caret-md;
|
|
134
|
+
.tag-picker-search-input-md();
|
|
135
|
+
.date-picker-button-caret-md();
|
|
136
136
|
.date-picker-button-size(base);
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
&-sm {
|
|
140
140
|
.btn-sm(base);
|
|
141
141
|
|
|
142
|
-
.picker-button-caret-sm;
|
|
142
|
+
.picker-button-caret-sm();
|
|
143
143
|
.picker-default-button-reset-padding-left(small);
|
|
144
|
-
.tag-picker-search-input-sm;
|
|
145
|
-
.date-picker-button-caret-sm;
|
|
144
|
+
.tag-picker-search-input-sm();
|
|
145
|
+
.date-picker-button-caret-sm();
|
|
146
146
|
.date-picker-button-size(small);
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
&-xs {
|
|
150
150
|
.btn-xs(base);
|
|
151
151
|
|
|
152
|
-
.picker-button-caret-xs;
|
|
152
|
+
.picker-button-caret-xs();
|
|
153
153
|
.picker-default-button-reset-padding-left(extra-small);
|
|
154
|
-
.tag-picker-search-input-xs;
|
|
155
|
-
.date-picker-button-caret-xs;
|
|
154
|
+
.tag-picker-search-input-xs();
|
|
155
|
+
.date-picker-button-caret-xs();
|
|
156
156
|
.date-picker-button-size(extra-small);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
/* stylelint-disable-next-line */ // Custom button
|
|
161
161
|
.@{ns}picker-toggle {
|
|
162
|
-
.picker-default-toggle;
|
|
163
|
-
.picker-subtle-toggle;
|
|
162
|
+
.picker-default-toggle();
|
|
163
|
+
.picker-subtle-toggle();
|
|
164
164
|
|
|
165
165
|
width: 100%;
|
|
166
166
|
text-align: left;
|
|
167
|
-
.ellipsis;
|
|
167
|
+
.ellipsis();
|
|
168
168
|
|
|
169
169
|
&-value {
|
|
170
170
|
display: block;
|
|
171
|
-
.ellipsis;
|
|
171
|
+
.ellipsis();
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
.@{ns}picker-cleanable & {
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
// Picker toggle caret
|
|
207
207
|
.@{ns}picker-toggle-caret {
|
|
208
208
|
// Extend Dropdown toggle caret style
|
|
209
|
-
.dropdown-toggle-caret-common;
|
|
209
|
+
.dropdown-toggle-caret-common();
|
|
210
210
|
.set-dropdown-caret(~'@{ns}picker');
|
|
211
211
|
|
|
212
212
|
color: @picker-default-toggle-caret-color;
|
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
padding: (@picker-menu-padding - @border-radius-base) @picker-menu-padding @picker-menu-padding;
|
|
252
252
|
|
|
253
253
|
.@{ns}picker-search-bar-input {
|
|
254
|
-
.default-input;
|
|
254
|
+
.default-input();
|
|
255
255
|
|
|
256
256
|
min-width: @picker-content-min-width;
|
|
257
257
|
padding-right: @picker-search-bar-icon-width +
|
|
@@ -266,9 +266,9 @@
|
|
|
266
266
|
width: @picker-search-bar-icon-width;
|
|
267
267
|
color: @B400;
|
|
268
268
|
font-size: @font-size-base;
|
|
269
|
-
line-height: unit(@line-height-computed / @font-size-base);
|
|
270
|
-
top: @picker-menu-padding - @border-radius-base + @padding-base-input-vertical;
|
|
271
|
-
right: @picker-menu-padding + @padding-base-input-horizontal;
|
|
269
|
+
line-height: unit((@line-height-computed / @font-size-base));
|
|
270
|
+
top: (@picker-menu-padding - @border-radius-base + @padding-base-input-vertical);
|
|
271
|
+
right: (@picker-menu-padding + @padding-base-input-horizontal);
|
|
272
272
|
|
|
273
273
|
.@{ns}@{tree-picker-prefix}-menu&,
|
|
274
274
|
.@{ns}@{check-tree-picker-prefix}-menu& {
|
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
.@{ns}check-item {
|
|
307
307
|
&:not(.@{ns}checkbox-disabled):hover,
|
|
308
308
|
&-focus {
|
|
309
|
-
.picker-item-hover;
|
|
309
|
+
.picker-item-hover();
|
|
310
310
|
}
|
|
311
311
|
|
|
312
312
|
.@{ns}checkbox-checker {
|
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
|
|
324
324
|
/* stylelint-disable-next-line */ // This class name provide by Virtualized.
|
|
325
325
|
.ReactVirtualized__Grid & {
|
|
326
|
-
.ellipsis-basic;
|
|
326
|
+
.ellipsis-basic();
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
.@{ns}checkbox-disabled& {
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
|
|
77
77
|
/* stylelint-disable-next-line */ // This class name provide by Virtualized.
|
|
78
78
|
.ReactVirtualized__Grid & {
|
|
79
|
-
.ellipsis-basic;
|
|
79
|
+
.ellipsis-basic();
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -353,7 +353,7 @@
|
|
|
353
353
|
// Default picker toggle
|
|
354
354
|
.picker-default-toggle() {
|
|
355
355
|
.@{ns}picker-default & {
|
|
356
|
-
.dropdown-toggle;
|
|
356
|
+
.dropdown-toggle();
|
|
357
357
|
|
|
358
358
|
color: @picker-default-toggle-font-color;
|
|
359
359
|
border: @picker-default-toggle-border-width solid @picker-default-toggle-border-color;
|
|
@@ -374,7 +374,7 @@
|
|
|
374
374
|
// Subtle picker toggle
|
|
375
375
|
.picker-subtle-toggle {
|
|
376
376
|
.@{ns}picker-subtle & {
|
|
377
|
-
.dropdown-toggle;
|
|
377
|
+
.dropdown-toggle();
|
|
378
378
|
}
|
|
379
379
|
|
|
380
380
|
.@{ns}picker-subtle.@{ns}picker-disabled & {
|
|
@@ -207,4 +207,25 @@ describe('picker - DropdownMenu', () => {
|
|
|
207
207
|
);
|
|
208
208
|
assert.ok(instance.className.match(/\bcustom-prefix\b/));
|
|
209
209
|
});
|
|
210
|
+
|
|
211
|
+
it('Should have a unique key', () => {
|
|
212
|
+
const mockData = Array.from({ length: 20 }, (_v, i) => ({
|
|
213
|
+
value: i + 1,
|
|
214
|
+
name: `TEST${i + 1}`,
|
|
215
|
+
groupValue: i + 1
|
|
216
|
+
}));
|
|
217
|
+
|
|
218
|
+
const instance = getDOMNode(
|
|
219
|
+
<DropdownMenu
|
|
220
|
+
group
|
|
221
|
+
labelKey="name"
|
|
222
|
+
valueKey="value"
|
|
223
|
+
data={getDataGroupBy(mockData, 'groupValue')}
|
|
224
|
+
classPrefix={classPrefix}
|
|
225
|
+
dropdownMenuItemComponentClass={DropdownMenuItem}
|
|
226
|
+
/>
|
|
227
|
+
);
|
|
228
|
+
|
|
229
|
+
assert.equal(instance.querySelectorAll('[data-key="1"]').length, 1);
|
|
230
|
+
});
|
|
210
231
|
});
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
|
|
67
67
|
// Common style for .placement-top*
|
|
68
68
|
.@{ns}popover[class*='placement-top'] {
|
|
69
|
-
margin-top:
|
|
69
|
+
margin-top: -(@popover-arrow-width + 2px);
|
|
70
70
|
.set-translate-transition(0, -@popover-translate-distance);
|
|
71
71
|
|
|
72
72
|
> .@{ns}popover-arrow {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
/* rtl:begin:ignore */
|
|
87
87
|
// Common style for .placement-right*
|
|
88
88
|
.@{ns}popover[class*='placement-right'] {
|
|
89
|
-
margin-left: @popover-arrow-width;
|
|
89
|
+
margin-left: (@popover-arrow-width + 2px);
|
|
90
90
|
.set-translate-transition(@popover-translate-distance, 0);
|
|
91
91
|
|
|
92
92
|
> .@{ns}popover-arrow {
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
|
|
106
106
|
// Common style for .placement-left*
|
|
107
107
|
.@{ns}popover[class*='placement-left'] {
|
|
108
|
-
margin-left:
|
|
108
|
+
margin-left: -(@popover-arrow-width + 2px);
|
|
109
109
|
.set-translate-transition(-@popover-translate-distance, 0);
|
|
110
110
|
|
|
111
111
|
> .@{ns}popover-arrow {
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
|
|
127
127
|
// Common style for .placement-bottom*
|
|
128
128
|
.@{ns}popover[class*='placement-bottom'] {
|
|
129
|
-
margin-top: @popover-arrow-width;
|
|
129
|
+
margin-top: (@popover-arrow-width + 2px);
|
|
130
130
|
.set-translate-transition(0, @popover-translate-distance);
|
|
131
131
|
|
|
132
132
|
> .@{ns}popover-arrow {
|
|
@@ -38,7 +38,7 @@ describe('Popover styles', () => {
|
|
|
38
38
|
createTestContainer()
|
|
39
39
|
);
|
|
40
40
|
const dom = document.querySelector('.popover-top-start');
|
|
41
|
-
assert.equal(getStyle(dom, 'marginTop'), '-
|
|
41
|
+
assert.equal(getStyle(dom, 'marginTop'), '-8px', 'Popover margin value');
|
|
42
42
|
const arrowDom = dom.querySelector('.rs-popover-arrow');
|
|
43
43
|
assert.equal(getStyle(arrowDom, 'bottom'), '-6px', 'Popover arrow bottom value');
|
|
44
44
|
assert.equal(getStyle(arrowDom, 'marginLeft'), '-6px', 'Popover arrow bottom value');
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
&-icon-fail,
|
|
13
13
|
&-info-status {
|
|
14
14
|
font-size: @progress-font-size;
|
|
15
|
-
line-height: unit(@line-height-computed / @progress-font-size);
|
|
15
|
+
line-height: unit((@line-height-computed / @progress-font-size));
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
bottom: 0;
|
|
49
49
|
text-align: center;
|
|
50
50
|
font-size: @progress-font-size;
|
|
51
|
-
line-height: unit(@info-height / @progress-font-size);
|
|
51
|
+
line-height: unit((@info-height / @progress-font-size));
|
|
52
52
|
height: @info-height;
|
|
53
53
|
color: @progress-info-text-color;
|
|
54
54
|
}
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
|
|
113
113
|
&-outer {
|
|
114
114
|
flex: 1 1 auto;
|
|
115
|
-
border-radius: @progress-bar-height / 2;
|
|
115
|
+
border-radius: (@progress-bar-height / 2);
|
|
116
116
|
overflow: hidden;
|
|
117
117
|
// Make sure outer vertical-align:center;
|
|
118
118
|
vertical-align: middle;
|
|
@@ -120,12 +120,12 @@
|
|
|
120
120
|
|
|
121
121
|
&-inner {
|
|
122
122
|
background: @progress-bar-bg;
|
|
123
|
-
border-radius: @progress-bar-height / 2;
|
|
123
|
+
border-radius: (@progress-bar-height / 2);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
&-bg {
|
|
127
127
|
background-color: @progress-bar-fill-bg;
|
|
128
|
-
border-radius: @progress-bar-height / 2;
|
|
128
|
+
border-radius: (@progress-bar-height / 2);
|
|
129
129
|
transition: @progress-bg-transition;
|
|
130
130
|
transition-property: width, color;
|
|
131
131
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
@import 'mixin';
|
|
5
5
|
|
|
6
6
|
.@{ns}radio {
|
|
7
|
-
.radio-checkbox-common;
|
|
7
|
+
.radio-checkbox-common();
|
|
8
8
|
|
|
9
9
|
&-group-inline {
|
|
10
10
|
display: inline-block;
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
.@{ns}radio-checker {
|
|
64
64
|
padding-top: 10px;
|
|
65
65
|
padding-bottom: 10px;
|
|
66
|
-
padding-left: @radio-sense-width * 2 + @radio-width-height;
|
|
67
|
-
min-height: @radio-sense-width * 2 + @radio-width-height;
|
|
66
|
+
padding-left: (@radio-sense-width * 2 + @radio-width-height);
|
|
67
|
+
min-height: (@radio-sense-width * 2 + @radio-width-height);
|
|
68
68
|
line-height: 1;
|
|
69
69
|
position: relative;
|
|
70
70
|
}
|
|
@@ -153,8 +153,8 @@
|
|
|
153
153
|
width: @radio-inner-width-height;
|
|
154
154
|
height: @radio-inner-width-height;
|
|
155
155
|
background: @radio-inner-checked-color;
|
|
156
|
-
margin-top: (@radio-width-height - @radio-inner-width-height) / 2;
|
|
157
|
-
margin-left: (@radio-width-height - @radio-inner-width-height) / 2;
|
|
156
|
+
margin-top: ((@radio-width-height - @radio-inner-width-height) / 2);
|
|
157
|
+
margin-left: ((@radio-width-height - @radio-inner-width-height) / 2);
|
|
158
158
|
border-radius: @radio-border-radius;
|
|
159
159
|
opacity: 0;
|
|
160
160
|
transform: scale(0);
|
|
@@ -438,6 +438,7 @@ class SelectPicker extends React.Component<SelectPickerProps, SelectPickerState>
|
|
|
438
438
|
cleanable={cleanable && !disabled}
|
|
439
439
|
hasValue={hasValue}
|
|
440
440
|
active={this.state.active}
|
|
441
|
+
aria-disabled={disabled}
|
|
441
442
|
>
|
|
442
443
|
{selectedElement || locale.placeholder}
|
|
443
444
|
</PickerToggle>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
// Menu Items
|
|
11
11
|
.@{slns}-menu-items {
|
|
12
|
-
.picker-menu-items-reset;
|
|
12
|
+
.picker-menu-items-reset();
|
|
13
13
|
.picker-menu-group-common(@select-picker-prefix);
|
|
14
14
|
.picker-menu-group-title(@select-picker-prefix);
|
|
15
15
|
.picker-menu-group-closed(@select-picker-prefix);
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
|
|
18
18
|
// Menu item
|
|
19
19
|
.@{slns}-menu-item {
|
|
20
|
-
.picker-select-item;
|
|
20
|
+
.picker-select-item();
|
|
21
21
|
|
|
22
22
|
&:not(&-disabled):hover,
|
|
23
23
|
&&-focus {
|
|
24
|
-
.picker-item-hover;
|
|
24
|
+
.picker-item-hover();
|
|
25
25
|
|
|
26
26
|
text-decoration: none;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
&&-active {
|
|
30
|
-
.picker-item-active;
|
|
30
|
+
.picker-item-active();
|
|
31
31
|
|
|
32
32
|
&,
|
|
33
33
|
&:hover {
|
|
@@ -60,6 +60,7 @@ describe('SelectPicker', () => {
|
|
|
60
60
|
const instance = getDOMNode(<Dropdown disabled />);
|
|
61
61
|
const instanceDom = instance;
|
|
62
62
|
assert.ok(instanceDom.className.match(/\bdisabled\b/));
|
|
63
|
+
assert.equal(instance.querySelector('[role=combobox]').getAttribute('aria-disabled'), 'true');
|
|
63
64
|
});
|
|
64
65
|
|
|
65
66
|
it('Should output a button', () => {
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
// Set the ripple effect of items.
|
|
99
99
|
&-item:not(.@{ns}dropdown-item-submenu) > .@{ns}dropdown-item-content,
|
|
100
100
|
&-item-submenu > .@{ns}dropdown-item-content > .@{ns}dropdown-menu-toggle {
|
|
101
|
-
.button-ripple;
|
|
101
|
+
.button-ripple();
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
// Remove the ripple effect of disabled items.
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
|
|
126
126
|
// Dropdown menu
|
|
127
127
|
> .@{ns}dropdown-menu {
|
|
128
|
-
.reset-sidenav-dropdown-menu;
|
|
128
|
+
.reset-sidenav-dropdown-menu();
|
|
129
129
|
|
|
130
130
|
// Submenu
|
|
131
131
|
.@{ns}dropdown-item-submenu > .@{ns}dropdown-item-content {
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
> .@{ns}dropdown-menu {
|
|
140
|
-
.reset-sidenav-dropdown-menu;
|
|
140
|
+
.reset-sidenav-dropdown-menu();
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
&:hover {
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
|
|
29
29
|
&-with-mark:not(&-vertical) {
|
|
30
30
|
//White space for mark
|
|
31
|
-
margin-bottom: @line-height-computed + @slider-mark-margin-top;
|
|
31
|
+
margin-bottom: (@line-height-computed + @slider-mark-margin-top);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// Mark
|
|
36
36
|
.@{ns}slider-mark {
|
|
37
37
|
position: absolute;
|
|
38
|
-
top: @slider-bar-side-length + @slider-mark-margin-top;
|
|
38
|
+
top: (@slider-bar-side-length + @slider-mark-margin-top);
|
|
39
39
|
left: -2px;
|
|
40
40
|
white-space: nowrap;
|
|
41
41
|
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
// Bar
|
|
57
57
|
.@{ns}slider-bar {
|
|
58
58
|
height: @slider-bar-side-length;
|
|
59
|
-
border-radius: @slider-bar-side-length / 2;
|
|
59
|
+
border-radius: (@slider-bar-side-length / 2);
|
|
60
60
|
background-color: @slider-bar-default-bg;
|
|
61
61
|
cursor: pointer;
|
|
62
62
|
|
|
@@ -155,12 +155,12 @@
|
|
|
155
155
|
.@{ns}slider-progress-bar {
|
|
156
156
|
position: absolute;
|
|
157
157
|
height: @slider-bar-side-length;
|
|
158
|
-
border-radius: @slider-bar-side-length / 2 0 0 @slider-bar-side-length / 2;
|
|
158
|
+
border-radius: (@slider-bar-side-length / 2) 0 0 (@slider-bar-side-length / 2);
|
|
159
159
|
background-color: @slider-progress-bar-bg;
|
|
160
160
|
|
|
161
161
|
.@{ns}slider-vertical & {
|
|
162
162
|
width: @slider-bar-side-length;
|
|
163
|
-
border-radius: @slider-bar-side-length / 2 @slider-bar-side-length / 2 0 0;
|
|
163
|
+
border-radius: (@slider-bar-side-length / 2) (@slider-bar-side-length / 2) 0 0;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
border-radius: 50%;
|
|
178
178
|
border: @slider-handle-border-width solid @slider-handle-default-border-color;
|
|
179
179
|
background-color: @slider-handle-default-bg;
|
|
180
|
-
margin-left:
|
|
180
|
+
margin-left: -(@slider-handle-diameter / 2);
|
|
181
181
|
cursor: pointer;
|
|
182
182
|
/* stylelint-disable */ //Formatted by prettier
|
|
183
183
|
transition: box-shadow @slider-handle-transition, background-color @slider-handle-transition,
|
|
@@ -195,8 +195,8 @@
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
.@{ns}slider-vertical &::before {
|
|
198
|
-
left: (@slider-handle-diameter - @slider-bar-side-length)/2;
|
|
199
|
-
margin-top:
|
|
198
|
+
left: ((@slider-handle-diameter - @slider-bar-side-length)/2);
|
|
199
|
+
margin-top: -(@slider-handle-diameter / 2);
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
// Reset all setting
|
|
221
221
|
.@{ns}slider-mark {
|
|
222
222
|
top: -8px;
|
|
223
|
-
left: @slider-bar-side-length + @slider-mark-margin-top;
|
|
223
|
+
left: (@slider-bar-side-length + @slider-mark-margin-top);
|
|
224
224
|
|
|
225
225
|
&-content {
|
|
226
226
|
margin-left: auto;
|