@fluid-topics/ft-search-bar 0.1.7 → 0.1.8
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.light.js +17 -15
- package/build/ft-search-bar.min.js +5 -3
- package/package.json +13 -13
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
* Copyright 2017 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
29
|
*/
|
|
30
|
-
var h;p.elementDefinitions={},l([i.property({type:Number})],p.prototype,"debounceTimeout",void 0),l([i.property({type:Boolean})],p.prototype,"local",void 0),l([i.property({type:Number,reflect:!0})],p.prototype,"size",void 0),l([i.property({type:String,reflect:!0})],p.prototype,"category",void 0),l([i.query(".ft-size-watcher--watcher")],p.prototype,"watcher",void 0),p=l([a.customElement("ft-size-watcher")],p);const f=globalThis.trustedTypes,u=f?f.createPolicy("lit-html",{createHTML:t=>t}):void 0,m=`lit$${(Math.random()+"").slice(9)}$`,b="?"+m,g=`<${b}>`,v=document,x=(t="")=>v.createComment(t),y=t=>null===t||"object"!=typeof t&&"function"!=typeof t,k=Array.isArray,$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,w=/>/g,z=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,S=/'/g,O=/"/g,C=/^(?:script|style|textarea|title)$/i,B=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),
|
|
30
|
+
var h;p.elementDefinitions={},l([i.property({type:Number})],p.prototype,"debounceTimeout",void 0),l([i.property({type:Boolean})],p.prototype,"local",void 0),l([i.property({type:Number,reflect:!0})],p.prototype,"size",void 0),l([i.property({type:String,reflect:!0})],p.prototype,"category",void 0),l([i.query(".ft-size-watcher--watcher")],p.prototype,"watcher",void 0),p=l([a.customElement("ft-size-watcher")],p);const f=globalThis.trustedTypes,u=f?f.createPolicy("lit-html",{createHTML:t=>t}):void 0,m=`lit$${(Math.random()+"").slice(9)}$`,b="?"+m,g=`<${b}>`,v=document,x=(t="")=>v.createComment(t),y=t=>null===t||"object"!=typeof t&&"function"!=typeof t,k=Array.isArray,$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,w=/>/g,z=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,S=/'/g,O=/"/g,C=/^(?:script|style|textarea|title)$/i,B=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),E=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),A=new WeakMap,F=v.createTreeWalker(v,129,null,!1),I=(t,e)=>{const i=t.length-1,o=[];let r,a=2===e?"<svg>":"",c=$;for(let e=0;e<i;e++){const i=t[e];let n,s,l=-1,d=0;for(;d<i.length&&(c.lastIndex=d,s=c.exec(i),null!==s);)d=c.lastIndex,c===$?"!--"===s[1]?c=_:void 0!==s[1]?c=w:void 0!==s[2]?(C.test(s[2])&&(r=RegExp("</"+s[2],"g")),c=z):void 0!==s[3]&&(c=z):c===z?">"===s[0]?(c=null!=r?r:$,l=-1):void 0===s[1]?l=-2:(l=c.lastIndex-s[2].length,n=s[1],c=void 0===s[3]?z:'"'===s[3]?O:S):c===O||c===S?c=z:c===_||c===w?c=$:(c=z,r=void 0);const p=c===z&&t[e+1].startsWith("/>")?" ":"";a+=c===$?i+g:l>=0?(o.push(n),i.slice(0,l)+"$lit$"+i.slice(l)+m+p):i+m+(-2===l?(o.push(void 0),e):p)}const n=a+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==u?u.createHTML(n):n,o]};class R{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,a=0;const c=t.length-1,n=this.parts,[s,l]=I(t,e);if(this.el=R.createElement(s,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())&&n.length<c;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(m)){const i=l[a++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(m),e=/([.?@])?(.*)/.exec(i);n.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?P:"?"===e[1]?H:"@"===e[1]?U:M})}else n.push({type:6,index:r})}for(const e of t)o.removeAttribute(e)}if(C.test(o.tagName)){const t=o.textContent.split(m),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(),n.push({type:2,index:++r});o.append(t[e],x())}}}else if(8===o.nodeType)if(o.data===b)n.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(m,t+1));)n.push({type:7,index:r}),t+=m.length-1}r++}}static createElement(t,e){const i=v.createElement("template");return i.innerHTML=t,i}}function D(t,e,i=t,o){var r,a,c,n;if(e===E)return e;let s=void 0!==o?null===(r=i._$Cl)||void 0===r?void 0:r[o]:i._$Cu;const l=y(e)?void 0:e._$litDirective$;return(null==s?void 0:s.constructor)!==l&&(null===(a=null==s?void 0:s._$AO)||void 0===a||a.call(s,!1),void 0===l?s=void 0:(s=new l(t),s._$AT(t,i,o)),void 0!==o?(null!==(c=(n=i)._$Cl)&&void 0!==c?c:n._$Cl=[])[o]=s:i._$Cu=s),void 0!==s&&(e=D(t,s._$AS(t,e.values),s,o)),e}class L{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,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:v).importNode(i,!0);F.currentNode=r;let a=F.nextNode(),c=0,n=0,s=o[0];for(;void 0!==s;){if(c===s.index){let e;2===s.type?e=new j(a,a.nextSibling,this,t):1===s.type?e=new s.ctor(a,s.name,s.strings,this,t):6===s.type&&(e=new V(a,this,t)),this.v.push(e),s=o[++n]}c!==(null==s?void 0:s.index)&&(a=F.nextNode(),c++)}return r}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 j{constructor(t,e,i,o){var r;this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cg=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}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=D(this,t,e),y(t)?t===T||null==t||""===t?(this._$AH!==T&&this._$AR(),this._$AH=T):t!==this._$AH&&t!==E&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var e;return k(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==T&&y(this._$AH)?this._$AA.nextSibling.data=t:this.S(v.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=R.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.m(i);else{const t=new L(r,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=A.get(t.strings);return void 0===e&&A.set(t.strings,e=new R(t)),e}A(t){k(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new j(this.M(x()),this.M(x()),this,this.options)):i=e[o],i._$AI(r),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 M{constructor(t,e,i,o,r){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=T}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const r=this.strings;let a=!1;if(void 0===r)t=D(this,t,e,0),a=!y(t)||t!==this._$AH&&t!==E,a&&(this._$AH=t);else{const o=t;let c,n;for(t=r[0],c=0;c<r.length-1;c++)n=D(this,o[i+c],e,c),n===E&&(n=this._$AH[c]),a||(a=!y(n)||n!==this._$AH[c]),n===T?t=T:t!==T&&(t+=(null!=n?n:"")+r[c+1]),this._$AH[c]=n}a&&!o&&this.k(t)}k(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class P extends M{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===T?void 0:t}}const N=f?f.emptyScript:"";class H extends M{constructor(){super(...arguments),this.type=4}k(t){t&&t!==T?this.element.setAttribute(this.name,N):this.element.removeAttribute(this.name)}}class U extends M{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=D(this,t,e,0))&&void 0!==i?i:T)===E)return;const o=this._$AH,r=t===T&&o!==T||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,a=t!==T&&(o===T||r);r&&this.element.removeEventListener(this.name,this,o),a&&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 V{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){D(this,t)}}const Z=window.litHtmlPolyfillSupport;null==Z||Z(R,j),(null!==(h=globalThis.litHtmlVersions)&&void 0!==h?h:globalThis.litHtmlVersions=[]).push("2.1.3");
|
|
31
31
|
/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2020 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
35
|
*/
|
|
36
|
-
const q=t=>({_$litStatic$:t}),G=new Map,K=(t=>(e,...i)=>{var o;const r=i.length;let a,c;const n=[],s=[];let l,d=0,p=!1;for(;d<r;){for(l=e[d];d<r&&void 0!==(c=i[d],a=null===(o=c)||void 0===o?void 0:o._$litStatic$);)l+=a+e[++d],p=!0;s.push(c),n.push(l),d++}if(d===r&&n.push(e[r]),p){const t=n.join("$$lit$$");void 0===(e=G.get(t))&&(n.raw=n,G.set(t,e=n)),i=s}return t(e,...i)})(B);var W,X=function(t,e,i,o){for(var r,a=arguments.length,c=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,n=t.length-1;n>=0;n--)(r=t[n])&&(c=(a<3?r(c):a>3?r(e,i,c):r(e,i))||c);return a>3&&c&&Object.defineProperty(e,i,c),c};!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"}(W||(W={}));const J=a.FtCssVariable.extend("--ft-typography-font-family",a.designSystemVariables.titleFont),Y=a.FtCssVariable.extend("--ft-typography-font-family",a.designSystemVariables.contentFont),Q={fontFamily:Y,fontSize:a.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:a.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:a.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:a.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:a.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},tt=a.FtCssVariable.extend("--ft-typography-title-font-family",J),et=a.FtCssVariable.extend("--ft-typography-title-font-size",Q.fontSize,"20px"),it=a.FtCssVariable.extend("--ft-typography-title-font-weight",Q.fontWeight,"normal"),ot=a.FtCssVariable.extend("--ft-typography-title-letter-spacing",Q.letterSpacing,"0.15px"),rt=a.FtCssVariable.extend("--ft-typography-title-line-height",Q.lineHeight,"24px"),at=a.FtCssVariable.extend("--ft-typography-title-text-transform",Q.textTransform,"inherit"),ct=a.FtCssVariable.extend("--ft-typography-title-dense-font-family",J),nt=a.FtCssVariable.extend("--ft-typography-title-dense-font-size",Q.fontSize,"14px"),st=a.FtCssVariable.extend("--ft-typography-title-dense-font-weight",Q.fontWeight,"normal"),lt=a.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",Q.letterSpacing,"0.105px"),dt=a.FtCssVariable.extend("--ft-typography-title-dense-line-height",Q.lineHeight,"24px"),pt=a.FtCssVariable.extend("--ft-typography-title-dense-text-transform",Q.textTransform,"inherit"),ht=a.FtCssVariable.extend("--ft-typography-subtitle1-font-family",Y),ft=a.FtCssVariable.extend("--ft-typography-subtitle1-font-size",Q.fontSize,"16px"),ut=a.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",Q.fontWeight,"600"),mt=a.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",Q.letterSpacing,"0.144px"),bt=a.FtCssVariable.extend("--ft-typography-subtitle1-line-height",Q.lineHeight,"24px"),gt=a.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",Q.textTransform,"inherit"),vt=a.FtCssVariable.extend("--ft-typography-subtitle2-font-family",Y),xt=a.FtCssVariable.extend("--ft-typography-subtitle2-font-size",Q.fontSize,"14px"),yt=a.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",Q.fontWeight,"normal"),kt=a.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",Q.letterSpacing,"0.098px"),$t=a.FtCssVariable.extend("--ft-typography-subtitle2-line-height",Q.lineHeight,"24px"),_t=a.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",Q.textTransform,"inherit"),wt={fontFamily:a.FtCssVariable.extend("--ft-typography-body1-font-family",Y),fontSize:a.FtCssVariable.extend("--ft-typography-body1-font-size",Q.fontSize,"16px"),fontWeight:a.FtCssVariable.extend("--ft-typography-body1-font-weight",Q.fontWeight,"normal"),letterSpacing:a.FtCssVariable.extend("--ft-typography-body1-letter-spacing",Q.letterSpacing,"0.496px"),lineHeight:a.FtCssVariable.extend("--ft-typography-body1-line-height",Q.lineHeight,"24px"),textTransform:a.FtCssVariable.extend("--ft-typography-body1-text-transform",Q.textTransform,"inherit")},zt={fontFamily:a.FtCssVariable.extend("--ft-typography-body2-font-family",Y),fontSize:a.FtCssVariable.extend("--ft-typography-body2-font-size",Q.fontSize,"14px"),fontWeight:a.FtCssVariable.extend("--ft-typography-body2-font-weight",Q.fontWeight,"normal"),letterSpacing:a.FtCssVariable.extend("--ft-typography-body2-letter-spacing",Q.letterSpacing,"0.252px"),lineHeight:a.FtCssVariable.extend("--ft-typography-body2-line-height",Q.lineHeight,"20px"),textTransform:a.FtCssVariable.extend("--ft-typography-body2-text-transform",Q.textTransform,"inherit")},St={fontFamily:a.FtCssVariable.extend("--ft-typography-caption-font-family",Y),fontSize:a.FtCssVariable.extend("--ft-typography-caption-font-size",Q.fontSize,"12px"),fontWeight:a.FtCssVariable.extend("--ft-typography-caption-font-weight",Q.fontWeight,"normal"),letterSpacing:a.FtCssVariable.extend("--ft-typography-caption-letter-spacing",Q.letterSpacing,"0.396px"),lineHeight:a.FtCssVariable.extend("--ft-typography-caption-line-height",Q.lineHeight,"16px"),textTransform:a.FtCssVariable.extend("--ft-typography-caption-text-transform",Q.textTransform,"inherit")},Ot=a.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",Y),Ct=a.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",Q.fontSize,"10px"),Bt=a.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",Q.fontWeight,"normal"),
|
|
36
|
+
const q=t=>({_$litStatic$:t}),G=new Map,K=(t=>(e,...i)=>{var o;const r=i.length;let a,c;const n=[],s=[];let l,d=0,p=!1;for(;d<r;){for(l=e[d];d<r&&void 0!==(c=i[d],a=null===(o=c)||void 0===o?void 0:o._$litStatic$);)l+=a+e[++d],p=!0;s.push(c),n.push(l),d++}if(d===r&&n.push(e[r]),p){const t=n.join("$$lit$$");void 0===(e=G.get(t))&&(n.raw=n,G.set(t,e=n)),i=s}return t(e,...i)})(B);var W,X=function(t,e,i,o){for(var r,a=arguments.length,c=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,n=t.length-1;n>=0;n--)(r=t[n])&&(c=(a<3?r(c):a>3?r(e,i,c):r(e,i))||c);return a>3&&c&&Object.defineProperty(e,i,c),c};!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"}(W||(W={}));const J=a.FtCssVariable.extend("--ft-typography-font-family",a.designSystemVariables.titleFont),Y=a.FtCssVariable.extend("--ft-typography-font-family",a.designSystemVariables.contentFont),Q={fontFamily:Y,fontSize:a.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:a.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:a.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:a.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:a.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},tt=a.FtCssVariable.extend("--ft-typography-title-font-family",J),et=a.FtCssVariable.extend("--ft-typography-title-font-size",Q.fontSize,"20px"),it=a.FtCssVariable.extend("--ft-typography-title-font-weight",Q.fontWeight,"normal"),ot=a.FtCssVariable.extend("--ft-typography-title-letter-spacing",Q.letterSpacing,"0.15px"),rt=a.FtCssVariable.extend("--ft-typography-title-line-height",Q.lineHeight,"24px"),at=a.FtCssVariable.extend("--ft-typography-title-text-transform",Q.textTransform,"inherit"),ct=a.FtCssVariable.extend("--ft-typography-title-dense-font-family",J),nt=a.FtCssVariable.extend("--ft-typography-title-dense-font-size",Q.fontSize,"14px"),st=a.FtCssVariable.extend("--ft-typography-title-dense-font-weight",Q.fontWeight,"normal"),lt=a.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",Q.letterSpacing,"0.105px"),dt=a.FtCssVariable.extend("--ft-typography-title-dense-line-height",Q.lineHeight,"24px"),pt=a.FtCssVariable.extend("--ft-typography-title-dense-text-transform",Q.textTransform,"inherit"),ht=a.FtCssVariable.extend("--ft-typography-subtitle1-font-family",Y),ft=a.FtCssVariable.extend("--ft-typography-subtitle1-font-size",Q.fontSize,"16px"),ut=a.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",Q.fontWeight,"600"),mt=a.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",Q.letterSpacing,"0.144px"),bt=a.FtCssVariable.extend("--ft-typography-subtitle1-line-height",Q.lineHeight,"24px"),gt=a.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",Q.textTransform,"inherit"),vt=a.FtCssVariable.extend("--ft-typography-subtitle2-font-family",Y),xt=a.FtCssVariable.extend("--ft-typography-subtitle2-font-size",Q.fontSize,"14px"),yt=a.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",Q.fontWeight,"normal"),kt=a.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",Q.letterSpacing,"0.098px"),$t=a.FtCssVariable.extend("--ft-typography-subtitle2-line-height",Q.lineHeight,"24px"),_t=a.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",Q.textTransform,"inherit"),wt={fontFamily:a.FtCssVariable.extend("--ft-typography-body1-font-family",Y),fontSize:a.FtCssVariable.extend("--ft-typography-body1-font-size",Q.fontSize,"16px"),fontWeight:a.FtCssVariable.extend("--ft-typography-body1-font-weight",Q.fontWeight,"normal"),letterSpacing:a.FtCssVariable.extend("--ft-typography-body1-letter-spacing",Q.letterSpacing,"0.496px"),lineHeight:a.FtCssVariable.extend("--ft-typography-body1-line-height",Q.lineHeight,"24px"),textTransform:a.FtCssVariable.extend("--ft-typography-body1-text-transform",Q.textTransform,"inherit")},zt={fontFamily:a.FtCssVariable.extend("--ft-typography-body2-font-family",Y),fontSize:a.FtCssVariable.extend("--ft-typography-body2-font-size",Q.fontSize,"14px"),fontWeight:a.FtCssVariable.extend("--ft-typography-body2-font-weight",Q.fontWeight,"normal"),letterSpacing:a.FtCssVariable.extend("--ft-typography-body2-letter-spacing",Q.letterSpacing,"0.252px"),lineHeight:a.FtCssVariable.extend("--ft-typography-body2-line-height",Q.lineHeight,"20px"),textTransform:a.FtCssVariable.extend("--ft-typography-body2-text-transform",Q.textTransform,"inherit")},St={fontFamily:a.FtCssVariable.extend("--ft-typography-caption-font-family",Y),fontSize:a.FtCssVariable.extend("--ft-typography-caption-font-size",Q.fontSize,"12px"),fontWeight:a.FtCssVariable.extend("--ft-typography-caption-font-weight",Q.fontWeight,"normal"),letterSpacing:a.FtCssVariable.extend("--ft-typography-caption-letter-spacing",Q.letterSpacing,"0.396px"),lineHeight:a.FtCssVariable.extend("--ft-typography-caption-line-height",Q.lineHeight,"16px"),textTransform:a.FtCssVariable.extend("--ft-typography-caption-text-transform",Q.textTransform,"inherit")},Ot=a.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",Y),Ct=a.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",Q.fontSize,"10px"),Bt=a.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",Q.fontWeight,"normal"),Et=a.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",Q.letterSpacing,"0.33px"),Tt=a.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",Q.lineHeight,"16px"),At=a.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",Q.textTransform,"inherit"),Ft=a.FtCssVariable.extend("--ft-typography-overline-font-family",Y),It=a.FtCssVariable.extend("--ft-typography-overline-font-size",Q.fontSize,"10px"),Rt=a.FtCssVariable.extend("--ft-typography-overline-font-weight",Q.fontWeight,"normal"),Dt=a.FtCssVariable.extend("--ft-typography-overline-letter-spacing",Q.letterSpacing,"1.5px"),Lt=a.FtCssVariable.extend("--ft-typography-overline-line-height",Q.lineHeight,"16px"),jt=a.FtCssVariable.extend("--ft-typography-overline-text-transform",Q.textTransform,"uppercase"),Mt={fontFamily:a.FtCssVariable.extend("--ft-typography-button-font-family",Y),fontSize:a.FtCssVariable.extend("--ft-typography-button-font-size",Q.fontSize,"14px"),fontWeight:a.FtCssVariable.extend("--ft-typography-button-font-weight",Q.fontWeight,"600"),letterSpacing:a.FtCssVariable.extend("--ft-typography-button-letter-spacing",Q.letterSpacing,"1.246px"),lineHeight:a.FtCssVariable.extend("--ft-typography-button-line-height",Q.lineHeight,"16px"),textTransform:a.FtCssVariable.extend("--ft-typography-button-text-transform",Q.textTransform,"uppercase")},Pt=e.css`
|
|
37
37
|
.ft-typography--title {
|
|
38
38
|
font-family: ${tt};
|
|
39
39
|
font-size: ${et};
|
|
@@ -102,8 +102,8 @@ const q=t=>({_$litStatic$:t}),G=new Map,K=(t=>(e,...i)=>{var o;const r=i.length;
|
|
|
102
102
|
font-family: ${Ot};
|
|
103
103
|
font-size: ${Ct};
|
|
104
104
|
font-weight: ${Bt};
|
|
105
|
-
letter-spacing: ${
|
|
106
|
-
line-height: ${
|
|
105
|
+
letter-spacing: ${Et};
|
|
106
|
+
line-height: ${Tt};
|
|
107
107
|
text-transform: ${At};
|
|
108
108
|
}
|
|
109
109
|
`,Kt=e.css`
|
|
@@ -286,7 +286,7 @@ class Se{constructor(t){this.startPress=e=>{t().then((t=>{t&&t.startPress(e)}))}
|
|
|
286
286
|
* @license
|
|
287
287
|
* Copyright 2018 Google LLC
|
|
288
288
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
289
|
-
*/const Oe=t=>null!=t?t:
|
|
289
|
+
*/const Oe=t=>null!=t?t:T
|
|
290
290
|
/**
|
|
291
291
|
* @license
|
|
292
292
|
* Copyright 2019 Google LLC
|
|
@@ -338,7 +338,7 @@ const Be=e.css`.mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(-
|
|
|
338
338
|
* @license
|
|
339
339
|
* Copyright 2018 Google LLC
|
|
340
340
|
* SPDX-License-Identifier: Apache-2.0
|
|
341
|
-
*/;let
|
|
341
|
+
*/;let Ee=class extends Ce{};Ee.styles=[Be],Ee=re([i.customElement("mwc-checkbox")],Ee);var Te=function(t,e,i,o){for(var r,a=arguments.length,c=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,n=t.length-1;n>=0;n--)(r=t[n])&&(c=(a<3?r(c):a>3?r(e,i,c):r(e,i))||c);return a>3&&c&&Object.defineProperty(e,i,c),c};const Ae={color:a.FtCssVariable.extend("--ft-ripple-color",a.designSystemVariables.colorContent),primaryColor:a.FtCssVariable.extend("--ft-ripple-primary-color",a.FtCssVariable.extend("--ft-ripple-color",a.designSystemVariables.colorPrimary)),secondaryColor:a.FtCssVariable.extend("--ft-ripple-secondary-color",a.FtCssVariable.extend("--ft-ripple-color",a.designSystemVariables.colorSecondary)),opacityContentOnSurfacePressed:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),opacityContentOnSurfaceDragged:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfaceDragged,"Design system")};let Fe=class extends a.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1}getStyles(){return e.css`
|
|
342
342
|
:host {
|
|
343
343
|
display: contents;
|
|
344
344
|
|
|
@@ -365,7 +365,7 @@ const Be=e.css`.mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(-
|
|
|
365
365
|
?selected=${this.selected}
|
|
366
366
|
?disabled=${this.disabled}
|
|
367
367
|
></mwc-ripple>
|
|
368
|
-
`}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple()}endRipple(){var t,e,i;null===(t=this.rippleHandlers)||void 0===t||t.endHover(),null===(e=this.rippleHandlers)||void 0===e||e.endFocus(),null===(i=this.rippleHandlers)||void 0===i||i.endPress()}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentNode;if(e){const t=new Se((async()=>this.mwcRipple)),i=(...e)=>i=>{e.forEach((e=>window.addEventListener(e,t.endPress,{once:!0}))),t.startPress(i)},o=i("mouseup"),r=i("touchend","touchcancel"),a=t=>{["Enter"," "].includes(t.key)&&i("keyup")()};e.addEventListener("mouseenter",t.startHover),e.addEventListener("mouseleave",t.endHover),e.addEventListener("mousedown",o),e.addEventListener("touchstart",r),e.addEventListener("keydown",a),e.addEventListener("focus",t.startFocus),e.addEventListener("blur",t.endFocus),this.onDisconnect=()=>{e.removeEventListener("mouseenter",t.startHover),e.removeEventListener("mouseleave",t.endHover),e.removeEventListener("mousedown",o),e.removeEventListener("touchstart",r),e.removeEventListener("keydown",a),e.removeEventListener("focus",t.startFocus),e.removeEventListener("blur",t.endFocus)},this.rippleHandlers=t}}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};Fe.elementDefinitions={"mwc-ripple":ye},
|
|
368
|
+
`}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple()}endRipple(){var t,e,i;null===(t=this.rippleHandlers)||void 0===t||t.endHover(),null===(e=this.rippleHandlers)||void 0===e||e.endFocus(),null===(i=this.rippleHandlers)||void 0===i||i.endPress()}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentNode;if(e){const t=new Se((async()=>this.mwcRipple)),i=(...e)=>i=>{e.forEach((e=>window.addEventListener(e,t.endPress,{once:!0}))),t.startPress(i)},o=i("mouseup"),r=i("touchend","touchcancel"),a=t=>{["Enter"," "].includes(t.key)&&i("keyup")()};e.addEventListener("mouseenter",t.startHover),e.addEventListener("mouseleave",t.endHover),e.addEventListener("mousedown",o),e.addEventListener("touchstart",r),e.addEventListener("keydown",a),e.addEventListener("focus",t.startFocus),e.addEventListener("blur",t.endFocus),this.onDisconnect=()=>{e.removeEventListener("mouseenter",t.startHover),e.removeEventListener("mouseleave",t.endHover),e.removeEventListener("mousedown",o),e.removeEventListener("touchstart",r),e.removeEventListener("keydown",a),e.removeEventListener("focus",t.startFocus),e.removeEventListener("blur",t.endFocus)},this.rippleHandlers=t}}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};Fe.elementDefinitions={"mwc-ripple":ye},Te([i.property({type:Boolean})],Fe.prototype,"primary",void 0),Te([i.property({type:Boolean})],Fe.prototype,"secondary",void 0),Te([i.property({type:Boolean})],Fe.prototype,"unbounded",void 0),Te([i.property({type:Boolean})],Fe.prototype,"activated",void 0),Te([i.property({type:Boolean})],Fe.prototype,"selected",void 0),Te([i.property({type:Boolean})],Fe.prototype,"disabled",void 0),Te([i.query("mwc-ripple")],Fe.prototype,"mwcRipple",void 0),Fe=Te([a.customElement("ft-ripple")],Fe);
|
|
369
369
|
/**
|
|
370
370
|
* @license
|
|
371
371
|
* Copyright 2021 Google LLC
|
|
@@ -913,7 +913,7 @@ const ui=e.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
913
913
|
@click=${e=>this.toggleMonoValuedOption(e,t)}
|
|
914
914
|
></mwc-radio>
|
|
915
915
|
</mwc-formfield>
|
|
916
|
-
`}toggleMonoValuedOption(t,e){this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),e.selected=!e.selected,this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}};vi.elementDefinitions={"ft-button":Qe,"ft-ripple":Fe,"ft-typography":Xt,"mwc-checkbox":
|
|
916
|
+
`}toggleMonoValuedOption(t,e){this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),e.selected=!e.selected,this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}};vi.elementDefinitions={"ft-button":Qe,"ft-ripple":Fe,"ft-typography":Xt,"mwc-checkbox":Ee,"mwc-formfield":ci,"mwc-icon":Re,"mwc-radio":mi},bi([i.property({type:String})],vi.prototype,"id",void 0),bi([i.property({type:Object})],vi.prototype,"parent",void 0),bi([i.property({type:Array})],vi.prototype,"options",void 0),bi([i.property({type:Boolean})],vi.prototype,"multivalued",void 0),bi([i.property({type:Boolean})],vi.prototype,"disabled",void 0),bi([i.property({type:Boolean})],vi.prototype,"hideSelectedOptions",void 0),bi([i.property({type:Boolean})],vi.prototype,"preventNavigation",void 0),bi([i.property({type:String})],vi.prototype,"filter",void 0),bi([i.property({type:String})],vi.prototype,"moreValuesButtonLabel",void 0),bi([i.property({type:Number})],vi.prototype,"displayedValuesLimit",void 0),bi([i.query(".ft-filter-level--container")],vi.prototype,"container",void 0),bi([i.state()],vi.prototype,"displayedPages",void 0),vi=bi([a.customElement("ft-filter-level")],vi);var xi=function(t,e,i,o){for(var r,a=arguments.length,c=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,n=t.length-1;n>=0;n--)(r=t[n])&&(c=(a<3?r(c):a>3?r(e,i,c):r(e,i))||c);return a>3&&c&&Object.defineProperty(e,i,c),c};const yi={buttonsColor:a.FtCssVariable.extend("--ft-snap-scroll-buttons-color",a.designSystemVariables.colorPrimary),buttonsZIndex:a.FtCssVariable.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:a.FtCssVariable.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:a.FtCssVariable.external(a.designSystemVariables.colorSurface,"Design system")};class ki extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}let $i=class extends a.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 a.Debouncer(200),this.updateScrollDebouncer=new a.Debouncer(100)}getStyles(){return e.css`
|
|
917
917
|
.ft-snap-scroll {
|
|
918
918
|
box-sizing: border-box;
|
|
919
919
|
position: relative;
|
|
@@ -1064,7 +1064,7 @@ const ui=e.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1064
1064
|
</div>
|
|
1065
1065
|
`}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 ki(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)}};$i.elementDefinitions={"ft-button":Qe},xi([i.property({type:Boolean})],$i.prototype,"horizontal",void 0),xi([i.property({type:Boolean})],$i.prototype,"hideScrollbar",void 0),xi([i.property({type:Boolean})],$i.prototype,"controls",void 0),xi([i.property({type:Boolean})],$i.prototype,"limitSize",void 0),xi([i.state()],$i.prototype,"elements",void 0),xi([i.state()],$i.prototype,"currentElement",void 0),xi([i.state()],$i.prototype,"withScroll",void 0),xi([i.state()],$i.prototype,"startReached",void 0),xi([i.state()],$i.prototype,"endReached",void 0),xi([i.query(".ft-snap-scroll--content")],$i.prototype,"contentSlot",void 0),$i=xi([a.customElement("ft-snap-scroll")],$i);var _i=function(t,e,i,o){for(var r,a=arguments.length,c=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,n=t.length-1;n>=0;n--)(r=t[n])&&(c=(a<3?r(c):a>3?r(e,i,c):r(e,i))||c);return a>3&&c&&Object.defineProperty(e,i,c),c};let wi=class extends a.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}getTemplate(){return e.html`
|
|
1066
1066
|
<slot @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1067
|
-
`}updateSubOptionsFromSlot(t){const e=t.composedPath()[0];this.subOptions=e.assignedElements().map((t=>t))}};wi.elementDefinitions={},_i([i.property({type:String})],wi.prototype,"label",void 0),_i([i.property({type:Object,converter:t=>t})],wi.prototype,"value",void 0),_i([i.property({type:Boolean,reflect:!0})],wi.prototype,"selected",void 0),_i([i.property({type:Object})],wi.prototype,"subOptions",void 0),wi=_i([a.customElement("ft-filter-option")],wi);var zi=function(t,e,i,o){for(var r,a=arguments.length,c=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,n=t.length-1;n>=0;n--)(r=t[n])&&(c=(a<3?r(c):a>3?r(e,i,c):r(e,i))||c);return a>3&&c&&Object.defineProperty(e,i,c),c};const Si=a.FtCssVariable.external(a.designSystemVariables.colorOutline,"Design system"),Oi=a.FtCssVariable.external(a.designSystemVariables.colorOnSurface,"Design system"),Ci=a.FtCssVariable.external(a.designSystemVariables.colorOnSurfaceMedium,"Design system"),Bi=a.FtCssVariable.external(a.designSystemVariables.colorPrimary,"Design system"),
|
|
1067
|
+
`}updateSubOptionsFromSlot(t){const e=t.composedPath()[0];this.subOptions=e.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}};wi.elementDefinitions={},_i([i.property({type:String})],wi.prototype,"label",void 0),_i([i.property({type:Object,converter:t=>t})],wi.prototype,"value",void 0),_i([i.property({type:Boolean,reflect:!0})],wi.prototype,"selected",void 0),_i([i.property({type:Object})],wi.prototype,"subOptions",void 0),wi=_i([a.customElement("ft-filter-option")],wi);var zi=function(t,e,i,o){for(var r,a=arguments.length,c=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,n=t.length-1;n>=0;n--)(r=t[n])&&(c=(a<3?r(c):a>3?r(e,i,c):r(e,i))||c);return a>3&&c&&Object.defineProperty(e,i,c),c};const Si=a.FtCssVariable.external(a.designSystemVariables.colorOutline,"Design system"),Oi=a.FtCssVariable.external(a.designSystemVariables.colorOnSurface,"Design system"),Ci=a.FtCssVariable.external(a.designSystemVariables.colorOnSurfaceMedium,"Design system"),Bi=a.FtCssVariable.external(a.designSystemVariables.colorPrimary,"Design system"),Ei=a.FtCssVariable.external(a.designSystemVariables.colorSurface,"Design system"),Ti=a.FtCssVariable.external(a.designSystemVariables.transitionDuration,"Design system"),Ai=a.FtCssVariable.external(a.designSystemVariables.transitionTimingFunction,"Design system");class Fi extends CustomEvent{constructor(t){super("change",{detail:t})}}let Ii=class extends a.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 a.Debouncer(300)}getStyles(){return[qt,e.css`
|
|
1068
1068
|
:host {
|
|
1069
1069
|
display: flex;
|
|
1070
1070
|
max-height: 100%;
|
|
@@ -1078,7 +1078,7 @@ const ui=e.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1078
1078
|
max-height: 100%;
|
|
1079
1079
|
max-width: 100%;
|
|
1080
1080
|
color: ${Oi};
|
|
1081
|
-
background: ${
|
|
1081
|
+
background: ${Ei};
|
|
1082
1082
|
}
|
|
1083
1083
|
|
|
1084
1084
|
.ft-filter--header {
|
|
@@ -1114,8 +1114,8 @@ const ui=e.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1114
1114
|
padding: 0 10px;
|
|
1115
1115
|
overflow: hidden;
|
|
1116
1116
|
height: 32px;
|
|
1117
|
-
transition: height ${
|
|
1118
|
-
margin ${
|
|
1117
|
+
transition: height ${Ti} ${Ai},
|
|
1118
|
+
margin ${Ti} ${Ai};
|
|
1119
1119
|
transition-delay: 500ms;
|
|
1120
1120
|
}
|
|
1121
1121
|
|
|
@@ -1130,7 +1130,7 @@ const ui=e.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1130
1130
|
border-radius: 4px;
|
|
1131
1131
|
border: 1px solid ${Si};
|
|
1132
1132
|
padding: 4px;
|
|
1133
|
-
background-color: ${
|
|
1133
|
+
background-color: ${Ei};
|
|
1134
1134
|
color: ${Ci};
|
|
1135
1135
|
outline-color: ${Bi};
|
|
1136
1136
|
}
|
|
@@ -1194,7 +1194,8 @@ const ui=e.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1194
1194
|
<div class="ft-filter--values">
|
|
1195
1195
|
${this.renderLevels()}
|
|
1196
1196
|
</div>
|
|
1197
|
-
<slot @slotchange=${this.updateOptionsFromSlot}
|
|
1197
|
+
<slot @slotchange=${this.updateOptionsFromSlot}
|
|
1198
|
+
@option-change=${this.updateOptionsFromSlot}></slot>
|
|
1198
1199
|
</div>
|
|
1199
1200
|
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,i=t.filter((t=>t.selected)),o=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,r=o<0?"ft-filter--level-center":"ft-filter--level-left";return e.html`
|
|
1200
1201
|
${this.raiseSelectedOptions&&i.length>0?e.html`
|
|
@@ -1636,7 +1637,8 @@ const ui=e.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1636
1637
|
color: ${mo.colorOnSurfaceDisabled};
|
|
1637
1638
|
}
|
|
1638
1639
|
|
|
1639
|
-
.ft-select:not(.ft-select--disabled) .ft-select--input-panel
|
|
1640
|
+
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
1641
|
+
.ft-select:not(.ft-select--disabled) .ft-select--option {
|
|
1640
1642
|
cursor: pointer;
|
|
1641
1643
|
}
|
|
1642
1644
|
|
|
@@ -1173,7 +1173,7 @@ const fr=a`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc((40p
|
|
|
1173
1173
|
</div>
|
|
1174
1174
|
`}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 yr(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)}};kr.elementDefinitions={"ft-button":Yi},gr([nt({type:Boolean})],kr.prototype,"horizontal",void 0),gr([nt({type:Boolean})],kr.prototype,"hideScrollbar",void 0),gr([nt({type:Boolean})],kr.prototype,"controls",void 0),gr([nt({type:Boolean})],kr.prototype,"limitSize",void 0),gr([at()],kr.prototype,"elements",void 0),gr([at()],kr.prototype,"currentElement",void 0),gr([at()],kr.prototype,"withScroll",void 0),gr([at()],kr.prototype,"startReached",void 0),gr([at()],kr.prototype,"endReached",void 0),gr([lt(".ft-snap-scroll--content")],kr.prototype,"contentSlot",void 0),kr=gr([Ct("ft-snap-scroll")],kr);var wr=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};let $r=class extends Tt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}getTemplate(){return A`
|
|
1175
1175
|
<slot @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1176
|
-
`}updateSubOptionsFromSlot(t){const e=t.composedPath()[0];this.subOptions=e.assignedElements().map((t=>t))}};$r.elementDefinitions={},wr([nt({type:String})],$r.prototype,"label",void 0),wr([nt({type:Object,converter:t=>t})],$r.prototype,"value",void 0),wr([nt({type:Boolean,reflect:!0})],$r.prototype,"selected",void 0),wr([nt({type:Object})],$r.prototype,"subOptions",void 0),$r=wr([Ct("ft-filter-option")],$r);var _r=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Sr=Rt.external(Ft.colorOutline,"Design system"),Or=Rt.external(Ft.colorOnSurface,"Design system"),zr=Rt.external(Ft.colorOnSurfaceMedium,"Design system"),Cr=Rt.external(Ft.colorPrimary,"Design system"),Er=Rt.external(Ft.colorSurface,"Design system"),Rr=Rt.external(Ft.transitionDuration,"Design system"),Br=Rt.external(Ft.transitionTimingFunction,"Design system");class Fr extends CustomEvent{constructor(t){super("change",{detail:t})}}let Tr=class extends Tt{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 zt(300)}getStyles(){return[Ve,a`
|
|
1176
|
+
`}updateSubOptionsFromSlot(t){const e=t.composedPath()[0];this.subOptions=e.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}};$r.elementDefinitions={},wr([nt({type:String})],$r.prototype,"label",void 0),wr([nt({type:Object,converter:t=>t})],$r.prototype,"value",void 0),wr([nt({type:Boolean,reflect:!0})],$r.prototype,"selected",void 0),wr([nt({type:Object})],$r.prototype,"subOptions",void 0),$r=wr([Ct("ft-filter-option")],$r);var _r=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Sr=Rt.external(Ft.colorOutline,"Design system"),Or=Rt.external(Ft.colorOnSurface,"Design system"),zr=Rt.external(Ft.colorOnSurfaceMedium,"Design system"),Cr=Rt.external(Ft.colorPrimary,"Design system"),Er=Rt.external(Ft.colorSurface,"Design system"),Rr=Rt.external(Ft.transitionDuration,"Design system"),Br=Rt.external(Ft.transitionTimingFunction,"Design system");class Fr extends CustomEvent{constructor(t){super("change",{detail:t})}}let Tr=class extends Tt{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 zt(300)}getStyles(){return[Ve,a`
|
|
1177
1177
|
:host {
|
|
1178
1178
|
display: flex;
|
|
1179
1179
|
max-height: 100%;
|
|
@@ -1303,7 +1303,8 @@ const fr=a`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc((40p
|
|
|
1303
1303
|
<div class="ft-filter--values">
|
|
1304
1304
|
${this.renderLevels()}
|
|
1305
1305
|
</div>
|
|
1306
|
-
<slot @slotchange=${this.updateOptionsFromSlot}
|
|
1306
|
+
<slot @slotchange=${this.updateOptionsFromSlot}
|
|
1307
|
+
@option-change=${this.updateOptionsFromSlot}></slot>
|
|
1307
1308
|
</div>
|
|
1308
1309
|
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),i=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,r=i<0?"ft-filter--level-center":"ft-filter--level-left";return A`
|
|
1309
1310
|
${this.raiseSelectedOptions&&e.length>0?A`
|
|
@@ -1751,7 +1752,8 @@ class Nr extends vt{constructor(t){if(super(t),this.it=j,t.type!==mt)throw Error
|
|
|
1751
1752
|
color: ${bo.colorOnSurfaceDisabled};
|
|
1752
1753
|
}
|
|
1753
1754
|
|
|
1754
|
-
.ft-select:not(.ft-select--disabled) .ft-select--input-panel
|
|
1755
|
+
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
1756
|
+
.ft-select:not(.ft-select--disabled) .ft-select--option {
|
|
1755
1757
|
cursor: pointer;
|
|
1756
1758
|
}
|
|
1757
1759
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-bar",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Search bar component using Fluid Topics public API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-accordion": "^0.1.
|
|
23
|
-
"@fluid-topics/ft-button": "^0.1.
|
|
24
|
-
"@fluid-topics/ft-chip": "^0.1.
|
|
25
|
-
"@fluid-topics/ft-filter": "^0.1.
|
|
26
|
-
"@fluid-topics/ft-icon": "^0.1.
|
|
27
|
-
"@fluid-topics/ft-select": "^0.1.
|
|
28
|
-
"@fluid-topics/ft-size-watcher": "^0.1.
|
|
29
|
-
"@fluid-topics/ft-snap-scroll": "^0.1.
|
|
30
|
-
"@fluid-topics/ft-tooltip": "^0.1.
|
|
31
|
-
"@fluid-topics/ft-typography": "^0.1.
|
|
32
|
-
"@fluid-topics/ft-wc-utils": "^0.1.
|
|
22
|
+
"@fluid-topics/ft-accordion": "^0.1.8",
|
|
23
|
+
"@fluid-topics/ft-button": "^0.1.8",
|
|
24
|
+
"@fluid-topics/ft-chip": "^0.1.8",
|
|
25
|
+
"@fluid-topics/ft-filter": "^0.1.8",
|
|
26
|
+
"@fluid-topics/ft-icon": "^0.1.8",
|
|
27
|
+
"@fluid-topics/ft-select": "^0.1.8",
|
|
28
|
+
"@fluid-topics/ft-size-watcher": "^0.1.8",
|
|
29
|
+
"@fluid-topics/ft-snap-scroll": "^0.1.8",
|
|
30
|
+
"@fluid-topics/ft-tooltip": "^0.1.8",
|
|
31
|
+
"@fluid-topics/ft-typography": "^0.1.8",
|
|
32
|
+
"@fluid-topics/ft-wc-utils": "^0.1.8",
|
|
33
33
|
"@material/mwc-icon": "^0.25.3",
|
|
34
34
|
"lit": "^2.0.2"
|
|
35
35
|
},
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@fluid-topics/public-api": "^1.0.14"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "45fdf008556920bbd5fcc2e766c273aed959178d"
|
|
43
43
|
}
|