import { AriaRole, CSSProperties, ReactNode } from 'react'; export type DrawerAnchor = 'bottom' | 'top' | 'start' | 'end'; export type DrawerCloseReason = 'outside-press' | 'escape-key' | 'drag' | 'focus-out'; export interface DrawerProps { /** Applies a data-hook HTML attribute that can be used in the tests. */ dataHook?: string; /** Specifies whether the drawer is open. When `false`, the drawer content isn't rendered in the DOM. */ open: boolean; /** Accepts any content to render inside the drawer. */ children: ReactNode; /** Displays the drag handle and enables expand and collapse functionality. When enabled, the drawer can also be dragged directly by its content via touch or pen, following the same snap-point and scroll rules as the handle. Mouse drags on the content are left free to select text. * @default true */ resizable?: boolean; /** Sets the heights the drawer snaps to when dragged. A number up to 1 is a fraction of the content height, and a larger number or a string such as `'300px'` is a height in pixels. The drawer opens at the first snap point. * @default [1] */ snapPoints?: (number | string)[]; /** Specifies whether the drawer can be dismissed by clicking outside of it, pressing Esc or dragging it below its lowest snap point. * @default true */ dismissible?: boolean; /** Specifies whether the backdrop overlay is colored. When `false`, the overlay is still present and blocks clicks on the content behind it, but it's invisible. * @default true */ backdrop?: boolean; /** Specifies whether the backdrop overlay is rendered at all. When `false`, the overlay element isn't rendered in the DOM. * @default true */ renderBackdrop?: boolean; /** Specifies whether the drawer content box has a margin from the screen edges and rounded bottom corners. * @default true */ margin?: boolean; /** Defines a callback function which is called when the user dismisses the drawer. `reason` is `'outside-press'` when the overlay is clicked, `'escape-key'` when the Esc key is pressed, `'drag'` when the drawer is dragged below its lowest snap point and `'focus-out'` when focus leaves a non-modal drawer. It's called only when `dismissible` is `true`. */ onClose: (open: boolean, reason: DrawerCloseReason) => void; /** Sets the `aria-labelledby` attribute on the drawer content. */ ariaLabelledBy?: string; /** Sets the WAI-ARIA role of the drawer content. * @default 'dialog' */ role?: AriaRole; /** Sets the z-index of the drawer and its overlay. * @default 1000 */ zIndex?: CSSProperties['zIndex']; /** Whether the drawer content should be wrapped in a scrollable container, by default it is true. If false, the drawer content is rendered as is, without any scrollable container. * @default true */ scrollable?: boolean; /** When true, repositions the drawer upward when the on-screen keyboard appears on mobile, keeping inputs visible. When false, falls back to default browser scroll behavior. * @default true */ repositionInputs?: boolean; /** When false, the drawer behaves as a non-modal dialog: focus isn't trapped, and content outside the drawer remains interactive. Set to true to trap focus and block outside interaction. * @default true */ modal?: boolean; /** Controls the screen edge the drawer is anchored to and slides in from. `start` and `end` follow the reading direction, so `start` is the left edge in LTR and the right edge in RTL. Snap points, dragging and dismissing follow the same axis. * @default 'bottom' */ anchor?: DrawerAnchor; } //# sourceMappingURL=Drawer.types.d.ts.map