@fluid-topics/ft-filterable-table 0.1.9 → 0.1.10
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.
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var l;const p=globalThis.trustedTypes,c=p?p.createPolicy("lit-html",{createHTML:t=>t}):void 0,d=`lit$${(Math.random()+"").slice(9)}$`,f="?"+d,u=`<${f}>`,h=document,m=(t="")=>h.createComment(t),y=t=>null===t||"object"!=typeof t&&"function"!=typeof t,v=Array.isArray,g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,b=/-->/g,x=/>/g,$=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,w=/'/g,k=/"/g,S=/^(?:script|style|textarea|title)$/i,z=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),O=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),
|
|
7
|
+
var l;const p=globalThis.trustedTypes,c=p?p.createPolicy("lit-html",{createHTML:t=>t}):void 0,d=`lit$${(Math.random()+"").slice(9)}$`,f="?"+d,u=`<${f}>`,h=document,m=(t="")=>h.createComment(t),y=t=>null===t||"object"!=typeof t&&"function"!=typeof t,v=Array.isArray,g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,b=/-->/g,x=/>/g,$=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,w=/'/g,k=/"/g,S=/^(?:script|style|textarea|title)$/i,z=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),O=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),T=new WeakMap,C=h.createTreeWalker(h,129,null,!1),E=(t,e)=>{const i=t.length-1,r=[];let o,a=2===e?"<svg>":"",n=g;for(let e=0;e<i;e++){const i=t[e];let s,l,p=-1,c=0;for(;c<i.length&&(n.lastIndex=c,l=n.exec(i),null!==l);)c=n.lastIndex,n===g?"!--"===l[1]?n=b:void 0!==l[1]?n=x:void 0!==l[2]?(S.test(l[2])&&(o=RegExp("</"+l[2],"g")),n=$):void 0!==l[3]&&(n=$):n===$?">"===l[0]?(n=null!=o?o:g,p=-1):void 0===l[1]?p=-2:(p=n.lastIndex-l[2].length,s=l[1],n=void 0===l[3]?$:'"'===l[3]?k:w):n===k||n===w?n=$:n===b||n===x?n=g:(n=$,o=void 0);const f=n===$&&t[e+1].startsWith("/>")?" ":"";a+=n===g?i+u:p>=0?(r.push(s),i.slice(0,p)+"$lit$"+i.slice(p)+d+f):i+d+(-2===p?(r.push(void 0),e):f)}const s=a+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==c?c.createHTML(s):s,r]};class D{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let o=0,a=0;const n=t.length-1,s=this.parts,[l,c]=E(t,e);if(this.el=D.createElement(l,i),C.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=C.nextNode())&&s.length<n;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const e of r.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(d)){const i=c[a++];if(t.push(e),void 0!==i){const t=r.getAttribute(i.toLowerCase()+"$lit$").split(d),e=/([.?@])?(.*)/.exec(i);s.push({type:1,index:o,name:e[2],strings:t,ctor:"."===e[1]?j:"?"===e[1]?N:"@"===e[1]?H:B})}else s.push({type:6,index:o})}for(const e of t)r.removeAttribute(e)}if(S.test(r.tagName)){const t=r.textContent.split(d),e=t.length-1;if(e>0){r.textContent=p?p.emptyScript:"";for(let i=0;i<e;i++)r.append(t[i],m()),C.nextNode(),s.push({type:2,index:++o});r.append(t[e],m())}}}else if(8===r.nodeType)if(r.data===f)s.push({type:2,index:o});else{let t=-1;for(;-1!==(t=r.data.indexOf(d,t+1));)s.push({type:7,index:o}),t+=d.length-1}o++}}static createElement(t,e){const i=h.createElement("template");return i.innerHTML=t,i}}function I(t,e,i=t,r){var o,a,n,s;if(e===O)return e;let l=void 0!==r?null===(o=i._$Cl)||void 0===o?void 0:o[r]:i._$Cu;const p=y(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==p&&(null===(a=null==l?void 0:l._$AO)||void 0===a||a.call(l,!1),void 0===p?l=void 0:(l=new p(t),l._$AT(t,i,r)),void 0!==r?(null!==(n=(s=i)._$Cl)&&void 0!==n?n:s._$Cl=[])[r]=l:i._$Cu=l),void 0!==l&&(e=I(t,l._$AS(t,e.values),l,r)),e}class F{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:r}=this._$AD,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:h).importNode(i,!0);C.currentNode=o;let a=C.nextNode(),n=0,s=0,l=r[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new _(a,a.nextSibling,this,t):1===l.type?e=new l.ctor(a,l.name,l.strings,this,t):6===l.type&&(e=new M(a,this,t)),this.v.push(e),l=r[++s]}n!==(null==l?void 0:l.index)&&(a=C.nextNode(),n++)}return o}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class _{constructor(t,e,i,r){var o;this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cg=null===(o=null==r?void 0:r.isConnected)||void 0===o||o}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=I(this,t,e),y(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==O&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var e;return v(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==A&&y(this._$AH)?this._$AA.nextSibling.data=t:this.S(h.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:r}=t,o="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=D.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.m(i);else{const t=new F(o,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=T.get(t.strings);return void 0===e&&T.set(t.strings,e=new D(t)),e}A(t){v(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const o of t)r===e.length?e.push(i=new _(this.M(m()),this.M(m()),this,this.options)):i=e[r],i._$AI(o),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class B{constructor(t,e,i,r,o){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=A}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,r){const o=this.strings;let a=!1;if(void 0===o)t=I(this,t,e,0),a=!y(t)||t!==this._$AH&&t!==O,a&&(this._$AH=t);else{const r=t;let n,s;for(t=o[0],n=0;n<o.length-1;n++)s=I(this,r[i+n],e,n),s===O&&(s=this._$AH[n]),a||(a=!y(s)||s!==this._$AH[n]),s===A?t=A:t!==A&&(t+=(null!=s?s:"")+o[n+1]),this._$AH[n]=s}a&&!r&&this.k(t)}k(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class j extends B{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===A?void 0:t}}const R=p?p.emptyScript:"";class N extends B{constructor(){super(...arguments),this.type=4}k(t){t&&t!==A?this.element.setAttribute(this.name,R):this.element.removeAttribute(this.name)}}class H extends B{constructor(t,e,i,r,o){super(t,e,i,r,o),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=I(this,t,e,0))&&void 0!==i?i:A)===O)return;const r=this._$AH,o=t===A&&r!==A||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,a=t!==A&&(r===A||o);o&&this.element.removeEventListener(this.name,this,r),a&&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 M{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){I(this,t)}}const Z=window.litHtmlPolyfillSupport;null==Z||Z(D,_),(null!==(l=globalThis.litHtmlVersions)&&void 0!==l?l:globalThis.litHtmlVersions=[]).push("2.1.3");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const U=t=>({_$litStatic$:t}),P=new Map,
|
|
13
|
+
const U=t=>({_$litStatic$:t}),P=new Map,L=(t=>(e,...i)=>{var r;const o=i.length;let a,n;const s=[],l=[];let p,c=0,d=!1;for(;c<o;){for(p=e[c];c<o&&void 0!==(n=i[c],a=null===(r=n)||void 0===r?void 0:r._$litStatic$);)p+=a+e[++c],d=!0;l.push(n),s.push(p),c++}if(c===o&&s.push(e[o]),d){const t=s.join("$$lit$$");void 0===(e=P.get(t))&&(s.raw=s,P.set(t,e=s)),i=l}return t(e,...i)})(z);var V,G=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};!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"}(V||(V={}));const W=a.FtCssVariable.extend("--ft-typography-font-family",a.designSystemVariables.titleFont),q=a.FtCssVariable.extend("--ft-typography-font-family",a.designSystemVariables.contentFont),K={fontFamily:q,fontSize:a.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:a.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:a.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:a.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:a.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},X=a.FtCssVariable.extend("--ft-typography-title-font-family",W),Y=a.FtCssVariable.extend("--ft-typography-title-font-size",K.fontSize,"20px"),J=a.FtCssVariable.extend("--ft-typography-title-font-weight",K.fontWeight,"normal"),Q=a.FtCssVariable.extend("--ft-typography-title-letter-spacing",K.letterSpacing,"0.15px"),tt=a.FtCssVariable.extend("--ft-typography-title-line-height",K.lineHeight,"24px"),et=a.FtCssVariable.extend("--ft-typography-title-text-transform",K.textTransform,"inherit"),it=a.FtCssVariable.extend("--ft-typography-title-dense-font-family",W),rt=a.FtCssVariable.extend("--ft-typography-title-dense-font-size",K.fontSize,"14px"),ot=a.FtCssVariable.extend("--ft-typography-title-dense-font-weight",K.fontWeight,"normal"),at=a.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",K.letterSpacing,"0.105px"),nt=a.FtCssVariable.extend("--ft-typography-title-dense-line-height",K.lineHeight,"24px"),st=a.FtCssVariable.extend("--ft-typography-title-dense-text-transform",K.textTransform,"inherit"),lt=a.FtCssVariable.extend("--ft-typography-subtitle1-font-family",q),pt=a.FtCssVariable.extend("--ft-typography-subtitle1-font-size",K.fontSize,"16px"),ct=a.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",K.fontWeight,"600"),dt=a.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",K.letterSpacing,"0.144px"),ft=a.FtCssVariable.extend("--ft-typography-subtitle1-line-height",K.lineHeight,"24px"),ut=a.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",K.textTransform,"inherit"),ht=a.FtCssVariable.extend("--ft-typography-subtitle2-font-family",q),mt=a.FtCssVariable.extend("--ft-typography-subtitle2-font-size",K.fontSize,"14px"),yt=a.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",K.fontWeight,"normal"),vt=a.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",K.letterSpacing,"0.098px"),gt=a.FtCssVariable.extend("--ft-typography-subtitle2-line-height",K.lineHeight,"24px"),bt=a.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",K.textTransform,"inherit"),xt={fontFamily:a.FtCssVariable.extend("--ft-typography-body1-font-family",q),fontSize:a.FtCssVariable.extend("--ft-typography-body1-font-size",K.fontSize,"16px"),fontWeight:a.FtCssVariable.extend("--ft-typography-body1-font-weight",K.fontWeight,"normal"),letterSpacing:a.FtCssVariable.extend("--ft-typography-body1-letter-spacing",K.letterSpacing,"0.496px"),lineHeight:a.FtCssVariable.extend("--ft-typography-body1-line-height",K.lineHeight,"24px"),textTransform:a.FtCssVariable.extend("--ft-typography-body1-text-transform",K.textTransform,"inherit")},$t=a.FtCssVariable.extend("--ft-typography-body2-font-family",q),wt=a.FtCssVariable.extend("--ft-typography-body2-font-size",K.fontSize,"14px"),kt=a.FtCssVariable.extend("--ft-typography-body2-font-weight",K.fontWeight,"normal"),St=a.FtCssVariable.extend("--ft-typography-body2-letter-spacing",K.letterSpacing,"0.252px"),zt=a.FtCssVariable.extend("--ft-typography-body2-line-height",K.lineHeight,"20px"),Ot=a.FtCssVariable.extend("--ft-typography-body2-text-transform",K.textTransform,"inherit"),At={fontFamily:a.FtCssVariable.extend("--ft-typography-caption-font-family",q),fontSize:a.FtCssVariable.extend("--ft-typography-caption-font-size",K.fontSize,"12px"),fontWeight:a.FtCssVariable.extend("--ft-typography-caption-font-weight",K.fontWeight,"normal"),letterSpacing:a.FtCssVariable.extend("--ft-typography-caption-letter-spacing",K.letterSpacing,"0.396px"),lineHeight:a.FtCssVariable.extend("--ft-typography-caption-line-height",K.lineHeight,"16px"),textTransform:a.FtCssVariable.extend("--ft-typography-caption-text-transform",K.textTransform,"inherit")},Tt=a.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",q),Ct=a.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",K.fontSize,"10px"),Et=a.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",K.fontWeight,"normal"),Dt=a.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",K.letterSpacing,"0.33px"),It=a.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",K.lineHeight,"16px"),Ft=a.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",K.textTransform,"inherit"),_t=a.FtCssVariable.extend("--ft-typography-overline-font-family",q),Bt=a.FtCssVariable.extend("--ft-typography-overline-font-size",K.fontSize,"10px"),jt=a.FtCssVariable.extend("--ft-typography-overline-font-weight",K.fontWeight,"normal"),Rt=a.FtCssVariable.extend("--ft-typography-overline-letter-spacing",K.letterSpacing,"1.5px"),Nt=a.FtCssVariable.extend("--ft-typography-overline-line-height",K.lineHeight,"16px"),Ht=a.FtCssVariable.extend("--ft-typography-overline-text-transform",K.textTransform,"uppercase"),Mt={fontFamily:a.FtCssVariable.extend("--ft-typography-button-font-family",q),fontSize:a.FtCssVariable.extend("--ft-typography-button-font-size",K.fontSize,"14px"),fontWeight:a.FtCssVariable.extend("--ft-typography-button-font-weight",K.fontWeight,"600"),letterSpacing:a.FtCssVariable.extend("--ft-typography-button-letter-spacing",K.letterSpacing,"1.246px"),lineHeight:a.FtCssVariable.extend("--ft-typography-button-line-height",K.lineHeight,"16px"),textTransform:a.FtCssVariable.extend("--ft-typography-button-text-transform",K.textTransform,"uppercase")},Zt=e.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
15
|
font-family: ${X};
|
|
16
16
|
font-size: ${Y};
|
|
@@ -37,7 +37,7 @@ const U=t=>({_$litStatic$:t}),P=new Map,V=(t=>(e,...i)=>{var r;const o=i.length;
|
|
|
37
37
|
line-height: ${ft};
|
|
38
38
|
text-transform: ${ut};
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,Lt=e.css`
|
|
41
41
|
.ft-typography--subtitle2 {
|
|
42
42
|
font-family: ${ht};
|
|
43
43
|
font-size: ${mt};
|
|
@@ -47,7 +47,7 @@ const U=t=>({_$litStatic$:t}),P=new Map,V=(t=>(e,...i)=>{var r;const o=i.length;
|
|
|
47
47
|
text-transform: ${bt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,Vt=e.css`
|
|
51
51
|
.ft-typography--body1 {
|
|
52
52
|
font-family: ${xt.fontFamily};
|
|
53
53
|
font-size: ${xt.fontSize};
|
|
@@ -76,8 +76,8 @@ const U=t=>({_$litStatic$:t}),P=new Map,V=(t=>(e,...i)=>{var r;const o=i.length;
|
|
|
76
76
|
}
|
|
77
77
|
`,qt=e.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
|
-
font-family: ${
|
|
80
|
-
font-size: ${
|
|
79
|
+
font-family: ${Tt};
|
|
80
|
+
font-size: ${Ct};
|
|
81
81
|
font-weight: ${Et};
|
|
82
82
|
letter-spacing: ${Dt};
|
|
83
83
|
line-height: ${It};
|
|
@@ -101,16 +101,16 @@ const U=t=>({_$litStatic$:t}),P=new Map,V=(t=>(e,...i)=>{var r;const o=i.length;
|
|
|
101
101
|
line-height: ${Mt.lineHeight};
|
|
102
102
|
text-transform: ${Mt.textTransform};
|
|
103
103
|
}
|
|
104
|
-
`;let Yt=class extends a.FtLitElement{constructor(){super(...arguments),this.variant=
|
|
104
|
+
`;let Yt=class extends a.FtLitElement{constructor(){super(...arguments),this.variant=V.body1}getStyles(){return[Zt,Ut,Pt,Lt,Vt,Gt,Wt,qt,Kt,Xt,e.css`
|
|
105
105
|
.ft-typography {
|
|
106
106
|
vertical-align: inherit;
|
|
107
107
|
}
|
|
108
|
-
`]}getTemplate(){return this.element?
|
|
108
|
+
`]}getTemplate(){return this.element?L`
|
|
109
109
|
<${U(this.element)}
|
|
110
110
|
class="ft-typography ft-typography--${this.variant}">
|
|
111
111
|
<slot></slot>
|
|
112
112
|
</${U(this.element)}>
|
|
113
|
-
`:
|
|
113
|
+
`:L`
|
|
114
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
115
115
|
`}};G([i.property()],Yt.prototype,"element",void 0),G([i.property()],Yt.prototype,"variant",void 0),Yt=G([a.customElement("ft-typography")],Yt);var Jt=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};const Qt={fontSize:a.FtCssVariable.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:a.FtCssVariable.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:a.FtCssVariable.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:a.FtCssVariable.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:a.FtCssVariable.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:a.FtCssVariable.extend("--ft-input-label-border-color",a.designSystemVariables.colorOutline),textColor:a.FtCssVariable.extend("--ft-input-label-text-color",a.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:a.FtCssVariable.extend("--ft-input-label-disabled-text-color",a.designSystemVariables.colorOnSurfaceDisabled),colorSurface:a.FtCssVariable.external(a.designSystemVariables.colorSurface,"Design system"),borderRadiusS:a.FtCssVariable.external(a.designSystemVariables.borderRadiusS,"Design system")};let te=class extends a.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1}getStyles(){return[Wt,e.css`
|
|
116
116
|
.ft-input-label {
|
|
@@ -403,7 +403,7 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
403
403
|
* @license
|
|
404
404
|
* Copyright 2018 Google LLC
|
|
405
405
|
* SPDX-License-Identifier: Apache-2.0
|
|
406
|
-
*/;let ze=class extends e.LitElement{render(){return e.html`<span><slot></slot></span>`}};ze.styles=[Se],ze=re([i.customElement("mwc-icon")],ze);var Oe=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};let Ae=class extends a.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}getTemplate(){return e.html``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}};Ae.elementDefinitions={},Oe([i.property({type:String})],Ae.prototype,"label",void 0),Oe([i.property({type:Object,converter:t=>t})],Ae.prototype,"value",void 0),Oe([i.property({type:Boolean,reflect:!0})],Ae.prototype,"selected",void 0),Ae=Oe([a.customElement("ft-select-option")],Ae);const
|
|
406
|
+
*/;let ze=class extends e.LitElement{render(){return e.html`<span><slot></slot></span>`}};ze.styles=[Se],ze=re([i.customElement("mwc-icon")],ze);var Oe=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};let Ae=class extends a.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}getTemplate(){return e.html``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}};Ae.elementDefinitions={},Oe([i.property({type:String})],Ae.prototype,"label",void 0),Oe([i.property({type:Object,converter:t=>t})],Ae.prototype,"value",void 0),Oe([i.property({type:Boolean,reflect:!0})],Ae.prototype,"selected",void 0),Ae=Oe([a.customElement("ft-select-option")],Ae);const Te={labelSize:a.FtCssVariable.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:a.FtCssVariable.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:a.FtCssVariable.create("--ft-select-vertical-spacing","SIZE","4px"),selectedOptionColor:a.FtCssVariable.extend("--ft-select-selected-option-color",a.designSystemVariables.colorOnSurface),helperColor:a.FtCssVariable.extend("--ft-select-helper-color",a.designSystemVariables.colorOnSurfaceMedium),optionsColor:a.FtCssVariable.extend("--ft-select-options-color",a.designSystemVariables.colorOnSurface),optionsZIndex:a.FtCssVariable.create("--ft-select-options-z-index","NUMBER","2"),colorSurface:a.FtCssVariable.external(a.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceDisabled:a.FtCssVariable.external(a.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:a.FtCssVariable.external(a.designSystemVariables.colorPrimary,"Design system"),borderRadiusS:a.FtCssVariable.external(a.designSystemVariables.borderRadiusS,"Design system"),elevation02:a.FtCssVariable.external(a.designSystemVariables.elevation02,"Design system")};let Ce=class extends a.FtLitElement{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}getStyles(){return[Gt,Wt,e.css`
|
|
407
407
|
*:focus {
|
|
408
408
|
outline: none;
|
|
409
409
|
}
|
|
@@ -417,7 +417,7 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
417
417
|
.ft-select--main-panel {
|
|
418
418
|
position: relative;
|
|
419
419
|
display: flex;
|
|
420
|
-
height: calc(4 * ${
|
|
420
|
+
height: calc(4 * ${Te.verticalSpacing} + ${Te.labelSize} + ${Te.selectedOptionSize});
|
|
421
421
|
}
|
|
422
422
|
|
|
423
423
|
.ft-select--input-panel {
|
|
@@ -429,8 +429,8 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
429
429
|
padding-left: 16px;
|
|
430
430
|
padding-right: 8px;
|
|
431
431
|
gap: 8px;
|
|
432
|
-
color: ${
|
|
433
|
-
${a.setVariable(we.color,
|
|
432
|
+
color: ${Te.selectedOptionColor};
|
|
433
|
+
${a.setVariable(we.color,Te.selectedOptionColor)};
|
|
434
434
|
}
|
|
435
435
|
|
|
436
436
|
.ft-select--input-panel,
|
|
@@ -441,7 +441,7 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
441
441
|
|
|
442
442
|
.ft-select--disabled .ft-select--input-panel,
|
|
443
443
|
.ft-select--disabled .ft-select--option {
|
|
444
|
-
color: ${
|
|
444
|
+
color: ${Te.colorOnSurfaceDisabled};
|
|
445
445
|
}
|
|
446
446
|
|
|
447
447
|
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
@@ -450,18 +450,18 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
450
450
|
}
|
|
451
451
|
|
|
452
452
|
ft-input-label {
|
|
453
|
-
${a.setVariable(Qt.fontSize,
|
|
454
|
-
${a.setVariable(Qt.raisedFontSize,
|
|
455
|
-
${a.setVariable(Qt.verticalSpacing,
|
|
453
|
+
${a.setVariable(Qt.fontSize,Te.selectedOptionSize)};
|
|
454
|
+
${a.setVariable(Qt.raisedFontSize,Te.labelSize)};
|
|
455
|
+
${a.setVariable(Qt.verticalSpacing,Te.verticalSpacing)};
|
|
456
456
|
}
|
|
457
457
|
|
|
458
458
|
.ft-select:not(.ft-select--disabled):focus-within mwc-icon {
|
|
459
|
-
color: ${
|
|
459
|
+
color: ${Te.colorPrimary};
|
|
460
460
|
}
|
|
461
461
|
|
|
462
462
|
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
463
|
-
${a.setVariable(Qt.borderColor,
|
|
464
|
-
${a.setVariable(Qt.textColor,
|
|
463
|
+
${a.setVariable(Qt.borderColor,Te.colorPrimary)};
|
|
464
|
+
${a.setVariable(Qt.textColor,Te.colorPrimary)};
|
|
465
465
|
}
|
|
466
466
|
|
|
467
467
|
.ft-select--selected-option {
|
|
@@ -471,8 +471,8 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
471
471
|
overflow: hidden;
|
|
472
472
|
white-space: nowrap;
|
|
473
473
|
text-overflow: ellipsis;
|
|
474
|
-
${a.setVariable(xt.fontSize,
|
|
475
|
-
${a.setVariable(xt.lineHeight,
|
|
474
|
+
${a.setVariable(xt.fontSize,Te.selectedOptionSize)};
|
|
475
|
+
${a.setVariable(xt.lineHeight,Te.selectedOptionSize)};
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
mwc-icon {
|
|
@@ -484,16 +484,16 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
484
484
|
}
|
|
485
485
|
|
|
486
486
|
.ft-select--filled .ft-select--input-panel {
|
|
487
|
-
border-radius: ${
|
|
487
|
+
border-radius: ${Te.borderRadiusS} ${Te.borderRadiusS} 0 0;
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
491
491
|
align-self: stretch;
|
|
492
|
-
padding-top: calc(${
|
|
492
|
+
padding-top: calc(${Te.labelSize} + 2 * ${Te.verticalSpacing});
|
|
493
493
|
}
|
|
494
494
|
|
|
495
495
|
.ft-select--outlined .ft-select--input-panel {
|
|
496
|
-
border-radius: ${
|
|
496
|
+
border-radius: ${Te.borderRadiusS};
|
|
497
497
|
}
|
|
498
498
|
|
|
499
499
|
.ft-select--options {
|
|
@@ -502,10 +502,10 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
502
502
|
top: 100%;
|
|
503
503
|
left: 0;
|
|
504
504
|
right: 0;
|
|
505
|
-
color: ${
|
|
506
|
-
background: ${
|
|
507
|
-
z-index: ${
|
|
508
|
-
box-shadow: ${
|
|
505
|
+
color: ${Te.optionsColor};
|
|
506
|
+
background: ${Te.colorSurface};
|
|
507
|
+
z-index: ${Te.optionsZIndex};
|
|
508
|
+
box-shadow: ${Te.elevation02};
|
|
509
509
|
}
|
|
510
510
|
|
|
511
511
|
.ft-select--options-displayed .ft-select--options {
|
|
@@ -522,7 +522,7 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
522
522
|
|
|
523
523
|
.ft-select--helper-text {
|
|
524
524
|
padding: 0 12px 0 16px;
|
|
525
|
-
color: ${
|
|
525
|
+
color: ${Te.helperColor};
|
|
526
526
|
}
|
|
527
527
|
`]}getTemplate(){var t,i,o,a,s;let l=!this.disabled&&this.optionsDisplayed&&this.hasOptions,p=this.disabled||!this.hasOptions;const c={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":p,"ft-select--options-displayed":l,"ft-select--has-value":null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value),"ft-select--no-label":!this.label};return e.html`
|
|
528
528
|
<div class="${n.classMap(c)}" part="container">
|
|
@@ -570,7 +570,7 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
570
570
|
<ft-ripple ?primary=${i} ?activated=${i}></ft-ripple>
|
|
571
571
|
${t.label}
|
|
572
572
|
</div>
|
|
573
|
-
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,r,o,a;let n;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(),n=null!==(r=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==r?r:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),n=null!==(a=null===(o=this.focusedOption)||void 0===o?void 0:o.nextElementSibling)&&void 0!==a?a:this.firstOption}null==n||n.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)}};
|
|
573
|
+
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,r,o,a;let n;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(),n=null!==(r=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==r?r:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),n=null!==(a=null===(o=this.focusedOption)||void 0===o?void 0:o.nextElementSibling)&&void 0!==a?a:this.firstOption}null==n||n.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)}};Ce.elementDefinitions={"ft-input-label":te,"ft-typography":Yt,"ft-ripple":ke,"mwc-icon":ze},Oe([i.property({type:String})],Ce.prototype,"label",void 0),Oe([i.property({type:String})],Ce.prototype,"helper",void 0),Oe([i.property({type:Boolean})],Ce.prototype,"outlined",void 0),Oe([i.property({type:Boolean})],Ce.prototype,"disabled",void 0),Oe([i.property({type:Array})],Ce.prototype,"options",void 0),Oe([i.state()],Ce.prototype,"selectedOption",void 0),Oe([i.state()],Ce.prototype,"optionsDisplayed",void 0),Oe([i.state()],Ce.prototype,"focusOptions",void 0),Oe([i.query(".ft-select")],Ce.prototype,"container",void 0),Oe([i.query(".ft-select--input-panel")],Ce.prototype,"mainPanel",void 0),Oe([i.query(".ft-select--option:first-child")],Ce.prototype,"firstOption",void 0),Oe([i.query(".ft-select--option:focus")],Ce.prototype,"focusedOption",void 0),Oe([i.query(".ft-select--option.ft-select--option-selected")],Ce.prototype,"selectedOptionElement",void 0),Oe([i.query(".ft-select--option:last-child")],Ce.prototype,"lastOption",void 0),Oe([i.query("slot")],Ce.prototype,"optionsSlot",void 0),Ce=Oe([a.customElement("ft-select")],Ce);var Ee=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};const De={fontSize:a.FtCssVariable.create("--ft-text-field-font-size","SIZE","14px"),labelSize:a.FtCssVariable.create("--ft-text-field-label-size","SIZE","11px"),verticalSpacing:a.FtCssVariable.create("--ft-text-field-vertical-spacing","SIZE","4px"),horizontalSpacing:a.FtCssVariable.create("--ft-text-field-horizontal-spacing","SIZE","16px"),helperColor:a.FtCssVariable.extend("--ft-text-field-helper-color",a.designSystemVariables.colorOnSurfaceMedium),colorPrimary:a.FtCssVariable.external(a.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:a.FtCssVariable.external(a.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:a.FtCssVariable.external(a.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:a.FtCssVariable.external(a.designSystemVariables.borderRadiusS,"Design system")};let Ie=class extends a.FtLitElement{constructor(){super(...arguments),this.label="",this.value="",this.helper="",this.outlined=!1,this.disabled=!1,this.dataList=[],this.focused=!1}getStyles(){return[Vt,e.css`
|
|
574
574
|
*:focus {
|
|
575
575
|
outline: none;
|
|
576
576
|
}
|
|
@@ -818,7 +818,7 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
818
818
|
<div></div>
|
|
819
819
|
<div></div>
|
|
820
820
|
</div>
|
|
821
|
-
`}};Ue=Me([a.customElement("ft-loader")],Ue);var Pe=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};const
|
|
821
|
+
`}};Ue=Me([a.customElement("ft-loader")],Ue);var Pe=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};const Le=a.FtCssVariable.extend("--ft-button-color",a.designSystemVariables.colorPrimary),Ve={backgroundColor:a.FtCssVariable.extend("--ft-button-background-color",a.designSystemVariables.colorSurface),borderRadius:a.FtCssVariable.extend("--ft-button-border-radius",a.designSystemVariables.borderRadiusL),color:Le,fontSize:a.FtCssVariable.extend("--ft-button-font-size",Mt.fontSize),iconSize:a.FtCssVariable.create("--ft-button-icon-size","SIZE","24px"),rippleColor:a.FtCssVariable.extend("--ft-button-ripple-color",Le),opacityDisabled:a.FtCssVariable.external(a.designSystemVariables.colorOpacityDisabled,"Design system")},Ge=a.FtCssVariable.extend("--ft-button-primary-color",a.FtCssVariable.extend("--ft-button-color",a.designSystemVariables.colorOnPrimary)),We=a.FtCssVariable.extend("--ft-button-primary-background-color",a.FtCssVariable.extend("--ft-button-background-color",a.designSystemVariables.colorPrimary)),qe=Ge,Ke=(a.FtCssVariable.extend("--ft-button-primary-ripple-color",Ge),a.FtCssVariable.extend("--ft-button-dense-border-radius",a.FtCssVariable.extend("--ft-button-border-radius",a.designSystemVariables.borderRadiusM)));let Xe=class extends a.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}getStyles(){return[a.noTextSelect,e.css`
|
|
822
822
|
:host {
|
|
823
823
|
display: inline-block;
|
|
824
824
|
max-width: 100%;
|
|
@@ -855,18 +855,18 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
855
855
|
box-sizing: border-box;
|
|
856
856
|
border: none;
|
|
857
857
|
|
|
858
|
-
--ft-button-internal-font-size: ${
|
|
858
|
+
--ft-button-internal-font-size: ${Ve.fontSize};
|
|
859
859
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
860
|
-
--ft-button-internal-color: ${
|
|
861
|
-
--mdc-icon-size: ${
|
|
860
|
+
--ft-button-internal-color: ${Ve.color};
|
|
861
|
+
--mdc-icon-size: ${Ve.iconSize};
|
|
862
862
|
--ft-button-internal-vertical-padding: 6px;
|
|
863
863
|
--ft-button-internal-horizontal-padding: 8px;
|
|
864
|
-
${a.setVariable(we.color,
|
|
864
|
+
${a.setVariable(we.color,Ve.rippleColor)};
|
|
865
865
|
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), var(--mdc-icon-size));
|
|
866
866
|
|
|
867
|
-
border-radius: ${
|
|
867
|
+
border-radius: ${Ve.borderRadius};
|
|
868
868
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
869
|
-
background-color: ${
|
|
869
|
+
background-color: ${Ve.backgroundColor};
|
|
870
870
|
color: var(--ft-button-internal-color);
|
|
871
871
|
-webkit-mask-image: radial-gradient(white, black);
|
|
872
872
|
}
|
|
@@ -887,7 +887,7 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
887
887
|
|
|
888
888
|
.ft-button[disabled] {
|
|
889
889
|
filter: grayscale(1);
|
|
890
|
-
opacity: ${
|
|
890
|
+
opacity: ${Ve.opacityDisabled};
|
|
891
891
|
}
|
|
892
892
|
|
|
893
893
|
.ft-button.ft-button--primary {
|
|
@@ -944,7 +944,7 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
944
944
|
}
|
|
945
945
|
|
|
946
946
|
ft-loader {
|
|
947
|
-
${a.setVariable(Ze.size,
|
|
947
|
+
${a.setVariable(Ze.size,Ve.iconSize)};
|
|
948
948
|
${a.setVariable(Ze.color,"var(--ft-button-internal-color)")};
|
|
949
949
|
}
|
|
950
950
|
`]}getTemplate(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":a.isSafari,"ft-no-text-select":!0};return this.addTooltip(e.html`
|
|
@@ -969,7 +969,7 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
969
969
|
</ft-tooltip>
|
|
970
970
|
`}resolveIcon(){return this.loading?e.html`
|
|
971
971
|
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
972
|
-
<mwc-icon>${this.icon}</mwc-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){
|
|
972
|
+
<mwc-icon>${this.icon}</mwc-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){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}};Xe.elementDefinitions={"ft-ripple":ke,"ft-tooltip":He,"ft-typography":Yt,"mwc-icon":ze,"ft-loader":Ue},Pe([i.property({type:Boolean})],Xe.prototype,"primary",void 0),Pe([i.property({type:Boolean})],Xe.prototype,"outlined",void 0),Pe([i.property({type:Boolean})],Xe.prototype,"disabled",void 0),Pe([i.property({type:Boolean})],Xe.prototype,"dense",void 0),Pe([i.property({type:Boolean})],Xe.prototype,"round",void 0),Pe([i.property({type:String})],Xe.prototype,"label",void 0),Pe([i.property({type:String})],Xe.prototype,"icon",void 0),Pe([i.property({type:Boolean})],Xe.prototype,"trailingIcon",void 0),Pe([i.property({type:Boolean})],Xe.prototype,"loading",void 0),Pe([i.property({type:String})],Xe.prototype,"tooltipPosition",void 0),Pe([i.query(".ft-button")],Xe.prototype,"button",void 0),Pe([i.query(".ft-button--label slot")],Xe.prototype,"slottedContent",void 0),Xe=Pe([a.customElement("ft-button")],Xe);var Ye=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};class Je extends CustomEvent{constructor(t){super("row-click",{detail:t})}}const Qe={headerBackground:a.FtCssVariable.create("--ft-filterable-table-header-background","COLOR","whitesmoke"),oddRowBackground:a.FtCssVariable.create("--ft-filterable-table-odd-row-background","COLOR","#FFFFFF"),evenRowBackground:a.FtCssVariable.create("--ft-filterable-table-even-row-background","COLOR","#fdfdfd"),rowHoverBackground:a.FtCssVariable.create("--ft-filterable-table-row-hover-background","COLOR","#fafafa"),colorOnSurfaceHigh:a.FtCssVariable.external(a.designSystemVariables.colorOnSurfaceHigh,"Design system"),titleFont:a.FtCssVariable.external(a.designSystemVariables.titleFont,"Design system"),contentFont:a.FtCssVariable.external(a.designSystemVariables.contentFont,"Design system")},ti=t=>e.html`${t}`,ei=(t,e)=>t-e;t.FtFilterableTable=class extends a.FtLitElement{constructor(){super(...arguments),this.data=[],this.columns=[],this.filters=[],this.selectData=[]}getStyles(){return e.css`
|
|
973
973
|
:host {
|
|
974
974
|
display: block;
|
|
975
975
|
}
|
|
@@ -1006,8 +1006,8 @@ const Se=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
1006
1006
|
}
|
|
1007
1007
|
|
|
1008
1008
|
.column-title-container ft-button {
|
|
1009
|
-
${a.setVariable(
|
|
1010
|
-
${a.setVariable(
|
|
1009
|
+
${a.setVariable(Ve.backgroundColor,Qe.headerBackground)};
|
|
1010
|
+
${a.setVariable(Ve.color,Qe.colorOnSurfaceHigh)};
|
|
1011
1011
|
}
|
|
1012
1012
|
|
|
1013
1013
|
.column-title {
|
|
@@ -1068,7 +1068,7 @@ function(t,e,i){let r,o=t;return"object"==typeof t?(o=t.slot,r=t):r={flatten:e},
|
|
|
1068
1068
|
</ft-tooltip>
|
|
1069
1069
|
`}resolveIcon(){return this.loading?j`
|
|
1070
1070
|
<ft-loader></ft-loader> `:this.icon?j`
|
|
1071
|
-
<mwc-icon>${this.icon}</mwc-icon> `:U}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){
|
|
1071
|
+
<mwc-icon>${this.icon}</mwc-icon> `:U}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}};Zi.elementDefinitions={"ft-ripple":gi,"ft-tooltip":ji,"ft-typography":Ze,"mwc-icon":wi,"ft-loader":Bi},_i([nt({type:Boolean})],Zi.prototype,"primary",void 0),_i([nt({type:Boolean})],Zi.prototype,"outlined",void 0),_i([nt({type:Boolean})],Zi.prototype,"disabled",void 0),_i([nt({type:Boolean})],Zi.prototype,"dense",void 0),_i([nt({type:Boolean})],Zi.prototype,"round",void 0),_i([nt({type:String})],Zi.prototype,"label",void 0),_i([nt({type:String})],Zi.prototype,"icon",void 0),_i([nt({type:Boolean})],Zi.prototype,"trailingIcon",void 0),_i([nt({type:Boolean})],Zi.prototype,"loading",void 0),_i([nt({type:String})],Zi.prototype,"tooltipPosition",void 0),_i([lt(".ft-button")],Zi.prototype,"button",void 0),_i([lt(".ft-button--label slot")],Zi.prototype,"slottedContent",void 0),Zi=_i([Ct("ft-button")],Zi);var Ki=function(t,e,i,r){for(var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class qi extends CustomEvent{constructor(t){super("row-click",{detail:t})}}const Gi={headerBackground:Et.create("--ft-filterable-table-header-background","COLOR","whitesmoke"),oddRowBackground:Et.create("--ft-filterable-table-odd-row-background","COLOR","#FFFFFF"),evenRowBackground:Et.create("--ft-filterable-table-even-row-background","COLOR","#fdfdfd"),rowHoverBackground:Et.create("--ft-filterable-table-row-hover-background","COLOR","#fafafa"),colorOnSurfaceHigh:Et.external(zt.colorOnSurfaceHigh,"Design system"),titleFont:Et.external(zt.titleFont,"Design system"),contentFont:Et.external(zt.contentFont,"Design system")},Xi=t=>j`${t}`,Ji=(t,e)=>t-e;t.FtFilterableTable=class extends Nt{constructor(){super(...arguments),this.data=[],this.columns=[],this.filters=[],this.selectData=[]}getStyles(){return s`
|
|
1072
1072
|
:host {
|
|
1073
1073
|
display: block;
|
|
1074
1074
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-filterable-table",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "A dynamic table with filters",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@fluid-topics/ft-button": "^0.1.
|
|
26
|
-
"@fluid-topics/ft-select": "^0.1.
|
|
27
|
-
"@fluid-topics/ft-text-field": "^0.1.
|
|
28
|
-
"@fluid-topics/ft-wc-utils": "^0.1.
|
|
25
|
+
"@fluid-topics/ft-button": "^0.1.10",
|
|
26
|
+
"@fluid-topics/ft-select": "^0.1.10",
|
|
27
|
+
"@fluid-topics/ft-text-field": "^0.1.10",
|
|
28
|
+
"@fluid-topics/ft-wc-utils": "^0.1.10",
|
|
29
29
|
"lit": "^2.0.2"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "af9249642eff7416fb4aa6371f82cb3f99086cec"
|
|
32
32
|
}
|