UNPKG

reakit

Version:

Toolkit for building accessible rich web apps with React

62 lines (61 loc) 4.11 kB
import * as React from "react"; import { RadioOptions, RadioHTMLProps } from "../Radio/Radio"; import { MenuStateReturn } from "./MenuState"; import { MenuItemOptions, MenuItemHTMLProps } from "./MenuItem"; export declare type MenuItemRadioOptions = RadioOptions & MenuItemOptions & Pick<MenuStateReturn, "unstable_values" | "unstable_setValue"> & { /** * MenuItemRadio's name as in `menu.values`. */ name: string; }; export declare type MenuItemRadioHTMLProps = RadioHTMLProps & MenuItemHTMLProps; export declare type MenuItemRadioProps = MenuItemRadioOptions & MenuItemRadioHTMLProps; export declare const useMenuItemRadio: { (options?: MenuItemRadioOptions | undefined, htmlProps?: import("..").unstable_ComboboxHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").unstable_ComboboxHTMLProps; unstable_propsAreEqual: (prev: import("..").RoleOptions & { disabled?: boolean | undefined; focusable?: boolean | undefined; } & { unstable_clickOnEnter?: boolean | undefined; unstable_clickOnSpace?: 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<import("..").RadioStateReturn>, "state" | "setState"> & { value: string | number; checked?: boolean | undefined; unstable_checkOnFocus?: boolean | undefined; } & Pick<Partial<MenuStateReturn>, "hide" | "visible" | "unstable_popoverStyles" | "unstable_arrowStyles" | "placement"> & Pick<MenuStateReturn, "next" | "move" | "previous"> & Pick<MenuStateReturn, "unstable_values" | "unstable_setValue"> & { /** * MenuItemRadio'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>, next: import("..").RoleOptions & { disabled?: boolean | undefined; focusable?: boolean | undefined; } & { unstable_clickOnEnter?: boolean | undefined; unstable_clickOnSpace?: 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<import("..").RadioStateReturn>, "state" | "setState"> & { value: string | number; checked?: boolean | undefined; unstable_checkOnFocus?: boolean | undefined; } & Pick<Partial<MenuStateReturn>, "hide" | "visible" | "unstable_popoverStyles" | "unstable_arrowStyles" | "placement"> & Pick<MenuStateReturn, "next" | "move" | "previous"> & Pick<MenuStateReturn, "unstable_values" | "unstable_setValue"> & { /** * MenuItemRadio'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>) => boolean; __keys: readonly any[]; __useOptions: (options: MenuItemRadioOptions, htmlProps: import("..").unstable_ComboboxHTMLProps) => MenuItemRadioOptions; }; export declare const MenuItemRadio: import("reakit-system/ts/createComponent").Component<"button", MenuItemRadioOptions>;