@primer/react 38.46.0-rc.9cfae8e69 → 38.46.0-rc.a1728d414
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 +4 -0
- package/dist/Card/Card-0e84ee3c.css +2 -0
- package/dist/Card/Card-0e84ee3c.css.map +1 -0
- package/dist/Card/Card.d.ts +13 -3
- package/dist/Card/Card.js +286 -161
- package/dist/Card/Card.module.css.js +2 -1
- package/dist/Card/index.d.ts +13 -3
- package/dist/Card/index.js +3 -1
- package/dist/experimental/index.d.ts +2 -2
- package/generated/components.json +82 -3
- package/package.json +1 -1
- package/dist/Card/Card-59b77d05.css +0 -2
- package/dist/Card/Card-59b77d05.css.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,12 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
+
- [#8592](https://github.com/primer/react/pull/8592) [`0ae18d3`](https://github.com/primer/react/commit/0ae18d38f09044c40c1a181288c2783e93629b4e) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Card: Add optional shadows, regular (16px) and spacious (24px) padding in either layout, and heading links and buttons with opt-in full-card hit areas using fullCardHitArea. Existing normal padding and defaults are unchanged.
|
|
8
|
+
|
|
7
9
|
- [#8692](https://github.com/primer/react/pull/8692) [`918d7cf`](https://github.com/primer/react/commit/918d7cf82d3884ab134e9b074e0a595198a1c033) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Stack: Add `balance` as a value for the `wrap` prop.
|
|
8
10
|
|
|
9
11
|
### Patch Changes
|
|
10
12
|
|
|
11
13
|
- [#8683](https://github.com/primer/react/pull/8683) [`32d5061`](https://github.com/primer/react/commit/32d50618c58cceddf66d83716ac9742c2134b790) Thanks [@mattcosta7](https://github.com/mattcosta7)! - Breadcrumbs: Improve the performance of `overflow="menu"` and `"menu-with-root"` on mount, resize and navigation. Server-rendered markup now applies the collapse rules before hydration, and the overflow menu trigger is a `<button>`.
|
|
12
14
|
|
|
15
|
+
- [#8592](https://github.com/primer/react/pull/8592) [`0ae18d3`](https://github.com/primer/react/commit/0ae18d38f09044c40c1a181288c2783e93629b4e) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Card: Improve shrinking and equal-height layouts, keep secondary controls accessible in custom whole-card compositions, and keep images edge-to-edge across padding options.
|
|
16
|
+
|
|
13
17
|
- [#8679](https://github.com/primer/react/pull/8679) [`dbf2ac1`](https://github.com/primer/react/commit/dbf2ac1d758a0aae69f37ad1bd789480ce58ff4c) Thanks [@llastflowers](https://github.com/llastflowers)! - Breadcrumbs: Close the overflow menu when Escape is pressed while its tooltip is open.
|
|
14
18
|
|
|
15
19
|
- [#8628](https://github.com/primer/react/pull/8628) [`41f29c8`](https://github.com/primer/react/commit/41f29c845663936043618af29dcb71de4c9384b2) Thanks [@joshblack](https://github.com/joshblack)! - SkeletonAvatar, SkeletonText: Preserve the requested size and shape regardless of stylesheet load order
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-Card-Card-pYjuL{--card-padding:var(--stack-padding-spacious,1.5rem);background-color:var(--bgColor-default,#fff);border:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0);box-shadow:var(--shadow-resting-small,0 1px 1px 0 #1f23280a,0 1px 2px 0 #1f232808);display:grid;gap:var(--stack-gap-normal,1rem);grid-auto-rows:max-content auto;isolation:isolate;min-width:0;overflow:hidden;padding:var(--card-padding);position:relative}.prc-Card-Card-pYjuL[data-content=custom]{grid-auto-rows:auto}.prc-Card-Card-pYjuL[data-content=structured][data-has-header=false]{grid-template-rows:minmax(0,1fr)}.prc-Card-Card-pYjuL[data-shadow=false]{box-shadow:none}.prc-Card-Card-pYjuL[data-border-radius=large]{border-radius:var(--borderRadius-large,.75rem)}.prc-Card-Card-pYjuL[data-border-radius=medium]{border-radius:var(--borderRadius-medium,.375rem)}.prc-Card-Card-pYjuL[data-padding=regular]{--card-padding:var(--stack-padding-normal,1rem)}.prc-Card-Card-pYjuL[data-padding=spacious]{--card-padding:var(--stack-padding-spacious,1.5rem)}.prc-Card-Card-pYjuL[data-padding=condensed]{--card-padding:var(--stack-padding-condensed,0.5rem)}.prc-Card-Card-pYjuL[data-padding=none]{--card-padding:0px}.prc-Card-Card-pYjuL[data-layout=compact]{align-items:flex-start;display:flex;gap:var(--stack-gap-condensed,.5rem)}.prc-Card-Card-pYjuL[data-layout=compact][data-padding=normal]{--card-padding:var(--stack-padding-normal,1rem)}:where(.prc-Card-Card-pYjuL) :where([contenteditable=true]),:where(.prc-Card-Card-pYjuL) :where([tabindex]),:where(.prc-Card-Card-pYjuL) :where(a),:where(.prc-Card-Card-pYjuL) :where(button),:where(.prc-Card-Card-pYjuL) :where(input),:where(.prc-Card-Card-pYjuL) :where(label),:where(.prc-Card-Card-pYjuL) :where(select),:where(.prc-Card-Card-pYjuL) :where(summary),:where(.prc-Card-Card-pYjuL) :where(textarea){position:relative;z-index:1}.prc-Card-CardHeader-P5Qbb{display:block;height:auto;width:100%}.prc-Card-Card-pYjuL:where([data-layout=compact]) .prc-Card-CardHeader-P5Qbb{flex:0 0 auto;width:auto}.prc-Card-CardHeaderEdgeToEdge-3yCqT{margin-left:calc(var(--card-padding)*-1);margin-right:calc(var(--card-padding)*-1);margin-top:calc(var(--card-padding)*-1);width:calc(100% + var(--card-padding)*2)}.prc-Card-CardImage-2M8DM{display:block;height:auto;width:100%}.prc-Card-CardIcon-mIMfj{align-items:center;color:var(--fgColor-muted,#59636e);display:flex;justify-content:flex-start}.prc-Card-Card-pYjuL:where([data-layout=default]) .prc-Card-CardIcon-mIMfj{background-color:var(--bgColor-muted,#f6f8fa);border-radius:var(--borderRadius-medium,.375rem);height:var(--base-size-32,2rem);justify-content:center;width:var(--base-size-32,2rem)}.prc-Card-CardBody-W1o-l{display:grid;gap:var(--stack-gap-normal,1rem);min-width:0}.prc-Card-Card-pYjuL:where([data-layout=compact]) .prc-Card-CardBody-W1o-l{flex:1 1 auto}.prc-Card-CardContent-omZDS{align-content:start;display:grid;gap:var(--stack-gap-condensed,.5rem);min-width:0}.prc-Card-CardHeading-3HXyS{color:var(--fgColor-default,#1f2328);font:var(--text-title-shorthand-small,600 1rem/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji");margin:0}.prc-Card-Card-pYjuL:where([data-layout=compact]) .prc-Card-CardHeading-3HXyS{font-size:var(--text-body-size-medium,.875rem);margin-bottom:var(--base-size-4,.25rem);margin-top:calc(var(--base-size-4,.25rem)*-1)}.prc-Card-CardPrimaryAction-2mRXB{background:none;border:0;color:inherit;cursor:pointer;font:inherit;padding:0;position:relative;text-align:inherit;-webkit-text-decoration:none;text-decoration:none;z-index:1}.prc-Card-CardPrimaryAction-2mRXB:hover:not(:disabled){-webkit-text-decoration:underline;text-decoration:underline}.prc-Card-CardPrimaryAction-2mRXB:focus-visible{outline:var(--borderWidth-thick,.125rem) solid var(--focus-outlineColor,#0969da);outline-offset:var(--borderWidth-thick,.125rem)}.prc-Card-CardPrimaryAction-2mRXB[data-full-card-hit-area=true]{position:static;z-index:auto}.prc-Card-CardPrimaryAction-2mRXB[data-full-card-hit-area=true]:after{border-radius:var(--borderRadius-large,.75rem);content:"";inset:0;position:absolute;z-index:0}.prc-Card-Card-pYjuL:where([data-border-radius=medium]) .prc-Card-CardPrimaryAction-2mRXB[data-full-card-hit-area=true]::-csstools-invalid-after{border-radius:var(--borderRadius-medium,.375rem)}.prc-Card-CardPrimaryAction-2mRXB[data-full-card-hit-area=true]:hover:where(:not(:disabled)):after{outline:var(--borderWidth-thin,.0625rem) solid var(--borderColor-accent-emphasis,#0969da);outline-offset:calc(var(--borderWidth-thin,.0625rem)*-1)}.prc-Card-CardPrimaryAction-2mRXB[data-full-card-hit-area=true]:focus-visible{outline:none}.prc-Card-CardPrimaryAction-2mRXB[data-full-card-hit-area=true]:focus-visible:after{outline:var(--borderWidth-thick,.125rem) solid var(--focus-outlineColor,#0969da);outline-offset:calc(var(--base-size-4,.25rem)*-1)}.prc-Card-CardPrimaryAction-2mRXB:disabled{color:var(--fgColor-disabled,#818b98);cursor:default}.prc-Card-CardDescription-MnJ3F{margin:0}.prc-Card-CardDescription-MnJ3F,.prc-Card-CardMetadataContainer-K-UlH{color:var(--fgColor-muted,#59636e);font:var(--text-body-shorthand-medium,400 .875rem/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji")}.prc-Card-CardMetadataContainer-K-UlH{align-items:center;align-self:end;display:flex;gap:var(--stack-gap-normal,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(--stack-gap-condensed,.5rem)}.prc-Card-CardAction-VtI49{position:absolute;right:var(--base-size-16,1rem);top:var(--base-size-16,1rem);z-index:1}
|
|
2
|
+
/*# sourceMappingURL=Card-0e84ee3c.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Card/Card.module.css.js"],"names":[],"mappings":"AAAA,qBACE,mDAA6C,CAU7C,4CAAwC,CAFxC,gFAAgE,CAChE,kFAAuC,CAPvC,YAAa,CASb,gCAA4B,CAJ5B,+BAAgC,CAHhC,iBAAkB,CAElB,WAAY,CADZ,eAAgB,CAQhB,2BAA4B,CAV5B,iBAyDF,CA7CE,0CACE,mBACF,CAEA,qEACE,gCACF,CAEA,wCACE,eACF,CAEA,+CACE,8CACF,CAEA,gDACE,gDACF,CAEA,2CACE,+CACF,CAEA,4CACE,mDACF,CAEA,6CACE,oDACF,CAEA,wCACE,kBACF,CAEA,0CAEE,sBAAuB,CADvB,YAAa,CAEb,oCACF,CAEA,+DACE,+CACF,CAIA,4ZASE,iBAAkB,CAClB,SACF,CAGF,2BACE,aAAc,CAEd,WAAY,CADZ,UAOF,CAJE,6EACE,aAAc,CACd,UACF,CAGF,qCAIE,wCAA2C,CAD3C,yCAA4C,CAD5C,uCAA0C,CAG1C,wCAEF,CAEA,0BACE,aAAc,CAEd,WAAY,CADZ,UAEF,CAEA,yBAEE,kBAAmB,CAEnB,kCAA2B,CAH3B,YAAa,CAEb,0BAUF,CAPE,2EAKE,6CAAsC,CADtC,gDAAyC,CADzC,+BAA2B,CAF3B,sBAAuB,CACvB,8BAIF,CAGF,yBACE,YAAa,CAEb,gCAA4B,CAD5B,WAMF,CAHE,2EACE,aACF,CAGF,4BAGE,mBAAoB,CAFpB,YAAa,CAGb,oCAA+B,CAF/B,WAGF,CAEA,4BAEE,oCAA6B,CAD7B,2KAAuC,CAEvC,QAOF,CALE,8EAGE,8CAAuC,CADvC,uCAAiC,CADjC,6CAGF,CAGF,kCAKE,eAAgB,CADhB,QAAS,CAGT,aAAc,CAGd,cAAe,CAJf,YAAa,CAHb,SAAU,CAFV,iBAAkB,CAOlB,kBAAmB,CACnB,4BAAqB,CAArB,oBAAqB,CAPrB,SAsDF,CA5CE,uDACE,iCAA0B,CAA1B,yBACF,CAEA,gDACE,gFAAiE,CACjE,+CACF,CAEA,gEACE,eAAgB,CAChB,YA2BF,CAzBE,sEAKE,8CAAwC,CADxC,UAAW,CAFX,OAAQ,CADR,iBAAkB,CAElB,SAOF,CAHE,iJACE,gDACF,CAGF,mGACE,yFAAyE,CACzE,wDACF,CAEA,8EACE,YACF,CAEA,oFACE,gFAAiE,CACjE,iDACF,CAGF,2CACE,qCAA8B,CAC9B,cACF,CAGF,gCAGE,QACF,CAEA,sEAJE,kCAA2B,CAD3B,8KAYF,CAPA,sCAGE,kBAAmB,CADnB,cAAe,CADf,YAAa,CAGb,gCAGF,CAEA,iCAEE,kBAAmB,CADnB,YAAa,CAGb,8KAAsC,CADtC,oCAEF,CAEA,2BACE,iBAAkB,CAElB,8BAA0B,CAD1B,4BAAwB,CAExB,SACF","file":"Card-0e84ee3c.css","sourcesContent":[".Card {\n --card-padding: var(--stack-padding-spacious);\n\n display: grid;\n position: relative;\n isolation: isolate;\n overflow: hidden;\n min-width: 0;\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 gap: var(--stack-gap-normal);\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--card-padding);\n\n &[data-content='custom'] {\n grid-auto-rows: auto;\n }\n\n &[data-content='structured'][data-has-header='false'] {\n grid-template-rows: minmax(0, 1fr);\n }\n\n &[data-shadow='false'] {\n box-shadow: none;\n }\n\n &[data-border-radius='large'] {\n border-radius: var(--borderRadius-large);\n }\n\n &[data-border-radius='medium'] {\n border-radius: var(--borderRadius-medium);\n }\n\n &[data-padding='regular'] {\n --card-padding: var(--stack-padding-normal);\n }\n\n &[data-padding='spacious'] {\n --card-padding: var(--stack-padding-spacious);\n }\n\n &[data-padding='condensed'] {\n --card-padding: var(--stack-padding-condensed);\n }\n\n &[data-padding='none'] {\n --card-padding: 0px;\n }\n\n &[data-layout='compact'] {\n display: flex;\n align-items: flex-start;\n gap: var(--stack-gap-condensed);\n }\n\n &[data-layout='compact'][data-padding='normal'] {\n --card-padding: var(--stack-padding-normal);\n }\n}\n\n:where(.Card) {\n :where(a),\n :where(button),\n :where(input),\n :where(select),\n :where(textarea),\n :where(summary),\n :where(label),\n :where([tabindex]),\n :where([contenteditable='true']) {\n position: relative;\n z-index: 1;\n }\n}\n\n.CardHeader {\n display: block;\n width: 100%;\n height: auto;\n\n .Card:where([data-layout='compact']) & {\n flex: 0 0 auto;\n width: auto;\n }\n}\n\n.CardHeaderEdgeToEdge {\n /* stylelint-disable primer/spacing */\n margin-top: calc(-1 * var(--card-padding));\n margin-right: calc(-1 * var(--card-padding));\n margin-left: calc(-1 * var(--card-padding));\n width: calc(100% + 2 * var(--card-padding));\n /* stylelint-enable primer/spacing */\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: flex-start;\n color: var(--fgColor-muted);\n\n .Card:where([data-layout='default']) & {\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 }\n}\n\n.CardBody {\n display: grid;\n min-width: 0;\n gap: var(--stack-gap-normal);\n\n .Card:where([data-layout='compact']) & {\n flex: 1 1 auto;\n }\n}\n\n.CardContent {\n display: grid;\n min-width: 0;\n align-content: start;\n gap: var(--stack-gap-condensed);\n}\n\n.CardHeading {\n font: var(--text-title-shorthand-small);\n color: var(--fgColor-default);\n margin: 0;\n\n .Card:where([data-layout='compact']) & {\n margin-top: calc(-1 * var(--base-size-4));\n margin-bottom: var(--base-size-4);\n font-size: var(--text-body-size-medium);\n }\n}\n\n.CardPrimaryAction {\n position: relative;\n z-index: 1;\n padding: 0;\n border: 0;\n background: none;\n font: inherit;\n color: inherit;\n text-align: inherit;\n text-decoration: none;\n cursor: pointer;\n\n &:hover:not(:disabled) {\n text-decoration: underline;\n }\n\n &:focus-visible {\n outline: var(--borderWidth-thick) solid var(--focus-outlineColor);\n outline-offset: var(--borderWidth-thick);\n }\n\n &[data-full-card-hit-area='true'] {\n position: static;\n z-index: auto;\n\n &::after {\n position: absolute;\n inset: 0;\n z-index: 0;\n content: '';\n border-radius: var(--borderRadius-large);\n\n .Card:where([data-border-radius='medium']) & {\n border-radius: var(--borderRadius-medium);\n }\n }\n\n &:hover:where(:not(:disabled))::after {\n outline: var(--borderWidth-thin) solid var(--borderColor-accent-emphasis);\n outline-offset: calc(-1 * var(--borderWidth-thin));\n }\n\n &:focus-visible {\n outline: none;\n }\n\n &:focus-visible::after {\n outline: var(--borderWidth-thick) solid var(--focus-outlineColor);\n outline-offset: calc(-1 * var(--base-size-4));\n }\n }\n\n &:disabled {\n color: var(--fgColor-disabled);\n cursor: default;\n }\n}\n\n.CardDescription {\n font: var(--text-body-shorthand-medium);\n color: var(--fgColor-muted);\n margin: 0;\n}\n\n.CardMetadataContainer {\n display: flex;\n align-self: end;\n align-items: center;\n gap: var(--stack-gap-normal);\n font: var(--text-body-shorthand-medium);\n color: var(--fgColor-muted);\n}\n\n.CardMetadataItem {\n display: flex;\n align-items: center;\n gap: var(--stack-gap-condensed);\n font: var(--text-body-shorthand-small);\n}\n\n.CardAction {\n position: absolute;\n top: var(--base-size-16);\n right: var(--base-size-16);\n z-index: 1;\n}\n"]}
|
package/dist/Card/Card.d.ts
CHANGED
|
@@ -4,8 +4,9 @@ import React from "react";
|
|
|
4
4
|
//#region src/Card/Card.d.ts
|
|
5
5
|
type CardAs = 'div' | 'section';
|
|
6
6
|
type CardProps<As extends CardAs = 'div'> = PolymorphicProps<As, 'div', {
|
|
7
|
-
/** Optional className for the root element. */className?: string; /** Internal padding. @default 'normal' */
|
|
8
|
-
padding?: 'none' | 'condensed' | 'normal'; /**
|
|
7
|
+
/** Optional className for the root element. */className?: string; /** Internal padding: none (0px), condensed (8px), regular (16px), spacious (24px), normal (24px, or 16px in compact layout). @default 'normal' */
|
|
8
|
+
padding?: 'none' | 'condensed' | 'regular' | 'spacious' | 'normal'; /** Whether to show the card's shadow. @default true */
|
|
9
|
+
shadow?: boolean; /** Border radius. @default 'large' */
|
|
9
10
|
borderRadius?: 'medium' | 'large';
|
|
10
11
|
/**
|
|
11
12
|
* Layout of the card. `compact` uses tighter spacing, removes the icon
|
|
@@ -20,6 +21,15 @@ type CardProps<As extends CardAs = 'div'> = PolymorphicProps<As, 'div', {
|
|
|
20
21
|
children: React.ReactNode;
|
|
21
22
|
}>;
|
|
22
23
|
type HeadingLevel = 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
24
|
+
type LinkProps = React.ComponentPropsWithoutRef<'a'> & {
|
|
25
|
+
/** Destination for the link. */href: string; /** Expand the link's hit area over the entire card. @default false */
|
|
26
|
+
fullCardHitArea?: boolean;
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
};
|
|
29
|
+
type ButtonProps = React.ComponentPropsWithoutRef<'button'> & {
|
|
30
|
+
/** Expand the button's hit area over the entire card. @default false */fullCardHitArea?: boolean;
|
|
31
|
+
children: React.ReactNode;
|
|
32
|
+
};
|
|
23
33
|
type HeadingProps = React.ComponentPropsWithoutRef<'h3'> & {
|
|
24
34
|
/**
|
|
25
35
|
* The heading level to render. Defaults to 'h3'.
|
|
@@ -101,4 +111,4 @@ declare namespace CardAction {
|
|
|
101
111
|
var displayName: string;
|
|
102
112
|
}
|
|
103
113
|
//#endregion
|
|
104
|
-
export { CardAction, type ActionProps as CardActionProps, type DescriptionProps as CardDescriptionProps, type HeadingProps as CardHeadingProps, CardIcon, type IconProps as CardIconProps, CardImage, type ImageProps as CardImageProps, type MetadataProps as CardMetadataProps, CardProps };
|
|
114
|
+
export { CardAction, type ActionProps as CardActionProps, type ButtonProps as CardButtonProps, type DescriptionProps as CardDescriptionProps, type HeadingProps as CardHeadingProps, CardIcon, type IconProps as CardIconProps, CardImage, type ImageProps as CardImageProps, type LinkProps as CardLinkProps, type MetadataProps as CardMetadataProps, CardProps };
|
package/dist/Card/Card.js
CHANGED
|
@@ -8,12 +8,13 @@ import { clsx } from "clsx";
|
|
|
8
8
|
//#region src/Card/Card.tsx
|
|
9
9
|
const CardContext = /*#__PURE__*/ createContext({});
|
|
10
10
|
function CardComponent(props, ref) {
|
|
11
|
-
const $ = c(
|
|
12
|
-
const { children, className, padding: t0,
|
|
11
|
+
const $ = c(79);
|
|
12
|
+
const { children, className, padding: t0, shadow: t1, borderRadius: t2, layout: t3, as: t4, ...rest } = props;
|
|
13
13
|
const padding = t0 === void 0 ? "normal" : t0;
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
14
|
+
const shadow = t1 === void 0 ? true : t1;
|
|
15
|
+
const borderRadius = t2 === void 0 ? "large" : t2;
|
|
16
|
+
const layout = t3 === void 0 ? "default" : t3;
|
|
17
|
+
const as = t4 === void 0 ? "div" : t4;
|
|
17
18
|
const Component = as;
|
|
18
19
|
const generatedId = useId$1();
|
|
19
20
|
const titleId = as === "section" ? generatedId : void 0;
|
|
@@ -28,14 +29,17 @@ function CardComponent(props, ref) {
|
|
|
28
29
|
let t11;
|
|
29
30
|
let t12;
|
|
30
31
|
let t13;
|
|
31
|
-
let
|
|
32
|
+
let t14;
|
|
33
|
+
let t15;
|
|
34
|
+
let t16;
|
|
35
|
+
let t17;
|
|
32
36
|
let t5;
|
|
33
37
|
let t6;
|
|
34
38
|
let t7;
|
|
35
39
|
let t8;
|
|
36
40
|
let t9;
|
|
37
|
-
if ($[0] !== Component || $[1] !== borderRadius || $[2] !== children || $[3] !== className || $[4] !== layout || $[5] !== padding || $[6] !== ref || $[7] !== rest || $[8] !== titleId) {
|
|
38
|
-
|
|
41
|
+
if ($[0] !== Component || $[1] !== borderRadius || $[2] !== children || $[3] !== className || $[4] !== layout || $[5] !== padding || $[6] !== ref || $[7] !== rest || $[8] !== shadow || $[9] !== titleId) {
|
|
42
|
+
t17 = Symbol.for("react.early_return_sentinel");
|
|
39
43
|
bb0: {
|
|
40
44
|
let icon = null;
|
|
41
45
|
let image = null;
|
|
@@ -55,76 +59,82 @@ function CardComponent(props, ref) {
|
|
|
55
59
|
}
|
|
56
60
|
const hasSlotChildren = icon || image || heading || description || metadata || menu;
|
|
57
61
|
if (!hasSlotChildren && childArray.length === 0) {
|
|
58
|
-
|
|
62
|
+
t17 = null;
|
|
59
63
|
break bb0;
|
|
60
64
|
}
|
|
61
65
|
if (!hasSlotChildren) {
|
|
62
|
-
let
|
|
63
|
-
if ($[
|
|
64
|
-
|
|
65
|
-
$[
|
|
66
|
-
$[
|
|
67
|
-
} else
|
|
68
|
-
let
|
|
69
|
-
if ($[
|
|
70
|
-
|
|
71
|
-
$[
|
|
72
|
-
$[
|
|
73
|
-
} else
|
|
74
|
-
let
|
|
75
|
-
if ($[
|
|
76
|
-
|
|
66
|
+
let t18;
|
|
67
|
+
if ($[29] !== titleId) {
|
|
68
|
+
t18 = { titleId };
|
|
69
|
+
$[29] = titleId;
|
|
70
|
+
$[30] = t18;
|
|
71
|
+
} else t18 = $[30];
|
|
72
|
+
let t19;
|
|
73
|
+
if ($[31] !== className) {
|
|
74
|
+
t19 = clsx(Card_module_css_default.Card, className);
|
|
75
|
+
$[31] = className;
|
|
76
|
+
$[32] = t19;
|
|
77
|
+
} else t19 = $[32];
|
|
78
|
+
let t20;
|
|
79
|
+
if ($[33] !== Component || $[34] !== borderRadius || $[35] !== children || $[36] !== layout || $[37] !== padding || $[38] !== ref || $[39] !== rest || $[40] !== shadow || $[41] !== t19) {
|
|
80
|
+
t20 = /* @__PURE__ */ jsx(Component, {
|
|
77
81
|
ref,
|
|
78
|
-
className:
|
|
82
|
+
className: t19,
|
|
79
83
|
"data-component": "Card",
|
|
84
|
+
"data-content": "custom",
|
|
80
85
|
"data-padding": padding,
|
|
86
|
+
"data-shadow": shadow,
|
|
81
87
|
"data-border-radius": borderRadius,
|
|
82
88
|
"data-layout": layout,
|
|
83
89
|
...rest,
|
|
84
90
|
children
|
|
85
91
|
});
|
|
86
|
-
$[
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
93
|
-
$[
|
|
94
|
-
$[
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
92
|
+
$[33] = Component;
|
|
93
|
+
$[34] = borderRadius;
|
|
94
|
+
$[35] = children;
|
|
95
|
+
$[36] = layout;
|
|
96
|
+
$[37] = padding;
|
|
97
|
+
$[38] = ref;
|
|
98
|
+
$[39] = rest;
|
|
99
|
+
$[40] = shadow;
|
|
100
|
+
$[41] = t19;
|
|
101
|
+
$[42] = t20;
|
|
102
|
+
} else t20 = $[42];
|
|
103
|
+
let t21;
|
|
104
|
+
if ($[43] !== t18 || $[44] !== t20) {
|
|
105
|
+
t21 = /* @__PURE__ */ jsx(CardContext.Provider, {
|
|
106
|
+
value: t18,
|
|
107
|
+
children: t20
|
|
101
108
|
});
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
} else
|
|
106
|
-
|
|
109
|
+
$[43] = t18;
|
|
110
|
+
$[44] = t20;
|
|
111
|
+
$[45] = t21;
|
|
112
|
+
} else t21 = $[45];
|
|
113
|
+
t17 = t21;
|
|
107
114
|
break bb0;
|
|
108
115
|
}
|
|
109
116
|
T1 = CardContext.Provider;
|
|
110
|
-
if ($[
|
|
111
|
-
|
|
112
|
-
$[
|
|
113
|
-
$[
|
|
114
|
-
} else
|
|
117
|
+
if ($[46] !== titleId) {
|
|
118
|
+
t16 = { titleId };
|
|
119
|
+
$[46] = titleId;
|
|
120
|
+
$[47] = t16;
|
|
121
|
+
} else t16 = $[47];
|
|
115
122
|
T0 = Component;
|
|
116
|
-
|
|
117
|
-
if ($[
|
|
118
|
-
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
} else
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
t5 = ref;
|
|
124
|
+
if ($[48] !== className) {
|
|
125
|
+
t6 = clsx(Card_module_css_default.Card, className);
|
|
126
|
+
$[48] = className;
|
|
127
|
+
$[49] = t6;
|
|
128
|
+
} else t6 = $[49];
|
|
129
|
+
t7 = "Card";
|
|
130
|
+
t8 = "structured";
|
|
131
|
+
t9 = Boolean(image || icon);
|
|
132
|
+
t10 = padding;
|
|
133
|
+
t11 = shadow;
|
|
134
|
+
t12 = borderRadius;
|
|
135
|
+
t13 = layout;
|
|
136
|
+
t14 = rest;
|
|
137
|
+
t15 = (image || icon) && /* @__PURE__ */ jsx("div", {
|
|
128
138
|
className: clsx(Card_module_css_default.CardHeader, image && Card_module_css_default.CardHeaderEdgeToEdge),
|
|
129
139
|
children: image || icon
|
|
130
140
|
});
|
|
@@ -137,121 +147,134 @@ function CardComponent(props, ref) {
|
|
|
137
147
|
$[5] = padding;
|
|
138
148
|
$[6] = ref;
|
|
139
149
|
$[7] = rest;
|
|
140
|
-
$[8] =
|
|
141
|
-
$[9] =
|
|
142
|
-
$[10] =
|
|
143
|
-
$[11] =
|
|
144
|
-
$[12] =
|
|
145
|
-
$[13] =
|
|
146
|
-
$[14] =
|
|
147
|
-
$[15] =
|
|
148
|
-
$[16] =
|
|
149
|
-
$[17] =
|
|
150
|
-
$[18] =
|
|
151
|
-
$[19] =
|
|
152
|
-
$[20] =
|
|
153
|
-
$[21] =
|
|
154
|
-
$[22] =
|
|
155
|
-
$[23] =
|
|
156
|
-
$[24] =
|
|
150
|
+
$[8] = shadow;
|
|
151
|
+
$[9] = titleId;
|
|
152
|
+
$[10] = T0;
|
|
153
|
+
$[11] = T1;
|
|
154
|
+
$[12] = description;
|
|
155
|
+
$[13] = heading;
|
|
156
|
+
$[14] = menu;
|
|
157
|
+
$[15] = metadata;
|
|
158
|
+
$[16] = t10;
|
|
159
|
+
$[17] = t11;
|
|
160
|
+
$[18] = t12;
|
|
161
|
+
$[19] = t13;
|
|
162
|
+
$[20] = t14;
|
|
163
|
+
$[21] = t15;
|
|
164
|
+
$[22] = t16;
|
|
165
|
+
$[23] = t17;
|
|
166
|
+
$[24] = t5;
|
|
167
|
+
$[25] = t6;
|
|
168
|
+
$[26] = t7;
|
|
169
|
+
$[27] = t8;
|
|
170
|
+
$[28] = t9;
|
|
157
171
|
} else {
|
|
158
|
-
T0 = $[
|
|
159
|
-
T1 = $[
|
|
160
|
-
description = $[
|
|
161
|
-
heading = $[
|
|
162
|
-
menu = $[
|
|
163
|
-
metadata = $[
|
|
164
|
-
t10 = $[
|
|
165
|
-
t11 = $[
|
|
166
|
-
t12 = $[
|
|
167
|
-
t13 = $[
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
T0 = $[10];
|
|
173
|
+
T1 = $[11];
|
|
174
|
+
description = $[12];
|
|
175
|
+
heading = $[13];
|
|
176
|
+
menu = $[14];
|
|
177
|
+
metadata = $[15];
|
|
178
|
+
t10 = $[16];
|
|
179
|
+
t11 = $[17];
|
|
180
|
+
t12 = $[18];
|
|
181
|
+
t13 = $[19];
|
|
182
|
+
t14 = $[20];
|
|
183
|
+
t15 = $[21];
|
|
184
|
+
t16 = $[22];
|
|
185
|
+
t17 = $[23];
|
|
186
|
+
t5 = $[24];
|
|
187
|
+
t6 = $[25];
|
|
188
|
+
t7 = $[26];
|
|
189
|
+
t8 = $[27];
|
|
190
|
+
t9 = $[28];
|
|
174
191
|
}
|
|
175
|
-
if (
|
|
176
|
-
let
|
|
177
|
-
if ($[
|
|
178
|
-
|
|
192
|
+
if (t17 !== Symbol.for("react.early_return_sentinel")) return t17;
|
|
193
|
+
let t18;
|
|
194
|
+
if ($[50] !== description || $[51] !== heading) {
|
|
195
|
+
t18 = /* @__PURE__ */ jsxs("div", {
|
|
179
196
|
className: Card_module_css_default.CardContent,
|
|
180
197
|
children: [heading, description]
|
|
181
198
|
});
|
|
182
|
-
$[
|
|
183
|
-
$[
|
|
184
|
-
$[
|
|
185
|
-
} else
|
|
186
|
-
let
|
|
187
|
-
if ($[
|
|
188
|
-
|
|
199
|
+
$[50] = description;
|
|
200
|
+
$[51] = heading;
|
|
201
|
+
$[52] = t18;
|
|
202
|
+
} else t18 = $[52];
|
|
203
|
+
let t19;
|
|
204
|
+
if ($[53] !== metadata) {
|
|
205
|
+
t19 = metadata ? /* @__PURE__ */ jsx("div", {
|
|
189
206
|
className: Card_module_css_default.CardMetadataContainer,
|
|
190
207
|
children: metadata
|
|
191
208
|
}) : null;
|
|
192
|
-
$[
|
|
193
|
-
$[
|
|
194
|
-
} else
|
|
195
|
-
let
|
|
196
|
-
if ($[
|
|
197
|
-
|
|
209
|
+
$[53] = metadata;
|
|
210
|
+
$[54] = t19;
|
|
211
|
+
} else t19 = $[54];
|
|
212
|
+
let t20;
|
|
213
|
+
if ($[55] !== t18 || $[56] !== t19) {
|
|
214
|
+
t20 = /* @__PURE__ */ jsxs("div", {
|
|
198
215
|
className: Card_module_css_default.CardBody,
|
|
199
|
-
children: [
|
|
216
|
+
children: [t18, t19]
|
|
200
217
|
});
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
204
|
-
} else
|
|
205
|
-
let
|
|
206
|
-
if ($[
|
|
207
|
-
|
|
218
|
+
$[55] = t18;
|
|
219
|
+
$[56] = t19;
|
|
220
|
+
$[57] = t20;
|
|
221
|
+
} else t20 = $[57];
|
|
222
|
+
let t21;
|
|
223
|
+
if ($[58] !== menu) {
|
|
224
|
+
t21 = menu ? /* @__PURE__ */ jsx("div", {
|
|
208
225
|
className: Card_module_css_default.CardAction,
|
|
209
226
|
children: menu
|
|
210
227
|
}) : null;
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
213
|
-
} else
|
|
214
|
-
let
|
|
215
|
-
if ($[
|
|
216
|
-
|
|
217
|
-
ref:
|
|
218
|
-
className:
|
|
219
|
-
"data-component":
|
|
220
|
-
"data-
|
|
221
|
-
"data-
|
|
222
|
-
"data-
|
|
223
|
-
|
|
228
|
+
$[58] = menu;
|
|
229
|
+
$[59] = t21;
|
|
230
|
+
} else t21 = $[59];
|
|
231
|
+
let t22;
|
|
232
|
+
if ($[60] !== T0 || $[61] !== t10 || $[62] !== t11 || $[63] !== t12 || $[64] !== t13 || $[65] !== t14 || $[66] !== t15 || $[67] !== t20 || $[68] !== t21 || $[69] !== t5 || $[70] !== t6 || $[71] !== t7 || $[72] !== t8 || $[73] !== t9) {
|
|
233
|
+
t22 = /* @__PURE__ */ jsxs(T0, {
|
|
234
|
+
ref: t5,
|
|
235
|
+
className: t6,
|
|
236
|
+
"data-component": t7,
|
|
237
|
+
"data-content": t8,
|
|
238
|
+
"data-has-header": t9,
|
|
239
|
+
"data-padding": t10,
|
|
240
|
+
"data-shadow": t11,
|
|
241
|
+
"data-border-radius": t12,
|
|
242
|
+
"data-layout": t13,
|
|
243
|
+
...t14,
|
|
224
244
|
children: [
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
245
|
+
t15,
|
|
246
|
+
t20,
|
|
247
|
+
t21
|
|
228
248
|
]
|
|
229
249
|
});
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
239
|
-
$[
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
250
|
+
$[60] = T0;
|
|
251
|
+
$[61] = t10;
|
|
252
|
+
$[62] = t11;
|
|
253
|
+
$[63] = t12;
|
|
254
|
+
$[64] = t13;
|
|
255
|
+
$[65] = t14;
|
|
256
|
+
$[66] = t15;
|
|
257
|
+
$[67] = t20;
|
|
258
|
+
$[68] = t21;
|
|
259
|
+
$[69] = t5;
|
|
260
|
+
$[70] = t6;
|
|
261
|
+
$[71] = t7;
|
|
262
|
+
$[72] = t8;
|
|
263
|
+
$[73] = t9;
|
|
264
|
+
$[74] = t22;
|
|
265
|
+
} else t22 = $[74];
|
|
266
|
+
let t23;
|
|
267
|
+
if ($[75] !== T1 || $[76] !== t16 || $[77] !== t22) {
|
|
268
|
+
t23 = /* @__PURE__ */ jsx(T1, {
|
|
269
|
+
value: t16,
|
|
270
|
+
children: t22
|
|
248
271
|
});
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
253
|
-
} else
|
|
254
|
-
return
|
|
272
|
+
$[75] = T1;
|
|
273
|
+
$[76] = t16;
|
|
274
|
+
$[77] = t22;
|
|
275
|
+
$[78] = t23;
|
|
276
|
+
} else t23 = $[78];
|
|
277
|
+
return t23;
|
|
255
278
|
}
|
|
256
279
|
CardComponent.displayName = "Card";
|
|
257
280
|
const CardImpl = fixedForwardRef(CardComponent);
|
|
@@ -394,6 +417,108 @@ const CardHeading = /*#__PURE__*/ forwardRef(function CardHeading(t0, ref) {
|
|
|
394
417
|
return t4;
|
|
395
418
|
});
|
|
396
419
|
CardHeading.displayName = "Card.Heading";
|
|
420
|
+
/**
|
|
421
|
+
* Place inside Card.Heading and set fullCardHitArea for whole-card navigation.
|
|
422
|
+
* Keep secondary controls outside the link, in Card.Action or Card.Metadata.
|
|
423
|
+
*/
|
|
424
|
+
const CardLink = /*#__PURE__*/ forwardRef(function CardLink(t0, ref) {
|
|
425
|
+
const $ = c(13);
|
|
426
|
+
let children;
|
|
427
|
+
let className;
|
|
428
|
+
let rest;
|
|
429
|
+
let t1;
|
|
430
|
+
if ($[0] !== t0) {
|
|
431
|
+
({children, className, fullCardHitArea: t1, ...rest} = t0);
|
|
432
|
+
$[0] = t0;
|
|
433
|
+
$[1] = children;
|
|
434
|
+
$[2] = className;
|
|
435
|
+
$[3] = rest;
|
|
436
|
+
$[4] = t1;
|
|
437
|
+
} else {
|
|
438
|
+
children = $[1];
|
|
439
|
+
className = $[2];
|
|
440
|
+
rest = $[3];
|
|
441
|
+
t1 = $[4];
|
|
442
|
+
}
|
|
443
|
+
const fullCardHitArea = t1 === void 0 ? false : t1;
|
|
444
|
+
let t2;
|
|
445
|
+
if ($[5] !== className) {
|
|
446
|
+
t2 = clsx(Card_module_css_default.CardPrimaryAction, className);
|
|
447
|
+
$[5] = className;
|
|
448
|
+
$[6] = t2;
|
|
449
|
+
} else t2 = $[6];
|
|
450
|
+
let t3;
|
|
451
|
+
if ($[7] !== children || $[8] !== fullCardHitArea || $[9] !== ref || $[10] !== rest || $[11] !== t2) {
|
|
452
|
+
t3 = /* @__PURE__ */ jsx("a", {
|
|
453
|
+
...rest,
|
|
454
|
+
ref,
|
|
455
|
+
className: t2,
|
|
456
|
+
"data-component": "Card.Link",
|
|
457
|
+
"data-full-card-hit-area": fullCardHitArea,
|
|
458
|
+
children
|
|
459
|
+
});
|
|
460
|
+
$[7] = children;
|
|
461
|
+
$[8] = fullCardHitArea;
|
|
462
|
+
$[9] = ref;
|
|
463
|
+
$[10] = rest;
|
|
464
|
+
$[11] = t2;
|
|
465
|
+
$[12] = t3;
|
|
466
|
+
} else t3 = $[12];
|
|
467
|
+
return t3;
|
|
468
|
+
});
|
|
469
|
+
CardLink.displayName = "Card.Link";
|
|
470
|
+
/**
|
|
471
|
+
* Place inside Card.Heading and set fullCardHitArea for a whole-card action.
|
|
472
|
+
* Native button semantics provide Enter, Space, and disabled support.
|
|
473
|
+
*/
|
|
474
|
+
const CardButton = /*#__PURE__*/ forwardRef(function CardButton(t0, ref) {
|
|
475
|
+
const $ = c(13);
|
|
476
|
+
let className;
|
|
477
|
+
let rest;
|
|
478
|
+
let t1;
|
|
479
|
+
let t2;
|
|
480
|
+
if ($[0] !== t0) {
|
|
481
|
+
({className, type: t1, fullCardHitArea: t2, ...rest} = t0);
|
|
482
|
+
$[0] = t0;
|
|
483
|
+
$[1] = className;
|
|
484
|
+
$[2] = rest;
|
|
485
|
+
$[3] = t1;
|
|
486
|
+
$[4] = t2;
|
|
487
|
+
} else {
|
|
488
|
+
className = $[1];
|
|
489
|
+
rest = $[2];
|
|
490
|
+
t1 = $[3];
|
|
491
|
+
t2 = $[4];
|
|
492
|
+
}
|
|
493
|
+
const type = t1 === void 0 ? "button" : t1;
|
|
494
|
+
const fullCardHitArea = t2 === void 0 ? false : t2;
|
|
495
|
+
const t3 = type === "submit" ? "submit" : type === "reset" ? "reset" : "button";
|
|
496
|
+
let t4;
|
|
497
|
+
if ($[5] !== className) {
|
|
498
|
+
t4 = clsx(Card_module_css_default.CardPrimaryAction, className);
|
|
499
|
+
$[5] = className;
|
|
500
|
+
$[6] = t4;
|
|
501
|
+
} else t4 = $[6];
|
|
502
|
+
let t5;
|
|
503
|
+
if ($[7] !== fullCardHitArea || $[8] !== ref || $[9] !== rest || $[10] !== t3 || $[11] !== t4) {
|
|
504
|
+
t5 = /* @__PURE__ */ jsx("button", {
|
|
505
|
+
...rest,
|
|
506
|
+
ref,
|
|
507
|
+
type: t3,
|
|
508
|
+
className: t4,
|
|
509
|
+
"data-component": "Card.Button",
|
|
510
|
+
"data-full-card-hit-area": fullCardHitArea
|
|
511
|
+
});
|
|
512
|
+
$[7] = fullCardHitArea;
|
|
513
|
+
$[8] = ref;
|
|
514
|
+
$[9] = rest;
|
|
515
|
+
$[10] = t3;
|
|
516
|
+
$[11] = t4;
|
|
517
|
+
$[12] = t5;
|
|
518
|
+
} else t5 = $[12];
|
|
519
|
+
return t5;
|
|
520
|
+
});
|
|
521
|
+
CardButton.displayName = "Card.Button";
|
|
397
522
|
const CardDescription = /*#__PURE__*/ forwardRef(function CardDescription(t0, ref) {
|
|
398
523
|
const $ = c(11);
|
|
399
524
|
let children;
|
|
@@ -497,4 +622,4 @@ const CardMetadata = /*#__PURE__*/ forwardRef(function CardMetadata(t0, ref) {
|
|
|
497
622
|
});
|
|
498
623
|
CardMetadata.displayName = "Card.Metadata";
|
|
499
624
|
//#endregion
|
|
500
|
-
export { CardAction, CardDescription, CardHeading, CardIcon, CardImage, CardImpl, CardMetadata };
|
|
625
|
+
export { CardAction, CardButton, CardDescription, CardHeading, CardIcon, CardImage, CardImpl, CardLink, CardMetadata };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./Card-
|
|
1
|
+
import "./Card-0e84ee3c.css";
|
|
2
2
|
//#region src/Card/Card.module.css.js
|
|
3
3
|
var Card_module_css_default = {
|
|
4
4
|
"Card": "prc-Card-Card-pYjuL",
|
|
@@ -9,6 +9,7 @@ var Card_module_css_default = {
|
|
|
9
9
|
"CardBody": "prc-Card-CardBody-W1o-l",
|
|
10
10
|
"CardContent": "prc-Card-CardContent-omZDS",
|
|
11
11
|
"CardHeading": "prc-Card-CardHeading-3HXyS",
|
|
12
|
+
"CardPrimaryAction": "prc-Card-CardPrimaryAction-2mRXB",
|
|
12
13
|
"CardDescription": "prc-Card-CardDescription-MnJ3F",
|
|
13
14
|
"CardMetadataContainer": "prc-Card-CardMetadataContainer-K-UlH",
|
|
14
15
|
"CardMetadataItem": "prc-Card-CardMetadataItem-ellY9",
|
package/dist/Card/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { DistributiveOmit } from "../utils/modern-polymorphic.js";
|
|
2
|
-
import { CardAction, CardActionProps as ActionProps, CardDescriptionProps as DescriptionProps, CardHeadingProps as HeadingProps, CardIcon, CardIconProps as IconProps, CardImage, CardImageProps as ImageProps, CardMetadataProps as MetadataProps, CardProps } from "./Card.js";
|
|
2
|
+
import { CardAction, CardActionProps as ActionProps, CardButtonProps as ButtonProps, CardDescriptionProps as DescriptionProps, CardHeadingProps as HeadingProps, CardIcon, CardIconProps as IconProps, CardImage, CardImageProps as ImageProps, CardLinkProps as LinkProps, CardMetadataProps as MetadataProps, CardProps } from "./Card.js";
|
|
3
3
|
|
|
4
4
|
//#region src/Card/index.d.ts
|
|
5
5
|
declare const Card: (<As extends "div" | "section">(props: DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "div" : As>, "as"> & Omit<{
|
|
6
6
|
className?: string;
|
|
7
|
-
padding?: "none" | "condensed" | "normal";
|
|
7
|
+
padding?: "none" | "condensed" | "regular" | "spacious" | "normal";
|
|
8
|
+
shadow?: boolean;
|
|
8
9
|
borderRadius?: "medium" | "large";
|
|
9
10
|
layout?: "default" | "compact";
|
|
10
11
|
children: React.ReactNode;
|
|
@@ -17,6 +18,15 @@ declare const Card: (<As extends "div" | "section">(props: DistributiveOmit<impo
|
|
|
17
18
|
as?: "h2" | "h3" | "h4" | "h5" | "h6";
|
|
18
19
|
children: React.ReactNode;
|
|
19
20
|
} & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
21
|
+
Link: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
22
|
+
href: string;
|
|
23
|
+
fullCardHitArea?: boolean;
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
26
|
+
Button: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
27
|
+
fullCardHitArea?: boolean;
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
20
30
|
Description: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
21
31
|
children: React.ReactNode;
|
|
22
32
|
} & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
@@ -26,4 +36,4 @@ declare const Card: (<As extends "div" | "section">(props: DistributiveOmit<impo
|
|
|
26
36
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
27
37
|
};
|
|
28
38
|
//#endregion
|
|
29
|
-
export { Card, type ActionProps as CardActionProps, type DescriptionProps as CardDescriptionProps, type HeadingProps as CardHeadingProps, type IconProps as CardIconProps, type ImageProps as CardImageProps, type MetadataProps as CardMetadataProps, type CardProps };
|
|
39
|
+
export { Card, type ActionProps as CardActionProps, type ButtonProps as CardButtonProps, type DescriptionProps as CardDescriptionProps, type HeadingProps as CardHeadingProps, type IconProps as CardIconProps, type ImageProps as CardImageProps, type LinkProps as CardLinkProps, type MetadataProps as CardMetadataProps, type CardProps };
|
package/dist/Card/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { CardAction, CardDescription, CardHeading, CardIcon, CardImage, CardImpl, CardMetadata } from "./Card.js";
|
|
1
|
+
import { CardAction, CardButton, CardDescription, CardHeading, CardIcon, CardImage, CardImpl, CardLink, CardMetadata } from "./Card.js";
|
|
2
2
|
//#region src/Card/index.ts
|
|
3
3
|
const Card = Object.assign(CardImpl, {
|
|
4
4
|
Icon: CardIcon,
|
|
5
5
|
Image: CardImage,
|
|
6
6
|
Heading: CardHeading,
|
|
7
|
+
Link: CardLink,
|
|
8
|
+
Button: CardButton,
|
|
7
9
|
Description: CardDescription,
|
|
8
10
|
Action: CardAction,
|
|
9
11
|
Metadata: CardMetadata
|
|
@@ -25,7 +25,7 @@ import { ActionsProps, PageHeader, PageHeaderProps, TitleProps } from "../PageHe
|
|
|
25
25
|
import { SkeletonBox, SkeletonBoxProps } from "../Skeleton/SkeletonBox.js";
|
|
26
26
|
import { BlankslateProps } from "../Blankslate/Blankslate.js";
|
|
27
27
|
import { Blankslate as BlankslateContainer } from "../Blankslate/index.js";
|
|
28
|
-
import { CardActionProps as ActionProps, CardDescriptionProps as DescriptionProps, CardHeadingProps as HeadingProps, CardIconProps as IconProps, CardImageProps as ImageProps, CardMetadataProps as MetadataProps, CardProps } from "../Card/Card.js";
|
|
28
|
+
import { CardActionProps as ActionProps, CardButtonProps as ButtonProps, CardDescriptionProps as DescriptionProps, CardHeadingProps as HeadingProps, CardIconProps as IconProps, CardImageProps as ImageProps, CardLinkProps as LinkProps, CardMetadataProps as MetadataProps, CardProps } from "../Card/Card.js";
|
|
29
29
|
import { Card } from "../Card/index.js";
|
|
30
30
|
import { TableBulkActionsProps } from "../DataTable/TableBulkActions.js";
|
|
31
31
|
import { DataTable, DataTableBulkActionsContext, DataTableProps } from "../DataTable/DataTable.js";
|
|
@@ -52,4 +52,4 @@ import { useTabPanel } from "./Tabs/useTabPanel.js";
|
|
|
52
52
|
import { TopicTagProps } from "../TopicTag/TopicTag.js";
|
|
53
53
|
import { TopicTagGroupProps } from "../TopicTag/TopicTagGroup.js";
|
|
54
54
|
import { TopicTag } from "../TopicTag/index.js";
|
|
55
|
-
export { ActionBar, type ActionBarButtonProps, type ActionBarMenuItemProps, type ActionBarMenuProps, type ActionBarProps, Announce, type AnnounceProps, AriaAlert, type AriaAlertProps, AriaStatus, type AriaStatusProps, BlankslateContainer as Blankslate, type BlankslateProps, ButtonBase, type ButtonBaseProps, Card, type ActionProps as CardActionProps, type DescriptionProps as CardDescriptionProps, type HeadingProps as CardHeadingProps, type IconProps as CardIconProps, type ImageProps as CardImageProps, type MetadataProps as CardMetadataProps, type CardProps, type CellAlignment, type Column, type ColumnWidth, DataTable, type DataTableBulkActionsContext, type DataTableData, type DataTableProps, type DataTableRowGroup, type DataTableRowId, DefaultFeatureFlags, Dialog, type DialogButtonProps, type DialogHeaderProps, type DialogHeight, type DialogProps, type DialogWidth, FeatureFlags, type FeatureFlagsProps, FilteredActionList, type FilteredActionListInputProps, FilteredActionListLoadingTypes, type FilteredActionListProps, Hidden, type HiddenProps, InlineMessage, type InlineMessageProps, IssueLabel, type IssueLabelProps, KeybindingHint, type KeybindingHintProps, NavList, type NavListDividerProps, type NavListGroupProps, type NavListItemProps, type NavListLeadingVisualProps, type NavListProps, type NavListSubNavProps, type NavListTrailingVisualProps, type ObjectPaths, PageHeader, type ActionsProps as PageHeaderActionsProps, type PageHeaderProps, type TitleProps as PageHeaderTitleProps, ScrollableRegion, type ScrollableRegionProps, SelectPanel, type SelectPanelMessageProps, type SelectPanelProps, type SelectPanelSecondaryActionProps, SkeletonAvatar, type SkeletonAvatarProps, SkeletonBox, type SkeletonBoxProps, SkeletonText, type SkeletonTextProps, SlotConfig, Stack, type StackItemProps, type StackProps, type TabListProps, type TabPanelProps, type TabProps, Table, type TableActionsProps, type TableBodyProps, type TableBulkActionsProps, type TableCellProps, type TableContainerProps, type TableGroupProps, type TableHeadProps, type TableHeaderProps, type TableProps, type TableRowProps, type TableRowSelectionProps, type TableSelectionHeaderProps, type TableSubtitleProps, type TableTitleProps, Tabs, type TabsProps, type TitleProps, Tooltip, type TooltipProps, TopicTag, type TopicTagGroupProps, type TopicTagProps, _default as UnderlinePanels, type PanelProps as UnderlinePanelsPanelProps, type UnderlinePanelsProps, type TabProps$1 as UnderlinePanelsTabProps, type UniqueRow, createColumnHelper, getAccessibleKeybindingHintString, useFeatureFlag, useOverflow, useSlots, useTab, useTabList, useTabPanel };
|
|
55
|
+
export { ActionBar, type ActionBarButtonProps, type ActionBarMenuItemProps, type ActionBarMenuProps, type ActionBarProps, Announce, type AnnounceProps, AriaAlert, type AriaAlertProps, AriaStatus, type AriaStatusProps, BlankslateContainer as Blankslate, type BlankslateProps, ButtonBase, type ButtonBaseProps, Card, type ActionProps as CardActionProps, type ButtonProps as CardButtonProps, type DescriptionProps as CardDescriptionProps, type HeadingProps as CardHeadingProps, type IconProps as CardIconProps, type ImageProps as CardImageProps, type LinkProps as CardLinkProps, type MetadataProps as CardMetadataProps, type CardProps, type CellAlignment, type Column, type ColumnWidth, DataTable, type DataTableBulkActionsContext, type DataTableData, type DataTableProps, type DataTableRowGroup, type DataTableRowId, DefaultFeatureFlags, Dialog, type DialogButtonProps, type DialogHeaderProps, type DialogHeight, type DialogProps, type DialogWidth, FeatureFlags, type FeatureFlagsProps, FilteredActionList, type FilteredActionListInputProps, FilteredActionListLoadingTypes, type FilteredActionListProps, Hidden, type HiddenProps, InlineMessage, type InlineMessageProps, IssueLabel, type IssueLabelProps, KeybindingHint, type KeybindingHintProps, NavList, type NavListDividerProps, type NavListGroupProps, type NavListItemProps, type NavListLeadingVisualProps, type NavListProps, type NavListSubNavProps, type NavListTrailingVisualProps, type ObjectPaths, PageHeader, type ActionsProps as PageHeaderActionsProps, type PageHeaderProps, type TitleProps as PageHeaderTitleProps, ScrollableRegion, type ScrollableRegionProps, SelectPanel, type SelectPanelMessageProps, type SelectPanelProps, type SelectPanelSecondaryActionProps, SkeletonAvatar, type SkeletonAvatarProps, SkeletonBox, type SkeletonBoxProps, SkeletonText, type SkeletonTextProps, SlotConfig, Stack, type StackItemProps, type StackProps, type TabListProps, type TabPanelProps, type TabProps, Table, type TableActionsProps, type TableBodyProps, type TableBulkActionsProps, type TableCellProps, type TableContainerProps, type TableGroupProps, type TableHeadProps, type TableHeaderProps, type TableProps, type TableRowProps, type TableRowSelectionProps, type TableSelectionHeaderProps, type TableSubtitleProps, type TableTitleProps, Tabs, type TabsProps, type TitleProps, Tooltip, type TooltipProps, TopicTag, type TopicTagGroupProps, type TopicTagProps, _default as UnderlinePanels, type PanelProps as UnderlinePanelsPanelProps, type UnderlinePanelsProps, type TabProps$1 as UnderlinePanelsTabProps, type UniqueRow, createColumnHelper, getAccessibleKeybindingHintString, useFeatureFlag, useOverflow, useSlots, useTab, useTabList, useTabPanel };
|
|
@@ -2192,6 +2192,22 @@
|
|
|
2192
2192
|
"id": "experimental-components-card-features--with-image",
|
|
2193
2193
|
"code": "() => {\n return (\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 )\n}"
|
|
2194
2194
|
},
|
|
2195
|
+
{
|
|
2196
|
+
"id": "experimental-components-card-features--compact",
|
|
2197
|
+
"code": "() => {\n return (\n <Card layout=\"compact\">\n <Card.Icon icon={RepoIcon} />\n <Card.Heading>primer/react</Card.Heading>\n <Card.Description>\n The compact layout uses tighter spacing, an icon without a background\n container, and a smaller title.\n </Card.Description>\n <Card.Metadata>\n <StarIcon size={16} />\n 1.2k stars\n </Card.Metadata>\n </Card>\n )\n}"
|
|
2198
|
+
},
|
|
2199
|
+
{
|
|
2200
|
+
"id": "experimental-components-card-features--with-link",
|
|
2201
|
+
"code": "({ fullCardHitArea }) => (\n <Card shadow={false} padding=\"regular\">\n <Card.Icon icon={RepoIcon} />\n <Card.Heading>\n <Card.Link href=\"#primer-react\" fullCardHitArea={fullCardHitArea}>\n primer/react\n </Card.Link>\n </Card.Heading>\n <Card.Description>\n Use fullCardHitArea to make the entire card a link. The Star action\n remains separate.\n </Card.Description>\n <Card.Metadata>\n <Button leadingVisual={StarIcon} size=\"small\">\n Star <VisuallyHidden>primer/react</VisuallyHidden>\n </Button>\n </Card.Metadata>\n <Card.Action>\n <IconButton\n icon={KebabHorizontalIcon}\n aria-label=\"More options for primer/react\"\n variant=\"invisible\"\n />\n </Card.Action>\n </Card>\n)"
|
|
2202
|
+
},
|
|
2203
|
+
{
|
|
2204
|
+
"id": "experimental-components-card-features--with-button",
|
|
2205
|
+
"code": "({ fullCardHitArea }) => {\n const [opened, setOpened] = useState(false)\n return (\n <div className={classes.CardList}>\n <Card layout=\"compact\" padding=\"regular\" shadow={false}>\n <Card.Icon icon={RepoIcon} />\n <Card.Heading>\n <Card.Button\n onClick={() => setOpened(true)}\n fullCardHitArea={fullCardHitArea}\n >\n Open repository details\n </Card.Button>\n </Card.Heading>\n <Card.Description>\n Use a button for an action that does not navigate to another page.\n </Card.Description>\n </Card>\n <Card>\n <Card.Heading>\n <Card.Button disabled fullCardHitArea={fullCardHitArea}>\n Repository details unavailable\n </Card.Button>\n </Card.Heading>\n <Card.Description>\n A disabled primary action cannot be activated.\n </Card.Description>\n </Card>\n {opened && (\n <section aria-label=\"Repository details\">\n <h3>primer/react</h3>\n <p>{\"React components for GitHub's Primer Design System.\"}</p>\n <Button onClick={() => setOpened(false)}>\n Close repository details\n </Button>\n </section>\n )}\n </div>\n )\n}"
|
|
2206
|
+
},
|
|
2207
|
+
{
|
|
2208
|
+
"id": "experimental-components-card-features--custom-content",
|
|
2209
|
+
"code": "() => {\n const [pinned, setPinned] = useState<string[]>([])\n return (\n <div className={classes.EqualHeightGrid}>\n {[\n 'primer/react',\n 'primer/primitives-with-a-long-unbroken-repository-name',\n ].map((name, index) => (\n <Card key={name} padding=\"regular\" borderRadius=\"medium\" shadow={false}>\n <div className={classes.ComposedBody}>\n <div className={classes.ComposedHeader}>\n <Card.Heading className={classes.ComposedHeading}>\n <Card.Link href={`#${name}`} fullCardHitArea>\n {name}\n </Card.Link>\n </Card.Heading>\n <IconButton\n icon={PinIcon}\n variant=\"invisible\"\n size=\"small\"\n aria-label={`Pin ${name}`}\n aria-pressed={pinned.includes(name)}\n onClick={() =>\n setPinned((value) =>\n value.includes(name)\n ? value.filter((item) => item !== name)\n : [...value, name],\n )\n }\n />\n </div>\n <Card.Description>\n {index === 0\n ? 'React components.'\n : 'Design tokens for color, spacing, typography, and motion, shared across GitHub interfaces.'}\n </Card.Description>\n <div className={classes.ComposedFooter}>\n <Button size=\"small\" leadingVisual={StarIcon}>\n Star <VisuallyHidden>{name}</VisuallyHidden>\n </Button>\n <ActionMenu>\n <ActionMenu.Anchor>\n <IconButton\n icon={KebabHorizontalIcon}\n variant=\"invisible\"\n size=\"small\"\n aria-label={`More options for ${name}`}\n />\n </ActionMenu.Anchor>\n <ActionMenu.Overlay>\n <ActionList>\n <ActionList.LinkItem href={`#settings-${name}`}>\n Repository settings\n </ActionList.LinkItem>\n </ActionList>\n </ActionMenu.Overlay>\n </ActionMenu>\n </div>\n </div>\n </Card>\n ))}\n </div>\n )\n}"
|
|
2210
|
+
},
|
|
2195
2211
|
{
|
|
2196
2212
|
"id": "experimental-components-card-features--with-metadata",
|
|
2197
2213
|
"code": "() => {\n return (\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 )\n}"
|
|
@@ -2218,7 +2234,7 @@
|
|
|
2218
2234
|
"name": "children",
|
|
2219
2235
|
"type": "React.ReactNode",
|
|
2220
2236
|
"required": true,
|
|
2221
|
-
"description": "The contents of the card. Provide either `Card.*` subcomponents (for example `Card.Heading`, `Card.Description`, `Card.Metadata`) or
|
|
2237
|
+
"description": "The contents of the card. Provide either direct `Card.*` subcomponents (for example `Card.Heading`, `Card.Description`, `Card.Metadata`) for the predefined layout or a custom wrapper for free-form composition. A custom wrapper fills the available card height, allowing a flex-column body with margin-top: auto on footer actions. Grid parents stretch cards by default; when cards are wrapped in list items, consumers must also make the cards fill those items. A card with no children will not render."
|
|
2222
2238
|
},
|
|
2223
2239
|
{
|
|
2224
2240
|
"name": "className",
|
|
@@ -2227,9 +2243,21 @@
|
|
|
2227
2243
|
},
|
|
2228
2244
|
{
|
|
2229
2245
|
"name": "padding",
|
|
2230
|
-
"type": "'none' | 'condensed' | 'normal'",
|
|
2246
|
+
"type": "'none' | 'condensed' | 'regular' | 'spacious' | 'normal'",
|
|
2231
2247
|
"defaultValue": "'normal'",
|
|
2232
|
-
"description": "
|
|
2248
|
+
"description": "Internal padding: none is 0px, condensed is 8px, regular is 16px, and spacious is 24px in either layout. The default normal padding remains 24px in the default layout and 16px in compact layout for compatibility."
|
|
2249
|
+
},
|
|
2250
|
+
{
|
|
2251
|
+
"name": "shadow",
|
|
2252
|
+
"type": "boolean",
|
|
2253
|
+
"defaultValue": "true",
|
|
2254
|
+
"description": "Whether to show the Card shadow. Set to false for a bordered, shadowless card in dense dashboards."
|
|
2255
|
+
},
|
|
2256
|
+
{
|
|
2257
|
+
"name": "layout",
|
|
2258
|
+
"type": "'default' | 'compact'",
|
|
2259
|
+
"defaultValue": "'default'",
|
|
2260
|
+
"description": "Compact layout places the icon beside the content, removes its background container, and uses a smaller heading and tighter spacing."
|
|
2233
2261
|
},
|
|
2234
2262
|
{
|
|
2235
2263
|
"name": "borderRadius",
|
|
@@ -2287,6 +2315,57 @@
|
|
|
2287
2315
|
}
|
|
2288
2316
|
]
|
|
2289
2317
|
},
|
|
2318
|
+
{
|
|
2319
|
+
"name": "Card.Link",
|
|
2320
|
+
"props": [
|
|
2321
|
+
{
|
|
2322
|
+
"name": "fullCardHitArea",
|
|
2323
|
+
"type": "boolean",
|
|
2324
|
+
"defaultValue": "false",
|
|
2325
|
+
"description": "Expand the link's hit area over the entire card, with card-wide hover and keyboard focus indicators. By default, only the link itself is clickable and receives a focus ring."
|
|
2326
|
+
},
|
|
2327
|
+
{
|
|
2328
|
+
"name": "href",
|
|
2329
|
+
"type": "string",
|
|
2330
|
+
"required": true,
|
|
2331
|
+
"description": "Navigation destination. Place Card.Link inside Card.Heading. The native link supplies keyboard activation, modifier-click, and browser context menus. Set fullCardHitArea to extend its hit area over the card; use only one expanded Card.Link or Card.Button per card. Do not nest interactive controls inside the link. Secondary native controls can be placed in Card.Action, Card.Metadata, or custom headers and footers; Card layers them above the expanded hit area. When fullCardHitArea is enabled, keep wrappers between the link and Card unpositioned, and note that other card text cannot be selected with a pointer. Leave fullCardHitArea disabled when text selection is needed."
|
|
2332
|
+
},
|
|
2333
|
+
{
|
|
2334
|
+
"name": "children",
|
|
2335
|
+
"type": "React.ReactNode",
|
|
2336
|
+
"required": true,
|
|
2337
|
+
"description": "Descriptive link text, used as the accessible name rather than the entire card contents. Accepts native anchor attributes and forwards its ref to the anchor."
|
|
2338
|
+
}
|
|
2339
|
+
]
|
|
2340
|
+
},
|
|
2341
|
+
{
|
|
2342
|
+
"name": "Card.Button",
|
|
2343
|
+
"props": [
|
|
2344
|
+
{
|
|
2345
|
+
"name": "fullCardHitArea",
|
|
2346
|
+
"type": "boolean",
|
|
2347
|
+
"defaultValue": "false",
|
|
2348
|
+
"description": "Expand the button's hit area over the entire card, with card-wide hover and keyboard focus indicators. By default, only the button itself is clickable and receives a focus ring."
|
|
2349
|
+
},
|
|
2350
|
+
{
|
|
2351
|
+
"name": "children",
|
|
2352
|
+
"type": "React.ReactNode",
|
|
2353
|
+
"required": true,
|
|
2354
|
+
"description": "Descriptive action text. Place Card.Button inside Card.Heading for an action that does not navigate. The native button supplies Enter/Space activation and disabled behavior. Consumers provide the accessible name and onClick handler. Set fullCardHitArea for a whole-card action; use only one expanded Card.Link or Card.Button per card. Put secondary controls outside the button, in Card.Action, Card.Metadata, or custom headers and footers. When fullCardHitArea is enabled, keep wrappers between the button and Card unpositioned. Accepts native button attributes and forwards its ref to the button."
|
|
2355
|
+
},
|
|
2356
|
+
{
|
|
2357
|
+
"name": "type",
|
|
2358
|
+
"type": "'button' | 'submit' | 'reset'",
|
|
2359
|
+
"defaultValue": "'button'",
|
|
2360
|
+
"description": "Native button type. Defaults to button to avoid accidentally submitting a surrounding form."
|
|
2361
|
+
},
|
|
2362
|
+
{
|
|
2363
|
+
"name": "disabled",
|
|
2364
|
+
"type": "boolean",
|
|
2365
|
+
"description": "Disables the button, including its expanded hit area when fullCardHitArea is enabled, and removes it from the tab order. Secondary controls remain independent."
|
|
2366
|
+
}
|
|
2367
|
+
]
|
|
2368
|
+
},
|
|
2290
2369
|
{
|
|
2291
2370
|
"name": "Card.Description",
|
|
2292
2371
|
"props": [
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
.prc-Card-Card-pYjuL{background-color:var(--bgColor-default,#fff);border:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,#d1d9e0);box-shadow:var(--shadow-resting-small,0 1px 1px 0 #1f23280a,0 1px 2px 0 #1f232808);display:grid;gap:var(--stack-gap-normal,1rem);grid-auto-rows:max-content auto;overflow:hidden;position:relative}.prc-Card-Card-pYjuL[data-border-radius=large]{border-radius:var(--borderRadius-large,.75rem)}.prc-Card-Card-pYjuL[data-border-radius=medium]{border-radius:var(--borderRadius-medium,.375rem)}.prc-Card-Card-pYjuL[data-padding=normal]{padding:var(--stack-padding-spacious,1.5rem)}.prc-Card-Card-pYjuL[data-padding=condensed]{padding:var(--stack-padding-condensed,.5rem)}.prc-Card-Card-pYjuL[data-padding=none]{padding:0}.prc-Card-Card-pYjuL[data-layout=compact]{align-items:flex-start;display:flex;gap:var(--stack-gap-condensed,.5rem)}.prc-Card-Card-pYjuL[data-layout=compact][data-padding=normal]{padding:var(--stack-padding-normal,1rem)}.prc-Card-CardHeader-P5Qbb{display:block;height:auto;width:100%}.prc-Card-Card-pYjuL:where([data-layout=compact]) .prc-Card-CardHeader-P5Qbb{flex:0 0 auto;width:auto}.prc-Card-CardHeaderEdgeToEdge-3yCqT{margin-left:calc(var(--stack-padding-spacious,1.5rem)*-1);margin-right:calc(var(--stack-padding-spacious,1.5rem)*-1);margin-top:calc(var(--stack-padding-spacious,1.5rem)*-1);width:calc(100% + var(--stack-padding-spacious,1.5rem)*2)}.prc-Card-CardImage-2M8DM{display:block;height:auto;width:100%}.prc-Card-CardIcon-mIMfj{align-items:center;color:var(--fgColor-muted,#59636e);display:flex;justify-content:flex-start}.prc-Card-Card-pYjuL:where([data-layout=default]) .prc-Card-CardIcon-mIMfj{background-color:var(--bgColor-muted,#f6f8fa);border-radius:var(--borderRadius-medium,.375rem);height:var(--base-size-32,2rem);justify-content:center;width:var(--base-size-32,2rem)}.prc-Card-CardBody-W1o-l{display:grid;gap:var(--stack-gap-normal,1rem)}.prc-Card-Card-pYjuL:where([data-layout=compact]) .prc-Card-CardBody-W1o-l{flex:1 1 auto}.prc-Card-CardContent-omZDS{display:grid;gap:var(--stack-gap-condensed,.5rem)}.prc-Card-CardHeading-3HXyS{color:var(--fgColor-default,#1f2328);font:var(--text-title-shorthand-small,600 1rem/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji");margin:0}.prc-Card-Card-pYjuL:where([data-layout=compact]) .prc-Card-CardHeading-3HXyS{font-size:var(--text-body-size-medium,.875rem);position:relative;top:calc(var(--base-size-4,.25rem)*-1)}.prc-Card-CardDescription-MnJ3F{margin:0}.prc-Card-CardDescription-MnJ3F,.prc-Card-CardMetadataContainer-K-UlH{color:var(--fgColor-muted,#59636e);font:var(--text-body-shorthand-medium,400 .875rem/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji")}.prc-Card-CardMetadataContainer-K-UlH{align-items:center;display:flex;gap:var(--stack-gap-normal,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(--stack-gap-condensed,.5rem)}.prc-Card-CardAction-VtI49{position:absolute;right:var(--base-size-16,1rem);top:var(--base-size-16,1rem);z-index:1}
|
|
2
|
-
/*# sourceMappingURL=Card-59b77d05.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Card/Card.module.css.js"],"names":[],"mappings":"AAAA,qBAOE,4CAAwC,CAFxC,gFAAgE,CAChE,kFAAuC,CALvC,YAAa,CAOb,gCAA4B,CAJ5B,+BAAgC,CADhC,eAAgB,CADhB,iBAwCF,CAhCE,+CACE,8CACF,CAEA,gDACE,gDACF,CAEA,0CAEE,4CACF,CAEA,6CAEE,4CACF,CAEA,wCACE,SACF,CAEA,0CAEE,sBAAuB,CADvB,YAAa,CAEb,oCACF,CAEA,+DAEE,wCACF,CAGF,2BACE,aAAc,CAEd,WAAY,CADZ,UAOF,CAJE,6EACE,aAAc,CACd,UACF,CAGF,qCAIE,yDAAqD,CADrD,0DAAsD,CADtD,wDAAoD,CAGpD,yDAEF,CAEA,0BACE,aAAc,CAEd,WAAY,CADZ,UAEF,CAEA,yBAEE,kBAAmB,CAEnB,kCAA2B,CAH3B,YAAa,CAEb,0BAUF,CAPE,2EAKE,6CAAsC,CADtC,gDAAyC,CADzC,+BAA2B,CAF3B,sBAAuB,CACvB,8BAIF,CAGF,yBACE,YAAa,CACb,gCAKF,CAHE,2EACE,aACF,CAGF,4BACE,YAAa,CACb,oCACF,CAEA,4BAEE,oCAA6B,CAD7B,2KAAuC,CAEvC,QAOF,CALE,8EAGE,8CAAuC,CAFvC,iBAAkB,CAClB,sCAEF,CAGF,gCAGE,QACF,CAEA,sEAJE,kCAA2B,CAD3B,8KAWF,CANA,sCAEE,kBAAmB,CADnB,YAAa,CAEb,gCAGF,CAEA,iCAEE,kBAAmB,CADnB,YAAa,CAGb,8KAAsC,CADtC,oCAEF,CAEA,2BACE,iBAAkB,CAElB,8BAA0B,CAD1B,4BAAwB,CAExB,SACF","file":"Card-59b77d05.css","sourcesContent":[".Card {\n display: grid;\n position: relative;\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 gap: var(--stack-gap-normal);\n\n &[data-border-radius='large'] {\n border-radius: var(--borderRadius-large);\n }\n\n &[data-border-radius='medium'] {\n border-radius: var(--borderRadius-medium);\n }\n\n &[data-padding='normal'] {\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--stack-padding-spacious);\n }\n\n &[data-padding='condensed'] {\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--stack-padding-condensed);\n }\n\n &[data-padding='none'] {\n padding: 0;\n }\n\n &[data-layout='compact'] {\n display: flex;\n align-items: flex-start;\n gap: var(--stack-gap-condensed);\n }\n\n &[data-layout='compact'][data-padding='normal'] {\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--stack-padding-normal);\n }\n}\n\n.CardHeader {\n display: block;\n width: 100%;\n height: auto;\n\n .Card:where([data-layout='compact']) & {\n flex: 0 0 auto;\n width: auto;\n }\n}\n\n.CardHeaderEdgeToEdge {\n /* stylelint-disable primer/spacing */\n margin-top: calc(-1 * var(--stack-padding-spacious));\n margin-right: calc(-1 * var(--stack-padding-spacious));\n margin-left: calc(-1 * var(--stack-padding-spacious));\n width: calc(100% + 2 * var(--stack-padding-spacious));\n /* stylelint-enable primer/spacing */\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: flex-start;\n color: var(--fgColor-muted);\n\n .Card:where([data-layout='default']) & {\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 }\n}\n\n.CardBody {\n display: grid;\n gap: var(--stack-gap-normal);\n\n .Card:where([data-layout='compact']) & {\n flex: 1 1 auto;\n }\n}\n\n.CardContent {\n display: grid;\n gap: var(--stack-gap-condensed);\n}\n\n.CardHeading {\n font: var(--text-title-shorthand-small);\n color: var(--fgColor-default);\n margin: 0;\n\n .Card:where([data-layout='compact']) & {\n position: relative;\n top: calc(-1 * var(--base-size-4));\n font-size: var(--text-body-size-medium);\n }\n}\n\n.CardDescription {\n font: var(--text-body-shorthand-medium);\n color: var(--fgColor-muted);\n margin: 0;\n}\n\n.CardMetadataContainer {\n display: flex;\n align-items: center;\n gap: var(--stack-gap-normal);\n font: var(--text-body-shorthand-medium);\n color: var(--fgColor-muted);\n}\n\n.CardMetadataItem {\n display: flex;\n align-items: center;\n gap: var(--stack-gap-condensed);\n font: var(--text-body-shorthand-small);\n}\n\n.CardAction {\n position: absolute;\n top: var(--base-size-16);\n right: var(--base-size-16);\n z-index: 1;\n}\n"]}
|