@postnord/web-components
Version:
PostNord Web Components
5 lines • 2.17 kB
JavaScript
/*!
* Built with Stencil
* By PostNord.
*/
import{transformTag as n,proxyCustomElement as e,HTMLElement as r,h as i,Host as s}from"@stencil/core/internal/client";const t=e(class extends r{constructor(n){super(),!1!==n&&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:"a9ecba01b5b30a660a44439c714b7ad57cf02a88"},i("svg",{key:"03fbe990bf1ae0402fcb27707e0c1712d8a84492",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:"c48784865cd9c8c3d55cd9b1bd3e0dff7a4ebe35",class:"pn-spinner-circle",cx:"12",cy:"12",r:"10","stroke-width":"3"}),i("circle",{key:"5f69d1bbbf864842f9ae54dc9a29b61603a83bff",class:"pn-spinner-dot",cx:"21.3",cy:"16",r:"1.48"})))}static get style(){return`${n("pn-spinner")}{display:inline-block}${n("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){${n("pn-spinner")} .pn-spinner{animation-duration:2s}}${n("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){${n("pn-spinner")} .pn-spinner-circle{animation-duration:4s}}${n("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((e=>{"pn-spinner"===e&&(customElements.get(n(n(e)))||customElements.define(n(n(e)),t))}))}export{t as P,o as d}