@spark-ui/components 10.13.0 → 10.14.1

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.
@@ -2,9 +2,9 @@ import {
2
2
  Dialog
3
3
  } from "../chunk-5VKP2RR6.mjs";
4
4
  import "../chunk-MKN2Y3W6.mjs";
5
+ import "../chunk-UMUMFMFB.mjs";
5
6
  import "../chunk-3PTXYZYN.mjs";
6
7
  import "../chunk-GAK4SC2F.mjs";
7
- import "../chunk-UMUMFMFB.mjs";
8
8
  import "../chunk-KEGAAGJW.mjs";
9
9
  import "../chunk-6QCEPQ3U.mjs";
10
10
 
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  IconButton
3
3
  } from "../chunk-MKN2Y3W6.mjs";
4
- import "../chunk-3PTXYZYN.mjs";
5
- import "../chunk-GAK4SC2F.mjs";
6
4
  import {
7
5
  Icon
8
6
  } from "../chunk-UMUMFMFB.mjs";
7
+ import "../chunk-3PTXYZYN.mjs";
8
+ import "../chunk-GAK4SC2F.mjs";
9
9
  import "../chunk-KEGAAGJW.mjs";
10
10
  import {
11
11
  Slot
@@ -0,0 +1,61 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ import { ComponentProps } from 'react';
5
+
6
+ declare const backdropStyles: (props?: ({
7
+ animation?: "none" | "slideRight" | null | undefined;
8
+ intent?: "main" | "support" | "accent" | "basic" | "success" | "alert" | "danger" | "info" | "neutral" | "surface" | "surfaceInverse" | null | undefined;
9
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
10
+ type BackdropStylesProps = VariantProps<typeof backdropStyles>;
11
+ interface BackdropProps extends BackdropStylesProps {
12
+ className?: string;
13
+ }
14
+ declare const Backdrop: {
15
+ ({ intent, animation, ...props }: BackdropProps): react_jsx_runtime.JSX.Element;
16
+ displayName: string;
17
+ };
18
+
19
+ declare const cardStyles: (props?: ({
20
+ design?: "filled" | "outlined" | "tinted" | null | undefined;
21
+ hasBackdrop?: boolean | null | undefined;
22
+ intent?: "main" | "support" | "accent" | "basic" | "success" | "alert" | "danger" | "info" | "neutral" | "surface" | "surfaceInverse" | null | undefined;
23
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
24
+ type CardStylesProps = VariantProps<typeof cardStyles>;
25
+
26
+ interface CardProps extends ComponentProps<'div'>, CardStylesProps {
27
+ /**
28
+ * Change the component to the HTML tag or custom component of the only child.
29
+ */
30
+ asChild?: boolean;
31
+ /**
32
+ * Whether the card should have an inset padding.
33
+ */
34
+ inset?: boolean;
35
+ }
36
+ declare const Card$1: {
37
+ ({ children, design, intent, inset, asChild, className, ref, ...props }: CardProps): react_jsx_runtime.JSX.Element;
38
+ displayName: string;
39
+ };
40
+
41
+ interface ContentProps extends ComponentProps<'div'> {
42
+ /**
43
+ * Change the component to the HTML tag or custom component of the only child.
44
+ */
45
+ asChild?: boolean;
46
+ /**
47
+ * Whether the card should have an inset padding.
48
+ */
49
+ inset?: boolean;
50
+ }
51
+ declare const Content: {
52
+ ({ children, inset, asChild, className, ref, ...props }: ContentProps): react_jsx_runtime.JSX.Element;
53
+ displayName: string;
54
+ };
55
+
56
+ declare const Card: typeof Card$1 & {
57
+ Content: typeof Content;
58
+ Backdrop: typeof Backdrop;
59
+ };
60
+
61
+ export { Card, type CardProps };
@@ -0,0 +1,61 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ import { ComponentProps } from 'react';
5
+
6
+ declare const backdropStyles: (props?: ({
7
+ animation?: "none" | "slideRight" | null | undefined;
8
+ intent?: "main" | "support" | "accent" | "basic" | "success" | "alert" | "danger" | "info" | "neutral" | "surface" | "surfaceInverse" | null | undefined;
9
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
10
+ type BackdropStylesProps = VariantProps<typeof backdropStyles>;
11
+ interface BackdropProps extends BackdropStylesProps {
12
+ className?: string;
13
+ }
14
+ declare const Backdrop: {
15
+ ({ intent, animation, ...props }: BackdropProps): react_jsx_runtime.JSX.Element;
16
+ displayName: string;
17
+ };
18
+
19
+ declare const cardStyles: (props?: ({
20
+ design?: "filled" | "outlined" | "tinted" | null | undefined;
21
+ hasBackdrop?: boolean | null | undefined;
22
+ intent?: "main" | "support" | "accent" | "basic" | "success" | "alert" | "danger" | "info" | "neutral" | "surface" | "surfaceInverse" | null | undefined;
23
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
24
+ type CardStylesProps = VariantProps<typeof cardStyles>;
25
+
26
+ interface CardProps extends ComponentProps<'div'>, CardStylesProps {
27
+ /**
28
+ * Change the component to the HTML tag or custom component of the only child.
29
+ */
30
+ asChild?: boolean;
31
+ /**
32
+ * Whether the card should have an inset padding.
33
+ */
34
+ inset?: boolean;
35
+ }
36
+ declare const Card$1: {
37
+ ({ children, design, intent, inset, asChild, className, ref, ...props }: CardProps): react_jsx_runtime.JSX.Element;
38
+ displayName: string;
39
+ };
40
+
41
+ interface ContentProps extends ComponentProps<'div'> {
42
+ /**
43
+ * Change the component to the HTML tag or custom component of the only child.
44
+ */
45
+ asChild?: boolean;
46
+ /**
47
+ * Whether the card should have an inset padding.
48
+ */
49
+ inset?: boolean;
50
+ }
51
+ declare const Content: {
52
+ ({ children, inset, asChild, className, ref, ...props }: ContentProps): react_jsx_runtime.JSX.Element;
53
+ displayName: string;
54
+ };
55
+
56
+ declare const Card: typeof Card$1 & {
57
+ Content: typeof Content;
58
+ Backdrop: typeof Backdrop;
59
+ };
60
+
61
+ export { Card, type CardProps };
@@ -0,0 +1,502 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/card/index.ts
21
+ var card_exports = {};
22
+ __export(card_exports, {
23
+ Card: () => Card2
24
+ });
25
+ module.exports = __toCommonJS(card_exports);
26
+
27
+ // src/card/Backdrop.tsx
28
+ var import_internal_utils = require("@spark-ui/internal-utils");
29
+ var import_class_variance_authority = require("class-variance-authority");
30
+ var import_jsx_runtime = require("react/jsx-runtime");
31
+ var backdropStyles = (0, import_class_variance_authority.cva)(
32
+ [
33
+ "default:bg-surface default:bg-gradient-to-r absolute inset-x-0 top-0",
34
+ "h-sz-16",
35
+ "default:rounded-t-lg",
36
+ "bg-[length:200%_100%]"
37
+ ],
38
+ {
39
+ variants: {
40
+ animation: {
41
+ none: "",
42
+ slideRight: "animate-slide-bg-right"
43
+ },
44
+ intent: (0, import_internal_utils.makeVariants)({
45
+ main: ["default:from-main/dim-4 default:via-main/dim-2 default:to-main/dim-4"],
46
+ support: ["default:from-support/dim-4 default:via-support/dim-2 default:to-support/dim-4"],
47
+ accent: ["default:from-accent/dim-4 default:via-accent/dim-2 default:to-accent/dim-4"],
48
+ basic: ["default:from-basic/dim-4 default:via-basic/dim-2 default:to-basic/dim-4"],
49
+ success: ["default:from-success/dim-4 default:via-success/dim-2 default:to-success/dim-4"],
50
+ alert: ["default:from-alert/dim-4 default:via-alert/dim-2 default:to-alert/dim-4"],
51
+ danger: ["default:from-error/dim-4 default:via-error/dim-2 default:to-error/dim-4"],
52
+ info: ["default:from-info/dim-4 default:via-info/dim-2 default:to-info/dim-4"],
53
+ neutral: ["default:from-neutral/dim-4 default:via-neutral/dim-2 default:to-neutral/dim-4"],
54
+ surface: ["default:from-outline/dim-4 default:via-outline/dim-2 default:to-outline/dim-4"],
55
+ surfaceInverse: [
56
+ "default:from-surface/dim-4 default:via-surface/dim-2 default:to-surface/dim-4"
57
+ ]
58
+ })
59
+ },
60
+ defaultVariants: {
61
+ intent: "main",
62
+ animation: "none"
63
+ }
64
+ }
65
+ );
66
+ var Backdrop = ({ intent = "main", animation = "none", ...props }) => {
67
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: backdropStyles({ intent, animation }), ...props });
68
+ };
69
+ Backdrop.displayName = "Card.Backdrop";
70
+
71
+ // src/slot/Slot.tsx
72
+ var import_radix_ui = require("radix-ui");
73
+ var import_react = require("react");
74
+ var import_jsx_runtime2 = require("react/jsx-runtime");
75
+ var Slottable = import_radix_ui.Slot.Slottable;
76
+ var Slot = ({ ref, ...props }) => {
77
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_radix_ui.Slot.Root, { ref, ...props });
78
+ };
79
+
80
+ // src/card/Card.styles.tsx
81
+ var import_internal_utils2 = require("@spark-ui/internal-utils");
82
+ var import_class_variance_authority2 = require("class-variance-authority");
83
+ var cardStyles = (0, import_class_variance_authority2.cva)(
84
+ [
85
+ "group relative bg-clip-padding default:rounded-lg focus-visible:u-outline",
86
+ "disabled:opacity-dim-3 disabled:cursor-not-allowed"
87
+ ],
88
+ {
89
+ variants: {
90
+ design: {
91
+ filled: [],
92
+ outlined: ["border-sm"],
93
+ tinted: []
94
+ },
95
+ hasBackdrop: {
96
+ true: ["pt-md"]
97
+ },
98
+ /**
99
+ * Color scheme of the button.
100
+ */
101
+ intent: (0, import_internal_utils2.makeVariants)({
102
+ main: [],
103
+ support: [],
104
+ accent: [],
105
+ basic: [],
106
+ success: [],
107
+ alert: [],
108
+ danger: [],
109
+ info: [],
110
+ neutral: [],
111
+ surface: [],
112
+ surfaceInverse: []
113
+ })
114
+ },
115
+ compoundVariants: [
116
+ // OUTLINED
117
+ { intent: "main", design: "outlined", class: (0, import_internal_utils2.tw)(["border-main"]) },
118
+ { intent: "support", design: "outlined", class: (0, import_internal_utils2.tw)(["border-support"]) },
119
+ { intent: "accent", design: "outlined", class: (0, import_internal_utils2.tw)(["border-accent"]) },
120
+ { intent: "basic", design: "outlined", class: (0, import_internal_utils2.tw)(["border-basic"]) },
121
+ { intent: "success", design: "outlined", class: (0, import_internal_utils2.tw)(["border-success"]) },
122
+ { intent: "alert", design: "outlined", class: (0, import_internal_utils2.tw)(["border-alert"]) },
123
+ { intent: "danger", design: "outlined", class: (0, import_internal_utils2.tw)(["border-error"]) },
124
+ { intent: "info", design: "outlined", class: (0, import_internal_utils2.tw)(["border-info"]) },
125
+ { intent: "neutral", design: "outlined", class: (0, import_internal_utils2.tw)(["border-neutral"]) },
126
+ { intent: "surface", design: "outlined", class: (0, import_internal_utils2.tw)(["border-outline"]) }
127
+ ],
128
+ defaultVariants: {
129
+ design: "filled",
130
+ intent: "surface"
131
+ }
132
+ }
133
+ );
134
+
135
+ // src/card/context.tsx
136
+ var import_react2 = require("react");
137
+ var CardContext = (0, import_react2.createContext)(void 0);
138
+ var useCardContext = () => {
139
+ const context = (0, import_react2.useContext)(CardContext);
140
+ if (!context) {
141
+ throw new Error("useCardContext must be used within a Card component");
142
+ }
143
+ return context;
144
+ };
145
+
146
+ // src/card/utils.ts
147
+ var import_react3 = require("react");
148
+ var MOUSE_EVENTS = [
149
+ "onClick",
150
+ "onMouseDown",
151
+ "onMouseUp",
152
+ "onMouseEnter",
153
+ "onMouseLeave",
154
+ "onMouseMove",
155
+ "onMouseOver",
156
+ "onMouseOut",
157
+ "onDoubleClick",
158
+ "onContextMenu"
159
+ ];
160
+ var hasBackdrop = (children) => {
161
+ let backdropFound = false;
162
+ const searchForBackdrop = (node) => {
163
+ if (backdropFound) return;
164
+ import_react3.Children.forEach(node, (child) => {
165
+ if (backdropFound) return;
166
+ if ((0, import_react3.isValidElement)(child)) {
167
+ const isBackdropComponent = typeof child.type === "function" && child.type.displayName === "Card.Backdrop";
168
+ if (isBackdropComponent) {
169
+ backdropFound = true;
170
+ return;
171
+ }
172
+ const hasChildren = child.props && typeof child.props === "object" && "children" in child.props;
173
+ if (hasChildren) {
174
+ const childChildren = child.props.children;
175
+ if (childChildren !== void 0 && childChildren !== null) {
176
+ searchForBackdrop(childChildren);
177
+ }
178
+ }
179
+ }
180
+ });
181
+ };
182
+ searchForBackdrop(children);
183
+ return backdropFound;
184
+ };
185
+ var isInteractive = (children, asChild, props) => {
186
+ const hasMouseEventHandlers = MOUSE_EVENTS.some((event) => event in props);
187
+ if (hasMouseEventHandlers) {
188
+ return true;
189
+ }
190
+ if (!asChild) {
191
+ return false;
192
+ }
193
+ const child = import_react3.Children.only(children);
194
+ if (!(0, import_react3.isValidElement)(child)) {
195
+ return false;
196
+ }
197
+ const interactiveElements = ["a", "button"];
198
+ const isInteractiveElement = typeof child.type === "string" && interactiveElements.includes(child.type);
199
+ if (isInteractiveElement) {
200
+ return true;
201
+ }
202
+ const childProps = child.props;
203
+ const hasChildEventHandlers = MOUSE_EVENTS.some((event) => event in childProps);
204
+ return hasChildEventHandlers;
205
+ };
206
+
207
+ // src/card/Card.tsx
208
+ var import_jsx_runtime3 = require("react/jsx-runtime");
209
+ var Card = ({
210
+ children,
211
+ design = "filled",
212
+ intent = "surface",
213
+ inset = false,
214
+ asChild,
215
+ className,
216
+ ref,
217
+ ...props
218
+ }) => {
219
+ const Component = asChild ? Slot : "div";
220
+ const backdropDetected = hasBackdrop(children);
221
+ const interactiveDetected = isInteractive(children, asChild, props);
222
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
223
+ CardContext.Provider,
224
+ {
225
+ value: {
226
+ design,
227
+ intent,
228
+ hasBackdrop: backdropDetected,
229
+ inset,
230
+ isInteractive: interactiveDetected
231
+ },
232
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
233
+ Component,
234
+ {
235
+ "data-spark-component": "card",
236
+ "data-interactive": interactiveDetected,
237
+ ref,
238
+ className: cardStyles({
239
+ className,
240
+ design,
241
+ intent,
242
+ hasBackdrop: backdropDetected
243
+ }),
244
+ ...props,
245
+ children
246
+ }
247
+ )
248
+ }
249
+ );
250
+ };
251
+ Card.displayName = "Card";
252
+
253
+ // src/card/Content.styles.tsx
254
+ var import_internal_utils3 = require("@spark-ui/internal-utils");
255
+ var import_class_variance_authority3 = require("class-variance-authority");
256
+ var contentStyles = (0, import_class_variance_authority3.cva)(
257
+ [
258
+ "relative h-full default:rounded-lg w-full focus-visible:u-outline",
259
+ "default:transition-colors default:duration-200 ease-linear"
260
+ ],
261
+ {
262
+ variants: {
263
+ inset: {
264
+ false: ["default:p-lg"]
265
+ },
266
+ design: {
267
+ filled: [],
268
+ outlined: [
269
+ "default:bg-surface group-focus:bg-surface-hovered group-not-disabled:group-data-[interactive=true]:group-hover:bg-surface-hovered"
270
+ ],
271
+ tinted: []
272
+ },
273
+ hasBackdrop: {
274
+ true: ["rounded-t-[16px_8px] "]
275
+ },
276
+ intent: (0, import_internal_utils3.makeVariants)({
277
+ main: [],
278
+ support: [],
279
+ accent: [],
280
+ basic: [],
281
+ success: [],
282
+ alert: [],
283
+ danger: [],
284
+ info: [],
285
+ neutral: [],
286
+ surface: [],
287
+ surfaceInverse: []
288
+ })
289
+ },
290
+ compoundVariants: [
291
+ // FILLED
292
+ {
293
+ intent: "main",
294
+ design: "filled",
295
+ class: (0, import_internal_utils3.tw)([
296
+ "bg-main text-on-main group-focus:bg-main-hovered",
297
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-main-hovered"
298
+ ])
299
+ },
300
+ {
301
+ intent: "support",
302
+ design: "filled",
303
+ class: (0, import_internal_utils3.tw)([
304
+ "bg-support text-on-support group-focus:bg-support-hovered",
305
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-support-hovered"
306
+ ])
307
+ },
308
+ {
309
+ intent: "accent",
310
+ design: "filled",
311
+ class: (0, import_internal_utils3.tw)([
312
+ "bg-accent text-on-accent group-focus:bg-accent-hovered",
313
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-accent-hovered"
314
+ ])
315
+ },
316
+ {
317
+ intent: "basic",
318
+ design: "filled",
319
+ class: (0, import_internal_utils3.tw)([
320
+ "bg-basic text-on-basic group-focus:bg-basic-hovered",
321
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-basic-hovered"
322
+ ])
323
+ },
324
+ {
325
+ intent: "success",
326
+ design: "filled",
327
+ class: (0, import_internal_utils3.tw)([
328
+ "bg-success text-on-success group-focus:bg-success-hovered",
329
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-success-hovered"
330
+ ])
331
+ },
332
+ {
333
+ intent: "alert",
334
+ design: "filled",
335
+ class: (0, import_internal_utils3.tw)([
336
+ "bg-alert text-on-alert group-focus:bg-alert-hovered",
337
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-alert-hovered"
338
+ ])
339
+ },
340
+ {
341
+ intent: "danger",
342
+ design: "filled",
343
+ class: (0, import_internal_utils3.tw)([
344
+ "text-on-error bg-error group-focus:bg-error-hovered",
345
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-error-hovered"
346
+ ])
347
+ },
348
+ {
349
+ intent: "info",
350
+ design: "filled",
351
+ class: (0, import_internal_utils3.tw)([
352
+ "text-on-error bg-info group-focus:bg-info-hovered",
353
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-info-hovered"
354
+ ])
355
+ },
356
+ {
357
+ intent: "neutral",
358
+ design: "filled",
359
+ class: (0, import_internal_utils3.tw)([
360
+ "bg-neutral text-on-neutral group-focus:bg-neutral-hovered",
361
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-neutral-hovered"
362
+ ])
363
+ },
364
+ {
365
+ intent: "surface",
366
+ design: "filled",
367
+ class: (0, import_internal_utils3.tw)([
368
+ "bg-surface text-on-surface group-focus:bg-surface-hovered",
369
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-surface-hovered"
370
+ ])
371
+ },
372
+ // OUTLINED
373
+ /**
374
+ * Outlined styles are handled by the Card component (parent)
375
+ */
376
+ // TINTED
377
+ {
378
+ intent: "main",
379
+ design: "tinted",
380
+ class: (0, import_internal_utils3.tw)([
381
+ "bg-main-container text-on-main-container group-focus:bg-main-container-hovered",
382
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-main-container-hovered"
383
+ ])
384
+ },
385
+ {
386
+ intent: "support",
387
+ design: "tinted",
388
+ class: (0, import_internal_utils3.tw)([
389
+ "bg-support-container text-on-support-container group-focus:bg-support-container-hovered",
390
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-support-container-hovered"
391
+ ])
392
+ },
393
+ {
394
+ intent: "accent",
395
+ design: "tinted",
396
+ class: (0, import_internal_utils3.tw)([
397
+ "bg-accent-container text-on-accent-container group-focus:bg-accent-container-hovered",
398
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-accent-container-hovered"
399
+ ])
400
+ },
401
+ {
402
+ intent: "basic",
403
+ design: "tinted",
404
+ class: (0, import_internal_utils3.tw)([
405
+ "bg-basic-container text-on-basic-container group-focus:bg-basic-container-hovered"
406
+ ])
407
+ },
408
+ {
409
+ intent: "success",
410
+ design: "tinted",
411
+ class: (0, import_internal_utils3.tw)([
412
+ "bg-success-container text-on-success-container group-focus:bg-success-container-hovered",
413
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-success-container-hovered"
414
+ ])
415
+ },
416
+ {
417
+ intent: "alert",
418
+ design: "tinted",
419
+ class: (0, import_internal_utils3.tw)([
420
+ "bg-alert-container text-on-alert-container group-focus:bg-alert-container-hovered",
421
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-alert-container-hovered"
422
+ ])
423
+ },
424
+ {
425
+ intent: "danger",
426
+ design: "tinted",
427
+ class: (0, import_internal_utils3.tw)([
428
+ "bg-error-container text-on-error-container group-focus:bg-error-container-hovered",
429
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-error-container-hovered"
430
+ ])
431
+ },
432
+ {
433
+ intent: "info",
434
+ design: "tinted",
435
+ class: (0, import_internal_utils3.tw)([
436
+ "bg-info-container text-on-info-container group-focus:bg-info-container-hovered",
437
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-info-container-hovered"
438
+ ])
439
+ },
440
+ {
441
+ intent: "neutral",
442
+ design: "tinted",
443
+ class: (0, import_internal_utils3.tw)([
444
+ "bg-neutral-container text-on-neutral-container group-focus:bg-neutral-container-hovered",
445
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-neutral-container-hovered"
446
+ ])
447
+ },
448
+ {
449
+ intent: "surface",
450
+ design: "tinted",
451
+ class: (0, import_internal_utils3.tw)([
452
+ "bg-surface text-on-surface group-focus:bg-surface-hovered",
453
+ "group-not-disabled:group-data-[interactive=true]:group-hover:bg-surface-hovered"
454
+ ])
455
+ }
456
+ ],
457
+ defaultVariants: {
458
+ design: "filled",
459
+ intent: "surface",
460
+ inset: false,
461
+ hasBackdrop: true
462
+ }
463
+ }
464
+ );
465
+
466
+ // src/card/Content.tsx
467
+ var import_jsx_runtime4 = require("react/jsx-runtime");
468
+ var Content = ({ children, inset, asChild, className, ref, ...props }) => {
469
+ const Component = asChild ? Slot : "div";
470
+ const { design, intent, hasBackdrop: hasBackdrop2 } = useCardContext();
471
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
472
+ Component,
473
+ {
474
+ "data-spark-component": "card-content",
475
+ ref,
476
+ className: contentStyles({
477
+ className,
478
+ design,
479
+ intent,
480
+ inset,
481
+ hasBackdrop: hasBackdrop2
482
+ }),
483
+ ...props,
484
+ children
485
+ }
486
+ );
487
+ };
488
+ Content.displayName = "Content";
489
+
490
+ // src/card/index.ts
491
+ var Card2 = Object.assign(Card, {
492
+ Content,
493
+ Backdrop
494
+ });
495
+ Card2.displayName = "Card";
496
+ Content.displayName = "Card.Content";
497
+ Backdrop.displayName = "Card.Backdrop";
498
+ // Annotate the CommonJS export names for ESM import in node:
499
+ 0 && (module.exports = {
500
+ Card
501
+ });
502
+ //# sourceMappingURL=index.js.map