react-bootstrap 0.31.3 → 0.32.1

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 (189) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +1 -0
  3. package/dist/react-bootstrap.js +14493 -17076
  4. package/dist/react-bootstrap.min.js +18479 -16
  5. package/es/Alert.js +1 -4
  6. package/es/Badge.js +1 -3
  7. package/es/ButtonGroup.js +1 -3
  8. package/es/Carousel.js +79 -79
  9. package/es/CarouselCaption.js +1 -3
  10. package/es/CarouselItem.js +3 -9
  11. package/es/Checkbox.js +7 -1
  12. package/es/Clearfix.js +1 -3
  13. package/es/CloseButton.js +1 -5
  14. package/es/Col.js +1 -3
  15. package/es/Collapse.js +58 -65
  16. package/es/Dropdown.js +66 -55
  17. package/es/DropdownButton.js +2 -8
  18. package/es/DropdownMenu.js +28 -28
  19. package/es/Fade.js +25 -10
  20. package/es/Form.js +1 -3
  21. package/es/FormControl.js +1 -2
  22. package/es/FormControlStatic.js +1 -3
  23. package/es/FormGroup.js +1 -3
  24. package/es/Glyphicon.js +1 -3
  25. package/es/Grid.js +1 -3
  26. package/es/HelpBlock.js +1 -3
  27. package/es/InputGroup.js +1 -3
  28. package/es/InputGroupAddon.js +1 -3
  29. package/es/InputGroupButton.js +1 -3
  30. package/es/Jumbotron.js +1 -3
  31. package/es/Label.js +1 -3
  32. package/es/ListGroup.js +1 -3
  33. package/es/Media.js +1 -3
  34. package/es/MediaBody.js +16 -5
  35. package/es/MediaHeading.js +1 -3
  36. package/es/MediaLeft.js +1 -3
  37. package/es/MediaList.js +1 -3
  38. package/es/MediaListItem.js +1 -3
  39. package/es/MediaRight.js +1 -3
  40. package/es/Modal.js +30 -19
  41. package/es/ModalBody.js +1 -3
  42. package/es/ModalFooter.js +1 -3
  43. package/es/ModalHeader.js +2 -4
  44. package/es/ModalTitle.js +1 -3
  45. package/es/Nav.js +44 -44
  46. package/es/NavDropdown.js +2 -0
  47. package/es/NavItem.js +5 -4
  48. package/es/Navbar.js +5 -7
  49. package/es/Overlay.js +1 -3
  50. package/es/OverlayTrigger.js +43 -43
  51. package/es/PageHeader.js +1 -3
  52. package/es/Pager.js +1 -3
  53. package/es/PagerItem.js +1 -4
  54. package/es/Pagination.js +15 -224
  55. package/es/PaginationItem.js +102 -0
  56. package/es/Panel.js +114 -173
  57. package/es/PanelBody.js +84 -0
  58. package/es/PanelCollapse.js +94 -0
  59. package/es/PanelFooter.js +53 -0
  60. package/es/PanelGroup.js +95 -52
  61. package/es/PanelHeading.js +75 -0
  62. package/es/PanelTitle.js +83 -0
  63. package/es/PanelToggle.js +94 -0
  64. package/es/ProgressBar.js +12 -8
  65. package/es/Radio.js +7 -1
  66. package/es/Row.js +1 -3
  67. package/es/SplitButton.js +1 -4
  68. package/es/SplitToggle.js +1 -4
  69. package/es/TabContent.js +7 -7
  70. package/es/TabPane.js +18 -18
  71. package/es/Table.js +1 -3
  72. package/es/Tabs.js +4 -10
  73. package/es/Thumbnail.js +3 -3
  74. package/es/ToggleButton.js +1 -4
  75. package/es/Well.js +1 -3
  76. package/es/index.js +0 -2
  77. package/es/utils/PropTypes.js +26 -4
  78. package/es/utils/ValidComponentChildren.js +1 -1
  79. package/es/utils/bootstrapUtils.js +5 -3
  80. package/lib/Accordion.js +9 -9
  81. package/lib/Alert.js +14 -17
  82. package/lib/Badge.js +12 -14
  83. package/lib/Breadcrumb.js +10 -10
  84. package/lib/BreadcrumbItem.js +14 -14
  85. package/lib/Button.js +20 -20
  86. package/lib/ButtonGroup.js +12 -14
  87. package/lib/ButtonToolbar.js +9 -9
  88. package/lib/Carousel.js +121 -121
  89. package/lib/CarouselCaption.js +9 -11
  90. package/lib/CarouselItem.js +17 -22
  91. package/lib/Checkbox.js +25 -21
  92. package/lib/Clearfix.js +14 -16
  93. package/lib/CloseButton.js +12 -16
  94. package/lib/Col.js +29 -31
  95. package/lib/Collapse.js +84 -92
  96. package/lib/ControlLabel.js +14 -14
  97. package/lib/Dropdown.js +106 -95
  98. package/lib/DropdownButton.js +22 -28
  99. package/lib/DropdownMenu.js +51 -51
  100. package/lib/DropdownToggle.js +16 -16
  101. package/lib/Fade.js +43 -25
  102. package/lib/Form.js +11 -13
  103. package/lib/FormControl.js +17 -17
  104. package/lib/FormControlFeedback.js +13 -13
  105. package/lib/FormControlStatic.js +9 -11
  106. package/lib/FormGroup.js +14 -16
  107. package/lib/Glyphicon.js +10 -12
  108. package/lib/Grid.js +10 -12
  109. package/lib/HelpBlock.js +8 -10
  110. package/lib/Image.js +13 -13
  111. package/lib/InputGroup.js +10 -12
  112. package/lib/InputGroupAddon.js +8 -10
  113. package/lib/InputGroupButton.js +8 -10
  114. package/lib/Jumbotron.js +9 -11
  115. package/lib/Label.js +11 -13
  116. package/lib/ListGroup.js +15 -17
  117. package/lib/ListGroupItem.js +22 -22
  118. package/lib/Media.js +15 -17
  119. package/lib/MediaBody.js +28 -11
  120. package/lib/MediaHeading.js +9 -11
  121. package/lib/MediaLeft.js +10 -12
  122. package/lib/MediaList.js +8 -10
  123. package/lib/MediaListItem.js +8 -10
  124. package/lib/MediaRight.js +10 -12
  125. package/lib/MenuItem.js +23 -23
  126. package/lib/Modal.js +80 -69
  127. package/lib/ModalBody.js +9 -11
  128. package/lib/ModalDialog.js +16 -16
  129. package/lib/ModalFooter.js +9 -11
  130. package/lib/ModalHeader.js +20 -22
  131. package/lib/ModalTitle.js +9 -11
  132. package/lib/Nav.js +81 -81
  133. package/lib/NavDropdown.js +27 -25
  134. package/lib/NavItem.js +23 -22
  135. package/lib/Navbar.js +46 -48
  136. package/lib/NavbarBrand.js +14 -14
  137. package/lib/NavbarCollapse.js +14 -14
  138. package/lib/NavbarHeader.js +10 -10
  139. package/lib/NavbarToggle.js +22 -22
  140. package/lib/Overlay.js +25 -27
  141. package/lib/OverlayTrigger.js +79 -79
  142. package/lib/PageHeader.js +10 -12
  143. package/lib/PageItem.js +2 -2
  144. package/lib/Pager.js +13 -15
  145. package/lib/PagerItem.js +18 -21
  146. package/lib/Pagination.js +25 -240
  147. package/lib/PaginationItem.js +135 -0
  148. package/lib/Panel.js +142 -180
  149. package/lib/PanelBody.js +114 -0
  150. package/lib/PanelCollapse.js +120 -0
  151. package/lib/PanelFooter.js +80 -0
  152. package/lib/PanelGroup.js +111 -70
  153. package/lib/PanelHeading.js +107 -0
  154. package/lib/PanelTitle.js +118 -0
  155. package/lib/PanelToggle.js +130 -0
  156. package/lib/Popover.js +22 -22
  157. package/lib/ProgressBar.js +39 -35
  158. package/lib/Radio.js +25 -21
  159. package/lib/ResponsiveEmbed.js +17 -17
  160. package/lib/Row.js +9 -11
  161. package/lib/SafeAnchor.js +17 -17
  162. package/lib/SplitButton.js +26 -29
  163. package/lib/SplitToggle.js +8 -11
  164. package/lib/Tab.js +15 -15
  165. package/lib/TabContainer.js +17 -17
  166. package/lib/TabContent.js +31 -31
  167. package/lib/TabPane.js +59 -59
  168. package/lib/Table.js +15 -17
  169. package/lib/Tabs.js +29 -35
  170. package/lib/Thumbnail.js +18 -20
  171. package/lib/ToggleButton.js +17 -20
  172. package/lib/ToggleButtonGroup.js +20 -20
  173. package/lib/Tooltip.js +20 -20
  174. package/lib/Well.js +8 -10
  175. package/lib/index.js +74 -79
  176. package/lib/utils/PropTypes.js +35 -9
  177. package/lib/utils/ValidComponentChildren.js +19 -19
  178. package/lib/utils/bootstrapUtils.js +13 -11
  179. package/lib/utils/capitalize.js +1 -1
  180. package/lib/utils/createChainedFunction.js +1 -1
  181. package/lib/utils/deprecationWarning.js +7 -7
  182. package/lib/utils/index.js +4 -4
  183. package/lib/utils/splitComponentProps.js +3 -3
  184. package/package.json +54 -64
  185. package/dist/react-bootstrap.min.js.map +0 -1
  186. package/es/PaginationButton.js +0 -98
  187. package/es/utils/TransitionEvents.js +0 -109
  188. package/lib/PaginationButton.js +0 -137
  189. package/lib/utils/TransitionEvents.js +0 -113
