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
package/es/Dropdown/Dropdown.js
CHANGED
|
@@ -7,12 +7,13 @@ import * as React from 'react';
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import classNames from 'classnames';
|
|
9
9
|
import { setStatic } from 'recompose';
|
|
10
|
+
import { contains } from 'dom-lib';
|
|
10
11
|
import RootCloseWrapper from '../Overlay/RootCloseWrapper';
|
|
11
12
|
import shallowEqual from '../utils/shallowEqual';
|
|
12
13
|
import DropdownToggle from './DropdownToggle';
|
|
13
14
|
import DropdownMenu from './DropdownMenu';
|
|
14
15
|
import DropdownMenuItem from './DropdownMenuItem';
|
|
15
|
-
import { createChainedFunction, prefix, isOneOf, getUnhandledProps, defaultProps, placementPolyfill } from '../utils';
|
|
16
|
+
import { createChainedFunction, prefix, isOneOf, getUnhandledProps, defaultProps, placementPolyfill, getDOMNode } from '../utils';
|
|
16
17
|
import { SidenavContext } from '../Sidenav/Sidenav';
|
|
17
18
|
import { PLACEMENT_8 } from '../constants';
|
|
18
19
|
|
|
@@ -25,6 +26,7 @@ function (_React$Component) {
|
|
|
25
26
|
var _this;
|
|
26
27
|
|
|
27
28
|
_this = _React$Component.call(this, props) || this;
|
|
29
|
+
_this.rootRef = void 0;
|
|
28
30
|
|
|
29
31
|
_this.toggle = function (isOpen) {
|
|
30
32
|
var _this$props = _this.props,
|
|
@@ -45,8 +47,12 @@ function (_React$Component) {
|
|
|
45
47
|
_this.handleRootClose = function (event) {
|
|
46
48
|
var _this$props$onToggle, _this$props2, _this$props$onClose, _this$props3;
|
|
47
49
|
|
|
48
|
-
event.
|
|
49
|
-
|
|
50
|
+
// Prevent the event from bubbling when closing the overlay is triggered by its own element.
|
|
51
|
+
// fix#1435
|
|
52
|
+
if (contains(getDOMNode(_this.rootRef.current), event.target)) {
|
|
53
|
+
event.preventDefault();
|
|
54
|
+
event.stopPropagation();
|
|
55
|
+
}
|
|
50
56
|
|
|
51
57
|
_this.setState({
|
|
52
58
|
open: false
|
|
@@ -102,6 +108,7 @@ function (_React$Component) {
|
|
|
102
108
|
_this.state = {
|
|
103
109
|
open: props.open
|
|
104
110
|
};
|
|
111
|
+
_this.rootRef = React.createRef();
|
|
105
112
|
return _this;
|
|
106
113
|
}
|
|
107
114
|
|
|
@@ -221,7 +228,9 @@ function (_React$Component) {
|
|
|
221
228
|
componentClass: toggleComponentClass
|
|
222
229
|
}), title);
|
|
223
230
|
var classes = classNames(classPrefix, className, (_classNames = {}, _classNames[addPrefix("placement-" + _kebabCase(placementPolyfill(placement)))] = placement, _classNames[addPrefix('disabled')] = disabled, _classNames[addPrefix('no-caret')] = noCaret, _classNames[addPrefix('open')] = open, _classNames[addPrefix(menuExpanded ? 'expand' : 'collapse')] = sidenav, _classNames));
|
|
224
|
-
return React.createElement(Component, _extends({
|
|
231
|
+
return React.createElement(Component, _extends({
|
|
232
|
+
ref: this.rootRef
|
|
233
|
+
}, dropdownProps, {
|
|
225
234
|
style: style,
|
|
226
235
|
className: classes,
|
|
227
236
|
role: "menu"
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// --------------------------------------------------
|
|
7
7
|
|
|
8
8
|
.@{ns}dropdown-toggle-caret {
|
|
9
|
-
.dropdown-toggle-caret-common;
|
|
9
|
+
.dropdown-toggle-caret-common();
|
|
10
10
|
.set-dropdown-caret(~'@{ns}dropdown');
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -86,12 +86,12 @@
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
.@{ns}dropdown-toggle {
|
|
89
|
-
.dropdown-toggle-size;
|
|
89
|
+
.dropdown-toggle-size();
|
|
90
90
|
|
|
91
91
|
&,
|
|
92
92
|
&.@{ns}btn {
|
|
93
93
|
// Force set style even if has `.btn`.
|
|
94
|
-
.dropdown-toggle;
|
|
94
|
+
.dropdown-toggle();
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
.@{ns}form-inline {
|
|
7
7
|
> *,
|
|
8
8
|
> .@{ns}btn {
|
|
9
|
-
margin-right:
|
|
9
|
+
margin-right: 20px;
|
|
10
10
|
margin-bottom: 24px;
|
|
11
11
|
vertical-align: top;
|
|
12
12
|
}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
.rs-control-label {
|
|
15
15
|
vertical-align: top;
|
|
16
16
|
margin-bottom: auto;
|
|
17
|
+
margin-right: @control-label-margin-right;
|
|
17
18
|
margin-top: @padding-base-vertical;
|
|
18
19
|
display: inline-block;
|
|
19
20
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
border: @input-border-width solid @input-border;
|
|
8
8
|
transition: @input-transition;
|
|
9
9
|
border-radius: @border-radius-base;
|
|
10
|
-
.input-base;
|
|
10
|
+
.input-base();
|
|
11
11
|
|
|
12
12
|
// Placeholder
|
|
13
13
|
&::placeholder {
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
.input-base() {
|
|
84
|
-
.input-md;
|
|
84
|
+
.input-md();
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.reset-input-group-addon-size(@size-name) {
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
@width: @@padding-horizontal-name * 2 - @input-border-width*2 + @font-size-base;
|
|
91
91
|
@padding-horizontal: (@width - @font-size-base)/2;
|
|
92
92
|
|
|
93
|
-
width: @width;
|
|
93
|
+
min-width: @width;
|
|
94
94
|
padding-left: @padding-horizontal;
|
|
95
95
|
padding-right: @padding-horizontal;
|
|
96
96
|
}
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
padding-right: @@add-on-padding;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
&.@{ns}input-group
|
|
126
|
+
&.@{ns}input-group {
|
|
127
127
|
> .@{ns}input {
|
|
128
128
|
height: @useable-height;
|
|
129
129
|
}
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
margin-left: auto;
|
|
9
9
|
padding-left: floor((@gutter / 2));
|
|
10
10
|
padding-right: ceil((@gutter / 2));
|
|
11
|
-
.clearfix;
|
|
11
|
+
.clearfix();
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
// Creates a wrapper for a series of columns
|
|
15
15
|
.make-row(@gutter: @grid-gutter-width) {
|
|
16
16
|
margin-left: ceil((@gutter / -2));
|
|
17
17
|
margin-right: floor((@gutter / -2));
|
|
18
|
-
.clearfix;
|
|
18
|
+
.clearfix();
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
// Generate the extra small columns
|
|
@@ -13,23 +13,25 @@
|
|
|
13
13
|
.@{ns}btn-default {
|
|
14
14
|
.btn-icon-with-text(@btn-icon-with-text-bg);
|
|
15
15
|
|
|
16
|
-
&:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
&:hover {
|
|
21
|
-
.btn-icon-with-text(@btn-icon-with-text-hover-bg);
|
|
22
|
-
}
|
|
16
|
+
&:not(.@{ns}btn-disabled) {
|
|
17
|
+
&:focus {
|
|
18
|
+
.btn-icon-with-text(@btn-icon-with-text-focus-bg);
|
|
19
|
+
}
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
.btn-icon-with-text(@btn-icon-with-text-active-bg);
|
|
21
|
+
&:hover {
|
|
22
|
+
.btn-icon-with-text(@btn-icon-with-text-hover-bg);
|
|
23
|
+
}
|
|
28
24
|
|
|
29
|
-
&:
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
&:active,
|
|
26
|
+
&.@{ns}btn-active,
|
|
27
|
+
.@{ns}open > .@{ns}dropdown-toggle& {
|
|
32
28
|
.btn-icon-with-text(@btn-icon-with-text-active-bg);
|
|
29
|
+
|
|
30
|
+
&:hover,
|
|
31
|
+
&:focus,
|
|
32
|
+
&.focus {
|
|
33
|
+
.btn-icon-with-text(@btn-icon-with-text-active-bg);
|
|
34
|
+
}
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
}
|
|
@@ -7,28 +7,24 @@
|
|
|
7
7
|
|
|
8
8
|
// Common form controls
|
|
9
9
|
.@{ns}input {
|
|
10
|
-
.default-input;
|
|
10
|
+
.default-input();
|
|
11
11
|
|
|
12
12
|
// Reset height for `textarea`
|
|
13
13
|
textarea& {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
min-width: 300px;
|
|
17
|
-
min-height: 76px;
|
|
18
|
-
max-width: 100%;
|
|
19
|
-
max-height: 200px;
|
|
14
|
+
overflow: auto;
|
|
15
|
+
resize: vertical;
|
|
20
16
|
}
|
|
21
17
|
}
|
|
22
18
|
|
|
23
19
|
// Form control sizing
|
|
24
20
|
.@{ns}input-xs {
|
|
25
|
-
.input-xs;
|
|
21
|
+
.input-xs();
|
|
26
22
|
}
|
|
27
23
|
|
|
28
24
|
.@{ns}input-lg {
|
|
29
|
-
.input-lg;
|
|
25
|
+
.input-lg();
|
|
30
26
|
}
|
|
31
27
|
|
|
32
28
|
.@{ns}input-sm {
|
|
33
|
-
.input-sm;
|
|
29
|
+
.input-sm();
|
|
34
30
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
.input-touchspin(@size) {
|
|
2
2
|
@size-name: ~'input-height-@{size}';
|
|
3
|
-
@height: (@@size-name - 2px) / 2;
|
|
3
|
+
@height: ((@@size-name - 2px) / 2);
|
|
4
4
|
|
|
5
5
|
height: @height;
|
|
6
6
|
|
|
7
7
|
> .@{ns}icon {
|
|
8
8
|
height: @height;
|
|
9
|
-
line-height: unit(@height / @number-input-touchspin-font-size);
|
|
9
|
+
line-height: unit((@height / @number-input-touchspin-font-size));
|
|
10
10
|
}
|
|
11
11
|
}
|
|
@@ -34,7 +34,13 @@ function (_React$Component) {
|
|
|
34
34
|
_this.inputRef = void 0;
|
|
35
35
|
_this.sizerRef = void 0;
|
|
36
36
|
_this.placeHolderSizerRef = void 0;
|
|
37
|
+
|
|
38
|
+
_this.getInputId = function () {
|
|
39
|
+
return _this.props.inputId || _this.state.inputId;
|
|
40
|
+
};
|
|
41
|
+
|
|
37
42
|
_this.state = {
|
|
43
|
+
inputId: '_' + Math.random().toString(36).substr(2, 12),
|
|
38
44
|
inputWidth: props.minWidth
|
|
39
45
|
};
|
|
40
46
|
_this.inputRef = React.createRef();
|
|
@@ -115,7 +121,7 @@ function (_React$Component) {
|
|
|
115
121
|
};
|
|
116
122
|
|
|
117
123
|
_proto.renderStyles = function renderStyles() {
|
|
118
|
-
var inputId = this.
|
|
124
|
+
var inputId = this.getInputId();
|
|
119
125
|
return isIE() ? React.createElement("style", {
|
|
120
126
|
dangerouslySetInnerHTML: {
|
|
121
127
|
__html: "input#" + inputId + "::-ms-clear {display: none;}"
|
|
@@ -132,8 +138,8 @@ function (_React$Component) {
|
|
|
132
138
|
className = _this$props3.className,
|
|
133
139
|
placeholder = _this$props3.placeholder,
|
|
134
140
|
inputClassName = _this$props3.inputClassName,
|
|
135
|
-
inputStyle = _this$props3.inputStyle
|
|
136
|
-
|
|
141
|
+
inputStyle = _this$props3.inputStyle;
|
|
142
|
+
var inputId = this.getInputId();
|
|
137
143
|
var sizerValue = [defaultValue, value, ''].reduce(function (previousValue, currentValue) {
|
|
138
144
|
if (previousValue !== null && previousValue !== undefined) {
|
|
139
145
|
return previousValue;
|
|
@@ -157,7 +163,7 @@ function (_React$Component) {
|
|
|
157
163
|
htmlInputProps = _partitionHTMLProps[0];
|
|
158
164
|
|
|
159
165
|
htmlInputProps.className = inputClassName;
|
|
160
|
-
htmlInputProps.id = inputId;
|
|
166
|
+
htmlInputProps.id = inputId || inputId;
|
|
161
167
|
htmlInputProps.style = nextInputStyle;
|
|
162
168
|
return React.createElement("div", {
|
|
163
169
|
className: className,
|
|
@@ -191,7 +197,6 @@ InputAutosize.propTypes = {
|
|
|
191
197
|
onAutosize: PropTypes.func
|
|
192
198
|
};
|
|
193
199
|
InputAutosize.defaultProps = {
|
|
194
|
-
minWidth: 1
|
|
195
|
-
inputId: '_' + Math.random().toString(36).substr(2, 12)
|
|
200
|
+
minWidth: 1
|
|
196
201
|
};
|
|
197
202
|
export default InputAutosize;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
position: absolute !important;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
.input-picker-input-sizes;
|
|
32
|
+
.input-picker-input-sizes();
|
|
33
33
|
|
|
34
34
|
.@{ns}picker-toggle.@{ns}btn-xs ~ .@{ns}picker-tag-wrapper .@{ns}tag {
|
|
35
35
|
padding-top: 0;
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.@{ns}picker-tag-wrapper {
|
|
46
|
-
|
|
46
|
+
margin-right: @dropdown-toggle-padding-right;
|
|
47
47
|
|
|
48
48
|
.@{ns}picker-cleanable & {
|
|
49
|
-
|
|
49
|
+
margin-right: @dropdown-toggle-padding-right + @picker-toggle-clean-width;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
width: 100%;
|
|
56
56
|
|
|
57
57
|
&-input {
|
|
58
|
-
.input-md;
|
|
58
|
+
.input-md();
|
|
59
59
|
|
|
60
60
|
.@{tag-picker} & {
|
|
61
61
|
font-size: @font-size-base;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@import 'mixin';
|
|
3
3
|
|
|
4
4
|
.@{ns}loader {
|
|
5
|
-
.clearfix;
|
|
5
|
+
.clearfix();
|
|
6
6
|
.loader-size(@loader-default-diameter, @loader-default-content-font-size);
|
|
7
7
|
|
|
8
8
|
height: @loader-default-diameter;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
display: inline-block;
|
|
15
15
|
float: left;
|
|
16
16
|
|
|
17
|
-
.loader-spin;
|
|
17
|
+
.loader-spin();
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
//Loader spin
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.@{ns}loader-content {
|
|
60
|
-
line-height: unit(@line-height-computed / @loader-default-content-font-size);
|
|
60
|
+
line-height: unit((@line-height-computed / @loader-default-content-font-size));
|
|
61
61
|
text-align: center;
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
&-content {
|
|
19
19
|
font-size: @font-size;
|
|
20
|
-
line-height: unit(@diameter / @font-size);
|
|
20
|
+
line-height: unit((@diameter / @font-size));
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
&-vertical & {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
&-vertical &-content {
|
|
28
|
-
line-height: unit(@line-height-computed / @font-size);
|
|
28
|
+
line-height: unit((@line-height-computed / @font-size));
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
h5 {
|
|
41
41
|
margin-top: 0;
|
|
42
42
|
margin-bottom: 0;
|
|
43
|
-
.ellipsis;
|
|
43
|
+
.ellipsis();
|
|
44
44
|
|
|
45
45
|
// When title and description all exist , additional a margin
|
|
46
46
|
& + .@{ns}message-description {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
// Header
|
|
64
64
|
.@{ns}message-header {
|
|
65
65
|
color: @message-header-color;
|
|
66
|
-
line-height: unit(round(@message-icon-large-size / @message-title-size, 16));
|
|
66
|
+
line-height: unit((round(@message-icon-large-size / @message-title-size, 16)));
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
// Description
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
border: none;
|
|
98
98
|
outline: none !important;
|
|
99
99
|
|
|
100
|
-
.icon-font;
|
|
100
|
+
.icon-font();
|
|
101
101
|
|
|
102
102
|
&::before {
|
|
103
103
|
content: @default-close-btn-content;
|
package/es/Modal/BaseModal.js
CHANGED
|
@@ -296,7 +296,7 @@ function (_React$Component2) {
|
|
|
296
296
|
container: container
|
|
297
297
|
}, React.createElement("div", {
|
|
298
298
|
ref: this.modalNodeRef,
|
|
299
|
-
role: rest.role
|
|
299
|
+
role: rest.role,
|
|
300
300
|
style: style,
|
|
301
301
|
className: className
|
|
302
302
|
}, backdrop && this.renderBackdrop(), React.createElement(RefHolder, {
|
package/es/Modal/Modal.js
CHANGED
|
@@ -55,7 +55,7 @@ function (_React$Component) {
|
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
_this.handleShowing = function () {
|
|
58
|
-
_this.updateModalStyles(_this.dialogElement);
|
|
58
|
+
_this.updateModalStyles(_this.dialogElement, true);
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
_this.handleHide = function () {
|
|
@@ -93,7 +93,7 @@ function (_React$Component) {
|
|
|
93
93
|
this.destroyEvent();
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
-
_proto.getBodyStylesByDialog = function getBodyStylesByDialog(dialogElement) {
|
|
96
|
+
_proto.getBodyStylesByDialog = function getBodyStylesByDialog(dialogElement, entering) {
|
|
97
97
|
var _this$props2 = this.props,
|
|
98
98
|
overflow = _this$props2.overflow,
|
|
99
99
|
drawer = _this$props2.drawer;
|
|
@@ -126,7 +126,7 @@ function (_React$Component) {
|
|
|
126
126
|
/**
|
|
127
127
|
* Header height + Footer height + Dialog margin
|
|
128
128
|
*/
|
|
129
|
-
var excludeHeight = headerHeight + footerHeight + 60;
|
|
129
|
+
var excludeHeight = headerHeight + footerHeight + (entering ? 76 : 60);
|
|
130
130
|
var bodyHeight = getHeight(window) - excludeHeight;
|
|
131
131
|
var maxHeight = scrollHeight >= bodyHeight ? bodyHeight : scrollHeight;
|
|
132
132
|
bodyStyles.maxHeight = maxHeight;
|
|
@@ -146,9 +146,9 @@ function (_React$Component) {
|
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
|
|
149
|
-
_proto.updateModalStyles = function updateModalStyles(dialogElement) {
|
|
149
|
+
_proto.updateModalStyles = function updateModalStyles(dialogElement, entering) {
|
|
150
150
|
this.setState({
|
|
151
|
-
bodyStyles: this.getBodyStylesByDialog(dialogElement)
|
|
151
|
+
bodyStyles: this.getBodyStylesByDialog(dialogElement, entering)
|
|
152
152
|
});
|
|
153
153
|
};
|
|
154
154
|
|
package/es/Modal/ModalDialog.js
CHANGED
|
@@ -14,7 +14,9 @@ export var modalDialogPropTypes = {
|
|
|
14
14
|
style: PropTypes.object,
|
|
15
15
|
dialogStyle: PropTypes.object,
|
|
16
16
|
children: PropTypes.node,
|
|
17
|
-
dialogRef: refType
|
|
17
|
+
dialogRef: refType,
|
|
18
|
+
id: PropTypes.string,
|
|
19
|
+
'aria-labelledby': PropTypes.string
|
|
18
20
|
};
|
|
19
21
|
|
|
20
22
|
var ModalDialog =
|
|
@@ -94,18 +94,18 @@
|
|
|
94
94
|
// Modal header
|
|
95
95
|
// Top section of the modal w/ title and dismiss
|
|
96
96
|
.@{ns}modal-header {
|
|
97
|
-
.clearfix;
|
|
97
|
+
.clearfix();
|
|
98
98
|
|
|
99
99
|
padding-right: @line-height-computed;
|
|
100
100
|
|
|
101
101
|
.@{ns}modal-title {
|
|
102
102
|
font-size: @modal-title-font-size;
|
|
103
|
-
line-height: unit(@line-height-computed / @modal-title-font-size);
|
|
103
|
+
line-height: unit((@line-height-computed / @modal-title-font-size));
|
|
104
104
|
width: 100%;
|
|
105
105
|
display: block;
|
|
106
106
|
color: @modal-title-color;
|
|
107
107
|
margin: 0;
|
|
108
|
-
.ellipsis;
|
|
108
|
+
.ellipsis();
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
border-style: none;
|
|
129
129
|
|
|
130
130
|
&::before {
|
|
131
|
-
.icon-font;
|
|
131
|
+
.icon-font();
|
|
132
132
|
|
|
133
133
|
content: @default-close-btn-content;
|
|
134
134
|
}
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
.@{ns}modal-footer {
|
|
160
160
|
text-align: right; // right align buttons
|
|
161
161
|
border-top: none;
|
|
162
|
-
.clearfix; // clear it in case folks use .pull-* classes on buttons
|
|
162
|
+
.clearfix(); // clear it in case folks use .pull-* classes on buttons
|
|
163
163
|
|
|
164
164
|
// Properly space out buttons
|
|
165
165
|
.@{ns}btn + .@{ns}btn {
|
|
@@ -524,7 +524,8 @@ function (_React$Component) {
|
|
|
524
524
|
onClean: createChainedFunction(this.handleClean, onClean),
|
|
525
525
|
cleanable: cleanable && !disabled,
|
|
526
526
|
hasValue: hasValue,
|
|
527
|
-
active: this.state.active
|
|
527
|
+
active: this.state.active,
|
|
528
|
+
"aria-disabled": disabled
|
|
528
529
|
}), selectedElement || locale.placeholder)));
|
|
529
530
|
};
|
|
530
531
|
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
cursor: pointer;
|
|
50
50
|
color: @nav-item-font-default-color;
|
|
51
51
|
transition: @nav-item-transition;
|
|
52
|
-
.ellipsis-basic;
|
|
52
|
+
.ellipsis-basic();
|
|
53
53
|
|
|
54
|
-
.safari-border-radius-overflow-hidden;
|
|
54
|
+
.safari-border-radius-overflow-hidden();
|
|
55
55
|
|
|
56
56
|
> .@{ns}icon {
|
|
57
57
|
margin-right: @nav-item-icon-spacing;
|
|
@@ -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/es/Overlay/Overlay.js
CHANGED
|
@@ -35,7 +35,7 @@ var Overlay = function Overlay(_ref) {
|
|
|
35
35
|
|
|
36
36
|
Overlay.propTypes = {
|
|
37
37
|
animation: PropTypes.bool,
|
|
38
|
-
container: PropTypes.
|
|
38
|
+
container: PropTypes.any,
|
|
39
39
|
children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
40
40
|
onRendered: PropTypes.func,
|
|
41
41
|
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;
|