skeleton-webcomponent-loader 2.0.0 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/cjs/{css-shim-285ec151.js → css-shim-b3e497ca.js} +1 -1
  3. package/dist/cjs/{index-1386590f.js → index-b5d2dca0.js} +172 -116
  4. package/dist/cjs/loader.cjs.js +4 -4
  5. package/dist/cjs/nb-skeleton.cjs.entry.js +2 -2
  6. package/dist/cjs/skeleton-webcomponent.cjs.js +4 -4
  7. package/dist/collection/collection-manifest.json +2 -2
  8. package/dist/collection/components/skeleton/skeleton.js +28 -28
  9. package/dist/custom-elements/index.js +3 -3
  10. package/dist/esm/{css-shim-934c915f.js → css-shim-2f04a37a.js} +1 -1
  11. package/dist/esm/{index-6dfb91e6.js → index-63fd3905.js} +172 -116
  12. package/dist/esm/loader.js +4 -4
  13. package/dist/esm/nb-skeleton.entry.js +2 -2
  14. package/dist/esm/skeleton-webcomponent.js +4 -4
  15. package/dist/esm-es5/{css-shim-934c915f.js → css-shim-2f04a37a.js} +0 -0
  16. package/dist/esm-es5/index-63fd3905.js +1 -0
  17. package/dist/esm-es5/loader.js +1 -1
  18. package/dist/esm-es5/nb-skeleton.entry.js +1 -1
  19. package/dist/esm-es5/skeleton-webcomponent.js +1 -1
  20. package/dist/skeleton-webcomponent/{p-07aa1738.js → p-12077897.js} +0 -0
  21. package/dist/skeleton-webcomponent/{p-6f883149.system.js → p-16aec442.system.js} +0 -0
  22. package/dist/skeleton-webcomponent/p-63ed3b45.entry.js +1 -0
  23. package/dist/skeleton-webcomponent/p-7e96e5d4.js +1 -0
  24. package/dist/skeleton-webcomponent/{p-94c5d705.system.js → p-8bef7229.system.js} +1 -1
  25. package/dist/skeleton-webcomponent/{p-0af0d538.system.entry.js → p-dc1bf577.system.entry.js} +1 -1
  26. package/dist/skeleton-webcomponent/p-f59432d4.system.js +1 -0
  27. package/dist/skeleton-webcomponent/skeleton-webcomponent.esm.js +1 -1
  28. package/dist/skeleton-webcomponent/skeleton-webcomponent.js +1 -1
  29. package/dist/types/stencil-public-runtime.d.ts +196 -186
  30. package/loader/index.d.ts +0 -1
  31. package/package.json +3 -4
  32. package/readme.md +3 -1
  33. package/dist/esm-es5/index-6dfb91e6.js +0 -1
  34. package/dist/skeleton-webcomponent/p-13a85a5d.js +0 -1
  35. package/dist/skeleton-webcomponent/p-437abd94.system.js +0 -1
  36. package/dist/skeleton-webcomponent/p-b1ce4c03.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{r as e,h as t}from"./p-13a85a5d.js";const r=["progress","progress-dark","pulse","false"],i=class{constructor(t){e(this,t),this.count=1,this.variant="text",this.width=null,this.height=null,this.marginBottom=null,this.animation="progress",this.customStyles={},this.showWarnings=!0,this.items=[]}componentWillLoad(){this.init()}componentWillUpdate(){this.init()}init(){if(this.items.length=this.count,this.items.fill(1),r.includes(this.animation)||(this.showWarnings&&console.warn(`\`Skeleton\` need to receive 'animation' as: ${r.join(", ")}. Forcing default to "progress".`),this.animation="progress"),this.customStyles&&"string"==typeof this.customStyles)try{this.customStyles=JSON.parse(this.customStyles)}catch(e){this.showWarnings&&console.warn("can't parse styles",this.customStyles)}}get style(){let e={width:null,height:null,marginBottom:null};this.width&&(e.width=this.width),this.height&&(e.height=this.height),this.marginBottom&&(e.marginBottom=this.marginBottom);const t="object"==typeof this.customStyles?this.customStyles:{};return Object.assign(Object.assign({},e),t)}render(){return this.items.map(((e,r)=>t("span",{key:r,class:{circle:"circle"===this.variant,rect:"rect"===this.variant,progress:"progress"===this.animation,"progress-dark":"progress-dark"===this.animation,pulse:"pulse"===this.animation,skeleton:!0},"aria-busy":"true","aria-valuemin":"0","aria-valuemax":"100","aria-valuetext":"Loading...",role:"progressbar",tabindex:"0",style:this.style})))}};i.style=".skeleton{-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;overflow:hidden;position:relative;background:var(--skeleton-background, #eff1f6) no-repeat;border-radius:var(--skeleton-border-radius, 4px);width:var(--skeleton-width, 100%);height:var(--skeleton-height, 20px);display:inline-block;margin-bottom:var(--skeleton-margin-bottom, 10px);will-change:transform}.skeleton:after,.skeleton:before{-webkit-box-sizing:border-box;box-sizing:border-box}.skeleton.circle{width:var(--skeleton-width, 40px);height:var(--skeleton-height, 40px);margin-bottom:var(--skeleton-margin-bottom, 5px);border-radius:var(--skeleton-border-radius, 50%)}.skeleton.rect{border-radius:var(--skeleton-border-radius, 0px)}.skeleton.progress,.skeleton.progress-dark{-webkit-animation:progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;animation:progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;background-size:200px 100%}.skeleton.progress{background-image:-webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), color-stop(rgba(255, 255, 255, 0.6)), to(rgba(255, 255, 255, 0)));background-image:linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0))}.skeleton.progress-dark{background-image:-webkit-gradient(linear, left top, right top, from(transparent), color-stop(rgba(0, 0, 0, 0.2)), to(transparent));background-image:linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent)}.skeleton.pulse{-webkit-animation:pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;animation:pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;-webkit-animation-delay:0.5s;animation-delay:0.5s}@media (prefers-reduced-motion: reduce){.skeleton.pulse,.skeleton.progress-dark,.skeleton.progress{-webkit-animation:none;animation:none}.skeleton.progress,.skeleton.progress-dark{background-image:none}}@-webkit-keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}";export{i as nb_skeleton}