@fluid-topics/ft-filterable-table 0.1.16 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-filterable-table.d.ts +2 -2
- package/build/ft-filterable-table.inline-styles.js +1181 -0
- package/build/ft-filterable-table.js +110 -112
- package/build/ft-filterable-table.light.js +684 -727
- package/build/ft-filterable-table.min.js +718 -758
- package/build/index.d.ts +2 -0
- package/build/index.js +5 -0
- package/build/inline-styles.d.ts +2 -0
- package/build/inline-styles.js +4 -0
- package/package.json +8 -8
|
@@ -1,537 +1,367 @@
|
|
|
1
|
-
!function(t,e,i,
|
|
1
|
+
!function(t,e,i,o,n,s,l){
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var
|
|
7
|
+
var r;const a=globalThis.trustedTypes,p=a?a.createPolicy("lit-html",{createHTML:t=>t}):void 0,f=`lit$${(Math.random()+"").slice(9)}$`,d="?"+f,h=`<${d}>`,c=document,u=(t="")=>c.createComment(t),b=t=>null===t||"object"!=typeof t&&"function"!=typeof t,x=Array.isArray,v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,g=/>/g,m=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,$=/'/g,w=/"/g,k=/^(?:script|style|textarea|title)$/i,z=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),S=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),C=new WeakMap,E=c.createTreeWalker(c,129,null,!1),F=(t,e)=>{const i=t.length-1,o=[];let n,s=2===e?"<svg>":"",l=v;for(let e=0;e<i;e++){const i=t[e];let r,a,p=-1,d=0;for(;d<i.length&&(l.lastIndex=d,a=l.exec(i),null!==a);)d=l.lastIndex,l===v?"!--"===a[1]?l=y:void 0!==a[1]?l=g:void 0!==a[2]?(k.test(a[2])&&(n=RegExp("</"+a[2],"g")),l=m):void 0!==a[3]&&(l=m):l===m?">"===a[0]?(l=null!=n?n:v,p=-1):void 0===a[1]?p=-2:(p=l.lastIndex-a[2].length,r=a[1],l=void 0===a[3]?m:'"'===a[3]?w:$):l===w||l===$?l=m:l===y||l===g?l=v:(l=m,n=void 0);const c=l===m&&t[e+1].startsWith("/>")?" ":"";s+=l===v?i+h:p>=0?(o.push(r),i.slice(0,p)+"$lit$"+i.slice(p)+f+c):i+f+(-2===p?(o.push(void 0),e):c)}const r=s+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==p?p.createHTML(r):r,o]};class D{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,s=0;const l=t.length-1,r=this.parts,[p,h]=F(t,e);if(this.el=D.createElement(p,i),E.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=E.nextNode())&&r.length<l;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(f)){const i=h[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(f),e=/([.?@])?(.*)/.exec(i);r.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?N:"?"===e[1]?Z:"@"===e[1]?_:A})}else r.push({type:6,index:n})}for(const e of t)o.removeAttribute(e)}if(k.test(o.tagName)){const t=o.textContent.split(f),e=t.length-1;if(e>0){o.textContent=a?a.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],u()),E.nextNode(),r.push({type:2,index:++n});o.append(t[e],u())}}}else if(8===o.nodeType)if(o.data===d)r.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(f,t+1));)r.push({type:7,index:n}),t+=f.length-1}n++}}static createElement(t,e){const i=c.createElement("template");return i.innerHTML=t,i}}function j(t,e,i=t,o){var n,s,l,r;if(e===S)return e;let a=void 0!==o?null===(n=i._$Cl)||void 0===n?void 0:n[o]:i._$Cu;const p=b(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(s=null==a?void 0:a._$AO)||void 0===s||s.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,i,o)),void 0!==o?(null!==(l=(r=i)._$Cl)&&void 0!==l?l:r._$Cl=[])[o]=a:i._$Cu=a),void 0!==a&&(e=j(t,a._$AS(t,e.values),a,o)),e}class I{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:o}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:c).importNode(i,!0);E.currentNode=n;let s=E.nextNode(),l=0,r=0,a=o[0];for(;void 0!==a;){if(l===a.index){let e;2===a.type?e=new B(s,s.nextSibling,this,t):1===a.type?e=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(e=new R(s,this,t)),this.v.push(e),a=o[++r]}l!==(null==a?void 0:a.index)&&(s=E.nextNode(),l++)}return n}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 B{constructor(t,e,i,o){var n;this.type=2,this._$AH=O,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cg=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}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=j(this,t,e),b(t)?t===O||null==t||""===t?(this._$AH!==O&&this._$AR(),this._$AH=O):t!==this._$AH&&t!==S&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var e;return x(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!==O&&b(this._$AH)?this._$AA.nextSibling.data=t:this.S(c.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=D.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.m(i);else{const t=new I(n,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=C.get(t.strings);return void 0===e&&C.set(t.strings,e=new D(t)),e}A(t){x(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new B(this.M(u()),this.M(u()),this,this.options)):i=e[o],i._$AI(n),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$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 A{constructor(t,e,i,o,n){this.type=1,this._$AH=O,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=O}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const n=this.strings;let s=!1;if(void 0===n)t=j(this,t,e,0),s=!b(t)||t!==this._$AH&&t!==S,s&&(this._$AH=t);else{const o=t;let l,r;for(t=n[0],l=0;l<n.length-1;l++)r=j(this,o[i+l],e,l),r===S&&(r=this._$AH[l]),s||(s=!b(r)||r!==this._$AH[l]),r===O?t=O:t!==O&&(t+=(null!=r?r:"")+n[l+1]),this._$AH[l]=r}s&&!o&&this.k(t)}k(t){t===O?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class N extends A{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===O?void 0:t}}const T=a?a.emptyScript:"";class Z extends A{constructor(){super(...arguments),this.type=4}k(t){t&&t!==O?this.element.setAttribute(this.name,T):this.element.removeAttribute(this.name)}}class _ extends A{constructor(t,e,i,o,n){super(t,e,i,o,n),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=j(this,t,e,0))&&void 0!==i?i:O)===S)return;const o=this._$AH,n=t===O&&o!==O||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==O&&(o===O||n);n&&this.element.removeEventListener(this.name,this,o),s&&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 R{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){j(this,t)}}const M=window.litHtmlPolyfillSupport;null==M||M(D,B),(null!==(r=globalThis.litHtmlVersions)&&void 0!==r?r:globalThis.litHtmlVersions=[]).push("2.1.3");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const U=t=>({_$litStatic$:t}),
|
|
13
|
+
const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;let s,l;const r=[],a=[];let p,f=0,d=!1;for(;f<n;){for(p=e[f];f<n&&void 0!==(l=i[f],s=null===(o=l)||void 0===o?void 0:o._$litStatic$);)p+=s+e[++f],d=!0;a.push(l),r.push(p),f++}if(f===n&&r.push(e[n]),d){const t=r.join("$$lit$$");void 0===(e=H.get(t))&&(r.raw=r,H.set(t,e=r)),i=a}return t(e,...i)})(z);var W,K=function(t,e,i,o){for(var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};!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"}(W||(W={}));const G=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),P=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),V={fontFamily:P,fontSize:e.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:e.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},q=e.FtCssVariable.extend("--ft-typography-title-font-family",G),X=e.FtCssVariable.extend("--ft-typography-title-font-size",V.fontSize,"20px"),Y=e.FtCssVariable.extend("--ft-typography-title-font-weight",V.fontWeight,"normal"),J=e.FtCssVariable.extend("--ft-typography-title-letter-spacing",V.letterSpacing,"0.15px"),Q=e.FtCssVariable.extend("--ft-typography-title-line-height",V.lineHeight,"24px"),tt=e.FtCssVariable.extend("--ft-typography-title-text-transform",V.textTransform,"inherit"),et=e.FtCssVariable.extend("--ft-typography-title-dense-font-family",G),it=e.FtCssVariable.extend("--ft-typography-title-dense-font-size",V.fontSize,"14px"),ot=e.FtCssVariable.extend("--ft-typography-title-dense-font-weight",V.fontWeight,"normal"),nt=e.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",V.letterSpacing,"0.105px"),st=e.FtCssVariable.extend("--ft-typography-title-dense-line-height",V.lineHeight,"24px"),lt=e.FtCssVariable.extend("--ft-typography-title-dense-text-transform",V.textTransform,"inherit"),rt=e.FtCssVariable.extend("--ft-typography-subtitle1-font-family",P),at=e.FtCssVariable.extend("--ft-typography-subtitle1-font-size",V.fontSize,"16px"),pt=e.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",V.fontWeight,"600"),ft=e.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",V.letterSpacing,"0.144px"),dt=e.FtCssVariable.extend("--ft-typography-subtitle1-line-height",V.lineHeight,"24px"),ht=e.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",V.textTransform,"inherit"),ct=e.FtCssVariable.extend("--ft-typography-subtitle2-font-family",P),ut=e.FtCssVariable.extend("--ft-typography-subtitle2-font-size",V.fontSize,"14px"),bt=e.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",V.fontWeight,"normal"),xt=e.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",V.letterSpacing,"0.098px"),vt=e.FtCssVariable.extend("--ft-typography-subtitle2-line-height",V.lineHeight,"24px"),yt=e.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",V.textTransform,"inherit"),gt={fontFamily:e.FtCssVariable.extend("--ft-typography-body1-font-family",P),fontSize:e.FtCssVariable.extend("--ft-typography-body1-font-size",V.fontSize,"16px"),fontWeight:e.FtCssVariable.extend("--ft-typography-body1-font-weight",V.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-body1-letter-spacing",V.letterSpacing,"0.496px"),lineHeight:e.FtCssVariable.extend("--ft-typography-body1-line-height",V.lineHeight,"24px"),textTransform:e.FtCssVariable.extend("--ft-typography-body1-text-transform",V.textTransform,"inherit")},mt=e.FtCssVariable.extend("--ft-typography-body2-font-family",P),$t=e.FtCssVariable.extend("--ft-typography-body2-font-size",V.fontSize,"14px"),wt=e.FtCssVariable.extend("--ft-typography-body2-font-weight",V.fontWeight,"normal"),kt=e.FtCssVariable.extend("--ft-typography-body2-letter-spacing",V.letterSpacing,"0.252px"),zt=e.FtCssVariable.extend("--ft-typography-body2-line-height",V.lineHeight,"20px"),St=e.FtCssVariable.extend("--ft-typography-body2-text-transform",V.textTransform,"inherit"),Ot={fontFamily:e.FtCssVariable.extend("--ft-typography-caption-font-family",P),fontSize:e.FtCssVariable.extend("--ft-typography-caption-font-size",V.fontSize,"12px"),fontWeight:e.FtCssVariable.extend("--ft-typography-caption-font-weight",V.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-caption-letter-spacing",V.letterSpacing,"0.396px"),lineHeight:e.FtCssVariable.extend("--ft-typography-caption-line-height",V.lineHeight,"16px"),textTransform:e.FtCssVariable.extend("--ft-typography-caption-text-transform",V.textTransform,"inherit")},Ct=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",P),Et=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",V.fontSize,"10px"),Ft=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",V.fontWeight,"normal"),Dt=e.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",V.letterSpacing,"0.33px"),jt=e.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",V.lineHeight,"16px"),It=e.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",V.textTransform,"inherit"),Bt=e.FtCssVariable.extend("--ft-typography-overline-font-family",P),At=e.FtCssVariable.extend("--ft-typography-overline-font-size",V.fontSize,"10px"),Nt=e.FtCssVariable.extend("--ft-typography-overline-font-weight",V.fontWeight,"normal"),Tt=e.FtCssVariable.extend("--ft-typography-overline-letter-spacing",V.letterSpacing,"1.5px"),Zt=e.FtCssVariable.extend("--ft-typography-overline-line-height",V.lineHeight,"16px"),_t=e.FtCssVariable.extend("--ft-typography-overline-text-transform",V.textTransform,"uppercase"),Rt={fontFamily:e.FtCssVariable.extend("--ft-typography-button-font-family",P),fontSize:e.FtCssVariable.extend("--ft-typography-button-font-size",V.fontSize,"14px"),fontWeight:e.FtCssVariable.extend("--ft-typography-button-font-weight",V.fontWeight,"600"),letterSpacing:e.FtCssVariable.extend("--ft-typography-button-letter-spacing",V.letterSpacing,"1.246px"),lineHeight:e.FtCssVariable.extend("--ft-typography-button-line-height",V.lineHeight,"16px"),textTransform:e.FtCssVariable.extend("--ft-typography-button-text-transform",V.textTransform,"uppercase")},Mt=i.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
|
-
font-family: ${
|
|
16
|
-
font-size: ${
|
|
17
|
-
font-weight: ${
|
|
18
|
-
letter-spacing: ${
|
|
19
|
-
line-height: ${
|
|
20
|
-
text-transform: ${
|
|
15
|
+
font-family: ${q};
|
|
16
|
+
font-size: ${X};
|
|
17
|
+
font-weight: ${Y};
|
|
18
|
+
letter-spacing: ${J};
|
|
19
|
+
line-height: ${Q};
|
|
20
|
+
text-transform: ${tt};
|
|
21
21
|
}
|
|
22
|
-
`,Ut=
|
|
22
|
+
`,Ut=i.css`
|
|
23
23
|
.ft-typography--title-dense {
|
|
24
|
-
font-family: ${
|
|
25
|
-
font-size: ${
|
|
24
|
+
font-family: ${et};
|
|
25
|
+
font-size: ${it};
|
|
26
26
|
font-weight: ${ot};
|
|
27
|
-
letter-spacing: ${
|
|
28
|
-
line-height: ${
|
|
29
|
-
text-transform: ${
|
|
27
|
+
letter-spacing: ${nt};
|
|
28
|
+
line-height: ${st};
|
|
29
|
+
text-transform: ${lt};
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,Ht=i.css`
|
|
32
32
|
.ft-typography--subtitle1 {
|
|
33
|
-
font-family: ${
|
|
34
|
-
font-size: ${
|
|
35
|
-
font-weight: ${
|
|
36
|
-
letter-spacing: ${
|
|
37
|
-
line-height: ${
|
|
38
|
-
text-transform: ${
|
|
33
|
+
font-family: ${rt};
|
|
34
|
+
font-size: ${at};
|
|
35
|
+
font-weight: ${pt};
|
|
36
|
+
letter-spacing: ${ft};
|
|
37
|
+
line-height: ${dt};
|
|
38
|
+
text-transform: ${ht};
|
|
39
39
|
}
|
|
40
|
-
`,Lt=
|
|
40
|
+
`,Lt=i.css`
|
|
41
41
|
.ft-typography--subtitle2 {
|
|
42
|
-
font-family: ${
|
|
43
|
-
font-size: ${
|
|
44
|
-
font-weight: ${
|
|
45
|
-
letter-spacing: ${
|
|
46
|
-
line-height: ${
|
|
47
|
-
text-transform: ${
|
|
42
|
+
font-family: ${ct};
|
|
43
|
+
font-size: ${ut};
|
|
44
|
+
font-weight: ${bt};
|
|
45
|
+
letter-spacing: ${xt};
|
|
46
|
+
line-height: ${vt};
|
|
47
|
+
text-transform: ${yt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,Wt=i.css`
|
|
51
51
|
.ft-typography--body1 {
|
|
52
|
-
font-family: ${
|
|
53
|
-
font-size: ${
|
|
54
|
-
font-weight: ${
|
|
55
|
-
letter-spacing: ${
|
|
56
|
-
line-height: ${
|
|
57
|
-
text-transform: ${
|
|
52
|
+
font-family: ${gt.fontFamily};
|
|
53
|
+
font-size: ${gt.fontSize};
|
|
54
|
+
font-weight: ${gt.fontWeight};
|
|
55
|
+
letter-spacing: ${gt.letterSpacing};
|
|
56
|
+
line-height: ${gt.lineHeight};
|
|
57
|
+
text-transform: ${gt.textTransform};
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,Kt=i.css`
|
|
60
60
|
.ft-typography--body2 {
|
|
61
|
-
font-family: ${
|
|
62
|
-
font-size: ${
|
|
63
|
-
font-weight: ${
|
|
64
|
-
letter-spacing: ${
|
|
61
|
+
font-family: ${mt};
|
|
62
|
+
font-size: ${$t};
|
|
63
|
+
font-weight: ${wt};
|
|
64
|
+
letter-spacing: ${kt};
|
|
65
65
|
line-height: ${zt};
|
|
66
|
-
text-transform: ${
|
|
66
|
+
text-transform: ${St};
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,Gt=i.css`
|
|
69
69
|
.ft-typography--caption {
|
|
70
|
-
font-family: ${
|
|
71
|
-
font-size: ${
|
|
72
|
-
font-weight: ${
|
|
73
|
-
letter-spacing: ${
|
|
74
|
-
line-height: ${
|
|
75
|
-
text-transform: ${
|
|
70
|
+
font-family: ${Ot.fontFamily};
|
|
71
|
+
font-size: ${Ot.fontSize};
|
|
72
|
+
font-weight: ${Ot.fontWeight};
|
|
73
|
+
letter-spacing: ${Ot.letterSpacing};
|
|
74
|
+
line-height: ${Ot.lineHeight};
|
|
75
|
+
text-transform: ${Ot.textTransform};
|
|
76
76
|
}
|
|
77
|
-
`,
|
|
77
|
+
`,Pt=i.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
|
-
font-family: ${
|
|
80
|
-
font-size: ${
|
|
81
|
-
font-weight: ${
|
|
79
|
+
font-family: ${Ct};
|
|
80
|
+
font-size: ${Et};
|
|
81
|
+
font-weight: ${Ft};
|
|
82
82
|
letter-spacing: ${Dt};
|
|
83
|
-
line-height: ${
|
|
84
|
-
text-transform: ${
|
|
83
|
+
line-height: ${jt};
|
|
84
|
+
text-transform: ${It};
|
|
85
85
|
}
|
|
86
|
-
`,
|
|
86
|
+
`,Vt=i.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
|
-
font-family: ${
|
|
89
|
-
font-size: ${
|
|
90
|
-
font-weight: ${
|
|
91
|
-
letter-spacing: ${
|
|
92
|
-
line-height: ${
|
|
93
|
-
text-transform: ${
|
|
88
|
+
font-family: ${Bt};
|
|
89
|
+
font-size: ${At};
|
|
90
|
+
font-weight: ${Nt};
|
|
91
|
+
letter-spacing: ${Tt};
|
|
92
|
+
line-height: ${Zt};
|
|
93
|
+
text-transform: ${_t};
|
|
94
94
|
}
|
|
95
|
-
`,
|
|
95
|
+
`,qt=i.css`
|
|
96
96
|
.ft-typography--button {
|
|
97
|
-
font-family: ${
|
|
98
|
-
font-size: ${
|
|
99
|
-
font-weight: ${
|
|
100
|
-
letter-spacing: ${
|
|
101
|
-
line-height: ${
|
|
102
|
-
text-transform: ${
|
|
97
|
+
font-family: ${Rt.fontFamily};
|
|
98
|
+
font-size: ${Rt.fontSize};
|
|
99
|
+
font-weight: ${Rt.fontWeight};
|
|
100
|
+
letter-spacing: ${Rt.letterSpacing};
|
|
101
|
+
line-height: ${Rt.lineHeight};
|
|
102
|
+
text-transform: ${Rt.textTransform};
|
|
103
103
|
}
|
|
104
|
-
`;
|
|
105
|
-
.ft-typography {
|
|
106
|
-
vertical-align: inherit;
|
|
107
|
-
}
|
|
108
|
-
`]}getTemplate(){return this.element?L`
|
|
104
|
+
`;class Xt extends e.FtLitElement{constructor(){super(...arguments),this.variant=W.body1}render(){return this.element?L`
|
|
109
105
|
<${U(this.element)}
|
|
110
106
|
class="ft-typography ft-typography--${this.variant}">
|
|
111
107
|
<slot></slot>
|
|
112
108
|
</${U(this.element)}>
|
|
113
109
|
`:L`
|
|
114
110
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
115
|
-
`}}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
.ft-input-label {
|
|
123
|
-
border-color: ${Qt.borderColor};
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.ft-input-label:before,
|
|
127
|
-
.ft-input-label:after {
|
|
128
|
-
content: "";
|
|
129
|
-
display: flex;
|
|
130
|
-
border-bottom-width: 1px;
|
|
131
|
-
border-bottom-style: solid;
|
|
132
|
-
border-color: inherit;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.ft-input-label:before {
|
|
136
|
-
width: ${Qt.horizontalSpacing};
|
|
137
|
-
flex-shrink: 0;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.ft-input-label:after {
|
|
141
|
-
flex-grow: 1;
|
|
142
|
-
flex-shrink: 1;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.ft-input-label--text {
|
|
146
|
-
display: flex;
|
|
147
|
-
flex-shrink: 1;
|
|
148
|
-
position: relative;
|
|
149
|
-
border-bottom-width: 1px;
|
|
150
|
-
border-bottom-style: solid;
|
|
151
|
-
border-color: inherit;
|
|
152
|
-
color: ${Qt.textColor};
|
|
153
|
-
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
154
|
-
${a.setVariable(At.fontSize,Qt.fontSize)};
|
|
155
|
-
${a.setVariable(At.lineHeight,Qt.fontSize)};
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.ft-input-label--disabled .ft-input-label--text {
|
|
159
|
-
color: ${Qt.disabledTextColor};
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.ft-input-label--hidden-text {
|
|
163
|
-
padding: 0 4px;
|
|
164
|
-
opacity: 0;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.ft-input-label--floating-text {
|
|
168
|
-
position: absolute;
|
|
169
|
-
top: calc(50% - var(--ft-typography-caption-line-height) / 2);
|
|
170
|
-
transition: top 250ms;
|
|
171
|
-
width: calc(100% - 8px);
|
|
172
|
-
overflow: hidden;
|
|
173
|
-
white-space: nowrap;
|
|
174
|
-
text-overflow: ellipsis;
|
|
175
|
-
padding: ${Qt.verticalSpacing} 4px;
|
|
176
|
-
margin: calc(${Qt.verticalSpacing} * -1) 0;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.ft-input-label--raised .ft-input-label--text {
|
|
180
|
-
${a.setVariable(At.fontSize,Qt.raisedFontSize)};
|
|
181
|
-
${a.setVariable(At.lineHeight,Qt.raisedFontSize)};
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.ft-input-label--raised .ft-input-label--floating-text {
|
|
185
|
-
top: ${Qt.verticalSpacing};
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.ft-input-label--outlined .ft-input-label--text,
|
|
189
|
-
.ft-input-label--outlined:before,
|
|
190
|
-
.ft-input-label--outlined:after {
|
|
191
|
-
border-top-width: 1px;
|
|
192
|
-
border-top-style: solid;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.ft-input-label--outlined:before {
|
|
196
|
-
border-left-width: 1px;
|
|
197
|
-
border-left-style: solid;
|
|
198
|
-
border-radius: ${Qt.borderRadiusS} 0 0 ${Qt.borderRadiusS};
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.ft-input-label--outlined:after {
|
|
202
|
-
border-right-width: 1px;
|
|
203
|
-
border-right-style: solid;
|
|
204
|
-
border-radius: 0 ${Qt.borderRadiusS} ${Qt.borderRadiusS} 0;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
208
|
-
padding: 2px 4px;
|
|
209
|
-
z-index: ${Qt.raisedZIndex};
|
|
210
|
-
background-color: ${Qt.colorSurface};
|
|
211
|
-
border-radius: ${Qt.borderRadiusS};
|
|
212
|
-
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
216
|
-
border-top: none;
|
|
217
|
-
}
|
|
218
|
-
`]}getTemplate(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled};return e.html`
|
|
219
|
-
<div class="${n.classMap(t)}">
|
|
220
|
-
${this.text?e.html`
|
|
111
|
+
`}}Xt.styles=[Mt,Ut,Ht,Lt,Wt,Kt,Gt,Pt,Vt,qt,i.css`
|
|
112
|
+
.ft-typography {
|
|
113
|
+
vertical-align: inherit;
|
|
114
|
+
}
|
|
115
|
+
`],K([o.property()],Xt.prototype,"element",void 0),K([o.property()],Xt.prototype,"variant",void 0),e.customElement("ft-typography")(Xt);var Yt=function(t,e,i,o){for(var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};const Jt={fontSize:e.FtCssVariable.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:e.FtCssVariable.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:e.FtCssVariable.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:e.FtCssVariable.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariable.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:e.FtCssVariable.extend("--ft-input-label-border-color",e.designSystemVariables.colorOutline),textColor:e.FtCssVariable.extend("--ft-input-label-text-color",e.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:e.FtCssVariable.extend("--ft-input-label-disabled-text-color",e.designSystemVariables.colorOnSurfaceDisabled),colorSurface:e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system"),borderRadiusS:e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system")};class Qt extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled};return i.html`
|
|
116
|
+
<div class="${l.classMap(t)}">
|
|
117
|
+
${this.text?i.html`
|
|
221
118
|
<div class="ft-input-label--text ft-typography--caption">
|
|
222
119
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
223
120
|
<span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span>
|
|
224
121
|
</div>
|
|
225
122
|
`:null}
|
|
226
123
|
</div>
|
|
227
|
-
`}}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
purpose with or without fee is hereby granted.
|
|
233
|
-
|
|
234
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
235
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
236
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
237
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
238
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
239
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
240
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
241
|
-
***************************************************************************** */
|
|
242
|
-
var ee=function(t,e){return ee=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])},ee(t,e)};var ie=function(){return ie=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},ie.apply(this,arguments)};function re(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n}function oe(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.")}
|
|
243
|
-
/**
|
|
244
|
-
* @license
|
|
245
|
-
* Copyright 2018 Google Inc.
|
|
246
|
-
*
|
|
247
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
248
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
249
|
-
* in the Software without restriction, including without limitation the rights
|
|
250
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
251
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
252
|
-
* furnished to do so, subject to the following conditions:
|
|
253
|
-
*
|
|
254
|
-
* The above copyright notice and this permission notice shall be included in
|
|
255
|
-
* all copies or substantial portions of the Software.
|
|
256
|
-
*
|
|
257
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
258
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
259
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
260
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
261
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
262
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
263
|
-
* THE SOFTWARE.
|
|
264
|
-
*/
|
|
265
|
-
/**
|
|
266
|
-
* @license
|
|
267
|
-
* Copyright 2018 Google LLC
|
|
268
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
269
|
-
*/
|
|
270
|
-
const ae=()=>{},ne={get passive(){return!1}};document.addEventListener("x",ae,ne),document.removeEventListener("x",ae);
|
|
271
|
-
/**
|
|
272
|
-
* @license
|
|
273
|
-
* Copyright 2018 Google LLC
|
|
274
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
275
|
-
*/
|
|
276
|
-
class se 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()}}
|
|
277
|
-
/**
|
|
278
|
-
* @license
|
|
279
|
-
* Copyright 2016 Google Inc.
|
|
280
|
-
*
|
|
281
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
282
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
283
|
-
* in the Software without restriction, including without limitation the rights
|
|
284
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
285
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
286
|
-
* furnished to do so, subject to the following conditions:
|
|
287
|
-
*
|
|
288
|
-
* The above copyright notice and this permission notice shall be included in
|
|
289
|
-
* all copies or substantial portions of the Software.
|
|
290
|
-
*
|
|
291
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
292
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
293
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
294
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
295
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
296
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
297
|
-
* THE SOFTWARE.
|
|
298
|
-
*/var le=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}(),pe={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"},ce={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"},de={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};
|
|
299
|
-
/**
|
|
300
|
-
* @license
|
|
301
|
-
* Copyright 2016 Google Inc.
|
|
302
|
-
*
|
|
303
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
304
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
305
|
-
* in the Software without restriction, including without limitation the rights
|
|
306
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
307
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
308
|
-
* furnished to do so, subject to the following conditions:
|
|
309
|
-
*
|
|
310
|
-
* The above copyright notice and this permission notice shall be included in
|
|
311
|
-
* all copies or substantial portions of the Software.
|
|
312
|
-
*
|
|
313
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
314
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
315
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
316
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
317
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
318
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
319
|
-
* THE SOFTWARE.
|
|
320
|
-
*/
|
|
321
|
-
/**
|
|
322
|
-
* @license
|
|
323
|
-
* Copyright 2016 Google Inc.
|
|
324
|
-
*
|
|
325
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
326
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
327
|
-
* in the Software without restriction, including without limitation the rights
|
|
328
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
329
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
330
|
-
* furnished to do so, subject to the following conditions:
|
|
331
|
-
*
|
|
332
|
-
* The above copyright notice and this permission notice shall be included in
|
|
333
|
-
* all copies or substantial portions of the Software.
|
|
334
|
-
*
|
|
335
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
336
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
337
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
338
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
339
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
340
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
341
|
-
* THE SOFTWARE.
|
|
342
|
-
*/
|
|
343
|
-
var fe=["touchstart","pointerdown","mousedown","keydown"],ue=["touchend","pointerup","mouseup","contextmenu"],he=[],me=function(t){function e(i){var r=t.call(this,ie(ie({},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 function(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}ee(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return pe},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return ce},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return de},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,a=r.UNBOUNDED;requestAnimationFrame((function(){t.adapter.addClass(o),t.adapter.isUnbounded()&&(t.adapter.addClass(a),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=oe(fe),o=r.next();!o.done;o=r.next()){var a=o.value;this.adapter.registerInteractionHandler(a,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=oe(ue),o=r.next();!o.done;o=r.next()){var a=o.value;this.adapter.registerDocumentInteractionHandler(a,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=oe(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=oe(ue),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&&he.length>0&&he.some((function(t){return e.adapter.containsEventTarget(t)}))?this.resetActivationState():(void 0!==t&&(he.push(t.target),this.registerDeactivationHandlers(t)),i.wasElementMadeActive=this.checkElementMadeActive(t),i.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){he=[],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,a=e.cssClasses,n=a.FG_DEACTIVATION,s=a.FG_ACTIVATION,l=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var p="",c="";if(!this.adapter.isUnbounded()){var d=this.getFgTranslationCoordinates(),f=d.startPoint,u=d.endPoint;p=f.x+"px, "+f.y+"px",c=u.x+"px, "+u.y+"px"}this.adapter.updateCssVariable(r,p),this.adapter.updateCssVariable(o,c),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(n),this.adapter.computeBoundingRect(),this.adapter.addClass(s),this.activationTimer=setTimeout((function(){t.activationTimerCallback()}),l)},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,a=e.x,n=e.y,s=a+i.left,l=n+i.top;if("touchstart"===t.type){var p=t;r=p.changedTouches[0].pageX-s,o=p.changedTouches[0].pageY-l}else{var c=t;r=c.pageX-s,o=c.pageY-l}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,a=r.isActivated;(o||!a)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(i),this.fgDeactivationRemovalTimer=setTimeout((function(){t.adapter.removeClass(i)}),de.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=ie({},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,a=t.VAR_FG_SCALE;this.adapter.updateCssVariable(i,this.initialSize+"px"),this.adapter.updateCssVariable(a,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}(le),ye=me;
|
|
344
|
-
/**
|
|
345
|
-
* @license
|
|
346
|
-
* Copyright 2018 Google LLC
|
|
347
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
348
|
-
*/
|
|
349
|
-
class ve extends se{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}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`
|
|
350
|
-
<div class="mdc-ripple-surface mdc-ripple-upgraded ${n.classMap(r)}"
|
|
351
|
-
style="${s.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>`}}re([i.query(".mdc-ripple-surface")],ve.prototype,"mdcRoot",void 0),re([i.property({type:Boolean})],ve.prototype,"primary",void 0),re([i.property({type:Boolean})],ve.prototype,"accent",void 0),re([i.property({type:Boolean})],ve.prototype,"unbounded",void 0),re([i.property({type:Boolean})],ve.prototype,"disabled",void 0),re([i.property({type:Boolean})],ve.prototype,"activated",void 0),re([i.property({type:Boolean})],ve.prototype,"selected",void 0),re([i.property({type:Boolean})],ve.prototype,"internalUseStateLayerCustomProperties",void 0),re([i.state()],ve.prototype,"hovering",void 0),re([i.state()],ve.prototype,"bgFocused",void 0),re([i.state()],ve.prototype,"fgActivation",void 0),re([i.state()],ve.prototype,"fgDeactivation",void 0),re([i.state()],ve.prototype,"fgScale",void 0),re([i.state()],ve.prototype,"fgSize",void 0),re([i.state()],ve.prototype,"translateStart",void 0),re([i.state()],ve.prototype,"translateEnd",void 0),re([i.state()],ve.prototype,"leftPos",void 0),re([i.state()],ve.prototype,"topPos",void 0);
|
|
352
|
-
/**
|
|
353
|
-
* @license
|
|
354
|
-
* Copyright 2021 Google LLC
|
|
355
|
-
* SPDX-LIcense-Identifier: Apache-2.0
|
|
356
|
-
*/
|
|
357
|
-
const ge=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)}`
|
|
358
|
-
/**
|
|
359
|
-
* @license
|
|
360
|
-
* Copyright 2018 Google LLC
|
|
361
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
362
|
-
*/;let be=class extends ve{};be.styles=[ge],be=re([i.customElement("mwc-ripple")],be);
|
|
363
|
-
/**
|
|
364
|
-
* @license
|
|
365
|
-
* Copyright 2020 Google LLC
|
|
366
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
367
|
-
*/
|
|
368
|
-
class xe{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()}))}}}var $e=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};const we={color:a.FtCssVariable.extend("--ft-ripple-color",a.designSystemVariables.colorContent),primaryColor:a.FtCssVariable.extend("--ft-ripple-primary-color",a.FtCssVariable.extend("--ft-ripple-color",a.designSystemVariables.colorPrimary)),secondaryColor:a.FtCssVariable.extend("--ft-ripple-secondary-color",a.FtCssVariable.extend("--ft-ripple-color",a.designSystemVariables.colorSecondary)),opacityContentOnSurfacePressed:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),opacityContentOnSurfaceDragged:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfaceDragged,"Design system")};let ke=class extends a.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`
|
|
369
|
-
:host {
|
|
370
|
-
display: contents;
|
|
371
|
-
|
|
372
|
-
--mdc-ripple-color: ${we.color};
|
|
373
|
-
--mdc-ripple-press-opacity: ${we.opacityContentOnSurfacePressed};
|
|
374
|
-
--mdc-ripple-hover-opacity: ${we.opacityContentOnSurfaceHover};
|
|
375
|
-
--mdc-ripple-focus-opacity: ${we.opacityContentOnSurfaceFocused};
|
|
376
|
-
--mdc-ripple-selected-opacity: ${we.opacityContentOnSurfaceSelected};
|
|
377
|
-
--mdc-ripple-activated-opacity: ${we.opacityContentOnSurfaceDragged};
|
|
124
|
+
`}}Qt.elementDefinitions={},Qt.styles=[Gt,i.css`
|
|
125
|
+
.ft-input-label {
|
|
126
|
+
position: absolute;
|
|
127
|
+
inset: 0;
|
|
128
|
+
display: flex;
|
|
378
129
|
}
|
|
379
130
|
|
|
380
|
-
|
|
381
|
-
|
|
131
|
+
.ft-input-label {
|
|
132
|
+
border-color: ${Jt.borderColor};
|
|
382
133
|
}
|
|
383
134
|
|
|
384
|
-
|
|
385
|
-
|
|
135
|
+
.ft-input-label:before,
|
|
136
|
+
.ft-input-label:after {
|
|
137
|
+
content: "";
|
|
138
|
+
display: flex;
|
|
139
|
+
border-bottom-width: 1px;
|
|
140
|
+
border-bottom-style: solid;
|
|
141
|
+
border-color: inherit;
|
|
386
142
|
}
|
|
387
|
-
`}getTemplate(){return e.html`
|
|
388
|
-
<mwc-ripple
|
|
389
|
-
class="${this.primary?"ft-ripple--primary":this.secondary?"ft-ripple--secondary":""}"
|
|
390
|
-
?unbounded=${this.unbounded}
|
|
391
|
-
?activated=${this.activated}
|
|
392
|
-
?selected=${this.selected}
|
|
393
|
-
?disabled=${this.disabled}
|
|
394
|
-
></mwc-ripple>
|
|
395
|
-
`}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 xe((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"),a=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",a),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",a),e.removeEventListener("focus",t.startFocus),e.removeEventListener("blur",t.endFocus)},this.rippleHandlers=t}}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};ke.elementDefinitions={"mwc-ripple":be},$e([i.property({type:Boolean})],ke.prototype,"primary",void 0),$e([i.property({type:Boolean})],ke.prototype,"secondary",void 0),$e([i.property({type:Boolean})],ke.prototype,"unbounded",void 0),$e([i.property({type:Boolean})],ke.prototype,"activated",void 0),$e([i.property({type:Boolean})],ke.prototype,"selected",void 0),$e([i.property({type:Boolean})],ke.prototype,"disabled",void 0),$e([i.query("mwc-ripple")],ke.prototype,"mwcRipple",void 0),ke=$e([a.customElement("ft-ripple")],ke);
|
|
396
|
-
/**
|
|
397
|
-
* @license
|
|
398
|
-
* Copyright 2021 Google LLC
|
|
399
|
-
* SPDX-LIcense-Identifier: Apache-2.0
|
|
400
|
-
*/
|
|
401
|
-
const Se=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"}`
|
|
402
|
-
/**
|
|
403
|
-
* @license
|
|
404
|
-
* Copyright 2018 Google LLC
|
|
405
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
406
|
-
*/;let ze=class extends e.LitElement{render(){return e.html`<span><slot></slot></span>`}};ze.styles=[Se],ze=re([i.customElement("mwc-icon")],ze);var Oe=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};let Ae=class extends a.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}getTemplate(){return e.html``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}};Ae.elementDefinitions={},Oe([i.property({type:String})],Ae.prototype,"label",void 0),Oe([i.property({type:Object,converter:t=>t})],Ae.prototype,"value",void 0),Oe([i.property({type:Boolean,reflect:!0})],Ae.prototype,"selected",void 0),Ae=Oe([a.customElement("ft-select-option")],Ae);const Te={labelSize:a.FtCssVariable.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:a.FtCssVariable.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:a.FtCssVariable.create("--ft-select-vertical-spacing","SIZE","4px"),selectedOptionColor:a.FtCssVariable.extend("--ft-select-selected-option-color",a.designSystemVariables.colorOnSurface),helperColor:a.FtCssVariable.extend("--ft-select-helper-color",a.designSystemVariables.colorOnSurfaceMedium),optionsColor:a.FtCssVariable.extend("--ft-select-options-color",a.designSystemVariables.colorOnSurface),optionsZIndex:a.FtCssVariable.create("--ft-select-options-z-index","NUMBER","2"),colorSurface:a.FtCssVariable.external(a.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceDisabled:a.FtCssVariable.external(a.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:a.FtCssVariable.external(a.designSystemVariables.colorPrimary,"Design system"),borderRadiusS:a.FtCssVariable.external(a.designSystemVariables.borderRadiusS,"Design system"),elevation02:a.FtCssVariable.external(a.designSystemVariables.elevation02,"Design system")};let Ce=class extends a.FtLitElement{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}getStyles(){return[Gt,Wt,e.css`
|
|
407
|
-
*:focus {
|
|
408
|
-
outline: none;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
.ft-select {
|
|
412
|
-
display: flex;
|
|
413
|
-
flex-direction: column;
|
|
414
|
-
align-items: stretch;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
.ft-select--main-panel {
|
|
418
|
-
position: relative;
|
|
419
|
-
display: flex;
|
|
420
|
-
height: calc(4 * ${Te.verticalSpacing} + ${Te.labelSize} + ${Te.selectedOptionSize});
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
.ft-select--input-panel {
|
|
424
|
-
flex-grow: 1;
|
|
425
|
-
position: relative;
|
|
426
|
-
display: flex;
|
|
427
|
-
align-items: center;
|
|
428
|
-
overflow: hidden;
|
|
429
|
-
padding-left: 16px;
|
|
430
|
-
padding-right: 8px;
|
|
431
|
-
gap: 8px;
|
|
432
|
-
color: ${Te.selectedOptionColor};
|
|
433
|
-
${a.setVariable(we.color,Te.selectedOptionColor)};
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
.ft-select--input-panel,
|
|
437
|
-
.ft-select--option {
|
|
438
|
-
${a.setVariable(we.opacityContentOnSurfaceHover,"0.08")};
|
|
439
|
-
${a.setVariable(we.opacityContentOnSurfaceDragged,"0.04")};
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
.ft-select--disabled .ft-select--input-panel,
|
|
443
|
-
.ft-select--disabled .ft-select--option {
|
|
444
|
-
color: ${Te.colorOnSurfaceDisabled};
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
448
|
-
.ft-select:not(.ft-select--disabled) .ft-select--option {
|
|
449
|
-
cursor: pointer;
|
|
450
|
-
}
|
|
451
143
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
}
|
|
144
|
+
.ft-input-label:before {
|
|
145
|
+
width: ${Jt.horizontalSpacing};
|
|
146
|
+
flex-shrink: 0;
|
|
147
|
+
}
|
|
457
148
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
149
|
+
.ft-input-label:after {
|
|
150
|
+
flex-grow: 1;
|
|
151
|
+
flex-shrink: 1;
|
|
152
|
+
}
|
|
461
153
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
154
|
+
.ft-input-label--text {
|
|
155
|
+
display: flex;
|
|
156
|
+
flex-shrink: 1;
|
|
157
|
+
position: relative;
|
|
158
|
+
border-bottom-width: 1px;
|
|
159
|
+
border-bottom-style: solid;
|
|
160
|
+
border-color: inherit;
|
|
161
|
+
color: ${Jt.textColor};
|
|
162
|
+
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
163
|
+
${e.setVariable(Ot.fontSize,Jt.fontSize)};
|
|
164
|
+
${e.setVariable(Ot.lineHeight,Jt.fontSize)};
|
|
165
|
+
}
|
|
466
166
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
flex-shrink: 1;
|
|
471
|
-
overflow: hidden;
|
|
472
|
-
white-space: nowrap;
|
|
473
|
-
text-overflow: ellipsis;
|
|
474
|
-
${a.setVariable(xt.fontSize,Te.selectedOptionSize)};
|
|
475
|
-
${a.setVariable(xt.lineHeight,Te.selectedOptionSize)};
|
|
476
|
-
}
|
|
167
|
+
.ft-input-label--disabled .ft-input-label--text {
|
|
168
|
+
color: ${Jt.disabledTextColor};
|
|
169
|
+
}
|
|
477
170
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
171
|
+
.ft-input-label--hidden-text {
|
|
172
|
+
padding: 0 4px;
|
|
173
|
+
opacity: 0;
|
|
174
|
+
}
|
|
481
175
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
176
|
+
.ft-input-label--floating-text {
|
|
177
|
+
position: absolute;
|
|
178
|
+
top: calc(50% - var(--ft-typography-caption-line-height) / 2);
|
|
179
|
+
transition: top 250ms;
|
|
180
|
+
width: calc(100% - 8px);
|
|
181
|
+
overflow: hidden;
|
|
182
|
+
white-space: nowrap;
|
|
183
|
+
text-overflow: ellipsis;
|
|
184
|
+
padding: ${Jt.verticalSpacing} 4px;
|
|
185
|
+
margin: calc(${Jt.verticalSpacing} * -1) 0;
|
|
186
|
+
}
|
|
485
187
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
}
|
|
188
|
+
.ft-input-label--raised .ft-input-label--text {
|
|
189
|
+
${e.setVariable(Ot.fontSize,Jt.raisedFontSize)};
|
|
190
|
+
${e.setVariable(Ot.lineHeight,Jt.raisedFontSize)};
|
|
191
|
+
}
|
|
489
192
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
}
|
|
193
|
+
.ft-input-label--raised .ft-input-label--floating-text {
|
|
194
|
+
top: ${Jt.verticalSpacing};
|
|
195
|
+
}
|
|
494
196
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
197
|
+
.ft-input-label--outlined .ft-input-label--text,
|
|
198
|
+
.ft-input-label--outlined:before,
|
|
199
|
+
.ft-input-label--outlined:after {
|
|
200
|
+
border-top-width: 1px;
|
|
201
|
+
border-top-style: solid;
|
|
202
|
+
}
|
|
498
203
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
right: 0;
|
|
505
|
-
color: ${Te.optionsColor};
|
|
506
|
-
background: ${Te.colorSurface};
|
|
507
|
-
z-index: ${Te.optionsZIndex};
|
|
508
|
-
box-shadow: ${Te.elevation02};
|
|
509
|
-
}
|
|
204
|
+
.ft-input-label--outlined:before {
|
|
205
|
+
border-left-width: 1px;
|
|
206
|
+
border-left-style: solid;
|
|
207
|
+
border-radius: ${Jt.borderRadiusS} 0 0 ${Jt.borderRadiusS};
|
|
208
|
+
}
|
|
510
209
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
210
|
+
.ft-input-label--outlined:after {
|
|
211
|
+
border-right-width: 1px;
|
|
212
|
+
border-right-style: solid;
|
|
213
|
+
border-radius: 0 ${Jt.borderRadiusS} ${Jt.borderRadiusS} 0;
|
|
214
|
+
}
|
|
514
215
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
216
|
+
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
217
|
+
padding: 2px 4px;
|
|
218
|
+
z-index: ${Jt.raisedZIndex};
|
|
219
|
+
background-color: ${Jt.colorSurface};
|
|
220
|
+
border-radius: ${Jt.borderRadiusS};
|
|
221
|
+
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
222
|
+
}
|
|
522
223
|
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
224
|
+
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
225
|
+
border-top: none;
|
|
226
|
+
}
|
|
227
|
+
`],Yt([o.property({type:String})],Qt.prototype,"text",void 0),Yt([o.property({type:Boolean})],Qt.prototype,"raised",void 0),Yt([o.property({type:Boolean})],Qt.prototype,"outlined",void 0),Yt([o.property({type:Boolean})],Qt.prototype,"disabled",void 0),e.customElement("ft-input-label")(Qt);var te=function(t,e,i,o){for(var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};const ee={color:e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorContent),primaryColor:e.FtCssVariable.extend("--ft-ripple-primary-color",e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary)),secondaryColor:e.FtCssVariable.extend("--ft-ripple-secondary-color",e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary)),opacityContentOnSurfacePressed:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")};class ie extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed)},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:n}=this.getCoordinates(t),s=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-s.x:s.width/2),this.originY=Math.round(null!=n?n-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return i.html`
|
|
228
|
+
<style>
|
|
229
|
+
.ft-ripple .ft-ripple--effect,
|
|
230
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
231
|
+
width: ${this.rippleSize}px;
|
|
232
|
+
height: ${this.rippleSize}px;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.ft-ripple .ft-ripple--effect {
|
|
236
|
+
left: ${this.originX}px;
|
|
237
|
+
top: ${this.originY}px;
|
|
238
|
+
}
|
|
239
|
+
</style>
|
|
240
|
+
<div class="${l.classMap(t)}">
|
|
241
|
+
<div class="ft-ripple--background"></div>
|
|
242
|
+
<div class="ft-ripple--effect"></div>
|
|
243
|
+
</div>
|
|
244
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple(),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}var oe,ne;ie.elementDefinitions={},ie.styles=i.css`
|
|
245
|
+
:host {
|
|
246
|
+
display: contents;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.ft-ripple {
|
|
250
|
+
position: absolute;
|
|
251
|
+
inset: 0;
|
|
252
|
+
pointer-events: none;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
256
|
+
overflow: hidden;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.ft-ripple .ft-ripple--background,
|
|
260
|
+
.ft-ripple .ft-ripple--effect {
|
|
261
|
+
position: absolute;
|
|
262
|
+
opacity: 0;
|
|
263
|
+
background-color: ${ee.color};
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background,
|
|
267
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
268
|
+
background-color: ${ee.secondaryColor};
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background,
|
|
272
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
273
|
+
background-color: ${ee.primaryColor};
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.ft-ripple .ft-ripple--background {
|
|
277
|
+
top: 0;
|
|
278
|
+
left: 0;
|
|
279
|
+
height: 100%;
|
|
280
|
+
width: 100%;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.ft-ripple .ft-ripple--effect,
|
|
284
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
285
|
+
border-radius: 50%;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.ft-ripple .ft-ripple--effect {
|
|
289
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
290
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
294
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
295
|
+
left: 50%;
|
|
296
|
+
top: 50%;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
300
|
+
transform: translate(-50%, -50%);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
304
|
+
opacity: ${ee.opacityContentOnSurfaceHover};
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
308
|
+
opacity: ${ee.opacityContentOnSurfaceSelected};
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
312
|
+
opacity: ${ee.opacityContentOnSurfaceFocused};
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
316
|
+
opacity: ${ee.opacityContentOnSurfacePressed};
|
|
317
|
+
transform: translate(-50%, -50%) scale(1);
|
|
318
|
+
}
|
|
319
|
+
`,te([o.property({type:Boolean})],ie.prototype,"primary",void 0),te([o.property({type:Boolean})],ie.prototype,"secondary",void 0),te([o.property({type:Boolean})],ie.prototype,"unbounded",void 0),te([o.property({type:Boolean})],ie.prototype,"activated",void 0),te([o.property({type:Boolean})],ie.prototype,"selected",void 0),te([o.property({type:Boolean})],ie.prototype,"disabled",void 0),te([o.state()],ie.prototype,"hovered",void 0),te([o.state()],ie.prototype,"focused",void 0),te([o.state()],ie.prototype,"pressed",void 0),te([o.state()],ie.prototype,"rippling",void 0),te([o.state()],ie.prototype,"rippleSize",void 0),te([o.state()],ie.prototype,"originX",void 0),te([o.state()],ie.prototype,"originY",void 0),te([o.query(".ft-ripple")],ie.prototype,"ripple",void 0),te([o.query(".ft-ripple--effect")],ie.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(ie),function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(oe||(oe={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(ne||(ne={})),new Map([...["abw"].map((t=>[t,ne.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,ne.AUDIO])),...["avi"].map((t=>[t,ne.AVI])),...["chm","xhs"].map((t=>[t,ne.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,ne.CODE])),...["csv"].map((t=>[t,ne.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,ne.DITA])),...["epub"].map((t=>[t,ne.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,ne.EXCEL])),...["flac"].map((t=>[t,ne.FLAC])),...["gif"].map((t=>[t,ne.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,ne.GZIP])),...["html","htm","xhtml"].map((t=>[t,ne.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,ne.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,ne.JPEG])),...["json"].map((t=>[t,ne.JSON])),...["m4a","m4p"].map((t=>[t,ne.M4A])),...["mov","qt"].map((t=>[t,ne.MOV])),...["mp3"].map((t=>[t,ne.MP3])),...["mp4","m4v"].map((t=>[t,ne.MP4])),...["ogg","oga"].map((t=>[t,ne.OGG])),...["pdf","ps"].map((t=>[t,ne.PDF])),...["png"].map((t=>[t,ne.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,ne.POWERPOINT])),...["rar"].map((t=>[t,ne.RAR])),...["stp"].map((t=>[t,ne.STP])),...["txt","rtf","md","mdown"].map((t=>[t,ne.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,ne.VIDEO])),...["wav"].map((t=>[t,ne.WAV])),...["wma"].map((t=>[t,ne.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,ne.WORD])),...["xml","xsl","rdf"].map((t=>[t,ne.XML])),...["yaml","yml","x-yaml"].map((t=>[t,ne.YAML])),...["zip"].map((t=>[t,ne.ZIP]))]);var se,le=function(t,e,i,o){for(var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(se||(se={}));const re={size:e.FtCssVariable.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:e.FtCssVariable.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:e.FtCssVariable.extend("--ft-icon-file-format-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:e.FtCssVariable.extend("--ft-icon-material-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class ae extends e.FtLitElement{constructor(){super(...arguments),this.variant=se.fluid_topics}render(){return i.html`
|
|
320
|
+
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
321
|
+
${s.unsafeHTML(this.getIcon())}
|
|
322
|
+
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
323
|
+
</i>
|
|
324
|
+
`}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:""}getIcon(){var t,e;let o=this.textContent;return this.variant===se.file_format?null!==(t=ne[o.toUpperCase()])&&void 0!==t?t:o:this.variant===se.fluid_topics?null!==(e=oe[o.toUpperCase()])&&void 0!==e?e:o:i.nothing}}ae.elementDefinitions={},ae.styles=i.css`
|
|
325
|
+
:host, i.ft-icon {
|
|
326
|
+
display: inline-block;
|
|
327
|
+
width: ${re.size};
|
|
328
|
+
height: ${re.size};
|
|
329
|
+
text-align: center;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
i.ft-icon {
|
|
333
|
+
font-size: ${re.size};
|
|
334
|
+
line-height: 1;
|
|
335
|
+
font-weight: normal;
|
|
336
|
+
text-transform: none;
|
|
337
|
+
font-style: normal;
|
|
338
|
+
font-variant: normal;
|
|
339
|
+
speak: none;
|
|
340
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
341
|
+
text-rendering: auto;
|
|
342
|
+
-webkit-font-smoothing: antialiased;
|
|
343
|
+
-moz-osx-font-smoothing: grayscale;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.ft-icon--fluid-topics {
|
|
347
|
+
font-family: ${re.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.ft-icon--file-format {
|
|
351
|
+
font-family: ${re.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.ft-icon--material {
|
|
355
|
+
font-family: ${re.materialFontFamily}, "Material Icons", sans-serif;
|
|
356
|
+
}
|
|
357
|
+
`,le([o.property()],ae.prototype,"variant",void 0),le([o.query("slot")],ae.prototype,"slottedContent",void 0),e.customElement("ft-icon")(ae);var pe=function(t,e,i,o){for(var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};class fe extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return i.html``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}fe.elementDefinitions={},pe([o.property({type:String})],fe.prototype,"label",void 0),pe([o.property({type:Object,converter:t=>t})],fe.prototype,"value",void 0),pe([o.property({type:Boolean,reflect:!0})],fe.prototype,"selected",void 0);const de={labelSize:e.FtCssVariable.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:e.FtCssVariable.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:e.FtCssVariable.create("--ft-select-vertical-spacing","SIZE","4px"),selectedOptionColor:e.FtCssVariable.extend("--ft-select-selected-option-color",e.designSystemVariables.colorOnSurface),helperColor:e.FtCssVariable.extend("--ft-select-helper-color",e.designSystemVariables.colorOnSurfaceMedium),optionsColor:e.FtCssVariable.extend("--ft-select-options-color",e.designSystemVariables.colorOnSurface),optionsZIndex:e.FtCssVariable.create("--ft-select-options-z-index","NUMBER","2"),colorSurface:e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),borderRadiusS:e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system"),elevation02:e.FtCssVariable.external(e.designSystemVariables.elevation02,"Design system")};class he extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,o,s,r;let a=!this.disabled&&this.optionsDisplayed&&this.hasOptions,p=this.disabled||!this.hasOptions;const f=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(o=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==o?o:"").length>0,d={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":p,"ft-select--options-displayed":a,"ft-select--has-option-selected":f,"ft-select--no-label":!this.label};return i.html`
|
|
358
|
+
<div class="${l.classMap(d)}" part="container">
|
|
529
359
|
<div class="ft-select--main-panel" part="main-panel">
|
|
530
360
|
<ft-input-label text="${this.label}"
|
|
531
361
|
part="label"
|
|
532
362
|
?disabled=${p}
|
|
533
363
|
?outlined=${this.outlined}
|
|
534
|
-
?raised=${
|
|
364
|
+
?raised=${f||a}
|
|
535
365
|
></ft-input-label>
|
|
536
366
|
<div class="ft-select--input-panel"
|
|
537
367
|
part="selected-value"
|
|
@@ -540,128 +370,159 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
540
370
|
@keydown=${this.onMainPanelKeyDown}
|
|
541
371
|
aria-label="${this.label}"
|
|
542
372
|
aria-haspopup="listbox"
|
|
543
|
-
aria-expanded="${
|
|
373
|
+
aria-expanded="${a}">
|
|
544
374
|
<ft-ripple ?disabled=${p} ?activated=${!this.outlined}></ft-ripple>
|
|
545
375
|
<ft-typography variant="body1" class="ft-select--selected-option">
|
|
546
|
-
${null!==(
|
|
376
|
+
${null!==(r=null===(s=this.selectedOption)||void 0===s?void 0:s.label)&&void 0!==r?r:""}
|
|
547
377
|
</ft-typography>
|
|
548
|
-
<
|
|
378
|
+
<ft-icon variant="material">${a?"expand_less":"expand_more"}</ft-icon>
|
|
549
379
|
</div>
|
|
550
380
|
<div class="ft-select--options"
|
|
551
381
|
part="options"
|
|
552
382
|
@keydown=${this.onOptionsKeyDown}
|
|
553
383
|
innerrole="listbox">
|
|
554
|
-
${
|
|
384
|
+
${n.repeat(this.options,(t=>t.value),(t=>this.renderOption(t)))}
|
|
555
385
|
</div>
|
|
556
386
|
</div>
|
|
557
|
-
${this.helper?
|
|
387
|
+
${this.helper?i.html`
|
|
558
388
|
<ft-typography class="ft-select--helper-text" variant="caption">${this.helper}
|
|
559
389
|
</ft-typography>`:void 0}
|
|
560
390
|
</div>
|
|
561
391
|
<slot @slotchange=${this.updateOptionsFromSlot}
|
|
562
392
|
@option-change=${this.updateOptionsFromSlot}
|
|
563
393
|
></slot>
|
|
564
|
-
`}renderOption(t){let
|
|
565
|
-
<div class="${
|
|
394
|
+
`}renderOption(t){let e=this.selectedOption===t;const o={"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0};return i.html`
|
|
395
|
+
<div class="${l.classMap(o)}"
|
|
566
396
|
part="option"
|
|
567
397
|
tabindex="0"
|
|
568
398
|
@keydown=${e=>this.onOptionKeyDown(e,t)}
|
|
569
399
|
@click=${()=>this.selectOption(t)}>
|
|
570
|
-
<ft-ripple ?primary=${
|
|
400
|
+
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
571
401
|
${t.label}
|
|
572
402
|
</div>
|
|
573
|
-
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
403
|
+
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,n,s;let l;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),l=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),l=null!==(s=null===(n=this.focusedOption)||void 0===n?void 0:n.nextElementSibling)&&void 0!==s?s:this.firstOption}null==l||l.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}he.elementDefinitions={"ft-input-label":Qt,"ft-typography":Xt,"ft-ripple":ie,"ft-icon":ae},he.styles=[Kt,Gt,i.css`
|
|
404
|
+
*:focus {
|
|
405
|
+
outline: none;
|
|
406
|
+
}
|
|
577
407
|
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
408
|
+
.ft-select {
|
|
409
|
+
display: flex;
|
|
410
|
+
flex-direction: column;
|
|
411
|
+
align-items: stretch;
|
|
412
|
+
}
|
|
583
413
|
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
}
|
|
414
|
+
.ft-select--main-panel {
|
|
415
|
+
position: relative;
|
|
416
|
+
display: flex;
|
|
417
|
+
height: calc(4 * ${de.verticalSpacing} + ${de.labelSize} + ${de.selectedOptionSize});
|
|
418
|
+
}
|
|
590
419
|
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
420
|
+
.ft-select--input-panel {
|
|
421
|
+
flex-grow: 1;
|
|
422
|
+
position: relative;
|
|
423
|
+
display: flex;
|
|
424
|
+
align-items: center;
|
|
425
|
+
overflow: hidden;
|
|
426
|
+
padding-left: 16px;
|
|
427
|
+
padding-right: 8px;
|
|
428
|
+
gap: 8px;
|
|
429
|
+
color: ${de.selectedOptionColor};
|
|
430
|
+
${e.setVariable(ee.color,de.selectedOptionColor)};
|
|
431
|
+
}
|
|
596
432
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
overflow: hidden;
|
|
603
|
-
gap: 8px;
|
|
604
|
-
}
|
|
433
|
+
.ft-select--input-panel,
|
|
434
|
+
.ft-select--option {
|
|
435
|
+
${e.setVariable(ee.opacityContentOnSurfaceHover,"0.08")};
|
|
436
|
+
${e.setVariable(ee.opacityContentOnSurfacePressed,"0.04")};
|
|
437
|
+
}
|
|
605
438
|
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
439
|
+
.ft-select--disabled .ft-select--input-panel,
|
|
440
|
+
.ft-select--disabled .ft-select--option {
|
|
441
|
+
color: ${de.colorOnSurfaceDisabled};
|
|
442
|
+
}
|
|
610
443
|
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
444
|
+
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
445
|
+
.ft-select:not(.ft-select--disabled) .ft-select--option {
|
|
446
|
+
cursor: pointer;
|
|
447
|
+
}
|
|
616
448
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
449
|
+
ft-input-label {
|
|
450
|
+
${e.setVariable(Jt.fontSize,de.selectedOptionSize)};
|
|
451
|
+
${e.setVariable(Jt.raisedFontSize,de.labelSize)};
|
|
452
|
+
${e.setVariable(Jt.verticalSpacing,de.verticalSpacing)};
|
|
453
|
+
}
|
|
620
454
|
|
|
621
|
-
|
|
455
|
+
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
456
|
+
color: ${de.colorPrimary};
|
|
457
|
+
}
|
|
622
458
|
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
}
|
|
459
|
+
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
460
|
+
${e.setVariable(Jt.borderColor,de.colorPrimary)};
|
|
461
|
+
${e.setVariable(Jt.textColor,de.colorPrimary)};
|
|
462
|
+
}
|
|
626
463
|
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
464
|
+
.ft-select--selected-option {
|
|
465
|
+
display: block;
|
|
466
|
+
flex-grow: 1;
|
|
467
|
+
flex-shrink: 1;
|
|
468
|
+
overflow: hidden;
|
|
469
|
+
white-space: nowrap;
|
|
470
|
+
text-overflow: ellipsis;
|
|
471
|
+
${e.setVariable(gt.fontSize,de.selectedOptionSize)};
|
|
472
|
+
${e.setVariable(gt.lineHeight,de.selectedOptionSize)};
|
|
473
|
+
}
|
|
631
474
|
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
475
|
+
ft-icon {
|
|
476
|
+
flex-shrink: 0;
|
|
477
|
+
}
|
|
635
478
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
479
|
+
slot {
|
|
480
|
+
display: none;
|
|
481
|
+
}
|
|
639
482
|
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
}
|
|
483
|
+
.ft-select--filled .ft-select--input-panel {
|
|
484
|
+
border-radius: ${de.borderRadiusS} ${de.borderRadiusS} 0 0;
|
|
485
|
+
}
|
|
644
486
|
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
}
|
|
487
|
+
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
488
|
+
align-self: stretch;
|
|
489
|
+
padding-top: calc(${de.labelSize} + 2 * ${de.verticalSpacing});
|
|
490
|
+
}
|
|
648
491
|
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
padding-top: calc(${De.labelSize} + 2 * ${De.verticalSpacing});
|
|
653
|
-
}
|
|
492
|
+
.ft-select--outlined .ft-select--input-panel {
|
|
493
|
+
border-radius: ${de.borderRadiusS};
|
|
494
|
+
}
|
|
654
495
|
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
496
|
+
.ft-select--options {
|
|
497
|
+
display: none;
|
|
498
|
+
position: absolute;
|
|
499
|
+
top: 100%;
|
|
500
|
+
left: 0;
|
|
501
|
+
right: 0;
|
|
502
|
+
color: ${de.optionsColor};
|
|
503
|
+
background: ${de.colorSurface};
|
|
504
|
+
z-index: ${de.optionsZIndex};
|
|
505
|
+
box-shadow: ${de.elevation02};
|
|
506
|
+
}
|
|
658
507
|
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
508
|
+
.ft-select--options-displayed .ft-select--options {
|
|
509
|
+
display: block;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.ft-select--option {
|
|
513
|
+
position: relative;
|
|
514
|
+
padding: 4px 16px;
|
|
515
|
+
min-height: 32px;
|
|
516
|
+
display: flex;
|
|
517
|
+
align-items: center;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.ft-select--helper-text {
|
|
521
|
+
padding: 0 12px 0 16px;
|
|
522
|
+
color: ${de.helperColor};
|
|
523
|
+
}
|
|
524
|
+
`],pe([o.property({type:String})],he.prototype,"label",void 0),pe([o.property({type:String})],he.prototype,"helper",void 0),pe([o.property({type:Boolean})],he.prototype,"outlined",void 0),pe([o.property({type:Boolean})],he.prototype,"disabled",void 0),pe([o.property({type:Array})],he.prototype,"options",void 0),pe([o.state()],he.prototype,"selectedOption",void 0),pe([o.state()],he.prototype,"optionsDisplayed",void 0),pe([o.state()],he.prototype,"focusOptions",void 0),pe([o.query(".ft-select")],he.prototype,"container",void 0),pe([o.query(".ft-select--input-panel")],he.prototype,"mainPanel",void 0),pe([o.query(".ft-select--option:first-child")],he.prototype,"firstOption",void 0),pe([o.query(".ft-select--option:focus")],he.prototype,"focusedOption",void 0),pe([o.query(".ft-select--option.ft-select--option-selected")],he.prototype,"selectedOptionElement",void 0),pe([o.query(".ft-select--option:last-child")],he.prototype,"lastOption",void 0),pe([o.query("slot")],he.prototype,"optionsSlot",void 0),e.customElement("ft-select")(he),e.customElement("ft-select-option")(fe);var ce=function(t,e,i,o){for(var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};const ue={fontSize:e.FtCssVariable.create("--ft-text-field-font-size","SIZE","14px"),labelSize:e.FtCssVariable.create("--ft-text-field-label-size","SIZE","11px"),verticalSpacing:e.FtCssVariable.create("--ft-text-field-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariable.create("--ft-text-field-horizontal-spacing","SIZE","16px"),helperColor:e.FtCssVariable.extend("--ft-text-field-helper-color",e.designSystemVariables.colorOnSurfaceMedium),colorPrimary:e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:e.FtCssVariable.external(e.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system")};class be extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value="",this.helper="",this.outlined=!1,this.disabled=!1,this.dataList=[],this.focused=!1}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--no-label":!this.label};return i.html`
|
|
525
|
+
<div class="${l.classMap(t)}">
|
|
665
526
|
<div class="ft-text-field--main-panel">
|
|
666
527
|
<ft-input-label text="${this.label}"
|
|
667
528
|
?disabled=${this.disabled}
|
|
@@ -670,7 +531,7 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
670
531
|
></ft-input-label>
|
|
671
532
|
<div class="ft-text-field--input-panel"
|
|
672
533
|
aria-label="${this.label}">
|
|
673
|
-
${this.outlined?null:
|
|
534
|
+
${this.outlined?null:i.html`
|
|
674
535
|
<ft-ripple ?disabled=${this.disabled} activated></ft-ripple>
|
|
675
536
|
`}
|
|
676
537
|
<input type="text"
|
|
@@ -685,49 +546,107 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
685
546
|
/>
|
|
686
547
|
|
|
687
548
|
<datalist id="datalist">
|
|
688
|
-
${this.dataList.map((t=>
|
|
549
|
+
${this.dataList.map((t=>i.html`
|
|
689
550
|
<option value="${t}"></option>`))}
|
|
690
551
|
</datalist>
|
|
691
552
|
|
|
692
553
|
</div>
|
|
693
554
|
</div>
|
|
694
|
-
${this.helper?
|
|
555
|
+
${this.helper?i.html`
|
|
695
556
|
<ft-typography class="ft-text-field--helper-text" variant="caption">${this.helper}
|
|
696
557
|
</ft-typography>`:void 0}
|
|
697
558
|
</div>
|
|
698
|
-
`}updated(t){super.updated(t),t.has("value")&&this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}updateValueFromInputField(){var t;this.value=(null===(t=this.input)||void 0===t?void 0:t.value)||"",this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.input)||void 0===t?void 0:t.value)||""}}
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
position: relative;
|
|
559
|
+
`}updated(t){super.updated(t),t.has("value")&&this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}updateValueFromInputField(){var t;this.value=(null===(t=this.input)||void 0===t?void 0:t.value)||"",this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.input)||void 0===t?void 0:t.value)||""}}be.elementDefinitions={"ft-input-label":Qt,"ft-ripple":ie,"ft-typography":Xt},be.styles=[Wt,i.css`
|
|
560
|
+
*:focus {
|
|
561
|
+
outline: none;
|
|
702
562
|
}
|
|
703
563
|
|
|
704
|
-
.ft-
|
|
705
|
-
display:
|
|
706
|
-
|
|
564
|
+
.ft-text-field {
|
|
565
|
+
display: flex;
|
|
566
|
+
flex-direction: column;
|
|
567
|
+
align-items: stretch;
|
|
707
568
|
}
|
|
708
569
|
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
max-width: 150px;
|
|
715
|
-
text-align: center;
|
|
716
|
-
padding: ${_e};
|
|
717
|
-
z-index: ${Re};
|
|
570
|
+
ft-input-label {
|
|
571
|
+
${e.setVariable(Jt.fontSize,ue.fontSize)};
|
|
572
|
+
${e.setVariable(Jt.raisedFontSize,ue.labelSize)};
|
|
573
|
+
${e.setVariable(Jt.verticalSpacing,ue.verticalSpacing)};
|
|
574
|
+
${e.setVariable(Jt.horizontalSpacing,i.css`calc(${ue.horizontalSpacing} - 4px)`)};
|
|
718
575
|
}
|
|
719
576
|
|
|
720
|
-
.ft-
|
|
721
|
-
padding: 4px 8px;
|
|
722
|
-
border-radius: ${Ne};
|
|
723
|
-
background-color: ${je};
|
|
724
|
-
color: ${Be};
|
|
725
|
-
top: -500px;
|
|
726
|
-
left: -500px;
|
|
577
|
+
.ft-text-field--main-panel {
|
|
727
578
|
position: relative;
|
|
728
|
-
|
|
579
|
+
display: flex;
|
|
580
|
+
height: calc(4 * ${ue.verticalSpacing} + ${ue.labelSize} + ${ue.fontSize});
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.ft-text-field--input-panel {
|
|
584
|
+
flex-grow: 1;
|
|
585
|
+
position: relative;
|
|
586
|
+
display: flex;
|
|
587
|
+
align-items: center;
|
|
588
|
+
overflow: hidden;
|
|
589
|
+
gap: 8px;
|
|
729
590
|
}
|
|
730
|
-
|
|
591
|
+
|
|
592
|
+
.ft-text-field--input-panel ft-ripple {
|
|
593
|
+
${e.setVariable(ee.opacityContentOnSurfaceHover,"0.08")};
|
|
594
|
+
${e.setVariable(ee.opacityContentOnSurfacePressed,"0.04")};
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.ft-text-field--input {
|
|
598
|
+
display: block;
|
|
599
|
+
flex-grow: 1;
|
|
600
|
+
flex-shrink: 1;
|
|
601
|
+
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
602
|
+
|
|
603
|
+
${e.setVariable(gt.fontSize,ue.fontSize)};
|
|
604
|
+
${e.setVariable(gt.lineHeight,ue.fontSize)};
|
|
605
|
+
color: ${ue.colorOnSurface};
|
|
606
|
+
|
|
607
|
+
padding: 0 ${ue.horizontalSpacing};
|
|
608
|
+
|
|
609
|
+
border: none;
|
|
610
|
+
background: none;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.ft-text-field--input::-webkit-calendar-picker-indicator,
|
|
614
|
+
.ft-text-field--input::-webkit-list-button {
|
|
615
|
+
display: none !important;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.ft-text-field--disabled .ft-text-field--input {
|
|
619
|
+
color: ${ue.colorOnSurfaceDisabled};
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.ft-text-field:not(.ft-text-field--disabled) .ft-text-field--input-panel {
|
|
623
|
+
cursor: pointer;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
.ft-text-field:not(.ft-text-field--disabled):focus-within ft-input-label {
|
|
627
|
+
${e.setVariable(Jt.borderColor,ue.colorPrimary)};
|
|
628
|
+
${e.setVariable(Jt.textColor,ue.colorPrimary)};
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
.ft-text-field--filled .ft-text-field--input-panel {
|
|
632
|
+
border-radius: ${ue.borderRadiusS} ${ue.borderRadiusS} 0 0;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
.ft-text-field--filled:not(.ft-text-field--no-label) .ft-text-field--input {
|
|
636
|
+
align-self: stretch;
|
|
637
|
+
padding-bottom: ${ue.verticalSpacing};
|
|
638
|
+
padding-top: calc(${ue.labelSize} + 2 * ${ue.verticalSpacing});
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
.ft-text-field--outlined .ft-text-field--input-panel {
|
|
642
|
+
border-radius: ${ue.borderRadiusS};
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
.ft-text-field--helper-text {
|
|
646
|
+
padding: 0 12px 0 ${ue.horizontalSpacing};
|
|
647
|
+
color: ${ue.helperColor};
|
|
648
|
+
}
|
|
649
|
+
`],ce([o.property({type:String})],be.prototype,"label",void 0),ce([o.property({reflect:!0})],be.prototype,"value",void 0),ce([o.property({type:String})],be.prototype,"helper",void 0),ce([o.property({type:Boolean})],be.prototype,"outlined",void 0),ce([o.property({type:Boolean})],be.prototype,"disabled",void 0),ce([o.query(".ft-text-field--input")],be.prototype,"input",void 0),ce([o.property({attribute:!1})],be.prototype,"dataList",void 0),ce([o.state()],be.prototype,"focused",void 0),e.customElement("ft-text-field")(be);var xe=function(t,e,i,o){for(var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};const ve=e.FtCssVariable.create("--ft-tooltip-distance","SIZE","4px"),ye=e.FtCssVariable.create("--ft-tooltip-color","COLOR","#FFFFFF"),ge=e.FtCssVariable.create("--ft-tooltip-background-color","COLOR","#666666"),me=e.FtCssVariable.create("--ft-tooltip-z-index","NUMBER","1"),$e=e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system");class we extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new e.Debouncer,this.revealDebouncer=new e.Debouncer}render(){return i.html`
|
|
731
650
|
<div part="container"
|
|
732
651
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
733
652
|
@mouseenter=${this.onHover}
|
|
@@ -742,7 +661,39 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
742
661
|
</div>
|
|
743
662
|
<slot></slot>
|
|
744
663
|
</div>
|
|
745
|
-
`}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,
|
|
664
|
+
`}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,o=(e.width-this.tooltip.clientWidth)/2,n=this.tooltip.style;switch(this.position){case"top":n.top=-this.tooltip.clientHeight+"px",n.left=o+"px";break;case"bottom":n.top=e.height+"px",n.left=o+"px";break;case"left":n.top=i+"px",n.left=-this.tooltip.clientWidth+"px";break;case"right":n.top=i+"px",n.left=e.width+"px"}n.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())}}we.elementDefinitions={"ft-typography":Xt},we.styles=i.css`
|
|
665
|
+
.ft-tooltip--container {
|
|
666
|
+
display: block;
|
|
667
|
+
position: relative;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.ft-tooltip--inline {
|
|
671
|
+
display: inline-block;
|
|
672
|
+
max-width: 100%;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
.ft-tooltip {
|
|
676
|
+
position: absolute;
|
|
677
|
+
box-sizing: border-box;
|
|
678
|
+
overflow: hidden;
|
|
679
|
+
width: max-content;
|
|
680
|
+
max-width: 150px;
|
|
681
|
+
text-align: center;
|
|
682
|
+
padding: ${ve};
|
|
683
|
+
z-index: ${me};
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
.ft-tooltip--content {
|
|
687
|
+
padding: 4px 8px;
|
|
688
|
+
border-radius: ${$e};
|
|
689
|
+
background-color: ${ge};
|
|
690
|
+
color: ${ye};
|
|
691
|
+
top: -500px;
|
|
692
|
+
left: -500px;
|
|
693
|
+
position: relative;
|
|
694
|
+
word-break: break-word;
|
|
695
|
+
}
|
|
696
|
+
`,xe([o.property()],we.prototype,"text",void 0),xe([o.property({type:Boolean})],we.prototype,"manual",void 0),xe([o.property({type:Boolean})],we.prototype,"inline",void 0),xe([o.property({type:Number})],we.prototype,"delay",void 0),xe([o.property()],we.prototype,"position",void 0),xe([o.queryAssignedNodes("",!0)],we.prototype,"slotNodes",void 0),xe([o.query(".ft-tooltip--container")],we.prototype,"container",void 0),xe([o.query("slot")],we.prototype,"target",void 0),xe([o.query(".ft-tooltip")],we.prototype,"tooltip",void 0),xe([o.query(".ft-tooltip--content")],we.prototype,"tooltipContent",void 0),xe([o.state()],we.prototype,"visible",void 0),e.customElement("ft-tooltip")(we);const ke={color:e.FtCssVariable.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariable.create("--ft-loader-size","SIZE","80px")};class ze extends e.FtLitElement{static get styles(){return i.css`
|
|
746
697
|
:host {
|
|
747
698
|
line-height: 0;
|
|
748
699
|
}
|
|
@@ -751,8 +702,8 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
751
702
|
display: inline-block;
|
|
752
703
|
position: relative;
|
|
753
704
|
|
|
754
|
-
width: ${
|
|
755
|
-
height: ${
|
|
705
|
+
width: ${ke.size};
|
|
706
|
+
height: ${ke.size};
|
|
756
707
|
}
|
|
757
708
|
|
|
758
709
|
.ft-loader div {
|
|
@@ -761,7 +712,7 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
761
712
|
width: 25%;
|
|
762
713
|
height: 25%;
|
|
763
714
|
border-radius: 50%;
|
|
764
|
-
background: ${
|
|
715
|
+
background: ${ke.color};
|
|
765
716
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
766
717
|
}
|
|
767
718
|
|
|
@@ -808,20 +759,21 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
808
759
|
transform: translate(0, 0);
|
|
809
760
|
}
|
|
810
761
|
100% {
|
|
811
|
-
transform: translate(calc(0.35 * ${
|
|
762
|
+
transform: translate(calc(0.35 * ${ke.size}), 0);
|
|
812
763
|
}
|
|
813
764
|
}
|
|
814
|
-
`}
|
|
765
|
+
`}render(){return i.html`
|
|
815
766
|
<div class="ft-loader">
|
|
816
767
|
<div></div>
|
|
817
768
|
<div></div>
|
|
818
769
|
<div></div>
|
|
819
770
|
<div></div>
|
|
820
771
|
</div>
|
|
821
|
-
`}}
|
|
772
|
+
`}}e.customElement("ft-loader")(ze);var Se=function(t,e,i,o){for(var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};const Oe=e.FtCssVariable.extend("--ft-button-color",e.designSystemVariables.colorPrimary),Ce={backgroundColor:e.FtCssVariable.extend("--ft-button-background-color",e.designSystemVariables.colorSurface),borderRadius:e.FtCssVariable.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusL),color:Oe,fontSize:e.FtCssVariable.extend("--ft-button-font-size",Rt.fontSize),iconSize:e.FtCssVariable.create("--ft-button-icon-size","SIZE","24px"),rippleColor:e.FtCssVariable.extend("--ft-button-ripple-color",Oe),opacityDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},Ee=e.FtCssVariable.extend("--ft-button-primary-color",e.FtCssVariable.extend("--ft-button-color",e.designSystemVariables.colorOnPrimary)),Fe={backgroundColor:e.FtCssVariable.extend("--ft-button-primary-background-color",e.FtCssVariable.extend("--ft-button-background-color",e.designSystemVariables.colorPrimary)),color:Ee,rippleColor:e.FtCssVariable.extend("--ft-button-primary-ripple-color",Ee)},De=e.FtCssVariable.extend("--ft-button-dense-border-radius",e.FtCssVariable.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusM));class je extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}static get styles(){return[e.noTextSelect,i.css`
|
|
822
773
|
:host {
|
|
823
774
|
display: inline-block;
|
|
824
775
|
max-width: 100%;
|
|
776
|
+
pointer-events: none;
|
|
825
777
|
}
|
|
826
778
|
|
|
827
779
|
button {
|
|
@@ -854,19 +806,20 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
854
806
|
overflow: hidden;
|
|
855
807
|
box-sizing: border-box;
|
|
856
808
|
border: none;
|
|
809
|
+
pointer-events: auto;
|
|
857
810
|
|
|
858
|
-
--ft-button-internal-font-size: ${
|
|
811
|
+
--ft-button-internal-font-size: ${Ce.fontSize};
|
|
859
812
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
860
|
-
--ft-button-internal-color: ${
|
|
861
|
-
|
|
813
|
+
--ft-button-internal-color: ${Ce.color};
|
|
814
|
+
${e.setVariable(re.size,Ce.iconSize)};
|
|
862
815
|
--ft-button-internal-vertical-padding: 6px;
|
|
863
816
|
--ft-button-internal-horizontal-padding: 8px;
|
|
864
|
-
${
|
|
865
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height),
|
|
817
|
+
${e.setVariable(ee.color,Ce.rippleColor)};
|
|
818
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ce.iconSize});
|
|
866
819
|
|
|
867
|
-
border-radius: ${
|
|
820
|
+
border-radius: ${Ce.borderRadius};
|
|
868
821
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
869
|
-
background-color: ${
|
|
822
|
+
background-color: ${Ce.backgroundColor};
|
|
870
823
|
color: var(--ft-button-internal-color);
|
|
871
824
|
-webkit-mask-image: radial-gradient(white, black);
|
|
872
825
|
}
|
|
@@ -878,7 +831,7 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
878
831
|
.ft-button--dense {
|
|
879
832
|
--ft-button-internal-vertical-padding: 2px;
|
|
880
833
|
--ft-button-internal-horizontal-padding: 4px;
|
|
881
|
-
border-radius: ${
|
|
834
|
+
border-radius: ${De};
|
|
882
835
|
}
|
|
883
836
|
|
|
884
837
|
.ft-button--round {
|
|
@@ -887,12 +840,13 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
887
840
|
|
|
888
841
|
.ft-button[disabled] {
|
|
889
842
|
filter: grayscale(1);
|
|
890
|
-
opacity: ${
|
|
843
|
+
opacity: ${Ce.opacityDisabled};
|
|
891
844
|
}
|
|
892
845
|
|
|
893
846
|
.ft-button.ft-button--primary {
|
|
894
|
-
background-color: ${
|
|
895
|
-
--ft-button-internal-color: ${
|
|
847
|
+
background-color: ${Fe.backgroundColor};
|
|
848
|
+
--ft-button-internal-color: ${Fe.color};
|
|
849
|
+
${e.setVariable(ee.color,Fe.rippleColor)};
|
|
896
850
|
}
|
|
897
851
|
|
|
898
852
|
.ft-button.ft-button--outlined {
|
|
@@ -910,8 +864,8 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
910
864
|
text-overflow: ellipsis;
|
|
911
865
|
display: block;
|
|
912
866
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
913
|
-
${
|
|
914
|
-
${
|
|
867
|
+
${e.setVariable(Rt.fontSize,"var(--ft-button-internal-font-size)")};
|
|
868
|
+
${e.setVariable(Rt.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
915
869
|
}
|
|
916
870
|
|
|
917
871
|
.ft-button--safari-fix .ft-button--label {
|
|
@@ -928,28 +882,27 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
928
882
|
display: none;
|
|
929
883
|
}
|
|
930
884
|
|
|
931
|
-
|
|
885
|
+
ft-icon {
|
|
932
886
|
flex-shrink: 0;
|
|
933
|
-
width: var(--mdc-icon-size);
|
|
934
887
|
}
|
|
935
888
|
|
|
936
|
-
.ft-button--label[hidden] +
|
|
889
|
+
.ft-button--label[hidden] + ft-icon {
|
|
937
890
|
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
938
891
|
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
939
892
|
}
|
|
940
893
|
|
|
941
|
-
.ft-button:not(.ft-button--trailing-icon)
|
|
894
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
942
895
|
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
943
896
|
order: -1;
|
|
944
897
|
}
|
|
945
898
|
|
|
946
899
|
ft-loader {
|
|
947
|
-
${
|
|
948
|
-
${
|
|
900
|
+
${e.setVariable(ke.size,Ce.iconSize)};
|
|
901
|
+
${e.setVariable(ke.color,"var(--ft-button-internal-color)")};
|
|
949
902
|
}
|
|
950
|
-
`]}
|
|
903
|
+
`]}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":e.isSafari,"ft-no-text-select":!0};return this.addTooltip(i.html`
|
|
951
904
|
<button part="button"
|
|
952
|
-
class="${
|
|
905
|
+
class="${l.classMap(t)}"
|
|
953
906
|
aria-label="${this.getLabel()}"
|
|
954
907
|
?disabled=${this.isDisabled()}>
|
|
955
908
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
@@ -961,157 +914,161 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
961
914
|
</ft-typography>
|
|
962
915
|
${this.resolveIcon()}
|
|
963
916
|
</button>
|
|
964
|
-
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:
|
|
917
|
+
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:i.html`
|
|
965
918
|
<ft-tooltip part="tooltip"
|
|
966
919
|
text="${this.getLabel()}"
|
|
967
920
|
position="${this.tooltipPosition}">
|
|
968
921
|
${t}
|
|
969
922
|
</ft-tooltip>
|
|
970
|
-
`}resolveIcon(){return this.loading?
|
|
971
|
-
<ft-loader></ft-loader> `:this.icon?
|
|
972
|
-
<
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
display: grid;
|
|
979
|
-
grid-template-columns: repeat(${this.columns.length}, minmax(min-content, auto));
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
.header, .row {
|
|
983
|
-
display: contents;
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
.header-cell {
|
|
987
|
-
display: flex;
|
|
988
|
-
flex-direction: column;
|
|
989
|
-
background: ${Qe.headerBackground};
|
|
990
|
-
color: ${Qe.colorOnSurfaceHigh};
|
|
991
|
-
padding: .5rem 1rem;
|
|
992
|
-
font-family: ${Qe.titleFont};
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
.header-cell:first-of-type {
|
|
996
|
-
border-radius: .5rem 0 0 0;
|
|
997
|
-
}
|
|
998
|
-
|
|
999
|
-
.header-cell:last-of-type {
|
|
1000
|
-
border-radius: 0 .5rem 0 0;
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
.column-title-container {
|
|
1004
|
-
display: flex;
|
|
1005
|
-
align-items: center;
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
.column-title-container ft-button {
|
|
1009
|
-
${a.setVariable(Ve.backgroundColor,Qe.headerBackground)};
|
|
1010
|
-
${a.setVariable(Ve.color,Qe.colorOnSurfaceHigh)};
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
.column-title {
|
|
1014
|
-
white-space: nowrap;
|
|
1015
|
-
text-transform: uppercase;
|
|
1016
|
-
margin-right: .5rem;
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
.column-filter {
|
|
1020
|
-
flex-grow: 1;
|
|
1021
|
-
flex-shrink: 0;
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
.column-filter:not(:empty) {
|
|
1025
|
-
padding-top: .5rem;
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
.column-filter ft-text-field,
|
|
1029
|
-
.column-filter ft-select {
|
|
1030
|
-
width: 150px;
|
|
1031
|
-
min-width: 100%;
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
|
-
.cell {
|
|
1035
|
-
padding: 1rem;
|
|
1036
|
-
border-left: 1px solid ${Qe.headerBackground};
|
|
1037
|
-
border-bottom: 1px solid ${Qe.headerBackground};
|
|
1038
|
-
overflow-x: auto;
|
|
1039
|
-
display: flex;
|
|
1040
|
-
align-items: center;
|
|
1041
|
-
font-family: ${Qe.contentFont};
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
/* Even is 2n+1 and odd is 2n because of the header */
|
|
1045
|
-
.row:nth-child(2n) > .cell {
|
|
1046
|
-
background: ${Qe.oddRowBackground};
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
.row:nth-child(2n + 1) > .cell {
|
|
1050
|
-
background: ${Qe.evenRowBackground};
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
.row:hover > .cell {
|
|
1054
|
-
background: ${Qe.rowHoverBackground};
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
|
-
.cell:last-of-type {
|
|
1058
|
-
border-right: 1px solid ${Qe.headerBackground};
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
.row:last-of-type .cell:first-of-type {
|
|
1062
|
-
border-radius: 0 0 0 .5rem;
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
.row:last-of-type .cell:last-of-type {
|
|
1066
|
-
border-radius: 0 0 .5rem 0;
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
.hidden {
|
|
1070
|
-
visibility: hidden;
|
|
1071
|
-
}
|
|
1072
|
-
`}init(t,e,i){this.data=t,this.columns=e,this.sort=i}getTemplate(){let t=this.sortData(this.filterData());return e.html`
|
|
923
|
+
`}resolveIcon(){return this.loading?i.html`
|
|
924
|
+
<ft-loader></ft-loader> `:this.icon?i.html`
|
|
925
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:i.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}je.elementDefinitions={"ft-ripple":ie,"ft-tooltip":we,"ft-typography":Xt,"ft-icon":ae,"ft-loader":ze},Se([o.property({type:Boolean})],je.prototype,"primary",void 0),Se([o.property({type:Boolean})],je.prototype,"outlined",void 0),Se([o.property({type:Boolean})],je.prototype,"disabled",void 0),Se([o.property({type:Boolean})],je.prototype,"dense",void 0),Se([o.property({type:Boolean})],je.prototype,"round",void 0),Se([o.property({type:String})],je.prototype,"label",void 0),Se([o.property({type:String})],je.prototype,"icon",void 0),Se([o.property({type:Boolean})],je.prototype,"trailingIcon",void 0),Se([o.property({type:Boolean})],je.prototype,"loading",void 0),Se([o.property({type:String})],je.prototype,"tooltipPosition",void 0),Se([o.query(".ft-button")],je.prototype,"button",void 0),Se([o.query(".ft-button--label slot")],je.prototype,"slottedContent",void 0),e.customElement("ft-button")(je);var Ie=function(t,e,i,o){for(var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};class Be extends CustomEvent{constructor(t){super("row-click",{detail:t})}}const Ae={headerBackground:e.FtCssVariable.create("--ft-filterable-table-header-background","COLOR","whitesmoke"),oddRowBackground:e.FtCssVariable.create("--ft-filterable-table-odd-row-background","COLOR","#FFFFFF"),evenRowBackground:e.FtCssVariable.create("--ft-filterable-table-even-row-background","COLOR","#fdfdfd"),rowHoverBackground:e.FtCssVariable.create("--ft-filterable-table-row-hover-background","COLOR","#fafafa"),colorOnSurfaceHigh:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceHigh,"Design system"),titleFont:e.FtCssVariable.external(e.designSystemVariables.titleFont,"Design system"),contentFont:e.FtCssVariable.external(e.designSystemVariables.contentFont,"Design system")},Ne=t=>i.html`${t}`,Te=(t,e)=>t-e;class Ze extends e.FtLitElement{constructor(){super(...arguments),this.data=[],this.columns=[],this.filters=[],this.selectData=[]}init(t,e,i){this.data=t,this.columns=e,this.sort=i}render(){let t=this.sortData(this.filterData());return i.html`
|
|
926
|
+
<style>
|
|
927
|
+
.table {
|
|
928
|
+
grid-template-columns: repeat(${this.columns.length}, minmax(min-content, auto));
|
|
929
|
+
}
|
|
930
|
+
</style>
|
|
1073
931
|
<div class="table">
|
|
1074
932
|
<div class="header">
|
|
1075
|
-
${
|
|
933
|
+
${n.repeat(this.columns,((t,e)=>"header-cell-"+e),((t,e)=>this.renderHeader(t,e)))}
|
|
1076
934
|
</div>
|
|
1077
|
-
${
|
|
935
|
+
${n.repeat(t,((t,e)=>"row-"+e),((t,e)=>i.html`
|
|
1078
936
|
<div class="row"
|
|
1079
|
-
@click=${()=>this.dispatchEvent(new
|
|
1080
|
-
${
|
|
937
|
+
@click=${()=>this.dispatchEvent(new Be(t))}>
|
|
938
|
+
${n.repeat(this.columns,((t,i)=>"cell-"+e+" "+i),(i=>this.renderCell(i,t,e)))}
|
|
1081
939
|
</div>
|
|
1082
940
|
`))}
|
|
1083
941
|
</div>
|
|
1084
|
-
`}filterData(){let t=[...this.data];return this.filters.forEach(((e,i)=>{var
|
|
942
|
+
`}filterData(){let t=[...this.data];return this.filters.forEach(((e,i)=>{var o;const n=this.columns[i];if(e)switch(null!==(o=n.filter)&&void 0!==o?o:"text"){case"text":e.value&&(t=t.filter((t=>this.getValueAsString(n,t,i).toLowerCase().includes(e.value.toLowerCase()))));break;case"select":e.value&&(t=t.filter((t=>this.getValueAsString(n,t,i)===e.value)))}})),t}sortData(t){var e;if(this.currentSort){const i=this.columns[this.currentSort.column],o=null!==(e=i.comparator)&&void 0!==e?e:Te,n="asc"===this.currentSort.order?o:(t,e)=>-o(t,e);return t.sort(((t,e)=>n(this.getValue(i,t),this.getValue(i,e))))}return t}update(t){super.update(t),t.has("sort")&&(this.currentSort=this.sort),(t.has("data")||t.has("columns"))&&this.updateSelectData()}updateSelectData(){this.selectData=[];const t=this.data,e=this.columns;for(let i in e){const o=e[i];"select"===o.filter&&(this.selectData[i]=[...new Set(t.map(((t,e)=>this.getValueAsString(o,t,e))))].sort(((t,e)=>t.localeCompare(e))))}this.requestUpdate()}renderHeader(t,e){return i.html`
|
|
1085
943
|
<div class="header-cell">
|
|
1086
944
|
<div class="column-title-container">
|
|
1087
945
|
<span class="column-title">${t.title}</span>
|
|
1088
|
-
${this.renderColumnSort(t,
|
|
946
|
+
${this.renderColumnSort(t,e)}
|
|
1089
947
|
</div>
|
|
1090
948
|
<div class="column-filter">
|
|
1091
|
-
${this.renderColumnFilter(t,
|
|
949
|
+
${this.renderColumnFilter(t,e)}
|
|
1092
950
|
</div>
|
|
1093
951
|
</div>
|
|
1094
|
-
`}renderColumnSort(t,
|
|
952
|
+
`}renderColumnSort(t,e){var o;const n=this.currentSort&&this.currentSort.column===e,s=n?"asc"===this.currentSort.order?"expand_more":"expand_less":"unfold_more";return i.html`
|
|
1095
953
|
<ft-button
|
|
1096
954
|
round
|
|
1097
955
|
dense
|
|
1098
|
-
class="${null===(
|
|
1099
|
-
icon="${
|
|
956
|
+
class="${null===(o=t.sortable)||void 0===o||o?"":"hidden"}"
|
|
957
|
+
icon="${s}"
|
|
1100
958
|
label="Sort ${t.title}"
|
|
1101
|
-
@click=${()=>{var t;
|
|
959
|
+
@click=${()=>{var t;n?"asc"===(null===(t=this.currentSort)||void 0===t?void 0:t.order)?this.currentSort={column:e,order:"desc"}:this.currentSort=void 0:this.currentSort={column:e,order:"asc"}}}
|
|
1102
960
|
></ft-button>
|
|
1103
|
-
`}renderColumnFilter(t,
|
|
961
|
+
`}renderColumnFilter(t,e){var o,n;const s=t=>{this.filters[e]={value:t.detail},this.requestUpdate()};switch(null!==(o=t.filter)&&void 0!==o?o:"text"){case"text":return i.html`
|
|
1104
962
|
<ft-text-field
|
|
1105
963
|
label="Search ${t.title}"
|
|
1106
|
-
@live-change="${
|
|
964
|
+
@live-change="${s}"
|
|
1107
965
|
></ft-text-field>
|
|
1108
|
-
`;case"select":const
|
|
1109
|
-
<ft-select label="Filter ${t.title}" @change=${
|
|
966
|
+
`;case"select":const o=null!==(n=this.selectData[e])&&void 0!==n?n:[];return o.length?i.html`
|
|
967
|
+
<ft-select label="Filter ${t.title}" @change=${s}>
|
|
1110
968
|
<ft-select-option></ft-select-option>
|
|
1111
|
-
${
|
|
969
|
+
${o.map((t=>i.html`
|
|
1112
970
|
<ft-select-option value="${t}" label="${t}"></ft-select-option>
|
|
1113
971
|
`))}
|
|
1114
972
|
</ft-select>
|
|
1115
|
-
`:null}return null}renderCell(t,
|
|
1116
|
-
<div class="cell">${(t=>{const e=
|
|
1117
|
-
`}getValue(t,e){return"string"==typeof t.getter?e[t.getter]:t.getter(e)}getValueAsString(t,e,i){const
|
|
973
|
+
`:null}return null}renderCell(t,e,o){var n;const l=null!==(n=t.render)&&void 0!==n?n:Ne;return i.html`
|
|
974
|
+
<div class="cell">${(t=>{const e=l(t,o);return"string"==typeof e?s.unsafeHTML(e):e})(this.getValue(t,e))}</div>
|
|
975
|
+
`}getValue(t,e){return"string"==typeof t.getter?e[t.getter]:t.getter(e)}getValueAsString(t,e,i){const o=this.getValue(t,e);return"function"==typeof t.stringify?t.stringify(o,i):(t=>""+t)(o)}}Ze.styles=i.css`
|
|
976
|
+
:host {
|
|
977
|
+
display: block;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
.table {
|
|
981
|
+
display: grid;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
.header, .row {
|
|
985
|
+
display: contents;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
.header-cell {
|
|
989
|
+
display: flex;
|
|
990
|
+
flex-direction: column;
|
|
991
|
+
background: ${Ae.headerBackground};
|
|
992
|
+
color: ${Ae.colorOnSurfaceHigh};
|
|
993
|
+
padding: .5rem 1rem;
|
|
994
|
+
font-family: ${Ae.titleFont};
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
.header-cell:first-of-type {
|
|
998
|
+
border-radius: .5rem 0 0 0;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
.header-cell:last-of-type {
|
|
1002
|
+
border-radius: 0 .5rem 0 0;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
.column-title-container {
|
|
1006
|
+
display: flex;
|
|
1007
|
+
align-items: center;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
.column-title-container ft-button {
|
|
1011
|
+
${e.setVariable(Ce.backgroundColor,Ae.headerBackground)};
|
|
1012
|
+
${e.setVariable(Ce.color,Ae.colorOnSurfaceHigh)};
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
.column-title {
|
|
1016
|
+
white-space: nowrap;
|
|
1017
|
+
text-transform: uppercase;
|
|
1018
|
+
margin-right: .5rem;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
.column-filter {
|
|
1022
|
+
flex-grow: 1;
|
|
1023
|
+
flex-shrink: 0;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
.column-filter:not(:empty) {
|
|
1027
|
+
padding-top: .5rem;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
.column-filter ft-text-field,
|
|
1031
|
+
.column-filter ft-select {
|
|
1032
|
+
width: 150px;
|
|
1033
|
+
min-width: 100%;
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
.cell {
|
|
1037
|
+
padding: 1rem;
|
|
1038
|
+
border-left: 1px solid ${Ae.headerBackground};
|
|
1039
|
+
border-bottom: 1px solid ${Ae.headerBackground};
|
|
1040
|
+
overflow-x: auto;
|
|
1041
|
+
display: flex;
|
|
1042
|
+
align-items: center;
|
|
1043
|
+
font-family: ${Ae.contentFont};
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
/* Even is 2n+1 and odd is 2n because of the header */
|
|
1047
|
+
.row:nth-child(2n) > .cell {
|
|
1048
|
+
background: ${Ae.oddRowBackground};
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
.row:nth-child(2n + 1) > .cell {
|
|
1052
|
+
background: ${Ae.evenRowBackground};
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
.row:hover > .cell {
|
|
1056
|
+
background: ${Ae.rowHoverBackground};
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
.cell:last-of-type {
|
|
1060
|
+
border-right: 1px solid ${Ae.headerBackground};
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
.row:last-of-type .cell:first-of-type {
|
|
1064
|
+
border-radius: 0 0 0 .5rem;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
.row:last-of-type .cell:last-of-type {
|
|
1068
|
+
border-radius: 0 0 .5rem 0;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
.hidden {
|
|
1072
|
+
visibility: hidden;
|
|
1073
|
+
}
|
|
1074
|
+
`,Ie([o.property({attribute:!1})],Ze.prototype,"data",void 0),Ie([o.property({attribute:!1})],Ze.prototype,"columns",void 0),Ie([o.property({attribute:!1})],Ze.prototype,"sort",void 0),Ie([o.state()],Ze.prototype,"currentSort",void 0),e.customElement("ft-filterable-table")(Ze),t.FtFilterableTable=Ze,t.FtFilterableTableCssVariables=Ae,t.RowClickEvent=Be,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litUnsafeHTML,ftGlobals.litClassMap);
|