@vandeurenglenn/lite-elements 0.3.85 → 0.4.0
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-DdHjND9w.js +1 -0
- package/exports/bundle/custom-element-Wj8bC3gl.js +1 -0
- package/exports/bundle/dark-mode2-CBfmAvIL.js +11 -0
- package/exports/bundle/{dark-mode2-AFovKiD8.js → dark-mode2-DBD32xmy.js} +1 -1
- 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 +2 -2
- 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/file-reader-mixin.js +1 -1
- package/exports/bundle/hash-router.js +1 -1
- package/exports/bundle/icon-button.js +1 -1
- package/exports/bundle/icon-set.js +2 -2
- 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 +1 -1
- package/exports/bundle/prompt.js +1 -1
- package/exports/bundle/property-EGWO0JMT.js +23 -0
- package/exports/bundle/query-DK39_nIZ.js +1 -0
- package/exports/bundle/rail.js +1 -1
- package/exports/bundle/root.js +1 -1
- package/exports/bundle/row-B1G5fFY7.js +28 -0
- package/exports/bundle/scroll-mixin.js +1 -1
- package/exports/bundle/section.js +2 -2
- 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 +2 -2
- package/exports/bundle/typography.js +1 -1
- package/exports/bundle/upload-file.js +1 -1
- package/exports/bundle/upload-image.js +19 -19
- package/package.json +7 -7
- package/exports/bundle/column-Ci52gPdn.js +0 -1
- package/exports/bundle/custom-element-B_TPyPQO.js +0 -1
- package/exports/bundle/dark-mode2-CXqeCi6t.js +0 -11
- package/exports/bundle/property-CChxy2ZU.js +0 -23
- package/exports/bundle/query-DCTzLeFk.js +0 -1
- package/exports/bundle/row-CEpFJOUe.js +0 -28
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as e,_ as t,a as r}from"./tslib.es6-B87RQr7F.js";import{
|
|
1
|
+
import{b as e,_ as t,a as r}from"./tslib.es6-B87RQr7F.js";import{b as o,i as a,E as n,A as l,D as s,r as d,t as c}from"./dark-mode2-CBfmAvIL.js";import{t as u}from"./query-DK39_nIZ.js";import{e as p}from"./custom-element-Wj8bC3gl.js";import{n as h,i as v,t as m}from"./property-EGWO0JMT.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
|
|
@@ -8,17 +8,17 @@ import{b as e,_ as t,a as r}from"./tslib.es6-B87RQr7F.js";import{x as o,i as a,T
|
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/const x=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r)
|
|
11
|
+
*/const x=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r);
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
14
14
|
* Copyright 2017 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
-
|
|
16
|
+
*/function y(e,t){return(t,r,o)=>x(t,r,{get(){return(t=>t.renderRoot?.querySelector(e)??null)(this)}})}
|
|
17
17
|
/**
|
|
18
18
|
* @license
|
|
19
19
|
* Copyright 2021 Google LLC
|
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/function _(e){return(t,r)=>{const{slot:o,selector:a}=e??{},n="slot"+(o?`[name=${o}]`:":not([name])");return x(t,r,{get(){const t=this.renderRoot?.querySelector(n),r=t?.assignedElements(e)??[];return void 0===a?r:r.filter(
|
|
21
|
+
*/function _(e){return(t,r)=>{const{slot:o,selector:a}=e??{},n="slot"+(o?`[name=${o}]`:":not([name])");return x(t,r,{get(){const t=this.renderRoot?.querySelector(n),r=t?.assignedElements(e)??[];return void 0===a?r:r.filter(e=>e.matches(a))}})}}
|
|
22
22
|
/**
|
|
23
23
|
* @license
|
|
24
24
|
* Copyright 2022 Google LLC
|
|
@@ -40,7 +40,7 @@ import{b as e,_ as t,a as r}from"./tslib.es6-B87RQr7F.js";import{x as o,i as a,T
|
|
|
40
40
|
* Copyright 2023 Google LLC
|
|
41
41
|
* SPDX-License-Identifier: Apache-2.0
|
|
42
42
|
*/
|
|
43
|
-
const T=Symbol("attachableController");let $;$=new MutationObserver(
|
|
43
|
+
const T=Symbol("attachableController");let $;$=new MutationObserver(e=>{for(const t of e)t.target[T]?.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[T]=this,$?.observe(e,{attributeFilter:["for"]})}attach(e){e!==this.currentControl&&(this.setCurrentControl(e),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(e){this.onControlChange(this.currentControl,e),this.currentControl=e}}
|
|
44
44
|
/**
|
|
45
45
|
* @license
|
|
46
46
|
* Copyright 2021 Google LLC
|
|
@@ -67,12 +67,12 @@ const z=1,S=3,I=4,L=e=>(...t)=>({_$litDirective$:e,values:t});let R=class i{cons
|
|
|
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(
|
|
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 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(
|
|
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
|
|
@@ -95,7 +95,7 @@ const N=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaCo
|
|
|
95
95
|
* @license
|
|
96
96
|
* Copyright 2023 Google LLC
|
|
97
97
|
* SPDX-License-Identifier: Apache-2.0
|
|
98
|
-
*/const H=Symbol("privateIgnoreAttributeChangesFor");function W(e){var t;class WithDelegatesAriaElement extends e{constructor(){super(...arguments),this[t]=new Set}attributeChangedCallback(e,t,r){if(!U(e))return void super.attributeChangedCallback(e,t,r);if(this[H].has(e))return;this[H].add(e),this.removeAttribute(e),this[H].delete(e);const o=K(e);null===r?delete this.dataset[o]:this.dataset[o]=r,this.requestUpdate(K(e),t)}getAttribute(e){return U(e)?super.getAttribute(Y(e)):super.getAttribute(e)}removeAttribute(e){super.removeAttribute(e),U(e)&&(super.removeAttribute(Y(e)),this.requestUpdate())}}return t=H,function(e){for(const t of N){const r=G(t),o=Y(r),a=K(r);e.createProperty(t,{attribute:r,noAccessor:!0}),e.createProperty(Symbol(o),{attribute:o,noAccessor:!0}),Object.defineProperty(e.prototype,t,{configurable:!0,enumerable:!0,get(){return this.dataset[a]??null},set(e){const r=this.dataset[a]??null;e!==r&&(null===e?delete this.dataset[a]:this.dataset[a]=e,this.requestUpdate(t,r))}})}}(WithDelegatesAriaElement),WithDelegatesAriaElement}function Y(e){return`data-${e}`}function K(e){return e.replace(/-\w/,
|
|
98
|
+
*/const H=Symbol("privateIgnoreAttributeChangesFor");function W(e){var t;class WithDelegatesAriaElement extends e{constructor(){super(...arguments),this[t]=new Set}attributeChangedCallback(e,t,r){if(!U(e))return void super.attributeChangedCallback(e,t,r);if(this[H].has(e))return;this[H].add(e),this.removeAttribute(e),this[H].delete(e);const o=K(e);null===r?delete this.dataset[o]:this.dataset[o]=r,this.requestUpdate(K(e),t)}getAttribute(e){return U(e)?super.getAttribute(Y(e)):super.getAttribute(e)}removeAttribute(e){super.removeAttribute(e),U(e)&&(super.removeAttribute(Y(e)),this.requestUpdate())}}return t=H,function(e){for(const t of N){const r=G(t),o=Y(r),a=K(r);e.createProperty(t,{attribute:r,noAccessor:!0}),e.createProperty(Symbol(o),{attribute:o,noAccessor:!0}),Object.defineProperty(e.prototype,t,{configurable:!0,enumerable:!0,get(){return this.dataset[a]??null},set(e){const r=this.dataset[a]??null;e!==r&&(null===e?delete this.dataset[a]:this.dataset[a]=e,this.requestUpdate(t,r))}})}}(WithDelegatesAriaElement),WithDelegatesAriaElement}function Y(e){return`data-${e}`}function K(e){return e.replace(/-\w/,e=>e[1].toUpperCase())}
|
|
99
99
|
/**
|
|
100
100
|
* @license
|
|
101
101
|
* Copyright 2023 Google LLC
|
|
@@ -153,7 +153,7 @@ const N=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaCo
|
|
|
153
153
|
* Copyright 2021 Google LLC
|
|
154
154
|
* SPDX-License-Identifier: Apache-2.0
|
|
155
155
|
*/
|
|
156
|
-
function(e){const t=new MouseEvent("click",{bubbles:!0});e.dispatchEvent(t)}(this.buttonElement))}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}}Button.addInitializer(
|
|
156
|
+
function(e){const t=new MouseEvent("click",{bubbles:!0});e.dispatchEvent(t)}(this.buttonElement))}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}}Button.addInitializer(e=>{const t=e;t.addEventListener("click",async e=>{const{type:r,[X]:o}=t,{form:a}=o;a&&"button"!==r&&(await new Promise(e=>{setTimeout(e)}),e.defaultPrevented||("reset"!==r?(a.addEventListener("submit",e=>{Object.defineProperty(e,"submitter",{configurable:!0,enumerable:!0,get:()=>t})},{capture:!0,once:!0}),o.setFormValue(t.value),a.requestSubmit()):a.reset()))})}),Button.formAssociated=!0,Button.shadowRootOptions={mode:"open",delegatesFocus:!0},e([h({type:Boolean,reflect:!0})],Button.prototype,"disabled",void 0),e([h({type:Boolean,attribute:"soft-disabled",reflect:!0})],Button.prototype,"softDisabled",void 0),e([h()],Button.prototype,"href",void 0),e([h()],Button.prototype,"download",void 0),e([h()],Button.prototype,"target",void 0),e([h({type:Boolean,attribute:"trailing-icon",reflect:!0})],Button.prototype,"trailingIcon",void 0),e([h({type:Boolean,attribute:"has-icon",reflect:!0})],Button.prototype,"hasIcon",void 0),e([h()],Button.prototype,"type",void 0),e([h({reflect:!0})],Button.prototype,"value",void 0),e([y(".button")],Button.prototype,"buttonElement",void 0),e([_({slot:"icon",flatten:!0})],Button.prototype,"assignedIcons",void 0);
|
|
157
157
|
/**
|
|
158
158
|
* @license
|
|
159
159
|
* Copyright 2021 Google LLC
|
|
@@ -208,7 +208,7 @@ class Field extends v{constructor(){super(...arguments),this.disabled=!1,this.er
|
|
|
208
208
|
</div>
|
|
209
209
|
${this.renderSupportingText()}
|
|
210
210
|
</div>
|
|
211
|
-
`}updated(e){(e.has("supportingText")||e.has("errorText")||e.has("count")||e.has("max"))&&this.updateSlottedAriaDescribedBy(),this.refreshErrorAlert&&requestAnimationFrame((
|
|
211
|
+
`}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 l;const r=o`<span>${e}</span>`,a=t?o`<span class="counter">${t}</span>`:l,n=this.error&&this.errorText&&!this.refreshErrorAlert;return o`
|
|
212
212
|
<div class="supporting-text" role=${n?"alert":l}>${r}${a}</div>
|
|
213
213
|
<slot
|
|
214
214
|
name="aria-describedby"
|
|
@@ -217,7 +217,7 @@ class Field extends v{constructor(){super(...arguments),this.disabled=!1,this.er
|
|
|
217
217
|
<span class="label ${P(r)}" aria-hidden=${!t}
|
|
218
218
|
>${a}</span
|
|
219
219
|
>
|
|
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",(
|
|
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);
|
|
221
221
|
/**
|
|
222
222
|
* @license
|
|
223
223
|
* Copyright 2021 Google LLC
|
|
@@ -256,7 +256,7 @@ class OutlinedField extends Field{renderOutline(e){return o`
|
|
|
256
256
|
* Copyright 2020 Google LLC
|
|
257
257
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
258
258
|
*/
|
|
259
|
-
const de=Symbol.for(""),ce=e=>{if(e?.r===de)return e?._$litStatic$},ue=(e,...t)=>({_$litStatic$:t.reduce(((t,r,o)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(r)+e[o+1]),e[0]),r:de}),pe=new Map,he=(e=>(t,...r)=>{const o=r.length;let a,n;const l=[],s=[];let d,c=0,u=!1;for(;c<o;){for(d=t[c];c<o&&void 0!==(n=r[c],a=ce(n));)d+=a+t[++c],u=!0;c!==o&&s.push(n),l.push(d),c++}if(c===o&&l.push(t[o]),u){const e=l.join("$$lit$$");void 0===(t=pe.get(e))&&(l.raw=l,pe.set(e,t=l)),r=s}return e(t,...r)})(o),ve=a`: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)));--_icon-input-space: var(--md-outlined-text-field-icon-input-space, 16px);--_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));--_with-leading-icon-leading-space: var(--md-outlined-text-field-with-leading-icon-leading-space, 12px);--_with-trailing-icon-trailing-space: var(--md-outlined-text-field-with-trailing-icon-trailing-space, 12px);--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-space: var(--_icon-input-space);--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);--md-outlined-field-with-leading-content-leading-space: var(--_with-leading-icon-leading-space);--md-outlined-field-with-trailing-content-trailing-space: var(--_with-trailing-icon-trailing-space)}
|
|
259
|
+
const de=Symbol.for(""),ce=e=>{if(e?.r===de)return e?._$litStatic$},ue=(e,...t)=>({_$litStatic$:t.reduce((t,r,o)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(r)+e[o+1],e[0]),r:de}),pe=new Map,he=(e=>(t,...r)=>{const o=r.length;let a,n;const l=[],s=[];let d,c=0,u=!1;for(;c<o;){for(d=t[c];c<o&&void 0!==(n=r[c],a=ce(n));)d+=a+t[++c],u=!0;c!==o&&s.push(n),l.push(d),c++}if(c===o&&l.push(t[o]),u){const e=l.join("$$lit$$");void 0===(t=pe.get(e))&&(l.raw=l,pe.set(e,t=l)),r=s}return e(t,...r)})(o),ve=a`: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)));--_icon-input-space: var(--md-outlined-text-field-icon-input-space, 16px);--_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));--_with-leading-icon-leading-space: var(--md-outlined-text-field-with-leading-icon-leading-space, 12px);--_with-trailing-icon-trailing-space: var(--md-outlined-text-field-with-trailing-icon-trailing-space, 12px);--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-space: var(--_icon-input-space);--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);--md-outlined-field-with-leading-content-leading-space: var(--_with-leading-icon-leading-space);--md-outlined-field-with-trailing-content-trailing-space: var(--_with-trailing-icon-trailing-space)}
|
|
260
260
|
`
|
|
261
261
|
/**
|
|
262
262
|
* @license
|
|
@@ -267,7 +267,7 @@ const de=Symbol.for(""),ce=e=>{if(e?.r===de)return e?._$litStatic$},ue=(e,...t)=
|
|
|
267
267
|
* @license
|
|
268
268
|
* Copyright 2020 Google LLC
|
|
269
269
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
270
|
-
*/})(e),t}}),be="important",ge=" !"+be,xe=L(class extends R{constructor(e){if(super(e),e.type!==z||"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((
|
|
270
|
+
*/})(e),t}}),be="important",ge=" !"+be,xe=L(class extends R{constructor(e){if(super(e),e.type!==z||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,r)=>{const o=e[r];return null==o?t:t+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(e,[t]){const{style:r}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?r.removeProperty(e):r[e]=null);for(const e in t){const o=t[e];if(null!=o){this.ft.add(e);const t="string"==typeof o&&o.endsWith(ge);e.includes("-")||t?r.setProperty(e,t?o.slice(0,-11):o,t?be:""):r[e]=o}}return n}}),ye={fromAttribute:e=>e??"",toAttribute:e=>e||null};
|
|
271
271
|
/**
|
|
272
272
|
* @license
|
|
273
273
|
* Copyright 2024 Google LLC
|
|
@@ -306,7 +306,7 @@ class Validator{constructor(e){this.getCurrentState=e,this.currentValidity={vali
|
|
|
306
306
|
* @license
|
|
307
307
|
* Copyright 2021 Google LLC
|
|
308
308
|
* SPDX-License-Identifier: Apache-2.0
|
|
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",
|
|
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){const r="disabled"===e?null!==t:t;return void this.requestUpdate(e,r)}super.attributeChangedCallback(e,t,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`
|
|
310
310
|
<span class="text-field ${P(e)}">
|
|
311
311
|
${this.renderField()}
|
|
312
312
|
</span>
|
|
@@ -401,7 +401,7 @@ class Validator{constructor(e){this.getCurrentState=e,this.currentValidity={vali
|
|
|
401
401
|
* Copyright 2021 Google LLC
|
|
402
402
|
* SPDX-License-Identifier: Apache-2.0
|
|
403
403
|
*/
|
|
404
|
-
function(e,t){!t.bubbles||e.shadowRoot&&!t.composed||t.stopPropagation();const r=Reflect.construct(t.constructor,[t.type,t]),o=e.dispatchEvent(r);o||t.preventDefault()}(this,e)}getInputOrTextarea(){return this.inputOrTextarea||(this.connectedCallback(),this.scheduleUpdate()),this.isUpdatePending&&this.scheduleUpdate(),this.inputOrTextarea}getInput(){return"textarea"===this.type?null:this.getInputOrTextarea()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0,this.hasTrailingIcon=this.trailingIcons.length>0}[Ae](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}focus(){this.getInputOrTextarea().focus()}[_e](){return new TextFieldValidator((
|
|
404
|
+
function(e,t){!t.bubbles||e.shadowRoot&&!t.composed||t.stopPropagation();const r=Reflect.construct(t.constructor,[t.type,t]),o=e.dispatchEvent(r);o||t.preventDefault()}(this,e)}getInputOrTextarea(){return this.inputOrTextarea||(this.connectedCallback(),this.scheduleUpdate()),this.isUpdatePending&&this.scheduleUpdate(),this.inputOrTextarea}getInput(){return"textarea"===this.type?null:this.getInputOrTextarea()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0,this.hasTrailingIcon=this.trailingIcons.length>0}[Ae](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}focus(){this.getInputOrTextarea().focus()}[_e](){return new TextFieldValidator(()=>({state:this,renderedControl:this.inputOrTextarea}))}[we](){return this.inputOrTextarea}[ke](e){e?.preventDefault();const t=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,t===this.getErrorText()&&this.field?.reannounceError()}}TextField.shadowRootOptions={...v.shadowRootOptions,delegatesFocus:!0},e([h({type:Boolean,reflect:!0})],TextField.prototype,"error",void 0),e([h({attribute:"error-text"})],TextField.prototype,"errorText",void 0),e([h()],TextField.prototype,"label",void 0),e([h({type:Boolean,attribute:"no-asterisk"})],TextField.prototype,"noAsterisk",void 0),e([h({type:Boolean,reflect:!0})],TextField.prototype,"required",void 0),e([h()],TextField.prototype,"value",void 0),e([h({attribute:"prefix-text"})],TextField.prototype,"prefixText",void 0),e([h({attribute:"suffix-text"})],TextField.prototype,"suffixText",void 0),e([h({type:Boolean,attribute:"has-leading-icon"})],TextField.prototype,"hasLeadingIcon",void 0),e([h({type:Boolean,attribute:"has-trailing-icon"})],TextField.prototype,"hasTrailingIcon",void 0),e([h({attribute:"supporting-text"})],TextField.prototype,"supportingText",void 0),e([h({attribute:"text-direction"})],TextField.prototype,"textDirection",void 0),e([h({type:Number})],TextField.prototype,"rows",void 0),e([h({type:Number})],TextField.prototype,"cols",void 0),e([h({reflect:!0})],TextField.prototype,"inputMode",void 0),e([h()],TextField.prototype,"max",void 0),e([h({type:Number})],TextField.prototype,"maxLength",void 0),e([h()],TextField.prototype,"min",void 0),e([h({type:Number})],TextField.prototype,"minLength",void 0),e([h({type:Boolean,attribute:"no-spinner"})],TextField.prototype,"noSpinner",void 0),e([h()],TextField.prototype,"pattern",void 0),e([h({reflect:!0,converter:ye})],TextField.prototype,"placeholder",void 0),e([h({type:Boolean,reflect:!0})],TextField.prototype,"readOnly",void 0),e([h({type:Boolean,reflect:!0})],TextField.prototype,"multiple",void 0),e([h()],TextField.prototype,"step",void 0),e([h({reflect:!0})],TextField.prototype,"type",void 0),e([h({reflect:!0})],TextField.prototype,"autocomplete",void 0),e([g()],TextField.prototype,"dirty",void 0),e([g()],TextField.prototype,"focused",void 0),e([g()],TextField.prototype,"nativeError",void 0),e([g()],TextField.prototype,"nativeErrorText",void 0),e([y(".input")],TextField.prototype,"inputOrTextarea",void 0),e([y(".field")],TextField.prototype,"field",void 0),e([_({slot:"leading-icon"})],TextField.prototype,"leadingIcons",void 0),e([_({slot:"trailing-icon"})],TextField.prototype,"trailingIcons",void 0);
|
|
405
405
|
/**
|
|
406
406
|
* @license
|
|
407
407
|
* Copyright 2021 Google LLC
|
|
@@ -559,7 +559,7 @@ class CircularProgress extends Progress{renderIndicator(){return this.indetermin
|
|
|
559
559
|
md-dialog {
|
|
560
560
|
--_container-color: #2d2f31;
|
|
561
561
|
}
|
|
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(
|
|
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`
|
|
563
563
|
<form id="form-content" method="dialog">
|
|
564
564
|
<custom-tabs attr-for-selected="route" @selected=${this.#h.bind(this)}>
|
|
565
565
|
${this.hasLibrary?o`
|
|
@@ -588,12 +588,12 @@ class CircularProgress extends Progress{renderIndicator(){return this.indetermin
|
|
|
588
588
|
${this.hasLibrary?o`
|
|
589
589
|
<section route="library">
|
|
590
590
|
<flex-wrap-around>
|
|
591
|
-
${this.images.map(
|
|
591
|
+
${this.images.map(e=>o`
|
|
592
592
|
<img
|
|
593
593
|
@click=${t=>this.#v.call(this,t,e.firebaseKey)}
|
|
594
594
|
src=${`${location.origin}/api/image?image=${e.link.replace(".png","b.png")}`}
|
|
595
595
|
/>
|
|
596
|
-
`)
|
|
596
|
+
`)}
|
|
597
597
|
</flex-wrap-around>
|
|
598
598
|
</section>
|
|
599
599
|
`:""}
|
|
@@ -652,7 +652,7 @@ class CircularProgress extends Progress{renderIndicator(){return this.indetermin
|
|
|
652
652
|
<flex-one></flex-one>
|
|
653
653
|
<md-text-button form="form-content" value="submit">submit</md-text-button>
|
|
654
654
|
</flex-row>
|
|
655
|
-
`}#f=()=>new Promise((
|
|
655
|
+
`}#f=()=>new Promise((e,t)=>{const r=t=>{const a=Array.from(this.shadowRoot.querySelectorAll("[input-field]")),n={};for(const e of a)n[e.label]=e.value;if(!this.#c.type){const e=this.shadowRoot.querySelector("[input-field]");this.#c.type=e?"url":void 0,this.#c.data=e?.value}const l={type:this.#c.type,data:Array.isArray(this.#c.data)?[...this.#c.data]:this.#c.data};e({action:t.returnValue,fields:n,image:l}),this.#l.removeEventListener("closed",r),this.#c.data=null,this.#c.type=null,this.deviceApi.camera.close(),this.#l.close(),s(o``,this.#l)};this.#l.addEventListener("closed",r)});#b(e,t){return o`
|
|
656
656
|
<flex-row slot="title">
|
|
657
657
|
<h5>${e}</h5>
|
|
658
658
|
</flex-row>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vandeurenglenn/lite-elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "set of lite elements following Material Design 3 spec",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@material-design-icons/svg": "^0.14.15",
|
|
22
|
-
"@material-symbols/svg-400": "^0.
|
|
22
|
+
"@material-symbols/svg-400": "^0.44.0",
|
|
23
23
|
"@material/web": "^2.4.1",
|
|
24
24
|
"@vandeurenglenn/custom-shared-styles": "^0.0.22",
|
|
25
|
-
"@vandeurenglenn/flex-elements": "^1.
|
|
26
|
-
"@vandeurenglenn/lite": "^1.0
|
|
25
|
+
"@vandeurenglenn/flex-elements": "^1.4.0",
|
|
26
|
+
"@vandeurenglenn/lite": "^1.1.0",
|
|
27
27
|
"custom-element-decorator": "^0.6.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"@rollup/plugin-terser": "^1.0.0",
|
|
34
34
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
35
35
|
"@types/html": "^1.0.4",
|
|
36
|
-
"@types/node": "^25.5.
|
|
36
|
+
"@types/node": "^25.5.2",
|
|
37
37
|
"@web/rollup-plugin-html": "^3.1.0",
|
|
38
38
|
"chrome-launcher": "^1.2.1",
|
|
39
39
|
"globby": "^16.2.0",
|
|
40
40
|
"lighthouse": "^13.0.3",
|
|
41
|
-
"material-symbols": "^0.
|
|
41
|
+
"material-symbols": "^0.44.0",
|
|
42
42
|
"rimraf": "^6.1.3",
|
|
43
|
-
"rollup": "^4.60.
|
|
43
|
+
"rollup": "^4.60.1",
|
|
44
44
|
"rollup-plugin-auto-exports": "^1.1.1",
|
|
45
45
|
"rollup-plugin-material-symbols": "^2.1.6",
|
|
46
46
|
"tslib": "^2.8.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as o}from"./row-CEpFJOUe.js";import"./dark-mode2-CXqeCi6t.js";customElements.define("flex-column",class FlexColumn extends o{constructor(){super(),this.direction="column"}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){return(n,{addInitializer:o})=>{o((function(){const o=e??n.name.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase();customElements.get(o)?console.warn(`possibly importing double code or ${e} aleady taken`):customElements.define(o,this)}))}}export{e};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/
|
|
6
|
-
const t=globalThis,e=t.trustedTypes,i=e?e.createPolicy("lit-html",{createHTML:t=>t}):void 0,r="$lit$",o=`lit$${Math.random().toFixed(9).slice(2)}$`,h="?"+o,l=`<${h}>`,a=document,c=()=>a.createComment(""),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,d=Array.isArray,b="[ \t\n\f\r]",p=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,A=/>/g,_=RegExp(`>|${b}(?:([^\\s"'>=/]+)(${b}*=${b}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),f=/'/g,g=/"/g,v=/^(?:script|style|textarea|title)$/i,m=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),y=Symbol.for("lit-noChange"),S=Symbol.for("lit-nothing"),x=new WeakMap,w=a.createTreeWalker(a,129);function C(t,e){if(!d(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==i?i.createHTML(e):e}const T=(t,e)=>{const i=t.length-1,h=[];let a,c=2===e?"<svg>":3===e?"<math>":"",u=p;for(let e=0;e<i;e++){const i=t[e];let d,b,m=-1,y=0;for(;y<i.length&&(u.lastIndex=y,b=u.exec(i),null!==b);)y=u.lastIndex,u===p?"!--"===b[1]?u=$:void 0!==b[1]?u=A:void 0!==b[2]?(v.test(b[2])&&(a=RegExp("</"+b[2],"g")),u=_):void 0!==b[3]&&(u=_):u===_?">"===b[0]?(u=a??p,m=-1):void 0===b[1]?m=-2:(m=u.lastIndex-b[2].length,d=b[1],u=void 0===b[3]?_:'"'===b[3]?g:f):u===g||u===f?u=_:u===$||u===A?u=p:(u=_,a=void 0);const S=u===_&&t[e+1].startsWith("/>")?" ":"";c+=u===p?i+l:m>=0?(h.push(d),i.slice(0,m)+r+i.slice(m)+o+S):i+o+(-2===m?e:S)}return[C(t,c+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),h]};class N{constructor({strings:t,_$litType$:i},l){let a;this.parts=[];let u=0,d=0;const b=t.length-1,p=this.parts,[$,A]=T(t,i);if(this.el=N.createElement($,l),w.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(a=w.nextNode())&&p.length<b;){if(1===a.nodeType){if(a.hasAttributes())for(const t of a.getAttributeNames())if(t.endsWith(r)){const e=A[d++],i=a.getAttribute(t).split(o),r=/([.?@])?(.*)/.exec(e);p.push({type:1,index:u,name:r[2],strings:i,ctor:"."===r[1]?H:"?"===r[1]?I:"@"===r[1]?L:k}),a.removeAttribute(t)}else t.startsWith(o)&&(p.push({type:6,index:u}),a.removeAttribute(t));if(v.test(a.tagName)){const t=a.textContent.split(o),i=t.length-1;if(i>0){a.textContent=e?e.emptyScript:"";for(let e=0;e<i;e++)a.append(t[e],c()),w.nextNode(),p.push({type:2,index:++u});a.append(t[i],c())}}}else if(8===a.nodeType)if(a.data===h)p.push({type:2,index:u});else{let t=-1;for(;-1!==(t=a.data.indexOf(o,t+1));)p.push({type:7,index:u}),t+=o.length-1}u++}}static createElement(t,e){const i=a.createElement("template");return i.innerHTML=t,i}}function E(t,e,i=t,r){if(e===y)return e;let o=void 0!==r?i._$Co?.[r]:i._$Cl;const h=u(e)?void 0:e._$litDirective$;return o?.constructor!==h&&(o?._$AO?.(!1),void 0===h?o=void 0:(o=new h(t),o._$AT(t,i,r)),void 0!==r?(i._$Co??=[])[r]=o:i._$Cl=o),void 0!==o&&(e=E(t,o._$AS(t,e.values),o,r)),e}class M{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,r=(t?.creationScope??a).importNode(e,!0);w.currentNode=r;let o=w.nextNode(),h=0,l=0,c=i[0];for(;void 0!==c;){if(h===c.index){let e;2===c.type?e=new R(o,o.nextSibling,this,t):1===c.type?e=new c.ctor(o,c.name,c.strings,this,t):6===c.type&&(e=new z(o,this,t)),this._$AV.push(e),c=i[++l]}h!==c?.index&&(o=w.nextNode(),h++)}return w.currentNode=a,r}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=S,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=E(this,t,e),u(t)?t===S||null==t||""===t?(this._$AH!==S&&this._$AR(),this._$AH=S):t!==this._$AH&&t!==y&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>d(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==S&&u(this._$AH)?this._$AA.nextSibling.data=t:this.T(a.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=N.createElement(C(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new M(r,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=x.get(t.strings);return void 0===e&&x.set(t.strings,e=new N(t)),e}k(t){d(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const o of t)r===e.length?e.push(i=new R(this.O(c()),this.O(c()),this,this.options)):i=e[r],i._$AI(o),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,o){this.type=1,this._$AH=S,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=S}_$AI(t,e=this,i,r){const o=this.strings;let h=!1;if(void 0===o)t=E(this,t,e,0),h=!u(t)||t!==this._$AH&&t!==y,h&&(this._$AH=t);else{const r=t;let l,a;for(t=o[0],l=0;l<o.length-1;l++)a=E(this,r[i+l],e,l),a===y&&(a=this._$AH[l]),h||=!u(a)||a!==this._$AH[l],a===S?t=S:t!==S&&(t+=(a??"")+o[l+1]),this._$AH[l]=a}h&&!r&&this.j(t)}j(t){t===S?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class H extends k{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===S?void 0:t}}class I extends k{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==S)}}class L extends k{constructor(t,e,i,r,o){super(t,e,i,r,o),this.type=5}_$AI(t,e=this){if((t=E(this,t,e,0)??S)===y)return;const i=this._$AH,r=t===S&&i!==S||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==S&&(i===S||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class z{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}}const O=t.litHtmlPolyfillSupport;O?.(N,R),(t.litHtmlVersions??=[]).push("3.3.0");const P=(t,e,i)=>{const r=i?.renderBefore??e;let o=r._$litPart$;if(void 0===o){const t=i?.renderBefore??null;r._$litPart$=o=new R(e.insertBefore(c(),t),t,void 0,i??{})}return o._$AI(t),o
|
|
7
|
-
/**
|
|
8
|
-
* @license
|
|
9
|
-
* Copyright 2019 Google LLC
|
|
10
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/},U=globalThis,B=U.ShadowRoot&&(void 0===U.ShadyCSS||U.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,W=Symbol(),V=new WeakMap;class n{constructor(t,e,i){if(this._$cssResult$=!0,i!==W)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(B&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=V.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&V.set(e,t))}return t}toString(){return this.cssText}}const j=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[r+1]),t[0]);return new n(i,t,W)},q=(t,e)=>{if(B)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),r=U.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=i.cssText,t.appendChild(e)}},D=B?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new n("string"==typeof t?t:t+"",void 0,W))(e)})(t):t;Symbol.metadata??=Symbol("metadata");class s extends HTMLElement{constructor(){super(),this.renderedOnce=!1,this.listeners=[],this.renderScheduled=!1,this._lite_reflecting=!1,this._microtaskRender=()=>{P(this.render(),this.shadowRoot),this.renderScheduled=!1,this.renderResolve(!0),this.rendered=new Promise((t=>{this.renderResolve=t}))},this.rendered=new Promise((t=>{this.renderResolve=t})),this.attachShadow({mode:"open"});const t=this.constructor,e=t.styles;if(e){let i=t.__adoptedStyleSheets;i||(i=(Array.isArray(e)?e:[e]).map((t=>t.styleSheet??t)),t.__adoptedStyleSheets=i),this.shadowRoot.adoptedStyleSheets=i}}static get observedAttributes(){return this[Symbol.metadata]?.observedAttributes?.values()??[]}attributeChangedCallback(t,e,i){this._lite_reflecting||this[t]===i&&e===i||(this[t]=i,this.requestRender())}connectedCallback(){this.beforeRender&&this.beforeRender(),this.requestRender(),this.renderedOnce=!0,this.firstRender&&this.firstRender()}disconnectedCallback(){for(const[t,e]of this.listeners)this.removeEventListener(t,e)}render(){return m`<slot></slot>`}requestRender(){if(!this.renderedOnce)return P(this.render(),this.shadowRoot),this.renderResolve(!0),void queueMicrotask((()=>{this.rendered=new Promise((t=>{this.renderResolve=t}))}));this.renderScheduled||(this.renderScheduled=!0,queueMicrotask(this._microtaskRender))}addListener(t,e){this.listeners.push([t,e]),this.addEventListener(t,e)}}class LittlePubSub{subscribers={};verbose;constructor(t){this.verbose=t}_handleContext(t,e){return void 0===e&&(e=t),e}hasSubscribers(t){return!!this.subscribers[t]}getValue(t){if(this.subscribers[t])return this.subscribers[t].value}subscribe(t,e,i){this.hasSubscribers(t)||(this.subscribers[t]={handlers:[],value:void 0});const r=this._handleContext(e,i?.context),o=e.bind(r);this.subscribers[t].handlers.push(o),void 0!==this.subscribers[t].value&&o(this.subscribers[t].value,void 0)}unsubscribe(t,e,i){if(i||(i={keepValue:!1}),!this.hasSubscribers(t))return;const r=this._handleContext(e,i.context),o=this.subscribers[t].handlers.indexOf(e.bind(r));this.subscribers[t].handlers.splice(o),0!==this.subscribers[t].handlers.length||i.keepValue||delete this.subscribers[t]}publish(t,e,i){this.hasSubscribers(t)||(this.subscribers[t]={handlers:[]});const r=this.subscribers[t]?.value;if(this.verbose||i||r!==e){this.subscribers[t].value=e;for(const i of this.subscribers[t].handlers)i(e,r)}}publishVerbose(t,e){this.publish(t,e,!0)}once(t,e){return new Promise((i=>{const r=o=>{i(o),this.unsubscribe(t,r,e)};this.subscribe(t,r,e)}))}}const J=(t,e)=>{let i=t;return e===Boolean?i=Boolean("true"===t):e===Number?i=Number(t):e===Uint8Array?i=new Uint8Array(t.split(",")):e!==Array&&e!==Object&&e!==WeakMap&&e!==Map&&e!==Uint8Array||(i=JSON.parse(t),e===Map&&(i=new Map(t)),e===WeakMap&&(i=new WeakMap(t))),i};globalThis.pubsub=globalThis.pubsub||new LittlePubSub;const Z={type:String,reflect:!1,renders:!0,batchDelay:0},F=t=>(t={...Z,...t},function(e,{kind:i,name:r,addInitializer:o,access:h,metadata:l}){const{type:a,reflect:c,renders:u,batches:d,batchDelay:b,consumer:p,provider:$}=t,A=t.attribute??c,_=String(r),f=A&&"string"==typeof A?A:_,g=a===Boolean,v=p||"boolean"==typeof t.consumes?f:t.consumes,m=$||"boolean"==typeof t.provides?f:t.provides,y=`_lite_${_}`,S=`__lite_${_}`,x=`_${_}_timeout`,w="_lite_batches";if(t.provider&&console.warn(`${_}: 'options.provider' is deprecated, use options.provides instead`),t.consumer&&console.warn(`${_}: 'options.consumer' is deprecated, use options.consumes instead`),A&&(l.observedAttributes||(l.observedAttributes=new Map),l.observedAttributes.set(_,f)),o((function(){"accessor"!==i&&console.warn(`${this.localName}: @property(${t}) ${_} ${i} is not supported`),v&&pubsub.subscribe(v,(async t=>{this[r]=t}))})),"accessor"===i)return{get(){return C.call(this)},set(t){return T.call(this,t)},init(t){return this.hasAttribute(f)&&(t=g?this.hasAttribute(f):J(this.getAttribute(f),a)),void 0===t||v||T.call(this,t),this[r]}};function C(){return A?g?this.hasAttribute(f):J(this.getAttribute(f),a):void 0!==this[S]?this[S]:this[y]}async function T(t){if(m&&pubsub.publish(m,t),this[y]===t)return;this.beforeChange&&await this.beforeChange(r,t),this.willChange&&(this[S]=await this.willChange(r,t));const e=this[S]??t;if(A)try{if(this._lite_reflecting=!0,g)e?this.hasAttribute(f)||this.setAttribute(f,""):this.hasAttribute(f)&&this.removeAttribute(f);else if(e){const t=((t,e)=>{let i=e;if(t===Boolean||t===Number||t===Uint8Array)return e.toString();if(t===Array||t===Object||t===WeakMap||t===Map||t===Uint8Array){let r;t!==Map&&t!==WeakMap||(r=Object(e).entries()),i=JSON.stringify(r)}return i})(a,e);this.getAttribute(f)!==t&&this.setAttribute(f,t)}else this.hasAttribute(f)&&this.removeAttribute(f)}finally{this._lite_reflecting=!1}else this[y]=t;u&&!this[w]&&(this[w]=!0,queueMicrotask((()=>{this[w]=!1,this.requestRender&&this.requestRender()}))),this.onChange&&this.onChange(r,e),d&&b>0&&(this[x]&&clearTimeout(this[x]),this[x]=setTimeout((()=>{this.onChange&&this.onChange(r,e)}),b))}});globalThis.pubsub=globalThis.pubsub||new LittlePubSub;export{P as B,S as E,LittlePubSub as L,q as S,y as T,D as c,j as i,F as r,s,m as x};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import{c as t,S as e,B as s,T as r}from"./dark-mode2-CXqeCi6t.js";
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright 2017 Google LLC
|
|
5
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/const{is:o,defineProperty:n,getOwnPropertyDescriptor:a,getOwnPropertyNames:h,getOwnPropertySymbols:c,getPrototypeOf:d}=Object,l=globalThis,p=l.trustedTypes,u=p?p.emptyScript:"",f=l.reactiveElementPolyfillSupport,E=(t,e)=>t,_={toAttribute(t,e){switch(e){case Boolean:t=t?u:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},$=(t,e)=>!o(t,e),m={attribute:!0,type:String,converter:_,reflect:!1,useDefault:!1,hasChanged:$};Symbol.metadata??=Symbol("metadata"),l.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=m){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(t,s,e);void 0!==r&&n(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){const{get:r,set:o}=a(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:r,set(e){const n=r?.call(this);o?.call(this,e),this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??m}static _$Ei(){if(this.hasOwnProperty(E("elementProperties")))return;const t=d(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(E("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E("properties"))){const t=this.properties,e=[...h(t),...c(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const s=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)s.unshift(t(e))}else void 0!==e&&s.push(t(e));return s}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return e(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){const s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(void 0!==r&&!0===s.reflect){const o=(void 0!==s.converter?.toAttribute?s.converter:_).toAttribute(e,s.type);this._$Em=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){const s=this.constructor,r=s._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=s.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:_;this._$Em=r,this[r]=o.fromAttribute(e,t.type)??this._$Ej?.get(r)??null,this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){const r=this.constructor,o=this[t];if(s??=r.getPropertyOptions(t),!((s.hasChanged??$)(o,e)||s.useDefault&&s.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,s))))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:r,wrapped:o},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),!0!==o||void 0!==n)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),!0===r&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t){const{wrapped:t}=s,r=this[e];!0!==t||this._$AL.has(e)||void 0===r||this.C(e,void 0,s,r)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[E("elementProperties")]=new Map,y[E("finalized")]=new Map,f?.({ReactiveElement:y}),(l.reactiveElementVersions??=[]).push("2.1.0");
|
|
7
|
-
/**
|
|
8
|
-
* @license
|
|
9
|
-
* Copyright 2017 Google LLC
|
|
10
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/
|
|
12
|
-
const b=globalThis;class i extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=s(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return r}}i._$litElement$=!0,i.finalized=!0,b.litElementHydrateSupport?.({LitElement:i});const g=b.litElementPolyfillSupport;g?.({LitElement:i}),(b.litElementVersions??=[]).push("4.2.0");
|
|
13
|
-
/**
|
|
14
|
-
* @license
|
|
15
|
-
* Copyright 2017 Google LLC
|
|
16
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/
|
|
18
|
-
const P=t=>(e,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)}
|
|
19
|
-
/**
|
|
20
|
-
* @license
|
|
21
|
-
* Copyright 2017 Google LLC
|
|
22
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/,v={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:$},w=(t=v,e,s)=>{const{kind:r,metadata:o}=s;let n=globalThis.litPropertyMetadata.get(o);if(void 0===n&&globalThis.litPropertyMetadata.set(o,n=new Map),"setter"===r&&((t=Object.create(t)).wrapped=!0),n.set(s.name,t),"accessor"===r){const{name:r}=s;return{set(s){const o=e.get.call(this);e.set.call(this,s),this.requestUpdate(r,o,t)},init(e){return void 0!==e&&this.C(r,void 0,t,e),e}}}if("setter"===r){const{name:r}=s;return function(s){const o=this[r];e.call(this,s),this.requestUpdate(r,o,t)}}throw Error("Unsupported decorator location: "+r)};function U(t){return(e,s)=>"object"==typeof s?w(t,e,s):((t,e,s)=>{const r=e.hasOwnProperty(s);return e.constructor.createProperty(s,t),r?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}export{i,U as n,P as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=e=>function(t,{kind:o,name:r,access:s,addInitializer:n}){return"accessor"!==o&&n((function(){console.warn(`${this.localName}: @query(${e}) ${String(r)} ${o} is not supported`)})),{get(){return(this.shadowRoot?this.shadowRoot.querySelector(e):this.querySelector(e))||this.querySelector(e)}}};export{e as t};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import{s as t,r as e,x as s}from"./dark-mode2-CXqeCi6t.js";function i(t,e,s,i,a,r){function n(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var c,o=i.kind,d="getter"===o?"get":"setter"===o?"set":"value",h=t?i.static?t:t.prototype:null,g=h?Object.getOwnPropertyDescriptor(h,i.name):{},l=!1,m=s.length-1;m>=0;m--){var p={};for(var _ in i)p[_]="access"===_?{}:i[_];for(var _ in i.access)p.access[_]=i.access[_];p.addInitializer=function(t){if(l)throw new TypeError("Cannot add initializers after decoration has completed");r.push(n(t||null))};var f=(0,s[m])("accessor"===o?{get:g.get,set:g.set}:g[d],p);if("accessor"===o){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(c=n(f.get))&&(g.get=c),(c=n(f.set))&&(g.set=c),(c=n(f.init))&&a.unshift(c)}else(c=n(f))&&("field"===o?a.unshift(c):g[d]=c)}h&&Object.defineProperty(h,i.name,g),l=!0}function a(t,e,s){for(var i=arguments.length>2,a=0;a<e.length;a++)s=i?e[a].call(t,s):e[a].call(t);return i?s:void 0}"function"==typeof SuppressedError&&SuppressedError;let r=(()=>{let r,n,c,o,d,h,g,l,m,p,_=t,f=[],u=[],y=[],x=[],v=[],w=[],b=[],S=[],j=[],C=[],W=[],z=[],k=[],I=[],$=[],E=[],O=[],F=[],P=[],T=[];return class FlexDisplay extends _{static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(_[Symbol.metadata]??null):void 0;r=[e({type:String})],n=[e({type:String})],c=[e({type:String})],o=[e({type:String})],d=[e({type:String,reflect:!0})],h=[e({type:Boolean,reflect:!0})],g=[e({type:Boolean,reflect:!0,attribute:"center-center"})],l=[e({type:String})],m=[e({type:String})],p=[e({type:String})],i(this,0,r,{kind:"accessor",name:"padding",static:!1,private:!1,access:{has:t=>"padding"in t,get:t=>t.padding,set:(t,e)=>{t.padding=e}},metadata:t},f,u),i(this,0,n,{kind:"accessor",name:"minWidth",static:!1,private:!1,access:{has:t=>"minWidth"in t,get:t=>t.minWidth,set:(t,e)=>{t.minWidth=e}},metadata:t},y,x),i(this,0,c,{kind:"accessor",name:"maxWidth",static:!1,private:!1,access:{has:t=>"maxWidth"in t,get:t=>t.maxWidth,set:(t,e)=>{t.maxWidth=e}},metadata:t},v,w),i(this,0,o,{kind:"accessor",name:"width",static:!1,private:!1,access:{has:t=>"width"in t,get:t=>t.width,set:(t,e)=>{t.width=e}},metadata:t},b,S),i(this,0,d,{kind:"accessor",name:"direction",static:!1,private:!1,access:{has:t=>"direction"in t,get:t=>t.direction,set:(t,e)=>{t.direction=e}},metadata:t},j,C),i(this,0,h,{kind:"accessor",name:"center",static:!1,private:!1,access:{has:t=>"center"in t,get:t=>t.center,set:(t,e)=>{t.center=e}},metadata:t},W,z),i(this,0,g,{kind:"accessor",name:"centerCenter",static:!1,private:!1,access:{has:t=>"centerCenter"in t,get:t=>t.centerCenter,set:(t,e)=>{t.centerCenter=e}},metadata:t},k,I),i(this,0,l,{kind:"accessor",name:"justifyContent",static:!1,private:!1,access:{has:t=>"justifyContent"in t,get:t=>t.justifyContent,set:(t,e)=>{t.justifyContent=e}},metadata:t},$,E),i(this,0,m,{kind:"accessor",name:"alignItems",static:!1,private:!1,access:{has:t=>"alignItems"in t,get:t=>t.alignItems,set:(t,e)=>{t.alignItems=e}},metadata:t},O,F),i(this,0,p,{kind:"accessor",name:"boxSizing",static:!1,private:!1,access:{has:t=>"boxSizing"in t,get:t=>t.boxSizing,set:(t,e)=>{t.boxSizing=e}},metadata:t},P,T),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}#t=a(this,f,"0");get padding(){return this.#t}set padding(t){this.#t=t}#e=(a(this,u),a(this,y,"auto"));get minWidth(){return this.#e}set minWidth(t){this.#e=t}#s=(a(this,x),a(this,v,"auto"));get maxWidth(){return this.#s}set maxWidth(t){this.#s=t}#i=(a(this,w),a(this,b,"100%"));get width(){return this.#i}set width(t){this.#i=t}#a=(a(this,S),a(this,j,"row"));get direction(){return this.#a}set direction(t){this.#a=t}#r=(a(this,C),a(this,W,void 0));get center(){return this.#r}set center(t){this.#r=t}#n=(a(this,z),a(this,k,void 0));get centerCenter(){return this.#n}set centerCenter(t){this.#n=t}#c=(a(this,I),a(this,$,"flex-start"));get justifyContent(){return this.#c}set justifyContent(t){this.#c=t}#o=(a(this,E),a(this,O,"flex-start"));get alignItems(){return this.#o}set alignItems(t){this.#o=t}#d=(a(this,F),a(this,P,"border-box"));get boxSizing(){return this.#d}set boxSizing(t){this.#d=t}render(){return s`
|
|
2
|
-
<style>
|
|
3
|
-
:host {
|
|
4
|
-
display: flex;
|
|
5
|
-
box-sizing: var(--flex-display-box-sizing, ${this.boxSizing});
|
|
6
|
-
max-width: var(--flex-display-max-width, ${this.maxWidth});
|
|
7
|
-
min-width: var(--flex-display-min-width, ${this.minWidth});
|
|
8
|
-
width: var(--flex-display-width, ${this.width});
|
|
9
|
-
flex-direction: var(--flex-display-direction, ${this.direction});
|
|
10
|
-
justify-content: var(
|
|
11
|
-
--flex-display-justify-content,
|
|
12
|
-
${this.justifyContent}
|
|
13
|
-
);
|
|
14
|
-
align-items: var(--flex-display-align-items, ${this.alignItems});
|
|
15
|
-
padding: var(--flex-display-padding, ${this.padding});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:host([center]) {
|
|
19
|
-
align-items: center;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
:host([center-center]) {
|
|
23
|
-
align-items: center;
|
|
24
|
-
justify-content: center;
|
|
25
|
-
}
|
|
26
|
-
</style>
|
|
27
|
-
<slot></slot>
|
|
28
|
-
`}constructor(){super(...arguments),a(this,T)}}})();customElements.define("flex-row",class FlexRow extends r{constructor(){super(),this.direction="row",this.width="auto"}});export{r as F};
|