@fluid-topics/ft-filterable-table 0.3.37 → 0.3.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-filterable-table.light.js +236 -168
- package/build/ft-filterable-table.min.js +396 -329
- package/package.json +6 -6
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
!function(t,e,i,o,n,l
|
|
1
|
+
!function(t,e,i,o,s,n,l){
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var r;const a=window,p=a.trustedTypes,f=p?p.createPolicy("lit-html",{createHTML:t=>t}):void 0,d=`lit$${(Math.random()+"").slice(9)}$`,h="?"+d,c=`<${h}>`,u=document,x=(t="")=>u.createComment(t),
|
|
7
|
+
var r;const a=window,p=a.trustedTypes,f=p?p.createPolicy("lit-html",{createHTML:t=>t}):void 0,d=`lit$${(Math.random()+"").slice(9)}$`,h="?"+d,c=`<${h}>`,u=document,x=(t="")=>u.createComment(t),g=t=>null===t||"object"!=typeof t&&"function"!=typeof t,b=Array.isArray,v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,m=/>/g,$=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),w=/'/g,k=/"/g,S=/^(?:script|style|textarea|title)$/i,z=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),O=Symbol.for("lit-noChange"),C=Symbol.for("lit-nothing"),E=new WeakMap,D=u.createTreeWalker(u,129,null,!1),B=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",l=v;for(let e=0;e<i;e++){const i=t[e];let r,a,p=-1,f=0;for(;f<i.length&&(l.lastIndex=f,a=l.exec(i),null!==a);)f=l.lastIndex,l===v?"!--"===a[1]?l=y:void 0!==a[1]?l=m:void 0!==a[2]?(S.test(a[2])&&(s=RegExp("</"+a[2],"g")),l=$):void 0!==a[3]&&(l=$):l===$?">"===a[0]?(l=null!=s?s:v,p=-1):void 0===a[1]?p=-2:(p=l.lastIndex-a[2].length,r=a[1],l=void 0===a[3]?$:'"'===a[3]?k:w):l===k||l===w?l=$:l===y||l===m?l=v:(l=$,s=void 0);const h=l===$&&t[e+1].startsWith("/>")?" ":"";n+=l===v?i+c:p>=0?(o.push(r),i.slice(0,p)+"$lit$"+i.slice(p)+d+h):i+d+(-2===p?(o.push(void 0),e):h)}const r=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==f?f.createHTML(r):r,o]};class I{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const l=t.length-1,r=this.parts,[a,f]=B(t,e);if(this.el=I.createElement(a,i),D.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=D.nextNode())&&r.length<l;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(d)){const i=f[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(d),e=/([.?@])?(.*)/.exec(i);r.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?T:"?"===e[1]?R:"@"===e[1]?M:A})}else r.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(S.test(o.tagName)){const t=o.textContent.split(d),e=t.length-1;if(e>0){o.textContent=p?p.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],x()),D.nextNode(),r.push({type:2,index:++s});o.append(t[e],x())}}}else if(8===o.nodeType)if(o.data===h)r.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(d,t+1));)r.push({type:7,index:s}),t+=d.length-1}s++}}static createElement(t,e){const i=u.createElement("template");return i.innerHTML=t,i}}function j(t,e,i=t,o){var s,n,l,r;if(e===O)return e;let a=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const p=g(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,i,o)),void 0!==o?(null!==(l=(r=i)._$Co)&&void 0!==l?l:r._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=j(t,a._$AS(t,e.values),a,o)),e}class N{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:u).importNode(i,!0);D.currentNode=s;let n=D.nextNode(),l=0,r=0,a=o[0];for(;void 0!==a;){if(l===a.index){let e;2===a.type?e=new F(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new _(n,this,t)),this.u.push(e),a=o[++r]}l!==(null==a?void 0:a.index)&&(n=D.nextNode(),l++)}return s}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class F{constructor(t,e,i,o){var s;this.type=2,this._$AH=C,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=j(this,t,e),g(t)?t===C||null==t||""===t?(this._$AH!==C&&this._$AR(),this._$AH=C):t!==this._$AH&&t!==O&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>b(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==C&&g(this._$AH)?this._$AA.nextSibling.data=t:this.T(u.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=I.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.p(i);else{const t=new N(s,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=E.get(t.strings);return void 0===e&&E.set(t.strings,e=new I(t)),e}k(t){b(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new F(this.O(x()),this.O(x()),this,this.options)):i=e[o],i._$AI(s),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._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class A{constructor(t,e,i,o,s){this.type=1,this._$AH=C,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=C}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let n=!1;if(void 0===s)t=j(this,t,e,0),n=!g(t)||t!==this._$AH&&t!==O,n&&(this._$AH=t);else{const o=t;let l,r;for(t=s[0],l=0;l<s.length-1;l++)r=j(this,o[i+l],e,l),r===O&&(r=this._$AH[l]),n||(n=!g(r)||r!==this._$AH[l]),r===C?t=C:t!==C&&(t+=(null!=r?r:"")+s[l+1]),this._$AH[l]=r}n&&!o&&this.j(t)}j(t){t===C?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class T extends A{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===C?void 0:t}}const Z=p?p.emptyScript:"";class R extends A{constructor(){super(...arguments),this.type=4}j(t){t&&t!==C?this.element.setAttribute(this.name,Z):this.element.removeAttribute(this.name)}}class M extends A{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=j(this,t,e,0))&&void 0!==i?i:C)===O)return;const o=this._$AH,s=t===C&&o!==C||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==C&&(o===C||s);s&&this.element.removeEventListener(this.name,this,o),n&&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 _{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){j(this,t)}}const U=a.litHtmlPolyfillSupport;null==U||U(I,F),(null!==(r=a.litHtmlVersions)&&void 0!==r?r:a.litHtmlVersions=[]).push("2.4.0");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const H=Symbol.for(""),
|
|
13
|
+
const H=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t._$litStatic$},W=t=>({_$litStatic$:t,r:H}),L=new Map,P=(t=>(e,...i)=>{const o=i.length;let s,n;const l=[],r=[];let a,p=0,f=!1;for(;p<o;){for(a=e[p];p<o&&void 0!==(n=i[p],s=K(n));)a+=s+e[++p],f=!0;r.push(n),l.push(a),p++}if(p===o&&l.push(e[o]),f){const t=l.join("$$lit$$");void 0===(e=L.get(t))&&(l.raw=l,L.set(t,e=l)),i=r}return t(e,...i)})(z);var V;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(V||(V={}));const G=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",G),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",G),st=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",X.fontSize,"14px"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",X.fontWeight,"normal"),lt=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),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",X.fontSize,"14px"),bt=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"),It=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",X.fontWeight,"normal"),jt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",X.letterSpacing,"0.33px"),Nt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",X.lineHeight,"1.6"),Ft=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,16 +19,16 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
19
19
|
line-height: ${et};
|
|
20
20
|
text-transform: ${it};
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,Kt=i.css`
|
|
23
23
|
.ft-typography--title-dense {
|
|
24
24
|
font-family: ${ot};
|
|
25
|
-
font-size: ${
|
|
26
|
-
font-weight: ${
|
|
27
|
-
letter-spacing: ${
|
|
25
|
+
font-size: ${st};
|
|
26
|
+
font-weight: ${nt};
|
|
27
|
+
letter-spacing: ${lt};
|
|
28
28
|
line-height: ${rt};
|
|
29
29
|
text-transform: ${at};
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,Wt=i.css`
|
|
32
32
|
.ft-typography--subtitle1 {
|
|
33
33
|
font-family: ${pt};
|
|
34
34
|
font-size: ${ft};
|
|
@@ -40,9 +40,9 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
40
40
|
`,Lt=i.css`
|
|
41
41
|
.ft-typography--subtitle2 {
|
|
42
42
|
font-family: ${xt};
|
|
43
|
-
font-size: ${
|
|
44
|
-
font-weight: ${
|
|
45
|
-
letter-spacing: ${
|
|
43
|
+
font-size: ${gt};
|
|
44
|
+
font-weight: ${bt};
|
|
45
|
+
letter-spacing: ${vt};
|
|
46
46
|
line-height: ${yt};
|
|
47
47
|
text-transform: ${mt};
|
|
48
48
|
}
|
|
@@ -56,7 +56,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
56
56
|
line-height: ${$t.lineHeight};
|
|
57
57
|
text-transform: ${$t.textTransform};
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,Vt=i.css`
|
|
60
60
|
.ft-typography--body2 {
|
|
61
61
|
font-family: ${wt};
|
|
62
62
|
font-size: ${kt};
|
|
@@ -65,7 +65,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
65
65
|
line-height: ${Ot};
|
|
66
66
|
text-transform: ${Ct};
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,Gt=i.css`
|
|
69
69
|
.ft-typography--caption {
|
|
70
70
|
font-family: ${Et.fontFamily};
|
|
71
71
|
font-size: ${Et.fontSize};
|
|
@@ -76,21 +76,21 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
76
76
|
}
|
|
77
77
|
`,qt=i.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
|
-
font-family: ${
|
|
80
|
-
font-size: ${
|
|
79
|
+
font-family: ${Dt};
|
|
80
|
+
font-size: ${Bt};
|
|
81
81
|
font-weight: ${It};
|
|
82
82
|
letter-spacing: ${jt};
|
|
83
|
-
line-height: ${
|
|
84
|
-
text-transform: ${
|
|
83
|
+
line-height: ${Nt};
|
|
84
|
+
text-transform: ${Ft};
|
|
85
85
|
}
|
|
86
86
|
`,Xt=i.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
88
|
font-family: ${At};
|
|
89
|
-
font-size: ${
|
|
90
|
-
font-weight: ${
|
|
91
|
-
letter-spacing: ${
|
|
92
|
-
line-height: ${
|
|
93
|
-
text-transform: ${
|
|
89
|
+
font-size: ${Tt};
|
|
90
|
+
font-weight: ${Zt};
|
|
91
|
+
letter-spacing: ${Rt};
|
|
92
|
+
line-height: ${Mt};
|
|
93
|
+
text-transform: ${_t};
|
|
94
94
|
}
|
|
95
95
|
`,Yt=i.css`
|
|
96
96
|
.ft-typography--button {
|
|
@@ -105,14 +105,14 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
105
105
|
.ft-typography {
|
|
106
106
|
vertical-align: inherit;
|
|
107
107
|
}
|
|
108
|
-
`;var Qt=function(t,e,i,o){for(var n
|
|
109
|
-
<${
|
|
108
|
+
`;var Qt=function(t,e,i,o){for(var s,n=arguments.length,l=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(l=(n<3?s(l):n>3?s(e,i,l):s(e,i))||l);return n>3&&l&&Object.defineProperty(e,i,l),l};class te extends e.FtLitElement{constructor(){super(...arguments),this.variant=V.body1}render(){return this.element?P`
|
|
109
|
+
<${W(this.element)}
|
|
110
110
|
class="ft-typography ft-typography--${this.variant}">
|
|
111
111
|
<slot></slot>
|
|
112
|
-
</${
|
|
112
|
+
</${W(this.element)}>
|
|
113
113
|
`:P`
|
|
114
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
115
|
-
`}}te.styles=[Ht,Wt,
|
|
115
|
+
`}}te.styles=[Ht,Kt,Wt,Lt,Pt,Vt,Gt,qt,Xt,Yt,Jt],Qt([o.property()],te.prototype,"element",void 0),Qt([o.property()],te.prototype,"variant",void 0),e.customElement("ft-typography")(te);const ee={fontSize:e.FtCssVariableFactory.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:e.FtCssVariableFactory.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:e.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:e.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:e.FtCssVariableFactory.extend("--ft-input-label-border-color",e.designSystemVariables.colorOutline),textColor:e.FtCssVariableFactory.extend("--ft-input-label-text-color",e.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:e.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color",e.designSystemVariables.colorOnSurfaceDisabled),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system")},ie=i.css`
|
|
116
116
|
.ft-input-label {
|
|
117
117
|
position: absolute;
|
|
118
118
|
inset: 0;
|
|
@@ -228,8 +228,8 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
228
228
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
229
229
|
border-top: none;
|
|
230
230
|
}
|
|
231
|
-
`;var oe=function(t,e,i,o){for(var n
|
|
232
|
-
<div class="${
|
|
231
|
+
`;var oe=function(t,e,i,o){for(var s,n=arguments.length,l=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(l=(n<3?s(l):n>3?s(e,i,l):s(e,i))||l);return n>3&&l&&Object.defineProperty(e,i,l),l};class se extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return i.html`
|
|
232
|
+
<div class="${l.classMap(t)}">
|
|
233
233
|
${this.text?i.html`
|
|
234
234
|
<div class="ft-input-label--text ft-typography--caption">
|
|
235
235
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
@@ -237,7 +237,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
237
237
|
</div>
|
|
238
238
|
`:null}
|
|
239
239
|
</div>
|
|
240
|
-
`}}
|
|
240
|
+
`}}se.elementDefinitions={},se.styles=[Gt,ie],oe([o.property({type:String})],se.prototype,"text",void 0),oe([o.property({type:Boolean})],se.prototype,"raised",void 0),oe([o.property({type:Boolean})],se.prototype,"outlined",void 0),oe([o.property({type:Boolean})],se.prototype,"disabled",void 0),oe([o.property({type:Boolean})],se.prototype,"error",void 0),e.customElement("ft-input-label")(se);const ne=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),le={color:ne,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",ne),opacityContentOnSurfacePressed:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},re=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),ae=re,pe=e.FtCssVariableFactory.extend("--ft-ripple-background-color",re),fe=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),de=fe,he=e.FtCssVariableFactory.extend("--ft-ripple-background-color",fe),ce=i.css`
|
|
241
241
|
:host {
|
|
242
242
|
display: contents;
|
|
243
243
|
}
|
|
@@ -259,11 +259,11 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
.ft-ripple .ft-ripple--background {
|
|
262
|
-
background-color: ${
|
|
262
|
+
background-color: ${le.backgroundColor};
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
.ft-ripple .ft-ripple--effect {
|
|
266
|
-
background-color: ${
|
|
266
|
+
background-color: ${le.color};
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
@@ -311,22 +311,22 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
314
|
-
opacity: ${
|
|
314
|
+
opacity: ${le.opacityContentOnSurfaceHover};
|
|
315
315
|
}
|
|
316
316
|
|
|
317
317
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
318
|
-
opacity: ${
|
|
318
|
+
opacity: ${le.opacityContentOnSurfaceSelected};
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
322
|
-
opacity: ${
|
|
322
|
+
opacity: ${le.opacityContentOnSurfaceFocused};
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
326
|
-
opacity: ${
|
|
326
|
+
opacity: ${le.opacityContentOnSurfacePressed};
|
|
327
327
|
transform: translate(-50%, -50%) scale(1);
|
|
328
328
|
}
|
|
329
|
-
`;var ue,xe,
|
|
329
|
+
`;var ue,xe,ge=function(t,e,i,o){for(var s,n=arguments.length,l=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(l=(n<3?s(l):n>3?s(e,i,l):s(e,i))||l);return n>3&&l&&Object.defineProperty(e,i,l),l};class be extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),n=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return i.html`
|
|
330
330
|
<style>
|
|
331
331
|
.ft-ripple .ft-ripple--effect,
|
|
332
332
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -339,23 +339,23 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
339
339
|
top: ${this.originY}px;
|
|
340
340
|
}
|
|
341
341
|
</style>
|
|
342
|
-
<div class="${
|
|
342
|
+
<div class="${l.classMap(t)}">
|
|
343
343
|
<div class="ft-ripple--background"></div>
|
|
344
344
|
<div class="ft-ripple--effect"></div>
|
|
345
345
|
</div>
|
|
346
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}ve.elementDefinitions={},ve.styles=ce,be([o.property({type:Boolean})],ve.prototype,"primary",void 0),be([o.property({type:Boolean})],ve.prototype,"secondary",void 0),be([o.property({type:Boolean})],ve.prototype,"unbounded",void 0),be([o.property({type:Boolean})],ve.prototype,"activated",void 0),be([o.property({type:Boolean})],ve.prototype,"selected",void 0),be([o.property({type:Boolean})],ve.prototype,"disabled",void 0),be([o.state()],ve.prototype,"hovered",void 0),be([o.state()],ve.prototype,"focused",void 0),be([o.state()],ve.prototype,"pressed",void 0),be([o.state()],ve.prototype,"rippling",void 0),be([o.state()],ve.prototype,"rippleSize",void 0),be([o.state()],ve.prototype,"originX",void 0),be([o.state()],ve.prototype,"originY",void 0),be([o.query(".ft-ripple")],ve.prototype,"ripple",void 0),be([o.query(".ft-ripple--effect")],ve.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(ve),function(t){t.DESKTOP="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",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="",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=""}(ue||(ue={})),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=""}(xe||(xe={})),new Map([...["abw"].map((t=>[t,xe.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,xe.AUDIO])),...["avi"].map((t=>[t,xe.AVI])),...["chm","xhs"].map((t=>[t,xe.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,xe.CODE])),...["csv"].map((t=>[t,xe.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,xe.DITA])),...["epub"].map((t=>[t,xe.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,xe.EXCEL])),...["flac"].map((t=>[t,xe.FLAC])),...["gif"].map((t=>[t,xe.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,xe.GZIP])),...["html","htm","xhtml"].map((t=>[t,xe.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,xe.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,xe.JPEG])),...["json"].map((t=>[t,xe.JSON])),...["m4a","m4p"].map((t=>[t,xe.M4A])),...["mov","qt"].map((t=>[t,xe.MOV])),...["mp3"].map((t=>[t,xe.MP3])),...["mp4","m4v"].map((t=>[t,xe.MP4])),...["ogg","oga"].map((t=>[t,xe.OGG])),...["pdf","ps"].map((t=>[t,xe.PDF])),...["png"].map((t=>[t,xe.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,xe.POWERPOINT])),...["rar"].map((t=>[t,xe.RAR])),...["stp"].map((t=>[t,xe.STP])),...["txt","rtf","md","mdown"].map((t=>[t,xe.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,xe.VIDEO])),...["wav"].map((t=>[t,xe.WAV])),...["wma"].map((t=>[t,xe.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,xe.WORD])),...["xml","xsl","rdf"].map((t=>[t,xe.XML])),...["yaml","yml","x-yaml"].map((t=>[t,xe.YAML])),...["zip"].map((t=>[t,xe.ZIP]))]);const ge={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")},ye=i.css`
|
|
346
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}be.elementDefinitions={},be.styles=ce,ge([o.property({type:Boolean})],be.prototype,"primary",void 0),ge([o.property({type:Boolean})],be.prototype,"secondary",void 0),ge([o.property({type:Boolean})],be.prototype,"unbounded",void 0),ge([o.property({type:Boolean})],be.prototype,"activated",void 0),ge([o.property({type:Boolean})],be.prototype,"selected",void 0),ge([o.property({type:Boolean})],be.prototype,"disabled",void 0),ge([o.state()],be.prototype,"hovered",void 0),ge([o.state()],be.prototype,"focused",void 0),ge([o.state()],be.prototype,"pressed",void 0),ge([o.state()],be.prototype,"rippling",void 0),ge([o.state()],be.prototype,"rippleSize",void 0),ge([o.state()],be.prototype,"originX",void 0),ge([o.state()],be.prototype,"originY",void 0),ge([o.query(".ft-ripple")],be.prototype,"ripple",void 0),ge([o.query(".ft-ripple--effect")],be.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(be),function(t){t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",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="",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=""}(ue||(ue={})),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=""}(xe||(xe={})),new Map([...["abw"].map((t=>[t,xe.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,xe.AUDIO])),...["avi"].map((t=>[t,xe.AVI])),...["chm","xhs"].map((t=>[t,xe.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,xe.CODE])),...["csv"].map((t=>[t,xe.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,xe.DITA])),...["epub"].map((t=>[t,xe.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,xe.EXCEL])),...["flac"].map((t=>[t,xe.FLAC])),...["gif"].map((t=>[t,xe.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,xe.GZIP])),...["html","htm","xhtml"].map((t=>[t,xe.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,xe.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,xe.JPEG])),...["json"].map((t=>[t,xe.JSON])),...["m4a","m4p"].map((t=>[t,xe.M4A])),...["mov","qt"].map((t=>[t,xe.MOV])),...["mp3"].map((t=>[t,xe.MP3])),...["mp4","m4v"].map((t=>[t,xe.MP4])),...["ogg","oga"].map((t=>[t,xe.OGG])),...["pdf","ps"].map((t=>[t,xe.PDF])),...["png"].map((t=>[t,xe.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,xe.POWERPOINT])),...["rar"].map((t=>[t,xe.RAR])),...["stp"].map((t=>[t,xe.STP])),...["txt","rtf","md","mdown"].map((t=>[t,xe.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,xe.VIDEO])),...["wav"].map((t=>[t,xe.WAV])),...["wma"].map((t=>[t,xe.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,xe.WORD])),...["xml","xsl","rdf"].map((t=>[t,xe.XML])),...["yaml","yml","x-yaml"].map((t=>[t,xe.YAML])),...["zip"].map((t=>[t,xe.ZIP]))]);const ve={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")},ye=i.css`
|
|
347
347
|
:host {
|
|
348
348
|
display: inline-block;
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
:host, i.ft-icon {
|
|
352
|
-
width: ${
|
|
353
|
-
height: ${
|
|
352
|
+
width: ${ve.size};
|
|
353
|
+
height: ${ve.size};
|
|
354
354
|
text-align: center;
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
i.ft-icon {
|
|
358
|
-
font-size: ${
|
|
358
|
+
font-size: ${ve.size};
|
|
359
359
|
line-height: 1;
|
|
360
360
|
font-weight: normal;
|
|
361
361
|
text-transform: none;
|
|
@@ -366,23 +366,23 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)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: ${
|
|
369
|
+
vertical-align: ${ve.verticalAlign};
|
|
370
370
|
}
|
|
371
371
|
|
|
372
372
|
.ft-icon--fluid-topics {
|
|
373
|
-
font-family: ${
|
|
373
|
+
font-family: ${ve.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
.ft-icon--file-format {
|
|
377
|
-
font-family: ${
|
|
377
|
+
font-family: ${ve.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
378
378
|
}
|
|
379
379
|
|
|
380
380
|
.ft-icon--material {
|
|
381
|
-
font-family: ${
|
|
381
|
+
font-family: ${ve.materialFontFamily}, "Material Icons", sans-serif;
|
|
382
382
|
}
|
|
383
|
-
`;var me;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(me||(me={}));var $e=function(t,e,i,o){for(var n
|
|
383
|
+
`;var me;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(me||(me={}));var $e=function(t,e,i,o){for(var s,n=arguments.length,l=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(l=(n<3?s(l):n>3?s(e,i,l):s(e,i))||l);return n>3&&l&&Object.defineProperty(e,i,l),l};class we extends e.FtLitElement{constructor(){super(...arguments),this.variant=me.fluid_topics,this.resolvedIcon=i.nothing}render(){const t="material"!==this.variant||this.value;return i.html`
|
|
384
384
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
385
|
-
${
|
|
385
|
+
${n.unsafeHTML(this.resolvedIcon)}
|
|
386
386
|
<slot ?hidden=${t}></slot>
|
|
387
387
|
</i>
|
|
388
388
|
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case me.file_format:this.resolvedIcon=null!==(t=xe[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case me.fluid_topics:this.resolvedIcon=null!==(e=ue[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o;break;default:this.resolvedIcon=this.value||i.nothing}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}we.elementDefinitions={},we.styles=ye,$e([o.property()],we.prototype,"variant",void 0),$e([o.property()],we.prototype,"value",void 0),$e([o.state()],we.prototype,"resolvedIcon",void 0),$e([o.query("slot")],we.prototype,"slottedContent",void 0),e.customElement("ft-icon")(we);const ke={labelSize:e.FtCssVariableFactory.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:e.FtCssVariableFactory.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:e.FtCssVariableFactory.create("--ft-select-vertical-spacing","SIZE","4px"),optionsHeight:e.FtCssVariableFactory.create("--ft-select-options-height","SIZE","unset"),selectedOptionColor:e.FtCssVariableFactory.extend("--ft-select-selected-option-color",e.designSystemVariables.colorOnSurface),helperColor:e.FtCssVariableFactory.extend("--ft-select-helper-color",e.designSystemVariables.colorOnSurfaceMedium),optionsColor:e.FtCssVariableFactory.extend("--ft-select-options-color",e.designSystemVariables.colorOnSurface),optionsZIndex:e.FtCssVariableFactory.create("--ft-select-options-z-index","NUMBER","3"),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),elevation02:e.FtCssVariableFactory.external(e.designSystemVariables.elevation02,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system")},Se=i.css`
|
|
@@ -412,13 +412,13 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
412
412
|
padding-right: 8px;
|
|
413
413
|
gap: 8px;
|
|
414
414
|
color: ${ke.selectedOptionColor};
|
|
415
|
-
${e.setVariable(
|
|
415
|
+
${e.setVariable(le.color,ke.selectedOptionColor)};
|
|
416
416
|
}
|
|
417
417
|
|
|
418
418
|
.ft-select--input-panel,
|
|
419
419
|
.ft-select--option {
|
|
420
|
-
${e.setVariable(
|
|
421
|
-
${e.setVariable(
|
|
420
|
+
${e.setVariable(le.opacityContentOnSurfaceHover,"0.08")};
|
|
421
|
+
${e.setVariable(le.opacityContentOnSurfacePressed,"0.04")};
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
.ft-select--input-panel > *:not(ft-ripple),
|
|
@@ -532,8 +532,8 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
532
532
|
.ft-select--in-error .ft-select--helper-text {
|
|
533
533
|
color: ${ke.colorError};
|
|
534
534
|
}
|
|
535
|
-
`;var ze=function(t,e,i,o){for(var n
|
|
536
|
-
<div class="${
|
|
535
|
+
`;var ze=function(t,e,i,o){for(var s,n=arguments.length,l=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(l=(n<3?s(l):n>3?s(e,i,l):s(e,i))||l);return n>3&&l&&Object.defineProperty(e,i,l),l};class Oe extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return i.html``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Oe.elementDefinitions={},ze([o.property({type:String})],Oe.prototype,"label",void 0),ze([o.property({type:Object,converter:t=>t})],Oe.prototype,"value",void 0),ze([o.property({type:Boolean,reflect:!0})],Oe.prototype,"selected",void 0);class Ce extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,o,n,r;let a=this.hasOptionsMenuOpen,p=this.disabled||!this.hasOptions;const f=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(o=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==o?o:"").length>0,d={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":p,"ft-select--options-displayed":a,"ft-select--has-option-selected":f,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return i.html`
|
|
536
|
+
<div class="${l.classMap(d)}" part="container">
|
|
537
537
|
<div class="ft-select--main-panel" part="main-panel">
|
|
538
538
|
<ft-input-label text="${this.label}"
|
|
539
539
|
part="label"
|
|
@@ -552,7 +552,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
552
552
|
aria-expanded="${a}">
|
|
553
553
|
<ft-ripple ?disabled=${p} ?activated=${!this.outlined}></ft-ripple>
|
|
554
554
|
<ft-typography variant="body1" class="ft-select--selected-option">
|
|
555
|
-
${null!==(r=null===(
|
|
555
|
+
${null!==(r=null===(n=this.selectedOption)||void 0===n?void 0:n.label)&&void 0!==r?r:""}
|
|
556
556
|
</ft-typography>
|
|
557
557
|
<ft-icon variant="material">${a?"expand_less":"expand_more"}</ft-icon>
|
|
558
558
|
</div>
|
|
@@ -560,7 +560,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
560
560
|
part="options"
|
|
561
561
|
@keydown=${this.onOptionsKeyDown}
|
|
562
562
|
innerrole="listbox">
|
|
563
|
-
${
|
|
563
|
+
${s.repeat(this.options,(t=>t.value),(t=>this.renderOption(t)))}
|
|
564
564
|
</div>
|
|
565
565
|
</div>
|
|
566
566
|
${this.helper?i.html`
|
|
@@ -571,7 +571,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
571
571
|
@option-change=${this.updateOptionsFromSlot}
|
|
572
572
|
></slot>
|
|
573
573
|
`}renderOption(t){let e=this.selectedOption===t;const o={"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0};return i.html`
|
|
574
|
-
<div class="${
|
|
574
|
+
<div class="${l.classMap(o)}"
|
|
575
575
|
part="option"
|
|
576
576
|
tabindex="0"
|
|
577
577
|
data-value="${t.value}"
|
|
@@ -580,7 +580,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
580
580
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
581
581
|
<span>${t.label}</span>
|
|
582
582
|
</div>
|
|
583
|
-
`}updated(t){super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,n
|
|
583
|
+
`}updated(t){super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,n;let l;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),l=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),l=null!==(n=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstOption}null==l||l.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){var i,o;if(!e.deepEqual(null===(i=this.selectedOption)||void 0===i?void 0:i.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(o=this.selectedOption)||void 0===o?void 0:o.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Ce.elementDefinitions={"ft-input-label":se,"ft-typography":te,"ft-ripple":be,"ft-icon":we},Ce.styles=[Vt,Gt,Se],ze([o.property({type:String})],Ce.prototype,"label",void 0),ze([o.property({type:String})],Ce.prototype,"helper",void 0),ze([o.property({type:Boolean})],Ce.prototype,"outlined",void 0),ze([o.property({type:Boolean})],Ce.prototype,"disabled",void 0),ze([o.property({type:Boolean})],Ce.prototype,"error",void 0),ze([o.property({type:Boolean})],Ce.prototype,"fixedMenuPosition",void 0),ze([o.property({type:Array})],Ce.prototype,"options",void 0),ze([o.state()],Ce.prototype,"selectedOption",void 0),ze([o.state()],Ce.prototype,"optionsDisplayed",void 0),ze([o.state()],Ce.prototype,"focusOptions",void 0),ze([o.query(".ft-select")],Ce.prototype,"container",void 0),ze([o.query(".ft-select--options")],Ce.prototype,"optionsMenu",void 0),ze([o.query(".ft-select--input-panel")],Ce.prototype,"mainPanel",void 0),ze([o.query(".ft-select--option:first-child")],Ce.prototype,"firstOption",void 0),ze([o.query(".ft-select--option:focus")],Ce.prototype,"focusedOption",void 0),ze([o.query(".ft-select--option.ft-select--option-selected")],Ce.prototype,"selectedOptionElement",void 0),ze([o.query(".ft-select--option:last-child")],Ce.prototype,"lastOption",void 0),ze([o.query("slot")],Ce.prototype,"optionsSlot",void 0),e.customElement("ft-select")(Ce),e.customElement("ft-select-option")(Oe);const Ee={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SIZE","14px"),labelSize:e.FtCssVariableFactory.create("--ft-text-field-label-size","SIZE","11px"),verticalSpacing:e.FtCssVariableFactory.create("--ft-text-field-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-text-field-horizontal-spacing","SIZE","16px"),helperColor:e.FtCssVariableFactory.extend("--ft-text-field-helper-color",e.designSystemVariables.colorOnSurfaceMedium),colorPrimary:e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system"),prefixColor:e.FtCssVariableFactory.extend("--ft-text-field-prefix-color",e.designSystemVariables.colorOnSurfaceMedium),iconColor:e.FtCssVariableFactory.extend("--ft-text-field-icon-color",e.designSystemVariables.colorOnSurfaceMedium),floatingZIndex:e.FtCssVariableFactory.create("--ft-text-field-floating-components-z-index","NUMBER","3"),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),colorOutline:e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),elevation02:e.FtCssVariableFactory.external(e.designSystemVariables.elevation02,"Design system"),suggestSize:e.FtCssVariableFactory.create("--ft-text-field-suggest-size","SIZE","300px")},De=i.css`
|
|
584
584
|
*:focus {
|
|
585
585
|
outline: none;
|
|
586
586
|
}
|
|
@@ -589,6 +589,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
589
589
|
display: flex;
|
|
590
590
|
flex-direction: column;
|
|
591
591
|
align-items: stretch;
|
|
592
|
+
position: relative;
|
|
592
593
|
}
|
|
593
594
|
|
|
594
595
|
ft-input-label {
|
|
@@ -610,38 +611,33 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
610
611
|
display: flex;
|
|
611
612
|
align-items: center;
|
|
612
613
|
overflow: hidden;
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
.ft-text-field--input-panel ft-ripple {
|
|
616
|
-
${e.setVariable(se.opacityContentOnSurfaceHover,"0.08")};
|
|
617
|
-
${e.setVariable(se.opacityContentOnSurfacePressed,"0.04")};
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
.ft-text-field--input-wrapper {
|
|
621
|
-
flex-grow: 1;
|
|
622
|
-
flex-shrink: 1;
|
|
623
|
-
|
|
624
|
-
display: flex;
|
|
625
|
-
align-items: center;
|
|
614
|
+
padding: 0 ${Ee.horizontalSpacing};
|
|
626
615
|
|
|
627
616
|
${e.setVariable($t.fontSize,Ee.fontSize)};
|
|
628
617
|
${e.setVariable($t.lineHeight,Ee.fontSize)};
|
|
618
|
+
}
|
|
629
619
|
|
|
630
|
-
|
|
620
|
+
.ft-text-field--input-panel ft-ripple {
|
|
621
|
+
${e.setVariable(le.opacityContentOnSurfaceHover,"0.08")};
|
|
622
|
+
${e.setVariable(le.opacityContentOnSurfacePressed,"0.04")};
|
|
631
623
|
}
|
|
632
624
|
|
|
633
|
-
.ft-text-field--filled
|
|
625
|
+
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input-panel {
|
|
634
626
|
align-items: flex-end;
|
|
635
627
|
padding: 0 ${Ee.horizontalSpacing} ${Ee.verticalSpacing} ${Ee.horizontalSpacing};
|
|
636
628
|
}
|
|
637
629
|
|
|
638
630
|
.ft-text-field--prefix {
|
|
639
|
-
|
|
640
|
-
|
|
631
|
+
color: ${Ee.prefixColor};
|
|
632
|
+
margin-right: 2px;
|
|
633
|
+
flex-shrink: 1;
|
|
634
|
+
overflow: hidden;
|
|
635
|
+
white-space: nowrap;
|
|
636
|
+
text-overflow: ellipsis;
|
|
641
637
|
}
|
|
642
638
|
|
|
643
|
-
.ft-text-field--with-
|
|
644
|
-
display:
|
|
639
|
+
.ft-text-field--with-label:not(.ft-text-field--raised-label) .ft-text-field--prefix {
|
|
640
|
+
display: none;
|
|
645
641
|
}
|
|
646
642
|
|
|
647
643
|
.ft-text-field--input {
|
|
@@ -657,7 +653,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
657
653
|
background: none;
|
|
658
654
|
}
|
|
659
655
|
|
|
660
|
-
.ft-text-field--filled
|
|
656
|
+
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input {
|
|
661
657
|
padding-bottom: 0;
|
|
662
658
|
padding-top: calc(${Ee.labelSize} + 2 * ${Ee.verticalSpacing});
|
|
663
659
|
}
|
|
@@ -671,10 +667,6 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
671
667
|
color: ${Ee.colorOnSurfaceDisabled};
|
|
672
668
|
}
|
|
673
669
|
|
|
674
|
-
.ft-text-field:not(.ft-text-field--disabled) .ft-text-field--input-panel {
|
|
675
|
-
cursor: pointer;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
670
|
.ft-text-field:not(.ft-text-field--disabled):focus-within ft-input-label {
|
|
679
671
|
${e.setVariable(ee.borderColor,Ee.colorPrimary)};
|
|
680
672
|
${e.setVariable(ee.textColor,Ee.colorPrimary)};
|
|
@@ -700,45 +692,121 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
700
692
|
}
|
|
701
693
|
|
|
702
694
|
.ft-text-field--icon {
|
|
703
|
-
|
|
695
|
+
align-self: center;
|
|
696
|
+
margin-left: 8px;
|
|
704
697
|
color: ${Ee.iconColor};
|
|
705
698
|
}
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
699
|
+
|
|
700
|
+
.ft-text-field--container {
|
|
701
|
+
position: relative;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.ft-text-field--suggestions {
|
|
705
|
+
display: none;
|
|
706
|
+
flex-direction: column;
|
|
707
|
+
position: absolute;
|
|
708
|
+
left: 0;
|
|
709
|
+
right: 0;
|
|
710
|
+
z-index: ${Ee.floatingZIndex};
|
|
711
|
+
background: ${Ee.colorSurface};
|
|
712
|
+
border: 1px solid ${Ee.colorOutline};
|
|
713
|
+
border-radius: 0 0 ${Ee.borderRadiusS} ${Ee.borderRadiusS};
|
|
714
|
+
box-shadow: ${Ee.elevation02};
|
|
715
|
+
outline: none;
|
|
716
|
+
max-height: ${Ee.suggestSize};
|
|
717
|
+
overflow-y: auto;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
.ft-text-field--suggestions:not(.ft-text-field--suggestions-on-top) {
|
|
721
|
+
top: 100%;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
.ft-text-field--suggestions.ft-text-field--suggestions-on-top {
|
|
725
|
+
bottom: 100%;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
.ft-text-field--suggestions-displayed .ft-text-field--suggestions {
|
|
729
|
+
display: flex;
|
|
730
|
+
}
|
|
731
|
+
`;var Be=function(t,e,i,o){for(var s,n=arguments.length,l=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(l=(n<3?s(l):n>3?s(e,i,l):s(e,i))||l);return n>3&&l&&Object.defineProperty(e,i,l),l};class Ie extends e.FtLitElement{constructor(){super(...arguments),this.value="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.filterSuggestions=!1,this.focused=!1,this.suggestionsOnTop=!1,this.displaySuggestions=!1,this.visibleSuggestions=0}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":this.error,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--suggestions-displayed":this.visibleSuggestions>0&&this.displaySuggestions,"ft-text-field--raised-label":this.focused||""!=this.value};return i.html`
|
|
732
|
+
<div class="${l.classMap(t)}">
|
|
733
|
+
<div class="ft-text-field--main-panel"
|
|
734
|
+
@keydown=${this.handleKeyboardNavigation}
|
|
735
|
+
@focusout=${this.onFocusOut}>
|
|
709
736
|
<ft-input-label text="${this.label}"
|
|
710
737
|
?disabled=${this.disabled}
|
|
711
738
|
?outlined=${this.outlined}
|
|
712
739
|
?raised=${this.focused||""!=this.value}
|
|
713
|
-
?error=${this.error}
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
aria-label="${this.label}">
|
|
717
|
-
${this.outlined?null:i.html`
|
|
740
|
+
?error=${this.error}></ft-input-label>
|
|
741
|
+
<div class="ft-text-field--input-panel">
|
|
742
|
+
${this.outlined?i.nothing:i.html`
|
|
718
743
|
<ft-ripple ?disabled=${this.disabled} activated></ft-ripple>
|
|
719
744
|
`}
|
|
720
|
-
<
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
@focusout=${()=>this.focused=!1}
|
|
730
|
-
/>
|
|
731
|
-
</div>
|
|
745
|
+
<ft-typography class="ft-text-field--prefix" vaiant="body1">${this.prefix}</ft-typography>
|
|
746
|
+
<input type="text"
|
|
747
|
+
aria-label="${this.label}"
|
|
748
|
+
class="ft-typography--body1 ft-text-field--input"
|
|
749
|
+
?disabled=${this.disabled}
|
|
750
|
+
.value=${this.value}
|
|
751
|
+
@change=${this.updateValueFromInputField}
|
|
752
|
+
@keyup=${this.handleInput}
|
|
753
|
+
@focus=${this.onFocus}/>
|
|
732
754
|
${this.icon?i.html`
|
|
733
|
-
<ft-icon class="ft-text-field--icon"
|
|
734
|
-
|
|
755
|
+
<ft-icon class="ft-text-field--icon"
|
|
756
|
+
.variant=${this.iconVariant}
|
|
757
|
+
.value=${this.icon}
|
|
758
|
+
@click=${()=>{var t;return null===(t=this.input)||void 0===t?void 0:t.focus()}}></ft-icon>
|
|
759
|
+
`:i.nothing}
|
|
760
|
+
</div>
|
|
761
|
+
<div class="ft-text-field--suggestions ${this.suggestionsOnTop?"ft-text-field--suggestions-on-top":""}"
|
|
762
|
+
@suggestion-selected=${this.onSuggestionSelected}>
|
|
763
|
+
<slot @slotchange=${()=>this.filterSuggestionsIfNeeded()}></slot>
|
|
735
764
|
</div>
|
|
736
765
|
</div>
|
|
737
766
|
${this.helper?i.html`
|
|
738
|
-
<ft-typography class="ft-text-field--helper-text" variant="caption"
|
|
739
|
-
|
|
767
|
+
<ft-typography class="ft-text-field--helper-text" variant="caption">
|
|
768
|
+
${this.helper}
|
|
769
|
+
</ft-typography>
|
|
770
|
+
`:i.nothing}
|
|
771
|
+
</div>
|
|
772
|
+
`}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded()}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden)).length):this.visibleSuggestions=this.suggestions.length}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),this.suggestions.length&&t.has("suggestionsDisplayed")&&this.displaySuggestions){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),o=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&o&&(this.suggestionsOnTop=t.bottom+o.height>window.innerHeight&&t.top-o.height>0)}}updateValueFromInputField(){var t;this.setValue((null===(t=this.input)||void 0===t?void 0:t.value)||"",!0),this.displaySuggestions=!1}handleInput(){var t;const e=(null===(t=this.input)||void 0===t?void 0:t.value)||"";this.value!==e&&(this.value=e,this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})))}setValue(t,e){this.value=t,e&&this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}handleKeyboardNavigation(t){var e;if(this.suggestions.length&&("ArrowDown"===t.key||"ArrowUp"===t.key)){t.preventDefault(),t.stopPropagation(),this.displaySuggestions=!0;const i=this.suggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.suggestions.length-1?i+1:0:i>0?i-1:this.suggestions.length-1,null===(e=this.suggestions[o])||void 0===e||e.focus()}}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.displaySuggestions=!1),0)}onFocus(){this.focused=!0,this.displaySuggestions=!0}onFocusOut(){this.focused=!1,setTimeout((()=>{var t,e;return this.displaySuggestions=this.focused||null!==(e=null===(t=this.suggestionsContainer)||void 0===t?void 0:t.matches(":focus-within"))&&void 0!==e&&e}),0)}}Ie.elementDefinitions={"ft-input-label":se,"ft-ripple":be,"ft-typography":te,"ft-icon":we},Ie.styles=[Pt,De],Be([o.property()],Ie.prototype,"label",void 0),Be([o.property()],Ie.prototype,"value",void 0),Be([o.property()],Ie.prototype,"helper",void 0),Be([o.property({type:Boolean})],Ie.prototype,"outlined",void 0),Be([o.property({type:Boolean})],Ie.prototype,"disabled",void 0),Be([o.property({type:Boolean})],Ie.prototype,"error",void 0),Be([o.property()],Ie.prototype,"prefix",void 0),Be([o.property()],Ie.prototype,"icon",void 0),Be([o.property()],Ie.prototype,"iconVariant",void 0),Be([o.property({type:Boolean})],Ie.prototype,"filterSuggestions",void 0),Be([o.state()],Ie.prototype,"focused",void 0),Be([o.state()],Ie.prototype,"suggestionsOnTop",void 0),Be([o.state()],Ie.prototype,"displaySuggestions",void 0),Be([o.state()],Ie.prototype,"visibleSuggestions",void 0),Be([o.query(".ft-text-field--input")],Ie.prototype,"input",void 0),Be([o.query(".ft-text-field--suggestions")],Ie.prototype,"suggestionsContainer",void 0),Be([o.queryAssignedElements({selector:"ft-text-field-suggestion"})],Ie.prototype,"suggestions",void 0);const je=i.css`
|
|
773
|
+
.ft-text-field-suggestion {
|
|
774
|
+
position: relative;
|
|
775
|
+
padding: 8px 16px;
|
|
776
|
+
cursor: pointer;
|
|
777
|
+
min-height: 44px;
|
|
778
|
+
box-sizing: border-box;
|
|
779
|
+
outline: none;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
.ft-text-field-suggestion,
|
|
783
|
+
.ft-text-field-suggestion--label {
|
|
784
|
+
display: flex;
|
|
785
|
+
align-items: center;
|
|
786
|
+
gap: 8px;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
.ft-text-field-suggestion--label {
|
|
790
|
+
flex-grow: 1;
|
|
791
|
+
flex-shrink: 1;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
slot {
|
|
795
|
+
pointer-events: none;
|
|
796
|
+
}
|
|
797
|
+
`;var Ne=function(t,e,i,o){for(var s,n=arguments.length,l=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(l=(n<3?s(l):n>3?s(e,i,l):s(e,i))||l);return n>3&&l&&Object.defineProperty(e,i,l),l};class Fe extends CustomEvent{constructor(t){super("suggestion-selected",{detail:t,bubbles:!0,composed:!0})}}class Ae extends e.FtLitElement{render(){return i.html`
|
|
798
|
+
<div class="ft-text-field-suggestion"
|
|
799
|
+
tabindex="-1"
|
|
800
|
+
@keydown=${this.onKeyDown}
|
|
801
|
+
@click=${this.confirmSuggestion}>
|
|
802
|
+
<ft-ripple></ft-ripple>
|
|
803
|
+
<ft-typography part="label"
|
|
804
|
+
variant="body1"
|
|
805
|
+
class="ft-text-field-suggestion--label">
|
|
806
|
+
<slot></slot>
|
|
807
|
+
</ft-typography>
|
|
740
808
|
</div>
|
|
741
|
-
`}
|
|
809
|
+
`}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new Fe(this.getValue()))}getValue(){return this.value||this.textContent}get textContent(){return this.assignedNodes.map((t=>t.textContent)).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}}Ae.elementDefinitions={"ft-ripple":be,"ft-typography":te,"ft-icon":we},Ae.styles=je,Ne([o.property()],Ae.prototype,"value",void 0),Ne([o.query(".ft-text-field-suggestion")],Ae.prototype,"container",void 0),Ne([o.queryAssignedNodes()],Ae.prototype,"assignedNodes",void 0),e.customElement("ft-text-field")(Ie),e.customElement("ft-text-field-suggestion")(Ae);const Te=e.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),Ze=e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),Re=e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),Me=e.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),_e=e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),Ue=e.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),He=i.css`
|
|
742
810
|
.ft-tooltip--container {
|
|
743
811
|
display: block;
|
|
744
812
|
position: relative;
|
|
@@ -754,23 +822,23 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
754
822
|
box-sizing: border-box;
|
|
755
823
|
overflow: hidden;
|
|
756
824
|
width: max-content;
|
|
757
|
-
max-width: ${
|
|
825
|
+
max-width: ${Ue};
|
|
758
826
|
text-align: center;
|
|
759
|
-
padding: ${
|
|
760
|
-
z-index: ${
|
|
827
|
+
padding: ${Te};
|
|
828
|
+
z-index: ${Me};
|
|
761
829
|
}
|
|
762
830
|
|
|
763
831
|
.ft-tooltip--content {
|
|
764
832
|
padding: 4px 8px;
|
|
765
|
-
border-radius: ${
|
|
766
|
-
background-color: ${
|
|
767
|
-
color: ${
|
|
833
|
+
border-radius: ${_e};
|
|
834
|
+
background-color: ${Re};
|
|
835
|
+
color: ${Ze};
|
|
768
836
|
top: -500px;
|
|
769
837
|
left: -500px;
|
|
770
838
|
position: relative;
|
|
771
839
|
word-break: break-word;
|
|
772
840
|
}
|
|
773
|
-
`;var
|
|
841
|
+
`;var Ke=function(t,e,i,o){for(var s,n=arguments.length,l=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(l=(n<3?s(l):n>3?s(e,i,l):s(e,i))||l);return n>3&&l&&Object.defineProperty(e,i,l),l};class We extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new e.Debouncer,this.revealDebouncer=new e.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return i.html`
|
|
774
842
|
<div part="container"
|
|
775
843
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
776
844
|
@mouseenter=${this.onHover}
|
|
@@ -788,7 +856,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
788
856
|
</div>
|
|
789
857
|
</div>
|
|
790
858
|
</div>
|
|
791
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&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.validPosition){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
|
|
859
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&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.validPosition){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 s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=e.height,s=o;break;case"left":n=i,s=-this.tooltip.clientWidth;break;case"right":n=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const l=this.tooltip.style;l.left=s+"px",l.top=n+"px",l.maxWidth=`max(${e.width}px, ${Ue})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}We.elementDefinitions={"ft-typography":te},We.styles=He,Ke([o.property()],We.prototype,"text",void 0),Ke([o.property({type:Boolean})],We.prototype,"manual",void 0),Ke([o.property({type:Boolean})],We.prototype,"inline",void 0),Ke([o.property({type:Number})],We.prototype,"delay",void 0),Ke([o.property()],We.prototype,"position",void 0),Ke([o.queryAssignedNodes("",!0)],We.prototype,"slotNodes",void 0),Ke([o.query(".ft-tooltip--container")],We.prototype,"container",void 0),Ke([o.query("slot")],We.prototype,"target",void 0),Ke([o.query(".ft-tooltip")],We.prototype,"tooltip",void 0),Ke([o.query(".ft-tooltip--content")],We.prototype,"tooltipContent",void 0),Ke([o.state()],We.prototype,"visible",void 0),e.customElement("ft-tooltip")(We);const Le={color:e.FtCssVariableFactory.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Pe=i.css`
|
|
792
860
|
:host {
|
|
793
861
|
line-height: 0;
|
|
794
862
|
}
|
|
@@ -797,8 +865,8 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
797
865
|
display: inline-block;
|
|
798
866
|
position: relative;
|
|
799
867
|
|
|
800
|
-
width: ${
|
|
801
|
-
height: ${
|
|
868
|
+
width: ${Le.size};
|
|
869
|
+
height: ${Le.size};
|
|
802
870
|
}
|
|
803
871
|
|
|
804
872
|
.ft-loader div {
|
|
@@ -807,7 +875,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
807
875
|
width: 25%;
|
|
808
876
|
height: 25%;
|
|
809
877
|
border-radius: 50%;
|
|
810
|
-
background: ${
|
|
878
|
+
background: ${Le.color};
|
|
811
879
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
812
880
|
}
|
|
813
881
|
|
|
@@ -854,17 +922,17 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
854
922
|
transform: translate(0, 0);
|
|
855
923
|
}
|
|
856
924
|
100% {
|
|
857
|
-
transform: translate(calc(0.35 * ${
|
|
925
|
+
transform: translate(calc(0.35 * ${Le.size}), 0);
|
|
858
926
|
}
|
|
859
927
|
}
|
|
860
|
-
`;class
|
|
928
|
+
`;class Ve extends e.FtLitElement{render(){return i.html`
|
|
861
929
|
<div class="ft-loader">
|
|
862
930
|
<div></div>
|
|
863
931
|
<div></div>
|
|
864
932
|
<div></div>
|
|
865
933
|
<div></div>
|
|
866
934
|
</div>
|
|
867
|
-
`}}
|
|
935
|
+
`}}Ve.styles=Pe,e.customElement("ft-loader")(Ve);const Ge=e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorPrimary),qe={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorSurface),borderRadius:e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusL),color:Ge,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",Ge),opacityDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},Xe=e.FtCssVariableFactory.extend("--ft-button-primary-color",e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorOnPrimary)),Ye={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-primary-background-color",e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorPrimary)),color:Xe,rippleColor:e.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Xe)},Je=e.FtCssVariableFactory.extend("--ft-button-dense-border-radius",e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusM)),Qe=[e.noTextSelect,i.css`
|
|
868
936
|
:host {
|
|
869
937
|
display: inline-block;
|
|
870
938
|
max-width: 100%;
|
|
@@ -875,7 +943,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
875
943
|
box-shadow: 0px 0px 0px transparent;
|
|
876
944
|
border: 0px solid transparent;
|
|
877
945
|
text-shadow: 0px 0px 0px transparent;
|
|
878
|
-
font-size: ${
|
|
946
|
+
font-size: ${qe.fontSize};
|
|
879
947
|
}
|
|
880
948
|
|
|
881
949
|
button:hover {
|
|
@@ -904,17 +972,17 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
904
972
|
border: none;
|
|
905
973
|
pointer-events: auto;
|
|
906
974
|
|
|
907
|
-
--ft-button-internal-line-height: calc(${
|
|
908
|
-
--ft-button-internal-color: ${
|
|
909
|
-
${e.setVariable(
|
|
975
|
+
--ft-button-internal-line-height: calc(${qe.fontSize} + 2px);
|
|
976
|
+
--ft-button-internal-color: ${qe.color};
|
|
977
|
+
${e.setVariable(ve.size,qe.iconSize)};
|
|
910
978
|
--ft-button-internal-vertical-padding: 6px;
|
|
911
979
|
--ft-button-internal-horizontal-padding: 8px;
|
|
912
|
-
${e.setVariable(
|
|
913
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
980
|
+
${e.setVariable(le.color,qe.rippleColor)};
|
|
981
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${qe.iconSize});
|
|
914
982
|
|
|
915
|
-
border-radius: ${
|
|
983
|
+
border-radius: ${qe.borderRadius};
|
|
916
984
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
917
|
-
background-color: ${
|
|
985
|
+
background-color: ${qe.backgroundColor};
|
|
918
986
|
color: var(--ft-button-internal-color);
|
|
919
987
|
-webkit-mask-image: radial-gradient(white, black);
|
|
920
988
|
}
|
|
@@ -926,7 +994,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
926
994
|
.ft-button--dense {
|
|
927
995
|
--ft-button-internal-vertical-padding: 2px;
|
|
928
996
|
--ft-button-internal-horizontal-padding: 4px;
|
|
929
|
-
border-radius: ${
|
|
997
|
+
border-radius: ${Je};
|
|
930
998
|
}
|
|
931
999
|
|
|
932
1000
|
.ft-button--round {
|
|
@@ -935,13 +1003,13 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
935
1003
|
|
|
936
1004
|
.ft-button[disabled] {
|
|
937
1005
|
filter: grayscale(1);
|
|
938
|
-
opacity: ${
|
|
1006
|
+
opacity: ${qe.opacityDisabled};
|
|
939
1007
|
}
|
|
940
1008
|
|
|
941
1009
|
.ft-button.ft-button--primary {
|
|
942
|
-
background-color: ${
|
|
943
|
-
--ft-button-internal-color: ${
|
|
944
|
-
${e.setVariable(
|
|
1010
|
+
background-color: ${Ye.backgroundColor};
|
|
1011
|
+
--ft-button-internal-color: ${Ye.color};
|
|
1012
|
+
${e.setVariable(le.color,Ye.rippleColor)};
|
|
945
1013
|
}
|
|
946
1014
|
|
|
947
1015
|
.ft-button.ft-button--outlined {
|
|
@@ -994,12 +1062,12 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
994
1062
|
}
|
|
995
1063
|
|
|
996
1064
|
ft-loader {
|
|
997
|
-
${e.setVariable(
|
|
998
|
-
${e.setVariable(
|
|
1065
|
+
${e.setVariable(Le.size,qe.iconSize)};
|
|
1066
|
+
${e.setVariable(Le.color,"var(--ft-button-internal-color)")};
|
|
999
1067
|
}
|
|
1000
|
-
`];var
|
|
1068
|
+
`];var ti=function(t,e,i,o){for(var s,n=arguments.length,l=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(l=(n<3?s(l):n>3?s(e,i,l):s(e,i))||l);return n>3&&l&&Object.defineProperty(e,i,l),l};class ei 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.iconVariant=me.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}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.addTooltipIfNeeded(i.html`
|
|
1001
1069
|
<button part="button"
|
|
1002
|
-
class="${
|
|
1070
|
+
class="${l.classMap(t)}"
|
|
1003
1071
|
aria-label="${this.getLabel()}"
|
|
1004
1072
|
?disabled=${this.isDisabled()}>
|
|
1005
1073
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
@@ -1019,7 +1087,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
1019
1087
|
</ft-tooltip>
|
|
1020
1088
|
`:t}resolveIcon(){return this.loading?i.html`
|
|
1021
1089
|
<ft-loader></ft-loader> `:this.icon?i.html`
|
|
1022
|
-
<ft-icon variant="${this.iconVariant}" value="${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}}
|
|
1090
|
+
<ft-icon variant="${this.iconVariant}" value="${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}}ei.elementDefinitions={"ft-ripple":be,"ft-tooltip":We,"ft-typography":te,"ft-icon":we,"ft-loader":Ve},ei.styles=Qe,ti([o.property({type:Boolean})],ei.prototype,"primary",void 0),ti([o.property({type:Boolean})],ei.prototype,"outlined",void 0),ti([o.property({type:Boolean})],ei.prototype,"disabled",void 0),ti([o.property({type:Boolean})],ei.prototype,"dense",void 0),ti([o.property({type:Boolean})],ei.prototype,"round",void 0),ti([o.property({type:String})],ei.prototype,"label",void 0),ti([o.property({type:String})],ei.prototype,"icon",void 0),ti([o.property({type:String})],ei.prototype,"iconVariant",void 0),ti([o.property({type:Boolean})],ei.prototype,"trailingIcon",void 0),ti([o.property({type:Boolean})],ei.prototype,"loading",void 0),ti([o.property({type:String})],ei.prototype,"tooltipPosition",void 0),ti([o.property({type:Boolean})],ei.prototype,"hideTooltip",void 0),ti([o.property({type:Boolean})],ei.prototype,"forceTooltip",void 0),ti([o.query(".ft-button")],ei.prototype,"button",void 0),ti([o.query(".ft-button--label slot")],ei.prototype,"slottedContent",void 0),e.customElement("ft-button")(ei);class ii extends CustomEvent{constructor(t){super("row-click",{detail:t})}}const oi={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")},si=i.css`
|
|
1023
1091
|
:host {
|
|
1024
1092
|
display: block;
|
|
1025
1093
|
}
|
|
@@ -1035,15 +1103,15 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
1035
1103
|
.header-cell {
|
|
1036
1104
|
display: flex;
|
|
1037
1105
|
flex-direction: column;
|
|
1038
|
-
background: ${
|
|
1039
|
-
color: ${
|
|
1106
|
+
background: ${oi.headerBackground};
|
|
1107
|
+
color: ${oi.colorOnSurfaceHigh};
|
|
1040
1108
|
padding: .5rem 1rem;
|
|
1041
|
-
font-family: ${
|
|
1109
|
+
font-family: ${oi.titleFont};
|
|
1042
1110
|
}
|
|
1043
1111
|
|
|
1044
1112
|
.header-cell--sticky {
|
|
1045
1113
|
top: 0;
|
|
1046
|
-
z-index: ${
|
|
1114
|
+
z-index: ${oi.stickyHeaderZIndex};
|
|
1047
1115
|
position: sticky;
|
|
1048
1116
|
}
|
|
1049
1117
|
|
|
@@ -1061,8 +1129,8 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
1061
1129
|
}
|
|
1062
1130
|
|
|
1063
1131
|
.column-title-container ft-button {
|
|
1064
|
-
${e.setVariable(
|
|
1065
|
-
${e.setVariable(
|
|
1132
|
+
${e.setVariable(qe.backgroundColor,oi.headerBackground)};
|
|
1133
|
+
${e.setVariable(qe.color,oi.colorOnSurfaceHigh)};
|
|
1066
1134
|
}
|
|
1067
1135
|
|
|
1068
1136
|
.column-title {
|
|
@@ -1091,29 +1159,29 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
1091
1159
|
|
|
1092
1160
|
.cell {
|
|
1093
1161
|
padding: 1rem;
|
|
1094
|
-
border-left: 1px solid ${
|
|
1095
|
-
border-bottom: 1px solid ${
|
|
1162
|
+
border-left: 1px solid ${oi.headerBackground};
|
|
1163
|
+
border-bottom: 1px solid ${oi.headerBackground};
|
|
1096
1164
|
overflow-x: auto;
|
|
1097
1165
|
display: flex;
|
|
1098
1166
|
align-items: center;
|
|
1099
|
-
font-family: ${
|
|
1167
|
+
font-family: ${oi.contentFont};
|
|
1100
1168
|
}
|
|
1101
1169
|
|
|
1102
1170
|
/* Even is 2n+1 and odd is 2n because of the header */
|
|
1103
1171
|
.row:nth-child(2n) > .cell {
|
|
1104
|
-
background: ${
|
|
1172
|
+
background: ${oi.oddRowBackground};
|
|
1105
1173
|
}
|
|
1106
1174
|
|
|
1107
1175
|
.row:nth-child(2n + 1) > .cell {
|
|
1108
|
-
background: ${
|
|
1176
|
+
background: ${oi.evenRowBackground};
|
|
1109
1177
|
}
|
|
1110
1178
|
|
|
1111
1179
|
.row:hover > .cell {
|
|
1112
|
-
background: ${
|
|
1180
|
+
background: ${oi.rowHoverBackground};
|
|
1113
1181
|
}
|
|
1114
1182
|
|
|
1115
1183
|
.cell:last-of-type {
|
|
1116
|
-
border-right: 1px solid ${
|
|
1184
|
+
border-right: 1px solid ${oi.headerBackground};
|
|
1117
1185
|
}
|
|
1118
1186
|
|
|
1119
1187
|
.row:last-of-type .cell:first-of-type {
|
|
@@ -1127,7 +1195,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
1127
1195
|
.hidden {
|
|
1128
1196
|
visibility: hidden;
|
|
1129
1197
|
}
|
|
1130
|
-
`;var
|
|
1198
|
+
`;var ni=function(t,e,i,o){for(var s,n=arguments.length,l=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(l=(n<3?s(l):n>3?s(e,i,l):s(e,i))||l);return n>3&&l&&Object.defineProperty(e,i,l),l};const li=t=>i.html`${t}`,ri=(t,e)=>t-e;class ai 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`
|
|
1131
1199
|
<style>
|
|
1132
1200
|
.table {
|
|
1133
1201
|
grid-template-columns: repeat(${this.columns.length}, minmax(min-content, auto));
|
|
@@ -1135,17 +1203,17 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
1135
1203
|
</style>
|
|
1136
1204
|
<div class="table">
|
|
1137
1205
|
<div class="header">
|
|
1138
|
-
${
|
|
1206
|
+
${s.repeat(this.columns,((t,e)=>"header-cell-"+e),((t,e)=>this.renderHeader(t,e)))}
|
|
1139
1207
|
</div>
|
|
1140
|
-
${
|
|
1208
|
+
${s.repeat(t,((t,e)=>"row-"+e),((t,e)=>i.html`
|
|
1141
1209
|
<div class="row"
|
|
1142
|
-
@click=${()=>this.dispatchEvent(new
|
|
1143
|
-
${
|
|
1210
|
+
@click=${()=>this.dispatchEvent(new ii(t))}>
|
|
1211
|
+
${s.repeat(this.columns,((t,i)=>"cell-"+e+" "+i),(i=>this.renderCell(i,t,e)))}
|
|
1144
1212
|
</div>
|
|
1145
1213
|
`))}
|
|
1146
1214
|
</div>
|
|
1147
|
-
`}filterData(){let t=[...this.data];return this.filters.forEach(((e,i)=>{var o;const
|
|
1148
|
-
<div class="${
|
|
1215
|
+
`}filterData(){let t=[...this.data];return this.filters.forEach(((e,i)=>{var o;const s=this.columns[i];if(e)switch(null!==(o=s.filter)&&void 0!==o?o:"text"){case"text":e.value&&(t=t.filter((t=>this.getValueAsString(s,t,i).toLowerCase().includes(e.value.toLowerCase()))));break;case"select":e.value&&(t=t.filter((t=>this.getValueAsString(s,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:ri,s="asc"===this.currentSort.order?o:(t,e)=>-o(t,e);return t.sort(((t,e)=>s(this.getValue(i,t),this.getValue(i,e))))}return t}update(t){super.update(t),t.has("sort")&&(this.currentSort=this.sort),(t.has("data")||t.has("columns"))&&this.updateSelectData()}updateSelectData(){this.selectData=[];const t=this.data,e=this.columns;for(let i in e){const o=e[i];"select"===o.filter&&(this.selectData[i]=[...new Set(t.map(((t,e)=>this.getValueAsString(o,t,e))))].sort(((t,e)=>t.localeCompare(e))))}this.requestUpdate()}renderHeader(t,e){const o={"header-cell":!0,"header-cell--sticky":this.stickyHeaders};return i.html`
|
|
1216
|
+
<div class="${l.classMap(o)}">
|
|
1149
1217
|
<div class="column-title-container">
|
|
1150
1218
|
<span class="column-title">${t.title}</span>
|
|
1151
1219
|
${this.renderColumnSort(t,e)}
|
|
@@ -1155,27 +1223,27 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
1155
1223
|
${this.renderColumnFilter(t,e)}
|
|
1156
1224
|
</div>`:null}
|
|
1157
1225
|
</div>
|
|
1158
|
-
`}renderColumnSort(t,e){var o;const
|
|
1226
|
+
`}renderColumnSort(t,e){var o;const s=this.currentSort&&this.currentSort.column===e,n=s?"asc"===this.currentSort.order?"expand_more":"expand_less":"unfold_more";return i.html`
|
|
1159
1227
|
<ft-button
|
|
1160
1228
|
round
|
|
1161
1229
|
dense
|
|
1162
1230
|
class="${null===(o=t.sortable)||void 0===o||o?"":"hidden"}"
|
|
1163
|
-
icon="${
|
|
1231
|
+
icon="${n}"
|
|
1164
1232
|
label="Sort ${t.title}"
|
|
1165
|
-
@click=${()=>{var t;
|
|
1233
|
+
@click=${()=>{var t;s?"asc"===(null===(t=this.currentSort)||void 0===t?void 0:t.order)?this.currentSort={column:e,order:"desc"}:this.currentSort=void 0:this.currentSort={column:e,order:"asc"}}}
|
|
1166
1234
|
></ft-button>
|
|
1167
|
-
`}renderColumnFilter(t,e){var o,
|
|
1235
|
+
`}renderColumnFilter(t,e){var o,s;const n=t=>{this.filters[e]={value:t.detail},this.requestUpdate()};switch(null!==(o=t.filter)&&void 0!==o?o:"text"){case"text":return i.html`
|
|
1168
1236
|
<ft-text-field
|
|
1169
1237
|
label="Search ${t.title}"
|
|
1170
|
-
@live-change="${
|
|
1238
|
+
@live-change="${n}"
|
|
1171
1239
|
></ft-text-field>
|
|
1172
|
-
`;case"select":const o=null!==(
|
|
1173
|
-
<ft-select label="Filter ${t.title}" @change=${
|
|
1240
|
+
`;case"select":const o=null!==(s=this.selectData[e])&&void 0!==s?s:[];return o.length?i.html`
|
|
1241
|
+
<ft-select label="Filter ${t.title}" @change=${n}>
|
|
1174
1242
|
<ft-select-option></ft-select-option>
|
|
1175
1243
|
${o.map((t=>i.html`
|
|
1176
1244
|
<ft-select-option value="${t}" label="${t}"></ft-select-option>
|
|
1177
1245
|
`))}
|
|
1178
1246
|
</ft-select>
|
|
1179
|
-
`:null}return null}renderCell(t,e,o){var
|
|
1180
|
-
<div class="cell">${(t=>{const e=
|
|
1181
|
-
`}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)}}
|
|
1247
|
+
`:null}return null}renderCell(t,e,o){var s;const l=null!==(s=t.render)&&void 0!==s?s:li;return i.html`
|
|
1248
|
+
<div class="cell">${(t=>{const e=l(t,o);return"string"==typeof e?n.unsafeHTML(e):e})(this.getValue(t,e))}</div>
|
|
1249
|
+
`}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)}}ai.styles=si,ni([o.property({attribute:!1})],ai.prototype,"data",void 0),ni([o.property({attribute:!1})],ai.prototype,"columns",void 0),ni([o.property({attribute:!1})],ai.prototype,"sort",void 0),ni([o.property()],ai.prototype,"stickyHeaders",void 0),ni([o.state()],ai.prototype,"currentSort",void 0),e.customElement("ft-filterable-table")(ai),t.FtFilterableTable=ai,t.FtFilterableTableCssVariables=oi,t.RowClickEvent=ii,t.styles=si,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litUnsafeHTML,ftGlobals.litClassMap);
|