@fluid-topics/ft-filter 1.0.35 → 1.0.37
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-level.js +40 -36
- package/build/ft-filter.js +15 -13
- package/build/ft-filter.light.js +110 -110
- package/build/ft-filter.min.js +96 -96
- package/package.json +10 -10
package/build/ft-filter.light.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
!function(t,i,e,o,s,r
|
|
1
|
+
!function(t,i,e,o,s,n,r){
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var l;const a=window,h=a.trustedTypes,p=h?h.createPolicy("lit-html",{createHTML:t=>t}):void 0,f="$lit$",c=`lit$${(Math.random()+"").slice(9)}$`,d="?"+c,u=`<${d}>`,v=document,x=()=>v.createComment(""),b=t=>null===t||"object"!=typeof t&&"function"!=typeof t,g=Array.isArray,y="[ \t\n\f\r]",m=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,k=/>/g,w=RegExp(`>|${y}(?:([^\\s"'>=/]+)(${y}*=${y}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),z=/'/g,S=/"/g,O=/^(?:script|style|textarea|title)$/i,C=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),B=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),E=new WeakMap,I=v.createTreeWalker(v,129,null,!1),
|
|
7
|
+
var l;const a=window,h=a.trustedTypes,p=h?h.createPolicy("lit-html",{createHTML:t=>t}):void 0,f="$lit$",c=`lit$${(Math.random()+"").slice(9)}$`,d="?"+c,u=`<${d}>`,v=document,x=()=>v.createComment(""),b=t=>null===t||"object"!=typeof t&&"function"!=typeof t,g=Array.isArray,y="[ \t\n\f\r]",m=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,k=/>/g,w=RegExp(`>|${y}(?:([^\\s"'>=/]+)(${y}*=${y}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),z=/'/g,S=/"/g,O=/^(?:script|style|textarea|title)$/i,C=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),B=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),E=new WeakMap,I=v.createTreeWalker(v,129,null,!1),T=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=m;for(let i=0;i<e;i++){const e=t[i];let l,a,h=-1,p=0;for(;p<e.length&&(r.lastIndex=p,a=r.exec(e),null!==a);)p=r.lastIndex,r===m?"!--"===a[1]?r=$:void 0!==a[1]?r=k:void 0!==a[2]?(O.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=w):void 0!==a[3]&&(r=w):r===w?">"===a[0]?(r=null!=s?s:m,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?w:'"'===a[3]?S:z):r===S||r===z?r=w:r===$||r===k?r=m:(r=w,s=void 0);const d=r===w&&t[i+1].startsWith("/>")?" ":"";n+=r===m?e+u:h>=0?(o.push(l),e.slice(0,h)+f+e.slice(h)+c+d):e+c+(-2===h?(o.push(void 0),i):d)}const l=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==p?p.createHTML(l):l,o]};class N{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,p]=T(t,i);if(this.el=N.createElement(a,e),I.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=I.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith(f)||i.startsWith(c)){const e=p[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+f).split(c),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?M:"?"===i[1]?L:"@"===i[1]?H:R})}else l.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(O.test(o.tagName)){const t=o.textContent.split(c),i=t.length-1;if(i>0){o.textContent=h?h.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],x()),I.nextNode(),l.push({type:2,index:++s});o.append(t[i],x())}}}else if(8===o.nodeType)if(o.data===d)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(c,t+1));)l.push({type:7,index:s}),t+=c.length-1}s++}}static createElement(t,i){const e=v.createElement("template");return e.innerHTML=t,e}}function D(t,i,e=t,o){var s,n,r,l;if(i===B)return i;let a=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const h=b(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,e,o)),void 0!==o?(null!==(r=(l=e)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:e._$Cl=a),void 0!==a&&(i=D(t,a._$AS(t,i.values),a,o)),i}class A{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:v).importNode(e,!0);I.currentNode=s;let n=I.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new F(n,n.nextSibling,this,t):1===a.type?i=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(i=new U(n,this,t)),this._$AV.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=I.nextNode(),r++)}return s}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class F{constructor(t,i,e,o){var s;this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=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._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0: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),b(t)?t===j||null==t||""===t?(this._$AH!==j&&this._$AR(),this._$AH=j):t!==this._$AH&&t!==B&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>g(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==j&&b(this._$AH)?this._$AA.nextSibling.data=t:this.$(v.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=N.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.v(e);else{const t=new A(s,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=E.get(t.strings);return void 0===i&&E.set(t.strings,i=new N(t)),i}T(t){g(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 F(this.k(x()),this.k(x()),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._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class R{constructor(t,i,e,o,s){this.type=1,this._$AH=j,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=j}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let n=!1;if(void 0===s)t=D(this,t,i,0),n=!b(t)||t!==this._$AH&&t!==B,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=D(this,o[e+r],i,r),l===B&&(l=this._$AH[r]),n||(n=!b(l)||l!==this._$AH[r]),l===j?t=j:t!==j&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.j(t)}j(t){t===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class M extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===j?void 0:t}}const _=h?h.emptyScript:"";class L extends R{constructor(){super(...arguments),this.type=4}j(t){t&&t!==j?this.element.setAttribute(this.name,_):this.element.removeAttribute(this.name)}}class H extends R{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:j)===B)return;const o=this._$AH,s=t===j&&o!==j||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==j&&(o===j||s);s&&this.element.removeEventListener(this.name,this,o),n&&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 U{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 V=a.litHtmlPolyfillSupport;null==V||V(N,F),(null!==(l=a.litHtmlVersions)&&void 0!==l?l:a.litHtmlVersions=[]).push("2.7.3");
|
|
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 Z=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t._$litStatic$},P=t=>({_$litStatic$:t,r:Z}),K=new Map,G=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],l=[];let a,h=0,p=!1;for(;h<o;){for(a=i[h];h<o&&void 0!==(n=e[h],s=W(n));)a+=s+i[++h],p=!0;h!==o&&l.push(n),r.push(a),h++}if(h===o&&r.push(i[o]),p){const t=r.join("$$lit$$");void 0===(i=K.get(t))&&(r.raw=r,K.set(t,i=r)),e=l}return t(i,...e)})(C);var q;!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"}(q||(q={}));const X=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),Y=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),J={fontFamily:Y,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")},Q=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",X),tt=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",J.fontSize,"20px"),it=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",J.fontWeight,"normal"),et=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",J.letterSpacing,"0.15px"),ot=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",J.lineHeight,"1.2"),st=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",J.textTransform,"inherit"),nt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",X),rt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",J.fontSize,"14px"),lt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",J.fontWeight,"normal"),at=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",J.letterSpacing,"0.105px"),ht=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",J.lineHeight,"1.7"),pt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",J.textTransform,"inherit"),ft=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",Y),ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",J.fontSize,"16px"),dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",J.fontWeight,"600"),ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",J.letterSpacing,"0.144px"),vt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",J.lineHeight,"1.5"),xt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",J.textTransform,"inherit"),bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",Y),gt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",J.fontSize,"14px"),yt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",J.fontWeight,"normal"),mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",J.letterSpacing,"0.098px"),$t=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",J.lineHeight,"1.7"),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",J.textTransform,"inherit"),wt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",Y),zt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",J.fontSize,"16px"),St=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",J.fontWeight,"normal"),Ot=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",J.letterSpacing,"0.496px"),Ct=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",J.lineHeight,"1.5"),Bt=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",J.textTransform,"inherit"),jt={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",Y),fontSize:i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",J.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",J.fontWeight,"normal"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",J.letterSpacing,"0.252px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",J.lineHeight,"1.4"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",J.textTransform,"inherit")},Et=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",Y),It=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",J.fontSize,"12px"),Tt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",J.fontWeight,"normal"),Nt=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",J.letterSpacing,"0.396px"),Dt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",J.lineHeight,"1.33"),At=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",J.textTransform,"inherit"),Ft=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",Y),Rt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",J.fontSize,"10px"),Mt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",J.fontWeight,"normal"),_t=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",J.letterSpacing,"0.33px"),Lt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",J.lineHeight,"1.6"),Ht=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",J.textTransform,"inherit"),Ut=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",Y),Vt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",J.fontSize,"10px"),Zt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",J.fontWeight,"normal"),Wt=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",J.letterSpacing,"1.5px"),Pt=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",J.lineHeight,"1.6"),Kt=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",J.textTransform,"uppercase"),Gt={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-button-font-family",Y),fontSize:i.FtCssVariableFactory.extend("--ft-typography-button-font-size",J.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",J.fontWeight,"600"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",J.letterSpacing,"1.246px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-button-line-height",J.lineHeight,"1.15"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",J.textTransform,"uppercase")},qt=e.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
15
|
font-family: ${Q};
|
|
16
16
|
font-size: ${tt};
|
|
@@ -21,8 +21,8 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
21
21
|
}
|
|
22
22
|
`,Xt=e.css`
|
|
23
23
|
.ft-typography--title-dense {
|
|
24
|
-
font-family: ${
|
|
25
|
-
font-size: ${
|
|
24
|
+
font-family: ${nt};
|
|
25
|
+
font-size: ${rt};
|
|
26
26
|
font-weight: ${lt};
|
|
27
27
|
letter-spacing: ${at};
|
|
28
28
|
line-height: ${ht};
|
|
@@ -69,15 +69,15 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
69
69
|
.ft-typography--caption {
|
|
70
70
|
font-family: ${Et};
|
|
71
71
|
font-size: ${It};
|
|
72
|
-
font-weight: ${
|
|
73
|
-
letter-spacing: ${
|
|
72
|
+
font-weight: ${Tt};
|
|
73
|
+
letter-spacing: ${Nt};
|
|
74
74
|
line-height: ${Dt};
|
|
75
75
|
text-transform: ${At};
|
|
76
76
|
}
|
|
77
77
|
`,ei=e.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
|
-
font-family: ${
|
|
80
|
-
font-size: ${
|
|
79
|
+
font-family: ${Ft};
|
|
80
|
+
font-size: ${Rt};
|
|
81
81
|
font-weight: ${Mt};
|
|
82
82
|
letter-spacing: ${_t};
|
|
83
83
|
line-height: ${Lt};
|
|
@@ -86,8 +86,8 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
86
86
|
`,oi=e.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
88
|
font-family: ${Ut};
|
|
89
|
-
font-size: ${
|
|
90
|
-
font-weight: ${
|
|
89
|
+
font-size: ${Vt};
|
|
90
|
+
font-weight: ${Zt};
|
|
91
91
|
letter-spacing: ${Wt};
|
|
92
92
|
line-height: ${Pt};
|
|
93
93
|
text-transform: ${Kt};
|
|
@@ -101,18 +101,18 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
101
101
|
line-height: ${Gt.lineHeight};
|
|
102
102
|
text-transform: ${Gt.textTransform};
|
|
103
103
|
}
|
|
104
|
-
`,
|
|
104
|
+
`,ni=e.css`
|
|
105
105
|
.ft-typography {
|
|
106
106
|
vertical-align: inherit;
|
|
107
107
|
}
|
|
108
|
-
`;var
|
|
108
|
+
`;var ri=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class li extends i.FtLitElement{constructor(){super(...arguments),this.variant=q.body1}render(){return this.element?G`
|
|
109
109
|
<${P(this.element)}
|
|
110
110
|
class="ft-typography ft-typography--${this.variant}">
|
|
111
111
|
<slot></slot>
|
|
112
112
|
</${P(this.element)}>
|
|
113
113
|
`:G`
|
|
114
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
115
|
-
`}}li.styles=[qt,Xt,Yt,Jt,Qt,ti,ii,ei,oi,si,
|
|
115
|
+
`}}li.styles=[qt,Xt,Yt,Jt,Qt,ti,ii,ei,oi,si,ni],ri([o.property()],li.prototype,"element",void 0),ri([o.property()],li.prototype,"variant",void 0),i.customElement("ft-typography")(li);const ai=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),hi={color:ai,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",ai),opacityContentOnSurfacePressed:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:i.FtCssVariableFactory.create("--ft-ripple-border-radius","SIZE","0px")},pi=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),fi=pi,ci=i.FtCssVariableFactory.extend("--ft-ripple-background-color",pi),di=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),ui=di,vi=i.FtCssVariableFactory.extend("--ft-ripple-background-color",di),xi=e.css`
|
|
116
116
|
:host {
|
|
117
117
|
display: contents;
|
|
118
118
|
}
|
|
@@ -202,7 +202,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
202
202
|
opacity: ${hi.opacityContentOnSurfacePressed};
|
|
203
203
|
transform: translate(-50%, -50%) scale(1);
|
|
204
204
|
}
|
|
205
|
-
`;var bi=function(t,i,e,o){for(var s,
|
|
205
|
+
`;var bi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class gi extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new i.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new i.Debouncer(10),this.moveRipple=t=>{var i,e;let{x:o,y:s}=this.getCoordinates(t),n=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(null==t?void 0:t.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return e.html`
|
|
206
206
|
<style>
|
|
207
207
|
.ft-ripple .ft-ripple--effect,
|
|
208
208
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -215,11 +215,11 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
215
215
|
top: ${this.originY}px;
|
|
216
216
|
}
|
|
217
217
|
</style>
|
|
218
|
-
<div class="${
|
|
218
|
+
<div class="${n.classMap(t)}">
|
|
219
219
|
<div class="ft-ripple--background"></div>
|
|
220
220
|
<div class="ft-ripple--effect"></div>
|
|
221
221
|
</div>
|
|
222
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(i=this.target)&&void 0!==i?i:e),this.setRippleSize()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}gi.elementDefinitions={},gi.styles=xi,bi([o.property({type:Boolean})],gi.prototype,"primary",void 0),bi([o.property({type:Boolean})],gi.prototype,"secondary",void 0),bi([o.property({type:Boolean})],gi.prototype,"unbounded",void 0),bi([o.property({type:Boolean})],gi.prototype,"activated",void 0),bi([o.property({type:Boolean})],gi.prototype,"selected",void 0),bi([o.property({type:Boolean})],gi.prototype,"disabled",void 0),bi([o.state()],gi.prototype,"hovered",void 0),bi([o.state()],gi.prototype,"focused",void 0),bi([o.state()],gi.prototype,"pressed",void 0),bi([o.state()],gi.prototype,"rippling",void 0),bi([o.state()],gi.prototype,"rippleSize",void 0),bi([o.state()],gi.prototype,"originX",void 0),bi([o.state()],gi.prototype,"originY",void 0),bi([o.query(".ft-ripple")],gi.prototype,"ripple",void 0),bi([o.query(".ft-ripple--effect")],gi.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(gi);const yi=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),mi=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),$i=i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),ki=i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),wi=i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),zi=i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),Si=e.css`
|
|
222
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(i=this.target)&&void 0!==i?i:e),this.setRippleSize()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}gi.elementDefinitions={},gi.styles=xi,bi([o.property({type:Boolean})],gi.prototype,"primary",void 0),bi([o.property({type:Boolean})],gi.prototype,"secondary",void 0),bi([o.property({type:Boolean})],gi.prototype,"unbounded",void 0),bi([o.property({type:Boolean})],gi.prototype,"activated",void 0),bi([o.property({type:Boolean})],gi.prototype,"selected",void 0),bi([o.property({type:Boolean})],gi.prototype,"disabled",void 0),bi([o.state()],gi.prototype,"hovered",void 0),bi([o.state()],gi.prototype,"focused",void 0),bi([o.state()],gi.prototype,"pressed",void 0),bi([o.state()],gi.prototype,"rippling",void 0),bi([o.state()],gi.prototype,"rippleSize",void 0),bi([o.state()],gi.prototype,"originX",void 0),bi([o.state()],gi.prototype,"originY",void 0),bi([o.query(".ft-ripple")],gi.prototype,"ripple",void 0),bi([o.query(".ft-ripple--effect")],gi.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(gi);const yi=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),mi=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),$i=i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),ki=i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),wi=i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),zi=i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),Si=e.css`
|
|
223
223
|
.ft-tooltip--container {
|
|
224
224
|
display: block;
|
|
225
225
|
position: relative;
|
|
@@ -251,7 +251,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
251
251
|
position: relative;
|
|
252
252
|
word-break: break-word;
|
|
253
253
|
}
|
|
254
|
-
`;var Oi=function(t,i,e,o){for(var s,
|
|
254
|
+
`;var Oi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Ci extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return e.html`
|
|
255
255
|
<div part="container"
|
|
256
256
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
257
257
|
@mouseenter=${this.onHover}
|
|
@@ -261,7 +261,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
261
261
|
@touchstart=${this.onTouch}>
|
|
262
262
|
<slot></slot>
|
|
263
263
|
<div part="tooltip" role="tooltip" inert
|
|
264
|
-
class="ft-tooltip ft-tooltip--${this.validPosition}"
|
|
264
|
+
class="ft-tooltip ft-tooltip--${this.validPosition}"
|
|
265
265
|
?hidden=${!this.visible}>
|
|
266
266
|
<div part="tooltip-content" class="ft-tooltip--content">
|
|
267
267
|
<slot name="text"></slot>
|
|
@@ -269,7 +269,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
269
269
|
</div>
|
|
270
270
|
</div>
|
|
271
271
|
</div>
|
|
272
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&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.validPosition){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,
|
|
272
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&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.validPosition){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,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=i.height,s=o;break;case"left":n=e,s=-this.tooltip.clientWidth;break;case"right":n=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=4-i.left);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${i.width}px, ${zi})`}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())}}Ci.elementDefinitions={"ft-typography":li},Ci.styles=Si,Oi([o.property()],Ci.prototype,"text",void 0),Oi([o.property({type:Boolean})],Ci.prototype,"manual",void 0),Oi([o.property({type:Boolean})],Ci.prototype,"inline",void 0),Oi([o.property({type:Number})],Ci.prototype,"delay",void 0),Oi([o.property()],Ci.prototype,"position",void 0),Oi([o.queryAssignedNodes("",!0)],Ci.prototype,"slotNodes",void 0),Oi([o.query(".ft-tooltip--container")],Ci.prototype,"container",void 0),Oi([o.query("slot")],Ci.prototype,"target",void 0),Oi([o.query(".ft-tooltip")],Ci.prototype,"tooltip",void 0),Oi([o.query(".ft-tooltip--content")],Ci.prototype,"tooltipContent",void 0),Oi([o.state()],Ci.prototype,"visible",void 0),i.customElement("ft-tooltip")(Ci);const Bi={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},ji=e.css`
|
|
273
273
|
:host {
|
|
274
274
|
line-height: 0;
|
|
275
275
|
}
|
|
@@ -345,7 +345,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
345
345
|
<div></div>
|
|
346
346
|
<div></div>
|
|
347
347
|
</div>
|
|
348
|
-
`}}var Ii,
|
|
348
|
+
`}}var Ii,Ti;Ei.styles=ji,i.customElement("ft-loader")(Ei),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",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="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(Ii||(Ii={})),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=""}(Ti||(Ti={})),new Map([...["abw"].map((t=>[t,Ti.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,Ti.AUDIO])),...["avi"].map((t=>[t,Ti.AVI])),...["chm","xhs"].map((t=>[t,Ti.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,Ti.CODE])),...["csv"].map((t=>[t,Ti.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ti.DITA])),...["epub"].map((t=>[t,Ti.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ti.EXCEL])),...["flac"].map((t=>[t,Ti.FLAC])),...["gif"].map((t=>[t,Ti.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ti.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ti.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,Ti.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ti.JPEG])),...["json"].map((t=>[t,Ti.JSON])),...["m4a","m4p"].map((t=>[t,Ti.M4A])),...["mov","qt"].map((t=>[t,Ti.MOV])),...["mp3"].map((t=>[t,Ti.MP3])),...["mp4","m4v"].map((t=>[t,Ti.MP4])),...["ogg","oga"].map((t=>[t,Ti.OGG])),...["pdf","ps"].map((t=>[t,Ti.PDF])),...["png"].map((t=>[t,Ti.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ti.POWERPOINT])),...["rar"].map((t=>[t,Ti.RAR])),...["stp"].map((t=>[t,Ti.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ti.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,Ti.VIDEO])),...["wav"].map((t=>[t,Ti.WAV])),...["wma"].map((t=>[t,Ti.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ti.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ti.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ti.YAML])),...["zip"].map((t=>[t,Ti.ZIP]))]);const Ni={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")},Di=e.css`
|
|
349
349
|
:host, i.ft-icon {
|
|
350
350
|
display: inline-flex;
|
|
351
351
|
align-items: center;
|
|
@@ -354,14 +354,14 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
354
354
|
}
|
|
355
355
|
|
|
356
356
|
:host {
|
|
357
|
-
width: ${
|
|
358
|
-
height: ${
|
|
357
|
+
width: ${Ni.size};
|
|
358
|
+
height: ${Ni.size};
|
|
359
359
|
}
|
|
360
360
|
|
|
361
361
|
i.ft-icon {
|
|
362
362
|
width: 100%;
|
|
363
363
|
height: 100%;
|
|
364
|
-
font-size: ${
|
|
364
|
+
font-size: ${Ni.size};
|
|
365
365
|
line-height: 1;
|
|
366
366
|
font-weight: normal;
|
|
367
367
|
text-transform: none;
|
|
@@ -372,33 +372,33 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
372
372
|
text-rendering: auto;
|
|
373
373
|
-webkit-font-smoothing: antialiased;
|
|
374
374
|
-moz-osx-font-smoothing: grayscale;
|
|
375
|
-
vertical-align: ${
|
|
375
|
+
vertical-align: ${Ni.verticalAlign};
|
|
376
376
|
}
|
|
377
377
|
|
|
378
378
|
i.ft-icon.ft-icon--fluid-topics {
|
|
379
|
-
font-family: ${
|
|
380
|
-
|
|
379
|
+
font-family: ${Ni.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
380
|
+
|
|
381
381
|
/* Ugly fix because font is broken */
|
|
382
|
-
font-size: calc(0.75 * ${
|
|
383
|
-
line-height: ${
|
|
382
|
+
font-size: calc(0.75 * ${Ni.size});
|
|
383
|
+
line-height: ${Ni.size};
|
|
384
384
|
position: relative;
|
|
385
385
|
top: -4%;
|
|
386
386
|
justify-content: center;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
.ft-icon--file-format {
|
|
390
|
-
font-family: ${
|
|
390
|
+
font-family: ${Ni.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
.ft-icon--material {
|
|
394
|
-
font-family: ${
|
|
394
|
+
font-family: ${Ni.materialFontFamily}, "Material Icons", sans-serif;
|
|
395
395
|
}
|
|
396
|
-
`;var Ai;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ai||(Ai={}));var
|
|
396
|
+
`;var Ai;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ai||(Ai={}));var Fi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Ri extends i.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=e.nothing}render(){const t=this.variant&&Object.values(Ai).includes(this.variant)?this.variant:Ai.fluid_topics,i=t!==Ai.material||!!this.value;return e.html`
|
|
397
397
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
398
|
-
${
|
|
398
|
+
${r.unsafeHTML(this.resolvedIcon)}
|
|
399
399
|
<slot ?hidden=${i}></slot>
|
|
400
400
|
</i>
|
|
401
|
-
`}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:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case Ai.file_format:this.resolvedIcon=null!==(t=
|
|
401
|
+
`}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:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case Ai.file_format:this.resolvedIcon=null!==(t=Ti[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Ai.material:this.resolvedIcon=this.value||e.nothing;break;default:this.resolvedIcon=null!==(i=Ii[o.replace("-","_").toUpperCase()])&&void 0!==i?i:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ri.elementDefinitions={},Ri.styles=Di,Fi([o.property()],Ri.prototype,"variant",void 0),Fi([o.property()],Ri.prototype,"value",void 0),Fi([o.state()],Ri.prototype,"resolvedIcon",void 0),Fi([o.query("slot")],Ri.prototype,"slottedContent",void 0),i.customElement("ft-icon")(Ri);const Mi=i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorPrimary),_i={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:Mi,fontSize:i.FtCssVariableFactory.extend("--ft-button-font-size",Gt.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariableFactory.extend("--ft-button-ripple-color",Mi),verticalPadding:i.FtCssVariableFactory.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:i.FtCssVariableFactory.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:i.FtCssVariableFactory.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Li=i.FtCssVariableFactory.extend("--ft-button-primary-color",i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),Hi={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-primary-background-color",i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:Li,rippleColor:i.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Li)},Ui=i.FtCssVariableFactory.extend("--ft-button-dense-border-radius",i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM)),Vi=i.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","SIZE","2px"),Zi=i.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","SIZE","4px"),Wi=i.FtCssVariableFactory.create("--ft-button-dense-icon-padding","SIZE","4px"),Pi=[e.css`
|
|
402
402
|
:host {
|
|
403
403
|
display: inline-block;
|
|
404
404
|
max-width: 100%;
|
|
@@ -440,7 +440,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
440
440
|
|
|
441
441
|
--ft-button-internal-line-height: max(calc(${_i.fontSize} + 2px), ${_i.iconSize});
|
|
442
442
|
--ft-button-internal-color: ${_i.color};
|
|
443
|
-
${i.setVariable(
|
|
443
|
+
${i.setVariable(Ni.size,_i.iconSize)};
|
|
444
444
|
${i.setVariable(hi.color,_i.rippleColor)};
|
|
445
445
|
|
|
446
446
|
border-radius: ${_i.borderRadius};
|
|
@@ -454,17 +454,17 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
454
454
|
border: 1px solid var(--ft-button-internal-color);
|
|
455
455
|
padding: calc(${_i.verticalPadding} - 1px) calc(${_i.horizontalPadding} - 1px);
|
|
456
456
|
}
|
|
457
|
-
|
|
457
|
+
|
|
458
458
|
.ft-button.ft-button--dense {
|
|
459
|
-
padding: ${
|
|
459
|
+
padding: ${Vi} ${Zi};
|
|
460
460
|
border-radius: ${Ui};
|
|
461
461
|
gap: ${Wi};
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
.ft-button.ft-button--dense.ft-button--outlined {
|
|
465
|
-
padding: calc(${
|
|
465
|
+
padding: calc(${Vi} - 1px) calc(${Zi} - 1px);
|
|
466
466
|
}
|
|
467
|
-
|
|
467
|
+
|
|
468
468
|
.ft-button:not([disabled]):hover {
|
|
469
469
|
cursor: pointer;
|
|
470
470
|
}
|
|
@@ -474,7 +474,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
474
474
|
}
|
|
475
475
|
|
|
476
476
|
.ft-button--round.ft-button--dense {
|
|
477
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
477
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${Vi});
|
|
478
478
|
}
|
|
479
479
|
|
|
480
480
|
.ft-button[disabled] {
|
|
@@ -522,8 +522,8 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
522
522
|
}
|
|
523
523
|
|
|
524
524
|
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
525
|
-
margin: 0 calc(${
|
|
526
|
-
padding: 0 ${
|
|
525
|
+
margin: 0 calc(${Zi} * -1);
|
|
526
|
+
padding: 0 ${Vi};
|
|
527
527
|
}
|
|
528
528
|
|
|
529
529
|
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
@@ -535,9 +535,9 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
535
535
|
${i.setVariable(Bi.size,_i.iconSize)};
|
|
536
536
|
${i.setVariable(Bi.color,"var(--ft-button-internal-color)")};
|
|
537
537
|
}
|
|
538
|
-
`,i.noTextSelect];var Ki=function(t,i,e,o){for(var s,
|
|
538
|
+
`,i.noTextSelect];var Ki=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Gi extends i.FtLitElement{constructor(){super(...arguments),this.role="button",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.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}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-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
|
|
539
539
|
<button part="button"
|
|
540
|
-
class="${
|
|
540
|
+
class="${n.classMap(t)}"
|
|
541
541
|
aria-label="${this.getLabel()}"
|
|
542
542
|
?disabled=${this.isDisabled()}>
|
|
543
543
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
@@ -556,9 +556,9 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
556
556
|
position="${this.tooltipPosition}">
|
|
557
557
|
${t}
|
|
558
558
|
</ft-tooltip>
|
|
559
|
-
|
|
559
|
+
`:t}resolveIcon(){return this.loading?e.html`
|
|
560
560
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?e.html`
|
|
561
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${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}}Gi.elementDefinitions={"ft-ripple":gi,"ft-tooltip":Ci,"ft-typography":li,"ft-icon":
|
|
561
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${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}}Gi.elementDefinitions={"ft-ripple":gi,"ft-tooltip":Ci,"ft-typography":li,"ft-icon":Ri,"ft-loader":Ei},Gi.styles=[i.safariEllipsisFix,Pi],Ki([o.property({type:String,reflect:!0})],Gi.prototype,"role",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"primary",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"outlined",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"disabled",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"dense",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"round",void 0),Ki([o.property()],Gi.prototype,"label",void 0),Ki([o.property()],Gi.prototype,"icon",void 0),Ki([o.property()],Gi.prototype,"iconVariant",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"trailingIcon",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"loading",void 0),Ki([o.property()],Gi.prototype,"tooltipPosition",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"hideTooltip",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"forceTooltip",void 0),Ki([o.query(".ft-button")],Gi.prototype,"button",void 0),Ki([o.query(".ft-button--label slot")],Gi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Gi);const qi=i.FtCssVariableFactory.extend("--ft-checkbox-text-color",i.designSystemVariables.colorOnSurfaceHigh),Xi=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),Yi=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),Ji=i.FtCssVariableFactory.extend("--ft-checkbox-border-color",i.designSystemVariables.colorOnSurfaceMedium),Qi=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),te=e.css`
|
|
562
562
|
* {
|
|
563
563
|
box-sizing: border-box;
|
|
564
564
|
}
|
|
@@ -635,8 +635,8 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
635
635
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
636
636
|
opacity: 1;
|
|
637
637
|
}
|
|
638
|
-
`;var ie=function(t,i,e,o){for(var s,
|
|
639
|
-
<label class="${
|
|
638
|
+
`;var ie=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class ee 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`
|
|
639
|
+
<label class="${n.classMap(t)}" for="checkbox-input">
|
|
640
640
|
<div class="ft-checkbox--box-container">
|
|
641
641
|
<ft-ripple
|
|
642
642
|
?disabled=${this.disabled}
|
|
@@ -661,7 +661,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
661
661
|
<slot></slot>
|
|
662
662
|
</ft-typography>
|
|
663
663
|
</label>
|
|
664
|
-
`}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)}}ee.elementDefinitions={"ft-ripple":gi,"ft-typography":li},ee.styles=te,ie([o.property()],ee.prototype,"name",void 0),ie([o.property({type:Boolean,reflect:!0})],ee.prototype,"checked",void 0),ie([o.property({type:Boolean})],ee.prototype,"indeterminate",void 0),ie([o.property({type:Boolean})],ee.prototype,"disabled",void 0),ie([o.query(".ft-checkbox")],ee.prototype,"container",void 0),ie([o.query("ft-ripple")],ee.prototype,"ripple",void 0),i.customElement("ft-checkbox")(ee);const oe=i.FtCssVariableFactory.extend("--ft-radio-text-color",i.designSystemVariables.colorOnSurfaceHigh),se=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),
|
|
664
|
+
`}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)}}ee.elementDefinitions={"ft-ripple":gi,"ft-typography":li},ee.styles=te,ie([o.property()],ee.prototype,"name",void 0),ie([o.property({type:Boolean,reflect:!0})],ee.prototype,"checked",void 0),ie([o.property({type:Boolean})],ee.prototype,"indeterminate",void 0),ie([o.property({type:Boolean})],ee.prototype,"disabled",void 0),ie([o.query(".ft-checkbox")],ee.prototype,"container",void 0),ie([o.query("ft-ripple")],ee.prototype,"ripple",void 0),i.customElement("ft-checkbox")(ee);const oe=i.FtCssVariableFactory.extend("--ft-radio-text-color",i.designSystemVariables.colorOnSurfaceHigh),se=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),ne=(i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),i.FtCssVariableFactory.extend("--ft-radio-border-color",i.designSystemVariables.colorOnSurfaceMedium)),re=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),le=e.css`
|
|
665
665
|
* {
|
|
666
666
|
box-sizing: border-box;
|
|
667
667
|
}
|
|
@@ -676,7 +676,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
676
676
|
}
|
|
677
677
|
|
|
678
678
|
.ft-radio--disabled {
|
|
679
|
-
color: ${
|
|
679
|
+
color: ${re};
|
|
680
680
|
}
|
|
681
681
|
|
|
682
682
|
input {
|
|
@@ -699,7 +699,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
699
699
|
}
|
|
700
700
|
|
|
701
701
|
.ft-radio--box {
|
|
702
|
-
border: 2px solid ${
|
|
702
|
+
border: 2px solid ${ne};
|
|
703
703
|
border-radius: 50%;
|
|
704
704
|
|
|
705
705
|
display: flex;
|
|
@@ -733,15 +733,15 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
733
733
|
}
|
|
734
734
|
|
|
735
735
|
.ft-radio--disabled .ft-radio--box {
|
|
736
|
-
border-color: ${
|
|
736
|
+
border-color: ${re};
|
|
737
737
|
background-color: transparent;
|
|
738
738
|
}
|
|
739
739
|
|
|
740
740
|
.ft-radio--disabled .ft-radio--box:after {
|
|
741
|
-
background-color: ${
|
|
741
|
+
background-color: ${re};
|
|
742
742
|
}
|
|
743
|
-
`;var ae=function(t,i,e,o){for(var s,
|
|
744
|
-
<div class="${
|
|
743
|
+
`;var ae=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class he extends CustomEvent{constructor(t,i){super("change",{detail:{value:t,checked:i},bubbles:!0,composed:!0})}}class pe 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`
|
|
744
|
+
<div class="${n.classMap(t)}">
|
|
745
745
|
<div class="ft-radio--box-container">
|
|
746
746
|
<ft-ripple
|
|
747
747
|
?disabled=${this.disabled}
|
|
@@ -769,7 +769,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
769
769
|
:host {
|
|
770
770
|
display: contents;
|
|
771
771
|
}
|
|
772
|
-
`;var ce=function(t,i,e,o){for(var s,
|
|
772
|
+
`;var ce=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class de extends i.FtLitElement{constructor(){super(...arguments),this.name=""}render(){return e.html`
|
|
773
773
|
<slot @slotchange=${this.onSlotChange}
|
|
774
774
|
@change=${this.onChange}
|
|
775
775
|
@keydown=${this.onKeyDown}
|
|
@@ -840,48 +840,48 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
840
840
|
margin: 10px 0;
|
|
841
841
|
color: ${ue.colorOnSurfaceMedium};
|
|
842
842
|
}
|
|
843
|
-
`;var xe=function(t,i,e,o){for(var s,
|
|
843
|
+
`;var xe=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class be extends i.FtLitElement{constructor(){super(...arguments),this.filterId="",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`
|
|
844
844
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
845
845
|
${null==this.parent?null:e.html`
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
846
|
+
<div tabindex="0"
|
|
847
|
+
part="controls go-back"
|
|
848
|
+
class="ft-filter-level--go-back"
|
|
849
|
+
?disabled=${this.disabled}
|
|
850
|
+
@keyup=${this.goBackOnKeyPress}
|
|
851
|
+
@click=${this.goBackOnClick}>
|
|
852
|
+
<ft-ripple></ft-ripple>
|
|
853
|
+
<ft-icon>thin_arrow_left</ft-icon>
|
|
854
|
+
<ft-typography variant="body2">${this.parent.label}</ft-typography>
|
|
855
|
+
</div>
|
|
856
|
+
`}
|
|
857
857
|
${0===this.options.length&&this.noValuesLabel?e.html`
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
858
|
+
<ft-typography class="ft-filter-level--no-values" element="span" variant="body2">
|
|
859
|
+
${this.noValuesLabel}
|
|
860
|
+
</ft-typography>
|
|
861
|
+
`:e.nothing}
|
|
862
862
|
${s.repeat(i,(t=>t.value),(t=>{var i;return e.html`
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
863
|
+
<div class="ft-filter-level--option" part="options">
|
|
864
|
+
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
865
|
+
${this.preventNavigation||t.selected||0===(null!==(i=t.subOptions)&&void 0!==i?i:[]).length?e.nothing:e.html`
|
|
866
|
+
<ft-button icon="thin_arrow_right"
|
|
867
|
+
part="controls navigate-hierarchy"
|
|
868
|
+
label="${t.label}"
|
|
869
|
+
?disabled=${this.disabled}
|
|
870
|
+
tooltipPosition="left"
|
|
871
|
+
@click=${()=>this.displayLevel(t)}></ft-button>
|
|
872
|
+
`}
|
|
873
|
+
</div>
|
|
874
|
+
`}))}
|
|
875
875
|
${i.length<t.length?e.html`
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
876
|
+
<ft-button
|
|
877
|
+
class="ft-filter-level--display-more"
|
|
878
|
+
icon="thin_arrow"
|
|
879
|
+
dense trailingIcon
|
|
880
|
+
part="controls display-more"
|
|
881
|
+
@click=${this.displayMore}>
|
|
882
|
+
${this.moreValuesButtonLabel}
|
|
883
|
+
</ft-button>
|
|
884
|
+
`:e.nothing}
|
|
885
885
|
</div>
|
|
886
886
|
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var o;return e.html`
|
|
887
887
|
<ft-checkbox name="${this.filterId}"
|
|
@@ -904,7 +904,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
904
904
|
@change=${t=>t.stopPropagation()}>
|
|
905
905
|
${t.renderOption?t.renderOption:t.label}
|
|
906
906
|
</ft-radio>
|
|
907
|
-
`}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}))}}be.elementDefinitions={"ft-button":Gi,"ft-ripple":gi,"ft-typography":li,"ft-checkbox":ee,"ft-icon":
|
|
907
|
+
`}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}))}}be.elementDefinitions={"ft-button":Gi,"ft-ripple":gi,"ft-typography":li,"ft-checkbox":ee,"ft-icon":Ri,"ft-radio":pe},be.styles=ve,xe([o.property({type:String})],be.prototype,"filterId",void 0),xe([o.property({type:Object})],be.prototype,"parent",void 0),xe([o.property({type:Array})],be.prototype,"options",void 0),xe([o.property({type:Boolean})],be.prototype,"multivalued",void 0),xe([o.property({type:Boolean})],be.prototype,"disabled",void 0),xe([o.property({type:Boolean})],be.prototype,"hideSelectedOptions",void 0),xe([o.property({type:Boolean})],be.prototype,"preventNavigation",void 0),xe([o.property({type:String})],be.prototype,"filter",void 0),xe([o.property({type:String})],be.prototype,"moreValuesButtonLabel",void 0),xe([o.property({type:String})],be.prototype,"noValuesLabel",void 0),xe([o.property({type:Number})],be.prototype,"displayedValuesLimit",void 0),xe([o.query(".ft-filter-level--container")],be.prototype,"container",void 0),xe([o.state()],be.prototype,"displayedPages",void 0);const ge={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")},ye=e.css`
|
|
908
908
|
.ft-snap-scroll {
|
|
909
909
|
box-sizing: border-box;
|
|
910
910
|
position: relative;
|
|
@@ -1029,7 +1029,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1029
1029
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1030
1030
|
background-color: ${ge.colorSurface};
|
|
1031
1031
|
}
|
|
1032
|
-
`;var me=function(t,i,e,o){for(var s,
|
|
1032
|
+
`;var me=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class $e extends CustomEvent{constructor(t,i){super("current-element-change",{detail:{index:t,element:i}})}}class ke 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=n.classMap({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":i.isSafari}),o=this.controls&&this.withScroll;return e.html`
|
|
1033
1033
|
<div part="container" class="${t}">
|
|
1034
1034
|
<ft-button
|
|
1035
1035
|
class="ft-snap-scroll--previous"
|
|
@@ -1165,7 +1165,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1165
1165
|
slot:not([name]) {
|
|
1166
1166
|
display: none;
|
|
1167
1167
|
}
|
|
1168
|
-
`];var Se=function(t,i,e,o){for(var s,
|
|
1168
|
+
`];var Se=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Oe extends CustomEvent{constructor(t){super("change",{detail:t})}}class Ce 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.hideClearButton=!1,this.lastLevelHasHiddenvalues=!1,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),this.lastDispatchedValues=[]}get flatOptions(){return i.flatDeep(this.options,(t=>{var i;return null!==(i=t.subOptions)&&void 0!==i?i:[]}))}get selectedValues(){return this.flatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){const t=this.flatOptions.some((t=>t.selected)),i=this.withScroll||this.filter||this.lastLevelHasHiddenvalues,o=this.filterPlaceHolder.replace("{0}",this.label);return e.html`
|
|
1169
1169
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1170
1170
|
part="container">
|
|
1171
1171
|
${this.label||t?e.html`
|
|
@@ -1198,20 +1198,20 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1198
1198
|
@slotchange=${this.updateOptionsFromSlot}
|
|
1199
1199
|
@option-change=${this.optionsChanged}></slot>
|
|
1200
1200
|
</div>
|
|
1201
|
-
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((i=>t.has(i))),this.lastDispatchedValues=this.selectedValues}}contentAvailableCallback(t){var i,e,o,s,
|
|
1201
|
+
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((i=>t.has(i))),this.lastDispatchedValues=this.selectedValues}}contentAvailableCallback(t){var i,e,o,s,n;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(i=this.levelsContainer)||void 0===i||i.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===(e=this.levelsContainer)||void 0===e||e.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300)),this.lastLevelHasHiddenvalues=null!==(n=null===(s=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(".ft-filter--levels ft-filter-level:last-child"))||void 0===s?void 0:s.hasHiddenValues)&&void 0!==n&&n}renderLevels(){const t=this.flatOptions,i=t.filter((t=>t.selected)),o=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,s=o<0?"ft-filter--level-center":"ft-filter--level-left";return e.html`
|
|
1202
1202
|
${this.raiseSelectedOptions&&i.length>0?e.html`
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1203
|
+
<ft-filter-level
|
|
1204
|
+
filterId="${this.id}"
|
|
1205
|
+
?multivalued=${this.multivalued}
|
|
1206
|
+
?disabled=${this.disabled}
|
|
1207
|
+
preventNavigation
|
|
1208
|
+
.options=${i}
|
|
1209
|
+
@change=${this.onChange}
|
|
1210
|
+
part="values selected-values"
|
|
1211
|
+
.exportpartsPrefixes=${["values","selected-values"]}
|
|
1212
|
+
></ft-filter-level>
|
|
1213
|
+
<div class="ft-filter--separator">
|
|
1214
|
+
`:null}
|
|
1215
1215
|
<ft-snap-scroll horizontal hideScrollbar
|
|
1216
1216
|
class="ft-filter--levels"
|
|
1217
1217
|
@current-element-change=${t=>this.levelsScrollDebouncer.run((()=>{for(;t.detail.index<this.displayedLevels.length;)this.displayedLevels.pop();this.requestUpdate()}))}>
|
|
@@ -1237,6 +1237,6 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1237
1237
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1238
1238
|
noValuesLabel="${this.noValuesLabel}"
|
|
1239
1239
|
></ft-filter-level>
|
|
1240
|
-
`}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;this.sendEventIfValuesChanged(),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}sendEventIfValuesChanged(){const t=this.selectedValues;i.deepEqual(this.lastDispatchedValues,t)||(this.dispatchEvent(new Oe(t)),this.lastDispatchedValues=t)}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)}}Ce.elementDefinitions={"ft-button":Gi,"ft-filter-level":be,"ft-snap-scroll":ke,"ft-typography":li},Ce.styles=ze,Se([o.property({type:String})],Ce.prototype,"id",void 0),Se([o.property({type:String})],Ce.prototype,"label",void 0),Se([o.property({type:String})],Ce.prototype,"filterPlaceHolder",void 0),Se([o.property({type:String})],Ce.prototype,"clearButtonLabel",void 0),Se([o.property({type:String})],Ce.prototype,"moreValuesButtonLabel",void 0),Se([o.property({type:String})],Ce.prototype,"noValuesLabel",void 0),Se([i.jsonProperty([])],Ce.prototype,"options",void 0),Se([o.property({type:Boolean})],Ce.prototype,"multivalued",void 0),Se([o.property({type:Boolean})],Ce.prototype,"disabled",void 0),Se([o.property({type:Boolean})],Ce.prototype,"raiseSelectedOptions",void 0),Se([o.property({type:Number})],Ce.prototype,"displayedValuesLimit",void 0),Se([o.property({type:Boolean})],Ce.prototype,"hideClearButton",void 0),Se([o.query(".ft-filter--slot")],Ce.prototype,"slotElement",void 0),Se([o.query(".ft-filter--container")],Ce.prototype,"container",void 0),Se([o.query(".ft-filter--values")],Ce.prototype,"valuesContainer",void 0),Se([o.query(".ft-filter--levels")],Ce.prototype,"levelsContainer",void 0),Se([o.state()],Ce.prototype,"lastLevelHasHiddenvalues",void 0),Se([o.query(".ft-filter--filter input")],Ce.prototype,"filterInput",void 0),Se([o.queryAll(".ft-filter--levels ft-filter-level")],Ce.prototype,"levels",void 0),Se([o.state()],Ce.prototype,"withScroll",void 0),Se([o.state()],Ce.prototype,"filter",void 0),Se([o.state()],Ce.prototype,"slideIn",void 0),Se([o.state()],Ce.prototype,"slideOut",void 0);var Be=function(t,i,e,o){for(var s,
|
|
1240
|
+
`}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;this.sendEventIfValuesChanged(),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}sendEventIfValuesChanged(){const t=this.selectedValues;i.deepEqual(this.lastDispatchedValues,t)||(this.dispatchEvent(new Oe(t)),this.lastDispatchedValues=t)}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)}}Ce.elementDefinitions={"ft-button":Gi,"ft-filter-level":be,"ft-snap-scroll":ke,"ft-typography":li},Ce.styles=ze,Se([o.property({type:String})],Ce.prototype,"id",void 0),Se([o.property({type:String})],Ce.prototype,"label",void 0),Se([o.property({type:String})],Ce.prototype,"filterPlaceHolder",void 0),Se([o.property({type:String})],Ce.prototype,"clearButtonLabel",void 0),Se([o.property({type:String})],Ce.prototype,"moreValuesButtonLabel",void 0),Se([o.property({type:String})],Ce.prototype,"noValuesLabel",void 0),Se([i.jsonProperty([])],Ce.prototype,"options",void 0),Se([o.property({type:Boolean})],Ce.prototype,"multivalued",void 0),Se([o.property({type:Boolean})],Ce.prototype,"disabled",void 0),Se([o.property({type:Boolean})],Ce.prototype,"raiseSelectedOptions",void 0),Se([o.property({type:Number})],Ce.prototype,"displayedValuesLimit",void 0),Se([o.property({type:Boolean})],Ce.prototype,"hideClearButton",void 0),Se([o.query(".ft-filter--slot")],Ce.prototype,"slotElement",void 0),Se([o.query(".ft-filter--container")],Ce.prototype,"container",void 0),Se([o.query(".ft-filter--values")],Ce.prototype,"valuesContainer",void 0),Se([o.query(".ft-filter--levels")],Ce.prototype,"levelsContainer",void 0),Se([o.state()],Ce.prototype,"lastLevelHasHiddenvalues",void 0),Se([o.query(".ft-filter--filter input")],Ce.prototype,"filterInput",void 0),Se([o.queryAll(".ft-filter--levels ft-filter-level")],Ce.prototype,"levels",void 0),Se([o.state()],Ce.prototype,"withScroll",void 0),Se([o.state()],Ce.prototype,"filter",void 0),Se([o.state()],Ce.prototype,"slideIn",void 0),Se([o.state()],Ce.prototype,"slideOut",void 0);var Be=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class je extends i.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return e.html`
|
|
1241
1241
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1242
1242
|
`}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}))}}je.elementDefinitions={},Be([o.property({type:String})],je.prototype,"label",void 0),Be([o.property({type:Object,converter:t=>t})],je.prototype,"value",void 0),Be([o.property({type:Boolean,reflect:!0})],je.prototype,"selected",void 0),Be([o.property({type:Object})],je.prototype,"subOptions",void 0),Be([i.jsonProperty({})],je.prototype,"renderOption",void 0),Be([o.query(".ft-filter-option--slot")],je.prototype,"slotElement",void 0),i.customElement("ft-filter")(Ce),i.customElement("ft-filter-option")(je),t.FtFilter=Ce,t.FtFilterChangeEvent=Oe,t.FtFilterCssVariables=we,t.FtFilterLevelCssVariables=ue,t.FtFilterOption=je,t.levelStyles=ve,t.styles=ze}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|