@fluid-topics/ft-filterable-table 0.3.5 → 0.3.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.
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
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,g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,y=/>/g,m=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),$=/'/g,w=/"/g,k=/^(?:script|style|textarea|title)$/i,S=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),z=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=g;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===g?"!--"===a[1]?s=v: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:g,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===v||s===y?s=g:(s=m,n=void 0);const c=s===m&&t[e+1].startsWith("/>")?" ":"";l+=s===g?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]?
|
|
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,g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,y=/>/g,m=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),$=/'/g,w=/"/g,k=/^(?:script|style|textarea|title)$/i,S=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),z=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=g;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===g?"!--"===a[1]?s=v: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:g,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===v||s===y?s=g:(s=m,n=void 0);const c=s===m&&t[e+1].startsWith("/>")?" ":"";l+=s===g?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]?Z:"@"===e[1]?R: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===z)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 M(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._$C_=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._$C_}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!==z&&this.T(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.k(t):(t=>b(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.S(t):this.T(t)}j(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.j(t))}T(t){this._$AH!==O&&x(this._$AH)?this._$AA.nextSibling.data=t:this.k(c.createTextNode(t)),this._$AH=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.j(u()),this.j(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._$C_=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!==z,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===z&&(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.P(t)}P(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}P(t){this.element[this.name]=t===O?void 0:t}}const T=a?a.emptyScript:"";class Z extends N{constructor(){super(...arguments),this.type=4}P(t){t&&t!==O?this.element.setAttribute(this.name,T):this.element.removeAttribute(this.name)}}class R 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)===z)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 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){F(this,t)}}const _=window.litHtmlPolyfillSupport;null==_||_(B,j),(null!==(r=globalThis.litHtmlVersions)&&void 0!==r?r:globalThis.litHtmlVersions=[]).push("2.2.7");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t._$litStatic$},
|
|
13
|
+
const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t._$litStatic$},W=t=>({_$litStatic$:t,r:U}),P=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=P.get(t))&&(s.raw=s,P.set(t,e=s)),i=r}return t(e,...i)})(S);var L,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"}(L||(L={}));const V=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),q=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),X={fontFamily:q,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},Y=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",V),J=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",X.fontSize,"20px"),Q=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",X.fontWeight,"normal"),tt=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",X.letterSpacing,"0.15px"),et=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",X.lineHeight,"1.2"),it=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",X.textTransform,"inherit"),ot=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",V),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",X.fontSize,"14px"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",X.fontWeight,"normal"),st=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",X.letterSpacing,"0.105px"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",X.lineHeight,"1.7"),at=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",X.textTransform,"inherit"),pt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",q),ft=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",X.fontSize,"16px"),dt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",X.fontWeight,"600"),ht=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",X.letterSpacing,"0.144px"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",X.lineHeight,"1.5"),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",X.textTransform,"inherit"),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",q),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",X.fontSize,"14px"),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",X.fontWeight,"normal"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",X.letterSpacing,"0.098px"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",X.lineHeight,"1.7"),mt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",X.textTransform,"inherit"),$t={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",X.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",X.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",X.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",X.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",X.textTransform,"inherit")},wt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",q),kt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",X.fontSize,"14px"),St=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",X.fontWeight,"normal"),zt=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",X.letterSpacing,"0.252px"),Ot=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",X.lineHeight,"1.4"),Ct=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",X.textTransform,"inherit"),Et={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",X.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",X.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",X.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",X.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",X.textTransform,"inherit")},Dt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",q),Bt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",X.fontSize,"10px"),Ft=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",X.fontWeight,"normal"),It=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",X.letterSpacing,"0.33px"),jt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",X.lineHeight,"1.6"),Nt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",X.textTransform,"inherit"),At=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",q),Tt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",X.fontSize,"10px"),Zt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",X.fontWeight,"normal"),Rt=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",X.letterSpacing,"1.5px"),Mt=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",X.lineHeight,"1.6"),_t=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",X.textTransform,"uppercase"),Ut={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-button-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-button-font-size",X.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",X.fontWeight,"600"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",X.letterSpacing,"1.246px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-button-line-height",X.lineHeight,"1.15"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",X.textTransform,"uppercase")},Ht=i.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
15
|
font-family: ${Y};
|
|
16
16
|
font-size: ${J};
|
|
@@ -19,7 +19,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
19
19
|
line-height: ${et};
|
|
20
20
|
text-transform: ${it};
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,Wt=i.css`
|
|
23
23
|
.ft-typography--title-dense {
|
|
24
24
|
font-family: ${ot};
|
|
25
25
|
font-size: ${nt};
|
|
@@ -28,7 +28,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
28
28
|
line-height: ${rt};
|
|
29
29
|
text-transform: ${at};
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,Pt=i.css`
|
|
32
32
|
.ft-typography--subtitle1 {
|
|
33
33
|
font-family: ${pt};
|
|
34
34
|
font-size: ${ft};
|
|
@@ -37,7 +37,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
37
37
|
line-height: ${ct};
|
|
38
38
|
text-transform: ${ut};
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,Kt=i.css`
|
|
41
41
|
.ft-typography--subtitle2 {
|
|
42
42
|
font-family: ${xt};
|
|
43
43
|
font-size: ${bt};
|
|
@@ -47,7 +47,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
47
47
|
text-transform: ${mt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,Lt=i.css`
|
|
51
51
|
.ft-typography--body1 {
|
|
52
52
|
font-family: ${$t.fontFamily};
|
|
53
53
|
font-size: ${$t.fontSize};
|
|
@@ -79,17 +79,17 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
79
79
|
font-family: ${Dt};
|
|
80
80
|
font-size: ${Bt};
|
|
81
81
|
font-weight: ${Ft};
|
|
82
|
-
letter-spacing: ${
|
|
83
|
-
line-height: ${
|
|
82
|
+
letter-spacing: ${It};
|
|
83
|
+
line-height: ${jt};
|
|
84
84
|
text-transform: ${Nt};
|
|
85
85
|
}
|
|
86
86
|
`,Xt=i.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
88
|
font-family: ${At};
|
|
89
89
|
font-size: ${Tt};
|
|
90
|
-
font-weight: ${
|
|
90
|
+
font-weight: ${Zt};
|
|
91
91
|
letter-spacing: ${Rt};
|
|
92
|
-
line-height: ${
|
|
92
|
+
line-height: ${Mt};
|
|
93
93
|
text-transform: ${_t};
|
|
94
94
|
}
|
|
95
95
|
`,Yt=i.css`
|
|
@@ -101,14 +101,14 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
101
101
|
line-height: ${Ut.lineHeight};
|
|
102
102
|
text-transform: ${Ut.textTransform};
|
|
103
103
|
}
|
|
104
|
-
`;class Jt extends e.FtLitElement{constructor(){super(...arguments),this.variant=
|
|
105
|
-
<${
|
|
104
|
+
`;class Jt extends e.FtLitElement{constructor(){super(...arguments),this.variant=L.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
|
-
`}}Jt.styles=[Ht,Pt,
|
|
111
|
+
`}}Jt.styles=[Ht,Wt,Pt,Kt,Lt,Gt,Vt,qt,Xt,Yt,i.css`
|
|
112
112
|
.ft-typography {
|
|
113
113
|
vertical-align: inherit;
|
|
114
114
|
}
|
|
@@ -343,7 +343,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
343
343
|
opacity: ${ne.opacityContentOnSurfacePressed};
|
|
344
344
|
transform: translate(-50%, -50%) scale(1);
|
|
345
345
|
}
|
|
346
|
-
`,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.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class ge extends e.FtLitElement{constructor(){super(...arguments),this.variant=ue.fluid_topics}getStyles(){return i.css`
|
|
346
|
+
`,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.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")};class ge extends e.FtLitElement{constructor(){super(...arguments),this.variant=ue.fluid_topics}getStyles(){return i.css`
|
|
347
347
|
:host {
|
|
348
348
|
display: inline-block;
|
|
349
349
|
}
|
|
@@ -366,6 +366,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
366
366
|
text-rendering: auto;
|
|
367
367
|
-webkit-font-smoothing: antialiased;
|
|
368
368
|
-moz-osx-font-smoothing: grayscale;
|
|
369
|
+
vertical-align: ${be.verticalAlign};
|
|
369
370
|
}
|
|
370
371
|
|
|
371
372
|
.ft-icon--fluid-topics {
|
|
@@ -614,7 +615,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
614
615
|
<ft-typography class="ft-text-field--helper-text" variant="caption">${this.helper}
|
|
615
616
|
</ft-typography>`:void 0}
|
|
616
617
|
</div>
|
|
617
|
-
`}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)||""}}Se.elementDefinitions={"ft-input-label":ee,"ft-ripple":de,"ft-typography":Jt,"ft-icon":ge},Se.styles=[
|
|
618
|
+
`}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)||""}}Se.elementDefinitions={"ft-input-label":ee,"ft-ripple":de,"ft-typography":Jt,"ft-icon":ge},Se.styles=[Lt,i.css`
|
|
618
619
|
*:focus {
|
|
619
620
|
outline: none;
|
|
620
621
|
}
|
|
@@ -737,7 +738,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
737
738
|
padding-right: ${ke.horizontalSpacing};
|
|
738
739
|
color: ${ke.iconColor};
|
|
739
740
|
}
|
|
740
|
-
`],we([o.property({type:String})],Se.prototype,"label",void 0),we([o.property({reflect:!0})],Se.prototype,"value",void 0),we([o.property({type:String})],Se.prototype,"helper",void 0),we([o.property({type:Boolean})],Se.prototype,"outlined",void 0),we([o.property({type:Boolean})],Se.prototype,"disabled",void 0),we([o.property({type:Boolean})],Se.prototype,"error",void 0),we([o.query(".ft-text-field--input")],Se.prototype,"input",void 0),we([o.property({type:String})],Se.prototype,"prefix",void 0),we([o.property({type:String})],Se.prototype,"icon",void 0),we([o.property({type:String})],Se.prototype,"iconVariant",void 0),we([o.state()],Se.prototype,"focused",void 0),e.customElement("ft-text-field")(Se);var ze=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.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),Ce=e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),Ee=e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),De=e.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),Be=e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system");class
|
|
741
|
+
`],we([o.property({type:String})],Se.prototype,"label",void 0),we([o.property({reflect:!0})],Se.prototype,"value",void 0),we([o.property({type:String})],Se.prototype,"helper",void 0),we([o.property({type:Boolean})],Se.prototype,"outlined",void 0),we([o.property({type:Boolean})],Se.prototype,"disabled",void 0),we([o.property({type:Boolean})],Se.prototype,"error",void 0),we([o.query(".ft-text-field--input")],Se.prototype,"input",void 0),we([o.property({type:String})],Se.prototype,"prefix",void 0),we([o.property({type:String})],Se.prototype,"icon",void 0),we([o.property({type:String})],Se.prototype,"iconVariant",void 0),we([o.state()],Se.prototype,"focused",void 0),e.customElement("ft-text-field")(Se);var ze=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.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),Ce=e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),Ee=e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),De=e.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),Be=e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),Fe=e.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px");class Ie 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`
|
|
741
742
|
<div part="container"
|
|
742
743
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
743
744
|
@mouseenter=${this.onHover}
|
|
@@ -747,12 +748,13 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
747
748
|
@touchstart=${this.onTouch}>
|
|
748
749
|
<div part="tooltip" class="ft-tooltip ft-tooltip--${this.position}" ?hidden=${!this.visible}>
|
|
749
750
|
<div part="tooltip-content" class="ft-tooltip--content">
|
|
750
|
-
<
|
|
751
|
+
<slot name="text"></slot>
|
|
752
|
+
<ft-typography variant="caption" ?hidden=${!this.text}>${this.text}</ft-typography>
|
|
751
753
|
</div>
|
|
752
754
|
</div>
|
|
753
755
|
<slot></slot>
|
|
754
756
|
</div>
|
|
755
|
-
`}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;let n=0,l=0;switch(this.position){case"top":l=-this.tooltip.clientHeight,n=o;break;case"bottom":l=e.height,n=o;break;case"left":l=i,n=-this.tooltip.clientWidth;break;case"right":l=i,n=e.width}e.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+n<0&&(n=0);const s=this.tooltip.style;s.left=n+"px",s.top=l+"px",s.maxWidth
|
|
757
|
+
`}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;let n=0,l=0;switch(this.position){case"top":l=-this.tooltip.clientHeight,n=o;break;case"bottom":l=e.height,n=o;break;case"left":l=i,n=-this.tooltip.clientWidth;break;case"right":l=i,n=e.width}e.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+n<0&&(n=0);const s=this.tooltip.style;s.left=n+"px",s.top=l+"px",s.maxWidth=`max(${e.width}px, ${Fe})`}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())}}Ie.elementDefinitions={"ft-typography":Jt},Ie.styles=i.css`
|
|
756
758
|
.ft-tooltip--container {
|
|
757
759
|
display: block;
|
|
758
760
|
position: relative;
|
|
@@ -768,7 +770,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
768
770
|
box-sizing: border-box;
|
|
769
771
|
overflow: hidden;
|
|
770
772
|
width: max-content;
|
|
771
|
-
max-width:
|
|
773
|
+
max-width: ${Fe};
|
|
772
774
|
text-align: center;
|
|
773
775
|
padding: ${Oe};
|
|
774
776
|
z-index: ${De};
|
|
@@ -784,7 +786,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
784
786
|
position: relative;
|
|
785
787
|
word-break: break-word;
|
|
786
788
|
}
|
|
787
|
-
`,ze([o.property()],
|
|
789
|
+
`,ze([o.property()],Ie.prototype,"text",void 0),ze([o.property({type:Boolean})],Ie.prototype,"manual",void 0),ze([o.property({type:Boolean})],Ie.prototype,"inline",void 0),ze([o.property({type:Number})],Ie.prototype,"delay",void 0),ze([o.property()],Ie.prototype,"position",void 0),ze([o.queryAssignedNodes("",!0)],Ie.prototype,"slotNodes",void 0),ze([o.query(".ft-tooltip--container")],Ie.prototype,"container",void 0),ze([o.query("slot")],Ie.prototype,"target",void 0),ze([o.query(".ft-tooltip")],Ie.prototype,"tooltip",void 0),ze([o.query(".ft-tooltip--content")],Ie.prototype,"tooltipContent",void 0),ze([o.state()],Ie.prototype,"visible",void 0),e.customElement("ft-tooltip")(Ie);const je={color:e.FtCssVariableFactory.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")};class Ne extends e.FtLitElement{static get styles(){return i.css`
|
|
788
790
|
:host {
|
|
789
791
|
line-height: 0;
|
|
790
792
|
}
|
|
@@ -860,7 +862,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
860
862
|
<div></div>
|
|
861
863
|
<div></div>
|
|
862
864
|
</div>
|
|
863
|
-
`}}e.customElement("ft-loader")(
|
|
865
|
+
`}}e.customElement("ft-loader")(Ne);var Ae=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=e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorPrimary),Ze={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorSurface),borderRadius:e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusL),color:Te,fontSize:e.FtCssVariableFactory.extend("--ft-button-font-size",Ut.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:e.FtCssVariableFactory.extend("--ft-button-ripple-color",Te),opacityDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},Re=e.FtCssVariableFactory.extend("--ft-button-primary-color",e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorOnPrimary)),Me={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-primary-background-color",e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorPrimary)),color:Re,rippleColor:e.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Re)},_e=e.FtCssVariableFactory.extend("--ft-button-dense-border-radius",e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusM));class Ue 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`
|
|
864
866
|
:host {
|
|
865
867
|
display: inline-block;
|
|
866
868
|
max-width: 100%;
|
|
@@ -871,7 +873,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
871
873
|
box-shadow: 0px 0px 0px transparent;
|
|
872
874
|
border: 0px solid transparent;
|
|
873
875
|
text-shadow: 0px 0px 0px transparent;
|
|
874
|
-
font-size: ${
|
|
876
|
+
font-size: ${Ze.fontSize};
|
|
875
877
|
}
|
|
876
878
|
|
|
877
879
|
button:hover {
|
|
@@ -900,17 +902,17 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
900
902
|
border: none;
|
|
901
903
|
pointer-events: auto;
|
|
902
904
|
|
|
903
|
-
--ft-button-internal-line-height: calc(${
|
|
904
|
-
--ft-button-internal-color: ${
|
|
905
|
-
${e.setVariable(be.size,
|
|
905
|
+
--ft-button-internal-line-height: calc(${Ze.fontSize} + 2px);
|
|
906
|
+
--ft-button-internal-color: ${Ze.color};
|
|
907
|
+
${e.setVariable(be.size,Ze.iconSize)};
|
|
906
908
|
--ft-button-internal-vertical-padding: 6px;
|
|
907
909
|
--ft-button-internal-horizontal-padding: 8px;
|
|
908
|
-
${e.setVariable(ne.color,
|
|
909
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
910
|
+
${e.setVariable(ne.color,Ze.rippleColor)};
|
|
911
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ze.iconSize});
|
|
910
912
|
|
|
911
|
-
border-radius: ${
|
|
913
|
+
border-radius: ${Ze.borderRadius};
|
|
912
914
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
913
|
-
background-color: ${
|
|
915
|
+
background-color: ${Ze.backgroundColor};
|
|
914
916
|
color: var(--ft-button-internal-color);
|
|
915
917
|
-webkit-mask-image: radial-gradient(white, black);
|
|
916
918
|
}
|
|
@@ -922,7 +924,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
922
924
|
.ft-button--dense {
|
|
923
925
|
--ft-button-internal-vertical-padding: 2px;
|
|
924
926
|
--ft-button-internal-horizontal-padding: 4px;
|
|
925
|
-
border-radius: ${
|
|
927
|
+
border-radius: ${_e};
|
|
926
928
|
}
|
|
927
929
|
|
|
928
930
|
.ft-button--round {
|
|
@@ -931,13 +933,13 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
931
933
|
|
|
932
934
|
.ft-button[disabled] {
|
|
933
935
|
filter: grayscale(1);
|
|
934
|
-
opacity: ${
|
|
936
|
+
opacity: ${Ze.opacityDisabled};
|
|
935
937
|
}
|
|
936
938
|
|
|
937
939
|
.ft-button.ft-button--primary {
|
|
938
|
-
background-color: ${
|
|
939
|
-
--ft-button-internal-color: ${
|
|
940
|
-
${e.setVariable(ne.color,
|
|
940
|
+
background-color: ${Me.backgroundColor};
|
|
941
|
+
--ft-button-internal-color: ${Me.color};
|
|
942
|
+
${e.setVariable(ne.color,Me.rippleColor)};
|
|
941
943
|
}
|
|
942
944
|
|
|
943
945
|
.ft-button.ft-button--outlined {
|
|
@@ -990,7 +992,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
990
992
|
}
|
|
991
993
|
|
|
992
994
|
ft-loader {
|
|
993
|
-
${e.setVariable(je.size,
|
|
995
|
+
${e.setVariable(je.size,Ze.iconSize)};
|
|
994
996
|
${e.setVariable(je.color,"var(--ft-button-internal-color)")};
|
|
995
997
|
}
|
|
996
998
|
`]}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`
|
|
@@ -1015,7 +1017,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1015
1017
|
</ft-tooltip>
|
|
1016
1018
|
`}resolveIcon(){return this.loading?i.html`
|
|
1017
1019
|
<ft-loader></ft-loader> `:this.icon?i.html`
|
|
1018
|
-
<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}}
|
|
1020
|
+
<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}}Ue.elementDefinitions={"ft-ripple":de,"ft-tooltip":Ie,"ft-typography":Jt,"ft-icon":ge,"ft-loader":Ne},Ae([o.property({type:Boolean})],Ue.prototype,"primary",void 0),Ae([o.property({type:Boolean})],Ue.prototype,"outlined",void 0),Ae([o.property({type:Boolean})],Ue.prototype,"disabled",void 0),Ae([o.property({type:Boolean})],Ue.prototype,"dense",void 0),Ae([o.property({type:Boolean})],Ue.prototype,"round",void 0),Ae([o.property({type:String})],Ue.prototype,"label",void 0),Ae([o.property({type:String})],Ue.prototype,"icon",void 0),Ae([o.property({type:Boolean})],Ue.prototype,"trailingIcon",void 0),Ae([o.property({type:Boolean})],Ue.prototype,"loading",void 0),Ae([o.property({type:String})],Ue.prototype,"tooltipPosition",void 0),Ae([o.query(".ft-button")],Ue.prototype,"button",void 0),Ae([o.query(".ft-button--label slot")],Ue.prototype,"slottedContent",void 0),e.customElement("ft-button")(Ue);var He=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 We extends CustomEvent{constructor(t){super("row-click",{detail:t})}}const Pe={headerBackground:e.FtCssVariableFactory.create("--ft-filterable-table-header-background","COLOR","whitesmoke"),oddRowBackground:e.FtCssVariableFactory.create("--ft-filterable-table-odd-row-background","COLOR","#FFFFFF"),evenRowBackground:e.FtCssVariableFactory.create("--ft-filterable-table-even-row-background","COLOR","#fdfdfd"),rowHoverBackground:e.FtCssVariableFactory.create("--ft-filterable-table-row-hover-background","COLOR","#fafafa"),stickyHeaderZIndex:e.FtCssVariableFactory.create("--ft-filterable-table-sticky-header-zindex","NUMBER","100"),colorOnSurfaceHigh:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceHigh,"Design system"),titleFont:e.FtCssVariableFactory.external(e.designSystemVariables.titleFont,"Design system"),contentFont:e.FtCssVariableFactory.external(e.designSystemVariables.contentFont,"Design system")},Ke=t=>i.html`${t}`,Le=(t,e)=>t-e;class Ge 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`
|
|
1019
1021
|
<style>
|
|
1020
1022
|
.table {
|
|
1021
1023
|
grid-template-columns: repeat(${this.columns.length}, minmax(min-content, auto));
|
|
@@ -1027,7 +1029,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1027
1029
|
</div>
|
|
1028
1030
|
${n.repeat(t,((t,e)=>"row-"+e),((t,e)=>i.html`
|
|
1029
1031
|
<div class="row"
|
|
1030
|
-
@click=${()=>this.dispatchEvent(new
|
|
1032
|
+
@click=${()=>this.dispatchEvent(new We(t))}>
|
|
1031
1033
|
${n.repeat(this.columns,((t,i)=>"cell-"+e+" "+i),(i=>this.renderCell(i,t,e)))}
|
|
1032
1034
|
</div>
|
|
1033
1035
|
`))}
|
|
@@ -1064,9 +1066,9 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1064
1066
|
<ft-select-option value="${t}" label="${t}"></ft-select-option>
|
|
1065
1067
|
`))}
|
|
1066
1068
|
</ft-select>
|
|
1067
|
-
`:null}return null}renderCell(t,e,o){var n;const s=null!==(n=t.render)&&void 0!==n?n:
|
|
1069
|
+
`:null}return null}renderCell(t,e,o){var n;const s=null!==(n=t.render)&&void 0!==n?n:Ke;return i.html`
|
|
1068
1070
|
<div class="cell">${(t=>{const e=s(t,o);return"string"==typeof e?l.unsafeHTML(e):e})(this.getValue(t,e))}</div>
|
|
1069
|
-
`}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)}}
|
|
1071
|
+
`}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)}}Ge.styles=i.css`
|
|
1070
1072
|
:host {
|
|
1071
1073
|
display: block;
|
|
1072
1074
|
}
|
|
@@ -1108,8 +1110,8 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1108
1110
|
}
|
|
1109
1111
|
|
|
1110
1112
|
.column-title-container ft-button {
|
|
1111
|
-
${e.setVariable(
|
|
1112
|
-
${e.setVariable(
|
|
1113
|
+
${e.setVariable(Ze.backgroundColor,Pe.headerBackground)};
|
|
1114
|
+
${e.setVariable(Ze.color,Pe.colorOnSurfaceHigh)};
|
|
1113
1115
|
}
|
|
1114
1116
|
|
|
1115
1117
|
.column-title {
|
|
@@ -1174,4 +1176,4 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1174
1176
|
.hidden {
|
|
1175
1177
|
visibility: hidden;
|
|
1176
1178
|
}
|
|
1177
|
-
`,
|
|
1179
|
+
`,He([o.property({attribute:!1})],Ge.prototype,"data",void 0),He([o.property({attribute:!1})],Ge.prototype,"columns",void 0),He([o.property({attribute:!1})],Ge.prototype,"sort",void 0),He([o.property()],Ge.prototype,"stickyHeaders",void 0),He([o.state()],Ge.prototype,"currentSort",void 0),e.customElement("ft-filterable-table")(Ge),t.FtFilterableTable=Ge,t.FtFilterableTableCssVariables=Pe,t.RowClickEvent=We,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litUnsafeHTML,ftGlobals.litClassMap);
|
|
@@ -440,7 +440,7 @@ class Bt extends kt{constructor(t){if(super(t),this.it=K,t.type!==Ot)throw Error
|
|
|
440
440
|
opacity: ${ti.opacityContentOnSurfacePressed};
|
|
441
441
|
transform: translate(-50%, -50%) scale(1);
|
|
442
442
|
}
|
|
443
|
-
`,Ge([o({type:Boolean})],li.prototype,"primary",void 0),Ge([o({type:Boolean})],li.prototype,"secondary",void 0),Ge([o({type:Boolean})],li.prototype,"unbounded",void 0),Ge([o({type:Boolean})],li.prototype,"activated",void 0),Ge([o({type:Boolean})],li.prototype,"selected",void 0),Ge([o({type:Boolean})],li.prototype,"disabled",void 0),Ge([n()],li.prototype,"hovered",void 0),Ge([n()],li.prototype,"focused",void 0),Ge([n()],li.prototype,"pressed",void 0),Ge([n()],li.prototype,"rippling",void 0),Ge([n()],li.prototype,"rippleSize",void 0),Ge([n()],li.prototype,"originX",void 0),Ge([n()],li.prototype,"originY",void 0),Ge([r(".ft-ripple")],li.prototype,"ripple",void 0),Ge([r(".ft-ripple--effect")],li.prototype,"rippleEffect",void 0),p("ft-ripple")(li),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=""}(ai||(ai={})),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=""}(pi||(pi={})),new Map([...["abw"].map((t=>[t,pi.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,pi.AUDIO])),...["avi"].map((t=>[t,pi.AVI])),...["chm","xhs"].map((t=>[t,pi.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,pi.CODE])),...["csv"].map((t=>[t,pi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,pi.DITA])),...["epub"].map((t=>[t,pi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,pi.EXCEL])),...["flac"].map((t=>[t,pi.FLAC])),...["gif"].map((t=>[t,pi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,pi.GZIP])),...["html","htm","xhtml"].map((t=>[t,pi.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,pi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,pi.JPEG])),...["json"].map((t=>[t,pi.JSON])),...["m4a","m4p"].map((t=>[t,pi.M4A])),...["mov","qt"].map((t=>[t,pi.MOV])),...["mp3"].map((t=>[t,pi.MP3])),...["mp4","m4v"].map((t=>[t,pi.MP4])),...["ogg","oga"].map((t=>[t,pi.OGG])),...["pdf","ps"].map((t=>[t,pi.PDF])),...["png"].map((t=>[t,pi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,pi.POWERPOINT])),...["rar"].map((t=>[t,pi.RAR])),...["stp"].map((t=>[t,pi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,pi.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,pi.VIDEO])),...["wav"].map((t=>[t,pi.WAV])),...["wma"].map((t=>[t,pi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,pi.WORD])),...["xml","xsl","rdf"].map((t=>[t,pi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,pi.YAML])),...["zip"].map((t=>[t,pi.ZIP]))]);var ci,di=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(ci||(ci={}));const fi={size:ft.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:ft.extend("--ft-icon-fluid-topics-font-family",ft.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:ft.extend("--ft-icon-file-format-font-family",ft.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:ft.extend("--ft-icon-material-font-family",ft.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class hi extends vt{constructor(){super(...arguments),this.variant=ci.fluid_topics}getStyles(){return b`
|
|
443
|
+
`,Ge([o({type:Boolean})],li.prototype,"primary",void 0),Ge([o({type:Boolean})],li.prototype,"secondary",void 0),Ge([o({type:Boolean})],li.prototype,"unbounded",void 0),Ge([o({type:Boolean})],li.prototype,"activated",void 0),Ge([o({type:Boolean})],li.prototype,"selected",void 0),Ge([o({type:Boolean})],li.prototype,"disabled",void 0),Ge([n()],li.prototype,"hovered",void 0),Ge([n()],li.prototype,"focused",void 0),Ge([n()],li.prototype,"pressed",void 0),Ge([n()],li.prototype,"rippling",void 0),Ge([n()],li.prototype,"rippleSize",void 0),Ge([n()],li.prototype,"originX",void 0),Ge([n()],li.prototype,"originY",void 0),Ge([r(".ft-ripple")],li.prototype,"ripple",void 0),Ge([r(".ft-ripple--effect")],li.prototype,"rippleEffect",void 0),p("ft-ripple")(li),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=""}(ai||(ai={})),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=""}(pi||(pi={})),new Map([...["abw"].map((t=>[t,pi.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,pi.AUDIO])),...["avi"].map((t=>[t,pi.AVI])),...["chm","xhs"].map((t=>[t,pi.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,pi.CODE])),...["csv"].map((t=>[t,pi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,pi.DITA])),...["epub"].map((t=>[t,pi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,pi.EXCEL])),...["flac"].map((t=>[t,pi.FLAC])),...["gif"].map((t=>[t,pi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,pi.GZIP])),...["html","htm","xhtml"].map((t=>[t,pi.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,pi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,pi.JPEG])),...["json"].map((t=>[t,pi.JSON])),...["m4a","m4p"].map((t=>[t,pi.M4A])),...["mov","qt"].map((t=>[t,pi.MOV])),...["mp3"].map((t=>[t,pi.MP3])),...["mp4","m4v"].map((t=>[t,pi.MP4])),...["ogg","oga"].map((t=>[t,pi.OGG])),...["pdf","ps"].map((t=>[t,pi.PDF])),...["png"].map((t=>[t,pi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,pi.POWERPOINT])),...["rar"].map((t=>[t,pi.RAR])),...["stp"].map((t=>[t,pi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,pi.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,pi.VIDEO])),...["wav"].map((t=>[t,pi.WAV])),...["wma"].map((t=>[t,pi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,pi.WORD])),...["xml","xsl","rdf"].map((t=>[t,pi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,pi.YAML])),...["zip"].map((t=>[t,pi.ZIP]))]);var ci,di=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(ci||(ci={}));const fi={size:ft.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:ft.extend("--ft-icon-fluid-topics-font-family",ft.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:ft.extend("--ft-icon-file-format-font-family",ft.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:ft.extend("--ft-icon-material-font-family",ft.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:ft.create("--ft-icon-vertical-align","UNKNOWN","unset")};class hi extends vt{constructor(){super(...arguments),this.variant=ci.fluid_topics}getStyles(){return b`
|
|
444
444
|
:host {
|
|
445
445
|
display: inline-block;
|
|
446
446
|
}
|
|
@@ -463,6 +463,7 @@ class Bt extends kt{constructor(t){if(super(t),this.it=K,t.type!==Ot)throw Error
|
|
|
463
463
|
text-rendering: auto;
|
|
464
464
|
-webkit-font-smoothing: antialiased;
|
|
465
465
|
-moz-osx-font-smoothing: grayscale;
|
|
466
|
+
vertical-align: ${fi.verticalAlign};
|
|
466
467
|
}
|
|
467
468
|
|
|
468
469
|
.ft-icon--fluid-topics {
|
|
@@ -834,7 +835,7 @@ class Bt extends kt{constructor(t){if(super(t),this.it=K,t.type!==Ot)throw Error
|
|
|
834
835
|
padding-right: ${gi.horizontalSpacing};
|
|
835
836
|
color: ${gi.iconColor};
|
|
836
837
|
}
|
|
837
|
-
`],yi([o({type:String})],mi.prototype,"label",void 0),yi([o({reflect:!0})],mi.prototype,"value",void 0),yi([o({type:String})],mi.prototype,"helper",void 0),yi([o({type:Boolean})],mi.prototype,"outlined",void 0),yi([o({type:Boolean})],mi.prototype,"disabled",void 0),yi([o({type:Boolean})],mi.prototype,"error",void 0),yi([r(".ft-text-field--input")],mi.prototype,"input",void 0),yi([o({type:String})],mi.prototype,"prefix",void 0),yi([o({type:String})],mi.prototype,"icon",void 0),yi([o({type:String})],mi.prototype,"iconVariant",void 0),yi([n()],mi.prototype,"focused",void 0),p("ft-text-field")(mi);var $i=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};const wi=ft.create("--ft-tooltip-distance","SIZE","4px"),Oi=ft.create("--ft-tooltip-color","COLOR","#FFFFFF"),Si=ft.create("--ft-tooltip-background-color","COLOR","#666666"),ki=ft.create("--ft-tooltip-z-index","NUMBER","1"),Ci=ft.external(ut.borderRadiusS,"Design system");class
|
|
838
|
+
`],yi([o({type:String})],mi.prototype,"label",void 0),yi([o({reflect:!0})],mi.prototype,"value",void 0),yi([o({type:String})],mi.prototype,"helper",void 0),yi([o({type:Boolean})],mi.prototype,"outlined",void 0),yi([o({type:Boolean})],mi.prototype,"disabled",void 0),yi([o({type:Boolean})],mi.prototype,"error",void 0),yi([r(".ft-text-field--input")],mi.prototype,"input",void 0),yi([o({type:String})],mi.prototype,"prefix",void 0),yi([o({type:String})],mi.prototype,"icon",void 0),yi([o({type:String})],mi.prototype,"iconVariant",void 0),yi([n()],mi.prototype,"focused",void 0),p("ft-text-field")(mi);var $i=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};const wi=ft.create("--ft-tooltip-distance","SIZE","4px"),Oi=ft.create("--ft-tooltip-color","COLOR","#FFFFFF"),Si=ft.create("--ft-tooltip-background-color","COLOR","#666666"),ki=ft.create("--ft-tooltip-z-index","NUMBER","1"),Ci=ft.external(ut.borderRadiusS,"Design system"),Ei=ft.create("--ft-tooltip-max-width","SIZE","150px");class Ni extends vt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new e,this.revealDebouncer=new e}render(){return W`
|
|
838
839
|
<div part="container"
|
|
839
840
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
840
841
|
@mouseenter=${this.onHover}
|
|
@@ -844,12 +845,13 @@ class Bt extends kt{constructor(t){if(super(t),this.it=K,t.type!==Ot)throw Error
|
|
|
844
845
|
@touchstart=${this.onTouch}>
|
|
845
846
|
<div part="tooltip" class="ft-tooltip ft-tooltip--${this.position}" ?hidden=${!this.visible}>
|
|
846
847
|
<div part="tooltip-content" class="ft-tooltip--content">
|
|
847
|
-
<
|
|
848
|
+
<slot name="text"></slot>
|
|
849
|
+
<ft-typography variant="caption" ?hidden=${!this.text}>${this.text}</ft-typography>
|
|
848
850
|
</div>
|
|
849
851
|
</div>
|
|
850
852
|
<slot></slot>
|
|
851
853
|
</div>
|
|
852
|
-
`}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;let n=0,s=0;switch(this.position){case"top":s=-this.tooltip.clientHeight,n=o;break;case"bottom":s=e.height,n=o;break;case"left":s=i,n=-this.tooltip.clientWidth;break;case"right":s=i,n=e.width}e.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+n<0&&(n=0);const r=this.tooltip.style;r.left=n+"px",r.top=s+"px",r.maxWidth
|
|
854
|
+
`}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;let n=0,s=0;switch(this.position){case"top":s=-this.tooltip.clientHeight,n=o;break;case"bottom":s=e.height,n=o;break;case"left":s=i,n=-this.tooltip.clientWidth;break;case"right":s=i,n=e.width}e.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+n<0&&(n=0);const r=this.tooltip.style;r.left=n+"px",r.top=s+"px",r.maxWidth=`max(${e.width}px, ${Ei})`}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())}}Ni.elementDefinitions={"ft-typography":Je},Ni.styles=b`
|
|
853
855
|
.ft-tooltip--container {
|
|
854
856
|
display: block;
|
|
855
857
|
position: relative;
|
|
@@ -865,7 +867,7 @@ class Bt extends kt{constructor(t){if(super(t),this.it=K,t.type!==Ot)throw Error
|
|
|
865
867
|
box-sizing: border-box;
|
|
866
868
|
overflow: hidden;
|
|
867
869
|
width: max-content;
|
|
868
|
-
max-width:
|
|
870
|
+
max-width: ${Ei};
|
|
869
871
|
text-align: center;
|
|
870
872
|
padding: ${wi};
|
|
871
873
|
z-index: ${ki};
|
|
@@ -881,13 +883,13 @@ class Bt extends kt{constructor(t){if(super(t),this.it=K,t.type!==Ot)throw Error
|
|
|
881
883
|
position: relative;
|
|
882
884
|
word-break: break-word;
|
|
883
885
|
}
|
|
884
|
-
`,$i([o()],
|
|
886
|
+
`,$i([o()],Ni.prototype,"text",void 0),$i([o({type:Boolean})],Ni.prototype,"manual",void 0),$i([o({type:Boolean})],Ni.prototype,"inline",void 0),$i([o({type:Number})],Ni.prototype,"delay",void 0),$i([o()],Ni.prototype,"position",void 0),$i([
|
|
885
887
|
/**
|
|
886
888
|
* @license
|
|
887
889
|
* Copyright 2017 Google LLC
|
|
888
890
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
889
891
|
*/
|
|
890
|
-
function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return s({descriptor:o=>({get(){var o;const n="slot"+(e?`[name=${e}]`:":not([name])"),s=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),r=null!=s?a(s,t):[];return i?r.filter((t=>t.matches(i))):r},enumerable:!0,configurable:!0})})}({slot:n,flatten:e,selector:i}):s({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":not([name])"),s=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==s?void 0:s.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],
|
|
892
|
+
function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return s({descriptor:o=>({get(){var o;const n="slot"+(e?`[name=${e}]`:":not([name])"),s=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),r=null!=s?a(s,t):[];return i?r.filter((t=>t.matches(i))):r},enumerable:!0,configurable:!0})})}({slot:n,flatten:e,selector:i}):s({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":not([name])"),s=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==s?void 0:s.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],Ni.prototype,"slotNodes",void 0),$i([r(".ft-tooltip--container")],Ni.prototype,"container",void 0),$i([r("slot")],Ni.prototype,"target",void 0),$i([r(".ft-tooltip")],Ni.prototype,"tooltip",void 0),$i([r(".ft-tooltip--content")],Ni.prototype,"tooltipContent",void 0),$i([n()],Ni.prototype,"visible",void 0),p("ft-tooltip")(Ni);const Ri={color:ft.extend("--ft-loader-color",ut.colorPrimary),size:ft.create("--ft-loader-size","SIZE","80px")};class zi extends vt{static get styles(){return b`
|
|
891
893
|
:host {
|
|
892
894
|
line-height: 0;
|
|
893
895
|
}
|
|
@@ -896,8 +898,8 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
896
898
|
display: inline-block;
|
|
897
899
|
position: relative;
|
|
898
900
|
|
|
899
|
-
width: ${
|
|
900
|
-
height: ${
|
|
901
|
+
width: ${Ri.size};
|
|
902
|
+
height: ${Ri.size};
|
|
901
903
|
}
|
|
902
904
|
|
|
903
905
|
.ft-loader div {
|
|
@@ -906,7 +908,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
906
908
|
width: 25%;
|
|
907
909
|
height: 25%;
|
|
908
910
|
border-radius: 50%;
|
|
909
|
-
background: ${
|
|
911
|
+
background: ${Ri.color};
|
|
910
912
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
911
913
|
}
|
|
912
914
|
|
|
@@ -953,7 +955,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
953
955
|
transform: translate(0, 0);
|
|
954
956
|
}
|
|
955
957
|
100% {
|
|
956
|
-
transform: translate(calc(0.35 * ${
|
|
958
|
+
transform: translate(calc(0.35 * ${Ri.size}), 0);
|
|
957
959
|
}
|
|
958
960
|
}
|
|
959
961
|
`}render(){return W`
|
|
@@ -963,7 +965,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
963
965
|
<div></div>
|
|
964
966
|
<div></div>
|
|
965
967
|
</div>
|
|
966
|
-
`}}p("ft-loader")(
|
|
968
|
+
`}}p("ft-loader")(zi);var Mi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};const Fi=ft.extend("--ft-button-color",ut.colorPrimary),Ui={backgroundColor:ft.extend("--ft-button-background-color",ut.colorSurface),borderRadius:ft.extend("--ft-button-border-radius",ut.borderRadiusL),color:Fi,fontSize:ft.extend("--ft-button-font-size",Ae.fontSize),iconSize:ft.create("--ft-button-icon-size","SIZE","24px"),rippleColor:ft.extend("--ft-button-ripple-color",Fi),opacityDisabled:ft.external(ut.colorOpacityDisabled,"Design system")},Bi=ft.extend("--ft-button-primary-color",ft.extend("--ft-button-color",ut.colorOnPrimary)),Di={backgroundColor:ft.extend("--ft-button-primary-background-color",ft.extend("--ft-button-background-color",ut.colorPrimary)),color:Bi,rippleColor:ft.extend("--ft-button-primary-ripple-color",Bi)},ji=ft.extend("--ft-button-dense-border-radius",ft.extend("--ft-button-border-radius",ut.borderRadiusM));class Ai extends vt{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[xt,b`
|
|
967
969
|
:host {
|
|
968
970
|
display: inline-block;
|
|
969
971
|
max-width: 100%;
|
|
@@ -974,7 +976,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
974
976
|
box-shadow: 0px 0px 0px transparent;
|
|
975
977
|
border: 0px solid transparent;
|
|
976
978
|
text-shadow: 0px 0px 0px transparent;
|
|
977
|
-
font-size: ${
|
|
979
|
+
font-size: ${Ui.fontSize};
|
|
978
980
|
}
|
|
979
981
|
|
|
980
982
|
button:hover {
|
|
@@ -1003,17 +1005,17 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
1003
1005
|
border: none;
|
|
1004
1006
|
pointer-events: auto;
|
|
1005
1007
|
|
|
1006
|
-
--ft-button-internal-line-height: calc(${
|
|
1007
|
-
--ft-button-internal-color: ${
|
|
1008
|
-
${ht(fi.size,
|
|
1008
|
+
--ft-button-internal-line-height: calc(${Ui.fontSize} + 2px);
|
|
1009
|
+
--ft-button-internal-color: ${Ui.color};
|
|
1010
|
+
${ht(fi.size,Ui.iconSize)};
|
|
1009
1011
|
--ft-button-internal-vertical-padding: 6px;
|
|
1010
1012
|
--ft-button-internal-horizontal-padding: 8px;
|
|
1011
|
-
${ht(ti.color,
|
|
1012
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
1013
|
+
${ht(ti.color,Ui.rippleColor)};
|
|
1014
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ui.iconSize});
|
|
1013
1015
|
|
|
1014
|
-
border-radius: ${
|
|
1016
|
+
border-radius: ${Ui.borderRadius};
|
|
1015
1017
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
1016
|
-
background-color: ${
|
|
1018
|
+
background-color: ${Ui.backgroundColor};
|
|
1017
1019
|
color: var(--ft-button-internal-color);
|
|
1018
1020
|
-webkit-mask-image: radial-gradient(white, black);
|
|
1019
1021
|
}
|
|
@@ -1025,7 +1027,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
1025
1027
|
.ft-button--dense {
|
|
1026
1028
|
--ft-button-internal-vertical-padding: 2px;
|
|
1027
1029
|
--ft-button-internal-horizontal-padding: 4px;
|
|
1028
|
-
border-radius: ${
|
|
1030
|
+
border-radius: ${ji};
|
|
1029
1031
|
}
|
|
1030
1032
|
|
|
1031
1033
|
.ft-button--round {
|
|
@@ -1034,13 +1036,13 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
1034
1036
|
|
|
1035
1037
|
.ft-button[disabled] {
|
|
1036
1038
|
filter: grayscale(1);
|
|
1037
|
-
opacity: ${
|
|
1039
|
+
opacity: ${Ui.opacityDisabled};
|
|
1038
1040
|
}
|
|
1039
1041
|
|
|
1040
1042
|
.ft-button.ft-button--primary {
|
|
1041
|
-
background-color: ${
|
|
1042
|
-
--ft-button-internal-color: ${
|
|
1043
|
-
${ht(ti.color,
|
|
1043
|
+
background-color: ${Di.backgroundColor};
|
|
1044
|
+
--ft-button-internal-color: ${Di.color};
|
|
1045
|
+
${ht(ti.color,Di.rippleColor)};
|
|
1044
1046
|
}
|
|
1045
1047
|
|
|
1046
1048
|
.ft-button.ft-button--outlined {
|
|
@@ -1093,8 +1095,8 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
1093
1095
|
}
|
|
1094
1096
|
|
|
1095
1097
|
ft-loader {
|
|
1096
|
-
${ht(
|
|
1097
|
-
${ht(
|
|
1098
|
+
${ht(Ri.size,Ui.iconSize)};
|
|
1099
|
+
${ht(Ri.color,"var(--ft-button-internal-color)")};
|
|
1098
1100
|
}
|
|
1099
1101
|
`]}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":$t,"ft-no-text-select":!0};return this.addTooltip(W`
|
|
1100
1102
|
<button part="button"
|
|
@@ -1118,7 +1120,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
1118
1120
|
</ft-tooltip>
|
|
1119
1121
|
`}resolveIcon(){return this.loading?W`
|
|
1120
1122
|
<ft-loader></ft-loader> `:this.icon?W`
|
|
1121
|
-
<ft-icon variant="material">${this.icon}</ft-icon> `:K}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}}
|
|
1123
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:K}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}}Ai.elementDefinitions={"ft-ripple":li,"ft-tooltip":Ni,"ft-typography":Je,"ft-icon":hi,"ft-loader":zi},Mi([o({type:Boolean})],Ai.prototype,"primary",void 0),Mi([o({type:Boolean})],Ai.prototype,"outlined",void 0),Mi([o({type:Boolean})],Ai.prototype,"disabled",void 0),Mi([o({type:Boolean})],Ai.prototype,"dense",void 0),Mi([o({type:Boolean})],Ai.prototype,"round",void 0),Mi([o({type:String})],Ai.prototype,"label",void 0),Mi([o({type:String})],Ai.prototype,"icon",void 0),Mi([o({type:Boolean})],Ai.prototype,"trailingIcon",void 0),Mi([o({type:Boolean})],Ai.prototype,"loading",void 0),Mi([o({type:String})],Ai.prototype,"tooltipPosition",void 0),Mi([r(".ft-button")],Ai.prototype,"button",void 0),Mi([r(".ft-button--label slot")],Ai.prototype,"slottedContent",void 0),p("ft-button")(Ai);var Ti=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Li extends CustomEvent{constructor(t){super("row-click",{detail:t})}}const Ii={headerBackground:ft.create("--ft-filterable-table-header-background","COLOR","whitesmoke"),oddRowBackground:ft.create("--ft-filterable-table-odd-row-background","COLOR","#FFFFFF"),evenRowBackground:ft.create("--ft-filterable-table-even-row-background","COLOR","#fdfdfd"),rowHoverBackground:ft.create("--ft-filterable-table-row-hover-background","COLOR","#fafafa"),stickyHeaderZIndex:ft.create("--ft-filterable-table-sticky-header-zindex","NUMBER","100"),colorOnSurfaceHigh:ft.external(ut.colorOnSurfaceHigh,"Design system"),titleFont:ft.external(ut.titleFont,"Design system"),contentFont:ft.external(ut.contentFont,"Design system")},Pi=t=>W`${t}`,_i=(t,e)=>t-e;class Hi extends vt{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 W`
|
|
1122
1124
|
<style>
|
|
1123
1125
|
.table {
|
|
1124
1126
|
grid-template-columns: repeat(${this.columns.length}, minmax(min-content, auto));
|
|
@@ -1130,12 +1132,12 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
1130
1132
|
</div>
|
|
1131
1133
|
${Ut(t,((t,e)=>"row-"+e),((t,e)=>W`
|
|
1132
1134
|
<div class="row"
|
|
1133
|
-
@click=${()=>this.dispatchEvent(new
|
|
1135
|
+
@click=${()=>this.dispatchEvent(new Li(t))}>
|
|
1134
1136
|
${Ut(this.columns,((t,i)=>"cell-"+e+" "+i),(i=>this.renderCell(i,t,e)))}
|
|
1135
1137
|
</div>
|
|
1136
1138
|
`))}
|
|
1137
1139
|
</div>
|
|
1138
|
-
`}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:
|
|
1140
|
+
`}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:_i,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 i={"header-cell":!0,"header-cell--sticky":this.stickyHeaders};return W`
|
|
1139
1141
|
<div class="${jt(i)}">
|
|
1140
1142
|
<div class="column-title-container">
|
|
1141
1143
|
<span class="column-title">${t.title}</span>
|
|
@@ -1167,9 +1169,9 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
1167
1169
|
<ft-select-option value="${t}" label="${t}"></ft-select-option>
|
|
1168
1170
|
`))}
|
|
1169
1171
|
</ft-select>
|
|
1170
|
-
`:null}return null}renderCell(t,e,i){var o;const n=null!==(o=t.render)&&void 0!==o?o:
|
|
1172
|
+
`:null}return null}renderCell(t,e,i){var o;const n=null!==(o=t.render)&&void 0!==o?o:Pi;return W`
|
|
1171
1173
|
<div class="cell">${(t=>{const e=n(t,i);return"string"==typeof e?Dt(e):e})(this.getValue(t,e))}</div>
|
|
1172
|
-
`}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)}}
|
|
1174
|
+
`}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)}}Hi.styles=b`
|
|
1173
1175
|
:host {
|
|
1174
1176
|
display: block;
|
|
1175
1177
|
}
|
|
@@ -1185,15 +1187,15 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
1185
1187
|
.header-cell {
|
|
1186
1188
|
display: flex;
|
|
1187
1189
|
flex-direction: column;
|
|
1188
|
-
background: ${
|
|
1189
|
-
color: ${
|
|
1190
|
+
background: ${Ii.headerBackground};
|
|
1191
|
+
color: ${Ii.colorOnSurfaceHigh};
|
|
1190
1192
|
padding: .5rem 1rem;
|
|
1191
|
-
font-family: ${
|
|
1193
|
+
font-family: ${Ii.titleFont};
|
|
1192
1194
|
}
|
|
1193
1195
|
|
|
1194
1196
|
.header-cell--sticky {
|
|
1195
1197
|
top: 0;
|
|
1196
|
-
z-index: ${
|
|
1198
|
+
z-index: ${Ii.stickyHeaderZIndex};
|
|
1197
1199
|
position: sticky;
|
|
1198
1200
|
}
|
|
1199
1201
|
|
|
@@ -1211,8 +1213,8 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
1211
1213
|
}
|
|
1212
1214
|
|
|
1213
1215
|
.column-title-container ft-button {
|
|
1214
|
-
${ht(
|
|
1215
|
-
${ht(
|
|
1216
|
+
${ht(Ui.backgroundColor,Ii.headerBackground)};
|
|
1217
|
+
${ht(Ui.color,Ii.colorOnSurfaceHigh)};
|
|
1216
1218
|
}
|
|
1217
1219
|
|
|
1218
1220
|
.column-title {
|
|
@@ -1241,29 +1243,29 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
1241
1243
|
|
|
1242
1244
|
.cell {
|
|
1243
1245
|
padding: 1rem;
|
|
1244
|
-
border-left: 1px solid ${
|
|
1245
|
-
border-bottom: 1px solid ${
|
|
1246
|
+
border-left: 1px solid ${Ii.headerBackground};
|
|
1247
|
+
border-bottom: 1px solid ${Ii.headerBackground};
|
|
1246
1248
|
overflow-x: auto;
|
|
1247
1249
|
display: flex;
|
|
1248
1250
|
align-items: center;
|
|
1249
|
-
font-family: ${
|
|
1251
|
+
font-family: ${Ii.contentFont};
|
|
1250
1252
|
}
|
|
1251
1253
|
|
|
1252
1254
|
/* Even is 2n+1 and odd is 2n because of the header */
|
|
1253
1255
|
.row:nth-child(2n) > .cell {
|
|
1254
|
-
background: ${
|
|
1256
|
+
background: ${Ii.oddRowBackground};
|
|
1255
1257
|
}
|
|
1256
1258
|
|
|
1257
1259
|
.row:nth-child(2n + 1) > .cell {
|
|
1258
|
-
background: ${
|
|
1260
|
+
background: ${Ii.evenRowBackground};
|
|
1259
1261
|
}
|
|
1260
1262
|
|
|
1261
1263
|
.row:hover > .cell {
|
|
1262
|
-
background: ${
|
|
1264
|
+
background: ${Ii.rowHoverBackground};
|
|
1263
1265
|
}
|
|
1264
1266
|
|
|
1265
1267
|
.cell:last-of-type {
|
|
1266
|
-
border-right: 1px solid ${
|
|
1268
|
+
border-right: 1px solid ${Ii.headerBackground};
|
|
1267
1269
|
}
|
|
1268
1270
|
|
|
1269
1271
|
.row:last-of-type .cell:first-of-type {
|
|
@@ -1277,4 +1279,4 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
1277
1279
|
.hidden {
|
|
1278
1280
|
visibility: hidden;
|
|
1279
1281
|
}
|
|
1280
|
-
`,
|
|
1282
|
+
`,Ti([o({attribute:!1})],Hi.prototype,"data",void 0),Ti([o({attribute:!1})],Hi.prototype,"columns",void 0),Ti([o({attribute:!1})],Hi.prototype,"sort",void 0),Ti([o()],Hi.prototype,"stickyHeaders",void 0),Ti([n()],Hi.prototype,"currentSort",void 0),p("ft-filterable-table")(Hi),t.FtFilterableTable=Hi,t.FtFilterableTableCssVariables=Ii,t.RowClickEvent=Li,Object.defineProperty(t,"i",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-filterable-table",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
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.3.
|
|
26
|
-
"@fluid-topics/ft-select": "0.3.
|
|
27
|
-
"@fluid-topics/ft-text-field": "0.3.
|
|
28
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
25
|
+
"@fluid-topics/ft-button": "0.3.6",
|
|
26
|
+
"@fluid-topics/ft-select": "0.3.6",
|
|
27
|
+
"@fluid-topics/ft-text-field": "0.3.6",
|
|
28
|
+
"@fluid-topics/ft-wc-utils": "0.3.6",
|
|
29
29
|
"lit": "2.2.8"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "174dee2cde0a01bd51aba1031d4c5128f6fe81f1"
|
|
32
32
|
}
|