homeassistant/custom_components/hacs/hacs_frontend_experimental/frontend_latest/9433.l0i1U7T7n30.js

3 lines
43 KiB
JavaScript
Raw Permalink Normal View History

2025-01-10 21:08:35 -08:00
/*! For license information please see 9433.l0i1U7T7n30.js.LICENSE.txt */
export const id=9433;export const ids=[9433];export const modules={8485:(e,r,t)=>{t.d(r,{a:()=>m});var i=t(43204),o=t(72774),a={ROOT:"mdc-form-field"},d={LABEL_SELECTOR:".mdc-form-field > label"};const n=function(e){function r(t){var o=e.call(this,(0,i.__assign)((0,i.__assign)({},r.defaultAdapter),t))||this;return o.click=function(){o.handleClick()},o}return(0,i.__extends)(r,e),Object.defineProperty(r,"cssClasses",{get:function(){return a},enumerable:!1,configurable:!0}),Object.defineProperty(r,"strings",{get:function(){return d},enumerable:!1,configurable:!0}),Object.defineProperty(r,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),r.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},r.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},r.prototype.handleClick=function(){var e=this;this.adapter.activateInputRipple(),requestAnimationFrame((function(){e.adapter.deactivateInputRipple()}))},r}(o.K);var c=t(78220),l=t(18601),s=t(14114),p=t(5095),h=t(95260),u=t(53180);class m extends c.H{constructor(){super(...arguments),this.alignEnd=!1,this.spaceBetween=!1,this.nowrap=!1,this.label="",this.mdcFoundationClass=n}createAdapter(){return{registerInteractionHandler:(e,r)=>{this.labelEl.addEventListener(e,r)},deregisterInteractionHandler:(e,r)=>{this.labelEl.removeEventListener(e,r)},activateInputRipple:async()=>{const e=this.input;if(e instanceof l.Wg){const r=await e.ripple;r&&r.startPress()}},deactivateInputRipple:async()=>{const e=this.input;if(e instanceof l.Wg){const r=await e.ripple;r&&r.endPress()}}}}get input(){var e,r;return null!==(r=null===(e=this.slottedInputs)||void 0===e?void 0:e[0])&&void 0!==r?r:null}render(){const e={"mdc-form-field--align-end":this.alignEnd,"mdc-form-field--space-between":this.spaceBetween,"mdc-form-field--nowrap":this.nowrap};return p.dy` <div class="mdc-form-field ${(0,u.$)(e)}"> <slot></slot> <label class="mdc-label" @click="${this._labelClick}">${this.label}</label> </div>`}click(){this._labelClick()}_labelClick(){const e=this.input;e&&(e.focus(),e.click())}}(0,i.__decorate)([(0,h.Cb)({type:Boolean})],m.prototype,"alignEnd",void 0),(0,i.__decorate)([(0,h.Cb)({type:Boolean})],m.prototype,"spaceBetween",void 0),(0,i.__decorate)([(0,h.Cb)({type:Boolean})],m.prototype,"nowrap",void 0),(0,i.__decorate)([(0,h.Cb)({type:String}),(0,s.P)((async function(e){var r;null===(r=this.input)||void 0===r||r.setAttribute("aria-label",e)}))],m.prototype,"label",void 0),(0,i.__decorate)([(0,h.IO)(".mdc-form-field")],m.prototype,"mdcRoot",void 0),(0,i.__decorate)([(0,h.vZ)("",!0,"*")],m.prototype,"slottedInputs",void 0),(0,i.__decorate)([(0,h.IO)("label")],m.prototype,"labelEl",void 0)},92038:(e,r,t)=>{t.d(r,{W:()=>i});const i=t(5095).iv`.mdc-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}.mdc-form-field>label[dir=rtl],[dir=rtl] .mdc-form-field>label{margin-left:auto;margin-right:0}.mdc-form-field>label[dir=rtl],[dir=rtl] .mdc-form-field>label{padding-left:0
//# sourceMappingURL=9433.l0i1U7T7n30.js.map