import { type ReactNode } from "react"; import { type StyleProp, type ViewStyle } from "../../style/index.js"; import { type DialogSkin } from "./dialog.styles.js"; export interface DialogProps { children?: ReactNode; title?: string; description?: string; withBody?: boolean; trigger?: string; confirmLabel?: string; cancelLabel?: string; open?: boolean; onOpenChange?: (open: boolean) => void; destructive?: boolean; xs?: boolean; small?: boolean; medium?: boolean; large?: boolean; wide?: boolean; onConfirm?: () => void; onCancel?: () => void; /** E2E hook forwarded to the root element. */ testID?: string; /** * Presents the dialog OVER the page instead of inline where it is mounted. * * The default is a contained overlay: a scrim with its own height, sitting in * normal flow, which is what the docs catalogue needs to show a dialog inside * an example stage. An application confirming a destructive action needs the * opposite, and the inline form is actively wrong there: it appends a scrim * wherever the component happens to sit, leaves the page behind scrollable and * clickable, and still claims `aria-modal`. * * With `overlay`, the dialog teleports into the nearest `OverlayProvider` and * fills it, so `aria-modal` becomes true rather than aspirational. Mount an * `OverlayProvider` at the app root for this to cover the screen. */ overlay?: boolean; /** * The dialog's accessible name, for the case where `children` supply the panel * body. Children REPLACE the built-in title/description, so there is no * element left for `aria-labelledby` to point at, and the dialog would * otherwise be announced with no name at all. That is merely poor for a * `dialog` and invalid for the `alertdialog` a destructive confirm renders. */ accessibilityLabel?: string; /** Outer layout composition only (width/flex within a parent), never a restyle hook. */ style?: StyleProp; } /** Build a Dialog component from a platform skin. */ export declare function createDialog(skin: DialogSkin): (props: DialogProps) => import("react").JSX.Element; //# sourceMappingURL=dialog.shared.d.ts.map