@primer/react 0.0.0-20260406182208 → 0.0.0-20260406200545

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +1 -5
  2. package/dist/AnchoredOverlay/AnchoredOverlay-417704b1.css +2 -0
  3. package/dist/AnchoredOverlay/AnchoredOverlay-417704b1.css.map +1 -0
  4. package/dist/AnchoredOverlay/AnchoredOverlay.d.ts.map +1 -1
  5. package/dist/AnchoredOverlay/AnchoredOverlay.js +43 -20
  6. package/dist/AnchoredOverlay/AnchoredOverlay.module.css.js +1 -1
  7. package/dist/Dialog/{Dialog-f9bb927a.css → Dialog-b577691f.css} +2 -2
  8. package/dist/Dialog/Dialog-b577691f.css.map +1 -0
  9. package/dist/Dialog/Dialog.d.ts.map +1 -1
  10. package/dist/Dialog/Dialog.js +18 -6
  11. package/dist/Dialog/Dialog.module.css.js +2 -2
  12. package/dist/FeatureFlags/DefaultFeatureFlags.d.ts.map +1 -1
  13. package/dist/FeatureFlags/DefaultFeatureFlags.js +1 -0
  14. package/dist/FeatureFlags/FeatureFlags.d.ts +6 -0
  15. package/dist/FeatureFlags/FeatureFlags.d.ts.map +1 -1
  16. package/dist/FeatureFlags/FeatureFlags.js +41 -32
  17. package/dist/Overlay/Overlay.d.ts +1 -1
  18. package/dist/Overlay/Overlay.d.ts.map +1 -1
  19. package/dist/Overlay/Overlay.js +9 -1
  20. package/dist/index.d.ts +0 -2
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +0 -1
  23. package/generated/components.json +0 -85
  24. package/package.json +1 -2
  25. package/dist/AnchoredOverlay/AnchoredOverlay-647c7065.css +0 -2
  26. package/dist/AnchoredOverlay/AnchoredOverlay-647c7065.css.map +0 -1
  27. package/dist/Card/Card-a82e0918.css +0 -2
  28. package/dist/Card/Card-a82e0918.css.map +0 -1
  29. package/dist/Card/Card.d.ts +0 -86
  30. package/dist/Card/Card.d.ts.map +0 -1
  31. package/dist/Card/Card.js +0 -433
  32. package/dist/Card/Card.module.css.js +0 -5
  33. package/dist/Card/index.d.ts +0 -30
  34. package/dist/Card/index.d.ts.map +0 -1
  35. package/dist/Card/index.js +0 -12
  36. package/dist/Dialog/Dialog-f9bb927a.css.map +0 -1
@@ -2100,91 +2100,6 @@
2100
2100
  ],
2101
2101
  "subcomponents": []
2102
2102
  },
