UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

2 lines 5.27 kB
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["29579"],{55486:function(e,t,i){var c=i(61701),d=(i(71695),i(47021),i(4918)),a=i(6394),o=i(57243),r=i(50778),n=i(35359),l=i(36522);let s,h,u=e=>e;(0,c.Z)([(0,r.Mo)("ha-formfield")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,r.Cb)({type:Boolean,reflect:!0})],key:"disabled",value(){return!1}},{kind:"method",key:"render",value:function(){const e={"mdc-form-field--align-end":this.alignEnd,"mdc-form-field--space-between":this.spaceBetween,"mdc-form-field--nowrap":this.nowrap};return(0,o.dy)(s||(s=u` <div class="mdc-form-field ${0}"> <slot></slot> <label class="mdc-label" @click="${0}"> <slot name="label">${0}</slot> </label> </div>`),(0,n.$)(e),this._labelClick,this.label)}},{kind:"method",key:"_labelClick",value:function(){const e=this.input;if(e&&(e.focus(),!e.disabled))switch(e.tagName){case"HA-CHECKBOX":e.checked=!e.checked,(0,l.B)(e,"change");break;case"HA-RADIO":e.checked=!0,(0,l.B)(e,"change");break;default:e.click()}}},{kind:"field",static:!0,key:"styles",value(){return[a.W,(0,o.iv)(h||(h=u`:host(:not([alignEnd])) ::slotted(ha-switch){margin-right:10px;margin-inline-end:10px;margin-inline-start:inline}.mdc-form-field{align-items:var(--ha-formfield-align-items,center);gap:4px}.mdc-form-field>label{direction:var(--direction);margin-inline-start:0;margin-inline-end:auto;padding:0}:host([disabled]) label{color:var(--disabled-text-color)}`))]}}]}}),d.a)},34363:function(e,t,i){var c=i(61701),d=(i(71695),i(47021),i(57243)),a=i(50778);let o,r,n=e=>e;(0,c.Z)([(0,a.Mo)("ha-input-helper-text")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"method",key:"render",value:function(){return(0,d.dy)(o||(o=n`<slot></slot>`))}},{kind:"field",static:!0,key:"styles",value(){return(0,d.iv)(r||(r=n`:host{display:block;color:var(--mdc-text-field-label-ink-color,rgba(0,0,0,.6));font-size:.75rem;padding-left:16px;padding-right:16px;padding-inline-start:16px;padding-inline-end:16px}`))}}]}}),d.oi)},56070:function(e,t,i){i.r(t),i.d(t,{HaBooleanSelector:()=>h});var c=i(61701),d=(i(71695),i(47021),i(57243)),a=i(50778),o=i(36522);i(55486),i(1888),i(34363);let r,n,l,s=e=>e,h=(0,c.Z)([(0,a.Mo)("ha-selector-boolean")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"value",value(){return!1}},{kind:"field",decorators:[(0,a.Cb)()],key:"placeholder",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"method",key:"render",value:function(){var e;return(0,d.dy)(r||(r=s` <ha-formfield alignEnd spaceBetween .label="${0}"> <ha-switch .checked="${0}" @change="${0}" .disabled="${0}"></ha-switch> <span slot="label"> <p class="primary">${0}</p> ${0} </span> </ha-formfield> `),this.label,null!==(e=this.value)&&void 0!==e?e:!0===this.placeholder,this._handleChange,this.disabled,this.label,this.helper?(0,d.dy)(n||(n=s`<p class="secondary">${0}</p>`),this.helper):d.Ld)}},{kind:"method",key:"_handleChange",value:function(e){const t=e.target.checked;this.value!==t&&(0,o.B)(this,"value-changed",{value:t})}},{kind:"field",static:!0,key:"styles",value(){return(0,d.iv)(l||(l=s`ha-formfield{display:flex;min-height:56px;align-items:center;--mdc-typography-body2-font-size:1em}p{margin:0}.secondary{direction:var(--direction);padding-top:4px;box-sizing:border-box;color:var(--secondary-text-color);font-size:.875rem;font-weight:var(--mdc-typography-body2-font-weight,400)}`))}}]}}),d.oi)},1888:function(e,t,i){var c=i(61701),d=i(72621),a=(i(71695),i(47021),i(62523)),o=i(83835),r=i(57243),n=i(50778),l=i(13560);let s,h=e=>e;(0,c.Z)([(0,n.Mo)("ha-switch")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"haptic",value(){return!1}},{kind:"method",key:"firstUpdated",value:function(){(0,d.Z)(i,"firstUpdated",this,3)([]),this.addEventListener("change",(()=>{this.haptic&&(0,l.j)("light")}))}},{kind:"field",static:!0,key:"styles",value(){return[o.W,(0,r.iv)(s||(s=h`:host{--mdc-theme-secondary:var(--switch-checked-color)}.mdc-switch.mdc-switch--checked .mdc-switch__thumb{background-color:var(--switch-checked-button-color);border-color:var(--switch-checked-button-color)}.mdc-switch.mdc-switch--checked .mdc-switch__track{background-color:var(--switch-checked-track-color);border-color:var(--switch-checked-track-color)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb{background-color:var(--switch-unchecked-button-color);border-color:var(--switch-unchecked-button-color)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__track{background-color:var(--switch-unchecked-track-color);border-color:var(--switch-unchecked-track-color)}`))]}}]}}),a.H)},13560:function(e,t,i){i.d(t,{j:()=>d});var c=i(36522);const d=e=>{(0,c.B)(window,"haptic",e)}}}]); //# sourceMappingURL=29579.c1900bd9190a4187.js.map