From eeb1ea9615224e1c641fcabe6aa5151dfdf7dd4f Mon Sep 17 00:00:00 2001 From: Gabriel Kaszewski Date: Wed, 8 Apr 2026 02:25:13 +0200 Subject: [PATCH] feat(app): install shadcn button, input, card, badge, sheet, tooltip --- app/app/components/ui/accordion.tsx | 82 +++ app/app/components/ui/alert-dialog.tsx | 197 ++++++ app/app/components/ui/alert.tsx | 76 +++ app/app/components/ui/aspect-ratio.tsx | 11 + app/app/components/ui/avatar.tsx | 110 ++++ app/app/components/ui/badge.tsx | 49 ++ app/app/components/ui/breadcrumb.tsx | 122 ++++ app/app/components/ui/button-group.tsx | 83 +++ app/app/components/ui/button.tsx | 65 ++ app/app/components/ui/calendar.tsx | 222 +++++++ app/app/components/ui/card.tsx | 100 +++ app/app/components/ui/carousel.tsx | 240 ++++++++ app/app/components/ui/chart.tsx | 373 ++++++++++++ app/app/components/ui/checkbox.tsx | 31 + app/app/components/ui/collapsible.tsx | 33 + app/app/components/ui/combobox.tsx | 299 +++++++++ app/app/components/ui/command.tsx | 193 ++++++ app/app/components/ui/context-menu.tsx | 261 ++++++++ app/app/components/ui/dialog.tsx | 168 ++++++ app/app/components/ui/direction.tsx | 22 + app/app/components/ui/drawer.tsx | 132 ++++ app/app/components/ui/dropdown-menu.tsx | 269 +++++++++ app/app/components/ui/empty.tsx | 104 ++++ app/app/components/ui/field.tsx | 238 ++++++++ app/app/components/ui/hover-card.tsx | 42 ++ app/app/components/ui/input-group.tsx | 153 +++++ app/app/components/ui/input-otp.tsx | 87 +++ app/app/components/ui/input.tsx | 19 + app/app/components/ui/item.tsx | 196 ++++++ app/app/components/ui/kbd.tsx | 26 + app/app/components/ui/label.tsx | 22 + app/app/components/ui/menubar.tsx | 277 +++++++++ app/app/components/ui/native-select.tsx | 61 ++ app/app/components/ui/navigation-menu.tsx | 164 +++++ app/app/components/ui/pagination.tsx | 129 ++++ app/app/components/ui/popover.tsx | 87 +++ app/app/components/ui/progress.tsx | 31 + app/app/components/ui/radio-group.tsx | 42 ++ app/app/components/ui/resizable.tsx | 50 ++ app/app/components/ui/scroll-area.tsx | 53 ++ app/app/components/ui/select.tsx | 195 ++++++ app/app/components/ui/separator.tsx | 26 + app/app/components/ui/sheet.tsx | 145 +++++ app/app/components/ui/sidebar.tsx | 703 ++++++++++++++++++++++ app/app/components/ui/skeleton.tsx | 13 + app/app/components/ui/slider.tsx | 59 ++ app/app/components/ui/sonner.tsx | 47 ++ app/app/components/ui/spinner.tsx | 10 + app/app/components/ui/switch.tsx | 33 + app/app/components/ui/table.tsx | 114 ++++ app/app/components/ui/tabs.tsx | 90 +++ app/app/components/ui/textarea.tsx | 18 + app/app/components/ui/toggle-group.tsx | 89 +++ app/app/components/ui/toggle.tsx | 45 ++ app/app/components/ui/tooltip.tsx | 57 ++ 55 files changed, 6563 insertions(+) create mode 100644 app/app/components/ui/accordion.tsx create mode 100644 app/app/components/ui/alert-dialog.tsx create mode 100644 app/app/components/ui/alert.tsx create mode 100644 app/app/components/ui/aspect-ratio.tsx create mode 100644 app/app/components/ui/avatar.tsx create mode 100644 app/app/components/ui/badge.tsx create mode 100644 app/app/components/ui/breadcrumb.tsx create mode 100644 app/app/components/ui/button-group.tsx create mode 100644 app/app/components/ui/button.tsx create mode 100644 app/app/components/ui/calendar.tsx create mode 100644 app/app/components/ui/card.tsx create mode 100644 app/app/components/ui/carousel.tsx create mode 100644 app/app/components/ui/chart.tsx create mode 100644 app/app/components/ui/checkbox.tsx create mode 100644 app/app/components/ui/collapsible.tsx create mode 100644 app/app/components/ui/combobox.tsx create mode 100644 app/app/components/ui/command.tsx create mode 100644 app/app/components/ui/context-menu.tsx create mode 100644 app/app/components/ui/dialog.tsx create mode 100644 app/app/components/ui/direction.tsx create mode 100644 app/app/components/ui/drawer.tsx create mode 100644 app/app/components/ui/dropdown-menu.tsx create mode 100644 app/app/components/ui/empty.tsx create mode 100644 app/app/components/ui/field.tsx create mode 100644 app/app/components/ui/hover-card.tsx create mode 100644 app/app/components/ui/input-group.tsx create mode 100644 app/app/components/ui/input-otp.tsx create mode 100644 app/app/components/ui/input.tsx create mode 100644 app/app/components/ui/item.tsx create mode 100644 app/app/components/ui/kbd.tsx create mode 100644 app/app/components/ui/label.tsx create mode 100644 app/app/components/ui/menubar.tsx create mode 100644 app/app/components/ui/native-select.tsx create mode 100644 app/app/components/ui/navigation-menu.tsx create mode 100644 app/app/components/ui/pagination.tsx create mode 100644 app/app/components/ui/popover.tsx create mode 100644 app/app/components/ui/progress.tsx create mode 100644 app/app/components/ui/radio-group.tsx create mode 100644 app/app/components/ui/resizable.tsx create mode 100644 app/app/components/ui/scroll-area.tsx create mode 100644 app/app/components/ui/select.tsx create mode 100644 app/app/components/ui/separator.tsx create mode 100644 app/app/components/ui/sheet.tsx create mode 100644 app/app/components/ui/sidebar.tsx create mode 100644 app/app/components/ui/skeleton.tsx create mode 100644 app/app/components/ui/slider.tsx create mode 100644 app/app/components/ui/sonner.tsx create mode 100644 app/app/components/ui/spinner.tsx create mode 100644 app/app/components/ui/switch.tsx create mode 100644 app/app/components/ui/table.tsx create mode 100644 app/app/components/ui/tabs.tsx create mode 100644 app/app/components/ui/textarea.tsx create mode 100644 app/app/components/ui/toggle-group.tsx create mode 100644 app/app/components/ui/toggle.tsx create mode 100644 app/app/components/ui/tooltip.tsx diff --git a/app/app/components/ui/accordion.tsx b/app/app/components/ui/accordion.tsx new file mode 100644 index 0000000..390aa12 --- /dev/null +++ b/app/app/components/ui/accordion.tsx @@ -0,0 +1,82 @@ +import * as React from "react" +import { Accordion as AccordionPrimitive } from "radix-ui" + +import { cn } from "~/lib/utils" +import { ChevronDownIcon, ChevronUpIcon } from "lucide-react" + +function Accordion({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AccordionItem({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AccordionTrigger({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + + + {children} + + + + + ) +} + +function AccordionContent({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + +
+ {children} +
+
+ ) +} + +export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } diff --git a/app/app/components/ui/alert-dialog.tsx b/app/app/components/ui/alert-dialog.tsx new file mode 100644 index 0000000..5526e49 --- /dev/null +++ b/app/app/components/ui/alert-dialog.tsx @@ -0,0 +1,197 @@ +import * as React from "react" +import { AlertDialog as AlertDialogPrimitive } from "radix-ui" + +import { cn } from "~/lib/utils" +import { Button } from "~/components/ui/button" + +function AlertDialog({ + ...props +}: React.ComponentProps) { + return +} + +function AlertDialogTrigger({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogPortal({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogOverlay({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogContent({ + className, + size = "default", + ...props +}: React.ComponentProps & { + size?: "default" | "sm" +}) { + return ( + + + + + ) +} + +function AlertDialogHeader({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function AlertDialogFooter({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function AlertDialogMedia({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function AlertDialogTitle({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogDescription({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogAction({ + className, + variant = "default", + size = "default", + ...props +}: React.ComponentProps & + Pick, "variant" | "size">) { + return ( + + ) +} + +function AlertDialogCancel({ + className, + variant = "outline", + size = "default", + ...props +}: React.ComponentProps & + Pick, "variant" | "size">) { + return ( + + ) +} + +export { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogMedia, + AlertDialogOverlay, + AlertDialogPortal, + AlertDialogTitle, + AlertDialogTrigger, +} diff --git a/app/app/components/ui/alert.tsx b/app/app/components/ui/alert.tsx new file mode 100644 index 0000000..6cd92b2 --- /dev/null +++ b/app/app/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-4 py-3 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.5 *:[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) { + return ( +
+ ) +} + +function AlertTitle({ className, ...props }: React.ComponentProps<"div">) { + return ( +
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 ( +
+ ) +} + +function AlertAction({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +export { Alert, AlertTitle, AlertDescription, AlertAction } diff --git a/app/app/components/ui/aspect-ratio.tsx b/app/app/components/ui/aspect-ratio.tsx new file mode 100644 index 0000000..57e38fa --- /dev/null +++ b/app/app/components/ui/aspect-ratio.tsx @@ -0,0 +1,11 @@ +"use client" + +import { AspectRatio as AspectRatioPrimitive } from "radix-ui" + +function AspectRatio({ + ...props +}: React.ComponentProps) { + return +} + +export { AspectRatio } diff --git a/app/app/components/ui/avatar.tsx b/app/app/components/ui/avatar.tsx new file mode 100644 index 0000000..425f29f --- /dev/null +++ b/app/app/components/ui/avatar.tsx @@ -0,0 +1,110 @@ +import * as React from "react" +import { Avatar as AvatarPrimitive } from "radix-ui" + +import { cn } from "~/lib/utils" + +function Avatar({ + className, + size = "default", + ...props +}: React.ComponentProps & { + size?: "default" | "sm" | "lg" +}) { + return ( + + ) +} + +function AvatarImage({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AvatarFallback({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AvatarBadge({ className, ...props }: React.ComponentProps<"span">) { + return ( + svg]:hidden", + "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", + "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", + className + )} + {...props} + /> + ) +} + +function AvatarGroup({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function AvatarGroupCount({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3", + className + )} + {...props} + /> + ) +} + +export { + Avatar, + AvatarImage, + AvatarFallback, + AvatarGroup, + AvatarGroupCount, + AvatarBadge, +} diff --git a/app/app/components/ui/badge.tsx b/app/app/components/ui/badge.tsx new file mode 100644 index 0000000..543e76f --- /dev/null +++ b/app/app/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 bg-input/30 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 & { asChild?: boolean }) { + const Comp = asChild ? Slot.Root : "span" + + return ( + + ) +} + +export { Badge, badgeVariants } diff --git a/app/app/components/ui/breadcrumb.tsx b/app/app/components/ui/breadcrumb.tsx new file mode 100644 index 0000000..792f8e3 --- /dev/null +++ b/app/app/components/ui/breadcrumb.tsx @@ -0,0 +1,122 @@ +import * as React from "react" +import { Slot } from "radix-ui" + +import { cn } from "~/lib/utils" +import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react" + +function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">) { + return ( +