import { type ReactNode } from "react"; import { type StyleProp, type ViewStyle } from "../../style/index.js"; import { Button as WebButton } from "../../atoms/button/button.js"; import { Input as WebInput } from "../../atoms/input/input.js"; import { type Size, type DialogSkin } from "./dialog.styles.js"; import { type AnatomyTarget } from "../../style/anatomy.js"; export interface DialogProps { /** Structured form: a named header and close action above scrolling body/footer content. */ form?: boolean; /** Give an overlay form a viewport-bounded body that fills between its fixed header and footer. */ workspace?: boolean; /** Let a workspace hug short content and grow only up to its viewport bound. */ compact?: boolean; /** Extra content in the fixed header of a workspace form, below its title and description. */ workspaceHeader?: ReactNode; /** Content beside the form title, such as a workflow's progress status. */ headerAccessory?: ReactNode; /** A fixed side rail beside a workspace's scrolling body. */ workspaceSidebar?: ReactNode; /** Custom actions after the form body; fixed below the body in workspace mode. */ footer?: ReactNode; /** * Draw the reference's shared workflow panel as three bands split by hairline rules: the header * (title, `headerAccessory` and optional `workspaceHeader`), body, and footer. A * `workspaceSidebar` stays beside the body. Embedded panels keep their opaque in-page * surface without a veil or close action; live panels keep modal presentation. */ banded?: boolean; /** * Banded only: the header is a 44 px top bar like a desktop app window's (the Claude * desktop window's): the title in the 14 medium face, `headerAccessory` after it, * `headerActions` before the close action. The description is not drawn. */ toolbar?: boolean; /** Actions at the end of a `toolbar` header, before the close action. */ headerActions?: ReactNode; /** * A leading glyph for the panel, drawn as the accent's soft tone tile (`Emblem primary * soft`) above the title. Pass an ``; the tile tints and sizes it. */ icon?: ReactNode; /** Maximum form panel width in pixels; defaults to 560. */ panelWidth?: number; 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; /** Cancel when the backdrop is pressed. Off by default, including destructive dialogs. */ dismissible?: boolean; /** * Show the open dialog as a non-modal specimen in the page, for a catalogue or a * showcase: it keeps its look, its dialog role and its labelling, but does not take * focus when it opens, trap Tab, return focus, claim `aria-modal`, or cancel on * Escape, native back or a backdrop press. Ignored with `trigger`, which always opens * a live modal. */ embedded?: 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; } export declare function sizeOf(p: DialogProps): Size; /** * The anatomy part a kit component composed of a Dialog (Wizard) registers on the * dialog's card: its own Panel, which the dialog's AnatomyScope would otherwise hide. * Kit-internal; a Dialog resets it for everything it renders. */ export declare const DialogPanelPart: import("react").Context; /** Build a Dialog component from a platform skin. */ /** * The components a Dialog draws with that look different per platform. The web * builds are the defaults; the iOS and Android entries pass their own, so the docs' * platform columns render them truthfully (a device resolves them by platform either way). */ export interface DialogParts { Button?: typeof WebButton; Input?: typeof WebInput; } export declare function createDialog(skin: DialogSkin, parts?: DialogParts): (props: DialogProps) => import("react").JSX.Element | null; //# sourceMappingURL=dialog.shared.d.ts.map