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

101 lines
10 KiB
JavaScript
Raw Permalink Normal View History

2024-07-16 14:55:36 +00:00
import { CommonModule } from '@angular/common';
import { ChangeDetectionStrategy, Component, Input, NgModule, ViewEncapsulation } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
/**
* Skeleton is a placeholder to display instead of the actual content.
* @group Components
*/
export 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
}] } });
export 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]
}]
}] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2tlbGV0b24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL2NvbXBvbmVudHMvc2tlbGV0b24vc2tlbGV0b24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLFFBQVEsRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7O0FBQ3ZHOzs7R0FHRztBQVdILE1BQU0sT0FBTyxRQUFRO0lBQ2pCOzs7T0FHRztJQUNNLFVBQVUsQ0FBcUI7SUFDeEM7OztPQUdHO0lBQ00sS0FBSyxDQUE4QztJQUM1RDs7O09BR0c7SUFDTSxLQUFLLEdBQVcsV0FBVyxDQUFDO0lBQ3JDOzs7T0FHRztJQUNNLFNBQVMsR0FBVyxNQUFNLENBQUM7SUFDcEM7OztPQUdHO0lBQ00sWUFBWSxDQUFxQjtJQUMxQzs7O09BR0c7SUFDTSxJQUFJLENBQWtDO0lBQy9DOzs7T0FHRztJQUNNLEtBQUssR0FBVyxNQUFNLENBQUM7SUFDaEM7OztPQUdHO0lBQ00sTUFBTSxHQUFXLE1BQU0sQ0FBQztJQUVqQyxjQUFjO1FBQ1YsT0FBTztZQUNILHdCQUF3QixF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