@primer/react 38.28.0-rc.d9fedaf37 → 38.28.0

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
@@ -4,16 +4,22 @@
4
4
 
5
5
  ### Minor Changes
6
6
 
7
+ - [#7888](https://github.com/primer/react/pull/7888) [`45be31b`](https://github.com/primer/react/commit/45be31b561b2c1280b182531069e8a84364a4185) Thanks [@TylerJDev](https://github.com/TylerJDev)! - AnchoredOverlay: Extend `cssAnchorPositioningSettings` with a `fallbackStrategy` (`'default' | 'none' | 'opposite-side'`) to control CSS anchor positioning fallback behavior when native CSS anchor positioning is active.
8
+
7
9
  - [#7923](https://github.com/primer/react/pull/7923) [`6a7e130`](https://github.com/primer/react/commit/6a7e13051139ba06e48391edc0b05ef555b814b9) Thanks [@dylanatsmith](https://github.com/dylanatsmith)! - Card: Add `layout="compact"` prop for a compact card layout with tighter spacing, no icon background, and smaller title
8
10
 
9
11
  - [#7922](https://github.com/primer/react/pull/7922) [`55b7b04`](https://github.com/primer/react/commit/55b7b04647af9d7812e9ff77605524048358039c) Thanks [@dylanatsmith](https://github.com/dylanatsmith)! - InlineMessage: Make `variant` prop optional, defaulting to the standard foreground color with an info icon
10
12
 
11
13
  - [#7889](https://github.com/primer/react/pull/7889) [`3af5edc`](https://github.com/primer/react/commit/3af5edc56dd21aaa16c7c1676c4627c4ecd6f0f2) Thanks [@llastflowers](https://github.com/llastflowers)! - Add data-component attributes and associated tests for PageHeader, PageLayout, Pagehead, Popover, Portal, and ProgressBar
12
14
 
15
+ - [#7964](https://github.com/primer/react/pull/7964) [`0f0f79f`](https://github.com/primer/react/commit/0f0f79f5da92087e636cde0d0709479c9c68d2d1) Thanks [@TylerJDev](https://github.com/TylerJDev)! - AnchoredOverlay: Add `cssAnchorPositioningSettings` prop to allow opting out of native CSS anchor positioning (via `disable`), and use it in `SelectPanel` so the `modal` variant stays manually centered instead of being repositioned by CSS anchor positioning.
16
+
13
17
  ### Patch Changes
14
18
 
15
19
  - [#7918](https://github.com/primer/react/pull/7918) [`95986ce`](https://github.com/primer/react/commit/95986ce22eaca6f4cb2122a00d51ec93d72f2dfe) Thanks [@jonrohan](https://github.com/jonrohan)! - Autocomplete: Keep the typed text instead of restoring the full inline suggestion when the input loses focus, matching the behavior of pressing Escape
16
20
 
21
+ - [#7971](https://github.com/primer/react/pull/7971) [`2087e87`](https://github.com/primer/react/commit/2087e87c9fe869a59fc1dcb0546ee25a14767006) Thanks [@francinelucca](https://github.com/francinelucca)! - ThemeProvider: Skip rendering the SSR handoff script when the `primer_react_theme_provider_remove_ssr_handoff` feature flag is enabled
22
+
17
23
  - [#7910](https://github.com/primer/react/pull/7910) [`0c38cfa`](https://github.com/primer/react/commit/0c38cfaeabab347e48d4e34c200739e32efa73a2) Thanks [@janmaarten-a11y](https://github.com/janmaarten-a11y)! - Timeline: Add `primer_react_timeline_list_semantics` feature flag to opt into list semantics
18
24
 
19
25
  When the `primer_react_timeline_list_semantics` feature flag is enabled, `Timeline` renders as `<ol role="list">` and `Timeline.Item` / `Timeline.Break` render as `<li>` so screen reader users get list navigation (total item count, position in sequence). The default behavior is unchanged — `Timeline` and its subcomponents still render as `<div>` until the flag is opted into.
@@ -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,--inline-end-center,--inline-start-center,--fit-block-bottom,--fit-block-top;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=inside-bottom],.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-bottom]{left:anchor(left);top:calc(anchor(bottom) + var(--base-size-4,.25rem))}[data-align=left]:is(.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-bottom],.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=inside-bottom]){left:auto;right:calc(anchor(right) - var(--anchored-overlay-anchor-offset-left))}@media screen and (max-width:calc(48rem - 0.02px)){[data-align=left][data-responsive=fullscreen]:is(.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-bottom],.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=inside-bottom]){right:auto}}[data-align=right]:is(.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-bottom],.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=inside-bottom]){left:calc(anchor(left) - var(--anchored-overlay-anchor-offset-right))}@media screen and (max-width:calc(48rem - 0.02px)){[data-align=right][data-responsive=fullscreen]:is(.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-bottom],.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=inside-bottom]){left:auto}}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=inside-top],.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-top]{bottom:anchor(top);left:anchor(left);margin-bottom:var(--base-size-4,.25rem)}[data-align=left]:is(.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-top],.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=inside-top]){left:auto;right:anchor(right)}[data-align=right]:is(.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-top],.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=inside-top]){left:calc(anchor(left) - var(--anchored-overlay-anchor-offset-right))}@media screen and (max-width:calc(48rem - 0.02px)){[data-align=right][data-responsive=fullscreen]:is(.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-top],.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=inside-top]){left:auto}}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=inside-left],.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-left]{margin-right:var(--base-size-4,.25rem);right:anchor(left);top:var(--anchored-overlay-top-override,anchor(top));position-try-fallbacks:flip-inline,flip-block,flip-start,--outside-left-to-bottom}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=inside-right],.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-right]{left:anchor(right);margin-left:var(--base-size-4,.25rem);top:var(--anchored-overlay-top-override,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}@position-try --inline-end-center{align-self:anchor-center;bottom:auto;left:anchor(right);margin-left:var(--base-size-4,.25rem);top:auto}@position-try --inline-start-center{align-self:anchor-center;bottom:auto;left:auto;margin-right:var(--base-size-4,.25rem);right:anchor(left);top:auto}@position-try --fit-block-bottom{bottom:var(--base-size-8,.5rem);height:auto;max-height:none;top:calc(anchor(bottom) + var(--base-size-4,.25rem))}@position-try --fit-block-top{bottom:calc(100vh - anchor(top) + var(--base-size-4,.25rem));height:auto;max-height:none;top:var(--base-size-8,.5rem)}
2
+ /*# sourceMappingURL=AnchoredOverlay-83281f45.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,iJAOiB,CACjB,mCAAoC,CAEpC,wBAA0B,CAD1B,WAoFF,CAjFE,oDAIE,QAAS,CAHT,UAAW,CACX,QAAS,CAGT,cAAe,CAFf,SAGF,CAEA,yIAIE,iBAAkB,CADlB,oDAuBF,CApBE,+JACE,SAAU,CACV,sEAOF,CAJI,mDADF,2LAEI,UAEJ,CADE,CAIJ,gKACE,qEAOF,CAJI,mDADF,4LAEI,SAEJ,CADE,CAKN,mIAGE,kBAAmB,CACnB,iBAAkB,CAFlB,uCAkBF,CAdE,yJACE,SAAU,CACV,mBACF,CAEA,0JACE,qEAOF,CAJI,mDADF,sLAEI,SAEJ,CADE,CAKN,qIAYE,sCAAgC,CAVhC,kBAAmB,CASnB,oDAAsD,CAEtD,iFACF,CAEA,uIAEE,kBAAmB,CAEnB,qCAA+B,CAD/B,oDAAsD,CAEtD,kFACF,CAGF,uCAGE,QAAS,CAFT,mBAAoB,CACpB,oDAA8C,CAE9C,UACF,CAEA,wCACE,iBAAkB,CAElB,QAAS,CADT,oDAA8C,CAE9C,UACF,CAEA,kCAKE,wBAAyB,CAFzB,WAAY,CAFZ,kBAAmB,CAGnB,qCAA+B,CAF/B,QAIF,CAEA,oCAME,wBAAyB,CAFzB,WAAY,CAFZ,SAAU,CAGV,sCAAgC,CAJhC,kBAAmB,CAEnB,QAIF,CAEA,iCAEE,+BAA0B,CAC1B,WAAY,CACZ,eAAgB,CAHhB,oDAIF,CAEA,8BAEE,4DAAsD,CACtD,WAAY,CACZ,eAAgB,CAHhB,4BAIF","file":"AnchoredOverlay-83281f45.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 --inline-end-center,\n --inline-start-center,\n --fit-block-bottom,\n --fit-block-top;\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 &[data-side='inside-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 /* stylelint-disable max-nesting-depth */\n &[data-responsive='fullscreen'] {\n @media screen and (--viewportRange-narrow) {\n right: auto;\n }\n }\n }\n\n &[data-align='right'] {\n left: calc(anchor(left) - var(--anchored-overlay-anchor-offset-right));\n\n &[data-responsive='fullscreen'] {\n @media screen and (--viewportRange-narrow) {\n left: auto;\n }\n }\n }\n }\n\n &[data-side='outside-top'],\n &[data-side='inside-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 &[data-align='right'] {\n left: calc(anchor(left) - var(--anchored-overlay-anchor-offset-right));\n\n &[data-responsive='fullscreen'] {\n @media screen and (--viewportRange-narrow) {\n left: auto;\n }\n }\n }\n }\n\n &[data-side='outside-left'],\n &[data-side='inside-left'] {\n right: anchor(left);\n /* Falls back to `anchor(top)` when JS hasn't overridden it. JS sets the\n override when the overlay's bottom would overflow the viewport so we\n can lift it up to keep the bottom edge on screen, mirroring the JS\n anchored-positioning code path.\n\n This override only applies when CSS cannot find space using the default position -\n or any of its defined fallbacks.\n */\n top: var(--anchored-overlay-top-override, 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 &[data-side='inside-right'] {\n left: anchor(right);\n top: var(--anchored-overlay-top-override, 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\n@position-try --inline-end-center {\n left: anchor(right);\n top: auto;\n bottom: auto;\n margin-left: var(--base-size-4);\n align-self: anchor-center;\n}\n\n@position-try --inline-start-center {\n right: anchor(left);\n left: auto;\n top: auto;\n bottom: auto;\n margin-right: var(--base-size-4);\n align-self: anchor-center;\n}\n\n@position-try --fit-block-bottom {\n top: calc(anchor(bottom) + var(--base-size-4));\n bottom: var(--base-size-8);\n height: auto;\n max-height: none;\n}\n\n@position-try --fit-block-top {\n top: var(--base-size-8);\n bottom: calc(100vh - anchor(top) + var(--base-size-4));\n height: auto;\n max-height: none;\n}\n"]}
@@ -99,6 +99,21 @@ interface AnchoredOverlayBaseProps extends Pick<OverlayProps, 'height' | 'width'
99
99
  * and the browser supports native CSS anchor positioning. Has no effect otherwise. Defaults to `"portal"`.
100
100
  */
101
101
  renderAs?: 'portal' | 'popover';
102
+ /**
103
+ * Settings for CSS anchor positioning behavior when CSS anchor positioning is active.
104
+ *
105
+ * `fallbackStrategy` controls CSS fallback behavior:
106
+ * - `"default"`: use built-in CSS fallback rules.
107
+ * - `"none"`: keep the requested side with no CSS fallbacks.
108
+ * - `"opposite-side"`: only allow fallback to the opposite side.
109
+ *
110
+ * `disable`: When `true`, opts this overlay out of native CSS anchor positioning (and the Popover API)
111
+ * even if `primer_react_css_anchor_positioning` is enabled and the browser supports it.
112
+ */
113
+ cssAnchorPositioningSettings?: {
114
+ fallbackStrategy?: 'default' | 'none' | 'opposite-side';
115
+ disable?: boolean;
116
+ };
102
117
  }
