@fluid-topics/ft-filter 0.1.18 → 0.2.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.d.ts +1 -0
- package/build/ft-filter-level.js +30 -52
- package/build/ft-filter.inline-styles.js +466 -603
- package/build/ft-filter.light.js +440 -555
- package/build/ft-filter.min.js +463 -600
- package/build/index.js +0 -2
- package/package.json +10 -11
package/build/ft-filter.light.js
CHANGED
|
@@ -1,325 +1,118 @@
|
|
|
1
|
-
!function(t,
|
|
1
|
+
!function(t,i,e,o,s,n,r){
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var
|
|
7
|
+
var l;const a=globalThis.trustedTypes,h=a?a.createPolicy("lit-html",{createHTML:t=>t}):void 0,p=`lit$${(Math.random()+"").slice(9)}$`,f="?"+p,c=`<${f}>`,d=document,u=(t="")=>d.createComment(t),v=t=>null===t||"object"!=typeof t&&"function"!=typeof t,b=Array.isArray,x=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,g=/-->/g,y=/>/g,m=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,$=/'/g,k=/"/g,w=/^(?:script|style|textarea|title)$/i,z=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),S=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),C=new WeakMap,B=d.createTreeWalker(d,129,null,!1),j=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=x;for(let i=0;i<e;i++){const e=t[i];let l,a,h=-1,f=0;for(;f<e.length&&(r.lastIndex=f,a=r.exec(e),null!==a);)f=r.lastIndex,r===x?"!--"===a[1]?r=g:void 0!==a[1]?r=y:void 0!==a[2]?(w.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=m):void 0!==a[3]&&(r=m):r===m?">"===a[0]?(r=null!=s?s:x,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?m:'"'===a[3]?k:$):r===k||r===$?r=m:r===g||r===y?r=x:(r=m,s=void 0);const d=r===m&&t[i+1].startsWith("/>")?" ":"";n+=r===x?e+c:h>=0?(o.push(l),e.slice(0,h)+"$lit$"+e.slice(h)+p+d):e+p+(-2===h?(o.push(void 0),i):d)}const l=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==h?h.createHTML(l):l,o]};class D{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[h,c]=j(t,i);if(this.el=D.createElement(h,e),B.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=B.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(p)){const e=c[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(p),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?A:"?"===i[1]?N:"@"===i[1]?_:F})}else l.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(w.test(o.tagName)){const t=o.textContent.split(p),i=t.length-1;if(i>0){o.textContent=a?a.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],u()),B.nextNode(),l.push({type:2,index:++s});o.append(t[i],u())}}}else if(8===o.nodeType)if(o.data===f)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(p,t+1));)l.push({type:7,index:s}),t+=p.length-1}s++}}static createElement(t,i){const e=d.createElement("template");return e.innerHTML=t,e}}function E(t,i,e=t,o){var s,n,r,l;if(i===S)return i;let a=void 0!==o?null===(s=e._$Cl)||void 0===s?void 0:s[o]:e._$Cu;const h=v(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(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)._$Cl)&&void 0!==r?r:l._$Cl=[])[o]=a:e._$Cu=a),void 0!==a&&(i=E(t,a._$AS(t,i.values),a,o)),i}class T{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:d).importNode(e,!0);B.currentNode=s;let n=B.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new M(n,n.nextSibling,this,t):1===a.type?i=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(i=new L(n,this,t)),this.v.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=B.nextNode(),r++)}return s}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class M{constructor(t,i,e,o){var s;this.type=2,this._$AH=O,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cg=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._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=E(this,t,i),v(t)?t===O||null==t||""===t?(this._$AH!==O&&this._$AR(),this._$AH=O):t!==this._$AH&&t!==S&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return b(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==O&&v(this._$AH)?this._$AA.nextSibling.data=t:this.S(d.createTextNode(t)),this._$AH=t}T(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=D.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.m(e);else{const t=new T(s,this),i=t.p(this.options);t.m(e),this.S(i),this._$AH=t}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new D(t)),i}A(t){b(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new M(this.M(u()),this.M(u()),this,this.options)):e=i[o],e._$AI(s),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class F{constructor(t,i,e,o,s){this.type=1,this._$AH=O,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=O}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let n=!1;if(void 0===s)t=E(this,t,i,0),n=!v(t)||t!==this._$AH&&t!==S,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=E(this,o[e+r],i,r),l===S&&(l=this._$AH[r]),n||(n=!v(l)||l!==this._$AH[r]),l===O?t=O:t!==O&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.k(t)}k(t){t===O?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class A extends F{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===O?void 0:t}}const I=a?a.emptyScript:"";class N extends F{constructor(){super(...arguments),this.type=4}k(t){t&&t!==O?this.element.setAttribute(this.name,I):this.element.removeAttribute(this.name)}}class _ extends F{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=E(this,t,i,0))&&void 0!==e?e:O)===S)return;const o=this._$AH,s=t===O&&o!==O||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==O&&(o===O||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 L{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}}const R=window.litHtmlPolyfillSupport;null==R||R(D,M),(null!==(l=globalThis.litHtmlVersions)&&void 0!==l?l:globalThis.litHtmlVersions=[]).push("2.1.3");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const H=t=>({_$litStatic$:t}),
|
|
13
|
+
const H=t=>({_$litStatic$:t}),U=new Map,W=(t=>(i,...e)=>{var o;const s=e.length;let n,r;const l=[],a=[];let h,p=0,f=!1;for(;p<s;){for(h=i[p];p<s&&void 0!==(r=e[p],n=null===(o=r)||void 0===o?void 0:o._$litStatic$);)h+=n+i[++p],f=!0;a.push(r),l.push(h),p++}if(p===s&&l.push(i[s]),f){const t=l.join("$$lit$$");void 0===(i=U.get(t))&&(l.raw=l,U.set(t,i=l)),e=a}return t(i,...e)})(z);var Z,V=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};!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(Z||(Z={}));const P=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),K=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),G={fontFamily:K,fontSize:i.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:i.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},q=i.FtCssVariable.extend("--ft-typography-title-font-family",P),X=i.FtCssVariable.extend("--ft-typography-title-font-size",G.fontSize,"20px"),Y=i.FtCssVariable.extend("--ft-typography-title-font-weight",G.fontWeight,"normal"),J=i.FtCssVariable.extend("--ft-typography-title-letter-spacing",G.letterSpacing,"0.15px"),Q=i.FtCssVariable.extend("--ft-typography-title-line-height",G.lineHeight,"24px"),tt=i.FtCssVariable.extend("--ft-typography-title-text-transform",G.textTransform,"inherit"),it=i.FtCssVariable.extend("--ft-typography-title-dense-font-family",P),et=i.FtCssVariable.extend("--ft-typography-title-dense-font-size",G.fontSize,"14px"),ot=i.FtCssVariable.extend("--ft-typography-title-dense-font-weight",G.fontWeight,"normal"),st=i.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",G.letterSpacing,"0.105px"),nt=i.FtCssVariable.extend("--ft-typography-title-dense-line-height",G.lineHeight,"24px"),rt=i.FtCssVariable.extend("--ft-typography-title-dense-text-transform",G.textTransform,"inherit"),lt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-family",K),at=i.FtCssVariable.extend("--ft-typography-subtitle1-font-size",G.fontSize,"16px"),ht=i.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",G.fontWeight,"600"),pt=i.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",G.letterSpacing,"0.144px"),ft=i.FtCssVariable.extend("--ft-typography-subtitle1-line-height",G.lineHeight,"24px"),ct=i.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",G.textTransform,"inherit"),dt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-family",K),ut=i.FtCssVariable.extend("--ft-typography-subtitle2-font-size",G.fontSize,"14px"),vt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",G.fontWeight,"normal"),bt=i.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",G.letterSpacing,"0.098px"),xt=i.FtCssVariable.extend("--ft-typography-subtitle2-line-height",G.lineHeight,"24px"),gt=i.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",G.textTransform,"inherit"),yt=i.FtCssVariable.extend("--ft-typography-body1-font-family",K),mt=i.FtCssVariable.extend("--ft-typography-body1-font-size",G.fontSize,"16px"),$t=i.FtCssVariable.extend("--ft-typography-body1-font-weight",G.fontWeight,"normal"),kt=i.FtCssVariable.extend("--ft-typography-body1-letter-spacing",G.letterSpacing,"0.496px"),wt=i.FtCssVariable.extend("--ft-typography-body1-line-height",G.lineHeight,"24px"),zt=i.FtCssVariable.extend("--ft-typography-body1-text-transform",G.textTransform,"inherit"),St={fontFamily:i.FtCssVariable.extend("--ft-typography-body2-font-family",K),fontSize:i.FtCssVariable.extend("--ft-typography-body2-font-size",G.fontSize,"14px"),fontWeight:i.FtCssVariable.extend("--ft-typography-body2-font-weight",G.fontWeight,"normal"),letterSpacing:i.FtCssVariable.extend("--ft-typography-body2-letter-spacing",G.letterSpacing,"0.252px"),lineHeight:i.FtCssVariable.extend("--ft-typography-body2-line-height",G.lineHeight,"20px"),textTransform:i.FtCssVariable.extend("--ft-typography-body2-text-transform",G.textTransform,"inherit")},Ot=i.FtCssVariable.extend("--ft-typography-caption-font-family",K),Ct=i.FtCssVariable.extend("--ft-typography-caption-font-size",G.fontSize,"12px"),Bt=i.FtCssVariable.extend("--ft-typography-caption-font-weight",G.fontWeight,"normal"),jt=i.FtCssVariable.extend("--ft-typography-caption-letter-spacing",G.letterSpacing,"0.396px"),Dt=i.FtCssVariable.extend("--ft-typography-caption-line-height",G.lineHeight,"16px"),Et=i.FtCssVariable.extend("--ft-typography-caption-text-transform",G.textTransform,"inherit"),Tt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",K),Mt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",G.fontSize,"10px"),Ft=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",G.fontWeight,"normal"),At=i.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",G.letterSpacing,"0.33px"),It=i.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",G.lineHeight,"16px"),Nt=i.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",G.textTransform,"inherit"),_t=i.FtCssVariable.extend("--ft-typography-overline-font-family",K),Lt=i.FtCssVariable.extend("--ft-typography-overline-font-size",G.fontSize,"10px"),Rt=i.FtCssVariable.extend("--ft-typography-overline-font-weight",G.fontWeight,"normal"),Ht=i.FtCssVariable.extend("--ft-typography-overline-letter-spacing",G.letterSpacing,"1.5px"),Ut=i.FtCssVariable.extend("--ft-typography-overline-line-height",G.lineHeight,"16px"),Wt=i.FtCssVariable.extend("--ft-typography-overline-text-transform",G.textTransform,"uppercase"),Zt={fontFamily:i.FtCssVariable.extend("--ft-typography-button-font-family",K),fontSize:i.FtCssVariable.extend("--ft-typography-button-font-size",G.fontSize,"14px"),fontWeight:i.FtCssVariable.extend("--ft-typography-button-font-weight",G.fontWeight,"600"),letterSpacing:i.FtCssVariable.extend("--ft-typography-button-letter-spacing",G.letterSpacing,"1.246px"),lineHeight:i.FtCssVariable.extend("--ft-typography-button-line-height",G.lineHeight,"16px"),textTransform:i.FtCssVariable.extend("--ft-typography-button-text-transform",G.textTransform,"uppercase")},Vt=e.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
|
-
font-family: ${
|
|
16
|
-
font-size: ${
|
|
15
|
+
font-family: ${q};
|
|
16
|
+
font-size: ${X};
|
|
17
17
|
font-weight: ${Y};
|
|
18
18
|
letter-spacing: ${J};
|
|
19
19
|
line-height: ${Q};
|
|
20
20
|
text-transform: ${tt};
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,Pt=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: ${
|
|
24
|
+
font-family: ${it};
|
|
25
|
+
font-size: ${et};
|
|
26
|
+
font-weight: ${ot};
|
|
27
|
+
letter-spacing: ${st};
|
|
28
|
+
line-height: ${nt};
|
|
29
|
+
text-transform: ${rt};
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,Kt=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: ${lt};
|
|
34
|
+
font-size: ${at};
|
|
35
|
+
font-weight: ${ht};
|
|
36
|
+
letter-spacing: ${pt};
|
|
37
|
+
line-height: ${ft};
|
|
38
|
+
text-transform: ${ct};
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,Gt=e.css`
|
|
41
41
|
.ft-typography--subtitle2 {
|
|
42
|
-
font-family: ${
|
|
43
|
-
font-size: ${
|
|
44
|
-
font-weight: ${
|
|
42
|
+
font-family: ${dt};
|
|
43
|
+
font-size: ${ut};
|
|
44
|
+
font-weight: ${vt};
|
|
45
45
|
letter-spacing: ${bt};
|
|
46
|
-
line-height: ${
|
|
47
|
-
text-transform: ${
|
|
46
|
+
line-height: ${xt};
|
|
47
|
+
text-transform: ${gt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,qt=e.css`
|
|
51
51
|
.ft-typography--body1 {
|
|
52
52
|
font-family: ${yt};
|
|
53
|
-
font-size: ${
|
|
54
|
-
font-weight: ${
|
|
55
|
-
letter-spacing: ${
|
|
53
|
+
font-size: ${mt};
|
|
54
|
+
font-weight: ${$t};
|
|
55
|
+
letter-spacing: ${kt};
|
|
56
56
|
line-height: ${wt};
|
|
57
|
-
text-transform: ${
|
|
57
|
+
text-transform: ${zt};
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,Xt=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: ${St.fontFamily};
|
|
62
|
+
font-size: ${St.fontSize};
|
|
63
|
+
font-weight: ${St.fontWeight};
|
|
64
|
+
letter-spacing: ${St.letterSpacing};
|
|
65
|
+
line-height: ${St.lineHeight};
|
|
66
|
+
text-transform: ${St.textTransform};
|
|
67
67
|
}
|
|
68
|
-
`,Yt=
|
|
68
|
+
`,Yt=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: ${Ot};
|
|
71
|
+
font-size: ${Ct};
|
|
72
|
+
font-weight: ${Bt};
|
|
73
|
+
letter-spacing: ${jt};
|
|
74
|
+
line-height: ${Dt};
|
|
75
|
+
text-transform: ${Et};
|
|
76
76
|
}
|
|
77
|
-
`,Jt=
|
|
77
|
+
`,Jt=e.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
|
-
font-family: ${
|
|
80
|
-
font-size: ${
|
|
79
|
+
font-family: ${Tt};
|
|
80
|
+
font-size: ${Mt};
|
|
81
81
|
font-weight: ${Ft};
|
|
82
|
-
letter-spacing: ${
|
|
82
|
+
letter-spacing: ${At};
|
|
83
83
|
line-height: ${It};
|
|
84
|
-
text-transform: ${
|
|
84
|
+
text-transform: ${Nt};
|
|
85
85
|
}
|
|
86
|
-
`,Qt=
|
|
86
|
+
`,Qt=e.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
|
-
font-family: ${
|
|
88
|
+
font-family: ${_t};
|
|
89
89
|
font-size: ${Lt};
|
|
90
|
-
font-weight: ${
|
|
90
|
+
font-weight: ${Rt};
|
|
91
91
|
letter-spacing: ${Ht};
|
|
92
|
-
line-height: ${
|
|
93
|
-
text-transform: ${
|
|
92
|
+
line-height: ${Ut};
|
|
93
|
+
text-transform: ${Wt};
|
|
94
94
|
}
|
|
95
|
-
`,
|
|
95
|
+
`,ti=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: ${
|
|
97
|
+
font-family: ${Zt.fontFamily};
|
|
98
|
+
font-size: ${Zt.fontSize};
|
|
99
|
+
font-weight: ${Zt.fontWeight};
|
|
100
|
+
letter-spacing: ${Zt.letterSpacing};
|
|
101
|
+
line-height: ${Zt.lineHeight};
|
|
102
|
+
text-transform: ${Zt.textTransform};
|
|
103
103
|
}
|
|
104
|
-
`;class
|
|
104
|
+
`;class ii extends i.FtLitElement{constructor(){super(...arguments),this.variant=Z.body1}render(){return this.element?W`
|
|
105
105
|
<${H(this.element)}
|
|
106
106
|
class="ft-typography ft-typography--${this.variant}">
|
|
107
107
|
<slot></slot>
|
|
108
108
|
</${H(this.element)}>
|
|
109
|
-
`:
|
|
109
|
+
`:W`
|
|
110
110
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
111
|
-
`}}function
|
|
112
|
-
/*! *****************************************************************************
|
|
113
|
-
Copyright (c) Microsoft Corporation.
|
|
114
|
-
|
|
115
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
116
|
-
purpose with or without fee is hereby granted.
|
|
117
|
-
|
|
118
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
119
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
120
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
121
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
122
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
123
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
124
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
125
|
-
***************************************************************************** */ee.styles=[Ut,Wt,Zt,qt,Xt,Kt,Yt,Jt,Qt,te,i.css`
|
|
111
|
+
`}}function ei(t,i){return t.flatMap((t=>[t,...ei(i(t),i)]))}ii.styles=[Vt,Pt,Kt,Gt,qt,Xt,Yt,Jt,Qt,ti,e.css`
|
|
126
112
|
.ft-typography {
|
|
127
113
|
vertical-align: inherit;
|
|
128
114
|
}
|
|
129
|
-
`],
|
|
130
|
-
/**
|
|
131
|
-
* @license
|
|
132
|
-
* Copyright 2018 Google Inc.
|
|
133
|
-
*
|
|
134
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
135
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
136
|
-
* in the Software without restriction, including without limitation the rights
|
|
137
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
138
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
139
|
-
* furnished to do so, subject to the following conditions:
|
|
140
|
-
*
|
|
141
|
-
* The above copyright notice and this permission notice shall be included in
|
|
142
|
-
* all copies or substantial portions of the Software.
|
|
143
|
-
*
|
|
144
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
145
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
146
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
147
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
148
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
149
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
150
|
-
* THE SOFTWARE.
|
|
151
|
-
*/const se=()=>{},de={get passive(){return!1}};document.addEventListener("x",se,de),document.removeEventListener("x",se);
|
|
152
|
-
/**
|
|
153
|
-
* @license
|
|
154
|
-
* Copyright 2018 Google LLC
|
|
155
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
156
|
-
*/
|
|
157
|
-
class le extends i.LitElement{click(){if(this.mdcRoot)return this.mdcRoot.focus(),void this.mdcRoot.click();super.click()}createFoundation(){void 0!==this.mdcFoundation&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}firstUpdated(){this.createFoundation()}}
|
|
158
|
-
/**
|
|
159
|
-
* @license
|
|
160
|
-
* Copyright 2016 Google Inc.
|
|
161
|
-
*
|
|
162
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
163
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
164
|
-
* in the Software without restriction, including without limitation the rights
|
|
165
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
166
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
167
|
-
* furnished to do so, subject to the following conditions:
|
|
168
|
-
*
|
|
169
|
-
* The above copyright notice and this permission notice shall be included in
|
|
170
|
-
* all copies or substantial portions of the Software.
|
|
171
|
-
*
|
|
172
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
173
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
174
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
175
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
176
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
177
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
178
|
-
* THE SOFTWARE.
|
|
179
|
-
*/var pe=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),he={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},me={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},fe={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};
|
|
180
|
-
/**
|
|
181
|
-
* @license
|
|
182
|
-
* Copyright 2016 Google Inc.
|
|
183
|
-
*
|
|
184
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
185
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
186
|
-
* in the Software without restriction, including without limitation the rights
|
|
187
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
188
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
189
|
-
* furnished to do so, subject to the following conditions:
|
|
190
|
-
*
|
|
191
|
-
* The above copyright notice and this permission notice shall be included in
|
|
192
|
-
* all copies or substantial portions of the Software.
|
|
193
|
-
*
|
|
194
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
195
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
196
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
197
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
198
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
199
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
200
|
-
* THE SOFTWARE.
|
|
201
|
-
*/
|
|
202
|
-
/**
|
|
203
|
-
* @license
|
|
204
|
-
* Copyright 2016 Google Inc.
|
|
205
|
-
*
|
|
206
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
207
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
208
|
-
* in the Software without restriction, including without limitation the rights
|
|
209
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
210
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
211
|
-
* furnished to do so, subject to the following conditions:
|
|
212
|
-
*
|
|
213
|
-
* The above copyright notice and this permission notice shall be included in
|
|
214
|
-
* all copies or substantial portions of the Software.
|
|
215
|
-
*
|
|
216
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
217
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
218
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
219
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
220
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
221
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
222
|
-
* THE SOFTWARE.
|
|
223
|
-
*/
|
|
224
|
-
var ue=["touchstart","pointerdown","mousedown","keydown"],be=["touchend","pointerup","mouseup","contextmenu"],ge=[],ve=function(t){function e(i){var r=t.call(this,ce(ce({},e.defaultAdapter),i))||this;return r.activationAnimationHasEnded=!1,r.activationTimer=0,r.fgDeactivationRemovalTimer=0,r.fgScale="0",r.frame={width:0,height:0},r.initialSize=0,r.layoutFrame=0,r.maxRadius=0,r.unboundedCoords={left:0,top:0},r.activationState=r.defaultActivationState(),r.activationTimerCallback=function(){r.activationAnimationHasEnded=!0,r.runDeactivationUXLogicIfReady()},r.activateHandler=function(t){r.activateImpl(t)},r.deactivateHandler=function(){r.deactivateImpl()},r.focusHandler=function(){r.handleFocus()},r.blurHandler=function(){r.handleBlur()},r.resizeHandler=function(){r.layout()},r}return oe(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return he},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return me},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return fe},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this,i=this.supportsPressRipple();if(this.registerRootHandlers(i),i){var r=e.cssClasses,o=r.ROOT,c=r.UNBOUNDED;requestAnimationFrame((function(){t.adapter.addClass(o),t.adapter.isUnbounded()&&(t.adapter.addClass(c),t.layoutInternal())}))}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(e.cssClasses.FG_DEACTIVATION));var i=e.cssClasses,r=i.ROOT,o=i.UNBOUNDED;requestAnimationFrame((function(){t.adapter.removeClass(r),t.adapter.removeClass(o),t.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},e.prototype.activate=function(t){this.activateImpl(t)},e.prototype.deactivate=function(){this.deactivateImpl()},e.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){t.layoutInternal(),t.layoutFrame=0}))},e.prototype.setUnbounded=function(t){var i=e.cssClasses.UNBOUNDED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame((function(){return t.adapter.addClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame((function(){return t.adapter.removeClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},e.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers=function(t){var e,i;if(t){try{for(var r=ne(ue),o=r.next();!o.done;o=r.next()){var c=o.value;this.adapter.registerInteractionHandler(c,this.activateHandler)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},e.prototype.registerDeactivationHandlers=function(t){var e,i;if("keydown"===t.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var r=ne(be),o=r.next();!o.done;o=r.next()){var c=o.value;this.adapter.registerDocumentInteractionHandler(c,this.deactivateHandler)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}},e.prototype.deregisterRootHandlers=function(){var t,e;try{for(var i=ne(ue),r=i.next();!r.done;r=i.next()){var o=r.value;this.adapter.deregisterInteractionHandler(o,this.activateHandler)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},e.prototype.deregisterDeactivationHandlers=function(){var t,e;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var i=ne(be),r=i.next();!r.done;r=i.next()){var o=r.value;this.adapter.deregisterDocumentInteractionHandler(o,this.deactivateHandler)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}},e.prototype.removeCssVars=function(){var t=this,i=e.strings;Object.keys(i).forEach((function(e){0===e.indexOf("VAR_")&&t.adapter.updateCssVariable(i[e],null)}))},e.prototype.activateImpl=function(t){var e=this;if(!this.adapter.isSurfaceDisabled()){var i=this.activationState;if(!i.isActivated){var r=this.previousActivationEvent;if(!(r&&void 0!==t&&r.type!==t.type))i.isActivated=!0,i.isProgrammatic=void 0===t,i.activationEvent=t,i.wasActivatedByPointer=!i.isProgrammatic&&(void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type)),void 0!==t&&ge.length>0&&ge.some((function(t){return e.adapter.containsEventTarget(t)}))?this.resetActivationState():(void 0!==t&&(ge.push(t.target),this.registerDeactivationHandlers(t)),i.wasElementMadeActive=this.checkElementMadeActive(t),i.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){ge=[],i.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(i.wasElementMadeActive=e.checkElementMadeActive(t),i.wasElementMadeActive&&e.animateActivation()),i.wasElementMadeActive||(e.activationState=e.defaultActivationState())})))}}},e.prototype.checkElementMadeActive=function(t){return void 0===t||"keydown"!==t.type||this.adapter.isSurfaceActive()},e.prototype.animateActivation=function(){var t=this,i=e.strings,r=i.VAR_FG_TRANSLATE_START,o=i.VAR_FG_TRANSLATE_END,c=e.cssClasses,a=c.FG_DEACTIVATION,n=c.FG_ACTIVATION,s=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var d="",l="";if(!this.adapter.isUnbounded()){var p=this.getFgTranslationCoordinates(),h=p.startPoint,m=p.endPoint;d=h.x+"px, "+h.y+"px",l=m.x+"px, "+m.y+"px"}this.adapter.updateCssVariable(r,d),this.adapter.updateCssVariable(o,l),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(a),this.adapter.computeBoundingRect(),this.adapter.addClass(n),this.activationTimer=setTimeout((function(){t.activationTimerCallback()}),s)},e.prototype.getFgTranslationCoordinates=function(){var t,e=this.activationState,i=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?function(t,e,i){if(!t)return{x:0,y:0};var r,o,c=e.x,a=e.y,n=c+i.left,s=a+i.top;if("touchstart"===t.type){var d=t;r=d.changedTouches[0].pageX-n,o=d.changedTouches[0].pageY-s}else{var l=t;r=l.pageX-n,o=l.pageY-s}return{x:r,y:o}}(i,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2}).x-this.initialSize/2,y:t.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},e.prototype.runDeactivationUXLogicIfReady=function(){var t=this,i=e.cssClasses.FG_DEACTIVATION,r=this.activationState,o=r.hasDeactivationUXRun,c=r.isActivated;(o||!c)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(i),this.fgDeactivationRemovalTimer=setTimeout((function(){t.adapter.removeClass(i)}),fe.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},e.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return t.previousActivationEvent=void 0}),e.numbers.TAP_DELAY_MS)},e.prototype.deactivateImpl=function(){var t=this,e=this.activationState;if(e.isActivated){var i=ce({},e);e.isProgrammatic?(requestAnimationFrame((function(){t.animateDeactivation(i)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(i),t.resetActivationState()})))}},e.prototype.animateDeactivation=function(t){var e=t.wasActivatedByPointer,i=t.wasElementMadeActive;(e||i)&&this.runDeactivationUXLogicIfReady()},e.prototype.layoutInternal=function(){var t=this;this.frame=this.adapter.computeBoundingRect();var i=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?i:Math.sqrt(Math.pow(t.frame.width,2)+Math.pow(t.frame.height,2))+e.numbers.PADDING;var r=Math.floor(i*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&r%2!=0?this.initialSize=r-1:this.initialSize=r,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},e.prototype.updateLayoutCssVars=function(){var t=e.strings,i=t.VAR_FG_SIZE,r=t.VAR_LEFT,o=t.VAR_TOP,c=t.VAR_FG_SCALE;this.adapter.updateCssVariable(i,this.initialSize+"px"),this.adapter.updateCssVariable(c,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(r,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(o,this.unboundedCoords.top+"px"))},e}(pe),ye=ve;
|
|
225
|
-
/**
|
|
226
|
-
* @license
|
|
227
|
-
* Copyright 2018 Google LLC
|
|
228
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
229
|
-
*/
|
|
230
|
-
class ke extends le{constructor(){super(...arguments),this.primary=!1,this.accent=!1,this.unbounded=!1,this.disabled=!1,this.activated=!1,this.selected=!1,this.internalUseStateLayerCustomProperties=!1,this.hovering=!1,this.bgFocused=!1,this.fgActivation=!1,this.fgDeactivation=!1,this.fgScale="",this.fgSize="",this.translateStart="",this.translateEnd="",this.leftPos="",this.topPos="",this.mdcFoundationClass=ye}get isActive(){return t=this.parentElement||this,e=":active",(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e);var t,e;
|
|
231
|
-
/**
|
|
232
|
-
* @license
|
|
233
|
-
* Copyright 2018 Google LLC
|
|
234
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
235
|
-
*/}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>this.unbounded,isSurfaceActive:()=>this.isActive,isSurfaceDisabled:()=>this.disabled,addClass:t=>{switch(t){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!0;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!0;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!0}},removeClass:t=>{switch(t){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!1;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!1;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!1}},containsEventTarget:()=>!0,registerInteractionHandler:()=>{},deregisterInteractionHandler:()=>{},registerDocumentInteractionHandler:()=>{},deregisterDocumentInteractionHandler:()=>{},registerResizeHandler:()=>{},deregisterResizeHandler:()=>{},updateCssVariable:(t,e)=>{switch(t){case"--mdc-ripple-fg-scale":this.fgScale=e;break;case"--mdc-ripple-fg-size":this.fgSize=e;break;case"--mdc-ripple-fg-translate-end":this.translateEnd=e;break;case"--mdc-ripple-fg-translate-start":this.translateStart=e;break;case"--mdc-ripple-left":this.leftPos=e;break;case"--mdc-ripple-top":this.topPos=e}},computeBoundingRect:()=>(this.parentElement||this).getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})}}startPress(t){this.waitForFoundation((()=>{this.mdcFoundation.activate(t)}))}endPress(){this.waitForFoundation((()=>{this.mdcFoundation.deactivate()}))}startFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleFocus()}))}endFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleBlur()}))}startHover(){this.hovering=!0}endHover(){this.hovering=!1}waitForFoundation(t){this.mdcFoundation?t():this.updateComplete.then(t)}update(t){t.has("disabled")&&this.disabled&&this.endHover(),super.update(t)}render(){const t=this.activated&&(this.primary||!this.accent),e=this.selected&&(this.primary||!this.accent),r={"mdc-ripple-surface--accent":this.accent,"mdc-ripple-surface--primary--activated":t,"mdc-ripple-surface--accent--activated":this.accent&&this.activated,"mdc-ripple-surface--primary--selected":e,"mdc-ripple-surface--accent--selected":this.accent&&this.selected,"mdc-ripple-surface--disabled":this.disabled,"mdc-ripple-surface--hover":this.hovering,"mdc-ripple-surface--primary":this.primary,"mdc-ripple-surface--selected":this.selected,"mdc-ripple-upgraded--background-focused":this.bgFocused,"mdc-ripple-upgraded--foreground-activation":this.fgActivation,"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation,"mdc-ripple-upgraded--unbounded":this.unbounded,"mdc-ripple-surface--internal-use-state-layer-custom-properties":this.internalUseStateLayerCustomProperties};return i.html`
|
|
236
|
-
<div class="mdc-ripple-surface mdc-ripple-upgraded ${c.classMap(r)}"
|
|
237
|
-
style="${a.styleMap({"--mdc-ripple-fg-scale":this.fgScale,"--mdc-ripple-fg-size":this.fgSize,"--mdc-ripple-fg-translate-end":this.translateEnd,"--mdc-ripple-fg-translate-start":this.translateStart,"--mdc-ripple-left":this.leftPos,"--mdc-ripple-top":this.topPos})}"></div>`}}ae([r.query(".mdc-ripple-surface")],ke.prototype,"mdcRoot",void 0),ae([r.property({type:Boolean})],ke.prototype,"primary",void 0),ae([r.property({type:Boolean})],ke.prototype,"accent",void 0),ae([r.property({type:Boolean})],ke.prototype,"unbounded",void 0),ae([r.property({type:Boolean})],ke.prototype,"disabled",void 0),ae([r.property({type:Boolean})],ke.prototype,"activated",void 0),ae([r.property({type:Boolean})],ke.prototype,"selected",void 0),ae([r.property({type:Boolean})],ke.prototype,"internalUseStateLayerCustomProperties",void 0),ae([r.state()],ke.prototype,"hovering",void 0),ae([r.state()],ke.prototype,"bgFocused",void 0),ae([r.state()],ke.prototype,"fgActivation",void 0),ae([r.state()],ke.prototype,"fgDeactivation",void 0),ae([r.state()],ke.prototype,"fgScale",void 0),ae([r.state()],ke.prototype,"fgSize",void 0),ae([r.state()],ke.prototype,"translateStart",void 0),ae([r.state()],ke.prototype,"translateEnd",void 0),ae([r.state()],ke.prototype,"leftPos",void 0),ae([r.state()],ke.prototype,"topPos",void 0);
|
|
238
|
-
/**
|
|
239
|
-
* @license
|
|
240
|
-
* Copyright 2021 Google LLC
|
|
241
|
-
* SPDX-LIcense-Identifier: Apache-2.0
|
|
242
|
-
*/
|
|
243
|
-
const xe=i.css`.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}`
|
|
244
|
-
/**
|
|
245
|
-
* @license
|
|
246
|
-
* Copyright 2018 Google LLC
|
|
247
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
248
|
-
*/;let _e=class extends ke{};function we(t,e,i){if(void 0!==e)
|
|
249
|
-
/**
|
|
250
|
-
* @license
|
|
251
|
-
* Copyright 2021 Google LLC
|
|
252
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
253
|
-
*/
|
|
254
|
-
return function(t,e,i){const r=t.constructor;if(!i){const t=`__${e}`;if(!(i=r.getPropertyDescriptor(e,t)))throw new Error("@ariaProperty must be used after a @property decorator")}const o=i;let c="";if(!o.set)throw new Error(`@ariaProperty requires a setter for ${e}`);if(t.dispatchWizEvent)return i;const a={configurable:!0,enumerable:!0,set(t){if(""===c){const t=r.getPropertyOptions(e);c="string"==typeof t.attribute?t.attribute:e}this.hasAttribute(c)&&this.removeAttribute(c),o.set.call(this,t)}};return o.get&&(a.get=function(){return o.get.call(this)}),a}(t,e,i);throw new Error("@ariaProperty only supports TypeScript Decorators")}
|
|
255
|
-
/**
|
|
256
|
-
* @license
|
|
257
|
-
* Copyright 2018 Google LLC
|
|
258
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
259
|
-
*/var $e,ze;_e.styles=[xe],_e=ae([r.customElement("mwc-ripple")],_e);const Se=null!==(ze=null===($e=window.ShadyDOM)||void 0===$e?void 0:$e.inUse)&&void 0!==ze&&ze;class Oe extends le{constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=t=>{this.disabled||this.setFormData(t.formData)}}findFormElement(){if(!this.shadowRoot||Se)return null;const t=this.getRootNode().querySelectorAll("form");for(const e of Array.from(t))if(e.contains(this))return e;return null}connectedCallback(){var t;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(t=this.containingForm)||void 0===t||t.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.containingForm)||void 0===t||t.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(t=>{this.dispatchEvent(new Event("change",t))}))}}Oe.shadowRootOptions={mode:"open",delegatesFocus:!0},ae([r.property({type:Boolean})],Oe.prototype,"disabled",void 0);
|
|
260
|
-
/**
|
|
261
|
-
* @license
|
|
262
|
-
* Copyright 2020 Google LLC
|
|
263
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
264
|
-
*/
|
|
265
|
-
class Te{constructor(t){this.startPress=e=>{t().then((t=>{t&&t.startPress(e)}))},this.endPress=()=>{t().then((t=>{t&&t.endPress()}))},this.startFocus=()=>{t().then((t=>{t&&t.startFocus()}))},this.endFocus=()=>{t().then((t=>{t&&t.endFocus()}))},this.startHover=()=>{t().then((t=>{t&&t.startHover()}))},this.endHover=()=>{t().then((t=>{t&&t.endHover()}))}}}
|
|
266
|
-
/**
|
|
267
|
-
* @license
|
|
268
|
-
* Copyright 2018 Google LLC
|
|
269
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
270
|
-
*/const Ae=t=>null!=t?t:S
|
|
271
|
-
/**
|
|
272
|
-
* @license
|
|
273
|
-
* Copyright 2019 Google LLC
|
|
274
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
275
|
-
*/;class Ce extends Oe{constructor(){super(...arguments),this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.name="",this.value="on",this.reducedTouchTarget=!1,this.animationClass="",this.shouldRenderRipple=!1,this.focused=!1,this.mdcFoundationClass=void 0,this.mdcFoundation=void 0,this.rippleElement=null,this.rippleHandlers=new Te((()=>(this.shouldRenderRipple=!0,this.ripple.then((t=>this.rippleElement=t)),this.ripple)))}createAdapter(){return{}}update(t){const e=t.get("indeterminate"),i=t.get("checked"),r=t.get("disabled");if(void 0!==e||void 0!==i||void 0!==r){const t=this.calculateAnimationStateName(!!i,!!e,!!r),o=this.calculateAnimationStateName(this.checked,this.indeterminate,this.disabled);this.animationClass=`${t}-${o}`}super.update(t)}calculateAnimationStateName(t,e,i){return i?"disabled":e?"indeterminate":t?"checked":"unchecked"}renderRipple(){return this.shouldRenderRipple?this.renderRippleTemplate():""}renderRippleTemplate(){return i.html`<mwc-ripple
|
|
276
|
-
.disabled="${this.disabled}"
|
|
277
|
-
unbounded></mwc-ripple>`}render(){const t=this.indeterminate||this.checked,e={"mdc-checkbox--disabled":this.disabled,"mdc-checkbox--selected":t,"mdc-checkbox--touch":!this.reducedTouchTarget,"mdc-ripple-upgraded--background-focused":this.focused,"mdc-checkbox--anim-checked-indeterminate":"checked-indeterminate"==this.animationClass,"mdc-checkbox--anim-checked-unchecked":"checked-unchecked"==this.animationClass,"mdc-checkbox--anim-indeterminate-checked":"indeterminate-checked"==this.animationClass,"mdc-checkbox--anim-indeterminate-unchecked":"indeterminate-unchecked"==this.animationClass,"mdc-checkbox--anim-unchecked-checked":"unchecked-checked"==this.animationClass,"mdc-checkbox--anim-unchecked-indeterminate":"unchecked-indeterminate"==this.animationClass},r=this.indeterminate?"mixed":void 0;return i.html`
|
|
278
|
-
<div class="mdc-checkbox mdc-checkbox--upgraded ${c.classMap(e)}">
|
|
279
|
-
<input type="checkbox"
|
|
280
|
-
class="mdc-checkbox__native-control"
|
|
281
|
-
name="${Ae(this.name)}"
|
|
282
|
-
aria-checked="${Ae(r)}"
|
|
283
|
-
aria-label="${Ae(this.ariaLabel)}"
|
|
284
|
-
aria-labelledby="${Ae(this.ariaLabelledBy)}"
|
|
285
|
-
aria-describedby="${Ae(this.ariaDescribedBy)}"
|
|
286
|
-
data-indeterminate="${this.indeterminate?"true":"false"}"
|
|
287
|
-
?disabled="${this.disabled}"
|
|
288
|
-
.indeterminate="${this.indeterminate}"
|
|
289
|
-
.checked="${this.checked}"
|
|
290
|
-
.value="${this.value}"
|
|
291
|
-
@change="${this.handleChange}"
|
|
292
|
-
@focus="${this.handleFocus}"
|
|
293
|
-
@blur="${this.handleBlur}"
|
|
294
|
-
@mousedown="${this.handleRippleMouseDown}"
|
|
295
|
-
@mouseenter="${this.handleRippleMouseEnter}"
|
|
296
|
-
@mouseleave="${this.handleRippleMouseLeave}"
|
|
297
|
-
@touchstart="${this.handleRippleTouchStart}"
|
|
298
|
-
@touchend="${this.handleRippleDeactivate}"
|
|
299
|
-
@touchcancel="${this.handleRippleDeactivate}">
|
|
300
|
-
<div class="mdc-checkbox__background"
|
|
301
|
-
@animationend="${this.resetAnimationClass}">
|
|
302
|
-
<svg class="mdc-checkbox__checkmark"
|
|
303
|
-
viewBox="0 0 24 24">
|
|
304
|
-
<path class="mdc-checkbox__checkmark-path"
|
|
305
|
-
fill="none"
|
|
306
|
-
d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
|
|
307
|
-
</svg>
|
|
308
|
-
<div class="mdc-checkbox__mixedmark"></div>
|
|
309
|
-
</div>
|
|
310
|
-
${this.renderRipple()}
|
|
311
|
-
</div>`}setFormData(t){this.name&&this.checked&&t.append(this.name,this.value)}handleFocus(){this.focused=!0,this.handleRippleFocus()}handleBlur(){this.focused=!1,this.handleRippleBlur()}handleRippleMouseDown(t){const e=()=>{window.removeEventListener("mouseup",e),this.handleRippleDeactivate()};window.addEventListener("mouseup",e),this.rippleHandlers.startPress(t)}handleRippleTouchStart(t){this.rippleHandlers.startPress(t)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}handleChange(){this.checked=this.formElement.checked,this.indeterminate=this.formElement.indeterminate}resetAnimationClass(){this.animationClass=""}get isRippleActive(){var t;return(null===(t=this.rippleElement)||void 0===t?void 0:t.isActive)||!1}}ae([r.query(".mdc-checkbox")],Ce.prototype,"mdcRoot",void 0),ae([r.query("input")],Ce.prototype,"formElement",void 0),ae([r.property({type:Boolean,reflect:!0})],Ce.prototype,"checked",void 0),ae([r.property({type:Boolean})],Ce.prototype,"indeterminate",void 0),ae([r.property({type:Boolean,reflect:!0})],Ce.prototype,"disabled",void 0),ae([r.property({type:String,reflect:!0})],Ce.prototype,"name",void 0),ae([r.property({type:String})],Ce.prototype,"value",void 0),ae([we,r.property({type:String,attribute:"aria-label"})],Ce.prototype,"ariaLabel",void 0),ae([we,r.property({type:String,attribute:"aria-labelledby"})],Ce.prototype,"ariaLabelledBy",void 0),ae([we,r.property({type:String,attribute:"aria-describedby"})],Ce.prototype,"ariaDescribedBy",void 0),ae([r.property({type:Boolean})],Ce.prototype,"reducedTouchTarget",void 0),ae([r.state()],Ce.prototype,"animationClass",void 0),ae([r.state()],Ce.prototype,"shouldRenderRipple",void 0),ae([r.state()],Ce.prototype,"focused",void 0),ae([r.queryAsync("mwc-ripple")],Ce.prototype,"ripple",void 0),ae([r.eventOptions({passive:!0})],Ce.prototype,"handleRippleTouchStart",null);
|
|
312
|
-
/**
|
|
313
|
-
* @license
|
|
314
|
-
* Copyright 2021 Google LLC
|
|
315
|
-
* SPDX-LIcense-Identifier: Apache-2.0
|
|
316
|
-
*/
|
|
317
|
-
const Re=i.css`.mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);margin:calc((40px - 40px) / 2);margin:calc((var(--mdc-checkbox-touch-target-size, 40px) - 40px) / 2)}.mdc-checkbox .mdc-checkbox__ripple::before,.mdc-checkbox .mdc-checkbox__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-checkbox:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox.mdc-checkbox--selected:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox .mdc-checkbox__background{top:calc((40px - 18px) / 2);top:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);left:calc((40px - 18px) / 2);left:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2)}.mdc-checkbox .mdc-checkbox__native-control{top:calc((40px - 40px) / 2);top:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);right:calc((40px - 40px) / 2);right:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);left:calc((40px - 40px) / 2);left:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);width:40px;width:var(--mdc-checkbox-touch-target-size, 40px);height:40px;height:var(--mdc-checkbox-touch-target-size, 40px)}.mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}100%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.38);border-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:rgba(0, 0, 0, 0.38);background-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38))}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:GrayText;border-color:var(--mdc-checkbox-disabled-color, GrayText);background-color:transparent}.mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:GrayText;background-color:transparent;background-color:var(--mdc-checkbox-disabled-color, transparent)}.mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:GrayText;color:var(--mdc-checkbox-ink-color, GrayText)}.mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:GrayText;border-color:var(--mdc-checkbox-ink-color, GrayText)}.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:transparent;pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((48px - 40px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((40px - 48px) / 2);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);right:calc((40px - 48px) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);left:calc((40px - 48px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);width:48px;width:var(--mdc-checkbox-state-layer-size, 48px);height:48px;height:var(--mdc-checkbox-state-layer-size, 48px)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}:host{outline:none;display:inline-flex;-webkit-tap-highlight-color:transparent}:host([checked]),:host([indeterminate]){--mdc-ripple-color:var(--mdc-theme-secondary, #018786)}.mdc-checkbox .mdc-checkbox__background::before{content:none}`
|
|
318
|
-
/**
|
|
319
|
-
* @license
|
|
320
|
-
* Copyright 2018 Google LLC
|
|
321
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
322
|
-
*/;let Be=class extends Ce{};Be.styles=[Re],Be=ae([r.customElement("mwc-checkbox")],Be);var Ee=function(t,e,i,r){for(var o,c=arguments.length,a=c<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,n=t.length-1;n>=0;n--)(o=t[n])&&(a=(c<3?o(a):c>3?o(e,i,a):o(e,i))||a);return c>3&&a&&Object.defineProperty(e,i,a),a};const Fe={color:e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorContent),primaryColor:e.FtCssVariable.extend("--ft-ripple-primary-color",e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary)),secondaryColor:e.FtCssVariable.extend("--ft-ripple-secondary-color",e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary)),opacityContentOnSurfacePressed:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")};class De extends e.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.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed)},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:r,y:o}=this.getCoordinates(t),c=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=r?r-c.x:c.width/2),this.originY=Math.round(null!=o?o-c.y:c.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 i.html`
|
|
115
|
+
`],V([o.property()],ii.prototype,"element",void 0),V([o.property()],ii.prototype,"variant",void 0),i.customElement("ft-typography")(ii);var oi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};const si={color:i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorContent),primaryColor:i.FtCssVariable.extend("--ft-ripple-primary-color",i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary)),secondaryColor:i.FtCssVariable.extend("--ft-ripple-secondary-color",i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary)),opacityContentOnSurfacePressed:i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")};class ni 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.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed)},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},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`
|
|
323
116
|
<style>
|
|
324
117
|
.ft-ripple .ft-ripple--effect,
|
|
325
118
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -332,11 +125,11 @@ const Re=i.css`.mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(-
|
|
|
332
125
|
top: ${this.originY}px;
|
|
333
126
|
}
|
|
334
127
|
</style>
|
|
335
|
-
<div class="${
|
|
128
|
+
<div class="${n.classMap(t)}">
|
|
336
129
|
<div class="ft-ripple--background"></div>
|
|
337
130
|
<div class="ft-ripple--effect"></div>
|
|
338
131
|
</div>
|
|
339
|
-
`}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){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple(),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const
|
|
132
|
+
`}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){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple(),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}ni.elementDefinitions={},ni.styles=e.css`
|
|
340
133
|
:host {
|
|
341
134
|
display: contents;
|
|
342
135
|
}
|
|
@@ -355,17 +148,17 @@ const Re=i.css`.mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(-
|
|
|
355
148
|
.ft-ripple .ft-ripple--effect {
|
|
356
149
|
position: absolute;
|
|
357
150
|
opacity: 0;
|
|
358
|
-
background-color: ${
|
|
151
|
+
background-color: ${si.color};
|
|
359
152
|
}
|
|
360
153
|
|
|
361
154
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background,
|
|
362
155
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
363
|
-
background-color: ${
|
|
156
|
+
background-color: ${si.secondaryColor};
|
|
364
157
|
}
|
|
365
158
|
|
|
366
159
|
.ft-ripple.ft-ripple--primary .ft-ripple--background,
|
|
367
160
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
368
|
-
background-color: ${
|
|
161
|
+
background-color: ${si.primaryColor};
|
|
369
162
|
}
|
|
370
163
|
|
|
371
164
|
.ft-ripple .ft-ripple--background {
|
|
@@ -396,33 +189,22 @@ const Re=i.css`.mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(-
|
|
|
396
189
|
}
|
|
397
190
|
|
|
398
191
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
399
|
-
opacity: ${
|
|
192
|
+
opacity: ${si.opacityContentOnSurfaceHover};
|
|
400
193
|
}
|
|
401
194
|
|
|
402
195
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
403
|
-
opacity: ${
|
|
196
|
+
opacity: ${si.opacityContentOnSurfaceSelected};
|
|
404
197
|
}
|
|
405
198
|
|
|
406
199
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
407
|
-
opacity: ${
|
|
200
|
+
opacity: ${si.opacityContentOnSurfaceFocused};
|
|
408
201
|
}
|
|
409
202
|
|
|
410
203
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
411
|
-
opacity: ${
|
|
204
|
+
opacity: ${si.opacityContentOnSurfacePressed};
|
|
412
205
|
transform: translate(-50%, -50%) scale(1);
|
|
413
206
|
}
|
|
414
|
-
`,
|
|
415
|
-
/**
|
|
416
|
-
* @license
|
|
417
|
-
* Copyright 2021 Google LLC
|
|
418
|
-
* SPDX-LIcense-Identifier: Apache-2.0
|
|
419
|
-
*/
|
|
420
|
-
const Ie=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}`
|
|
421
|
-
/**
|
|
422
|
-
* @license
|
|
423
|
-
* Copyright 2018 Google LLC
|
|
424
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
425
|
-
*/;let je=class extends i.LitElement{render(){return i.html`<span><slot></slot></span>`}};je.styles=[Ie],je=ae([r.customElement("mwc-icon")],je);var Me=function(t,e,i,r){for(var o,c=arguments.length,a=c<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,n=t.length-1;n>=0;n--)(o=t[n])&&(a=(c<3?o(a):c>3?o(e,i,a):o(e,i))||a);return c>3&&a&&Object.defineProperty(e,i,a),a};const Le=e.FtCssVariable.create("--ft-tooltip-distance","SIZE","4px"),Ne=e.FtCssVariable.create("--ft-tooltip-color","COLOR","#FFFFFF"),He=e.FtCssVariable.create("--ft-tooltip-background-color","COLOR","#666666"),Pe=e.FtCssVariable.create("--ft-tooltip-z-index","NUMBER","1"),Ve=e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system");class Ge extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new e.Debouncer,this.revealDebouncer=new e.Debouncer}render(){return i.html`
|
|
207
|
+
`,oi([o.property({type:Boolean})],ni.prototype,"primary",void 0),oi([o.property({type:Boolean})],ni.prototype,"secondary",void 0),oi([o.property({type:Boolean})],ni.prototype,"unbounded",void 0),oi([o.property({type:Boolean})],ni.prototype,"activated",void 0),oi([o.property({type:Boolean})],ni.prototype,"selected",void 0),oi([o.property({type:Boolean})],ni.prototype,"disabled",void 0),oi([o.state()],ni.prototype,"hovered",void 0),oi([o.state()],ni.prototype,"focused",void 0),oi([o.state()],ni.prototype,"pressed",void 0),oi([o.state()],ni.prototype,"rippling",void 0),oi([o.state()],ni.prototype,"rippleSize",void 0),oi([o.state()],ni.prototype,"originX",void 0),oi([o.state()],ni.prototype,"originY",void 0),oi([o.query(".ft-ripple")],ni.prototype,"ripple",void 0),oi([o.query(".ft-ripple--effect")],ni.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(ni);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};const li=i.FtCssVariable.create("--ft-tooltip-distance","SIZE","4px"),ai=i.FtCssVariable.create("--ft-tooltip-color","COLOR","#FFFFFF"),hi=i.FtCssVariable.create("--ft-tooltip-background-color","COLOR","#666666"),pi=i.FtCssVariable.create("--ft-tooltip-z-index","NUMBER","1"),fi=i.FtCssVariable.external(i.designSystemVariables.borderRadiusS,"Design system");class ci extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}render(){return e.html`
|
|
426
208
|
<div part="container"
|
|
427
209
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
428
210
|
@mouseenter=${this.onHover}
|
|
@@ -437,7 +219,7 @@ const Ie=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
437
219
|
</div>
|
|
438
220
|
<slot></slot>
|
|
439
221
|
</div>
|
|
440
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const
|
|
222
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2,s=this.tooltip.style;switch(this.position){case"top":s.top=-this.tooltip.clientHeight+"px",s.left=o+"px";break;case"bottom":s.top=i.height+"px",s.left=o+"px";break;case"left":s.top=e+"px",s.left=-this.tooltip.clientWidth+"px";break;case"right":s.top=e+"px",s.left=i.width+"px"}s.maxWidth=Math.max(i.width,150)+"px"}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}ci.elementDefinitions={"ft-typography":ii},ci.styles=e.css`
|
|
441
223
|
.ft-tooltip--container {
|
|
442
224
|
display: block;
|
|
443
225
|
position: relative;
|
|
@@ -455,21 +237,21 @@ const Ie=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
455
237
|
width: max-content;
|
|
456
238
|
max-width: 150px;
|
|
457
239
|
text-align: center;
|
|
458
|
-
padding: ${
|
|
459
|
-
z-index: ${
|
|
240
|
+
padding: ${li};
|
|
241
|
+
z-index: ${pi};
|
|
460
242
|
}
|
|
461
243
|
|
|
462
244
|
.ft-tooltip--content {
|
|
463
245
|
padding: 4px 8px;
|
|
464
|
-
border-radius: ${
|
|
465
|
-
background-color: ${
|
|
466
|
-
color: ${
|
|
246
|
+
border-radius: ${fi};
|
|
247
|
+
background-color: ${hi};
|
|
248
|
+
color: ${ai};
|
|
467
249
|
top: -500px;
|
|
468
250
|
left: -500px;
|
|
469
251
|
position: relative;
|
|
470
252
|
word-break: break-word;
|
|
471
253
|
}
|
|
472
|
-
`,
|
|
254
|
+
`,ri([o.property()],ci.prototype,"text",void 0),ri([o.property({type:Boolean})],ci.prototype,"manual",void 0),ri([o.property({type:Boolean})],ci.prototype,"inline",void 0),ri([o.property({type:Number})],ci.prototype,"delay",void 0),ri([o.property()],ci.prototype,"position",void 0),ri([o.queryAssignedNodes("",!0)],ci.prototype,"slotNodes",void 0),ri([o.query(".ft-tooltip--container")],ci.prototype,"container",void 0),ri([o.query("slot")],ci.prototype,"target",void 0),ri([o.query(".ft-tooltip")],ci.prototype,"tooltip",void 0),ri([o.query(".ft-tooltip--content")],ci.prototype,"tooltipContent",void 0),ri([o.state()],ci.prototype,"visible",void 0),i.customElement("ft-tooltip")(ci);const di={color:i.FtCssVariable.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariable.create("--ft-loader-size","SIZE","80px")};class ui extends i.FtLitElement{static get styles(){return e.css`
|
|
473
255
|
:host {
|
|
474
256
|
line-height: 0;
|
|
475
257
|
}
|
|
@@ -478,8 +260,8 @@ const Ie=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
478
260
|
display: inline-block;
|
|
479
261
|
position: relative;
|
|
480
262
|
|
|
481
|
-
width: ${
|
|
482
|
-
height: ${
|
|
263
|
+
width: ${di.size};
|
|
264
|
+
height: ${di.size};
|
|
483
265
|
}
|
|
484
266
|
|
|
485
267
|
.ft-loader div {
|
|
@@ -488,7 +270,7 @@ const Ie=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
488
270
|
width: 25%;
|
|
489
271
|
height: 25%;
|
|
490
272
|
border-radius: 50%;
|
|
491
|
-
background: ${
|
|
273
|
+
background: ${di.color};
|
|
492
274
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
493
275
|
}
|
|
494
276
|
|
|
@@ -535,17 +317,55 @@ const Ie=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
535
317
|
transform: translate(0, 0);
|
|
536
318
|
}
|
|
537
319
|
100% {
|
|
538
|
-
transform: translate(calc(0.35 * ${
|
|
320
|
+
transform: translate(calc(0.35 * ${di.size}), 0);
|
|
539
321
|
}
|
|
540
322
|
}
|
|
541
|
-
`}render(){return
|
|
323
|
+
`}render(){return e.html`
|
|
542
324
|
<div class="ft-loader">
|
|
543
325
|
<div></div>
|
|
544
326
|
<div></div>
|
|
545
327
|
<div></div>
|
|
546
328
|
<div></div>
|
|
547
329
|
</div>
|
|
548
|
-
`}}
|
|
330
|
+
`}}var vi,bi;i.customElement("ft-loader")(ui),function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(vi||(vi={})),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=""}(bi||(bi={})),new Map([...["abw"].map((t=>[t,bi.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,bi.AUDIO])),...["avi"].map((t=>[t,bi.AVI])),...["chm","xhs"].map((t=>[t,bi.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,bi.CODE])),...["csv"].map((t=>[t,bi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,bi.DITA])),...["epub"].map((t=>[t,bi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,bi.EXCEL])),...["flac"].map((t=>[t,bi.FLAC])),...["gif"].map((t=>[t,bi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,bi.GZIP])),...["html","htm","xhtml"].map((t=>[t,bi.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,bi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,bi.JPEG])),...["json"].map((t=>[t,bi.JSON])),...["m4a","m4p"].map((t=>[t,bi.M4A])),...["mov","qt"].map((t=>[t,bi.MOV])),...["mp3"].map((t=>[t,bi.MP3])),...["mp4","m4v"].map((t=>[t,bi.MP4])),...["ogg","oga"].map((t=>[t,bi.OGG])),...["pdf","ps"].map((t=>[t,bi.PDF])),...["png"].map((t=>[t,bi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,bi.POWERPOINT])),...["rar"].map((t=>[t,bi.RAR])),...["stp"].map((t=>[t,bi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,bi.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,bi.VIDEO])),...["wav"].map((t=>[t,bi.WAV])),...["wma"].map((t=>[t,bi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,bi.WORD])),...["xml","xsl","rdf"].map((t=>[t,bi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,bi.YAML])),...["zip"].map((t=>[t,bi.ZIP]))]);var xi,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};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(xi||(xi={}));const yi={size:i.FtCssVariable.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:i.FtCssVariable.extend("--ft-icon-fluid-topics-font-family",i.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:i.FtCssVariable.extend("--ft-icon-file-format-font-family",i.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:i.FtCssVariable.extend("--ft-icon-material-font-family",i.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class mi extends i.FtLitElement{constructor(){super(...arguments),this.variant=xi.fluid_topics}render(){return e.html`
|
|
331
|
+
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
332
|
+
${r.unsafeHTML(this.getIcon())}
|
|
333
|
+
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
334
|
+
</i>
|
|
335
|
+
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}getIcon(){var t,i;let o=this.textContent;return this.variant===xi.file_format?null!==(t=bi[o.toUpperCase()])&&void 0!==t?t:o:this.variant===xi.fluid_topics?null!==(i=vi[o.toUpperCase()])&&void 0!==i?i:o:e.nothing}}mi.elementDefinitions={},mi.styles=e.css`
|
|
336
|
+
:host, i.ft-icon {
|
|
337
|
+
display: inline-block;
|
|
338
|
+
width: ${yi.size};
|
|
339
|
+
height: ${yi.size};
|
|
340
|
+
text-align: center;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
i.ft-icon {
|
|
344
|
+
font-size: ${yi.size};
|
|
345
|
+
line-height: 1;
|
|
346
|
+
font-weight: normal;
|
|
347
|
+
text-transform: none;
|
|
348
|
+
font-style: normal;
|
|
349
|
+
font-variant: normal;
|
|
350
|
+
speak: none;
|
|
351
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
352
|
+
text-rendering: auto;
|
|
353
|
+
-webkit-font-smoothing: antialiased;
|
|
354
|
+
-moz-osx-font-smoothing: grayscale;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.ft-icon--fluid-topics {
|
|
358
|
+
font-family: ${yi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.ft-icon--file-format {
|
|
362
|
+
font-family: ${yi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.ft-icon--material {
|
|
366
|
+
font-family: ${yi.materialFontFamily}, "Material Icons", sans-serif;
|
|
367
|
+
}
|
|
368
|
+
`,gi([o.property()],mi.prototype,"variant",void 0),gi([o.query("slot")],mi.prototype,"slottedContent",void 0),i.customElement("ft-icon")(mi);var $i=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};const ki=i.FtCssVariable.extend("--ft-button-color",i.designSystemVariables.colorPrimary),wi={backgroundColor:i.FtCssVariable.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariable.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:ki,fontSize:i.FtCssVariable.extend("--ft-button-font-size",Zt.fontSize),iconSize:i.FtCssVariable.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariable.extend("--ft-button-ripple-color",ki),opacityDisabled:i.FtCssVariable.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},zi=i.FtCssVariable.extend("--ft-button-primary-color",i.FtCssVariable.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),Si={backgroundColor:i.FtCssVariable.extend("--ft-button-primary-background-color",i.FtCssVariable.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:zi,rippleColor:i.FtCssVariable.extend("--ft-button-primary-ripple-color",zi)},Oi=i.FtCssVariable.extend("--ft-button-dense-border-radius",i.FtCssVariable.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM));class Ci extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}static get styles(){return[i.noTextSelect,e.css`
|
|
549
369
|
:host {
|
|
550
370
|
display: inline-block;
|
|
551
371
|
max-width: 100%;
|
|
@@ -584,18 +404,18 @@ const Ie=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
584
404
|
border: none;
|
|
585
405
|
pointer-events: auto;
|
|
586
406
|
|
|
587
|
-
--ft-button-internal-font-size: ${
|
|
407
|
+
--ft-button-internal-font-size: ${wi.fontSize};
|
|
588
408
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
589
|
-
--ft-button-internal-color: ${
|
|
590
|
-
|
|
409
|
+
--ft-button-internal-color: ${wi.color};
|
|
410
|
+
${i.setVariable(yi.size,wi.iconSize)};
|
|
591
411
|
--ft-button-internal-vertical-padding: 6px;
|
|
592
412
|
--ft-button-internal-horizontal-padding: 8px;
|
|
593
|
-
${
|
|
594
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height),
|
|
413
|
+
${i.setVariable(si.color,wi.rippleColor)};
|
|
414
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${wi.iconSize});
|
|
595
415
|
|
|
596
|
-
border-radius: ${
|
|
416
|
+
border-radius: ${wi.borderRadius};
|
|
597
417
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
598
|
-
background-color: ${
|
|
418
|
+
background-color: ${wi.backgroundColor};
|
|
599
419
|
color: var(--ft-button-internal-color);
|
|
600
420
|
-webkit-mask-image: radial-gradient(white, black);
|
|
601
421
|
}
|
|
@@ -607,7 +427,7 @@ const Ie=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
607
427
|
.ft-button--dense {
|
|
608
428
|
--ft-button-internal-vertical-padding: 2px;
|
|
609
429
|
--ft-button-internal-horizontal-padding: 4px;
|
|
610
|
-
border-radius: ${
|
|
430
|
+
border-radius: ${Oi};
|
|
611
431
|
}
|
|
612
432
|
|
|
613
433
|
.ft-button--round {
|
|
@@ -616,13 +436,13 @@ const Ie=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
616
436
|
|
|
617
437
|
.ft-button[disabled] {
|
|
618
438
|
filter: grayscale(1);
|
|
619
|
-
opacity: ${
|
|
439
|
+
opacity: ${wi.opacityDisabled};
|
|
620
440
|
}
|
|
621
441
|
|
|
622
442
|
.ft-button.ft-button--primary {
|
|
623
|
-
background-color: ${
|
|
624
|
-
--ft-button-internal-color: ${
|
|
625
|
-
${
|
|
443
|
+
background-color: ${Si.backgroundColor};
|
|
444
|
+
--ft-button-internal-color: ${Si.color};
|
|
445
|
+
${i.setVariable(si.color,Si.rippleColor)};
|
|
626
446
|
}
|
|
627
447
|
|
|
628
448
|
.ft-button.ft-button--outlined {
|
|
@@ -640,8 +460,8 @@ const Ie=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
640
460
|
text-overflow: ellipsis;
|
|
641
461
|
display: block;
|
|
642
462
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
643
|
-
${
|
|
644
|
-
${
|
|
463
|
+
${i.setVariable(Zt.fontSize,"var(--ft-button-internal-font-size)")};
|
|
464
|
+
${i.setVariable(Zt.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
645
465
|
}
|
|
646
466
|
|
|
647
467
|
.ft-button--safari-fix .ft-button--label {
|
|
@@ -658,28 +478,27 @@ const Ie=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
658
478
|
display: none;
|
|
659
479
|
}
|
|
660
480
|
|
|
661
|
-
|
|
481
|
+
ft-icon {
|
|
662
482
|
flex-shrink: 0;
|
|
663
|
-
width: var(--mdc-icon-size);
|
|
664
483
|
}
|
|
665
484
|
|
|
666
|
-
.ft-button--label[hidden] +
|
|
485
|
+
.ft-button--label[hidden] + ft-icon {
|
|
667
486
|
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
668
487
|
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
669
488
|
}
|
|
670
489
|
|
|
671
|
-
.ft-button:not(.ft-button--trailing-icon)
|
|
490
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
672
491
|
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
673
492
|
order: -1;
|
|
674
493
|
}
|
|
675
494
|
|
|
676
495
|
ft-loader {
|
|
677
|
-
${
|
|
678
|
-
${
|
|
496
|
+
${i.setVariable(di.size,wi.iconSize)};
|
|
497
|
+
${i.setVariable(di.color,"var(--ft-button-internal-color)")};
|
|
679
498
|
}
|
|
680
|
-
`]}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":
|
|
499
|
+
`]}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":i.isSafari,"ft-no-text-select":!0};return this.addTooltip(e.html`
|
|
681
500
|
<button part="button"
|
|
682
|
-
class="${
|
|
501
|
+
class="${n.classMap(t)}"
|
|
683
502
|
aria-label="${this.getLabel()}"
|
|
684
503
|
?disabled=${this.isDisabled()}>
|
|
685
504
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
@@ -691,155 +510,246 @@ const Ie=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
691
510
|
</ft-typography>
|
|
692
511
|
${this.resolveIcon()}
|
|
693
512
|
</button>
|
|
694
|
-
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:
|
|
513
|
+
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:e.html`
|
|
695
514
|
<ft-tooltip part="tooltip"
|
|
696
515
|
text="${this.getLabel()}"
|
|
697
516
|
position="${this.tooltipPosition}">
|
|
698
517
|
${t}
|
|
699
518
|
</ft-tooltip>
|
|
700
|
-
`}resolveIcon(){return this.loading?
|
|
701
|
-
<ft-loader></ft-loader> `:this.icon?
|
|
702
|
-
<
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
.
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
519
|
+
`}resolveIcon(){return this.loading?e.html`
|
|
520
|
+
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
521
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Ci.elementDefinitions={"ft-ripple":ni,"ft-tooltip":ci,"ft-typography":ii,"ft-icon":mi,"ft-loader":ui},$i([o.property({type:Boolean})],Ci.prototype,"primary",void 0),$i([o.property({type:Boolean})],Ci.prototype,"outlined",void 0),$i([o.property({type:Boolean})],Ci.prototype,"disabled",void 0),$i([o.property({type:Boolean})],Ci.prototype,"dense",void 0),$i([o.property({type:Boolean})],Ci.prototype,"round",void 0),$i([o.property({type:String})],Ci.prototype,"label",void 0),$i([o.property({type:String})],Ci.prototype,"icon",void 0),$i([o.property({type:Boolean})],Ci.prototype,"trailingIcon",void 0),$i([o.property({type:Boolean})],Ci.prototype,"loading",void 0),$i([o.property({type:String})],Ci.prototype,"tooltipPosition",void 0),$i([o.query(".ft-button")],Ci.prototype,"button",void 0),$i([o.query(".ft-button--label slot")],Ci.prototype,"slottedContent",void 0),i.customElement("ft-button")(Ci);var Bi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};const ji=i.FtCssVariable.extend("--ft-checkbox-text-color",i.designSystemVariables.colorOnSurfaceHigh),Di=i.FtCssVariable.external(i.designSystemVariables.colorPrimary,"Design system"),Ei=i.FtCssVariable.external(i.designSystemVariables.colorOnPrimary,"Design system"),Ti=i.FtCssVariable.extend("--ft-checkbox-border-color",i.designSystemVariables.colorOnSurfaceMedium),Mi=i.FtCssVariable.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system");class Fi 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`
|
|
522
|
+
<label class="${n.classMap(t)}">
|
|
523
|
+
<div class="ft-checkbox--box-container">
|
|
524
|
+
<input type="checkbox"
|
|
525
|
+
name=${this.name}
|
|
526
|
+
.checked=${this.checked}
|
|
527
|
+
.disabled=${this.disabled}
|
|
528
|
+
@change=${this.onChange}
|
|
529
|
+
>
|
|
530
|
+
<ft-ripple
|
|
531
|
+
?disabled=${this.disabled}
|
|
532
|
+
?primary=${this.checked||this.indeterminate}
|
|
533
|
+
unbounded>
|
|
534
|
+
</ft-ripple>
|
|
535
|
+
<div class="ft-checkbox--box">
|
|
536
|
+
<svg class="ft-checkbox--checkmark" viewBox="0 0 24 24">
|
|
537
|
+
<path class="ft-checkbox--checkmark-path" fill="none"
|
|
538
|
+
d=${this.indeterminate&&!this.checked?"M2,12 22,12":"M1.73,12.91 8.1,19.28 22.79,4.59"}></path>
|
|
539
|
+
</svg>
|
|
540
|
+
</div>
|
|
541
|
+
</div>
|
|
542
|
+
<ft-typography variant="body2">
|
|
543
|
+
<slot></slot>
|
|
544
|
+
</ft-typography>
|
|
545
|
+
</label>
|
|
546
|
+
`}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)}}Fi.elementDefinitions={"ft-ripple":ni,"ft-typography":ii},Fi.styles=e.css`
|
|
547
|
+
* {
|
|
548
|
+
box-sizing: border-box;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.ft-checkbox {
|
|
552
|
+
box-sizing: border-box;
|
|
553
|
+
color: ${ji};
|
|
554
|
+
|
|
555
|
+
display: inline-flex;
|
|
556
|
+
align-items: center;
|
|
557
|
+
gap: 4px;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
.ft-checkbox--disabled {
|
|
561
|
+
color: ${Mi};
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
input {
|
|
565
|
+
opacity: 0;
|
|
566
|
+
position: absolute;
|
|
567
|
+
width: 40px;
|
|
568
|
+
height: 40px;
|
|
569
|
+
margin: 0;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.ft-checkbox--box-container {
|
|
573
|
+
position: relative;
|
|
574
|
+
width: 40px;
|
|
575
|
+
height: 40px;
|
|
576
|
+
|
|
577
|
+
display: flex;
|
|
578
|
+
justify-content: center;
|
|
579
|
+
align-items: center;
|
|
580
|
+
flex-shrink: 0;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.ft-checkbox--box {
|
|
584
|
+
border: 2px solid ${Ti};
|
|
585
|
+
border-radius: 2px;
|
|
586
|
+
|
|
587
|
+
width: 18px;
|
|
588
|
+
height: 18px;
|
|
589
|
+
|
|
590
|
+
color: ${Ei};
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
.ft-checkbox--checked .ft-checkbox--box,
|
|
595
|
+
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
596
|
+
border-color: ${Di};
|
|
597
|
+
background-color: ${Di};
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.ft-checkbox--disabled .ft-checkbox--box {
|
|
601
|
+
border-color: ${Mi};
|
|
602
|
+
background-color: transparent;
|
|
603
|
+
color: ${Mi};
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
.ft-checkbox--checkmark {
|
|
607
|
+
transition: opacity 180ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 180ms cubic-bezier(0, 0, 0.2, 1) 0ms;
|
|
608
|
+
opacity: 0;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
.ft-checkbox--checkmark-path {
|
|
612
|
+
stroke-dashoffset: 0;
|
|
613
|
+
stroke: currentcolor;
|
|
614
|
+
stroke-width: 3px;
|
|
615
|
+
stroke-dasharray: 30;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.ft-checkbox--checked .ft-checkbox--checkmark,
|
|
619
|
+
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
620
|
+
opacity: 1;
|
|
621
|
+
}
|
|
622
|
+
`,Bi([o.property()],Fi.prototype,"name",void 0),Bi([o.property({type:Boolean})],Fi.prototype,"checked",void 0),Bi([o.property({type:Boolean})],Fi.prototype,"indeterminate",void 0),Bi([o.property({type:Boolean})],Fi.prototype,"disabled",void 0),Bi([o.query(".ft-checkbox")],Fi.prototype,"container",void 0),Bi([o.query("ft-ripple")],Fi.prototype,"ripple",void 0),i.customElement("ft-checkbox")(Fi);var Ai=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};const Ii=i.FtCssVariable.extend("--ft-radio-text-color",i.designSystemVariables.colorOnSurfaceHigh),Ni=i.FtCssVariable.external(i.designSystemVariables.colorPrimary,"Design system"),_i=(i.FtCssVariable.external(i.designSystemVariables.colorOnPrimary,"Design system"),i.FtCssVariable.extend("--ft-radio-border-color",i.designSystemVariables.colorOnSurfaceMedium)),Li=i.FtCssVariable.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system");class Ri extends CustomEvent{constructor(t,i){super("change",{detail:{value:t,checked:i},bubbles:!0,composed:!0})}}class Hi 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`
|
|
623
|
+
<div class="${n.classMap(t)}">
|
|
624
|
+
<div class="ft-radio--box-container">
|
|
625
|
+
<input id="radio-button"
|
|
626
|
+
type="radio"
|
|
627
|
+
name="${this.name}"
|
|
628
|
+
value="${this.value}"
|
|
629
|
+
.checked=${this.checked}
|
|
630
|
+
.disabled=${this.disabled}
|
|
631
|
+
@change=${this.onChange}
|
|
632
|
+
>
|
|
633
|
+
<ft-ripple
|
|
634
|
+
?disabled=${this.disabled}
|
|
635
|
+
?primary=${this.checked}
|
|
636
|
+
unbounded>
|
|
637
|
+
</ft-ripple>
|
|
638
|
+
<div class="ft-radio--box">
|
|
639
|
+
</div>
|
|
640
|
+
</div>
|
|
641
|
+
<label for="radio-button" @click=${t=>t.stopPropagation()}>
|
|
642
|
+
<ft-typography variant="body2">
|
|
643
|
+
<slot></slot>
|
|
644
|
+
</ft-typography>
|
|
645
|
+
</label>
|
|
646
|
+
</div>
|
|
647
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new Ri(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 Ri(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Hi.elementDefinitions={"ft-ripple":ni,"ft-typography":ii},Hi.styles=e.css`
|
|
648
|
+
* {
|
|
649
|
+
box-sizing: border-box;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
.ft-radio {
|
|
653
|
+
box-sizing: border-box;
|
|
654
|
+
color: ${Ii};
|
|
655
|
+
|
|
656
|
+
display: inline-flex;
|
|
657
|
+
align-items: center;
|
|
658
|
+
gap: 4px;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
.ft-radio--disabled {
|
|
662
|
+
color: ${Li};
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
input {
|
|
666
|
+
opacity: 0;
|
|
667
|
+
position: absolute;
|
|
668
|
+
width: 40px;
|
|
669
|
+
height: 40px;
|
|
670
|
+
margin: 0;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
.ft-radio--box-container {
|
|
674
|
+
position: relative;
|
|
675
|
+
width: 40px;
|
|
676
|
+
height: 40px;
|
|
677
|
+
|
|
678
|
+
display: flex;
|
|
679
|
+
justify-content: center;
|
|
680
|
+
align-items: center;
|
|
681
|
+
flex-shrink: 0;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
.ft-radio--box {
|
|
685
|
+
border: 2px solid ${_i};
|
|
686
|
+
border-radius: 50%;
|
|
687
|
+
|
|
688
|
+
display: flex;
|
|
689
|
+
justify-content: center;
|
|
690
|
+
align-items: center;
|
|
691
|
+
|
|
692
|
+
width: 20px;
|
|
693
|
+
height: 20px;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.ft-radio--box:after {
|
|
697
|
+
content: " ";
|
|
698
|
+
background-color: ${Ni};
|
|
699
|
+
|
|
700
|
+
border-radius: 50%;
|
|
701
|
+
|
|
702
|
+
width: 12px;
|
|
703
|
+
height: 12px;
|
|
704
|
+
|
|
705
|
+
transform: scale(0);
|
|
706
|
+
transition: transform 100ms ease;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
.ft-radio--checked .ft-radio--box {
|
|
710
|
+
border-color: ${Ni};
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
.ft-radio--checked .ft-radio--box:after {
|
|
715
|
+
transform: scale(1);
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
.ft-radio--disabled .ft-radio--box {
|
|
719
|
+
border-color: ${Li};
|
|
720
|
+
background-color: transparent;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
.ft-radio--disabled .ft-radio--box:after {
|
|
724
|
+
background-color: ${Li};
|
|
725
|
+
}
|
|
726
|
+
`,Ai([o.property()],Hi.prototype,"value",void 0),Ai([o.property()],Hi.prototype,"name",void 0),Ai([o.property({type:Boolean})],Hi.prototype,"checked",void 0),Ai([o.property({type:Boolean})],Hi.prototype,"disabled",void 0),Ai([o.query(".ft-radio")],Hi.prototype,"container",void 0),Ai([o.query("ft-ripple")],Hi.prototype,"ripple",void 0),Ai([o.query("input")],Hi.prototype,"input",void 0);var Ui=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 Wi extends i.FtLitElement{constructor(){super(...arguments),this.name=""}render(){return e.html`
|
|
727
|
+
<slot @slotchange=${this.onSlotChange}
|
|
728
|
+
@change=${this.onChange}
|
|
729
|
+
@keydown=${this.onKeyDown}
|
|
730
|
+
@focusin=${this.onFocusIn}
|
|
731
|
+
></slot>
|
|
732
|
+
`}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}))}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))}onFocusIn(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}Wi.elementDefinitions={},Wi.styles=e.css`
|
|
733
|
+
:host {
|
|
734
|
+
display: contents;
|
|
735
|
+
}
|
|
736
|
+
`,Ui([o.property()],Wi.prototype,"name",void 0),Ui([o.queryAssignedElements()],Wi.prototype,"radioButtons",void 0),i.customElement("ft-radio")(Hi),i.customElement("ft-radio-group")(Wi);var Zi=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};const Vi={borderRadiusM:i.FtCssVariable.external(i.designSystemVariables.borderRadiusM,"Design system"),colorOutline:i.FtCssVariable.external(i.designSystemVariables.colorOutline,"Design system"),colorOnSurface:i.FtCssVariable.external(i.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariable.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:i.FtCssVariable.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:i.FtCssVariable.external(i.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:i.FtCssVariable.external(i.designSystemVariables.colorOnPrimary,"Design system"),fontFamily:i.FtCssVariable.external(St.fontFamily,"Body2 typography"),fontSize:i.FtCssVariable.external(St.fontSize,"Body2 typography"),fontWeight:i.FtCssVariable.external(St.fontWeight,"Body2 typography"),letterSpacing:i.FtCssVariable.external(St.letterSpacing,"Body2 typography"),lineHeight:i.FtCssVariable.external(St.lineHeight,"Body2 typography"),textTransform:i.FtCssVariable.external(St.textTransform,"Body2 typography")};class Pi 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`
|
|
827
737
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
828
|
-
${null==this.parent?null:
|
|
738
|
+
${null==this.parent?null:e.html`
|
|
829
739
|
<div tabindex="0"
|
|
830
740
|
class="ft-filter-level--go-back"
|
|
831
741
|
?disabled=${this.disabled}
|
|
832
742
|
@keyup=${this.goBackOnKeyPress}
|
|
833
743
|
@click=${this.goBackOnClick}>
|
|
834
744
|
<ft-ripple></ft-ripple>
|
|
835
|
-
<
|
|
745
|
+
<ft-icon variant="material">chevron_left</ft-icon>
|
|
836
746
|
<ft-typography variant="body2">${this.parent.label}</ft-typography>
|
|
837
747
|
</div>
|
|
838
748
|
`}
|
|
839
|
-
${
|
|
749
|
+
${s.repeat(i,(t=>t.value),(t=>{var i;return e.html`
|
|
840
750
|
<div class="ft-filter-level--option" part="options">
|
|
841
751
|
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
842
|
-
${this.preventNavigation||t.selected||0===(null!==(
|
|
752
|
+
${this.preventNavigation||t.selected||0===(null!==(i=t.subOptions)&&void 0!==i?i:[]).length?e.nothing:e.html`
|
|
843
753
|
<ft-button icon="chevron_right"
|
|
844
754
|
label="${t.label}"
|
|
845
755
|
?disabled=${this.disabled}
|
|
@@ -848,7 +758,7 @@ const fi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
848
758
|
`}
|
|
849
759
|
</div>
|
|
850
760
|
`}))}
|
|
851
|
-
${
|
|
761
|
+
${i.length<t.length?e.html`
|
|
852
762
|
<ft-button
|
|
853
763
|
class="ft-filter-level--display-more"
|
|
854
764
|
icon="expand_more"
|
|
@@ -856,29 +766,27 @@ const fi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
856
766
|
@click=${this.displayMore}>
|
|
857
767
|
${this.moreValuesButtonLabel}
|
|
858
768
|
</ft-button>
|
|
859
|
-
`:
|
|
769
|
+
`:e.nothing}
|
|
860
770
|
</div>
|
|
861
|
-
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var
|
|
862
|
-
<
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
</mwc-formfield>
|
|
881
|
-
`}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}vi.elementDefinitions={"ft-button":Qe,"ft-ripple":De,"ft-typography":ee,"mwc-checkbox":Be,"mwc-formfield":ai,"mwc-icon":je,"mwc-radio":ui},vi.styles=[i.css`
|
|
771
|
+
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var i;return e.html`
|
|
772
|
+
<ft-checkbox name="${this.id}"
|
|
773
|
+
.checked=${t.selected}
|
|
774
|
+
.disabled=${this.disabled}
|
|
775
|
+
.indeterminate=${ei(null!==(i=t.subOptions)&&void 0!==i?i:[],(t=>{var i;return null!==(i=t.subOptions)&&void 0!==i?i:[]})).some((t=>t.selected))}
|
|
776
|
+
@change=${i=>this.optionsChanged(i,t)}>
|
|
777
|
+
${t.label}
|
|
778
|
+
</ft-checkbox>
|
|
779
|
+
`}buildMonoValuedOption(t){return e.html`
|
|
780
|
+
<ft-radio name="${this.id+Math.round(1e6*Math.random())}"
|
|
781
|
+
.checked=${t.selected}
|
|
782
|
+
?disabled=${this.disabled}
|
|
783
|
+
@click=${i=>this.optionsChanged(i,t)}
|
|
784
|
+
@keyup=${i=>this.onRadioKeyUp(i,t)}
|
|
785
|
+
@change=${t=>t.stopPropagation()}>
|
|
786
|
+
|
|
787
|
+
${t.label}
|
|
788
|
+
</ft-radio>
|
|
789
|
+
`}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}))}}Pi.elementDefinitions={"ft-button":Ci,"ft-ripple":ni,"ft-typography":ii,"ft-checkbox":Fi,"ft-icon":mi,"ft-radio":Hi},Pi.styles=[e.css`
|
|
882
790
|
.ft-filter-level--container {
|
|
883
791
|
display: flex;
|
|
884
792
|
flex-direction: column;
|
|
@@ -892,21 +800,21 @@ const fi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
892
800
|
flex-shrink: 0;
|
|
893
801
|
text-decoration: none;
|
|
894
802
|
position: relative;
|
|
895
|
-
border-radius: ${
|
|
803
|
+
border-radius: ${Vi.borderRadiusM};
|
|
896
804
|
overflow: hidden;
|
|
897
805
|
display: flex;
|
|
898
806
|
align-items: center;
|
|
899
807
|
padding: 4px 4px;
|
|
900
808
|
gap: 4px;
|
|
901
809
|
cursor: pointer;
|
|
902
|
-
color: ${
|
|
810
|
+
color: ${Vi.colorOnSurface};
|
|
903
811
|
}
|
|
904
812
|
|
|
905
813
|
.ft-filter-level--go-back:focus {
|
|
906
814
|
outline: none;
|
|
907
815
|
}
|
|
908
816
|
|
|
909
|
-
.ft-filter-level--go-back
|
|
817
|
+
.ft-filter-level--go-back ft-icon {
|
|
910
818
|
flex-shrink: 0;
|
|
911
819
|
}
|
|
912
820
|
|
|
@@ -928,49 +836,26 @@ const fi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
928
836
|
}
|
|
929
837
|
|
|
930
838
|
ft-button {
|
|
931
|
-
${
|
|
839
|
+
${i.setVariable(wi.color,Vi.colorOnSurface)};
|
|
932
840
|
}
|
|
933
841
|
|
|
934
|
-
|
|
842
|
+
ft-radio, ft-checkbox {
|
|
935
843
|
flex-shrink: 1;
|
|
936
844
|
flex-grow: 1;
|
|
937
845
|
display: block;
|
|
938
846
|
max-width: calc(100% + 10px);
|
|
939
847
|
margin-left: -10px;
|
|
940
848
|
word-break: break-word;
|
|
941
|
-
|
|
942
|
-
--mdc-theme-secondary: ${gi.colorPrimary};
|
|
943
|
-
|
|
944
|
-
--mdc-radio-unchecked-color: ${gi.colorOnSurfaceMedium};
|
|
945
|
-
--mdc-checkbox-unchecked-color: ${gi.colorOnSurfaceMedium};
|
|
946
|
-
--mdc-checkbox-ink-color: ${gi.colorOnPrimary};
|
|
947
|
-
|
|
948
|
-
--mdc-radio-disabled-color: ${gi.colorOnSurfaceDisabled};
|
|
949
|
-
--mdc-checkbox-disabled-color: ${gi.colorOnSurfaceDisabled};
|
|
950
|
-
|
|
951
|
-
--mdc-theme-on-surface: ${gi.colorPrimary};
|
|
952
|
-
|
|
953
|
-
--mdc-typography-body2-font-family: ${gi.fontFamily};
|
|
954
|
-
--mdc-typography-body2-font-size: ${gi.fontSize};
|
|
955
|
-
--mdc-typography-body2-font-weight: ${gi.fontWeight};
|
|
956
|
-
--mdc-typography-body2-letter-spacing: ${gi.letterSpacing};
|
|
957
|
-
--mdc-typography-body2-line-height: ${gi.lineHeight};
|
|
958
|
-
--mdc-typography-body2-text-transform: ${gi.textTransform};
|
|
959
|
-
--mdc-theme-text-primary-on-background: ${gi.colorOnSurface};
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
.ft-filter--disabled {
|
|
963
|
-
--mdc-theme-text-primary-on-background: ${gi.colorOnSurfaceDisabled};
|
|
964
849
|
}
|
|
965
|
-
`],
|
|
850
|
+
`],Zi([o.property({type:String})],Pi.prototype,"id",void 0),Zi([o.property({type:Object})],Pi.prototype,"parent",void 0),Zi([o.property({type:Array})],Pi.prototype,"options",void 0),Zi([o.property({type:Boolean})],Pi.prototype,"multivalued",void 0),Zi([o.property({type:Boolean})],Pi.prototype,"disabled",void 0),Zi([o.property({type:Boolean})],Pi.prototype,"hideSelectedOptions",void 0),Zi([o.property({type:Boolean})],Pi.prototype,"preventNavigation",void 0),Zi([o.property({type:String})],Pi.prototype,"filter",void 0),Zi([o.property({type:String})],Pi.prototype,"moreValuesButtonLabel",void 0),Zi([o.property({type:Number})],Pi.prototype,"displayedValuesLimit",void 0),Zi([o.query(".ft-filter-level--container")],Pi.prototype,"container",void 0),Zi([o.state()],Pi.prototype,"displayedPages",void 0);var Ki=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};const Gi={buttonsColor:i.FtCssVariable.extend("--ft-snap-scroll-buttons-color",i.designSystemVariables.colorPrimary),buttonsZIndex:i.FtCssVariable.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:i.FtCssVariable.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:i.FtCssVariable.external(i.designSystemVariables.colorSurface,"Design system")};class qi extends CustomEvent{constructor(t,i){super("current-element-change",{detail:{index:t,element:i}})}}class Xi 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`
|
|
966
851
|
<div part="container" class="${t}">
|
|
967
852
|
<ft-button
|
|
968
853
|
class="ft-snap-scroll--previous"
|
|
969
854
|
part="controls"
|
|
970
855
|
primary
|
|
971
856
|
icon="${this.horizontal?"arrow_back_ios_new":"expand_less"}"
|
|
972
|
-
?hidden=${!
|
|
973
|
-
?disabled=${!
|
|
857
|
+
?hidden=${!o||this.startReached}
|
|
858
|
+
?disabled=${!o||this.startReached}
|
|
974
859
|
@click=${this.previous}
|
|
975
860
|
></ft-button>
|
|
976
861
|
<slot class="ft-snap-scroll--content"
|
|
@@ -981,12 +866,12 @@ const fi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
981
866
|
part="controls"
|
|
982
867
|
primary
|
|
983
868
|
icon="${this.horizontal?"arrow_forward_ios":"expand_more"}"
|
|
984
|
-
?hidden=${!
|
|
985
|
-
?disabled=${!
|
|
869
|
+
?hidden=${!o||this.endReached}
|
|
870
|
+
?disabled=${!o||this.endReached}
|
|
986
871
|
@click=${this.next}
|
|
987
872
|
></ft-button>
|
|
988
873
|
</div>
|
|
989
|
-
`}updated(t){var
|
|
874
|
+
`}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 qi(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)}}Xi.elementDefinitions={"ft-button":Ci},Xi.styles=e.css`
|
|
990
875
|
.ft-snap-scroll {
|
|
991
876
|
box-sizing: border-box;
|
|
992
877
|
position: relative;
|
|
@@ -1021,7 +906,7 @@ const fi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1021
906
|
flex-wrap: nowrap;
|
|
1022
907
|
align-items: flex-start;
|
|
1023
908
|
justify-content: flex-start;
|
|
1024
|
-
gap: ${
|
|
909
|
+
gap: ${Gi.gap};
|
|
1025
910
|
}
|
|
1026
911
|
|
|
1027
912
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -1064,11 +949,11 @@ const fi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1064
949
|
.ft-snap-scroll--next {
|
|
1065
950
|
position: absolute;
|
|
1066
951
|
display: flex;
|
|
1067
|
-
z-index: ${
|
|
952
|
+
z-index: ${Gi.buttonsZIndex};
|
|
1068
953
|
opacity: 1;
|
|
1069
954
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1070
|
-
${
|
|
1071
|
-
${
|
|
955
|
+
${i.setVariable(wi.backgroundColor,"transparent")};
|
|
956
|
+
${i.setVariable(wi.color,Gi.buttonsColor)};
|
|
1072
957
|
}
|
|
1073
958
|
|
|
1074
959
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1081,55 +966,55 @@ const fi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1081
966
|
top: 0;
|
|
1082
967
|
left: -1px;
|
|
1083
968
|
bottom: 0;
|
|
1084
|
-
background: linear-gradient(to right, ${
|
|
969
|
+
background: linear-gradient(to right, ${Gi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1085
970
|
}
|
|
1086
971
|
|
|
1087
972
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1088
973
|
top: -1px;
|
|
1089
974
|
left: 0;
|
|
1090
975
|
right: 0;
|
|
1091
|
-
background: linear-gradient(to bottom, ${
|
|
976
|
+
background: linear-gradient(to bottom, ${Gi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1092
977
|
}
|
|
1093
978
|
|
|
1094
979
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1095
980
|
top: 0;
|
|
1096
981
|
right: -1px;
|
|
1097
982
|
bottom: 0;
|
|
1098
|
-
background: linear-gradient(to left, ${
|
|
983
|
+
background: linear-gradient(to left, ${Gi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1099
984
|
}
|
|
1100
985
|
|
|
1101
986
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1102
987
|
left: 0;
|
|
1103
988
|
right: 0;
|
|
1104
989
|
bottom: -1px;
|
|
1105
|
-
background: linear-gradient(to top, ${
|
|
990
|
+
background: linear-gradient(to top, ${Gi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1106
991
|
}
|
|
1107
992
|
|
|
1108
993
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1109
994
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1110
995
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1111
996
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1112
|
-
background-color: ${
|
|
997
|
+
background-color: ${Gi.colorSurface};
|
|
1113
998
|
}
|
|
1114
|
-
`,
|
|
999
|
+
`,Ki([o.property({type:Boolean})],Xi.prototype,"horizontal",void 0),Ki([o.property({type:Boolean})],Xi.prototype,"hideScrollbar",void 0),Ki([o.property({type:Boolean})],Xi.prototype,"controls",void 0),Ki([o.property({type:Boolean})],Xi.prototype,"limitSize",void 0),Ki([o.state()],Xi.prototype,"elements",void 0),Ki([o.state()],Xi.prototype,"currentElement",void 0),Ki([o.state()],Xi.prototype,"withScroll",void 0),Ki([o.state()],Xi.prototype,"startReached",void 0),Ki([o.state()],Xi.prototype,"endReached",void 0),Ki([o.query(".ft-snap-scroll--content")],Xi.prototype,"contentSlot",void 0),i.customElement("ft-snap-scroll")(Xi);var Yi=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};const Ji={colorOutline:i.FtCssVariable.external(i.designSystemVariables.colorOutline,"Design system"),colorOnSurface:i.FtCssVariable.external(i.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariable.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorPrimary:i.FtCssVariable.external(i.designSystemVariables.colorPrimary,"Design system"),colorSurface:i.FtCssVariable.external(i.designSystemVariables.colorSurface,"Design system"),transitionDuration:i.FtCssVariable.external(i.designSystemVariables.transitionDuration,"Design system"),transitionTimingFunction:i.FtCssVariable.external(i.designSystemVariables.transitionTimingFunction,"Design system")};class Qi extends CustomEvent{constructor(t){super("change",{detail:t})}}class te extends i.FtLitElement{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new i.Debouncer(300),this.changeDebouncer=new i.Debouncer(10)}get flatOptions(){return ei(this.options,(t=>{var i;return null!==(i=t.subOptions)&&void 0!==i?i:[]}))}render(){var t,i;const o=this.flatOptions.some((t=>t.selected));let s=this.withScroll||this.filter||null!==(i=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==i&&i;return e.html`
|
|
1115
1000
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1116
1001
|
part="container">
|
|
1117
|
-
${this.label||
|
|
1002
|
+
${this.label||o?e.html`
|
|
1118
1003
|
<div class="ft-filter--header" part="header">
|
|
1119
1004
|
<ft-typography class="ft-filter--label" variant="overline" part="label">${this.label}
|
|
1120
1005
|
</ft-typography>
|
|
1121
|
-
${
|
|
1006
|
+
${o?e.html`
|
|
1122
1007
|
<ft-button icon="close" dense @click=${this.clear} part="clear-button">
|
|
1123
1008
|
${this.clearButtonLabel}
|
|
1124
1009
|
</ft-button>
|
|
1125
1010
|
`:null}
|
|
1126
1011
|
</div>
|
|
1127
1012
|
`:null}
|
|
1128
|
-
<div class="ft-filter--filter" ?hidden=${!
|
|
1013
|
+
<div class="ft-filter--filter" ?hidden=${!s}>
|
|
1129
1014
|
<input type="search"
|
|
1130
1015
|
part="input"
|
|
1131
1016
|
class="ft-typography--caption"
|
|
1132
|
-
?disabled=${!
|
|
1017
|
+
?disabled=${!s}
|
|
1133
1018
|
placeholder="${this.filterPlaceHolder.replace("{0}",this.label)}"
|
|
1134
1019
|
@keyup=${this.onFilterChange}>
|
|
1135
1020
|
</div>
|
|
@@ -1140,14 +1025,14 @@ const fi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1140
1025
|
@slotchange=${this.updateOptionsFromSlot}
|
|
1141
1026
|
@option-change=${this.optionsChanged}></slot>
|
|
1142
1027
|
</div>
|
|
1143
|
-
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((
|
|
1144
|
-
${this.raiseSelectedOptions&&
|
|
1028
|
+
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((i=>t.has(i)))}}contentAvailableCallback(t){var i,e;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(i=this.levelsContainer)||void 0===i||i.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(e=this.levelsContainer)||void 0===e||e.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,i=t.filter((t=>t.selected)),o=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,s=o<0?"ft-filter--level-center":"ft-filter--level-left";return e.html`
|
|
1029
|
+
${this.raiseSelectedOptions&&i.length>0?e.html`
|
|
1145
1030
|
<ft-filter-level
|
|
1146
1031
|
id="${this.id}"
|
|
1147
1032
|
?multivalued=${this.multivalued}
|
|
1148
1033
|
?disabled=${this.disabled}
|
|
1149
1034
|
preventNavigation
|
|
1150
|
-
.options=${
|
|
1035
|
+
.options=${i}
|
|
1151
1036
|
@change=${this.onChange}
|
|
1152
1037
|
part="selected-values"
|
|
1153
1038
|
></ft-filter-level>
|
|
@@ -1156,10 +1041,10 @@ const fi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1156
1041
|
<ft-snap-scroll horizontal hideScrollbar
|
|
1157
1042
|
class="ft-filter--levels"
|
|
1158
1043
|
@current-element-change=${t=>this.levelsScrollDebouncer.run((()=>{for(;t.detail.index<this.displayedLevels.length;)this.displayedLevels.pop();this.requestUpdate()}))}>
|
|
1159
|
-
${this.renderLevel(
|
|
1160
|
-
${this.displayedLevels.map((
|
|
1044
|
+
${this.renderLevel(s,this.options)}
|
|
1045
|
+
${this.displayedLevels.map((i=>t.find((t=>t.value===i)))).map(((t,i)=>{var e;const s=(null==t?void 0:t.value)===this.slideIn||(null==t?void 0:t.value)===this.slideOut?"ft-filter--level-right":i===o?"ft-filter--level-center":"ft-filter--level-left";return this.renderLevel(s,null!==(e=null==t?void 0:t.subOptions)&&void 0!==e?e:[],t)}))}
|
|
1161
1046
|
</ft-snap-scroll>
|
|
1162
|
-
`}renderLevel(t,
|
|
1047
|
+
`}renderLevel(t,i,o){return e.html`
|
|
1163
1048
|
<ft-filter-level
|
|
1164
1049
|
class="${t}"
|
|
1165
1050
|
id="${this.id}"
|
|
@@ -1168,15 +1053,15 @@ const fi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1168
1053
|
?multivalued=${this.multivalued}
|
|
1169
1054
|
?disabled=${this.disabled||"ft-filter--level-center"!==t}
|
|
1170
1055
|
?hideSelectedOptions=${this.raiseSelectedOptions}
|
|
1171
|
-
.parent=${
|
|
1172
|
-
.options=${
|
|
1056
|
+
.parent=${o}
|
|
1057
|
+
.options=${i}
|
|
1173
1058
|
.displayedValuesLimit=${this.displayedValuesLimit}
|
|
1174
1059
|
@change=${this.onChange}
|
|
1175
1060
|
@go-back=${this.goBack}
|
|
1176
1061
|
@display-level=${this.onDisplayLevel}
|
|
1177
1062
|
part="values"
|
|
1178
1063
|
></ft-filter-level>
|
|
1179
|
-
`}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
|
|
1064
|
+
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var i;t.stopPropagation();const e=this.flatOptions.find((i=>i.value===t.detail.value));e.selected=!e.selected;const o=t=>{var i;t!==e&&(t.selected=!1),null===(i=t.subOptions)||void 0===i||i.forEach(o)};this.multivalued?null===(i=e.subOptions)||void 0===i||i.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;const i=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new Qi(i)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(t){const i=t.composedPath()[0];this.filter=i.value}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}te.elementDefinitions={"ft-button":Ci,"ft-filter-level":Pi,"ft-snap-scroll":Xi,"ft-typography":ii},te.styles=[Yt,e.css`
|
|
1180
1065
|
:host {
|
|
1181
1066
|
display: flex;
|
|
1182
1067
|
max-height: 100%;
|
|
@@ -1189,8 +1074,8 @@ const fi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1189
1074
|
flex-direction: column;
|
|
1190
1075
|
max-height: 100%;
|
|
1191
1076
|
max-width: 100%;
|
|
1192
|
-
color: ${
|
|
1193
|
-
background: ${
|
|
1077
|
+
color: ${Ji.colorOnSurface};
|
|
1078
|
+
background: ${Ji.colorSurface};
|
|
1194
1079
|
}
|
|
1195
1080
|
|
|
1196
1081
|
.ft-filter--header {
|
|
@@ -1200,13 +1085,13 @@ const fi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1200
1085
|
flex-shrink: 0;
|
|
1201
1086
|
padding: 0 10px;
|
|
1202
1087
|
margin-bottom: 8px;
|
|
1203
|
-
${
|
|
1088
|
+
${i.setVariable(G.fontSize,"14px")};
|
|
1204
1089
|
}
|
|
1205
1090
|
|
|
1206
1091
|
.ft-filter--header ft-button {
|
|
1207
1092
|
flex-shrink: 0;
|
|
1208
1093
|
margin-left: auto;
|
|
1209
|
-
${
|
|
1094
|
+
${i.setVariable(wi.iconSize,"18px")};
|
|
1210
1095
|
}
|
|
1211
1096
|
|
|
1212
1097
|
.ft-filter--label {
|
|
@@ -1214,8 +1099,8 @@ const fi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1214
1099
|
flex-shrink: 1;
|
|
1215
1100
|
flex-grow: 1;
|
|
1216
1101
|
word-break: break-word;
|
|
1217
|
-
${
|
|
1218
|
-
${
|
|
1102
|
+
${i.setVariable(G.lineHeight,"22px")};
|
|
1103
|
+
${i.setVariable(G.fontWeight,"bold")};
|
|
1219
1104
|
}
|
|
1220
1105
|
|
|
1221
1106
|
.ft-filter--filter {
|
|
@@ -1226,8 +1111,8 @@ const fi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1226
1111
|
padding: 0 10px;
|
|
1227
1112
|
overflow: hidden;
|
|
1228
1113
|
height: 32px;
|
|
1229
|
-
transition: height ${
|
|
1230
|
-
margin ${
|
|
1114
|
+
transition: height ${Ji.transitionDuration} ${Ji.transitionTimingFunction},
|
|
1115
|
+
margin ${Ji.transitionDuration} ${Ji.transitionTimingFunction};
|
|
1231
1116
|
transition-delay: 500ms;
|
|
1232
1117
|
}
|
|
1233
1118
|
|
|
@@ -1240,11 +1125,11 @@ const fi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1240
1125
|
display: block;
|
|
1241
1126
|
width: 100%;
|
|
1242
1127
|
border-radius: 4px;
|
|
1243
|
-
border: 1px solid ${
|
|
1128
|
+
border: 1px solid ${Ji.colorOutline};
|
|
1244
1129
|
padding: 4px;
|
|
1245
|
-
background-color: ${
|
|
1246
|
-
color: ${
|
|
1247
|
-
outline-color: ${
|
|
1130
|
+
background-color: ${Ji.colorSurface};
|
|
1131
|
+
color: ${Ji.colorOnSurfaceMedium};
|
|
1132
|
+
outline-color: ${Ji.colorPrimary};
|
|
1248
1133
|
}
|
|
1249
1134
|
|
|
1250
1135
|
.ft-filter--values {
|
|
@@ -1256,7 +1141,7 @@ const fi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1256
1141
|
}
|
|
1257
1142
|
|
|
1258
1143
|
.ft-filter--separator {
|
|
1259
|
-
border-top: 1px solid ${
|
|
1144
|
+
border-top: 1px solid ${Ji.colorOutline};
|
|
1260
1145
|
margin: 4px 10px;
|
|
1261
1146
|
}
|
|
1262
1147
|
|
|
@@ -1281,6 +1166,6 @@ const fi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1281
1166
|
slot {
|
|
1282
1167
|
display: none;
|
|
1283
1168
|
}
|
|
1284
|
-
`],
|
|
1169
|
+
`],Yi([o.property({type:String})],te.prototype,"id",void 0),Yi([o.property({type:String})],te.prototype,"label",void 0),Yi([o.property({type:String})],te.prototype,"filterPlaceHolder",void 0),Yi([o.property({type:String})],te.prototype,"clearButtonLabel",void 0),Yi([o.property({type:String})],te.prototype,"moreValuesButtonLabel",void 0),Yi([i.jsonProperty([])],te.prototype,"options",void 0),Yi([o.property({type:Boolean})],te.prototype,"multivalued",void 0),Yi([o.property({type:Boolean})],te.prototype,"disabled",void 0),Yi([o.property({type:Boolean})],te.prototype,"raiseSelectedOptions",void 0),Yi([o.property({type:Number})],te.prototype,"displayedValuesLimit",void 0),Yi([o.query(".ft-filter--slot")],te.prototype,"slotElement",void 0),Yi([o.query(".ft-filter--container")],te.prototype,"container",void 0),Yi([o.query(".ft-filter--values")],te.prototype,"valuesContainer",void 0),Yi([o.query(".ft-filter--levels")],te.prototype,"levelsContainer",void 0),Yi([o.query(".ft-filter--levels ft-filter-level:last-child")],te.prototype,"lastLevel",void 0),Yi([o.queryAll(".ft-filter--levels ft-filter-level")],te.prototype,"levels",void 0),Yi([o.state()],te.prototype,"withScroll",void 0),Yi([o.state()],te.prototype,"filter",void 0),Yi([o.state()],te.prototype,"slideIn",void 0),Yi([o.state()],te.prototype,"slideOut",void 0);var ie=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class ee extends i.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return e.html`
|
|
1285
1170
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1286
|
-
`}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}))}}
|
|
1171
|
+
`}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={},ie([o.property({type:String})],ee.prototype,"label",void 0),ie([o.property({type:Object,converter:t=>t})],ee.prototype,"value",void 0),ie([o.property({type:Boolean,reflect:!0})],ee.prototype,"selected",void 0),ie([o.property({type:Object})],ee.prototype,"subOptions",void 0),ie([o.query(".ft-filter-option--slot")],ee.prototype,"slotElement",void 0),i.customElement("ft-filter")(te),i.customElement("ft-filter-option")(ee),t.FtFilter=te,t.FtFilterChangeEvent=Qi,t.FtFilterCssVariables=Ji,t.FtFilterOption=ee,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|