react-bootstrap 2.5.0 → 2.7.0

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 (330) hide show
  1. package/cjs/AbstractModalHeader.js +0 -9
  2. package/cjs/AbstractNav.d.ts +15 -0
  3. package/cjs/AbstractNavItem.d.ts +19 -0
  4. package/cjs/Accordion.js +0 -17
  5. package/cjs/AccordionBody.d.ts +2 -1
  6. package/cjs/AccordionBody.js +12 -10
  7. package/cjs/AccordionButton.d.ts +1 -1
  8. package/cjs/AccordionButton.js +0 -15
  9. package/cjs/AccordionCollapse.js +0 -10
  10. package/cjs/AccordionContext.d.ts +1 -1
  11. package/cjs/AccordionContext.js +0 -5
  12. package/cjs/AccordionHeader.js +0 -9
  13. package/cjs/AccordionItem.js +0 -9
  14. package/cjs/AccordionItemContext.js +0 -4
  15. package/cjs/AccordionToggle.d.ts +11 -0
  16. package/cjs/Alert.js +0 -17
  17. package/cjs/Anchor.js +0 -3
  18. package/cjs/Badge.js +0 -8
  19. package/cjs/BootstrapModalManager.js +2 -18
  20. package/cjs/Breadcrumb.js +2 -12
  21. package/cjs/BreadcrumbItem.js +2 -10
  22. package/cjs/Button.d.ts +1 -1
  23. package/cjs/Button.js +2 -10
  24. package/cjs/ButtonGroup.js +2 -9
  25. package/cjs/ButtonToolbar.js +2 -9
  26. package/cjs/Card.js +0 -14
  27. package/cjs/CardColumns.d.ts +2 -0
  28. package/cjs/CardContext.d.ts +6 -0
  29. package/cjs/CardDeck.d.ts +2 -0
  30. package/cjs/CardGroup.js +0 -4
  31. package/cjs/CardHeader.js +0 -9
  32. package/cjs/CardHeaderContext.js +0 -4
  33. package/cjs/CardImg.js +2 -9
  34. package/cjs/Carousel.d.ts +1 -1
  35. package/cjs/Carousel.js +9 -58
  36. package/cjs/CarouselCaption.js +0 -4
  37. package/cjs/CarouselItem.js +0 -8
  38. package/cjs/CloseButton.d.ts +1 -1
  39. package/cjs/CloseButton.js +2 -9
  40. package/cjs/Col.d.ts +5 -5
  41. package/cjs/Col.js +6 -14
  42. package/cjs/Collapse.d.ts +1 -1
  43. package/cjs/Collapse.js +10 -22
  44. package/cjs/Container.js +0 -8
  45. package/cjs/Dropdown.js +17 -27
  46. package/cjs/DropdownButton.js +1 -25
  47. package/cjs/DropdownContext.d.ts +2 -2
  48. package/cjs/DropdownContext.js +0 -4
  49. package/cjs/DropdownItem.js +2 -11
  50. package/cjs/DropdownMenu.d.ts +2 -2
  51. package/cjs/DropdownMenu.js +12 -34
  52. package/cjs/DropdownToggle.d.ts +2 -2
  53. package/cjs/DropdownToggle.js +7 -24
  54. package/cjs/ElementChildren.js +2 -8
  55. package/cjs/Fade.js +2 -12
  56. package/cjs/Feedback.d.ts +1 -1
  57. package/cjs/Feedback.js +4 -11
  58. package/cjs/Figure.js +0 -7
  59. package/cjs/FigureCaption.js +0 -3
  60. package/cjs/FigureImage.js +0 -8
  61. package/cjs/FloatingLabel.js +0 -9
  62. package/cjs/Form.d.ts +5 -5
  63. package/cjs/Form.js +2 -22
  64. package/cjs/FormCheck.d.ts +1 -1
  65. package/cjs/FormCheck.js +2 -16
  66. package/cjs/FormCheckInput.d.ts +1 -1
  67. package/cjs/FormCheckInput.js +2 -10
  68. package/cjs/FormCheckLabel.js +2 -10
  69. package/cjs/FormContext.js +0 -4
  70. package/cjs/FormControl.d.ts +1 -1
  71. package/cjs/FormControl.js +2 -16
  72. package/cjs/FormFile.d.ts +23 -0
  73. package/cjs/FormFileInput.d.ts +10 -0
  74. package/cjs/FormFileLabel.d.ts +7 -0
  75. package/cjs/FormFloating.js +0 -4
  76. package/cjs/FormGroup.js +2 -8
  77. package/cjs/FormLabel.d.ts +1 -1
  78. package/cjs/FormLabel.js +0 -11
  79. package/cjs/FormRange.js +2 -10
  80. package/cjs/FormSelect.js +2 -10
  81. package/cjs/FormText.js +4 -10
  82. package/cjs/Image.js +0 -13
  83. package/cjs/InputGroup.js +3 -18
  84. package/cjs/InputGroupContext.js +0 -4
  85. package/cjs/Jumbotron.d.ts +7 -0
  86. package/cjs/ListGroup.js +0 -16
  87. package/cjs/ListGroupItem.js +4 -15
  88. package/cjs/Media.d.ts +8 -0
  89. package/cjs/Modal.js +32 -73
  90. package/cjs/ModalBody.js +0 -4
  91. package/cjs/ModalContext.js +0 -5
  92. package/cjs/ModalDialog.js +2 -9
  93. package/cjs/ModalFooter.js +0 -4
  94. package/cjs/ModalHeader.js +0 -9
  95. package/cjs/ModalTitle.js +0 -6
  96. package/cjs/Nav.js +0 -19
  97. package/cjs/NavContext.js +0 -4
  98. package/cjs/NavDropdown.js +0 -12
  99. package/cjs/NavItem.js +0 -4
  100. package/cjs/NavLink.js +2 -12
  101. package/cjs/Navbar.js +3 -22
  102. package/cjs/NavbarBrand.js +2 -9
  103. package/cjs/NavbarCollapse.js +0 -9
  104. package/cjs/NavbarContext.js +0 -4
  105. package/cjs/NavbarOffcanvas.d.ts +1 -1
  106. package/cjs/NavbarOffcanvas.js +0 -8
  107. package/cjs/NavbarToggle.js +2 -13
  108. package/cjs/Offcanvas.d.ts +1 -1
  109. package/cjs/Offcanvas.js +9 -37
  110. package/cjs/OffcanvasBody.js +0 -4
  111. package/cjs/OffcanvasHeader.js +0 -9
  112. package/cjs/OffcanvasTitle.js +0 -6
  113. package/cjs/OffcanvasToggling.js +2 -12
  114. package/cjs/Overlay.d.ts +1 -1
  115. package/cjs/Overlay.js +12 -27
  116. package/cjs/OverlayTrigger.d.ts +9 -9
  117. package/cjs/OverlayTrigger.js +7 -32
  118. package/cjs/PageItem.js +3 -12
  119. package/cjs/Pagination.js +0 -11
  120. package/cjs/Placeholder.js +2 -11
  121. package/cjs/PlaceholderButton.js +2 -9
  122. package/cjs/Popover.js +0 -13
  123. package/cjs/PopoverBody.js +0 -4
  124. package/cjs/PopoverContent.d.ts +5 -0
  125. package/cjs/PopoverHeader.js +0 -4
  126. package/cjs/PopoverTitle.d.ts +5 -0
  127. package/cjs/ProgressBar.js +2 -20
  128. package/cjs/Ratio.d.ts +1 -1
  129. package/cjs/Ratio.js +3 -12
  130. package/cjs/ResponsiveEmbed.d.ts +9 -0
  131. package/cjs/Row.d.ts +2 -2
  132. package/cjs/Row.js +0 -10
  133. package/cjs/SSRProvider.js +0 -2
  134. package/cjs/SafeAnchor.d.ts +17 -0
  135. package/cjs/SelectableContext.d.ts +5 -0
  136. package/cjs/Spinner.d.ts +1 -1
  137. package/cjs/Spinner.js +1 -9
  138. package/cjs/SplitButton.js +1 -27
  139. package/cjs/Stack.d.ts +1 -1
  140. package/cjs/Stack.js +2 -10
  141. package/cjs/Switch.d.ts +1 -1
  142. package/cjs/Switch.js +2 -10
  143. package/cjs/Tab.d.ts +2 -2
  144. package/cjs/Tab.js +2 -20
  145. package/cjs/TabContainer.d.ts +2 -2
  146. package/cjs/TabContainer.js +2 -10
  147. package/cjs/TabContent.js +0 -4
  148. package/cjs/TabContext.d.ts +12 -0
  149. package/cjs/TabPane.js +7 -17
  150. package/cjs/Table.js +2 -13
  151. package/cjs/Tabs.d.ts +3 -3
  152. package/cjs/Tabs.js +6 -24
  153. package/cjs/ThemeProvider.js +8 -17
  154. package/cjs/Toast.js +5 -18
  155. package/cjs/ToastBody.js +0 -4
  156. package/cjs/ToastContainer.d.ts +1 -1
  157. package/cjs/ToastContainer.js +0 -8
  158. package/cjs/ToastContext.js +0 -5
  159. package/cjs/ToastFade.js +2 -9
  160. package/cjs/ToastHeader.js +0 -11
  161. package/cjs/ToggleButton.d.ts +1 -1
  162. package/cjs/ToggleButton.js +2 -11
  163. package/cjs/ToggleButtonGroup.d.ts +2 -2
  164. package/cjs/ToggleButtonGroup.js +2 -23
  165. package/cjs/Tooltip.js +0 -9
  166. package/cjs/TransitionWrapper.d.ts +1 -1
  167. package/cjs/TransitionWrapper.js +3 -15
  168. package/cjs/createChainedFunction.js +2 -5
  169. package/cjs/createUtilityClasses.d.ts +1 -1
  170. package/cjs/createUtilityClasses.js +0 -6
  171. package/cjs/createWithBsPrefix.js +0 -11
  172. package/cjs/divWithClassName.js +2 -9
  173. package/cjs/getTabTransitionComponent.js +0 -6
  174. package/cjs/helpers.d.ts +4 -4
  175. package/cjs/helpers.js +2 -9
  176. package/cjs/index.js +0 -171
  177. package/cjs/safeFindDOMNode.d.ts +1 -1
  178. package/cjs/safeFindDOMNode.js +0 -5
  179. package/cjs/transitionEndListener.js +0 -6
  180. package/cjs/triggerBrowserReflow.js +0 -2
  181. package/cjs/types.d.ts +10 -10
  182. package/cjs/types.js +0 -5
  183. package/cjs/useOverlayOffset.js +0 -8
  184. package/cjs/usePlaceholder.d.ts +2 -2
  185. package/cjs/usePlaceholder.js +2 -7
  186. package/cjs/usePopperMarginModifiers.d.ts +4 -0
  187. package/cjs/useWrappedRefWithWarning.js +4 -9
  188. package/dist/react-bootstrap.js +750 -2195
  189. package/dist/react-bootstrap.min.js +1 -1
  190. package/esm/AbstractNav.d.ts +15 -0
  191. package/esm/AbstractNavItem.d.ts +19 -0
  192. package/esm/AccordionBody.d.ts +2 -1
  193. package/esm/AccordionBody.js +12 -0
  194. package/esm/AccordionButton.d.ts +1 -1
  195. package/esm/AccordionButton.js +0 -4
  196. package/esm/AccordionCollapse.js +0 -1
  197. package/esm/AccordionContext.d.ts +1 -1
  198. package/esm/AccordionToggle.d.ts +11 -0
  199. package/esm/Alert.js +0 -2
  200. package/esm/BootstrapModalManager.js +2 -9
  201. package/esm/Breadcrumb.js +2 -1
  202. package/esm/BreadcrumbItem.js +2 -1
  203. package/esm/Button.d.ts +1 -1
  204. package/esm/Button.js +2 -1
  205. package/esm/ButtonGroup.js +2 -1
  206. package/esm/ButtonToolbar.js +2 -1
  207. package/esm/CardColumns.d.ts +2 -0
  208. package/esm/CardContext.d.ts +6 -0
  209. package/esm/CardDeck.d.ts +2 -0
  210. package/esm/CardImg.js +2 -1
  211. package/esm/Carousel.d.ts +1 -1
  212. package/esm/Carousel.js +9 -36
  213. package/esm/CloseButton.d.ts +1 -1
  214. package/esm/CloseButton.js +2 -1
  215. package/esm/Col.d.ts +5 -5
  216. package/esm/Col.js +6 -5
  217. package/esm/Collapse.d.ts +1 -1
  218. package/esm/Collapse.js +11 -8
  219. package/esm/Dropdown.js +17 -7
  220. package/esm/DropdownButton.js +1 -14
  221. package/esm/DropdownContext.d.ts +2 -2
  222. package/esm/DropdownItem.js +2 -1
  223. package/esm/DropdownMenu.d.ts +2 -2
  224. package/esm/DropdownMenu.js +12 -15
  225. package/esm/DropdownToggle.d.ts +2 -2
  226. package/esm/DropdownToggle.js +7 -10
  227. package/esm/ElementChildren.js +3 -6
  228. package/esm/Fade.js +2 -1
  229. package/esm/Feedback.d.ts +1 -1
  230. package/esm/Feedback.js +4 -3
  231. package/esm/Form.d.ts +5 -5
  232. package/esm/Form.js +2 -2
  233. package/esm/FormCheck.d.ts +1 -1
  234. package/esm/FormCheck.js +2 -3
  235. package/esm/FormCheckInput.d.ts +1 -1
  236. package/esm/FormCheckInput.js +2 -1
  237. package/esm/FormCheckLabel.js +2 -1
  238. package/esm/FormContext.js +3 -1
  239. package/esm/FormControl.d.ts +1 -1
  240. package/esm/FormControl.js +2 -3
  241. package/esm/FormFile.d.ts +23 -0
  242. package/esm/FormFileInput.d.ts +10 -0
  243. package/esm/FormFileLabel.d.ts +7 -0
  244. package/esm/FormGroup.js +2 -1
  245. package/esm/FormLabel.d.ts +1 -1
  246. package/esm/FormRange.js +2 -1
  247. package/esm/FormSelect.js +2 -1
  248. package/esm/FormText.js +4 -2
  249. package/esm/Image.js +0 -4
  250. package/esm/InputGroup.js +3 -5
  251. package/esm/Jumbotron.d.ts +7 -0
  252. package/esm/ListGroup.js +0 -2
  253. package/esm/ListGroupItem.js +4 -4
  254. package/esm/Media.d.ts +8 -0
  255. package/esm/Modal.js +32 -44
  256. package/esm/ModalContext.js +0 -1
  257. package/esm/ModalDialog.js +2 -1
  258. package/esm/Nav.js +0 -2
  259. package/esm/NavLink.js +2 -1
  260. package/esm/Navbar.js +3 -4
  261. package/esm/NavbarBrand.js +2 -1
  262. package/esm/NavbarContext.js +3 -1
  263. package/esm/NavbarOffcanvas.d.ts +1 -1
  264. package/esm/NavbarToggle.js +2 -3
  265. package/esm/Offcanvas.d.ts +1 -1
  266. package/esm/Offcanvas.js +9 -16
  267. package/esm/OffcanvasToggling.js +2 -1
  268. package/esm/Overlay.d.ts +1 -1
  269. package/esm/Overlay.js +12 -12
  270. package/esm/OverlayTrigger.d.ts +9 -9
  271. package/esm/OverlayTrigger.js +7 -20
  272. package/esm/PageItem.js +2 -4
  273. package/esm/Pagination.js +0 -1
  274. package/esm/Placeholder.js +2 -1
  275. package/esm/PlaceholderButton.js +2 -1
  276. package/esm/PopoverContent.d.ts +5 -0
  277. package/esm/PopoverTitle.d.ts +5 -0
  278. package/esm/ProgressBar.js +2 -12
  279. package/esm/Ratio.d.ts +1 -1
  280. package/esm/Ratio.js +3 -4
  281. package/esm/ResponsiveEmbed.d.ts +9 -0
  282. package/esm/Row.d.ts +2 -2
  283. package/esm/Row.js +0 -2
  284. package/esm/SafeAnchor.d.ts +17 -0
  285. package/esm/SelectableContext.d.ts +5 -0
  286. package/esm/Spinner.d.ts +1 -1
  287. package/esm/Spinner.js +1 -1
  288. package/esm/SplitButton.js +1 -16
  289. package/esm/Stack.d.ts +1 -1
  290. package/esm/Stack.js +2 -1
  291. package/esm/Switch.d.ts +1 -1
  292. package/esm/Switch.js +2 -1
  293. package/esm/Tab.d.ts +2 -2
  294. package/esm/Tab.js +2 -9
  295. package/esm/TabContainer.d.ts +2 -2
  296. package/esm/TabContainer.js +2 -3
  297. package/esm/TabContext.d.ts +12 -0
  298. package/esm/TabPane.js +7 -4
  299. package/esm/Table.js +2 -6
  300. package/esm/Tabs.d.ts +3 -3
  301. package/esm/Tabs.js +6 -9
  302. package/esm/ThemeProvider.js +8 -9
  303. package/esm/Toast.js +5 -5
  304. package/esm/ToastContainer.d.ts +1 -1
  305. package/esm/ToastContext.js +0 -1
  306. package/esm/ToastFade.js +2 -1
  307. package/esm/ToggleButton.d.ts +1 -1
  308. package/esm/ToggleButton.js +2 -3
  309. package/esm/ToggleButtonGroup.d.ts +2 -2
  310. package/esm/ToggleButtonGroup.js +2 -9
  311. package/esm/TransitionWrapper.d.ts +1 -1
  312. package/esm/TransitionWrapper.js +3 -5
  313. package/esm/createChainedFunction.js +2 -4
  314. package/esm/createUtilityClasses.d.ts +1 -1
  315. package/esm/createUtilityClasses.js +0 -1
  316. package/esm/createWithBsPrefix.js +0 -2
  317. package/esm/divWithClassName.js +2 -1
  318. package/esm/getTabTransitionComponent.js +0 -1
  319. package/esm/helpers.d.ts +4 -4
  320. package/esm/helpers.js +3 -3
  321. package/esm/safeFindDOMNode.d.ts +1 -1
  322. package/esm/safeFindDOMNode.js +0 -1
  323. package/esm/transitionEndListener.js +0 -2
  324. package/esm/types.d.ts +10 -10
  325. package/esm/useOverlayOffset.js +3 -3
  326. package/esm/usePlaceholder.d.ts +2 -2
  327. package/esm/usePlaceholder.js +2 -1
  328. package/esm/usePopperMarginModifiers.d.ts +4 -0
  329. package/esm/useWrappedRefWithWarning.js +4 -3
  330. package/package.json +2 -2
