import { ForwardRefExoticComponent, KeyboardEvent, RefAttributes, type RefObject } from 'react'; import { type AvatarProps } from '../avatar'; import { type IconName } from '../icon'; export declare const Divider: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, { role: "separator"; }, "role">; type Value = string | string[]; interface AvatarLeadingVisual { leadingVisualProps: AvatarProps; leadingVisualType: 'avatar'; } interface IconLeadingVisual { leadingVisualProps: IconName; leadingVisualType: 'icon'; } interface NoLeadingVisual { leadingVisualProps?: never; leadingVisualType?: never; } export type LeadingVisual = IconLeadingVisual | AvatarLeadingVisual | NoLeadingVisual; export type ListboxOption = { caption?: string; disabled?: boolean; label?: string; value: string; } & LeadingVisual; export interface ListboxProps { ariaLabelledBy?: string; id?: string; options: ListboxOption[]; className?: string; containerRef?: RefObject; /** * The default selected option. You may specify an array of strings when using multiselect feature. */ defaultValue?: Value; /** * When provided, options in this array are displayed at the top of the listbox */ featuredOptions?: ListboxOption[]; /** * Set to false to prevent the listbox from receiving focus * @default true */ focusable?: boolean; /** * Sets the current focused element in the listbox */ focusedValue?: string; /** * Set to true to enable keyboard navigation managed by the listbox * @default Same value as focusable */ keyboardNav?: boolean; /** * Activates multiple selection feature * @default false */ multiselect?: boolean; /** * Selects value when it receives focus. * @default true */ selectOnFocus?: boolean; /** * Sets the selected value (controlled input) */ value?: Value; /** * Callback function, invoked when an option is selected */ onChange?(options: ListboxOption | ListboxOption[]): void; /** * Callback function, invoked when a key is pressed */ onKeyDown?(event: KeyboardEvent): void; /** * Callback function, invoked when focused value changes */ onFocusChange?(option?: ListboxOption): void; /** * Callback function, invoked when an option is clicked */ onOptionClick?(option?: ListboxOption): void; } export interface ListboxRef extends HTMLDivElement { } export declare const Listbox: ForwardRefExoticComponent>; export {};