UNPKG

primeng

Version:

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm version](https://badge.fury.io/js/primeng.svg)](https://badge.fury.io/js/primeng) [![Discord](https://img.shields.io/discord/557940238991753

2 lines 2.09 kB
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define("primeng/chip",["exports","@angular/core","@angular/common"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).primeng=e.primeng||{},e.primeng.chip={}),e.ng.core,e.ng.common)}(this,(function(e,n,t){"use strict";var i=function(){function e(){this.removeIcon="pi pi-times-circle",this.onRemove=new n.EventEmitter,this.visible=!0}return e.prototype.containerClass=function(){return{"p-chip p-component":!0,"p-chip-image":null!=this.image}},e.prototype.close=function(e){this.visible=!1,this.onRemove.emit(e)},e}();i.decorators=[{type:n.Component,args:[{selector:"p-chip",template:'\n <div [ngClass]="containerClass()" [class]="styleClass" [ngStyle]="style" *ngIf="visible">\n <ng-content></ng-content>\n <img [src]="image" *ngIf="image;else iconTemplate">\n <ng-template #iconTemplate><span *ngIf="icon" [class]="icon" [ngClass]="\'p-chip-icon\'"></span></ng-template>\n <div class="p-chip-text" *ngIf="label">{{label}}</div>\n <span *ngIf="removable" tabindex="0" [class]="removeIcon" [ngClass]="\'pi-chip-remove-icon\'" (click)="close($event)" (keydown.enter)="close($event)"></span>\n </div>\n ',changeDetection:n.ChangeDetectionStrategy.OnPush,encapsulation:n.ViewEncapsulation.None,styles:[".p-chip{align-items:center;display:inline-flex}.p-chip-icon.pi,.p-chip-text{line-height:1.5}.pi-chip-remove-icon{cursor:pointer;line-height:1.5}.p-chip img{border-radius:50%}"]}]}],i.propDecorators={label:[{type:n.Input}],icon:[{type:n.Input}],image:[{type:n.Input}],style:[{type:n.Input}],styleClass:[{type:n.Input}],removable:[{type:n.Input}],removeIcon:[{type:n.Input}],onRemove:[{type:n.Output}]};var o=function(){};o.decorators=[{type:n.NgModule,args:[{imports:[t.CommonModule],exports:[i],declarations:[i]}]}],e.Chip=i,e.ChipModule=o,Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=primeng-chip.umd.min.js.map