diff --git a/www/mushroom.js b/www/mushroom.js index 7f3013e..4803f74 100644 --- a/www/mushroom.js +++ b/www/mushroom.js @@ -3325,12 +3325,15 @@ const la="important",ca=" !"+la,da=He(class extends Ye{constructor(t){var e;if(s align-items: center; justify-content: center; gap: 8px; - height: 36px; - min-width: 36px; + height: var(--ha-badge-size, 36px); + min-width: var(--ha-badge-size, 36px); padding: 0px 8px; box-sizing: border-box; width: auto; - border-radius: 18px; + border-radius: var( + --ha-badge-border-radius, + calc(var(--ha-badge-size, 36px) / 2) + ); background-color: var(--card-background-color, white); border-width: var(--ha-card-border-width, 1px); box-shadow: var(--ha-card-box-shadow, none); @@ -3412,7 +3415,7 @@ const la="important",ca=" !"+la,da=He(class extends Ye{constructor(t){var e;if(s padding-inline-start: 4px; } ${nl} - `}};n([_t({attribute:!1})],Nd.prototype,"hass",void 0),n([vt()],Nd.prototype,"_config",void 0),n([vt()],Nd.prototype,"_templateResults",void 0),n([vt()],Nd.prototype,"_unsubRenderTemplates",void 0),Nd=n([pt(Dd)],Nd),console.info("%c🍄 Mushroom 🍄 - 4.0.4","color: #ef5350; font-weight: 700;");const Rd=Ce({tap_action:$e(ni),hold_action:$e(ni),double_tap_action:$e(ni)}),Fd=(t,e)=>(e&&t&&(t=t.map((t=>"perform-action"===t?"call-service":t))),[{name:"tap_action",selector:{"ui-action":{actions:t}}},{name:"hold_action",selector:{"ui-action":{actions:t}}},{name:"double_tap_action",selector:{"ui-action":{actions:t}}}]),Vd=Ce({layout:$e(Se([we("horizontal"),we("vertical"),we("default")])),fill_container:$e(ye()),primary_info:$e(xe(ns)),secondary_info:$e(xe(ns)),icon_type:$e(xe(rs))}),Bd=[{type:"grid",name:"",schema:[{name:"layout",selector:{mush_layout:{}}},{name:"fill_container",selector:{boolean:{}}}]},{type:"grid",name:"",schema:[{name:"primary_info",selector:{mush_info:{}}},{name:"secondary_info",selector:{mush_info:{}}},{name:"icon_type",selector:{mush_icon_type:{}}}]}],Ud=["color","icon_color","layout","fill_container","primary_info","secondary_info","icon_type","content_info","use_entity_picture","collapsible_controls","icon_animation"],Hd=Ce({entity:$e(Ee()),name:$e(Ee()),icon:$e(Ee())}),Yd=Ce({index:$e(ke()),view_index:$e(ke()),view_layout:ve(),type:Ee(),layout_options:ve(),visibility:ve()}),Wd=fe(Yd,fe(Hd,Vd,Rd),Ce({states:$e(be()),show_keypad:(Xd=$e(ye()),Kd=(t,e)=>{console.warn(`🍄 "${e.path}" option is deprecated and no longer available. Remove it from your YAML configuration or use the built-in Home Assistant alarm panel card if you want keypad.`)},new he({...Xd,refiner:(t,e)=>void 0===t||Xd.refiner(t,e),validator:(t,e)=>void 0===t||(Kd(t,e),Xd.validator(t,e))}))}));var Xd,Kd;const Gd=["more-info","navigate","url","perform-action","assist","none"],qd=["armed_home","armed_away","armed_night","armed_vacation","armed_custom_bypass"],Zd=Tt(((t,e)=>[{name:"entity",selector:{entity:{domain:Us}}},{name:"name",selector:{text:{}}},{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...Bd,{type:"multi_select",name:"states",options:qd.map((e=>[e,t(`ui.card.alarm_control_panel.${e.replace("armed","arm")}`)]))},...Fd(Gd,e)]));let Jd=class extends Ls{constructor(){super(...arguments),this._computeLabel=t=>{const e=Mo(this.hass);return Ud.includes(t.name)?e(`editor.card.generic.${t.name}`):"states"===t.name?this.hass.localize("ui.panel.lovelace.editor.card.alarm-panel.available_states"):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),_l()}setConfig(t){me(t,Wd),this._config=t}render(){if(!this.hass||!this._config)return K;const t=!ai(this.hass.config.version,2024,8),e=Zd(this.hass.localize,t);return Y` + `}};n([_t({attribute:!1})],Nd.prototype,"hass",void 0),n([vt()],Nd.prototype,"_config",void 0),n([vt()],Nd.prototype,"_templateResults",void 0),n([vt()],Nd.prototype,"_unsubRenderTemplates",void 0),Nd=n([pt(Dd)],Nd),console.info("%c🍄 Mushroom 🍄 - 4.0.5","color: #ef5350; font-weight: 700;");const Rd=Ce({tap_action:$e(ni),hold_action:$e(ni),double_tap_action:$e(ni)}),Fd=(t,e)=>(e&&t&&(t=t.map((t=>"perform-action"===t?"call-service":t))),[{name:"tap_action",selector:{"ui-action":{actions:t}}},{name:"hold_action",selector:{"ui-action":{actions:t}}},{name:"double_tap_action",selector:{"ui-action":{actions:t}}}]),Vd=Ce({layout:$e(Se([we("horizontal"),we("vertical"),we("default")])),fill_container:$e(ye()),primary_info:$e(xe(ns)),secondary_info:$e(xe(ns)),icon_type:$e(xe(rs))}),Bd=[{type:"grid",name:"",schema:[{name:"layout",selector:{mush_layout:{}}},{name:"fill_container",selector:{boolean:{}}}]},{type:"grid",name:"",schema:[{name:"primary_info",selector:{mush_info:{}}},{name:"secondary_info",selector:{mush_info:{}}},{name:"icon_type",selector:{mush_icon_type:{}}}]}],Ud=["color","icon_color","layout","fill_container","primary_info","secondary_info","icon_type","content_info","use_entity_picture","collapsible_controls","icon_animation"],Hd=Ce({entity:$e(Ee()),name:$e(Ee()),icon:$e(Ee())}),Yd=Ce({index:$e(ke()),view_index:$e(ke()),view_layout:ve(),type:Ee(),layout_options:ve(),visibility:ve()}),Wd=fe(Yd,fe(Hd,Vd,Rd),Ce({states:$e(be()),show_keypad:(Xd=$e(ye()),Kd=(t,e)=>{console.warn(`🍄 "${e.path}" option is deprecated and no longer available. Remove it from your YAML configuration or use the built-in Home Assistant alarm panel card if you want keypad.`)},new he({...Xd,refiner:(t,e)=>void 0===t||Xd.refiner(t,e),validator:(t,e)=>void 0===t||(Kd(t,e),Xd.validator(t,e))}))}));var Xd,Kd;const Gd=["more-info","navigate","url","perform-action","assist","none"],qd=["armed_home","armed_away","armed_night","armed_vacation","armed_custom_bypass"],Zd=Tt(((t,e)=>[{name:"entity",selector:{entity:{domain:Us}}},{name:"name",selector:{text:{}}},{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...Bd,{type:"multi_select",name:"states",options:qd.map((e=>[e,t(`ui.card.alarm_control_panel.${e.replace("armed","arm")}`)]))},...Fd(Gd,e)]));let Jd=class extends Ls{constructor(){super(...arguments),this._computeLabel=t=>{const e=Mo(this.hass);return Ud.includes(t.name)?e(`editor.card.generic.${t.name}`):"states"===t.name?this.hass.localize("ui.panel.lovelace.editor.card.alarm-panel.available_states"):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),_l()}setConfig(t){me(t,Wd),this._config=t}render(){if(!this.hass||!this._config)return K;const t=!ai(this.hass.config.version,2024,8),e=Zd(this.hass.localize,t);return Y`