@primer/react 38.19.1-rc.d5c143d51 → 38.20.0-rc.6c6ee0bb1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,11 +1,17 @@
1
1
  # @primer/react
2
2
 
3
- ## 38.19.1
3
+ ## 38.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#7723](https://github.com/primer/react/pull/7723) [`ec6c88f`](https://github.com/primer/react/commit/ec6c88fe3eb3ef349500617c90378712f802376d) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Add Card component with subcomponents: Card.Icon, Card.Image, Card.Heading, Card.Description, Card.Menu, and Card.Metadata
4
8
 
5
9
  ### Patch Changes
6
10
 
7
11
  - [#7738](https://github.com/primer/react/pull/7738) [`f5f2869`](https://github.com/primer/react/commit/f5f28691d9e5c9f8495e8c592635d2b616f7cb49) Thanks [@francinelucca](https://github.com/francinelucca)! - ActionMenu, Table: Fix component mutation issue where `Object.assign` was modifying original `@primer/react` components. Now uses wrapper components to avoid side effects.
8
12
 
13
+ - [#7746](https://github.com/primer/react/pull/7746) [`30206c4`](https://github.com/primer/react/commit/30206c4fab92de8888f3f103f9b05bff96fdc1b9) Thanks [@jonrohan](https://github.com/jonrohan)! - Update TokenTextContainer `line-height` to use primer primitives CSS variable `var(--base-text-lineHeight-normal)`
14
+
9
15
  ## 38.19.0
10
16
 
11
17
  ### Minor Changes
@@ -0,0 +1,2 @@
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;gap:var(--stack-gap-normal,1rem);grid-auto-rows:max-content auto;overflow:hidden;position:relative}.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-CardHeader-P5Qbb{display:block;height:auto;width:100%}.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;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(--stack-gap-normal,1rem)}.prc-Card-CardContent-omZDS{display:grid;gap:var(--stack-gap-condensed,.5rem)}.prc-Card-CardHeading-3HXyS{color:var(--fgColor-default,var(--color-fg-default));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-CardDescription-MnJ3F{margin:0}.prc-Card-CardDescription-MnJ3F,.prc-Card-CardMetadataContainer-K-UlH{color:var(--fgColor-muted,var(--color-fg-muted));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-CardMenu-1b3uS{position:absolute;right:var(--base-size-16,1rem);top:var(--base-size-16,1rem);z-index:1}
2
+ /*# sourceMappingURL=Card-65d85331.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Card/Card.module.css.js"],"names":[],"mappings":"AAAA,qBAQE,mEAAwC,CAFxC,oGAAgE,CAHhE,8CAAwC,CAIxC,gEAAuC,CANvC,YAAa,CAQb,gCAA4B,CAJ5B,+BAAgC,CADhC,eAAgB,CAFhB,iBAsBF,CAbE,0CAEE,4CACF,CAEA,6CAEE,4CACF,CAEA,wCACE,SACF,CAGF,2BACE,aAAc,CAEd,WAAY,CADZ,UAEF,CAEA,qCAIE,yDAAqD,CADrD,0DAAsD,CADtD,wDAAoD,CAGpD,yDAEF,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,gCACF,CAEA,4BACE,YAAa,CACb,oCACF,CAEA,4BAEE,oDAA6B,CAD7B,2KAAuC,CAEvC,QACF,CAEA,gCAGE,QACF,CAEA,sEAJE,gDAA2B,CAD3B,8KAWF,CANA,sCAEE,kBAAmB,CADnB,YAAa,CAEb,gCAGF,CAEA,iCAEE,kBAAmB,CADnB,YAAa,CAGb,8KAAsC,CADtC,oCAEF,CAEA,yBACE,iBAAkB,CAElB,8BAA0B,CAD1B,4BAAwB,CAExB,SACF","file":"Card-65d85331.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 gap: var(--stack-gap-normal);\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\n.CardHeader {\n display: block;\n width: 100%;\n height: auto;\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: 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(--stack-gap-normal);\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\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.CardMenu {\n position: absolute;\n top: var(--base-size-16);\n right: var(--base-size-16);\n z-index: 1;\n}\n"]}
@@ -0,0 +1,96 @@
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
+ * Controls the internal padding of the Card.
10
+ * @default 'normal'
11
+ */
12
+ padding?: 'none' | 'condensed' | 'normal';
13
+ };
14
+ type HeadingLevel = 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
15
+ type HeadingProps = React.ComponentPropsWithoutRef<'h3'> & {
16
+ /**
17
+ * The heading level to render. Defaults to 'h3'.
18
+ */
19
+ as?: HeadingLevel;
20
+ children: React.ReactNode;
21
+ };
22
+ type DescriptionProps = React.ComponentPropsWithoutRef<'p'> & {
23
+ children: React.ReactNode;
24
+ };
25
+ type IconProps = {
26
+ /**
27
+ * An Octicon or custom SVG icon to render
28
+ */
29
+ icon: React.ElementType;
30
+ /**
31
+ * Accessible label for the icon. When omitted, the icon is treated as decorative.
32
+ */
33
+ 'aria-label'?: string;
34
+ className?: string;
35
+ };
36
+ type ImageProps = React.ComponentPropsWithoutRef<'img'> & {
37
+ /**
38
+ * The image source URL
39
+ */
40
+ src: string;
41
+ /**
42
+ * Alt text for accessibility
43
+ */
44
+ alt?: string;
45
+ };
46
+ type MenuProps = {
47
+ children: React.ReactNode;
48
+ };
49
+ type MetadataProps = React.ComponentPropsWithoutRef<'div'> & {
50
+ children: React.ReactNode;
51
+ };
52
+ declare const CardImpl: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
53
+ /**
54
+ * Provide an optional className to add to the outermost element rendered by
55
+ * the Card
56
+ */
57
+ className?: string;
58
+ /**
59
+ * Controls the internal padding of the Card.
60
+ * @default 'normal'
61
+ */
62
+ padding?: "none" | "condensed" | "normal";
63
+ } & React.RefAttributes<HTMLDivElement>>;
64
+ declare const CardIcon: {
65
+ ({ icon: IconComponent, "aria-label": ariaLabel, className }: IconProps): React.JSX.Element;
66
+ displayName: string;
67
+ };
68
+ declare const CardImage: {
69
+ ({ src, alt, className, ...rest }: ImageProps): React.JSX.Element;
70
+ displayName: string;
71
+ };
72
+ declare const CardHeading: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
73
+ /**
74
+ * The heading level to render. Defaults to 'h3'.
75
+ */
76
+ as?: HeadingLevel;
77
+ children: React.ReactNode;
78
+ } & React.RefAttributes<HTMLHeadingElement>>;
79
+ declare const CardDescription: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
80
+ children: React.ReactNode;
81
+ } & React.RefAttributes<HTMLParagraphElement>>;
82
+ declare const CardMenu: {
83
+ ({ children }: MenuProps): React.JSX.Element;
84
+ displayName: string;
85
+ };
86
+ declare const CardMetadata: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
87
+ children: React.ReactNode;
88
+ } & React.RefAttributes<HTMLDivElement>>;
89
+ export { CardImpl, CardIcon, CardImage, CardHeading, CardDescription, CardMenu, CardMetadata };
90
+ export type { HeadingProps as CardHeadingProps };
91
+ export type { DescriptionProps as CardDescriptionProps };
92
+ export type { IconProps as CardIconProps };
93
+ export type { ImageProps as CardImageProps };
94
+ export type { MenuProps as CardMenuProps };
95
+ export type { MetadataProps as CardMetadataProps };
96
+ //# sourceMappingURL=Card.d.ts.map
@@ -0,0 +1 @@
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;IAElB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAA;CAC1C,CAAA;AAED,KAAK,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAEpD,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QAAQ;mBAAgB,SAAS;;CAEtC,CAAA;AAID,QAAA,MAAM,YAAY;cA9GN,KAAK,CAAC,SAAS;wCAuHzB,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"}
@@ -0,0 +1,485 @@
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(48);
9
+ let children;
10
+ let className;
11
+ let rest;
12
+ let t1;
13
+ if ($[0] !== t0) {
14
+ ({
15
+ children,
16
+ className,
17
+ padding: t1,
18
+ ...rest
19
+ } = t0);
20
+ $[0] = t0;
21
+ $[1] = children;
22
+ $[2] = className;
23
+ $[3] = rest;
24
+ $[4] = t1;
25
+ } else {
26
+ children = $[1];
27
+ className = $[2];
28
+ rest = $[3];
29
+ t1 = $[4];
30
+ }
31
+ const padding = t1 === undefined ? "normal" : t1;
32
+ let description;
33
+ let heading;
34
+ let menu;
35
+ let metadata;
36
+ let t2;
37
+ let t3;
38
+ let t4;
39
+ let t5;
40
+ let t6;
41
+ let t7;
42
+ if ($[5] !== children || $[6] !== className || $[7] !== padding || $[8] !== ref || $[9] !== rest) {
43
+ t7 = Symbol.for("react.early_return_sentinel");
44
+ bb0: {
45
+ let icon = null;
46
+ let image = null;
47
+ heading = null;
48
+ description = null;
49
+ metadata = null;
50
+ menu = null;
51
+ const childArray = React.Children.toArray(children);
52
+ for (const child of childArray) {
53
+ if (! /*#__PURE__*/React.isValidElement(child)) {
54
+ continue;
55
+ }
56
+ if (child.type === CardIcon) {
57
+ icon = child;
58
+ } else {
59
+ if (child.type === CardImage) {
60
+ image = child;
61
+ } else {
62
+ if (child.type === CardHeading) {
63
+ heading = child;
64
+ } else {
65
+ if (child.type === CardDescription) {
66
+ description = child;
67
+ } else {
68
+ if (child.type === CardMetadata) {
69
+ metadata = child;
70
+ } else {
71
+ if (child.type === CardMenu) {
72
+ menu = child;
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
78
+ }
79
+ }
80
+ const hasSlotChildren = icon || image || heading || description || metadata || menu;
81
+ if (!hasSlotChildren) {
82
+ let t8;
83
+ if ($[20] !== className) {
84
+ t8 = clsx(classes.Card, className);
85
+ $[20] = className;
86
+ $[21] = t8;
87
+ } else {
88
+ t8 = $[21];
89
+ }
90
+ let t9;
91
+ if ($[22] !== children || $[23] !== padding || $[24] !== ref || $[25] !== rest || $[26] !== t8) {
92
+ t9 = /*#__PURE__*/jsx("div", {
93
+ ref: ref,
94
+ className: t8,
95
+ "data-padding": padding,
96
+ ...rest,
97
+ children: children
98
+ });
99
+ $[22] = children;
100
+ $[23] = padding;
101
+ $[24] = ref;
102
+ $[25] = rest;
103
+ $[26] = t8;
104
+ $[27] = t9;
105
+ } else {
106
+ t9 = $[27];
107
+ }
108
+ t7 = t9;
109
+ break bb0;
110
+ }
111
+ t2 = ref;
112
+ if ($[28] !== className) {
113
+ t3 = clsx(classes.Card, className);
114
+ $[28] = className;
115
+ $[29] = t3;
116
+ } else {
117
+ t3 = $[29];
118
+ }
119
+ t4 = padding;
120
+ t5 = rest;
121
+ t6 = (image || icon) && /*#__PURE__*/jsx("div", {
122
+ className: clsx(classes.CardHeader, image && classes.CardHeaderEdgeToEdge),
123
+ children: image || icon
124
+ });
125
+ }
126
+ $[5] = children;
127
+ $[6] = className;
128
+ $[7] = padding;
129
+ $[8] = ref;
130
+ $[9] = rest;
131
+ $[10] = description;
132
+ $[11] = heading;
133
+ $[12] = menu;
134
+ $[13] = metadata;
135
+ $[14] = t2;
136
+ $[15] = t3;
137
+ $[16] = t4;
138
+ $[17] = t5;
139
+ $[18] = t6;
140
+ $[19] = t7;
141
+ } else {
142
+ description = $[10];
143
+ heading = $[11];
144
+ menu = $[12];
145
+ metadata = $[13];
146
+ t2 = $[14];
147
+ t3 = $[15];
148
+ t4 = $[16];
149
+ t5 = $[17];
150
+ t6 = $[18];
151
+ t7 = $[19];
152
+ }
153
+ if (t7 !== Symbol.for("react.early_return_sentinel")) {
154
+ return t7;
155
+ }
156
+ let t8;
157
+ if ($[30] !== description || $[31] !== heading) {
158
+ t8 = /*#__PURE__*/jsxs("div", {
159
+ className: classes.CardContent,
160
+ children: [heading, description]
161
+ });
162
+ $[30] = description;
163
+ $[31] = heading;
164
+ $[32] = t8;
165
+ } else {
166
+ t8 = $[32];
167
+ }
168
+ let t9;
169
+ if ($[33] !== metadata) {
170
+ t9 = metadata ? /*#__PURE__*/jsx("div", {
171
+ className: classes.CardMetadataContainer,
172
+ children: metadata
173
+ }) : null;
174
+ $[33] = metadata;
175
+ $[34] = t9;
176
+ } else {
177
+ t9 = $[34];
178
+ }
179
+ let t10;
180
+ if ($[35] !== t8 || $[36] !== t9) {
181
+ t10 = /*#__PURE__*/jsxs("div", {
182
+ className: classes.CardBody,
183
+ children: [t8, t9]
184
+ });
185
+ $[35] = t8;
186
+ $[36] = t9;
187
+ $[37] = t10;
188
+ } else {
189
+ t10 = $[37];
190
+ }
191
+ let t11;
192
+ if ($[38] !== menu) {
193
+ t11 = menu ? /*#__PURE__*/jsx("div", {
194
+ className: classes.CardMenu,
195
+ children: menu
196
+ }) : null;
197
+ $[38] = menu;
198
+ $[39] = t11;
199
+ } else {
200
+ t11 = $[39];
201
+ }
202
+ let t12;
203
+ if ($[40] !== t10 || $[41] !== t11 || $[42] !== t2 || $[43] !== t3 || $[44] !== t4 || $[45] !== t5 || $[46] !== t6) {
204
+ t12 = /*#__PURE__*/jsxs("div", {
205
+ ref: t2,
206
+ className: t3,
207
+ "data-padding": t4,
208
+ ...t5,
209
+ children: [t6, t10, t11]
210
+ });
211
+ $[40] = t10;
212
+ $[41] = t11;
213
+ $[42] = t2;
214
+ $[43] = t3;
215
+ $[44] = t4;
216
+ $[45] = t5;
217
+ $[46] = t6;
218
+ $[47] = t12;
219
+ } else {
220
+ t12 = $[47];
221
+ }
222
+ return t12;
223
+ });
224
+ const CardIcon = t0 => {
225
+ const $ = c(10);
226
+ const {
227
+ icon: IconComponent,
228
+ "aria-label": ariaLabel,
229
+ className
230
+ } = t0;
231
+ let t1;
232
+ if ($[0] !== className) {
233
+ t1 = clsx(classes.CardIcon, className);
234
+ $[0] = className;
235
+ $[1] = t1;
236
+ } else {
237
+ t1 = $[1];
238
+ }
239
+ const t2 = ariaLabel ? "img" : undefined;
240
+ const t3 = !ariaLabel;
241
+ let t4;
242
+ if ($[2] !== IconComponent) {
243
+ t4 = /*#__PURE__*/jsx(IconComponent, {});
244
+ $[2] = IconComponent;
245
+ $[3] = t4;
246
+ } else {
247
+ t4 = $[3];
248
+ }
249
+ let t5;
250
+ if ($[4] !== ariaLabel || $[5] !== t1 || $[6] !== t2 || $[7] !== t3 || $[8] !== t4) {
251
+ t5 = /*#__PURE__*/jsx("span", {
252
+ className: t1,
253
+ role: t2,
254
+ "aria-label": ariaLabel,
255
+ "aria-hidden": t3,
256
+ children: t4
257
+ });
258
+ $[4] = ariaLabel;
259
+ $[5] = t1;
260
+ $[6] = t2;
261
+ $[7] = t3;
262
+ $[8] = t4;
263
+ $[9] = t5;
264
+ } else {
265
+ t5 = $[9];
266
+ }
267
+ return t5;
268
+ };
269
+ CardIcon.displayName = 'Card.Icon';
270
+ const CardImage = t0 => {
271
+ const $ = c(12);
272
+ let className;
273
+ let rest;
274
+ let src;
275
+ let t1;
276
+ if ($[0] !== t0) {
277
+ ({
278
+ src,
279
+ alt: t1,
280
+ className,
281
+ ...rest
282
+ } = t0);
283
+ $[0] = t0;
284
+ $[1] = className;
285
+ $[2] = rest;
286
+ $[3] = src;
287
+ $[4] = t1;
288
+ } else {
289
+ className = $[1];
290
+ rest = $[2];
291
+ src = $[3];
292
+ t1 = $[4];
293
+ }
294
+ const alt = t1 === undefined ? "" : t1;
295
+ let t2;
296
+ if ($[5] !== className) {
297
+ t2 = clsx(classes.CardImage, className);
298
+ $[5] = className;
299
+ $[6] = t2;
300
+ } else {
301
+ t2 = $[6];
302
+ }
303
+ let t3;
304
+ if ($[7] !== alt || $[8] !== rest || $[9] !== src || $[10] !== t2) {
305
+ t3 = /*#__PURE__*/jsx("img", {
306
+ src: src,
307
+ alt: alt,
308
+ className: t2,
309
+ ...rest
310
+ });
311
+ $[7] = alt;
312
+ $[8] = rest;
313
+ $[9] = src;
314
+ $[10] = t2;
315
+ $[11] = t3;
316
+ } else {
317
+ t3 = $[11];
318
+ }
319
+ return t3;
320
+ };
321
+ CardImage.displayName = 'Card.Image';
322
+ const CardHeading = /*#__PURE__*/forwardRef(function CardHeading(t0, ref) {
323
+ const $ = c(13);
324
+ let children;
325
+ let className;
326
+ let rest;
327
+ let t1;
328
+ if ($[0] !== t0) {
329
+ ({
330
+ as: t1,
331
+ children,
332
+ className,
333
+ ...rest
334
+ } = t0);
335
+ $[0] = t0;
336
+ $[1] = children;
337
+ $[2] = className;
338
+ $[3] = rest;
339
+ $[4] = t1;
340
+ } else {
341
+ children = $[1];
342
+ className = $[2];
343
+ rest = $[3];
344
+ t1 = $[4];
345
+ }
346
+ const Component = t1 === undefined ? "h3" : t1;
347
+ let t2;
348
+ if ($[5] !== className) {
349
+ t2 = clsx(classes.CardHeading, className);
350
+ $[5] = className;
351
+ $[6] = t2;
352
+ } else {
353
+ t2 = $[6];
354
+ }
355
+ let t3;
356
+ if ($[7] !== Component || $[8] !== children || $[9] !== ref || $[10] !== rest || $[11] !== t2) {
357
+ t3 = /*#__PURE__*/jsx(Component, {
358
+ ref: ref,
359
+ className: t2,
360
+ ...rest,
361
+ children: children
362
+ });
363
+ $[7] = Component;
364
+ $[8] = children;
365
+ $[9] = ref;
366
+ $[10] = rest;
367
+ $[11] = t2;
368
+ $[12] = t3;
369
+ } else {
370
+ t3 = $[12];
371
+ }
372
+ return t3;
373
+ });
374
+ const CardDescription = /*#__PURE__*/forwardRef(function CardDescription(t0, ref) {
375
+ const $ = c(11);
376
+ let children;
377
+ let className;
378
+ let rest;
379
+ if ($[0] !== t0) {
380
+ ({
381
+ children,
382
+ className,
383
+ ...rest
384
+ } = t0);
385
+ $[0] = t0;
386
+ $[1] = children;
387
+ $[2] = className;
388
+ $[3] = rest;
389
+ } else {
390
+ children = $[1];
391
+ className = $[2];
392
+ rest = $[3];
393
+ }
394
+ let t1;
395
+ if ($[4] !== className) {
396
+ t1 = clsx(classes.CardDescription, className);
397
+ $[4] = className;
398
+ $[5] = t1;
399
+ } else {
400
+ t1 = $[5];
401
+ }
402
+ let t2;
403
+ if ($[6] !== children || $[7] !== ref || $[8] !== rest || $[9] !== t1) {
404
+ t2 = /*#__PURE__*/jsx("p", {
405
+ ref: ref,
406
+ className: t1,
407
+ ...rest,
408
+ children: children
409
+ });
410
+ $[6] = children;
411
+ $[7] = ref;
412
+ $[8] = rest;
413
+ $[9] = t1;
414
+ $[10] = t2;
415
+ } else {
416
+ t2 = $[10];
417
+ }
418
+ return t2;
419
+ });
420
+ const CardMenu = t0 => {
421
+ const $ = c(2);
422
+ const {
423
+ children
424
+ } = t0;
425
+ let t1;
426
+ if ($[0] !== children) {
427
+ t1 = /*#__PURE__*/jsx(Fragment, {
428
+ children: children
429
+ });
430
+ $[0] = children;
431
+ $[1] = t1;
432
+ } else {
433
+ t1 = $[1];
434
+ }
435
+ return t1;
436
+ };
437
+ CardMenu.displayName = 'Card.Menu';
438
+ const CardMetadata = /*#__PURE__*/forwardRef(function CardMetadata(t0, ref) {
439
+ const $ = c(11);
440
+ let children;
441
+ let className;
442
+ let rest;
443
+ if ($[0] !== t0) {
444
+ ({
445
+ children,
446
+ className,
447
+ ...rest
448
+ } = t0);
449
+ $[0] = t0;
450
+ $[1] = children;
451
+ $[2] = className;
452
+ $[3] = rest;
453
+ } else {
454
+ children = $[1];
455
+ className = $[2];
456
+ rest = $[3];
457
+ }
458
+ let t1;
459
+ if ($[4] !== className) {
460
+ t1 = clsx(classes.CardMetadataItem, className);
461
+ $[4] = className;
462
+ $[5] = t1;
463
+ } else {
464
+ t1 = $[5];
465
+ }
466
+ let t2;
467
+ if ($[6] !== children || $[7] !== ref || $[8] !== rest || $[9] !== t1) {
468
+ t2 = /*#__PURE__*/jsx("div", {
469
+ ref: ref,
470
+ className: t1,
471
+ ...rest,
472
+ children: children
473
+ });
474
+ $[6] = children;
475
+ $[7] = ref;
476
+ $[8] = rest;
477
+ $[9] = t1;
478
+ $[10] = t2;
479
+ } else {
480
+ t2 = $[10];
481
+ }
482
+ return t2;
483
+ });
484
+
485
+ export { CardDescription, CardHeading, CardIcon, CardImage, CardImpl, CardMenu, CardMetadata };
@@ -0,0 +1,5 @@
1
+ import './Card-65d85331.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 };
@@ -0,0 +1,31 @@
1
+ import type { CardProps, CardIconProps, CardImageProps, CardHeadingProps, CardDescriptionProps, CardMenuProps, CardMetadataProps } from './Card';
2
+ declare const Card: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ className?: string;
4
+ padding?: "none" | "condensed" | "normal";
5
+ } & import("react").RefAttributes<HTMLDivElement>> & {
6
+ Icon: {
7
+ ({ icon: IconComponent, "aria-label": ariaLabel, className }: CardIconProps): import("react").JSX.Element;
8
+ displayName: string;
9
+ };
10
+ Image: {
11
+ ({ src, alt, className, ...rest }: CardImageProps): import("react").JSX.Element;
12
+ displayName: string;
13
+ };
14
+ Heading: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
15
+ as?: "h2" | "h3" | "h4" | "h5" | "h6";
16
+ children: React.ReactNode;
17
+ } & import("react").RefAttributes<HTMLHeadingElement>>;
18
+ Description: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
19
+ children: React.ReactNode;
20
+ } & import("react").RefAttributes<HTMLParagraphElement>>;
21
+ Menu: {
22
+ ({ children }: CardMenuProps): import("react").JSX.Element;
23
+ displayName: string;
24
+ };
25
+ Metadata: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
26
+ children: React.ReactNode;
27
+ } & import("react").RefAttributes<HTMLDivElement>>;
28
+ };
29
+ export { Card };
30
+ export type { CardProps, CardIconProps, CardImageProps, CardHeadingProps, CardDescriptionProps, CardMenuProps, CardMetadataProps, };
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Card/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EAClB,MAAM,QAAQ,CAAA;AAEf,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;CAOR,CAAA;AAEF,OAAO,EAAC,IAAI,EAAC,CAAA;AACb,YAAY,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,GAClB,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { CardImpl, CardMetadata, CardMenu, CardDescription, CardHeading, CardImage, CardIcon } from './Card.js';
2
+
3
+ const Card = Object.assign(CardImpl, {
4
+ Icon: CardIcon,
5
+ Image: CardImage,
6
+ Heading: CardHeading,
7
+ Description: CardDescription,
8
+ Menu: CardMenu,
9
+ Metadata: CardMetadata
10
+ });
11
+
12
+ export { Card };
@@ -0,0 +1,2 @@
1
+ .prc-Token-TokenTextContainer-cOUaD{background:transparent;border:none;color:inherit;color:currentColor;flex-grow:1;font:inherit;line-height:var(--base-text-lineHeight-normal,1.5);margin:0;min-width:0;overflow:hidden;padding:0;-webkit-text-decoration:none;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;width:auto;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;appearance:none}.prc-Token-TokenTextContainer-cOUaD:is(a,button,[tabIndex="0"]){cursor:pointer}.prc-Token-TokenTextContainer-cOUaD:is(a,button,[tabIndex="0"]):after{bottom:0;content:"";left:0;position:absolute;right:0;top:0}
2
+ /*# sourceMappingURL=_TokenTextContainer-55ce2de3.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Token/_TokenTextContainer.module.css.js"],"names":[],"mappings":"AAAA,oCAiBE,sBAAuB,CACvB,WAAY,CAVZ,aAAc,CAGd,kBAAmB,CAQnB,WAAY,CAbZ,YAAa,CACb,kDAA+C,CAH/C,QAAS,CAFT,WAAY,CAGZ,eAAgB,CAFhB,SAAU,CASV,4BAAqB,CAArB,oBAAqB,CACrB,sBAAuB,CACvB,kBAAmB,CAbnB,UAAW,CAmBX,8BAA+B,CAC/B,+BAAgC,CAChC,eACF,CAOA,gEACE,cACF,CAOA,sEAIE,QAAS,CAET,UAAW,CADX,MAAO,CAJP,iBAAkB,CAElB,OAAQ,CADR,KAKF","file":"_TokenTextContainer-55ce2de3.css","sourcesContent":[".TokenTextContainer {\n width: auto;\n min-width: 0;\n padding: 0;\n margin: 0;\n overflow: hidden;\n font: inherit;\n line-height: var(--base-text-lineHeight-normal);\n color: inherit;\n\n /* reset anchor styles */\n color: currentColor;\n text-decoration: none;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n /* reset button styles, make the cursor a pointer, and add line-height */\n background: transparent;\n border: none;\n flex-grow: 1;\n -webkit-font-smoothing: inherit;\n -moz-osx-font-smoothing: inherit;\n appearance: none;\n}\n\n/* Position psuedo-element above text content, but below the\n remove button.\n This ensures the <a> or <button> receives the click no\n matter where on the token the user clicks. */\n/* stylelint-disable-next-line selector-max-type, selector-no-qualifying-type */\n.TokenTextContainer:is(a, button, [tabIndex='0']) {\n cursor: pointer;\n}\n\n/* Position psuedo-element above text content, but below the\n remove button.\n This ensures the <a> or <button> receives the click no\n matter where on the token the user clicks. */\n/* stylelint-disable-next-line selector-max-type, selector-no-qualifying-type */\n.TokenTextContainer:is(a, button, [tabIndex='0'])::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n content: '';\n}\n"]}
@@ -1,4 +1,4 @@
1
- import './_TokenTextContainer-24678fbc.css';
1
+ import './_TokenTextContainer-55ce2de3.css';
2
2
 
