@primer/react 0.0.0-20260413213855 → 0.0.0-20260413214635

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.
package/CHANGELOG.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # @primer/react
2
2
 
3
- ## 0.0.0-20260413213855
3
+ ## 0.0.0-20260413214635
4
4
 
5
5
  ### Minor Changes
6
6
 
7
7
  - [#7723](https://github.com/primer/react/pull/7723) [`ec6c88f`](https://github.com/primer/react/commit/ec6c88fe3eb3ef349500617c90378712f802376d) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Add Card component with subcomponents: Card.Icon, Card.Image, Card.Heading, Card.Description, Card.Menu, and Card.Metadata
8
8
 
9
- - [#7725](https://github.com/primer/react/pull/7725) [`1388a51`](https://github.com/primer/react/commit/1388a51cba3e00f5f30f2f4ad4e3f2e5f6b482d7) Thanks [@TylerJDev](https://github.com/TylerJDev)! - CSS Anchor Positioning: Remove polyfill, add extra CSS rules to ensure overlays take available space
9
+ - [#7752](https://github.com/primer/react/pull/7752) [`c0a5a28`](https://github.com/primer/react/commit/c0a5a2863e846c4de6679a34bc65f9ab874bc0fe) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Breadcrumbs: Graduate `primer_react_breadcrumbs_overflow_menu` feature flag, making the overflow menu behavior always-on.
10
10
 
11
11
  - [#7733](https://github.com/primer/react/pull/7733) [`b9211db`](https://github.com/primer/react/commit/b9211db173841c9d9a531c777c5ce2c0cd8af60f) Thanks [@francinelucca](https://github.com/francinelucca)! - Overlay: Graduate `primer_react_overlay_max_height_clamp_to_viewport` feature flag
12
12
 
@@ -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}}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z{position-try-fallbacks:flip-block,flip-inline,flip-block flip-inline;position-visibility:anchors-visible;position:fixed!important;z-index:100}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[popover]{border:0;inset:auto;margin:0;max-height:none;max-width:none;padding:0}.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-647c7065.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,CAGF,2CACE,oEAGwB,CACxB,mCAAoC,CAEpC,wBAA0B,CAD1B,WAmCF,CAhCE,oDAIE,QAAS,CAHT,UAAW,CACX,QAAS,CAGT,eAAgB,CAChB,cAAe,CAHf,SAIF,CAEA,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-647c7065.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.AnchoredOverlay {\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 !important;\n\n &[popover] {\n inset: auto;\n margin: 0;\n padding: 0;\n border: 0;\n max-height: none;\n max-width: none;\n }\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 +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;AAE9D,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;AAO1D,UAAU,8BAA8B;IACtC;;;OAGG;IACH,YAAY,EAAE,CAAC,CAA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CAAC,CAAA;IAElD;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAA;IAElD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC,UAAU,EAAE,UAAU,GAAG,YAAY,CAAC,CAAA;IAChE;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,EAAC,QAAQ,EAAC,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;AAoB9G;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,CAwNnF,CAAA"}
@@ -1,4 +1,4 @@
1
- import { useRef, useCallback, useEffect } from 'react';
1
+ import { useCallback, useRef, useEffect } from 'react';
2
2
  import useIsomorphicLayoutEffect from '../utils/useIsomorphicLayoutEffect.js';
3
3
  import { useFocusTrap } from '../hooks/useFocusTrap.js';
4
4
  import { useFocusZone } from '../hooks/useFocusZone.js';
@@ -7,13 +7,23 @@ import { IconButton } from '../Button/IconButton.js';
7
7
  import { XIcon } from '@primer/octicons-react';
8
8
  import classes from './AnchoredOverlay.module.css.js';
9
9
  import { clsx } from 'clsx';
10
- import Overlay, { widthMap } from '../Overlay/Overlay.js';
11
10
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
12
11
  import { useFeatureFlag } from '../FeatureFlags/useFeatureFlag.js';
13
12
  import { useProvidedRefOrCreate } from '../hooks/useProvidedRefOrCreate.js';
14
13
  import { useRenderForcingRef } from '../hooks/useRenderForcingRef.js';
15
14
  import { useAnchoredPosition } from '../hooks/useAnchoredPosition.js';
15
+ import Overlay from '../Overlay/Overlay.js';
16
16
 
17
+ const applyAnchorPositioningPolyfill = async () => {
18
+ if (typeof window !== 'undefined' && !('anchorName' in document.documentElement.style)) {
19
+ try {
20
+ await import('@oddbird/css-anchor-positioning');
21
+ } catch (e) {
22
+ // eslint-disable-next-line no-console
23
+ console.warn('Failed to load CSS anchor positioning polyfill:', e);
24
+ }
25
+ }
26
+ };
17
27
  const defaultVariant = {
18
28
  regular: 'anchored',
19
29
  narrow: 'anchored'
@@ -50,9 +60,7 @@ const AnchoredOverlay = ({
50
60
  displayCloseButton = true,
51
61
  closeButtonProps = defaultCloseButtonProps
52
62
  }) => {
53
- const cssAnchorPositioningFlag = useFeatureFlag('primer_react_css_anchor_positioning');
54
- const supportsNativeCSSAnchorPositioning = useRef(false);
55
- const cssAnchorPositioning = cssAnchorPositioningFlag && supportsNativeCSSAnchorPositioning.current;
63
+ const cssAnchorPositioning = useFeatureFlag('primer_react_css_anchor_positioning');
56
64
  const anchorRef = useProvidedRefOrCreate(externalAnchorRef);
57
65
  const [overlayRef, updateOverlayRef] = useRenderForcingRef();
58
66
  const anchorId = useId(externalAnchorId);
@@ -101,14 +109,17 @@ const AnchoredOverlay = ({
101
109
  displayInViewport,
102
110
  onPositionChange: positionChange
103
111
  }, [overlayRef.current]);
112
+ const hasLoadedAnchorPositioningPolyfill = useRef(false);
104
113
  useEffect(() => {
105
- supportsNativeCSSAnchorPositioning.current = 'anchorName' in document.documentElement.style;
106
-
107
114
  // ensure overlay ref gets cleared when closed, so position can reset between closing/re-opening
108
115
  if (!open && overlayRef.current) {
109
116
  updateOverlayRef(null);
110
117
  }
111
- }, [open, overlayRef, updateOverlayRef]);
118
+ if (cssAnchorPositioning && !hasLoadedAnchorPositioningPolyfill.current) {
119
+ applyAnchorPositioningPolyfill();
120
+ hasLoadedAnchorPositioningPolyfill.current = true;
121
+ }
122
+ }, [open, overlayRef, updateOverlayRef, cssAnchorPositioning]);
112
123
  useFocusZone({
113
124
  containerRef: overlayRef,
114
125
  disabled: !open || !position_0,
@@ -144,16 +155,6 @@ const AnchoredOverlay = ({
144
155
  const currentOverlay = overlayRef.current;
145
156
  if (!cssAnchorPositioning || !open || !currentOverlay) return;
146
157
  currentOverlay.style.setProperty('position-anchor', `--anchored-overlay-anchor-${id}`);
147
- const anchorElement = anchorRef.current;
148
- if (anchorElement) {
149
- const overlayWidth = width ? parseInt(widthMap[width]) : null;
150
- const result = getDefaultPosition(anchorElement, overlayWidth);
151
- currentOverlay.setAttribute('data-align', result.horizontal);
152
-
153
- // Apply offset only when viewport is too narrow
154
- const offset = result.horizontal === 'left' ? result.leftOffset : result.rightOffset;
155
- currentOverlay.style.setProperty(`--anchored-overlay-anchor-offset-${result.horizontal}`, `${offset || 0}px`);
156
- }
157
158
  try {
158
159
  if (!currentOverlay.matches(':popover-open')) {
159
160
  currentOverlay.showPopover();
@@ -161,7 +162,7 @@ const AnchoredOverlay = ({
161
162
  } catch {
162
163
  // Ignore if popover is already showing or not supported
163
164
  }
164
- }, [cssAnchorPositioning, open, overlayElement, id, overlayRef, anchorRef, width]);
165
+ }, [cssAnchorPositioning, open, overlayElement, id, overlayRef]);
165
166
  const showXIcon = onClose && variant.narrow === 'fullscreen' && displayCloseButton;
166
167
  const XButtonAriaLabelledBy = closeButtonProps['aria-labelledby'];
167
168
  const XButtonAriaLabel = closeButtonProps['aria-label'];
@@ -199,7 +200,6 @@ const AnchoredOverlay = ({
199
200
  preventOverflow: preventOverflow,
200
201
  "data-component": "AnchoredOverlay",
201
202
  _PrivateDisablePortal: _PrivateDisablePortal,
202
- _PrivateSkipPopoverLogic: cssAnchorPositioning,
203
203
  ...(cssAnchorPositioning ? {
204
204
  popover: 'manual'
205
205
  } : {}),
@@ -238,29 +238,6 @@ const AnchoredOverlay = ({
238
238
  }) : null]
239
239
  });
240
240
  };
241
- function getDefaultPosition(anchorElement, overlayWidth) {
242
- const rect = anchorElement.getBoundingClientRect();
243
- const vw = window.innerWidth;
244
- const viewportMargin = 8;
245
- const spaceLeft = rect.left;
246
- const spaceRight = vw - rect.right;
247
- const horizontal = spaceLeft > spaceRight ? 'left' : 'right';
248
-
249
- // If there's no explicit overlay width, or either side has enough space
250
- // to contain the overlay, let CSS position-try-fallbacks handle positioning
251
- if (!overlayWidth || spaceLeft >= overlayWidth + viewportMargin || spaceRight >= overlayWidth + viewportMargin) {
252
- return {
253
- horizontal
254
- };
255
- }
256
- const leftOffset = Math.max(0, overlayWidth - rect.right + viewportMargin);
257
- const rightOffset = Math.max(0, rect.left + overlayWidth - vw + viewportMargin);
258
- return {
259
- horizontal,
260
- leftOffset,
261
- rightOffset
262
- };
263
- }
264
241
  function assignRef(ref, value) {
265
242
  if (typeof ref === 'function') {
266
243
  ref(value);
@@ -1,4 +1,4 @@
1
- import './AnchoredOverlay-acde1a0a.css';
1
+ import './AnchoredOverlay-647c7065.css';
2
2
 
3
3
  var classes = {"ResponsiveCloseButtonContainer":"prc-AnchoredOverlay-ResponsiveCloseButtonContainer-nuium","ResponsiveCloseButton":"prc-AnchoredOverlay-ResponsiveCloseButton-z-2rx","AnchoredOverlay":"prc-AnchoredOverlay-AnchoredOverlay-fYg9Z"};
4
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,EAAE,EAAC,MAAM,SAAS,CAAA;AAC/B,OAAO,KAA6E,MAAM,OAAO,CAAA;AAWjG,OAAO,EAAC,KAAK,g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KAAK,CAAC,WAAW;aANtB,EAAE;mBACI,OAAO;;aADb,EAAE;mBACI,OAAO;;;;CAgCuD,CAAA;AAE7E;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAA;AAE9C;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI,oBAAoB,CAAC,EAAE,CAAC,CAAA"}
@@ -10,7 +10,6 @@ import { useOnEscapePress } from '../hooks/useOnEscapePress.js';
10
10
  import { useOnOutsideClick } from '../hooks/useOnOutsideClick.js';
11
11
  import { fixedForwardRef } from '../utils/modern-polymorphic.js';
12
12
  import { jsx, jsxs } from 'react/jsx-runtime';
13
- import { useFeatureFlag } from '../FeatureFlags/useFeatureFlag.js';
14
13
  import Details from '../Details/Details.js';
15
14
 
16
15
  const BreadcrumbsList = t0 => {
@@ -213,11 +212,6 @@ function Breadcrumbs({
213
212
  overflow = 'wrap',
214
213
  variant = 'normal'
215
214
  }) {
216
- const overflowMenuEnabled = useFeatureFlag('primer_react_breadcrumbs_overflow_menu');
217
- const wrappedChildren = React.Children.map(children, child => /*#__PURE__*/jsx("li", {
218
- className: classes.ItemWrapper,
219
- children: child
220
- }));
221
215
  const containerRef = useRef(null);
222
216
  const measureMenuButton = useCallback(element => {
223
217
  if (element) {
@@ -246,13 +240,13 @@ function Breadcrumbs({
246
240
  useEffect(() => {
247
241
  var _containerRef$current;
248
242
  const listElement = (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.querySelector('ol');
249
- if (overflowMenuEnabled && listElement && listElement.children.length > 0 && listElement.children.length === childArray.length) {
243
+ if (listElement && listElement.children.length > 0 && listElement.children.length === childArray.length) {
250
244
  const listElementArray = Array.from(listElement.children);
251
- const widths = listElementArray.map(child_0 => child_0.offsetWidth);
245
+ const widths = listElementArray.map(child => child.offsetWidth);
252
246
  setChildArrayWidths(widths);
253
247
  setRootItemWidth(listElementArray[0].offsetWidth);
254
248
  }
255
- }, [childArray, overflowMenuEnabled]);
249
+ }, [childArray]);
256
250
  const calculateOverflow = useCallback(availableWidth => {
257
251
  let eHideRoot = effectiveHideRoot;
258
252
  const MENU_BUTTON_WIDTH = menuButtonWidth;
@@ -297,7 +291,7 @@ function Breadcrumbs({
297
291
  };
298
292
  }, [childArray, childArrayWidths, effectiveHideRoot, hideRoot, overflow, rootItemWidth, menuButtonWidth]);
299
293
  const handleResize = useCallback(entries => {
300
- if (overflowMenuEnabled && entries[0]) {
294
+ if (entries[0]) {
301
295
  const containerWidth = entries[0].contentRect.width;
302
296
  const result = calculateOverflow(containerWidth);
303
297
  if (visibleItems.length !== result.visibleItems.length && menuItems.length !== result.menuItems.length || result.effectiveHideRoot !== effectiveHideRoot) {
@@ -306,57 +300,56 @@ function Breadcrumbs({
306
300
  setEffectiveHideRoot(result.effectiveHideRoot);
307
301
  }
308
302
  }
309
- }, [calculateOverflow, effectiveHideRoot, menuItems.length, overflowMenuEnabled, visibleItems.length]);
303
+ }, [calculateOverflow, effectiveHideRoot, menuItems.length, visibleItems.length]);
310
304
  useResizeObserver(handleResize, containerRef);
311
305
  useEffect(() => {
312
- if (overflowMenuEnabled && (overflow === 'menu' || overflow === 'menu-with-root') && childArray.length > 5 && menuItems.length === 0) {
306
+ if ((overflow === 'menu' || overflow === 'menu-with-root') && childArray.length > 5 && menuItems.length === 0) {
313
307
  var _containerRef$current2;
314
308
  const containerWidth_0 = ((_containerRef$current2 = containerRef.current) === null || _containerRef$current2 === void 0 ? void 0 : _containerRef$current2.offsetWidth) || 800;
315
309
  const result_0 = calculateOverflow(containerWidth_0);
310
+ // eslint-disable-next-line react-hooks/set-state-in-effect
316
311
  setVisibleItems(result_0.visibleItems);
317
312
  setMenuItems(result_0.menuItems);
318
313
  setEffectiveHideRoot(result_0.effectiveHideRoot);
319
314
  }
320
- }, [overflow, childArray, calculateOverflow, menuItems.length, overflowMenuEnabled]);
315
+ }, [overflow, childArray, calculateOverflow, menuItems.length]);
321
316
  const finalChildren = React.useMemo(() => {
322
- if (overflowMenuEnabled) {
323
- if (overflow === 'wrap' || menuItems.length === 0) {
324
- return React.Children.map(children, child_1 => /*#__PURE__*/jsx("li", {
325
- className: classes.ItemWrapper,
326
- children: child_1
327
- }));
328
- }
329
- let effectiveMenuItems = [...menuItems];
330
- // In 'menu-with-root' mode, include the root item inside the menu even if it's visible in the breadcrumbs
331
- if (!effectiveHideRoot) {
332
- effectiveMenuItems = [...menuItems.slice(1)];
333
- }
334
- const menuElement = /*#__PURE__*/jsxs("li", {
335
- className: classes.BreadcrumbsItem,
336
- children: [/*#__PURE__*/jsx(BreadcrumbsMenuItem, {
337
- ref: measureMenuButton,
338
- items: effectiveMenuItems,
339
- "aria-label": `${effectiveMenuItems.length} more breadcrumb items`
340
- }), /*#__PURE__*/jsx(ItemSeparator, {})]
341
- }, "breadcrumbs-menu");
342
- const visibleElements = visibleItems.map((child_2, index) => /*#__PURE__*/jsxs("li", {
343
- className: classes.BreadcrumbsItem,
344
- children: [child_2, /*#__PURE__*/jsx(ItemSeparator, {})]
345
- }, `visible + ${index}`));
346
- const rootElement = /*#__PURE__*/jsxs("li", {
347
- className: classes.BreadcrumbsItem,
348
- children: [rootItem, /*#__PURE__*/jsx(ItemSeparator, {})]
349
- }, `rootElement`);
350
- if (effectiveHideRoot) {
351
- // Show: [overflow menu, leaf breadcrumb]
352
- return [menuElement, ...visibleElements];
353
- } else {
354
- // Show: [root breadcrumb, overflow menu, leaf breadcrumb]
355
- return [rootElement, menuElement, ...visibleElements];
356
- }
317
+ if (overflow === 'wrap' || menuItems.length === 0) {
318
+ return React.Children.map(children, child_0 => /*#__PURE__*/jsx("li", {
319
+ className: classes.ItemWrapper,
320
+ children: child_0
321
+ }));
357
322
  }
358
- }, [overflowMenuEnabled, overflow, menuItems, effectiveHideRoot, measureMenuButton, visibleItems, rootItem, children]);
359
- return overflowMenuEnabled ? /*#__PURE__*/jsx("nav", {
323
+ let effectiveMenuItems = [...menuItems];
324
+ // In 'menu-with-root' mode, include the root item inside the menu even if it's visible in the breadcrumbs
325
+ if (!effectiveHideRoot) {
326
+ effectiveMenuItems = [...menuItems.slice(1)];
327
+ }
328
+ const menuElement = /*#__PURE__*/jsxs("li", {
329
+ className: classes.BreadcrumbsItem,
330
+ children: [/*#__PURE__*/jsx(BreadcrumbsMenuItem, {
331
+ ref: measureMenuButton,
332
+ items: effectiveMenuItems,
333
+ "aria-label": `${effectiveMenuItems.length} more breadcrumb items`
334
+ }), /*#__PURE__*/jsx(ItemSeparator, {})]
335
+ }, "breadcrumbs-menu");
336
+ const visibleElements = visibleItems.map((child_1, index) => /*#__PURE__*/jsxs("li", {
337
+ className: classes.BreadcrumbsItem,
338
+ children: [child_1, /*#__PURE__*/jsx(ItemSeparator, {})]
339
+ }, `visible + ${index}`));
340
+ const rootElement = /*#__PURE__*/jsxs("li", {
341
+ className: classes.BreadcrumbsItem,
342
+ children: [rootItem, /*#__PURE__*/jsx(ItemSeparator, {})]
343
+ }, `rootElement`);
344
+ if (effectiveHideRoot) {
345
+ // Show: [overflow menu, leaf breadcrumb]
346
+ return [menuElement, ...visibleElements];
347
+ } else {
348
+ // Show: [root breadcrumb, overflow menu, leaf breadcrumb]
349
+ return [rootElement, menuElement, ...visibleElements];
350
+ }
351
+ }, [overflow, menuItems, effectiveHideRoot, measureMenuButton, visibleItems, rootItem, children]);
352
+ return /*#__PURE__*/jsx("nav", {
360
353
  className: clsx(className, classes.BreadcrumbsBase),
361
354
  "aria-label": "Breadcrumbs",
362
355
  style: style,
@@ -366,16 +359,9 @@ function Breadcrumbs({
366
359
  children: /*#__PURE__*/jsx(BreadcrumbsList, {
367
360
  children: finalChildren
368
361
  })
369
- }) : /*#__PURE__*/jsx("nav", {
370
- className: clsx(className, classes.BreadcrumbsBase),
371
- "aria-label": "Breadcrumbs",
372
- style: style,
373
- "data-variant": variant,
374
- children: /*#__PURE__*/jsx(BreadcrumbsList, {
375
- children: wrappedChildren
376
- })
377
362
  });
378
363
  }
364
+ Breadcrumbs.displayName = "Breadcrumbs";
379
365
  const ItemSeparator = () => {
380
366
  const $ = c(1);
381
367
  let t0;
@@ -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,kBAM9B,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,kBAK9B,CAAA"}
@@ -1,7 +1,6 @@
1
1
  import { FeatureFlagScope } from './FeatureFlagScope.js';
2
2
 
3
3
  const DefaultFeatureFlags = FeatureFlagScope.create({
4
- primer_react_breadcrumbs_overflow_menu: false,
5
4
  primer_react_css_anchor_positioning: false,
6
5
  primer_react_select_panel_fullscreen_on_narrow: false,
7
6
  primer_react_select_panel_order_selected_at_top: false,
@@ -1,2 +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);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:min(192px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-xsmall]){max-height:min(192px,100dvh)}}.prc-Overlay-Overlay-jfs-T:where([data-max-height-small]){max-height:min(256px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-small]){max-height:min(256px,100dvh)}}.prc-Overlay-Overlay-jfs-T:where([data-max-height-medium]){max-height:min(320px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-medium]){max-height:min(320px,100dvh)}}.prc-Overlay-Overlay-jfs-T:where([data-max-height-large]){max-height:min(432px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-large]){max-height:min(432px,100dvh)}}.prc-Overlay-Overlay-jfs-T:where([data-max-height-xlarge]){max-height:min(600px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-xlarge]){max-height:min(600px,100dvh)}}.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}.prc-Overlay-Overlay-jfs-T[popover]:not([data-anchor-position]){border:0;inset:auto;margin:0;max-width:none;padding:0}@media screen and (max-width:calc(48rem - 0.02px)){.prc-Overlay-Overlay-jfs-T:where([data-responsive=fullscreen]),.prc-Overlay-Overlay-jfs-T[data-responsive=fullscreen][data-anchor-position]{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]),.prc-Overlay-Overlay-jfs-T[data-responsive=fullscreen][data-anchor-position]{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-aa33dbd7.css.map */
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:min(192px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-xsmall]){max-height:min(192px,100dvh)}}.prc-Overlay-Overlay-jfs-T:where([data-max-height-small]){max-height:min(256px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-small]){max-height:min(256px,100dvh)}}.prc-Overlay-Overlay-jfs-T:where([data-max-height-medium]){max-height:min(320px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-medium]){max-height:min(320px,100dvh)}}.prc-Overlay-Overlay-jfs-T:where([data-max-height-large]){max-height:min(432px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-large]){max-height:min(432px,100dvh)}}.prc-Overlay-Overlay-jfs-T:where([data-max-height-xlarge]){max-height:min(600px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-xlarge]){max-height:min(600px,100dvh)}}.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-30b84506.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,CACxC,mEAAwC,CALxC,WAAY,CACZ,gBAAiB,CAJjB,4BAA6B,CAE7B,eAAgB,CAGhB,aAAc,CANd,iBAAkB,CAElB,UAwNF,CA/ME,wIAKE,yBAA2B,CAF3B,uBAkBF,CAZI,mDADF,6LAGI,MAAO,CADP,KAGJ,CADE,CAGF,iKAIE,qBAAuB,CAFvB,mBAGF,CAGF,iCACE,YACF,CAEA,8BAvCF,2BAyCI,6BAkLJ,CAjLE,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,2BAKF,CAHE,0BAHF,2DAII,4BAEJ,CADE,CAGF,0DACE,2BAKF,CAHE,0BAHF,0DAII,4BAEJ,CADE,CAGF,2DACE,2BAKF,CAHE,0BAHF,2DAII,4BAEJ,CADE,CAGF,0DACE,2BAKF,CAHE,0BAHF,0DAII,4BAEJ,CADE,CAGF,2DACE,2BAKF,CAHE,0BAHF,2DAII,4BAEJ,CADE,CAGF,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-30b84506.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: min(192px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(192px, 100dvh);\n }\n }\n\n &:where([data-max-height-small]) {\n max-height: min(256px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(256px, 100dvh);\n }\n }\n\n &:where([data-max-height-medium]) {\n max-height: min(320px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(320px, 100dvh);\n }\n }\n\n &:where([data-max-height-large]) {\n max-height: min(432px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(432px, 100dvh);\n }\n }\n\n &:where([data-max-height-xlarge]) {\n max-height: min(600px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(600px, 100dvh);\n }\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"]}
@@ -23,7 +23,7 @@ export declare const heightMap: {
23
23
  initial: string;
24
24
  'fit-content': string;
25
25
  };
26
- export declare const widthMap: {
26
+ declare const widthMap: {
27
27
  small: string;
28
28
  medium: string;
29
29
  large: string;
@@ -43,7 +43,6 @@ type BaseOverlayProps = {
43
43
  children?: React.ReactNode;
44
44
  className?: string;
45
45
  responsiveVariant?: 'fullscreen';
46
- popover?: 'auto' | 'manual';
47
46
  };
48
47
  type OwnOverlayProps = Merge<StyledOverlayProps, BaseOverlayProps>;
49
48
  /**
@@ -63,7 +62,6 @@ export declare const BaseOverlay: PolymorphicForwardRefComponent<"div", OwnOverl
63
62
  type ContainerProps = {
64
63
  anchorSide?: AnchorSide;
65
64
  _PrivateDisablePortal?: boolean;
66
- _PrivateSkipPopoverLogic?: boolean;
67
65
  ignoreClickRefs?: React.RefObject<HTMLElement | null>[];
68
66
  initialFocusRef?: React.RefObject<HTMLElement | null>;
69
67
  onClickOutside: (e: TouchOrMouseEvent) => void;
@@ -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,CAAC,EAA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 'auto'
21
21
  'fit-content': 'fit-content'
22
22
  };
23
- const widthMap = {
24
- small: '256px',
25
- medium: '320px',
26
- large: '480px',
27
- xlarge: '640px',
28
- xxlarge: '960px',
29
- auto: 'auto'
30
- };
31
23
  const animationDuration = 200;
32
24
  function getSlideAnimationStartingVector(anchorSide) {
33
25
  if (anchorSide !== null && anchorSide !== void 0 && anchorSide.endsWith('bottom')) {
@@ -124,16 +116,14 @@ const BaseOverlay = /*#__PURE__*/React.forwardRef(({
124
116
 
125
117
  */
126
118
  const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
127
- const $ = c(53);
119
+ const $ = c(46);
128
120
  let _PrivateDisablePortal;
129
- let _PrivateSkipPopoverLogic;
130
121
  let anchorSide;
131
122
  let ignoreClickRefs;
132
123
  let initialFocusRef;
133
124
  let left;
134
125
  let onClickOutside;
135
126
  let onEscape;
136
- let popover;
137
127
  let portalContainerName;
138
128
  let preventFocusOnOpen;
139
129
  let props;
@@ -149,7 +139,6 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
149
139
  ({
150
140
  anchorSide,
151
141
  _PrivateDisablePortal,
152
- _PrivateSkipPopoverLogic,
153
142
  height: t1,
154
143
  ignoreClickRefs,
155
144
  initialFocusRef,
@@ -165,51 +154,46 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
165
154
  visibility: t4,
166
155
  width: t5,
167
156
  responsiveVariant,
168
- popover,
169
157
  ...props
170
158
  } = t0);
171
159
  $[0] = t0;
172
160
  $[1] = _PrivateDisablePortal;
173
- $[2] = _PrivateSkipPopoverLogic;
174
- $[3] = anchorSide;
175
- $[4] = ignoreClickRefs;
176
- $[5] = initialFocusRef;
177
- $[6] = left;
178
- $[7] = onClickOutside;
179
- $[8] = onEscape;
180
- $[9] = popover;
181
- $[10] = portalContainerName;
182
- $[11] = preventFocusOnOpen;
183
- $[12] = props;
184
- $[13] = responsiveVariant;
185
- $[14] = returnFocusRef;
186
- $[15] = right;
187
- $[16] = t1;
188
- $[17] = t2;
189
- $[18] = t3;
190
- $[19] = t4;
191
- $[20] = t5;
161
+ $[2] = anchorSide;
162
+ $[3] = ignoreClickRefs;
163
+ $[4] = initialFocusRef;
164
+ $[5] = left;
165
+ $[6] = onClickOutside;
166
+ $[7] = onEscape;
167
+ $[8] = portalContainerName;
168
+ $[9] = preventFocusOnOpen;
169
+ $[10] = props;
170
+ $[11] = responsiveVariant;
171
+ $[12] = returnFocusRef;
172
+ $[13] = right;
173
+ $[14] = t1;
174
+ $[15] = t2;
175
+ $[16] = t3;
176
+ $[17] = t4;
177
+ $[18] = t5;
192
178
  } else {
193
179
  _PrivateDisablePortal = $[1];
194
- _PrivateSkipPopoverLogic = $[2];
195
- anchorSide = $[3];
196
- ignoreClickRefs = $[4];
197
- initialFocusRef = $[5];
198
- left = $[6];
199
- onClickOutside = $[7];
200
- onEscape = $[8];
201
- popover = $[9];
202
- portalContainerName = $[10];
203
- preventFocusOnOpen = $[11];
204
- props = $[12];
205
- responsiveVariant = $[13];
206
- returnFocusRef = $[14];
207
- right = $[15];
208
- t1 = $[16];
209
- t2 = $[17];
210
- t3 = $[18];
211
- t4 = $[19];
212
- t5 = $[20];
180
+ anchorSide = $[2];
181
+ ignoreClickRefs = $[3];
182
+ initialFocusRef = $[4];
183
+ left = $[5];
184
+ onClickOutside = $[6];
185
+ onEscape = $[7];
186
+ portalContainerName = $[8];
187
+ preventFocusOnOpen = $[9];
188
+ props = $[10];
189
+ responsiveVariant = $[11];
190
+ returnFocusRef = $[12];
191
+ right = $[13];
192
+ t1 = $[14];
193
+ t2 = $[15];
194
+ t3 = $[16];
195
+ t4 = $[17];
196
+ t5 = $[18];
213
197
  }
214
198
  const height = t1 === undefined ? "auto" : t1;
215
199
  const preventOverflow = t2 === undefined ? true : t2;
@@ -220,7 +204,7 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
220
204
  useRefObjectAsForwardedRef(forwardedRef, overlayRef);
221
205
  const cssAnchorPositioning = useFeatureFlag("primer_react_css_anchor_positioning");
222
206
  let t6;
223
- if ($[21] !== ignoreClickRefs || $[22] !== initialFocusRef || $[23] !== onClickOutside || $[24] !== onEscape || $[25] !== preventFocusOnOpen || $[26] !== returnFocusRef) {
207
+ if ($[19] !== ignoreClickRefs || $[20] !== initialFocusRef || $[21] !== onClickOutside || $[22] !== onEscape || $[23] !== preventFocusOnOpen || $[24] !== returnFocusRef) {
224
208
  t6 = {
225
209
  overlayRef,
226
210
  returnFocusRef,
@@ -230,20 +214,20 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
230
214
  initialFocusRef,
231
215
  preventFocusOnOpen
232
216
  };
233
- $[21] = ignoreClickRefs;
234
- $[22] = initialFocusRef;
235
- $[23] = onClickOutside;
236
- $[24] = onEscape;
237
- $[25] = preventFocusOnOpen;
238
- $[26] = returnFocusRef;
239
- $[27] = t6;
217
+ $[19] = ignoreClickRefs;
218
+ $[20] = initialFocusRef;
219
+ $[21] = onClickOutside;
220
+ $[22] = onEscape;
221
+ $[23] = preventFocusOnOpen;
222
+ $[24] = returnFocusRef;
223
+ $[25] = t6;
240
224
  } else {
241
- t6 = $[27];
225
+ t6 = $[25];
242
226
  }
243
227
  useOverlay(t6);
244
228
  let t7;
245
229
  let t8;
246
- if ($[28] !== height) {
230
+ if ($[26] !== height) {
247
231
  t7 = () => {
248
232
  var _overlayRef$current;
249
233
  if (height === "initial" && (_overlayRef$current = overlayRef.current) !== null && _overlayRef$current !== void 0 && _overlayRef$current.clientHeight) {
@@ -251,17 +235,17 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
251
235
  }
252
236
  };
253
237
  t8 = [height];
254
- $[28] = height;
255
- $[29] = t7;
256
- $[30] = t8;
238
+ $[26] = height;
239
+ $[27] = t7;
240
+ $[28] = t8;
257
241
  } else {
258
- t7 = $[29];
259
- t8 = $[30];
242
+ t7 = $[27];
243
+ t8 = $[28];
260
244
  }
261
245
  useEffect(t7, t8);
262
246
  let t10;
263
247
  let t9;
264
- if ($[31] !== anchorSide || $[32] !== visibility) {
248
+ if ($[29] !== anchorSide || $[30] !== visibility) {
265
249
  t9 = () => {
266
250
  var _overlayRef$current2;
267
251
  const {
@@ -279,86 +263,61 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
279
263
  });
280
264
  };
281
265
  t10 = [anchorSide, 8, "cubic-bezier(0.33, 1, 0.68, 1)", visibility];
282
- $[31] = anchorSide;
283
- $[32] = visibility;
284
- $[33] = t10;
285
- $[34] = t9;
266
+ $[29] = anchorSide;
267
+ $[30] = visibility;
268
+ $[31] = t10;
269
+ $[32] = t9;
286
270
  } else {
287
- t10 = $[33];
288
- t9 = $[34];
271
+ t10 = $[31];
272
+ t9 = $[32];
289
273
  }
290
274
  useIsomorphicLayoutEffect(t9, t10);
291
- let t11;
292
- let t12;
293
- if ($[35] !== _PrivateSkipPopoverLogic || $[36] !== popover) {
294
- t11 = () => {
295
- if (!popover || !overlayRef.current || _PrivateSkipPopoverLogic) {
296
- return;
297
- }
298
- try {
299
- if (!overlayRef.current.matches(":popover-open")) {
300
- overlayRef.current.showPopover();
301
- }
302
- } catch {}
303
- };
304
- t12 = [popover, _PrivateSkipPopoverLogic];
305
- $[35] = _PrivateSkipPopoverLogic;
306
- $[36] = popover;
307
- $[37] = t11;
308
- $[38] = t12;
309
- } else {
310
- t11 = $[37];
311
- t12 = $[38];
312
- }
313
- useIsomorphicLayoutEffect(t11, t12);
314
275
  const leftPosition = left === undefined && right === undefined ? 0 : left;
315
- const t13 = !preventOverflow ? true : undefined;
316
- let t14;
317
- if ($[39] !== height || $[40] !== leftPosition || $[41] !== popover || $[42] !== props || $[43] !== responsiveVariant || $[44] !== right || $[45] !== role || $[46] !== t13 || $[47] !== visibility || $[48] !== width) {
318
- t14 = /*#__PURE__*/jsx(BaseOverlay, {
276
+ const t11 = !preventOverflow ? true : undefined;
277
+ let t12;
278
+ if ($[33] !== height || $[34] !== leftPosition || $[35] !== props || $[36] !== responsiveVariant || $[37] !== right || $[38] !== role || $[39] !== t11 || $[40] !== visibility || $[41] !== width) {
279
+ t12 = /*#__PURE__*/jsx(BaseOverlay, {
319
280
  role: role,
320
281
  width: width,
321
- "data-reflow-container": t13,
282
+ "data-reflow-container": t11,
322
283
  ref: overlayRef,
323
284
  left: leftPosition,
324
285
  right: right,
325
286
  height: height,
326
287
  visibility: visibility,
327
288
  "data-responsive": responsiveVariant,
328
- popover: popover,
329
289
  ...props
330
290
  });
331
- $[39] = height;
332
- $[40] = leftPosition;
333
- $[41] = popover;
334
- $[42] = props;
335
- $[43] = responsiveVariant;
336
- $[44] = right;
337
- $[45] = role;
338
- $[46] = t13;
339
- $[47] = visibility;
340
- $[48] = width;
341
- $[49] = t14;
291
+ $[33] = height;
292
+ $[34] = leftPosition;
293
+ $[35] = props;
294
+ $[36] = responsiveVariant;
295
+ $[37] = right;
296
+ $[38] = role;
297
+ $[39] = t11;
298
+ $[40] = visibility;
299
+ $[41] = width;
300
+ $[42] = t12;
342
301
  } else {
343
- t14 = $[49];
302
+ t12 = $[42];
344
303
  }
345
- const overlayContent = t14;
304
+ const overlayContent = t12;
346
305
  if (_PrivateDisablePortal && cssAnchorPositioning) {
347
306
  return overlayContent;
348
307
  }
349
- let t15;
350
- if ($[50] !== overlayContent || $[51] !== portalContainerName) {
351
- t15 = /*#__PURE__*/jsx(Portal, {
308
+ let t13;
309
+ if ($[43] !== overlayContent || $[44] !== portalContainerName) {
310
+ t13 = /*#__PURE__*/jsx(Portal, {
352
311
  containerName: portalContainerName,
353
312
  children: overlayContent
354
313
  });
355
- $[50] = overlayContent;
356
- $[51] = portalContainerName;
357
- $[52] = t15;
314
+ $[43] = overlayContent;
315
+ $[44] = portalContainerName;
316
+ $[45] = t13;
358
317
  } else {
359
- t15 = $[52];
318
+ t13 = $[45];
360
319
  }
361
- return t15;
320
+ return t13;
362
321
  });
363
322
 
364
- export { BaseOverlay, Overlay as default, heightMap, widthMap };
323
+ export { BaseOverlay, Overlay as default, heightMap };
@@ -1,4 +1,4 @@
1
- import './Overlay-aa33dbd7.css';
1
+ import './Overlay-30b84506.css';
2
2
 
3
3
  var classes = {"Overlay":"prc-Overlay-Overlay-jfs-T","overlay-appear":"prc-Overlay-overlay-appear-JpFey"};
4
4
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20260413213855",
4
+ "version": "0.0.0-20260413214635",
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,6 +78,7 @@
78
78
  "@github/relative-time-element": "^5.0.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",
81
82
  "@oddbird/popover-polyfill": "^0.5.2",
82
83
  "@primer/behaviors": "^1.10.2",
83
84
  "@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-AnchoredOverlay-fYg9Z{position-try-fallbacks:flip-block,flip-inline,flip-block flip-inline;position-visibility:anchors-visible;position:fixed!important;z-index:100}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[popover]{border:0;inset:auto;margin:0;max-width:none;padding:0}.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-bottom][data-align=left]{left:auto;right:calc(anchor(right) - var(--anchored-overlay-anchor-offset-left))}.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-top][data-align=left]{left:auto;right:anchor(right)}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-left]{margin-right:var(--base-size-4,.25rem);right:anchor(left);top:anchor(top);position-try-fallbacks:flip-inline,flip-block,flip-start,--outside-left-to-bottom}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-right]{left:anchor(right);margin-left:var(--base-size-4,.25rem);top:anchor(top);position-try-fallbacks:flip-inline,flip-block,flip-start,--outside-right-to-bottom}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-right][data-align=right]{left:calc(anchor(right) - var(--anchored-overlay-anchor-offset-right))}@position-try --outside-left-to-bottom{margin:0;right:anchor(right);top:calc(anchor(bottom) + var(--base-size-4,.25rem));width:auto}@position-try --outside-right-to-bottom{left:anchor(left);margin:0;top:calc(anchor(bottom) + var(--base-size-4,.25rem));width:auto}
2
- /*# sourceMappingURL=AnchoredOverlay-acde1a0a.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,2CACE,oEAGwB,CACxB,mCAAoC,CAEpC,wBAA0B,CAD1B,WAmDF,CAhDE,oDAIE,QAAS,CAHT,UAAW,CACX,QAAS,CAGT,cAAe,CAFf,SAGF,CAEA,qEAGE,iBAAkB,CADlB,oDAQF,CAJE,sFACE,SAAU,CACV,sEACF,CAGF,kEAEE,kBAAmB,CACnB,iBAAkB,CAFlB,uCAQF,CAJE,mFACE,SAAU,CACV,mBACF,CAGF,mEAGE,sCAAgC,CAFhC,kBAAmB,CACnB,eAAgB,CAEhB,iFACF,CAEA,oEACE,kBAAmB,CAEnB,qCAA+B,CAD/B,eAAgB,CAEhB,kFAKF,CAHE,sFACE,sEACF,CAIJ,uCAGE,QAAS,CAFT,mBAAoB,CACpB,oDAA8C,CAE9C,UACF,CAEA,wCACE,iBAAkB,CAElB,QAAS,CADT,oDAA8C,CAE9C,UACF","file":"AnchoredOverlay-acde1a0a.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.AnchoredOverlay {\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 !important;\n\n &[popover] {\n inset: auto;\n margin: 0;\n padding: 0;\n border: 0;\n max-width: none;\n }\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 /* Flips to the opposite side of the anchor if there's more space left of the anchor than right of it. */\n &[data-align='left'] {\n left: auto;\n right: calc(anchor(right) - var(--anchored-overlay-anchor-offset-left));\n }\n }\n\n &[data-side='outside-top'] {\n margin-bottom: var(--base-size-4);\n bottom: anchor(top);\n left: anchor(left);\n\n &[data-align='left'] {\n left: auto;\n right: anchor(right);\n }\n }\n\n &[data-side='outside-left'] {\n right: anchor(left);\n top: anchor(top);\n margin-right: var(--base-size-4);\n position-try-fallbacks: flip-inline, flip-block, flip-start, --outside-left-to-bottom;\n }\n\n &[data-side='outside-right'] {\n left: anchor(right);\n top: anchor(top);\n margin-left: var(--base-size-4);\n position-try-fallbacks: flip-inline, flip-block, flip-start, --outside-right-to-bottom;\n\n &[data-align='right'] {\n left: calc(anchor(right) - var(--anchored-overlay-anchor-offset-right));\n }\n }\n}\n\n@position-try --outside-left-to-bottom {\n right: anchor(right);\n top: calc(anchor(bottom) + var(--base-size-4));\n margin: 0;\n width: auto;\n}\n\n@position-try --outside-right-to-bottom {\n left: anchor(left);\n top: calc(anchor(bottom) + var(--base-size-4));\n margin: 0;\n width: auto;\n}\n"]}
@@ -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,UAiOF,CAxNE,wIAKE,yBAA2B,CAF3B,uBAkBF,CAZI,mDADF,6LAGI,MAAO,CADP,KAGJ,CADE,CAGF,iKAIE,qBAAuB,CAFvB,mBAGF,CAGF,iCACE,YACF,CAEA,8BAvCF,2BAyCI,6BA2LJ,CA1LE,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,2BAKF,CAHE,0BAHF,2DAII,4BAEJ,CADE,CAGF,0DACE,2BAKF,CAHE,0BAHF,0DAII,4BAEJ,CADE,CAGF,2DACE,2BAKF,CAHE,0BAHF,2DAII,4BAEJ,CADE,CAGF,0DACE,2BAKF,CAHE,0BAHF,0DAII,4BAEJ,CADE,CAGF,2DACE,2BAKF,CAHE,0BAHF,2DAII,4BAEJ,CADE,CAGF,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,CAEA,gEAIE,QAAS,CAHT,UAAW,CACX,QAAS,CAGT,cAAe,CAFf,SAGF,CAIE,mDAFF,4IAWI,mBAAoB,CAHpB,YAAa,CAHb,MAAO,CAKP,QAAS,CADT,eAAgB,CAFhB,cAAe,CAMf,0CAA2C,CAV3C,cAAe,CACf,KAAM,CAEN,WAcJ,CALI,0BAfJ,4IAiBM,aAGN,CAFI,CACF,CAGF,0BAEE,4DACE,aACF,CACF,CAGF,8CACE,2BACE,wEACF,CACF","file":"Overlay-aa33dbd7.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: min(192px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(192px, 100dvh);\n }\n }\n\n &:where([data-max-height-small]) {\n max-height: min(256px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(256px, 100dvh);\n }\n }\n\n &:where([data-max-height-medium]) {\n max-height: min(320px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(320px, 100dvh);\n }\n }\n\n &:where([data-max-height-large]) {\n max-height: min(432px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(432px, 100dvh);\n }\n }\n\n &:where([data-max-height-xlarge]) {\n max-height: min(600px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(600px, 100dvh);\n }\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 &[popover]:not([data-anchor-position]) {\n inset: auto;\n margin: 0;\n padding: 0;\n border: 0;\n max-width: none;\n }\n\n &:where([data-responsive='fullscreen']),\n &[data-responsive='fullscreen'][data-anchor-position] {\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"]}