@primer/react 0.0.0-20260317165323 → 0.0.0-20260317171210

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 (34) hide show
  1. package/CHANGELOG.md +1 -6
  2. package/dist/ActionMenu/ActionMenu.d.ts.map +1 -1
  3. package/dist/ActionMenu/ActionMenu.js +1 -9
  4. package/dist/AnchoredOverlay/AnchoredOverlay-73c1b2d1.css +2 -0
  5. package/dist/AnchoredOverlay/AnchoredOverlay-73c1b2d1.css.map +1 -0
  6. package/dist/AnchoredOverlay/AnchoredOverlay.d.ts.map +1 -1
  7. package/dist/AnchoredOverlay/AnchoredOverlay.js +10 -43
  8. package/dist/AnchoredOverlay/AnchoredOverlay.module.css.js +2 -2
  9. package/dist/Autocomplete/AutocompleteInput.js +3 -3
  10. package/dist/Autocomplete/AutocompleteOverlay.js +3 -3
  11. package/dist/Button/ButtonBase.d.ts.map +1 -1
  12. package/dist/Button/ButtonBase.js +4 -3
  13. package/dist/Dialog/Dialog.js +3 -3
  14. package/dist/FeatureFlags/DefaultFeatureFlags.d.ts.map +1 -1
  15. package/dist/FeatureFlags/DefaultFeatureFlags.js +0 -1
  16. package/dist/Heading/Heading.js +3 -3
  17. package/dist/Link/Link.d.ts.map +1 -1
  18. package/dist/Link/Link.js +4 -3
  19. package/dist/Overlay/Overlay-dbaa6b8c.css +2 -0
  20. package/dist/Overlay/Overlay-dbaa6b8c.css.map +1 -0
  21. package/dist/Overlay/Overlay.d.ts.map +1 -1
  22. package/dist/Overlay/Overlay.js +20 -27
  23. package/dist/Overlay/Overlay.module.css.js +1 -1
  24. package/dist/PageLayout/PageLayout.js +5 -5
  25. package/dist/TextInputWithTokens/TextInputWithTokens.js +90 -91
  26. package/dist/deprecated/DialogV1/Dialog.js +9 -10
  27. package/dist/hooks/useMergedRefs.d.ts +4 -4
  28. package/dist/hooks/useMergedRefs.js +4 -4
  29. package/generated/hooks.json +3 -3
  30. package/package.json +1 -2
  31. package/dist/AnchoredOverlay/AnchoredOverlay-0f6f45b5.css +0 -2
  32. package/dist/AnchoredOverlay/AnchoredOverlay-0f6f45b5.css.map +0 -1
  33. package/dist/Overlay/Overlay-2e0ce8db.css +0 -2
  34. package/dist/Overlay/Overlay-2e0ce8db.css.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,20 +1,15 @@
1
1
  # @primer/react
2
2
 
3
- ## 0.0.0-20260317165323
3
+ ## 0.0.0-20260317171210
4
4
 
5
5
  ### Minor Changes
6
6
 
