@fluid-topics/ft-filter 0.3.5 → 0.3.6
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-filter.light.js +82 -80
- package/build/ft-filter.min.js +86 -84
- package/package.json +10 -10
package/build/ft-filter.light.js
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var l;const a=globalThis.trustedTypes,h=a?a.createPolicy("lit-html",{createHTML:t=>t}):void 0,p=`lit$${(Math.random()+"").slice(9)}$`,f="?"+p,c=`<${f}>`,d=document,u=(t="")=>d.createComment(t),v=t=>null===t||"object"!=typeof t&&"function"!=typeof t,b=Array.isArray,g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,x=/-->/g,y=/>/g,m=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),$=/'/g,k=/"/g,w=/^(?:script|style|textarea|title)$/i,z=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),S=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),C=new WeakMap,B=d.createTreeWalker(d,129,null,!1),j=(t,i)=>{const e=t.length-1,o=[];let s,r=2===i?"<svg>":"",n=g;for(let i=0;i<e;i++){const e=t[i];let l,a,h=-1,f=0;for(;f<e.length&&(n.lastIndex=f,a=n.exec(e),null!==a);)f=n.lastIndex,n===g?"!--"===a[1]?n=x:void 0!==a[1]?n=y:void 0!==a[2]?(w.test(a[2])&&(s=RegExp("</"+a[2],"g")),n=m):void 0!==a[3]&&(n=m):n===m?">"===a[0]?(n=null!=s?s:g,h=-1):void 0===a[1]?h=-2:(h=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?m:'"'===a[3]?k:$):n===k||n===$?n=m:n===x||n===y?n=g:(n=m,s=void 0);const d=n===m&&t[i+1].startsWith("/>")?" ":"";r+=n===g?e+c:h>=0?(o.push(l),e.slice(0,h)+"$lit$"+e.slice(h)+p+d):e+p+(-2===h?(o.push(void 0),i):d)}const l=r+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==h?h.createHTML(l):l,o]};class E{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,r=0;const n=t.length-1,l=this.parts,[h,c]=j(t,i);if(this.el=E.createElement(h,e),B.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=B.nextNode())&&l.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(p)){const e=c[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(p),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?F:"?"===i[1]?I:"@"===i[1]?_:
|
|
7
|
+
var l;const a=globalThis.trustedTypes,h=a?a.createPolicy("lit-html",{createHTML:t=>t}):void 0,p=`lit$${(Math.random()+"").slice(9)}$`,f="?"+p,c=`<${f}>`,d=document,u=(t="")=>d.createComment(t),v=t=>null===t||"object"!=typeof t&&"function"!=typeof t,b=Array.isArray,g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,x=/-->/g,y=/>/g,m=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),$=/'/g,k=/"/g,w=/^(?:script|style|textarea|title)$/i,z=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),S=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),C=new WeakMap,B=d.createTreeWalker(d,129,null,!1),j=(t,i)=>{const e=t.length-1,o=[];let s,r=2===i?"<svg>":"",n=g;for(let i=0;i<e;i++){const e=t[i];let l,a,h=-1,f=0;for(;f<e.length&&(n.lastIndex=f,a=n.exec(e),null!==a);)f=n.lastIndex,n===g?"!--"===a[1]?n=x:void 0!==a[1]?n=y:void 0!==a[2]?(w.test(a[2])&&(s=RegExp("</"+a[2],"g")),n=m):void 0!==a[3]&&(n=m):n===m?">"===a[0]?(n=null!=s?s:g,h=-1):void 0===a[1]?h=-2:(h=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?m:'"'===a[3]?k:$):n===k||n===$?n=m:n===x||n===y?n=g:(n=m,s=void 0);const d=n===m&&t[i+1].startsWith("/>")?" ":"";r+=n===g?e+c:h>=0?(o.push(l),e.slice(0,h)+"$lit$"+e.slice(h)+p+d):e+p+(-2===h?(o.push(void 0),i):d)}const l=r+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==h?h.createHTML(l):l,o]};class E{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,r=0;const n=t.length-1,l=this.parts,[h,c]=j(t,i);if(this.el=E.createElement(h,e),B.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=B.nextNode())&&l.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(p)){const e=c[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(p),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?F:"?"===i[1]?I:"@"===i[1]?_:M})}else l.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(w.test(o.tagName)){const t=o.textContent.split(p),i=t.length-1;if(i>0){o.textContent=a?a.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],u()),B.nextNode(),l.push({type:2,index:++s});o.append(t[i],u())}}}else if(8===o.nodeType)if(o.data===f)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(p,t+1));)l.push({type:7,index:s}),t+=p.length-1}s++}}static createElement(t,i){const e=d.createElement("template");return e.innerHTML=t,e}}function D(t,i,e=t,o){var s,r,n,l;if(i===S)return i;let a=void 0!==o?null===(s=e._$Cl)||void 0===s?void 0:s[o]:e._$Cu;const h=v(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,e,o)),void 0!==o?(null!==(n=(l=e)._$Cl)&&void 0!==n?n:l._$Cl=[])[o]=a:e._$Cu=a),void 0!==a&&(i=D(t,a._$AS(t,i.values),a,o)),i}class N{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:d).importNode(e,!0);B.currentNode=s;let r=B.nextNode(),n=0,l=0,a=o[0];for(;void 0!==a;){if(n===a.index){let i;2===a.type?i=new T(r,r.nextSibling,this,t):1===a.type?i=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(i=new L(r,this,t)),this.v.push(i),a=o[++l]}n!==(null==a?void 0:a.index)&&(r=B.nextNode(),n++)}return s}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class T{constructor(t,i,e,o){var s;this.type=2,this._$AH=O,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$C_=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$C_}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=D(this,t,i),v(t)?t===O||null==t||""===t?(this._$AH!==O&&this._$AR(),this._$AH=O):t!==this._$AH&&t!==S&&this.T(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.k(t):(t=>b(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.S(t):this.T(t)}j(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.j(t))}T(t){this._$AH!==O&&v(this._$AH)?this._$AA.nextSibling.data=t:this.k(d.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=E.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.m(e);else{const t=new N(s,this),i=t.p(this.options);t.m(e),this.k(i),this._$AH=t}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new E(t)),i}S(t){b(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new T(this.j(u()),this.j(u()),this,this.options)):e=i[o],e._$AI(s),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$C_=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class M{constructor(t,i,e,o,s){this.type=1,this._$AH=O,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=O}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let r=!1;if(void 0===s)t=D(this,t,i,0),r=!v(t)||t!==this._$AH&&t!==S,r&&(this._$AH=t);else{const o=t;let n,l;for(t=s[0],n=0;n<s.length-1;n++)l=D(this,o[e+n],i,n),l===S&&(l=this._$AH[n]),r||(r=!v(l)||l!==this._$AH[n]),l===O?t=O:t!==O&&(t+=(null!=l?l:"")+s[n+1]),this._$AH[n]=l}r&&!o&&this.P(t)}P(t){t===O?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class F extends M{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===O?void 0:t}}const A=a?a.emptyScript:"";class I extends M{constructor(){super(...arguments),this.type=4}P(t){t&&t!==O?this.element.setAttribute(this.name,A):this.element.removeAttribute(this.name)}}class _ extends M{constructor(t,i,e,o,s){super(t,i,e,o,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=D(this,t,i,0))&&void 0!==e?e:O)===S)return;const o=this._$AH,s=t===O&&o!==O||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==O&&(o===O||s);s&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class L{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){D(this,t)}}const R=window.litHtmlPolyfillSupport;null==R||R(E,T),(null!==(l=globalThis.litHtmlVersions)&&void 0!==l?l:globalThis.litHtmlVersions=[]).push("2.2.7");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
13
|
+
const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t._$litStatic$},P=t=>({_$litStatic$:t,r:U}),V=new Map,W=(t=>(i,...e)=>{const o=e.length;let s,r;const n=[],l=[];let a,h=0,p=!1;for(;h<o;){for(a=i[h];h<o&&void 0!==(r=e[h],s=H(r));)a+=s+i[++h],p=!0;l.push(r),n.push(a),h++}if(h===o&&n.push(i[o]),p){const t=n.join("$$lit$$");void 0===(i=V.get(t))&&(n.raw=n,V.set(t,i=n)),e=l}return t(i,...e)})(z);var Z,K=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};!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"}(Z||(Z={}));const G=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),q=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),X={fontFamily:q,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},Y=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",G),J=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",X.fontSize,"20px"),Q=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",X.fontWeight,"normal"),tt=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",X.letterSpacing,"0.15px"),it=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",X.lineHeight,"1.2"),et=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",X.textTransform,"inherit"),ot=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",G),st=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",X.fontSize,"14px"),rt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",X.fontWeight,"normal"),nt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",X.letterSpacing,"0.105px"),lt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",X.lineHeight,"1.7"),at=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",X.textTransform,"inherit"),ht=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",q),pt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",X.fontSize,"16px"),ft=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",X.fontWeight,"600"),ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",X.letterSpacing,"0.144px"),dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",X.lineHeight,"1.5"),ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",X.textTransform,"inherit"),vt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",q),bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",X.fontSize,"14px"),gt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",X.fontWeight,"normal"),xt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",X.letterSpacing,"0.098px"),yt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",X.lineHeight,"1.7"),mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",X.textTransform,"inherit"),$t=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",q),kt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",X.fontSize,"16px"),wt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",X.fontWeight,"normal"),zt=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",X.letterSpacing,"0.496px"),St=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",X.lineHeight,"1.5"),Ot=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",X.textTransform,"inherit"),Ct={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",q),fontSize:i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",X.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",X.fontWeight,"normal"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",X.letterSpacing,"0.252px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",X.lineHeight,"1.4"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",X.textTransform,"inherit")},Bt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",q),jt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",X.fontSize,"12px"),Et=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",X.fontWeight,"normal"),Dt=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",X.letterSpacing,"0.396px"),Nt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",X.lineHeight,"1.33"),Tt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",X.textTransform,"inherit"),Mt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",q),Ft=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",X.fontSize,"10px"),At=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",X.fontWeight,"normal"),It=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",X.letterSpacing,"0.33px"),_t=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",X.lineHeight,"1.6"),Lt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",X.textTransform,"inherit"),Rt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",q),Ut=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",X.fontSize,"10px"),Ht=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",X.fontWeight,"normal"),Pt=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",X.letterSpacing,"1.5px"),Vt=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",X.lineHeight,"1.6"),Wt=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",X.textTransform,"uppercase"),Zt={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-button-font-family",q),fontSize:i.FtCssVariableFactory.extend("--ft-typography-button-font-size",X.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",X.fontWeight,"600"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",X.letterSpacing,"1.246px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-button-line-height",X.lineHeight,"1.15"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",X.textTransform,"uppercase")},Kt=e.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
15
|
font-family: ${Y};
|
|
16
16
|
font-size: ${J};
|
|
@@ -71,12 +71,12 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
71
71
|
font-size: ${jt};
|
|
72
72
|
font-weight: ${Et};
|
|
73
73
|
letter-spacing: ${Dt};
|
|
74
|
-
line-height: ${
|
|
75
|
-
text-transform: ${
|
|
74
|
+
line-height: ${Nt};
|
|
75
|
+
text-transform: ${Tt};
|
|
76
76
|
}
|
|
77
77
|
`,ti=e.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
|
-
font-family: ${
|
|
79
|
+
font-family: ${Mt};
|
|
80
80
|
font-size: ${Ft};
|
|
81
81
|
font-weight: ${At};
|
|
82
82
|
letter-spacing: ${It};
|
|
@@ -86,9 +86,9 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
86
86
|
`,ii=e.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
88
|
font-family: ${Rt};
|
|
89
|
-
font-size: ${
|
|
90
|
-
font-weight: ${
|
|
91
|
-
letter-spacing: ${
|
|
89
|
+
font-size: ${Ut};
|
|
90
|
+
font-weight: ${Ht};
|
|
91
|
+
letter-spacing: ${Pt};
|
|
92
92
|
line-height: ${Vt};
|
|
93
93
|
text-transform: ${Wt};
|
|
94
94
|
}
|
|
@@ -102,10 +102,10 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
102
102
|
text-transform: ${Zt.textTransform};
|
|
103
103
|
}
|
|
104
104
|
`;class oi extends i.FtLitElement{constructor(){super(...arguments),this.variant=Z.body1}render(){return this.element?W`
|
|
105
|
-
<${
|
|
105
|
+
<${P(this.element)}
|
|
106
106
|
class="ft-typography ft-typography--${this.variant}">
|
|
107
107
|
<slot></slot>
|
|
108
|
-
</${
|
|
108
|
+
</${P(this.element)}>
|
|
109
109
|
`:W`
|
|
110
110
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
111
111
|
`}}function si(t,i){return t.flatMap((t=>[t,...si(i(t),i)]))}oi.styles=[Kt,Gt,qt,Xt,Yt,Jt,Qt,ti,ii,ei,e.css`
|
|
@@ -218,7 +218,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
218
218
|
opacity: ${li.opacityContentOnSurfacePressed};
|
|
219
219
|
transform: translate(-50%, -50%) scale(1);
|
|
220
220
|
}
|
|
221
|
-
`,ri([o.property({type:Boolean})],ui.prototype,"primary",void 0),ri([o.property({type:Boolean})],ui.prototype,"secondary",void 0),ri([o.property({type:Boolean})],ui.prototype,"unbounded",void 0),ri([o.property({type:Boolean})],ui.prototype,"activated",void 0),ri([o.property({type:Boolean})],ui.prototype,"selected",void 0),ri([o.property({type:Boolean})],ui.prototype,"disabled",void 0),ri([o.state()],ui.prototype,"hovered",void 0),ri([o.state()],ui.prototype,"focused",void 0),ri([o.state()],ui.prototype,"pressed",void 0),ri([o.state()],ui.prototype,"rippling",void 0),ri([o.state()],ui.prototype,"rippleSize",void 0),ri([o.state()],ui.prototype,"originX",void 0),ri([o.state()],ui.prototype,"originY",void 0),ri([o.query(".ft-ripple")],ui.prototype,"ripple",void 0),ri([o.query(".ft-ripple--effect")],ui.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(ui);var vi=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};const bi=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),gi=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),xi=i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),yi=i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),mi=i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system");class
|
|
221
|
+
`,ri([o.property({type:Boolean})],ui.prototype,"primary",void 0),ri([o.property({type:Boolean})],ui.prototype,"secondary",void 0),ri([o.property({type:Boolean})],ui.prototype,"unbounded",void 0),ri([o.property({type:Boolean})],ui.prototype,"activated",void 0),ri([o.property({type:Boolean})],ui.prototype,"selected",void 0),ri([o.property({type:Boolean})],ui.prototype,"disabled",void 0),ri([o.state()],ui.prototype,"hovered",void 0),ri([o.state()],ui.prototype,"focused",void 0),ri([o.state()],ui.prototype,"pressed",void 0),ri([o.state()],ui.prototype,"rippling",void 0),ri([o.state()],ui.prototype,"rippleSize",void 0),ri([o.state()],ui.prototype,"originX",void 0),ri([o.state()],ui.prototype,"originY",void 0),ri([o.query(".ft-ripple")],ui.prototype,"ripple",void 0),ri([o.query(".ft-ripple--effect")],ui.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(ui);var vi=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};const bi=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),gi=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),xi=i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),yi=i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),mi=i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),$i=i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px");class ki extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}render(){return e.html`
|
|
222
222
|
<div part="container"
|
|
223
223
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
224
224
|
@mouseenter=${this.onHover}
|
|
@@ -228,12 +228,13 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
228
228
|
@touchstart=${this.onTouch}>
|
|
229
229
|
<div part="tooltip" class="ft-tooltip ft-tooltip--${this.position}" ?hidden=${!this.visible}>
|
|
230
230
|
<div part="tooltip-content" class="ft-tooltip--content">
|
|
231
|
-
<
|
|
231
|
+
<slot name="text"></slot>
|
|
232
|
+
<ft-typography variant="caption" ?hidden=${!this.text}>${this.text}</ft-typography>
|
|
232
233
|
</div>
|
|
233
234
|
</div>
|
|
234
235
|
<slot></slot>
|
|
235
236
|
</div>
|
|
236
|
-
`}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 i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,r=0;switch(this.position){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=i.height,s=o;break;case"left":r=e,s=-this.tooltip.clientWidth;break;case"right":r=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=0);const n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth
|
|
237
|
+
`}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 i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,r=0;switch(this.position){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=i.height,s=o;break;case"left":r=e,s=-this.tooltip.clientWidth;break;case"right":r=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=0);const n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${i.width}px, ${$i})`}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())}}ki.elementDefinitions={"ft-typography":oi},ki.styles=e.css`
|
|
237
238
|
.ft-tooltip--container {
|
|
238
239
|
display: block;
|
|
239
240
|
position: relative;
|
|
@@ -249,7 +250,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
249
250
|
box-sizing: border-box;
|
|
250
251
|
overflow: hidden;
|
|
251
252
|
width: max-content;
|
|
252
|
-
max-width:
|
|
253
|
+
max-width: ${$i};
|
|
253
254
|
text-align: center;
|
|
254
255
|
padding: ${bi};
|
|
255
256
|
z-index: ${yi};
|
|
@@ -265,7 +266,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
265
266
|
position: relative;
|
|
266
267
|
word-break: break-word;
|
|
267
268
|
}
|
|
268
|
-
`,vi([o.property()]
|
|
269
|
+
`,vi([o.property()],ki.prototype,"text",void 0),vi([o.property({type:Boolean})],ki.prototype,"manual",void 0),vi([o.property({type:Boolean})],ki.prototype,"inline",void 0),vi([o.property({type:Number})],ki.prototype,"delay",void 0),vi([o.property()],ki.prototype,"position",void 0),vi([o.queryAssignedNodes("",!0)],ki.prototype,"slotNodes",void 0),vi([o.query(".ft-tooltip--container")],ki.prototype,"container",void 0),vi([o.query("slot")],ki.prototype,"target",void 0),vi([o.query(".ft-tooltip")],ki.prototype,"tooltip",void 0),vi([o.query(".ft-tooltip--content")],ki.prototype,"tooltipContent",void 0),vi([o.state()],ki.prototype,"visible",void 0),i.customElement("ft-tooltip")(ki);const wi={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")};class zi extends i.FtLitElement{static get styles(){return e.css`
|
|
269
270
|
:host {
|
|
270
271
|
line-height: 0;
|
|
271
272
|
}
|
|
@@ -274,8 +275,8 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
274
275
|
display: inline-block;
|
|
275
276
|
position: relative;
|
|
276
277
|
|
|
277
|
-
width: ${
|
|
278
|
-
height: ${
|
|
278
|
+
width: ${wi.size};
|
|
279
|
+
height: ${wi.size};
|
|
279
280
|
}
|
|
280
281
|
|
|
281
282
|
.ft-loader div {
|
|
@@ -284,7 +285,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
284
285
|
width: 25%;
|
|
285
286
|
height: 25%;
|
|
286
287
|
border-radius: 50%;
|
|
287
|
-
background: ${
|
|
288
|
+
background: ${wi.color};
|
|
288
289
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
289
290
|
}
|
|
290
291
|
|
|
@@ -331,7 +332,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
331
332
|
transform: translate(0, 0);
|
|
332
333
|
}
|
|
333
334
|
100% {
|
|
334
|
-
transform: translate(calc(0.35 * ${
|
|
335
|
+
transform: translate(calc(0.35 * ${wi.size}), 0);
|
|
335
336
|
}
|
|
336
337
|
}
|
|
337
338
|
`}render(){return e.html`
|
|
@@ -341,19 +342,19 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
341
342
|
<div></div>
|
|
342
343
|
<div></div>
|
|
343
344
|
</div>
|
|
344
|
-
`}}var
|
|
345
|
+
`}}var Si,Oi;i.customElement("ft-loader")(zi),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=""}(Si||(Si={})),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=""}(Oi||(Oi={})),new Map([...["abw"].map((t=>[t,Oi.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,Oi.AUDIO])),...["avi"].map((t=>[t,Oi.AVI])),...["chm","xhs"].map((t=>[t,Oi.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,Oi.CODE])),...["csv"].map((t=>[t,Oi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Oi.DITA])),...["epub"].map((t=>[t,Oi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Oi.EXCEL])),...["flac"].map((t=>[t,Oi.FLAC])),...["gif"].map((t=>[t,Oi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Oi.GZIP])),...["html","htm","xhtml"].map((t=>[t,Oi.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,Oi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Oi.JPEG])),...["json"].map((t=>[t,Oi.JSON])),...["m4a","m4p"].map((t=>[t,Oi.M4A])),...["mov","qt"].map((t=>[t,Oi.MOV])),...["mp3"].map((t=>[t,Oi.MP3])),...["mp4","m4v"].map((t=>[t,Oi.MP4])),...["ogg","oga"].map((t=>[t,Oi.OGG])),...["pdf","ps"].map((t=>[t,Oi.PDF])),...["png"].map((t=>[t,Oi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Oi.POWERPOINT])),...["rar"].map((t=>[t,Oi.RAR])),...["stp"].map((t=>[t,Oi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Oi.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,Oi.VIDEO])),...["wav"].map((t=>[t,Oi.WAV])),...["wma"].map((t=>[t,Oi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Oi.WORD])),...["xml","xsl","rdf"].map((t=>[t,Oi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Oi.YAML])),...["zip"].map((t=>[t,Oi.ZIP]))]);var Ci,Bi=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ci||(Ci={}));const ji={size:i.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:i.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:i.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:i.FtCssVariableFactory.extend("--ft-icon-material-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:i.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")};class Ei extends i.FtLitElement{constructor(){super(...arguments),this.variant=Ci.fluid_topics}getStyles(){return e.css`
|
|
345
346
|
:host {
|
|
346
347
|
display: inline-block;
|
|
347
348
|
}
|
|
348
349
|
|
|
349
350
|
:host, i.ft-icon {
|
|
350
|
-
width: ${
|
|
351
|
-
height: ${
|
|
351
|
+
width: ${ji.size};
|
|
352
|
+
height: ${ji.size};
|
|
352
353
|
text-align: center;
|
|
353
354
|
}
|
|
354
355
|
|
|
355
356
|
i.ft-icon {
|
|
356
|
-
font-size: ${
|
|
357
|
+
font-size: ${ji.size};
|
|
357
358
|
line-height: 1;
|
|
358
359
|
font-weight: normal;
|
|
359
360
|
text-transform: none;
|
|
@@ -364,25 +365,26 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
364
365
|
text-rendering: auto;
|
|
365
366
|
-webkit-font-smoothing: antialiased;
|
|
366
367
|
-moz-osx-font-smoothing: grayscale;
|
|
368
|
+
vertical-align: ${ji.verticalAlign};
|
|
367
369
|
}
|
|
368
370
|
|
|
369
371
|
.ft-icon--fluid-topics {
|
|
370
|
-
font-family: ${
|
|
372
|
+
font-family: ${ji.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
371
373
|
}
|
|
372
374
|
|
|
373
375
|
.ft-icon--file-format {
|
|
374
|
-
font-family: ${
|
|
376
|
+
font-family: ${ji.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
375
377
|
}
|
|
376
378
|
|
|
377
379
|
.ft-icon--material {
|
|
378
|
-
font-family: ${
|
|
380
|
+
font-family: ${ji.materialFontFamily}, "Material Icons", sans-serif;
|
|
379
381
|
}
|
|
380
382
|
`}getTemplate(){return e.html`
|
|
381
383
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
382
384
|
${n.unsafeHTML(this.getIcon())}
|
|
383
385
|
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
384
386
|
</i>
|
|
385
|
-
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}getIcon(){var t,i;let o=this.textContent;return this.variant===
|
|
387
|
+
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}getIcon(){var t,i;let o=this.textContent;return this.variant===Ci.file_format?null!==(t=Oi[o.toUpperCase()])&&void 0!==t?t:o:this.variant===Ci.fluid_topics?null!==(i=Si[o.toUpperCase()])&&void 0!==i?i:o:e.nothing}}Ei.elementDefinitions={},Bi([o.property()],Ei.prototype,"variant",void 0),Bi([o.query("slot")],Ei.prototype,"slottedContent",void 0),i.customElement("ft-icon")(Ei);var Di=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};const Ni=i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorPrimary),Ti={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:Ni,fontSize:i.FtCssVariableFactory.extend("--ft-button-font-size",Zt.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariableFactory.extend("--ft-button-ripple-color",Ni),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Mi=i.FtCssVariableFactory.extend("--ft-button-primary-color",i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),Fi={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-primary-background-color",i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:Mi,rippleColor:i.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Mi)},Ai=i.FtCssVariableFactory.extend("--ft-button-dense-border-radius",i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM));class Ii extends i.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[i.noTextSelect,e.css`
|
|
386
388
|
:host {
|
|
387
389
|
display: inline-block;
|
|
388
390
|
max-width: 100%;
|
|
@@ -424,7 +426,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
424
426
|
|
|
425
427
|
--ft-button-internal-line-height: calc(${Ti.fontSize} + 2px);
|
|
426
428
|
--ft-button-internal-color: ${Ti.color};
|
|
427
|
-
${i.setVariable(
|
|
429
|
+
${i.setVariable(ji.size,Ti.iconSize)};
|
|
428
430
|
--ft-button-internal-vertical-padding: 6px;
|
|
429
431
|
--ft-button-internal-horizontal-padding: 8px;
|
|
430
432
|
${i.setVariable(li.color,Ti.rippleColor)};
|
|
@@ -444,7 +446,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
444
446
|
.ft-button--dense {
|
|
445
447
|
--ft-button-internal-vertical-padding: 2px;
|
|
446
448
|
--ft-button-internal-horizontal-padding: 4px;
|
|
447
|
-
border-radius: ${
|
|
449
|
+
border-radius: ${Ai};
|
|
448
450
|
}
|
|
449
451
|
|
|
450
452
|
.ft-button--round {
|
|
@@ -457,9 +459,9 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
457
459
|
}
|
|
458
460
|
|
|
459
461
|
.ft-button.ft-button--primary {
|
|
460
|
-
background-color: ${
|
|
461
|
-
--ft-button-internal-color: ${
|
|
462
|
-
${i.setVariable(li.color,
|
|
462
|
+
background-color: ${Fi.backgroundColor};
|
|
463
|
+
--ft-button-internal-color: ${Fi.color};
|
|
464
|
+
${i.setVariable(li.color,Fi.rippleColor)};
|
|
463
465
|
}
|
|
464
466
|
|
|
465
467
|
.ft-button.ft-button--outlined {
|
|
@@ -512,8 +514,8 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
512
514
|
}
|
|
513
515
|
|
|
514
516
|
ft-loader {
|
|
515
|
-
${i.setVariable(
|
|
516
|
-
${i.setVariable(
|
|
517
|
+
${i.setVariable(wi.size,Ti.iconSize)};
|
|
518
|
+
${i.setVariable(wi.color,"var(--ft-button-internal-color)")};
|
|
517
519
|
}
|
|
518
520
|
`]}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":i.isSafari,"ft-no-text-select":!0};return this.addTooltip(e.html`
|
|
519
521
|
<button part="button"
|
|
@@ -537,7 +539,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
537
539
|
</ft-tooltip>
|
|
538
540
|
`}resolveIcon(){return this.loading?e.html`
|
|
539
541
|
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
540
|
-
<ft-icon variant="material">${this.icon}</ft-icon> `:e.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}}
|
|
542
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:e.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}}Ii.elementDefinitions={"ft-ripple":ui,"ft-tooltip":ki,"ft-typography":oi,"ft-icon":Ei,"ft-loader":zi},Di([o.property({type:Boolean})],Ii.prototype,"primary",void 0),Di([o.property({type:Boolean})],Ii.prototype,"outlined",void 0),Di([o.property({type:Boolean})],Ii.prototype,"disabled",void 0),Di([o.property({type:Boolean})],Ii.prototype,"dense",void 0),Di([o.property({type:Boolean})],Ii.prototype,"round",void 0),Di([o.property({type:String})],Ii.prototype,"label",void 0),Di([o.property({type:String})],Ii.prototype,"icon",void 0),Di([o.property({type:Boolean})],Ii.prototype,"trailingIcon",void 0),Di([o.property({type:Boolean})],Ii.prototype,"loading",void 0),Di([o.property({type:String})],Ii.prototype,"tooltipPosition",void 0),Di([o.query(".ft-button")],Ii.prototype,"button",void 0),Di([o.query(".ft-button--label slot")],Ii.prototype,"slottedContent",void 0),i.customElement("ft-button")(Ii);var _i=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};const Li=i.FtCssVariableFactory.extend("--ft-checkbox-text-color",i.designSystemVariables.colorOnSurfaceHigh),Ri=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),Ui=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),Hi=i.FtCssVariableFactory.extend("--ft-checkbox-border-color",i.designSystemVariables.colorOnSurfaceMedium),Pi=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system");class Vi extends i.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 e.html`
|
|
541
543
|
<label class="${r.classMap(t)}" for="checkbox-input">
|
|
542
544
|
<div class="ft-checkbox--box-container">
|
|
543
545
|
<ft-ripple
|
|
@@ -563,14 +565,14 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
563
565
|
<slot></slot>
|
|
564
566
|
</ft-typography>
|
|
565
567
|
</label>
|
|
566
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}}
|
|
568
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}}Vi.elementDefinitions={"ft-ripple":ui,"ft-typography":oi},Vi.styles=e.css`
|
|
567
569
|
* {
|
|
568
570
|
box-sizing: border-box;
|
|
569
571
|
}
|
|
570
572
|
|
|
571
573
|
.ft-checkbox {
|
|
572
574
|
box-sizing: border-box;
|
|
573
|
-
color: ${
|
|
575
|
+
color: ${Li};
|
|
574
576
|
|
|
575
577
|
display: inline-flex;
|
|
576
578
|
align-items: center;
|
|
@@ -608,14 +610,14 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
608
610
|
width: 18px;
|
|
609
611
|
height: 18px;
|
|
610
612
|
|
|
611
|
-
color: ${
|
|
613
|
+
color: ${Ui};
|
|
612
614
|
}
|
|
613
615
|
|
|
614
616
|
|
|
615
617
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
616
618
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
617
|
-
border-color: ${
|
|
618
|
-
background-color: ${
|
|
619
|
+
border-color: ${Ri};
|
|
620
|
+
background-color: ${Ri};
|
|
619
621
|
}
|
|
620
622
|
|
|
621
623
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
@@ -640,7 +642,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
640
642
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
641
643
|
opacity: 1;
|
|
642
644
|
}
|
|
643
|
-
`,
|
|
645
|
+
`,_i([o.property()],Vi.prototype,"name",void 0),_i([o.property({type:Boolean,reflect:!0})],Vi.prototype,"checked",void 0),_i([o.property({type:Boolean})],Vi.prototype,"indeterminate",void 0),_i([o.property({type:Boolean})],Vi.prototype,"disabled",void 0),_i([o.query(".ft-checkbox")],Vi.prototype,"container",void 0),_i([o.query("ft-ripple")],Vi.prototype,"ripple",void 0),i.customElement("ft-checkbox")(Vi);var Wi=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};const Zi=i.FtCssVariableFactory.extend("--ft-radio-text-color",i.designSystemVariables.colorOnSurfaceHigh),Ki=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),Gi=(i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),i.FtCssVariableFactory.extend("--ft-radio-border-color",i.designSystemVariables.colorOnSurfaceMedium)),qi=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system");class Xi extends CustomEvent{constructor(t,i){super("change",{detail:{value:t,checked:i},bubbles:!0,composed:!0})}}class Yi extends i.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 e.html`
|
|
644
646
|
<div class="${r.classMap(t)}">
|
|
645
647
|
<div class="ft-radio--box-container">
|
|
646
648
|
<ft-ripple
|
|
@@ -665,14 +667,14 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
665
667
|
</ft-typography>
|
|
666
668
|
</label>
|
|
667
669
|
</div>
|
|
668
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
670
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new Xi(this.value,this.checked))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new Xi(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Yi.elementDefinitions={"ft-ripple":ui,"ft-typography":oi},Yi.styles=e.css`
|
|
669
671
|
* {
|
|
670
672
|
box-sizing: border-box;
|
|
671
673
|
}
|
|
672
674
|
|
|
673
675
|
.ft-radio {
|
|
674
676
|
box-sizing: border-box;
|
|
675
|
-
color: ${
|
|
677
|
+
color: ${Zi};
|
|
676
678
|
|
|
677
679
|
display: inline-flex;
|
|
678
680
|
align-items: center;
|
|
@@ -680,7 +682,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
680
682
|
}
|
|
681
683
|
|
|
682
684
|
.ft-radio--disabled {
|
|
683
|
-
color: ${
|
|
685
|
+
color: ${qi};
|
|
684
686
|
}
|
|
685
687
|
|
|
686
688
|
input {
|
|
@@ -703,7 +705,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
703
705
|
}
|
|
704
706
|
|
|
705
707
|
.ft-radio--box {
|
|
706
|
-
border: 2px solid ${
|
|
708
|
+
border: 2px solid ${Gi};
|
|
707
709
|
border-radius: 50%;
|
|
708
710
|
|
|
709
711
|
display: flex;
|
|
@@ -716,7 +718,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
716
718
|
|
|
717
719
|
.ft-radio--box:after {
|
|
718
720
|
content: " ";
|
|
719
|
-
background-color: ${
|
|
721
|
+
background-color: ${Ki};
|
|
720
722
|
|
|
721
723
|
border-radius: 50%;
|
|
722
724
|
|
|
@@ -728,7 +730,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
728
730
|
}
|
|
729
731
|
|
|
730
732
|
.ft-radio--checked .ft-radio--box {
|
|
731
|
-
border-color: ${
|
|
733
|
+
border-color: ${Ki};
|
|
732
734
|
}
|
|
733
735
|
|
|
734
736
|
|
|
@@ -737,24 +739,24 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
737
739
|
}
|
|
738
740
|
|
|
739
741
|
.ft-radio--disabled .ft-radio--box {
|
|
740
|
-
border-color: ${
|
|
742
|
+
border-color: ${qi};
|
|
741
743
|
background-color: transparent;
|
|
742
744
|
}
|
|
743
745
|
|
|
744
746
|
.ft-radio--disabled .ft-radio--box:after {
|
|
745
|
-
background-color: ${
|
|
747
|
+
background-color: ${qi};
|
|
746
748
|
}
|
|
747
|
-
`,
|
|
749
|
+
`,Wi([o.property()],Yi.prototype,"value",void 0),Wi([o.property()],Yi.prototype,"name",void 0),Wi([o.property({type:Boolean,reflect:!0})],Yi.prototype,"checked",void 0),Wi([o.property({type:Boolean})],Yi.prototype,"disabled",void 0),Wi([o.query(".ft-radio")],Yi.prototype,"container",void 0),Wi([o.query("ft-ripple")],Yi.prototype,"ripple",void 0),Wi([o.query("input")],Yi.prototype,"input",void 0);var Ji=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class Qi extends i.FtLitElement{constructor(){super(...arguments),this.name=""}render(){return e.html`
|
|
748
750
|
<slot @slotchange=${this.onSlotChange}
|
|
749
751
|
@change=${this.onChange}
|
|
750
752
|
@keydown=${this.onKeyDown}
|
|
751
753
|
@focusin=${this.focusCurrentValue}
|
|
752
754
|
></slot>
|
|
753
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((i=>i.checked=t.detail.value===i.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let i=this.findFtRadio(t),e=this.radioButtons.indexOf(i)-1;this.radioButtons[e<0?this.radioButtons.length-1:e].select();break}case"ArrowDown":case"ArrowRight":{let i=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[i>this.radioButtons.length-1?0:i].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}
|
|
755
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((i=>i.checked=t.detail.value===i.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let i=this.findFtRadio(t),e=this.radioButtons.indexOf(i)-1;this.radioButtons[e<0?this.radioButtons.length-1:e].select();break}case"ArrowDown":case"ArrowRight":{let i=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[i>this.radioButtons.length-1?0:i].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}Qi.elementDefinitions={},Qi.styles=e.css`
|
|
754
756
|
:host {
|
|
755
757
|
display: contents;
|
|
756
758
|
}
|
|
757
|
-
`,
|
|
759
|
+
`,Ji([o.property()],Qi.prototype,"name",void 0),Ji([o.queryAssignedElements()],Qi.prototype,"radioButtons",void 0),i.customElement("ft-radio")(Yi),i.customElement("ft-radio-group")(Qi);var te=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};const ie={borderRadiusM:i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusM,"Design system"),colorOutline:i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),colorOnSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),fontFamily:i.FtCssVariableFactory.external(Ct.fontFamily,"Body2 typography"),fontSize:i.FtCssVariableFactory.external(Ct.fontSize,"Body2 typography"),fontWeight:i.FtCssVariableFactory.external(Ct.fontWeight,"Body2 typography"),letterSpacing:i.FtCssVariableFactory.external(Ct.letterSpacing,"Body2 typography"),lineHeight:i.FtCssVariableFactory.external(Ct.lineHeight,"Body2 typography"),textTransform:i.FtCssVariableFactory.external(Ct.textTransform,"Body2 typography")};class ee extends i.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,i;return null!==(i=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==i?i: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 i=t.slice(0,this.limit);return e.html`
|
|
758
760
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
759
761
|
${null==this.parent?null:e.html`
|
|
760
762
|
<div tabindex="0"
|
|
@@ -818,7 +820,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
818
820
|
@change=${t=>t.stopPropagation()}>
|
|
819
821
|
${t.label}
|
|
820
822
|
</ft-radio>
|
|
821
|
-
`}onRadioKeyUp(t,i){i.selected&&" "===t.key&&this.optionsChanged(t,i)}optionsChanged(t,i){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:i}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}
|
|
823
|
+
`}onRadioKeyUp(t,i){i.selected&&" "===t.key&&this.optionsChanged(t,i)}optionsChanged(t,i){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:i}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}ee.elementDefinitions={"ft-button":Ii,"ft-ripple":ui,"ft-typography":oi,"ft-checkbox":Vi,"ft-icon":Ei,"ft-radio":Yi},ee.styles=[e.css`
|
|
822
824
|
.ft-filter-level--container {
|
|
823
825
|
display: flex;
|
|
824
826
|
flex-direction: column;
|
|
@@ -832,14 +834,14 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
832
834
|
flex-shrink: 0;
|
|
833
835
|
text-decoration: none;
|
|
834
836
|
position: relative;
|
|
835
|
-
border-radius: ${
|
|
837
|
+
border-radius: ${ie.borderRadiusM};
|
|
836
838
|
overflow: hidden;
|
|
837
839
|
display: flex;
|
|
838
840
|
align-items: center;
|
|
839
841
|
padding: 4px 4px;
|
|
840
842
|
gap: 4px;
|
|
841
843
|
cursor: pointer;
|
|
842
|
-
color: ${
|
|
844
|
+
color: ${ie.colorOnSurface};
|
|
843
845
|
}
|
|
844
846
|
|
|
845
847
|
.ft-filter-level--go-back:focus {
|
|
@@ -868,7 +870,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
868
870
|
}
|
|
869
871
|
|
|
870
872
|
ft-button {
|
|
871
|
-
${i.setVariable(Ti.color,
|
|
873
|
+
${i.setVariable(Ti.color,ie.colorOnSurface)};
|
|
872
874
|
}
|
|
873
875
|
|
|
874
876
|
ft-radio, ft-checkbox {
|
|
@@ -882,9 +884,9 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
882
884
|
|
|
883
885
|
.ft-filter-level--no-values {
|
|
884
886
|
margin: 10px 0;
|
|
885
|
-
color: ${
|
|
887
|
+
color: ${ie.colorOnSurfaceMedium};
|
|
886
888
|
}
|
|
887
|
-
`],
|
|
889
|
+
`],te([o.property({type:String})],ee.prototype,"id",void 0),te([o.property({type:Object})],ee.prototype,"parent",void 0),te([o.property({type:Array})],ee.prototype,"options",void 0),te([o.property({type:Boolean})],ee.prototype,"multivalued",void 0),te([o.property({type:Boolean})],ee.prototype,"disabled",void 0),te([o.property({type:Boolean})],ee.prototype,"hideSelectedOptions",void 0),te([o.property({type:Boolean})],ee.prototype,"preventNavigation",void 0),te([o.property({type:String})],ee.prototype,"filter",void 0),te([o.property({type:String})],ee.prototype,"moreValuesButtonLabel",void 0),te([o.property({type:String})],ee.prototype,"noValuesLabel",void 0),te([o.property({type:Number})],ee.prototype,"displayedValuesLimit",void 0),te([o.query(".ft-filter-level--container")],ee.prototype,"container",void 0),te([o.state()],ee.prototype,"displayedPages",void 0);var oe=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};const se={buttonsColor:i.FtCssVariableFactory.extend("--ft-snap-scroll-buttons-color",i.designSystemVariables.colorPrimary),buttonsZIndex:i.FtCssVariableFactory.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:i.FtCssVariableFactory.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system")};class re extends CustomEvent{constructor(t,i){super("current-element-change",{detail:{index:t,element:i}})}}class ne extends i.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 i.Debouncer(200),this.updateScrollDebouncer=new i.Debouncer(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let i=this.elements[t];if(i){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,e=this.contentSlot[this.scrollAttribute]+this.prevSize;(i[this.offsetAttribute]<e||i[this.offsetAttribute]+i[this.sizeAttribute]>t)&&this.scrollToElement(i)}}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=r.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":i.isSafari}),o=this.controls&&this.withScroll;return e.html`
|
|
888
890
|
<div part="container" class="${t}">
|
|
889
891
|
<ft-button
|
|
890
892
|
class="ft-snap-scroll--previous"
|
|
@@ -908,7 +910,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
908
910
|
@click=${this.next}
|
|
909
911
|
></ft-button>
|
|
910
912
|
</div>
|
|
911
|
-
`}updated(t){var i;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===(i=this.listenedContainer)||void 0===i||i.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
|
|
913
|
+
`}updated(t){var i;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===(i=this.listenedContainer)||void 0===i||i.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 re(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const i=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<i&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var i,e;t&&(this.horizontal?null===(i=this.contentSlot)||void 0===i||i.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(e=this.contentSlot)||void 0===e||e.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,i;this.elements=null!==(i=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==i?i:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let i=0;i<this.elements.length;i++)(t<0||this.getDistanceFromStart(this.elements[i])<this.getDistanceFromStart(this.elements[t]))&&(t=i);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 i=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-i)}}ne.elementDefinitions={"ft-button":Ii},ne.styles=e.css`
|
|
912
914
|
.ft-snap-scroll {
|
|
913
915
|
box-sizing: border-box;
|
|
914
916
|
position: relative;
|
|
@@ -943,7 +945,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
943
945
|
flex-wrap: nowrap;
|
|
944
946
|
align-items: flex-start;
|
|
945
947
|
justify-content: flex-start;
|
|
946
|
-
gap: ${
|
|
948
|
+
gap: ${se.gap};
|
|
947
949
|
}
|
|
948
950
|
|
|
949
951
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -986,11 +988,11 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
986
988
|
.ft-snap-scroll--next {
|
|
987
989
|
position: absolute;
|
|
988
990
|
display: flex;
|
|
989
|
-
z-index: ${
|
|
991
|
+
z-index: ${se.buttonsZIndex};
|
|
990
992
|
opacity: 1;
|
|
991
993
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
992
994
|
${i.setVariable(Ti.backgroundColor,"transparent")};
|
|
993
|
-
${i.setVariable(Ti.color,
|
|
995
|
+
${i.setVariable(Ti.color,se.buttonsColor)};
|
|
994
996
|
}
|
|
995
997
|
|
|
996
998
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1003,37 +1005,37 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
1003
1005
|
top: 0;
|
|
1004
1006
|
left: -1px;
|
|
1005
1007
|
bottom: 0;
|
|
1006
|
-
background: linear-gradient(to right, ${
|
|
1008
|
+
background: linear-gradient(to right, ${se.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1007
1009
|
}
|
|
1008
1010
|
|
|
1009
1011
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1010
1012
|
top: -1px;
|
|
1011
1013
|
left: 0;
|
|
1012
1014
|
right: 0;
|
|
1013
|
-
background: linear-gradient(to bottom, ${
|
|
1015
|
+
background: linear-gradient(to bottom, ${se.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1014
1016
|
}
|
|
1015
1017
|
|
|
1016
1018
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1017
1019
|
top: 0;
|
|
1018
1020
|
right: -1px;
|
|
1019
1021
|
bottom: 0;
|
|
1020
|
-
background: linear-gradient(to left, ${
|
|
1022
|
+
background: linear-gradient(to left, ${se.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1021
1023
|
}
|
|
1022
1024
|
|
|
1023
1025
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1024
1026
|
left: 0;
|
|
1025
1027
|
right: 0;
|
|
1026
1028
|
bottom: -1px;
|
|
1027
|
-
background: linear-gradient(to top, ${
|
|
1029
|
+
background: linear-gradient(to top, ${se.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1028
1030
|
}
|
|
1029
1031
|
|
|
1030
1032
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1031
1033
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1032
1034
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1033
1035
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1034
|
-
background-color: ${
|
|
1036
|
+
background-color: ${se.colorSurface};
|
|
1035
1037
|
}
|
|
1036
|
-
`,
|
|
1038
|
+
`,oe([o.property({type:Boolean})],ne.prototype,"horizontal",void 0),oe([o.property({type:Boolean})],ne.prototype,"hideScrollbar",void 0),oe([o.property({type:Boolean})],ne.prototype,"controls",void 0),oe([o.property({type:Boolean})],ne.prototype,"limitSize",void 0),oe([o.state()],ne.prototype,"elements",void 0),oe([o.state()],ne.prototype,"currentElement",void 0),oe([o.state()],ne.prototype,"withScroll",void 0),oe([o.state()],ne.prototype,"startReached",void 0),oe([o.state()],ne.prototype,"endReached",void 0),oe([o.query(".ft-snap-scroll--content")],ne.prototype,"contentSlot",void 0),i.customElement("ft-snap-scroll")(ne);var le=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};const ae={colorOutline:i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),colorOnSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),colorSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system"),transitionDuration:i.FtCssVariableFactory.external(i.designSystemVariables.transitionDuration,"Design system"),transitionTimingFunction:i.FtCssVariableFactory.external(i.designSystemVariables.transitionTimingFunction,"Design system")};class he extends CustomEvent{constructor(t){super("change",{detail:t})}}class pe extends i.FtLitElement{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",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 i.Debouncer(300),this.changeDebouncer=new i.Debouncer(10)}get flatOptions(){return si(this.options,(t=>{var i;return null!==(i=t.subOptions)&&void 0!==i?i:[]}))}render(){var t,i;const o=this.flatOptions.some((t=>t.selected));let s=this.withScroll||this.filter||null!==(i=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==i&&i;return e.html`
|
|
1037
1039
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1038
1040
|
part="container">
|
|
1039
1041
|
${this.label||o?e.html`
|
|
@@ -1102,7 +1104,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
1102
1104
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1103
1105
|
noValuesLabel="${this.noValuesLabel}"
|
|
1104
1106
|
></ft-filter-level>
|
|
1105
|
-
`}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 i;t.stopPropagation();const e=this.flatOptions.find((i=>i.value===t.detail.value));e.selected=!e.selected;const o=t=>{var i;t!==e&&(t.selected=!1),null===(i=t.subOptions)||void 0===i||i.forEach(o)};this.multivalued?null===(i=e.subOptions)||void 0===i||i.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;const i=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new
|
|
1107
|
+
`}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 i;t.stopPropagation();const e=this.flatOptions.find((i=>i.value===t.detail.value));e.selected=!e.selected;const o=t=>{var i;t!==e&&(t.selected=!1),null===(i=t.subOptions)||void 0===i||i.forEach(o)};this.multivalued?null===(i=e.subOptions)||void 0===i||i.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;const i=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new he(i)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,i;this.filter=null!==(i=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==i?i:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}pe.elementDefinitions={"ft-button":Ii,"ft-filter-level":ee,"ft-snap-scroll":ne,"ft-typography":oi},pe.styles=[Qt,e.css`
|
|
1106
1108
|
:host {
|
|
1107
1109
|
display: flex;
|
|
1108
1110
|
max-height: 100%;
|
|
@@ -1115,7 +1117,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
1115
1117
|
flex-direction: column;
|
|
1116
1118
|
max-height: 100%;
|
|
1117
1119
|
max-width: 100%;
|
|
1118
|
-
color: ${
|
|
1120
|
+
color: ${ae.colorOnSurface};
|
|
1119
1121
|
}
|
|
1120
1122
|
|
|
1121
1123
|
.ft-filter--header {
|
|
@@ -1151,8 +1153,8 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
1151
1153
|
padding: 0 10px;
|
|
1152
1154
|
overflow: hidden;
|
|
1153
1155
|
height: 32px;
|
|
1154
|
-
transition: height ${
|
|
1155
|
-
margin ${
|
|
1156
|
+
transition: height ${ae.transitionDuration} ${ae.transitionTimingFunction},
|
|
1157
|
+
margin ${ae.transitionDuration} ${ae.transitionTimingFunction};
|
|
1156
1158
|
transition-delay: 500ms;
|
|
1157
1159
|
}
|
|
1158
1160
|
|
|
@@ -1165,15 +1167,15 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
1165
1167
|
display: block;
|
|
1166
1168
|
width: 100%;
|
|
1167
1169
|
border-radius: 4px;
|
|
1168
|
-
border: 1px solid ${
|
|
1170
|
+
border: 1px solid ${ae.colorOutline};
|
|
1169
1171
|
padding: 4px;
|
|
1170
|
-
background-color: ${
|
|
1171
|
-
color: ${
|
|
1172
|
-
outline-color: ${
|
|
1172
|
+
background-color: ${ae.colorSurface};
|
|
1173
|
+
color: ${ae.colorOnSurface};
|
|
1174
|
+
outline-color: ${ae.colorPrimary};
|
|
1173
1175
|
}
|
|
1174
1176
|
|
|
1175
1177
|
input::placeholder {
|
|
1176
|
-
color: ${
|
|
1178
|
+
color: ${ae.colorOnSurfaceMedium};
|
|
1177
1179
|
}
|
|
1178
1180
|
|
|
1179
1181
|
.ft-filter--values {
|
|
@@ -1185,7 +1187,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
1185
1187
|
}
|
|
1186
1188
|
|
|
1187
1189
|
.ft-filter--separator {
|
|
1188
|
-
border-top: 1px solid ${
|
|
1190
|
+
border-top: 1px solid ${ae.colorOutline};
|
|
1189
1191
|
margin: 4px 10px;
|
|
1190
1192
|
}
|
|
1191
1193
|
|
|
@@ -1210,6 +1212,6 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
1210
1212
|
slot {
|
|
1211
1213
|
display: none;
|
|
1212
1214
|
}
|
|
1213
|
-
`],
|
|
1215
|
+
`],le([o.property({type:String})],pe.prototype,"id",void 0),le([o.property({type:String})],pe.prototype,"label",void 0),le([o.property({type:String})],pe.prototype,"filterPlaceHolder",void 0),le([o.property({type:String})],pe.prototype,"clearButtonLabel",void 0),le([o.property({type:String})],pe.prototype,"moreValuesButtonLabel",void 0),le([o.property({type:String})],pe.prototype,"noValuesLabel",void 0),le([i.jsonProperty([])],pe.prototype,"options",void 0),le([o.property({type:Boolean})],pe.prototype,"multivalued",void 0),le([o.property({type:Boolean})],pe.prototype,"disabled",void 0),le([o.property({type:Boolean})],pe.prototype,"raiseSelectedOptions",void 0),le([o.property({type:Number})],pe.prototype,"displayedValuesLimit",void 0),le([o.query(".ft-filter--slot")],pe.prototype,"slotElement",void 0),le([o.query(".ft-filter--container")],pe.prototype,"container",void 0),le([o.query(".ft-filter--values")],pe.prototype,"valuesContainer",void 0),le([o.query(".ft-filter--levels")],pe.prototype,"levelsContainer",void 0),le([o.query(".ft-filter--levels ft-filter-level:last-child")],pe.prototype,"lastLevel",void 0),le([o.query(".ft-filter--filter input")],pe.prototype,"filterInput",void 0),le([o.queryAll(".ft-filter--levels ft-filter-level")],pe.prototype,"levels",void 0),le([o.state()],pe.prototype,"withScroll",void 0),le([o.state()],pe.prototype,"filter",void 0),le([o.state()],pe.prototype,"slideIn",void 0),le([o.state()],pe.prototype,"slideOut",void 0);var fe=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class ce extends i.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return e.html`
|
|
1214
1216
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1215
|
-
`}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}))}}
|
|
1217
|
+
`}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}))}}ce.elementDefinitions={},fe([o.property({type:String})],ce.prototype,"label",void 0),fe([o.property({type:Object,converter:t=>t})],ce.prototype,"value",void 0),fe([o.property({type:Boolean,reflect:!0})],ce.prototype,"selected",void 0),fe([o.property({type:Object})],ce.prototype,"subOptions",void 0),fe([o.query(".ft-filter-option--slot")],ce.prototype,"slotElement",void 0),i.customElement("ft-filter")(pe),i.customElement("ft-filter-option")(ce),t.FtFilter=pe,t.FtFilterChangeEvent=he,t.FtFilterCssVariables=ae,t.FtFilterOption=ce,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|