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/Col.js CHANGED
@@ -1,16 +1,12 @@
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
7
  import elementType from 'prop-types-extra/lib/elementType';
10
-
11
8
  import { bsClass, prefix, splitBsProps } from './utils/bootstrapUtils';
12
9
  import { DEVICE_SIZES } from './utils/StyleConfig';
13
-
14
10
  var propTypes = {
15
11
  componentClass: elementType,
16
12
 
@@ -22,6 +18,7 @@ var propTypes = {
22
18
  * class-prefix `col-xs-`
23
19
  */
24
20
  xs: PropTypes.number,
21
+
25
22
  /**
26
23
  * The number of columns you wish to span
27
24
  *
@@ -30,6 +27,7 @@ var propTypes = {
30
27
  * class-prefix `col-sm-`
31
28
  */
32
29
  sm: PropTypes.number,
30
+
33
31
  /**
34
32
  * The number of columns you wish to span
35
33
  *
@@ -38,6 +36,7 @@ var propTypes = {
38
36
  * class-prefix `col-md-`
39
37
  */
40
38
  md: PropTypes.number,
39
+
41
40
  /**
42
41
  * The number of columns you wish to span
43
42
  *
@@ -46,6 +45,7 @@ var propTypes = {
46
45
  * class-prefix `col-lg-`
47
46
  */
48
47
  lg: PropTypes.number,
48
+
49
49
  /**
50
50
  * Hide column
51
51
  *
@@ -54,6 +54,7 @@ var propTypes = {
54
54
  * adds class `hidden-xs`
55
55
  */
56
56
  xsHidden: PropTypes.bool,
57
+
57
58
  /**
58
59
  * Hide column
59
60
  *
@@ -62,6 +63,7 @@ var propTypes = {
62
63
  * adds class `hidden-sm`
63
64
  */
64
65
  smHidden: PropTypes.bool,
66
+
65
67
  /**
66
68
  * Hide column
67
69
  *
@@ -70,6 +72,7 @@ var propTypes = {
70
72
  * adds class `hidden-md`
71
73
  */
72
74
  mdHidden: PropTypes.bool,
75
+
73
76
  /**
74
77
  * Hide column
75
78
  *
@@ -78,6 +81,7 @@ var propTypes = {
78
81
  * adds class `hidden-lg`
79
82
  */
80
83
  lgHidden: PropTypes.bool,
84
+
81
85
  /**
82
86
  * Move columns to the right
83
87
  *
@@ -86,6 +90,7 @@ var propTypes = {
86
90
  * class-prefix `col-xs-offset-`
87
91
  */
88
92
  xsOffset: PropTypes.number,
93
+
89
94
  /**
90
95
  * Move columns to the right
91
96
  *
@@ -94,6 +99,7 @@ var propTypes = {
94
99
  * class-prefix `col-sm-offset-`
95
100
  */
96
101
  smOffset: PropTypes.number,
102
+
97
103
  /**
98
104
  * Move columns to the right
99
105
  *
@@ -102,6 +108,7 @@ var propTypes = {
102
108
  * class-prefix `col-md-offset-`
103
109
  */
104
110
  mdOffset: PropTypes.number,
111
+
105
112
  /**
106
113
  * Move columns to the right
107
114
  *
@@ -110,6 +117,7 @@ var propTypes = {
110
117
  * class-prefix `col-lg-offset-`
111
118
  */
112
119
  lgOffset: PropTypes.number,
120
+
113
121
  /**
114
122
  * Change the order of grid columns to the right
115
123
  *
@@ -118,6 +126,7 @@ var propTypes = {
118
126
  * class-prefix `col-xs-push-`
119
127
  */
120
128
  xsPush: PropTypes.number,
129
+
121
130
  /**
122
131
  * Change the order of grid columns to the right
123
132
  *
@@ -126,6 +135,7 @@ var propTypes = {
126
135
  * class-prefix `col-sm-push-`
127
136
  */
128
137
  smPush: PropTypes.number,
138
+
129
139
  /**
130
140
  * Change the order of grid columns to the right
131
141
  *
@@ -134,6 +144,7 @@ var propTypes = {
134
144
  * class-prefix `col-md-push-`
135
145
  */
136
146
  mdPush: PropTypes.number,
147
+
137
148
  /**
138
149
  * Change the order of grid columns to the right
139
150
  *
@@ -142,6 +153,7 @@ var propTypes = {
142
153
  * class-prefix `col-lg-push-`
143
154
  */
144
155
  lgPush: PropTypes.number,
156
+
145
157
  /**
146
158
  * Change the order of grid columns to the left
147
159
  *
@@ -150,6 +162,7 @@ var propTypes = {
150
162
  * class-prefix `col-xs-pull-`
151
163
  */
152
164
  xsPull: PropTypes.number,
165
+
153
166
  /**
154
167
  * Change the order of grid columns to the left
155
168
  *
@@ -158,6 +171,7 @@ var propTypes = {
158
171
  * class-prefix `col-sm-pull-`
159
172
  */
160
173
  smPull: PropTypes.number,
174
+
161
175
  /**
162
176
  * Change the order of grid columns to the left
163
177
  *
@@ -166,6 +180,7 @@ var propTypes = {
166
180
  * class-prefix `col-md-pull-`
167
181
  */
168
182
  mdPull: PropTypes.number,
183
+
169
184
  /**
170
185
  * Change the order of grid columns to the left
171
186
  *
@@ -175,39 +190,39 @@ var propTypes = {
175
190
  */
176
191
  lgPull: PropTypes.number
177
192
  };
178
-
179
193
  var defaultProps = {
180
194
  componentClass: 'div'
181
195
  };
182
196
 
183
- var Col = function (_React$Component) {
184
- _inherits(Col, _React$Component);
197
+ var Col =
198
+ /*#__PURE__*/
199
+ function (_React$Component) {
200
+ _inheritsLoose(Col, _React$Component);
185
201
 
186
202
  function Col() {
187
- _classCallCheck(this, Col);
188
-
189
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
203
+ return _React$Component.apply(this, arguments) || this;
190
204
  }
191
205
 
192
- Col.prototype.render = function render() {
193
- var _props = this.props,
194
- Component = _props.componentClass,
195
- className = _props.className,
196
- props = _objectWithoutProperties(_props, ['componentClass', 'className']);
206
+ var _proto = Col.prototype;
207
+
208
+ _proto.render = function render() {
209
+ var _this$props = this.props,
210
+ Component = _this$props.componentClass,
211
+ className = _this$props.className,
212
+ props = _objectWithoutPropertiesLoose(_this$props, ["componentClass", "className"]);
197
213
 
198
214
  var _splitBsProps = splitBsProps(props),
199
215
  bsProps = _splitBsProps[0],
200
216
  elementProps = _splitBsProps[1];
201
217
 
202
218
  var classes = [];
203
-
204
219
  DEVICE_SIZES.forEach(function (size) {
205
220
  function popProp(propSuffix, modifier) {
206
- var propName = '' + size + propSuffix;
221
+ var propName = "" + size + propSuffix;
207
222
  var propValue = elementProps[propName];
208
223
 
209
224
  if (propValue != null) {
210
- classes.push(prefix(bsProps, '' + size + modifier + '-' + propValue));
225
+ classes.push(prefix(bsProps, "" + size + modifier + "-" + propValue));
211
226
  }
212
227
 
213
228
  delete elementProps[propName];
@@ -217,15 +232,17 @@ var Col = function (_React$Component) {
217
232
  popProp('Offset', '-offset');
218
233
  popProp('Push', '-push');
219
234
  popProp('Pull', '-pull');
235
+ var hiddenPropName = size + "Hidden";
220
236
 
221
- var hiddenPropName = size + 'Hidden';
222
237
  if (elementProps[hiddenPropName]) {
223
- classes.push('hidden-' + size);
238
+ classes.push("hidden-" + size);
224
239
  }
240
+
225
241
  delete elementProps[hiddenPropName];
226
242
  });
227
-
228
- return React.createElement(Component, _extends({}, elementProps, { className: classNames(className, classes) }));
243
+ return React.createElement(Component, _extends({}, elementProps, {
244
+ className: classNames(className, classes)
245
+ }));
229
246
  };
230
247
 
231
248
  return Col;
@@ -233,5 +250,4 @@ var Col = function (_React$Component) {
233
250
 
234
251
  Col.propTypes = propTypes;
235
252
  Col.defaultProps = defaultProps;
236
-
237
253
  export default bsClass('col', Col);
package/es/Collapse.js CHANGED
@@ -1,8 +1,7 @@
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 _parseInt from "@babel/runtime-corejs2/core-js/parse-int";
6
5
 
7
6
  var _collapseStyles;
8
7
 
@@ -11,30 +10,25 @@ import css from 'dom-helpers/style';
11
10
  import React from 'react';
12
11
  import PropTypes from 'prop-types';
13
12
  import Transition, { EXITED, ENTERED, ENTERING, EXITING } from 'react-transition-group/Transition';
14
-
15
13
  import capitalize from './utils/capitalize';
16
14
  import createChainedFunction from './utils/createChainedFunction';
17
-
18
15
  var MARGINS = {
19
16
  height: ['marginTop', 'marginBottom'],
20
17
  width: ['marginLeft', 'marginRight']
21
- };
22
-
23
- // reading a dimension prop will cause the browser to recalculate,
18
+ }; // reading a dimension prop will cause the browser to recalculate,
24
19
  // which will let our animations work
20
+
25
21
  function triggerBrowserReflow(node) {
26
22
  node.offsetHeight; // eslint-disable-line no-unused-expressions
27
23
  }
28
24
 
29
25
  function getDimensionValue(dimension, elem) {
30
- var value = elem['offset' + capitalize(dimension)];
26
+ var value = elem["offset" + capitalize(dimension)];
31
27
  var margins = MARGINS[dimension];
32
-
33
- return value + parseInt(css(elem, margins[0]), 10) + parseInt(css(elem, margins[1]), 10);
28
+ return value + _parseInt(css(elem, margins[0]), 10) + _parseInt(css(elem, margins[1]), 10);
34
29
  }
35
30
 
36
31
  var collapseStyles = (_collapseStyles = {}, _collapseStyles[EXITED] = 'collapse', _collapseStyles[EXITING] = 'collapsing', _collapseStyles[ENTERING] = 'collapsing', _collapseStyles[ENTERED] = 'collapse in', _collapseStyles);
37
-
38
32
  var propTypes = {
39
33
  /**
40
34
  * Show the component; triggers the expand or collapse animation
@@ -68,22 +62,27 @@ var propTypes = {
68
62
  * Callback fired before the component expands
69
63
  */
70
64
  onEnter: PropTypes.func,
65
+
71
66
  /**
72
67
  * Callback fired after the component starts to expand
73
68
  */
74
69
  onEntering: PropTypes.func,
70
+
75
71
  /**
76
72
  * Callback fired after the component has expanded
77
73
  */
78
74
  onEntered: PropTypes.func,
75
+
79
76
  /**
80
77
  * Callback fired before the component collapses
81
78
  */
82
79
  onExit: PropTypes.func,
80
+
83
81
  /**
84
82
  * Callback fired after the component starts to collapse
85
83
  */
86
84
  onExiting: PropTypes.func,
85
+
87
86
  /**
88
87
  * Callback fired after the component has collapsed
89
88
  */
@@ -112,101 +111,103 @@ var propTypes = {
112
111
  */
113
112
  role: PropTypes.string
114
113
  };
115
-
116
114
  var defaultProps = {
117
115
  in: false,
118
116
  timeout: 300,
119
117
  mountOnEnter: false,
120
118
  unmountOnExit: false,
121
119
  appear: false,
122
-
123
120
  dimension: 'height',
124
121
  getDimensionValue: getDimensionValue
125
122
  };
126
123
 
127
- var Collapse = function (_React$Component) {
128
- _inherits(Collapse, _React$Component);
124
+ var Collapse =
125
+ /*#__PURE__*/
126
+ function (_React$Component) {
127
+ _inheritsLoose(Collapse, _React$Component);
129
128
 
130
129
  function Collapse() {
131
- var _temp, _this, _ret;
130
+ var _this;
132
131
 
133
- _classCallCheck(this, Collapse);
134
-
135
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
132
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
136
133
  args[_key] = arguments[_key];
137
134
  }
138
135
 
139
- return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleEnter = function (elem) {
136
+ _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
137
+
138
+ _this.handleEnter = function (elem) {
140
139
  elem.style[_this.getDimension()] = '0';
141
- }, _this.handleEntering = function (elem) {
140
+ };
141
+
142
+ _this.handleEntering = function (elem) {
142
143
  var dimension = _this.getDimension();
144
+
143
145
  elem.style[dimension] = _this._getScrollDimensionValue(elem, dimension);
144
- }, _this.handleEntered = function (elem) {
146
+ };
147
+
148
+ _this.handleEntered = function (elem) {
145
149
  elem.style[_this.getDimension()] = null;
146
- }, _this.handleExit = function (elem) {
150
+ };
151
+
152
+ _this.handleExit = function (elem) {
147
153
  var dimension = _this.getDimension();
148
- elem.style[dimension] = _this.props.getDimensionValue(dimension, elem) + 'px';
154
+
155
+ elem.style[dimension] = _this.props.getDimensionValue(dimension, elem) + "px";
149
156
  triggerBrowserReflow(elem);
150
- }, _this.handleExiting = function (elem) {
157
+ };
158
+
159
+ _this.handleExiting = function (elem) {
151
160
  elem.style[_this.getDimension()] = '0';
152
- }, _temp), _possibleConstructorReturn(_this, _ret);
161
+ };
162
+
163
+ return _this;
153
164
  }
154
165
 
155
- Collapse.prototype.getDimension = function getDimension() {
156
- return typeof this.props.dimension === 'function' ? this.props.dimension() : this.props.dimension;
157
- };
166
+ var _proto = Collapse.prototype;
158
167
 
159
- // for testing
168
+ _proto.getDimension = function getDimension() {
169
+ return typeof this.props.dimension === 'function' ? this.props.dimension() : this.props.dimension;
170
+ }; // for testing
160
171
 
161
172
 
162
- Collapse.prototype._getScrollDimensionValue = function _getScrollDimensionValue(elem, dimension) {
163
- return elem['scroll' + capitalize(dimension)] + 'px';
173
+ _proto._getScrollDimensionValue = function _getScrollDimensionValue(elem, dimension) {
174
+ return elem["scroll" + capitalize(dimension)] + "px";
164
175
  };
165
-
166
176
  /* -- Expanding -- */
167
177
 
168
178
 
169
- /* -- Collapsing -- */
170
-
171
-
172
- Collapse.prototype.render = function render() {
179
+ _proto.render = function render() {
173
180
  var _this2 = this;
174
181
 
175
- var _props = this.props,
176
- onEnter = _props.onEnter,
177
- onEntering = _props.onEntering,
178
- onEntered = _props.onEntered,
179
- onExit = _props.onExit,
180
- onExiting = _props.onExiting,
181
- className = _props.className,
182
- children = _props.children,
183
- props = _objectWithoutProperties(_props, ['onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'className', 'children']);
182
+ var _this$props = this.props,
183
+ onEnter = _this$props.onEnter,
184
+ onEntering = _this$props.onEntering,
185
+ onEntered = _this$props.onEntered,
186
+ onExit = _this$props.onExit,
187
+ onExiting = _this$props.onExiting,
188
+ className = _this$props.className,
189
+ children = _this$props.children,
190
+ props = _objectWithoutPropertiesLoose(_this$props, ["onEnter", "onEntering", "onEntered", "onExit", "onExiting", "className", "children"]);
184
191
 
185
192
  delete props.dimension;
186
193
  delete props.getDimensionValue;
187
-
188
194
  var handleEnter = createChainedFunction(this.handleEnter, onEnter);
189
195
  var handleEntering = createChainedFunction(this.handleEntering, onEntering);
190
196
  var handleEntered = createChainedFunction(this.handleEntered, onEntered);
191
197
  var handleExit = createChainedFunction(this.handleExit, onExit);
192
198
  var handleExiting = createChainedFunction(this.handleExiting, onExiting);
193
-
194
- return React.createElement(
195
- Transition,
196
- _extends({}, props, {
197
- 'aria-expanded': props.role ? props.in : null,
198
- onEnter: handleEnter,
199
- onEntering: handleEntering,
200
- onEntered: handleEntered,
201
- onExit: handleExit,
202
- onExiting: handleExiting
203
- }),
204
- function (state, innerProps) {
205
- return React.cloneElement(children, _extends({}, innerProps, {
206
- className: classNames(className, children.props.className, collapseStyles[state], _this2.getDimension() === 'width' && 'width')
207
- }));
208
- }
209
- );
199
+ return React.createElement(Transition, _extends({}, props, {
200
+ "aria-expanded": props.role ? props.in : null,
201
+ onEnter: handleEnter,
202
+ onEntering: handleEntering,
203
+ onEntered: handleEntered,
204
+ onExit: handleExit,
205
+ onExiting: handleExiting
206
+ }), function (state, innerProps) {
207
+ return React.cloneElement(children, _extends({}, innerProps, {
208
+ className: classNames(className, children.props.className, collapseStyles[state], _this2.getDimension() === 'width' && 'width')
209
+ }));
210
+ });
210
211
  };
211
212
 
212
213
  return Collapse;
@@ -214,5 +215,4 @@ var Collapse = function (_React$Component) {
214
215
 
215
216
  Collapse.propTypes = propTypes;
216
217
  Collapse.defaultProps = defaultProps;
217
-
218
218
  export default Collapse;
@@ -1,15 +1,11 @@
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
7
  import warning from 'warning';
10
-
11
8
  import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
12
-
13
9
  var propTypes = {
14
10
  /**
15
11
  * Uses `controlId` from `<FormGroup>` if not explicitly specified.
@@ -17,46 +13,46 @@ var propTypes = {
17
13
  htmlFor: PropTypes.string,
18
14
  srOnly: PropTypes.bool
19
15
  };
20
-
21
16
  var defaultProps = {
22
17
  srOnly: false
23
18
  };
24
-
25
19
  var contextTypes = {
26
20
  $bs_formGroup: PropTypes.object
27
21
  };
28
22
 
29
- var ControlLabel = function (_React$Component) {
30
- _inherits(ControlLabel, _React$Component);
23
+ var ControlLabel =
24
+ /*#__PURE__*/
25
+ function (_React$Component) {
26
+ _inheritsLoose(ControlLabel, _React$Component);
31
27
 
32
28
  function ControlLabel() {
33
- _classCallCheck(this, ControlLabel);
34
-
35
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
29
+ return _React$Component.apply(this, arguments) || this;
36
30
  }
37
31
 
38
- ControlLabel.prototype.render = function render() {
32
+ var _proto = ControlLabel.prototype;
33
+
34
+ _proto.render = function render() {
39
35
  var formGroup = this.context.$bs_formGroup;
40
36
  var controlId = formGroup && formGroup.controlId;
41
37
 
42
- var _props = this.props,
43
- _props$htmlFor = _props.htmlFor,
44
- htmlFor = _props$htmlFor === undefined ? controlId : _props$htmlFor,
45
- srOnly = _props.srOnly,
46
- className = _props.className,
47
- props = _objectWithoutProperties(_props, ['htmlFor', 'srOnly', 'className']);
38
+ var _this$props = this.props,
39
+ _this$props$htmlFor = _this$props.htmlFor,
40
+ htmlFor = _this$props$htmlFor === void 0 ? controlId : _this$props$htmlFor,
41
+ srOnly = _this$props.srOnly,
42
+ className = _this$props.className,
43
+ props = _objectWithoutPropertiesLoose(_this$props, ["htmlFor", "srOnly", "className"]);
48
44
 
49
45
  var _splitBsProps = splitBsProps(props),
50
46
  bsProps = _splitBsProps[0],
51
47
  elementProps = _splitBsProps[1];
52
48
 
53
- process.env.NODE_ENV !== 'production' ? warning(controlId == null || htmlFor === controlId, '`controlId` is ignored on `<ControlLabel>` when `htmlFor` is specified.') : void 0;
49
+ process.env.NODE_ENV !== "production" ? warning(controlId == null || htmlFor === controlId, '`controlId` is ignored on `<ControlLabel>` when `htmlFor` is specified.') : void 0;
54
50
 
55
51
  var classes = _extends({}, getClassSet(bsProps), {
56
52
  'sr-only': srOnly
57
53
  });
58
54
 
59
- return React.createElement('label', _extends({}, elementProps, {
55
+ return React.createElement("label", _extends({}, elementProps, {
60
56
  htmlFor: htmlFor,
61
57
  className: classNames(className, classes)
62
58
  }));
@@ -68,5 +64,4 @@ var ControlLabel = function (_React$Component) {
68
64
  ControlLabel.propTypes = propTypes;
69
65
  ControlLabel.defaultProps = defaultProps;
70
66
  ControlLabel.contextTypes = contextTypes;
71
-
72
67
  export default bsClass('control-label', ControlLabel);