UNPKG

reakit

Version:

Toolkit for building accessible rich web apps with React

36 lines (35 loc) 3 kB
/// <reference types="react" /> import { DialogOptions, DialogHTMLProps } from "../Dialog/Dialog"; import { PopoverStateReturn } from "./PopoverState"; export declare type PopoverOptions = DialogOptions & Pick<Partial<PopoverStateReturn>, "unstable_popoverRef" | "unstable_popoverStyles">; export declare type PopoverHTMLProps = DialogHTMLProps; export declare type PopoverProps = PopoverOptions & PopoverHTMLProps; export declare const usePopover: { (options?: PopoverOptions | undefined, htmlProps?: import("..").RoleHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").RoleHTMLProps; unstable_propsAreEqual: (prev: import("..").RoleOptions & Pick<Partial<import("..").DisclosureStateReturn>, "visible" | "baseId" | "animated" | "animating" | "stopAnimation"> & Pick<Partial<import("..").DialogStateReturn>, "hide" | "modal" | "unstable_disclosureRef"> & Pick<import("..").DialogStateReturn, "baseId"> & { hideOnEsc?: boolean | undefined; hideOnClickOutside?: boolean | undefined; preventBodyScroll?: boolean | undefined; unstable_initialFocusRef?: import("react").RefObject<HTMLElement> | undefined; unstable_finalFocusRef?: import("react").RefObject<HTMLElement> | undefined; unstable_orphan?: boolean | undefined; unstable_autoFocusOnShow?: boolean | undefined; unstable_autoFocusOnHide?: boolean | undefined; } & Pick<Partial<PopoverStateReturn>, "unstable_popoverRef" | "unstable_popoverStyles"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & { wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined; }, next: import("..").RoleOptions & Pick<Partial<import("..").DisclosureStateReturn>, "visible" | "baseId" | "animated" | "animating" | "stopAnimation"> & Pick<Partial<import("..").DialogStateReturn>, "hide" | "modal" | "unstable_disclosureRef"> & Pick<import("..").DialogStateReturn, "baseId"> & { hideOnEsc?: boolean | undefined; hideOnClickOutside?: boolean | undefined; preventBodyScroll?: boolean | undefined; unstable_initialFocusRef?: import("react").RefObject<HTMLElement> | undefined; unstable_finalFocusRef?: import("react").RefObject<HTMLElement> | undefined; unstable_orphan?: boolean | undefined; unstable_autoFocusOnShow?: boolean | undefined; unstable_autoFocusOnHide?: boolean | undefined; } & Pick<Partial<PopoverStateReturn>, "unstable_popoverRef" | "unstable_popoverStyles"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & { wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined; }) => boolean; __keys: readonly any[]; __useOptions: (options: PopoverOptions, htmlProps: import("..").RoleHTMLProps) => PopoverOptions; }; export declare const Popover: import("reakit-system/ts/createComponent").Component<"div", PopoverOptions>;