@coze-arch/cli 0.0.1-alpha.f74941 → 0.0.1-beta.6

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 (112) hide show
  1. package/lib/__templates__/expo/.cozeproj/scripts/deploy_run.sh +1 -1
  2. package/lib/__templates__/expo/app.json +1 -1
  3. package/lib/__templates__/expo/client/index.js +2 -1
  4. package/lib/__templates__/expo/client/scripts/install-missing-deps.js +36 -12
  5. package/lib/__templates__/expo/metro.config.js +15 -15
  6. package/lib/__templates__/expo/package.json +14 -5
  7. package/lib/__templates__/expo/pnpm-lock.yaml +335 -4
  8. package/lib/__templates__/nextjs/.babelrc +15 -0
  9. package/lib/__templates__/nextjs/README.md +341 -19
  10. package/lib/__templates__/nextjs/components.json +21 -0
  11. package/lib/__templates__/nextjs/package.json +48 -1
  12. package/lib/__templates__/nextjs/pnpm-lock.yaml +6399 -1356
  13. package/lib/__templates__/nextjs/scripts/dev.sh +2 -1
  14. package/lib/__templates__/nextjs/server.mjs +50 -0
  15. package/lib/__templates__/nextjs/src/app/globals.css +99 -8
  16. package/lib/__templates__/nextjs/src/app/layout.tsx +4 -0
  17. package/lib/__templates__/nextjs/src/components/ui/accordion.tsx +66 -0
  18. package/lib/__templates__/nextjs/src/components/ui/alert-dialog.tsx +157 -0
  19. package/lib/__templates__/nextjs/src/components/ui/alert.tsx +66 -0
  20. package/lib/__templates__/nextjs/src/components/ui/aspect-ratio.tsx +11 -0
  21. package/lib/__templates__/nextjs/src/components/ui/avatar.tsx +53 -0
  22. package/lib/__templates__/nextjs/src/components/ui/badge.tsx +46 -0
  23. package/lib/__templates__/nextjs/src/components/ui/breadcrumb.tsx +109 -0
  24. package/lib/__templates__/nextjs/src/components/ui/button-group.tsx +83 -0
  25. package/lib/__templates__/nextjs/src/components/ui/button.tsx +62 -0
  26. package/lib/__templates__/nextjs/src/components/ui/calendar.tsx +220 -0
  27. package/lib/__templates__/nextjs/src/components/ui/card.tsx +92 -0
  28. package/lib/__templates__/nextjs/src/components/ui/carousel.tsx +241 -0
  29. package/lib/__templates__/nextjs/src/components/ui/chart.tsx +357 -0
  30. package/lib/__templates__/nextjs/src/components/ui/checkbox.tsx +32 -0
  31. package/lib/__templates__/nextjs/src/components/ui/collapsible.tsx +33 -0
  32. package/lib/__templates__/nextjs/src/components/ui/command.tsx +184 -0
  33. package/lib/__templates__/nextjs/src/components/ui/context-menu.tsx +252 -0
  34. package/lib/__templates__/nextjs/src/components/ui/dialog.tsx +143 -0
  35. package/lib/__templates__/nextjs/src/components/ui/drawer.tsx +135 -0
  36. package/lib/__templates__/nextjs/src/components/ui/dropdown-menu.tsx +257 -0
  37. package/lib/__templates__/nextjs/src/components/ui/empty.tsx +104 -0
  38. package/lib/__templates__/nextjs/src/components/ui/field.tsx +248 -0
  39. package/lib/__templates__/nextjs/src/components/ui/form.tsx +167 -0
  40. package/lib/__templates__/nextjs/src/components/ui/hover-card.tsx +44 -0
  41. package/lib/__templates__/nextjs/src/components/ui/input-group.tsx +170 -0
  42. package/lib/__templates__/nextjs/src/components/ui/input-otp.tsx +77 -0
  43. package/lib/__templates__/nextjs/src/components/ui/input.tsx +21 -0
  44. package/lib/__templates__/nextjs/src/components/ui/item.tsx +193 -0
  45. package/lib/__templates__/nextjs/src/components/ui/kbd.tsx +28 -0
  46. package/lib/__templates__/nextjs/src/components/ui/label.tsx +24 -0
  47. package/lib/__templates__/nextjs/src/components/ui/menubar.tsx +276 -0
  48. package/lib/__templates__/nextjs/src/components/ui/navigation-menu.tsx +168 -0
  49. package/lib/__templates__/nextjs/src/components/ui/pagination.tsx +127 -0
  50. package/lib/__templates__/nextjs/src/components/ui/popover.tsx +48 -0
  51. package/lib/__templates__/nextjs/src/components/ui/progress.tsx +31 -0
  52. package/lib/__templates__/nextjs/src/components/ui/radio-group.tsx +45 -0
  53. package/lib/__templates__/nextjs/src/components/ui/resizable.tsx +56 -0
  54. package/lib/__templates__/nextjs/src/components/ui/scroll-area.tsx +58 -0
  55. package/lib/__templates__/nextjs/src/components/ui/select.tsx +190 -0
  56. package/lib/__templates__/nextjs/src/components/ui/separator.tsx +28 -0
  57. package/lib/__templates__/nextjs/src/components/ui/sheet.tsx +139 -0
  58. package/lib/__templates__/nextjs/src/components/ui/sidebar.tsx +726 -0
  59. package/lib/__templates__/nextjs/src/components/ui/skeleton.tsx +13 -0
  60. package/lib/__templates__/nextjs/src/components/ui/slider.tsx +63 -0
  61. package/lib/__templates__/nextjs/src/components/ui/sonner.tsx +40 -0
  62. package/lib/__templates__/nextjs/src/components/ui/spinner.tsx +16 -0
  63. package/lib/__templates__/nextjs/src/components/ui/switch.tsx +31 -0
  64. package/lib/__templates__/nextjs/src/components/ui/table.tsx +116 -0
  65. package/lib/__templates__/nextjs/src/components/ui/tabs.tsx +66 -0
  66. package/lib/__templates__/nextjs/src/components/ui/textarea.tsx +18 -0
  67. package/lib/__templates__/nextjs/src/components/ui/toggle-group.tsx +83 -0
  68. package/lib/__templates__/nextjs/src/components/ui/toggle.tsx +47 -0
  69. package/lib/__templates__/nextjs/src/components/ui/tooltip.tsx +61 -0
  70. package/lib/__templates__/nextjs/src/hooks/use-mobile.ts +19 -0
  71. package/lib/__templates__/nextjs/src/lib/utils.ts +6 -0
  72. package/lib/__templates__/nextjs/template.config.js +1 -1
  73. package/lib/__templates__/templates.json +0 -38
  74. package/lib/__templates__/vite/template.config.js +1 -1
  75. package/lib/cli.js +19 -2
  76. package/package.json +2 -2
  77. package/lib/__templates__/react-rsbuild/.coze +0 -11
  78. package/lib/__templates__/react-rsbuild/.vscode/settings.json +0 -121
  79. package/lib/__templates__/react-rsbuild/README.md +0 -61
  80. package/lib/__templates__/react-rsbuild/_gitignore +0 -97
  81. package/lib/__templates__/react-rsbuild/_npmrc +0 -22
  82. package/lib/__templates__/react-rsbuild/package.json +0 -31
  83. package/lib/__templates__/react-rsbuild/pnpm-lock.yaml +0 -997
  84. package/lib/__templates__/react-rsbuild/rsbuild.config.ts +0 -13
  85. package/lib/__templates__/react-rsbuild/scripts/build.sh +0 -14
  86. package/lib/__templates__/react-rsbuild/scripts/dev.sh +0 -51
  87. package/lib/__templates__/react-rsbuild/scripts/start.sh +0 -15
  88. package/lib/__templates__/react-rsbuild/src/App.tsx +0 -60
  89. package/lib/__templates__/react-rsbuild/src/index.css +0 -21
  90. package/lib/__templates__/react-rsbuild/src/index.html +0 -12
  91. package/lib/__templates__/react-rsbuild/src/index.tsx +0 -16
  92. package/lib/__templates__/react-rsbuild/tailwind.config.js +0 -9
  93. package/lib/__templates__/react-rsbuild/template.config.js +0 -54
  94. package/lib/__templates__/react-rsbuild/tsconfig.json +0 -17
  95. package/lib/__templates__/rsbuild/.coze +0 -11
  96. package/lib/__templates__/rsbuild/.vscode/settings.json +0 -7
  97. package/lib/__templates__/rsbuild/README.md +0 -61
  98. package/lib/__templates__/rsbuild/_gitignore +0 -97
  99. package/lib/__templates__/rsbuild/_npmrc +0 -22
  100. package/lib/__templates__/rsbuild/package.json +0 -24
  101. package/lib/__templates__/rsbuild/pnpm-lock.yaml +0 -888
  102. package/lib/__templates__/rsbuild/rsbuild.config.ts +0 -12
  103. package/lib/__templates__/rsbuild/scripts/build.sh +0 -14
  104. package/lib/__templates__/rsbuild/scripts/dev.sh +0 -51
  105. package/lib/__templates__/rsbuild/scripts/start.sh +0 -15
  106. package/lib/__templates__/rsbuild/src/index.css +0 -21
  107. package/lib/__templates__/rsbuild/src/index.html +0 -12
  108. package/lib/__templates__/rsbuild/src/index.ts +0 -5
  109. package/lib/__templates__/rsbuild/src/main.ts +0 -65
  110. package/lib/__templates__/rsbuild/tailwind.config.js +0 -9
  111. package/lib/__templates__/rsbuild/template.config.js +0 -56
  112. package/lib/__templates__/rsbuild/tsconfig.json +0 -16
