import React from 'react'; import type { AriaModalOverlayProps } from 'react-aria'; export type DrawerPlacement = 'start' | 'end' | 'top' | 'bottom'; export type DrawerSize = 'sm' | 'md' | 'lg'; export interface DrawerProps extends AriaModalOverlayProps { /** Whether the drawer is shown. */ isOpen?: boolean; /** Called with the next open state — `false` when the drawer asks to close. */ onOpenChange?: (isOpen: boolean) => void; /** * Which edge it enters from. `start` and `end` follow writing direction, so * a right-hand drawer in English is a left-hand one in Arabic without a * second variant. */ placement?: DrawerPlacement; size?: DrawerSize; /** Required: the dialog's accessible name, wired via `aria-labelledby`. */ title: React.ReactNode; /** Supporting copy under the title. */ description?: React.ReactNode; /** Action row, pinned to the bottom edge. */ footer?: React.ReactNode; showClose?: boolean; closeLabel?: string; children?: React.ReactNode; className?: string; } /** * Drawer — a modal panel anchored to an edge. * * WHY IT IS A MODAL AND NOT A SIDEBAR * * It takes focus, traps it, closes on Escape and on an outside click, and marks * the rest of the page inert — all of `Modal`'s behaviour, differing only in * where the panel sits and how it enters. A persistent side panel that does not * do those things is layout, not a drawer, and belongs in the page rather than * in an overlay. * * WHEN TO REACH FOR MODAL INSTEAD * * A drawer suits work that is long or list-shaped — filters, a record's detail, * a sequence of settings — because an edge panel can be tall without becoming a * square that fights the viewport. A decision, especially a destructive one, * belongs in a Modal: it is centred, it is smaller, and it does not invite * scrolling past the thing being confirmed. * * RENDERS NOTHING WHEN CLOSED, and portals when open, for the reasons recorded * on Modal: a closed overlay left in the tree is still keyboard-focusable, and * an inline one inherits whatever `overflow` and stacking context surrounds it. */ export declare const Drawer: React.ForwardRefExoticComponent>; //# sourceMappingURL=Drawer.d.ts.map