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.
Files changed (213) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +11 -7
  3. package/dist/react-bootstrap.js +13464 -13723
  4. package/dist/react-bootstrap.min.js +10 -18464
  5. package/es/Accordion.js +13 -16
  6. package/es/Alert.js +26 -31
  7. package/es/Badge.js +21 -31
  8. package/es/Breadcrumb.js +17 -20
  9. package/es/BreadcrumbItem.js +30 -30
  10. package/es/Button.js +23 -27
  11. package/es/ButtonGroup.js +20 -22
  12. package/es/ButtonToolbar.js +16 -18
  13. package/es/Carousel.js +120 -157
  14. package/es/CarouselCaption.js +18 -21
  15. package/es/CarouselItem.js +34 -33
  16. package/es/Checkbox.js +43 -54
  17. package/es/Clearfix.js +24 -24
  18. package/es/CloseButton.js +21 -30
  19. package/es/Col.js +42 -26
  20. package/es/Collapse.js +68 -68
  21. package/es/ControlLabel.js +19 -24
  22. package/es/Dropdown.js +93 -91
  23. package/es/DropdownButton.js +25 -35
  24. package/es/DropdownMenu.js +65 -65
  25. package/es/DropdownToggle.js +28 -40
  26. package/es/Fade.js +26 -29
  27. package/es/Form.js +22 -22
  28. package/es/FormControl.js +32 -33
  29. package/es/FormControlFeedback.js +21 -21
  30. package/es/FormControlStatic.js +18 -21
  31. package/es/FormGroup.js +27 -34
  32. package/es/Glyphicon.js +18 -19
  33. package/es/Grid.js +20 -22
  34. package/es/HelpBlock.js +17 -17
  35. package/es/Image.js +19 -24
  36. package/es/InputGroup.js +17 -18
  37. package/es/InputGroupAddon.js +17 -17
  38. package/es/InputGroupButton.js +17 -17
  39. package/es/Jumbotron.js +18 -21
  40. package/es/Label.js +21 -27
  41. package/es/ListGroup.js +24 -29
  42. package/es/ListGroupItem.js +30 -48
  43. package/es/Media.js +18 -22
  44. package/es/MediaBody.js +19 -22
  45. package/es/MediaHeading.js +18 -21
  46. package/es/MediaLeft.js +18 -19
  47. package/es/MediaList.js +17 -17
  48. package/es/MediaListItem.js +17 -17
  49. package/es/MediaRight.js +18 -19
  50. package/es/MenuItem.js +44 -49
  51. package/es/Modal.js +63 -74
  52. package/es/ModalBody.js +18 -21
  53. package/es/ModalDialog.js +31 -39
  54. package/es/ModalFooter.js +18 -21
  55. package/es/ModalHeader.js +25 -35
  56. package/es/ModalTitle.js +18 -21
  57. package/es/Nav.js +73 -92
  58. package/es/NavDropdown.js +40 -52
  59. package/es/NavItem.js +34 -38
  60. package/es/Navbar.js +62 -73
  61. package/es/NavbarBrand.js +20 -24
  62. package/es/NavbarCollapse.js +21 -28
  63. package/es/NavbarHeader.js +19 -20
  64. package/es/NavbarToggle.js +30 -38
  65. package/es/Overlay.js +21 -25
  66. package/es/OverlayTrigger.js +71 -68
  67. package/es/PageHeader.js +18 -26
  68. package/es/PageItem.js +0 -1
  69. package/es/Pager.js +23 -30
  70. package/es/PagerItem.js +36 -40
  71. package/es/Pagination.js +18 -24
  72. package/es/PaginationItem.js +47 -57
  73. package/es/Panel.js +51 -54
  74. package/es/PanelBody.js +18 -29
  75. package/es/PanelCollapse.js +20 -23
  76. package/es/PanelFooter.js +16 -23
  77. package/es/PanelGroup.js +44 -45
  78. package/es/PanelHeading.js +19 -28
  79. package/es/PanelTitle.js +22 -34
  80. package/es/PanelToggle.js +21 -24
  81. package/es/Popover.js +36 -46
  82. package/es/ProgressBar.js +59 -62
  83. package/es/Radio.js +43 -54
  84. package/es/ResponsiveEmbed.js +27 -32
  85. package/es/Row.js +18 -21
  86. package/es/SafeAnchor.js +32 -32
  87. package/es/SplitButton.js +33 -46
  88. package/es/SplitToggle.js +14 -13
  89. package/es/Tab.js +12 -18
  90. package/es/TabContainer.js +24 -30
  91. package/es/TabContent.js +36 -43
  92. package/es/TabPane.js +58 -68
  93. package/es/Table.js +25 -29
  94. package/es/Tabs.js +56 -71
  95. package/es/Thumbnail.js +34 -34
  96. package/es/ToggleButton.js +32 -37
  97. package/es/ToggleButtonGroup.js +45 -57
  98. package/es/Tooltip.js +33 -40
  99. package/es/Well.js +17 -17
  100. package/es/index.js +2 -0
  101. package/es/utils/PropTypes.js +13 -19
  102. package/es/utils/StyleConfig.js +0 -4
  103. package/es/utils/ValidComponentChildren.js +11 -20
  104. package/es/utils/bootstrapUtils.js +17 -31
  105. package/es/utils/createChainedFunction.js +2 -2
  106. package/es/utils/deprecationWarning.js +28 -30
  107. package/es/utils/splitComponentProps.js +1 -2
  108. package/lib/Accordion.js +23 -36
  109. package/lib/Alert.js +43 -65
  110. package/lib/Badge.js +36 -56
  111. package/lib/Breadcrumb.js +32 -47
  112. package/lib/BreadcrumbItem.js +48 -63
  113. package/lib/Button.js +49 -71
  114. package/lib/ButtonGroup.js +39 -57
  115. package/lib/ButtonToolbar.js +29 -42
  116. package/lib/Carousel.js +161 -214
  117. package/lib/CarouselCaption.js +32 -46
  118. package/lib/CarouselItem.js +54 -73
  119. package/lib/Checkbox.js +64 -87
  120. package/lib/Clearfix.js +45 -58
  121. package/lib/CloseButton.js +33 -50
  122. package/lib/Col.js +78 -73
  123. package/lib/Collapse.js +104 -125
  124. package/lib/ControlLabel.js +38 -59
  125. package/lib/Dropdown.js +153 -192
  126. package/lib/DropdownButton.js +44 -70
  127. package/lib/DropdownMenu.js +96 -120
  128. package/lib/DropdownToggle.js +48 -77
  129. package/lib/Fade.js +49 -68
  130. package/lib/Form.js +39 -52
  131. package/lib/FormControl.js +58 -79
  132. package/lib/FormControlFeedback.js +42 -54
  133. package/lib/FormControlStatic.js +32 -46
  134. package/lib/FormGroup.js +47 -67
  135. package/lib/Glyphicon.js +33 -46
  136. package/lib/Grid.js +36 -51
  137. package/lib/HelpBlock.js +29 -40
  138. package/lib/Image.js +37 -53
  139. package/lib/InputGroup.js +34 -49
  140. package/lib/InputGroupAddon.js +29 -40
  141. package/lib/InputGroupButton.js +29 -40
  142. package/lib/Jumbotron.js +32 -46
  143. package/lib/Label.js +35 -53
  144. package/lib/ListGroup.js +45 -61
  145. package/lib/ListGroupItem.js +55 -85
  146. package/lib/Media.js +43 -70
  147. package/lib/MediaBody.js +37 -55
  148. package/lib/MediaHeading.js +32 -46
  149. package/lib/MediaLeft.js +34 -48
  150. package/lib/MediaList.js +29 -40
  151. package/lib/MediaListItem.js +29 -40
  152. package/lib/MediaRight.js +34 -48
  153. package/lib/MenuItem.js +70 -92
  154. package/lib/Modal.js +130 -186
  155. package/lib/ModalBody.js +32 -46
  156. package/lib/ModalDialog.js +47 -69
  157. package/lib/ModalFooter.js +32 -46
  158. package/lib/ModalHeader.js +43 -70
  159. package/lib/ModalTitle.js +32 -46
  160. package/lib/Nav.js +122 -160
  161. package/lib/NavDropdown.js +63 -97
  162. package/lib/NavItem.js +54 -77
  163. package/lib/Navbar.js +115 -152
  164. package/lib/NavbarBrand.js +37 -55
  165. package/lib/NavbarCollapse.js +36 -57
  166. package/lib/NavbarHeader.js +33 -48
  167. package/lib/NavbarToggle.js +52 -77
  168. package/lib/Overlay.js +50 -75
  169. package/lib/OverlayTrigger.js +114 -129
  170. package/lib/PageHeader.js +30 -49
  171. package/lib/PageItem.js +9 -10
  172. package/lib/Pager.js +41 -63
  173. package/lib/PagerItem.js +55 -78
  174. package/lib/Pagination.js +32 -50
  175. package/lib/PaginationItem.js +67 -91
  176. package/lib/Panel.js +93 -127
  177. package/lib/PanelBody.js +35 -57
  178. package/lib/PanelCollapse.js +44 -56
  179. package/lib/PanelFooter.js +31 -48
  180. package/lib/PanelGroup.js +73 -88
  181. package/lib/PanelHeading.js +37 -59
  182. package/lib/PanelTitle.js +41 -68
  183. package/lib/PanelToggle.js +45 -66
  184. package/lib/Popover.js +59 -84
  185. package/lib/ProgressBar.js +86 -103
  186. package/lib/Radio.js +64 -87
  187. package/lib/ResponsiveEmbed.js +45 -63
  188. package/lib/Row.js +32 -46
  189. package/lib/SafeAnchor.js +53 -69
  190. package/lib/SplitButton.js +57 -90
  191. package/lib/SplitToggle.js +25 -34
  192. package/lib/Tab.js +32 -55
  193. package/lib/TabContainer.js +45 -61
  194. package/lib/TabContent.js +67 -87
  195. package/lib/TabPane.js +103 -131
  196. package/lib/Table.js +44 -59
  197. package/lib/Tabs.js +82 -119
  198. package/lib/Thumbnail.js +55 -67
  199. package/lib/ToggleButton.js +49 -68
  200. package/lib/ToggleButtonGroup.js +67 -104
  201. package/lib/Tooltip.js +55 -77
  202. package/lib/Well.js +30 -41
  203. package/lib/index.js +147 -214
  204. package/lib/utils/PropTypes.js +24 -31
  205. package/lib/utils/StyleConfig.js +13 -11
  206. package/lib/utils/ValidComponentChildren.js +34 -29
  207. package/lib/utils/bootstrapUtils.js +41 -52
  208. package/lib/utils/capitalize.js +2 -0
  209. package/lib/utils/createChainedFunction.js +8 -5
  210. package/lib/utils/deprecationWarning.js +37 -47
  211. package/lib/utils/index.js +11 -15
  212. package/lib/utils/splitComponentProps.js +5 -10
  213. package/package.json +58 -50
