@vandeurenglenn/lite-elements 0.3.32 → 0.3.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/exports/bundle/button.js +1 -1
- package/exports/bundle/drawer-layout.js +1 -1
- package/exports/bundle/upload-image.js +99 -461
- package/exports/button.js +1 -1
- package/exports/drawer-layout.js +1 -1
- package/package.json +1 -73
- package/exports/dialog/dialog.d.ts +0 -15
- package/exports/elevation/elevation.d.ts +0 -11
- package/exports/icon/icon.d.ts +0 -12
- package/exports/mixins/select-mixin.d.ts +0 -32
- package/exports/mixins/selector-mixin.d.ts +0 -8
- package/exports/pages/pages.d.ts +0 -14
- package/exports/selector/selector.d.ts +0 -5
- package/exports/tabs/tab.d.ts +0 -4
- package/exports/tabs/tabs.d.ts +0 -5
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import{b as e,
|
|
1
|
+
import{b as e,_ as t,a as r,e as o}from"./custom-element-BOdKJYdz.js";import{t as a,j as n,v as l,D as s}from"./property-Do5-bKhz.js";import{t as d}from"./query-D-PG8Oyh.js";import{n as c,s as u,x as p,i as h,t as v,w as m,T as f,j as b}from"./property-DyuvULjI.js";import{DeviceApi as g}from"./device.js";import"@vandeurenglenn/lite-elements/dialog.js";import"@vandeurenglenn/lite-elements/icon.js";import"@vandeurenglenn/lite-elements/tabs.js";import"@vandeurenglenn/lite-elements/tab.js";import"@vandeurenglenn/lite-elements/selector.js";import"@vandeurenglenn/lite-elements/pages.js";import{FileReaderMixin as x}from"./file-reader-mixin.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/function
|
|
6
|
+
*/function y(e){return c({...e,state:!0,attribute:!1})}
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/const
|
|
11
|
+
*/const _=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r)
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
14
14
|
* Copyright 2017 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
-
*/;function
|
|
16
|
+
*/;function w(e,t){return(r,o,a)=>{const n=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof o?r:a??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return _(r,o,{get(){let r=e.call(this);return void 0===r&&(r=n(this),(null!==r||this.hasUpdated)&&t.call(this,r)),r}})}return _(r,o,{get(){return n(this)}})}}
|
|
17
17
|
/**
|
|
18
18
|
* @license
|
|
19
19
|
* Copyright 2021 Google LLC
|
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/function
|
|
21
|
+
*/function C(e){return(t,r)=>{const{slot:o,selector:a}=e??{},n="slot"+(o?`[name=${o}]`:":not([name])");return _(t,r,{get(){const t=this.renderRoot?.querySelector(n),r=t?.assignedElements(e)??[];return void 0===a?r:r.filter((e=>e.matches(a)))}})}}
|
|
22
22
|
/**
|
|
23
23
|
* @license
|
|
24
24
|
* Copyright 2022 Google LLC
|
|
25
25
|
* SPDX-License-Identifier: Apache-2.0
|
|
26
|
-
*/class Elevation extends u{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){return
|
|
26
|
+
*/class Elevation extends u{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){return p`<span class="shadow"></span>`}}
|
|
27
27
|
/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2022 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: Apache-2.0
|
|
31
|
-
*/const
|
|
31
|
+
*/const T=h`:host{display:flex;pointer-events:none}:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity;--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15}/*# sourceMappingURL=elevation-styles.css.map */
|
|
32
32
|
`
|
|
33
33
|
/**
|
|
34
34
|
* @license
|
|
35
35
|
* Copyright 2022 Google LLC
|
|
36
36
|
* SPDX-License-Identifier: Apache-2.0
|
|
37
|
-
*/;let
|
|
37
|
+
*/;let $=class MdElevation extends Elevation{};$.styles=[T],$=e([v("md-elevation")],$);
|
|
38
38
|
/**
|
|
39
39
|
* @license
|
|
40
40
|
* Copyright 2023 Google LLC
|
|
41
41
|
* SPDX-License-Identifier: Apache-2.0
|
|
42
42
|
*/
|
|
43
|
-
const
|
|
43
|
+
const A=Symbol("attachableController");let E;E=new MutationObserver((e=>{for(const t of e)t.target[A]?.hostConnected()}));class AttachableController{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(e){null===e?this.host.removeAttribute("for"):this.host.setAttribute("for",e)}get control(){return this.host.hasAttribute("for")?this.htmlFor&&this.host.isConnected?this.host.getRootNode().querySelector(`#${this.htmlFor}`):null:this.currentControl||this.host.parentElement}set control(e){e?this.attach(e):this.detach()}constructor(e,t){this.host=e,this.onControlChange=t,this.currentControl=null,e.addController(this),e[A]=this,E?.observe(e,{attributeFilter:["for"]})}attach(e){e!==this.currentControl&&(this.setCurrentControl(e),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(e){this.onControlChange(this.currentControl,e),this.currentControl=e}}
|
|
44
44
|
/**
|
|
45
45
|
* @license
|
|
46
46
|
* Copyright 2021 Google LLC
|
|
47
47
|
* SPDX-License-Identifier: Apache-2.0
|
|
48
|
-
*/const
|
|
48
|
+
*/const k=["focusin","focusout","pointerdown"];class FocusRing extends u{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new AttachableController(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(e){if(!e[z]){switch(e.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}e[z]=!0}}onControlChange(e,t){for(const r of k)e?.removeEventListener(r,this),t?.addEventListener(r,this)}update(e){e.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(e)}}e([c({type:Boolean,reflect:!0})],FocusRing.prototype,"visible",void 0),e([c({type:Boolean,reflect:!0})],FocusRing.prototype,"inward",void 0);const z=Symbol("handledByFocusRing"),F=h`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}/*# sourceMappingURL=focus-ring-styles.css.map */
|
|
49
49
|
`
|
|
50
50
|
/**
|
|
51
51
|
* @license
|
|
@@ -56,142 +56,142 @@ const $=Symbol("attachableController");let A;A=new MutationObserver((e=>{for(con
|
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright 2022 Google LLC
|
|
58
58
|
* SPDX-License-Identifier: Apache-2.0
|
|
59
|
-
*/let
|
|
59
|
+
*/let I=class MdFocusRing extends FocusRing{};I.styles=[F],I=e([v("md-focus-ring")],I);
|
|
60
60
|
/**
|
|
61
61
|
* @license
|
|
62
62
|
* Copyright 2017 Google LLC
|
|
63
63
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
64
64
|
*/
|
|
65
|
-
const
|
|
65
|
+
const L=1,S=3,R=4,O=e=>(...t)=>({_$litDirective$:e,values:t});let P=class i{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};
|
|
66
66
|
/**
|
|
67
67
|
* @license
|
|
68
68
|
* Copyright 2018 Google LLC
|
|
69
69
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
70
|
-
*/const
|
|
70
|
+
*/const B=O(class extends P{constructor(e){if(super(e),e.type!==L||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const r=e.element.classList;for(const e of this.st)e in t||(r.remove(e),this.st.delete(e));for(const e in t){const o=!!t[e];o===this.st.has(e)||this.nt?.has(e)||(o?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return m}}),M="cubic-bezier(0.2, 0, 0, 1)";
|
|
71
71
|
/**
|
|
72
72
|
* @license
|
|
73
73
|
* Copyright 2021 Google LLC
|
|
74
74
|
* SPDX-License-Identifier: Apache-2.0
|
|
75
|
-
*/var D;!function(e){e[e.INACTIVE=0]="INACTIVE",e[e.TOUCH_DELAY=1]="TOUCH_DELAY",e[e.HOLDING=2]="HOLDING",e[e.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"}(D||(D={}));const V=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],q=window.matchMedia("(forced-colors: active)");class Ripple extends u{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=D.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new AttachableController(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const e={hovered:this.hovered,pressed:this.pressed};return
|
|
75
|
+
*/var D;!function(e){e[e.INACTIVE=0]="INACTIVE",e[e.TOUCH_DELAY=1]="TOUCH_DELAY",e[e.HOLDING=2]="HOLDING",e[e.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"}(D||(D={}));const V=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],q=window.matchMedia("(forced-colors: active)");class Ripple extends u{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=D.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new AttachableController(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const e={hovered:this.hovered,pressed:this.pressed};return p`<div class="surface ${B(e)}"></div>`}update(e){e.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(e)}handlePointerenter(e){this.shouldReactToEvent(e)&&(this.hovered=!0)}handlePointerleave(e){this.shouldReactToEvent(e)&&(this.hovered=!1,this.state!==D.INACTIVE&&this.endPressAnimation())}handlePointerup(e){if(this.shouldReactToEvent(e)){if(this.state!==D.HOLDING)return this.state===D.TOUCH_DELAY?(this.state=D.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=D.WAITING_FOR_CLICK}}async handlePointerdown(e){if(this.shouldReactToEvent(e)){if(this.rippleStartEvent=e,!this.isTouch(e))return this.state=D.WAITING_FOR_CLICK,void this.startPressAnimation(e);this.checkBoundsAfterContextMenu&&!this.inBounds(e)||(this.checkBoundsAfterContextMenu=!1,this.state=D.TOUCH_DELAY,await new Promise((e=>{setTimeout(e,150)})),this.state===D.TOUCH_DELAY&&(this.state=D.HOLDING,this.startPressAnimation(e)))}}handleClick(){this.disabled||(this.state!==D.WAITING_FOR_CLICK?this.state===D.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handlePointercancel(e){this.shouldReactToEvent(e)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:e,width:t}=this.getBoundingClientRect(),r=Math.max(e,t),o=Math.max(.35*r,75),a=Math.floor(.2*r),n=Math.sqrt(t**2+e**2)+10;this.initialSize=a,this.rippleScale=""+(n+o)/a,this.rippleSize=`${a}px`}getNormalizedPointerEventCoords(e){const{scrollX:t,scrollY:r}=window,{left:o,top:a}=this.getBoundingClientRect(),n=t+o,l=r+a,{pageX:s,pageY:d}=e;return{x:s-n,y:d-l}}getTranslationCoordinates(e){const{height:t,width:r}=this.getBoundingClientRect(),o={x:(r-this.initialSize)/2,y:(t-this.initialSize)/2};let a;return a=e instanceof PointerEvent?this.getNormalizedPointerEventCoords(e):{x:r/2,y:t/2},a={x:a.x-this.initialSize/2,y:a.y-this.initialSize/2},{startPoint:a,endPoint:o}}startPressAnimation(e){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:t,endPoint:r}=this.getTranslationCoordinates(e),o=`${t.x}px, ${t.y}px`,a=`${r.x}px, ${r.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${o}) scale(1)`,`translate(${a}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:M,fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=D.INACTIVE;const e=this.growAnimation;let t=1/0;"number"==typeof e?.currentTime?t=e.currentTime:e?.currentTime&&(t=e.currentTime.to("ms").value),t>=225?this.pressed=!1:(await new Promise((e=>{setTimeout(e,225-t)})),this.growAnimation===e&&(this.pressed=!1))}shouldReactToEvent(e){if(this.disabled||!e.isPrimary)return!1;if(this.rippleStartEvent&&this.rippleStartEvent.pointerId!==e.pointerId)return!1;if("pointerenter"===e.type||"pointerleave"===e.type)return!this.isTouch(e);const t=1===e.buttons;return this.isTouch(e)||t}inBounds({x:e,y:t}){const{top:r,left:o,bottom:a,right:n}=this.getBoundingClientRect();return e>=o&&e<=n&&t>=r&&t<=a}isTouch({pointerType:e}){return"touch"===e}async handleEvent(e){if(!q?.matches)switch(e.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(e);break;case"pointerdown":await this.handlePointerdown(e);break;case"pointerenter":this.handlePointerenter(e);break;case"pointerleave":this.handlePointerleave(e);break;case"pointerup":this.handlePointerup(e)}}onControlChange(e,t){for(const r of V)e?.removeEventListener(r,this),t?.addEventListener(r,this)}}e([c({type:Boolean,reflect:!0})],Ripple.prototype,"disabled",void 0),e([y()],Ripple.prototype,"hovered",void 0),e([y()],Ripple.prototype,"pressed",void 0),e([w(".surface")],Ripple.prototype,"mdRoot",void 0);
|
|
76
76
|
/**
|
|
77
77
|
* @license
|
|
78
78
|
* Copyright 2022 Google LLC
|
|
79
79
|
* SPDX-License-Identifier: Apache-2.0
|
|
80
80
|
*/
|
|
81
|
-
const
|
|
81
|
+
const N=h`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms}/*# sourceMappingURL=ripple-styles.css.map */
|
|
82
82
|
`
|
|
83
83
|
/**
|
|
84
84
|
* @license
|
|
85
85
|
* Copyright 2022 Google LLC
|
|
86
86
|
* SPDX-License-Identifier: Apache-2.0
|
|
87
|
-
*/;let U=class MdRipple extends Ripple{};U.styles=[
|
|
87
|
+
*/;let U=class MdRipple extends Ripple{};U.styles=[N],U=e([v("md-ripple")],U);
|
|
88
88
|
/**
|
|
89
89
|
* @license
|
|
90
90
|
* Copyright 2023 Google LLC
|
|
91
91
|
* SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
const
|
|
93
|
+
const j=["ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"];function G(e){return e.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}
|
|
94
94
|
/**
|
|
95
95
|
* @license
|
|
96
96
|
* Copyright 2023 Google LLC
|
|
97
97
|
* SPDX-License-Identifier: Apache-2.0
|
|
98
|
-
*/function
|
|
98
|
+
*/function H(e){for(const t of j)e.createProperty(t,{attribute:G(t),reflect:!0});e.addInitializer((e=>{const t={hostConnected(){e.setAttribute("role","presentation")}};e.addController(t)}))}
|
|
99
99
|
/**
|
|
100
100
|
* @license
|
|
101
101
|
* Copyright 2023 Google LLC
|
|
102
102
|
* SPDX-License-Identifier: Apache-2.0
|
|
103
|
-
*/
|
|
103
|
+
*/j.map(G);const W=Symbol("internals"),Y=Symbol("privateInternals");function K(e){return class WithElementInternalsElement extends e{get[W](){return this[Y]||(this[Y]=this.attachInternals()),this[Y]}}}
|
|
104
104
|
/**
|
|
105
105
|
* @license
|
|
106
106
|
* Copyright 2023 Google LLC
|
|
107
107
|
* SPDX-License-Identifier: Apache-2.0
|
|
108
|
-
*/function
|
|
108
|
+
*/function X(e){return e.currentTarget===e.target&&(e.composedPath()[0]===e.target&&(!e.target.disabled&&!function(e){const t=Z;t&&(e.preventDefault(),e.stopImmediatePropagation());return async function(){Z=!0,await null,Z=!1}
|
|
109
109
|
/**
|
|
110
110
|
* @license
|
|
111
111
|
* Copyright 2019 Google LLC
|
|
112
112
|
* SPDX-License-Identifier: Apache-2.0
|
|
113
|
-
*/(),t}(e)))}let
|
|
113
|
+
*/(),t}(e)))}let Z=!1;const J=K(u);class Button extends J{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[W].form}constructor(){super(),this.disabled=!1,this.href="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",this.handleActivationClick=e=>{X(e)&&this.buttonElement&&(this.focus(),
|
|
114
114
|
/**
|
|
115
115
|
* @license
|
|
116
116
|
* Copyright 2021 Google LLC
|
|
117
117
|
* SPDX-License-Identifier: Apache-2.0
|
|
118
118
|
*/
|
|
119
|
-
function(e){const t=new MouseEvent("click",{bubbles:!0});e.dispatchEvent(t)}(this.buttonElement))},this.addEventListener("click",this.handleActivationClick)}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}render(){const e=this.disabled&&!this.href,t=this.href?this.renderLink():this.renderButton(),
|
|
119
|
+
function(e){const t=new MouseEvent("click",{bubbles:!0});e.dispatchEvent(t)}(this.buttonElement))},this.addEventListener("click",this.handleActivationClick)}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}render(){const e=this.disabled&&!this.href,t=this.href?this.renderLink():this.renderButton(),r=this.href?"link":"button";return p`
|
|
120
120
|
${this.renderElevationOrOutline?.()}
|
|
121
121
|
<div class="background"></div>
|
|
122
|
-
<md-focus-ring part="focus-ring" for=${
|
|
123
|
-
<md-ripple for=${
|
|
122
|
+
<md-focus-ring part="focus-ring" for=${r}></md-focus-ring>
|
|
123
|
+
<md-ripple for=${r} ?disabled="${e}"></md-ripple>
|
|
124
124
|
${t}
|
|
125
|
-
`}renderButton(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:
|
|
125
|
+
`}renderButton(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return p`<button
|
|
126
126
|
id="button"
|
|
127
127
|
class="button"
|
|
128
128
|
?disabled=${this.disabled}
|
|
129
129
|
aria-label="${e||f}"
|
|
130
130
|
aria-haspopup="${t||f}"
|
|
131
|
-
aria-expanded="${
|
|
131
|
+
aria-expanded="${r||f}">
|
|
132
132
|
${this.renderContent()}
|
|
133
|
-
</button>`}renderLink(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:
|
|
133
|
+
</button>`}renderLink(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return p`<a
|
|
134
134
|
id="link"
|
|
135
135
|
class="button"
|
|
136
136
|
aria-label="${e||f}"
|
|
137
137
|
aria-haspopup="${t||f}"
|
|
138
|
-
aria-expanded="${
|
|
138
|
+
aria-expanded="${r||f}"
|
|
139
139
|
href=${this.href}
|
|
140
140
|
target=${this.target||f}
|
|
141
141
|
>${this.renderContent()}
|
|
142
|
-
</a>`}renderContent(){const e=
|
|
142
|
+
</a>`}renderContent(){const e=p`<slot
|
|
143
143
|
name="icon"
|
|
144
|
-
@slotchange="${this.handleSlotChange}"></slot>`;return
|
|
144
|
+
@slotchange="${this.handleSlotChange}"></slot>`;return p`
|
|
145
145
|
<span class="touch"></span>
|
|
146
146
|
${this.trailingIcon?f:e}
|
|
147
147
|
<span class="label"><slot></slot></span>
|
|
148
148
|
${this.trailingIcon?e:f}
|
|
149
|
-
`}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}}
|
|
149
|
+
`}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}}H(Button),Button.addInitializer((e=>{const t=e;t.addEventListener("click",(async e=>{const{type:r,[W]:o}=t,{form:a}=o;a&&"button"!==r&&(await new Promise((e=>{setTimeout(e)})),e.defaultPrevented||("reset"!==r?(a.addEventListener("submit",(e=>{Object.defineProperty(e,"submitter",{configurable:!0,enumerable:!0,get:()=>t})}),{capture:!0,once:!0}),o.setFormValue(t.value),a.requestSubmit()):a.reset()))}))})),Button.formAssociated=!0,Button.shadowRootOptions={mode:"open",delegatesFocus:!0},e([c({type:Boolean,reflect:!0})],Button.prototype,"disabled",void 0),e([c()],Button.prototype,"href",void 0),e([c()],Button.prototype,"target",void 0),e([c({type:Boolean,attribute:"trailing-icon",reflect:!0})],Button.prototype,"trailingIcon",void 0),e([c({type:Boolean,attribute:"has-icon",reflect:!0})],Button.prototype,"hasIcon",void 0),e([c()],Button.prototype,"type",void 0),e([c({reflect:!0})],Button.prototype,"value",void 0),e([w(".button")],Button.prototype,"buttonElement",void 0),e([C({slot:"icon",flatten:!0})],Button.prototype,"assignedIcons",void 0);
|
|
150
150
|
/**
|
|
151
151
|
* @license
|
|
152
152
|
* Copyright 2021 Google LLC
|
|
153
153
|
* SPDX-License-Identifier: Apache-2.0
|
|
154
154
|
*/
|
|
155
|
-
class FilledTonalButton extends Button{renderElevationOrOutline(){return
|
|
155
|
+
class FilledTonalButton extends Button{renderElevationOrOutline(){return p`<md-elevation></md-elevation>`}}
|
|
156
156
|
/**
|
|
157
157
|
* @license
|
|
158
158
|
* Copyright 2022 Google LLC
|
|
159
159
|
* SPDX-License-Identifier: Apache-2.0
|
|
160
|
-
*/const
|
|
160
|
+
*/const Q=h`:host{--_container-color: var(--md-filled-tonal-button-container-color, var(--md-sys-color-secondary-container, #e8def8));--_container-elevation: var(--md-filled-tonal-button-container-elevation, 0);--_container-height: var(--md-filled-tonal-button-container-height, 40px);--_container-shadow-color: var(--md-filled-tonal-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-tonal-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-tonal-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-tonal-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-tonal-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-tonal-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-tonal-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-tonal-button-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-container-elevation: var(--md-filled-tonal-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-tonal-button-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-color: var(--md-filled-tonal-button-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-opacity: var(--md-filled-tonal-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-tonal-button-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_label-text-font: var(--md-filled-tonal-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-tonal-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-tonal-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-tonal-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-tonal-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-tonal-button-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-color: var(--md-filled-tonal-button-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-opacity: var(--md-filled-tonal-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-tonal-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-tonal-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-tonal-button-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-icon-color: var(--md-filled-tonal-button-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-color: var(--md-filled-tonal-button-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-size: var(--md-filled-tonal-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-tonal-button-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_container-shape-start-start: var(--md-filled-tonal-button-container-shape-start-start, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-tonal-button-container-shape-start-end, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-tonal-button-container-shape-end-end, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-tonal-button-container-shape-end-start, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-tonal-button-leading-space, 24px);--_trailing-space: var(--md-filled-tonal-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-tonal-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-tonal-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-tonal-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-tonal-button-with-trailing-icon-trailing-space, 16px)}/*# sourceMappingURL=filled-tonal-styles.css.map */
|
|
161
161
|
`
|
|
162
162
|
/**
|
|
163
163
|
* @license
|
|
164
164
|
* Copyright 2022 Google LLC
|
|
165
165
|
* SPDX-License-Identifier: Apache-2.0
|
|
166
|
-
*/,
|
|
166
|
+
*/,ee=h`md-elevation{transition-duration:280ms}:host([disabled]) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host([disabled]) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)}/*# sourceMappingURL=shared-elevation-styles.css.map */
|
|
167
167
|
`
|
|
168
168
|
/**
|
|
169
169
|
* @license
|
|
170
170
|
* Copyright 2022 Google LLC
|
|
171
171
|
* SPDX-License-Identifier: Apache-2.0
|
|
172
|
-
*/,
|
|
172
|
+
*/,te=h`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host([disabled]){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host([disabled]) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host([disabled]) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host([disabled]){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host([disabled]) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none}/*# sourceMappingURL=shared-styles.css.map */
|
|
173
173
|
`
|
|
174
174
|
/**
|
|
175
175
|
* @license
|
|
176
176
|
* Copyright 2021 Google LLC
|
|
177
177
|
* SPDX-License-Identifier: Apache-2.0
|
|
178
|
-
*/;let re=class MdFilledTonalButton extends FilledTonalButton{};re.styles=[
|
|
178
|
+
*/;let re=class MdFilledTonalButton extends FilledTonalButton{};re.styles=[te,ee,Q],re=e([v("md-filled-tonal-button")],re);
|
|
179
179
|
/**
|
|
180
180
|
* @license
|
|
181
181
|
* Copyright 2021 Google LLC
|
|
182
182
|
* SPDX-License-Identifier: Apache-2.0
|
|
183
183
|
*/
|
|
184
|
-
class Field extends u{constructor(){super(...arguments),this.disabled=!1,this.error=!1,this.focused=!1,this.label="",this.populated=!1,this.required=!1,this.resizable=!1,this.supportingText="",this.errorText="",this.count=-1,this.max=-1,this.hasStart=!1,this.hasEnd=!1,this.isAnimating=!1,this.refreshErrorAlert=!1,this.disableTransitions=!1}get counterText(){const e=this.count??-1,t=this.max??-1;return e<0||t<=0?"":`${e} / ${t}`}get supportingOrErrorText(){return this.error&&this.errorText?this.errorText:this.supportingText}reannounceError(){this.refreshErrorAlert=!0}update(e){e.has("disabled")&&void 0!==e.get("disabled")&&(this.disableTransitions=!0),this.disabled&&this.focused&&(e.set("focused",!0),this.focused=!1),this.animateLabelIfNeeded({wasFocused:e.get("focused"),wasPopulated:e.get("populated")}),super.update(e)}render(){const e=this.renderLabel(!0),t=this.renderLabel(!1),
|
|
185
|
-
<div class="field ${
|
|
184
|
+
class Field extends u{constructor(){super(...arguments),this.disabled=!1,this.error=!1,this.focused=!1,this.label="",this.populated=!1,this.required=!1,this.resizable=!1,this.supportingText="",this.errorText="",this.count=-1,this.max=-1,this.hasStart=!1,this.hasEnd=!1,this.isAnimating=!1,this.refreshErrorAlert=!1,this.disableTransitions=!1}get counterText(){const e=this.count??-1,t=this.max??-1;return e<0||t<=0?"":`${e} / ${t}`}get supportingOrErrorText(){return this.error&&this.errorText?this.errorText:this.supportingText}reannounceError(){this.refreshErrorAlert=!0}update(e){e.has("disabled")&&void 0!==e.get("disabled")&&(this.disableTransitions=!0),this.disabled&&this.focused&&(e.set("focused",!0),this.focused=!1),this.animateLabelIfNeeded({wasFocused:e.get("focused"),wasPopulated:e.get("populated")}),super.update(e)}render(){const e=this.renderLabel(!0),t=this.renderLabel(!1),r=this.renderOutline?.(e),o={disabled:this.disabled,"disable-transitions":this.disableTransitions,error:this.error&&!this.disabled,focused:this.focused,"with-start":this.hasStart,"with-end":this.hasEnd,populated:this.populated,resizable:this.resizable,required:this.required,"no-label":!this.label};return p`
|
|
185
|
+
<div class="field ${B(o)}">
|
|
186
186
|
<div class="container-overflow">
|
|
187
|
-
${this.renderBackground?.()} ${this.renderIndicator?.()} ${
|
|
187
|
+
${this.renderBackground?.()} ${this.renderIndicator?.()} ${r}
|
|
188
188
|
<div class="container">
|
|
189
189
|
<div class="start">
|
|
190
190
|
<slot name="start"></slot>
|
|
191
191
|
</div>
|
|
192
192
|
<div class="middle">
|
|
193
193
|
<div class="label-wrapper">
|
|
194
|
-
${t} ${
|
|
194
|
+
${t} ${r?f:e}
|
|
195
195
|
</div>
|
|
196
196
|
<div class="content">
|
|
197
197
|
<slot></slot>
|
|
@@ -204,22 +204,22 @@ class Field extends u{constructor(){super(...arguments),this.disabled=!1,this.er
|
|
|
204
204
|
</div>
|
|
205
205
|
${this.renderSupportingText()}
|
|
206
206
|
</div>
|
|
207
|
-
`}updated(e){(e.has("supportingText")||e.has("errorText")||e.has("count")||e.has("max"))&&this.updateSlottedAriaDescribedBy(),this.refreshErrorAlert&&requestAnimationFrame((()=>{this.refreshErrorAlert=!1})),this.disableTransitions&&requestAnimationFrame((()=>{this.disableTransitions=!1}))}renderSupportingText(){const{supportingOrErrorText:e,counterText:t}=this;if(!e&&!t)return f;const
|
|
208
|
-
<div class="supporting-text" role=${a?"alert":f}>${
|
|
207
|
+
`}updated(e){(e.has("supportingText")||e.has("errorText")||e.has("count")||e.has("max"))&&this.updateSlottedAriaDescribedBy(),this.refreshErrorAlert&&requestAnimationFrame((()=>{this.refreshErrorAlert=!1})),this.disableTransitions&&requestAnimationFrame((()=>{this.disableTransitions=!1}))}renderSupportingText(){const{supportingOrErrorText:e,counterText:t}=this;if(!e&&!t)return f;const r=p`<span>${e}</span>`,o=t?p`<span class="counter">${t}</span>`:f,a=this.error&&this.errorText&&!this.refreshErrorAlert;return p`
|
|
208
|
+
<div class="supporting-text" role=${a?"alert":f}>${r}${o}</div>
|
|
209
209
|
<slot
|
|
210
210
|
name="aria-describedby"
|
|
211
211
|
@slotchange=${this.updateSlottedAriaDescribedBy}></slot>
|
|
212
|
-
`}updateSlottedAriaDescribedBy(){for(const e of this.slottedAriaDescribedBy)b(
|
|
213
|
-
<span class="label ${
|
|
214
|
-
>${
|
|
212
|
+
`}updateSlottedAriaDescribedBy(){for(const e of this.slottedAriaDescribedBy)b(p`${this.supportingOrErrorText} ${this.counterText}`,e),e.setAttribute("hidden","")}renderLabel(e){if(!this.label)return f;let t;t=e?this.focused||this.populated||this.isAnimating:!this.focused&&!this.populated&&!this.isAnimating;const r={hidden:!t,floating:e,resting:!e},o=`${this.label}${this.required?"*":""}`;return p`
|
|
213
|
+
<span class="label ${B(r)}" aria-hidden=${!t}
|
|
214
|
+
>${o}</span
|
|
215
215
|
>
|
|
216
|
-
`}animateLabelIfNeeded({wasFocused:e,wasPopulated:t}){if(!this.label)return;e??(e=this.focused),t??(t=this.populated);(e||t)!==(this.focused||this.populated)&&(this.isAnimating=!0,this.labelAnimation?.cancel(),this.labelAnimation=this.floatingLabelEl?.animate(this.getLabelKeyframes(),{duration:150,easing:M}),this.labelAnimation?.addEventListener("finish",(()=>{this.isAnimating=!1})))}getLabelKeyframes(){const{floatingLabelEl:e,restingLabelEl:t}=this;if(!e||!t)return[];const{x:
|
|
216
|
+
`}animateLabelIfNeeded({wasFocused:e,wasPopulated:t}){if(!this.label)return;e??(e=this.focused),t??(t=this.populated);(e||t)!==(this.focused||this.populated)&&(this.isAnimating=!0,this.labelAnimation?.cancel(),this.labelAnimation=this.floatingLabelEl?.animate(this.getLabelKeyframes(),{duration:150,easing:M}),this.labelAnimation?.addEventListener("finish",(()=>{this.isAnimating=!1})))}getLabelKeyframes(){const{floatingLabelEl:e,restingLabelEl:t}=this;if(!e||!t)return[];const{x:r,y:o,height:a}=e.getBoundingClientRect(),{x:n,y:l,height:s}=t.getBoundingClientRect(),d=e.scrollWidth,c=t.scrollWidth,u=c/d,p=`translateX(${n-r}px) translateY(${l-o+Math.round((s-a*u)/2)}px) scale(${u})`,h="translateX(0) translateY(0) scale(1)",v=t.clientWidth,m=c>v?v/u+"px":"";return this.focused||this.populated?[{transform:p,width:m},{transform:h,width:m}]:[{transform:h,width:m},{transform:p,width:m}]}getSurfacePositionClientRect(){return this.containerEl.getBoundingClientRect()}}e([c({type:Boolean})],Field.prototype,"disabled",void 0),e([c({type:Boolean})],Field.prototype,"error",void 0),e([c({type:Boolean})],Field.prototype,"focused",void 0),e([c()],Field.prototype,"label",void 0),e([c({type:Boolean})],Field.prototype,"populated",void 0),e([c({type:Boolean})],Field.prototype,"required",void 0),e([c({type:Boolean})],Field.prototype,"resizable",void 0),e([c({attribute:"supporting-text"})],Field.prototype,"supportingText",void 0),e([c({attribute:"error-text"})],Field.prototype,"errorText",void 0),e([c({type:Number})],Field.prototype,"count",void 0),e([c({type:Number})],Field.prototype,"max",void 0),e([c({type:Boolean,attribute:"has-start"})],Field.prototype,"hasStart",void 0),e([c({type:Boolean,attribute:"has-end"})],Field.prototype,"hasEnd",void 0),e([C({slot:"aria-describedby"})],Field.prototype,"slottedAriaDescribedBy",void 0),e([y()],Field.prototype,"isAnimating",void 0),e([y()],Field.prototype,"refreshErrorAlert",void 0),e([y()],Field.prototype,"disableTransitions",void 0),e([w(".label.floating")],Field.prototype,"floatingLabelEl",void 0),e([w(".label.resting")],Field.prototype,"restingLabelEl",void 0),e([w(".container")],Field.prototype,"containerEl",void 0);
|
|
217
217
|
/**
|
|
218
218
|
* @license
|
|
219
219
|
* Copyright 2021 Google LLC
|
|
220
220
|
* SPDX-License-Identifier: Apache-2.0
|
|
221
221
|
*/
|
|
222
|
-
class OutlinedField extends Field{renderOutline(e){return
|
|
222
|
+
class OutlinedField extends Field{renderOutline(e){return p`
|
|
223
223
|
<div class="outline">
|
|
224
224
|
<div class="outline-start"></div>
|
|
225
225
|
<div class="outline-notch">
|
|
@@ -234,36 +234,36 @@ class OutlinedField extends Field{renderOutline(e){return h`
|
|
|
234
234
|
* @license
|
|
235
235
|
* Copyright 2022 Google LLC
|
|
236
236
|
* SPDX-License-Identifier: Apache-2.0
|
|
237
|
-
*/const ie=p`@layer styles{:host{--_bottom-space: var(--md-outlined-field-bottom-space, 16px);--_content-color: var(--md-outlined-field-content-color, var(--md-sys-color-on-surface, #1d1b20));--_content-font: var(--md-outlined-field-content-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_content-line-height: var(--md-outlined-field-content-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_content-size: var(--md-outlined-field-content-size, var(--md-sys-typescale-body-large-size, 1rem));--_content-weight: var(--md-outlined-field-content-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_disabled-content-color: var(--md-outlined-field-disabled-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-content-opacity: var(--md-outlined-field-disabled-content-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-field-disabled-label-text-opacity, 0.38);--_disabled-leading-content-color: var(--md-outlined-field-disabled-leading-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-content-opacity: var(--md-outlined-field-disabled-leading-content-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-content-color: var(--md-outlined-field-disabled-trailing-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-content-opacity: var(--md-outlined-field-disabled-trailing-content-opacity, 0.38);--_error-content-color: var(--md-outlined-field-error-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-content-color: var(--md-outlined-field-error-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-content-color: var(--md-outlined-field-error-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-content-color: var(--md-outlined-field-error-focus-trailing-content-color, var(--md-sys-color-error, #b3261e));--_error-hover-content-color: var(--md-outlined-field-error-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-content-color: var(--md-outlined-field-error-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-content-color: var(--md-outlined-field-error-hover-trailing-content-color, var(--md-sys-color-on-error-container, #410e0b));--_error-label-text-color: var(--md-outlined-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-content-color: var(--md-outlined-field-error-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-content-color: var(--md-outlined-field-error-trailing-content-color, var(--md-sys-color-error, #b3261e));--_focus-content-color: var(--md-outlined-field-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-content-color: var(--md-outlined-field-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-content-color: var(--md-outlined-field-focus-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-content-color: var(--md-outlined-field-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-content-color: var(--md-outlined-field-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-content-color: var(--md-outlined-field-hover-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-outlined-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-padding-bottom: var(--md-outlined-field-label-text-padding-bottom, 8px);--_label-text-populated-line-height: var(--md-outlined-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-content-color: var(--md-outlined-field-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-space: var(--md-outlined-field-leading-space, 16px);--_outline-color: var(--md-outlined-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-label-padding: var(--md-outlined-field-outline-label-padding, 4px);--_outline-width: var(--md-outlined-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-leading-space: var(--md-outlined-field-supporting-text-leading-space, 16px);--_supporting-text-line-height: var(--md-outlined-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-top-space: var(--md-outlined-field-supporting-text-top-space, 4px);--_supporting-text-trailing-space: var(--md-outlined-field-supporting-text-trailing-space, 16px);--_supporting-text-weight: var(--md-outlined-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_top-space: var(--md-outlined-field-top-space, 16px);--_trailing-content-color: var(--md-outlined-field-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-space: var(--md-outlined-field-trailing-space, 16px);--_container-shape-start-start: var(--md-outlined-field-container-shape-start-start, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-field-container-shape-start-end, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-field-container-shape-end-end, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-field-container-shape-end-start, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)))}.outline{border-color:var(--_outline-color);border-radius:inherit;display:flex;pointer-events:none;height:100%;position:absolute;width:100%;z-index:1}.outline-start::before,.outline-start::after,.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after,.outline-end::before,.outline-end::after{border:inherit;content:"";inset:0;position:absolute}.outline-start,.outline-end{border:inherit;border-radius:inherit;box-sizing:border-box;position:relative}.outline-start::before,.outline-start::after,.outline-end::before,.outline-end::after{border-bottom-style:solid;border-top-style:solid}.outline-start::after,.outline-end::after{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-start::after,.focused .outline-end::after{opacity:1}.outline-start::before,.outline-start::after{border-inline-start-style:solid;border-inline-end-style:none;border-start-start-radius:inherit;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:0;margin-inline-end:var(--_outline-label-padding)}.outline-end{flex-grow:1;margin-inline-start:calc(-1*var(--_outline-label-padding))}.outline-end::before,.outline-end::after{border-inline-start-style:none;border-inline-end-style:solid;border-start-start-radius:0;border-start-end-radius:inherit;border-end-start-radius:0;border-end-end-radius:inherit}.outline-notch{align-items:flex-start;border:inherit;display:flex;margin-inline-start:calc(-1*var(--_outline-label-padding));margin-inline-end:var(--_outline-label-padding);max-width:calc(100% - var(--_leading-space) - var(--_trailing-space));padding:0 var(--_outline-label-padding);position:relative}.no-label .outline-notch{display:none}.outline-panel-inactive,.outline-panel-active{border:inherit;border-bottom-style:solid;inset:0;position:absolute}.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after{border-top-style:solid;border-bottom:none;bottom:auto;transform:scaleX(1);transition:transform 150ms cubic-bezier(0.2, 0, 0, 1)}.outline-panel-inactive::before,.outline-panel-active::before{right:50%;transform-origin:top left}.outline-panel-inactive::after,.outline-panel-active::after{left:50%;transform-origin:top right}.populated .outline-panel-inactive::before,.populated .outline-panel-inactive::after,.populated .outline-panel-active::before,.populated .outline-panel-active::after,.focused .outline-panel-inactive::before,.focused .outline-panel-inactive::after,.focused .outline-panel-active::before,.focused .outline-panel-active::after{transform:scaleX(0)}.outline-panel-active{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-panel-active{opacity:1}.outline-label{display:flex;max-width:100%;transform:translateY(calc(-100% + var(--_label-text-padding-bottom)))}.outline-start,.field:not(.with-start) .content ::slotted(*){padding-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-start) .label-wrapper{margin-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-end) .content ::slotted(*){padding-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.field:not(.with-end) .label-wrapper{margin-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.outline-start::before,.outline-end::before,.outline-panel-inactive,.outline-panel-inactive::before,.outline-panel-inactive::after{border-width:var(--_outline-width)}:hover .outline{border-color:var(--_hover-outline-color);color:var(--_hover-outline-color)}:hover .outline-start::before,:hover .outline-end::before,:hover .outline-panel-inactive,:hover .outline-panel-inactive::before,:hover .outline-panel-inactive::after{border-width:var(--_hover-outline-width)}.focused .outline{border-color:var(--_focus-outline-color);color:var(--_focus-outline-color)}.outline-start::after,.outline-end::after,.outline-panel-active,.outline-panel-active::before,.outline-panel-active::after{border-width:var(--_focus-outline-width)}.disabled .outline{border-color:var(--_disabled-outline-color);color:var(--_disabled-outline-color)}.disabled .outline-start,.disabled .outline-end,.disabled .outline-panel-inactive{opacity:var(--_disabled-outline-opacity)}.disabled .outline-start::before,.disabled .outline-end::before,.disabled .outline-panel-inactive,.disabled .outline-panel-inactive::before,.disabled .outline-panel-inactive::after{border-width:var(--_disabled-outline-width)}.error .outline{border-color:var(--_error-outline-color);color:var(--_error-outline-color)}.error:hover .outline{border-color:var(--_error-hover-outline-color);color:var(--_error-hover-outline-color)}.error.focused .outline{border-color:var(--_error-focus-outline-color);color:var(--_error-focus-outline-color)}.resizable .container{bottom:var(--_focus-outline-width);inset-inline-end:var(--_focus-outline-width);clip-path:inset(var(--_focus-outline-width) 0 0 var(--_focus-outline-width))}.resizable .container>*{top:var(--_focus-outline-width);inset-inline-start:var(--_focus-outline-width)}.resizable .container:dir(rtl){clip-path:inset(var(--_focus-outline-width) var(--_focus-outline-width) 0 0)}}@layer hcm{@media(forced-colors: active){.disabled .outline{border-color:GrayText;color:GrayText}.disabled :is(.outline-start,.outline-end,.outline-panel-inactive){opacity:1}}}/*# sourceMappingURL=outlined-styles.css.map */
|
|
237
|
+
*/const oe=h`@layer styles{:host{--_bottom-space: var(--md-outlined-field-bottom-space, 16px);--_content-color: var(--md-outlined-field-content-color, var(--md-sys-color-on-surface, #1d1b20));--_content-font: var(--md-outlined-field-content-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_content-line-height: var(--md-outlined-field-content-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_content-size: var(--md-outlined-field-content-size, var(--md-sys-typescale-body-large-size, 1rem));--_content-weight: var(--md-outlined-field-content-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_disabled-content-color: var(--md-outlined-field-disabled-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-content-opacity: var(--md-outlined-field-disabled-content-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-field-disabled-label-text-opacity, 0.38);--_disabled-leading-content-color: var(--md-outlined-field-disabled-leading-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-content-opacity: var(--md-outlined-field-disabled-leading-content-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-content-color: var(--md-outlined-field-disabled-trailing-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-content-opacity: var(--md-outlined-field-disabled-trailing-content-opacity, 0.38);--_error-content-color: var(--md-outlined-field-error-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-content-color: var(--md-outlined-field-error-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-content-color: var(--md-outlined-field-error-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-content-color: var(--md-outlined-field-error-focus-trailing-content-color, var(--md-sys-color-error, #b3261e));--_error-hover-content-color: var(--md-outlined-field-error-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-content-color: var(--md-outlined-field-error-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-content-color: var(--md-outlined-field-error-hover-trailing-content-color, var(--md-sys-color-on-error-container, #410e0b));--_error-label-text-color: var(--md-outlined-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-content-color: var(--md-outlined-field-error-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-content-color: var(--md-outlined-field-error-trailing-content-color, var(--md-sys-color-error, #b3261e));--_focus-content-color: var(--md-outlined-field-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-content-color: var(--md-outlined-field-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-content-color: var(--md-outlined-field-focus-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-content-color: var(--md-outlined-field-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-content-color: var(--md-outlined-field-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-content-color: var(--md-outlined-field-hover-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-outlined-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-padding-bottom: var(--md-outlined-field-label-text-padding-bottom, 8px);--_label-text-populated-line-height: var(--md-outlined-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-content-color: var(--md-outlined-field-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-space: var(--md-outlined-field-leading-space, 16px);--_outline-color: var(--md-outlined-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-label-padding: var(--md-outlined-field-outline-label-padding, 4px);--_outline-width: var(--md-outlined-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-leading-space: var(--md-outlined-field-supporting-text-leading-space, 16px);--_supporting-text-line-height: var(--md-outlined-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-top-space: var(--md-outlined-field-supporting-text-top-space, 4px);--_supporting-text-trailing-space: var(--md-outlined-field-supporting-text-trailing-space, 16px);--_supporting-text-weight: var(--md-outlined-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_top-space: var(--md-outlined-field-top-space, 16px);--_trailing-content-color: var(--md-outlined-field-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-space: var(--md-outlined-field-trailing-space, 16px);--_container-shape-start-start: var(--md-outlined-field-container-shape-start-start, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-field-container-shape-start-end, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-field-container-shape-end-end, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-field-container-shape-end-start, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)))}.outline{border-color:var(--_outline-color);border-radius:inherit;display:flex;pointer-events:none;height:100%;position:absolute;width:100%;z-index:1}.outline-start::before,.outline-start::after,.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after,.outline-end::before,.outline-end::after{border:inherit;content:"";inset:0;position:absolute}.outline-start,.outline-end{border:inherit;border-radius:inherit;box-sizing:border-box;position:relative}.outline-start::before,.outline-start::after,.outline-end::before,.outline-end::after{border-bottom-style:solid;border-top-style:solid}.outline-start::after,.outline-end::after{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-start::after,.focused .outline-end::after{opacity:1}.outline-start::before,.outline-start::after{border-inline-start-style:solid;border-inline-end-style:none;border-start-start-radius:inherit;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:0;margin-inline-end:var(--_outline-label-padding)}.outline-end{flex-grow:1;margin-inline-start:calc(-1*var(--_outline-label-padding))}.outline-end::before,.outline-end::after{border-inline-start-style:none;border-inline-end-style:solid;border-start-start-radius:0;border-start-end-radius:inherit;border-end-start-radius:0;border-end-end-radius:inherit}.outline-notch{align-items:flex-start;border:inherit;display:flex;margin-inline-start:calc(-1*var(--_outline-label-padding));margin-inline-end:var(--_outline-label-padding);max-width:calc(100% - var(--_leading-space) - var(--_trailing-space));padding:0 var(--_outline-label-padding);position:relative}.no-label .outline-notch{display:none}.outline-panel-inactive,.outline-panel-active{border:inherit;border-bottom-style:solid;inset:0;position:absolute}.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after{border-top-style:solid;border-bottom:none;bottom:auto;transform:scaleX(1);transition:transform 150ms cubic-bezier(0.2, 0, 0, 1)}.outline-panel-inactive::before,.outline-panel-active::before{right:50%;transform-origin:top left}.outline-panel-inactive::after,.outline-panel-active::after{left:50%;transform-origin:top right}.populated .outline-panel-inactive::before,.populated .outline-panel-inactive::after,.populated .outline-panel-active::before,.populated .outline-panel-active::after,.focused .outline-panel-inactive::before,.focused .outline-panel-inactive::after,.focused .outline-panel-active::before,.focused .outline-panel-active::after{transform:scaleX(0)}.outline-panel-active{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-panel-active{opacity:1}.outline-label{display:flex;max-width:100%;transform:translateY(calc(-100% + var(--_label-text-padding-bottom)))}.outline-start,.field:not(.with-start) .content ::slotted(*){padding-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-start) .label-wrapper{margin-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-end) .content ::slotted(*){padding-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.field:not(.with-end) .label-wrapper{margin-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.outline-start::before,.outline-end::before,.outline-panel-inactive,.outline-panel-inactive::before,.outline-panel-inactive::after{border-width:var(--_outline-width)}:hover .outline{border-color:var(--_hover-outline-color);color:var(--_hover-outline-color)}:hover .outline-start::before,:hover .outline-end::before,:hover .outline-panel-inactive,:hover .outline-panel-inactive::before,:hover .outline-panel-inactive::after{border-width:var(--_hover-outline-width)}.focused .outline{border-color:var(--_focus-outline-color);color:var(--_focus-outline-color)}.outline-start::after,.outline-end::after,.outline-panel-active,.outline-panel-active::before,.outline-panel-active::after{border-width:var(--_focus-outline-width)}.disabled .outline{border-color:var(--_disabled-outline-color);color:var(--_disabled-outline-color)}.disabled .outline-start,.disabled .outline-end,.disabled .outline-panel-inactive{opacity:var(--_disabled-outline-opacity)}.disabled .outline-start::before,.disabled .outline-end::before,.disabled .outline-panel-inactive,.disabled .outline-panel-inactive::before,.disabled .outline-panel-inactive::after{border-width:var(--_disabled-outline-width)}.error .outline{border-color:var(--_error-outline-color);color:var(--_error-outline-color)}.error:hover .outline{border-color:var(--_error-hover-outline-color);color:var(--_error-hover-outline-color)}.error.focused .outline{border-color:var(--_error-focus-outline-color);color:var(--_error-focus-outline-color)}.resizable .container{bottom:var(--_focus-outline-width);inset-inline-end:var(--_focus-outline-width);clip-path:inset(var(--_focus-outline-width) 0 0 var(--_focus-outline-width))}.resizable .container>*{top:var(--_focus-outline-width);inset-inline-start:var(--_focus-outline-width)}.resizable .container:dir(rtl){clip-path:inset(var(--_focus-outline-width) var(--_focus-outline-width) 0 0)}}@layer hcm{@media(forced-colors: active){.disabled .outline{border-color:GrayText;color:GrayText}.disabled :is(.outline-start,.outline-end,.outline-panel-inactive){opacity:1}}}/*# sourceMappingURL=outlined-styles.css.map */
|
|
238
238
|
`
|
|
239
239
|
/**
|
|
240
240
|
* @license
|
|
241
241
|
* Copyright 2022 Google LLC
|
|
242
242
|
* SPDX-License-Identifier: Apache-2.0
|
|
243
|
-
*/,
|
|
243
|
+
*/,ie=h`:host{display:inline-flex;resize:both}.field{display:flex;flex:1;flex-direction:column;writing-mode:horizontal-tb;max-width:100%}.container-overflow{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start);display:flex;height:100%;position:relative}.container{align-items:center;border-radius:inherit;display:flex;flex:1;max-height:100%;min-height:100%;min-width:min-content;position:relative}.field,.container-overflow{resize:inherit}.resizable:not(.disabled) .container{resize:inherit;overflow:hidden}.disabled{pointer-events:none}@layer styles{.start,.middle,.end{display:flex;box-sizing:border-box;height:100%;position:relative}.start{color:var(--_leading-content-color)}.end{color:var(--_trailing-content-color)}.start,.end{align-items:center;justify-content:center}.with-start .start,.with-end .end{min-width:48px}.with-start .start{margin-inline-end:4px}.with-end .end{margin-inline-start:4px}.middle{align-items:stretch;align-self:baseline;flex:1}.content{color:var(--_content-color);display:flex;flex:1;opacity:0;transition:opacity 83ms cubic-bezier(0.2, 0, 0, 1)}.no-label .content,.focused .content,.populated .content{opacity:1;transition-delay:67ms}:is(.disabled,.disable-transitions) .content{transition:none}.content ::slotted(*){all:unset;color:currentColor;font-family:var(--_content-font);font-size:var(--_content-size);line-height:var(--_content-line-height);font-weight:var(--_content-weight);width:100%;overflow-wrap:revert;white-space:revert}.content ::slotted(:not(textarea)){padding-top:var(--_top-space);padding-bottom:var(--_bottom-space)}.content ::slotted(textarea){margin-top:var(--_top-space);margin-bottom:var(--_bottom-space)}:hover .content{color:var(--_hover-content-color)}:hover .start{color:var(--_hover-leading-content-color)}:hover .end{color:var(--_hover-trailing-content-color)}.focused .content{color:var(--_focus-content-color)}.focused .start{color:var(--_focus-leading-content-color)}.focused .end{color:var(--_focus-trailing-content-color)}.disabled .content{color:var(--_disabled-content-color)}.disabled.no-label .content,.disabled.focused .content,.disabled.populated .content{opacity:var(--_disabled-content-opacity)}.disabled .start{color:var(--_disabled-leading-content-color);opacity:var(--_disabled-leading-content-opacity)}.disabled .end{color:var(--_disabled-trailing-content-color);opacity:var(--_disabled-trailing-content-opacity)}.error .content{color:var(--_error-content-color)}.error .start{color:var(--_error-leading-content-color)}.error .end{color:var(--_error-trailing-content-color)}.error:hover .content{color:var(--_error-hover-content-color)}.error:hover .start{color:var(--_error-hover-leading-content-color)}.error:hover .end{color:var(--_error-hover-trailing-content-color)}.error.focused .content{color:var(--_error-focus-content-color)}.error.focused .start{color:var(--_error-focus-leading-content-color)}.error.focused .end{color:var(--_error-focus-trailing-content-color)}}@layer hcm{@media(forced-colors: active){.disabled :is(.start,.content,.end){color:GrayText;opacity:1}}}@layer styles{.label{box-sizing:border-box;color:var(--_label-text-color);overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap;z-index:1;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);width:min-content}.label-wrapper{inset:0;pointer-events:none;position:absolute}.label.resting{position:absolute;top:var(--_top-space)}.label.floating{font-size:var(--_label-text-populated-size);line-height:var(--_label-text-populated-line-height);transform-origin:top left}.label.hidden{opacity:0}.no-label .label{display:none}.label-wrapper{inset:0;position:absolute;text-align:initial}:hover .label{color:var(--_hover-label-text-color)}.focused .label{color:var(--_focus-label-text-color)}.disabled .label{color:var(--_disabled-label-text-color)}.disabled .label:not(.hidden){opacity:var(--_disabled-label-text-opacity)}.error .label{color:var(--_error-label-text-color)}.error:hover .label{color:var(--_error-hover-label-text-color)}.error.focused .label{color:var(--_error-focus-label-text-color)}}@layer hcm{@media(forced-colors: active){.disabled .label:not(.hidden){color:GrayText;opacity:1}}}@layer styles{.supporting-text{color:var(--_supporting-text-color);display:flex;font-family:var(--_supporting-text-font);font-size:var(--_supporting-text-size);line-height:var(--_supporting-text-line-height);font-weight:var(--_supporting-text-weight);gap:16px;justify-content:space-between;padding-inline-start:var(--_supporting-text-leading-space);padding-inline-end:var(--_supporting-text-trailing-space);padding-top:var(--_supporting-text-top-space)}.supporting-text :nth-child(2){flex-shrink:0}:hover .supporting-text{color:var(--_hover-supporting-text-color)}.focus .supporting-text{color:var(--_focus-supporting-text-color)}.disabled .supporting-text{color:var(--_disabled-supporting-text-color);opacity:var(--_disabled-supporting-text-opacity)}.error .supporting-text{color:var(--_error-supporting-text-color)}.error:hover .supporting-text{color:var(--_error-hover-supporting-text-color)}.error.focus .supporting-text{color:var(--_error-focus-supporting-text-color)}}@layer hcm{@media(forced-colors: active){.disabled .supporting-text{color:GrayText;opacity:1}}}/*# sourceMappingURL=shared-styles.css.map */
|
|
244
244
|
`
|
|
245
245
|
/**
|
|
246
246
|
* @license
|
|
247
247
|
* Copyright 2021 Google LLC
|
|
248
248
|
* SPDX-License-Identifier: Apache-2.0
|
|
249
|
-
*/;let
|
|
249
|
+
*/;let ae=class MdOutlinedField extends OutlinedField{};ae.styles=[ie,oe],ae=e([v("md-outlined-field")],ae);
|
|
250
250
|
/**
|
|
251
251
|
* @license
|
|
252
252
|
* Copyright 2020 Google LLC
|
|
253
253
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
254
254
|
*/
|
|
255
|
-
const se=Symbol.for(""),le=e=>{if(e?.r===se)return e?._$litStatic$},de=(e,...t)=>({_$litStatic$:t.reduce(((t,o,r)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(o)+e[r+1]),e[0]),r:se}),ce=new Map,ue=(e=>(t,...o)=>{const r=o.length;let a,n;const s=[],l=[];let d,c=0,u=!1;for(;c<r;){for(d=t[c];c<r&&void 0!==(n=o[c],a=le(n));)d+=a+t[++c],u=!0;c!==r&&l.push(n),s.push(d),c++}if(c===r&&s.push(t[r]),u){const e=s.join("$$lit$$");void 0===(t=ce.get(e))&&(s.raw=s,ce.set(e,t=s)),o=l}return e(t,...o)})(h),he=p`:host{--_caret-color: var(--md-outlined-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_disabled-input-text-color: var(--md-outlined-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-outlined-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-outlined-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-outlined-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-text-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-text-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-outlined-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-outlined-text-field-disabled-trailing-icon-opacity, 0.38);--_error-focus-caret-color: var(--md-outlined-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-outlined-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-outlined-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-outlined-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-input-text-color: var(--md-outlined-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-outlined-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-outlined-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-outlined-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-outlined-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-outlined-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-outlined-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-input-text-color: var(--md-outlined-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-outlined-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-text-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-outlined-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-input-text-color: var(--md-outlined-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-icon-color: var(--md-outlined-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-text-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-outlined-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-outlined-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-font: var(--md-outlined-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_input-text-line-height: var(--md-outlined-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_input-text-placeholder-color: var(--md-outlined-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-outlined-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-size: var(--md-outlined-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_input-text-suffix-color: var(--md-outlined-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-weight: var(--md-outlined-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_label-text-color: var(--md-outlined-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-outlined-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-icon-color: var(--md-outlined-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-outlined-text-field-leading-icon-size, 24px);--_outline-color: var(--md-outlined-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-text-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-line-height: var(--md-outlined-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-weight: var(--md-outlined-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_trailing-icon-color: var(--md-outlined-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-outlined-text-field-trailing-icon-size, 24px);--_container-shape-start-start: var(--md-outlined-text-field-container-shape-start-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-text-field-container-shape-start-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-text-field-container-shape-end-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-text-field-container-shape-end-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_leading-space: var(--md-outlined-text-field-leading-space, 16px);--_trailing-space: var(--md-outlined-text-field-trailing-space, 16px);--_top-space: var(--md-outlined-text-field-top-space, 16px);--_bottom-space: var(--md-outlined-text-field-bottom-space, 16px);--_input-text-prefix-trailing-space: var(--md-outlined-text-field-input-text-prefix-trailing-space, 2px);--_input-text-suffix-leading-space: var(--md-outlined-text-field-input-text-suffix-leading-space, 2px);--_focus-caret-color: var(--md-outlined-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--md-outlined-field-bottom-space: var(--_bottom-space);--md-outlined-field-container-shape-end-end: var(--_container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_container-shape-start-start);--md-outlined-field-content-color: var(--_input-text-color);--md-outlined-field-content-font: var(--_input-text-font);--md-outlined-field-content-line-height: var(--_input-text-line-height);--md-outlined-field-content-size: var(--_input-text-size);--md-outlined-field-content-weight: var(--_input-text-weight);--md-outlined-field-disabled-content-color: var(--_disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_focus-outline-color);--md-outlined-field-focus-outline-width: var(--_focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_hover-outline-color);--md-outlined-field-hover-outline-width: var(--_hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_label-text-color);--md-outlined-field-label-text-font: var(--_label-text-font);--md-outlined-field-label-text-line-height: var(--_label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_label-text-populated-size);--md-outlined-field-label-text-size: var(--_label-text-size);--md-outlined-field-label-text-weight: var(--_label-text-weight);--md-outlined-field-leading-content-color: var(--_leading-icon-color);--md-outlined-field-leading-space: var(--_leading-space);--md-outlined-field-outline-color: var(--_outline-color);--md-outlined-field-outline-width: var(--_outline-width);--md-outlined-field-supporting-text-color: var(--_supporting-text-color);--md-outlined-field-supporting-text-font: var(--_supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_supporting-text-weight);--md-outlined-field-top-space: var(--_top-space);--md-outlined-field-trailing-content-color: var(--_trailing-icon-color);--md-outlined-field-trailing-space: var(--_trailing-space)}/*# sourceMappingURL=outlined-styles.css.map */
|
|
255
|
+
const ne=Symbol.for(""),le=e=>{if(e?.r===ne)return e?._$litStatic$},se=(e,...t)=>({_$litStatic$:t.reduce(((t,r,o)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(r)+e[o+1]),e[0]),r:ne}),de=new Map,ce=(e=>(t,...r)=>{const o=r.length;let a,n;const l=[],s=[];let d,c=0,u=!1;for(;c<o;){for(d=t[c];c<o&&void 0!==(n=r[c],a=le(n));)d+=a+t[++c],u=!0;c!==o&&s.push(n),l.push(d),c++}if(c===o&&l.push(t[o]),u){const e=l.join("$$lit$$");void 0===(t=de.get(e))&&(l.raw=l,de.set(e,t=l)),r=s}return e(t,...r)})(p),ue=h`:host{--_caret-color: var(--md-outlined-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_disabled-input-text-color: var(--md-outlined-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-outlined-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-outlined-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-outlined-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-text-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-text-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-outlined-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-outlined-text-field-disabled-trailing-icon-opacity, 0.38);--_error-focus-caret-color: var(--md-outlined-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-outlined-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-outlined-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-outlined-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-input-text-color: var(--md-outlined-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-outlined-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-outlined-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-outlined-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-outlined-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-outlined-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-outlined-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-input-text-color: var(--md-outlined-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-outlined-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-text-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-outlined-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-input-text-color: var(--md-outlined-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-icon-color: var(--md-outlined-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-text-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-outlined-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-outlined-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-font: var(--md-outlined-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_input-text-line-height: var(--md-outlined-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_input-text-placeholder-color: var(--md-outlined-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-outlined-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-size: var(--md-outlined-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_input-text-suffix-color: var(--md-outlined-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-weight: var(--md-outlined-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_label-text-color: var(--md-outlined-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-outlined-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-icon-color: var(--md-outlined-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-outlined-text-field-leading-icon-size, 24px);--_outline-color: var(--md-outlined-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-text-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-line-height: var(--md-outlined-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-weight: var(--md-outlined-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_trailing-icon-color: var(--md-outlined-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-outlined-text-field-trailing-icon-size, 24px);--_container-shape-start-start: var(--md-outlined-text-field-container-shape-start-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-text-field-container-shape-start-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-text-field-container-shape-end-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-text-field-container-shape-end-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_leading-space: var(--md-outlined-text-field-leading-space, 16px);--_trailing-space: var(--md-outlined-text-field-trailing-space, 16px);--_top-space: var(--md-outlined-text-field-top-space, 16px);--_bottom-space: var(--md-outlined-text-field-bottom-space, 16px);--_input-text-prefix-trailing-space: var(--md-outlined-text-field-input-text-prefix-trailing-space, 2px);--_input-text-suffix-leading-space: var(--md-outlined-text-field-input-text-suffix-leading-space, 2px);--_focus-caret-color: var(--md-outlined-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--md-outlined-field-bottom-space: var(--_bottom-space);--md-outlined-field-container-shape-end-end: var(--_container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_container-shape-start-start);--md-outlined-field-content-color: var(--_input-text-color);--md-outlined-field-content-font: var(--_input-text-font);--md-outlined-field-content-line-height: var(--_input-text-line-height);--md-outlined-field-content-size: var(--_input-text-size);--md-outlined-field-content-weight: var(--_input-text-weight);--md-outlined-field-disabled-content-color: var(--_disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_focus-outline-color);--md-outlined-field-focus-outline-width: var(--_focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_hover-outline-color);--md-outlined-field-hover-outline-width: var(--_hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_label-text-color);--md-outlined-field-label-text-font: var(--_label-text-font);--md-outlined-field-label-text-line-height: var(--_label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_label-text-populated-size);--md-outlined-field-label-text-size: var(--_label-text-size);--md-outlined-field-label-text-weight: var(--_label-text-weight);--md-outlined-field-leading-content-color: var(--_leading-icon-color);--md-outlined-field-leading-space: var(--_leading-space);--md-outlined-field-outline-color: var(--_outline-color);--md-outlined-field-outline-width: var(--_outline-width);--md-outlined-field-supporting-text-color: var(--_supporting-text-color);--md-outlined-field-supporting-text-font: var(--_supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_supporting-text-weight);--md-outlined-field-top-space: var(--_top-space);--md-outlined-field-trailing-content-color: var(--_trailing-icon-color);--md-outlined-field-trailing-space: var(--_trailing-space)}/*# sourceMappingURL=outlined-styles.css.map */
|
|
256
256
|
`
|
|
257
257
|
/**
|
|
258
258
|
* @license
|
|
259
259
|
* Copyright 2020 Google LLC
|
|
260
260
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
261
|
-
*/,pe={},
|
|
261
|
+
*/,pe={},he=O(class extends P{constructor(e){if(super(e),e.type!==S&&e.type!==L&&e.type!==R)throw Error("The `live` directive is not allowed on child or event bindings");if(!(e=>void 0===e.strings)(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===m||t===f)return t;const r=e.element,o=e.name;if(e.type===S){if(t===r[o])return m}else if(e.type===R){if(!!t===r.hasAttribute(o))return m}else if(e.type===L&&r.getAttribute(o)===t+"")return m;return((e,t=pe)=>{e._$AH=t;
|
|
262
262
|
/**
|
|
263
263
|
* @license
|
|
264
264
|
* Copyright 2020 Google LLC
|
|
265
265
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
266
|
-
*/})(e),t}}),ve="important",
|
|
266
|
+
*/})(e),t}}),ve="important",me=" !"+ve,fe=O(class extends P{constructor(e){if(super(e),e.type!==L||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,r)=>{const o=e[r];return null==o?t:t+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`}),"")}update(e,[t]){const{style:r}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?r.removeProperty(e):r[e]=null);for(const e in t){const o=t[e];if(null!=o){this.ft.add(e);const t="string"==typeof o&&o.endsWith(me);e.includes("-")||t?r.setProperty(e,t?o.slice(0,-11):o,t?ve:""):r[e]=o}}return m}}),be={fromAttribute:e=>e??"",toAttribute:e=>e||null};
|
|
267
267
|
/**
|
|
268
268
|
* @license
|
|
269
269
|
* Copyright 2022 Google LLC
|
|
@@ -274,39 +274,39 @@ const se=Symbol.for(""),le=e=>{if(e?.r===se)return e?._$litStatic$},de=(e,...t)=
|
|
|
274
274
|
* Copyright 2023 Google LLC
|
|
275
275
|
* SPDX-License-Identifier: Apache-2.0
|
|
276
276
|
*/
|
|
277
|
-
const
|
|
277
|
+
const ge=Symbol("createValidator"),xe=Symbol("getValidityAnchor"),ye=Symbol("privateValidator"),_e=Symbol("privateSyncValidity"),we=Symbol("privateCustomValidationMessage");
|
|
278
278
|
/**
|
|
279
279
|
* @license
|
|
280
280
|
* Copyright 2023 Google LLC
|
|
281
281
|
* SPDX-License-Identifier: Apache-2.0
|
|
282
282
|
*/
|
|
283
|
-
const
|
|
283
|
+
const Ce=Symbol("getFormValue"),Te=Symbol("getFormState");
|
|
284
284
|
/**
|
|
285
285
|
* @license
|
|
286
286
|
* Copyright 2023 Google LLC
|
|
287
287
|
* SPDX-License-Identifier: Apache-2.0
|
|
288
288
|
*/
|
|
289
|
-
const
|
|
289
|
+
const $e=Symbol("onReportValidity"),Ae=Symbol("privateCleanupFormListeners"),Ee=Symbol("privateDoNotReportInvalid"),ke=Symbol("privateIsSelfReportingValidity"),ze=Symbol("privateCallOnReportValidity");const Fe=new WeakMap;
|
|
290
290
|
/**
|
|
291
291
|
* @license
|
|
292
292
|
* Copyright 2023 Google LLC
|
|
293
293
|
* SPDX-License-Identifier: Apache-2.0
|
|
294
294
|
*/
|
|
295
|
-
class Validator{constructor(e){this.getCurrentState=e,this.currentValidity={validity:{},validationMessage:""}}getValidity(){const e=this.getCurrentState();if(!(!this.prevState||!this.equals(this.prevState,e)))return this.currentValidity;const{validity:t,validationMessage:
|
|
295
|
+
class Validator{constructor(e){this.getCurrentState=e,this.currentValidity={validity:{},validationMessage:""}}getValidity(){const e=this.getCurrentState();if(!(!this.prevState||!this.equals(this.prevState,e)))return this.currentValidity;const{validity:t,validationMessage:r}=this.computeValidity(e);return this.prevState=this.copy(e),this.currentValidity={validationMessage:r,validity:{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing}},this.currentValidity}}
|
|
296
296
|
/**
|
|
297
297
|
* @license
|
|
298
298
|
* Copyright 2023 Google LLC
|
|
299
299
|
* SPDX-License-Identifier: Apache-2.0
|
|
300
|
-
*/class TextFieldValidator extends Validator{computeValidity({state:e,renderedControl:t}){let
|
|
300
|
+
*/class TextFieldValidator extends Validator{computeValidity({state:e,renderedControl:t}){let r=t;Ie(e)&&!r?(r=this.inputControl||document.createElement("input"),this.inputControl=r):r||(r=this.textAreaControl||document.createElement("textarea"),this.textAreaControl=r);const o=Ie(e)?r:null;if(o&&(o.type=e.type),r.value!==e.value&&(r.value=e.value),r.required=e.required,o){const t=e;t.pattern?o.pattern=t.pattern:o.removeAttribute("pattern"),t.min?o.min=t.min:o.removeAttribute("min"),t.max?o.max=t.max:o.removeAttribute("max"),t.step?o.step=t.step:o.removeAttribute("step")}return(e.minLength??-1)>-1?r.setAttribute("minlength",String(e.minLength)):r.removeAttribute("minlength"),(e.maxLength??-1)>-1?r.setAttribute("maxlength",String(e.maxLength)):r.removeAttribute("maxlength"),{validity:r.validity,validationMessage:r.validationMessage}}equals({state:e},{state:t}){const r=e.type===t.type&&e.value===t.value&&e.required===t.required&&e.minLength===t.minLength&&e.maxLength===t.maxLength;return Ie(e)&&Ie(t)?r&&e.pattern===t.pattern&&e.min===t.min&&e.max===t.max&&e.step===t.step:r}copy({state:e}){return{state:Ie(e)?this.copyInput(e):this.copyTextArea(e),renderedControl:null}}copyInput(e){const{type:t,pattern:r,min:o,max:a,step:n}=e;return{...this.copySharedState(e),type:t,pattern:r,min:o,max:a,step:n}}copyTextArea(e){return{...this.copySharedState(e),type:e.type}}copySharedState({value:e,required:t,minLength:r,maxLength:o}){return{value:e,required:t,minLength:r,maxLength:o}}}function Ie(e){return"textarea"!==e.type}
|
|
301
301
|
/**
|
|
302
302
|
* @license
|
|
303
303
|
* Copyright 2021 Google LLC
|
|
304
304
|
* SPDX-License-Identifier: Apache-2.0
|
|
305
|
-
*/const
|
|
306
|
-
<span class="text-field ${
|
|
305
|
+
*/const Le=function(e){var t,r,o;class OnReportValidityElement extends e{constructor(...e){super(...e),this[t]=new AbortController,this[r]=!1,this[o]=!1,this.addEventListener("invalid",(e=>{!this[Ee]&&e.isTrusted&&this.addEventListener("invalid",(()=>{this[ze](e)}),{once:!0})}),{capture:!0})}checkValidity(){this[Ee]=!0;const e=super.checkValidity();return this[Ee]=!1,e}reportValidity(){this[ke]=!0;const e=super.reportValidity();return e&&this[ze](null),this[ke]=!1,e}[(t=Ae,r=Ee,o=ke,ze)](e){const t=e?.defaultPrevented;if(t)return;this[$e](e);!t&&e?.defaultPrevented&&(this[ke]||function(e,t){if(!e)return!0;let r;for(const t of e.elements)if(t.matches(":invalid")){r=t;break}return r===t}(this[W].form,this))&&this.focus()}[$e](e){throw new Error("Implement [onReportValidity]")}formAssociatedCallback(e){super.formAssociatedCallback&&super.formAssociatedCallback(e),this[Ae].abort(),e&&(this[Ae]=new AbortController,function(e,t,r,o){const a=function(e){if(!Fe.has(e)){const t=new EventTarget;Fe.set(e,t);for(const r of["reportValidity","requestSubmit"]){const o=e[r];e[r]=function(){t.dispatchEvent(new Event("before"));const e=Reflect.apply(o,this,arguments);return t.dispatchEvent(new Event("after")),e}}}return Fe.get(e)}(t);let n,l=!1,s=!1;a.addEventListener("before",(()=>{s=!0,n=new AbortController,l=!1,e.addEventListener("invalid",(()=>{l=!0}),{signal:n.signal})}),{signal:o}),a.addEventListener("after",(()=>{s=!1,n?.abort(),l||r()}),{signal:o}),t.addEventListener("submit",(()=>{s||r()}),{signal:o})}(this,e,(()=>{this[ze](null)}),this[Ae].signal))}}return OnReportValidityElement}(function(e){var t;class ConstraintValidationElement extends e{constructor(){super(...arguments),this[t]=""}get validity(){return this[_e](),this[W].validity}get validationMessage(){return this[_e](),this[W].validationMessage}get willValidate(){return this[_e](),this[W].willValidate}checkValidity(){return this[_e](),this[W].checkValidity()}reportValidity(){return this[_e](),this[W].reportValidity()}setCustomValidity(e){this[we]=e,this[_e]()}requestUpdate(e,t,r){super.requestUpdate(e,t,r),this[_e]()}firstUpdated(e){super.firstUpdated(e),this[_e]()}[(t=we,_e)](){this[ye]||(this[ye]=this[ge]());const{validity:e,validationMessage:t}=this[ye].getValidity(),r=!!this[we],o=this[we]||t;this[W].setValidity({...e,customError:r},o,this[xe]()??void 0)}[ge](){throw new Error("Implement [createValidator]")}[xe](){throw new Error("Implement [getValidityAnchor]")}}return ConstraintValidationElement}(function(t){class FormAssociatedElement extends t{get form(){return this[W].form}get labels(){return this[W].labels}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get disabled(){return this.hasAttribute("disabled")}set disabled(e){this.toggleAttribute("disabled",e)}attributeChangedCallback(e,t,r){if("name"!==e&&"disabled"!==e)super.attributeChangedCallback(e,t,r);else{const r="disabled"===e?null!==t:t;this.requestUpdate(e,r)}}requestUpdate(e,t,r){super.requestUpdate(e,t,r),this[W].setFormValue(this[Ce](),this[Te]())}[Ce](){throw new Error("Implement [getFormValue]")}[Te](){return this[Ce]()}formDisabledCallback(e){this.disabled=e}}return FormAssociatedElement.formAssociated=!0,e([c({noAccessor:!0})],FormAssociatedElement.prototype,"name",null),e([c({type:Boolean,noAccessor:!0})],FormAssociatedElement.prototype,"disabled",null),FormAssociatedElement}(K(u))));class TextField extends Le{constructor(){super(...arguments),this.error=!1,this.errorText="",this.label="",this.required=!1,this.value="",this.prefixText="",this.suffixText="",this.hasLeadingIcon=!1,this.hasTrailingIcon=!1,this.supportingText="",this.textDirection="",this.rows=2,this.cols=20,this.inputMode="",this.max="",this.maxLength=-1,this.min="",this.minLength=-1,this.noSpinner=!1,this.pattern="",this.placeholder="",this.readOnly=!1,this.multiple=!1,this.step="",this.type="text",this.autocomplete="",this.dirty=!1,this.focused=!1,this.nativeError=!1,this.nativeErrorText=""}get selectionDirection(){return this.getInputOrTextarea().selectionDirection}set selectionDirection(e){this.getInputOrTextarea().selectionDirection=e}get selectionEnd(){return this.getInputOrTextarea().selectionEnd}set selectionEnd(e){this.getInputOrTextarea().selectionEnd=e}get selectionStart(){return this.getInputOrTextarea().selectionStart}set selectionStart(e){this.getInputOrTextarea().selectionStart=e}get valueAsNumber(){const e=this.getInput();return e?e.valueAsNumber:NaN}set valueAsNumber(e){const t=this.getInput();t&&(t.valueAsNumber=e,this.value=t.value)}get valueAsDate(){const e=this.getInput();return e?e.valueAsDate:null}set valueAsDate(e){const t=this.getInput();t&&(t.valueAsDate=e,this.value=t.value)}get hasError(){return this.error||this.nativeError}select(){this.getInputOrTextarea().select()}setRangeText(...e){this.getInputOrTextarea().setRangeText(...e),this.value=this.getInputOrTextarea().value}setSelectionRange(e,t,r){this.getInputOrTextarea().setSelectionRange(e,t,r)}stepDown(e){const t=this.getInput();t&&(t.stepDown(e),this.value=t.value)}stepUp(e){const t=this.getInput();t&&(t.stepUp(e),this.value=t.value)}reset(){this.dirty=!1,this.value=this.getAttribute("value")??"",this.nativeError=!1,this.nativeErrorText=""}attributeChangedCallback(e,t,r){"value"===e&&this.dirty||super.attributeChangedCallback(e,t,r)}render(){const e={disabled:this.disabled,error:!this.disabled&&this.hasError,textarea:"textarea"===this.type,"no-spinner":this.noSpinner};return p`
|
|
306
|
+
<span class="text-field ${B(e)}">
|
|
307
307
|
${this.renderField()}
|
|
308
308
|
</span>
|
|
309
|
-
`}updated(e){const t=this.getInputOrTextarea().value;this.value!==t&&(this.value=t)}renderField(){return
|
|
309
|
+
`}updated(e){const t=this.getInputOrTextarea().value;this.value!==t&&(this.value=t)}renderField(){return ce`<${this.fieldTag}
|
|
310
310
|
class="field"
|
|
311
311
|
count=${this.value.length}
|
|
312
312
|
?disabled=${this.disabled}
|
|
@@ -326,50 +326,50 @@ class Validator{constructor(e){this.getCurrentState=e,this.currentValidity={vali
|
|
|
326
326
|
${this.renderInputOrTextarea()}
|
|
327
327
|
${this.renderTrailingIcon()}
|
|
328
328
|
<div id="description" slot="aria-describedby"></div>
|
|
329
|
-
</${this.fieldTag}>`}renderLeadingIcon(){return
|
|
329
|
+
</${this.fieldTag}>`}renderLeadingIcon(){return p`
|
|
330
330
|
<span class="icon leading" slot="start">
|
|
331
331
|
<slot name="leading-icon" @slotchange=${this.handleIconChange}></slot>
|
|
332
332
|
</span>
|
|
333
|
-
`}renderTrailingIcon(){return
|
|
333
|
+
`}renderTrailingIcon(){return p`
|
|
334
334
|
<span class="icon trailing" slot="end">
|
|
335
335
|
<slot name="trailing-icon" @slotchange=${this.handleIconChange}></slot>
|
|
336
336
|
</span>
|
|
337
|
-
`}renderInputOrTextarea(){const e={direction:this.textDirection},t=this.ariaLabel||this.label||f,
|
|
337
|
+
`}renderInputOrTextarea(){const e={direction:this.textDirection},t=this.ariaLabel||this.label||f,r=this.autocomplete,o=(this.maxLength??-1)>-1,a=(this.minLength??-1)>-1;if("textarea"===this.type)return p`
|
|
338
338
|
<textarea
|
|
339
339
|
class="input"
|
|
340
|
-
style=${
|
|
340
|
+
style=${fe(e)}
|
|
341
341
|
aria-describedby="description"
|
|
342
342
|
aria-invalid=${this.hasError}
|
|
343
343
|
aria-label=${t}
|
|
344
|
-
autocomplete=${
|
|
344
|
+
autocomplete=${r||f}
|
|
345
345
|
?disabled=${this.disabled}
|
|
346
|
-
maxlength=${
|
|
346
|
+
maxlength=${o?this.maxLength:f}
|
|
347
347
|
minlength=${a?this.minLength:f}
|
|
348
348
|
placeholder=${this.placeholder||f}
|
|
349
349
|
?readonly=${this.readOnly}
|
|
350
350
|
?required=${this.required}
|
|
351
351
|
rows=${this.rows}
|
|
352
352
|
cols=${this.cols}
|
|
353
|
-
.value=${
|
|
353
|
+
.value=${he(this.value)}
|
|
354
354
|
@change=${this.redispatchEvent}
|
|
355
355
|
@focus=${this.handleFocusChange}
|
|
356
356
|
@blur=${this.handleFocusChange}
|
|
357
357
|
@input=${this.handleInput}
|
|
358
358
|
@select=${this.redispatchEvent}></textarea>
|
|
359
|
-
`;const n=this.renderPrefix(),
|
|
359
|
+
`;const n=this.renderPrefix(),l=this.renderSuffix(),s=this.inputMode;return p`
|
|
360
360
|
<div class="input-wrapper">
|
|
361
361
|
${n}
|
|
362
362
|
<input
|
|
363
363
|
class="input"
|
|
364
|
-
style=${
|
|
364
|
+
style=${fe(e)}
|
|
365
365
|
aria-describedby="description"
|
|
366
366
|
aria-invalid=${this.hasError}
|
|
367
367
|
aria-label=${t}
|
|
368
|
-
autocomplete=${
|
|
368
|
+
autocomplete=${r||f}
|
|
369
369
|
?disabled=${this.disabled}
|
|
370
|
-
inputmode=${
|
|
370
|
+
inputmode=${s||f}
|
|
371
371
|
max=${this.max||f}
|
|
372
|
-
maxlength=${
|
|
372
|
+
maxlength=${o?this.maxLength:f}
|
|
373
373
|
min=${this.min||f}
|
|
374
374
|
minlength=${a?this.minLength:f}
|
|
375
375
|
pattern=${this.pattern||f}
|
|
@@ -379,46 +379,46 @@ class Validator{constructor(e){this.getCurrentState=e,this.currentValidity={vali
|
|
|
379
379
|
?multiple=${this.multiple}
|
|
380
380
|
step=${this.step||f}
|
|
381
381
|
type=${this.type}
|
|
382
|
-
.value=${
|
|
382
|
+
.value=${he(this.value)}
|
|
383
383
|
@change=${this.redispatchEvent}
|
|
384
384
|
@focus=${this.handleFocusChange}
|
|
385
385
|
@blur=${this.handleFocusChange}
|
|
386
386
|
@input=${this.handleInput}
|
|
387
387
|
@select=${this.redispatchEvent} />
|
|
388
|
-
${
|
|
388
|
+
${l}
|
|
389
389
|
</div>
|
|
390
|
-
`}renderPrefix(){return this.renderAffix(this.prefixText,!1)}renderSuffix(){return this.renderAffix(this.suffixText,!0)}renderAffix(e,t){if(!e)return f;return
|
|
390
|
+
`}renderPrefix(){return this.renderAffix(this.prefixText,!1)}renderSuffix(){return this.renderAffix(this.suffixText,!0)}renderAffix(e,t){if(!e)return f;return p`<span class="${B({suffix:t,prefix:!t})}">${e}</span>`}getErrorText(){return this.error?this.errorText:this.nativeErrorText}handleFocusChange(){this.focused=this.inputOrTextarea?.matches(":focus")??!1}handleInput(e){this.dirty=!0,this.value=e.target.value}redispatchEvent(e){!
|
|
391
391
|
/**
|
|
392
392
|
* @license
|
|
393
393
|
* Copyright 2021 Google LLC
|
|
394
394
|
* SPDX-License-Identifier: Apache-2.0
|
|
395
395
|
*/
|
|
396
|
-
function(e,t){!t.bubbles||e.shadowRoot&&!t.composed||t.stopPropagation();const
|
|
396
|
+
function(e,t){!t.bubbles||e.shadowRoot&&!t.composed||t.stopPropagation();const r=Reflect.construct(t.constructor,[t.type,t]),o=e.dispatchEvent(r);o||t.preventDefault()}(this,e)}getInputOrTextarea(){return this.inputOrTextarea||(this.connectedCallback(),this.scheduleUpdate()),this.isUpdatePending&&this.scheduleUpdate(),this.inputOrTextarea}getInput(){return"textarea"===this.type?null:this.getInputOrTextarea()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0,this.hasTrailingIcon=this.trailingIcons.length>0}[Ce](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}focus(){this.getInputOrTextarea().focus()}[ge](){return new TextFieldValidator((()=>({state:this,renderedControl:this.inputOrTextarea})))}[xe](){return this.inputOrTextarea}[$e](e){e?.preventDefault();const t=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,t===this.getErrorText()&&this.field?.reannounceError()}}H(TextField),TextField.shadowRootOptions={...u.shadowRootOptions,delegatesFocus:!0},e([c({type:Boolean,reflect:!0})],TextField.prototype,"error",void 0),e([c({attribute:"error-text"})],TextField.prototype,"errorText",void 0),e([c()],TextField.prototype,"label",void 0),e([c({type:Boolean,reflect:!0})],TextField.prototype,"required",void 0),e([c()],TextField.prototype,"value",void 0),e([c({attribute:"prefix-text"})],TextField.prototype,"prefixText",void 0),e([c({attribute:"suffix-text"})],TextField.prototype,"suffixText",void 0),e([c({type:Boolean,attribute:"has-leading-icon"})],TextField.prototype,"hasLeadingIcon",void 0),e([c({type:Boolean,attribute:"has-trailing-icon"})],TextField.prototype,"hasTrailingIcon",void 0),e([c({attribute:"supporting-text"})],TextField.prototype,"supportingText",void 0),e([c({attribute:"text-direction"})],TextField.prototype,"textDirection",void 0),e([c({type:Number})],TextField.prototype,"rows",void 0),e([c({type:Number})],TextField.prototype,"cols",void 0),e([c({reflect:!0})],TextField.prototype,"inputMode",void 0),e([c()],TextField.prototype,"max",void 0),e([c({type:Number})],TextField.prototype,"maxLength",void 0),e([c()],TextField.prototype,"min",void 0),e([c({type:Number})],TextField.prototype,"minLength",void 0),e([c({type:Boolean,attribute:"no-spinner"})],TextField.prototype,"noSpinner",void 0),e([c()],TextField.prototype,"pattern",void 0),e([c({reflect:!0,converter:be})],TextField.prototype,"placeholder",void 0),e([c({type:Boolean,reflect:!0})],TextField.prototype,"readOnly",void 0),e([c({type:Boolean,reflect:!0})],TextField.prototype,"multiple",void 0),e([c()],TextField.prototype,"step",void 0),e([c({reflect:!0})],TextField.prototype,"type",void 0),e([c({reflect:!0})],TextField.prototype,"autocomplete",void 0),e([y()],TextField.prototype,"dirty",void 0),e([y()],TextField.prototype,"focused",void 0),e([y()],TextField.prototype,"nativeError",void 0),e([y()],TextField.prototype,"nativeErrorText",void 0),e([w(".input")],TextField.prototype,"inputOrTextarea",void 0),e([w(".field")],TextField.prototype,"field",void 0),e([C({slot:"leading-icon"})],TextField.prototype,"leadingIcons",void 0),e([C({slot:"trailing-icon"})],TextField.prototype,"trailingIcons",void 0);
|
|
397
397
|
/**
|
|
398
398
|
* @license
|
|
399
399
|
* Copyright 2021 Google LLC
|
|
400
400
|
* SPDX-License-Identifier: Apache-2.0
|
|
401
401
|
*/
|
|
402
|
-
class OutlinedTextField extends TextField{constructor(){super(...arguments),this.fieldTag=
|
|
402
|
+
class OutlinedTextField extends TextField{constructor(){super(...arguments),this.fieldTag=se`md-outlined-field`}}
|
|
403
403
|
/**
|
|
404
404
|
* @license
|
|
405
405
|
* Copyright 2022 Google LLC
|
|
406
406
|
* SPDX-License-Identifier: Apache-2.0
|
|
407
|
-
*/const
|
|
407
|
+
*/const Se=h`:host{display:inline-flex;outline:none;resize:both;-webkit-tap-highlight-color:rgba(0,0,0,0)}.text-field,.field{width:100%}.text-field{display:inline-flex}.field{cursor:text}.disabled .field{cursor:default}.text-field,.textarea .field{resize:inherit}.icon{color:currentColor;display:flex;fill:currentColor}.icon ::slotted(*){display:flex}[hasstart] .icon.leading{font-size:var(--_leading-icon-size);height:var(--_leading-icon-size);width:var(--_leading-icon-size)}[hasend] .icon.trailing{font-size:var(--_trailing-icon-size);height:var(--_trailing-icon-size);width:var(--_trailing-icon-size)}.input-wrapper{display:flex}.input-wrapper>*{all:inherit;padding:0}.input{caret-color:var(--_caret-color);overflow-x:hidden;text-align:inherit}.input::placeholder{color:currentColor;opacity:1}.input::-webkit-calendar-picker-indicator{display:none}.input::-webkit-search-decoration,.input::-webkit-search-cancel-button{display:none}@media(forced-colors: active){.input{background:none}}.no-spinner .input::-webkit-inner-spin-button,.no-spinner .input::-webkit-outer-spin-button{display:none}.no-spinner .input[type=number]{-moz-appearance:textfield}:focus-within .input{caret-color:var(--_focus-caret-color)}.error:focus-within .input{caret-color:var(--_error-focus-caret-color)}.text-field:not(.disabled) .prefix{color:var(--_input-text-prefix-color)}.text-field:not(.disabled) .suffix{color:var(--_input-text-suffix-color)}.text-field:not(.disabled) .input::placeholder{color:var(--_input-text-placeholder-color)}.prefix,.suffix{text-wrap:nowrap;width:min-content}.prefix{padding-inline-end:var(--_input-text-prefix-trailing-space)}.suffix{padding-inline-start:var(--_input-text-suffix-leading-space)}/*# sourceMappingURL=shared-styles.css.map */
|
|
408
408
|
`
|
|
409
409
|
/**
|
|
410
410
|
* @license
|
|
411
411
|
* Copyright 2021 Google LLC
|
|
412
412
|
* SPDX-License-Identifier: Apache-2.0
|
|
413
|
-
*/;let
|
|
413
|
+
*/;let Re=class MdOutlinedTextField extends OutlinedTextField{constructor(){super(...arguments),this.fieldTag=se`md-outlined-field`}};Re.styles=[Se,ue],Re=e([v("md-outlined-text-field")],Re);
|
|
414
414
|
/**
|
|
415
415
|
* @license
|
|
416
416
|
* Copyright 2023 Google LLC
|
|
417
417
|
* SPDX-License-Identifier: Apache-2.0
|
|
418
418
|
*/
|
|
419
|
-
class Progress extends u{constructor(){super(...arguments),this.value=0,this.max=1,this.indeterminate=!1,this.fourColor=!1}render(){const{ariaLabel:e}=this;return
|
|
419
|
+
class Progress extends u{constructor(){super(...arguments),this.value=0,this.max=1,this.indeterminate=!1,this.fourColor=!1}render(){const{ariaLabel:e}=this;return p`
|
|
420
420
|
<div
|
|
421
|
-
class="progress ${
|
|
421
|
+
class="progress ${B(this.getRenderClasses())}"
|
|
422
422
|
role="progressbar"
|
|
423
423
|
aria-label="${e||f}"
|
|
424
424
|
aria-valuemin="0"
|
|
@@ -426,13 +426,13 @@ class Progress extends u{constructor(){super(...arguments),this.value=0,this.max
|
|
|
426
426
|
aria-valuenow=${this.indeterminate?f:this.value}
|
|
427
427
|
>${this.renderIndicator()}</div
|
|
428
428
|
>
|
|
429
|
-
`}getRenderClasses(){return{indeterminate:this.indeterminate,"four-color":this.fourColor}}}
|
|
429
|
+
`}getRenderClasses(){return{indeterminate:this.indeterminate,"four-color":this.fourColor}}}H(Progress),e([c({type:Number})],Progress.prototype,"value",void 0),e([c({type:Number})],Progress.prototype,"max",void 0),e([c({type:Boolean})],Progress.prototype,"indeterminate",void 0),e([c({type:Boolean,attribute:"four-color"})],Progress.prototype,"fourColor",void 0);
|
|
430
430
|
/**
|
|
431
431
|
* @license
|
|
432
432
|
* Copyright 2023 Google LLC
|
|
433
433
|
* SPDX-License-Identifier: Apache-2.0
|
|
434
434
|
*/
|
|
435
|
-
class CircularProgress extends Progress{renderIndicator(){return this.indeterminate?this.renderIndeterminateContainer():this.renderDeterminateContainer()}renderDeterminateContainer(){const e=100*(1-this.value/this.max);return
|
|
435
|
+
class CircularProgress extends Progress{renderIndicator(){return this.indeterminate?this.renderIndeterminateContainer():this.renderDeterminateContainer()}renderDeterminateContainer(){const e=100*(1-this.value/this.max);return p`
|
|
436
436
|
<svg viewBox="0 0 4800 4800">
|
|
437
437
|
<circle class="track" pathLength="100"></circle>
|
|
438
438
|
<circle
|
|
@@ -440,7 +440,7 @@ class CircularProgress extends Progress{renderIndicator(){return this.indetermin
|
|
|
440
440
|
pathLength="100"
|
|
441
441
|
stroke-dashoffset=${e}></circle>
|
|
442
442
|
</svg>
|
|
443
|
-
`}renderIndeterminateContainer(){return
|
|
443
|
+
`}renderIndeterminateContainer(){return p` <div class="spinner">
|
|
444
444
|
<div class="left">
|
|
445
445
|
<div class="circle"></div>
|
|
446
446
|
</div>
|
|
@@ -452,375 +452,13 @@ class CircularProgress extends Progress{renderIndicator(){return this.indetermin
|
|
|
452
452
|
* @license
|
|
453
453
|
* Copyright 2022 Google LLC
|
|
454
454
|
* SPDX-License-Identifier: Apache-2.0
|
|
455
|
-
*/const
|
|
455
|
+
*/const Oe=h`:host{--_active-indicator-color: var(--md-circular-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-width: var(--md-circular-progress-active-indicator-width, 10);--_four-color-active-indicator-four-color: var(--md-circular-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-circular-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-circular-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-circular-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_size: var(--md-circular-progress-size, 48px);display:inline-flex;vertical-align:middle;width:var(--_size);height:var(--_size);position:relative;align-items:center;justify-content:center;contain:strict;content-visibility:auto}.progress{flex:1;align-self:stretch;margin:4px}.progress,.spinner,.left,.right,.circle,svg,.track,.active-track{position:absolute;inset:0}svg{transform:rotate(-90deg)}circle{cx:50%;cy:50%;r:calc(50%*(1 - var(--_active-indicator-width)/100));stroke-width:calc(var(--_active-indicator-width)*1%);stroke-dasharray:100;fill:rgba(0,0,0,0)}.active-track{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1);stroke:var(--_active-indicator-color)}.track{stroke:rgba(0,0,0,0)}.progress.indeterminate{animation:linear infinite linear-rotate;animation-duration:1568.2352941176ms}.spinner{animation:infinite both rotate-arc;animation-duration:5332ms;animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.left{overflow:hidden;inset:0 50% 0 0}.right{overflow:hidden;inset:0 0 0 50%}.circle{box-sizing:border-box;border-radius:50%;border:solid calc(var(--_active-indicator-width)/100*(var(--_size) - 8px));border-color:var(--_active-indicator-color) var(--_active-indicator-color) rgba(0,0,0,0) rgba(0,0,0,0);animation:expand-arc;animation-iteration-count:infinite;animation-fill-mode:both;animation-duration:1333ms,5332ms;animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.four-color .circle{animation-name:expand-arc,four-color}.left .circle{rotate:135deg;inset:0 -100% 0 0}.right .circle{rotate:100deg;inset:0 0 0 -100%;animation-delay:-666.5ms,0ms}@media(forced-colors: active){.active-track{stroke:CanvasText}.circle{border-color:CanvasText CanvasText Canvas Canvas}}@keyframes expand-arc{0%{transform:rotate(265deg)}50%{transform:rotate(130deg)}100%{transform:rotate(265deg)}}@keyframes rotate-arc{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes linear-rotate{to{transform:rotate(360deg)}}@keyframes four-color{0%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}15%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}25%{border-top-color:var(--_four-color-active-indicator-two-color);border-right-color:var(--_four-color-active-indicator-two-color)}40%{border-top-color:var(--_four-color-active-indicator-two-color);border-right-color:var(--_four-color-active-indicator-two-color)}50%{border-top-color:var(--_four-color-active-indicator-three-color);border-right-color:var(--_four-color-active-indicator-three-color)}65%{border-top-color:var(--_four-color-active-indicator-three-color);border-right-color:var(--_four-color-active-indicator-three-color)}75%{border-top-color:var(--_four-color-active-indicator-four-color);border-right-color:var(--_four-color-active-indicator-four-color)}90%{border-top-color:var(--_four-color-active-indicator-four-color);border-right-color:var(--_four-color-active-indicator-four-color)}100%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}}/*# sourceMappingURL=circular-progress-styles.css.map */
|
|
456
456
|
`
|
|
457
457
|
/**
|
|
458
458
|
* @license
|
|
459
459
|
* Copyright 2023 Google LLC
|
|
460
460
|
* SPDX-License-Identifier: Apache-2.0
|
|
461
|
-
*/;let
|
|
462
|
-
/**
|
|
463
|
-
* @license
|
|
464
|
-
* Copyright 2022 Google LLC
|
|
465
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
466
|
-
*/
|
|
467
|
-
(()=>{let e,o,r,l=[t("custom-elevation")],d=[],c=s,u=[],h=[];(class extends c{static{o=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(c[Symbol.metadata]??null):void 0;r=[a({type:Number,renders:!1})],Ne(this,null,r,{kind:"accessor",name:"level",static:!1,private:!1,access:{has:e=>"level"in e,get:e=>e.level,set:(e,t)=>{e.level=t}},metadata:t},u,h),Ne(null,e={value:o},l,{kind:"class",name:o.name,metadata:t},null,d),o=e.value,t&&Object.defineProperty(o,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t}),Me(o,d)}#e=Me(this,u,void 0);get level(){return this.#e}set level(e){this.#e=e}onChange(e,t){"level"===e&&this.style.setProperty("--md-elevation-level",String(t))}render(){return n`
|
|
468
|
-
<style>
|
|
469
|
-
:host {
|
|
470
|
-
--_level: var(--md-elevation-level, 0);
|
|
471
|
-
--_shadow-color: var(--md-sys-color-shadow);
|
|
472
|
-
display: flex;
|
|
473
|
-
pointer-events: none;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
:host,
|
|
477
|
-
.shadow,
|
|
478
|
-
.shadow::before,
|
|
479
|
-
.shadow::after {
|
|
480
|
-
border-radius: inherit;
|
|
481
|
-
inset: 0;
|
|
482
|
-
position: absolute;
|
|
483
|
-
transition-duration: inherit;
|
|
484
|
-
transition-timing-function: inherit;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
.shadow::before,
|
|
488
|
-
.shadow::after {
|
|
489
|
-
content: '';
|
|
490
|
-
transition-property: box-shadow, opacity;
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
.shadow::before {
|
|
494
|
-
box-shadow: 0px
|
|
495
|
-
calc(
|
|
496
|
-
1px * (clamp(0, var(--_level), 1) + clamp(0, var(--_level) - 3, 1) + 2 * clamp(0, var(--_level) - 4, 1))
|
|
497
|
-
)
|
|
498
|
-
calc(
|
|
499
|
-
1px * (2 * clamp(0, var(--_level), 1) + clamp(0, var(--_level) - 2, 1) + clamp(0, var(--_level) - 4, 1))
|
|
500
|
-
)
|
|
501
|
-
0px var(--_shadow-color);
|
|
502
|
-
opacity: 0.3;
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
.shadow::after {
|
|
506
|
-
box-shadow: 0px
|
|
507
|
-
calc(
|
|
508
|
-
1px * (clamp(0, var(--_level), 1) + clamp(0, var(--_level) - 1, 1) + 2 * clamp(0, var(--_level) - 2, 3))
|
|
509
|
-
)
|
|
510
|
-
calc(1px * (3 * clamp(0, var(--_level), 2) + 2 * clamp(0, var(--_level) - 2, 3)))
|
|
511
|
-
calc(1px * (clamp(0, var(--_level), 4) + 2 * clamp(0, var(--_level) - 4, 1))) var(--_shadow-color);
|
|
512
|
-
opacity: 0.15;
|
|
513
|
-
}
|
|
514
|
-
</style>
|
|
515
|
-
|
|
516
|
-
<span class="shadow"></span>
|
|
517
|
-
`}constructor(){super(...arguments),Me(this,h)}})})(),globalThis.pubsub=globalThis.pubsub||new y(!0),(()=>{let e,o,r,d,c,u,h=[t("custom-icon")],p=[],m=s,v=[],f=[],b=[],g=[],y=[],x=[],_=[],w=[];(class extends m{static{o=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(m[Symbol.metadata]??null):void 0;r=[a()],d=[a({attribute:"icon"})],c=[a()],u=[a()],Ne(this,null,r,{kind:"accessor",name:"host",static:!1,private:!1,access:{has:e=>"host"in e,get:e=>e.host,set:(e,t)=>{e.host=t}},metadata:t},v,f),Ne(this,null,d,{kind:"accessor",name:"icon",static:!1,private:!1,access:{has:e=>"icon"in e,get:e=>e.icon,set:(e,t)=>{e.icon=t}},metadata:t},b,g),Ne(this,null,c,{kind:"accessor",name:"setName",static:!1,private:!1,access:{has:e=>"setName"in e,get:e=>e.setName,set:(e,t)=>{e.setName=t}},metadata:t},y,x),Ne(this,null,u,{kind:"accessor",name:"_icon",static:!1,private:!1,access:{has:e=>"_icon"in e,get:e=>e._icon,set:(e,t)=>{e._icon=t}},metadata:t},_,w),Ne(null,e={value:o},h,{kind:"class",name:o.name,metadata:t},null,p),o=e.value,t&&Object.defineProperty(o,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}#t=Me(this,v,void 0);get host(){return this.#t}set host(e){this.#t=e}#o=(Me(this,f),Me(this,b,this.innerHTML));get icon(){return this.#o}set icon(e){this.#o=e}#r=(Me(this,g),Me(this,y,void 0));get setName(){return this.#r}set setName(e){this.#r=e}#i=(Me(this,x),Me(this,_,void 0));get _icon(){return this.#i}set _icon(e){this.#i=e}onChange(e,t){"setName"===e&&(this.host=globalThis.pubsub.subscribers[`custom-icon-set-${t}-connected`]?.value,this.host||globalThis.pubsub.subscribe(`custom-icon-set-${t}-connected`,(e=>{e&&(this.host=e)}))),"icon"!==e&&"host"!==e||this.host&&this.icon&&(this._icon=this.host.getIcon(this.icon))}static styles=[l`
|
|
518
|
-
:host {
|
|
519
|
-
--__custom-icon-size: var(--custom-icon-size, 24px);
|
|
520
|
-
--custom-icon-color: var(--md-sys-color-on-surface);
|
|
521
|
-
display: flex;
|
|
522
|
-
height: var(--custom-icon-size, 24px);
|
|
523
|
-
width: var(--custom-icon-size, 24px);
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
svg {
|
|
527
|
-
fill: var(--custom-icon-color);
|
|
528
|
-
height: inherit;
|
|
529
|
-
width: inherit;
|
|
530
|
-
pointer-events: none;
|
|
531
|
-
}
|
|
532
|
-
`];connectedCallback(){this.setName=this.getAttribute("set-name")||"icons"}render(){return n` ${this._icon} `}constructor(){super(...arguments),Me(this,w)}static{Me(o,p)}})})(),(()=>{let e,o,r,d,c,u,h,p=[t("custom-dialog")],m=[],v=s,f=[],b=[],g=[],y=[],x=[],_=[],w=[],C=[],T=[],k=[];(class extends v{static{o=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(v[Symbol.metadata]??null):void 0;r=[a({type:Boolean,reflect:!0})],d=[a({type:Boolean,reflect:!0})],c=[a({type:Boolean,reflect:!0,attribute:"has-actions"})],u=[a({type:Boolean,reflect:!0,attribute:"has-header"})],h=[a({type:Boolean,reflect:!0,attribute:"has-hero"})],Ne(this,null,r,{kind:"accessor",name:"open",static:!1,private:!1,access:{has:e=>"open"in e,get:e=>e.open,set:(e,t)=>{e.open=t}},metadata:t},f,b),Ne(this,null,d,{kind:"accessor",name:"fullscreen",static:!1,private:!1,access:{has:e=>"fullscreen"in e,get:e=>e.fullscreen,set:(e,t)=>{e.fullscreen=t}},metadata:t},g,y),Ne(this,null,c,{kind:"accessor",name:"hasActions",static:!1,private:!1,access:{has:e=>"hasActions"in e,get:e=>e.hasActions,set:(e,t)=>{e.hasActions=t}},metadata:t},x,_),Ne(this,null,u,{kind:"accessor",name:"hasHeader",static:!1,private:!1,access:{has:e=>"hasHeader"in e,get:e=>e.hasHeader,set:(e,t)=>{e.hasHeader=t}},metadata:t},w,C),Ne(this,null,h,{kind:"accessor",name:"hasHero",static:!1,private:!1,access:{has:e=>"hasHero"in e,get:e=>e.hasHero,set:(e,t)=>{e.hasHero=t}},metadata:t},T,k),Ne(null,e={value:o},p,{kind:"class",name:o.name,metadata:t},null,m),o=e.value,t&&Object.defineProperty(o,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}#a=Me(this,f,void 0);get open(){return this.#a}set open(e){this.#a=e}#n=(Me(this,b),Me(this,g,void 0));get fullscreen(){return this.#n}set fullscreen(e){this.#n=e}#s=(Me(this,y),Me(this,x,void 0));get hasActions(){return this.#s}set hasActions(e){this.#s=e}#l=(Me(this,_),Me(this,w,void 0));get hasHeader(){return this.#l}set hasHeader(e){this.#l=e}#d=(Me(this,C),Me(this,T,void 0));get hasHero(){return this.#d}set hasHero(e){this.#d=e}connectedCallback(){const e=this.shadowRoot.querySelector('slot[name="actions"]');this.hasActions=0!==Array.from(e?.assignedNodes()||[]).length;let t=this.shadowRoot.querySelector('slot[name="header"]');const o=["title","header-start","header-end"];let r=0;for(;0===Array.from(t.assignedElements()).length&&r<o.length;)t=this.shadowRoot.querySelector(`slot[name="${o[r]}"]`),r+=1;this.hasHeader=0!==t.assignedElements().length;const a=this.shadowRoot.querySelector('slot[name="hero-icon"]');this.hashero=0!==Array.from(a?.assignedNodes()||[]).length}onChange(e,t){"open"===e&&(this.open?this.querySelector('[slot="actions"]')?.addEventListener("click",this._close):this.querySelector('[slot="actions"]')?.removeEventListener("click",this._close))}_close=(Me(this,k),e=>{const t=e.composedPath()[0];this.dispatchEvent(new CustomEvent("close",{detail:t.getAttribute("action")||"close"})),this.open=!1});static styles=[l`
|
|
533
|
-
:host {
|
|
534
|
-
position: absolute;
|
|
535
|
-
inset: 0;
|
|
536
|
-
display: flex;
|
|
537
|
-
flex-direction: column;
|
|
538
|
-
align-items: center;
|
|
539
|
-
justify-content: center;
|
|
540
|
-
pointer-events: none;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
.header {
|
|
544
|
-
height: 56px;
|
|
545
|
-
box-sizing: border-box;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
.scrim,
|
|
549
|
-
.dialog {
|
|
550
|
-
transition: var(--md-sys-motion-easing-emphasized-accelerate) 200ms opacity,
|
|
551
|
-
var(--md-sys-motion-easing-emphasized-accelerate) 200ms transform;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
.scrim {
|
|
555
|
-
position: absolute;
|
|
556
|
-
inset: 0;
|
|
557
|
-
background-color: var(--md-sys-color-scrim);
|
|
558
|
-
opacity: 0;
|
|
559
|
-
pointer-events: none;
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
dialog {
|
|
563
|
-
pointer-events: none;
|
|
564
|
-
border: none;
|
|
565
|
-
min-width: var('--custom-dialog-min-width', 280px);
|
|
566
|
-
max-width: var('--custom-dialog-max-width', 560px);
|
|
567
|
-
width: fit-content;
|
|
568
|
-
border-radius: var(--md-sys-shape-corner-extra-large);
|
|
569
|
-
background-color: var(--md-sys-color-surface-container-high);
|
|
570
|
-
color: var(--md-sys-color-on-surface);
|
|
571
|
-
padding: 24px;
|
|
572
|
-
box-sizing: border-box;
|
|
573
|
-
position: relative;
|
|
574
|
-
opacity: 0;
|
|
575
|
-
transform: scaleY(0.1);
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
.body {
|
|
579
|
-
overflow-y: auto;
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
:host([has-actions]) .body {
|
|
583
|
-
padding-top: 16px;
|
|
584
|
-
padding-bottom: 24px;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
:host([has-header][has-hero]) .header {
|
|
588
|
-
padding-top: 16px;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
slot[name='title']::slotted(*) {
|
|
592
|
-
font-family: var(--md-sys-typescale-title-large-font-family-name);
|
|
593
|
-
font-style: var(--md-sys-typescale-title-large-font-family-style);
|
|
594
|
-
font-weight: var(--md-sys-typescale-title-large-font-weight);
|
|
595
|
-
font-size: var(--md-sys-typescale-title-large-font-size);
|
|
596
|
-
letter-spacing: var(--md-sys-typescale-title-large-tracking);
|
|
597
|
-
line-height: var(--md-sys-typescale-title-large-height);
|
|
598
|
-
text-transform: var(--md-sys-typescale-title-large-text-transform);
|
|
599
|
-
text-decoration: var(--md-sys-typescale-title-large-text-decoration);
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
:host([has-hero]) slot[name='title']::slotted(*) {
|
|
603
|
-
padding-top: 16px;
|
|
604
|
-
position: absolute;
|
|
605
|
-
left: 50%;
|
|
606
|
-
transform: translateX(-50%);
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
:host([fullscreen]) slot[name='title']::slotted(*) {
|
|
610
|
-
padding-left: 16px;
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
:host(:not([fullscreen])) dialog {
|
|
614
|
-
align-items: center;
|
|
615
|
-
justify-content: center;
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
slot[name='supporting-text']::slotted(*) {
|
|
619
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
620
|
-
padding-bottom: 16px;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
slot[name='actions']::slotted(*) {
|
|
624
|
-
align-items: center;
|
|
625
|
-
justify-content: end;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
:host([open]) dialog,
|
|
629
|
-
:host([open]) .scrim {
|
|
630
|
-
pointer-events: auto;
|
|
631
|
-
opacity: 1;
|
|
632
|
-
transform: scaleY(1);
|
|
633
|
-
transition: var(--md-sys-motion-easing-emphasized-decelerate) 500ms opacity,
|
|
634
|
-
var(--md-sys-motion-easing-emphasized-decelerate) 500ms transform;
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
:host([open]) .scrim {
|
|
638
|
-
opacity: 0.44;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
:host([fullscreen]) slot[name='actions']::slotted(*) {
|
|
642
|
-
--custom-icon-size: 12px;
|
|
643
|
-
--custom-button-color: var(--md-sys-color-primary);
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
slot[name='actions'] {
|
|
647
|
-
align-items: flex-end;
|
|
648
|
-
}
|
|
649
|
-
`];render(){return n`
|
|
650
|
-
<span class="scrim" @click=${this._close}></span>
|
|
651
|
-
<dialog ?open=${this.open}>
|
|
652
|
-
<custom-elevation level=${this.fullscreen?0:3}></custom-elevation>
|
|
653
|
-
<slot name="hero-icon"></slot>
|
|
654
|
-
<slot name="supporting-text"></slot>
|
|
655
|
-
<slot name="header">
|
|
656
|
-
<flex-row class="header" center></flex-row>
|
|
657
|
-
<flex-row center style="width: 100%">
|
|
658
|
-
<slot name="header-start">
|
|
659
|
-
${this.fullscreen?n`<custom-button @click=${this._close}
|
|
660
|
-
><custom-icon slot="icon">close</custom-icon></custom-button
|
|
661
|
-
>`:""}
|
|
662
|
-
</slot>
|
|
663
|
-
<slot name="title"></slot>
|
|
664
|
-
<flex-it></flex-it>
|
|
665
|
-
<slot name="header-end">
|
|
666
|
-
${this.fullscreen?n`<slot name="actions"></slot>`:""}
|
|
667
|
-
${this.fullscreen?"":n`<custom-button @click=${this._close}
|
|
668
|
-
><custom-icon slot="icon">close</custom-icon></custom-button
|
|
669
|
-
>`}
|
|
670
|
-
</slot>
|
|
671
|
-
</flex-row>
|
|
672
|
-
</flex-row>
|
|
673
|
-
</slot>
|
|
674
|
-
<flex-column class="body">
|
|
675
|
-
<slot></slot>
|
|
676
|
-
</flex-column>
|
|
677
|
-
|
|
678
|
-
${this.fullscreen?"":n`<slot name="actions"></slot>`}
|
|
679
|
-
</dialog>
|
|
680
|
-
`}static{Me(o,m)}})})();class SelectBase extends s{#c;currentSelected;connectedCallback(){this.selected=this.defaultSelected}get multi(){return this.hasAttribute("multi")}set multi(e){e?this.setAttribute("multi",""):this.removeAttribute("multi")}get defaultSelected(){return this.getAttribute("default-selected")||0}set selected(e){this.#c=e,this.#u()}get selected(){return this.#c}get slotted(){return this.shadowRoot?this.shadowRoot.querySelector("slot"):this}get#h(){const e="assignedNodes"in this.slotted?this.slotted.assignedNodes():this.children,t=[];for(var o=0;o<e.length;o++){const r=e[o];1===r.nodeType&&t.push(r)}return t}get attrForSelected(){return this.getAttribute("attr-for-selected")||"name"}set attrForSelected(e){this.setAttribute("attr-for-selected",e)}attributeChangedCallback(e,t,o){t!==o&&(isNaN(o)||(o=Number(o)),this[e]=o)}select(e){e&&(this.selected=e),this.multi&&this.#u()}next(){const e=this.getIndexFor(this.currentSelected);-1!==e&&e>=0&&this.#h.length>e&&e+1<=this.#h.length-1&&(this.selected=this.#h[e+1])}previous(){const e=this.getIndexFor(this.currentSelected);-1!==e&&e>=0&&this.#h.length>e&&e-1>=0&&(this.selected=this.#h[e-1])}getIndexFor(e){return this.#h.indexOf(e||this.selected)}#p(e,t){e.classList.add("custom-selected"),t&&t!==e&&t.classList.remove("custom-selected"),this.currentSelected=e}#m(e){for(const t of this.#h)e.includes(t.getAttribute(this.attrForSelected))?t.classList.add("custom-selected"):t.classList.remove("custom-selected")}#v(e){for(const t of this.#h)if(t.getAttribute(this.attrForSelected)===e)return this.#p(t,this.currentSelected)}#u(){if(void 0===this.selected)return void(this.currentSelected&&this.currentSelected.classList.remove("custom-selected"));const e=typeof this.selected;if(Array.isArray(this.selected))return this.#m(this.selected);if("object"===e)return this.#p(this.selected,this.currentSelected);if("string"===e)return this.#v(this.selected);const t=this.#h[this.selected];t&&this.#p(t,this.currentSelected)}}class SelectorBase extends SelectBase{constructor(){super()}async connectedCallback(){super.connectedCallback&&await super.connectedCallback(),this.slotted.addEventListener("click",this.#f.bind(this))}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this.slotted.removeEventListener("click",this.#f.bind(this))}#f(e){const t=e.composedPath()[0];if(t.localName===this.localName)return;const o=t.getAttribute(this.attrForSelected)||t;if(this.multi){const e=Array.isArray(this.selected)?this.selected:[],t=e.indexOf(o);-1===t?e.push(o):e.splice(t,1),this.selected=e}else this.selected=o;this.dispatchEvent(new CustomEvent("selected",{detail:o}))}}(()=>{let e,o,r=[t("custom-tab")],a=[],l=s;(class extends l{static{o=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;Ne(null,e={value:o},r,{kind:"class",name:o.name,metadata:t},null,a),o=e.value,t&&Object.defineProperty(o,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t}),Me(o,a)}render(){return n`
|
|
681
|
-
<style>
|
|
682
|
-
:host {
|
|
683
|
-
display: flex;
|
|
684
|
-
align-items: center;
|
|
685
|
-
justify-content: center;
|
|
686
|
-
gap: 8px;
|
|
687
|
-
height: 40px;
|
|
688
|
-
padding: 0 12px;
|
|
689
|
-
box-sizing: border-box;
|
|
690
|
-
width: auto;
|
|
691
|
-
font: var(--_supporting-text-type);
|
|
692
|
-
cursor: pointer;
|
|
693
|
-
white-space: nowrap;
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
slot {
|
|
697
|
-
pointer-events: none;
|
|
698
|
-
}
|
|
699
|
-
</style>
|
|
700
|
-
<slot></slot>
|
|
701
|
-
`}})})(),(()=>{let e,o,r=[t("custom-tabs")],a=[],s=SelectorBase;(class extends s{static{o=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;Ne(null,e={value:o},r,{kind:"class",name:o.name,metadata:t},null,a),o=e.value,t&&Object.defineProperty(o,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t}),Me(o,a)}render(){return n`
|
|
702
|
-
<style>
|
|
703
|
-
:host {
|
|
704
|
-
--custom-tabs-background: var(---md-sys-color-surface);
|
|
705
|
-
--selected-color: var(--md-sys-color-primary);
|
|
706
|
-
--selected-tab-color: var(--md-sys-color-primary);
|
|
707
|
-
--custom-tabs-shape: var(--md-sys-shape-corner-none);
|
|
708
|
-
--inactive-color: var(--md-sys-color-on-surface-variant);
|
|
709
|
-
display: flex;
|
|
710
|
-
flex-direction: row;
|
|
711
|
-
min-height: var(--custom-tabs-height, 64px);
|
|
712
|
-
overflow-x: auto;
|
|
713
|
-
background: var(--custom-tabs-background);
|
|
714
|
-
border-radius: var(--custom-tabs-shape);
|
|
715
|
-
}
|
|
716
|
-
::slotted(*) {
|
|
717
|
-
color: var(--inactive-color);
|
|
718
|
-
}
|
|
719
|
-
::slotted(.custom-selected) {
|
|
720
|
-
color: var(--selected-color);
|
|
721
|
-
border-bottom: 2px solid var(--selected-tab-color);
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
:host([round]) ::slotted(*) {
|
|
725
|
-
gap: 0;
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
:host([round]) ::slotted(.custom-selected) {
|
|
729
|
-
--md-sys-color-on-surface: var(--md-sys-color-on-tertiary);
|
|
730
|
-
color: var(--md-sys-color-on-tertiary);
|
|
731
|
-
background: var(--md-sys-color-tertiary);
|
|
732
|
-
border: none;
|
|
733
|
-
border-radius: var(--md-sys-shape-corner-extra-large);
|
|
734
|
-
}
|
|
735
|
-
::-webkit-scrollbar {
|
|
736
|
-
width: 6px;
|
|
737
|
-
border-radius: 12px;
|
|
738
|
-
}
|
|
739
|
-
::-webkit-scrollbar-track {
|
|
740
|
-
background: #f1f1f1;
|
|
741
|
-
}
|
|
742
|
-
::-webkit-scrollbar-thumb {
|
|
743
|
-
background: #888;
|
|
744
|
-
border-radius: 12px;
|
|
745
|
-
}
|
|
746
|
-
::-webkit-scrollbar-thumb:hover {
|
|
747
|
-
background: #555;
|
|
748
|
-
}
|
|
749
|
-
</style>
|
|
750
|
-
<slot></slot>
|
|
751
|
-
`}})})(),(()=>{let e,o,r=[t("custom-selector")],a=[],s=SelectorBase;(class extends s{static{o=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;Ne(null,e={value:o},r,{kind:"class",name:o.name,metadata:t},null,a),o=e.value,t&&Object.defineProperty(o,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static styles=[l`
|
|
752
|
-
:host {
|
|
753
|
-
display: flex;
|
|
754
|
-
flex-direction: column;
|
|
755
|
-
width: 100%;
|
|
756
|
-
height: 100%;
|
|
757
|
-
overflow-y: auto;
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
::slotted(.custom-selected:not([non-interactive])) {
|
|
761
|
-
background: var(--md-sys-color-secondary-container);
|
|
762
|
-
color: var(--md-sys-color-on-secondary-container);
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
::slotted(*) {
|
|
766
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
767
|
-
font-family: var(--md-sys-typescale-label-large-font-family-name);
|
|
768
|
-
font-style: var(--md-sys-typescale-label-large-font-family-style);
|
|
769
|
-
font-weight: var(--md-sys-typescale-label-large-font-weight);
|
|
770
|
-
font-size: var(--md-sys-typescale-label-large-font-size);
|
|
771
|
-
letter-spacing: var(--md-sys-typescale-label-large-tracking);
|
|
772
|
-
line-height: var(--md-sys-typescale-label-large-height);
|
|
773
|
-
text-transform: var(--md-sys-typescale-label-large-text-transform);
|
|
774
|
-
text-decoration: var(--md-sys-typescale-label-large-text-decoration);
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
::slotted(:not(.custom-selected):not([non-interactive]):hover) {
|
|
778
|
-
background: var(--md-sys-color-secondary-container-hover);
|
|
779
|
-
color: var(--md-sys-color-on-secondary-container);
|
|
780
|
-
}
|
|
781
|
-
`];render(){return n`<slot></slot>`}static{Me(o,a)}})})();class CustomPages extends SelectBase{async connectedCallback(){super.connectedCallback&&await super.connectedCallback(),this.slotchange=this.slotchange.bind(this),this.shadowRoot.querySelector("slot").addEventListener("slotchange",this.slotchange),this.slotchange(),this.selected=this.defaultSelected}isEvenNumber(e){return Boolean(e%2==0)}slotchange(){let e=0;for(const t of this.slotted.assignedNodes())t&&1===t.nodeType&&(t.style.zIndex=99-e,this.isEvenNumber(e++)?t.classList.add("animate-down"):t.classList.add("animate-up"),this.dispatchEvent(new CustomEvent("child-change",{detail:t})))}static styles=[l`
|
|
782
|
-
:host {
|
|
783
|
-
flex: 1;
|
|
784
|
-
position: relative;
|
|
785
|
-
--primary-background-color: #eceff1;
|
|
786
|
-
overflow: hidden;
|
|
787
|
-
height: 100%;
|
|
788
|
-
width: 100%;
|
|
789
|
-
}
|
|
790
|
-
::slotted(*) {
|
|
791
|
-
display: flex;
|
|
792
|
-
position: absolute;
|
|
793
|
-
opacity: 0;
|
|
794
|
-
pointer-events: none;
|
|
795
|
-
top: 0;
|
|
796
|
-
left: 0;
|
|
797
|
-
right: 0;
|
|
798
|
-
bottom: 0;
|
|
799
|
-
transition: var(--md-sys-motion-easing-emphasized-accelerate) 200ms opacity,
|
|
800
|
-
var(--md-sys-motion-easing-emphasized-accelerate) 200ms transform;
|
|
801
|
-
/*transform: scale(0.1);*/
|
|
802
|
-
transform-origin: left;
|
|
803
|
-
}
|
|
804
|
-
::slotted(.animate-up) {
|
|
805
|
-
transform: translateY(-120%);
|
|
806
|
-
}
|
|
807
|
-
::slotted(.animate-down) {
|
|
808
|
-
transform: translateY(120%);
|
|
809
|
-
}
|
|
810
|
-
::slotted(.custom-selected) {
|
|
811
|
-
opacity: 1;
|
|
812
|
-
pointer-events: auto;
|
|
813
|
-
transform: translateY(0);
|
|
814
|
-
transition: var(--md-sys-motion-easing-emphasized-decelerate) 500ms width,
|
|
815
|
-
var(--md-sys-motion-easing-emphasized-decelerate) 500ms transform;
|
|
816
|
-
max-height: 100%;
|
|
817
|
-
max-width: 100%;
|
|
818
|
-
}
|
|
819
|
-
`];render(){return n`
|
|
820
|
-
<div class="wrapper">
|
|
821
|
-
<slot></slot>
|
|
822
|
-
</div>
|
|
823
|
-
`}}customElements.define("custom-pages",CustomPages);let De=(()=>{let e,c,u,h,p,m,v,f,y,_=[t("custom-upload-image")],w=[],C=x(s),T=[],k=[],S=[],$=[],A=[],E=[],z=[],F=[],L=[],I=[],R=[],O=[],P=[],B=[];return class extends C{static{c=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(C[Symbol.metadata]??null):void 0;u=[d("custom-pages")],h=[a({type:Array,consumes:!0})],p=[d("custom-tabs")],m=[a({type:Boolean,reflect:!0})],v=[a({type:Boolean})],f=[a({type:Boolean})],y=[a({type:Boolean,attribute:"has-library"})],o(this,null,u,{kind:"accessor",name:"pages",static:!1,private:!1,access:{has:e=>"pages"in e,get:e=>e.pages,set:(e,t)=>{e.pages=t}},metadata:t},T,k),o(this,null,h,{kind:"accessor",name:"images",static:!1,private:!1,access:{has:e=>"images"in e,get:e=>e.images,set:(e,t)=>{e.images=t}},metadata:t},S,$),o(this,null,p,{kind:"accessor",name:"selector",static:!1,private:!1,access:{has:e=>"selector"in e,get:e=>e.selector,set:(e,t)=>{e.selector=t}},metadata:t},A,E),o(this,null,m,{kind:"accessor",name:"open",static:!1,private:!1,access:{has:e=>"open"in e,get:e=>e.open,set:(e,t)=>{e.open=t}},metadata:t},z,F),o(this,null,v,{kind:"accessor",name:"frontCameraDisabled",static:!1,private:!1,access:{has:e=>"frontCameraDisabled"in e,get:e=>e.frontCameraDisabled,set:(e,t)=>{e.frontCameraDisabled=t}},metadata:t},L,I),o(this,null,f,{kind:"accessor",name:"rearCameraDisabled",static:!1,private:!1,access:{has:e=>"rearCameraDisabled"in e,get:e=>e.rearCameraDisabled,set:(e,t)=>{e.rearCameraDisabled=t}},metadata:t},R,O),o(this,null,y,{kind:"accessor",name:"hasLibrary",static:!1,private:!1,access:{has:e=>"hasLibrary"in e,get:e=>e.hasLibrary,set:(e,t)=>{e.hasLibrary=t}},metadata:t},P,B),o(null,e={value:c},_,{kind:"class",name:c.name,metadata:t},null,w),c=e.value,t&&Object.defineProperty(c,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}deviceApi=new g;#b=r(this,T,void 0);get pages(){return this.#b}set pages(e){this.#b=e}#g=(r(this,k),r(this,S,void 0));get images(){return this.#g}set images(e){this.#g=e}#y=(r(this,$),r(this,A,void 0));get selector(){return this.#y}set selector(e){this.#y=e}#a=(r(this,E),r(this,z,!1));get open(){return this.#a}set open(e){this.#a=e}#x=(r(this,F),r(this,L,!1));get frontCameraDisabled(){return this.#x}set frontCameraDisabled(e){this.#x=e}#_=(r(this,I),r(this,R,!1));get rearCameraDisabled(){return this.#_}set rearCameraDisabled(e){this.#_=e}#w=(r(this,O),r(this,P,void 0));get hasLibrary(){return this.#w}set hasLibrary(e){this.#w=e}static styles=[l`
|
|
461
|
+
*/;let Pe=class MdCircularProgress extends CircularProgress{};Pe.styles=[Oe],Pe=e([v("md-circular-progress")],Pe);let Be=(()=>{let e,c,u,p,h,v,m,f,y,_=[o("custom-upload-image")],w=[],C=x(s),T=[],$=[],A=[],E=[],k=[],z=[],F=[],I=[],L=[],S=[],R=[],O=[],P=[],B=[];return class extends C{static{c=this}static{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(C[Symbol.metadata]??null):void 0;u=[d("custom-pages")],p=[a({type:Array,consumes:!0})],h=[d("custom-tabs")],v=[a({type:Boolean,reflect:!0})],m=[a({type:Boolean})],f=[a({type:Boolean})],y=[a({type:Boolean,attribute:"has-library"})],t(this,null,u,{kind:"accessor",name:"pages",static:!1,private:!1,access:{has:e=>"pages"in e,get:e=>e.pages,set:(e,t)=>{e.pages=t}},metadata:r},T,$),t(this,null,p,{kind:"accessor",name:"images",static:!1,private:!1,access:{has:e=>"images"in e,get:e=>e.images,set:(e,t)=>{e.images=t}},metadata:r},A,E),t(this,null,h,{kind:"accessor",name:"selector",static:!1,private:!1,access:{has:e=>"selector"in e,get:e=>e.selector,set:(e,t)=>{e.selector=t}},metadata:r},k,z),t(this,null,v,{kind:"accessor",name:"open",static:!1,private:!1,access:{has:e=>"open"in e,get:e=>e.open,set:(e,t)=>{e.open=t}},metadata:r},F,I),t(this,null,m,{kind:"accessor",name:"frontCameraDisabled",static:!1,private:!1,access:{has:e=>"frontCameraDisabled"in e,get:e=>e.frontCameraDisabled,set:(e,t)=>{e.frontCameraDisabled=t}},metadata:r},L,S),t(this,null,f,{kind:"accessor",name:"rearCameraDisabled",static:!1,private:!1,access:{has:e=>"rearCameraDisabled"in e,get:e=>e.rearCameraDisabled,set:(e,t)=>{e.rearCameraDisabled=t}},metadata:r},R,O),t(this,null,y,{kind:"accessor",name:"hasLibrary",static:!1,private:!1,access:{has:e=>"hasLibrary"in e,get:e=>e.hasLibrary,set:(e,t)=>{e.hasLibrary=t}},metadata:r},P,B),t(null,e={value:c},_,{kind:"class",name:c.name,metadata:r},null,w),c=e.value,r&&Object.defineProperty(c,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})}deviceApi=new g;#e=r(this,T,void 0);get pages(){return this.#e}set pages(e){this.#e=e}#t=(r(this,$),r(this,A,void 0));get images(){return this.#t}set images(e){this.#t=e}#r=(r(this,E),r(this,k,void 0));get selector(){return this.#r}set selector(e){this.#r=e}#o=(r(this,z),r(this,F,!1));get open(){return this.#o}set open(e){this.#o=e}#i=(r(this,I),r(this,L,!1));get frontCameraDisabled(){return this.#i}set frontCameraDisabled(e){this.#i=e}#a=(r(this,S),r(this,R,!1));get rearCameraDisabled(){return this.#a}set rearCameraDisabled(e){this.#a=e}#n=(r(this,O),r(this,P,void 0));get hasLibrary(){return this.#n}set hasLibrary(e){this.#n=e}static styles=[n`
|
|
824
462
|
:host {
|
|
825
463
|
display: block;
|
|
826
464
|
}
|
|
@@ -913,10 +551,10 @@ class CircularProgress extends Progress{renderIndicator(){return this.indetermin
|
|
|
913
551
|
md-dialog {
|
|
914
552
|
--_container-color: #2d2f31;
|
|
915
553
|
}
|
|
916
|
-
`];get#
|
|
554
|
+
`];get#l(){return this.shadowRoot.querySelector("custom-dialog")}get#s(){return this.shadowRoot.querySelector(".camera-preview")}#d=(r(this,B),"user");#c={data:null,type:null};#u=async()=>{const e=await this.deviceApi.camera.takePhoto(this.#d);this.#c.data=await globalThis.readAsDataURL(e),this.#c.type="base64";const t=document.createElement("img");t.src=this.#c.data,this.shadowRoot.querySelector("flex-container").replaceChild(t.cloneNode(!0),this.#s)};#p=({})=>{const e=document.createElement("input");e.type="file",e.multiple=!0;const t=async r=>{const o=await Promise.all(Array.from(e.files).map((async e=>{const t=await this.readAsDataURL(e),r=document.createElement("md-list-item");return r.headline=e.name,r.setAttribute("noninteractive",""),r.innerHTML=`\n <img data-variant="icon" slot="start" src="${t}">\n <md-standard-icon-button slot="end"><custom-icon>delete</custom-icon></md-standard-icon-button>\n `,r.onclick=()=>{this.shadowRoot.querySelector('section[route="file"]').removeChild(r)},this.shadowRoot.querySelector('section[route="file"]').appendChild(r),{name:e.name,data:t}})));this.#c.data=o,this.#c.type="base64[]",e.removeEventListener("change",t)};e.addEventListener("change",t),e.click()};onChange(e,t){"open"===e&&t&&(this.hasLibrary?this.select("library"):this.select("url"))}select(e){this.selector.select(e)}#h=async({detail:e})=>{this.shadowRoot.querySelector("custom-pages").select(e),"camera"===e&&(this.frontCameraDisabled=!await this.deviceApi.hasFrontCam(),this.rearCameraDisabled=!await this.deviceApi.hasBackCam(),this.deviceApi.camera.preview(this.#s,this.#d))};#v=(e,t)=>{this.#c.data=t,this.#c.type="library"};show(){this.#l.open=!0}#m(){return l`
|
|
917
555
|
<form id="form-content" method="dialog">
|
|
918
|
-
<custom-tabs attr-for-selected="route" @selected=${this.#
|
|
919
|
-
${this.hasLibrary?
|
|
556
|
+
<custom-tabs attr-for-selected="route" @selected=${this.#h.bind(this)}>
|
|
557
|
+
${this.hasLibrary?l`
|
|
920
558
|
<custom-tab route="library">
|
|
921
559
|
<custom-icon>photo_library</custom-icon>
|
|
922
560
|
<span>library</span>
|
|
@@ -939,12 +577,12 @@ class CircularProgress extends Progress{renderIndicator(){return this.indetermin
|
|
|
939
577
|
<flex-it></flex-it>
|
|
940
578
|
</custom-tabs>
|
|
941
579
|
<custom-pages attr-for-selected="route">
|
|
942
|
-
${this.hasLibrary?
|
|
580
|
+
${this.hasLibrary?l`
|
|
943
581
|
<section route="library">
|
|
944
582
|
<flex-wrap-around>
|
|
945
|
-
${this.images.map((e=>
|
|
583
|
+
${this.images.map((e=>l`
|
|
946
584
|
<img
|
|
947
|
-
@click=${t=>this.#
|
|
585
|
+
@click=${t=>this.#v.call(this,t,e.firebaseKey)}
|
|
948
586
|
src=${`${location.origin}/api/image?image=${e.link.replace(".png","b.png")}`}
|
|
949
587
|
/>
|
|
950
588
|
`))}
|
|
@@ -967,7 +605,7 @@ class CircularProgress extends Progress{renderIndicator(){return this.indetermin
|
|
|
967
605
|
<flex-it flex="2"></flex-it>
|
|
968
606
|
|
|
969
607
|
<md-standard-icon-button
|
|
970
|
-
@click=${()=>this.#
|
|
608
|
+
@click=${()=>this.#d="user"}
|
|
971
609
|
?disabled=${this.frontCameraDisabled}
|
|
972
610
|
>
|
|
973
611
|
<custom-icon>photo_camera_front</custom-icon>
|
|
@@ -975,14 +613,14 @@ class CircularProgress extends Progress{renderIndicator(){return this.indetermin
|
|
|
975
613
|
|
|
976
614
|
<flex-it flex="1"></flex-it>
|
|
977
615
|
|
|
978
|
-
<md-standard-icon-button style="transform: scale(1.66);" @click=${this
|
|
616
|
+
<md-standard-icon-button style="transform: scale(1.66);" @click=${this.#u}>
|
|
979
617
|
<custom-icon>photo_camera</custom-icon>
|
|
980
618
|
</md-standard-icon-button>
|
|
981
619
|
|
|
982
620
|
<flex-it flex="1"></flex-it>
|
|
983
621
|
|
|
984
622
|
<md-standard-icon-button
|
|
985
|
-
@click=${()=>this.#
|
|
623
|
+
@click=${()=>this.#d="environment"}
|
|
986
624
|
?disabled=${this.rearCameraDisabled}
|
|
987
625
|
>
|
|
988
626
|
<custom-icon>photo_camera_back</custom-icon>
|
|
@@ -993,7 +631,7 @@ class CircularProgress extends Progress{renderIndicator(){return this.indetermin
|
|
|
993
631
|
</section>
|
|
994
632
|
|
|
995
633
|
<section route="file">
|
|
996
|
-
<md-filled-tonal-button @click=${this.#
|
|
634
|
+
<md-filled-tonal-button @click=${this.#p.bind(this)}>
|
|
997
635
|
<custom-icon slot="icon">upload</custom-icon>
|
|
998
636
|
select
|
|
999
637
|
</md-filled-tonal-button>
|
|
@@ -1006,7 +644,7 @@ class CircularProgress extends Progress{renderIndicator(){return this.indetermin
|
|
|
1006
644
|
<flex-one></flex-one>
|
|
1007
645
|
<md-text-button form="form-content" value="submit">submit</md-text-button>
|
|
1008
646
|
</flex-row>
|
|
1009
|
-
`}#
|
|
647
|
+
`}#f=()=>new Promise(((e,t)=>{const r=t=>{const o=Array.from(this.shadowRoot.querySelectorAll("[input-field]")),a={};for(const e of o)a[e.label]=e.value;if(!this.#c.type){const e=this.shadowRoot.querySelector("[input-field]");this.#c.type=e?"url":void 0,this.#c.data=e?.value}const n={type:this.#c.type,data:Array.isArray(this.#c.data)?[...this.#c.data]:this.#c.data};e({action:t.returnValue,fields:a,image:n}),this.#l.removeEventListener("closed",r),this.#c.data=null,this.#c.type=null,this.deviceApi.camera.close(),this.#l.close(),b(l``,this.#l)};this.#l.addEventListener("closed",r)}));#b(e,t){return l`
|
|
1010
648
|
<flex-row slot="title">
|
|
1011
649
|
<h5>${e}</h5>
|
|
1012
650
|
</flex-row>
|
|
@@ -1017,4 +655,4 @@ class CircularProgress extends Progress{renderIndicator(){return this.indetermin
|
|
|
1017
655
|
<md-circular-progress indeterminate></md-circular-progress>
|
|
1018
656
|
</flex-row>
|
|
1019
657
|
</flex-column>
|
|
1020
|
-
`}async addImage(){return b(this.#
|
|
658
|
+
`}async addImage(){return b(this.#m(),this.#l),this.show(),this.#f()}async busy(e,t){b(this.#b(e,t),this.#l),this.show()}close(){this.#l.open=!1}render(){return l` <custom-dialog .open=${this.open}></custom-dialog> `}static{r(c,w)}},c})();export{Be as CustomUploadImage};
|