@rocketspark/domain-checker
Version:
Embeddable Domain Checker for Rocketspark
13 lines • 2.88 kB
JavaScript
/*!
*
* @rocketspark/domain-checker v1.0.12
* git+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([[697],{9697:function(s,t,o){o.r(t),o.d(t,{rs_modal:function(){return r}});var e=o(6919);const r=class{constructor(s){(0,e.r)(this,s),this.rsClose=(0,e.c)(this,"rsClose",7),this.rsOpen=(0,e.c)(this,"rsOpen",7),this.startTransform="translate(-50%, -50%) translate3d(0, 50px, 0)",this.openTransform="translate(-50%, -50%) translate3d(0, 0, 0)",this.closingTransform="translate(-50%, -50%) translate3d(0, -50px, 0)",this.showClose=!0,this.zIndex=1,this.closePopup=()=>{this.close()}}async open(){this.bodyOverflow=document.body.style.overflow,document.body.style.overflow="hidden",this.modal.style.display="block",setTimeout((()=>{this.modalContent.style.transform=this.openTransform,this.modal.style.opacity="1"}),1),this.rsOpen.emit()}async close(){document.body.style.overflow=this.bodyOverflow,this.modal.style.opacity="0",this.modalContent.style.transform=this.closingTransform,setTimeout((()=>{this.modalContent.style.transform=this.startTransform,this.modal.style.display="none"}),300),this.rsClose.emit()}render(){return(0,e.h)(e.H,{key:"0b4cda83c46d530a33aa498f4d34ea2ec46433d7"},(0,e.h)("div",{key:"7c1690961f17ff4b04a0d615149afc36333f3f9d",class:"rs-modal",ref:s=>this.modal=s},(0,e.h)("div",{key:"0c33a4f9efab55a27dec3c6967e633f9c450869d",class:"rs-modal__backdrop",style:{zIndex:this.zIndex.toString()}}),(0,e.h)("div",{key:"8e8a2c204303313fbfeaf03f699ab288a4bf1aa8",ref:s=>this.modalContent=s,class:"rs-modal__content rs-component-shadow--popup",style:{transform:this.startTransform,zIndex:(this.zIndex+1).toString()}},this.showClose?(0,e.h)("rs-icon",{name:"x",size:24,class:"rs_modal__close",onClick:this.closePopup}):"",(0,e.h)("slot",{key:"6e07c7c827a0992961247be1cacfcb8f25256474"}))))}};r.style=".rs-modal{display:none;opacity:0;transition:opacity 0.2s cubic-bezier(0, 0.55, 0.45, 1)}.rs-modal__content{background:var(--rs-color-white);border-radius:20px;padding:64px;position:fixed;left:50%;top:50%;min-width:100px;min-height:100px;transition:transform 0.3s ease-in-out;z-index:1}.rs-modal__backdrop{display:block;width:100%;height:100%;position:fixed;top:0;left:0;background:var(--rs-color-grey-light);opacity:0.8;z-index:1}.rs_modal__close{position:absolute;top:16px;right:16px;width:48px;height:48px;display:flex;justify-content:center;align-items:center;cursor:pointer;color:var(--rs-color-grey);transition:color 0.15s cubic-bezier(0, 0.55, 0.45, 1)}.rs_modal__close:hover{color:var(--rs-color-secondary)}"}}]);
//# sourceMappingURL=697.index.js.map