@primer/react 0.0.0-20260616190455 → 0.0.0-20260617130554

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,26 +1,17 @@
1
1
  # @primer/react
2
2
 
3
- ## 0.0.0-20260616190455
3
+ ## 0.0.0-20260617130554
4
4
 
5
5
  ### Minor Changes
6
6
 
7
7
  - [#7867](https://github.com/primer/react/pull/7867) [`4ec4248`](https://github.com/primer/react/commit/4ec4248b9c1ae662b761385110f1fd7ad7480a2f) Thanks [@llastflowers](https://github.com/llastflowers)! - Add data-component attributes and associated tests for ActionMenu, AnchoredOverlay, Autocomplete, and NavList
8
8
 
9
- - [#7897](https://github.com/primer/react/pull/7897) [`dea9ea7`](https://github.com/primer/react/commit/dea9ea7908d3d9fe935c42311952fa5cbd7a17e4) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Add support for the `as` prop on `TreeView.Item`. This enables rendering the
10
- treeitem as a different element (e.g. `as="a"` for native anchors, or a custom
11
- router-link component) while preserving all existing keyboard, focus, and ARIA
12
- behavior.
13
-
14
- When `as` is omitted, the existing markup is unchanged: an `<li>` is rendered
15
- as the `role="treeitem"` element. When `as` is provided, the polymorphic
16
- element is rendered as the treeitem and is wrapped in an `<li role="none">`
17
- so the markup remains valid (a `<ul role="tree">` may only directly contain
18
- `<li>` elements).
19
-
20
9
  ### Patch Changes
21
10
 
22
11
  - [#7976](https://github.com/primer/react/pull/7976) [`1fac927`](https://github.com/primer/react/commit/1fac9270c497c1904acbb3eb60805630aab82a97) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - NavList: add a small gap between items for readability, including before expanded sub-navs, behind the `primer_react_action_list_item_gap` feature flag
23
12
 
13
+ - [#7935](https://github.com/primer/react/pull/7935) [`2765933`](https://github.com/primer/react/commit/276593387ec84f72aeba02a940b5e0a4d0a026a9) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - ConfirmationDialog: `useConfirm`/`confirm` now removes its host element from `document.body` after the dialog is closed, and uses a fresh host element per call, so the empty container no longer lingers or leaks into other components and tests
14
+
24
15
  - [#7929](https://github.com/primer/react/pull/7929) [`48c34ca`](https://github.com/primer/react/commit/48c34ca452a5449b0ba901783edb169b6a1e1882) Thanks [@joshblack](https://github.com/joshblack)! - FilteredActionList: Make body skeleton widths stable for server rendering
25
16
 
26
17
  - Fake entry to force publishing
@@ -14,7 +14,7 @@ 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: import("../utils/modern-polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & Pick<ActionListItemProps, "active" | "children" | "inactiveText" | "size" | "variant"> & LinkProps, "as"> & {
17
+ declare const LinkItemComponent: <As extends React.ElementType = "a">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & Pick<ActionListItemProps, "active" | "children" | "inactiveText" | "size" | "variant"> & LinkProps extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & Pick<ActionListItemProps, "active" | "children" | "inactiveText" | "size" | "variant"> & LinkProps ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
18
18
  as?: As | undefined;
19
19
  } & React.RefAttributes<unknown>) => React.ReactNode;
20
20
  export declare const LinkItem: WithSlotMarker<typeof LinkItemComponent>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- declare const List: <As extends React.ElementType = "ul">(props: import("../utils/modern-polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "ul" : As> & {
2
+ declare const List: <As extends React.ElementType = "ul">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "ul" : As> & {
3
3
  variant?: "inset" | "horizontal-inset" | "full";
4
4
  selectionVariant?: "single" | "radio" | "multiple";
5
5
  showDividers?: boolean;
@@ -8,7 +8,16 @@ declare const List: <As extends React.ElementType = "ul">(props: import("../util
8
8
  className?: string;
9
9
  } & {
10
10
  children?: React.ReactNode | undefined;
11
- }, "as"> & {
11
+ } extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "ul" : As> & {
12
+ variant?: "inset" | "horizontal-inset" | "full";
13
+ selectionVariant?: "single" | "radio" | "multiple";
14
+ showDividers?: boolean;
15
+ role?: import("../utils/types").AriaRole;
16
+ disableFocusZone?: boolean;
17
+ className?: string;
18
+ } & {
19
+ children?: React.ReactNode | undefined;
20
+ } ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
12
21
  as?: As | undefined;
13
22
  } & React.RefAttributes<unknown>) => React.ReactNode;
14
23
  export { List };
@@ -1 +1 @@
1
- {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../src/ActionList/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAA;AAwHrC,QAAA,MAAM,IAAI,GA1Ga,EAAE,SAAS,KAAK,CAAC,WAAW;;;;;;;;;;;oDA0GR,CAAA;AAI3C,OAAO,EAAC,IAAI,EAAC,CAAA"}
1
+ {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../src/ActionList/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAA;AAwHrC,QAAA,MAAM,IAAI,GA1Ga,EAAE,SAAS,KAAK,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;oDA0GR,CAAA;AAI3C,OAAO,EAAC,IAAI,EAAC,CAAA"}
@@ -11,7 +11,7 @@ export type { ActionListGroupHeadingTrailingActionProps } from './GroupHeadingTr
11
11
  /**
12
12
  * Collection of list-related components.
13
13
  */
14
- export declare const ActionList: (<As extends React.ElementType = "ul">(props: import("../utils/modern-polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "ul" : As> & {
14
+ export declare const ActionList: (<As extends React.ElementType = "ul">(props: (import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "ul" : As> & {
15
15
  variant?: "inset" | "horizontal-inset" | "full";
16
16
  selectionVariant?: "single" | "radio" | "multiple";
17
17
  showDividers?: boolean;
@@ -20,7 +20,16 @@ export declare const ActionList: (<As extends React.ElementType = "ul">(props: i
20
20
  className?: string;
21
21
  } & {
22
22
  children?: import("react").ReactNode | undefined;
23
- }, "as"> & {
23
+ } extends infer T ? T extends import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "ul" : As> & {
24
+ variant?: "inset" | "horizontal-inset" | "full";
25
+ selectionVariant?: "single" | "radio" | "multiple";
26
+ showDividers?: boolean;
27
+ role?: import("../utils/types").AriaRole;
28
+ disableFocusZone?: boolean;
29
+ className?: string;
30
+ } & {
31
+ children?: import("react").ReactNode | undefined;
32
+ } ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
24
33
  as?: As | undefined;
25
34
  } & import("react").RefAttributes<unknown>) => React.ReactNode) & {
26
35
  /** Context for the `ActionList` container. */
@@ -87,7 +96,18 @@ export declare const ActionList: (<As extends React.ElementType = "ul">(props: i
87
96
  __SLOT__: symbol;
88
97
  };
89
98
  /** A `Item` that renders a full-size anchor inside ListItem */
90
- LinkItem: import("..").WithSlotMarker<(<As extends React.ElementType = "a">(props: import("../utils/modern-polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "a" : As> & Pick<import("./shared").ActionListItemProps, "active" | "children" | "inactiveText" | "size" | "variant"> & {
99
+ LinkItem: import("..").WithSlotMarker<(<As extends React.ElementType = "a">(props: (import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "a" : As> & Pick<import("./shared").ActionListItemProps, "active" | "children" | "inactiveText" | "size" | "variant"> & {
100
+ download?: string;
101
+ href?: string;
102
+ hrefLang?: string;
103
+ media?: string;
104
+ ping?: string;
105
+ rel?: string;
106
+ target?: string;
107
+ type?: string;
108
+ referrerPolicy?: React.AnchorHTMLAttributes<HTMLAnchorElement>["referrerPolicy"];
109
+ className?: string;
110
+ } extends infer T ? T extends import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "a" : As> & Pick<import("./shared").ActionListItemProps, "active" | "children" | "inactiveText" | "size" | "variant"> & {
91
111
  download?: string;
92
112
  href?: string;
93
113
  hrefLang?: string;
@@ -98,7 +118,7 @@ export declare const ActionList: (<As extends React.ElementType = "ul">(props: i
98
118
  type?: string;
99
119
  referrerPolicy?: React.AnchorHTMLAttributes<HTMLAnchorElement>["referrerPolicy"];
100
120
  className?: string;
101
- }, "as"> & {
121
+ } ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
102
122
  as?: As | undefined;
103
123
  } & import("react").RefAttributes<unknown>) => React.ReactNode)>;
104
124
  /** Visually separates `Item`s or `Group`s in an `ActionList`. */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ActionList/index.ts"],"names":[],"mappings":"AAYA,YAAY,EAAC,eAAe,EAAC,MAAM,UAAU,CAAA;AAC7C,YAAY,EAAC,oBAAoB,EAAE,2BAA2B,EAAC,MAAM,SAAS,CAAA;AAC9E,YAAY,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAA;AACjD,YAAY,EAAC,uBAAuB,EAAC,MAAM,YAAY,CAAA;AACvD,YAAY,EAAC,sBAAsB,EAAC,MAAM,WAAW,CAAA;AACrD,YAAY,EAAC,0BAA0B,EAAC,MAAM,eAAe,CAAA;AAC7D,YAAY,EAAC,4BAA4B,EAAE,6BAA6B,EAAC,MAAM,WAAW,CAAA;AAC1F,YAAY,EAAC,sBAAsB,EAAC,MAAM,WAAW,CAAA;AACrD,YAAY,EAAC,6BAA6B,EAAC,MAAM,kBAAkB,CAAA;AACnE,YAAY,EAAC,yCAAyC,EAAC,MAAM,8BAA8B,CAAA;AAE3F;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;IACrB,8CAA8C;;;;;;;;;;;IAE9C,mDAAmD;;IAGnD,yCAAyC;;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AEvB,CAAA"}
@@ -3,9 +3,11 @@ import { type PolymorphicProps } from '../utils/modern-polymorphic';
3
3
  export type BranchNameProps<As extends React.ElementType> = PolymorphicProps<As, 'a', {
4
4
  className?: string;
5
5
  }>;
6
- declare const _default: <As extends React.ElementType>(props: import("../utils/modern-polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
6
+ declare const _default: <As extends React.ElementType>(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
7
7
  className?: string;
8
- }, "as"> & {
8
+ } extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
9
+ className?: string;
10
+ } ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
9
11
  as?: As | undefined;
10
12
  } & React.RefAttributes<any>) => React.ReactNode;
11
13
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"BranchName.d.ts","sourceRoot":"","sources":["../../src/BranchName/BranchName.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,EAAkB,KAAK,gBAAgB,EAAC,MAAM,6BAA6B,CAAA;AAElF,MAAM,MAAM,eAAe,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,IAAI,gBAAgB,CAC1E,EAAE,EACF,GAAG,EACH;IACE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CACF,CAAA;yBAGmB,EAAE,SAAS,KAAK,CAAC,WAAW;gBALhC,MAAM;;;;AAgBtB,wBAA0C"}
1
+ {"version":3,"file":"BranchName.d.ts","sourceRoot":"","sources":["../../src/BranchName/BranchName.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,EAAkB,KAAK,gBAAgB,EAAC,MAAM,6BAA6B,CAAA;AAElF,MAAM,MAAM,eAAe,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,IAAI,gBAAgB,CAC1E,EAAE,EACF,GAAG,EACH;IACE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CACF,CAAA;yBAGmB,EAAE,SAAS,KAAK,CAAC,WAAW;gBALhC,MAAM;;gBAAN,MAAM;;;;AAgBtB,wBAA0C"}
@@ -34,10 +34,13 @@ type StyledBreadcrumbsItemProps<As extends React.ElementType = 'a'> = Polymorphi
34
34
  }>;
35
35
  export type BreadcrumbsItemProps<As extends React.ElementType = 'a'> = StyledBreadcrumbsItemProps<As>;
36
36
  declare const _default: typeof Breadcrumbs & {
37
- Item: (<As extends React.ElementType = "a">(props: import("../utils/modern-polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
37
+ Item: (<As extends React.ElementType = "a">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
38
38
  to?: To;
39
39
  selected?: boolean;
40
- }, "as"> & {
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) & {
41
44
  as?: As | undefined;
42
45
  } & React.RefAttributes<any>) => React.ReactNode) & {
43
46
  displayName: string;
@@ -48,10 +51,13 @@ export default _default;
48
51
  * @deprecated Use the `Breadcrumbs` component instead (i.e. `<Breadcrumb>` → `<Breadcrumbs>`)
49
52
  */
50
53
  export declare const Breadcrumb: typeof Breadcrumbs & {
51
- Item: <As extends React.ElementType = "a">(props: import("../utils/modern-polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
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> & {
52
58
  to?: To;
53
59
  selected?: boolean;
54
- }, "as"> & {
60
+ } ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
55
61
  as?: As | undefined;
56
62
  } & React.RefAttributes<any>) => React.ReactNode;
57
63
  };
@@ -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,MAAM,GAAG,gBAAgB,CAAA;IAC7C;;;;OAIG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B,CAAC,CAAA;AA8GF,iBAAS,WAAW,CAAC,EAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAiB,EAAE,OAAkB,EAAC,EAAE,gBAAgB,qBAwMzG;kBAxMQ,WAAW;;;AAoNpB,KAAK,0BAA0B,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI,gBAAgB,CACpF,EAAE,EACF,GAAG,EACH;IACE,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CACF,CAAA;AAuBD,MAAM,MAAM,oBAAoB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI,0BAA0B,CAAC,EAAE,CAAC,CAAA;;YApBlG,EAAE,SAAS,KAAK,CAAC,WAAW;aANtB,EAAE;mBACI,OAAO;;;;;;;AA4BtB,wBAAiF;AAEjF;;GAEG;AACH,eAAO,MAAM,UAAU;WA5BpB,EAAE,SA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,GAAG,GAAG,IAAI,0BAA0B,CAAC,EAAE,CAAC,CAAA;;YApBlG,EAAE,SAAS,KAAK,CAAC,WAAW;aANtB,EAAE;mBACI,OAAO;;aADb,EAAE;mBACI,OAAO;;;;;;;AA4BtB,wBAAiF;AAEjF;;GAEG;AACH,eAAO,MAAM,UAAU;WA5BpB,EAAE,SAAS,KAAK,CAAC,WAAW;aANtB,EAAE;mBACI,OAAO;;aADb,EAAE;mBACI,OAAO;;;;CAiCuD,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"}
@@ -66,7 +66,7 @@ type MetadataProps = React.ComponentPropsWithoutRef<'div'> & {
66
66
  */
67
67
  children: React.ReactNode;
68
68
  };
69
- declare const CardImpl: <As extends CardAs>(props: import("../utils/modern-polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "div" : As> & {
69
+ declare const CardImpl: <As extends CardAs>(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "div" : As> & {
70
70
  /** Optional className for the root element. */
71
71
  className?: string;
72
72
  /** Internal padding. @default 'normal' */
@@ -84,7 +84,25 @@ declare const CardImpl: <As extends CardAs>(props: import("../utils/modern-polym
84
84
  * `Card.Description`, `Card.Metadata`) or custom content.
85
85
  */
86
86
  children: React.ReactNode;
87
- }, "as"> & {
87
+ } extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "div" : As> & {
88
+ /** Optional className for the root element. */
89
+ className?: string;
90
+ /** Internal padding. @default 'normal' */
91
+ padding?: "none" | "condensed" | "normal";
92
+ /** Border radius. @default 'large' */
93
+ borderRadius?: "medium" | "large";
94
+ /**
95
+ * Layout of the card. `compact` uses tighter spacing, removes the icon
96
+ * background container, and renders a smaller title.
97
+ * @default 'default'
98
+ */
99
+ layout?: "default" | "compact";
100
+ /**
101
+ * Card contents. Provide either `Card.*` subcomponents (e.g. `Card.Heading`,
102
+ * `Card.Description`, `Card.Metadata`) or custom content.
103
+ */
104
+ children: React.ReactNode;
105
+ } ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
88
106
  as?: As | undefined;
89
107
  } & React.RefAttributes<any>) => React.ReactNode;
90
108
  declare function CardIcon({ icon: IconComponent, 'aria-label': ariaLabel, className }: IconProps): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../src/Card/Card.tsx"],"names":[],"mappings":"AACA,OAAO,KAAiE,MAAM,OAAO,CAAA;AAErF,OAAO,EAAkB,KAAK,gBAAgB,EAAC,MAAM,6BAA6B,CAAA;AAMlF,KAAK,MAAM,GAAG,KAAK,GAAG,SAAS,CAAA;AAE/B,MAAM,MAAM,SAAS,CAAC,EAAE,SAAS,MAAM,GAAG,KAAK,IAAI,gBAAgB,CACjE,EAAE,EACF,KAAK,EACL;IACE,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAA;IAEzC,sCAAsC;IACtC,YAAY,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;IAEjC;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IAE9B;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CACF,CAAA;AAED,KAAK,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAEpD,KAAK,YAAY,GAAG,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,GAAG;IACzD;;OAEG;IACH,EAAE,CAAC,EAAE,YAAY,CAAA;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAAA;AAED,K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I,oBAAoB,EAAC,CAAA;AACtD,YAAY,EAAC,SAAS,IAAI,aAAa,EAAC,CAAA;AACxC,YAAY,EAAC,UAAU,IAAI,cAAc,EAAC,CAAA;AAC1C,YAAY,EAAC,WAAW,IAAI,eAAe,EAAC,CAAA;AAC5C,YAAY,EAAC,aAAa,IAAI,iBAAiB,EAAC,CAAA"}
@@ -1,12 +1,18 @@
1
1
  import { CardIcon, CardImage, CardAction } from './Card';
2
2
  import type { CardProps, CardIconProps, CardImageProps, CardHeadingProps, CardDescriptionProps, CardActionProps, CardMetadataProps } from './Card';
3
- declare const Card: (<As extends "div" | "section">(props: import("../utils/modern-polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "div" : As> & {
3
+ declare const Card: (<As extends "div" | "section">(props: (import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "div" : As> & {
4
4
  className?: string;
5
5
  padding?: "none" | "condensed" | "normal";
6
6
  borderRadius?: "medium" | "large";
7
7
  layout?: "default" | "compact";
8
8
  children: React.ReactNode;
9
- }, "as"> & {
9
+ } extends infer T ? T extends import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "div" : As> & {
10
+ className?: string;
11
+ padding?: "none" | "condensed" | "normal";
12
+ borderRadius?: "medium" | "large";
13
+ layout?: "default" | "compact";
14
+ children: React.ReactNode;
15
+ } ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
10
16
  as?: As | undefined;
11
17
  } & import("react").RefAttributes<any>) => React.ReactNode) & {
12
18
  Icon: typeof CardIcon;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,QAAQ,EAAE,SAAS,EAAgC,UAAU,EAAe,MAAM,QAAQ,CAAA;AAC5G,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EAClB,MAAM,QAAQ,CAAA;AAEf,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;CAOR,CAAA;AAEF,OAAO,EAAC,IAAI,EAAC,CAAA;AACb,YAAY,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,GAClB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,QAAQ,EAAE,SAAS,EAAgC,UAAU,EAAe,MAAM,QAAQ,CAAA;AAC5G,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EAClB,MAAM,QAAQ,CAAA;AAEf,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOR,CAAA;AAEF,OAAO,EAAC,IAAI,EAAC,CAAA;AACb,YAAY,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,GAClB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useConfirm.d.ts","sourceRoot":"","sources":["../../src/ConfirmationDialog/useConfirm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAGxC,OAAO,EAAqB,KAAK,uBAAuB,EAAC,MAAM,sBAAsB,CAAA;AAIrF,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,uBAAuB,EAAE,SAAS,CAAC,GAAG;IAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAA;CAAC,CAAA;AA0BlG;;;;GAIG;AACH,wBAAgB,UAAU,cACa,cAAc,sBAIpD"}
1
+ {"version":3,"file":"useConfirm.d.ts","sourceRoot":"","sources":["../../src/ConfirmationDialog/useConfirm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAGxC,OAAO,EAAqB,KAAK,uBAAuB,EAAC,MAAM,sBAAsB,CAAA;AAErF,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,uBAAuB,EAAE,SAAS,CAAC,GAAG;IAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAA;CAAC,CAAA;AAuBlG;;;;GAIG;AACH,wBAAgB,UAAU,cACa,cAAc,sBAIpD"}
@@ -3,23 +3,19 @@ import { createRoot } from 'react-dom/client';
3
3
  import BaseStyles from '../BaseStyles.js';
4
4
  import { ConfirmationDialog } from './ConfirmationDialog.js';
5
5
 
6
- let hostElement = null;
7
6
  async function confirm(options) {
8
7
  const {
9
8
  content,
10
9
  ...confirmationDialogProps
11
10
  } = options;
12
11
  return new Promise(resolve => {
13
- hostElement ||= document.createElement('div');
14
- if (!hostElement.isConnected) document.body.append(hostElement);
12
+ const hostElement = document.createElement('div');
13
+ document.body.append(hostElement);
15
14
  const root = createRoot(hostElement);
16
15
  const onClose = gesture => {
17
16
  root.unmount();
18
- if (gesture === 'confirm') {
19
- resolve(true);
20
- } else {
21
- resolve(false);
22
- }
17
+ hostElement.remove();
18
+ resolve(gesture === 'confirm');
23
19
  };
24
20
  root.render(/*#__PURE__*/React.createElement(BaseStyles, null, /*#__PURE__*/React.createElement(ConfirmationDialog, {
25
21
  ...confirmationDialogProps,
@@ -9,7 +9,7 @@ type StyledLinkProps<As extends React.ElementType = 'a'> = {
9
9
  inline?: boolean;
10
10
  };
11
11
  export declare const UnwrappedLink: <As extends React.ElementType = "a">(props: PolymorphicProps<As, "a", StyledLinkProps>, ref: ForwardedRef<unknown>) => React.JSX.Element;
12
- declare const Link: (<As extends React.ElementType = "a">(props: import("../utils/modern-polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & StyledLinkProps<"a">, "as"> & {
12
+ declare const Link: (<As extends React.ElementType = "a">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & StyledLinkProps<"a"> extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & StyledLinkProps<"a"> ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
13
13
  as?: As | undefined;
14
14
  } & React.RefAttributes<unknown>) => React.ReactNode) & {
15
15
  displayName: string;
@@ -41,13 +41,19 @@ export declare const GroupExpand: React.ForwardRefExoticComponent<NavListGroupEx
41
41
  export type NavListGroupHeadingProps = ActionListGroupHeadingProps;
42
42
  export declare const NavList: React.ForwardRefExoticComponent<Omit<NavListProps, "ref"> & React.RefAttributes<HTMLElement>> & {
43
43
  Description: import("..").FCWithSlotMarker<React.PropsWithChildren<import("..").ActionListDescriptionProps>>;
44
- Item: (<As extends React.ElementType = "a">(props: import("../utils/modern-polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
44
+ Item: (<As extends React.ElementType = "a">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
45
45
  children: React.ReactNode;
46
46
  defaultOpen?: boolean;
47
47
  href?: string;
48
48
  'aria-current'?: "page" | "step" | "location" | "date" | "time" | "true" | "false" | boolean;
49
49
  inactiveText?: string;
50
- }, "as"> & {
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) & {
51
57
  as?: As | undefined;
52
58
  } & React.RefAttributes<unknown>) => React.ReactNode) & {
53
59
  displayName: string;
@@ -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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AAA;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;;YA7WjB,EAAE,SAAS,KAAK,CAAC,WAAW;kBATjB,KAAK,CAAC,SAAS;sBACX,OAAO;eACd,MAAM;yBACI,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO;uBAC7E,MAAM;;kBAJX,KAAK,CAAC,SAAS;sBACX,OAAO;eACd,MAAM;yBACI,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO;uBAC7E,MAAM;;;;;;;;;;;;;;CA6XvB,CAAA"}
@@ -6,12 +6,17 @@ export type TextProps<As extends React.ElementType = 'span'> = PolymorphicProps<
6
6
  whiteSpace?: 'pre' | 'normal' | 'nowrap' | 'pre-wrap' | 'pre-line';
7
7
  className?: string;
8
8
  }>;
9
- declare const _default: <As extends React.ElementType>(props: import("../utils/modern-polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "span" : As> & {
9
+ declare const _default: <As extends React.ElementType>(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "span" : As> & {
10
10
  size?: "large" | "medium" | "small";
11
11
  weight?: "light" | "normal" | "medium" | "semibold";
12
12
  whiteSpace?: "pre" | "normal" | "nowrap" | "pre-wrap" | "pre-line";
13
13
  className?: string;
14
- }, "as"> & {
14
+ } extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "span" : As> & {
15
+ size?: "large" | "medium" | "small";
16
+ weight?: "light" | "normal" | "medium" | "semibold";
17
+ whiteSpace?: "pre" | "normal" | "nowrap" | "pre-wrap" | "pre-line";
18
+ className?: string;
19
+ } ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
15
20
  as?: As | undefined;
16
21
  } & React.RefAttributes<any>) => React.ReactNode;
17
22
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/Text/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAkB,KAAK,gBAAgB,EAAC,MAAM,6BAA6B,CAAA;AAElF,MAAM,MAAM,SAAS,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,MAAM,IAAI,gBAAgB,CAC7E,EAAE,EACF,MAAM,EACN;IACE,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAA;IACnD,UAAU,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAA;IAClE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CACF,CAAA;yBAGa,EAAE,SAAS,KAAK,CAAC,WAAW;WAR/B,OAAO,GAAG,QAAQ,GAAG,OAAO;aAC1B,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU;iBACtC,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU;gBACtD,MAAM;;;;AAsBtB,wBAAoC"}
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/Text/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAkB,KAAK,gBAAgB,EAAC,MAAM,6BAA6B,CAAA;AAElF,MAAM,MAAM,SAAS,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,MAAM,IAAI,gBAAgB,CAC7E,EAAE,EACF,MAAM,EACN;IACE,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAA;IACnD,UAAU,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAA;IAClE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CACF,CAAA;yBAGa,EAAE,SAAS,KAAK,CAAC,WAAW;WAR/B,OAAO,GAAG,QAAQ,GAAG,OAAO;aAC1B,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU;iBACtC,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU;gBACtD,MAAM;;WAHX,OAAO,GAAG,QAAQ,GAAG,OAAO;aAC1B,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU;iBACtC,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU;gBACtD,MAAM;;;;AAsBtB,wBAAoC"}
@@ -1,7 +1,6 @@
1
1
  import { type Icon } from '@primer/octicons-react';
2
2
  import React from 'react';
3
3
  import type { FCWithSlotMarker } from '../utils/types';
4
- import { type DistributiveOmit } from '../utils/modern-polymorphic';
5
4
  export type TreeViewProps = {
6
5
  'aria-label'?: React.AriaAttributes['aria-label'];
7
6
  'aria-labelledby'?: React.AriaAttributes['aria-labelledby'];
@@ -18,7 +17,7 @@ export type TreeViewSecondaryActions = {
18
17
  count?: number | string;
19
18
  className?: string;
20
19
  };
21
- type TreeViewItemBaseProps = {
20
+ export type TreeViewItemProps = {
22
21
  'aria-label'?: React.AriaAttributes['aria-label'];
23
22
  'aria-labelledby'?: React.AriaAttributes['aria-labelledby'];
24
23
  id: string;
@@ -32,9 +31,6 @@ type TreeViewItemBaseProps = {
32
31
  className?: string;
33
32
  secondaryActions?: TreeViewSecondaryActions[];
34
33
  };
35
- export type TreeViewItemProps<As extends React.ElementType = 'li'> = DistributiveOmit<React.ComponentPropsWithoutRef<React.ElementType extends As ? 'li' : As>, 'as' | 'onSelect'> & TreeViewItemBaseProps & {
36
- as?: As;
37
- };
38
34
  export type SubTreeState = 'initial' | 'loading' | 'done' | 'error';
39
35
  export type TreeViewSubTreeProps = {
40
36
  children?: React.ReactNode;
@@ -66,11 +62,7 @@ export type TreeViewErrorDialogProps = {
66
62
  onDismiss?: () => void;
67
63
  };
68
64
  export declare const TreeView: React.FC<TreeViewProps> & {
69
- Item: (<As extends React.ElementType = "li">(props: DistributiveOmit<React.PropsWithoutRef<React.ComponentProps<React.ElementType<any, keyof React.JSX.IntrinsicElements> extends As ? "li" : As>>, "as" | "onSelect"> & TreeViewItemBaseProps & {
70
- as?: As | undefined;
71
- } & React.RefAttributes<unknown>) => React.ReactNode) & {
72
- displayName: string;
73
- };
65
+ Item: React.ForwardRefExoticComponent<TreeViewItemProps & React.RefAttributes<HTMLElement>>;
74
66
  SubTree: FCWithSlotMarker<TreeViewSubTreeProps>;
75
67
  LeadingAction: React.FC<TreeViewVisualProps>;
76
68
  LeadingVisual: React.FC<TreeViewVisualProps>;
@@ -78,5 +70,4 @@ export declare const TreeView: React.FC<TreeViewProps> & {
78
70
  DirectoryIcon: () => React.JSX.Element;
79
71
  ErrorDialog: React.FC<TreeViewErrorDialogProps>;
80
72
  };
81
- export {};
82
73
  //# sourceMappingURL=TreeView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TreeView.d.ts","sourceRoot":"","sources":["../../src/TreeView/TreeView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,IAAI,EACV,MAAM,wBAAwB,CAAA;AAE/B,OAAO,KAA+B,MAA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AA;IACjC,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AA0ED,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,EAAE,wBAAwB,EAAE,CAAA;IACjC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAwED,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB,CAAA;AA4CD,eAAO,MAAM,QAAQ;;;;;;;;CAQnB,CAAA"}
@@ -17,7 +17,6 @@ import { ButtonComponent } from '../Button/Button.js';
17
17
  import { ActionList } from '../ActionList/index.js';
18
18
  import { usePlatform } from '../KeybindingHint/platform.js';
19
19
  import { isSlot } from '../utils/is-slot.js';
20
- import { fixedForwardRef } from '../utils/modern-polymorphic.js';
21
20
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
22
21
  import { getAccessibleKeybindingHintString } from '../KeybindingHint/utils.js';
23
22
  import { AriaStatus } from '../live-region/AriaStatus.js';
@@ -266,17 +265,7 @@ Root.displayName = 'TreeView';
266
265
  // ----------------------------------------------------------------------------
267
266
  // TreeView.Item
268
267
 
269
- // We build this type manually (instead of using `PolymorphicProps`) so we can omit
270
- // `ref` and `onSelect` from the underlying element's props:
271
- // - `ref` is provided solely by `fixedForwardRef` (typed as `Ref<unknown>`), preserving
272
- // backward compatibility with consumers that pass `Ref<HTMLElement>` rather than the
273
- // intrinsic element's ref type (e.g. `Ref<HTMLLIElement>` for the default `<li>`).
274
- // - Our custom `onSelect` (typed against `HTMLElement`) replaces the native
275
- // `ReactEventHandler<HTMLLIElement>` that would otherwise be intersected in
276
- // and conflict with existing consumers.
277
- // `DistributiveOmit` keeps the omit distributing over `as` union types.
278
-
279
- const ItemImpl = fixedForwardRef(({
268
+ const Item = /*#__PURE__*/React.forwardRef(({
280
269
  id: itemId,
281
270
  containIntrinsicSize,
282
271
  current: isCurrentItem = false,
@@ -288,19 +277,8 @@ const ItemImpl = fixedForwardRef(({
288
277
  className,
289
278
  'aria-label': ariaLabel,
290
279
  'aria-labelledby': ariaLabelledby,
291
- secondaryActions,
292
- as: Component,
293
- ...restProps
280
+ secondaryActions
294
281
  }, ref) => {
295
- // When `as` is provided (and resolves to something other than the default
296
- // `'li'`), we render the polymorphic element as the `role="treeitem"` and
297
- // wrap it in an `<li role="none">` so the markup remains valid (a
298
- // `<ul role="tree">` may only directly contain `<li>` elements). When `as`
299
- // is omitted, or explicitly set to `'li'`, we render an `<li>` directly as
300
- // the treeitem to preserve the historical DOM shape and ref typing for
301
- // existing consumers and to avoid nesting `<li>` inside `<li>`.
302
- const ItemElement = Component !== null && Component !== void 0 ? Component : 'li';
303
- const isPolymorphic = Component !== undefined && Component !== 'li';
304
282
  const [slots, rest] = useSlots(children, {
305
283
  leadingAction: LeadingAction,
306
284
  leadingVisual: LeadingVisual,
@@ -342,7 +320,9 @@ const ItemImpl = fixedForwardRef(({
342
320
  const platform = usePlatform();
343
321
 
344
322
  // Set the expanded state and cache it
345
- const setIsExpandedWithCache = React.useCallback(newIsExpanded => {
323
+ const setIsExpandedWithCache = React.useCallback(
324
+ // eslint-disable-next-line react-hooks/preserve-manual-memoization
325
+ newIsExpanded => {
346
326
  var _expandedStateCache$c3;
347
327
  setIsExpanded(newIsExpanded);
348
328
  (_expandedStateCache$c3 = expandedStateCache.current) === null || _expandedStateCache$c3 === void 0 ? void 0 : _expandedStateCache$c3.set(itemId, newIsExpanded);
@@ -365,34 +345,34 @@ const ItemImpl = fixedForwardRef(({
365
345
  action();
366
346
  }
367
347
  }, [secondaryActions]);
368
- const handleKeyDown = React.useCallback(event => {
369
- switch (event.key) {
348
+ const handleKeyDown = React.useCallback(event_0 => {
349
+ switch (event_0.key) {
370
350
  case 'Enter':
371
351
  case ' ':
372
352
  if (onSelect) {
373
- onSelect(event);
353
+ onSelect(event_0);
374
354
  } else {
375
- toggle(event);
355
+ toggle(event_0);
376
356
  }
377
- event.stopPropagation();
357
+ event_0.stopPropagation();
378
358
  break;
379
359
  case 'ArrowRight':
380
360
  // Ignore if modifier keys are pressed
381
- if (event.altKey || event.metaKey) return;
382
- event.preventDefault();
383
- event.stopPropagation();
361
+ if (event_0.altKey || event_0.metaKey) return;
362
+ event_0.preventDefault();
363
+ event_0.stopPropagation();
384
364
  setIsExpandedWithCache(true);
385
365
  break;
386
366
  case 'ArrowLeft':
387
367
  // Ignore if modifier keys are pressed
388
- if (event.altKey || event.metaKey) return;
389
- event.preventDefault();
390
- event.stopPropagation();
368
+ if (event_0.altKey || event_0.metaKey) return;
369
+ event_0.preventDefault();
370
+ event_0.stopPropagation();
391
371
  setIsExpandedWithCache(false);
392
372
  break;
393
373
  case 'U':
394
374
  case 'u':
395
- if (!(event.shiftKey && (event.metaKey || event.ctrlKey))) return;
375
+ if (!(event_0.shiftKey && (event_0.metaKey || event_0.ctrlKey))) return;
396
376
  activateActionsDialog();
397
377
  break;
398
378
  }
@@ -400,106 +380,6 @@ const ItemImpl = fixedForwardRef(({
400
380
  const ariaDescribedByIds = [slots.leadingVisual ? leadingVisualId : null, slots.trailingVisual ? trailingVisualId : null].filter(Boolean);
401
381
  const shortcut = `Shift+${platform === 'apple' ? 'Meta' : 'Control'}+U`;
402
382
  const trailingActionShortcutText = `Press (${getAccessibleKeybindingHintString(shortcut, platform)}) for more actions.`;
403
- const itemElement =
404
- /*#__PURE__*/
405
- // @ts-ignore TypeScript can't infer that the `ref` here is compatible
406
- // with every possible polymorphic `ItemElement` (it's typed as
407
- // `Ref<unknown>` by `fixedForwardRef`), so we cast at the boundary.
408
- jsxs(ItemElement, {
409
- ...restProps,
410
- className: clsx('PRIVATE_TreeView-item', className, classes.TreeViewItem),
411
- ref: ref,
412
- tabIndex: 0,
413
- id: itemId,
414
- role: "treeitem",
415
- "aria-label": secondaryActions ? ariaLabel ? `${ariaLabel}. ${trailingActionShortcutText}` : undefined : ariaLabel,
416
- "aria-labelledby": ariaLabel ? undefined : `${ariaLabelledby || labelId} ${secondaryActions ? trailingActionId : ''}`.trim(),
417
- "aria-describedby": ariaDescribedByIds.length ? ariaDescribedByIds.join(' ') : undefined,
418
- "aria-level": level,
419
- "aria-expanded": isSubTreeEmpty && (!isExpanded || !hasSubTree) || expanded === null ? undefined : isExpanded,
420
- "aria-current": isCurrentItem ? 'true' : undefined,
421
- "aria-selected": isFocused ? 'true' : 'false',
422
- "data-has-leading-action": slots.leadingAction ? true : undefined,
423
- "data-loading": isLoadingPlaceholder ? true : undefined,
424
- onKeyDown: handleKeyDown,
425
- onFocus: event => {
426
- // Defer scroll to the next animation frame so that rapid keyboard
427
- // navigation (held key) coalesces into a single reflow per frame
428
- scrollElementIntoView(event.currentTarget.firstElementChild);
429
-
430
- // Set the focused state
431
- setIsFocused(true);
432
-
433
- // Prevent focus event from bubbling up to parent items
434
- event.stopPropagation();
435
- },
436
- onBlur: () => setIsFocused(false),
437
- onClick: event => {
438
- if (onSelect) {
439
- onSelect(event);
440
- } else {
441
- toggle(event);
442
- }
443
- event.stopPropagation();
444
- },
445
- onAuxClick: event => {
446
- if (onSelect && event.button === 1) {
447
- onSelect(event);
448
- }
449
- event.stopPropagation();
450
- },
451
- children: [/*#__PURE__*/jsxs("div", {
452
- className: clsx('PRIVATE_TreeView-item-container', classes.TreeViewItemContainer),
453
- style: {
454
- // @ts-ignore CSS custom property
455
- '--level': level,
456
- contentVisibility: containIntrinsicSize ? 'auto' : undefined,
457
- containIntrinsicSize
458
- },
459
- children: [/*#__PURE__*/jsx("div", {
460
- style: {
461
- gridArea: 'spacer',
462
- display: 'flex'
463
- },
464
- children: /*#__PURE__*/jsx(LevelIndicatorLines, {
465
- level: level
466
- })
467
- }), slots.leadingAction, hasSubTree ?
468
- /*#__PURE__*/
469
- // This lint rule is disabled due to the guidelines in the `TreeView` api docs.
470
- // https://github.com/github/primer/blob/main/apis/tree-view-api.md#the-expandcollapse-chevron-toggle
471
- // This has specific advice that the chevron be available only to pointer event.
472
- // If they take up a button role, they become unnecessary and numerous tab stops.
473
- jsx("div", {
474
- className: clsx('PRIVATE_TreeView-item-toggle', onSelect && 'PRIVATE_TreeView-item-toggle--hover', level === 1 && 'PRIVATE_TreeView-item-toggle--end', classes.TreeViewItemToggle, classes.TreeViewItemToggleHover, classes.TreeViewItemToggleEnd),
475
- onClick: event => {
476
- if (onSelect) {
477
- toggle(event);
478
- }
479
- },
480
- children: isExpanded ? /*#__PURE__*/jsx(ChevronDownIcon, {
481
- size: TOGGLE_ICON_SIZE
482
- }) : /*#__PURE__*/jsx(ChevronRightIcon, {
483
- size: TOGGLE_ICON_SIZE
484
- })
485
- }) : null, /*#__PURE__*/jsxs("div", {
486
- id: labelId,
487
- className: clsx('PRIVATE_TreeView-item-content', classes.TreeViewItemContent),
488
- children: [slots.leadingVisual, /*#__PURE__*/jsx("span", {
489
- className: clsx('PRIVATE_TreeView-item-content-text', classes.TreeViewItemContentText),
490
- children: childrenWithoutSubTree
491
- }), slots.trailingVisual]
492
- }), secondaryActions ? /*#__PURE__*/jsxs(Fragment, {
493
- children: [/*#__PURE__*/jsx(TrailingAction, {
494
- items: secondaryActions,
495
- shortcutText: trailingActionShortcutText
496
- }), actionCommandPressed ? /*#__PURE__*/jsx(ActionDialog, {
497
- items: secondaryActions,
498
- onClose: () => setActionCommandPressed(false)
499
- }) : null]
500
- }) : null]
501
- }), subTree]
502
- });
503
383
  return /*#__PURE__*/jsx(ItemContext.Provider, {
504
384
  value: {
505
385
  itemId,
@@ -512,15 +392,102 @@ const ItemImpl = fixedForwardRef(({
512
392
  trailingVisualId,
513
393
  trailingActionId
514
394
  },
515
- children: isPolymorphic ? /*#__PURE__*/jsx("li", {
516
- role: "none",
517
- children: itemElement
518
- }) : itemElement
395
+ children: /*#__PURE__*/jsxs("li", {
396
+ className: clsx('PRIVATE_TreeView-item', className, classes.TreeViewItem),
397
+ ref: ref,
398
+ tabIndex: 0,
399
+ id: itemId,
400
+ role: "treeitem",
401
+ "aria-label": secondaryActions ? ariaLabel ? `${ariaLabel}. ${trailingActionShortcutText}` : undefined : ariaLabel,
402
+ "aria-labelledby": ariaLabel ? undefined : `${ariaLabelledby || labelId} ${secondaryActions ? trailingActionId : ''}`.trim(),
403
+ "aria-describedby": ariaDescribedByIds.length ? ariaDescribedByIds.join(' ') : undefined,
404
+ "aria-level": level,
405
+ "aria-expanded": isSubTreeEmpty && (!isExpanded || !hasSubTree) || expanded === null ? undefined : isExpanded,
406
+ "aria-current": isCurrentItem ? 'true' : undefined,
407
+ "aria-selected": isFocused ? 'true' : 'false',
408
+ "data-has-leading-action": slots.leadingAction ? true : undefined,
409
+ "data-loading": isLoadingPlaceholder ? true : undefined,
410
+ onKeyDown: handleKeyDown,
411
+ onFocus: event_1 => {
412
+ // Defer scroll to the next animation frame so that rapid keyboard
413
+ // navigation (held key) coalesces into a single reflow per frame
414
+ scrollElementIntoView(event_1.currentTarget.firstElementChild);
415
+
416
+ // Set the focused state
417
+ setIsFocused(true);
418
+
419
+ // Prevent focus event from bubbling up to parent items
420
+ event_1.stopPropagation();
421
+ },
422
+ onBlur: () => setIsFocused(false),
423
+ onClick: event_2 => {
424
+ if (onSelect) {
425
+ onSelect(event_2);
426
+ } else {
427
+ toggle(event_2);
428
+ }
429
+ event_2.stopPropagation();
430
+ },
431
+ onAuxClick: event_3 => {
432
+ if (onSelect && event_3.button === 1) {
433
+ onSelect(event_3);
434
+ }
435
+ event_3.stopPropagation();
436
+ },
437
+ children: [/*#__PURE__*/jsxs("div", {
438
+ className: clsx('PRIVATE_TreeView-item-container', classes.TreeViewItemContainer),
439
+ style: {
440
+ // @ts-ignore CSS custom property
441
+ '--level': level,
442
+ contentVisibility: containIntrinsicSize ? 'auto' : undefined,
443
+ containIntrinsicSize
444
+ },
445
+ children: [/*#__PURE__*/jsx("div", {
446
+ style: {
447
+ gridArea: 'spacer',
448
+ display: 'flex'
449
+ },
450
+ children: /*#__PURE__*/jsx(LevelIndicatorLines, {
451
+ level: level
452
+ })
453
+ }), slots.leadingAction, hasSubTree ?
454
+ /*#__PURE__*/
455
+ // This lint rule is disabled due to the guidelines in the `TreeView` api docs.
456
+ // https://github.com/github/primer/blob/main/apis/tree-view-api.md#the-expandcollapse-chevron-toggle
457
+ // This has specific advice that the chevron be available only to pointer event.
458
+ // If they take up a button role, they become unnecessary and numerous tab stops.
459
+ jsx("div", {
460
+ className: clsx('PRIVATE_TreeView-item-toggle', onSelect && 'PRIVATE_TreeView-item-toggle--hover', level === 1 && 'PRIVATE_TreeView-item-toggle--end', classes.TreeViewItemToggle, classes.TreeViewItemToggleHover, classes.TreeViewItemToggleEnd),
461
+ onClick: event_4 => {
462
+ if (onSelect) {
463
+ toggle(event_4);
464
+ }
465
+ },
466
+ children: isExpanded ? /*#__PURE__*/jsx(ChevronDownIcon, {
467
+ size: TOGGLE_ICON_SIZE
468
+ }) : /*#__PURE__*/jsx(ChevronRightIcon, {
469
+ size: TOGGLE_ICON_SIZE
470
+ })
471
+ }) : null, /*#__PURE__*/jsxs("div", {
472
+ id: labelId,
473
+ className: clsx('PRIVATE_TreeView-item-content', classes.TreeViewItemContent),
474
+ children: [slots.leadingVisual, /*#__PURE__*/jsx("span", {
475
+ className: clsx('PRIVATE_TreeView-item-content-text', classes.TreeViewItemContentText),
476
+ children: childrenWithoutSubTree
477
+ }), slots.trailingVisual]
478
+ }), secondaryActions ? /*#__PURE__*/jsxs(Fragment, {
479
+ children: [/*#__PURE__*/jsx(TrailingAction, {
480
+ items: secondaryActions,
481
+ shortcutText: trailingActionShortcutText
482
+ }), actionCommandPressed ? /*#__PURE__*/jsx(ActionDialog, {
483
+ items: secondaryActions,
484
+ onClose: () => setActionCommandPressed(false)
485
+ }) : null]
486
+ }) : null]
487
+ }), subTree]
488
+ })
519
489
  });
520
490
  });
521
- const Item = Object.assign(ItemImpl, {
522
- displayName: 'TreeView.Item'
523
- });
524
491
 
525
492
  /** Lines to indicate the depth of an item in a TreeView */
526
493
  const LevelIndicatorLines = t0 => {
@@ -553,6 +520,7 @@ const LevelIndicatorLines = t0 => {
553
520
  }
554
521
  return t2;
555
522
  };
523
+ Item.displayName = 'TreeView.Item';
556
524
 
557
525
  // ----------------------------------------------------------------------------
558
526
  // TreeView.SubTree
@@ -787,121 +755,118 @@ const LoadingItem = /*#__PURE__*/React.forwardRef((t0, ref) => {
787
755
  } = t0;
788
756
  const itemId = useId();
789
757
  if (count) {
790
- const t1 = ref;
791
- let t2;
758
+ let t1;
792
759
  if ($[0] !== count) {
793
- t2 = Array.from({
760
+ t1 = Array.from({
794
761
  length: count
795
762
  }).map(_temp3);
796
763
  $[0] = count;
797
- $[1] = t2;
764
+ $[1] = t1;
798
765
  } else {
799
- t2 = $[1];
766
+ t1 = $[1];
800
767
  }
801
- let t3;
768
+ let t2;
802
769
  if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
803
- t3 = clsx("PRIVATE_VisuallyHidden", classes.TreeViewVisuallyHidden);
804
- $[2] = t3;
770
+ t2 = clsx("PRIVATE_VisuallyHidden", classes.TreeViewVisuallyHidden);
771
+ $[2] = t2;
805
772
  } else {
806
- t3 = $[2];
773
+ t2 = $[2];
807
774
  }
808
- let t4;
775
+ let t3;
809
776
  if ($[3] !== count) {
810
- t4 = /*#__PURE__*/jsxs("div", {
811
- className: t3,
777
+ t3 = /*#__PURE__*/jsxs("div", {
778
+ className: t2,
812
779
  children: ["Loading ", count, " items"]
813
780
  });
814
781
  $[3] = count;
815
- $[4] = t4;
782
+ $[4] = t3;
816
783
  } else {
817
- t4 = $[4];
784
+ t3 = $[4];
818
785
  }
819
- let t5;
820
- if ($[5] !== itemId || $[6] !== t1 || $[7] !== t2 || $[8] !== t4) {
821
- t5 = /*#__PURE__*/jsx(LoadingPlaceholderContext.Provider, {
786
+ let t4;
787
+ if ($[5] !== itemId || $[6] !== ref || $[7] !== t1 || $[8] !== t3) {
788
+ t4 = /*#__PURE__*/jsx(LoadingPlaceholderContext.Provider, {
822
789
  value: true,
823
790
  children: /*#__PURE__*/jsxs(Item, {
824
791
  id: itemId,
825
- ref: t1,
826
- children: [t2, t4]
792
+ ref: ref,
793
+ children: [t1, t3]
827
794
  })
828
795
  });
829
796
  $[5] = itemId;
830
- $[6] = t1;
831
- $[7] = t2;
832
- $[8] = t4;
833
- $[9] = t5;
797
+ $[6] = ref;
798
+ $[7] = t1;
799
+ $[8] = t3;
800
+ $[9] = t4;
834
801
  } else {
835
- t5 = $[9];
802
+ t4 = $[9];
836
803
  }
837
- return t5;
804
+ return t4;
838
805
  }
839
- const t1 = ref;
806
+ let t1;
840
807
  let t2;
841
- let t3;
842
808
  if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
843
- t2 = /*#__PURE__*/jsx(LeadingVisual, {
809
+ t1 = /*#__PURE__*/jsx(LeadingVisual, {
844
810
  children: /*#__PURE__*/jsx(Spinner, {
845
811
  size: "small"
846
812
  })
847
813
  });
848
- t3 = /*#__PURE__*/jsx(Text, {
814
+ t2 = /*#__PURE__*/jsx(Text, {
849
815
  className: "fgColor-muted",
850
816
  children: "Loading..."
851
817
  });
852
- $[10] = t2;
853
- $[11] = t3;
818
+ $[10] = t1;
819
+ $[11] = t2;
854
820
  } else {
855
- t2 = $[10];
856
- t3 = $[11];
821
+ t1 = $[10];
822
+ t2 = $[11];
857
823
  }
858
- let t4;
859
- if ($[12] !== itemId || $[13] !== t1) {
860
- t4 = /*#__PURE__*/jsx(LoadingPlaceholderContext.Provider, {
824
+ let t3;
825
+ if ($[12] !== itemId || $[13] !== ref) {
826
+ t3 = /*#__PURE__*/jsx(LoadingPlaceholderContext.Provider, {
861
827
  value: true,
862
828
  children: /*#__PURE__*/jsxs(Item, {
863
829
  id: itemId,
864
- ref: t1,
865
- children: [t2, t3]
830
+ ref: ref,
831
+ children: [t1, t2]
866
832
  })
867
833
  });
868
834
  $[12] = itemId;
869
- $[13] = t1;
870
- $[14] = t4;
835
+ $[13] = ref;
836
+ $[14] = t3;
871
837
  } else {
872
- t4 = $[14];
838
+ t3 = $[14];
873
839
  }
874
- return t4;
840
+ return t3;
875
841
  });
876
842
  const EmptyItem = /*#__PURE__*/React.forwardRef((props, ref) => {
877
843
  const $ = c(4);
878
844
  const t0 = useId();
879
- const t1 = ref;
880
- let t2;
845
+ let t1;
881
846
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
882
- t2 = /*#__PURE__*/jsx(Text, {
847
+ t1 = /*#__PURE__*/jsx(Text, {
883
848
  className: "fgColor-muted",
884
849
  children: "No items found"
885
850
  });
886
- $[0] = t2;
851
+ $[0] = t1;
887
852
  } else {
888
- t2 = $[0];
853
+ t1 = $[0];
889
854
  }
890
- let t3;
891
- if ($[1] !== t0 || $[2] !== t1) {
892
- t3 = /*#__PURE__*/jsx(Item, {
855
+ let t2;
856
+ if ($[1] !== ref || $[2] !== t0) {
857
+ t2 = /*#__PURE__*/jsx(Item, {
893
858
  expanded: null,
894
859
  id: t0,
895
- ref: t1,
896
- children: t2
860
+ ref: ref,
861
+ children: t1
897
862
  });
898
- $[1] = t0;
899
- $[2] = t1;
900
- $[3] = t3;
863
+ $[1] = ref;
864
+ $[2] = t0;
865
+ $[3] = t2;
901
866
  } else {
902
- t3 = $[3];
867
+ t2 = $[3];
903
868
  }
904
- return t3;
869
+ return t2;
905
870
  });
906
871
  function useSubTree(children) {
907
872
  const $ = c(8);
@@ -2,7 +2,7 @@ import type { ComponentPropsWithRef, ElementType } from 'react';
2
2
  /**
3
3
  * Distributive Omit utility type that works correctly with union types
4
4
  */
5
- export type DistributiveOmit<T, TOmitted extends PropertyKey> = T extends unknown ? Omit<T, TOmitted> : never;
5
+ type DistributiveOmit<T, TOmitted extends PropertyKey> = T extends unknown ? Omit<T, TOmitted> : never;
6
6
  /**
7
7
  * Fixed version of forwardRef that provides better type inference for polymorphic components
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"modern-polymorphic.d.ts","sourceRoot":"","sources":["../../src/utils/modern-polymorph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H,KAAK,eAAe,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,EACnC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,SAAS,KACrD,CAAC,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,SAAS,CAAA;AAE3D;;GAEG;AACH,eAAO,MAAM,eAAe,EAAiB,eAAe,CAAA;AAE5D;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAC1B,GAAG,SAAS,WAAW,EACvB,eAAe,SAAS,WAAW,GAAG,KAAK,EAC3C,KAAK,GAAG,MAAM,IACZ,gBAAgB,CAAC,qBAAqB,CAAC,WAAW,SAAS,GAAG,GAAG,eAAe,GAAG,GAAG,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,GAAG;IAC3G,EAAE,CAAC,EAAE,GAAG,CAAA;CACT,CAAA"}
@@ -8781,12 +8781,6 @@
8781
8781
  {
8782
8782
  "name": "ref",
8783
8783
  "type": "React.Ref<HTMLElement>"
8784
- },
8785
- {
8786
- "name": "as",
8787
- "type": "React.ElementType",
8788
- "defaultValue": "'li'",
8789
- "description": "The element type to render the tree item as. When set to a different element type or component, the polymorphic element is rendered with `role=\"treeitem\"` and is wrapped in an `li` element with `role=\"none\"` so the markup remains valid inside a `ul` with `role=\"tree\"`."
8790
8784
  }
8791
8785
  ]
8792
8786
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20260616190455",
4
+ "version": "0.0.0-20260617130554",
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",