UNPKG

@rocketspark/domain-checker

Version:
13 lines 3.14 kB
/*! * * @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([[616],{8616:function(t,e,s){s.r(e),s.d(e,{rs_list_item:function(){return r}});var i=s(7915);const r=class{constructor(t){(0,i.r)(this,t),this.listSelector=null,this.updateState=()=>{null!==this.listSelector&&(this.selected=this.listSelector.value===this.value,this.showArrow=!this.selected,this.complete=this.selected)},this.onClick=()=>{this.listSelector.value=this.value},this.heading=void 0,this.error=!1,this.value=void 0,this.selectable=!1,this.complete=!1,this.showArrow=!0,this.selected=!1}connectedCallback(){this.listSelector=this.el.closest("rs-list-select"),null!==this.listSelector&&(this.updateState(),this.listSelector.addEventListener("rsChange",this.updateState))}disconnectedCallback(){null!==this.listSelector&&(this.listSelector.removeEventListener("rsChange",this.updateState),this.listSelector=null)}render(){const t=this.complete?(0,i.h)("rs-icon",{class:"rs-list-item__icon--circle-tick",name:"circle-tick",color:"primary-700",size:24}):"",e=this.showArrow?(0,i.h)("rs-icon",{class:"rs-list-item__icon--arrow-right",name:"chevron-right",color:"grey-700",size:15}):"";return(0,i.h)(i.H,{class:{"rs-list-item--error":this.error,"rs-list-item--selectable":this.selectable,"rs-list-item--selected":this.selected,"rs-list-item--complete":this.complete},onClick:this.onClick},(0,i.h)("div",{class:"rs-list-item__start"},(0,i.h)("slot",{name:"start"}),(0,i.h)("slot",null)),(0,i.h)("div",{class:"rs-list-item__end"},(0,i.h)("slot",{name:"end"}),t,e))}get el(){return(0,i.g)(this)}};r.style=':host{display:flex;align-items:center;justify-content:space-between;box-shadow:inset 0 0 0 1px var(--rs-color-grey-light);border-radius:7px;padding:20px 25px;box-sizing:border-box;line-height:21px;max-height:62px;height:62px;transition:box-shadow 0.2s cubic-bezier(0, 0.55, 0.45, 1)}:host(.rs-list-item--error){box-shadow:inset 0 0 0 1px var(--rs-color-negative)}:host(.rs-list-item--selectable){cursor:pointer}:host(.rs-list-item--selected),:host(.rs-list-item--complete){box-shadow:inset 0 0 0 2px var(--rs-color-primary)}:host(.rs-list-item--selectable:hover){box-shadow:inset 0 0 0 2px var(--rs-color-grey-300)}:host(.rs-list-item--selectable) .rs-list-item__icon--arrow-right{transform:translateX(0);transition:transform 0.5s cubic-bezier(0, 0.55, 0.45, 1)}:host(.rs-list-item--selectable:hover) .rs-list-item__icon--arrow-right{transform:translateX(10px)}:host(.rs-list-item--selectable.rs-list-item--selected:hover){box-shadow:inset 0 0 0 2px var(--rs-color-primary)}.rs-list-item__start{display:flex;align-items:center;justify-content:start}::slotted([slot="start"]){margin-right:8px}.rs-list-item__end{display:flex;align-items:center}.rs-list-item__end rs-icon{margin-left:15px}'}}]); //# sourceMappingURL=616.index.js.map