diff --git a/apps/v4/registry/bases/base/ui/_registry.ts b/apps/v4/registry/bases/base/ui/_registry.ts index 185cfdd042..6befff838c 100644 --- a/apps/v4/registry/bases/base/ui/_registry.ts +++ b/apps/v4/registry/bases/base/ui/_registry.ts @@ -351,7 +351,7 @@ export const ui: Registry["items"] = [ { name: "drawer", type: "registry:ui", - dependencies: ["vaul"], + dependencies: ["@base-ui/react"], files: [ { path: "ui/drawer.tsx", @@ -363,7 +363,7 @@ export const ui: Registry["items"] = [ docs: "https://ui.shadcn.com/docs/components/base/drawer", examples: "https://raw.githubusercontent.com/shadcn-ui/ui/refs/heads/main/apps/v4/registry/bases/base/examples/drawer-example.tsx", - api: "https://vaul.emilkowal.ski/getting-started", + api: "https://base-ui.com/react/components/drawer.md", }, }, }, diff --git a/apps/v4/registry/bases/base/ui/drawer.tsx b/apps/v4/registry/bases/base/ui/drawer.tsx index 8efcca212b..a7b615c801 100644 --- a/apps/v4/registry/bases/base/ui/drawer.tsx +++ b/apps/v4/registry/bases/base/ui/drawer.tsx @@ -1,42 +1,37 @@ "use client" import * as React from "react" -import { Drawer as DrawerPrimitive } from "vaul" +import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer" import { cn } from "@/registry/bases/base/lib/utils" -function Drawer({ - ...props -}: React.ComponentProps) { +function Drawer({ ...props }: DrawerPrimitive.Root.Props) { return } -function DrawerTrigger({ - ...props -}: React.ComponentProps) { +function DrawerTrigger({ ...props }: DrawerPrimitive.Trigger.Props) { return } -function DrawerPortal({ - ...props -}: React.ComponentProps) { +function DrawerPortal({ ...props }: DrawerPrimitive.Portal.Props) { return } -function DrawerClose({ - ...props -}: React.ComponentProps) { +function DrawerClose({ ...props }: DrawerPrimitive.Close.Props) { return } function DrawerOverlay({ className, ...props -}: React.ComponentProps) { +}: DrawerPrimitive.Backdrop.Props) { return ( - ) @@ -46,21 +41,28 @@ function DrawerContent({ className, children, ...props -}: React.ComponentProps) { +}: DrawerPrimitive.Popup.Props) { return ( - -
- {children} - + +
+ + {children} + + + ) } @@ -69,7 +71,10 @@ function DrawerHeader({ className, ...props }: React.ComponentProps<"div">) { return (
) @@ -85,10 +90,7 @@ function DrawerFooter({ className, ...props }: React.ComponentProps<"div">) { ) } -function DrawerTitle({ - className, - ...props -}: React.ComponentProps) { +function DrawerTitle({ className, ...props }: DrawerPrimitive.Title.Props) { return ( ) { +}: DrawerPrimitive.Description.Props) { return (