@primer/react 0.0.0-20260313194214 → 0.0.0-20260313221724

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,15 +1,13 @@
1
1
  # @primer/react
2
2
 
3
- ## 0.0.0-20260313194214
4
-
5
- ### Minor Changes
6
-
7
- - [#7658](https://github.com/primer/react/pull/7658) [`2da6602`](https://github.com/primer/react/commit/2da66024e332ac0510815aa304ecc13b6d07ea75) Thanks [@hussam-i-am](https://github.com/hussam-i-am)! - fix(polymorphic): Improve prop passthrough for ActionList.LinkItem and Breadcrumbs.Item
3
+ ## 0.0.0-20260313221724
8
4
 
9
5
  ### Patch Changes
10
6
 
11
7
  - Fake entry to force publishing
12
8
 
9
+ - [#7510](https://github.com/primer/react/pull/7510) [`4729b56`](https://github.com/primer/react/commit/4729b5695e584b6591c96dab931d3fe66d56d3ee) Thanks [@francinelucca](https://github.com/francinelucca)! - chore: ensure max-height does not surpass viewport height in Overlay, ActionMenu
10
+
13
11
  - [#7625](https://github.com/primer/react/pull/7625) [`2e8c707`](https://github.com/primer/react/commit/2e8c70702d5096551049c29c8e79749bf63a919f) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Banner: stack inline actions vertically on narrow viewports.
14
12
 
15
13
  - [#7554](https://github.com/primer/react/pull/7554) [`f34f0c3`](https://github.com/primer/react/commit/f34f0c37c2bb144e34b029696c580ee8104dbce6) Thanks [@hectahertz](https://github.com/hectahertz)! - perf(ActionList): memoize context values, menuItemProps, and aria attributes
@@ -1,5 +1,5 @@
1
- import type React from 'react';
2
- import type { WithSlotMarker } from '../utils/types/Slots';
1
+ import React from 'react';
2
+ import type { ForwardRefComponent as PolymorphicForwardRefComponent } from '../utils/polymorphic';
3
3
  import type { ActionListItemProps } from './shared';
4
4
  type LinkProps = {
5
5
  download?: string;
@@ -14,9 +14,6 @@ type LinkProps = {
14
14
  className?: string;
15
15
  };
16
16
  export type ActionListLinkItemProps = Pick<ActionListItemProps, 'active' | 'children' | 'inactiveText' | 'variant' | 'size'> & LinkProps;
17
- declare const LinkItemComponent: <As extends React.ElementType = "a">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & Pick<ActionListItemProps, "children" | "size" | "active" | "variant" | "inactiveText"> & LinkProps extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & Pick<ActionListItemProps, "children" | "size" | "active" | "variant" | "inactiveText"> & LinkProps ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
18
- as?: As | undefined;
19
- } & React.RefAttributes<unknown>) => React.ReactNode;
20
- export declare const LinkItem: WithSlotMarker<typeof LinkItemComponent>;
17
+ export declare const LinkItem: PolymorphicForwardRefComponent<"a", ActionListLinkItemProps>;
21
18
  export {};
22
19
  //# sourceMappingURL=LinkItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LinkItem.d.ts","sourceRoot":"","sources":["../../src/ActionList/LinkItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAA;AAGxD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAA;AAIjD,KAAK,SAAS,GAAG;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,gBAAgB,CAAC,CAAA;IAChF,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,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@@
1
+ import { c } from 'react-compiler-runtime';
2
+ import React from 'react';
1
3
  import { Item } from './Item.js';
2
- import { fixedForwardRef } from '../utils/modern-polymorphic.js';
3
4
  import { jsx } from 'react/jsx-runtime';
4
5
  import Link from '../Link/Link.js';
5
6
 
6
- const LinkItemComponent = fixedForwardRef(({
7
- active,
8
- inactiveText,
9
- variant,
10
- size,
11
- as: Component,
12
- className,
13
- ...props
14
- }, forwardedRef) => {
15
- return /*#__PURE__*/jsx(Item, {
16
- className: className,
17
- active: active,
18
- inactiveText: inactiveText,
19
- "data-inactive": inactiveText ? true : undefined,
20
- variant: variant,
21
- size: size,
22
- _PrivateItemWrapper: ({
23
- children,
24
- onClick,
25
- ...rest
26
- }) => {
7
+ const LinkItem = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
8
+ const $ = c(22);
9
+ let Component;
10
+ let active;
11
+ let className;
12
+ let inactiveText;
13
+ let props;
14
+ let size;
15
+ let variant;
16
+ if ($[0] !== t0) {
17
+ ({
18
+ active,
19
+ inactiveText,
20
+ variant,
21
+ size,
22
+ as: Component,
23
+ className,
24
+ ...props
25
+ } = t0);
26
+ $[0] = t0;
27
+ $[1] = Component;
28
+ $[2] = active;
29
+ $[3] = className;
30
+ $[4] = inactiveText;
31
+ $[5] = props;
32
+ $[6] = size;
33
+ $[7] = variant;
34
+ } else {
35
+ Component = $[1];
36
+ active = $[2];
37
+ className = $[3];
38
+ inactiveText = $[4];
39
+ props = $[5];
40
+ size = $[6];
41
+ variant = $[7];
42
+ }
43
+ const t1 = inactiveText ? true : undefined;
44
+ let t2;
45
+ if ($[8] !== Component || $[9] !== forwardedRef || $[10] !== inactiveText || $[11] !== props) {
46
+ t2 = t3 => {
47
+ const {
48
+ children,
49
+ onClick,
50
+ ...rest
51
+ } = t3;
27
52
  const clickHandler = event => {
28
53
  onClick && onClick(event);
29
54
  props.onClick && props.onClick(event);
30
55
  };
31
- if (inactiveText) {
32
- return /*#__PURE__*/jsx("span", {
33
- ...rest,
34
- children: children
35
- });
36
- }
37
-
38
- // Type safety for the polymorphic `as` prop is enforced at the
39
- // LinkItem boundary via fixedForwardRef. Internally we widen
40
- // Link's type so TypeScript doesn't re-check the generic
41
- // constraint across two polymorphic layers.
42
- const InternalLink = Link;
43
- return /*#__PURE__*/jsx(InternalLink, {
56
+ return inactiveText ? /*#__PURE__*/jsx("span", {
57
+ ...rest,
58
+ children: children
59
+ }) : /*#__PURE__*/jsx(Link, {
44
60
  as: Component,
45
61
  ...rest,
46
62
  ...props,
@@ -48,13 +64,42 @@ const LinkItemComponent = fixedForwardRef(({
48
64
  ref: forwardedRef,
49
65
  children: children
50
66
  });
51
- },
52
- children: props.children
53
- });
54
- });
55
- const LinkItem = Object.assign(LinkItemComponent, {
56
- displayName: 'ActionList.LinkItem',
57
- __SLOT__: Symbol('ActionList.LinkItem')
67
+ };
68
+ $[8] = Component;
69
+ $[9] = forwardedRef;
70
+ $[10] = inactiveText;
71
+ $[11] = props;
72
+ $[12] = t2;
73
+ } else {
74
+ t2 = $[12];
75
+ }
76
+ let t3;
77
+ if ($[13] !== active || $[14] !== className || $[15] !== inactiveText || $[16] !== props.children || $[17] !== size || $[18] !== t1 || $[19] !== t2 || $[20] !== variant) {
78
+ t3 = /*#__PURE__*/jsx(Item, {
79
+ className: className,
80
+ active: active,
81
+ inactiveText: inactiveText,
82
+ "data-inactive": t1,
83
+ variant: variant,
84
+ size: size,
85
+ _PrivateItemWrapper: t2,
86
+ children: props.children
87
+ });
88
+ $[13] = active;
89
+ $[14] = className;
90
+ $[15] = inactiveText;
91
+ $[16] = props.children;
92
+ $[17] = size;
93
+ $[18] = t1;
94
+ $[19] = t2;
95
+ $[20] = variant;
96
+ $[21] = t3;
97
+ } else {
98
+ t3 = $[21];
99
+ }
100
+ return t3;
58
101
  });
102
+ LinkItem.displayName = 'ActionList.LinkItem';
103
+ LinkItem.__SLOT__ = Symbol('ActionList.LinkItem');
59
104
 
60
105
  export { LinkItem };
@@ -84,31 +84,7 @@ export declare const ActionList: (<As extends React.ElementType = "ul">(props: (
84
84
  __SLOT__: symbol;
85
85
  };
86
86
  /** A `Item` that renders a full-size anchor inside ListItem */
87
- LinkItem: import("../utils/types").WithSlotMarker<(<As extends React.ElementType = "a">(props: (import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "a" : As> & Pick<import("./shared").ActionListItemProps, "children" | "size" | "active" | "variant" | "inactiveText"> & {
88
- download?: string;
89
- href?: string;
90
- hrefLang?: string;
91
- media?: string;
92
- ping?: string;
93
- rel?: string;
94
- target?: string;
95
- type?: string;
96
- referrerPolicy?: React.AnchorHTMLAttributes<HTMLAnchorElement>["referrerPolicy"];
97
- className?: string;
98
- } extends infer T ? T extends import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "a" : As> & Pick<import("./shared").ActionListItemProps, "children" | "size" | "active" | "variant" | "inactiveText"> & {
99
- download?: string;
100
- href?: string;
101
- hrefLang?: string;
102
- media?: string;
103
- ping?: string;
104
- rel?: string;
105
- target?: string;
106
- type?: string;
107
- referrerPolicy?: React.AnchorHTMLAttributes<HTMLAnchorElement>["referrerPolicy"];
108
- className?: string;
109
- } ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
110
- as?: As | undefined;
111
- } & import("react").RefAttributes<unknown>) => React.ReactNode)>;
87
+ LinkItem: import("../utils/polymorphic").ForwardRefComponent<"a", import("./LinkItem").ActionListLinkItemProps>;
112
88
  /** Visually separates `Item`s or `Group`s in an `ActionList`. */
113
89
  Divider: import("../utils/types").FCWithSlotMarker<import("react").PropsWithChildren<import("./Divider").ActionListDividerProps>>;
114
90
  /** Secondary text which provides additional information about an `Item`. */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ActionList/index.ts"],"names":[],"mappings":"AAUA,YAAY,EAAC,eAAe,EAAC,MAAM,UAAU,CAAA;AAC7C,YAAY,EAAC,oBAAoB,EAAE,2BAA2B,EAAC,MAAM,SAAS,CAAA;AAC9E,YAAY,EAAC,mBA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AkB,CAAA;AAEnE;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;IACrB,mDAAmD;;IAGnD,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGzC,+DAA+D;;IAG/D,iEAAiE;;IAGjE,4EAA4E;;IAG5E,uDAAuD;;IAGvD,sDAAsD;;IAGtD,mCAAmC;;IAGnC,qCAAqC;;IAGrC,uBAAuB;;CAEvB,CAAA"}
@@ -0,0 +1,2 @@
1
+ .prc-ActionMenu-ActionMenuContainer-Om1Qz{max-height:100vh}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-variant=fullscreen]){padding-top:var(--base-size-36,2.25rem)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-auto]){overflow:auto}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-hidden]){overflow:hidden}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-scroll]){overflow:scroll}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-visible]){overflow:visible}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-xsmall]){max-height:min(192px,100dvh)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-small]){max-height:min(256px,100dvh)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-medium]){max-height:min(320px,100dvh)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-large]){max-height:min(432px,100dvh)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-xlarge]){max-height:min(600px,100dvh)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-fit-content]){max-height:-moz-fit-content;max-height:fit-content}
2
+ /*# sourceMappingURL=ActionMenu-b1d15f15.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ActionMenu/ActionMenu.module.css.js"],"names":[],"mappings":"AAAA,0CAEE,gBA+CF,CA7CE,2EACE,uCACF,CAGA,sEACE,aACF,CAEA,wEACE,eACF,CAEA,wEACE,eACF,CAEA,yEACE,gBACF,CAGA,0EACE,gBACF,CAEA,yEACE,gBACF,CAEA,0EACE,gBACF,CAEA,yEACE,gBACF,CAEA,0EACE,gBACF,CAEA,+EACE,2BAAuB,CAAvB,sBACF","file":"ActionMenu-53493541.css","sourcesContent":[".ActionMenuContainer {\n /* add default max height */\n max-height: 100vh;\n\n &:where([data-variant='fullscreen']) {\n padding-top: var(--base-size-36);\n }\n\n /* Overflow variants */\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 /* Max-height size tokens (mirror Overlay sizes) */\n &:where([data-max-height-xsmall]) {\n max-height: 192px;\n }\n\n &:where([data-max-height-small]) {\n max-height: 256px;\n }\n\n &:where([data-max-height-medium]) {\n max-height: 320px;\n }\n\n &:where([data-max-height-large]) {\n max-height: 432px;\n }\n\n &:where([data-max-height-xlarge]) {\n max-height: 600px;\n }\n\n &:where([data-max-height-fit-content]) {\n max-height: fit-content;\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/ActionMenu/ActionMenu.module.css.js"],"names":[],"mappings":"AAAA,0CAEE,gBA+CF,CA7CE,2EACE,uCACF,CAGA,sEACE,aACF,CAEA,wEACE,eACF,CAEA,wEACE,eACF,CAEA,yEACE,gBACF,CAGA,0EACE,4BACF,CAEA,yEACE,4BACF,CAEA,0EACE,4BACF,CAEA,yEACE,4BACF,CAEA,0EACE,4BACF,CAEA,+EACE,2BAAuB,CAAvB,sBACF","file":"ActionMenu-b1d15f15.css","sourcesContent":[".ActionMenuContainer {\n /* add default max height */\n max-height: 100vh;\n\n &:where([data-variant='fullscreen']) {\n padding-top: var(--base-size-36);\n }\n\n /* Overflow variants */\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 /* Max-height size tokens (mirror Overlay sizes) */\n &:where([data-max-height-xsmall]) {\n max-height: min(192px, 100dvh);\n }\n\n &:where([data-max-height-small]) {\n max-height: min(256px, 100dvh);\n }\n\n &:where([data-max-height-medium]) {\n max-height: min(320px, 100dvh);\n }\n\n &:where([data-max-height-large]) {\n max-height: min(432px, 100dvh);\n }\n\n &:where([data-max-height-xlarge]) {\n max-height: min(600px, 100dvh);\n }\n\n &:where([data-max-height-fit-content]) {\n max-height: fit-content;\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import './ActionMenu-53493541.css';
1
+ import './ActionMenu-b1d15f15.css';
2
2
 
3
3
  var styles = {"ActionMenuContainer":"prc-ActionMenu-ActionMenuContainer-Om1Qz"};
4
4
 
@@ -1,6 +1,5 @@
1
1
  import type { To } from 'history';
2
2
  import React from 'react';
3
- import { type PolymorphicProps } from '../utils/modern-polymorphic';
4
3
  export type BreadcrumbsProps = React.PropsWithChildren<{
5
4
  /**
6
5
  * Optional class name for the breadcrumbs container.
@@ -28,38 +27,24 @@ declare function Breadcrumbs({ className, children, style, overflow, variant }:
28
27
  declare namespace Breadcrumbs {
29
28
  var displayName: string;
30
29
  }
31
- type StyledBreadcrumbsItemProps<As extends React.ElementType = 'a'> = PolymorphicProps<As, 'a', {
30
+ type DistributiveOmit<T, TOmitted extends PropertyKey> = T extends any ? Omit<T, TOmitted> : never;
31
+ type StyledBreadcrumbsItemProps<As extends React.ElementType> = {
32
+ as?: As;
32
33
  to?: To;
33
34
  selected?: boolean;
34
- }>;
35
+ className?: string;
36
+ style?: React.CSSProperties;
37
+ } & DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? 'a' : As>, 'as'>;
35
38
  export type BreadcrumbsItemProps<As extends React.ElementType = 'a'> = StyledBreadcrumbsItemProps<As>;
36
39
  declare const _default: typeof Breadcrumbs & {
37
- Item: (<As extends React.ElementType = "a">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
38
- to?: To;
39
- selected?: boolean;
40
- } extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
41
- to?: To;
42
- selected?: boolean;
43
- } ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
44
- as?: As | undefined;
45
- } & React.RefAttributes<any>) => React.ReactNode) & {
46
- displayName: string;
47
- };
40
+ Item: React.ForwardRefExoticComponent<Omit<StyledBreadcrumbsItemProps<React.ElementType<any, keyof React.JSX.IntrinsicElements>>, "ref"> & React.RefAttributes<any>>;
48
41
  };
49
42
  export default _default;
50
43
  /**
51
44
  * @deprecated Use the `Breadcrumbs` component instead (i.e. `<Breadcrumb>` → `<Breadcrumbs>`)
52
45
  */
53
46
  export declare const Breadcrumb: typeof Breadcrumbs & {
54
- Item: <As extends React.ElementType = "a">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
55
- to?: To;
56
- selected?: boolean;
57
- } extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
58
- to?: To;
59
- selected?: boolean;
60
- } ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
61
- as?: As | undefined;
62
- } & React.RefAttributes<any>) => React.ReactNode;
47
+ Item: React.ForwardRefExoticComponent<Omit<StyledBreadcrumbsItemProps<React.ElementType<any, keyof React.JSX.IntrinsicElements>>, "ref"> & React.RefAttributes<any>>;
63
48
  };
