import { type RefCallback } from 'react'; /** * Option type for the `useRovingFocus` hook, allowing to configure certain behaviors. * @public */ export type RovingFocusOptions = { /** * Index of the item that should initially be set to tabIndex = 0. * @defaultValue 0 */ initialIndex?: number; /** * The arrangement of the navigable items. Determines which arrow keys are used for navigation. * @defaultValue vertical */ direction?: 'horizontal' | 'vertical' | 'both'; /** * Determines whether the elements should be loopable. * @defaultValue true */ loopFocus?: boolean; /** * The selector used to retrieve all the navigable children. * @defaultValue * */ focusableChildrenSelector?: string; }; /** * @public */ export type RovingFocusReturnType = { /** * Reference of the container using roving focus. * @defaultValue RefCallback */ containerRef: RefCallback; /** * Currently active element. * @defaultValue undefined */ activeElement: V | undefined; }; /** * The `useRovingFocus` hook applies a roving tab index to the children matching * the given selector and enables you to navigate the elements using the arrow * keys. Applying a roving tab index to a list of items enables you to efficiently * navigate through the app, having a single tab-stop for a collection of items. * Navigating back to the collection restores the focus to the item that has been * focused when navigating away, enabling you to return to where you left off. * @public */ export declare function useRovingFocus({ initialIndex, direction, loopFocus, focusableChildrenSelector, }?: RovingFocusOptions): RovingFocusReturnType;