UNPKG

@ux-aspects/ux-aspects

Version:

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

34 lines (33 loc) 1.85 kB
import { FocusableOption, FocusOrigin } from '@angular/cdk/a11y'; import { ElementRef, OnDestroy, OnInit, Renderer2 } from '@angular/core'; import { Subject } from 'rxjs'; import { FocusIndicator, FocusIndicatorService } from '../../../directives/accessibility/index'; import { MenuItemType } from '../menu-item/menu-item-type.enum'; import { MenuComponent } from '../menu/menu.component'; import * as i0 from "@angular/core"; export declare class MenuTabbableItemDirective implements OnInit, OnDestroy, FocusableOption { protected readonly _menu: MenuComponent; protected readonly _elementRef: ElementRef<HTMLElement>; protected readonly _focusIndicatorService: FocusIndicatorService; protected readonly _renderer: Renderer2; /** Define if this item is disabled or not */ disabled: boolean; /** Indicate the type of the menu item */ readonly type: MenuItemType; /** Store the focus indicator instance */ protected focusIndicator: FocusIndicator; /** Automatically unsubscribe when directive is destroyed */ protected _onDestroy$: Subject<void>; ngOnInit(): void; ngOnDestroy(): void; /** Focus this item with a given origin */ focus(origin: FocusOrigin): void; /** This function is built into the CDK manager to allow jumping to items based on text content */ getLabel(): string; /** Forward any keyboard events to the MenuComponent for accessibility */ _onKeydown(event: KeyboardEvent): void; /** Update the tab index on this item */ protected setTabIndex(isTabbable: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration<MenuTabbableItemDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<MenuTabbableItemDirective, "[uxMenuTabbableItem]", never, { "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, false, never>; }