@fluid-topics/ft-filterable-table 0.2.2 → 0.2.6
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.
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
!function(t,e,i,o,n,
|
|
1
|
+
!function(t,e,i,o,n,l,s){
|
|
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),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,b=Array.isArray,v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,g=/-->/g,y=/>/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),D=(t,e)=>{const i=t.length-1,o=[];let n,l=2===e?"<svg>":"",s=v;for(let e=0;e<i;e++){const i=t[e];let r,a,p=-1,d=0;for(;d<i.length&&(s.lastIndex=d,a=s.exec(i),null!==a);)d=s.lastIndex,s===v?"!--"===a[1]?s=g:void 0!==a[1]?s=y:void 0!==a[2]?(k.test(a[2])&&(n=RegExp("</"+a[2],"g")),s=m):void 0!==a[3]&&(s=m):s===m?">"===a[0]?(s=null!=n?n:v,p=-1):void 0===a[1]?p=-2:(p=s.lastIndex-a[2].length,r=a[1],s=void 0===a[3]?m:'"'===a[3]?w:$):s===w||s===$?s=m:s===g||s===y?s=v:(s=m,n=void 0);const c=s===m&&t[e+1].startsWith("/>")?" ":"";l+=s===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=l+(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 B{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,l=0;const s=t.length-1,r=this.parts,[p,h]=D(t,e);if(this.el=B.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<s;){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[l++];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]?A:"?"===e[1]?T:"@"===e[1]?Z:N})}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 F(t,e,i=t,o){var n,l,s,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=x(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(l=null==a?void 0:a._$AO)||void 0===l||l.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,i,o)),void 0!==o?(null!==(s=(r=i)._$Cl)&&void 0!==s?s:r._$Cl=[])[o]=a:i._$Cu=a),void 0!==a&&(e=F(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 l=E.nextNode(),s=0,r=0,a=o[0];for(;void 0!==a;){if(s===a.index){let e;2===a.type?e=new j(l,l.nextSibling,this,t):1===a.type?e=new a.ctor(l,a.name,a.strings,this,t):6===a.type&&(e=new R(l,this,t)),this.v.push(e),a=o[++r]}s!==(null==a?void 0:a.index)&&(l=E.nextNode(),s++)}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 j{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=F(this,t,e),x(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.k(t):(t=>{var e;return b(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.S(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==O&&x(this._$AH)?this._$AA.nextSibling.data=t:this.k(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=B.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.k(e),this._$AH=t}}_$AC(t){let e=C.get(t.strings);return void 0===e&&C.set(t.strings,e=new B(t)),e}S(t){b(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 j(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 N{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 l=!1;if(void 0===n)t=F(this,t,e,0),l=!x(t)||t!==this._$AH&&t!==S,l&&(this._$AH=t);else{const o=t;let s,r;for(t=n[0],s=0;s<n.length-1;s++)r=F(this,o[i+s],e,s),r===S&&(r=this._$AH[s]),l||(l=!x(r)||r!==this._$AH[s]),r===O?t=O:t!==O&&(t+=(null!=r?r:"")+n[s+1]),this._$AH[s]=r}l&&!o&&this.C(t)}C(t){t===O?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class A extends N{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===O?void 0:t}}const M=a?a.emptyScript:"";class T extends N{constructor(){super(...arguments),this.type=4}C(t){t&&t!==O?this.element.setAttribute(this.name,M):this.element.removeAttribute(this.name)}}class Z extends N{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=F(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,l=t!==O&&(o===O||n);n&&this.element.removeEventListener(this.name,this,o),l&&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){F(this,t)}}const _=window.litHtmlPolyfillSupport;null==_||_(B,j),(null!==(r=globalThis.litHtmlVersions)&&void 0!==r?r:globalThis.litHtmlVersions=[]).push("2.2.4");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const H=t=>({_$litStatic$:t}),L=new Map,
|
|
13
|
+
const U=Symbol.for(""),H=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===U)return null===(i=t)||void 0===i?void 0:i._$litStatic$},W=t=>({_$litStatic$:t,r:U}),L=new Map,K=(t=>(e,...i)=>{const o=i.length;let n,l;const s=[],r=[];let a,p=0,f=!1;for(;p<o;){for(a=e[p];p<o&&void 0!==(l=i[p],n=H(l));)a+=n+e[++p],f=!0;r.push(l),s.push(a),p++}if(p===o&&s.push(e[o]),f){const t=s.join("$$lit$$");void 0===(e=L.get(t))&&(s.raw=s,L.set(t,e=s)),i=r}return t(e,...i)})(z);var P,G=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};!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"}(P||(P={}));const V=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),q=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),X={fontFamily:q,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")},Y=e.FtCssVariable.extend("--ft-typography-title-font-family",V),J=e.FtCssVariable.extend("--ft-typography-title-font-size",X.fontSize,"20px"),Q=e.FtCssVariable.extend("--ft-typography-title-font-weight",X.fontWeight,"normal"),tt=e.FtCssVariable.extend("--ft-typography-title-letter-spacing",X.letterSpacing,"0.15px"),et=e.FtCssVariable.extend("--ft-typography-title-line-height",X.lineHeight,"24px"),it=e.FtCssVariable.extend("--ft-typography-title-text-transform",X.textTransform,"inherit"),ot=e.FtCssVariable.extend("--ft-typography-title-dense-font-family",V),nt=e.FtCssVariable.extend("--ft-typography-title-dense-font-size",X.fontSize,"14px"),lt=e.FtCssVariable.extend("--ft-typography-title-dense-font-weight",X.fontWeight,"normal"),st=e.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",X.letterSpacing,"0.105px"),rt=e.FtCssVariable.extend("--ft-typography-title-dense-line-height",X.lineHeight,"24px"),at=e.FtCssVariable.extend("--ft-typography-title-dense-text-transform",X.textTransform,"inherit"),pt=e.FtCssVariable.extend("--ft-typography-subtitle1-font-family",q),ft=e.FtCssVariable.extend("--ft-typography-subtitle1-font-size",X.fontSize,"16px"),dt=e.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",X.fontWeight,"600"),ht=e.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",X.letterSpacing,"0.144px"),ct=e.FtCssVariable.extend("--ft-typography-subtitle1-line-height",X.lineHeight,"24px"),ut=e.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",X.textTransform,"inherit"),xt=e.FtCssVariable.extend("--ft-typography-subtitle2-font-family",q),bt=e.FtCssVariable.extend("--ft-typography-subtitle2-font-size",X.fontSize,"14px"),vt=e.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",X.fontWeight,"normal"),gt=e.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",X.letterSpacing,"0.098px"),yt=e.FtCssVariable.extend("--ft-typography-subtitle2-line-height",X.lineHeight,"24px"),mt=e.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",X.textTransform,"inherit"),$t={fontFamily:e.FtCssVariable.extend("--ft-typography-body1-font-family",q),fontSize:e.FtCssVariable.extend("--ft-typography-body1-font-size",X.fontSize,"16px"),fontWeight:e.FtCssVariable.extend("--ft-typography-body1-font-weight",X.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-body1-letter-spacing",X.letterSpacing,"0.496px"),lineHeight:e.FtCssVariable.extend("--ft-typography-body1-line-height",X.lineHeight,"24px"),textTransform:e.FtCssVariable.extend("--ft-typography-body1-text-transform",X.textTransform,"inherit")},wt=e.FtCssVariable.extend("--ft-typography-body2-font-family",q),kt=e.FtCssVariable.extend("--ft-typography-body2-font-size",X.fontSize,"14px"),zt=e.FtCssVariable.extend("--ft-typography-body2-font-weight",X.fontWeight,"normal"),St=e.FtCssVariable.extend("--ft-typography-body2-letter-spacing",X.letterSpacing,"0.252px"),Ot=e.FtCssVariable.extend("--ft-typography-body2-line-height",X.lineHeight,"20px"),Ct=e.FtCssVariable.extend("--ft-typography-body2-text-transform",X.textTransform,"inherit"),Et={fontFamily:e.FtCssVariable.extend("--ft-typography-caption-font-family",q),fontSize:e.FtCssVariable.extend("--ft-typography-caption-font-size",X.fontSize,"12px"),fontWeight:e.FtCssVariable.extend("--ft-typography-caption-font-weight",X.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-caption-letter-spacing",X.letterSpacing,"0.396px"),lineHeight:e.FtCssVariable.extend("--ft-typography-caption-line-height",X.lineHeight,"16px"),textTransform:e.FtCssVariable.extend("--ft-typography-caption-text-transform",X.textTransform,"inherit")},Dt=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",q),Bt=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",X.fontSize,"10px"),Ft=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",X.fontWeight,"normal"),It=e.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",X.letterSpacing,"0.33px"),jt=e.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",X.lineHeight,"16px"),Nt=e.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",X.textTransform,"inherit"),At=e.FtCssVariable.extend("--ft-typography-overline-font-family",q),Mt=e.FtCssVariable.extend("--ft-typography-overline-font-size",X.fontSize,"10px"),Tt=e.FtCssVariable.extend("--ft-typography-overline-font-weight",X.fontWeight,"normal"),Zt=e.FtCssVariable.extend("--ft-typography-overline-letter-spacing",X.letterSpacing,"1.5px"),Rt=e.FtCssVariable.extend("--ft-typography-overline-line-height",X.lineHeight,"16px"),_t=e.FtCssVariable.extend("--ft-typography-overline-text-transform",X.textTransform,"uppercase"),Ut={fontFamily:e.FtCssVariable.extend("--ft-typography-button-font-family",q),fontSize:e.FtCssVariable.extend("--ft-typography-button-font-size",X.fontSize,"14px"),fontWeight:e.FtCssVariable.extend("--ft-typography-button-font-weight",X.fontWeight,"600"),letterSpacing:e.FtCssVariable.extend("--ft-typography-button-letter-spacing",X.letterSpacing,"1.246px"),lineHeight:e.FtCssVariable.extend("--ft-typography-button-line-height",X.lineHeight,"16px"),textTransform:e.FtCssVariable.extend("--ft-typography-button-text-transform",X.textTransform,"uppercase")},Ht=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: ${Y};
|
|
16
|
+
font-size: ${J};
|
|
17
|
+
font-weight: ${Q};
|
|
18
|
+
letter-spacing: ${tt};
|
|
19
|
+
line-height: ${et};
|
|
20
|
+
text-transform: ${it};
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,Wt=i.css`
|
|
23
23
|
.ft-typography--title-dense {
|
|
24
|
-
font-family: ${
|
|
25
|
-
font-size: ${
|
|
26
|
-
font-weight: ${
|
|
24
|
+
font-family: ${ot};
|
|
25
|
+
font-size: ${nt};
|
|
26
|
+
font-weight: ${lt};
|
|
27
27
|
letter-spacing: ${st};
|
|
28
|
-
line-height: ${
|
|
29
|
-
text-transform: ${
|
|
28
|
+
line-height: ${rt};
|
|
29
|
+
text-transform: ${at};
|
|
30
30
|
}
|
|
31
31
|
`,Lt=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: ${pt};
|
|
34
|
+
font-size: ${ft};
|
|
35
|
+
font-weight: ${dt};
|
|
36
|
+
letter-spacing: ${ht};
|
|
37
|
+
line-height: ${ct};
|
|
38
|
+
text-transform: ${ut};
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,Kt=i.css`
|
|
41
41
|
.ft-typography--subtitle2 {
|
|
42
|
-
font-family: ${
|
|
42
|
+
font-family: ${xt};
|
|
43
43
|
font-size: ${bt};
|
|
44
|
-
font-weight: ${
|
|
45
|
-
letter-spacing: ${
|
|
44
|
+
font-weight: ${vt};
|
|
45
|
+
letter-spacing: ${gt};
|
|
46
46
|
line-height: ${yt};
|
|
47
|
-
text-transform: ${
|
|
47
|
+
text-transform: ${mt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,Pt=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: ${$t.fontFamily};
|
|
53
|
+
font-size: ${$t.fontSize};
|
|
54
|
+
font-weight: ${$t.fontWeight};
|
|
55
|
+
letter-spacing: ${$t.letterSpacing};
|
|
56
|
+
line-height: ${$t.lineHeight};
|
|
57
|
+
text-transform: ${$t.textTransform};
|
|
58
58
|
}
|
|
59
59
|
`,Gt=i.css`
|
|
60
60
|
.ft-typography--body2 {
|
|
61
|
-
font-family: ${
|
|
62
|
-
font-size: ${
|
|
63
|
-
font-weight: ${
|
|
64
|
-
letter-spacing: ${
|
|
65
|
-
line-height: ${
|
|
66
|
-
text-transform: ${
|
|
61
|
+
font-family: ${wt};
|
|
62
|
+
font-size: ${kt};
|
|
63
|
+
font-weight: ${zt};
|
|
64
|
+
letter-spacing: ${St};
|
|
65
|
+
line-height: ${Ot};
|
|
66
|
+
text-transform: ${Ct};
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,Vt=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: ${Et.fontFamily};
|
|
71
|
+
font-size: ${Et.fontSize};
|
|
72
|
+
font-weight: ${Et.fontWeight};
|
|
73
|
+
letter-spacing: ${Et.letterSpacing};
|
|
74
|
+
line-height: ${Et.lineHeight};
|
|
75
|
+
text-transform: ${Et.textTransform};
|
|
76
76
|
}
|
|
77
|
-
`,
|
|
77
|
+
`,qt=i.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
|
-
font-family: ${
|
|
80
|
-
font-size: ${
|
|
81
|
-
font-weight: ${
|
|
79
|
+
font-family: ${Dt};
|
|
80
|
+
font-size: ${Bt};
|
|
81
|
+
font-weight: ${Ft};
|
|
82
82
|
letter-spacing: ${It};
|
|
83
83
|
line-height: ${jt};
|
|
84
|
-
text-transform: ${
|
|
84
|
+
text-transform: ${Nt};
|
|
85
85
|
}
|
|
86
|
-
`,
|
|
86
|
+
`,Xt=i.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
|
-
font-family: ${
|
|
89
|
-
font-size: ${
|
|
88
|
+
font-family: ${At};
|
|
89
|
+
font-size: ${Mt};
|
|
90
90
|
font-weight: ${Tt};
|
|
91
91
|
letter-spacing: ${Zt};
|
|
92
92
|
line-height: ${Rt};
|
|
93
93
|
text-transform: ${_t};
|
|
94
94
|
}
|
|
95
|
-
`,
|
|
95
|
+
`,Yt=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: ${Ut.fontFamily};
|
|
98
|
+
font-size: ${Ut.fontSize};
|
|
99
|
+
font-weight: ${Ut.fontWeight};
|
|
100
|
+
letter-spacing: ${Ut.letterSpacing};
|
|
101
|
+
line-height: ${Ut.lineHeight};
|
|
102
|
+
text-transform: ${Ut.textTransform};
|
|
103
103
|
}
|
|
104
|
-
`;class
|
|
105
|
-
<${
|
|
104
|
+
`;class Jt extends e.FtLitElement{constructor(){super(...arguments),this.variant=P.body1}render(){return this.element?K`
|
|
105
|
+
<${W(this.element)}
|
|
106
106
|
class="ft-typography ft-typography--${this.variant}">
|
|
107
107
|
<slot></slot>
|
|
108
|
-
</${
|
|
109
|
-
`:
|
|
108
|
+
</${W(this.element)}>
|
|
109
|
+
`:K`
|
|
110
110
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
111
|
-
`}}
|
|
111
|
+
`}}Jt.styles=[Ht,Wt,Lt,Kt,Pt,Gt,Vt,qt,Xt,Yt,i.css`
|
|
112
112
|
.ft-typography {
|
|
113
113
|
vertical-align: inherit;
|
|
114
114
|
}
|
|
115
|
-
`],G([o.property()],
|
|
116
|
-
<div class="${
|
|
115
|
+
`],G([o.property()],Jt.prototype,"element",void 0),G([o.property()],Jt.prototype,"variant",void 0),e.customElement("ft-typography")(Jt);var Qt=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};const te={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"),colorError:e.FtCssVariable.external(e.designSystemVariables.colorError,"Design system")};class ee extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!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,"ft-input-label--in-error":this.error};return i.html`
|
|
116
|
+
<div class="${s.classMap(t)}">
|
|
117
117
|
${this.text?i.html`
|
|
118
118
|
<div class="ft-input-label--text ft-typography--caption">
|
|
119
119
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
@@ -121,7 +121,7 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
121
121
|
</div>
|
|
122
122
|
`:null}
|
|
123
123
|
</div>
|
|
124
|
-
`}}
|
|
124
|
+
`}}ee.elementDefinitions={},ee.styles=[Vt,i.css`
|
|
125
125
|
.ft-input-label {
|
|
126
126
|
position: absolute;
|
|
127
127
|
inset: 0;
|
|
@@ -129,7 +129,11 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
.ft-input-label {
|
|
132
|
-
border-color: ${
|
|
132
|
+
border-color: ${te.borderColor};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.ft-input-label.ft-input-label--in-error {
|
|
136
|
+
border-color: ${te.colorError}
|
|
133
137
|
}
|
|
134
138
|
|
|
135
139
|
.ft-input-label:before,
|
|
@@ -142,7 +146,7 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
142
146
|
}
|
|
143
147
|
|
|
144
148
|
.ft-input-label:before {
|
|
145
|
-
width: ${
|
|
149
|
+
width: ${te.horizontalSpacing};
|
|
146
150
|
flex-shrink: 0;
|
|
147
151
|
}
|
|
148
152
|
|
|
@@ -158,14 +162,18 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
158
162
|
border-bottom-width: 1px;
|
|
159
163
|
border-bottom-style: solid;
|
|
160
164
|
border-color: inherit;
|
|
161
|
-
color: ${
|
|
165
|
+
color: ${te.textColor};
|
|
162
166
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
163
|
-
${e.setVariable(
|
|
164
|
-
${e.setVariable(
|
|
167
|
+
${e.setVariable(Et.fontSize,te.fontSize)};
|
|
168
|
+
${e.setVariable(Et.lineHeight,te.fontSize)};
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.ft-input-label--in-error .ft-input-label--text {
|
|
172
|
+
color: ${te.colorError}
|
|
165
173
|
}
|
|
166
174
|
|
|
167
175
|
.ft-input-label--disabled .ft-input-label--text {
|
|
168
|
-
color: ${
|
|
176
|
+
color: ${te.disabledTextColor};
|
|
169
177
|
}
|
|
170
178
|
|
|
171
179
|
.ft-input-label--hidden-text {
|
|
@@ -181,17 +189,17 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
181
189
|
overflow: hidden;
|
|
182
190
|
white-space: nowrap;
|
|
183
191
|
text-overflow: ellipsis;
|
|
184
|
-
padding: ${
|
|
185
|
-
margin: calc(${
|
|
192
|
+
padding: ${te.verticalSpacing} 4px;
|
|
193
|
+
margin: calc(${te.verticalSpacing} * -1) 0;
|
|
186
194
|
}
|
|
187
195
|
|
|
188
196
|
.ft-input-label--raised .ft-input-label--text {
|
|
189
|
-
${e.setVariable(
|
|
190
|
-
${e.setVariable(
|
|
197
|
+
${e.setVariable(Et.fontSize,te.raisedFontSize)};
|
|
198
|
+
${e.setVariable(Et.lineHeight,te.raisedFontSize)};
|
|
191
199
|
}
|
|
192
200
|
|
|
193
201
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
194
|
-
top: ${
|
|
202
|
+
top: ${te.verticalSpacing};
|
|
195
203
|
}
|
|
196
204
|
|
|
197
205
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -204,27 +212,27 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
204
212
|
.ft-input-label--outlined:before {
|
|
205
213
|
border-left-width: 1px;
|
|
206
214
|
border-left-style: solid;
|
|
207
|
-
border-radius: ${
|
|
215
|
+
border-radius: ${te.borderRadiusS} 0 0 ${te.borderRadiusS};
|
|
208
216
|
}
|
|
209
217
|
|
|
210
218
|
.ft-input-label--outlined:after {
|
|
211
219
|
border-right-width: 1px;
|
|
212
220
|
border-right-style: solid;
|
|
213
|
-
border-radius: 0 ${
|
|
221
|
+
border-radius: 0 ${te.borderRadiusS} ${te.borderRadiusS} 0;
|
|
214
222
|
}
|
|
215
223
|
|
|
216
224
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
217
225
|
padding: 2px 4px;
|
|
218
|
-
z-index: ${
|
|
219
|
-
background-color: ${
|
|
220
|
-
border-radius: ${
|
|
226
|
+
z-index: ${te.raisedZIndex};
|
|
227
|
+
background-color: ${te.colorSurface};
|
|
228
|
+
border-radius: ${te.borderRadiusS};
|
|
221
229
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
222
230
|
}
|
|
223
231
|
|
|
224
232
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
225
233
|
border-top: none;
|
|
226
234
|
}
|
|
227
|
-
`],
|
|
235
|
+
`],Qt([o.property({type:String})],ee.prototype,"text",void 0),Qt([o.property({type:Boolean})],ee.prototype,"raised",void 0),Qt([o.property({type:Boolean})],ee.prototype,"outlined",void 0),Qt([o.property({type:Boolean})],ee.prototype,"disabled",void 0),Qt([o.property({type:Boolean})],ee.prototype,"error",void 0),e.customElement("ft-input-label")(ee);var ie=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};const oe=e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorContent),ne={color:oe,backgroundColor:e.FtCssVariable.extend("--ft-ripple-background-color",oe),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")},le=e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),se=le,re=e.FtCssVariable.extend("--ft-ripple-background-color",le),ae=e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),pe=ae,fe=e.FtCssVariable.extend("--ft-ripple-background-color",ae);class de extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:n}=this.getCoordinates(t),l=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-l.x:l.width/2),this.originY=Math.round(null!=n?n-l.y:l.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
236
|
<style>
|
|
229
237
|
.ft-ripple .ft-ripple--effect,
|
|
230
238
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -237,11 +245,11 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
237
245
|
top: ${this.originY}px;
|
|
238
246
|
}
|
|
239
247
|
</style>
|
|
240
|
-
<div class="${
|
|
248
|
+
<div class="${s.classMap(t)}">
|
|
241
249
|
<div class="ft-ripple--background"></div>
|
|
242
250
|
<div class="ft-ripple--effect"></div>
|
|
243
251
|
</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
|
|
252
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const 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 he,ce;de.elementDefinitions={},de.styles=i.css`
|
|
245
253
|
:host {
|
|
246
254
|
display: contents;
|
|
247
255
|
}
|
|
@@ -260,17 +268,30 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
260
268
|
.ft-ripple .ft-ripple--effect {
|
|
261
269
|
position: absolute;
|
|
262
270
|
opacity: 0;
|
|
263
|
-
background-color: ${ie.color};
|
|
264
271
|
}
|
|
265
272
|
|
|
266
|
-
.ft-ripple
|
|
273
|
+
.ft-ripple .ft-ripple--background {
|
|
274
|
+
background-color: ${ne.backgroundColor};
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.ft-ripple .ft-ripple--effect {
|
|
278
|
+
background-color: ${ne.color};
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
282
|
+
background-color: ${fe};
|
|
283
|
+
}
|
|
284
|
+
|
|
267
285
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
268
|
-
background-color: ${
|
|
286
|
+
background-color: ${pe};
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
290
|
+
background-color: ${re};
|
|
269
291
|
}
|
|
270
292
|
|
|
271
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--background,
|
|
272
293
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
273
|
-
background-color: ${
|
|
294
|
+
background-color: ${se};
|
|
274
295
|
}
|
|
275
296
|
|
|
276
297
|
.ft-ripple .ft-ripple--background {
|
|
@@ -278,6 +299,7 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
278
299
|
left: 0;
|
|
279
300
|
height: 100%;
|
|
280
301
|
width: 100%;
|
|
302
|
+
transition: opacity 75ms linear;
|
|
281
303
|
}
|
|
282
304
|
|
|
283
305
|
.ft-ripple .ft-ripple--effect,
|
|
@@ -301,36 +323,36 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
301
323
|
}
|
|
302
324
|
|
|
303
325
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
304
|
-
opacity: ${
|
|
326
|
+
opacity: ${ne.opacityContentOnSurfaceHover};
|
|
305
327
|
}
|
|
306
328
|
|
|
307
329
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
308
|
-
opacity: ${
|
|
330
|
+
opacity: ${ne.opacityContentOnSurfaceSelected};
|
|
309
331
|
}
|
|
310
332
|
|
|
311
333
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
312
|
-
opacity: ${
|
|
334
|
+
opacity: ${ne.opacityContentOnSurfaceFocused};
|
|
313
335
|
}
|
|
314
336
|
|
|
315
337
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
316
|
-
opacity: ${
|
|
338
|
+
opacity: ${ne.opacityContentOnSurfacePressed};
|
|
317
339
|
transform: translate(-50%, -50%) scale(1);
|
|
318
340
|
}
|
|
319
|
-
`,
|
|
341
|
+
`,ie([o.property({type:Boolean})],de.prototype,"primary",void 0),ie([o.property({type:Boolean})],de.prototype,"secondary",void 0),ie([o.property({type:Boolean})],de.prototype,"unbounded",void 0),ie([o.property({type:Boolean})],de.prototype,"activated",void 0),ie([o.property({type:Boolean})],de.prototype,"selected",void 0),ie([o.property({type:Boolean})],de.prototype,"disabled",void 0),ie([o.state()],de.prototype,"hovered",void 0),ie([o.state()],de.prototype,"focused",void 0),ie([o.state()],de.prototype,"pressed",void 0),ie([o.state()],de.prototype,"rippling",void 0),ie([o.state()],de.prototype,"rippleSize",void 0),ie([o.state()],de.prototype,"originX",void 0),ie([o.state()],de.prototype,"originY",void 0),ie([o.query(".ft-ripple")],de.prototype,"ripple",void 0),ie([o.query(".ft-ripple--effect")],de.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(de),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=""}(he||(he={})),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=""}(ce||(ce={})),new Map([...["abw"].map((t=>[t,ce.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,ce.AUDIO])),...["avi"].map((t=>[t,ce.AVI])),...["chm","xhs"].map((t=>[t,ce.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,ce.CODE])),...["csv"].map((t=>[t,ce.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,ce.DITA])),...["epub"].map((t=>[t,ce.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,ce.EXCEL])),...["flac"].map((t=>[t,ce.FLAC])),...["gif"].map((t=>[t,ce.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,ce.GZIP])),...["html","htm","xhtml"].map((t=>[t,ce.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,ce.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,ce.JPEG])),...["json"].map((t=>[t,ce.JSON])),...["m4a","m4p"].map((t=>[t,ce.M4A])),...["mov","qt"].map((t=>[t,ce.MOV])),...["mp3"].map((t=>[t,ce.MP3])),...["mp4","m4v"].map((t=>[t,ce.MP4])),...["ogg","oga"].map((t=>[t,ce.OGG])),...["pdf","ps"].map((t=>[t,ce.PDF])),...["png"].map((t=>[t,ce.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,ce.POWERPOINT])),...["rar"].map((t=>[t,ce.RAR])),...["stp"].map((t=>[t,ce.STP])),...["txt","rtf","md","mdown"].map((t=>[t,ce.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,ce.VIDEO])),...["wav"].map((t=>[t,ce.WAV])),...["wma"].map((t=>[t,ce.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,ce.WORD])),...["xml","xsl","rdf"].map((t=>[t,ce.XML])),...["yaml","yml","x-yaml"].map((t=>[t,ce.YAML])),...["zip"].map((t=>[t,ce.ZIP]))]);var ue,xe=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(ue||(ue={}));const be={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 ve extends e.FtLitElement{constructor(){super(...arguments),this.variant=ue.fluid_topics}render(){return i.html`
|
|
320
342
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
321
|
-
${
|
|
343
|
+
${l.unsafeHTML(this.getIcon())}
|
|
322
344
|
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
323
345
|
</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===
|
|
346
|
+
`}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===ue.file_format?null!==(t=ce[o.toUpperCase()])&&void 0!==t?t:o:this.variant===ue.fluid_topics?null!==(e=he[o.toUpperCase()])&&void 0!==e?e:o:i.nothing}}ve.elementDefinitions={},ve.styles=i.css`
|
|
325
347
|
:host, i.ft-icon {
|
|
326
348
|
display: inline-block;
|
|
327
|
-
width: ${
|
|
328
|
-
height: ${
|
|
349
|
+
width: ${be.size};
|
|
350
|
+
height: ${be.size};
|
|
329
351
|
text-align: center;
|
|
330
352
|
}
|
|
331
353
|
|
|
332
354
|
i.ft-icon {
|
|
333
|
-
font-size: ${
|
|
355
|
+
font-size: ${be.size};
|
|
334
356
|
line-height: 1;
|
|
335
357
|
font-weight: normal;
|
|
336
358
|
text-transform: none;
|
|
@@ -344,24 +366,25 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
344
366
|
}
|
|
345
367
|
|
|
346
368
|
.ft-icon--fluid-topics {
|
|
347
|
-
font-family: ${
|
|
369
|
+
font-family: ${be.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
348
370
|
}
|
|
349
371
|
|
|
350
372
|
.ft-icon--file-format {
|
|
351
|
-
font-family: ${
|
|
373
|
+
font-family: ${be.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
352
374
|
}
|
|
353
375
|
|
|
354
376
|
.ft-icon--material {
|
|
355
|
-
font-family: ${
|
|
377
|
+
font-family: ${be.materialFontFamily}, "Material Icons", sans-serif;
|
|
356
378
|
}
|
|
357
|
-
`,
|
|
358
|
-
<div class="${
|
|
379
|
+
`,xe([o.property()],ve.prototype,"variant",void 0),xe([o.query("slot")],ve.prototype,"slottedContent",void 0),e.customElement("ft-icon")(ve);var ge=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};class ye 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}))}}ye.elementDefinitions={},ge([o.property({type:String})],ye.prototype,"label",void 0),ge([o.property({type:Object,converter:t=>t})],ye.prototype,"value",void 0),ge([o.property({type:Boolean,reflect:!0})],ye.prototype,"selected",void 0);const me={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","3"),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"),colorError:e.FtCssVariable.external(e.designSystemVariables.colorError,"Design system")};class $e extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!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,l,r;let a=this.hasOptionsMenuOpen,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,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return i.html`
|
|
380
|
+
<div class="${s.classMap(d)}" part="container">
|
|
359
381
|
<div class="ft-select--main-panel" part="main-panel">
|
|
360
382
|
<ft-input-label text="${this.label}"
|
|
361
383
|
part="label"
|
|
362
384
|
?disabled=${p}
|
|
363
385
|
?outlined=${this.outlined}
|
|
364
386
|
?raised=${f||a}
|
|
387
|
+
?error=${this.error}
|
|
365
388
|
></ft-input-label>
|
|
366
389
|
<div class="ft-select--input-panel"
|
|
367
390
|
part="selected-value"
|
|
@@ -373,7 +396,7 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
373
396
|
aria-expanded="${a}">
|
|
374
397
|
<ft-ripple ?disabled=${p} ?activated=${!this.outlined}></ft-ripple>
|
|
375
398
|
<ft-typography variant="body1" class="ft-select--selected-option">
|
|
376
|
-
${null!==(r=null===(
|
|
399
|
+
${null!==(r=null===(l=this.selectedOption)||void 0===l?void 0:l.label)&&void 0!==r?r:""}
|
|
377
400
|
</ft-typography>
|
|
378
401
|
<ft-icon variant="material">${a?"expand_less":"expand_more"}</ft-icon>
|
|
379
402
|
</div>
|
|
@@ -392,7 +415,7 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
392
415
|
@option-change=${this.updateOptionsFromSlot}
|
|
393
416
|
></slot>
|
|
394
417
|
`}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="${
|
|
418
|
+
<div class="${s.classMap(o)}"
|
|
396
419
|
part="option"
|
|
397
420
|
tabindex="0"
|
|
398
421
|
@keydown=${e=>this.onOptionKeyDown(e,t)}
|
|
@@ -400,7 +423,7 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
400
423
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
401
424
|
${t.label}
|
|
402
425
|
</div>
|
|
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,
|
|
426
|
+
`}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}))),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.minWidth=this.mainPanel.getBoundingClientRect().width+"px"}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 hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}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,l;let s;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(),s=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(),s=null!==(l=null===(n=this.focusedOption)||void 0===n?void 0:n.nextElementSibling)&&void 0!==l?l:this.firstOption}null==s||s.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)}}$e.elementDefinitions={"ft-input-label":ee,"ft-typography":Jt,"ft-ripple":de,"ft-icon":ve},$e.styles=[Gt,Vt,i.css`
|
|
404
427
|
*:focus {
|
|
405
428
|
outline: none;
|
|
406
429
|
}
|
|
@@ -414,7 +437,7 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
414
437
|
.ft-select--main-panel {
|
|
415
438
|
position: relative;
|
|
416
439
|
display: flex;
|
|
417
|
-
height: calc(4 * ${
|
|
440
|
+
height: calc(4 * ${me.verticalSpacing} + ${me.labelSize} + ${me.selectedOptionSize});
|
|
418
441
|
}
|
|
419
442
|
|
|
420
443
|
.ft-select--input-panel {
|
|
@@ -426,19 +449,24 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
426
449
|
padding-left: 16px;
|
|
427
450
|
padding-right: 8px;
|
|
428
451
|
gap: 8px;
|
|
429
|
-
color: ${
|
|
430
|
-
${e.setVariable(
|
|
452
|
+
color: ${me.selectedOptionColor};
|
|
453
|
+
${e.setVariable(ne.color,me.selectedOptionColor)};
|
|
431
454
|
}
|
|
432
455
|
|
|
433
456
|
.ft-select--input-panel,
|
|
434
457
|
.ft-select--option {
|
|
435
|
-
${e.setVariable(
|
|
436
|
-
${e.setVariable(
|
|
458
|
+
${e.setVariable(ne.opacityContentOnSurfaceHover,"0.08")};
|
|
459
|
+
${e.setVariable(ne.opacityContentOnSurfacePressed,"0.04")};
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.ft-select--input-panel > *:not(ft-ripple),
|
|
463
|
+
.ft-select--option > *:not(ft-ripple) {
|
|
464
|
+
position: relative;
|
|
437
465
|
}
|
|
438
466
|
|
|
439
467
|
.ft-select--disabled .ft-select--input-panel,
|
|
440
468
|
.ft-select--disabled .ft-select--option {
|
|
441
|
-
color: ${
|
|
469
|
+
color: ${me.colorOnSurfaceDisabled};
|
|
442
470
|
}
|
|
443
471
|
|
|
444
472
|
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
@@ -447,18 +475,18 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
447
475
|
}
|
|
448
476
|
|
|
449
477
|
ft-input-label {
|
|
450
|
-
${e.setVariable(
|
|
451
|
-
${e.setVariable(
|
|
452
|
-
${e.setVariable(
|
|
478
|
+
${e.setVariable(te.fontSize,me.selectedOptionSize)};
|
|
479
|
+
${e.setVariable(te.raisedFontSize,me.labelSize)};
|
|
480
|
+
${e.setVariable(te.verticalSpacing,me.verticalSpacing)};
|
|
453
481
|
}
|
|
454
482
|
|
|
455
483
|
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
456
|
-
color: ${
|
|
484
|
+
color: ${me.colorPrimary};
|
|
457
485
|
}
|
|
458
486
|
|
|
459
487
|
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
460
|
-
${e.setVariable(
|
|
461
|
-
${e.setVariable(
|
|
488
|
+
${e.setVariable(te.borderColor,me.colorPrimary)};
|
|
489
|
+
${e.setVariable(te.textColor,me.colorPrimary)};
|
|
462
490
|
}
|
|
463
491
|
|
|
464
492
|
.ft-select--selected-option {
|
|
@@ -468,8 +496,12 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
468
496
|
overflow: hidden;
|
|
469
497
|
white-space: nowrap;
|
|
470
498
|
text-overflow: ellipsis;
|
|
471
|
-
${e.setVariable(
|
|
472
|
-
${e.setVariable(
|
|
499
|
+
${e.setVariable($t.fontSize,me.selectedOptionSize)};
|
|
500
|
+
${e.setVariable($t.lineHeight,me.selectedOptionSize)};
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.ft-select--in-error .ft-select--selected-option {
|
|
504
|
+
color: ${me.colorError};
|
|
473
505
|
}
|
|
474
506
|
|
|
475
507
|
ft-icon {
|
|
@@ -481,16 +513,16 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
481
513
|
}
|
|
482
514
|
|
|
483
515
|
.ft-select--filled .ft-select--input-panel {
|
|
484
|
-
border-radius: ${
|
|
516
|
+
border-radius: ${me.borderRadiusS} ${me.borderRadiusS} 0 0;
|
|
485
517
|
}
|
|
486
518
|
|
|
487
519
|
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
488
520
|
align-self: stretch;
|
|
489
|
-
padding-top: calc(${
|
|
521
|
+
padding-top: calc(${me.labelSize} + 2 * ${me.verticalSpacing});
|
|
490
522
|
}
|
|
491
523
|
|
|
492
524
|
.ft-select--outlined .ft-select--input-panel {
|
|
493
|
-
border-radius: ${
|
|
525
|
+
border-radius: ${me.borderRadiusS};
|
|
494
526
|
}
|
|
495
527
|
|
|
496
528
|
.ft-select--options {
|
|
@@ -499,10 +531,16 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
499
531
|
top: 100%;
|
|
500
532
|
left: 0;
|
|
501
533
|
right: 0;
|
|
502
|
-
color: ${
|
|
503
|
-
background: ${
|
|
504
|
-
z-index: ${
|
|
505
|
-
box-shadow: ${
|
|
534
|
+
color: ${me.optionsColor};
|
|
535
|
+
background: ${me.colorSurface};
|
|
536
|
+
z-index: ${me.optionsZIndex};
|
|
537
|
+
box-shadow: ${me.elevation02};
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
.ft-select--fixed .ft-select--options {
|
|
541
|
+
position: fixed;
|
|
542
|
+
right: unset;
|
|
543
|
+
/* left and top are set dynamically */
|
|
506
544
|
}
|
|
507
545
|
|
|
508
546
|
.ft-select--options-displayed .ft-select--options {
|
|
@@ -519,44 +557,48 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
519
557
|
|
|
520
558
|
.ft-select--helper-text {
|
|
521
559
|
padding: 0 12px 0 16px;
|
|
522
|
-
color: ${
|
|
560
|
+
color: ${me.helperColor};
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.ft-select--in-error .ft-select--helper-text {
|
|
564
|
+
color: ${me.colorError};
|
|
523
565
|
}
|
|
524
|
-
`],
|
|
525
|
-
<div class="${
|
|
566
|
+
`],ge([o.property({type:String})],$e.prototype,"label",void 0),ge([o.property({type:String})],$e.prototype,"helper",void 0),ge([o.property({type:Boolean})],$e.prototype,"outlined",void 0),ge([o.property({type:Boolean})],$e.prototype,"disabled",void 0),ge([o.property({type:Boolean})],$e.prototype,"error",void 0),ge([o.property({type:Boolean})],$e.prototype,"fixedMenuPosition",void 0),ge([o.property({type:Array})],$e.prototype,"options",void 0),ge([o.state()],$e.prototype,"selectedOption",void 0),ge([o.state()],$e.prototype,"optionsDisplayed",void 0),ge([o.state()],$e.prototype,"focusOptions",void 0),ge([o.query(".ft-select")],$e.prototype,"container",void 0),ge([o.query(".ft-select--options")],$e.prototype,"optionsMenu",void 0),ge([o.query(".ft-select--input-panel")],$e.prototype,"mainPanel",void 0),ge([o.query(".ft-select--option:first-child")],$e.prototype,"firstOption",void 0),ge([o.query(".ft-select--option:focus")],$e.prototype,"focusedOption",void 0),ge([o.query(".ft-select--option.ft-select--option-selected")],$e.prototype,"selectedOptionElement",void 0),ge([o.query(".ft-select--option:last-child")],$e.prototype,"lastOption",void 0),ge([o.query("slot")],$e.prototype,"optionsSlot",void 0),e.customElement("ft-select")($e),e.customElement("ft-select-option")(ye);var we=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};const ke={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"),colorError:e.FtCssVariable.external(e.designSystemVariables.colorError,"Design system"),prefixColor:e.FtCssVariable.extend("--ft-text-field-prefix-color",e.designSystemVariables.colorOnSurfaceMedium),iconColor:e.FtCssVariable.extend("--ft-text-field-icon-color",e.designSystemVariables.colorOnSurfaceMedium)};class ze extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix="",this.icon="",this.iconVariant="",this.focused=!1}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}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,"ft-text-field--in-error":this.error,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--raised-label":this.focused||""!=this.value};return i.html`
|
|
567
|
+
<div class="${s.classMap(t)}">
|
|
526
568
|
<div class="ft-text-field--main-panel">
|
|
527
569
|
<ft-input-label text="${this.label}"
|
|
528
570
|
?disabled=${this.disabled}
|
|
529
571
|
?outlined=${this.outlined}
|
|
530
572
|
?raised=${this.focused||""!=this.value}
|
|
573
|
+
?error=${this.error}
|
|
531
574
|
></ft-input-label>
|
|
532
575
|
<div class="ft-text-field--input-panel"
|
|
533
576
|
aria-label="${this.label}">
|
|
534
577
|
${this.outlined?null:i.html`
|
|
535
578
|
<ft-ripple ?disabled=${this.disabled} activated></ft-ripple>
|
|
536
579
|
`}
|
|
537
|
-
<
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
580
|
+
<div class="ft-text-field--input-wrapper">
|
|
581
|
+
<ft-typography class="ft-text-field--prefix" vaiant="body1">${this.prefix}</ft-typography>
|
|
582
|
+
<input type="text"
|
|
583
|
+
class="ft-typography--body1 ft-text-field--input"
|
|
584
|
+
?disabled=${this.disabled}
|
|
585
|
+
.value=${this.value}
|
|
586
|
+
@change=${this.updateValueFromInputField}
|
|
587
|
+
@keyup=${this.liveUpdateValueFromInputField}
|
|
588
|
+
@focus=${()=>this.focused=!0}
|
|
589
|
+
@focusout=${()=>this.focused=!1}
|
|
590
|
+
/>
|
|
591
|
+
</div>
|
|
592
|
+
${this.icon?i.html`
|
|
593
|
+
<ft-icon class="ft-text-field--icon" variant="${this.iconVariant}">${this.icon}
|
|
594
|
+
</ft-icon>`:void 0}
|
|
553
595
|
</div>
|
|
554
596
|
</div>
|
|
555
597
|
${this.helper?i.html`
|
|
556
598
|
<ft-typography class="ft-text-field--helper-text" variant="caption">${this.helper}
|
|
557
599
|
</ft-typography>`:void 0}
|
|
558
600
|
</div>
|
|
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)||""}}
|
|
601
|
+
`}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)||""}}ze.elementDefinitions={"ft-input-label":ee,"ft-ripple":de,"ft-typography":Jt,"ft-icon":ve},ze.styles=[Pt,i.css`
|
|
560
602
|
*:focus {
|
|
561
603
|
outline: none;
|
|
562
604
|
}
|
|
@@ -568,16 +610,16 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
568
610
|
}
|
|
569
611
|
|
|
570
612
|
ft-input-label {
|
|
571
|
-
${e.setVariable(
|
|
572
|
-
${e.setVariable(
|
|
573
|
-
${e.setVariable(
|
|
574
|
-
${e.setVariable(
|
|
613
|
+
${e.setVariable(te.fontSize,ke.fontSize)};
|
|
614
|
+
${e.setVariable(te.raisedFontSize,ke.labelSize)};
|
|
615
|
+
${e.setVariable(te.verticalSpacing,ke.verticalSpacing)};
|
|
616
|
+
${e.setVariable(te.horizontalSpacing,i.css`calc(${ke.horizontalSpacing} - 4px)`)};
|
|
575
617
|
}
|
|
576
618
|
|
|
577
619
|
.ft-text-field--main-panel {
|
|
578
620
|
position: relative;
|
|
579
621
|
display: flex;
|
|
580
|
-
height: calc(4 * ${
|
|
622
|
+
height: calc(4 * ${ke.verticalSpacing} + ${ke.labelSize} + ${ke.fontSize});
|
|
581
623
|
}
|
|
582
624
|
|
|
583
625
|
.ft-text-field--input-panel {
|
|
@@ -586,37 +628,65 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
586
628
|
display: flex;
|
|
587
629
|
align-items: center;
|
|
588
630
|
overflow: hidden;
|
|
589
|
-
gap: 8px;
|
|
590
631
|
}
|
|
591
632
|
|
|
592
633
|
.ft-text-field--input-panel ft-ripple {
|
|
593
|
-
${e.setVariable(
|
|
594
|
-
${e.setVariable(
|
|
634
|
+
${e.setVariable(ne.opacityContentOnSurfaceHover,"0.08")};
|
|
635
|
+
${e.setVariable(ne.opacityContentOnSurfacePressed,"0.04")};
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.ft-text-field--input-wrapper {
|
|
639
|
+
flex-grow: 1;
|
|
640
|
+
flex-shrink: 1;
|
|
641
|
+
|
|
642
|
+
display: flex;
|
|
643
|
+
align-items: center;
|
|
644
|
+
|
|
645
|
+
${e.setVariable($t.fontSize,ke.fontSize)};
|
|
646
|
+
${e.setVariable($t.lineHeight,ke.fontSize)};
|
|
647
|
+
|
|
648
|
+
padding: 0 ${ke.horizontalSpacing};
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
.ft-text-field--filled:not(.ft-text-field--no-label) .ft-text-field--input-wrapper {
|
|
652
|
+
align-items: flex-end;
|
|
653
|
+
padding: 0 ${ke.horizontalSpacing} ${ke.verticalSpacing} ${ke.horizontalSpacing};
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
.ft-text-field--prefix {
|
|
657
|
+
display: none;
|
|
658
|
+
color: ${ke.prefixColor}
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
.ft-text-field--with-prefix.ft-text-field--raised-label .ft-text-field--prefix {
|
|
662
|
+
display: block;
|
|
595
663
|
}
|
|
596
664
|
|
|
597
665
|
.ft-text-field--input {
|
|
598
666
|
display: block;
|
|
667
|
+
position: relative;
|
|
599
668
|
flex-grow: 1;
|
|
600
669
|
flex-shrink: 1;
|
|
601
670
|
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
602
671
|
|
|
603
|
-
${
|
|
604
|
-
${
|
|
605
|
-
color: ${be.colorOnSurface};
|
|
606
|
-
|
|
607
|
-
padding: 0 ${be.horizontalSpacing};
|
|
608
|
-
|
|
672
|
+
color: ${ke.colorOnSurface};
|
|
673
|
+
padding: calc(2 * ${ke.verticalSpacing}) 0;
|
|
609
674
|
border: none;
|
|
610
675
|
background: none;
|
|
611
676
|
}
|
|
612
677
|
|
|
678
|
+
.ft-text-field--filled:not(.ft-text-field--no-label) .ft-text-field--input {
|
|
679
|
+
padding-bottom: 0;
|
|
680
|
+
padding-top: calc(${ke.labelSize} + 2 * ${ke.verticalSpacing});
|
|
681
|
+
}
|
|
682
|
+
|
|
613
683
|
.ft-text-field--input::-webkit-calendar-picker-indicator,
|
|
614
684
|
.ft-text-field--input::-webkit-list-button {
|
|
615
685
|
display: none !important;
|
|
616
686
|
}
|
|
617
687
|
|
|
618
688
|
.ft-text-field--disabled .ft-text-field--input {
|
|
619
|
-
color: ${
|
|
689
|
+
color: ${ke.colorOnSurfaceDisabled};
|
|
620
690
|
}
|
|
621
691
|
|
|
622
692
|
.ft-text-field:not(.ft-text-field--disabled) .ft-text-field--input-panel {
|
|
@@ -624,29 +694,34 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
624
694
|
}
|
|
625
695
|
|
|
626
696
|
.ft-text-field:not(.ft-text-field--disabled):focus-within ft-input-label {
|
|
627
|
-
${e.setVariable(
|
|
628
|
-
${e.setVariable(
|
|
697
|
+
${e.setVariable(te.borderColor,ke.colorPrimary)};
|
|
698
|
+
${e.setVariable(te.textColor,ke.colorPrimary)};
|
|
629
699
|
}
|
|
630
700
|
|
|
631
701
|
.ft-text-field--filled .ft-text-field--input-panel {
|
|
632
|
-
border-radius: ${
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
.ft-text-field--filled:not(.ft-text-field--no-label) .ft-text-field--input {
|
|
636
|
-
align-self: stretch;
|
|
637
|
-
padding-bottom: ${be.verticalSpacing};
|
|
638
|
-
padding-top: calc(${be.labelSize} + 2 * ${be.verticalSpacing});
|
|
702
|
+
border-radius: ${ke.borderRadiusS} ${ke.borderRadiusS} 0 0;
|
|
639
703
|
}
|
|
640
704
|
|
|
641
705
|
.ft-text-field--outlined .ft-text-field--input-panel {
|
|
642
|
-
border-radius: ${
|
|
706
|
+
border-radius: ${ke.borderRadiusS};
|
|
643
707
|
}
|
|
644
708
|
|
|
645
709
|
.ft-text-field--helper-text {
|
|
646
|
-
padding: 0 12px 0 ${
|
|
647
|
-
color: ${
|
|
710
|
+
padding: 0 12px 0 ${ke.horizontalSpacing};
|
|
711
|
+
color: ${ke.helperColor};
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.ft-text-field--in-error .ft-text-field--input,
|
|
715
|
+
.ft-text-field--in-error .ft-text-field--helper-text,
|
|
716
|
+
.ft-text-field--in-error .ft-text-field--prefix {
|
|
717
|
+
color: ${ke.colorError};
|
|
648
718
|
}
|
|
649
|
-
|
|
719
|
+
|
|
720
|
+
.ft-text-field--icon {
|
|
721
|
+
padding-right: ${ke.horizontalSpacing};
|
|
722
|
+
color: ${ke.iconColor};
|
|
723
|
+
}
|
|
724
|
+
`],we([o.property({type:String})],ze.prototype,"label",void 0),we([o.property({reflect:!0})],ze.prototype,"value",void 0),we([o.property({type:String})],ze.prototype,"helper",void 0),we([o.property({type:Boolean})],ze.prototype,"outlined",void 0),we([o.property({type:Boolean})],ze.prototype,"disabled",void 0),we([o.property({type:Boolean})],ze.prototype,"error",void 0),we([o.query(".ft-text-field--input")],ze.prototype,"input",void 0),we([o.property({type:String})],ze.prototype,"prefix",void 0),we([o.property({type:String})],ze.prototype,"icon",void 0),we([o.property({type:String})],ze.prototype,"iconVariant",void 0),we([o.state()],ze.prototype,"focused",void 0),e.customElement("ft-text-field")(ze);var Se=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};const Oe=e.FtCssVariable.create("--ft-tooltip-distance","SIZE","4px"),Ce=e.FtCssVariable.create("--ft-tooltip-color","COLOR","#FFFFFF"),Ee=e.FtCssVariable.create("--ft-tooltip-background-color","COLOR","#666666"),De=e.FtCssVariable.create("--ft-tooltip-z-index","NUMBER","1"),Be=e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system");class Fe 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`
|
|
650
725
|
<div part="container"
|
|
651
726
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
652
727
|
@mouseenter=${this.onHover}
|
|
@@ -661,7 +736,7 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
661
736
|
</div>
|
|
662
737
|
<slot></slot>
|
|
663
738
|
</div>
|
|
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())}}
|
|
739
|
+
`}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())}}Fe.elementDefinitions={"ft-typography":Jt},Fe.styles=i.css`
|
|
665
740
|
.ft-tooltip--container {
|
|
666
741
|
display: block;
|
|
667
742
|
position: relative;
|
|
@@ -679,21 +754,21 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
679
754
|
width: max-content;
|
|
680
755
|
max-width: 150px;
|
|
681
756
|
text-align: center;
|
|
682
|
-
padding: ${
|
|
683
|
-
z-index: ${
|
|
757
|
+
padding: ${Oe};
|
|
758
|
+
z-index: ${De};
|
|
684
759
|
}
|
|
685
760
|
|
|
686
761
|
.ft-tooltip--content {
|
|
687
762
|
padding: 4px 8px;
|
|
688
|
-
border-radius: ${
|
|
689
|
-
background-color: ${
|
|
690
|
-
color: ${
|
|
763
|
+
border-radius: ${Be};
|
|
764
|
+
background-color: ${Ee};
|
|
765
|
+
color: ${Ce};
|
|
691
766
|
top: -500px;
|
|
692
767
|
left: -500px;
|
|
693
768
|
position: relative;
|
|
694
769
|
word-break: break-word;
|
|
695
770
|
}
|
|
696
|
-
`,
|
|
771
|
+
`,Se([o.property()],Fe.prototype,"text",void 0),Se([o.property({type:Boolean})],Fe.prototype,"manual",void 0),Se([o.property({type:Boolean})],Fe.prototype,"inline",void 0),Se([o.property({type:Number})],Fe.prototype,"delay",void 0),Se([o.property()],Fe.prototype,"position",void 0),Se([o.queryAssignedNodes("",!0)],Fe.prototype,"slotNodes",void 0),Se([o.query(".ft-tooltip--container")],Fe.prototype,"container",void 0),Se([o.query("slot")],Fe.prototype,"target",void 0),Se([o.query(".ft-tooltip")],Fe.prototype,"tooltip",void 0),Se([o.query(".ft-tooltip--content")],Fe.prototype,"tooltipContent",void 0),Se([o.state()],Fe.prototype,"visible",void 0),e.customElement("ft-tooltip")(Fe);const Ie={color:e.FtCssVariable.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariable.create("--ft-loader-size","SIZE","80px")};class je extends e.FtLitElement{static get styles(){return i.css`
|
|
697
772
|
:host {
|
|
698
773
|
line-height: 0;
|
|
699
774
|
}
|
|
@@ -702,8 +777,8 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
702
777
|
display: inline-block;
|
|
703
778
|
position: relative;
|
|
704
779
|
|
|
705
|
-
width: ${
|
|
706
|
-
height: ${
|
|
780
|
+
width: ${Ie.size};
|
|
781
|
+
height: ${Ie.size};
|
|
707
782
|
}
|
|
708
783
|
|
|
709
784
|
.ft-loader div {
|
|
@@ -712,7 +787,7 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
712
787
|
width: 25%;
|
|
713
788
|
height: 25%;
|
|
714
789
|
border-radius: 50%;
|
|
715
|
-
background: ${
|
|
790
|
+
background: ${Ie.color};
|
|
716
791
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
717
792
|
}
|
|
718
793
|
|
|
@@ -759,7 +834,7 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
759
834
|
transform: translate(0, 0);
|
|
760
835
|
}
|
|
761
836
|
100% {
|
|
762
|
-
transform: translate(calc(0.35 * ${
|
|
837
|
+
transform: translate(calc(0.35 * ${Ie.size}), 0);
|
|
763
838
|
}
|
|
764
839
|
}
|
|
765
840
|
`}render(){return i.html`
|
|
@@ -769,7 +844,7 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
769
844
|
<div></div>
|
|
770
845
|
<div></div>
|
|
771
846
|
</div>
|
|
772
|
-
`}}e.customElement("ft-loader")(
|
|
847
|
+
`}}e.customElement("ft-loader")(je);var Ne=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};const Ae=e.FtCssVariable.extend("--ft-button-color",e.designSystemVariables.colorPrimary),Me={backgroundColor:e.FtCssVariable.extend("--ft-button-background-color",e.designSystemVariables.colorSurface),borderRadius:e.FtCssVariable.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusL),color:Ae,fontSize:e.FtCssVariable.extend("--ft-button-font-size",Ut.fontSize),iconSize:e.FtCssVariable.create("--ft-button-icon-size","SIZE","24px"),rippleColor:e.FtCssVariable.extend("--ft-button-ripple-color",Ae),opacityDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},Te=e.FtCssVariable.extend("--ft-button-primary-color",e.FtCssVariable.extend("--ft-button-color",e.designSystemVariables.colorOnPrimary)),Ze={backgroundColor:e.FtCssVariable.extend("--ft-button-primary-background-color",e.FtCssVariable.extend("--ft-button-background-color",e.designSystemVariables.colorPrimary)),color:Te,rippleColor:e.FtCssVariable.extend("--ft-button-primary-ripple-color",Te)},Re=e.FtCssVariable.extend("--ft-button-dense-border-radius",e.FtCssVariable.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusM));class _e 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`
|
|
773
848
|
:host {
|
|
774
849
|
display: inline-block;
|
|
775
850
|
max-width: 100%;
|
|
@@ -808,18 +883,18 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
808
883
|
border: none;
|
|
809
884
|
pointer-events: auto;
|
|
810
885
|
|
|
811
|
-
--ft-button-internal-font-size: ${
|
|
886
|
+
--ft-button-internal-font-size: ${Me.fontSize};
|
|
812
887
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
813
|
-
--ft-button-internal-color: ${
|
|
814
|
-
${e.setVariable(
|
|
888
|
+
--ft-button-internal-color: ${Me.color};
|
|
889
|
+
${e.setVariable(be.size,Me.iconSize)};
|
|
815
890
|
--ft-button-internal-vertical-padding: 6px;
|
|
816
891
|
--ft-button-internal-horizontal-padding: 8px;
|
|
817
|
-
${e.setVariable(
|
|
818
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
892
|
+
${e.setVariable(ne.color,Me.rippleColor)};
|
|
893
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Me.iconSize});
|
|
819
894
|
|
|
820
|
-
border-radius: ${
|
|
895
|
+
border-radius: ${Me.borderRadius};
|
|
821
896
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
822
|
-
background-color: ${
|
|
897
|
+
background-color: ${Me.backgroundColor};
|
|
823
898
|
color: var(--ft-button-internal-color);
|
|
824
899
|
-webkit-mask-image: radial-gradient(white, black);
|
|
825
900
|
}
|
|
@@ -831,7 +906,7 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
831
906
|
.ft-button--dense {
|
|
832
907
|
--ft-button-internal-vertical-padding: 2px;
|
|
833
908
|
--ft-button-internal-horizontal-padding: 4px;
|
|
834
|
-
border-radius: ${
|
|
909
|
+
border-radius: ${Re};
|
|
835
910
|
}
|
|
836
911
|
|
|
837
912
|
.ft-button--round {
|
|
@@ -840,13 +915,13 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
840
915
|
|
|
841
916
|
.ft-button[disabled] {
|
|
842
917
|
filter: grayscale(1);
|
|
843
|
-
opacity: ${
|
|
918
|
+
opacity: ${Me.opacityDisabled};
|
|
844
919
|
}
|
|
845
920
|
|
|
846
921
|
.ft-button.ft-button--primary {
|
|
847
|
-
background-color: ${
|
|
848
|
-
--ft-button-internal-color: ${
|
|
849
|
-
${e.setVariable(
|
|
922
|
+
background-color: ${Ze.backgroundColor};
|
|
923
|
+
--ft-button-internal-color: ${Ze.color};
|
|
924
|
+
${e.setVariable(ne.color,Ze.rippleColor)};
|
|
850
925
|
}
|
|
851
926
|
|
|
852
927
|
.ft-button.ft-button--outlined {
|
|
@@ -859,13 +934,14 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
859
934
|
}
|
|
860
935
|
|
|
861
936
|
.ft-button--label {
|
|
937
|
+
position: relative;
|
|
862
938
|
overflow: hidden;
|
|
863
939
|
white-space: nowrap;
|
|
864
940
|
text-overflow: ellipsis;
|
|
865
941
|
display: block;
|
|
866
942
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
867
|
-
${e.setVariable(
|
|
868
|
-
${e.setVariable(
|
|
943
|
+
${e.setVariable(Ut.fontSize,"var(--ft-button-internal-font-size)")};
|
|
944
|
+
${e.setVariable(Ut.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
869
945
|
}
|
|
870
946
|
|
|
871
947
|
.ft-button--safari-fix .ft-button--label {
|
|
@@ -884,6 +960,7 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
884
960
|
|
|
885
961
|
ft-icon {
|
|
886
962
|
flex-shrink: 0;
|
|
963
|
+
position: relative;
|
|
887
964
|
}
|
|
888
965
|
|
|
889
966
|
.ft-button--label[hidden] + ft-icon {
|
|
@@ -897,12 +974,12 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
897
974
|
}
|
|
898
975
|
|
|
899
976
|
ft-loader {
|
|
900
|
-
${e.setVariable(
|
|
901
|
-
${e.setVariable(
|
|
977
|
+
${e.setVariable(Ie.size,Me.iconSize)};
|
|
978
|
+
${e.setVariable(Ie.color,"var(--ft-button-internal-color)")};
|
|
902
979
|
}
|
|
903
980
|
`]}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`
|
|
904
981
|
<button part="button"
|
|
905
|
-
class="${
|
|
982
|
+
class="${s.classMap(t)}"
|
|
906
983
|
aria-label="${this.getLabel()}"
|
|
907
984
|
?disabled=${this.isDisabled()}>
|
|
908
985
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
@@ -922,7 +999,7 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
922
999
|
</ft-tooltip>
|
|
923
1000
|
`}resolveIcon(){return this.loading?i.html`
|
|
924
1001
|
<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}}
|
|
1002
|
+
<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}}_e.elementDefinitions={"ft-ripple":de,"ft-tooltip":Fe,"ft-typography":Jt,"ft-icon":ve,"ft-loader":je},Ne([o.property({type:Boolean})],_e.prototype,"primary",void 0),Ne([o.property({type:Boolean})],_e.prototype,"outlined",void 0),Ne([o.property({type:Boolean})],_e.prototype,"disabled",void 0),Ne([o.property({type:Boolean})],_e.prototype,"dense",void 0),Ne([o.property({type:Boolean})],_e.prototype,"round",void 0),Ne([o.property({type:String})],_e.prototype,"label",void 0),Ne([o.property({type:String})],_e.prototype,"icon",void 0),Ne([o.property({type:Boolean})],_e.prototype,"trailingIcon",void 0),Ne([o.property({type:Boolean})],_e.prototype,"loading",void 0),Ne([o.property({type:String})],_e.prototype,"tooltipPosition",void 0),Ne([o.query(".ft-button")],_e.prototype,"button",void 0),Ne([o.query(".ft-button--label slot")],_e.prototype,"slottedContent",void 0),e.customElement("ft-button")(_e);var Ue=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};class He extends CustomEvent{constructor(t){super("row-click",{detail:t})}}const We={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"),stickyHeaderZIndex:e.FtCssVariable.create("--ft-filterable-table-sticky-header-zindex","NUMBER","100"),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")},Le=t=>i.html`${t}`,Ke=(t,e)=>t-e;class Pe extends e.FtLitElement{constructor(){super(...arguments),this.data=[],this.columns=[],this.stickyHeaders=!1,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
1003
|
<style>
|
|
927
1004
|
.table {
|
|
928
1005
|
grid-template-columns: repeat(${this.columns.length}, minmax(min-content, auto));
|
|
@@ -934,13 +1011,13 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
934
1011
|
</div>
|
|
935
1012
|
${n.repeat(t,((t,e)=>"row-"+e),((t,e)=>i.html`
|
|
936
1013
|
<div class="row"
|
|
937
|
-
@click=${()=>this.dispatchEvent(new
|
|
1014
|
+
@click=${()=>this.dispatchEvent(new He(t))}>
|
|
938
1015
|
${n.repeat(this.columns,((t,i)=>"cell-"+e+" "+i),(i=>this.renderCell(i,t,e)))}
|
|
939
1016
|
</div>
|
|
940
1017
|
`))}
|
|
941
1018
|
</div>
|
|
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:
|
|
943
|
-
<div class="${
|
|
1019
|
+
`}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:Ke,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){const o={"header-cell":!0,"header-cell--sticky":this.stickyHeaders};return i.html`
|
|
1020
|
+
<div class="${s.classMap(o)}">
|
|
944
1021
|
<div class="column-title-container">
|
|
945
1022
|
<span class="column-title">${t.title}</span>
|
|
946
1023
|
${this.renderColumnSort(t,e)}
|
|
@@ -950,30 +1027,30 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
950
1027
|
${this.renderColumnFilter(t,e)}
|
|
951
1028
|
</div>`:null}
|
|
952
1029
|
</div>
|
|
953
|
-
`}renderColumnSort(t,e){var o;const n=this.currentSort&&this.currentSort.column===e,
|
|
1030
|
+
`}renderColumnSort(t,e){var o;const n=this.currentSort&&this.currentSort.column===e,l=n?"asc"===this.currentSort.order?"expand_more":"expand_less":"unfold_more";return i.html`
|
|
954
1031
|
<ft-button
|
|
955
1032
|
round
|
|
956
1033
|
dense
|
|
957
1034
|
class="${null===(o=t.sortable)||void 0===o||o?"":"hidden"}"
|
|
958
|
-
icon="${
|
|
1035
|
+
icon="${l}"
|
|
959
1036
|
label="Sort ${t.title}"
|
|
960
1037
|
@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"}}}
|
|
961
1038
|
></ft-button>
|
|
962
|
-
`}renderColumnFilter(t,e){var o,n;const
|
|
1039
|
+
`}renderColumnFilter(t,e){var o,n;const l=t=>{this.filters[e]={value:t.detail},this.requestUpdate()};switch(null!==(o=t.filter)&&void 0!==o?o:"text"){case"text":return i.html`
|
|
963
1040
|
<ft-text-field
|
|
964
1041
|
label="Search ${t.title}"
|
|
965
|
-
@live-change="${
|
|
1042
|
+
@live-change="${l}"
|
|
966
1043
|
></ft-text-field>
|
|
967
1044
|
`;case"select":const o=null!==(n=this.selectData[e])&&void 0!==n?n:[];return o.length?i.html`
|
|
968
|
-
<ft-select label="Filter ${t.title}" @change=${
|
|
1045
|
+
<ft-select label="Filter ${t.title}" @change=${l}>
|
|
969
1046
|
<ft-select-option></ft-select-option>
|
|
970
1047
|
${o.map((t=>i.html`
|
|
971
1048
|
<ft-select-option value="${t}" label="${t}"></ft-select-option>
|
|
972
1049
|
`))}
|
|
973
1050
|
</ft-select>
|
|
974
|
-
`:null}return null}renderCell(t,e,o){var n;const
|
|
975
|
-
<div class="cell">${(t=>{const e=
|
|
976
|
-
`}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)}}
|
|
1051
|
+
`:null}return null}renderCell(t,e,o){var n;const s=null!==(n=t.render)&&void 0!==n?n:Le;return i.html`
|
|
1052
|
+
<div class="cell">${(t=>{const e=s(t,o);return"string"==typeof e?l.unsafeHTML(e):e})(this.getValue(t,e))}</div>
|
|
1053
|
+
`}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)}}Pe.styles=i.css`
|
|
977
1054
|
:host {
|
|
978
1055
|
display: block;
|
|
979
1056
|
}
|
|
@@ -989,15 +1066,15 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
989
1066
|
.header-cell {
|
|
990
1067
|
display: flex;
|
|
991
1068
|
flex-direction: column;
|
|
992
|
-
background: ${
|
|
993
|
-
color: ${
|
|
1069
|
+
background: ${We.headerBackground};
|
|
1070
|
+
color: ${We.colorOnSurfaceHigh};
|
|
994
1071
|
padding: .5rem 1rem;
|
|
995
|
-
font-family: ${
|
|
1072
|
+
font-family: ${We.titleFont};
|
|
996
1073
|
}
|
|
997
1074
|
|
|
998
1075
|
.header-cell--sticky {
|
|
999
1076
|
top: 0;
|
|
1000
|
-
z-index: ${
|
|
1077
|
+
z-index: ${We.stickyHeaderZIndex};
|
|
1001
1078
|
position: sticky;
|
|
1002
1079
|
}
|
|
1003
1080
|
|
|
@@ -1015,8 +1092,8 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
1015
1092
|
}
|
|
1016
1093
|
|
|
1017
1094
|
.column-title-container ft-button {
|
|
1018
|
-
${e.setVariable(
|
|
1019
|
-
${e.setVariable(
|
|
1095
|
+
${e.setVariable(Me.backgroundColor,We.headerBackground)};
|
|
1096
|
+
${e.setVariable(Me.color,We.colorOnSurfaceHigh)};
|
|
1020
1097
|
}
|
|
1021
1098
|
|
|
1022
1099
|
.column-title {
|
|
@@ -1045,29 +1122,29 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
1045
1122
|
|
|
1046
1123
|
.cell {
|
|
1047
1124
|
padding: 1rem;
|
|
1048
|
-
border-left: 1px solid ${
|
|
1049
|
-
border-bottom: 1px solid ${
|
|
1125
|
+
border-left: 1px solid ${We.headerBackground};
|
|
1126
|
+
border-bottom: 1px solid ${We.headerBackground};
|
|
1050
1127
|
overflow-x: auto;
|
|
1051
1128
|
display: flex;
|
|
1052
1129
|
align-items: center;
|
|
1053
|
-
font-family: ${
|
|
1130
|
+
font-family: ${We.contentFont};
|
|
1054
1131
|
}
|
|
1055
1132
|
|
|
1056
1133
|
/* Even is 2n+1 and odd is 2n because of the header */
|
|
1057
1134
|
.row:nth-child(2n) > .cell {
|
|
1058
|
-
background: ${
|
|
1135
|
+
background: ${We.oddRowBackground};
|
|
1059
1136
|
}
|
|
1060
1137
|
|
|
1061
1138
|
.row:nth-child(2n + 1) > .cell {
|
|
1062
|
-
background: ${
|
|
1139
|
+
background: ${We.evenRowBackground};
|
|
1063
1140
|
}
|
|
1064
1141
|
|
|
1065
1142
|
.row:hover > .cell {
|
|
1066
|
-
background: ${
|
|
1143
|
+
background: ${We.rowHoverBackground};
|
|
1067
1144
|
}
|
|
1068
1145
|
|
|
1069
1146
|
.cell:last-of-type {
|
|
1070
|
-
border-right: 1px solid ${
|
|
1147
|
+
border-right: 1px solid ${We.headerBackground};
|
|
1071
1148
|
}
|
|
1072
1149
|
|
|
1073
1150
|
.row:last-of-type .cell:first-of-type {
|
|
@@ -1081,4 +1158,4 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
1081
1158
|
.hidden {
|
|
1082
1159
|
visibility: hidden;
|
|
1083
1160
|
}
|
|
1084
|
-
`,
|
|
1161
|
+
`,Ue([o.property({attribute:!1})],Pe.prototype,"data",void 0),Ue([o.property({attribute:!1})],Pe.prototype,"columns",void 0),Ue([o.property({attribute:!1})],Pe.prototype,"sort",void 0),Ue([o.property()],Pe.prototype,"stickyHeaders",void 0),Ue([o.state()],Pe.prototype,"currentSort",void 0),e.customElement("ft-filterable-table")(Pe),t.FtFilterableTable=Pe,t.FtFilterableTableCssVariables=We,t.RowClickEvent=He,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litUnsafeHTML,ftGlobals.litClassMap);
|