/** * Iterator over passed Elements list. * Each next or previous action adds provides CSS-class and sets cursor to this item */ export declare class DomIterator { /** * This is a static property that defines iteration directions */ static directions: { RIGHT: string; LEFT: string; }; /** * User-provided CSS-class name for focused button */ private focusedCssClass; /** * Focused button index. * Default is -1 which means nothing is active */ private cursor; /** * Items to flip */ private items; /** * @param nodeList — the list of iterable HTML-items * @param focusedCssClass - user-provided CSS-class that will be set in flipping process */ constructor(nodeList: HTMLElement[], focusedCssClass: string); /** * Returns Focused button Node */ get currentItem(): HTMLElement | null; /** * Sets cursor to specified position * @param cursorPosition - new cursor position */ setCursor(cursorPosition: number): void; /** * Sets items. Can be used when iterable items changed dynamically * @param nodeList - nodes to iterate */ setItems(nodeList: HTMLElement[]): void; /** * Sets cursor next to the current */ next(): void; /** * Sets cursor before current */ previous(): void; /** * Sets cursor to the default position and removes CSS-class from previously focused item */ dropCursor(): void; /** * Leafs nodes inside the target list from active element * @param direction - leaf direction. Can be 'left' or 'right' * @returns index of focused node */ private leafNodesAndReturnIndex; }