1 | import * as i0 from '@angular/core';
|
---|
2 | import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, NgModule } from '@angular/core';
|
---|
3 | import * as i1 from '@angular/common';
|
---|
4 | import { CommonModule } from '@angular/common';
|
---|
5 |
|
---|
6 | class Tag {
|
---|
7 | containerClass() {
|
---|
8 | return {
|
---|
9 | 'p-tag p-component': true,
|
---|
10 | 'p-tag-info': this.severity === 'info',
|
---|
11 | 'p-tag-success': this.severity === 'success',
|
---|
12 | 'p-tag-warning': this.severity === 'warning',
|
---|
13 | 'p-tag-danger': this.severity === 'danger',
|
---|
14 | 'p-tag-rounded': this.rounded
|
---|
15 | };
|
---|
16 | }
|
---|
17 | }
|
---|
18 | Tag.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Tag, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
---|
19 | Tag.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: Tag, selector: "p-tag", inputs: { styleClass: "styleClass", style: "style", severity: "severity", value: "value", icon: "icon", rounded: "rounded" }, host: { classAttribute: "p-element" }, ngImport: i0, template: `
|
---|
20 | <span [ngClass]="containerClass()" [class]="styleClass" [ngStyle]="style">
|
---|
21 | <ng-content></ng-content>
|
---|
22 | <span class="p-tag-icon" [ngClass]="icon" *ngIf="icon"></span>
|
---|
23 | <span class="p-tag-value">{{value}}</span>
|
---|
24 | </span>
|
---|
25 | `, isInline: true, styles: [".p-tag{display:inline-flex;align-items:center;justify-content:center}.p-tag-icon,.p-tag-value,.p-tag-icon.pi{line-height:1.5}.p-tag.p-tag-rounded{border-radius:10rem}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
---|
26 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Tag, decorators: [{
|
---|
27 | type: Component,
|
---|
28 | args: [{ selector: 'p-tag', template: `
|
---|
29 | <span [ngClass]="containerClass()" [class]="styleClass" [ngStyle]="style">
|
---|
30 | <ng-content></ng-content>
|
---|
31 | <span class="p-tag-icon" [ngClass]="icon" *ngIf="icon"></span>
|
---|
32 | <span class="p-tag-value">{{value}}</span>
|
---|
33 | </span>
|
---|
34 | `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
---|
35 | 'class': 'p-element'
|
---|
36 | }, styles: [".p-tag{display:inline-flex;align-items:center;justify-content:center}.p-tag-icon,.p-tag-value,.p-tag-icon.pi{line-height:1.5}.p-tag.p-tag-rounded{border-radius:10rem}\n"] }]
|
---|
37 | }], propDecorators: { styleClass: [{
|
---|
38 | type: Input
|
---|
39 | }], style: [{
|
---|
40 | type: Input
|
---|
41 | }], severity: [{
|
---|
42 | type: Input
|
---|
43 | }], value: [{
|
---|
44 | type: Input
|
---|
45 | }], icon: [{
|
---|
46 | type: Input
|
---|
47 | }], rounded: [{
|
---|
48 | type: Input
|
---|
49 | }] } });
|
---|
50 | class TagModule {
|
---|
51 | }
|
---|
52 | TagModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TagModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
---|
53 | TagModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TagModule, declarations: [Tag], imports: [CommonModule], exports: [Tag] });
|
---|
54 | TagModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TagModule, imports: [[CommonModule]] });
|
---|
55 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TagModule, decorators: [{
|
---|
56 | type: NgModule,
|
---|
57 | args: [{
|
---|
58 | imports: [CommonModule],
|
---|
59 | exports: [Tag],
|
---|
60 | declarations: [Tag]
|
---|
61 | }]
|
---|
62 | }] });
|
---|
63 |
|
---|
64 | /**
|
---|
65 | * Generated bundle index. Do not edit.
|
---|
66 | */
|
---|
67 |
|
---|
68 | export { Tag, TagModule };
|
---|