import React, { type ReactNode, type RefObject } from "react"; import { DialogContent as PrimitiveDialogContent } from "src/primitives/Dialog"; export type DialogSize = "small" | "medium" | "large" | "fullScreen"; /** Radix Dialog.Content props we forward via ...otherProps. */ type DialogContentProps = React.ComponentProps; export interface DialogProps extends Omit { /** Size of the dialog. */ size?: DialogSize; /** Whether the dialog is open. */ isOpen?: boolean; /** Callback invoked when the dialog is closed. */ onClose?: () => void; /** Content rendered inside the dialog. */ children?: ReactNode; /** Additional CSS class names applied to the dialog content. */ className?: string; /** Close on pressing the Esc key. */ closeOnEsc?: boolean; /** Show the close button. */ closeButton?: boolean; /** Additional CSS class names applied to the backdrop/overlay. */ backdropClassName?: string; /** Close on clicking outside the dialog. */ closeOnOutsideClick?: boolean; /** Ref of the element to receive focus when the dialog opens. */ initialFocusRef?: RefObject; /** Ref of the element to receive focus when the dialog closes. */ finalFocusRef?: RefObject; /** Whether to block body scroll when the dialog is mounted. Maps to Radix `modal` prop. */ blockScrollOnMount?: boolean; /** Force children to re-render even when the dialog is closed. */ forceRender?: boolean; /** Radix Dialog `modal` prop — takes precedence over blockScrollOnMount. */ modal?: boolean; /** Radix Dialog `defaultOpen` prop. */ defaultOpen?: boolean; } interface DialogSubcomponentProps extends React.ComponentProps<"div"> { children?: ReactNode; className?: string; /** Custom data-testid attribute. */ dataTestid?: string; } declare const DialogHeader: React.ForwardRefExoticComponent & React.RefAttributes>; declare const DialogBody: React.ForwardRefExoticComponent & React.RefAttributes>; declare const DialogFooter: React.ForwardRefExoticComponent & React.RefAttributes>; declare const DialogTitle: React.ForwardRefExoticComponent, "ref"> & React.RefAttributes>; declare const Dialog: React.ForwardRefExoticComponent> & { Header: typeof DialogHeader; Body: typeof DialogBody; Footer: typeof DialogFooter; Title: typeof DialogTitle; }; export { Dialog };