@vandeurenglenn/lite-elements 0.3.83 → 0.3.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/exports/bundle/banner.js +1 -1
- package/exports/bundle/button.css.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/column-Ci52gPdn.js +1 -0
- package/exports/bundle/dark-mode2-AFovKiD8.js +1 -0
- package/exports/bundle/{dark-mode-m29sAj4H.js → dark-mode2-CXqeCi6t.js} +2 -2
- package/exports/bundle/demo-elements.js +1 -1
- package/exports/bundle/demo-icons.js +2 -2
- package/exports/bundle/demo-shell.js +1 -1
- package/exports/bundle/demo.js +1 -1
- 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 +2 -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/fab.js +1 -1
- 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/input2.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 +1 -1
- package/exports/bundle/notifications.js +1 -1
- package/exports/bundle/pages.js +1 -1
- package/exports/bundle/pane.js +29 -6
- package/exports/bundle/prompt.js +1 -1
- package/exports/bundle/{property-CMTrOHQk.js → property-CChxy2ZU.js} +1 -1
- package/exports/bundle/rail.js +1 -1
- package/exports/bundle/root.js +1 -1
- package/exports/bundle/row-CEpFJOUe.js +28 -0
- package/exports/bundle/section.js +1 -1
- package/exports/bundle/section2.js +1 -1
- package/exports/bundle/select-mixin.js +1 -1
- package/exports/bundle/selector-mixin.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 +21 -19
- package/exports/pane.js +4 -2
- package/exports/{apis → src/apis}/device.d.ts +1 -1
- package/exports/{drawer → src/drawer}/drawer-layout.d.ts +1 -1
- package/exports/{mixins → src/mixins}/select-mixin.d.ts +2 -2
- package/exports/{notification → src/notification}/notifications.d.ts +1 -1
- package/exports/{places → src/places}/input.d.ts +1 -1
- package/exports/{router → src/router}/hash-router.d.ts +2 -2
- package/package.json +517 -525
- package/exports/bundle/column-CLFZeRaw.js +0 -1
- package/exports/bundle/row-DZm4UH0H.js +0 -28
- package/exports/mixins/scroll-mixin.d.ts +0 -11
- package/exports/section/section.d.ts +0 -17
- /package/exports/{banner → src/banner}/banner.d.ts +0 -0
- /package/exports/{bar → src/bar}/top-app-bar.d.ts +0 -0
- /package/exports/{button → src/button}/button.d.ts +0 -0
- /package/exports/{button → src/button}/icon-button.d.ts +0 -0
- /package/exports/{button → src/button}/styles/button.css.d.ts +0 -0
- /package/exports/{card → src/card}/card.d.ts +0 -0
- /package/exports/{demo → src/demo}/code.d.ts +0 -0
- /package/exports/{demo → src/demo}/demo-icons.d.ts +0 -0
- /package/exports/{demo → src/demo}/demo-shell.d.ts +0 -0
- /package/exports/{demo → src/demo}/demo.d.ts +0 -0
- /package/exports/{demo → src/demo}/section.d.ts +0 -0
- /package/exports/{demo-elements.d.ts → src/demo-elements.d.ts} +0 -0
- /package/exports/{dialog → src/dialog}/dialog.d.ts +0 -0
- /package/exports/{divider → src/divider}/divider.d.ts +0 -0
- /package/exports/{drawer → src/drawer}/drawer-button.d.ts +0 -0
- /package/exports/{drawer → src/drawer}/drawer-item.d.ts +0 -0
- /package/exports/{drawer → src/drawer}/drawer.d.ts +0 -0
- /package/exports/{dropdown → src/dropdown}/dropdown-menu.d.ts +0 -0
- /package/exports/{dropdown → src/dropdown}/dropdown.d.ts +0 -0
- /package/exports/{elements.d.ts → src/elements.d.ts} +0 -0
- /package/exports/{elevation → src/elevation}/elevation.d.ts +0 -0
- /package/exports/{fab → src/fab}/fab.d.ts +0 -0
- /package/exports/{icon → src/icon}/icon-set.d.ts +0 -0
- /package/exports/{icon → src/icon}/icon.d.ts +0 -0
- /package/exports/{list → src/list}/list-item.d.ts +0 -0
- /package/exports/{list → src/list}/list.d.ts +0 -0
- /package/exports/{menu → src/menu}/menu.d.ts +0 -0
- /package/exports/{mixins → src/mixins}/selector-mixin.d.ts +0 -0
- /package/exports/{notification → src/notification}/notification.d.ts +0 -0
- /package/exports/{pages → src/pages}/pages.d.ts +0 -0
- /package/exports/{pane → src/pane}/pane.d.ts +0 -0
- /package/exports/{prompt → src/prompt}/prompt.d.ts +0 -0
- /package/exports/{rail → src/rail}/rail.d.ts +0 -0
- /package/exports/{root → src/root}/root.d.ts +0 -0
- /package/exports/{selector → src/selector}/selector.d.ts +0 -0
- /package/exports/{summary → src/summary}/summary-mirror.d.ts +0 -0
- /package/exports/{summary → src/summary}/summary.d.ts +0 -0
- /package/exports/{supporting-pane → src/supporting-pane}/supporting-pane.d.ts +0 -0
- /package/exports/{tabs → src/tabs}/menu.d.ts +0 -0
- /package/exports/{tabs → src/tabs}/tab.d.ts +0 -0
- /package/exports/{tabs → src/tabs}/tabs.d.ts +0 -0
- /package/exports/{text-field → src/text-field}/text-field.d.ts +0 -0
- /package/exports/{theme → src/theme}/theme.d.ts +0 -0
- /package/exports/{time-picker → src/time-picker}/dial.d.ts +0 -0
- /package/exports/{time-picker → src/time-picker}/hour-field.d.ts +0 -0
- /package/exports/{time-picker → src/time-picker}/input.d.ts +0 -0
- /package/exports/{time-picker → src/time-picker}/minute-field.d.ts +0 -0
- /package/exports/{time-picker → src/time-picker}/time-picker.d.ts +0 -0
- /package/exports/{toggle → src/toggle}/toggle-button.d.ts +0 -0
- /package/exports/{toggle → src/toggle}/toggle.d.ts +0 -0
- /package/exports/{types.d.ts → src/types.d.ts} +0 -0
- /package/exports/{typography → src/typography}/title.d.ts +0 -0
- /package/exports/{typography → src/typography}/typography.d.ts +0 -0
- /package/exports/{upload → src/upload}/upload-file.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as e,_ as t,a as r}from"./tslib.es6-B87RQr7F.js";import{x as o,i as a,T as n,E as l,B as s,r as d,s as c}from"./dark-
|
|
1
|
+
import{b as e,_ as t,a as r}from"./tslib.es6-B87RQr7F.js";import{x as o,i as a,T as n,E as l,B as s,r as d,s as c}from"./dark-mode2-CXqeCi6t.js";import{t as u}from"./query-DCTzLeFk.js";import{e as p}from"./custom-element-B_TPyPQO.js";import{n as h,i as v,t as m}from"./property-CChxy2ZU.js";import{DeviceApi as f}from"./device.js";import"./dialog.js";import"./icon.js";import"./tabs.js";import"./tab.js";import"./selector.js";import"./pages.js";import{FileReaderMixin as b}from"./file-reader-mixin.js";import"./elevation.js";import"./selector-mixin.js";import"./select-mixin.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
@@ -62,29 +62,29 @@ const T=Symbol("attachableController");let $;$=new MutationObserver((e=>{for(con
|
|
|
62
62
|
* Copyright 2017 Google LLC
|
|
63
63
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
64
64
|
*/
|
|
65
|
-
const z=1,
|
|
65
|
+
const z=1,S=3,I=4,L=e=>(...t)=>({_$litDirective$:e,values:t});let R=class i{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};
|
|
66
66
|
/**
|
|
67
67
|
* @license
|
|
68
68
|
* Copyright 2018 Google LLC
|
|
69
69
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
70
|
-
*/const P=L(class extends R{constructor(e){if(super(e),e.type!==z||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const r=e.element.classList;for(const e of this.st)e in t||(r.remove(e),this.st.delete(e));for(const e in t){const o=!!t[e];o===this.st.has(e)||this.nt?.has(e)||(o?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return n}}),
|
|
70
|
+
*/const P=L(class extends R{constructor(e){if(super(e),e.type!==z||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const r=e.element.classList;for(const e of this.st)e in t||(r.remove(e),this.st.delete(e));for(const e in t){const o=!!t[e];o===this.st.has(e)||this.nt?.has(e)||(o?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return n}}),O="cubic-bezier(0.2, 0, 0, 1)";
|
|
71
71
|
/**
|
|
72
72
|
* @license
|
|
73
73
|
* Copyright 2021 Google LLC
|
|
74
74
|
* SPDX-License-Identifier: Apache-2.0
|
|
75
|
-
*/var
|
|
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 B=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],V=window.matchMedia("(forced-colors: active)");class Ripple extends v{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=D.INACTIVE,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 o`<div class="surface ${P(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.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.endPressAnimation()}determineRippleSize(){const{height:e,width:t}=this.getBoundingClientRect(),r=Math.max(e,t),o=Math.max(.35*r,75),a=this.currentCSSZoom??1,n=Math.floor(.2*r/a),l=Math.sqrt(t**2+e**2)+10;this.initialSize=n;const s=(l+o)/n;this.rippleScale=""+s/a,this.rippleSize=`${n}px`}getNormalizedPointerEventCoords(e){const{scrollX:t,scrollY:r}=window,{left:o,top:a}=this.getBoundingClientRect(),n=t+o,l=r+a,{pageX:s,pageY:d}=e,c=this.currentCSSZoom??1;return{x:(s-n)/c,y:(d-l)/c}}getTranslationCoordinates(e){const{height:t,width:r}=this.getBoundingClientRect(),o=this.currentCSSZoom??1,a={x:(r/o-this.initialSize)/2,y:(t/o-this.initialSize)/2};let n;return n=e instanceof PointerEvent?this.getNormalizedPointerEventCoords(e):{x:r/o/2,y:t/o/2},n={x:n.x-this.initialSize/2,y:n.y-this.initialSize/2},{startPoint:n,endPoint:a}}startPressAnimation(e){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:t,endPoint:r}=this.getTranslationCoordinates(e),o=`${t.x}px, ${t.y}px`,a=`${r.x}px, ${r.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${o}) scale(1)`,`translate(${a}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:O,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}isTouch({pointerType:e}){return"touch"===e}async handleEvent(e){if(!V?.matches)switch(e.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(e);break;case"pointerdown":await this.handlePointerdown(e);break;case"pointerenter":this.handlePointerenter(e);break;case"pointerleave":this.handlePointerleave(e);break;case"pointerup":this.handlePointerup(e)}}onControlChange(e,t){for(const r of B)e?.removeEventListener(r,this),t?.addEventListener(r,this)}}e([h({type:Boolean,reflect:!0})],Ripple.prototype,"disabled",void 0),e([g()],Ripple.prototype,"hovered",void 0),e([g()],Ripple.prototype,"pressed",void 0),e([y(".surface")],Ripple.prototype,"mdRoot",void 0);
|
|
76
76
|
/**
|
|
77
77
|
* @license
|
|
78
78
|
* Copyright 2024 Google LLC
|
|
79
79
|
* SPDX-License-Identifier: Apache-2.0
|
|
80
80
|
*/
|
|
81
|
-
const
|
|
81
|
+
const M=a`: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}
|
|
82
82
|
`
|
|
83
83
|
/**
|
|
84
84
|
* @license
|
|
85
85
|
* Copyright 2022 Google LLC
|
|
86
86
|
* SPDX-License-Identifier: Apache-2.0
|
|
87
|
-
*/;let q=class MdRipple extends Ripple{};q.styles=[
|
|
87
|
+
*/;let q=class MdRipple extends Ripple{};q.styles=[M],q=e([m("md-ripple")],q);
|
|
88
88
|
/**
|
|
89
89
|
* @license
|
|
90
90
|
* Copyright 2023 Google LLC
|
|
@@ -110,7 +110,7 @@ const N=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaCo
|
|
|
110
110
|
* @license
|
|
111
111
|
* Copyright 2019 Google LLC
|
|
112
112
|
* SPDX-License-Identifier: Apache-2.0
|
|
113
|
-
*/(),t}(e)))}let ee=!1;const te=W(J(v));class Button extends te{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[X].form}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.href="",this.download="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",this.addEventListener("click",this.handleClick.bind(this))}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}render(){const e
|
|
113
|
+
*/(),t}(e)))}let ee=!1;const te=W(J(v));class Button extends te{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[X].form}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.href="",this.download="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",this.addEventListener("click",this.handleClick.bind(this))}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}render(){const e=this.disabled||this.softDisabled,t=this.href?this.renderLink():this.renderButton(),r=this.href?"link":"button";return o`
|
|
114
114
|
${this.renderElevationOrOutline?.()}
|
|
115
115
|
<div class="background"></div>
|
|
116
116
|
<md-focus-ring part="focus-ring" for=${r}></md-focus-ring>
|
|
@@ -134,6 +134,8 @@ const N=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaCo
|
|
|
134
134
|
aria-label="${e||l}"
|
|
135
135
|
aria-haspopup="${t||l}"
|
|
136
136
|
aria-expanded="${r||l}"
|
|
137
|
+
aria-disabled=${this.disabled||this.softDisabled||l}
|
|
138
|
+
tabindex="${this.disabled&&!this.softDisabled?-1:l}"
|
|
137
139
|
href=${this.href}
|
|
138
140
|
download=${this.download||l}
|
|
139
141
|
target=${this.target||l}
|
|
@@ -145,7 +147,7 @@ const N=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaCo
|
|
|
145
147
|
${this.trailingIcon?l:e}
|
|
146
148
|
<span class="label"><slot></slot></span>
|
|
147
149
|
${this.trailingIcon?e:l}
|
|
148
|
-
`}handleClick(e){if(
|
|
150
|
+
`}handleClick(e){if(this.softDisabled||this.disabled&&this.href)return e.stopImmediatePropagation(),void e.preventDefault();Q(e)&&this.buttonElement&&(this.focus(),
|
|
149
151
|
/**
|
|
150
152
|
* @license
|
|
151
153
|
* Copyright 2021 Google LLC
|
|
@@ -164,7 +166,7 @@ class FilledTonalButton extends Button{renderElevationOrOutline(){return o`<md-e
|
|
|
164
166
|
* SPDX-License-Identifier: Apache-2.0
|
|
165
167
|
*/const re=a`: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)}
|
|
166
168
|
`,oe=a`md-elevation{transition-duration:280ms}:host(:is([disabled],[soft-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(:is([disabled],[soft-disabled])) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)}
|
|
167
|
-
`,ie=a`: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(:is([disabled],[soft-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;text-transform: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
|
|
169
|
+
`,ie=a`: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(:is([disabled],[soft-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;text-transform: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:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-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(:is([disabled],[soft-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}
|
|
168
170
|
`
|
|
169
171
|
/**
|
|
170
172
|
* @license
|
|
@@ -215,7 +217,7 @@ class Field extends v{constructor(){super(...arguments),this.disabled=!1,this.er
|
|
|
215
217
|
<span class="label ${P(r)}" aria-hidden=${!t}
|
|
216
218
|
>${a}</span
|
|
217
219
|
>
|
|
218
|
-
`}animateLabelIfNeeded({wasFocused:e,wasPopulated:t}){if(!this.label)return;e??=this.focused,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:
|
|
220
|
+
`}animateLabelIfNeeded({wasFocused:e,wasPopulated:t}){if(!this.label)return;e??=this.focused,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:O}),this.labelAnimation?.addEventListener("finish",(()=>{this.isAnimating=!1})))}getLabelKeyframes(){const{floatingLabelEl:e,restingLabelEl:t}=this;if(!e||!t)return[];const{x:r,y:o,height:a}=e.getBoundingClientRect(),{x:n,y:l,height:s}=t.getBoundingClientRect(),d=e.scrollWidth,c=t.scrollWidth,u=c/d,p=`translateX(${n-r}px) translateY(${l-o+Math.round((s-a*u)/2)}px) scale(${u})`,h="translateX(0) translateY(0) scale(1)",v=t.clientWidth,m=c>v?v/u+"px":"";return this.focused||this.populated?[{transform:p,width:m},{transform:h,width:m}]:[{transform:h,width:m},{transform:p,width:m}]}getSurfacePositionClientRect(){return this.containerEl.getBoundingClientRect()}}e([h({type:Boolean})],Field.prototype,"disabled",void 0),e([h({type:Boolean})],Field.prototype,"error",void 0),e([h({type:Boolean})],Field.prototype,"focused",void 0),e([h()],Field.prototype,"label",void 0),e([h({type:Boolean,attribute:"no-asterisk"})],Field.prototype,"noAsterisk",void 0),e([h({type:Boolean})],Field.prototype,"populated",void 0),e([h({type:Boolean})],Field.prototype,"required",void 0),e([h({type:Boolean})],Field.prototype,"resizable",void 0),e([h({attribute:"supporting-text"})],Field.prototype,"supportingText",void 0),e([h({attribute:"error-text"})],Field.prototype,"errorText",void 0),e([h({type:Number})],Field.prototype,"count",void 0),e([h({type:Number})],Field.prototype,"max",void 0),e([h({type:Boolean,attribute:"has-start"})],Field.prototype,"hasStart",void 0),e([h({type:Boolean,attribute:"has-end"})],Field.prototype,"hasEnd",void 0),e([_({slot:"aria-describedby"})],Field.prototype,"slottedAriaDescribedBy",void 0),e([g()],Field.prototype,"isAnimating",void 0),e([g()],Field.prototype,"refreshErrorAlert",void 0),e([g()],Field.prototype,"disableTransitions",void 0),e([y(".label.floating")],Field.prototype,"floatingLabelEl",void 0),e([y(".label.resting")],Field.prototype,"restingLabelEl",void 0),e([y(".container")],Field.prototype,"containerEl",void 0);
|
|
219
221
|
/**
|
|
220
222
|
* @license
|
|
221
223
|
* Copyright 2021 Google LLC
|
|
@@ -260,7 +262,7 @@ const de=Symbol.for(""),ce=e=>{if(e?.r===de)return e?._$litStatic$},ue=(e,...t)=
|
|
|
260
262
|
* @license
|
|
261
263
|
* Copyright 2020 Google LLC
|
|
262
264
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
263
|
-
*/,me={},fe=L(class extends R{constructor(e){if(super(e),e.type!==
|
|
265
|
+
*/,me={},fe=L(class extends R{constructor(e){if(super(e),e.type!==S&&e.type!==z&&e.type!==I)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===n||t===l)return t;const r=e.element,o=e.name;if(e.type===S){if(t===r[o])return n}else if(e.type===I){if(!!t===r.hasAttribute(o))return n}else if(e.type===z&&r.getAttribute(o)===t+"")return n;return((e,t=me)=>{e._$AH=t;
|
|
264
266
|
/**
|
|
265
267
|
* @license
|
|
266
268
|
* Copyright 2020 Google LLC
|
|
@@ -288,7 +290,7 @@ const Ae=Symbol("getFormValue"),Ee=Symbol("getFormState");
|
|
|
288
290
|
* Copyright 2023 Google LLC
|
|
289
291
|
* SPDX-License-Identifier: Apache-2.0
|
|
290
292
|
*/
|
|
291
|
-
const ke=Symbol("onReportValidity"),Fe=Symbol("privateCleanupFormListeners"),ze=Symbol("privateDoNotReportInvalid"),
|
|
293
|
+
const ke=Symbol("onReportValidity"),Fe=Symbol("privateCleanupFormListeners"),ze=Symbol("privateDoNotReportInvalid"),Se=Symbol("privateIsSelfReportingValidity"),Ie=Symbol("privateCallOnReportValidity");const Le=new WeakMap;
|
|
292
294
|
/**
|
|
293
295
|
* @license
|
|
294
296
|
* Copyright 2023 Google LLC
|
|
@@ -304,7 +306,7 @@ class Validator{constructor(e){this.getCurrentState=e,this.currentValidity={vali
|
|
|
304
306
|
* @license
|
|
305
307
|
* Copyright 2021 Google LLC
|
|
306
308
|
* SPDX-License-Identifier: Apache-2.0
|
|
307
|
-
*/const Pe=W(function(e){var t,r,o;class OnReportValidityElement extends e{constructor(...e){super(...e),this[t]=new AbortController,this[r]=!1,this[o]=!1,this.addEventListener("invalid",(e=>{!this[ze]&&e.isTrusted&&this.addEventListener("invalid",(()=>{this[
|
|
309
|
+
*/const Pe=W(function(e){var t,r,o;class OnReportValidityElement extends e{constructor(...e){super(...e),this[t]=new AbortController,this[r]=!1,this[o]=!1,this.addEventListener("invalid",(e=>{!this[ze]&&e.isTrusted&&this.addEventListener("invalid",(()=>{this[Ie](e)}),{once:!0})}),{capture:!0})}checkValidity(){this[ze]=!0;const e=super.checkValidity();return this[ze]=!1,e}reportValidity(){this[Se]=!0;const e=super.reportValidity();return e&&this[Ie](null),this[Se]=!1,e}[(t=Fe,r=ze,o=Se,Ie)](e){const t=e?.defaultPrevented;if(t)return;this[ke](e);!t&&e?.defaultPrevented&&(this[Se]||function(e,t){if(!e)return!0;let r;for(const t of e.elements)if(t.matches(":invalid")){r=t;break}return r===t}(this[X].form,this))&&this.focus()}[ke](e){throw new Error("Implement [onReportValidity]")}formAssociatedCallback(e){super.formAssociatedCallback&&super.formAssociatedCallback(e),this[Fe].abort(),e&&(this[Fe]=new AbortController,function(e,t,r,o){const a=function(e){if(!Le.has(e)){const t=new EventTarget;Le.set(e,t);for(const r of["reportValidity","requestSubmit"]){const o=e[r];e[r]=function(){t.dispatchEvent(new Event("before"));const e=Reflect.apply(o,this,arguments);return t.dispatchEvent(new Event("after")),e}}}return Le.get(e)}(t);let n,l=!1,s=!1;a.addEventListener("before",(()=>{s=!0,n=new AbortController,l=!1,e.addEventListener("invalid",(()=>{l=!0}),{signal:n.signal})}),{signal:o}),a.addEventListener("after",(()=>{s=!1,n?.abort(),l||r()}),{signal:o}),t.addEventListener("submit",(()=>{s||r()}),{signal:o})}(this,e,(()=>{this[Ie](null)}),this[Fe].signal))}}return OnReportValidityElement}(function(e){var t;class ConstraintValidationElement extends e{constructor(){super(...arguments),this[t]=""}get validity(){return this[Te](),this[X].validity}get validationMessage(){return this[Te](),this[X].validationMessage}get willValidate(){return this[Te](),this[X].willValidate}checkValidity(){return this[Te](),this[X].checkValidity()}reportValidity(){return this[Te](),this[X].reportValidity()}setCustomValidity(e){this[$e]=e,this[Te]()}requestUpdate(e,t,r){super.requestUpdate(e,t,r),this[Te]()}firstUpdated(e){super.firstUpdated(e),this[Te]()}[(t=$e,Te)](){this[Ce]||(this[Ce]=this[_e]());const{validity:e,validationMessage:t}=this[Ce].getValidity(),r=!!this[$e],o=this[$e]||t;this[X].setValidity({...e,customError:r},o,this[we]()??void 0)}[_e](){throw new Error("Implement [createValidator]")}[we](){throw new Error("Implement [getValidityAnchor]")}}return ConstraintValidationElement}(function(t){class FormAssociatedElement extends t{get form(){return this[X].form}get labels(){return this[X].labels}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get disabled(){return this.hasAttribute("disabled")}set disabled(e){this.toggleAttribute("disabled",e)}attributeChangedCallback(e,t,r){if("name"!==e&&"disabled"!==e)super.attributeChangedCallback(e,t,r);else{const r="disabled"===e?null!==t:t;this.requestUpdate(e,r)}}requestUpdate(e,t,r){super.requestUpdate(e,t,r),this[X].setFormValue(this[Ae](),this[Ee]())}[Ae](){throw new Error("Implement [getFormValue]")}[Ee](){return this[Ae]()}formDisabledCallback(e){this.disabled=e}}return FormAssociatedElement.formAssociated=!0,e([h({noAccessor:!0})],FormAssociatedElement.prototype,"name",null),e([h({type:Boolean,noAccessor:!0})],FormAssociatedElement.prototype,"disabled",null),FormAssociatedElement}(J(v)))));class TextField extends Pe{constructor(){super(...arguments),this.error=!1,this.errorText="",this.label="",this.noAsterisk=!1,this.required=!1,this.value="",this.prefixText="",this.suffixText="",this.hasLeadingIcon=!1,this.hasTrailingIcon=!1,this.supportingText="",this.textDirection="",this.rows=2,this.cols=20,this.inputMode="",this.max="",this.maxLength=-1,this.min="",this.minLength=-1,this.noSpinner=!1,this.pattern="",this.placeholder="",this.readOnly=!1,this.multiple=!1,this.step="",this.type="text",this.autocomplete="",this.dirty=!1,this.focused=!1,this.nativeError=!1,this.nativeErrorText=""}get selectionDirection(){return this.getInputOrTextarea().selectionDirection}set selectionDirection(e){this.getInputOrTextarea().selectionDirection=e}get selectionEnd(){return this.getInputOrTextarea().selectionEnd}set selectionEnd(e){this.getInputOrTextarea().selectionEnd=e}get selectionStart(){return this.getInputOrTextarea().selectionStart}set selectionStart(e){this.getInputOrTextarea().selectionStart=e}get valueAsNumber(){const e=this.getInput();return e?e.valueAsNumber:NaN}set valueAsNumber(e){const t=this.getInput();t&&(t.valueAsNumber=e,this.value=t.value)}get valueAsDate(){const e=this.getInput();return e?e.valueAsDate:null}set valueAsDate(e){const t=this.getInput();t&&(t.valueAsDate=e,this.value=t.value)}get hasError(){return this.error||this.nativeError}select(){this.getInputOrTextarea().select()}setRangeText(...e){this.getInputOrTextarea().setRangeText(...e),this.value=this.getInputOrTextarea().value}setSelectionRange(e,t,r){this.getInputOrTextarea().setSelectionRange(e,t,r)}showPicker(){const e=this.getInput();e&&e.showPicker()}stepDown(e){const t=this.getInput();t&&(t.stepDown(e),this.value=t.value)}stepUp(e){const t=this.getInput();t&&(t.stepUp(e),this.value=t.value)}reset(){this.dirty=!1,this.value=this.getAttribute("value")??"",this.nativeError=!1,this.nativeErrorText=""}attributeChangedCallback(e,t,r){"value"===e&&this.dirty||super.attributeChangedCallback(e,t,r)}render(){const e={disabled:this.disabled,error:!this.disabled&&this.hasError,textarea:"textarea"===this.type,"no-spinner":this.noSpinner};return o`
|
|
308
310
|
<span class="text-field ${P(e)}">
|
|
309
311
|
${this.renderField()}
|
|
310
312
|
</span>
|
|
@@ -410,19 +412,19 @@ class OutlinedTextField extends TextField{constructor(){super(...arguments),this
|
|
|
410
412
|
* @license
|
|
411
413
|
* Copyright 2024 Google LLC
|
|
412
414
|
* SPDX-License-Identifier: Apache-2.0
|
|
413
|
-
*/const
|
|
415
|
+
*/const Oe=a`:host{display:inline-flex;outline:none;resize:both;text-align:start;-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}slot[name=container]{border-radius:inherit}.icon{color:currentColor;display:flex;align-items:center;justify-content:center;fill:currentColor;position:relative}.icon ::slotted(*){display:flex;position:absolute}[has-start] .icon.leading{font-size:var(--_leading-icon-size);height:var(--_leading-icon-size);width:var(--_leading-icon-size)}[has-end] .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)}
|
|
414
416
|
`
|
|
415
417
|
/**
|
|
416
418
|
* @license
|
|
417
419
|
* Copyright 2021 Google LLC
|
|
418
420
|
* SPDX-License-Identifier: Apache-2.0
|
|
419
|
-
*/;let
|
|
421
|
+
*/;let De=class MdOutlinedTextField extends OutlinedTextField{constructor(){super(...arguments),this.fieldTag=ue`md-outlined-field`}};De.styles=[Oe,ve],De=e([m("md-outlined-text-field")],De);
|
|
420
422
|
/**
|
|
421
423
|
* @license
|
|
422
424
|
* Copyright 2023 Google LLC
|
|
423
425
|
* SPDX-License-Identifier: Apache-2.0
|
|
424
426
|
*/
|
|
425
|
-
const
|
|
427
|
+
const Be=W(v);class Progress extends Be{constructor(){super(...arguments),this.value=0,this.max=1,this.indeterminate=!1,this.fourColor=!1}render(){const{ariaLabel:e}=this;return o`
|
|
426
428
|
<div
|
|
427
429
|
class="progress ${P(this.getRenderClasses())}"
|
|
428
430
|
role="progressbar"
|
|
@@ -458,13 +460,13 @@ class CircularProgress extends Progress{renderIndicator(){return this.indetermin
|
|
|
458
460
|
* @license
|
|
459
461
|
* Copyright 2024 Google LLC
|
|
460
462
|
* SPDX-License-Identifier: Apache-2.0
|
|
461
|
-
*/const
|
|
463
|
+
*/const Ve=a`: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)}}
|
|
462
464
|
`
|
|
463
465
|
/**
|
|
464
466
|
* @license
|
|
465
467
|
* Copyright 2023 Google LLC
|
|
466
468
|
* SPDX-License-Identifier: Apache-2.0
|
|
467
|
-
*/;let
|
|
469
|
+
*/;let Me=class MdCircularProgress extends CircularProgress{};Me.styles=[Ve],Me=e([m("md-circular-progress")],Me);let qe=(()=>{let e,n,l,h,v,m,g,x,y,_=[p("custom-upload-image")],w=[],C=b(c),T=[],$=[],A=[],E=[],k=[],F=[],z=[],S=[],I=[],L=[],R=[],P=[],O=[],D=[];return class extends C{static{n=this}static{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(C[Symbol.metadata]??null):void 0;l=[u("custom-pages")],h=[d({type:Array,consumes:!0})],v=[u("custom-tabs")],m=[d({type:Boolean,reflect:!0})],g=[d({type:Boolean})],x=[d({type:Boolean})],y=[d({type:Boolean,attribute:"has-library"})],t(this,null,l,{kind:"accessor",name:"pages",static:!1,private:!1,access:{has:e=>"pages"in e,get:e=>e.pages,set:(e,t)=>{e.pages=t}},metadata:r},T,$),t(this,null,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:r},A,E),t(this,null,v,{kind:"accessor",name:"selector",static:!1,private:!1,access:{has:e=>"selector"in e,get:e=>e.selector,set:(e,t)=>{e.selector=t}},metadata:r},k,F),t(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:r},z,S),t(this,null,g,{kind:"accessor",name:"frontCameraDisabled",static:!1,private:!1,access:{has:e=>"frontCameraDisabled"in e,get:e=>e.frontCameraDisabled,set:(e,t)=>{e.frontCameraDisabled=t}},metadata:r},I,L),t(this,null,x,{kind:"accessor",name:"rearCameraDisabled",static:!1,private:!1,access:{has:e=>"rearCameraDisabled"in e,get:e=>e.rearCameraDisabled,set:(e,t)=>{e.rearCameraDisabled=t}},metadata:r},R,P),t(this,null,y,{kind:"accessor",name:"hasLibrary",static:!1,private:!1,access:{has:e=>"hasLibrary"in e,get:e=>e.hasLibrary,set:(e,t)=>{e.hasLibrary=t}},metadata:r},O,D),t(null,e={value:n},_,{kind:"class",name:n.name,metadata:r},null,w),n=e.value,r&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})}deviceApi=new f;#e=r(this,T,void 0);get pages(){return this.#e}set pages(e){this.#e=e}#t=(r(this,$),r(this,A,void 0));get images(){return this.#t}set images(e){this.#t=e}#r=(r(this,E),r(this,k,void 0));get selector(){return this.#r}set selector(e){this.#r=e}#o=(r(this,F),r(this,z,!1));get open(){return this.#o}set open(e){this.#o=e}#i=(r(this,S),r(this,I,!1));get frontCameraDisabled(){return this.#i}set frontCameraDisabled(e){this.#i=e}#a=(r(this,L),r(this,R,!1));get rearCameraDisabled(){return this.#a}set rearCameraDisabled(e){this.#a=e}#n=(r(this,P),r(this,O,void 0));get hasLibrary(){return this.#n}set hasLibrary(e){this.#n=e}static styles=[a`
|
|
468
470
|
:host {
|
|
469
471
|
display: block;
|
|
470
472
|
}
|
|
@@ -557,7 +559,7 @@ class CircularProgress extends Progress{renderIndicator(){return this.indetermin
|
|
|
557
559
|
md-dialog {
|
|
558
560
|
--_container-color: #2d2f31;
|
|
559
561
|
}
|
|
560
|
-
`];get#l(){return this.shadowRoot.querySelector("custom-dialog")}get#s(){return this.shadowRoot.querySelector(".camera-preview")}#d=(r(this,
|
|
562
|
+
`];get#l(){return this.shadowRoot.querySelector("custom-dialog")}get#s(){return this.shadowRoot.querySelector(".camera-preview")}#d=(r(this,D),"user");#c={data:null,type:null};#u=async()=>{const e=await this.deviceApi.camera.takePhoto(this.#d);this.#c.data=await globalThis.readAsDataURL(e),this.#c.type="base64";const t=document.createElement("img");t.src=this.#c.data,this.shadowRoot.querySelector("flex-container").replaceChild(t.cloneNode(!0),this.#s)};#p=({})=>{const e=document.createElement("input");e.type="file",e.multiple=!0;const t=async r=>{const o=await Promise.all(Array.from(e.files).map((async e=>{const t=await this.readAsDataURL(e),r=document.createElement("md-list-item");return r.headline=e.name,r.setAttribute("noninteractive",""),r.innerHTML=`\n <img data-variant="icon" slot="start" src="${t}">\n <md-standard-icon-button slot="end"><custom-icon>delete</custom-icon></md-standard-icon-button>\n `,r.onclick=()=>{this.shadowRoot.querySelector('section[route="file"]').removeChild(r)},this.shadowRoot.querySelector('section[route="file"]').appendChild(r),{name:e.name,data:t}})));this.#c.data=o,this.#c.type="base64[]",e.removeEventListener("change",t)};e.addEventListener("change",t),e.click()};onChange(e,t){"open"===e&&t&&(this.hasLibrary?this.select("library"):this.select("url"))}select(e){this.selector.select(e)}#h=async({detail:e})=>{this.shadowRoot.querySelector("custom-pages").select(e),"camera"===e&&(this.frontCameraDisabled=!await this.deviceApi.hasFrontCam(),this.rearCameraDisabled=!await this.deviceApi.hasBackCam(),this.deviceApi.camera.preview(this.#s,this.#d))};#v=(e,t)=>{this.#c.data=t,this.#c.type="library"};show(){this.#l.open=!0}#m(){return o`
|
|
561
563
|
<form id="form-content" method="dialog">
|
|
562
564
|
<custom-tabs attr-for-selected="route" @selected=${this.#h.bind(this)}>
|
|
563
565
|
${this.hasLibrary?o`
|
package/exports/pane.js
CHANGED
|
@@ -93,8 +93,10 @@ let CustomPane = (() => {
|
|
|
93
93
|
<slot name="headline"></slot>
|
|
94
94
|
<flex-it></flex-it>
|
|
95
95
|
|
|
96
|
-
<
|
|
97
|
-
|
|
96
|
+
<slot name="close">
|
|
97
|
+
<custom-icon-button @click=${(e) => this.closePane(e)} .id=${this.id} .icon=${this.icon || 'menu_open'}>
|
|
98
|
+
</custom-icon-button>
|
|
99
|
+
</slot>
|
|
98
100
|
</flex-row>
|
|
99
101
|
</slot>
|
|
100
102
|
<flex-column class="content">
|
|
@@ -15,7 +15,7 @@ export declare class CustomDrawerLayout extends LiteElement {
|
|
|
15
15
|
accessor mobileTrigger: string;
|
|
16
16
|
onChange(propertyKey: string, value: any): void;
|
|
17
17
|
connectedCallback(): void;
|
|
18
|
-
_onnarrow({ detail }: CustomEvent):
|
|
18
|
+
_onnarrow({ detail }: CustomEvent): false | undefined;
|
|
19
19
|
private _click;
|
|
20
20
|
render(): import("lit-html").TemplateResult<1>;
|
|
21
21
|
}
|
|
@@ -8,7 +8,7 @@ export declare class SelectBase extends LiteElement {
|
|
|
8
8
|
get defaultSelected(): string | 0;
|
|
9
9
|
set selected(value: string | number | HTMLElement | string[] | HTMLElement[]);
|
|
10
10
|
get selected(): string | number | HTMLElement | string[] | HTMLElement[];
|
|
11
|
-
get slotted(): HTMLSlotElement | this;
|
|
11
|
+
get slotted(): HTMLSlotElement | this | null;
|
|
12
12
|
get attrForSelected(): string;
|
|
13
13
|
/**
|
|
14
14
|
* get the attribute used to set selected
|
|
@@ -27,6 +27,6 @@ export declare class SelectBase extends LiteElement {
|
|
|
27
27
|
select(selected: any): void;
|
|
28
28
|
next(): void;
|
|
29
29
|
previous(): void;
|
|
30
|
-
getIndexFor(element: any):
|
|
30
|
+
getIndexFor(element: any): any;
|
|
31
31
|
}
|
|
32
32
|
export declare function SelectMixin<TBase extends CustomElementConstructor>(Base: TBase): typeof SelectBase;
|
|
@@ -5,7 +5,7 @@ import './../pane/pane.js';
|
|
|
5
5
|
import '@vandeurenglenn/flex-elements/row.js';
|
|
6
6
|
export declare class CustomNotifications extends LiteElement {
|
|
7
7
|
accessor open: boolean;
|
|
8
|
-
get _list(): Element;
|
|
8
|
+
get _list(): Element | null;
|
|
9
9
|
createNotification({ title, message, image }: {
|
|
10
10
|
title: string;
|
|
11
11
|
message: string;
|
|
@@ -5,14 +5,14 @@ export default class HashRouter {
|
|
|
5
5
|
routes: RoutesOption;
|
|
6
6
|
constructor({ host, fallback, routes }: HashRouterConstructorOptions);
|
|
7
7
|
static queryIt(params: any): string;
|
|
8
|
-
static dequeryIt(query: any): {};
|
|
8
|
+
static dequeryIt(query: any): {} | undefined;
|
|
9
9
|
static bang(route: string): string;
|
|
10
10
|
static debang(route: string): string;
|
|
11
11
|
static parseHash(hash: any): {
|
|
12
12
|
route: string;
|
|
13
13
|
routes: string[];
|
|
14
14
|
subRoutes: string[];
|
|
15
|
-
params: {};
|
|
15
|
+
params: {} | undefined;
|
|
16
16
|
url: string;
|
|
17
17
|
};
|
|
18
18
|
}
|