larkup 0.1.14

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 (141) hide show
  1. package/.env +2 -0
  2. package/app/actions/vercel.ts +417 -0
  3. package/app/api/chat/route.ts +192 -0
  4. package/app/api/chat/status/route.ts +55 -0
  5. package/app/api/chat/suggestions/route.ts +115 -0
  6. package/app/api/config/route.ts +73 -0
  7. package/app/api/config/test/route.ts +67 -0
  8. package/app/api/config/test-embedding/route.ts +40 -0
  9. package/app/api/config/test-llm/route.ts +47 -0
  10. package/app/api/config/test-provider/route.ts +36 -0
  11. package/app/api/demo/route.ts +176 -0
  12. package/app/api/deploy/ssh/route.ts +340 -0
  13. package/app/api/documents/route.ts +90 -0
  14. package/app/api/firecrawl/local/route.ts +46 -0
  15. package/app/api/index/route.ts +113 -0
  16. package/app/api/jobs/[id]/route.ts +44 -0
  17. package/app/api/jobs/route.ts +116 -0
  18. package/app/api/parse-file/route.ts +39 -0
  19. package/app/api/search/google/route.ts +162 -0
  20. package/app/api/search/route.ts +29 -0
  21. package/app/api/server/download/route.ts +112 -0
  22. package/app/api/server/generate/route.ts +46 -0
  23. package/app/api/server/local/route.ts +42 -0
  24. package/app/api/servers/route.ts +137 -0
  25. package/app/api/vector-stores/install/route.ts +65 -0
  26. package/app/api/vector-stores/status/route.ts +26 -0
  27. package/app/chat/page.tsx +15 -0
  28. package/app/configure/page.tsx +53 -0
  29. package/app/data/page.tsx +15 -0
  30. package/app/demo/page.tsx +15 -0
  31. package/app/favicon.ico +0 -0
  32. package/app/globals.css +190 -0
  33. package/app/index-data/page.tsx +15 -0
  34. package/app/layout.tsx +51 -0
  35. package/app/page.tsx +34 -0
  36. package/app/server/page.tsx +22 -0
  37. package/app/simple/chat/page.tsx +17 -0
  38. package/app/simple/docs/page.tsx +21 -0
  39. package/app/simple/layout.tsx +9 -0
  40. package/app/simple/settings/page.tsx +627 -0
  41. package/app/template.tsx +16 -0
  42. package/app/themes.css +733 -0
  43. package/components/alerts/generic-alert.tsx +74 -0
  44. package/components/app-sidebar.tsx +187 -0
  45. package/components/app-topnav.tsx +195 -0
  46. package/components/chat/chat-settings-modal.tsx +209 -0
  47. package/components/chat/chat-workspace.tsx +348 -0
  48. package/components/chat/knowledge-base-result.tsx +97 -0
  49. package/components/chat/message-item.tsx +103 -0
  50. package/components/client-layout-wrapper.tsx +182 -0
  51. package/components/configure/configure-form.tsx +1683 -0
  52. package/components/configure/store-fields.tsx +152 -0
  53. package/components/data/corpus-panel.tsx +499 -0
  54. package/components/data/data-workspace.tsx +272 -0
  55. package/components/data/firecrawl-notice.tsx +236 -0
  56. package/components/data/jobs-panel.tsx +485 -0
  57. package/components/data/paste-panel.tsx +79 -0
  58. package/components/data/scrape-panel.tsx +964 -0
  59. package/components/data/upload-panel.tsx +714 -0
  60. package/components/demo/demo-workspace.tsx +419 -0
  61. package/components/global-settings.tsx +286 -0
  62. package/components/index/index-workspace.tsx +482 -0
  63. package/components/onboarding/simple-setup.tsx +702 -0
  64. package/components/onboarding/tech-setup.tsx +121 -0
  65. package/components/onboarding/welcome-screen.tsx +183 -0
  66. package/components/page-header.tsx +44 -0
  67. package/components/server/code-viewer.tsx +87 -0
  68. package/components/server/deploy-button.tsx +1390 -0
  69. package/components/server/server-workspace.tsx +392 -0
  70. package/components/simple/sdk-connect-dialog.tsx +201 -0
  71. package/components/simple/simple-index-button.tsx +83 -0
  72. package/components/simple/simple-sidebar.tsx +161 -0
  73. package/components/theme-customizer-provider.tsx +171 -0
  74. package/components/theme-switcher.tsx +445 -0
  75. package/components/ui/alert-dialog.tsx +187 -0
  76. package/components/ui/alert.tsx +76 -0
  77. package/components/ui/badge.tsx +52 -0
  78. package/components/ui/button.tsx +59 -0
  79. package/components/ui/card.tsx +103 -0
  80. package/components/ui/checkbox.tsx +28 -0
  81. package/components/ui/collapsible.tsx +21 -0
  82. package/components/ui/dialog.tsx +159 -0
  83. package/components/ui/dropdown-menu.tsx +281 -0
  84. package/components/ui/input.tsx +22 -0
  85. package/components/ui/label.tsx +20 -0
  86. package/components/ui/popover.tsx +90 -0
  87. package/components/ui/progress.tsx +83 -0
  88. package/components/ui/provider-icon.tsx +94 -0
  89. package/components/ui/scroll-area.tsx +55 -0
  90. package/components/ui/select.tsx +248 -0
  91. package/components/ui/separator.tsx +25 -0
  92. package/components/ui/sheet.tsx +138 -0
  93. package/components/ui/skeleton.tsx +13 -0
  94. package/components/ui/sonner.tsx +63 -0
  95. package/components/ui/switch.tsx +32 -0
  96. package/components/ui/table.tsx +116 -0
  97. package/components/ui/tabs.tsx +84 -0
  98. package/components/ui/textarea.tsx +18 -0
  99. package/components/ui/tooltip.tsx +66 -0
  100. package/components/workspace/delete-server-dialog.tsx +71 -0
  101. package/components/workspace/server-form-dialog.tsx +103 -0
  102. package/components/workspace/server-switcher.tsx +163 -0
  103. package/components/workspace/workspace-provider.tsx +177 -0
  104. package/components/workspace/workspace-top-bar.tsx +23 -0
  105. package/components.json +21 -0
  106. package/lib/error-formatter.ts +15 -0
  107. package/lib/utils.ts +6 -0
  108. package/next-env.d.ts +6 -0
  109. package/next.config.mjs +18 -0
  110. package/package.json +65 -0
  111. package/postcss.config.mjs +8 -0
  112. package/public/docker.png +0 -0
  113. package/public/favicon.ico +0 -0
  114. package/public/github.svg +3 -0
  115. package/public/hetzner.svg +1 -0
  116. package/public/icons/aws.svg +38 -0
  117. package/public/icons/azure.svg +1 -0
  118. package/public/icons/chroma.png +0 -0
  119. package/public/icons/cohere.svg +30 -0
  120. package/public/icons/digital-ocean.webp +0 -0
  121. package/public/icons/firecrawl2.png +0 -0
  122. package/public/icons/gcp.svg +1 -0
  123. package/public/icons/gemini.svg +1 -0
  124. package/public/icons/jina.svg +1 -0
  125. package/public/icons/lancedb2.png +0 -0
  126. package/public/icons/mistral.svg +469 -0
  127. package/public/icons/nomic.png +0 -0
  128. package/public/icons/openai.svg +1 -0
  129. package/public/icons/pgvector2.png +0 -0
  130. package/public/icons/pinecone.png +0 -0
  131. package/public/icons/qdrant.svg +35 -0
  132. package/public/icons/supabase.png +0 -0
  133. package/public/icons/vercel copy.svg +1 -0
  134. package/public/icons/vercel.svg +1 -0
  135. package/public/icons/voyage-light.png +0 -0
  136. package/public/icons/weaviate.webp +0 -0
  137. package/public/logo-light.png +0 -0
  138. package/public/logo.png +0 -0
  139. package/public/logo9.png +0 -0
  140. package/public/vercel.svg +1 -0
  141. package/tsconfig.json +33 -0