64
49
  /**
65
50
  * @deprecated Use the `BreadcrumbsProps` type instead
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,EAAE,EAAC,MAAM,SAAS,CAAA;AAC/B,OAAO,KAA6E,MAAM,OAAO,CAAA;AAWjG,OAAO,EAAC,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;AAwBhG,MAAM,MAAM,oBAAoB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI,0BAA0B,CAAC,EAAE,CAAC,CAAA;;;;AACrG,wBAAkE;AAElE;;GAEG;AACH,eAAO,MAAM,UAAU;;CAAsD,CAAA;AAE7E;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAA;AAE9C;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI,oBAAoB,CAAC,EAAE,CAAC,CAAA"}
@@ -8,7 +8,6 @@ import { KebabHorizontalIcon } from '@primer/octicons-react';
8
8
  import { useResizeObserver } from '../hooks/useResizeObserver.js';
9
9
  import { useOnEscapePress } from '../hooks/useOnEscapePress.js';
10
10
  import { useOnOutsideClick } from '../hooks/useOnOutsideClick.js';
11
- import { fixedForwardRef } from '../utils/modern-polymorphic.js';
12
11
  import { jsx, jsxs } from 'react/jsx-runtime';
13
12
  import { useFeatureFlag } from '../FeatureFlags/useFeatureFlag.js';
14
13
  import Details from '../Details/Details.js';
@@ -400,26 +399,69 @@ const ItemSeparator = () => {
400
399
  }
401
400
  return t0;
402
401
  };
403
- const BreadcrumbsItem = fixedForwardRef((props, ref) => {
404
- const {
405
- as: Component = 'a',
406
- selected,
407
- className,
408
- ...rest
409
- } = props;
410
- return /*#__PURE__*/jsx(Component, {
411
- className: clsx(className, classes.Item, selected && 'selected'),
412
- "aria-current": selected ? 'page' : undefined,
413
- ref: ref,
414
- ...rest
415
- });
416
- });
402
+
403
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
404
+
405
+ function BreadcrumbsItemComponent(props, ref) {
406
+ const $ = c(14);
407
+ let className;
408
+ let rest;
409
+ let selected;
410
+ let t0;
411
+ if ($[0] !== props) {
412
+ ({
413
+ as: t0,
414
+ selected,
415
+ className,
416
+ ...rest
417
+ } = props);
418
+ $[0] = props;
419
+ $[1] = className;
420
+ $[2] = rest;
421
+ $[3] = selected;
422
+ $[4] = t0;
423
+ } else {
424
+ className = $[1];
425
+ rest = $[2];
426
+ selected = $[3];
427
+ t0 = $[4];
428
+ }
429
+ const Component = t0 === undefined ? "a" : t0;
430
+ const t1 = selected && "selected";
431
+ let t2;
432
+ if ($[5] !== className || $[6] !== t1) {
433
+ t2 = clsx(className, classes.Item, t1);
434
+ $[5] = className;
435
+ $[6] = t1;
436
+ $[7] = t2;
437
+ } else {
438
+ t2 = $[7];
439
+ }
440
+ const t3 = selected ? "page" : undefined;
441
+ let t4;
442
+ if ($[8] !== Component || $[9] !== ref || $[10] !== rest || $[11] !== t2 || $[12] !== t3) {
443
+ t4 = /*#__PURE__*/jsx(Component, {
444
+ className: t2,
445
+ "aria-current": t3,
446
+ ref: ref,
447
+ ...rest
448
+ });
449
+ $[8] = Component;
450
+ $[9] = ref;
451
+ $[10] = rest;
452
+ $[11] = t2;
453
+ $[12] = t3;
454
+ $[13] = t4;
455
+ } else {
456
+ t4 = $[13];
457
+ }
458
+ return t4;
459
+ }
460
+ BreadcrumbsItemComponent.displayName = 'Breadcrumbs.Item';
461
+ const BreadcrumbsItem = /*#__PURE__*/React.forwardRef(BreadcrumbsItemComponent);
417
462
  Breadcrumbs.displayName = 'Breadcrumbs';
