@fluid-topics/ft-filter 0.3.19 → 0.3.20
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 +185 -185
- package/build/ft-filter.min.js +229 -229
- package/package.json +10 -10
package/build/ft-filter.light.js
CHANGED
|
@@ -4,115 +4,115 @@
|
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var l;const a=
|
|
7
|
+
var l;const a=window,h=a.trustedTypes,p=h?h.createPolicy("lit-html",{createHTML:t=>t}):void 0,f=`lit$${(Math.random()+"").slice(9)}$`,c="?"+f,d=`<${c}>`,u=document,v=(t="")=>u.createComment(t),b=t=>null===t||"object"!=typeof t&&"function"!=typeof t,g=Array.isArray,x=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,m=/>/g,$=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),k=/'/g,w=/"/g,z=/^(?:script|style|textarea|title)$/i,S=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),O=Symbol.for("lit-noChange"),C=Symbol.for("lit-nothing"),B=new WeakMap,j=u.createTreeWalker(u,129,null,!1),E=(t,i)=>{const e=t.length-1,o=[];let s,r=2===i?"<svg>":"",n=x;for(let i=0;i<e;i++){const e=t[i];let l,a,h=-1,p=0;for(;p<e.length&&(n.lastIndex=p,a=n.exec(e),null!==a);)p=n.lastIndex,n===x?"!--"===a[1]?n=y:void 0!==a[1]?n=m:void 0!==a[2]?(z.test(a[2])&&(s=RegExp("</"+a[2],"g")),n=$):void 0!==a[3]&&(n=$):n===$?">"===a[0]?(n=null!=s?s:x,h=-1):void 0===a[1]?h=-2:(h=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?$:'"'===a[3]?w:k):n===w||n===k?n=$:n===y||n===m?n=x:(n=$,s=void 0);const c=n===$&&t[i+1].startsWith("/>")?" ":"";r+=n===x?e+d:h>=0?(o.push(l),e.slice(0,h)+"$lit$"+e.slice(h)+f+c):e+f+(-2===h?(o.push(void 0),i):c)}const l=r+(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 D{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,r=0;const n=t.length-1,l=this.parts,[a,p]=E(t,i);if(this.el=D.createElement(a,e),j.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=j.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(f)){const e=p[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(f),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?F:"?"===i[1]?_:"@"===i[1]?L:M})}else l.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(z.test(o.tagName)){const t=o.textContent.split(f),i=t.length-1;if(i>0){o.textContent=h?h.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],v()),j.nextNode(),l.push({type:2,index:++s});o.append(t[i],v())}}}else if(8===o.nodeType)if(o.data===c)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(f,t+1));)l.push({type:7,index:s}),t+=f.length-1}s++}}static createElement(t,i){const e=u.createElement("template");return e.innerHTML=t,e}}function N(t,i,e=t,o){var s,r,n,l;if(i===O)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===(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)._$Co)&&void 0!==n?n:l._$Co=[])[o]=a:e._$Cl=a),void 0!==a&&(i=N(t,a._$AS(t,i.values),a,o)),i}class T{constructor(t,i){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:u).importNode(e,!0);j.currentNode=s;let r=j.nextNode(),n=0,l=0,a=o[0];for(;void 0!==a;){if(n===a.index){let i;2===a.type?i=new I(r,r.nextSibling,this,t):1===a.type?i=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(i=new R(r,this,t)),this.u.push(i),a=o[++l]}n!==(null==a?void 0:a.index)&&(r=j.nextNode(),n++)}return s}p(t){let i=0;for(const e of this.u)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class I{constructor(t,i,e,o){var s;this.type=2,this._$AH=C,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cm=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._$Cm}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=N(this,t,i),b(t)?t===C||null==t||""===t?(this._$AH!==C&&this._$AR(),this._$AH=C):t!==this._$AH&&t!==O&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>g(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==C&&b(this._$AH)?this._$AA.nextSibling.data=t:this.T(u.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=D.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.p(e);else{const t=new T(s,this),i=t.v(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let i=B.get(t.strings);return void 0===i&&B.set(t.strings,i=new D(t)),i}k(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 I(this.O(v()),this.O(v()),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._$Cm=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=C,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=C}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=N(this,t,i,0),r=!b(t)||t!==this._$AH&&t!==O,r&&(this._$AH=t);else{const o=t;let n,l;for(t=s[0],n=0;n<s.length-1;n++)l=N(this,o[e+n],i,n),l===O&&(l=this._$AH[n]),r||(r=!b(l)||l!==this._$AH[n]),l===C?t=C:t!==C&&(t+=(null!=l?l:"")+s[n+1]),this._$AH[n]=l}r&&!o&&this.j(t)}j(t){t===C?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class F extends M{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===C?void 0:t}}const A=h?h.emptyScript:"";class _ extends M{constructor(){super(...arguments),this.type=4}j(t){t&&t!==C?this.element.setAttribute(this.name,A):this.element.removeAttribute(this.name)}}class L 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=N(this,t,i,0))&&void 0!==e?e:C)===O)return;const o=this._$AH,s=t===C&&o!==C||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==C&&(o===C||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 R{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){N(this,t)}}const U=a.litHtmlPolyfillSupport;null==U||U(D,I),(null!==(l=a.litHtmlVersions)&&void 0!==l?l:a.litHtmlVersions=[]).push("2.4.0");
|
|
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 V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t._$litStatic$},W=t=>({_$litStatic$:t,r:V}),P=new Map,Z=(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=P.get(t))&&(n.raw=n,P.set(t,i=n)),e=l}return t(i,...e)})(S);var K;!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"}(K||(K={}));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"),It=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",q),Mt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",X.fontSize,"10px"),Ft=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",X.fontWeight,"normal"),At=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"),Vt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",X.fontWeight,"normal"),Ht=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",X.letterSpacing,"1.5px"),Wt=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",X.lineHeight,"1.6"),Pt=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
|
-
font-family: ${
|
|
16
|
-
font-size: ${
|
|
17
|
-
font-weight: ${
|
|
18
|
-
letter-spacing: ${
|
|
19
|
-
line-height: ${
|
|
20
|
-
text-transform: ${
|
|
21
|
-
}
|
|
22
|
-
`,Kt=e.css`
|
|
23
|
-
.ft-typography--title-dense {
|
|
24
|
-
font-family: ${et};
|
|
25
|
-
font-size: ${ot};
|
|
26
|
-
font-weight: ${st};
|
|
27
|
-
letter-spacing: ${rt};
|
|
28
|
-
line-height: ${nt};
|
|
29
|
-
text-transform: ${lt};
|
|
15
|
+
font-family: ${Y};
|
|
16
|
+
font-size: ${J};
|
|
17
|
+
font-weight: ${Q};
|
|
18
|
+
letter-spacing: ${tt};
|
|
19
|
+
line-height: ${it};
|
|
20
|
+
text-transform: ${et};
|
|
30
21
|
}
|
|
31
22
|
`,Gt=e.css`
|
|
32
|
-
.ft-typography--
|
|
33
|
-
font-family: ${
|
|
34
|
-
font-size: ${
|
|
35
|
-
font-weight: ${
|
|
36
|
-
letter-spacing: ${
|
|
37
|
-
line-height: ${
|
|
38
|
-
text-transform: ${
|
|
23
|
+
.ft-typography--title-dense {
|
|
24
|
+
font-family: ${ot};
|
|
25
|
+
font-size: ${st};
|
|
26
|
+
font-weight: ${rt};
|
|
27
|
+
letter-spacing: ${nt};
|
|
28
|
+
line-height: ${lt};
|
|
29
|
+
text-transform: ${at};
|
|
39
30
|
}
|
|
40
31
|
`,qt=e.css`
|
|
32
|
+
.ft-typography--subtitle1 {
|
|
33
|
+
font-family: ${ht};
|
|
34
|
+
font-size: ${pt};
|
|
35
|
+
font-weight: ${ft};
|
|
36
|
+
letter-spacing: ${ct};
|
|
37
|
+
line-height: ${dt};
|
|
38
|
+
text-transform: ${ut};
|
|
39
|
+
}
|
|
40
|
+
`,Xt=e.css`
|
|
41
41
|
.ft-typography--subtitle2 {
|
|
42
|
-
font-family: ${
|
|
43
|
-
font-size: ${
|
|
44
|
-
font-weight: ${
|
|
45
|
-
letter-spacing: ${
|
|
46
|
-
line-height: ${
|
|
47
|
-
text-transform: ${
|
|
42
|
+
font-family: ${vt};
|
|
43
|
+
font-size: ${bt};
|
|
44
|
+
font-weight: ${gt};
|
|
45
|
+
letter-spacing: ${xt};
|
|
46
|
+
line-height: ${yt};
|
|
47
|
+
text-transform: ${mt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,Yt=e.css`
|
|
51
51
|
.ft-typography--body1 {
|
|
52
|
-
font-family: ${
|
|
53
|
-
font-size: ${
|
|
54
|
-
font-weight: ${
|
|
55
|
-
letter-spacing: ${
|
|
56
|
-
line-height: ${
|
|
57
|
-
text-transform: ${
|
|
52
|
+
font-family: ${$t};
|
|
53
|
+
font-size: ${kt};
|
|
54
|
+
font-weight: ${wt};
|
|
55
|
+
letter-spacing: ${zt};
|
|
56
|
+
line-height: ${St};
|
|
57
|
+
text-transform: ${Ot};
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,Jt=e.css`
|
|
60
60
|
.ft-typography--body2 {
|
|
61
|
-
font-family: ${
|
|
62
|
-
font-size: ${
|
|
63
|
-
font-weight: ${
|
|
64
|
-
letter-spacing: ${
|
|
65
|
-
line-height: ${
|
|
66
|
-
text-transform: ${
|
|
61
|
+
font-family: ${Ct.fontFamily};
|
|
62
|
+
font-size: ${Ct.fontSize};
|
|
63
|
+
font-weight: ${Ct.fontWeight};
|
|
64
|
+
letter-spacing: ${Ct.letterSpacing};
|
|
65
|
+
line-height: ${Ct.lineHeight};
|
|
66
|
+
text-transform: ${Ct.textTransform};
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,Qt=e.css`
|
|
69
69
|
.ft-typography--caption {
|
|
70
|
-
font-family: ${
|
|
71
|
-
font-size: ${
|
|
72
|
-
font-weight: ${
|
|
73
|
-
letter-spacing: ${
|
|
74
|
-
line-height: ${
|
|
70
|
+
font-family: ${Bt};
|
|
71
|
+
font-size: ${jt};
|
|
72
|
+
font-weight: ${Et};
|
|
73
|
+
letter-spacing: ${Dt};
|
|
74
|
+
line-height: ${Nt};
|
|
75
75
|
text-transform: ${Tt};
|
|
76
76
|
}
|
|
77
|
-
`,
|
|
77
|
+
`,ti=e.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
|
-
font-family: ${
|
|
80
|
-
font-size: ${
|
|
81
|
-
font-weight: ${
|
|
82
|
-
letter-spacing: ${
|
|
83
|
-
line-height: ${
|
|
84
|
-
text-transform: ${
|
|
79
|
+
font-family: ${It};
|
|
80
|
+
font-size: ${Mt};
|
|
81
|
+
font-weight: ${Ft};
|
|
82
|
+
letter-spacing: ${At};
|
|
83
|
+
line-height: ${_t};
|
|
84
|
+
text-transform: ${Lt};
|
|
85
85
|
}
|
|
86
|
-
`,
|
|
86
|
+
`,ii=e.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
|
-
font-family: ${
|
|
89
|
-
font-size: ${
|
|
90
|
-
font-weight: ${
|
|
91
|
-
letter-spacing: ${
|
|
92
|
-
line-height: ${
|
|
88
|
+
font-family: ${Rt};
|
|
89
|
+
font-size: ${Ut};
|
|
90
|
+
font-weight: ${Vt};
|
|
91
|
+
letter-spacing: ${Ht};
|
|
92
|
+
line-height: ${Wt};
|
|
93
93
|
text-transform: ${Pt};
|
|
94
94
|
}
|
|
95
|
-
`,ii=e.css`
|
|
96
|
-
.ft-typography--button {
|
|
97
|
-
font-family: ${Wt.fontFamily};
|
|
98
|
-
font-size: ${Wt.fontSize};
|
|
99
|
-
font-weight: ${Wt.fontWeight};
|
|
100
|
-
letter-spacing: ${Wt.letterSpacing};
|
|
101
|
-
line-height: ${Wt.lineHeight};
|
|
102
|
-
text-transform: ${Wt.textTransform};
|
|
103
|
-
}
|
|
104
95
|
`,ei=e.css`
|
|
96
|
+
.ft-typography--button {
|
|
97
|
+
font-family: ${Zt.fontFamily};
|
|
98
|
+
font-size: ${Zt.fontSize};
|
|
99
|
+
font-weight: ${Zt.fontWeight};
|
|
100
|
+
letter-spacing: ${Zt.letterSpacing};
|
|
101
|
+
line-height: ${Zt.lineHeight};
|
|
102
|
+
text-transform: ${Zt.textTransform};
|
|
103
|
+
}
|
|
104
|
+
`,oi=e.css`
|
|
105
105
|
.ft-typography {
|
|
106
106
|
vertical-align: inherit;
|
|
107
107
|
}
|
|
108
|
-
`;var
|
|
109
|
-
<${
|
|
108
|
+
`;var si=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 ri extends i.FtLitElement{constructor(){super(...arguments),this.variant=K.body1}render(){return this.element?Z`
|
|
109
|
+
<${W(this.element)}
|
|
110
110
|
class="ft-typography ft-typography--${this.variant}">
|
|
111
111
|
<slot></slot>
|
|
112
|
-
</${
|
|
113
|
-
`:
|
|
112
|
+
</${W(this.element)}>
|
|
113
|
+
`:Z`
|
|
114
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
115
|
-
`}}function
|
|
115
|
+
`}}function ni(t,i){return t.flatMap((t=>[t,...ni(i(t),i)]))}ri.styles=[Kt,Gt,qt,Xt,Yt,Jt,Qt,ti,ii,ei,oi],si([o.property()],ri.prototype,"element",void 0),si([o.property()],ri.prototype,"variant",void 0),i.customElement("ft-typography")(ri);const li=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),ai={color:li,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",li),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")},hi=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),pi=hi,fi=i.FtCssVariableFactory.extend("--ft-ripple-background-color",hi),ci=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),di=ci,ui=i.FtCssVariableFactory.extend("--ft-ripple-background-color",ci),vi=e.css`
|
|
116
116
|
:host {
|
|
117
117
|
display: contents;
|
|
118
118
|
}
|
|
@@ -134,27 +134,27 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
.ft-ripple .ft-ripple--background {
|
|
137
|
-
background-color: ${
|
|
137
|
+
background-color: ${ai.backgroundColor};
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
.ft-ripple .ft-ripple--effect {
|
|
141
|
-
background-color: ${
|
|
141
|
+
background-color: ${ai.color};
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
145
|
-
background-color: ${
|
|
145
|
+
background-color: ${ui};
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
149
|
-
background-color: ${
|
|
149
|
+
background-color: ${di};
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
153
|
-
background-color: ${
|
|
153
|
+
background-color: ${fi};
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
157
|
-
background-color: ${
|
|
157
|
+
background-color: ${pi};
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
.ft-ripple .ft-ripple--background {
|
|
@@ -186,22 +186,22 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
189
|
-
opacity: ${
|
|
189
|
+
opacity: ${ai.opacityContentOnSurfaceHover};
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
193
|
-
opacity: ${
|
|
193
|
+
opacity: ${ai.opacityContentOnSurfaceSelected};
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
197
|
-
opacity: ${
|
|
197
|
+
opacity: ${ai.opacityContentOnSurfaceFocused};
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
201
|
-
opacity: ${
|
|
201
|
+
opacity: ${ai.opacityContentOnSurfacePressed};
|
|
202
202
|
transform: translate(-50%, -50%) scale(1);
|
|
203
203
|
}
|
|
204
|
-
`;var
|
|
204
|
+
`;var 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};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.moveRipple=t=>{var i,e;let{x:o,y:s}=this.getCoordinates(t),r=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-r.x:r.width/2),this.originY=Math.round(null!=s?s-r.y:r.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return e.html`
|
|
205
205
|
<style>
|
|
206
206
|
.ft-ripple .ft-ripple--effect,
|
|
207
207
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -218,7 +218,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
218
218
|
<div class="ft-ripple--background"></div>
|
|
219
219
|
<div class="ft-ripple--effect"></div>
|
|
220
220
|
</div>
|
|
221
|
-
`}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(){var t;super.connectedCallback();const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const 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}}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()}}
|
|
221
|
+
`}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(){var t;super.connectedCallback();const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const 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}}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=vi,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 xi=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),yi=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),mi=i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),$i=i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),ki=i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),wi=i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),zi=e.css`
|
|
222
222
|
.ft-tooltip--container {
|
|
223
223
|
display: block;
|
|
224
224
|
position: relative;
|
|
@@ -234,23 +234,23 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
234
234
|
box-sizing: border-box;
|
|
235
235
|
overflow: hidden;
|
|
236
236
|
width: max-content;
|
|
237
|
-
max-width: ${
|
|
237
|
+
max-width: ${wi};
|
|
238
238
|
text-align: center;
|
|
239
|
-
padding: ${
|
|
240
|
-
z-index: ${
|
|
239
|
+
padding: ${xi};
|
|
240
|
+
z-index: ${$i};
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
.ft-tooltip--content {
|
|
244
244
|
padding: 4px 8px;
|
|
245
|
-
border-radius: ${
|
|
246
|
-
background-color: ${
|
|
247
|
-
color: ${
|
|
245
|
+
border-radius: ${ki};
|
|
246
|
+
background-color: ${mi};
|
|
247
|
+
color: ${yi};
|
|
248
248
|
top: -500px;
|
|
249
249
|
left: -500px;
|
|
250
250
|
position: relative;
|
|
251
251
|
word-break: break-word;
|
|
252
252
|
}
|
|
253
|
-
`;var
|
|
253
|
+
`;var Si=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 Oi 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`
|
|
254
254
|
<div part="container"
|
|
255
255
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
256
256
|
@mouseenter=${this.onHover}
|
|
@@ -266,7 +266,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
266
266
|
</div>
|
|
267
267
|
<slot></slot>
|
|
268
268
|
</div>
|
|
269
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has(
|
|
269
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}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.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, ${wi})`}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())}}Oi.elementDefinitions={"ft-typography":ri},Oi.styles=zi,Si([o.property()],Oi.prototype,"text",void 0),Si([o.property({type:Boolean})],Oi.prototype,"manual",void 0),Si([o.property({type:Boolean})],Oi.prototype,"inline",void 0),Si([o.property({type:Number})],Oi.prototype,"delay",void 0),Si([o.property()],Oi.prototype,"position",void 0),Si([o.queryAssignedNodes("",!0)],Oi.prototype,"slotNodes",void 0),Si([o.query(".ft-tooltip--container")],Oi.prototype,"container",void 0),Si([o.query("slot")],Oi.prototype,"target",void 0),Si([o.query(".ft-tooltip")],Oi.prototype,"tooltip",void 0),Si([o.query(".ft-tooltip--content")],Oi.prototype,"tooltipContent",void 0),Si([o.state()],Oi.prototype,"visible",void 0),i.customElement("ft-tooltip")(Oi);const Ci={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Bi=e.css`
|
|
270
270
|
:host {
|
|
271
271
|
line-height: 0;
|
|
272
272
|
}
|
|
@@ -275,8 +275,8 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
275
275
|
display: inline-block;
|
|
276
276
|
position: relative;
|
|
277
277
|
|
|
278
|
-
width: ${
|
|
279
|
-
height: ${
|
|
278
|
+
width: ${Ci.size};
|
|
279
|
+
height: ${Ci.size};
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
.ft-loader div {
|
|
@@ -285,7 +285,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
285
285
|
width: 25%;
|
|
286
286
|
height: 25%;
|
|
287
287
|
border-radius: 50%;
|
|
288
|
-
background: ${
|
|
288
|
+
background: ${Ci.color};
|
|
289
289
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
290
290
|
}
|
|
291
291
|
|
|
@@ -332,29 +332,29 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
332
332
|
transform: translate(0, 0);
|
|
333
333
|
}
|
|
334
334
|
100% {
|
|
335
|
-
transform: translate(calc(0.35 * ${
|
|
335
|
+
transform: translate(calc(0.35 * ${Ci.size}), 0);
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
`;class
|
|
338
|
+
`;class ji extends i.FtLitElement{render(){return e.html`
|
|
339
339
|
<div class="ft-loader">
|
|
340
340
|
<div></div>
|
|
341
341
|
<div></div>
|
|
342
342
|
<div></div>
|
|
343
343
|
<div></div>
|
|
344
344
|
</div>
|
|
345
|
-
`}}var
|
|
345
|
+
`}}var Ei,Di;ji.styles=Bi,i.customElement("ft-loader")(ji),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=""}(Ei||(Ei={})),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=""}(Di||(Di={})),new Map([...["abw"].map((t=>[t,Di.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,Di.AUDIO])),...["avi"].map((t=>[t,Di.AVI])),...["chm","xhs"].map((t=>[t,Di.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,Di.CODE])),...["csv"].map((t=>[t,Di.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Di.DITA])),...["epub"].map((t=>[t,Di.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Di.EXCEL])),...["flac"].map((t=>[t,Di.FLAC])),...["gif"].map((t=>[t,Di.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Di.GZIP])),...["html","htm","xhtml"].map((t=>[t,Di.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,Di.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Di.JPEG])),...["json"].map((t=>[t,Di.JSON])),...["m4a","m4p"].map((t=>[t,Di.M4A])),...["mov","qt"].map((t=>[t,Di.MOV])),...["mp3"].map((t=>[t,Di.MP3])),...["mp4","m4v"].map((t=>[t,Di.MP4])),...["ogg","oga"].map((t=>[t,Di.OGG])),...["pdf","ps"].map((t=>[t,Di.PDF])),...["png"].map((t=>[t,Di.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Di.POWERPOINT])),...["rar"].map((t=>[t,Di.RAR])),...["stp"].map((t=>[t,Di.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Di.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,Di.VIDEO])),...["wav"].map((t=>[t,Di.WAV])),...["wma"].map((t=>[t,Di.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Di.WORD])),...["xml","xsl","rdf"].map((t=>[t,Di.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Di.YAML])),...["zip"].map((t=>[t,Di.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")},Ti=e.css`
|
|
346
346
|
:host {
|
|
347
347
|
display: inline-block;
|
|
348
348
|
}
|
|
349
349
|
|
|
350
350
|
:host, i.ft-icon {
|
|
351
|
-
width: ${
|
|
352
|
-
height: ${
|
|
351
|
+
width: ${Ni.size};
|
|
352
|
+
height: ${Ni.size};
|
|
353
353
|
text-align: center;
|
|
354
354
|
}
|
|
355
355
|
|
|
356
356
|
i.ft-icon {
|
|
357
|
-
font-size: ${
|
|
357
|
+
font-size: ${Ni.size};
|
|
358
358
|
line-height: 1;
|
|
359
359
|
font-weight: normal;
|
|
360
360
|
text-transform: none;
|
|
@@ -365,26 +365,26 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
365
365
|
text-rendering: auto;
|
|
366
366
|
-webkit-font-smoothing: antialiased;
|
|
367
367
|
-moz-osx-font-smoothing: grayscale;
|
|
368
|
-
vertical-align: ${
|
|
368
|
+
vertical-align: ${Ni.verticalAlign};
|
|
369
369
|
}
|
|
370
370
|
|
|
371
371
|
.ft-icon--fluid-topics {
|
|
372
|
-
font-family: ${
|
|
372
|
+
font-family: ${Ni.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
373
373
|
}
|
|
374
374
|
|
|
375
375
|
.ft-icon--file-format {
|
|
376
|
-
font-family: ${
|
|
376
|
+
font-family: ${Ni.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
377
377
|
}
|
|
378
378
|
|
|
379
379
|
.ft-icon--material {
|
|
380
|
-
font-family: ${
|
|
380
|
+
font-family: ${Ni.materialFontFamily}, "Material Icons", sans-serif;
|
|
381
381
|
}
|
|
382
|
-
`;var
|
|
382
|
+
`;var Ii;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ii||(Ii={}));var Mi=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 Fi extends i.FtLitElement{constructor(){super(...arguments),this.variant=Ii.fluid_topics,this.resolvedIcon=e.nothing}render(){const t="material"!==this.variant||this.value;return e.html`
|
|
383
383
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
384
384
|
${n.unsafeHTML(this.resolvedIcon)}
|
|
385
385
|
<slot ?hidden=${t}></slot>
|
|
386
386
|
</i>
|
|
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:""}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
|
|
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:""}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 Ii.file_format:this.resolvedIcon=null!==(t=Di[o.toUpperCase()])&&void 0!==t?t:o;break;case Ii.fluid_topics:this.resolvedIcon=null!==(i=Ei[o.toUpperCase()])&&void 0!==i?i:o;break;default:this.resolvedIcon=this.value||e.nothing}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}Fi.elementDefinitions={},Fi.styles=Ti,Mi([o.property()],Fi.prototype,"variant",void 0),Mi([o.property()],Fi.prototype,"value",void 0),Mi([o.state()],Fi.prototype,"resolvedIcon",void 0),Mi([o.query("slot")],Fi.prototype,"slottedContent",void 0),i.customElement("ft-icon")(Fi);const Ai=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:Ai,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",Ai),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)),Ri={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.noTextSelect,e.css`
|
|
388
388
|
:host {
|
|
389
389
|
display: inline-block;
|
|
390
390
|
max-width: 100%;
|
|
@@ -395,7 +395,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
395
395
|
box-shadow: 0px 0px 0px transparent;
|
|
396
396
|
border: 0px solid transparent;
|
|
397
397
|
text-shadow: 0px 0px 0px transparent;
|
|
398
|
-
font-size: ${
|
|
398
|
+
font-size: ${_i.fontSize};
|
|
399
399
|
}
|
|
400
400
|
|
|
401
401
|
button:hover {
|
|
@@ -424,17 +424,17 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
424
424
|
border: none;
|
|
425
425
|
pointer-events: auto;
|
|
426
426
|
|
|
427
|
-
--ft-button-internal-line-height: calc(${
|
|
428
|
-
--ft-button-internal-color: ${
|
|
429
|
-
${i.setVariable(
|
|
427
|
+
--ft-button-internal-line-height: calc(${_i.fontSize} + 2px);
|
|
428
|
+
--ft-button-internal-color: ${_i.color};
|
|
429
|
+
${i.setVariable(Ni.size,_i.iconSize)};
|
|
430
430
|
--ft-button-internal-vertical-padding: 6px;
|
|
431
431
|
--ft-button-internal-horizontal-padding: 8px;
|
|
432
|
-
${i.setVariable(
|
|
433
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
432
|
+
${i.setVariable(ai.color,_i.rippleColor)};
|
|
433
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${_i.iconSize});
|
|
434
434
|
|
|
435
|
-
border-radius: ${
|
|
435
|
+
border-radius: ${_i.borderRadius};
|
|
436
436
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
437
|
-
background-color: ${
|
|
437
|
+
background-color: ${_i.backgroundColor};
|
|
438
438
|
color: var(--ft-button-internal-color);
|
|
439
439
|
-webkit-mask-image: radial-gradient(white, black);
|
|
440
440
|
}
|
|
@@ -446,7 +446,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
446
446
|
.ft-button--dense {
|
|
447
447
|
--ft-button-internal-vertical-padding: 2px;
|
|
448
448
|
--ft-button-internal-horizontal-padding: 4px;
|
|
449
|
-
border-radius: ${
|
|
449
|
+
border-radius: ${Ui};
|
|
450
450
|
}
|
|
451
451
|
|
|
452
452
|
.ft-button--round {
|
|
@@ -455,13 +455,13 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
455
455
|
|
|
456
456
|
.ft-button[disabled] {
|
|
457
457
|
filter: grayscale(1);
|
|
458
|
-
opacity: ${
|
|
458
|
+
opacity: ${_i.opacityDisabled};
|
|
459
459
|
}
|
|
460
460
|
|
|
461
461
|
.ft-button.ft-button--primary {
|
|
462
|
-
background-color: ${
|
|
463
|
-
--ft-button-internal-color: ${
|
|
464
|
-
${i.setVariable(
|
|
462
|
+
background-color: ${Ri.backgroundColor};
|
|
463
|
+
--ft-button-internal-color: ${Ri.color};
|
|
464
|
+
${i.setVariable(ai.color,Ri.rippleColor)};
|
|
465
465
|
}
|
|
466
466
|
|
|
467
467
|
.ft-button.ft-button--outlined {
|
|
@@ -480,8 +480,8 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
480
480
|
text-overflow: ellipsis;
|
|
481
481
|
display: block;
|
|
482
482
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
483
|
-
${i.setVariable(
|
|
484
|
-
${i.setVariable(
|
|
483
|
+
${i.setVariable(Zt.fontSize,"1em")};
|
|
484
|
+
${i.setVariable(Zt.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
485
485
|
}
|
|
486
486
|
|
|
487
487
|
.ft-button--safari-fix .ft-button--label {
|
|
@@ -514,10 +514,10 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
514
514
|
}
|
|
515
515
|
|
|
516
516
|
ft-loader {
|
|
517
|
-
${i.setVariable(
|
|
518
|
-
${i.setVariable(
|
|
517
|
+
${i.setVariable(Ci.size,_i.iconSize)};
|
|
518
|
+
${i.setVariable(Ci.color,"var(--ft-button-internal-color)")};
|
|
519
519
|
}
|
|
520
|
-
`];var
|
|
520
|
+
`];var Hi=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 Wi 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.iconVariant=Ii.material,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-button--safari-fix":i.isSafari,"ft-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
|
|
521
521
|
<button part="button"
|
|
522
522
|
class="${r.classMap(t)}"
|
|
523
523
|
aria-label="${this.getLabel()}"
|
|
@@ -539,7 +539,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
539
539
|
</ft-tooltip>
|
|
540
540
|
`:t}resolveIcon(){return this.loading?e.html`
|
|
541
541
|
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
542
|
-
<ft-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}}
|
|
542
|
+
<ft-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}}Wi.elementDefinitions={"ft-ripple":gi,"ft-tooltip":Oi,"ft-typography":ri,"ft-icon":Fi,"ft-loader":ji},Wi.styles=Vi,Hi([o.property({type:Boolean})],Wi.prototype,"primary",void 0),Hi([o.property({type:Boolean})],Wi.prototype,"outlined",void 0),Hi([o.property({type:Boolean})],Wi.prototype,"disabled",void 0),Hi([o.property({type:Boolean})],Wi.prototype,"dense",void 0),Hi([o.property({type:Boolean})],Wi.prototype,"round",void 0),Hi([o.property({type:String})],Wi.prototype,"label",void 0),Hi([o.property({type:String})],Wi.prototype,"icon",void 0),Hi([o.property({type:String})],Wi.prototype,"iconVariant",void 0),Hi([o.property({type:Boolean})],Wi.prototype,"trailingIcon",void 0),Hi([o.property({type:Boolean})],Wi.prototype,"loading",void 0),Hi([o.property({type:String})],Wi.prototype,"tooltipPosition",void 0),Hi([o.property({type:Boolean})],Wi.prototype,"hideTooltip",void 0),Hi([o.property({type:Boolean})],Wi.prototype,"forceTooltip",void 0),Hi([o.query(".ft-button")],Wi.prototype,"button",void 0),Hi([o.query(".ft-button--label slot")],Wi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Wi);const Pi=i.FtCssVariableFactory.extend("--ft-checkbox-text-color",i.designSystemVariables.colorOnSurfaceHigh),Zi=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),Ki=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),Gi=i.FtCssVariableFactory.extend("--ft-checkbox-border-color",i.designSystemVariables.colorOnSurfaceMedium),qi=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),Xi=e.css`
|
|
543
543
|
* {
|
|
544
544
|
box-sizing: border-box;
|
|
545
545
|
}
|
|
@@ -554,7 +554,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
554
554
|
}
|
|
555
555
|
|
|
556
556
|
.ft-checkbox--disabled {
|
|
557
|
-
color: ${
|
|
557
|
+
color: ${qi};
|
|
558
558
|
}
|
|
559
559
|
|
|
560
560
|
input {
|
|
@@ -578,26 +578,26 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
578
578
|
|
|
579
579
|
.ft-checkbox--box {
|
|
580
580
|
display: flex;
|
|
581
|
-
border: 2px solid ${
|
|
581
|
+
border: 2px solid ${Gi};
|
|
582
582
|
border-radius: 2px;
|
|
583
583
|
|
|
584
584
|
width: 18px;
|
|
585
585
|
height: 18px;
|
|
586
586
|
|
|
587
|
-
color: ${
|
|
587
|
+
color: ${Ki};
|
|
588
588
|
}
|
|
589
589
|
|
|
590
590
|
|
|
591
591
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
592
592
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
593
|
-
border-color: ${
|
|
594
|
-
background-color: ${
|
|
593
|
+
border-color: ${Zi};
|
|
594
|
+
background-color: ${Zi};
|
|
595
595
|
}
|
|
596
596
|
|
|
597
597
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
598
|
-
border-color: ${
|
|
598
|
+
border-color: ${qi};
|
|
599
599
|
background-color: transparent;
|
|
600
|
-
color: ${
|
|
600
|
+
color: ${qi};
|
|
601
601
|
}
|
|
602
602
|
|
|
603
603
|
.ft-checkbox--checkmark {
|
|
@@ -616,7 +616,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
616
616
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
617
617
|
opacity: 1;
|
|
618
618
|
}
|
|
619
|
-
`;var
|
|
619
|
+
`;var Yi=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 Ji 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`
|
|
620
620
|
<label class="${r.classMap(t)}" for="checkbox-input">
|
|
621
621
|
<div class="ft-checkbox--box-container">
|
|
622
622
|
<ft-ripple
|
|
@@ -642,14 +642,14 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
642
642
|
<slot></slot>
|
|
643
643
|
</ft-typography>
|
|
644
644
|
</label>
|
|
645
|
-
`}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)}}
|
|
645
|
+
`}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)}}Ji.elementDefinitions={"ft-ripple":gi,"ft-typography":ri},Ji.styles=Xi,Yi([o.property()],Ji.prototype,"name",void 0),Yi([o.property({type:Boolean,reflect:!0})],Ji.prototype,"checked",void 0),Yi([o.property({type:Boolean})],Ji.prototype,"indeterminate",void 0),Yi([o.property({type:Boolean})],Ji.prototype,"disabled",void 0),Yi([o.query(".ft-checkbox")],Ji.prototype,"container",void 0),Yi([o.query("ft-ripple")],Ji.prototype,"ripple",void 0),i.customElement("ft-checkbox")(Ji);const Qi=i.FtCssVariableFactory.extend("--ft-radio-text-color",i.designSystemVariables.colorOnSurfaceHigh),te=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),ie=(i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),i.FtCssVariableFactory.extend("--ft-radio-border-color",i.designSystemVariables.colorOnSurfaceMedium)),ee=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),oe=e.css`
|
|
646
646
|
* {
|
|
647
647
|
box-sizing: border-box;
|
|
648
648
|
}
|
|
649
649
|
|
|
650
650
|
.ft-radio {
|
|
651
651
|
box-sizing: border-box;
|
|
652
|
-
color: ${
|
|
652
|
+
color: ${Qi};
|
|
653
653
|
|
|
654
654
|
display: inline-flex;
|
|
655
655
|
align-items: center;
|
|
@@ -657,7 +657,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
657
657
|
}
|
|
658
658
|
|
|
659
659
|
.ft-radio--disabled {
|
|
660
|
-
color: ${
|
|
660
|
+
color: ${ee};
|
|
661
661
|
}
|
|
662
662
|
|
|
663
663
|
input {
|
|
@@ -680,7 +680,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
680
680
|
}
|
|
681
681
|
|
|
682
682
|
.ft-radio--box {
|
|
683
|
-
border: 2px solid ${
|
|
683
|
+
border: 2px solid ${ie};
|
|
684
684
|
border-radius: 50%;
|
|
685
685
|
|
|
686
686
|
display: flex;
|
|
@@ -693,7 +693,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
693
693
|
|
|
694
694
|
.ft-radio--box:after {
|
|
695
695
|
content: " ";
|
|
696
|
-
background-color: ${
|
|
696
|
+
background-color: ${te};
|
|
697
697
|
|
|
698
698
|
border-radius: 50%;
|
|
699
699
|
|
|
@@ -705,7 +705,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
705
705
|
}
|
|
706
706
|
|
|
707
707
|
.ft-radio--checked .ft-radio--box {
|
|
708
|
-
border-color: ${
|
|
708
|
+
border-color: ${te};
|
|
709
709
|
}
|
|
710
710
|
|
|
711
711
|
|
|
@@ -714,14 +714,14 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
714
714
|
}
|
|
715
715
|
|
|
716
716
|
.ft-radio--disabled .ft-radio--box {
|
|
717
|
-
border-color: ${
|
|
717
|
+
border-color: ${ee};
|
|
718
718
|
background-color: transparent;
|
|
719
719
|
}
|
|
720
720
|
|
|
721
721
|
.ft-radio--disabled .ft-radio--box:after {
|
|
722
|
-
background-color: ${
|
|
722
|
+
background-color: ${ee};
|
|
723
723
|
}
|
|
724
|
-
`;var
|
|
724
|
+
`;var se=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 re extends CustomEvent{constructor(t,i){super("change",{detail:{value:t,checked:i},bubbles:!0,composed:!0})}}class ne 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`
|
|
725
725
|
<div class="${r.classMap(t)}">
|
|
726
726
|
<div class="ft-radio--box-container">
|
|
727
727
|
<ft-ripple
|
|
@@ -746,17 +746,17 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
746
746
|
</ft-typography>
|
|
747
747
|
</label>
|
|
748
748
|
</div>
|
|
749
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
749
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new re(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 re(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}ne.elementDefinitions={"ft-ripple":gi,"ft-typography":ri},ne.styles=oe,se([o.property()],ne.prototype,"value",void 0),se([o.property()],ne.prototype,"name",void 0),se([o.property({type:Boolean,reflect:!0})],ne.prototype,"checked",void 0),se([o.property({type:Boolean})],ne.prototype,"disabled",void 0),se([o.query(".ft-radio")],ne.prototype,"container",void 0),se([o.query("ft-ripple")],ne.prototype,"ripple",void 0),se([o.query("input")],ne.prototype,"input",void 0);const le=e.css`
|
|
750
750
|
:host {
|
|
751
751
|
display: contents;
|
|
752
752
|
}
|
|
753
|
-
`;var
|
|
753
|
+
`;var ae=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 he extends i.FtLitElement{constructor(){super(...arguments),this.name=""}render(){return e.html`
|
|
754
754
|
<slot @slotchange=${this.onSlotChange}
|
|
755
755
|
@change=${this.onChange}
|
|
756
756
|
@keydown=${this.onKeyDown}
|
|
757
757
|
@focusin=${this.focusCurrentValue}
|
|
758
758
|
></slot>
|
|
759
|
-
`}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)}}
|
|
759
|
+
`}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)}}he.elementDefinitions={},he.styles=le,ae([o.property()],he.prototype,"name",void 0),ae([o.queryAssignedElements()],he.prototype,"radioButtons",void 0),i.customElement("ft-radio")(ne),i.customElement("ft-radio-group")(he);const pe={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")},fe=e.css`
|
|
760
760
|
.ft-filter-level--container {
|
|
761
761
|
display: flex;
|
|
762
762
|
flex-direction: column;
|
|
@@ -770,14 +770,14 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
770
770
|
flex-shrink: 0;
|
|
771
771
|
text-decoration: none;
|
|
772
772
|
position: relative;
|
|
773
|
-
border-radius: ${
|
|
773
|
+
border-radius: ${pe.borderRadiusM};
|
|
774
774
|
overflow: hidden;
|
|
775
775
|
display: flex;
|
|
776
776
|
align-items: center;
|
|
777
777
|
padding: 4px 4px;
|
|
778
778
|
gap: 4px;
|
|
779
779
|
cursor: pointer;
|
|
780
|
-
color: ${
|
|
780
|
+
color: ${pe.colorOnSurface};
|
|
781
781
|
}
|
|
782
782
|
|
|
783
783
|
.ft-filter-level--go-back:focus {
|
|
@@ -806,7 +806,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
806
806
|
}
|
|
807
807
|
|
|
808
808
|
ft-button {
|
|
809
|
-
${i.setVariable(
|
|
809
|
+
${i.setVariable(_i.color,pe.colorOnSurface)};
|
|
810
810
|
}
|
|
811
811
|
|
|
812
812
|
ft-radio, ft-checkbox {
|
|
@@ -820,9 +820,9 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
820
820
|
|
|
821
821
|
.ft-filter-level--no-values {
|
|
822
822
|
margin: 10px 0;
|
|
823
|
-
color: ${
|
|
823
|
+
color: ${pe.colorOnSurfaceMedium};
|
|
824
824
|
}
|
|
825
|
-
`;var
|
|
825
|
+
`;var ce=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 de 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`
|
|
826
826
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
827
827
|
${null==this.parent?null:e.html`
|
|
828
828
|
<div tabindex="0"
|
|
@@ -871,7 +871,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
871
871
|
data-value="${t.value}"
|
|
872
872
|
.checked=${t.selected}
|
|
873
873
|
.disabled=${this.disabled}
|
|
874
|
-
.indeterminate=${
|
|
874
|
+
.indeterminate=${ni(null!==(i=t.subOptions)&&void 0!==i?i:[],(t=>{var i;return null!==(i=t.subOptions)&&void 0!==i?i:[]})).some((t=>t.selected))}
|
|
875
875
|
@change=${i=>this.optionsChanged(i,t)}>
|
|
876
876
|
${t.label}
|
|
877
877
|
</ft-checkbox>
|
|
@@ -886,7 +886,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
886
886
|
@change=${t=>t.stopPropagation()}>
|
|
887
887
|
${t.label}
|
|
888
888
|
</ft-radio>
|
|
889
|
-
`}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}))}}
|
|
889
|
+
`}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}))}}de.elementDefinitions={"ft-button":Wi,"ft-ripple":gi,"ft-typography":ri,"ft-checkbox":Ji,"ft-icon":Fi,"ft-radio":ne},de.styles=fe,ce([o.property({type:String})],de.prototype,"id",void 0),ce([o.property({type:Object})],de.prototype,"parent",void 0),ce([o.property({type:Array})],de.prototype,"options",void 0),ce([o.property({type:Boolean})],de.prototype,"multivalued",void 0),ce([o.property({type:Boolean})],de.prototype,"disabled",void 0),ce([o.property({type:Boolean})],de.prototype,"hideSelectedOptions",void 0),ce([o.property({type:Boolean})],de.prototype,"preventNavigation",void 0),ce([o.property({type:String})],de.prototype,"filter",void 0),ce([o.property({type:String})],de.prototype,"moreValuesButtonLabel",void 0),ce([o.property({type:String})],de.prototype,"noValuesLabel",void 0),ce([o.property({type:Number})],de.prototype,"displayedValuesLimit",void 0),ce([o.query(".ft-filter-level--container")],de.prototype,"container",void 0),ce([o.state()],de.prototype,"displayedPages",void 0);const ue={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")},ve=e.css`
|
|
890
890
|
.ft-snap-scroll {
|
|
891
891
|
box-sizing: border-box;
|
|
892
892
|
position: relative;
|
|
@@ -921,7 +921,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
921
921
|
flex-wrap: nowrap;
|
|
922
922
|
align-items: flex-start;
|
|
923
923
|
justify-content: flex-start;
|
|
924
|
-
gap: ${
|
|
924
|
+
gap: ${ue.gap};
|
|
925
925
|
}
|
|
926
926
|
|
|
927
927
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -964,11 +964,11 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
964
964
|
.ft-snap-scroll--next {
|
|
965
965
|
position: absolute;
|
|
966
966
|
display: flex;
|
|
967
|
-
z-index: ${
|
|
967
|
+
z-index: ${ue.buttonsZIndex};
|
|
968
968
|
opacity: 1;
|
|
969
969
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
970
|
-
${i.setVariable(
|
|
971
|
-
${i.setVariable(
|
|
970
|
+
${i.setVariable(_i.backgroundColor,"transparent")};
|
|
971
|
+
${i.setVariable(_i.color,ue.buttonsColor)};
|
|
972
972
|
}
|
|
973
973
|
|
|
974
974
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -981,37 +981,37 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
981
981
|
top: 0;
|
|
982
982
|
left: -1px;
|
|
983
983
|
bottom: 0;
|
|
984
|
-
background: linear-gradient(to right, ${
|
|
984
|
+
background: linear-gradient(to right, ${ue.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
985
985
|
}
|
|
986
986
|
|
|
987
987
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
988
988
|
top: -1px;
|
|
989
989
|
left: 0;
|
|
990
990
|
right: 0;
|
|
991
|
-
background: linear-gradient(to bottom, ${
|
|
991
|
+
background: linear-gradient(to bottom, ${ue.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
992
992
|
}
|
|
993
993
|
|
|
994
994
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
995
995
|
top: 0;
|
|
996
996
|
right: -1px;
|
|
997
997
|
bottom: 0;
|
|
998
|
-
background: linear-gradient(to left, ${
|
|
998
|
+
background: linear-gradient(to left, ${ue.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
999
999
|
}
|
|
1000
1000
|
|
|
1001
1001
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1002
1002
|
left: 0;
|
|
1003
1003
|
right: 0;
|
|
1004
1004
|
bottom: -1px;
|
|
1005
|
-
background: linear-gradient(to top, ${
|
|
1005
|
+
background: linear-gradient(to top, ${ue.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1006
1006
|
}
|
|
1007
1007
|
|
|
1008
1008
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1009
1009
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1010
1010
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1011
1011
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1012
|
-
background-color: ${
|
|
1012
|
+
background-color: ${ue.colorSurface};
|
|
1013
1013
|
}
|
|
1014
|
-
`;var
|
|
1014
|
+
`;var be=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 ge extends CustomEvent{constructor(t,i){super("current-element-change",{detail:{index:t,element:i}})}}class xe 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`
|
|
1015
1015
|
<div part="container" class="${t}">
|
|
1016
1016
|
<ft-button
|
|
1017
1017
|
class="ft-snap-scroll--previous"
|
|
@@ -1035,7 +1035,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1035
1035
|
@click=${this.next}
|
|
1036
1036
|
></ft-button>
|
|
1037
1037
|
</div>
|
|
1038
|
-
`}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
|
|
1038
|
+
`}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 ge(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)}}xe.elementDefinitions={"ft-button":Wi},xe.styles=ve,be([o.property({type:Boolean})],xe.prototype,"horizontal",void 0),be([o.property({type:Boolean})],xe.prototype,"hideScrollbar",void 0),be([o.property({type:Boolean})],xe.prototype,"controls",void 0),be([o.property({type:Boolean})],xe.prototype,"limitSize",void 0),be([o.state()],xe.prototype,"elements",void 0),be([o.state()],xe.prototype,"currentElement",void 0),be([o.state()],xe.prototype,"withScroll",void 0),be([o.state()],xe.prototype,"startReached",void 0),be([o.state()],xe.prototype,"endReached",void 0),be([o.query(".ft-snap-scroll--content")],xe.prototype,"contentSlot",void 0),i.customElement("ft-snap-scroll")(xe);const ye={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")},me=[Qt,e.css`
|
|
1039
1039
|
:host {
|
|
1040
1040
|
display: flex;
|
|
1041
1041
|
max-height: 100%;
|
|
@@ -1048,7 +1048,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1048
1048
|
flex-direction: column;
|
|
1049
1049
|
max-height: 100%;
|
|
1050
1050
|
max-width: 100%;
|
|
1051
|
-
color: ${
|
|
1051
|
+
color: ${ye.colorOnSurface};
|
|
1052
1052
|
}
|
|
1053
1053
|
|
|
1054
1054
|
.ft-filter--header {
|
|
@@ -1058,13 +1058,13 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1058
1058
|
flex-shrink: 0;
|
|
1059
1059
|
padding: 0 10px;
|
|
1060
1060
|
margin-bottom: 8px;
|
|
1061
|
-
${i.setVariable(
|
|
1061
|
+
${i.setVariable(X.fontSize,"14px")};
|
|
1062
1062
|
}
|
|
1063
1063
|
|
|
1064
1064
|
.ft-filter--header ft-button {
|
|
1065
1065
|
flex-shrink: 0;
|
|
1066
1066
|
margin-left: auto;
|
|
1067
|
-
${i.setVariable(
|
|
1067
|
+
${i.setVariable(_i.iconSize,"18px")};
|
|
1068
1068
|
}
|
|
1069
1069
|
|
|
1070
1070
|
.ft-filter--label {
|
|
@@ -1072,8 +1072,8 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1072
1072
|
flex-shrink: 1;
|
|
1073
1073
|
flex-grow: 1;
|
|
1074
1074
|
word-break: break-word;
|
|
1075
|
-
${i.setVariable(
|
|
1076
|
-
${i.setVariable(
|
|
1075
|
+
${i.setVariable(X.lineHeight,"22px")};
|
|
1076
|
+
${i.setVariable(X.fontWeight,"bold")};
|
|
1077
1077
|
}
|
|
1078
1078
|
|
|
1079
1079
|
.ft-filter--filter {
|
|
@@ -1084,8 +1084,8 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1084
1084
|
padding: 0 10px;
|
|
1085
1085
|
overflow: hidden;
|
|
1086
1086
|
height: 32px;
|
|
1087
|
-
transition: height ${
|
|
1088
|
-
margin ${
|
|
1087
|
+
transition: height ${ye.transitionDuration} ${ye.transitionTimingFunction},
|
|
1088
|
+
margin ${ye.transitionDuration} ${ye.transitionTimingFunction};
|
|
1089
1089
|
transition-delay: 500ms;
|
|
1090
1090
|
}
|
|
1091
1091
|
|
|
@@ -1098,15 +1098,15 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1098
1098
|
display: block;
|
|
1099
1099
|
width: 100%;
|
|
1100
1100
|
border-radius: 4px;
|
|
1101
|
-
border: 1px solid ${
|
|
1101
|
+
border: 1px solid ${ye.colorOutline};
|
|
1102
1102
|
padding: 4px;
|
|
1103
|
-
background-color: ${
|
|
1104
|
-
color: ${
|
|
1105
|
-
outline-color: ${
|
|
1103
|
+
background-color: ${ye.colorSurface};
|
|
1104
|
+
color: ${ye.colorOnSurface};
|
|
1105
|
+
outline-color: ${ye.colorPrimary};
|
|
1106
1106
|
}
|
|
1107
1107
|
|
|
1108
1108
|
input::placeholder {
|
|
1109
|
-
color: ${
|
|
1109
|
+
color: ${ye.colorOnSurfaceMedium};
|
|
1110
1110
|
}
|
|
1111
1111
|
|
|
1112
1112
|
.ft-filter--values {
|
|
@@ -1118,7 +1118,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1118
1118
|
}
|
|
1119
1119
|
|
|
1120
1120
|
.ft-filter--separator {
|
|
1121
|
-
border-top: 1px solid ${
|
|
1121
|
+
border-top: 1px solid ${ye.colorOutline};
|
|
1122
1122
|
margin: 4px 10px;
|
|
1123
1123
|
}
|
|
1124
1124
|
|
|
@@ -1143,7 +1143,7 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1143
1143
|
slot {
|
|
1144
1144
|
display: none;
|
|
1145
1145
|
}
|
|
1146
|
-
`];var
|
|
1146
|
+
`];var $e=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 ke extends CustomEvent{constructor(t){super("change",{detail:t})}}class we 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 ni(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`
|
|
1147
1147
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1148
1148
|
part="container">
|
|
1149
1149
|
${this.label||o?e.html`
|
|
@@ -1212,6 +1212,6 @@ const U=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1212
1212
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1213
1213
|
noValuesLabel="${this.noValuesLabel}"
|
|
1214
1214
|
></ft-filter-level>
|
|
1215
|
-
`}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
|
|
1215
|
+
`}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 ke(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)}}we.elementDefinitions={"ft-button":Wi,"ft-filter-level":de,"ft-snap-scroll":xe,"ft-typography":ri},we.styles=me,$e([o.property({type:String})],we.prototype,"id",void 0),$e([o.property({type:String})],we.prototype,"label",void 0),$e([o.property({type:String})],we.prototype,"filterPlaceHolder",void 0),$e([o.property({type:String})],we.prototype,"clearButtonLabel",void 0),$e([o.property({type:String})],we.prototype,"moreValuesButtonLabel",void 0),$e([o.property({type:String})],we.prototype,"noValuesLabel",void 0),$e([i.jsonProperty([])],we.prototype,"options",void 0),$e([o.property({type:Boolean})],we.prototype,"multivalued",void 0),$e([o.property({type:Boolean})],we.prototype,"disabled",void 0),$e([o.property({type:Boolean})],we.prototype,"raiseSelectedOptions",void 0),$e([o.property({type:Number})],we.prototype,"displayedValuesLimit",void 0),$e([o.query(".ft-filter--slot")],we.prototype,"slotElement",void 0),$e([o.query(".ft-filter--container")],we.prototype,"container",void 0),$e([o.query(".ft-filter--values")],we.prototype,"valuesContainer",void 0),$e([o.query(".ft-filter--levels")],we.prototype,"levelsContainer",void 0),$e([o.query(".ft-filter--levels ft-filter-level:last-child")],we.prototype,"lastLevel",void 0),$e([o.query(".ft-filter--filter input")],we.prototype,"filterInput",void 0),$e([o.queryAll(".ft-filter--levels ft-filter-level")],we.prototype,"levels",void 0),$e([o.state()],we.prototype,"withScroll",void 0),$e([o.state()],we.prototype,"filter",void 0),$e([o.state()],we.prototype,"slideIn",void 0),$e([o.state()],we.prototype,"slideOut",void 0);var ze=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 Se extends i.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return e.html`
|
|
1216
1216
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
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}))}}
|
|
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}))}}Se.elementDefinitions={},ze([o.property({type:String})],Se.prototype,"label",void 0),ze([o.property({type:Object,converter:t=>t})],Se.prototype,"value",void 0),ze([o.property({type:Boolean,reflect:!0})],Se.prototype,"selected",void 0),ze([o.property({type:Object})],Se.prototype,"subOptions",void 0),ze([o.query(".ft-filter-option--slot")],Se.prototype,"slotElement",void 0),i.customElement("ft-filter")(we),i.customElement("ft-filter-option")(Se),t.FtFilter=we,t.FtFilterChangeEvent=ke,t.FtFilterCssVariables=ye,t.FtFilterOption=Se,t.styles=me,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|