@primer/react 0.0.0-20260408160728 → 0.0.0-20260408162035

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.
@@ -1,5 +1,5 @@
1
- import './ActionBar-a41224b2.css';
1
+ import './ActionBar-3f7b52a3.css';
2
2
 
3
- var styles = {"List":"prc-ActionBar-List-9uz46","Divider":"prc-ActionBar-Divider-6V8yH","Nav":"prc-ActionBar-Nav-9spON","Group":"prc-ActionBar-Group-peNCk"};
3
+ var styles = {"List":"prc-ActionBar-List-9uz46","detect-overflow":"prc-ActionBar-detect-overflow-mAuJu","Divider":"prc-ActionBar-Divider-6V8yH","Nav":"prc-ActionBar-Nav-9spON","Group":"prc-ActionBar-Group-peNCk","OverflowContainer":"prc-ActionBar-OverflowContainer-AkYZs","MoreButton":"prc-ActionBar-MoreButton-RHqpx"};
4
4
 
5
5
  export { styles as default };
@@ -1,7 +1,7 @@
1
1
  export type { ActionBarProps, ActionBarMenuProps, ActionBarMenuItemProps } from './ActionBar';
2
2
  declare const ActionBar: import("react").FC<import("react").PropsWithChildren<import("./ActionBar").ActionBarProps>> & {
3
3
  IconButton: import("react").ForwardRefExoticComponent<import("./ActionBar").ActionBarIconButtonProps & import("react").RefAttributes<unknown>>;
4
- Divider: () => import("react").JSX.Element | null;
4
+ Divider: () => import("react").JSX.Element;
5
5
  Group: import("react").ForwardRefExoticComponent<{
6
6
  children?: import("react").ReactNode | undefined;
7
7
  } & import("react").RefAttributes<unknown>>;
@@ -7,12 +7,12 @@ import { invariant } from '../utils/invariant.js';
7
7
  import { clsx } from 'clsx';
8
8
  import classes from './Heading.module.css.js';
9
9
  import { jsx } from 'react/jsx-runtime';
10
- import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
10
+ import { useMergedRefs } from '../hooks/useMergedRefs.js';
11
11
  import Heading$1 from '../Heading/Heading.js';
12
12
 
13
13
  const Heading = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
14
14
  var _props$id;
15
- const $ = c(20);
15
+ const $ = c(21);
16
16
  let as;
17
17
  let children;
18
18
  let className;
@@ -45,7 +45,7 @@ const Heading = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
45
45
  }
46
46
  const visuallyHidden = t1 === undefined ? false : t1;
47
47
  const innerRef = React.useRef(null);
48
- useRefObjectAsForwardedRef(forwardedRef, innerRef);
48
+ const mergedRef = useMergedRefs(forwardedRef, innerRef);
49
49
  const {
50
50
  headingId,
51
51
  variant: listVariant
@@ -65,11 +65,11 @@ const Heading = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
65
65
  t4 = $[8];
66
66
  }
67
67
  let t5;