7
7
  - [#7638](https://github.com/primer/react/pull/7638) [`973f184`](https://github.com/primer/react/commit/973f184c7ed18526c786404376c11f2df71f2e54) Thanks [@iansan5653](https://github.com/iansan5653)! - - New: Exposes new `useMergedRefs` hook that can merge two refs into a single combined ref
8
-
9
8
  - Deprecates `useRefObjectAsForwardedRef`; see doc comment for migration instructions
10
9
  - Deprecates `useProvidedRefOrCreate`; see doc comment for migration instructions
11
10
 
12
- - [#7661](https://github.com/primer/react/pull/7661) [`dceb79c`](https://github.com/primer/react/commit/dceb79c5e0f8ab5c25bbc9727bc3207fb77d520e) Thanks [@TylerJDev](https://github.com/TylerJDev)! - AnchoredOverlay: Add CSS Anchor Positioning to `AnchoredOverlay` (under a feature flag)
13
-
14
11
  ### Patch Changes
15
12
 
16
- - [#7645](https://github.com/primer/react/pull/7645) [`bdb0e39`](https://github.com/primer/react/commit/bdb0e39d56bfb13ab3e321622402369251cc3207) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Update internal implementations of combined refs to improve performance and add support for React 19 callback refs
17
-
18
13
  - Fake entry to force publishing
19
14
 
20
15
  ## 38.15.1
@@ -1 +1 @@
1
- {"version":3,"file":"ActionMenu.d.ts","sourceRoot":"","sources":["../../src/ActionMenu/ActionMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8D,MAAM,OAAO,CAAA;AAGlF,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAA;AAE5D,OAA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,OAAO,CAAC,EAAE,gBAAgB,CAAA;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAGD,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IAEH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;IAE7D;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;CACpC,GAAG,IAAI,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAA;AAsI3C,MAAM,MAAM,qBAAqB,GAAG;IAAC,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;AA0DxH,6CAA6C;AAC7C,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAA;AAe/C,KAAK,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC,GAC3C,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,mBAAmB,CAAC,GAAG;IAC/E;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,gBAAgB,CAAC,EAAE,CAAC,EAAC,QAAQ,EAAC,EAAE;QAAC,QAAQ,EAAE,cAAc,CAAA;KAAC,KAAK,IAAI,CAAA;CACpE,CAAA;AAgHH,eAAO,MAAM,UAAU;;;kBA5LP,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC;aAC5B,MAAM;;;;CA2L4E,CAAA"}
@@ -1,5 +1,4 @@
1
1
  import React, { useContext, useState, useEffect, useCallback, useMemo } from 'react';
2
- import { clsx } from 'clsx';
3
2
  import { ChevronRightIcon, TriangleDownIcon } from '@primer/octicons-react';
4
3
  import { Divider } from '../ActionList/Divider.js';
5
4
  import { ActionListContainerContext } from '../ActionList/ActionListContainerContext.js';
@@ -44,9 +43,6 @@ const mergeAnchorHandlers = (anchorProps, buttonProps) => {
44
43
  };
45
44
  mergedAnchorProps.onKeyDown = mergedOnAnchorKeyDown;
46
45
  }
47
- if (buttonProps.className) {
48
- mergedAnchorProps.className = clsx(anchorProps.className, buttonProps.className);
49
- }
50
46
  return mergedAnchorProps;
51
47
  };
52
48
  const Menu = ({
@@ -124,10 +120,7 @@ const Menu = ({
124
120
  };
125
121
  }
126
122
  } else {
127
- renderAnchor = anchorProps => /*#__PURE__*/React.cloneElement(child, {
128
- ...anchorProps,
129
- className: clsx(anchorProps.className, child.props.className)
130
- });
123
+ renderAnchor = anchorProps => /*#__PURE__*/React.cloneElement(child, anchorProps);
131
124
  }
132
125
  return null;
133
126
  } else if (child.type === MenuButton || isSlot(child, MenuButton)) {
@@ -188,7 +181,6 @@ const Anchor = /*#__PURE__*/React.forwardRef(({
188
181
  children: /*#__PURE__*/React.cloneElement(child, {
189
182
  ...anchorProps,
190
183
  ref: anchorRef,
191
- className: clsx(anchorProps.className, child.props.className),
192
184
  onClick: onButtonClick,
193
185
  onKeyDown: onButtonKeyDown
194
186
  })
@@ -0,0 +1,2 @@
1
+ .prc-AnchoredOverlay-ResponsiveCloseButtonContainer-nuium{position:relative}.prc-AnchoredOverlay-ResponsiveCloseButton-z-2rx{display:none;position:absolute;right:var(--base-size-8,.5rem);top:var(--base-size-8,.5rem)}@media screen and (max-width:calc(48rem - 0.02px)){.prc-AnchoredOverlay-ResponsiveCloseButton-z-2rx{display:inline-grid}}
2
+ /*# sourceMappingURL=AnchoredOverlay-73c1b2d1.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/AnchoredOverlay/AnchoredOverlay.module.css.js"],"names":[],"mappings":"AAAA,0DACE,iBACF,CAEA,iDAIE,YAAa,CAHb,iBAAkB,CAElB,8BAAyB,CADzB,4BAOF,CAHE,mDANF,iDAOI,mBAEJ,CADE","file":"AnchoredOverlay-73c1b2d1.css","sourcesContent":[".ResponsiveCloseButtonContainer {\n position: relative;\n}\n\n.ResponsiveCloseButton {\n position: absolute;\n top: var(--base-size-8);\n right: var(--base-size-8);\n display: none;\n\n @media screen and (--viewportRange-narrow) {\n display: inline-grid;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AnchoredOverlay.d.ts","sourceRoot":"","sources":["../../src/AnchoredOverlay/AnchoredOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAiC,KAAK,GAAG,EAAC,MAAM,OAAO,CAAA;AAC9D,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,YAAY,CAAA;AAE5C,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,uBAAuB,CAAA;AAEhE,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,uBAAuB,CAAA;AAIhE,OAAO,KAAK,EAAC,cAAc,EAAE,gBAAgB,EAAC,MAAM,mBAAmB,CAAA;AACvE,OAAO,EAAC,KAAK,eAAe,EAAC,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAa,KAAK,eAAe,EAAC,MAAM,WAAW,CAAA;AAM1D,UAAU,8BAA8B;IACtC;;;OAGG;IACH,YAAY,EAAE,CAAC,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,YAAY,GAAG,iBAAiB,CAAC,EAChG,KAAK,EAAE,CAAC,KACL,GAAG,CAAC,OAAO,CAAA;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAE/C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,UAAU,iCAAiC;IACzC;;;OAGG;IACH,YAAY,EAAE,IAAI,CAAA;IAElB;;;OAGG;IACH,SAAS,EAA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,EAAE;QAAC,QAAQ,EAAE,cAAc,CAAA;KAAC,KAAK,IAAI,CAAA;IACnE;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;CAC5C;AAED,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,GACzD,CAAC,8BAA8B,GAAG,iCAAiC,CAAC,GACpE,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,MAAM,GAAG,cAAc,GAAG,iBAAiB,GAAG,mBAAmB,CAAC,CAAC,CAAA;AAS9G;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,CA6JnF,CAAA"}
@@ -1,4 +1,4 @@
1
- import { useCallback, useRef, useEffect } from 'react';
1
+ import { useCallback, useEffect } from 'react';
2
2
  import { useFocusTrap } from '../hooks/useFocusTrap.js';
3
3
  import { useFocusZone } from '../hooks/useFocusZone.js';
4
4
  import { useId } from '../hooks/useId.js';
@@ -7,22 +7,11 @@ import { XIcon } from '@primer/octicons-react';
7
7
  import classes from './AnchoredOverlay.module.css.js';
8
8
  import { clsx } from 'clsx';
9
9
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
10
- import { useFeatureFlag } from '../FeatureFlags/useFeatureFlag.js';
11
10
  import { useProvidedRefOrCreate } from '../hooks/useProvidedRefOrCreate.js';
12
11
  import { useRenderForcingRef } from '../hooks/useRenderForcingRef.js';
13
12
  import { useAnchoredPosition } from '../hooks/useAnchoredPosition.js';
14
13
  import Overlay from '../Overlay/Overlay.js';
15
14
 
16
- const applyAnchorPositioningPolyfill = async () => {
17
- if (typeof window !== 'undefined' && !('anchorName' in document.documentElement.style)) {
18
- try {
19
- await import('@oddbird/css-anchor-positioning');
20
- } catch (e) {
21
- // eslint-disable-next-line no-console
22
- console.warn('Failed to load CSS anchor positioning polyfill:', e);
23
- }
24
- }
25
- };
26
15
  const defaultVariant = {
27
16
  regular: 'anchored',
28
17
  narrow: 'anchored'
@@ -59,7 +48,6 @@ const AnchoredOverlay = ({
59
48
  displayCloseButton = true,
60
49
  closeButtonProps = defaultCloseButtonProps
61
50
  }) => {
62
- const cssAnchorPositioning = useFeatureFlag('primer_react_css_anchor_positioning');
63
51
  const anchorRef = useProvidedRefOrCreate(externalAnchorRef);
64
52
  const [overlayRef, updateOverlayRef] = useRenderForcingRef();
65
53
  const anchorId = useId(externalAnchorId);
@@ -103,17 +91,12 @@ const AnchoredOverlay = ({
103
91
  displayInViewport,
104
92
  onPositionChange: positionChange
105
93
  }, [overlayRef.current]);
106
- const hasLoadedAnchorPositioningPolyfill = useRef(false);
107
94
  useEffect(() => {
108
95
  // ensure overlay ref gets cleared when closed, so position can reset between closing/re-opening
109
96
  if (!open && overlayRef.current) {
110
97
  updateOverlayRef(null);
111
98
  }
112
- if (cssAnchorPositioning && !hasLoadedAnchorPositioningPolyfill.current) {
113
- applyAnchorPositioningPolyfill();
114
- hasLoadedAnchorPositioningPolyfill.current = true;
115
- }
116
- }, [open, overlayRef, updateOverlayRef, cssAnchorPositioning]);
99
+ }, [open, overlayRef, updateOverlayRef]);
117
100
  useFocusZone({
118
101
  containerRef: overlayRef,
119
102
  disabled: !open || !position_0,
@@ -127,11 +110,7 @@ const AnchoredOverlay = ({
127
110
  const showXIcon = onClose && variant.narrow === 'fullscreen' && displayCloseButton;
128
111
  const XButtonAriaLabelledBy = closeButtonProps['aria-labelledby'];
129
112
  const XButtonAriaLabel = closeButtonProps['aria-label'];
130
- const {
131
- className: overlayClassName,
132
- ...restOverlayProps
133
- } = overlayProps || {};
134
- const innerContent = /*#__PURE__*/jsxs(Fragment, {
113
+ return /*#__PURE__*/jsxs(Fragment, {
135
114
  children: [renderAnchor && renderAnchor({
136
115
  ref: anchorRef,
137
116
  id: anchorId,
@@ -139,35 +118,30 @@ const AnchoredOverlay = ({
139
118
  'aria-expanded': open,
140
119
  tabIndex: 0,
141
120
  onClick: onAnchorClick,
142
- onKeyDown: onAnchorKeyDown,
143
- ...(cssAnchorPositioning ? {
144
- className: classes.Anchor
145
- } : {})
121
+ onKeyDown: onAnchorKeyDown
146
122
  }), open ? /*#__PURE__*/jsxs(Overlay, {
147
123
  returnFocusRef: anchorRef,
148
124
  onClickOutside: onClickOutside,
149
125
  ignoreClickRefs: [anchorRef],
150
126
  onEscape: onEscape,
151
127
  role: "none",
152
- visibility: cssAnchorPositioning || position_0 ? 'visible' : 'hidden',
128
+ visibility: position_0 ? 'visible' : 'hidden',
153
129
  height: height,
154
130
  width: width,
155
- top: cssAnchorPositioning ? undefined : (position_0 === null || position_0 === void 0 ? void 0 : position_0.top) || 0,
156
- left: cssAnchorPositioning ? undefined : (position_0 === null || position_0 === void 0 ? void 0 : position_0.left) || 0,
131
+ top: (position_0 === null || position_0 === void 0 ? void 0 : position_0.top) || 0,
132
+ left: (position_0 === null || position_0 === void 0 ? void 0 : position_0.left) || 0,
157
133
  responsiveVariant: variant.narrow === 'fullscreen' ? 'fullscreen' : undefined,
158
- anchorSide: cssAnchorPositioning ? undefined : position_0 === null || position_0 === void 0 ? void 0 : position_0.anchorSide,
159
- className: clsx(className, overlayClassName, cssAnchorPositioning ? classes.AnchoredOverlay : undefined),
134
+ anchorSide: position_0 === null || position_0 === void 0 ? void 0 : position_0.anchorSide,
135
+ className: className,
160
136
  preventOverflow: preventOverflow,
161
137
  "data-component": "AnchoredOverlay",
162
- ...restOverlayProps,
138
+ ...overlayProps,
163
139
  ref: node => {
164
140
  if (overlayProps !== null && overlayProps !== void 0 && overlayProps.ref) {
165
141
  assignRef(overlayProps.ref, node);
166
142
  }
167
143
  updateOverlayRef(node);
168
144
  },
169
- "data-anchor-position": cssAnchorPositioning,
170
- "data-side": cssAnchorPositioning ? side : position_0 === null || position_0 === void 0 ? void 0 : position_0.anchorSide,
171
145
  children: [showXIcon ? /*#__PURE__*/jsx("div", {
172
146
  className: classes.ResponsiveCloseButtonContainer,
173
147
  children: /*#__PURE__*/jsx(IconButton, {
@@ -190,13 +164,6 @@ const AnchoredOverlay = ({
190
164
  }) : null, children]
191
165
  }) : null]
192
166
  });
193
- if (cssAnchorPositioning) {
194
- return /*#__PURE__*/jsx("div", {
195
- className: classes.Wrapper,
196
- children: innerContent
197
- });
198
- }
199
- return innerContent;
200
167
  };
201
168
  function assignRef(ref, value) {
202
169
  if (typeof ref === 'function') {
@@ -1,5 +1,5 @@
1
- import './AnchoredOverlay-0f6f45b5.css';
1
+ import './AnchoredOverlay-73c1b2d1.css';
2
2
 
3
- var classes = {"ResponsiveCloseButtonContainer":"prc-AnchoredOverlay-ResponsiveCloseButtonContainer-nuium","ResponsiveCloseButton":"prc-AnchoredOverlay-ResponsiveCloseButton-z-2rx","Wrapper":"prc-AnchoredOverlay-Wrapper-w6jU3","Anchor":"prc-AnchoredOverlay-Anchor-DWRfK","AnchoredOverlay":"prc-AnchoredOverlay-AnchoredOverlay-fYg9Z"};
3
+ var classes = {"ResponsiveCloseButtonContainer":"prc-AnchoredOverlay-ResponsiveCloseButtonContainer-nuium","ResponsiveCloseButton":"prc-AnchoredOverlay-ResponsiveCloseButton-z-2rx"};
4
4
 
5
5
  export { classes as default };
@@ -1,6 +1,6 @@
1
1
  import React, { useContext, useState, useCallback, useEffect } from 'react';
2
2
  import { AutocompleteContext, AutocompleteInputContext } from './AutocompleteContext.js';
3
- import { useMergedRefs } from '../hooks/useMergedRefs.js';
3
+ import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.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
- const mergedRef = useMergedRefs(forwardedRef, inputRef);
39
+ useRefObjectAsForwardedRef(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: mergedRef,
133
+ ref: inputRef,
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 { useMergedRefs } from '../hooks/useMergedRefs.js';
3
+ import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.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
- const mergedRef = useMergedRefs(scrollContainerRef, floatingElementRef);
51
+ useRefObjectAsForwardedRef(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: mergedRef,
63
+ ref: floatingElementRef,
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,EA0JV,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,EA2JV,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 { useMergedRefs } from '../hooks/useMergedRefs.js';
2
+ import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.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
- const combinedRefs = useMergedRefs(forwardedRef, innerRef);
49
+ useRefObjectAsForwardedRef(forwardedRef, innerRef);
50
50
  const uuid = useId(id);
51
51
  const loadingAnnouncementID = `${uuid}-loading-announcement`;
52
52
 
@@ -74,7 +74,8 @@ const ButtonBase = /*#__PURE__*/forwardRef(({
74
74
  children: [/*#__PURE__*/jsx(Component, {
75
75
  "aria-disabled": loading ? true : undefined,
76
76
  ...rest,
77
- ref: combinedRefs,
77
+ // @ts-ignore temporary disable as we migrate to css modules, until we remove PolymorphicForwardRefComponent
78
+ ref: innerRef,
78
79
  className: clsx(classes.ButtonBase, className),
79
80
  "data-block": block ? 'block' : null,
80
81
  "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 { useMergedRefs } from '../hooks/useMergedRefs.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';
@@ -127,7 +127,7 @@ const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
127
127
  footer: Dialog.Footer
128
128
  });
129
129
  const dialogRef = useRef(null);
130
- const mergedRef = useMergedRefs(forwardedRef, dialogRef);
130
+ useRefObjectAsForwardedRef(forwardedRef, dialogRef);
131
131
  const backdropRef = useRef(null);
132
132
  useFocusTrap({
133
133
  containerRef: dialogRef,
@@ -190,7 +190,7 @@ const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
190
190
  setLastMouseDownIsBackdrop(e.target === e.currentTarget);
191
191
  },
192
192
  children: /*#__PURE__*/jsxs("div", {
193
- ref: mergedRef,
193
+ ref: dialogRef,
194
194
  role: role,
195
195
  "aria-labelledby": dialogLabelId,
196
196
  "aria-describedby": dialogDescriptionId,
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultFeatureFlags.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/DefaultFeatureFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AAEnD,eAAO,MAAM,mBAAmB,kBAS9B,CAAA"}
1
+ {"version":3,"file":"DefaultFeatureFlags.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/DefaultFeatureFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AAEnD,eAAO,MAAM,mBAAmB,kBAQ9B,CAAA"}
@@ -2,7 +2,6 @@ import { FeatureFlagScope } from './FeatureFlagScope.js';
2
2
 
3
3
  const DefaultFeatureFlags = FeatureFlagScope.create({
4
4
  primer_react_breadcrumbs_overflow_menu: false,
5
- primer_react_css_anchor_positioning: false,
6
5
  primer_react_css_has_selector_perf: false,
7
6
  primer_react_select_panel_fullscreen_on_narrow: false,
8
7
  primer_react_select_panel_order_selected_at_top: false,
@@ -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 { useMergedRefs } from '../hooks/useMergedRefs.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 mergedRef = useMergedRefs(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: mergedRef
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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K,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 { useMergedRefs } from '../hooks/useMergedRefs.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 mergedRef = useMergedRefs(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: mergedRef
39
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
40
+ ref: innerRef
40
41
  });
41
42
  };
42
43
  UnwrappedLink.displayName = "UnwrappedLink";
@@ -0,0 +1,2 @@
1
+ @keyframes prc-Overlay-overlay-appear-JpFey{0%{opacity:0}to{opacity:1}}.prc-Overlay-Overlay-jfs-T{background-color:var(--overlay-bgColor,var(--color-canvas-overlay));border-radius:var(--borderRadius-large,.75rem);bottom:var(--bottom,auto);box-shadow:var(--shadow-floating-small,var(--color-overlay-shadow));height:auto;left:var(--left,auto);max-height:100vh;max-width:calc(100vw - 2rem);min-width:192px;overflow:auto;position:absolute;right:var(--right,auto);top:var(--top,auto);width:auto}.prc-Overlay-Overlay-jfs-T:focus{outline:none}@media (forced-colors:active){.prc-Overlay-Overlay-jfs-T{outline:1px solid transparent}}.prc-Overlay-Overlay-jfs-T:where([data-reflow-container=true]){max-width:calc(100vw - 2rem)}.prc-Overlay-Overlay-jfs-T:where([data-overflow-auto]){overflow:auto}.prc-Overlay-Overlay-jfs-T:where([data-overflow-hidden]){overflow:hidden}.prc-Overlay-Overlay-jfs-T:where([data-overflow-scroll]){overflow:scroll}.prc-Overlay-Overlay-jfs-T:where([data-overflow-visible]){overflow:visible}.prc-Overlay-Overlay-jfs-T:where([data-height-xsmall]){height:192px}.prc-Overlay-Overlay-jfs-T:where([data-height-small]){height:256px}.prc-Overlay-Overlay-jfs-T:where([data-height-medium]){height:320px}.prc-Overlay-Overlay-jfs-T:where([data-height-large]){height:432px}.prc-Overlay-Overlay-jfs-T:where([data-height-xlarge]){height:600px}.prc-Overlay-Overlay-jfs-T:where([data-height-auto]),.prc-Overlay-Overlay-jfs-T:where([data-height-initial]){height:auto}.prc-Overlay-Overlay-jfs-T:where([data-height-fit-content]){height:-moz-fit-content;height:fit-content}.prc-Overlay-Overlay-jfs-T:where([data-max-height-xsmall]){max-height:192px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-small]){max-height:256px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-medium]){max-height:320px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-large]){max-height:432px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-xlarge]){max-height:600px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-fit-content]){max-height:-moz-fit-content;max-height:fit-content}.prc-Overlay-Overlay-jfs-T:where([data-width-small]){width:256px}.prc-Overlay-Overlay-jfs-T:where([data-width-medium]){width:320px}.prc-Overlay-Overlay-jfs-T:where([data-width-large]){width:480px}.prc-Overlay-Overlay-jfs-T:where([data-width-xlarge]){width:640px}.prc-Overlay-Overlay-jfs-T:where([data-width-xxlarge]){width:960px}.prc-Overlay-Overlay-jfs-T:where([data-width-auto]){width:auto}.prc-Overlay-Overlay-jfs-T:where([data-max-width-small]){max-width:256px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-medium]){max-width:320px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-large]){max-width:480px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-xlarge]){max-width:640px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-xxlarge]){max-width:960px}.prc-Overlay-Overlay-jfs-T:where([data-visibility-visible]){visibility:visible}.prc-Overlay-Overlay-jfs-T:where([data-visibility-hidden]){visibility:hidden}@media screen and (max-width:calc(48rem - 0.02px)){.prc-Overlay-Overlay-jfs-T:where([data-responsive=fullscreen]){border-radius:unset;height:100vh;left:0;margin:0;max-height:none;max-width:none;padding-bottom:env(safe-area-inset-bottom);position:fixed;top:0;width:100vw}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-responsive=fullscreen]){height:100dvh}}}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-variant=fullscreen]){height:100dvh}}@media (prefers-reduced-motion:no-preference){.prc-Overlay-Overlay-jfs-T{animation:prc-Overlay-overlay-appear-JpFey .2s cubic-bezier(.33,1,.68,1)}}
2
+ /*# sourceMappingURL=Overlay-dbaa6b8c.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Overlay/Overlay.module.css.js"],"names":[],"mappings":"AAAA,4CACE,GACE,SACF,CAEA,GACE,SACF,CACF,CAEA,2BAQE,mEAAwC,CACxC,8CAAwC,CASxC,yBAA2B,CAR3B,mEAAwC,CALxC,WAAY,CASZ,qBAAuB,CARvB,gBAAiB,CAJjB,4BAA6B,CAE7B,eAAgB,CAGhB,aAAc,CANd,iBAAkB,CAelB,uBAAyB,CAJzB,mBAAqB,CATrB,UAqLF,CApKE,iCACE,YACF,CAEA,8BAxBF,2BA0BI,6BA8JJ,CA7JE,CAEA,+DACE,4BACF,CAEA,uDACE,aACF,CAEA,yDACE,eACF,CAEA,yDACE,eACF,CAEA,0DACE,gBACF,CAEA,uDACE,YACF,CAEA,sDACE,YACF,CAEA,uDACE,YACF,CAEA,sDACE,YACF,CAEA,uDACE,YACF,CAEA,6GAEE,WACF,CAEA,4DACE,uBAAmB,CAAnB,kBACF,CAEA,2DACE,gBACF,CAEA,0DACE,gBACF,CAEA,2DACE,gBACF,CAEA,0DACE,gBACF,CAEA,2DACE,gBACF,CAEA,gEACE,2BAAuB,CAAvB,sBACF,CAEA,qDACE,WACF,CAEA,sDACE,WACF,CAEA,qDAEE,WACF,CAEA,sDAEE,WACF,CAEA,uDAEE,WACF,CAEA,oDACE,UACF,CAEA,yDACE,eACF,CAEA,0DACE,eACF,CAEA,yDACE,eACF,CAEA,0DACE,eACF,CAEA,2DACE,eACF,CAEA,4DACE,kBACF,CAEA,2DACE,iBACF,CAGE,mDADF,+DAUI,mBAAoB,CAHpB,YAAa,CAHb,MAAO,CAKP,QAAS,CADT,eAAgB,CAFhB,cAAe,CAMf,0CAA2C,CAV3C,cAAe,CACf,KAAM,CAEN,WAcJ,CALI,0BAdJ,+DAgBM,aAGN,CAFI,CACF,CAGF,0BAEE,4DACE,aACF,CACF,CAGF,8CACE,2BACE,wEACF,CACF","file":"Overlay-dbaa6b8c.css","sourcesContent":["@keyframes overlay-appear {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n.Overlay {\n position: absolute;\n max-width: calc(100vw - 2rem);\n width: auto;\n min-width: 192px;\n height: auto;\n max-height: 100vh;\n overflow: auto;\n background-color: var(--overlay-bgColor);\n border-radius: var(--borderRadius-large);\n box-shadow: var(--shadow-floating-small);\n /* stylelint-disable-next-line primer/spacing */\n top: var(--top, auto);\n /* stylelint-disable-next-line primer/spacing */\n left: var(--left, auto);\n /* stylelint-disable-next-line primer/spacing */\n right: var(--right, auto);\n /* stylelint-disable-next-line primer/spacing */\n bottom: var(--bottom, auto);\n\n &:focus {\n outline: none;\n }\n\n @media (forced-colors: active) {\n /* Support for Windows high contrast https://sarahmhigley.com/writing/whcm-quick-tips */\n outline: solid 1px transparent;\n }\n\n &:where([data-reflow-container='true']) {\n max-width: calc(100vw - 2rem);\n }\n\n &:where([data-overflow-auto]) {\n overflow: auto;\n }\n\n &:where([data-overflow-hidden]) {\n overflow: hidden;\n }\n\n &:where([data-overflow-scroll]) {\n overflow: scroll;\n }\n\n &:where([data-overflow-visible]) {\n overflow: visible;\n }\n\n &:where([data-height-xsmall]) {\n height: 192px;\n }\n\n &:where([data-height-small]) {\n height: 256px;\n }\n\n &:where([data-height-medium]) {\n height: 320px;\n }\n\n &:where([data-height-large]) {\n height: 432px;\n }\n\n &:where([data-height-xlarge]) {\n height: 600px;\n }\n\n &:where([data-height-auto]),\n &:where([data-height-initial]) {\n height: auto;\n }\n\n &:where([data-height-fit-content]) {\n height: fit-content;\n }\n\n &:where([data-max-height-xsmall]) {\n max-height: 192px;\n }\n\n &:where([data-max-height-small]) {\n max-height: 256px;\n }\n\n &:where([data-max-height-medium]) {\n max-height: 320px;\n }\n\n &:where([data-max-height-large]) {\n max-height: 432px;\n }\n\n &:where([data-max-height-xlarge]) {\n max-height: 600px;\n }\n\n &:where([data-max-height-fit-content]) {\n max-height: fit-content;\n }\n\n &:where([data-width-small]) {\n width: 256px;\n }\n\n &:where([data-width-medium]) {\n width: 320px;\n }\n\n &:where([data-width-large]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 480px;\n }\n\n &:where([data-width-xlarge]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 640px;\n }\n\n &:where([data-width-xxlarge]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 960px;\n }\n\n &:where([data-width-auto]) {\n width: auto;\n }\n\n &:where([data-max-width-small]) {\n max-width: 256px;\n }\n\n &:where([data-max-width-medium]) {\n max-width: 320px;\n }\n\n &:where([data-max-width-large]) {\n max-width: 480px;\n }\n\n &:where([data-max-width-xlarge]) {\n max-width: 640px;\n }\n\n &:where([data-max-width-xxlarge]) {\n max-width: 960px;\n }\n\n &:where([data-visibility-visible]) {\n visibility: visible;\n }\n\n &:where([data-visibility-hidden]) {\n visibility: hidden;\n }\n\n &:where([data-responsive='fullscreen']) {\n @media screen and (--viewportRange-narrow) {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n max-width: none;\n height: 100vh;\n max-height: none;\n margin: 0;\n border-radius: unset;\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: env(safe-area-inset-bottom);\n\n @supports (height: 100dvh) {\n /* fix for mobile safari (100vh clips the screen with the toolbar) */\n height: 100dvh;\n }\n }\n }\n\n @supports (height: 100dvh) {\n /* fix for mobile safari (100vh clips the screen with the toolbar) */\n &:where([data-variant='fullscreen']) {\n height: 100dvh;\n }\n }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .Overlay {\n animation: overlay-appear 200ms cubic-bezier(0.33, 1, 0.68, 1);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../src/Overlay/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,qBAAqB,EAAe,MAAM,OAAO,CAAA;AAC9D,OAAO,KAA0B,MAAM,OAAO,CAAA;AAE9C,OAAO,KAAK,EAAC,QAAQ,EAAE,KAAK,EAAC,MAAM,gBAAgB,CAAA;AACnD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,UAAU,CAAA;AAI/C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAK/F,KAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAA;IAC7B,MAAM,CAA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AAE,YAAY,CAAA;CACjC,CAAA;AAED,KAAK,eAAe,GAAG,KAAK,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAA;AAElE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,EA+CnB,8BAA8B,CAAC,KAAK,EAAE,eAAe,CAAC,CAAA;AAE3D,KAAK,cAAc,GAAG;IACpB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,CAAA;IACvD,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IACrD,cAAc,EAAE,CAAC,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAA;IAC9C,QAAQ,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAA;IACpC,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;CACpD,CAAA;AAED,KAAK,oBAAoB,GAAG,KAAK,CAAC,eAAe,EAAE,cAAc,CAAC,CAAA;AAElE;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,OAAO,EAiFR,8BAA8B,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,qBAAqB,CAAC,OAAO,OAAO,CAAC,CAAA;AAEhE,eAAe,OAAO,CAAA"}
@@ -2,11 +2,10 @@ 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 { useMergedRefs } from '../hooks/useMergedRefs.js';
5
+ import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
6
6
  import classes from './Overlay.module.css.js';
7
7
  import { clsx } from 'clsx';
8
8
  import { jsx } from 'react/jsx-runtime';
9
- import { useFeatureFlag } from '../FeatureFlags/useFeatureFlag.js';
10
9
  import { useOverlay } from '../hooks/useOverlay.js';
11
10
 
12
11
  const heightMap = {
@@ -116,7 +115,7 @@ const BaseOverlay = /*#__PURE__*/React.forwardRef(({
116
115
 
117
116
  */
118
117
  const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
119
- const $ = c(46);
118
+ const $ = c(45);
120
119
  let anchorSide;
121
120
  let ignoreClickRefs;
122
121
  let initialFocusRef;
@@ -196,9 +195,8 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
196
195
  const role = t3 === undefined ? "none" : t3;
197
196
  const visibility = t4 === undefined ? "visible" : t4;
198
197
  const width = t5 === undefined ? "auto" : t5;
199
- const cssAnchorPositioning = useFeatureFlag("primer_react_css_anchor_positioning");
200
198
  const overlayRef = useRef(null);
201
- const mergedRef = useMergedRefs(forwardedRef, overlayRef);
199
+ useRefObjectAsForwardedRef(forwardedRef, overlayRef);
202
200
  let t6;
203
201
  if ($[18] !== ignoreClickRefs || $[19] !== initialFocusRef || $[20] !== onClickOutside || $[21] !== onEscape || $[22] !== preventFocusOnOpen || $[23] !== returnFocusRef) {
204
202
  t6 = {
@@ -271,12 +269,12 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
271
269
  const leftPosition = left === undefined && right === undefined ? 0 : left;
272
270
  const t11 = !preventOverflow ? true : undefined;
273
271
  let t12;
274
- if ($[32] !== height || $[33] !== leftPosition || $[34] !== mergedRef || $[35] !== props || $[36] !== responsiveVariant || $[37] !== right || $[38] !== role || $[39] !== t11 || $[40] !== visibility || $[41] !== width) {
272
+ if ($[32] !== height || $[33] !== leftPosition || $[34] !== props || $[35] !== responsiveVariant || $[36] !== right || $[37] !== role || $[38] !== t11 || $[39] !== visibility || $[40] !== width) {
275
273
  t12 = /*#__PURE__*/jsx(BaseOverlay, {
276
274
  role: role,
277
275
  width: width,
278
276
  "data-reflow-container": t11,
279
- ref: mergedRef,
277
+ ref: overlayRef,
280
278
  left: leftPosition,
281
279
  right: right,
282
280
  height: height,
@@ -286,33 +284,28 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
286
284
  });
287
285
  $[32] = height;
288
286
  $[33] = leftPosition;
289
- $[34] = mergedRef;
290
- $[35] = props;
291
- $[36] = responsiveVariant;
292
- $[37] = right;
293
- $[38] = role;
294
- $[39] = t11;
295
- $[40] = visibility;
296
- $[41] = width;
297
- $[42] = t12;
287
+ $[34] = props;
288
+ $[35] = responsiveVariant;
289
+ $[36] = right;
290
+ $[37] = role;
291
+ $[38] = t11;
292
+ $[39] = visibility;
293
+ $[40] = width;
294
+ $[41] = t12;
298
295
  } else {
299
- t12 = $[42];
300
- }
301
- const overlayContent = t12;
302
- if (cssAnchorPositioning) {
303
- return overlayContent;
296
+ t12 = $[41];
304
297
  }
305
298
  let t13;
306
- if ($[43] !== overlayContent || $[44] !== portalContainerName) {
299
+ if ($[42] !== portalContainerName || $[43] !== t12) {
307
300
  t13 = /*#__PURE__*/jsx(Portal, {
308
301
  containerName: portalContainerName,
309
- children: overlayContent
302
+ children: t12
310
303
  });
311
- $[43] = overlayContent;
312
- $[44] = portalContainerName;
313
- $[45] = t13;
304
+ $[42] = portalContainerName;
305
+ $[43] = t12;
306
+ $[44] = t13;
314
307
  } else {
315
- t13 = $[45];
308
+ t13 = $[44];
316
309
  }
317
310
  return t13;
318
311
  });
@@ -1,4 +1,4 @@
1
- import './Overlay-2e0ce8db.css';
1
+ import './Overlay-dbaa6b8c.css';
2
2
 
3
3
  var classes = {"Overlay":"prc-Overlay-Overlay-jfs-T","overlay-appear":"prc-Overlay-overlay-appear-JpFey"};
4
4
 
@@ -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 { useMergedRefs } from '../hooks/useMergedRefs.js';
4
+ import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.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
- const mergedRef = useMergedRefs(forwardRef, paneRef);
584
+ useRefObjectAsForwardedRef(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: mergedRef
618
+ ref: paneRef
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
- const mergedRef = useMergedRefs(forwardRef, sidebarRef);
788
+ useRefObjectAsForwardedRef(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: mergedRef
827
+ ref: sidebarRef
828
828
  // Suppress hydration mismatch for --pane-width when localStorage
829
829
  // provides a width that differs from the server-rendered default.
830
830
  ,
@@ -3,7 +3,7 @@ import { FocusKeys } from '@primer/behaviors';
3
3
  import { isFocusable } from '@primer/behaviors/utils';
4
4
  import React, { useRef, useState } from 'react';
5
5
  import { isValidElementType } from 'react-is';
6
- import { useMergedRefs } from '../hooks/useMergedRefs.js';
6
+ import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
7
7
  import { useFocusZone } from '../hooks/useFocusZone.js';
8
8
  import { useId } from '../hooks/useId.js';
9
9
  import Token from '../Token/Token.js';
@@ -25,7 +25,7 @@ const overflowCountClassMap = {
25
25
 
26
26
  // using forwardRef is important so that other components (ex. Autocomplete) can use the ref
27
27
  function TextInputWithTokensInnerComponent(t0, forwardedRef) {
28
- const $ = c(152);
28
+ const $ = c(151);
29
29
  let IconComponent;
30
30
  let LeadingVisual;
31
31
  let TrailingVisual;
@@ -165,7 +165,7 @@ function TextInputWithTokensInnerComponent(t0, forwardedRef) {
165
165
  }
166
166
  const ref = useRef(null);
167
167
  const selectedValuesDescriptionId = useId();
168
- const mergedRef = useMergedRefs(forwardedRef, ref);
168
+ useRefObjectAsForwardedRef(forwardedRef, ref);
169
169
  const [selectedTokenIndex, setSelectedTokenIndex] = useState();
170
170
  const [tokensAreTruncated, setTokensAreTruncated] = useState(Boolean(visibleTokenCount));
171
171
  let t6;
@@ -455,9 +455,9 @@ function TextInputWithTokensInnerComponent(t0, forwardedRef) {
455
455
  const t32 = validationStatus === "error" ? "true" : "false";
456
456
  const t33 = ariaDescribedBy || undefined;
457
457
  let t34;
458
- if ($[80] !== disabled || $[81] !== handleInputBlur || $[82] !== handleInputFocus || $[83] !== handleInputKeyDown || $[84] !== inputPropsRest || $[85] !== mergedRef || $[86] !== role || $[87] !== t32 || $[88] !== t33) {
458
+ if ($[80] !== disabled || $[81] !== handleInputBlur || $[82] !== handleInputFocus || $[83] !== handleInputKeyDown || $[84] !== inputPropsRest || $[85] !== role || $[86] !== t32 || $[87] !== t33) {
459
459
  t34 = /*#__PURE__*/jsx(UnstyledTextInput, {
460
- ref: mergedRef,
460
+ ref: ref,
461
461
  disabled: disabled,
462
462
  onFocus: handleInputFocus,
463
463
  onBlur: handleInputBlur,
@@ -474,43 +474,42 @@ function TextInputWithTokensInnerComponent(t0, forwardedRef) {
474
474
  $[82] = handleInputFocus;
475
475
  $[83] = handleInputKeyDown;
476
476
  $[84] = inputPropsRest;
477
- $[85] = mergedRef;
478
- $[86] = role;
479
- $[87] = t32;
480
- $[88] = t33;
481
- $[89] = t34;
477
+ $[85] = role;
478
+ $[86] = t32;
479
+ $[87] = t33;
480
+ $[88] = t34;
482
481
  } else {
483
- t34 = $[89];
482
+ t34 = $[88];
484
483
  }
485
484
  let t35;
486
- if ($[90] !== selectedValuesDescription || $[91] !== selectedValuesDescriptionId || $[92] !== shouldExposeSelectedValuesDescription) {
485
+ if ($[89] !== selectedValuesDescription || $[90] !== selectedValuesDescriptionId || $[91] !== shouldExposeSelectedValuesDescription) {
487
486
  t35 = shouldExposeSelectedValuesDescription ? /*#__PURE__*/jsx(VisuallyHidden, {
488
487
  id: selectedValuesDescriptionId,
489
488
  children: selectedValuesDescription
490
489
  }) : null;
491
- $[90] = selectedValuesDescription;
492
- $[91] = selectedValuesDescriptionId;
493
- $[92] = shouldExposeSelectedValuesDescription;
494
- $[93] = t35;
490
+ $[89] = selectedValuesDescription;
491
+ $[90] = selectedValuesDescriptionId;
492
+ $[91] = shouldExposeSelectedValuesDescription;
493
+ $[92] = t35;
495
494
  } else {
496
- t35 = $[93];
495
+ t35 = $[92];
497
496
  }
498
497
  let t36;
499
- if ($[94] !== t34 || $[95] !== t35) {
498
+ if ($[93] !== t34 || $[94] !== t35) {
500
499
  t36 = /*#__PURE__*/jsxs("div", {
501
500
  className: styles.InputWrapper,
502
501
  children: [t34, t35]
503
502
  });
504
- $[94] = t34;
505
- $[95] = t35;
506
- $[96] = t36;
503
+ $[93] = t34;
504
+ $[94] = t35;
505
+ $[95] = t36;
507
506
  } else {
508
- t36 = $[96];
507
+ t36 = $[95];
509
508
  }
510
509
  let t37;
511
- if ($[97] !== TokenComponent || $[98] !== disabled || $[99] !== handleTokenBlur || $[100] !== handleTokenFocus || $[101] !== handleTokenRemove || $[102] !== hideTokenRemoveButtons || $[103] !== selectedTokenIndex || $[104] !== size || $[105] !== visibleTokens) {
510
+ if ($[96] !== TokenComponent || $[97] !== disabled || $[98] !== handleTokenBlur || $[99] !== handleTokenFocus || $[100] !== handleTokenRemove || $[101] !== hideTokenRemoveButtons || $[102] !== selectedTokenIndex || $[103] !== size || $[104] !== visibleTokens) {
512
511
  let t38;
513
- if ($[107] !== TokenComponent || $[108] !== disabled || $[109] !== handleTokenBlur || $[110] !== handleTokenFocus || $[111] !== handleTokenRemove || $[112] !== hideTokenRemoveButtons || $[113] !== selectedTokenIndex || $[114] !== size) {
512
+ if ($[106] !== TokenComponent || $[107] !== disabled || $[108] !== handleTokenBlur || $[109] !== handleTokenFocus || $[110] !== handleTokenRemove || $[111] !== hideTokenRemoveButtons || $[112] !== selectedTokenIndex || $[113] !== size) {
514
513
  t38 = (t39, i) => {
515
514
  const {
516
515
  id,
@@ -532,89 +531,89 @@ function TextInputWithTokensInnerComponent(t0, forwardedRef) {
532
531
  ...tokenRest
533
532
  }, id);
534
533
  };
535
- $[107] = TokenComponent;
536
- $[108] = disabled;
537
- $[109] = handleTokenBlur;
538
- $[110] = handleTokenFocus;
539
- $[111] = handleTokenRemove;
540
- $[112] = hideTokenRemoveButtons;
541
- $[113] = selectedTokenIndex;
542
- $[114] = size;
543
- $[115] = t38;
534
+ $[106] = TokenComponent;
535
+ $[107] = disabled;
536
+ $[108] = handleTokenBlur;
537
+ $[109] = handleTokenFocus;
538
+ $[110] = handleTokenRemove;
539
+ $[111] = hideTokenRemoveButtons;
540
+ $[112] = selectedTokenIndex;
541
+ $[113] = size;
542
+ $[114] = t38;
544
543
  } else {
545
- t38 = $[115];
544
+ t38 = $[114];
546
545
  }
547
546
  t37 = visibleTokens.map(t38);
548
- $[97] = TokenComponent;
549
- $[98] = disabled;
550
- $[99] = handleTokenBlur;
551
- $[100] = handleTokenFocus;
552
- $[101] = handleTokenRemove;
553
- $[102] = hideTokenRemoveButtons;
554
- $[103] = selectedTokenIndex;
555
- $[104] = size;
556
- $[105] = visibleTokens;
557
- $[106] = t37;
547
+ $[96] = TokenComponent;
548
+ $[97] = disabled;
549
+ $[98] = handleTokenBlur;
550
+ $[99] = handleTokenFocus;
551
+ $[100] = handleTokenRemove;
552
+ $[101] = hideTokenRemoveButtons;
553
+ $[102] = selectedTokenIndex;
554
+ $[103] = size;
555
+ $[104] = visibleTokens;
556
+ $[105] = t37;
558
557
  } else {
559
- t37 = $[106];
558
+ t37 = $[105];
560
559
  }
561
560
  let t38;
562
- if ($[116] !== size || $[117] !== tokens.length || $[118] !== tokensAreTruncated || $[119] !== visibleTokens.length) {
561
+ if ($[115] !== size || $[116] !== tokens.length || $[117] !== tokensAreTruncated || $[118] !== visibleTokens.length) {
563
562
  t38 = tokensAreTruncated && tokens.length - visibleTokens.length ? /*#__PURE__*/jsxs(Text, {
564
563
  className: overflowCountClassMap[size],
565
564
  children: ["+", tokens.length - visibleTokens.length]
566
565
  }) : null;
567
- $[116] = size;
568
- $[117] = tokens.length;
569
- $[118] = tokensAreTruncated;
570
- $[119] = visibleTokens.length;
571
- $[120] = t38;
566
+ $[115] = size;
567
+ $[116] = tokens.length;
568
+ $[117] = tokensAreTruncated;
569
+ $[118] = visibleTokens.length;
570
+ $[119] = t38;
572
571
  } else {
573
- t38 = $[120];
572
+ t38 = $[119];
574
573
  }
575
574
  let t39;
576
- if ($[121] !== preventTokenWrapping || $[122] !== t31 || $[123] !== t36 || $[124] !== t37 || $[125] !== t38) {
575
+ if ($[120] !== preventTokenWrapping || $[121] !== t31 || $[122] !== t36 || $[123] !== t37 || $[124] !== t38) {
577
576
  t39 = /*#__PURE__*/jsxs("div", {
578
577
  ref: t31,
579
578
  className: styles.Container,
580
579
  "data-prevent-token-wrapping": preventTokenWrapping,
581
580
  children: [t36, t37, t38]
582
581
  });
583
- $[121] = preventTokenWrapping;
584
- $[122] = t31;
585
- $[123] = t36;
586
- $[124] = t37;
587
- $[125] = t38;
588
- $[126] = t39;
582
+ $[120] = preventTokenWrapping;
583
+ $[121] = t31;
584
+ $[122] = t36;
585
+ $[123] = t37;
586
+ $[124] = t38;
587
+ $[125] = t39;
589
588
  } else {
590
- t39 = $[126];
589
+ t39 = $[125];
591
590
  }
592
591
  const t40 = typeof loading === "boolean";
593
592
  let t41;
594
- if ($[127] !== TrailingVisual) {
593
+ if ($[126] !== TrailingVisual) {
595
594
  t41 = typeof TrailingVisual !== "string" && isValidElementType(TrailingVisual) ? /*#__PURE__*/jsx(TrailingVisual, {}) : TrailingVisual;
596
- $[127] = TrailingVisual;
597
- $[128] = t41;
595
+ $[126] = TrailingVisual;
596
+ $[127] = t41;
598
597
  } else {
599
- t41 = $[128];
598
+ t41 = $[127];
600
599
  }
601
600
  let t42;
602
- if ($[129] !== showTrailingLoadingIndicator || $[130] !== t40 || $[131] !== t41) {
601
+ if ($[128] !== showTrailingLoadingIndicator || $[129] !== t40 || $[130] !== t41) {
603
602
  t42 = /*#__PURE__*/jsx(TextInputInnerVisualSlot, {
604
603
  hasLoadingIndicator: t40,
605
604
  visualPosition: "trailing",
606
605
  showLoadingIndicator: showTrailingLoadingIndicator,
607
606
  children: t41
608
607
  });
609
- $[129] = showTrailingLoadingIndicator;
610
- $[130] = t40;
611
- $[131] = t41;
612
- $[132] = t42;
608
+ $[128] = showTrailingLoadingIndicator;
609
+ $[129] = t40;
610
+ $[130] = t41;
611
+ $[131] = t42;
613
612
  } else {
614
- t42 = $[132];
613
+ t42 = $[131];
615
614
  }
616
615
  let t43;
617
- if ($[133] !== block || $[134] !== contrast || $[135] !== disabled || $[136] !== maxWidthProp || $[137] !== minWidthProp || $[138] !== t21 || $[139] !== t22 || $[140] !== t23 || $[141] !== t24 || $[142] !== t25 || $[143] !== t26 || $[144] !== t27 || $[145] !== t30 || $[146] !== t39 || $[147] !== t42 || $[148] !== validationStatus || $[149] !== variantProp || $[150] !== widthProp) {
616
+ if ($[132] !== block || $[133] !== contrast || $[134] !== disabled || $[135] !== maxWidthProp || $[136] !== minWidthProp || $[137] !== t21 || $[138] !== t22 || $[139] !== t23 || $[140] !== t24 || $[141] !== t25 || $[142] !== t26 || $[143] !== t27 || $[144] !== t30 || $[145] !== t39 || $[146] !== t42 || $[147] !== validationStatus || $[148] !== variantProp || $[149] !== widthProp) {
618
617
  t43 = /*#__PURE__*/jsxs(TextInputWrapper, {
619
618
  block: block,
620
619
  contrast: contrast,
@@ -633,27 +632,27 @@ function TextInputWithTokensInnerComponent(t0, forwardedRef) {
633
632
  style: t26,
634
633
  children: [t27, t30, t39, t42]
635
634
  });
636
- $[133] = block;
637
- $[134] = contrast;
638
- $[135] = disabled;
639
- $[136] = maxWidthProp;
640
- $[137] = minWidthProp;
641
- $[138] = t21;
642
- $[139] = t22;
643
- $[140] = t23;
644
- $[141] = t24;
645
- $[142] = t25;
646
- $[143] = t26;
647
- $[144] = t27;
648
- $[145] = t30;
649
- $[146] = t39;
650
- $[147] = t42;
651
- $[148] = validationStatus;
652
- $[149] = variantProp;
653
- $[150] = widthProp;
654
- $[151] = t43;
635
+ $[132] = block;
636
+ $[133] = contrast;
637
+ $[134] = disabled;
638
+ $[135] = maxWidthProp;
639
+ $[136] = minWidthProp;
640
+ $[137] = t21;
641
+ $[138] = t22;
642
+ $[139] = t23;
643
+ $[140] = t24;
644
+ $[141] = t25;
645
+ $[142] = t26;
646
+ $[143] = t27;
647
+ $[144] = t30;
648
+ $[145] = t39;
649
+ $[146] = t42;
650
+ $[147] = validationStatus;
651
+ $[148] = variantProp;
652
+ $[149] = widthProp;
653
+ $[150] = t43;
655
654
  } else {
656
- t43 = $[151];
655
+ t43 = $[150];
657
656
  }
658
657
  return t43;
659
658
  }
@@ -2,7 +2,7 @@ import { c } from 'react-compiler-runtime';
2
2
  import React, { forwardRef, useRef } from 'react';
3
3
  import { IconButton } from '../../Button/IconButton.js';
4
4
  import useDialog from '../../hooks/useDialog.js';
5
- import { useMergedRefs } from '../../hooks/useMergedRefs.js';
5
+ import { useRefObjectAsForwardedRef } from '../../hooks/useRefObjectAsForwardedRef.js';
6
6
  import { XIcon } from '@primer/octicons-react';
7
7
  import { clsx } from 'clsx';
8
8
  import classes from './Dialog.module.css.js';
@@ -78,7 +78,7 @@ function _temp(ch) {
78
78
  return typeof ch === "string";
79
79
  }
80
80
  const Dialog = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
81
- const $ = c(26);
81
+ const $ = c(25);
82
82
  let children;
83
83
  let className;
84
84
  let initialFocusRef;
@@ -121,7 +121,7 @@ const Dialog = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
121
121
  const Component = t2 === undefined ? "div" : t2;
122
122
  const overlayRef = useRef(null);
123
123
  const modalRef = useRef(null);
124
- const mergedRef = useMergedRefs(forwardedRef, modalRef);
124
+ useRefObjectAsForwardedRef(forwardedRef, modalRef);
125
125
  const closeButtonRef = useRef(null);
126
126
  let t3;
127
127
  if ($[9] !== onDismiss || $[10] !== returnFocusRef) {
@@ -161,14 +161,14 @@ const Dialog = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
161
161
  getDialogProps
162
162
  } = useDialog(t4);
163
163
  let t5;
164
- if ($[17] !== Component || $[18] !== children || $[19] !== className || $[20] !== getDialogProps || $[21] !== isOpen || $[22] !== mergedRef || $[23] !== onCloseClick || $[24] !== props) {
164
+ if ($[17] !== Component || $[18] !== children || $[19] !== className || $[20] !== getDialogProps || $[21] !== isOpen || $[22] !== onCloseClick || $[23] !== props) {
165
165
  t5 = isOpen ? /*#__PURE__*/jsxs(Fragment, {
166
166
  children: [/*#__PURE__*/jsx("span", {
167
167
  className: classes.Overlay,
168
168
  ref: overlayRef
169
169
  }), /*#__PURE__*/jsxs(Component, {
170
170
  tabIndex: -1,
171
- ref: mergedRef,
171
+ ref: modalRef,
172
172
  role: "dialog",
173
173
  "aria-modal": "true",
174
174
  ...props,
@@ -190,12 +190,11 @@ const Dialog = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
190
190
  $[19] = className;
191
191
  $[20] = getDialogProps;
192
192
  $[21] = isOpen;
193
- $[22] = mergedRef;
194
- $[23] = onCloseClick;
195
- $[24] = props;
196
- $[25] = t5;
193
+ $[22] = onCloseClick;
194
+ $[23] = props;
195
+ $[24] = t5;
197
196
  } else {
198
- t5 = $[25];
197
+ t5 = $[24];
199
198
  }
200
199
  return t5;
201
200
  });
@@ -15,18 +15,18 @@ import type { ForwardedRef, Ref as StandardRef } from 'react';
15
15
  * // React 18
16
16
  * const Example = forwardRef<HTMLButtonElement, {}>((props, forwardedRef) => {
17
17
  * const ref = useRef<HTMLButtonElement>(null)
18
- * const mergedRef = useMergedRefs(forwardedRef, ref)
18
+ * const combinedRef = useMergedRefs(forwardedRef, ref)
19
19
  *
20
- * return <button ref={mergedRef} />
20
+ * return <button ref={combinedRef} />
21
21
  * })
22
22
  *
23
23
  * @example
24
24
  * // React 19
25
25
  * const Example = ({ref: externalRef}: {ref?: Ref<HTMLButtonElement>}) => {
26
26
  * const ref = useRef<HTMLButtonElement>(null)
27
- * const mergedRef = useMergedRefs(externalRef, ref)
27
+ * const combinedRef = useMergedRefs(externalRef, ref)
28
28
  *
29
- * return <button ref={mergedRef} />
29
+ * return <button ref={combinedRef} />
30
30
  * }
31
31
  */
32
32
  export declare function useMergedRefs<T>(refA: Ref<T | null>, refB: Ref<T | null>): (value: T | null) => () => void;
@@ -17,18 +17,18 @@ import 'react';
17
17
  * // React 18
18
18
  * const Example = forwardRef<HTMLButtonElement, {}>((props, forwardedRef) => {
19
19
  * const ref = useRef<HTMLButtonElement>(null)
20
- * const mergedRef = useMergedRefs(forwardedRef, ref)
20
+ * const combinedRef = useMergedRefs(forwardedRef, ref)
21
21
  *
22
- * return <button ref={mergedRef} />
22
+ * return <button ref={combinedRef} />
23
23
  * })
24
24
  *
25
25
  * @example
26
26
  * // React 19
27
27
  * const Example = ({ref: externalRef}: {ref?: Ref<HTMLButtonElement>}) => {
28
28
  * const ref = useRef<HTMLButtonElement>(null)
29
- * const mergedRef = useMergedRefs(externalRef, ref)
29
+ * const combinedRef = useMergedRefs(externalRef, ref)
30
30
  *
31
- * return <button ref={mergedRef} />
31
+ * return <button ref={combinedRef} />
32
32
  * }
33
33
  */
34
34
  function useMergedRefs(refA, refB) {
@@ -526,19 +526,19 @@
526
526
  "parameters": [
527
527
  {
528
528
  "name": "refA",
529
- "type": "Ref<T>",
529
+ "type": "React.Ref<T> | undefined",
530
530
  "required": true,
531
531
  "description": "First ref to combine."
532
532
  },
533
533
  {
534
534
  "name": "refB",
535
- "type": "Ref<T>",
535
+ "type": "React.Ref<T> | undefined",
536
536
  "required": true,
537
537
  "description": "Second ref to combine."
538
538
  }
539
539
  ],
540
540
  "returns": {
541
- "type": "RefCallback<T>"
541
+ "type": "React.RefCallback<T>"
542
542
  }
543
543
  },
544
544
  "useOnEscapePress": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20260317165323",
4
+ "version": "0.0.0-20260317171210",
5
5
  "description": "An implementation of GitHub's Primer Design System using React",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -78,7 +78,6 @@
78
78
  "@github/relative-time-element": "^4.5.0",
79
79
  "@github/tab-container-element": "^4.8.2",
80
80
  "@lit-labs/react": "1.2.1",
81
- "@oddbird/css-anchor-positioning": "^0.9.0",
82
81
  "@oddbird/popover-polyfill": "^0.5.2",
83
82
  "@primer/behaviors": "^1.10.2",
84
83
  "@primer/live-region-element": "^0.7.1",
@@ -1,2 +0,0 @@
1
- .prc-AnchoredOverlay-ResponsiveCloseButtonContainer-nuium{position:relative}.prc-AnchoredOverlay-ResponsiveCloseButton-z-2rx{display:none;position:absolute;right:var(--base-size-8,.5rem);top:var(--base-size-8,.5rem)}@media screen and (max-width:calc(48rem - 0.02px)){.prc-AnchoredOverlay-ResponsiveCloseButton-z-2rx{display:inline-grid}}.prc-AnchoredOverlay-Wrapper-w6jU3{anchor-scope:--anchored-overlay-anchor}.prc-AnchoredOverlay-Anchor-DWRfK{anchor-name:--anchored-overlay-anchor}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z{position-anchor:--anchored-overlay-anchor;position-try-fallbacks:flip-block,flip-inline,flip-block flip-inline;position-visibility:anchors-visible;position:fixed;z-index:100}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-bottom]{left:anchor(left);top:calc(anchor(bottom) + var(--base-size-4,.25rem))}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-top]{bottom:anchor(top);left:anchor(left);margin-bottom:var(--base-size-4,.25rem)}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-left]{margin-right:var(--base-size-4,.25rem);right:anchor(left);top:anchor(top)}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-right]{left:anchor(right);margin-left:var(--base-size-4,.25rem);top:anchor(top)}
2
- /*# sourceMappingURL=AnchoredOverlay-0f6f45b5.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/AnchoredOverlay/AnchoredOverlay.module.css.js"],"names":[],"mappings":"AAAA,0DACE,iBACF,CAEA,iDAIE,YAAa,CAHb,iBAAkB,CAElB,8BAAyB,CADzB,4BAOF,CAHE,mDANF,iDAOI,mBAEJ,CADE,CAGF,mCACE,sCACF,CAEA,kCAEE,qCACF,CAEA,2CAEE,yCAA0C,CAC1C,oEAGwB,CACxB,mCAAoC,CAEpC,cAAe,CADf,WA0BF,CAvBE,qEAGE,iBAAkB,CADlB,oDAEF,CAEA,kEAEE,kBAAmB,CACnB,iBAAkB,CAFlB,uCAGF,CAEA,mEAGE,sCAAgC,CAFhC,kBAAmB,CACnB,eAEF,CAEA,oEACE,kBAAmB,CAEnB,qCAA+B,CAD/B,eAEF","file":"AnchoredOverlay-0f6f45b5.css","sourcesContent":[".ResponsiveCloseButtonContainer {\n position: relative;\n}\n\n.ResponsiveCloseButton {\n position: absolute;\n top: var(--base-size-8);\n right: var(--base-size-8);\n display: none;\n\n @media screen and (--viewportRange-narrow) {\n display: inline-grid;\n }\n}\n\n.Wrapper {\n anchor-scope: --anchored-overlay-anchor;\n}\n\n.Anchor {\n /* Anchor name, this is currently tied to `renderAnchor` */\n anchor-name: --anchored-overlay-anchor;\n}\n\n.AnchoredOverlay {\n /* Anchor position, this is currently tied to `<Overlay>` */\n position-anchor: --anchored-overlay-anchor;\n position-try-fallbacks:\n flip-block,\n flip-inline,\n flip-block flip-inline;\n position-visibility: anchors-visible;\n z-index: 100;\n position: fixed;\n\n &[data-side='outside-bottom'] {\n /* stylelint-disable primer/spacing */\n top: calc(anchor(bottom) + var(--base-size-4));\n left: anchor(left);\n }\n\n &[data-side='outside-top'] {\n margin-bottom: var(--base-size-4);\n bottom: anchor(top);\n left: anchor(left);\n }\n\n &[data-side='outside-left'] {\n right: anchor(left);\n top: anchor(top);\n margin-right: var(--base-size-4);\n }\n\n &[data-side='outside-right'] {\n left: anchor(right);\n top: anchor(top);\n margin-left: var(--base-size-4);\n }\n}\n"]}
@@ -1,2 +0,0 @@
1
- @keyframes prc-Overlay-overlay-appear-JpFey{0%{opacity:0}to{opacity:1}}.prc-Overlay-Overlay-jfs-T{background-color:var(--overlay-bgColor,var(--color-canvas-overlay));border-radius:var(--borderRadius-large,.75rem);box-shadow:var(--shadow-floating-small,var(--color-overlay-shadow));height:auto;max-height:100vh;max-width:calc(100vw - 2rem);min-width:192px;overflow:auto;position:absolute;width:auto}.prc-Overlay-Overlay-jfs-T:not([data-anchor-position]):not([data-variant=modal]),.prc-Overlay-Overlay-jfs-T[data-anchor-position=false]{bottom:var(--bottom,auto);right:var(--right,auto)}@media screen and (max-width:calc(48rem - 0.02px)){[data-responsive=fullscreen]:is(.prc-Overlay-Overlay-jfs-T[data-anchor-position=false],.prc-Overlay-Overlay-jfs-T:not([data-anchor-position]):not([data-variant=modal])):not([data-variant]){left:0;top:0}}:is(.prc-Overlay-Overlay-jfs-T[data-anchor-position=false],.prc-Overlay-Overlay-jfs-T:not([data-anchor-position]):not([data-variant=modal])):not([data-variant]){left:var(--left,auto);top:var(--top,auto)}.prc-Overlay-Overlay-jfs-T:focus{outline:none}@media (forced-colors:active){.prc-Overlay-Overlay-jfs-T{outline:1px solid transparent}}.prc-Overlay-Overlay-jfs-T:where([data-reflow-container=true]){max-width:calc(100vw - 2rem)}.prc-Overlay-Overlay-jfs-T:where([data-overflow-auto]){overflow:auto}.prc-Overlay-Overlay-jfs-T:where([data-overflow-hidden]){overflow:hidden}.prc-Overlay-Overlay-jfs-T:where([data-overflow-scroll]){overflow:scroll}.prc-Overlay-Overlay-jfs-T:where([data-overflow-visible]){overflow:visible}.prc-Overlay-Overlay-jfs-T:where([data-height-xsmall]){height:192px}.prc-Overlay-Overlay-jfs-T:where([data-height-small]){height:256px}.prc-Overlay-Overlay-jfs-T:where([data-height-medium]){height:320px}.prc-Overlay-Overlay-jfs-T:where([data-height-large]){height:432px}.prc-Overlay-Overlay-jfs-T:where([data-height-xlarge]){height:600px}.prc-Overlay-Overlay-jfs-T:where([data-height-auto]),.prc-Overlay-Overlay-jfs-T:where([data-height-initial]){height:auto}.prc-Overlay-Overlay-jfs-T:where([data-height-fit-content]){height:-moz-fit-content;height:fit-content}.prc-Overlay-Overlay-jfs-T:where([data-max-height-xsmall]){max-height:192px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-small]){max-height:256px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-medium]){max-height:320px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-large]){max-height:432px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-xlarge]){max-height:600px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-fit-content]){max-height:-moz-fit-content;max-height:fit-content}.prc-Overlay-Overlay-jfs-T:where([data-width-small]){width:256px}.prc-Overlay-Overlay-jfs-T:where([data-width-medium]){width:320px}.prc-Overlay-Overlay-jfs-T:where([data-width-large]){width:480px}.prc-Overlay-Overlay-jfs-T:where([data-width-xlarge]){width:640px}.prc-Overlay-Overlay-jfs-T:where([data-width-xxlarge]){width:960px}.prc-Overlay-Overlay-jfs-T:where([data-width-auto]){width:auto}.prc-Overlay-Overlay-jfs-T:where([data-max-width-small]){max-width:256px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-medium]){max-width:320px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-large]){max-width:480px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-xlarge]){max-width:640px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-xxlarge]){max-width:960px}.prc-Overlay-Overlay-jfs-T:where([data-visibility-visible]){visibility:visible}.prc-Overlay-Overlay-jfs-T:where([data-visibility-hidden]){visibility:hidden}@media screen and (max-width:calc(48rem - 0.02px)){.prc-Overlay-Overlay-jfs-T:where([data-responsive=fullscreen]){border-radius:unset;height:100vh;left:0;margin:0;max-height:none;max-width:none;padding-bottom:env(safe-area-inset-bottom);position:fixed;top:0;width:100vw}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-responsive=fullscreen]){height:100dvh}}}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-variant=fullscreen]){height:100dvh}}@media (prefers-reduced-motion:no-preference){.prc-Overlay-Overlay-jfs-T{animation:prc-Overlay-overlay-appear-JpFey .2s cubic-bezier(.33,1,.68,1)}}
2
- /*# sourceMappingURL=Overlay-2e0ce8db.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/Overlay/Overlay.module.css.js"],"names":[],"mappings":"AAAA,4CACE,GACE,SACF,CAEA,GACE,SACF,CACF,CAEA,2BAQE,mEAAwC,CACxC,8CAAwC,CACxC,mEAAwC,CALxC,WAAY,CACZ,gBAAiB,CAJjB,4BAA6B,CAE7B,eAAgB,CAGhB,aAAc,CANd,iBAAkB,CAElB,UAoMF,CA3LE,wIAKE,yBAA2B,CAF3B,uBAkBF,CAZI,mDADF,6LAGI,MAAO,CADP,KAGJ,CADE,CAGF,iKAIE,qBAAuB,CAFvB,mBAGF,CAGF,iCACE,YACF,CAEA,8BAvCF,2BAyCI,6BA8JJ,CA7JE,CAEA,+DACE,4BACF,CAEA,uDACE,aACF,CAEA,yDACE,eACF,CAEA,yDACE,eACF,CAEA,0DACE,gBACF,CAEA,uDACE,YACF,CAEA,sDACE,YACF,CAEA,uDACE,YACF,CAEA,sDACE,YACF,CAEA,uDACE,YACF,CAEA,6GAEE,WACF,CAEA,4DACE,uBAAmB,CAAnB,kBACF,CAEA,2DACE,gBACF,CAEA,0DACE,gBACF,CAEA,2DACE,gBACF,CAEA,0DACE,gBACF,CAEA,2DACE,gBACF,CAEA,gEACE,2BAAuB,CAAvB,sBACF,CAEA,qDACE,WACF,CAEA,sDACE,WACF,CAEA,qDAEE,WACF,CAEA,sDAEE,WACF,CAEA,uDAEE,WACF,CAEA,oDACE,UACF,CAEA,yDACE,eACF,CAEA,0DACE,eACF,CAEA,yDACE,eACF,CAEA,0DACE,eACF,CAEA,2DACE,eACF,CAEA,4DACE,kBACF,CAEA,2DACE,iBACF,CAGE,mDADF,+DAUI,mBAAoB,CAHpB,YAAa,CAHb,MAAO,CAKP,QAAS,CADT,eAAgB,CAFhB,cAAe,CAMf,0CAA2C,CAV3C,cAAe,CACf,KAAM,CAEN,WAcJ,CALI,0BAdJ,+DAgBM,aAGN,CAFI,CACF,CAGF,0BAEE,4DACE,aACF,CACF,CAGF,8CACE,2BACE,wEACF,CACF","file":"Overlay-2e0ce8db.css","sourcesContent":["@keyframes overlay-appear {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n.Overlay {\n position: absolute;\n max-width: calc(100vw - 2rem);\n width: auto;\n min-width: 192px;\n height: auto;\n max-height: 100vh;\n overflow: auto;\n background-color: var(--overlay-bgColor);\n border-radius: var(--borderRadius-large);\n box-shadow: var(--shadow-floating-small);\n\n &[data-anchor-position='false'],\n &:not([data-anchor-position]):not([data-variant='modal']) {\n /* stylelint-disable-next-line primer/spacing */\n right: var(--right, auto);\n /* stylelint-disable-next-line primer/spacing */\n bottom: var(--bottom, auto);\n\n /* stylelint-disable-next-line selector-max-specificity */\n &[data-responsive='fullscreen']:not([data-variant]) {\n @media screen and (--viewportRange-narrow) {\n top: 0;\n left: 0;\n }\n }\n\n &:not([data-variant]) {\n /* stylelint-disable-next-line primer/spacing */\n top: var(--top, auto);\n /* stylelint-disable-next-line primer/spacing */\n left: var(--left, auto);\n }\n }\n\n &:focus {\n outline: none;\n }\n\n @media (forced-colors: active) {\n /* Support for Windows high contrast https://sarahmhigley.com/writing/whcm-quick-tips */\n outline: solid 1px transparent;\n }\n\n &:where([data-reflow-container='true']) {\n max-width: calc(100vw - 2rem);\n }\n\n &:where([data-overflow-auto]) {\n overflow: auto;\n }\n\n &:where([data-overflow-hidden]) {\n overflow: hidden;\n }\n\n &:where([data-overflow-scroll]) {\n overflow: scroll;\n }\n\n &:where([data-overflow-visible]) {\n overflow: visible;\n }\n\n &:where([data-height-xsmall]) {\n height: 192px;\n }\n\n &:where([data-height-small]) {\n height: 256px;\n }\n\n &:where([data-height-medium]) {\n height: 320px;\n }\n\n &:where([data-height-large]) {\n height: 432px;\n }\n\n &:where([data-height-xlarge]) {\n height: 600px;\n }\n\n &:where([data-height-auto]),\n &:where([data-height-initial]) {\n height: auto;\n }\n\n &:where([data-height-fit-content]) {\n height: fit-content;\n }\n\n &:where([data-max-height-xsmall]) {\n max-height: 192px;\n }\n\n &:where([data-max-height-small]) {\n max-height: 256px;\n }\n\n &:where([data-max-height-medium]) {\n max-height: 320px;\n }\n\n &:where([data-max-height-large]) {\n max-height: 432px;\n }\n\n &:where([data-max-height-xlarge]) {\n max-height: 600px;\n }\n\n &:where([data-max-height-fit-content]) {\n max-height: fit-content;\n }\n\n &:where([data-width-small]) {\n width: 256px;\n }\n\n &:where([data-width-medium]) {\n width: 320px;\n }\n\n &:where([data-width-large]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 480px;\n }\n\n &:where([data-width-xlarge]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 640px;\n }\n\n &:where([data-width-xxlarge]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 960px;\n }\n\n &:where([data-width-auto]) {\n width: auto;\n }\n\n &:where([data-max-width-small]) {\n max-width: 256px;\n }\n\n &:where([data-max-width-medium]) {\n max-width: 320px;\n }\n\n &:where([data-max-width-large]) {\n max-width: 480px;\n }\n\n &:where([data-max-width-xlarge]) {\n max-width: 640px;\n }\n\n &:where([data-max-width-xxlarge]) {\n max-width: 960px;\n }\n\n &:where([data-visibility-visible]) {\n visibility: visible;\n }\n\n &:where([data-visibility-hidden]) {\n visibility: hidden;\n }\n\n &:where([data-responsive='fullscreen']) {\n @media screen and (--viewportRange-narrow) {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n max-width: none;\n height: 100vh;\n max-height: none;\n margin: 0;\n border-radius: unset;\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: env(safe-area-inset-bottom);\n\n @supports (height: 100dvh) {\n /* fix for mobile safari (100vh clips the screen with the toolbar) */\n height: 100dvh;\n }\n }\n }\n\n @supports (height: 100dvh) {\n /* fix for mobile safari (100vh clips the screen with the toolbar) */\n &:where([data-variant='fullscreen']) {\n height: 100dvh;\n }\n }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .Overlay {\n animation: overlay-appear 200ms cubic-bezier(0.33, 1, 0.68, 1);\n }\n}\n"]}