UNPKG

primevue

Version:

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

2 lines (1 loc) 2.22 kB
this.primevue=this.primevue||{},this.primevue.skeleton=function(e){"use strict";var n={name:"Skeleton",props:{shape:{type:String,default:"rectangle"},size:{type:String,default:null},width:{type:String,default:"100%"},height:{type:String,default:"1rem"},borderRadius:{type:String,default:null},animation:{type:String,default:"wave"}},computed:{containerClass(){return["p-skeleton p-component",{"p-skeleton-circle":"circle"===this.shape,"p-skeleton-none":"none"===this.animation}]},containerStyle(){return this.size?{width:this.size,height:this.size,borderRadius:this.borderRadius}:{width:this.width,height:this.height,borderRadius:this.borderRadius}}}};return function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===t&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('\n.p-skeleton {\n position: relative;\n overflow: hidden;\n}\n.p-skeleton::after {\n content: "";\n -webkit-animation: p-skeleton-animation 1.2s infinite;\n animation: p-skeleton-animation 1.2s infinite;\n height: 100%;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n -webkit-transform: translateX(-100%);\n transform: translateX(-100%);\n z-index: 1;\n}\n.p-skeleton.p-skeleton-circle {\n border-radius: 50%;\n}\n.p-skeleton-none::after {\n -webkit-animation: none;\n animation: none;\n}\n@-webkit-keyframes p-skeleton-animation {\nfrom {\n -webkit-transform: translateX(-100%);\n transform: translateX(-100%);\n}\nto {\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n}\n}\n@keyframes p-skeleton-animation {\nfrom {\n -webkit-transform: translateX(-100%);\n transform: translateX(-100%);\n}\nto {\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n}\n}\n'),n.render=function(n,t,i,r,a,s){return e.openBlock(),e.createBlock("div",{style:s.containerStyle,class:s.containerClass},null,6)},n}(Vue);