"use client"; import * as React from "react"; import { Dialog as SheetPrimitive } from "@base-ui/react/dialog"; import { cn } from "@/lib/utils"; import { Button } from "@/components/ui/button"; import { XIcon } from "lucide-react"; function Sheet({ ...props }: SheetPrimitive.Root.Props) { return ; } function SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props) { return ; } function SheetClose({ ...props }: SheetPrimitive.Close.Props) { return ; } function SheetPortal({ ...props }: SheetPrimitive.Portal.Props) { return ; } function SheetOverlay({ className, ...props }: SheetPrimitive.Backdrop.Props) { return ( ); } function SheetContent({ className, children, side = "right", showCloseButton = true, ...props }: SheetPrimitive.Popup.Props & { side?: "top" | "right" | "bottom" | "left"; showCloseButton?: boolean; }) { return ( {/* forceRender: Base UI skips the backdrop entirely for a NESTED dialog (`enabled: forceRender || !nested`). Without it a sheet opened from inside another sheet has no backdrop, so nothing covers the parent popup — which Base UI has marked inert. Clicks there are swallowed by `inert` and never reach the dismiss logic, so the nested sheet cannot be closed by clicking outside it. Non-nested sheets are unaffected. */} {children} {showCloseButton && ( } > Close )} ); } function SheetHeader({ className, ...props }: React.ComponentProps<"div">) { return
; } function SheetFooter({ className, ...props }: React.ComponentProps<"div">) { return
; } function SheetTitle({ className, ...props }: SheetPrimitive.Title.Props) { return ( ); } function SheetDescription({ className, ...props }: SheetPrimitive.Description.Props) { return ( ); } export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription };