From 91775fa26c3fad93af1d3114acee16dc7097c0a8 Mon Sep 17 00:00:00 2001 From: Max Qian Date: Thu, 8 Oct 2026 14:54:22 +0800 Subject: [PATCH] chore(ui): sync shadcn components with registry --- components/ui/accordion.tsx | 3 +-- components/ui/alert-dialog.tsx | 2 +- components/ui/alert.tsx | 3 +-- components/ui/avatar.tsx | 3 +-- components/ui/badge.tsx | 3 +-- components/ui/breadcrumb.tsx | 3 +-- components/ui/button-group.tsx | 2 +- components/ui/button.tsx | 3 +-- components/ui/calendar.tsx | 2 +- components/ui/card.tsx | 3 +-- components/ui/carousel.tsx | 2 +- components/ui/chart.tsx | 3 +-- components/ui/checkbox.tsx | 3 +-- components/ui/combobox.tsx | 2 +- components/ui/command.tsx | 2 +- components/ui/context-menu.tsx | 3 +-- components/ui/dialog.tsx | 2 +- components/ui/drawer.tsx | 3 +-- components/ui/dropdown-menu.tsx | 3 +-- components/ui/empty.tsx | 3 +-- components/ui/field.tsx | 2 +- components/ui/form.tsx | 2 +- components/ui/hover-card.tsx | 3 +-- components/ui/input-group.tsx | 2 +- components/ui/input-otp.tsx | 3 +-- components/ui/input.tsx | 3 +-- components/ui/item.tsx | 2 +- components/ui/kbd.tsx | 2 +- components/ui/label.tsx | 3 +-- components/ui/menubar.tsx | 3 +-- components/ui/native-select.tsx | 3 +-- components/ui/navigation-menu.tsx | 3 +-- components/ui/pagination.tsx | 2 +- components/ui/popover.tsx | 3 +-- components/ui/progress.tsx | 3 +-- components/ui/radio-group.tsx | 3 +-- components/ui/resizable.tsx | 3 +-- components/ui/scroll-area.tsx | 3 +-- components/ui/select.tsx | 3 +-- components/ui/separator.tsx | 3 +-- components/ui/sheet.tsx | 3 +-- components/ui/sidebar.tsx | 2 +- components/ui/skeleton.tsx | 2 +- components/ui/slider.tsx | 3 +-- components/ui/spinner.tsx | 3 +-- components/ui/switch.tsx | 3 +-- components/ui/table.tsx | 3 +-- components/ui/tabs.tsx | 3 +-- components/ui/textarea.tsx | 3 +-- components/ui/toggle-group.tsx | 2 +- components/ui/toggle.tsx | 3 +-- components/ui/tooltip.tsx | 3 +-- package.json | 1 + pnpm-lock.yaml | 5 ++++- 54 files changed, 57 insertions(+), 89 deletions(-) diff --git a/components/ui/accordion.tsx b/components/ui/accordion.tsx index f746814..a3ea6f1 100644 --- a/components/ui/accordion.tsx +++ b/components/ui/accordion.tsx @@ -1,11 +1,10 @@ "use client" import * as React from "react" +import { cn } from "cn" import { ChevronDownIcon } from "lucide-react" import { Accordion as AccordionPrimitive } from "radix-ui" -import { cn } from "@/lib/utils" - function Accordion({ ...props }: React.ComponentProps) { return } diff --git a/components/ui/alert-dialog.tsx b/components/ui/alert-dialog.tsx index 91eb573..65aa608 100644 --- a/components/ui/alert-dialog.tsx +++ b/components/ui/alert-dialog.tsx @@ -1,9 +1,9 @@ "use client" import * as React from "react" +import { cn } from "cn" import { AlertDialog as AlertDialogPrimitive } from "radix-ui" -import { cn } from "@/lib/utils" import { Button } from "@/components/ui/button" function AlertDialog({ ...props }: React.ComponentProps) { diff --git a/components/ui/alert.tsx b/components/ui/alert.tsx index 2ecd1b4..722993c 100644 --- a/components/ui/alert.tsx +++ b/components/ui/alert.tsx @@ -1,7 +1,6 @@ import * as React from "react" import { cva, type VariantProps } from "class-variance-authority" - -import { cn } from "@/lib/utils" +import { cn } from "cn" const alertVariants = cva( "relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", diff --git a/components/ui/avatar.tsx b/components/ui/avatar.tsx index 7fd54e6..7a80e8b 100644 --- a/components/ui/avatar.tsx +++ b/components/ui/avatar.tsx @@ -1,10 +1,9 @@ "use client" import * as React from "react" +import { cn } from "cn" import { Avatar as AvatarPrimitive } from "radix-ui" -import { cn } from "@/lib/utils" - function Avatar({ className, size = "default", diff --git a/components/ui/badge.tsx b/components/ui/badge.tsx index 5f4f4d4..a2c6ef6 100644 --- a/components/ui/badge.tsx +++ b/components/ui/badge.tsx @@ -1,9 +1,8 @@ import * as React from "react" import { cva, type VariantProps } from "class-variance-authority" +import { cn } from "cn" import { Slot } from "radix-ui" -import { cn } from "@/lib/utils" - const badgeVariants = cva( "inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3", { diff --git a/components/ui/breadcrumb.tsx b/components/ui/breadcrumb.tsx index b89bffd..1844713 100644 --- a/components/ui/breadcrumb.tsx +++ b/components/ui/breadcrumb.tsx @@ -1,9 +1,8 @@ import * as React from "react" +import { cn } from "cn" import { ChevronRight, MoreHorizontal } from "lucide-react" import { Slot } from "radix-ui" -import { cn } from "@/lib/utils" - function Breadcrumb({ ...props }: React.ComponentProps<"nav">) { return