import * as React from 'react'; import * as DialogPrimitive from '@radix-ui/react-dialog'; import { XIcon } from 'lucide-react'; import { cn } from '../../lib/utils'; import { VisuallyHidden } from './visually-hidden'; function Dialog({ ...props }: React.ComponentProps) { return ; } function DialogTrigger({ ...props }: React.ComponentProps) { return ; } function DialogPortal({ ...props }: React.ComponentProps) { return ; } function DialogClose({ ...props }: React.ComponentProps) { return ; } function DialogOverlay({ className, transparent = false, ...props }: React.ComponentProps & { transparent?: boolean; }) { return ( ); } function DialogContent({ className, children, showCloseButton = true, transparentOverlay = false, ...props }: React.ComponentProps & { showCloseButton?: boolean; transparentOverlay?: boolean; }) { const hasTitle = React.Children.toArray(children).some((child) => { if (!React.isValidElement(child)) { return false; } return child.type === DialogTitle; }); return ( {!hasTitle && ( Dialog )} {children} {showCloseButton && ( Close )} ); } function DialogHeader({ className, ...props }: React.ComponentProps<'div'>) { return (
); } function DialogFooter({ className, ...props }: React.ComponentProps<'div'>) { return (
); } function DialogTitle({ className, ...props }: React.ComponentProps) { return ( ); } function DialogDescription({ className, ...props }: React.ComponentProps) { return ( ); } export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, VisuallyHidden, };