@vandeurenglenn/lite-elements 0.3.31 → 0.3.32
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/apis/device.d.ts +33 -0
- package/exports/bundle/banner.js +1 -1
- package/exports/bundle/button.js +1 -1
- package/exports/bundle/card.js +1 -1
- package/exports/bundle/code.js +1 -1
- package/exports/bundle/custom-element-BOdKJYdz.js +1 -0
- package/exports/bundle/demo-elements.js +1 -1
- package/exports/bundle/demo-icons.js +1 -1
- package/exports/bundle/demo-shell.js +1 -1
- package/exports/bundle/demo.js +1 -1
- package/exports/bundle/device.js +1 -0
- package/exports/bundle/dialog.js +1 -1
- package/exports/bundle/divider.js +1 -1
- package/exports/bundle/drawer-button.js +1 -1
- package/exports/bundle/drawer-item.js +1 -1
- package/exports/bundle/drawer-layout.js +1 -1
- package/exports/bundle/drawer.js +4 -2
- package/exports/bundle/dropdown-menu.js +1 -1
- package/exports/bundle/dropdown.js +1 -1
- package/exports/bundle/elements.js +1 -1
- package/exports/bundle/elevation.js +1 -1
- package/exports/bundle/file-reader-mixin.js +1 -0
- package/exports/bundle/icon-button.js +1 -1
- package/exports/bundle/icon-set.js +1 -1
- package/exports/bundle/icon.js +1 -1
- package/exports/bundle/input.js +1 -1
- package/exports/bundle/list-item.js +1 -1
- package/exports/bundle/menu.js +1 -1
- package/exports/bundle/minute-field.js +1 -1
- package/exports/bundle/notification.js +5 -48
- package/exports/bundle/notifications.js +1 -1
- package/exports/bundle/pane.js +2 -2
- package/exports/bundle/property-DyuvULjI.js +44 -0
- package/exports/bundle/rail.js +1 -1
- package/exports/bundle/root.js +1 -1
- package/exports/bundle/section.js +1 -1
- package/exports/bundle/section2.js +1 -1
- package/exports/bundle/selector.js +1 -1
- package/exports/bundle/summary-mirror.js +1 -1
- package/exports/bundle/summary.js +1 -1
- package/exports/bundle/supporting-pane.js +1 -1
- package/exports/bundle/tab.js +1 -1
- package/exports/bundle/tabs.js +1 -1
- package/exports/bundle/text-field.js +1 -1
- package/exports/bundle/theme.js +1 -1
- package/exports/bundle/time-picker.js +1 -1
- package/exports/bundle/toggle-button.js +1 -1
- package/exports/bundle/toggle.js +1 -1
- package/exports/bundle/top-app-bar.js +1 -1
- package/exports/bundle/typography.js +1 -1
- package/exports/bundle/upload-file.js +1 -1
- package/exports/bundle/upload-image.js +1020 -0
- package/exports/device.js +95 -0
- package/exports/drawer.js +2 -0
- package/exports/file-reader-mixin.js +11 -0
- package/exports/mixins/file-reader-mixin.d.ts +341 -0
- package/exports/pane.js +1 -1
- package/exports/upload/upload-image.d.ts +381 -0
- package/exports/upload-image.js +417 -0
- package/package.json +23 -7
- package/exports/bundle/custom-element-BMhVvZjf.js +0 -1
- package/exports/bundle/upload.js +0 -1
- package/exports/upload/upload.d.ts +0 -5
- package/exports/upload.js +0 -38
|
@@ -0,0 +1,1020 @@
|
|
|
1
|
+
import{b as e,e as t,_ as o,a as r}from"./custom-element-BOdKJYdz.js";import{t as a,v as n,D as s,j as l}from"./property-Do5-bKhz.js";import{t as d}from"./query-D-PG8Oyh.js";import{n as c,s as u,x as h,i as p,t as m,w as v,T as f,j as b}from"./property-DyuvULjI.js";import{DeviceApi as g}from"./device.js";import{L as y}from"./index-B3uz3f8C.js";import{FileReaderMixin as x}from"./file-reader-mixin.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2017 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
*/function _(e){return c({...e,state:!0,attribute:!1})}
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2017 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
+
*/const w=(e,t,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,o),o)
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright 2017 Google LLC
|
|
15
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
+
*/;function C(e,t){return(o,r,a)=>{const n=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof r?o:a??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return w(o,r,{get(){let o=e.call(this);return void 0===o&&(o=n(this),(null!==o||this.hasUpdated)&&t.call(this,o)),o}})}return w(o,r,{get(){return n(this)}})}}
|
|
17
|
+
/**
|
|
18
|
+
* @license
|
|
19
|
+
* Copyright 2021 Google LLC
|
|
20
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
+
*/function T(e){return(t,o)=>{const{slot:r,selector:a}=e??{},n="slot"+(r?`[name=${r}]`:":not([name])");return w(t,o,{get(){const t=this.renderRoot?.querySelector(n),o=t?.assignedElements(e)??[];return void 0===a?o:o.filter((e=>e.matches(a)))}})}}
|
|
22
|
+
/**
|
|
23
|
+
* @license
|
|
24
|
+
* Copyright 2022 Google LLC
|
|
25
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
26
|
+
*/class Elevation extends u{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){return h`<span class="shadow"></span>`}}
|
|
27
|
+
/**
|
|
28
|
+
* @license
|
|
29
|
+
* Copyright 2022 Google LLC
|
|
30
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
31
|
+
*/const k=p`: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
|
+
`
|
|
33
|
+
/**
|
|
34
|
+
* @license
|
|
35
|
+
* Copyright 2022 Google LLC
|
|
36
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
37
|
+
*/;let S=class MdElevation extends Elevation{};S.styles=[k],S=e([m("md-elevation")],S);
|
|
38
|
+
/**
|
|
39
|
+
* @license
|
|
40
|
+
* Copyright 2023 Google LLC
|
|
41
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
42
|
+
*/
|
|
43
|
+
const $=Symbol("attachableController");let A;A=new MutationObserver((e=>{for(const t of e)t.target[$]?.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[$]=this,A?.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
|
+
/**
|
|
45
|
+
* @license
|
|
46
|
+
* Copyright 2021 Google LLC
|
|
47
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
48
|
+
*/const E=["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 o of E)e?.removeEventListener(o,this),t?.addEventListener(o,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=p`: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
|
+
`
|
|
50
|
+
/**
|
|
51
|
+
* @license
|
|
52
|
+
* Copyright 2021 Google LLC
|
|
53
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
54
|
+
*/;
|
|
55
|
+
/**
|
|
56
|
+
* @license
|
|
57
|
+
* Copyright 2022 Google LLC
|
|
58
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
59
|
+
*/let L=class MdFocusRing extends FocusRing{};L.styles=[F],L=e([m("md-focus-ring")],L);
|
|
60
|
+
/**
|
|
61
|
+
* @license
|
|
62
|
+
* Copyright 2017 Google LLC
|
|
63
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
64
|
+
*/
|
|
65
|
+
const I=1,R=3,O=4,P=e=>(...t)=>({_$litDirective$:e,values:t});let B=class i{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,o){this._$Ct=e,this._$AM=t,this._$Ci=o}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};
|
|
66
|
+
/**
|
|
67
|
+
* @license
|
|
68
|
+
* Copyright 2018 Google LLC
|
|
69
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
70
|
+
*/const N=P(class extends B{constructor(e){if(super(e),e.type!==I||"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 o=e.element.classList;for(const e of this.st)e in t||(o.remove(e),this.st.delete(e));for(const e in t){const r=!!t[e];r===this.st.has(e)||this.nt?.has(e)||(r?(o.add(e),this.st.add(e)):(o.remove(e),this.st.delete(e)))}return v}}),M="cubic-bezier(0.2, 0, 0, 1)";
|
|
71
|
+
/**
|
|
72
|
+
* @license
|
|
73
|
+
* Copyright 2021 Google LLC
|
|
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 h`<div class="surface ${N(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(),o=Math.max(e,t),r=Math.max(.35*o,75),a=Math.floor(.2*o),n=Math.sqrt(t**2+e**2)+10;this.initialSize=a,this.rippleScale=""+(n+r)/a,this.rippleSize=`${a}px`}getNormalizedPointerEventCoords(e){const{scrollX:t,scrollY:o}=window,{left:r,top:a}=this.getBoundingClientRect(),n=t+r,s=o+a,{pageX:l,pageY:d}=e;return{x:l-n,y:d-s}}getTranslationCoordinates(e){const{height:t,width:o}=this.getBoundingClientRect(),r={x:(o-this.initialSize)/2,y:(t-this.initialSize)/2};let a;return a=e instanceof PointerEvent?this.getNormalizedPointerEventCoords(e):{x:o/2,y:t/2},a={x:a.x-this.initialSize/2,y:a.y-this.initialSize/2},{startPoint:a,endPoint:r}}startPressAnimation(e){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:t,endPoint:o}=this.getTranslationCoordinates(e),r=`${t.x}px, ${t.y}px`,a=`${o.x}px, ${o.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(${r}) 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:o,left:r,bottom:a,right:n}=this.getBoundingClientRect();return e>=r&&e<=n&&t>=o&&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 o of V)e?.removeEventListener(o,this),t?.addEventListener(o,this)}}e([c({type:Boolean,reflect:!0})],Ripple.prototype,"disabled",void 0),e([_()],Ripple.prototype,"hovered",void 0),e([_()],Ripple.prototype,"pressed",void 0),e([C(".surface")],Ripple.prototype,"mdRoot",void 0);
|
|
76
|
+
/**
|
|
77
|
+
* @license
|
|
78
|
+
* Copyright 2022 Google LLC
|
|
79
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
80
|
+
*/
|
|
81
|
+
const j=p`: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
|
+
`
|
|
83
|
+
/**
|
|
84
|
+
* @license
|
|
85
|
+
* Copyright 2022 Google LLC
|
|
86
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
87
|
+
*/;let U=class MdRipple extends Ripple{};U.styles=[j],U=e([m("md-ripple")],U);
|
|
88
|
+
/**
|
|
89
|
+
* @license
|
|
90
|
+
* Copyright 2023 Google LLC
|
|
91
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
92
|
+
*/
|
|
93
|
+
const H=["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
|
+
/**
|
|
95
|
+
* @license
|
|
96
|
+
* Copyright 2023 Google LLC
|
|
97
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
98
|
+
*/function Y(e){for(const t of H)e.createProperty(t,{attribute:G(t),reflect:!0});e.addInitializer((e=>{const t={hostConnected(){e.setAttribute("role","presentation")}};e.addController(t)}))}
|
|
99
|
+
/**
|
|
100
|
+
* @license
|
|
101
|
+
* Copyright 2023 Google LLC
|
|
102
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
103
|
+
*/H.map(G);const W=Symbol("internals"),K=Symbol("privateInternals");function X(e){return class WithElementInternalsElement extends e{get[W](){return this[K]||(this[K]=this.attachInternals()),this[K]}}}
|
|
104
|
+
/**
|
|
105
|
+
* @license
|
|
106
|
+
* Copyright 2023 Google LLC
|
|
107
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
108
|
+
*/function Z(e){return e.currentTarget===e.target&&(e.composedPath()[0]===e.target&&(!e.target.disabled&&!function(e){const t=J;t&&(e.preventDefault(),e.stopImmediatePropagation());return async function(){J=!0,await null,J=!1}
|
|
109
|
+
/**
|
|
110
|
+
* @license
|
|
111
|
+
* Copyright 2019 Google LLC
|
|
112
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
113
|
+
*/(),t}(e)))}let J=!1;const Q=X(u);class Button extends Q{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=>{Z(e)&&this.buttonElement&&(this.focus(),
|
|
114
|
+
/**
|
|
115
|
+
* @license
|
|
116
|
+
* Copyright 2021 Google LLC
|
|
117
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
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(),o=this.href?"link":"button";return h`
|
|
120
|
+
${this.renderElevationOrOutline?.()}
|
|
121
|
+
<div class="background"></div>
|
|
122
|
+
<md-focus-ring part="focus-ring" for=${o}></md-focus-ring>
|
|
123
|
+
<md-ripple for=${o} ?disabled="${e}"></md-ripple>
|
|
124
|
+
${t}
|
|
125
|
+
`}renderButton(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:o}=this;return h`<button
|
|
126
|
+
id="button"
|
|
127
|
+
class="button"
|
|
128
|
+
?disabled=${this.disabled}
|
|
129
|
+
aria-label="${e||f}"
|
|
130
|
+
aria-haspopup="${t||f}"
|
|
131
|
+
aria-expanded="${o||f}">
|
|
132
|
+
${this.renderContent()}
|
|
133
|
+
</button>`}renderLink(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:o}=this;return h`<a
|
|
134
|
+
id="link"
|
|
135
|
+
class="button"
|
|
136
|
+
aria-label="${e||f}"
|
|
137
|
+
aria-haspopup="${t||f}"
|
|
138
|
+
aria-expanded="${o||f}"
|
|
139
|
+
href=${this.href}
|
|
140
|
+
target=${this.target||f}
|
|
141
|
+
>${this.renderContent()}
|
|
142
|
+
</a>`}renderContent(){const e=h`<slot
|
|
143
|
+
name="icon"
|
|
144
|
+
@slotchange="${this.handleSlotChange}"></slot>`;return h`
|
|
145
|
+
<span class="touch"></span>
|
|
146
|
+
${this.trailingIcon?f:e}
|
|
147
|
+
<span class="label"><slot></slot></span>
|
|
148
|
+
${this.trailingIcon?e:f}
|
|
149
|
+
`}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}}Y(Button),Button.addInitializer((e=>{const t=e;t.addEventListener("click",(async e=>{const{type:o,[W]:r}=t,{form:a}=r;a&&"button"!==o&&(await new Promise((e=>{setTimeout(e)})),e.defaultPrevented||("reset"!==o?(a.addEventListener("submit",(e=>{Object.defineProperty(e,"submitter",{configurable:!0,enumerable:!0,get:()=>t})}),{capture:!0,once:!0}),r.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([C(".button")],Button.prototype,"buttonElement",void 0),e([T({slot:"icon",flatten:!0})],Button.prototype,"assignedIcons",void 0);
|
|
150
|
+
/**
|
|
151
|
+
* @license
|
|
152
|
+
* Copyright 2021 Google LLC
|
|
153
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
154
|
+
*/
|
|
155
|
+
class FilledTonalButton extends Button{renderElevationOrOutline(){return h`<md-elevation></md-elevation>`}}
|
|
156
|
+
/**
|
|
157
|
+
* @license
|
|
158
|
+
* Copyright 2022 Google LLC
|
|
159
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
160
|
+
*/const ee=p`: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
|
+
`
|
|
162
|
+
/**
|
|
163
|
+
* @license
|
|
164
|
+
* Copyright 2022 Google LLC
|
|
165
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
166
|
+
*/,te=p`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
|
+
`
|
|
168
|
+
/**
|
|
169
|
+
* @license
|
|
170
|
+
* Copyright 2022 Google LLC
|
|
171
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
172
|
+
*/,oe=p`: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
|
+
`
|
|
174
|
+
/**
|
|
175
|
+
* @license
|
|
176
|
+
* Copyright 2021 Google LLC
|
|
177
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
178
|
+
*/;let re=class MdFilledTonalButton extends FilledTonalButton{};re.styles=[oe,te,ee],re=e([m("md-filled-tonal-button")],re);
|
|
179
|
+
/**
|
|
180
|
+
* @license
|
|
181
|
+
* Copyright 2021 Google LLC
|
|
182
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
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),o=this.renderOutline?.(e),r={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 h`
|
|
185
|
+
<div class="field ${N(r)}">
|
|
186
|
+
<div class="container-overflow">
|
|
187
|
+
${this.renderBackground?.()} ${this.renderIndicator?.()} ${o}
|
|
188
|
+
<div class="container">
|
|
189
|
+
<div class="start">
|
|
190
|
+
<slot name="start"></slot>
|
|
191
|
+
</div>
|
|
192
|
+
<div class="middle">
|
|
193
|
+
<div class="label-wrapper">
|
|
194
|
+
${t} ${o?f:e}
|
|
195
|
+
</div>
|
|
196
|
+
<div class="content">
|
|
197
|
+
<slot></slot>
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
<div class="end">
|
|
201
|
+
<slot name="end"></slot>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
${this.renderSupportingText()}
|
|
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 o=h`<span>${e}</span>`,r=t?h`<span class="counter">${t}</span>`:f,a=this.error&&this.errorText&&!this.refreshErrorAlert;return h`
|
|
208
|
+
<div class="supporting-text" role=${a?"alert":f}>${o}${r}</div>
|
|
209
|
+
<slot
|
|
210
|
+
name="aria-describedby"
|
|
211
|
+
@slotchange=${this.updateSlottedAriaDescribedBy}></slot>
|
|
212
|
+
`}updateSlottedAriaDescribedBy(){for(const e of this.slottedAriaDescribedBy)b(h`${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 o={hidden:!t,floating:e,resting:!e},r=`${this.label}${this.required?"*":""}`;return h`
|
|
213
|
+
<span class="label ${N(o)}" aria-hidden=${!t}
|
|
214
|
+
>${r}</span
|
|
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:o,y:r,height:a}=e.getBoundingClientRect(),{x:n,y:s,height:l}=t.getBoundingClientRect(),d=e.scrollWidth,c=t.scrollWidth,u=c/d,h=`translateX(${n-o}px) translateY(${s-r+Math.round((l-a*u)/2)}px) scale(${u})`,p="translateX(0) translateY(0) scale(1)",m=t.clientWidth,v=c>m?m/u+"px":"";return this.focused||this.populated?[{transform:h,width:v},{transform:p,width:v}]:[{transform:p,width:v},{transform:h,width:v}]}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([T({slot:"aria-describedby"})],Field.prototype,"slottedAriaDescribedBy",void 0),e([_()],Field.prototype,"isAnimating",void 0),e([_()],Field.prototype,"refreshErrorAlert",void 0),e([_()],Field.prototype,"disableTransitions",void 0),e([C(".label.floating")],Field.prototype,"floatingLabelEl",void 0),e([C(".label.resting")],Field.prototype,"restingLabelEl",void 0),e([C(".container")],Field.prototype,"containerEl",void 0);
|
|
217
|
+
/**
|
|
218
|
+
* @license
|
|
219
|
+
* Copyright 2021 Google LLC
|
|
220
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
221
|
+
*/
|
|
222
|
+
class OutlinedField extends Field{renderOutline(e){return h`
|
|
223
|
+
<div class="outline">
|
|
224
|
+
<div class="outline-start"></div>
|
|
225
|
+
<div class="outline-notch">
|
|
226
|
+
<div class="outline-panel-inactive"></div>
|
|
227
|
+
<div class="outline-panel-active"></div>
|
|
228
|
+
<div class="outline-label">${e}</div>
|
|
229
|
+
</div>
|
|
230
|
+
<div class="outline-end"></div>
|
|
231
|
+
</div>
|
|
232
|
+
`}}
|
|
233
|
+
/**
|
|
234
|
+
* @license
|
|
235
|
+
* Copyright 2022 Google LLC
|
|
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 */
|
|
238
|
+
`
|
|
239
|
+
/**
|
|
240
|
+
* @license
|
|
241
|
+
* Copyright 2022 Google LLC
|
|
242
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
243
|
+
*/,ae=p`: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
|
+
`
|
|
245
|
+
/**
|
|
246
|
+
* @license
|
|
247
|
+
* Copyright 2021 Google LLC
|
|
248
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
249
|
+
*/;let ne=class MdOutlinedField extends OutlinedField{};ne.styles=[ae,ie],ne=e([m("md-outlined-field")],ne);
|
|
250
|
+
/**
|
|
251
|
+
* @license
|
|
252
|
+
* Copyright 2020 Google LLC
|
|
253
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
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 */
|
|
256
|
+
`
|
|
257
|
+
/**
|
|
258
|
+
* @license
|
|
259
|
+
* Copyright 2020 Google LLC
|
|
260
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
261
|
+
*/,pe={},me=P(class extends B{constructor(e){if(super(e),e.type!==R&&e.type!==I&&e.type!==O)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===v||t===f)return t;const o=e.element,r=e.name;if(e.type===R){if(t===o[r])return v}else if(e.type===O){if(!!t===o.hasAttribute(r))return v}else if(e.type===I&&o.getAttribute(r)===t+"")return v;return((e,t=pe)=>{e._$AH=t;
|
|
262
|
+
/**
|
|
263
|
+
* @license
|
|
264
|
+
* Copyright 2020 Google LLC
|
|
265
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
266
|
+
*/})(e),t}}),ve="important",fe=" !"+ve,be=P(class extends B{constructor(e){if(super(e),e.type!==I||"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,o)=>{const r=e[o];return null==r?t:t+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(e,[t]){const{style:o}=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("-")?o.removeProperty(e):o[e]=null);for(const e in t){const r=t[e];if(null!=r){this.ft.add(e);const t="string"==typeof r&&r.endsWith(fe);e.includes("-")||t?o.setProperty(e,t?r.slice(0,-11):r,t?ve:""):o[e]=r}}return v}}),ge={fromAttribute:e=>e??"",toAttribute:e=>e||null};
|
|
267
|
+
/**
|
|
268
|
+
* @license
|
|
269
|
+
* Copyright 2022 Google LLC
|
|
270
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
271
|
+
*/
|
|
272
|
+
/**
|
|
273
|
+
* @license
|
|
274
|
+
* Copyright 2023 Google LLC
|
|
275
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
276
|
+
*/
|
|
277
|
+
const ye=Symbol("createValidator"),xe=Symbol("getValidityAnchor"),_e=Symbol("privateValidator"),we=Symbol("privateSyncValidity"),Ce=Symbol("privateCustomValidationMessage");
|
|
278
|
+
/**
|
|
279
|
+
* @license
|
|
280
|
+
* Copyright 2023 Google LLC
|
|
281
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
282
|
+
*/
|
|
283
|
+
const Te=Symbol("getFormValue"),ke=Symbol("getFormState");
|
|
284
|
+
/**
|
|
285
|
+
* @license
|
|
286
|
+
* Copyright 2023 Google LLC
|
|
287
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
288
|
+
*/
|
|
289
|
+
const Se=Symbol("onReportValidity"),$e=Symbol("privateCleanupFormListeners"),Ae=Symbol("privateDoNotReportInvalid"),Ee=Symbol("privateIsSelfReportingValidity"),ze=Symbol("privateCallOnReportValidity");const Fe=new WeakMap;
|
|
290
|
+
/**
|
|
291
|
+
* @license
|
|
292
|
+
* Copyright 2023 Google LLC
|
|
293
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
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:o}=this.computeValidity(e);return this.prevState=this.copy(e),this.currentValidity={validationMessage:o,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
|
+
/**
|
|
297
|
+
* @license
|
|
298
|
+
* Copyright 2023 Google LLC
|
|
299
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
300
|
+
*/class TextFieldValidator extends Validator{computeValidity({state:e,renderedControl:t}){let o=t;Le(e)&&!o?(o=this.inputControl||document.createElement("input"),this.inputControl=o):o||(o=this.textAreaControl||document.createElement("textarea"),this.textAreaControl=o);const r=Le(e)?o:null;if(r&&(r.type=e.type),o.value!==e.value&&(o.value=e.value),o.required=e.required,r){const t=e;t.pattern?r.pattern=t.pattern:r.removeAttribute("pattern"),t.min?r.min=t.min:r.removeAttribute("min"),t.max?r.max=t.max:r.removeAttribute("max"),t.step?r.step=t.step:r.removeAttribute("step")}return(e.minLength??-1)>-1?o.setAttribute("minlength",String(e.minLength)):o.removeAttribute("minlength"),(e.maxLength??-1)>-1?o.setAttribute("maxlength",String(e.maxLength)):o.removeAttribute("maxlength"),{validity:o.validity,validationMessage:o.validationMessage}}equals({state:e},{state:t}){const o=e.type===t.type&&e.value===t.value&&e.required===t.required&&e.minLength===t.minLength&&e.maxLength===t.maxLength;return Le(e)&&Le(t)?o&&e.pattern===t.pattern&&e.min===t.min&&e.max===t.max&&e.step===t.step:o}copy({state:e}){return{state:Le(e)?this.copyInput(e):this.copyTextArea(e),renderedControl:null}}copyInput(e){const{type:t,pattern:o,min:r,max:a,step:n}=e;return{...this.copySharedState(e),type:t,pattern:o,min:r,max:a,step:n}}copyTextArea(e){return{...this.copySharedState(e),type:e.type}}copySharedState({value:e,required:t,minLength:o,maxLength:r}){return{value:e,required:t,minLength:o,maxLength:r}}}function Le(e){return"textarea"!==e.type}
|
|
301
|
+
/**
|
|
302
|
+
* @license
|
|
303
|
+
* Copyright 2021 Google LLC
|
|
304
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
305
|
+
*/const Ie=function(e){var t,o,r;class OnReportValidityElement extends e{constructor(...e){super(...e),this[t]=new AbortController,this[o]=!1,this[r]=!1,this.addEventListener("invalid",(e=>{!this[Ae]&&e.isTrusted&&this.addEventListener("invalid",(()=>{this[ze](e)}),{once:!0})}),{capture:!0})}checkValidity(){this[Ae]=!0;const e=super.checkValidity();return this[Ae]=!1,e}reportValidity(){this[Ee]=!0;const e=super.reportValidity();return e&&this[ze](null),this[Ee]=!1,e}[(t=$e,o=Ae,r=Ee,ze)](e){const t=e?.defaultPrevented;if(t)return;this[Se](e);!t&&e?.defaultPrevented&&(this[Ee]||function(e,t){if(!e)return!0;let o;for(const t of e.elements)if(t.matches(":invalid")){o=t;break}return o===t}(this[W].form,this))&&this.focus()}[Se](e){throw new Error("Implement [onReportValidity]")}formAssociatedCallback(e){super.formAssociatedCallback&&super.formAssociatedCallback(e),this[$e].abort(),e&&(this[$e]=new AbortController,function(e,t,o,r){const a=function(e){if(!Fe.has(e)){const t=new EventTarget;Fe.set(e,t);for(const o of["reportValidity","requestSubmit"]){const r=e[o];e[o]=function(){t.dispatchEvent(new Event("before"));const e=Reflect.apply(r,this,arguments);return t.dispatchEvent(new Event("after")),e}}}return Fe.get(e)}(t);let n,s=!1,l=!1;a.addEventListener("before",(()=>{l=!0,n=new AbortController,s=!1,e.addEventListener("invalid",(()=>{s=!0}),{signal:n.signal})}),{signal:r}),a.addEventListener("after",(()=>{l=!1,n?.abort(),s||o()}),{signal:r}),t.addEventListener("submit",(()=>{l||o()}),{signal:r})}(this,e,(()=>{this[ze](null)}),this[$e].signal))}}return OnReportValidityElement}(function(e){var t;class ConstraintValidationElement extends e{constructor(){super(...arguments),this[t]=""}get validity(){return this[we](),this[W].validity}get validationMessage(){return this[we](),this[W].validationMessage}get willValidate(){return this[we](),this[W].willValidate}checkValidity(){return this[we](),this[W].checkValidity()}reportValidity(){return this[we](),this[W].reportValidity()}setCustomValidity(e){this[Ce]=e,this[we]()}requestUpdate(e,t,o){super.requestUpdate(e,t,o),this[we]()}firstUpdated(e){super.firstUpdated(e),this[we]()}[(t=Ce,we)](){this[_e]||(this[_e]=this[ye]());const{validity:e,validationMessage:t}=this[_e].getValidity(),o=!!this[Ce],r=this[Ce]||t;this[W].setValidity({...e,customError:o},r,this[xe]()??void 0)}[ye](){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,o){if("name"!==e&&"disabled"!==e)super.attributeChangedCallback(e,t,o);else{const o="disabled"===e?null!==t:t;this.requestUpdate(e,o)}}requestUpdate(e,t,o){super.requestUpdate(e,t,o),this[W].setFormValue(this[Te](),this[ke]())}[Te](){throw new Error("Implement [getFormValue]")}[ke](){return this[Te]()}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}(X(u))));class TextField extends Ie{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,o){this.getInputOrTextarea().setSelectionRange(e,t,o)}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,o){"value"===e&&this.dirty||super.attributeChangedCallback(e,t,o)}render(){const e={disabled:this.disabled,error:!this.disabled&&this.hasError,textarea:"textarea"===this.type,"no-spinner":this.noSpinner};return h`
|
|
306
|
+
<span class="text-field ${N(e)}">
|
|
307
|
+
${this.renderField()}
|
|
308
|
+
</span>
|
|
309
|
+
`}updated(e){const t=this.getInputOrTextarea().value;this.value!==t&&(this.value=t)}renderField(){return ue`<${this.fieldTag}
|
|
310
|
+
class="field"
|
|
311
|
+
count=${this.value.length}
|
|
312
|
+
?disabled=${this.disabled}
|
|
313
|
+
?error=${this.hasError}
|
|
314
|
+
error-text=${this.getErrorText()}
|
|
315
|
+
?focused=${this.focused}
|
|
316
|
+
?has-end=${this.hasTrailingIcon}
|
|
317
|
+
?has-start=${this.hasLeadingIcon}
|
|
318
|
+
label=${this.label}
|
|
319
|
+
max=${this.maxLength}
|
|
320
|
+
?populated=${!!this.value}
|
|
321
|
+
?required=${this.required}
|
|
322
|
+
?resizable=${"textarea"===this.type}
|
|
323
|
+
supporting-text=${this.supportingText}
|
|
324
|
+
>
|
|
325
|
+
${this.renderLeadingIcon()}
|
|
326
|
+
${this.renderInputOrTextarea()}
|
|
327
|
+
${this.renderTrailingIcon()}
|
|
328
|
+
<div id="description" slot="aria-describedby"></div>
|
|
329
|
+
</${this.fieldTag}>`}renderLeadingIcon(){return h`
|
|
330
|
+
<span class="icon leading" slot="start">
|
|
331
|
+
<slot name="leading-icon" @slotchange=${this.handleIconChange}></slot>
|
|
332
|
+
</span>
|
|
333
|
+
`}renderTrailingIcon(){return h`
|
|
334
|
+
<span class="icon trailing" slot="end">
|
|
335
|
+
<slot name="trailing-icon" @slotchange=${this.handleIconChange}></slot>
|
|
336
|
+
</span>
|
|
337
|
+
`}renderInputOrTextarea(){const e={direction:this.textDirection},t=this.ariaLabel||this.label||f,o=this.autocomplete,r=(this.maxLength??-1)>-1,a=(this.minLength??-1)>-1;if("textarea"===this.type)return h`
|
|
338
|
+
<textarea
|
|
339
|
+
class="input"
|
|
340
|
+
style=${be(e)}
|
|
341
|
+
aria-describedby="description"
|
|
342
|
+
aria-invalid=${this.hasError}
|
|
343
|
+
aria-label=${t}
|
|
344
|
+
autocomplete=${o||f}
|
|
345
|
+
?disabled=${this.disabled}
|
|
346
|
+
maxlength=${r?this.maxLength:f}
|
|
347
|
+
minlength=${a?this.minLength:f}
|
|
348
|
+
placeholder=${this.placeholder||f}
|
|
349
|
+
?readonly=${this.readOnly}
|
|
350
|
+
?required=${this.required}
|
|
351
|
+
rows=${this.rows}
|
|
352
|
+
cols=${this.cols}
|
|
353
|
+
.value=${me(this.value)}
|
|
354
|
+
@change=${this.redispatchEvent}
|
|
355
|
+
@focus=${this.handleFocusChange}
|
|
356
|
+
@blur=${this.handleFocusChange}
|
|
357
|
+
@input=${this.handleInput}
|
|
358
|
+
@select=${this.redispatchEvent}></textarea>
|
|
359
|
+
`;const n=this.renderPrefix(),s=this.renderSuffix(),l=this.inputMode;return h`
|
|
360
|
+
<div class="input-wrapper">
|
|
361
|
+
${n}
|
|
362
|
+
<input
|
|
363
|
+
class="input"
|
|
364
|
+
style=${be(e)}
|
|
365
|
+
aria-describedby="description"
|
|
366
|
+
aria-invalid=${this.hasError}
|
|
367
|
+
aria-label=${t}
|
|
368
|
+
autocomplete=${o||f}
|
|
369
|
+
?disabled=${this.disabled}
|
|
370
|
+
inputmode=${l||f}
|
|
371
|
+
max=${this.max||f}
|
|
372
|
+
maxlength=${r?this.maxLength:f}
|
|
373
|
+
min=${this.min||f}
|
|
374
|
+
minlength=${a?this.minLength:f}
|
|
375
|
+
pattern=${this.pattern||f}
|
|
376
|
+
placeholder=${this.placeholder||f}
|
|
377
|
+
?readonly=${this.readOnly}
|
|
378
|
+
?required=${this.required}
|
|
379
|
+
?multiple=${this.multiple}
|
|
380
|
+
step=${this.step||f}
|
|
381
|
+
type=${this.type}
|
|
382
|
+
.value=${me(this.value)}
|
|
383
|
+
@change=${this.redispatchEvent}
|
|
384
|
+
@focus=${this.handleFocusChange}
|
|
385
|
+
@blur=${this.handleFocusChange}
|
|
386
|
+
@input=${this.handleInput}
|
|
387
|
+
@select=${this.redispatchEvent} />
|
|
388
|
+
${s}
|
|
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 h`<span class="${N({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
|
+
/**
|
|
392
|
+
* @license
|
|
393
|
+
* Copyright 2021 Google LLC
|
|
394
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
395
|
+
*/
|
|
396
|
+
function(e,t){!t.bubbles||e.shadowRoot&&!t.composed||t.stopPropagation();const o=Reflect.construct(t.constructor,[t.type,t]),r=e.dispatchEvent(o);r||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}[Te](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}focus(){this.getInputOrTextarea().focus()}[ye](){return new TextFieldValidator((()=>({state:this,renderedControl:this.inputOrTextarea})))}[xe](){return this.inputOrTextarea}[Se](e){e?.preventDefault();const t=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,t===this.getErrorText()&&this.field?.reannounceError()}}Y(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:ge})],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([_()],TextField.prototype,"dirty",void 0),e([_()],TextField.prototype,"focused",void 0),e([_()],TextField.prototype,"nativeError",void 0),e([_()],TextField.prototype,"nativeErrorText",void 0),e([C(".input")],TextField.prototype,"inputOrTextarea",void 0),e([C(".field")],TextField.prototype,"field",void 0),e([T({slot:"leading-icon"})],TextField.prototype,"leadingIcons",void 0),e([T({slot:"trailing-icon"})],TextField.prototype,"trailingIcons",void 0);
|
|
397
|
+
/**
|
|
398
|
+
* @license
|
|
399
|
+
* Copyright 2021 Google LLC
|
|
400
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
401
|
+
*/
|
|
402
|
+
class OutlinedTextField extends TextField{constructor(){super(...arguments),this.fieldTag=de`md-outlined-field`}}
|
|
403
|
+
/**
|
|
404
|
+
* @license
|
|
405
|
+
* Copyright 2022 Google LLC
|
|
406
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
407
|
+
*/const Re=p`: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
|
+
`
|
|
409
|
+
/**
|
|
410
|
+
* @license
|
|
411
|
+
* Copyright 2021 Google LLC
|
|
412
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
413
|
+
*/;let Oe=class MdOutlinedTextField extends OutlinedTextField{constructor(){super(...arguments),this.fieldTag=de`md-outlined-field`}};Oe.styles=[Re,he],Oe=e([m("md-outlined-text-field")],Oe);
|
|
414
|
+
/**
|
|
415
|
+
* @license
|
|
416
|
+
* Copyright 2023 Google LLC
|
|
417
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
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 h`
|
|
420
|
+
<div
|
|
421
|
+
class="progress ${N(this.getRenderClasses())}"
|
|
422
|
+
role="progressbar"
|
|
423
|
+
aria-label="${e||f}"
|
|
424
|
+
aria-valuemin="0"
|
|
425
|
+
aria-valuemax=${this.max}
|
|
426
|
+
aria-valuenow=${this.indeterminate?f:this.value}
|
|
427
|
+
>${this.renderIndicator()}</div
|
|
428
|
+
>
|
|
429
|
+
`}getRenderClasses(){return{indeterminate:this.indeterminate,"four-color":this.fourColor}}}Y(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
|
+
/**
|
|
431
|
+
* @license
|
|
432
|
+
* Copyright 2023 Google LLC
|
|
433
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
434
|
+
*/
|
|
435
|
+
class CircularProgress extends Progress{renderIndicator(){return this.indeterminate?this.renderIndeterminateContainer():this.renderDeterminateContainer()}renderDeterminateContainer(){const e=100*(1-this.value/this.max);return h`
|
|
436
|
+
<svg viewBox="0 0 4800 4800">
|
|
437
|
+
<circle class="track" pathLength="100"></circle>
|
|
438
|
+
<circle
|
|
439
|
+
class="active-track"
|
|
440
|
+
pathLength="100"
|
|
441
|
+
stroke-dashoffset=${e}></circle>
|
|
442
|
+
</svg>
|
|
443
|
+
`}renderIndeterminateContainer(){return h` <div class="spinner">
|
|
444
|
+
<div class="left">
|
|
445
|
+
<div class="circle"></div>
|
|
446
|
+
</div>
|
|
447
|
+
<div class="right">
|
|
448
|
+
<div class="circle"></div>
|
|
449
|
+
</div>
|
|
450
|
+
</div>`}}
|
|
451
|
+
/**
|
|
452
|
+
* @license
|
|
453
|
+
* Copyright 2022 Google LLC
|
|
454
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
455
|
+
*/const Pe=p`: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
|
+
`
|
|
457
|
+
/**
|
|
458
|
+
* @license
|
|
459
|
+
* Copyright 2023 Google LLC
|
|
460
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
461
|
+
*/;let Be=class MdCircularProgress extends CircularProgress{};function Ne(e,t,o,r,a,n){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var l,d=r.kind,c="getter"===d?"get":"setter"===d?"set":"value",u=!t&&e?r.static?e:e.prototype:null,h=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),p=!1,m=o.length-1;m>=0;m--){var v={};for(var f in r)v[f]="access"===f?{}:r[f];for(var f in r.access)v.access[f]=r.access[f];v.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");n.push(s(e||null))};var b=(0,o[m])("accessor"===d?{get:h.get,set:h.set}:h[c],v);if("accessor"===d){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw new TypeError("Object expected");(l=s(b.get))&&(h.get=l),(l=s(b.set))&&(h.set=l),(l=s(b.init))&&a.unshift(l)}else(l=s(b))&&("field"===d?a.unshift(l):h[c]=l)}u&&Object.defineProperty(u,r.name,h),p=!0}function Me(e,t,o){for(var r=arguments.length>2,a=0;a<t.length;a++)o=r?t[a].call(e,o):t[a].call(e);return r?o:void 0}Be.styles=[Pe],Be=e([m("md-circular-progress")],Be),"function"==typeof SuppressedError&&SuppressedError,
|
|
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`
|
|
824
|
+
:host {
|
|
825
|
+
display: block;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
h5 {
|
|
829
|
+
margin: 0;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
custom-tab.custom-selected {
|
|
833
|
+
background: var(--md-sys-color-tertiary);
|
|
834
|
+
--custom-icon-color: var(--md-sys-color-on-tertiary);
|
|
835
|
+
border: none;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
custom-tab.custom-selected span,
|
|
839
|
+
custom-tab.custom-selected custom-icon {
|
|
840
|
+
color: var(--md-sys-color-on-tertiary);
|
|
841
|
+
--custom-icon-color: var(--md-sys-color-on-tertiary);
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
custom-tab {
|
|
845
|
+
gap: 8px;
|
|
846
|
+
height: 40px;
|
|
847
|
+
padding: 0 12px;
|
|
848
|
+
box-sizing: border-box;
|
|
849
|
+
width: auto;
|
|
850
|
+
border-radius: 20px;
|
|
851
|
+
font: var(--_supporting-text-type);
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
custom-tabs {
|
|
855
|
+
height: 40px;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
section {
|
|
859
|
+
display: flex;
|
|
860
|
+
flex-direction: column;
|
|
861
|
+
height: 100%;
|
|
862
|
+
width: 100%;
|
|
863
|
+
min-height: 168px;
|
|
864
|
+
position: absolute;
|
|
865
|
+
transform: scale(0);
|
|
866
|
+
justify-content: center;
|
|
867
|
+
align-items: center;
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
section[route='camera'] {
|
|
871
|
+
overflow-y: hidden;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
section.custom-selected {
|
|
875
|
+
transform: scale(1);
|
|
876
|
+
position: relative;
|
|
877
|
+
}
|
|
878
|
+
md-outlined-text-field {
|
|
879
|
+
padding-top: 12px;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
.camera-actions {
|
|
883
|
+
width: 100%;
|
|
884
|
+
position: absolute;
|
|
885
|
+
bottom: 0;
|
|
886
|
+
margin-bottom: 3px;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
section[route='camera'] flex-container {
|
|
890
|
+
height: 320px;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
flex-column {
|
|
894
|
+
width: auto;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
flex-container video,
|
|
898
|
+
img:not([data-variant='icon']) {
|
|
899
|
+
height: -webkit-fill-available;
|
|
900
|
+
width: -webkit-fill-available;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
[route='library'] img {
|
|
904
|
+
width: 150px;
|
|
905
|
+
cursor: pointer;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
[data-variant='icon'] {
|
|
909
|
+
height: 48px;
|
|
910
|
+
width: 48px;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
md-dialog {
|
|
914
|
+
--_container-color: #2d2f31;
|
|
915
|
+
}
|
|
916
|
+
`];get#C(){return this.shadowRoot.querySelector("custom-dialog")}get#T(){return this.shadowRoot.querySelector(".camera-preview")}#k=(r(this,B),"user");#S={data:null,type:null};#$=async()=>{const e=await this.deviceApi.camera.takePhoto(this.#k);this.#S.data=await globalThis.readAsDataURL(e),this.#S.type="base64";const t=document.createElement("img");t.src=this.#S.data,this.shadowRoot.querySelector("flex-container").replaceChild(t.cloneNode(!0),this.#T)};#A=({})=>{const e=document.createElement("input");e.type="file",e.multiple=!0;const t=async o=>{const r=await Promise.all(Array.from(e.files).map((async e=>{const t=await this.readAsDataURL(e),o=document.createElement("md-list-item");return o.headline=e.name,o.setAttribute("noninteractive",""),o.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 `,o.onclick=()=>{this.shadowRoot.querySelector('section[route="file"]').removeChild(o)},this.shadowRoot.querySelector('section[route="file"]').appendChild(o),{name:e.name,data:t}})));this.#S.data=r,this.#S.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)}#E=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.#T,this.#k))};#z=(e,t)=>{this.#S.data=t,this.#S.type="library"};show(){this.#C.open=!0}#F(){return n`
|
|
917
|
+
<form id="form-content" method="dialog">
|
|
918
|
+
<custom-tabs attr-for-selected="route" @selected=${this.#E.bind(this)}>
|
|
919
|
+
${this.hasLibrary?n`
|
|
920
|
+
<custom-tab route="library">
|
|
921
|
+
<custom-icon>photo_library</custom-icon>
|
|
922
|
+
<span>library</span>
|
|
923
|
+
</custom-tab>
|
|
924
|
+
`:""}
|
|
925
|
+
<custom-tab route="url">
|
|
926
|
+
<custom-icon>link</custom-icon>
|
|
927
|
+
<span>url</span>
|
|
928
|
+
</custom-tab>
|
|
929
|
+
|
|
930
|
+
<custom-tab route="camera">
|
|
931
|
+
<custom-icon>camera</custom-icon>
|
|
932
|
+
<span>camera</span>
|
|
933
|
+
</custom-tab>
|
|
934
|
+
|
|
935
|
+
<custom-tab route="file">
|
|
936
|
+
<custom-icon>upload</custom-icon>
|
|
937
|
+
<span>file</span>
|
|
938
|
+
</custom-tab>
|
|
939
|
+
<flex-it></flex-it>
|
|
940
|
+
</custom-tabs>
|
|
941
|
+
<custom-pages attr-for-selected="route">
|
|
942
|
+
${this.hasLibrary?n`
|
|
943
|
+
<section route="library">
|
|
944
|
+
<flex-wrap-around>
|
|
945
|
+
${this.images.map((e=>n`
|
|
946
|
+
<img
|
|
947
|
+
@click=${t=>this.#z.call(this,t,e.firebaseKey)}
|
|
948
|
+
src=${`${location.origin}/api/image?image=${e.link.replace(".png","b.png")}`}
|
|
949
|
+
/>
|
|
950
|
+
`))}
|
|
951
|
+
</flex-wrap-around>
|
|
952
|
+
</section>
|
|
953
|
+
`:""}
|
|
954
|
+
<section route="url">
|
|
955
|
+
<flex-column>
|
|
956
|
+
add image using a link/url
|
|
957
|
+
<md-outlined-text-field label="url" input-field="url"></md-outlined-text-field>
|
|
958
|
+
</flex-column>
|
|
959
|
+
</section>
|
|
960
|
+
|
|
961
|
+
<section route="camera">
|
|
962
|
+
<flex-container>
|
|
963
|
+
<video autoplay mute="true" class="camera-preview"></video>
|
|
964
|
+
</flex-container>
|
|
965
|
+
|
|
966
|
+
<flex-row class="camera-actions">
|
|
967
|
+
<flex-it flex="2"></flex-it>
|
|
968
|
+
|
|
969
|
+
<md-standard-icon-button
|
|
970
|
+
@click=${()=>this.#k="user"}
|
|
971
|
+
?disabled=${this.frontCameraDisabled}
|
|
972
|
+
>
|
|
973
|
+
<custom-icon>photo_camera_front</custom-icon>
|
|
974
|
+
</md-standard-icon-button>
|
|
975
|
+
|
|
976
|
+
<flex-it flex="1"></flex-it>
|
|
977
|
+
|
|
978
|
+
<md-standard-icon-button style="transform: scale(1.66);" @click=${this.#$}>
|
|
979
|
+
<custom-icon>photo_camera</custom-icon>
|
|
980
|
+
</md-standard-icon-button>
|
|
981
|
+
|
|
982
|
+
<flex-it flex="1"></flex-it>
|
|
983
|
+
|
|
984
|
+
<md-standard-icon-button
|
|
985
|
+
@click=${()=>this.#k="environment"}
|
|
986
|
+
?disabled=${this.rearCameraDisabled}
|
|
987
|
+
>
|
|
988
|
+
<custom-icon>photo_camera_back</custom-icon>
|
|
989
|
+
</md-standard-icon-button>
|
|
990
|
+
|
|
991
|
+
<flex-it flex="2"></flex-it>
|
|
992
|
+
</flex-row>
|
|
993
|
+
</section>
|
|
994
|
+
|
|
995
|
+
<section route="file">
|
|
996
|
+
<md-filled-tonal-button @click=${this.#A.bind(this)}>
|
|
997
|
+
<custom-icon slot="icon">upload</custom-icon>
|
|
998
|
+
select
|
|
999
|
+
</md-filled-tonal-button>
|
|
1000
|
+
</section>
|
|
1001
|
+
</custom-pages>
|
|
1002
|
+
</form>
|
|
1003
|
+
|
|
1004
|
+
<flex-row slot="actions">
|
|
1005
|
+
<md-text-button form="form-content" value="cancel">cancel</md-text-button>
|
|
1006
|
+
<flex-one></flex-one>
|
|
1007
|
+
<md-text-button form="form-content" value="submit">submit</md-text-button>
|
|
1008
|
+
</flex-row>
|
|
1009
|
+
`}#L=()=>new Promise(((e,t)=>{const o=t=>{const r=Array.from(this.shadowRoot.querySelectorAll("[input-field]")),a={};for(const e of r)a[e.label]=e.value;if(!this.#S.type){const e=this.shadowRoot.querySelector("[input-field]");this.#S.type=e?"url":void 0,this.#S.data=e?.value}const s={type:this.#S.type,data:Array.isArray(this.#S.data)?[...this.#S.data]:this.#S.data};e({action:t.returnValue,fields:a,image:s}),this.#C.removeEventListener("closed",o),this.#S.data=null,this.#S.type=null,this.deviceApi.camera.close(),this.#C.close(),b(n``,this.#C)};this.#C.addEventListener("closed",o)}));#I(e,t){return n`
|
|
1010
|
+
<flex-row slot="title">
|
|
1011
|
+
<h5>${e}</h5>
|
|
1012
|
+
</flex-row>
|
|
1013
|
+
<flex-column>
|
|
1014
|
+
<flex-column> ${t} </flex-column>
|
|
1015
|
+
|
|
1016
|
+
<flex-row style="justify-content: center; width: 100%;">
|
|
1017
|
+
<md-circular-progress indeterminate></md-circular-progress>
|
|
1018
|
+
</flex-row>
|
|
1019
|
+
</flex-column>
|
|
1020
|
+
`}async addImage(){return b(this.#F(),this.#C),this.show(),this.#L()}async busy(e,t){b(this.#I(e,t),this.#C),this.show()}close(){this.#C.open=!1}render(){return n` <custom-dialog .open=${this.open}></custom-dialog> `}static{r(c,w)}},c})();export{De as CustomUploadImage};
|