iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
17 lines • 11.5 kB
JavaScript
/*! For license information please see 74452.9ddce74fac6874f4.js.LICENSE.txt */
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[74452],{11245:function(t,e,i){i.d(e,{R:function(){return l}});let s;const l=(0,i(5124).AH)(s||(s=(t=>t)`:host{background:var(--md-list-container-color,var(--md-sys-color-surface,#fef7ff));color:unset;display:flex;flex-direction:column;outline:0;padding:8px 0;position:relative}`))},49838:function(t,e,i){i.d(e,{B:function(){return m}});i(93775),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953);var s=i(40445),l=i(5124),o=i(67576),a=i(25423);let r,n=t=>t;const d=new Set(Object.values(a.U));class m extends l.WF{get items(){return this.listController.items}render(){return(0,l.qy)(r||(r=n` <slot -items="${0}" -activation="${0}" ="${0}"> </slot> `),this.listController.onDeactivateItems,this.listController.onRequestActivation,this.listController.onSlotchange)}activateNextItem(){return this.listController.activateNextItem()}activatePreviousItem(){return this.listController.activatePreviousItem()}constructor(){super(),this.listController=new a.Z({isItem:t=>t.hasAttribute("md-list-item"),getPossibleItems:()=>this.slotItems,isRtl:()=>"rtl"===getComputedStyle(this).direction,deactivateItem:t=>{t.tabIndex=-1},activateItem:t=>{t.tabIndex=0},isNavigableKey:t=>d.has(t),isActivatable:t=>!t.disabled&&"text"!==t.type}),this.internals=this.attachInternals(),l.S$||(this.internals.role="list",this.addEventListener("keydown",this.listController.handleKeydown))}}(0,s.Cg)([(0,o.KN)({flatten:!0})],m.prototype,"slotItems",void 0)},82553:function(t,e,i){i.d(e,{R:function(){return l}});let s;const l=(0,i(5124).AH)(s||(s=(t=>t)`:host{display:flex;-webkit-tap-highlight-color:transparent;--md-ripple-hover-color:var(--md-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity:var(--md-list-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color:var(--md-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity:var(--md-list-item-pressed-state-layer-opacity, 0.12)}:host(:is([type=button]:not([disabled]),[type=link])){cursor:pointer}md-focus-ring{z-index:1;--md-focus-ring-shape:8px}a,button,li{background:0 0;border:none;cursor:inherit;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:0;-webkit-tap-highlight-color:transparent;width:100%}.list-item.interactive{cursor:pointer}.list-item.disabled{opacity:var(--md-list-item-disabled-opacity, .3);pointer-events:none}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;height:100%;color:var(--md-list-item-label-text-color,var(--md-sys-color-on-surface,#1d1b20));font-family:var(--md-list-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-list-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-list-item-label-text-weight,var(--md-sys-typescale-body-large-weight,var(--md-ref-typeface-weight-regular,400)));min-height:var(--md-list-item-one-line-container-height,56px);padding-top:var(--md-list-item-top-space,12px);padding-bottom:var(--md-list-item-bottom-space,12px);padding-inline-start:var(--md-list-item-leading-space,16px);padding-inline-end:var(--md-list-item-trailing-space,16px)}md-item[multiline]{min-height:var(--md-list-item-two-line-container-height,72px)}[slot=supporting-text]{color:var(--md-list-item-supporting-text-color,var(--md-sys-color-on-surface-variant,#49454f));font-family:var(--md-list-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, .875rem));line-height:var(--md-list-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-list-item-supporting-text-weight,var(--md-sys-typescale-body-medium-weight,var(--md-ref-typeface-weight-regular,400)))}[slot=trailing-supporting-text]{color:var(--md-list-item-trailing-supporting-text-color,var(--md-sys-color-on-surface-variant,#49454f));font-family:var(--md-list-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, .6875rem));line-height:var(--md-list-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-list-item-trailing-supporting-text-weight,var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-list-item-leading-icon-color,var(--md-sys-color-on-surface-variant,#49454f))}[slot=end]{color:var(--md-list-item-trailing-icon-color,var(--md-sys-color-on-surface-variant,#49454f))}{.disabled slot{color:GrayText}.list-item.disabled{color:GrayText;opacity:1}}`))},58168:function(t,e,i){i.d(e,{n:function(){return z}});i(62953);var s=i(40445),l=(i(75275),i(67576)),o=(i(27495),i(5124));let a,r=t=>t;class n extends o.WF{render(){return(0,o.qy)(a||(a=r` <slot name="container"></slot> <slot class="non-text" name="start"></slot> <div class="text"> <slot name="overline" ="${0}"></slot> <slot class="default-slot" ="${0}"></slot> <slot name="headline" ="${0}"></slot> <slot name="supporting-text" ="${0}"></slot> </div> <slot class="non-text" name="trailing-supporting-text"></slot> <slot class="non-text" name="end"></slot> `),this.handleTextSlotChange,this.handleTextSlotChange,this.handleTextSlotChange,this.handleTextSlotChange)}handleTextSlotChange(){let t=!1,e=0;for(const i of this.textSlots)if(d(i)&&(e+=1),e>1){t=!0;break}this.multiline=t}constructor(){super(...arguments),this.multiline=!1}}function d(t){for(const i of t.assignedNodes({flatten:!0})){var e;const t=i.nodeType===Node.ELEMENT_NODE,s=i.nodeType===Node.TEXT_NODE&&(null===(e=i.textContent)||void 0===e?void 0:e.match(/\S/));if(t||s)return!0}return!1}(0,s.Cg)([(0,l.MZ)({type:Boolean,reflect:!0})],n.prototype,"multiline",void 0),(0,s.Cg)([(0,l.YG)(".text slot")],n.prototype,"textSlots",void 0);let m;const p=(0,o.AH)(m||(m=(t=>t)`:host{color:var(--md-sys-color-on-surface,#1d1b20);font-family:var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-large-size, 1rem);font-weight:var(--md-sys-typescale-body-large-weight,var(--md-ref-typeface-weight-regular,400));line-height:var(--md-sys-typescale-body-large-line-height, 1.5rem);align-items:center;box-sizing:border-box;display:flex;gap:16px;min-height:56px;overflow:hidden;padding:12px 16px;position:relative;text-overflow:ellipsis}:host([multiline]){min-height:72px}[name=overline]{color:var(--md-sys-color-on-surface-variant,#49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, .6875rem);font-weight:var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=supporting-text]{color:var(--md-sys-color-on-surface-variant,#49454f);font-family:var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-medium-size, .875rem);font-weight:var(--md-sys-typescale-body-medium-weight,var(--md-ref-typeface-weight-regular,400));line-height:var(--md-sys-typescale-body-medium-line-height, 1.25rem)}[name=trailing-supporting-text]{color:var(--md-sys-color-on-surface-variant,#49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, .6875rem);font-weight:var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=container]::slotted(*){inset:0;position:absolute}.default-slot{display:inline}.default-slot,.text ::slotted(*){overflow:hidden;text-overflow:ellipsis}.text{display:flex;flex:1;flex-direction:column;overflow:hidden}`));let c=class extends n{};c.styles=[p],c=(0,s.Cg)([(0,l.EM)("md-item")],c);i(71970);var h=i(6412),y=i(7872),g=i(1024),f=i(27525);let v,u,b,x,w,C,$,R,I=t=>t;const k=(0,g.n)(o.WF);class z extends k{get isDisabled(){return this.disabled&&"link"!==this.type}willUpdate(t){this.href&&(this.type="link"),super.willUpdate(t)}render(){return this.renderListItem((0,o.qy)(v||(v=I` <md-item> <div slot="container"> ${0} ${0} </div> <slot name="start" slot="start"></slot> <slot name="end" slot="end"></slot> ${0} </md-item> `),this.renderRipple(),this.renderFocusRing(),this.renderBody()))}renderListItem(t){const e="link"===this.type;let i;switch(this.type){case"link":i=(0,y.eu)(u||(u=I`a`));break;case"button":i=(0,y.eu)(b||(b=I`button`));break;default:i=(0,y.eu)(x||(x=I`li`))}const s="text"!==this.type,l=e&&this.target?this.target:o.s6;return(0,y.qy)(w||(w=I`
<${0}
id="item"
tabindex="${0}"
?disabled=${0}
role="listitem"
aria-selected=${0}
aria-checked=${0}
aria-expanded=${0}
aria-haspopup=${0}
class="list-item ${0}"
href=${0}
target=${0}
=${0}
>${0}</${0}>
`),i,this.isDisabled||!s?-1:0,this.isDisabled,this.ariaSelected||o.s6,this.ariaChecked||o.s6,this.ariaExpanded||o.s6,this.ariaHasPopup||o.s6,(0,h.H)(this.getRenderClasses()),this.href||o.s6,l,this.onFocus,t,i)}renderRipple(){return"text"===this.type?o.s6:(0,o.qy)(C||(C=I` <md-ripple part="ripple" for="item" ?disabled="${0}"></md-ripple>`),this.isDisabled)}renderFocusRing(){return"text"===this.type?o.s6:(0,o.qy)($||($=I` <md-focus-ring -changed="${0}" part="focus-ring" for="item" inward></md-focus-ring>`),this.onFocusRingVisibilityChanged)}onFocusRingVisibilityChanged(t){}getRenderClasses(){return{disabled:this.isDisabled}}renderBody(){return(0,o.qy)(R||(R=I` <slot></slot> <slot name="overline" slot="overline"></slot> <slot name="headline" slot="headline"></slot> <slot name="supporting-text" slot="supporting-text"></slot> <slot name="trailing-supporting-text" slot="trailing-supporting-text"></slot> `))}onFocus(){-1===this.tabIndex&&this.dispatchEvent((0,f.cG)())}focus(){var t;null===(t=this.listItemRoot)||void 0===t||t.focus()}click(){this.listItemRoot?this.listItemRoot.click():super.click()}constructor(){super(...arguments),this.disabled=!1,this.type="text",this.isListItem=!0,this.href="",this.target=""}}z.shadowRootOptions=Object.assign(Object.assign({},o.WF.shadowRootOptions),{},{delegatesFocus:!0}),(0,s.Cg)([(0,l.MZ)({type:Boolean,reflect:!0})],z.prototype,"disabled",void 0),(0,s.Cg)([(0,l.MZ)({reflect:!0})],z.prototype,"type",void 0),(0,s.Cg)([(0,l.MZ)({type:Boolean,attribute:"md-list-item",reflect:!0})],z.prototype,"isListItem",void 0),(0,s.Cg)([(0,l.MZ)()],z.prototype,"href",void 0),(0,s.Cg)([(0,l.MZ)()],z.prototype,"target",void 0),(0,s.Cg)([(0,l.P)(".list-item")],z.prototype,"listItemRoot",void 0)}}]);