reakit
Version:
Toolkit for building accessible rich web apps with React
64 lines (63 loc) • 4.14 kB
TypeScript
import * as React from "react";
import { CheckboxOptions, CheckboxHTMLProps } from "../Checkbox/Checkbox";
import { MenuItemOptions, MenuItemHTMLProps } from "./MenuItem";
import { MenuStateReturn } from "./MenuState";
export declare type MenuItemCheckboxOptions = CheckboxOptions & MenuItemOptions & Pick<MenuStateReturn, "unstable_values" | "unstable_setValue"> & {
/**
* MenuItemCheckbox's name as in `menu.values`.
*/
name: string;
};
export declare type MenuItemCheckboxHTMLProps = CheckboxHTMLProps & MenuItemHTMLProps;
export declare type MenuItemCheckboxProps = MenuItemCheckboxOptions & MenuItemCheckboxHTMLProps;
export declare const useMenuItemCheckbox: {
(options?: MenuItemCheckboxOptions | undefined, htmlProps?: CheckboxHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): CheckboxHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<Partial<import("..").CheckboxStateReturn>, "state" | "setState"> & {
value?: string | number | undefined;
checked?: boolean | undefined;
} & Pick<Partial<import("..").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & {
id?: string | undefined;
} & Pick<Partial<import("..").CompositeStateReturn>, "orientation" | "baseId" | "unstable_virtual" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<import("..").CompositeStateReturn, "down" | "up" | "next" | "first" | "last" | "currentId" | "items" | "registerItem" | "unregisterItem" | "previous" | "setCurrentId"> & Pick<Partial<MenuStateReturn>, "hide" | "visible" | "unstable_popoverStyles" | "unstable_arrowStyles" | "placement"> & Pick<MenuStateReturn, "next" | "move" | "previous"> & Pick<MenuStateReturn, "unstable_values" | "unstable_setValue"> & {
/**
* MenuItemCheckbox's name as in `menu.values`.
*/
name: string;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & React.InputHTMLAttributes<any> & {
value?: string | number | undefined;
}, next: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<Partial<import("..").CheckboxStateReturn>, "state" | "setState"> & {
value?: string | number | undefined;
checked?: boolean | undefined;
} & Pick<Partial<import("..").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & {
id?: string | undefined;
} & Pick<Partial<import("..").CompositeStateReturn>, "orientation" | "baseId" | "unstable_virtual" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<import("..").CompositeStateReturn, "down" | "up" | "next" | "first" | "last" | "currentId" | "items" | "registerItem" | "unregisterItem" | "previous" | "setCurrentId"> & Pick<Partial<MenuStateReturn>, "hide" | "visible" | "unstable_popoverStyles" | "unstable_arrowStyles" | "placement"> & Pick<MenuStateReturn, "next" | "move" | "previous"> & Pick<MenuStateReturn, "unstable_values" | "unstable_setValue"> & {
/**
* MenuItemCheckbox's name as in `menu.values`.
*/
name: string;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & React.InputHTMLAttributes<any> & {
value?: string | number | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: MenuItemCheckboxOptions, htmlProps: CheckboxHTMLProps) => MenuItemCheckboxOptions;
};
export declare const MenuItemCheckbox: import("reakit-system/ts/createComponent").Component<"button", MenuItemCheckboxOptions>;