UNPKG

@taiga-ui/cdk

Version:

Base library for creating Angular components and applications using Taiga UI principles regarding of actual visual appearance

31 lines (27 loc) 1.18 kB
import * as i0 from '@angular/core'; import { Directive } from '@angular/core'; import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom'; import { tuiGenerateId } from '@taiga-ui/cdk/utils/miscellaneous'; class TuiId { constructor() { this.el = tuiInjectElement(); this.autoId = tuiGenerateId(); } get id() { return this.el.id || this.autoId; } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiId, deps: [], target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: TuiId, isStandalone: true, selector: "[tuiId]", host: { properties: { "id": "id" } }, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiId, decorators: [{ type: Directive, args: [{ selector: '[tuiId]', host: { '[id]': 'id' }, }] }] }); /** * Generated bundle index. Do not edit. */ export { TuiId }; //# sourceMappingURL=taiga-ui-cdk-directives-id.mjs.map