@fluid-topics/ft-filter 0.3.70 → 1.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-filter-level.css.d.ts +1 -2
- package/build/ft-filter-level.css.js +1 -2
- package/build/ft-filter-level.d.ts +0 -1
- package/build/ft-filter-level.js +7 -7
- package/build/ft-filter-option.d.ts +0 -1
- package/build/ft-filter-option.js +2 -2
- package/build/ft-filter-option.properties.d.ts +0 -1
- package/build/ft-filter-option.properties.js +0 -1
- package/build/ft-filter.css.d.ts +0 -1
- package/build/ft-filter.css.js +0 -1
- package/build/ft-filter.d.ts +0 -1
- package/build/ft-filter.js +2 -2
- package/build/ft-filter.light.js +211 -207
- package/build/ft-filter.min.js +244 -250
- package/build/ft-filter.properties.d.ts +0 -1
- package/build/ft-filter.properties.js +0 -1
- package/build/index.d.ts +1 -1
- package/build/index.js +1 -1
- package/build/utils.d.ts +0 -1
- package/build/utils.js +0 -1
- package/package.json +11 -11
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=window,h=a.trustedTypes,p=h?h.createPolicy("lit-html",{createHTML:t=>t}):void 0,f=`lit$${(Math.random()+"").slice(9)}$`,
|
|
7
|
+
var l;const a=window,h=a.trustedTypes,p=h?h.createPolicy("lit-html",{createHTML:t=>t}):void 0,f="$lit$",c=`lit$${(Math.random()+"").slice(9)}$`,d="?"+c,u=`<${d}>`,v=document,b=()=>v.createComment(""),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,g=Array.isArray,y="[ \t\n\f\r]",m=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,k=/>/g,w=RegExp(`>|${y}(?:([^\\s"'>=/]+)(${y}*=${y}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),z=/'/g,S=/"/g,O=/^(?:script|style|textarea|title)$/i,C=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),B=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),E=new WeakMap,I=v.createTreeWalker(v,129,null,!1),N=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=m;for(let i=0;i<e;i++){const e=t[i];let l,a,h=-1,p=0;for(;p<e.length&&(r.lastIndex=p,a=r.exec(e),null!==a);)p=r.lastIndex,r===m?"!--"===a[1]?r=$:void 0!==a[1]?r=k:void 0!==a[2]?(O.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=w):void 0!==a[3]&&(r=w):r===w?">"===a[0]?(r=null!=s?s:m,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?w:'"'===a[3]?S:z):r===S||r===z?r=w:r===$||r===k?r=m:(r=w,s=void 0);const d=r===w&&t[i+1].startsWith("/>")?" ":"";n+=r===m?e+u:h>=0?(o.push(l),e.slice(0,h)+f+e.slice(h)+c+d):e+c+(-2===h?(o.push(void 0),i):d)}const l=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==p?p.createHTML(l):l,o]};class T{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,p]=N(t,i);if(this.el=T.createElement(a,e),I.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=I.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith(f)||i.startsWith(c)){const e=p[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+f).split(c),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?M:"?"===i[1]?L:"@"===i[1]?H:R})}else l.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(O.test(o.tagName)){const t=o.textContent.split(c),i=t.length-1;if(i>0){o.textContent=h?h.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],b()),I.nextNode(),l.push({type:2,index:++s});o.append(t[i],b())}}}else if(8===o.nodeType)if(o.data===d)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(c,t+1));)l.push({type:7,index:s}),t+=c.length-1}s++}}static createElement(t,i){const e=v.createElement("template");return e.innerHTML=t,e}}function D(t,i,e=t,o){var s,n,r,l;if(i===B)return i;let a=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const h=x(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,e,o)),void 0!==o?(null!==(r=(l=e)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:e._$Cl=a),void 0!==a&&(i=D(t,a._$AS(t,i.values),a,o)),i}class A{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:v).importNode(e,!0);I.currentNode=s;let n=I.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new F(n,n.nextSibling,this,t):1===a.type?i=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(i=new U(n,this,t)),this._$AV.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=I.nextNode(),r++)}return s}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class F{constructor(t,i,e,o){var s;this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=D(this,t,i),x(t)?t===j||null==t||""===t?(this._$AH!==j&&this._$AR(),this._$AH=j):t!==this._$AH&&t!==B&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>g(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==j&&x(this._$AH)?this._$AA.nextSibling.data=t:this.$(v.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=T.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.v(e);else{const t=new A(s,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=E.get(t.strings);return void 0===i&&E.set(t.strings,i=new T(t)),i}T(t){g(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new F(this.k(b()),this.k(b()),this,this.options)):e=i[o],e._$AI(s),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class R{constructor(t,i,e,o,s){this.type=1,this._$AH=j,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=j}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let n=!1;if(void 0===s)t=D(this,t,i,0),n=!x(t)||t!==this._$AH&&t!==B,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=D(this,o[e+r],i,r),l===B&&(l=this._$AH[r]),n||(n=!x(l)||l!==this._$AH[r]),l===j?t=j:t!==j&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.j(t)}j(t){t===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class M extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===j?void 0:t}}const _=h?h.emptyScript:"";class L extends R{constructor(){super(...arguments),this.type=4}j(t){t&&t!==j?this.element.setAttribute(this.name,_):this.element.removeAttribute(this.name)}}class H extends R{constructor(t,i,e,o,s){super(t,i,e,o,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=D(this,t,i,0))&&void 0!==e?e:j)===B)return;const o=this._$AH,s=t===j&&o!==j||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==j&&(o===j||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class U{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){D(this,t)}}const W=a.litHtmlPolyfillSupport;null==W||W(T,F),(null!==(l=a.litHtmlVersions)&&void 0!==l?l:a.litHtmlVersions=[]).push("2.7.3");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const Z=Symbol.for(""),
|
|
13
|
+
const Z=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t._$litStatic$},V=t=>({_$litStatic$:t,r:Z}),K=new Map,G=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],l=[];let a,h=0,p=!1;for(;h<o;){for(a=i[h];h<o&&void 0!==(n=e[h],s=P(n));)a+=s+i[++h],p=!0;h!==o&&l.push(n),r.push(a),h++}if(h===o&&r.push(i[o]),p){const t=r.join("$$lit$$");void 0===(i=K.get(t))&&(r.raw=r,K.set(t,i=r)),e=l}return t(i,...e)})(C);var q;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(q||(q={}));const X=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),Y=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),J={fontFamily:Y,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},Q=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",X),tt=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",J.fontSize,"20px"),it=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",J.fontWeight,"normal"),et=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",J.letterSpacing,"0.15px"),ot=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",J.lineHeight,"1.2"),st=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",J.textTransform,"inherit"),nt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",X),rt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",J.fontSize,"14px"),lt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",J.fontWeight,"normal"),at=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",J.letterSpacing,"0.105px"),ht=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",J.lineHeight,"1.7"),pt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",J.textTransform,"inherit"),ft=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",Y),ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",J.fontSize,"16px"),dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",J.fontWeight,"600"),ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",J.letterSpacing,"0.144px"),vt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",J.lineHeight,"1.5"),bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",J.textTransform,"inherit"),xt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",Y),gt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",J.fontSize,"14px"),yt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",J.fontWeight,"normal"),mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",J.letterSpacing,"0.098px"),$t=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",J.lineHeight,"1.7"),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",J.textTransform,"inherit"),wt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",Y),zt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",J.fontSize,"16px"),St=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",J.fontWeight,"normal"),Ot=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",J.letterSpacing,"0.496px"),Ct=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",J.lineHeight,"1.5"),Bt=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",J.textTransform,"inherit"),jt={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",Y),fontSize:i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",J.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",J.fontWeight,"normal"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",J.letterSpacing,"0.252px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",J.lineHeight,"1.4"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",J.textTransform,"inherit")},Et=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",Y),It=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",J.fontSize,"12px"),Nt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",J.fontWeight,"normal"),Tt=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",J.letterSpacing,"0.396px"),Dt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",J.lineHeight,"1.33"),At=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",J.textTransform,"inherit"),Ft=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",Y),Rt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",J.fontSize,"10px"),Mt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",J.fontWeight,"normal"),_t=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",J.letterSpacing,"0.33px"),Lt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",J.lineHeight,"1.6"),Ht=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",J.textTransform,"inherit"),Ut=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",Y),Wt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",J.fontSize,"10px"),Zt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",J.fontWeight,"normal"),Pt=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",J.letterSpacing,"1.5px"),Vt=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",J.lineHeight,"1.6"),Kt=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",J.textTransform,"uppercase"),Gt={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-button-font-family",Y),fontSize:i.FtCssVariableFactory.extend("--ft-typography-button-font-size",J.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",J.fontWeight,"600"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",J.letterSpacing,"1.246px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-button-line-height",J.lineHeight,"1.15"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",J.textTransform,"uppercase")},qt=e.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
|
-
font-family: ${
|
|
16
|
-
font-size: ${
|
|
17
|
-
font-weight: ${
|
|
18
|
-
letter-spacing: ${
|
|
19
|
-
line-height: ${
|
|
20
|
-
text-transform: ${
|
|
21
|
-
}
|
|
22
|
-
`,
|
|
15
|
+
font-family: ${Q};
|
|
16
|
+
font-size: ${tt};
|
|
17
|
+
font-weight: ${it};
|
|
18
|
+
letter-spacing: ${et};
|
|
19
|
+
line-height: ${ot};
|
|
20
|
+
text-transform: ${st};
|
|
21
|
+
}
|
|
22
|
+
`,Xt=e.css`
|
|
23
23
|
.ft-typography--title-dense {
|
|
24
|
-
font-family: ${
|
|
25
|
-
font-size: ${
|
|
26
|
-
font-weight: ${
|
|
27
|
-
letter-spacing: ${
|
|
28
|
-
line-height: ${
|
|
29
|
-
text-transform: ${
|
|
30
|
-
}
|
|
31
|
-
`,
|
|
24
|
+
font-family: ${nt};
|
|
25
|
+
font-size: ${rt};
|
|
26
|
+
font-weight: ${lt};
|
|
27
|
+
letter-spacing: ${at};
|
|
28
|
+
line-height: ${ht};
|
|
29
|
+
text-transform: ${pt};
|
|
30
|
+
}
|
|
31
|
+
`,Yt=e.css`
|
|
32
32
|
.ft-typography--subtitle1 {
|
|
33
|
-
font-family: ${
|
|
34
|
-
font-size: ${
|
|
35
|
-
font-weight: ${
|
|
36
|
-
letter-spacing: ${
|
|
37
|
-
line-height: ${
|
|
38
|
-
text-transform: ${
|
|
33
|
+
font-family: ${ft};
|
|
34
|
+
font-size: ${ct};
|
|
35
|
+
font-weight: ${dt};
|
|
36
|
+
letter-spacing: ${ut};
|
|
37
|
+
line-height: ${vt};
|
|
38
|
+
text-transform: ${bt};
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,Jt=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: ${xt};
|
|
43
|
+
font-size: ${gt};
|
|
44
|
+
font-weight: ${yt};
|
|
45
|
+
letter-spacing: ${mt};
|
|
46
|
+
line-height: ${$t};
|
|
47
|
+
text-transform: ${kt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,Qt=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: ${wt};
|
|
53
|
+
font-size: ${zt};
|
|
54
|
+
font-weight: ${St};
|
|
55
|
+
letter-spacing: ${Ot};
|
|
56
|
+
line-height: ${Ct};
|
|
57
|
+
text-transform: ${Bt};
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,ti=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: ${jt.fontFamily};
|
|
62
|
+
font-size: ${jt.fontSize};
|
|
63
|
+
font-weight: ${jt.fontWeight};
|
|
64
|
+
letter-spacing: ${jt.letterSpacing};
|
|
65
|
+
line-height: ${jt.lineHeight};
|
|
66
|
+
text-transform: ${jt.textTransform};
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,ii=e.css`
|
|
69
69
|
.ft-typography--caption {
|
|
70
|
-
font-family: ${
|
|
71
|
-
font-size: ${
|
|
72
|
-
font-weight: ${
|
|
73
|
-
letter-spacing: ${
|
|
74
|
-
line-height: ${
|
|
75
|
-
text-transform: ${
|
|
70
|
+
font-family: ${Et};
|
|
71
|
+
font-size: ${It};
|
|
72
|
+
font-weight: ${Nt};
|
|
73
|
+
letter-spacing: ${Tt};
|
|
74
|
+
line-height: ${Dt};
|
|
75
|
+
text-transform: ${At};
|
|
76
76
|
}
|
|
77
|
-
`,
|
|
77
|
+
`,ei=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: ${Ft};
|
|
80
|
+
font-size: ${Rt};
|
|
81
|
+
font-weight: ${Mt};
|
|
82
|
+
letter-spacing: ${_t};
|
|
83
|
+
line-height: ${Lt};
|
|
84
|
+
text-transform: ${Ht};
|
|
85
85
|
}
|
|
86
|
-
`,
|
|
86
|
+
`,oi=e.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
|
-
font-family: ${
|
|
89
|
-
font-size: ${
|
|
88
|
+
font-family: ${Ut};
|
|
89
|
+
font-size: ${Wt};
|
|
90
90
|
font-weight: ${Zt};
|
|
91
|
-
letter-spacing: ${
|
|
92
|
-
line-height: ${
|
|
93
|
-
text-transform: ${
|
|
91
|
+
letter-spacing: ${Pt};
|
|
92
|
+
line-height: ${Vt};
|
|
93
|
+
text-transform: ${Kt};
|
|
94
94
|
}
|
|
95
|
-
`,
|
|
95
|
+
`,si=e.css`
|
|
96
96
|
.ft-typography--button {
|
|
97
|
-
font-family: ${
|
|
98
|
-
font-size: ${
|
|
99
|
-
font-weight: ${
|
|
100
|
-
letter-spacing: ${
|
|
101
|
-
line-height: ${
|
|
102
|
-
text-transform: ${
|
|
103
|
-
}
|
|
104
|
-
`,
|
|
97
|
+
font-family: ${Gt.fontFamily};
|
|
98
|
+
font-size: ${Gt.fontSize};
|
|
99
|
+
font-weight: ${Gt.fontWeight};
|
|
100
|
+
letter-spacing: ${Gt.letterSpacing};
|
|
101
|
+
line-height: ${Gt.lineHeight};
|
|
102
|
+
text-transform: ${Gt.textTransform};
|
|
103
|
+
}
|
|
104
|
+
`,ni=e.css`
|
|
105
105
|
.ft-typography {
|
|
106
106
|
vertical-align: inherit;
|
|
107
107
|
}
|
|
108
|
-
`;var
|
|
109
|
-
<${
|
|
108
|
+
`;var ri=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class li extends i.FtLitElement{constructor(){super(...arguments),this.variant=q.body1}render(){return this.element?G`
|
|
109
|
+
<${V(this.element)}
|
|
110
110
|
class="ft-typography ft-typography--${this.variant}">
|
|
111
111
|
<slot></slot>
|
|
112
|
-
</${
|
|
113
|
-
`:
|
|
112
|
+
</${V(this.element)}>
|
|
113
|
+
`:G`
|
|
114
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
115
|
-
`}}function
|
|
115
|
+
`}}function ai(t,i){return t.flatMap((t=>[t,...ai(i(t),i)]))}li.styles=[qt,Xt,Yt,Jt,Qt,ti,ii,ei,oi,si,ni],ri([o.property()],li.prototype,"element",void 0),ri([o.property()],li.prototype,"variant",void 0),i.customElement("ft-typography")(li);const hi=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),pi={color:hi,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",hi),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")},fi=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),ci=fi,di=i.FtCssVariableFactory.extend("--ft-ripple-background-color",fi),ui=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),vi=ui,bi=i.FtCssVariableFactory.extend("--ft-ripple-background-color",ui),xi=e.css`
|
|
116
116
|
:host {
|
|
117
117
|
display: contents;
|
|
118
118
|
}
|
|
@@ -134,27 +134,27 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
.ft-ripple .ft-ripple--background {
|
|
137
|
-
background-color: ${
|
|
137
|
+
background-color: ${pi.backgroundColor};
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
.ft-ripple .ft-ripple--effect {
|
|
141
|
-
background-color: ${
|
|
141
|
+
background-color: ${pi.color};
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
145
|
-
background-color: ${
|
|
145
|
+
background-color: ${bi};
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
149
|
-
background-color: ${
|
|
149
|
+
background-color: ${vi};
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
153
|
-
background-color: ${
|
|
153
|
+
background-color: ${di};
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
157
|
-
background-color: ${
|
|
157
|
+
background-color: ${ci};
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
.ft-ripple .ft-ripple--background {
|
|
@@ -186,22 +186,22 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
189
|
-
opacity: ${
|
|
189
|
+
opacity: ${pi.opacityContentOnSurfaceHover};
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
193
|
-
opacity: ${
|
|
193
|
+
opacity: ${pi.opacityContentOnSurfaceSelected};
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
197
|
-
opacity: ${
|
|
197
|
+
opacity: ${pi.opacityContentOnSurfaceFocused};
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
201
|
-
opacity: ${
|
|
201
|
+
opacity: ${pi.opacityContentOnSurfacePressed};
|
|
202
202
|
transform: translate(-50%, -50%) scale(1);
|
|
203
203
|
}
|
|
204
|
-
`;var
|
|
204
|
+
`;var gi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class yi extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new i.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new i.Debouncer(10),this.moveRipple=t=>{var i,e;let{x:o,y:s}=this.getCoordinates(t),n=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.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 Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)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(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;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,this.target=void 0}}getCoordinates(t){const i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}
|
|
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(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;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,this.target=void 0}}getCoordinates(t){const i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}yi.elementDefinitions={},yi.styles=xi,gi([o.property({type:Boolean})],yi.prototype,"primary",void 0),gi([o.property({type:Boolean})],yi.prototype,"secondary",void 0),gi([o.property({type:Boolean})],yi.prototype,"unbounded",void 0),gi([o.property({type:Boolean})],yi.prototype,"activated",void 0),gi([o.property({type:Boolean})],yi.prototype,"selected",void 0),gi([o.property({type:Boolean})],yi.prototype,"disabled",void 0),gi([o.state()],yi.prototype,"hovered",void 0),gi([o.state()],yi.prototype,"focused",void 0),gi([o.state()],yi.prototype,"pressed",void 0),gi([o.state()],yi.prototype,"rippling",void 0),gi([o.state()],yi.prototype,"rippleSize",void 0),gi([o.state()],yi.prototype,"originX",void 0),gi([o.state()],yi.prototype,"originY",void 0),gi([o.query(".ft-ripple")],yi.prototype,"ripple",void 0),gi([o.query(".ft-ripple--effect")],yi.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(yi);const mi=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),$i=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),ki=i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),wi=i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),zi=i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),Si=i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),Oi=e.css`
|
|
222
222
|
.ft-tooltip--container {
|
|
223
223
|
display: block;
|
|
224
224
|
position: relative;
|
|
@@ -234,23 +234,23 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)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: ${Si};
|
|
238
238
|
text-align: center;
|
|
239
|
-
padding: ${
|
|
240
|
-
z-index: ${
|
|
239
|
+
padding: ${mi};
|
|
240
|
+
z-index: ${wi};
|
|
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: ${zi};
|
|
246
|
+
background-color: ${ki};
|
|
247
|
+
color: ${$i};
|
|
248
248
|
top: -500px;
|
|
249
249
|
left: -500px;
|
|
250
250
|
position: relative;
|
|
251
251
|
word-break: break-word;
|
|
252
252
|
}
|
|
253
|
-
`;var
|
|
253
|
+
`;var Ci=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Bi extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return e.html`
|
|
254
254
|
<div part="container"
|
|
255
255
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
256
256
|
@mouseenter=${this.onHover}
|
|
@@ -268,7 +268,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
268
268
|
</div>
|
|
269
269
|
</div>
|
|
270
270
|
</div>
|
|
271
|
-
`}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.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=i.height,s=o;break;case"left":n=e,s=-this.tooltip.clientWidth;break;case"right":n=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=0);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${i.width}px, ${
|
|
271
|
+
`}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.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=i.height,s=o;break;case"left":n=e,s=-this.tooltip.clientWidth;break;case"right":n=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=0);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${i.width}px, ${Si})`}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())}}Bi.elementDefinitions={"ft-typography":li},Bi.styles=Oi,Ci([o.property()],Bi.prototype,"text",void 0),Ci([o.property({type:Boolean})],Bi.prototype,"manual",void 0),Ci([o.property({type:Boolean})],Bi.prototype,"inline",void 0),Ci([o.property({type:Number})],Bi.prototype,"delay",void 0),Ci([o.property()],Bi.prototype,"position",void 0),Ci([o.queryAssignedNodes("",!0)],Bi.prototype,"slotNodes",void 0),Ci([o.query(".ft-tooltip--container")],Bi.prototype,"container",void 0),Ci([o.query("slot")],Bi.prototype,"target",void 0),Ci([o.query(".ft-tooltip")],Bi.prototype,"tooltip",void 0),Ci([o.query(".ft-tooltip--content")],Bi.prototype,"tooltipContent",void 0),Ci([o.state()],Bi.prototype,"visible",void 0),i.customElement("ft-tooltip")(Bi);const ji={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Ei=e.css`
|
|
272
272
|
:host {
|
|
273
273
|
line-height: 0;
|
|
274
274
|
}
|
|
@@ -277,8 +277,8 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
277
277
|
display: inline-block;
|
|
278
278
|
position: relative;
|
|
279
279
|
|
|
280
|
-
width: ${
|
|
281
|
-
height: ${
|
|
280
|
+
width: ${ji.size};
|
|
281
|
+
height: ${ji.size};
|
|
282
282
|
}
|
|
283
283
|
|
|
284
284
|
.ft-loader div {
|
|
@@ -287,7 +287,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
287
287
|
width: 25%;
|
|
288
288
|
height: 25%;
|
|
289
289
|
border-radius: 50%;
|
|
290
|
-
background: ${
|
|
290
|
+
background: ${ji.color};
|
|
291
291
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
292
292
|
}
|
|
293
293
|
|
|
@@ -334,17 +334,17 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
334
334
|
transform: translate(0, 0);
|
|
335
335
|
}
|
|
336
336
|
100% {
|
|
337
|
-
transform: translate(calc(0.35 * ${
|
|
337
|
+
transform: translate(calc(0.35 * ${ji.size}), 0);
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
`;class
|
|
340
|
+
`;class Ii extends i.FtLitElement{render(){return e.html`
|
|
341
341
|
<div class="ft-loader">
|
|
342
342
|
<div></div>
|
|
343
343
|
<div></div>
|
|
344
344
|
<div></div>
|
|
345
345
|
<div></div>
|
|
346
346
|
</div>
|
|
347
|
-
`}}var
|
|
347
|
+
`}}var Ni,Ti;Ii.styles=Ei,i.customElement("ft-loader")(Ii),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.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=""}(Ni||(Ni={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(Ti||(Ti={})),new Map([...["abw"].map((t=>[t,Ti.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,Ti.AUDIO])),...["avi"].map((t=>[t,Ti.AVI])),...["chm","xhs"].map((t=>[t,Ti.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,Ti.CODE])),...["csv"].map((t=>[t,Ti.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ti.DITA])),...["epub"].map((t=>[t,Ti.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ti.EXCEL])),...["flac"].map((t=>[t,Ti.FLAC])),...["gif"].map((t=>[t,Ti.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ti.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ti.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,Ti.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ti.JPEG])),...["json"].map((t=>[t,Ti.JSON])),...["m4a","m4p"].map((t=>[t,Ti.M4A])),...["mov","qt"].map((t=>[t,Ti.MOV])),...["mp3"].map((t=>[t,Ti.MP3])),...["mp4","m4v"].map((t=>[t,Ti.MP4])),...["ogg","oga"].map((t=>[t,Ti.OGG])),...["pdf","ps"].map((t=>[t,Ti.PDF])),...["png"].map((t=>[t,Ti.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ti.POWERPOINT])),...["rar"].map((t=>[t,Ti.RAR])),...["stp"].map((t=>[t,Ti.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ti.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,Ti.VIDEO])),...["wav"].map((t=>[t,Ti.WAV])),...["wma"].map((t=>[t,Ti.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ti.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ti.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ti.YAML])),...["zip"].map((t=>[t,Ti.ZIP]))]);const Di={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")},Ai=e.css`
|
|
348
348
|
:host, i.ft-icon {
|
|
349
349
|
display: inline-flex;
|
|
350
350
|
align-items: center;
|
|
@@ -353,14 +353,14 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
:host {
|
|
356
|
-
width: ${
|
|
357
|
-
height: ${
|
|
356
|
+
width: ${Di.size};
|
|
357
|
+
height: ${Di.size};
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
i.ft-icon {
|
|
361
361
|
width: 100%;
|
|
362
362
|
height: 100%;
|
|
363
|
-
font-size: ${
|
|
363
|
+
font-size: ${Di.size};
|
|
364
364
|
line-height: 1;
|
|
365
365
|
font-weight: normal;
|
|
366
366
|
text-transform: none;
|
|
@@ -371,32 +371,32 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
371
371
|
text-rendering: auto;
|
|
372
372
|
-webkit-font-smoothing: antialiased;
|
|
373
373
|
-moz-osx-font-smoothing: grayscale;
|
|
374
|
-
vertical-align: ${
|
|
374
|
+
vertical-align: ${Di.verticalAlign};
|
|
375
375
|
}
|
|
376
376
|
|
|
377
377
|
i.ft-icon.ft-icon--fluid-topics {
|
|
378
|
-
font-family: ${
|
|
378
|
+
font-family: ${Di.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
379
379
|
|
|
380
380
|
/* Ugly fix because font is broken */
|
|
381
|
-
font-size: calc(0.
|
|
381
|
+
font-size: calc(0.75 * ${Di.size});
|
|
382
382
|
position: relative;
|
|
383
|
-
top: -
|
|
383
|
+
top: -4%;
|
|
384
384
|
justify-content: center;
|
|
385
385
|
}
|
|
386
386
|
|
|
387
387
|
.ft-icon--file-format {
|
|
388
|
-
font-family: ${
|
|
388
|
+
font-family: ${Di.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
389
389
|
}
|
|
390
390
|
|
|
391
391
|
.ft-icon--material {
|
|
392
|
-
font-family: ${
|
|
392
|
+
font-family: ${Di.materialFontFamily}, "Material Icons", sans-serif;
|
|
393
393
|
}
|
|
394
|
-
`;var
|
|
395
|
-
<i class="ft-icon ${"ft-icon--"+
|
|
394
|
+
`;var Fi;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Fi||(Fi={}));var Ri=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Mi extends i.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=e.nothing}render(){const t=this.variant&&Object.values(Fi).includes(this.variant)?this.variant:Fi.fluid_topics,i=t!==Fi.material||!!this.value;return e.html`
|
|
395
|
+
<i class="ft-icon ${"ft-icon--"+t}">
|
|
396
396
|
${r.unsafeHTML(this.resolvedIcon)}
|
|
397
|
-
<slot ?hidden=${
|
|
397
|
+
<slot ?hidden=${i}></slot>
|
|
398
398
|
</i>
|
|
399
|
-
`}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
|
|
399
|
+
`}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 Fi.file_format:this.resolvedIcon=null!==(t=Ti[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Fi.material:this.resolvedIcon=this.value||e.nothing;break;default:this.resolvedIcon=null!==(i=Ni[o.replace("-","_").toUpperCase()])&&void 0!==i?i:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Mi.elementDefinitions={},Mi.styles=Ai,Ri([o.property()],Mi.prototype,"variant",void 0),Ri([o.property()],Mi.prototype,"value",void 0),Ri([o.state()],Mi.prototype,"resolvedIcon",void 0),Ri([o.query("slot")],Mi.prototype,"slottedContent",void 0),i.customElement("ft-icon")(Mi);const _i=i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorPrimary),Li={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:_i,fontSize:i.FtCssVariableFactory.extend("--ft-button-font-size",Gt.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariableFactory.extend("--ft-button-ripple-color",_i),verticalPadding:i.FtCssVariableFactory.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:i.FtCssVariableFactory.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:i.FtCssVariableFactory.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Hi=i.FtCssVariableFactory.extend("--ft-button-primary-color",i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),Ui={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-primary-background-color",i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:Hi,rippleColor:i.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Hi)},Wi=i.FtCssVariableFactory.extend("--ft-button-dense-border-radius",i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM)),Zi=i.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","SIZE","2px"),Pi=i.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","SIZE","4px"),Vi=i.FtCssVariableFactory.create("--ft-button-dense-icon-padding","SIZE","4px"),Ki=[i.noTextSelect,e.css`
|
|
400
400
|
:host {
|
|
401
401
|
display: inline-block;
|
|
402
402
|
max-width: 100%;
|
|
@@ -407,7 +407,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
407
407
|
box-shadow: 0px 0px 0px transparent;
|
|
408
408
|
border: 0px solid transparent;
|
|
409
409
|
text-shadow: 0px 0px 0px transparent;
|
|
410
|
-
font-size: ${
|
|
410
|
+
font-size: ${Li.fontSize};
|
|
411
411
|
}
|
|
412
412
|
|
|
413
413
|
button:hover {
|
|
@@ -435,34 +435,33 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
435
435
|
box-sizing: border-box;
|
|
436
436
|
border: none;
|
|
437
437
|
pointer-events: auto;
|
|
438
|
-
gap: ${_i.iconPadding};
|
|
439
438
|
|
|
440
|
-
--ft-button-internal-line-height: calc(${
|
|
441
|
-
--ft-button-internal-color: ${
|
|
442
|
-
${i.setVariable(
|
|
443
|
-
${i.setVariable(
|
|
444
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
439
|
+
--ft-button-internal-line-height: calc(${Li.fontSize} + 2px);
|
|
440
|
+
--ft-button-internal-color: ${Li.color};
|
|
441
|
+
${i.setVariable(Di.size,Li.iconSize)};
|
|
442
|
+
${i.setVariable(pi.color,Li.rippleColor)};
|
|
443
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Li.iconSize});
|
|
445
444
|
|
|
446
|
-
border-radius: ${
|
|
447
|
-
padding: ${
|
|
448
|
-
background-color: ${
|
|
445
|
+
border-radius: ${Li.borderRadius};
|
|
446
|
+
padding: ${Li.verticalPadding} ${Li.horizontalPadding};
|
|
447
|
+
background-color: ${Li.backgroundColor};
|
|
449
448
|
color: var(--ft-button-internal-color);
|
|
450
449
|
-webkit-mask-image: radial-gradient(white, black);
|
|
451
450
|
}
|
|
452
451
|
|
|
453
452
|
.ft-button.ft-button--outlined {
|
|
454
453
|
border: 1px solid var(--ft-button-internal-color);
|
|
455
|
-
padding: calc(${
|
|
454
|
+
padding: calc(${Li.verticalPadding} - 1px) calc(${Li.horizontalPadding} - 1px);
|
|
456
455
|
}
|
|
457
456
|
|
|
458
457
|
.ft-button.ft-button--dense {
|
|
459
|
-
padding: ${Zi} ${
|
|
460
|
-
border-radius: ${
|
|
461
|
-
gap: ${
|
|
458
|
+
padding: ${Zi} ${Pi};
|
|
459
|
+
border-radius: ${Wi};
|
|
460
|
+
gap: ${Vi};
|
|
462
461
|
}
|
|
463
462
|
|
|
464
463
|
.ft-button.ft-button--dense.ft-button--outlined {
|
|
465
|
-
padding: calc(${Zi} - 1px) calc(${
|
|
464
|
+
padding: calc(${Zi} - 1px) calc(${Pi} - 1px);
|
|
466
465
|
}
|
|
467
466
|
|
|
468
467
|
.ft-button:not([disabled]):hover {
|
|
@@ -470,7 +469,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
470
469
|
}
|
|
471
470
|
|
|
472
471
|
.ft-button--round {
|
|
473
|
-
border-radius: calc(var(--ft-button-internal-content-height) / 2 + ${
|
|
472
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + ${Li.verticalPadding});
|
|
474
473
|
}
|
|
475
474
|
|
|
476
475
|
.ft-button--round.ft-button--dense {
|
|
@@ -479,13 +478,13 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
479
478
|
|
|
480
479
|
.ft-button[disabled] {
|
|
481
480
|
filter: grayscale(1);
|
|
482
|
-
opacity: ${
|
|
481
|
+
opacity: ${Li.opacityDisabled};
|
|
483
482
|
}
|
|
484
483
|
|
|
485
484
|
.ft-button.ft-button--primary {
|
|
486
|
-
background-color: ${
|
|
487
|
-
--ft-button-internal-color: ${
|
|
488
|
-
${i.setVariable(
|
|
485
|
+
background-color: ${Ui.backgroundColor};
|
|
486
|
+
--ft-button-internal-color: ${Ui.color};
|
|
487
|
+
${i.setVariable(pi.color,Ui.rippleColor)};
|
|
489
488
|
}
|
|
490
489
|
|
|
491
490
|
.ft-button:focus {
|
|
@@ -498,8 +497,13 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
498
497
|
white-space: nowrap;
|
|
499
498
|
text-overflow: ellipsis;
|
|
500
499
|
display: block;
|
|
501
|
-
${
|
|
502
|
-
${i.setVariable(
|
|
500
|
+
margin: 0 ${Li.iconPadding};
|
|
501
|
+
${i.setVariable(Gt.fontSize,"1em")};
|
|
502
|
+
${i.setVariable(Gt.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.ft-button--dense .ft-button--label {
|
|
506
|
+
margin: 0 ${Vi};
|
|
503
507
|
}
|
|
504
508
|
|
|
505
509
|
.ft-button--label[hidden] {
|
|
@@ -512,12 +516,12 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
512
516
|
}
|
|
513
517
|
|
|
514
518
|
.ft-button--label[hidden] + ft-icon {
|
|
515
|
-
margin: 0 calc(${
|
|
516
|
-
padding: 0 ${
|
|
519
|
+
margin: 0 calc(${Li.horizontalPadding} * -1);
|
|
520
|
+
padding: 0 ${Li.verticalPadding};
|
|
517
521
|
}
|
|
518
522
|
|
|
519
523
|
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
520
|
-
margin: 0 calc(${
|
|
524
|
+
margin: 0 calc(${Pi} * -1);
|
|
521
525
|
padding: 0 ${Zi};
|
|
522
526
|
}
|
|
523
527
|
|
|
@@ -527,10 +531,10 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
527
531
|
}
|
|
528
532
|
|
|
529
533
|
ft-loader {
|
|
530
|
-
${i.setVariable(
|
|
531
|
-
${i.setVariable(
|
|
534
|
+
${i.setVariable(ji.size,Li.iconSize)};
|
|
535
|
+
${i.setVariable(ji.color,"var(--ft-button-internal-color)")};
|
|
532
536
|
}
|
|
533
|
-
`];var
|
|
537
|
+
`];var Gi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class qi extends i.FtLitElement{constructor(){super(...arguments),this.role="button",this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
|
|
534
538
|
<button part="button"
|
|
535
539
|
class="${n.classMap(t)}"
|
|
536
540
|
aria-label="${this.getLabel()}"
|
|
@@ -553,14 +557,14 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
553
557
|
</ft-tooltip>
|
|
554
558
|
`:t}resolveIcon(){return this.loading?e.html`
|
|
555
559
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?e.html`
|
|
556
|
-
<ft-icon part="icon" variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}
|
|
560
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}qi.elementDefinitions={"ft-ripple":yi,"ft-tooltip":Bi,"ft-typography":li,"ft-icon":Mi,"ft-loader":Ii},qi.styles=[i.safariEllipsisFix,Ki],Gi([o.property({type:String,reflect:!0})],qi.prototype,"role",void 0),Gi([o.property({type:Boolean})],qi.prototype,"primary",void 0),Gi([o.property({type:Boolean})],qi.prototype,"outlined",void 0),Gi([o.property({type:Boolean})],qi.prototype,"disabled",void 0),Gi([o.property({type:Boolean})],qi.prototype,"dense",void 0),Gi([o.property({type:Boolean})],qi.prototype,"round",void 0),Gi([o.property()],qi.prototype,"label",void 0),Gi([o.property()],qi.prototype,"icon",void 0),Gi([o.property()],qi.prototype,"iconVariant",void 0),Gi([o.property({type:Boolean})],qi.prototype,"trailingIcon",void 0),Gi([o.property({type:Boolean})],qi.prototype,"loading",void 0),Gi([o.property()],qi.prototype,"tooltipPosition",void 0),Gi([o.property({type:Boolean})],qi.prototype,"hideTooltip",void 0),Gi([o.property({type:Boolean})],qi.prototype,"forceTooltip",void 0),Gi([o.query(".ft-button")],qi.prototype,"button",void 0),Gi([o.query(".ft-button--label slot")],qi.prototype,"slottedContent",void 0),i.customElement("ft-button")(qi);const Xi=i.FtCssVariableFactory.extend("--ft-checkbox-text-color",i.designSystemVariables.colorOnSurfaceHigh),Yi=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),Ji=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),Qi=i.FtCssVariableFactory.extend("--ft-checkbox-border-color",i.designSystemVariables.colorOnSurfaceMedium),te=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),ie=e.css`
|
|
557
561
|
* {
|
|
558
562
|
box-sizing: border-box;
|
|
559
563
|
}
|
|
560
564
|
|
|
561
565
|
.ft-checkbox {
|
|
562
566
|
box-sizing: border-box;
|
|
563
|
-
color: ${
|
|
567
|
+
color: ${Xi};
|
|
564
568
|
|
|
565
569
|
display: inline-flex;
|
|
566
570
|
align-items: center;
|
|
@@ -568,7 +572,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
568
572
|
}
|
|
569
573
|
|
|
570
574
|
.ft-checkbox--disabled {
|
|
571
|
-
color: ${
|
|
575
|
+
color: ${te};
|
|
572
576
|
}
|
|
573
577
|
|
|
574
578
|
input {
|
|
@@ -592,26 +596,26 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
592
596
|
|
|
593
597
|
.ft-checkbox--box {
|
|
594
598
|
display: flex;
|
|
595
|
-
border: 2px solid ${
|
|
599
|
+
border: 2px solid ${Qi};
|
|
596
600
|
border-radius: 2px;
|
|
597
601
|
|
|
598
602
|
width: 18px;
|
|
599
603
|
height: 18px;
|
|
600
604
|
|
|
601
|
-
color: ${
|
|
605
|
+
color: ${Ji};
|
|
602
606
|
}
|
|
603
607
|
|
|
604
608
|
|
|
605
609
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
606
610
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
607
|
-
border-color: ${
|
|
608
|
-
background-color: ${
|
|
611
|
+
border-color: ${Yi};
|
|
612
|
+
background-color: ${Yi};
|
|
609
613
|
}
|
|
610
614
|
|
|
611
615
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
612
|
-
border-color: ${
|
|
616
|
+
border-color: ${te};
|
|
613
617
|
background-color: transparent;
|
|
614
|
-
color: ${
|
|
618
|
+
color: ${te};
|
|
615
619
|
}
|
|
616
620
|
|
|
617
621
|
.ft-checkbox--checkmark {
|
|
@@ -630,7 +634,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
630
634
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
631
635
|
opacity: 1;
|
|
632
636
|
}
|
|
633
|
-
`;var
|
|
637
|
+
`;var ee=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class oe extends 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`
|
|
634
638
|
<label class="${n.classMap(t)}" for="checkbox-input">
|
|
635
639
|
<div class="ft-checkbox--box-container">
|
|
636
640
|
<ft-ripple
|
|
@@ -656,14 +660,14 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
656
660
|
<slot></slot>
|
|
657
661
|
</ft-typography>
|
|
658
662
|
</label>
|
|
659
|
-
`}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)}}
|
|
663
|
+
`}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)}}oe.elementDefinitions={"ft-ripple":yi,"ft-typography":li},oe.styles=ie,ee([o.property()],oe.prototype,"name",void 0),ee([o.property({type:Boolean,reflect:!0})],oe.prototype,"checked",void 0),ee([o.property({type:Boolean})],oe.prototype,"indeterminate",void 0),ee([o.property({type:Boolean})],oe.prototype,"disabled",void 0),ee([o.query(".ft-checkbox")],oe.prototype,"container",void 0),ee([o.query("ft-ripple")],oe.prototype,"ripple",void 0),i.customElement("ft-checkbox")(oe);const se=i.FtCssVariableFactory.extend("--ft-radio-text-color",i.designSystemVariables.colorOnSurfaceHigh),ne=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),re=(i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),i.FtCssVariableFactory.extend("--ft-radio-border-color",i.designSystemVariables.colorOnSurfaceMedium)),le=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),ae=e.css`
|
|
660
664
|
* {
|
|
661
665
|
box-sizing: border-box;
|
|
662
666
|
}
|
|
663
667
|
|
|
664
668
|
.ft-radio {
|
|
665
669
|
box-sizing: border-box;
|
|
666
|
-
color: ${
|
|
670
|
+
color: ${se};
|
|
667
671
|
|
|
668
672
|
display: inline-flex;
|
|
669
673
|
align-items: center;
|
|
@@ -671,7 +675,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
671
675
|
}
|
|
672
676
|
|
|
673
677
|
.ft-radio--disabled {
|
|
674
|
-
color: ${
|
|
678
|
+
color: ${le};
|
|
675
679
|
}
|
|
676
680
|
|
|
677
681
|
input {
|
|
@@ -694,7 +698,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
694
698
|
}
|
|
695
699
|
|
|
696
700
|
.ft-radio--box {
|
|
697
|
-
border: 2px solid ${
|
|
701
|
+
border: 2px solid ${re};
|
|
698
702
|
border-radius: 50%;
|
|
699
703
|
|
|
700
704
|
display: flex;
|
|
@@ -707,7 +711,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
707
711
|
|
|
708
712
|
.ft-radio--box:after {
|
|
709
713
|
content: " ";
|
|
710
|
-
background-color: ${
|
|
714
|
+
background-color: ${ne};
|
|
711
715
|
|
|
712
716
|
border-radius: 50%;
|
|
713
717
|
|
|
@@ -719,7 +723,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
719
723
|
}
|
|
720
724
|
|
|
721
725
|
.ft-radio--checked .ft-radio--box {
|
|
722
|
-
border-color: ${
|
|
726
|
+
border-color: ${ne};
|
|
723
727
|
}
|
|
724
728
|
|
|
725
729
|
|
|
@@ -728,14 +732,14 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
728
732
|
}
|
|
729
733
|
|
|
730
734
|
.ft-radio--disabled .ft-radio--box {
|
|
731
|
-
border-color: ${
|
|
735
|
+
border-color: ${le};
|
|
732
736
|
background-color: transparent;
|
|
733
737
|
}
|
|
734
738
|
|
|
735
739
|
.ft-radio--disabled .ft-radio--box:after {
|
|
736
|
-
background-color: ${
|
|
740
|
+
background-color: ${le};
|
|
737
741
|
}
|
|
738
|
-
`;var
|
|
742
|
+
`;var he=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class pe extends CustomEvent{constructor(t,i){super("change",{detail:{value:t,checked:i},bubbles:!0,composed:!0})}}class fe 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`
|
|
739
743
|
<div class="${n.classMap(t)}">
|
|
740
744
|
<div class="ft-radio--box-container">
|
|
741
745
|
<ft-ripple
|
|
@@ -760,17 +764,17 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
760
764
|
</ft-typography>
|
|
761
765
|
</label>
|
|
762
766
|
</div>
|
|
763
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
767
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new pe(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 pe(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}fe.elementDefinitions={"ft-ripple":yi,"ft-typography":li},fe.styles=ae,he([o.property()],fe.prototype,"value",void 0),he([o.property()],fe.prototype,"name",void 0),he([o.property({type:Boolean,reflect:!0})],fe.prototype,"checked",void 0),he([o.property({type:Boolean})],fe.prototype,"disabled",void 0),he([o.query(".ft-radio")],fe.prototype,"container",void 0),he([o.query("ft-ripple")],fe.prototype,"ripple",void 0),he([o.query("input")],fe.prototype,"input",void 0);const ce=e.css`
|
|
764
768
|
:host {
|
|
765
769
|
display: contents;
|
|
766
770
|
}
|
|
767
|
-
`;var
|
|
771
|
+
`;var de=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class ue extends i.FtLitElement{constructor(){super(...arguments),this.name=""}render(){return e.html`
|
|
768
772
|
<slot @slotchange=${this.onSlotChange}
|
|
769
773
|
@change=${this.onChange}
|
|
770
774
|
@keydown=${this.onKeyDown}
|
|
771
775
|
@focusin=${this.focusCurrentValue}
|
|
772
776
|
></slot>
|
|
773
|
-
`}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)}}
|
|
777
|
+
`}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)}}ue.elementDefinitions={},ue.styles=ce,de([o.property()],ue.prototype,"name",void 0),de([o.queryAssignedElements()],ue.prototype,"radioButtons",void 0),i.customElement("ft-radio")(fe),i.customElement("ft-radio-group")(ue);const ve={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(jt.fontFamily,"Body2 typography"),fontSize:i.FtCssVariableFactory.external(jt.fontSize,"Body2 typography"),fontWeight:i.FtCssVariableFactory.external(jt.fontWeight,"Body2 typography"),letterSpacing:i.FtCssVariableFactory.external(jt.letterSpacing,"Body2 typography"),lineHeight:i.FtCssVariableFactory.external(jt.lineHeight,"Body2 typography"),textTransform:i.FtCssVariableFactory.external(jt.textTransform,"Body2 typography")},be=e.css`
|
|
774
778
|
.ft-filter-level--container {
|
|
775
779
|
display: flex;
|
|
776
780
|
flex-direction: column;
|
|
@@ -784,14 +788,14 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
784
788
|
flex-shrink: 0;
|
|
785
789
|
text-decoration: none;
|
|
786
790
|
position: relative;
|
|
787
|
-
border-radius: ${
|
|
791
|
+
border-radius: ${ve.borderRadiusM};
|
|
788
792
|
overflow: hidden;
|
|
789
793
|
display: flex;
|
|
790
794
|
align-items: center;
|
|
791
795
|
padding: 4px 4px;
|
|
792
796
|
gap: 4px;
|
|
793
797
|
cursor: pointer;
|
|
794
|
-
color: ${
|
|
798
|
+
color: ${ve.colorOnSurface};
|
|
795
799
|
}
|
|
796
800
|
|
|
797
801
|
.ft-filter-level--go-back:focus {
|
|
@@ -820,7 +824,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
820
824
|
}
|
|
821
825
|
|
|
822
826
|
ft-button {
|
|
823
|
-
${i.setVariable(
|
|
827
|
+
${i.setVariable(Li.color,ve.colorOnSurface)};
|
|
824
828
|
}
|
|
825
829
|
|
|
826
830
|
ft-radio, ft-checkbox {
|
|
@@ -834,9 +838,9 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
834
838
|
|
|
835
839
|
.ft-filter-level--no-values {
|
|
836
840
|
margin: 10px 0;
|
|
837
|
-
color: ${
|
|
841
|
+
color: ${ve.colorOnSurfaceMedium};
|
|
838
842
|
}
|
|
839
|
-
`;var
|
|
843
|
+
`;var xe=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class ge 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`
|
|
840
844
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
841
845
|
${null==this.parent?null:e.html`
|
|
842
846
|
<div tabindex="0"
|
|
@@ -846,7 +850,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
846
850
|
@keyup=${this.goBackOnKeyPress}
|
|
847
851
|
@click=${this.goBackOnClick}>
|
|
848
852
|
<ft-ripple></ft-ripple>
|
|
849
|
-
<ft-icon
|
|
853
|
+
<ft-icon>thin_arrow_left</ft-icon>
|
|
850
854
|
<ft-typography variant="body2">${this.parent.label}</ft-typography>
|
|
851
855
|
</div>
|
|
852
856
|
`}
|
|
@@ -859,7 +863,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
859
863
|
<div class="ft-filter-level--option" part="options">
|
|
860
864
|
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
861
865
|
${this.preventNavigation||t.selected||0===(null!==(i=t.subOptions)&&void 0!==i?i:[]).length?e.nothing:e.html`
|
|
862
|
-
<ft-button icon="
|
|
866
|
+
<ft-button icon="thin_arrow_right"
|
|
863
867
|
part="controls navigate-hierarchy"
|
|
864
868
|
label="${t.label}"
|
|
865
869
|
?disabled=${this.disabled}
|
|
@@ -871,7 +875,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
871
875
|
${i.length<t.length?e.html`
|
|
872
876
|
<ft-button
|
|
873
877
|
class="ft-filter-level--display-more"
|
|
874
|
-
icon="
|
|
878
|
+
icon="thin_arrow"
|
|
875
879
|
dense trailingIcon
|
|
876
880
|
part="controls display-more"
|
|
877
881
|
@click=${this.displayMore}>
|
|
@@ -885,7 +889,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
885
889
|
data-value="${t.value}"
|
|
886
890
|
.checked=${t.selected}
|
|
887
891
|
.disabled=${this.disabled}
|
|
888
|
-
.indeterminate=${
|
|
892
|
+
.indeterminate=${ai(null!==(i=t.subOptions)&&void 0!==i?i:[],(t=>{var i;return null!==(i=t.subOptions)&&void 0!==i?i:[]})).some((t=>t.selected))}
|
|
889
893
|
@change=${i=>this.optionsChanged(i,t)}>
|
|
890
894
|
${t.renderOption?t.renderOption:t.label}
|
|
891
895
|
</ft-checkbox>
|
|
@@ -900,7 +904,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
900
904
|
@change=${t=>t.stopPropagation()}>
|
|
901
905
|
${t.renderOption?t.renderOption:t.label}
|
|
902
906
|
</ft-radio>
|
|
903
|
-
`}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}))}}
|
|
907
|
+
`}onRadioKeyUp(t,i){i.selected&&" "===t.key&&this.optionsChanged(t,i)}optionsChanged(t,i){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:i}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}ge.elementDefinitions={"ft-button":qi,"ft-ripple":yi,"ft-typography":li,"ft-checkbox":oe,"ft-icon":Mi,"ft-radio":fe},ge.styles=be,xe([o.property({type:String})],ge.prototype,"id",void 0),xe([o.property({type:Object})],ge.prototype,"parent",void 0),xe([o.property({type:Array})],ge.prototype,"options",void 0),xe([o.property({type:Boolean})],ge.prototype,"multivalued",void 0),xe([o.property({type:Boolean})],ge.prototype,"disabled",void 0),xe([o.property({type:Boolean})],ge.prototype,"hideSelectedOptions",void 0),xe([o.property({type:Boolean})],ge.prototype,"preventNavigation",void 0),xe([o.property({type:String})],ge.prototype,"filter",void 0),xe([o.property({type:String})],ge.prototype,"moreValuesButtonLabel",void 0),xe([o.property({type:String})],ge.prototype,"noValuesLabel",void 0),xe([o.property({type:Number})],ge.prototype,"displayedValuesLimit",void 0),xe([o.query(".ft-filter-level--container")],ge.prototype,"container",void 0),xe([o.state()],ge.prototype,"displayedPages",void 0);const ye={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")},me=e.css`
|
|
904
908
|
.ft-snap-scroll {
|
|
905
909
|
box-sizing: border-box;
|
|
906
910
|
position: relative;
|
|
@@ -935,7 +939,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
935
939
|
flex-wrap: nowrap;
|
|
936
940
|
align-items: flex-start;
|
|
937
941
|
justify-content: flex-start;
|
|
938
|
-
gap: ${
|
|
942
|
+
gap: ${ye.gap};
|
|
939
943
|
}
|
|
940
944
|
|
|
941
945
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -978,11 +982,11 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
978
982
|
.ft-snap-scroll--next {
|
|
979
983
|
position: absolute;
|
|
980
984
|
display: flex;
|
|
981
|
-
z-index: ${
|
|
985
|
+
z-index: ${ye.buttonsZIndex};
|
|
982
986
|
opacity: 1;
|
|
983
987
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
984
|
-
${i.setVariable(
|
|
985
|
-
${i.setVariable(
|
|
988
|
+
${i.setVariable(Li.backgroundColor,"transparent")};
|
|
989
|
+
${i.setVariable(Li.color,ye.buttonsColor)};
|
|
986
990
|
}
|
|
987
991
|
|
|
988
992
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -995,43 +999,43 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
995
999
|
top: 0;
|
|
996
1000
|
left: -1px;
|
|
997
1001
|
bottom: 0;
|
|
998
|
-
background: linear-gradient(to right, ${
|
|
1002
|
+
background: linear-gradient(to right, ${ye.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
999
1003
|
}
|
|
1000
1004
|
|
|
1001
1005
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1002
1006
|
top: -1px;
|
|
1003
1007
|
left: 0;
|
|
1004
1008
|
right: 0;
|
|
1005
|
-
background: linear-gradient(to bottom, ${
|
|
1009
|
+
background: linear-gradient(to bottom, ${ye.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1006
1010
|
}
|
|
1007
1011
|
|
|
1008
1012
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1009
1013
|
top: 0;
|
|
1010
1014
|
right: -1px;
|
|
1011
1015
|
bottom: 0;
|
|
1012
|
-
background: linear-gradient(to left, ${
|
|
1016
|
+
background: linear-gradient(to left, ${ye.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1013
1017
|
}
|
|
1014
1018
|
|
|
1015
1019
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1016
1020
|
left: 0;
|
|
1017
1021
|
right: 0;
|
|
1018
1022
|
bottom: -1px;
|
|
1019
|
-
background: linear-gradient(to top, ${
|
|
1023
|
+
background: linear-gradient(to top, ${ye.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1020
1024
|
}
|
|
1021
1025
|
|
|
1022
1026
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1023
1027
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1024
1028
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1025
1029
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1026
|
-
background-color: ${
|
|
1030
|
+
background-color: ${ye.colorSurface};
|
|
1027
1031
|
}
|
|
1028
|
-
`;var
|
|
1032
|
+
`;var $e=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class ke extends CustomEvent{constructor(t,i){super("current-element-change",{detail:{index:t,element:i}})}}class we extends i.FtLitElement{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new i.Debouncer(200),this.updateScrollDebouncer=new i.Debouncer(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let i=this.elements[t];if(i){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,e=this.contentSlot[this.scrollAttribute]+this.prevSize;(i[this.offsetAttribute]<e||i[this.offsetAttribute]+i[this.sizeAttribute]>t)&&this.scrollToElement(i)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=n.classMap({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":i.isSafari}),o=this.controls&&this.withScroll;return e.html`
|
|
1029
1033
|
<div part="container" class="${t}">
|
|
1030
1034
|
<ft-button
|
|
1031
1035
|
class="ft-snap-scroll--previous"
|
|
1032
1036
|
part="controls"
|
|
1033
1037
|
primary
|
|
1034
|
-
icon="${this.horizontal?"
|
|
1038
|
+
icon="${this.horizontal?"THIN_ARROW_LEFT":"THIN_ARROW_UP"}"
|
|
1035
1039
|
?hidden=${!o||this.startReached}
|
|
1036
1040
|
?disabled=${!o||this.startReached}
|
|
1037
1041
|
@click=${this.previous}
|
|
@@ -1043,13 +1047,13 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
1043
1047
|
class="ft-snap-scroll--next"
|
|
1044
1048
|
part="controls"
|
|
1045
1049
|
primary
|
|
1046
|
-
icon="${this.horizontal?"
|
|
1050
|
+
icon="${this.horizontal?"THIN_ARROW_RIGHT":"THIN_ARROW"}"
|
|
1047
1051
|
?hidden=${!o||this.endReached}
|
|
1048
1052
|
?disabled=${!o||this.endReached}
|
|
1049
1053
|
@click=${this.next}
|
|
1050
1054
|
></ft-button>
|
|
1051
1055
|
</div>
|
|
1052
|
-
`}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
|
|
1056
|
+
`}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 ke(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)}}we.elementDefinitions={"ft-button":qi},we.styles=me,$e([o.property({type:Boolean})],we.prototype,"horizontal",void 0),$e([o.property({type:Boolean})],we.prototype,"hideScrollbar",void 0),$e([o.property({type:Boolean})],we.prototype,"controls",void 0),$e([o.property({type:Boolean})],we.prototype,"limitSize",void 0),$e([o.state()],we.prototype,"elements",void 0),$e([o.state()],we.prototype,"currentElement",void 0),$e([o.state()],we.prototype,"withScroll",void 0),$e([o.state()],we.prototype,"startReached",void 0),$e([o.state()],we.prototype,"endReached",void 0),$e([o.query(".ft-snap-scroll--content")],we.prototype,"contentSlot",void 0),i.customElement("ft-snap-scroll")(we);const ze={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")},Se=[ii,e.css`
|
|
1053
1057
|
:host {
|
|
1054
1058
|
display: flex;
|
|
1055
1059
|
max-height: 100%;
|
|
@@ -1062,7 +1066,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
1062
1066
|
flex-direction: column;
|
|
1063
1067
|
max-height: 100%;
|
|
1064
1068
|
max-width: 100%;
|
|
1065
|
-
color: ${
|
|
1069
|
+
color: ${ze.colorOnSurface};
|
|
1066
1070
|
}
|
|
1067
1071
|
|
|
1068
1072
|
.ft-filter--header {
|
|
@@ -1072,13 +1076,13 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
1072
1076
|
flex-shrink: 0;
|
|
1073
1077
|
padding: 0 10px;
|
|
1074
1078
|
margin-bottom: 8px;
|
|
1075
|
-
${i.setVariable(
|
|
1079
|
+
${i.setVariable(J.fontSize,"14px")};
|
|
1076
1080
|
}
|
|
1077
1081
|
|
|
1078
1082
|
.ft-filter--header ft-button {
|
|
1079
1083
|
flex-shrink: 0;
|
|
1080
1084
|
margin-left: auto;
|
|
1081
|
-
${i.setVariable(
|
|
1085
|
+
${i.setVariable(Li.iconSize,"18px")};
|
|
1082
1086
|
}
|
|
1083
1087
|
|
|
1084
1088
|
.ft-filter--label {
|
|
@@ -1086,8 +1090,8 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
1086
1090
|
flex-shrink: 1;
|
|
1087
1091
|
flex-grow: 1;
|
|
1088
1092
|
word-break: break-word;
|
|
1089
|
-
${i.setVariable(
|
|
1090
|
-
${i.setVariable(
|
|
1093
|
+
${i.setVariable(J.lineHeight,"22px")};
|
|
1094
|
+
${i.setVariable(J.fontWeight,"bold")};
|
|
1091
1095
|
}
|
|
1092
1096
|
|
|
1093
1097
|
.ft-filter--filter {
|
|
@@ -1098,8 +1102,8 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
1098
1102
|
padding: 0 10px;
|
|
1099
1103
|
overflow: hidden;
|
|
1100
1104
|
height: 32px;
|
|
1101
|
-
transition: height ${
|
|
1102
|
-
margin ${
|
|
1105
|
+
transition: height ${ze.transitionDuration} ${ze.transitionTimingFunction},
|
|
1106
|
+
margin ${ze.transitionDuration} ${ze.transitionTimingFunction};
|
|
1103
1107
|
transition-delay: 500ms;
|
|
1104
1108
|
}
|
|
1105
1109
|
|
|
@@ -1112,15 +1116,15 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
1112
1116
|
display: block;
|
|
1113
1117
|
width: 100%;
|
|
1114
1118
|
border-radius: 4px;
|
|
1115
|
-
border: 1px solid ${
|
|
1119
|
+
border: 1px solid ${ze.colorOutline};
|
|
1116
1120
|
padding: 4px;
|
|
1117
|
-
background-color: ${
|
|
1118
|
-
color: ${
|
|
1119
|
-
outline-color: ${
|
|
1121
|
+
background-color: ${ze.colorSurface};
|
|
1122
|
+
color: ${ze.colorOnSurface};
|
|
1123
|
+
outline-color: ${ze.colorPrimary};
|
|
1120
1124
|
}
|
|
1121
1125
|
|
|
1122
1126
|
input::placeholder {
|
|
1123
|
-
color: ${
|
|
1127
|
+
color: ${ze.colorOnSurfaceMedium};
|
|
1124
1128
|
}
|
|
1125
1129
|
|
|
1126
1130
|
input:placeholder-shown {
|
|
@@ -1136,7 +1140,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
1136
1140
|
}
|
|
1137
1141
|
|
|
1138
1142
|
.ft-filter--separator {
|
|
1139
|
-
border-top: 1px solid ${
|
|
1143
|
+
border-top: 1px solid ${ze.colorOutline};
|
|
1140
1144
|
margin: 4px 10px;
|
|
1141
1145
|
}
|
|
1142
1146
|
|
|
@@ -1161,7 +1165,7 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
1161
1165
|
slot {
|
|
1162
1166
|
display: none;
|
|
1163
1167
|
}
|
|
1164
|
-
`];var
|
|
1168
|
+
`];var Oe=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Ce extends CustomEvent{constructor(t){super("change",{detail:t})}}class Be extends i.FtLitElement{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.hideClearButton=!1,this.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 ai(this.options,(t=>{var i;return null!==(i=t.subOptions)&&void 0!==i?i:[]}))}get selectedValues(){return this.flatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){var t,i;const o=this.flatOptions.some((t=>t.selected)),s=this.withScroll||this.filter||null!==(i=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==i&&i,n=this.filterPlaceHolder.replace("{0}",this.label);return e.html`
|
|
1165
1169
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1166
1170
|
part="container">
|
|
1167
1171
|
${this.label||o?e.html`
|
|
@@ -1231,6 +1235,6 @@ const Z=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Z)return null==t?void 0:t
|
|
|
1231
1235
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1232
1236
|
noValuesLabel="${this.noValuesLabel}"
|
|
1233
1237
|
></ft-filter-level>
|
|
1234
|
-
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var i;t.stopPropagation();const e=this.flatOptions.find((i=>i.value===t.detail.value));e.selected=!e.selected;const o=t=>{var i;t!==e&&(t.selected=!1),null===(i=t.subOptions)||void 0===i||i.forEach(o)};this.multivalued?null===(i=e.subOptions)||void 0===i||i.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.dispatchEvent(new
|
|
1238
|
+
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var i;t.stopPropagation();const e=this.flatOptions.find((i=>i.value===t.detail.value));e.selected=!e.selected;const o=t=>{var i;t!==e&&(t.selected=!1),null===(i=t.subOptions)||void 0===i||i.forEach(o)};this.multivalued?null===(i=e.subOptions)||void 0===i||i.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.dispatchEvent(new Ce(this.selectedValues)),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)}}Be.elementDefinitions={"ft-button":qi,"ft-filter-level":ge,"ft-snap-scroll":we,"ft-typography":li},Be.styles=Se,Oe([o.property({type:String})],Be.prototype,"id",void 0),Oe([o.property({type:String})],Be.prototype,"label",void 0),Oe([o.property({type:String})],Be.prototype,"filterPlaceHolder",void 0),Oe([o.property({type:String})],Be.prototype,"clearButtonLabel",void 0),Oe([o.property({type:String})],Be.prototype,"moreValuesButtonLabel",void 0),Oe([o.property({type:String})],Be.prototype,"noValuesLabel",void 0),Oe([i.jsonProperty([])],Be.prototype,"options",void 0),Oe([o.property({type:Boolean})],Be.prototype,"multivalued",void 0),Oe([o.property({type:Boolean})],Be.prototype,"disabled",void 0),Oe([o.property({type:Boolean})],Be.prototype,"raiseSelectedOptions",void 0),Oe([o.property({type:Number})],Be.prototype,"displayedValuesLimit",void 0),Oe([o.property({type:Boolean})],Be.prototype,"hideClearButton",void 0),Oe([o.query(".ft-filter--slot")],Be.prototype,"slotElement",void 0),Oe([o.query(".ft-filter--container")],Be.prototype,"container",void 0),Oe([o.query(".ft-filter--values")],Be.prototype,"valuesContainer",void 0),Oe([o.query(".ft-filter--levels")],Be.prototype,"levelsContainer",void 0),Oe([o.query(".ft-filter--levels ft-filter-level:last-child")],Be.prototype,"lastLevel",void 0),Oe([o.query(".ft-filter--filter input")],Be.prototype,"filterInput",void 0),Oe([o.queryAll(".ft-filter--levels ft-filter-level")],Be.prototype,"levels",void 0),Oe([o.state()],Be.prototype,"withScroll",void 0),Oe([o.state()],Be.prototype,"filter",void 0),Oe([o.state()],Be.prototype,"slideIn",void 0),Oe([o.state()],Be.prototype,"slideOut",void 0);var je=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Ee extends i.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return e.html`
|
|
1235
1239
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1236
|
-
`}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}))}}
|
|
1240
|
+
`}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}))}}Ee.elementDefinitions={},je([o.property({type:String})],Ee.prototype,"label",void 0),je([o.property({type:Object,converter:t=>t})],Ee.prototype,"value",void 0),je([o.property({type:Boolean,reflect:!0})],Ee.prototype,"selected",void 0),je([o.property({type:Object})],Ee.prototype,"subOptions",void 0),je([i.jsonProperty({})],Ee.prototype,"renderOption",void 0),je([o.query(".ft-filter-option--slot")],Ee.prototype,"slotElement",void 0),i.customElement("ft-filter")(Be),i.customElement("ft-filter-option")(Ee),t.FtFilter=Be,t.FtFilterChangeEvent=Ce,t.FtFilterCssVariables=ze,t.FtFilterLevelCssVariables=ve,t.FtFilterOption=Ee,t.levelStyles=be,t.styles=Se}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|