UNPKG

@cds/core

Version:

Clarity Design System - common components, themes, and utilties

27 lines (26 loc) 910 B
import { ReactiveController, ReactiveElement } from 'lit'; export interface KeyNavigationListConfig { keyListItems: string; layout: 'both' | 'horizontal' | 'vertical'; manageFocus: boolean; manageTabindex: boolean; loop: boolean; dir: string | null; } /** * Provides key list naviation behavior * https://webaim.org/techniques/keyboard/ */ export declare function keyNavigationList<T extends ReactiveElement>(config?: Partial<KeyNavigationListConfig>): ClassDecorator; export declare class KeyNavigationListController<T extends ReactiveElement> implements ReactiveController { private host; private get listItems(); private config; constructor(host: T, config?: Partial<KeyNavigationListConfig>); hostConnected(): Promise<void>; private initializeTabIndex; private clickItem; private focusItem; private getActiveItem; private setActiveItem; }