@fluid-topics/ft-text-field 0.3.67 → 0.3.68

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.
@@ -6,7 +6,9 @@ export declare class FtTextField extends FtLitElement implements FtTextFieldProp
6
6
  static elementDefinitions: ElementDefinitionsMap;
7
7
  static styles: import("lit").CSSResult[];
8
8
  label?: string;
9
- value: string;
9
+ private _value;
10
+ get value(): string;
11
+ set value(value: string);
10
12
  helper?: string;
11
13
  outlined: boolean;
12
14
  disabled: boolean;
@@ -17,7 +17,7 @@ import { styles } from "./ft-text-field.css";
17
17
  export class FtTextField extends FtLitElement {
18
18
  constructor() {
19
19
  super(...arguments);
20
- this.value = "";
20
+ this._value = "";
21
21
  this.outlined = false;
22
22
  this.disabled = false;
23
23
  this.error = false;
@@ -29,6 +29,12 @@ export class FtTextField extends FtLitElement {
29
29
  this.hideSuggestions = false;
30
30
  this.visibleSuggestions = [];
31
31
  }
32
+ get value() {
33
+ return this._value;
34
+ }
35
+ set value(value) {
36
+ this.setValue(value, false);
37
+ }
32
38
  focus() {
33
39
  var _a;
34
40
  (_a = this.input) === null || _a === void 0 ? void 0 : _a.focus();
@@ -39,12 +45,12 @@ export class FtTextField extends FtLitElement {
39
45
  "ft-text-field--filled": !this.outlined,
40
46
  "ft-text-field--outlined": this.outlined,
41
47
  "ft-text-field--disabled": this.disabled,
42
- "ft-text-field--has-value": !!this.value,
48
+ "ft-text-field--has-value": !!this._value,
43
49
  "ft-text-field--with-label": !!this.label,
44
50
  "ft-text-field--in-error": this.error,
45
51
  "ft-text-field--with-prefix": !!this.prefix,
46
52
  "ft-text-field--hide-suggestions": this.visibleSuggestions.length === 0 || this.hideSuggestions,
47
- "ft-text-field--raised-label": this.focused || this.value != "",
53
+ "ft-text-field--raised-label": this.focused || this._value != "",
48
54
  "ft-text-field--with-icon": !!this.icon
49
55
  };
50
56
  return html `
@@ -55,7 +61,7 @@ export class FtTextField extends FtLitElement {
55
61
  <ft-input-label text="${this.label}"
56
62
  ?disabled=${this.disabled}
57
63
  ?outlined=${this.outlined}
58
- ?raised=${this.focused || this.value != ""}
64
+ ?raised=${this.focused || this._value != ""}
59
65
  ?error=${this.error}></ft-input-label>
60
66
  <div class="ft-text-field--input-panel">
61
67
  ${this.outlined ? nothing : html `
@@ -71,7 +77,7 @@ export class FtTextField extends FtLitElement {
71
77
  aria-label="${this.label}"
72
78
  class="ft-typography--body1 ft-text-field--input"
73
79
  ?disabled=${this.disabled}
74
- .value=${this.value}
80
+ .value=${this._value}
75
81
  @click=${this.handleClick}
76
82
  @keyup=${this.handleInput}
77
83
  @focus=${this.onFocus}/>
@@ -103,7 +109,7 @@ export class FtTextField extends FtLitElement {
103
109
  }
104
110
  filterSuggestionsIfNeeded() {
105
111
  if (this.filterSuggestions) {
106
- this.suggestions.forEach(s => s.hidden = !s.getValue().toLowerCase().includes(this.value.toLowerCase()));
112
+ this.suggestions.forEach(s => s.hidden = !s.getValue().toLowerCase().includes(this._value.toLowerCase()));
107
113
  this.visibleSuggestions = this.suggestions.filter(s => !s.hidden);
108
114
  }
109
115
  else {
@@ -128,27 +134,27 @@ export class FtTextField extends FtLitElement {
128
134
  handleInput(event) {
129
135
  var _a;
130
136
  const newValue = ((_a = this.input) === null || _a === void 0 ? void 0 : _a.value) || "";
131
- if (this.value !== newValue) {
132
- this.hideSuggestions = false;
133
- this.value = newValue;
134
- this.dispatchEvent(new CustomEvent("live-change", { detail: this.value }));
135
- }
136
137
  if (event.key == "Escape" || event.key == "Enter") {
137
138
  this.updateValueFromInputField();
138
139
  }
140
+ else if (this._value !== newValue) {
141
+ this.hideSuggestions = false;
142
+ this._value = newValue;
143
+ this.dispatchEvent(new CustomEvent("live-change", { detail: this._value }));
144
+ }
139
145
  }
140
146
  handleClick() {
141
147
  this.hideSuggestions = false;
142
148
  }
143
149
  setValue(newValue, fireEvents) {
144
- if (fireEvents && this.value !== newValue) {
150
+ if (fireEvents && this._value !== newValue) {
145
151
  this.dispatchEvent(new CustomEvent("live-change", { detail: newValue }));
146
152
  }
147
- this.value = newValue;
148
- if (fireEvents && this.lastFiredValue !== this.value) {
149
- this.dispatchEvent(new CustomEvent("change", { detail: this.value }));
153
+ this._value = newValue;
154
+ if (fireEvents && this.lastFiredValue !== this._value) {
155
+ this.dispatchEvent(new CustomEvent("change", { detail: this._value }));
150
156
  }
151
- this.lastFiredValue = this.value;
157
+ this.lastFiredValue = this._value;
152
158
  }
153
159
  handleKeyboardNavigation(event) {
154
160
  var _a;
@@ -204,7 +210,7 @@ __decorate([
204
210
  ], FtTextField.prototype, "label", void 0);
205
211
  __decorate([
206
212
  property()
207
- ], FtTextField.prototype, "value", void 0);
213
+ ], FtTextField.prototype, "_value", void 0);
208
214
  __decorate([
209
215
  property()
210
216
  ], FtTextField.prototype, "helper", void 0);
@@ -4,7 +4,7 @@
4
4
  * Copyright 2017 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
6
  */
7
- var n;const r=window,a=r.trustedTypes,f=a?a.createPolicy("lit-html",{createHTML:t=>t}):void 0,p=`lit$${(Math.random()+"").slice(9)}$`,h="?"+p,d=`<${h}>`,c=document,u=(t="")=>c.createComment(t),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,g=Array.isArray,y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,b=/>/g,m=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),$=/'/g,w=/"/g,k=/^(?:script|style|textarea|title)$/i,z=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),S=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),N=new WeakMap,O=c.createTreeWalker(c,129,null,!1),j=(t,e)=>{const i=t.length-1,o=[];let s,l=2===e?"<svg>":"",n=y;for(let e=0;e<i;e++){const i=t[e];let r,a,f=-1,h=0;for(;h<i.length&&(n.lastIndex=h,a=n.exec(i),null!==a);)h=n.lastIndex,n===y?"!--"===a[1]?n=v:void 0!==a[1]?n=b:void 0!==a[2]?(k.test(a[2])&&(s=RegExp("</"+a[2],"g")),n=m):void 0!==a[3]&&(n=m):n===m?">"===a[0]?(n=null!=s?s:y,f=-1):void 0===a[1]?f=-2:(f=n.lastIndex-a[2].length,r=a[1],n=void 0===a[3]?m:'"'===a[3]?w:$):n===w||n===$?n=m:n===v||n===b?n=y:(n=m,s=void 0);const c=n===m&&t[e+1].startsWith("/>")?" ":"";l+=n===y?i+d:f>=0?(o.push(r),i.slice(0,f)+"$lit$"+i.slice(f)+p+c):i+p+(-2===f?(o.push(void 0),e):c)}const r=l+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==f?f.createHTML(r):r,o]};class C{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,l=0;const n=t.length-1,r=this.parts,[f,d]=j(t,e);if(this.el=C.createElement(f,i),O.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=O.nextNode())&&r.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(p)){const i=d[l++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(p),e=/([.?@])?(.*)/.exec(i);r.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?_:"?"===e[1]?M:"@"===e[1]?U:B})}else r.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(k.test(o.tagName)){const t=o.textContent.split(p),e=t.length-1;if(e>0){o.textContent=a?a.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],u()),O.nextNode(),r.push({type:2,index:++s});o.append(t[e],u())}}}else if(8===o.nodeType)if(o.data===h)r.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(p,t+1));)r.push({type:7,index:s}),t+=p.length-1}s++}}static createElement(t,e){const i=c.createElement("template");return i.innerHTML=t,i}}function I(t,e,i=t,o){var s,l,n,r;if(e===S)return e;let a=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const f=x(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==f&&(null===(l=null==a?void 0:a._$AO)||void 0===l||l.call(a,!1),void 0===f?a=void 0:(a=new f(t),a._$AT(t,i,o)),void 0!==o?(null!==(n=(r=i)._$Co)&&void 0!==n?n:r._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=I(t,a._$AS(t,e.values),a,o)),e}class A{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:c).importNode(i,!0);O.currentNode=s;let l=O.nextNode(),n=0,r=0,a=o[0];for(;void 0!==a;){if(n===a.index){let e;2===a.type?e=new D(l,l.nextSibling,this,t):1===a.type?e=new a.ctor(l,a.name,a.strings,this,t):6===a.type&&(e=new T(l,this,t)),this.u.push(e),a=o[++r]}n!==(null==a?void 0:a.index)&&(l=O.nextNode(),n++)}return s}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class D{constructor(t,e,i,o){var s;this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}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=I(this,t,e),x(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==S&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>g(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==E&&x(this._$AH)?this._$AA.nextSibling.data=t:this.T(c.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=C.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.p(i);else{const t=new A(s,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=N.get(t.strings);return void 0===e&&N.set(t.strings,e=new C(t)),e}k(t){g(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new D(this.O(u()),this.O(u()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class B{constructor(t,e,i,o,s){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=E}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let l=!1;if(void 0===s)t=I(this,t,e,0),l=!x(t)||t!==this._$AH&&t!==S,l&&(this._$AH=t);else{const o=t;let n,r;for(t=s[0],n=0;n<s.length-1;n++)r=I(this,o[i+n],e,n),r===S&&(r=this._$AH[n]),l||(l=!x(r)||r!==this._$AH[n]),r===E?t=E:t!==E&&(t+=(null!=r?r:"")+s[n+1]),this._$AH[n]=r}l&&!o&&this.j(t)}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class _ extends B{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===E?void 0:t}}const Z=a?a.emptyScript:"";class M extends B{constructor(){super(...arguments),this.type=4}j(t){t&&t!==E?this.element.setAttribute(this.name,Z):this.element.removeAttribute(this.name)}}class U extends B{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=I(this,t,e,0))&&void 0!==i?i:E)===S)return;const o=this._$AH,s=t===E&&o!==E||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,l=t!==E&&(o===E||s);s&&this.element.removeEventListener(this.name,this,o),l&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class T{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){I(this,t)}}const R=r.litHtmlPolyfillSupport;null==R||R(C,D),(null!==(n=r.litHtmlVersions)&&void 0!==n?n:r.litHtmlVersions=[]).push("2.4.0");
7
+ var n;const r=window,a=r.trustedTypes,f=a?a.createPolicy("lit-html",{createHTML:t=>t}):void 0,p=`lit$${(Math.random()+"").slice(9)}$`,h="?"+p,d=`<${h}>`,c=document,u=(t="")=>c.createComment(t),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,g=Array.isArray,y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,b=/>/g,m=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),$=/'/g,w=/"/g,k=/^(?:script|style|textarea|title)$/i,z=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),S=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),N=new WeakMap,O=c.createTreeWalker(c,129,null,!1),j=(t,e)=>{const i=t.length-1,o=[];let s,l=2===e?"<svg>":"",n=y;for(let e=0;e<i;e++){const i=t[e];let r,a,f=-1,h=0;for(;h<i.length&&(n.lastIndex=h,a=n.exec(i),null!==a);)h=n.lastIndex,n===y?"!--"===a[1]?n=v:void 0!==a[1]?n=b:void 0!==a[2]?(k.test(a[2])&&(s=RegExp("</"+a[2],"g")),n=m):void 0!==a[3]&&(n=m):n===m?">"===a[0]?(n=null!=s?s:y,f=-1):void 0===a[1]?f=-2:(f=n.lastIndex-a[2].length,r=a[1],n=void 0===a[3]?m:'"'===a[3]?w:$):n===w||n===$?n=m:n===v||n===b?n=y:(n=m,s=void 0);const c=n===m&&t[e+1].startsWith("/>")?" ":"";l+=n===y?i+d:f>=0?(o.push(r),i.slice(0,f)+"$lit$"+i.slice(f)+p+c):i+p+(-2===f?(o.push(void 0),e):c)}const r=l+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==f?f.createHTML(r):r,o]};class C{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,l=0;const n=t.length-1,r=this.parts,[f,d]=j(t,e);if(this.el=C.createElement(f,i),O.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=O.nextNode())&&r.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(p)){const i=d[l++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(p),e=/([.?@])?(.*)/.exec(i);r.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?B:"?"===e[1]?M:"@"===e[1]?U:_})}else r.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(k.test(o.tagName)){const t=o.textContent.split(p),e=t.length-1;if(e>0){o.textContent=a?a.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],u()),O.nextNode(),r.push({type:2,index:++s});o.append(t[e],u())}}}else if(8===o.nodeType)if(o.data===h)r.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(p,t+1));)r.push({type:7,index:s}),t+=p.length-1}s++}}static createElement(t,e){const i=c.createElement("template");return i.innerHTML=t,i}}function I(t,e,i=t,o){var s,l,n,r;if(e===S)return e;let a=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const f=x(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==f&&(null===(l=null==a?void 0:a._$AO)||void 0===l||l.call(a,!1),void 0===f?a=void 0:(a=new f(t),a._$AT(t,i,o)),void 0!==o?(null!==(n=(r=i)._$Co)&&void 0!==n?n:r._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=I(t,a._$AS(t,e.values),a,o)),e}class A{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:c).importNode(i,!0);O.currentNode=s;let l=O.nextNode(),n=0,r=0,a=o[0];for(;void 0!==a;){if(n===a.index){let e;2===a.type?e=new D(l,l.nextSibling,this,t):1===a.type?e=new a.ctor(l,a.name,a.strings,this,t):6===a.type&&(e=new T(l,this,t)),this.u.push(e),a=o[++r]}n!==(null==a?void 0:a.index)&&(l=O.nextNode(),n++)}return s}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class D{constructor(t,e,i,o){var s;this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}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=I(this,t,e),x(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==S&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>g(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==E&&x(this._$AH)?this._$AA.nextSibling.data=t:this.T(c.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=C.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.p(i);else{const t=new A(s,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=N.get(t.strings);return void 0===e&&N.set(t.strings,e=new C(t)),e}k(t){g(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new D(this.O(u()),this.O(u()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class _{constructor(t,e,i,o,s){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=E}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let l=!1;if(void 0===s)t=I(this,t,e,0),l=!x(t)||t!==this._$AH&&t!==S,l&&(this._$AH=t);else{const o=t;let n,r;for(t=s[0],n=0;n<s.length-1;n++)r=I(this,o[i+n],e,n),r===S&&(r=this._$AH[n]),l||(l=!x(r)||r!==this._$AH[n]),r===E?t=E:t!==E&&(t+=(null!=r?r:"")+s[n+1]),this._$AH[n]=r}l&&!o&&this.j(t)}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class B extends _{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===E?void 0:t}}const Z=a?a.emptyScript:"";class M extends _{constructor(){super(...arguments),this.type=4}j(t){t&&t!==E?this.element.setAttribute(this.name,Z):this.element.removeAttribute(this.name)}}class U extends _{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=I(this,t,e,0))&&void 0!==i?i:E)===S)return;const o=this._$AH,s=t===E&&o!==E||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,l=t!==E&&(o===E||s);s&&this.element.removeEventListener(this.name,this,o),l&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class T{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){I(this,t)}}const R=r.litHtmlPolyfillSupport;null==R||R(C,D),(null!==(n=r.litHtmlVersions)&&void 0!==n?n:r.litHtmlVersions=[]).push("2.4.0");
8
8
  /**
9
9
  * @license
10
10
  * Copyright 2018 Google LLC
@@ -15,7 +15,7 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
15
15
  * @license
16
16
  * Copyright 2020 Google LLC
17
17
  * SPDX-License-Identifier: BSD-3-Clause
18
- */var V;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(V||(V={}));const P=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),q=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),L={fontFamily:q,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},X=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",P),Y=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",L.fontSize,"20px"),J=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",L.fontWeight,"normal"),Q=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",L.letterSpacing,"0.15px"),tt=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",L.lineHeight,"1.2"),et=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",L.textTransform,"inherit"),it=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",P),ot=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",L.fontSize,"14px"),st=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",L.fontWeight,"normal"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",L.letterSpacing,"0.105px"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",L.lineHeight,"1.7"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",L.textTransform,"inherit"),at=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",q),ft=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",L.fontSize,"16px"),pt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",L.fontWeight,"600"),ht=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",L.letterSpacing,"0.144px"),dt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",L.lineHeight,"1.5"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",L.textTransform,"inherit"),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",q),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",L.fontSize,"14px"),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",L.fontWeight,"normal"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",L.letterSpacing,"0.098px"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",L.lineHeight,"1.7"),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",L.textTransform,"inherit"),mt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",L.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",L.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",L.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",L.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",L.textTransform,"inherit")},$t=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",q),wt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",L.fontSize,"14px"),kt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",L.fontWeight,"normal"),zt=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",L.letterSpacing,"0.252px"),St=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",L.lineHeight,"1.4"),Et=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",L.textTransform,"inherit"),Nt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",L.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",L.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",L.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",L.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",L.textTransform,"inherit")},Ot=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",q),jt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",L.fontSize,"10px"),Ct=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",L.fontWeight,"normal"),It=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",L.letterSpacing,"0.33px"),At=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",L.lineHeight,"1.6"),Dt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",L.textTransform,"inherit"),Bt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",q),_t=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",L.fontSize,"10px"),Zt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",L.fontWeight,"normal"),Mt=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",L.letterSpacing,"1.5px"),Ut=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",L.lineHeight,"1.6"),Tt=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",L.textTransform,"uppercase"),Rt=e.FtCssVariableFactory.extend("--ft-typography-button-font-family",q),Wt=e.FtCssVariableFactory.extend("--ft-typography-button-font-size",L.fontSize,"14px"),Ft=e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",L.fontWeight,"600"),Kt=e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",L.letterSpacing,"1.246px"),Gt=e.FtCssVariableFactory.extend("--ft-typography-button-line-height",L.lineHeight,"1.15"),Ht=e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",L.textTransform,"uppercase"),Vt=i.css`
18
+ */var V;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(V||(V={}));const P=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),q=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),L={fontFamily:q,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},X=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",P),Y=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",L.fontSize,"20px"),J=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",L.fontWeight,"normal"),Q=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",L.letterSpacing,"0.15px"),tt=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",L.lineHeight,"1.2"),et=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",L.textTransform,"inherit"),it=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",P),ot=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",L.fontSize,"14px"),st=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",L.fontWeight,"normal"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",L.letterSpacing,"0.105px"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",L.lineHeight,"1.7"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",L.textTransform,"inherit"),at=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",q),ft=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",L.fontSize,"16px"),pt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",L.fontWeight,"600"),ht=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",L.letterSpacing,"0.144px"),dt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",L.lineHeight,"1.5"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",L.textTransform,"inherit"),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",q),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",L.fontSize,"14px"),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",L.fontWeight,"normal"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",L.letterSpacing,"0.098px"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",L.lineHeight,"1.7"),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",L.textTransform,"inherit"),mt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",L.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",L.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",L.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",L.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",L.textTransform,"inherit")},$t=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",q),wt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",L.fontSize,"14px"),kt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",L.fontWeight,"normal"),zt=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",L.letterSpacing,"0.252px"),St=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",L.lineHeight,"1.4"),Et=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",L.textTransform,"inherit"),Nt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",L.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",L.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",L.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",L.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",L.textTransform,"inherit")},Ot=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",q),jt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",L.fontSize,"10px"),Ct=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",L.fontWeight,"normal"),It=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",L.letterSpacing,"0.33px"),At=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",L.lineHeight,"1.6"),Dt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",L.textTransform,"inherit"),_t=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",q),Bt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",L.fontSize,"10px"),Zt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",L.fontWeight,"normal"),Mt=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",L.letterSpacing,"1.5px"),Ut=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",L.lineHeight,"1.6"),Tt=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",L.textTransform,"uppercase"),Rt=e.FtCssVariableFactory.extend("--ft-typography-button-font-family",q),Wt=e.FtCssVariableFactory.extend("--ft-typography-button-font-size",L.fontSize,"14px"),Ft=e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",L.fontWeight,"600"),Kt=e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",L.letterSpacing,"1.246px"),Gt=e.FtCssVariableFactory.extend("--ft-typography-button-line-height",L.lineHeight,"1.15"),Ht=e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",L.textTransform,"uppercase"),Vt=i.css`
19
19
  .ft-typography--title {
20
20
  font-family: ${X};
21
21
  font-size: ${Y};
@@ -90,8 +90,8 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
90
90
  }
