@fluid-topics/ft-search-bar 0.2.10 → 0.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-search-bar.css.js +1 -1
- package/build/ft-search-bar.d.ts +6 -0
- package/build/ft-search-bar.inline-styles.js +52 -51
- package/build/ft-search-bar.js +47 -26
- package/build/ft-search-bar.light.js +40 -39
- package/build/ft-search-bar.min.js +20 -19
- package/package.json +14 -14
package/build/ft-search-bar.d.ts
CHANGED
|
@@ -24,8 +24,11 @@ export interface FtSearchBarLabels extends ParametrizedLabels {
|
|
|
24
24
|
back?: string;
|
|
25
25
|
}
|
|
26
26
|
export declare const DEFAULT_LABELS: FtSearchBarLabels;
|
|
27
|
+
export declare type DisplayMode = "auto" | "mobile" | "desktop";
|
|
27
28
|
export interface FtSearchBarProperties {
|
|
28
29
|
labels?: FtSearchBarLabels;
|
|
30
|
+
mode?: DisplayMode;
|
|
31
|
+
forceMobileMenuOpen?: boolean;
|
|
29
32
|
baseUrl: string;
|
|
30
33
|
apiIntegrationIdentifier?: string;
|
|
31
34
|
contentLocale?: string;
|
|
@@ -47,6 +50,8 @@ export declare class FtSearchBar extends FtLitElement implements FtSearchBarProp
|
|
|
47
50
|
static elementDefinitions: ElementDefinitionsMap;
|
|
48
51
|
static styles: import("lit").CSSResult[];
|
|
49
52
|
dense: boolean;
|
|
53
|
+
mode?: DisplayMode;
|
|
54
|
+
forceMobileMenuOpen: boolean;
|
|
50
55
|
baseUrl: string;
|
|
51
56
|
apiIntegrationIdentifier: string;
|
|
52
57
|
contentLocale?: string;
|
|
@@ -64,6 +69,7 @@ export declare class FtSearchBar extends FtLitElement implements FtSearchBarProp
|
|
|
64
69
|
private sizeCategory;
|
|
65
70
|
private displayFacets;
|
|
66
71
|
private mobileMenuOpen;
|
|
72
|
+
private get isMobileMenuOpen();
|
|
67
73
|
private facets;
|
|
68
74
|
private facetsInitialized;
|
|
69
75
|
private knownFacetLabels;
|
|
@@ -66,7 +66,7 @@ var r;const l=null!=(null===(r=window.HTMLSlotElement)||void 0===r?void 0:r.prot
|
|
|
66
66
|
* Copyright 2017 Google LLC
|
|
67
67
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
68
68
|
*/
|
|
69
|
-
var z;C.finalized=!0,C.elementProperties=new Map,C.elementStyles=[],C.shadowRootOptions={mode:"open"},null==w||w({ReactiveElement:C}),(null!==(y=globalThis.reactiveElementVersions)&&void 0!==y?y:globalThis.reactiveElementVersions=[]).push("1.3.2");const E=globalThis.trustedTypes,B=E?E.createPolicy("lit-html",{createHTML:t=>t}):void 0,
|
|
69
|
+
var z;C.finalized=!0,C.elementProperties=new Map,C.elementStyles=[],C.shadowRootOptions={mode:"open"},null==w||w({ReactiveElement:C}),(null!==(y=globalThis.reactiveElementVersions)&&void 0!==y?y:globalThis.reactiveElementVersions=[]).push("1.3.2");const E=globalThis.trustedTypes,B=E?E.createPolicy("lit-html",{createHTML:t=>t}):void 0,M=`lit$${(Math.random()+"").slice(9)}$`,N="?"+M,R=`<${N}>`,F=document,L=(t="")=>F.createComment(t),D=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,j=t=>{var e;return I(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,P=/-->/g,T=/>/g,A=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,_=/'/g,H=/"/g,Z=/^(?:script|style|textarea|title)$/i,K=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),W=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),q=new WeakMap,J=F.createTreeWalker(F,129,null,!1),X=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=U;for(let e=0;e<i;e++){const i=t[e];let l,a,c=-1,h=0;for(;h<i.length&&(r.lastIndex=h,a=r.exec(i),null!==a);)h=r.lastIndex,r===U?"!--"===a[1]?r=P:void 0!==a[1]?r=T:void 0!==a[2]?(Z.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=A):void 0!==a[3]&&(r=A):r===A?">"===a[0]?(r=null!=s?s:U,c=-1):void 0===a[1]?c=-2:(c=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?A:'"'===a[3]?H:_):r===H||r===_?r=A:r===P||r===T?r=U:(r=A,s=void 0);const p=r===A&&t[e+1].startsWith("/>")?" ":"";n+=r===U?i+R:c>=0?(o.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+M+p):i+M+(-2===c?(o.push(void 0),e):p)}const l=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==B?B.createHTML(l):l,o]};class Y{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,c]=X(t,e);if(this.el=Y.createElement(a,i),J.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=J.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(M)){const i=c[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(M),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?it:"?"===e[1]?st:"@"===e[1]?nt:et})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(Z.test(o.tagName)){const t=o.textContent.split(M),e=t.length-1;if(e>0){o.textContent=E?E.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],L()),J.nextNode(),l.push({type:2,index:++s});o.append(t[e],L())}}}else if(8===o.nodeType)if(o.data===N)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(M,t+1));)l.push({type:7,index:s}),t+=M.length-1}s++}}static createElement(t,e){const i=F.createElement("template");return i.innerHTML=t,i}}function Q(t,e,i=t,o){var s,n,r,l;if(e===W)return e;let a=void 0!==o?null===(s=i._$Cl)||void 0===s?void 0:s[o]:i._$Cu;const c=D(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==c&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===c?a=void 0:(a=new c(t),a._$AT(t,i,o)),void 0!==o?(null!==(r=(l=i)._$Cl)&&void 0!==r?r:l._$Cl=[])[o]=a:i._$Cu=a),void 0!==a&&(e=Q(t,a._$AS(t,e.values),a,o)),e}class G{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:F).importNode(i,!0);J.currentNode=s;let n=J.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new tt(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new rt(n,this,t)),this.v.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=J.nextNode(),r++)}return s}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class tt{constructor(t,e,i,o){var s;this.type=2,this._$AH=V,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cg=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._$Cg}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=Q(this,t,e),D(t)?t===V||null==t||""===t?(this._$AH!==V&&this._$AR(),this._$AH=V):t!==this._$AH&&t!==W&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):j(t)?this.S(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==V&&D(this._$AH)?this._$AA.nextSibling.data=t:this.k(F.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Y.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.m(i);else{const t=new G(s,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=q.get(t.strings);return void 0===e&&q.set(t.strings,e=new Y(t)),e}S(t){I(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 tt(this.M(L()),this.M(L()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class et{constructor(t,e,i,o,s){this.type=1,this._$AH=V,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=V}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let n=!1;if(void 0===s)t=Q(this,t,e,0),n=!D(t)||t!==this._$AH&&t!==W,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=Q(this,o[i+r],e,r),l===W&&(l=this._$AH[r]),n||(n=!D(l)||l!==this._$AH[r]),l===V?t=V:t!==V&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.C(t)}C(t){t===V?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class it extends et{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===V?void 0:t}}const ot=E?E.emptyScript:"";class st extends et{constructor(){super(...arguments),this.type=4}C(t){t&&t!==V?this.element.setAttribute(this.name,ot):this.element.removeAttribute(this.name)}}class nt extends et{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=Q(this,t,e,0))&&void 0!==i?i:V)===W)return;const o=this._$AH,s=t===V&&o!==V||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==V&&(o===V||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class rt{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){Q(this,t)}}const lt={L:"$lit$",P:M,V:N,I:1,N:X,R:G,j,D:Q,H:tt,F:et,O:st,W:nt,B:it,Z:rt},at=window.litHtmlPolyfillSupport;
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
|
72
72
|
* Copyright 2017 Google LLC
|
|
@@ -101,7 +101,7 @@ var ct,ht;null==at||at(Y,tt),(null!==(z=globalThis.litHtmlVersions)&&void 0!==z?
|
|
|
101
101
|
* @license
|
|
102
102
|
* Copyright 2020 Google LLC
|
|
103
103
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
104
|
-
*/const{H:zt}=lt,Et=()=>document.createComment(""),Bt=(t,e,i)=>{var o;const s=t._$AA.parentNode,n=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Et(),n),o=s.insertBefore(Et(),n);i=new zt(e,o,t,t.options)}else{const e=i._$AB.nextSibling,r=i._$AM,l=r!==t;if(l){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==r._$AU&&i._$AP(e)}if(e!==n||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,n),t=e}}}return i},
|
|
104
|
+
*/const{H:zt}=lt,Et=()=>document.createComment(""),Bt=(t,e,i)=>{var o;const s=t._$AA.parentNode,n=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Et(),n),o=s.insertBefore(Et(),n);i=new zt(e,o,t,t.options)}else{const e=i._$AB.nextSibling,r=i._$AM,l=r!==t;if(l){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==r._$AU&&i._$AP(e)}if(e!==n||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,n),t=e}}}return i},Mt=(t,e,i=t)=>(t._$AI(e,i),t),Nt={},Rt=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const o=t._$AB.nextSibling;for(;i!==o;){const t=i.nextSibling;i.remove(),i=t}},Ft=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},Lt=Ot(class extends Ct{constructor(t){if(super(t),t.type!==St)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const s=[],n=[];let r=0;for(const e of t)s[r]=o?o(e,r):r,n[r]=i(e,r),r++;return{values:n,keys:s}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,o]){var s;const n=(t=>t._$AH)(t),{values:r,keys:l}=this.dt(e,i,o);if(!Array.isArray(n))return this.ut=l,r;const a=null!==(s=this.ut)&&void 0!==s?s:this.ut=[],c=[];let h,p,d=0,f=n.length-1,u=0,b=r.length-1;for(;d<=f&&u<=b;)if(null===n[d])d++;else if(null===n[f])f--;else if(a[d]===l[u])c[u]=Mt(n[d],r[u]),d++,u++;else if(a[f]===l[b])c[b]=Mt(n[f],r[b]),f--,b--;else if(a[d]===l[b])c[b]=Mt(n[d],r[b]),Bt(t,c[b+1],n[d]),d++,b--;else if(a[f]===l[u])c[u]=Mt(n[f],r[u]),Bt(t,n[d],n[f]),f--,u++;else if(void 0===h&&(h=Ft(l,u,b),p=Ft(a,d,f)),h.has(a[d]))if(h.has(a[f])){const e=p.get(l[u]),i=void 0!==e?n[e]:null;if(null===i){const e=Bt(t,n[d]);Mt(e,r[u]),c[u]=e}else c[u]=Mt(i,r[u]),Bt(t,n[d],i),n[e]=null;u++}else Rt(n[f]),f--;else Rt(n[d]),d++;for(;u<=b;){const e=Bt(t,c[b+1]);Mt(e,r[u]),c[u++]=e}for(;d<=f;){const t=n[d++];null!==t&&Rt(t)}return this.ut=l,((t,e=Nt)=>{t._$AH=e})(t,c),W}}),Dt=Ot(class extends Ct{constructor(t){var e;if(super(t),t.type!==kt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.et){this.et=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.et.add(t);return this.render(e)}const s=t.element.classList;this.et.forEach((t=>{t in e||(s.remove(t),this.et.delete(t))}));for(const t in e){const i=!!e[t];i===this.et.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(s.add(t),this.et.add(t)):(s.remove(t),this.et.delete(t)))}return W}});
|
|
105
105
|
/**
|
|
106
106
|
* @license
|
|
107
107
|
* Copyright 2017 Google LLC
|
|
@@ -135,7 +135,7 @@ var ct,ht;null==at||at(Y,tt),(null!==(z=globalThis.litHtmlVersions)&&void 0!==z?
|
|
|
135
135
|
* Copyright 2020 Google LLC
|
|
136
136
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
137
137
|
*/
|
|
138
|
-
const Tt=Symbol.for(""),At=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===Tt)return null===(i=t)||void 0===i?void 0:i._$litStatic$},_t=t=>({_$litStatic$:t,r:Tt}),Ht=new Map,Zt=(t=>(e,...i)=>{const o=i.length;let s,n;const r=[],l=[];let a,c=0,h=!1;for(;c<o;){for(a=e[c];c<o&&void 0!==(n=i[c],s=At(n));)a+=s+e[++c],h=!0;l.push(n),r.push(a),c++}if(c===o&&r.push(e[o]),h){const t=r.join("$$lit$$");void 0===(e=Ht.get(t))&&(r.raw=r,Ht.set(t,e=r)),i=l}return t(e,...i)})(K);var Kt,Wt=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};!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"}(Kt||(Kt={}));const Vt=ft.extend("--ft-typography-font-family",bt.titleFont),qt=ft.extend("--ft-typography-font-family",bt.contentFont),Jt={fontFamily:qt,fontSize:ft.create("--ft-typography-font-size","SIZE","16px"),fontWeight:ft.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:ft.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:ft.create("--ft-typography-line-height","SIZE","24px"),textTransform:ft.create("--ft-typography-text-transform","UNKNOWN","inherit")},Xt=ft.extend("--ft-typography-title-font-family",Vt),Yt=ft.extend("--ft-typography-title-font-size",Jt.fontSize,"20px"),Qt=ft.extend("--ft-typography-title-font-weight",Jt.fontWeight,"normal"),Gt=ft.extend("--ft-typography-title-letter-spacing",Jt.letterSpacing,"0.15px"),te=ft.extend("--ft-typography-title-line-height",Jt.lineHeight,"24px"),ee=ft.extend("--ft-typography-title-text-transform",Jt.textTransform,"inherit"),ie=ft.extend("--ft-typography-title-dense-font-family",Vt),oe=ft.extend("--ft-typography-title-dense-font-size",Jt.fontSize,"14px"),se=ft.extend("--ft-typography-title-dense-font-weight",Jt.fontWeight,"normal"),ne=ft.extend("--ft-typography-title-dense-letter-spacing",Jt.letterSpacing,"0.105px"),re=ft.extend("--ft-typography-title-dense-line-height",Jt.lineHeight,"24px"),le=ft.extend("--ft-typography-title-dense-text-transform",Jt.textTransform,"inherit"),ae=ft.extend("--ft-typography-subtitle1-font-family",qt),ce=ft.extend("--ft-typography-subtitle1-font-size",Jt.fontSize,"16px"),he=ft.extend("--ft-typography-subtitle1-font-weight",Jt.fontWeight,"600"),pe=ft.extend("--ft-typography-subtitle1-letter-spacing",Jt.letterSpacing,"0.144px"),de=ft.extend("--ft-typography-subtitle1-line-height",Jt.lineHeight,"24px"),fe=ft.extend("--ft-typography-subtitle1-text-transform",Jt.textTransform,"inherit"),ue=ft.extend("--ft-typography-subtitle2-font-family",qt),be=ft.extend("--ft-typography-subtitle2-font-size",Jt.fontSize,"14px"),ve=ft.extend("--ft-typography-subtitle2-font-weight",Jt.fontWeight,"normal"),ge=ft.extend("--ft-typography-subtitle2-letter-spacing",Jt.letterSpacing,"0.098px"),xe=ft.extend("--ft-typography-subtitle2-line-height",Jt.lineHeight,"24px"),ye=ft.extend("--ft-typography-subtitle2-text-transform",Jt.textTransform,"inherit"),me={fontFamily:ft.extend("--ft-typography-body1-font-family",qt),fontSize:ft.extend("--ft-typography-body1-font-size",Jt.fontSize,"16px"),fontWeight:ft.extend("--ft-typography-body1-font-weight",Jt.fontWeight,"normal"),letterSpacing:ft.extend("--ft-typography-body1-letter-spacing",Jt.letterSpacing,"0.496px"),lineHeight:ft.extend("--ft-typography-body1-line-height",Jt.lineHeight,"24px"),textTransform:ft.extend("--ft-typography-body1-text-transform",Jt.textTransform,"inherit")},$e={fontFamily:ft.extend("--ft-typography-body2-font-family",qt),fontSize:ft.extend("--ft-typography-body2-font-size",Jt.fontSize,"14px"),fontWeight:ft.extend("--ft-typography-body2-font-weight",Jt.fontWeight,"normal"),letterSpacing:ft.extend("--ft-typography-body2-letter-spacing",Jt.letterSpacing,"0.252px"),lineHeight:ft.extend("--ft-typography-body2-line-height",Jt.lineHeight,"20px"),textTransform:ft.extend("--ft-typography-body2-text-transform",Jt.textTransform,"inherit")},we={fontFamily:ft.extend("--ft-typography-caption-font-family",qt),fontSize:ft.extend("--ft-typography-caption-font-size",Jt.fontSize,"12px"),fontWeight:ft.extend("--ft-typography-caption-font-weight",Jt.fontWeight,"normal"),letterSpacing:ft.extend("--ft-typography-caption-letter-spacing",Jt.letterSpacing,"0.396px"),lineHeight:ft.extend("--ft-typography-caption-line-height",Jt.lineHeight,"16px"),textTransform:ft.extend("--ft-typography-caption-text-transform",Jt.textTransform,"inherit")},ke=ft.extend("--ft-typography-breadcrumb-font-family",qt),Se=ft.extend("--ft-typography-breadcrumb-font-size",Jt.fontSize,"10px"),Oe=ft.extend("--ft-typography-breadcrumb-font-weight",Jt.fontWeight,"normal"),Ce=ft.extend("--ft-typography-breadcrumb-letter-spacing",Jt.letterSpacing,"0.33px"),ze=ft.extend("--ft-typography-breadcrumb-line-height",Jt.lineHeight,"16px"),Ee=ft.extend("--ft-typography-breadcrumb-text-transform",Jt.textTransform,"inherit"),Be=ft.extend("--ft-typography-overline-font-family",qt),
|
|
138
|
+
const Tt=Symbol.for(""),At=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===Tt)return null===(i=t)||void 0===i?void 0:i._$litStatic$},_t=t=>({_$litStatic$:t,r:Tt}),Ht=new Map,Zt=(t=>(e,...i)=>{const o=i.length;let s,n;const r=[],l=[];let a,c=0,h=!1;for(;c<o;){for(a=e[c];c<o&&void 0!==(n=i[c],s=At(n));)a+=s+e[++c],h=!0;l.push(n),r.push(a),c++}if(c===o&&r.push(e[o]),h){const t=r.join("$$lit$$");void 0===(e=Ht.get(t))&&(r.raw=r,Ht.set(t,e=r)),i=l}return t(e,...i)})(K);var Kt,Wt=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};!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"}(Kt||(Kt={}));const Vt=ft.extend("--ft-typography-font-family",bt.titleFont),qt=ft.extend("--ft-typography-font-family",bt.contentFont),Jt={fontFamily:qt,fontSize:ft.create("--ft-typography-font-size","SIZE","16px"),fontWeight:ft.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:ft.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:ft.create("--ft-typography-line-height","SIZE","24px"),textTransform:ft.create("--ft-typography-text-transform","UNKNOWN","inherit")},Xt=ft.extend("--ft-typography-title-font-family",Vt),Yt=ft.extend("--ft-typography-title-font-size",Jt.fontSize,"20px"),Qt=ft.extend("--ft-typography-title-font-weight",Jt.fontWeight,"normal"),Gt=ft.extend("--ft-typography-title-letter-spacing",Jt.letterSpacing,"0.15px"),te=ft.extend("--ft-typography-title-line-height",Jt.lineHeight,"24px"),ee=ft.extend("--ft-typography-title-text-transform",Jt.textTransform,"inherit"),ie=ft.extend("--ft-typography-title-dense-font-family",Vt),oe=ft.extend("--ft-typography-title-dense-font-size",Jt.fontSize,"14px"),se=ft.extend("--ft-typography-title-dense-font-weight",Jt.fontWeight,"normal"),ne=ft.extend("--ft-typography-title-dense-letter-spacing",Jt.letterSpacing,"0.105px"),re=ft.extend("--ft-typography-title-dense-line-height",Jt.lineHeight,"24px"),le=ft.extend("--ft-typography-title-dense-text-transform",Jt.textTransform,"inherit"),ae=ft.extend("--ft-typography-subtitle1-font-family",qt),ce=ft.extend("--ft-typography-subtitle1-font-size",Jt.fontSize,"16px"),he=ft.extend("--ft-typography-subtitle1-font-weight",Jt.fontWeight,"600"),pe=ft.extend("--ft-typography-subtitle1-letter-spacing",Jt.letterSpacing,"0.144px"),de=ft.extend("--ft-typography-subtitle1-line-height",Jt.lineHeight,"24px"),fe=ft.extend("--ft-typography-subtitle1-text-transform",Jt.textTransform,"inherit"),ue=ft.extend("--ft-typography-subtitle2-font-family",qt),be=ft.extend("--ft-typography-subtitle2-font-size",Jt.fontSize,"14px"),ve=ft.extend("--ft-typography-subtitle2-font-weight",Jt.fontWeight,"normal"),ge=ft.extend("--ft-typography-subtitle2-letter-spacing",Jt.letterSpacing,"0.098px"),xe=ft.extend("--ft-typography-subtitle2-line-height",Jt.lineHeight,"24px"),ye=ft.extend("--ft-typography-subtitle2-text-transform",Jt.textTransform,"inherit"),me={fontFamily:ft.extend("--ft-typography-body1-font-family",qt),fontSize:ft.extend("--ft-typography-body1-font-size",Jt.fontSize,"16px"),fontWeight:ft.extend("--ft-typography-body1-font-weight",Jt.fontWeight,"normal"),letterSpacing:ft.extend("--ft-typography-body1-letter-spacing",Jt.letterSpacing,"0.496px"),lineHeight:ft.extend("--ft-typography-body1-line-height",Jt.lineHeight,"24px"),textTransform:ft.extend("--ft-typography-body1-text-transform",Jt.textTransform,"inherit")},$e={fontFamily:ft.extend("--ft-typography-body2-font-family",qt),fontSize:ft.extend("--ft-typography-body2-font-size",Jt.fontSize,"14px"),fontWeight:ft.extend("--ft-typography-body2-font-weight",Jt.fontWeight,"normal"),letterSpacing:ft.extend("--ft-typography-body2-letter-spacing",Jt.letterSpacing,"0.252px"),lineHeight:ft.extend("--ft-typography-body2-line-height",Jt.lineHeight,"20px"),textTransform:ft.extend("--ft-typography-body2-text-transform",Jt.textTransform,"inherit")},we={fontFamily:ft.extend("--ft-typography-caption-font-family",qt),fontSize:ft.extend("--ft-typography-caption-font-size",Jt.fontSize,"12px"),fontWeight:ft.extend("--ft-typography-caption-font-weight",Jt.fontWeight,"normal"),letterSpacing:ft.extend("--ft-typography-caption-letter-spacing",Jt.letterSpacing,"0.396px"),lineHeight:ft.extend("--ft-typography-caption-line-height",Jt.lineHeight,"16px"),textTransform:ft.extend("--ft-typography-caption-text-transform",Jt.textTransform,"inherit")},ke=ft.extend("--ft-typography-breadcrumb-font-family",qt),Se=ft.extend("--ft-typography-breadcrumb-font-size",Jt.fontSize,"10px"),Oe=ft.extend("--ft-typography-breadcrumb-font-weight",Jt.fontWeight,"normal"),Ce=ft.extend("--ft-typography-breadcrumb-letter-spacing",Jt.letterSpacing,"0.33px"),ze=ft.extend("--ft-typography-breadcrumb-line-height",Jt.lineHeight,"16px"),Ee=ft.extend("--ft-typography-breadcrumb-text-transform",Jt.textTransform,"inherit"),Be=ft.extend("--ft-typography-overline-font-family",qt),Me=ft.extend("--ft-typography-overline-font-size",Jt.fontSize,"10px"),Ne=ft.extend("--ft-typography-overline-font-weight",Jt.fontWeight,"normal"),Re=ft.extend("--ft-typography-overline-letter-spacing",Jt.letterSpacing,"1.5px"),Fe=ft.extend("--ft-typography-overline-line-height",Jt.lineHeight,"16px"),Le=ft.extend("--ft-typography-overline-text-transform",Jt.textTransform,"uppercase"),De={fontFamily:ft.extend("--ft-typography-button-font-family",qt),fontSize:ft.extend("--ft-typography-button-font-size",Jt.fontSize,"14px"),fontWeight:ft.extend("--ft-typography-button-font-weight",Jt.fontWeight,"600"),letterSpacing:ft.extend("--ft-typography-button-letter-spacing",Jt.letterSpacing,"1.246px"),lineHeight:ft.extend("--ft-typography-button-line-height",Jt.lineHeight,"16px"),textTransform:ft.extend("--ft-typography-button-text-transform",Jt.textTransform,"uppercase")},Ie=v`
|
|
139
139
|
.ft-typography--title {
|
|
140
140
|
font-family: ${Xt};
|
|
141
141
|
font-size: ${Yt};
|
|
@@ -211,9 +211,9 @@ const Tt=Symbol.for(""),At=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)=
|
|
|
211
211
|
`,Ze=v`
|
|
212
212
|
.ft-typography--overline {
|
|
213
213
|
font-family: ${Be};
|
|
214
|
-
font-size: ${
|
|
215
|
-
font-weight: ${
|
|
216
|
-
letter-spacing: ${
|
|
214
|
+
font-size: ${Me};
|
|
215
|
+
font-weight: ${Ne};
|
|
216
|
+
letter-spacing: ${Re};
|
|
217
217
|
line-height: ${Fe};
|
|
218
218
|
text-transform: ${Le};
|
|
219
219
|
}
|
|
@@ -510,7 +510,7 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
510
510
|
.ft-icon--material {
|
|
511
511
|
font-family: ${Si.materialFontFamily}, "Material Icons", sans-serif;
|
|
512
512
|
}
|
|
513
|
-
`,ki([i()],Oi.prototype,"variant",void 0),ki([n("slot")],Oi.prototype,"slottedContent",void 0),c("ft-icon")(Oi);var Ci=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const zi=ft.extend("--ft-button-color",bt.colorPrimary),Ei={backgroundColor:ft.extend("--ft-button-background-color",bt.colorSurface),borderRadius:ft.extend("--ft-button-border-radius",bt.borderRadiusL),color:zi,fontSize:ft.extend("--ft-button-font-size",De.fontSize),iconSize:ft.create("--ft-button-icon-size","SIZE","24px"),rippleColor:ft.extend("--ft-button-ripple-color",zi),opacityDisabled:ft.external(bt.colorOpacityDisabled,"Design system")},Bi=ft.extend("--ft-button-primary-color",ft.extend("--ft-button-color",bt.colorOnPrimary)),
|
|
513
|
+
`,ki([i()],Oi.prototype,"variant",void 0),ki([n("slot")],Oi.prototype,"slottedContent",void 0),c("ft-icon")(Oi);var Ci=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const zi=ft.extend("--ft-button-color",bt.colorPrimary),Ei={backgroundColor:ft.extend("--ft-button-background-color",bt.colorSurface),borderRadius:ft.extend("--ft-button-border-radius",bt.borderRadiusL),color:zi,fontSize:ft.extend("--ft-button-font-size",De.fontSize),iconSize:ft.create("--ft-button-icon-size","SIZE","24px"),rippleColor:ft.extend("--ft-button-ripple-color",zi),opacityDisabled:ft.external(bt.colorOpacityDisabled,"Design system")},Bi=ft.extend("--ft-button-primary-color",ft.extend("--ft-button-color",bt.colorOnPrimary)),Mi={backgroundColor:ft.extend("--ft-button-primary-background-color",ft.extend("--ft-button-background-color",bt.colorPrimary)),color:Bi,rippleColor:ft.extend("--ft-button-primary-ripple-color",Bi)},Ni=ft.extend("--ft-button-dense-border-radius",ft.extend("--ft-button-border-radius",bt.borderRadiusM));class Ri extends vt{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}static get styles(){return[gt,v`
|
|
514
514
|
:host {
|
|
515
515
|
display: inline-block;
|
|
516
516
|
max-width: 100%;
|
|
@@ -521,6 +521,7 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
521
521
|
box-shadow: 0px 0px 0px transparent;
|
|
522
522
|
border: 0px solid transparent;
|
|
523
523
|
text-shadow: 0px 0px 0px transparent;
|
|
524
|
+
font-size: inherit;
|
|
524
525
|
}
|
|
525
526
|
|
|
526
527
|
button:hover {
|
|
@@ -572,7 +573,7 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
572
573
|
.ft-button--dense {
|
|
573
574
|
--ft-button-internal-vertical-padding: 2px;
|
|
574
575
|
--ft-button-internal-horizontal-padding: 4px;
|
|
575
|
-
border-radius: ${
|
|
576
|
+
border-radius: ${Ni};
|
|
576
577
|
}
|
|
577
578
|
|
|
578
579
|
.ft-button--round {
|
|
@@ -585,9 +586,9 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
585
586
|
}
|
|
586
587
|
|
|
587
588
|
.ft-button.ft-button--primary {
|
|
588
|
-
background-color: ${
|
|
589
|
-
--ft-button-internal-color: ${
|
|
590
|
-
${ut(Ge.color,
|
|
589
|
+
background-color: ${Mi.backgroundColor};
|
|
590
|
+
--ft-button-internal-color: ${Mi.color};
|
|
591
|
+
${ut(Ge.color,Mi.rippleColor)};
|
|
591
592
|
}
|
|
592
593
|
|
|
593
594
|
.ft-button.ft-button--outlined {
|
|
@@ -665,7 +666,7 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
665
666
|
</ft-tooltip>
|
|
666
667
|
`}resolveIcon(){return this.loading?K`
|
|
667
668
|
<ft-loader></ft-loader> `:this.icon?K`
|
|
668
|
-
<ft-icon variant="material">${this.icon}</ft-icon> `:V}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}
|
|
669
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:V}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Ri.elementDefinitions={"ft-ripple":ri,"ft-tooltip":fi,"ft-typography":We,"ft-icon":Oi,"ft-loader":bi},Ci([i({type:Boolean})],Ri.prototype,"primary",void 0),Ci([i({type:Boolean})],Ri.prototype,"outlined",void 0),Ci([i({type:Boolean})],Ri.prototype,"disabled",void 0),Ci([i({type:Boolean})],Ri.prototype,"dense",void 0),Ci([i({type:Boolean})],Ri.prototype,"round",void 0),Ci([i({type:String})],Ri.prototype,"label",void 0),Ci([i({type:String})],Ri.prototype,"icon",void 0),Ci([i({type:Boolean})],Ri.prototype,"trailingIcon",void 0),Ci([i({type:Boolean})],Ri.prototype,"loading",void 0),Ci([i({type:String})],Ri.prototype,"tooltipPosition",void 0),Ci([n(".ft-button")],Ri.prototype,"button",void 0),Ci([n(".ft-button--label slot")],Ri.prototype,"slottedContent",void 0),c("ft-button")(Ri);var Fi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Li=ft.extend("--ft-checkbox-text-color",bt.colorOnSurfaceHigh),Di=ft.external(bt.colorPrimary,"Design system"),Ii=ft.external(bt.colorOnPrimary,"Design system"),ji=ft.extend("--ft-checkbox-border-color",bt.colorOnSurfaceMedium),Ui=ft.external(bt.colorOnSurfaceDisabled,"Design system");class Pi extends vt{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return K`
|
|
669
670
|
<label class="${Dt(t)}">
|
|
670
671
|
<div class="ft-checkbox--box-container">
|
|
671
672
|
<input type="checkbox"
|
|
@@ -934,7 +935,7 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
934
935
|
|
|
935
936
|
${t.label}
|
|
936
937
|
</ft-radio>
|
|
937
|
-
`}onRadioKeyUp(t,e){e.selected&&" "===t.key&&this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}Yi.elementDefinitions={"ft-button":
|
|
938
|
+
`}onRadioKeyUp(t,e){e.selected&&" "===t.key&&this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}Yi.elementDefinitions={"ft-button":Ri,"ft-ripple":ri,"ft-typography":We,"ft-checkbox":Pi,"ft-icon":Oi,"ft-radio":Wi},Yi.styles=[v`
|
|
938
939
|
.ft-filter-level--container {
|
|
939
940
|
display: flex;
|
|
940
941
|
flex-direction: column;
|
|
@@ -1019,7 +1020,7 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1019
1020
|
@click=${this.next}
|
|
1020
1021
|
></ft-button>
|
|
1021
1022
|
</div>
|
|
1022
|
-
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new to(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,i;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(i=this.contentSlot)||void 0===i||i.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}}eo.elementDefinitions={"ft-button":
|
|
1023
|
+
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new to(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,i;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(i=this.contentSlot)||void 0===i||i.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}}eo.elementDefinitions={"ft-button":Ri},eo.styles=v`
|
|
1023
1024
|
.ft-snap-scroll {
|
|
1024
1025
|
box-sizing: border-box;
|
|
1025
1026
|
position: relative;
|
|
@@ -1210,7 +1211,7 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1210
1211
|
@display-level=${this.onDisplayLevel}
|
|
1211
1212
|
part="values"
|
|
1212
1213
|
></ft-filter-level>
|
|
1213
|
-
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new ho(e)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,e;this.filter=null!==(e=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==e?e:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}po.elementDefinitions={"ft-button":
|
|
1214
|
+
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new ho(e)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,e;this.filter=null!==(e=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==e?e:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}po.elementDefinitions={"ft-button":Ri,"ft-filter-level":Yi,"ft-snap-scroll":eo,"ft-typography":We},po.styles=[_e,v`
|
|
1214
1215
|
:host {
|
|
1215
1216
|
display: flex;
|
|
1216
1217
|
max-height: 100%;
|
|
@@ -1394,7 +1395,7 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1394
1395
|
.ft-accordion-item--separator {
|
|
1395
1396
|
border-bottom: 1px solid ${mo};
|
|
1396
1397
|
}
|
|
1397
|
-
`,go([i({type:String})],$o.prototype,"icon",void 0),go([i({type:String})],$o.prototype,"label",void 0),go([i({type:Boolean,reflect:!0})],$o.prototype,"active",void 0),c("ft-accordion")(vo),c("ft-accordion-item")($o);var wo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const ko=ft.extend("--ft-chip-color",bt.colorOnSurface),So={backgroundColor:ft.extend("--ft-chip-background-color",bt.colorSurface),color:ko,fontSize:ft.extend("--ft-chip-font-size",$e.fontSize),iconSize:ft.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:ft.extend("--ft-chip-ripple-color",ko),horizontalPadding:ft.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:ft.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:ft.external(bt.colorOutline,"Design system"),opacityDisabled:ft.external(bt.colorOpacityDisabled,"Design system")},Oo=ft.extend("--ft-chip-highlighted-color",ft.extend("--ft-chip-color",bt.colorOnPrimary)),Co={backgroundColor:ft.extend("--ft-chip-highlighted-background-color",ft.extend("--ft-chip-background-color",bt.colorPrimary)),color:Oo,rippleColor:ft.extend("--ft-chip-highlighted-ripple-color",Oo)},zo=ft.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),Eo=ft.create("--ft-chip-dense-vertical-padding","SIZE","4px");class Bo extends CustomEvent{constructor(){super("icon-click")}}class
|
|
1398
|
+
`,go([i({type:String})],$o.prototype,"icon",void 0),go([i({type:String})],$o.prototype,"label",void 0),go([i({type:Boolean,reflect:!0})],$o.prototype,"active",void 0),c("ft-accordion")(vo),c("ft-accordion-item")($o);var wo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const ko=ft.extend("--ft-chip-color",bt.colorOnSurface),So={backgroundColor:ft.extend("--ft-chip-background-color",bt.colorSurface),color:ko,fontSize:ft.extend("--ft-chip-font-size",$e.fontSize),iconSize:ft.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:ft.extend("--ft-chip-ripple-color",ko),horizontalPadding:ft.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:ft.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:ft.external(bt.colorOutline,"Design system"),opacityDisabled:ft.external(bt.colorOpacityDisabled,"Design system")},Oo=ft.extend("--ft-chip-highlighted-color",ft.extend("--ft-chip-color",bt.colorOnPrimary)),Co={backgroundColor:ft.extend("--ft-chip-highlighted-background-color",ft.extend("--ft-chip-background-color",bt.colorPrimary)),color:Oo,rippleColor:ft.extend("--ft-chip-highlighted-ripple-color",Oo)},zo=ft.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),Eo=ft.create("--ft-chip-dense-vertical-padding","SIZE","4px");class Bo extends CustomEvent{constructor(){super("icon-click")}}class Mo extends vt{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}static get styles(){return[gt,v`
|
|
1398
1399
|
:host {
|
|
1399
1400
|
display: inline-block;
|
|
1400
1401
|
max-width: 100%;
|
|
@@ -1543,7 +1544,7 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1543
1544
|
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
1544
1545
|
<ft-icon variant="material">${this.internalIcon}</ft-icon>
|
|
1545
1546
|
</div>
|
|
1546
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Bo))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Bo))}getLabel(){return this.label||this.textContent}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:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}}
|
|
1547
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Bo))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Bo))}getLabel(){return this.label||this.textContent}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:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}}Mo.elementDefinitions={"ft-ripple":ri,"ft-typography":We,"ft-icon":Oi},wo([i({type:Boolean})],Mo.prototype,"highlighted",void 0),wo([i({type:Boolean})],Mo.prototype,"removable",void 0),wo([i({type:Boolean})],Mo.prototype,"disabled",void 0),wo([i({type:Boolean})],Mo.prototype,"clickable",void 0),wo([i({type:Boolean})],Mo.prototype,"iconClickable",void 0),wo([i({type:Boolean})],Mo.prototype,"dense",void 0),wo([i({type:Boolean})],Mo.prototype,"multiLine",void 0),wo([i({type:String})],Mo.prototype,"label",void 0),wo([i({type:String})],Mo.prototype,"icon",void 0),wo([i({type:Boolean})],Mo.prototype,"trailingIcon",void 0),wo([n("ft-typography slot")],Mo.prototype,"slottedContent",void 0),c("ft-chip")(Mo);var No=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ro={fontSize:ft.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:ft.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:ft.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:ft.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:ft.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:ft.extend("--ft-input-label-border-color",bt.colorOutline),textColor:ft.extend("--ft-input-label-text-color",bt.colorOnSurfaceMedium),disabledTextColor:ft.extend("--ft-input-label-disabled-text-color",bt.colorOnSurfaceDisabled),colorSurface:ft.external(bt.colorSurface,"Design system"),borderRadiusS:ft.external(bt.borderRadiusS,"Design system"),colorError:ft.external(bt.colorError,"Design system")};class Fo extends vt{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return K`
|
|
1547
1548
|
<div class="${Dt(t)}">
|
|
1548
1549
|
${this.text?K`
|
|
1549
1550
|
<div class="ft-input-label--text ft-typography--caption">
|
|
@@ -1560,11 +1561,11 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1560
1561
|
}
|
|
1561
1562
|
|
|
1562
1563
|
.ft-input-label {
|
|
1563
|
-
border-color: ${
|
|
1564
|
+
border-color: ${Ro.borderColor};
|
|
1564
1565
|
}
|
|
1565
1566
|
|
|
1566
1567
|
.ft-input-label.ft-input-label--in-error {
|
|
1567
|
-
border-color: ${
|
|
1568
|
+
border-color: ${Ro.colorError}
|
|
1568
1569
|
}
|
|
1569
1570
|
|
|
1570
1571
|
.ft-input-label:before,
|
|
@@ -1577,7 +1578,7 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1577
1578
|
}
|
|
1578
1579
|
|
|
1579
1580
|
.ft-input-label:before {
|
|
1580
|
-
width: ${
|
|
1581
|
+
width: ${Ro.horizontalSpacing};
|
|
1581
1582
|
flex-shrink: 0;
|
|
1582
1583
|
}
|
|
1583
1584
|
|
|
@@ -1593,18 +1594,18 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1593
1594
|
border-bottom-width: 1px;
|
|
1594
1595
|
border-bottom-style: solid;
|
|
1595
1596
|
border-color: inherit;
|
|
1596
|
-
color: ${
|
|
1597
|
+
color: ${Ro.textColor};
|
|
1597
1598
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
1598
|
-
${ut(we.fontSize,
|
|
1599
|
-
${ut(we.lineHeight,
|
|
1599
|
+
${ut(we.fontSize,Ro.fontSize)};
|
|
1600
|
+
${ut(we.lineHeight,Ro.fontSize)};
|
|
1600
1601
|
}
|
|
1601
1602
|
|
|
1602
1603
|
.ft-input-label--in-error .ft-input-label--text {
|
|
1603
|
-
color: ${
|
|
1604
|
+
color: ${Ro.colorError}
|
|
1604
1605
|
}
|
|
1605
1606
|
|
|
1606
1607
|
.ft-input-label--disabled .ft-input-label--text {
|
|
1607
|
-
color: ${
|
|
1608
|
+
color: ${Ro.disabledTextColor};
|
|
1608
1609
|
}
|
|
1609
1610
|
|
|
1610
1611
|
.ft-input-label--hidden-text {
|
|
@@ -1620,17 +1621,17 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1620
1621
|
overflow: hidden;
|
|
1621
1622
|
white-space: nowrap;
|
|
1622
1623
|
text-overflow: ellipsis;
|
|
1623
|
-
padding: ${
|
|
1624
|
-
margin: calc(${
|
|
1624
|
+
padding: ${Ro.verticalSpacing} 4px;
|
|
1625
|
+
margin: calc(${Ro.verticalSpacing} * -1) 0;
|
|
1625
1626
|
}
|
|
1626
1627
|
|
|
1627
1628
|
.ft-input-label--raised .ft-input-label--text {
|
|
1628
|
-
${ut(we.fontSize,
|
|
1629
|
-
${ut(we.lineHeight,
|
|
1629
|
+
${ut(we.fontSize,Ro.raisedFontSize)};
|
|
1630
|
+
${ut(we.lineHeight,Ro.raisedFontSize)};
|
|
1630
1631
|
}
|
|
1631
1632
|
|
|
1632
1633
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
1633
|
-
top: ${
|
|
1634
|
+
top: ${Ro.verticalSpacing};
|
|
1634
1635
|
}
|
|
1635
1636
|
|
|
1636
1637
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -1643,27 +1644,27 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1643
1644
|
.ft-input-label--outlined:before {
|
|
1644
1645
|
border-left-width: 1px;
|
|
1645
1646
|
border-left-style: solid;
|
|
1646
|
-
border-radius: ${
|
|
1647
|
+
border-radius: ${Ro.borderRadiusS} 0 0 ${Ro.borderRadiusS};
|
|
1647
1648
|
}
|
|
1648
1649
|
|
|
1649
1650
|
.ft-input-label--outlined:after {
|
|
1650
1651
|
border-right-width: 1px;
|
|
1651
1652
|
border-right-style: solid;
|
|
1652
|
-
border-radius: 0 ${
|
|
1653
|
+
border-radius: 0 ${Ro.borderRadiusS} ${Ro.borderRadiusS} 0;
|
|
1653
1654
|
}
|
|
1654
1655
|
|
|
1655
1656
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
1656
1657
|
padding: 2px 4px;
|
|
1657
|
-
z-index: ${
|
|
1658
|
-
background-color: ${
|
|
1659
|
-
border-radius: ${
|
|
1658
|
+
z-index: ${Ro.raisedZIndex};
|
|
1659
|
+
background-color: ${Ro.colorSurface};
|
|
1660
|
+
border-radius: ${Ro.borderRadiusS};
|
|
1660
1661
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
1661
1662
|
}
|
|
1662
1663
|
|
|
1663
1664
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
1664
1665
|
border-top: none;
|
|
1665
1666
|
}
|
|
1666
|
-
`],
|
|
1667
|
+
`],No([i({type:String})],Fo.prototype,"text",void 0),No([i({type:Boolean})],Fo.prototype,"raised",void 0),No([i({type:Boolean})],Fo.prototype,"outlined",void 0),No([i({type:Boolean})],Fo.prototype,"disabled",void 0),No([i({type:Boolean})],Fo.prototype,"error",void 0),c("ft-input-label")(Fo);var Lo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Do extends vt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return K``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Do.elementDefinitions={},Lo([i({type:String})],Do.prototype,"label",void 0),Lo([i({type:Object,converter:t=>t})],Do.prototype,"value",void 0),Lo([i({type:Boolean,reflect:!0})],Do.prototype,"selected",void 0);const Io={labelSize:ft.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:ft.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:ft.create("--ft-select-vertical-spacing","SIZE","4px"),selectedOptionColor:ft.extend("--ft-select-selected-option-color",bt.colorOnSurface),helperColor:ft.extend("--ft-select-helper-color",bt.colorOnSurfaceMedium),optionsColor:ft.extend("--ft-select-options-color",bt.colorOnSurface),optionsZIndex:ft.create("--ft-select-options-z-index","NUMBER","3"),colorSurface:ft.external(bt.colorSurface,"Design system"),colorOnSurfaceDisabled:ft.external(bt.colorOnSurfaceDisabled,"Design system"),colorPrimary:ft.external(bt.colorPrimary,"Design system"),borderRadiusS:ft.external(bt.borderRadiusS,"Design system"),elevation02:ft.external(bt.elevation02,"Design system"),colorError:ft.external(bt.colorError,"Design system")};class jo extends vt{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,i,o,s;let n=this.hasOptionsMenuOpen,r=this.disabled||!this.hasOptions;const l=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(i=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==i?i:"").length>0,a={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":r,"ft-select--options-displayed":n,"ft-select--has-option-selected":l,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return K`
|
|
1667
1668
|
<div class="${Dt(a)}" part="container">
|
|
1668
1669
|
<div class="ft-select--main-panel" part="main-panel">
|
|
1669
1670
|
<ft-input-label text="${this.label}"
|
|
@@ -1763,9 +1764,9 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1763
1764
|
}
|
|
1764
1765
|
|
|
1765
1766
|
ft-input-label {
|
|
1766
|
-
${ut(
|
|
1767
|
-
${ut(
|
|
1768
|
-
${ut(
|
|
1767
|
+
${ut(Ro.fontSize,Io.selectedOptionSize)};
|
|
1768
|
+
${ut(Ro.raisedFontSize,Io.labelSize)};
|
|
1769
|
+
${ut(Ro.verticalSpacing,Io.verticalSpacing)};
|
|
1769
1770
|
}
|
|
1770
1771
|
|
|
1771
1772
|
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
@@ -1773,8 +1774,8 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
1773
1774
|
}
|
|
1774
1775
|
|
|
1775
1776
|
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
1776
|
-
${ut(
|
|
1777
|
-
${ut(
|
|
1777
|
+
${ut(Ro.borderColor,Io.colorPrimary)};
|
|
1778
|
+
${ut(Ro.textColor,Io.colorPrimary)};
|
|
1778
1779
|
}
|
|
1779
1780
|
|
|
1780
1781
|
.ft-select--selected-option {
|
|
@@ -2008,8 +2009,8 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2008
2009
|
}
|
|
2009
2010
|
|
|
2010
2011
|
.ft-search-bar--left-action.ft-search-bar--content-locale {
|
|
2011
|
-
${ut(
|
|
2012
|
-
${ut(
|
|
2012
|
+
${ut(Ro.borderColor,"transparent")};
|
|
2013
|
+
${ut(Ro.borderRadiusS,v`calc(${To.borderRadius} - 1px)`)};
|
|
2013
2014
|
${ut(Io.selectedOptionColor,To.buttonColor)};
|
|
2014
2015
|
}
|
|
2015
2016
|
|
|
@@ -2072,7 +2073,7 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2072
2073
|
flex-basis: 0;
|
|
2073
2074
|
}
|
|
2074
2075
|
|
|
2075
|
-
|
|
2076
|
+
ft-filter::part(clear-button) {
|
|
2076
2077
|
display: none;
|
|
2077
2078
|
}
|
|
2078
2079
|
|
|
@@ -2257,15 +2258,15 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2257
2258
|
flex-grow: 1;
|
|
2258
2259
|
flex-shrink: 1;
|
|
2259
2260
|
}
|
|
2260
|
-
`;var Ko=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};null==window.fluidtopics&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");const Wo={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",searchButton:"Search",noSuggestions:"No results found…",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Preset",removeRecentSearch:"Remove",back:"Back"};class Vo extends CustomEvent{constructor(t){super("launch-search",{detail:t,bubbles:!0,composed:!0})}}class qo extends CustomEvent{constructor(t){super("change",{detail:t})}}class Jo extends vt{constructor(){super(...arguments),this.dense=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.availableContentLocalesInitialized=!1,this.labels={},this.labelResolver=new xt(Wo,{}),this.displayedFilters=[],this.presets=[],this.priors=[],this.searchRequestSerializer=t=>function(t,e){var i;const o=new URLSearchParams({"content-lang":null!==(i=e.contentLocale)&&void 0!==i?i:"all",query:e.query});if(e.filters.length>0){const t=e.filters.map((t=>{const e=t.values.map((t=>t.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*"))).map((t=>encodeURIComponent(function(t){return`"${t}"`}(t)))).join("_");return`${t.key}~${e}`})).join("*");o.append("filters",t)}return new URL(`${t}/search/all?${o.toString()}`).href}(this.baseUrl,t),this.searchFilters=[],this.sizeCategory=It.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels={},this.query="",this.suggestions=[],this.suggestionsLoaded=!0,this.recentSearches=[],this.updateFacetsDebouncer=new t(500),this.suggestDebouncer=new t(300),this.facetsLoaded=!1,this.closeFloatingContainer=t=>{this.isMobile||(this.displayFacets=this.displayFacets&&t.composedPath().some((t=>t===this.floatingContainer)))},this.compareFilters=(t,e)=>t.key===e.key&&t.negative==e.negative&&t.values.length===e.values.length&&t.values.every((t=>e.values.includes(t))),this.compareRequests=(t,e)=>(null==t.contentLocale||null==e.contentLocale||t.contentLocale===e.contentLocale)&&t.filters.length===e.filters.length&&t.filters.every((t=>e.filters.some((e=>this.compareFilters(t,e)))))}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,priors:this.hasPriors?this.priors:void 0,filters:this.searchFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){const t=this.searchFilters.filter((t=>!this.displayedFilters.includes(t.key))).map((t=>({id:t.key})));return[...this.displayedFilters.map((t=>({id:t}))),...t]}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,filters:this.searchFilters,sort:[]}}get isMobile(){return this.sizeCategory===It.S}get hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return null!=this.presets&&this.presets.length>0}get hasPriors(){return null!=this.priors&&this.priors.length>0}get hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var t;null===(t=this.container)||void 0===t||t.focus()}clear(){this.query="",this.searchFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}render(){return K`
|
|
2261
|
+
`;var Ko=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};null==window.fluidtopics&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");const Wo={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",searchButton:"Search",noSuggestions:"No results found…",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Preset",removeRecentSearch:"Remove",back:"Back"};class Vo extends CustomEvent{constructor(t){super("launch-search",{detail:t,bubbles:!0,composed:!0})}}class qo extends CustomEvent{constructor(t){super("change",{detail:t})}}class Jo extends vt{constructor(){super(...arguments),this.dense=!1,this.mode="auto",this.forceMobileMenuOpen=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.availableContentLocalesInitialized=!1,this.labels={},this.labelResolver=new xt(Wo,{}),this.displayedFilters=[],this.presets=[],this.priors=[],this.searchRequestSerializer=t=>function(t,e){var i;const o=new URLSearchParams({"content-lang":null!==(i=e.contentLocale)&&void 0!==i?i:"all",query:e.query});if(e.filters.length>0){const t=e.filters.map((t=>{const e=t.values.map((t=>t.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*"))).map((t=>encodeURIComponent(function(t){return`"${t}"`}(t)))).join("_");return`${t.key}~${e}`})).join("*");o.append("filters",t)}return new URL(`${t}/search/all?${o.toString()}`).href}(this.baseUrl,t),this.searchFilters=[],this.sizeCategory=It.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels={},this.query="",this.suggestions=[],this.suggestionsLoaded=!0,this.recentSearches=[],this.updateFacetsDebouncer=new t(500),this.suggestDebouncer=new t(300),this.facetsLoaded=!1,this.closeFloatingContainer=t=>{this.isMobile||(this.displayFacets=this.displayFacets&&t.composedPath().some((t=>t===this.floatingContainer)))},this.compareFilters=(t,e)=>t.key===e.key&&t.negative==e.negative&&t.values.length===e.values.length&&t.values.every((t=>e.values.includes(t))),this.compareRequests=(t,e)=>(null==t.contentLocale||null==e.contentLocale||t.contentLocale===e.contentLocale)&&t.filters.length===e.filters.length&&t.filters.every((t=>e.filters.some((e=>this.compareFilters(t,e)))))}get isMobileMenuOpen(){return this.forceMobileMenuOpen||this.mobileMenuOpen}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,priors:this.hasPriors?this.priors:void 0,filters:this.searchFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){const t=this.searchFilters.filter((t=>!this.displayedFilters.includes(t.key))).map((t=>({id:t.key})));return[...this.displayedFilters.map((t=>({id:t}))),...t]}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,filters:this.searchFilters,sort:[]}}get isMobile(){switch(this.mode){case"mobile":return!0;case"desktop":return!1;default:return this.sizeCategory===It.S}}get hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return null!=this.presets&&this.presets.length>0}get hasPriors(){return null!=this.priors&&this.priors.length>0}get hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var t;null===(t=this.container)||void 0===t||t.focus()}clear(){this.query="",this.searchFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}render(){return K`
|
|
2261
2262
|
<ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
|
|
2262
2263
|
${this.renderSearchBar()}
|
|
2263
|
-
`}renderSearchBar(){const t={"ft-search-bar--container":!0,"ft-search-bar--dense":!this.isMobile&&this.dense,"ft-search-bar--mobile":this.isMobile,"ft-search-bar--desktop":!this.isMobile,"ft-search-bar--floating-panel-open":!this.isMobile&&this.displayFacets,"ft-search-bar--mobile-menu-open":this.
|
|
2264
|
+
`}renderSearchBar(){const t={"ft-search-bar--container":!0,"ft-search-bar--dense":!this.isMobile&&this.dense,"ft-search-bar--mobile":this.isMobile,"ft-search-bar--desktop":!this.isMobile,"ft-search-bar--floating-panel-open":!this.isMobile&&this.displayFacets,"ft-search-bar--mobile-menu-open":this.isMobileMenuOpen};return this.facetsInitialized&&this.availableContentLocalesInitialized?K`
|
|
2264
2265
|
<div class="${Dt(t)}" part="container" tabindex="-1">
|
|
2265
2266
|
${this.isMobile?this.renderMobileSearchBar():this.renderDesktopSearchBar()}
|
|
2266
2267
|
</div>
|
|
2267
2268
|
`:K`
|
|
2268
|
-
<ft-skeleton class="ft-search-bar--skeleton"></ft-skeleton>
|
|
2269
|
+
<ft-skeleton class="ft-search-bar--skeleton" part="loader"></ft-skeleton>
|
|
2269
2270
|
`}renderMobileSearchBar(){return K`
|
|
2270
2271
|
<div class="ft-search-bar">
|
|
2271
2272
|
<div class="ft-search-bar--input-container" part="input-container">
|
|
@@ -2283,7 +2284,7 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2283
2284
|
</div>
|
|
2284
2285
|
${this.displayFacets?this.renderFacetsActions():this.renderSelectedFacets()}
|
|
2285
2286
|
${this.displayFacets?this.renderMobileFacets():this.renderSuggestions()}
|
|
2286
|
-
${this.
|
|
2287
|
+
${this.isMobileMenuOpen||this.displayFacets?K`
|
|
2287
2288
|
<ft-button class="ft-search-bar--launch-search"
|
|
2288
2289
|
part="launch-search-in-panel"
|
|
2289
2290
|
icon="search"
|
|
@@ -2291,7 +2292,7 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2291
2292
|
${this.labelResolver.resolve("searchButton")}
|
|
2292
2293
|
</ft-button>
|
|
2293
2294
|
`:V}
|
|
2294
|
-
`}renderMobileSearchBarButtons(){return this.query||this.
|
|
2295
|
+
`}renderMobileSearchBarButtons(){return this.query||this.isMobileMenuOpen?K`
|
|
2295
2296
|
<div class="ft-search-bar--actions"
|
|
2296
2297
|
part="search-bar-actions">
|
|
2297
2298
|
<ft-button class="ft-search-bar--clear-query"
|
|
@@ -2484,7 +2485,7 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2484
2485
|
></ft-filter>
|
|
2485
2486
|
`}))}
|
|
2486
2487
|
</ft-snap-scroll>
|
|
2487
|
-
`:V}renderSelectedFacets(){if(!this.hasLocaleSelector&&!this.hasFacets)return null;const t=!this.isMobile&&this.dense||this.isMobile&&this.
|
|
2488
|
+
`:V}renderSelectedFacets(){if(!this.hasLocaleSelector&&!this.hasFacets)return null;const t=!this.isMobile&&this.dense||this.isMobile&&this.isMobileMenuOpen,e=K`
|
|
2488
2489
|
${this.hasLocaleSelector&&(this.hasFacets||this.isMobile)?K`
|
|
2489
2490
|
<ft-chip part="selected-filters"
|
|
2490
2491
|
?dense=${this.dense&&!this.isMobile}
|
|
@@ -2571,7 +2572,7 @@ class vi extends Ct{constructor(t){if(super(t),this.it=V,t.type!==St)throw Error
|
|
|
2571
2572
|
<ft-icon variant="${e}" part="suggestion-icon">
|
|
2572
2573
|
${i}
|
|
2573
2574
|
</ft-icon>
|
|
2574
|
-
`}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){super.firstUpdated(t),this.initApi()}update(t){var e,i,o,s,n,r;if(t.has("labels")&&(this.labelResolver=new xt(Wo,this.labels)),t.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile),super.update(t),(t.has("availableContentLocales")||t.has("contentLocale"))&&this.availableContentLocales.length>0){const i=t=>this.availableContentLocales.some((e=>e.lang===t));i(this.contentLocale)||(this.contentLocale=t.has("contentLocale")&&i(t.get("contentLocale"))?t.get("contentLocale"):null===(e=this.availableContentLocales[0])||void 0===e?void 0:e.lang)}if(t.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.recentSearches=JSON.parse(null!==(i=window.localStorage.getItem(this.recentSearchesStorageKey))&&void 0!==i?i:"[]")),t.has("presets")&&(null!==(o=this.presets)&&void 0!==o?o:[]).forEach((t=>t.filters.forEach((t=>t.values=t.values.map((t=>qe(t))))))),t.has("selectedPreset")){const t=(null!==(s=this.presets)&&void 0!==s?s:[]).find((t=>t.name===this.selectedPreset));t&&!this.compareRequests(this.request,t)&&this.setFiltersFromPreset(t)}["contentLocale","searchFilters"].some((e=>t.has(e)))&&(this.selectedPreset=null===(r=(null!==(n=this.presets)&&void 0!==n?n:[]).find((t=>this.compareRequests(t,this.request))))||void 0===r?void 0:r.name),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&(this.api=void 0,this.initApi(),this.availableContentLocalesInitialized=!1,this.facetsInitialized=!1),t.has("
|
|
2575
|
+
`}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){super.firstUpdated(t),this.initApi()}update(t){var e,i,o,s,n,r;if(t.has("labels")&&(this.labelResolver=new xt(Wo,this.labels)),t.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile),super.update(t),(t.has("availableContentLocales")||t.has("contentLocale"))&&this.availableContentLocales.length>0){const i=t=>this.availableContentLocales.some((e=>e.lang===t));i(this.contentLocale)||(this.contentLocale=t.has("contentLocale")&&i(t.get("contentLocale"))?t.get("contentLocale"):null===(e=this.availableContentLocales[0])||void 0===e?void 0:e.lang)}if(t.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.recentSearches=JSON.parse(null!==(i=window.localStorage.getItem(this.recentSearchesStorageKey))&&void 0!==i?i:"[]")),t.has("presets")&&(null!==(o=this.presets)&&void 0!==o?o:[]).forEach((t=>t.filters.forEach((t=>t.values=t.values.map((t=>qe(t))))))),t.has("selectedPreset")){const t=(null!==(s=this.presets)&&void 0!==s?s:[]).find((t=>t.name===this.selectedPreset));t&&!this.compareRequests(this.request,t)&&this.setFiltersFromPreset(t)}["contentLocale","searchFilters"].some((e=>t.has(e)))&&(this.selectedPreset=null===(r=(null!==(n=this.presets)&&void 0!==n?n:[]).find((t=>this.compareRequests(t,this.request))))||void 0===r?void 0:r.name),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&(this.api=void 0,this.initApi(),this.availableContentLocalesInitialized=!1,this.facetsInitialized=!1),t.has("api")&&this.updateAvailableContentLocales(),["uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateFacets(),["query","uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateSuggestions(),["query","uiLocale","contentLocale","searchFilters"].some((e=>t.has(e)))&&this.dispatchEvent(new qo(this.request))}async updateAvailableContentLocales(){this.api&&(this.availableContentLocales=await this.api.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[])),this.availableContentLocalesInitialized=!0)}contentAvailableCallback(t){var e,i,o;if(super.contentAvailableCallback(t),t.has("displayFacets")&&this.displayFacets&&(null===(e=this.floatingContainer)||void 0===e||e.focus()),null!=this.scrollToFacet&&this.facetsLoaded){null===(i=this.scrollingFiltersContainer)||void 0===i||i.scrollIndexIntoView(this.facets.findIndex((t=>t.key===this.scrollToFacet)));const t=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`ft-accordion-item[data-facet-key="${this.scrollToFacet}"]`);t&&(t.active=!0),this.scrollToFacet=void 0}}initApi(){null==this.api&&(this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0,setTimeout((()=>this.initApi()),100))}updateFacets(){this.api&&(this.facetsRequest.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run((async()=>{var t,e;this.facets=null!==(e=await(null===(t=this.api)||void 0===t?void 0:t.search({...this.request,query:""}).then((t=>t.facets)).catch((()=>[]))))&&void 0!==e?e:[],this.facets.forEach((t=>this.knownFacetLabels[t.key]=t.label)),this.facetsLoaded=!0,this.facetsInitialized=!0}))):(this.facets=[],this.facetsInitialized=!0))}updateSuggestions(){this.suggestionsLoaded=!1,this.suggestDebouncer.run((async()=>{this.suggestions=this.api&&this.query.length>2?await this.api.getSuggestions(this.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],this.suggestionsLoaded=!0}))}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.query=e.value,"Enter"===t.key&&this.launchSearch()}onSearchBarKeyDown(t){var e,i;switch(t.key){case"Escape":this.mobileMenuOpen=!1,null===(e=this.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),null===(i=this.firstSuggestion)||void 0===i||i.focus()}}onFloatingContainerKeyUp(t){var e;"Escape"===t.key&&(this.displayFacets=!1,null===(e=this.filtersOpener)||void 0===e||e.focus())}setQuery(t){this.input&&(this.input.value=t),this.query=t}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.setQuery(e),this.launchSearch()}launchSearch(){if(this.query){let t=this.recentSearches.filter((t=>t.toLowerCase()!==this.query.toLowerCase())).filter(((t,e)=>e<20));this.recentSearches=[this.query,...t],this.saveRecentSearches()}this.dispatchEvent(new Vo(this.request)),this.mobileMenuOpen=!1,this.displayFacets=!1,this.focus()}saveRecentSearches(){window.localStorage.setItem(this.recentSearchesStorageKey,JSON.stringify(this.recentSearches))}connectedCallback(){super.connectedCallback(),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}updateSize(t){this.sizeCategory=t.detail.category}getLocaleLabel(t){var e;return null!==(e=this.availableContentLocales.filter((e=>{var i;return(null!==(i=e.lang)&&void 0!==i?i:"").toLowerCase()===(null!=t?t:"").toLowerCase()})).map((t=>t.label)).pop())&&void 0!==e?e:t}setFilter(t,e){let i=this.searchFilters.filter((e=>e.key!==t));this.facets.forEach((i=>{i.key===t&&Ve(i.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=e.includes(t.value)))})),e.length&&i.push({key:t,negative:!1,values:e}),this.searchFilters=i,this.scrollToFacet=t}setFiltersFromPreset(t){null!=t&&(null!=t.contentLocale&&(this.contentLocale=t.contentLocale),this.searchFilters=t.filters)}clearFilters(){this.facets.forEach((t=>Ve(t.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=!1)))),this.searchFilters=[];const t=this.facets[0];this.scrollToFacet=null==t?void 0:t.key}removeRecentSearch(t,e){var i,o,s,n;t.preventDefault(),t.stopPropagation();const r=null!==(n=null!==(o=null===(i=this.focusedSuggestion)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:null===(s=this.focusedSuggestion)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.input;null==r||r.focus(),this.recentSearches=this.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.saveRecentSearches()}onSuggestKeyDown(t){var e,i,o,s,n,r;switch(t.key){case"ArrowUp":null===(o=null!==(i=null===(e=this.focusedSuggestion)||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.lastSuggestion)||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(r=null!==(n=null===(s=this.focusedSuggestion)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstSuggestion)||void 0===r||r.focus(),t.preventDefault(),t.stopPropagation()}}}Jo.elementDefinitions={"ft-accordion":vo,"ft-accordion-item":$o,"ft-button":Ri,"ft-chip":Mo,"ft-filter":po,"ft-filter-option":uo,"ft-icon":Oi,"ft-ripple":ri,"ft-select":jo,"ft-select-option":Do,"ft-size-watcher":Pt,"ft-skeleton":Po,"ft-snap-scroll":eo,"ft-tooltip":fi,"ft-typography":We},Jo.styles=[Ae,Ao,_o,Ho,Zo],Ko([i({type:Boolean})],Jo.prototype,"dense",void 0),Ko([i()],Jo.prototype,"mode",void 0),Ko([i({type:Boolean})],Jo.prototype,"forceMobileMenuOpen",void 0),Ko([i()],Jo.prototype,"baseUrl",void 0),Ko([i()],Jo.prototype,"apiIntegrationIdentifier",void 0),Ko([i()],Jo.prototype,"contentLocale",void 0),Ko([o()],Jo.prototype,"availableContentLocales",void 0),Ko([o()],Jo.prototype,"availableContentLocalesInitialized",void 0),Ko([i()],Jo.prototype,"uiLocale",void 0),Ko([h({})],Jo.prototype,"labels",void 0),Ko([h([])],Jo.prototype,"displayedFilters",void 0),Ko([h([])],Jo.prototype,"presets",void 0),Ko([i({type:String,reflect:!0})],Jo.prototype,"selectedPreset",void 0),Ko([h([])],Jo.prototype,"priors",void 0),Ko([i()],Jo.prototype,"searchRequestSerializer",void 0),Ko([o()],Jo.prototype,"searchFilters",void 0),Ko([o()],Jo.prototype,"sizeCategory",void 0),Ko([o()],Jo.prototype,"displayFacets",void 0),Ko([o()],Jo.prototype,"mobileMenuOpen",void 0),Ko([o()],Jo.prototype,"facets",void 0),Ko([o()],Jo.prototype,"facetsInitialized",void 0),Ko([n(".ft-search-bar--container")],Jo.prototype,"container",void 0),Ko([n(".ft-search-bar--filters-opener")],Jo.prototype,"filtersOpener",void 0),Ko([n(".ft-search-bar--floating-panel")],Jo.prototype,"floatingContainer",void 0),Ko([n("ft-snap-scroll.ft-search-bar--filters-container")],Jo.prototype,"scrollingFiltersContainer",void 0),Ko([n(".ft-search-bar--input")],Jo.prototype,"input",void 0),Ko([o()],Jo.prototype,"query",void 0),Ko([o()],Jo.prototype,"suggestions",void 0),Ko([o()],Jo.prototype,"suggestionsLoaded",void 0),Ko([o()],Jo.prototype,"recentSearches",void 0),Ko([o()],Jo.prototype,"scrollToFacet",void 0),Ko([n(".ft-search-bar--suggestion:first-child")],Jo.prototype,"firstSuggestion",void 0),Ko([n(".ft-search-bar--suggestion:focus-within")],Jo.prototype,"focusedSuggestion",void 0),Ko([n(".ft-search-bar--suggestion:last-child")],Jo.prototype,"lastSuggestion",void 0),Ko([o()],Jo.prototype,"api",void 0),c("ft-search-bar")(function t(e){var i;let o;if("elementDefinitions"in e){o={};const i=e.elementDefinitions;for(let e in i)o[e]=t(i[e])}return i=class extends e{render(){var t;let i=null!==(t=e.styles)&&void 0!==t?t:[];return Array.isArray(i)||(i=[i]),K`
|
|
2575
2576
|
${i.map((t=>K`
|
|
2576
2577
|
<style>${t}</style>
|
|
2577
2578
|
`))}
|