@primer/react 0.0.0-20260414232830 → 0.0.0-20260415021146

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,32 +1,30 @@
1
1
  # @primer/react
2
2
 
3
- ## 0.0.0-20260414232830
3
+ ## 0.0.0-20260415021146
4
4
 
5
5
  ### Minor Changes
6
6
 
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
7
+ - [#7751](https://github.com/primer/react/pull/7751) [`e949fce`](https://github.com/primer/react/commit/e949fce884e915e0cb5738eb401ba04f15e67938) Thanks [@TylerJDev](https://github.com/TylerJDev)! - 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) [`d7b9313`](https://github.com/primer/react/commit/d7b9313b53e370e258c152084ac1f0402d64b77f) Thanks [@TylerJDev](https://github.com/TylerJDev)! - AnchoredOverlay: Remove polyfill for CSS Anchor Positioning, use primer/behaviors as fallback. Ensure overlays take available space.
9
+ - [#7751](https://github.com/primer/react/pull/7751) [`e949fce`](https://github.com/primer/react/commit/e949fce884e915e0cb5738eb401ba04f15e67938) Thanks [@TylerJDev](https://github.com/TylerJDev)! - AnchoredOverlay: Remove polyfill for CSS Anchor Positioning, use primer/behaviors as fallback. Ensure overlays take available space.
10
10
 
11
- - [#7752](https://github.com/primer/react/pull/7752) [`d7380a7`](https://github.com/primer/react/commit/d7380a7616a6c0cf861b5fe3dd9bd8d76470ca2e) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Breadcrumbs: Graduate `primer_react_breadcrumbs_overflow_menu` feature flag, making the overflow menu behavior always-on.
12
-
13
- - [#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
11
+ - [#7751](https://github.com/primer/react/pull/7751) [`e949fce`](https://github.com/primer/react/commit/e949fce884e915e0cb5738eb401ba04f15e67938) Thanks [@TylerJDev](https://github.com/TylerJDev)! - Overlay: Graduate `primer_react_overlay_max_height_clamp_to_viewport` feature flag
14
12
 
15
13
  The max-height of overlays is now clamped to the viewport height by default using `min(size, 100dvh)`. This prevents overlays from extending beyond the viewport on smaller screens.
16
14
 
15
+ - [#7751](https://github.com/primer/react/pull/7751) [`bdc06db`](https://github.com/primer/react/commit/bdc06db7f48ce6a4ef011375d31ab1ee2b9e4940) Thanks [@TylerJDev](https://github.com/TylerJDev)! - Overlay: Adds popover API support
16
+
17
17
  ### Patch Changes
18
18
 
19
- - [#7738](https://github.com/primer/react/pull/7738) [`f5f2869`](https://github.com/primer/react/commit/f5f28691d9e5c9f8495e8c592635d2b616f7cb49) Thanks [@francinelucca](https://github.com/francinelucca)! - ActionMenu, Table: Fix component mutation issue where `Object.assign` was modifying original `@primer/react` components. Now uses wrapper components to avoid side effects.
19
+ - [#7751](https://github.com/primer/react/pull/7751) [`e949fce`](https://github.com/primer/react/commit/e949fce884e915e0cb5738eb401ba04f15e67938) Thanks [@TylerJDev](https://github.com/TylerJDev)! - ActionMenu, Table: Fix component mutation issue where `Object.assign` was modifying original `@primer/react` components. Now uses wrapper components to avoid side effects.
20
20
 
21
- - [#7747](https://github.com/primer/react/pull/7747) [`b7dfb78`](https://github.com/primer/react/commit/b7dfb78079c50c6798aa4e09212aede701bf6c56) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Fix IssueLabelToken text contrast in light theme by updating the lightness-switch formula to use a division-based approach that properly produces a binary switch value for selecting black vs white text
21
+ - [#7751](https://github.com/primer/react/pull/7751) [`e949fce`](https://github.com/primer/react/commit/e949fce884e915e0cb5738eb401ba04f15e67938) Thanks [@TylerJDev](https://github.com/TylerJDev)! - Fix IssueLabelToken text contrast in light theme by updating the lightness-switch formula to use a division-based approach that properly produces a binary switch value for selecting black vs white text
22
22
 
23
23
  - Fake entry to force publishing
24
24
 
25
- - [#7757](https://github.com/primer/react/pull/7757) [`dd2d942`](https://github.com/primer/react/commit/dd2d942b5a994dc704f5bc9f8d8262acdccf881d) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - SelectPanel: Lock body scroll when modal variant is on.
26
-
27
- - [#7739](https://github.com/primer/react/pull/7739) [`efa7af8`](https://github.com/primer/react/commit/efa7af8d1e628cddc2f0356de83e7af5568ff358) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Spinner: Remove feature flag `primer_react_spinner_synchronize_animations`, treat it as always enabled.
25
+ - [#7751](https://github.com/primer/react/pull/7751) [`e949fce`](https://github.com/primer/react/commit/e949fce884e915e0cb5738eb401ba04f15e67938) Thanks [@TylerJDev](https://github.com/TylerJDev)! - Spinner: Remove feature flag `primer_react_spinner_synchronize_animations`, treat it as always enabled.
28
26
 
29
- - [#7746](https://github.com/primer/react/pull/7746) [`30206c4`](https://github.com/primer/react/commit/30206c4fab92de8888f3f103f9b05bff96fdc1b9) Thanks [@jonrohan](https://github.com/jonrohan)! - Update TokenTextContainer `line-height` to use primer primitives CSS variable `var(--base-text-lineHeight-normal)`
27
+ - [#7751](https://github.com/primer/react/pull/7751) [`e949fce`](https://github.com/primer/react/commit/e949fce884e915e0cb5738eb401ba04f15e67938) Thanks [@TylerJDev](https://github.com/TylerJDev)! - Update TokenTextContainer `line-height` to use primer primitives CSS variable `var(--base-text-lineHeight-normal)`
30
28
 
31
29
  ## 38.19.0
32
30
 
@@ -1,2 +1,2 @@
1
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}@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-0c26c5f8.css.map */
2
+ /*# sourceMappingURL=AnchoredOverlay-67e137f1.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,WA+CF,CA5CE,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,kFACF,CAGF,uCAGE,QAAS,CAFT,mBAAoB,CACpB,oDAA8C,CAE9C,UACF,CAEA,wCACE,iBAAkB,CAElB,QAAS,CADT,oDAA8C,CAE9C,UACF","file":"AnchoredOverlay-67e137f1.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}\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,4 +1,4 @@
1
- import './AnchoredOverlay-0c26c5f8.css';
1
+ import './AnchoredOverlay-67e137f1.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;AAUjG,OAAO,EAAC,KAAK,gBAAgB,EAAkB,MAAM,6BAA6B,CAAA;AAElF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACrD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,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AAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI,oBAAoB,CAAC,EAAE,CAAC,CAAA"}
@@ -10,6 +10,7 @@ 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';
13
14
  import Details from '../Details/Details.js';
14
15
 
15
16
  const BreadcrumbsList = t0 => {
@@ -212,6 +213,11 @@ function Breadcrumbs({
212
213
  overflow = 'wrap',
213
214
  variant = 'normal'
214
215
  }) {
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
+ }));
215
221
  const containerRef = useRef(null);
216
222
  const measureMenuButton = useCallback(element => {
217
223
  if (element) {
@@ -240,13 +246,13 @@ function Breadcrumbs({
240
246
  useEffect(() => {
241
247
  var _containerRef$current;
242
248
  const listElement = (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.querySelector('ol');
243
- if (listElement && listElement.children.length > 0 && listElement.children.length === childArray.length) {
249
+ if (overflowMenuEnabled && listElement && listElement.children.length > 0 && listElement.children.length === childArray.length) {
244
250
  const listElementArray = Array.from(listElement.children);
245
- const widths = listElementArray.map(child => child.offsetWidth);
251
+ const widths = listElementArray.map(child_0 => child_0.offsetWidth);
246
252
  setChildArrayWidths(widths);
247
253
  setRootItemWidth(listElementArray[0].offsetWidth);
248
254
  }
249
- }, [childArray]);
255
+ }, [childArray, overflowMenuEnabled]);
250
256
  const calculateOverflow = useCallback(availableWidth => {
251
257
  let eHideRoot = effectiveHideRoot;
252
258
  const MENU_BUTTON_WIDTH = menuButtonWidth;
@@ -291,7 +297,7 @@ function Breadcrumbs({
291
297
  };
292
298
  }, [childArray, childArrayWidths, effectiveHideRoot, hideRoot, overflow, rootItemWidth, menuButtonWidth]);
293
299
  const handleResize = useCallback(entries => {
294
- if (entries[0]) {
300
+ if (overflowMenuEnabled && entries[0]) {
295
301
  const containerWidth = entries[0].contentRect.width;
296
302
  const result = calculateOverflow(containerWidth);
297
303
  if (visibleItems.length !== result.visibleItems.length && menuItems.length !== result.menuItems.length || result.effectiveHideRoot !== effectiveHideRoot) {
@@ -300,10 +306,10 @@ function Breadcrumbs({
300
306
  setEffectiveHideRoot(result.effectiveHideRoot);
301
307
  }
302
308
  }
303
- }, [calculateOverflow, effectiveHideRoot, menuItems.length, visibleItems.length]);
309
+ }, [calculateOverflow, effectiveHideRoot, menuItems.length, overflowMenuEnabled, visibleItems.length]);
304
310
  useResizeObserver(handleResize, containerRef);
305
311
  useEffect(() => {
306
- if ((overflow === 'menu' || overflow === 'menu-with-root') && childArray.length > 5 && menuItems.length === 0) {
312
+ if (overflowMenuEnabled && (overflow === 'menu' || overflow === 'menu-with-root') && childArray.length > 5 && menuItems.length === 0) {
307
313
  var _containerRef$current2;
308
314
  const containerWidth_0 = ((_containerRef$current2 = containerRef.current) === null || _containerRef$current2 === void 0 ? void 0 : _containerRef$current2.offsetWidth) || 800;
309
315
  const result_0 = calculateOverflow(containerWidth_0);
@@ -311,44 +317,46 @@ function Breadcrumbs({
311
317
  setMenuItems(result_0.menuItems);
312
318
  setEffectiveHideRoot(result_0.effectiveHideRoot);
313
319
  }
314
- }, [overflow, childArray, calculateOverflow, menuItems.length]);
320
+ }, [overflow, childArray, calculateOverflow, menuItems.length, overflowMenuEnabled]);
315
321
  const finalChildren = React.useMemo(() => {
316
- if (overflow === 'wrap' || menuItems.length === 0) {
317
- return React.Children.map(children, child_0 => /*#__PURE__*/jsx("li", {
318
- className: classes.ItemWrapper,
319
- children: child_0
320
- }));
321
- }
322
- let effectiveMenuItems = [...menuItems];
323
- // In 'menu-with-root' mode, include the root item inside the menu even if it's visible in the breadcrumbs
324
- if (!effectiveHideRoot) {
325
- effectiveMenuItems = [...menuItems.slice(1)];
326
- }
327
- const menuElement = /*#__PURE__*/jsxs("li", {
328
- className: classes.BreadcrumbsItem,
329
- children: [/*#__PURE__*/jsx(BreadcrumbsMenuItem, {
330
- ref: measureMenuButton,
331
- items: effectiveMenuItems,
332
- "aria-label": `${effectiveMenuItems.length} more breadcrumb items`
333
- }), /*#__PURE__*/jsx(ItemSeparator, {})]
334
- }, "breadcrumbs-menu");
335
- const visibleElements = visibleItems.map((child_1, index) => /*#__PURE__*/jsxs("li", {
336
- className: classes.BreadcrumbsItem,
337
- children: [child_1, /*#__PURE__*/jsx(ItemSeparator, {})]
338
- }, `visible + ${index}`));
339
- const rootElement = /*#__PURE__*/jsxs("li", {
340
- className: classes.BreadcrumbsItem,
341
- children: [rootItem, /*#__PURE__*/jsx(ItemSeparator, {})]
342
- }, `rootElement`);
343
- if (effectiveHideRoot) {
344
- // Show: [overflow menu, leaf breadcrumb]
345
- return [menuElement, ...visibleElements];
346
- } else {
347
- // Show: [root breadcrumb, overflow menu, leaf breadcrumb]
348
- return [rootElement, menuElement, ...visibleElements];
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
+ }
349
357
  }
350
- }, [overflow, menuItems, effectiveHideRoot, measureMenuButton, visibleItems, rootItem, children]);
351
- return /*#__PURE__*/jsx("nav", {
358
+ }, [overflowMenuEnabled, overflow, menuItems, effectiveHideRoot, measureMenuButton, visibleItems, rootItem, children]);
359
+ return overflowMenuEnabled ? /*#__PURE__*/jsx("nav", {
352
360
  className: clsx(className, classes.BreadcrumbsBase),
353
361
  "aria-label": "Breadcrumbs",
354
362
  style: style,
@@ -358,9 +366,16 @@ function Breadcrumbs({
358
366
  children: /*#__PURE__*/jsx(BreadcrumbsList, {
359
367
  children: finalChildren
360
368
  })
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
+ })
361
377
  });
362
378
  }
363
- Breadcrumbs.displayName = "Breadcrumbs";
364
379
  const ItemSeparator = () => {
365
380
  const $ = c(1);
366
381
  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,kBAK9B,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,kBAM9B,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import { FeatureFlagScope } from './FeatureFlagScope.js';
2
2
 
3
3
  const DefaultFeatureFlags = FeatureFlagScope.create({
4
+ primer_react_breadcrumbs_overflow_menu: false,
4
5
  primer_react_css_anchor_positioning: false,
5
6
  primer_react_select_panel_fullscreen_on_narrow: false,
6
7
  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}@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=true]{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=true]{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-95cfd3c7.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}.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=true]{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=true]{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-f0e67bb6.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,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,iJAWI,mBAAoB,CAHpB,YAAa,CAHb,MAAO,CAKP,QAAS,CADT,eAAgB,CAFhB,cAAe,CAMf,0CAA2C,CAV3C,cAAe,CACf,KAAM,CAEN,WAcJ,CALI,0BAfJ,iJAiBM,aAGN,CAFI,CACF,CAGF,0BAEE,4DACE,aACF,CACF,CAGF,8CACE,2BACE,wEACF,CACF","file":"Overlay-f0e67bb6.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='true'] {\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"]}
@@ -43,6 +43,7 @@ type BaseOverlayProps = {
43
43
  children?: React.ReactNode;
44
44
  className?: string;
45
45
  responsiveVariant?: 'fullscreen';
46
+ popover?: 'auto' | 'manual';
46
47
  };
47
48
  type OwnOverlayProps = Merge<StyledOverlayProps, BaseOverlayProps>;
48
49
  /**
@@ -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,EAAE,MAAM,OAAO,SAAS,CAAA;IAC/B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC,OAAO,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;IAC5D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC,OAAO,QAAQ,EAAE,MAAM,CAAC,CAAA;IAC9C,UAAU,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;IACjC,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAA;IACnD,KAAK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U,CAAA;IACvB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,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,EA6GR,8BAA8B,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,qBAAqB,CAAC,OAAO,OAAO,CAAC,CAAA;AAEhE,eAAe,OAAO,CAAA"}
@@ -124,7 +124,7 @@ const BaseOverlay = /*#__PURE__*/React.forwardRef(({
124
124
 
125
125
  */
126
126
  const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
127
- const $ = c(46);
127
+ const $ = c(52);
128
128
  let _PrivateDisablePortal;
129
129
  let anchorSide;
130
130
  let ignoreClickRefs;
@@ -132,6 +132,7 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
132
132
  let left;
133
133
  let onClickOutside;
134
134
  let onEscape;
135
+ let popover;
135
136
  let portalContainerName;
136
137
  let preventFocusOnOpen;
137
138
  let props;
@@ -162,6 +163,7 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
162
163
  visibility: t4,
163
164
  width: t5,
164
165
  responsiveVariant,
166
+ popover,
165
167
  ...props
166
168
  } = t0);
167
169
  $[0] = t0;
@@ -172,17 +174,18 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
172
174
  $[5] = left;
173
175
  $[6] = onClickOutside;
174
176
  $[7] = onEscape;
175
- $[8] = portalContainerName;
176
- $[9] = preventFocusOnOpen;
177
- $[10] = props;
178
- $[11] = responsiveVariant;
179
- $[12] = returnFocusRef;
180
- $[13] = right;
181
- $[14] = t1;
182
- $[15] = t2;
183
- $[16] = t3;
184
- $[17] = t4;
185
- $[18] = t5;
177
+ $[8] = popover;
178
+ $[9] = portalContainerName;
179
+ $[10] = preventFocusOnOpen;
180
+ $[11] = props;
181
+ $[12] = responsiveVariant;
182
+ $[13] = returnFocusRef;
183
+ $[14] = right;
184
+ $[15] = t1;
185
+ $[16] = t2;
186
+ $[17] = t3;
187
+ $[18] = t4;
188
+ $[19] = t5;
186
189
  } else {
187
190
  _PrivateDisablePortal = $[1];
188
191
  anchorSide = $[2];
@@ -191,17 +194,18 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
191
194
  left = $[5];
192
195
  onClickOutside = $[6];
193
196
  onEscape = $[7];
194
- portalContainerName = $[8];
195
- preventFocusOnOpen = $[9];
196
- props = $[10];
197
- responsiveVariant = $[11];
198
- returnFocusRef = $[12];
199
- right = $[13];
200
- t1 = $[14];
201
- t2 = $[15];
202
- t3 = $[16];
203
- t4 = $[17];
204
- t5 = $[18];
197
+ popover = $[8];
198
+ portalContainerName = $[9];
199
+ preventFocusOnOpen = $[10];
200
+ props = $[11];
201
+ responsiveVariant = $[12];
202
+ returnFocusRef = $[13];
203
+ right = $[14];
204
+ t1 = $[15];
205
+ t2 = $[16];
206
+ t3 = $[17];
207
+ t4 = $[18];
208
+ t5 = $[19];
205
209
  }
206
210
  const height = t1 === undefined ? "auto" : t1;
207
211
  const preventOverflow = t2 === undefined ? true : t2;
@@ -212,7 +216,7 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
212
216
  useRefObjectAsForwardedRef(forwardedRef, overlayRef);
213
217
  const cssAnchorPositioning = useFeatureFlag("primer_react_css_anchor_positioning");
214
218
  let t6;
215
- if ($[19] !== ignoreClickRefs || $[20] !== initialFocusRef || $[21] !== onClickOutside || $[22] !== onEscape || $[23] !== preventFocusOnOpen || $[24] !== returnFocusRef) {
219
+ if ($[20] !== ignoreClickRefs || $[21] !== initialFocusRef || $[22] !== onClickOutside || $[23] !== onEscape || $[24] !== preventFocusOnOpen || $[25] !== returnFocusRef) {
216
220
  t6 = {
217
221
  overlayRef,
218
222
  returnFocusRef,
@@ -222,20 +226,20 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
222
226
  initialFocusRef,
223
227
  preventFocusOnOpen
224
228
  };
225
- $[19] = ignoreClickRefs;
226
- $[20] = initialFocusRef;
227
- $[21] = onClickOutside;
228
- $[22] = onEscape;
229
- $[23] = preventFocusOnOpen;
230
- $[24] = returnFocusRef;
231
- $[25] = t6;
229
+ $[20] = ignoreClickRefs;
230
+ $[21] = initialFocusRef;
231
+ $[22] = onClickOutside;
232
+ $[23] = onEscape;
233
+ $[24] = preventFocusOnOpen;
234
+ $[25] = returnFocusRef;
235
+ $[26] = t6;
232
236
  } else {
233
- t6 = $[25];
237
+ t6 = $[26];
234
238
  }
235
239
  useOverlay(t6);
236
240
  let t7;
237
241
  let t8;
238
- if ($[26] !== height) {
242
+ if ($[27] !== height) {
239
243
  t7 = () => {
240
244
  var _overlayRef$current;
241
245
  if (height === "initial" && (_overlayRef$current = overlayRef.current) !== null && _overlayRef$current !== void 0 && _overlayRef$current.clientHeight) {
@@ -243,17 +247,17 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
243
247
  }
244
248
  };
245
249
  t8 = [height];
246
- $[26] = height;
247
- $[27] = t7;
248
- $[28] = t8;
250
+ $[27] = height;
251
+ $[28] = t7;
252
+ $[29] = t8;
249
253
  } else {
250
- t7 = $[27];
251
- t8 = $[28];
254
+ t7 = $[28];
255
+ t8 = $[29];
252
256
  }
253
257
  useEffect(t7, t8);
254
258
  let t10;
255
259
  let t9;
256
- if ($[29] !== anchorSide || $[30] !== visibility) {
260
+ if ($[30] !== anchorSide || $[31] !== visibility) {
257
261
  t9 = () => {
258
262
  var _overlayRef$current2;
259
263
  const {
@@ -271,61 +275,87 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
271
275
  });
272
276
  };
273
277
  t10 = [anchorSide, 8, "cubic-bezier(0.33, 1, 0.68, 1)", visibility];
274
- $[29] = anchorSide;
275
- $[30] = visibility;
276
- $[31] = t10;
277
- $[32] = t9;
278
+ $[30] = anchorSide;
279
+ $[31] = visibility;
280
+ $[32] = t10;
281
+ $[33] = t9;
278
282
  } else {
279
- t10 = $[31];
280
- t9 = $[32];
283
+ t10 = $[32];
284
+ t9 = $[33];
281
285
  }
282
286
  useIsomorphicLayoutEffect(t9, t10);
283
- const leftPosition = left === undefined && right === undefined ? 0 : left;
284
- const t11 = !preventOverflow ? true : undefined;
287
+ let t11;
285
288
  let t12;
286
- if ($[33] !== height || $[34] !== leftPosition || $[35] !== props || $[36] !== responsiveVariant || $[37] !== right || $[38] !== role || $[39] !== t11 || $[40] !== visibility || $[41] !== width) {
287
- t12 = /*#__PURE__*/jsx(BaseOverlay, {
289
+ if ($[34] !== cssAnchorPositioning || $[35] !== popover) {
290
+ t11 = () => {
291
+ if (!popover || !overlayRef.current || !cssAnchorPositioning) {
292
+ return;
293
+ }
294
+ try {
295
+ if (!overlayRef.current.matches(":popover-open")) {
296
+ overlayRef.current.showPopover();
297
+ }
298
+ } catch {}
299
+ };
300
+ t12 = [popover, cssAnchorPositioning];
301
+ $[34] = cssAnchorPositioning;
302
+ $[35] = popover;
303
+ $[36] = t11;
304
+ $[37] = t12;
305
+ } else {
306
+ t11 = $[36];
307
+ t12 = $[37];
308
+ }
309
+ useIsomorphicLayoutEffect(t11, t12);
310
+ const leftPosition = left === undefined && right === undefined ? 0 : left;
311
+ const t13 = !preventOverflow ? true : undefined;
312
+ const t14 = cssAnchorPositioning ? popover : undefined;
313
+ let t15;
314
+ if ($[38] !== height || $[39] !== leftPosition || $[40] !== props || $[41] !== responsiveVariant || $[42] !== right || $[43] !== role || $[44] !== t13 || $[45] !== t14 || $[46] !== visibility || $[47] !== width) {
315
+ t15 = /*#__PURE__*/jsx(BaseOverlay, {
288
316
  role: role,
289
317
  width: width,
290
- "data-reflow-container": t11,
318
+ "data-reflow-container": t13,
291
319
  ref: overlayRef,
292
320
  left: leftPosition,
293
321
  right: right,
294
322
  height: height,
295
323
  visibility: visibility,
296
324
  "data-responsive": responsiveVariant,
325
+ popover: t14,
297
326
  ...props
298
327
  });
299
- $[33] = height;
300
- $[34] = leftPosition;
301
- $[35] = props;
302
- $[36] = responsiveVariant;
303
- $[37] = right;
304
- $[38] = role;
305
- $[39] = t11;
306
- $[40] = visibility;
307
- $[41] = width;
308
- $[42] = t12;
328
+ $[38] = height;
329
+ $[39] = leftPosition;
330
+ $[40] = props;
331
+ $[41] = responsiveVariant;
332
+ $[42] = right;
333
+ $[43] = role;
334
+ $[44] = t13;
335
+ $[45] = t14;
336
+ $[46] = visibility;
337
+ $[47] = width;
338
+ $[48] = t15;
309
339
  } else {
310
- t12 = $[42];
340
+ t15 = $[48];
311
341
  }
312
- const overlayContent = t12;
342
+ const overlayContent = t15;
313
343
  if (_PrivateDisablePortal && cssAnchorPositioning) {
314
344
  return overlayContent;
315
345
  }
316
- let t13;
317
- if ($[43] !== overlayContent || $[44] !== portalContainerName) {
318
- t13 = /*#__PURE__*/jsx(Portal, {
346
+ let t16;
347
+ if ($[49] !== overlayContent || $[50] !== portalContainerName) {
348
+ t16 = /*#__PURE__*/jsx(Portal, {
319
349
  containerName: portalContainerName,
320
350
  children: overlayContent
321
351
  });
322
- $[43] = overlayContent;
323
- $[44] = portalContainerName;
324
- $[45] = t13;
352
+ $[49] = overlayContent;
353
+ $[50] = portalContainerName;
354
+ $[51] = t16;
325
355
  } else {
326
- t13 = $[45];
356
+ t16 = $[51];
327
357
  }
328
- return t13;
358
+ return t16;
329
359
  });
330
360
 
331
361
  export { BaseOverlay, Overlay as default, heightMap, widthMap };
@@ -1,4 +1,4 @@
1
- import './Overlay-95cfd3c7.css';
1
+ import './Overlay-f0e67bb6.css';
2
2
 
3
3
  var classes = {"Overlay":"prc-Overlay-Overlay-jfs-T","overlay-appear":"prc-Overlay-overlay-appear-JpFey"};
4
4
 
@@ -1,2 +1,2 @@
1
- .prc-SelectPanel-Overlay-tEbxh{--max-height:0}.prc-SelectPanel-Wrapper-OD-e6{display:flex;flex-direction:column;height:inherit;max-height:inherit}.prc-SelectPanel-Header-p2DSz{align-items:flex-start;display:flex;justify-content:space-between;padding-left:var(--base-size-8,.5rem);padding-right:var(--base-size-8,.5rem);padding-top:var(--base-size-8,.5rem)}.prc-SelectPanel-Header-p2DSz:where([data-variant=fullscreen]){flex-shrink:0;min-height:40px}.prc-SelectPanel-Title-4cax5{font-size:var(--text-body-size-medium,.875rem);margin-left:var(--base-size-8,.5rem)}.prc-SelectPanel-Wrapper-OD-e6[data-variant=modal] .prc-SelectPanel-Title-4cax5{margin-top:var(--base-size-8,.5rem)}@media screen and (max-width:calc(48rem - 0.02px)){.prc-SelectPanel-Wrapper-OD-e6[data-variant=anchored] .prc-SelectPanel-Title-4cax5{margin-top:var(--base-size-8,.5rem)}}.prc-SelectPanel-Subtitle-5L2Fr{color:var(--fgColor-muted,var(--color-fg-muted));font-size:var(--text-body-size-small,.75rem)}.prc-SelectPanel-Notice-zIRk9,.prc-SelectPanel-Subtitle-5L2Fr{margin-left:var(--base-size-8,.5rem)}.prc-SelectPanel-Notice-zIRk9{margin-right:var(--base-size-8,.5rem);margin-top:var(--base-size-4,.25rem)}.prc-SelectPanel-Notice-zIRk9 a{color:inherit;-webkit-text-decoration:underline;text-decoration:underline}.prc-SelectPanel-Notice-zIRk9:where([data-variant=info]){background-color:var(--bgColor-accent-muted,var(--color-accent-subtle));border-color:var(--borderColor-accent-muted,var(--color-accent-muted));color:var(--fgColor-accent,var(--color-accent-fg))}.prc-SelectPanel-Notice-zIRk9:where([data-variant=warning]){background-color:var(--bgColor-attention-muted,var(--color-attention-subtle));border-color:var(--borderColor-attention-muted,var(--color-attention-muted));color:var(--fgColor-attention,var(--color-attention-fg))}.prc-SelectPanel-Notice-zIRk9:where([data-variant=critical]){background-color:var(--bgColor-danger-muted,var(--color-danger-subtle));border-color:var(--borderColor-danger-muted,var(--color-danger-muted));color:var(--fgColor-danger,var(--color-danger-fg))}.prc-SelectPanel-Footer-Rxa8K{border-top:var(--borderWidth-thin,.0625rem) solid;border-top-color:var(--borderColor-default,var(--color-border-default));display:flex;padding:var(--base-size-8,.5rem)}.prc-SelectPanel-FilteredActionList--VY7U{height:inherit;max-height:inherit}.prc-SelectPanel-Message-4RsG4{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:var(--base-size-4,.25rem);height:100%;justify-content:center;padding:var(--base-size-24,1.5rem);text-align:center}.prc-SelectPanel-Message-4RsG4 a{color:inherit;-webkit-text-decoration:underline;text-decoration:underline}.prc-SelectPanel-MessageTitle-mTq0E{font-size:var(--text-body-size-medium,.875rem);font-weight:var(--base-text-weight-semibold,600)}.prc-SelectPanel-MessageBody-zVnxH{align-items:center;color:var(--fgColor-muted,var(--color-fg-muted));font-size:var(--text-body-size-small,.75rem);gap:var(--stack-gap-condensed,.5rem)}.prc-SelectPanel-MessageIcon-gpYuP{color:var(--fgColor-attention,var(--color-attention-fg));margin-bottom:var(--base-size-8,.5rem)}.prc-SelectPanel-MessageIcon-gpYuP:where([data-variant=error]){color:var(--fgColor-danger,var(--color-danger-fg))}.prc-SelectPanel-MessageAction-zx88f{margin-top:var(--base-size-8,.5rem)}.prc-SelectPanel-ResponsiveCloseButton-uA7Py{display:inline-grid}.prc-SelectPanel-ResponsiveFooter-qnA4v{align-items:center;display:none;justify-content:center;padding:var(--base-size-8,.5rem)}.prc-SelectPanel-ResponsiveFooter-qnA4v:where([data-display-footer=always]){display:flex}@media screen and (max-width:calc(48rem - 0.02px)){.prc-SelectPanel-ResponsiveFooter-qnA4v:where([data-display-footer=only-small]){display:flex}}.prc-SelectPanel-ResponsiveFooter-qnA4v[data-stretch-secondary-action=never]{justify-content:space-between}@media screen and (max-width:calc(48rem - 0.02px)){.prc-SelectPanel-ResponsiveFooter-qnA4v:where([data-stretch-secondary-action=only-big]){justify-content:space-between}}.prc-SelectPanel-ResponsiveFooter-qnA4v:where([data-stretch-save-button=only-small]){justify-content:space-between}@media screen and (max-width:calc(48rem - 0.02px)){.prc-SelectPanel-ResponsiveFooter-qnA4v:where([data-stretch-save-button=only-small]){justify-content:center}}.prc-SelectPanel-SecondaryAction-AFlHt{align-items:stretch;display:flex;flex-grow:1;justify-content:center}.prc-SelectPanel-SecondaryAction-AFlHt[data-stretch-secondary-action=never]{align-items:flex-start;flex-grow:0}@media screen and (max-width:calc(48rem - 0.02px)){.prc-SelectPanel-SecondaryAction-AFlHt:where([data-stretch-secondary-action=only-big]){align-items:flex-start;flex-grow:0}}.prc-SelectPanel-CancelSaveButtons-DvvZo{display:flex;gap:var(--stack-gap-condensed,.5rem);justify-content:flex-end}.prc-SelectPanel-ResponsiveCancelSaveButtons-e8Csd{display:none}@media screen and (max-width:calc(48rem - 0.02px)){.prc-SelectPanel-ResponsiveCancelSaveButtons-e8Csd{display:flex;gap:var(--stack-gap-condensed,.5rem);justify-content:flex-end}}.prc-SelectPanel-ResponsiveSaveButton-6If1k{display:none}@media screen and (max-width:calc(48rem - 0.02px)){.prc-SelectPanel-ResponsiveSaveButton-6If1k{display:flex}}@media screen and (max-width:calc(48rem - 0.02px)){.prc-SelectPanel-ResponsiveSaveButton-6If1k:where([data-stretch-save-button=only-small]){flex-grow:1}}.prc-SelectPanel-Backdrop-ukvA6{background-color:var(--overlay-backdrop-bgColor,var(--color-overlay-backdrop));inset:0;position:fixed}.prc-SelectPanel-TextInput--Qqkq{margin:var(--base-size-8,.5rem)}
2
- /*# sourceMappingURL=SelectPanel-00796bf3.css.map */
1
+ .prc-SelectPanel-Overlay-tEbxh{--max-height:0}.prc-SelectPanel-Wrapper-OD-e6{display:flex;flex-direction:column;height:inherit;max-height:inherit}.prc-SelectPanel-Header-p2DSz{align-items:flex-start;display:flex;justify-content:space-between;padding-left:var(--base-size-8,.5rem);padding-right:var(--base-size-8,.5rem);padding-top:var(--base-size-8,.5rem)}.prc-SelectPanel-Header-p2DSz:where([data-variant=fullscreen]){flex-shrink:0;min-height:40px}.prc-SelectPanel-Title-4cax5{font-size:var(--text-body-size-medium,.875rem);margin-left:var(--base-size-8,.5rem)}.prc-SelectPanel-Wrapper-OD-e6[data-variant=modal] .prc-SelectPanel-Title-4cax5{margin-top:var(--base-size-8,.5rem)}@media screen and (max-width:calc(48rem - 0.02px)){.prc-SelectPanel-Wrapper-OD-e6[data-variant=anchored] .prc-SelectPanel-Title-4cax5{margin-top:var(--base-size-8,.5rem)}}.prc-SelectPanel-Subtitle-5L2Fr{color:var(--fgColor-muted,var(--color-fg-muted));font-size:var(--text-body-size-small,.75rem)}.prc-SelectPanel-Notice-zIRk9,.prc-SelectPanel-Subtitle-5L2Fr{margin-left:var(--base-size-8,.5rem)}.prc-SelectPanel-Notice-zIRk9{margin-right:var(--base-size-8,.5rem);margin-top:var(--base-size-4,.25rem)}.prc-SelectPanel-Notice-zIRk9 a{color:inherit;-webkit-text-decoration:underline;text-decoration:underline}.prc-SelectPanel-Notice-zIRk9:where([data-variant=info]){background-color:var(--bgColor-accent-muted,var(--color-accent-subtle));border-color:var(--borderColor-accent-muted,var(--color-accent-muted));color:var(--fgColor-accent,var(--color-accent-fg))}.prc-SelectPanel-Notice-zIRk9:where([data-variant=warning]){background-color:var(--bgColor-attention-muted,var(--color-attention-subtle));border-color:var(--borderColor-attention-muted,var(--color-attention-muted));color:var(--fgColor-attention,var(--color-attention-fg))}.prc-SelectPanel-Notice-zIRk9:where([data-variant=critical]){background-color:var(--bgColor-danger-muted,var(--color-danger-subtle));border-color:var(--borderColor-danger-muted,var(--color-danger-muted));color:var(--fgColor-danger,var(--color-danger-fg))}.prc-SelectPanel-Footer-Rxa8K{border-top:var(--borderWidth-thin,.0625rem) solid;border-top-color:var(--borderColor-default,var(--color-border-default));display:flex;padding:var(--base-size-8,.5rem)}.prc-SelectPanel-FilteredActionList--VY7U{height:inherit;max-height:inherit}.prc-SelectPanel-Message-4RsG4{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:var(--base-size-4,.25rem);height:100%;justify-content:center;padding:var(--base-size-24,1.5rem);text-align:center}.prc-SelectPanel-Message-4RsG4 a{color:inherit;-webkit-text-decoration:underline;text-decoration:underline}.prc-SelectPanel-MessageTitle-mTq0E{font-size:var(--text-body-size-medium,.875rem);font-weight:var(--base-text-weight-semibold,600)}.prc-SelectPanel-MessageBody-zVnxH{align-items:center;color:var(--fgColor-muted,var(--color-fg-muted));font-size:var(--text-body-size-small,.75rem);gap:var(--stack-gap-condensed,.5rem)}.prc-SelectPanel-MessageIcon-gpYuP{color:var(--fgColor-attention,var(--color-attention-fg));margin-bottom:var(--base-size-8,.5rem)}.prc-SelectPanel-MessageIcon-gpYuP:where([data-variant=error]){color:var(--fgColor-danger,var(--color-danger-fg))}.prc-SelectPanel-MessageAction-zx88f{margin-top:var(--base-size-8,.5rem)}.prc-SelectPanel-ResponsiveCloseButton-uA7Py{display:inline-grid}.prc-SelectPanel-ResponsiveFooter-qnA4v{align-items:center;display:none;justify-content:center;padding:var(--base-size-8,.5rem)}.prc-SelectPanel-ResponsiveFooter-qnA4v:where([data-display-footer=always]){display:flex}@media screen and (max-width:calc(48rem - 0.02px)){.prc-SelectPanel-ResponsiveFooter-qnA4v:where([data-display-footer=only-small]){display:flex}}.prc-SelectPanel-ResponsiveFooter-qnA4v[data-stretch-secondary-action=never]{justify-content:space-between}@media screen and (max-width:calc(48rem - 0.02px)){.prc-SelectPanel-ResponsiveFooter-qnA4v:where([data-stretch-secondary-action=only-big]){justify-content:space-between}}.prc-SelectPanel-ResponsiveFooter-qnA4v:where([data-stretch-save-button=only-small]){justify-content:space-between}@media screen and (max-width:calc(48rem - 0.02px)){.prc-SelectPanel-ResponsiveFooter-qnA4v:where([data-stretch-save-button=only-small]){justify-content:center}}.prc-SelectPanel-SecondaryAction-AFlHt{align-items:stretch;display:flex;flex-grow:1;justify-content:center}.prc-SelectPanel-SecondaryAction-AFlHt[data-stretch-secondary-action=never]{align-items:flex-start;flex-grow:0}@media screen and (max-width:calc(48rem - 0.02px)){.prc-SelectPanel-SecondaryAction-AFlHt:where([data-stretch-secondary-action=only-big]){align-items:flex-start;flex-grow:0}}.prc-SelectPanel-CancelSaveButtons-DvvZo{display:flex;gap:var(--stack-gap-condensed,.5rem);justify-content:flex-end}.prc-SelectPanel-ResponsiveCancelSaveButtons-e8Csd{display:none}@media screen and (max-width:calc(48rem - 0.02px)){.prc-SelectPanel-ResponsiveCancelSaveButtons-e8Csd{display:flex;gap:var(--stack-gap-condensed,.5rem);justify-content:flex-end}}.prc-SelectPanel-ResponsiveSaveButton-6If1k{display:none}@media screen and (max-width:calc(48rem - 0.02px)){.prc-SelectPanel-ResponsiveSaveButton-6If1k{display:flex}}@media screen and (max-width:calc(48rem - 0.02px)){.prc-SelectPanel-ResponsiveSaveButton-6If1k:where([data-stretch-save-button=only-small]){flex-grow:1}}.prc-SelectPanel-Backdrop-ukvA6{background-color:var(--overlay-backdrop-bgColor,var(--color-overlay-backdrop));inset:0;position:absolute}.prc-SelectPanel-TextInput--Qqkq{margin:var(--base-size-8,.5rem)}
2
+ /*# sourceMappingURL=SelectPanel-3ac7e8d0.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/SelectPanel/SelectPanel.module.css.js"],"names":[],"mappings":"AAAA,+BAEE,cACF,CAEA,+BACE,YAAa,CAGb,qBAAsB,CAFtB,cAAe,CACf,kBAEF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XE,4EAEE,sBAAuB,CADvB,WAEF,CAGE,mDADF,uFAGI,sBAAuB,CADvB,WAGJ,CADE,CAIJ,yCACE,YAAa,CACb,oCAA+B,CAC/B,wBACF,CAEA,mDACE,YAOF,CALE,mDAHF,mDAII,YAAa,CACb,oCAA+B,CAC/B,wBAEJ,CADE,CAGF,4CACE,YAWF,CATE,mDAHF,4CAII,YAQJ,CAPE,CAGE,mDADF,yFAEI,WAEJ,CADE,CAIJ,gCAGE,8EAAiD,CADjD,OAAQ,CADR,iBAGF,CAEA,iCACE,+BACF","file":"SelectPanel-3ac7e8d0.css","sourcesContent":[".Overlay {\n /* CSS variables values are passed in via styles */\n --max-height: 0;\n}\n\n.Wrapper {\n display: flex;\n height: inherit;\n max-height: inherit;\n flex-direction: column;\n}\n\n.Header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n padding-top: var(--base-size-8);\n padding-right: var(--base-size-8);\n padding-left: var(--base-size-8);\n\n &:where([data-variant='fullscreen']) {\n min-height: 40px;\n flex-shrink: 0;\n }\n}\n\n.Title {\n margin-left: var(--base-size-8);\n font-size: var(--text-body-size-medium);\n}\n\n.Wrapper[data-variant='modal'] .Title {\n margin-top: var(--base-size-8);\n /* styling specific to the modal variant */\n}\n\n/*\n * Align SelectPanel header text with AnchoredOverlay close button\n * \n * Ensures the title properly aligns with the close button position\n * in anchor variant on narrow viewports.\n */\n.Wrapper[data-variant='anchored'] .Title {\n @media screen and (--viewportRange-narrow) {\n margin-top: var(--base-size-8);\n }\n}\n\n.Subtitle {\n margin-left: var(--base-size-8);\n font-size: var(--text-body-size-small);\n color: var(--fgColor-muted);\n}\n\n.Notice {\n margin-top: var(--base-size-4);\n margin-right: var(--base-size-8);\n margin-left: var(--base-size-8);\n}\n\n.Notice a {\n color: inherit;\n text-decoration: underline;\n}\n\n.Notice:where([data-variant='info']) {\n color: var(--fgColor-accent);\n background-color: var(--bgColor-accent-muted);\n border-color: var(--borderColor-accent-muted);\n}\n\n.Notice:where([data-variant='warning']) {\n color: var(--fgColor-attention);\n background-color: var(--bgColor-attention-muted);\n border-color: var(--borderColor-attention-muted);\n}\n\n.Notice:where([data-variant='critical']) {\n color: var(--fgColor-danger);\n background-color: var(--bgColor-danger-muted);\n border-color: var(--borderColor-danger-muted);\n}\n\n.Footer {\n display: flex;\n padding: var(--base-size-8);\n border-top: var(--borderWidth-thin) solid;\n border-top-color: var(--borderColor-default);\n}\n\n.FilteredActionList {\n /* inheriting height and maxHeight ensures that the FilteredActionList is never taller\n than the Overlay (which would break scrolling the items) */\n height: inherit;\n max-height: inherit;\n}\n\n.Message {\n display: flex;\n height: 100%;\n padding: var(--base-size-24);\n text-align: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n flex-grow: 1;\n gap: var(--base-size-4);\n\n a {\n color: inherit;\n text-decoration: underline;\n }\n}\n\n.MessageTitle {\n font-size: var(--text-body-size-medium);\n font-weight: var(--base-text-weight-semibold);\n}\n\n.MessageBody {\n font-size: var(--text-body-size-small);\n color: var(--fgColor-muted);\n align-items: center;\n gap: var(--stack-gap-condensed);\n}\n\n.MessageIcon {\n margin-bottom: var(--base-size-8);\n color: var(--fgColor-attention);\n\n &:where([data-variant='error']) {\n color: var(--fgColor-danger);\n }\n}\n\n.MessageAction {\n margin-top: var(--base-size-8);\n}\n\n.ResponsiveCloseButton {\n display: inline-grid;\n}\n\n.ResponsiveFooter {\n display: none;\n align-items: center;\n padding: var(--base-size-8);\n justify-content: center;\n\n &:where([data-display-footer='always']) {\n display: flex;\n }\n\n &:where([data-display-footer='only-small']) {\n @media screen and (--viewportRange-narrow) {\n display: flex;\n }\n }\n\n &[data-stretch-secondary-action='never'] {\n justify-content: space-between;\n }\n\n &:where([data-stretch-secondary-action='only-big']) {\n @media screen and (--viewportRange-narrow) {\n justify-content: space-between;\n }\n }\n\n &:where([data-stretch-save-button='only-small']) {\n justify-content: space-between;\n\n @media screen and (--viewportRange-narrow) {\n justify-content: center;\n }\n }\n}\n\n.SecondaryAction {\n flex-grow: 1;\n align-items: stretch;\n display: flex;\n justify-content: center;\n\n &[data-stretch-secondary-action='never'] {\n flex-grow: 0;\n align-items: flex-start;\n }\n\n &:where([data-stretch-secondary-action='only-big']) {\n @media screen and (--viewportRange-narrow) {\n flex-grow: 0;\n align-items: flex-start;\n }\n }\n}\n\n.CancelSaveButtons {\n display: flex;\n gap: var(--stack-gap-condensed);\n justify-content: flex-end;\n}\n\n.ResponsiveCancelSaveButtons {\n display: none;\n\n @media screen and (--viewportRange-narrow) {\n display: flex;\n gap: var(--stack-gap-condensed);\n justify-content: flex-end;\n }\n}\n\n.ResponsiveSaveButton {\n display: none;\n\n @media screen and (--viewportRange-narrow) {\n display: flex;\n }\n\n &:where([data-stretch-save-button='only-small']) {\n @media screen and (--viewportRange-narrow) {\n flex-grow: 1;\n }\n }\n}\n\n.Backdrop {\n position: absolute;\n inset: 0;\n background-color: var(--overlay-backdrop-bgColor);\n}\n\n.TextInput {\n margin: var(--base-size-8);\n}\n"]}
@@ -249,9 +249,9 @@ function Panel({
249
249
  }
250
250
  }, [items, itemsInViewSet, onSelectedChange, selected]);
251
251
 
252
- // disable body scroll when the panel is open in modal mode or on narrow screens
252
+ // disable body scroll when the panel is open on narrow screens
253
253
  useEffect(() => {
254
- if (open && (variant === 'modal' || isNarrowScreenSize && usingFullScreenOnNarrow)) {
254
+ if (open && isNarrowScreenSize && usingFullScreenOnNarrow) {
255
255
  const bodyOverflowStyle = document.body.style.overflow || '';
256
256
  // If the body is already set to overflow: hidden, it likely means
257
257
  // that there is already a modal open. In that case, we should bail
@@ -264,7 +264,7 @@ function Panel({
264
264
  document.body.style.overflow = bodyOverflowStyle;
265
265
  };
266
266
  }
267
- }, [isNarrowScreenSize, open, usingFullScreenOnNarrow, variant]);
267
+ }, [isNarrowScreenSize, open, usingFullScreenOnNarrow]);
268
268
  useEffect(() => {
269
269
  if (open) {
270
270
  if (items.length === 0 && !(isLoading || loading)) {
@@ -1,4 +1,4 @@
1
- import './SelectPanel-00796bf3.css';
1
+ import './SelectPanel-3ac7e8d0.css';
2
2
 
3
3
  var classes = {"Overlay":"prc-SelectPanel-Overlay-tEbxh","Wrapper":"prc-SelectPanel-Wrapper-OD-e6","Header":"prc-SelectPanel-Header-p2DSz","Title":"prc-SelectPanel-Title-4cax5","Subtitle":"prc-SelectPanel-Subtitle-5L2Fr","Notice":"prc-SelectPanel-Notice-zIRk9","Footer":"prc-SelectPanel-Footer-Rxa8K","FilteredActionList":"prc-SelectPanel-FilteredActionList--VY7U","Message":"prc-SelectPanel-Message-4RsG4","MessageTitle":"prc-SelectPanel-MessageTitle-mTq0E","MessageBody":"prc-SelectPanel-MessageBody-zVnxH","MessageIcon":"prc-SelectPanel-MessageIcon-gpYuP","MessageAction":"prc-SelectPanel-MessageAction-zx88f","ResponsiveCloseButton":"prc-SelectPanel-ResponsiveCloseButton-uA7Py","ResponsiveFooter":"prc-SelectPanel-ResponsiveFooter-qnA4v","SecondaryAction":"prc-SelectPanel-SecondaryAction-AFlHt","CancelSaveButtons":"prc-SelectPanel-CancelSaveButtons-DvvZo","ResponsiveCancelSaveButtons":"prc-SelectPanel-ResponsiveCancelSaveButtons-e8Csd","ResponsiveSaveButton":"prc-SelectPanel-ResponsiveSaveButton-6If1k","Backdrop":"prc-SelectPanel-Backdrop-ukvA6","TextInput":"prc-SelectPanel-TextInput--Qqkq"};
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-20260414232830",
4
+ "version": "0.0.0-20260415021146",
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",
@@ -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,WA8CF,CA3CE,oDAIE,QAAS,CAHT,UAAW,CACX,QAAS,CAGT,cAAe,CAFf,SAGF,CAEA,qEAGE,iBAAkB,CADlB,oDAOF,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,kFACF,CAGF,uCAGE,QAAS,CAFT,mBAAoB,CACpB,oDAA8C,CAE9C,UACF,CAEA,wCACE,iBAAkB,CAElB,QAAS,CADT,oDAA8C,CAE9C,UACF","file":"AnchoredOverlay-0c26c5f8.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 &[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}\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,UAyNF,CAhNE,wIAKE,yBAA2B,CAF3B,uBAkBF,CAZI,mDADF,6LAGI,MAAO,CADP,KAGJ,CADE,CAGF,iKAIE,qBAAuB,CAFvB,mBAGF,CAGF,iCACE,YACF,CAEA,8BAvCF,2BAyCI,6BAmLJ,CAlLE,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,CAIE,mDAFF,iJAWI,mBAAoB,CAHpB,YAAa,CAHb,MAAO,CAKP,QAAS,CADT,eAAgB,CAFhB,cAAe,CAMf,0CAA2C,CAV3C,cAAe,CACf,KAAM,CAEN,WAcJ,CALI,0BAfJ,iJAiBM,aAGN,CAFI,CACF,CAGF,0BAEE,4DACE,aACF,CACF,CAGF,8CACE,2BACE,wEACF,CACF","file":"Overlay-95cfd3c7.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 &[data-responsive='fullscreen'][data-anchor-position='true'] {\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 +0,0 @@
1
- {"version":3,"sources":["../src/SelectPanel/SelectPanel.module.css.js"],"names":[],"mappings":"AAAA,+BAEE,cACF,CAEA,+BACE,YAAa,CAGb,qBAAsB,CAFtB,cAAe,CACf,kBAEF,CAEA,8BAGE,sBAAuB,CAFvB,YAAa,CACb,6BAA8B,CAI9B,qCAAgC,CADhC,sCAAiC,CADjC,oCAQF,CAJE,+DAEE,aAAc,CADd,eAEF,CAGF,6BAEE,8CAAuC,CADvC,oCAEF,CAEA,gFACE,mCAEF,CASE,mDADF,mFAEI,mCAEJ,CADE,CAGF,gCAGE,gDAA2B,CAD3B,4CAEF,CAEA,8DALE,oCASF,CAJ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,WAEJ,CADE,CAIJ,gCAGE,8EAAiD,CADjD,OAAQ,CADR,cAGF,CAEA,iCACE,+BACF","file":"SelectPanel-00796bf3.css","sourcesContent":[".Overlay {\n /* CSS variables values are passed in via styles */\n --max-height: 0;\n}\n\n.Wrapper {\n display: flex;\n height: inherit;\n max-height: inherit;\n flex-direction: column;\n}\n\n.Header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n padding-top: var(--base-size-8);\n padding-right: var(--base-size-8);\n padding-left: var(--base-size-8);\n\n &:where([data-variant='fullscreen']) {\n min-height: 40px;\n flex-shrink: 0;\n }\n}\n\n.Title {\n margin-left: var(--base-size-8);\n font-size: var(--text-body-size-medium);\n}\n\n.Wrapper[data-variant='modal'] .Title {\n margin-top: var(--base-size-8);\n /* styling specific to the modal variant */\n}\n\n/*\n * Align SelectPanel header text with AnchoredOverlay close button\n * \n * Ensures the title properly aligns with the close button position\n * in anchor variant on narrow viewports.\n */\n.Wrapper[data-variant='anchored'] .Title {\n @media screen and (--viewportRange-narrow) {\n margin-top: var(--base-size-8);\n }\n}\n\n.Subtitle {\n margin-left: var(--base-size-8);\n font-size: var(--text-body-size-small);\n color: var(--fgColor-muted);\n}\n\n.Notice {\n margin-top: var(--base-size-4);\n margin-right: var(--base-size-8);\n margin-left: var(--base-size-8);\n}\n\n.Notice a {\n color: inherit;\n text-decoration: underline;\n}\n\n.Notice:where([data-variant='info']) {\n color: var(--fgColor-accent);\n background-color: var(--bgColor-accent-muted);\n border-color: var(--borderColor-accent-muted);\n}\n\n.Notice:where([data-variant='warning']) {\n color: var(--fgColor-attention);\n background-color: var(--bgColor-attention-muted);\n border-color: var(--borderColor-attention-muted);\n}\n\n.Notice:where([data-variant='critical']) {\n color: var(--fgColor-danger);\n background-color: var(--bgColor-danger-muted);\n border-color: var(--borderColor-danger-muted);\n}\n\n.Footer {\n display: flex;\n padding: var(--base-size-8);\n border-top: var(--borderWidth-thin) solid;\n border-top-color: var(--borderColor-default);\n}\n\n.FilteredActionList {\n /* inheriting height and maxHeight ensures that the FilteredActionList is never taller\n than the Overlay (which would break scrolling the items) */\n height: inherit;\n max-height: inherit;\n}\n\n.Message {\n display: flex;\n height: 100%;\n padding: var(--base-size-24);\n text-align: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n flex-grow: 1;\n gap: var(--base-size-4);\n\n a {\n color: inherit;\n text-decoration: underline;\n }\n}\n\n.MessageTitle {\n font-size: var(--text-body-size-medium);\n font-weight: var(--base-text-weight-semibold);\n}\n\n.MessageBody {\n font-size: var(--text-body-size-small);\n color: var(--fgColor-muted);\n align-items: center;\n gap: var(--stack-gap-condensed);\n}\n\n.MessageIcon {\n margin-bottom: var(--base-size-8);\n color: var(--fgColor-attention);\n\n &:where([data-variant='error']) {\n color: var(--fgColor-danger);\n }\n}\n\n.MessageAction {\n margin-top: var(--base-size-8);\n}\n\n.ResponsiveCloseButton {\n display: inline-grid;\n}\n\n.ResponsiveFooter {\n display: none;\n align-items: center;\n padding: var(--base-size-8);\n justify-content: center;\n\n &:where([data-display-footer='always']) {\n display: flex;\n }\n\n &:where([data-display-footer='only-small']) {\n @media screen and (--viewportRange-narrow) {\n display: flex;\n }\n }\n\n &[data-stretch-secondary-action='never'] {\n justify-content: space-between;\n }\n\n &:where([data-stretch-secondary-action='only-big']) {\n @media screen and (--viewportRange-narrow) {\n justify-content: space-between;\n }\n }\n\n &:where([data-stretch-save-button='only-small']) {\n justify-content: space-between;\n\n @media screen and (--viewportRange-narrow) {\n justify-content: center;\n }\n }\n}\n\n.SecondaryAction {\n flex-grow: 1;\n align-items: stretch;\n display: flex;\n justify-content: center;\n\n &[data-stretch-secondary-action='never'] {\n flex-grow: 0;\n align-items: flex-start;\n }\n\n &:where([data-stretch-secondary-action='only-big']) {\n @media screen and (--viewportRange-narrow) {\n flex-grow: 0;\n align-items: flex-start;\n }\n }\n}\n\n.CancelSaveButtons {\n display: flex;\n gap: var(--stack-gap-condensed);\n justify-content: flex-end;\n}\n\n.ResponsiveCancelSaveButtons {\n display: none;\n\n @media screen and (--viewportRange-narrow) {\n display: flex;\n gap: var(--stack-gap-condensed);\n justify-content: flex-end;\n }\n}\n\n.ResponsiveSaveButton {\n display: none;\n\n @media screen and (--viewportRange-narrow) {\n display: flex;\n }\n\n &:where([data-stretch-save-button='only-small']) {\n @media screen and (--viewportRange-narrow) {\n flex-grow: 1;\n }\n }\n}\n\n.Backdrop {\n position: fixed;\n inset: 0;\n background-color: var(--overlay-backdrop-bgColor);\n}\n\n.TextInput {\n margin: var(--base-size-8);\n}\n"]}