91
91
  `,te=i.css`
92
92
  .ft-typography--overline {
93
- font-family: ${Bt};
94
- font-size: ${_t};
93
+ font-family: ${_t};
94
+ font-size: ${Bt};
95
95
  font-weight: ${Zt};
96
96
  letter-spacing: ${Mt};
97
97
  line-height: ${Ut};
@@ -558,7 +558,7 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
558
558
  .ft-text-field--with-icon {
559
559
  ${e.setVariable(le.labelMaxWidth,`calc(100% - ${we} - ${le.horizontalSpacing})`)};
560
560
  }
561
- `;var De=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class Be extends e.FtLitElement{constructor(){super(...arguments),this.value="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.filterSuggestions=!1,this.focused=!1,this.lastFiredValue="",this.suggestionsOnTop=!1,this.hideSuggestions=!1,this.visibleSuggestions=[]}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":this.error,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":0===this.visibleSuggestions.length||this.hideSuggestions,"ft-text-field--raised-label":this.focused||""!=this.value,"ft-text-field--with-icon":!!this.icon};return i.html`
561
+ `;var De=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class _e extends e.FtLitElement{constructor(){super(...arguments),this._value="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.filterSuggestions=!1,this.focused=!1,this.lastFiredValue="",this.suggestionsOnTop=!1,this.hideSuggestions=!1,this.visibleSuggestions=[]}get value(){return this._value}set value(t){this.setValue(t,!1)}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this._value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":this.error,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":0===this.visibleSuggestions.length||this.hideSuggestions,"ft-text-field--raised-label":this.focused||""!=this._value,"ft-text-field--with-icon":!!this.icon};return i.html`
562
562
  <div class="${s.classMap(t)}">
563
563
  <div class="ft-text-field--main-panel"
564
564
  @keydown=${this.handleKeyboardNavigation}
@@ -566,7 +566,7 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
566
566
  <ft-input-label text="${this.label}"
567
567
  ?disabled=${this.disabled}
568
568
  ?outlined=${this.outlined}
569
- ?raised=${this.focused||""!=this.value}
569
+ ?raised=${this.focused||""!=this._value}
570
570
  ?error=${this.error}></ft-input-label>
571
571
  <div class="ft-text-field--input-panel">
572
572
  ${this.outlined?i.nothing:i.html`
@@ -582,7 +582,7 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
582
582
  aria-label="${this.label}"
583
583
  class="ft-typography--body1 ft-text-field--input"
584
584
  ?disabled=${this.disabled}
585
- .value=${this.value}
585
+ .value=${this._value}
586
586
  @click=${this.handleClick}
587
587
  @keyup=${this.handleInput}
588
588
  @focus=${this.onFocus}/>
@@ -604,7 +604,7 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
604
604
  </ft-typography>
605
605
  `:i.nothing}
606
606
  </div>
607
- `}updated(t){super.updated(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded()}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),o=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&o&&(this.suggestionsOnTop=t.bottom+o.height>window.innerHeight&&t.top-o.height>0)}}updateValueFromInputField(){var t;this.setValue((null===(t=this.input)||void 0===t?void 0:t.value)||"",!0)}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.value!==i&&(this.hideSuggestions=!1,this.value=i,this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))),"Escape"!=t.key&&"Enter"!=t.key||this.updateValueFromInputField()}handleClick(){this.hideSuggestions=!1}setValue(t,e){e&&this.value!==t&&this.dispatchEvent(new CustomEvent("live-change",{detail:t})),this.value=t,e&&this.lastFiredValue!==this.value&&this.dispatchEvent(new CustomEvent("change",{detail:this.value})),this.lastFiredValue=this.value}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.updateValueFromInputField())}}Be.elementDefinitions={"ft-input-label":ae,"ft-ripple":$e,"ft-typography":se,"ft-icon":Ce},Be.styles=[Xt,Ae],De([o.property()],Be.prototype,"label",void 0),De([o.property()],Be.prototype,"value",void 0),De([o.property()],Be.prototype,"helper",void 0),De([o.property({type:Boolean})],Be.prototype,"outlined",void 0),De([o.property({type:Boolean})],Be.prototype,"disabled",void 0),De([o.property({type:Boolean})],Be.prototype,"error",void 0),De([o.property()],Be.prototype,"prefix",void 0),De([o.property()],Be.prototype,"icon",void 0),De([o.property()],Be.prototype,"iconVariant",void 0),De([o.property({type:Boolean})],Be.prototype,"filterSuggestions",void 0),De([o.property({type:Number})],Be.prototype,"maxLength",void 0),De([o.state()],Be.prototype,"focused",void 0),De([o.state()],Be.prototype,"lastFiredValue",void 0),De([o.state()],Be.prototype,"suggestionsOnTop",void 0),De([o.state()],Be.prototype,"hideSuggestions",void 0),De([o.state()],Be.prototype,"visibleSuggestions",void 0),De([o.query(".ft-text-field--main-panel")],Be.prototype,"mainPanel",void 0),De([o.query(".ft-text-field--input")],Be.prototype,"input",void 0),De([o.query(".ft-text-field--suggestions")],Be.prototype,"suggestionsContainer",void 0),De([o.queryAssignedElements({selector:"ft-text-field-suggestion"})],Be.prototype,"suggestions",void 0);const _e=i.css`
607
+ `}updated(t){super.updated(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded()}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this._value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),o=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&o&&(this.suggestionsOnTop=t.bottom+o.height>window.innerHeight&&t.top-o.height>0)}}updateValueFromInputField(){var t;this.setValue((null===(t=this.input)||void 0===t?void 0:t.value)||"",!0)}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";"Escape"==t.key||"Enter"==t.key?this.updateValueFromInputField():this._value!==i&&(this.hideSuggestions=!1,this._value=i,this.dispatchEvent(new CustomEvent("live-change",{detail:this._value})))}handleClick(){this.hideSuggestions=!1}setValue(t,e){e&&this._value!==t&&this.dispatchEvent(new CustomEvent("live-change",{detail:t})),this._value=t,e&&this.lastFiredValue!==this._value&&this.dispatchEvent(new CustomEvent("change",{detail:this._value})),this.lastFiredValue=this._value}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.updateValueFromInputField())}}_e.elementDefinitions={"ft-input-label":ae,"ft-ripple":$e,"ft-typography":se,"ft-icon":Ce},_e.styles=[Xt,Ae],De([o.property()],_e.prototype,"label",void 0),De([o.property()],_e.prototype,"_value",void 0),De([o.property()],_e.prototype,"helper",void 0),De([o.property({type:Boolean})],_e.prototype,"outlined",void 0),De([o.property({type:Boolean})],_e.prototype,"disabled",void 0),De([o.property({type:Boolean})],_e.prototype,"error",void 0),De([o.property()],_e.prototype,"prefix",void 0),De([o.property()],_e.prototype,"icon",void 0),De([o.property()],_e.prototype,"iconVariant",void 0),De([o.property({type:Boolean})],_e.prototype,"filterSuggestions",void 0),De([o.property({type:Number})],_e.prototype,"maxLength",void 0),De([o.state()],_e.prototype,"focused",void 0),De([o.state()],_e.prototype,"lastFiredValue",void 0),De([o.state()],_e.prototype,"suggestionsOnTop",void 0),De([o.state()],_e.prototype,"hideSuggestions",void 0),De([o.state()],_e.prototype,"visibleSuggestions",void 0),De([o.query(".ft-text-field--main-panel")],_e.prototype,"mainPanel",void 0),De([o.query(".ft-text-field--input")],_e.prototype,"input",void 0),De([o.query(".ft-text-field--suggestions")],_e.prototype,"suggestionsContainer",void 0),De([o.queryAssignedElements({selector:"ft-text-field-suggestion"})],_e.prototype,"suggestions",void 0);const Be=i.css`
608
608
  .ft-text-field-suggestion {
609
609
  position: relative;
610
610
  padding: 8px 16px;
@@ -641,4 +641,4 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
641
641
  <slot></slot>
642
642
  </ft-typography>
643
643
  </div>
644
- `}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new Me(this.getValue()))}getValue(){return this.value||this.textContent}get textContent(){return this.assignedNodes.map((t=>t.textContent)).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}}Ue.elementDefinitions={"ft-ripple":$e,"ft-typography":se,"ft-icon":Ce},Ue.styles=_e,Ze([o.property()],Ue.prototype,"value",void 0),Ze([o.query(".ft-text-field-suggestion")],Ue.prototype,"container",void 0),Ze([o.queryAssignedNodes()],Ue.prototype,"assignedNodes",void 0),e.customElement("ft-text-field")(Be),e.customElement("ft-text-field-suggestion")(Ue),t.FtTextField=Be,t.FtTextFieldCssVariables=Ie,t.FtTextFieldSuggestion=Ue,t.SuggestionSelectedEvent=Me,t.styles=Ae,t.suggestionStyles=_e,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
644
+ `}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new Me(this.getValue()))}getValue(){return this.value||this.textContent}get textContent(){return this.assignedNodes.map((t=>t.textContent)).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}}Ue.elementDefinitions={"ft-ripple":$e,"ft-typography":se,"ft-icon":Ce},Ue.styles=Be,Ze([o.property()],Ue.prototype,"value",void 0),Ze([o.query(".ft-text-field-suggestion")],Ue.prototype,"container",void 0),Ze([o.queryAssignedNodes()],Ue.prototype,"assignedNodes",void 0),e.customElement("ft-text-field")(_e),e.customElement("ft-text-field-suggestion")(Ue),t.FtTextField=_e,t.FtTextFieldCssVariables=Ie,t.FtTextFieldSuggestion=Ue,t.SuggestionSelectedEvent=Me,t.styles=Ae,t.suggestionStyles=Be,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
@@ -61,7 +61,7 @@ const c=window,d=c.ShadowRoot&&(void 0===c.ShadyCSS||c.ShadyCSS.nativeShadow)&&"
61
61
  * Copyright 2017 Google LLC
