@fluid-topics/ft-text-field
Advanced tools
Comparing version 0.3.65 to 0.3.66
@@ -20,5 +20,7 @@ import { PropertyValues } from "lit"; | ||
focused: boolean; | ||
lastFiredValue: string; | ||
suggestionsOnTop: boolean; | ||
hideSuggestions: boolean; | ||
visibleSuggestions: FtTextFieldSuggestion[]; | ||
mainPanel?: HTMLElement; | ||
input?: HTMLInputElement; | ||
@@ -35,8 +37,8 @@ suggestionsContainer?: HTMLElement; | ||
private handleClick; | ||
setValue(newValue: string, fireEvent?: boolean): void; | ||
setValue(newValue: string, fireEvents?: boolean): void; | ||
private handleKeyboardNavigation; | ||
private onSuggestionSelected; | ||
private onFocus; | ||
private onInputBlur; | ||
private onMainPanelBlur; | ||
} | ||
//# sourceMappingURL=ft-text-field.d.ts.map |
@@ -27,2 +27,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
this.focused = false; | ||
this.lastFiredValue = ""; | ||
this.suggestionsOnTop = false; | ||
@@ -53,3 +54,4 @@ this.hideSuggestions = false; | ||
<div class="ft-text-field--main-panel" | ||
@keydown=${this.handleKeyboardNavigation}> | ||
@keydown=${this.handleKeyboardNavigation} | ||
@focusout=${this.onMainPanelBlur}> | ||
<ft-input-label text="${this.label}" | ||
@@ -76,6 +78,4 @@ ?disabled=${this.disabled} | ||
@click=${this.handleClick} | ||
@change=${this.updateValueFromInputField} | ||
@keyup=${this.handleInput} | ||
@focus=${this.onFocus} | ||
@blur=${this.onInputBlur}/> | ||
@focus=${this.onFocus}/> | ||
${this.icon ? html ` | ||
@@ -131,3 +131,3 @@ <ft-icon class="ft-text-field--icon" | ||
} | ||
handleInput() { | ||
handleInput(event) { | ||
var _a; | ||
@@ -140,2 +140,5 @@ const newValue = ((_a = this.input) === null || _a === void 0 ? void 0 : _a.value) || ""; | ||
} | ||
if (event.key == "Escape" || event.key == "Enter") { | ||
this.updateValueFromInputField(); | ||
} | ||
} | ||
@@ -145,7 +148,11 @@ handleClick() { | ||
} | ||
setValue(newValue, fireEvent) { | ||
setValue(newValue, fireEvents) { | ||
if (fireEvents && this.value !== newValue) { | ||
this.dispatchEvent(new CustomEvent("live-change", { detail: newValue })); | ||
} | ||
this.value = newValue; | ||
if (fireEvent) { | ||
if (fireEvents && this.lastFiredValue !== this.value) { | ||
this.dispatchEvent(new CustomEvent("change", { detail: this.value })); | ||
} | ||
this.lastFiredValue = this.value; | ||
} | ||
@@ -182,4 +189,8 @@ handleKeyboardNavigation(event) { | ||
} | ||
onInputBlur() { | ||
this.focused = false; | ||
onMainPanelBlur() { | ||
var _a; | ||
if (!((_a = this.mainPanel) === null || _a === void 0 ? void 0 : _a.matches(":focus-within"))) { | ||
this.focused = false; | ||
this.updateValueFromInputField(); | ||
} | ||
} | ||
@@ -236,2 +247,5 @@ } | ||
state() | ||
], FtTextField.prototype, "lastFiredValue", void 0); | ||
__decorate([ | ||
state() | ||
], FtTextField.prototype, "suggestionsOnTop", void 0); | ||
@@ -245,2 +259,5 @@ __decorate([ | ||
__decorate([ | ||
query(".ft-text-field--main-panel") | ||
], FtTextField.prototype, "mainPanel", void 0); | ||
__decorate([ | ||
query(".ft-text-field--input") | ||
@@ -247,0 +264,0 @@ ], FtTextField.prototype, "input", void 0); |
@@ -7,3 +7,3 @@ !function(t,e,i,o,s,l){ | ||
*/ | ||
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,x=(t="")=>c.createComment(t),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,g=Array.isArray,y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,b=/-->/g,v=/>/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=b:void 0!==a[1]?n=v: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===b||n===v?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 I{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=I.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]?U:"@"===e[1]?M: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],x()),O.nextNode(),r.push({type:2,index:++s});o.append(t[e],x())}}}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 C(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=u(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=C(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=C(this,t,e),u(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&&u(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=I.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 I(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(x()),this.O(x()),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=C(this,t,e,0),l=!u(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=C(this,o[i+n],e,n),r===S&&(r=this._$AH[n]),l||(l=!u(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 U 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 M 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=C(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){C(this,t)}}const R=r.litHtmlPolyfillSupport;null==R||R(I,D),(null!==(n=r.litHtmlVersions)&&void 0!==n?n:r.litHtmlVersions=[]).push("2.4.0"); | ||
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"); | ||
/** | ||
@@ -19,3 +19,3 @@ * @license | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/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 q=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),L=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),P={fontFamily:L,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",q),Y=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",P.fontSize,"20px"),J=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",P.fontWeight,"normal"),Q=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",P.letterSpacing,"0.15px"),tt=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",P.lineHeight,"1.2"),et=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",P.textTransform,"inherit"),it=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",q),ot=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",P.fontSize,"14px"),st=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",P.fontWeight,"normal"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",P.letterSpacing,"0.105px"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",P.lineHeight,"1.7"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",P.textTransform,"inherit"),at=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",L),ft=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",P.fontSize,"16px"),pt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",P.fontWeight,"600"),ht=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",P.letterSpacing,"0.144px"),dt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",P.lineHeight,"1.5"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",P.textTransform,"inherit"),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",L),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",P.fontSize,"14px"),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",P.fontWeight,"normal"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",P.letterSpacing,"0.098px"),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",P.lineHeight,"1.7"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",P.textTransform,"inherit"),mt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",L),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",P.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",P.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",P.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",P.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",P.textTransform,"inherit")},$t=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",L),wt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",P.fontSize,"14px"),kt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",P.fontWeight,"normal"),zt=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",P.letterSpacing,"0.252px"),St=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",P.lineHeight,"1.4"),Et=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",P.textTransform,"inherit"),Nt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",L),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",P.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",P.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",P.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",P.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",P.textTransform,"inherit")},Ot=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",L),jt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",P.fontSize,"10px"),It=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",P.fontWeight,"normal"),Ct=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",P.letterSpacing,"0.33px"),At=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",P.lineHeight,"1.6"),Dt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",P.textTransform,"inherit"),Bt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",L),_t=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",P.fontSize,"10px"),Zt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",P.fontWeight,"normal"),Ut=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",P.letterSpacing,"1.5px"),Mt=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",P.lineHeight,"1.6"),Tt=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",P.textTransform,"uppercase"),Rt=e.FtCssVariableFactory.extend("--ft-typography-button-font-family",L),Wt=e.FtCssVariableFactory.extend("--ft-typography-button-font-size",P.fontSize,"14px"),Ft=e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",P.fontWeight,"600"),Kt=e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",P.letterSpacing,"1.246px"),Gt=e.FtCssVariableFactory.extend("--ft-typography-button-line-height",P.lineHeight,"1.15"),Ht=e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",P.textTransform,"uppercase"),Vt=i.css` | ||
*/var V;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(V||(V={}));const P=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),q=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),L={fontFamily:q,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},X=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",P),Y=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",L.fontSize,"20px"),J=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",L.fontWeight,"normal"),Q=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",L.letterSpacing,"0.15px"),tt=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",L.lineHeight,"1.2"),et=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",L.textTransform,"inherit"),it=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",P),ot=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",L.fontSize,"14px"),st=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",L.fontWeight,"normal"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",L.letterSpacing,"0.105px"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",L.lineHeight,"1.7"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",L.textTransform,"inherit"),at=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",q),ft=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",L.fontSize,"16px"),pt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",L.fontWeight,"600"),ht=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",L.letterSpacing,"0.144px"),dt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",L.lineHeight,"1.5"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",L.textTransform,"inherit"),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",q),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",L.fontSize,"14px"),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",L.fontWeight,"normal"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",L.letterSpacing,"0.098px"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",L.lineHeight,"1.7"),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",L.textTransform,"inherit"),mt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",L.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",L.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",L.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",L.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",L.textTransform,"inherit")},$t=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",q),wt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",L.fontSize,"14px"),kt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",L.fontWeight,"normal"),zt=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",L.letterSpacing,"0.252px"),St=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",L.lineHeight,"1.4"),Et=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",L.textTransform,"inherit"),Nt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",L.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",L.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",L.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",L.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",L.textTransform,"inherit")},Ot=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",q),jt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",L.fontSize,"10px"),Ct=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",L.fontWeight,"normal"),It=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",L.letterSpacing,"0.33px"),At=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",L.lineHeight,"1.6"),Dt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",L.textTransform,"inherit"),Bt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",q),_t=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",L.fontSize,"10px"),Zt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",L.fontWeight,"normal"),Mt=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",L.letterSpacing,"1.5px"),Ut=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",L.lineHeight,"1.6"),Tt=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",L.textTransform,"uppercase"),Rt=e.FtCssVariableFactory.extend("--ft-typography-button-font-family",q),Wt=e.FtCssVariableFactory.extend("--ft-typography-button-font-size",L.fontSize,"14px"),Ft=e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",L.fontWeight,"600"),Kt=e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",L.letterSpacing,"1.246px"),Gt=e.FtCssVariableFactory.extend("--ft-typography-button-line-height",L.lineHeight,"1.15"),Ht=e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",L.textTransform,"uppercase"),Vt=i.css` | ||
.ft-typography--title { | ||
@@ -29,3 +29,3 @@ font-family: ${X}; | ||
} | ||
`,qt=i.css` | ||
`,Pt=i.css` | ||
.ft-typography--title-dense { | ||
@@ -39,3 +39,3 @@ font-family: ${it}; | ||
} | ||
`,Lt=i.css` | ||
`,qt=i.css` | ||
.ft-typography--subtitle1 { | ||
@@ -49,10 +49,10 @@ font-family: ${at}; | ||
} | ||
`,Pt=i.css` | ||
`,Lt=i.css` | ||
.ft-typography--subtitle2 { | ||
font-family: ${xt}; | ||
font-size: ${ut}; | ||
font-family: ${ut}; | ||
font-size: ${xt}; | ||
font-weight: ${gt}; | ||
letter-spacing: ${yt}; | ||
line-height: ${bt}; | ||
text-transform: ${vt}; | ||
line-height: ${vt}; | ||
text-transform: ${bt}; | ||
} | ||
@@ -91,4 +91,4 @@ | ||
font-size: ${jt}; | ||
font-weight: ${It}; | ||
letter-spacing: ${Ct}; | ||
font-weight: ${Ct}; | ||
letter-spacing: ${It}; | ||
line-height: ${At}; | ||
@@ -102,4 +102,4 @@ text-transform: ${Dt}; | ||
font-weight: ${Zt}; | ||
letter-spacing: ${Ut}; | ||
line-height: ${Mt}; | ||
letter-spacing: ${Mt}; | ||
line-height: ${Ut}; | ||
text-transform: ${Tt}; | ||
@@ -127,3 +127,3 @@ } | ||
<slot class="ft-typography ft-typography--${this.variant}"></slot> | ||
`}}se.styles=[Vt,qt,Lt,Pt,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` | ||
`}}se.styles=[Vt,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` | ||
.ft-input-label { | ||
@@ -259,3 +259,3 @@ position: absolute; | ||
</div> | ||
`}}ae.elementDefinitions={},ae.styles=[Jt,ne],re([o.property({type:String})],ae.prototype,"text",void 0),re([o.property({type:Boolean})],ae.prototype,"raised",void 0),re([o.property({type:Boolean})],ae.prototype,"outlined",void 0),re([o.property({type:Boolean})],ae.prototype,"disabled",void 0),re([o.property({type:Boolean})],ae.prototype,"error",void 0),e.customElement("ft-input-label")(ae);const fe=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),pe={color:fe,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",fe),opacityContentOnSurfacePressed:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},he=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),de=he,ce=e.FtCssVariableFactory.extend("--ft-ripple-background-color",he),xe=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),ue=xe,ge=e.FtCssVariableFactory.extend("--ft-ripple-background-color",xe),ye=i.css` | ||
`}}ae.elementDefinitions={},ae.styles=[Jt,ne],re([o.property({type:String})],ae.prototype,"text",void 0),re([o.property({type:Boolean})],ae.prototype,"raised",void 0),re([o.property({type:Boolean})],ae.prototype,"outlined",void 0),re([o.property({type:Boolean})],ae.prototype,"disabled",void 0),re([o.property({type:Boolean})],ae.prototype,"error",void 0),e.customElement("ft-input-label")(ae);const fe=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),pe={color:fe,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",fe),opacityContentOnSurfacePressed:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},he=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),de=he,ce=e.FtCssVariableFactory.extend("--ft-ripple-background-color",he),ue=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),xe=ue,ge=e.FtCssVariableFactory.extend("--ft-ripple-background-color",ue),ye=i.css` | ||
:host { | ||
@@ -294,3 +294,3 @@ display: contents; | ||
.ft-ripple.ft-ripple--secondary .ft-ripple--effect { | ||
background-color: ${ue}; | ||
background-color: ${xe}; | ||
} | ||
@@ -350,3 +350,3 @@ | ||
} | ||
`;var be,ve,me=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.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.Debouncer(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.Debouncer(10),this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),l=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-l.x:l.width/2),this.originY=Math.round(null!=s?s-l.y:l.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 i.html` | ||
`;var ve,be,me=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.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.Debouncer(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.Debouncer(10),this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),l=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-l.x:l.width/2),this.originY=Math.round(null!=s?s-l.y:l.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 i.html` | ||
<style> | ||
@@ -368,3 +368,3 @@ .ft-ripple .ft-ripple--effect, | ||
</div> | ||
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}))}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}$e.elementDefinitions={},$e.styles=ye,me([o.property({type:Boolean})],$e.prototype,"primary",void 0),me([o.property({type:Boolean})],$e.prototype,"secondary",void 0),me([o.property({type:Boolean})],$e.prototype,"unbounded",void 0),me([o.property({type:Boolean})],$e.prototype,"activated",void 0),me([o.property({type:Boolean})],$e.prototype,"selected",void 0),me([o.property({type:Boolean})],$e.prototype,"disabled",void 0),me([o.state()],$e.prototype,"hovered",void 0),me([o.state()],$e.prototype,"focused",void 0),me([o.state()],$e.prototype,"pressed",void 0),me([o.state()],$e.prototype,"rippling",void 0),me([o.state()],$e.prototype,"rippleSize",void 0),me([o.state()],$e.prototype,"originX",void 0),me([o.state()],$e.prototype,"originY",void 0),me([o.query(".ft-ripple")],$e.prototype,"ripple",void 0),me([o.query(".ft-ripple--effect")],$e.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")($e),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(be||(be={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(ve||(ve={})),new Map([...["abw"].map((t=>[t,ve.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,ve.AUDIO])),...["avi"].map((t=>[t,ve.AVI])),...["chm","xhs"].map((t=>[t,ve.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,ve.CODE])),...["csv"].map((t=>[t,ve.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,ve.DITA])),...["epub"].map((t=>[t,ve.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,ve.EXCEL])),...["flac"].map((t=>[t,ve.FLAC])),...["gif"].map((t=>[t,ve.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,ve.GZIP])),...["html","htm","xhtml"].map((t=>[t,ve.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,ve.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,ve.JPEG])),...["json"].map((t=>[t,ve.JSON])),...["m4a","m4p"].map((t=>[t,ve.M4A])),...["mov","qt"].map((t=>[t,ve.MOV])),...["mp3"].map((t=>[t,ve.MP3])),...["mp4","m4v"].map((t=>[t,ve.MP4])),...["ogg","oga"].map((t=>[t,ve.OGG])),...["pdf","ps"].map((t=>[t,ve.PDF])),...["png"].map((t=>[t,ve.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,ve.POWERPOINT])),...["rar"].map((t=>[t,ve.RAR])),...["stp"].map((t=>[t,ve.STP])),...["txt","rtf","md","mdown"].map((t=>[t,ve.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,ve.VIDEO])),...["wav"].map((t=>[t,ve.WAV])),...["wma"].map((t=>[t,ve.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,ve.WORD])),...["xml","xsl","rdf"].map((t=>[t,ve.XML])),...["yaml","yml","x-yaml"].map((t=>[t,ve.YAML])),...["zip"].map((t=>[t,ve.ZIP]))]);const we=e.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),ke=e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),ze=e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),Se=e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),Ee=e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset"),Ne=i.css` | ||
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}))}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}$e.elementDefinitions={},$e.styles=ye,me([o.property({type:Boolean})],$e.prototype,"primary",void 0),me([o.property({type:Boolean})],$e.prototype,"secondary",void 0),me([o.property({type:Boolean})],$e.prototype,"unbounded",void 0),me([o.property({type:Boolean})],$e.prototype,"activated",void 0),me([o.property({type:Boolean})],$e.prototype,"selected",void 0),me([o.property({type:Boolean})],$e.prototype,"disabled",void 0),me([o.state()],$e.prototype,"hovered",void 0),me([o.state()],$e.prototype,"focused",void 0),me([o.state()],$e.prototype,"pressed",void 0),me([o.state()],$e.prototype,"rippling",void 0),me([o.state()],$e.prototype,"rippleSize",void 0),me([o.state()],$e.prototype,"originX",void 0),me([o.state()],$e.prototype,"originY",void 0),me([o.query(".ft-ripple")],$e.prototype,"ripple",void 0),me([o.query(".ft-ripple--effect")],$e.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")($e),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(ve||(ve={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(be||(be={})),new Map([...["abw"].map((t=>[t,be.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,be.AUDIO])),...["avi"].map((t=>[t,be.AVI])),...["chm","xhs"].map((t=>[t,be.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,be.CODE])),...["csv"].map((t=>[t,be.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,be.DITA])),...["epub"].map((t=>[t,be.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,be.EXCEL])),...["flac"].map((t=>[t,be.FLAC])),...["gif"].map((t=>[t,be.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,be.GZIP])),...["html","htm","xhtml"].map((t=>[t,be.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,be.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,be.JPEG])),...["json"].map((t=>[t,be.JSON])),...["m4a","m4p"].map((t=>[t,be.M4A])),...["mov","qt"].map((t=>[t,be.MOV])),...["mp3"].map((t=>[t,be.MP3])),...["mp4","m4v"].map((t=>[t,be.MP4])),...["ogg","oga"].map((t=>[t,be.OGG])),...["pdf","ps"].map((t=>[t,be.PDF])),...["png"].map((t=>[t,be.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,be.POWERPOINT])),...["rar"].map((t=>[t,be.RAR])),...["stp"].map((t=>[t,be.STP])),...["txt","rtf","md","mdown"].map((t=>[t,be.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,be.VIDEO])),...["wav"].map((t=>[t,be.WAV])),...["wma"].map((t=>[t,be.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,be.WORD])),...["xml","xsl","rdf"].map((t=>[t,be.XML])),...["yaml","yml","x-yaml"].map((t=>[t,be.YAML])),...["zip"].map((t=>[t,be.ZIP]))]);const we=e.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),ke=e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),ze=e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),Se=e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),Ee=e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset"),Ne=i.css` | ||
:host, i.ft-icon { | ||
@@ -416,3 +416,3 @@ display: inline-flex; | ||
} | ||
`;var Oe;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Oe||(Oe={}));var je=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 Ie extends e.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=i.nothing}render(){var t;const e=null!==(t=this.variant)&&void 0!==t?t:Oe.fluid_topics,o="material"!==e||this.value;return i.html` | ||
`;var Oe;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Oe||(Oe={}));var je=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 Ce extends e.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=i.nothing}render(){var t;const e=null!==(t=this.variant)&&void 0!==t?t:Oe.fluid_topics,o="material"!==e||this.value;return i.html` | ||
<i class="ft-icon ${"ft-icon--"+e}"> | ||
@@ -422,3 +422,3 @@ ${l.unsafeHTML(this.resolvedIcon)} | ||
</i> | ||
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case Oe.file_format:this.resolvedIcon=null!==(t=ve[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Oe.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=be[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ie.elementDefinitions={},Ie.styles=Ne,je([o.property()],Ie.prototype,"variant",void 0),je([o.property()],Ie.prototype,"value",void 0),je([o.state()],Ie.prototype,"resolvedIcon",void 0),je([o.query("slot")],Ie.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Ie);const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SIZE","14px"),labelSize:e.FtCssVariableFactory.create("--ft-text-field-label-size","SIZE","11px"),verticalSpacing:e.FtCssVariableFactory.create("--ft-text-field-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-text-field-horizontal-spacing","SIZE","16px"),helperColor:e.FtCssVariableFactory.extend("--ft-text-field-helper-color",e.designSystemVariables.colorOnSurfaceMedium),colorPrimary:e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system"),prefixColor:e.FtCssVariableFactory.extend("--ft-text-field-prefix-color",e.designSystemVariables.colorOnSurfaceMedium),iconColor:e.FtCssVariableFactory.extend("--ft-text-field-icon-color",e.designSystemVariables.colorOnSurfaceMedium),floatingZIndex:e.FtCssVariableFactory.create("--ft-text-field-floating-components-z-index","NUMBER","3"),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),colorOutline:e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),elevation02:e.FtCssVariableFactory.external(e.designSystemVariables.elevation02,"Design system"),suggestSize:e.FtCssVariableFactory.create("--ft-text-field-suggest-size","SIZE","300px")},Ae=i.css` | ||
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case Oe.file_format:this.resolvedIcon=null!==(t=be[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Oe.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=ve[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ce.elementDefinitions={},Ce.styles=Ne,je([o.property()],Ce.prototype,"variant",void 0),je([o.property()],Ce.prototype,"value",void 0),je([o.state()],Ce.prototype,"resolvedIcon",void 0),je([o.query("slot")],Ce.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Ce);const Ie={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SIZE","14px"),labelSize:e.FtCssVariableFactory.create("--ft-text-field-label-size","SIZE","11px"),verticalSpacing:e.FtCssVariableFactory.create("--ft-text-field-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-text-field-horizontal-spacing","SIZE","16px"),helperColor:e.FtCssVariableFactory.extend("--ft-text-field-helper-color",e.designSystemVariables.colorOnSurfaceMedium),colorPrimary:e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system"),prefixColor:e.FtCssVariableFactory.extend("--ft-text-field-prefix-color",e.designSystemVariables.colorOnSurfaceMedium),iconColor:e.FtCssVariableFactory.extend("--ft-text-field-icon-color",e.designSystemVariables.colorOnSurfaceMedium),floatingZIndex:e.FtCssVariableFactory.create("--ft-text-field-floating-components-z-index","NUMBER","3"),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),colorOutline:e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),elevation02:e.FtCssVariableFactory.external(e.designSystemVariables.elevation02,"Design system"),suggestSize:e.FtCssVariableFactory.create("--ft-text-field-suggest-size","SIZE","300px")},Ae=i.css` | ||
*:focus { | ||
@@ -436,6 +436,6 @@ outline: none; | ||
ft-input-label { | ||
${e.setVariable(le.fontSize,Ce.fontSize)}; | ||
${e.setVariable(le.raisedFontSize,Ce.labelSize)}; | ||
${e.setVariable(le.verticalSpacing,Ce.verticalSpacing)}; | ||
${e.setVariable(le.horizontalSpacing,Ce.horizontalSpacing)}; | ||
${e.setVariable(le.fontSize,Ie.fontSize)}; | ||
${e.setVariable(le.raisedFontSize,Ie.labelSize)}; | ||
${e.setVariable(le.verticalSpacing,Ie.verticalSpacing)}; | ||
${e.setVariable(le.horizontalSpacing,Ie.horizontalSpacing)}; | ||
} | ||
@@ -446,3 +446,3 @@ | ||
display: flex; | ||
height: calc(4 * ${Ce.verticalSpacing} + ${Ce.labelSize} + ${Ce.fontSize}); | ||
height: calc(4 * ${Ie.verticalSpacing} + ${Ie.labelSize} + ${Ie.fontSize}); | ||
} | ||
@@ -456,6 +456,6 @@ | ||
overflow: hidden; | ||
padding: 0 ${Ce.horizontalSpacing}; | ||
padding: 0 ${Ie.horizontalSpacing}; | ||
${e.setVariable(mt.fontSize,Ce.fontSize)}; | ||
${e.setVariable(mt.lineHeight,Ce.fontSize)}; | ||
${e.setVariable(mt.fontSize,Ie.fontSize)}; | ||
${e.setVariable(mt.lineHeight,Ie.fontSize)}; | ||
} | ||
@@ -470,7 +470,7 @@ | ||
align-items: flex-end; | ||
padding: 0 ${Ce.horizontalSpacing} ${Ce.verticalSpacing} ${Ce.horizontalSpacing}; | ||
padding: 0 ${Ie.horizontalSpacing} ${Ie.verticalSpacing} ${Ie.horizontalSpacing}; | ||
} | ||
.ft-text-field--prefix { | ||
color: ${Ce.prefixColor}; | ||
color: ${Ie.prefixColor}; | ||
margin-right: 2px; | ||
@@ -494,4 +494,4 @@ flex-shrink: 1; | ||
color: ${Ce.colorOnSurface}; | ||
padding: calc(2 * ${Ce.verticalSpacing}) 0; | ||
color: ${Ie.colorOnSurface}; | ||
padding: calc(2 * ${Ie.verticalSpacing}) 0; | ||
border: none; | ||
@@ -503,3 +503,3 @@ background: none; | ||
padding-bottom: 0; | ||
padding-top: calc(${Ce.labelSize} + 2 * ${Ce.verticalSpacing}); | ||
padding-top: calc(${Ie.labelSize} + 2 * ${Ie.verticalSpacing}); | ||
} | ||
@@ -513,21 +513,21 @@ | ||
.ft-text-field--disabled .ft-text-field--input { | ||
color: ${Ce.colorOnSurfaceDisabled}; | ||
color: ${Ie.colorOnSurfaceDisabled}; | ||
} | ||
.ft-text-field:not(.ft-text-field--disabled):focus-within ft-input-label { | ||
${e.setVariable(le.borderColor,Ce.colorPrimary)}; | ||
${e.setVariable(le.textColor,Ce.colorPrimary)}; | ||
${e.setVariable(le.borderColor,Ie.colorPrimary)}; | ||
${e.setVariable(le.textColor,Ie.colorPrimary)}; | ||
} | ||
.ft-text-field--filled .ft-text-field--input-panel { | ||
border-radius: ${Ce.borderRadiusS} ${Ce.borderRadiusS} 0 0; | ||
border-radius: ${Ie.borderRadiusS} ${Ie.borderRadiusS} 0 0; | ||
} | ||
.ft-text-field--outlined .ft-text-field--input-panel { | ||
border-radius: ${Ce.borderRadiusS}; | ||
border-radius: ${Ie.borderRadiusS}; | ||
} | ||
.ft-text-field--helper-text { | ||
padding: 0 12px 0 ${Ce.horizontalSpacing}; | ||
color: ${Ce.helperColor}; | ||
padding: 0 12px 0 ${Ie.horizontalSpacing}; | ||
color: ${Ie.helperColor}; | ||
} | ||
@@ -538,3 +538,3 @@ | ||
.ft-text-field--in-error .ft-text-field--prefix { | ||
color: ${Ce.colorError}; | ||
color: ${Ie.colorError}; | ||
} | ||
@@ -545,3 +545,3 @@ | ||
margin-left: 8px; | ||
color: ${Ce.iconColor}; | ||
color: ${Ie.iconColor}; | ||
} | ||
@@ -559,9 +559,9 @@ | ||
right: 0; | ||
z-index: ${Ce.floatingZIndex}; | ||
background: ${Ce.colorSurface}; | ||
border: 1px solid ${Ce.colorOutline}; | ||
border-radius: 0 0 ${Ce.borderRadiusS} ${Ce.borderRadiusS}; | ||
box-shadow: ${Ce.elevation02}; | ||
z-index: ${Ie.floatingZIndex}; | ||
background: ${Ie.colorSurface}; | ||
border: 1px solid ${Ie.colorOutline}; | ||
border-radius: 0 0 ${Ie.borderRadiusS} ${Ie.borderRadiusS}; | ||
box-shadow: ${Ie.elevation02}; | ||
outline: none; | ||
max-height: ${Ce.suggestSize}; | ||
max-height: ${Ie.suggestSize}; | ||
overflow-y: auto; | ||
@@ -585,6 +585,7 @@ } | ||
} | ||
`;var De=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class Be extends e.FtLitElement{constructor(){super(...arguments),this.value="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.filterSuggestions=!1,this.focused=!1,this.suggestionsOnTop=!1,this.hideSuggestions=!1,this.visibleSuggestions=[]}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":this.error,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":0===this.visibleSuggestions.length||this.hideSuggestions,"ft-text-field--raised-label":this.focused||""!=this.value,"ft-text-field--with-icon":!!this.icon};return i.html` | ||
`;var De=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class Be extends e.FtLitElement{constructor(){super(...arguments),this.value="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.filterSuggestions=!1,this.focused=!1,this.lastFiredValue="",this.suggestionsOnTop=!1,this.hideSuggestions=!1,this.visibleSuggestions=[]}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":this.error,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":0===this.visibleSuggestions.length||this.hideSuggestions,"ft-text-field--raised-label":this.focused||""!=this.value,"ft-text-field--with-icon":!!this.icon};return i.html` | ||
<div class="${s.classMap(t)}"> | ||
<div class="ft-text-field--main-panel" | ||
@keydown=${this.handleKeyboardNavigation}> | ||
@keydown=${this.handleKeyboardNavigation} | ||
@focusout=${this.onMainPanelBlur}> | ||
<ft-input-label text="${this.label}" | ||
@@ -611,6 +612,4 @@ ?disabled=${this.disabled} | ||
@click=${this.handleClick} | ||
@change=${this.updateValueFromInputField} | ||
@keyup=${this.handleInput} | ||
@focus=${this.onFocus} | ||
@blur=${this.onInputBlur}/> | ||
@focus=${this.onFocus}/> | ||
${this.icon?i.html` | ||
@@ -634,3 +633,3 @@ <ft-icon class="ft-text-field--icon" | ||
</div> | ||
`}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(){var t;const e=(null===(t=this.input)||void 0===t?void 0:t.value)||"";this.value!==e&&(this.hideSuggestions=!1,this.value=e,this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})))}handleClick(){this.hideSuggestions=!1}setValue(t,e){this.value=t,e&&this.dispatchEvent(new CustomEvent("change",{detail: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}onInputBlur(){this.focused=!1}}Be.elementDefinitions={"ft-input-label":ae,"ft-ripple":$e,"ft-typography":se,"ft-icon":Ie},Be.styles=[Xt,Ae],De([o.property()],Be.prototype,"label",void 0),De([o.property()],Be.prototype,"value",void 0),De([o.property()],Be.prototype,"helper",void 0),De([o.property({type:Boolean})],Be.prototype,"outlined",void 0),De([o.property({type:Boolean})],Be.prototype,"disabled",void 0),De([o.property({type:Boolean})],Be.prototype,"error",void 0),De([o.property()],Be.prototype,"prefix",void 0),De([o.property()],Be.prototype,"icon",void 0),De([o.property()],Be.prototype,"iconVariant",void 0),De([o.property({type:Boolean})],Be.prototype,"filterSuggestions",void 0),De([o.property({type:Number})],Be.prototype,"maxLength",void 0),De([o.state()],Be.prototype,"focused",void 0),De([o.state()],Be.prototype,"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--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` | ||
`}updated(t){super.updated(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded()}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),o=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&o&&(this.suggestionsOnTop=t.bottom+o.height>window.innerHeight&&t.top-o.height>0)}}updateValueFromInputField(){var t;this.setValue((null===(t=this.input)||void 0===t?void 0:t.value)||"",!0)}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.value!==i&&(this.hideSuggestions=!1,this.value=i,this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))),"Escape"!=t.key&&"Enter"!=t.key||this.updateValueFromInputField()}handleClick(){this.hideSuggestions=!1}setValue(t,e){e&&this.value!==t&&this.dispatchEvent(new CustomEvent("live-change",{detail:t})),this.value=t,e&&this.lastFiredValue!==this.value&&this.dispatchEvent(new CustomEvent("change",{detail:this.value})),this.lastFiredValue=this.value}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.updateValueFromInputField())}}Be.elementDefinitions={"ft-input-label":ae,"ft-ripple":$e,"ft-typography":se,"ft-icon":Ce},Be.styles=[Xt,Ae],De([o.property()],Be.prototype,"label",void 0),De([o.property()],Be.prototype,"value",void 0),De([o.property()],Be.prototype,"helper",void 0),De([o.property({type:Boolean})],Be.prototype,"outlined",void 0),De([o.property({type:Boolean})],Be.prototype,"disabled",void 0),De([o.property({type:Boolean})],Be.prototype,"error",void 0),De([o.property()],Be.prototype,"prefix",void 0),De([o.property()],Be.prototype,"icon",void 0),De([o.property()],Be.prototype,"iconVariant",void 0),De([o.property({type:Boolean})],Be.prototype,"filterSuggestions",void 0),De([o.property({type:Number})],Be.prototype,"maxLength",void 0),De([o.state()],Be.prototype,"focused",void 0),De([o.state()],Be.prototype,"lastFiredValue",void 0),De([o.state()],Be.prototype,"suggestionsOnTop",void 0),De([o.state()],Be.prototype,"hideSuggestions",void 0),De([o.state()],Be.prototype,"visibleSuggestions",void 0),De([o.query(".ft-text-field--main-panel")],Be.prototype,"mainPanel",void 0),De([o.query(".ft-text-field--input")],Be.prototype,"input",void 0),De([o.query(".ft-text-field--suggestions")],Be.prototype,"suggestionsContainer",void 0),De([o.queryAssignedElements({selector:"ft-text-field-suggestion"})],Be.prototype,"suggestions",void 0);const _e=i.css` | ||
.ft-text-field-suggestion { | ||
@@ -660,3 +659,3 @@ position: relative; | ||
} | ||
`;var Ze=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 Ue extends CustomEvent{constructor(t){super("suggestion-selected",{detail:t,bubbles:!0,composed:!0})}}class Me extends e.FtLitElement{render(){return i.html` | ||
`;var Ze=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 Me extends CustomEvent{constructor(t){super("suggestion-selected",{detail:t,bubbles:!0,composed:!0})}}class Ue extends e.FtLitElement{render(){return i.html` | ||
<div class="ft-text-field-suggestion" | ||
@@ -673,2 +672,2 @@ tabindex="-1" | ||
</div> | ||
`}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 Ue(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())}}Me.elementDefinitions={"ft-ripple":$e,"ft-typography":se,"ft-icon":Ie},Me.styles=_e,Ze([o.property()],Me.prototype,"value",void 0),Ze([o.query(".ft-text-field-suggestion")],Me.prototype,"container",void 0),Ze([o.queryAssignedNodes()],Me.prototype,"assignedNodes",void 0),e.customElement("ft-text-field")(Be),e.customElement("ft-text-field-suggestion")(Me),t.FtTextField=Be,t.FtTextFieldCssVariables=Ce,t.FtTextFieldSuggestion=Me,t.SuggestionSelectedEvent=Ue,t.styles=Ae,t.suggestionStyles=_e,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML); | ||
`}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); |
{ | ||
"name": "@fluid-topics/ft-text-field", | ||
"version": "0.3.65", | ||
"version": "0.3.66", | ||
"description": "A fluidtopics text field", | ||
@@ -22,10 +22,10 @@ "keywords": [ | ||
"dependencies": { | ||
"@fluid-topics/ft-icon": "0.3.65", | ||
"@fluid-topics/ft-input-label": "0.3.65", | ||
"@fluid-topics/ft-ripple": "0.3.65", | ||
"@fluid-topics/ft-typography": "0.3.65", | ||
"@fluid-topics/ft-wc-utils": "0.3.65", | ||
"@fluid-topics/ft-icon": "0.3.66", | ||
"@fluid-topics/ft-input-label": "0.3.66", | ||
"@fluid-topics/ft-ripple": "0.3.66", | ||
"@fluid-topics/ft-typography": "0.3.66", | ||
"@fluid-topics/ft-wc-utils": "0.3.66", | ||
"lit": "2.2.8" | ||
}, | ||
"gitHead": "e19de923a28e68d55617219545fb7398511e8a77" | ||
"gitHead": "cc454945c8f6b47494dc634da0613dabeed53c14" | ||
} |
Sorry, the diff of this file is too big to display
177597
2281
+ Added@fluid-topics/ft-icon@0.3.66(transitive)
+ Added@fluid-topics/ft-input-label@0.3.66(transitive)
+ Added@fluid-topics/ft-ripple@0.3.66(transitive)
+ Added@fluid-topics/ft-typography@0.3.66(transitive)
+ Added@fluid-topics/ft-wc-utils@0.3.66(transitive)
- Removed@fluid-topics/ft-icon@0.3.65(transitive)
- Removed@fluid-topics/ft-input-label@0.3.65(transitive)
- Removed@fluid-topics/ft-ripple@0.3.65(transitive)
- Removed@fluid-topics/ft-typography@0.3.65(transitive)
- Removed@fluid-topics/ft-wc-utils@0.3.65(transitive)
Updated@fluid-topics/ft-icon@0.3.66