import * as react from 'react'; import { SyntheticEvent, ComponentProps } from 'react'; import * as react_jsx_runtime from 'react/jsx-runtime'; import { CollectionNode } from '../../collection/src/useCollection.js'; import { FocusManager } from '../../shared/src/useFocusManager.js'; import { InternalProps, StyledComponentProps, OmitInternalProps } from '../../shared/src/types.js'; import { ResponsiveProp } from '../../styling/src/useResponsiveValue.js'; import { ValidationState } from '../../input/src/types.js'; import '../../shared/src/useFocusScope.js'; import '../../styling/src/styled-system/props-handler.js'; import 'csstype'; import '../../shared/src/type-fest.js'; import '../../styling/src/styled-system/StylingContext.js'; import '../../styling/src/BreakpointProvider.js'; import '../../group/src/Group.js'; import '../../layout/src/Flex.js'; declare const OptionKeyProp = "data-o-ui-key"; type ListboxSelectionMode = "none" | "single" | "multiple"; declare const DefaultElement = "div"; interface InnerListboxProps extends InternalProps, Omit, "autoFocus"> { /** * Whether or not the listbox should autofocus on render. */ autoFocus?: boolean | number; /** * Default focus target on autofocus. */ autoFocusTarget?: string; /** * This describes the area that the element will be checked for overflow relative to. */ boundaryElement?: HTMLElement; /** * The initial value of `selectedKeys` when uncontrolled. */ defaultSelectedKeys?: string[]; /** * Whether or not the listbox options are disabled. */ disabled?: boolean; /** * Whether or not the listbox take up the width of its container. */ fluid?: ResponsiveProp; /** * Whether or not to focus the hovered item. */ focusOnHover?: boolean; /** * A collection of nodes to render instead of children. It should only be used if you embed a Listbox inside another component like a custom Select. */ nodes?: CollectionNode[]; /** * Called when the focus change. * @param {SyntheticEvent} event - React's original event. * @param {String[]} keys - The keys of the selected items. * @returns {void} */ onFocusChange?: (event: SyntheticEvent, key: string, activeElement: HTMLElement) => void; /** * Called when the selected keys change. * @param {SyntheticEvent} event - React's original event. * @param {String[]} keys - The keys of the selected items. * @returns {void} */ onSelectionChange?: (event: SyntheticEvent, key: string[]) => void; /** * A controlled set of the selected item keys. */ selectedKeys?: string[] | null; /** * The type of selection that is allowed. */ selectionMode?: ListboxSelectionMode; /** * Whether or not the listbox option should be reachable with tabs. */ tabbable?: boolean; /** * Whether or not focus should be virtual (add a CSS class instead of switching the active element). */ useVirtualFocus?: boolean; /** * Whether or not the listbox should display as "valid" or "invalid". */ validationState?: ValidationState; } declare function InnerListbox({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, as, autoFocus, autoFocusTarget, boundaryElement, children, defaultSelectedKeys, fluid, focusOnHover, forwardedRef, id, nodes: nodesProp, onFocusChange, onSelectionChange, selectedKeys: selectedKeysProp, selectionMode, tabbable, useVirtualFocus, validationState, ...rest }: InnerListboxProps): react_jsx_runtime.JSX.Element; declare namespace InnerListbox { var defaultElement: string; } type ListboxElement = HTMLElement & { focusManager: FocusManager; }; /** * A listbox presents a list of options and allows a user to select one or more of them * * [Documentation](https://wl-orbiter-website.netlify.app/?path=/docs/listbox--default-story) */ declare const Listbox: react.ForwardRefExoticComponent, "ref"> & react.RefAttributes>; type ListboxProps = ComponentProps; export { InnerListbox, type InnerListboxProps, Listbox, type ListboxElement, type ListboxProps, type ListboxSelectionMode, OptionKeyProp };