62
62
  * SPDX-License-Identifier: BSD-3-Clause
63
63
  */
64
- var M;R.finalized=!0,R.elementProperties=new Map,R.elementStyles=[],R.shadowRootOptions={mode:"open"},null==k||k({ReactiveElement:R}),(null!==(w=$.reactiveElementVersions)&&void 0!==w?w:$.reactiveElementVersions=[]).push("1.4.1");const z=window,U=z.trustedTypes,j=U?U.createPolicy("lit-html",{createHTML:t=>t}):void 0,F=`lit$${(Math.random()+"").slice(9)}$`,A="?"+F,B=`<${A}>`,D=document,L=(t="")=>D.createComment(t),P=t=>null===t||"object"!=typeof t&&"function"!=typeof t,T=Array.isArray,_=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,I=/-->/g,W=/>/g,K=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),H=/'/g,Z=/"/g,V=/^(?:script|style|textarea|title)$/i,J=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),q=Symbol.for("lit-noChange"),X=Symbol.for("lit-nothing"),Y=new WeakMap,G=D.createTreeWalker(D,129,null,!1),Q=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=_;for(let e=0;e<i;e++){const i=t[e];let l,a,p=-1,f=0;for(;f<i.length&&(r.lastIndex=f,a=r.exec(i),null!==a);)f=r.lastIndex,r===_?"!--"===a[1]?r=I:void 0!==a[1]?r=W:void 0!==a[2]?(V.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=K):void 0!==a[3]&&(r=K):r===K?">"===a[0]?(r=null!=s?s:_,p=-1):void 0===a[1]?p=-2:(p=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?K:'"'===a[3]?Z:H):r===Z||r===H?r=K:r===I||r===W?r=_:(r=K,s=void 0);const h=r===K&&t[e+1].startsWith("/>")?" ":"";n+=r===_?i+B:p>=0?(o.push(l),i.slice(0,p)+"$lit$"+i.slice(p)+F+h):i+F+(-2===p?(o.push(void 0),e):h)}const l=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==j?j.createHTML(l):l,o]};class tt{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,p]=Q(t,e);if(this.el=tt.createElement(a,i),G.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=G.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(F)){const i=p[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(F),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?nt:"?"===e[1]?lt:"@"===e[1]?at:st})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(V.test(o.tagName)){const t=o.textContent.split(F),e=t.length-1;if(e>0){o.textContent=U?U.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],L()),G.nextNode(),l.push({type:2,index:++s});o.append(t[e],L())}}}else if(8===o.nodeType)if(o.data===A)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(F,t+1));)l.push({type:7,index:s}),t+=F.length-1}s++}}static createElement(t,e){const i=D.createElement("template");return i.innerHTML=t,i}}function et(t,e,i=t,o){var s,n,r,l;if(e===q)return e;let a=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const p=P(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,i,o)),void 0!==o?(null!==(r=(l=i)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=et(t,a._$AS(t,e.values),a,o)),e}class it{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:D).importNode(i,!0);G.currentNode=s;let n=G.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new ot(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new pt(n,this,t)),this.u.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=G.nextNode(),r++)}return s}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class ot{constructor(t,e,i,o){var s;this.type=2,this._$AH=X,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}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=et(this,t,e),P(t)?t===X||null==t||""===t?(this._$AH!==X&&this._$AR(),this._$AH=X):t!==this._$AH&&t!==q&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>T(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==X&&P(this._$AH)?this._$AA.nextSibling.data=t:this.T(D.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=tt.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.p(i);else{const t=new it(s,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=Y.get(t.strings);return void 0===e&&Y.set(t.strings,e=new tt(t)),e}k(t){T(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new ot(this.O(L()),this.O(L()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class st{constructor(t,e,i,o,s){this.type=1,this._$AH=X,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=X}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let n=!1;if(void 0===s)t=et(this,t,e,0),n=!P(t)||t!==this._$AH&&t!==q,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=et(this,o[i+r],e,r),l===q&&(l=this._$AH[r]),n||(n=!P(l)||l!==this._$AH[r]),l===X?t=X:t!==X&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.j(t)}j(t){t===X?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class nt extends st{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===X?void 0:t}}const rt=U?U.emptyScript:"";class lt extends st{constructor(){super(...arguments),this.type=4}j(t){t&&t!==X?this.element.setAttribute(this.name,rt):this.element.removeAttribute(this.name)}}class at extends st{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=et(this,t,e,0))&&void 0!==i?i:X)===q)return;const o=this._$AH,s=t===X&&o!==X||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==X&&(o===X||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class pt{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){et(this,t)}}const ft=z.litHtmlPolyfillSupport;null==ft||ft(tt,ot),(null!==(M=z.litHtmlVersions)&&void 0!==M?M:z.litHtmlVersions=[]).push("2.4.0");
64
+ var M;R.finalized=!0,R.elementProperties=new Map,R.elementStyles=[],R.shadowRootOptions={mode:"open"},null==k||k({ReactiveElement:R}),(null!==(w=$.reactiveElementVersions)&&void 0!==w?w:$.reactiveElementVersions=[]).push("1.4.1");const z=window,U=z.trustedTypes,j=U?U.createPolicy("lit-html",{createHTML:t=>t}):void 0,F=`lit$${(Math.random()+"").slice(9)}$`,A="?"+F,B=`<${A}>`,D=document,L=(t="")=>D.createComment(t),P=t=>null===t||"object"!=typeof t&&"function"!=typeof t,_=Array.isArray,T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,I=/-->/g,W=/>/g,K=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),H=/'/g,Z=/"/g,V=/^(?:script|style|textarea|title)$/i,J=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),q=Symbol.for("lit-noChange"),X=Symbol.for("lit-nothing"),Y=new WeakMap,G=D.createTreeWalker(D,129,null,!1),Q=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=T;for(let e=0;e<i;e++){const i=t[e];let l,a,p=-1,f=0;for(;f<i.length&&(r.lastIndex=f,a=r.exec(i),null!==a);)f=r.lastIndex,r===T?"!--"===a[1]?r=I:void 0!==a[1]?r=W:void 0!==a[2]?(V.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=K):void 0!==a[3]&&(r=K):r===K?">"===a[0]?(r=null!=s?s:T,p=-1):void 0===a[1]?p=-2:(p=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?K:'"'===a[3]?Z:H):r===Z||r===H?r=K:r===I||r===W?r=T:(r=K,s=void 0);const h=r===K&&t[e+1].startsWith("/>")?" ":"";n+=r===T?i+B:p>=0?(o.push(l),i.slice(0,p)+"$lit$"+i.slice(p)+F+h):i+F+(-2===p?(o.push(void 0),e):h)}const l=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==j?j.createHTML(l):l,o]};class tt{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,p]=Q(t,e);if(this.el=tt.createElement(a,i),G.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=G.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(F)){const i=p[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(F),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?nt:"?"===e[1]?lt:"@"===e[1]?at:st})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(V.test(o.tagName)){const t=o.textContent.split(F),e=t.length-1;if(e>0){o.textContent=U?U.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],L()),G.nextNode(),l.push({type:2,index:++s});o.append(t[e],L())}}}else if(8===o.nodeType)if(o.data===A)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(F,t+1));)l.push({type:7,index:s}),t+=F.length-1}s++}}static createElement(t,e){const i=D.createElement("template");return i.innerHTML=t,i}}function et(t,e,i=t,o){var s,n,r,l;if(e===q)return e;let a=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const p=P(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,i,o)),void 0!==o?(null!==(r=(l=i)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=et(t,a._$AS(t,e.values),a,o)),e}class it{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:D).importNode(i,!0);G.currentNode=s;let n=G.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new ot(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new pt(n,this,t)),this.u.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=G.nextNode(),r++)}return s}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class ot{constructor(t,e,i,o){var s;this.type=2,this._$AH=X,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}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=et(this,t,e),P(t)?t===X||null==t||""===t?(this._$AH!==X&&this._$AR(),this._$AH=X):t!==this._$AH&&t!==q&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>_(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==X&&P(this._$AH)?this._$AA.nextSibling.data=t:this.T(D.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=tt.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.p(i);else{const t=new it(s,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=Y.get(t.strings);return void 0===e&&Y.set(t.strings,e=new tt(t)),e}k(t){_(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new ot(this.O(L()),this.O(L()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class st{constructor(t,e,i,o,s){this.type=1,this._$AH=X,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=X}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let n=!1;if(void 0===s)t=et(this,t,e,0),n=!P(t)||t!==this._$AH&&t!==q,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=et(this,o[i+r],e,r),l===q&&(l=this._$AH[r]),n||(n=!P(l)||l!==this._$AH[r]),l===X?t=X:t!==X&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.j(t)}j(t){t===X?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class nt extends st{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===X?void 0:t}}const rt=U?U.emptyScript:"";class lt extends st{constructor(){super(...arguments),this.type=4}j(t){t&&t!==X?this.element.setAttribute(this.name,rt):this.element.removeAttribute(this.name)}}class at extends st{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=et(this,t,e,0))&&void 0!==i?i:X)===q)return;const o=this._$AH,s=t===X&&o!==X||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==X&&(o===X||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class pt{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){et(this,t)}}const ft=z.litHtmlPolyfillSupport;null==ft||ft(tt,ot),(null!==(M=z.litHtmlVersions)&&void 0!==M?M:z.litHtmlVersions=[]).push("2.4.0");
65
65
  /**
66
66
  * @license
67
67
  * Copyright 2017 Google LLC
@@ -125,14 +125,14 @@ const $t=1,Ot=2,St=t=>(...e)=>({_$litDirective$:t,values:e});class kt{constructo
125
125
  * @license
126
126
  * Copyright 2018 Google LLC
127
127
  * SPDX-License-Identifier: BSD-3-Clause
128
- */var Ut;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(Ut||(Ut={}));const jt=xt.extend("--ft-typography-font-family",yt.titleFont),Ft=xt.extend("--ft-typography-font-family",yt.contentFont),At={fontFamily:Ft,fontSize:xt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:xt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:xt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:xt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:xt.create("--ft-typography-text-transform","UNKNOWN","inherit")},Bt=xt.extend("--ft-typography-title-font-family",jt),Dt=xt.extend("--ft-typography-title-font-size",At.fontSize,"20px"),Lt=xt.extend("--ft-typography-title-font-weight",At.fontWeight,"normal"),Pt=xt.extend("--ft-typography-title-letter-spacing",At.letterSpacing,"0.15px"),Tt=xt.extend("--ft-typography-title-line-height",At.lineHeight,"1.2"),_t=xt.extend("--ft-typography-title-text-transform",At.textTransform,"inherit"),It=xt.extend("--ft-typography-title-dense-font-family",jt),Wt=xt.extend("--ft-typography-title-dense-font-size",At.fontSize,"14px"),Kt=xt.extend("--ft-typography-title-dense-font-weight",At.fontWeight,"normal"),Ht=xt.extend("--ft-typography-title-dense-letter-spacing",At.letterSpacing,"0.105px"),Zt=xt.extend("--ft-typography-title-dense-line-height",At.lineHeight,"1.7"),Vt=xt.extend("--ft-typography-title-dense-text-transform",At.textTransform,"inherit"),Jt=xt.extend("--ft-typography-subtitle1-font-family",Ft),qt=xt.extend("--ft-typography-subtitle1-font-size",At.fontSize,"16px"),Xt=xt.extend("--ft-typography-subtitle1-font-weight",At.fontWeight,"600"),Yt=xt.extend("--ft-typography-subtitle1-letter-spacing",At.letterSpacing,"0.144px"),Gt=xt.extend("--ft-typography-subtitle1-line-height",At.lineHeight,"1.5"),Qt=xt.extend("--ft-typography-subtitle1-text-transform",At.textTransform,"inherit"),te=xt.extend("--ft-typography-subtitle2-font-family",Ft),ee=xt.extend("--ft-typography-subtitle2-font-size",At.fontSize,"14px"),ie=xt.extend("--ft-typography-subtitle2-font-weight",At.fontWeight,"normal"),oe=xt.extend("--ft-typography-subtitle2-letter-spacing",At.letterSpacing,"0.098px"),se=xt.extend("--ft-typography-subtitle2-line-height",At.lineHeight,"1.7"),ne=xt.extend("--ft-typography-subtitle2-text-transform",At.textTransform,"inherit"),re={fontFamily:xt.extend("--ft-typography-body1-font-family",Ft),fontSize:xt.extend("--ft-typography-body1-font-size",At.fontSize,"16px"),fontWeight:xt.extend("--ft-typography-body1-font-weight",At.fontWeight,"normal"),letterSpacing:xt.extend("--ft-typography-body1-letter-spacing",At.letterSpacing,"0.496px"),lineHeight:xt.extend("--ft-typography-body1-line-height",At.lineHeight,"1.5"),textTransform:xt.extend("--ft-typography-body1-text-transform",At.textTransform,"inherit")},le=xt.extend("--ft-typography-body2-font-family",Ft),ae=xt.extend("--ft-typography-body2-font-size",At.fontSize,"14px"),pe=xt.extend("--ft-typography-body2-font-weight",At.fontWeight,"normal"),fe=xt.extend("--ft-typography-body2-letter-spacing",At.letterSpacing,"0.252px"),he=xt.extend("--ft-typography-body2-line-height",At.lineHeight,"1.4"),ce=xt.extend("--ft-typography-body2-text-transform",At.textTransform,"inherit"),de={fontFamily:xt.extend("--ft-typography-caption-font-family",Ft),fontSize:xt.extend("--ft-typography-caption-font-size",At.fontSize,"12px"),fontWeight:xt.extend("--ft-typography-caption-font-weight",At.fontWeight,"normal"),letterSpacing:xt.extend("--ft-typography-caption-letter-spacing",At.letterSpacing,"0.396px"),lineHeight:xt.extend("--ft-typography-caption-line-height",At.lineHeight,"1.33"),textTransform:xt.extend("--ft-typography-caption-text-transform",At.textTransform,"inherit")},ue=xt.extend("--ft-typography-breadcrumb-font-family",Ft),xe=xt.extend("--ft-typography-breadcrumb-font-size",At.fontSize,"10px"),ge=xt.extend("--ft-typography-breadcrumb-font-weight",At.fontWeight,"normal"),ye=xt.extend("--ft-typography-breadcrumb-letter-spacing",At.letterSpacing,"0.33px"),ve=xt.extend("--ft-typography-breadcrumb-line-height",At.lineHeight,"1.6"),be=xt.extend("--ft-typography-breadcrumb-text-transform",At.textTransform,"inherit"),me=xt.extend("--ft-typography-overline-font-family",Ft),we=xt.extend("--ft-typography-overline-font-size",At.fontSize,"10px"),$e=xt.extend("--ft-typography-overline-font-weight",At.fontWeight,"normal"),Oe=xt.extend("--ft-typography-overline-letter-spacing",At.letterSpacing,"1.5px"),Se=xt.extend("--ft-typography-overline-line-height",At.lineHeight,"1.6"),ke=xt.extend("--ft-typography-overline-text-transform",At.textTransform,"uppercase"),Ee=xt.extend("--ft-typography-button-font-family",Ft),Ne=xt.extend("--ft-typography-button-font-size",At.fontSize,"14px"),Ce=xt.extend("--ft-typography-button-font-weight",At.fontWeight,"600"),Re=xt.extend("--ft-typography-button-letter-spacing",At.letterSpacing,"1.246px"),Me=xt.extend("--ft-typography-button-line-height",At.lineHeight,"1.15"),ze=xt.extend("--ft-typography-button-text-transform",At.textTransform,"uppercase"),Ue=v`
128
+ */var Ut;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(Ut||(Ut={}));const jt=xt.extend("--ft-typography-font-family",yt.titleFont),Ft=xt.extend("--ft-typography-font-family",yt.contentFont),At={fontFamily:Ft,fontSize:xt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:xt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:xt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:xt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:xt.create("--ft-typography-text-transform","UNKNOWN","inherit")},Bt=xt.extend("--ft-typography-title-font-family",jt),Dt=xt.extend("--ft-typography-title-font-size",At.fontSize,"20px"),Lt=xt.extend("--ft-typography-title-font-weight",At.fontWeight,"normal"),Pt=xt.extend("--ft-typography-title-letter-spacing",At.letterSpacing,"0.15px"),_t=xt.extend("--ft-typography-title-line-height",At.lineHeight,"1.2"),Tt=xt.extend("--ft-typography-title-text-transform",At.textTransform,"inherit"),It=xt.extend("--ft-typography-title-dense-font-family",jt),Wt=xt.extend("--ft-typography-title-dense-font-size",At.fontSize,"14px"),Kt=xt.extend("--ft-typography-title-dense-font-weight",At.fontWeight,"normal"),Ht=xt.extend("--ft-typography-title-dense-letter-spacing",At.letterSpacing,"0.105px"),Zt=xt.extend("--ft-typography-title-dense-line-height",At.lineHeight,"1.7"),Vt=xt.extend("--ft-typography-title-dense-text-transform",At.textTransform,"inherit"),Jt=xt.extend("--ft-typography-subtitle1-font-family",Ft),qt=xt.extend("--ft-typography-subtitle1-font-size",At.fontSize,"16px"),Xt=xt.extend("--ft-typography-subtitle1-font-weight",At.fontWeight,"600"),Yt=xt.extend("--ft-typography-subtitle1-letter-spacing",At.letterSpacing,"0.144px"),Gt=xt.extend("--ft-typography-subtitle1-line-height",At.lineHeight,"1.5"),Qt=xt.extend("--ft-typography-subtitle1-text-transform",At.textTransform,"inherit"),te=xt.extend("--ft-typography-subtitle2-font-family",Ft),ee=xt.extend("--ft-typography-subtitle2-font-size",At.fontSize,"14px"),ie=xt.extend("--ft-typography-subtitle2-font-weight",At.fontWeight,"normal"),oe=xt.extend("--ft-typography-subtitle2-letter-spacing",At.letterSpacing,"0.098px"),se=xt.extend("--ft-typography-subtitle2-line-height",At.lineHeight,"1.7"),ne=xt.extend("--ft-typography-subtitle2-text-transform",At.textTransform,"inherit"),re={fontFamily:xt.extend("--ft-typography-body1-font-family",Ft),fontSize:xt.extend("--ft-typography-body1-font-size",At.fontSize,"16px"),fontWeight:xt.extend("--ft-typography-body1-font-weight",At.fontWeight,"normal"),letterSpacing:xt.extend("--ft-typography-body1-letter-spacing",At.letterSpacing,"0.496px"),lineHeight:xt.extend("--ft-typography-body1-line-height",At.lineHeight,"1.5"),textTransform:xt.extend("--ft-typography-body1-text-transform",At.textTransform,"inherit")},le=xt.extend("--ft-typography-body2-font-family",Ft),ae=xt.extend("--ft-typography-body2-font-size",At.fontSize,"14px"),pe=xt.extend("--ft-typography-body2-font-weight",At.fontWeight,"normal"),fe=xt.extend("--ft-typography-body2-letter-spacing",At.letterSpacing,"0.252px"),he=xt.extend("--ft-typography-body2-line-height",At.lineHeight,"1.4"),ce=xt.extend("--ft-typography-body2-text-transform",At.textTransform,"inherit"),de={fontFamily:xt.extend("--ft-typography-caption-font-family",Ft),fontSize:xt.extend("--ft-typography-caption-font-size",At.fontSize,"12px"),fontWeight:xt.extend("--ft-typography-caption-font-weight",At.fontWeight,"normal"),letterSpacing:xt.extend("--ft-typography-caption-letter-spacing",At.letterSpacing,"0.396px"),lineHeight:xt.extend("--ft-typography-caption-line-height",At.lineHeight,"1.33"),textTransform:xt.extend("--ft-typography-caption-text-transform",At.textTransform,"inherit")},ue=xt.extend("--ft-typography-breadcrumb-font-family",Ft),xe=xt.extend("--ft-typography-breadcrumb-font-size",At.fontSize,"10px"),ge=xt.extend("--ft-typography-breadcrumb-font-weight",At.fontWeight,"normal"),ye=xt.extend("--ft-typography-breadcrumb-letter-spacing",At.letterSpacing,"0.33px"),ve=xt.extend("--ft-typography-breadcrumb-line-height",At.lineHeight,"1.6"),be=xt.extend("--ft-typography-breadcrumb-text-transform",At.textTransform,"inherit"),me=xt.extend("--ft-typography-overline-font-family",Ft),we=xt.extend("--ft-typography-overline-font-size",At.fontSize,"10px"),$e=xt.extend("--ft-typography-overline-font-weight",At.fontWeight,"normal"),Oe=xt.extend("--ft-typography-overline-letter-spacing",At.letterSpacing,"1.5px"),Se=xt.extend("--ft-typography-overline-line-height",At.lineHeight,"1.6"),ke=xt.extend("--ft-typography-overline-text-transform",At.textTransform,"uppercase"),Ee=xt.extend("--ft-typography-button-font-family",Ft),Ne=xt.extend("--ft-typography-button-font-size",At.fontSize,"14px"),Ce=xt.extend("--ft-typography-button-font-weight",At.fontWeight,"600"),Re=xt.extend("--ft-typography-button-letter-spacing",At.letterSpacing,"1.246px"),Me=xt.extend("--ft-typography-button-line-height",At.lineHeight,"1.15"),ze=xt.extend("--ft-typography-button-text-transform",At.textTransform,"uppercase"),Ue=v`
129
129
  .ft-typography--title {
130
130
  font-family: ${Bt};
131
131
  font-size: ${Dt};
132
132
  font-weight: ${Lt};
133
133
  letter-spacing: ${Pt};
134
- line-height: ${Tt};
135
- text-transform: ${_t};
134
+ line-height: ${_t};
135
+ text-transform: ${Tt};
136
136
  }
