@rocketspark/domain-checker
Version:
Embeddable Domain Checker for Rocketspark
13 lines • 2.3 kB
JavaScript
/*!
*
* @rocketspark/domain-checker v0.0.34
* https://github.com/rocketspark/domain-checker.git
*
* Copyright (c) Lee Reichardt and project contributors.
*
* This source code is licensed under the no license license found in the
* LICENSE file in the root directory of this source tree.
*
*/
"use strict";(self.webpackChunkDomainChecker=self.webpackChunkDomainChecker||[]).push([[853],{9853:function(t,e,s){s.r(e),s.d(e,{rs_spinner:function(){return i}});var r=s(7915);const i=class{constructor(t){(0,r.r)(this,t),this.dimensions={small:28,default:43,large:111},this.strokeWidth={small:3,default:4,large:4},this.activeStrokeWidth={small:3,default:4,large:4},this.size="default",this.color="primary",this.speed=1.5}getSize(){return this.dimensions[this.size]}getActiveStrokeWidth(){return this.activeStrokeWidth[this.size]}getStrokeWidth(){return this.strokeWidth[this.size]}getRadius(){return this.getSize()/2-this.getActiveStrokeWidth()/2}getStrokeDashArray(){return Math.PI*(2*this.getRadius())}static getProgressValue(){return 60}getStrokeDashOffset(){return(100-i.getProgressValue())/100*this.getStrokeDashArray()}render(){return(0,r.h)(r.H,{class:`size--${this.size}`,style:{width:`${this.getSize()}px`,height:`${this.getSize()}px`}},(0,r.h)("svg",{width:this.getSize(),height:this.getSize(),viewBox:`0 0 ${this.getSize()} ${this.getSize()}`,fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.h)("circle",{class:"progress-bar",opacity:"0.5",cx:"50%",cy:"50%",r:this.getRadius(),style:{"stroke-width":`${this.getStrokeWidth()}`}}),(0,r.h)("circle",{class:"progress-circle",cx:"50%",cy:"50%",r:this.getRadius(),style:{opacity:"1",stroke:`var(--rs-color-${this.color})`,"stroke-dasharray":`${this.getStrokeDashArray()}`,"stroke-width":`${this.getActiveStrokeWidth()}px`,"stroke-dashoffset":`${this.getStrokeDashOffset()}`,"stroke-linecap":"round","transform-origin":`${this.getSize()/2}px ${this.getSize()/2}px`,transform:"rotate(-90deg)",animation:`spin ${this.speed}s linear infinite`}})))}};i.style=":host{display:block}.progress-bar{stroke:var(--rs-color-grey-light)}.progress-circle{stroke:var(--rs-color-primary-700);animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}"}}]);
//# sourceMappingURL=853.index.js.map