homeassistant/custom_components/hacs/hacs_frontend_experimental/frontend_latest/339.dbk8wpd18aA.js

3 lines
18 KiB
JavaScript
Raw Normal View History

2025-01-10 21:08:35 -08:00
/*! For license information please see 339.dbk8wpd18aA.js.LICENSE.txt */
export const id=339;export const ids=[339];export const modules={48950:(e,t,i)=>{var r=i(309),o=i(8485),a=i(92038),n=i(5095),c=i(95260),d=i(18394);(0,r.Z)([(0,c.Mo)("ha-formfield")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{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,d.B)(e,"change");break;case"HA-RADIO":e.checked=!0,(0,d.B)(e,"change");break;default:e.click()}}},{kind:"field",static:!0,key:"styles",value:()=>[a.W,n.iv`:host(:not([alignEnd])) ::slotted(ha-switch){margin-right:10px;margin-inline-end:10px;margin-inline-start:inline}.mdc-form-field>label{direction:var(--direction);margin-inline-start:0;margin-inline-end:auto;padding-inline-start:4px;padding-inline-end:0}`]}]}}),o.a)},7265:(e,t,i)=>{var r=i(309),o=i(5095),a=i(95260);(0,r.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 o.dy`<slot></slot>`}},{kind:"field",static:!0,key:"styles",value:()=>o.iv`: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}`}]}}),o.oi)},10339:(e,t,i)=>{i.r(t),i.d(t,{HaBooleanSelector:()=>c});var r=i(309),o=i(5095),a=i(95260),n=i(18394);i(48950),i(8942),i(7265);let c=(0,r.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:()=>!1},{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:()=>!1},{kind:"method",key:"render",value:function(){return o.dy` <ha-formfield alignEnd spaceBetween .label="${this.label}"> <ha-switch .checked="${this.value}" @change="${this._handleChange}" .disabled="${this.disabled}"></ha-switch> </ha-formfield> ${this.helper?o.dy`<ha-input-helper-text>${this.helper}</ha-input-helper-text>`:""} `}},{kind:"method",key:"_handleChange",value:function(e){const t=e.target.checked;this.value!==t&&(0,n.B)(this,"value-changed",{value:t})}},{kind:"get",static:!0,key:"styles",value:function(){return o.iv`ha-formfield{display:flex;height:56px;align-items:center;--mdc-typography-body2-font-size:1em}`}}]}}),o.oi)},8942:(e,t,i)=>{var r=i(309),o=i(34541),a=i(47838),n=i(43204),c=(i(27763),i(38103)),d=i(78220),s=i(14114),l=i(98734),h=i(72774),p={CHECKED:"mdc-switch--checked",DISABLED:"mdc-switch--disabled"},m={ARIA_CHECKED_ATTR:"aria-checked",NATIVE_CONTROL_SELECTOR:".mdc-switch__native-control",RIPPLE_SURFACE_SELECTOR:".mdc-switch__thumb-underlay"};const u=function(e){function t(i){return e.call(this,(0,n.__assign)((0,n.__assign)({},t.defaultAdapter),i))||this}return(0,n.__extends)(t,e),Object.defineProperty(t,"strings",{get:function(){return m},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return p},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNativeControlChecked:function(){},setNativeControlDisabled:function(){},setNativeControlAttr:function(){}}},enumerable:!1,configurable:!0}),t.prototype.setChecked=function(e){this.adapter.setNativeControlChecked(e),this.updateAriaChecked(e),this.updateCheckedStyling(e)},t.prototype.setDisabled=function(e){this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(p.DISABLED):this.adapter.removeClass(p.DISABLED)},t.prototype.handleChange=function(e){var t=e.target;this.updateAriaChecked(t.checked),this.updateCheckedStyling(t.checked)},t.prototype.updateCheckedStyling=function(e){e?this.adapter.addClass(p.CHECKED):this.adapter.removeClass(p.CHECKED)},t.prototype.updateAriaChecked=function(e){this.adapter.setNativeControlAttr(m.ARIA_CHECKED_ATTR
//# sourceMappingURL=339.dbk8wpd18aA.js.map