103
118
  export type AnchoredOverlayProps = AnchoredOverlayBaseProps & (AnchoredOverlayPropsWithAnchor | AnchoredOverlayPropsWithoutAnchor) & Partial<Pick<PositionSettings, 'align' | 'side' | 'anchorOffset' | 'alignmentOffset' | 'displayInViewport'>>;
104
119
  /**
@@ -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,EAAmC,KAAK,GAAG,EAAC,MAAM,OAAO,CAAA;AAChE,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,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,YAAY,GAAG,iBAAiB,CAAC,EAChG,KAAK,EAAE,CAAC,KACL,GAAG,CAAC,OAAO,CAAA;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAE/C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,UAAU,iCAAiC;IACzC;;;OAGG;IACH,YAAY,EAAE,IAAI,CAAA;IAElB;;;OAGG;IACH,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAC9C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,MAAM,iCAAi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G;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;IAC3C;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC/B;;;;;;;;;;OAUG;IACH,4BAA4B,CAAC,EAAE;QAAC,gBAAgB,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,eAAe,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAC,CAAA;CAC5G;AAED,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,GACzD,CAAC,8BAA8B,GAAG,iCAAiC,CAAC,GACpE,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,MAAM,GAAG,cAAc,GAAG,iBAAiB,GAAG,mBAAmB,CAAC,CAAC,CAAA;AAS9G;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,CAqTnF,CAAA"}
@@ -48,13 +48,14 @@ const AnchoredOverlay = ({
48
48
  onPositionChange,
49
49
  displayCloseButton = true,
50
50
  closeButtonProps = defaultCloseButtonProps,
51
- renderAs = 'portal'
51
+ renderAs = 'portal',
52
+ cssAnchorPositioningSettings
52
53
  }) => {
53
54
  const cssAnchorPositioningFlag = useFeatureFlag('primer_react_css_anchor_positioning');
54
55
  // Lazy initial state so feature detection runs once per mount on the client.
55
56
  // Guarded for SSR where `document` is undefined.
56
57
  const [supportsNativeCSSAnchorPositioning] = useState(() => typeof document !== 'undefined' && 'anchorName' in document.documentElement.style && 'positionTryFallbacks' in document.documentElement.style && 'positionVisibility' in document.documentElement.style);
57
- const cssAnchorPositioning = cssAnchorPositioningFlag && supportsNativeCSSAnchorPositioning && !(overlayProps !== null && overlayProps !== void 0 && overlayProps.portalContainerName);
58
+ const cssAnchorPositioning = cssAnchorPositioningFlag && supportsNativeCSSAnchorPositioning && !(overlayProps !== null && overlayProps !== void 0 && overlayProps.portalContainerName) && !(cssAnchorPositioningSettings !== null && cssAnchorPositioningSettings !== void 0 && cssAnchorPositioningSettings.disable);
58
59
  // Only use Popover API when both CSS anchor positioning is enabled AND renderAs is true
59
60
  const shouldRenderAsPopover = cssAnchorPositioning && renderAs === 'popover';
60
61
  const anchorRef = useProvidedRefOrCreate(externalAnchorRef);
@@ -157,7 +158,14 @@ const AnchoredOverlay = ({
157
158
  const resolvedAnchorName = anchorElement.style.getPropertyValue('anchor-name') || anchorName;
158
159
  let pendingPositionFrame = null;
159
160
  if (open && currentOverlay) {
161
+ var _cssAnchorPositioning;
160
162
  currentOverlay.style.setProperty('position-anchor', resolvedAnchorName);
163
+ const positionTryFallbacks = getCSSAnchorPositionTryFallbacks(side, (_cssAnchorPositioning = cssAnchorPositioningSettings === null || cssAnchorPositioningSettings === void 0 ? void 0 : cssAnchorPositioningSettings.fallbackStrategy) !== null && _cssAnchorPositioning !== void 0 ? _cssAnchorPositioning : 'default');
164
+ if (positionTryFallbacks) {
165
+ currentOverlay.style.setProperty('position-try-fallbacks', positionTryFallbacks);
166
+ } else {
167
+ currentOverlay.style.removeProperty('position-try-fallbacks');
168
+ }
161
169
 
162
170
  // Defer the getBoundingClientRect read into a `requestAnimationFrame` so the style write above
163
171
  // does not force a synchronous layout.
@@ -199,11 +207,12 @@ const AnchoredOverlay = ({
199
207
  // The overlay may no longer be in the DOM at this point, so we need to check for its presence before trying to update it.
200
208
  if (currentOverlay) {
201
209
  currentOverlay.style.removeProperty('position-anchor');
210
+ currentOverlay.style.removeProperty('position-try-fallbacks');
202
211
  }
203
212
  };
204
213
  // overlayRef is a stable ref object; including it in deps is unnecessary.
205
214
  // eslint-disable-next-line react-hooks/exhaustive-deps
206
- }, [cssAnchorPositioning, shouldRenderAsPopover, open, anchorElement, overlayElement, id, width]);
215
+ }, [cssAnchorPositioning, shouldRenderAsPopover, open, anchorElement, overlayElement, id, width, side, cssAnchorPositioningSettings === null || cssAnchorPositioningSettings === void 0 ? void 0 : cssAnchorPositioningSettings.fallbackStrategy]);
207
216
  const showXIcon = onClose && variant.narrow === 'fullscreen' && displayCloseButton;
208
217
  const XButtonAriaLabelledBy = closeButtonProps['aria-labelledby'];
209
218
  const XButtonAriaLabel = closeButtonProps['aria-label'];
@@ -323,6 +332,32 @@ function getDefaultPosition(anchorElement, overlayElement, fallbackWidth) {
323
332
  suggestedSide
324
333
  };
325
334
  }
335
+ function getCSSAnchorPositionTryFallbacks(side, strategy) {
336
+ // Disable all CSS fallbacks (including those defined in the stylesheet).
337
+ if (strategy === 'none') return 'none';
338
+
339
+ // Restrict fallbacks to flipping to the opposite side along the relevant axis.
340
+ if (strategy === 'opposite-side') {
341
+ switch (side) {
342
+ case 'outside-top':
343
+ case 'outside-bottom':
344
+ case 'inside-top':
345
+ case 'inside-bottom':
346
+ return 'flip-block';
347
+ case 'outside-left':
348
+ case 'outside-right':
349
+ case 'inside-left':
350
+ case 'inside-right':
351
+ return 'flip-inline';
352
+ default:
353
+ return undefined;
354
+ }
355
+ }
356
+
357
+ // 'default': don't write an inline `position-try-fallbacks`, so the
358
+ // stylesheet-defined fallback list on `.AnchoredOverlay` takes effect.
359
+ return undefined;
360
+ }
326
361
  function assignRef(ref, value) {
327
362
  if (typeof ref === 'function') {
328
363
  ref(value);
@@ -1,4 +1,4 @@
1
- import './AnchoredOverlay-d483d670.css';
1
+ import './AnchoredOverlay-83281f45.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":"DefaultFeatureFlags.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/DefaultFeatureFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AAEnD,eAAO,MAAM,mBAAmB,kBAO9B,CAAA"}
1
+ {"version":3,"file":"DefaultFeatureFlags.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/DefaultFeatureFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AAEnD,eAAO,MAAM,mBAAmB,kBAQ9B,CAAA"}
@@ -6,7 +6,8 @@ const DefaultFeatureFlags = FeatureFlagScope.create({
6
6
  primer_react_select_panel_order_selected_at_top: false,
7
7
  primer_react_styled_react_use_primer_theme_providers: false,
8
8
  primer_react_action_list_group_heading_trailing_action: false,
9
- primer_react_timeline_list_semantics: false
9
+ primer_react_timeline_list_semantics: false,
10
+ primer_react_theme_provider_remove_ssr_handoff: false
10
11
  });
11
12
 
12
13
  export { DefaultFeatureFlags };
@@ -1 +1 @@
1
- {"version":3,"file":"SelectPanel.d.ts","sourceRoot":"","sources":["../../src/SelectPanel/SelectPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAC,MAAM,wBAAwB,CAAA;AAC1F,OAAO,KAAK,EAAE,EAAoD,KAAK,GAAG,EAAC,MAAM,OAAO,CAAA;AACxF,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAA;AAE5D,OAAO,KAAK,EAAC,iCAAiC,EAAC,MAAM,oCAAoC,CAAA;AACzF,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,uBAAuB,CAAA;AAGlE,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,YAAY,CAAA;AAE5C,OAAO,KAAK,EAAY,SAAS,EAAC,MAAM,IAAI,CAAA;AAiB5C,OAAO,KAAK,EAAC,WAAW,EAAE,eAAe,EAAC,MAAM,iBAAiB,CAAA;AAkCjE,UAAU,0BAA0B;IAClC,QAAQ,EAAE,SAAS,GAAG,SAAS,CAAA;IAC/B,gBAAgB,EAAE,CA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,SAAS,EACT,MAAM,EACN,KAAK,EACL,EAAE,EACF,OAAO,EACP,MAAM,EACN,QAAQ,EACR,OAAoB,EACpB,eAAe,EACf,wBAA+B,EAC/B,yBAAyB,EACzB,KAAK,EACL,aAAqB,EACrB,sBAAsB,EACtB,WAAW,EACX,iBAAiB,EACjB,GAAG,SAAS,EACb,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CA4zBhC;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAM1C,CAAA;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,GAAG,WAAW,CAM1D,CAAA;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;CAKtB,CAAA"}
@@ -682,7 +682,12 @@ function Panel({
682
682
  className: classes.Overlay,
683
683
  displayCloseButton: showXCloseIcon,
684
684
  closeButtonProps: closeButtonProps,
685
- displayInViewport: displayInViewport,
685
+ displayInViewport: displayInViewport
686
+ // Modal variant is positioned manually so native CSS anchor positioning must not be used
687
+ ,
688
+ cssAnchorPositioningSettings: {
689
+ disable: variant === 'modal'
690
+ },
686
691
  children: /*#__PURE__*/jsxs("div", {
687
692
  className: classes.Wrapper,
688
693
  "data-variant": variant,
@@ -9,6 +9,9 @@ export type ThemeProviderProps = {
9
9
  colorMode?: ColorModeWithAuto;
10
10
  dayScheme?: string;
11
11
  nightScheme?: string;
12
+ /**
13
+ * No-op when the `primer_react_theme_provider_remove_ssr_handoff` feature flag is enabled.
14
+ */
12
15
  preventSSRMismatch?: boolean;
13
16
  /**
14
17
  * When true, only provides theme context to descendants without rendering
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,eAAO,MAAM,gBAAgB,QAAQ,CAAA;AAKrC,MAAM,MAAM,KAAK,GAAG;IAAC,C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AAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,CAAA;AACxC,KAAK,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAA;AACnD,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,MAAM,CAAA;AAElD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,CAAC,EAAE,iBAAiB,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AA8CD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CA2F/E,CAAA;AAED,wBAAgB,QAAQ;YAxId,KAAK;kBACC,MAAM;gBACR,iBAAiB;wBACT,SAAS;0BACP,MAAM;gBAChB,MAAM;kBACJ,MAAM;kBACN,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;kBACvD,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;oBAC1C,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;EAiI7D;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,UAG1F;AAqED,eAAe,aAAa,CAAA"}
@@ -4,6 +4,7 @@ import theme from './theme.js';
4
4
  import deepmerge from 'deepmerge';
5
5
  import { useSyncedState } from './hooks/useSyncedState.js';
6
6
  import { jsx, jsxs } from 'react/jsx-runtime';
7
+ import { useFeatureFlag } from './FeatureFlags/useFeatureFlag.js';
7
8
  import { useId } from './hooks/useId.js';
8
9
 
9
10
  const defaultColorMode = 'day';
@@ -43,7 +44,7 @@ const getServerHandoff = id => {
43
44
  const emptySubscribe = () => () => {};
44
45
  const ThemeProvider = t0 => {
45
46
  var _ref, _props$colorMode, _ref2, _props$dayScheme, _ref3, _props$nightScheme;
46
- const $ = c(46);
47
+ const $ = c(47);
47
48
  let children;
48
49
  let props;
49
50
  if ($[0] !== t0) {
@@ -65,6 +66,7 @@ const ThemeProvider = t0 => {
65
66
  nightScheme: fallbackNightScheme
66
67
  } = useTheme();
67
68
  const theme$1 = fallbackTheme !== null && fallbackTheme !== void 0 ? fallbackTheme : theme;
69
+ const removeSSRHandoff = useFeatureFlag("primer_react_theme_provider_remove_ssr_handoff");
68
70
  const uniqueDataId = useId();
69
71
  const [colorMode, setColorMode] = useSyncedState((_ref = (_props$colorMode = props.colorMode) !== null && _props$colorMode !== void 0 ? _props$colorMode : fallbackColorMode) !== null && _ref !== void 0 ? _ref : defaultColorMode);
70
72
  const [dayScheme, setDayScheme] = useSyncedState((_ref2 = (_props$dayScheme = props.dayScheme) !== null && _props$dayScheme !== void 0 ? _props$dayScheme : fallbackDayScheme) !== null && _ref2 !== void 0 ? _ref2 : defaultDayScheme);
@@ -100,7 +102,8 @@ const ThemeProvider = t0 => {
100
102
  } else {
101
103
  t3 = $[10];
102
104
  }
103
- const resolvedColorMode = React.useSyncExternalStore(emptySubscribe, t2, t3);
105
+ const ssrResolvedColorMode = React.useSyncExternalStore(emptySubscribe, t2, t3);
106
+ const resolvedColorMode = removeSSRHandoff ? clientColorMode : ssrResolvedColorMode;
104
107
  let t4;
105
108
  if ($[11] !== dayScheme || $[12] !== nightScheme || $[13] !== resolvedColorMode) {
106
109
  t4 = chooseColorScheme(resolvedColorMode, dayScheme, nightScheme);
@@ -155,8 +158,8 @@ const ThemeProvider = t0 => {
155
158
  }
156
159
  const contextValue = t6;
157
160
  let t7;
158
- if ($[29] !== props.preventSSRMismatch || $[30] !== resolvedColorMode || $[31] !== uniqueDataId) {
159
- t7 = props.preventSSRMismatch ? /*#__PURE__*/jsx("script", {
161
+ if ($[29] !== props.preventSSRMismatch || $[30] !== removeSSRHandoff || $[31] !== resolvedColorMode || $[32] !== uniqueDataId) {
162
+ t7 = !removeSSRHandoff && props.preventSSRMismatch ? /*#__PURE__*/jsx("script", {
160
163
  type: "application/json",
161
164
  id: `__PRIMER_DATA_${uniqueDataId}__`,
162
165
  dangerouslySetInnerHTML: {
@@ -166,58 +169,59 @@ const ThemeProvider = t0 => {
166
169
  }
167
170
  }) : null;
168
171
  $[29] = props.preventSSRMismatch;
169
- $[30] = resolvedColorMode;
170
- $[31] = uniqueDataId;
171
- $[32] = t7;
172
+ $[30] = removeSSRHandoff;
173
+ $[31] = resolvedColorMode;
174
+ $[32] = uniqueDataId;
175
+ $[33] = t7;
172
176
  } else {
173
- t7 = $[32];
177
+ t7 = $[33];
174
178
  }
175
179
  const ssrHandoffScript = t7;
176
180
  if (props.contextOnly) {
177
181
  let t8;
178
- if ($[33] !== children || $[34] !== contextValue || $[35] !== ssrHandoffScript) {
182
+ if ($[34] !== children || $[35] !== contextValue || $[36] !== ssrHandoffScript) {
179
183
  t8 = /*#__PURE__*/jsxs(ThemeContext.Provider, {
180
184
  value: contextValue,
181
185
  children: [children, ssrHandoffScript]
182
186
  });
183
- $[33] = children;
184
- $[34] = contextValue;
185
- $[35] = ssrHandoffScript;
186
- $[36] = t8;
187
+ $[34] = children;
188
+ $[35] = contextValue;
189
+ $[36] = ssrHandoffScript;
190
+ $[37] = t8;
187
191
  } else {
188
- t8 = $[36];
192
+ t8 = $[37];
189
193
  }
190
194
  return t8;
191
195
  }
192
196
  const t8 = colorMode === "auto" ? "auto" : colorScheme.includes("dark") ? "dark" : "light";
193
197
  let t9;
194
- if ($[37] !== children || $[38] !== dayScheme || $[39] !== nightScheme || $[40] !== ssrHandoffScript || $[41] !== t8) {
198
+ if ($[38] !== children || $[39] !== dayScheme || $[40] !== nightScheme || $[41] !== ssrHandoffScript || $[42] !== t8) {
195
199
  t9 = /*#__PURE__*/jsxs("div", {
196
200
  "data-color-mode": t8,
197
201
  "data-light-theme": dayScheme,
198
202
  "data-dark-theme": nightScheme,
199
203
  children: [children, ssrHandoffScript]
200
204
  });
201
- $[37] = children;
202
- $[38] = dayScheme;
203
- $[39] = nightScheme;
204
- $[40] = ssrHandoffScript;
205
- $[41] = t8;
206
- $[42] = t9;
205
+ $[38] = children;
206
+ $[39] = dayScheme;
207
+ $[40] = nightScheme;
208
+ $[41] = ssrHandoffScript;
209
+ $[42] = t8;
210
+ $[43] = t9;
207
211
  } else {
208
- t9 = $[42];
212
+ t9 = $[43];
209
213
  }
210
214
  let t10;
211
- if ($[43] !== contextValue || $[44] !== t9) {
215
+ if ($[44] !== contextValue || $[45] !== t9) {
212
216
  t10 = /*#__PURE__*/jsx(ThemeContext.Provider, {
213
217
  value: contextValue,
214
218
  children: t9
215
219
  });
216
- $[43] = contextValue;
217
- $[44] = t9;
218
- $[45] = t10;
220
+ $[44] = contextValue;
221
+ $[45] = t9;
222
+ $[46] = t10;
219
223
  } else {
220
- t10 = $[45];
224
+ t10 = $[46];
221
225
  }
222
226
  return t10;
223
227
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "38.28.0-rc.d9fedaf37",
4
+ "version": "38.28.0",
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,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,--inline-end-center,--inline-start-center,--fit-block-bottom,--fit-block-top;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))}@media screen and (max-width:calc(48rem - 0.02px)){.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-bottom][data-align=left][data-responsive=fullscreen]{right:auto}}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-bottom][data-align=right]{left:calc(anchor(left) - var(--anchored-overlay-anchor-offset-right))}@media screen and (max-width:calc(48rem - 0.02px)){.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-bottom][data-align=right][data-responsive=fullscreen]{left:auto}}.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-top][data-align=right]{left:calc(anchor(left) - var(--anchored-overlay-anchor-offset-right))}@media screen and (max-width:calc(48rem - 0.02px)){.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-top][data-align=right][data-responsive=fullscreen]{left:auto}}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-left]{margin-right:var(--base-size-4,.25rem);right:anchor(left);top:var(--anchored-overlay-top-override,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:var(--anchored-overlay-top-override,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}@position-try --inline-end-center{align-self:anchor-center;bottom:auto;left:anchor(right);margin-left:var(--base-size-4,.25rem);top:auto}@position-try --inline-start-center{align-self:anchor-center;bottom:auto;left:auto;margin-right:var(--base-size-4,.25rem);right:anchor(left);top:auto}@position-try --fit-block-bottom{bottom:var(--base-size-8,.5rem);height:auto;max-height:none;top:calc(anchor(bottom) + var(--base-size-4,.25rem))}@position-try --fit-block-top{bottom:calc(100vh - anchor(top) + var(--base-size-4,.25rem));height:auto;max-height:none;top:var(--base-size-8,.5rem)}
2
- /*# sourceMappingURL=AnchoredOverlay-d483d670.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,iJAOiB,CACjB,mCAAoC,CAEpC,wBAA0B,CAD1B,WAgFF,CA7EE,oDAIE,QAAS,CAHT,UAAW,CACX,QAAS,CAGT,cAAe,CAFf,SAGF,CAEA,qEAGE,iBAAkB,CADlB,oDAuBF,CApBE,sFACE,SAAU,CACV,sEAOF,CAJI,mDADF,kHAEI,UAEJ,CADE,CAIJ,uFACE,qEAOF,CAJI,mDADF,mHAEI,SAEJ,CADE,CAKN,kEAEE,kBAAmB,CACnB,iBAAkB,CAFlB,uCAkBF,CAdE,mFACE,SAAU,CACV,mBACF,CAEA,oFACE,qEAOF,CAJI,mDADF,gHAEI,SAEJ,CADE,CAKN,mEAWE,sCAAgC,CAVhC,kBAAmB,CASnB,oDAAsD,CAEtD,iFACF,CAEA,oEACE,kBAAmB,CAEnB,qCAA+B,CAD/B,oDAAsD,CAEtD,kFACF,CAGF,uCAGE,QAAS,CAFT,mBAAoB,CACpB,oDAA8C,CAE9C,UACF,CAEA,wCACE,iBAAkB,CAElB,QAAS,CADT,oDAA8C,CAE9C,UACF,CAEA,kCAKE,wBAAyB,CAFzB,WAAY,CAFZ,kBAAmB,CAGnB,qCAA+B,CAF/B,QAIF,CAEA,oCAME,wBAAyB,CAFzB,WAAY,CAFZ,SAAU,CAGV,sCAAgC,CAJhC,kBAAmB,CAEnB,QAIF,CAEA,iCAEE,+BAA0B,CAC1B,WAAY,CACZ,eAAgB,CAHhB,oDAIF,CAEA,8BAEE,4DAAsD,CACtD,WAAY,CACZ,eAAgB,CAHhB,4BAIF","file":"AnchoredOverlay-d483d670.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 --inline-end-center,\n --inline-start-center,\n --fit-block-bottom,\n --fit-block-top;\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 /* stylelint-disable max-nesting-depth */\n &[data-responsive='fullscreen'] {\n @media screen and (--viewportRange-narrow) {\n right: auto;\n }\n }\n }\n\n &[data-align='right'] {\n left: calc(anchor(left) - var(--anchored-overlay-anchor-offset-right));\n\n &[data-responsive='fullscreen'] {\n @media screen and (--viewportRange-narrow) {\n left: auto;\n }\n }\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 &[data-align='right'] {\n left: calc(anchor(left) - var(--anchored-overlay-anchor-offset-right));\n\n &[data-responsive='fullscreen'] {\n @media screen and (--viewportRange-narrow) {\n left: auto;\n }\n }\n }\n }\n\n &[data-side='outside-left'] {\n right: anchor(left);\n /* Falls back to `anchor(top)` when JS hasn't overridden it. JS sets the\n override when the overlay's bottom would overflow the viewport so we\n can lift it up to keep the bottom edge on screen, mirroring the JS\n anchored-positioning code path.\n\n This override only applies when CSS cannot find space using the default position -\n or any of its defined fallbacks.\n */\n top: var(--anchored-overlay-top-override, 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: var(--anchored-overlay-top-override, 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\n@position-try --inline-end-center {\n left: anchor(right);\n top: auto;\n bottom: auto;\n margin-left: var(--base-size-4);\n align-self: anchor-center;\n}\n\n@position-try --inline-start-center {\n right: anchor(left);\n left: auto;\n top: auto;\n bottom: auto;\n margin-right: var(--base-size-4);\n align-self: anchor-center;\n}\n\n@position-try --fit-block-bottom {\n top: calc(anchor(bottom) + var(--base-size-4));\n bottom: var(--base-size-8);\n height: auto;\n max-height: none;\n}\n\n@position-try --fit-block-top {\n top: var(--base-size-8);\n bottom: calc(100vh - anchor(top) + var(--base-size-4));\n height: auto;\n max-height: none;\n}\n"]}