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/Navbar.js CHANGED
@@ -1,17 +1,15 @@
1
- import _extends from 'babel-runtime/helpers/extends';
2
- import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
3
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
4
- import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
5
- import _inherits from 'babel-runtime/helpers/inherits';
1
+ import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
3
+ import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
4
+ import _assertThisInitialized from "@babel/runtime-corejs2/helpers/esm/assertThisInitialized";
6
5
  // TODO: Remove this pragma once we upgrade eslint-config-airbnb.
7
- /* eslint-disable react/no-multi-comp */
8
6
 
7
+ /* eslint-disable react/no-multi-comp */
9
8
  import classNames from 'classnames';
10
9
  import React from 'react';
11
10
  import PropTypes from 'prop-types';
12
11
  import elementType from 'prop-types-extra/lib/elementType';
13
12
  import uncontrollable from 'uncontrollable';
14
-
15
13
  import Grid from './Grid';
16
14
  import NavbarBrand from './NavbarBrand';
17
15
  import NavbarCollapse from './NavbarCollapse';
@@ -20,26 +18,29 @@ import NavbarToggle from './NavbarToggle';
20
18
  import { bsClass as setBsClass, bsStyles, getClassSet, prefix, splitBsPropsAndOmit } from './utils/bootstrapUtils';
21
19
  import { Style } from './utils/StyleConfig';
22
20
  import createChainedFunction from './utils/createChainedFunction';
23
-
24
21
  var propTypes = {
25
22
  /**
26
23
  * Create a fixed navbar along the top of the screen, that scrolls with the
27
24
  * page
28
25
  */
29
26
  fixedTop: PropTypes.bool,
27
+
30
28
  /**
31
29
  * Create a fixed navbar along the bottom of the screen, that scrolls with
32
30
  * the page
33
31
  */
34
32
  fixedBottom: PropTypes.bool,
33
+
35
34
  /**
36
35
  * Create a full-width navbar that scrolls away with the page
37
36
  */
38
37
  staticTop: PropTypes.bool,
38
+
39
39
  /**
40
40
  * An alternative dark visual style for the Navbar
41
41
  */
42
42
  inverse: PropTypes.bool,
43
+
43
44
  /**
44
45
  * Allow the Navbar to fluidly adjust to the page or container width, instead
45
46
  * of at the predefined screen breakpoints
@@ -50,6 +51,7 @@ var propTypes = {
50
51
  * Set a custom element for this component.
51
52
  */
52
53
  componentClass: elementType,
54
+
53
55
  /**
54
56
  * A callback fired when the `<Navbar>` body collapses or expands. Fired when
55
57
  * a `<Navbar.Toggle>` is clicked and called with the new `expanded`
@@ -58,6 +60,7 @@ var propTypes = {
58
60
  * @controllable expanded
59
61
  */
60
62
  onToggle: PropTypes.func,
63
+
61
64
  /**
62
65
  * A callback fired when a descendant of a child `<Nav>` is selected. Should
63
66
  * be used to execute complex closing or other miscellaneous actions desired
@@ -80,6 +83,7 @@ var propTypes = {
80
83
  * true and false.
81
84
  */
82
85
  onSelect: PropTypes.func,
86
+
83
87
  /**
84
88
  * Sets `expanded` to `false` after the onSelect event of a descendant of a
85
89
  * child `<Nav>`. Does nothing if no `<Nav>` or `<Nav>` descendants exist.
@@ -88,16 +92,15 @@ var propTypes = {
88
92
  * that need to be executed after the `select` event of `<Nav>` descendants.
89
93
  */
90
94
  collapseOnSelect: PropTypes.bool,
95
+
91
96
  /**
92
97
  * Explicitly set the visiblity of the navbar body
93
98
  *
94
99
  * @controllable onToggle
95
100
  */
96
101
  expanded: PropTypes.bool,
97
-
98
102
  role: PropTypes.string
99
103
  };
