/** * The shell Modal and Sheet share. They are one component with two geometries — * a centered card and an edge that slides — so the chrome (title, description, * the close affordance, the header/footer slots) is written once and the only * thing either passes down is where its popup sits. * * Base UI's Dialog supplies the three behaviors that are miserable by hand and * invisible when wrong: the focus trap, Esc, and the page's scroll lock. */ import { Dialog } from "@base-ui/react/dialog"; import type { ComponentProps, CSSProperties, ReactNode } from "react"; import { type KitEngine, type KitRendered, type KitStyled } from "../tokens.js"; export type OverlaySize = "small" | "medium" | "large"; /** * Shared by both geometries — Sheet adds `side` on top. * * `open` and `onClose` are BOTH required, and that is the type doing the same * job the spec does for generated screens: every way out of a dialog — the X, * Esc, the backdrop — does nothing but call `onClose`, so `` * without one is a person shut behind a dialog that cannot be dismissed. It * must not compile. * * Not a discriminated union, because there is no uncontrolled dialog to be the * union's other arm: `Dialog.Root` is always handed `open`, and this takes no * trigger and no `defaultOpen`. A union would model a mode that does not exist * — requiring both is the smaller shape that makes the same call unrepresentable. */ export interface DialogProps extends KitStyled { open: boolean; onClose: () => void; title?: string; description?: string; size?: OverlaySize; /** Elements along the top edge, beside the title. */ header?: ReactNode; /** The buttons under the content. */ footer?: ReactNode; children?: ReactNode; } /** Any Base UI `` prop neither geometry models, handed straight to * the popup — the surface a caller means by "the dialog", which is where its * `style` lands too, not the portal or the backdrop. */ export type DialogEngineProps = KitEngine, DialogProps>; /** The one measure both geometries read: a Modal's width, a Sheet's depth. */ export declare const EXTENT: Record; /** The dismiss affordance every overlay carries, dialog and toast alike. */ export declare const closeStyle: CSSProperties; export declare function DialogShell({ kind, popupStyle, open, onClose, title, description, header, footer, children, style, pending, ...engine }: DialogProps & DialogEngineProps & KitRendered & { kind: "Modal" | "Sheet"; popupStyle: CSSProperties; }): import("react").JSX.Element;