usda-hass-config/custom_components/hacs/hacs_frontend_experimental/c.fbdfc079.js

34 lines
18 KiB
JavaScript
Raw Permalink Normal View History

2024-10-01 14:06:39 +00:00
import{f as e,h as t,e as a,t as o,ac as i,j as d,R as r,y as n,k as p,d as c,_ as s,E as l,G as m,n as x}from"./main-85e087f9.js";class b extends d{constructor(){super(...arguments),this.mini=!1,this.exited=!1,this.disabled=!1,this.extended=!1,this.showIconAtEnd=!1,this.reducedTouchTarget=!1,this.icon="",this.label="",this.shouldRenderRipple=!1,this.useStateLayerCustomProperties=!1,this.rippleHandlers=new r((()=>(this.shouldRenderRipple=!0,this.ripple)))}render(){const e=this.mini&&!this.reducedTouchTarget,t={"mdc-fab--mini":this.mini,"mdc-fab--touch":e,"mdc-fab--exited":this.exited,"mdc-fab--extended":this.extended,"icon-end":this.showIconAtEnd},a=this.label?this.label:this.icon;return n`<button
class="mdc-fab ${p(t)}"
?disabled="${this.disabled}"
aria-label="${a}"
@mouseenter=${this.handleRippleMouseEnter}
@mouseleave=${this.handleRippleMouseLeave}
@focus=${this.handleRippleFocus}
@blur=${this.handleRippleBlur}
@mousedown=${this.handleRippleActivate}
@touchstart=${this.handleRippleStartPress}
@touchend=${this.handleRippleDeactivate}
@touchcancel=${this.handleRippleDeactivate}><!--
-->${this.renderBeforeRipple()}<!--
-->${this.renderRipple()}<!--
-->${this.showIconAtEnd?this.renderLabel():""}<!--
--><span class="material-icons mdc-fab__icon"><!--
--><slot name="icon">${this.icon}</slot><!--
--></span><!--
-->${this.showIconAtEnd?"":this.renderLabel()}<!--
-->${this.renderTouchTarget()}<!--
--></button>`}renderIcon(){return n``}renderTouchTarget(){const e=this.mini&&!this.reducedTouchTarget;return n`${e?n`<div class="mdc-fab__touch"></div>`:""}`}renderLabel(){const e=""!==this.label&&this.extended;return n`${e?n`<span class="mdc-fab__label">${this.label}</span>`:""}`}renderBeforeRipple(){return n``}renderRipple(){return this.shouldRenderRipple?n`<mwc-ripple class="ripple"
.internalUseStateLayerCustomProperties="${this.useStateLayerCustomProperties}"
></mwc-ripple>`:""}handleRippleActivate(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.handleRippleStartPress(e)}handleRippleStartPress(e){this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}}b.shadowRootOptions={mode:"open",delegatesFocus:!0},e([t("mwc-ripple")],b.prototype,"ripple",void 0),e([a({type:Boolean})],b.prototype,"mini",void 0),e([a({type:Boolean})],b.prototype,"exited",void 0),e([a({type:Boolean})],b.prototype,"disabled",void 0),e([a({type:Boolean})],b.prototype,"extended",void 0),e([a({type:Boolean})],b.prototype,"showIconAtEnd",void 0),e([a({type:Boolean})],b.prototype,"reducedTouchTarget",void 0),e([a()],b.prototype,"icon",void 0),e([a()],b.prototype,"label",void 0),e([o()],b.prototype,"shouldRenderRipple",void 0),e([o()],b.prototype,"useStateLayerCustomProperties",void 0),e([i({passive:!0})],b.prototype,"handleRippleStartPress",null);const f=c`:host .mdc-fab .material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{outline:none;--mdc-ripple-color: currentcolor;user-select:none;-webkit-tap-highlight-color:transparent;display:inline-flex;-webkit-tap-highlight-color:transparent;display:inline-flex;outline:none;user-select:none}:host .mdc-touch-target-wrapper{display:inline}:host .mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}:host .mdc-fab{position:relative;display:inline-flex;position:relative;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;user-select:none;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1)}:host .mdc-fab .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}:host .mdc-fab::-moz-focus-inner{padding:0;border:0}:host .mdc-fab:hover{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}:host .mdc-fab.mdc-ripple-upgraded--background-focused,:host .mdc-fab:not(.mdc-ripple-upgraded):focus{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}:host .mdc-fab:active,:host .mdc-fab:focus:active{box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2),0px 12px 17px 2px rgba(0, 0, 0, 0.14),0px 5px 22px 4px rgba(0,0,0,.12)}:host .mdc-fab:active,:host .mdc-fab:focus{outline:none}:host .mdc-fab:hover{cursor:pointer}:host .mdc-fab>svg{width:100%}:host .mdc-fab--mini{width:40px;height:40px}:host .mdc-fab--extended{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, n
:host .mdc-fab--extended .mdc-fab__icon {
margin-inline-start: -8px;
margin-inline-end: 12px;
direction: var(--direction);
}
`,"rtl"===document.dir?c`
:host .mdc-fab--extended .mdc-fab__icon {
direction: rtl;
}
`:c``]}]}}),b);