@digital-blueprint/checkin-app
Version:
[GitHub Repository](https://github.com/digital-blueprint/checkin-app) | [npmjs package](https://www.npmjs.com/package/@digital-blueprint/checkin-app) | [Unpkg CDN](https://unpkg.com/browse/@digital-blueprint/checkin-app/) | [Checkin Bundle](https://github
96 lines (87 loc) • 4.15 kB
JavaScript
let t,e,i=t=>t;function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},r.apply(this,arguments)}
/*!
* License: LGPL-2.1-or-later
* Dependencies:
*
* @webcomponents/scoped-custom-element-registry: 0.0.9 (BSD-3-Clause)
* @dbp-toolkit/app-shell: 0.3.4 (LGPL-2.1-or-later)
* @dbp-toolkit/language-select: 0.3.2 (LGPL-2.1-or-later)
* @dbp-toolkit/common: 0.3.5 (LGPL-2.1-or-later)
* @dbp-toolkit/auth: 0.3.2 (LGPL-2.1-or-later)
* event-target-shim: 6.0.2 (MIT)
* @dbp-toolkit/notification: 0.3.2 (LGPL-2.1-or-later)
* @dbp-toolkit/theme-switcher: 0.0.6 (LGPL-2.1-or-later)
* path-to-regexp: 6.2.0 (MIT)
* universal-router: 9.1.0 (MIT)
* generateUrls: 9.1.0 (MIT)
* @dbp-toolkit/matomo: 0.2.7 (LGPL-2.1-or-later)
* @dbp-toolkit/qr-code-scanner: 0.3.3 (LGPL-2.1-or-later)
* async-mutex: 0.4.0 (MIT)
* select2: 4.0.13 (MIT)
* @lit/reactive-element: 1.6.1 (BSD-3-Clause)
* lit-element: 3.3.1 (BSD-3-Clause)
*/import{A as a,i as o,g as n,f as s,x as d}from"./notification.fWOMSAA9.es.js";const c="button1",b="button2";class p extends a{constructor(){super(),this.value1="",this.value2="",this.name1="",this.name2="",this.name="",this.disabled=!1,this._active=""}static get properties(){return r({},super.properties,{value1:{type:String},value2:{type:String},name1:{type:String},name2:{type:String},name:{type:String,reflect:!0},disabled:{type:Boolean},_active:{type:Boolean}})}static get styles(){return o(t||(t=i`
${0}
${0}
div {
white-space: nowrap;
display: flex;
}
#button1 {
border-right: 0px;
}
.button:first-child {
border-radius: var(--dbp-border-radius) 0 0 var(--dbp-border-radius);
}
.button:last-child {
border-radius: 0 var(--dbp-border-radius) var(--dbp-border-radius) 0;
}
.active {
background-color: var(--dbp-secondary-surface) !important;
color: var(--dbp-on-secondary-surface) !important;
}
.button {
flex-grow: 1;
margin: 0px;
}
.button:hover {
background-color: var(--dbp-hover-background-color) !important;
color: var(--dbp-hover-color) !important;
}
only screen and (orientation: portrait) and (max-width: 768px) {
div {
display: block;
white-space: inherit;
}
#button1 {
width: 100%;
margin-bottom: 0px;
border-right: 1px solid;
border-bottom: 0px;
min-height: 40px;
}
#button2 {
width: 100%;
margin-top: 0px;
min-height: 40px;
}
}
`),n(),s())}update(t){t.forEach(((t,e)=>{"name"===e&&(this[e]===this.name1?this._active=c:this[e]===this.name2&&(this._active=b))})),super.update(t)}render(){const t=function(t){this._active=t.target.id,this.name=this._active===c?this.name1:this.name2;const e=new CustomEvent("change",{bubbles:!0,cancelable:!1});this.dispatchEvent(e)};return d(e||(e=i`
<div>
<button
="${0}"
class="button ${0}"
id="${0}"
?disabled="${0}">
${0}
</button>
<button
="${0}"
class="button ${0}"
id="${0}"
?disabled="${0}">
${0}
</button>
</div>
`),t,this._active===c?"active":"",c,this.disabled,this.value1,t,this._active===b?"active":"",b,this.disabled,this.value2)}}export{p as T};
//# sourceMappingURL=textswitch.UQb80iHx.es.js.map