@fluid-topics/ft-text-field 0.3.69 → 0.3.70
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/build/ft-text-field.d.ts +3 -3
- package/build/ft-text-field.js +44 -36
- package/build/ft-text-field.light.js +20 -20
- package/build/ft-text-field.min.js +24 -24
- package/package.json +7 -7
package/build/ft-text-field.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export declare class FtTextField extends FtLitElement implements FtTextFieldProp
|
|
|
9
9
|
private _value;
|
|
10
10
|
get value(): string;
|
|
11
11
|
set value(value: string);
|
|
12
|
+
private setInternalValue;
|
|
13
|
+
dispatchedValue: string;
|
|
12
14
|
helper?: string;
|
|
13
15
|
outlined: boolean;
|
|
14
16
|
disabled: boolean;
|
|
@@ -19,7 +21,6 @@ export declare class FtTextField extends FtLitElement implements FtTextFieldProp
|
|
|
19
21
|
filterSuggestions: boolean;
|
|
20
22
|
maxLength?: number;
|
|
21
23
|
focused: boolean;
|
|
22
|
-
lastFiredValue: string;
|
|
23
24
|
suggestionsOnTop: boolean;
|
|
24
25
|
hideSuggestions: boolean;
|
|
25
26
|
visibleSuggestions: FtTextFieldSuggestion[];
|
|
@@ -32,10 +33,9 @@ export declare class FtTextField extends FtLitElement implements FtTextFieldProp
|
|
|
32
33
|
protected updated(props: PropertyValues): void;
|
|
33
34
|
private filterSuggestionsIfNeeded;
|
|
34
35
|
protected contentAvailableCallback(props: PropertyValues): void;
|
|
35
|
-
|
|
36
|
+
setValue(newValue: string, fireChangeEvent?: boolean): void;
|
|
36
37
|
private handleInput;
|
|
37
38
|
private handleClick;
|
|
38
|
-
setValue(newValue: string, fireEvents?: boolean): void;
|
|
39
39
|
private handleKeyboardNavigation;
|
|
40
40
|
private onSuggestionSelected;
|
|
41
41
|
private onFocus;
|
package/build/ft-text-field.js
CHANGED
|
@@ -18,22 +18,35 @@ export class FtTextField extends FtLitElement {
|
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments);
|
|
20
20
|
this._value = "";
|
|
21
|
+
this.dispatchedValue = "";
|
|
21
22
|
this.outlined = false;
|
|
22
23
|
this.disabled = false;
|
|
23
24
|
this.error = false;
|
|
24
25
|
this.prefix = null;
|
|
25
26
|
this.filterSuggestions = false;
|
|
26
27
|
this.focused = false;
|
|
27
|
-
this.lastFiredValue = "";
|
|
28
28
|
this.suggestionsOnTop = false;
|
|
29
29
|
this.hideSuggestions = false;
|
|
30
30
|
this.visibleSuggestions = [];
|
|
31
31
|
}
|
|
32
|
+
/*
|
|
33
|
+
* We prevent lit from creating setter and getter to differentiate
|
|
34
|
+
* when the value change comes from inside or outside the component
|
|
35
|
+
* so that we can update the reference to the last dispatched value in consequence.
|
|
36
|
+
* Lit will use the setter that updates the reference
|
|
37
|
+
* and the component should use `setInternalValue` that does not.
|
|
38
|
+
* */
|
|
32
39
|
get value() {
|
|
33
40
|
return this._value;
|
|
34
41
|
}
|
|
35
42
|
set value(value) {
|
|
36
|
-
this.
|
|
43
|
+
this.setInternalValue(value);
|
|
44
|
+
this.dispatchedValue = value;
|
|
45
|
+
}
|
|
46
|
+
setInternalValue(value) {
|
|
47
|
+
const oldValue = this._value;
|
|
48
|
+
this._value = value;
|
|
49
|
+
this.requestUpdate("value", oldValue);
|
|
37
50
|
}
|
|
38
51
|
focus() {
|
|
39
52
|
var _a;
|
|
@@ -45,12 +58,12 @@ export class FtTextField extends FtLitElement {
|
|
|
45
58
|
"ft-text-field--filled": !this.outlined,
|
|
46
59
|
"ft-text-field--outlined": this.outlined,
|
|
47
60
|
"ft-text-field--disabled": this.disabled,
|
|
48
|
-
"ft-text-field--has-value": !!this.
|
|
61
|
+
"ft-text-field--has-value": !!this.value,
|
|
49
62
|
"ft-text-field--with-label": !!this.label,
|
|
50
63
|
"ft-text-field--in-error": this.error,
|
|
51
64
|
"ft-text-field--with-prefix": !!this.prefix,
|
|
52
65
|
"ft-text-field--hide-suggestions": this.visibleSuggestions.length === 0 || this.hideSuggestions,
|
|
53
|
-
"ft-text-field--raised-label": this.focused || this.
|
|
66
|
+
"ft-text-field--raised-label": this.focused || this.value != "",
|
|
54
67
|
"ft-text-field--with-icon": !!this.icon
|
|
55
68
|
};
|
|
56
69
|
return html `
|
|
@@ -61,7 +74,7 @@ export class FtTextField extends FtLitElement {
|
|
|
61
74
|
<ft-input-label text="${this.label}"
|
|
62
75
|
?disabled=${this.disabled}
|
|
63
76
|
?outlined=${this.outlined}
|
|
64
|
-
?raised=${this.focused || this.
|
|
77
|
+
?raised=${this.focused || this.value != ""}
|
|
65
78
|
?error=${this.error}></ft-input-label>
|
|
66
79
|
<div class="ft-text-field--input-panel">
|
|
67
80
|
${this.outlined ? nothing : html `
|
|
@@ -77,7 +90,7 @@ export class FtTextField extends FtLitElement {
|
|
|
77
90
|
aria-label="${this.label}"
|
|
78
91
|
class="ft-typography--body1 ft-text-field--input"
|
|
79
92
|
?disabled=${this.disabled}
|
|
80
|
-
.value=${this.
|
|
93
|
+
.value=${this.value}
|
|
81
94
|
@click=${this.handleClick}
|
|
82
95
|
@keyup=${this.handleInput}
|
|
83
96
|
@focus=${this.onFocus}/>
|
|
@@ -103,13 +116,19 @@ export class FtTextField extends FtLitElement {
|
|
|
103
116
|
}
|
|
104
117
|
updated(props) {
|
|
105
118
|
super.updated(props);
|
|
106
|
-
if (props.has("
|
|
119
|
+
if (props.has("value") || props.has("filterSuggestions")) {
|
|
107
120
|
this.filterSuggestionsIfNeeded();
|
|
108
121
|
}
|
|
122
|
+
if (props.has("value") && props.get("value") != null) {
|
|
123
|
+
this.hideSuggestions = false;
|
|
124
|
+
}
|
|
125
|
+
if (props.has("dispatchedValue") && props.get("dispatchedValue") != null) {
|
|
126
|
+
this.hideSuggestions = true;
|
|
127
|
+
}
|
|
109
128
|
}
|
|
110
129
|
filterSuggestionsIfNeeded() {
|
|
111
130
|
if (this.filterSuggestions) {
|
|
112
|
-
this.suggestions.forEach(s => s.hidden = !s.getValue().toLowerCase().includes(this.
|
|
131
|
+
this.suggestions.forEach(s => s.hidden = !s.getValue().toLowerCase().includes(this.value.toLowerCase()));
|
|
113
132
|
this.visibleSuggestions = this.suggestions.filter(s => !s.hidden);
|
|
114
133
|
}
|
|
115
134
|
else {
|
|
@@ -127,35 +146,24 @@ export class FtTextField extends FtLitElement {
|
|
|
127
146
|
}
|
|
128
147
|
}
|
|
129
148
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
149
|
+
setValue(newValue, fireChangeEvent = false) {
|
|
150
|
+
if (this.value !== newValue) {
|
|
151
|
+
this.setInternalValue(newValue);
|
|
152
|
+
this.dispatchEvent(new CustomEvent("live-change", { detail: newValue }));
|
|
153
|
+
}
|
|
154
|
+
if (fireChangeEvent && this.dispatchedValue !== newValue) {
|
|
155
|
+
this.dispatchedValue = newValue;
|
|
156
|
+
this.dispatchEvent(new CustomEvent("change", { detail: newValue }));
|
|
157
|
+
}
|
|
133
158
|
}
|
|
134
159
|
handleInput(event) {
|
|
135
160
|
var _a;
|
|
136
161
|
const newValue = ((_a = this.input) === null || _a === void 0 ? void 0 : _a.value) || "";
|
|
137
|
-
|
|
138
|
-
this.updateValueFromInputField();
|
|
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
|
-
}
|
|
162
|
+
this.setValue(newValue, event.key == "Escape" || event.key == "Enter");
|
|
145
163
|
}
|
|
146
164
|
handleClick() {
|
|
147
165
|
this.hideSuggestions = false;
|
|
148
166
|
}
|
|
149
|
-
setValue(newValue, fireEvents) {
|
|
150
|
-
if (fireEvents && this._value !== newValue) {
|
|
151
|
-
this.dispatchEvent(new CustomEvent("live-change", { detail: newValue }));
|
|
152
|
-
}
|
|
153
|
-
this._value = newValue;
|
|
154
|
-
if (fireEvents && this.lastFiredValue !== this._value) {
|
|
155
|
-
this.dispatchEvent(new CustomEvent("change", { detail: this._value }));
|
|
156
|
-
}
|
|
157
|
-
this.lastFiredValue = this._value;
|
|
158
|
-
}
|
|
159
167
|
handleKeyboardNavigation(event) {
|
|
160
168
|
var _a;
|
|
161
169
|
if ((event.key === "ArrowDown" || event.key === "ArrowUp")) {
|
|
@@ -187,10 +195,10 @@ export class FtTextField extends FtLitElement {
|
|
|
187
195
|
this.hideSuggestions = false;
|
|
188
196
|
}
|
|
189
197
|
onMainPanelBlur() {
|
|
190
|
-
var _a;
|
|
198
|
+
var _a, _b;
|
|
191
199
|
if (!((_a = this.mainPanel) === null || _a === void 0 ? void 0 : _a.matches(":focus-within"))) {
|
|
192
200
|
this.focused = false;
|
|
193
|
-
this.
|
|
201
|
+
this.setValue(((_b = this.input) === null || _b === void 0 ? void 0 : _b.value) || "", true);
|
|
194
202
|
}
|
|
195
203
|
}
|
|
196
204
|
}
|
|
@@ -209,8 +217,11 @@ __decorate([
|
|
|
209
217
|
property()
|
|
210
218
|
], FtTextField.prototype, "label", void 0);
|
|
211
219
|
__decorate([
|
|
212
|
-
property()
|
|
213
|
-
], FtTextField.prototype, "
|
|
220
|
+
property({ noAccessor: true })
|
|
221
|
+
], FtTextField.prototype, "value", null);
|
|
222
|
+
__decorate([
|
|
223
|
+
state()
|
|
224
|
+
], FtTextField.prototype, "dispatchedValue", void 0);
|
|
214
225
|
__decorate([
|
|
215
226
|
property()
|
|
216
227
|
], FtTextField.prototype, "helper", void 0);
|
|
@@ -241,9 +252,6 @@ __decorate([
|
|
|
241
252
|
__decorate([
|
|
242
253
|
state()
|
|
243
254
|
], FtTextField.prototype, "focused", void 0);
|
|
244
|
-
__decorate([
|
|
245
|
-
state()
|
|
246
|
-
], FtTextField.prototype, "lastFiredValue", void 0);
|
|
247
255
|
__decorate([
|
|
248
256
|
state()
|
|
249
257
|
], FtTextField.prototype, "suggestionsOnTop", void 0);
|
|
@@ -4,18 +4,18 @@
|
|
|
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]?
|
|
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");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2018 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const W=Symbol.for(""),
|
|
13
|
+
const W=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t._$litStatic$},F=t=>({_$litStatic$:t,r:W}),V=new Map,G=(t=>(e,...i)=>{const o=i.length;let s,l;const n=[],r=[];let a,f=0,p=!1;for(;f<o;){for(a=e[f];f<o&&void 0!==(l=i[f],s=K(l));)a+=s+e[++f],p=!0;r.push(l),n.push(a),f++}if(f===o&&n.push(e[o]),p){const t=n.join("$$lit$$");void 0===(e=V.get(t))&&(n.raw=n,V.set(t,e=n)),i=r}return t(e,...i)})(z);
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
16
16
|
* Copyright 2020 Google LLC
|
|
17
17
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
18
|
-
*/var
|
|
18
|
+
*/var H;!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"}(H||(H={}));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"),Kt=e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",L.fontWeight,"600"),Ft=e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",L.letterSpacing,"1.246px"),Vt=e.FtCssVariableFactory.extend("--ft-typography-button-line-height",L.lineHeight,"1.15"),Gt=e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",L.textTransform,"uppercase"),Ht=i.css`
|
|
19
19
|
.ft-typography--title {
|
|
20
20
|
font-family: ${X};
|
|
21
21
|
font-size: ${Y};
|
|
@@ -86,12 +86,12 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
86
86
|
font-weight: ${Ct};
|
|
87
87
|
letter-spacing: ${It};
|
|
88
88
|
line-height: ${At};
|
|
89
|
-
text-transform: ${
|
|
89
|
+
text-transform: ${Dt};
|
|
90
90
|
}
|
|
91
91
|
`,te=i.css`
|
|
92
92
|
.ft-typography--overline {
|
|
93
|
-
font-family: ${
|
|
94
|
-
font-size: ${
|
|
93
|
+
font-family: ${Bt};
|
|
94
|
+
font-size: ${_t};
|
|
95
95
|
font-weight: ${Zt};
|
|
96
96
|
letter-spacing: ${Mt};
|
|
97
97
|
line-height: ${Ut};
|
|
@@ -101,23 +101,23 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
101
101
|
.ft-typography--button {
|
|
102
102
|
font-family: ${Rt};
|
|
103
103
|
font-size: ${Wt};
|
|
104
|
-
font-weight: ${
|
|
105
|
-
letter-spacing: ${
|
|
106
|
-
line-height: ${
|
|
107
|
-
text-transform: ${
|
|
104
|
+
font-weight: ${Kt};
|
|
105
|
+
letter-spacing: ${Ft};
|
|
106
|
+
line-height: ${Vt};
|
|
107
|
+
text-transform: ${Gt};
|
|
108
108
|
}
|
|
109
109
|
`,ie=i.css`
|
|
110
110
|
.ft-typography {
|
|
111
111
|
vertical-align: inherit;
|
|
112
112
|
}
|
|
113
|
-
`;var oe=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 se extends e.FtLitElement{constructor(){super(...arguments),this.variant=
|
|
114
|
-
<${
|
|
113
|
+
`;var oe=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 se extends e.FtLitElement{constructor(){super(...arguments),this.variant=H.body1}render(){return this.element?G`
|
|
114
|
+
<${F(this.element)}
|
|
115
115
|
class="ft-typography ft-typography--${this.variant}">
|
|
116
116
|
<slot></slot>
|
|
117
|
-
</${
|
|
118
|
-
`:
|
|
117
|
+
</${F(this.element)}>
|
|
118
|
+
`:G`
|
|
119
119
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
120
|
-
`}}se.styles=[
|
|
120
|
+
`}}se.styles=[Ht,Pt,qt,Lt,Xt,Yt,Jt,Qt,te,ee,ie],oe([o.property()],se.prototype,"element",void 0),oe([o.property()],se.prototype,"variant",void 0),e.customElement("ft-typography")(se);const le={fontSize:e.FtCssVariableFactory.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:e.FtCssVariableFactory.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:e.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:e.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","SIZE","12px"),labelMaxWidth:e.FtCssVariableFactory.create("--ft-input-label-max-width","SIZE","100%"),borderColor:e.FtCssVariableFactory.extend("--ft-input-label-border-color",e.designSystemVariables.colorOutline),textColor:e.FtCssVariableFactory.extend("--ft-input-label-text-color",e.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:e.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color",e.designSystemVariables.colorOnSurfaceDisabled),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system")},ne=i.css`
|
|
121
121
|
.ft-input-label {
|
|
122
122
|
position: absolute;
|
|
123
123
|
inset: 0;
|
|
@@ -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
|
|
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.dispatchedValue="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.filterSuggestions=!1,this.focused=!1,this.suggestionsOnTop=!1,this.hideSuggestions=!1,this.visibleSuggestions=[]}get value(){return this._value}set value(t){this.setInternalValue(t),this.dispatchedValue=t}setInternalValue(t){const e=this._value;this._value=t,this.requestUpdate("value",e)}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.
|
|
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.
|
|
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("
|
|
607
|
+
`}updated(t){super.updated(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}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)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(i,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}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,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}}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({noAccessor:!0})],Be.prototype,"value",null),De([o.state()],Be.prototype,"dispatchedValue",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,"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`
|
|
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=
|
|
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);
|
|
@@ -55,13 +55,13 @@ const c=window,d=c.ShadowRoot&&(void 0===c.ShadyCSS||c.ShadyCSS.nativeShadow)&&"
|
|
|
55
55
|
* @license
|
|
56
56
|
* Copyright 2017 Google LLC
|
|
57
57
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
58
|
-
*/;var
|
|
58
|
+
*/;var $;const w=window,O=w.trustedTypes,S=O?O.emptyScript:"",k=w.reactiveElementPolyfillSupport,E={toAttribute(t,e){switch(e){case Boolean:t=t?S:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},N=(t,e)=>e!==t&&(e==e||t==t),C={attribute:!0,type:String,converter:E,reflect:!1,hasChanged:N};class R extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;null!==(e=this.h)&&void 0!==e||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=C){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const s=this[t];this[e]=o,this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||C}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(m(t))}else void 0!==t&&e.push(m(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return b(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=C){var o;const s=this.constructor._$Ep(t,i);if(void 0!==s&&!0===i.reflect){const n=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:E).toAttribute(e,i.type);this._$El=t,null==n?this.removeAttribute(s):this.setAttribute(s,n),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,s=o._$Ev.get(t);if(void 0!==s&&this._$El!==s){const t=o.getPropertyOptions(s),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:E;this._$El=s,this[s]=n.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||N)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
59
59
|
/**
|
|
60
60
|
* @license
|
|
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
|
|
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.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");
|
|
65
65
|
/**
|
|
66
66
|
* @license
|
|
67
67
|
* Copyright 2017 Google LLC
|
|
@@ -72,12 +72,12 @@ var ht,ct;class dt extends R{constructor(){super(...arguments),this.renderOption
|
|
|
72
72
|
* @license
|
|
73
73
|
* Copyright 2021 Google LLC
|
|
74
74
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
75
|
-
*/var vt,bt,mt=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
|
|
75
|
+
*/var vt,bt,mt=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 $t extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:o}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const s=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return b(s,this.constructor.elementStyles),s}}}(dt)){constructor(){super(),this.exportpartsDebouncer=new e(5),this.constructorName=this.constructor.name,this.constructorPrototype=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this.constructorName&&Object.setPrototypeOf(this,this.constructorPrototype)}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),J`
|
|
76
76
|
${t.map((t=>J`
|
|
77
77
|
<style>${t}</style>
|
|
78
78
|
`))}
|
|
79
79
|
${this.getTemplate()}
|
|
80
|
-
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this.exportpartsDebouncer.run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,o,s,n,r;const l=t=>null!=t&&t.trim().length>0,a=t.filter(l).map((t=>t.trim()));if(0===a.length)return void this.removeAttribute("exportparts");const p=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(s=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==s?s:[],i=null!==(r=null===(n=t.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==r?r:[];new Array(...e,...i).filter(l).map((t=>t.trim())).forEach((t=>p.add(t)))}if(0===p.size)return void this.removeAttribute("exportparts");const f=[...p.values()].flatMap((t=>a.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...f].join(", "))}}mt([o()]
|
|
80
|
+
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this.exportpartsDebouncer.run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,o,s,n,r;const l=t=>null!=t&&t.trim().length>0,a=t.filter(l).map((t=>t.trim()));if(0===a.length)return void this.removeAttribute("exportparts");const p=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(s=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==s?s:[],i=null!==(r=null===(n=t.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==r?r:[];new Array(...e,...i).filter(l).map((t=>t.trim())).forEach((t=>p.add(t)))}if(0===p.size)return void this.removeAttribute("exportparts");const f=[...p.values()].flatMap((t=>a.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...f].join(", "))}}mt([o()],$t.prototype,"exportpartsPrefix",void 0),mt([function(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,e)=>!f(t,e),...null!=e?e:{}})}([])],$t.prototype,"exportpartsPrefixes",void 0),mt([o()],$t.prototype,"customStylesheet",void 0),v`
|
|
81
81
|
.ft-no-text-select {
|
|
82
82
|
-webkit-touch-callout: none;
|
|
83
83
|
-webkit-user-select: none;
|
|
@@ -115,24 +115,24 @@ var ht,ct;class dt extends R{constructor(){super(...arguments),this.renderOption
|
|
|
115
115
|
* Copyright 2017 Google LLC
|
|
116
116
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
117
117
|
*/
|
|
118
|
-
const
|
|
118
|
+
const wt=1,Ot=2,St=t=>(...e)=>({_$litDirective$:t,values:e});class kt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
119
119
|
/**
|
|
120
120
|
* @license
|
|
121
121
|
* Copyright 2018 Google LLC
|
|
122
122
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
123
|
-
*/const Et=St(class extends kt{constructor(t){var e;if(super(t),t.type
|
|
123
|
+
*/const Et=St(class extends kt{constructor(t){var e;if(super(t),t.type!==wt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const s=t.element.classList;this.nt.forEach((t=>{t in e||(s.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(s.add(t),this.nt.add(t)):(s.remove(t),this.nt.delete(t)))}return q}}),Nt=Symbol.for(""),Ct=t=>{if((null==t?void 0:t.r)===Nt)return null==t?void 0:t._$litStatic$},Rt=t=>({_$litStatic$:t,r:Nt}),Mt=new Map,zt=(t=>(e,...i)=>{const o=i.length;let s,n;const r=[],l=[];let a,p=0,f=!1;for(;p<o;){for(a=e[p];p<o&&void 0!==(n=i[p],s=Ct(n));)a+=s+e[++p],f=!0;l.push(n),r.push(a),p++}if(p===o&&r.push(e[o]),f){const t=r.join("$$lit$$");void 0===(e=Mt.get(t))&&(r.raw=r,Mt.set(t,e=r)),i=l}return t(e,...i)})(J);
|
|
124
124
|
/**
|
|
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"),
|
|
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),$e=xt.extend("--ft-typography-overline-font-size",At.fontSize,"10px"),we=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: ${
|
|
135
|
-
text-transform: ${
|
|
134
|
+
line-height: ${Tt};
|
|
135
|
+
text-transform: ${_t};
|
|
136
136
|
}
|
|
137
137
|
`,je=v`
|
|
138
138
|
.ft-typography--title-dense {
|
|
@@ -198,16 +198,16 @@ 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
|
-
`,
|
|
201
|
+
`,Te=v`
|
|
202
202
|
.ft-typography--overline {
|
|
203
203
|
font-family: ${me};
|
|
204
|
-
font-size: ${
|
|
205
|
-
font-weight: ${
|
|
204
|
+
font-size: ${$e};
|
|
205
|
+
font-weight: ${we};
|
|
206
206
|
letter-spacing: ${Oe};
|
|
207
207
|
line-height: ${Se};
|
|
208
208
|
text-transform: ${ke};
|
|
209
209
|
}
|
|
210
|
-
`,
|
|
210
|
+
`,_e=v`
|
|
211
211
|
.ft-typography--button {
|
|
212
212
|
font-family: ${Ee};
|
|
213
213
|
font-size: ${Ne};
|
|
@@ -220,14 +220,14 @@ const $t=1,Ot=2,St=t=>(...e)=>({_$litDirective$:t,values:e});class kt{constructo
|
|
|
220
220
|
.ft-typography {
|
|
221
221
|
vertical-align: inherit;
|
|
222
222
|
}
|
|
223
|
-
`;var We=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 Ke extends
|
|
223
|
+
`;var We=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 Ke extends $t{constructor(){super(...arguments),this.variant=Ut.body1}render(){return this.element?zt`
|
|
224
224
|
<${Rt(this.element)}
|
|
225
225
|
class="ft-typography ft-typography--${this.variant}">
|
|
226
226
|
<slot></slot>
|
|
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,_e,
|
|
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`
|
|
231
231
|
.ft-input-label {
|
|
232
232
|
position: absolute;
|
|
233
233
|
inset: 0;
|
|
@@ -349,7 +349,7 @@ const $t=1,Ot=2,St=t=>(...e)=>({_$litDirective$:t,values:e});class kt{constructo
|
|
|
349
349
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
350
350
|
border-top: none;
|
|
351
351
|
}
|
|
352
|
-
`;var Ve=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 Je extends
|
|
352
|
+
`;var Ve=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 Je extends $t{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return J`
|
|
353
353
|
<div class="${Et(t)}">
|
|
354
354
|
${this.text?J`
|
|
355
355
|
<div class="ft-input-label--text ft-typography--caption">
|
|
@@ -447,7 +447,7 @@ const $t=1,Ot=2,St=t=>(...e)=>({_$litDirective$:t,values:e});class kt{constructo
|
|
|
447
447
|
opacity: ${Xe.opacityContentOnSurfacePressed};
|
|
448
448
|
transform: translate(-50%, -50%) scale(1);
|
|
449
449
|
}
|
|
450
|
-
`;var si=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 ni extends
|
|
450
|
+
`;var si=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 ni extends $t{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new e(10),this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),n=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return J`
|
|
451
451
|
<style>
|
|
452
452
|
.ft-ripple .ft-ripple--effect,
|
|
453
453
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -517,7 +517,7 @@ class ri extends kt{constructor(t){if(super(t),this.it=X,t.type!==Ot)throw Error
|
|
|
517
517
|
.ft-icon--material {
|
|
518
518
|
font-family: ${di}, "Material Icons", sans-serif;
|
|
519
519
|
}
|
|
520
|
-
`;var gi;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(gi||(gi={}));var yi=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 vi extends
|
|
520
|
+
`;var gi;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(gi||(gi={}));var yi=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 vi extends $t{constructor(){super(...arguments),this.resolvedIcon=X}render(){var t;const e=null!==(t=this.variant)&&void 0!==t?t:gi.fluid_topics,i="material"!==e||this.value;return J`
|
|
521
521
|
<i class="ft-icon ${"ft-icon--"+e}">
|
|
522
522
|
${li(this.resolvedIcon)}
|
|
523
523
|
<slot ?hidden=${i}></slot>
|
|
@@ -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
|
|
677
|
+
`;var $i=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 wi extends $t{constructor(){super(...arguments),this._value="",this.dispatchedValue="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.filterSuggestions=!1,this.focused=!1,this.suggestionsOnTop=!1,this.hideSuggestions=!1,this.visibleSuggestions=[]}get value(){return this._value}set value(t){this.setInternalValue(t),this.dispatchedValue=t}setInternalValue(t){const e=this._value;this._value=t,this.requestUpdate("value",e)}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.
|
|
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.
|
|
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("
|
|
728
|
+
`}updated(t){super.updated(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}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)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(i,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}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,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}}wi.elementDefinitions={"ft-input-label":Je,"ft-ripple":ni,"ft-typography":Ke,"ft-icon":vi},wi.styles=[Be,mi],$i([o()],wi.prototype,"label",void 0),$i([o({noAccessor:!0})],wi.prototype,"value",null),$i([s()],wi.prototype,"dispatchedValue",void 0),$i([o()],wi.prototype,"helper",void 0),$i([o({type:Boolean})],wi.prototype,"outlined",void 0),$i([o({type:Boolean})],wi.prototype,"disabled",void 0),$i([o({type:Boolean})],wi.prototype,"error",void 0),$i([o()],wi.prototype,"prefix",void 0),$i([o()],wi.prototype,"icon",void 0),$i([o()],wi.prototype,"iconVariant",void 0),$i([o({type:Boolean})],wi.prototype,"filterSuggestions",void 0),$i([o({type:Number})],wi.prototype,"maxLength",void 0),$i([s()],wi.prototype,"focused",void 0),$i([s()],wi.prototype,"suggestionsOnTop",void 0),$i([s()],wi.prototype,"hideSuggestions",void 0),$i([s()],wi.prototype,"visibleSuggestions",void 0),$i([r(".ft-text-field--main-panel")],wi.prototype,"mainPanel",void 0),$i([r(".ft-text-field--input")],wi.prototype,"input",void 0),$i([r(".ft-text-field--suggestions")],wi.prototype,"suggestionsContainer",void 0),$i([p({selector:"ft-text-field-suggestion"})],wi.prototype,"suggestions",void 0);const Oi=v`
|
|
729
729
|
.ft-text-field-suggestion {
|
|
730
730
|
position: relative;
|
|
731
731
|
padding: 8px 16px;
|
|
@@ -750,7 +750,7 @@ class ri extends kt{constructor(t){if(super(t),this.it=X,t.type!==Ot)throw Error
|
|
|
750
750
|
slot {
|
|
751
751
|
pointer-events: none;
|
|
752
752
|
}
|
|
753
|
-
`;var Si=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 ki extends CustomEvent{constructor(t){super("suggestion-selected",{detail:t,bubbles:!0,composed:!0})}}class Ei extends
|
|
753
|
+
`;var Si=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 ki extends CustomEvent{constructor(t){super("suggestion-selected",{detail:t,bubbles:!0,composed:!0})}}class Ei extends $t{render(){return J`
|
|
754
754
|
<div class="ft-text-field-suggestion"
|
|
755
755
|
tabindex="-1"
|
|
756
756
|
@keydown=${this.onKeyDown}
|
|
@@ -762,4 +762,4 @@ class ri extends kt{constructor(t){if(super(t),this.it=X,t.type!==Ot)throw Error
|
|
|
762
762
|
<slot></slot>
|
|
763
763
|
</ft-typography>
|
|
764
764
|
</div>
|
|
765
|
-
`}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 ki(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())}}Ei.elementDefinitions={"ft-ripple":ni,"ft-typography":Ke,"ft-icon":vi},Ei.styles=Oi,Si([o()],Ei.prototype,"value",void 0),Si([r(".ft-text-field-suggestion")],Ei.prototype,"container",void 0),Si([function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},i?p({slot:s,flatten:e,selector:i}):n({descriptor:t=>({get(){var t,e;const i="slot"+(s?`[name=${s}]`:":not([name])"),n=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==n?void 0:n.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}()],Ei.prototype,"assignedNodes",void 0),h("ft-text-field")(
|
|
765
|
+
`}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 ki(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())}}Ei.elementDefinitions={"ft-ripple":ni,"ft-typography":Ke,"ft-icon":vi},Ei.styles=Oi,Si([o()],Ei.prototype,"value",void 0),Si([r(".ft-text-field-suggestion")],Ei.prototype,"container",void 0),Si([function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},i?p({slot:s,flatten:e,selector:i}):n({descriptor:t=>({get(){var t,e;const i="slot"+(s?`[name=${s}]`:":not([name])"),n=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==n?void 0:n.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}()],Ei.prototype,"assignedNodes",void 0),h("ft-text-field")(wi),h("ft-text-field-suggestion")(Ei),t.FtTextField=wi,t.FtTextFieldCssVariables=bi,t.FtTextFieldSuggestion=Ei,t.SuggestionSelectedEvent=ki,t.styles=mi,t.suggestionStyles=Oi,Object.defineProperty(t,"i",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-text-field",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.70",
|
|
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.
|
|
23
|
-
"@fluid-topics/ft-input-label": "0.3.
|
|
24
|
-
"@fluid-topics/ft-ripple": "0.3.
|
|
25
|
-
"@fluid-topics/ft-typography": "0.3.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
22
|
+
"@fluid-topics/ft-icon": "0.3.70",
|
|
23
|
+
"@fluid-topics/ft-input-label": "0.3.70",
|
|
24
|
+
"@fluid-topics/ft-ripple": "0.3.70",
|
|
25
|
+
"@fluid-topics/ft-typography": "0.3.70",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "0.3.70",
|
|
27
27
|
"lit": "2.2.8"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "f196cbccc700d904e13deb5c40e2f4f5121d9bb9"
|
|
30
30
|
}
|