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/lib/Nav.js CHANGED
@@ -1,92 +1,59 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
4
-
5
- var _extends3 = require('babel-runtime/helpers/extends');
6
-
7
- var _extends4 = _interopRequireDefault(_extends3);
8
-
9
- var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
10
-
11
- var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
12
-
13
- var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
14
-
15
- var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
16
-
17
- var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
18
-
19
- var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
20
-
21
- var _inherits2 = require('babel-runtime/helpers/inherits');
22
-
23
- var _inherits3 = _interopRequireDefault(_inherits2);
24
-
25
- var _classnames = require('classnames');
26
-
27
- var _classnames2 = _interopRequireDefault(_classnames);
28
-
29
- var _keycode = require('keycode');
3
+ var _interopRequireWildcard = require("@babel/runtime-corejs2/helpers/interopRequireWildcard");
30
4
 
31
- var _keycode2 = _interopRequireDefault(_keycode);
5
+ var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
32
6
 
33
- var _react = require('react');
34
-
35
- var _react2 = _interopRequireDefault(_react);
36
-
37
- var _propTypes = require('prop-types');
7
+ exports.__esModule = true;
8
+ exports.default = void 0;
38
9
 
39
- var _propTypes2 = _interopRequireDefault(_propTypes);
10
+ var _extends3 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/extends"));
40
11
 
41
- var _reactDom = require('react-dom');
12
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/objectWithoutPropertiesLoose"));
42
13
 
43
- var _reactDom2 = _interopRequireDefault(_reactDom);
14
+ var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inheritsLoose"));
44
15
 
45
- var _all = require('prop-types-extra/lib/all');
16
+ var _classnames = _interopRequireDefault(require("classnames"));
46
17
 
47
- var _all2 = _interopRequireDefault(_all);
18
+ var _keycode = _interopRequireDefault(require("keycode"));
48
19
 
49
- var _warning = require('warning');
20
+ var _react = _interopRequireWildcard(require("react"));
50
21
 
51
- var _warning2 = _interopRequireDefault(_warning);
22
+ var _propTypes = _interopRequireDefault(require("prop-types"));
52
23
 
53
- var _bootstrapUtils = require('./utils/bootstrapUtils');
24
+ var _reactDom = _interopRequireDefault(require("react-dom"));
54
25
 
55
- var _createChainedFunction = require('./utils/createChainedFunction');
26
+ var _all = _interopRequireDefault(require("prop-types-extra/lib/all"));
56
27
 
57
- var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction);
28
+ var _warning = _interopRequireDefault(require("warning"));
58
29
 
59
- var _ValidComponentChildren = require('./utils/ValidComponentChildren');
30
+ var _bootstrapUtils = require("./utils/bootstrapUtils");
60
31
 
61
- var _ValidComponentChildren2 = _interopRequireDefault(_ValidComponentChildren);
32
+ var _createChainedFunction = _interopRequireDefault(require("./utils/createChainedFunction"));
62
33
 
63
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
34
+ var _ValidComponentChildren = _interopRequireDefault(require("./utils/ValidComponentChildren"));
64
35
 
65
36
  // TODO: Should we expose `<NavItem>` as `<Nav.Item>`?
66
-
67
37
  // TODO: This `bsStyle` is very unlike the others. Should we rename it?
68
-
69
38
  // TODO: `pullRight` and `pullLeft` don't render right outside of `navbar`.
70
39
  // Consider renaming or replacing them.
