@rocketspark/domain-checker
Version:
Embeddable Domain Checker for Rocketspark
13 lines • 2.56 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([[697],{9697:function(s,o,t){t.r(o),t.d(o,{rs_modal:function(){return e}});var r=t(7915);const e=class{constructor(s){(0,r.r)(this,s),this.rsClose=(0,r.c)(this,"rsClose",7),this.rsOpen=(0,r.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.closePopup=()=>{this.close()},this.showClose=!0}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,r.h)(r.H,null,(0,r.h)("div",{class:"rs-modal",ref:s=>this.modal=s},(0,r.h)("div",{class:"rs-modal__backdrop"}),(0,r.h)("div",{ref:s=>this.modalContent=s,class:"rs-modal__content rs-component-shadow--popup",style:{transform:this.startTransform}},this.showClose?(0,r.h)("rs-icon",{name:"x",size:24,class:"rs_modal__close",onClick:this.closePopup}):"",(0,r.h)("slot",null))))}};e.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