@@ -0,0 +1,45 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"
5
+ import { CircleIcon } from "lucide-react"
6
+
7
+ import { cn } from "@/lib/utils"
8
+
9
+ function RadioGroup({
10
+ className,
11
+ ...props
12
+ }: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {
13
+ return (
14
+ <RadioGroupPrimitive.Root
15
+ data-slot="radio-group"
16
+ className={cn("grid gap-3", className)}
17
+ {...props}
18
+ />
19
+ )
20
+ }
21
+
22
+ function RadioGroupItem({
23
+ className,
24
+ ...props
25
+ }: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {
26
+ return (
27
+ <RadioGroupPrimitive.Item
28
+ data-slot="radio-group-item"
29
+ className={cn(
30
+ "border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
31
+ className
32
+ )}
33
+ {...props}
34
+ >
35
+ <RadioGroupPrimitive.Indicator
36
+ data-slot="radio-group-indicator"
37
+ className="relative flex items-center justify-center"
38
+ >
39
+ <CircleIcon className="fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" />
40
+ </RadioGroupPrimitive.Indicator>
41
+ </RadioGroupPrimitive.Item>
42
+ )
43
+ }
44
+
45
+ export { RadioGroup, RadioGroupItem }
@@ -0,0 +1,56 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { GripVerticalIcon } from "lucide-react"
5
+ import * as ResizablePrimitive from "react-resizable-panels"
6
+
7
+ import { cn } from "@/lib/utils"
8
+
9
+ function ResizablePanelGroup({
10
+ className,
11
+ ...props
12
+ }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {
13
+ return (
14
+ <ResizablePrimitive.PanelGroup
15
+ data-slot="resizable-panel-group"
16
+ className={cn(
17
+ "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
18
+ className
19
+ )}
20
+ {...props}
21
+ />
22
+ )
23
+ }
24
+
25
+ function ResizablePanel({
26
+ ...props
27
+ }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {
28
+ return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />
29
+ }
30
+
31
+ function ResizableHandle({
32
+ withHandle,
33
+ className,
34
+ ...props
35
+ }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
36
+ withHandle?: boolean
37
+ }) {
38
+ return (
39
+ <ResizablePrimitive.PanelResizeHandle
40
+ data-slot="resizable-handle"
41
+ className={cn(
42
+ "bg-border focus-visible:ring-ring relative flex w-px items-center justify-center 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-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
43
+ className
44
+ )}
45
+ {...props}
46
+ >
47
+ {withHandle && (
48
+ <div className="bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border">
49
+ <GripVerticalIcon className="size-2.5" />
50
+ </div>
51
+ )}
52
+ </ResizablePrimitive.PanelResizeHandle>
53
+ )
54
+ }
55
+
56
+ export { ResizablePanelGroup, ResizablePanel, ResizableHandle }
@@ -0,0 +1,58 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"
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="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] 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
+ orientation={orientation}
40
+ className={cn(
41
+ "flex touch-none p-px transition-colors select-none",
42
+ orientation === "vertical" &&
43
+ "h-full w-2.5 border-l border-l-transparent",
44
+ orientation === "horizontal" &&
45
+ "h-2.5 flex-col border-t border-t-transparent",
46
+ className
47
+ )}
48
+ {...props}
49
+ >
50
+ <ScrollAreaPrimitive.ScrollAreaThumb
51
+ data-slot="scroll-area-thumb"
52
+ className="bg-border relative flex-1 rounded-full"
53
+ />
54
+ </ScrollAreaPrimitive.ScrollAreaScrollbar>
55
+ )
56
+ }
57
+
58
+ export { ScrollArea, ScrollBar }
@@ -0,0 +1,190 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import * as SelectPrimitive from "@radix-ui/react-select"
5
+ import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
6
+
7
+ import { cn } from "@/lib/utils"
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
+ ...props
17
+ }: React.ComponentProps<typeof SelectPrimitive.Group>) {
18
+ return <SelectPrimitive.Group data-slot="select-group" {...props} />
19
+ }
20
+
21
+ function SelectValue({
22
+ ...props
23
+ }: React.ComponentProps<typeof SelectPrimitive.Value>) {
24
+ return <SelectPrimitive.Value data-slot="select-value" {...props} />
25
+ }
26
+
27
+ function SelectTrigger({
28
+ className,
29
+ size = "default",
30
+ children,
31
+ ...props
32
+ }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
33
+ size?: "sm" | "default"
34
+ }) {
35
+ return (
36
+ <SelectPrimitive.Trigger
37
+ data-slot="select-trigger"
38
+ data-size={size}
39
+ className={cn(
40
+ "border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
41
+ className
42
+ )}
43
+ {...props}
44
+ >
45
+ {children}
46
+ <SelectPrimitive.Icon asChild>
47
+ <ChevronDownIcon className="size-4 opacity-50" />
48
+ </SelectPrimitive.Icon>
49
+ </SelectPrimitive.Trigger>
50
+ )
51
+ }
52
+
53
+ function SelectContent({
54
+ className,
55
+ children,
56
+ position = "item-aligned",
57
+ align = "center",
58
+ ...props
59
+ }: React.ComponentProps<typeof SelectPrimitive.Content>) {
60
+ return (
61
+ <SelectPrimitive.Portal>
62
+ <SelectPrimitive.Content
63
+ data-slot="select-content"
64
+ className={cn(
65
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
66
+ position === "popper" &&
67
+ "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
68
+ className
69
+ )}
70
+ position={position}
71
+ align={align}
72
+ {...props}
73
+ >
74
+ <SelectScrollUpButton />
75
+ <SelectPrimitive.Viewport
76
+ className={cn(
77
+ "p-1",
78
+ position === "popper" &&
79
+ "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
80
+ )}
81
+ >
82
+ {children}
83
+ </SelectPrimitive.Viewport>
84
+ <SelectScrollDownButton />
85
+ </SelectPrimitive.Content>
86
+ </SelectPrimitive.Portal>
87
+ )
88
+ }
89
+
90
+ function SelectLabel({
91
+ className,
92
+ ...props
93
+ }: React.ComponentProps<typeof SelectPrimitive.Label>) {
94
+ return (
95
+ <SelectPrimitive.Label
96
+ data-slot="select-label"
97
+ className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
98
+ {...props}
99
+ />
100
+ )
101
+ }
102
+
103
+ function SelectItem({
104
+ className,
105
+ children,
106
+ ...props
107
+ }: React.ComponentProps<typeof SelectPrimitive.Item>) {
108
+ return (
109
+ <SelectPrimitive.Item
110
+ data-slot="select-item"
111
+ className={cn(
112
+ "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none 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",
113
+ className
114
+ )}
115
+ {...props}
116
+ >
117
+ <span
118
+ data-slot="select-item-indicator"
119
+ className="absolute right-2 flex size-3.5 items-center justify-center"
120
+ >
121
+ <SelectPrimitive.ItemIndicator>
122
+ <CheckIcon className="size-4" />
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("bg-border pointer-events-none -mx-1 my-1 h-px", 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
+ "flex cursor-default items-center justify-center py-1",
152
+ className
153
+ )}
154
+ {...props}
155
+ >
156
+ <ChevronUpIcon className="size-4" />
157
+ </SelectPrimitive.ScrollUpButton>
158
+ )
159
+ }
160
+
161
+ function SelectScrollDownButton({
162
+ className,
163
+ ...props
164
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
165
+ return (
166
+ <SelectPrimitive.ScrollDownButton
167
+ data-slot="select-scroll-down-button"
168
+ className={cn(
169
+ "flex cursor-default items-center justify-center py-1",
170
+ className
171
+ )}
172
+ {...props}
173
+ >
174
+ <ChevronDownIcon className="size-4" />
175
+ </SelectPrimitive.ScrollDownButton>
176
+ )
177
+ }
178
+
179
+ export {
180
+ Select,
181
+ SelectContent,
182
+ SelectGroup,
183
+ SelectItem,
184
+ SelectLabel,
185
+ SelectScrollDownButton,
186
+ SelectScrollUpButton,
187
+ SelectSeparator,
188
+ SelectTrigger,
189
+ SelectValue,
190
+ }
@@ -0,0 +1,28 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import * as SeparatorPrimitive from "@radix-ui/react-separator"
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
+ "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
21
+ className
22
+ )}
23
+ {...props}
24
+ />
25
+ )
26
+ }
27
+
28
+ export { Separator }
@@ -0,0 +1,139 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import * as SheetPrimitive from "@radix-ui/react-dialog"
5
+ import { XIcon } from "lucide-react"
6
+
7
+ import { cn } from "@/lib/utils"
8
+
9
+ function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
10
+ return <SheetPrimitive.Root data-slot="sheet" {...props} />
11
+ }
12
+
13
+ function SheetTrigger({
14
+ ...props
15
+ }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {
16
+ return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />
17
+ }
18
+
19
+ function SheetClose({
20
+ ...props
21
+ }: React.ComponentProps<typeof SheetPrimitive.Close>) {
22
+ return <SheetPrimitive.Close data-slot="sheet-close" {...props} />
23
+ }
24
+
25
+ function SheetPortal({
26
+ ...props
27
+ }: React.ComponentProps<typeof SheetPrimitive.Portal>) {
28
+ return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />
29
+ }
30
+
31
+ function SheetOverlay({
32
+ className,
33
+ ...props
34
+ }: React.ComponentProps<typeof SheetPrimitive.Overlay>) {
35
+ return (
36
+ <SheetPrimitive.Overlay
37
+ data-slot="sheet-overlay"
38
+ className={cn(
39
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
40
+ className
41
+ )}
42
+ {...props}
43
+ />
44
+ )
45
+ }
46
+
47
+ function SheetContent({
48
+ className,
49
+ children,
50
+ side = "right",
51
+ ...props
52
+ }: React.ComponentProps<typeof SheetPrimitive.Content> & {
53
+ side?: "top" | "right" | "bottom" | "left"
54
+ }) {
55
+ return (
56
+ <SheetPortal>
57
+ <SheetOverlay />
58
+ <SheetPrimitive.Content
59
+ data-slot="sheet-content"
60
+ className={cn(
61
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
62
+ side === "right" &&
63
+ "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
64
+ side === "left" &&
65
+ "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
66
+ side === "top" &&
67
+ "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
68
+ side === "bottom" &&
69
+ "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
70
+ className
71
+ )}
72
+ {...props}
73
+ >
74
+ {children}
75
+ <SheetPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none">
76
+ <XIcon className="size-4" />
77
+ <span className="sr-only">Close</span>
78
+ </SheetPrimitive.Close>
79
+ </SheetPrimitive.Content>
80
+ </SheetPortal>
81
+ )
82
+ }
83
+
84
+ function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
85
+ return (
86
+ <div
87
+ data-slot="sheet-header"
88
+ className={cn("flex flex-col gap-1.5 p-4", className)}
89
+ {...props}
90
+ />
91
+ )
92
+ }
93
+
94
+ function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
95
+ return (
96
+ <div
97
+ data-slot="sheet-footer"
98
+ className={cn("mt-auto flex flex-col gap-2 p-4", className)}
99
+ {...props}
100
+ />
101
+ )
102
+ }
103
+
104
+ function SheetTitle({
105
+ className,
106
+ ...props
107
+ }: React.ComponentProps<typeof SheetPrimitive.Title>) {
108
+ return (
109
+ <SheetPrimitive.Title
110
+ data-slot="sheet-title"
111
+ className={cn("text-foreground font-semibold", className)}
112
+ {...props}
113
+ />
114
+ )
115
+ }
116
+
117
+ function SheetDescription({
118
+ className,
119
+ ...props
120
+ }: React.ComponentProps<typeof SheetPrimitive.Description>) {
121
+ return (
122
+ <SheetPrimitive.Description
123
+ data-slot="sheet-description"
124
+ className={cn("text-muted-foreground text-sm", className)}
125
+ {...props}
126
+ />
127
+ )
128
+ }
129
+
130
+ export {
131
+ Sheet,
132
+ SheetTrigger,
133
+ SheetClose,
134
+ SheetContent,
135
+ SheetHeader,
136
+ SheetFooter,
137
+ SheetTitle,
138
+ SheetDescription,
139
+ }