@renderlesskit/react
Version:
Collection of headless components/hooks that are accessible, composable, customizable from low level to build your own UI & Design System powered by Reakit
137 lines (136 loc) • 10.3 kB
TypeScript
/// <reference types="react" />
import { PopoverHTMLProps, PopoverOptions } from "reakit";
import { PickerBaseStateReturn } from "./PickerBaseState";
export declare type PickerBaseContentOptions = PopoverOptions & Pick<PickerBaseStateReturn, "dialogId">;
export declare type PickerBaseContentHTMLProps = PopoverHTMLProps;
export declare type PickerBaseContentProps = PickerBaseContentOptions & PickerBaseContentHTMLProps;
export declare const usePickerBaseContent: {
(options?: PickerBaseContentOptions | undefined, htmlProps?: import("reakit").RoleHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("reakit").RoleHTMLProps;
unstable_propsAreEqual: (prev: import("reakit").RoleOptions & Pick<Partial<import("reakit").DisclosureStateReturn>, "baseId" | "visible" | "animating" | "animated" | "stopAnimation"> & Pick<Partial<import("reakit").DialogStateReturn>, "hide" | "modal" | "unstable_disclosureRef"> & Pick<import("reakit").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<import("reakit").PopoverStateReturn>, "unstable_popoverRef" | "unstable_popoverStyles"> & Pick<{
baseId: string;
unstable_idCountRef: import("react").MutableRefObject<number>;
visible: boolean;
animated: number | boolean;
animating: boolean;
setBaseId: import("react").Dispatch<import("react").SetStateAction<string>>;
show: () => void;
hide: () => void;
toggle: () => void;
setVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
setAnimated: import("react").Dispatch<import("react").SetStateAction<number | boolean>>;
stopAnimation: () => void;
modal: boolean;
unstable_disclosureRef: import("react").MutableRefObject<HTMLElement | null>;
setModal: import("react").Dispatch<import("react").SetStateAction<boolean>>;
unstable_referenceRef: import("react").RefObject<HTMLElement | null>;
unstable_popoverRef: import("react").RefObject<HTMLElement | null>;
unstable_arrowRef: import("react").RefObject<HTMLElement | null>;
unstable_popoverStyles: import("react").CSSProperties;
unstable_arrowStyles: import("react").CSSProperties;
unstable_originalPlacement: "auto" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left-start";
unstable_update: () => boolean;
placement: "auto" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left-start";
place: import("react").Dispatch<import("react").SetStateAction<"auto" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left-start">>;
pickerId: string | undefined;
dialogId: string | undefined;
isDisabled: boolean | undefined;
isReadOnly: boolean | undefined;
segmentFocus: (() => void) | undefined;
}, "dialogId"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}, next: import("reakit").RoleOptions & Pick<Partial<import("reakit").DisclosureStateReturn>, "baseId" | "visible" | "animating" | "animated" | "stopAnimation"> & Pick<Partial<import("reakit").DialogStateReturn>, "hide" | "modal" | "unstable_disclosureRef"> & Pick<import("reakit").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<import("reakit").PopoverStateReturn>, "unstable_popoverRef" | "unstable_popoverStyles"> & Pick<{
baseId: string;
unstable_idCountRef: import("react").MutableRefObject<number>;
visible: boolean;
animated: number | boolean;
animating: boolean;
setBaseId: import("react").Dispatch<import("react").SetStateAction<string>>;
show: () => void;
hide: () => void;
toggle: () => void;
setVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
setAnimated: import("react").Dispatch<import("react").SetStateAction<number | boolean>>;
stopAnimation: () => void;
modal: boolean;
unstable_disclosureRef: import("react").MutableRefObject<HTMLElement | null>;
setModal: import("react").Dispatch<import("react").SetStateAction<boolean>>;
unstable_referenceRef: import("react").RefObject<HTMLElement | null>;
unstable_popoverRef: import("react").RefObject<HTMLElement | null>;
unstable_arrowRef: import("react").RefObject<HTMLElement | null>;
unstable_popoverStyles: import("react").CSSProperties;
unstable_arrowStyles: import("react").CSSProperties;
unstable_originalPlacement: "auto" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left-start";
unstable_update: () => boolean;
placement: "auto" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left-start";
place: import("react").Dispatch<import("react").SetStateAction<"auto" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left-start">>;
pickerId: string | undefined;
dialogId: string | undefined;
isDisabled: boolean | undefined;
isReadOnly: boolean | undefined;
segmentFocus: (() => void) | undefined;
}, "dialogId"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: PickerBaseContentOptions, htmlProps: import("reakit").RoleHTMLProps) => PickerBaseContentOptions;
};
export declare const PickerBaseContent: import("../system").Component<"div", import("reakit").RoleOptions & Pick<Partial<import("reakit").DisclosureStateReturn>, "baseId" | "visible" | "animating" | "animated" | "stopAnimation"> & Pick<Partial<import("reakit").DialogStateReturn>, "hide" | "modal" | "unstable_disclosureRef"> & Pick<import("reakit").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<import("reakit").PopoverStateReturn>, "unstable_popoverRef" | "unstable_popoverStyles"> & Pick<{
baseId: string;
unstable_idCountRef: import("react").MutableRefObject<number>;
visible: boolean;
animated: number | boolean;
animating: boolean;
setBaseId: import("react").Dispatch<import("react").SetStateAction<string>>;
show: () => void;
hide: () => void;
toggle: () => void;
setVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
setAnimated: import("react").Dispatch<import("react").SetStateAction<number | boolean>>;
stopAnimation: () => void;
modal: boolean;
unstable_disclosureRef: import("react").MutableRefObject<HTMLElement | null>;
setModal: import("react").Dispatch<import("react").SetStateAction<boolean>>;
unstable_referenceRef: import("react").RefObject<HTMLElement | null>;
unstable_popoverRef: import("react").RefObject<HTMLElement | null>;
unstable_arrowRef: import("react").RefObject<HTMLElement | null>;
unstable_popoverStyles: import("react").CSSProperties;
unstable_arrowStyles: import("react").CSSProperties;
unstable_originalPlacement: "auto" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left-start";
unstable_update: () => boolean;
placement: "auto" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left-start";
place: import("react").Dispatch<import("react").SetStateAction<"auto" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left-start">>;
pickerId: string | undefined;
dialogId: string | undefined;
isDisabled: boolean | undefined;
isReadOnly: boolean | undefined;
segmentFocus: (() => void) | undefined;
}, "dialogId"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}>;