sparkdesign 0.4.7 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/cli/registry/basic/alert-dialog.tsx +3 -6
  2. package/cli/registry/basic/button.tsx +19 -6
  3. package/cli/registry/basic/card.tsx +20 -8
  4. package/cli/registry/basic/collapsible-card.tsx +2 -4
  5. package/cli/registry/basic/combobox.tsx +104 -46
  6. package/cli/registry/basic/context-menu.tsx +2 -3
  7. package/cli/registry/basic/date-picker.tsx +78 -7
  8. package/cli/registry/basic/dialog.tsx +3 -8
  9. package/cli/registry/basic/drawer.tsx +3 -5
  10. package/cli/registry/basic/dropdown-menu.tsx +2 -3
  11. package/cli/registry/basic/hover-card.tsx +2 -3
  12. package/cli/registry/basic/icon-button.tsx +18 -11
  13. package/cli/registry/basic/input-group.tsx +4 -4
  14. package/cli/registry/basic/input.tsx +29 -13
  15. package/cli/registry/basic/popover.tsx +2 -3
  16. package/cli/registry/basic/select.tsx +24 -4
  17. package/cli/registry/basic/spinner.tsx +20 -5
  18. package/cli/registry/basic/textarea.tsx +30 -12
  19. package/cli/registry/basic/tooltip.tsx +2 -1
  20. package/cli/registry/meta.json +97 -30
  21. package/dist/registry/basic/alert-dialog.d.ts +1 -1
  22. package/dist/registry/basic/avatar.d.ts +1 -1
  23. package/dist/registry/basic/button.d.ts +3 -1
  24. package/dist/registry/basic/card.d.ts +9 -4
  25. package/dist/registry/basic/combobox.d.ts +20 -9
  26. package/dist/registry/basic/date-picker.d.ts +18 -9
  27. package/dist/registry/basic/dialog.d.ts +1 -1
  28. package/dist/registry/basic/icon-button.d.ts +2 -1
  29. package/dist/registry/basic/input-group.d.ts +5 -3
  30. package/dist/registry/basic/input.d.ts +8 -3
  31. package/dist/registry/basic/item.d.ts +2 -2
  32. package/dist/registry/basic/resizable.d.ts +48 -48
  33. package/dist/registry/basic/select.d.ts +7 -2
  34. package/dist/registry/basic/spinner.d.ts +6 -2
  35. package/dist/registry/basic/tag.d.ts +1 -1
  36. package/dist/registry/basic/textarea.d.ts +9 -3
  37. package/dist/registry/basic/toggle.d.ts +1 -1
  38. package/dist/scale/computed.css +11 -0
  39. package/dist/scale/config.css +11 -0
  40. package/dist/scale/presets/compact.css +7 -0
  41. package/dist/scale/presets/dense.css +7 -0
  42. package/dist/scale/presets/sharp.css +7 -0
  43. package/dist/scale/presets/soft.css +7 -0
  44. package/dist/spark-design.cjs.js +35 -35
  45. package/dist/spark-design.es.js +5151 -3767
  46. package/dist/sparkdesign.css +1 -1
  47. package/dist/src/components/index.d.ts +1 -1
  48. package/dist/src/lib/index.d.ts +1 -1
  49. package/dist/src/lib/motion.d.ts +79 -0
  50. package/dist/theme-base.css +22 -0
  51. package/dist/themes/dark-mint.css +6 -0
  52. package/dist/themes/dark-parchment.css +6 -0
  53. package/dist/themes/light-parchment.css +6 -0
  54. package/dist/tokens/scale/computed.css +11 -0
  55. package/dist/tokens/scale/config.css +11 -0
  56. package/dist/tokens/scale/presets/compact.css +7 -0
  57. package/dist/tokens/scale/presets/dense.css +7 -0
  58. package/dist/tokens/scale/presets/sharp.css +7 -0
  59. package/dist/tokens/scale/presets/soft.css +7 -0
  60. package/dist/tokens/theme-base.css +22 -0
  61. package/dist/tokens/themes/dark-mint.css +6 -0
  62. package/dist/tokens/themes/dark-parchment.css +6 -0
  63. package/dist/tokens/themes/light-parchment.css +6 -0
  64. package/package.json +1 -1
@@ -1,27 +1,43 @@
1
1
  import * as React from 'react'
2
+ import { cva, type VariantProps } from 'class-variance-authority'
2
3
  import { cn } from '@/lib/utils'
