import * as React from "react" import { Dialog as DialogPrimitive } from "@base-ui/react/dialog" import { cn } from "@/lib/utils" import { Button } from "@/components/ui/button" import { XIcon } from "lucide-react" export type DialogRootProps = DialogPrimitive.Root.Props export type DialogTriggerProps = DialogPrimitive.Trigger.Props export type DialogPortalProps = DialogPrimitive.Portal.Props export type DialogCloseProps = DialogPrimitive.Close.Props export type DialogOverlayProps = DialogPrimitive.Backdrop.Props export type DialogPopupProps = DialogPrimitive.Popup.Props & { showCloseButton?: boolean size?: "xs" | "sm" | "md" | "lg" | "xl" | "full" surface?: "default" | "plain" } export type DialogHeaderProps = React.ComponentProps<"div"> export type DialogBodyProps = React.ComponentProps<"div"> export type DialogFooterProps = React.ComponentProps<"div"> & { showCloseButton?: boolean } export type DialogTitleProps = DialogPrimitive.Title.Props export type DialogDescriptionProps = DialogPrimitive.Description.Props function Dialog({ ...props }: DialogRootProps) { return } function DialogTrigger({ ...props }: DialogTriggerProps) { return } function DialogPortal({ ...props }: DialogPortalProps) { return } function DialogClose({ ...props }: DialogCloseProps) { return } function DialogOverlay({ className, ...props }: DialogOverlayProps) { return ( ) } function DialogContent({ className, children, showCloseButton = true, size = "md", surface = "default", ...props }: DialogPopupProps) { return ( {children} {showCloseButton && ( } > Close )} ) } function DialogHeader({ className, ...props }: DialogHeaderProps) { return (
) } function DialogBody({ className, ...props }: DialogBodyProps) { return (
) } function DialogFooter({ className, showCloseButton = false, children, ...props }: DialogFooterProps) { return (
{children} {showCloseButton && ( }> Close )}
) } function DialogTitle({ className, ...props }: DialogTitleProps) { return ( ) } function DialogDescription({ className, ...props }: DialogDescriptionProps) { return ( ) } export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, }