Icard/angular-clarity-master(work.../node_modules/primeng/fesm2022/primeng-skeleton.mjs

109 lines
5.4 KiB
JavaScript

import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i0 from '@angular/core';
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, NgModule } from '@angular/core';
/**
* Skeleton is a placeholder to display instead of the actual content.
* @group Components
*/
class Skeleton {
/**
* Class of the element.
* @group Props
*/
styleClass;
/**
* Inline style of the element.
* @group Props
*/
style;
/**
* Shape of the element.
* @group Props
*/
shape = 'rectangle';
/**
* Type of the animation.
* @gruop Props
*/
animation = 'wave';
/**
* Border radius of the element, defaults to value from theme.
* @group Props
*/
borderRadius;
/**
* Size of the skeleton.
* @group Props
*/
size;
/**
* Width of the element.
* @group Props
*/
width = '100%';
/**
* Height of the element.
* @group Props
*/
height = '1rem';
containerClass() {
return {
'p-skeleton p-component': true,
'p-skeleton-circle': this.shape === 'circle',
'p-skeleton-none': this.animation === 'none'
};
}
get containerStyle() {
if (this.size)
return { ...this.style, width: this.size, height: this.size, borderRadius: this.borderRadius };
else
return { width: this.width, height: this.height, borderRadius: this.borderRadius, ...this.style };
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: Skeleton, deps: [], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: Skeleton, selector: "p-skeleton", inputs: { styleClass: "styleClass", style: "style", shape: "shape", animation: "animation", borderRadius: "borderRadius", size: "size", width: "width", height: "height" }, host: { classAttribute: "p-element" }, ngImport: i0, template: ` <div [ngClass]="containerClass()" [class]="styleClass" [ngStyle]="containerStyle" [attr.data-pc-name]="'skeleton'" [attr.aria-hidden]="true" [attr.data-pc-section]="'root'"></div> `, isInline: true, styles: ["@layer primeng{.p-skeleton{position:relative;overflow:hidden}.p-skeleton:after{content:\"\";animation:p-skeleton-animation 1.2s infinite;height:100%;left:0;position:absolute;right:0;top:0;transform:translate(-100%);z-index:1}.p-skeleton.p-skeleton-circle{border-radius:50%}.p-skeleton-none:after{animation:none}}@keyframes p-skeleton-animation{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: Skeleton, decorators: [{
type: Component,
args: [{ selector: 'p-skeleton', template: ` <div [ngClass]="containerClass()" [class]="styleClass" [ngStyle]="containerStyle" [attr.data-pc-name]="'skeleton'" [attr.aria-hidden]="true" [attr.data-pc-section]="'root'"></div> `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
class: 'p-element'
}, styles: ["@layer primeng{.p-skeleton{position:relative;overflow:hidden}.p-skeleton:after{content:\"\";animation:p-skeleton-animation 1.2s infinite;height:100%;left:0;position:absolute;right:0;top:0;transform:translate(-100%);z-index:1}.p-skeleton.p-skeleton-circle{border-radius:50%}.p-skeleton-none:after{animation:none}}@keyframes p-skeleton-animation{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n"] }]
}], 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 {
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: SkeletonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.7", ngImport: i0, type: SkeletonModule, declarations: [Skeleton], imports: [CommonModule], exports: [Skeleton] });
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: SkeletonModule, imports: [CommonModule] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: SkeletonModule, decorators: [{
type: NgModule,
args: [{
imports: [CommonModule],
exports: [Skeleton],
declarations: [Skeleton]
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { Skeleton, SkeletonModule };
//# sourceMappingURL=primeng-skeleton.mjs.map