UNPKG

@zoff-tech/zt-bottom-drawer

Version:
2 lines 4 kB
import{r as s,h as r,H as n}from"./p-f6c816ce.js";import{createColorClasses as e}from"@utils/theme";import{c as t,g as i}from"./p-0b9b2444.js";import{S as o}from"./p-565a0d83.js";const a=":host{display:inline-block;position:relative;width:28px;height:28px;color:var(--color);user-select:none}:host(.ion-color){color:var(--ion-color-base)}svg{transform-origin:center;position:absolute;top:0;left:0;width:100%;height:100%;transform:translateZ(0)}:host-context([dir=rtl]) svg{transform-origin:calc(100% - center)}[dir=rtl] svg{transform-origin:calc(100% - center)}@supports selector(:dir(rtl)){svg:dir(rtl){transform-origin:calc(100% - center)}}:host(.spinner-lines) line,:host(.spinner-lines-small) line{stroke-width:7px}:host(.spinner-lines-sharp) line,:host(.spinner-lines-sharp-small) line{stroke-width:4px}:host(.spinner-lines) line,:host(.spinner-lines-small) line,:host(.spinner-lines-sharp) line,:host(.spinner-lines-sharp-small) line{stroke-linecap:round;stroke:currentColor}:host(.spinner-lines) svg,:host(.spinner-lines-small) svg,:host(.spinner-lines-sharp) svg,:host(.spinner-lines-sharp-small) svg{animation:spinner-fade-out 1s linear infinite}:host(.spinner-bubbles) svg{animation:spinner-scale-out 1s linear infinite;fill:currentColor}:host(.spinner-circles) svg{animation:spinner-fade-out 1s linear infinite;fill:currentColor}:host(.spinner-crescent) circle{fill:transparent;stroke-width:4px;stroke-dasharray:128px;stroke-dashoffset:82px;stroke:currentColor}:host(.spinner-crescent) svg{animation:spinner-rotate 1s linear infinite}:host(.spinner-dots) circle{stroke-width:0;fill:currentColor}:host(.spinner-dots) svg{animation:spinner-dots 1s linear infinite}:host(.spinner-circular) svg{animation:spinner-circular linear infinite}:host(.spinner-circular) circle{animation:spinner-circular-inner ease-in-out infinite;stroke:currentColor;stroke-dasharray:80px, 200px;stroke-dashoffset:0px;stroke-width:5.6;fill:none}:host(.spinner-paused),:host(.spinner-paused) svg,:host(.spinner-paused) circle{animation-play-state:paused}@keyframes spinner-fade-out{0%{opacity:1}100%{opacity:0}}@keyframes spinner-scale-out{0%{transform:scale(1, 1)}100%{transform:scale(0, 0)}}@keyframes spinner-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes spinner-dots{0%{transform:scale(1, 1);opacity:0.9}50%{transform:scale(0.4, 0.4);opacity:0.3}100%{transform:scale(1, 1);opacity:0.9}}@keyframes spinner-circular{100%{transform:rotate(360deg)}}@keyframes spinner-circular-inner{0%{stroke-dasharray:1px, 200px;stroke-dashoffset:0px}50%{stroke-dasharray:100px, 200px;stroke-dashoffset:-15px}100%{stroke-dasharray:100px, 200px;stroke-dashoffset:-125px}}";const l=class{constructor(r){s(this,r);this.color=undefined;this.duration=undefined;this.name=undefined;this.paused=false}getName(){const s=this.name||t.get("spinner");const r=i(this);if(s){return s}return r==="ios"?"lines":"circular"}render(){var s;const a=this;const l=i(a);const f=a.getName();const h=(s=o[f])!==null&&s!==void 0?s:o["lines"];const m=typeof a.duration==="number"&&a.duration>10?a.duration:h.dur;const d=[];if(h.circles!==undefined){for(let s=0;s<h.circles;s++){d.push(p(h,m,s,h.circles))}}else if(h.lines!==undefined){for(let s=0;s<h.lines;s++){d.push(c(h,m,s,h.lines))}}return r(n,{class:e(a.color,{[l]:true,[`spinner-${f}`]:true,"spinner-paused":a.paused||t.getBoolean("_testing")}),role:"progressbar",style:h.elmDuration?{animationDuration:m+"ms"}:{}},d)}};const p=(s,n,e,t)=>{const i=s.fn(n,e,t);i.style["animation-duration"]=n+"ms";return r("svg",{viewBox:i.viewBox||"0 0 64 64",style:i.style},r("circle",{transform:i.transform||"translate(32,32)",cx:i.cx,cy:i.cy,r:i.r,style:s.elmDuration?{animationDuration:n+"ms"}:{}}))};const c=(s,n,e,t)=>{const i=s.fn(n,e,t);i.style["animation-duration"]=n+"ms";return r("svg",{viewBox:i.viewBox||"0 0 64 64",style:i.style},r("line",{transform:"translate(32,32)",y1:i.y1,y2:i.y2}))};l.style=a;export{l as ion_spinner}; //# sourceMappingURL=p-b241e530.entry.js.map