UNPKG

@larva.io/webcomponents

Version:

Fentrica SmartUnits WebComponents package

59 lines (54 loc) 2.57 kB
/*! * (C) Fentrica http://fentrica.com - Seee LICENSE.md */ import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-AOwgnAK2.js'; import { d as defineCustomElement$2 } from './p-BAe61gUe.js'; const onoffContentCss = "slot-fb[hidden],slot[hidden]{display:initial !important}:host{display:block;width:100%;height:100%}.onoff-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-height:15rem;padding:2rem}.onoff-container lar-toggle{-webkit-transform:scale(2.5);transform:scale(2.5)}@media (max-width: 576px){.onoff-container{min-height:12rem}.onoff-container lar-toggle{-webkit-transform:scale(2);transform:scale(2)}}"; const OnOffContent = /*@__PURE__*/ proxyCustomElement(class OnOffContent extends H { constructor(registerHost) { super(); if (registerHost !== false) { this.__registerHost(); } this.__attachShadow(); this.buttonclick = createEvent(this, "buttonclick"); } onClick(event) { this.buttonclick.emit(); event.preventDefault(); event.stopPropagation(); } render() { const isOn = this.value === 'onoff.on' || this.value === 'onoff.switchoff'; return (h(Host, { key: 'b17474c05fb17917addf9158a7a7d070c42dc48b' }, h("div", { key: '02c454513485b04fd706f9d5cee38679a58c2c0a', class: "onoff-container" }, h("lar-toggle", { key: '200b7a21c21c7d58e462c0b727502fcf288b4f5c', disabled: this.disabled, color: this.color, checked: isOn, onClick: e => this.onClick(e) })))); } static get style() { return onoffContentCss; } }, [257, "lar-onoff-content", { "color": [1], "disabled": [4], "value": [1] }]); function defineCustomElement$1() { if (typeof customElements === "undefined") { return; } const components = ["lar-onoff-content", "lar-toggle"]; components.forEach(tagName => { switch (tagName) { case "lar-onoff-content": if (!customElements.get(tagName)) { customElements.define(tagName, OnOffContent); } break; case "lar-toggle": if (!customElements.get(tagName)) { defineCustomElement$2(); } break; } }); } defineCustomElement$1(); const LarOnoffContent = OnOffContent; const defineCustomElement = defineCustomElement$1; export { LarOnoffContent, defineCustomElement }; //# sourceMappingURL=lar-onoff-content.js.map //# sourceMappingURL=lar-onoff-content.js.map