primeng
Version:
[](https://opensource.org/licenses/MIT) [](https://badge.fury.io/js/primeng) [ • 2.39 kB
JavaScript
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
class Skeleton {
constructor() {
this.shape = "rectangle";
this.animation = "wave";
this.borderRadius = null;
this.size = null;
this.width = "100%";
this.height = "1rem";
}
containerClass() {
return {
'p-skeleton p-component': true,
'p-skeleton-circle': this.shape === 'circle',
'p-skeleton-none': this.animation === 'none'
};
}
containerStyle() {
if (this.size)
return Object.assign(Object.assign({}, this.style), { width: this.size, height: this.size, borderRadius: this.borderRadius });
else
return Object.assign(Object.assign({}, this.style), { width: this.width, height: this.height, borderRadius: this.borderRadius });
}
}
Skeleton.decorators = [
{ type: Component, args: [{
selector: 'p-skeleton',
template: `
<div [ngClass]="containerClass()" [class]="styleClass" [ngStyle]="containerStyle()">
</div>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
styles: [".p-skeleton{overflow:hidden;position:relative}.p-skeleton:after{animation:p-skeleton-animation 1.2s infinite;content:\"\";height:100%;left:0;position:absolute;right:0;top:0;transform:translateX(-100%);z-index:1}.p-skeleton.p-skeleton-circle{border-radius:50%}.p-skeleton-none:after{animation:none}@keyframes p-skeleton-animation{0%{transform:translateX(-100%)}to{transform:translateX(100%)}}"]
},] }
];
Skeleton.propDecorators = {
styleClass: [{ type: Input }],
style: [{ type: Input }],
shape: [{ type: Input }],
animation: [{ type: Input }],
borderRadius: [{ type: Input }],
size: [{ type: Input }],
width: [{ type: Input }],
height: [{ type: Input }]
};
class SkeletonModule {
}
SkeletonModule.decorators = [
{ type: NgModule, args: [{
imports: [CommonModule],
exports: [Skeleton],
declarations: [Skeleton]
},] }
];
/**
* Generated bundle index. Do not edit.
*/
export { Skeleton, SkeletonModule };
//# sourceMappingURL=primeng-skeleton.js.map