68
- if ($[9] !== as || $[10] !== children || $[11] !== listVariant || $[12] !== props || $[13] !== size || $[14] !== t3 || $[15] !== t4) {
68
+ if ($[9] !== as || $[10] !== children || $[11] !== listVariant || $[12] !== mergedRef || $[13] !== props || $[14] !== size || $[15] !== t3 || $[16] !== t4) {
69
69
  t5 = /*#__PURE__*/jsx(Heading$1, {
70
70
  as: as,
71
71
  variant: size,
72
- ref: innerRef,
72
+ ref: mergedRef,
73
73
  id: t3,
74
74
  className: t4,
75
75
  "data-list-variant": listVariant,
@@ -79,25 +79,26 @@ const Heading = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
79
79
  $[9] = as;
80
80
  $[10] = children;
81
81
  $[11] = listVariant;
82
- $[12] = props;
83
- $[13] = size;
84
- $[14] = t3;
85
- $[15] = t4;
86
- $[16] = t5;
82
+ $[12] = mergedRef;
83
+ $[13] = props;
84
+ $[14] = size;
85
+ $[15] = t3;
86
+ $[16] = t4;
87
+ $[17] = t5;
87
88
  } else {
88
- t5 = $[16];
89
+ t5 = $[17];
89
90
  }
90
91
  let t6;
91
- if ($[17] !== t2 || $[18] !== t5) {
92
+ if ($[18] !== t2 || $[19] !== t5) {
92
93
  t6 = /*#__PURE__*/jsx(VisuallyHidden, {
93
94
  isVisible: t2,
94
95
  children: t5
95
96
  });
96
- $[17] = t2;
97
- $[18] = t5;
98
- $[19] = t6;
97
+ $[18] = t2;
98
+ $[19] = t5;
99
+ $[20] = t6;
99
100
  } else {
100
- t6 = $[19];
101
+ t6 = $[20];
101
102
  }
102
103
  return t6;
103
104
  });
@@ -1,6 +1,6 @@
1
1
  import React, { useContext, useState, useCallback, useEffect } from 'react';
2
2
  import { AutocompleteContext, AutocompleteInputContext } from './AutocompleteContext.js';
3
- import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
3
+ import { useMergedRefs } from '../hooks/useMergedRefs.js';
4
4
  import useSafeTimeout from '../hooks/useSafeTimeout.js';
5
5
  import { jsx } from 'react/jsx-runtime';
6
6
  import TextInput from '../TextInput/TextInput.js';
@@ -36,7 +36,7 @@ const AutocompleteInput = /*#__PURE__*/React.forwardRef(({
36
36
  inputValue = '',
37
37
  isMenuDirectlyActivated
38
38
  } = inputContext;
39
- useRefObjectAsForwardedRef(forwardedRef, inputRef);
39
+ const mergedRef = useMergedRefs(forwardedRef, inputRef);
40
40
  const [highlightRemainingText, setHighlightRemainingText] = useState(true);
41
41
  const {
42
42
  safeSetTimeout
@@ -130,7 +130,7 @@ const AutocompleteInput = /*#__PURE__*/React.forwardRef(({
130
130
  onKeyDown: handleInputKeyDown,
131
131
  onKeyPress: onInputKeyPress,
132
132
  onKeyUp: handleInputKeyUp,
133
- ref: inputRef,
133
+ ref: mergedRef,
134
134
  "aria-controls": `${id}-listbox`,
135
135
  "aria-autocomplete": "both",
136
136
  role: "combobox",
@@ -1,6 +1,6 @@
1
1
  import { useContext, useRef, useEffect, useCallback } from 'react';
2
2
  import { AutocompleteContext } from './AutocompleteContext.js';
3
- import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
3
+ import { useMergedRefs } from '../hooks/useMergedRefs.js';
4
4
  import VisuallyHidden from '../_VisuallyHidden.js';
5
5
  import classes from './AutocompleteOverlay.module.css.js';
6
6
  import { clsx } from 'clsx';
@@ -48,7 +48,7 @@ function AutocompleteOverlay({
48
48
  align: 'start',
49
49
  anchorElementRef: computedAnchorRef
50
50
  }, [showMenu, selectedItemLength]);
51
- useRefObjectAsForwardedRef(scrollContainerRef, floatingElementRef);
51
+ const mergedRef = useMergedRefs(scrollContainerRef, floatingElementRef);
52
52
  const closeOptionList = useCallback(() => {
53
53
  setShowMenu(false);
54
54
  }, [setShowMenu]);
@@ -60,7 +60,7 @@ function AutocompleteOverlay({
60
60
  preventFocusOnOpen: true,
61
61
  onClickOutside: closeOptionList,
62
62
  onEscape: closeOptionList,
63
- ref: floatingElementRef,
63
+ ref: mergedRef,
64
64
  top: position === null || position === void 0 ? void 0 : position.top,
65
65
  left: position === null || position === void 0 ? void 0 : position.left,
66
66
  className: clsx(classes.Overlay, className),
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonBase.d.ts","sourceRoot":"","sources":["../../src/Button/ButtonBase.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAC/F,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,SAAS,CAAA;AA2BxC,QAAA,MAAM,UAAU,EA2JV,8BAA8B,CAAC,QAAQ,GAAG,GAAG,EAAE,WAAW,CAAC,CAAA;AAEjE,OAAO,EAAC,UAAU,EAAC,CAAA"}
1
+ {"version":3,"file":"ButtonBase.d.ts","sourceRoot":"","sources":["../../src/Button/ButtonBase.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAC/F,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,SAAS,CAAA;AA2BxC,QAAA,MAAM,UAAU,EA0JV,8BAA8B,CAAC,QAAQ,GAAG,GAAG,EAAE,WAAW,CAAC,CAAA;AAEjE,OAAO,EAAC,UAAU,EAAC,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import React, { forwardRef } from 'react';
2
- import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
2
+ import { useMergedRefs } from '../hooks/useMergedRefs.js';
3
3
  import { ConditionalWrapper } from '../internal/components/ConditionalWrapper.js';
4
4
  import { clsx } from 'clsx';
5
5
  import classes from './ButtonBase.module.css.js';
@@ -46,7 +46,7 @@ const ButtonBase = /*#__PURE__*/forwardRef(({
46
46
  ...rest
47
47
  } = props;
48
48
  const innerRef = React.useRef(null);
49
- useRefObjectAsForwardedRef(forwardedRef, innerRef);
49
+ const combinedRefs = useMergedRefs(forwardedRef, innerRef);
50
50
  const uuid = useId(id);
51
51
  const loadingAnnouncementID = `${uuid}-loading-announcement`;
52
52
 
@@ -74,8 +74,7 @@ const ButtonBase = /*#__PURE__*/forwardRef(({
74
74
  children: [/*#__PURE__*/jsx(Component, {
75
75
  "aria-disabled": loading ? true : undefined,
76
76
  ...rest,
77
- // @ts-ignore temporary disable as we migrate to css modules, until we remove PolymorphicForwardRefComponent
78
- ref: innerRef,
77
+ ref: combinedRefs,
79
78
  className: clsx(classes.ButtonBase, className),
80
79
  "data-block": block ? 'block' : null,
81
80
  "data-inactive": inactive ? true : undefined,
@@ -6,7 +6,7 @@ import { XIcon } from '@primer/octicons-react';
6
6
  import { useFocusZone } from '../hooks/useFocusZone.js';
7
7
  import { FocusKeys } from '@primer/behaviors';
8
8
  import { Portal } from '../Portal/Portal.js';
9
- import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
9
+ import { useMergedRefs } from '../hooks/useMergedRefs.js';
10
10
  import { useId } from '../hooks/useId.js';
11
11
  import classes from './Dialog.module.css.js';
12
12
  import { clsx } from 'clsx';
@@ -131,7 +131,7 @@ const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
131
131
  footer: Dialog.Footer
132
132
  });
133
133
  const dialogRef = useRef(null);
134
- useRefObjectAsForwardedRef(forwardedRef, dialogRef);
134
+ const mergedRef = useMergedRefs(forwardedRef, dialogRef);
135
135
  const backdropRef = useRef(null);
136
136
  useFocusTrap({
137
137
  containerRef: dialogRef,
@@ -205,7 +205,7 @@ const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
205
205
  setLastMouseDownIsBackdrop(e.target === e.currentTarget);
206
206
  },
207
207
  children: /*#__PURE__*/jsxs("div", {
208
- ref: dialogRef,
208
+ ref: mergedRef,
209
209
  role: role,
210
210
  "aria-labelledby": dialogLabelId,
211
211
  "aria-describedby": dialogDescriptionId,
@@ -2,7 +2,7 @@ import { clsx } from 'clsx';
2
2
  import React, { forwardRef, useEffect } from 'react';
3
3
  import classes from './Heading.module.css.js';
4
4
  import { jsx } from 'react/jsx-runtime';
5
- import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
5
+ import { useMergedRefs } from '../hooks/useMergedRefs.js';
6
6
 
7
7
  const Heading = /*#__PURE__*/forwardRef(({
8
8
  as: Component = 'h2',
@@ -11,7 +11,7 @@ const Heading = /*#__PURE__*/forwardRef(({
11
11
  ...props
12
12
  }, forwardedRef) => {
13
13
  const innerRef = React.useRef(null);
14
- useRefObjectAsForwardedRef(forwardedRef, innerRef);
14
+ const mergedRef = useMergedRefs(forwardedRef, innerRef);
15
15
  if (process.env.NODE_ENV !== "production") {
16
16
  /**
17
17
  * The Linter yells because it thinks this conditionally calls an effect,
@@ -31,7 +31,7 @@ const Heading = /*#__PURE__*/forwardRef(({
31
31
  className: clsx(className, classes.Heading),
32
32
  "data-variant": variant,
33
33
  ...props,
34
- ref: innerRef
34
+ ref: mergedRef
35
35
  });
36
36
  });
37
37
  Heading.displayName = 'Heading';
@@ -1 +1 @@
1
- {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/Link/Link.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAY,KAAK,YAAY,EAAkB,MAAM,OAAO,CAAA;AAG1E,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAA;AAClD,OAAO,EAAC,KAAK,gBAAgB,EAAkB,MAAM,6BAA6B,CAAA;AAElF,KAAK,eAAe,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI;IACzD,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,EAC9D,OAAO,gBAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,eAAe,CAAC,EACjD,KAAK,YAAY,CAAC,OAAO,CAAC,sBAyC3B,CAAA;AAID,QAAA,MAAM,IAAI,IA/CoB,EAAE,SAAS,KAAK,CAAC,WAAW;;;;CA+CM,CAAA;AAEhE,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,CAAA;AACnD,eAAe,IAAI,CAAA"}
1
+ {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/Link/Link.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAY,KAAK,YAAY,EAAkB,MAAM,OAAO,CAAA;AAG1E,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAA;AAClD,OAAO,EAAC,KAAK,gBAAgB,EAAkB,MAAM,6BAA6B,CAAA;AAElF,KAAK,eAAe,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI;IACzD,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,EAC9D,OAAO,gBAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,eAAe,CAAC,EACjD,KAAK,YAAY,CAAC,OAAO,CAAC,sBAwC3B,CAAA;AAID,QAAA,MAAM,IAAI,IA9CoB,EAAE,SAAS,KAAK,CAAC,WAAW;;;;CA8CM,CAAA;AAEhE,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,CAAA;AACnD,eAAe,IAAI,CAAA"}
package/dist/Link/Link.js CHANGED
@@ -3,7 +3,7 @@ import React, { useEffect } from 'react';
3
3
  import classes from './Link.module.css.js';
4
4
  import { fixedForwardRef } from '../utils/modern-polymorphic.js';
5
5
  import { jsx } from 'react/jsx-runtime';
6
- import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
6
+ import { useMergedRefs } from '../hooks/useMergedRefs.js';
7
7
 
8
8
  const UnwrappedLink = (props, ref) => {
9
9
  const {
@@ -15,7 +15,7 @@ const UnwrappedLink = (props, ref) => {
15
15
  ...restProps
16
16
  } = props;
17
17
  const innerRef = React.useRef(null);
18
- useRefObjectAsForwardedRef(ref, innerRef);
18
+ const mergedRef = useMergedRefs(ref, innerRef);
19
19
  if (process.env.NODE_ENV !== "production") {
20
20
  /**
21
21
  * The Linter yells because it thinks this conditionally calls an effect,
@@ -37,8 +37,7 @@ const UnwrappedLink = (props, ref) => {
37
37
  "data-inline": inline,
38
38
  "data-hover-color": hoverColor,
39
39
  ...restProps,
40
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
41
- ref: innerRef
40
+ ref: mergedRef
42
41
  });
43
42
  };
44
43
  UnwrappedLink.displayName = "UnwrappedLink";
@@ -2,7 +2,7 @@ import { c } from 'react-compiler-runtime';
2
2
  import React, { useRef, useEffect } from 'react';
3
3
  import useIsomorphicLayoutEffect from '../utils/useIsomorphicLayoutEffect.js';
4
4
  import { Portal } from '../Portal/Portal.js';
5
- import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
5
+ import { useMergedRefs } from '../hooks/useMergedRefs.js';
6
6
  import classes from './Overlay.module.css.js';
7
7
  import { clsx } from 'clsx';
8
8
  import { jsx } from 'react/jsx-runtime';
@@ -116,7 +116,7 @@ const BaseOverlay = /*#__PURE__*/React.forwardRef(({
116
116
 
117
117
  */
118
118
  const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
119
- const $ = c(49);
119
+ const $ = c(50);
120
120
  let _PrivateDisablePortal;
121
121
  let anchorSide;
122
122
  let ignoreClickRefs;
@@ -202,7 +202,7 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
202
202
  const width = t5 === undefined ? "auto" : t5;
203
203
  const featureFlagMaxHeightClampToViewport = useFeatureFlag("primer_react_overlay_max_height_clamp_to_viewport");
204
204
  const overlayRef = useRef(null);
205
- useRefObjectAsForwardedRef(forwardedRef, overlayRef);
205
+ const mergedRef = useMergedRefs(forwardedRef, overlayRef);
206
206
  const cssAnchorPositioning = useFeatureFlag("primer_react_css_anchor_positioning");
207
207
  let t6;
208
208
  if ($[19] !== ignoreClickRefs || $[20] !== initialFocusRef || $[21] !== onClickOutside || $[22] !== onEscape || $[23] !== preventFocusOnOpen || $[24] !== returnFocusRef) {
@@ -286,12 +286,12 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
286
286
  t12 = $[34];
287
287
  }
288
288
  let t13;
289
- if ($[35] !== height || $[36] !== leftPosition || $[37] !== props || $[38] !== responsiveVariant || $[39] !== right || $[40] !== role || $[41] !== t11 || $[42] !== t12 || $[43] !== visibility || $[44] !== width) {
289
+ if ($[35] !== height || $[36] !== leftPosition || $[37] !== mergedRef || $[38] !== props || $[39] !== responsiveVariant || $[40] !== right || $[41] !== role || $[42] !== t11 || $[43] !== t12 || $[44] !== visibility || $[45] !== width) {
290
290
  t13 = /*#__PURE__*/jsx(BaseOverlay, {
291
291
  role: role,
292
292
  width: width,
293
293
  "data-reflow-container": t11,
294
- ref: overlayRef,
294
+ ref: mergedRef,
295
295
  left: leftPosition,
296
296
  right: right,
297
297
  height: height,
@@ -302,33 +302,34 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
302
302
  });
303
303
  $[35] = height;
304
304
  $[36] = leftPosition;
305
- $[37] = props;
306
- $[38] = responsiveVariant;
307
- $[39] = right;
308
- $[40] = role;
309
- $[41] = t11;
310
- $[42] = t12;
311
- $[43] = visibility;
312
- $[44] = width;
313
- $[45] = t13;
305
+ $[37] = mergedRef;
306
+ $[38] = props;
307
+ $[39] = responsiveVariant;
308
+ $[40] = right;
309
+ $[41] = role;
310
+ $[42] = t11;
311
+ $[43] = t12;
312
+ $[44] = visibility;
313
+ $[45] = width;
314
+ $[46] = t13;
314
315
  } else {
315
- t13 = $[45];
316
+ t13 = $[46];
316
317
  }
317
318
  const overlayContent = t13;
318
319
  if (_PrivateDisablePortal && cssAnchorPositioning) {
319
320
  return overlayContent;
320
321
  }
321
322
  let t14;
322
- if ($[46] !== overlayContent || $[47] !== portalContainerName) {
323
+ if ($[47] !== overlayContent || $[48] !== portalContainerName) {
323
324
  t14 = /*#__PURE__*/jsx(Portal, {
324
325
  containerName: portalContainerName,
325
326
  children: overlayContent
326
327
  });
327
- $[46] = overlayContent;
328
- $[47] = portalContainerName;
329
- $[48] = t14;
328
+ $[47] = overlayContent;
329
+ $[48] = portalContainerName;
330
+ $[49] = t14;
330
331
  } else {
331
- t14 = $[48];
332
+ t14 = $[49];
332
333
  }
333
334
  return t14;
334
335
  });
@@ -1,7 +1,7 @@
1
1
  import React, { useRef, memo } from 'react';
2
2
  import { clsx } from 'clsx';
3
3
  import { useId } from '../hooks/useId.js';
4
- import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
4
+ import { useMergedRefs } from '../hooks/useMergedRefs.js';
5
5
  import { isResponsiveValue } from '../hooks/useResponsiveValue.js';
6
6
  import { useSlots } from '../hooks/useSlots.js';
7
7
  import { useOverflow } from '../hooks/useOverflow.js';
@@ -581,7 +581,7 @@ const Pane = /*#__PURE__*/React.forwardRef(({
581
581
  onResizeEnd,
582
582
  currentWidth: controlledWidth
583
583
  });
584
- useRefObjectAsForwardedRef(forwardRef, paneRef);
584
+ const mergedRef = useMergedRefs(forwardRef, paneRef);
585
585
  const hasOverflow = useOverflow(paneRef);
586
586
  const paneId = useId(id);
587
587
  const labelProp = {};
@@ -615,7 +615,7 @@ const Pane = /*#__PURE__*/React.forwardRef(({
615
615
  },
616
616
  position: positionProp
617
617
  }), /*#__PURE__*/jsx("div", {
618
- ref: paneRef
618
+ ref: mergedRef
619
619
  // Suppress hydration mismatch for --pane-width when localStorage
620
620
  // provides a width that differs from the server-rendered default.
621
621
  // Not needed when onResizeEnd is provided (localStorage isn't read).
@@ -785,7 +785,7 @@ const Sidebar = /*#__PURE__*/React.forwardRef(({
785
785
  contentWrapperRef: sidebarContentWrapperRef,
786
786
  constrainToViewport: true
787
787
  });
788
- useRefObjectAsForwardedRef(forwardRef, sidebarRef);
788
+ const mergedRef = useMergedRefs(forwardRef, sidebarRef);
789
789
  const hasOverflow = useOverflow(sidebarRef);
790
790
  const sidebarId = useId(id);
791
791
  const labelProp = {};
@@ -824,7 +824,7 @@ const Sidebar = /*#__PURE__*/React.forwardRef(({
824
824
  getDefaultWidth: getDefaultWidth,
825
825
  saveWidth: saveWidth
826
826
  }), /*#__PURE__*/jsx("div", {
827
- ref: sidebarRef
827
+ ref: mergedRef
828
828
  // Suppress hydration mismatch for --pane-width when localStorage
829
829
  // provides a width that differs from the server-rendered default.
830
830
  ,