3
4
 
4
- export type InputProps = React.InputHTMLAttributes<HTMLInputElement>
5
+ const inputVariants = cva(
6
+ [
7
+ 'flex w-full min-w-0 rounded-lg border border-border-tertiary bg-bg-container text-text transition-colors',
8
+ 'placeholder:text-text-tertiary',
9
+ 'file:border-0 file:bg-transparent file:font-medium file:text-text',
10
+ 'outline-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0',
11
+ 'focus:border-border-secondary focus-visible:border-border-secondary',
12
+ 'disabled:cursor-not-allowed disabled:opacity-50',
13
+ 'aria-invalid:border-error aria-invalid:ring-0',
14
+ ].join(' '),
15
+ {
16
+ variants: {
17
+ size: {
18
+ sm: 'h-7 px-2 py-0.5 text-xs file:text-xs',
19
+ md: 'h-9 px-3 py-1 text-sm file:text-sm',
20
+ lg: 'h-11 px-4 py-1.5 text-base file:text-base',
21
+ },
22
+ },
23
+ defaultVariants: { size: 'md' },
24
+ }
25
+ )
26
+
27
+ export interface InputProps
28
+ extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>,
29
+ VariantProps<typeof inputVariants> {}
5
30
 
6
31
  const Input = React.forwardRef<HTMLInputElement, InputProps>(
7
- ({ className, type, ...props }, ref) => (
32
+ ({ className, type, size = 'md', ...props }, ref) => (
8
33
  <input
9
34
  type={type}
10
35
  ref={ref}
11
- className={cn(
12
- 'flex h-9 w-full min-w-0 rounded-lg border border-border-tertiary bg-bg-container px-3 py-1 text-sm text-text transition-colors',
13
- 'placeholder:text-text-tertiary',
14
- 'file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-text',
15
- 'outline-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0',
16
- 'focus:border-border-secondary focus-visible:border-border-secondary',
17
- 'disabled:cursor-not-allowed disabled:opacity-50',
18
- 'aria-invalid:border-error aria-invalid:ring-0',
19
- className,
20
- )}
36
+ className={cn(inputVariants({ size }), className)}
21
37
  {...props}
22
38
  />
23
39
  ),
24
40
  )
25
41
  Input.displayName = 'Input'
26
42
 
27
- export { Input }
43
+ export { Input, inputVariants }
@@ -2,6 +2,7 @@ import * as React from 'react'
2
2
  import { motion } from 'framer-motion'
3
3
  import * as PopoverPrimitive from '@radix-ui/react-popover'
4
4
  import { cn } from '@/lib/utils'
5
+ import { MOTION_SCALE_IN } from '@/lib/motion'
5
6
  import { getThemeFromDocument } from './theme-from-document'
6
7
 
7
8
  const Popover = PopoverPrimitive.Root
@@ -42,9 +43,7 @@ const PopoverContent = React.forwardRef<
42
43
  {...props}
43
44
  >
44
45
  <motion.div
45
- initial={{ opacity: 0, y: 4 }}
46
- animate={{ opacity: 1, y: 0 }}
47
- transition={{ duration: 0.15, ease: [0.4, 0, 0.2, 1] }}
46
+ {...MOTION_SCALE_IN}
48
47
  >
49
48
  {children}
50
49
  </motion.div>
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react'
2
2
  import * as SelectPrimitive from '@radix-ui/react-select'
3
+ import { cva, type VariantProps } from 'class-variance-authority'
3
4
  import { cn } from '@/lib/utils'
4
5
  import { ArrowDownSLine, ArrowUpLine, CheckLine } from './icons-inline'
5
6
  import { getThemeFromDocument } from './theme-from-document'
@@ -12,21 +13,39 @@ const Select = SelectPrimitive.Root
12
13
  const SelectGroup = SelectPrimitive.Group
13
14
  const SelectValue = SelectPrimitive.Value
14
15
 
16
+ const selectTriggerVariants = cva(
17
+ [
18
+ 'flex w-full items-center justify-between gap-2 whitespace-nowrap rounded-lg border border-border-tertiary bg-bg-container text-text placeholder:text-muted-foreground transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',
19
+ 'focus:border-border-secondary focus-visible:border-border-secondary data-[state=open]:border-border-secondary',
20
+ ].join(' '),
21
+ {
22
+ variants: {
23
+ size: {
24
+ sm: 'h-7 px-2 py-0.5 text-xs',
25
+ md: 'h-9 px-3 py-2 text-sm',
26
+ lg: 'h-11 px-4 py-2.5 text-base',
27
+ },
28
+ },
29
+ defaultVariants: { size: 'md' },
30
+ }
31
+ )
32
+
15
33
  export interface SelectTriggerProps
16
- extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> {
34
+ extends Omit<React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>, 'size'>,
35
+ VariantProps<typeof selectTriggerVariants> {
17
36
  triggerIcon?: React.ReactNode
37
+ size?: 'sm' | 'md' | 'lg'
18
38
  }
19
39
 
20
40
  const SelectTrigger = React.forwardRef<
21
41
  React.ElementRef<typeof SelectPrimitive.Trigger>,
22
42
  SelectTriggerProps
23
- >(({ className, children, disabled, triggerIcon, ...props }, ref) => (
43
+ >(({ className, children, disabled, triggerIcon, size = 'md', ...props }, ref) => (
24
44
  <SelectPrimitive.Trigger
25
45
  ref={ref}
26
46
  disabled={disabled}
27
47
  className={cn(
28
- 'flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap rounded-lg border border-border-tertiary bg-bg-container px-3 py-2 text-sm text-text placeholder:text-muted-foreground transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',
29
- 'focus:border-border-secondary focus-visible:border-border-secondary data-[state=open]:border-border-secondary',
48
+ selectTriggerVariants({ size }),
30
49
  FOCUS_RESET,
31
50
  className
32
51
  )}
@@ -175,4 +194,5 @@ export {
175
194
  SelectSeparator,
176
195
  SelectScrollUpButton,
177
196
  SelectScrollDownButton,
197
+ selectTriggerVariants,
178
198
  }
@@ -1,17 +1,32 @@
1
1
  import { forwardRef } from 'react'
2
2
  import type { HTMLAttributes } from 'react'
3
+ import { cva, type VariantProps } from 'class-variance-authority'
3
4
  import { cn } from '@/lib/utils'
4
5
  import { LoaderLine } from './icons-inline'
5
6
 
6
- export interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {
7
- className?: string
8
- }
7
+ const spinnerVariants = cva('animate-spin', {
8
+ variants: {
9
+ size: {
10
+ xs: 'size-3',
11
+ sm: 'size-3.5',
12
+ md: 'size-4',
13
+ lg: 'size-5',
14
+ },
15
+ },
16
+ defaultVariants: { size: 'md' },
17
+ })
18
+
19
+ export interface SpinnerProps
20
+ extends HTMLAttributes<HTMLSpanElement>,
21
+ VariantProps<typeof spinnerVariants> {}
9
22
 
10
23
  export const Spinner = forwardRef<HTMLSpanElement, SpinnerProps>(
11
- ({ className, ...props }, ref) => (
24
+ ({ className, size = 'md', ...props }, ref) => (
12
25
  <span ref={ref} role="status" aria-label="Loading" {...props}>
13
- <LoaderLine className={cn('size-4 animate-spin', className)} />
26
+ <LoaderLine className={cn(spinnerVariants({ size }), className)} />
14
27
  </span>
15
28
  )
16
29
  )
17
30
  Spinner.displayName = 'Spinner'
31
+
32
+ export { spinnerVariants }
@@ -1,25 +1,43 @@
1
1
  import * as React from 'react'
2
+ import { cva, type VariantProps } from 'class-variance-authority'
2
3
  import { cn } from '@/lib/utils'
3
4
 
4
- export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>
5
+ const textareaVariants = cva(
6
+ [
7
+ 'flex w-full rounded-lg border border-border-tertiary bg-bg-container text-text transition-colors',
8
+ 'placeholder:text-text-tertiary',
9
+ 'outline-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0',
10
+ 'focus:border-border-secondary focus-visible:border-border-secondary',
11
+ 'disabled:cursor-not-allowed disabled:opacity-50',
12
+ 'aria-invalid:border-error aria-invalid:ring-0',
13
+ ].join(' '),
14
+ {
15
+ variants: {
16
+ size: {
17
+ sm: 'min-h-12 px-2 py-1 text-xs',
18
+ md: 'min-h-16 px-3 py-2 text-sm',
19
+ lg: 'min-h-20 px-4 py-2.5 text-base',
20
+ },
21
+ },
22
+ defaultVariants: { size: 'md' },
23
+ }
24
+ )
25
+
26
+ export interface TextareaProps
27
+ extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'>,
28
+ VariantProps<typeof textareaVariants> {
29
+ size?: 'sm' | 'md' | 'lg'
30
+ }
5
31
 
6
32
  const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
7
- ({ className, ...props }, ref) => (
33
+ ({ className, size = 'md', ...props }, ref) => (
8
34
  <textarea
9
35
  ref={ref}
10
- className={cn(
11
- 'flex min-h-16 w-full rounded-lg border border-border-tertiary bg-bg-container px-3 py-2 text-sm text-text transition-colors',
12
- 'placeholder:text-text-tertiary',
13
- 'outline-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0',
14
- 'focus:border-border-secondary focus-visible:border-border-secondary',
15
- 'disabled:cursor-not-allowed disabled:opacity-50',
16
- 'aria-invalid:border-error aria-invalid:ring-0',
17
- className,
18
- )}
36
+ className={cn(textareaVariants({ size }), className)}
19
37
  {...props}
20
38
  />
21
39
  ),
22
40
  )
23
41
  Textarea.displayName = 'Textarea'
24
42
 
25
- export { Textarea }
43
+ export { Textarea, textareaVariants }
@@ -2,6 +2,7 @@ import * as React from 'react'
2
2
  import { motion } from 'framer-motion'
3
3
  import * as TooltipPrimitive from '@radix-ui/react-tooltip'
4
4
  import { cn } from '@/lib/utils'
5
+ import { MOTION_SCALE_IN } from '@/lib/motion'
5
6
  import { getThemeFromDocument } from './theme-from-document'
6
7
 
7
8
  const TooltipProvider = TooltipPrimitive.Provider
@@ -36,7 +37,7 @@ const TooltipContent = React.forwardRef<
36
37
  )}
37
38
  {...props}
38
39
  >
39
- <motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }} transition={{ duration: 0.15 }}>
40
+ <motion.div {...MOTION_SCALE_IN}>
40
41
  {children}
41
42
  </motion.div>
42
43
  </TooltipPrimitive.Content>
@@ -31,11 +31,13 @@
31
31
  "chat/ask-user-part.tsx",
32
32
  "basic/collapsible-card.tsx",
33
33
  "basic/icons-inline.tsx",
34
- "basic/button.tsx"
34
+ "basic/button.tsx",
35
+ "basic/spinner.tsx"
35
36
  ],
36
37
  "dependencies": [
37
38
  "class-variance-authority",
38
- "framer-motion"
39
+ "framer-motion",
40
+ "radix-ui"
39
41
  ],
40
42
  "peerDependencies": [
41
43
  "react",
@@ -84,13 +86,15 @@
84
86
  "basic/collapsible-card.tsx",
85
87
  "basic/icons-inline.tsx",
86
88
  "basic/button.tsx",
89
+ "basic/spinner.tsx",
87
90
  "basic/select.tsx",
88
91
  "basic/theme-from-document.ts"
89
92
  ],
90
93
  "dependencies": [
91
94
  "@radix-ui/react-select",
92
95
  "class-variance-authority",
93
- "framer-motion"
96
+ "framer-motion",
97
+ "radix-ui"
94
98
  ],
95
99
  "peerDependencies": [
96
100
  "react",
@@ -99,10 +103,13 @@
99
103
  },
100
104
  "button": {
101
105
  "files": [
102
- "basic/button.tsx"
106
+ "basic/button.tsx",
107
+ "basic/spinner.tsx",
108
+ "basic/icons-inline.tsx"
103
109
  ],
104
110
  "dependencies": [
105
- "class-variance-authority"
111
+ "class-variance-authority",
112
+ "radix-ui"
106
113
  ],
107
114
  "peerDependencies": [
108
115
  "react",
@@ -124,11 +131,14 @@
124
131
  "calendar": {
125
132
  "files": [
126
133
  "basic/calendar.tsx",
127
- "basic/button.tsx"
134
+ "basic/button.tsx",
135
+ "basic/spinner.tsx",
136
+ "basic/icons-inline.tsx"
128
137
  ],
129
138
  "dependencies": [
130
139
  "class-variance-authority",
131
140
  "lucide-react",
141
+ "radix-ui",
132
142
  "react-day-picker"
133
143
  ],
134
144
  "peerDependencies": [
@@ -140,7 +150,9 @@
140
150
  "files": [
141
151
  "basic/card.tsx"
142
152
  ],
143
- "dependencies": [],
153
+ "dependencies": [
154
+ "class-variance-authority"
155
+ ],
144
156
  "peerDependencies": [
145
157
  "react",
146
158
  "react-dom"
@@ -149,12 +161,15 @@
149
161
  "carousel": {
150
162
  "files": [
151
163
  "basic/carousel.tsx",
152
- "basic/button.tsx"
164
+ "basic/button.tsx",
165
+ "basic/spinner.tsx",
166
+ "basic/icons-inline.tsx"
153
167
  ],
154
168
  "dependencies": [
155
169
  "class-variance-authority",
156
170
  "embla-carousel-react",
157
- "lucide-react"
171
+ "lucide-react",
172
+ "radix-ui"
158
173
  ],
159
174
  "peerDependencies": [
160
175
  "react",
@@ -197,7 +212,8 @@
197
212
  "@radix-ui/react-alert-dialog",
198
213
  "@radix-ui/react-dropdown-menu",
199
214
  "class-variance-authority",
200
- "framer-motion"
215
+ "framer-motion",
216
+ "radix-ui"
201
217
  ],
202
218
  "peerDependencies": [
203
219
  "react",
@@ -275,9 +291,23 @@
275
291
  "combobox": {
276
292
  "files": [
277
293
  "basic/combobox.tsx",
278
- "basic/input.tsx"
294
+ "basic/button.tsx",
295
+ "basic/spinner.tsx",
296
+ "basic/icons-inline.tsx",
297
+ "basic/command.tsx",
298
+ "basic/dialog.tsx",
299
+ "basic/theme-from-document.ts",
300
+ "basic/popover.tsx"
301
+ ],
302
+ "dependencies": [
303
+ "@radix-ui/react-dialog",
304
+ "@radix-ui/react-popover",
305
+ "class-variance-authority",
306
+ "cmdk",
307
+ "framer-motion",
308
+ "lucide-react",
309
+ "radix-ui"
279
310
  ],
280
- "dependencies": [],
281
311
  "peerDependencies": [
282
312
  "react",
283
313
  "react-dom"
@@ -347,9 +377,22 @@
347
377
  "date-picker": {
348
378
  "files": [
349
379
  "basic/date-picker.tsx",
350
- "basic/input.tsx"
380
+ "basic/button.tsx",
381
+ "basic/spinner.tsx",
382
+ "basic/icons-inline.tsx",
383
+ "basic/calendar.tsx",
384
+ "basic/popover.tsx",
385
+ "basic/theme-from-document.ts"
386
+ ],
387
+ "dependencies": [
388
+ "@radix-ui/react-popover",
389
+ "class-variance-authority",
390
+ "date-fns",
391
+ "framer-motion",
392
+ "lucide-react",
393
+ "radix-ui",
394
+ "react-day-picker"
351
395
  ],
352
- "dependencies": [],
353
396
  "peerDependencies": [
354
397
  "react",
355
398
  "react-dom"
@@ -472,11 +515,13 @@
472
515
  "chat/file-review-part.tsx",
473
516
  "basic/collapsible-card.tsx",
474
517
  "basic/icons-inline.tsx",
475
- "basic/button.tsx"
518
+ "basic/button.tsx",
519
+ "basic/spinner.tsx"
476
520
  ],
477
521
  "dependencies": [
478
522
  "class-variance-authority",
479
- "framer-motion"
523
+ "framer-motion",
524
+ "radix-ui"
480
525
  ],
481
526
  "peerDependencies": [
482
527
  "react",
@@ -521,15 +566,17 @@
521
566
  "files": [
522
567
  "chat/hint-banner.tsx",
523
568
  "basic/button.tsx",
524
- "basic/dropdown-menu.tsx",
569
+ "basic/spinner.tsx",
525
570
  "basic/icons-inline.tsx",
571
+ "basic/dropdown-menu.tsx",
526
572
  "basic/theme-from-document.ts",
527
573
  "basic/scrollbar.tsx"
528
574
  ],
529
575
  "dependencies": [
530
576
  "@radix-ui/react-dropdown-menu",
531
577
  "class-variance-authority",
532
- "framer-motion"
578
+ "framer-motion",
579
+ "radix-ui"
533
580
  ],
534
581
  "peerDependencies": [
535
582
  "react",
@@ -555,7 +602,8 @@
555
602
  "basic/icon-button.tsx"
556
603
  ],
557
604
  "dependencies": [
558
- "class-variance-authority"
605
+ "class-variance-authority",
606
+ "radix-ui"
559
607
  ],
560
608
  "peerDependencies": [
561
609
  "react",
@@ -569,7 +617,8 @@
569
617
  "basic/icon-button.tsx"
570
618
  ],
571
619
  "dependencies": [
572
- "class-variance-authority"
620
+ "class-variance-authority",
621
+ "radix-ui"
573
622
  ],
574
623
  "peerDependencies": [
575
624
  "react",
@@ -593,7 +642,9 @@
593
642
  "files": [
594
643
  "basic/input.tsx"
595
644
  ],
596
- "dependencies": [],
645
+ "dependencies": [
646
+ "class-variance-authority"
647
+ ],
597
648
  "peerDependencies": [
598
649
  "react",
599
650
  "react-dom"
@@ -603,11 +654,14 @@
603
654
  "files": [
604
655
  "basic/input-group.tsx",
605
656
  "basic/button.tsx",
657
+ "basic/spinner.tsx",
658
+ "basic/icons-inline.tsx",
606
659
  "basic/input.tsx",
607
660
  "basic/textarea.tsx"
608
661
  ],
609
662
  "dependencies": [
610
- "class-variance-authority"
663
+ "class-variance-authority",
664
+ "radix-ui"
611
665
  ],
612
666
  "peerDependencies": [
613
667
  "react",
@@ -699,12 +753,14 @@
699
753
  "basic/collapsible-card.tsx",
700
754
  "basic/icons-inline.tsx",
701
755
  "basic/button.tsx",
756
+ "basic/spinner.tsx",
702
757
  "basic/scrollbar.tsx",
703
758
  "lib/use-mermaid-render.ts"
704
759
  ],
705
760
  "dependencies": [
706
761
  "class-variance-authority",
707
- "framer-motion"
762
+ "framer-motion",
763
+ "radix-ui"
708
764
  ],
709
765
  "peerDependencies": [
710
766
  "react",
@@ -764,11 +820,13 @@
764
820
  "files": [
765
821
  "chat/permission-card.tsx",
766
822
  "basic/button.tsx",
823
+ "basic/spinner.tsx",
767
824
  "basic/icons-inline.tsx",
768
825
  "basic/scrollbar.tsx"
769
826
  ],
770
827
  "dependencies": [
771
- "class-variance-authority"
828
+ "class-variance-authority",
829
+ "radix-ui"
772
830
  ],
773
831
  "peerDependencies": [
774
832
  "react",
@@ -781,11 +839,13 @@
781
839
  "basic/collapsible-card.tsx",
782
840
  "basic/icons-inline.tsx",
783
841
  "basic/button.tsx",
842
+ "basic/spinner.tsx",
784
843
  "basic/icon-button.tsx"
785
844
  ],
786
845
  "dependencies": [
787
846
  "class-variance-authority",
788
- "framer-motion"
847
+ "framer-motion",
848
+ "radix-ui"
789
849
  ],
790
850
  "peerDependencies": [
791
851
  "react",
@@ -830,7 +890,8 @@
830
890
  "dependencies": [
831
891
  "@radix-ui/react-tooltip",
832
892
  "class-variance-authority",
833
- "framer-motion"
893
+ "framer-motion",
894
+ "radix-ui"
834
895
  ],
835
896
  "peerDependencies": [
836
897
  "react",
@@ -958,7 +1019,8 @@
958
1019
  "basic/theme-from-document.ts"
959
1020
  ],
960
1021
  "dependencies": [
961
- "@radix-ui/react-select"
1022
+ "@radix-ui/react-select",
1023
+ "class-variance-authority"
962
1024
  ],
963
1025
  "peerDependencies": [
964
1026
  "react",
@@ -1068,7 +1130,9 @@
1068
1130
  "basic/spinner.tsx",
1069
1131
  "basic/icons-inline.tsx"
1070
1132
  ],
1071
- "dependencies": [],
1133
+ "dependencies": [
1134
+ "class-variance-authority"
1135
+ ],
1072
1136
  "peerDependencies": [
1073
1137
  "react",
1074
1138
  "react-dom"
@@ -1164,7 +1228,8 @@
1164
1228
  ],
1165
1229
  "dependencies": [
1166
1230
  "class-variance-authority",
1167
- "framer-motion"
1231
+ "framer-motion",
1232
+ "radix-ui"
1168
1233
  ],
1169
1234
  "peerDependencies": [
1170
1235
  "react",
@@ -1175,7 +1240,9 @@
1175
1240
  "files": [
1176
1241
  "basic/textarea.tsx"
1177
1242
  ],
1178
- "dependencies": [],
1243
+ "dependencies": [
1244
+ "class-variance-authority"
1245
+ ],
1179
1246
  "peerDependencies": [
1180
1247
  "react",
1181
1248
  "react-dom"
@@ -17,7 +17,7 @@ declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPri
17
17
  declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
18
18
  declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
19
  declare const contentVariants: (props?: ({
20
- size?: "sm" | "default" | null | undefined;
20
+ size?: "default" | "sm" | null | undefined;
21
21
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
22
22
  export interface AlertDialogContentProps extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>, VariantProps<typeof contentVariants> {
23
23
  size?: 'default' | 'sm';
@@ -13,7 +13,7 @@ import * as React from 'react';
13
13
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
14
14
  import { type VariantProps } from 'class-variance-authority';
15
15
  declare const avatarVariants: (props?: ({
16
- size?: "sm" | "lg" | "default" | null | undefined;
16
+ size?: "default" | "sm" | "lg" | null | undefined;
17
17
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
18
18
  export interface AvatarProps extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarVariants> {
19
19
  }
@@ -1,7 +1,7 @@
1
1
  import type { ButtonHTMLAttributes, ReactNode } from 'react';
2
2
  import { type VariantProps } from 'class-variance-authority';
3
3
  declare const buttonVariants: (props?: ({
4
- variant?: "primary" | "secondary" | "tertiary" | "outline" | "ghost" | "text" | null | undefined;
4
+ variant?: "text" | "primary" | "secondary" | "tertiary" | "outline" | "ghost" | "destructive" | null | undefined;
5
5
  size?: "sm" | "md" | "lg" | null | undefined;
6
6
  rounded?: "square" | "pill" | null | undefined;
7
7
  textOnly?: boolean | null | undefined;
@@ -11,6 +11,8 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, Va
11
11
  textButton?: boolean;
12
12
  prefixIcon?: ReactNode;
13
13
  suffixIcon?: ReactNode;
14
+ loading?: boolean;
15
+ asChild?: boolean;
14
16
  }
15
17
  declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
16
18
  export { Button, buttonVariants };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * [WHO]: Card — surface container with Header / Title / Description / Content / Footer parts.
3
- * [FROM]: React + `@/lib/utils` cn.
3
+ * [FROM]: React + `@/lib/utils` cn + CVA.
4
4
  * [TO]: sparkdesign package consumers; output of CLI `add card` when registered.
5
5
  * [HERE]: registry/basic/card.tsx — Spark Design source; keep aligned with the main library.
6
6
  *
@@ -10,18 +10,23 @@
10
10
  * 3. Follow design tokens and explicit type exports.
11
11
  */
12
12
  import * as React from 'react';
13
- declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
13
+ import { type VariantProps } from 'class-variance-authority';
14
+ declare const cardVariants: (props?: ({
15
+ variant?: "outline" | "ghost" | "filled" | null | undefined;
16
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
17
+ export interface CardProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {
18
+ }
19
+ declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
14
20
  declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
15
21
  declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
16
22
  declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
17
23
  declare const CardAction: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
18
24
  declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
19
25
  declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
20
- export type CardProps = React.HTMLAttributes<HTMLDivElement>;
21
26
  export type CardHeaderProps = React.HTMLAttributes<HTMLDivElement>;
22
27
  export type CardTitleProps = React.HTMLAttributes<HTMLDivElement>;
23
28
  export type CardDescriptionProps = React.HTMLAttributes<HTMLDivElement>;
24
29
  export type CardActionProps = React.HTMLAttributes<HTMLDivElement>;
25
30
  export type CardContentProps = React.HTMLAttributes<HTMLDivElement>;
26
31
  export type CardFooterProps = React.HTMLAttributes<HTMLDivElement>;
27
- export { Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter, };
32
+ export { Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter, cardVariants, };