418
- const BreadcrumbsItemWithDisplayName = Object.assign(BreadcrumbsItem, {
419
- displayName: 'Breadcrumbs.Item'
420
- });
421
463
  var Breadcrumbs_default = Object.assign(Breadcrumbs, {
422
- Item: BreadcrumbsItemWithDisplayName
464
+ Item: BreadcrumbsItem
423
465
  });
424
466
 
425
467
  /**
@@ -437,15 +479,11 @@ const Breadcrumb = Object.assign(Breadcrumbs, {
437
479
  * @deprecated Use the `BreadcrumbsItemProps` type instead
438
480
  */
439
481
  function _temp(item, index) {
440
- const {
441
- children,
442
- selected,
443
- as: Component,
444
- ...itemProps
445
- } = item.props;
482
+ const href = item.props.href;
483
+ const children = item.props.children;
484
+ const selected = item.props.selected;
446
485
  return /*#__PURE__*/jsx(ActionList.LinkItem, {
447
- as: Component,
448
- ...itemProps,
486
+ href: href,
449
487
  "aria-current": selected ? "page" : undefined,
450
488
  children: children
451
489
  }, index);
@@ -2,17 +2,16 @@ import { type Icon } from '@primer/octicons-react';
2
2
  import type { ForwardRefComponent as PolymorphicForwardRefComponent } from '../utils/polymorphic';
3
3
  import React from 'react';
4
4
  import type { ActionListTrailingActionProps, ActionListDividerProps, ActionListLeadingVisualProps, ActionListTrailingVisualProps, ActionListGroupHeadingProps } from '../ActionList';
5
- import { type PolymorphicProps } from '../utils/modern-polymorphic';
6
5
  export type NavListProps = {
7
6
  children: React.ReactNode;
8
7
  } & React.ComponentProps<'nav'>;
9
- export type NavListItemProps<As extends React.ElementType = 'a'> = PolymorphicProps<As, 'a', {
8
+ export type NavListItemProps = {
10
9
  children: React.ReactNode;
11
10
  defaultOpen?: boolean;
12
11
  href?: string;
13
12
  'aria-current'?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false' | boolean;
14
13
  inactiveText?: string;
15
- }>;
14
+ };
16
15
  export type NavListSubNavProps = {
17
16
  children: React.ReactNode;
18
17
  };
@@ -41,23 +40,7 @@ export declare const GroupExpand: React.ForwardRefExoticComponent<NavListGroupEx
41
40
  export type NavListGroupHeadingProps = ActionListGroupHeadingProps;
42
41
  export declare const NavList: React.ForwardRefExoticComponent<Omit<NavListProps, "ref"> & React.RefAttributes<HTMLElement>> & {
43
42
  Description: import("../utils/types").FCWithSlotMarker<React.PropsWithChildren<import("..").ActionListDescriptionProps>>;
44
- Item: (<As extends React.ElementType = "a">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
45
- children: React.ReactNode;
46
- defaultOpen?: boolean;
47
- href?: string;
48
- 'aria-current'?: "page" | "step" | "location" | "date" | "time" | "true" | "false" | boolean;
49
- inactiveText?: string;
50
- } extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
51
- children: React.ReactNode;
52
- defaultOpen?: boolean;
53
- href?: string;
54
- 'aria-current'?: "page" | "step" | "location" | "date" | "time" | "true" | "false" | boolean;
55
- inactiveText?: string;
56
- } ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
57
- as?: As | undefined;
58
- } & React.RefAttributes<unknown>) => React.ReactNode) & {
59
- displayName: string;
60
- };
43
+ Item: PolymorphicForwardRefComponent<"a", NavListItemProps>;
61
44
  SubNav: PolymorphicForwardRefComponent<"ul", NavListSubNavProps>;
