@primer/react 0.0.0-20260310163541 → 0.0.0-20260310174259

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 (87) hide show
  1. package/CHANGELOG.md +1 -13
  2. package/dist/ActionList/{ActionList-8b212f46.css → ActionList-d0ad7f0b.css} +2 -2
  3. package/dist/ActionList/{ActionList-8b212f46.css.map → ActionList-d0ad7f0b.css.map} +1 -1
  4. package/dist/ActionList/ActionList.module.css.js +1 -1
  5. package/dist/ActionList/Description.d.ts.map +1 -1
  6. package/dist/ActionList/Description.js +25 -28
  7. package/dist/ActionList/Item.d.ts.map +1 -1
  8. package/dist/ActionList/Item.js +51 -95
  9. package/dist/ActionList/List.d.ts.map +1 -1
  10. package/dist/ActionList/List.js +41 -41
  11. package/dist/ActionList/shared.d.ts +0 -1
  12. package/dist/ActionList/shared.d.ts.map +1 -1
  13. package/dist/ActionMenu/ActionMenu.d.ts.map +1 -1
  14. package/dist/ActionMenu/ActionMenu.js +7 -10
  15. package/dist/AnchoredOverlay/AnchoredOverlay.d.ts +2 -2
  16. package/dist/AnchoredOverlay/AnchoredOverlay.d.ts.map +1 -1
  17. package/dist/AnchoredOverlay/AnchoredOverlay.js +17 -7
  18. package/dist/Autocomplete/AutocompleteInput.js +3 -3
  19. package/dist/Autocomplete/AutocompleteOverlay.js +3 -3
  20. package/dist/Button/ButtonBase.d.ts.map +1 -1
  21. package/dist/Button/ButtonBase.js +4 -3
  22. package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
  23. package/dist/ButtonGroup/ButtonGroup.js +23 -23
  24. package/dist/Checkbox/Checkbox.d.ts.map +1 -1
  25. package/dist/Checkbox/Checkbox.js +5 -5
  26. package/dist/Dialog/Dialog-b8e961f6.css +2 -0
  27. package/dist/Dialog/Dialog-b8e961f6.css.map +1 -0
  28. package/dist/Dialog/Dialog.d.ts +0 -11
  29. package/dist/Dialog/Dialog.d.ts.map +1 -1
  30. package/dist/Dialog/Dialog.js +10 -17
  31. package/dist/Dialog/Dialog.module.css.js +1 -1
  32. package/dist/FilteredActionList/FilteredActionList.d.ts.map +1 -1
  33. package/dist/FilteredActionList/FilteredActionList.js +8 -8
  34. package/dist/FormControl/FormControl.d.ts.map +1 -1
  35. package/dist/FormControl/FormControl.js +64 -81
  36. package/dist/FormControl/FormControlLabel.d.ts.map +1 -1
  37. package/dist/FormControl/FormControlLabel.js +15 -20
  38. package/dist/FormControl/_FormControlContext.d.ts +0 -6
  39. package/dist/FormControl/_FormControlContext.d.ts.map +1 -1
  40. package/dist/Heading/Heading.js +3 -3
  41. package/dist/Link/Link.d.ts.map +1 -1
  42. package/dist/Link/Link.js +4 -3
  43. package/dist/Overlay/Overlay.js +21 -22
  44. package/dist/PageHeader/PageHeader.d.ts.map +1 -1
  45. package/dist/PageHeader/PageHeader.js +31 -30
  46. package/dist/PageLayout/PageLayout.js +5 -5
  47. package/dist/SelectPanel/SelectPanel.d.ts.map +1 -1
  48. package/dist/SelectPanel/SelectPanel.js +6 -21
  49. package/dist/TextInput/TextInput.d.ts.map +1 -1
  50. package/dist/TextInput/TextInput.js +6 -5
  51. package/dist/TextInputWithTokens/TextInputWithTokens.d.ts.map +1 -1
  52. package/dist/TextInputWithTokens/TextInputWithTokens.js +264 -334
  53. package/dist/Timeline/{Timeline-19bef8c5.css → Timeline-116393ee.css} +2 -2
  54. package/dist/Timeline/{Timeline-19bef8c5.css.map → Timeline-116393ee.css.map} +1 -1
  55. package/dist/Timeline/Timeline.module.css.js +1 -1
  56. package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
  57. package/dist/TooltipV2/Tooltip.js +4 -4
  58. package/dist/deprecated/ActionMenu.d.ts.map +1 -1
  59. package/dist/deprecated/ActionMenu.js +7 -8
  60. package/dist/deprecated/DialogV1/Dialog.js +11 -12
  61. package/dist/experimental/SelectPanel2/SelectPanel.d.ts.map +1 -1
  62. package/dist/experimental/SelectPanel2/SelectPanel.js +4 -5
  63. package/dist/experimental/Tabs/Tabs.d.ts +1 -1
  64. package/dist/experimental/Tabs/Tabs.d.ts.map +1 -1
  65. package/dist/experimental/Tabs/Tabs.js +16 -16
  66. package/dist/hooks/index.d.ts +0 -1
  67. package/dist/hooks/index.d.ts.map +1 -1
  68. package/dist/hooks/useAnchoredPosition.js +1 -1
  69. package/dist/hooks/useFocusTrap.d.ts.map +1 -1
  70. package/dist/hooks/useFocusTrap.js +1 -1
  71. package/dist/hooks/useProvidedRefOrCreate.d.ts +0 -12
  72. package/dist/hooks/useProvidedRefOrCreate.d.ts.map +1 -1
  73. package/dist/hooks/useProvidedRefOrCreate.js +0 -12
  74. package/dist/hooks/useRefObjectAsForwardedRef.d.ts +0 -12
  75. package/dist/hooks/useRefObjectAsForwardedRef.d.ts.map +1 -1
  76. package/dist/hooks/useRefObjectAsForwardedRef.js +10 -14
  77. package/dist/index.d.ts +0 -1
  78. package/dist/index.d.ts.map +1 -1
  79. package/dist/index.js +0 -1
  80. package/generated/components.json +0 -21
  81. package/generated/hooks.json +0 -22
  82. package/package.json +1 -1
  83. package/dist/Dialog/Dialog-2d417a89.css +0 -2
  84. package/dist/Dialog/Dialog-2d417a89.css.map +0 -1
  85. package/dist/hooks/useCombinedRefs.d.ts +0 -51
  86. package/dist/hooks/useCombinedRefs.d.ts.map +0 -1
  87. package/dist/hooks/useCombinedRefs.js +0 -97
