react-bootstrap 1.6.0 → 1.6.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 (212) hide show
  1. package/cjs/AbstractNav.js +3 -1
  2. package/cjs/AbstractNavItem.js +3 -1
  3. package/cjs/Accordion.js +3 -1
  4. package/cjs/AccordionCollapse.js +3 -1
  5. package/cjs/AccordionToggle.js +3 -1
  6. package/cjs/Alert.js +2 -1
  7. package/cjs/Anchor.d.ts +3 -0
  8. package/cjs/Badge.js +2 -1
  9. package/cjs/Breadcrumb.js +2 -1
  10. package/cjs/BreadcrumbItem.js +2 -1
  11. package/cjs/Button.js +2 -1
  12. package/cjs/ButtonGroup.js +2 -1
  13. package/cjs/ButtonToolbar.js +2 -1
  14. package/cjs/Card.js +3 -1
  15. package/cjs/CardImg.js +2 -1
  16. package/cjs/Carousel.js +3 -1
  17. package/cjs/CarouselItem.js +3 -1
  18. package/cjs/CloseButton.js +2 -1
  19. package/cjs/Col.js +2 -1
  20. package/cjs/Collapse.d.ts +1 -2
  21. package/cjs/Collapse.js +3 -1
  22. package/cjs/Container.js +2 -1
  23. package/cjs/Dropdown.js +3 -1
  24. package/cjs/DropdownButton.js +3 -1
  25. package/cjs/DropdownContext.d.ts +10 -0
  26. package/cjs/DropdownItem.js +3 -1
  27. package/cjs/DropdownMenu.js +3 -1
  28. package/cjs/DropdownToggle.js +3 -1
  29. package/cjs/Fade.js +3 -1
  30. package/cjs/Feedback.js +2 -1
  31. package/cjs/FigureImage.js +3 -1
  32. package/cjs/FloatingLabel.d.ts +9 -0
  33. package/cjs/Form.js +2 -1
  34. package/cjs/FormCheck.js +3 -1
  35. package/cjs/FormCheckInput.js +3 -1
  36. package/cjs/FormCheckLabel.js +3 -1
  37. package/cjs/FormControl.js +3 -1
  38. package/cjs/FormFile.js +3 -1
  39. package/cjs/FormFileInput.js +3 -1
  40. package/cjs/FormFileLabel.js +3 -1
  41. package/cjs/FormFloating.d.ts +2 -0
  42. package/cjs/FormGroup.js +3 -1
  43. package/cjs/FormLabel.js +4 -1
  44. package/cjs/FormText.js +3 -1
  45. package/cjs/Image.js +2 -1
  46. package/cjs/InputGroup.d.ts +5 -7
  47. package/cjs/InputGroup.js +8 -9
  48. package/cjs/InputGroupContext.d.ts +3 -0
  49. package/cjs/Jumbotron.js +2 -1
  50. package/cjs/ListGroup.js +2 -1
  51. package/cjs/ListGroupItem.js +3 -1
  52. package/cjs/Media.js +2 -1
  53. package/cjs/Modal.d.ts +3 -2
  54. package/cjs/Modal.js +19 -32
  55. package/cjs/ModalDialog.js +3 -1
  56. package/cjs/ModalHeader.js +3 -1
  57. package/cjs/Nav.js +3 -1
  58. package/cjs/NavDropdown.js +3 -1
  59. package/cjs/NavItem.js +3 -1
  60. package/cjs/NavLink.js +2 -1
  61. package/cjs/Navbar.js +3 -1
  62. package/cjs/NavbarBrand.js +3 -1
  63. package/cjs/NavbarCollapse.js +3 -1
  64. package/cjs/NavbarToggle.js +3 -1
  65. package/cjs/Offcanvas.d.ts +2 -2
  66. package/cjs/OffcanvasToggling.d.ts +2 -1
  67. package/cjs/Overlay.js +5 -2
  68. package/cjs/OverlayTrigger.js +3 -1
  69. package/cjs/PageItem.js +4 -3
  70. package/cjs/Pagination.js +3 -1
  71. package/cjs/Placeholder.d.ts +8 -0
  72. package/cjs/PlaceholderButton.d.ts +8 -0
  73. package/cjs/Popover.js +2 -1
  74. package/cjs/PopoverContent.js +3 -1
  75. package/cjs/PopoverTitle.js +3 -1
  76. package/cjs/ProgressBar.js +7 -3
  77. package/cjs/Ratio.d.ts +9 -0
  78. package/cjs/ResponsiveEmbed.js +2 -1
  79. package/cjs/Row.js +2 -1
  80. package/cjs/SSRProvider.d.ts +4 -0
  81. package/cjs/SafeAnchor.d.ts +0 -1
  82. package/cjs/SafeAnchor.js +3 -1
  83. package/cjs/Spinner.d.ts +0 -1
  84. package/cjs/Spinner.js +3 -1
  85. package/cjs/SplitButton.js +2 -1
  86. package/cjs/Stack.d.ts +11 -0
  87. package/cjs/TabContent.js +3 -1
  88. package/cjs/TabPane.js +5 -2
  89. package/cjs/Table.js +3 -1
  90. package/cjs/Tabs.js +2 -1
  91. package/cjs/Toast.js +3 -1
  92. package/cjs/ToastFade.d.ts +5 -0
  93. package/cjs/ToastHeader.js +3 -1
  94. package/cjs/ToggleButton.js +3 -1
  95. package/cjs/ToggleButtonGroup.js +2 -1
  96. package/cjs/Tooltip.js +2 -1
  97. package/cjs/createUtilityClasses.d.ts +12 -0
  98. package/cjs/createWithBsPrefix.js +3 -1
  99. package/cjs/getTabTransitionComponent.d.ts +3 -0
  100. package/cjs/safeFindDOMNode.d.ts +2 -0
  101. package/cjs/types.js +3 -1
  102. package/cjs/useOverlayOffset.d.ts +1 -1
  103. package/cjs/usePlaceholder.d.ts +10 -0
  104. package/cjs/usePopperMarginModifiers.js +3 -0
  105. package/dist/react-bootstrap.js +642 -461
  106. package/dist/react-bootstrap.min.js +1 -1
  107. package/dist/react-bootstrap.min.js.LICENSE.txt +1 -1
  108. package/esm/AbstractNav.js +2 -1
  109. package/esm/AbstractNavItem.js +2 -1
  110. package/esm/Accordion.js +2 -1
  111. package/esm/AccordionCollapse.js +2 -1
  112. package/esm/AccordionToggle.js +2 -1
  113. package/esm/Alert.js +2 -1
  114. package/esm/Anchor.d.ts +3 -0
  115. package/esm/Badge.js +2 -1
  116. package/esm/Breadcrumb.js +2 -1
  117. package/esm/BreadcrumbItem.js +2 -1
  118. package/esm/Button.js +2 -1
  119. package/esm/ButtonGroup.js +2 -1
  120. package/esm/ButtonToolbar.js +2 -1
  121. package/esm/Card.js +2 -1
  122. package/esm/CardImg.js +2 -1
  123. package/esm/Carousel.js +2 -1
  124. package/esm/CarouselItem.js +2 -1
  125. package/esm/CloseButton.js +2 -1
  126. package/esm/Col.js +2 -1
  127. package/esm/Collapse.d.ts +1 -2
  128. package/esm/Collapse.js +2 -1
  129. package/esm/Container.js +2 -1
  130. package/esm/Dropdown.js +2 -1
  131. package/esm/DropdownButton.js +2 -1
  132. package/esm/DropdownContext.d.ts +10 -0
  133. package/esm/DropdownItem.js +2 -1
  134. package/esm/DropdownMenu.js +2 -1
  135. package/esm/DropdownToggle.js +2 -1
  136. package/esm/Fade.js +2 -1
  137. package/esm/Feedback.js +2 -1
  138. package/esm/FigureImage.js +2 -1
  139. package/esm/FloatingLabel.d.ts +9 -0
  140. package/esm/Form.js +2 -1
  141. package/esm/FormCheck.js +2 -1
  142. package/esm/FormCheckInput.js +2 -1
  143. package/esm/FormCheckLabel.js +2 -1
  144. package/esm/FormControl.js +2 -1
  145. package/esm/FormFile.js +2 -1
  146. package/esm/FormFileInput.js +2 -1
  147. package/esm/FormFileLabel.js +2 -1
  148. package/esm/FormFloating.d.ts +2 -0
  149. package/esm/FormGroup.js +2 -1
  150. package/esm/FormLabel.js +3 -1
  151. package/esm/FormText.js +2 -1
  152. package/esm/Image.js +2 -1
  153. package/esm/InputGroup.d.ts +5 -7
  154. package/esm/InputGroup.js +8 -11
  155. package/esm/InputGroupContext.d.ts +3 -0
  156. package/esm/Jumbotron.js +2 -1
  157. package/esm/ListGroup.js +2 -1
  158. package/esm/ListGroupItem.js +2 -1
  159. package/esm/Media.js +2 -1
  160. package/esm/Modal.d.ts +3 -2
  161. package/esm/Modal.js +17 -31
  162. package/esm/ModalDialog.js +2 -1
  163. package/esm/ModalHeader.js +2 -1
  164. package/esm/Nav.js +2 -1
  165. package/esm/NavDropdown.js +2 -1
  166. package/esm/NavItem.js +2 -1
  167. package/esm/NavLink.js +2 -1
  168. package/esm/Navbar.js +2 -1
  169. package/esm/NavbarBrand.js +2 -1
  170. package/esm/NavbarCollapse.js +2 -1
  171. package/esm/NavbarToggle.js +2 -1
  172. package/esm/Offcanvas.d.ts +2 -2
  173. package/esm/OffcanvasToggling.d.ts +2 -1
  174. package/esm/Overlay.js +4 -2
  175. package/esm/OverlayTrigger.js +2 -1
  176. package/esm/PageItem.js +4 -2
  177. package/esm/Pagination.js +2 -1
  178. package/esm/Placeholder.d.ts +8 -0
  179. package/esm/PlaceholderButton.d.ts +8 -0
  180. package/esm/Popover.js +2 -1
  181. package/esm/PopoverContent.js +2 -1
  182. package/esm/PopoverTitle.js +2 -1
  183. package/esm/ProgressBar.js +6 -3
  184. package/esm/Ratio.d.ts +9 -0
  185. package/esm/ResponsiveEmbed.js +2 -1
  186. package/esm/Row.js +2 -1
  187. package/esm/SSRProvider.d.ts +4 -0
  188. package/esm/SafeAnchor.d.ts +0 -1
  189. package/esm/SafeAnchor.js +2 -1
  190. package/esm/Spinner.d.ts +0 -1
  191. package/esm/Spinner.js +2 -1
  192. package/esm/SplitButton.js +2 -1
  193. package/esm/Stack.d.ts +11 -0
  194. package/esm/TabContent.js +2 -1
  195. package/esm/TabPane.js +4 -2
  196. package/esm/Table.js +2 -1
  197. package/esm/Tabs.js +2 -1
  198. package/esm/Toast.js +2 -1
  199. package/esm/ToastFade.d.ts +5 -0
  200. package/esm/ToastHeader.js +2 -1
  201. package/esm/ToggleButton.js +2 -1
  202. package/esm/ToggleButtonGroup.js +2 -1
  203. package/esm/Tooltip.js +2 -1
  204. package/esm/createUtilityClasses.d.ts +12 -0
  205. package/esm/createWithBsPrefix.js +2 -1
  206. package/esm/getTabTransitionComponent.d.ts +3 -0
  207. package/esm/safeFindDOMNode.d.ts +2 -0
  208. package/esm/types.js +1 -0
  209. package/esm/useOverlayOffset.d.ts +1 -1
  210. package/esm/usePlaceholder.d.ts +10 -0
  211. package/esm/usePopperMarginModifiers.js +3 -0
  212. package/package.json +6 -7
