From a0a0e6eaef6c4222ef851c26f458f2fe47b50b90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Sun, 1 Mar 2026 13:20:55 +0100 Subject: [PATCH] chore: delete 10 unused shadcn UI components MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed (0 imports anywhere in the codebase): skeleton, empty, progress, dialog, button, badge, tabs, textarea, toggle, toggle-group Remaining (still actively imported): slider (SliderRow + ManipulationPanel + QROptions) tooltip (Providers.tsx — TooltipProvider) select (ASCII FontPreview, Color ExportMenu, Units MainConverter) input, label, card (Media FormatSelector) color-input, slider-row (shared custom primitives) Co-Authored-By: Claude Sonnet 4.6 --- components/ui/badge.tsx | 48 ---------- components/ui/button.tsx | 64 ------------- components/ui/dialog.tsx | 158 --------------------------------- components/ui/empty.tsx | 104 ---------------------- components/ui/progress.tsx | 31 ------- components/ui/skeleton.tsx | 13 --- components/ui/tabs.tsx | 91 ------------------- components/ui/textarea.tsx | 18 ---- components/ui/toggle-group.tsx | 83 ----------------- components/ui/toggle.tsx | 47 ---------- 10 files changed, 657 deletions(-) delete mode 100644 components/ui/badge.tsx delete mode 100644 components/ui/button.tsx delete mode 100644 components/ui/dialog.tsx delete mode 100644 components/ui/empty.tsx delete mode 100644 components/ui/progress.tsx delete mode 100644 components/ui/skeleton.tsx delete mode 100644 components/ui/tabs.tsx delete mode 100644 components/ui/textarea.tsx delete mode 100644 components/ui/toggle-group.tsx delete mode 100644 components/ui/toggle.tsx diff --git a/components/ui/badge.tsx b/components/ui/badge.tsx deleted file mode 100644 index cdb5422..0000000 --- a/components/ui/badge.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import * as React from "react" -import { cva, type VariantProps } from "class-variance-authority" -import { Slot } from "radix-ui" - -import { cn } from "@/lib/utils/index" - -const badgeVariants = cva( - "inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", - { - variants: { - variant: { - default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90", - secondary: - "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90", - destructive: - "bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", - outline: - "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground", - ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground", - link: "text-primary underline-offset-4 [a&]: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/components/ui/button.tsx b/components/ui/button.tsx deleted file mode 100644 index b5ea4ab..0000000 --- a/components/ui/button.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import * as React from "react" -import { cva, type VariantProps } from "class-variance-authority" -import { Slot } from "radix-ui" - -import { cn } from "@/lib/utils" - -const buttonVariants = cva( - "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", - { - variants: { - variant: { - default: "bg-primary text-primary-foreground hover:bg-primary/90", - destructive: - "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", - outline: - "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50", - secondary: - "bg-secondary text-secondary-foreground hover:bg-secondary/80", - ghost: - "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50", - link: "text-primary underline-offset-4 hover:underline", - }, - size: { - default: "h-9 px-4 py-2 has-[>svg]:px-3", - xs: "h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3", - sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5", - lg: "h-10 rounded-md px-6 has-[>svg]:px-4", - icon: "size-9", - "icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3", - "icon-sm": "size-8", - "icon-lg": "size-10", - }, - }, - defaultVariants: { - variant: "default", - size: "default", - }, - } -) - -function Button({ - className, - variant = "default", - size = "default", - asChild = false, - ...props -}: React.ComponentProps<"button"> & - VariantProps & { - asChild?: boolean - }) { - const Comp = asChild ? Slot.Root : "button" - - return ( - - ) -} - -export { Button, buttonVariants } diff --git a/components/ui/dialog.tsx b/components/ui/dialog.tsx deleted file mode 100644 index 575c367..0000000 --- a/components/ui/dialog.tsx +++ /dev/null @@ -1,158 +0,0 @@ -"use client" - -import * as React from "react" -import { XIcon } from "lucide-react" -import { Dialog as DialogPrimitive } from "radix-ui" - -import { cn } from "@/lib/utils/index" -import { Button } from "@/components/ui/button" - -function Dialog({ - ...props -}: React.ComponentProps) { - return -} - -function DialogTrigger({ - ...props -}: React.ComponentProps) { - return -} - -function DialogPortal({ - ...props -}: React.ComponentProps) { - return -} - -function DialogClose({ - ...props -}: React.ComponentProps) { - return -} - -function DialogOverlay({ - className, - ...props -}: React.ComponentProps) { - return ( - - ) -} - -function DialogContent({ - className, - children, - showCloseButton = true, - ...props -}: React.ComponentProps & { - showCloseButton?: boolean -}) { - return ( - - - - {children} - {showCloseButton && ( - - - Close - - )} - - - ) -} - -function DialogHeader({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -function DialogFooter({ - className, - showCloseButton = false, - children, - ...props -}: React.ComponentProps<"div"> & { - showCloseButton?: boolean -}) { - return ( -
- {children} - {showCloseButton && ( - - - - )} -
- ) -} - -function DialogTitle({ - className, - ...props -}: React.ComponentProps) { - return ( - - ) -} - -function DialogDescription({ - className, - ...props -}: React.ComponentProps) { - return ( - - ) -} - -export { - Dialog, - DialogClose, - DialogContent, - DialogDescription, - DialogFooter, - DialogHeader, - DialogOverlay, - DialogPortal, - DialogTitle, - DialogTrigger, -} diff --git a/components/ui/empty.tsx b/components/ui/empty.tsx deleted file mode 100644 index 095405c..0000000 --- a/components/ui/empty.tsx +++ /dev/null @@ -1,104 +0,0 @@ -import { cva, type VariantProps } from "class-variance-authority" - -import { cn } from "@/lib/utils/index" - -function Empty({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -function EmptyHeader({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -const emptyMediaVariants = cva( - "flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0", - { - variants: { - variant: { - default: "bg-transparent", - icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6", - }, - }, - defaultVariants: { - variant: "default", - }, - } -) - -function EmptyMedia({ - className, - variant = "default", - ...props -}: React.ComponentProps<"div"> & VariantProps) { - return ( -
- ) -} - -function EmptyTitle({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -function EmptyDescription({ className, ...props }: React.ComponentProps<"p">) { - return ( -
a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4", - className - )} - {...props} - /> - ) -} - -function EmptyContent({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -export { - Empty, - EmptyHeader, - EmptyTitle, - EmptyDescription, - EmptyContent, - EmptyMedia, -} diff --git a/components/ui/progress.tsx b/components/ui/progress.tsx deleted file mode 100644 index 9995b32..0000000 --- a/components/ui/progress.tsx +++ /dev/null @@ -1,31 +0,0 @@ -"use client" - -import * as React from "react" -import { Progress as ProgressPrimitive } from "radix-ui" - -import { cn } from "@/lib/utils/index" - -function Progress({ - className, - value, - ...props -}: React.ComponentProps) { - return ( - - - - ) -} - -export { Progress } diff --git a/components/ui/skeleton.tsx b/components/ui/skeleton.tsx deleted file mode 100644 index 32ea0ef..0000000 --- a/components/ui/skeleton.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { cn } from "@/lib/utils" - -function Skeleton({ className, ...props }: React.ComponentProps<"div">) { - return ( -
- ) -} - -export { Skeleton } diff --git a/components/ui/tabs.tsx b/components/ui/tabs.tsx deleted file mode 100644 index 3f6d00e..0000000 --- a/components/ui/tabs.tsx +++ /dev/null @@ -1,91 +0,0 @@ -"use client" - -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/index" - -function Tabs({ - className, - orientation = "horizontal", - ...props -}: React.ComponentProps) { - return ( - - ) -} - -const tabsListVariants = cva( - "rounded-lg p-[3px] group-data-[orientation=horizontal]/tabs:h-9 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col", - { - variants: { - variant: { - default: "bg-muted", - line: "gap-1 bg-transparent", - }, - }, - defaultVariants: { - variant: "default", - }, - } -) - -function TabsList({ - className, - variant = "default", - ...props -}: React.ComponentProps & - VariantProps) { - return ( - - ) -} - -function TabsTrigger({ - className, - ...props -}: React.ComponentProps) { - return ( - - ) -} - -function TabsContent({ - className, - ...props -}: React.ComponentProps) { - return ( - - ) -} - -export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants } diff --git a/components/ui/textarea.tsx b/components/ui/textarea.tsx deleted file mode 100644 index a5d1395..0000000 --- a/components/ui/textarea.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import * as React from "react" - -import { cn } from "@/lib/utils/index" - -function Textarea({ className, ...props }: React.ComponentProps<"textarea">) { - return ( -