@@ -100,13 +100,6 @@ export interface DialogProps {
100
100
  * The position of the dialog
101
101
  */
102
102
  position?: 'center' | 'left' | 'right' | ResponsiveValue<'left' | 'right' | 'bottom' | 'fullscreen' | 'center'>;
103
- /**
104
- * The vertical alignment of the dialog. Only applies when position is 'center' (the default).
105
- * top: positions the Dialog ~4rem from the top of the screen, horizontally centered
106
- * center: (default) vertically centers the Dialog on the screen
107
- * bottom: positions the Dialog near the bottom of the screen, horizontally centered
108
- */
109
- align?: 'top' | 'center' | 'bottom';
110
103
  /**
111
104
  * Return focus to this element when the Dialog closes,
112
105
  * instead of the element that had focus immediately before the Dialog opened
@@ -120,10 +113,6 @@ export interface DialogProps {
120
113
  * Additional class names to apply to the dialog
121
114
  */
122
115
  className?: string;
123
- /**
124
- * Additional styles to apply to the dialog
125
- */
126
- style?: React.CSSProperties;
127
116
  }
128
117
  /**
129
118
  * Props that are passed to a component that serves as a dialog header
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsE,MAAM,OAAO,CAAA;AAC1F,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAA;AAW1C,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAA;AAChE,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAQ/F;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG;IAC7D;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAExD;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,SAAS,CAAA;IAExB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;;OAGG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;CAChD,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAEvB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC,CAAA;IAElF;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,iBAAiB,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,MAAM,OAAO,QAAQ,CAAA;AAC/C,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,SAAS,CAAA;AA+CjD,eAAO,MAAM,aAAa,mCAAqD,CAAA;AAmP/E,eAAO,MAAM,MAAM;;;;;;;;;;iBAhEuC,iBAAiB,EAAE;;;iBAkCf,MAAM,IAAI;;CAuCtE,CAAA"}
@@ -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 { useCombinedRefs } from '../hooks/useCombinedRefs.js';
9
+ import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
10
10
  import { useId } from '../hooks/useId.js';
11
11
  import classes from './Dialog.module.css.js';
12
12
  import { clsx } from 'clsx';
@@ -14,6 +14,7 @@ import { useSlots } from '../hooks/useSlots.js';
14
14
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
15
15
  import { useOnEscapePress } from '../hooks/useOnEscapePress.js';
16
16
  import { ScrollableRegion } from '../ScrollableRegion/ScrollableRegion.js';
17
+ import { useProvidedRefOrCreate } from '../hooks/useProvidedRefOrCreate.js';
17
18
 
18
19
  const DefaultHeader = ({
19
20
  dialogLabelId,
@@ -90,11 +91,9 @@ const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
90
91
  height = 'auto',
91
92
  footerButtons = defaultFooterButtons,
92
93
  position = defaultPosition,
93
- align,
94
94
  returnFocusRef,
95
95
  initialFocusRef,
96
- className,
97
- style
96
+ className
98
97
  } = props;
99
98
  const dialogLabelId = useId();
100
99
  const dialogDescriptionId = useId();
@@ -125,7 +124,7 @@ const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
125
124
  footer: Dialog.Footer
126
125
  });
127
126
  const dialogRef = useRef(null);
128
- const combinedRef = useCombinedRefs(forwardedRef, dialogRef);
127
+ useRefObjectAsForwardedRef(forwardedRef, dialogRef);
129
128
  const backdropRef = useRef(null);
130
129
  useFocusTrap({
131
130
  containerRef: dialogRef,
@@ -180,27 +179,20 @@ const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
180
179
  ref: backdropRef,
181
180
  className: classes.Backdrop,
182
181
  ...positionDataAttributes,
183
- ...(align && {
184
- 'data-align': align
185
- }),
186
182
  onClick: onBackdropClick,
187
183
  onMouseDown: e => {
188
184
  setLastMouseDownIsBackdrop(e.target === e.currentTarget);
189
185
  },
190
186
  children: /*#__PURE__*/jsxs("div", {
191
- ref: combinedRef,
187
+ ref: dialogRef,
192
188
  role: role,
193
189
  "aria-labelledby": dialogLabelId,
194
190
  "aria-describedby": dialogDescriptionId,
195
191
  "aria-modal": true,
196
192
  ...positionDataAttributes,
197
- ...(align && {
198
- 'data-align': align
199
- }),
200
193
  "data-width": width,
201
194
  "data-height": height,
202
195
  className: clsx(className, classes.Dialog),
203
- style: style,
204
196
  children: [header, /*#__PURE__*/jsx(ScrollableRegion, {
205
197
  "aria-labelledby": dialogLabelId,
206
198
  className: classes.DialogOverflowWrapper,
@@ -271,8 +263,7 @@ const Buttons = ({
271
263
  buttons
272
264
  }) => {
273
265
  var _buttons$find;
274
- const autoFocusRef = useRef(null);
275
- const combinedRef = useCombinedRefs(autoFocusRef, (_buttons$find = buttons.find(button => button.autoFocus)) === null || _buttons$find === void 0 ? void 0 : _buttons$find.ref);
266
+ const autoFocusRef = useProvidedRefOrCreate((_buttons$find = buttons.find(button => button.autoFocus)) === null || _buttons$find === void 0 ? void 0 : _buttons$find.ref);
276
267
  let autoFocusCount = 0;
277
268
  const [hasRendered, setHasRendered] = useState(0);
278
269
  useEffect(() => {
@@ -295,8 +286,10 @@ const Buttons = ({
295
286
  return /*#__PURE__*/jsx(ButtonComponent, {
296
287
  ...buttonProps,
297
288
  // 'normal' value is equivalent to 'default', this is used for backwards compatibility
298
- variant: buttonType === 'normal' ? 'default' : buttonType,
299
- ref: autoFocus && autoFocusCount === 0 ? (autoFocusCount++, combinedRef) : null,
289
+ variant: buttonType === 'normal' ? 'default' : buttonType
290
+ // @ts-expect-error it needs a non nullable ref
291
+ ,
292
+ ref: autoFocus && autoFocusCount === 0 ? (autoFocusCount++, autoFocusRef) : null,
300
293
  children: content
301
294
  }, index);
302
295
  })
@@ -1,4 +1,4 @@
1
- import './Dialog-2d417a89.css';
1
+ import './Dialog-b8e961f6.css';
2
2
 
3
3
  var classes = {"Backdrop":"prc-Dialog-Backdrop-5Nt2U","dialog-backdrop-appear":"prc-Dialog-dialog-backdrop-appear-tCG2K","Dialog":"prc-Dialog-Dialog-G8cDF","Overlay--motion-scaleFade":"prc-Dialog-Overlay--motion-scaleFade-mE6-C","Overlay--motion-slideInRight":"prc-Dialog-Overlay--motion-slideInRight-BR-CZ","Overlay--motion-slideInLeft":"prc-Dialog-Overlay--motion-slideInLeft-ISmQZ","Overlay--motion-slideUp":"prc-Dialog-Overlay--motion-slideUp-tPElO","DisableScroll":"prc-Dialog-DisableScroll-UkWFM","DialogOverflowWrapper":"prc-Dialog-DialogOverflowWrapper-JvHzz","Footer":"prc-Dialog-Footer-PMeQk","detect-scroll":"prc-Dialog-detect-scroll-b3i8Q","Header":"prc-Dialog-Header-f7Me-","HeaderInner":"prc-Dialog-HeaderInner-H-fFY","HeaderContent":"prc-Dialog-HeaderContent-mjAsn","Title":"prc-Dialog-Title-M-iPn","Subtitle":"prc-Dialog-Subtitle-aBFSq","Body":"prc-Dialog-Body-bB903"};
4
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"FilteredActionList.d.ts","sourceRoot":"","sources":["../../src/FilteredActionList/FilteredActionList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAuB,GAAG,EAAC,MAAM,OAAO,CAAA;AACpD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,cAAc,CAAA;AAEhD,OAAO,EAAa,KAAK,eAAe,EAAC,MA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EACd,QAAQ,EAAE,gBAAgB,EAC1B,kBAAkB,EAAE,0BAA0B,EAC9C,aAAa,EACb,gBAAgB,EAChB,OAAO,EACP,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,oBAA2B,EAC3B,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,gBAAyB,EACzB,uBAA6C,EAC7C,yBAAyB,EACzB,oBAA4B,EAC5B,eAAuB,EACvB,sBAAsB,EACtB,cAAc,EACd,WAAmB,EACnB,GAAG,SAAS,EACb,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CA8avC;yBA7ce,kBAAkB"}
@@ -4,6 +4,7 @@ import { useCallback, useRef, useState, useEffect, useMemo, forwardRef } from 'r
4
4
  import { ActionList } from '../ActionList/index.js';
5
5
  import { useFocusZone } from '../hooks/useFocusZone.js';
6
6
  import { useId } from '../hooks/useId.js';
7
+ import { useProvidedRefOrCreate } from '../hooks/useProvidedRefOrCreate.js';
7
8
  import { useProvidedStateOrCreate } from '../hooks/useProvidedStateOrCreate.js';
8
9
  import useScrollFlash from '../hooks/useScrollFlash.js';
9
10
  import { FilteredActionListLoadingTypes, FilteredActionListBodyLoader } from './FilteredActionListLoaders.js';
@@ -14,7 +15,6 @@ import { useAnnouncements } from './useAnnouncements.js';
14
15
  import { clsx } from 'clsx';
15
16
  import { useVirtualizer } from '@tanstack/react-virtual';
16
17
  import { jsxs, jsx } from 'react/jsx-runtime';
17
- import { useCombinedRefs } from '../hooks/useCombinedRefs.js';
18
18
  import TextInput from '../TextInput/TextInput.js';
19
19
  import { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden.js';
20
20
  import Checkbox from '../Checkbox/Checkbox.js';
@@ -73,10 +73,8 @@ function FilteredActionList({
73
73
  }, [onFilterChange, setInternalFilterValue]);
74
74
  const inputAndListContainerRef = useRef(null);
75
75
  const listRef = useRef(null);
76
- const scrollContainerRef = useRef(null);
77
- const combinedScrollContainerRef = useCombinedRefs(scrollContainerRef, providedScrollContainerRef);
78
- const inputRef = useRef(null);
79
- const combinedInputRef = useCombinedRefs(inputRef, providedInputRef);
76
+ const scrollContainerRef = useProvidedRefOrCreate(providedScrollContainerRef);
77
+ const inputRef = useProvidedRefOrCreate(providedInputRef);
80
78
  const usingRovingTabindex = _PrivateFocusManagement === 'roving-tabindex';
81
79
  const [listContainerElement, setListContainerElement] = useState(null);
82
80
  const activeDescendantRef = useRef();
@@ -389,8 +387,10 @@ function FilteredActionList({
389
387
  "data-testid": "filtered-action-list",
390
388
  children: [/*#__PURE__*/jsx("div", {
391
389
  className: classes.Header,
392
- children: /*#__PURE__*/jsx(TextInput, {
393
- ref: combinedInputRef,
390
+ children: /*#__PURE__*/jsx(TextInput
391
+ // @ts-expect-error it needs a non nullable ref
392
+ , {
393
+ ref: inputRef,
394
394
  block: true,
395
395
  width: "auto",
396
396
  color: "fg.default",
@@ -429,7 +429,7 @@ function FilteredActionList({
429
429
  children: selectAllLabelText
430
430
  })]
431
431
  }), /*#__PURE__*/jsx("div", {
432
- ref: combinedScrollContainerRef,
432
+ ref: scrollContainerRef,
433
433
  className: classes.Container,
434
434
  children: getBodyContent()
435
435
  })]
@@ -1 +1 @@
1
- {"version":3,"file":"FormControl.d.ts","sourceRoot":"","sources":["../../src/FormControl/FormControl.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAavC,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAA;AASvD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B,CAAA;;;;;;;;;;;;;;AAiMD,wBAME"}
1
+ {"version":3,"file":"FormControl.d.ts","sourceRoot":"","sources":["../../src/FormControl/FormControl.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAavC,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAA;AASvD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B,CAAA;;;;;;;;;;;;;;AAuLD,wBAME"}
@@ -25,7 +25,7 @@ import { SelectPanel } from '../SelectPanel/SelectPanel.js';
25
25
 
26
26
  const FormControl = /*#__PURE__*/React.forwardRef((t0, ref) => {
27
27
  var _slots$validation, _slots$label;
28
- const $ = c(32);
28
+ const $ = c(27);
29
29
  const {
30
30
  children,
31
31
  disabled: disabledProp,
@@ -60,18 +60,6 @@ const FormControl = /*#__PURE__*/React.forwardRef((t0, ref) => {
60
60
  const inputProps = /*#__PURE__*/React.isValidElement(InputComponent) && InputComponent.props;
61
61
  const isChoiceInput = /*#__PURE__*/React.isValidElement(InputComponent) && (InputComponent.type === Checkbox || InputComponent.type === Radio || isSlot(InputComponent, Checkbox) || isSlot(InputComponent, Radio));
62
62
  const isRadioInput = /*#__PURE__*/React.isValidElement(InputComponent) && (InputComponent.type === Radio || isSlot(InputComponent, Radio));
63
- const isSelectPanelInput = /*#__PURE__*/React.isValidElement(InputComponent) && (InputComponent.type === SelectPanel || isSlot(InputComponent, SelectPanel));
64
- let t3;
65
- if ($[1] !== id || $[2] !== slots.label) {
66
- var _ref;
67
- t3 = slots.label ? (_ref = /*#__PURE__*/React.isValidElement(slots.label) ? slots.label.props.id : undefined) !== null && _ref !== void 0 ? _ref : `${id}-label` : undefined;
68
- $[1] = id;
69
- $[2] = slots.label;
70
- $[3] = t3;
71
- } else {
72
- t3 = $[3];
73
- }
74
- const labelId = t3;
75
63
  if (InputComponent) {
76
64
  process.env.NODE_ENV !== "production" ? warning(inputProps === null || inputProps === void 0 ? void 0 : inputProps.id, "instead of passing the 'id' prop directly to the input component, it should be passed to the parent component, <FormControl>") : void 0;
77
65
  process.env.NODE_ENV !== "production" ? warning(inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled, "instead of passing the 'disabled' prop directly to the input component, it should be passed to the parent component, <FormControl>") : void 0;
@@ -87,97 +75,92 @@ const FormControl = /*#__PURE__*/React.forwardRef((t0, ref) => {
87
75
  process.env.NODE_ENV !== "production" ? warning(!!slots.leadingVisual, "A leading visual is only rendered for a checkbox or radio form control. If you want to render a leading visual inside of your input, check if your input supports a leading visual.") : void 0;
88
76
  }
89
77
  const isLabelHidden = (_slots$label = slots.label) === null || _slots$label === void 0 ? void 0 : _slots$label.props.visuallyHidden;
90
- const t4 = /*#__PURE__*/React.isValidElement(InputComponent) ? /*#__PURE__*/React.cloneElement(InputComponent, {
78
+ const t3 = /*#__PURE__*/React.isValidElement(InputComponent) ? /*#__PURE__*/React.cloneElement(InputComponent, {
91
79
  id,
92
80
  disabled,
93
81
  required: required && !isRadioInput,
94
82
  "aria-describedby": captionId
95
83
  }) : null;
96
- let t5;
97
- if ($[4] !== childrenWithoutSlots) {
98
- t5 = childrenWithoutSlots.filter(_temp2);
99
- $[4] = childrenWithoutSlots;
100
- $[5] = t5;
84
+ let t4;
85
+ if ($[1] !== childrenWithoutSlots) {
86
+ t4 = childrenWithoutSlots.filter(_temp2);
87
+ $[1] = childrenWithoutSlots;
88
+ $[2] = t4;
101
89
  } else {
102
- t5 = $[5];
90
+ t4 = $[2];
103
91
  }
104
- let t6;
105
- if ($[6] !== t4 || $[7] !== t5) {
106
- t6 = /*#__PURE__*/jsxs("div", {
92
+ let t5;
93
+ if ($[3] !== t3 || $[4] !== t4) {
94
+ t5 = /*#__PURE__*/jsxs("div", {
107
95
  className: classes.ControlChoiceInputs,
108
- children: [t4, t5]
96
+ children: [t3, t4]
109
97
  });
110
- $[6] = t4;
111
- $[7] = t5;
112
- $[8] = t6;
98
+ $[3] = t3;
99
+ $[4] = t4;
100
+ $[5] = t5;
113
101
  } else {
114
- t6 = $[8];
102
+ t5 = $[5];
115
103
  }
116
- let t7;
117
- if ($[9] !== disabled || $[10] !== slots.caption || $[11] !== slots.leadingVisual) {
118
- t7 = slots.leadingVisual ? /*#__PURE__*/jsx("div", {
104
+ let t6;
105
+ if ($[6] !== disabled || $[7] !== slots.caption || $[8] !== slots.leadingVisual) {
106
+ t6 = slots.leadingVisual ? /*#__PURE__*/jsx("div", {
119
107
  className: classes.LeadingVisual,
120
108
  "data-disabled": disabled ? "" : undefined,
121
109
  "data-has-caption": slots.caption ? "" : undefined,
122
110
  children: slots.leadingVisual
123
111
  }) : null;
124
- $[9] = disabled;
125
- $[10] = slots.caption;
126
- $[11] = slots.leadingVisual;
127
- $[12] = t7;
112
+ $[6] = disabled;
113
+ $[7] = slots.caption;
114
+ $[8] = slots.leadingVisual;
115
+ $[9] = t6;
128
116
  } else {
129
- t7 = $[12];
117
+ t6 = $[9];
130
118
  }
131
- let t8;
132
- if ($[13] !== slots.caption || $[14] !== slots.label) {
133
- t8 = /*#__PURE__*/jsxs("div", {
119
+ let t7;
120
+ if ($[10] !== slots.caption || $[11] !== slots.label) {
121
+ t7 = /*#__PURE__*/jsxs("div", {
134
122
  className: classes.LabelContainer,
135
123
  children: [slots.label, slots.caption]
136
124
  });
137
- $[13] = slots.caption;
138
- $[14] = slots.label;
139
- $[15] = t8;
125
+ $[10] = slots.caption;
126
+ $[11] = slots.label;
127
+ $[12] = t7;
140
128
  } else {
141
- t8 = $[15];
129
+ t7 = $[12];
142
130
  }
143
- let t9;
144
- if ($[16] !== t6 || $[17] !== t7 || $[18] !== t8) {
145
- t9 = /*#__PURE__*/jsxs(Fragment, {
146
- children: [t6, t7, t8]
131
+ let t8;
132
+ if ($[13] !== t5 || $[14] !== t6 || $[15] !== t7) {
133
+ t8 = /*#__PURE__*/jsxs(Fragment, {
134
+ children: [t5, t6, t7]
147
135
  });
148
- $[16] = t6;
149
- $[17] = t7;
150
- $[18] = t8;
151
- $[19] = t9;
136
+ $[13] = t5;
137
+ $[14] = t6;
138
+ $[15] = t7;
139
+ $[16] = t8;
152
140
  } else {
153
- t9 = $[19];
141
+ t8 = $[16];
154
142
  }
155
- const InputChildren = t9;
143
+ const InputChildren = t8;
156
144
  const T0 = FormControlContextProvider;
157
- const t10 = !isSelectPanelInput;
158
- let t11;
159
- if ($[20] !== captionId || $[21] !== disabled || $[22] !== id || $[23] !== labelId || $[24] !== required || $[25] !== t10 || $[26] !== validationMessageId) {
160
- t11 = {
145
+ let t9;
146
+ if ($[17] !== captionId || $[18] !== disabled || $[19] !== id || $[20] !== required || $[21] !== validationMessageId) {
147
+ t9 = {
161
148
  captionId,
162
149
  disabled,
163
150
  id,
164
151
  required,
165
- validationMessageId,
166
- isReferenced: t10,
167
- labelId
152
+ validationMessageId
168
153
  };
169
- $[20] = captionId;
170
- $[21] = disabled;
171
- $[22] = id;
172
- $[23] = labelId;
173
- $[24] = required;
174
- $[25] = t10;
175
- $[26] = validationMessageId;
176
- $[27] = t11;
154
+ $[17] = captionId;
155
+ $[18] = disabled;
156
+ $[19] = id;
157
+ $[20] = required;
158
+ $[21] = validationMessageId;
159
+ $[22] = t9;
177
160
  } else {
178
- t11 = $[27];
161
+ t9 = $[22];
179
162
  }
180
- const t12 = isChoiceInput || layout === "horizontal" ? /*#__PURE__*/jsx("div", {
163
+ const t10 = isChoiceInput || layout === "horizontal" ? /*#__PURE__*/jsx("div", {
181
164
  ref: ref,
182
165
  "data-has-leading-visual": slots.leadingVisual ? "" : undefined,
183
166
  className: clsx(className, classes.ControlHorizontalLayout),
@@ -199,20 +182,20 @@ const FormControl = /*#__PURE__*/React.forwardRef((t0, ref) => {
199
182
  children: slots.validation
200
183
  }) : null, slots.caption]
201
184
  });
202
- let t13;
203
- if ($[28] !== T0 || $[29] !== t11 || $[30] !== t12) {
204
- t13 = /*#__PURE__*/jsx(T0, {
205
- value: t11,
206
- children: t12
185
+ let t11;
186
+ if ($[23] !== T0 || $[24] !== t10 || $[25] !== t9) {
187
+ t11 = /*#__PURE__*/jsx(T0, {
188
+ value: t9,
189
+ children: t10
207
190
  });
208
- $[28] = T0;
209
- $[29] = t11;
210
- $[30] = t12;
211
- $[31] = t13;
191
+ $[23] = T0;
192
+ $[24] = t10;
193
+ $[25] = t9;
194
+ $[26] = t11;
212
195
  } else {
213
- t13 = $[31];
196
+ t11 = $[26];
214
197
  }
215
- return t13;
198
+ return t11;
216
199
  });
217
200
  var FormControl$1 = Object.assign(FormControl, {
218
201
  __SLOT__: Symbol('FormControl'),
@@ -1 +1 @@
1
- {"version":3,"file":"FormControlLabel.d.ts","sourceRoot":"","sources":["../../src/FormControl/FormControlLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAC,UAAU,EAAC,MAAM,mCAAmC,CAAA;AAC5D,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;AAEpD,MAAM,MAAM,KAAK,GAAG;IAClB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B,CAAA;AAED,QAAA,MAAM,gBAAgB,EAAE,gBAAgB,CACtC,KAAK,CAAC,iBAAiB,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,GAAG,KAAK,CAAC,CAmC9F,CAAA;AAID,eAAe,gBAAgB,CAAA"}
1
+ {"version":3,"file":"FormControlLabel.d.ts","sourceRoot":"","sources":["../../src/FormControl/FormControlLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAC,UAAU,EAAC,MAAM,mCAAmC,CAAA;AAC5D,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;AAEpD,MAAM,MAAM,KAAK,GAAG;IAClB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B,CAAA;AAED,QAAA,MAAM,gBAAgB,EAAE,gBAAgB,CACtC,KAAK,CAAC,iBAAiB,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,GAAG,KAAK,CAAC,CAkC9F,CAAA;AAID,eAAe,gBAAgB,CAAA"}
@@ -4,8 +4,7 @@ import { InputLabel } from '../internal/components/InputLabel.js';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
 
6
6
  const FormControlLabel = t0 => {
7
- var _id;
8
- const $ = c(26);
7
+ const $ = c(25);
9
8
  let as;
10
9
  let children;
11
10
  let className;
@@ -52,16 +51,13 @@ const FormControlLabel = t0 => {
52
51
  const {
53
52
  disabled,
54
53
  id: formControlId,
55
- required,
56
- isReferenced,
57
- labelId
54
+ required
58
55
  } = useFormControlContext();
59
- const resolvedId = (_id = id) !== null && _id !== void 0 ? _id : labelId;
60
56
  let t2;
61
- if ($[10] !== as || $[11] !== className || $[12] !== disabled || $[13] !== formControlId || $[14] !== htmlFor || $[15] !== isReferenced || $[16] !== props || $[17] !== required || $[18] !== requiredIndicator || $[19] !== requiredText || $[20] !== resolvedId || $[21] !== visuallyHidden) {
57
+ if ($[10] !== as || $[11] !== className || $[12] !== disabled || $[13] !== formControlId || $[14] !== htmlFor || $[15] !== id || $[16] !== props || $[17] !== required || $[18] !== requiredIndicator || $[19] !== requiredText || $[20] !== visuallyHidden) {
62
58
  t2 = as === "legend" || as === "span" ? {
63
59
  as,
64
- id: resolvedId,
60
+ id,
65
61
  className,
66
62
  visuallyHidden,
67
63
  required,
@@ -71,10 +67,10 @@ const FormControlLabel = t0 => {
71
67
  ...props
72
68
  } : {
73
69
  as,
74
- id: resolvedId,
70
+ id,
75
71
  className,
76
72
  visuallyHidden,
77
- htmlFor: isReferenced === false ? undefined : htmlFor || formControlId,
73
+ htmlFor: htmlFor || formControlId,
78
74
  required,
79
75
  requiredText,
80
76
  requiredIndicator,
@@ -86,29 +82,28 @@ const FormControlLabel = t0 => {
86
82
  $[12] = disabled;
87
83
  $[13] = formControlId;
88
84
  $[14] = htmlFor;
89
- $[15] = isReferenced;
85
+ $[15] = id;
90
86
  $[16] = props;
91
87
  $[17] = required;
92
88
  $[18] = requiredIndicator;
93
89
  $[19] = requiredText;
94
- $[20] = resolvedId;
95
- $[21] = visuallyHidden;
96
- $[22] = t2;
90
+ $[20] = visuallyHidden;
91
+ $[21] = t2;
97
92
  } else {
98
- t2 = $[22];
93
+ t2 = $[21];
99
94
  }
100
95
  const labelProps = t2;
101
96
  let t3;
102
- if ($[23] !== children || $[24] !== labelProps) {
97
+ if ($[22] !== children || $[23] !== labelProps) {
103
98
  t3 = /*#__PURE__*/jsx(InputLabel, {
104
99
  ...labelProps,
105
100
  children: children
106
101
  });
107
- $[23] = children;
108
- $[24] = labelProps;
109
- $[25] = t3;
102
+ $[22] = children;
103
+ $[23] = labelProps;
104
+ $[24] = t3;
110
105
  } else {
111
- t3 = $[25];
106
+ t3 = $[24];
112
107
  }
113
108
  return t3;
114
109
  };
@@ -4,12 +4,6 @@ interface FormControlContext extends Pick<FormControlProps, 'disabled' | 'id' |
4
4
  captionId?: string;
5
5
  validationMessageId?: string;
6
6
  validationStatus?: FormValidationStatus;
7
- /**
8
- * Determines whether the label is referenced by a form control.
9
- * This is used to determine whether the `htmlFor` attribute should be set on the label.
10
- */
11
- isReferenced?: boolean;
12
- labelId?: string;
13
7
  }
14
8
  declare const FormControlContext: import("react").Context<FormControlContext | null>;
15
9
  export declare const FormControlContextProvider: import("react").Provider<FormControlContext | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"_FormControlContext.d.ts","sourceRoot":"","sources":["../../src/FormControl/_FormControlContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,qCAAqC,CAAA;AAC7E,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAA;AAEnD,UAAU,kBAAmB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,IAAI,GAAG,UAAU,CAAC;IACzF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IAEvC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,QAAA,MAAM,kBAAkB,oDAAiD,CAAA;AAEzE,eAAO,MAAM,0BAA0B,qDAA8B,CAAA;AAErE,iFAAiF;AACjF,wBAAgB,qBAAqB,IAAI,kBAAkB,CAE1D;AAED,UAAU,yBAA0B,SAAQ,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,IAAI,GAAG,UAAU,CAAC;IAChG,CAAC,kBAAkB,CAAC,CAAC,EAAE,MAAM,CAAA;CAC9B;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,GAAG,CAAC,GAAG,yBAAyB,CAW/F"}
1
+ {"version":3,"file":"_FormControlContext.d.ts","sourceRoot":"","sources":["../../src/FormControl/_FormControlContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,qCAAqC,CAAA;AAC7E,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAA;AAEnD,UAAU,kBAAmB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,IAAI,GAAG,UAAU,CAAC;IACzF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;CACxC;AAED,QAAA,MAAM,kBAAkB,oDAAiD,CAAA;AAEzE,eAAO,MAAM,0BAA0B,qDAA8B,CAAA;AAErE,iFAAiF;AACjF,wBAAgB,qBAAqB,IAAI,kBAAkB,CAE1D;AAED,UAAU,yBAA0B,SAAQ,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,IAAI,GAAG,UAAU,CAAC;IAChG,CAAC,kBAAkB,CAAC,CAAC,EAAE,MAAM,CAAA;CAC9B;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,GAAG,CAAC,GAAG,yBAAyB,CAW/F"}
@@ -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 { useCombinedRefs } from '../hooks/useCombinedRefs.js';
5
+ import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.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
- const combinedRef = useCombinedRefs(forwardedRef, innerRef);
14
+ useRefObjectAsForwardedRef(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: combinedRef
34
+ ref: innerRef
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,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"}
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"}
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 { useCombinedRefs } from '../hooks/useCombinedRefs.js';
6
+ import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
7
7
 
8
8
  const UnwrappedLink = (props, ref) => {
9
9
  const {
@@ -14,7 +14,7 @@ const UnwrappedLink = (props, ref) => {
14
14
  ...restProps
15
15
  } = props;
16
16
  const innerRef = React.useRef(null);
17
- const combinedRef = useCombinedRefs(ref, innerRef);
17
+ useRefObjectAsForwardedRef(ref, innerRef);
18
18
  if (process.env.NODE_ENV !== "production") {
19
19
  /**
20
20
  * The Linter yells because it thinks this conditionally calls an effect,
@@ -36,7 +36,8 @@ const UnwrappedLink = (props, ref) => {
36
36
  "data-inline": inline,
37
37
  "data-hover-color": hoverColor,
38
38
  ...restProps,
39
- ref: combinedRef
39
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
40
+ ref: innerRef
40
41
  });
41
42
  };
42
43
  UnwrappedLink.displayName = "UnwrappedLink";