import { type ComponentPropsWithoutRef, type HTMLAttributes, type ReactNode } from 'react';
import * as RadixDialog from '@radix-ui/react-dialog';
import { type VariantProps } from 'class-variance-authority';
declare const contentVariants: (props?: ({
size?: "sm" | "md" | "lg" | "fullscreen" | null | undefined;
scroll?: "body" | "surface" | null | undefined;
flush?: boolean | null | undefined;
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
export interface DialogHandle {
getIsOpen: () => boolean;
open: () => void;
close: () => void;
}
export interface DialogRootProps extends ComponentPropsWithoutRef {
/** Opaque instance id — forwarded to Dialog.Content as `data-component-id`. */
id?: string;
}
export interface DialogContentProps extends Omit, 'role'>, VariantProps {
size?: 'sm' | 'md' | 'lg' | 'fullscreen';
variant?: 'default' | 'alert' | 'confirmation';
/**
* Hide the top-right dismiss "X". The default is **variant-aware**: the X is
* shown for `variant="default"` and hidden for `variant="alert"` /
* `"confirmation"` (forced-choice surfaces, where the decision is made via
* the explicit footer actions). An explicit value always wins — pass `false`
* to force the X onto an alert, or `true` to suppress it on a default dialog.
*/
hideCloseButton?: boolean;
/**
* What scrolls once the content passes the height cap (85dvh). `surface`
* (default) scrolls the whole panel, title and footer included. `body`
* keeps `Dialog.Header` and `Dialog.Footer` in view and scrolls only
* `Dialog.Body`, so the content must sit in a `Dialog.Body`. Below 480px
* of viewport height it falls back to scrolling the whole panel.
*/
scroll?: 'surface' | 'body';
/**
* No surface padding, and the surface becomes a column that does not
* scroll itself: for one child that brings its own header, scroll box
* and footer, such as a side panel shown in a dialog. That child must
* fill the column (`flex: 1; min-block-size: 0`) and scroll inside.
*/
flush?: boolean;
className?: string;
children: ReactNode;
}
interface DialogFooterProps extends HTMLAttributes {
divider?: boolean;
}
export declare const Dialog: {
({ children, id, open: openProp, defaultOpen, onOpenChange, modal, ...props }: DialogRootProps): import("react/jsx-runtime").JSX.Element;
displayName: string;
} & {
Root: {
({ children, id, open: openProp, defaultOpen, onOpenChange, modal, ...props }: DialogRootProps): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
Trigger: import("react").ForwardRefExoticComponent, "ref"> & import("react").RefAttributes>;
Content: import("react").ForwardRefExoticComponent>;
Header: import("react").ForwardRefExoticComponent & import("react").RefAttributes>;
Title: import("react").ForwardRefExoticComponent, "ref"> & import("react").RefAttributes>;
Description: import("react").ForwardRefExoticComponent, "ref"> & import("react").RefAttributes>;
Body: import("react").ForwardRefExoticComponent & import("react").RefAttributes>;
Footer: import("react").ForwardRefExoticComponent>;
Close: import("react").ForwardRefExoticComponent, "ref"> & import("react").RefAttributes>;
};
export type { DialogFooterProps };
//# sourceMappingURL=dialog.d.ts.map