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/es/InputGroupAddon.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import _extends from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
|
5
|
-
import _inherits from 'babel-runtime/helpers/inherits';
|
|
1
|
+
import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
|
6
4
|
import classNames from 'classnames';
|
|
7
5
|
import React from 'react';
|
|
8
|
-
|
|
9
6
|
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
|
10
7
|
|
|
11
|
-
var InputGroupAddon =
|
|
12
|
-
|
|
8
|
+
var InputGroupAddon =
|
|
9
|
+
/*#__PURE__*/
|
|
10
|
+
function (_React$Component) {
|
|
11
|
+
_inheritsLoose(InputGroupAddon, _React$Component);
|
|
13
12
|
|
|
14
13
|
function InputGroupAddon() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
14
|
+
return _React$Component.apply(this, arguments) || this;
|
|
18
15
|
}
|
|
19
16
|
|
|
20
|
-
InputGroupAddon.prototype
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
var _proto = InputGroupAddon.prototype;
|
|
18
|
+
|
|
19
|
+
_proto.render = function render() {
|
|
20
|
+
var _this$props = this.props,
|
|
21
|
+
className = _this$props.className,
|
|
22
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["className"]);
|
|
24
23
|
|
|
25
24
|
var _splitBsProps = splitBsProps(props),
|
|
26
25
|
bsProps = _splitBsProps[0],
|
|
27
26
|
elementProps = _splitBsProps[1];
|
|
28
27
|
|
|
29
28
|
var classes = getClassSet(bsProps);
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
return React.createElement("span", _extends({}, elementProps, {
|
|
30
|
+
className: classNames(className, classes)
|
|
31
|
+
}));
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
return InputGroupAddon;
|
package/es/InputGroupButton.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import _extends from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
|
5
|
-
import _inherits from 'babel-runtime/helpers/inherits';
|
|
1
|
+
import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
|
6
4
|
import classNames from 'classnames';
|
|
7
5
|
import React from 'react';
|
|
8
|
-
|
|
9
6
|
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
|
10
7
|
|
|
11
|
-
var InputGroupButton =
|
|
12
|
-
|
|
8
|
+
var InputGroupButton =
|
|
9
|
+
/*#__PURE__*/
|
|
10
|
+
function (_React$Component) {
|
|
11
|
+
_inheritsLoose(InputGroupButton, _React$Component);
|
|
13
12
|
|
|
14
13
|
function InputGroupButton() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
14
|
+
return _React$Component.apply(this, arguments) || this;
|
|
18
15
|
}
|
|
19
16
|
|
|
20
|
-
InputGroupButton.prototype
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
var _proto = InputGroupButton.prototype;
|
|
18
|
+
|
|
19
|
+
_proto.render = function render() {
|
|
20
|
+
var _this$props = this.props,
|
|
21
|
+
className = _this$props.className,
|
|
22
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["className"]);
|
|
24
23
|
|
|
25
24
|
var _splitBsProps = splitBsProps(props),
|
|
26
25
|
bsProps = _splitBsProps[0],
|
|
27
26
|
elementProps = _splitBsProps[1];
|
|
28
27
|
|
|
29
28
|
var classes = getClassSet(bsProps);
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
return React.createElement("span", _extends({}, elementProps, {
|
|
30
|
+
className: classNames(className, classes)
|
|
31
|
+
}));
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
return InputGroupButton;
|
package/es/Jumbotron.js
CHANGED
|
@@ -1,44 +1,42 @@
|
|
|
1
|
-
import _extends from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
|
5
|
-
import _inherits from 'babel-runtime/helpers/inherits';
|
|
1
|
+
import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
|
6
4
|
import React from 'react';
|
|
7
5
|
import classNames from 'classnames';
|
|
8
6
|
import elementType from 'prop-types-extra/lib/elementType';
|
|
9
|
-
|
|
10
7
|
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
|
11
|
-
|
|
12
8
|
var propTypes = {
|
|
13
9
|
componentClass: elementType
|
|
14
10
|
};
|
|
15
|
-
|
|
16
11
|
var defaultProps = {
|
|
17
12
|
componentClass: 'div'
|
|
18
13
|
};
|
|
19
14
|
|
|
20
|
-
var Jumbotron =
|
|
21
|
-
|
|
15
|
+
var Jumbotron =
|
|
16
|
+
/*#__PURE__*/
|
|
17
|
+
function (_React$Component) {
|
|
18
|
+
_inheritsLoose(Jumbotron, _React$Component);
|
|
22
19
|
|
|
23
20
|
function Jumbotron() {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
21
|
+
return _React$Component.apply(this, arguments) || this;
|
|
27
22
|
}
|
|
28
23
|
|
|
29
|
-
Jumbotron.prototype
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
var _proto = Jumbotron.prototype;
|
|
25
|
+
|
|
26
|
+
_proto.render = function render() {
|
|
27
|
+
var _this$props = this.props,
|
|
28
|
+
Component = _this$props.componentClass,
|
|
29
|
+
className = _this$props.className,
|
|
30
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["componentClass", "className"]);
|
|
34
31
|
|
|
35
32
|
var _splitBsProps = splitBsProps(props),
|
|
36
33
|
bsProps = _splitBsProps[0],
|
|
37
34
|
elementProps = _splitBsProps[1];
|
|
38
35
|
|
|
39
36
|
var classes = getClassSet(bsProps);
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
return React.createElement(Component, _extends({}, elementProps, {
|
|
38
|
+
className: classNames(className, classes)
|
|
39
|
+
}));
|
|
42
40
|
};
|
|
43
41
|
|
|
44
42
|
return Jumbotron;
|
|
@@ -46,5 +44,4 @@ var Jumbotron = function (_React$Component) {
|
|
|
46
44
|
|
|
47
45
|
Jumbotron.propTypes = propTypes;
|
|
48
46
|
Jumbotron.defaultProps = defaultProps;
|
|
49
|
-
|
|
50
47
|
export default bsClass('jumbotron', Jumbotron);
|
package/es/Label.js
CHANGED
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
import _Object$values from
|
|
2
|
-
import _extends from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
|
6
|
-
import _inherits from 'babel-runtime/helpers/inherits';
|
|
1
|
+
import _Object$values from "@babel/runtime-corejs2/core-js/object/values";
|
|
2
|
+
import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
|
|
3
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
|
+
import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
|
7
5
|
import classNames from 'classnames';
|
|
8
6
|
import React from 'react';
|
|
9
|
-
|
|
10
7
|
import { bsClass, bsStyles, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
|
11
8
|
import { State, Style } from './utils/StyleConfig';
|
|
12
9
|
|
|
13
|
-
var Label =
|
|
14
|
-
|
|
10
|
+
var Label =
|
|
11
|
+
/*#__PURE__*/
|
|
12
|
+
function (_React$Component) {
|
|
13
|
+
_inheritsLoose(Label, _React$Component);
|
|
15
14
|
|
|
16
15
|
function Label() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
16
|
+
return _React$Component.apply(this, arguments) || this;
|
|
20
17
|
}
|
|
21
18
|
|
|
22
|
-
Label.prototype
|
|
23
|
-
var result = false;
|
|
19
|
+
var _proto = Label.prototype;
|
|
24
20
|
|
|
21
|
+
_proto.hasContent = function hasContent(children) {
|
|
22
|
+
var result = false;
|
|
25
23
|
React.Children.forEach(children, function (child) {
|
|
26
24
|
if (result) {
|
|
27
25
|
return;
|
|
@@ -31,34 +29,30 @@ var Label = function (_React$Component) {
|
|
|
31
29
|
result = true;
|
|
32
30
|
}
|
|
33
31
|
});
|
|
34
|
-
|
|
35
32
|
return result;
|
|
36
33
|
};
|
|
37
34
|
|
|
38
|
-
|
|
39
|
-
var
|
|
40
|
-
className =
|
|
41
|
-
children =
|
|
42
|
-
props =
|
|
35
|
+
_proto.render = function render() {
|
|
36
|
+
var _this$props = this.props,
|
|
37
|
+
className = _this$props.className,
|
|
38
|
+
children = _this$props.children,
|
|
39
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["className", "children"]);
|
|
43
40
|
|
|
44
41
|
var _splitBsProps = splitBsProps(props),
|
|
45
42
|
bsProps = _splitBsProps[0],
|
|
46
43
|
elementProps = _splitBsProps[1];
|
|
47
44
|
|
|
48
45
|
var classes = _extends({}, getClassSet(bsProps), {
|
|
49
|
-
|
|
50
46
|
// Hack for collapsing on IE8.
|
|
51
47
|
hidden: !this.hasContent(children)
|
|
52
48
|
});
|
|
53
49
|
|
|
54
|
-
return React.createElement(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
children
|
|
58
|
-
);
|
|
50
|
+
return React.createElement("span", _extends({}, elementProps, {
|
|
51
|
+
className: classNames(className, classes)
|
|
52
|
+
}), children);
|
|
59
53
|
};
|
|
60
54
|
|
|
61
55
|
return Label;
|
|
62
56
|
}(React.Component);
|
|
63
57
|
|
|
64
|
-
export default bsClass('label', bsStyles(
|
|
58
|
+
export default bsClass('label', bsStyles(_Object$values(State).concat([Style.DEFAULT, Style.PRIMARY]), Style.DEFAULT, Label));
|
package/es/ListGroup.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import _extends from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
|
5
|
-
import _inherits from 'babel-runtime/helpers/inherits';
|
|
1
|
+
import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
|
6
4
|
import classNames from 'classnames';
|
|
7
5
|
import React, { cloneElement } from 'react';
|
|
8
6
|
import elementType from 'prop-types-extra/lib/elementType';
|
|
9
|
-
|
|
10
7
|
import ListGroupItem from './ListGroupItem';
|
|
11
8
|
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
|
12
9
|
import ValidComponentChildren from './utils/ValidComponentChildren';
|
|
13
|
-
|
|
14
10
|
var propTypes = {
|
|
15
11
|
/**
|
|
16
12
|
* You can use a custom element type for this component.
|
|
@@ -36,45 +32,44 @@ function getDefaultComponent(children) {
|
|
|
36
32
|
return 'ul';
|
|
37
33
|
}
|
|
38
34
|
|
|
39
|
-
var ListGroup =
|
|
40
|
-
|
|
35
|
+
var ListGroup =
|
|
36
|
+
/*#__PURE__*/
|
|
37
|
+
function (_React$Component) {
|
|
38
|
+
_inheritsLoose(ListGroup, _React$Component);
|
|
41
39
|
|
|
42
40
|
function ListGroup() {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
41
|
+
return _React$Component.apply(this, arguments) || this;
|
|
46
42
|
}
|
|
47
43
|
|
|
48
|
-
ListGroup.prototype
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
44
|
+
var _proto = ListGroup.prototype;
|
|
45
|
+
|
|
46
|
+
_proto.render = function render() {
|
|
47
|
+
var _this$props = this.props,
|
|
48
|
+
children = _this$props.children,
|
|
49
|
+
_this$props$component = _this$props.componentClass,
|
|
50
|
+
Component = _this$props$component === void 0 ? getDefaultComponent(children) : _this$props$component,
|
|
51
|
+
className = _this$props.className,
|
|
52
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["children", "componentClass", "className"]);
|
|
55
53
|
|
|
56
54
|
var _splitBsProps = splitBsProps(props),
|
|
57
55
|
bsProps = _splitBsProps[0],
|
|
58
56
|
elementProps = _splitBsProps[1];
|
|
59
57
|
|
|
60
58
|
var classes = getClassSet(bsProps);
|
|
61
|
-
|
|
62
59
|
var useListItem = Component === 'ul' && ValidComponentChildren.every(children, function (child) {
|
|
63
60
|
return child.type === ListGroupItem;
|
|
64
61
|
});
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
);
|
|
62
|
+
return React.createElement(Component, _extends({}, elementProps, {
|
|
63
|
+
className: classNames(className, classes)
|
|
64
|
+
}), useListItem ? ValidComponentChildren.map(children, function (child) {
|
|
65
|
+
return cloneElement(child, {
|
|
66
|
+
listItem: true
|
|
67
|
+
});
|
|
68
|
+
}) : children);
|
|
73
69
|
};
|
|
74
70
|
|
|
75
71
|
return ListGroup;
|
|
76
72
|
}(React.Component);
|
|
77
73
|
|
|
78
74
|
ListGroup.propTypes = propTypes;
|
|
79
|
-
|
|
80
75
|
export default bsClass('list-group', ListGroup);
|
package/es/ListGroupItem.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import _Object$values from
|
|
2
|
-
import _extends from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
|
6
|
-
import _inherits from 'babel-runtime/helpers/inherits';
|
|
1
|
+
import _Object$values from "@babel/runtime-corejs2/core-js/object/values";
|
|
2
|
+
import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
|
|
3
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
|
+
import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
|
7
5
|
import classNames from 'classnames';
|
|
8
6
|
import React, { cloneElement } from 'react';
|
|
9
7
|
import PropTypes from 'prop-types';
|
|
10
|
-
|
|
11
8
|
import { bsClass, bsStyles, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';
|
|
12
9
|
import { State } from './utils/StyleConfig';
|
|
13
|
-
|
|
14
10
|
var propTypes = {
|
|
15
11
|
active: PropTypes.any,
|
|
16
12
|
disabled: PropTypes.any,
|
|
@@ -20,43 +16,42 @@ var propTypes = {
|
|
|
20
16
|
href: PropTypes.string,
|
|
21
17
|
type: PropTypes.string
|
|
22
18
|
};
|
|
23
|
-
|
|
24
19
|
var defaultProps = {
|
|
25
20
|
listItem: false
|
|
26
21
|
};
|
|
27
22
|
|
|
28
|
-
var ListGroupItem =
|
|
29
|
-
|
|
23
|
+
var ListGroupItem =
|
|
24
|
+
/*#__PURE__*/
|
|
25
|
+
function (_React$Component) {
|
|
26
|
+
_inheritsLoose(ListGroupItem, _React$Component);
|
|
30
27
|
|
|
31
28
|
function ListGroupItem() {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
29
|
+
return _React$Component.apply(this, arguments) || this;
|
|
35
30
|
}
|
|
36
31
|
|
|
37
|
-
ListGroupItem.prototype
|
|
32
|
+
var _proto = ListGroupItem.prototype;
|
|
33
|
+
|
|
34
|
+
_proto.renderHeader = function renderHeader(header, headingClassName) {
|
|
38
35
|
if (React.isValidElement(header)) {
|
|
39
36
|
return cloneElement(header, {
|
|
40
37
|
className: classNames(header.props.className, headingClassName)
|
|
41
38
|
});
|
|
42
39
|
}
|
|
43
40
|
|
|
44
|
-
return React.createElement(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
header
|
|
48
|
-
);
|
|
41
|
+
return React.createElement("h4", {
|
|
42
|
+
className: headingClassName
|
|
43
|
+
}, header);
|
|
49
44
|
};
|
|
50
45
|
|
|
51
|
-
|
|
52
|
-
var
|
|
53
|
-
active =
|
|
54
|
-
disabled =
|
|
55
|
-
className =
|
|
56
|
-
header =
|
|
57
|
-
listItem =
|
|
58
|
-
children =
|
|
59
|
-
props =
|
|
46
|
+
_proto.render = function render() {
|
|
47
|
+
var _this$props = this.props,
|
|
48
|
+
active = _this$props.active,
|
|
49
|
+
disabled = _this$props.disabled,
|
|
50
|
+
className = _this$props.className,
|
|
51
|
+
header = _this$props.header,
|
|
52
|
+
listItem = _this$props.listItem,
|
|
53
|
+
children = _this$props.children,
|
|
54
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["active", "disabled", "className", "header", "listItem", "children"]);
|
|
60
55
|
|
|
61
56
|
var _splitBsProps = splitBsProps(props),
|
|
62
57
|
bsProps = _splitBsProps[0],
|
|
@@ -67,7 +62,7 @@ var ListGroupItem = function (_React$Component) {
|
|
|
67
62
|
disabled: disabled
|
|
68
63
|
});
|
|
69
64
|
|
|
70
|
-
var Component
|
|
65
|
+
var Component;
|
|
71
66
|
|
|
72
67
|
if (elementProps.href) {
|
|
73
68
|
Component = 'a';
|
|
@@ -80,27 +75,15 @@ var ListGroupItem = function (_React$Component) {
|
|
|
80
75
|
Component = 'span';
|
|
81
76
|
}
|
|
82
77
|
|
|
83
|
-
elementProps.className = classNames(className, classes);
|
|
78
|
+
elementProps.className = classNames(className, classes); // TODO: Deprecate `header` prop.
|
|
84
79
|
|
|
85
|
-
// TODO: Deprecate `header` prop.
|
|
86
80
|
if (header) {
|
|
87
|
-
return React.createElement(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
this.renderHeader(header, prefix(bsProps, 'heading')),
|
|
91
|
-
React.createElement(
|
|
92
|
-
'p',
|
|
93
|
-
{ className: prefix(bsProps, 'text') },
|
|
94
|
-
children
|
|
95
|
-
)
|
|
96
|
-
);
|
|
81
|
+
return React.createElement(Component, elementProps, this.renderHeader(header, prefix(bsProps, 'heading')), React.createElement("p", {
|
|
82
|
+
className: prefix(bsProps, 'text')
|
|
83
|
+
}, children));
|
|
97
84
|
}
|
|
98
85
|
|
|
99
|
-
return React.createElement(
|
|
100
|
-
Component,
|
|
101
|
-
elementProps,
|
|
102
|
-
children
|
|
103
|
-
);
|
|
86
|
+
return React.createElement(Component, elementProps, children);
|
|
104
87
|
};
|
|
105
88
|
|
|
106
89
|
return ListGroupItem;
|
|
@@ -108,5 +91,4 @@ var ListGroupItem = function (_React$Component) {
|
|
|
108
91
|
|
|
109
92
|
ListGroupItem.propTypes = propTypes;
|
|
110
93
|
ListGroupItem.defaultProps = defaultProps;
|
|
111
|
-
|
|
112
94
|
export default bsClass('list-group-item', bsStyles(_Object$values(State), ListGroupItem));
|
package/es/Media.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import _extends from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
|
5
|
-
import _inherits from 'babel-runtime/helpers/inherits';
|
|
1
|
+
import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
|
6
4
|
import classNames from 'classnames';
|
|
7
5
|
import React from 'react';
|
|
8
6
|
import elementType from 'prop-types-extra/lib/elementType';
|
|
9
|
-
|
|
10
7
|
import MediaBody from './MediaBody';
|
|
11
8
|
import MediaHeading from './MediaHeading';
|
|
12
9
|
import MediaLeft from './MediaLeft';
|
|
@@ -14,37 +11,38 @@ import MediaList from './MediaList';
|
|
|
14
11
|
import MediaListItem from './MediaListItem';
|
|
15
12
|
import MediaRight from './MediaRight';
|
|
16
13
|
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
|
17
|
-
|
|
18
14
|
var propTypes = {
|
|
19
15
|
componentClass: elementType
|
|
20
16
|
};
|
|
21
|
-
|
|
22
17
|
var defaultProps = {
|
|
23
18
|
componentClass: 'div'
|
|
24
19
|
};
|
|
25
20
|
|
|
26
|
-
var Media =
|
|
27
|
-
|
|
21
|
+
var Media =
|
|
22
|
+
/*#__PURE__*/
|
|
23
|
+
function (_React$Component) {
|
|
24
|
+
_inheritsLoose(Media, _React$Component);
|
|
28
25
|
|
|
29
26
|
function Media() {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
27
|
+
return _React$Component.apply(this, arguments) || this;
|
|
33
28
|
}
|
|
34
29
|
|
|
35
|
-
Media.prototype
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
var _proto = Media.prototype;
|
|
31
|
+
|
|
32
|
+
_proto.render = function render() {
|
|
33
|
+
var _this$props = this.props,
|
|
34
|
+
Component = _this$props.componentClass,
|
|
35
|
+
className = _this$props.className,
|
|
36
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["componentClass", "className"]);
|
|
40
37
|
|
|
41
38
|
var _splitBsProps = splitBsProps(props),
|
|
42
39
|
bsProps = _splitBsProps[0],
|
|
43
40
|
elementProps = _splitBsProps[1];
|
|
44
41
|
|
|
45
42
|
var classes = getClassSet(bsProps);
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
return React.createElement(Component, _extends({}, elementProps, {
|
|
44
|
+
className: classNames(className, classes)
|
|
45
|
+
}));
|
|
48
46
|
};
|
|
49
47
|
|
|
50
48
|
return Media;
|
|
@@ -52,12 +50,10 @@ var Media = function (_React$Component) {
|
|
|
52
50
|
|
|
53
51
|
Media.propTypes = propTypes;
|
|
54
52
|
Media.defaultProps = defaultProps;
|
|
55
|
-
|
|
56
53
|
Media.Heading = MediaHeading;
|
|
57
54
|
Media.Body = MediaBody;
|
|
58
55
|
Media.Left = MediaLeft;
|
|
59
56
|
Media.Right = MediaRight;
|
|
60
57
|
Media.List = MediaList;
|
|
61
58
|
Media.ListItem = MediaListItem;
|
|
62
|
-
|
|
63
59
|
export default bsClass('media', Media);
|
package/es/MediaBody.js
CHANGED
|
@@ -1,44 +1,40 @@
|
|
|
1
|
-
import _extends from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
|
5
|
-
import _inherits from 'babel-runtime/helpers/inherits';
|
|
1
|
+
import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
|
6
4
|
import classNames from 'classnames';
|
|
7
5
|
import React from 'react';
|
|
8
6
|
import PropTypes from 'prop-types';
|
|
9
7
|
import elementType from 'prop-types-extra/lib/elementType';
|
|
10
|
-
|
|
11
8
|
import Media from './Media';
|
|
12
9
|
import { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';
|
|
13
|
-
|
|
14
10
|
var propTypes = {
|
|
15
11
|
/**
|
|
16
12
|
* Align the media to the top, middle, or bottom of the media object.
|
|
17
13
|
*/
|
|
18
14
|
align: PropTypes.oneOf(['top', 'middle', 'bottom']),
|
|
19
|
-
|
|
20
15
|
componentClass: elementType
|
|
21
16
|
};
|
|
22
|
-
|
|
23
17
|
var defaultProps = {
|
|
24
18
|
componentClass: 'div'
|
|
25
19
|
};
|
|
26
20
|
|
|
27
|
-
var MediaBody =
|
|
28
|
-
|
|
21
|
+
var MediaBody =
|
|
22
|
+
/*#__PURE__*/
|
|
23
|
+
function (_React$Component) {
|
|
24
|
+
_inheritsLoose(MediaBody, _React$Component);
|
|
29
25
|
|
|
30
26
|
function MediaBody() {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
27
|
+
return _React$Component.apply(this, arguments) || this;
|
|
34
28
|
}
|
|
35
29
|
|
|
36
|
-
MediaBody.prototype
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
var _proto = MediaBody.prototype;
|
|
31
|
+
|
|
32
|
+
_proto.render = function render() {
|
|
33
|
+
var _this$props = this.props,
|
|
34
|
+
Component = _this$props.componentClass,
|
|
35
|
+
align = _this$props.align,
|
|
36
|
+
className = _this$props.className,
|
|
37
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["componentClass", "align", "className"]);
|
|
42
38
|
|
|
43
39
|
var _splitBsProps = splitBsProps(props),
|
|
44
40
|
bsProps = _splitBsProps[0],
|
|
@@ -51,7 +47,9 @@ var MediaBody = function (_React$Component) {
|
|
|
51
47
|
classes[prefix(Media.defaultProps, align)] = true;
|
|
52
48
|
}
|
|
53
49
|
|
|
54
|
-
return React.createElement(Component, _extends({}, elementProps, {
|
|
50
|
+
return React.createElement(Component, _extends({}, elementProps, {
|
|
51
|
+
className: classNames(className, classes)
|
|
52
|
+
}));
|
|
55
53
|
};
|
|
56
54
|
|
|
57
55
|
return MediaBody;
|
|
@@ -59,5 +57,4 @@ var MediaBody = function (_React$Component) {
|
|
|
59
57
|
|
|
60
58
|
MediaBody.propTypes = propTypes;
|
|
61
59
|
MediaBody.defaultProps = defaultProps;
|
|
62
|
-
|
|
63
60
|
export default bsClass('media-body', MediaBody);
|