import type { ReactNode } from 'react'; import type { AriaLabelingProps, CommonProps } from '../types.js'; export interface DrawerRootProps { /** The drawer trigger with its associated drawer. Provide the trigger as the first child, and the drawer as the second child. */ children: ReactNode; /** Whether the drawer is open (controlled). */ isOpen?: boolean; /** Whether the drawer is open by default (uncontrolled). */ defaultOpen?: boolean; /** Handler that is called when the drawer's open state changes. */ onOpenChange?: (isOpen: boolean) => void; } /** * Encapsulates a drawer trigger and its associated drawer. * The trigger can be any Cimpress UI button, and the drawer will be displayed when the trigger is activated. */ export declare function DrawerRoot(props: DrawerRootProps): import("react/jsx-runtime").JSX.Element; export declare namespace DrawerRoot { var displayName: string; } export interface DrawerRenderProps { /** Closes the drawer when called. */ close: () => void; } export interface DrawerProps extends CommonProps, AriaLabelingProps { /** The contents of the drawer. A function may be provided to access a function to close the drawer. */ children: ReactNode | ((renderProps: DrawerRenderProps) => ReactNode); /** The title of the drawer. */ title?: string; /** * The size of the drawer. This prop is ignored on small devices - drawers on small devices will always take up all available width. * @default 'small' */ size?: 'small' | 'medium' | 'large'; /** * Whether the drawer can be closed by clicking the close button, clicking outside of the drawer, or pressing the Escape key. * When `false`, the drawer can only be closed programmatically. * @default true */ isDismissible?: boolean; /** * Whether the drawer is open (controlled). * If using `DrawerRoot`, this prop has no effect - provide `isOpen` to `DrawerRoot` instead. */ isOpen?: boolean; /** * Whether the drawer is open by default (uncontrolled). * If using `DrawerRoot`, this prop has no effect - provide `defaultOpen` to `DrawerRoot` instead. */ defaultOpen?: boolean; /** * Handler that is called when the drawer's open state changes. * If using `DrawerRoot`, this prop has no effect - provide `onOpenChange` to `DrawerRoot` instead. */ onOpenChange?: (isOpen: boolean) => void; /** * The placement of the drawer. * @default 'end' */ UNSTABLE_placement?: 'start' | 'end'; } /** * Displays an overlay element which blocks interaction with outside elements. * * See [drawer usage guidelines](https://ui.cimpress.io/components/drawer/). */ declare const _Drawer: (props: DrawerProps & import("react").RefAttributes) => import("react").JSX.Element | null; export { _Drawer as Drawer }; export interface DrawerBodyProps { /** The content to render within the drawer. */ children: ReactNode; } /** Renders content within `Drawer`. */ export declare function DrawerBody(props: DrawerBodyProps): import("react/jsx-runtime").JSX.Element; export declare namespace DrawerBody { var displayName: string; } export interface DrawerActionsProps { /** Actions that should be available in the drawer. */ children: ReactNode; } /** Renders actions within `Drawer`. */ export declare function DrawerActions({ children, ...props }: DrawerActionsProps): import("react/jsx-runtime").JSX.Element; export declare namespace DrawerActions { var displayName: string; } //# sourceMappingURL=drawer.d.ts.map