package/esm/TabPane.js CHANGED
@@ -28,12 +28,14 @@ const TabPane = /*#__PURE__*/React.forwardRef(({
28
28
  mountOnEnter,
29
29
  unmountOnExit,
30
30
  transition: Transition = Fade
31
- }] = useTabPanel({ ...props,
31
+ }] = useTabPanel({
32
+ ...props,
32
33
  transition: getTabTransitionComponent(transition)
33
34
  });
34
- const prefix = useBootstrapPrefix(bsPrefix, 'tab-pane'); // We provide an empty the TabContext so `<Nav>`s in `<TabPanel>`s don't
35
- // conflict with the top level one.
35
+ const prefix = useBootstrapPrefix(bsPrefix, 'tab-pane');
36
36
 
37
+ // We provide an empty the TabContext so `<Nav>`s in `<TabPanel>`s don't
38
+ // conflict with the top level one.
37
39
  return /*#__PURE__*/_jsx(TabContext.Provider, {
38
40
  value: null,
39
41
  children: /*#__PURE__*/_jsx(SelectableContext.Provider, {
@@ -48,7 +50,8 @@ const TabPane = /*#__PURE__*/React.forwardRef(({
48
50
  onExited: onExited,
49
51
  mountOnEnter: mountOnEnter,
50
52
  unmountOnExit: unmountOnExit,
51
- children: /*#__PURE__*/_jsx(Component, { ...rest,
53
+ children: /*#__PURE__*/_jsx(Component, {
54
+ ...rest,
52
55
  ref: ref,
53
56
  className: classNames(className, prefix, isActive && 'active')
54
57
  })
package/esm/Table.js CHANGED
@@ -16,25 +16,21 @@ const Table = /*#__PURE__*/React.forwardRef(({
16
16
  }, ref) => {
17
17
  const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'table');
18
18
  const classes = classNames(className, decoratedBsPrefix, variant && `${decoratedBsPrefix}-${variant}`, size && `${decoratedBsPrefix}-${size}`, striped && `${decoratedBsPrefix}-${typeof striped === 'string' ? `striped-${striped}` : 'striped'}`, bordered && `${decoratedBsPrefix}-bordered`, borderless && `${decoratedBsPrefix}-borderless`, hover && `${decoratedBsPrefix}-hover`);
19
-
20
- const table = /*#__PURE__*/_jsx("table", { ...props,
19
+ const table = /*#__PURE__*/_jsx("table", {
20
+ ...props,
21
21
  className: classes,
22
22
  ref: ref
23
23
  });
24
-
25
24
  if (responsive) {
26
25
  let responsiveClass = `${decoratedBsPrefix}-responsive`;
27
-
28
26
  if (typeof responsive === 'string') {
29
27
  responsiveClass = `${responsiveClass}-${responsive}`;
30
28
  }
31
-
32
29
  return /*#__PURE__*/_jsx("div", {
33
30
  className: responsiveClass,
34
31
  children: table
35
32
  });
36
33
  }
37
-
38
34
  return table;
39
35
  });
40
36
  export default Table;
package/esm/Tabs.d.ts CHANGED
@@ -14,9 +14,9 @@ declare const Tabs: {
14
14
  *
15
15
  * @controllable onSelect
16
16
  */
17
- activeKey: PropTypes.Requireable<string | number>;
17
+ activeKey: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
18
18
  /** The default active key that is selected on start */
19
- defaultActiveKey: PropTypes.Requireable<string | number>;
19
+ defaultActiveKey: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
20
20
  /**
21
21
  * Navigation style
22
22
  *
@@ -32,7 +32,7 @@ declare const Tabs: {
32
32
  * @type {Transition | false}
33
33
  * @default {Fade}
34
34
  */
35
- transition: PropTypes.Requireable<boolean | PropTypes.ReactComponentLike>;
35
+ transition: PropTypes.Requireable<NonNullable<boolean | PropTypes.ReactComponentLike | null | undefined>>;
36
36
  /**
37
37
  * HTML id attribute, required if no `generateChildId` prop
38
38
  * is specified.
package/esm/Tabs.js CHANGED
@@ -15,7 +15,6 @@ const defaultProps = {
15
15
  mountOnEnter: false,
16
16
  unmountOnExit: false
17
17
  };
18
-
19
18
  function getDefaultActiveKey(children) {
20
19
  let defaultActiveKey;
21
20
  forEach(children, child => {
@@ -25,7 +24,6 @@ function getDefaultActiveKey(children) {
25
24
  });
26
25
  return defaultActiveKey;
27
26
  }
28
-
29
27
  function renderTab(child) {
30
28
  const {
31
29
  title,
@@ -35,11 +33,9 @@ function renderTab(child) {
35
33
  tabAttrs,
36
34
  id
37
35
  } = child.props;
38
-
39
36
  if (title == null) {
40
37
  return null;
41
38
  }
42
-
43
39
  return /*#__PURE__*/_jsx(NavItem, {
44
40
  as: "li",
45
41
  role: "presentation",
@@ -55,7 +51,6 @@ function renderTab(child) {
55
51
  })
56
52
  });
57
53
  }
58
-
59
54
  const Tabs = props => {
60
55
  const {
61
56
  id,
@@ -76,25 +71,27 @@ const Tabs = props => {
76
71
  transition: getTabTransitionComponent(transition),
77
72
  mountOnEnter: mountOnEnter,
78
73
  unmountOnExit: unmountOnExit,
79
- children: [/*#__PURE__*/_jsx(Nav, { ...controlledProps,
74
+ children: [/*#__PURE__*/_jsx(Nav, {
75
+ ...controlledProps,
80
76
  role: "tablist",
81
77
  as: "ul",
82
78
  children: map(children, renderTab)
83
79
  }), /*#__PURE__*/_jsx(TabContent, {
84
80
  children: map(children, child => {
85
- const childProps = { ...child.props
81
+ const childProps = {
82
+ ...child.props
86
83
  };
87
84
  delete childProps.title;
88
85
  delete childProps.disabled;
89
86
  delete childProps.tabClassName;
90
87
  delete childProps.tabAttrs;
91
- return /*#__PURE__*/_jsx(TabPane, { ...childProps
88
+ return /*#__PURE__*/_jsx(TabPane, {
89
+ ...childProps
92
90
  });
93
91
  })
94
92
  })]
95
93
  });
96
94
  };
97
-
98
95
  Tabs.defaultProps = defaultProps;
99
96
  Tabs.displayName = 'Tabs';
100
97
  export default Tabs;
@@ -12,7 +12,6 @@ const {
12
12
  Consumer,
13
13
  Provider
14
14
  } = ThemeContext;
15
-
16
15
  function ThemeProvider({
17
16
  prefixes = {},
18
17
  breakpoints = DEFAULT_BREAKPOINTS,
@@ -21,7 +20,8 @@ function ThemeProvider({
21
20
  children
22
21
  }) {
23
22
  const contextValue = useMemo(() => ({
24
- prefixes: { ...prefixes
23
+ prefixes: {
24
+ ...prefixes
25
25
  },
26
26
  breakpoints,
27
27
  minBreakpoint,
@@ -32,7 +32,6 @@ function ThemeProvider({
32
32
  children: children
33
33
  });
34
34
  }
35
-
36
35
  export function useBootstrapPrefix(prefix, defaultPrefix) {
37
36
  const {
38
37
  prefixes
@@ -57,28 +56,28 @@ export function useIsRTL() {
57
56
  } = useContext(ThemeContext);
58
57
  return dir === 'rtl';
59
58
  }
60
-
61
59
  function createBootstrapComponent(Component, opts) {
62
60
  if (typeof opts === 'string') opts = {
63
61
  prefix: opts
64
62
  };
65
- const isClassy = Component.prototype && Component.prototype.isReactComponent; // If it's a functional component make sure we don't break it with a ref
66
-
63
+ const isClassy = Component.prototype && Component.prototype.isReactComponent;
64
+ // If it's a functional component make sure we don't break it with a ref
67
65
  const {
68
66
  prefix,
69
67
  forwardRefAs = isClassy ? 'ref' : 'innerRef'
70
68
  } = opts;
71
- const Wrapped = /*#__PURE__*/React.forwardRef(({ ...props
69
+ const Wrapped = /*#__PURE__*/React.forwardRef(({
70
+ ...props
72
71
  }, ref) => {
73
72
  props[forwardRefAs] = ref;
74
73
  const bsPrefix = useBootstrapPrefix(props.bsPrefix, prefix);
75
- return /*#__PURE__*/_jsx(Component, { ...props,
74
+ return /*#__PURE__*/_jsx(Component, {
75
+ ...props,
76
76
  bsPrefix: bsPrefix
77
77
  });
78
78
  });
79
79
  Wrapped.displayName = `Bootstrap(${Component.displayName || Component.name})`;
80
80
  return Wrapped;
81
81
  }
82
-
83
82
  export { createBootstrapComponent, Consumer as ThemeConsumer };
84
83
  export default ThemeProvider;
package/esm/Toast.js CHANGED
@@ -20,9 +20,10 @@ const Toast = /*#__PURE__*/React.forwardRef(({
20
20
  bg,
21
21
  ...props
22
22
  }, ref) => {
23
- bsPrefix = useBootstrapPrefix(bsPrefix, 'toast'); // We use refs for these, because we don't want to restart the autohide
24
- // timer in case these values change.
23
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'toast');
25
24
 
25
+ // We use refs for these, because we don't want to restart the autohide
26
+ // timer in case these values change.
26
27
  const delayRef = useRef(delay);
27
28
  const onCloseRef = useRef(onClose);
28
29
  useEffect(() => {
@@ -44,15 +45,14 @@ const Toast = /*#__PURE__*/React.forwardRef(({
44
45
  onClose
45
46
  }), [onClose]);
46
47
  const hasAnimation = !!(Transition && animation);
47
-
48
- const toast = /*#__PURE__*/_jsx("div", { ...props,
48
+ const toast = /*#__PURE__*/_jsx("div", {
49
+ ...props,
49
50
  ref: ref,
50
51
  className: classNames(bsPrefix, className, bg && `bg-${bg}`, !hasAnimation && (show ? 'show' : 'hide')),
51
52
  role: "alert",
52
53
  "aria-live": "assertive",
53
54
  "aria-atomic": "true"
54
55
  });
55
-
56
56
  return /*#__PURE__*/_jsx(ToastContext.Provider, {
57
57
  value: toastContext,
58
58
  children: hasAnimation && Transition ? /*#__PURE__*/_jsx(Transition, {
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
- export declare type ToastPosition = 'top-start' | 'top-center' | 'top-end' | 'middle-start' | 'middle-center' | 'middle-end' | 'bottom-start' | 'bottom-center' | 'bottom-end';
3
+ export type ToastPosition = 'top-start' | 'top-center' | 'top-end' | 'middle-start' | 'middle-center' | 'middle-end' | 'bottom-start' | 'bottom-center' | 'bottom-end';
4
4
  export interface ToastContainerProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
5
5
  position?: ToastPosition;
6
6
  containerPosition?: string;
@@ -2,6 +2,5 @@ import * as React from 'react';
2
2
  const ToastContext = /*#__PURE__*/React.createContext({
3
3
  // eslint-disable-next-line @typescript-eslint/no-empty-function
4
4
  onClose() {}
5
-
6
5
  });
7
6
  export default ToastContext;
package/esm/ToastFade.js CHANGED
@@ -6,7 +6,8 @@ const fadeStyles = {
6
6
  [ENTERING]: 'showing',
7
7
  [EXITING]: 'showing show'
8
8
  };
9
- const ToastFade = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(Fade, { ...props,
9
+ const ToastFade = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(Fade, {
10
+ ...props,
10
11
  ref: ref,
11
12
  transitionClasses: fadeStyles
12
13
  }));
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ButtonProps } from './Button';
3
- export declare type ToggleButtonType = 'checkbox' | 'radio';
3
+ export type ToggleButtonType = 'checkbox' | 'radio';
4
4
  export interface ToggleButtonProps extends Omit<ButtonProps, 'onChange' | 'type'> {
5
5
  type?: ToggleButtonType;
6
6
  name?: string;
@@ -5,9 +5,7 @@ import Button from './Button';
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  import { Fragment as _Fragment } from "react/jsx-runtime";
7
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
-
9
8
  const noop = () => undefined;
10
-
11
9
  const ToggleButton = /*#__PURE__*/React.forwardRef(({
12
10
  bsPrefix,
13
11
  name,
@@ -34,7 +32,8 @@ const ToggleButton = /*#__PURE__*/React.forwardRef(({
34
32
  disabled: !!disabled,
35
33
  onChange: onChange || noop,
36
34
  id: id
37
- }), /*#__PURE__*/_jsx(Button, { ...props,
35
+ }), /*#__PURE__*/_jsx(Button, {
36
+ ...props,
38
37
  ref: ref,
39
38
  className: classNames(className, disabled && 'disabled'),
40
39
  type: undefined,
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { ButtonGroupProps } from './ButtonGroup';
3
3
  import { BsPrefixRefForwardingComponent } from './helpers';
4
- declare type BaseToggleButtonProps = Omit<ButtonGroupProps, 'toggle' | 'defaultValue' | 'onChange'>;
4
+ type BaseToggleButtonProps = Omit<ButtonGroupProps, 'toggle' | 'defaultValue' | 'onChange'>;
5
5
  export interface ToggleButtonRadioProps<T> extends BaseToggleButtonProps {
6
6
  type?: 'radio';
7
7
  name: string;
@@ -16,7 +16,7 @@ export interface ToggleButtonCheckboxProps<T> extends BaseToggleButtonProps {
16
16
  defaultValue?: T[];
17
17
  onChange?: (value: T[]) => void;
18
18
  }
19
- export declare type ToggleButtonGroupProps<T> = ToggleButtonRadioProps<T> | ToggleButtonCheckboxProps<T>;
19
+ export type ToggleButtonGroupProps<T> = ToggleButtonRadioProps<T> | ToggleButtonCheckboxProps<T>;
20
20
  declare const _default: BsPrefixRefForwardingComponent<"a", ToggleButtonGroupProps<any>> & {
21
21
  Button: React.ForwardRefExoticComponent<import("./ToggleButton").ToggleButtonProps & React.RefAttributes<HTMLLabelElement>>;
22
22
  };
@@ -21,31 +21,26 @@ const ToggleButtonGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
21
21
  } = useUncontrolled(props, {
22
22
  value: 'onChange'
23
23
  });
24
-
25
24
  const getValues = () => value == null ? [] : [].concat(value);
26
-
27
25
  const handleToggle = (inputVal, event) => {
28
26
  if (!onChange) {
29
27
  return;
30
28
  }
31
-
32
29
  const values = getValues();
33
30
  const isActive = values.indexOf(inputVal) !== -1;
34
-
35
31
  if (type === 'radio') {
36
32
  if (!isActive) onChange(inputVal, event);
37
33
  return;
38
34
  }
39
-
40
35
  if (isActive) {
41
36
  onChange(values.filter(n => n !== inputVal), event);
42
37
  } else {
43
38
  onChange([...values, inputVal], event);
44
39
  }
45
40
  };
46
-
47
41
  !(type !== 'radio' || !!name) ? process.env.NODE_ENV !== "production" ? invariant(false, 'A `name` is required to group the toggle buttons when the `type` ' + 'is set to "radio"') : invariant(false) : void 0;
48
- return /*#__PURE__*/_jsx(ButtonGroup, { ...controlledProps,
42
+ return /*#__PURE__*/_jsx(ButtonGroup, {
43
+ ...controlledProps,
49
44
  ref: ref,
50
45
  children: map(children, child => {
51
46
  const values = getValues();
@@ -53,9 +48,7 @@ const ToggleButtonGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
53
48
  value: childVal,
54
49
  onChange: childOnChange
55
50
  } = child.props;
56
-
57
51
  const handler = e => handleToggle(childVal, e);
58
-
59
52
  return /*#__PURE__*/React.cloneElement(child, {
60
53
  type,
61
54
  name: child.name || name,
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import Transition, { TransitionProps, TransitionStatus } from 'react-transition-group/Transition';
3
- export declare type TransitionWrapperProps = TransitionProps & {
3
+ export type TransitionWrapperProps = TransitionProps & {
4
4
  childRef?: React.Ref<unknown>;
5
5
  children: React.ReactElement | ((status: TransitionStatus, props: Record<string, unknown>) => React.ReactNode);
6
6
  };
@@ -18,19 +18,16 @@ const TransitionWrapper = /*#__PURE__*/React.forwardRef(({
18
18
  }, ref) => {
19
19
  const nodeRef = useRef(null);
20
20
  const mergedRef = useMergedRefs(nodeRef, childRef);
21
-
22
21
  const attachRef = r => {
23
22
  mergedRef(safeFindDOMNode(r));
24
23
  };
25
-
26
24
  const normalize = callback => param => {
27
25
  if (callback && nodeRef.current) {
28
26
  callback(nodeRef.current, param);
29
27
  }
30
28
  };
31
- /* eslint-disable react-hooks/exhaustive-deps */
32
-
33
29
 
30
+ /* eslint-disable react-hooks/exhaustive-deps */
34
31
  const handleEnter = useCallback(normalize(onEnter), [onEnter]);
35
32
  const handleEntering = useCallback(normalize(onEntering), [onEntering]);
36
33
  const handleEntered = useCallback(normalize(onEntered), [onEntered]);
@@ -51,7 +48,8 @@ const TransitionWrapper = /*#__PURE__*/React.forwardRef(({
51
48
  onExiting: handleExiting,
52
49
  addEndListener: handleAddEndListener,
53
50
  nodeRef: nodeRef,
54
- children: typeof children === 'function' ? (status, innerProps) => children(status, { ...innerProps,
51
+ children: typeof children === 'function' ? (status, innerProps) => children(status, {
52
+ ...innerProps,
55
53
  ref: attachRef
56
54
  }) : /*#__PURE__*/React.cloneElement(children, {
57
55
  ref: attachRef
@@ -12,15 +12,13 @@ function createChainedFunction(...funcs) {
12
12
  if (typeof f !== 'function') {
13
13
  throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.');
14
14
  }
15
-
16
15
  if (acc === null) return f;
17
16
  return function chainedFunction(...args) {
18
17
  // @ts-ignore
19
- acc.apply(this, args); // @ts-ignore
20
-
18
+ acc.apply(this, args);
19
+ // @ts-ignore
21
20
  f.apply(this, args);
22
21
  };
23
22
  }, null);
24
23
  }
25
-
26
24
  export default createChainedFunction;
@@ -1,5 +1,5 @@
1
1
  import PropTypes from 'prop-types';
2
- export declare type ResponsiveUtilityValue<T> = T | {
2
+ export type ResponsiveUtilityValue<T> = T | {
3
3
  xs?: T;
4
4
  sm?: T;
5
5
  md?: T;
@@ -17,7 +17,6 @@ export default function createUtilityClassName(utilityValues, breakpoints = DEFA
17
17
  if (typeof utilValue === 'object') {
18
18
  breakpoints.forEach(brkPoint => {
19
19
  const bpValue = utilValue[brkPoint];
20
-
21
20
  if (bpValue != null) {
22
21
  const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : '';
23
22
  classes.push(`${utilName}${infix}-${bpValue}`);
@@ -3,9 +3,7 @@ import camelize from 'dom-helpers/camelize';
3
3
  import * as React from 'react';
4
4
  import { useBootstrapPrefix } from './ThemeProvider';
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
-
7
6
  const pascalCase = str => str[0].toUpperCase() + camelize(str).slice(1);
8
-
9
7
  // TODO: emstricten & fix the typing here! `createWithBsPrefix<TElementType>...`
10
8
  export default function createWithBsPrefix(prefix, {
11
9
  displayName = pascalCase(prefix),
@@ -1,7 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import classNames from 'classnames';
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
- export default (className => /*#__PURE__*/React.forwardRef((p, ref) => /*#__PURE__*/_jsx("div", { ...p,
4
+ export default (className => /*#__PURE__*/React.forwardRef((p, ref) => /*#__PURE__*/_jsx("div", {
5
+ ...p,
5
6
  ref: ref,
6
7
  className: classNames(p.className, className)
7
8
  })));
@@ -4,6 +4,5 @@ export default function getTabTransitionComponent(transition) {
4
4
  if (typeof transition === 'boolean') {
5
5
  return transition ? Fade : NoopTransition;
6
6
  }
7
-
8
7
  return transition;
9
8
  }
package/esm/helpers.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { TransitionComponent } from '@restart/ui/types';
3
- export declare type Omit<T, U> = Pick<T, Exclude<keyof T, keyof U>>;
4
- export declare type ReplaceProps<Inner extends React.ElementType, P> = Omit<React.ComponentPropsWithRef<Inner>, P> & P;
3
+ export type Omit<T, U> = Pick<T, Exclude<keyof T, keyof U>>;
4
+ export type ReplaceProps<Inner extends React.ElementType, P> = Omit<React.ComponentPropsWithRef<Inner>, P> & P;
5
5
  export interface BsPrefixOnlyProps {
6
6
  bsPrefix?: string;
7
7
  }
@@ -19,6 +19,6 @@ export interface BsPrefixRefForwardingComponent<TInitial extends React.ElementTy
19
19
  }
20
20
  export declare class BsPrefixComponent<As extends React.ElementType, P = unknown> extends React.Component<ReplaceProps<As, BsPrefixProps<As> & P>> {
21
21
  }
22
- export declare type BsPrefixComponentClass<As extends React.ElementType, P = unknown> = React.ComponentClass<ReplaceProps<As, BsPrefixProps<As> & P>>;
23
- export declare type TransitionType = boolean | TransitionComponent;
22
+ export type BsPrefixComponentClass<As extends React.ElementType, P = unknown> = React.ComponentClass<ReplaceProps<As, BsPrefixProps<As> & P>>;
23
+ export type TransitionType = boolean | TransitionComponent;
24
24
  export declare function getOverlayDirection(placement: string, isRTL?: boolean): string;
package/esm/helpers.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import * as React from 'react';
2
- export class BsPrefixComponent extends React.Component {} // Need to use this instead of typeof Component to get proper type checking.
2
+ export class BsPrefixComponent extends React.Component {}
3
+
4
+ // Need to use this instead of typeof Component to get proper type checking.
3
5
 
4
6
  export function getOverlayDirection(placement, isRTL) {
5
7
  let bsDirection = placement;
6
-
7
8
  if (placement === 'left') {
8
9
  bsDirection = isRTL ? 'end' : 'start';
9
10
  } else if (placement === 'right') {
10
11
  bsDirection = isRTL ? 'start' : 'end';
11
12
  }
12
-
13
13
  return bsDirection;
14
14
  }
@@ -1,2 +1,2 @@
1
1
  /// <reference types="react" />
2
- export default function safeFindDOMNode(componentOrElement: React.ComponentClass | Element | null | undefined): Element | Text | null;
2
+ export default function safeFindDOMNode(componentOrElement: React.Component | Element | null | undefined): Element | Text | null;
@@ -3,6 +3,5 @@ export default function safeFindDOMNode(componentOrElement) {
3
3
  if (componentOrElement && 'setState' in componentOrElement) {
4
4
  return ReactDOM.findDOMNode(componentOrElement);
5
5
  }
6
-
7
6
  return componentOrElement != null ? componentOrElement : null;
8
7
  }
@@ -1,12 +1,10 @@
1
1
  import css from 'dom-helpers/css';
2
2
  import transitionEnd from 'dom-helpers/transitionEnd';
3
-
4
3
  function parseDuration(node, property) {
5
4
  const str = css(node, property) || '';
6
5
  const mult = str.indexOf('ms') === -1 ? 1000 : 1;
7
6
  return parseFloat(str) * mult;
8
7
  }
9
-
10
8
  export default function transitionEndListener(element, handler) {
11
9
  const duration = parseDuration(element, 'transitionDuration');
12
10
  const delay = parseDuration(element, 'transitionDelay');
package/esm/types.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import { State } from '@restart/ui/usePopper';
3
- export declare type Variant = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string;
4
- export declare type ButtonVariant = Variant | 'link' | 'outline-primary' | 'outline-secondary' | 'outline-success' | 'outline-danger' | 'outline-warning' | 'outline-info' | 'outline-dark' | 'outline-light';
5
- export declare type Color = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | 'white' | 'muted';
6
- export declare type Placement = import('@restart/ui/usePopper').Placement;
7
- export declare type AlignDirection = 'start' | 'end';
8
- export declare type ResponsiveAlignProp = {
3
+ export type Variant = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string;
4
+ export type ButtonVariant = Variant | 'link' | 'outline-primary' | 'outline-secondary' | 'outline-success' | 'outline-danger' | 'outline-warning' | 'outline-info' | 'outline-dark' | 'outline-light';
5
+ export type Color = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | 'white' | 'muted';
6
+ export type Placement = import('@restart/ui/usePopper').Placement;
7
+ export type AlignDirection = 'start' | 'end';
8
+ export type ResponsiveAlignProp = {
9
9
  sm: AlignDirection;
10
10
  } | {
11
11
  md: AlignDirection;
@@ -16,10 +16,10 @@ export declare type ResponsiveAlignProp = {
16
16
  } | {
17
17
  xxl: AlignDirection;
18
18
  } | Record<string, AlignDirection>;
19
- export declare type AlignType = AlignDirection | ResponsiveAlignProp;
20
- export declare const alignPropType: PropTypes.Requireable<object | AlignDirection>;
21
- export declare type RootCloseEvent = 'click' | 'mousedown';
22
- export declare type GapValue = 0 | 1 | 2 | 3 | 4 | 5;
19
+ export type AlignType = AlignDirection | ResponsiveAlignProp;
20
+ export declare const alignPropType: PropTypes.Requireable<NonNullable<object | AlignDirection | null | undefined>>;
21
+ export type RootCloseEvent = 'click' | 'mousedown';
22
+ export type GapValue = 0 | 1 | 2 | 3 | 4 | 5;
23
23
  export interface PopperRef {
24
24
  state: State | undefined;
25
25
  outOfBoundaries: boolean;
@@ -1,9 +1,10 @@
1
1
  import { useMemo, useRef } from 'react';
2
2
  import hasClass from 'dom-helpers/hasClass';
3
3
  import { useBootstrapPrefix } from './ThemeProvider';
4
- import Popover from './Popover'; // This is meant for internal use.
5
- // This applies a custom offset to the overlay if it's a popover.
4
+ import Popover from './Popover';
6
5
 
6
+ // This is meant for internal use.
7
+ // This applies a custom offset to the overlay if it's a popover.
7
8
  export default function useOverlayOffset(customOffset) {
8
9
  const overlayRef = useRef(null);
9
10
  const popoverClass = useBootstrapPrefix(undefined, 'popover');
@@ -14,7 +15,6 @@ export default function useOverlayOffset(customOffset) {
14
15
  if (overlayRef.current && hasClass(overlayRef.current, popoverClass)) {
15
16
  return customOffset || Popover.POPPER_OFFSET;
16
17
  }
17
-
18
18
  return customOffset || [0, 0];
19
19
  }
20
20
  }
@@ -1,7 +1,7 @@
1
1
  import { ColProps } from './Col';
2
2
  import { Variant } from './types';
3
- export declare type PlaceholderAnimation = 'glow' | 'wave';
4
- export declare type PlaceholderSize = 'xs' | 'sm' | 'lg';
3
+ export type PlaceholderAnimation = 'glow' | 'wave';
4
+ export type PlaceholderSize = 'xs' | 'sm' | 'lg';
5
5
  export interface UsePlaceholderProps extends Omit<ColProps, 'as'> {
6
6
  animation?: PlaceholderAnimation;
7
7
  bg?: Variant;
@@ -13,7 +13,8 @@ export default function usePlaceholder({
13
13
  className,
14
14
  ...colProps
15
15
  }] = useCol(props);
16
- return { ...colProps,
16
+ return {
17
+ ...colProps,
17
18
  className: classNames(className, animation ? `${bsPrefix}-${animation}` : bsPrefix, size && `${bsPrefix}-${size}`, bg && `bg-${bg}`)
18
19
  };
19
20
  }
@@ -0,0 +1,4 @@
1
+ export default function usePopperMarginModifiers(): [
2
+ (overlay: HTMLDivElement) => void,
3
+ Array<Record<string, unknown>>
4
+ ];
@@ -3,11 +3,12 @@ import { useCallback } from 'react';
3
3
  import useMergedRefs from '@restart/hooks/useMergedRefs';
4
4
  export default function useWrappedRefWithWarning(ref, componentName) {
5
5
  // @ts-ignore
6
- if (!(process.env.NODE_ENV !== "production")) return ref; // eslint-disable-next-line react-hooks/rules-of-hooks
6
+ if (!(process.env.NODE_ENV !== "production")) return ref;
7
7
 
8
+ // eslint-disable-next-line react-hooks/rules-of-hooks
8
9
  const warningRef = useCallback(refValue => {
9
10
  !(refValue == null || !refValue.isReactComponent) ? process.env.NODE_ENV !== "production" ? invariant(false, `${componentName} injected a ref to a provided \`as\` component that resolved to a component instance instead of a DOM element. ` + 'Use `React.forwardRef` to provide the injected ref to the class component as a prop in order to pass it directly to a DOM element') : invariant(false) : void 0;
10
- }, [componentName]); // eslint-disable-next-line react-hooks/rules-of-hooks
11
-
11
+ }, [componentName]);
12
+ // eslint-disable-next-line react-hooks/rules-of-hooks
12
13
  return useMergedRefs(warningRef, ref);
13
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-bootstrap",
3
- "version": "2.5.0",
3
+ "version": "2.7.0",
4
4
  "description": "Bootstrap 5 components built with React",
5
5
  "keywords": [
6
6
  "bootstrap",
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@babel/runtime": "^7.17.2",
39
39
  "@restart/hooks": "^0.4.6",
40
- "@restart/ui": "^1.3.1",
40
+ "@restart/ui": "^1.4.1",
41
41
  "@types/react-transition-group": "^4.4.4",
42
42
  "classnames": "^2.3.1",
43
43
  "dom-helpers": "^5.2.1",