@multicomma/arkcn 0.1.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.
Files changed (237) hide show
  1. package/README.md +78 -0
  2. package/bin/arkcn.mjs +78 -0
  3. package/cli/commands.mjs +251 -0
  4. package/cli/project.mjs +168 -0
  5. package/cli/registry.mjs +50 -0
  6. package/cli/ui.mjs +46 -0
  7. package/mcp/server.mjs +149 -0
  8. package/package.json +201 -0
  9. package/registry/base.css +680 -0
  10. package/registry/index.json +1833 -0
  11. package/registry/items/accordion.json +18 -0
  12. package/registry/items/activity-feed.json +18 -0
  13. package/registry/items/alert-dialog.json +18 -0
  14. package/registry/items/alert.json +17 -0
  15. package/registry/items/angle-slider.json +17 -0
  16. package/registry/items/app-shell.json +28 -0
  17. package/registry/items/aspect-ratio.json +13 -0
  18. package/registry/items/attachment.json +19 -0
  19. package/registry/items/avatar.json +17 -0
  20. package/registry/items/badge.json +18 -0
  21. package/registry/items/breadcrumb.json +18 -0
  22. package/registry/items/bubble.json +18 -0
  23. package/registry/items/button-group.json +19 -0
  24. package/registry/items/button.json +18 -0
  25. package/registry/items/calendar.json +19 -0
  26. package/registry/items/canvas.json +24 -0
  27. package/registry/items/card.json +15 -0
  28. package/registry/items/carousel.json +19 -0
  29. package/registry/items/cascader.json +23 -0
  30. package/registry/items/chart.json +17 -0
  31. package/registry/items/chat.json +23 -0
  32. package/registry/items/checkbox.json +18 -0
  33. package/registry/items/clipboard.json +19 -0
  34. package/registry/items/collapsible.json +15 -0
  35. package/registry/items/color-picker.json +19 -0
  36. package/registry/items/combobox.json +20 -0
  37. package/registry/items/command.json +21 -0
  38. package/registry/items/comment-thread.json +25 -0
  39. package/registry/items/context-menu.json +18 -0
  40. package/registry/items/controllable.json +14 -0
  41. package/registry/items/data-grid.json +24 -0
  42. package/registry/items/data-table-adapter.json +14 -0
  43. package/registry/items/data-table.json +32 -0
  44. package/registry/items/date-input.json +17 -0
  45. package/registry/items/dialog.json +19 -0
  46. package/registry/items/direction.json +13 -0
  47. package/registry/items/drag-preview.json +16 -0
  48. package/registry/items/drawer.json +18 -0
  49. package/registry/items/dropdown-menu.json +18 -0
  50. package/registry/items/editable.json +17 -0
  51. package/registry/items/empty.json +17 -0
  52. package/registry/items/field.json +19 -0
  53. package/registry/items/file-upload.json +19 -0
  54. package/registry/items/floating-panel.json +19 -0
  55. package/registry/items/floating-toolbar.json +16 -0
  56. package/registry/items/form.json +14 -0
  57. package/registry/items/format.json +15 -0
  58. package/registry/items/gantt.json +22 -0
  59. package/registry/items/history.json +14 -0
  60. package/registry/items/hotkeys.json +18 -0
  61. package/registry/items/hover-card.json +17 -0
  62. package/registry/items/image-cropper.json +17 -0
  63. package/registry/items/input-group.json +20 -0
  64. package/registry/items/input-otp.json +18 -0
  65. package/registry/items/input.json +15 -0
  66. package/registry/items/item.json +19 -0
  67. package/registry/items/json-tree-view.json +17 -0
  68. package/registry/items/kanban.json +26 -0
  69. package/registry/items/kbd.json +15 -0
  70. package/registry/items/label.json +15 -0
  71. package/registry/items/live-region.json +16 -0
  72. package/registry/items/marker.json +18 -0
  73. package/registry/items/marquee.json +17 -0
  74. package/registry/items/menubar.json +19 -0
  75. package/registry/items/message.json +15 -0
  76. package/registry/items/navigation-menu.json +19 -0
  77. package/registry/items/node-graph.json +22 -0
  78. package/registry/items/number-input.json +18 -0
  79. package/registry/items/pagination.json +18 -0
  80. package/registry/items/password-input.json +18 -0
  81. package/registry/items/popconfirm.json +20 -0
  82. package/registry/items/popover.json +18 -0
  83. package/registry/items/progress.json +17 -0
  84. package/registry/items/qr-code.json +17 -0
  85. package/registry/items/query-builder.json +23 -0
  86. package/registry/items/radio-group.json +17 -0
  87. package/registry/items/rating-group.json +18 -0
  88. package/registry/items/resizable.json +17 -0
  89. package/registry/items/rich-text-editor.json +37 -0
  90. package/registry/items/row-layout.json +15 -0
  91. package/registry/items/scheduler.json +23 -0
  92. package/registry/items/scroll-area.json +17 -0
  93. package/registry/items/segment-group.json +17 -0
  94. package/registry/items/select.json +19 -0
  95. package/registry/items/separator.json +15 -0
  96. package/registry/items/sheet.json +19 -0
  97. package/registry/items/sidebar.json +27 -0
  98. package/registry/items/signature-pad.json +19 -0
  99. package/registry/items/skeleton.json +15 -0
  100. package/registry/items/slider.json +17 -0
  101. package/registry/items/sonner.json +17 -0
  102. package/registry/items/spinner.json +17 -0
  103. package/registry/items/steps.json +19 -0
  104. package/registry/items/swap.json +17 -0
  105. package/registry/items/switch.json +17 -0
  106. package/registry/items/table.json +16 -0
  107. package/registry/items/tabs.json +18 -0
  108. package/registry/items/tags-input.json +18 -0
  109. package/registry/items/textarea.json +15 -0
  110. package/registry/items/time.json +14 -0
  111. package/registry/items/timer.json +18 -0
  112. package/registry/items/toc.json +17 -0
  113. package/registry/items/toggle-group.json +19 -0
  114. package/registry/items/toggle.json +18 -0
  115. package/registry/items/tooltip.json +17 -0
  116. package/registry/items/tour.json +19 -0
  117. package/registry/items/transfer-list.json +24 -0
  118. package/registry/items/tree-select.json +24 -0
  119. package/registry/items/tree-view.json +18 -0
  120. package/registry/items/use-mobile.json +13 -0
  121. package/registry/items/utils.json +17 -0
  122. package/registry/items/virtual-list.json +16 -0
  123. package/src/components/ui/accordion.tsx +111 -0
  124. package/src/components/ui/activity-feed.tsx +228 -0
  125. package/src/components/ui/alert-dialog.tsx +204 -0
  126. package/src/components/ui/alert.tsx +55 -0
  127. package/src/components/ui/angle-slider.tsx +117 -0
  128. package/src/components/ui/app-shell.tsx +985 -0
  129. package/src/components/ui/aspect-ratio.tsx +35 -0
  130. package/src/components/ui/attachment.tsx +193 -0
  131. package/src/components/ui/avatar.tsx +94 -0
  132. package/src/components/ui/badge.tsx +45 -0
  133. package/src/components/ui/breadcrumb.tsx +93 -0
  134. package/src/components/ui/bubble.tsx +119 -0
  135. package/src/components/ui/button-group.tsx +79 -0
  136. package/src/components/ui/button.tsx +65 -0
  137. package/src/components/ui/calendar.tsx +172 -0
  138. package/src/components/ui/canvas.tsx +723 -0
  139. package/src/components/ui/card.tsx +69 -0
  140. package/src/components/ui/carousel.tsx +228 -0
  141. package/src/components/ui/cascader.tsx +754 -0
  142. package/src/components/ui/chart.tsx +303 -0
  143. package/src/components/ui/chat.tsx +544 -0
  144. package/src/components/ui/checkbox.tsx +94 -0
  145. package/src/components/ui/clipboard.tsx +94 -0
  146. package/src/components/ui/collapsible.tsx +32 -0
  147. package/src/components/ui/color-picker.tsx +441 -0
  148. package/src/components/ui/combobox.tsx +400 -0
  149. package/src/components/ui/command.tsx +292 -0
  150. package/src/components/ui/comment-thread.tsx +923 -0
  151. package/src/components/ui/context-menu.tsx +331 -0
  152. package/src/components/ui/data-grid.tsx +1227 -0
  153. package/src/components/ui/data-table.tsx +993 -0
  154. package/src/components/ui/date-input.tsx +103 -0
  155. package/src/components/ui/dialog.tsx +159 -0
  156. package/src/components/ui/direction.tsx +32 -0
  157. package/src/components/ui/drawer.tsx +200 -0
  158. package/src/components/ui/dropdown-menu.tsx +329 -0
  159. package/src/components/ui/editable.tsx +90 -0
  160. package/src/components/ui/empty.tsx +86 -0
  161. package/src/components/ui/field.tsx +218 -0
  162. package/src/components/ui/file-upload.tsx +204 -0
  163. package/src/components/ui/floating-panel.tsx +199 -0
  164. package/src/components/ui/floating-toolbar.tsx +79 -0
  165. package/src/components/ui/format.tsx +22 -0
  166. package/src/components/ui/gantt.tsx +950 -0
  167. package/src/components/ui/hotkeys.tsx +340 -0
  168. package/src/components/ui/hover-card.tsx +83 -0
  169. package/src/components/ui/image-cropper.tsx +100 -0
  170. package/src/components/ui/input-group.tsx +133 -0
  171. package/src/components/ui/input-otp.tsx +82 -0
  172. package/src/components/ui/input.tsx +18 -0
  173. package/src/components/ui/item.tsx +174 -0
  174. package/src/components/ui/json-tree-view.tsx +37 -0
  175. package/src/components/ui/kanban.tsx +884 -0
  176. package/src/components/ui/kbd.tsx +20 -0
  177. package/src/components/ui/label.tsx +30 -0
  178. package/src/components/ui/live-region.tsx +54 -0
  179. package/src/components/ui/marker.tsx +66 -0
  180. package/src/components/ui/marquee.tsx +61 -0
  181. package/src/components/ui/menubar.tsx +456 -0
  182. package/src/components/ui/message.tsx +74 -0
  183. package/src/components/ui/navigation-menu.tsx +202 -0
  184. package/src/components/ui/node-graph.tsx +1723 -0
  185. package/src/components/ui/number-input.tsx +148 -0
  186. package/src/components/ui/pagination.tsx +88 -0
  187. package/src/components/ui/password-input.tsx +104 -0
  188. package/src/components/ui/popconfirm.tsx +149 -0
  189. package/src/components/ui/popover.tsx +126 -0
  190. package/src/components/ui/progress.tsx +114 -0
  191. package/src/components/ui/qr-code.tsx +51 -0
  192. package/src/components/ui/query-builder.tsx +938 -0
  193. package/src/components/ui/radio-group.tsx +108 -0
  194. package/src/components/ui/rating-group.tsx +91 -0
  195. package/src/components/ui/resizable.tsx +41 -0
  196. package/src/components/ui/rich-text-editor.tsx +845 -0
  197. package/src/components/ui/scheduler.tsx +1164 -0
  198. package/src/components/ui/scroll-area.tsx +82 -0
  199. package/src/components/ui/segment-group.tsx +95 -0
  200. package/src/components/ui/select.tsx +354 -0
  201. package/src/components/ui/separator.tsx +32 -0
  202. package/src/components/ui/sheet.tsx +130 -0
  203. package/src/components/ui/sidebar.tsx +665 -0
  204. package/src/components/ui/signature-pad.tsx +112 -0
  205. package/src/components/ui/skeleton.tsx +7 -0
  206. package/src/components/ui/slider.tsx +183 -0
  207. package/src/components/ui/sonner.tsx +37 -0
  208. package/src/components/ui/spinner.tsx +16 -0
  209. package/src/components/ui/steps.tsx +152 -0
  210. package/src/components/ui/swap.tsx +33 -0
  211. package/src/components/ui/switch.tsx +83 -0
  212. package/src/components/ui/table.tsx +72 -0
  213. package/src/components/ui/tabs.tsx +100 -0
  214. package/src/components/ui/tags-input.tsx +153 -0
  215. package/src/components/ui/textarea.tsx +17 -0
  216. package/src/components/ui/timer.tsx +67 -0
  217. package/src/components/ui/toc.tsx +64 -0
  218. package/src/components/ui/toggle-group.tsx +89 -0
  219. package/src/components/ui/toggle.tsx +46 -0
  220. package/src/components/ui/tooltip.tsx +113 -0
  221. package/src/components/ui/tour.tsx +168 -0
  222. package/src/components/ui/transfer-list.tsx +700 -0
  223. package/src/components/ui/tree-select.tsx +638 -0
  224. package/src/components/ui/tree-view.tsx +217 -0
  225. package/src/components/ui/virtual-list.tsx +343 -0
  226. package/src/hooks/use-mobile.ts +19 -0
  227. package/src/lib/controllable.ts +31 -0
  228. package/src/lib/data-table-adapter.ts +67 -0
  229. package/src/lib/drag-preview.ts +39 -0
  230. package/src/lib/form.ts +39 -0
  231. package/src/lib/history.ts +55 -0
  232. package/src/lib/row-layout.ts +81 -0
  233. package/src/lib/table.ts +483 -0
  234. package/src/lib/time.ts +37 -0
  235. package/src/lib/utils.ts +6 -0
  236. package/src/styles/arkcn.css +764 -0
  237. package/src/styles/index.css +3 -0
