@fluid-topics/ft-search-bar 0.2.3 → 0.2.7
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 +17 -2
- package/build/ft-search-bar.d.ts +3 -1
- package/build/ft-search-bar.inline-styles.js +414 -334
- package/build/ft-search-bar.js +52 -33
- package/build/ft-search-bar.light.js +405 -325
- package/build/ft-search-bar.min.js +415 -335
- package/package.json +15 -15
|
@@ -21,69 +21,51 @@
|
|
|
21
21
|
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
22
22
|
width: 100%;
|
|
23
23
|
}
|
|
24
|
-
`,c([o.property({type:Number})],p.prototype,"debounceTimeout",void 0),c([o.property({type:Boolean})],p.prototype,"local",void 0),c([o.property({type:Number,reflect:!0})],p.prototype,"size",void 0),c([o.property({type:String,reflect:!0})],p.prototype,"category",void 0),c([o.query(".ft-size-watcher--watcher")],p.prototype,"watcher",void 0),e.customElement("ft-size-watcher")(p);const f=globalThis.trustedTypes,d=f?f.createPolicy("lit-html",{createHTML:t=>t}):void 0,u=`lit$${(Math.random()+"").slice(9)}$`,b="?"+u,v=`<${b}>`,g=document,x=(t="")=>g.createComment(t),y=t=>null===t||"object"!=typeof t&&"function"!=typeof t,m=Array.isArray,$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,w=/-->/g,k=/>/g,S=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,z=/'/g,O=/"/g,B=/^(?:script|style|textarea|title)$/i,C=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),E=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),D=new WeakMap,F=g.createTreeWalker(g,129,null,!1),L=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=$;for(let e=0;e<i;e++){const i=t[e];let l,a,c=-1,h=0;for(;h<i.length&&(r.lastIndex=h,a=r.exec(i),null!==a);)h=r.lastIndex,r===$?"!--"===a[1]?r=w:void 0!==a[1]?r=k:void 0!==a[2]?(B.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=S):void 0!==a[3]&&(r=S):r===S?">"===a[0]?(r=null!=s?s:$,c=-1):void 0===a[1]?c=-2:(c=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?S:'"'===a[3]?O:z):r===O||r===z?r=S:r===w||r===k?r=$:(r=S,s=void 0);const p=r===S&&t[e+1].startsWith("/>")?" ":"";n+=r===$?i+v:c>=0?(o.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+u+p):i+u+(-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!==d?d.createHTML(l):l,o]};class j{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]=L(t,e);if(this.el=j.createElement(a,i),F.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=F.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(u)){const i=c[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(u),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?
|
|
24
|
+
`,c([o.property({type:Number})],p.prototype,"debounceTimeout",void 0),c([o.property({type:Boolean})],p.prototype,"local",void 0),c([o.property({type:Number,reflect:!0})],p.prototype,"size",void 0),c([o.property({type:String,reflect:!0})],p.prototype,"category",void 0),c([o.query(".ft-size-watcher--watcher")],p.prototype,"watcher",void 0),e.customElement("ft-size-watcher")(p);const f=globalThis.trustedTypes,d=f?f.createPolicy("lit-html",{createHTML:t=>t}):void 0,u=`lit$${(Math.random()+"").slice(9)}$`,b="?"+u,v=`<${b}>`,g=document,x=(t="")=>g.createComment(t),y=t=>null===t||"object"!=typeof t&&"function"!=typeof t,m=Array.isArray,$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,w=/-->/g,k=/>/g,S=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,z=/'/g,O=/"/g,B=/^(?:script|style|textarea|title)$/i,C=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),E=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),D=new WeakMap,F=g.createTreeWalker(g,129,null,!1),L=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=$;for(let e=0;e<i;e++){const i=t[e];let l,a,c=-1,h=0;for(;h<i.length&&(r.lastIndex=h,a=r.exec(i),null!==a);)h=r.lastIndex,r===$?"!--"===a[1]?r=w:void 0!==a[1]?r=k:void 0!==a[2]?(B.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=S):void 0!==a[3]&&(r=S):r===S?">"===a[0]?(r=null!=s?s:$,c=-1):void 0===a[1]?c=-2:(c=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?S:'"'===a[3]?O:z):r===O||r===z?r=S:r===w||r===k?r=$:(r=S,s=void 0);const p=r===S&&t[e+1].startsWith("/>")?" ":"";n+=r===$?i+v:c>=0?(o.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+u+p):i+u+(-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!==d?d.createHTML(l):l,o]};class j{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]=L(t,e);if(this.el=j.createElement(a,i),F.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=F.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(u)){const i=c[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(u),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?P:"?"===e[1]?_:"@"===e[1]?U:N})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(B.test(o.tagName)){const t=o.textContent.split(u),e=t.length-1;if(e>0){o.textContent=f?f.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],x()),F.nextNode(),l.push({type:2,index:++s});o.append(t[e],x())}}}else if(8===o.nodeType)if(o.data===b)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(u,t+1));)l.push({type:7,index:s}),t+=u.length-1}s++}}static createElement(t,e){const i=g.createElement("template");return i.innerHTML=t,i}}function M(t,e,i=t,o){var s,n,r,l;if(e===E)return e;let a=void 0!==o?null===(s=i._$Cl)||void 0===s?void 0:s[o]:i._$Cu;const c=y(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=M(t,a._$AS(t,e.values),a,o)),e}class T{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:g).importNode(i,!0);F.currentNode=s;let n=F.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new A(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new Z(n,this,t)),this.v.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=F.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 A{constructor(t,e,i,o){var s;this.type=2,this._$AH=I,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=M(this,t,e),y(t)?t===I||null==t||""===t?(this._$AH!==I&&this._$AR(),this._$AH=I):t!==this._$AH&&t!==E&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):(t=>{var e;return m(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(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!==I&&y(this._$AH)?this._$AA.nextSibling.data=t:this.k(g.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=j.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 T(s,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=D.get(t.strings);return void 0===e&&D.set(t.strings,e=new j(t)),e}S(t){m(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 A(this.M(x()),this.M(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._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class N{constructor(t,e,i,o,s){this.type=1,this._$AH=I,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=I}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=M(this,t,e,0),n=!y(t)||t!==this._$AH&&t!==E,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=M(this,o[i+r],e,r),l===E&&(l=this._$AH[r]),n||(n=!y(l)||l!==this._$AH[r]),l===I?t=I:t!==I&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.C(t)}C(t){t===I?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class P extends N{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===I?void 0:t}}const R=f?f.emptyScript:"";class _ extends N{constructor(){super(...arguments),this.type=4}C(t){t&&t!==I?this.element.setAttribute(this.name,R):this.element.removeAttribute(this.name)}}class U extends N{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=M(this,t,e,0))&&void 0!==i?i:I)===E)return;const o=this._$AH,s=t===I&&o!==I||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==I&&(o===I||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 Z{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){M(this,t)}}const H=window.litHtmlPolyfillSupport;null==H||H(j,A),(null!==(a=globalThis.litHtmlVersions)&&void 0!==a?a:globalThis.litHtmlVersions=[]).push("2.2.4");
|
|
25
25
|
/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2020 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
29
|
*/
|
|
30
|
-
const K=t=>({_$litStatic$:t}),
|
|
30
|
+
const K=Symbol.for(""),q=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===K)return null===(i=t)||void 0===i?void 0:i._$litStatic$},V=t=>({_$litStatic$:t,r:K}),W=new Map,G=(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=q(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=W.get(t))&&(r.raw=r,W.set(t,e=r)),i=l}return t(e,...i)})(C);var X,J=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"}(X||(X={}));const Y=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),Q=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),tt={fontFamily:Q,fontSize:e.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:e.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},et=e.FtCssVariable.extend("--ft-typography-title-font-family",Y),it=e.FtCssVariable.extend("--ft-typography-title-font-size",tt.fontSize,"20px"),ot=e.FtCssVariable.extend("--ft-typography-title-font-weight",tt.fontWeight,"normal"),st=e.FtCssVariable.extend("--ft-typography-title-letter-spacing",tt.letterSpacing,"0.15px"),nt=e.FtCssVariable.extend("--ft-typography-title-line-height",tt.lineHeight,"24px"),rt=e.FtCssVariable.extend("--ft-typography-title-text-transform",tt.textTransform,"inherit"),lt=e.FtCssVariable.extend("--ft-typography-title-dense-font-family",Y),at=e.FtCssVariable.extend("--ft-typography-title-dense-font-size",tt.fontSize,"14px"),ct=e.FtCssVariable.extend("--ft-typography-title-dense-font-weight",tt.fontWeight,"normal"),ht=e.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",tt.letterSpacing,"0.105px"),pt=e.FtCssVariable.extend("--ft-typography-title-dense-line-height",tt.lineHeight,"24px"),ft=e.FtCssVariable.extend("--ft-typography-title-dense-text-transform",tt.textTransform,"inherit"),dt=e.FtCssVariable.extend("--ft-typography-subtitle1-font-family",Q),ut=e.FtCssVariable.extend("--ft-typography-subtitle1-font-size",tt.fontSize,"16px"),bt=e.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",tt.fontWeight,"600"),vt=e.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",tt.letterSpacing,"0.144px"),gt=e.FtCssVariable.extend("--ft-typography-subtitle1-line-height",tt.lineHeight,"24px"),xt=e.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",tt.textTransform,"inherit"),yt=e.FtCssVariable.extend("--ft-typography-subtitle2-font-family",Q),mt=e.FtCssVariable.extend("--ft-typography-subtitle2-font-size",tt.fontSize,"14px"),$t=e.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",tt.fontWeight,"normal"),wt=e.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",tt.letterSpacing,"0.098px"),kt=e.FtCssVariable.extend("--ft-typography-subtitle2-line-height",tt.lineHeight,"24px"),St=e.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",tt.textTransform,"inherit"),zt={fontFamily:e.FtCssVariable.extend("--ft-typography-body1-font-family",Q),fontSize:e.FtCssVariable.extend("--ft-typography-body1-font-size",tt.fontSize,"16px"),fontWeight:e.FtCssVariable.extend("--ft-typography-body1-font-weight",tt.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-body1-letter-spacing",tt.letterSpacing,"0.496px"),lineHeight:e.FtCssVariable.extend("--ft-typography-body1-line-height",tt.lineHeight,"24px"),textTransform:e.FtCssVariable.extend("--ft-typography-body1-text-transform",tt.textTransform,"inherit")},Ot={fontFamily:e.FtCssVariable.extend("--ft-typography-body2-font-family",Q),fontSize:e.FtCssVariable.extend("--ft-typography-body2-font-size",tt.fontSize,"14px"),fontWeight:e.FtCssVariable.extend("--ft-typography-body2-font-weight",tt.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-body2-letter-spacing",tt.letterSpacing,"0.252px"),lineHeight:e.FtCssVariable.extend("--ft-typography-body2-line-height",tt.lineHeight,"20px"),textTransform:e.FtCssVariable.extend("--ft-typography-body2-text-transform",tt.textTransform,"inherit")},Bt={fontFamily:e.FtCssVariable.extend("--ft-typography-caption-font-family",Q),fontSize:e.FtCssVariable.extend("--ft-typography-caption-font-size",tt.fontSize,"12px"),fontWeight:e.FtCssVariable.extend("--ft-typography-caption-font-weight",tt.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-caption-letter-spacing",tt.letterSpacing,"0.396px"),lineHeight:e.FtCssVariable.extend("--ft-typography-caption-line-height",tt.lineHeight,"16px"),textTransform:e.FtCssVariable.extend("--ft-typography-caption-text-transform",tt.textTransform,"inherit")},Ct=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",Q),Et=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",tt.fontSize,"10px"),It=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",tt.fontWeight,"normal"),Dt=e.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",tt.letterSpacing,"0.33px"),Ft=e.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",tt.lineHeight,"16px"),Lt=e.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",tt.textTransform,"inherit"),jt=e.FtCssVariable.extend("--ft-typography-overline-font-family",Q),Mt=e.FtCssVariable.extend("--ft-typography-overline-font-size",tt.fontSize,"10px"),Tt=e.FtCssVariable.extend("--ft-typography-overline-font-weight",tt.fontWeight,"normal"),At=e.FtCssVariable.extend("--ft-typography-overline-letter-spacing",tt.letterSpacing,"1.5px"),Nt=e.FtCssVariable.extend("--ft-typography-overline-line-height",tt.lineHeight,"16px"),Pt=e.FtCssVariable.extend("--ft-typography-overline-text-transform",tt.textTransform,"uppercase"),Rt={fontFamily:e.FtCssVariable.extend("--ft-typography-button-font-family",Q),fontSize:e.FtCssVariable.extend("--ft-typography-button-font-size",tt.fontSize,"14px"),fontWeight:e.FtCssVariable.extend("--ft-typography-button-font-weight",tt.fontWeight,"600"),letterSpacing:e.FtCssVariable.extend("--ft-typography-button-letter-spacing",tt.letterSpacing,"1.246px"),lineHeight:e.FtCssVariable.extend("--ft-typography-button-line-height",tt.lineHeight,"16px"),textTransform:e.FtCssVariable.extend("--ft-typography-button-text-transform",tt.textTransform,"uppercase")},_t=i.css`
|
|
31
31
|
.ft-typography--title {
|
|
32
|
-
font-family: ${
|
|
33
|
-
font-size: ${
|
|
34
|
-
font-weight: ${
|
|
35
|
-
letter-spacing: ${
|
|
36
|
-
line-height: ${
|
|
37
|
-
text-transform: ${
|
|
38
|
-
}
|
|
39
|
-
`,Pt=i.css`
|
|
40
|
-
.ft-typography--title-dense {
|
|
41
|
-
font-family: ${nt};
|
|
42
|
-
font-size: ${rt};
|
|
43
|
-
font-weight: ${lt};
|
|
44
|
-
letter-spacing: ${at};
|
|
45
|
-
line-height: ${ct};
|
|
46
|
-
text-transform: ${ht};
|
|
47
|
-
}
|
|
48
|
-
`,_t=i.css`
|
|
49
|
-
.ft-typography--subtitle1 {
|
|
50
|
-
font-family: ${pt};
|
|
51
|
-
font-size: ${ft};
|
|
52
|
-
font-weight: ${dt};
|
|
53
|
-
letter-spacing: ${ut};
|
|
54
|
-
line-height: ${bt};
|
|
55
|
-
text-transform: ${vt};
|
|
32
|
+
font-family: ${et};
|
|
33
|
+
font-size: ${it};
|
|
34
|
+
font-weight: ${ot};
|
|
35
|
+
letter-spacing: ${st};
|
|
36
|
+
line-height: ${nt};
|
|
37
|
+
text-transform: ${rt};
|
|
56
38
|
}
|
|
57
39
|
`,Ut=i.css`
|
|
58
|
-
.ft-typography--
|
|
59
|
-
font-family: ${
|
|
60
|
-
font-size: ${
|
|
61
|
-
font-weight: ${
|
|
62
|
-
letter-spacing: ${
|
|
63
|
-
line-height: ${
|
|
64
|
-
text-transform: ${
|
|
40
|
+
.ft-typography--title-dense {
|
|
41
|
+
font-family: ${lt};
|
|
42
|
+
font-size: ${at};
|
|
43
|
+
font-weight: ${ct};
|
|
44
|
+
letter-spacing: ${ht};
|
|
45
|
+
line-height: ${pt};
|
|
46
|
+
text-transform: ${ft};
|
|
65
47
|
}
|
|
66
|
-
|
|
67
48
|
`,Zt=i.css`
|
|
68
|
-
.ft-typography--
|
|
69
|
-
font-family: ${
|
|
70
|
-
font-size: ${
|
|
71
|
-
font-weight: ${
|
|
72
|
-
letter-spacing: ${
|
|
73
|
-
line-height: ${
|
|
74
|
-
text-transform: ${
|
|
49
|
+
.ft-typography--subtitle1 {
|
|
50
|
+
font-family: ${dt};
|
|
51
|
+
font-size: ${ut};
|
|
52
|
+
font-weight: ${bt};
|
|
53
|
+
letter-spacing: ${vt};
|
|
54
|
+
line-height: ${gt};
|
|
55
|
+
text-transform: ${xt};
|
|
75
56
|
}
|
|
76
57
|
`,Ht=i.css`
|
|
77
|
-
.ft-typography--
|
|
78
|
-
font-family: ${
|
|
79
|
-
font-size: ${
|
|
80
|
-
font-weight: ${
|
|
81
|
-
letter-spacing: ${
|
|
82
|
-
line-height: ${
|
|
83
|
-
text-transform: ${St
|
|
58
|
+
.ft-typography--subtitle2 {
|
|
59
|
+
font-family: ${yt};
|
|
60
|
+
font-size: ${mt};
|
|
61
|
+
font-weight: ${$t};
|
|
62
|
+
letter-spacing: ${wt};
|
|
63
|
+
line-height: ${kt};
|
|
64
|
+
text-transform: ${St};
|
|
84
65
|
}
|
|
66
|
+
|
|
85
67
|
`,Kt=i.css`
|
|
86
|
-
.ft-typography--
|
|
68
|
+
.ft-typography--body1 {
|
|
87
69
|
font-family: ${zt.fontFamily};
|
|
88
70
|
font-size: ${zt.fontSize};
|
|
89
71
|
font-weight: ${zt.fontWeight};
|
|
@@ -92,44 +74,62 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
92
74
|
text-transform: ${zt.textTransform};
|
|
93
75
|
}
|
|
94
76
|
`,qt=i.css`
|
|
95
|
-
.ft-typography--
|
|
96
|
-
font-family: ${Ot};
|
|
97
|
-
font-size: ${
|
|
98
|
-
font-weight: ${
|
|
99
|
-
letter-spacing: ${
|
|
100
|
-
line-height: ${
|
|
101
|
-
text-transform: ${
|
|
77
|
+
.ft-typography--body2 {
|
|
78
|
+
font-family: ${Ot.fontFamily};
|
|
79
|
+
font-size: ${Ot.fontSize};
|
|
80
|
+
font-weight: ${Ot.fontWeight};
|
|
81
|
+
letter-spacing: ${Ot.letterSpacing};
|
|
82
|
+
line-height: ${Ot.lineHeight};
|
|
83
|
+
text-transform: ${Ot.textTransform};
|
|
102
84
|
}
|
|
103
85
|
`,Vt=i.css`
|
|
104
|
-
.ft-typography--
|
|
105
|
-
font-family: ${
|
|
106
|
-
font-size: ${
|
|
107
|
-
font-weight: ${
|
|
108
|
-
letter-spacing: ${
|
|
109
|
-
line-height: ${
|
|
110
|
-
text-transform: ${
|
|
86
|
+
.ft-typography--caption {
|
|
87
|
+
font-family: ${Bt.fontFamily};
|
|
88
|
+
font-size: ${Bt.fontSize};
|
|
89
|
+
font-weight: ${Bt.fontWeight};
|
|
90
|
+
letter-spacing: ${Bt.letterSpacing};
|
|
91
|
+
line-height: ${Bt.lineHeight};
|
|
92
|
+
text-transform: ${Bt.textTransform};
|
|
111
93
|
}
|
|
112
94
|
`,Wt=i.css`
|
|
95
|
+
.ft-typography--breadcrumb {
|
|
96
|
+
font-family: ${Ct};
|
|
97
|
+
font-size: ${Et};
|
|
98
|
+
font-weight: ${It};
|
|
99
|
+
letter-spacing: ${Dt};
|
|
100
|
+
line-height: ${Ft};
|
|
101
|
+
text-transform: ${Lt};
|
|
102
|
+
}
|
|
103
|
+
`,Gt=i.css`
|
|
104
|
+
.ft-typography--overline {
|
|
105
|
+
font-family: ${jt};
|
|
106
|
+
font-size: ${Mt};
|
|
107
|
+
font-weight: ${Tt};
|
|
108
|
+
letter-spacing: ${At};
|
|
109
|
+
line-height: ${Nt};
|
|
110
|
+
text-transform: ${Pt};
|
|
111
|
+
}
|
|
112
|
+
`,Xt=i.css`
|
|
113
113
|
.ft-typography--button {
|
|
114
|
-
font-family: ${
|
|
115
|
-
font-size: ${
|
|
116
|
-
font-weight: ${
|
|
117
|
-
letter-spacing: ${
|
|
118
|
-
line-height: ${
|
|
119
|
-
text-transform: ${
|
|
120
|
-
}
|
|
121
|
-
`;class
|
|
122
|
-
<${
|
|
114
|
+
font-family: ${Rt.fontFamily};
|
|
115
|
+
font-size: ${Rt.fontSize};
|
|
116
|
+
font-weight: ${Rt.fontWeight};
|
|
117
|
+
letter-spacing: ${Rt.letterSpacing};
|
|
118
|
+
line-height: ${Rt.lineHeight};
|
|
119
|
+
text-transform: ${Rt.textTransform};
|
|
120
|
+
}
|
|
121
|
+
`;class Jt extends e.FtLitElement{constructor(){super(...arguments),this.variant=X.body1}render(){return this.element?G`
|
|
122
|
+
<${V(this.element)}
|
|
123
123
|
class="ft-typography ft-typography--${this.variant}">
|
|
124
124
|
<slot></slot>
|
|
125
|
-
</${
|
|
126
|
-
`:
|
|
125
|
+
</${V(this.element)}>
|
|
126
|
+
`:G`
|
|
127
127
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
128
|
-
`}}function
|
|
128
|
+
`}}function Yt(t,e){return t.flatMap((t=>[t,...Yt(e(t),e)]))}function Qt(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function te(t,e){return{label:t.label,selected:!e&&t.selected,subOptions:t.childNodes.map((e=>te(e,t.selected))),value:t.value}}function ee(t){return{id:t.key,label:t.label,multivalued:t.multiSelectionable,options:t.rootNodes.map((t=>te(t,!1)))}}Jt.styles=[_t,Ut,Zt,Ht,Kt,qt,Vt,Wt,Gt,Xt,i.css`
|
|
129
129
|
.ft-typography {
|
|
130
130
|
vertical-align: inherit;
|
|
131
131
|
}
|
|
132
|
-
`],
|
|
132
|
+
`],J([o.property()],Jt.prototype,"element",void 0),J([o.property()],Jt.prototype,"variant",void 0),e.customElement("ft-typography")(Jt);var ie=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 oe=e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorContent),se={color:oe,backgroundColor:e.FtCssVariable.extend("--ft-ripple-background-color",oe),opacityContentOnSurfacePressed:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},ne=e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),re=ne,le=e.FtCssVariable.extend("--ft-ripple-background-color",ne),ae=e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),ce=ae,he=e.FtCssVariable.extend("--ft-ripple-background-color",ae);class pe 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.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),n=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return i.html`
|
|
133
133
|
<style>
|
|
134
134
|
.ft-ripple .ft-ripple--effect,
|
|
135
135
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -146,7 +146,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
146
146
|
<div class="ft-ripple--background"></div>
|
|
147
147
|
<div class="ft-ripple--effect"></div>
|
|
148
148
|
</div>
|
|
149
|
-
`}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){super.updated(t),t.has("disabled")&&this.disabled
|
|
149
|
+
`}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(){var t;super.connectedCallback();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}}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()}}pe.elementDefinitions={},pe.styles=i.css`
|
|
150
150
|
:host {
|
|
151
151
|
display: contents;
|
|
152
152
|
}
|
|
@@ -165,17 +165,30 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
165
165
|
.ft-ripple .ft-ripple--effect {
|
|
166
166
|
position: absolute;
|
|
167
167
|
opacity: 0;
|
|
168
|
-
background-color: ${ee.color};
|
|
169
168
|
}
|
|
170
169
|
|
|
171
|
-
.ft-ripple
|
|
170
|
+
.ft-ripple .ft-ripple--background {
|
|
171
|
+
background-color: ${se.backgroundColor};
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.ft-ripple .ft-ripple--effect {
|
|
175
|
+
background-color: ${se.color};
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
179
|
+
background-color: ${he};
|
|
180
|
+
}
|
|
181
|
+
|
|
172
182
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
173
|
-
background-color: ${
|
|
183
|
+
background-color: ${ce};
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
187
|
+
background-color: ${le};
|
|
174
188
|
}
|
|
175
189
|
|
|
176
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--background,
|
|
177
190
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
178
|
-
background-color: ${
|
|
191
|
+
background-color: ${re};
|
|
179
192
|
}
|
|
180
193
|
|
|
181
194
|
.ft-ripple .ft-ripple--background {
|
|
@@ -183,6 +196,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
183
196
|
left: 0;
|
|
184
197
|
height: 100%;
|
|
185
198
|
width: 100%;
|
|
199
|
+
transition: opacity 75ms linear;
|
|
186
200
|
}
|
|
187
201
|
|
|
188
202
|
.ft-ripple .ft-ripple--effect,
|
|
@@ -206,22 +220,22 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
206
220
|
}
|
|
207
221
|
|
|
208
222
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
209
|
-
opacity: ${
|
|
223
|
+
opacity: ${se.opacityContentOnSurfaceHover};
|
|
210
224
|
}
|
|
211
225
|
|
|
212
226
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
213
|
-
opacity: ${
|
|
227
|
+
opacity: ${se.opacityContentOnSurfaceSelected};
|
|
214
228
|
}
|
|
215
229
|
|
|
216
230
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
217
|
-
opacity: ${
|
|
231
|
+
opacity: ${se.opacityContentOnSurfaceFocused};
|
|
218
232
|
}
|
|
219
233
|
|
|
220
234
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
221
|
-
opacity: ${
|
|
235
|
+
opacity: ${se.opacityContentOnSurfacePressed};
|
|
222
236
|
transform: translate(-50%, -50%) scale(1);
|
|
223
237
|
}
|
|
224
|
-
`,
|
|
238
|
+
`,ie([o.property({type:Boolean})],pe.prototype,"primary",void 0),ie([o.property({type:Boolean})],pe.prototype,"secondary",void 0),ie([o.property({type:Boolean})],pe.prototype,"unbounded",void 0),ie([o.property({type:Boolean})],pe.prototype,"activated",void 0),ie([o.property({type:Boolean})],pe.prototype,"selected",void 0),ie([o.property({type:Boolean})],pe.prototype,"disabled",void 0),ie([o.state()],pe.prototype,"hovered",void 0),ie([o.state()],pe.prototype,"focused",void 0),ie([o.state()],pe.prototype,"pressed",void 0),ie([o.state()],pe.prototype,"rippling",void 0),ie([o.state()],pe.prototype,"rippleSize",void 0),ie([o.state()],pe.prototype,"originX",void 0),ie([o.state()],pe.prototype,"originY",void 0),ie([o.query(".ft-ripple")],pe.prototype,"ripple",void 0),ie([o.query(".ft-ripple--effect")],pe.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(pe);var fe=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 de=e.FtCssVariable.create("--ft-tooltip-distance","SIZE","4px"),ue=e.FtCssVariable.create("--ft-tooltip-color","COLOR","#FFFFFF"),be=e.FtCssVariable.create("--ft-tooltip-background-color","COLOR","#666666"),ve=e.FtCssVariable.create("--ft-tooltip-z-index","NUMBER","1"),ge=e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system");class xe extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new e.Debouncer,this.revealDebouncer=new e.Debouncer}render(){return i.html`
|
|
225
239
|
<div part="container"
|
|
226
240
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
227
241
|
@mouseenter=${this.onHover}
|
|
@@ -236,7 +250,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
236
250
|
</div>
|
|
237
251
|
<slot></slot>
|
|
238
252
|
</div>
|
|
239
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2,s=this.tooltip.style;switch(this.position){case"top":s.top=-this.tooltip.clientHeight+"px",s.left=o+"px";break;case"bottom":s.top=e.height+"px",s.left=o+"px";break;case"left":s.top=i+"px",s.left=-this.tooltip.clientWidth+"px";break;case"right":s.top=i+"px",s.left=e.width+"px"}s.maxWidth=Math.max(e.width,150)+"px"}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}
|
|
253
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2,s=this.tooltip.style;switch(this.position){case"top":s.top=-this.tooltip.clientHeight+"px",s.left=o+"px";break;case"bottom":s.top=e.height+"px",s.left=o+"px";break;case"left":s.top=i+"px",s.left=-this.tooltip.clientWidth+"px";break;case"right":s.top=i+"px",s.left=e.width+"px"}s.maxWidth=Math.max(e.width,150)+"px"}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}xe.elementDefinitions={"ft-typography":Jt},xe.styles=i.css`
|
|
240
254
|
.ft-tooltip--container {
|
|
241
255
|
display: block;
|
|
242
256
|
position: relative;
|
|
@@ -254,21 +268,21 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
254
268
|
width: max-content;
|
|
255
269
|
max-width: 150px;
|
|
256
270
|
text-align: center;
|
|
257
|
-
padding: ${
|
|
258
|
-
z-index: ${
|
|
271
|
+
padding: ${de};
|
|
272
|
+
z-index: ${ve};
|
|
259
273
|
}
|
|
260
274
|
|
|
261
275
|
.ft-tooltip--content {
|
|
262
276
|
padding: 4px 8px;
|
|
263
|
-
border-radius: ${
|
|
264
|
-
background-color: ${
|
|
265
|
-
color: ${
|
|
277
|
+
border-radius: ${ge};
|
|
278
|
+
background-color: ${be};
|
|
279
|
+
color: ${ue};
|
|
266
280
|
top: -500px;
|
|
267
281
|
left: -500px;
|
|
268
282
|
position: relative;
|
|
269
283
|
word-break: break-word;
|
|
270
284
|
}
|
|
271
|
-
`,
|
|
285
|
+
`,fe([o.property()],xe.prototype,"text",void 0),fe([o.property({type:Boolean})],xe.prototype,"manual",void 0),fe([o.property({type:Boolean})],xe.prototype,"inline",void 0),fe([o.property({type:Number})],xe.prototype,"delay",void 0),fe([o.property()],xe.prototype,"position",void 0),fe([o.queryAssignedNodes("",!0)],xe.prototype,"slotNodes",void 0),fe([o.query(".ft-tooltip--container")],xe.prototype,"container",void 0),fe([o.query("slot")],xe.prototype,"target",void 0),fe([o.query(".ft-tooltip")],xe.prototype,"tooltip",void 0),fe([o.query(".ft-tooltip--content")],xe.prototype,"tooltipContent",void 0),fe([o.state()],xe.prototype,"visible",void 0),e.customElement("ft-tooltip")(xe);const ye={color:e.FtCssVariable.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariable.create("--ft-loader-size","SIZE","80px")};class me extends e.FtLitElement{static get styles(){return i.css`
|
|
272
286
|
:host {
|
|
273
287
|
line-height: 0;
|
|
274
288
|
}
|
|
@@ -277,8 +291,8 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
277
291
|
display: inline-block;
|
|
278
292
|
position: relative;
|
|
279
293
|
|
|
280
|
-
width: ${
|
|
281
|
-
height: ${
|
|
294
|
+
width: ${ye.size};
|
|
295
|
+
height: ${ye.size};
|
|
282
296
|
}
|
|
283
297
|
|
|
284
298
|
.ft-loader div {
|
|
@@ -287,7 +301,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
287
301
|
width: 25%;
|
|
288
302
|
height: 25%;
|
|
289
303
|
border-radius: 50%;
|
|
290
|
-
background: ${
|
|
304
|
+
background: ${ye.color};
|
|
291
305
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
292
306
|
}
|
|
293
307
|
|
|
@@ -334,7 +348,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
334
348
|
transform: translate(0, 0);
|
|
335
349
|
}
|
|
336
350
|
100% {
|
|
337
|
-
transform: translate(calc(0.35 * ${
|
|
351
|
+
transform: translate(calc(0.35 * ${ye.size}), 0);
|
|
338
352
|
}
|
|
339
353
|
}
|
|
340
354
|
`}render(){return i.html`
|
|
@@ -344,21 +358,21 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
344
358
|
<div></div>
|
|
345
359
|
<div></div>
|
|
346
360
|
</div>
|
|
347
|
-
`}}var
|
|
361
|
+
`}}var $e,we;e.customElement("ft-loader")(me),function(t){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.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",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="\f06e",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=""}($e||($e={})),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=""}(we||(we={}));const ke=new Map([...["abw"].map((t=>[t,we.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,we.AUDIO])),...["avi"].map((t=>[t,we.AVI])),...["chm","xhs"].map((t=>[t,we.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,we.CODE])),...["csv"].map((t=>[t,we.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,we.DITA])),...["epub"].map((t=>[t,we.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,we.EXCEL])),...["flac"].map((t=>[t,we.FLAC])),...["gif"].map((t=>[t,we.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,we.GZIP])),...["html","htm","xhtml"].map((t=>[t,we.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,we.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,we.JPEG])),...["json"].map((t=>[t,we.JSON])),...["m4a","m4p"].map((t=>[t,we.M4A])),...["mov","qt"].map((t=>[t,we.MOV])),...["mp3"].map((t=>[t,we.MP3])),...["mp4","m4v"].map((t=>[t,we.MP4])),...["ogg","oga"].map((t=>[t,we.OGG])),...["pdf","ps"].map((t=>[t,we.PDF])),...["png"].map((t=>[t,we.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,we.POWERPOINT])),...["rar"].map((t=>[t,we.RAR])),...["stp"].map((t=>[t,we.STP])),...["txt","rtf","md","mdown"].map((t=>[t,we.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,we.VIDEO])),...["wav"].map((t=>[t,we.WAV])),...["wma"].map((t=>[t,we.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,we.WORD])),...["xml","xsl","rdf"].map((t=>[t,we.XML])),...["yaml","yml","x-yaml"].map((t=>[t,we.YAML])),...["zip"].map((t=>[t,we.ZIP]))]),Se=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);var ze,Oe=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.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(ze||(ze={}));const Be={size:e.FtCssVariable.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:e.FtCssVariable.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:e.FtCssVariable.extend("--ft-icon-file-format-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:e.FtCssVariable.extend("--ft-icon-material-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class Ce extends e.FtLitElement{constructor(){super(...arguments),this.variant=ze.fluid_topics}render(){return i.html`
|
|
348
362
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
349
363
|
${r.unsafeHTML(this.getIcon())}
|
|
350
364
|
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
351
365
|
</i>
|
|
352
|
-
`}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:""}getIcon(){var t,e;let o=this.textContent;return this.variant===
|
|
366
|
+
`}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:""}getIcon(){var t,e;let o=this.textContent;return this.variant===ze.file_format?null!==(t=we[o.toUpperCase()])&&void 0!==t?t:o:this.variant===ze.fluid_topics?null!==(e=$e[o.toUpperCase()])&&void 0!==e?e:o:i.nothing}}Ce.elementDefinitions={},Ce.styles=i.css`
|
|
353
367
|
:host, i.ft-icon {
|
|
354
368
|
display: inline-block;
|
|
355
|
-
width: ${
|
|
356
|
-
height: ${
|
|
369
|
+
width: ${Be.size};
|
|
370
|
+
height: ${Be.size};
|
|
357
371
|
text-align: center;
|
|
358
372
|
}
|
|
359
373
|
|
|
360
374
|
i.ft-icon {
|
|
361
|
-
font-size: ${
|
|
375
|
+
font-size: ${Be.size};
|
|
362
376
|
line-height: 1;
|
|
363
377
|
font-weight: normal;
|
|
364
378
|
text-transform: none;
|
|
@@ -372,17 +386,17 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
372
386
|
}
|
|
373
387
|
|
|
374
388
|
.ft-icon--fluid-topics {
|
|
375
|
-
font-family: ${
|
|
389
|
+
font-family: ${Be.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
376
390
|
}
|
|
377
391
|
|
|
378
392
|
.ft-icon--file-format {
|
|
379
|
-
font-family: ${
|
|
393
|
+
font-family: ${Be.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
380
394
|
}
|
|
381
395
|
|
|
382
396
|
.ft-icon--material {
|
|
383
|
-
font-family: ${
|
|
397
|
+
font-family: ${Be.materialFontFamily}, "Material Icons", sans-serif;
|
|
384
398
|
}
|
|
385
|
-
`,
|
|
399
|
+
`,Oe([o.property()],Ce.prototype,"variant",void 0),Oe([o.query("slot")],Ce.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Ce);var Ee=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 Ie=e.FtCssVariable.extend("--ft-button-color",e.designSystemVariables.colorPrimary),De={backgroundColor:e.FtCssVariable.extend("--ft-button-background-color",e.designSystemVariables.colorSurface),borderRadius:e.FtCssVariable.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusL),color:Ie,fontSize:e.FtCssVariable.extend("--ft-button-font-size",Rt.fontSize),iconSize:e.FtCssVariable.create("--ft-button-icon-size","SIZE","24px"),rippleColor:e.FtCssVariable.extend("--ft-button-ripple-color",Ie),opacityDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},Fe=e.FtCssVariable.extend("--ft-button-primary-color",e.FtCssVariable.extend("--ft-button-color",e.designSystemVariables.colorOnPrimary)),Le={backgroundColor:e.FtCssVariable.extend("--ft-button-primary-background-color",e.FtCssVariable.extend("--ft-button-background-color",e.designSystemVariables.colorPrimary)),color:Fe,rippleColor:e.FtCssVariable.extend("--ft-button-primary-ripple-color",Fe)},je=e.FtCssVariable.extend("--ft-button-dense-border-radius",e.FtCssVariable.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusM));class Me extends e.FtLitElement{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[e.noTextSelect,i.css`
|
|
386
400
|
:host {
|
|
387
401
|
display: inline-block;
|
|
388
402
|
max-width: 100%;
|
|
@@ -421,18 +435,18 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
421
435
|
border: none;
|
|
422
436
|
pointer-events: auto;
|
|
423
437
|
|
|
424
|
-
--ft-button-internal-font-size: ${
|
|
438
|
+
--ft-button-internal-font-size: ${De.fontSize};
|
|
425
439
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
426
|
-
--ft-button-internal-color: ${
|
|
427
|
-
${e.setVariable(
|
|
440
|
+
--ft-button-internal-color: ${De.color};
|
|
441
|
+
${e.setVariable(Be.size,De.iconSize)};
|
|
428
442
|
--ft-button-internal-vertical-padding: 6px;
|
|
429
443
|
--ft-button-internal-horizontal-padding: 8px;
|
|
430
|
-
${e.setVariable(
|
|
431
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
444
|
+
${e.setVariable(se.color,De.rippleColor)};
|
|
445
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${De.iconSize});
|
|
432
446
|
|
|
433
|
-
border-radius: ${
|
|
447
|
+
border-radius: ${De.borderRadius};
|
|
434
448
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
435
|
-
background-color: ${
|
|
449
|
+
background-color: ${De.backgroundColor};
|
|
436
450
|
color: var(--ft-button-internal-color);
|
|
437
451
|
-webkit-mask-image: radial-gradient(white, black);
|
|
438
452
|
}
|
|
@@ -444,7 +458,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
444
458
|
.ft-button--dense {
|
|
445
459
|
--ft-button-internal-vertical-padding: 2px;
|
|
446
460
|
--ft-button-internal-horizontal-padding: 4px;
|
|
447
|
-
border-radius: ${
|
|
461
|
+
border-radius: ${je};
|
|
448
462
|
}
|
|
449
463
|
|
|
450
464
|
.ft-button--round {
|
|
@@ -453,13 +467,13 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
453
467
|
|
|
454
468
|
.ft-button[disabled] {
|
|
455
469
|
filter: grayscale(1);
|
|
456
|
-
opacity: ${
|
|
470
|
+
opacity: ${De.opacityDisabled};
|
|
457
471
|
}
|
|
458
472
|
|
|
459
473
|
.ft-button.ft-button--primary {
|
|
460
|
-
background-color: ${
|
|
461
|
-
--ft-button-internal-color: ${
|
|
462
|
-
${e.setVariable(
|
|
474
|
+
background-color: ${Le.backgroundColor};
|
|
475
|
+
--ft-button-internal-color: ${Le.color};
|
|
476
|
+
${e.setVariable(se.color,Le.rippleColor)};
|
|
463
477
|
}
|
|
464
478
|
|
|
465
479
|
.ft-button.ft-button--outlined {
|
|
@@ -472,13 +486,14 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
472
486
|
}
|
|
473
487
|
|
|
474
488
|
.ft-button--label {
|
|
489
|
+
position: relative;
|
|
475
490
|
overflow: hidden;
|
|
476
491
|
white-space: nowrap;
|
|
477
492
|
text-overflow: ellipsis;
|
|
478
493
|
display: block;
|
|
479
494
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
480
|
-
${e.setVariable(
|
|
481
|
-
${e.setVariable(
|
|
495
|
+
${e.setVariable(Rt.fontSize,"var(--ft-button-internal-font-size)")};
|
|
496
|
+
${e.setVariable(Rt.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
482
497
|
}
|
|
483
498
|
|
|
484
499
|
.ft-button--safari-fix .ft-button--label {
|
|
@@ -497,6 +512,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
497
512
|
|
|
498
513
|
ft-icon {
|
|
499
514
|
flex-shrink: 0;
|
|
515
|
+
position: relative;
|
|
500
516
|
}
|
|
501
517
|
|
|
502
518
|
.ft-button--label[hidden] + ft-icon {
|
|
@@ -510,8 +526,8 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
510
526
|
}
|
|
511
527
|
|
|
512
528
|
ft-loader {
|
|
513
|
-
${e.setVariable(
|
|
514
|
-
${e.setVariable(
|
|
529
|
+
${e.setVariable(ye.size,De.iconSize)};
|
|
530
|
+
${e.setVariable(ye.color,"var(--ft-button-internal-color)")};
|
|
515
531
|
}
|
|
516
532
|
`]}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":e.isSafari,"ft-no-text-select":!0};return this.addTooltip(i.html`
|
|
517
533
|
<button part="button"
|
|
@@ -535,7 +551,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
535
551
|
</ft-tooltip>
|
|
536
552
|
`}resolveIcon(){return this.loading?i.html`
|
|
537
553
|
<ft-loader></ft-loader> `:this.icon?i.html`
|
|
538
|
-
<ft-icon variant="material">${this.icon}</ft-icon> `:i.nothing}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}}
|
|
554
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:i.nothing}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}}Me.elementDefinitions={"ft-ripple":pe,"ft-tooltip":xe,"ft-typography":Jt,"ft-icon":Ce,"ft-loader":me},Ee([o.property({type:Boolean})],Me.prototype,"primary",void 0),Ee([o.property({type:Boolean})],Me.prototype,"outlined",void 0),Ee([o.property({type:Boolean})],Me.prototype,"disabled",void 0),Ee([o.property({type:Boolean})],Me.prototype,"dense",void 0),Ee([o.property({type:Boolean})],Me.prototype,"round",void 0),Ee([o.property({type:String})],Me.prototype,"label",void 0),Ee([o.property({type:String})],Me.prototype,"icon",void 0),Ee([o.property({type:Boolean})],Me.prototype,"trailingIcon",void 0),Ee([o.property({type:Boolean})],Me.prototype,"loading",void 0),Ee([o.property({type:String})],Me.prototype,"tooltipPosition",void 0),Ee([o.query(".ft-button")],Me.prototype,"button",void 0),Ee([o.query(".ft-button--label slot")],Me.prototype,"slottedContent",void 0),e.customElement("ft-button")(Me);var Te=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 Ae=e.FtCssVariable.extend("--ft-checkbox-text-color",e.designSystemVariables.colorOnSurfaceHigh),Ne=e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),Pe=e.FtCssVariable.external(e.designSystemVariables.colorOnPrimary,"Design system"),Re=e.FtCssVariable.extend("--ft-checkbox-border-color",e.designSystemVariables.colorOnSurfaceMedium),_e=e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system");class Ue extends e.FtLitElement{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 i.html`
|
|
539
555
|
<label class="${n.classMap(t)}">
|
|
540
556
|
<div class="ft-checkbox--box-container">
|
|
541
557
|
<input type="checkbox"
|
|
@@ -560,14 +576,14 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
560
576
|
<slot></slot>
|
|
561
577
|
</ft-typography>
|
|
562
578
|
</label>
|
|
563
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}}
|
|
579
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}}Ue.elementDefinitions={"ft-ripple":pe,"ft-typography":Jt},Ue.styles=i.css`
|
|
564
580
|
* {
|
|
565
581
|
box-sizing: border-box;
|
|
566
582
|
}
|
|
567
583
|
|
|
568
584
|
.ft-checkbox {
|
|
569
585
|
box-sizing: border-box;
|
|
570
|
-
color: ${
|
|
586
|
+
color: ${Ae};
|
|
571
587
|
|
|
572
588
|
display: inline-flex;
|
|
573
589
|
align-items: center;
|
|
@@ -575,7 +591,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
575
591
|
}
|
|
576
592
|
|
|
577
593
|
.ft-checkbox--disabled {
|
|
578
|
-
color: ${
|
|
594
|
+
color: ${_e};
|
|
579
595
|
}
|
|
580
596
|
|
|
581
597
|
input {
|
|
@@ -598,26 +614,26 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
598
614
|
}
|
|
599
615
|
|
|
600
616
|
.ft-checkbox--box {
|
|
601
|
-
border: 2px solid ${
|
|
617
|
+
border: 2px solid ${Re};
|
|
602
618
|
border-radius: 2px;
|
|
603
619
|
|
|
604
620
|
width: 18px;
|
|
605
621
|
height: 18px;
|
|
606
622
|
|
|
607
|
-
color: ${
|
|
623
|
+
color: ${Pe};
|
|
608
624
|
}
|
|
609
625
|
|
|
610
626
|
|
|
611
627
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
612
628
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
613
|
-
border-color: ${
|
|
614
|
-
background-color: ${
|
|
629
|
+
border-color: ${Ne};
|
|
630
|
+
background-color: ${Ne};
|
|
615
631
|
}
|
|
616
632
|
|
|
617
633
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
618
|
-
border-color: ${
|
|
634
|
+
border-color: ${_e};
|
|
619
635
|
background-color: transparent;
|
|
620
|
-
color: ${
|
|
636
|
+
color: ${_e};
|
|
621
637
|
}
|
|
622
638
|
|
|
623
639
|
.ft-checkbox--checkmark {
|
|
@@ -636,7 +652,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
636
652
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
637
653
|
opacity: 1;
|
|
638
654
|
}
|
|
639
|
-
`,
|
|
655
|
+
`,Te([o.property()],Ue.prototype,"name",void 0),Te([o.property({type:Boolean})],Ue.prototype,"checked",void 0),Te([o.property({type:Boolean})],Ue.prototype,"indeterminate",void 0),Te([o.property({type:Boolean})],Ue.prototype,"disabled",void 0),Te([o.query(".ft-checkbox")],Ue.prototype,"container",void 0),Te([o.query("ft-ripple")],Ue.prototype,"ripple",void 0),e.customElement("ft-checkbox")(Ue);var Ze=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 He=e.FtCssVariable.extend("--ft-radio-text-color",e.designSystemVariables.colorOnSurfaceHigh),Ke=e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),qe=(e.FtCssVariable.external(e.designSystemVariables.colorOnPrimary,"Design system"),e.FtCssVariable.extend("--ft-radio-border-color",e.designSystemVariables.colorOnSurfaceMedium)),Ve=e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system");class We extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class Ge extends e.FtLitElement{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return i.html`
|
|
640
656
|
<div class="${n.classMap(t)}">
|
|
641
657
|
<div class="ft-radio--box-container">
|
|
642
658
|
<input id="radio-button"
|
|
@@ -661,14 +677,14 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
661
677
|
</ft-typography>
|
|
662
678
|
</label>
|
|
663
679
|
</div>
|
|
664
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
680
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new We(this.value,this.checked))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new We(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Ge.elementDefinitions={"ft-ripple":pe,"ft-typography":Jt},Ge.styles=i.css`
|
|
665
681
|
* {
|
|
666
682
|
box-sizing: border-box;
|
|
667
683
|
}
|
|
668
684
|
|
|
669
685
|
.ft-radio {
|
|
670
686
|
box-sizing: border-box;
|
|
671
|
-
color: ${
|
|
687
|
+
color: ${He};
|
|
672
688
|
|
|
673
689
|
display: inline-flex;
|
|
674
690
|
align-items: center;
|
|
@@ -676,7 +692,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
676
692
|
}
|
|
677
693
|
|
|
678
694
|
.ft-radio--disabled {
|
|
679
|
-
color: ${
|
|
695
|
+
color: ${Ve};
|
|
680
696
|
}
|
|
681
697
|
|
|
682
698
|
input {
|
|
@@ -699,7 +715,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
699
715
|
}
|
|
700
716
|
|
|
701
717
|
.ft-radio--box {
|
|
702
|
-
border: 2px solid ${
|
|
718
|
+
border: 2px solid ${qe};
|
|
703
719
|
border-radius: 50%;
|
|
704
720
|
|
|
705
721
|
display: flex;
|
|
@@ -712,7 +728,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
712
728
|
|
|
713
729
|
.ft-radio--box:after {
|
|
714
730
|
content: " ";
|
|
715
|
-
background-color: ${
|
|
731
|
+
background-color: ${Ke};
|
|
716
732
|
|
|
717
733
|
border-radius: 50%;
|
|
718
734
|
|
|
@@ -724,7 +740,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
724
740
|
}
|
|
725
741
|
|
|
726
742
|
.ft-radio--checked .ft-radio--box {
|
|
727
|
-
border-color: ${
|
|
743
|
+
border-color: ${Ke};
|
|
728
744
|
}
|
|
729
745
|
|
|
730
746
|
|
|
@@ -733,24 +749,24 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
733
749
|
}
|
|
734
750
|
|
|
735
751
|
.ft-radio--disabled .ft-radio--box {
|
|
736
|
-
border-color: ${
|
|
752
|
+
border-color: ${Ve};
|
|
737
753
|
background-color: transparent;
|
|
738
754
|
}
|
|
739
755
|
|
|
740
756
|
.ft-radio--disabled .ft-radio--box:after {
|
|
741
|
-
background-color: ${
|
|
757
|
+
background-color: ${Ve};
|
|
742
758
|
}
|
|
743
|
-
`,
|
|
759
|
+
`,Ze([o.property()],Ge.prototype,"value",void 0),Ze([o.property()],Ge.prototype,"name",void 0),Ze([o.property({type:Boolean})],Ge.prototype,"checked",void 0),Ze([o.property({type:Boolean})],Ge.prototype,"disabled",void 0),Ze([o.query(".ft-radio")],Ge.prototype,"container",void 0),Ze([o.query("ft-ripple")],Ge.prototype,"ripple",void 0),Ze([o.query("input")],Ge.prototype,"input",void 0);var Xe=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Je extends e.FtLitElement{constructor(){super(...arguments),this.name=""}render(){return i.html`
|
|
744
760
|
<slot @slotchange=${this.onSlotChange}
|
|
745
761
|
@change=${this.onChange}
|
|
746
762
|
@keydown=${this.onKeyDown}
|
|
747
763
|
@focusin=${this.onFocusIn}
|
|
748
764
|
></slot>
|
|
749
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value}))}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}onFocusIn(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}
|
|
765
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value}))}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}onFocusIn(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}Je.elementDefinitions={},Je.styles=i.css`
|
|
750
766
|
:host {
|
|
751
767
|
display: contents;
|
|
752
768
|
}
|
|
753
|
-
`,
|
|
769
|
+
`,Xe([o.property()],Je.prototype,"name",void 0),Xe([o.queryAssignedElements()],Je.prototype,"radioButtons",void 0),e.customElement("ft-radio")(Ge),e.customElement("ft-radio-group")(Je);var Ye=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 Qe={borderRadiusM:e.FtCssVariable.external(e.designSystemVariables.borderRadiusM,"Design system"),colorOutline:e.FtCssVariable.external(e.designSystemVariables.colorOutline,"Design system"),colorOnSurface:e.FtCssVariable.external(e.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:e.FtCssVariable.external(e.designSystemVariables.colorOnPrimary,"Design system"),fontFamily:e.FtCssVariable.external(Ot.fontFamily,"Body2 typography"),fontSize:e.FtCssVariable.external(Ot.fontSize,"Body2 typography"),fontWeight:e.FtCssVariable.external(Ot.fontWeight,"Body2 typography"),letterSpacing:e.FtCssVariable.external(Ot.letterSpacing,"Body2 typography"),lineHeight:e.FtCssVariable.external(Ot.lineHeight,"Body2 typography"),textTransform:e.FtCssVariable.external(Ot.textTransform,"Body2 typography")};class ti extends e.FtLitElement{constructor(){super(...arguments),this.id="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}render(){let t=this.options;this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const e=t.slice(0,this.limit);return i.html`
|
|
754
770
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
755
771
|
${null==this.parent?null:i.html`
|
|
756
772
|
<div tabindex="0"
|
|
@@ -789,7 +805,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
789
805
|
<ft-checkbox name="${this.id}"
|
|
790
806
|
.checked=${t.selected}
|
|
791
807
|
.disabled=${this.disabled}
|
|
792
|
-
.indeterminate=${
|
|
808
|
+
.indeterminate=${Yt(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}
|
|
793
809
|
@change=${e=>this.optionsChanged(e,t)}>
|
|
794
810
|
${t.label}
|
|
795
811
|
</ft-checkbox>
|
|
@@ -803,7 +819,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
803
819
|
|
|
804
820
|
${t.label}
|
|
805
821
|
</ft-radio>
|
|
806
|
-
`}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}))}}
|
|
822
|
+
`}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}))}}ti.elementDefinitions={"ft-button":Me,"ft-ripple":pe,"ft-typography":Jt,"ft-checkbox":Ue,"ft-icon":Ce,"ft-radio":Ge},ti.styles=[i.css`
|
|
807
823
|
.ft-filter-level--container {
|
|
808
824
|
display: flex;
|
|
809
825
|
flex-direction: column;
|
|
@@ -817,14 +833,14 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
817
833
|
flex-shrink: 0;
|
|
818
834
|
text-decoration: none;
|
|
819
835
|
position: relative;
|
|
820
|
-
border-radius: ${
|
|
836
|
+
border-radius: ${Qe.borderRadiusM};
|
|
821
837
|
overflow: hidden;
|
|
822
838
|
display: flex;
|
|
823
839
|
align-items: center;
|
|
824
840
|
padding: 4px 4px;
|
|
825
841
|
gap: 4px;
|
|
826
842
|
cursor: pointer;
|
|
827
|
-
color: ${
|
|
843
|
+
color: ${Qe.colorOnSurface};
|
|
828
844
|
}
|
|
829
845
|
|
|
830
846
|
.ft-filter-level--go-back:focus {
|
|
@@ -853,7 +869,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
853
869
|
}
|
|
854
870
|
|
|
855
871
|
ft-button {
|
|
856
|
-
${e.setVariable(
|
|
872
|
+
${e.setVariable(De.color,Qe.colorOnSurface)};
|
|
857
873
|
}
|
|
858
874
|
|
|
859
875
|
ft-radio, ft-checkbox {
|
|
@@ -864,7 +880,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
864
880
|
margin-left: -10px;
|
|
865
881
|
word-break: break-word;
|
|
866
882
|
}
|
|
867
|
-
`],
|
|
883
|
+
`],Ye([o.property({type:String})],ti.prototype,"id",void 0),Ye([o.property({type:Object})],ti.prototype,"parent",void 0),Ye([o.property({type:Array})],ti.prototype,"options",void 0),Ye([o.property({type:Boolean})],ti.prototype,"multivalued",void 0),Ye([o.property({type:Boolean})],ti.prototype,"disabled",void 0),Ye([o.property({type:Boolean})],ti.prototype,"hideSelectedOptions",void 0),Ye([o.property({type:Boolean})],ti.prototype,"preventNavigation",void 0),Ye([o.property({type:String})],ti.prototype,"filter",void 0),Ye([o.property({type:String})],ti.prototype,"moreValuesButtonLabel",void 0),Ye([o.property({type:Number})],ti.prototype,"displayedValuesLimit",void 0),Ye([o.query(".ft-filter-level--container")],ti.prototype,"container",void 0),Ye([o.state()],ti.prototype,"displayedPages",void 0);var ei=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 ii={buttonsColor:e.FtCssVariable.extend("--ft-snap-scroll-buttons-color",e.designSystemVariables.colorPrimary),buttonsZIndex:e.FtCssVariable.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:e.FtCssVariable.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system")};class oi extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class si extends e.FtLitElement{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new e.Debouncer(200),this.updateScrollDebouncer=new e.Debouncer(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,i=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<i||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=n.classMap({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":e.isSafari}),o=this.controls&&this.withScroll;return i.html`
|
|
868
884
|
<div part="container" class="${t}">
|
|
869
885
|
<ft-button
|
|
870
886
|
class="ft-snap-scroll--previous"
|
|
@@ -888,7 +904,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
888
904
|
@click=${this.next}
|
|
889
905
|
></ft-button>
|
|
890
906
|
</div>
|
|
891
|
-
`}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
|
|
907
|
+
`}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 oi(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)}}si.elementDefinitions={"ft-button":Me},si.styles=i.css`
|
|
892
908
|
.ft-snap-scroll {
|
|
893
909
|
box-sizing: border-box;
|
|
894
910
|
position: relative;
|
|
@@ -923,7 +939,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
923
939
|
flex-wrap: nowrap;
|
|
924
940
|
align-items: flex-start;
|
|
925
941
|
justify-content: flex-start;
|
|
926
|
-
gap: ${
|
|
942
|
+
gap: ${ii.gap};
|
|
927
943
|
}
|
|
928
944
|
|
|
929
945
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -966,11 +982,11 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
966
982
|
.ft-snap-scroll--next {
|
|
967
983
|
position: absolute;
|
|
968
984
|
display: flex;
|
|
969
|
-
z-index: ${
|
|
985
|
+
z-index: ${ii.buttonsZIndex};
|
|
970
986
|
opacity: 1;
|
|
971
987
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
972
|
-
${e.setVariable(
|
|
973
|
-
${e.setVariable(
|
|
988
|
+
${e.setVariable(De.backgroundColor,"transparent")};
|
|
989
|
+
${e.setVariable(De.color,ii.buttonsColor)};
|
|
974
990
|
}
|
|
975
991
|
|
|
976
992
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -983,37 +999,37 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
983
999
|
top: 0;
|
|
984
1000
|
left: -1px;
|
|
985
1001
|
bottom: 0;
|
|
986
|
-
background: linear-gradient(to right, ${
|
|
1002
|
+
background: linear-gradient(to right, ${ii.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
987
1003
|
}
|
|
988
1004
|
|
|
989
1005
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
990
1006
|
top: -1px;
|
|
991
1007
|
left: 0;
|
|
992
1008
|
right: 0;
|
|
993
|
-
background: linear-gradient(to bottom, ${
|
|
1009
|
+
background: linear-gradient(to bottom, ${ii.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
994
1010
|
}
|
|
995
1011
|
|
|
996
1012
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
997
1013
|
top: 0;
|
|
998
1014
|
right: -1px;
|
|
999
1015
|
bottom: 0;
|
|
1000
|
-
background: linear-gradient(to left, ${
|
|
1016
|
+
background: linear-gradient(to left, ${ii.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1001
1017
|
}
|
|
1002
1018
|
|
|
1003
1019
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1004
1020
|
left: 0;
|
|
1005
1021
|
right: 0;
|
|
1006
1022
|
bottom: -1px;
|
|
1007
|
-
background: linear-gradient(to top, ${
|
|
1023
|
+
background: linear-gradient(to top, ${ii.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1008
1024
|
}
|
|
1009
1025
|
|
|
1010
1026
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1011
1027
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1012
1028
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1013
1029
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1014
|
-
background-color: ${
|
|
1030
|
+
background-color: ${ii.colorSurface};
|
|
1015
1031
|
}
|
|
1016
|
-
`,
|
|
1032
|
+
`,ei([o.property({type:Boolean})],si.prototype,"horizontal",void 0),ei([o.property({type:Boolean})],si.prototype,"hideScrollbar",void 0),ei([o.property({type:Boolean})],si.prototype,"controls",void 0),ei([o.property({type:Boolean})],si.prototype,"limitSize",void 0),ei([o.state()],si.prototype,"elements",void 0),ei([o.state()],si.prototype,"currentElement",void 0),ei([o.state()],si.prototype,"withScroll",void 0),ei([o.state()],si.prototype,"startReached",void 0),ei([o.state()],si.prototype,"endReached",void 0),ei([o.query(".ft-snap-scroll--content")],si.prototype,"contentSlot",void 0),e.customElement("ft-snap-scroll")(si);var ni=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 ri=e.FtCssVariable.external(e.designSystemVariables.colorOutline,"Design system"),li=e.FtCssVariable.external(e.designSystemVariables.colorOnSurface,"Design system"),ai=e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),ci=e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),hi=e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system"),pi=e.FtCssVariable.external(e.designSystemVariables.transitionDuration,"Design system"),fi=e.FtCssVariable.external(e.designSystemVariables.transitionTimingFunction,"Design system");class di extends CustomEvent{constructor(t){super("change",{detail:t})}}class ui extends e.FtLitElement{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new e.Debouncer(300),this.changeDebouncer=new e.Debouncer(10)}get flatOptions(){return Yt(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}render(){var t,e;const o=this.flatOptions.some((t=>t.selected));let s=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e;return i.html`
|
|
1017
1033
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1018
1034
|
part="container">
|
|
1019
1035
|
${this.label||o?i.html`
|
|
@@ -1078,7 +1094,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1078
1094
|
@display-level=${this.onDisplayLevel}
|
|
1079
1095
|
part="values"
|
|
1080
1096
|
></ft-filter-level>
|
|
1081
|
-
`}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
|
|
1097
|
+
`}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 di(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(t){const e=t.composedPath()[0];this.filter=e.value}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}ui.elementDefinitions={"ft-button":Me,"ft-filter-level":ti,"ft-snap-scroll":si,"ft-typography":Jt},ui.styles=[Vt,i.css`
|
|
1082
1098
|
:host {
|
|
1083
1099
|
display: flex;
|
|
1084
1100
|
max-height: 100%;
|
|
@@ -1091,8 +1107,8 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1091
1107
|
flex-direction: column;
|
|
1092
1108
|
max-height: 100%;
|
|
1093
1109
|
max-width: 100%;
|
|
1094
|
-
color: ${
|
|
1095
|
-
background: ${
|
|
1110
|
+
color: ${li};
|
|
1111
|
+
background: ${hi};
|
|
1096
1112
|
}
|
|
1097
1113
|
|
|
1098
1114
|
.ft-filter--header {
|
|
@@ -1102,13 +1118,13 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1102
1118
|
flex-shrink: 0;
|
|
1103
1119
|
padding: 0 10px;
|
|
1104
1120
|
margin-bottom: 8px;
|
|
1105
|
-
${e.setVariable(
|
|
1121
|
+
${e.setVariable(tt.fontSize,"14px")};
|
|
1106
1122
|
}
|
|
1107
1123
|
|
|
1108
1124
|
.ft-filter--header ft-button {
|
|
1109
1125
|
flex-shrink: 0;
|
|
1110
1126
|
margin-left: auto;
|
|
1111
|
-
${e.setVariable(
|
|
1127
|
+
${e.setVariable(De.iconSize,"18px")};
|
|
1112
1128
|
}
|
|
1113
1129
|
|
|
1114
1130
|
.ft-filter--label {
|
|
@@ -1116,8 +1132,8 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1116
1132
|
flex-shrink: 1;
|
|
1117
1133
|
flex-grow: 1;
|
|
1118
1134
|
word-break: break-word;
|
|
1119
|
-
${e.setVariable(
|
|
1120
|
-
${e.setVariable(
|
|
1135
|
+
${e.setVariable(tt.lineHeight,"22px")};
|
|
1136
|
+
${e.setVariable(tt.fontWeight,"bold")};
|
|
1121
1137
|
}
|
|
1122
1138
|
|
|
1123
1139
|
.ft-filter--filter {
|
|
@@ -1128,8 +1144,8 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1128
1144
|
padding: 0 10px;
|
|
1129
1145
|
overflow: hidden;
|
|
1130
1146
|
height: 32px;
|
|
1131
|
-
transition: height ${
|
|
1132
|
-
margin ${
|
|
1147
|
+
transition: height ${pi} ${fi},
|
|
1148
|
+
margin ${pi} ${fi};
|
|
1133
1149
|
transition-delay: 500ms;
|
|
1134
1150
|
}
|
|
1135
1151
|
|
|
@@ -1142,11 +1158,11 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1142
1158
|
display: block;
|
|
1143
1159
|
width: 100%;
|
|
1144
1160
|
border-radius: 4px;
|
|
1145
|
-
border: 1px solid ${
|
|
1161
|
+
border: 1px solid ${ri};
|
|
1146
1162
|
padding: 4px;
|
|
1147
|
-
background-color: ${
|
|
1148
|
-
color: ${
|
|
1149
|
-
outline-color: ${
|
|
1163
|
+
background-color: ${hi};
|
|
1164
|
+
color: ${ai};
|
|
1165
|
+
outline-color: ${ci};
|
|
1150
1166
|
}
|
|
1151
1167
|
|
|
1152
1168
|
.ft-filter--values {
|
|
@@ -1158,7 +1174,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1158
1174
|
}
|
|
1159
1175
|
|
|
1160
1176
|
.ft-filter--separator {
|
|
1161
|
-
border-top: 1px solid ${
|
|
1177
|
+
border-top: 1px solid ${ri};
|
|
1162
1178
|
margin: 4px 10px;
|
|
1163
1179
|
}
|
|
1164
1180
|
|
|
@@ -1183,17 +1199,17 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1183
1199
|
slot {
|
|
1184
1200
|
display: none;
|
|
1185
1201
|
}
|
|
1186
|
-
`],
|
|
1202
|
+
`],ni([o.property({type:String})],ui.prototype,"id",void 0),ni([o.property({type:String})],ui.prototype,"label",void 0),ni([o.property({type:String})],ui.prototype,"filterPlaceHolder",void 0),ni([o.property({type:String})],ui.prototype,"clearButtonLabel",void 0),ni([o.property({type:String})],ui.prototype,"moreValuesButtonLabel",void 0),ni([e.jsonProperty([])],ui.prototype,"options",void 0),ni([o.property({type:Boolean})],ui.prototype,"multivalued",void 0),ni([o.property({type:Boolean})],ui.prototype,"disabled",void 0),ni([o.property({type:Boolean})],ui.prototype,"raiseSelectedOptions",void 0),ni([o.property({type:Number})],ui.prototype,"displayedValuesLimit",void 0),ni([o.query(".ft-filter--slot")],ui.prototype,"slotElement",void 0),ni([o.query(".ft-filter--container")],ui.prototype,"container",void 0),ni([o.query(".ft-filter--values")],ui.prototype,"valuesContainer",void 0),ni([o.query(".ft-filter--levels")],ui.prototype,"levelsContainer",void 0),ni([o.query(".ft-filter--levels ft-filter-level:last-child")],ui.prototype,"lastLevel",void 0),ni([o.queryAll(".ft-filter--levels ft-filter-level")],ui.prototype,"levels",void 0),ni([o.state()],ui.prototype,"withScroll",void 0),ni([o.state()],ui.prototype,"filter",void 0),ni([o.state()],ui.prototype,"slideIn",void 0),ni([o.state()],ui.prototype,"slideOut",void 0);var bi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class vi extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return i.html`
|
|
1187
1203
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1188
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}
|
|
1204
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}vi.elementDefinitions={},bi([o.property({type:String})],vi.prototype,"label",void 0),bi([o.property({type:Object,converter:t=>t})],vi.prototype,"value",void 0),bi([o.property({type:Boolean,reflect:!0})],vi.prototype,"selected",void 0),bi([o.property({type:Object})],vi.prototype,"subOptions",void 0),bi([o.query(".ft-filter-option--slot")],vi.prototype,"slotElement",void 0),e.customElement("ft-filter")(ui),e.customElement("ft-filter-option")(vi);var gi=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 xi extends e.FtLitElement{constructor(){super(...arguments),this.multi=!1}render(){return i.html`
|
|
1189
1205
|
<div class="ft-accordion">
|
|
1190
1206
|
<slot @activated=${this.onChange}></slot>
|
|
1191
1207
|
</div>
|
|
1192
|
-
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}
|
|
1208
|
+
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}xi.elementDefinitions={},xi.styles=i.css`
|
|
1193
1209
|
.ft-accordion {
|
|
1194
1210
|
box-sizing: border-box;
|
|
1195
1211
|
}
|
|
1196
|
-
`,
|
|
1212
|
+
`,gi([o.property({type:Boolean})],xi.prototype,"multi",void 0),gi([o.query("slot")],xi.prototype,"content",void 0);var yi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const mi=e.FtCssVariable.create("--ft-accordion-toggle-horizontal-spacing","SIZE","16px"),$i=e.FtCssVariable.create("--ft-accordion-toggle-vertical-spacing","SIZE","16px"),wi=e.FtCssVariable.external(e.designSystemVariables.colorOutline,"Design system");class ki extends e.FtLitElement{constructor(){super(...arguments),this.icon="",this.label="",this.active=!1}render(){return i.html`
|
|
1197
1213
|
<div class="ft-accordion-item ${this.active?"ft-accordion-item--active":""}">
|
|
1198
1214
|
<div class="ft-accordion-item--toggle"
|
|
1199
1215
|
part="toggle"
|
|
@@ -1217,7 +1233,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1217
1233
|
</div>
|
|
1218
1234
|
<div class="ft-accordion-item--separator" part="separator"></div>
|
|
1219
1235
|
</div>
|
|
1220
|
-
`}update(t){super.update(t),t.has("active")&&this.active&&this.dispatchEvent(new Event("activated",{composed:!0,bubbles:!0}))}onToggleKeyDown(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.active=!this.active)}}
|
|
1236
|
+
`}update(t){super.update(t),t.has("active")&&this.active&&this.dispatchEvent(new Event("activated",{composed:!0,bubbles:!0}))}onToggleKeyDown(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.active=!this.active)}}ki.elementDefinitions={"ft-ripple":pe,"ft-typography":Jt,"ft-icon":Ce},ki.styles=i.css`
|
|
1221
1237
|
.ft-accordion-item {
|
|
1222
1238
|
display: flex;
|
|
1223
1239
|
flex-direction: column;
|
|
@@ -1230,11 +1246,15 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1230
1246
|
display: flex;
|
|
1231
1247
|
align-items: center;
|
|
1232
1248
|
cursor: pointer;
|
|
1233
|
-
padding: ${
|
|
1234
|
-
gap: calc(${
|
|
1249
|
+
padding: ${$i} ${mi};
|
|
1250
|
+
gap: calc(${mi} / 2);
|
|
1235
1251
|
outline: none;
|
|
1236
1252
|
}
|
|
1237
1253
|
|
|
1254
|
+
.ft-accordion-item--toggle > *:not(ft-ripple) {
|
|
1255
|
+
position: relative;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1238
1258
|
.ft-accordion-item--label {
|
|
1239
1259
|
flex-grow: 1;
|
|
1240
1260
|
flex-shrink: 1;
|
|
@@ -1252,13 +1272,13 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1252
1272
|
.ft-accordion-item--active .ft-accordion-item--content {
|
|
1253
1273
|
height: initial;
|
|
1254
1274
|
overflow: visible;
|
|
1255
|
-
padding: ${
|
|
1275
|
+
padding: ${$i} ${mi};
|
|
1256
1276
|
}
|
|
1257
1277
|
|
|
1258
1278
|
.ft-accordion-item--separator {
|
|
1259
|
-
border-bottom: 1px solid ${
|
|
1279
|
+
border-bottom: 1px solid ${wi};
|
|
1260
1280
|
}
|
|
1261
|
-
`,
|
|
1281
|
+
`,yi([o.property({type:String})],ki.prototype,"icon",void 0),yi([o.property({type:String})],ki.prototype,"label",void 0),yi([o.property({type:Boolean,reflect:!0})],ki.prototype,"active",void 0),e.customElement("ft-accordion")(xi),e.customElement("ft-accordion-item")(ki);var Si=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const zi=e.FtCssVariable.extend("--ft-chip-color",e.designSystemVariables.colorOnSurface),Oi={backgroundColor:e.FtCssVariable.extend("--ft-chip-background-color",e.designSystemVariables.colorSurface),color:zi,fontSize:e.FtCssVariable.extend("--ft-chip-font-size",Ot.fontSize),iconSize:e.FtCssVariable.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:e.FtCssVariable.extend("--ft-chip-ripple-color",zi),horizontalPadding:e.FtCssVariable.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:e.FtCssVariable.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:e.FtCssVariable.external(e.designSystemVariables.colorOutline,"Design system"),opacityDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},Bi=e.FtCssVariable.extend("--ft-chip-highlighted-color",e.FtCssVariable.extend("--ft-chip-color",e.designSystemVariables.colorOnPrimary)),Ci={backgroundColor:e.FtCssVariable.extend("--ft-chip-highlighted-background-color",e.FtCssVariable.extend("--ft-chip-background-color",e.designSystemVariables.colorPrimary)),color:Bi,rippleColor:e.FtCssVariable.extend("--ft-chip-highlighted-ripple-color",Bi)},Ei=e.FtCssVariable.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),Ii=e.FtCssVariable.create("--ft-chip-dense-vertical-padding","SIZE","4px");class Di extends CustomEvent{constructor(){super("icon-click")}}class Fi extends e.FtLitElement{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[e.noTextSelect,i.css`
|
|
1262
1282
|
:host {
|
|
1263
1283
|
display: inline-block;
|
|
1264
1284
|
max-width: 100%;
|
|
@@ -1275,27 +1295,31 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1275
1295
|
box-sizing: border-box;
|
|
1276
1296
|
pointer-events: auto;
|
|
1277
1297
|
|
|
1278
|
-
--ft-chip-internal-font-size: ${
|
|
1298
|
+
--ft-chip-internal-font-size: ${Oi.fontSize};
|
|
1279
1299
|
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1280
|
-
${e.setVariable(
|
|
1281
|
-
--ft-chip-internal-vertical-padding: ${
|
|
1282
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
1300
|
+
${e.setVariable(Be.size,Oi.iconSize)};
|
|
1301
|
+
--ft-chip-internal-vertical-padding: ${Oi.verticalPadding};
|
|
1302
|
+
--ft-chip-internal-horizontal-padding: ${Oi.horizontalPadding};
|
|
1283
1303
|
--ft-chip-internal-icon-padding: 3px;
|
|
1284
|
-
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${
|
|
1304
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${Oi.iconSize});
|
|
1285
1305
|
|
|
1286
|
-
border: 1px solid ${
|
|
1287
|
-
color: ${
|
|
1288
|
-
${e.setVariable(
|
|
1306
|
+
border: 1px solid ${Oi.colorOutline};
|
|
1307
|
+
color: ${Oi.color};
|
|
1308
|
+
${e.setVariable(se.color,Oi.rippleColor)};
|
|
1289
1309
|
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
1290
1310
|
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
1291
|
-
background-color: ${
|
|
1311
|
+
background-color: ${Oi.backgroundColor};
|
|
1292
1312
|
line-height: var(--ft-chip-internal-content-height);
|
|
1293
1313
|
}
|
|
1294
1314
|
|
|
1315
|
+
.ft-chip > *:not(ft-ripple) {
|
|
1316
|
+
position: relative;
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1295
1319
|
.ft-chip--dense {
|
|
1296
1320
|
--ft-chip-internal-icon-padding: 3px;
|
|
1297
|
-
--ft-chip-internal-vertical-padding: ${
|
|
1298
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
1321
|
+
--ft-chip-internal-vertical-padding: ${Ii};
|
|
1322
|
+
--ft-chip-internal-horizontal-padding: ${Ei};
|
|
1299
1323
|
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1300
1324
|
}
|
|
1301
1325
|
|
|
@@ -1307,15 +1331,15 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1307
1331
|
cursor: default;
|
|
1308
1332
|
pointer-events: none;
|
|
1309
1333
|
filter: grayscale(1);
|
|
1310
|
-
opacity: ${
|
|
1334
|
+
opacity: ${Oi.opacityDisabled};
|
|
1311
1335
|
}
|
|
1312
1336
|
|
|
1313
1337
|
.ft-chip--highlighted {
|
|
1314
1338
|
border: none;
|
|
1315
1339
|
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
1316
|
-
background-color: ${
|
|
1317
|
-
${e.setVariable(
|
|
1318
|
-
color: ${
|
|
1340
|
+
background-color: ${Ci.backgroundColor};
|
|
1341
|
+
${e.setVariable(se.color,Ci.rippleColor)};
|
|
1342
|
+
color: ${Ci.color};
|
|
1319
1343
|
}
|
|
1320
1344
|
|
|
1321
1345
|
.ft-chip--clickable {
|
|
@@ -1340,12 +1364,16 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1340
1364
|
margin: calc((-1) * var(--ft-chip-internal-icon-padding));
|
|
1341
1365
|
}
|
|
1342
1366
|
|
|
1367
|
+
.ft-chip--icon-container > *:not(ft-ripple) {
|
|
1368
|
+
position: relative;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1343
1371
|
.ft-chip--label {
|
|
1344
1372
|
vertical-align: bottom;
|
|
1345
1373
|
display: block;
|
|
1346
1374
|
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
1347
|
-
${e.setVariable(
|
|
1348
|
-
${e.setVariable(
|
|
1375
|
+
${e.setVariable(Ot.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
1376
|
+
${e.setVariable(Ot.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
1349
1377
|
}
|
|
1350
1378
|
|
|
1351
1379
|
.ft-chip--safari-fix .ft-chip--label {
|
|
@@ -1399,7 +1427,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1399
1427
|
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
1400
1428
|
<ft-icon variant="material">${this.internalIcon}</ft-icon>
|
|
1401
1429
|
</div>
|
|
1402
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new
|
|
1430
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Di))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Di))}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)}}Fi.elementDefinitions={"ft-ripple":pe,"ft-typography":Jt,"ft-icon":Ce},Si([o.property({type:Boolean})],Fi.prototype,"highlighted",void 0),Si([o.property({type:Boolean})],Fi.prototype,"removable",void 0),Si([o.property({type:Boolean})],Fi.prototype,"disabled",void 0),Si([o.property({type:Boolean})],Fi.prototype,"clickable",void 0),Si([o.property({type:Boolean})],Fi.prototype,"iconClickable",void 0),Si([o.property({type:Boolean})],Fi.prototype,"dense",void 0),Si([o.property({type:Boolean})],Fi.prototype,"multiLine",void 0),Si([o.property({type:String})],Fi.prototype,"label",void 0),Si([o.property({type:String})],Fi.prototype,"icon",void 0),Si([o.property({type:Boolean})],Fi.prototype,"trailingIcon",void 0),Si([o.query("ft-typography slot")],Fi.prototype,"slottedContent",void 0),e.customElement("ft-chip")(Fi);var Li=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 ji={fontSize:e.FtCssVariable.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:e.FtCssVariable.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:e.FtCssVariable.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:e.FtCssVariable.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariable.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:e.FtCssVariable.extend("--ft-input-label-border-color",e.designSystemVariables.colorOutline),textColor:e.FtCssVariable.extend("--ft-input-label-text-color",e.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:e.FtCssVariable.extend("--ft-input-label-disabled-text-color",e.designSystemVariables.colorOnSurfaceDisabled),colorSurface:e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system"),borderRadiusS:e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariable.external(e.designSystemVariables.colorError,"Design system")};class Mi extends e.FtLitElement{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 i.html`
|
|
1403
1431
|
<div class="${n.classMap(t)}">
|
|
1404
1432
|
${this.text?i.html`
|
|
1405
1433
|
<div class="ft-input-label--text ft-typography--caption">
|
|
@@ -1408,7 +1436,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1408
1436
|
</div>
|
|
1409
1437
|
`:null}
|
|
1410
1438
|
</div>
|
|
1411
|
-
`}}
|
|
1439
|
+
`}}Mi.elementDefinitions={},Mi.styles=[Vt,i.css`
|
|
1412
1440
|
.ft-input-label {
|
|
1413
1441
|
position: absolute;
|
|
1414
1442
|
inset: 0;
|
|
@@ -1416,7 +1444,11 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1416
1444
|
}
|
|
1417
1445
|
|
|
1418
1446
|
.ft-input-label {
|
|
1419
|
-
border-color: ${
|
|
1447
|
+
border-color: ${ji.borderColor};
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
.ft-input-label.ft-input-label--in-error {
|
|
1451
|
+
border-color: ${ji.colorError}
|
|
1420
1452
|
}
|
|
1421
1453
|
|
|
1422
1454
|
.ft-input-label:before,
|
|
@@ -1429,7 +1461,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1429
1461
|
}
|
|
1430
1462
|
|
|
1431
1463
|
.ft-input-label:before {
|
|
1432
|
-
width: ${
|
|
1464
|
+
width: ${ji.horizontalSpacing};
|
|
1433
1465
|
flex-shrink: 0;
|
|
1434
1466
|
}
|
|
1435
1467
|
|
|
@@ -1445,14 +1477,18 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1445
1477
|
border-bottom-width: 1px;
|
|
1446
1478
|
border-bottom-style: solid;
|
|
1447
1479
|
border-color: inherit;
|
|
1448
|
-
color: ${
|
|
1480
|
+
color: ${ji.textColor};
|
|
1449
1481
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
1450
|
-
${e.setVariable(
|
|
1451
|
-
${e.setVariable(
|
|
1482
|
+
${e.setVariable(Bt.fontSize,ji.fontSize)};
|
|
1483
|
+
${e.setVariable(Bt.lineHeight,ji.fontSize)};
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
.ft-input-label--in-error .ft-input-label--text {
|
|
1487
|
+
color: ${ji.colorError}
|
|
1452
1488
|
}
|
|
1453
1489
|
|
|
1454
1490
|
.ft-input-label--disabled .ft-input-label--text {
|
|
1455
|
-
color: ${
|
|
1491
|
+
color: ${ji.disabledTextColor};
|
|
1456
1492
|
}
|
|
1457
1493
|
|
|
1458
1494
|
.ft-input-label--hidden-text {
|
|
@@ -1468,17 +1504,17 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1468
1504
|
overflow: hidden;
|
|
1469
1505
|
white-space: nowrap;
|
|
1470
1506
|
text-overflow: ellipsis;
|
|
1471
|
-
padding: ${
|
|
1472
|
-
margin: calc(${
|
|
1507
|
+
padding: ${ji.verticalSpacing} 4px;
|
|
1508
|
+
margin: calc(${ji.verticalSpacing} * -1) 0;
|
|
1473
1509
|
}
|
|
1474
1510
|
|
|
1475
1511
|
.ft-input-label--raised .ft-input-label--text {
|
|
1476
|
-
${e.setVariable(
|
|
1477
|
-
${e.setVariable(
|
|
1512
|
+
${e.setVariable(Bt.fontSize,ji.raisedFontSize)};
|
|
1513
|
+
${e.setVariable(Bt.lineHeight,ji.raisedFontSize)};
|
|
1478
1514
|
}
|
|
1479
1515
|
|
|
1480
1516
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
1481
|
-
top: ${
|
|
1517
|
+
top: ${ji.verticalSpacing};
|
|
1482
1518
|
}
|
|
1483
1519
|
|
|
1484
1520
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -1491,27 +1527,27 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1491
1527
|
.ft-input-label--outlined:before {
|
|
1492
1528
|
border-left-width: 1px;
|
|
1493
1529
|
border-left-style: solid;
|
|
1494
|
-
border-radius: ${
|
|
1530
|
+
border-radius: ${ji.borderRadiusS} 0 0 ${ji.borderRadiusS};
|
|
1495
1531
|
}
|
|
1496
1532
|
|
|
1497
1533
|
.ft-input-label--outlined:after {
|
|
1498
1534
|
border-right-width: 1px;
|
|
1499
1535
|
border-right-style: solid;
|
|
1500
|
-
border-radius: 0 ${
|
|
1536
|
+
border-radius: 0 ${ji.borderRadiusS} ${ji.borderRadiusS} 0;
|
|
1501
1537
|
}
|
|
1502
1538
|
|
|
1503
1539
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
1504
1540
|
padding: 2px 4px;
|
|
1505
|
-
z-index: ${
|
|
1506
|
-
background-color: ${
|
|
1507
|
-
border-radius: ${
|
|
1541
|
+
z-index: ${ji.raisedZIndex};
|
|
1542
|
+
background-color: ${ji.colorSurface};
|
|
1543
|
+
border-radius: ${ji.borderRadiusS};
|
|
1508
1544
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
1509
1545
|
}
|
|
1510
1546
|
|
|
1511
1547
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
1512
1548
|
border-top: none;
|
|
1513
1549
|
}
|
|
1514
|
-
`],
|
|
1550
|
+
`],Li([o.property({type:String})],Mi.prototype,"text",void 0),Li([o.property({type:Boolean})],Mi.prototype,"raised",void 0),Li([o.property({type:Boolean})],Mi.prototype,"outlined",void 0),Li([o.property({type:Boolean})],Mi.prototype,"disabled",void 0),Li([o.property({type:Boolean})],Mi.prototype,"error",void 0),e.customElement("ft-input-label")(Mi);var Ti=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 Ai extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return i.html``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Ai.elementDefinitions={},Ti([o.property({type:String})],Ai.prototype,"label",void 0),Ti([o.property({type:Object,converter:t=>t})],Ai.prototype,"value",void 0),Ti([o.property({type:Boolean,reflect:!0})],Ai.prototype,"selected",void 0);const Ni={labelSize:e.FtCssVariable.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:e.FtCssVariable.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:e.FtCssVariable.create("--ft-select-vertical-spacing","SIZE","4px"),selectedOptionColor:e.FtCssVariable.extend("--ft-select-selected-option-color",e.designSystemVariables.colorOnSurface),helperColor:e.FtCssVariable.extend("--ft-select-helper-color",e.designSystemVariables.colorOnSurfaceMedium),optionsColor:e.FtCssVariable.extend("--ft-select-options-color",e.designSystemVariables.colorOnSurface),optionsZIndex:e.FtCssVariable.create("--ft-select-options-z-index","NUMBER","3"),colorSurface:e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),borderRadiusS:e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system"),elevation02:e.FtCssVariable.external(e.designSystemVariables.elevation02,"Design system"),colorError:e.FtCssVariable.external(e.designSystemVariables.colorError,"Design system")};class Pi extends e.FtLitElement{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,o,r,l;let a=this.hasOptionsMenuOpen,c=this.disabled||!this.hasOptions;const h=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(o=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==o?o:"").length>0,p={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":c,"ft-select--options-displayed":a,"ft-select--has-option-selected":h,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return i.html`
|
|
1515
1551
|
<div class="${n.classMap(p)}" part="container">
|
|
1516
1552
|
<div class="ft-select--main-panel" part="main-panel">
|
|
1517
1553
|
<ft-input-label text="${this.label}"
|
|
@@ -1519,6 +1555,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1519
1555
|
?disabled=${c}
|
|
1520
1556
|
?outlined=${this.outlined}
|
|
1521
1557
|
?raised=${h||a}
|
|
1558
|
+
?error=${this.error}
|
|
1522
1559
|
></ft-input-label>
|
|
1523
1560
|
<div class="ft-select--input-panel"
|
|
1524
1561
|
part="selected-value"
|
|
@@ -1557,7 +1594,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1557
1594
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
1558
1595
|
${t.label}
|
|
1559
1596
|
</div>
|
|
1560
|
-
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,n;let r;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),r=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),r=null!==(n=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstOption}null==r||r.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}
|
|
1597
|
+
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value}))),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.minWidth=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,n;let r;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),r=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),r=null!==(n=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstOption}null==r||r.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Pi.elementDefinitions={"ft-input-label":Mi,"ft-typography":Jt,"ft-ripple":pe,"ft-icon":Ce},Pi.styles=[qt,Vt,i.css`
|
|
1561
1598
|
*:focus {
|
|
1562
1599
|
outline: none;
|
|
1563
1600
|
}
|
|
@@ -1571,7 +1608,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1571
1608
|
.ft-select--main-panel {
|
|
1572
1609
|
position: relative;
|
|
1573
1610
|
display: flex;
|
|
1574
|
-
height: calc(4 * ${
|
|
1611
|
+
height: calc(4 * ${Ni.verticalSpacing} + ${Ni.labelSize} + ${Ni.selectedOptionSize});
|
|
1575
1612
|
}
|
|
1576
1613
|
|
|
1577
1614
|
.ft-select--input-panel {
|
|
@@ -1583,19 +1620,24 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1583
1620
|
padding-left: 16px;
|
|
1584
1621
|
padding-right: 8px;
|
|
1585
1622
|
gap: 8px;
|
|
1586
|
-
color: ${
|
|
1587
|
-
${e.setVariable(
|
|
1623
|
+
color: ${Ni.selectedOptionColor};
|
|
1624
|
+
${e.setVariable(se.color,Ni.selectedOptionColor)};
|
|
1588
1625
|
}
|
|
1589
1626
|
|
|
1590
1627
|
.ft-select--input-panel,
|
|
1591
1628
|
.ft-select--option {
|
|
1592
|
-
${e.setVariable(
|
|
1593
|
-
${e.setVariable(
|
|
1629
|
+
${e.setVariable(se.opacityContentOnSurfaceHover,"0.08")};
|
|
1630
|
+
${e.setVariable(se.opacityContentOnSurfacePressed,"0.04")};
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
.ft-select--input-panel > *:not(ft-ripple),
|
|
1634
|
+
.ft-select--option > *:not(ft-ripple) {
|
|
1635
|
+
position: relative;
|
|
1594
1636
|
}
|
|
1595
1637
|
|
|
1596
1638
|
.ft-select--disabled .ft-select--input-panel,
|
|
1597
1639
|
.ft-select--disabled .ft-select--option {
|
|
1598
|
-
color: ${
|
|
1640
|
+
color: ${Ni.colorOnSurfaceDisabled};
|
|
1599
1641
|
}
|
|
1600
1642
|
|
|
1601
1643
|
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
@@ -1604,18 +1646,18 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1604
1646
|
}
|
|
1605
1647
|
|
|
1606
1648
|
ft-input-label {
|
|
1607
|
-
${e.setVariable(
|
|
1608
|
-
${e.setVariable(
|
|
1609
|
-
${e.setVariable(
|
|
1649
|
+
${e.setVariable(ji.fontSize,Ni.selectedOptionSize)};
|
|
1650
|
+
${e.setVariable(ji.raisedFontSize,Ni.labelSize)};
|
|
1651
|
+
${e.setVariable(ji.verticalSpacing,Ni.verticalSpacing)};
|
|
1610
1652
|
}
|
|
1611
1653
|
|
|
1612
1654
|
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
1613
|
-
color: ${
|
|
1655
|
+
color: ${Ni.colorPrimary};
|
|
1614
1656
|
}
|
|
1615
1657
|
|
|
1616
1658
|
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
1617
|
-
${e.setVariable(
|
|
1618
|
-
${e.setVariable(
|
|
1659
|
+
${e.setVariable(ji.borderColor,Ni.colorPrimary)};
|
|
1660
|
+
${e.setVariable(ji.textColor,Ni.colorPrimary)};
|
|
1619
1661
|
}
|
|
1620
1662
|
|
|
1621
1663
|
.ft-select--selected-option {
|
|
@@ -1625,8 +1667,12 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1625
1667
|
overflow: hidden;
|
|
1626
1668
|
white-space: nowrap;
|
|
1627
1669
|
text-overflow: ellipsis;
|
|
1628
|
-
${e.setVariable(
|
|
1629
|
-
${e.setVariable(
|
|
1670
|
+
${e.setVariable(zt.fontSize,Ni.selectedOptionSize)};
|
|
1671
|
+
${e.setVariable(zt.lineHeight,Ni.selectedOptionSize)};
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
.ft-select--in-error .ft-select--selected-option {
|
|
1675
|
+
color: ${Ni.colorError};
|
|
1630
1676
|
}
|
|
1631
1677
|
|
|
1632
1678
|
ft-icon {
|
|
@@ -1638,16 +1684,16 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1638
1684
|
}
|
|
1639
1685
|
|
|
1640
1686
|
.ft-select--filled .ft-select--input-panel {
|
|
1641
|
-
border-radius: ${
|
|
1687
|
+
border-radius: ${Ni.borderRadiusS} ${Ni.borderRadiusS} 0 0;
|
|
1642
1688
|
}
|
|
1643
1689
|
|
|
1644
1690
|
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
1645
1691
|
align-self: stretch;
|
|
1646
|
-
padding-top: calc(${
|
|
1692
|
+
padding-top: calc(${Ni.labelSize} + 2 * ${Ni.verticalSpacing});
|
|
1647
1693
|
}
|
|
1648
1694
|
|
|
1649
1695
|
.ft-select--outlined .ft-select--input-panel {
|
|
1650
|
-
border-radius: ${
|
|
1696
|
+
border-radius: ${Ni.borderRadiusS};
|
|
1651
1697
|
}
|
|
1652
1698
|
|
|
1653
1699
|
.ft-select--options {
|
|
@@ -1656,10 +1702,16 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1656
1702
|
top: 100%;
|
|
1657
1703
|
left: 0;
|
|
1658
1704
|
right: 0;
|
|
1659
|
-
color: ${
|
|
1660
|
-
background: ${
|
|
1661
|
-
z-index: ${
|
|
1662
|
-
box-shadow: ${
|
|
1705
|
+
color: ${Ni.optionsColor};
|
|
1706
|
+
background: ${Ni.colorSurface};
|
|
1707
|
+
z-index: ${Ni.optionsZIndex};
|
|
1708
|
+
box-shadow: ${Ni.elevation02};
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
.ft-select--fixed .ft-select--options {
|
|
1712
|
+
position: fixed;
|
|
1713
|
+
right: unset;
|
|
1714
|
+
/* left and top are set dynamically */
|
|
1663
1715
|
}
|
|
1664
1716
|
|
|
1665
1717
|
.ft-select--options-displayed .ft-select--options {
|
|
@@ -1676,9 +1728,13 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1676
1728
|
|
|
1677
1729
|
.ft-select--helper-text {
|
|
1678
1730
|
padding: 0 12px 0 16px;
|
|
1679
|
-
color: ${
|
|
1731
|
+
color: ${Ni.helperColor};
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
.ft-select--in-error .ft-select--helper-text {
|
|
1735
|
+
color: ${Ni.colorError};
|
|
1680
1736
|
}
|
|
1681
|
-
`],
|
|
1737
|
+
`],Ti([o.property({type:String})],Pi.prototype,"label",void 0),Ti([o.property({type:String})],Pi.prototype,"helper",void 0),Ti([o.property({type:Boolean})],Pi.prototype,"outlined",void 0),Ti([o.property({type:Boolean})],Pi.prototype,"disabled",void 0),Ti([o.property({type:Boolean})],Pi.prototype,"error",void 0),Ti([o.property({type:Boolean})],Pi.prototype,"fixedMenuPosition",void 0),Ti([o.property({type:Array})],Pi.prototype,"options",void 0),Ti([o.state()],Pi.prototype,"selectedOption",void 0),Ti([o.state()],Pi.prototype,"optionsDisplayed",void 0),Ti([o.state()],Pi.prototype,"focusOptions",void 0),Ti([o.query(".ft-select")],Pi.prototype,"container",void 0),Ti([o.query(".ft-select--options")],Pi.prototype,"optionsMenu",void 0),Ti([o.query(".ft-select--input-panel")],Pi.prototype,"mainPanel",void 0),Ti([o.query(".ft-select--option:first-child")],Pi.prototype,"firstOption",void 0),Ti([o.query(".ft-select--option:focus")],Pi.prototype,"focusedOption",void 0),Ti([o.query(".ft-select--option.ft-select--option-selected")],Pi.prototype,"selectedOptionElement",void 0),Ti([o.query(".ft-select--option:last-child")],Pi.prototype,"lastOption",void 0),Ti([o.query("slot")],Pi.prototype,"optionsSlot",void 0),e.customElement("ft-select")(Pi),e.customElement("ft-select-option")(Ai);const Ri={height:e.FtCssVariable.create("--ft-search-bar-height","SIZE","38px"),borderRadius:e.FtCssVariable.extend("--ft-search-bar-border-radius",e.designSystemVariables.borderRadiusS),mobileOpenPosition:e.FtCssVariable.create("--ft-search-bar-mobile-open-position","POSITION","fixed"),mobileOpenTop:e.FtCssVariable.create("--ft-search-bar-mobile-open-top","SIZE","0"),mobileOpenBottom:e.FtCssVariable.create("--ft-search-bar-mobile-open-bottom","SIZE","0"),mobileOpenLeft:e.FtCssVariable.create("--ft-search-bar-mobile-open-left","SIZE","0"),mobileOpenRight:e.FtCssVariable.create("--ft-search-bar-mobile-open-right","SIZE","0"),floatingZIndex:e.FtCssVariable.create("--ft-search-bar-floating-components-z-index","NUMBER","2"),colorSurface:e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system"),colorOnSurface:e.FtCssVariable.external(e.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOutline:e.FtCssVariable.external(e.designSystemVariables.colorOutline,"Design system"),colorPrimary:e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),elevation02:e.FtCssVariable.external(e.designSystemVariables.elevation02,"Design system"),buttonColor:e.FtCssVariable.external(De.color,"Button"),buttonRippleColor:e.FtCssVariable.external(De.rippleColor,"Button")},_i=i.css`
|
|
1682
1738
|
* {
|
|
1683
1739
|
box-sizing: border-box;
|
|
1684
1740
|
}
|
|
@@ -1687,7 +1743,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1687
1743
|
display: flex;
|
|
1688
1744
|
flex-direction: column;
|
|
1689
1745
|
gap: 8px;
|
|
1690
|
-
color: ${
|
|
1746
|
+
color: ${Ri.colorOnSurface};
|
|
1691
1747
|
outline: none;
|
|
1692
1748
|
}
|
|
1693
1749
|
|
|
@@ -1696,14 +1752,14 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1696
1752
|
}
|
|
1697
1753
|
|
|
1698
1754
|
.ft-search-bar--mobile-menu-open {
|
|
1699
|
-
position: ${
|
|
1700
|
-
top: ${
|
|
1701
|
-
bottom: ${
|
|
1702
|
-
left: ${
|
|
1703
|
-
right: ${
|
|
1704
|
-
z-index: ${
|
|
1755
|
+
position: ${Ri.mobileOpenPosition};
|
|
1756
|
+
top: ${Ri.mobileOpenTop};
|
|
1757
|
+
bottom: ${Ri.mobileOpenBottom};
|
|
1758
|
+
left: ${Ri.mobileOpenLeft};
|
|
1759
|
+
right: ${Ri.mobileOpenRight};
|
|
1760
|
+
z-index: ${Ri.floatingZIndex};
|
|
1705
1761
|
padding: 16px;
|
|
1706
|
-
background: ${
|
|
1762
|
+
background: ${Ri.colorSurface};
|
|
1707
1763
|
}
|
|
1708
1764
|
|
|
1709
1765
|
.ft-search-bar {
|
|
@@ -1711,15 +1767,15 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1711
1767
|
display: flex;
|
|
1712
1768
|
flex-direction: row;
|
|
1713
1769
|
align-items: center;
|
|
1714
|
-
height: ${
|
|
1770
|
+
height: ${Ri.height};
|
|
1715
1771
|
|
|
1716
|
-
background: ${
|
|
1717
|
-
border: 1px solid ${
|
|
1718
|
-
border-radius: ${
|
|
1772
|
+
background: ${Ri.colorSurface};
|
|
1773
|
+
border: 1px solid ${Ri.colorOutline};
|
|
1774
|
+
border-radius: ${Ri.borderRadius};
|
|
1719
1775
|
}
|
|
1720
1776
|
|
|
1721
1777
|
.ft-search-bar--floating-panel-open .ft-search-bar {
|
|
1722
|
-
border-radius: ${
|
|
1778
|
+
border-radius: ${Ri.borderRadius} ${Ri.borderRadius} 0 0;
|
|
1723
1779
|
}
|
|
1724
1780
|
|
|
1725
1781
|
.ft-search-bar--input-container {
|
|
@@ -1737,7 +1793,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1737
1793
|
align-self: stretch;
|
|
1738
1794
|
display: grid;
|
|
1739
1795
|
padding: 0 8px;
|
|
1740
|
-
border-radius: ${
|
|
1796
|
+
border-radius: ${Ri.borderRadius};
|
|
1741
1797
|
}
|
|
1742
1798
|
|
|
1743
1799
|
.ft-search-bar--dense .ft-search-bar--input-outline {
|
|
@@ -1746,7 +1802,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1746
1802
|
}
|
|
1747
1803
|
|
|
1748
1804
|
.ft-search-bar--input-container:focus-within .ft-search-bar--input-outline {
|
|
1749
|
-
outline: 2px solid ${
|
|
1805
|
+
outline: 2px solid ${Ri.colorPrimary};
|
|
1750
1806
|
}
|
|
1751
1807
|
|
|
1752
1808
|
.ft-search-bar--input {
|
|
@@ -1762,13 +1818,24 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1762
1818
|
min-width: 250px;
|
|
1763
1819
|
}
|
|
1764
1820
|
|
|
1765
|
-
.ft-search-bar
|
|
1821
|
+
.ft-search-bar--actions {
|
|
1822
|
+
flex-shrink: 0;
|
|
1823
|
+
display: flex;
|
|
1824
|
+
flex-direction: row;
|
|
1825
|
+
align-items: center;
|
|
1826
|
+
height: 100%;
|
|
1827
|
+
|
|
1828
|
+
--ft-tooltip-z-index: 3;
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
.ft-search-bar > ft-button,
|
|
1832
|
+
.ft-search-bar--actions ft-button {
|
|
1766
1833
|
flex-shrink: 0;
|
|
1767
1834
|
}
|
|
1768
1835
|
|
|
1769
1836
|
.ft-search-bar--left-action {
|
|
1770
|
-
${e.setVariable(
|
|
1771
|
-
border-right: 1px solid ${
|
|
1837
|
+
${e.setVariable(De.borderRadius,i.css`calc(${Ri.borderRadius} - 1px) 0 0 calc(${Ri.borderRadius} - 1px)`)};
|
|
1838
|
+
border-right: 1px solid ${Ri.colorOutline};
|
|
1772
1839
|
height: 100%;
|
|
1773
1840
|
}
|
|
1774
1841
|
|
|
@@ -1777,7 +1844,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1777
1844
|
}
|
|
1778
1845
|
|
|
1779
1846
|
.ft-search-bar--floating-panel-open .ft-search-bar--left-action {
|
|
1780
|
-
${e.setVariable(
|
|
1847
|
+
${e.setVariable(De.borderRadius,i.css`calc(${Ri.borderRadius} - 1px) 0 0 0`)};
|
|
1781
1848
|
}
|
|
1782
1849
|
|
|
1783
1850
|
.ft-search-bar .ft-search-bar--launch-search,
|
|
@@ -1787,13 +1854,13 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1787
1854
|
|
|
1788
1855
|
.ft-search-bar--separator {
|
|
1789
1856
|
height: 20px;
|
|
1790
|
-
border-right: 1px solid ${
|
|
1857
|
+
border-right: 1px solid ${Ri.colorOutline};
|
|
1791
1858
|
}
|
|
1792
1859
|
|
|
1793
1860
|
.ft-search-bar--left-action.ft-search-bar--content-locale {
|
|
1794
|
-
${e.setVariable(
|
|
1795
|
-
${e.setVariable(
|
|
1796
|
-
${e.setVariable(
|
|
1861
|
+
${e.setVariable(ji.borderColor,"transparent")};
|
|
1862
|
+
${e.setVariable(ji.borderRadiusS,i.css`calc(${Ri.borderRadius} - 1px)`)};
|
|
1863
|
+
${e.setVariable(Ni.selectedOptionColor,Ri.buttonColor)};
|
|
1797
1864
|
}
|
|
1798
1865
|
|
|
1799
1866
|
.ft-search-bar--left-action.ft-search-bar--content-locale,
|
|
@@ -1810,17 +1877,17 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1810
1877
|
}
|
|
1811
1878
|
|
|
1812
1879
|
.ft-search-bar--left-action.ft-search-bar--content-locale::part(selected-value) {
|
|
1813
|
-
border-radius: calc(${
|
|
1880
|
+
border-radius: calc(${Ri.borderRadius} - 1px) 0 0 calc(${Ri.borderRadius} - 1px);
|
|
1814
1881
|
}
|
|
1815
1882
|
|
|
1816
|
-
`,
|
|
1883
|
+
`,Ui=i.css`
|
|
1817
1884
|
.ft-search-bar--floating-panel .ft-search-bar--presets {
|
|
1818
1885
|
margin-right: auto;
|
|
1819
1886
|
}
|
|
1820
1887
|
|
|
1821
1888
|
.ft-search-bar--floating-panel .ft-search-bar--presets {
|
|
1822
1889
|
min-width: 250px;
|
|
1823
|
-
${e.setVariable(
|
|
1890
|
+
${e.setVariable(Ni.optionsZIndex,"2")};
|
|
1824
1891
|
}
|
|
1825
1892
|
|
|
1826
1893
|
.ft-search-bar--floating-panel {
|
|
@@ -1912,7 +1979,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1912
1979
|
|
|
1913
1980
|
.ft-search-bar--filter-label > :last-child {
|
|
1914
1981
|
flex-shrink: 1;
|
|
1915
|
-
color: ${
|
|
1982
|
+
color: ${Ri.colorOnSurfaceMedium};
|
|
1916
1983
|
}
|
|
1917
1984
|
|
|
1918
1985
|
ft-accordion-item::part(toggle) {
|
|
@@ -1928,11 +1995,11 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1928
1995
|
padding-left: 0;
|
|
1929
1996
|
padding-right: 0;
|
|
1930
1997
|
}
|
|
1931
|
-
|
|
1998
|
+
|
|
1932
1999
|
.ft-search-bar--floating-panel .ft-search-bar--launch-search {
|
|
1933
2000
|
margin: 0;
|
|
1934
2001
|
}
|
|
1935
|
-
`,
|
|
2002
|
+
`,Zi=i.css`
|
|
1936
2003
|
.ft-search-bar--selected-filters:not(ft-snap-scroll) {
|
|
1937
2004
|
flex-shrink: 0;
|
|
1938
2005
|
display: flex;
|
|
@@ -1943,7 +2010,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1943
2010
|
|
|
1944
2011
|
ft-snap-scroll.ft-search-bar--selected-filters {
|
|
1945
2012
|
overflow: hidden;
|
|
1946
|
-
${e.setVariable(
|
|
2013
|
+
${e.setVariable(ii.gap,"4px")};
|
|
1947
2014
|
}
|
|
1948
2015
|
|
|
1949
2016
|
ft-snap-scroll.ft-search-bar--selected-filters::part(content) {
|
|
@@ -1951,8 +2018,8 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1951
2018
|
}
|
|
1952
2019
|
|
|
1953
2020
|
.ft-search-bar--desktop ft-snap-scroll.ft-search-bar--selected-filters {
|
|
1954
|
-
${e.setVariable(
|
|
1955
|
-
${e.setVariable(
|
|
2021
|
+
${e.setVariable(Oi.iconSize,"17px")};
|
|
2022
|
+
${e.setVariable(Oi.fontSize,"12px")};
|
|
1956
2023
|
}
|
|
1957
2024
|
|
|
1958
2025
|
.ft-search-bar--selected-filters * {
|
|
@@ -1962,7 +2029,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1962
2029
|
.ft-search-bar--selected-filters ft-chip {
|
|
1963
2030
|
flex-grow: 0;
|
|
1964
2031
|
}
|
|
1965
|
-
`,
|
|
2032
|
+
`,Hi=i.css`
|
|
1966
2033
|
.ft-search-bar--mobile .ft-search-bar--suggestions {
|
|
1967
2034
|
flex-grow: 1;
|
|
1968
2035
|
flex-shrink: 1;
|
|
@@ -1971,7 +2038,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1971
2038
|
}
|
|
1972
2039
|
|
|
1973
2040
|
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
1974
|
-
border-top: 1px solid ${
|
|
2041
|
+
border-top: 1px solid ${Ri.colorOutline};
|
|
1975
2042
|
}
|
|
1976
2043
|
|
|
1977
2044
|
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
@@ -1986,10 +2053,10 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
1986
2053
|
left: -1px;
|
|
1987
2054
|
right: -1px;
|
|
1988
2055
|
display: none;
|
|
1989
|
-
background: ${
|
|
1990
|
-
border: 1px solid ${
|
|
1991
|
-
border-radius: 0 0 ${
|
|
1992
|
-
box-shadow: ${
|
|
2056
|
+
background: ${Ri.colorSurface};
|
|
2057
|
+
border: 1px solid ${Ri.colorOutline};
|
|
2058
|
+
border-radius: 0 0 ${Ri.borderRadius} ${Ri.borderRadius};
|
|
2059
|
+
box-shadow: ${Ri.elevation02};
|
|
1993
2060
|
outline: none;
|
|
1994
2061
|
}
|
|
1995
2062
|
|
|
@@ -2004,7 +2071,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
2004
2071
|
.ft-search-bar--no-suggestions {
|
|
2005
2072
|
text-align: center;
|
|
2006
2073
|
padding: 8px;
|
|
2007
|
-
color: ${
|
|
2074
|
+
color: ${Ri.colorOnSurface};
|
|
2008
2075
|
}
|
|
2009
2076
|
|
|
2010
2077
|
.ft-search-bar--suggestion {
|
|
@@ -2015,10 +2082,14 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
2015
2082
|
padding: 8px;
|
|
2016
2083
|
gap: 8px;
|
|
2017
2084
|
cursor: pointer;
|
|
2018
|
-
color: ${
|
|
2085
|
+
color: ${Ri.colorOnSurface};
|
|
2019
2086
|
min-height: 52px;
|
|
2020
2087
|
}
|
|
2021
2088
|
|
|
2089
|
+
.ft-search-bar--suggestion > *:not(ft-ripple) {
|
|
2090
|
+
position: relative;
|
|
2091
|
+
}
|
|
2092
|
+
|
|
2022
2093
|
.ft-search-bar--desktop .ft-search-bar--suggestion {
|
|
2023
2094
|
min-height: 44px;
|
|
2024
2095
|
}
|
|
@@ -2028,7 +2099,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
2028
2099
|
}
|
|
2029
2100
|
|
|
2030
2101
|
.ft-search-bar--recent-search + .ft-search-bar--suggestion:not(.ft-search-bar--recent-search) {
|
|
2031
|
-
border-top: 1px solid ${
|
|
2102
|
+
border-top: 1px solid ${Ri.colorOutline};
|
|
2032
2103
|
}
|
|
2033
2104
|
|
|
2034
2105
|
.ft-search-bar--suggestion ft-typography {
|
|
@@ -2036,7 +2107,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
2036
2107
|
flex-grow: 1;
|
|
2037
2108
|
flex-shrink: 1;
|
|
2038
2109
|
}
|
|
2039
|
-
`;var
|
|
2110
|
+
`;var Ki=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 qi={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 Vi extends CustomEvent{constructor(t){super("launch-search",{detail:t,bubbles:!0,composed:!0})}}class Wi extends CustomEvent{constructor(t){super("change",{detail:t})}}class Gi extends e.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.labels={},this.labelResolver=new e.ParametrizedLabelResolver(qi,{}),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=l.S,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.knownFacetLabels={},this.query="",this.suggestions=[],this.suggestionsLoaded=!0,this.recentSearches=[],this.updateFacetsDebouncer=new e.Debouncer(500),this.suggestDebouncer=new e.Debouncer(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.priors.length>0?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,priors:this.priors.length>0?this.priors:void 0,sort:[]}}get isMobile(){return this.sizeCategory===l.S}get hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return this.presets.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(){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.mobileMenuOpen};return i.html`
|
|
2040
2111
|
<ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
|
|
2041
2112
|
<div class="${n.classMap(t)}" part="container" tabindex="-1">
|
|
2042
2113
|
${this.isMobile?this.renderMobileSearchBar():this.renderDesktopSearchBar()}
|
|
@@ -2060,28 +2131,34 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
2060
2131
|
${this.displayFacets?this.renderMobileFacets():this.renderSuggestions()}
|
|
2061
2132
|
${this.mobileMenuOpen||this.displayFacets?i.html`
|
|
2062
2133
|
<ft-button class="ft-search-bar--launch-search"
|
|
2063
|
-
part="search-
|
|
2134
|
+
part="launch-search-in-panel"
|
|
2064
2135
|
icon="search"
|
|
2065
2136
|
@click=${this.launchSearch}>
|
|
2066
2137
|
${this.labelResolver.resolve("searchButton")}
|
|
2067
2138
|
</ft-button>
|
|
2068
2139
|
`:i.nothing}
|
|
2069
2140
|
`}renderMobileSearchBarButtons(){return this.query||this.mobileMenuOpen?i.html`
|
|
2070
|
-
<
|
|
2071
|
-
|
|
2072
|
-
|
|
2141
|
+
<div class="ft-search-bar--actions"
|
|
2142
|
+
part="search-bar-actions">
|
|
2143
|
+
<ft-button class="ft-search-bar--clear-query"
|
|
2144
|
+
part="clear-query"
|
|
2145
|
+
icon="close"
|
|
2146
|
+
round
|
|
2147
|
+
label="${this.labelResolver.resolve("clearInputButton")}"
|
|
2148
|
+
@click=${()=>{this.setQuery(""),this.mobileMenuOpen=!1,this.displayFacets=!1}}
|
|
2149
|
+
></ft-button>
|
|
2150
|
+
</div>
|
|
2151
|
+
`:i.html`
|
|
2152
|
+
<div class="ft-search-bar--actions"
|
|
2153
|
+
part="search-bar-actions">
|
|
2154
|
+
<ft-button class="ft-search-bar--launch-search"
|
|
2155
|
+
part="launch-search-in-bar"
|
|
2156
|
+
icon="search"
|
|
2073
2157
|
round
|
|
2074
|
-
label="${this.labelResolver.resolve("
|
|
2075
|
-
@click=${()=>{this.
|
|
2158
|
+
label="${this.labelResolver.resolve("searchButton")}"
|
|
2159
|
+
@click=${()=>{var t;return null===(t=this.input)||void 0===t?void 0:t.focus()}}
|
|
2076
2160
|
></ft-button>
|
|
2077
|
-
|
|
2078
|
-
<ft-button class="ft-search-bar--launch-search"
|
|
2079
|
-
part="search-bar-actions"
|
|
2080
|
-
icon="search"
|
|
2081
|
-
round
|
|
2082
|
-
label="${this.labelResolver.resolve("searchButton")}"
|
|
2083
|
-
@click=${()=>{var t;return null===(t=this.input)||void 0===t?void 0:t.focus()}}
|
|
2084
|
-
></ft-button>
|
|
2161
|
+
</div>
|
|
2085
2162
|
`}renderMobileFacets(){var t;const e=this.availableContentLocales.filter((t=>t.lang===this.contentLocale)).pop();return i.html`
|
|
2086
2163
|
<ft-accordion class="ft-search-bar--filters-container">
|
|
2087
2164
|
${this.hasLocaleSelector?i.html`
|
|
@@ -2102,12 +2179,12 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
2102
2179
|
></ft-filter>
|
|
2103
2180
|
</ft-accordion-item>
|
|
2104
2181
|
`:null}
|
|
2105
|
-
${s.repeat(this.facets,(t=>t.key),(t=>{const e=
|
|
2182
|
+
${s.repeat(this.facets,(t=>t.key),(t=>{const e=ee(t);return i.html`
|
|
2106
2183
|
<ft-accordion-item data-facet-key="${t.key}">
|
|
2107
2184
|
<div class="ft-search-bar--filter-label" slot="toggle">
|
|
2108
2185
|
<ft-typography variant="button">${t.label}</ft-typography>
|
|
2109
2186
|
<ft-typography variant="body2">
|
|
2110
|
-
${function(t){return
|
|
2187
|
+
${function(t){return Yt(t.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).filter((t=>t.selected)).map((t=>t.label))}(e).join(", ")}
|
|
2111
2188
|
</ft-typography>
|
|
2112
2189
|
</div>
|
|
2113
2190
|
<ft-filter
|
|
@@ -2147,7 +2224,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
2147
2224
|
${this.renderDesktopFacets()}
|
|
2148
2225
|
<div class="ft-search-bar--facets-actions">
|
|
2149
2226
|
<ft-button class="ft-search-bar--launch-search"
|
|
2150
|
-
part="search-
|
|
2227
|
+
part="launch-search-in-panel"
|
|
2151
2228
|
icon="search"
|
|
2152
2229
|
@click=${this.launchSearch}>
|
|
2153
2230
|
${this.labelResolver.resolve("searchButton")}
|
|
@@ -2178,23 +2255,26 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
2178
2255
|
`))}
|
|
2179
2256
|
</ft-select>
|
|
2180
2257
|
`:i.nothing}renderDesktopSearchBarButtons(){return i.html`
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2258
|
+
<div class="ft-search-bar--actions"
|
|
2259
|
+
part="search-bar-actions">
|
|
2260
|
+
${this.query?i.html`
|
|
2261
|
+
<ft-button class="ft-search-bar--clear-query"
|
|
2262
|
+
part="clear-query"
|
|
2263
|
+
icon="close"
|
|
2264
|
+
round dense
|
|
2265
|
+
label="${this.labelResolver.resolve("clearInputButton")}"
|
|
2266
|
+
@click=${()=>this.setQuery("")}
|
|
2267
|
+
></ft-button>
|
|
2268
|
+
<div class="ft-search-bar--separator"></div>
|
|
2269
|
+
`:null}
|
|
2270
|
+
<ft-button class="ft-search-bar--launch-search"
|
|
2271
|
+
part="launch-search-in-bar"
|
|
2272
|
+
icon="search"
|
|
2185
2273
|
round dense
|
|
2186
|
-
label="${this.labelResolver.resolve("
|
|
2187
|
-
@click=${
|
|
2274
|
+
label="${this.labelResolver.resolve("searchButton")}"
|
|
2275
|
+
@click=${this.launchSearch}
|
|
2188
2276
|
></ft-button>
|
|
2189
|
-
|
|
2190
|
-
`:null}
|
|
2191
|
-
<ft-button class="ft-search-bar--launch-search"
|
|
2192
|
-
part="search-bar-actions"
|
|
2193
|
-
icon="search"
|
|
2194
|
-
round dense
|
|
2195
|
-
label="${this.labelResolver.resolve("searchButton")}"
|
|
2196
|
-
@click=${this.launchSearch}
|
|
2197
|
-
></ft-button>
|
|
2277
|
+
</div>
|
|
2198
2278
|
`}renderFacetsActions(){return i.html`
|
|
2199
2279
|
<div class="ft-search-bar--facets-actions">
|
|
2200
2280
|
${this.hasPresets?i.html`
|
|
@@ -2233,7 +2313,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
2233
2313
|
@change=${t=>this.contentLocale=t.detail[0]}
|
|
2234
2314
|
></ft-filter>
|
|
2235
2315
|
`:i.nothing}
|
|
2236
|
-
${s.repeat(this.facets,(t=>t.key),(t=>{const e=
|
|
2316
|
+
${s.repeat(this.facets,(t=>t.key),(t=>{const e=ee(t),o=e.options.some((t=>{var e,i;return(null!==(i=null===(e=t.subOptions)||void 0===e?void 0:e.length)&&void 0!==i?i:0)>0}));return i.html`
|
|
2237
2317
|
<ft-filter
|
|
2238
2318
|
class="${o?"ft-search-bar--hierarchical-filter":""}"
|
|
2239
2319
|
part="filters"
|
|
@@ -2259,7 +2339,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
2259
2339
|
${this.getLocaleLabel(this.contentLocale)}
|
|
2260
2340
|
</ft-chip>
|
|
2261
2341
|
`:null}
|
|
2262
|
-
${s.repeat(this.facets,(t=>t.key),(e=>{const o=function(t){return
|
|
2342
|
+
${s.repeat(this.facets,(t=>t.key),(e=>{const o=function(t){return Yt(t.rootNodes,(t=>t.selected?[]:t.childNodes)).filter((t=>t.selected)).map((t=>t.value))}(e);return s.repeat(o,(s=>{let n=e.label+": "+function(t){return Qt(t).split("|").join(" > ")}(s);const r=i.html`
|
|
2263
2343
|
<ft-chip
|
|
2264
2344
|
part="selected-filters"
|
|
2265
2345
|
?dense=${this.dense&&!this.isMobile}
|
|
@@ -2270,7 +2350,7 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
2270
2350
|
title=${t?n:i.nothing}
|
|
2271
2351
|
@click=${()=>this.openMobileFilters(e.key)}
|
|
2272
2352
|
@icon-click=${()=>this.setFilter(e.key,o.filter((t=>t!==s)))}>
|
|
2273
|
-
${function(t){return
|
|
2353
|
+
${function(t){return Qt(t).split("|").pop()}(s)}
|
|
2274
2354
|
</ft-chip>
|
|
2275
2355
|
`;return t?r:i.html`
|
|
2276
2356
|
<ft-tooltip inline text="${n}">
|
|
@@ -2333,8 +2413,8 @@ const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
2333
2413
|
</ft-typography>
|
|
2334
2414
|
`:null}
|
|
2335
2415
|
</div>
|
|
2336
|
-
`}getIcon(t){const e="DOCUMENT"===t.type?
|
|
2416
|
+
`}getIcon(t){const e="DOCUMENT"===t.type?ze.file_format:ze.fluid_topics;let o;switch(t.type){case"MAP":o="BOOK"===t.editorialType?$e.BOOK:$e.ARTICLE;break;case"DOCUMENT":o=function(t,e){var i,o,s,n;t=(null!=t?t:"").toLowerCase(),e=(null!=e?e:"").toLowerCase();const[r,l]=((null!==(i=Se.get(t))&&void 0!==i?i:t)+"/").split("/");return null!==(n=null!==(s=null!==(o=ke.get(l))&&void 0!==o?o:ke.get(e))&&void 0!==s?s:ke.get(r))&&void 0!==n?n:we.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":o=$e.TOPICS}return i.html`
|
|
2337
2417
|
<ft-icon variant="${e}" part="suggestion-icon">
|
|
2338
2418
|
${o}
|
|
2339
2419
|
</ft-icon>
|
|
2340
|
-
`}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){var e,i;super.firstUpdated(t),this.initApi(),this.availableContentLocales=null!==(i=await(null===(e=this.api)||void 0===e?void 0:e.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[]))))&&void 0!==i?i:[]}update(t){var i,o,s;if(t.has("labels")&&(this.labelResolver=new e.ParametrizedLabelResolver(
|
|
2420
|
+
`}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){var e,i;super.firstUpdated(t),this.initApi(),this.availableContentLocales=null!==(i=await(null===(e=this.api)||void 0===e?void 0:e.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[]))))&&void 0!==i?i:[]}update(t){var i,o,s;if(t.has("labels")&&(this.labelResolver=new e.ParametrizedLabelResolver(qi,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 e=t=>this.availableContentLocales.some((e=>e.lang===t));e(this.contentLocale)||(this.contentLocale=t.has("contentLocale")&&e(t.get("contentLocale"))?t.get("contentLocale"):null===(i=this.availableContentLocales[0])||void 0===i?void 0:i.lang)}if(t.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.recentSearches=JSON.parse(null!==(o=window.localStorage.getItem(this.recentSearchesStorageKey))&&void 0!==o?o:"[]")),t.has("selectedPreset")){const t=this.presets.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===(s=this.presets.find((t=>this.compareRequests(t,this.request))))||void 0===s?void 0:s.name),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&this.setApi(),["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 Wi(this.request))}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.setApi(),setTimeout((()=>this.initApi()),100))}setApi(){this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0}updateFacets(){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.facets=[]}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 Vi(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&&Yt(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=>Yt(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()}}}Gi.elementDefinitions={"ft-accordion":xi,"ft-accordion-item":ki,"ft-button":Me,"ft-chip":Fi,"ft-filter":ui,"ft-filter-option":vi,"ft-icon":Ce,"ft-ripple":pe,"ft-select":Pi,"ft-select-option":Ai,"ft-size-watcher":p,"ft-snap-scroll":si,"ft-tooltip":xe,"ft-typography":Jt},Gi.styles=[qt,_i,Ui,Zi,Hi],Ki([o.property({type:Boolean})],Gi.prototype,"dense",void 0),Ki([o.property({type:String})],Gi.prototype,"baseUrl",void 0),Ki([o.property({type:String})],Gi.prototype,"apiIntegrationIdentifier",void 0),Ki([o.property({type:String})],Gi.prototype,"contentLocale",void 0),Ki([o.state()],Gi.prototype,"availableContentLocales",void 0),Ki([o.property({type:String})],Gi.prototype,"uiLocale",void 0),Ki([e.jsonProperty({})],Gi.prototype,"labels",void 0),Ki([e.jsonProperty([])],Gi.prototype,"displayedFilters",void 0),Ki([e.jsonProperty([])],Gi.prototype,"presets",void 0),Ki([e.jsonProperty([])],Gi.prototype,"priors",void 0),Ki([o.property({type:String,reflect:!0})],Gi.prototype,"selectedPreset",void 0),Ki([o.property()],Gi.prototype,"searchRequestSerializer",void 0),Ki([o.state()],Gi.prototype,"searchFilters",void 0),Ki([o.state()],Gi.prototype,"sizeCategory",void 0),Ki([o.state()],Gi.prototype,"displayFacets",void 0),Ki([o.state()],Gi.prototype,"mobileMenuOpen",void 0),Ki([o.state()],Gi.prototype,"facets",void 0),Ki([o.query(".ft-search-bar--container")],Gi.prototype,"container",void 0),Ki([o.query(".ft-search-bar--filters-opener")],Gi.prototype,"filtersOpener",void 0),Ki([o.query(".ft-search-bar--floating-panel")],Gi.prototype,"floatingContainer",void 0),Ki([o.query("ft-snap-scroll.ft-search-bar--filters-container")],Gi.prototype,"scrollingFiltersContainer",void 0),Ki([o.query(".ft-search-bar--input")],Gi.prototype,"input",void 0),Ki([o.state()],Gi.prototype,"query",void 0),Ki([o.state()],Gi.prototype,"suggestions",void 0),Ki([o.state()],Gi.prototype,"suggestionsLoaded",void 0),Ki([o.state()],Gi.prototype,"recentSearches",void 0),Ki([o.state()],Gi.prototype,"scrollToFacet",void 0),Ki([o.query(".ft-search-bar--suggestion:first-child")],Gi.prototype,"firstSuggestion",void 0),Ki([o.query(".ft-search-bar--suggestion:focus-within")],Gi.prototype,"focusedSuggestion",void 0),Ki([o.query(".ft-search-bar--suggestion:last-child")],Gi.prototype,"lastSuggestion",void 0),Ki([o.state()],Gi.prototype,"api",void 0),e.customElement("ft-search-bar")(Gi),t.DEFAULT_LABELS=qi,t.FtSearchBar=Gi,t.FtSearchBarCssVariables=Ri,t.LaunchSearchEvent=Vi,t.SearchStateChangeEvent=Wi,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|