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,13 +1,14 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- var Size = exports.Size = {
4
+ exports.Style = exports.State = exports.DEVICE_SIZES = exports.SIZE_MAP = exports.Size = void 0;
5
+ var Size = {
5
6
  LARGE: 'large',
6
7
  SMALL: 'small',
7
8
  XSMALL: 'xsmall'
8
9
  };
9
-
10
- var SIZE_MAP = exports.SIZE_MAP = {
10
+ exports.Size = Size;
11
+ var SIZE_MAP = {
11
12
  large: 'lg',
12
13
  medium: 'md',
13
14
  small: 'sm',
@@ -17,19 +18,20 @@ var SIZE_MAP = exports.SIZE_MAP = {
17
18
  sm: 'sm',
18
19
  xs: 'xs'
19
20
  };
20
-
21
- var DEVICE_SIZES = exports.DEVICE_SIZES = ['lg', 'md', 'sm', 'xs'];
22
-
23
- var State = exports.State = {
21
+ exports.SIZE_MAP = SIZE_MAP;
22
+ var DEVICE_SIZES = ['lg', 'md', 'sm', 'xs'];
23
+ exports.DEVICE_SIZES = DEVICE_SIZES;
24
+ var State = {
24
25
  SUCCESS: 'success',
25
26
  WARNING: 'warning',
26
27
  DANGER: 'danger',
27
28
  INFO: 'info'
28
29
  };
29
-
30
- var Style = exports.Style = {
30
+ exports.State = State;
31
+ var Style = {
31
32
  DEFAULT: 'default',
32
33
  PRIMARY: 'primary',
33
34
  LINK: 'link',
34
35
  INVERSE: 'inverse'
35
- };
36
+ };
37
+ exports.Style = Style;
@@ -1,12 +1,13 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
4
4
 
5
- var _react = require('react');
5
+ exports.__esModule = true;
6
+ exports.default = void 0;
6
7
 
7
- var _react2 = _interopRequireDefault(_react);
8
+ var _react = _interopRequireDefault(require("react"));
8
9
 
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ // TODO: This module should be ElementChildren, and should use named exports.
10
11
 
11
12
  /**
12
13
  * Iterates through children that are typically specified as `props.children`,
@@ -22,16 +23,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
22
23
  */
23
24
  function map(children, func, context) {
24
25
  var index = 0;
25
-
26
- return _react2.default.Children.map(children, function (child) {
27
- if (!_react2.default.isValidElement(child)) {
26
+ return _react.default.Children.map(children, function (child) {
27
+ if (!_react.default.isValidElement(child)) {
28
28
  return child;
29
29
  }
30
30
 
31
31
  return func.call(context, child, index++);
32
32
  });
33
33
  }
34
-
35
34
  /**
36
35
  * Iterates through children that are "valid components".
37
36
  *
@@ -42,31 +41,32 @@ function map(children, func, context) {
42
41
  * @param {function(*, int)} func.
43
42
  * @param {*} context Context for context.
44
43
  */
45
- // TODO: This module should be ElementChildren, and should use named exports.
44
+
46
45
 
47
46
  function forEach(children, func, context) {
48
47
  var index = 0;
49
48
 
50
- _react2.default.Children.forEach(children, function (child) {
51
- if (!_react2.default.isValidElement(child)) {
49
+ _react.default.Children.forEach(children, function (child) {
50
+ if (!_react.default.isValidElement(child)) {
52
51
  return;
53
52
  }
54
53
 
55
54
  func.call(context, child, index++);
56
55
  });
57
56
  }
58
-
59
57
  /**
60
58
  * Count the number of "valid components" in the Children container.
61
59
  *
62
60
  * @param {?*} children Children tree container.
63
61
  * @returns {number}
64
62
  */
63
+
64
+
65
65
  function count(children) {
66
66
  var result = 0;
67
67
 
68
- _react2.default.Children.forEach(children, function (child) {
69
- if (!_react2.default.isValidElement(child)) {
68
+ _react.default.Children.forEach(children, function (child) {
69
+ if (!_react.default.isValidElement(child)) {
70
70
  return;
71
71
  }
72
72
 
@@ -75,7 +75,6 @@ function count(children) {
75
75
 
76
76
  return result;
77
77
  }
78
-
79
78
  /**
80
79
  * Finds children that are typically specified as `props.children`,
81
80
  * but only iterates over children that are "valid components".
@@ -88,12 +87,14 @@ function count(children) {
88
87
  * @param {*} context Context for func.
89
88
  * @returns {array} of children that meet the func return statement
90
89
  */
90
+
91
+
91
92
  function filter(children, func, context) {
92
93
  var index = 0;
93
94
  var result = [];
94
95
 
95
- _react2.default.Children.forEach(children, function (child) {
96
- if (!_react2.default.isValidElement(child)) {
96
+ _react.default.Children.forEach(children, function (child) {
97
+ if (!_react.default.isValidElement(child)) {
97
98
  return;
98
99
  }
99
100
 
@@ -107,13 +108,14 @@ function filter(children, func, context) {
107
108
 
108
109
  function find(children, func, context) {
109
110
  var index = 0;
110
- var result = void 0;
111
+ var result;
111
112
 
112
- _react2.default.Children.forEach(children, function (child) {
113
+ _react.default.Children.forEach(children, function (child) {
113
114
  if (result) {
114
115
  return;
115
116
  }
116
- if (!_react2.default.isValidElement(child)) {
117
+
118
+ if (!_react.default.isValidElement(child)) {
117
119
  return;
118
120
  }
119
121
 
@@ -129,11 +131,12 @@ function every(children, func, context) {
129
131
  var index = 0;
130
132
  var result = true;
131
133
 
132
- _react2.default.Children.forEach(children, function (child) {
134
+ _react.default.Children.forEach(children, function (child) {
133
135
  if (!result) {
134
136
  return;
135
137
  }
136
- if (!_react2.default.isValidElement(child)) {
138
+
139
+ if (!_react.default.isValidElement(child)) {
137
140
  return;
138
141
  }
139
142
 
@@ -149,11 +152,12 @@ function some(children, func, context) {
149
152
  var index = 0;
150
153
  var result = false;
151
154
 
152
- _react2.default.Children.forEach(children, function (child) {
155
+ _react.default.Children.forEach(children, function (child) {
153
156
  if (result) {
154
157
  return;
155
158
  }
156
- if (!_react2.default.isValidElement(child)) {
159
+
160
+ if (!_react.default.isValidElement(child)) {
157
161
  return;
158
162
  }
159
163
 
@@ -168,8 +172,8 @@ function some(children, func, context) {
168
172
  function toArray(children) {
169
173
  var result = [];
170
174
 
171
- _react2.default.Children.forEach(children, function (child) {
172
- if (!_react2.default.isValidElement(child)) {
175
+ _react.default.Children.forEach(children, function (child) {
176
+ if (!_react.default.isValidElement(child)) {
173
177
  return;
174
178
  }
175
179
 
@@ -179,7 +183,7 @@ function toArray(children) {
179
183
  return result;
180
184
  }
181
185
 
182
- exports.default = {
186
+ var _default = {
183
187
  map: map,
184
188
  forEach: forEach,
185
189
  count: count,
@@ -189,4 +193,5 @@ exports.default = {
189
193
  some: some,
190
194
  toArray: toArray
191
195
  };
192
- module.exports = exports['default'];
196
+ exports.default = _default;
197
+ module.exports = exports["default"];
@@ -1,67 +1,59 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
4
- exports._curry = exports.bsSizes = exports.bsStyles = exports.bsClass = undefined;
5
-
6
- var _entries = require('babel-runtime/core-js/object/entries');
7
-
8
- var _entries2 = _interopRequireDefault(_entries);
9
-
10
- var _extends2 = require('babel-runtime/helpers/extends');
11
-
12
- var _extends3 = _interopRequireDefault(_extends2);
3
+ var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
13
4
 
5
+ exports.__esModule = true;
14
6
  exports.prefix = prefix;
15
7
  exports.getClassSet = getClassSet;
16
8
  exports.splitBsProps = splitBsProps;
17
9
  exports.splitBsPropsAndOmit = splitBsPropsAndOmit;
18
10
  exports.addStyle = addStyle;
11
+ exports._curry = exports.bsSizes = exports.bsStyles = exports.bsClass = void 0;
19
12
 
20
- var _invariant = require('invariant');
13
+ var _entries = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/entries"));
21
14
 
22
- var _invariant2 = _interopRequireDefault(_invariant);
15
+ var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/extends"));
23
16
 
24
- var _propTypes = require('prop-types');
17
+ var _invariant = _interopRequireDefault(require("invariant"));
25
18
 
26
- var _propTypes2 = _interopRequireDefault(_propTypes);
19
+ var _propTypes = _interopRequireDefault(require("prop-types"));
27
20
 
28
- var _StyleConfig = require('./StyleConfig');
29
-
30
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
+ var _StyleConfig = require("./StyleConfig");
31
22
 
23
+ // TODO: The publicly exposed parts of this should be in lib/BootstrapUtils.
32
24
  function curry(fn) {
33
25
  return function () {
34
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
26
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
35
27
  args[_key] = arguments[_key];
36
28
  }
37
29
 
38
30
  var last = args[args.length - 1];
31
+
39
32
  if (typeof last === 'function') {
40
- return fn.apply(undefined, args);
33
+ return fn.apply(void 0, args);
41
34
  }
35
+
42
36
  return function (Component) {
43
- return fn.apply(undefined, args.concat([Component]));
37
+ return fn.apply(void 0, args.concat([Component]));
44
38
  };
45
39
  };
46
- } // TODO: The publicly exposed parts of this should be in lib/BootstrapUtils.
40
+ }
47
41
 
48
42
  function prefix(props, variant) {
49
43
  var bsClass = (props.bsClass || '').trim();
50
- !(bsClass != null) ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'A `bsClass` prop is required for this component') : (0, _invariant2.default)(false) : void 0;
51
- return bsClass + (variant ? '-' + variant : '');
44
+ !(bsClass != null) ? process.env.NODE_ENV !== "production" ? (0, _invariant.default)(false, 'A `bsClass` prop is required for this component') : invariant(false) : void 0;
45
+ return bsClass + (variant ? "-" + variant : '');
52
46
  }
53
47
 
54
- var bsClass = exports.bsClass = curry(function (defaultClass, Component) {
48
+ var bsClass = curry(function (defaultClass, Component) {
55
49
  var propTypes = Component.propTypes || (Component.propTypes = {});
56
50
  var defaultProps = Component.defaultProps || (Component.defaultProps = {});
57
-
58
- propTypes.bsClass = _propTypes2.default.string;
51
+ propTypes.bsClass = _propTypes.default.string;
59
52
  defaultProps.bsClass = defaultClass;
60
-
61
53
  return Component;
62
54
  });
63
-
64
- var bsStyles = exports.bsStyles = curry(function (styles, defaultStyle, Component) {
55
+ exports.bsClass = bsClass;
56
+ var bsStyles = curry(function (styles, defaultStyle, Component) {
65
57
  if (typeof defaultStyle !== 'string') {
66
58
  Component = defaultStyle;
67
59
  defaultStyle = undefined;
@@ -69,20 +61,18 @@ var bsStyles = exports.bsStyles = curry(function (styles, defaultStyle, Componen
69
61
 
70
62
  var existing = Component.STYLES || [];
71
63
  var propTypes = Component.propTypes || {};
72
-
73
64
  styles.forEach(function (style) {
74
65
  if (existing.indexOf(style) === -1) {
75
66
  existing.push(style);
76
67
  }
77
68
  });
78
69
 
79
- var propType = _propTypes2.default.oneOf(existing);
70
+ var propType = _propTypes.default.oneOf(existing); // expose the values on the propType function for documentation
71
+
80
72
 
81
- // expose the values on the propType function for documentation
82
73
  Component.STYLES = existing;
83
74
  propType._values = existing;
84
-
85
- Component.propTypes = (0, _extends3.default)({}, propTypes, {
75
+ Component.propTypes = (0, _extends2.default)({}, propTypes, {
86
76
  bsStyle: propType
87
77
  });
88
78
 
@@ -93,8 +83,8 @@ var bsStyles = exports.bsStyles = curry(function (styles, defaultStyle, Componen
93
83
 
94
84
  return Component;
95
85
  });
96
-
97
- var bsSizes = exports.bsSizes = curry(function (sizes, defaultSize, Component) {
86
+ exports.bsStyles = bsStyles;
87
+ var bsSizes = curry(function (sizes, defaultSize, Component) {
98
88
  if (typeof defaultSize !== 'string') {
99
89
  Component = defaultSize;
100
90
  defaultSize = undefined;
@@ -102,16 +92,15 @@ var bsSizes = exports.bsSizes = curry(function (sizes, defaultSize, Component) {
102
92
 
103
93
  var existing = Component.SIZES || [];
104
94
  var propTypes = Component.propTypes || {};
105
-
106
95
  sizes.forEach(function (size) {
107
96
  if (existing.indexOf(size) === -1) {
108
97
  existing.push(size);
109
98
  }
110
99
  });
111
-
112
100
  var values = [];
113
101
  existing.forEach(function (size) {
114
102
  var mappedSize = _StyleConfig.SIZE_MAP[size];
103
+
115
104
  if (mappedSize && mappedSize !== size) {
116
105
  values.push(mappedSize);
117
106
  }
@@ -119,13 +108,12 @@ var bsSizes = exports.bsSizes = curry(function (sizes, defaultSize, Component) {
119
108
  values.push(size);
120
109
  });
121
110
 
122
- var propType = _propTypes2.default.oneOf(values);
123
- propType._values = values;
111
+ var propType = _propTypes.default.oneOf(values);
124
112
 
125
- // expose the values on the propType function for documentation
126
- Component.SIZES = existing;
113
+ propType._values = values; // expose the values on the propType function for documentation
127
114
 
128
- Component.propTypes = (0, _extends3.default)({}, propTypes, {
115
+ Component.SIZES = existing;
116
+ Component.propTypes = (0, _extends2.default)({}, propTypes, {
129
117
  bsSize: propType
130
118
  });
131
119
 
@@ -133,11 +121,13 @@ var bsSizes = exports.bsSizes = curry(function (sizes, defaultSize, Component) {
133
121
  if (!Component.defaultProps) {
134
122
  Component.defaultProps = {};
135
123
  }
124
+
136
125
  Component.defaultProps.bsSize = defaultSize;
137
126
  }
138
127
 
139
128
  return Component;
140
129
  });
130
+ exports.bsSizes = bsSizes;
141
131
 
142
132
  function getClassSet(props) {
143
133
  var _classes;
@@ -171,7 +161,7 @@ function isBsProp(propName) {
171
161
 
172
162
  function splitBsProps(props) {
173
163
  var elementProps = {};
174
- (0, _entries2.default)(props).forEach(function (_ref) {
164
+ (0, _entries.default)(props).forEach(function (_ref) {
175
165
  var propName = _ref[0],
176
166
  propValue = _ref[1];
177
167
 
@@ -179,7 +169,6 @@ function splitBsProps(props) {
179
169
  elementProps[propName] = propValue;
180
170
  }
181
171
  });
182
-
183
172
  return [getBsProps(props), elementProps];
184
173
  }
185
174
 
@@ -188,9 +177,8 @@ function splitBsPropsAndOmit(props, omittedPropNames) {
188
177
  omittedPropNames.forEach(function (propName) {
189
178
  isOmittedProp[propName] = true;
190
179
  });
191
-
192
180
  var elementProps = {};
193
- (0, _entries2.default)(props).forEach(function (_ref2) {
181
+ (0, _entries.default)(props).forEach(function (_ref2) {
194
182
  var propName = _ref2[0],
195
183
  propValue = _ref2[1];
196
184
 
@@ -198,20 +186,21 @@ function splitBsPropsAndOmit(props, omittedPropNames) {
198
186
  elementProps[propName] = propValue;
199
187
  }
200
188
  });
201
-
202
189
  return [getBsProps(props), elementProps];
203
190
  }
204
-
205
191
  /**
206
192
  * Add a style variant to a Component. Mutates the propTypes of the component
207
193
  * in order to validate the new variant.
208
194
  */
195
+
196
+
209
197
  function addStyle(Component) {
210
- for (var _len2 = arguments.length, styleVariant = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
198
+ for (var _len2 = arguments.length, styleVariant = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
211
199
  styleVariant[_key2 - 1] = arguments[_key2];
212
200
  }
213
201
 
214
202
  bsStyles(styleVariant, Component);
215
203
  }
216
204
 
217
- var _curry = exports._curry = curry;
205
+ var _curry = curry;
206
+ exports._curry = _curry;
@@ -2,7 +2,9 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.default = capitalize;
5
+
5
6
  function capitalize(string) {
6
7
  return "" + string.charAt(0).toUpperCase() + string.slice(1);
7
8
  }
9
+
8
10
  module.exports = exports["default"];
@@ -1,6 +1,8 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
+ exports.default = void 0;
5
+
4
6
  /**
5
7
  * Safe chained function
6
8
  *
@@ -11,7 +13,7 @@ exports.__esModule = true;
11
13
  * @returns {function|null}
12
14
  */
13
15
  function createChainedFunction() {
14
- for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
16
+ for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
15
17
  funcs[_key] = arguments[_key];
16
18
  }
17
19
 
@@ -27,7 +29,7 @@ function createChainedFunction() {
27
29
  }
28
30
 
29
31
  return function chainedFunction() {
30
- for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
32
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
31
33
  args[_key2] = arguments[_key2];
32
34
  }
33
35
 
@@ -37,5 +39,6 @@ function createChainedFunction() {
37
39
  }, null);
38
40
  }
39
41
 
40
- exports.default = createChainedFunction;
41
- module.exports = exports['default'];
42
+ var _default = createChainedFunction;
43
+ exports.default = _default;
44
+ module.exports = exports["default"];
@@ -1,43 +1,27 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
4
-
5
- var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
6
-
7
- var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
8
-
9
- var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
10
-
11
- var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
12
-
13
- var _inherits2 = require('babel-runtime/helpers/inherits');
14
-
15
- var _inherits3 = _interopRequireDefault(_inherits2);
16
-
17
- var _typeof2 = require('babel-runtime/helpers/typeof');
18
-
19
- var _typeof3 = _interopRequireDefault(_typeof2);
3
+ var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
20
4
 
5
+ exports.__esModule = true;
21
6
  exports._resetWarned = _resetWarned;
7
+ exports.default = void 0;
22
8
 
23
- var _warning = require('warning');
24
-
25
- var _warning2 = _interopRequireDefault(_warning);
9
+ var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inheritsLoose"));
26
10
 
27
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ var _warning = _interopRequireDefault(require("warning"));
28
12
 
29
13
  var warned = {};
30
14
 
31
15
  function deprecationWarning(oldname, newname, link) {
32
- var message = void 0;
16
+ var message;
33
17
 
34
- if ((typeof oldname === 'undefined' ? 'undefined' : (0, _typeof3.default)(oldname)) === 'object') {
18
+ if (typeof oldname === 'object') {
35
19
  message = oldname.message;
36
20
  } else {
37
- message = oldname + ' is deprecated. Use ' + newname + ' instead.';
21
+ message = oldname + " is deprecated. Use " + newname + " instead.";
38
22
 
39
23
  if (link) {
40
- message += '\nYou can read more about it at ' + link;
24
+ message += "\nYou can read more about it at " + link;
41
25
  }
42
26
  }
43
27
 
@@ -45,42 +29,48 @@ function deprecationWarning(oldname, newname, link) {
45
29
  return;
46
30
  }
47
31
 
48
- process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(false, message) : void 0;
32
+ process.env.NODE_ENV !== "production" ? (0, _warning.default)(false, message) : void 0;
49
33
  warned[message] = true;
50
34
  }
51
35
 
52
36
  deprecationWarning.wrapper = function (Component) {
53
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
37
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
54
38
  args[_key - 1] = arguments[_key];
55
39
  }
56
40
 
57
- return function (_Component) {
58
- (0, _inherits3.default)(DeprecatedComponent, _Component);
41
+ return (
42
+ /*#__PURE__*/
43
+ function (_Component) {
44
+ (0, _inheritsLoose2.default)(DeprecatedComponent, _Component);
59
45
 
60
- function DeprecatedComponent() {
61
- (0, _classCallCheck3.default)(this, DeprecatedComponent);
62
- return (0, _possibleConstructorReturn3.default)(this, _Component.apply(this, arguments));
63
- }
46
+ function DeprecatedComponent() {
47
+ return _Component.apply(this, arguments) || this;
48
+ }
64
49
 
65
- DeprecatedComponent.prototype.componentWillMount = function componentWillMount() {
66
- deprecationWarning.apply(undefined, args);
50
+ var _proto = DeprecatedComponent.prototype;
67
51
 
68
- if (_Component.prototype.componentWillMount) {
69
- var _Component$prototype$;
52
+ _proto.componentWillMount = function componentWillMount() {
53
+ deprecationWarning.apply(void 0, args);
70
54
 
71
- for (var _len2 = arguments.length, methodArgs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
72
- methodArgs[_key2] = arguments[_key2];
73
- }
55
+ if (_Component.prototype.componentWillMount) {
56
+ var _Component$prototype$;
74
57
 
75
- (_Component$prototype$ = _Component.prototype.componentWillMount).call.apply(_Component$prototype$, [this].concat(methodArgs));
76
- }
77
- };
58
+ for (var _len2 = arguments.length, methodArgs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
59
+ methodArgs[_key2] = arguments[_key2];
60
+ }
61
+
62
+ (_Component$prototype$ = _Component.prototype.componentWillMount).call.apply(_Component$prototype$, [this].concat(methodArgs));
63
+ }
64
+ };
78
65
 
79
- return DeprecatedComponent;
80
- }(Component);
66
+ return DeprecatedComponent;
67
+ }(Component)
68
+ );
81
69
  };
82
70
 
83
- exports.default = deprecationWarning;
71
+ var _default = deprecationWarning;
72
+ exports.default = _default;
73
+
84
74
  function _resetWarned() {
85
75
  warned = {};
86
76
  }
@@ -1,24 +1,20 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
4
- exports.ValidComponentChildren = exports.createChainedFunction = exports.bootstrapUtils = undefined;
5
-
6
- var _bootstrapUtils2 = require('./bootstrapUtils');
3
+ var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
7
4
 
8
- var _bootstrapUtils = _interopRequireWildcard(_bootstrapUtils2);
5
+ var _interopRequireWildcard = require("@babel/runtime-corejs2/helpers/interopRequireWildcard");
9
6
 
10
- var _createChainedFunction2 = require('./createChainedFunction');
7
+ exports.__esModule = true;
8
+ exports.bootstrapUtils = void 0;
11
9
 
12
- var _createChainedFunction3 = _interopRequireDefault(_createChainedFunction2);
10
+ var _bootstrapUtils = _interopRequireWildcard(require("./bootstrapUtils"));
13
11
 
14
- var _ValidComponentChildren2 = require('./ValidComponentChildren');
12
+ exports.bootstrapUtils = _bootstrapUtils;
15
13
 
16
- var _ValidComponentChildren3 = _interopRequireDefault(_ValidComponentChildren2);
14
+ var _createChainedFunction2 = _interopRequireDefault(require("./createChainedFunction"));
17
15
 
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+ exports.createChainedFunction = _createChainedFunction2.default;
19
17
 
20
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
18
+ var _ValidComponentChildren2 = _interopRequireDefault(require("./ValidComponentChildren"));
21
19
 
22
- exports.bootstrapUtils = _bootstrapUtils;
23
- exports.createChainedFunction = _createChainedFunction3.default;
24
- exports.ValidComponentChildren = _ValidComponentChildren3.default;
20
+ exports.ValidComponentChildren = _ValidComponentChildren2.default;