@fluid-topics/ft-filter 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-filter.light.js +1212 -0
- package/build/ft-filter.min.js +690 -13
- package/package.json +7 -7
|
@@ -0,0 +1,1212 @@
|
|
|
1
|
+
!function(t,e,i,r,o,c,a){
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2017 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
var n;const s=globalThis.trustedTypes,d=s?s.createPolicy("lit-html",{createHTML:t=>t}):void 0,l=`lit$${(Math.random()+"").slice(9)}$`,p="?"+l,h=`<${p}>`,m=document,u=(t="")=>m.createComment(t),f=t=>null===t||"object"!=typeof t&&"function"!=typeof t,b=Array.isArray,g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,y=/>/g,k=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,x=/'/g,_=/"/g,w=/^(?:script|style|textarea|title)$/i,$=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),z=Symbol.for("lit-noChange"),S=Symbol.for("lit-nothing"),O=new WeakMap,T=m.createTreeWalker(m,129,null,!1),A=(t,e)=>{const i=t.length-1,r=[];let o,c=2===e?"<svg>":"",a=g;for(let e=0;e<i;e++){const i=t[e];let n,s,d=-1,p=0;for(;p<i.length&&(a.lastIndex=p,s=a.exec(i),null!==s);)p=a.lastIndex,a===g?"!--"===s[1]?a=v:void 0!==s[1]?a=y:void 0!==s[2]?(w.test(s[2])&&(o=RegExp("</"+s[2],"g")),a=k):void 0!==s[3]&&(a=k):a===k?">"===s[0]?(a=null!=o?o:g,d=-1):void 0===s[1]?d=-2:(d=a.lastIndex-s[2].length,n=s[1],a=void 0===s[3]?k:'"'===s[3]?_:x):a===_||a===x?a=k:a===v||a===y?a=g:(a=k,o=void 0);const m=a===k&&t[e+1].startsWith("/>")?" ":"";c+=a===g?i+h:d>=0?(r.push(n),i.slice(0,d)+"$lit$"+i.slice(d)+l+m):i+l+(-2===d?(r.push(void 0),e):m)}const n=c+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==d?d.createHTML(n):n,r]};class C{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let o=0,c=0;const a=t.length-1,n=this.parts,[d,h]=A(t,e);if(this.el=C.createElement(d,i),T.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=T.nextNode())&&n.length<a;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const e of r.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(l)){const i=h[c++];if(t.push(e),void 0!==i){const t=r.getAttribute(i.toLowerCase()+"$lit$").split(l),e=/([.?@])?(.*)/.exec(i);n.push({type:1,index:o,name:e[2],strings:t,ctor:"."===e[1]?D:"?"===e[1]?j:"@"===e[1]?M:F})}else n.push({type:6,index:o})}for(const e of t)r.removeAttribute(e)}if(w.test(r.tagName)){const t=r.textContent.split(l),e=t.length-1;if(e>0){r.textContent=s?s.emptyScript:"";for(let i=0;i<e;i++)r.append(t[i],u()),T.nextNode(),n.push({type:2,index:++o});r.append(t[e],u())}}}else if(8===r.nodeType)if(r.data===p)n.push({type:2,index:o});else{let t=-1;for(;-1!==(t=r.data.indexOf(l,t+1));)n.push({type:7,index:o}),t+=l.length-1}o++}}static createElement(t,e){const i=m.createElement("template");return i.innerHTML=t,i}}function B(t,e,i=t,r){var o,c,a,n;if(e===z)return e;let s=void 0!==r?null===(o=i._$Cl)||void 0===o?void 0:o[r]:i._$Cu;const d=f(e)?void 0:e._$litDirective$;return(null==s?void 0:s.constructor)!==d&&(null===(c=null==s?void 0:s._$AO)||void 0===c||c.call(s,!1),void 0===d?s=void 0:(s=new d(t),s._$AT(t,i,r)),void 0!==r?(null!==(a=(n=i)._$Cl)&&void 0!==a?a:n._$Cl=[])[r]=s:i._$Cu=s),void 0!==s&&(e=B(t,s._$AS(t,e.values),s,r)),e}class R{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:r}=this._$AD,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:m).importNode(i,!0);T.currentNode=o;let c=T.nextNode(),a=0,n=0,s=r[0];for(;void 0!==s;){if(a===s.index){let e;2===s.type?e=new E(c,c.nextSibling,this,t):1===s.type?e=new s.ctor(c,s.name,s.strings,this,t):6===s.type&&(e=new L(c,this,t)),this.v.push(e),s=r[++n]}a!==(null==s?void 0:s.index)&&(c=T.nextNode(),a++)}return o}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class E{constructor(t,e,i,r){var o;this.type=2,this._$AH=S,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cg=null===(o=null==r?void 0:r.isConnected)||void 0===o||o}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=B(this,t,e),f(t)?t===S||null==t||""===t?(this._$AH!==S&&this._$AR(),this._$AH=S):t!==this._$AH&&t!==z&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var e;return b(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==S&&f(this._$AH)?this._$AA.nextSibling.data=t:this.S(m.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:r}=t,o="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=C.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.m(i);else{const t=new R(o,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=O.get(t.strings);return void 0===e&&O.set(t.strings,e=new C(t)),e}A(t){b(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const o of t)r===e.length?e.push(i=new E(this.M(u()),this.M(u()),this,this.options)):i=e[r],i._$AI(o),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class F{constructor(t,e,i,r,o){this.type=1,this._$AH=S,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=S}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,r){const o=this.strings;let c=!1;if(void 0===o)t=B(this,t,e,0),c=!f(t)||t!==this._$AH&&t!==z,c&&(this._$AH=t);else{const r=t;let a,n;for(t=o[0],a=0;a<o.length-1;a++)n=B(this,r[i+a],e,a),n===z&&(n=this._$AH[a]),c||(c=!f(n)||n!==this._$AH[a]),n===S?t=S:t!==S&&(t+=(null!=n?n:"")+o[a+1]),this._$AH[a]=n}c&&!r&&this.k(t)}k(t){t===S?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class D extends F{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===S?void 0:t}}const I=s?s.emptyScript:"";class j extends F{constructor(){super(...arguments),this.type=4}k(t){t&&t!==S?this.element.setAttribute(this.name,I):this.element.removeAttribute(this.name)}}class M extends F{constructor(t,e,i,r,o){super(t,e,i,r,o),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=B(this,t,e,0))&&void 0!==i?i:S)===z)return;const r=this._$AH,o=t===S&&r!==S||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,c=t!==S&&(r===S||o);o&&this.element.removeEventListener(this.name,this,r),c&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class L{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){B(this,t)}}const N=window.litHtmlPolyfillSupport;null==N||N(C,E),(null!==(n=globalThis.litHtmlVersions)&&void 0!==n?n:globalThis.litHtmlVersions=[]).push("2.1.3");
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
* Copyright 2020 Google LLC
|
|
11
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
+
*/
|
|
13
|
+
const H=t=>({_$litStatic$:t}),P=new Map,V=(t=>(e,...i)=>{var r;const o=i.length;let c,a;const n=[],s=[];let d,l=0,p=!1;for(;l<o;){for(d=e[l];l<o&&void 0!==(a=i[l],c=null===(r=a)||void 0===r?void 0:r._$litStatic$);)d+=c+e[++l],p=!0;s.push(a),n.push(d),l++}if(l===o&&n.push(e[o]),p){const t=n.join("$$lit$$");void 0===(e=P.get(t))&&(n.raw=n,P.set(t,e=n)),i=s}return t(e,...i)})($);var G,U=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};!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"}(G||(G={}));const W=r.FtCssVariable.extend("--ft-typography-font-family",r.designSystemVariables.titleFont),Z=r.FtCssVariable.extend("--ft-typography-font-family",r.designSystemVariables.contentFont),q={fontFamily:Z,fontSize:r.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:r.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:r.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:r.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:r.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},X=r.FtCssVariable.extend("--ft-typography-title-font-family",W),K=r.FtCssVariable.extend("--ft-typography-title-font-size",q.fontSize,"20px"),Y=r.FtCssVariable.extend("--ft-typography-title-font-weight",q.fontWeight,"normal"),J=r.FtCssVariable.extend("--ft-typography-title-letter-spacing",q.letterSpacing,"0.15px"),Q=r.FtCssVariable.extend("--ft-typography-title-line-height",q.lineHeight,"24px"),tt=r.FtCssVariable.extend("--ft-typography-title-text-transform",q.textTransform,"inherit"),et=r.FtCssVariable.extend("--ft-typography-title-dense-font-family",W),it=r.FtCssVariable.extend("--ft-typography-title-dense-font-size",q.fontSize,"14px"),rt=r.FtCssVariable.extend("--ft-typography-title-dense-font-weight",q.fontWeight,"normal"),ot=r.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",q.letterSpacing,"0.105px"),ct=r.FtCssVariable.extend("--ft-typography-title-dense-line-height",q.lineHeight,"24px"),at=r.FtCssVariable.extend("--ft-typography-title-dense-text-transform",q.textTransform,"inherit"),nt=r.FtCssVariable.extend("--ft-typography-subtitle1-font-family",Z),st=r.FtCssVariable.extend("--ft-typography-subtitle1-font-size",q.fontSize,"16px"),dt=r.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",q.fontWeight,"600"),lt=r.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",q.letterSpacing,"0.144px"),pt=r.FtCssVariable.extend("--ft-typography-subtitle1-line-height",q.lineHeight,"24px"),ht=r.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",q.textTransform,"inherit"),mt=r.FtCssVariable.extend("--ft-typography-subtitle2-font-family",Z),ut=r.FtCssVariable.extend("--ft-typography-subtitle2-font-size",q.fontSize,"14px"),ft=r.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",q.fontWeight,"normal"),bt=r.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",q.letterSpacing,"0.098px"),gt=r.FtCssVariable.extend("--ft-typography-subtitle2-line-height",q.lineHeight,"24px"),vt=r.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",q.textTransform,"inherit"),yt=r.FtCssVariable.extend("--ft-typography-body1-font-family",Z),kt=r.FtCssVariable.extend("--ft-typography-body1-font-size",q.fontSize,"16px"),xt=r.FtCssVariable.extend("--ft-typography-body1-font-weight",q.fontWeight,"normal"),_t=r.FtCssVariable.extend("--ft-typography-body1-letter-spacing",q.letterSpacing,"0.496px"),wt=r.FtCssVariable.extend("--ft-typography-body1-line-height",q.lineHeight,"24px"),$t=r.FtCssVariable.extend("--ft-typography-body1-text-transform",q.textTransform,"inherit"),zt={fontFamily:r.FtCssVariable.extend("--ft-typography-body2-font-family",Z),fontSize:r.FtCssVariable.extend("--ft-typography-body2-font-size",q.fontSize,"14px"),fontWeight:r.FtCssVariable.extend("--ft-typography-body2-font-weight",q.fontWeight,"normal"),letterSpacing:r.FtCssVariable.extend("--ft-typography-body2-letter-spacing",q.letterSpacing,"0.252px"),lineHeight:r.FtCssVariable.extend("--ft-typography-body2-line-height",q.lineHeight,"20px"),textTransform:r.FtCssVariable.extend("--ft-typography-body2-text-transform",q.textTransform,"inherit")},St=r.FtCssVariable.extend("--ft-typography-caption-font-family",Z),Ot=r.FtCssVariable.extend("--ft-typography-caption-font-size",q.fontSize,"12px"),Tt=r.FtCssVariable.extend("--ft-typography-caption-font-weight",q.fontWeight,"normal"),At=r.FtCssVariable.extend("--ft-typography-caption-letter-spacing",q.letterSpacing,"0.396px"),Ct=r.FtCssVariable.extend("--ft-typography-caption-line-height",q.lineHeight,"16px"),Bt=r.FtCssVariable.extend("--ft-typography-caption-text-transform",q.textTransform,"inherit"),Rt=r.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",Z),Et=r.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",q.fontSize,"10px"),Ft=r.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",q.fontWeight,"normal"),Dt=r.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",q.letterSpacing,"0.33px"),It=r.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",q.lineHeight,"16px"),jt=r.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",q.textTransform,"inherit"),Mt=r.FtCssVariable.extend("--ft-typography-overline-font-family",Z),Lt=r.FtCssVariable.extend("--ft-typography-overline-font-size",q.fontSize,"10px"),Nt=r.FtCssVariable.extend("--ft-typography-overline-font-weight",q.fontWeight,"normal"),Ht=r.FtCssVariable.extend("--ft-typography-overline-letter-spacing",q.letterSpacing,"1.5px"),Pt=r.FtCssVariable.extend("--ft-typography-overline-line-height",q.lineHeight,"16px"),Vt=r.FtCssVariable.extend("--ft-typography-overline-text-transform",q.textTransform,"uppercase"),Gt={fontFamily:r.FtCssVariable.extend("--ft-typography-button-font-family",Z),fontSize:r.FtCssVariable.extend("--ft-typography-button-font-size",q.fontSize,"14px"),fontWeight:r.FtCssVariable.extend("--ft-typography-button-font-weight",q.fontWeight,"600"),letterSpacing:r.FtCssVariable.extend("--ft-typography-button-letter-spacing",q.letterSpacing,"1.246px"),lineHeight:r.FtCssVariable.extend("--ft-typography-button-line-height",q.lineHeight,"16px"),textTransform:r.FtCssVariable.extend("--ft-typography-button-text-transform",q.textTransform,"uppercase")},Ut=e.css`
|
|
14
|
+
.ft-typography--title {
|
|
15
|
+
font-family: ${X};
|
|
16
|
+
font-size: ${K};
|
|
17
|
+
font-weight: ${Y};
|
|
18
|
+
letter-spacing: ${J};
|
|
19
|
+
line-height: ${Q};
|
|
20
|
+
text-transform: ${tt};
|
|
21
|
+
}
|
|
22
|
+
`,Wt=e.css`
|
|
23
|
+
.ft-typography--title-dense {
|
|
24
|
+
font-family: ${et};
|
|
25
|
+
font-size: ${it};
|
|
26
|
+
font-weight: ${rt};
|
|
27
|
+
letter-spacing: ${ot};
|
|
28
|
+
line-height: ${ct};
|
|
29
|
+
text-transform: ${at};
|
|
30
|
+
}
|
|
31
|
+
`,Zt=e.css`
|
|
32
|
+
.ft-typography--subtitle1 {
|
|
33
|
+
font-family: ${nt};
|
|
34
|
+
font-size: ${st};
|
|
35
|
+
font-weight: ${dt};
|
|
36
|
+
letter-spacing: ${lt};
|
|
37
|
+
line-height: ${pt};
|
|
38
|
+
text-transform: ${ht};
|
|
39
|
+
}
|
|
40
|
+
`,qt=e.css`
|
|
41
|
+
.ft-typography--subtitle2 {
|
|
42
|
+
font-family: ${mt};
|
|
43
|
+
font-size: ${ut};
|
|
44
|
+
font-weight: ${ft};
|
|
45
|
+
letter-spacing: ${bt};
|
|
46
|
+
line-height: ${gt};
|
|
47
|
+
text-transform: ${vt};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
`,Xt=e.css`
|
|
51
|
+
.ft-typography--body1 {
|
|
52
|
+
font-family: ${yt};
|
|
53
|
+
font-size: ${kt};
|
|
54
|
+
font-weight: ${xt};
|
|
55
|
+
letter-spacing: ${_t};
|
|
56
|
+
line-height: ${wt};
|
|
57
|
+
text-transform: ${$t};
|
|
58
|
+
}
|
|
59
|
+
`,Kt=e.css`
|
|
60
|
+
.ft-typography--body2 {
|
|
61
|
+
font-family: ${zt.fontFamily};
|
|
62
|
+
font-size: ${zt.fontSize};
|
|
63
|
+
font-weight: ${zt.fontWeight};
|
|
64
|
+
letter-spacing: ${zt.letterSpacing};
|
|
65
|
+
line-height: ${zt.lineHeight};
|
|
66
|
+
text-transform: ${zt.textTransform};
|
|
67
|
+
}
|
|
68
|
+
`,Yt=e.css`
|
|
69
|
+
.ft-typography--caption {
|
|
70
|
+
font-family: ${St};
|
|
71
|
+
font-size: ${Ot};
|
|
72
|
+
font-weight: ${Tt};
|
|
73
|
+
letter-spacing: ${At};
|
|
74
|
+
line-height: ${Ct};
|
|
75
|
+
text-transform: ${Bt};
|
|
76
|
+
}
|
|
77
|
+
`,Jt=e.css`
|
|
78
|
+
.ft-typography--breadcrumb {
|
|
79
|
+
font-family: ${Rt};
|
|
80
|
+
font-size: ${Et};
|
|
81
|
+
font-weight: ${Ft};
|
|
82
|
+
letter-spacing: ${Dt};
|
|
83
|
+
line-height: ${It};
|
|
84
|
+
text-transform: ${jt};
|
|
85
|
+
}
|
|
86
|
+
`,Qt=e.css`
|
|
87
|
+
.ft-typography--overline {
|
|
88
|
+
font-family: ${Mt};
|
|
89
|
+
font-size: ${Lt};
|
|
90
|
+
font-weight: ${Nt};
|
|
91
|
+
letter-spacing: ${Ht};
|
|
92
|
+
line-height: ${Pt};
|
|
93
|
+
text-transform: ${Vt};
|
|
94
|
+
}
|
|
95
|
+
`,te=e.css`
|
|
96
|
+
.ft-typography--button {
|
|
97
|
+
font-family: ${Gt.fontFamily};
|
|
98
|
+
font-size: ${Gt.fontSize};
|
|
99
|
+
font-weight: ${Gt.fontWeight};
|
|
100
|
+
letter-spacing: ${Gt.letterSpacing};
|
|
101
|
+
line-height: ${Gt.lineHeight};
|
|
102
|
+
text-transform: ${Gt.textTransform};
|
|
103
|
+
}
|
|
104
|
+
`;let ee=class extends r.FtLitElement{constructor(){super(...arguments),this.variant=G.body1}getStyles(){return[Ut,Wt,Zt,qt,Xt,Kt,Yt,Jt,Qt,te]}getTemplate(){return this.element?V`
|
|
105
|
+
<${H(this.element)}
|
|
106
|
+
class="ft-typography ft-typography--${this.variant}">
|
|
107
|
+
<slot></slot>
|
|
108
|
+
</${H(this.element)}>
|
|
109
|
+
`:V`
|
|
110
|
+
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
111
|
+
`}};function ie(t,e){return t.flatMap((t=>[t,...ie(e(t),e)]))}
|
|
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
|
+
***************************************************************************** */U([i.property()],ee.prototype,"element",void 0),U([i.property()],ee.prototype,"variant",void 0),ee=U([r.customElement("ft-typography")],ee);var re=function(t,e){return re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},re(t,e)};function oe(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}re(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var ce=function(){return ce=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ce.apply(this,arguments)};function ae(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}function ne(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],r=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}
|
|
126
|
+
/**
|
|
127
|
+
* @license
|
|
128
|
+
* Copyright 2018 Google Inc.
|
|
129
|
+
*
|
|
130
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
131
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
132
|
+
* in the Software without restriction, including without limitation the rights
|
|
133
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
134
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
135
|
+
* furnished to do so, subject to the following conditions:
|
|
136
|
+
*
|
|
137
|
+
* The above copyright notice and this permission notice shall be included in
|
|
138
|
+
* all copies or substantial portions of the Software.
|
|
139
|
+
*
|
|
140
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
141
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
142
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
143
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
144
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
145
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
146
|
+
* THE SOFTWARE.
|
|
147
|
+
*/const se=()=>{},de={get passive(){return!1}};document.addEventListener("x",se,de),document.removeEventListener("x",se);
|
|
148
|
+
/**
|
|
149
|
+
* @license
|
|
150
|
+
* Copyright 2018 Google LLC
|
|
151
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
152
|
+
*/
|
|
153
|
+
class le extends e.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()}}
|
|
154
|
+
/**
|
|
155
|
+
* @license
|
|
156
|
+
* Copyright 2016 Google Inc.
|
|
157
|
+
*
|
|
158
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
159
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
160
|
+
* in the Software without restriction, including without limitation the rights
|
|
161
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
162
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
163
|
+
* furnished to do so, subject to the following conditions:
|
|
164
|
+
*
|
|
165
|
+
* The above copyright notice and this permission notice shall be included in
|
|
166
|
+
* all copies or substantial portions of the Software.
|
|
167
|
+
*
|
|
168
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
169
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
170
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
171
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
172
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
173
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
174
|
+
* THE SOFTWARE.
|
|
175
|
+
*/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"},ue={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};
|
|
176
|
+
/**
|
|
177
|
+
* @license
|
|
178
|
+
* Copyright 2016 Google Inc.
|
|
179
|
+
*
|
|
180
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
181
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
182
|
+
* in the Software without restriction, including without limitation the rights
|
|
183
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
184
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
185
|
+
* furnished to do so, subject to the following conditions:
|
|
186
|
+
*
|
|
187
|
+
* The above copyright notice and this permission notice shall be included in
|
|
188
|
+
* all copies or substantial portions of the Software.
|
|
189
|
+
*
|
|
190
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
191
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
192
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
193
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
194
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
195
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
196
|
+
* THE SOFTWARE.
|
|
197
|
+
*/
|
|
198
|
+
/**
|
|
199
|
+
* @license
|
|
200
|
+
* Copyright 2016 Google Inc.
|
|
201
|
+
*
|
|
202
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
203
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
204
|
+
* in the Software without restriction, including without limitation the rights
|
|
205
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
206
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
207
|
+
* furnished to do so, subject to the following conditions:
|
|
208
|
+
*
|
|
209
|
+
* The above copyright notice and this permission notice shall be included in
|
|
210
|
+
* all copies or substantial portions of the Software.
|
|
211
|
+
*
|
|
212
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
213
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
214
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
215
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
216
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
217
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
218
|
+
* THE SOFTWARE.
|
|
219
|
+
*/
|
|
220
|
+
var fe=["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 ue},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(fe),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(fe),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)}),ue.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;
|
|
221
|
+
/**
|
|
222
|
+
* @license
|
|
223
|
+
* Copyright 2018 Google LLC
|
|
224
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
225
|
+
*/
|
|
226
|
+
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;
|
|
227
|
+
/**
|
|
228
|
+
* @license
|
|
229
|
+
* Copyright 2018 Google LLC
|
|
230
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
231
|
+
*/}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),i=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":i,"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 e.html`
|
|
232
|
+
<div class="mdc-ripple-surface mdc-ripple-upgraded ${c.classMap(r)}"
|
|
233
|
+
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([i.query(".mdc-ripple-surface")],ke.prototype,"mdcRoot",void 0),ae([i.property({type:Boolean})],ke.prototype,"primary",void 0),ae([i.property({type:Boolean})],ke.prototype,"accent",void 0),ae([i.property({type:Boolean})],ke.prototype,"unbounded",void 0),ae([i.property({type:Boolean})],ke.prototype,"disabled",void 0),ae([i.property({type:Boolean})],ke.prototype,"activated",void 0),ae([i.property({type:Boolean})],ke.prototype,"selected",void 0),ae([i.property({type:Boolean})],ke.prototype,"internalUseStateLayerCustomProperties",void 0),ae([i.state()],ke.prototype,"hovering",void 0),ae([i.state()],ke.prototype,"bgFocused",void 0),ae([i.state()],ke.prototype,"fgActivation",void 0),ae([i.state()],ke.prototype,"fgDeactivation",void 0),ae([i.state()],ke.prototype,"fgScale",void 0),ae([i.state()],ke.prototype,"fgSize",void 0),ae([i.state()],ke.prototype,"translateStart",void 0),ae([i.state()],ke.prototype,"translateEnd",void 0),ae([i.state()],ke.prototype,"leftPos",void 0),ae([i.state()],ke.prototype,"topPos",void 0);
|
|
234
|
+
/**
|
|
235
|
+
* @license
|
|
236
|
+
* Copyright 2021 Google LLC
|
|
237
|
+
* SPDX-LIcense-Identifier: Apache-2.0
|
|
238
|
+
*/
|
|
239
|
+
const xe=e.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)}`
|
|
240
|
+
/**
|
|
241
|
+
* @license
|
|
242
|
+
* Copyright 2018 Google LLC
|
|
243
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
244
|
+
*/;let _e=class extends ke{};function we(t,e,i){if(void 0!==e)
|
|
245
|
+
/**
|
|
246
|
+
* @license
|
|
247
|
+
* Copyright 2021 Google LLC
|
|
248
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
249
|
+
*/
|
|
250
|
+
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")}
|
|
251
|
+
/**
|
|
252
|
+
* @license
|
|
253
|
+
* Copyright 2018 Google LLC
|
|
254
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
255
|
+
*/var $e,ze;_e.styles=[xe],_e=ae([i.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([i.property({type:Boolean})],Oe.prototype,"disabled",void 0);
|
|
256
|
+
/**
|
|
257
|
+
* @license
|
|
258
|
+
* Copyright 2020 Google LLC
|
|
259
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
260
|
+
*/
|
|
261
|
+
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()}))}}}
|
|
262
|
+
/**
|
|
263
|
+
* @license
|
|
264
|
+
* Copyright 2018 Google LLC
|
|
265
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
266
|
+
*/const Ae=t=>null!=t?t:S
|
|
267
|
+
/**
|
|
268
|
+
* @license
|
|
269
|
+
* Copyright 2019 Google LLC
|
|
270
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
271
|
+
*/;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 e.html`<mwc-ripple
|
|
272
|
+
.disabled="${this.disabled}"
|
|
273
|
+
unbounded></mwc-ripple>`}render(){const t=this.indeterminate||this.checked,i={"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 e.html`
|
|
274
|
+
<div class="mdc-checkbox mdc-checkbox--upgraded ${c.classMap(i)}">
|
|
275
|
+
<input type="checkbox"
|
|
276
|
+
class="mdc-checkbox__native-control"
|
|
277
|
+
name="${Ae(this.name)}"
|
|
278
|
+
aria-checked="${Ae(r)}"
|
|
279
|
+
aria-label="${Ae(this.ariaLabel)}"
|
|
280
|
+
aria-labelledby="${Ae(this.ariaLabelledBy)}"
|
|
281
|
+
aria-describedby="${Ae(this.ariaDescribedBy)}"
|
|
282
|
+
data-indeterminate="${this.indeterminate?"true":"false"}"
|
|
283
|
+
?disabled="${this.disabled}"
|
|
284
|
+
.indeterminate="${this.indeterminate}"
|
|
285
|
+
.checked="${this.checked}"
|
|
286
|
+
.value="${this.value}"
|
|
287
|
+
@change="${this.handleChange}"
|
|
288
|
+
@focus="${this.handleFocus}"
|
|
289
|
+
@blur="${this.handleBlur}"
|
|
290
|
+
@mousedown="${this.handleRippleMouseDown}"
|
|
291
|
+
@mouseenter="${this.handleRippleMouseEnter}"
|
|
292
|
+
@mouseleave="${this.handleRippleMouseLeave}"
|
|
293
|
+
@touchstart="${this.handleRippleTouchStart}"
|
|
294
|
+
@touchend="${this.handleRippleDeactivate}"
|
|
295
|
+
@touchcancel="${this.handleRippleDeactivate}">
|
|
296
|
+
<div class="mdc-checkbox__background"
|
|
297
|
+
@animationend="${this.resetAnimationClass}">
|
|
298
|
+
<svg class="mdc-checkbox__checkmark"
|
|
299
|
+
viewBox="0 0 24 24">
|
|
300
|
+
<path class="mdc-checkbox__checkmark-path"
|
|
301
|
+
fill="none"
|
|
302
|
+
d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
|
|
303
|
+
</svg>
|
|
304
|
+
<div class="mdc-checkbox__mixedmark"></div>
|
|
305
|
+
</div>
|
|
306
|
+
${this.renderRipple()}
|
|
307
|
+
</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([i.query(".mdc-checkbox")],Ce.prototype,"mdcRoot",void 0),ae([i.query("input")],Ce.prototype,"formElement",void 0),ae([i.property({type:Boolean,reflect:!0})],Ce.prototype,"checked",void 0),ae([i.property({type:Boolean})],Ce.prototype,"indeterminate",void 0),ae([i.property({type:Boolean,reflect:!0})],Ce.prototype,"disabled",void 0),ae([i.property({type:String,reflect:!0})],Ce.prototype,"name",void 0),ae([i.property({type:String})],Ce.prototype,"value",void 0),ae([we,i.property({type:String,attribute:"aria-label"})],Ce.prototype,"ariaLabel",void 0),ae([we,i.property({type:String,attribute:"aria-labelledby"})],Ce.prototype,"ariaLabelledBy",void 0),ae([we,i.property({type:String,attribute:"aria-describedby"})],Ce.prototype,"ariaDescribedBy",void 0),ae([i.property({type:Boolean})],Ce.prototype,"reducedTouchTarget",void 0),ae([i.state()],Ce.prototype,"animationClass",void 0),ae([i.state()],Ce.prototype,"shouldRenderRipple",void 0),ae([i.state()],Ce.prototype,"focused",void 0),ae([i.queryAsync("mwc-ripple")],Ce.prototype,"ripple",void 0),ae([i.eventOptions({passive:!0})],Ce.prototype,"handleRippleTouchStart",null);
|
|
308
|
+
/**
|
|
309
|
+
* @license
|
|
310
|
+
* Copyright 2021 Google LLC
|
|
311
|
+
* SPDX-LIcense-Identifier: Apache-2.0
|
|
312
|
+
*/
|
|
313
|
+
const Be=e.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}`
|
|
314
|
+
/**
|
|
315
|
+
* @license
|
|
316
|
+
* Copyright 2018 Google LLC
|
|
317
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
318
|
+
*/;let Re=class extends Ce{};Re.styles=[Be],Re=ae([i.customElement("mwc-checkbox")],Re);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:r.FtCssVariable.extend("--ft-ripple-color",r.designSystemVariables.colorContent),primaryColor:r.FtCssVariable.extend("--ft-ripple-primary-color",r.FtCssVariable.extend("--ft-ripple-color",r.designSystemVariables.colorPrimary)),secondaryColor:r.FtCssVariable.extend("--ft-ripple-secondary-color",r.FtCssVariable.extend("--ft-ripple-color",r.designSystemVariables.colorSecondary)),opacityContentOnSurfacePressed:r.FtCssVariable.external(r.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:r.FtCssVariable.external(r.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:r.FtCssVariable.external(r.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:r.FtCssVariable.external(r.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),opacityContentOnSurfaceDragged:r.FtCssVariable.external(r.designSystemVariables.opacityContentOnSurfaceDragged,"Design system")};let De=class extends r.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1}getStyles(){return e.css`
|
|
319
|
+
:host {
|
|
320
|
+
display: contents;
|
|
321
|
+
|
|
322
|
+
--mdc-ripple-color: ${Fe.color};
|
|
323
|
+
--mdc-ripple-press-opacity: ${Fe.opacityContentOnSurfacePressed};
|
|
324
|
+
--mdc-ripple-hover-opacity: ${Fe.opacityContentOnSurfaceHover};
|
|
325
|
+
--mdc-ripple-focus-opacity: ${Fe.opacityContentOnSurfaceFocused};
|
|
326
|
+
--mdc-ripple-selected-opacity: ${Fe.opacityContentOnSurfaceSelected};
|
|
327
|
+
--mdc-ripple-activated-opacity: ${Fe.opacityContentOnSurfaceDragged};
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
mwc-ripple.ft-ripple--secondary {
|
|
331
|
+
--mdc-ripple-color: ${Fe.secondaryColor};
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
mwc-ripple.ft-ripple--primary {
|
|
335
|
+
--mdc-ripple-color: ${Fe.primaryColor};
|
|
336
|
+
}
|
|
337
|
+
`}getTemplate(){return e.html`
|
|
338
|
+
<mwc-ripple
|
|
339
|
+
class="${this.primary?"ft-ripple--primary":this.secondary?"ft-ripple--secondary":""}"
|
|
340
|
+
?unbounded=${this.unbounded}
|
|
341
|
+
?activated=${this.activated}
|
|
342
|
+
?selected=${this.selected}
|
|
343
|
+
?disabled=${this.disabled}
|
|
344
|
+
></mwc-ripple>
|
|
345
|
+
`}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple()}endRipple(){var t,e,i;null===(t=this.rippleHandlers)||void 0===t||t.endHover(),null===(e=this.rippleHandlers)||void 0===e||e.endFocus(),null===(i=this.rippleHandlers)||void 0===i||i.endPress()}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentNode;if(e){const t=new Te((async()=>this.mwcRipple)),i=(...e)=>i=>{e.forEach((e=>window.addEventListener(e,t.endPress,{once:!0}))),t.startPress(i)},r=i("mouseup"),o=i("touchend","touchcancel"),c=t=>{["Enter"," "].includes(t.key)&&i("keyup")()};e.addEventListener("mouseenter",t.startHover),e.addEventListener("mouseleave",t.endHover),e.addEventListener("mousedown",r),e.addEventListener("touchstart",o),e.addEventListener("keydown",c),e.addEventListener("focus",t.startFocus),e.addEventListener("blur",t.endFocus),this.onDisconnect=()=>{e.removeEventListener("mouseenter",t.startHover),e.removeEventListener("mouseleave",t.endHover),e.removeEventListener("mousedown",r),e.removeEventListener("touchstart",o),e.removeEventListener("keydown",c),e.removeEventListener("focus",t.startFocus),e.removeEventListener("blur",t.endFocus)},this.rippleHandlers=t}}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};De.elementDefinitions={"mwc-ripple":_e},Ee([i.property({type:Boolean})],De.prototype,"primary",void 0),Ee([i.property({type:Boolean})],De.prototype,"secondary",void 0),Ee([i.property({type:Boolean})],De.prototype,"unbounded",void 0),Ee([i.property({type:Boolean})],De.prototype,"activated",void 0),Ee([i.property({type:Boolean})],De.prototype,"selected",void 0),Ee([i.property({type:Boolean})],De.prototype,"disabled",void 0),Ee([i.query("mwc-ripple")],De.prototype,"mwcRipple",void 0),De=Ee([r.customElement("ft-ripple")],De);
|
|
346
|
+
/**
|
|
347
|
+
* @license
|
|
348
|
+
* Copyright 2021 Google LLC
|
|
349
|
+
* SPDX-LIcense-Identifier: Apache-2.0
|
|
350
|
+
*/
|
|
351
|
+
const Ie=e.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"}`
|
|
352
|
+
/**
|
|
353
|
+
* @license
|
|
354
|
+
* Copyright 2018 Google LLC
|
|
355
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
356
|
+
*/;let je=class extends e.LitElement{render(){return e.html`<span><slot></slot></span>`}};je.styles=[Ie],je=ae([i.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=r.FtCssVariable.create("--ft-tooltip-distance","SIZE","4px"),Ne=r.FtCssVariable.create("--ft-tooltip-color","COLOR","#FFFFFF"),He=r.FtCssVariable.create("--ft-tooltip-background-color","COLOR","#666666"),Pe=r.FtCssVariable.create("--ft-tooltip-z-index","NUMBER","1"),Ve=r.FtCssVariable.external(r.designSystemVariables.borderRadiusS,"Design system");let Ge=class extends r.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new r.Debouncer,this.revealDebouncer=new r.Debouncer}getStyles(){return e.css`
|
|
357
|
+
.ft-tooltip--container {
|
|
358
|
+
display: block;
|
|
359
|
+
position: relative;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.ft-tooltip--inline {
|
|
363
|
+
display: inline-block;
|
|
364
|
+
max-width: 100%;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.ft-tooltip {
|
|
368
|
+
position: absolute;
|
|
369
|
+
box-sizing: border-box;
|
|
370
|
+
overflow: hidden;
|
|
371
|
+
width: max-content;
|
|
372
|
+
max-width: 150px;
|
|
373
|
+
text-align: center;
|
|
374
|
+
padding: ${Le};
|
|
375
|
+
z-index: ${Pe};
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.ft-tooltip--content {
|
|
379
|
+
padding: 4px 8px;
|
|
380
|
+
border-radius: ${Ve};
|
|
381
|
+
background-color: ${He};
|
|
382
|
+
color: ${Ne};
|
|
383
|
+
top: -500px;
|
|
384
|
+
left: -500px;
|
|
385
|
+
position: relative;
|
|
386
|
+
word-break: break-word;
|
|
387
|
+
}
|
|
388
|
+
`}getTemplate(){return e.html`
|
|
389
|
+
<div part="container"
|
|
390
|
+
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
391
|
+
@mouseenter=${this.onHover}
|
|
392
|
+
@mouseleave=${this.onOut}
|
|
393
|
+
@focusin=${this.onHover}
|
|
394
|
+
@focusout=${this.onOut}
|
|
395
|
+
@touchstart=${this.onTouch}>
|
|
396
|
+
<div part="tooltip" class="ft-tooltip ft-tooltip--${this.position}" ?hidden=${!this.visible}>
|
|
397
|
+
<div part="tooltip-content" class="ft-tooltip--content">
|
|
398
|
+
<ft-typography variant="caption">${this.text}</ft-typography>
|
|
399
|
+
</div>
|
|
400
|
+
</div>
|
|
401
|
+
<slot></slot>
|
|
402
|
+
</div>
|
|
403
|
+
`}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 e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,r=(e.width-this.tooltip.clientWidth)/2,o=this.tooltip.style;switch(this.position){case"top":o.top=-this.tooltip.clientHeight+"px",o.left=r+"px";break;case"bottom":o.top=e.height+"px",o.left=r+"px";break;case"left":o.top=i+"px",o.left=-this.tooltip.clientWidth+"px";break;case"right":o.top=i+"px",o.left=e.width+"px"}o.maxWidth=Math.max(e.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())}};Ge.elementDefinitions={"ft-typography":ee},Me([i.property()],Ge.prototype,"text",void 0),Me([i.property({type:Boolean})],Ge.prototype,"manual",void 0),Me([i.property({type:Boolean})],Ge.prototype,"inline",void 0),Me([i.property({type:Number})],Ge.prototype,"delay",void 0),Me([i.property()],Ge.prototype,"position",void 0),Me([i.queryAssignedNodes("",!0)],Ge.prototype,"slotNodes",void 0),Me([i.query(".ft-tooltip--container")],Ge.prototype,"container",void 0),Me([i.query("slot")],Ge.prototype,"target",void 0),Me([i.query(".ft-tooltip")],Ge.prototype,"tooltip",void 0),Me([i.query(".ft-tooltip--content")],Ge.prototype,"tooltipContent",void 0),Me([i.state()],Ge.prototype,"visible",void 0),Ge=Me([r.customElement("ft-tooltip")],Ge);var Ue=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 We={color:r.FtCssVariable.extend("--ft-loader-color",r.designSystemVariables.colorPrimary),size:r.FtCssVariable.create("--ft-loader-size","SIZE","80px")};let Ze=class extends r.FtLitElement{getStyles(){return e.css`
|
|
404
|
+
:host {
|
|
405
|
+
line-height: 0;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.ft-loader {
|
|
409
|
+
display: inline-block;
|
|
410
|
+
position: relative;
|
|
411
|
+
|
|
412
|
+
width: ${We.size};
|
|
413
|
+
height: ${We.size};
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.ft-loader div {
|
|
417
|
+
position: absolute;
|
|
418
|
+
top: 37.5%;
|
|
419
|
+
width: 25%;
|
|
420
|
+
height: 25%;
|
|
421
|
+
border-radius: 50%;
|
|
422
|
+
background: ${We.color};
|
|
423
|
+
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.ft-loader div:nth-child(1) {
|
|
427
|
+
left: 2.5%;
|
|
428
|
+
animation: appear 0.6s infinite;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.ft-loader div:nth-child(2) {
|
|
432
|
+
left: 2.5%;
|
|
433
|
+
animation: move 0.6s infinite;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.ft-loader div:nth-child(3) {
|
|
437
|
+
left: 37.5%;
|
|
438
|
+
animation: move 0.6s infinite;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.ft-loader div:nth-child(4) {
|
|
442
|
+
left: 72.5%;
|
|
443
|
+
animation: disappear 0.6s infinite;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
@keyframes appear {
|
|
447
|
+
0% {
|
|
448
|
+
transform: scale(0);
|
|
449
|
+
}
|
|
450
|
+
100% {
|
|
451
|
+
transform: scale(1);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
@keyframes disappear {
|
|
456
|
+
0% {
|
|
457
|
+
transform: scale(1);
|
|
458
|
+
}
|
|
459
|
+
100% {
|
|
460
|
+
transform: scale(0);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
@keyframes move {
|
|
465
|
+
0% {
|
|
466
|
+
transform: translate(0, 0);
|
|
467
|
+
}
|
|
468
|
+
100% {
|
|
469
|
+
transform: translate(calc(0.35 * ${We.size}), 0);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
`}getTemplate(){return e.html`
|
|
473
|
+
<div class="ft-loader">
|
|
474
|
+
<div></div>
|
|
475
|
+
<div></div>
|
|
476
|
+
<div></div>
|
|
477
|
+
<div></div>
|
|
478
|
+
</div>
|
|
479
|
+
`}};Ze=Ue([r.customElement("ft-loader")],Ze);var qe=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 Xe=r.FtCssVariable.extend("--ft-button-color",r.designSystemVariables.colorPrimary),Ke={backgroundColor:r.FtCssVariable.extend("--ft-button-background-color",r.designSystemVariables.colorSurface),borderRadius:r.FtCssVariable.extend("--ft-button-border-radius",r.designSystemVariables.borderRadiusL),color:Xe,fontSize:r.FtCssVariable.extend("--ft-button-font-size",Gt.fontSize),iconSize:r.FtCssVariable.create("--ft-button-icon-size","SIZE","24px"),rippleColor:r.FtCssVariable.extend("--ft-button-ripple-color",Xe),opacityDisabled:r.FtCssVariable.external(r.designSystemVariables.colorOpacityDisabled,"Design system")},Ye=r.FtCssVariable.extend("--ft-button-primary-color",r.FtCssVariable.extend("--ft-button-color",r.designSystemVariables.colorOnPrimary)),Je=r.FtCssVariable.extend("--ft-button-primary-background-color",r.FtCssVariable.extend("--ft-button-background-color",r.designSystemVariables.colorPrimary)),Qe=Ye,ti=(r.FtCssVariable.extend("--ft-button-primary-ripple-color",Ye),r.FtCssVariable.extend("--ft-button-dense-border-radius",r.FtCssVariable.extend("--ft-button-border-radius",r.designSystemVariables.borderRadiusM)));let ei=class extends r.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())}}getStyles(){return[r.noTextSelect,e.css`
|
|
480
|
+
:host {
|
|
481
|
+
display: inline-block;
|
|
482
|
+
max-width: 100%;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
button {
|
|
486
|
+
box-shadow: 0px 0px 0px transparent;
|
|
487
|
+
border: 0px solid transparent;
|
|
488
|
+
text-shadow: 0px 0px 0px transparent;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
button:hover {
|
|
492
|
+
box-shadow: 0px 0px 0px transparent;
|
|
493
|
+
border: 0px solid transparent;
|
|
494
|
+
text-shadow: 0px 0px 0px transparent;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
button:active {
|
|
498
|
+
outline: none;
|
|
499
|
+
border: none;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
button:focus {
|
|
503
|
+
outline: 0;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.ft-button {
|
|
507
|
+
position: relative;
|
|
508
|
+
display: flex;
|
|
509
|
+
justify-content: center;
|
|
510
|
+
align-items: center;
|
|
511
|
+
width: 100%;
|
|
512
|
+
overflow: hidden;
|
|
513
|
+
box-sizing: border-box;
|
|
514
|
+
border: none;
|
|
515
|
+
|
|
516
|
+
--ft-button-internal-font-size: ${Ke.fontSize};
|
|
517
|
+
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
518
|
+
--ft-button-internal-color: ${Ke.color};
|
|
519
|
+
--mdc-icon-size: ${Ke.iconSize};
|
|
520
|
+
--ft-button-internal-vertical-padding: 6px;
|
|
521
|
+
--ft-button-internal-horizontal-padding: 8px;
|
|
522
|
+
${r.setVariable(Fe.color,Ke.rippleColor)};
|
|
523
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), var(--mdc-icon-size));
|
|
524
|
+
|
|
525
|
+
border-radius: ${Ke.borderRadius};
|
|
526
|
+
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
527
|
+
background-color: ${Ke.backgroundColor};
|
|
528
|
+
color: var(--ft-button-internal-color);
|
|
529
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.ft-button:not([disabled]):hover {
|
|
533
|
+
cursor: pointer;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.ft-button--dense {
|
|
537
|
+
--ft-button-internal-vertical-padding: 2px;
|
|
538
|
+
--ft-button-internal-horizontal-padding: 4px;
|
|
539
|
+
border-radius: ${ti};
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
.ft-button--round {
|
|
543
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + var(--ft-button-internal-vertical-padding));
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.ft-button[disabled] {
|
|
547
|
+
filter: grayscale(1);
|
|
548
|
+
opacity: ${Ke.opacityDisabled};
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.ft-button.ft-button--primary {
|
|
552
|
+
background-color: ${Je};
|
|
553
|
+
--ft-button-internal-color: ${Qe};
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
.ft-button.ft-button--outlined {
|
|
557
|
+
border: 1px solid var(--ft-button-internal-color);
|
|
558
|
+
padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
.ft-button:focus {
|
|
562
|
+
outline: none;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.ft-button--label {
|
|
566
|
+
overflow: hidden;
|
|
567
|
+
white-space: nowrap;
|
|
568
|
+
text-overflow: ellipsis;
|
|
569
|
+
display: block;
|
|
570
|
+
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
571
|
+
${r.setVariable(Gt.fontSize,"var(--ft-button-internal-font-size)")};
|
|
572
|
+
${r.setVariable(Gt.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
.ft-button--safari-fix .ft-button--label {
|
|
576
|
+
margin-right: 0;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
.ft-button--safari-fix .ft-button--label:after {
|
|
580
|
+
content: "\\0000a0";
|
|
581
|
+
display: inline-block;
|
|
582
|
+
width: 0;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.ft-button--label[hidden] {
|
|
586
|
+
display: none;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
mwc-icon {
|
|
590
|
+
flex-shrink: 0;
|
|
591
|
+
width: var(--mdc-icon-size);
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
.ft-button--label[hidden] + mwc-icon {
|
|
595
|
+
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
596
|
+
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.ft-button:not(.ft-button--trailing-icon) mwc-icon,
|
|
600
|
+
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
601
|
+
order: -1;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
ft-loader {
|
|
605
|
+
${r.setVariable(We.size,Ke.iconSize)};
|
|
606
|
+
${r.setVariable(We.color,"var(--ft-button-internal-color)")};
|
|
607
|
+
}
|
|
608
|
+
`]}getTemplate(){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":r.isSafari,"ft-no-text-select":!0};return this.addTooltip(e.html`
|
|
609
|
+
<button part="button"
|
|
610
|
+
class="${c.classMap(t)}"
|
|
611
|
+
aria-label="${this.getLabel()}"
|
|
612
|
+
?disabled=${this.isDisabled()}>
|
|
613
|
+
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
614
|
+
<ft-typography part="label"
|
|
615
|
+
variant="button"
|
|
616
|
+
class="ft-button--label"
|
|
617
|
+
?hidden=${!this.hasTextContent()}>
|
|
618
|
+
<slot @slotchange=${this.onSlotchange}></slot>
|
|
619
|
+
</ft-typography>
|
|
620
|
+
${this.resolveIcon()}
|
|
621
|
+
</button>
|
|
622
|
+
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:e.html`
|
|
623
|
+
<ft-tooltip part="tooltip"
|
|
624
|
+
text="${this.getLabel()}"
|
|
625
|
+
position="${this.tooltipPosition}">
|
|
626
|
+
${t}
|
|
627
|
+
</ft-tooltip>
|
|
628
|
+
`}resolveIcon(){return this.loading?e.html`
|
|
629
|
+
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
630
|
+
<mwc-icon>${this.icon}</mwc-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}};ei.elementDefinitions={"ft-ripple":De,"ft-tooltip":Ge,"ft-typography":ee,"mwc-icon":je,"ft-loader":Ze},qe([i.property({type:Boolean})],ei.prototype,"primary",void 0),qe([i.property({type:Boolean})],ei.prototype,"outlined",void 0),qe([i.property({type:Boolean})],ei.prototype,"disabled",void 0),qe([i.property({type:Boolean})],ei.prototype,"dense",void 0),qe([i.property({type:Boolean})],ei.prototype,"round",void 0),qe([i.property({type:String})],ei.prototype,"label",void 0),qe([i.property({type:String})],ei.prototype,"icon",void 0),qe([i.property({type:Boolean})],ei.prototype,"trailingIcon",void 0),qe([i.property({type:Boolean})],ei.prototype,"loading",void 0),qe([i.property({type:String})],ei.prototype,"tooltipPosition",void 0),qe([i.query(".ft-button")],ei.prototype,"button",void 0),qe([i.query(".ft-button--label slot")],ei.prototype,"slottedContent",void 0),ei=qe([r.customElement("ft-button")],ei);
|
|
631
|
+
/**
|
|
632
|
+
* @license
|
|
633
|
+
* Copyright 2017 Google Inc.
|
|
634
|
+
*
|
|
635
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
636
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
637
|
+
* in the Software without restriction, including without limitation the rights
|
|
638
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
639
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
640
|
+
* furnished to do so, subject to the following conditions:
|
|
641
|
+
*
|
|
642
|
+
* The above copyright notice and this permission notice shall be included in
|
|
643
|
+
* all copies or substantial portions of the Software.
|
|
644
|
+
*
|
|
645
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
646
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
647
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
648
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
649
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
650
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
651
|
+
* THE SOFTWARE.
|
|
652
|
+
*/
|
|
653
|
+
var ii={ROOT:"mdc-form-field"},ri={LABEL_SELECTOR:".mdc-form-field > label"},oi=function(t){function e(i){var r=t.call(this,ce(ce({},e.defaultAdapter),i))||this;return r.click=function(){r.handleClick()},r}return oe(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return ii},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return ri},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},e.prototype.handleClick=function(){var t=this;this.adapter.activateInputRipple(),requestAnimationFrame((function(){t.adapter.deactivateInputRipple()}))},e}(pe);
|
|
654
|
+
/**
|
|
655
|
+
* @license
|
|
656
|
+
* Copyright 2018 Google LLC
|
|
657
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
658
|
+
*/
|
|
659
|
+
const ci=t=>(e,i)=>{if(e.constructor._observers){if(!e.constructor.hasOwnProperty("_observers")){const t=e.constructor._observers;e.constructor._observers=new Map,t.forEach(((t,i)=>e.constructor._observers.set(i,t)))}}else{e.constructor._observers=new Map;const t=e.updated;e.updated=function(e){t.call(this,e),e.forEach(((t,e)=>{const i=this.constructor._observers.get(e);void 0!==i&&i.call(this,this[e],t)}))}}e.constructor._observers.set(i,t)}
|
|
660
|
+
/**
|
|
661
|
+
* @license
|
|
662
|
+
* Copyright 2018 Google LLC
|
|
663
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
664
|
+
*/;class ai extends le{constructor(){super(...arguments),this.alignEnd=!1,this.spaceBetween=!1,this.nowrap=!1,this.label="",this.mdcFoundationClass=oi}createAdapter(){return{registerInteractionHandler:(t,e)=>{this.labelEl.addEventListener(t,e)},deregisterInteractionHandler:(t,e)=>{this.labelEl.removeEventListener(t,e)},activateInputRipple:async()=>{const t=this.input;if(t instanceof Oe){const e=await t.ripple;e&&e.startPress()}},deactivateInputRipple:async()=>{const t=this.input;if(t instanceof Oe){const e=await t.ripple;e&&e.endPress()}}}}get input(){var t,e;return null!==(e=null===(t=this.slottedInputs)||void 0===t?void 0:t[0])&&void 0!==e?e:null}render(){const t={"mdc-form-field--align-end":this.alignEnd,"mdc-form-field--space-between":this.spaceBetween,"mdc-form-field--nowrap":this.nowrap};return e.html`
|
|
665
|
+
<div class="mdc-form-field ${c.classMap(t)}">
|
|
666
|
+
<slot></slot>
|
|
667
|
+
<label class="mdc-label"
|
|
668
|
+
@click="${this._labelClick}">${this.label}</label>
|
|
669
|
+
</div>`}click(){this._labelClick()}_labelClick(){const t=this.input;t&&(t.focus(),t.click())}}ae([i.property({type:Boolean})],ai.prototype,"alignEnd",void 0),ae([i.property({type:Boolean})],ai.prototype,"spaceBetween",void 0),ae([i.property({type:Boolean})],ai.prototype,"nowrap",void 0),ae([i.property({type:String}),ci((async function(t){var e;null===(e=this.input)||void 0===e||e.setAttribute("aria-label",t)}))],ai.prototype,"label",void 0),ae([i.query(".mdc-form-field")],ai.prototype,"mdcRoot",void 0),ae([i.queryAssignedNodes("",!0,"*")],ai.prototype,"slottedInputs",void 0),ae([i.query("label")],ai.prototype,"labelEl",void 0);
|
|
670
|
+
/**
|
|
671
|
+
* @license
|
|
672
|
+
* Copyright 2021 Google LLC
|
|
673
|
+
* SPDX-LIcense-Identifier: Apache-2.0
|
|
674
|
+
*/
|
|
675
|
+
const ni=e.css`.mdc-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}:host{display:inline-flex}.mdc-form-field{width:100%}::slotted(*){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}::slotted(mwc-switch){margin-right:10px}[dir=rtl] ::slotted(mwc-switch),::slotted(mwc-switch[dir=rtl]){margin-left:10px}`
|
|
676
|
+
/**
|
|
677
|
+
* @license
|
|
678
|
+
* Copyright 2018 Google LLC
|
|
679
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
680
|
+
*/;let si=class extends ai{};si.styles=[ni],si=ae([i.customElement("mwc-formfield")],si);
|
|
681
|
+
/**
|
|
682
|
+
* @license
|
|
683
|
+
* Copyright 2020 Google LLC
|
|
684
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
685
|
+
*/
|
|
686
|
+
const di=Symbol("selection controller");class li{constructor(){this.selected=null,this.ordered=null,this.set=new Set}}class pi{constructor(t){this.sets={},this.focusedSet=null,this.mouseIsDown=!1,this.updating=!1,t.addEventListener("keydown",(t=>{this.keyDownHandler(t)})),t.addEventListener("mousedown",(()=>{this.mousedownHandler()})),t.addEventListener("mouseup",(()=>{this.mouseupHandler()}))}static getController(t){const e=!("global"in t)||"global"in t&&t.global?document:t.getRootNode();let i=e[di];return void 0===i&&(i=new pi(e),e[di]=i),i}keyDownHandler(t){const e=t.target;"checked"in e&&this.has(e)&&("ArrowRight"==t.key||"ArrowDown"==t.key?this.selectNext(e):"ArrowLeft"!=t.key&&"ArrowUp"!=t.key||this.selectPrevious(e))}mousedownHandler(){this.mouseIsDown=!0}mouseupHandler(){this.mouseIsDown=!1}has(t){return this.getSet(t.name).set.has(t)}selectPrevious(t){const e=this.getOrdered(t),i=e.indexOf(t),r=e[i-1]||e[e.length-1];return this.select(r),r}selectNext(t){const e=this.getOrdered(t),i=e.indexOf(t),r=e[i+1]||e[0];return this.select(r),r}select(t){t.click()}focus(t){if(this.mouseIsDown)return;const e=this.getSet(t.name),i=this.focusedSet;this.focusedSet=e,i!=e&&e.selected&&e.selected!=t&&e.selected.focus()}isAnySelected(t){const e=this.getSet(t.name);for(const t of e.set)if(t.checked)return!0;return!1}getOrdered(t){const e=this.getSet(t.name);return e.ordered||(e.ordered=Array.from(e.set),e.ordered.sort(((t,e)=>t.compareDocumentPosition(e)==Node.DOCUMENT_POSITION_PRECEDING?1:0))),e.ordered}getSet(t){return this.sets[t]||(this.sets[t]=new li),this.sets[t]}register(t){const e=t.name||t.getAttribute("name")||"",i=this.getSet(e);i.set.add(t),i.ordered=null}unregister(t){const e=this.getSet(t.name);e.set.delete(t),e.ordered=null,e.selected==t&&(e.selected=null)}update(t){if(this.updating)return;this.updating=!0;const e=this.getSet(t.name);if(t.checked){for(const i of e.set)i!=t&&(i.checked=!1);e.selected=t}if(this.isAnySelected(t))for(const t of e.set){if(void 0===t.formElementTabIndex)break;t.formElementTabIndex=t.checked?0:-1}this.updating=!1}}
|
|
687
|
+
/**
|
|
688
|
+
* @license
|
|
689
|
+
* Copyright 2016 Google Inc.
|
|
690
|
+
*
|
|
691
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
692
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
693
|
+
* in the Software without restriction, including without limitation the rights
|
|
694
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
695
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
696
|
+
* furnished to do so, subject to the following conditions:
|
|
697
|
+
*
|
|
698
|
+
* The above copyright notice and this permission notice shall be included in
|
|
699
|
+
* all copies or substantial portions of the Software.
|
|
700
|
+
*
|
|
701
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
702
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
703
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
704
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
705
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
706
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
707
|
+
* THE SOFTWARE.
|
|
708
|
+
*/var hi={NATIVE_CONTROL_SELECTOR:".mdc-radio__native-control"},mi={DISABLED:"mdc-radio--disabled",ROOT:"mdc-radio"},ui=function(t){function e(i){return t.call(this,ce(ce({},e.defaultAdapter),i))||this}return oe(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return mi},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return hi},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNativeControlDisabled:function(){}}},enumerable:!1,configurable:!0}),e.prototype.setDisabled=function(t){var i=e.cssClasses.DISABLED;this.adapter.setNativeControlDisabled(t),t?this.adapter.addClass(i):this.adapter.removeClass(i)},e}(pe);
|
|
709
|
+
/**
|
|
710
|
+
* @license
|
|
711
|
+
* Copyright 2018 Google LLC
|
|
712
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
713
|
+
*/
|
|
714
|
+
class fi extends Oe{constructor(){super(...arguments),this._checked=!1,this.useStateLayerCustomProperties=!1,this.global=!1,this.disabled=!1,this.value="on",this.name="",this.reducedTouchTarget=!1,this.mdcFoundationClass=ui,this.formElementTabIndex=0,this.focused=!1,this.shouldRenderRipple=!1,this.rippleElement=null,this.rippleHandlers=new Te((()=>(this.shouldRenderRipple=!0,this.ripple.then((t=>{this.rippleElement=t})),this.ripple)))}get checked(){return this._checked}set checked(t){var e,i;const r=this._checked;t!==r&&(this._checked=t,this.formElement&&(this.formElement.checked=t),null===(e=this._selectionController)||void 0===e||e.update(this),!1===t&&(null===(i=this.formElement)||void 0===i||i.blur()),this.requestUpdate("checked",r),this.dispatchEvent(new Event("checked",{bubbles:!0,composed:!0})))}_handleUpdatedValue(t){this.formElement.value=t}renderRipple(){return this.shouldRenderRipple?e.html`<mwc-ripple unbounded accent
|
|
715
|
+
.internalUseStateLayerCustomProperties="${this.useStateLayerCustomProperties}"
|
|
716
|
+
.disabled="${this.disabled}"></mwc-ripple>`:""}get isRippleActive(){var t;return(null===(t=this.rippleElement)||void 0===t?void 0:t.isActive)||!1}connectedCallback(){super.connectedCallback(),this._selectionController=pi.getController(this),this._selectionController.register(this),this._selectionController.update(this)}disconnectedCallback(){this._selectionController.unregister(this),this._selectionController=void 0}focus(){this.formElement.focus()}createAdapter(){return Object.assign(Object.assign({},(t=this.mdcRoot,{addClass:e=>{t.classList.add(e)},removeClass:e=>{t.classList.remove(e)},hasClass:e=>t.classList.contains(e)})),{setNativeControlDisabled:t=>{this.formElement.disabled=t}});var t}handleFocus(){this.focused=!0,this.handleRippleFocus()}handleClick(){this.formElement.focus()}handleBlur(){this.focused=!1,this.formElement.blur(),this.rippleHandlers.endFocus()}setFormData(t){this.name&&this.checked&&t.append(this.name,this.value)}render(){const t={"mdc-radio--touch":!this.reducedTouchTarget,"mdc-ripple-upgraded--background-focused":this.focused,"mdc-radio--disabled":this.disabled};return e.html`
|
|
717
|
+
<div class="mdc-radio ${c.classMap(t)}">
|
|
718
|
+
<input
|
|
719
|
+
tabindex="${this.formElementTabIndex}"
|
|
720
|
+
class="mdc-radio__native-control"
|
|
721
|
+
type="radio"
|
|
722
|
+
name="${this.name}"
|
|
723
|
+
aria-label="${Ae(this.ariaLabel)}"
|
|
724
|
+
aria-labelledby="${Ae(this.ariaLabelledBy)}"
|
|
725
|
+
.checked="${this.checked}"
|
|
726
|
+
.value="${this.value}"
|
|
727
|
+
?disabled="${this.disabled}"
|
|
728
|
+
@change="${this.changeHandler}"
|
|
729
|
+
@focus="${this.handleFocus}"
|
|
730
|
+
@click="${this.handleClick}"
|
|
731
|
+
@blur="${this.handleBlur}"
|
|
732
|
+
@mousedown="${this.handleRippleMouseDown}"
|
|
733
|
+
@mouseenter="${this.handleRippleMouseEnter}"
|
|
734
|
+
@mouseleave="${this.handleRippleMouseLeave}"
|
|
735
|
+
@touchstart="${this.handleRippleTouchStart}"
|
|
736
|
+
@touchend="${this.handleRippleDeactivate}"
|
|
737
|
+
@touchcancel="${this.handleRippleDeactivate}">
|
|
738
|
+
<div class="mdc-radio__background">
|
|
739
|
+
<div class="mdc-radio__outer-circle"></div>
|
|
740
|
+
<div class="mdc-radio__inner-circle"></div>
|
|
741
|
+
</div>
|
|
742
|
+
${this.renderRipple()}
|
|
743
|
+
</div>`}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()}changeHandler(){this.checked=this.formElement.checked}}ae([i.query(".mdc-radio")],fi.prototype,"mdcRoot",void 0),ae([i.query("input")],fi.prototype,"formElement",void 0),ae([i.state()],fi.prototype,"useStateLayerCustomProperties",void 0),ae([i.property({type:Boolean})],fi.prototype,"global",void 0),ae([i.property({type:Boolean,reflect:!0})],fi.prototype,"checked",null),ae([i.property({type:Boolean}),ci((function(t){this.mdcFoundation.setDisabled(t)}))],fi.prototype,"disabled",void 0),ae([i.property({type:String}),ci((function(t){this._handleUpdatedValue(t)}))],fi.prototype,"value",void 0),ae([i.property({type:String})],fi.prototype,"name",void 0),ae([i.property({type:Boolean})],fi.prototype,"reducedTouchTarget",void 0),ae([i.property({type:Number})],fi.prototype,"formElementTabIndex",void 0),ae([i.state()],fi.prototype,"focused",void 0),ae([i.state()],fi.prototype,"shouldRenderRipple",void 0),ae([i.queryAsync("mwc-ripple")],fi.prototype,"ripple",void 0),ae([we,i.property({attribute:"aria-label"})],fi.prototype,"ariaLabel",void 0),ae([we,i.property({attribute:"aria-labelledby"})],fi.prototype,"ariaLabelledBy",void 0),ae([i.eventOptions({passive:!0})],fi.prototype,"handleRippleTouchStart",null);
|
|
744
|
+
/**
|
|
745
|
+
* @license
|
|
746
|
+
* Copyright 2021 Google LLC
|
|
747
|
+
* SPDX-LIcense-Identifier: Apache-2.0
|
|
748
|
+
*/
|
|
749
|
+
const bi=e.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc((40px - 20px) / 2)}.mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0, 0, 0, 0.54)}.mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:#018786;border-color:var(--mdc-theme-secondary, #018786)}.mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:#018786;border-color:var(--mdc-theme-secondary, #018786)}.mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0, 0, 0, 0.38)}.mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0, 0, 0, 0.38)}.mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:rgba(0, 0, 0, 0.38)}.mdc-radio .mdc-radio__background::before{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786)}.mdc-radio .mdc-radio__background::before{top:calc(-1 * (40px - 20px) / 2);left:calc(-1 * (40px - 20px) / 2);width:40px;height:40px}.mdc-radio .mdc-radio__native-control{top:calc((40px - 40px) / 2);right:calc((40px - 40px) / 2);left:calc((40px - 40px) / 2);width:40px;height:40px}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:GrayText}.mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:GrayText}.mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:GrayText}}.mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1}.mdc-radio--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-radio--touch .mdc-radio__native-control{top:calc((40px - 48px) / 2);right:calc((40px - 48px) / 2);left:calc((40px - 48px) / 2);width:48px;height:48px}.mdc-radio__native-control:checked+.mdc-radio__background,.mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio--disabled{cursor:default;pointer-events:none}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:disabled+.mdc-radio__background,[aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background{cursor:default}.mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}:host{display:inline-block;outline:none}.mdc-radio{vertical-align:bottom}.mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unchecked-color, rgba(0, 0, 0, 0.54))}.mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-color, rgba(0, 0, 0, 0.38))}.mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-color, rgba(0, 0, 0, 0.38))}.mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-disabled-color, rgba(0, 0, 0, 0.38))}`
|
|
750
|
+
/**
|
|
751
|
+
* @license
|
|
752
|
+
* Copyright 2018 Google LLC
|
|
753
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
754
|
+
*/;let gi=class extends fi{};gi.styles=[bi],gi=ae([i.customElement("mwc-radio")],gi);var vi=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 yi={borderRadiusM:r.FtCssVariable.external(r.designSystemVariables.borderRadiusM,"Design system"),colorOutline:r.FtCssVariable.external(r.designSystemVariables.colorOutline,"Design system"),colorOnSurface:r.FtCssVariable.external(r.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:r.FtCssVariable.external(r.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:r.FtCssVariable.external(r.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:r.FtCssVariable.external(r.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:r.FtCssVariable.external(r.designSystemVariables.colorOnPrimary,"Design system"),fontFamily:r.FtCssVariable.external(zt.fontFamily,"Body2 typography"),fontSize:r.FtCssVariable.external(zt.fontSize,"Body2 typography"),fontWeight:r.FtCssVariable.external(zt.fontWeight,"Body2 typography"),letterSpacing:r.FtCssVariable.external(zt.letterSpacing,"Body2 typography"),lineHeight:r.FtCssVariable.external(zt.lineHeight,"Body2 typography"),textTransform:r.FtCssVariable.external(zt.textTransform,"Body2 typography")};let ki=class extends r.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}getStyles(){return[e.css`
|
|
755
|
+
.ft-filter-level--container {
|
|
756
|
+
display: flex;
|
|
757
|
+
flex-direction: column;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
.ft-filter-level--container > * {
|
|
761
|
+
padding: 0 10px;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
.ft-filter-level--go-back {
|
|
765
|
+
flex-shrink: 0;
|
|
766
|
+
text-decoration: none;
|
|
767
|
+
position: relative;
|
|
768
|
+
border-radius: ${yi.borderRadiusM};
|
|
769
|
+
overflow: hidden;
|
|
770
|
+
display: flex;
|
|
771
|
+
align-items: center;
|
|
772
|
+
padding: 4px 4px;
|
|
773
|
+
gap: 4px;
|
|
774
|
+
cursor: pointer;
|
|
775
|
+
color: ${yi.colorOnSurface};
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
.ft-filter-level--go-back:focus {
|
|
779
|
+
outline: none;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
.ft-filter-level--go-back mwc-icon {
|
|
783
|
+
flex-shrink: 0;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
.ft-filter-level--go-back ft-typography {
|
|
787
|
+
display: block;
|
|
788
|
+
flex-grow: 1;
|
|
789
|
+
flex-shrink: 0;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
.ft-filter-level--option {
|
|
793
|
+
display: flex;
|
|
794
|
+
align-items: center;
|
|
795
|
+
max-width: 100%;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
.ft-filter-level--option ft-button {
|
|
799
|
+
margin-right: -10px;
|
|
800
|
+
flex-shrink: 0;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
ft-button {
|
|
804
|
+
${r.setVariable(Ke.color,yi.colorOnSurface)};
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
mwc-formfield {
|
|
808
|
+
flex-shrink: 1;
|
|
809
|
+
flex-grow: 1;
|
|
810
|
+
display: block;
|
|
811
|
+
max-width: calc(100% + 10px);
|
|
812
|
+
margin-left: -10px;
|
|
813
|
+
word-break: break-word;
|
|
814
|
+
|
|
815
|
+
--mdc-theme-secondary: ${yi.colorPrimary};
|
|
816
|
+
|
|
817
|
+
--mdc-radio-unchecked-color: ${yi.colorOnSurfaceMedium};
|
|
818
|
+
--mdc-checkbox-unchecked-color: ${yi.colorOnSurfaceMedium};
|
|
819
|
+
--mdc-checkbox-ink-color: ${yi.colorOnPrimary};
|
|
820
|
+
|
|
821
|
+
--mdc-radio-disabled-color: ${yi.colorOnSurfaceDisabled};
|
|
822
|
+
--mdc-checkbox-disabled-color: ${yi.colorOnSurfaceDisabled};
|
|
823
|
+
|
|
824
|
+
--mdc-theme-on-surface: ${yi.colorPrimary};
|
|
825
|
+
|
|
826
|
+
--mdc-typography-body2-font-family: ${yi.fontFamily};
|
|
827
|
+
--mdc-typography-body2-font-size: ${yi.fontSize};
|
|
828
|
+
--mdc-typography-body2-font-weight: ${yi.fontWeight};
|
|
829
|
+
--mdc-typography-body2-letter-spacing: ${yi.letterSpacing};
|
|
830
|
+
--mdc-typography-body2-line-height: ${yi.lineHeight};
|
|
831
|
+
--mdc-typography-body2-text-transform: ${yi.textTransform};
|
|
832
|
+
--mdc-theme-text-primary-on-background: ${yi.colorOnSurface};
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
.ft-filter--disabled {
|
|
836
|
+
--mdc-theme-text-primary-on-background: ${yi.colorOnSurfaceDisabled};
|
|
837
|
+
}
|
|
838
|
+
`]}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,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}getTemplate(){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`
|
|
839
|
+
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
840
|
+
${null==this.parent?null:e.html`
|
|
841
|
+
<div tabindex="0"
|
|
842
|
+
class="ft-filter-level--go-back"
|
|
843
|
+
?disabled=${this.disabled}
|
|
844
|
+
@keyup=${this.goBackOnKeyPress}
|
|
845
|
+
@click=${this.goBackOnClick}>
|
|
846
|
+
<ft-ripple></ft-ripple>
|
|
847
|
+
<mwc-icon>chevron_left</mwc-icon>
|
|
848
|
+
<ft-typography variant="body2">${this.parent.label}</ft-typography>
|
|
849
|
+
</div>
|
|
850
|
+
`}
|
|
851
|
+
${o.repeat(i,(t=>t.value),(t=>{var i;return e.html`
|
|
852
|
+
<div class="ft-filter-level--option" part="options">
|
|
853
|
+
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
854
|
+
${this.preventNavigation||t.selected||0===(null!==(i=t.subOptions)&&void 0!==i?i:[]).length?e.nothing:e.html`
|
|
855
|
+
<ft-button icon="chevron_right"
|
|
856
|
+
label="${t.label}"
|
|
857
|
+
?disabled=${this.disabled}
|
|
858
|
+
tooltipPosition="left"
|
|
859
|
+
@click=${()=>this.displayLevel(t)}></ft-button>
|
|
860
|
+
`}
|
|
861
|
+
</div>
|
|
862
|
+
`}))}
|
|
863
|
+
${i.length<t.length?e.html`
|
|
864
|
+
<ft-button
|
|
865
|
+
class="ft-filter-level--display-more"
|
|
866
|
+
icon="expand_more"
|
|
867
|
+
dense trailingIcon
|
|
868
|
+
@click=${this.displayMore}>
|
|
869
|
+
${this.moreValuesButtonLabel}
|
|
870
|
+
</ft-button>
|
|
871
|
+
`:e.nothing}
|
|
872
|
+
</div>
|
|
873
|
+
`}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`
|
|
874
|
+
<mwc-formfield label="${t.label}">
|
|
875
|
+
<mwc-checkbox
|
|
876
|
+
reducedTouchTarget
|
|
877
|
+
?checked=${t.selected}
|
|
878
|
+
?disabled=${this.disabled}
|
|
879
|
+
?indeterminate=${ie(null!==(i=t.subOptions)&&void 0!==i?i:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}
|
|
880
|
+
@change=${e=>this.toggleMultiValuedOption(e,t)}
|
|
881
|
+
></mwc-checkbox>
|
|
882
|
+
</mwc-formfield>
|
|
883
|
+
`}toggleMultiValuedOption(t,e){var i;ie(null!==(i=e.subOptions)&&void 0!==i?i:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).forEach((t=>t.selected=!1)),this.optionsChanged(t,e)}buildMonoValuedOption(t){return e.html`
|
|
884
|
+
<mwc-formfield label="${t.label}">
|
|
885
|
+
<mwc-radio
|
|
886
|
+
reducedTouchTarget
|
|
887
|
+
name="${this.id}"
|
|
888
|
+
?checked=${t.selected}
|
|
889
|
+
?disabled=${this.disabled}
|
|
890
|
+
@click=${e=>this.toggleMonoValuedOption(e,t)}
|
|
891
|
+
></mwc-radio>
|
|
892
|
+
</mwc-formfield>
|
|
893
|
+
`}toggleMonoValuedOption(t,e){this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),e.selected=!e.selected,this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}};ki.elementDefinitions={"ft-button":ei,"ft-ripple":De,"ft-typography":ee,"mwc-checkbox":Re,"mwc-formfield":si,"mwc-icon":je,"mwc-radio":gi},vi([i.property({type:String})],ki.prototype,"id",void 0),vi([i.property({type:Object})],ki.prototype,"parent",void 0),vi([i.property({type:Array})],ki.prototype,"options",void 0),vi([i.property({type:Boolean})],ki.prototype,"multivalued",void 0),vi([i.property({type:Boolean})],ki.prototype,"disabled",void 0),vi([i.property({type:Boolean})],ki.prototype,"hideSelectedOptions",void 0),vi([i.property({type:Boolean})],ki.prototype,"preventNavigation",void 0),vi([i.property({type:String})],ki.prototype,"filter",void 0),vi([i.property({type:String})],ki.prototype,"moreValuesButtonLabel",void 0),vi([i.property({type:Number})],ki.prototype,"displayedValuesLimit",void 0),vi([i.query(".ft-filter-level--container")],ki.prototype,"container",void 0),vi([i.state()],ki.prototype,"displayedPages",void 0),ki=vi([r.customElement("ft-filter-level")],ki);var xi=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 _i={buttonsColor:r.FtCssVariable.extend("--ft-snap-scroll-buttons-color",r.designSystemVariables.colorPrimary),buttonsZIndex:r.FtCssVariable.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:r.FtCssVariable.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:r.FtCssVariable.external(r.designSystemVariables.colorSurface,"Design system")};class wi extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}let $i=class extends r.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 r.Debouncer(200),this.updateScrollDebouncer=new r.Debouncer(100)}getStyles(){return e.css`
|
|
894
|
+
.ft-snap-scroll {
|
|
895
|
+
box-sizing: border-box;
|
|
896
|
+
position: relative;
|
|
897
|
+
display: flex;
|
|
898
|
+
|
|
899
|
+
--ft-snap-scroll-transparent-color: transparent;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
.ft-snap-scroll.ft-snap-scroll--safari-fix {
|
|
903
|
+
/* Safari handles "transparent" as rgba(0,0,0,0) so it's ugly in linear-gradiant with default --ft-color-surface */
|
|
904
|
+
/* this value should be overridden with --ft-color-surface with alpha set to 0 when needed */
|
|
905
|
+
--ft-snap-scroll-transparent-color: rgba(255, 255, 255, 0);
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
.ft-snap-scroll,
|
|
909
|
+
.ft-snap-scroll--content {
|
|
910
|
+
overflow: hidden;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
.ft-snap-scroll--limit-size,
|
|
914
|
+
.ft-snap-scroll--limit-size .ft-snap-scroll--content {
|
|
915
|
+
width: 100%;
|
|
916
|
+
height: 100%;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
.ft-snap-scroll--content {
|
|
920
|
+
flex-grow: 1;
|
|
921
|
+
flex-shrink: 1;
|
|
922
|
+
box-sizing: border-box;
|
|
923
|
+
scroll-snap-align: start;
|
|
924
|
+
display: flex;
|
|
925
|
+
flex-wrap: nowrap;
|
|
926
|
+
align-items: flex-start;
|
|
927
|
+
justify-content: flex-start;
|
|
928
|
+
gap: ${_i.gap};
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
932
|
+
display: none;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content {
|
|
936
|
+
-ms-overflow-style: none;
|
|
937
|
+
scrollbar-width: none;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
.ft-snap-scroll--content::slotted(*) {
|
|
941
|
+
flex-shrink: 0;
|
|
942
|
+
flex-grow: 1;
|
|
943
|
+
max-height: 100%;
|
|
944
|
+
max-width: 100%;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
.ft-snap-scroll--horizontal,
|
|
948
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
949
|
+
width: 100%;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
.ft-snap-scroll--vertical,
|
|
953
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
954
|
+
height: 100%;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
958
|
+
flex-direction: row;
|
|
959
|
+
overflow-x: auto;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
963
|
+
flex-direction: column;
|
|
964
|
+
overflow-y: auto;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
.ft-snap-scroll--previous,
|
|
968
|
+
.ft-snap-scroll--next {
|
|
969
|
+
position: absolute;
|
|
970
|
+
display: flex;
|
|
971
|
+
z-index: ${_i.buttonsZIndex};
|
|
972
|
+
opacity: 1;
|
|
973
|
+
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
974
|
+
${r.setVariable(Ke.backgroundColor,"transparent")};
|
|
975
|
+
${r.setVariable(Ke.color,_i.buttonsColor)};
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
.ft-snap-scroll--previous[hidden],
|
|
979
|
+
.ft-snap-scroll--next[hidden] {
|
|
980
|
+
z-index: -1;
|
|
981
|
+
opacity: 0;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--previous {
|
|
985
|
+
top: 0;
|
|
986
|
+
left: -1px;
|
|
987
|
+
bottom: 0;
|
|
988
|
+
background: linear-gradient(to right, ${_i.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
992
|
+
top: -1px;
|
|
993
|
+
left: 0;
|
|
994
|
+
right: 0;
|
|
995
|
+
background: linear-gradient(to bottom, ${_i.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
999
|
+
top: 0;
|
|
1000
|
+
right: -1px;
|
|
1001
|
+
bottom: 0;
|
|
1002
|
+
background: linear-gradient(to left, ${_i.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1006
|
+
left: 0;
|
|
1007
|
+
right: 0;
|
|
1008
|
+
bottom: -1px;
|
|
1009
|
+
background: linear-gradient(to top, ${_i.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1013
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1014
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1015
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1016
|
+
background-color: ${_i.colorSurface};
|
|
1017
|
+
}
|
|
1018
|
+
`}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,i=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<i||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}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)])}getTemplate(){const t=c.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":r.isSafari}),i=this.controls&&this.withScroll;return e.html`
|
|
1019
|
+
<div part="container" class="${t}">
|
|
1020
|
+
<ft-button
|
|
1021
|
+
class="ft-snap-scroll--previous"
|
|
1022
|
+
part="controls"
|
|
1023
|
+
primary
|
|
1024
|
+
icon="${this.horizontal?"arrow_back_ios_new":"expand_less"}"
|
|
1025
|
+
?hidden=${!i||this.startReached}
|
|
1026
|
+
?disabled=${!i||this.startReached}
|
|
1027
|
+
@click=${this.previous}
|
|
1028
|
+
></ft-button>
|
|
1029
|
+
<slot class="ft-snap-scroll--content"
|
|
1030
|
+
part="content"
|
|
1031
|
+
@slotchange=${this.onSlotChange}></slot>
|
|
1032
|
+
<ft-button
|
|
1033
|
+
class="ft-snap-scroll--next"
|
|
1034
|
+
part="controls"
|
|
1035
|
+
primary
|
|
1036
|
+
icon="${this.horizontal?"arrow_forward_ios":"expand_more"}"
|
|
1037
|
+
?hidden=${!i||this.endReached}
|
|
1038
|
+
?disabled=${!i||this.endReached}
|
|
1039
|
+
@click=${this.next}
|
|
1040
|
+
></ft-button>
|
|
1041
|
+
</div>
|
|
1042
|
+
`}updated(t){var e;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===(e=this.listenedContainer)||void 0===e||e.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 wi(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,i;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(i=this.contentSlot)||void 0===i||i.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);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 e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}};$i.elementDefinitions={"ft-button":ei},xi([i.property({type:Boolean})],$i.prototype,"horizontal",void 0),xi([i.property({type:Boolean})],$i.prototype,"hideScrollbar",void 0),xi([i.property({type:Boolean})],$i.prototype,"controls",void 0),xi([i.property({type:Boolean})],$i.prototype,"limitSize",void 0),xi([i.state()],$i.prototype,"elements",void 0),xi([i.state()],$i.prototype,"currentElement",void 0),xi([i.state()],$i.prototype,"withScroll",void 0),xi([i.state()],$i.prototype,"startReached",void 0),xi([i.state()],$i.prototype,"endReached",void 0),xi([i.query(".ft-snap-scroll--content")],$i.prototype,"contentSlot",void 0),$i=xi([r.customElement("ft-snap-scroll")],$i);var zi=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};t.FtFilterOption=class extends r.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}getTemplate(){return e.html`
|
|
1043
|
+
<slot @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1044
|
+
`}updateSubOptionsFromSlot(t){const e=t.composedPath()[0];this.subOptions=e.assignedElements().map((t=>t))}},t.FtFilterOption.elementDefinitions={},zi([i.property({type:String})],t.FtFilterOption.prototype,"label",void 0),zi([i.property({type:Object,converter:t=>t})],t.FtFilterOption.prototype,"value",void 0),zi([i.property({type:Boolean,reflect:!0})],t.FtFilterOption.prototype,"selected",void 0),zi([i.property({type:Object})],t.FtFilterOption.prototype,"subOptions",void 0),t.FtFilterOption=zi([r.customElement("ft-filter-option")],t.FtFilterOption);var Si=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 Oi={colorOutline:r.FtCssVariable.external(r.designSystemVariables.colorOutline,"Design system"),colorOnSurface:r.FtCssVariable.external(r.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:r.FtCssVariable.external(r.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorPrimary:r.FtCssVariable.external(r.designSystemVariables.colorPrimary,"Design system"),colorSurface:r.FtCssVariable.external(r.designSystemVariables.colorSurface,"Design system"),transitionDuration:r.FtCssVariable.external(r.designSystemVariables.transitionDuration,"Design system"),transitionTimingFunction:r.FtCssVariable.external(r.designSystemVariables.transitionTimingFunction,"Design system")};class Ti extends CustomEvent{constructor(t){super("change",{detail:t})}}t.FtFilter=class extends r.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 r.Debouncer(300)}getStyles(){return[Yt,e.css`
|
|
1045
|
+
:host {
|
|
1046
|
+
display: flex;
|
|
1047
|
+
max-height: 100%;
|
|
1048
|
+
max-width: 100%;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
.ft-filter--container {
|
|
1052
|
+
flex-grow: 1;
|
|
1053
|
+
display: flex;
|
|
1054
|
+
flex-direction: column;
|
|
1055
|
+
max-height: 100%;
|
|
1056
|
+
max-width: 100%;
|
|
1057
|
+
color: ${Oi.colorOnSurface};
|
|
1058
|
+
background: ${Oi.colorSurface};
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
.ft-filter--header {
|
|
1062
|
+
display: flex;
|
|
1063
|
+
flex-wrap: wrap;
|
|
1064
|
+
gap: 4px;
|
|
1065
|
+
flex-shrink: 0;
|
|
1066
|
+
padding: 0 10px;
|
|
1067
|
+
margin-bottom: 8px;
|
|
1068
|
+
${r.setVariable(q.fontSize,"14px")};
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
.ft-filter--header ft-button {
|
|
1072
|
+
flex-shrink: 0;
|
|
1073
|
+
margin-left: auto;
|
|
1074
|
+
${r.setVariable(Ke.iconSize,"18px")};
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
.ft-filter--label {
|
|
1078
|
+
display: block;
|
|
1079
|
+
flex-shrink: 1;
|
|
1080
|
+
flex-grow: 1;
|
|
1081
|
+
word-break: break-word;
|
|
1082
|
+
${r.setVariable(q.lineHeight,"22px")};
|
|
1083
|
+
${r.setVariable(q.fontWeight,"bold")};
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
.ft-filter--filter {
|
|
1087
|
+
flex-shrink: 0;
|
|
1088
|
+
display: flex;
|
|
1089
|
+
margin: 0;
|
|
1090
|
+
margin-bottom: 8px;
|
|
1091
|
+
padding: 0 10px;
|
|
1092
|
+
overflow: hidden;
|
|
1093
|
+
height: 32px;
|
|
1094
|
+
transition: height ${Oi.transitionDuration} ${Oi.transitionTimingFunction},
|
|
1095
|
+
margin ${Oi.transitionDuration} ${Oi.transitionTimingFunction};
|
|
1096
|
+
transition-delay: 500ms;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
.ft-filter--filter[hidden] {
|
|
1100
|
+
height: 0;
|
|
1101
|
+
margin-bottom: 0;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
input {
|
|
1105
|
+
display: block;
|
|
1106
|
+
width: 100%;
|
|
1107
|
+
border-radius: 4px;
|
|
1108
|
+
border: 1px solid ${Oi.colorOutline};
|
|
1109
|
+
padding: 4px;
|
|
1110
|
+
background-color: ${Oi.colorSurface};
|
|
1111
|
+
color: ${Oi.colorOnSurfaceMedium};
|
|
1112
|
+
outline-color: ${Oi.colorPrimary};
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
.ft-filter--values {
|
|
1116
|
+
flex-grow: 1;
|
|
1117
|
+
flex-shrink: 1;
|
|
1118
|
+
max-width: 100%;
|
|
1119
|
+
overflow-x: hidden;
|
|
1120
|
+
overflow-y: auto;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
.ft-filter--separator {
|
|
1124
|
+
border-top: 1px solid ${Oi.colorOutline};
|
|
1125
|
+
margin: 4px 10px;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
.ft-filter--levels-container {
|
|
1129
|
+
position: relative;
|
|
1130
|
+
overflow: hidden;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
.ft-filter--levels {
|
|
1134
|
+
position: relative;
|
|
1135
|
+
overflow: hidden;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
ft-filter-level {
|
|
1139
|
+
width: 100%;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
.ft-filter--level-left {
|
|
1143
|
+
height: 0;
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
slot {
|
|
1147
|
+
display: none;
|
|
1148
|
+
}
|
|
1149
|
+
`]}get flatOptions(){return ie(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}getTemplate(){var t,i;const r=this.flatOptions.some((t=>t.selected));let o=this.withScroll||this.filter||null!==(i=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==i&&i;return e.html`
|
|
1150
|
+
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1151
|
+
part="container">
|
|
1152
|
+
${this.label||r?e.html`
|
|
1153
|
+
<div class="ft-filter--header" part="header">
|
|
1154
|
+
<ft-typography class="ft-filter--label" variant="overline" part="label">${this.label}
|
|
1155
|
+
</ft-typography>
|
|
1156
|
+
${r?e.html`
|
|
1157
|
+
<ft-button icon="close" dense @click=${this.clear} part="clear-button">
|
|
1158
|
+
${this.clearButtonLabel}
|
|
1159
|
+
</ft-button>
|
|
1160
|
+
`:null}
|
|
1161
|
+
</div>
|
|
1162
|
+
`:null}
|
|
1163
|
+
<div class="ft-filter--filter" ?hidden=${!o}>
|
|
1164
|
+
<input type="search"
|
|
1165
|
+
part="input"
|
|
1166
|
+
class="ft-typography--caption"
|
|
1167
|
+
?disabled=${!o}
|
|
1168
|
+
placeholder="${this.filterPlaceHolder.replace("{0}",this.label)}"
|
|
1169
|
+
@keyup=${this.onFilterChange}>
|
|
1170
|
+
</div>
|
|
1171
|
+
<div class="ft-filter--values">
|
|
1172
|
+
${this.renderLevels()}
|
|
1173
|
+
</div>
|
|
1174
|
+
<slot @slotchange=${this.updateOptionsFromSlot}></slot>
|
|
1175
|
+
</div>
|
|
1176
|
+
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.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===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,i=t.filter((t=>t.selected)),r=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,o=r<0?"ft-filter--level-center":"ft-filter--level-left";return e.html`
|
|
1177
|
+
${this.raiseSelectedOptions&&i.length>0?e.html`
|
|
1178
|
+
<ft-filter-level
|
|
1179
|
+
id="${this.id}"
|
|
1180
|
+
?multivalued=${this.multivalued}
|
|
1181
|
+
?disabled=${this.disabled}
|
|
1182
|
+
preventNavigation
|
|
1183
|
+
.options=${i}
|
|
1184
|
+
@change=${this.onChange}
|
|
1185
|
+
part="selected-values"
|
|
1186
|
+
></ft-filter-level>
|
|
1187
|
+
<div class="ft-filter--separator">
|
|
1188
|
+
`:null}
|
|
1189
|
+
<ft-snap-scroll horizontal hideScrollbar
|
|
1190
|
+
class="ft-filter--levels"
|
|
1191
|
+
@current-element-change=${t=>this.levelsScrollDebouncer.run((()=>{for(;t.detail.index<this.displayedLevels.length;)this.displayedLevels.pop();this.requestUpdate()}))}>
|
|
1192
|
+
${this.renderLevel(o,this.options)}
|
|
1193
|
+
${this.displayedLevels.map((e=>t.find((t=>t.value===e)))).map(((t,e)=>{var i;const o=(null==t?void 0:t.value)===this.slideIn||(null==t?void 0:t.value)===this.slideOut?"ft-filter--level-right":e===r?"ft-filter--level-center":"ft-filter--level-left";return this.renderLevel(o,null!==(i=null==t?void 0:t.subOptions)&&void 0!==i?i:[],t)}))}
|
|
1194
|
+
</ft-snap-scroll>
|
|
1195
|
+
`}renderLevel(t,i,r){return e.html`
|
|
1196
|
+
<ft-filter-level
|
|
1197
|
+
class="${t}"
|
|
1198
|
+
id="${this.id}"
|
|
1199
|
+
filter="${this.filter}"
|
|
1200
|
+
moreValuesButtonLabel="${this.moreValuesButtonLabel}"
|
|
1201
|
+
?multivalued=${this.multivalued}
|
|
1202
|
+
?disabled=${this.disabled||"ft-filter--level-center"!==t}
|
|
1203
|
+
?hideSelectedOptions=${this.raiseSelectedOptions}
|
|
1204
|
+
.parent=${r}
|
|
1205
|
+
.options=${i}
|
|
1206
|
+
.displayedValuesLimit=${this.displayedValuesLimit}
|
|
1207
|
+
@change=${this.onChange}
|
|
1208
|
+
@go-back=${this.goBack}
|
|
1209
|
+
@display-level=${this.onDisplayLevel}
|
|
1210
|
+
part="values"
|
|
1211
|
+
></ft-filter-level>
|
|
1212
|
+
`}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){if(t.stopPropagation(),!this.multivalued){const e=i=>{var r;i.value!==t.detail.value&&(i.selected=!1),null===(r=i.subOptions)||void 0===r||r.forEach(e)};this.options.forEach(e)}this.optionsChanged()}optionsChanged(){var t;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new Ti(e)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}updateOptionsFromSlot(t){const e=t.composedPath()[0];this.options=e.assignedElements().map((t=>t))}onFilterChange(t){const e=t.composedPath()[0];this.filter=e.value}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}},t.FtFilter.elementDefinitions={"ft-button":ei,"ft-filter-level":ki,"ft-snap-scroll":$i,"ft-typography":ee},Si([i.property({type:String})],t.FtFilter.prototype,"id",void 0),Si([i.property({type:String})],t.FtFilter.prototype,"label",void 0),Si([i.property({type:String})],t.FtFilter.prototype,"filterPlaceHolder",void 0),Si([i.property({type:String})],t.FtFilter.prototype,"clearButtonLabel",void 0),Si([i.property({type:String})],t.FtFilter.prototype,"moreValuesButtonLabel",void 0),Si([i.property({type:Array})],t.FtFilter.prototype,"options",void 0),Si([i.property({type:Boolean})],t.FtFilter.prototype,"multivalued",void 0),Si([i.property({type:Boolean})],t.FtFilter.prototype,"disabled",void 0),Si([i.property({type:Boolean})],t.FtFilter.prototype,"raiseSelectedOptions",void 0),Si([i.property({type:Number})],t.FtFilter.prototype,"displayedValuesLimit",void 0),Si([i.query(".ft-filter--container")],t.FtFilter.prototype,"container",void 0),Si([i.query(".ft-filter--values")],t.FtFilter.prototype,"valuesContainer",void 0),Si([i.query(".ft-filter--levels")],t.FtFilter.prototype,"levelsContainer",void 0),Si([i.query(".ft-filter--levels ft-filter-level:last-child")],t.FtFilter.prototype,"lastLevel",void 0),Si([i.queryAll(".ft-filter--levels ft-filter-level")],t.FtFilter.prototype,"levels",void 0),Si([i.state()],t.FtFilter.prototype,"withScroll",void 0),Si([i.state()],t.FtFilter.prototype,"filter",void 0),Si([i.state()],t.FtFilter.prototype,"slideIn",void 0),Si([i.state()],t.FtFilter.prototype,"slideOut",void 0),t.FtFilter=Si([r.customElement("ft-filter")],t.FtFilter),t.FtFilterChangeEvent=Ti,t.FtFilterCssVariables=Oi,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.wcUtils,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litStyleMap);
|