@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
110 lines (109 loc) • 7.25 kB
TypeScript
import * as React from "react";
import { RoleHTMLProps, RoleOptions } from "reakit";
import { PickerBaseStateReturn } from "./PickerBaseState";
export declare type PickerBaseOptions = RoleOptions & Pick<PickerBaseStateReturn, "visible" | "isDisabled" | "isReadOnly" | "show" | "pickerId" | "dialogId" | "segmentFocus">;
export declare type PickerBaseHTMLProps = RoleHTMLProps;
export declare type PickerBaseProps = PickerBaseOptions & PickerBaseHTMLProps;
export declare const usePickerBase: {
(options?: PickerBaseOptions | undefined, htmlProps?: RoleHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): RoleHTMLProps;
unstable_propsAreEqual: (prev: RoleOptions & Pick<{
baseId: string;
unstable_idCountRef: React.MutableRefObject<number>;
visible: boolean;
animated: number | boolean;
animating: boolean;
setBaseId: React.Dispatch<React.SetStateAction<string>>;
show: () => void;
hide: () => void;
toggle: () => void;
setVisible: React.Dispatch<React.SetStateAction<boolean>>;
setAnimated: React.Dispatch<React.SetStateAction<number | boolean>>;
stopAnimation: () => void;
modal: boolean;
unstable_disclosureRef: React.MutableRefObject<HTMLElement | null>;
setModal: React.Dispatch<React.SetStateAction<boolean>>;
unstable_referenceRef: React.RefObject<HTMLElement | null>;
unstable_popoverRef: React.RefObject<HTMLElement | null>;
unstable_arrowRef: React.RefObject<HTMLElement | null>;
unstable_popoverStyles: React.CSSProperties;
unstable_arrowStyles: 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: React.Dispatch<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;
}, "visible" | "show" | "isDisabled" | "isReadOnly" | "pickerId" | "dialogId" | "segmentFocus"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}, next: RoleOptions & Pick<{
baseId: string;
unstable_idCountRef: React.MutableRefObject<number>;
visible: boolean;
animated: number | boolean;
animating: boolean;
setBaseId: React.Dispatch<React.SetStateAction<string>>;
show: () => void;
hide: () => void;
toggle: () => void;
setVisible: React.Dispatch<React.SetStateAction<boolean>>;
setAnimated: React.Dispatch<React.SetStateAction<number | boolean>>;
stopAnimation: () => void;
modal: boolean;
unstable_disclosureRef: React.MutableRefObject<HTMLElement | null>;
setModal: React.Dispatch<React.SetStateAction<boolean>>;
unstable_referenceRef: React.RefObject<HTMLElement | null>;
unstable_popoverRef: React.RefObject<HTMLElement | null>;
unstable_arrowRef: React.RefObject<HTMLElement | null>;
unstable_popoverStyles: React.CSSProperties;
unstable_arrowStyles: 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: React.Dispatch<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;
}, "visible" | "show" | "isDisabled" | "isReadOnly" | "pickerId" | "dialogId" | "segmentFocus"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: PickerBaseOptions, htmlProps: RoleHTMLProps) => PickerBaseOptions;
};
export declare const PickerBase: import("../system").Component<"div", RoleOptions & Pick<{
baseId: string;
unstable_idCountRef: React.MutableRefObject<number>;
visible: boolean;
animated: number | boolean;
animating: boolean;
setBaseId: React.Dispatch<React.SetStateAction<string>>;
show: () => void;
hide: () => void;
toggle: () => void;
setVisible: React.Dispatch<React.SetStateAction<boolean>>;
setAnimated: React.Dispatch<React.SetStateAction<number | boolean>>;
stopAnimation: () => void;
modal: boolean;
unstable_disclosureRef: React.MutableRefObject<HTMLElement | null>;
setModal: React.Dispatch<React.SetStateAction<boolean>>;
unstable_referenceRef: React.RefObject<HTMLElement | null>;
unstable_popoverRef: React.RefObject<HTMLElement | null>;
unstable_arrowRef: React.RefObject<HTMLElement | null>;
unstable_popoverStyles: React.CSSProperties;
unstable_arrowStyles: 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: React.Dispatch<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;
}, "visible" | "show" | "isDisabled" | "isReadOnly" | "pickerId" | "dialogId" | "segmentFocus"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}>;