react-bootstrap 0.32.0 → 0.32.4
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 +38 -0
- package/README.md +11 -7
- package/dist/react-bootstrap.js +13464 -13723
- package/dist/react-bootstrap.min.js +10 -18464
- package/es/Accordion.js +13 -16
- package/es/Alert.js +26 -31
- package/es/Badge.js +21 -31
- package/es/Breadcrumb.js +17 -20
- package/es/BreadcrumbItem.js +30 -30
- package/es/Button.js +23 -27
- package/es/ButtonGroup.js +20 -22
- package/es/ButtonToolbar.js +16 -18
- package/es/Carousel.js +120 -157
- package/es/CarouselCaption.js +18 -21
- package/es/CarouselItem.js +34 -33
- package/es/Checkbox.js +43 -54
- package/es/Clearfix.js +24 -24
- package/es/CloseButton.js +21 -30
- package/es/Col.js +42 -26
- package/es/Collapse.js +68 -68
- package/es/ControlLabel.js +19 -24
- package/es/Dropdown.js +93 -91
- package/es/DropdownButton.js +25 -35
- package/es/DropdownMenu.js +65 -65
- package/es/DropdownToggle.js +28 -40
- package/es/Fade.js +26 -29
- package/es/Form.js +22 -22
- package/es/FormControl.js +32 -33
- package/es/FormControlFeedback.js +21 -21
- package/es/FormControlStatic.js +18 -21
- package/es/FormGroup.js +27 -34
- package/es/Glyphicon.js +18 -19
- package/es/Grid.js +20 -22
- package/es/HelpBlock.js +17 -17
- package/es/Image.js +19 -24
- package/es/InputGroup.js +17 -18
- package/es/InputGroupAddon.js +17 -17
- package/es/InputGroupButton.js +17 -17
- package/es/Jumbotron.js +18 -21
- package/es/Label.js +21 -27
- package/es/ListGroup.js +24 -29
- package/es/ListGroupItem.js +30 -48
- package/es/Media.js +18 -22
- package/es/MediaBody.js +19 -22
- package/es/MediaHeading.js +18 -21
- package/es/MediaLeft.js +18 -19
- package/es/MediaList.js +17 -17
- package/es/MediaListItem.js +17 -17
- package/es/MediaRight.js +18 -19
- package/es/MenuItem.js +44 -49
- package/es/Modal.js +63 -74
- package/es/ModalBody.js +18 -21
- package/es/ModalDialog.js +31 -39
- package/es/ModalFooter.js +18 -21
- package/es/ModalHeader.js +25 -35
- package/es/ModalTitle.js +18 -21
- package/es/Nav.js +73 -92
- package/es/NavDropdown.js +40 -52
- package/es/NavItem.js +34 -38
- package/es/Navbar.js +62 -73
- package/es/NavbarBrand.js +20 -24
- package/es/NavbarCollapse.js +21 -28
- package/es/NavbarHeader.js +19 -20
- package/es/NavbarToggle.js +30 -38
- package/es/Overlay.js +21 -25
- package/es/OverlayTrigger.js +71 -68
- package/es/PageHeader.js +18 -26
- package/es/PageItem.js +0 -1
- package/es/Pager.js +23 -30
- package/es/PagerItem.js +36 -40
- package/es/Pagination.js +18 -24
- package/es/PaginationItem.js +47 -57
- package/es/Panel.js +51 -54
- package/es/PanelBody.js +18 -29
- package/es/PanelCollapse.js +20 -23
- package/es/PanelFooter.js +16 -23
- package/es/PanelGroup.js +44 -45
- package/es/PanelHeading.js +19 -28
- package/es/PanelTitle.js +22 -34
- package/es/PanelToggle.js +21 -24
- package/es/Popover.js +36 -46
- package/es/ProgressBar.js +59 -62
- package/es/Radio.js +43 -54
- package/es/ResponsiveEmbed.js +27 -32
- package/es/Row.js +18 -21
- package/es/SafeAnchor.js +32 -32
- package/es/SplitButton.js +33 -46
- package/es/SplitToggle.js +14 -13
- package/es/Tab.js +12 -18
- package/es/TabContainer.js +24 -30
- package/es/TabContent.js +36 -43
- package/es/TabPane.js +58 -68
- package/es/Table.js +25 -29
- package/es/Tabs.js +56 -71
- package/es/Thumbnail.js +34 -34
- package/es/ToggleButton.js +32 -37
- package/es/ToggleButtonGroup.js +45 -57
- package/es/Tooltip.js +33 -40
- package/es/Well.js +17 -17
- package/es/index.js +2 -0
- package/es/utils/PropTypes.js +13 -19
- package/es/utils/StyleConfig.js +0 -4
- package/es/utils/ValidComponentChildren.js +11 -20
- package/es/utils/bootstrapUtils.js +17 -31
- package/es/utils/createChainedFunction.js +2 -2
- package/es/utils/deprecationWarning.js +28 -30
- package/es/utils/splitComponentProps.js +1 -2
- package/lib/Accordion.js +23 -36
- package/lib/Alert.js +43 -65
- package/lib/Badge.js +36 -56
- package/lib/Breadcrumb.js +32 -47
- package/lib/BreadcrumbItem.js +48 -63
- package/lib/Button.js +49 -71
- package/lib/ButtonGroup.js +39 -57
- package/lib/ButtonToolbar.js +29 -42
- package/lib/Carousel.js +161 -214
- package/lib/CarouselCaption.js +32 -46
- package/lib/CarouselItem.js +54 -73
- package/lib/Checkbox.js +64 -87
- package/lib/Clearfix.js +45 -58
- package/lib/CloseButton.js +33 -50
- package/lib/Col.js +78 -73
- package/lib/Collapse.js +104 -125
- package/lib/ControlLabel.js +38 -59
- package/lib/Dropdown.js +153 -192
- package/lib/DropdownButton.js +44 -70
- package/lib/DropdownMenu.js +96 -120
- package/lib/DropdownToggle.js +48 -77
- package/lib/Fade.js +49 -68
- package/lib/Form.js +39 -52
- package/lib/FormControl.js +58 -79
- package/lib/FormControlFeedback.js +42 -54
- package/lib/FormControlStatic.js +32 -46
- package/lib/FormGroup.js +47 -67
- package/lib/Glyphicon.js +33 -46
- package/lib/Grid.js +36 -51
- package/lib/HelpBlock.js +29 -40
- package/lib/Image.js +37 -53
- package/lib/InputGroup.js +34 -49
- package/lib/InputGroupAddon.js +29 -40
- package/lib/InputGroupButton.js +29 -40
- package/lib/Jumbotron.js +32 -46
- package/lib/Label.js +35 -53
- package/lib/ListGroup.js +45 -61
- package/lib/ListGroupItem.js +55 -85
- package/lib/Media.js +43 -70
- package/lib/MediaBody.js +37 -55
- package/lib/MediaHeading.js +32 -46
- package/lib/MediaLeft.js +34 -48
- package/lib/MediaList.js +29 -40
- package/lib/MediaListItem.js +29 -40
- package/lib/MediaRight.js +34 -48
- package/lib/MenuItem.js +70 -92
- package/lib/Modal.js +130 -186
- package/lib/ModalBody.js +32 -46
- package/lib/ModalDialog.js +47 -69
- package/lib/ModalFooter.js +32 -46
- package/lib/ModalHeader.js +43 -70
- package/lib/ModalTitle.js +32 -46
- package/lib/Nav.js +122 -160
- package/lib/NavDropdown.js +63 -97
- package/lib/NavItem.js +54 -77
- package/lib/Navbar.js +115 -152
- package/lib/NavbarBrand.js +37 -55
- package/lib/NavbarCollapse.js +36 -57
- package/lib/NavbarHeader.js +33 -48
- package/lib/NavbarToggle.js +52 -77
- package/lib/Overlay.js +50 -75
- package/lib/OverlayTrigger.js +114 -129
- package/lib/PageHeader.js +30 -49
- package/lib/PageItem.js +9 -10
- package/lib/Pager.js +41 -63
- package/lib/PagerItem.js +55 -78
- package/lib/Pagination.js +32 -50
- package/lib/PaginationItem.js +67 -91
- package/lib/Panel.js +93 -127
- package/lib/PanelBody.js +35 -57
- package/lib/PanelCollapse.js +44 -56
- package/lib/PanelFooter.js +31 -48
- package/lib/PanelGroup.js +73 -88
- package/lib/PanelHeading.js +37 -59
- package/lib/PanelTitle.js +41 -68
- package/lib/PanelToggle.js +45 -66
- package/lib/Popover.js +59 -84
- package/lib/ProgressBar.js +86 -103
- package/lib/Radio.js +64 -87
- package/lib/ResponsiveEmbed.js +45 -63
- package/lib/Row.js +32 -46
- package/lib/SafeAnchor.js +53 -69
- package/lib/SplitButton.js +57 -90
- package/lib/SplitToggle.js +25 -34
- package/lib/Tab.js +32 -55
- package/lib/TabContainer.js +45 -61
- package/lib/TabContent.js +67 -87
- package/lib/TabPane.js +103 -131
- package/lib/Table.js +44 -59
- package/lib/Tabs.js +82 -119
- package/lib/Thumbnail.js +55 -67
- package/lib/ToggleButton.js +49 -68
- package/lib/ToggleButtonGroup.js +67 -104
- package/lib/Tooltip.js +55 -77
- package/lib/Well.js +30 -41
- package/lib/index.js +147 -214
- package/lib/utils/PropTypes.js +24 -31
- package/lib/utils/StyleConfig.js +13 -11
- package/lib/utils/ValidComponentChildren.js +34 -29
- package/lib/utils/bootstrapUtils.js +41 -52
- package/lib/utils/capitalize.js +2 -0
- package/lib/utils/createChainedFunction.js +8 -5
- package/lib/utils/deprecationWarning.js +37 -47
- package/lib/utils/index.js +11 -15
- package/lib/utils/splitComponentProps.js +5 -10
- package/package.json +58 -50
package/lib/CarouselCaption.js
CHANGED
|
@@ -1,79 +1,65 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _extends2 = require('babel-runtime/helpers/extends');
|
|
6
|
-
|
|
7
|
-
var _extends3 = _interopRequireDefault(_extends2);
|
|
8
|
-
|
|
9
|
-
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
|
10
|
-
|
|
11
|
-
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
|
12
|
-
|
|
13
|
-
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
14
|
-
|
|
15
|
-
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
16
|
-
|
|
17
|
-
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
18
4
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var _inherits2 = require('babel-runtime/helpers/inherits');
|
|
22
|
-
|
|
23
|
-
var _inherits3 = _interopRequireDefault(_inherits2);
|
|
24
|
-
|
|
25
|
-
var _classnames = require('classnames');
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
26
7
|
|
|
27
|
-
var
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/extends"));
|
|
28
9
|
|
|
29
|
-
var
|
|
10
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/objectWithoutPropertiesLoose"));
|
|
30
11
|
|
|
31
|
-
var
|
|
12
|
+
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inheritsLoose"));
|
|
32
13
|
|
|
33
|
-
var
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
34
15
|
|
|
35
|
-
var
|
|
16
|
+
var _react = _interopRequireDefault(require("react"));
|
|
36
17
|
|
|
37
|
-
var
|
|
18
|
+
var _elementType = _interopRequireDefault(require("prop-types-extra/lib/elementType"));
|
|
38
19
|
|
|
39
|
-
|
|
20
|
+
var _bootstrapUtils = require("./utils/bootstrapUtils");
|
|
40
21
|
|
|
41
22
|
var propTypes = {
|
|
42
|
-
componentClass:
|
|
23
|
+
componentClass: _elementType.default
|
|
43
24
|
};
|
|
44
|
-
|
|
45
25
|
var defaultProps = {
|
|
46
26
|
componentClass: 'div'
|
|
47
27
|
};
|
|
48
28
|
|
|
49
|
-
var CarouselCaption =
|
|
50
|
-
|
|
29
|
+
var CarouselCaption =
|
|
30
|
+
/*#__PURE__*/
|
|
31
|
+
function (_React$Component) {
|
|
32
|
+
(0, _inheritsLoose2.default)(CarouselCaption, _React$Component);
|
|
51
33
|
|
|
52
34
|
function CarouselCaption() {
|
|
53
|
-
|
|
54
|
-
return (0, _possibleConstructorReturn3.default)(this, _React$Component.apply(this, arguments));
|
|
35
|
+
return _React$Component.apply(this, arguments) || this;
|
|
55
36
|
}
|
|
56
37
|
|
|
57
|
-
CarouselCaption.prototype
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
38
|
+
var _proto = CarouselCaption.prototype;
|
|
39
|
+
|
|
40
|
+
_proto.render = function render() {
|
|
41
|
+
var _this$props = this.props,
|
|
42
|
+
Component = _this$props.componentClass,
|
|
43
|
+
className = _this$props.className,
|
|
44
|
+
props = (0, _objectWithoutPropertiesLoose2.default)(_this$props, ["componentClass", "className"]);
|
|
62
45
|
|
|
63
46
|
var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props),
|
|
64
47
|
bsProps = _splitBsProps[0],
|
|
65
48
|
elementProps = _splitBsProps[1];
|
|
66
49
|
|
|
67
50
|
var classes = (0, _bootstrapUtils.getClassSet)(bsProps);
|
|
68
|
-
|
|
69
|
-
|
|
51
|
+
return _react.default.createElement(Component, (0, _extends2.default)({}, elementProps, {
|
|
52
|
+
className: (0, _classnames.default)(className, classes)
|
|
53
|
+
}));
|
|
70
54
|
};
|
|
71
55
|
|
|
72
56
|
return CarouselCaption;
|
|
73
|
-
}(
|
|
57
|
+
}(_react.default.Component);
|
|
74
58
|
|
|
75
59
|
CarouselCaption.propTypes = propTypes;
|
|
76
60
|
CarouselCaption.defaultProps = defaultProps;
|
|
77
61
|
|
|
78
|
-
|
|
79
|
-
|
|
62
|
+
var _default = (0, _bootstrapUtils.bsClass)('carousel-caption', CarouselCaption);
|
|
63
|
+
|
|
64
|
+
exports.default = _default;
|
|
65
|
+
module.exports = exports["default"];
|
package/lib/CarouselItem.js
CHANGED
|
@@ -1,97 +1,77 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _extends2 = require('babel-runtime/helpers/extends');
|
|
6
|
-
|
|
7
|
-
var _extends3 = _interopRequireDefault(_extends2);
|
|
8
|
-
|
|
9
|
-
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
|
10
|
-
|
|
11
|
-
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
|
12
|
-
|
|
13
|
-
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
14
|
-
|
|
15
|
-
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
16
4
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
|
20
|
-
|
|
21
|
-
var _inherits2 = require('babel-runtime/helpers/inherits');
|
|
22
|
-
|
|
23
|
-
var _inherits3 = _interopRequireDefault(_inherits2);
|
|
24
|
-
|
|
25
|
-
var _classnames = require('classnames');
|
|
26
|
-
|
|
27
|
-
var _classnames2 = _interopRequireDefault(_classnames);
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
28
7
|
|
|
29
|
-
var
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/extends"));
|
|
30
9
|
|
|
31
|
-
var
|
|
10
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/objectWithoutPropertiesLoose"));
|
|
32
11
|
|
|
33
|
-
var
|
|
12
|
+
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inheritsLoose"));
|
|
34
13
|
|
|
35
|
-
var
|
|
14
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
|
|
36
15
|
|
|
37
|
-
var
|
|
16
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
38
17
|
|
|
39
|
-
var
|
|
18
|
+
var _react = _interopRequireDefault(require("react"));
|
|
40
19
|
|
|
41
|
-
var
|
|
20
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
42
21
|
|
|
43
|
-
var
|
|
22
|
+
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
44
23
|
|
|
45
|
-
|
|
24
|
+
var _transition = _interopRequireDefault(require("dom-helpers/transition"));
|
|
46
25
|
|
|
47
26
|
var propTypes = {
|
|
48
|
-
direction:
|
|
49
|
-
onAnimateOutEnd:
|
|
50
|
-
active:
|
|
51
|
-
animateIn:
|
|
52
|
-
animateOut:
|
|
53
|
-
index:
|
|
27
|
+
direction: _propTypes.default.oneOf(['prev', 'next']),
|
|
28
|
+
onAnimateOutEnd: _propTypes.default.func,
|
|
29
|
+
active: _propTypes.default.bool,
|
|
30
|
+
animateIn: _propTypes.default.bool,
|
|
31
|
+
animateOut: _propTypes.default.bool,
|
|
32
|
+
index: _propTypes.default.number
|
|
54
33
|
};
|
|
55
|
-
|
|
56
34
|
var defaultProps = {
|
|
57
35
|
active: false,
|
|
58
36
|
animateIn: false,
|
|
59
37
|
animateOut: false
|
|
60
38
|
};
|
|
61
39
|
|
|
62
|
-
var CarouselItem =
|
|
63
|
-
|
|
40
|
+
var CarouselItem =
|
|
41
|
+
/*#__PURE__*/
|
|
42
|
+
function (_React$Component) {
|
|
43
|
+
(0, _inheritsLoose2.default)(CarouselItem, _React$Component);
|
|
64
44
|
|
|
65
45
|
function CarouselItem(props, context) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
var _this = (0, _possibleConstructorReturn3.default)(this, _React$Component.call(this, props, context));
|
|
69
|
-
|
|
70
|
-
_this.handleAnimateOutEnd = _this.handleAnimateOutEnd.bind(_this);
|
|
46
|
+
var _this;
|
|
71
47
|
|
|
48
|
+
_this = _React$Component.call(this, props, context) || this;
|
|
49
|
+
_this.handleAnimateOutEnd = _this.handleAnimateOutEnd.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
|
|
72
50
|
_this.state = {
|
|
73
51
|
direction: null
|
|
74
52
|
};
|
|
75
|
-
|
|
76
53
|
_this.isUnmounted = false;
|
|
77
54
|
return _this;
|
|
78
55
|
}
|
|
79
56
|
|
|
80
|
-
CarouselItem.prototype
|
|
57
|
+
var _proto = CarouselItem.prototype;
|
|
58
|
+
|
|
59
|
+
_proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
81
60
|
if (this.props.active !== nextProps.active) {
|
|
82
|
-
this.setState({
|
|
61
|
+
this.setState({
|
|
62
|
+
direction: null
|
|
63
|
+
});
|
|
83
64
|
}
|
|
84
65
|
};
|
|
85
66
|
|
|
86
|
-
|
|
67
|
+
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
|
87
68
|
var _this2 = this;
|
|
88
69
|
|
|
89
70
|
var active = this.props.active;
|
|
90
|
-
|
|
91
71
|
var prevActive = prevProps.active;
|
|
92
72
|
|
|
93
73
|
if (!active && prevActive) {
|
|
94
|
-
|
|
74
|
+
_transition.default.end(_reactDom.default.findDOMNode(this), this.handleAnimateOutEnd);
|
|
95
75
|
}
|
|
96
76
|
|
|
97
77
|
if (active !== prevActive) {
|
|
@@ -101,11 +81,11 @@ var CarouselItem = function (_React$Component) {
|
|
|
101
81
|
}
|
|
102
82
|
};
|
|
103
83
|
|
|
104
|
-
|
|
84
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
105
85
|
this.isUnmounted = true;
|
|
106
86
|
};
|
|
107
87
|
|
|
108
|
-
|
|
88
|
+
_proto.handleAnimateOutEnd = function handleAnimateOutEnd() {
|
|
109
89
|
if (this.isUnmounted) {
|
|
110
90
|
return;
|
|
111
91
|
}
|
|
@@ -115,7 +95,7 @@ var CarouselItem = function (_React$Component) {
|
|
|
115
95
|
}
|
|
116
96
|
};
|
|
117
97
|
|
|
118
|
-
|
|
98
|
+
_proto.startAnimation = function startAnimation() {
|
|
119
99
|
if (this.isUnmounted) {
|
|
120
100
|
return;
|
|
121
101
|
}
|
|
@@ -125,38 +105,39 @@ var CarouselItem = function (_React$Component) {
|
|
|
125
105
|
});
|
|
126
106
|
};
|
|
127
107
|
|
|
128
|
-
|
|
129
|
-
var
|
|
130
|
-
direction =
|
|
131
|
-
active =
|
|
132
|
-
animateIn =
|
|
133
|
-
animateOut =
|
|
134
|
-
className =
|
|
135
|
-
props = (0,
|
|
136
|
-
|
|
137
|
-
|
|
108
|
+
_proto.render = function render() {
|
|
109
|
+
var _this$props = this.props,
|
|
110
|
+
direction = _this$props.direction,
|
|
111
|
+
active = _this$props.active,
|
|
112
|
+
animateIn = _this$props.animateIn,
|
|
113
|
+
animateOut = _this$props.animateOut,
|
|
114
|
+
className = _this$props.className,
|
|
115
|
+
props = (0, _objectWithoutPropertiesLoose2.default)(_this$props, ["direction", "active", "animateIn", "animateOut", "className"]);
|
|
138
116
|
delete props.onAnimateOutEnd;
|
|
139
117
|
delete props.index;
|
|
140
|
-
|
|
141
118
|
var classes = {
|
|
142
119
|
item: true,
|
|
143
120
|
active: active && !animateIn || animateOut
|
|
144
121
|
};
|
|
122
|
+
|
|
145
123
|
if (direction && active && animateIn) {
|
|
146
124
|
classes[direction] = true;
|
|
147
125
|
}
|
|
126
|
+
|
|
148
127
|
if (this.state.direction && (animateIn || animateOut)) {
|
|
149
128
|
classes[this.state.direction] = true;
|
|
150
129
|
}
|
|
151
130
|
|
|
152
|
-
return
|
|
131
|
+
return _react.default.createElement("div", (0, _extends2.default)({}, props, {
|
|
132
|
+
className: (0, _classnames.default)(className, classes)
|
|
133
|
+
}));
|
|
153
134
|
};
|
|
154
135
|
|
|
155
136
|
return CarouselItem;
|
|
156
|
-
}(
|
|
137
|
+
}(_react.default.Component);
|
|
157
138
|
|
|
158
139
|
CarouselItem.propTypes = propTypes;
|
|
159
140
|
CarouselItem.defaultProps = defaultProps;
|
|
160
|
-
|
|
161
|
-
exports.default =
|
|
162
|
-
module.exports = exports[
|
|
141
|
+
var _default = CarouselItem;
|
|
142
|
+
exports.default = _default;
|
|
143
|
+
module.exports = exports["default"];
|
package/lib/Checkbox.js
CHANGED
|
@@ -1,55 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _extends2 = require('babel-runtime/helpers/extends');
|
|
6
|
-
|
|
7
|
-
var _extends3 = _interopRequireDefault(_extends2);
|
|
8
|
-
|
|
9
|
-
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
|
10
|
-
|
|
11
|
-
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
|
12
|
-
|
|
13
|
-
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
14
|
-
|
|
15
|
-
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
16
|
-
|
|
17
|
-
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
|
18
|
-
|
|
19
|
-
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
|
20
|
-
|
|
21
|
-
var _inherits2 = require('babel-runtime/helpers/inherits');
|
|
22
|
-
|
|
23
|
-
var _inherits3 = _interopRequireDefault(_inherits2);
|
|
24
|
-
|
|
25
|
-
var _classnames = require('classnames');
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
26
4
|
|
|
27
|
-
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
28
7
|
|
|
29
|
-
var
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/extends"));
|
|
30
9
|
|
|
31
|
-
var
|
|
10
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/objectWithoutPropertiesLoose"));
|
|
32
11
|
|
|
33
|
-
var
|
|
12
|
+
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inheritsLoose"));
|
|
34
13
|
|
|
35
|
-
var
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
36
15
|
|
|
37
|
-
var
|
|
16
|
+
var _react = _interopRequireDefault(require("react"));
|
|
38
17
|
|
|
39
|
-
var
|
|
18
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
40
19
|
|
|
41
|
-
var
|
|
20
|
+
var _warning = _interopRequireDefault(require("warning"));
|
|
42
21
|
|
|
43
|
-
|
|
22
|
+
var _bootstrapUtils = require("./utils/bootstrapUtils");
|
|
44
23
|
|
|
24
|
+
/* eslint-disable jsx-a11y/label-has-for */
|
|
45
25
|
var propTypes = {
|
|
46
|
-
inline:
|
|
47
|
-
disabled:
|
|
48
|
-
title:
|
|
26
|
+
inline: _propTypes.default.bool,
|
|
27
|
+
disabled: _propTypes.default.bool,
|
|
28
|
+
title: _propTypes.default.string,
|
|
29
|
+
|
|
49
30
|
/**
|
|
50
31
|
* Only valid if `inline` is not set.
|
|
51
32
|
*/
|
|
52
|
-
validationState:
|
|
33
|
+
validationState: _propTypes.default.oneOf(['success', 'warning', 'error', null]),
|
|
34
|
+
|
|
53
35
|
/**
|
|
54
36
|
* Attaches a ref to the `<input>` element. Only functions can be used here.
|
|
55
37
|
*
|
|
@@ -57,90 +39,85 @@ var propTypes = {
|
|
|
57
39
|
* <Checkbox inputRef={ref => { this.input = ref; }} />
|
|
58
40
|
* ```
|
|
59
41
|
*/
|
|
60
|
-
inputRef:
|
|
61
|
-
};
|
|
62
|
-
|
|
42
|
+
inputRef: _propTypes.default.func
|
|
43
|
+
};
|
|
63
44
|
var defaultProps = {
|
|
64
45
|
inline: false,
|
|
65
46
|
disabled: false,
|
|
66
47
|
title: ''
|
|
67
48
|
};
|
|
68
49
|
|
|
69
|
-
var Checkbox =
|
|
70
|
-
|
|
50
|
+
var Checkbox =
|
|
51
|
+
/*#__PURE__*/
|
|
52
|
+
function (_React$Component) {
|
|
53
|
+
(0, _inheritsLoose2.default)(Checkbox, _React$Component);
|
|
71
54
|
|
|
72
55
|
function Checkbox() {
|
|
73
|
-
|
|
74
|
-
return (0, _possibleConstructorReturn3.default)(this, _React$Component.apply(this, arguments));
|
|
56
|
+
return _React$Component.apply(this, arguments) || this;
|
|
75
57
|
}
|
|
76
58
|
|
|
77
|
-
Checkbox.prototype
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
59
|
+
var _proto = Checkbox.prototype;
|
|
60
|
+
|
|
61
|
+
_proto.render = function render() {
|
|
62
|
+
var _this$props = this.props,
|
|
63
|
+
inline = _this$props.inline,
|
|
64
|
+
disabled = _this$props.disabled,
|
|
65
|
+
validationState = _this$props.validationState,
|
|
66
|
+
inputRef = _this$props.inputRef,
|
|
67
|
+
className = _this$props.className,
|
|
68
|
+
style = _this$props.style,
|
|
69
|
+
title = _this$props.title,
|
|
70
|
+
children = _this$props.children,
|
|
71
|
+
props = (0, _objectWithoutPropertiesLoose2.default)(_this$props, ["inline", "disabled", "validationState", "inputRef", "className", "style", "title", "children"]);
|
|
88
72
|
|
|
89
73
|
var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props),
|
|
90
74
|
bsProps = _splitBsProps[0],
|
|
91
75
|
elementProps = _splitBsProps[1];
|
|
92
76
|
|
|
93
|
-
var input =
|
|
77
|
+
var input = _react.default.createElement("input", (0, _extends2.default)({}, elementProps, {
|
|
94
78
|
ref: inputRef,
|
|
95
|
-
type:
|
|
79
|
+
type: "checkbox",
|
|
96
80
|
disabled: disabled
|
|
97
81
|
}));
|
|
98
82
|
|
|
99
83
|
if (inline) {
|
|
100
84
|
var _classes2;
|
|
101
85
|
|
|
102
|
-
var _classes = (_classes2 = {}, _classes2[(0, _bootstrapUtils.prefix)(bsProps, 'inline')] = true, _classes2.disabled = disabled, _classes2);
|
|
103
|
-
|
|
104
|
-
// Use a warning here instead of in propTypes to get better-looking
|
|
86
|
+
var _classes = (_classes2 = {}, _classes2[(0, _bootstrapUtils.prefix)(bsProps, 'inline')] = true, _classes2.disabled = disabled, _classes2); // Use a warning here instead of in propTypes to get better-looking
|
|
105
87
|
// generated documentation.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
},
|
|
115
|
-
input,
|
|
116
|
-
children
|
|
117
|
-
);
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
process.env.NODE_ENV !== "production" ? (0, _warning.default)(!validationState, '`validationState` is ignored on `<Checkbox inline>`. To display ' + 'validation state on an inline checkbox, set `validationState` on a ' + 'parent `<FormGroup>` or other element instead.') : void 0;
|
|
91
|
+
return _react.default.createElement("label", {
|
|
92
|
+
className: (0, _classnames.default)(className, _classes),
|
|
93
|
+
style: style,
|
|
94
|
+
title: title
|
|
95
|
+
}, input, children);
|
|
118
96
|
}
|
|
119
97
|
|
|
120
|
-
var classes = (0,
|
|
98
|
+
var classes = (0, _extends2.default)({}, (0, _bootstrapUtils.getClassSet)(bsProps), {
|
|
121
99
|
disabled: disabled
|
|
122
100
|
});
|
|
101
|
+
|
|
123
102
|
if (validationState) {
|
|
124
|
-
classes[
|
|
103
|
+
classes["has-" + validationState] = true;
|
|
125
104
|
}
|
|
126
105
|
|
|
127
|
-
return
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
input,
|
|
134
|
-
children
|
|
135
|
-
)
|
|
136
|
-
);
|
|
106
|
+
return _react.default.createElement("div", {
|
|
107
|
+
className: (0, _classnames.default)(className, classes),
|
|
108
|
+
style: style
|
|
109
|
+
}, _react.default.createElement("label", {
|
|
110
|
+
title: title
|
|
111
|
+
}, input, children));
|
|
137
112
|
};
|
|
138
113
|
|
|
139
114
|
return Checkbox;
|
|
140
|
-
}(
|
|
115
|
+
}(_react.default.Component);
|
|
141
116
|
|
|
142
117
|
Checkbox.propTypes = propTypes;
|
|
143
118
|
Checkbox.defaultProps = defaultProps;
|
|
144
119
|
|
|
145
|
-
|
|
146
|
-
|
|
120
|
+
var _default = (0, _bootstrapUtils.bsClass)('checkbox', Checkbox);
|
|
121
|
+
|
|
122
|
+
exports.default = _default;
|
|
123
|
+
module.exports = exports["default"];
|