@ux-aspects/ux-aspects
Version:
Open source user interface framework for building modern, responsive, mobile big data applications
44 lines (43 loc) • 2.85 kB
TypeScript
import { FocusKeyManager } from '@angular/cdk/a11y';
import { AfterContentInit, ElementRef, OnDestroy, QueryList } from '@angular/core';
import { TabbableListItemDirective } from './tabbable-list-item.directive';
import * as i0 from "@angular/core";
export declare class TabbableListDirective implements AfterContentInit, OnDestroy {
/** Access the tabbable list service */
private readonly _tabbableList;
/** Access the native dom element */
readonly elementRef: ElementRef<any>;
/** Determine whether the up/down arrows should be used or the left/right arrows */
direction: 'horizontal' | 'vertical';
/** Indicate whether or not focus should loop back to the first element after the last */
wrap: boolean;
/** Indicate whether or not the first item should receive focus on show - useful for modals and popovers */
focusOnShow: boolean;
/** Indicate whether or not focus should be returned to the previous element (only applicable when using focusOnShow) */
returnFocus: boolean;
/** Enabling handling of hierarchical lists via use of the `TabbableListItemDirective.parent` property. */
set hierarchy(value: boolean);
/** Prevent keyboard interaction when alt modifier key is pressed */
set allowAltModifier(value: boolean);
/** Prevent keyboard interaction when ctrl modifier key is pressed */
set allowCtrlModifier(value: boolean);
/** Focus the first or last item when Home or End keys are pressed */
set allowBoundaryKeys(value: boolean);
/** Find all tabbable list items */
items: QueryList<TabbableListItemDirective>;
/** Store the currently focused HTML element */
private _focusedElement;
/** Store the items in a specific order */
private _orderedItems;
/** Unsubscribe from all observables automatically on destroy */
private readonly _onDestroy;
get focusKeyManager(): FocusKeyManager<TabbableListItemDirective>;
constructor();
ngAfterContentInit(): void;
ngOnDestroy(): void;
setFirstItemTabbable(): void;
focus(): void;
focusTabbableItem(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<TabbableListDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<TabbableListDirective, "[uxTabbableList]", ["ux-tabbable-list"], { "direction": { "alias": "direction"; "required": false; }; "wrap": { "alias": "wrap"; "required": false; }; "focusOnShow": { "alias": "focusOnShow"; "required": false; }; "returnFocus": { "alias": "returnFocus"; "required": false; }; "hierarchy": { "alias": "hierarchy"; "required": false; }; "allowAltModifier": { "alias": "allowAltModifier"; "required": false; }; "allowCtrlModifier": { "alias": "allowCtrlModifier"; "required": false; }; "allowBoundaryKeys": { "alias": "allowBoundaryKeys"; "required": false; }; }, {}, ["items"], never, false, never>;
}