import type { DialogHTMLAttributes } from 'react'; import type { DefaultProps } from '../../types'; import type { MergeRight } from '../../utilities'; export type DialogProps = MergeRight, { /** * Screen reader label of close button. Set false to hide the close button. * @default 'Lukk dialogvindu' */ closeButton?: string | false; /** * Light dismiss behavior, allowing to close on backdrop click by setting `closedby="any"`. * * @see [mdn closedBy](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/closedBy) * * @default 'closerequest' */ closedby?: 'none' | 'closerequest' | 'any'; /** * When not center, displays dialog as a "drawer" from the specified side. * * @default 'center' */ placement?: 'center' | 'left' | 'right' | 'top' | 'bottom'; /** * Toogle modal and non-modal dialog. * * @see [mdn modal dialog](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog#creating_a_modal_dialog) * * @default true */ modal?: boolean; /** * @note Unlike standard html, where the open attribute always opens a non-modal dialog, Dialog's open prop uses the `modal` prop to determine whether the Dialog is modal or non-modal */ open?: boolean; /** * Callback that is called when the dialog is closed. */ onClose?: (event: Event) => void; /** * Change the default rendered element for the one passed as a child, merging their props and behavior. * @default false * * @deprecated Will be removed in the next major version. Should always be a `` element */ asChild?: boolean; }>; /** * Dialog component, used to display a dialog dialog. * * @example with TriggerContext * * Open Dialog * * * Content * * * * * @example without TriggerContext * const dialogRef = useRef(null); * * ... * * * * Content * */ export declare const Dialog: import("react").ForwardRefExoticComponent, "asChild" | "open" | "placement" | "closedby" | "onClose" | "closeButton" | "modal"> & { /** * Screen reader label of close button. Set false to hide the close button. * @default 'Lukk dialogvindu' */ closeButton?: string | false; /** * Light dismiss behavior, allowing to close on backdrop click by setting `closedby="any"`. * * @see [mdn closedBy](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/closedBy) * * @default 'closerequest' */ closedby?: "none" | "closerequest" | "any"; /** * When not center, displays dialog as a "drawer" from the specified side. * * @default 'center' */ placement?: "center" | "left" | "right" | "top" | "bottom"; /** * Toogle modal and non-modal dialog. * * @see [mdn modal dialog](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog#creating_a_modal_dialog) * * @default true */ modal?: boolean; /** * @note Unlike standard html, where the open attribute always opens a non-modal dialog, Dialog's open prop uses the `modal` prop to determine whether the Dialog is modal or non-modal */ open?: boolean; /** * Callback that is called when the dialog is closed. */ onClose?: (event: Event) => void; /** * Change the default rendered element for the one passed as a child, merging their props and behavior. * @default false * * @deprecated Will be removed in the next major version. Should always be a `` element */ asChild?: boolean; } & import("react").RefAttributes>; //# sourceMappingURL=dialog.d.ts.map