import type { ReactNode } from 'react'; import type { AriaLabelingProps, CommonProps } from '../types.js'; export interface ModalDialogRenderProps { /** Closes the modal dialog when called. */ close: () => void; } export interface ModalDialogProps extends CommonProps, AriaLabelingProps { /** The contents of the modal dialog. A function may be provided to access a function to close the modal dialog. */ children: ReactNode | ((renderProps: ModalDialogRenderProps) => ReactNode); /** The title of the modal dialog. */ title: string; /** * The size of the modal dialog. * @default 'medium' */ size?: 'small' | 'medium' | 'large'; /** * Whether the modal dialog can be closed by clicking the close button, clicking outside of the modal dialog, or pressing the Escape key. * When `false`, the modal dialog can only be closed programmatically. * @default true */ isDismissible?: boolean; /** * Whether the modal dialog is open (controlled). * If using `DialogRoot`, this prop has no effect - provide `isOpen` to `DialogRoot` instead. */ isOpen?: boolean; /** * Whether the modal dialog is open by default (uncontrolled). * If using `DialogRoot`, this prop has no effect - provide `defaultOpen` to `DialogRoot` instead. */ defaultOpen?: boolean; /** * Handler that is called when the modal dialog's open state changes. * If using `DialogRoot`, this prop has no effect - provide `onOpenChange` to `DialogRoot` instead. */ onOpenChange?: (isOpen: boolean) => void; } /** * Displays an overlay element which blocks interaction with outside elements. * * See [modal dialog usage guidelines](https://ui.cimpress.io/components/modal-dialog/). */ declare const _ModalDialog: (props: ModalDialogProps & import("react").RefAttributes) => import("react").JSX.Element | null; export { _ModalDialog as ModalDialog }; export interface ModalDialogBodyProps { /** The content to render within the modal dialog. */ children: ReactNode; } /** Renders content within `ModalDialog`. */ export declare function ModalDialogBody(props: ModalDialogBodyProps): import("react/jsx-runtime").JSX.Element; export declare namespace ModalDialogBody { var displayName: string; } export interface ModalDialogActionsProps { /** Actions that should be available in the modal dialog. */ children: ReactNode; } /** Renders actions within `ModalDialog`. */ export declare function ModalDialogActions({ children, ...props }: ModalDialogActionsProps): import("react/jsx-runtime").JSX.Element; export declare namespace ModalDialogActions { var displayName: string; } //# sourceMappingURL=modal-dialog.d.ts.map