package/es/Accordion.js CHANGED
@@ -1,26 +1,23 @@
1
- import _extends from 'babel-runtime/helpers/extends';
2
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
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 = function (_React$Component) {
10
- _inherits(Accordion, _React$Component);
6
+ var Accordion =
7
+ /*#__PURE__*/
8
+ function (_React$Component) {
9
+ _inheritsLoose(Accordion, _React$Component);
11
10
 
12
11
  function Accordion() {
13
- _classCallCheck(this, Accordion);
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.render = function render() {
19
- return React.createElement(
20
- PanelGroup,
21
- _extends({}, this.props, { accordion: true }),
22
- this.props.children
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 'babel-runtime/core-js/object/values';
2
- import _extends from 'babel-runtime/helpers/extends';
3
- import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
4
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
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 = function (_React$Component) {
25
- _inherits(Alert, _React$Component);
19
+ var Alert =
20
+ /*#__PURE__*/
21
+ function (_React$Component) {
22
+ _inheritsLoose(Alert, _React$Component);
26
23
 
27
24
  function Alert() {
28
- _classCallCheck(this, Alert);
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.render = function render() {
28
+ var _proto = Alert.prototype;
29
+
30
+ _proto.render = function render() {
34
31
  var _extends2;
35
32
 
36
- var _props = this.props,
37
- onDismiss = _props.onDismiss,
38
- closeLabel = _props.closeLabel,
39
- className = _props.className,
40
- children = _props.children,
41
- props = _objectWithoutProperties(_props, ['onDismiss', 'closeLabel', 'className', 'children']);
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
- 'div',
52
- _extends({}, elementProps, {
53
- role: 'alert',
54
- className: classNames(className, classes)
55
- }),
56
- dismissable && React.createElement(CloseButton, { onClick: onDismiss, label: closeLabel }),
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 'babel-runtime/helpers/extends';
2
- import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
3
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
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 = function (_React$Component) {
23
- _inherits(Badge, _React$Component);
16
+ var Badge =
17
+ /*#__PURE__*/
18
+ function (_React$Component) {
19
+ _inheritsLoose(Badge, _React$Component);
24
20
 
25
21
  function Badge() {
26
- _classCallCheck(this, Badge);
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.hasContent = function hasContent(children) {
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
- Badge.prototype.render = function render() {
48
- var _props = this.props,
49
- pullRight = _props.pullRight,
50
- className = _props.className,
51
- children = _props.children,
52
- props = _objectWithoutProperties(_props, ['pullRight', 'className', 'children']);
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
- 'span',
67
- _extends({}, elementProps, { className: classNames(className, classes) }),
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 'babel-runtime/helpers/extends';
2
- import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
3
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
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 = function (_React$Component) {
13
- _inherits(Breadcrumb, _React$Component);
9
+ var Breadcrumb =
10
+ /*#__PURE__*/
11
+ function (_React$Component) {
12
+ _inheritsLoose(Breadcrumb, _React$Component);
14
13
 
15
14
  function Breadcrumb() {
16
- _classCallCheck(this, Breadcrumb);
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.render = function render() {
22
- var _props = this.props,
23
- className = _props.className,
24
- props = _objectWithoutProperties(_props, ['className']);
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
- return React.createElement('ol', _extends({}, elementProps, {
33
- role: 'navigation',
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);
@@ -1,65 +1,66 @@
1
- import _extends from 'babel-runtime/helpers/extends';
2
- import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
3
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
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 = function (_React$Component) {
36
- _inherits(BreadcrumbItem, _React$Component);
33
+ var BreadcrumbItem =
34
+ /*#__PURE__*/
35
+ function (_React$Component) {
36
+ _inheritsLoose(BreadcrumbItem, _React$Component);
37
37
 
38
38
  function BreadcrumbItem() {
39
- _classCallCheck(this, BreadcrumbItem);
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.render = function render() {
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
- // Don't try to render these props on non-active <span>.
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 = { href: href, title: title, target: target };
57
-
58
- return React.createElement(
59
- 'li',
60
- { className: classNames(className, { active: active }) },
61
- active ? React.createElement('span', props) : React.createElement(SafeAnchor, _extends({}, props, linkProps))
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 'babel-runtime/core-js/object/values';
2
- import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
3
- import _extends from 'babel-runtime/helpers/extends';
4
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
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 = function (_React$Component) {
38
- _inherits(Button, _React$Component);
32
+ var Button =
33
+ /*#__PURE__*/
34
+ function (_React$Component) {
35
+ _inheritsLoose(Button, _React$Component);
39
36
 
40
37
  function Button() {
41
- _classCallCheck(this, Button);
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.renderAnchor = function renderAnchor(elementProps, className) {
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
- Button.prototype.renderButton = function renderButton(_ref, className) {
49
+ _proto.renderButton = function renderButton(_ref, className) {
53
50
  var componentClass = _ref.componentClass,
54
- elementProps = _objectWithoutProperties(_ref, ['componentClass']);
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
- Button.prototype.render = function render() {
60
+ _proto.render = function render() {
65
61
  var _extends2;
66
62
 
67
- var _props = this.props,
68
- active = _props.active,
69
- block = _props.block,
70
- className = _props.className,
71
- props = _objectWithoutProperties(_props, ['active', 'block', 'className']);
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 'babel-runtime/helpers/extends';
2
- import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
3
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
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 = function (_React$Component) {
36
- _inherits(ButtonGroup, _React$Component);
30
+ var ButtonGroup =
31
+ /*#__PURE__*/
32
+ function (_React$Component) {
33
+ _inheritsLoose(ButtonGroup, _React$Component);
37
34
 
38
35
  function ButtonGroup() {
39
- _classCallCheck(this, ButtonGroup);
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.render = function render() {
39
+ var _proto = ButtonGroup.prototype;
40
+
41
+ _proto.render = function render() {
45
42
  var _extends2;
46
43
 
47
- var _props = this.props,
48
- block = _props.block,
49
- justified = _props.justified,
50
- vertical = _props.vertical,
51
- className = _props.className,
52
- props = _objectWithoutProperties(_props, ['block', 'justified', 'vertical', 'className']);
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('div', _extends({}, elementProps, { className: classNames(className, classes) }));
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);
@@ -1,35 +1,33 @@
1
- import _extends from 'babel-runtime/helpers/extends';
2
- import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
3
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
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 = function (_React$Component) {
12
- _inherits(ButtonToolbar, _React$Component);
8
+ var ButtonToolbar =
9
+ /*#__PURE__*/
10
+ function (_React$Component) {
11
+ _inheritsLoose(ButtonToolbar, _React$Component);
13
12
 
14
13
  function ButtonToolbar() {
15
- _classCallCheck(this, ButtonToolbar);
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.render = function render() {
21
- var _props = this.props,
22
- className = _props.className,
23
- props = _objectWithoutProperties(_props, ['className']);
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
- return React.createElement('div', _extends({}, elementProps, {
32
- role: 'toolbar',
29
+ return React.createElement("div", _extends({}, elementProps, {
30
+ role: "toolbar",
33
31
  className: classNames(className, classes)
34
32
  }));
35
33
  };