homeassistant/custom_components/hacs/hacs_frontend_experimental/frontend_latest/9877.1XynvE3fe5o.js
2025-01-10 21:08:35 -08:00

2 lines
No EOL
5.5 KiB
JavaScript

export const id=9877;export const ids=[9877];export const modules={86089:(e,t,i)=>{i.d(t,{U:()=>a});const a=e=>e.stopPropagation()},71133:(e,t,i)=>{var a=i(309),l=i(34541),d=i(47838),n=i(49412),s=i(3762),o=i(5095),c=i(95260),r=i(72218),u=i(2537);i(54371);(0,a.Z)([(0,c.Mo)("ha-select")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,c.Cb)({type:Boolean})],key:"icon",value:()=>!1},{kind:"field",decorators:[(0,c.Cb)({type:Boolean,reflect:!0})],key:"clearable",value:()=>!1},{kind:"method",key:"render",value:function(){return o.dy` ${(0,l.Z)((0,d.Z)(i.prototype),"render",this).call(this)} ${this.clearable&&!this.required&&!this.disabled&&this.value?o.dy`<ha-icon-button label="clear" @click="${this._clearValue}" .path="${"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}"></ha-icon-button>`:o.Ld} `}},{kind:"method",key:"renderLeadingIcon",value:function(){return this.icon?o.dy`<span class="mdc-select__icon"><slot name="icon"></slot></span>`:o.Ld}},{kind:"method",key:"connectedCallback",value:function(){(0,l.Z)((0,d.Z)(i.prototype),"connectedCallback",this).call(this),window.addEventListener("translations-updated",this._translationsUpdated)}},{kind:"method",key:"disconnectedCallback",value:function(){(0,l.Z)((0,d.Z)(i.prototype),"disconnectedCallback",this).call(this),window.removeEventListener("translations-updated",this._translationsUpdated)}},{kind:"method",key:"_clearValue",value:function(){!this.disabled&&this.value&&(this.valueSetDirectly=!0,this.select(-1),this.mdcFoundation.handleChange())}},{kind:"field",key:"_translationsUpdated",value(){return(0,r.D)((async()=>{await(0,u.y)(),this.layoutOptions()}),500)}},{kind:"field",static:!0,key:"styles",value:()=>[s.W,o.iv`:host([clearable]){position:relative}.mdc-select:not(.mdc-select--disabled) .mdc-select__icon{color:var(--secondary-text-color)}.mdc-select__anchor{width:var(--ha-select-min-width,200px)}.mdc-select--filled .mdc-select__anchor{height:var(--ha-select-height,56px)}.mdc-select--filled .mdc-floating-label{inset-inline-start:12px;inset-inline-end:initial;direction:var(--direction)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{inset-inline-start:48px;inset-inline-end:initial;direction:var(--direction)}.mdc-select .mdc-select__anchor{padding-inline-start:12px;padding-inline-end:0px;direction:var(--direction)}.mdc-select__anchor .mdc-floating-label--float-above{transform-origin:var(--float-start)}.mdc-select__selected-text-container{padding-inline-end:var(--select-selected-text-padding-end,0px)}:host([clearable]) .mdc-select__selected-text-container{padding-inline-end:var(--select-selected-text-padding-end,12px)}ha-icon-button{position:absolute;top:10px;right:28px;--mdc-icon-button-size:36px;--mdc-icon-size:20px;color:var(--secondary-text-color);inset-inline-start:initial;inset-inline-end:28px;direction:var(--direction)}`]}]}}),n.K)},49877:(e,t,i)=>{i.r(t),i.d(t,{HaThemeSelector:()=>o});var a=i(309),l=i(5095),d=i(95260),n=(i(44577),i(18394)),s=i(86089);i(71133);(0,a.Z)([(0,d.Mo)("ha-theme-picker")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,d.Cb)()],key:"value",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"includeDefault",value:()=>!1},{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"required",value:()=>!1},{kind:"method",key:"render",value:function(){return l.dy` <ha-select .label="${this.label||this.hass.localize("ui.components.theme-picker.theme")}" .value="${this.value}" .required="${this.required}" .disabled="${this.disabled}" @selected="${this._changed}" @closed="${s.U}" fixedMenuPosition naturalMenuWidth> ${this.required?l.Ld:l.dy` <mwc-list-item value="remove"> ${this.hass.localize("ui.components.theme-picker.no_theme")} </mwc-list-item> `} ${this.includeDefault?l.dy` <mwc-list-item .value="${"default"}"> Home Assistant </mwc-list-item> `:l.Ld} ${Object.keys(this.hass.themes.themes).sort().map((e=>l.dy`<mwc-list-item .value="${e}">${e}</mwc-list-item>`))} </ha-select> `}},{kind:"get",static:!0,key:"styles",value:function(){return l.iv`ha-select{width:100%}`}},{kind:"method",key:"_changed",value:function(e){this.hass&&""!==e.target.value&&(this.value="remove"===e.target.value?void 0:e.target.value,(0,n.B)(this,"value-changed",{value:this.value}))}}]}}),l.oi);let o=(0,a.Z)([(0,d.Mo)("ha-selector-theme")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"selector",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"value",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"required",value:()=>!0},{kind:"method",key:"render",value:function(){var e;return l.dy` <ha-theme-picker .hass="${this.hass}" .value="${this.value}" .label="${this.label}" .includeDefault="${null===(e=this.selector.theme)||void 0===e?void 0:e.include_default}" .disabled="${this.disabled}" .required="${this.required}"></ha-theme-picker> `}}]}}),l.oi)}};
//# sourceMappingURL=9877.1XynvE3fe5o.js.map