react-bootstrap 2.10.5 → 2.10.6

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.
@@ -8,6 +8,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
8
8
  const AccordionHeader = /*#__PURE__*/React.forwardRef(({
9
9
  // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
10
10
  as: Component = 'h2',
11
+ 'aria-controls': ariaControls,
11
12
  bsPrefix,
12
13
  className,
13
14
  children,
@@ -21,6 +22,7 @@ const AccordionHeader = /*#__PURE__*/React.forwardRef(({
21
22
  className: classNames(className, bsPrefix),
22
23
  children: /*#__PURE__*/_jsx(AccordionButton, {
23
24
  onClick: onClick,
25
+ "aria-controls": ariaControls,
24
26
  children: children
25
27
  })
26
28
  });
package/esm/Collapse.js CHANGED
@@ -2,6 +2,7 @@ import classNames from 'classnames';
2
2
  import css from 'dom-helpers/css';
3
3
  import React, { useMemo } from 'react';
4
4
  import { ENTERED, ENTERING, EXITED, EXITING } from 'react-transition-group/Transition';
5
+ import { getChildRef } from '@restart/ui/utils';
5
6
  import transitionEndListener from './transitionEndListener';
6
7
  import createChainedFunction from './createChainedFunction';
7
8
  import triggerBrowserReflow from './triggerBrowserReflow';
@@ -77,7 +78,7 @@ const Collapse = /*#__PURE__*/React.forwardRef(({
77
78
  onEntered: handleEntered,
78
79
  onExit: handleExit,
79
80
  onExiting: handleExiting,
80
- childRef: children.ref,
81
+ childRef: getChildRef(children),
81
82
  in: inProp,
82
83
  timeout: timeout,
83
84
  mountOnEnter: mountOnEnter,
package/esm/Fade.js CHANGED
@@ -2,7 +2,7 @@ import classNames from 'classnames';
2
2
  import * as React from 'react';
3
3
  import { useCallback } from 'react';
4
4
  import { ENTERED, ENTERING } from 'react-transition-group/Transition';
5
- import { getReactVersion } from '@restart/ui/utils';
5
+ import { getChildRef } from '@restart/ui/utils';
6
6
  import transitionEndListener from './transitionEndListener';
7
7
  import triggerBrowserReflow from './triggerBrowserReflow';
8
8
  import TransitionWrapper from './TransitionWrapper';
@@ -30,16 +30,12 @@ const Fade = /*#__PURE__*/React.forwardRef(({
30
30
  triggerBrowserReflow(node);
31
31
  onEnter == null || onEnter(node, isAppearing);
32
32
  }, [onEnter]);
33
- const {
34
- major
35
- } = getReactVersion();
36
- const childRef = major >= 19 ? children.props.ref : children.ref;
37
33
  return /*#__PURE__*/_jsx(TransitionWrapper, {
38
34
  ref: ref,
39
35
  addEndListener: transitionEndListener,
40
36
  ...props,
41
37
  onEnter: handleEnter,
42
- childRef: childRef,
38
+ childRef: getChildRef(children),
43
39
  children: (status, innerProps) => /*#__PURE__*/React.cloneElement(children, {
44
40
  ...innerProps,
45
41
  className: classNames('fade', className, children.props.className, fadeStyles[status], transitionClasses[status])
package/esm/Nav.js CHANGED
@@ -1,7 +1,6 @@
1
1
  "use client";
2
2
 
3
3
  import classNames from 'classnames';
4
- import all from 'prop-types-extra/lib/all';
5
4
  import * as React from 'react';
6
5
  import { useContext } from 'react';
7
6
  import { useUncontrolled } from 'uncontrollable';
@@ -3,6 +3,7 @@
3
3
  import classNames from 'classnames';
4
4
  import * as React from 'react';
5
5
  import { ENTERED, ENTERING, EXITING } from 'react-transition-group/Transition';
6
+ import { getChildRef } from '@restart/ui/utils';
6
7
  import transitionEndListener from './transitionEndListener';
7
8
  import TransitionWrapper from './TransitionWrapper';
8
9
  import { useBootstrapPrefix } from './ThemeProvider';
@@ -30,7 +31,7 @@ const OffcanvasToggling = /*#__PURE__*/React.forwardRef(({
30
31
  unmountOnExit: unmountOnExit,
31
32
  appear: appear,
32
33
  ...props,
33
- childRef: children.ref,
34
+ childRef: getChildRef(children),
34
35
  children: (status, innerProps) => /*#__PURE__*/React.cloneElement(children, {
35
36
  ...innerProps,
36
37
  className: classNames(className, children.props.className, (status === ENTERING || status === EXITING) && `${bsPrefix}-toggling`, transitionStyles[status])
@@ -8,6 +8,7 @@ import useTimeout from '@restart/hooks/useTimeout';
8
8
  import warning from 'warning';
9
9
  import { useUncontrolledProp } from 'uncontrollable';
10
10
  import useMergedRefs from '@restart/hooks/useMergedRefs';
11
+ import { getChildRef } from '@restart/ui/utils';
11
12
  import Overlay from './Overlay';
12
13
  import safeFindDOMNode from './safeFindDOMNode';
13
14
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -49,7 +50,7 @@ const OverlayTrigger = ({
49
50
  ...props
50
51
  }) => {
51
52
  const triggerNodeRef = useRef(null);
52
- const mergedRef = useMergedRefs(triggerNodeRef, children.ref);
53
+ const mergedRef = useMergedRefs(triggerNodeRef, getChildRef(children));
53
54
  const timeout = useTimeout();
54
55
  const hoverStateRef = useRef('');
55
56
  const [show, setShow] = useUncontrolledProp(propsShow, defaultShow, onToggle);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-bootstrap",
3
- "version": "2.10.5",
3
+ "version": "2.10.6",
4
4
  "description": "Bootstrap 5 components built with React",
5
5
  "keywords": [
6
6
  "bootstrap",
@@ -36,7 +36,7 @@
36
36
  "dependencies": {
37
37
  "@babel/runtime": "^7.24.7",
38
38
  "@restart/hooks": "^0.4.9",
39
- "@restart/ui": "^1.6.9",
39
+ "@restart/ui": "^1.9.0",
40
40
  "@types/react-transition-group": "^4.4.6",
41
41
  "classnames": "^2.3.2",
42
42
  "dom-helpers": "^5.2.1",