import type { FC, ReactNode } from 'react'; import type { TriggerProps } from '../../utils/primitiveProps.js'; import type { SxProp } from '../Layout/sx.js'; import type { CSSProperties } from 'react'; export type DrawerSide = 'left' | 'right' | 'top' | 'bottom'; export type DrawerSize = 'sm' | 'md' | 'lg' | 'xl'; export interface DrawerProps { /** Controlled open state. */ open?: boolean; /** Uncontrolled initial open state. */ defaultOpen?: boolean; /** Fires when the open state changes (Esc, backdrop, or close button). */ onOpenChange?: (open: boolean) => void; /** Whether the drawer blocks interaction with the rest of the page. Default: true. */ modal?: boolean; /** Visible heading for the drawer. Required for AT. */ title: ReactNode; /** Optional subhead under the title. */ description?: ReactNode; /** Body content. */ children?: ReactNode; /** Footer (typically Buttons). */ footer?: ReactNode; /** Edge the drawer slides in from. Default: `right`. */ side?: DrawerSide; /** Width preset (for left/right) or height preset (for top/bottom). Default: `md`. */ size?: DrawerSize; /** Hide the built-in X close button. */ hideClose?: boolean; /** Unsaved changes. While true, close attempts go through `onBeforeClose` (or are blocked if it is absent). */ dirty?: boolean; /** Guard for close attempts (Esc, backdrop, X, swipe). Return `false` (or resolve `false`) to keep the drawer open. */ onBeforeClose?: () => boolean | Promise; /** Fires when focus moves into the drawer on open; call `preventDefault()` to place focus yourself. Default: first form field in the body, else the Close button. */ onOpenAutoFocus?: (event: Event) => void; /** Drag the panel toward its edge on touch to close it. Default: false. */ swipeToClose?: boolean; /** Extra className on the drawer content. */ className?: string; /** Inline style on the drawer content panel. */ style?: CSSProperties; /** * One-off CSS for the drawer content panel, same as `Box`'s `sx`: each value * may be a scalar or a responsive breakpoint map (`{ base, sm, md, lg, xl }`). * Scalar-only sx merges into inline style; responsive sx injects a scoped class. */ sx?: SxProp; } /** * Off-canvas drawer / sheet. Slides in from any edge. Built on * @radix-ui/react-dialog so it gets focus trapping, Esc-to-close, scroll * lock, and accessibility for free. * * @example * * * */ export declare const Drawer: import("react").ForwardRefExoticComponent>; export type DrawerTriggerProps = TriggerProps; export declare const DrawerTrigger: FC; export type DrawerCloseProps = TriggerProps; export declare const DrawerClose: FC;