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
@@ -1,7 +1,5 @@
1
1
  // TODO: This module should be ElementChildren, and should use named exports.
2
-
3
2
  import React from 'react';
4
-
5
3
  /**
6
4
  * Iterates through children that are typically specified as `props.children`,
7
5
  * but only maps over children that are "valid components".
@@ -14,9 +12,9 @@ import React from 'react';
14
12
  * @param {*} context Context for func.
15
13
  * @return {object} Object containing the ordered map of results.
16
14
  */
15
+
17
16
  function map(children, func, context) {
18
17
  var index = 0;
19
-
20
18
  return React.Children.map(children, function (child) {
21
19
  if (!React.isValidElement(child)) {
22
20
  return child;
@@ -25,7 +23,6 @@ function map(children, func, context) {
25
23
  return func.call(context, child, index++);
26
24
  });
27
25
  }
28
-
29
26
  /**
30
27
  * Iterates through children that are "valid components".
31
28
  *
@@ -36,9 +33,10 @@ function map(children, func, context) {
36
33
  * @param {function(*, int)} func.
37
34
  * @param {*} context Context for context.
38
35
  */
36
+
37
+
39
38
  function forEach(children, func, context) {
40
39
  var index = 0;
41
-
42
40
  React.Children.forEach(children, function (child) {
43
41
  if (!React.isValidElement(child)) {
44
42
  return;
@@ -47,16 +45,16 @@ function forEach(children, func, context) {
47
45
  func.call(context, child, index++);
48
46
  });
49
47
  }
50
-
51
48
  /**
52
49
  * Count the number of "valid components" in the Children container.
53
50
  *
54
51
  * @param {?*} children Children tree container.
55
52
  * @returns {number}
56
53
  */
54
+
55
+
57
56
  function count(children) {
58
57
  var result = 0;
59
-
60
58
  React.Children.forEach(children, function (child) {
61
59
  if (!React.isValidElement(child)) {
62
60
  return;
@@ -64,10 +62,8 @@ function count(children) {
64
62
 
65
63
  ++result;
66
64
  });
67
-
68
65
  return result;
69
66
  }
70
-
71
67
  /**
72
68
  * Finds children that are typically specified as `props.children`,
73
69
  * but only iterates over children that are "valid components".
@@ -80,10 +76,11 @@ function count(children) {
80
76
  * @param {*} context Context for func.
81
77
  * @returns {array} of children that meet the func return statement
82
78
  */
79
+
80
+
83
81
  function filter(children, func, context) {
84
82
  var index = 0;
85
83
  var result = [];
86
-
87
84
  React.Children.forEach(children, function (child) {
88
85
  if (!React.isValidElement(child)) {
89
86
  return;
@@ -93,18 +90,17 @@ function filter(children, func, context) {
93
90
  result.push(child);
94
91
  }
95
92
  });
96
-
97
93
  return result;
98
94
  }
99
95
 
100
96
  function find(children, func, context) {
101
97
  var index = 0;
102
- var result = void 0;
103
-
98
+ var result;
104
99
  React.Children.forEach(children, function (child) {
105
100
  if (result) {
106
101
  return;
107
102
  }
103
+
108
104
  if (!React.isValidElement(child)) {
109
105
  return;
110
106
  }
@@ -113,18 +109,17 @@ function find(children, func, context) {
113
109
  result = child;
114
110
  }
115
111
  });
116
-
117
112
  return result;
118
113
  }
119
114
 
120
115
  function every(children, func, context) {
121
116
  var index = 0;
122
117
  var result = true;
123
-
124
118
  React.Children.forEach(children, function (child) {
125
119
  if (!result) {
126
120
  return;
127
121
  }
122
+
128
123
  if (!React.isValidElement(child)) {
129
124
  return;
130
125
  }
@@ -133,18 +128,17 @@ function every(children, func, context) {
133
128
  result = false;
134
129
  }
135
130
  });
136
-
137
131
  return result;
138
132
  }
139
133
 
140
134
  function some(children, func, context) {
141
135
  var index = 0;
142
136
  var result = false;
143
-
144
137
  React.Children.forEach(children, function (child) {
145
138
  if (result) {
146
139
  return;
147
140
  }
141
+
148
142
  if (!React.isValidElement(child)) {
149
143
  return;
150
144
  }
@@ -153,13 +147,11 @@ function some(children, func, context) {
153
147
  result = true;
154
148
  }
155
149
  });
156
-
157
150
  return result;
158
151
  }
159
152
 
160
153
  function toArray(children) {
161
154
  var result = [];
162
-
163
155
  React.Children.forEach(children, function (child) {
164
156
  if (!React.isValidElement(child)) {
165
157
  return;
@@ -167,7 +159,6 @@ function toArray(children) {
167
159
 
168
160
  result.push(child);
169
161
  });
170
-
171
162
  return result;
172
163
  }
173
164
 
@@ -1,44 +1,40 @@
1
- import _Object$entries from 'babel-runtime/core-js/object/entries';
2
- import _extends from 'babel-runtime/helpers/extends';
1
+ import _Object$entries from "@babel/runtime-corejs2/core-js/object/entries";
2
+ import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
3
3
  // TODO: The publicly exposed parts of this should be in lib/BootstrapUtils.
4
-
5
4
  import invariant from 'invariant';
6
5
  import PropTypes from 'prop-types';
7
-
8
6
  import { SIZE_MAP } from './StyleConfig';
9
7
 
10
8
  function curry(fn) {
11
9
  return function () {
12
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
10
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
13
11
  args[_key] = arguments[_key];
14
12
  }
15
13
 
16
14
  var last = args[args.length - 1];
15
+
17
16
  if (typeof last === 'function') {
18
- return fn.apply(undefined, args);
17
+ return fn.apply(void 0, args);
19
18
  }
19
+
20
20
  return function (Component) {
21
- return fn.apply(undefined, args.concat([Component]));
21
+ return fn.apply(void 0, args.concat([Component]));
22
22
  };
23
23
  };
24
24
  }
25
25
 
26
26
  export function prefix(props, variant) {
27
27
  var bsClass = (props.bsClass || '').trim();
28
- !(bsClass != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'A `bsClass` prop is required for this component') : invariant(false) : void 0;
29
- return bsClass + (variant ? '-' + variant : '');
28
+ !(bsClass != null) ? process.env.NODE_ENV !== "production" ? invariant(false, 'A `bsClass` prop is required for this component') : invariant(false) : void 0;
29
+ return bsClass + (variant ? "-" + variant : '');
30
30
  }
31
-
32
31
  export var bsClass = curry(function (defaultClass, Component) {
33
32
  var propTypes = Component.propTypes || (Component.propTypes = {});
34
33
  var defaultProps = Component.defaultProps || (Component.defaultProps = {});
35
-
36
34
  propTypes.bsClass = PropTypes.string;
37
35
  defaultProps.bsClass = defaultClass;
38
-
39
36
  return Component;
40
37
  });
41
-
42
38
  export var bsStyles = curry(function (styles, defaultStyle, Component) {
43
39
  if (typeof defaultStyle !== 'string') {
44
40
  Component = defaultStyle;
@@ -47,19 +43,15 @@ export var bsStyles = curry(function (styles, defaultStyle, Component) {
47
43
 
48
44
  var existing = Component.STYLES || [];
49
45
  var propTypes = Component.propTypes || {};
50
-
51
46
  styles.forEach(function (style) {
52
47
  if (existing.indexOf(style) === -1) {
53
48
  existing.push(style);
54
49
  }
55
50
  });
51
+ var propType = PropTypes.oneOf(existing); // expose the values on the propType function for documentation
56
52
 
57
- var propType = PropTypes.oneOf(existing);
58
-
59
- // expose the values on the propType function for documentation
60
53
  Component.STYLES = existing;
61
54
  propType._values = existing;
62
-
63
55
  Component.propTypes = _extends({}, propTypes, {
64
56
  bsStyle: propType
65
57
  });
@@ -71,7 +63,6 @@ export var bsStyles = curry(function (styles, defaultStyle, Component) {
71
63
 
72
64
  return Component;
73
65
  });
74
-
75
66
  export var bsSizes = curry(function (sizes, defaultSize, Component) {
76
67
  if (typeof defaultSize !== 'string') {
77
68
  Component = defaultSize;
@@ -80,29 +71,25 @@ export var bsSizes = curry(function (sizes, defaultSize, Component) {
80
71
 
81
72
  var existing = Component.SIZES || [];
82
73
  var propTypes = Component.propTypes || {};
83
-
84
74
  sizes.forEach(function (size) {
85
75
  if (existing.indexOf(size) === -1) {
86
76
  existing.push(size);
87
77
  }
88
78
  });
89
-
90
79
  var values = [];
91
80
  existing.forEach(function (size) {
92
81
  var mappedSize = SIZE_MAP[size];
82
+
93
83
  if (mappedSize && mappedSize !== size) {
94
84
  values.push(mappedSize);
95
85
  }
96
86
 
97
87
  values.push(size);
98
88
  });
99
-
100
89
  var propType = PropTypes.oneOf(values);
101
- propType._values = values;
90
+ propType._values = values; // expose the values on the propType function for documentation
102
91
 
103
- // expose the values on the propType function for documentation
104
92
  Component.SIZES = existing;
105
-
106
93
  Component.propTypes = _extends({}, propTypes, {
107
94
  bsSize: propType
108
95
  });
@@ -111,12 +98,12 @@ export var bsSizes = curry(function (sizes, defaultSize, Component) {
111
98
  if (!Component.defaultProps) {
112
99
  Component.defaultProps = {};
113
100
  }
101
+
114
102
  Component.defaultProps.bsSize = defaultSize;
115
103
  }
116
104
 
117
105
  return Component;
118
106
  });
119
-
120
107
  export function getClassSet(props) {
121
108
  var _classes;
122
109
 
@@ -149,6 +136,7 @@ function isBsProp(propName) {
149
136
 
150
137
  export function splitBsProps(props) {
151
138
  var elementProps = {};
139
+
152
140
  _Object$entries(props).forEach(function (_ref) {
153
141
  var propName = _ref[0],
154
142
  propValue = _ref[1];
@@ -160,14 +148,13 @@ export function splitBsProps(props) {
160
148
 
161
149
  return [getBsProps(props), elementProps];
162
150
  }
163
-
164
151
  export function splitBsPropsAndOmit(props, omittedPropNames) {
165
152
  var isOmittedProp = {};
166
153
  omittedPropNames.forEach(function (propName) {
167
154
  isOmittedProp[propName] = true;
168
155
  });
169
-
170
156
  var elementProps = {};
157
+
171
158
  _Object$entries(props).forEach(function (_ref2) {
172
159
  var propName = _ref2[0],
173
160
  propValue = _ref2[1];
@@ -179,17 +166,16 @@ export function splitBsPropsAndOmit(props, omittedPropNames) {
179
166
 
180
167
  return [getBsProps(props), elementProps];
181
168
  }
182
-
183
169
  /**
184
170
  * Add a style variant to a Component. Mutates the propTypes of the component
185
171
  * in order to validate the new variant.
186
172
  */
173
+
187
174
  export function addStyle(Component) {
188
- for (var _len2 = arguments.length, styleVariant = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
175
+ for (var _len2 = arguments.length, styleVariant = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
189
176
  styleVariant[_key2 - 1] = arguments[_key2];
190
177
  }
191
178
 
192
179
  bsStyles(styleVariant, Component);
193
180
  }
194
-
195
181
  export var _curry = curry;
@@ -8,7 +8,7 @@
8
8
  * @returns {function|null}
9
9
  */
10
10
  function createChainedFunction() {
11
- for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
11
+ for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
12
12
  funcs[_key] = arguments[_key];
13
13
  }
14
14
 
@@ -24,7 +24,7 @@ function createChainedFunction() {
24
24
  }
25
25
 
26
26
  return function chainedFunction() {
27
- for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
27
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
28
28
  args[_key2] = arguments[_key2];
29
29
  }
30
30
 
@@ -1,21 +1,17 @@
1
- import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
2
- import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
3
- import _inherits from 'babel-runtime/helpers/inherits';
4
- import _typeof from 'babel-runtime/helpers/typeof';
1
+ import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
5
2
  import warning from 'warning';
6
-
7
3
  var warned = {};
8
4
 
9
5
  function deprecationWarning(oldname, newname, link) {
10
- var message = void 0;
6
+ var message;
11
7
 
12
- if ((typeof oldname === 'undefined' ? 'undefined' : _typeof(oldname)) === 'object') {
8
+ if (typeof oldname === 'object') {
13
9
  message = oldname.message;
14
10
  } else {
15
- message = oldname + ' is deprecated. Use ' + newname + ' instead.';
11
+ message = oldname + " is deprecated. Use " + newname + " instead.";
16
12
 
17
13
  if (link) {
18
- message += '\nYou can read more about it at ' + link;
14
+ message += "\nYou can read more about it at " + link;
19
15
  }
20
16
  }
21
17
 
@@ -23,44 +19,46 @@ function deprecationWarning(oldname, newname, link) {
23
19
  return;
24
20
  }
25
21
 
26
- process.env.NODE_ENV !== 'production' ? warning(false, message) : void 0;
22
+ process.env.NODE_ENV !== "production" ? warning(false, message) : void 0;
27
23
  warned[message] = true;
28
24
  }
29
25
 
30
26
  deprecationWarning.wrapper = function (Component) {
31
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
27
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
32
28
  args[_key - 1] = arguments[_key];
33
29
  }
34
30
 
35
- return function (_Component) {
36
- _inherits(DeprecatedComponent, _Component);
31
+ return (
32
+ /*#__PURE__*/
33
+ function (_Component) {
34
+ _inheritsLoose(DeprecatedComponent, _Component);
37
35
 
38
- function DeprecatedComponent() {
39
- _classCallCheck(this, DeprecatedComponent);
36
+ function DeprecatedComponent() {
37
+ return _Component.apply(this, arguments) || this;
38
+ }
40
39
 
41
- return _possibleConstructorReturn(this, _Component.apply(this, arguments));
42
- }
40
+ var _proto = DeprecatedComponent.prototype;
43
41
 
44
- DeprecatedComponent.prototype.componentWillMount = function componentWillMount() {
45
- deprecationWarning.apply(undefined, args);
42
+ _proto.componentWillMount = function componentWillMount() {
43
+ deprecationWarning.apply(void 0, args);
46
44
 
47
- if (_Component.prototype.componentWillMount) {
48
- var _Component$prototype$;
45
+ if (_Component.prototype.componentWillMount) {
46
+ var _Component$prototype$;
49
47
 
50
- for (var _len2 = arguments.length, methodArgs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
51
- methodArgs[_key2] = arguments[_key2];
52
- }
48
+ for (var _len2 = arguments.length, methodArgs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
49
+ methodArgs[_key2] = arguments[_key2];
50
+ }
53
51
 
54
- (_Component$prototype$ = _Component.prototype.componentWillMount).call.apply(_Component$prototype$, [this].concat(methodArgs));
55
- }
56
- };
52
+ (_Component$prototype$ = _Component.prototype.componentWillMount).call.apply(_Component$prototype$, [this].concat(methodArgs));
53
+ }
54
+ };
57
55
 
58
- return DeprecatedComponent;
59
- }(Component);
56
+ return DeprecatedComponent;
57
+ }(Component)
58
+ );
60
59
  };
61
60
 
62
61
  export default deprecationWarning;
63
-
64
62
  export function _resetWarned() {
65
63
  warned = {};
66
64
  }
@@ -1,7 +1,6 @@
1
- import _Object$entries from "babel-runtime/core-js/object/entries";
1
+ import _Object$entries from "@babel/runtime-corejs2/core-js/object/entries";
2
2
  export default function splitComponentProps(props, Component) {
3
3
  var componentPropTypes = Component.propTypes;
4
-
5
4
  var parentProps = {};
6
5
  var childProps = {};
7
6
 
package/lib/Accordion.js CHANGED
@@ -1,51 +1,38 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
4
-
5
- var _extends2 = require('babel-runtime/helpers/extends');
6
-
7
- var _extends3 = _interopRequireDefault(_extends2);
8
-
9
- var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
10
-
11
- var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
12
-
13
- var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
3
+ var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
14
4
 
15
- var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
16
-
17
- var _inherits2 = require('babel-runtime/helpers/inherits');
18
-
19
- var _inherits3 = _interopRequireDefault(_inherits2);
20
-
21
- var _react = require('react');
5
+ exports.__esModule = true;
6
+ exports.default = void 0;
22
7
 
23
- var _react2 = _interopRequireDefault(_react);
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/extends"));
24
9
 
25
- var _PanelGroup = require('./PanelGroup');
10
+ var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inheritsLoose"));
26
11
 
27
- var _PanelGroup2 = _interopRequireDefault(_PanelGroup);
12
+ var _react = _interopRequireDefault(require("react"));
28
13
 
29
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ var _PanelGroup = _interopRequireDefault(require("./PanelGroup"));
30
15
 
31
- var Accordion = function (_React$Component) {
32
- (0, _inherits3.default)(Accordion, _React$Component);
16
+ var Accordion =
17
+ /*#__PURE__*/
18
+ function (_React$Component) {
19
+ (0, _inheritsLoose2.default)(Accordion, _React$Component);
33
20
 
34
21
  function Accordion() {
35
- (0, _classCallCheck3.default)(this, Accordion);
36
- return (0, _possibleConstructorReturn3.default)(this, _React$Component.apply(this, arguments));
22
+ return _React$Component.apply(this, arguments) || this;
37
23
  }
38
24
 
39
- Accordion.prototype.render = function render() {
40
- return _react2.default.createElement(
41
- _PanelGroup2.default,
42
- (0, _extends3.default)({}, this.props, { accordion: true }),
43
- this.props.children
44
- );
25
+ var _proto = Accordion.prototype;
26
+
27
+ _proto.render = function render() {
28
+ return _react.default.createElement(_PanelGroup.default, (0, _extends2.default)({}, this.props, {
29
+ accordion: true
30
+ }), this.props.children);
45
31
  };
46
32
 
47
33
  return Accordion;
48
- }(_react2.default.Component);
34
+ }(_react.default.Component);
49
35
 
50
- exports.default = Accordion;
51
- module.exports = exports['default'];
36
+ var _default = Accordion;
37
+ exports.default = _default;
38
+ module.exports = exports["default"];
package/lib/Alert.js CHANGED
@@ -1,103 +1,81 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
4
-
5
- var _values = require('babel-runtime/core-js/object/values');
6
-
7
- var _values2 = _interopRequireDefault(_values);
8
-
9
- var _extends3 = require('babel-runtime/helpers/extends');
10
-
11
- var _extends4 = _interopRequireDefault(_extends3);
12
-
13
- var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
14
-
15
- var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
16
-
17
- var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
18
-
19
- var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
3
+ var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
20
4
 
21
- var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
22
-
23
- var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
24
-
25
- var _inherits2 = require('babel-runtime/helpers/inherits');
26
-
27
- var _inherits3 = _interopRequireDefault(_inherits2);
28
-
29
- var _classnames = require('classnames');
5
+ exports.__esModule = true;
6
+ exports.default = void 0;
30
7
 
31
- var _classnames2 = _interopRequireDefault(_classnames);
8
+ var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
32
9
 
33
- var _react = require('react');
10
+ var _extends3 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/extends"));
34
11
 
35
- var _react2 = _interopRequireDefault(_react);
12
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/objectWithoutPropertiesLoose"));
36
13
 
37
- var _propTypes = require('prop-types');
14
+ var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inheritsLoose"));
38
15
 
39
- var _propTypes2 = _interopRequireDefault(_propTypes);
16
+ var _classnames = _interopRequireDefault(require("classnames"));
40
17
 
41
- var _bootstrapUtils = require('./utils/bootstrapUtils');
18
+ var _react = _interopRequireDefault(require("react"));
42
19
 
43
- var _StyleConfig = require('./utils/StyleConfig');
20
+ var _propTypes = _interopRequireDefault(require("prop-types"));
44
21
 
45
- var _CloseButton = require('./CloseButton');
22
+ var _bootstrapUtils = require("./utils/bootstrapUtils");
46
23
 
47
- var _CloseButton2 = _interopRequireDefault(_CloseButton);
24
+ var _StyleConfig = require("./utils/StyleConfig");
48
25
 
49
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26
+ var _CloseButton = _interopRequireDefault(require("./CloseButton"));
50
27
 
51
28
  var propTypes = {
52
- onDismiss: _propTypes2.default.func,
53
- closeLabel: _propTypes2.default.string
29
+ onDismiss: _propTypes.default.func,
30
+ closeLabel: _propTypes.default.string
54
31
  };
55
-
56
32
  var defaultProps = {
57
33
  closeLabel: 'Close alert'
58
34
  };
59
35
 
60
- var Alert = function (_React$Component) {
61
- (0, _inherits3.default)(Alert, _React$Component);
36
+ var Alert =
37
+ /*#__PURE__*/
38
+ function (_React$Component) {
39
+ (0, _inheritsLoose2.default)(Alert, _React$Component);
62
40
 
63
41
  function Alert() {
64
- (0, _classCallCheck3.default)(this, Alert);
65
- return (0, _possibleConstructorReturn3.default)(this, _React$Component.apply(this, arguments));
42
+ return _React$Component.apply(this, arguments) || this;
66
43
  }
67
44
 
68
- Alert.prototype.render = function render() {
45
+ var _proto = Alert.prototype;
46
+
47
+ _proto.render = function render() {
69
48
  var _extends2;
70
49
 
71
- var _props = this.props,
72
- onDismiss = _props.onDismiss,
73
- closeLabel = _props.closeLabel,
74
- className = _props.className,
75
- children = _props.children,
76
- props = (0, _objectWithoutProperties3.default)(_props, ['onDismiss', 'closeLabel', 'className', 'children']);
50
+ var _this$props = this.props,
51
+ onDismiss = _this$props.onDismiss,
52
+ closeLabel = _this$props.closeLabel,
53
+ className = _this$props.className,
54
+ children = _this$props.children,
55
+ props = (0, _objectWithoutPropertiesLoose2.default)(_this$props, ["onDismiss", "closeLabel", "className", "children"]);
77
56
 
78
57
  var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props),
79
58
  bsProps = _splitBsProps[0],
80
59
  elementProps = _splitBsProps[1];
81
60
 
82
61
  var dismissable = !!onDismiss;
83
- var classes = (0, _extends4.default)({}, (0, _bootstrapUtils.getClassSet)(bsProps), (_extends2 = {}, _extends2[(0, _bootstrapUtils.prefix)(bsProps, 'dismissable')] = dismissable, _extends2));
84
-
85
- return _react2.default.createElement(
86
- 'div',
87
- (0, _extends4.default)({}, elementProps, {
88
- role: 'alert',
89
- className: (0, _classnames2.default)(className, classes)
90
- }),
91
- dismissable && _react2.default.createElement(_CloseButton2.default, { onClick: onDismiss, label: closeLabel }),
92
- children
93
- );
62
+ var classes = (0, _extends3.default)({}, (0, _bootstrapUtils.getClassSet)(bsProps), (_extends2 = {}, _extends2[(0, _bootstrapUtils.prefix)(bsProps, 'dismissable')] = dismissable, _extends2));
63
+ return _react.default.createElement("div", (0, _extends3.default)({}, elementProps, {
64
+ role: "alert",
65
+ className: (0, _classnames.default)(className, classes)
66
+ }), dismissable && _react.default.createElement(_CloseButton.default, {
67
+ onClick: onDismiss,
68
+ label: closeLabel
69
+ }), children);
94
70
  };
95
71
 
96
72
  return Alert;
97
- }(_react2.default.Component);
73
+ }(_react.default.Component);
98
74
 
99
75
  Alert.propTypes = propTypes;
100
76
  Alert.defaultProps = defaultProps;
101
77
 
102
- exports.default = (0, _bootstrapUtils.bsStyles)((0, _values2.default)(_StyleConfig.State), _StyleConfig.State.INFO, (0, _bootstrapUtils.bsClass)('alert', Alert));
103
- module.exports = exports['default'];
78
+ var _default = (0, _bootstrapUtils.bsStyles)((0, _values.default)(_StyleConfig.State), _StyleConfig.State.INFO, (0, _bootstrapUtils.bsClass)('alert', Alert));
79
+
80
+ exports.default = _default;
81
+ module.exports = exports["default"];