100
-
101
104
  var defaultProps = {
102
105
  componentClass: 'nav',
103
106
  fixedTop: false,
@@ -107,7 +110,6 @@ var defaultProps = {
107
110
  fluid: false,
108
111
  collapseOnSelect: false
109
112
  };
110
-
111
113
  var childContextTypes = {
112
114
  $bs_navbar: PropTypes.shape({
113
115
  bsClass: PropTypes.string,
@@ -117,27 +119,28 @@ var childContextTypes = {
117
119
  })
118
120
  };
119
121
 
120
- var Navbar = function (_React$Component) {
121
- _inherits(Navbar, _React$Component);
122
+ var Navbar =
123
+ /*#__PURE__*/
124
+ function (_React$Component) {
125
+ _inheritsLoose(Navbar, _React$Component);
122
126
 
123
127
  function Navbar(props, context) {
124
- _classCallCheck(this, Navbar);
125
-
126
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context));
128
+ var _this;
127
129
 
128
- _this.handleToggle = _this.handleToggle.bind(_this);
129
- _this.handleCollapse = _this.handleCollapse.bind(_this);
130
+ _this = _React$Component.call(this, props, context) || this;
131
+ _this.handleToggle = _this.handleToggle.bind(_assertThisInitialized(_assertThisInitialized(_this)));
132
+ _this.handleCollapse = _this.handleCollapse.bind(_assertThisInitialized(_assertThisInitialized(_this)));
130
133
  return _this;
131
134
  }
132
135
 
133
- Navbar.prototype.getChildContext = function getChildContext() {
134
- var _props = this.props,
135
- bsClass = _props.bsClass,
136
- expanded = _props.expanded,
137
- onSelect = _props.onSelect,
138
- collapseOnSelect = _props.collapseOnSelect;
139
-
136
+ var _proto = Navbar.prototype;
140
137
 
138
+ _proto.getChildContext = function getChildContext() {
139
+ var _this$props = this.props,
140
+ bsClass = _this$props.bsClass,
141
+ expanded = _this$props.expanded,
142
+ onSelect = _this$props.onSelect,
143
+ collapseOnSelect = _this$props.collapseOnSelect;
141
144
  return {
142
145
  $bs_navbar: {
143
146
  bsClass: bsClass,
@@ -148,45 +151,40 @@ var Navbar = function (_React$Component) {
148
151
  };
149
152
  };
150
153
 
151
- Navbar.prototype.handleCollapse = function handleCollapse() {
152
- var _props2 = this.props,
153
- onToggle = _props2.onToggle,
154
- expanded = _props2.expanded;
155
-
154
+ _proto.handleCollapse = function handleCollapse() {
155
+ var _this$props2 = this.props,
156
+ onToggle = _this$props2.onToggle,
157
+ expanded = _this$props2.expanded;
156
158
 
157
159
  if (expanded) {
158
160
  onToggle(false);
159
161
  }
160
162
  };
161
163
 
162
- Navbar.prototype.handleToggle = function handleToggle() {
163
- var _props3 = this.props,
164
- onToggle = _props3.onToggle,
165
- expanded = _props3.expanded;
166
-
167
-
164
+ _proto.handleToggle = function handleToggle() {
165
+ var _this$props3 = this.props,
166
+ onToggle = _this$props3.onToggle,
167
+ expanded = _this$props3.expanded;
168
168
  onToggle(!expanded);
169
169
  };
170
170
 
171
- Navbar.prototype.render = function render() {
171
+ _proto.render = function render() {
172
172
  var _extends2;
173
173
 
174
- var _props4 = this.props,
175
- Component = _props4.componentClass,
176
- fixedTop = _props4.fixedTop,
177
- fixedBottom = _props4.fixedBottom,
178
- staticTop = _props4.staticTop,
179
- inverse = _props4.inverse,
180
- fluid = _props4.fluid,
181
- className = _props4.className,
182
- children = _props4.children,
183
- props = _objectWithoutProperties(_props4, ['componentClass', 'fixedTop', 'fixedBottom', 'staticTop', 'inverse', 'fluid', 'className', 'children']);
174
+ var _this$props4 = this.props,
175
+ Component = _this$props4.componentClass,
176
+ fixedTop = _this$props4.fixedTop,
177
+ fixedBottom = _this$props4.fixedBottom,
178
+ staticTop = _this$props4.staticTop,
179
+ inverse = _this$props4.inverse,
180
+ fluid = _this$props4.fluid,
181
+ className = _this$props4.className,
182
+ children = _this$props4.children,
183
+ props = _objectWithoutPropertiesLoose(_this$props4, ["componentClass", "fixedTop", "fixedBottom", "staticTop", "inverse", "fluid", "className", "children"]);
184
184
 
185
185
  var _splitBsPropsAndOmit = splitBsPropsAndOmit(props, ['expanded', 'onToggle', 'onSelect', 'collapseOnSelect']),
186
186
  bsProps = _splitBsPropsAndOmit[0],
187
- elementProps = _splitBsPropsAndOmit[1];
188
-
189
- // will result in some false positives but that seems better
187
+ elementProps = _splitBsPropsAndOmit[1]; // will result in some false positives but that seems better
190
188
  // than false negatives. strict `undefined` check allows explicit
191
189
  // "nulling" of the role if the user really doesn't want one
192
190
 
@@ -201,15 +199,11 @@ var Navbar = function (_React$Component) {
201
199
 
202
200
  var classes = _extends({}, getClassSet(bsProps), (_extends2 = {}, _extends2[prefix(bsProps, 'fixed-top')] = fixedTop, _extends2[prefix(bsProps, 'fixed-bottom')] = fixedBottom, _extends2[prefix(bsProps, 'static-top')] = staticTop, _extends2));
203
201
 
204
- return React.createElement(
205
- Component,
206
- _extends({}, elementProps, { className: classNames(className, classes) }),
207
- React.createElement(
208
- Grid,
209
- { fluid: fluid },
210
- children
211
- )
212
- );
202
+ return React.createElement(Component, _extends({}, elementProps, {
203
+ className: classNames(className, classes)
204
+ }), React.createElement(Grid, {
205
+ fluid: fluid
206
+ }, children));
213
207
  };
214
208
 
215
209
  return Navbar;
@@ -218,47 +212,44 @@ var Navbar = function (_React$Component) {
218
212
  Navbar.propTypes = propTypes;
219
213
  Navbar.defaultProps = defaultProps;
220
214
  Navbar.childContextTypes = childContextTypes;
221
-
222
215
  setBsClass('navbar', Navbar);
223
-
224
- var UncontrollableNavbar = uncontrollable(Navbar, { expanded: 'onToggle' });
216
+ var UncontrollableNavbar = uncontrollable(Navbar, {
217
+ expanded: 'onToggle'
218
+ });
225
219
 
226
220
  function createSimpleWrapper(tag, suffix, displayName) {
227
221
  var Wrapper = function Wrapper(_ref, _ref2) {
228
- var _ref2$$bs_navbar = _ref2.$bs_navbar,
229
- navbarProps = _ref2$$bs_navbar === undefined ? { bsClass: 'navbar' } : _ref2$$bs_navbar;
230
-
231
222
  var Component = _ref.componentClass,
232
223
  className = _ref.className,
233
224
  pullRight = _ref.pullRight,
234
225
  pullLeft = _ref.pullLeft,
235
- props = _objectWithoutProperties(_ref, ['componentClass', 'className', 'pullRight', 'pullLeft']);
226
+ props = _objectWithoutPropertiesLoose(_ref, ["componentClass", "className", "pullRight", "pullLeft"]);
236
227
 
228
+ var _ref2$$bs_navbar = _ref2.$bs_navbar,
229
+ navbarProps = _ref2$$bs_navbar === void 0 ? {
230
+ bsClass: 'navbar'
231
+ } : _ref2$$bs_navbar;
237
232
  return React.createElement(Component, _extends({}, props, {
238
233
  className: classNames(className, prefix(navbarProps, suffix), pullRight && prefix(navbarProps, 'right'), pullLeft && prefix(navbarProps, 'left'))
239
234
  }));
240
235
  };
241
236
 
242
237
  Wrapper.displayName = displayName;
243
-
244
238
  Wrapper.propTypes = {
245
239
  componentClass: elementType,
246
240
  pullRight: PropTypes.bool,
247
241
  pullLeft: PropTypes.bool
248
242
  };
249
-
250
243
  Wrapper.defaultProps = {
251
244
  componentClass: tag,
252
245
  pullRight: false,
253
246
  pullLeft: false
254
247
  };
255
-
256
248
  Wrapper.contextTypes = {
257
249
  $bs_navbar: PropTypes.shape({
258
250
  bsClass: PropTypes.string
259
251
  })
260
252
  };
261
-
262
253
  return Wrapper;
263
254
  }
264
255
 
@@ -266,10 +257,8 @@ UncontrollableNavbar.Brand = NavbarBrand;
266
257
  UncontrollableNavbar.Header = NavbarHeader;
267
258
  UncontrollableNavbar.Toggle = NavbarToggle;
268
259
  UncontrollableNavbar.Collapse = NavbarCollapse;
269
-
270
260
  UncontrollableNavbar.Form = createSimpleWrapper('div', 'form', 'NavbarForm');
271
261
  UncontrollableNavbar.Text = createSimpleWrapper('p', 'text', 'NavbarText');
272
- UncontrollableNavbar.Link = createSimpleWrapper('a', 'link', 'NavbarLink');
262
+ UncontrollableNavbar.Link = createSimpleWrapper('a', 'link', 'NavbarLink'); // Set bsStyles here so they can be overridden.
273
263
 
274
- // Set bsStyles here so they can be overridden.
275
264
  export default bsStyles([Style.DEFAULT, Style.INVERSE], Style.DEFAULT, UncontrollableNavbar);
package/es/NavbarBrand.js CHANGED
@@ -1,37 +1,36 @@
1
- import _extends from 'babel-runtime/helpers/extends';
2
- import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
3
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
4
- import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
5
- import _inherits from 'babel-runtime/helpers/inherits';
1
+ import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
3
+ import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
6
4
  import classNames from 'classnames';
7
5
  import React from 'react';
8
6
  import PropTypes from 'prop-types';
9
-
10
7
  import { prefix } from './utils/bootstrapUtils';
11
-
12
8
  var contextTypes = {
13
9
  $bs_navbar: PropTypes.shape({
14
10
  bsClass: PropTypes.string
15
11
  })
16
12
  };
17
13
 
18
- var NavbarBrand = function (_React$Component) {
19
- _inherits(NavbarBrand, _React$Component);
14
+ var NavbarBrand =
15
+ /*#__PURE__*/
16
+ function (_React$Component) {
17
+ _inheritsLoose(NavbarBrand, _React$Component);
20
18
 
21
19
  function NavbarBrand() {
22
- _classCallCheck(this, NavbarBrand);
23
-
24
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
20
+ return _React$Component.apply(this, arguments) || this;
25
21
  }
26
22
 
27
- NavbarBrand.prototype.render = function render() {
28
- var _props = this.props,
29
- className = _props.className,
30
- children = _props.children,
31
- props = _objectWithoutProperties(_props, ['className', 'children']);
23
+ var _proto = NavbarBrand.prototype;
32
24
 
33
- var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' };
25
+ _proto.render = function render() {
26
+ var _this$props = this.props,
27
+ className = _this$props.className,
28
+ children = _this$props.children,
29
+ props = _objectWithoutPropertiesLoose(_this$props, ["className", "children"]);
34
30
 
31
+ var navbarProps = this.context.$bs_navbar || {
32
+ bsClass: 'navbar'
33
+ };
35
34
  var bsClassName = prefix(navbarProps, 'brand');
36
35
 
37
36
  if (React.isValidElement(children)) {
@@ -40,16 +39,13 @@ var NavbarBrand = function (_React$Component) {
40
39
  });
41
40
  }
42
41
 
43
- return React.createElement(
44
- 'span',
45
- _extends({}, props, { className: classNames(className, bsClassName) }),
46
- children
47
- );
42
+ return React.createElement("span", _extends({}, props, {
43
+ className: classNames(className, bsClassName)
44
+ }), children);
48
45
  };
49
46
 
50
47
  return NavbarBrand;
51
48
  }(React.Component);
52
49
 
53
50
  NavbarBrand.contextTypes = contextTypes;
54
-
55
51
  export default NavbarBrand;
@@ -1,14 +1,10 @@
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 React from 'react';
7
5
  import PropTypes from 'prop-types';
8
-
9
6
  import Collapse from './Collapse';
10
7
  import { prefix } from './utils/bootstrapUtils';
11
-
12
8
  var contextTypes = {
13
9
  $bs_navbar: PropTypes.shape({
14
10
  bsClass: PropTypes.string,
@@ -16,38 +12,35 @@ var contextTypes = {
16
12
  })
17
13
  };
18
14
 
19
- var NavbarCollapse = function (_React$Component) {
20
- _inherits(NavbarCollapse, _React$Component);
15
+ var NavbarCollapse =
16
+ /*#__PURE__*/
17
+ function (_React$Component) {
18
+ _inheritsLoose(NavbarCollapse, _React$Component);
21
19
 
22
20
  function NavbarCollapse() {
23
- _classCallCheck(this, NavbarCollapse);
24
-
25
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
21
+ return _React$Component.apply(this, arguments) || this;
26
22
  }
27
23
 
28
- NavbarCollapse.prototype.render = function render() {
29
- var _props = this.props,
30
- children = _props.children,
31
- props = _objectWithoutProperties(_props, ['children']);
24
+ var _proto = NavbarCollapse.prototype;
32
25
 
33
- var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' };
26
+ _proto.render = function render() {
27
+ var _this$props = this.props,
28
+ children = _this$props.children,
29
+ props = _objectWithoutPropertiesLoose(_this$props, ["children"]);
34
30
 
31
+ var navbarProps = this.context.$bs_navbar || {
32
+ bsClass: 'navbar'
33
+ };
35
34
  var bsClassName = prefix(navbarProps, 'collapse');
36
-
37
- return React.createElement(
38
- Collapse,
39
- _extends({ 'in': navbarProps.expanded }, props),
40
- React.createElement(
41
- 'div',
42
- { className: bsClassName },
43
- children
44
- )
45
- );
35
+ return React.createElement(Collapse, _extends({
36
+ in: navbarProps.expanded
37
+ }, props), React.createElement("div", {
38
+ className: bsClassName
39
+ }, children));
46
40
  };
47
41
 
48
42
  return NavbarCollapse;
49
43
  }(React.Component);
50
44
 
51
45
  NavbarCollapse.contextTypes = contextTypes;
52
-
53
46
  export default NavbarCollapse;
@@ -1,44 +1,43 @@
1
- import _extends from 'babel-runtime/helpers/extends';
2
- import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
3
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
4
- import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
5
- import _inherits from 'babel-runtime/helpers/inherits';
1
+ import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
3
+ import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
6
4
  import classNames from 'classnames';
7
5
  import React from 'react';
8
6
  import PropTypes from 'prop-types';
9
-
10
7
  import { prefix } from './utils/bootstrapUtils';
11
-
12
8
  var contextTypes = {
13
9
  $bs_navbar: PropTypes.shape({
14
10
  bsClass: PropTypes.string
15
11
  })
16
12
  };
17
13
 
18
- var NavbarHeader = function (_React$Component) {
19
- _inherits(NavbarHeader, _React$Component);
14
+ var NavbarHeader =
15
+ /*#__PURE__*/
16
+ function (_React$Component) {
17
+ _inheritsLoose(NavbarHeader, _React$Component);
20
18
 
21
19
  function NavbarHeader() {
22
- _classCallCheck(this, NavbarHeader);
23
-
24
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
20
+ return _React$Component.apply(this, arguments) || this;
25
21
  }
26
22
 
27
- NavbarHeader.prototype.render = function render() {
28
- var _props = this.props,
29
- className = _props.className,
30
- props = _objectWithoutProperties(_props, ['className']);
23
+ var _proto = NavbarHeader.prototype;
31
24
 
32
- var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' };
25
+ _proto.render = function render() {
26
+ var _this$props = this.props,
27
+ className = _this$props.className,
28
+ props = _objectWithoutPropertiesLoose(_this$props, ["className"]);
33
29
 
30
+ var navbarProps = this.context.$bs_navbar || {
31
+ bsClass: 'navbar'
32
+ };
34
33
  var bsClassName = prefix(navbarProps, 'header');
35
-
36
- return React.createElement('div', _extends({}, props, { className: classNames(className, bsClassName) }));
34
+ return React.createElement("div", _extends({}, props, {
35
+ className: classNames(className, bsClassName)
36
+ }));
37
37
  };
38
38
 
39
39
  return NavbarHeader;
40
40
  }(React.Component);
41
41
 
42
42
  NavbarHeader.contextTypes = contextTypes;
43
-
44
43
  export default NavbarHeader;
@@ -1,23 +1,19 @@
1
- import _extends from 'babel-runtime/helpers/extends';
2
- import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
3
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
4
- import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
5
- import _inherits from 'babel-runtime/helpers/inherits';
1
+ import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
3
+ import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
6
4
  import classNames from 'classnames';
7
5
  import React from 'react';
8
6
  import PropTypes from 'prop-types';
9
-
10
7
  import { prefix } from './utils/bootstrapUtils';
11
8
  import createChainedFunction from './utils/createChainedFunction';
12
-
13
9
  var propTypes = {
14
10
  onClick: PropTypes.func,
11
+
15
12
  /**
16
13
  * The toggle content, if left empty it will render the default toggle (seen above).
17
14
  */
18
15
  children: PropTypes.node
19
16
  };
20
-
21
17
  var contextTypes = {
22
18
  $bs_navbar: PropTypes.shape({
23
19
  bsClass: PropTypes.string,
@@ -26,23 +22,27 @@ var contextTypes = {
26
22
  })
27
23
  };
28
24
 
29
- var NavbarToggle = function (_React$Component) {
30
- _inherits(NavbarToggle, _React$Component);
25
+ var NavbarToggle =
26
+ /*#__PURE__*/
27
+ function (_React$Component) {
28
+ _inheritsLoose(NavbarToggle, _React$Component);
31
29
 
32
30
  function NavbarToggle() {
33
- _classCallCheck(this, NavbarToggle);
34
-
35
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
31
+ return _React$Component.apply(this, arguments) || this;
36
32
  }
37
33
 
38
- NavbarToggle.prototype.render = function render() {
39
- var _props = this.props,
40
- onClick = _props.onClick,
41
- className = _props.className,
42
- children = _props.children,
43
- props = _objectWithoutProperties(_props, ['onClick', 'className', 'children']);
34
+ var _proto = NavbarToggle.prototype;
35
+
36
+ _proto.render = function render() {
37
+ var _this$props = this.props,
38
+ onClick = _this$props.onClick,
39
+ className = _this$props.className,
40
+ children = _this$props.children,
41
+ props = _objectWithoutPropertiesLoose(_this$props, ["onClick", "className", "children"]);
44
42
 
45
- var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' };
43
+ var navbarProps = this.context.$bs_navbar || {
44
+ bsClass: 'navbar'
45
+ };
46
46
 
47
47
  var buttonProps = _extends({
48
48
  type: 'button'
@@ -52,25 +52,18 @@ var NavbarToggle = function (_React$Component) {
52
52
  });
53
53
 
54
54
  if (children) {
55
- return React.createElement(
56
- 'button',
57
- buttonProps,
58
- children
59
- );
55
+ return React.createElement("button", buttonProps, children);
60
56
  }
61
57
 
62
- return React.createElement(
63
- 'button',
64
- buttonProps,
65
- React.createElement(
66
- 'span',
67
- { className: 'sr-only' },
68
- 'Toggle navigation'
69
- ),
70
- React.createElement('span', { className: 'icon-bar' }),
71
- React.createElement('span', { className: 'icon-bar' }),
72
- React.createElement('span', { className: 'icon-bar' })
73
- );
58
+ return React.createElement("button", buttonProps, React.createElement("span", {
59
+ className: "sr-only"
60
+ }, "Toggle navigation"), React.createElement("span", {
61
+ className: "icon-bar"
62
+ }), React.createElement("span", {
63
+ className: "icon-bar"
64
+ }), React.createElement("span", {
65
+ className: "icon-bar"
66
+ }));
74
67
  };
75
68
 
76
69
  return NavbarToggle;
@@ -78,5 +71,4 @@ var NavbarToggle = function (_React$Component) {
78
71
 
79
72
  NavbarToggle.propTypes = propTypes;
80
73
  NavbarToggle.contextTypes = contextTypes;
81
-
82
74
  export default NavbarToggle;