import type { FC, ReactNode } from 'react'; import type { TriggerProps } from '../../utils/primitiveProps.cjs'; import type { SxProp } from '../Layout/sx.cjs'; import type { CSSProperties } from 'react'; export type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full'; export interface DialogProps { /** Controlled open state. */ open?: boolean; /** Uncontrolled initial open state. */ defaultOpen?: boolean; /** Fires when the open state changes (Esc, backdrop, or close button). */ onOpenChange?: (open: boolean) => void; /** Whether the dialog blocks interaction with the rest of the page. Default: true. */ modal?: boolean; /** Title rendered as the visible h2. Required for accessibility. */ title: ReactNode; /** Optional descriptive subhead under the title. */ description?: ReactNode; /** Body content (forms, copy, lists). */ children?: ReactNode; /** Footer node (typically a Button row). */ footer?: ReactNode; /** Width preset. Default: `md`. */ size?: DialogSize; /** Hide the built-in X close button. */ hideClose?: boolean; /** Close when Esc is pressed. Default: true. Set false for dialogs that must be closed by their own buttons. */ closeOnEscape?: boolean; /** Close on a click (or focus move) outside the dialog, e.g. on the backdrop. Default: true. */ closeOnOutsideClick?: boolean; /** Body without padding or its own scroll — for content that lays itself out (split panes, own scroll areas). */ flush?: boolean; /** Unsaved changes. While true, close attempts go through `onBeforeClose` (or are blocked if it is absent). */ dirty?: boolean; /** Guard for close attempts (Esc, backdrop, X). Return `false` (or resolve `false`) to keep the dialog open. */ onBeforeClose?: () => boolean | Promise; /** Fires when focus moves into the dialog on open; call `preventDefault()` to place focus yourself. Default: first form field in the body, else the Close button. */ onOpenAutoFocus?: (event: Event) => void; /** Extra className on the dialog content. */ className?: string; /** Inline style on the dialog content panel. */ style?: CSSProperties; /** * One-off CSS for the dialog content panel, same as `Box`'s `sx`: each value * may be a scalar or a responsive breakpoint map (`{ base, sm, md, lg, xl }`). * Scalar-only sx merges into inline style; responsive sx injects a scoped class. */ sx?: SxProp; } /** * Modal dialog built on @radix-ui/react-dialog. Includes a backdrop, focus trap, * Esc-to-close, scroll lock, and an accessible title/description out of the box. * * @example * const [open, setOpen] = useState(false); * * This action can't be undone. * */ export declare const Dialog: import("react").ForwardRefExoticComponent>; /** Trigger button to open a Dialog when wired with a controlled root. */ export type DialogTriggerProps = TriggerProps; export declare const DialogTrigger: FC; /** Close button — typically used inside the body or footer. */ export type DialogCloseProps = TriggerProps; export declare const DialogClose: FC;