ngx-obelisco-example
Version:
Componentes funcionales y reutilizables para Angular.
63 lines (57 loc) • 4.42 kB
JavaScript
import * as i0 from '@angular/core';
import { Component, Input, NgModule } from '@angular/core';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
class OMatIconComponent {
constructor() {
this.customClasses = '';
}
}
OMatIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OMatIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
OMatIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OMatIconComponent, selector: "o-mat-icon", inputs: { customClasses: "customClasses" }, ngImport: i0, template: "<span class=\"material-icons-round\" aria-hidden=\"true\" [ngClass]=\"customClasses\">\r\n <ng-content></ng-content>\r\n</span>\r\n", styles: ["::ng-deep o-mat-icon{line-height:0}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OMatIconComponent, decorators: [{
type: Component,
args: [{ selector: 'o-mat-icon', template: "<span class=\"material-icons-round\" aria-hidden=\"true\" [ngClass]=\"customClasses\">\r\n <ng-content></ng-content>\r\n</span>\r\n", styles: ["::ng-deep o-mat-icon{line-height:0}\n"] }]
}], ctorParameters: function () { return []; }, propDecorators: { customClasses: [{
type: Input
}] } });
class OBxIconComponent {
constructor(el) {
this.el = el;
this.customClasses = '';
this.projectedContent = '';
}
ngAfterContentInit() {
this.projectedContent = this.el.nativeElement.innerText.trim();
}
getClassNames() {
const customClass = this.customClasses ? ' ' + this.customClasses : '';
return 'bx ' + this.projectedContent + customClass;
}
}
OBxIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OBxIconComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
OBxIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OBxIconComponent, selector: "o-bx-icon", inputs: { customClasses: "customClasses" }, ngImport: i0, template: "<span class=\"sr-only\" aria-hidden=\"true\"><ng-content></ng-content></span>\r\n<i [ngClass]=\"getClassNames()\"></i>\r\n", styles: ["::ng-deep o-bx-icon{line-height:0;display:inline-block}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OBxIconComponent, decorators: [{
type: Component,
args: [{ selector: 'o-bx-icon', template: "<span class=\"sr-only\" aria-hidden=\"true\"><ng-content></ng-content></span>\r\n<i [ngClass]=\"getClassNames()\"></i>\r\n", styles: ["::ng-deep o-bx-icon{line-height:0;display:inline-block}\n"] }]
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { customClasses: [{
type: Input
}] } });
class OIconModule {
}
OIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
OIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: OIconModule, declarations: [OMatIconComponent, OBxIconComponent], imports: [CommonModule], exports: [OMatIconComponent, OBxIconComponent] });
OIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OIconModule, imports: [CommonModule] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OIconModule, decorators: [{
type: NgModule,
args: [{
declarations: [OMatIconComponent, OBxIconComponent],
imports: [CommonModule],
exports: [OMatIconComponent, OBxIconComponent]
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { OBxIconComponent, OIconModule, OMatIconComponent };
//# sourceMappingURL=ngx-obelisco-example-icon.mjs.map