3
3
  var classes = {"TokenTextContainer":"prc-Token-TokenTextContainer-cOUaD"};
4
4
 
@@ -9,6 +9,8 @@ export { Blankslate } from '../Blankslate';
9
9
  export type { BlankslateProps } from '../Blankslate';
10
10
  export { ButtonBase } from '../Button';
11
11
  export type { ButtonBaseProps } from '../Button';
12
+ export { Card } from '../Card';
13
+ export type { CardProps, CardIconProps, CardImageProps, CardHeadingProps, CardDescriptionProps, CardMenuProps, CardMetadataProps, } from '../Card';
12
14
  export { DataTable, Table, createColumnHelper } from '../DataTable';
13
15
  export type { DataTableProps, TableProps, TableHeadProps, TableBodyProps, TableRowProps, TableHeaderProps, TableCellProps, TableContainerProps, TableTitleProps, TableSubtitleProps, TableActionsProps, Column, CellAlignment, ColumnWidth, UniqueRow, ObjectPaths, } from '../DataTable';
14
16
  export * from '../Dialog';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/experimental/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AACxC,YAAY,EAAC,eAAe,EAAC,MAAM,eAAe,CAAA;AAElD,OAAO,EAAC,UAAU,EAAC,MAAM,WAAW,CAAA;AACpC,YAAY,EAAC,eAAe,EAAC,MAAM,WAAW,CAAA;AAE9C,OAAO,EAAC,SAAS,EAAE,KAAK,EAAE,kBAAkB,EAAC,MAAM,cAAc,CAAA;AACjE,YAAY,EACV,cAAc,EACd,UAAU,EACV,cAAc,EACd,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,aAAa,EACb,WAAW,EACX,SAAS,EACT,WAAW,GACZ,MAAM,cAAc,CAAA;AAErB,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAA;AAC9C,YAAY,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAA;AAExD,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AACxC,YAAY,EACV,eAAe,EACf,UAAU,EACV,UAAU,IAAI,oBAAoB,EAClC,YAAY,IAAI,sBAAsB,GACvC,MAAM,eAAe,CAAA;AAEtB,cAAc,WAAW,CAAA;AAEzB,cAAc,S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AAC,YAAY,EAAC,MAAM,iBAAiB,CAAA;AAC5C,YAAY,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAA;AAChD,YAAY,EAAC,mBAAmB,EAAC,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAC,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAA;AACjF,YAAY,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAA;AAEtD,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAA;AACxD,YAAY,EAAC,uBAAuB,EAAC,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA;AACvC,YAAY,EAAC,eAAe,EAAC,MAAM,cAAc,CAAA;AAEjD,cAAc,mBAAmB,CAAA;AACjC,cAAc,QAAQ,CAAA;AAEtB,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAA;AACpC,YAAY,EAAC,aAAa,EAAE,kBAAkB,EAAC,MAAM,aAAa,CAAA"}
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  export { Blankslate } from '../Blankslate/index.js';
3
+ export { Card } from '../Card/index.js';
3
4
  export { Table } from '../DataTable/index.js';