71
-
72
40
  var propTypes = {
73
41
  /**
74
42
  * Marks the NavItem with a matching `eventKey` as active. Has a
75
43
  * higher precedence over `activeHref`.
76
44
  */
77
- activeKey: _propTypes2.default.any,
45
+ activeKey: _propTypes.default.any,
78
46
 
79
47
  /**
80
48
  * Marks the child NavItem with a matching `href` prop as active.
81
49
  */
82
- activeHref: _propTypes2.default.string,
50
+ activeHref: _propTypes.default.string,
83
51
 
84
52
  /**
85
53
  * NavItems are be positioned vertically.
86
54
  */
87
- stacked: _propTypes2.default.bool,
88
-
89
- justified: (0, _all2.default)(_propTypes2.default.bool, function (_ref) {
55
+ stacked: _propTypes.default.bool,
56
+ justified: (0, _all.default)(_propTypes.default.bool, function (_ref) {
90
57
  var justified = _ref.justified,
91
58
  navbar = _ref.navbar;
92
59
  return justified && navbar ? Error('justified navbar `Nav`s are not supported') : null;
@@ -102,7 +69,7 @@ var propTypes = {
102
69
  * )
103
70
  * ```
104
71
  */
105
- onSelect: _propTypes2.default.func,
72
+ onSelect: _propTypes.default.func,
106
73
 
107
74
  /**
108
75
  * ARIA role for the Nav, in the context of a TabContainer, the default will
@@ -112,79 +79,80 @@ var propTypes = {
112
79
  * the ARIA authoring practices for tabs:
113
80
  * https://www.w3.org/TR/2013/WD-wai-aria-practices-20130307/#tabpanel
114
81
  */
115
- role: _propTypes2.default.string,
82
+ role: _propTypes.default.string,
116
83
 
117
84
  /**
118
85
  * Apply styling an alignment for use in a Navbar. This prop will be set
119
86
  * automatically when the Nav is used inside a Navbar.
120
87
  */
121
- navbar: _propTypes2.default.bool,
88
+ navbar: _propTypes.default.bool,
122
89
 
123
90
  /**
124
91
  * Float the Nav to the right. When `navbar` is `true` the appropriate
125
92
  * contextual classes are added as well.
126
93
  */
127
- pullRight: _propTypes2.default.bool,
94
+ pullRight: _propTypes.default.bool,
128
95
 
129
96
  /**
130
97
  * Float the Nav to the left. When `navbar` is `true` the appropriate
131
98
  * contextual classes are added as well.
132
99
  */
133
- pullLeft: _propTypes2.default.bool
100
+ pullLeft: _propTypes.default.bool
134
101
  };
135
-
136
102
  var defaultProps = {
137
103
  justified: false,
138
104
  pullRight: false,
139
105
  pullLeft: false,
140
106
  stacked: false
141
107
  };
142
-
143
108
  var contextTypes = {
144
- $bs_navbar: _propTypes2.default.shape({
145
- bsClass: _propTypes2.default.string,
146
- onSelect: _propTypes2.default.func
109
+ $bs_navbar: _propTypes.default.shape({
110
+ bsClass: _propTypes.default.string,
111
+ onSelect: _propTypes.default.func
147
112
  }),
148
-
149
- $bs_tabContainer: _propTypes2.default.shape({
150
- activeKey: _propTypes2.default.any,
151
- onSelect: _propTypes2.default.func.isRequired,
152
- getTabId: _propTypes2.default.func.isRequired,
153
- getPaneId: _propTypes2.default.func.isRequired
113
+ $bs_tabContainer: _propTypes.default.shape({
114
+ activeKey: _propTypes.default.any,
115
+ onSelect: _propTypes.default.func.isRequired,
116
+ getTabId: _propTypes.default.func.isRequired,
117
+ getPaneId: _propTypes.default.func.isRequired
154
118
  })
155
119
  };
156
120
 
157
- var Nav = function (_React$Component) {
158
- (0, _inherits3.default)(Nav, _React$Component);
121
+ var Nav =
122
+ /*#__PURE__*/
123
+ function (_React$Component) {
124
+ (0, _inheritsLoose2.default)(Nav, _React$Component);
159
125
 
160
126
  function Nav() {
161
- (0, _classCallCheck3.default)(this, Nav);
162
- return (0, _possibleConstructorReturn3.default)(this, _React$Component.apply(this, arguments));
127
+ return _React$Component.apply(this, arguments) || this;
163
128
  }
164
129
 
165
- Nav.prototype.componentDidUpdate = function componentDidUpdate() {
166
- var _this2 = this;
130
+ var _proto = Nav.prototype;
131
+
132
+ _proto.componentDidUpdate = function componentDidUpdate() {
133
+ var _this = this;
167
134
 
168
135
  if (!this._needsRefocus) {
169
136
  return;
170
137
  }
171
138
 
172
139
  this._needsRefocus = false;
173
-
174
140
  var children = this.props.children;
175
141
 
176
- var _getActiveProps = this.getActiveProps(),
177
- activeKey = _getActiveProps.activeKey,
178
- activeHref = _getActiveProps.activeHref;
142
+ var _this$getActiveProps = this.getActiveProps(),
143
+ activeKey = _this$getActiveProps.activeKey,
144
+ activeHref = _this$getActiveProps.activeHref;
179
145
 
180
- var activeChild = _ValidComponentChildren2.default.find(children, function (child) {
181
- return _this2.isActive(child, activeKey, activeHref);
146
+ var activeChild = _ValidComponentChildren.default.find(children, function (child) {
147
+ return _this.isActive(child, activeKey, activeHref);
182
148
  });
183
149
 
184
- var childrenArray = _ValidComponentChildren2.default.toArray(children);
150
+ var childrenArray = _ValidComponentChildren.default.toArray(children);
151
+
185
152
  var activeChildIndex = childrenArray.indexOf(activeChild);
186
153
 
187
- var childNodes = _reactDom2.default.findDOMNode(this).children;
154
+ var childNodes = _reactDom.default.findDOMNode(this).children;
155
+
188
156
  var activeNode = childNodes && childNodes[activeChildIndex];
189
157
 
190
158
  if (!activeNode || !activeNode.firstChild) {
@@ -194,37 +162,36 @@ var Nav = function (_React$Component) {
194
162
  activeNode.firstChild.focus();
195
163
  };
196
164
 
197
- Nav.prototype.getActiveProps = function getActiveProps() {
165
+ _proto.getActiveProps = function getActiveProps() {
198
166
  var tabContainer = this.context.$bs_tabContainer;
199
167
 
200
168
  if (tabContainer) {
201
- process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(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;
202
-
169
+ process.env.NODE_ENV !== "production" ? (0, _warning.default)(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;
203
170
  return tabContainer;
204
171
  }
205
172
 
206
173
  return this.props;
207
174
  };
208
175
 
209
- Nav.prototype.getNextActiveChild = function getNextActiveChild(offset) {
210
- var _this3 = this;
176
+ _proto.getNextActiveChild = function getNextActiveChild(offset) {
177
+ var _this2 = this;
211
178
 
212
179
  var children = this.props.children;
213
-
214
180
  var validChildren = children.filter(function (child) {
215
181
  return child.props.eventKey != null && !child.props.disabled;
216
182
  });
217
183
 
218
- var _getActiveProps2 = this.getActiveProps(),
219
- activeKey = _getActiveProps2.activeKey,
220
- activeHref = _getActiveProps2.activeHref;
184
+ var _this$getActiveProps2 = this.getActiveProps(),
185
+ activeKey = _this$getActiveProps2.activeKey,
186
+ activeHref = _this$getActiveProps2.activeHref;
187
+
188
+ var activeChild = _ValidComponentChildren.default.find(children, function (child) {
189
+ return _this2.isActive(child, activeKey, activeHref);
190
+ }); // This assumes the active child is not disabled.
221
191
 
222
- var activeChild = _ValidComponentChildren2.default.find(children, function (child) {
223
- return _this3.isActive(child, activeKey, activeHref);
224
- });
225
192
 
226
- // This assumes the active child is not disabled.
227
193
  var activeChildIndex = validChildren.indexOf(activeChild);
194
+
228
195
  if (activeChildIndex === -1) {
229
196
  // Something has gone wrong. Select the first valid child we can find.
230
197
  return validChildren[0];
@@ -242,8 +209,8 @@ var Nav = function (_React$Component) {
242
209
  return validChildren[nextIndex];
243
210
  };
244
211
 
245
- Nav.prototype.getTabProps = function getTabProps(child, tabContainer, navRole, active, onSelect) {
246
- var _this4 = this;
212
+ _proto.getTabProps = function getTabProps(child, tabContainer, navRole, active, onSelect) {
213
+ var _this3 = this;
247
214
 
248
215
  if (!tabContainer && navRole !== 'tablist') {
249
216
  // No tab props here.
@@ -258,18 +225,16 @@ var Nav = function (_React$Component) {
258
225
  onKeyDown = _child$props.onKeyDown,
259
226
  tabIndex = _child$props.tabIndex;
260
227
 
261
-
262
228
  if (tabContainer) {
263
- process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(!id && !controls, 'In the context of a `<TabContainer>`, `<NavItem>`s are given ' + 'generated `id` and `aria-controls` attributes for the sake of ' + 'proper component accessibility. Any provided ones will be ignored. ' + 'To control these attributes directly, provide a `generateChildId` ' + 'prop to the parent `<TabContainer>`.') : void 0;
264
-
229
+ process.env.NODE_ENV !== "production" ? (0, _warning.default)(!id && !controls, 'In the context of a `<TabContainer>`, `<NavItem>`s are given ' + 'generated `id` and `aria-controls` attributes for the sake of ' + 'proper component accessibility. Any provided ones will be ignored. ' + 'To control these attributes directly, provide a `generateChildId` ' + 'prop to the parent `<TabContainer>`.') : void 0;
265
230
  id = tabContainer.getTabId(eventKey);
266
231
  controls = tabContainer.getPaneId(eventKey);
267
232
  }
268
233
 
269
234
  if (navRole === 'tablist') {
270
235
  role = role || 'tab';
271
- onKeyDown = (0, _createChainedFunction2.default)(function (event) {
272
- return _this4.handleTabKeyDown(onSelect, event);
236
+ onKeyDown = (0, _createChainedFunction.default)(function (event) {
237
+ return _this3.handleTabKeyDown(onSelect, event);
273
238
  }, onKeyDown);
274
239
  tabIndex = active ? tabIndex : -1;
275
240
  }
@@ -283,18 +248,20 @@ var Nav = function (_React$Component) {
283
248
  };
284
249
  };
285
250
 
286
- Nav.prototype.handleTabKeyDown = function handleTabKeyDown(onSelect, event) {
287
- var nextActiveChild = void 0;
251
+ _proto.handleTabKeyDown = function handleTabKeyDown(onSelect, event) {
252
+ var nextActiveChild;
288
253
 
289
254
  switch (event.keyCode) {
290
- case _keycode2.default.codes.left:
291
- case _keycode2.default.codes.up:
255
+ case _keycode.default.codes.left:
256
+ case _keycode.default.codes.up:
292
257
  nextActiveChild = this.getNextActiveChild(-1);
293
258
  break;
294
- case _keycode2.default.codes.right:
295
- case _keycode2.default.codes.down:
259
+
260
+ case _keycode.default.codes.right:
261
+ case _keycode.default.codes.down:
296
262
  nextActiveChild = this.getNextActiveChild(1);
297
263
  break;
264
+
298
265
  default:
299
266
  // It was a different key; don't handle this keypress.
300
267
  return;
@@ -309,7 +276,7 @@ var Nav = function (_React$Component) {
309
276
  this._needsRefocus = true;
310
277
  };
311
278
 
312
- Nav.prototype.isActive = function isActive(_ref2, activeKey, activeHref) {
279
+ _proto.isActive = function isActive(_ref2, activeKey, activeHref) {
313
280
  var props = _ref2.props;
314
281
 
315
282
  if (props.active || activeKey != null && props.eventKey === activeKey || activeHref && props.href === activeHref) {
@@ -319,48 +286,46 @@ var Nav = function (_React$Component) {
319
286
  return props.active;
320
287
  };
321
288
 
322
- Nav.prototype.render = function render() {
289
+ _proto.render = function render() {
323
290
  var _extends2,
324
- _this5 = this;
325
-
326
- var _props = this.props,
327
- stacked = _props.stacked,
328
- justified = _props.justified,
329
- onSelect = _props.onSelect,
330
- propsRole = _props.role,
331
- propsNavbar = _props.navbar,
332
- pullRight = _props.pullRight,
333
- pullLeft = _props.pullLeft,
334
- className = _props.className,
335
- children = _props.children,
336
- props = (0, _objectWithoutProperties3.default)(_props, ['stacked', 'justified', 'onSelect', 'role', 'navbar', 'pullRight', 'pullLeft', 'className', 'children']);
337
-
338
-
291
+ _this4 = this;
292
+
293
+ var _this$props = this.props,
294
+ stacked = _this$props.stacked,
295
+ justified = _this$props.justified,
296
+ onSelect = _this$props.onSelect,
297
+ propsRole = _this$props.role,
298
+ propsNavbar = _this$props.navbar,
299
+ pullRight = _this$props.pullRight,
300
+ pullLeft = _this$props.pullLeft,
301
+ className = _this$props.className,
302
+ children = _this$props.children,
303
+ props = (0, _objectWithoutPropertiesLoose2.default)(_this$props, ["stacked", "justified", "onSelect", "role", "navbar", "pullRight", "pullLeft", "className", "children"]);
339
304
  var tabContainer = this.context.$bs_tabContainer;
340
305
  var role = propsRole || (tabContainer ? 'tablist' : null);
341
306
 
342
- var _getActiveProps3 = this.getActiveProps(),
343
- activeKey = _getActiveProps3.activeKey,
344
- activeHref = _getActiveProps3.activeHref;
307
+ var _this$getActiveProps3 = this.getActiveProps(),
308
+ activeKey = _this$getActiveProps3.activeKey,
309
+ activeHref = _this$getActiveProps3.activeHref;
345
310
 
346
311
  delete props.activeKey; // Accessed via this.getActiveProps().
312
+
347
313
  delete props.activeHref; // Accessed via this.getActiveProps().
348
314
 
349
315
  var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props),
350
316
  bsProps = _splitBsProps[0],
351
317
  elementProps = _splitBsProps[1];
352
318
 
353
- var classes = (0, _extends4.default)({}, (0, _bootstrapUtils.getClassSet)(bsProps), (_extends2 = {}, _extends2[(0, _bootstrapUtils.prefix)(bsProps, 'stacked')] = stacked, _extends2[(0, _bootstrapUtils.prefix)(bsProps, 'justified')] = justified, _extends2));
354
-
319
+ var classes = (0, _extends3.default)({}, (0, _bootstrapUtils.getClassSet)(bsProps), (_extends2 = {}, _extends2[(0, _bootstrapUtils.prefix)(bsProps, 'stacked')] = stacked, _extends2[(0, _bootstrapUtils.prefix)(bsProps, 'justified')] = justified, _extends2));
355
320
  var navbar = propsNavbar != null ? propsNavbar : this.context.$bs_navbar;
356
- var pullLeftClassName = void 0;
357
- var pullRightClassName = void 0;
321
+ var pullLeftClassName;
322
+ var pullRightClassName;
358
323
 
359
324
  if (navbar) {
360
- var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' };
361
-
325
+ var navbarProps = this.context.$bs_navbar || {
326
+ bsClass: 'navbar'
327
+ };
362
328
  classes[(0, _bootstrapUtils.prefix)(navbarProps, 'nav')] = true;
363
-
364
329
  pullRightClassName = (0, _bootstrapUtils.prefix)(navbarProps, 'right');
365
330
  pullLeftClassName = (0, _bootstrapUtils.prefix)(navbarProps, 'left');
366
331
  } else {
@@ -370,33 +335,30 @@ var Nav = function (_React$Component) {
370
335
 
371
336
  classes[pullRightClassName] = pullRight;
372
337
  classes[pullLeftClassName] = pullLeft;
373
-
374
- return _react2.default.createElement(
375
- 'ul',
376
- (0, _extends4.default)({}, elementProps, {
377
- role: role,
378
- className: (0, _classnames2.default)(className, classes)
379
- }),
380
- _ValidComponentChildren2.default.map(children, function (child) {
381
- var active = _this5.isActive(child, activeKey, activeHref);
382
- var childOnSelect = (0, _createChainedFunction2.default)(child.props.onSelect, onSelect, navbar && navbar.onSelect, tabContainer && tabContainer.onSelect);
383
-
384
- return (0, _react.cloneElement)(child, (0, _extends4.default)({}, _this5.getTabProps(child, tabContainer, role, active, childOnSelect), {
385
- active: active,
386
- activeKey: activeKey,
387
- activeHref: activeHref,
388
- onSelect: childOnSelect
389
- }));
390
- })
391
- );
338
+ return _react.default.createElement("ul", (0, _extends3.default)({}, elementProps, {
339
+ role: role,
340
+ className: (0, _classnames.default)(className, classes)
341
+ }), _ValidComponentChildren.default.map(children, function (child) {
342
+ var active = _this4.isActive(child, activeKey, activeHref);
343
+
344
+ var childOnSelect = (0, _createChainedFunction.default)(child.props.onSelect, onSelect, navbar && navbar.onSelect, tabContainer && tabContainer.onSelect);
345
+ return (0, _react.cloneElement)(child, (0, _extends3.default)({}, _this4.getTabProps(child, tabContainer, role, active, childOnSelect), {
346
+ active: active,
347
+ activeKey: activeKey,
348
+ activeHref: activeHref,
349
+ onSelect: childOnSelect
350
+ }));
351
+ }));
392
352
  };
393
353
 
394
354
  return Nav;
395
- }(_react2.default.Component);
355
+ }(_react.default.Component);
396
356
 
397
357
  Nav.propTypes = propTypes;
398
358
  Nav.defaultProps = defaultProps;
399
359
  Nav.contextTypes = contextTypes;
400
360
 
401
- exports.default = (0, _bootstrapUtils.bsClass)('nav', (0, _bootstrapUtils.bsStyles)(['tabs', 'pills'], Nav));
402
- module.exports = exports['default'];
361
+ var _default = (0, _bootstrapUtils.bsClass)('nav', (0, _bootstrapUtils.bsStyles)(['tabs', 'pills'], Nav));
362
+
363
+ exports.default = _default;
364
+ module.exports = exports["default"];