Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
feat(ui): add 15 shadcn components via npx shadcn add
trohitg8bade7116748
diff --git a/client/package.json b/client/package.jsonindex 93b37b0e..8e7c6e68 100644--- a/client/package.json+++ b/client/package.json@@ -39,6 +39,7 @@"globals": "^16.3.0","idb-keyval": "^6","lucide-react": "^1.8.0",+ "next-themes": "^0.4.6","postcss": "^8.5.6","prismjs": "^1.30.0","qrcode.react": "^4.2.0",diff --git a/client/src/App.tsx b/client/src/App.tsxindex 01146a5b..00cf21bc 100644--- a/client/src/App.tsx+++ b/client/src/App.tsx@@ -4,7 +4,7 @@ import Dashboard from './Dashboard';import ProtectedRoute from './components/auth/ProtectedRoute';import { lightTheme, darkTheme } from './config/antdTheme';import { useTheme } from './contexts/ThemeContext';-import { Toaster } from 'sonner';+import { Toaster } from '@/components/ui/sonner';const App: React.FC = () => {const { isDarkMode } = useTheme();@@ -21,7 +21,7 @@ const App: React.FC = () => {<Dashboard /></div></ProtectedRoute>- <Toaster theme={isDarkMode ? 'dark' : 'light'} position="top-right" richColors closeButton />+ <Toaster position="top-right" richColors closeButton /></ConfigProvider>);}diff --git a/client/src/components/ui/alert.tsx b/client/src/components/ui/alert.tsxnew file mode 100644index 00000000..1fe3176d--- /dev/null+++ b/client/src/components/ui/alert.tsx@@ -0,0 +1,76 @@+import * as React from "react"+import { cva, type VariantProps } from "class-variance-authority"++import { cn } from "@/lib/utils"++const alertVariants = cva(+ "group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",+ {+ variants: {+ variant: {+ default: "bg-card text-card-foreground",+ destructive:+ "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current",+ },+ },+ defaultVariants: {+ variant: "default",+ },+ }+)++function Alert({+ className,+ variant,+ ...props+}: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {+ return (+ <div+ data-slot="alert"+ role="alert"+ className={cn(alertVariants({ variant }), className)}+ {...props}+ />+ )+}++function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="alert-title"+ className={cn(+ "font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",+ className+ )}+ {...props}+ />+ )+}++function AlertDescription({+ className,+ ...props+}: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="alert-description"+ className={cn(+ "text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",+ className+ )}+ {...props}+ />+ )+}++function AlertAction({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="alert-action"+ className={cn("absolute top-2 right-2", className)}+ {...props}+ />+ )+}++export { Alert, AlertTitle, AlertDescription, AlertAction }diff --git a/client/src/components/ui/badge.tsx b/client/src/components/ui/badge.tsxnew file mode 100644index 00000000..cacff11d--- /dev/null+++ b/client/src/components/ui/badge.tsx@@ -0,0 +1,49 @@+import * as React from "react"+import { cva, type VariantProps } from "class-variance-authority"+import { Slot } from "radix-ui"++import { cn } from "@/lib/utils"++const badgeVariants = cva(+ "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",+ {+ variants: {+ variant: {+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",+ secondary:+ "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",+ destructive:+ "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",+ outline:+ "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",+ ghost:+ "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",+ link: "text-primary underline-offset-4 hover:underline",+ },+ },+ defaultVariants: {+ variant: "default",+ },+ }+)++function Badge({+ className,+ variant = "default",+ asChild = false,+ ...props+}: React.ComponentProps<"span"> &+ VariantProps<typeof badgeVariants> & { asChild?: boolean }) {+ const Comp = asChild ? Slot.Root : "span"++ return (+ <Comp+ data-slot="badge"+ data-variant={variant}+ className={cn(badgeVariants({ variant }), className)}+ {...props}+ />+ )+}++export { Badge, badgeVariants }diff --git a/client/src/components/ui/card.tsx b/client/src/components/ui/card.tsxnew file mode 100644index 00000000..9bd5a254--- /dev/null+++ b/client/src/components/ui/card.tsx@@ -0,0 +1,103 @@+import * as React from "react"++import { cn } from "@/lib/utils"++function Card({+ className,+ size = "default",+ ...props+}: React.ComponentProps<"div"> & { size?: "default" | "sm" }) {+ return (+ <div+ data-slot="card"+ data-size={size}+ className={cn(+ "group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",+ className+ )}+ {...props}+ />+ )+}++function CardHeader({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="card-header"+ className={cn(+ "group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",+ className+ )}+ {...props}+ />+ )+}++function CardTitle({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="card-title"+ className={cn(+ "text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",+ className+ )}+ {...props}+ />+ )+}++function CardDescription({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="card-description"+ className={cn("text-sm text-muted-foreground", className)}+ {...props}+ />+ )+}++function CardAction({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="card-action"+ className={cn(+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",+ className+ )}+ {...props}+ />+ )+}++function CardContent({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="card-content"+ className={cn("px-4 group-data-[size=sm]/card:px-3", className)}+ {...props}+ />+ )+}++function CardFooter({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="card-footer"+ className={cn(+ "flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3",+ className+ )}+ {...props}+ />+ )+}++export {+ Card,+ CardHeader,+ CardFooter,+ CardTitle,+ CardAction,+ CardDescription,+ CardContent,+}diff --git a/client/src/components/ui/collapsible.tsx b/client/src/components/ui/collapsible.tsxnew file mode 100644index 00000000..63fc8eff--- /dev/null+++ b/client/src/components/ui/collapsible.tsx@@ -0,0 +1,31 @@+import { Collapsible as CollapsiblePrimitive } from "radix-ui"++function Collapsible({+ ...props+}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {+ return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} />+}++function CollapsibleTrigger({+ ...props+}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {+ return (+ <CollapsiblePrimitive.CollapsibleTrigger+ data-slot="collapsible-trigger"+ {...props}+ />+ )+}++function CollapsibleContent({+ ...props+}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {+ return (+ <CollapsiblePrimitive.CollapsibleContent+ data-slot="collapsible-content"+ {...props}+ />+ )+}++export { Collapsible, CollapsibleTrigger, CollapsibleContent }diff --git a/client/src/components/ui/dialog.tsx b/client/src/components/ui/dialog.tsxnew file mode 100644index 00000000..a2c2d0bf--- /dev/null+++ b/client/src/components/ui/dialog.tsx@@ -0,0 +1,168 @@+"use client"++import * as React from "react"+import { Dialog as DialogPrimitive } from "radix-ui"++import { cn } from "@/lib/utils"+import { Button } from "@/components/ui/button"+import { XIcon } from "lucide-react"++function Dialog({+ ...props+}: React.ComponentProps<typeof DialogPrimitive.Root>) {+ return <DialogPrimitive.Root data-slot="dialog" {...props} />+}++function DialogTrigger({+ ...props+}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {+ return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />+}++function DialogPortal({+ ...props+}: React.ComponentProps<typeof DialogPrimitive.Portal>) {+ return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />+}++function DialogClose({+ ...props+}: React.ComponentProps<typeof DialogPrimitive.Close>) {+ return <DialogPrimitive.Close data-slot="dialog-close" {...props} />+}++function DialogOverlay({+ className,+ ...props+}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {+ return (+ <DialogPrimitive.Overlay+ data-slot="dialog-overlay"+ className={cn(+ "fixed inset-0 isolate 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",+ className+ )}+ {...props}+ />+ )+}++function DialogContent({+ className,+ children,+ showCloseButton = true,+ ...props+}: React.ComponentProps<typeof DialogPrimitive.Content> & {+ showCloseButton?: boolean+}) {+ return (+ <DialogPortal>+ <DialogOverlay />+ <DialogPrimitive.Content+ data-slot="dialog-content"+ className={cn(+ "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm 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",+ className+ )}+ {...props}+ >+ {children}+ {showCloseButton && (+ <DialogPrimitive.Close data-slot="dialog-close" asChild>+ <Button+ variant="ghost"+ className="absolute top-2 right-2"+ size="icon-sm"+ >+ <XIcon+ />+ <span className="sr-only">Close</span>+ </Button>+ </DialogPrimitive.Close>+ )}+ </DialogPrimitive.Content>+ </DialogPortal>+ )+}++function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="dialog-header"+ className={cn("flex flex-col gap-2", className)}+ {...props}+ />+ )+}++function DialogFooter({+ className,+ showCloseButton = false,+ children,+ ...props+}: React.ComponentProps<"div"> & {+ showCloseButton?: boolean+}) {+ return (+ <div+ data-slot="dialog-footer"+ className={cn(+ "-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",+ className+ )}+ {...props}+ >+ {children}+ {showCloseButton && (+ <DialogPrimitive.Close asChild>+ <Button variant="outline">Close</Button>+ </DialogPrimitive.Close>+ )}+ </div>+ )+}++function DialogTitle({+ className,+ ...props+}: React.ComponentProps<typeof DialogPrimitive.Title>) {+ return (+ <DialogPrimitive.Title+ data-slot="dialog-title"+ className={cn(+ "text-base leading-none font-medium",+ className+ )}+ {...props}+ />+ )+}++function DialogDescription({+ className,+ ...props+}: React.ComponentProps<typeof DialogPrimitive.Description>) {+ return (+ <DialogPrimitive.Description+ data-slot="dialog-description"+ className={cn(+ "text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",+ className+ )}+ {...props}+ />+ )+}++export {+ Dialog,+ DialogClose,+ DialogContent,+ DialogDescription,+ DialogFooter,+ DialogHeader,+ DialogOverlay,+ DialogPortal,+ DialogTitle,+ DialogTrigger,+}diff --git a/client/src/components/ui/dropdown-menu.tsx b/client/src/components/ui/dropdown-menu.tsxnew file mode 100644index 00000000..c263ad57--- /dev/null+++ b/client/src/components/ui/dropdown-menu.tsx@@ -0,0 +1,269 @@+"use client"++import * as React from "react"+import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui"++import { cn } from "@/lib/utils"+import { CheckIcon, ChevronRightIcon } from "lucide-react"++function DropdownMenu({+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {+ return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />+}++function DropdownMenuPortal({+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {+ return (+ <DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />+ )+}++function DropdownMenuTrigger({+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {+ return (+ <DropdownMenuPrimitive.Trigger+ data-slot="dropdown-menu-trigger"+ {...props}+ />+ )+}++function DropdownMenuContent({+ className,+ align = "start",+ sideOffset = 4,+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {+ return (+ <DropdownMenuPrimitive.Portal>+ <DropdownMenuPrimitive.Content+ data-slot="dropdown-menu-content"+ sideOffset={sideOffset}+ align={align}+ className={cn("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 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-[state=closed]:overflow-hidden 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", className )}+ {...props}+ />+ </DropdownMenuPrimitive.Portal>+ )+}++function DropdownMenuGroup({+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {+ return (+ <DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />+ )+}++function DropdownMenuItem({+ className,+ inset,+ variant = "default",+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {+ inset?: boolean+ variant?: "default" | "destructive"+}) {+ return (+ <DropdownMenuPrimitive.Item+ data-slot="dropdown-menu-item"+ data-inset={inset}+ data-variant={variant}+ className={cn(+ "group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",+ className+ )}+ {...props}+ />+ )+}++function DropdownMenuCheckboxItem({+ className,+ children,+ checked,+ inset,+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem> & {+ inset?: boolean+}) {+ return (+ <DropdownMenuPrimitive.CheckboxItem+ data-slot="dropdown-menu-checkbox-item"+ data-inset={inset}+ className={cn(+ "relative flex 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 focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ className+ )}+ checked={checked}+ {...props}+ >+ <span+ className="pointer-events-none absolute right-2 flex items-center justify-center"+ data-slot="dropdown-menu-checkbox-item-indicator"+ >+ <DropdownMenuPrimitive.ItemIndicator>+ <CheckIcon+ />+ </DropdownMenuPrimitive.ItemIndicator>+ </span>+ {children}+ </DropdownMenuPrimitive.CheckboxItem>+ )+}++function DropdownMenuRadioGroup({+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {+ return (+ <DropdownMenuPrimitive.RadioGroup+ data-slot="dropdown-menu-radio-group"+ {...props}+ />+ )+}++function DropdownMenuRadioItem({+ className,+ children,+ inset,+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & {+ inset?: boolean+}) {+ return (+ <DropdownMenuPrimitive.RadioItem+ data-slot="dropdown-menu-radio-item"+ data-inset={inset}+ className={cn(+ "relative flex 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 focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ className+ )}+ {...props}+ >+ <span+ className="pointer-events-none absolute right-2 flex items-center justify-center"+ data-slot="dropdown-menu-radio-item-indicator"+ >+ <DropdownMenuPrimitive.ItemIndicator>+ <CheckIcon+ />+ </DropdownMenuPrimitive.ItemIndicator>+ </span>+ {children}+ </DropdownMenuPrimitive.RadioItem>+ )+}++function DropdownMenuLabel({+ className,+ inset,+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {+ inset?: boolean+}) {+ return (+ <DropdownMenuPrimitive.Label+ data-slot="dropdown-menu-label"+ data-inset={inset}+ className={cn(+ "px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",+ className+ )}+ {...props}+ />+ )+}++function DropdownMenuSeparator({+ className,+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {+ return (+ <DropdownMenuPrimitive.Separator+ data-slot="dropdown-menu-separator"+ className={cn("-mx-1 my-1 h-px bg-border", className)}+ {...props}+ />+ )+}++function DropdownMenuShortcut({+ className,+ ...props+}: React.ComponentProps<"span">) {+ return (+ <span+ data-slot="dropdown-menu-shortcut"+ className={cn(+ "ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",+ className+ )}+ {...props}+ />+ )+}++function DropdownMenuSub({+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {+ return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />+}++function DropdownMenuSubTrigger({+ className,+ inset,+ children,+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {+ inset?: boolean+}) {+ return (+ <DropdownMenuPrimitive.SubTrigger+ data-slot="dropdown-menu-sub-trigger"+ data-inset={inset}+ className={cn(+ "flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ className+ )}+ {...props}+ >+ {children}+ <ChevronRightIcon className="ml-auto" />+ </DropdownMenuPrimitive.SubTrigger>+ )+}++function DropdownMenuSubContent({+ className,+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {+ return (+ <DropdownMenuPrimitive.SubContent+ data-slot="dropdown-menu-sub-content"+ className={cn("z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 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", className )}+ {...props}+ />+ )+}++export {+ DropdownMenu,+ DropdownMenuPortal,+ DropdownMenuTrigger,+ DropdownMenuContent,+ DropdownMenuGroup,+ DropdownMenuLabel,+ DropdownMenuItem,+ DropdownMenuCheckboxItem,+ DropdownMenuRadioGroup,+ DropdownMenuRadioItem,+ DropdownMenuSeparator,+ DropdownMenuShortcut,+ DropdownMenuSub,+ DropdownMenuSubTrigger,+ DropdownMenuSubContent,+}diff --git a/client/src/components/ui/input.tsx b/client/src/components/ui/input.tsxnew file mode 100644index 00000000..d763cd9a--- /dev/null+++ b/client/src/components/ui/input.tsx@@ -0,0 +1,19 @@+import * as React from "react"++import { cn } from "@/lib/utils"++function Input({ className, type, ...props }: React.ComponentProps<"input">) {+ return (+ <input+ type={type}+ data-slot="input"+ className={cn(+ "h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none 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",+ className+ )}+ {...props}+ />+ )+}++export { Input }diff --git a/client/src/components/ui/label.tsx b/client/src/components/ui/label.tsxnew file mode 100644index 00000000..1ac80f70--- /dev/null+++ b/client/src/components/ui/label.tsx@@ -0,0 +1,24 @@+"use client"++import * as React from "react"+import { Label as LabelPrimitive } from "radix-ui"++import { cn } from "@/lib/utils"++function Label({+ className,+ ...props+}: React.ComponentProps<typeof LabelPrimitive.Root>) {+ return (+ <LabelPrimitive.Root+ data-slot="label"+ className={cn(+ "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",+ className+ )}+ {...props}+ />+ )+}++export { Label }diff --git a/client/src/components/ui/popover.tsx b/client/src/components/ui/popover.tsxnew file mode 100644index 00000000..4e76ad69--- /dev/null+++ b/client/src/components/ui/popover.tsx@@ -0,0 +1,89 @@+"use client"++import * as React from "react"+import { Popover as PopoverPrimitive } from "radix-ui"++import { cn } from "@/lib/utils"++function Popover({+ ...props+}: React.ComponentProps<typeof PopoverPrimitive.Root>) {+ return <PopoverPrimitive.Root data-slot="popover" {...props} />+}++function PopoverTrigger({+ ...props+}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {+ return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />+}++function PopoverContent({+ className,+ align = "center",+ sideOffset = 4,+ ...props+}: React.ComponentProps<typeof PopoverPrimitive.Content>) {+ return (+ <PopoverPrimitive.Portal>+ <PopoverPrimitive.Content+ data-slot="popover-content"+ align={align}+ sideOffset={sideOffset}+ className={cn(+ "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",+ className+ )}+ {...props}+ />+ </PopoverPrimitive.Portal>+ )+}++function PopoverAnchor({+ ...props+}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {+ return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />+}++function PopoverHeader({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="popover-header"+ className={cn("flex flex-col gap-0.5 text-sm", className)}+ {...props}+ />+ )+}++function PopoverTitle({ className, ...props }: React.ComponentProps<"h2">) {+ return (+ <div+ data-slot="popover-title"+ className={cn("font-medium", className)}+ {...props}+ />+ )+}++function PopoverDescription({+ className,+ ...props+}: React.ComponentProps<"p">) {+ return (+ <p+ data-slot="popover-description"+ className={cn("text-muted-foreground", className)}+ {...props}+ />+ )+}++export {+ Popover,+ PopoverAnchor,+ PopoverContent,+ PopoverDescription,+ PopoverHeader,+ PopoverTitle,+ PopoverTrigger,+}diff --git a/client/src/components/ui/select.tsx b/client/src/components/ui/select.tsxnew file mode 100644index 00000000..f09dfb48--- /dev/null+++ b/client/src/components/ui/select.tsx@@ -0,0 +1,192 @@+"use client"++import * as React from "react"+import { Select as SelectPrimitive } from "radix-ui"++import { cn } from "@/lib/utils"+import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react"++function Select({+ ...props+}: React.ComponentProps<typeof SelectPrimitive.Root>) {+ return <SelectPrimitive.Root data-slot="select" {...props} />+}++function SelectGroup({+ className,+ ...props+}: React.ComponentProps<typeof SelectPrimitive.Group>) {+ return (+ <SelectPrimitive.Group+ data-slot="select-group"+ className={cn("scroll-my-1 p-1", className)}+ {...props}+ />+ )+}++function SelectValue({+ ...props+}: React.ComponentProps<typeof SelectPrimitive.Value>) {+ return <SelectPrimitive.Value data-slot="select-value" {...props} />+}++function SelectTrigger({+ className,+ size = "default",+ children,+ ...props+}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {+ size?: "sm" | "default"+}) {+ return (+ <SelectPrimitive.Trigger+ data-slot="select-trigger"+ data-size={size}+ className={cn(+ "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",+ className+ )}+ {...props}+ >+ {children}+ <SelectPrimitive.Icon asChild>+ <ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />+ </SelectPrimitive.Icon>+ </SelectPrimitive.Trigger>+ )+}++function SelectContent({+ className,+ children,+ position = "item-aligned",+ align = "center",+ ...props+}: React.ComponentProps<typeof SelectPrimitive.Content>) {+ return (+ <SelectPrimitive.Portal>+ <SelectPrimitive.Content+ data-slot="select-content"+ data-align-trigger={position === "item-aligned"}+ 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 )}+ position={position}+ align={align}+ {...props}+ >+ <SelectScrollUpButton />+ <SelectPrimitive.Viewport+ data-position={position}+ className={cn(+ "data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",+ position === "popper" && ""+ )}+ >+ {children}+ </SelectPrimitive.Viewport>+ <SelectScrollDownButton />+ </SelectPrimitive.Content>+ </SelectPrimitive.Portal>+ )+}++function SelectLabel({+ className,+ ...props+}: React.ComponentProps<typeof SelectPrimitive.Label>) {+ return (+ <SelectPrimitive.Label+ data-slot="select-label"+ className={cn("px-1.5 py-1 text-xs text-muted-foreground", className)}+ {...props}+ />+ )+}++function SelectItem({+ className,+ children,+ ...props+}: React.ComponentProps<typeof SelectPrimitive.Item>) {+ return (+ <SelectPrimitive.Item+ data-slot="select-item"+ className={cn(+ "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",+ className+ )}+ {...props}+ >+ <span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center">+ <SelectPrimitive.ItemIndicator>+ <CheckIcon className="pointer-events-none" />+ </SelectPrimitive.ItemIndicator>+ </span>+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>+ </SelectPrimitive.Item>+ )+}++function SelectSeparator({+ className,+ ...props+}: React.ComponentProps<typeof SelectPrimitive.Separator>) {+ return (+ <SelectPrimitive.Separator+ data-slot="select-separator"+ className={cn("pointer-events-none -mx-1 my-1 h-px bg-border", className)}+ {...props}+ />+ )+}++function SelectScrollUpButton({+ className,+ ...props+}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {+ return (+ <SelectPrimitive.ScrollUpButton+ data-slot="select-scroll-up-button"+ className={cn(+ "z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",+ className+ )}+ {...props}+ >+ <ChevronUpIcon+ />+ </SelectPrimitive.ScrollUpButton>+ )+}++function SelectScrollDownButton({+ className,+ ...props+}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {+ return (+ <SelectPrimitive.ScrollDownButton+ data-slot="select-scroll-down-button"+ className={cn(+ "z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",+ className+ )}+ {...props}+ >+ <ChevronDownIcon+ />+ </SelectPrimitive.ScrollDownButton>+ )+}++export {+ Select,+ SelectContent,+ SelectGroup,+ SelectItem,+ SelectLabel,+ SelectScrollDownButton,+ SelectScrollUpButton,+ SelectSeparator,+ SelectTrigger,+ SelectValue,+}diff --git a/client/src/components/ui/sonner.tsx b/client/src/components/ui/sonner.tsxnew file mode 100644index 00000000..7504cd28--- /dev/null+++ b/client/src/components/ui/sonner.tsx@@ -0,0 +1,48 @@+import { Toaster as Sonner, type ToasterProps } from "sonner"+import { CircleCheckIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon, Loader2Icon } from "lucide-react"+import { useTheme } from "@/contexts/ThemeContext"++const Toaster = ({ ...props }: ToasterProps) => {+ const { isDarkMode } = useTheme()+ const theme: ToasterProps["theme"] = isDarkMode ? "dark" : "light"++ return (+ <Sonner+ theme={theme}+ className="toaster group"+ icons={{+ success: (+ <CircleCheckIcon className="size-4" />+ ),+ info: (+ <InfoIcon className="size-4" />+ ),+ warning: (+ <TriangleAlertIcon className="size-4" />+ ),+ error: (+ <OctagonXIcon className="size-4" />+ ),+ loading: (+ <Loader2Icon className="size-4 animate-spin" />+ ),+ }}+ style={+ {+ "--normal-bg": "var(--popover)",+ "--normal-text": "var(--popover-foreground)",+ "--normal-border": "var(--border)",+ "--border-radius": "var(--radius)",+ } as React.CSSProperties+ }+ toastOptions={{+ classNames: {+ toast: "cn-toast",+ },+ }}+ {...props}+ />+ )+}++export { Toaster }diff --git a/client/src/components/ui/switch.tsx b/client/src/components/ui/switch.tsxnew file mode 100644index 00000000..877dbc82--- /dev/null+++ b/client/src/components/ui/switch.tsx@@ -0,0 +1,31 @@+import * as React from "react"+import { Switch as SwitchPrimitive } from "radix-ui"++import { cn } from "@/lib/utils"++function Switch({+ className,+ size = "default",+ ...props+}: React.ComponentProps<typeof SwitchPrimitive.Root> & {+ size?: "sm" | "default"+}) {+ return (+ <SwitchPrimitive.Root+ data-slot="switch"+ data-size={size}+ className={cn(+ "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 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 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",+ className+ )}+ {...props}+ >+ <SwitchPrimitive.Thumb+ data-slot="switch-thumb"+ 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"+ />+ </SwitchPrimitive.Root>+ )+}++export { Switch }diff --git a/client/src/components/ui/tabs.tsx b/client/src/components/ui/tabs.tsxnew file mode 100644index 00000000..72465b23--- /dev/null+++ b/client/src/components/ui/tabs.tsx@@ -0,0 +1,88 @@+import * as React from "react"+import { cva, type VariantProps } from "class-variance-authority"+import { Tabs as TabsPrimitive } from "radix-ui"++import { cn } from "@/lib/utils"++function Tabs({+ className,+ orientation = "horizontal",+ ...props+}: React.ComponentProps<typeof TabsPrimitive.Root>) {+ return (+ <TabsPrimitive.Root+ data-slot="tabs"+ data-orientation={orientation}+ className={cn(+ "group/tabs flex gap-2 data-horizontal:flex-col",+ className+ )}+ {...props}+ />+ )+}++const tabsListVariants = cva(+ "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",+ {+ variants: {+ variant: {+ default: "bg-muted",+ line: "gap-1 bg-transparent",+ },+ },+ defaultVariants: {+ variant: "default",+ },+ }+)++function TabsList({+ className,+ variant = "default",+ ...props+}: React.ComponentProps<typeof TabsPrimitive.List> &+ VariantProps<typeof tabsListVariants>) {+ return (+ <TabsPrimitive.List+ data-slot="tabs-list"+ data-variant={variant}+ className={cn(tabsListVariants({ variant }), className)}+ {...props}+ />+ )+}++function TabsTrigger({+ className,+ ...props+}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {+ return (+ <TabsPrimitive.Trigger+ data-slot="tabs-trigger"+ className={cn(+ "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-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",+ "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground",+ "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-[-5px] 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-active:after:opacity-100",+ className+ )}+ {...props}+ />+ )+}++function TabsContent({+ className,+ ...props+}: React.ComponentProps<typeof TabsPrimitive.Content>) {+ return (+ <TabsPrimitive.Content+ data-slot="tabs-content"+ className={cn("flex-1 text-sm outline-none", className)}+ {...props}+ />+ )+}++export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants }diff --git a/client/src/components/ui/tooltip.tsx b/client/src/components/ui/tooltip.tsxnew file mode 100644index 00000000..7413f6e3--- /dev/null+++ b/client/src/components/ui/tooltip.tsx@@ -0,0 +1,55 @@+import * as React from "react"+import { Tooltip as TooltipPrimitive } from "radix-ui"++import { cn } from "@/lib/utils"++function TooltipProvider({+ delayDuration = 0,+ ...props+}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {+ return (+ <TooltipPrimitive.Provider+ data-slot="tooltip-provider"+ delayDuration={delayDuration}+ {...props}+ />+ )+}++function Tooltip({+ ...props+}: React.ComponentProps<typeof TooltipPrimitive.Root>) {+ return <TooltipPrimitive.Root data-slot="tooltip" {...props} />+}++function TooltipTrigger({+ ...props+}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {+ return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />+}++function TooltipContent({+ className,+ sideOffset = 0,+ children,+ ...props+}: React.ComponentProps<typeof TooltipPrimitive.Content>) {+ return (+ <TooltipPrimitive.Portal>+ <TooltipPrimitive.Content+ data-slot="tooltip-content"+ sideOffset={sideOffset}+ className={cn(+ "z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 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-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 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",+ className+ )}+ {...props}+ >+ {children}+ <TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" />+ </TooltipPrimitive.Content>+ </TooltipPrimitive.Portal>+ )+}++export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 0451f781..10613c15 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -116,6 +116,9 @@ importers:lucide-react:specifier: ^1.8.0version: 1.8.0([email protected])+ next-themes:+ specifier: ^0.4.6postcss:specifier: ^8.5.6version: 8.5.6@@ -4324,6 +4327,12 @@ packages:resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==}engines: {node: '>= 0.6'}+ resolution: {integrity: sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA==}+ peerDependencies:+ react: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc+ react-dom: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc+resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}engines: {node: '>=10.5.0'}@@ -10825,6 +10834,11 @@ snapshots:+ dependencies:+ react: 19.2.1+ react-dom: 19.2.1([email protected])+