UNPKG

@studiohyperdrive/ngx-inform

Version:

A lightweight ARIA compliant customizable approach for common and complex inform flows in Angular.

71 lines (70 loc) 2.4 kB
import { ElementRef, Type } from '@angular/core'; import { NgxTooltipAbstractComponent } from '../../abstracts'; import { NgxTooltipPosition } from '../../types'; import { NgxTooltipService } from '../../services'; import * as i0 from "@angular/core"; /** * A directive that adds a ARIA compliant tooltip to a component * * @export * @class NgxTooltipDirective */ export declare class NgxTooltipDirective { private readonly tooltipService; private readonly elementRef; /** * Show the tooltip on hover */ showOnMouseEnter(): void; /** * Show the tooltip on focus */ showOnFocus(): void; /** * Remove the tooltip on leaving hover */ removeOnMouseOut(): void; /** * Remove the tooltip on blur */ removeOnBlur(): void; /** * Remove the tooltip on escape pressed */ onEscape(): void; /** * Make the item tabbable */ private readonly index; /** * The id of the tooltip, unique in the DOM, required for accessibility. By default, this is an autogenerated UUID. */ ngxTooltipId: string; /** * The text of the tooltip */ ngxTooltip: string; /** * An optional component we can pass to replace the default configured component */ ngxTooltipComponent: Type<NgxTooltipAbstractComponent>; /** * An optional position we can pass to tooltip, by default this is 'above'. */ ngxTooltipPosition: NgxTooltipPosition; /** * Prevent the tooltip from being shown, by default this is false. */ ngxTooltipDisabled: boolean; constructor(tooltipService: NgxTooltipService, elementRef: ElementRef); /** * Show the tooltip if it is not visible yet */ private showTooltip; /** * Remove the tooltip */ private removeTooltip; static ɵfac: i0.ɵɵFactoryDeclaration<NgxTooltipDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<NgxTooltipDirective, "[ngxTooltip]", never, { "ngxTooltipId": { "alias": "ngxTooltipId"; "required": false; }; "ngxTooltip": { "alias": "ngxTooltip"; "required": true; }; "ngxTooltipComponent": { "alias": "ngxTooltipComponent"; "required": false; }; "ngxTooltipPosition": { "alias": "ngxTooltipPosition"; "required": false; }; "ngxTooltipDisabled": { "alias": "ngxTooltipDisabled"; "required": false; }; }, {}, never, never, true, never>; }