@@ -0,0 +1,248 @@
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import { Select as SelectPrimitive } from "@base-ui/react/select";
5
+
6
+ import { cn } from "@/lib/utils";
7
+ import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
8
+
9
+ const Select = SelectPrimitive.Root;
10
+
11
+ function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {
12
+ return (
13
+ <SelectPrimitive.Group
14
+ data-slot="select-group"
15
+ className={cn("scroll-my-1 p-1", className)}
16
+ {...props}
17
+ />
18
+ );
19
+ }
20
+
21
+ function SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {
22
+ return (
23
+ <SelectPrimitive.Value
24
+ data-slot="select-value"
25
+ className={cn("flex flex-1 text-left", className)}
26
+ {...props}
27
+ />
28
+ );
29
+ }
30
+
31
+ function SelectTrigger({
32
+ className,
33
+ size = "default",
34
+ children,
35
+ ...props
36
+ }: SelectPrimitive.Trigger.Props & {
37
+ size?: "sm" | "default";
38
+ }) {
39
+ return (
40
+ <SelectPrimitive.Trigger
41
+ data-slot="select-trigger"
42
+ data-size={size}
43
+ className={cn(
44
+ // layout
45
+ "flex w-fit items-center justify-between gap-2 rounded-lg border border-input bg-transparent",
46
+ "pr-3 pl-3 text-sm whitespace-nowrap select-none outline-none",
47
+ // transitions & hover
48
+ "transition-all duration-150",
49
+ "hover:border-foreground/15 hover:bg-accent/40",
50
+ // focus ring
51
+ "focus:border-primary/60 focus:ring-2 focus:ring-primary/15",
52
+ // data-open ring
53
+ "data-[state=open]:border-primary/60 data-[state=open]:ring-2 data-[state=open]:ring-primary/15",
54
+ // sizes
55
+ "data-[size=default]:h-9 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)]",
56
+ // value placeholder
57
+ "*: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",
58
+ // disabled / invalid
59
+ "disabled:cursor-not-allowed disabled:opacity-50",
60
+ "aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20",
61
+ "dark:bg-input/30 dark:hover:bg-input/50",
62
+ // svg
63
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
64
+ className,
65
+ )}
66
+ {...props}
67
+ >
68
+ {children}
69
+ <SelectPrimitive.Icon
70
+ render={
71
+ <ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground transition-transform duration-200 group-data-[state=open]:rotate-180" />
72
+ }
73
+ />
74
+ </SelectPrimitive.Trigger>
75
+ );
76
+ }
77
+
78
+ function SelectContent({
79
+ className,
80
+ children,
81
+ side = "bottom",
82
+ sideOffset = 6,
83
+ align = "center",
84
+ alignOffset = 0,
85
+ alignItemWithTrigger = true,
86
+ ...props
87
+ }: SelectPrimitive.Popup.Props &
88
+ Pick<
89
+ SelectPrimitive.Positioner.Props,
90
+ "align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger"
91
+ >) {
92
+ return (
93
+ <SelectPrimitive.Portal>
94
+ <SelectPrimitive.Positioner
95
+ side={side}
96
+ sideOffset={sideOffset}
97
+ align={align}
98
+ alignOffset={alignOffset}
99
+ alignItemWithTrigger={alignItemWithTrigger}
100
+ className="isolate z-50"
101
+ >
102
+ <SelectPrimitive.Popup
103
+ data-slot="select-content"
104
+ data-align-trigger={alignItemWithTrigger}
105
+ className={cn(
106
+ "relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-40",
107
+ "origin-(--transform-origin) overflow-x-hidden overflow-y-auto",
108
+ "rounded-xl bg-popover p-1 text-popover-foreground",
109
+ "shadow-lg ring-1 ring-foreground/8",
110
+ // animations
111
+ "duration-150",
112
+ "data-[align-trigger=true]:animate-none",
113
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
114
+ "data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2",
115
+ "data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
116
+ "data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",
117
+ "data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
118
+ className,
119
+ )}
120
+ {...props}
121
+ >
122
+ <SelectScrollUpButton />
123
+ <SelectPrimitive.List>{children}</SelectPrimitive.List>
124
+ <SelectScrollDownButton />
125
+ </SelectPrimitive.Popup>
126
+ </SelectPrimitive.Positioner>
127
+ </SelectPrimitive.Portal>
128
+ );
129
+ }
130
+
131
+ function SelectLabel({
132
+ className,
133
+ ...props
134
+ }: SelectPrimitive.GroupLabel.Props) {
135
+ return (
136
+ <SelectPrimitive.GroupLabel
137
+ data-slot="select-label"
138
+ className={cn(
139
+ "px-2 py-1.5 text-xs font-medium text-muted-foreground",
140
+ className,
141
+ )}
142
+ {...props}
143
+ />
144
+ );
145
+ }
146
+
147
+ function SelectItem({
148
+ className,
149
+ children,
150
+ ...props
151
+ }: SelectPrimitive.Item.Props) {
152
+ return (
153
+ <SelectPrimitive.Item
154
+ data-slot="select-item"
155
+ className={cn(
156
+ // base
157
+ "group relative flex w-full cursor-pointer items-center gap-2 rounded-md",
158
+ "py-2 pr-8 pl-2 text-sm outline-hidden select-none",
159
+ // transition — smooth bg + text colour shift
160
+ "transition-colors duration-150",
161
+ // hover / focus highlight
162
+ "hover:bg-accent hover:text-accent-foreground",
163
+ "focus:bg-accent focus:text-accent-foreground",
164
+ // highlighted (selected) state driven by BaseUI
165
+ "data-highlighted:bg-accent data-highlighted:text-accent-foreground",
166
+ // disabled
167
+ "data-disabled:pointer-events-none data-disabled:opacity-40",
168
+ // icon sizing
169
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
170
+ className,
171
+ )}
172
+ {...props}
173
+ >
174
+ <SelectPrimitive.ItemText className="flex flex-1 shrink-0 gap-2 items-center">
175
+ {children}
176
+ </SelectPrimitive.ItemText>
177
+ <SelectPrimitive.ItemIndicator
178
+ render={
179
+ <span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center" />
180
+ }
181
+ >
182
+ <CheckIcon className="pointer-events-none text-primary" />
183
+ </SelectPrimitive.ItemIndicator>
184
+ </SelectPrimitive.Item>
185
+ );
186
+ }
187
+
188
+ function SelectSeparator({
189
+ className,
190
+ ...props
191
+ }: SelectPrimitive.Separator.Props) {
192
+ return (
193
+ <SelectPrimitive.Separator
194
+ data-slot="select-separator"
195
+ className={cn("pointer-events-none -mx-1 my-1 h-px bg-border", className)}
196
+ {...props}
197
+ />
198
+ );
199
+ }
200
+
201
+ function SelectScrollUpButton({
202
+ className,
203
+ ...props
204
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {
205
+ return (
206
+ <SelectPrimitive.ScrollUpArrow
207
+ data-slot="select-scroll-up-button"
208
+ className={cn(
209
+ "top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
210
+ className,
211
+ )}
212
+ {...props}
213
+ >
214
+ <ChevronUpIcon />
215
+ </SelectPrimitive.ScrollUpArrow>
216
+ );
217
+ }
218
+
219
+ function SelectScrollDownButton({
220
+ className,
221
+ ...props
222
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {
223
+ return (
224
+ <SelectPrimitive.ScrollDownArrow
225
+ data-slot="select-scroll-down-button"
226
+ className={cn(
227
+ "bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
228
+ className,
229
+ )}
230
+ {...props}
231
+ >
232
+ <ChevronDownIcon />
233
+ </SelectPrimitive.ScrollDownArrow>
234
+ );
235
+ }
236
+
237
+ export {
238
+ Select,
239
+ SelectContent,
240
+ SelectGroup,
241
+ SelectItem,
242
+ SelectLabel,
243
+ SelectScrollDownButton,
244
+ SelectScrollUpButton,
245
+ SelectSeparator,
246
+ SelectTrigger,
247
+ SelectValue,
248
+ };
@@ -0,0 +1,25 @@
1
+ "use client"
2
+
3
+ import { Separator as SeparatorPrimitive } from "@base-ui/react/separator"
4
+
5
+ import { cn } from "@/lib/utils"
6
+
7
+ function Separator({
8
+ className,
9
+ orientation = "horizontal",
10
+ ...props
11
+ }: SeparatorPrimitive.Props) {
12
+ return (
13
+ <SeparatorPrimitive
14
+ data-slot="separator"
15
+ orientation={orientation}
16
+ className={cn(
17
+ "shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
18
+ className
19
+ )}
20
+ {...props}
21
+ />
22
+ )
23
+ }
24
+
25
+ export { Separator }
@@ -0,0 +1,138 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Dialog as SheetPrimitive } from "@base-ui/react/dialog"
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 }: SheetPrimitive.Root.Props) {
11
+ return <SheetPrimitive.Root data-slot="sheet" {...props} />
12
+ }
13
+
14
+ function SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props) {
15
+ return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />
16
+ }
17
+
18
+ function SheetClose({ ...props }: SheetPrimitive.Close.Props) {
19
+ return <SheetPrimitive.Close data-slot="sheet-close" {...props} />
20
+ }
21
+
22
+ function SheetPortal({ ...props }: SheetPrimitive.Portal.Props) {
23
+ return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />
24
+ }
25
+
26
+ function SheetOverlay({ className, ...props }: SheetPrimitive.Backdrop.Props) {
27
+ return (
28
+ <SheetPrimitive.Backdrop
29
+ data-slot="sheet-overlay"
30
+ className={cn(
31
+ "fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",
32
+ className
33
+ )}
34
+ {...props}
35
+ />
36
+ )
37
+ }
38
+
39
+ function SheetContent({
40
+ className,
41
+ children,
42
+ side = "right",
43
+ showCloseButton = true,
44
+ ...props
45
+ }: SheetPrimitive.Popup.Props & {
46
+ side?: "top" | "right" | "bottom" | "left"
47
+ showCloseButton?: boolean
48
+ }) {
49
+ return (
50
+ <SheetPortal>
51
+ <SheetOverlay />
52
+ <SheetPrimitive.Popup
53
+ data-slot="sheet-content"
54
+ data-side={side}
55
+ className={cn(
56
+ "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-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] 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=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] 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=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",
57
+ className
58
+ )}
59
+ {...props}
60
+ >
61
+ {children}
62
+ {showCloseButton && (
63
+ <SheetPrimitive.Close
64
+ data-slot="sheet-close"
65
+ render={
66
+ <Button
67
+ variant="ghost"
68
+ className="absolute top-3 right-3"
69
+ size="icon-sm"
70
+ />
71
+ }
72
+ >
73
+ <XIcon
74
+ />
75
+ <span className="sr-only">Close</span>
76
+ </SheetPrimitive.Close>
77
+ )}
78
+ </SheetPrimitive.Popup>
79
+ </SheetPortal>
80
+ )
81
+ }
82
+
83
+ function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
84
+ return (
85
+ <div
86
+ data-slot="sheet-header"
87
+ className={cn("flex flex-col gap-0.5 p-4", className)}
88
+ {...props}
89
+ />
90
+ )
91
+ }
92
+
93
+ function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
94
+ return (
95
+ <div
96
+ data-slot="sheet-footer"
97
+ className={cn("mt-auto flex flex-col gap-2 p-4", className)}
98
+ {...props}
99
+ />
100
+ )
101
+ }
102
+
103
+ function SheetTitle({ className, ...props }: SheetPrimitive.Title.Props) {
104
+ return (
105
+ <SheetPrimitive.Title
106
+ data-slot="sheet-title"
107
+ className={cn(
108
+ "font-heading text-base font-medium text-foreground",
109
+ className
110
+ )}
111
+ {...props}
112
+ />
113
+ )
114
+ }
115
+
116
+ function SheetDescription({
117
+ className,
118
+ ...props
119
+ }: SheetPrimitive.Description.Props) {
120
+ return (
121
+ <SheetPrimitive.Description
122
+ data-slot="sheet-description"
123
+ className={cn("text-sm text-muted-foreground", className)}
124
+ {...props}
125
+ />
126
+ )
127
+ }
128
+
129
+ export {
130
+ Sheet,
131
+ SheetTrigger,
132
+ SheetClose,
133
+ SheetContent,
134
+ SheetHeader,
135
+ SheetFooter,
136
+ SheetTitle,
137
+ SheetDescription,
138
+ }
@@ -0,0 +1,13 @@
1
+ import { cn } from "@/lib/utils"
2
+
3
+ function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
4
+ return (
5
+ <div
6
+ data-slot="skeleton"
7
+ className={cn("animate-pulse rounded-md bg-muted", className)}
8
+ {...props}
9
+ />
10
+ )
11
+ }
12
+
13
+ export { Skeleton }
@@ -0,0 +1,63 @@
1
+ "use client";
2
+
3
+ import { useTheme } from "next-themes";
4
+ import { Toaster as Sonner, type ToasterProps } from "sonner";
5
+ import {
6
+ CircleCheckIcon,
7
+ InfoIcon,
8
+ CircleAlertIcon,
9
+ CircleXIcon,
10
+ Loader2Icon,
11
+ } from "lucide-react";
12
+
13
+ const Toaster = ({ ...props }: ToasterProps) => {
14
+ const { theme = "system" } = useTheme();
15
+
16
+ return (
17
+ <Sonner
18
+ theme={theme as ToasterProps["theme"]}
19
+ className="toaster group z-9999999! "
20
+ icons={{
21
+ success: (
22
+ <CircleCheckIcon className="size-5 text-white" fill="#10b981" />
23
+ ),
24
+ info: <InfoIcon className="size-5 text-white" fill="#3b82f6" />,
25
+ warning: (
26
+ <CircleAlertIcon className="size-5 text-white" fill="#f59e0b" />
27
+ ),
28
+ error: <CircleXIcon className="size-5 text-white" fill="#ef4444" />,
29
+ loading: (
30
+ <Loader2Icon className="size-5 animate-spin text-muted-foreground" />
31
+ ),
32
+ }}
33
+ style={
34
+ {
35
+ "--normal-bg": "var(--popover)",
36
+ "--normal-text": "var(--popover-foreground)",
37
+ "--normal-border": "var(--border)",
38
+ "--border-radius": "var(--radius)",
39
+ zIndex: 999999,
40
+ } as React.CSSProperties
41
+ }
42
+ toastOptions={{
43
+ classNames: {
44
+ toast:
45
+ "group toast items-start group-[.toaster]:!bg-[#F9F9F7] dark:group-[.toaster]:!bg-zinc-900 group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
46
+ icon: "mt-0.5",
47
+ description: "group-[.toast]:text-muted-foreground",
48
+ actionButton:
49
+ "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
50
+ cancelButton:
51
+ "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
52
+ success: "group-[.toaster]:!bg-[#F9F9F7] dark:group-[.toaster]:!bg-zinc-900",
53
+ error: "group-[.toaster]:!bg-[#F9F9F7] dark:group-[.toaster]:!bg-zinc-900",
54
+ warning: "group-[.toaster]:!bg-[#F9F9F7] dark:group-[.toaster]:!bg-zinc-900",
55
+ info: "group-[.toaster]:!bg-[#F9F9F7] dark:group-[.toaster]:!bg-zinc-900",
56
+ },
57
+ }}
58
+ {...props}
59
+ />
60
+ );
61
+ };
62
+
63
+ export { Toaster };
@@ -0,0 +1,32 @@
1
+ "use client";
2
+
3
+ import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
4
+
5
+ import { cn } from "@/lib/utils";
6
+
7
+ function Switch({
8
+ className,
9
+ size = "default",
10
+ ...props
11
+ }: SwitchPrimitive.Root.Props & {
12
+ size?: "sm" | "default";
13
+ }) {
14
+ return (
15
+ <SwitchPrimitive.Root
16
+ data-slot="switch"
17
+ data-size={size}
18
+ className={cn(
19
+ "peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",
20
+ className,
21
+ )}
22
+ {...props}
23
+ >
24
+ <SwitchPrimitive.Thumb
25
+ data-slot="switch-thumb"
26
+ className="pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
27
+ />
28
+ </SwitchPrimitive.Root>
29
+ );
30
+ }
31
+
32
+ export { Switch };
@@ -0,0 +1,116 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+
5
+ import { cn } from "@/lib/utils"
6
+
7
+ function Table({ className, ...props }: React.ComponentProps<"table">) {
8
+ return (
9
+ <div
10
+ data-slot="table-container"
11
+ className="relative w-full overflow-x-auto"
12
+ >
13
+ <table
14
+ data-slot="table"
15
+ className={cn("w-full caption-bottom text-sm", className)}
16
+ {...props}
17
+ />
18
+ </div>
19
+ )
20
+ }
21
+
22
+ function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
23
+ return (
24
+ <thead
25
+ data-slot="table-header"
26
+ className={cn("[&_tr]:border-b", className)}
27
+ {...props}
28
+ />
29
+ )
30
+ }
31
+
32
+ function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
33
+ return (
34
+ <tbody
35
+ data-slot="table-body"
36
+ className={cn("[&_tr:last-child]:border-0", className)}
37
+ {...props}
38
+ />
39
+ )
40
+ }
41
+
42
+ function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
43
+ return (
44
+ <tfoot
45
+ data-slot="table-footer"
46
+ className={cn(
47
+ "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
48
+ className
49
+ )}
50
+ {...props}
51
+ />
52
+ )
53
+ }
54
+
55
+ function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
56
+ return (
57
+ <tr
58
+ data-slot="table-row"
59
+ className={cn(
60
+ "border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",
61
+ className
62
+ )}
63
+ {...props}
64
+ />
65
+ )
66
+ }
67
+
68
+ function TableHead({ className, ...props }: React.ComponentProps<"th">) {
69
+ return (
70
+ <th
71
+ data-slot="table-head"
72
+ className={cn(
73
+ "h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
74
+ className
75
+ )}
76
+ {...props}
77
+ />
78
+ )
79
+ }
80
+
81
+ function TableCell({ className, ...props }: React.ComponentProps<"td">) {
82
+ return (
83
+ <td
84
+ data-slot="table-cell"
85
+ className={cn(
86
+ "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
87
+ className
88
+ )}
89
+ {...props}
90
+ />
91
+ )
92
+ }
93
+
94
+ function TableCaption({
95
+ className,
96
+ ...props
97
+ }: React.ComponentProps<"caption">) {
98
+ return (
99
+ <caption
100
+ data-slot="table-caption"
101
+ className={cn("mt-4 text-sm text-muted-foreground", className)}
102
+ {...props}
103
+ />
104
+ )
105
+ }
106
+
107
+ export {
108
+ Table,
109
+ TableHeader,
110
+ TableBody,
111
+ TableFooter,
112
+ TableHead,
113
+ TableRow,
114
+ TableCell,
115
+ TableCaption,
116
+ }