UNPKG

@ux-aspects/ux-aspects

Version:

Open source user interface framework for building modern, responsive, mobile big data applications

46 lines (45 loc) 3.03 kB
import { FocusOrigin } from '@angular/cdk/a11y'; import { EventEmitter, OnDestroy, OnInit } from '@angular/core'; import { AccessibilityOptionsService } from '../options/accessibility-options.service'; import { LocalFocusIndicatorOptions } from './focus-indicator-options/focus-indicator-options'; import * as i0 from "@angular/core"; export declare class FocusIndicatorDirective implements OnInit, OnDestroy { readonly optionsService: AccessibilityOptionsService; private readonly _elementRef; private readonly _focusIndicatorService; private readonly _ngZone; readonly localOptions: LocalFocusIndicatorOptions; /** Specify whether or not we should mark this element as having focus if a child is focused */ set checkChildren(checkChildren: boolean | string); /** Indicate whether or not mouse events should cause the focus indicator to appear - will override any global setting */ set mouseFocusIndicator(mouseFocusIndicator: boolean | string); /** Indicate whether or not touch events should cause the focus indicator to appear - will override any global setting */ set touchFocusIndicator(touchFocusIndicator: boolean | string); /** Indicate whether or not keyboard events should cause the focus indicator to appear - will override any global setting */ set keyboardFocusIndicator(keyboardFocusIndicator: boolean | string); /** Indicate whether or not programmatic events should cause the focus indicator to appear - will override any global setting */ set programmaticFocusIndicator(programmaticFocusIndicator: boolean | string); /** Emit the latest focus state */ indicator: EventEmitter<boolean>; /** Store a private reference for the checkChildren option */ private _checkChildren; /** Store all configuation options*/ private readonly _options; /** Store a reference to the focus handler */ private _focusIndicator; /** Unsubscribe on component destroy */ private readonly _onDestroy; constructor(); /** Setup the focus monitoring */ ngOnInit(): void; /** Tear down the directive */ ngOnDestroy(): void; /** Focus this element with a specific origin */ focus(origin?: FocusOrigin, options?: { preventScroll: boolean; }): void; /** Update the focus indicator with the latest options */ private setOptions; static ɵfac: i0.ɵɵFactoryDeclaration<FocusIndicatorDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<FocusIndicatorDirective, "[uxFocusIndicator]", ["ux-focus-indicator"], { "checkChildren": { "alias": "checkChildren"; "required": false; }; "mouseFocusIndicator": { "alias": "mouseFocusIndicator"; "required": false; }; "touchFocusIndicator": { "alias": "touchFocusIndicator"; "required": false; }; "keyboardFocusIndicator": { "alias": "keyboardFocusIndicator"; "required": false; }; "programmaticFocusIndicator": { "alias": "programmaticFocusIndicator"; "required": false; }; }, { "indicator": "indicator"; }, never, never, false, never>; }