initial commit

This commit is contained in:
Dinawo
2024-06-11 23:18:25 +02:00
parent 6d8d5fcd6c
commit 8484a534db
3361 changed files with 493837 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
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): string;
resolveDisabled(item: TItem): boolean;
}): number | null;