4
5
  export { ActionBar } from '../ActionBar/index.js';
5
6
  export { Stack } from '../Stack/index.js';
@@ -2100,6 +2100,97 @@
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/experimental",
2110
+ "stories": [
2111
+ {
2112
+ "id": "experimental-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": "experimental-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": "experimental-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
+ "name": "padding",
2132
+ "type": "'none' | 'condensed' | 'normal'",
2133
+ "defaultValue": "'normal'",
2134
+ "description": "Controls the internal padding of the Card."
2135
+ }
2136
+ ],
2137
+ "subcomponents": [
2138
+ {
2139
+ "name": "Card.Icon",
2140
+ "props": [
2141
+ {
2142
+ "name": "icon",
2143
+ "type": "React.ElementType",
2144
+ "description": "An Octicon or custom SVG icon to render."
2145
+ },
2146
+ {
2147
+ "name": "aria-label",
2148
+ "type": "string",
2149
+ "description": "Accessible label for the icon. When omitted, the icon is treated as decorative."
2150
+ }
2151
+ ]
2152
+ },
2153
+ {
2154
+ "name": "Card.Image",
2155
+ "props": [
2156
+ {
2157
+ "name": "src",
2158
+ "type": "string",
2159
+ "description": "The image source URL."
2160
+ },
2161
+ {
2162
+ "name": "alt",
2163
+ "type": "string",
2164
+ "defaultValue": "\"\"",
2165
+ "description": "Alt text for accessibility. Defaults to empty string (decorative)."
2166
+ }
2167
+ ]
2168
+ },
2169
+ {
2170
+ "name": "Card.Heading",
2171
+ "props": [
2172
+ {
2173
+ "name": "as",
2174
+ "type": "'h2' | 'h3' | 'h4' | 'h5' | 'h6'",
2175
+ "defaultValue": "'h3'",
2176
+ "description": "The heading level to render."
2177
+ }
2178
+ ]
2179
+ },
2180
+ {
2181
+ "name": "Card.Description",
2182
+ "props": []
2183
+ },
2184
+ {
2185
+ "name": "Card.Menu",
2186
+ "props": []
2187
+ },
2188
+ {
2189
+ "name": "Card.Metadata",
2190
+ "props": []
2191
+ }
2192
+ ]
2193
+ },
2103
2194
  "checkbox": {
2104
2195
  "source": "https://github.com/primer/react/tree/main/packages/react/src/Checkbox",
2105
2196
  "id": "checkbox",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "38.19.1-rc.d5c143d51",
4
+ "version": "38.20.0-rc.6c6ee0bb1",
5
5
  "description": "An implementation of GitHub's Primer Design System using React",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -1,2 +0,0 @@
1
- .prc-Token-TokenTextContainer-cOUaD{background:transparent;border:none;color:inherit;color:currentColor;flex-grow:1;font:inherit;line-height:normal;margin:0;min-width:0;overflow:hidden;padding:0;-webkit-text-decoration:none;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;width:auto;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;appearance:none}.prc-Token-TokenTextContainer-cOUaD:is(a,button,[tabIndex="0"]){cursor:pointer}.prc-Token-TokenTextContainer-cOUaD:is(a,button,[tabIndex="0"]):after{bottom:0;content:"";left:0;position:absolute;right:0;top:0}
2
- /*# sourceMappingURL=_TokenTextContainer-24678fbc.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/Token/_TokenTextContainer.module.css.js"],"names":[],"mappings":"AAAA,oCAkBE,sBAAuB,CACvB,WAAY,CAVZ,aAAc,CAGd,kBAAmB,CAQnB,WAAY,CAdZ,YAAa,CAEb,kBAAmB,CAJnB,QAAS,CAFT,WAAY,CAGZ,eAAgB,CAFhB,SAAU,CAUV,4BAAqB,CAArB,oBAAqB,CACrB,sBAAuB,CACvB,kBAAmB,CAdnB,UAAW,CAoBX,8BAA+B,CAC/B,+BAAgC,CAChC,eACF,CAOA,gEACE,cACF,CAOA,sEAIE,QAAS,CAET,UAAW,CADX,MAAO,CAJP,iBAAkB,CAElB,OAAQ,CADR,KAKF","file":"_TokenTextContainer-24678fbc.css","sourcesContent":[".TokenTextContainer {\n width: auto;\n min-width: 0;\n padding: 0;\n margin: 0;\n overflow: hidden;\n font: inherit;\n /* stylelint-disable-next-line primer/typography */\n line-height: normal;\n color: inherit;\n\n /* reset anchor styles */\n color: currentColor;\n text-decoration: none;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n /* reset button styles, make the cursor a pointer, and add line-height */\n background: transparent;\n border: none;\n flex-grow: 1;\n -webkit-font-smoothing: inherit;\n -moz-osx-font-smoothing: inherit;\n appearance: none;\n}\n\n/* Position psuedo-element above text content, but below the\n remove button.\n This ensures the <a> or <button> receives the click no\n matter where on the token the user clicks. */\n/* stylelint-disable-next-line selector-max-type, selector-no-qualifying-type */\n.TokenTextContainer:is(a, button, [tabIndex='0']) {\n cursor: pointer;\n}\n\n/* Position psuedo-element above text content, but below the\n remove button.\n This ensures the <a> or <button> receives the click no\n matter where on the token the user clicks. */\n/* stylelint-disable-next-line selector-max-type, selector-no-qualifying-type */\n.TokenTextContainer:is(a, button, [tabIndex='0'])::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n content: '';\n}\n"]}