62
45
  LeadingVisual: import("../utils/types").FCWithSlotMarker<React.PropsWithChildren<import("../ActionList/Visuals").VisualProps>>;
63
46
  TrailingVisual: import("../utils/types").FCWithSlotMarker<React.PropsWithChildren<import("../ActionList/Visuals").VisualProps>>;
@@ -1 +1 @@
1
- {"version":3,"file":"NavList.d.ts","sourceRoot":"","sources":["../../src/NavList/NavList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,IAAI,EAAC,MAAM,wBAAwB,CAAA;AAC3E,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAC/F,OAAO,KAAuB,MAAM,OAAO,CAAA;AAE3C,OAAO,KAAK,EACV,6BAA6B,EAC7B,sBAAsB,EACtB,4BAA4B,EAC5B,6BAA6B,EAC7B,2BAA2B,EAC5B,MAAM,eAAe,CAAA;AAUtB,OAAO,EAAkB,KAAK,gBAAgB,EAAC,MAAM,6BAA6B,CAAA;AAKlF,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAA;AAqB/B,MAAM,MAAM,gBAAgB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI,gBAAgB,CACjF,EAAE,EACF,GAAG,EACH;IACE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE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AM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAAA;AAkCD,MAAM,MAAM,yBAAyB,GAAG,4BAA4B,CAAA;AASpE,MAAM,MAAM,0BAA0B,GAAG,6BAA6B,CAAA;AAStE,MAAM,MAAM,mBAAmB,GAAG,sBAAsB,CAAA;AAQxD,MAAM,MAAM,0BAA0B,GAAG,6BAA6B,CAAA;AAStE,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,GAAG;IACpE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAqBD,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;IAC9B,aAAa,CAAC,EAAE,IAAI,CAAA;IACpB,cAAc,CAAC,EAAE,6BAA6B,CAAA;IAC9C,0BAA0B,CAAC,EAAE,MAAM,CAAA;CACpC,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAA;AAEtC,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,KAAK,CAAC,SAAS,CAAA;CAClD,CAAA;AAED,eAAO,MAAM,WAAW,mGAgFvB,CAAA;AAKD,MAAM,MAAM,wBAAwB,GAAG,2BAA2B,CAAA;AAqBlE,eAAO,MAAM,OAAO;;;;;;;;;;;CAWlB,CAAA"}
@@ -11,7 +11,6 @@ import classes from '../ActionList/ActionList.module.css.js';
11
11
  import navListClasses from './NavList.module.css.js';
12
12
  import { flushSync } from 'react-dom';
13
13
  import { isSlot } from '../utils/is-slot.js';
14
- import { fixedForwardRef } from '../utils/modern-polymorphic.js';
15
14
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
16
15
 
17
16
  const Root = /*#__PURE__*/React.forwardRef((t0, ref) => {
@@ -73,59 +72,128 @@ Root.displayName = 'NavList';
73
72
  // ----------------------------------------------------------------------------
74
73
  // NavList.Item
75
74
 
76
- const ItemComponent = fixedForwardRef(({
77
- 'aria-current': ariaCurrent,
78
- children,
79
- defaultOpen,
80
- as: Component,
81
- ...props
82
- }, ref) => {
75
+ const Item = /*#__PURE__*/React.forwardRef((t0, ref) => {
76
+ const $ = c(29);
77
+ let ariaCurrent;
78
+ let children;
79
+ let defaultOpen;
80
+ let props;
81
+ if ($[0] !== t0) {
82
+ ({
83
+ "aria-current": ariaCurrent,
84
+ children,
85
+ defaultOpen,
86
+ ...props
87
+ } = t0);
88
+ $[0] = t0;
89
+ $[1] = ariaCurrent;
90
+ $[2] = children;
91
+ $[3] = defaultOpen;
92
+ $[4] = props;
93
+ } else {
94
+ ariaCurrent = $[1];
95
+ children = $[2];
96
+ defaultOpen = $[3];
97
+ props = $[4];
98
+ }
83
99
  const {
84
100
  depth
85
101
  } = React.useContext(SubNavContext);
86
-
87
- // Get SubNav from children
88
- const subNav = React.Children.toArray(children).find(child => /*#__PURE__*/isValidElement(child) && (child.type === SubNav || isSlot(child, SubNav)));
89
-
90
- // Get children without SubNav or TrailingAction
91
- const childrenWithoutSubNavOrTrailingAction = React.Children.toArray(children).filter(child => /*#__PURE__*/isValidElement(child) ? child.type !== SubNav && child.type !== TrailingAction && !isSlot(child, SubNav) && !isSlot(child, TrailingAction) : true);
92
- if (! /*#__PURE__*/isValidElement(subNav) && defaultOpen)
93
- // eslint-disable-next-line no-console
94
- console.error('NavList.Item must have a NavList.SubNav to use defaultOpen.');
95
-
96
- // Render ItemWithSubNav if SubNav is present
97
- if (subNav && /*#__PURE__*/isValidElement(subNav)) {
98
- return /*#__PURE__*/jsx(ItemWithSubNav, {
99
- subNav: subNav,
100
- depth: depth,
101
- defaultOpen: defaultOpen,
102
- style: {
103
- '--subitem-depth': depth
104
- },
105
- children: childrenWithoutSubNavOrTrailingAction
102
+ let childrenWithoutSubNavOrTrailingAction;
103
+ let subNav;
104
+ let t1;
105
+ if ($[5] !== children || $[6] !== defaultOpen) {
106
+ subNav = React.Children.toArray(children).find(_temp);
107
+ let t2;
108
+ if ($[10] !== children) {
109
+ t2 = React.Children.toArray(children).filter(_temp2);
110
+ $[10] = children;
111
+ $[11] = t2;
112
+ } else {
113
+ t2 = $[11];
114
+ }
115
+ childrenWithoutSubNavOrTrailingAction = t2;
116
+ if (! /*#__PURE__*/isValidElement(subNav) && defaultOpen) {
117
+ console.error("NavList.Item must have a NavList.SubNav to use defaultOpen.");
118
+ }
119
+ t1 = subNav && /*#__PURE__*/isValidElement(subNav);
120
+ $[5] = children;
121
+ $[6] = defaultOpen;
122
+ $[7] = childrenWithoutSubNavOrTrailingAction;
123
+ $[8] = subNav;
124
+ $[9] = t1;
125
+ } else {
126
+ childrenWithoutSubNavOrTrailingAction = $[7];
127
+ subNav = $[8];
128
+ t1 = $[9];
129
+ }
130
+ if (t1) {
131
+ let t2;
132
+ if ($[12] !== depth) {
133
+ t2 = {
134
+ "--subitem-depth": depth
135
+ };
136
+ $[12] = depth;
137
+ $[13] = t2;
138
+ } else {
139
+ t2 = $[13];
140
+ }
141
+ const t3 = t2;
142
+ let t4;
143
+ if ($[14] !== childrenWithoutSubNavOrTrailingAction || $[15] !== defaultOpen || $[16] !== depth || $[17] !== subNav || $[18] !== t3) {
144
+ t4 = /*#__PURE__*/jsx(ItemWithSubNav, {
145
+ subNav: subNav,
146
+ depth: depth,
147
+ defaultOpen: defaultOpen,
148
+ style: t3,
149
+ children: childrenWithoutSubNavOrTrailingAction
150
+ });
151
+ $[14] = childrenWithoutSubNavOrTrailingAction;
152
+ $[15] = defaultOpen;
153
+ $[16] = depth;
154
+ $[17] = subNav;
155
+ $[18] = t3;
156
+ $[19] = t4;
157
+ } else {
158
+ t4 = $[19];
159
+ }
160
+ return t4;
161
+ }
162
+ const t2 = Boolean(ariaCurrent) && ariaCurrent !== "false";
163
+ let t3;
164
+ if ($[20] !== depth) {
165
+ t3 = {
166
+ "--subitem-depth": depth
167
+ };
168
+ $[20] = depth;
169
+ $[21] = t3;
170
+ } else {
171
+ t3 = $[21];
172
+ }
173
+ const t4 = t3;
174
+ let t5;
175
+ if ($[22] !== ariaCurrent || $[23] !== children || $[24] !== props || $[25] !== ref || $[26] !== t2 || $[27] !== t4) {
176
+ t5 = /*#__PURE__*/jsx(ActionList.LinkItem, {
177
+ ref: ref,
178
+ "aria-current": ariaCurrent,
179
+ active: t2,
180
+ style: t4,
181
+ ...props,
182
+ children: children
106
183
  });
184
+ $[22] = ariaCurrent;
185
+ $[23] = children;
186
+ $[24] = props;
187
+ $[25] = ref;
188
+ $[26] = t2;
189
+ $[27] = t4;
190
+ $[28] = t5;
191
+ } else {
192
+ t5 = $[28];
107
193
  }
108
-
109
- // Type safety for the polymorphic `as` prop is enforced at the
110
- // Item boundary via fixedForwardRef. Internally we widen
111
- // LinkItem's type so TypeScript doesn't re-check the generic
112
- // constraint across two polymorphic layers.
113
- const InternalLinkItem = ActionList.LinkItem;
114
- return /*#__PURE__*/jsx(InternalLinkItem, {
115
- ref: ref,
116
- as: Component,
117
- "aria-current": ariaCurrent,
118
- active: Boolean(ariaCurrent) && ariaCurrent !== 'false',
119
- style: {
120
- '--subitem-depth': depth
121
- },
122
- ...props,
123
- children: children
124
- });
125
- });
126
- const Item = Object.assign(ItemComponent, {
127
- displayName: 'NavList.Item'
194
+ return t5;
128
195
  });
196
+ Item.displayName = 'NavList.Item';
129
197
 
130
198
  // ----------------------------------------------------------------------------
131
199
  // ItemWithSubNav (internal)
@@ -191,7 +259,7 @@ function ItemWithSubNav(t0) {
191
259
  const t4 = !isOpen && containsCurrentItem;
192
260
  let t5;
193
261
  if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
194
- t5 = () => setIsOpen(_temp);
262
+ t5 = () => setIsOpen(_temp3);
195
263
  $[8] = t5;
196
264
  } else {
197
265
  t5 = $[8];
@@ -273,7 +341,7 @@ function ItemWithSubNav(t0) {
273
341
 
274
342
  // ----------------------------------------------------------------------------
275
343
  // NavList.SubNav
276
- function _temp(open) {
344
+ function _temp3(open) {
277
345
  return !open;
278
346
  }
279
347
  const SubNavContext = /*#__PURE__*/React.createContext({
@@ -628,5 +696,11 @@ const NavList = Object.assign(Root, {
628
696
  GroupExpand,
629
697
  GroupHeading
630
698
  });
699
+ function _temp(child) {
700
+ return /*#__PURE__*/isValidElement(child) && (child.type === SubNav || isSlot(child, SubNav));
701
+ }
702
+ function _temp2(child_0) {
703
+ return /*#__PURE__*/isValidElement(child_0) ? child_0.type !== SubNav && child_0.type !== TrailingAction && !isSlot(child_0, SubNav) && !isSlot(child_0, TrailingAction) : true;
704
+ }
631
705
 
632
706
  export { GroupExpand, NavList };
@@ -0,0 +1,2 @@
1
+ @keyframes prc-Overlay-overlay-appear-JpFey{0%{opacity:0}to{opacity:1}}.prc-Overlay-Overlay-jfs-T{background-color:var(--overlay-bgColor,var(--color-canvas-overlay));border-radius:var(--borderRadius-large,.75rem);bottom:var(--bottom,auto);box-shadow:var(--shadow-floating-small,var(--color-overlay-shadow));height:auto;left:var(--left,auto);max-height:100vh;max-width:calc(100vw - 2rem);min-width:192px;overflow:auto;position:absolute;right:var(--right,auto);top:var(--top,auto);width:auto}.prc-Overlay-Overlay-jfs-T:focus{outline:none}@media (forced-colors:active){.prc-Overlay-Overlay-jfs-T{outline:1px solid transparent}}.prc-Overlay-Overlay-jfs-T:where([data-reflow-container=true]){max-width:calc(100vw - 2rem)}.prc-Overlay-Overlay-jfs-T:where([data-overflow-auto]){overflow:auto}.prc-Overlay-Overlay-jfs-T:where([data-overflow-hidden]){overflow:hidden}.prc-Overlay-Overlay-jfs-T:where([data-overflow-scroll]){overflow:scroll}.prc-Overlay-Overlay-jfs-T:where([data-overflow-visible]){overflow:visible}.prc-Overlay-Overlay-jfs-T:where([data-height-xsmall]){height:192px}.prc-Overlay-Overlay-jfs-T:where([data-height-small]){height:256px}.prc-Overlay-Overlay-jfs-T:where([data-height-medium]){height:320px}.prc-Overlay-Overlay-jfs-T:where([data-height-large]){height:432px}.prc-Overlay-Overlay-jfs-T:where([data-height-xlarge]){height:600px}.prc-Overlay-Overlay-jfs-T:where([data-height-auto]),.prc-Overlay-Overlay-jfs-T:where([data-height-initial]){height:auto}.prc-Overlay-Overlay-jfs-T:where([data-height-fit-content]){height:-moz-fit-content;height:fit-content}.prc-Overlay-Overlay-jfs-T:where([data-max-height-xsmall]){max-height:min(192px,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,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,100dvh)}.prc-Overlay-Overlay-jfs-T:where([data-max-height-fit-content]){max-height:-moz-fit-content;max-height:fit-content}.prc-Overlay-Overlay-jfs-T:where([data-width-small]){width:256px}.prc-Overlay-Overlay-jfs-T:where([data-width-medium]){width:320px}.prc-Overlay-Overlay-jfs-T:where([data-width-large]){width:480px}.prc-Overlay-Overlay-jfs-T:where([data-width-xlarge]){width:640px}.prc-Overlay-Overlay-jfs-T:where([data-width-xxlarge]){width:960px}.prc-Overlay-Overlay-jfs-T:where([data-width-auto]){width:auto}.prc-Overlay-Overlay-jfs-T:where([data-max-width-small]){max-width:256px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-medium]){max-width:320px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-large]){max-width:480px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-xlarge]){max-width:640px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-xxlarge]){max-width:960px}.prc-Overlay-Overlay-jfs-T:where([data-visibility-visible]){visibility:visible}.prc-Overlay-Overlay-jfs-T:where([data-visibility-hidden]){visibility:hidden}@media screen and (max-width:calc(48rem - 0.02px)){.prc-Overlay-Overlay-jfs-T:where([data-responsive=fullscreen]){border-radius:unset;height:100vh;left:0;margin:0;max-height:none;max-width:none;padding-bottom:env(safe-area-inset-bottom);position:fixed;top:0;width:100vw}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-responsive=fullscreen]){height:100dvh}}}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-variant=fullscreen]){height:100dvh}}@media (prefers-reduced-motion:no-preference){.prc-Overlay-Overlay-jfs-T{animation:prc-Overlay-overlay-appear-JpFey .2s cubic-bezier(.33,1,.68,1)}}
2
+ /*# sourceMappingURL=Overlay-cacb5b85.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Overlay/Overlay.module.css.js"],"names":[],"mappings":"AAAA,4CACE,GACE,SACF,CAEA,GACE,SACF,CACF,CAEA,2BAQE,mEAAwC,CACxC,8CAAwC,CASxC,yBAA2B,CAR3B,mEAAwC,CALxC,WAAY,CASZ,qBAAuB,CARvB,gBAAiB,CAJjB,4BAA6B,CAE7B,eAAgB,CAGhB,aAAc,CANd,iBAAkB,CAelB,uBAAyB,CAJzB,mBAAqB,CATrB,UAqLF,CApKE,iCACE,YACF,CAEA,8BAxBF,2BA0BI,6BA8JJ,CA7JE,CAEA,+DACE,4BACF,CAEA,uDACE,aACF,CAEA,yDACE,eACF,CAEA,yDACE,eACF,CAEA,0DACE,gBACF,CAEA,uDACE,YACF,CAEA,sDACE,YACF,CAEA,uDACE,YACF,CAEA,sDACE,YACF,CAEA,uDACE,YACF,CAEA,6GAEE,WACF,CAEA,4DACE,uBAAmB,CAAnB,kBACF,CAEA,2DACE,gBACF,CAEA,0DACE,gBACF,CAEA,2DACE,gBACF,CAEA,0DACE,gBACF,CAEA,2DACE,gBACF,CAEA,gEACE,2BAAuB,CAAvB,sBACF,CAEA,qDACE,WACF,CAEA,sDACE,WACF,CAEA,qDAEE,WACF,CAEA,sDAEE,WACF,CAEA,uDAEE,WACF,CAEA,oDACE,UACF,CAEA,yDACE,eACF,CAEA,0DACE,eACF,CAEA,yDACE,eACF,CAEA,0DACE,eACF,CAEA,2DACE,eACF,CAEA,4DACE,kBACF,CAEA,2DACE,iBACF,CAGE,mDADF,+DAUI,mBAAoB,CAHpB,YAAa,CAHb,MAAO,CAKP,QAAS,CADT,eAAgB,CAFhB,cAAe,CAMf,0CAA2C,CAV3C,cAAe,CACf,KAAM,CAEN,WAcJ,CALI,0BAdJ,+DAgBM,aAGN,CAFI,CACF,CAGF,0BAEE,4DACE,aACF,CACF,CAGF,8CACE,2BACE,wEACF,CACF","file":"Overlay-dbaa6b8c.css","sourcesContent":["@keyframes overlay-appear {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n.Overlay {\n position: absolute;\n max-width: calc(100vw - 2rem);\n width: auto;\n min-width: 192px;\n height: auto;\n max-height: 100vh;\n overflow: auto;\n background-color: var(--overlay-bgColor);\n border-radius: var(--borderRadius-large);\n box-shadow: var(--shadow-floating-small);\n /* stylelint-disable-next-line primer/spacing */\n top: var(--top, auto);\n /* stylelint-disable-next-line primer/spacing */\n left: var(--left, auto);\n /* stylelint-disable-next-line primer/spacing */\n right: var(--right, auto);\n /* stylelint-disable-next-line primer/spacing */\n bottom: var(--bottom, auto);\n\n &:focus {\n outline: none;\n }\n\n @media (forced-colors: active) {\n /* Support for Windows high contrast https://sarahmhigley.com/writing/whcm-quick-tips */\n outline: solid 1px transparent;\n }\n\n &:where([data-reflow-container='true']) {\n max-width: calc(100vw - 2rem);\n }\n\n &:where([data-overflow-auto]) {\n overflow: auto;\n }\n\n &:where([data-overflow-hidden]) {\n overflow: hidden;\n }\n\n &:where([data-overflow-scroll]) {\n overflow: scroll;\n }\n\n &:where([data-overflow-visible]) {\n overflow: visible;\n }\n\n &:where([data-height-xsmall]) {\n height: 192px;\n }\n\n &:where([data-height-small]) {\n height: 256px;\n }\n\n &:where([data-height-medium]) {\n height: 320px;\n }\n\n &:where([data-height-large]) {\n height: 432px;\n }\n\n &:where([data-height-xlarge]) {\n height: 600px;\n }\n\n &:where([data-height-auto]),\n &:where([data-height-initial]) {\n height: auto;\n }\n\n &:where([data-height-fit-content]) {\n height: fit-content;\n }\n\n &:where([data-max-height-xsmall]) {\n max-height: 192px;\n }\n\n &:where([data-max-height-small]) {\n max-height: 256px;\n }\n\n &:where([data-max-height-medium]) {\n max-height: 320px;\n }\n\n &:where([data-max-height-large]) {\n max-height: 432px;\n }\n\n &:where([data-max-height-xlarge]) {\n max-height: 600px;\n }\n\n &:where([data-max-height-fit-content]) {\n max-height: fit-content;\n }\n\n &:where([data-width-small]) {\n width: 256px;\n }\n\n &:where([data-width-medium]) {\n width: 320px;\n }\n\n &:where([data-width-large]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 480px;\n }\n\n &:where([data-width-xlarge]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 640px;\n }\n\n &:where([data-width-xxlarge]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 960px;\n }\n\n &:where([data-width-auto]) {\n width: auto;\n }\n\n &:where([data-max-width-small]) {\n max-width: 256px;\n }\n\n &:where([data-max-width-medium]) {\n max-width: 320px;\n }\n\n &:where([data-max-width-large]) {\n max-width: 480px;\n }\n\n &:where([data-max-width-xlarge]) {\n max-width: 640px;\n }\n\n &:where([data-max-width-xxlarge]) {\n max-width: 960px;\n }\n\n &:where([data-visibility-visible]) {\n visibility: visible;\n }\n\n &:where([data-visibility-hidden]) {\n visibility: hidden;\n }\n\n &:where([data-responsive='fullscreen']) {\n @media screen and (--viewportRange-narrow) {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n max-width: none;\n height: 100vh;\n max-height: none;\n margin: 0;\n border-radius: unset;\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: env(safe-area-inset-bottom);\n\n @supports (height: 100dvh) {\n /* fix for mobile safari (100vh clips the screen with the toolbar) */\n height: 100dvh;\n }\n }\n }\n\n @supports (height: 100dvh) {\n /* fix for mobile safari (100vh clips the screen with the toolbar) */\n &:where([data-variant='fullscreen']) {\n height: 100dvh;\n }\n }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .Overlay {\n animation: overlay-appear 200ms cubic-bezier(0.33, 1, 0.68, 1);\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/Overlay/Overlay.module.css.js"],"names":[],"mappings":"AAAA,4CACE,GACE,SACF,CAEA,GACE,SACF,CACF,CAEA,2BAQE,mEAAwC,CACxC,8CAAwC,CASxC,yBAA2B,CAR3B,mEAAwC,CALxC,WAAY,CASZ,qBAAuB,CARvB,gBAAiB,CAJjB,4BAA6B,CAE7B,eAAgB,CAGhB,aAAc,CANd,iBAAkB,CAelB,uBAAyB,CAJzB,mBAAqB,CATrB,UAqLF,CApKE,iCACE,YACF,CAEA,8BAxBF,2BA0BI,6BA8JJ,CA7JE,CAEA,+DACE,4BACF,CAEA,uDACE,aACF,CAEA,yDACE,eACF,CAEA,yDACE,eACF,CAEA,0DACE,gBACF,CAEA,uDACE,YACF,CAEA,sDACE,YACF,CAEA,uDACE,YACF,CAEA,sDACE,YACF,CAEA,uDACE,YACF,CAEA,6GAEE,WACF,CAEA,4DACE,uBAAmB,CAAnB,kBACF,CAEA,2DACE,4BACF,CAEA,0DACE,4BACF,CAEA,2DACE,4BACF,CAEA,0DACE,4BACF,CAEA,2DACE,4BACF,CAEA,gEACE,2BAAuB,CAAvB,sBACF,CAEA,qDACE,WACF,CAEA,sDACE,WACF,CAEA,qDAEE,WACF,CAEA,sDAEE,WACF,CAEA,uDAEE,WACF,CAEA,oDACE,UACF,CAEA,yDACE,eACF,CAEA,0DACE,eACF,CAEA,yDACE,eACF,CAEA,0DACE,eACF,CAEA,2DACE,eACF,CAEA,4DACE,kBACF,CAEA,2DACE,iBACF,CAGE,mDADF,+DAUI,mBAAoB,CAHpB,YAAa,CAHb,MAAO,CAKP,QAAS,CADT,eAAgB,CAFhB,cAAe,CAMf,0CAA2C,CAV3C,cAAe,CACf,KAAM,CAEN,WAcJ,CALI,0BAdJ,+DAgBM,aAGN,CAFI,CACF,CAGF,0BAEE,4DACE,aACF,CACF,CAGF,8CACE,2BACE,wEACF,CACF","file":"Overlay-cacb5b85.css","sourcesContent":["@keyframes overlay-appear {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n.Overlay {\n position: absolute;\n max-width: calc(100vw - 2rem);\n width: auto;\n min-width: 192px;\n height: auto;\n max-height: 100vh;\n overflow: auto;\n background-color: var(--overlay-bgColor);\n border-radius: var(--borderRadius-large);\n box-shadow: var(--shadow-floating-small);\n /* stylelint-disable-next-line primer/spacing */\n top: var(--top, auto);\n /* stylelint-disable-next-line primer/spacing */\n left: var(--left, auto);\n /* stylelint-disable-next-line primer/spacing */\n right: var(--right, auto);\n /* stylelint-disable-next-line primer/spacing */\n bottom: var(--bottom, auto);\n\n &:focus {\n outline: none;\n }\n\n @media (forced-colors: active) {\n /* Support for Windows high contrast https://sarahmhigley.com/writing/whcm-quick-tips */\n outline: solid 1px transparent;\n }\n\n &:where([data-reflow-container='true']) {\n max-width: calc(100vw - 2rem);\n }\n\n &:where([data-overflow-auto]) {\n overflow: auto;\n }\n\n &:where([data-overflow-hidden]) {\n overflow: hidden;\n }\n\n &:where([data-overflow-scroll]) {\n overflow: scroll;\n }\n\n &:where([data-overflow-visible]) {\n overflow: visible;\n }\n\n &:where([data-height-xsmall]) {\n height: 192px;\n }\n\n &:where([data-height-small]) {\n height: 256px;\n }\n\n &:where([data-height-medium]) {\n height: 320px;\n }\n\n &:where([data-height-large]) {\n height: 432px;\n }\n\n &:where([data-height-xlarge]) {\n height: 600px;\n }\n\n &:where([data-height-auto]),\n &:where([data-height-initial]) {\n height: auto;\n }\n\n &:where([data-height-fit-content]) {\n height: fit-content;\n }\n\n &:where([data-max-height-xsmall]) {\n max-height: min(192px, 100dvh);\n }\n\n &:where([data-max-height-small]) {\n max-height: min(256px, 100dvh);\n }\n\n &:where([data-max-height-medium]) {\n max-height: min(320px, 100dvh);\n }\n\n &:where([data-max-height-large]) {\n max-height: min(432px, 100dvh);\n }\n\n &:where([data-max-height-xlarge]) {\n max-height: min(600px, 100dvh);\n }\n\n &:where([data-max-height-fit-content]) {\n max-height: fit-content;\n }\n\n &:where([data-width-small]) {\n width: 256px;\n }\n\n &:where([data-width-medium]) {\n width: 320px;\n }\n\n &:where([data-width-large]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 480px;\n }\n\n &:where([data-width-xlarge]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 640px;\n }\n\n &:where([data-width-xxlarge]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 960px;\n }\n\n &:where([data-width-auto]) {\n width: auto;\n }\n\n &:where([data-max-width-small]) {\n max-width: 256px;\n }\n\n &:where([data-max-width-medium]) {\n max-width: 320px;\n }\n\n &:where([data-max-width-large]) {\n max-width: 480px;\n }\n\n &:where([data-max-width-xlarge]) {\n max-width: 640px;\n }\n\n &:where([data-max-width-xxlarge]) {\n max-width: 960px;\n }\n\n &:where([data-visibility-visible]) {\n visibility: visible;\n }\n\n &:where([data-visibility-hidden]) {\n visibility: hidden;\n }\n\n &:where([data-responsive='fullscreen']) {\n @media screen and (--viewportRange-narrow) {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n max-width: none;\n height: 100vh;\n max-height: none;\n margin: 0;\n border-radius: unset;\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: env(safe-area-inset-bottom);\n\n @supports (height: 100dvh) {\n /* fix for mobile safari (100vh clips the screen with the toolbar) */\n height: 100dvh;\n }\n }\n }\n\n @supports (height: 100dvh) {\n /* fix for mobile safari (100vh clips the screen with the toolbar) */\n &:where([data-variant='fullscreen']) {\n height: 100dvh;\n }\n }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .Overlay {\n animation: overlay-appear 200ms cubic-bezier(0.33, 1, 0.68, 1);\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import './Overlay-dbaa6b8c.css';
1
+ import './Overlay-cacb5b85.css';
2
2
 
3
3
  var classes = {"Overlay":"prc-Overlay-Overlay-jfs-T","overlay-appear":"prc-Overlay-overlay-appear-JpFey"};
4
4
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20260313194214",
4
+ "version": "0.0.0-20260313221724",
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-ActionMenu-ActionMenuContainer-Om1Qz{max-height:100vh}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-variant=fullscreen]){padding-top:var(--base-size-36,2.25rem)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-auto]){overflow:auto}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-hidden]){overflow:hidden}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-scroll]){overflow:scroll}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-visible]){overflow:visible}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-xsmall]){max-height:192px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-small]){max-height:256px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-medium]){max-height:320px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-large]){max-height:432px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-xlarge]){max-height:600px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-fit-content]){max-height:-moz-fit-content;max-height:fit-content}
2
- /*# sourceMappingURL=ActionMenu-53493541.css.map */
@@ -1,2 +0,0 @@
1
- @keyframes prc-Overlay-overlay-appear-JpFey{0%{opacity:0}to{opacity:1}}.prc-Overlay-Overlay-jfs-T{background-color:var(--overlay-bgColor,var(--color-canvas-overlay));border-radius:var(--borderRadius-large,.75rem);bottom:var(--bottom,auto);box-shadow:var(--shadow-floating-small,var(--color-overlay-shadow));height:auto;left:var(--left,auto);max-height:100vh;max-width:calc(100vw - 2rem);min-width:192px;overflow:auto;position:absolute;right:var(--right,auto);top:var(--top,auto);width:auto}.prc-Overlay-Overlay-jfs-T:focus{outline:none}@media (forced-colors:active){.prc-Overlay-Overlay-jfs-T{outline:1px solid transparent}}.prc-Overlay-Overlay-jfs-T:where([data-reflow-container=true]){max-width:calc(100vw - 2rem)}.prc-Overlay-Overlay-jfs-T:where([data-overflow-auto]){overflow:auto}.prc-Overlay-Overlay-jfs-T:where([data-overflow-hidden]){overflow:hidden}.prc-Overlay-Overlay-jfs-T:where([data-overflow-scroll]){overflow:scroll}.prc-Overlay-Overlay-jfs-T:where([data-overflow-visible]){overflow:visible}.prc-Overlay-Overlay-jfs-T:where([data-height-xsmall]){height:192px}.prc-Overlay-Overlay-jfs-T:where([data-height-small]){height:256px}.prc-Overlay-Overlay-jfs-T:where([data-height-medium]){height:320px}.prc-Overlay-Overlay-jfs-T:where([data-height-large]){height:432px}.prc-Overlay-Overlay-jfs-T:where([data-height-xlarge]){height:600px}.prc-Overlay-Overlay-jfs-T:where([data-height-auto]),.prc-Overlay-Overlay-jfs-T:where([data-height-initial]){height:auto}.prc-Overlay-Overlay-jfs-T:where([data-height-fit-content]){height:-moz-fit-content;height:fit-content}.prc-Overlay-Overlay-jfs-T:where([data-max-height-xsmall]){max-height:192px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-small]){max-height:256px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-medium]){max-height:320px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-large]){max-height:432px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-xlarge]){max-height:600px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-fit-content]){max-height:-moz-fit-content;max-height:fit-content}.prc-Overlay-Overlay-jfs-T:where([data-width-small]){width:256px}.prc-Overlay-Overlay-jfs-T:where([data-width-medium]){width:320px}.prc-Overlay-Overlay-jfs-T:where([data-width-large]){width:480px}.prc-Overlay-Overlay-jfs-T:where([data-width-xlarge]){width:640px}.prc-Overlay-Overlay-jfs-T:where([data-width-xxlarge]){width:960px}.prc-Overlay-Overlay-jfs-T:where([data-width-auto]){width:auto}.prc-Overlay-Overlay-jfs-T:where([data-max-width-small]){max-width:256px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-medium]){max-width:320px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-large]){max-width:480px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-xlarge]){max-width:640px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-xxlarge]){max-width:960px}.prc-Overlay-Overlay-jfs-T:where([data-visibility-visible]){visibility:visible}.prc-Overlay-Overlay-jfs-T:where([data-visibility-hidden]){visibility:hidden}@media screen and (max-width:calc(48rem - 0.02px)){.prc-Overlay-Overlay-jfs-T:where([data-responsive=fullscreen]){border-radius:unset;height:100vh;left:0;margin:0;max-height:none;max-width:none;padding-bottom:env(safe-area-inset-bottom);position:fixed;top:0;width:100vw}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-responsive=fullscreen]){height:100dvh}}}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-variant=fullscreen]){height:100dvh}}@media (prefers-reduced-motion:no-preference){.prc-Overlay-Overlay-jfs-T{animation:prc-Overlay-overlay-appear-JpFey .2s cubic-bezier(.33,1,.68,1)}}
2
- /*# sourceMappingURL=Overlay-dbaa6b8c.css.map */