@nationaldesignstudio/react 0.6.0 → 0.7.0
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/dist/accordion/index.d.ts +95 -0
- package/dist/accordion/index.js +143 -0
- package/dist/accordion/index.js.map +1 -0
- package/dist/background/index.d.ts +149 -0
- package/dist/background/index.js +200 -0
- package/dist/background/index.js.map +1 -0
- package/dist/banner/index.d.ts +101 -0
- package/dist/banner/index.js +81 -0
- package/dist/banner/index.js.map +1 -0
- package/dist/blurred-video-backdrop/index.d.ts +233 -0
- package/dist/blurred-video-backdrop/index.js +266 -0
- package/dist/blurred-video-backdrop/index.js.map +1 -0
- package/dist/button/index.d.ts +180 -0
- package/dist/button/index.js +169 -0
- package/dist/button/index.js.map +1 -0
- package/dist/button-B2g5fH9b.d.ts +152 -0
- package/dist/card/index.d.ts +406 -0
- package/dist/card/index.js +219 -0
- package/dist/card/index.js.map +1 -0
- package/dist/card-grid/index.d.ts +90 -0
- package/dist/card-grid/index.js +74 -0
- package/dist/card-grid/index.js.map +1 -0
- package/dist/component-registry.md +136 -2
- package/dist/dev-toolbar/index.d.ts +8 -0
- package/dist/dev-toolbar/index.js +206 -0
- package/dist/dev-toolbar/index.js.map +1 -0
- package/dist/dialog/index.d.ts +268 -0
- package/dist/dialog/index.js +288 -0
- package/dist/dialog/index.js.map +1 -0
- package/dist/faq-section/index.d.ts +47 -0
- package/dist/faq-section/index.js +152 -0
- package/dist/faq-section/index.js.map +1 -0
- package/dist/grid-overlay/index.d.ts +10 -0
- package/dist/grid-overlay/index.js +38 -0
- package/dist/grid-overlay/index.js.map +1 -0
- package/dist/hero/index.d.ts +462 -0
- package/dist/hero/index.js +494 -0
- package/dist/hero/index.js.map +1 -0
- package/dist/hooks/index.d.ts +150 -0
- package/dist/hooks/index.js +339 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.d.ts +46 -5339
- package/dist/index.js +157 -4080
- package/dist/index.js.map +1 -1
- package/dist/input/index.d.ts +404 -0
- package/dist/input/index.js +393 -0
- package/dist/input/index.js.map +1 -0
- package/dist/navbar/index.d.ts +68 -0
- package/dist/navbar/index.js +227 -0
- package/dist/navbar/index.js.map +1 -0
- package/dist/ndstudio-footer/index.d.ts +32 -0
- package/dist/ndstudio-footer/index.js +35 -0
- package/dist/ndstudio-footer/index.js.map +1 -0
- package/dist/pager-control/index.d.ts +173 -0
- package/dist/pager-control/index.js +267 -0
- package/dist/pager-control/index.js.map +1 -0
- package/dist/popover/index.d.ts +200 -0
- package/dist/popover/index.js +290 -0
- package/dist/popover/index.js.map +1 -0
- package/dist/prose/index.d.ts +39 -0
- package/dist/prose/index.js +56 -0
- package/dist/prose/index.js.map +1 -0
- package/dist/quote-block/index.d.ts +156 -0
- package/dist/quote-block/index.js +321 -0
- package/dist/quote-block/index.js.map +1 -0
- package/dist/river/index.d.ts +100 -0
- package/dist/river/index.js +107 -0
- package/dist/river/index.js.map +1 -0
- package/dist/select/index.d.ts +188 -0
- package/dist/select/index.js +295 -0
- package/dist/select/index.js.map +1 -0
- package/dist/theme/index.d.ts +149 -0
- package/dist/theme/index.js +211 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme-CzBPUlh_.d.ts +332 -0
- package/dist/tooltip/index.d.ts +166 -0
- package/dist/tooltip/index.js +200 -0
- package/dist/tooltip/index.js.map +1 -0
- package/dist/tout/index.d.ts +157 -0
- package/dist/tout/index.js +315 -0
- package/dist/tout/index.js.map +1 -0
- package/dist/two-column-section/index.d.ts +122 -0
- package/dist/two-column-section/index.js +121 -0
- package/dist/two-column-section/index.js.map +1 -0
- package/dist/us-gov-banner/index.d.ts +141 -0
- package/dist/us-gov-banner/index.js +74 -0
- package/dist/us-gov-banner/index.js.map +1 -0
- package/dist/use-captions-AkKlJhov.d.ts +71 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.js +12 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/video-dialog/index.d.ts +106 -0
- package/dist/video-dialog/index.js +1305 -0
- package/dist/video-dialog/index.js.map +1 -0
- package/dist/video-player/index.d.ts +115 -0
- package/dist/video-player/index.js +879 -0
- package/dist/video-player/index.js.map +1 -0
- package/dist/video-player-qxf-BURH.d.ts +236 -0
- package/dist/video-with-backdrop/index.d.ts +267 -0
- package/dist/video-with-backdrop/index.js +1284 -0
- package/dist/video-with-backdrop/index.js.map +1 -0
- package/package.json +13 -2
- package/src/components/organisms/us-gov-banner/us-gov-banner.tsx +5 -27
- package/src/theme/hooks.ts +2 -0
- package/src/theme/index.ts +2 -0
- package/src/theme/theme-provider.tsx +2 -0
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
|
|
6
|
+
declare const cardVariants: tailwind_variants.TVReturnType<{
|
|
7
|
+
layout: {
|
|
8
|
+
vertical: string;
|
|
9
|
+
horizontal: string;
|
|
10
|
+
/**
|
|
11
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
12
|
+
* Use with Background components for images/gradients.
|
|
13
|
+
*/
|
|
14
|
+
overlay: string;
|
|
15
|
+
/**
|
|
16
|
+
* Profile layout - square image with stacked content below.
|
|
17
|
+
* Ideal for team member cards, user profiles, testimonials.
|
|
18
|
+
*/
|
|
19
|
+
profile: string;
|
|
20
|
+
/**
|
|
21
|
+
* Compact layout - small thumbnail with condensed horizontal content.
|
|
22
|
+
* Ideal for news items, article previews, resource lists.
|
|
23
|
+
*/
|
|
24
|
+
compact: string;
|
|
25
|
+
};
|
|
26
|
+
}, undefined, "relative flex overflow-hidden rounded-surface-card bg-card-background stroke-surface-card border-border-subtle border-solid", tailwind_variants_dist_config_js.TVConfig<{
|
|
27
|
+
layout: {
|
|
28
|
+
vertical: string;
|
|
29
|
+
horizontal: string;
|
|
30
|
+
/**
|
|
31
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
32
|
+
* Use with Background components for images/gradients.
|
|
33
|
+
*/
|
|
34
|
+
overlay: string;
|
|
35
|
+
/**
|
|
36
|
+
* Profile layout - square image with stacked content below.
|
|
37
|
+
* Ideal for team member cards, user profiles, testimonials.
|
|
38
|
+
*/
|
|
39
|
+
profile: string;
|
|
40
|
+
/**
|
|
41
|
+
* Compact layout - small thumbnail with condensed horizontal content.
|
|
42
|
+
* Ideal for news items, article previews, resource lists.
|
|
43
|
+
*/
|
|
44
|
+
compact: string;
|
|
45
|
+
};
|
|
46
|
+
}, {
|
|
47
|
+
layout: {
|
|
48
|
+
vertical: string;
|
|
49
|
+
horizontal: string;
|
|
50
|
+
/**
|
|
51
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
52
|
+
* Use with Background components for images/gradients.
|
|
53
|
+
*/
|
|
54
|
+
overlay: string;
|
|
55
|
+
/**
|
|
56
|
+
* Profile layout - square image with stacked content below.
|
|
57
|
+
* Ideal for team member cards, user profiles, testimonials.
|
|
58
|
+
*/
|
|
59
|
+
profile: string;
|
|
60
|
+
/**
|
|
61
|
+
* Compact layout - small thumbnail with condensed horizontal content.
|
|
62
|
+
* Ideal for news items, article previews, resource lists.
|
|
63
|
+
*/
|
|
64
|
+
compact: string;
|
|
65
|
+
};
|
|
66
|
+
}>, {
|
|
67
|
+
layout: {
|
|
68
|
+
vertical: string;
|
|
69
|
+
horizontal: string;
|
|
70
|
+
/**
|
|
71
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
72
|
+
* Use with Background components for images/gradients.
|
|
73
|
+
*/
|
|
74
|
+
overlay: string;
|
|
75
|
+
/**
|
|
76
|
+
* Profile layout - square image with stacked content below.
|
|
77
|
+
* Ideal for team member cards, user profiles, testimonials.
|
|
78
|
+
*/
|
|
79
|
+
profile: string;
|
|
80
|
+
/**
|
|
81
|
+
* Compact layout - small thumbnail with condensed horizontal content.
|
|
82
|
+
* Ideal for news items, article previews, resource lists.
|
|
83
|
+
*/
|
|
84
|
+
compact: string;
|
|
85
|
+
};
|
|
86
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
87
|
+
layout: {
|
|
88
|
+
vertical: string;
|
|
89
|
+
horizontal: string;
|
|
90
|
+
/**
|
|
91
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
92
|
+
* Use with Background components for images/gradients.
|
|
93
|
+
*/
|
|
94
|
+
overlay: string;
|
|
95
|
+
/**
|
|
96
|
+
* Profile layout - square image with stacked content below.
|
|
97
|
+
* Ideal for team member cards, user profiles, testimonials.
|
|
98
|
+
*/
|
|
99
|
+
profile: string;
|
|
100
|
+
/**
|
|
101
|
+
* Compact layout - small thumbnail with condensed horizontal content.
|
|
102
|
+
* Ideal for news items, article previews, resource lists.
|
|
103
|
+
*/
|
|
104
|
+
compact: string;
|
|
105
|
+
};
|
|
106
|
+
}, undefined, "relative flex overflow-hidden rounded-surface-card bg-card-background stroke-surface-card border-border-subtle border-solid", tailwind_variants_dist_config_js.TVConfig<{
|
|
107
|
+
layout: {
|
|
108
|
+
vertical: string;
|
|
109
|
+
horizontal: string;
|
|
110
|
+
/**
|
|
111
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
112
|
+
* Use with Background components for images/gradients.
|
|
113
|
+
*/
|
|
114
|
+
overlay: string;
|
|
115
|
+
/**
|
|
116
|
+
* Profile layout - square image with stacked content below.
|
|
117
|
+
* Ideal for team member cards, user profiles, testimonials.
|
|
118
|
+
*/
|
|
119
|
+
profile: string;
|
|
120
|
+
/**
|
|
121
|
+
* Compact layout - small thumbnail with condensed horizontal content.
|
|
122
|
+
* Ideal for news items, article previews, resource lists.
|
|
123
|
+
*/
|
|
124
|
+
compact: string;
|
|
125
|
+
};
|
|
126
|
+
}, {
|
|
127
|
+
layout: {
|
|
128
|
+
vertical: string;
|
|
129
|
+
horizontal: string;
|
|
130
|
+
/**
|
|
131
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
132
|
+
* Use with Background components for images/gradients.
|
|
133
|
+
*/
|
|
134
|
+
overlay: string;
|
|
135
|
+
/**
|
|
136
|
+
* Profile layout - square image with stacked content below.
|
|
137
|
+
* Ideal for team member cards, user profiles, testimonials.
|
|
138
|
+
*/
|
|
139
|
+
profile: string;
|
|
140
|
+
/**
|
|
141
|
+
* Compact layout - small thumbnail with condensed horizontal content.
|
|
142
|
+
* Ideal for news items, article previews, resource lists.
|
|
143
|
+
*/
|
|
144
|
+
compact: string;
|
|
145
|
+
};
|
|
146
|
+
}>, unknown, unknown, undefined>>;
|
|
147
|
+
interface CardProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Card component for displaying content in a contained, scannable format.
|
|
151
|
+
*
|
|
152
|
+
* Layouts:
|
|
153
|
+
* - vertical: Image on top, content below (default)
|
|
154
|
+
* - horizontal: Image on left, content on right
|
|
155
|
+
* - overlay: Full-bleed background with content on top
|
|
156
|
+
*
|
|
157
|
+
* Use with CardImage, CardContent, CardEyebrow, CardTitle, CardDescription, and CardActions.
|
|
158
|
+
* For overlay layout, use Background components for full-bleed backgrounds.
|
|
159
|
+
*/
|
|
160
|
+
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
161
|
+
declare const cardImageVariants: tailwind_variants.TVReturnType<{
|
|
162
|
+
layout: {
|
|
163
|
+
vertical: string;
|
|
164
|
+
horizontal: string;
|
|
165
|
+
overlay: string;
|
|
166
|
+
/** Profile: square aspect ratio for headshots/avatars */
|
|
167
|
+
profile: string;
|
|
168
|
+
/** Compact: fixed small size for thumbnails */
|
|
169
|
+
compact: string;
|
|
170
|
+
};
|
|
171
|
+
}, undefined, "relative shrink-0 bg-bg-muted", tailwind_variants_dist_config_js.TVConfig<{
|
|
172
|
+
layout: {
|
|
173
|
+
vertical: string;
|
|
174
|
+
horizontal: string;
|
|
175
|
+
overlay: string;
|
|
176
|
+
/** Profile: square aspect ratio for headshots/avatars */
|
|
177
|
+
profile: string;
|
|
178
|
+
/** Compact: fixed small size for thumbnails */
|
|
179
|
+
compact: string;
|
|
180
|
+
};
|
|
181
|
+
}, {
|
|
182
|
+
layout: {
|
|
183
|
+
vertical: string;
|
|
184
|
+
horizontal: string;
|
|
185
|
+
overlay: string;
|
|
186
|
+
/** Profile: square aspect ratio for headshots/avatars */
|
|
187
|
+
profile: string;
|
|
188
|
+
/** Compact: fixed small size for thumbnails */
|
|
189
|
+
compact: string;
|
|
190
|
+
};
|
|
191
|
+
}>, {
|
|
192
|
+
layout: {
|
|
193
|
+
vertical: string;
|
|
194
|
+
horizontal: string;
|
|
195
|
+
overlay: string;
|
|
196
|
+
/** Profile: square aspect ratio for headshots/avatars */
|
|
197
|
+
profile: string;
|
|
198
|
+
/** Compact: fixed small size for thumbnails */
|
|
199
|
+
compact: string;
|
|
200
|
+
};
|
|
201
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
202
|
+
layout: {
|
|
203
|
+
vertical: string;
|
|
204
|
+
horizontal: string;
|
|
205
|
+
overlay: string;
|
|
206
|
+
/** Profile: square aspect ratio for headshots/avatars */
|
|
207
|
+
profile: string;
|
|
208
|
+
/** Compact: fixed small size for thumbnails */
|
|
209
|
+
compact: string;
|
|
210
|
+
};
|
|
211
|
+
}, undefined, "relative shrink-0 bg-bg-muted", tailwind_variants_dist_config_js.TVConfig<{
|
|
212
|
+
layout: {
|
|
213
|
+
vertical: string;
|
|
214
|
+
horizontal: string;
|
|
215
|
+
overlay: string;
|
|
216
|
+
/** Profile: square aspect ratio for headshots/avatars */
|
|
217
|
+
profile: string;
|
|
218
|
+
/** Compact: fixed small size for thumbnails */
|
|
219
|
+
compact: string;
|
|
220
|
+
};
|
|
221
|
+
}, {
|
|
222
|
+
layout: {
|
|
223
|
+
vertical: string;
|
|
224
|
+
horizontal: string;
|
|
225
|
+
overlay: string;
|
|
226
|
+
/** Profile: square aspect ratio for headshots/avatars */
|
|
227
|
+
profile: string;
|
|
228
|
+
/** Compact: fixed small size for thumbnails */
|
|
229
|
+
compact: string;
|
|
230
|
+
};
|
|
231
|
+
}>, unknown, unknown, undefined>>;
|
|
232
|
+
interface CardImageProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardImageVariants> {
|
|
233
|
+
/**
|
|
234
|
+
* The image source URL
|
|
235
|
+
*/
|
|
236
|
+
src?: string;
|
|
237
|
+
/**
|
|
238
|
+
* Alt text for the image
|
|
239
|
+
*/
|
|
240
|
+
alt?: string;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Card image area with layout-specific styling.
|
|
244
|
+
* - vertical: 16:9 aspect ratio, full width
|
|
245
|
+
* - horizontal: ~40% width, stretches to content height
|
|
246
|
+
* - profile: square aspect ratio for headshots/avatars
|
|
247
|
+
* - compact: fixed small size for thumbnails
|
|
248
|
+
*/
|
|
249
|
+
declare const CardImage: React.ForwardRefExoticComponent<CardImageProps & React.RefAttributes<HTMLDivElement>>;
|
|
250
|
+
declare const cardContentVariants: tailwind_variants.TVReturnType<{
|
|
251
|
+
/**
|
|
252
|
+
* Vertical alignment of content within the card.
|
|
253
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
254
|
+
*/
|
|
255
|
+
justify: {
|
|
256
|
+
start: string;
|
|
257
|
+
center: string;
|
|
258
|
+
end: string;
|
|
259
|
+
};
|
|
260
|
+
}, undefined, "flex w-full flex-1 flex-col gap-spatial-card-large-gap p-spatial-card-large-padding", tailwind_variants_dist_config_js.TVConfig<{
|
|
261
|
+
/**
|
|
262
|
+
* Vertical alignment of content within the card.
|
|
263
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
264
|
+
*/
|
|
265
|
+
justify: {
|
|
266
|
+
start: string;
|
|
267
|
+
center: string;
|
|
268
|
+
end: string;
|
|
269
|
+
};
|
|
270
|
+
}, {
|
|
271
|
+
/**
|
|
272
|
+
* Vertical alignment of content within the card.
|
|
273
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
274
|
+
*/
|
|
275
|
+
justify: {
|
|
276
|
+
start: string;
|
|
277
|
+
center: string;
|
|
278
|
+
end: string;
|
|
279
|
+
};
|
|
280
|
+
}>, {
|
|
281
|
+
/**
|
|
282
|
+
* Vertical alignment of content within the card.
|
|
283
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
284
|
+
*/
|
|
285
|
+
justify: {
|
|
286
|
+
start: string;
|
|
287
|
+
center: string;
|
|
288
|
+
end: string;
|
|
289
|
+
};
|
|
290
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
291
|
+
/**
|
|
292
|
+
* Vertical alignment of content within the card.
|
|
293
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
294
|
+
*/
|
|
295
|
+
justify: {
|
|
296
|
+
start: string;
|
|
297
|
+
center: string;
|
|
298
|
+
end: string;
|
|
299
|
+
};
|
|
300
|
+
}, undefined, "flex w-full flex-1 flex-col gap-spatial-card-large-gap p-spatial-card-large-padding", tailwind_variants_dist_config_js.TVConfig<{
|
|
301
|
+
/**
|
|
302
|
+
* Vertical alignment of content within the card.
|
|
303
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
304
|
+
*/
|
|
305
|
+
justify: {
|
|
306
|
+
start: string;
|
|
307
|
+
center: string;
|
|
308
|
+
end: string;
|
|
309
|
+
};
|
|
310
|
+
}, {
|
|
311
|
+
/**
|
|
312
|
+
* Vertical alignment of content within the card.
|
|
313
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
314
|
+
*/
|
|
315
|
+
justify: {
|
|
316
|
+
start: string;
|
|
317
|
+
center: string;
|
|
318
|
+
end: string;
|
|
319
|
+
};
|
|
320
|
+
}>, unknown, unknown, undefined>>;
|
|
321
|
+
interface CardContentProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardContentVariants> {
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Card content container with proper padding and spacing.
|
|
325
|
+
* Uses spatial card tokens for consistent sizing.
|
|
326
|
+
* For overlay layout, add `relative z-10` to ensure content sits above background.
|
|
327
|
+
*
|
|
328
|
+
* @example
|
|
329
|
+
* ```tsx
|
|
330
|
+
* // Content at bottom of overlay card
|
|
331
|
+
* <Card layout="overlay">
|
|
332
|
+
* <Background.Image src="/hero.jpg" />
|
|
333
|
+
* <CardContent justify="end" className="relative z-10">
|
|
334
|
+
* <CardTitle>Title</CardTitle>
|
|
335
|
+
* </CardContent>
|
|
336
|
+
* </Card>
|
|
337
|
+
* ```
|
|
338
|
+
*/
|
|
339
|
+
declare const CardContent: React.ForwardRefExoticComponent<CardContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
340
|
+
declare const cardEyebrowVariants: tailwind_variants.TVReturnType<{} | {} | {}, undefined, "typography-overline text-text-muted uppercase tracking-wider", tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, "typography-overline text-text-muted uppercase tracking-wider", tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
341
|
+
interface CardEyebrowProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Optional eyebrow text above the card title.
|
|
345
|
+
*/
|
|
346
|
+
declare const CardEyebrow: React.ForwardRefExoticComponent<CardEyebrowProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
347
|
+
declare const cardTitleVariants: tailwind_variants.TVReturnType<{} | {} | {}, undefined, "typography-h5 text-text-primary", tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, "typography-h5 text-text-primary", tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
348
|
+
interface CardTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
349
|
+
/**
|
|
350
|
+
* The heading level to render (h1-h6). Defaults to h3.
|
|
351
|
+
*/
|
|
352
|
+
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Card title/heading. Use the `as` prop to change the heading level.
|
|
356
|
+
*/
|
|
357
|
+
declare const CardTitle: React.ForwardRefExoticComponent<CardTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
358
|
+
declare const cardDescriptionVariants: tailwind_variants.TVReturnType<{} | {} | {}, undefined, "typography-body-small text-text-secondary", tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, "typography-body-small text-text-secondary", tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
359
|
+
interface CardDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Card body/description text.
|
|
363
|
+
*/
|
|
364
|
+
declare const CardDescription: React.ForwardRefExoticComponent<CardDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
365
|
+
declare const cardBodyVariants: tailwind_variants.TVReturnType<{} | {} | {}, undefined, "flex w-full flex-col gap-spatial-card-small-gap", tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, "flex w-full flex-col gap-spatial-card-small-gap", tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
366
|
+
interface CardBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Container for card text content (eyebrow, title, description).
|
|
370
|
+
* Uses spatial card tokens for consistent sizing.
|
|
371
|
+
*/
|
|
372
|
+
declare const CardBody: React.ForwardRefExoticComponent<CardBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
373
|
+
declare const cardActionsVariants: tailwind_variants.TVReturnType<{} | {} | {}, undefined, "flex gap-12", tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, "flex gap-12", tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
374
|
+
interface CardActionsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Container for card action buttons.
|
|
378
|
+
* Uses primitive spacing tokens.
|
|
379
|
+
*/
|
|
380
|
+
declare const CardActions: React.ForwardRefExoticComponent<CardActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
381
|
+
declare const cardLinkVariants: tailwind_variants.TVReturnType<{} | {} | {}, undefined, "group/link flex items-center gap-4 text-text-muted transition-colors duration-200 hover:text-text-primary", tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, "group/link flex items-center gap-4 text-text-muted transition-colors duration-200 hover:text-text-primary", tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
382
|
+
interface CardLinkProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
383
|
+
/**
|
|
384
|
+
* Whether to show the arrow indicator
|
|
385
|
+
* @default true
|
|
386
|
+
*/
|
|
387
|
+
showArrow?: boolean;
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Inline link element for cards with optional animated arrow.
|
|
391
|
+
* Commonly used for "Read More →" or "Learn More →" patterns.
|
|
392
|
+
*
|
|
393
|
+
* @example
|
|
394
|
+
* ```tsx
|
|
395
|
+
* <Card layout="compact">
|
|
396
|
+
* <CardImage src="/thumb.jpg" layout="compact" />
|
|
397
|
+
* <CardContent>
|
|
398
|
+
* <CardTitle>Article Title</CardTitle>
|
|
399
|
+
* <CardLink>Read More</CardLink>
|
|
400
|
+
* </CardContent>
|
|
401
|
+
* </Card>
|
|
402
|
+
* ```
|
|
403
|
+
*/
|
|
404
|
+
declare const CardLink: React.ForwardRefExoticComponent<CardLinkProps & React.RefAttributes<HTMLSpanElement>>;
|
|
405
|
+
|
|
406
|
+
export { Card, CardActions, type CardActionsProps, CardBody, type CardBodyProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardEyebrow, type CardEyebrowProps, CardImage, type CardImageProps, CardLink, type CardLinkProps, type CardProps, CardTitle, type CardTitleProps, cardActionsVariants, cardBodyVariants, cardContentVariants, cardDescriptionVariants, cardEyebrowVariants, cardImageVariants, cardLinkVariants, cardTitleVariants, cardVariants };
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { tv } from 'tailwind-variants';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
// src/components/organisms/card/card.tsx
|
|
6
|
+
var cardVariants = tv({
|
|
7
|
+
base: "relative flex overflow-hidden rounded-surface-card bg-card-background stroke-surface-card border-border-subtle border-solid",
|
|
8
|
+
variants: {
|
|
9
|
+
layout: {
|
|
10
|
+
vertical: "w-full flex-col",
|
|
11
|
+
horizontal: "w-full flex-row",
|
|
12
|
+
/**
|
|
13
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
14
|
+
* Use with Background components for images/gradients.
|
|
15
|
+
*/
|
|
16
|
+
overlay: "w-full flex-col",
|
|
17
|
+
/**
|
|
18
|
+
* Profile layout - square image with stacked content below.
|
|
19
|
+
* Ideal for team member cards, user profiles, testimonials.
|
|
20
|
+
*/
|
|
21
|
+
profile: "w-full flex-col",
|
|
22
|
+
/**
|
|
23
|
+
* Compact layout - small thumbnail with condensed horizontal content.
|
|
24
|
+
* Ideal for news items, article previews, resource lists.
|
|
25
|
+
*/
|
|
26
|
+
compact: "w-full flex-row items-center gap-16"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
layout: "vertical"
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
var Card = React.forwardRef(
|
|
34
|
+
({ className, layout, ...props }, ref) => {
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
ref,
|
|
39
|
+
className: cardVariants({ layout, class: className }),
|
|
40
|
+
...props
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
Card.displayName = "Card";
|
|
46
|
+
var cardImageVariants = tv({
|
|
47
|
+
base: "relative shrink-0 bg-bg-muted",
|
|
48
|
+
variants: {
|
|
49
|
+
layout: {
|
|
50
|
+
vertical: "aspect-video w-full",
|
|
51
|
+
horizontal: "aspect-auto w-2/5 self-stretch",
|
|
52
|
+
overlay: "aspect-video w-full",
|
|
53
|
+
/** Profile: square aspect ratio for headshots/avatars */
|
|
54
|
+
profile: "aspect-square w-full",
|
|
55
|
+
/** Compact: fixed small size for thumbnails */
|
|
56
|
+
compact: "size-80 rounded-8"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
defaultVariants: {
|
|
60
|
+
layout: "vertical"
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
var CardImage = React.forwardRef(
|
|
64
|
+
({ className, src, alt = "", layout, ...props }, ref) => {
|
|
65
|
+
return /* @__PURE__ */ jsx(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
ref,
|
|
69
|
+
className: cardImageVariants({ layout, class: className }),
|
|
70
|
+
...props,
|
|
71
|
+
children: src && /* @__PURE__ */ jsx(
|
|
72
|
+
"img",
|
|
73
|
+
{
|
|
74
|
+
src,
|
|
75
|
+
alt,
|
|
76
|
+
className: "absolute inset-0 size-full object-cover"
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
CardImage.displayName = "CardImage";
|
|
84
|
+
var cardContentVariants = tv({
|
|
85
|
+
base: "flex w-full flex-1 flex-col gap-spatial-card-large-gap p-spatial-card-large-padding",
|
|
86
|
+
variants: {
|
|
87
|
+
/**
|
|
88
|
+
* Vertical alignment of content within the card.
|
|
89
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
90
|
+
*/
|
|
91
|
+
justify: {
|
|
92
|
+
start: "justify-start",
|
|
93
|
+
center: "justify-center",
|
|
94
|
+
end: "justify-end"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
var CardContent = React.forwardRef(
|
|
99
|
+
({ className, justify, ...props }, ref) => {
|
|
100
|
+
return /* @__PURE__ */ jsx(
|
|
101
|
+
"div",
|
|
102
|
+
{
|
|
103
|
+
ref,
|
|
104
|
+
className: cardContentVariants({ justify, class: className }),
|
|
105
|
+
...props
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
CardContent.displayName = "CardContent";
|
|
111
|
+
var cardEyebrowVariants = tv({
|
|
112
|
+
base: "typography-overline text-text-muted uppercase tracking-wider"
|
|
113
|
+
});
|
|
114
|
+
var CardEyebrow = React.forwardRef(
|
|
115
|
+
({ className, ...props }, ref) => {
|
|
116
|
+
return /* @__PURE__ */ jsx(
|
|
117
|
+
"p",
|
|
118
|
+
{
|
|
119
|
+
ref,
|
|
120
|
+
className: cardEyebrowVariants({ class: className }),
|
|
121
|
+
...props
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
CardEyebrow.displayName = "CardEyebrow";
|
|
127
|
+
var cardTitleVariants = tv({
|
|
128
|
+
base: "typography-h5 text-text-primary"
|
|
129
|
+
});
|
|
130
|
+
var CardTitle = React.forwardRef(
|
|
131
|
+
({ className, as: Component = "h3", ...props }, ref) => {
|
|
132
|
+
return /* @__PURE__ */ jsx(
|
|
133
|
+
Component,
|
|
134
|
+
{
|
|
135
|
+
ref,
|
|
136
|
+
className: cardTitleVariants({ class: className }),
|
|
137
|
+
...props
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
CardTitle.displayName = "CardTitle";
|
|
143
|
+
var cardDescriptionVariants = tv({
|
|
144
|
+
base: "typography-body-small text-text-secondary"
|
|
145
|
+
});
|
|
146
|
+
var CardDescription = React.forwardRef(({ className, ...props }, ref) => {
|
|
147
|
+
return /* @__PURE__ */ jsx(
|
|
148
|
+
"p",
|
|
149
|
+
{
|
|
150
|
+
ref,
|
|
151
|
+
className: cardDescriptionVariants({ class: className }),
|
|
152
|
+
...props
|
|
153
|
+
}
|
|
154
|
+
);
|
|
155
|
+
});
|
|
156
|
+
CardDescription.displayName = "CardDescription";
|
|
157
|
+
var cardBodyVariants = tv({
|
|
158
|
+
base: "flex w-full flex-col gap-spatial-card-small-gap"
|
|
159
|
+
});
|
|
160
|
+
var CardBody = React.forwardRef(
|
|
161
|
+
({ className, ...props }, ref) => {
|
|
162
|
+
return /* @__PURE__ */ jsx(
|
|
163
|
+
"div",
|
|
164
|
+
{
|
|
165
|
+
ref,
|
|
166
|
+
className: cardBodyVariants({ class: className }),
|
|
167
|
+
...props
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
CardBody.displayName = "CardBody";
|
|
173
|
+
var cardActionsVariants = tv({
|
|
174
|
+
base: "flex gap-12"
|
|
175
|
+
});
|
|
176
|
+
var CardActions = React.forwardRef(
|
|
177
|
+
({ className, ...props }, ref) => {
|
|
178
|
+
return /* @__PURE__ */ jsx(
|
|
179
|
+
"div",
|
|
180
|
+
{
|
|
181
|
+
ref,
|
|
182
|
+
className: cardActionsVariants({ class: className }),
|
|
183
|
+
...props
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
);
|
|
188
|
+
CardActions.displayName = "CardActions";
|
|
189
|
+
var cardLinkVariants = tv({
|
|
190
|
+
base: "group/link flex items-center gap-4 text-text-muted transition-colors duration-200 hover:text-text-primary"
|
|
191
|
+
});
|
|
192
|
+
var CardLink = React.forwardRef(
|
|
193
|
+
({ className, children, showArrow = true, ...props }, ref) => {
|
|
194
|
+
return /* @__PURE__ */ jsxs(
|
|
195
|
+
"span",
|
|
196
|
+
{
|
|
197
|
+
ref,
|
|
198
|
+
className: cardLinkVariants({ class: className }),
|
|
199
|
+
...props,
|
|
200
|
+
children: [
|
|
201
|
+
/* @__PURE__ */ jsx("span", { children }),
|
|
202
|
+
showArrow && /* @__PURE__ */ jsx(
|
|
203
|
+
"span",
|
|
204
|
+
{
|
|
205
|
+
"aria-hidden": "true",
|
|
206
|
+
className: "inline-block transition-transform duration-200 ease-out group-hover/link:translate-x-4",
|
|
207
|
+
children: "\u2192"
|
|
208
|
+
}
|
|
209
|
+
)
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
CardLink.displayName = "CardLink";
|
|
216
|
+
|
|
217
|
+
export { Card, CardActions, CardBody, CardContent, CardDescription, CardEyebrow, CardImage, CardLink, CardTitle, cardActionsVariants, cardBodyVariants, cardContentVariants, cardDescriptionVariants, cardEyebrowVariants, cardImageVariants, cardLinkVariants, cardTitleVariants, cardVariants };
|
|
218
|
+
//# sourceMappingURL=index.js.map
|
|
219
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/organisms/card/card.tsx"],"names":[],"mappings":";;;;;AAGA,IAAM,eAAe,EAAA,CAAG;AAAA,EACvB,IAAA,EAAM,6HAAA;AAAA,EACN,QAAA,EAAU;AAAA,IACT,MAAA,EAAQ;AAAA,MACP,QAAA,EAAU,iBAAA;AAAA,MACV,UAAA,EAAY,iBAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAKZ,OAAA,EAAS,iBAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAKT,OAAA,EAAS,iBAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAKT,OAAA,EAAS;AAAA;AACV,GACD;AA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,KAAQ;AACjC,IAAA,uBACC,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACA,GAAA;AAAA,QACA,SAAA,EAAW,mBAAA,CAAoB,EAAE,KAAA,EAAO,WAAW,CAAA;AAAA,QAClD,GAAG;AAAA;AAAA,KACL;AAAA,EAEF;AACD;AACA,WAAA,CAAY,WAAA,GAAc,aAAA;AAE1B,IAAM,mBAAmB,EAAA,CAAG;AAAA,EAC3B,IAAA,EAAM;AACP,CAAC;AAyBD,IAAM,QAAA,GAAiB,KAAA,CAAA,UAAA;AAAA,EACtB,CAAC,EAAE,SAAA,EAAW,QAAA,EAAU,YAAY,IAAA,EAAM,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AAC7D,IAAA,uBACC,IAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACA,GAAA;AAAA,QACA,SAAA,EAAW,gBAAA,CAAiB,EAAE,KAAA,EAAO,WAAW,CAAA;AAAA,QAC/C,GAAG,KAAA;AAAA,QAEJ,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,UAAM,QAAA,EAAS,CAAA;AAAA,UACf,SAAA,oBACA,GAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACA,aAAA,EAAY,MAAA;AAAA,cACZ,SAAA,EAAU,wFAAA;AAAA,cACV,QAAA,EAAA;AAAA;AAAA;AAED;AAAA;AAAA,KAEF;AAAA,EAEF;AACD;AACA,QAAA,CAAS,WAAA,GAAc,UAAA","file":"index.js","sourcesContent":["import * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nconst cardVariants = tv({\n\tbase: \"relative flex overflow-hidden rounded-surface-card bg-card-background stroke-surface-card border-border-subtle border-solid\",\n\tvariants: {\n\t\tlayout: {\n\t\t\tvertical: \"w-full flex-col\",\n\t\t\thorizontal: \"w-full flex-row\",\n\t\t\t/**\n\t\t\t * Overlay layout - content sits on top of full-bleed background.\n\t\t\t * Use with Background components for images/gradients.\n\t\t\t */\n\t\t\toverlay: \"w-full flex-col\",\n\t\t\t/**\n\t\t\t * Profile layout - square image with stacked content below.\n\t\t\t * Ideal for team member cards, user profiles, testimonials.\n\t\t\t */\n\t\t\tprofile: \"w-full flex-col\",\n\t\t\t/**\n\t\t\t * Compact layout - small thumbnail with condensed horizontal content.\n\t\t\t * Ideal for news items, article previews, resource lists.\n\t\t\t */\n\t\t\tcompact: \"w-full flex-row items-center gap-16\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tlayout: \"vertical\",\n\t},\n});\n\nexport interface CardProps\n\textends React.HTMLAttributes<HTMLDivElement>,\n\t\tVariantProps<typeof cardVariants> {}\n\n/**\n * Card component for displaying content in a contained, scannable format.\n *\n * Layouts:\n * - vertical: Image on top, content below (default)\n * - horizontal: Image on left, content on right\n * - overlay: Full-bleed background with content on top\n *\n * Use with CardImage, CardContent, CardEyebrow, CardTitle, CardDescription, and CardActions.\n * For overlay layout, use Background components for full-bleed backgrounds.\n */\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(\n\t({ className, layout, ...props }, ref) => {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cardVariants({ layout, class: className })}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nCard.displayName = \"Card\";\n\nconst cardImageVariants = tv({\n\tbase: \"relative shrink-0 bg-bg-muted\",\n\tvariants: {\n\t\tlayout: {\n\t\t\tvertical: \"aspect-video w-full\",\n\t\t\thorizontal: \"aspect-auto w-2/5 self-stretch\",\n\t\t\toverlay: \"aspect-video w-full\",\n\t\t\t/** Profile: square aspect ratio for headshots/avatars */\n\t\t\tprofile: \"aspect-square w-full\",\n\t\t\t/** Compact: fixed small size for thumbnails */\n\t\t\tcompact: \"size-80 rounded-8\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tlayout: \"vertical\",\n\t},\n});\n\nexport interface CardImageProps\n\textends React.HTMLAttributes<HTMLDivElement>,\n\t\tVariantProps<typeof cardImageVariants> {\n\t/**\n\t * The image source URL\n\t */\n\tsrc?: string;\n\t/**\n\t * Alt text for the image\n\t */\n\talt?: string;\n}\n\n/**\n * Card image area with layout-specific styling.\n * - vertical: 16:9 aspect ratio, full width\n * - horizontal: ~40% width, stretches to content height\n * - profile: square aspect ratio for headshots/avatars\n * - compact: fixed small size for thumbnails\n */\nconst CardImage = React.forwardRef<HTMLDivElement, CardImageProps>(\n\t({ className, src, alt = \"\", layout, ...props }, ref) => {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cardImageVariants({ layout, class: className })}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{src && (\n\t\t\t\t\t<img\n\t\t\t\t\t\tsrc={src}\n\t\t\t\t\t\talt={alt}\n\t\t\t\t\t\tclassName=\"absolute inset-0 size-full object-cover\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t},\n);\nCardImage.displayName = \"CardImage\";\n\nconst cardContentVariants = tv({\n\tbase: \"flex w-full flex-1 flex-col gap-spatial-card-large-gap p-spatial-card-large-padding\",\n\tvariants: {\n\t\t/**\n\t\t * Vertical alignment of content within the card.\n\t\t * Useful for overlay layouts to position content at top/center/bottom.\n\t\t */\n\t\tjustify: {\n\t\t\tstart: \"justify-start\",\n\t\t\tcenter: \"justify-center\",\n\t\t\tend: \"justify-end\",\n\t\t},\n\t},\n});\n\nexport interface CardContentProps\n\textends React.HTMLAttributes<HTMLDivElement>,\n\t\tVariantProps<typeof cardContentVariants> {}\n\n/**\n * Card content container with proper padding and spacing.\n * Uses spatial card tokens for consistent sizing.\n * For overlay layout, add `relative z-10` to ensure content sits above background.\n *\n * @example\n * ```tsx\n * // Content at bottom of overlay card\n * <Card layout=\"overlay\">\n * <Background.Image src=\"/hero.jpg\" />\n * <CardContent justify=\"end\" className=\"relative z-10\">\n * <CardTitle>Title</CardTitle>\n * </CardContent>\n * </Card>\n * ```\n */\nconst CardContent = React.forwardRef<HTMLDivElement, CardContentProps>(\n\t({ className, justify, ...props }, ref) => {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cardContentVariants({ justify, class: className })}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nCardContent.displayName = \"CardContent\";\n\nconst cardEyebrowVariants = tv({\n\tbase: \"typography-overline text-text-muted uppercase tracking-wider\",\n});\n\nexport interface CardEyebrowProps\n\textends React.HTMLAttributes<HTMLParagraphElement> {}\n\n/**\n * Optional eyebrow text above the card title.\n */\nconst CardEyebrow = React.forwardRef<HTMLParagraphElement, CardEyebrowProps>(\n\t({ className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<p\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cardEyebrowVariants({ class: className })}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nCardEyebrow.displayName = \"CardEyebrow\";\n\nconst cardTitleVariants = tv({\n\tbase: \"typography-h5 text-text-primary\",\n});\n\nexport interface CardTitleProps\n\textends React.HTMLAttributes<HTMLHeadingElement> {\n\t/**\n\t * The heading level to render (h1-h6). Defaults to h3.\n\t */\n\tas?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n}\n\n/**\n * Card title/heading. Use the `as` prop to change the heading level.\n */\nconst CardTitle = React.forwardRef<HTMLHeadingElement, CardTitleProps>(\n\t({ className, as: Component = \"h3\", ...props }, ref) => {\n\t\treturn (\n\t\t\t<Component\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cardTitleVariants({ class: className })}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nCardTitle.displayName = \"CardTitle\";\n\nconst cardDescriptionVariants = tv({\n\tbase: \"typography-body-small text-text-secondary\",\n});\n\nexport interface CardDescriptionProps\n\textends React.HTMLAttributes<HTMLParagraphElement> {}\n\n/**\n * Card body/description text.\n */\nconst CardDescription = React.forwardRef<\n\tHTMLParagraphElement,\n\tCardDescriptionProps\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<p\n\t\t\tref={ref}\n\t\t\tclassName={cardDescriptionVariants({ class: className })}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nCardDescription.displayName = \"CardDescription\";\n\nconst cardBodyVariants = tv({\n\tbase: \"flex w-full flex-col gap-spatial-card-small-gap\",\n});\n\nexport interface CardBodyProps extends React.HTMLAttributes<HTMLDivElement> {}\n\n/**\n * Container for card text content (eyebrow, title, description).\n * Uses spatial card tokens for consistent sizing.\n */\nconst CardBody = React.forwardRef<HTMLDivElement, CardBodyProps>(\n\t({ className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cardBodyVariants({ class: className })}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nCardBody.displayName = \"CardBody\";\n\nconst cardActionsVariants = tv({\n\tbase: \"flex gap-12\",\n});\n\nexport interface CardActionsProps\n\textends React.HTMLAttributes<HTMLDivElement> {}\n\n/**\n * Container for card action buttons.\n * Uses primitive spacing tokens.\n */\nconst CardActions = React.forwardRef<HTMLDivElement, CardActionsProps>(\n\t({ className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cardActionsVariants({ class: className })}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nCardActions.displayName = \"CardActions\";\n\nconst cardLinkVariants = tv({\n\tbase: \"group/link flex items-center gap-4 text-text-muted transition-colors duration-200 hover:text-text-primary\",\n});\n\nexport interface CardLinkProps extends React.HTMLAttributes<HTMLSpanElement> {\n\t/**\n\t * Whether to show the arrow indicator\n\t * @default true\n\t */\n\tshowArrow?: boolean;\n}\n\n/**\n * Inline link element for cards with optional animated arrow.\n * Commonly used for \"Read More →\" or \"Learn More →\" patterns.\n *\n * @example\n * ```tsx\n * <Card layout=\"compact\">\n * <CardImage src=\"/thumb.jpg\" layout=\"compact\" />\n * <CardContent>\n * <CardTitle>Article Title</CardTitle>\n * <CardLink>Read More</CardLink>\n * </CardContent>\n * </Card>\n * ```\n */\nconst CardLink = React.forwardRef<HTMLSpanElement, CardLinkProps>(\n\t({ className, children, showArrow = true, ...props }, ref) => {\n\t\treturn (\n\t\t\t<span\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cardLinkVariants({ class: className })}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<span>{children}</span>\n\t\t\t\t{showArrow && (\n\t\t\t\t\t<span\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclassName=\"inline-block transition-transform duration-200 ease-out group-hover/link:translate-x-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t→\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t</span>\n\t\t);\n\t},\n);\nCardLink.displayName = \"CardLink\";\n\nexport {\n\tCard,\n\tcardVariants,\n\tCardImage,\n\tcardImageVariants,\n\tCardContent,\n\tcardContentVariants,\n\tCardEyebrow,\n\tcardEyebrowVariants,\n\tCardTitle,\n\tcardTitleVariants,\n\tCardDescription,\n\tcardDescriptionVariants,\n\tCardBody,\n\tcardBodyVariants,\n\tCardActions,\n\tcardActionsVariants,\n\tCardLink,\n\tcardLinkVariants,\n};\n"]}
|