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
@@ -32,20 +32,20 @@ var _react2 = _interopRequireDefault(_react);
32
32
 
33
33
  var _bootstrapUtils = require('./utils/bootstrapUtils');
34
34
 
35
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
35
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
36
36
 
37
37
  var ButtonToolbar = function (_React$Component) {
38
- (0, _inherits3['default'])(ButtonToolbar, _React$Component);
38
+ (0, _inherits3.default)(ButtonToolbar, _React$Component);
39
39
 
40
40
  function ButtonToolbar() {
41
- (0, _classCallCheck3['default'])(this, ButtonToolbar);
42
- return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments));
41
+ (0, _classCallCheck3.default)(this, ButtonToolbar);
42
+ return (0, _possibleConstructorReturn3.default)(this, _React$Component.apply(this, arguments));
43
43
  }
44
44
 
45
45
  ButtonToolbar.prototype.render = function render() {
46
46
  var _props = this.props,
47
47
  className = _props.className,
48
- props = (0, _objectWithoutProperties3['default'])(_props, ['className']);
48
+ props = (0, _objectWithoutProperties3.default)(_props, ['className']);
49
49
 
50
50
  var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props),
51
51
  bsProps = _splitBsProps[0],
@@ -53,14 +53,14 @@ var ButtonToolbar = function (_React$Component) {
53
53
 
54
54
  var classes = (0, _bootstrapUtils.getClassSet)(bsProps);
55
55
 
56
- return _react2['default'].createElement('div', (0, _extends3['default'])({}, elementProps, {
56
+ return _react2.default.createElement('div', (0, _extends3.default)({}, elementProps, {
57
57
  role: 'toolbar',
58
- className: (0, _classnames2['default'])(className, classes)
58
+ className: (0, _classnames2.default)(className, classes)
59
59
  }));
60
60
  };
61
61
 
62
62
  return ButtonToolbar;
63
- }(_react2['default'].Component);
63
+ }(_react2.default.Component);
64
64
 
65
- exports['default'] = (0, _bootstrapUtils.bsClass)('btn-toolbar', ButtonToolbar);
65
+ exports.default = (0, _bootstrapUtils.bsClass)('btn-toolbar', ButtonToolbar);
66
66
  module.exports = exports['default'];
package/lib/Carousel.js CHANGED
@@ -56,53 +56,53 @@ var _ValidComponentChildren = require('./utils/ValidComponentChildren');
56
56
 
57
57
  var _ValidComponentChildren2 = _interopRequireDefault(_ValidComponentChildren);
58
58
 
59
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
59
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
60
60
 
61
61
  // TODO: `slide` should be `animate`.
62
62
 
63
63
  // TODO: Use uncontrollable.
64
64
 
65
65
  var propTypes = {
66
- slide: _propTypes2['default'].bool,
67
- indicators: _propTypes2['default'].bool,
66
+ slide: _propTypes2.default.bool,
67
+ indicators: _propTypes2.default.bool,
68
68
  /**
69
69
  * The amount of time to delay between automatically cycling an item.
70
70
  * If `null`, carousel will not automatically cycle.
71
71
  */
72
- interval: _propTypes2['default'].number,
73
- controls: _propTypes2['default'].bool,
74
- pauseOnHover: _propTypes2['default'].bool,
75
- wrap: _propTypes2['default'].bool,
72
+ interval: _propTypes2.default.number,
73
+ controls: _propTypes2.default.bool,
74
+ pauseOnHover: _propTypes2.default.bool,
75
+ wrap: _propTypes2.default.bool,
76
76
  /**
77
77
  * Callback fired when the active item changes.
78
78
  *
79
79
  * ```js
80
- * (eventKey: any) => any | (eventKey: any, event: Object) => any
80
+ * (eventKey: any, ?event: Object) => any
81
81
  * ```
82
82
  *
83
83
  * If this callback takes two or more arguments, the second argument will
84
84
  * be a persisted event object with `direction` set to the direction of the
85
85
  * transition.
86
86
  */
87
- onSelect: _propTypes2['default'].func,
88
- onSlideEnd: _propTypes2['default'].func,
89
- activeIndex: _propTypes2['default'].number,
90
- defaultActiveIndex: _propTypes2['default'].number,
91
- direction: _propTypes2['default'].oneOf(['prev', 'next']),
92
- prevIcon: _propTypes2['default'].node,
87
+ onSelect: _propTypes2.default.func,
88
+ onSlideEnd: _propTypes2.default.func,
89
+ activeIndex: _propTypes2.default.number,
90
+ defaultActiveIndex: _propTypes2.default.number,
91
+ direction: _propTypes2.default.oneOf(['prev', 'next']),
92
+ prevIcon: _propTypes2.default.node,
93
93
  /**
94
94
  * Label shown to screen readers only, can be used to show the previous element
95
95
  * in the carousel.
96
96
  * Set to null to deactivate.
97
97
  */
98
- prevLabel: _propTypes2['default'].string,
99
- nextIcon: _propTypes2['default'].node,
98
+ prevLabel: _propTypes2.default.string,
99
+ nextIcon: _propTypes2.default.node,
100
100
  /**
101
101
  * Label shown to screen readers only, can be used to show the next element
102
102
  * in the carousel.
103
103
  * Set to null to deactivate.
104
104
  */
105
- nextLabel: _propTypes2['default'].string
105
+ nextLabel: _propTypes2.default.string
106
106
  };
107
107
 
108
108
  var defaultProps = {
@@ -112,19 +112,19 @@ var defaultProps = {
112
112
  wrap: true,
113
113
  indicators: true,
114
114
  controls: true,
115
- prevIcon: _react2['default'].createElement(_Glyphicon2['default'], { glyph: 'chevron-left' }),
115
+ prevIcon: _react2.default.createElement(_Glyphicon2.default, { glyph: 'chevron-left' }),
116
116
  prevLabel: 'Previous',
117
- nextIcon: _react2['default'].createElement(_Glyphicon2['default'], { glyph: 'chevron-right' }),
117
+ nextIcon: _react2.default.createElement(_Glyphicon2.default, { glyph: 'chevron-right' }),
118
118
  nextLabel: 'Next'
119
119
  };
120
120
 
121
121
  var Carousel = function (_React$Component) {
122
- (0, _inherits3['default'])(Carousel, _React$Component);
122
+ (0, _inherits3.default)(Carousel, _React$Component);
123
123
 
124
124
  function Carousel(props, context) {
125
- (0, _classCallCheck3['default'])(this, Carousel);
125
+ (0, _classCallCheck3.default)(this, Carousel);
126
126
 
127
- var _this = (0, _possibleConstructorReturn3['default'])(this, _React$Component.call(this, props, context));
127
+ var _this = (0, _possibleConstructorReturn3.default)(this, _React$Component.call(this, props, context));
128
128
 
129
129
  _this.handleMouseOver = _this.handleMouseOver.bind(_this);
130
130
  _this.handleMouseOut = _this.handleMouseOut.bind(_this);
@@ -145,6 +145,10 @@ var Carousel = function (_React$Component) {
145
145
  return _this;
146
146
  }
147
147
 
148
+ Carousel.prototype.componentDidMount = function componentDidMount() {
149
+ this.waitForNext();
150
+ };
151
+
148
152
  Carousel.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
149
153
  var activeIndex = this.getActiveIndex();
150
154
 
@@ -166,19 +170,37 @@ var Carousel = function (_React$Component) {
166
170
  }
167
171
  };
168
172
 
169
- Carousel.prototype.componentDidMount = function componentDidMount() {
170
- this.waitForNext();
171
- };
172
-
173
173
  Carousel.prototype.componentWillUnmount = function componentWillUnmount() {
174
174
  clearTimeout(this.timeout);
175
175
  this.isUnmounted = true;
176
176
  };
177
177
 
178
- Carousel.prototype.handleMouseOver = function handleMouseOver() {
179
- if (this.props.pauseOnHover) {
180
- this.pause();
178
+ Carousel.prototype.getActiveIndex = function getActiveIndex() {
179
+ var activeIndexProp = this.props.activeIndex;
180
+ return activeIndexProp != null ? activeIndexProp : this.state.activeIndex;
181
+ };
182
+
183
+ Carousel.prototype.getDirection = function getDirection(prevIndex, index) {
184
+ if (prevIndex === index) {
185
+ return null;
181
186
  }
187
+
188
+ return prevIndex > index ? 'prev' : 'next';
189
+ };
190
+
191
+ Carousel.prototype.handleItemAnimateOutEnd = function handleItemAnimateOutEnd() {
192
+ var _this2 = this;
193
+
194
+ this.setState({
195
+ previousActiveIndex: null,
196
+ direction: null
197
+ }, function () {
198
+ _this2.waitForNext();
199
+
200
+ if (_this2.props.onSlideEnd) {
201
+ _this2.props.onSlideEnd();
202
+ }
203
+ });
182
204
  };
183
205
 
184
206
  Carousel.prototype.handleMouseOut = function handleMouseOut() {
@@ -187,22 +209,15 @@ var Carousel = function (_React$Component) {
187
209
  }
188
210
  };
189
211
 
190
- Carousel.prototype.handlePrev = function handlePrev(e) {
191
- var index = this.getActiveIndex() - 1;
192
-
193
- if (index < 0) {
194
- if (!this.props.wrap) {
195
- return;
196
- }
197
- index = _ValidComponentChildren2['default'].count(this.props.children) - 1;
212
+ Carousel.prototype.handleMouseOver = function handleMouseOver() {
213
+ if (this.props.pauseOnHover) {
214
+ this.pause();
198
215
  }
199
-
200
- this.select(index, e, 'prev');
201
216
  };
202
217
 
203
218
  Carousel.prototype.handleNext = function handleNext(e) {
204
219
  var index = this.getActiveIndex() + 1;
205
- var count = _ValidComponentChildren2['default'].count(this.props.children);
220
+ var count = _ValidComponentChildren2.default.count(this.props.children);
206
221
 
207
222
  if (index > count - 1) {
208
223
  if (!this.props.wrap) {
@@ -214,32 +229,33 @@ var Carousel = function (_React$Component) {
214
229
  this.select(index, e, 'next');
215
230
  };
216
231
 
217
- Carousel.prototype.handleItemAnimateOutEnd = function handleItemAnimateOutEnd() {
218
- var _this2 = this;
219
-
220
- this.setState({
221
- previousActiveIndex: null,
222
- direction: null
223
- }, function () {
224
- _this2.waitForNext();
232
+ Carousel.prototype.handlePrev = function handlePrev(e) {
233
+ var index = this.getActiveIndex() - 1;
225
234
 
226
- if (_this2.props.onSlideEnd) {
227
- _this2.props.onSlideEnd();
235
+ if (index < 0) {
236
+ if (!this.props.wrap) {
237
+ return;
228
238
  }
229
- });
239
+ index = _ValidComponentChildren2.default.count(this.props.children) - 1;
240
+ }
241
+
242
+ this.select(index, e, 'prev');
230
243
  };
231
244
 
232
- Carousel.prototype.getActiveIndex = function getActiveIndex() {
233
- var activeIndexProp = this.props.activeIndex;
234
- return activeIndexProp != null ? activeIndexProp : this.state.activeIndex;
245
+ // This might be a public API.
246
+
247
+
248
+ Carousel.prototype.pause = function pause() {
249
+ this.isPaused = true;
250
+ clearTimeout(this.timeout);
235
251
  };
236
252
 
237
- Carousel.prototype.getDirection = function getDirection(prevIndex, index) {
238
- if (prevIndex === index) {
239
- return null;
240
- }
253
+ // This might be a public API.
241
254
 
242
- return prevIndex > index ? 'prev' : 'next';
255
+
256
+ Carousel.prototype.play = function play() {
257
+ this.isPaused = false;
258
+ this.waitForNext();
243
259
  };
244
260
 
245
261
  Carousel.prototype.select = function select(index, e, direction) {
@@ -304,48 +320,6 @@ var Carousel = function (_React$Component) {
304
320
  }
305
321
  };
306
322
 
307
- // This might be a public API.
308
-
309
-
310
- Carousel.prototype.pause = function pause() {
311
- this.isPaused = true;
312
- clearTimeout(this.timeout);
313
- };
314
-
315
- // This might be a public API.
316
-
317
-
318
- Carousel.prototype.play = function play() {
319
- this.isPaused = false;
320
- this.waitForNext();
321
- };
322
-
323
- Carousel.prototype.renderIndicators = function renderIndicators(children, activeIndex, bsProps) {
324
- var _this3 = this;
325
-
326
- var indicators = [];
327
-
328
- _ValidComponentChildren2['default'].forEach(children, function (child, index) {
329
- indicators.push(_react2['default'].createElement('li', {
330
- key: index,
331
- className: index === activeIndex ? 'active' : null,
332
- onClick: function onClick(e) {
333
- return _this3.select(index, e);
334
- }
335
- }),
336
-
337
- // Force whitespace between indicator elements. Bootstrap requires
338
- // this for correct spacing of elements.
339
- ' ');
340
- });
341
-
342
- return _react2['default'].createElement(
343
- 'ol',
344
- { className: (0, _bootstrapUtils.prefix)(bsProps, 'indicators') },
345
- indicators
346
- );
347
- };
348
-
349
323
  Carousel.prototype.renderControls = function renderControls(properties) {
350
324
  var wrap = properties.wrap,
351
325
  children = properties.children,
@@ -357,30 +331,30 @@ var Carousel = function (_React$Component) {
357
331
  nextLabel = properties.nextLabel;
358
332
 
359
333
  var controlClassName = (0, _bootstrapUtils.prefix)(bsProps, 'control');
360
- var count = _ValidComponentChildren2['default'].count(children);
334
+ var count = _ValidComponentChildren2.default.count(children);
361
335
 
362
- return [(wrap || activeIndex !== 0) && _react2['default'].createElement(
363
- _SafeAnchor2['default'],
336
+ return [(wrap || activeIndex !== 0) && _react2.default.createElement(
337
+ _SafeAnchor2.default,
364
338
  {
365
339
  key: 'prev',
366
- className: (0, _classnames2['default'])(controlClassName, 'left'),
340
+ className: (0, _classnames2.default)(controlClassName, 'left'),
367
341
  onClick: this.handlePrev
368
342
  },
369
343
  prevIcon,
370
- prevLabel && _react2['default'].createElement(
344
+ prevLabel && _react2.default.createElement(
371
345
  'span',
372
346
  { className: 'sr-only' },
373
347
  prevLabel
374
348
  )
375
- ), (wrap || activeIndex !== count - 1) && _react2['default'].createElement(
376
- _SafeAnchor2['default'],
349
+ ), (wrap || activeIndex !== count - 1) && _react2.default.createElement(
350
+ _SafeAnchor2.default,
377
351
  {
378
352
  key: 'next',
379
- className: (0, _classnames2['default'])(controlClassName, 'right'),
353
+ className: (0, _classnames2.default)(controlClassName, 'right'),
380
354
  onClick: this.handleNext
381
355
  },
382
356
  nextIcon,
383
- nextLabel && _react2['default'].createElement(
357
+ nextLabel && _react2.default.createElement(
384
358
  'span',
385
359
  { className: 'sr-only' },
386
360
  nextLabel
@@ -388,6 +362,32 @@ var Carousel = function (_React$Component) {
388
362
  )];
389
363
  };
390
364
 
365
+ Carousel.prototype.renderIndicators = function renderIndicators(children, activeIndex, bsProps) {
366
+ var _this3 = this;
367
+
368
+ var indicators = [];
369
+
370
+ _ValidComponentChildren2.default.forEach(children, function (child, index) {
371
+ indicators.push(_react2.default.createElement('li', {
372
+ key: index,
373
+ className: index === activeIndex ? 'active' : null,
374
+ onClick: function onClick(e) {
375
+ return _this3.select(index, e);
376
+ }
377
+ }),
378
+
379
+ // Force whitespace between indicator elements. Bootstrap requires
380
+ // this for correct spacing of elements.
381
+ ' ');
382
+ });
383
+
384
+ return _react2.default.createElement(
385
+ 'ol',
386
+ { className: (0, _bootstrapUtils.prefix)(bsProps, 'indicators') },
387
+ indicators
388
+ );
389
+ };
390
+
391
391
  Carousel.prototype.render = function render() {
392
392
  var _this4 = this;
393
393
 
@@ -402,7 +402,7 @@ var Carousel = function (_React$Component) {
402
402
  nextLabel = _props2.nextLabel,
403
403
  className = _props2.className,
404
404
  children = _props2.children,
405
- props = (0, _objectWithoutProperties3['default'])(_props2, ['slide', 'indicators', 'controls', 'wrap', 'prevIcon', 'prevLabel', 'nextIcon', 'nextLabel', 'className', 'children']);
405
+ props = (0, _objectWithoutProperties3.default)(_props2, ['slide', 'indicators', 'controls', 'wrap', 'prevIcon', 'prevLabel', 'nextIcon', 'nextLabel', 'className', 'children']);
406
406
  var _state = this.state,
407
407
  previousActiveIndex = _state.previousActiveIndex,
408
408
  direction = _state.direction;
@@ -414,22 +414,22 @@ var Carousel = function (_React$Component) {
414
414
 
415
415
  var activeIndex = this.getActiveIndex();
416
416
 
417
- var classes = (0, _extends3['default'])({}, (0, _bootstrapUtils.getClassSet)(bsProps), {
417
+ var classes = (0, _extends3.default)({}, (0, _bootstrapUtils.getClassSet)(bsProps), {
418
418
  slide: slide
419
419
  });
420
420
 
421
- return _react2['default'].createElement(
421
+ return _react2.default.createElement(
422
422
  'div',
423
- (0, _extends3['default'])({}, elementProps, {
424
- className: (0, _classnames2['default'])(className, classes),
423
+ (0, _extends3.default)({}, elementProps, {
424
+ className: (0, _classnames2.default)(className, classes),
425
425
  onMouseOver: this.handleMouseOver,
426
426
  onMouseOut: this.handleMouseOut
427
427
  }),
428
428
  indicators && this.renderIndicators(children, activeIndex, bsProps),
429
- _react2['default'].createElement(
429
+ _react2.default.createElement(
430
430
  'div',
431
431
  { className: (0, _bootstrapUtils.prefix)(bsProps, 'inner') },
432
- _ValidComponentChildren2['default'].map(children, function (child, index) {
432
+ _ValidComponentChildren2.default.map(children, function (child, index) {
433
433
  var active = index === activeIndex;
434
434
  var previousActive = slide && index === previousActiveIndex;
435
435
 
@@ -457,13 +457,13 @@ var Carousel = function (_React$Component) {
457
457
  };
458
458
 
459
459
  return Carousel;
460
- }(_react2['default'].Component);
460
+ }(_react2.default.Component);
461
461
 
462
462
  Carousel.propTypes = propTypes;
463
463
  Carousel.defaultProps = defaultProps;
464
464
 
465
- Carousel.Caption = _CarouselCaption2['default'];
466
- Carousel.Item = _CarouselItem2['default'];
465
+ Carousel.Caption = _CarouselCaption2.default;
466
+ Carousel.Item = _CarouselItem2.default;
467
467
 
468
- exports['default'] = (0, _bootstrapUtils.bsClass)('carousel', Carousel);
468
+ exports.default = (0, _bootstrapUtils.bsClass)('carousel', Carousel);
469
469
  module.exports = exports['default'];
@@ -36,10 +36,10 @@ var _elementType2 = _interopRequireDefault(_elementType);
36
36
 
37
37
  var _bootstrapUtils = require('./utils/bootstrapUtils');
38
38
 
39
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
39
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
40
40
 
41
41
  var propTypes = {
42
- componentClass: _elementType2['default']
42
+ componentClass: _elementType2.default
43
43
  };
44
44
 
45
45
  var defaultProps = {
@@ -47,18 +47,18 @@ var defaultProps = {
47
47
  };
48
48
 
49
49
  var CarouselCaption = function (_React$Component) {
50
- (0, _inherits3['default'])(CarouselCaption, _React$Component);
50
+ (0, _inherits3.default)(CarouselCaption, _React$Component);
51
51
 
52
52
  function CarouselCaption() {
53
- (0, _classCallCheck3['default'])(this, CarouselCaption);
54
- return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments));
53
+ (0, _classCallCheck3.default)(this, CarouselCaption);
54
+ return (0, _possibleConstructorReturn3.default)(this, _React$Component.apply(this, arguments));
55
55
  }
56
56
 
57
57
  CarouselCaption.prototype.render = function render() {
58
58
  var _props = this.props,
59
59
  Component = _props.componentClass,
60
60
  className = _props.className,
61
- props = (0, _objectWithoutProperties3['default'])(_props, ['componentClass', 'className']);
61
+ props = (0, _objectWithoutProperties3.default)(_props, ['componentClass', 'className']);
62
62
 
63
63
  var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props),
64
64
  bsProps = _splitBsProps[0],
@@ -66,16 +66,14 @@ var CarouselCaption = function (_React$Component) {
66
66
 
67
67
  var classes = (0, _bootstrapUtils.getClassSet)(bsProps);
68
68
 
69
- return _react2['default'].createElement(Component, (0, _extends3['default'])({}, elementProps, {
70
- className: (0, _classnames2['default'])(className, classes)
71
- }));
69
+ return _react2.default.createElement(Component, (0, _extends3.default)({}, elementProps, { className: (0, _classnames2.default)(className, classes) }));
72
70
  };
73
71
 
74
72
  return CarouselCaption;
75
- }(_react2['default'].Component);
73
+ }(_react2.default.Component);
76
74
 
77
75
  CarouselCaption.propTypes = propTypes;
78
76
  CarouselCaption.defaultProps = defaultProps;
79
77
 
80
- exports['default'] = (0, _bootstrapUtils.bsClass)('carousel-caption', CarouselCaption);
78
+ exports.default = (0, _bootstrapUtils.bsClass)('carousel-caption', CarouselCaption);
81
79
  module.exports = exports['default'];
@@ -38,22 +38,19 @@ var _reactDom = require('react-dom');
38
38
 
39
39
  var _reactDom2 = _interopRequireDefault(_reactDom);
40
40
 
41
- var _TransitionEvents = require('./utils/TransitionEvents');
41
+ var _transition = require('dom-helpers/transition');
42
42
 
43
- var _TransitionEvents2 = _interopRequireDefault(_TransitionEvents);
43
+ var _transition2 = _interopRequireDefault(_transition);
44
44
 
45
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
46
-
47
- // TODO: This should use a timeout instead of TransitionEvents, or else just
48
- // not wait until transition end to trigger continuing animations.
45
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
49
46
 
50
47
  var propTypes = {
51
- direction: _propTypes2['default'].oneOf(['prev', 'next']),
52
- onAnimateOutEnd: _propTypes2['default'].func,
53
- active: _propTypes2['default'].bool,
54
- animateIn: _propTypes2['default'].bool,
55
- animateOut: _propTypes2['default'].bool,
56
- index: _propTypes2['default'].number
48
+ direction: _propTypes2.default.oneOf(['prev', 'next']),
49
+ onAnimateOutEnd: _propTypes2.default.func,
50
+ active: _propTypes2.default.bool,
51
+ animateIn: _propTypes2.default.bool,
52
+ animateOut: _propTypes2.default.bool,
53
+ index: _propTypes2.default.number
57
54
  };
58
55
 
59
56
  var defaultProps = {
@@ -63,12 +60,12 @@ var defaultProps = {
63
60
  };
64
61
 
65
62
  var CarouselItem = function (_React$Component) {
66
- (0, _inherits3['default'])(CarouselItem, _React$Component);
63
+ (0, _inherits3.default)(CarouselItem, _React$Component);
67
64
 
68
65
  function CarouselItem(props, context) {
69
- (0, _classCallCheck3['default'])(this, CarouselItem);
66
+ (0, _classCallCheck3.default)(this, CarouselItem);
70
67
 
71
- var _this = (0, _possibleConstructorReturn3['default'])(this, _React$Component.call(this, props, context));
68
+ var _this = (0, _possibleConstructorReturn3.default)(this, _React$Component.call(this, props, context));
72
69
 
73
70
  _this.handleAnimateOutEnd = _this.handleAnimateOutEnd.bind(_this);
74
71
 
@@ -94,7 +91,7 @@ var CarouselItem = function (_React$Component) {
94
91
  var prevActive = prevProps.active;
95
92
 
96
93
  if (!active && prevActive) {
97
- _TransitionEvents2['default'].addEndEventListener(_reactDom2['default'].findDOMNode(this), this.handleAnimateOutEnd);
94
+ _transition2.default.end(_reactDom2.default.findDOMNode(this), this.handleAnimateOutEnd);
98
95
  }
99
96
 
100
97
  if (active !== prevActive) {
@@ -135,7 +132,7 @@ var CarouselItem = function (_React$Component) {
135
132
  animateIn = _props.animateIn,
136
133
  animateOut = _props.animateOut,
137
134
  className = _props.className,
138
- props = (0, _objectWithoutProperties3['default'])(_props, ['direction', 'active', 'animateIn', 'animateOut', 'className']);
135
+ props = (0, _objectWithoutProperties3.default)(_props, ['direction', 'active', 'animateIn', 'animateOut', 'className']);
139
136
 
140
137
 
141
138
  delete props.onAnimateOutEnd;
@@ -152,16 +149,14 @@ var CarouselItem = function (_React$Component) {
152
149
  classes[this.state.direction] = true;
153
150
  }
154
151
 
155
- return _react2['default'].createElement('div', (0, _extends3['default'])({}, props, {
156
- className: (0, _classnames2['default'])(className, classes)
157
- }));
152
+ return _react2.default.createElement('div', (0, _extends3.default)({}, props, { className: (0, _classnames2.default)(className, classes) }));
158
153
  };
159
154
 
160
155
  return CarouselItem;
161
- }(_react2['default'].Component);
156
+ }(_react2.default.Component);
162
157
 
163
158
  CarouselItem.propTypes = propTypes;
164
159
  CarouselItem.defaultProps = defaultProps;
165
160
 
166
- exports['default'] = CarouselItem;
161
+ exports.default = CarouselItem;
167
162
  module.exports = exports['default'];