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/Overlay.js CHANGED
@@ -1,26 +1,24 @@
1
- import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
2
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
3
- import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
4
- import _inherits from 'babel-runtime/helpers/inherits';
5
- import _extends from 'babel-runtime/helpers/extends';
1
+ import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
2
+ import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
3
+ import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
6
4
  import classNames from 'classnames';
7
5
  import React, { cloneElement } from 'react';
8
6
  import PropTypes from 'prop-types';
9
7
  import BaseOverlay from 'react-overlays/lib/Overlay';
10
8
  import elementType from 'prop-types-extra/lib/elementType';
11
-
12
9
  import Fade from './Fade';
13
10
 
14
11
  var propTypes = _extends({}, BaseOverlay.propTypes, {
15
-
16
12
  /**
17
13
  * Set the visibility of the Overlay
18
14
  */
19
15
  show: PropTypes.bool,
16
+
20
17
  /**
21
18
  * Specify whether the overlay should trigger onHide when the user clicks outside the overlay
22
19
  */
23
20
  rootClose: PropTypes.bool,
21
+
24
22
  /**
25
23
  * A callback invoked by the overlay when it wishes to be hidden. Required if
26
24
  * `rootClose` is specified.
@@ -75,24 +73,25 @@ var defaultProps = {
75
73
  placement: 'right'
76
74
  };
77
75
 
78
- var Overlay = function (_React$Component) {
79
- _inherits(Overlay, _React$Component);
76
+ var Overlay =
77
+ /*#__PURE__*/
78
+ function (_React$Component) {
79
+ _inheritsLoose(Overlay, _React$Component);
80
80
 
81
81
  function Overlay() {
82
- _classCallCheck(this, Overlay);
83
-
84
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
82
+ return _React$Component.apply(this, arguments) || this;
85
83
  }
86
84
 
87
- Overlay.prototype.render = function render() {
88
- var _props = this.props,
89
- animation = _props.animation,
90
- children = _props.children,
91
- props = _objectWithoutProperties(_props, ['animation', 'children']);
85
+ var _proto = Overlay.prototype;
92
86
 
93
- var transition = animation === true ? Fade : animation || null;
87
+ _proto.render = function render() {
88
+ var _this$props = this.props,
89
+ animation = _this$props.animation,
90
+ children = _this$props.children,
91
+ props = _objectWithoutPropertiesLoose(_this$props, ["animation", "children"]);
94
92
 
95
- var child = void 0;
93
+ var transition = animation === true ? Fade : animation || null;
94
+ var child;
96
95
 
97
96
  if (!transition) {
98
97
  child = cloneElement(children, {
@@ -102,11 +101,9 @@ var Overlay = function (_React$Component) {
102
101
  child = children;
103
102
  }
104
103
 
105
- return React.createElement(
106
- BaseOverlay,
107
- _extends({}, props, { transition: transition }),
108
- child
109
- );
104
+ return React.createElement(BaseOverlay, _extends({}, props, {
105
+ transition: transition
106
+ }), child);
110
107
  };
111
108
 
112
109
  return Overlay;
@@ -114,5 +111,4 @@ var Overlay = function (_React$Component) {
114
111
 
115
112
  Overlay.propTypes = propTypes;
116
113
  Overlay.defaultProps = defaultProps;
117
-
118
114
  export default Overlay;
@@ -1,18 +1,15 @@
1
- import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
2
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
3
- import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
4
- import _inherits from 'babel-runtime/helpers/inherits';
5
- import _extends from 'babel-runtime/helpers/extends';
1
+ import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
2
+ import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
3
+ import _assertThisInitialized from "@babel/runtime-corejs2/helpers/esm/assertThisInitialized";
4
+ import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
5
+ import _Array$isArray from "@babel/runtime-corejs2/core-js/array/is-array";
6
6
  import contains from 'dom-helpers/query/contains';
7
7
  import React, { cloneElement } from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  import ReactDOM from 'react-dom';
10
10
  import warning from 'warning';
11
-
12
11
  import Overlay from './Overlay';
13
-
14
12
  import createChainedFunction from './utils/createChainedFunction';
15
-
16
13
  /**
17
14
  * Check if value one is inside or equal to the of value
18
15
  *
@@ -20,17 +17,18 @@ import createChainedFunction from './utils/createChainedFunction';
20
17
  * @param {string|array} of
21
18
  * @returns {boolean}
22
19
  */
20
+
23
21
  function isOneOf(one, of) {
24
- if (Array.isArray(of)) {
22
+ if (_Array$isArray(of)) {
25
23
  return of.indexOf(one) >= 0;
26
24
  }
25
+
27
26
  return one === of;
28
27
  }
29
28
 
30
29
  var triggerType = PropTypes.oneOf(['click', 'hover', 'focus']);
31
30
 
32
31
  var propTypes = _extends({}, Overlay.propTypes, {
33
-
34
32
  /**
35
33
  * Specify which action or actions trigger Overlay visibility
36
34
  */
@@ -40,16 +38,18 @@ var propTypes = _extends({}, Overlay.propTypes, {
40
38
  * A millisecond delay amount to show and hide the Overlay once triggered
41
39
  */
42
40
  delay: PropTypes.number,
41
+
43
42
  /**
44
43
  * A millisecond delay amount before showing the Overlay once triggered.
45
44
  */
46
45
  delayShow: PropTypes.number,
46
+
47
47
  /**
48
48
  * A millisecond delay amount before hiding the Overlay once triggered.
49
49
  */
50
50
  delayHide: PropTypes.number,
51
-
52
51
  // FIXME: This should be `defaultShow`.
52
+
53
53
  /**
54
54
  * The initial visibility state of the Overlay. For more nuanced visibility
55
55
  * control, consider using the Overlay component directly.
@@ -65,32 +65,38 @@ var propTypes = _extends({}, Overlay.propTypes, {
65
65
  * @private
66
66
  */
67
67
  onBlur: PropTypes.func,
68
+
68
69
  /**
69
70
  * @private
70
71
  */
71
72
  onClick: PropTypes.func,
73
+
72
74
  /**
73
75
  * @private
74
76
  */
75
77
  onFocus: PropTypes.func,
78
+
76
79
  /**
77
80
  * @private
78
81
  */
79
82
  onMouseOut: PropTypes.func,
83
+
80
84
  /**
81
85
  * @private
82
86
  */
83
87
  onMouseOver: PropTypes.func,
84
-
85
88
  // Overridden props from `<Overlay>`.
89
+
86
90
  /**
87
91
  * @private
88
92
  */
89
93
  target: PropTypes.oneOf([null]),
94
+
90
95
  /**
91
96
  * @private
92
97
  */
93
98
  onHide: PropTypes.oneOf([null]),
99
+
94
100
  /**
95
101
  * @private
96
102
  */
@@ -102,52 +108,54 @@ var defaultProps = {
102
108
  trigger: ['hover', 'focus']
103
109
  };
104
110
 
105
- var OverlayTrigger = function (_React$Component) {
106
- _inherits(OverlayTrigger, _React$Component);
111
+ var OverlayTrigger =
112
+ /*#__PURE__*/
113
+ function (_React$Component) {
114
+ _inheritsLoose(OverlayTrigger, _React$Component);
107
115
 
108
116
  function OverlayTrigger(props, context) {
109
- _classCallCheck(this, OverlayTrigger);
110
-
111
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context));
117
+ var _this;
112
118
 
113
- _this.handleToggle = _this.handleToggle.bind(_this);
114
- _this.handleDelayedShow = _this.handleDelayedShow.bind(_this);
115
- _this.handleDelayedHide = _this.handleDelayedHide.bind(_this);
116
- _this.handleHide = _this.handleHide.bind(_this);
119
+ _this = _React$Component.call(this, props, context) || this;
120
+ _this.handleToggle = _this.handleToggle.bind(_assertThisInitialized(_assertThisInitialized(_this)));
121
+ _this.handleDelayedShow = _this.handleDelayedShow.bind(_assertThisInitialized(_assertThisInitialized(_this)));
122
+ _this.handleDelayedHide = _this.handleDelayedHide.bind(_assertThisInitialized(_assertThisInitialized(_this)));
123
+ _this.handleHide = _this.handleHide.bind(_assertThisInitialized(_assertThisInitialized(_this)));
117
124
 
118
125
  _this.handleMouseOver = function (e) {
119
126
  return _this.handleMouseOverOut(_this.handleDelayedShow, e, 'fromElement');
120
127
  };
128
+
121
129
  _this.handleMouseOut = function (e) {
122
130
  return _this.handleMouseOverOut(_this.handleDelayedHide, e, 'toElement');
123
131
  };
124
132
 
125
133
  _this._mountNode = null;
126
-
127
134
  _this.state = {
128
135
  show: props.defaultOverlayShown
129
136
  };
130
137
  return _this;
131
138
  }
132
139
 
133
- OverlayTrigger.prototype.componentDidMount = function componentDidMount() {
140
+ var _proto = OverlayTrigger.prototype;
141
+
142
+ _proto.componentDidMount = function componentDidMount() {
134
143
  this._mountNode = document.createElement('div');
135
144
  this.renderOverlay();
136
145
  };
137
146
 
138
- OverlayTrigger.prototype.componentDidUpdate = function componentDidUpdate() {
147
+ _proto.componentDidUpdate = function componentDidUpdate() {
139
148
  this.renderOverlay();
140
149
  };
141
150
 
142
- OverlayTrigger.prototype.componentWillUnmount = function componentWillUnmount() {
151
+ _proto.componentWillUnmount = function componentWillUnmount() {
143
152
  ReactDOM.unmountComponentAtNode(this._mountNode);
144
153
  this._mountNode = null;
145
-
146
154
  clearTimeout(this._hoverShowDelay);
147
155
  clearTimeout(this._hoverHideDelay);
148
156
  };
149
157
 
150
- OverlayTrigger.prototype.handleDelayedHide = function handleDelayedHide() {
158
+ _proto.handleDelayedHide = function handleDelayedHide() {
151
159
  var _this2 = this;
152
160
 
153
161
  if (this._hoverShowDelay != null) {
@@ -169,11 +177,12 @@ var OverlayTrigger = function (_React$Component) {
169
177
 
170
178
  this._hoverHideDelay = setTimeout(function () {
171
179
  _this2._hoverHideDelay = null;
180
+
172
181
  _this2.hide();
173
182
  }, delay);
174
183
  };
175
184
 
176
- OverlayTrigger.prototype.handleDelayedShow = function handleDelayedShow() {
185
+ _proto.handleDelayedShow = function handleDelayedShow() {
177
186
  var _this3 = this;
178
187
 
179
188
  if (this._hoverHideDelay != null) {
@@ -195,21 +204,20 @@ var OverlayTrigger = function (_React$Component) {
195
204
 
196
205
  this._hoverShowDelay = setTimeout(function () {
197
206
  _this3._hoverShowDelay = null;
207
+
198
208
  _this3.show();
199
209
  }, delay);
200
210
  };
201
211
 
202
- OverlayTrigger.prototype.handleHide = function handleHide() {
212
+ _proto.handleHide = function handleHide() {
203
213
  this.hide();
204
- };
205
-
206
- // Simple implementation of mouseEnter and mouseLeave.
214
+ }; // Simple implementation of mouseEnter and mouseLeave.
207
215
  // React's built version is broken: https://github.com/facebook/react/issues/4251
208
216
  // for cases when the trigger is disabled and mouseOut/Over can cause flicker
209
217
  // moving from one child element to another.
210
218
 
211
219
 
212
- OverlayTrigger.prototype.handleMouseOverOut = function handleMouseOverOut(handler, e, relatedNative) {
220
+ _proto.handleMouseOverOut = function handleMouseOverOut(handler, e, relatedNative) {
213
221
  var target = e.currentTarget;
214
222
  var related = e.relatedTarget || e.nativeEvent[relatedNative];
215
223
 
@@ -218,7 +226,7 @@ var OverlayTrigger = function (_React$Component) {
218
226
  }
219
227
  };
220
228
 
221
- OverlayTrigger.prototype.handleToggle = function handleToggle() {
229
+ _proto.handleToggle = function handleToggle() {
222
230
  if (this.state.show) {
223
231
  this.hide();
224
232
  } else {
@@ -226,58 +234,56 @@ var OverlayTrigger = function (_React$Component) {
226
234
  }
227
235
  };
228
236
 
229
- OverlayTrigger.prototype.hide = function hide() {
230
- this.setState({ show: false });
237
+ _proto.hide = function hide() {
238
+ this.setState({
239
+ show: false
240
+ });
231
241
  };
232
242
 
233
- OverlayTrigger.prototype.makeOverlay = function makeOverlay(overlay, props) {
234
- return React.createElement(
235
- Overlay,
236
- _extends({}, props, {
237
- show: this.state.show,
238
- onHide: this.handleHide,
239
- target: this
240
- }),
241
- overlay
242
- );
243
+ _proto.makeOverlay = function makeOverlay(overlay, props) {
244
+ return React.createElement(Overlay, _extends({}, props, {
245
+ show: this.state.show,
246
+ onHide: this.handleHide,
247
+ target: this
248
+ }), overlay);
243
249
  };
244
250
 
245
- OverlayTrigger.prototype.show = function show() {
246
- this.setState({ show: true });
251
+ _proto.show = function show() {
252
+ this.setState({
253
+ show: true
254
+ });
247
255
  };
248
256
 
249
- OverlayTrigger.prototype.renderOverlay = function renderOverlay() {
257
+ _proto.renderOverlay = function renderOverlay() {
250
258
  ReactDOM.unstable_renderSubtreeIntoContainer(this, this._overlay, this._mountNode);
251
259
  };
252
260
 
253
- OverlayTrigger.prototype.render = function render() {
254
- var _props = this.props,
255
- trigger = _props.trigger,
256
- overlay = _props.overlay,
257
- children = _props.children,
258
- onBlur = _props.onBlur,
259
- onClick = _props.onClick,
260
- onFocus = _props.onFocus,
261
- onMouseOut = _props.onMouseOut,
262
- onMouseOver = _props.onMouseOver,
263
- props = _objectWithoutProperties(_props, ['trigger', 'overlay', 'children', 'onBlur', 'onClick', 'onFocus', 'onMouseOut', 'onMouseOver']);
261
+ _proto.render = function render() {
262
+ var _this$props = this.props,
263
+ trigger = _this$props.trigger,
264
+ overlay = _this$props.overlay,
265
+ children = _this$props.children,
266
+ onBlur = _this$props.onBlur,
267
+ onClick = _this$props.onClick,
268
+ onFocus = _this$props.onFocus,
269
+ onMouseOut = _this$props.onMouseOut,
270
+ onMouseOver = _this$props.onMouseOver,
271
+ props = _objectWithoutPropertiesLoose(_this$props, ["trigger", "overlay", "children", "onBlur", "onClick", "onFocus", "onMouseOut", "onMouseOver"]);
264
272
 
265
273
  delete props.delay;
266
274
  delete props.delayShow;
267
275
  delete props.delayHide;
268
276
  delete props.defaultOverlayShown;
269
-
270
277
  var child = React.Children.only(children);
271
278
  var childProps = child.props;
272
279
  var triggerProps = {};
273
280
 
274
281
  if (this.state.show) {
275
282
  triggerProps['aria-describedby'] = overlay.props.id;
276
- }
277
-
278
- // FIXME: The logic here for passing through handlers on this component is
283
+ } // FIXME: The logic here for passing through handlers on this component is
279
284
  // inconsistent. We shouldn't be passing any of these props through.
280
285
 
286
+
281
287
  triggerProps.onClick = createChainedFunction(childProps.onClick, onClick);
282
288
 
283
289
  if (isOneOf('click', trigger)) {
@@ -285,8 +291,7 @@ var OverlayTrigger = function (_React$Component) {
285
291
  }
286
292
 
287
293
  if (isOneOf('hover', trigger)) {
288
- process.env.NODE_ENV !== 'production' ? warning(!(trigger === 'hover'), '[react-bootstrap] Specifying only the `"hover"` trigger limits the ' + 'visibility of the overlay to just mouse users. Consider also ' + 'including the `"focus"` trigger so that touch and keyboard only ' + 'users can see the overlay as well.') : void 0;
289
-
294
+ process.env.NODE_ENV !== "production" ? warning(!(trigger === 'hover'), '[react-bootstrap] Specifying only the `"hover"` trigger limits the ' + 'visibility of the overlay to just mouse users. Consider also ' + 'including the `"focus"` trigger so that touch and keyboard only ' + 'users can see the overlay as well.') : void 0;
290
295
  triggerProps.onMouseOver = createChainedFunction(childProps.onMouseOver, onMouseOver, this.handleMouseOver);
291
296
  triggerProps.onMouseOut = createChainedFunction(childProps.onMouseOut, onMouseOut, this.handleMouseOut);
292
297
  }
@@ -297,7 +302,6 @@ var OverlayTrigger = function (_React$Component) {
297
302
  }
298
303
 
299
304
  this._overlay = this.makeOverlay(overlay, props);
300
-
301
305
  return cloneElement(child, triggerProps);
302
306
  };
303
307
 
@@ -306,5 +310,4 @@ var OverlayTrigger = function (_React$Component) {
306
310
 
307
311
  OverlayTrigger.propTypes = propTypes;
308
312
  OverlayTrigger.defaultProps = defaultProps;
309
-
310
313
  export default OverlayTrigger;
package/es/PageHeader.js CHANGED
@@ -1,43 +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 { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
10
7
 
11
- var PageHeader = function (_React$Component) {
12
- _inherits(PageHeader, _React$Component);
8
+ var PageHeader =
9
+ /*#__PURE__*/
10
+ function (_React$Component) {
11
+ _inheritsLoose(PageHeader, _React$Component);
13
12
 
14
13
  function PageHeader() {
15
- _classCallCheck(this, PageHeader);
16
-
17
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
14
+ return _React$Component.apply(this, arguments) || this;
18
15
  }
19
16
 
20
- PageHeader.prototype.render = function render() {
21
- var _props = this.props,
22
- className = _props.className,
23
- children = _props.children,
24
- props = _objectWithoutProperties(_props, ['className', 'children']);
17
+ var _proto = PageHeader.prototype;
18
+
19
+ _proto.render = function render() {
20
+ var _this$props = this.props,
21
+ className = _this$props.className,
22
+ children = _this$props.children,
23
+ props = _objectWithoutPropertiesLoose(_this$props, ["className", "children"]);
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(
33
- 'div',
34
- _extends({}, elementProps, { className: classNames(className, classes) }),
35
- React.createElement(
36
- 'h1',
37
- null,
38
- children
39
- )
40
- );
30
+ return React.createElement("div", _extends({}, elementProps, {
31
+ className: classNames(className, classes)
32
+ }), React.createElement("h1", null, children));
41
33
  };
42
34
 
43
35
  return PageHeader;
package/es/PageItem.js CHANGED
@@ -1,4 +1,3 @@
1
1
  import PagerItem from './PagerItem';
2
2
  import deprecationWarning from './utils/deprecationWarning';
3
-
4
3
  export default deprecationWarning.wrapper(PagerItem, '`<PageItem>`', '`<Pager.Item>`');
package/es/Pager.js CHANGED
@@ -1,59 +1,52 @@
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, { cloneElement } from 'react';
8
6
  import PropTypes from 'prop-types';
9
-
10
7
  import PagerItem from './PagerItem';
11
8
  import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
12
9
  import createChainedFunction from './utils/createChainedFunction';
13
10
  import ValidComponentChildren from './utils/ValidComponentChildren';
14
-
15
11
  var propTypes = {
16
12
  onSelect: PropTypes.func
17
13
  };
18
14
 
19
- var Pager = function (_React$Component) {
20
- _inherits(Pager, _React$Component);
15
+ var Pager =
16
+ /*#__PURE__*/
17
+ function (_React$Component) {
18
+ _inheritsLoose(Pager, _React$Component);
21
19
 
22
20
  function Pager() {
23
- _classCallCheck(this, Pager);
24
-
25
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
21
+ return _React$Component.apply(this, arguments) || this;
26
22
  }
27
23
 
28
- Pager.prototype.render = function render() {
29
- var _props = this.props,
30
- onSelect = _props.onSelect,
31
- className = _props.className,
32
- children = _props.children,
33
- props = _objectWithoutProperties(_props, ['onSelect', 'className', 'children']);
24
+ var _proto = Pager.prototype;
25
+
26
+ _proto.render = function render() {
27
+ var _this$props = this.props,
28
+ onSelect = _this$props.onSelect,
29
+ className = _this$props.className,
30
+ children = _this$props.children,
31
+ props = _objectWithoutPropertiesLoose(_this$props, ["onSelect", "className", "children"]);
34
32
 
35
33
  var _splitBsProps = splitBsProps(props),
36
34
  bsProps = _splitBsProps[0],
37
35
  elementProps = _splitBsProps[1];
38
36
 
39
37
  var classes = getClassSet(bsProps);
40
-
41
- return React.createElement(
42
- 'ul',
43
- _extends({}, elementProps, { className: classNames(className, classes) }),
44
- ValidComponentChildren.map(children, function (child) {
45
- return cloneElement(child, {
46
- onSelect: createChainedFunction(child.props.onSelect, onSelect)
47
- });
48
- })
49
- );
38
+ return React.createElement("ul", _extends({}, elementProps, {
39
+ className: classNames(className, classes)
40
+ }), ValidComponentChildren.map(children, function (child) {
41
+ return cloneElement(child, {
42
+ onSelect: createChainedFunction(child.props.onSelect, onSelect)
43
+ });
44
+ }));
50
45
  };
51
46
 
52
47
  return Pager;
53
48
  }(React.Component);
54
49
 
55
50
  Pager.propTypes = propTypes;
56
-
57
51
  Pager.Item = PagerItem;
58
-
59
52
  export default bsClass('pager', Pager);