feat(frontend): switch to the dark graphite design system with a Lincodex wordmark
This commit is contained in:
1 parent
945ab6d6a9
commit
3c4acff803
81 files changed
+3187
-619
No files matched your search
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Index of the tab that a key moves focus to in a horizontal tab list, or
|
||||
* null when the key is not a tab-list key. Arrows wrap around; Home and End
|
||||
* jump to the ends (WAI-ARIA Authoring Practices, tabs pattern).
|
||||
*/
|
||||
export function tabKeyTarget(key: string, index: number, count: number): number | null {
|
||||
if (count <= 0) return null;
|
||||
switch (key) {
|
||||
case "ArrowRight":
|
||||
return (index + 1) % count;
|
||||
case "ArrowLeft":
|
||||
return (index - 1 + count) % count;
|
||||
case "Home":
|
||||
return 0;
|
||||
case "End":
|
||||
return count - 1;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user