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/Accordion.js
CHANGED
|
@@ -1,26 +1,23 @@
|
|
|
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 React from 'react';
|
|
6
|
-
|
|
7
4
|
import PanelGroup from './PanelGroup';
|
|
8
5
|
|
|
9
|
-
var Accordion =
|
|
10
|
-
|
|
6
|
+
var Accordion =
|
|
7
|
+
/*#__PURE__*/
|
|
8
|
+
function (_React$Component) {
|
|
9
|
+
_inheritsLoose(Accordion, _React$Component);
|
|
11
10
|
|
|
12
11
|
function Accordion() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
12
|
+
return _React$Component.apply(this, arguments) || this;
|
|
16
13
|
}
|
|
17
14
|
|
|
18
|
-
Accordion.prototype
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
);
|
|
15
|
+
var _proto = Accordion.prototype;
|
|
16
|
+
|
|
17
|
+
_proto.render = function render() {
|
|
18
|
+
return React.createElement(PanelGroup, _extends({}, this.props, {
|
|
19
|
+
accordion: true
|
|
20
|
+
}), this.props.children);
|
|
24
21
|
};
|
|
25
22
|
|
|
26
23
|
return Accordion;
|
package/es/Alert.js
CHANGED
|
@@ -1,61 +1,57 @@
|
|
|
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
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
10
|
import CloseButton from './CloseButton';
|
|
14
|
-
|
|
15
11
|
var propTypes = {
|
|
16
12
|
onDismiss: PropTypes.func,
|
|
17
13
|
closeLabel: PropTypes.string
|
|
18
14
|
};
|
|
19
|
-
|
|
20
15
|
var defaultProps = {
|
|
21
16
|
closeLabel: 'Close alert'
|
|
22
17
|
};
|
|
23
18
|
|
|
24
|
-
var Alert =
|
|
25
|
-
|
|
19
|
+
var Alert =
|
|
20
|
+
/*#__PURE__*/
|
|
21
|
+
function (_React$Component) {
|
|
22
|
+
_inheritsLoose(Alert, _React$Component);
|
|
26
23
|
|
|
27
24
|
function Alert() {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
25
|
+
return _React$Component.apply(this, arguments) || this;
|
|
31
26
|
}
|
|
32
27
|
|
|
33
|
-
Alert.prototype
|
|
28
|
+
var _proto = Alert.prototype;
|
|
29
|
+
|
|
30
|
+
_proto.render = function render() {
|
|
34
31
|
var _extends2;
|
|
35
32
|
|
|
36
|
-
var
|
|
37
|
-
onDismiss =
|
|
38
|
-
closeLabel =
|
|
39
|
-
className =
|
|
40
|
-
children =
|
|
41
|
-
props =
|
|
33
|
+
var _this$props = this.props,
|
|
34
|
+
onDismiss = _this$props.onDismiss,
|
|
35
|
+
closeLabel = _this$props.closeLabel,
|
|
36
|
+
className = _this$props.className,
|
|
37
|
+
children = _this$props.children,
|
|
38
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["onDismiss", "closeLabel", "className", "children"]);
|
|
42
39
|
|
|
43
40
|
var _splitBsProps = splitBsProps(props),
|
|
44
41
|
bsProps = _splitBsProps[0],
|
|
45
42
|
elementProps = _splitBsProps[1];
|
|
46
43
|
|
|
47
44
|
var dismissable = !!onDismiss;
|
|
45
|
+
|
|
48
46
|
var classes = _extends({}, getClassSet(bsProps), (_extends2 = {}, _extends2[prefix(bsProps, 'dismissable')] = dismissable, _extends2));
|
|
49
47
|
|
|
50
|
-
return React.createElement(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
children
|
|
58
|
-
);
|
|
48
|
+
return React.createElement("div", _extends({}, elementProps, {
|
|
49
|
+
role: "alert",
|
|
50
|
+
className: classNames(className, classes)
|
|
51
|
+
}), dismissable && React.createElement(CloseButton, {
|
|
52
|
+
onClick: onDismiss,
|
|
53
|
+
label: closeLabel
|
|
54
|
+
}), children);
|
|
59
55
|
};
|
|
60
56
|
|
|
61
57
|
return Alert;
|
|
@@ -63,5 +59,4 @@ var Alert = function (_React$Component) {
|
|
|
63
59
|
|
|
64
60
|
Alert.propTypes = propTypes;
|
|
65
61
|
Alert.defaultProps = defaultProps;
|
|
66
|
-
|
|
67
62
|
export default bsStyles(_Object$values(State), State.INFO, bsClass('alert', Alert));
|
package/es/Badge.js
CHANGED
|
@@ -1,36 +1,31 @@
|
|
|
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
|
-
|
|
10
|
-
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
|
11
|
-
|
|
12
|
-
// TODO: `pullRight` doesn't belong here. There's no special handling here.
|
|
7
|
+
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils'; // TODO: `pullRight` doesn't belong here. There's no special handling here.
|
|
13
8
|
|
|
14
9
|
var propTypes = {
|
|
15
10
|
pullRight: PropTypes.bool
|
|
16
11
|
};
|
|
17
|
-
|
|
18
12
|
var defaultProps = {
|
|
19
13
|
pullRight: false
|
|
20
14
|
};
|
|
21
15
|
|
|
22
|
-
var Badge =
|
|
23
|
-
|
|
16
|
+
var Badge =
|
|
17
|
+
/*#__PURE__*/
|
|
18
|
+
function (_React$Component) {
|
|
19
|
+
_inheritsLoose(Badge, _React$Component);
|
|
24
20
|
|
|
25
21
|
function Badge() {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
22
|
+
return _React$Component.apply(this, arguments) || this;
|
|
29
23
|
}
|
|
30
24
|
|
|
31
|
-
Badge.prototype
|
|
32
|
-
var result = false;
|
|
25
|
+
var _proto = Badge.prototype;
|
|
33
26
|
|
|
27
|
+
_proto.hasContent = function hasContent(children) {
|
|
28
|
+
var result = false;
|
|
34
29
|
React.Children.forEach(children, function (child) {
|
|
35
30
|
if (result) {
|
|
36
31
|
return;
|
|
@@ -40,16 +35,15 @@ var Badge = function (_React$Component) {
|
|
|
40
35
|
result = true;
|
|
41
36
|
}
|
|
42
37
|
});
|
|
43
|
-
|
|
44
38
|
return result;
|
|
45
39
|
};
|
|
46
40
|
|
|
47
|
-
|
|
48
|
-
var
|
|
49
|
-
pullRight =
|
|
50
|
-
className =
|
|
51
|
-
children =
|
|
52
|
-
props =
|
|
41
|
+
_proto.render = function render() {
|
|
42
|
+
var _this$props = this.props,
|
|
43
|
+
pullRight = _this$props.pullRight,
|
|
44
|
+
className = _this$props.className,
|
|
45
|
+
children = _this$props.children,
|
|
46
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["pullRight", "className", "children"]);
|
|
53
47
|
|
|
54
48
|
var _splitBsProps = splitBsProps(props),
|
|
55
49
|
bsProps = _splitBsProps[0],
|
|
@@ -57,16 +51,13 @@ var Badge = function (_React$Component) {
|
|
|
57
51
|
|
|
58
52
|
var classes = _extends({}, getClassSet(bsProps), {
|
|
59
53
|
'pull-right': pullRight,
|
|
60
|
-
|
|
61
54
|
// Hack for collapsing on IE8.
|
|
62
55
|
hidden: !this.hasContent(children)
|
|
63
56
|
});
|
|
64
57
|
|
|
65
|
-
return React.createElement(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
children
|
|
69
|
-
);
|
|
58
|
+
return React.createElement("span", _extends({}, elementProps, {
|
|
59
|
+
className: classNames(className, classes)
|
|
60
|
+
}), children);
|
|
70
61
|
};
|
|
71
62
|
|
|
72
63
|
return Badge;
|
|
@@ -74,5 +65,4 @@ var Badge = function (_React$Component) {
|
|
|
74
65
|
|
|
75
66
|
Badge.propTypes = propTypes;
|
|
76
67
|
Badge.defaultProps = defaultProps;
|
|
77
|
-
|
|
78
68
|
export default bsClass('badge', Badge);
|
package/es/Breadcrumb.js
CHANGED
|
@@ -1,37 +1,35 @@
|
|
|
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 BreadcrumbItem from './BreadcrumbItem';
|
|
10
7
|
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
|
11
8
|
|
|
12
|
-
var Breadcrumb =
|
|
13
|
-
|
|
9
|
+
var Breadcrumb =
|
|
10
|
+
/*#__PURE__*/
|
|
11
|
+
function (_React$Component) {
|
|
12
|
+
_inheritsLoose(Breadcrumb, _React$Component);
|
|
14
13
|
|
|
15
14
|
function Breadcrumb() {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
15
|
+
return _React$Component.apply(this, arguments) || this;
|
|
19
16
|
}
|
|
20
17
|
|
|
21
|
-
Breadcrumb.prototype
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
var _proto = Breadcrumb.prototype;
|
|
19
|
+
|
|
20
|
+
_proto.render = function render() {
|
|
21
|
+
var _this$props = this.props,
|
|
22
|
+
className = _this$props.className,
|
|
23
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["className"]);
|
|
25
24
|
|
|
26
25
|
var _splitBsProps = splitBsProps(props),
|
|
27
26
|
bsProps = _splitBsProps[0],
|
|
28
27
|
elementProps = _splitBsProps[1];
|
|
29
28
|
|
|
30
29
|
var classes = getClassSet(bsProps);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
'aria-label': 'breadcrumbs',
|
|
30
|
+
return React.createElement("ol", _extends({}, elementProps, {
|
|
31
|
+
role: "navigation",
|
|
32
|
+
"aria-label": "breadcrumbs",
|
|
35
33
|
className: classNames(className, classes)
|
|
36
34
|
}));
|
|
37
35
|
};
|
|
@@ -40,5 +38,4 @@ var Breadcrumb = function (_React$Component) {
|
|
|
40
38
|
}(React.Component);
|
|
41
39
|
|
|
42
40
|
Breadcrumb.Item = BreadcrumbItem;
|
|
43
|
-
|
|
44
41
|
export default bsClass('breadcrumb', Breadcrumb);
|
package/es/BreadcrumbItem.js
CHANGED
|
@@ -1,65 +1,66 @@
|
|
|
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
|
-
|
|
10
7
|
import SafeAnchor from './SafeAnchor';
|
|
11
|
-
|
|
12
8
|
var propTypes = {
|
|
13
9
|
/**
|
|
14
10
|
* If set to true, renders `span` instead of `a`
|
|
15
11
|
*/
|
|
16
12
|
active: PropTypes.bool,
|
|
13
|
+
|
|
17
14
|
/**
|
|
18
15
|
* `href` attribute for the inner `a` element
|
|
19
16
|
*/
|
|
20
17
|
href: PropTypes.string,
|
|
18
|
+
|
|
21
19
|
/**
|
|
22
20
|
* `title` attribute for the inner `a` element
|
|
23
21
|
*/
|
|
24
22
|
title: PropTypes.node,
|
|
23
|
+
|
|
25
24
|
/**
|
|
26
25
|
* `target` attribute for the inner `a` element
|
|
27
26
|
*/
|
|
28
27
|
target: PropTypes.string
|
|
29
28
|
};
|
|
30
|
-
|
|
31
29
|
var defaultProps = {
|
|
32
30
|
active: false
|
|
33
31
|
};
|
|
34
32
|
|
|
35
|
-
var BreadcrumbItem =
|
|
36
|
-
|
|
33
|
+
var BreadcrumbItem =
|
|
34
|
+
/*#__PURE__*/
|
|
35
|
+
function (_React$Component) {
|
|
36
|
+
_inheritsLoose(BreadcrumbItem, _React$Component);
|
|
37
37
|
|
|
38
38
|
function BreadcrumbItem() {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
39
|
+
return _React$Component.apply(this, arguments) || this;
|
|
42
40
|
}
|
|
43
41
|
|
|
44
|
-
BreadcrumbItem.prototype
|
|
45
|
-
var _props = this.props,
|
|
46
|
-
active = _props.active,
|
|
47
|
-
href = _props.href,
|
|
48
|
-
title = _props.title,
|
|
49
|
-
target = _props.target,
|
|
50
|
-
className = _props.className,
|
|
51
|
-
props = _objectWithoutProperties(_props, ['active', 'href', 'title', 'target', 'className']);
|
|
42
|
+
var _proto = BreadcrumbItem.prototype;
|
|
52
43
|
|
|
53
|
-
|
|
44
|
+
_proto.render = function render() {
|
|
45
|
+
var _this$props = this.props,
|
|
46
|
+
active = _this$props.active,
|
|
47
|
+
href = _this$props.href,
|
|
48
|
+
title = _this$props.title,
|
|
49
|
+
target = _this$props.target,
|
|
50
|
+
className = _this$props.className,
|
|
51
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["active", "href", "title", "target", "className"]); // Don't try to render these props on non-active <span>.
|
|
54
52
|
|
|
55
53
|
|
|
56
|
-
var linkProps = {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
var linkProps = {
|
|
55
|
+
href: href,
|
|
56
|
+
title: title,
|
|
57
|
+
target: target
|
|
58
|
+
};
|
|
59
|
+
return React.createElement("li", {
|
|
60
|
+
className: classNames(className, {
|
|
61
|
+
active: active
|
|
62
|
+
})
|
|
63
|
+
}, active ? React.createElement("span", props) : React.createElement(SafeAnchor, _extends({}, props, linkProps)));
|
|
63
64
|
};
|
|
64
65
|
|
|
65
66
|
return BreadcrumbItem;
|
|
@@ -67,5 +68,4 @@ var BreadcrumbItem = function (_React$Component) {
|
|
|
67
68
|
|
|
68
69
|
BreadcrumbItem.propTypes = propTypes;
|
|
69
70
|
BreadcrumbItem.defaultProps = defaultProps;
|
|
70
|
-
|
|
71
71
|
export default BreadcrumbItem;
|
package/es/Button.js
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
import _Object$values from
|
|
2
|
-
import
|
|
3
|
-
import _extends from
|
|
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 _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
|
|
4
|
+
import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
|
7
5
|
import classNames from 'classnames';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
import PropTypes from 'prop-types';
|
|
10
8
|
import elementType from 'prop-types-extra/lib/elementType';
|
|
11
|
-
|
|
12
9
|
import { bsClass, bsSizes, bsStyles, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';
|
|
13
10
|
import { Size, State, Style } from './utils/StyleConfig';
|
|
14
|
-
|
|
15
11
|
import SafeAnchor from './SafeAnchor';
|
|
16
|
-
|
|
17
12
|
var propTypes = {
|
|
18
13
|
active: PropTypes.bool,
|
|
19
14
|
disabled: PropTypes.bool,
|
|
@@ -21,54 +16,55 @@ var propTypes = {
|
|
|
21
16
|
onClick: PropTypes.func,
|
|
22
17
|
componentClass: elementType,
|
|
23
18
|
href: PropTypes.string,
|
|
19
|
+
|
|
24
20
|
/**
|
|
25
21
|
* Defines HTML button type attribute
|
|
26
22
|
* @defaultValue 'button'
|
|
27
23
|
*/
|
|
28
24
|
type: PropTypes.oneOf(['button', 'reset', 'submit'])
|
|
29
25
|
};
|
|
30
|
-
|
|
31
26
|
var defaultProps = {
|
|
32
27
|
active: false,
|
|
33
28
|
block: false,
|
|
34
29
|
disabled: false
|
|
35
30
|
};
|
|
36
31
|
|
|
37
|
-
var Button =
|
|
38
|
-
|
|
32
|
+
var Button =
|
|
33
|
+
/*#__PURE__*/
|
|
34
|
+
function (_React$Component) {
|
|
35
|
+
_inheritsLoose(Button, _React$Component);
|
|
39
36
|
|
|
40
37
|
function Button() {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
38
|
+
return _React$Component.apply(this, arguments) || this;
|
|
44
39
|
}
|
|
45
40
|
|
|
46
|
-
Button.prototype
|
|
41
|
+
var _proto = Button.prototype;
|
|
42
|
+
|
|
43
|
+
_proto.renderAnchor = function renderAnchor(elementProps, className) {
|
|
47
44
|
return React.createElement(SafeAnchor, _extends({}, elementProps, {
|
|
48
45
|
className: classNames(className, elementProps.disabled && 'disabled')
|
|
49
46
|
}));
|
|
50
47
|
};
|
|
51
48
|
|
|
52
|
-
|
|
49
|
+
_proto.renderButton = function renderButton(_ref, className) {
|
|
53
50
|
var componentClass = _ref.componentClass,
|
|
54
|
-
elementProps =
|
|
51
|
+
elementProps = _objectWithoutPropertiesLoose(_ref, ["componentClass"]);
|
|
55
52
|
|
|
56
53
|
var Component = componentClass || 'button';
|
|
57
|
-
|
|
58
54
|
return React.createElement(Component, _extends({}, elementProps, {
|
|
59
55
|
type: elementProps.type || 'button',
|
|
60
56
|
className: className
|
|
61
57
|
}));
|
|
62
58
|
};
|
|
63
59
|
|
|
64
|
-
|
|
60
|
+
_proto.render = function render() {
|
|
65
61
|
var _extends2;
|
|
66
62
|
|
|
67
|
-
var
|
|
68
|
-
active =
|
|
69
|
-
block =
|
|
70
|
-
className =
|
|
71
|
-
props =
|
|
63
|
+
var _this$props = this.props,
|
|
64
|
+
active = _this$props.active,
|
|
65
|
+
block = _this$props.block,
|
|
66
|
+
className = _this$props.className,
|
|
67
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["active", "block", "className"]);
|
|
72
68
|
|
|
73
69
|
var _splitBsProps = splitBsProps(props),
|
|
74
70
|
bsProps = _splitBsProps[0],
|
|
@@ -77,6 +73,7 @@ var Button = function (_React$Component) {
|
|
|
77
73
|
var classes = _extends({}, getClassSet(bsProps), (_extends2 = {
|
|
78
74
|
active: active
|
|
79
75
|
}, _extends2[prefix(bsProps, 'block')] = block, _extends2));
|
|
76
|
+
|
|
80
77
|
var fullClassName = classNames(className, classes);
|
|
81
78
|
|
|
82
79
|
if (elementProps.href) {
|
|
@@ -91,5 +88,4 @@ var Button = function (_React$Component) {
|
|
|
91
88
|
|
|
92
89
|
Button.propTypes = propTypes;
|
|
93
90
|
Button.defaultProps = defaultProps;
|
|
94
|
-
|
|
95
|
-
export default bsClass('btn', bsSizes([Size.LARGE, Size.SMALL, Size.XSMALL], bsStyles([].concat(_Object$values(State), [Style.DEFAULT, Style.PRIMARY, Style.LINK]), Style.DEFAULT, Button)));
|
|
91
|
+
export default bsClass('btn', bsSizes([Size.LARGE, Size.SMALL, Size.XSMALL], bsStyles(_Object$values(State).concat([Style.DEFAULT, Style.PRIMARY, Style.LINK]), Style.DEFAULT, Button)));
|
package/es/ButtonGroup.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 from 'react';
|
|
8
6
|
import PropTypes from 'prop-types';
|
|
9
7
|
import all from 'prop-types-extra/lib/all';
|
|
10
|
-
|
|
11
8
|
import Button from './Button';
|
|
12
9
|
import { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';
|
|
13
|
-
|
|
14
10
|
var propTypes = {
|
|
15
11
|
vertical: PropTypes.bool,
|
|
16
12
|
justified: PropTypes.bool,
|
|
@@ -25,31 +21,32 @@ var propTypes = {
|
|
|
25
21
|
return block && !vertical ? new Error('`block` requires `vertical` to be set to have any effect') : null;
|
|
26
22
|
})
|
|
27
23
|
};
|
|
28
|
-
|
|
29
24
|
var defaultProps = {
|
|
30
25
|
block: false,
|
|
31
26
|
justified: false,
|
|
32
27
|
vertical: false
|
|
33
28
|
};
|
|
34
29
|
|
|
35
|
-
var ButtonGroup =
|
|
36
|
-
|
|
30
|
+
var ButtonGroup =
|
|
31
|
+
/*#__PURE__*/
|
|
32
|
+
function (_React$Component) {
|
|
33
|
+
_inheritsLoose(ButtonGroup, _React$Component);
|
|
37
34
|
|
|
38
35
|
function ButtonGroup() {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
36
|
+
return _React$Component.apply(this, arguments) || this;
|
|
42
37
|
}
|
|
43
38
|
|
|
44
|
-
ButtonGroup.prototype
|
|
39
|
+
var _proto = ButtonGroup.prototype;
|
|
40
|
+
|
|
41
|
+
_proto.render = function render() {
|
|
45
42
|
var _extends2;
|
|
46
43
|
|
|
47
|
-
var
|
|
48
|
-
block =
|
|
49
|
-
justified =
|
|
50
|
-
vertical =
|
|
51
|
-
className =
|
|
52
|
-
props =
|
|
44
|
+
var _this$props = this.props,
|
|
45
|
+
block = _this$props.block,
|
|
46
|
+
justified = _this$props.justified,
|
|
47
|
+
vertical = _this$props.vertical,
|
|
48
|
+
className = _this$props.className,
|
|
49
|
+
props = _objectWithoutPropertiesLoose(_this$props, ["block", "justified", "vertical", "className"]);
|
|
53
50
|
|
|
54
51
|
var _splitBsProps = splitBsProps(props),
|
|
55
52
|
bsProps = _splitBsProps[0],
|
|
@@ -57,7 +54,9 @@ var ButtonGroup = function (_React$Component) {
|
|
|
57
54
|
|
|
58
55
|
var classes = _extends({}, getClassSet(bsProps), (_extends2 = {}, _extends2[prefix(bsProps)] = !vertical, _extends2[prefix(bsProps, 'vertical')] = vertical, _extends2[prefix(bsProps, 'justified')] = justified, _extends2[prefix(Button.defaultProps, 'block')] = block, _extends2));
|
|
59
56
|
|
|
60
|
-
return React.createElement(
|
|
57
|
+
return React.createElement("div", _extends({}, elementProps, {
|
|
58
|
+
className: classNames(className, classes)
|
|
59
|
+
}));
|
|
61
60
|
};
|
|
62
61
|
|
|
63
62
|
return ButtonGroup;
|
|
@@ -65,5 +64,4 @@ var ButtonGroup = function (_React$Component) {
|
|
|
65
64
|
|
|
66
65
|
ButtonGroup.propTypes = propTypes;
|
|
67
66
|
ButtonGroup.defaultProps = defaultProps;
|
|
68
|
-
|
|
69
67
|
export default bsClass('btn-group', ButtonGroup);
|
package/es/ButtonToolbar.js
CHANGED
|
@@ -1,35 +1,33 @@
|
|
|
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 ButtonToolbar =
|
|
12
|
-
|
|
8
|
+
var ButtonToolbar =
|
|
9
|
+
/*#__PURE__*/
|
|
10
|
+
function (_React$Component) {
|
|
11
|
+
_inheritsLoose(ButtonToolbar, _React$Component);
|
|
13
12
|
|
|
14
13
|
function ButtonToolbar() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
14
|
+
return _React$Component.apply(this, arguments) || this;
|
|
18
15
|
}
|
|
19
16
|
|
|
20
|
-
ButtonToolbar.prototype
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
var _proto = ButtonToolbar.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
|
-
|
|
32
|
-
role: 'toolbar',
|
|
29
|
+
return React.createElement("div", _extends({}, elementProps, {
|
|
30
|
+
role: "toolbar",
|
|
33
31
|
className: classNames(className, classes)
|
|
34
32
|
}));
|
|
35
33
|
};
|