howone 0.0.3 → 0.0.5

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 (167) hide show
  1. package/package.json +1 -1
  2. package/templates/nextjs/.prettierignore +7 -0
  3. package/templates/nextjs/.prettierrc +11 -0
  4. package/templates/nextjs/README.md +12 -27
  5. package/templates/nextjs/app/globals.css +123 -40
  6. package/templates/nextjs/app/layout.tsx +19 -19
  7. package/templates/nextjs/app/page.tsx +13 -60
  8. package/templates/nextjs/bun.lock +925 -53
  9. package/templates/nextjs/components/.gitkeep +0 -0
  10. package/templates/nextjs/components/theme-provider.tsx +71 -0
  11. package/templates/nextjs/components/ui/accordion.tsx +81 -0
  12. package/templates/nextjs/components/ui/alert-dialog.tsx +199 -0
  13. package/templates/nextjs/components/ui/alert.tsx +76 -0
  14. package/templates/nextjs/components/ui/aspect-ratio.tsx +11 -0
  15. package/templates/nextjs/components/ui/avatar.tsx +112 -0
  16. package/templates/nextjs/components/ui/badge.tsx +49 -0
  17. package/templates/nextjs/components/ui/breadcrumb.tsx +122 -0
  18. package/templates/nextjs/components/ui/button-group.tsx +83 -0
  19. package/templates/nextjs/components/ui/button.tsx +67 -0
  20. package/templates/nextjs/components/ui/calendar.tsx +222 -0
  21. package/templates/nextjs/components/ui/card.tsx +103 -0
  22. package/templates/nextjs/components/ui/carousel.tsx +242 -0
  23. package/templates/nextjs/components/ui/chart.tsx +373 -0
  24. package/templates/nextjs/components/ui/checkbox.tsx +33 -0
  25. package/templates/nextjs/components/ui/collapsible.tsx +33 -0
  26. package/templates/nextjs/components/ui/combobox.tsx +299 -0
  27. package/templates/nextjs/components/ui/command.tsx +195 -0
  28. package/templates/nextjs/components/ui/context-menu.tsx +263 -0
  29. package/templates/nextjs/components/ui/dialog.tsx +168 -0
  30. package/templates/nextjs/components/ui/direction.tsx +22 -0
  31. package/templates/nextjs/components/ui/drawer.tsx +134 -0
  32. package/templates/nextjs/components/ui/dropdown-menu.tsx +269 -0
  33. package/templates/nextjs/components/ui/empty.tsx +104 -0
  34. package/templates/nextjs/components/ui/field.tsx +238 -0
  35. package/templates/nextjs/components/ui/hover-card.tsx +44 -0
  36. package/templates/nextjs/components/ui/input-group.tsx +156 -0
  37. package/templates/nextjs/components/ui/input-otp.tsx +87 -0
  38. package/templates/nextjs/components/ui/input.tsx +19 -0
  39. package/templates/nextjs/components/ui/item.tsx +196 -0
  40. package/templates/nextjs/components/ui/kbd.tsx +26 -0
  41. package/templates/nextjs/components/ui/label.tsx +24 -0
  42. package/templates/nextjs/components/ui/menubar.tsx +280 -0
  43. package/templates/nextjs/components/ui/native-select.tsx +61 -0
  44. package/templates/nextjs/components/ui/navigation-menu.tsx +164 -0
  45. package/templates/nextjs/components/ui/pagination.tsx +129 -0
  46. package/templates/nextjs/components/ui/popover.tsx +89 -0
  47. package/templates/nextjs/components/ui/progress.tsx +31 -0
  48. package/templates/nextjs/components/ui/radio-group.tsx +44 -0
  49. package/templates/nextjs/components/ui/resizable.tsx +50 -0
  50. package/templates/nextjs/components/ui/scroll-area.tsx +55 -0
  51. package/templates/nextjs/components/ui/select.tsx +192 -0
  52. package/templates/nextjs/components/ui/separator.tsx +28 -0
  53. package/templates/nextjs/components/ui/sheet.tsx +147 -0
  54. package/templates/nextjs/components/ui/sidebar.tsx +702 -0
  55. package/templates/nextjs/components/ui/skeleton.tsx +13 -0
  56. package/templates/nextjs/components/ui/slider.tsx +59 -0
  57. package/templates/nextjs/components/ui/sonner.tsx +49 -0
  58. package/templates/nextjs/components/ui/spinner.tsx +10 -0
  59. package/templates/nextjs/components/ui/switch.tsx +33 -0
  60. package/templates/nextjs/components/ui/table.tsx +116 -0
  61. package/templates/nextjs/components/ui/tabs.tsx +90 -0
  62. package/templates/nextjs/components/ui/textarea.tsx +18 -0
  63. package/templates/nextjs/components/ui/toggle-group.tsx +89 -0
  64. package/templates/nextjs/components/ui/toggle.tsx +47 -0
  65. package/templates/nextjs/components/ui/tooltip.tsx +57 -0
  66. package/templates/nextjs/components.json +25 -0
  67. package/templates/nextjs/hooks/.gitkeep +0 -0
  68. package/templates/nextjs/hooks/use-mobile.ts +19 -0
  69. package/templates/nextjs/lib/.gitkeep +0 -0
  70. package/templates/nextjs/lib/sdk.ts +7 -0
  71. package/templates/nextjs/lib/utils.ts +6 -0
  72. package/templates/nextjs/next.config.mjs +4 -0
  73. package/templates/vite/.prettierignore +7 -0
  74. package/templates/vite/.prettierrc +11 -0
  75. package/templates/vite/AGENTS.md +0 -0
  76. package/templates/vite/README.md +12 -64
  77. package/templates/vite/bun.lock +1478 -0
  78. package/templates/vite/components.json +25 -0
  79. package/templates/vite/eslint.config.js +1 -0
  80. package/templates/vite/index.html +2 -2
  81. package/templates/vite/package.json +39 -13
  82. package/templates/vite/public/vite.svg +1 -0
  83. package/templates/vite/src/App.tsx +6 -115
  84. package/templates/vite/src/components/theme-provider.tsx +230 -0
  85. package/templates/vite/src/components/ui/accordion.tsx +79 -0
  86. package/templates/vite/src/components/ui/alert-dialog.tsx +197 -0
  87. package/templates/vite/src/components/ui/alert.tsx +76 -0
  88. package/templates/vite/src/components/ui/aspect-ratio.tsx +11 -0
  89. package/templates/vite/src/components/ui/avatar.tsx +110 -0
  90. package/templates/vite/src/components/ui/badge.tsx +49 -0
  91. package/templates/vite/src/components/ui/breadcrumb.tsx +122 -0
  92. package/templates/vite/src/components/ui/button-group.tsx +83 -0
  93. package/templates/vite/src/components/ui/button.tsx +67 -0
  94. package/templates/vite/src/components/ui/calendar.tsx +222 -0
  95. package/templates/vite/src/components/ui/card.tsx +103 -0
  96. package/templates/vite/src/components/ui/carousel.tsx +240 -0
  97. package/templates/vite/src/components/ui/chart.tsx +373 -0
  98. package/templates/vite/src/components/ui/checkbox.tsx +31 -0
  99. package/templates/vite/src/components/ui/collapsible.tsx +33 -0
  100. package/templates/vite/src/components/ui/combobox.tsx +299 -0
  101. package/templates/vite/src/components/ui/command.tsx +193 -0
  102. package/templates/vite/src/components/ui/context-menu.tsx +261 -0
  103. package/templates/vite/src/components/ui/dialog.tsx +168 -0
  104. package/templates/vite/src/components/ui/direction.tsx +22 -0
  105. package/templates/vite/src/components/ui/drawer.tsx +132 -0
  106. package/templates/vite/src/components/ui/dropdown-menu.tsx +269 -0
  107. package/templates/vite/src/components/ui/empty.tsx +104 -0
  108. package/templates/vite/src/components/ui/field.tsx +238 -0
  109. package/templates/vite/src/components/ui/hover-card.tsx +42 -0
  110. package/templates/vite/src/components/ui/input-group.tsx +154 -0
  111. package/templates/vite/src/components/ui/input-otp.tsx +87 -0
  112. package/templates/vite/src/components/ui/input.tsx +19 -0
  113. package/templates/vite/src/components/ui/item.tsx +196 -0
  114. package/templates/vite/src/components/ui/kbd.tsx +26 -0
  115. package/templates/vite/src/components/ui/label.tsx +22 -0
  116. package/templates/vite/src/components/ui/menubar.tsx +280 -0
  117. package/templates/vite/src/components/ui/native-select.tsx +61 -0
  118. package/templates/vite/src/components/ui/navigation-menu.tsx +164 -0
  119. package/templates/vite/src/components/ui/pagination.tsx +129 -0
  120. package/templates/vite/src/components/ui/popover.tsx +87 -0
  121. package/templates/vite/src/components/ui/progress.tsx +31 -0
  122. package/templates/vite/src/components/ui/radio-group.tsx +42 -0
  123. package/templates/vite/src/components/ui/resizable.tsx +50 -0
  124. package/templates/vite/src/components/ui/scroll-area.tsx +53 -0
  125. package/templates/vite/src/components/ui/select.tsx +192 -0
  126. package/templates/vite/src/components/ui/separator.tsx +26 -0
  127. package/templates/vite/src/components/ui/sheet.tsx +145 -0
  128. package/templates/vite/src/components/ui/sidebar.tsx +700 -0
  129. package/templates/vite/src/components/ui/skeleton.tsx +13 -0
  130. package/templates/vite/src/components/ui/slider.tsx +59 -0
  131. package/templates/vite/src/components/ui/sonner.tsx +47 -0
  132. package/templates/vite/src/components/ui/spinner.tsx +10 -0
  133. package/templates/vite/src/components/ui/switch.tsx +33 -0
  134. package/templates/vite/src/components/ui/table.tsx +114 -0
  135. package/templates/vite/src/components/ui/tabs.tsx +90 -0
  136. package/templates/vite/src/components/ui/textarea.tsx +18 -0
  137. package/templates/vite/src/components/ui/toggle-group.tsx +89 -0
  138. package/templates/vite/src/components/ui/toggle.tsx +45 -0
  139. package/templates/vite/src/components/ui/tooltip.tsx +57 -0
  140. package/templates/vite/src/hooks/use-mobile.ts +19 -0
  141. package/templates/vite/src/index.css +125 -103
  142. package/templates/vite/src/lib/sdk.ts +7 -0
  143. package/templates/vite/src/lib/utils.ts +6 -0
  144. package/templates/vite/src/main.tsx +11 -7
  145. package/templates/vite/tsconfig.app.json +11 -4
  146. package/templates/vite/tsconfig.json +7 -1
  147. package/templates/vite/tsconfig.node.json +5 -3
  148. package/templates/vite/vite.config.ts +10 -3
  149. package/templates/nextjs/AGENTS.md +0 -5
  150. package/templates/nextjs/CLAUDE.md +0 -1
  151. package/templates/nextjs/app/page.module.css +0 -142
  152. package/templates/nextjs/gitignore +0 -41
  153. package/templates/nextjs/next-env.d.ts +0 -6
  154. package/templates/nextjs/next.config.ts +0 -7
  155. package/templates/nextjs/package.json +0 -32
  156. package/templates/nextjs/public/file.svg +0 -1
  157. package/templates/nextjs/public/globe.svg +0 -1
  158. package/templates/nextjs/public/next.svg +0 -1
  159. package/templates/nextjs/public/vercel.svg +0 -1
  160. package/templates/nextjs/public/window.svg +0 -1
  161. package/templates/nextjs/tsconfig.json +0 -34
  162. package/templates/vite/gitignore +0 -24
  163. package/templates/vite/public/favicon.svg +0 -1
  164. package/templates/vite/public/icons.svg +0 -24
  165. package/templates/vite/src/App.css +0 -184
  166. package/templates/vite/src/assets/hero.png +0 -0
  167. package/templates/vite/src/assets/vite.svg +0 -1