package/es/Modal.js CHANGED
@@ -136,6 +136,17 @@ var childContextTypes = {
136
136
  })
137
137
  };
138
138
 
139
+ /* eslint-disable no-use-before-define, react/no-multi-comp */
140
+ function DialogTransition(props) {
141
+ return React.createElement(Fade, _extends({}, props, { timeout: Modal.TRANSITION_DURATION }));
142
+ }
143
+
144
+ function BackdropTransition(props) {
145
+ return React.createElement(Fade, _extends({}, props, { timeout: Modal.BACKDROP_TRANSITION_DURATION }));
146
+ }
147
+
148
+ /* eslint-enable no-use-before-define */
149
+
139
150
  var Modal = function (_React$Component) {
140
151
  _inherits(Modal, _React$Component);
141
152
 
@@ -148,6 +159,7 @@ var Modal = function (_React$Component) {
148
159
  _this.handleExited = _this.handleExited.bind(_this);
149
160
  _this.handleWindowResize = _this.handleWindowResize.bind(_this);
150
161
  _this.handleDialogClick = _this.handleDialogClick.bind(_this);
162
+ _this.setModalRef = _this.setModalRef.bind(_this);
151
163
 
152
164
  _this.state = {
153
165
  style: {}
@@ -168,6 +180,18 @@ var Modal = function (_React$Component) {
168
180
  this.handleExited();
169
181
  };
170
182
 
183
+ Modal.prototype.setModalRef = function setModalRef(ref) {
184
+ this._modal = ref;
185
+ };
186
+
187
+ Modal.prototype.handleDialogClick = function handleDialogClick(e) {
188
+ if (e.target !== e.currentTarget) {
189
+ return;
190
+ }
191
+
192
+ this.props.onHide();
193
+ };
194
+
171
195
  Modal.prototype.handleEntering = function handleEntering() {
172
196
  // FIXME: This should work even when animation is disabled.
173
197
  events.on(window, 'resize', this.handleWindowResize);
@@ -183,14 +207,6 @@ var Modal = function (_React$Component) {
183
207
  this.updateStyle();
184
208
  };
185
209
 
186
- Modal.prototype.handleDialogClick = function handleDialogClick(e) {
187
- if (e.target !== e.currentTarget) {
188
- return;
189
- }
190
-
191
- this.props.onHide();
192
- };
193
-
194
210
  Modal.prototype.updateStyle = function updateStyle() {
195
211
  if (!canUseDOM) {
196
212
  return;
@@ -212,8 +228,6 @@ var Modal = function (_React$Component) {
212
228
  };
213
229
 
214
230
  Modal.prototype.render = function render() {
215
- var _this2 = this;
216
-
217
231
  var _props = this.props,
218
232
  backdrop = _props.backdrop,
219
233
  backdropClassName = _props.backdropClassName,
@@ -236,18 +250,15 @@ var Modal = function (_React$Component) {
236
250
  return React.createElement(
237
251
  BaseModal,
238
252
  _extends({}, baseModalProps, {
239
- ref: function ref(c) {
240
- _this2._modal = c;
241
- },
253
+ ref: this.setModalRef,
242
254
  show: show,
243
- onEntering: createChainedFunction(onEntering, this.handleEntering),
244
- onExited: createChainedFunction(onExited, this.handleExited),
255
+ containerClassName: prefix(props, 'open'),
256
+ transition: animation ? DialogTransition : undefined,
245
257
  backdrop: backdrop,
258
+ backdropTransition: animation ? BackdropTransition : undefined,
246
259
  backdropClassName: classNames(prefix(props, 'backdrop'), backdropClassName, inClassName),
247
- containerClassName: prefix(props, 'open'),
248
- transition: animation ? Fade : undefined,
249
- dialogTransitionTimeout: Modal.TRANSITION_DURATION,
250
- backdropTransitionTimeout: Modal.BACKDROP_TRANSITION_DURATION
260
+ onEntering: createChainedFunction(onEntering, this.handleEntering),
261
+ onExited: createChainedFunction(onExited, this.handleExited)
251
262
  }),
252
263
  React.createElement(
253
264
  Dialog,
package/es/ModalBody.js CHANGED
@@ -38,9 +38,7 @@ var ModalBody = function (_React$Component) {
38
38
 
39
39
  var classes = getClassSet(bsProps);
40
40
 
41
- return React.createElement(Component, _extends({}, elementProps, {
42
- className: classNames(className, classes)
43
- }));
41
+ return React.createElement(Component, _extends({}, elementProps, { className: classNames(className, classes) }));
44
42
  };
45
43
 
46
44
  return ModalBody;
package/es/ModalFooter.js CHANGED
@@ -38,9 +38,7 @@ var ModalFooter = function (_React$Component) {
38
38
 
39
39
  var classes = getClassSet(bsProps);
40
40
 
41
- return React.createElement(Component, _extends({}, elementProps, {
42
- className: classNames(className, classes)
43
- }));
41
+ return React.createElement(Component, _extends({}, elementProps, { className: classNames(className, classes) }));
44
42
  };
45
43
 
46
44
  return ModalFooter;
package/es/ModalHeader.js CHANGED
@@ -4,8 +4,8 @@ import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
4
4
  import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
5
5
  import _inherits from 'babel-runtime/helpers/inherits';
6
6
  import classNames from 'classnames';
7
- import React from 'react';
8
7
  import PropTypes from 'prop-types';
8
+ import React from 'react';
9
9
 
10
10
  import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
11
11
  import createChainedFunction from './utils/createChainedFunction';
@@ -73,9 +73,7 @@ var ModalHeader = function (_React$Component) {
73
73
 
74
74
  return React.createElement(
75
75
  'div',
76
- _extends({}, elementProps, {
77
- className: classNames(className, classes)
78
- }),
76
+ _extends({}, elementProps, { className: classNames(className, classes) }),
79
77
  closeButton && React.createElement(CloseButton, {
80
78
  label: closeLabel,
81
79
  onClick: createChainedFunction(modal && modal.onHide, onHide)
package/es/ModalTitle.js CHANGED
@@ -38,9 +38,7 @@ var ModalTitle = function (_React$Component) {
38
38
 
39
39
  var classes = getClassSet(bsProps);
40
40
 
41
- return React.createElement(Component, _extends({}, elementProps, {
42
- className: classNames(className, classes)
43
- }));
41
+ return React.createElement(Component, _extends({}, elementProps, { className: classNames(className, classes) }));
44
42
  };
45
43
 
46
44
  return ModalTitle;
package/es/Nav.js CHANGED
@@ -50,8 +50,8 @@ var propTypes = {
50
50
  *
51
51
  * ```js
52
52
  * function (
53
- * Any eventKey,
54
- * SyntheticEvent event?
53
+ * Any eventKey,
54
+ * SyntheticEvent event?
55
55
  * )
56
56
  * ```
57
57
  */
@@ -148,30 +148,16 @@ var Nav = function (_React$Component) {
148
148
  activeNode.firstChild.focus();
149
149
  };
150
150
 
151
- Nav.prototype.handleTabKeyDown = function handleTabKeyDown(onSelect, event) {
152
- var nextActiveChild = void 0;
153
-
154
- switch (event.keyCode) {
155
- case keycode.codes.left:
156
- case keycode.codes.up:
157
- nextActiveChild = this.getNextActiveChild(-1);
158
- break;
159
- case keycode.codes.right:
160
- case keycode.codes.down:
161
- nextActiveChild = this.getNextActiveChild(1);
162
- break;
163
- default:
164
- // It was a different key; don't handle this keypress.
165
- return;
166
- }
151
+ Nav.prototype.getActiveProps = function getActiveProps() {
152
+ var tabContainer = this.context.$bs_tabContainer;
167
153
 
168
- event.preventDefault();
154
+ if (tabContainer) {
155
+ process.env.NODE_ENV !== 'production' ? warning(this.props.activeKey == null && !this.props.activeHref, 'Specifying a `<Nav>` `activeKey` or `activeHref` in the context of ' + 'a `<TabContainer>` is not supported. Instead use `<TabContainer ' + ('activeKey={' + this.props.activeKey + '} />`.')) : void 0;
169
156
 
170
- if (onSelect && nextActiveChild && nextActiveChild.props.eventKey != null) {
171
- onSelect(nextActiveChild.props.eventKey);
157
+ return tabContainer;
172
158
  }
173
159
 
174
- this._needsRefocus = true;
160
+ return this.props;
175
161
  };
176
162
 
177
163
  Nav.prototype.getNextActiveChild = function getNextActiveChild(offset) {
@@ -210,28 +196,6 @@ var Nav = function (_React$Component) {
210
196
  return validChildren[nextIndex];
211
197
  };
212
198
 
213
- Nav.prototype.getActiveProps = function getActiveProps() {
214
- var tabContainer = this.context.$bs_tabContainer;
215
-
216
- if (tabContainer) {
217
- process.env.NODE_ENV !== 'production' ? warning(this.props.activeKey == null && !this.props.activeHref, 'Specifying a `<Nav>` `activeKey` or `activeHref` in the context of ' + 'a `<TabContainer>` is not supported. Instead use `<TabContainer ' + ('activeKey={' + this.props.activeKey + '} />`.')) : void 0;
218
-
219
- return tabContainer;
220
- }
221
-
222
- return this.props;
223
- };
224
-
225
- Nav.prototype.isActive = function isActive(_ref2, activeKey, activeHref) {
226
- var props = _ref2.props;
227
-
228
- if (props.active || activeKey != null && props.eventKey === activeKey || activeHref && props.href === activeHref) {
229
- return true;
230
- }
231
-
232
- return props.active;
233
- };
234
-
235
199
  Nav.prototype.getTabProps = function getTabProps(child, tabContainer, navRole, active, onSelect) {
236
200
  var _this4 = this;
237
201
 
@@ -273,6 +237,42 @@ var Nav = function (_React$Component) {
273
237
  };
274
238
  };
275
239
 
240
+ Nav.prototype.handleTabKeyDown = function handleTabKeyDown(onSelect, event) {
241
+ var nextActiveChild = void 0;
242
+
243
+ switch (event.keyCode) {
244
+ case keycode.codes.left:
245
+ case keycode.codes.up:
246
+ nextActiveChild = this.getNextActiveChild(-1);
247
+ break;
248
+ case keycode.codes.right:
249
+ case keycode.codes.down:
250
+ nextActiveChild = this.getNextActiveChild(1);
251
+ break;
252
+ default:
253
+ // It was a different key; don't handle this keypress.
254
+ return;
255
+ }
256
+
257
+ event.preventDefault();
258
+
259
+ if (onSelect && nextActiveChild && nextActiveChild.props.eventKey != null) {
260
+ onSelect(nextActiveChild.props.eventKey);
261
+ }
262
+
263
+ this._needsRefocus = true;
264
+ };
265
+
266
+ Nav.prototype.isActive = function isActive(_ref2, activeKey, activeHref) {
267
+ var props = _ref2.props;
268
+
269
+ if (props.active || activeKey != null && props.eventKey === activeKey || activeHref && props.href === activeHref) {
270
+ return true;
271
+ }
272
+
273
+ return props.active;
274
+ };
275
+
276
276
  Nav.prototype.render = function render() {
277
277
  var _extends2,
278
278
  _this5 = this;
package/es/NavDropdown.js CHANGED
@@ -17,6 +17,8 @@ var propTypes = _extends({}, Dropdown.propTypes, {
17
17
  title: PropTypes.node.isRequired,
18
18
  noCaret: PropTypes.bool,
19
19
  active: PropTypes.bool,
20
+ activeKey: PropTypes.any,
21
+ activeHref: PropTypes.string,
20
22
 
21
23
  // Override generated docs from <Dropdown>.
22
24
  /**
package/es/NavItem.js CHANGED
@@ -38,12 +38,13 @@ var NavItem = function (_React$Component) {
38
38
  }
39
39
 
40
40
  NavItem.prototype.handleClick = function handleClick(e) {
41
- if (this.props.onSelect) {
41
+ if (this.props.disabled) {
42
42
  e.preventDefault();
43
+ return;
44
+ }
43
45
 
44
- if (!this.props.disabled) {
45
- this.props.onSelect(this.props.eventKey, e);
46
- }
46
+ if (this.props.onSelect) {
47
+ this.props.onSelect(this.props.eventKey, e);
47
48
  }
48
49
  };
49
50
 
package/es/Navbar.js CHANGED
@@ -52,10 +52,10 @@ var propTypes = {
52
52
  componentClass: elementType,
53
53
  /**
54
54
  * A callback fired when the `<Navbar>` body collapses or expands. Fired when
55
- * a `<Navbar.Toggle>` is clicked and called with the new `navExpanded`
55
+ * a `<Navbar.Toggle>` is clicked and called with the new `expanded`
56
56
  * boolean value.
57
57
  *
58
- * @controllable navExpanded
58
+ * @controllable expanded
59
59
  */
60
60
  onToggle: PropTypes.func,
61
61
  /**
@@ -67,8 +67,8 @@ var propTypes = {
67
67
  *
68
68
  * ```js
69
69
  * function (
70
- * Any eventKey,
71
- * SyntheticEvent event?
70
+ * Any eventKey,
71
+ * SyntheticEvent event?
72
72
  * )
73
73
  * ```
74
74
  *
@@ -203,9 +203,7 @@ var Navbar = function (_React$Component) {
203
203
 
204
204
  return React.createElement(
205
205
  Component,
206
- _extends({}, elementProps, {
207
- className: classNames(className, classes)
208
- }),
206
+ _extends({}, elementProps, { className: classNames(className, classes) }),
209
207
  React.createElement(
210
208
  Grid,
211
209
  { fluid: fluid },
package/es/Overlay.js CHANGED
@@ -104,9 +104,7 @@ var Overlay = function (_React$Component) {
104
104
 
105
105
  return React.createElement(
106
106
  BaseOverlay,
107
- _extends({}, props, {
108
- transition: transition
109
- }),
107
+ _extends({}, props, { transition: transition }),
110
108
  child
111
109
  );
112
110
  };
@@ -32,8 +32,8 @@ var triggerType = PropTypes.oneOf(['click', 'hover', 'focus']);
32
32
  var propTypes = _extends({}, Overlay.propTypes, {
33
33
 
34
34
  /**
35
- * Specify which action or actions trigger Overlay visibility
36
- */
35
+ * Specify which action or actions trigger Overlay visibility
36
+ */
37
37
  trigger: PropTypes.oneOfType([triggerType, PropTypes.arrayOf(triggerType)]),
38
38
 
39
39
  /**
@@ -88,8 +88,8 @@ var propTypes = _extends({}, Overlay.propTypes, {
88
88
  */
89
89
  target: PropTypes.oneOf([null]),
90
90
  /**
91
- * @private
92
- */
91
+ * @private
92
+ */
93
93
  onHide: PropTypes.oneOf([null]),
94
94
  /**
95
95
  * @private
@@ -116,10 +116,10 @@ var OverlayTrigger = function (_React$Component) {
116
116
  _this.handleHide = _this.handleHide.bind(_this);
117
117
 
118
118
  _this.handleMouseOver = function (e) {
119
- return _this.handleMouseOverOut(_this.handleDelayedShow, e);
119
+ return _this.handleMouseOverOut(_this.handleDelayedShow, e, 'fromElement');
120
120
  };
121
121
  _this.handleMouseOut = function (e) {
122
- return _this.handleMouseOverOut(_this.handleDelayedHide, e);
122
+ return _this.handleMouseOverOut(_this.handleDelayedHide, e, 'toElement');
123
123
  };
124
124
 
125
125
  _this._mountNode = null;
@@ -147,87 +147,83 @@ var OverlayTrigger = function (_React$Component) {
147
147
  clearTimeout(this._hoverHideDelay);
148
148
  };
149
149
 
150
- OverlayTrigger.prototype.handleToggle = function handleToggle() {
151
- if (this.state.show) {
152
- this.hide();
153
- } else {
154
- this.show();
155
- }
156
- };
157
-
158
- OverlayTrigger.prototype.handleDelayedShow = function handleDelayedShow() {
150
+ OverlayTrigger.prototype.handleDelayedHide = function handleDelayedHide() {
159
151
  var _this2 = this;
160
152
 
161
- if (this._hoverHideDelay != null) {
162
- clearTimeout(this._hoverHideDelay);
163
- this._hoverHideDelay = null;
153
+ if (this._hoverShowDelay != null) {
154
+ clearTimeout(this._hoverShowDelay);
155
+ this._hoverShowDelay = null;
164
156
  return;
165
157
  }
166
158
 
167
- if (this.state.show || this._hoverShowDelay != null) {
159
+ if (!this.state.show || this._hoverHideDelay != null) {
168
160
  return;
169
161
  }
170
162
 
171
- var delay = this.props.delayShow != null ? this.props.delayShow : this.props.delay;
163
+ var delay = this.props.delayHide != null ? this.props.delayHide : this.props.delay;
172
164
 
173
165
  if (!delay) {
174
- this.show();
166
+ this.hide();
175
167
  return;
176
168
  }
177
169
 
178
- this._hoverShowDelay = setTimeout(function () {
179
- _this2._hoverShowDelay = null;
180
- _this2.show();
170
+ this._hoverHideDelay = setTimeout(function () {
171
+ _this2._hoverHideDelay = null;
172
+ _this2.hide();
181
173
  }, delay);
182
174
  };
183
175
 
184
- OverlayTrigger.prototype.handleDelayedHide = function handleDelayedHide() {
176
+ OverlayTrigger.prototype.handleDelayedShow = function handleDelayedShow() {
185
177
  var _this3 = this;
186
178
 
187
- if (this._hoverShowDelay != null) {
188
- clearTimeout(this._hoverShowDelay);
189
- this._hoverShowDelay = null;
179
+ if (this._hoverHideDelay != null) {
180
+ clearTimeout(this._hoverHideDelay);
181
+ this._hoverHideDelay = null;
190
182
  return;
191
183
  }
192
184
 
193
- if (!this.state.show || this._hoverHideDelay != null) {
185
+ if (this.state.show || this._hoverShowDelay != null) {
194
186
  return;
195
187
  }
196
188
 
197
- var delay = this.props.delayHide != null ? this.props.delayHide : this.props.delay;
189
+ var delay = this.props.delayShow != null ? this.props.delayShow : this.props.delay;
198
190
 
199
191
  if (!delay) {
200
- this.hide();
192
+ this.show();
201
193
  return;
202
194
  }
203
195
 
204
- this._hoverHideDelay = setTimeout(function () {
205
- _this3._hoverHideDelay = null;
206
- _this3.hide();
196
+ this._hoverShowDelay = setTimeout(function () {
197
+ _this3._hoverShowDelay = null;
198
+ _this3.show();
207
199
  }, delay);
208
200
  };
209
201
 
202
+ OverlayTrigger.prototype.handleHide = function handleHide() {
203
+ this.hide();
204
+ };
205
+
210
206
  // Simple implementation of mouseEnter and mouseLeave.
211
207
  // React's built version is broken: https://github.com/facebook/react/issues/4251
212
208
  // for cases when the trigger is disabled and mouseOut/Over can cause flicker
213
209
  // moving from one child element to another.
214
210
 
215
211
 
216
- OverlayTrigger.prototype.handleMouseOverOut = function handleMouseOverOut(handler, e) {
212
+ OverlayTrigger.prototype.handleMouseOverOut = function handleMouseOverOut(handler, e, relatedNative) {
217
213
  var target = e.currentTarget;
218
- var related = e.relatedTarget || e.nativeEvent.toElement;
214
+ var related = e.relatedTarget || e.nativeEvent[relatedNative];
219
215
 
220
- if (!related || related !== target && !contains(target, related)) {
216
+ if ((!related || related !== target) && !contains(target, related)) {
221
217
  handler(e);
222
218
  }
223
219
  };
224
220
 
225
- OverlayTrigger.prototype.handleHide = function handleHide() {
226
- this.hide();
227
- };
228
-
229
- OverlayTrigger.prototype.show = function show() {
230
- this.setState({ show: true });
221
+ OverlayTrigger.prototype.handleToggle = function handleToggle() {
222
+ if (this.state.show) {
223
+ this.hide();
224
+ } else {
225
+ this.show();
226
+ }
231
227
  };
232
228
 
233
229
  OverlayTrigger.prototype.hide = function hide() {
@@ -246,6 +242,10 @@ var OverlayTrigger = function (_React$Component) {
246
242
  );
247
243
  };
248
244
 
245
+ OverlayTrigger.prototype.show = function show() {
246
+ this.setState({ show: true });
247
+ };
248
+
249
249
  OverlayTrigger.prototype.renderOverlay = function renderOverlay() {
250
250
  ReactDOM.unstable_renderSubtreeIntoContainer(this, this._overlay, this._mountNode);
251
251
  };
package/es/PageHeader.js CHANGED
@@ -31,9 +31,7 @@ var PageHeader = function (_React$Component) {
31
31
 
32
32
  return React.createElement(
33
33
  'div',
34
- _extends({}, elementProps, {
35
- className: classNames(className, classes)
36
- }),
34
+ _extends({}, elementProps, { className: classNames(className, classes) }),
37
35
  React.createElement(
38
36
  'h1',
39
37
  null,
package/es/Pager.js CHANGED
@@ -40,9 +40,7 @@ var Pager = function (_React$Component) {
40
40
 
41
41
  return React.createElement(
42
42
  'ul',
43
- _extends({}, elementProps, {
44
- className: classNames(className, classes)
45
- }),
43
+ _extends({}, elementProps, { className: classNames(className, classes) }),
46
44
  ValidComponentChildren.map(children, function (child) {
47
45
  return cloneElement(child, {
48
46
  onSelect: createChainedFunction(child.props.onSelect, onSelect)
package/es/PagerItem.js CHANGED
@@ -44,11 +44,8 @@ var PagerItem = function (_React$Component) {
44
44
  eventKey = _props.eventKey;
45
45
 
46
46
 
47
- if (onSelect || disabled) {
48
- e.preventDefault();
49
- }
50
-
51
47
  if (disabled) {
48
+ e.preventDefault();
52
49
  return;
53
50
  }
54
51