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/PanelCollapse.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import _extends from
|
|
2
|
-
import
|
|
3
|
-
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
|
4
|
-
import _inherits from 'babel-runtime/helpers/inherits';
|
|
1
|
+
import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
|
|
2
|
+
import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
|
5
3
|
import PropTypes from 'prop-types';
|
|
6
4
|
import React from 'react';
|
|
7
|
-
|
|
8
5
|
import { prefix, splitBsProps, bsClass } from './utils/bootstrapUtils';
|
|
9
6
|
import Collapse from './Collapse';
|
|
10
|
-
|
|
11
7
|
var propTypes = {
|
|
12
8
|
/**
|
|
13
9
|
* Callback fired before the component expands
|
|
14
10
|
*/
|
|
15
11
|
onEnter: PropTypes.func,
|
|
12
|
+
|
|
16
13
|
/**
|
|
17
14
|
* Callback fired after the component starts to expand
|
|
18
15
|
*/
|
|
19
16
|
onEntering: PropTypes.func,
|
|
17
|
+
|
|
20
18
|
/**
|
|
21
19
|
* Callback fired after the component has expanded
|
|
22
20
|
*/
|
|
23
21
|
onEntered: PropTypes.func,
|
|
22
|
+
|
|
24
23
|
/**
|
|
25
24
|
* Callback fired before the component collapses
|
|
26
25
|
*/
|
|
27
26
|
onExit: PropTypes.func,
|
|
27
|
+
|
|
28
28
|
/**
|
|
29
29
|
* Callback fired after the component starts to collapse
|
|
30
30
|
*/
|
|
31
31
|
onExiting: PropTypes.func,
|
|
32
|
+
|
|
32
33
|
/**
|
|
33
34
|
* Callback fired after the component has collapsed
|
|
34
35
|
*/
|
|
35
36
|
onExited: PropTypes.func
|
|
36
37
|
};
|
|
37
|
-
|
|
38
38
|
var contextTypes = {
|
|
39
39
|
$bs_panel: PropTypes.shape({
|
|
40
40
|
headingId: PropTypes.string,
|
|
@@ -44,16 +44,18 @@ var contextTypes = {
|
|
|
44
44
|
})
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
var PanelCollapse =
|
|
48
|
-
|
|
47
|
+
var PanelCollapse =
|
|
48
|
+
/*#__PURE__*/
|
|
49
|
+
function (_React$Component) {
|
|
50
|
+
_inheritsLoose(PanelCollapse, _React$Component);
|
|
49
51
|
|
|
50
52
|
function PanelCollapse() {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
53
|
+
return _React$Component.apply(this, arguments) || this;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
PanelCollapse.prototype
|
|
56
|
+
var _proto = PanelCollapse.prototype;
|
|
57
|
+
|
|
58
|
+
_proto.render = function render() {
|
|
57
59
|
var children = this.props.children;
|
|
58
60
|
|
|
59
61
|
var _ref = this.context.$bs_panel || {},
|
|
@@ -74,15 +76,11 @@ var PanelCollapse = function (_React$Component) {
|
|
|
74
76
|
props['aria-labelledby'] = headingId;
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
return React.createElement(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
{ className: prefix(bsProps, 'collapse') },
|
|
83
|
-
children
|
|
84
|
-
)
|
|
85
|
-
);
|
|
79
|
+
return React.createElement(Collapse, _extends({
|
|
80
|
+
in: expanded
|
|
81
|
+
}, props), React.createElement("div", {
|
|
82
|
+
className: prefix(bsProps, 'collapse')
|
|
83
|
+
}, children));
|
|
86
84
|
};
|
|
87
85
|
|
|
88
86
|
return PanelCollapse;
|
|
@@ -90,5 +88,4 @@ var PanelCollapse = function (_React$Component) {
|
|
|
90
88
|
|
|
91
89
|
PanelCollapse.propTypes = propTypes;
|
|
92
90
|
PanelCollapse.contextTypes = contextTypes;
|
|
93
|
-
|
|
94
91
|
export default bsClass('panel', PanelCollapse);
|
package/es/PanelFooter.js
CHANGED
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
import _extends from
|
|
2
|
-
import
|
|
3
|
-
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
|
4
|
-
import _inherits from 'babel-runtime/helpers/inherits';
|
|
1
|
+
import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
|
|
2
|
+
import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
|
5
3
|
import PropTypes from 'prop-types';
|
|
6
4
|
import React from 'react';
|
|
7
5
|
import cn from 'classnames';
|
|
8
6
|
import { prefix, bsClass, splitBsProps } from './utils/bootstrapUtils';
|
|
9
|
-
|
|
10
7
|
var contextTypes = {
|
|
11
8
|
$bs_panel: PropTypes.shape({
|
|
12
9
|
bsClass: PropTypes.string
|
|
13
10
|
})
|
|
14
11
|
};
|
|
15
12
|
|
|
16
|
-
var PanelFooter =
|
|
17
|
-
|
|
13
|
+
var PanelFooter =
|
|
14
|
+
/*#__PURE__*/
|
|
15
|
+
function (_React$Component) {
|
|
16
|
+
_inheritsLoose(PanelFooter, _React$Component);
|
|
18
17
|
|
|
19
18
|
function PanelFooter() {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
19
|
+
return _React$Component.apply(this, arguments) || this;
|
|
23
20
|
}
|
|
24
21
|
|
|
25
|
-
PanelFooter.prototype
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
var _proto = PanelFooter.prototype;
|
|
23
|
+
|
|
24
|
+
_proto.render = function render() {
|
|
25
|
+
var _this$props = this.props,
|
|
26
|
+
children = _this$props.children,
|
|
27
|
+
className = _this$props.className;
|
|
29
28
|
|
|
30
29
|
var _ref = this.context.$bs_panel || {},
|
|
31
30
|
_bsClass = _ref.bsClass;
|
|
@@ -35,19 +34,13 @@ var PanelFooter = function (_React$Component) {
|
|
|
35
34
|
elementProps = _splitBsProps[1];
|
|
36
35
|
|
|
37
36
|
bsProps.bsClass = _bsClass || bsProps.bsClass;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
_extends({}, elementProps, {
|
|
42
|
-
className: cn(className, prefix(bsProps, 'footer'))
|
|
43
|
-
}),
|
|
44
|
-
children
|
|
45
|
-
);
|
|
37
|
+
return React.createElement("div", _extends({}, elementProps, {
|
|
38
|
+
className: cn(className, prefix(bsProps, 'footer'))
|
|
39
|
+
}), children);
|
|
46
40
|
};
|
|
47
41
|
|
|
48
42
|
return PanelFooter;
|
|
49
43
|
}(React.Component);
|
|
50
44
|
|
|
51
45
|
PanelFooter.contextTypes = contextTypes;
|
|
52
|
-
|
|
53
46
|
export default bsClass('panel', PanelFooter);
|
package/es/PanelGroup.js
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _extends from
|
|
3
|
-
import
|
|
4
|
-
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
|
5
|
-
import _inherits from 'babel-runtime/helpers/inherits';
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
|
|
3
|
+
import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
|
6
4
|
import classNames from 'classnames';
|
|
7
5
|
import PropTypes from 'prop-types';
|
|
8
6
|
import React, { cloneElement } from 'react';
|
|
9
7
|
import uncontrollable from 'uncontrollable';
|
|
10
|
-
|
|
11
8
|
import { bsClass, getClassSet, splitBsPropsAndOmit } from './utils/bootstrapUtils';
|
|
12
9
|
import ValidComponentChildren from './utils/ValidComponentChildren';
|
|
13
10
|
import { generatedId } from './utils/PropTypes';
|
|
14
|
-
|
|
15
11
|
var propTypes = {
|
|
16
12
|
accordion: PropTypes.bool,
|
|
13
|
+
|
|
17
14
|
/**
|
|
18
15
|
* When `accordion` is enabled, `activeKey` controls the which child `Panel` is expanded. `activeKey` should
|
|
19
16
|
* match a child Panel `eventKey` prop exactly.
|
|
@@ -52,11 +49,9 @@ var propTypes = {
|
|
|
52
49
|
*/
|
|
53
50
|
id: generatedId('PanelGroup')
|
|
54
51
|
};
|
|
55
|
-
|
|
56
52
|
var defaultProps = {
|
|
57
53
|
accordion: false
|
|
58
54
|
};
|
|
59
|
-
|
|
60
55
|
var childContextTypes = {
|
|
61
56
|
$bs_panelGroup: PropTypes.shape({
|
|
62
57
|
getId: PropTypes.func,
|
|
@@ -67,30 +62,44 @@ var childContextTypes = {
|
|
|
67
62
|
})
|
|
68
63
|
};
|
|
69
64
|
|
|
70
|
-
var PanelGroup =
|
|
71
|
-
|
|
65
|
+
var PanelGroup =
|
|
66
|
+
/*#__PURE__*/
|
|
67
|
+
function (_React$Component) {
|
|
68
|
+
_inheritsLoose(PanelGroup, _React$Component);
|
|
69
|
+
|
|
70
|
+
function PanelGroup() {
|
|
71
|
+
var _this;
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
74
|
+
args[_key] = arguments[_key];
|
|
75
|
+
}
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
78
|
+
|
|
79
|
+
_this.handleSelect = function (key, expanded, e) {
|
|
80
|
+
if (expanded) {
|
|
81
|
+
_this.props.onSelect(key, e);
|
|
82
|
+
} else if (_this.props.activeKey === key) {
|
|
83
|
+
_this.props.onSelect(null, e);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
77
86
|
|
|
78
|
-
_this.handleSelect = _this.handleSelect.bind(_this);
|
|
79
87
|
return _this;
|
|
80
88
|
}
|
|
81
89
|
|
|
82
|
-
PanelGroup.prototype
|
|
83
|
-
var _props = this.props,
|
|
84
|
-
activeKey = _props.activeKey,
|
|
85
|
-
accordion = _props.accordion,
|
|
86
|
-
generateChildId = _props.generateChildId,
|
|
87
|
-
id = _props.id;
|
|
90
|
+
var _proto = PanelGroup.prototype;
|
|
88
91
|
|
|
92
|
+
_proto.getChildContext = function getChildContext() {
|
|
93
|
+
var _this$props = this.props,
|
|
94
|
+
activeKey = _this$props.activeKey,
|
|
95
|
+
accordion = _this$props.accordion,
|
|
96
|
+
generateChildId = _this$props.generateChildId,
|
|
97
|
+
id = _this$props.id;
|
|
89
98
|
var getId = null;
|
|
90
99
|
|
|
91
100
|
if (accordion) {
|
|
92
101
|
getId = generateChildId || function (key, type) {
|
|
93
|
-
return id ? id +
|
|
102
|
+
return id ? id + "-" + type + "-" + key : null;
|
|
94
103
|
};
|
|
95
104
|
}
|
|
96
105
|
|
|
@@ -106,18 +115,12 @@ var PanelGroup = function (_React$Component) {
|
|
|
106
115
|
};
|
|
107
116
|
};
|
|
108
117
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
PanelGroup.prototype.render = function render() {
|
|
116
|
-
var _props2 = this.props,
|
|
117
|
-
accordion = _props2.accordion,
|
|
118
|
-
className = _props2.className,
|
|
119
|
-
children = _props2.children,
|
|
120
|
-
props = _objectWithoutProperties(_props2, ['accordion', 'className', 'children']);
|
|
118
|
+
_proto.render = function render() {
|
|
119
|
+
var _this$props2 = this.props,
|
|
120
|
+
accordion = _this$props2.accordion,
|
|
121
|
+
className = _this$props2.className,
|
|
122
|
+
children = _this$props2.children,
|
|
123
|
+
props = _objectWithoutPropertiesLoose(_this$props2, ["accordion", "className", "children"]);
|
|
121
124
|
|
|
122
125
|
var _splitBsPropsAndOmit = splitBsPropsAndOmit(props, ['onSelect', 'activeKey']),
|
|
123
126
|
bsProps = _splitBsPropsAndOmit[0],
|
|
@@ -128,16 +131,13 @@ var PanelGroup = function (_React$Component) {
|
|
|
128
131
|
}
|
|
129
132
|
|
|
130
133
|
var classes = getClassSet(bsProps);
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
});
|
|
139
|
-
})
|
|
140
|
-
);
|
|
134
|
+
return React.createElement("div", _extends({}, elementProps, {
|
|
135
|
+
className: classNames(className, classes)
|
|
136
|
+
}), ValidComponentChildren.map(children, function (child) {
|
|
137
|
+
return cloneElement(child, {
|
|
138
|
+
bsStyle: child.props.bsStyle || bsProps.bsStyle
|
|
139
|
+
});
|
|
140
|
+
}));
|
|
141
141
|
};
|
|
142
142
|
|
|
143
143
|
return PanelGroup;
|
|
@@ -146,7 +146,6 @@ var PanelGroup = function (_React$Component) {
|
|
|
146
146
|
PanelGroup.propTypes = propTypes;
|
|
147
147
|
PanelGroup.defaultProps = defaultProps;
|
|
148
148
|
PanelGroup.childContextTypes = childContextTypes;
|
|
149
|
-
|
|
150
149
|
export default uncontrollable(bsClass('panel-group', PanelGroup), {
|
|
151
150
|
activeKey: 'onSelect'
|
|
152
151
|
});
|
package/es/PanelHeading.js
CHANGED
|
@@ -1,23 +1,17 @@
|
|
|
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 PropTypes from 'prop-types';
|
|
7
5
|
import React from 'react';
|
|
8
6
|
import cn from 'classnames';
|
|
9
7
|
import elementType from 'react-prop-types/lib/elementType';
|
|
10
|
-
|
|
11
8
|
import { prefix, bsClass, splitBsProps } from './utils/bootstrapUtils';
|
|
12
|
-
|
|
13
9
|
var propTypes = {
|
|
14
10
|
componentClass: elementType
|
|
15
11
|
};
|
|
16
|
-
|
|
17
12
|
var defaultProps = {
|
|
18
13
|
componentClass: 'div'
|
|
19
14
|
};
|
|
20
|
-
|
|
21
15
|
var contextTypes = {
|
|
22
16
|
$bs_panel: PropTypes.shape({
|
|
23
17
|
headingId: PropTypes.string,
|
|
@@ -25,21 +19,23 @@ var contextTypes = {
|
|
|
25
19
|
})
|
|
26
20
|
};
|
|
27
21
|
|
|
28
|
-
var PanelHeading =
|
|
29
|
-
|
|
22
|
+
var PanelHeading =
|
|
23
|
+
/*#__PURE__*/
|
|
24
|
+
function (_React$Component) {
|
|
25
|
+
_inheritsLoose(PanelHeading, _React$Component);
|
|
30
26
|
|
|
31
27
|
function PanelHeading() {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
28
|
+
return _React$Component.apply(this, arguments) || this;
|
|
35
29
|
}
|
|
36
30
|
|
|
37
|
-
PanelHeading.prototype
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
var _proto = PanelHeading.prototype;
|
|
32
|
+
|
|
33
|
+
_proto.render = function render() {
|
|
34
|
+
var _this$props = this.props,
|
|
35
|
+
children = _this$props.children,
|
|
36
|
+
className = _this$props.className,
|
|
37
|
+
Component = _this$props.componentClass,
|
|
38
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["children", "className", "componentClass"]);
|
|
43
39
|
|
|
44
40
|
var _ref = this.context.$bs_panel || {},
|
|
45
41
|
headingId = _ref.headingId,
|
|
@@ -56,13 +52,9 @@ var PanelHeading = function (_React$Component) {
|
|
|
56
52
|
elementProps.id = headingId;
|
|
57
53
|
}
|
|
58
54
|
|
|
59
|
-
return React.createElement(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
className: cn(className, prefix(bsProps, 'heading'))
|
|
63
|
-
}),
|
|
64
|
-
children
|
|
65
|
-
);
|
|
55
|
+
return React.createElement(Component, _extends({}, elementProps, {
|
|
56
|
+
className: cn(className, prefix(bsProps, 'heading'))
|
|
57
|
+
}), children);
|
|
66
58
|
};
|
|
67
59
|
|
|
68
60
|
return PanelHeading;
|
|
@@ -71,5 +63,4 @@ var PanelHeading = function (_React$Component) {
|
|
|
71
63
|
PanelHeading.propTypes = propTypes;
|
|
72
64
|
PanelHeading.defaultProps = defaultProps;
|
|
73
65
|
PanelHeading.contextTypes = contextTypes;
|
|
74
|
-
|
|
75
66
|
export default bsClass('panel', PanelHeading);
|
package/es/PanelTitle.js
CHANGED
|
@@ -1,51 +1,48 @@
|
|
|
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 cn from 'classnames';
|
|
7
5
|
import PropTypes from 'prop-types';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
import elementType from 'react-prop-types/lib/elementType';
|
|
10
|
-
|
|
11
8
|
import { prefix, splitBsProps, bsClass } from './utils/bootstrapUtils';
|
|
12
9
|
import PanelToggle from './PanelToggle';
|
|
13
|
-
|
|
14
10
|
var propTypes = {
|
|
15
11
|
componentClass: elementType,
|
|
12
|
+
|
|
16
13
|
/**
|
|
17
14
|
* A convenience prop that renders the Panel.Title as a panel collapse toggle component
|
|
18
15
|
* for the common use-case.
|
|
19
16
|
*/
|
|
20
17
|
toggle: PropTypes.bool
|
|
21
18
|
};
|
|
22
|
-
|
|
23
19
|
var contextTypes = {
|
|
24
20
|
$bs_panel: PropTypes.shape({
|
|
25
21
|
bsClass: PropTypes.string
|
|
26
22
|
})
|
|
27
23
|
};
|
|
28
|
-
|
|
29
24
|
var defaultProps = {
|
|
30
25
|
componentClass: 'div'
|
|
31
26
|
};
|
|
32
27
|
|
|
33
|
-
var PanelTitle =
|
|
34
|
-
|
|
28
|
+
var PanelTitle =
|
|
29
|
+
/*#__PURE__*/
|
|
30
|
+
function (_React$Component) {
|
|
31
|
+
_inheritsLoose(PanelTitle, _React$Component);
|
|
35
32
|
|
|
36
33
|
function PanelTitle() {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
34
|
+
return _React$Component.apply(this, arguments) || this;
|
|
40
35
|
}
|
|
41
36
|
|
|
42
|
-
PanelTitle.prototype
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
var _proto = PanelTitle.prototype;
|
|
38
|
+
|
|
39
|
+
_proto.render = function render() {
|
|
40
|
+
var _this$props = this.props,
|
|
41
|
+
children = _this$props.children,
|
|
42
|
+
className = _this$props.className,
|
|
43
|
+
toggle = _this$props.toggle,
|
|
44
|
+
Component = _this$props.componentClass,
|
|
45
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["children", "className", "toggle", "componentClass"]);
|
|
49
46
|
|
|
50
47
|
var _ref = this.context.$bs_panel || {},
|
|
51
48
|
_bsClass = _ref.bsClass;
|
|
@@ -57,20 +54,12 @@ var PanelTitle = function (_React$Component) {
|
|
|
57
54
|
bsProps.bsClass = _bsClass || bsProps.bsClass;
|
|
58
55
|
|
|
59
56
|
if (toggle) {
|
|
60
|
-
children = React.createElement(
|
|
61
|
-
PanelToggle,
|
|
62
|
-
null,
|
|
63
|
-
children
|
|
64
|
-
);
|
|
57
|
+
children = React.createElement(PanelToggle, null, children);
|
|
65
58
|
}
|
|
66
59
|
|
|
67
|
-
return React.createElement(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
className: cn(className, prefix(bsProps, 'title'))
|
|
71
|
-
}),
|
|
72
|
-
children
|
|
73
|
-
);
|
|
60
|
+
return React.createElement(Component, _extends({}, elementProps, {
|
|
61
|
+
className: cn(className, prefix(bsProps, 'title'))
|
|
62
|
+
}), children);
|
|
74
63
|
};
|
|
75
64
|
|
|
76
65
|
return PanelTitle;
|
|
@@ -79,5 +68,4 @@ var PanelTitle = function (_React$Component) {
|
|
|
79
68
|
PanelTitle.propTypes = propTypes;
|
|
80
69
|
PanelTitle.defaultProps = defaultProps;
|
|
81
70
|
PanelTitle.contextTypes = contextTypes;
|
|
82
|
-
|
|
83
71
|
export default bsClass('panel', PanelTitle);
|
package/es/PanelToggle.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import _inherits from 'babel-runtime/helpers/inherits';
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
|
3
|
+
import _assertThisInitialized from "@babel/runtime-corejs2/helpers/esm/assertThisInitialized";
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
6
5
|
import React from 'react';
|
|
7
6
|
import classNames from 'classnames';
|
|
8
7
|
import elementType from 'react-prop-types/lib/elementType';
|
|
9
8
|
import SafeAnchor from './SafeAnchor';
|
|
10
9
|
import createChainedFunction from './utils/createChainedFunction';
|
|
11
|
-
|
|
12
10
|
var propTypes = {
|
|
13
11
|
/**
|
|
14
12
|
* only here to satisfy linting, just the html onClick handler.
|
|
@@ -16,16 +14,15 @@ var propTypes = {
|
|
|
16
14
|
* @private
|
|
17
15
|
*/
|
|
18
16
|
onClick: PropTypes.func,
|
|
17
|
+
|
|
19
18
|
/**
|
|
20
19
|
* You can use a custom element for this component
|
|
21
20
|
*/
|
|
22
21
|
componentClass: elementType
|
|
23
22
|
};
|
|
24
|
-
|
|
25
23
|
var defaultProps = {
|
|
26
24
|
componentClass: SafeAnchor
|
|
27
25
|
};
|
|
28
|
-
|
|
29
26
|
var contextTypes = {
|
|
30
27
|
$bs_panel: PropTypes.shape({
|
|
31
28
|
bodyId: PropTypes.string,
|
|
@@ -34,23 +31,26 @@ var contextTypes = {
|
|
|
34
31
|
})
|
|
35
32
|
};
|
|
36
33
|
|
|
37
|
-
var PanelToggle =
|
|
38
|
-
|
|
34
|
+
var PanelToggle =
|
|
35
|
+
/*#__PURE__*/
|
|
36
|
+
function (_React$Component) {
|
|
37
|
+
_inheritsLoose(PanelToggle, _React$Component);
|
|
39
38
|
|
|
40
39
|
function PanelToggle() {
|
|
41
|
-
|
|
40
|
+
var _this;
|
|
42
41
|
|
|
43
|
-
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
42
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
44
43
|
args[_key] = arguments[_key];
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
_this.handleToggle = _this.handleToggle.bind(_this);
|
|
46
|
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
47
|
+
_this.handleToggle = _this.handleToggle.bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
|
50
48
|
return _this;
|
|
51
49
|
}
|
|
52
50
|
|
|
53
|
-
PanelToggle.prototype
|
|
51
|
+
var _proto = PanelToggle.prototype;
|
|
52
|
+
|
|
53
|
+
_proto.handleToggle = function handleToggle(event) {
|
|
54
54
|
var _ref = this.context.$bs_panel || {},
|
|
55
55
|
onToggle = _ref.onToggle;
|
|
56
56
|
|
|
@@ -59,21 +59,19 @@ var PanelToggle = function (_React$Component) {
|
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
var
|
|
64
|
-
onClick =
|
|
65
|
-
className =
|
|
66
|
-
componentClass =
|
|
67
|
-
props =
|
|
62
|
+
_proto.render = function render() {
|
|
63
|
+
var _this$props = this.props,
|
|
64
|
+
onClick = _this$props.onClick,
|
|
65
|
+
className = _this$props.className,
|
|
66
|
+
componentClass = _this$props.componentClass,
|
|
67
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["onClick", "className", "componentClass"]);
|
|
68
68
|
|
|
69
69
|
var _ref2 = this.context.$bs_panel || {},
|
|
70
70
|
expanded = _ref2.expanded,
|
|
71
71
|
bodyId = _ref2.bodyId;
|
|
72
72
|
|
|
73
73
|
var Component = componentClass;
|
|
74
|
-
|
|
75
74
|
props.onClick = createChainedFunction(onClick, this.handleToggle);
|
|
76
|
-
|
|
77
75
|
props['aria-expanded'] = expanded;
|
|
78
76
|
props.className = classNames(className, !expanded && 'collapsed');
|
|
79
77
|
|
|
@@ -90,5 +88,4 @@ var PanelToggle = function (_React$Component) {
|
|
|
90
88
|
PanelToggle.propTypes = propTypes;
|
|
91
89
|
PanelToggle.defaultProps = defaultProps;
|
|
92
90
|
PanelToggle.contextTypes = contextTypes;
|
|
93
|
-
|
|
94
91
|
export default PanelToggle;
|