@@ -15,6 +15,8 @@ var _react = _interopRequireWildcard(require("react"));
15
15
 
16
16
  var _Button = _interopRequireDefault(require("./Button"));
17
17
 
18
+ var _excluded = ["children", "name", "className", "checked", "type", "onChange", "value", "disabled", "inputRef"];
19
+
18
20
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
21
 
20
22
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -33,7 +35,7 @@ var ToggleButton = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
33
35
  value = _ref.value,
34
36
  disabled = _ref.disabled,
35
37
  inputRef = _ref.inputRef,
36
- props = (0, _objectWithoutPropertiesLoose2.default)(_ref, ["children", "name", "className", "checked", "type", "onChange", "value", "disabled", "inputRef"]);
38
+ props = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
37
39
 
38
40
  var _useState = (0, _react.useState)(false),
39
41
  focused = _useState[0],
@@ -23,6 +23,7 @@ var _ButtonGroup = _interopRequireDefault(require("./ButtonGroup"));
23
23
 
24
24
  var _ToggleButton = _interopRequireDefault(require("./ToggleButton"));
25
25
 
26
+ var _excluded = ["children", "type", "name", "value", "onChange"];
26
27
  var defaultProps = {
27
28
  type: 'radio',
28
29
  vertical: false
@@ -37,7 +38,7 @@ var ToggleButtonGroup = /*#__PURE__*/_react.default.forwardRef(function (props,
37
38
  name = _useUncontrolled.name,
38
39
  value = _useUncontrolled.value,
39
40
  onChange = _useUncontrolled.onChange,
40
- controlledProps = (0, _objectWithoutPropertiesLoose2.default)(_useUncontrolled, ["children", "type", "name", "value", "onChange"]);
41
+ controlledProps = (0, _objectWithoutPropertiesLoose2.default)(_useUncontrolled, _excluded);
41
42
 
42
43
  var getValues = function getValues() {
43
44
  return value == null ? [] : [].concat(value);
package/cjs/Tooltip.js CHANGED
@@ -17,6 +17,7 @@ var _isRequiredForA11y = _interopRequireDefault(require("prop-types-extra/lib/is
17
17
 
18
18
  var _ThemeProvider = require("./ThemeProvider");
19
19
 
20
+ var _excluded = ["bsPrefix", "placement", "className", "style", "children", "arrowProps", "popper", "show"];
20
21
  var defaultProps = {
21
22
  placement: 'right'
22
23
  };
@@ -30,7 +31,7 @@ var Tooltip = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
30
31
  arrowProps = _ref.arrowProps,
31
32
  _ = _ref.popper,
32
33
  _2 = _ref.show,
33
- props = (0, _objectWithoutPropertiesLoose2.default)(_ref, ["bsPrefix", "placement", "className", "style", "children", "arrowProps", "popper", "show"]);
34
+ props = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
34
35
  bsPrefix = (0, _ThemeProvider.useBootstrapPrefix)(bsPrefix, 'tooltip');
35
36
 
36
37
  var _ref2 = (placement == null ? void 0 : placement.split('-')) || [],
@@ -0,0 +1,12 @@
1
+ import PropTypes from 'prop-types';
2
+ export declare type ResponsiveUtilityValue<T> = T | {
3
+ xs?: T;
4
+ sm?: T;
5
+ md?: T;
6
+ lg?: T;
7
+ xl?: T;
8
+ xxl?: T;
9
+ };
10
+ export declare function responsivePropType(propType: any): PropTypes.Requireable<any>;
11
+ export declare const DEVICE_SIZES: readonly ["xxl", "xl", "lg", "md", "sm", "xs"];
12
+ export default function createUtilityClassName(utilityValues: Record<string, ResponsiveUtilityValue<unknown>>): string[];
@@ -17,6 +17,8 @@ var _react = _interopRequireDefault(require("react"));
17
17
 
18
18
  var _ThemeProvider = require("./ThemeProvider");
19
19
 
20
+ var _excluded = ["className", "bsPrefix", "as"];
21
+
20
22
  var pascalCase = function pascalCase(str) {
21
23
  return str[0].toUpperCase() + (0, _camelize.default)(str).slice(1);
22
24
  };
@@ -34,7 +36,7 @@ function createWithBsPrefix(prefix, _temp) {
34
36
  bsPrefix = _ref2.bsPrefix,
35
37
  _ref2$as = _ref2.as,
36
38
  Tag = _ref2$as === void 0 ? Component || 'div' : _ref2$as,
37
- props = (0, _objectWithoutPropertiesLoose2.default)(_ref2, ["className", "bsPrefix", "as"]);
39
+ props = (0, _objectWithoutPropertiesLoose2.default)(_ref2, _excluded);
38
40
  var resolvedPrefix = (0, _ThemeProvider.useBootstrapPrefix)(bsPrefix, prefix);
39
41
  return /*#__PURE__*/_react.default.createElement(Tag, (0, _extends2.default)({
40
42
  ref: ref,
@@ -0,0 +1,3 @@
1
+ import { TransitionComponent } from '@restart/ui/types';
2
+ import { TransitionType } from './helpers';
3
+ export default function getTabTransitionComponent(transition?: TransitionType): TransitionComponent | undefined;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function safeFindDOMNode(componentOrElement: React.ComponentClass | Element | null | undefined): any;
package/cjs/types.js CHANGED
@@ -1 +1,3 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { Options } from 'react-overlays/usePopper';
2
+ import { Options } from '@restart/ui/usePopper';
3
3
  export default function useOverlayOffset(): [
4
4
  React.RefObject<HTMLElement>,
5
5
  Options['modifiers']
@@ -0,0 +1,10 @@
1
+ import { ColProps } from './Col';
2
+ import { Variant } from './types';
3
+ export declare type PlaceholderAnimation = 'glow' | 'wave';
4
+ export declare type PlaceholderSize = 'xs' | 'sm' | 'lg';
5
+ export interface UsePlaceholderProps extends Omit<ColProps, 'as'> {
6
+ animation?: PlaceholderAnimation;
7
+ bg?: Variant;
8
+ size?: PlaceholderSize;
9
+ }
10
+ export default function usePlaceholder({ animation, bg, bsPrefix, size, ...props }: UsePlaceholderProps): any;
@@ -101,6 +101,9 @@ function usePopperMarginModifiers() {
101
101
  name: 'popoverArrowMargins',
102
102
  enabled: true,
103
103
  phase: 'main',
104
+ fn: function fn() {
105
+ return undefined;
106
+ },
104
107
  requiresIfExists: ['arrow'],
105
108
  effect: function effect(_ref2) {
106
109
  var state = _ref2.state;