@@ -0,0 +1,89 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Popover as PopoverPrimitive } from "radix-ui"
5
+
6
+ import { cn } from "@/lib/utils"
7
+
8
+ function Popover({
9
+ ...props
10
+ }: React.ComponentProps<typeof PopoverPrimitive.Root>) {
11
+ return <PopoverPrimitive.Root data-slot="popover" {...props} />
12
+ }
13
+
14
+ function PopoverTrigger({
15
+ ...props
16
+ }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
17
+ return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />
18
+ }
19
+
20
+ function PopoverContent({
21
+ className,
22
+ align = "center",
23
+ sideOffset = 4,
24
+ ...props
25
+ }: React.ComponentProps<typeof PopoverPrimitive.Content>) {
26
+ return (
27
+ <PopoverPrimitive.Portal>
28
+ <PopoverPrimitive.Content
29
+ data-slot="popover-content"
30
+ align={align}
31
+ sideOffset={sideOffset}
32
+ className={cn(
33
+ "z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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",
34
+ className
35
+ )}
36
+ {...props}
37
+ />
38
+ </PopoverPrimitive.Portal>
39
+ )
40
+ }
41
+
42
+ function PopoverAnchor({
43
+ ...props
44
+ }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
45
+ return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />
46
+ }
47
+
48
+ function PopoverHeader({ className, ...props }: React.ComponentProps<"div">) {
49
+ return (
50
+ <div
51
+ data-slot="popover-header"
52
+ className={cn("flex flex-col gap-0.5 text-sm", className)}
53
+ {...props}
54
+ />
55
+ )
56
+ }
57
+
58
+ function PopoverTitle({ className, ...props }: React.ComponentProps<"h2">) {
59
+ return (
60
+ <div
61
+ data-slot="popover-title"
62
+ className={cn("font-medium", className)}
63
+ {...props}
64
+ />
65
+ )
66
+ }
67
+
68
+ function PopoverDescription({
69
+ className,
70
+ ...props
71
+ }: React.ComponentProps<"p">) {
72
+ return (
73
+ <p
74
+ data-slot="popover-description"
75
+ className={cn("text-muted-foreground", className)}
76
+ {...props}
77
+ />
78
+ )
79
+ }
80
+
81
+ export {
82
+ Popover,
83
+ PopoverAnchor,
84
+ PopoverContent,
85
+ PopoverDescription,
86
+ PopoverHeader,
87
+ PopoverTitle,
88
+ PopoverTrigger,
89
+ }
@@ -0,0 +1,31 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Progress as ProgressPrimitive } from "radix-ui"
5
+
6
+ import { cn } from "@/lib/utils"
7
+
8
+ function Progress({
9
+ className,
10
+ value,
11
+ ...props
12
+ }: React.ComponentProps<typeof ProgressPrimitive.Root>) {
13
+ return (
14
+ <ProgressPrimitive.Root
15
+ data-slot="progress"
16
+ className={cn(
17
+ "relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",
18
+ className
19
+ )}
20
+ {...props}
21
+ >
22
+ <ProgressPrimitive.Indicator
23
+ data-slot="progress-indicator"
24
+ className="size-full flex-1 bg-primary transition-all"
25
+ style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
26
+ />
27
+ </ProgressPrimitive.Root>
28
+ )
29
+ }
30
+
31
+ export { Progress }
@@ -0,0 +1,44 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { RadioGroup as RadioGroupPrimitive } from "radix-ui"
5
+
6
+ import { cn } from "@/lib/utils"
7
+
8
+ function RadioGroup({
9
+ className,
10
+ ...props
11
+ }: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {
12
+ return (
13
+ <RadioGroupPrimitive.Root
14
+ data-slot="radio-group"
15
+ className={cn("grid w-full gap-2", className)}
16
+ {...props}
17
+ />
18
+ )
19
+ }
20
+
21
+ function RadioGroupItem({
22
+ className,
23
+ ...props
24
+ }: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {
25
+ return (
26
+ <RadioGroupPrimitive.Item
27
+ data-slot="radio-group-item"
28
+ className={cn(
29
+ "group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
30
+ className
31
+ )}
32
+ {...props}
33
+ >
34
+ <RadioGroupPrimitive.Indicator
35
+ data-slot="radio-group-indicator"
36
+ className="flex size-4 items-center justify-center"
37
+ >
38
+ <span className="absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" />
39
+ </RadioGroupPrimitive.Indicator>
40
+ </RadioGroupPrimitive.Item>
41
+ )
42
+ }
43
+
44
+ export { RadioGroup, RadioGroupItem }
@@ -0,0 +1,50 @@
1
+ "use client"
2
+
3
+ import * as ResizablePrimitive from "react-resizable-panels"
4
+
5
+ import { cn } from "@/lib/utils"
6
+
7
+ function ResizablePanelGroup({
8
+ className,
9
+ ...props
10
+ }: ResizablePrimitive.GroupProps) {
11
+ return (
12
+ <ResizablePrimitive.Group
13
+ data-slot="resizable-panel-group"
14
+ className={cn(
15
+ "flex h-full w-full aria-[orientation=vertical]:flex-col",
16
+ className
17
+ )}
18
+ {...props}
19
+ />
20
+ )
21
+ }
22
+
23
+ function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {
24
+ return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />
25
+ }
26
+
27
+ function ResizableHandle({
28
+ withHandle,
29
+ className,
30
+ ...props
31
+ }: ResizablePrimitive.SeparatorProps & {
32
+ withHandle?: boolean
33
+ }) {
34
+ return (
35
+ <ResizablePrimitive.Separator
36
+ data-slot="resizable-handle"
37
+ className={cn(
38
+ "relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90",
39
+ className
40
+ )}
41
+ {...props}
42
+ >
43
+ {withHandle && (
44
+ <div className="z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border" />
45
+ )}
46
+ </ResizablePrimitive.Separator>
47
+ )
48
+ }
49
+
50
+ export { ResizableHandle, ResizablePanel, ResizablePanelGroup }
@@ -0,0 +1,55 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { ScrollArea as ScrollAreaPrimitive } from "radix-ui"
5
+
6
+ import { cn } from "@/lib/utils"
7
+
8
+ function ScrollArea({
9
+ className,
10
+ children,
11
+ ...props
12
+ }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
13
+ return (
14
+ <ScrollAreaPrimitive.Root
15
+ data-slot="scroll-area"
16
+ className={cn("relative", className)}
17
+ {...props}
18
+ >
19
+ <ScrollAreaPrimitive.Viewport
20
+ data-slot="scroll-area-viewport"
21
+ className="size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1"
22
+ >
23
+ {children}
24
+ </ScrollAreaPrimitive.Viewport>
25
+ <ScrollBar />
26
+ <ScrollAreaPrimitive.Corner />
27
+ </ScrollAreaPrimitive.Root>
28
+ )
29
+ }
30
+
31
+ function ScrollBar({
32
+ className,
33
+ orientation = "vertical",
34
+ ...props
35
+ }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
36
+ return (
37
+ <ScrollAreaPrimitive.ScrollAreaScrollbar
38
+ data-slot="scroll-area-scrollbar"
39
+ data-orientation={orientation}
40
+ orientation={orientation}
41
+ className={cn(
42
+ "flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",
43
+ className
44
+ )}
45
+ {...props}
46
+ >
47
+ <ScrollAreaPrimitive.ScrollAreaThumb
48
+ data-slot="scroll-area-thumb"
49
+ className="relative flex-1 rounded-full bg-border"
50
+ />
51
+ </ScrollAreaPrimitive.ScrollAreaScrollbar>
52
+ )
53
+ }
54
+
55
+ export { ScrollArea, ScrollBar }
@@ -0,0 +1,192 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Select as SelectPrimitive } from "radix-ui"
5
+
6
+ import { cn } from "@/lib/utils"
7
+ import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react"
8
+
9
+ function Select({
10
+ ...props
11
+ }: React.ComponentProps<typeof SelectPrimitive.Root>) {
12
+ return <SelectPrimitive.Root data-slot="select" {...props} />
13
+ }
14
+
15
+ function SelectGroup({
16
+ className,
17
+ ...props
18
+ }: React.ComponentProps<typeof SelectPrimitive.Group>) {
19
+ return (
20
+ <SelectPrimitive.Group
21
+ data-slot="select-group"
22
+ className={cn("scroll-my-1 p-1", className)}
23
+ {...props}
24
+ />
25
+ )
26
+ }
27
+
28
+ function SelectValue({
29
+ ...props
30
+ }: React.ComponentProps<typeof SelectPrimitive.Value>) {
31
+ return <SelectPrimitive.Value data-slot="select-value" {...props} />
32
+ }
33
+
34
+ function SelectTrigger({
35
+ className,
36
+ size = "default",
37
+ children,
38
+ ...props
39
+ }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
40
+ size?: "sm" | "default"
41
+ }) {
42
+ return (
43
+ <SelectPrimitive.Trigger
44
+ data-slot="select-trigger"
45
+ data-size={size}
46
+ className={cn(
47
+ "flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
48
+ className
49
+ )}
50
+ {...props}
51
+ >
52
+ {children}
53
+ <SelectPrimitive.Icon asChild>
54
+ <ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />
55
+ </SelectPrimitive.Icon>
56
+ </SelectPrimitive.Trigger>
57
+ )
58
+ }
59
+
60
+ function SelectContent({
61
+ className,
62
+ children,
63
+ position = "item-aligned",
64
+ align = "center",
65
+ ...props
66
+ }: React.ComponentProps<typeof SelectPrimitive.Content>) {
67
+ return (
68
+ <SelectPrimitive.Portal>
69
+ <SelectPrimitive.Content
70
+ data-slot="select-content"
71
+ data-align-trigger={position === "item-aligned"}
72
+ className={cn("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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", position ==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className )}
73
+ position={position}
74
+ align={align}
75
+ {...props}
76
+ >
77
+ <SelectScrollUpButton />
78
+ <SelectPrimitive.Viewport
79
+ data-position={position}
80
+ className={cn(
81
+ "data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",
82
+ position === "popper" && ""
83
+ )}
84
+ >
85
+ {children}
86
+ </SelectPrimitive.Viewport>
87
+ <SelectScrollDownButton />
88
+ </SelectPrimitive.Content>
89
+ </SelectPrimitive.Portal>
90
+ )
91
+ }
92
+
93
+ function SelectLabel({
94
+ className,
95
+ ...props
96
+ }: React.ComponentProps<typeof SelectPrimitive.Label>) {
97
+ return (
98
+ <SelectPrimitive.Label
99
+ data-slot="select-label"
100
+ className={cn("px-1.5 py-1 text-xs text-muted-foreground", className)}
101
+ {...props}
102
+ />
103
+ )
104
+ }
105
+
106
+ function SelectItem({
107
+ className,
108
+ children,
109
+ ...props
110
+ }: React.ComponentProps<typeof SelectPrimitive.Item>) {
111
+ return (
112
+ <SelectPrimitive.Item
113
+ data-slot="select-item"
114
+ className={cn(
115
+ "relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
116
+ className
117
+ )}
118
+ {...props}
119
+ >
120
+ <span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center">
121
+ <SelectPrimitive.ItemIndicator>
122
+ <CheckIcon className="pointer-events-none" />
123
+ </SelectPrimitive.ItemIndicator>
124
+ </span>
125
+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
126
+ </SelectPrimitive.Item>
127
+ )
128
+ }
129
+
130
+ function SelectSeparator({
131
+ className,
132
+ ...props
133
+ }: React.ComponentProps<typeof SelectPrimitive.Separator>) {
134
+ return (
135
+ <SelectPrimitive.Separator
136
+ data-slot="select-separator"
137
+ className={cn("pointer-events-none -mx-1 my-1 h-px bg-border", className)}
138
+ {...props}
139
+ />
140
+ )
141
+ }
142
+
143
+ function SelectScrollUpButton({
144
+ className,
145
+ ...props
146
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
147
+ return (
148
+ <SelectPrimitive.ScrollUpButton
149
+ data-slot="select-scroll-up-button"
150
+ className={cn(
151
+ "z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
152
+ className
153
+ )}
154
+ {...props}
155
+ >
156
+ <ChevronUpIcon
157
+ />
158
+ </SelectPrimitive.ScrollUpButton>
159
+ )
160
+ }
161
+
162
+ function SelectScrollDownButton({
163
+ className,
164
+ ...props
165
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
166
+ return (
167
+ <SelectPrimitive.ScrollDownButton
168
+ data-slot="select-scroll-down-button"
169
+ className={cn(
170
+ "z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
171
+ className
172
+ )}
173
+ {...props}
174
+ >
175
+ <ChevronDownIcon
176
+ />
177
+ </SelectPrimitive.ScrollDownButton>
178
+ )
179
+ }
180
+
181
+ export {
182
+ Select,
183
+ SelectContent,
184
+ SelectGroup,
185
+ SelectItem,
186
+ SelectLabel,
187
+ SelectScrollDownButton,
188
+ SelectScrollUpButton,
189
+ SelectSeparator,
190
+ SelectTrigger,
191
+ SelectValue,
192
+ }
@@ -0,0 +1,28 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Separator as SeparatorPrimitive } from "radix-ui"
5
+
6
+ import { cn } from "@/lib/utils"
7
+
8
+ function Separator({
9
+ className,
10
+ orientation = "horizontal",
11
+ decorative = true,
12
+ ...props
13
+ }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
14
+ return (
15
+ <SeparatorPrimitive.Root
16
+ data-slot="separator"
17
+ decorative={decorative}
18
+ orientation={orientation}
19
+ className={cn(
20
+ "shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
21
+ className
22
+ )}
23
+ {...props}
24
+ />
25
+ )
26
+ }
27
+
28
+ export { Separator }
@@ -0,0 +1,147 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Dialog as SheetPrimitive } from "radix-ui"
5
+
6
+ import { cn } from "@/lib/utils"
7
+ import { Button } from "@/components/ui/button"
8
+ import { XIcon } from "lucide-react"
9
+
10
+ function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
11
+ return <SheetPrimitive.Root data-slot="sheet" {...props} />
12
+ }
13
+
14
+ function SheetTrigger({
15
+ ...props
16
+ }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {
17
+ return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />
18
+ }
19
+
20
+ function SheetClose({
21
+ ...props
22
+ }: React.ComponentProps<typeof SheetPrimitive.Close>) {
23
+ return <SheetPrimitive.Close data-slot="sheet-close" {...props} />
24
+ }
25
+
26
+ function SheetPortal({
27
+ ...props
28
+ }: React.ComponentProps<typeof SheetPrimitive.Portal>) {
29
+ return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />
30
+ }
31
+
32
+ function SheetOverlay({
33
+ className,
34
+ ...props
35
+ }: React.ComponentProps<typeof SheetPrimitive.Overlay>) {
36
+ return (
37
+ <SheetPrimitive.Overlay
38
+ data-slot="sheet-overlay"
39
+ className={cn(
40
+ "fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
41
+ className
42
+ )}
43
+ {...props}
44
+ />
45
+ )
46
+ }
47
+
48
+ function SheetContent({
49
+ className,
50
+ children,
51
+ side = "right",
52
+ showCloseButton = true,
53
+ ...props
54
+ }: React.ComponentProps<typeof SheetPrimitive.Content> & {
55
+ side?: "top" | "right" | "bottom" | "left"
56
+ showCloseButton?: boolean
57
+ }) {
58
+ return (
59
+ <SheetPortal>
60
+ <SheetOverlay />
61
+ <SheetPrimitive.Content
62
+ data-slot="sheet-content"
63
+ data-side={side}
64
+ className={cn(
65
+ "fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",
66
+ className
67
+ )}
68
+ {...props}
69
+ >
70
+ {children}
71
+ {showCloseButton && (
72
+ <SheetPrimitive.Close data-slot="sheet-close" asChild>
73
+ <Button
74
+ variant="ghost"
75
+ className="absolute top-3 right-3"
76
+ size="icon-sm"
77
+ >
78
+ <XIcon
79
+ />
80
+ <span className="sr-only">Close</span>
81
+ </Button>
82
+ </SheetPrimitive.Close>
83
+ )}
84
+ </SheetPrimitive.Content>
85
+ </SheetPortal>
86
+ )
87
+ }
88
+
89
+ function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
90
+ return (
91
+ <div
92
+ data-slot="sheet-header"
93
+ className={cn("flex flex-col gap-0.5 p-4", className)}
94
+ {...props}
95
+ />
96
+ )
97
+ }
98
+
99
+ function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
100
+ return (
101
+ <div
102
+ data-slot="sheet-footer"
103
+ className={cn("mt-auto flex flex-col gap-2 p-4", className)}
104
+ {...props}
105
+ />
106
+ )
107
+ }
108
+
109
+ function SheetTitle({
110
+ className,
111
+ ...props
112
+ }: React.ComponentProps<typeof SheetPrimitive.Title>) {
113
+ return (
114
+ <SheetPrimitive.Title
115
+ data-slot="sheet-title"
116
+ className={cn(
117
+ "font-heading text-base font-medium text-foreground",
118
+ className
119
+ )}
120
+ {...props}
121
+ />
122
+ )
123
+ }
124
+
125
+ function SheetDescription({
126
+ className,
127
+ ...props
128
+ }: React.ComponentProps<typeof SheetPrimitive.Description>) {
129
+ return (
130
+ <SheetPrimitive.Description
131
+ data-slot="sheet-description"
132
+ className={cn("text-sm text-muted-foreground", className)}
133
+ {...props}
134
+ />
135
+ )
136
+ }
137
+
138
+ export {
139
+ Sheet,
140
+ SheetTrigger,
141
+ SheetClose,
142
+ SheetContent,
143
+ SheetHeader,
144
+ SheetFooter,
145
+ SheetTitle,
146
+ SheetDescription,
147
+ }