@@ -0,0 +1,94 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { cn } from "@/lib/utils"
5
+ import { Clipboard as ClipboardPrimitive } from "@ark-ui/react"
6
+ import { CheckIcon, CopyIcon } from "lucide-react"
7
+
8
+ import { Button } from "@/components/ui/button"
9
+
10
+ function Clipboard({ className, ...props }: React.ComponentProps<typeof ClipboardPrimitive.Root>) {
11
+ return (
12
+ <ClipboardPrimitive.Root
13
+ data-slot="clipboard"
14
+ className={cn("flex w-full flex-col gap-1.5", className)}
15
+ {...props}
16
+ />
17
+ )
18
+ }
19
+
20
+ function ClipboardContext({ ...props }: React.ComponentProps<typeof ClipboardPrimitive.Context>) {
21
+ return <ClipboardPrimitive.Context {...props} />
22
+ }
23
+
24
+ function ClipboardLabel({ className, ...props }: React.ComponentProps<typeof ClipboardPrimitive.Label>) {
25
+ return (
26
+ <ClipboardPrimitive.Label
27
+ data-slot="clipboard-label"
28
+ className={cn("text-sm font-medium select-none", className)}
29
+ {...props}
30
+ />
31
+ )
32
+ }
33
+
34
+ function ClipboardControl({ className, ...props }: React.ComponentProps<typeof ClipboardPrimitive.Control>) {
35
+ return (
36
+ <ClipboardPrimitive.Control
37
+ data-slot="clipboard-control"
38
+ className={cn("flex items-center gap-1", className)}
39
+ {...props}
40
+ />
41
+ )
42
+ }
43
+
44
+ function ClipboardInput({ className, ...props }: React.ComponentProps<typeof ClipboardPrimitive.Input>) {
45
+ return (
46
+ <ClipboardPrimitive.Input
47
+ data-slot="clipboard-input"
48
+ className={cn(
49
+ "h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 text-sm outline-none read-only:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 dark:bg-input/30",
50
+ className
51
+ )}
52
+ {...props}
53
+ />
54
+ )
55
+ }
56
+
57
+ function ClipboardTrigger({ className, children, ...props }: React.ComponentProps<typeof ClipboardPrimitive.Trigger>) {
58
+ return (
59
+ <ClipboardPrimitive.Trigger data-slot="clipboard-trigger" className={cn(className)} asChild {...props}>
60
+ <Button variant="outline" size="icon">
61
+ {children ?? (
62
+ <ClipboardIndicator copied={<CheckIcon />}>
63
+ <CopyIcon />
64
+ </ClipboardIndicator>
65
+ )}
66
+ </Button>
67
+ </ClipboardPrimitive.Trigger>
68
+ )
69
+ }
70
+
71
+ function ClipboardIndicator({ ...props }: React.ComponentProps<typeof ClipboardPrimitive.Indicator>) {
72
+ return <ClipboardPrimitive.Indicator data-slot="clipboard-indicator" {...props} />
73
+ }
74
+
75
+ function ClipboardValueText({ className, ...props }: React.ComponentProps<typeof ClipboardPrimitive.ValueText>) {
76
+ return (
77
+ <ClipboardPrimitive.ValueText
78
+ data-slot="clipboard-value-text"
79
+ className={cn("font-mono text-sm", className)}
80
+ {...props}
81
+ />
82
+ )
83
+ }
84
+
85
+ export {
86
+ Clipboard,
87
+ ClipboardContext,
88
+ ClipboardControl,
89
+ ClipboardIndicator,
90
+ ClipboardInput,
91
+ ClipboardLabel,
92
+ ClipboardTrigger,
93
+ ClipboardValueText,
94
+ }
@@ -0,0 +1,32 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Collapsible as CollapsiblePrimitive } from "@ark-ui/react"
5
+
6
+ function Collapsible({
7
+ lazyMount = true,
8
+ unmountOnExit = true,
9
+ ...props
10
+ }: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {
11
+ return (
12
+ <CollapsiblePrimitive.Root data-slot="collapsible" lazyMount={lazyMount} unmountOnExit={unmountOnExit} {...props} />
13
+ )
14
+ }
15
+
16
+ function CollapsibleContext({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Context>) {
17
+ return <CollapsiblePrimitive.Context {...props} />
18
+ }
19
+
20
+ function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Trigger>) {
21
+ return <CollapsiblePrimitive.Trigger data-slot="collapsible-trigger" {...props} />
22
+ }
23
+
24
+ function CollapsibleIndicator({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Indicator>) {
25
+ return <CollapsiblePrimitive.Indicator data-slot="collapsible-indicator" {...props} />
26
+ }
27
+
28
+ function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Content>) {
29
+ return <CollapsiblePrimitive.Content data-slot="collapsible-content" {...props} />
30
+ }
31
+
32
+ export { Collapsible, CollapsibleContent, CollapsibleContext, CollapsibleIndicator, CollapsibleTrigger }
@@ -0,0 +1,441 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { cn } from "@/lib/utils"
5
+ import { ColorPicker as ColorPickerPrimitive, Portal as PortalPrimitive, parseColor } from "@ark-ui/react"
6
+ import { PipetteIcon } from "lucide-react"
7
+
8
+ import { Button } from "@/components/ui/button"
9
+
10
+ function ColorPicker({
11
+ className,
12
+ positioning,
13
+ lazyMount = true,
14
+ unmountOnExit = true,
15
+ ...props
16
+ }: React.ComponentProps<typeof ColorPickerPrimitive.Root>) {
17
+ return (
18
+ <ColorPickerPrimitive.Root
19
+ data-slot="color-picker"
20
+ positioning={{ placement: "bottom-start", gutter: 4, ...positioning }}
21
+ lazyMount={lazyMount}
22
+ unmountOnExit={unmountOnExit}
23
+ className={cn("flex w-full flex-col gap-1.5", className)}
24
+ {...props}
25
+ />
26
+ )
27
+ }
28
+
29
+ function ColorPickerContext({ ...props }: React.ComponentProps<typeof ColorPickerPrimitive.Context>) {
30
+ return <ColorPickerPrimitive.Context {...props} />
31
+ }
32
+
33
+ function ColorPickerLabel({ className, ...props }: React.ComponentProps<typeof ColorPickerPrimitive.Label>) {
34
+ return (
35
+ <ColorPickerPrimitive.Label
36
+ data-slot="color-picker-label"
37
+ className={cn("text-sm font-medium select-none", className)}
38
+ {...props}
39
+ />
40
+ )
41
+ }
42
+
43
+ function ColorPickerControl({ className, ...props }: React.ComponentProps<typeof ColorPickerPrimitive.Control>) {
44
+ return (
45
+ <ColorPickerPrimitive.Control
46
+ data-slot="color-picker-control"
47
+ className={cn("flex items-center gap-1.5", className)}
48
+ {...props}
49
+ />
50
+ )
51
+ }
52
+
53
+ function ColorPickerChannelInput({
54
+ className,
55
+ ...props
56
+ }: React.ComponentProps<typeof ColorPickerPrimitive.ChannelInput>) {
57
+ return (
58
+ <ColorPickerPrimitive.ChannelInput
59
+ data-slot="color-picker-channel-input"
60
+ className={cn(
61
+ "h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 text-sm outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 data-invalid:border-destructive dark:bg-input/30",
62
+ className
63
+ )}
64
+ {...props}
65
+ />
66
+ )
67
+ }
68
+
69
+ function ColorPickerTrigger({
70
+ className,
71
+ children,
72
+ ...props
73
+ }: React.ComponentProps<typeof ColorPickerPrimitive.Trigger>) {
74
+ return (
75
+ <ColorPickerPrimitive.Trigger
76
+ data-slot="color-picker-trigger"
77
+ className={cn(
78
+ "flex size-8 shrink-0 items-center justify-center rounded-lg border border-input bg-transparent p-1 outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 dark:bg-input/30 data-disabled:opacity-50",
79
+ className
80
+ )}
81
+ {...props}
82
+ >
83
+ {children ?? (
84
+ <ColorPickerTransparencyGrid className="rounded-md">
85
+ <ColorPickerValueSwatch />
86
+ </ColorPickerTransparencyGrid>
87
+ )}
88
+ </ColorPickerPrimitive.Trigger>
89
+ )
90
+ }
91
+
92
+ function ColorPickerValueSwatch({
93
+ className,
94
+ ...props
95
+ }: React.ComponentProps<typeof ColorPickerPrimitive.ValueSwatch>) {
96
+ return (
97
+ <ColorPickerPrimitive.ValueSwatch
98
+ data-slot="color-picker-value-swatch"
99
+ className={cn("size-full rounded-[inherit]", className)}
100
+ {...props}
101
+ />
102
+ )
103
+ }
104
+
105
+ function ColorPickerValueText({ className, ...props }: React.ComponentProps<typeof ColorPickerPrimitive.ValueText>) {
106
+ return (
107
+ <ColorPickerPrimitive.ValueText
108
+ data-slot="color-picker-value-text"
109
+ className={cn("font-mono text-sm", className)}
110
+ {...props}
111
+ />
112
+ )
113
+ }
114
+
115
+ function ColorPickerTransparencyGrid({
116
+ className,
117
+ ...props
118
+ }: React.ComponentProps<typeof ColorPickerPrimitive.TransparencyGrid>) {
119
+ return (
120
+ <ColorPickerPrimitive.TransparencyGrid
121
+ data-slot="color-picker-transparency-grid"
122
+ className={cn("size-full overflow-hidden", className)}
123
+ {...props}
124
+ />
125
+ )
126
+ }
127
+
128
+ function ColorPickerPortal({ ...props }: React.ComponentProps<typeof PortalPrimitive>) {
129
+ return <PortalPrimitive {...props} />
130
+ }
131
+
132
+ function ColorPickerPositioner({ className, ...props }: React.ComponentProps<typeof ColorPickerPrimitive.Positioner>) {
133
+ return (
134
+ <ColorPickerPrimitive.Positioner
135
+ data-slot="color-picker-positioner"
136
+ className={cn("[--z-index:50]", className)}
137
+ {...props}
138
+ />
139
+ )
140
+ }
141
+
142
+ function ColorPickerContent({ className, ...props }: React.ComponentProps<typeof ColorPickerPrimitive.Content>) {
143
+ return (
144
+ <ColorPickerPortal>
145
+ <ColorPickerPositioner>
146
+ <ColorPickerPrimitive.Content
147
+ data-slot="color-picker-content"
148
+ className={cn(
149
+ "z-50 flex w-64 flex-col gap-3 rounded-lg bg-popover p-3 text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
150
+ className
151
+ )}
152
+ {...props}
153
+ />
154
+ </ColorPickerPositioner>
155
+ </ColorPickerPortal>
156
+ )
157
+ }
158
+
159
+ function ColorPickerArea({ className, children, ...props }: React.ComponentProps<typeof ColorPickerPrimitive.Area>) {
160
+ return (
161
+ <ColorPickerPrimitive.Area
162
+ data-slot="color-picker-area"
163
+ className={cn("h-40 w-full overflow-hidden rounded-md", className)}
164
+ {...props}
165
+ >
166
+ {children ?? (
167
+ <>
168
+ <ColorPickerAreaBackground />
169
+ <ColorPickerAreaThumb />
170
+ </>
171
+ )}
172
+ </ColorPickerPrimitive.Area>
173
+ )
174
+ }
175
+
176
+ function ColorPickerAreaBackground({
177
+ className,
178
+ ...props
179
+ }: React.ComponentProps<typeof ColorPickerPrimitive.AreaBackground>) {
180
+ return (
181
+ <ColorPickerPrimitive.AreaBackground
182
+ data-slot="color-picker-area-background"
183
+ className={cn("size-full", className)}
184
+ {...props}
185
+ />
186
+ )
187
+ }
188
+
189
+ function ColorPickerAreaThumb({ className, ...props }: React.ComponentProps<typeof ColorPickerPrimitive.AreaThumb>) {
190
+ return (
191
+ <ColorPickerPrimitive.AreaThumb
192
+ data-slot="color-picker-area-thumb"
193
+ className={cn(
194
+ "size-3 rounded-full border-2 border-white shadow-[0_0_0_1px_rgba(0,0,0,0.3)] outline-none focus-visible:ring-3 focus-visible:ring-ring/50",
195
+ className
196
+ )}
197
+ {...props}
198
+ />
199
+ )
200
+ }
201
+
202
+ function ColorPickerChannelSlider({
203
+ className,
204
+ children,
205
+ ...props
206
+ }: React.ComponentProps<typeof ColorPickerPrimitive.ChannelSlider>) {
207
+ return (
208
+ <ColorPickerPrimitive.ChannelSlider
209
+ data-slot="color-picker-channel-slider"
210
+ className={cn("relative h-3 w-full", className)}
211
+ {...props}
212
+ >
213
+ {children ?? (
214
+ <>
215
+ <ColorPickerChannelSliderTrack />
216
+ <ColorPickerChannelSliderThumb />
217
+ </>
218
+ )}
219
+ </ColorPickerPrimitive.ChannelSlider>
220
+ )
221
+ }
222
+
223
+ function ColorPickerChannelSliderTrack({
224
+ className,
225
+ ...props
226
+ }: React.ComponentProps<typeof ColorPickerPrimitive.ChannelSliderTrack>) {
227
+ return (
228
+ <ColorPickerPrimitive.ChannelSliderTrack
229
+ data-slot="color-picker-channel-slider-track"
230
+ className={cn("size-full rounded-full", className)}
231
+ {...props}
232
+ />
233
+ )
234
+ }
235
+
236
+ function ColorPickerChannelSliderThumb({
237
+ className,
238
+ ...props
239
+ }: React.ComponentProps<typeof ColorPickerPrimitive.ChannelSliderThumb>) {
240
+ return (
241
+ <ColorPickerPrimitive.ChannelSliderThumb
242
+ data-slot="color-picker-channel-slider-thumb"
243
+ className={cn(
244
+ "size-3 -translate-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgba(0,0,0,0.3)] outline-none focus-visible:ring-3 focus-visible:ring-ring/50",
245
+ className
246
+ )}
247
+ {...props}
248
+ />
249
+ )
250
+ }
251
+
252
+ function ColorPickerChannelSliderLabel({
253
+ className,
254
+ ...props
255
+ }: React.ComponentProps<typeof ColorPickerPrimitive.ChannelSliderLabel>) {
256
+ return (
257
+ <ColorPickerPrimitive.ChannelSliderLabel
258
+ data-slot="color-picker-channel-slider-label"
259
+ className={cn("text-xs text-muted-foreground", className)}
260
+ {...props}
261
+ />
262
+ )
263
+ }
264
+
265
+ function ColorPickerChannelSliderValueText({
266
+ className,
267
+ ...props
268
+ }: React.ComponentProps<typeof ColorPickerPrimitive.ChannelSliderValueText>) {
269
+ return (
270
+ <ColorPickerPrimitive.ChannelSliderValueText
271
+ data-slot="color-picker-channel-slider-value-text"
272
+ className={cn("text-xs tabular-nums", className)}
273
+ {...props}
274
+ />
275
+ )
276
+ }
277
+
278
+ function ColorPickerEyeDropperTrigger({
279
+ className,
280
+ children,
281
+ ...props
282
+ }: React.ComponentProps<typeof ColorPickerPrimitive.EyeDropperTrigger>) {
283
+ return (
284
+ <ColorPickerPrimitive.EyeDropperTrigger
285
+ data-slot="color-picker-eye-dropper-trigger"
286
+ className={cn(className)}
287
+ asChild
288
+ {...props}
289
+ >
290
+ <Button variant="outline" size="icon-sm">
291
+ {children ?? <PipetteIcon />}
292
+ <span className="sr-only">Pick color</span>
293
+ </Button>
294
+ </ColorPickerPrimitive.EyeDropperTrigger>
295
+ )
296
+ }
297
+
298
+ function ColorPickerFormatTrigger({
299
+ className,
300
+ children,
301
+ ...props
302
+ }: React.ComponentProps<typeof ColorPickerPrimitive.FormatTrigger>) {
303
+ return (
304
+ <ColorPickerPrimitive.FormatTrigger
305
+ data-slot="color-picker-format-trigger"
306
+ className={cn(className)}
307
+ asChild
308
+ {...props}
309
+ >
310
+ <Button variant="outline" size="sm">
311
+ {children}
312
+ </Button>
313
+ </ColorPickerPrimitive.FormatTrigger>
314
+ )
315
+ }
316
+
317
+ function ColorPickerFormatSelect({
318
+ className,
319
+ ...props
320
+ }: React.ComponentProps<typeof ColorPickerPrimitive.FormatSelect>) {
321
+ return (
322
+ <ColorPickerPrimitive.FormatSelect
323
+ data-slot="color-picker-format-select"
324
+ className={cn(
325
+ "h-7 rounded-md border border-input bg-transparent px-1.5 text-xs outline-none focus-visible:ring-3 focus-visible:ring-ring/50 dark:bg-input/30",
326
+ className
327
+ )}
328
+ {...props}
329
+ />
330
+ )
331
+ }
332
+
333
+ function ColorPickerView({ className, ...props }: React.ComponentProps<typeof ColorPickerPrimitive.View>) {
334
+ return (
335
+ <ColorPickerPrimitive.View
336
+ data-slot="color-picker-view"
337
+ className={cn("flex items-center gap-1.5", className)}
338
+ {...props}
339
+ />
340
+ )
341
+ }
342
+
343
+ function ColorPickerSwatchGroup({
344
+ className,
345
+ ...props
346
+ }: React.ComponentProps<typeof ColorPickerPrimitive.SwatchGroup>) {
347
+ return (
348
+ <ColorPickerPrimitive.SwatchGroup
349
+ data-slot="color-picker-swatch-group"
350
+ className={cn("flex flex-wrap gap-1.5", className)}
351
+ {...props}
352
+ />
353
+ )
354
+ }
355
+
356
+ function ColorPickerSwatchTrigger({
357
+ className,
358
+ children,
359
+ value,
360
+ ...props
361
+ }: React.ComponentProps<typeof ColorPickerPrimitive.SwatchTrigger>) {
362
+ return (
363
+ <ColorPickerPrimitive.SwatchTrigger
364
+ data-slot="color-picker-swatch-trigger"
365
+ value={value}
366
+ className={cn("size-6 rounded-md outline-none focus-visible:ring-3 focus-visible:ring-ring/50", className)}
367
+ {...props}
368
+ >
369
+ {children ?? (
370
+ <ColorPickerTransparencyGrid className="rounded-md">
371
+ <ColorPickerSwatch value={value}>
372
+ <ColorPickerSwatchIndicator />
373
+ </ColorPickerSwatch>
374
+ </ColorPickerTransparencyGrid>
375
+ )}
376
+ </ColorPickerPrimitive.SwatchTrigger>
377
+ )
378
+ }
379
+
380
+ function ColorPickerSwatch({ className, ...props }: React.ComponentProps<typeof ColorPickerPrimitive.Swatch>) {
381
+ return (
382
+ <ColorPickerPrimitive.Swatch
383
+ data-slot="color-picker-swatch"
384
+ className={cn("flex size-full items-center justify-center rounded-[inherit]", className)}
385
+ {...props}
386
+ />
387
+ )
388
+ }
389
+
390
+ function ColorPickerSwatchIndicator({
391
+ className,
392
+ children,
393
+ ...props
394
+ }: React.ComponentProps<typeof ColorPickerPrimitive.SwatchIndicator>) {
395
+ return (
396
+ <ColorPickerPrimitive.SwatchIndicator
397
+ data-slot="color-picker-swatch-indicator"
398
+ className={cn("size-2 rounded-full bg-white shadow-sm", className)}
399
+ {...props}
400
+ >
401
+ {children}
402
+ </ColorPickerPrimitive.SwatchIndicator>
403
+ )
404
+ }
405
+
406
+ function ColorPickerHiddenInput({ ...props }: React.ComponentProps<typeof ColorPickerPrimitive.HiddenInput>) {
407
+ return <ColorPickerPrimitive.HiddenInput {...props} />
408
+ }
409
+
410
+ export {
411
+ ColorPicker,
412
+ ColorPickerArea,
413
+ ColorPickerAreaBackground,
414
+ ColorPickerAreaThumb,
415
+ ColorPickerChannelInput,
416
+ ColorPickerChannelSlider,
417
+ ColorPickerChannelSliderLabel,
418
+ ColorPickerChannelSliderThumb,
419
+ ColorPickerChannelSliderTrack,
420
+ ColorPickerChannelSliderValueText,
421
+ ColorPickerContent,
422
+ ColorPickerContext,
423
+ ColorPickerControl,
424
+ ColorPickerEyeDropperTrigger,
425
+ ColorPickerFormatSelect,
426
+ ColorPickerFormatTrigger,
427
+ ColorPickerHiddenInput,
428
+ ColorPickerLabel,
429
+ ColorPickerPortal,
430
+ ColorPickerPositioner,
431
+ ColorPickerSwatch,
432
+ ColorPickerSwatchGroup,
433
+ ColorPickerSwatchIndicator,
434
+ ColorPickerSwatchTrigger,
435
+ ColorPickerTransparencyGrid,
436
+ ColorPickerTrigger,
437
+ ColorPickerValueSwatch,
438
+ ColorPickerValueText,
439
+ ColorPickerView,
440
+ parseColor,
441
+ }