@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,72 @@
1
+ import * as React from "react"
2
+ import { cn } from "@/lib/utils"
3
+
4
+ function Table({ className, ...props }: React.ComponentProps<"table">) {
5
+ return (
6
+ <div data-slot="table-container" className="relative w-full overflow-x-auto">
7
+ <table data-slot="table" className={cn("w-full caption-bottom text-sm", className)} {...props} />
8
+ </div>
9
+ )
10
+ }
11
+
12
+ function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
13
+ return <thead data-slot="table-header" className={cn("[&_tr]:border-b", className)} {...props} />
14
+ }
15
+
16
+ function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
17
+ return <tbody data-slot="table-body" className={cn("[&_tr:last-child]:border-0", className)} {...props} />
18
+ }
19
+
20
+ function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
21
+ return (
22
+ <tfoot
23
+ data-slot="table-footer"
24
+ className={cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className)}
25
+ {...props}
26
+ />
27
+ )
28
+ }
29
+
30
+ function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
31
+ return (
32
+ <tr
33
+ data-slot="table-row"
34
+ className={cn(
35
+ "border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",
36
+ className
37
+ )}
38
+ {...props}
39
+ />
40
+ )
41
+ }
42
+
43
+ function TableHead({ className, ...props }: React.ComponentProps<"th">) {
44
+ return (
45
+ <th
46
+ data-slot="table-head"
47
+ className={cn(
48
+ "h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground has-[[role=checkbox]]:pr-0",
49
+ className
50
+ )}
51
+ {...props}
52
+ />
53
+ )
54
+ }
55
+
56
+ function TableCell({ className, ...props }: React.ComponentProps<"td">) {
57
+ return (
58
+ <td
59
+ data-slot="table-cell"
60
+ className={cn("p-2 align-middle whitespace-nowrap has-[[role=checkbox]]:pr-0", className)}
61
+ {...props}
62
+ />
63
+ )
64
+ }
65
+
66
+ function TableCaption({ className, ...props }: React.ComponentProps<"caption">) {
67
+ return (
68
+ <caption data-slot="table-caption" className={cn("mt-4 text-sm text-muted-foreground", className)} {...props} />
69
+ )
70
+ }
71
+
72
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption }
@@ -0,0 +1,100 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { cva, type VariantProps } from "class-variance-authority"
5
+ import { cn } from "@/lib/utils"
6
+ import { Tabs as TabsPrimitive } from "@ark-ui/react"
7
+
8
+ function Tabs({
9
+ className,
10
+ orientation = "horizontal",
11
+ lazyMount = true,
12
+ unmountOnExit = true,
13
+ ...props
14
+ }: React.ComponentProps<typeof TabsPrimitive.Root>) {
15
+ return (
16
+ <TabsPrimitive.Root
17
+ data-slot="tabs"
18
+ orientation={orientation}
19
+ lazyMount={lazyMount}
20
+ unmountOnExit={unmountOnExit}
21
+ className={cn("group/tabs flex gap-2 data-horizontal:flex-col", className)}
22
+ {...props}
23
+ />
24
+ )
25
+ }
26
+
27
+ function TabsContext({ ...props }: React.ComponentProps<typeof TabsPrimitive.Context>) {
28
+ return <TabsPrimitive.Context {...props} />
29
+ }
30
+
31
+ const tabsListVariants = cva(
32
+ "group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",
33
+ {
34
+ variants: {
35
+ variant: {
36
+ default: "bg-muted",
37
+ line: "gap-1 bg-transparent",
38
+ },
39
+ },
40
+ defaultVariants: {
41
+ variant: "default",
42
+ },
43
+ }
44
+ )
45
+
46
+ function TabsList({
47
+ className,
48
+ variant = "default",
49
+ ...props
50
+ }: React.ComponentProps<typeof TabsPrimitive.List> & VariantProps<typeof tabsListVariants>) {
51
+ return (
52
+ <TabsPrimitive.List
53
+ data-slot="tabs-list"
54
+ data-variant={variant}
55
+ className={cn(tabsListVariants({ variant }), className)}
56
+ {...props}
57
+ />
58
+ )
59
+ }
60
+
61
+ function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
62
+ return (
63
+ <TabsPrimitive.Trigger
64
+ data-slot="tabs-trigger"
65
+ className={cn(
66
+ "relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-selected:shadow-sm group-data-[variant=line]/tabs-list:data-selected:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
67
+ "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-selected:bg-transparent dark:group-data-[variant=line]/tabs-list:data-selected:border-transparent dark:group-data-[variant=line]/tabs-list:data-selected:bg-transparent",
68
+ "data-selected:bg-background data-selected:text-foreground dark:data-selected:border-input dark:data-selected:bg-input/30 dark:data-selected:text-foreground",
69
+ "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:-bottom-1.25 group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-selected:after:opacity-100",
70
+ className
71
+ )}
72
+ {...props}
73
+ />
74
+ )
75
+ }
76
+
77
+ function TabsIndicator({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Indicator>) {
78
+ return (
79
+ <TabsPrimitive.Indicator
80
+ data-slot="tabs-indicator"
81
+ className={cn(
82
+ "z-0 rounded-md bg-background shadow-sm transition-[left,top,width,height] duration-200",
83
+ className
84
+ )}
85
+ {...props}
86
+ />
87
+ )
88
+ }
89
+
90
+ function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {
91
+ return (
92
+ <TabsPrimitive.Content
93
+ data-slot="tabs-content"
94
+ className={cn("flex-1 text-sm outline-none", className)}
95
+ {...props}
96
+ />
97
+ )
98
+ }
99
+
100
+ export { Tabs, TabsContent, TabsContext, TabsIndicator, TabsList, TabsTrigger, tabsListVariants }
@@ -0,0 +1,153 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { cn } from "@/lib/utils"
5
+ import { TagsInput as TagsInputPrimitive } from "@ark-ui/react"
6
+ import { XIcon } from "lucide-react"
7
+
8
+ function TagsInput({ className, ...props }: React.ComponentProps<typeof TagsInputPrimitive.Root>) {
9
+ return (
10
+ <TagsInputPrimitive.Root
11
+ data-slot="tags-input"
12
+ className={cn("flex w-full flex-col gap-1.5", className)}
13
+ {...props}
14
+ />
15
+ )
16
+ }
17
+
18
+ function TagsInputContext({ ...props }: React.ComponentProps<typeof TagsInputPrimitive.Context>) {
19
+ return <TagsInputPrimitive.Context {...props} />
20
+ }
21
+
22
+ function TagsInputLabel({ className, ...props }: React.ComponentProps<typeof TagsInputPrimitive.Label>) {
23
+ return (
24
+ <TagsInputPrimitive.Label
25
+ data-slot="tags-input-label"
26
+ className={cn("text-sm font-medium select-none", className)}
27
+ {...props}
28
+ />
29
+ )
30
+ }
31
+
32
+ function TagsInputControl({ className, ...props }: React.ComponentProps<typeof TagsInputPrimitive.Control>) {
33
+ return (
34
+ <TagsInputPrimitive.Control
35
+ data-slot="tags-input-control"
36
+ className={cn(
37
+ "flex min-h-8 w-full flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent px-1.5 py-1 text-sm transition-colors has-focus-visible:border-ring has-focus-visible:ring-3 has-focus-visible:ring-ring/50 data-invalid:border-destructive data-invalid:ring-3 data-invalid:ring-destructive/20 dark:bg-input/30 data-disabled:pointer-events-none data-disabled:opacity-50",
38
+ className
39
+ )}
40
+ {...props}
41
+ />
42
+ )
43
+ }
44
+
45
+ /** `id` is omitted: set part ids through the root `ids` prop so Ark's internal lookups keep working. */
46
+ function TagsInputInput({ className, ...props }: Omit<React.ComponentProps<typeof TagsInputPrimitive.Input>, "id">) {
47
+ return (
48
+ <TagsInputPrimitive.Input
49
+ data-slot="tags-input-input"
50
+ className={cn(
51
+ "min-w-16 flex-1 bg-transparent px-1 text-sm outline-none placeholder:text-muted-foreground",
52
+ className
53
+ )}
54
+ {...props}
55
+ />
56
+ )
57
+ }
58
+
59
+ function TagsInputItem({ className, ...props }: React.ComponentProps<typeof TagsInputPrimitive.Item>) {
60
+ return <TagsInputPrimitive.Item data-slot="tags-input-item" className={cn("inline-flex", className)} {...props} />
61
+ }
62
+
63
+ function TagsInputItemContext({ ...props }: React.ComponentProps<typeof TagsInputPrimitive.ItemContext>) {
64
+ return <TagsInputPrimitive.ItemContext {...props} />
65
+ }
66
+
67
+ function TagsInputItemPreview({ className, ...props }: React.ComponentProps<typeof TagsInputPrimitive.ItemPreview>) {
68
+ return (
69
+ <TagsInputPrimitive.ItemPreview
70
+ data-slot="tags-input-item-preview"
71
+ className={cn(
72
+ "flex h-[calc(--spacing(5.25))] items-center gap-1 rounded-sm bg-muted pr-0 pl-1.5 text-xs font-medium whitespace-nowrap text-foreground data-highlighted:ring-2 data-highlighted:ring-ring/50 data-disabled:opacity-50",
73
+ className
74
+ )}
75
+ {...props}
76
+ />
77
+ )
78
+ }
79
+
80
+ function TagsInputItemText({ ...props }: React.ComponentProps<typeof TagsInputPrimitive.ItemText>) {
81
+ return <TagsInputPrimitive.ItemText data-slot="tags-input-item-text" {...props} />
82
+ }
83
+
84
+ function TagsInputItemDeleteTrigger({
85
+ className,
86
+ children,
87
+ ...props
88
+ }: React.ComponentProps<typeof TagsInputPrimitive.ItemDeleteTrigger>) {
89
+ return (
90
+ <TagsInputPrimitive.ItemDeleteTrigger
91
+ data-slot="tags-input-item-delete-trigger"
92
+ className={cn(
93
+ "inline-flex size-5 items-center justify-center rounded-sm opacity-50 hover:opacity-100 [&_svg]:size-3",
94
+ className
95
+ )}
96
+ {...props}
97
+ >
98
+ {children ?? <XIcon />}
99
+ </TagsInputPrimitive.ItemDeleteTrigger>
100
+ )
101
+ }
102
+
103
+ function TagsInputItemInput({ className, ...props }: React.ComponentProps<typeof TagsInputPrimitive.ItemInput>) {
104
+ return (
105
+ <TagsInputPrimitive.ItemInput
106
+ data-slot="tags-input-item-input"
107
+ className={cn(
108
+ "h-[calc(--spacing(5.25))] rounded-sm bg-muted px-1.5 text-xs ring-2 ring-ring/50 outline-none",
109
+ className
110
+ )}
111
+ {...props}
112
+ />
113
+ )
114
+ }
115
+
116
+ function TagsInputClearTrigger({
117
+ className,
118
+ children,
119
+ ...props
120
+ }: React.ComponentProps<typeof TagsInputPrimitive.ClearTrigger>) {
121
+ return (
122
+ <TagsInputPrimitive.ClearTrigger
123
+ data-slot="tags-input-clear-trigger"
124
+ className={cn(
125
+ "inline-flex size-6 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground [&_svg]:size-4",
126
+ className
127
+ )}
128
+ {...props}
129
+ >
130
+ {children ?? <XIcon />}
131
+ </TagsInputPrimitive.ClearTrigger>
132
+ )
133
+ }
134
+
135
+ function TagsInputHiddenInput({ ...props }: React.ComponentProps<typeof TagsInputPrimitive.HiddenInput>) {
136
+ return <TagsInputPrimitive.HiddenInput {...props} />
137
+ }
138
+
139
+ export {
140
+ TagsInput,
141
+ TagsInputClearTrigger,
142
+ TagsInputContext,
143
+ TagsInputControl,
144
+ TagsInputHiddenInput,
145
+ TagsInputInput,
146
+ TagsInputItem,
147
+ TagsInputItemContext,
148
+ TagsInputItemDeleteTrigger,
149
+ TagsInputItemInput,
150
+ TagsInputItemPreview,
151
+ TagsInputItemText,
152
+ TagsInputLabel,
153
+ }
@@ -0,0 +1,17 @@
1
+ import * as React from "react"
2
+ import { cn } from "@/lib/utils"
3
+
4
+ function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
5
+ return (
6
+ <textarea
7
+ data-slot="textarea"
8
+ className={cn(
9
+ "flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
10
+ className
11
+ )}
12
+ {...props}
13
+ />
14
+ )
15
+ }
16
+
17
+ export { Textarea }
@@ -0,0 +1,67 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { cn } from "@/lib/utils"
5
+ import { Timer as TimerPrimitive } from "@ark-ui/react"
6
+
7
+ import { Button } from "@/components/ui/button"
8
+
9
+ function Timer({ className, ...props }: React.ComponentProps<typeof TimerPrimitive.Root>) {
10
+ return (
11
+ <TimerPrimitive.Root data-slot="timer" className={cn("flex flex-col items-center gap-3", className)} {...props} />
12
+ )
13
+ }
14
+
15
+ function TimerContext({ ...props }: React.ComponentProps<typeof TimerPrimitive.Context>) {
16
+ return <TimerPrimitive.Context {...props} />
17
+ }
18
+
19
+ function TimerArea({ className, ...props }: React.ComponentProps<typeof TimerPrimitive.Area>) {
20
+ return (
21
+ <TimerPrimitive.Area
22
+ data-slot="timer-area"
23
+ className={cn("flex items-center gap-1 font-mono text-2xl font-medium tabular-nums", className)}
24
+ {...props}
25
+ />
26
+ )
27
+ }
28
+
29
+ function TimerItem({ className, ...props }: React.ComponentProps<typeof TimerPrimitive.Item>) {
30
+ return (
31
+ <TimerPrimitive.Item
32
+ data-slot="timer-item"
33
+ className={cn("flex min-w-10 items-center justify-center rounded-lg bg-muted px-2 py-1", className)}
34
+ {...props}
35
+ />
36
+ )
37
+ }
38
+
39
+ function TimerSeparator({ className, children, ...props }: React.ComponentProps<typeof TimerPrimitive.Separator>) {
40
+ return (
41
+ <TimerPrimitive.Separator data-slot="timer-separator" className={cn("text-muted-foreground", className)} {...props}>
42
+ {children ?? ":"}
43
+ </TimerPrimitive.Separator>
44
+ )
45
+ }
46
+
47
+ function TimerControl({ className, ...props }: React.ComponentProps<typeof TimerPrimitive.Control>) {
48
+ return (
49
+ <TimerPrimitive.Control data-slot="timer-control" className={cn("flex items-center gap-2", className)} {...props} />
50
+ )
51
+ }
52
+
53
+ function TimerActionTrigger({
54
+ className,
55
+ children,
56
+ ...props
57
+ }: React.ComponentProps<typeof TimerPrimitive.ActionTrigger>) {
58
+ return (
59
+ <TimerPrimitive.ActionTrigger data-slot="timer-action-trigger" className={cn(className)} asChild {...props}>
60
+ <Button variant="outline" size="sm">
61
+ {children}
62
+ </Button>
63
+ </TimerPrimitive.ActionTrigger>
64
+ )
65
+ }
66
+
67
+ export { Timer, TimerActionTrigger, TimerArea, TimerContext, TimerControl, TimerItem, TimerSeparator }
@@ -0,0 +1,64 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { cn } from "@/lib/utils"
5
+ import { Toc as TocPrimitive } from "@ark-ui/react"
6
+
7
+ function Toc({ className, ...props }: React.ComponentProps<typeof TocPrimitive.Root>) {
8
+ return <TocPrimitive.Root data-slot="toc" className={cn("w-full text-sm", className)} {...props} />
9
+ }
10
+
11
+ function TocContext({ ...props }: React.ComponentProps<typeof TocPrimitive.Context>) {
12
+ return <TocPrimitive.Context {...props} />
13
+ }
14
+
15
+ function TocNav({ className, ...props }: React.ComponentProps<typeof TocPrimitive.Nav>) {
16
+ return <TocPrimitive.Nav data-slot="toc-nav" className={cn("flex flex-col gap-2", className)} {...props} />
17
+ }
18
+
19
+ function TocTitle({ className, ...props }: React.ComponentProps<typeof TocPrimitive.Title>) {
20
+ return (
21
+ <TocPrimitive.Title
22
+ data-slot="toc-title"
23
+ className={cn("text-xs font-medium text-muted-foreground", className)}
24
+ {...props}
25
+ />
26
+ )
27
+ }
28
+
29
+ function TocContent({ className, ...props }: React.ComponentProps<typeof TocPrimitive.Content>) {
30
+ return <TocPrimitive.Content data-slot="toc-content" className={cn("relative", className)} {...props} />
31
+ }
32
+
33
+ function TocList({ className, ...props }: React.ComponentProps<typeof TocPrimitive.List>) {
34
+ return <TocPrimitive.List data-slot="toc-list" className={cn("flex flex-col border-l", className)} {...props} />
35
+ }
36
+
37
+ function TocItem({ className, ...props }: React.ComponentProps<typeof TocPrimitive.Item>) {
38
+ return <TocPrimitive.Item data-slot="toc-item" className={cn("flex", className)} {...props} />
39
+ }
40
+
41
+ function TocLink({ className, ...props }: React.ComponentProps<typeof TocPrimitive.Link>) {
42
+ return (
43
+ <TocPrimitive.Link
44
+ data-slot="toc-link"
45
+ className={cn(
46
+ "-ml-px flex-1 border-l border-transparent py-1 pl-[calc(var(--depth,1)*(--spacing(3)))] text-muted-foreground transition-colors hover:text-foreground data-active:border-foreground data-active:text-foreground",
47
+ className
48
+ )}
49
+ {...props}
50
+ />
51
+ )
52
+ }
53
+
54
+ function TocIndicator({ className, ...props }: React.ComponentProps<typeof TocPrimitive.Indicator>) {
55
+ return (
56
+ <TocPrimitive.Indicator
57
+ data-slot="toc-indicator"
58
+ className={cn("w-px bg-foreground transition-all", className)}
59
+ {...props}
60
+ />
61
+ )
62
+ }
63
+
64
+ export { Toc, TocContent, TocContext, TocIndicator, TocItem, TocLink, TocList, TocNav, TocTitle }
@@ -0,0 +1,89 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { type VariantProps } from "class-variance-authority"
5
+ import { cn } from "@/lib/utils"
6
+ import { ToggleGroup as ToggleGroupPrimitive } from "@ark-ui/react"
7
+
8
+ import { toggleVariants } from "@/components/ui/toggle"
9
+
10
+ const ToggleGroupVariantContext = React.createContext<
11
+ VariantProps<typeof toggleVariants> & {
12
+ spacing?: number
13
+ orientation?: "horizontal" | "vertical"
14
+ }
15
+ >({
16
+ size: "default",
17
+ variant: "default",
18
+ spacing: 2,
19
+ orientation: "horizontal",
20
+ })
21
+
22
+ function ToggleGroup({
23
+ className,
24
+ variant,
25
+ size,
26
+ spacing = 2,
27
+ orientation = "horizontal",
28
+ children,
29
+ ...props
30
+ }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &
31
+ VariantProps<typeof toggleVariants> & {
32
+ spacing?: number
33
+ }) {
34
+ return (
35
+ <ToggleGroupPrimitive.Root
36
+ data-slot="toggle-group"
37
+ data-variant={variant}
38
+ data-size={size}
39
+ data-spacing={spacing}
40
+ orientation={orientation}
41
+ style={{ "--gap": spacing } as React.CSSProperties}
42
+ className={cn(
43
+ "group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch",
44
+ className
45
+ )}
46
+ {...props}
47
+ >
48
+ <ToggleGroupVariantContext.Provider value={{ variant, size, spacing, orientation }}>
49
+ {children}
50
+ </ToggleGroupVariantContext.Provider>
51
+ </ToggleGroupPrimitive.Root>
52
+ )
53
+ }
54
+
55
+ function ToggleGroupContext({ ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Context>) {
56
+ return <ToggleGroupPrimitive.Context {...props} />
57
+ }
58
+
59
+ function ToggleGroupItem({
60
+ className,
61
+ children,
62
+ variant = "default",
63
+ size = "default",
64
+ ...props
65
+ }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>) {
66
+ const context = React.useContext(ToggleGroupVariantContext)
67
+
68
+ return (
69
+ <ToggleGroupPrimitive.Item
70
+ data-slot="toggle-group-item"
71
+ data-variant={context.variant || variant}
72
+ data-size={context.size || size}
73
+ data-spacing={context.spacing}
74
+ className={cn(
75
+ "shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",
76
+ toggleVariants({
77
+ variant: context.variant || variant,
78
+ size: context.size || size,
79
+ }),
80
+ className
81
+ )}
82
+ {...props}
83
+ >
84
+ {children}
85
+ </ToggleGroupPrimitive.Item>
86
+ )
87
+ }
88
+
89
+ export { ToggleGroup, ToggleGroupContext, ToggleGroupItem }
@@ -0,0 +1,46 @@
1
+ import * as React from "react"
2
+ import { cva, type VariantProps } from "class-variance-authority"
3
+ import { cn } from "@/lib/utils"
4
+ import { Toggle as TogglePrimitive } from "@ark-ui/react"
5
+
6
+ const toggleVariants = cva(
7
+ "group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-transparent",
12
+ outline: "border border-input bg-transparent hover:bg-muted",
13
+ },
14
+ size: {
15
+ default: "h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
16
+ sm: "h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
17
+ lg: "h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
18
+ },
19
+ },
20
+ defaultVariants: {
21
+ variant: "default",
22
+ size: "default",
23
+ },
24
+ }
25
+ )
26
+
27
+ function Toggle({
28
+ className,
29
+ variant = "default",
30
+ size = "default",
31
+ ...props
32
+ }: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>) {
33
+ return (
34
+ <TogglePrimitive.Root data-slot="toggle" className={cn(toggleVariants({ variant, size, className }))} {...props} />
35
+ )
36
+ }
37
+
38
+ function ToggleIndicator({ ...props }: React.ComponentProps<typeof TogglePrimitive.Indicator>) {
39
+ return <TogglePrimitive.Indicator data-slot="toggle-indicator" {...props} />
40
+ }
41
+
42
+ function ToggleContext({ ...props }: React.ComponentProps<typeof TogglePrimitive.Context>) {
43
+ return <TogglePrimitive.Context {...props} />
44
+ }
45
+
46
+ export { Toggle, ToggleContext, ToggleIndicator, toggleVariants }