import { CSSProperties, MouseEvent as ReactMouseEvent, ReactNode } from 'react'; /** * Which dismiss path asked the Sheet to close. * * - `"backdrop"` — click on the dimmed overlay behind the panel * - `"escape"` — Escape key * - `"close-button"` — the Sheet's own header ✕ */ export type SheetCloseReason = "backdrop" | "escape" | "close-button"; export interface SheetProps { open: boolean; /** * Called when the Sheet asks to close, with the SOURCE of the request so a * consumer can treat an accidental outside click differently from an explicit * ✕ (e.g. confirm before discarding a dirty form on `"backdrop"`/`"escape"`, * but close straight away on `"close-button"`). * * The argument is ADDITIVE: an existing `() => void` handler stays assignable * (TypeScript allows a function to declare fewer parameters than its target * type), so no call site breaks. */ onClose: (reason: SheetCloseReason) => void; side?: "left" | "right"; width?: string; title?: string; description?: string; className?: string; children: ReactNode; footer?: ReactNode; /** Optional actions rendered in the header, left of the close button. */ headerActions?: ReactNode; /** Extra classes on the header container (e.g. a gradient FormSheet header). */ headerClassName?: string; /** * Inline style on the header container. Setting `--color-text-primary` / * `--color-text-secondary` here re-themes the title/description (and the ghost * close button, which reads `--color-text-secondary`) for dark/gradient headers. */ headerStyle?: CSSProperties; /** * Raises the close-button resting contrast to --color-text-primary for * glass/gradient right-docked panels where the default ghost text-secondary * reads too faint. Default: false (existing usage is pixel-identical). */ closeButtonProminent?: boolean; /** * Right-side panel surface. Both values are OPAQUE — they differ in fill, not in * transparency: * - `"glass"` (default) — the Glass Veil skin: an angled gradient (plus a cyan * radial wash in dark) behind the edge accent and glow. * - `"solid"` — a flat `--color-bg-card` body. * * NB-SHEET-OPAQUE-01: `"glass"` was see-through (0.88–0.94 alpha) until * 2026-08-19 and relied on `backdrop-filter` being painted to stay readable over * dense tables. Where the blur was not painted, the content behind the panel read * through as ghost text, so the gradient stops are now fully opaque. The blur is * kept for the case where a consumer re-introduces a translucent * `--sheet-glass-body`, but the shipped surface no longer depends on it. * * No effect when side="left" (left is always the opaque card surface). */ surface?: "glass" | "solid"; /** * Whether a backdrop click dismisses the Sheet. Default `true` (unchanged * behaviour). `false` makes the overlay inert — `onInteractOutside` still * fires, so a consumer can react (shake, toast) without closing. */ closeOnBackdropClick?: boolean; /** * Whether the Escape key dismisses the Sheet. Default `true` (unchanged * behaviour). `false` keeps the focus trap and scroll lock but ignores Escape; * `onEscapeKeyDown` still fires. */ closeOnEscape?: boolean; /** * Fired on a backdrop click BEFORE the Sheet closes. Call * `event.preventDefault()` to cancel the dismissal and keep the Sheet open * (e.g. to raise an "unsaved changes" confirmation instead). */ onInteractOutside?: (event: ReactMouseEvent) => void; /** * Fired on Escape BEFORE the Sheet closes. Call `event.preventDefault()` to * cancel the dismissal and keep the Sheet open. */ onEscapeKeyDown?: (event: KeyboardEvent) => void; } export declare function Sheet({ open, onClose, side, width, title, description, className, children, footer, headerActions, headerClassName, headerStyle, closeButtonProminent, surface, closeOnBackdropClick, closeOnEscape, onInteractOutside, onEscapeKeyDown, }: SheetProps): import('react').ReactPortal | null; //# sourceMappingURL=Sheet.d.ts.map