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
@@ -1,44 +1,42 @@
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 elementType from 'prop-types-extra/lib/elementType';
9
-
10
7
  import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
11
-
12
8
  var propTypes = {
13
9
  componentClass: elementType
14
10
  };
15
-
16
11
  var defaultProps = {
17
12
  componentClass: 'h4'
18
13
  };
19
14
 
20
- var MediaHeading = function (_React$Component) {
21
- _inherits(MediaHeading, _React$Component);
15
+ var MediaHeading =
16
+ /*#__PURE__*/
17
+ function (_React$Component) {
18
+ _inheritsLoose(MediaHeading, _React$Component);
22
19
 
23
20
  function MediaHeading() {
24
- _classCallCheck(this, MediaHeading);
25
-
26
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
21
+ return _React$Component.apply(this, arguments) || this;
27
22
  }
28
23
 
29
- MediaHeading.prototype.render = function render() {
30
- var _props = this.props,
31
- Component = _props.componentClass,
32
- className = _props.className,
33
- props = _objectWithoutProperties(_props, ['componentClass', 'className']);
24
+ var _proto = MediaHeading.prototype;
25
+
26
+ _proto.render = function render() {
27
+ var _this$props = this.props,
28
+ Component = _this$props.componentClass,
29
+ className = _this$props.className,
30
+ props = _objectWithoutPropertiesLoose(_this$props, ["componentClass", "className"]);
34
31
 
35
32
  var _splitBsProps = splitBsProps(props),
36
33
  bsProps = _splitBsProps[0],
37
34
  elementProps = _splitBsProps[1];
38
35
 
39
36
  var classes = getClassSet(bsProps);
40
-
41
- return React.createElement(Component, _extends({}, elementProps, { className: classNames(className, classes) }));
37
+ return React.createElement(Component, _extends({}, elementProps, {
38
+ className: classNames(className, classes)
39
+ }));
42
40
  };
43
41
 
44
42
  return MediaHeading;
@@ -46,5 +44,4 @@ var MediaHeading = function (_React$Component) {
46
44
 
47
45
  MediaHeading.propTypes = propTypes;
48
46
  MediaHeading.defaultProps = defaultProps;
49
-
50
47
  export default bsClass('media-heading', MediaHeading);
package/es/MediaLeft.js CHANGED
@@ -1,15 +1,11 @@
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 Media from './Media';
11
8
  import { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';
12
-
13
9
  var propTypes = {
14
10
  /**
15
11
  * Align the media to the top, middle, or bottom of the media object.
@@ -17,20 +13,22 @@ var propTypes = {
17
13
  align: PropTypes.oneOf(['top', 'middle', 'bottom'])
18
14
  };
19
15
 
20
- var MediaLeft = function (_React$Component) {
21
- _inherits(MediaLeft, _React$Component);
16
+ var MediaLeft =
17
+ /*#__PURE__*/
18
+ function (_React$Component) {
19
+ _inheritsLoose(MediaLeft, _React$Component);
22
20
 
23
21
  function MediaLeft() {
24
- _classCallCheck(this, MediaLeft);
25
-
26
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
22
+ return _React$Component.apply(this, arguments) || this;
27
23
  }
28
24
 
29
- MediaLeft.prototype.render = function render() {
30
- var _props = this.props,
31
- align = _props.align,
32
- className = _props.className,
33
- props = _objectWithoutProperties(_props, ['align', 'className']);
25
+ var _proto = MediaLeft.prototype;
26
+
27
+ _proto.render = function render() {
28
+ var _this$props = this.props,
29
+ align = _this$props.align,
30
+ className = _this$props.className,
31
+ props = _objectWithoutPropertiesLoose(_this$props, ["align", "className"]);
34
32
 
35
33
  var _splitBsProps = splitBsProps(props),
36
34
  bsProps = _splitBsProps[0],
@@ -43,12 +41,13 @@ var MediaLeft = function (_React$Component) {
43
41
  classes[prefix(Media.defaultProps, align)] = true;
44
42
  }
45
43
 
46
- return React.createElement('div', _extends({}, elementProps, { className: classNames(className, classes) }));
44
+ return React.createElement("div", _extends({}, elementProps, {
45
+ className: classNames(className, classes)
46
+ }));
47
47
  };
48
48
 
49
49
  return MediaLeft;
50
50
  }(React.Component);
51
51
 
52
52
  MediaLeft.propTypes = propTypes;
53
-
54
53
  export default bsClass('media-left', MediaLeft);
package/es/MediaList.js CHANGED
@@ -1,34 +1,34 @@
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 MediaList = function (_React$Component) {
12
- _inherits(MediaList, _React$Component);
8
+ var MediaList =
9
+ /*#__PURE__*/
10
+ function (_React$Component) {
11
+ _inheritsLoose(MediaList, _React$Component);
13
12
 
14
13
  function MediaList() {
15
- _classCallCheck(this, MediaList);
16
-
17
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
14
+ return _React$Component.apply(this, arguments) || this;
18
15
  }
19
16
 
20
- MediaList.prototype.render = function render() {
21
- var _props = this.props,
22
- className = _props.className,
23
- props = _objectWithoutProperties(_props, ['className']);
17
+ var _proto = MediaList.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('ul', _extends({}, elementProps, { className: classNames(className, classes) }));
29
+ return React.createElement("ul", _extends({}, elementProps, {
30
+ className: classNames(className, classes)
31
+ }));
32
32
  };
33
33
 
34
34
  return MediaList;
@@ -1,34 +1,34 @@
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 MediaListItem = function (_React$Component) {
12
- _inherits(MediaListItem, _React$Component);
8
+ var MediaListItem =
9
+ /*#__PURE__*/
10
+ function (_React$Component) {
11
+ _inheritsLoose(MediaListItem, _React$Component);
13
12
 
14
13
  function MediaListItem() {
15
- _classCallCheck(this, MediaListItem);
16
-
17
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
14
+ return _React$Component.apply(this, arguments) || this;
18
15
  }
19
16
 
20
- MediaListItem.prototype.render = function render() {
21
- var _props = this.props,
22
- className = _props.className,
23
- props = _objectWithoutProperties(_props, ['className']);
17
+ var _proto = MediaListItem.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('li', _extends({}, elementProps, { className: classNames(className, classes) }));
29
+ return React.createElement("li", _extends({}, elementProps, {
30
+ className: classNames(className, classes)
31
+ }));
32
32
  };
33
33
 
34
34
  return MediaListItem;
package/es/MediaRight.js CHANGED
@@ -1,15 +1,11 @@
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 Media from './Media';
11
8
  import { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';
12
-
13
9
  var propTypes = {
14
10
  /**
15
11
  * Align the media to the top, middle, or bottom of the media object.
@@ -17,20 +13,22 @@ var propTypes = {
17
13
  align: PropTypes.oneOf(['top', 'middle', 'bottom'])
18
14
  };
19
15
 
20
- var MediaRight = function (_React$Component) {
21
- _inherits(MediaRight, _React$Component);
16
+ var MediaRight =
17
+ /*#__PURE__*/
18
+ function (_React$Component) {
19
+ _inheritsLoose(MediaRight, _React$Component);
22
20
 
23
21
  function MediaRight() {
24
- _classCallCheck(this, MediaRight);
25
-
26
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
22
+ return _React$Component.apply(this, arguments) || this;
27
23
  }
28
24
 
29
- MediaRight.prototype.render = function render() {
30
- var _props = this.props,
31
- align = _props.align,
32
- className = _props.className,
33
- props = _objectWithoutProperties(_props, ['align', 'className']);
25
+ var _proto = MediaRight.prototype;
26
+
27
+ _proto.render = function render() {
28
+ var _this$props = this.props,
29
+ align = _this$props.align,
30
+ className = _this$props.className,
31
+ props = _objectWithoutPropertiesLoose(_this$props, ["align", "className"]);
34
32
 
35
33
  var _splitBsProps = splitBsProps(props),
36
34
  bsProps = _splitBsProps[0],
@@ -43,12 +41,13 @@ var MediaRight = function (_React$Component) {
43
41
  classes[prefix(Media.defaultProps, align)] = true;
44
42
  }
45
43
 
46
- return React.createElement('div', _extends({}, elementProps, { className: classNames(className, classes) }));
44
+ return React.createElement("div", _extends({}, elementProps, {
45
+ className: classNames(className, classes)
46
+ }));
47
47
  };
48
48
 
49
49
  return MediaRight;
50
50
  }(React.Component);
51
51
 
52
52
  MediaRight.propTypes = propTypes;
53
-
54
53
  export default bsClass('media-right', MediaRight);
package/es/MenuItem.js CHANGED
@@ -1,17 +1,14 @@
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";
4
+ import _assertThisInitialized from "@babel/runtime-corejs2/helpers/esm/assertThisInitialized";
6
5
  import classNames from 'classnames';
7
6
  import React from 'react';
8
7
  import PropTypes from 'prop-types';
9
8
  import all from 'prop-types-extra/lib/all';
10
-
11
9
  import SafeAnchor from './SafeAnchor';
12
10
  import { bsClass, prefix, splitBsPropsAndOmit } from './utils/bootstrapUtils';
13
11
  import createChainedFunction from './utils/createChainedFunction';
14
-
15
12
  var propTypes = {
16
13
  /**
17
14
  * Highlight the menu item as active.
@@ -62,32 +59,33 @@ var propTypes = {
62
59
  */
63
60
  onSelect: PropTypes.func
64
61
  };
65
-
66
62
  var defaultProps = {
67
63
  divider: false,
68
64
  disabled: false,
69
65
  header: false
70
66
  };
71
67
 
72
- var MenuItem = function (_React$Component) {
73
- _inherits(MenuItem, _React$Component);
68
+ var MenuItem =
69
+ /*#__PURE__*/
70
+ function (_React$Component) {
71
+ _inheritsLoose(MenuItem, _React$Component);
74
72
 
75
73
  function MenuItem(props, context) {
76
- _classCallCheck(this, MenuItem);
77
-
78
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context));
74
+ var _this;
79
75
 
80
- _this.handleClick = _this.handleClick.bind(_this);
76
+ _this = _React$Component.call(this, props, context) || this;
77
+ _this.handleClick = _this.handleClick.bind(_assertThisInitialized(_assertThisInitialized(_this)));
81
78
  return _this;
82
79
  }
83
80
 
84
- MenuItem.prototype.handleClick = function handleClick(event) {
85
- var _props = this.props,
86
- href = _props.href,
87
- disabled = _props.disabled,
88
- onSelect = _props.onSelect,
89
- eventKey = _props.eventKey;
81
+ var _proto = MenuItem.prototype;
90
82
 
83
+ _proto.handleClick = function handleClick(event) {
84
+ var _this$props = this.props,
85
+ href = _this$props.href,
86
+ disabled = _this$props.disabled,
87
+ onSelect = _this$props.onSelect,
88
+ eventKey = _this$props.eventKey;
91
89
 
92
90
  if (!href || disabled) {
93
91
  event.preventDefault();
@@ -102,16 +100,16 @@ var MenuItem = function (_React$Component) {
102
100
  }
103
101
  };
104
102
 
105
- MenuItem.prototype.render = function render() {
106
- var _props2 = this.props,
107
- active = _props2.active,
108
- disabled = _props2.disabled,
109
- divider = _props2.divider,
110
- header = _props2.header,
111
- onClick = _props2.onClick,
112
- className = _props2.className,
113
- style = _props2.style,
114
- props = _objectWithoutProperties(_props2, ['active', 'disabled', 'divider', 'header', 'onClick', 'className', 'style']);
103
+ _proto.render = function render() {
104
+ var _this$props2 = this.props,
105
+ active = _this$props2.active,
106
+ disabled = _this$props2.disabled,
107
+ divider = _this$props2.divider,
108
+ header = _this$props2.header,
109
+ onClick = _this$props2.onClick,
110
+ className = _this$props2.className,
111
+ style = _this$props2.style,
112
+ props = _objectWithoutPropertiesLoose(_this$props2, ["active", "disabled", "divider", "header", "onClick", "className", "style"]);
115
113
 
116
114
  var _splitBsPropsAndOmit = splitBsPropsAndOmit(props, ['eventKey', 'onSelect']),
117
115
  bsProps = _splitBsPropsAndOmit[0],
@@ -120,35 +118,33 @@ var MenuItem = function (_React$Component) {
120
118
  if (divider) {
121
119
  // Forcibly blank out the children; separators shouldn't render any.
122
120
  elementProps.children = undefined;
123
-
124
- return React.createElement('li', _extends({}, elementProps, {
125
- role: 'separator',
121
+ return React.createElement("li", _extends({}, elementProps, {
122
+ role: "separator",
126
123
  className: classNames(className, 'divider'),
127
124
  style: style
128
125
  }));
129
126
  }
130
127
 
131
128
  if (header) {
132
- return React.createElement('li', _extends({}, elementProps, {
133
- role: 'heading',
129
+ return React.createElement("li", _extends({}, elementProps, {
130
+ role: "heading",
134
131
  className: classNames(className, prefix(bsProps, 'header')),
135
132
  style: style
136
133
  }));
137
134
  }
138
135
 
139
- return React.createElement(
140
- 'li',
141
- {
142
- role: 'presentation',
143
- className: classNames(className, { active: active, disabled: disabled }),
144
- style: style
145
- },
146
- React.createElement(SafeAnchor, _extends({}, elementProps, {
147
- role: 'menuitem',
148
- tabIndex: '-1',
149
- onClick: createChainedFunction(onClick, this.handleClick)
150
- }))
151
- );
136
+ return React.createElement("li", {
137
+ role: "presentation",
138
+ className: classNames(className, {
139
+ active: active,
140
+ disabled: disabled
141
+ }),
142
+ style: style
143
+ }, React.createElement(SafeAnchor, _extends({}, elementProps, {
144
+ role: "menuitem",
145
+ tabIndex: "-1",
146
+ onClick: createChainedFunction(onClick, this.handleClick)
147
+ })));
152
148
  };
153
149
 
154
150
  return MenuItem;
@@ -156,5 +152,4 @@ var MenuItem = function (_React$Component) {
156
152
 
157
153
  MenuItem.propTypes = propTypes;
158
154
  MenuItem.defaultProps = defaultProps;
159
-
160
155
  export default bsClass('dropdown', MenuItem);