import { type KeyboardEvent } from "react"; import { type FocusableIndexOptions, type TabIndexBehavior } from "./types.js"; /** * @since 6.0.0 * @internal */ export declare const isElementDisabled: (element: HTMLElement) => boolean; /** * @since 5.0.0 * @internal */ export declare const isNotFocusable: (element: HTMLElement | undefined, includeDisabled: boolean) => boolean; /** * @since 6.0.0 * @internal */ export interface VirtualFocusableIndexOptions { focusables: readonly HTMLElement[]; includeDisabled: boolean; activeDescendantId: string; } /** * @since 6.0.0 * @internal */ export declare const getVirtualFocusDefaultIndex: (options: VirtualFocusableIndexOptions) => number; /** * @since 5.0.0 * @internal */ export declare const getFirstFocusableIndex: (options: FocusableIndexOptions) => number; /** * @since 5.0.0 * @internal */ export declare const getLastFocusableIndex: (options: FocusableIndexOptions) => number; /** * @since 5.0.0 * @internal */ interface NextFocusableIndexOptions extends FocusableIndexOptions { loopable: boolean; increment: boolean; currentFocusIndex: number; } /** * @since 5.0.0 * @internal */ export declare const getNextFocusableIndex: (options: NextFocusableIndexOptions) => number; /** * @since 5.0.0 * @internal */ export declare function getSearchText(element: HTMLElement, searchable: boolean): string; /** * @since 6.0.0 * @internal */ export interface RecalculateOptions { focusables: readonly HTMLElement[]; includeDisabled: boolean; tabIndexBehavior: TabIndexBehavior | undefined; activeDescendantId: string; } /** * This was added to help with specific widgets that cause focus index to change * between renders (i.e. expanding all tree items on the same level with `*`). * There might be a better way to handle this in the future. * * @since 6.0.0 * @internal */ export declare function recalculateFocusIndex(options: RecalculateOptions): number; /** * Checks if a keyboard event can trigger a search through focusable elements * by: * * - checking if the key is a single letter that is not the space key * - checking that the alt, ctrl, and meta keys are not being held * * The shift key **is allowed** because holding shift means "search from the * beginning" instead of "search from current location". * * @since 6.0.0 * @internal */ export declare function isSearchableEvent(event: KeyboardEvent): boolean; /** * @since 6.0.0 * @internal */ export declare function isTypeEvent(event: KeyboardEvent): boolean; export {};