UNPKG

@tindtechnologies/universalviewer

Version:

The Universal Viewer is a community-developed open source project on a mission to help you share your 📚📜📰📽️📻🗿 with the 🌎

2 lines (1 loc) 2.4 kB
import{a as n}from"./chunk-Y2TXPXZV.js";import{a as i,e as r,f as o,l as a,n as s,o as g}from"./chunk-VNJCZCB4.js";import"./chunk-L67DAW3A.js";var m=function(){function e(t){i(this,t),this.animated=!1}return e.prototype.calculateWidth=function(){if(this.width!==void 0)return{style:{width:this.width}}},e.prototype.render=function(){var t,b=this.animated&&s.getBoolean("animated",!0),u=n("ion-avatar",this.el)||n("ion-thumbnail",this.el),c=g(this);return r(o,Object.assign({class:(t={},t[c]=!0,t["skeleton-text-animated"]=b,t["in-media"]=u,t)},this.calculateWidth()),r("span",null,"\xA0"))},Object.defineProperty(e.prototype,"el",{get:function(){return a(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e,"style",{get:function(){return":host{--background:rgba(var(--background-rgb,var(--ion-text-color-rgb,0,0,0)),0.065);border-radius:var(--border-radius,inherit);display:block;width:100%;height:inherit;margin-top:4px;margin-bottom:4px;background:var(--background);line-height:10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}span{display:inline-block}:host(.in-media){margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;height:100%}:host(.skeleton-text-animated){position:relative;background:-webkit-gradient(linear,left top,right top,color-stop(8%,rgba(var(--background-rgb,var(--ion-text-color-rgb,0,0,0)),.065)),color-stop(18%,rgba(var(--background-rgb,var(--ion-text-color-rgb,0,0,0)),.135)),color-stop(33%,rgba(var(--background-rgb,var(--ion-text-color-rgb,0,0,0)),.065)));background:linear-gradient(90deg,rgba(var(--background-rgb,var(--ion-text-color-rgb,0,0,0)),.065) 8%,rgba(var(--background-rgb,var(--ion-text-color-rgb,0,0,0)),.135) 18%,rgba(var(--background-rgb,var(--ion-text-color-rgb,0,0,0)),.065) 33%);background-size:800px 104px;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:shimmer;animation-name:shimmer;-webkit-animation-timing-function:linear;animation-timing-function:linear}@-webkit-keyframes shimmer{0%{background-position:-468px 0}to{background-position:468px 0}}@keyframes shimmer{0%{background-position:-468px 0}to{background-position:468px 0}}"},enumerable:!0,configurable:!0}),e}();export{m as ion_skeleton_text};