137
137
  `,je=v`
138
138
  .ft-typography--title-dense {
@@ -198,7 +198,7 @@ const $t=1,Ot=2,St=t=>(...e)=>({_$litDirective$:t,values:e});class kt{constructo
198
198
  line-height: ${ve};
199
199
  text-transform: ${be};
200
200
  }
201
- `,Te=v`
201
+ `,_e=v`
202
202
  .ft-typography--overline {
203
203
  font-family: ${me};
204
204
  font-size: ${we};
@@ -207,7 +207,7 @@ const $t=1,Ot=2,St=t=>(...e)=>({_$litDirective$:t,values:e});class kt{constructo
207
207
  line-height: ${Se};
208
208
  text-transform: ${ke};
209
209
  }
210
- `,_e=v`
210
+ `,Te=v`
211
211
  .ft-typography--button {
212
212
  font-family: ${Ee};
213
213
  font-size: ${Ne};
@@ -227,7 +227,7 @@ const $t=1,Ot=2,St=t=>(...e)=>({_$litDirective$:t,values:e});class kt{constructo
227
227
  </${Rt(this.element)}>
228
228
  `:zt`
229
229
  <slot class="ft-typography ft-typography--${this.variant}"></slot>
230
- `}}Ke.styles=[Ue,je,Fe,Ae,Be,De,Le,Pe,Te,_e,Ie],We([o()],Ke.prototype,"element",void 0),We([o()],Ke.prototype,"variant",void 0),h("ft-typography")(Ke);const He={fontSize:xt.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:xt.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:xt.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:xt.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:xt.create("--ft-input-label-horizontal-spacing","SIZE","12px"),labelMaxWidth:xt.create("--ft-input-label-max-width","SIZE","100%"),borderColor:xt.extend("--ft-input-label-border-color",yt.colorOutline),textColor:xt.extend("--ft-input-label-text-color",yt.colorOnSurfaceMedium),disabledTextColor:xt.extend("--ft-input-label-disabled-text-color",yt.colorOnSurfaceDisabled),colorSurface:xt.external(yt.colorSurface,"Design system"),borderRadiusS:xt.external(yt.borderRadiusS,"Design system"),colorError:xt.external(yt.colorError,"Design system")},Ze=v`
230
+ `}}Ke.styles=[Ue,je,Fe,Ae,Be,De,Le,Pe,_e,Te,Ie],We([o()],Ke.prototype,"element",void 0),We([o()],Ke.prototype,"variant",void 0),h("ft-typography")(Ke);const He={fontSize:xt.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:xt.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:xt.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:xt.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:xt.create("--ft-input-label-horizontal-spacing","SIZE","12px"),labelMaxWidth:xt.create("--ft-input-label-max-width","SIZE","100%"),borderColor:xt.extend("--ft-input-label-border-color",yt.colorOutline),textColor:xt.extend("--ft-input-label-text-color",yt.colorOnSurfaceMedium),disabledTextColor:xt.extend("--ft-input-label-disabled-text-color",yt.colorOnSurfaceDisabled),colorSurface:xt.external(yt.colorSurface,"Design system"),borderRadiusS:xt.external(yt.borderRadiusS,"Design system"),colorError:xt.external(yt.colorError,"Design system")},Ze=v`
231
231
  .ft-input-label {
232
232
  position: absolute;
233
233
  inset: 0;
@@ -674,7 +674,7 @@ class ri extends kt{constructor(t){if(super(t),this.it=X,t.type!==Ot)throw Error
674
674
  .ft-text-field--with-icon {
675
675
  ${gt(He.labelMaxWidth,`calc(100% - ${fi} - ${He.horizontalSpacing})`)};
676
676
  }
677
- `;var wi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class $i extends wt{constructor(){super(...arguments),this.value="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.filterSuggestions=!1,this.focused=!1,this.lastFiredValue="",this.suggestionsOnTop=!1,this.hideSuggestions=!1,this.visibleSuggestions=[]}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":this.error,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":0===this.visibleSuggestions.length||this.hideSuggestions,"ft-text-field--raised-label":this.focused||""!=this.value,"ft-text-field--with-icon":!!this.icon};return J`
677
+ `;var wi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class $i extends wt{constructor(){super(...arguments),this._value="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.filterSuggestions=!1,this.focused=!1,this.lastFiredValue="",this.suggestionsOnTop=!1,this.hideSuggestions=!1,this.visibleSuggestions=[]}get value(){return this._value}set value(t){this.setValue(t,!1)}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this._value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":this.error,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":0===this.visibleSuggestions.length||this.hideSuggestions,"ft-text-field--raised-label":this.focused||""!=this._value,"ft-text-field--with-icon":!!this.icon};return J`
678
678
  <div class="${Et(t)}">
679
679
  <div class="ft-text-field--main-panel"
680
680
  @keydown=${this.handleKeyboardNavigation}
@@ -682,7 +682,7 @@ class ri extends kt{constructor(t){if(super(t),this.it=X,t.type!==Ot)throw Error
682
682
  <ft-input-label text="${this.label}"
683
683
  ?disabled=${this.disabled}
684
684
  ?outlined=${this.outlined}
685
- ?raised=${this.focused||""!=this.value}
685
+ ?raised=${this.focused||""!=this._value}
686
686
  ?error=${this.error}></ft-input-label>
687
687
  <div class="ft-text-field--input-panel">
688
688
  ${this.outlined?X:J`
@@ -703,7 +703,7 @@ class ri extends kt{constructor(t){if(super(t),this.it=X,t.type!==Ot)throw Error
703
703
  aria-label="${this.label}"
704
704
  class="ft-typography--body1 ft-text-field--input"
705
705
  ?disabled=${this.disabled}
706
- .value=${this.value}
706
+ .value=${this._value}
707
707
  @click=${this.handleClick}
708
708
  @keyup=${this.handleInput}
709
709
  @focus=${this.onFocus}/>
@@ -725,7 +725,7 @@ class ri extends kt{constructor(t){if(super(t),this.it=X,t.type!==Ot)throw Error
725
725
  </ft-typography>
726
726
  `:X}
727
727
  </div>
728
- `}updated(t){super.updated(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded()}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),o=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&o&&(this.suggestionsOnTop=t.bottom+o.height>window.innerHeight&&t.top-o.height>0)}}updateValueFromInputField(){var t;this.setValue((null===(t=this.input)||void 0===t?void 0:t.value)||"",!0)}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.value!==i&&(this.hideSuggestions=!1,this.value=i,this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))),"Escape"!=t.key&&"Enter"!=t.key||this.updateValueFromInputField()}handleClick(){this.hideSuggestions=!1}setValue(t,e){e&&this.value!==t&&this.dispatchEvent(new CustomEvent("live-change",{detail:t})),this.value=t,e&&this.lastFiredValue!==this.value&&this.dispatchEvent(new CustomEvent("change",{detail:this.value})),this.lastFiredValue=this.value}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.updateValueFromInputField())}}$i.elementDefinitions={"ft-input-label":Je,"ft-ripple":ni,"ft-typography":Ke,"ft-icon":vi},$i.styles=[Be,mi],wi([o()],$i.prototype,"label",void 0),wi([o()],$i.prototype,"value",void 0),wi([o()],$i.prototype,"helper",void 0),wi([o({type:Boolean})],$i.prototype,"outlined",void 0),wi([o({type:Boolean})],$i.prototype,"disabled",void 0),wi([o({type:Boolean})],$i.prototype,"error",void 0),wi([o()],$i.prototype,"prefix",void 0),wi([o()],$i.prototype,"icon",void 0),wi([o()],$i.prototype,"iconVariant",void 0),wi([o({type:Boolean})],$i.prototype,"filterSuggestions",void 0),wi([o({type:Number})],$i.prototype,"maxLength",void 0),wi([s()],$i.prototype,"focused",void 0),wi([s()],$i.prototype,"lastFiredValue",void 0),wi([s()],$i.prototype,"suggestionsOnTop",void 0),wi([s()],$i.prototype,"hideSuggestions",void 0),wi([s()],$i.prototype,"visibleSuggestions",void 0),wi([r(".ft-text-field--main-panel")],$i.prototype,"mainPanel",void 0),wi([r(".ft-text-field--input")],$i.prototype,"input",void 0),wi([r(".ft-text-field--suggestions")],$i.prototype,"suggestionsContainer",void 0),wi([p({selector:"ft-text-field-suggestion"})],$i.prototype,"suggestions",void 0);const Oi=v`
728
+ `}updated(t){super.updated(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded()}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this._value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),o=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&o&&(this.suggestionsOnTop=t.bottom+o.height>window.innerHeight&&t.top-o.height>0)}}updateValueFromInputField(){var t;this.setValue((null===(t=this.input)||void 0===t?void 0:t.value)||"",!0)}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";"Escape"==t.key||"Enter"==t.key?this.updateValueFromInputField():this._value!==i&&(this.hideSuggestions=!1,this._value=i,this.dispatchEvent(new CustomEvent("live-change",{detail:this._value})))}handleClick(){this.hideSuggestions=!1}setValue(t,e){e&&this._value!==t&&this.dispatchEvent(new CustomEvent("live-change",{detail:t})),this._value=t,e&&this.lastFiredValue!==this._value&&this.dispatchEvent(new CustomEvent("change",{detail:this._value})),this.lastFiredValue=this._value}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.updateValueFromInputField())}}$i.elementDefinitions={"ft-input-label":Je,"ft-ripple":ni,"ft-typography":Ke,"ft-icon":vi},$i.styles=[Be,mi],wi([o()],$i.prototype,"label",void 0),wi([o()],$i.prototype,"_value",void 0),wi([o()],$i.prototype,"helper",void 0),wi([o({type:Boolean})],$i.prototype,"outlined",void 0),wi([o({type:Boolean})],$i.prototype,"disabled",void 0),wi([o({type:Boolean})],$i.prototype,"error",void 0),wi([o()],$i.prototype,"prefix",void 0),wi([o()],$i.prototype,"icon",void 0),wi([o()],$i.prototype,"iconVariant",void 0),wi([o({type:Boolean})],$i.prototype,"filterSuggestions",void 0),wi([o({type:Number})],$i.prototype,"maxLength",void 0),wi([s()],$i.prototype,"focused",void 0),wi([s()],$i.prototype,"lastFiredValue",void 0),wi([s()],$i.prototype,"suggestionsOnTop",void 0),wi([s()],$i.prototype,"hideSuggestions",void 0),wi([s()],$i.prototype,"visibleSuggestions",void 0),wi([r(".ft-text-field--main-panel")],$i.prototype,"mainPanel",void 0),wi([r(".ft-text-field--input")],$i.prototype,"input",void 0),wi([r(".ft-text-field--suggestions")],$i.prototype,"suggestionsContainer",void 0),wi([p({selector:"ft-text-field-suggestion"})],$i.prototype,"suggestions",void 0);const Oi=v`
729
729
  .ft-text-field-suggestion {
730
730
  position: relative;
731
731
  padding: 8px 16px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-text-field",
3
- "version": "0.3.67",
3
+ "version": "0.3.68",
4
4
  "description": "A fluidtopics text field",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,12 +19,12 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-icon": "0.3.67",
23
- "@fluid-topics/ft-input-label": "0.3.67",
24
- "@fluid-topics/ft-ripple": "0.3.67",
25
- "@fluid-topics/ft-typography": "0.3.67",
26
- "@fluid-topics/ft-wc-utils": "0.3.67",
22
+ "@fluid-topics/ft-icon": "0.3.68",
23
+ "@fluid-topics/ft-input-label": "0.3.68",
24
+ "@fluid-topics/ft-ripple": "0.3.68",
25
+ "@fluid-topics/ft-typography": "0.3.68",
26
+ "@fluid-topics/ft-wc-utils": "0.3.68",
27
27
  "lit": "2.2.8"
28
28
  },
29
- "gitHead": "9db69a3abe84d6fb5ec11e29164f2ceaa7369352"
29
+ "gitHead": "58305116f36902ddf19fada77dfcba24243c5ac5"
30
30
  }