import React, { ElementType, Ref } from 'react'; import { Props } from '../../types.js'; import { PropsForFeatures, HasDisplayName, RefProp } from '../../utils/render.js'; declare let DEFAULT_LISTBOX_TAG: React.ExoticComponent<{ children?: React.ReactNode; }>; interface ListboxRenderPropArg { open: boolean; disabled: boolean; value: T; } export type ListboxProps = Props, 'value' | 'defaultValue' | 'onChange' | 'by' | 'disabled' | 'horizontal' | 'name' | 'multiple'> & { value?: TType; defaultValue?: TType; onChange?(value: TType): void; by?: (keyof TActualType & string) | ((a: TActualType, z: TActualType) => boolean); disabled?: boolean; horizontal?: boolean; form?: string; name?: string; multiple?: boolean; }; declare function ListboxFn(props: ListboxProps, ref: Ref): JSX.Element; declare let DEFAULT_BUTTON_TAG: "button"; interface ButtonRenderPropArg { open: boolean; disabled: boolean; value: any; } type ButtonPropsWeControl = 'aria-controls' | 'aria-expanded' | 'aria-haspopup' | 'aria-labelledby' | 'disabled'; export type ListboxButtonProps = Props; declare function ButtonFn(props: ListboxButtonProps, ref: Ref): React.ReactElement> | null; declare let DEFAULT_LABEL_TAG: "label"; interface LabelRenderPropArg { open: boolean; disabled: boolean; } export type ListboxLabelProps = Props; declare function LabelFn(props: ListboxLabelProps, ref: Ref): React.ReactElement> | null; declare let DEFAULT_OPTIONS_TAG: "ul"; interface OptionsRenderPropArg { open: boolean; } type OptionsPropsWeControl = 'aria-activedescendant' | 'aria-labelledby' | 'aria-multiselectable' | 'aria-orientation' | 'role' | 'tabIndex'; declare let OptionsRenderFeatures: number; export type ListboxOptionsProps = Props & PropsForFeatures; declare function OptionsFn(props: ListboxOptionsProps, ref: Ref): React.ReactElement> | null; declare let DEFAULT_OPTION_TAG: "li"; interface OptionRenderPropArg { active: boolean; selected: boolean; disabled: boolean; } type OptionPropsWeControl = 'aria-disabled' | 'aria-selected' | 'role' | 'tabIndex'; export type ListboxOptionProps = Props; declare function OptionFn[0]['value']>(props: ListboxOptionProps, ref: Ref): React.ReactElement> | null; interface ComponentListbox extends HasDisplayName { (props: ListboxProps & RefProp): JSX.Element; } interface ComponentListboxButton extends HasDisplayName { (props: ListboxButtonProps & RefProp): JSX.Element; } interface ComponentListboxLabel extends HasDisplayName { (props: ListboxLabelProps & RefProp): JSX.Element; } interface ComponentListboxOptions extends HasDisplayName { (props: ListboxOptionsProps & RefProp): JSX.Element; } interface ComponentListboxOption extends HasDisplayName { [0]['value']>(props: ListboxOptionProps & RefProp): JSX.Element; } declare let ListboxRoot: ComponentListbox; export declare let Listbox: ComponentListbox & { Button: ComponentListboxButton; Label: ComponentListboxLabel; Options: ComponentListboxOptions; Option: ComponentListboxOption; }; export {};