@postnord/web-components
Version:
PostNord Web Components
5 lines • 2.17 kB
JavaScript
/*!
* Built with Stencil
* By PostNord.
*/
import{transformTag as e,proxyCustomElement as n,HTMLElement as r,h as i,Host as s}from"@stencil/core/internal/client";const t=n(class extends r{constructor(e){super(),!1!==e&&this.__registerHost()}get hostElement(){return this}light=!1;size=1.5;getColor(){return this.light?"#fff":"#005d92"}getSize(){return`${this.size}em`}render(){return i(s,{key:"a143e0f8959099811a49a4772809bea95ac7b3c5"},i("svg",{key:"14d49833b52a340b3b3d1a3c1dfdfb8e9c176858",class:"pn-spinner",style:{"--pn-spinner-size":this.getSize(),"--pn-spinner-color":this.getColor()},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none"},i("circle",{key:"b66d19a748cf83364f508956c9c3e1a487de96fc",class:"pn-spinner-circle",cx:"12",cy:"12",r:"10","stroke-width":"3"}),i("circle",{key:"e576947e99cd98ead97e4a49327fcce9e5811af3",class:"pn-spinner-dot",cx:"21.3",cy:"16",r:"1.48"})))}static get style(){return`${e("pn-spinner")}{display:inline-block}${e("pn-spinner")} .pn-spinner{--pn-spinner-size:1.5em;--pn-spinner-color:main.$blue700;height:var(--pn-spinner-size);width:var(--pn-spinner-size);display:block;animation:rotate 1s infinite;animation-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-spinner")} .pn-spinner{animation-duration:2s}}${e("pn-spinner")} .pn-spinner-circle{stroke:var(--pn-spinner-color);transform-origin:center center;transform:rotate(-310deg);stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:64;animation:loading 2s infinite;animation-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-spinner")} .pn-spinner-circle{animation-duration:4s}}${e("pn-spinner")} .pn-spinner-dot{fill:var(--pn-spinner-color)}@keyframes loading{0%{stroke-dashoffset:55}50%{stroke-dashoffset:12}100%{stroke-dashoffset:55}}@keyframes rotate{from{transform:rotate(-180deg) scaleX(-1)}to{transform:rotate(180deg) scaleX(-1)}}`}},[512,"pn-spinner",{light:[4],size:[2]}]);function o(){"undefined"!=typeof customElements&&["pn-spinner"].forEach((n=>{"pn-spinner"===n&&(customElements.get(e(e(n)))||customElements.define(e(e(n)),t))}))}export{t as P,o as d}