UNPKG

@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

78 lines (77 loc) 5.14 kB
import * as React from "react"; import { CompositeItemHTMLProps, CompositeItemOptions } from "reakit"; import { SelectStateReturn } from "./SelectState"; export declare const useSelectItem: { (options?: SelectItemOptions | undefined, htmlProps?: CompositeItemHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): CompositeItemHTMLProps; unstable_propsAreEqual: (prev: import("reakit").RoleOptions & { disabled?: boolean | undefined; focusable?: boolean | undefined; } & { unstable_clickOnEnter?: boolean | undefined; unstable_clickOnSpace?: boolean | undefined; } & Pick<Partial<import("reakit").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & { id?: string | undefined; } & Pick<Partial<import("reakit").CompositeStateReturn>, "baseId" | "unstable_virtual" | "orientation" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<import("reakit").CompositeStateReturn, "currentId" | "items" | "registerItem" | "unregisterItem" | "next" | "previous" | "up" | "down" | "first" | "last" | "setCurrentId"> & Pick<Partial<SelectStateReturn>, "visible" | "hide" | "setSelectedValue"> & Pick<SelectStateReturn, "registerItem"> & { /** * Item's value that will be used to fill input value and filter `matches` * based on the input value. You can omit this for items that perform * actions other than filling a form. For example, items may open a dialog. */ value?: string | undefined; } & React.HTMLAttributes<any> & React.RefAttributes<any> & { wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined; } & { disabled?: boolean | undefined; }, next: import("reakit").RoleOptions & { disabled?: boolean | undefined; focusable?: boolean | undefined; } & { unstable_clickOnEnter?: boolean | undefined; unstable_clickOnSpace?: boolean | undefined; } & Pick<Partial<import("reakit").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & { id?: string | undefined; } & Pick<Partial<import("reakit").CompositeStateReturn>, "baseId" | "unstable_virtual" | "orientation" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<import("reakit").CompositeStateReturn, "currentId" | "items" | "registerItem" | "unregisterItem" | "next" | "previous" | "up" | "down" | "first" | "last" | "setCurrentId"> & Pick<Partial<SelectStateReturn>, "visible" | "hide" | "setSelectedValue"> & Pick<SelectStateReturn, "registerItem"> & { /** * Item's value that will be used to fill input value and filter `matches` * based on the input value. You can omit this for items that perform * actions other than filling a form. For example, items may open a dialog. */ value?: string | undefined; } & React.HTMLAttributes<any> & React.RefAttributes<any> & { wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined; } & { disabled?: boolean | undefined; }) => boolean; __keys: readonly any[]; __useOptions: (options: SelectItemOptions, htmlProps: CompositeItemHTMLProps) => SelectItemOptions; }; export declare const SelectItem: import("../system").Component<"span", import("reakit").RoleOptions & { disabled?: boolean | undefined; focusable?: boolean | undefined; } & { unstable_clickOnEnter?: boolean | undefined; unstable_clickOnSpace?: boolean | undefined; } & Pick<Partial<import("reakit").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & { id?: string | undefined; } & Pick<Partial<import("reakit").CompositeStateReturn>, "baseId" | "unstable_virtual" | "orientation" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<import("reakit").CompositeStateReturn, "currentId" | "items" | "registerItem" | "unregisterItem" | "next" | "previous" | "up" | "down" | "first" | "last" | "setCurrentId"> & Pick<Partial<SelectStateReturn>, "visible" | "hide" | "setSelectedValue"> & Pick<SelectStateReturn, "registerItem"> & { /** * Item's value that will be used to fill input value and filter `matches` * based on the input value. You can omit this for items that perform * actions other than filling a form. For example, items may open a dialog. */ value?: string | undefined; } & React.HTMLAttributes<any> & React.RefAttributes<any> & { wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined; } & { disabled?: boolean | undefined; }>; export declare type SelectItemOptions = CompositeItemOptions & Pick<Partial<SelectStateReturn>, "setSelectedValue" | "hide" | "visible"> & Pick<SelectStateReturn, "registerItem"> & { /** * Item's value that will be used to fill input value and filter `matches` * based on the input value. You can omit this for items that perform * actions other than filling a form. For example, items may open a dialog. */ value?: string; }; export declare type SelectItemHTMLProps = CompositeItemHTMLProps; export declare type SelectItemProps = SelectItemOptions & SelectItemHTMLProps;