import { Drawer as Primitive } from "@base-ui/react/drawer"; import type { ReactNode } from "react"; import { type StateClassName } from "./class-name.ts"; export declare const DrawerRoot: typeof Primitive.Root; export declare const DrawerTrigger: Primitive.Trigger; export declare const DrawerPortal: Primitive.Portal; export declare const DrawerBackdrop: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; export declare const DrawerViewport: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; export declare const DrawerPopup: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; export declare const DrawerContent: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; export declare const DrawerHandle: typeof Primitive.Handle; export declare const DrawerSwipeArea: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; export declare const DrawerTitle: Primitive.Title; export declare const DrawerDescription: Primitive.Description; export declare const DrawerClose: Primitive.Close; export type DrawerSide = "left" | "right" | "bottom"; /** * Where the portal mounts, and whether the drawer covers the page or a box inside it. * * A scoped drawer positions itself `absolute` against a container instead of `fixed` against the * viewport, so it MUST be given that container, or it lands in `` and positions against a box * that is not there. The two travel together in the type. * * The container also needs a positioning context of its own (`relative`): `absolute` walks up * to the nearest positioned ancestor, so a static container hands the drawer the whole page * and the "scoped" part quietly does not happen. */ type DrawerPortalTarget = { scoped: true; container: NonNullable; } | { scoped?: false; container?: Primitive.Portal.Props["container"]; }; export type DrawerProps = Omit, "children" | "swipeDirection"> & DrawerPortalTarget & { /** * Which edge it comes from. This also sets `swipeDirection` on the root. The two must agree, * and a mismatch is silent: the drawer looks right and dismisses on a swipe towards the screen * it is attached to. */ side?: DrawerSide; /** Accessible name, for a drawer with no visible `DrawerTitle`. */ label?: string; children?: ReactNode; /** Classes for the popup panel. */ className?: StateClassName; backdropClassName?: StateClassName; viewportClassName?: StateClassName; contentClassName?: StateClassName; /** Popup-level props the wrapper does not own, such as `initialFocus`, `finalFocus` and `data-*`. */ popupProps?: Primitive.Popup.Props; }; /** * A panel that slides in from an edge. Root → portal → backdrop → viewport → popup → content, * composed once here because the parts have to be arranged in exactly this order to work at * all, and because two of the four rules below cost someone a bug that no test would catch. * * Every root prop passes straight through, including `open`, `onOpenChange`, `modal`, `snapPoints`, * `actionsRef` and `data-*`. */ export declare function Drawer({ side, label, scoped, container, className, backdropClassName, viewportClassName, contentClassName, popupProps, children, ...rest }: DrawerProps): import("react").JSX.Element; export {}; //# sourceMappingURL=drawer.d.ts.map