@ipi-soft/ng-components
Version:
Custom Angular Components
27 lines (23 loc) • 3.25 kB
JavaScript
import * as i0 from '@angular/core';
import { EventEmitter, Component, Input, Output } from '@angular/core';
class IpiChipComponent {
constructor() {
this.closeIcon = false;
this.closeChange = new EventEmitter();
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: IpiChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.4", type: IpiChipComponent, isStandalone: true, selector: "ipi-chip", inputs: { closeIcon: "closeIcon" }, outputs: { closeChange: "closeChange" }, ngImport: i0, template: "<div class=\"container\">\n <span>\n <ng-content></ng-content>\n </span>\n\n @if (closeIcon) {\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\" (click)=\"closeChange.emit()\">\n <path d=\"m8.7 8 4.15-4.15a.5.5 0 0 0-.7-.7L8 7.29 3.85 3.15a.5.5 0 0 0-.7.7L7.29 8l-4.14 4.15a.5.5 0 1 0 .7.7L8 8.71l4.15 4.14a.5.5 0 0 0 .7-.7L8.71 8Z\" fill=\"#FFFFFF\"/>\n </svg>\n }\n</div>\n", styles: [":host{display:block;touch-action:manipulation}.container{width:fit-content;max-width:100%;height:28px;display:flex;align-items:center;color:var(--ipi-chip-color, #FFFFFF);background-color:var(--ipi-chip-background-color, #0B1222);font-size:var(--ipi-chip-font-size, 12px);font-weight:600;box-sizing:border-box;border-radius:28px;padding:6px 12px}.container span{max-width:100%;display:inline-block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}svg{min-width:16px;margin-left:6px;cursor:pointer}svg path{fill:var(--ipi-chip-icon-color, #FFFFFF)}\n"] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: IpiChipComponent, decorators: [{
type: Component,
args: [{ selector: 'ipi-chip', template: "<div class=\"container\">\n <span>\n <ng-content></ng-content>\n </span>\n\n @if (closeIcon) {\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\" (click)=\"closeChange.emit()\">\n <path d=\"m8.7 8 4.15-4.15a.5.5 0 0 0-.7-.7L8 7.29 3.85 3.15a.5.5 0 0 0-.7.7L7.29 8l-4.14 4.15a.5.5 0 1 0 .7.7L8 8.71l4.15 4.14a.5.5 0 0 0 .7-.7L8.71 8Z\" fill=\"#FFFFFF\"/>\n </svg>\n }\n</div>\n", styles: [":host{display:block;touch-action:manipulation}.container{width:fit-content;max-width:100%;height:28px;display:flex;align-items:center;color:var(--ipi-chip-color, #FFFFFF);background-color:var(--ipi-chip-background-color, #0B1222);font-size:var(--ipi-chip-font-size, 12px);font-weight:600;box-sizing:border-box;border-radius:28px;padding:6px 12px}.container span{max-width:100%;display:inline-block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}svg{min-width:16px;margin-left:6px;cursor:pointer}svg path{fill:var(--ipi-chip-icon-color, #FFFFFF)}\n"] }]
}], propDecorators: { closeIcon: [{
type: Input
}], closeChange: [{
type: Output
}] } });
/**
* Generated bundle index. Do not edit.
*/
export { IpiChipComponent };
//# sourceMappingURL=ipi-soft-ng-components-chip.mjs.map