2103
- "card": {
2104
- "source": "https://github.com/primer/react/tree/main/packages/react/src/Card",
2105
- "id": "card",
2106
- "name": "Card",
2107
- "status": "draft",
2108
- "a11yReviewed": false,
2109
- "importPath": "@primer/react",
2110
- "stories": [
2111
- {
2112
- "id": "components-card--default",
2113
- "code": "() => {\n return (\n <div\n style={{\n maxWidth: '400px',\n }}\n >\n <Card>\n <Card.Icon icon={RocketIcon} />\n <Card.Heading>Card Heading</Card.Heading>\n <Card.Description>\n This is a description of the card providing supplemental information.\n </Card.Description>\n <Card.Metadata>Updated 2 hours ago</Card.Metadata>\n </Card>\n </div>\n )\n}"
2114
- },
2115
- {
2116
- "id": "components-card-features--with-image",
2117
- "code": "() => {\n return (\n <div\n style={{\n maxWidth: '400px',\n }}\n >\n <Card>\n <Card.Image src=\"https://github.com/octocat.png\" alt=\"Octocat\" />\n <Card.Heading>Card with Image</Card.Heading>\n <Card.Description>\n This card uses an edge-to-edge image instead of an icon.\n </Card.Description>\n </Card>\n </div>\n )\n}"
2118
- },
2119
- {
2120
- "id": "components-card-features--with-metadata",
2121
- "code": "() => {\n return (\n <div\n style={{\n maxWidth: '400px',\n }}\n >\n <Card>\n <Card.Icon icon={RepoIcon} />\n <Card.Heading>primer/react</Card.Heading>\n <Card.Description>\n {\n \"GitHub's design system implemented as React components for building consistent user interfaces.\"\n }\n </Card.Description>\n <Card.Metadata>\n <StarIcon size={16} />\n 1.2k stars\n </Card.Metadata>\n </Card>\n </div>\n )\n}"
2122
- }
2123
- ],
2124
- "props": [
2125
- {
2126
- "name": "className",
2127
- "type": "string",
2128
- "description": "CSS class name(s) for custom styling."
2129
- }
2130
- ],
2131
- "subcomponents": [
2132
- {
2133
- "name": "Card.Icon",
2134
- "props": [
2135
- {
2136
- "name": "icon",
2137
- "type": "React.ElementType",
2138
- "description": "An Octicon or custom SVG icon to render."
2139
- },
2140
- {
2141
- "name": "aria-label",
2142
- "type": "string",
2143
- "description": "Accessible label for the icon. When omitted, the icon is treated as decorative."
2144
- }
2145
- ]
2146
- },
2147
- {
2148
- "name": "Card.Image",
2149
- "props": [
2150
- {
2151
- "name": "src",
2152
- "type": "string",
2153
- "description": "The image source URL."
2154
- },
2155
- {
2156
- "name": "alt",
2157
- "type": "string",
2158
- "defaultValue": "\"\"",
2159
- "description": "Alt text for accessibility. Defaults to empty string (decorative)."
2160
- }
2161
- ]
2162
- },
2163
- {
2164
- "name": "Card.Heading",
2165
- "props": [
2166
- {
2167
- "name": "as",
2168
- "type": "'h2' | 'h3' | 'h4' | 'h5' | 'h6'",
2169
- "defaultValue": "'h3'",
2170
- "description": "The heading level to render."
2171
- }
2172
- ]
2173
- },
2174
- {
2175
- "name": "Card.Description",
2176
- "props": []
2177
- },
2178
- {
2179
- "name": "Card.Menu",
2180
- "props": []
2181
- },
2182
- {
2183
- "name": "Card.Metadata",
2184
- "props": []
2185
- }
2186
- ]
2187
- },
2188
2103
  "checkbox": {
2189
2104
  "source": "https://github.com/primer/react/tree/main/packages/react/src/Checkbox",
2190
2105
  "id": "checkbox",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20260406182208",
4
+ "version": "0.0.0-20260406200545",
5
5
  "description": "An implementation of GitHub's Primer Design System using React",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -78,7 +78,6 @@
78
78
  "@github/relative-time-element": "^4.5.0",
79
79
  "@github/tab-container-element": "^4.8.2",
80
80
  "@lit-labs/react": "1.2.1",
81
- "@oddbird/css-anchor-positioning": "^0.9.0",
82
81
  "@oddbird/popover-polyfill": "^0.5.2",
83
82
  "@primer/behaviors": "^1.10.2",
84
83
  "@primer/live-region-element": "^0.7.1",
@@ -1,2 +0,0 @@
1
- .prc-AnchoredOverlay-ResponsiveCloseButtonContainer-nuium{position:relative}.prc-AnchoredOverlay-ResponsiveCloseButton-z-2rx{display:none;position:absolute;right:var(--base-size-8,.5rem);top:var(--base-size-8,.5rem)}@media screen and (max-width:calc(48rem - 0.02px)){.prc-AnchoredOverlay-ResponsiveCloseButton-z-2rx{display:inline-grid}}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z{position-try-fallbacks:flip-block,flip-inline,flip-block flip-inline;position-visibility:anchors-visible;position:fixed!important;z-index:100}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[popover]{border:0;inset:auto;margin:0;max-height:none;max-width:none;padding:0}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-bottom]{left:anchor(left);top:calc(anchor(bottom) + var(--base-size-4,.25rem))}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-top]{bottom:anchor(top);left:anchor(left);margin-bottom:var(--base-size-4,.25rem)}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-left]{margin-right:var(--base-size-4,.25rem);right:anchor(left);top:anchor(top)}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-right]{left:anchor(right);margin-left:var(--base-size-4,.25rem);top:anchor(top)}
2
- /*# sourceMappingURL=AnchoredOverlay-647c7065.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/AnchoredOverlay/AnchoredOverlay.module.css.js"],"names":[],"mappings":"AAAA,0DACE,iBACF,CAEA,iDAIE,YAAa,CAHb,iBAAkB,CAElB,8BAAyB,CADzB,4BAOF,CAHE,mDANF,iDAOI,mBAEJ,CADE,CAGF,2CACE,oEAGwB,CACxB,mCAAoC,CAEpC,wBAA0B,CAD1B,WAmCF,CAhCE,oDAIE,QAAS,CAHT,UAAW,CACX,QAAS,CAGT,eAAgB,CAChB,cAAe,CAHf,SAIF,CAEA,qEAGE,iBAAkB,CADlB,oDAEF,CAEA,kEAEE,kBAAmB,CACnB,iBAAkB,CAFlB,uCAGF,CAEA,mEAGE,sCAAgC,CAFhC,kBAAmB,CACnB,eAEF,CAEA,oEACE,kBAAmB,CAEnB,qCAA+B,CAD/B,eAEF","file":"AnchoredOverlay-647c7065.css","sourcesContent":[".ResponsiveCloseButtonContainer {\n position: relative;\n}\n\n.ResponsiveCloseButton {\n position: absolute;\n top: var(--base-size-8);\n right: var(--base-size-8);\n display: none;\n\n @media screen and (--viewportRange-narrow) {\n display: inline-grid;\n }\n}\n\n.AnchoredOverlay {\n position-try-fallbacks:\n flip-block,\n flip-inline,\n flip-block flip-inline;\n position-visibility: anchors-visible;\n z-index: 100;\n position: fixed !important;\n\n &[popover] {\n inset: auto;\n margin: 0;\n padding: 0;\n border: 0;\n max-height: none;\n max-width: none;\n }\n\n &[data-side='outside-bottom'] {\n /* stylelint-disable primer/spacing */\n top: calc(anchor(bottom) + var(--base-size-4));\n left: anchor(left);\n }\n\n &[data-side='outside-top'] {\n margin-bottom: var(--base-size-4);\n bottom: anchor(top);\n left: anchor(left);\n }\n\n &[data-side='outside-left'] {\n right: anchor(left);\n top: anchor(top);\n margin-right: var(--base-size-4);\n }\n\n &[data-side='outside-right'] {\n left: anchor(right);\n top: anchor(top);\n margin-left: var(--base-size-4);\n }\n}\n"]}
@@ -1,2 +0,0 @@
1
- .prc-Card-Card-pYjuL{background-color:var(--bgColor-default,var(--color-canvas-default));border:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,var(--color-border-default));border-radius:var(--borderRadius-large,.75rem);box-shadow:var(--shadow-resting-small,var(--color-shadow-small));display:grid;grid-auto-rows:max-content auto;overflow:hidden;position:relative}.prc-Card-CardHeader-P5Qbb{display:block;height:auto;padding:var(--stack-padding-spacious,1.5rem) var(--stack-padding-spacious,1.5rem) var(--stack-padding-normal,1rem) var(--stack-padding-spacious,1.5rem);width:100%}.prc-Card-CardHeaderEdgeToEdge-3yCqT{margin-bottom:var(--base-size-16,1rem);padding:0}.prc-Card-CardImage-2M8DM{display:block;height:auto;width:100%}.prc-Card-CardIcon-mIMfj{align-items:center;background-color:var(--bgColor-muted,var(--color-canvas-subtle));border-radius:var(--borderRadius-medium,.375rem);color:var(--fgColor-muted,var(--color-fg-muted));display:flex;height:var(--base-size-32,2rem);justify-content:center;width:var(--base-size-32,2rem)}.prc-Card-CardBody-W1o-l{display:grid;gap:var(--base-size-16,1rem);padding:0 var(--stack-padding-spacious,1.5rem) var(--stack-padding-spacious,1.5rem) var(--stack-padding-spacious,1.5rem)}.prc-Card-CardContent-omZDS{display:grid;gap:var(--base-size-8,.5rem)}.prc-Card-CardHeading-3HXyS{color:var(--fgColor-default,var(--color-fg-default));font-size:var(--text-body-size-large,1rem);font-weight:var(--base-text-weight-semibold,600);margin:0}.prc-Card-CardDescription-MnJ3F{margin:0}.prc-Card-CardDescription-MnJ3F,.prc-Card-CardMetadataContainer-K-UlH{color:var(--fgColor-muted,var(--color-fg-muted));font-size:var(--text-body-size-medium,.875rem)}.prc-Card-CardMetadataContainer-K-UlH{align-items:center;display:flex;gap:var(--base-size-16,1rem)}.prc-Card-CardMetadataItem-ellY9{align-items:center;display:flex;font:var(--text-body-shorthand-small,400 .75rem/1.625 -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji");gap:var(--base-size-8,.5rem)}.prc-Card-CardMenu-1b3uS{position:absolute;right:var(--base-size-16,1rem);top:var(--base-size-16,1rem);z-index:1}
2
- /*# sourceMappingURL=Card-a82e0918.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/Card/Card.module.css.js"],"names":[],"mappings":"AAAA,qBAQE,mEAAwC,CAFxC,oGAAgE,CAHhE,8CAAwC,CAIxC,gEAAuC,CANvC,YAAa,CAIb,+BAAgC,CADhC,eAAgB,CAFhB,iBAOF,CAEA,2BACE,aAAc,CAEd,WAAY,CAEZ,uJAC+B,CAJ/B,UAMF,CAEA,qCAEE,sCAAkC,CADlC,SAEF,CAEA,0BACE,aAAc,CAEd,WAAY,CADZ,UAEF,CAEA,yBAEE,kBAAmB,CAKnB,gEAAsC,CADtC,gDAAyC,CAEzC,gDAA2B,CAP3B,YAAa,CAIb,+BAA2B,CAF3B,sBAAuB,CACvB,8BAKF,CAEA,yBACE,YAAa,CACb,4BAAwB,CAExB,wHACF,CAEA,4BACE,YAAa,CACb,4BACF,CAEA,4BAGE,oDAA6B,CAF7B,0CAAsC,CACtC,gDAA6C,CAE7C,QACF,CAEA,gCAGE,QACF,CAEA,sEAJE,gDAA2B,CAD3B,8CAWF,CANA,sCAEE,kBAAmB,CADnB,YAAa,CAEb,4BAGF,CAEA,iCAEE,kBAAmB,CADnB,YAAa,CAGb,8KAAsC,CADtC,4BAEF,CAEA,yBACE,iBAAkB,CAElB,8BAA0B,CAD1B,4BAAwB,CAExB,SACF","file":"Card-a82e0918.css","sourcesContent":[".Card {\n display: grid;\n position: relative;\n border-radius: var(--borderRadius-large);\n overflow: hidden;\n grid-auto-rows: max-content auto;\n border: var(--borderWidth-thin) solid var(--borderColor-default);\n box-shadow: var(--shadow-resting-small);\n background-color: var(--bgColor-default);\n}\n\n.CardHeader {\n display: block;\n width: 100%;\n height: auto;\n /* stylelint-disable primer/spacing */\n padding: var(--stack-padding-spacious) var(--stack-padding-spacious) var(--stack-padding-normal)\n var(--stack-padding-spacious);\n /* stylelint-enable primer/spacing */\n}\n\n.CardHeaderEdgeToEdge {\n padding: 0;\n margin-bottom: var(--base-size-16);\n}\n\n.CardImage {\n display: block;\n width: 100%;\n height: auto;\n}\n\n.CardIcon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--base-size-32);\n height: var(--base-size-32);\n border-radius: var(--borderRadius-medium);\n background-color: var(--bgColor-muted);\n color: var(--fgColor-muted);\n}\n\n.CardBody {\n display: grid;\n gap: var(--base-size-16);\n /* stylelint-disable-next-line primer/spacing */\n padding: 0 var(--stack-padding-spacious) var(--stack-padding-spacious) var(--stack-padding-spacious);\n}\n\n.CardContent {\n display: grid;\n gap: var(--base-size-8);\n}\n\n.CardHeading {\n font-size: var(--text-body-size-large);\n font-weight: var(--base-text-weight-semibold);\n color: var(--fgColor-default);\n margin: 0;\n}\n\n.CardDescription {\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-muted);\n margin: 0;\n}\n\n.CardMetadataContainer {\n display: flex;\n align-items: center;\n gap: var(--base-size-16);\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-muted);\n}\n\n.CardMetadataItem {\n display: flex;\n align-items: center;\n gap: var(--base-size-8);\n font: var(--text-body-shorthand-small);\n}\n\n.CardMenu {\n position: absolute;\n top: var(--base-size-16);\n right: var(--base-size-16);\n z-index: 1;\n}\n"]}
@@ -1,86 +0,0 @@
1
- import React from 'react';
2
- export type CardProps = React.ComponentPropsWithoutRef<'div'> & {
3
- /**
4
- * Provide an optional className to add to the outermost element rendered by
5
- * the Card
6
- */
7
- className?: string;
8
- };
9
- type HeadingLevel = 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
10
- type HeadingProps = React.ComponentPropsWithoutRef<'h3'> & {
11
- /**
12
- * The heading level to render. Defaults to 'h3'.
13
- */
14
- as?: HeadingLevel;
15
- children: React.ReactNode;
16
- };
17
- type DescriptionProps = React.ComponentPropsWithoutRef<'p'> & {
18
- children: React.ReactNode;
19
- };
20
- type IconProps = {
21
- /**
22
- * An Octicon or custom SVG icon to render
23
- */
24
- icon: React.ElementType;
25
- /**
26
- * Accessible label for the icon. When omitted, the icon is treated as decorative.
27
- */
28
- 'aria-label'?: string;
29
- className?: string;
30
- };
31
- type ImageProps = React.ComponentPropsWithoutRef<'img'> & {
32
- /**
33
- * The image source URL
34
- */
35
- src: string;
36
- /**
37
- * Alt text for accessibility
38
- */
39
- alt?: string;
40
- };
41
- type MenuProps = {
42
- children: React.ReactNode;
43
- };
44
- type MetadataProps = React.ComponentPropsWithoutRef<'div'> & {
45
- children: React.ReactNode;
46
- };
47
- declare const CardImpl: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
48
- /**
49
- * Provide an optional className to add to the outermost element rendered by
50
- * the Card
51
- */
52
- className?: string;
53
- } & React.RefAttributes<HTMLDivElement>>;
54
- declare const CardIcon: {
55
- ({ icon: IconComponent, "aria-label": ariaLabel, className }: IconProps): React.JSX.Element;
56
- displayName: string;
57
- };
58
- declare const CardImage: {
59
- ({ src, alt, className, ...rest }: ImageProps): React.JSX.Element;
60
- displayName: string;
61
- };
62
- declare const CardHeading: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
63
- /**
64
- * The heading level to render. Defaults to 'h3'.
65
- */
66
- as?: HeadingLevel;
67
- children: React.ReactNode;
68
- } & React.RefAttributes<HTMLHeadingElement>>;
69
- declare const CardDescription: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
70
- children: React.ReactNode;
71
- } & React.RefAttributes<HTMLParagraphElement>>;
72
- declare const CardMenu: {
73
- ({ children }: MenuProps): React.JSX.Element;
74
- displayName: string;
75
- };
76
- declare const CardMetadata: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
77
- children: React.ReactNode;
78
- } & React.RefAttributes<HTMLDivElement>>;
79
- export { CardImpl, CardIcon, CardImage, CardHeading, CardDescription, CardMenu, CardMetadata };
80
- export type { HeadingProps as CardHeadingProps };
81
- export type { DescriptionProps as CardDescriptionProps };
82
- export type { IconProps as CardIconProps };
83
- export type { ImageProps as CardImageProps };
84
- export type { MenuProps as CardMenuProps };
85
- export type { MetadataProps as CardMetadataProps };
86
- //# sourceMappingURL=Card.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../src/Card/Card.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAGvC,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,GAAG;IAC9D;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,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,KAAK,gBAAgB,GAAG,KAAK,CAAC,wBAAwB,CAAC,GAAG,CAAC,GAAG;IAC5D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAAA;AAED,KAAK,SAAS,GAAG;IACf;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,WAAW,CAAA;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,KAAK,UAAU,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,GAAG;IACxD;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,KAAK,SAAS,GAAG;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAAA;AAED,KAAK,aAAa,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,GAAG;IAC3D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAAA;AAED,QAAA,MAAM,QAAQ;IApDZ;;;OAGG;gBACS,MAAM;wCA2FlB,CAAA;AAEF,QAAA,MAAM,QAAQ;kEAA+D,SAAS;;CAWrF,CAAA;AAID,QAAA,MAAM,SAAS;uCAAyC,UAAU;;CAEjE,CAAA;AAID,QAAA,MAAM,WAAW;IA5Gf;;OAEG;SACE,YAAY;cACP,KAAK,CAAC,SAAS;4CAiHzB,CAAA;AAEF,QAAA,MAAM,eAAe;cA/GT,KAAK,CAAC,SAAS;8CAwHzB,CAAA;AAEF,QAAA,MAAM,QAAQ;mBAAgB,SAAS;;CAEtC,CAAA;AAID,QAAA,MAAM,YAAY;cAjGN,KAAK,CAAC,SAAS;wCA0GzB,CAAA;AAEF,OAAO,EAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,YAAY,EAAC,CAAA;AAC5F,YAAY,EAAC,YAAY,IAAI,gBAAgB,EAAC,CAAA;AAC9C,YAAY,EAAC,gBAAgB,IAAI,oBAAoB,EAAC,CAAA;AACtD,YAAY,EAAC,SAAS,IAAI,aAAa,EAAC,CAAA;AACxC,YAAY,EAAC,UAAU,IAAI,cAAc,EAAC,CAAA;AAC1C,YAAY,EAAC,SAAS,IAAI,aAAa,EAAC,CAAA;AACxC,YAAY,EAAC,aAAa,IAAI,iBAAiB,EAAC,CAAA"}
package/dist/Card/Card.js DELETED
@@ -1,433 +0,0 @@
1
- import { c } from 'react-compiler-runtime';
2
- import { clsx } from 'clsx';
3
- import React, { forwardRef } from 'react';
4
- import classes from './Card.module.css.js';
5
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
-
7
- const CardImpl = /*#__PURE__*/forwardRef(function Card(t0, ref) {
8
- const $ = c(35);
9
- let children;
10
- let className;
11
- let rest;
12
- if ($[0] !== t0) {
13
- ({
14
- children,
15
- className,
16
- ...rest
17
- } = t0);
18
- $[0] = t0;
19
- $[1] = children;
20
- $[2] = className;
21
- $[3] = rest;
22
- } else {
23
- children = $[1];
24
- className = $[2];
25
- rest = $[3];
26
- }
27
- let description;
28
- let heading;
29
- let menu;
30
- let metadata;
31
- let t1;
32
- let t2;
33
- let t3;
34
- let t4;
35
- if ($[4] !== children || $[5] !== className || $[6] !== ref || $[7] !== rest) {
36
- let icon = null;
37
- let image = null;
38
- heading = null;
39
- description = null;
40
- metadata = null;
41
- menu = null;
42
- const childArray = React.Children.toArray(children);
43
- for (const child of childArray) {
44
- if (! /*#__PURE__*/React.isValidElement(child)) {
45
- continue;
46
- }
47
- if (child.type === CardIcon) {
48
- icon = child;
49
- } else {
50
- if (child.type === CardImage) {
51
- image = child;
52
- } else {
53
- if (child.type === CardHeading) {
54
- heading = child;
55
- } else {
56
- if (child.type === CardDescription) {
57
- description = child;
58
- } else {
59
- if (child.type === CardMetadata) {
60
- metadata = child;
61
- } else {
62
- if (child.type === CardMenu) {
63
- menu = child;
64
- }
65
- }
66
- }
67
- }
68
- }
69
- }
70
- }
71
- t1 = ref;
72
- if ($[16] !== className) {
73
- t2 = clsx(classes.Card, className);
74
- $[16] = className;
75
- $[17] = t2;
76
- } else {
77
- t2 = $[17];
78
- }
79
- t3 = rest;
80
- t4 = (image || icon) && /*#__PURE__*/jsx("div", {
81
- className: clsx(classes.CardHeader, image && classes.CardHeaderEdgeToEdge),
82
- children: image || icon
83
- });
84
- $[4] = children;
85
- $[5] = className;
86
- $[6] = ref;
87
- $[7] = rest;
88
- $[8] = description;
89
- $[9] = heading;
90
- $[10] = menu;
91
- $[11] = metadata;
92
- $[12] = t1;
93
- $[13] = t2;
94
- $[14] = t3;
95
- $[15] = t4;
96
- } else {
97
- description = $[8];
98
- heading = $[9];
99
- menu = $[10];
100
- metadata = $[11];
101
- t1 = $[12];
102
- t2 = $[13];
103
- t3 = $[14];
104
- t4 = $[15];
105
- }
106
- let t5;
107
- if ($[18] !== description || $[19] !== heading) {
108
- t5 = /*#__PURE__*/jsxs("div", {
109
- className: classes.CardContent,
110
- children: [heading, description]
111
- });
112
- $[18] = description;
113
- $[19] = heading;
114
- $[20] = t5;
115
- } else {
116
- t5 = $[20];
117
- }
118
- let t6;
119
- if ($[21] !== metadata) {
120
- t6 = metadata ? /*#__PURE__*/jsx("div", {
121
- className: classes.CardMetadataContainer,
122
- children: metadata
123
- }) : null;
124
- $[21] = metadata;
125
- $[22] = t6;
126
- } else {
127
- t6 = $[22];
128
- }
129
- let t7;
130
- if ($[23] !== t5 || $[24] !== t6) {
131
- t7 = /*#__PURE__*/jsxs("div", {
132
- className: classes.CardBody,
133
- children: [t5, t6]
134
- });
135
- $[23] = t5;
136
- $[24] = t6;
137
- $[25] = t7;
138
- } else {
139
- t7 = $[25];
140
- }
141
- let t8;
142
- if ($[26] !== menu) {
143
- t8 = menu ? /*#__PURE__*/jsx("div", {
144
- className: classes.CardMenu,
145
- children: menu
146
- }) : null;
147
- $[26] = menu;
148
- $[27] = t8;
149
- } else {
150
- t8 = $[27];
151
- }
152
- let t9;
153
- if ($[28] !== t1 || $[29] !== t2 || $[30] !== t3 || $[31] !== t4 || $[32] !== t7 || $[33] !== t8) {
154
- t9 = /*#__PURE__*/jsxs("div", {
155
- ref: t1,
156
- className: t2,
157
- ...t3,
158
- children: [t4, t7, t8]
159
- });
160
- $[28] = t1;
161
- $[29] = t2;
162
- $[30] = t3;
163
- $[31] = t4;
164
- $[32] = t7;
165
- $[33] = t8;
166
- $[34] = t9;
167
- } else {
168
- t9 = $[34];
169
- }
170
- return t9;
171
- });
172
- const CardIcon = t0 => {
173
- const $ = c(10);
174
- const {
175
- icon: IconComponent,
176
- "aria-label": ariaLabel,
177
- className
178
- } = t0;
179
- let t1;
180
- if ($[0] !== className) {
181
- t1 = clsx(classes.CardIcon, className);
182
- $[0] = className;
183
- $[1] = t1;
184
- } else {
185
- t1 = $[1];
186
- }
187
- const t2 = ariaLabel ? "img" : undefined;
188
- const t3 = !ariaLabel;
189
- let t4;
190
- if ($[2] !== IconComponent) {
191
- t4 = /*#__PURE__*/jsx(IconComponent, {});
192
- $[2] = IconComponent;
193
- $[3] = t4;
194
- } else {
195
- t4 = $[3];
196
- }
197
- let t5;
198
- if ($[4] !== ariaLabel || $[5] !== t1 || $[6] !== t2 || $[7] !== t3 || $[8] !== t4) {
199
- t5 = /*#__PURE__*/jsx("span", {
200
- className: t1,
201
- role: t2,
202
- "aria-label": ariaLabel,
203
- "aria-hidden": t3,
204
- children: t4
205
- });
206
- $[4] = ariaLabel;
207
- $[5] = t1;
208
- $[6] = t2;
209
- $[7] = t3;
210
- $[8] = t4;
211
- $[9] = t5;
212
- } else {
213
- t5 = $[9];
214
- }
215
- return t5;
216
- };
217
- CardIcon.displayName = 'Card.Icon';
218
- const CardImage = t0 => {
219
- const $ = c(12);
220
- let className;
221
- let rest;
222
- let src;
223
- let t1;
224
- if ($[0] !== t0) {
225
- ({
226
- src,
227
- alt: t1,
228
- className,
229
- ...rest
230
- } = t0);
231
- $[0] = t0;
232
- $[1] = className;
233
- $[2] = rest;
234
- $[3] = src;
235
- $[4] = t1;
236
- } else {
237
- className = $[1];
238
- rest = $[2];
239
- src = $[3];
240
- t1 = $[4];
241
- }
242
- const alt = t1 === undefined ? "" : t1;
243
- let t2;
244
- if ($[5] !== className) {
245
- t2 = clsx(classes.CardImage, className);
246
- $[5] = className;
247
- $[6] = t2;
248
- } else {
249
- t2 = $[6];
250
- }
251
- let t3;
252
- if ($[7] !== alt || $[8] !== rest || $[9] !== src || $[10] !== t2) {
253
- t3 = /*#__PURE__*/jsx("img", {
254
- src: src,
255
- alt: alt,
256
- className: t2,
257
- ...rest
258
- });
259
- $[7] = alt;
260
- $[8] = rest;
261
- $[9] = src;
262
- $[10] = t2;
263
- $[11] = t3;
264
- } else {
265
- t3 = $[11];
266
- }
267
- return t3;
268
- };
269
- CardImage.displayName = 'Card.Image';
270
- const CardHeading = /*#__PURE__*/forwardRef(function CardHeading(t0, ref) {
271
- const $ = c(13);
272
- let children;
273
- let className;
274
- let rest;
275
- let t1;
276
- if ($[0] !== t0) {
277
- ({
278
- as: t1,
279
- children,
280
- className,
281
- ...rest
282
- } = t0);
283
- $[0] = t0;
284
- $[1] = children;
285
- $[2] = className;
286
- $[3] = rest;
287
- $[4] = t1;
288
- } else {
289
- children = $[1];
290
- className = $[2];
291
- rest = $[3];
292
- t1 = $[4];
293
- }
294
- const Component = t1 === undefined ? "h3" : t1;
295
- let t2;
296
- if ($[5] !== className) {
297
- t2 = clsx(classes.CardHeading, className);
298
- $[5] = className;
299
- $[6] = t2;
300
- } else {
301
- t2 = $[6];
302
- }
303
- let t3;
304
- if ($[7] !== Component || $[8] !== children || $[9] !== ref || $[10] !== rest || $[11] !== t2) {
305
- t3 = /*#__PURE__*/jsx(Component, {
306
- ref: ref,
307
- className: t2,
308
- ...rest,
309
- children: children
310
- });
311
- $[7] = Component;
312
- $[8] = children;
313
- $[9] = ref;
314
- $[10] = rest;
315
- $[11] = t2;
316
- $[12] = t3;
317
- } else {
318
- t3 = $[12];
319
- }
320
- return t3;
321
- });
322
- const CardDescription = /*#__PURE__*/forwardRef(function CardDescription(t0, ref) {
323
- const $ = c(11);
324
- let children;
325
- let className;
326
- let rest;
327
- if ($[0] !== t0) {
328
- ({
329
- children,
330
- className,
331
- ...rest
332
- } = t0);
333
- $[0] = t0;
334
- $[1] = children;
335
- $[2] = className;
336
- $[3] = rest;
337
- } else {
338
- children = $[1];
339
- className = $[2];
340
- rest = $[3];
341
- }
342
- let t1;
343
- if ($[4] !== className) {
344
- t1 = clsx(classes.CardDescription, className);
345
- $[4] = className;
346
- $[5] = t1;
347
- } else {
348
- t1 = $[5];
349
- }
350
- let t2;
351
- if ($[6] !== children || $[7] !== ref || $[8] !== rest || $[9] !== t1) {
352
- t2 = /*#__PURE__*/jsx("p", {
353
- ref: ref,
354
- className: t1,
355
- ...rest,
356
- children: children
357
- });
358
- $[6] = children;
359
- $[7] = ref;
360
- $[8] = rest;
361
- $[9] = t1;
362
- $[10] = t2;
363
- } else {
364
- t2 = $[10];
365
- }
366
- return t2;
367
- });
368
- const CardMenu = t0 => {
369
- const $ = c(2);
370
- const {
371
- children
372
- } = t0;
373
- let t1;
374
- if ($[0] !== children) {
375
- t1 = /*#__PURE__*/jsx(Fragment, {
376
- children: children
377
- });
378
- $[0] = children;
379
- $[1] = t1;
380
- } else {
381
- t1 = $[1];
382
- }
383
- return t1;
384
- };
385
- CardMenu.displayName = 'Card.Menu';
386
- const CardMetadata = /*#__PURE__*/forwardRef(function CardMetadata(t0, ref) {
387
- const $ = c(11);
388
- let children;
389
- let className;
390
- let rest;
391
- if ($[0] !== t0) {
392
- ({
393
- children,
394
- className,
395
- ...rest
396
- } = t0);
397
- $[0] = t0;
398
- $[1] = children;
399
- $[2] = className;
400
- $[3] = rest;
401
- } else {
402
- children = $[1];
403
- className = $[2];
404
- rest = $[3];
405
- }
406
- let t1;
407
- if ($[4] !== className) {
408
- t1 = clsx(classes.CardMetadataItem, className);
409
- $[4] = className;
410
- $[5] = t1;
411
- } else {
412
- t1 = $[5];
413
- }
414
- let t2;
415
- if ($[6] !== children || $[7] !== ref || $[8] !== rest || $[9] !== t1) {
416
- t2 = /*#__PURE__*/jsx("div", {
417
- ref: ref,
418
- className: t1,
419
- ...rest,
420
- children: children
421
- });
422
- $[6] = children;
423
- $[7] = ref;
424
- $[8] = rest;
425
- $[9] = t1;
426
- $[10] = t2;
427
- } else {
428
- t2 = $[10];
429
- }
430
- return t2;
431
- });
432
-
433
- export { CardDescription, CardHeading, CardIcon, CardImage, CardImpl, CardMenu, CardMetadata };
@@ -1,5 +0,0 @@
1
- import './Card-a82e0918.css';
2
-
3
- var classes = {"Card":"prc-Card-Card-pYjuL","CardHeader":"prc-Card-CardHeader-P5Qbb","CardHeaderEdgeToEdge":"prc-Card-CardHeaderEdgeToEdge-3yCqT","CardImage":"prc-Card-CardImage-2M8DM","CardIcon":"prc-Card-CardIcon-mIMfj","CardBody":"prc-Card-CardBody-W1o-l","CardContent":"prc-Card-CardContent-omZDS","CardHeading":"prc-Card-CardHeading-3HXyS","CardDescription":"prc-Card-CardDescription-MnJ3F","CardMetadataContainer":"prc-Card-CardMetadataContainer-K-UlH","CardMetadataItem":"prc-Card-CardMetadataItem-ellY9","CardMenu":"prc-Card-CardMenu-1b3uS"};
4
-
5
- export { classes as default };