From 83b943320c0ce968c46f05e4c1457540a20097b9 Mon Sep 17 00:00:00 2001 From: Universe Date: Wed, 18 Feb 2026 21:15:04 +0900 Subject: [PATCH] pnpm dlx shadcn@latest add --all --- editor/components/ui/accordion.tsx | 2 +- editor/components/ui/alert-dialog.tsx | 83 +++-- editor/components/ui/avatar.tsx | 64 +++- editor/components/ui/badge.tsx | 20 +- editor/components/ui/breadcrumb.tsx | 11 +- editor/components/ui/button-group.tsx | 8 +- editor/components/ui/calendar.tsx | 243 +++++++++++--- editor/components/ui/carousel.tsx | 7 +- editor/components/ui/chart.tsx | 176 +++++----- editor/components/ui/checkbox.tsx | 4 +- editor/components/ui/combobox.tsx | 310 ++++++++++++++++++ editor/components/ui/context-menu.tsx | 4 +- editor/components/ui/dialog.tsx | 23 +- editor/components/ui/direction.tsx | 22 ++ editor/components/ui/drawer.tsx | 5 +- editor/components/ui/dropdown-menu.tsx | 2 +- editor/components/ui/empty.tsx | 6 +- editor/components/ui/form.tsx | 91 +++-- editor/components/ui/item.tsx | 20 +- editor/components/ui/kbd.tsx | 2 +- editor/components/ui/menubar.tsx | 2 +- editor/components/ui/native-select.tsx | 11 +- editor/components/ui/navigation-menu.tsx | 234 +++++++------ editor/components/ui/pagination.tsx | 2 +- editor/components/ui/popover.tsx | 43 ++- editor/components/ui/radio-group.tsx | 2 +- editor/components/ui/resizable.tsx | 24 +- editor/components/ui/select.tsx | 9 +- editor/components/ui/sheet.tsx | 14 +- editor/components/ui/sidebar.tsx | 18 +- editor/components/ui/slider.tsx | 2 +- editor/components/ui/sonner.tsx | 17 +- editor/components/ui/switch.tsx | 10 +- editor/components/ui/tabs.tsx | 41 ++- editor/components/ui/toggle-group.tsx | 22 +- editor/components/ui/toggle.tsx | 2 +- editor/components/ui/tooltip.tsx | 10 +- .../starterkit-hierarchy/index.tsx | 2 +- editor/package.json | 13 +- pnpm-lock.yaml | 151 +++++---- 40 files changed, 1248 insertions(+), 484 deletions(-) create mode 100644 editor/components/ui/combobox.tsx create mode 100644 editor/components/ui/direction.tsx diff --git a/editor/components/ui/accordion.tsx b/editor/components/ui/accordion.tsx index d42421c5d9..6e095d7771 100644 --- a/editor/components/ui/accordion.tsx +++ b/editor/components/ui/accordion.tsx @@ -1,8 +1,8 @@ "use client"; import * as React from "react"; -import { Accordion as AccordionPrimitive } from "radix-ui"; import { ChevronDownIcon } from "lucide-react"; +import { Accordion as AccordionPrimitive } from "radix-ui"; import { cn } from "@/components/lib/utils/index"; diff --git a/editor/components/ui/alert-dialog.tsx b/editor/components/ui/alert-dialog.tsx index d40b06c389..8c50b49012 100644 --- a/editor/components/ui/alert-dialog.tsx +++ b/editor/components/ui/alert-dialog.tsx @@ -4,7 +4,7 @@ import * as React from "react"; import { AlertDialog as AlertDialogPrimitive } from "radix-ui"; import { cn } from "@/components/lib/utils/index"; -import { buttonVariants } from "@/components/ui/button"; +import { Button } from "@/components/ui/button"; function AlertDialog({ ...props @@ -46,15 +46,19 @@ function AlertDialogOverlay({ function AlertDialogContent({ className, + size = "default", ...props -}: React.ComponentProps) { +}: React.ComponentProps & { + size?: "default" | "sm"; +}) { return ( ); @@ -84,7 +91,7 @@ function AlertDialogFooter({
); @@ -118,40 +128,69 @@ function AlertDialogDescription({ ); } -function AlertDialogAction({ +function AlertDialogMedia({ className, ...props -}: React.ComponentProps) { +}: React.ComponentProps<"div">) { 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) { +}: React.ComponentProps & + Pick, "variant" | "size">) { return ( - + ); } export { AlertDialog, - AlertDialogPortal, - AlertDialogOverlay, - AlertDialogTrigger, + AlertDialogAction, + AlertDialogCancel, AlertDialogContent, - AlertDialogHeader, + AlertDialogDescription, AlertDialogFooter, + AlertDialogHeader, + AlertDialogMedia, + AlertDialogOverlay, + AlertDialogPortal, AlertDialogTitle, - AlertDialogDescription, - AlertDialogAction, - AlertDialogCancel, + AlertDialogTrigger, }; diff --git a/editor/components/ui/avatar.tsx b/editor/components/ui/avatar.tsx index 877f18cefb..c54b23cc4e 100644 --- a/editor/components/ui/avatar.tsx +++ b/editor/components/ui/avatar.tsx @@ -7,13 +7,17 @@ import { cn } from "@/components/lib/utils/index"; function Avatar({ className, + size = "default", ...props -}: React.ComponentProps) { +}: React.ComponentProps & { + size?: "default" | "sm" | "lg"; +}) { return ( ) { + 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, + AvatarBadge, + AvatarGroup, + AvatarGroupCount, +}; diff --git a/editor/components/ui/badge.tsx b/editor/components/ui/badge.tsx index 6e60f91423..a1658d2d03 100644 --- a/editor/components/ui/badge.tsx +++ b/editor/components/ui/badge.tsx @@ -1,22 +1,23 @@ import * as React from "react"; -import { Slot as SlotPrimitive } from "radix-ui"; import { cva, type VariantProps } from "class-variance-authority"; +import { Slot } from "radix-ui"; import { cn } from "@/components/lib/utils/index"; const badgeVariants = cva( - "inline-flex items-center justify-center rounded-full border 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", + "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: - "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90", + default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90", secondary: - "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90", + "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90", destructive: - "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", + "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: - "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground", + "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: { @@ -27,16 +28,17 @@ const badgeVariants = cva( function Badge({ className, - variant, + variant = "default", asChild = false, ...props }: React.ComponentProps<"span"> & VariantProps & { asChild?: boolean }) { - const Comp = asChild ? SlotPrimitive.Slot : "span"; + const Comp = asChild ? Slot.Root : "span"; return ( diff --git a/editor/components/ui/breadcrumb.tsx b/editor/components/ui/breadcrumb.tsx index 1cf13cf2a1..2ef0b0b36a 100644 --- a/editor/components/ui/breadcrumb.tsx +++ b/editor/components/ui/breadcrumb.tsx @@ -1,7 +1,8 @@ import * as React from "react"; -import { Slot as SlotPrimitive } from "radix-ui"; +import { ChevronRight, MoreHorizontal } from "lucide-react"; +import { Slot } from "radix-ui"; + import { cn } from "@/components/lib/utils/index"; -import { ChevronRightIcon, DotsHorizontalIcon } from "@radix-ui/react-icons"; function Breadcrumb({ ...props }: React.ComponentProps<"nav">) { return