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

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.
@@ -103,7 +103,7 @@ export class FtTextField extends FtLitElement {
103
103
  }
104
104
  updated(props) {
105
105
  super.updated(props);
106
- if (props.has("value") || props.has("filterSuggestions")) {
106
+ if (props.has("_value") || props.has("filterSuggestions")) {
107
107
  this.filterSuggestionsIfNeeded();
108
108
  }
109
109
  }
@@ -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]?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");
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:D})}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 _(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 _{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 _(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 D{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 D{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 D{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 D{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,_),(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"),_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`
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"),_t=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",L.textTransform,"inherit"),Dt=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};
@@ -86,11 +86,11 @@ 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: ${Dt};
89
+ text-transform: ${_t};
90
90
  }
91
91
  `,te=i.css`
92
92
  .ft-typography--overline {
93
- font-family: ${_t};
93
+ font-family: ${Dt};
94
94
  font-size: ${Bt};
95
95
  font-weight: ${Zt};
96
96
  letter-spacing: ${Mt};
@@ -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 _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`
561
+ `;var _e=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 De 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}
@@ -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)||"";"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`
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())}}De.elementDefinitions={"ft-input-label":ae,"ft-ripple":$e,"ft-typography":se,"ft-icon":Ce},De.styles=[Xt,Ae],_e([o.property()],De.prototype,"label",void 0),_e([o.property()],De.prototype,"_value",void 0),_e([o.property()],De.prototype,"helper",void 0),_e([o.property({type:Boolean})],De.prototype,"outlined",void 0),_e([o.property({type:Boolean})],De.prototype,"disabled",void 0),_e([o.property({type:Boolean})],De.prototype,"error",void 0),_e([o.property()],De.prototype,"prefix",void 0),_e([o.property()],De.prototype,"icon",void 0),_e([o.property()],De.prototype,"iconVariant",void 0),_e([o.property({type:Boolean})],De.prototype,"filterSuggestions",void 0),_e([o.property({type:Number})],De.prototype,"maxLength",void 0),_e([o.state()],De.prototype,"focused",void 0),_e([o.state()],De.prototype,"lastFiredValue",void 0),_e([o.state()],De.prototype,"suggestionsOnTop",void 0),_e([o.state()],De.prototype,"hideSuggestions",void 0),_e([o.state()],De.prototype,"visibleSuggestions",void 0),_e([o.query(".ft-text-field--main-panel")],De.prototype,"mainPanel",void 0),_e([o.query(".ft-text-field--input")],De.prototype,"input",void 0),_e([o.query(".ft-text-field--suggestions")],De.prototype,"suggestionsContainer",void 0),_e([o.queryAssignedElements({selector:"ft-text-field-suggestion"})],De.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=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);
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")(De),e.customElement("ft-text-field-suggestion")(Ue),t.FtTextField=De,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);
@@ -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)||"";"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`
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.68",
3
+ "version": "0.3.69",
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.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",
22
+ "@fluid-topics/ft-icon": "0.3.69",
23
+ "@fluid-topics/ft-input-label": "0.3.69",
24
+ "@fluid-topics/ft-ripple": "0.3.69",
25
+ "@fluid-topics/ft-typography": "0.3.69",
26
+ "@fluid-topics/ft-wc-utils": "0.3.69",
27
27
  "lit": "2.2.8"
28
28
  },
29
- "gitHead": "58305116f36902ddf19fada77dfcba24243c5ac5"
29
+ "gitHead": "f177be3c8737642e9938649a08fc705ed824c5cb"
30
30
  }