volleyball-dev-frontend/node_modules/@headlessui/react/dist/utils/calculate-active-index.d.ts
Marc Wieland 33181acf83
Some checks are pending
Deploy Volleyball CMS / deploy (push) Waiting to run
Last
2025-06-02 18:56:22 +02:00

26 lines
808 B
TypeScript

export declare enum Focus {
/** Focus the first non-disabled item. */
First = 0,
/** Focus the previous non-disabled item. */
Previous = 1,
/** Focus the next non-disabled item. */
Next = 2,
/** Focus the last non-disabled item. */
Last = 3,
/** Focus a specific item based on the `id` of the item. */
Specific = 4,
/** Focus no items at all. */
Nothing = 5
}
export declare function calculateActiveIndex<TItem>(action: {
focus: Focus.Specific;
id: string;
} | {
focus: Exclude<Focus, Focus.Specific>;
}, resolvers: {
resolveItems(): TItem[];
resolveActiveIndex(): number | null;
resolveId(item: TItem, index: number, items: TItem[]): string;
resolveDisabled(item: TItem, index: number, items: TItem[]): boolean;
}): number | null;