@fluid-topics/ft-filterable-table 0.3.71 → 1.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-filterable-table.css.d.ts +0 -1
- package/build/ft-filterable-table.css.js +0 -1
- package/build/ft-filterable-table.d.ts +0 -1
- package/build/ft-filterable-table.js +3 -2
- package/build/ft-filterable-table.light.js +267 -266
- package/build/ft-filterable-table.min.js +297 -306
- package/build/ft-filterable-table.properties.d.ts +1 -2
- package/build/ft-filterable-table.properties.js +0 -1
- package/build/index.d.ts +0 -1
- package/build/index.js +0 -1
- package/package.json +7 -7
|
@@ -4,133 +4,133 @@
|
|
|
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)}$`,
|
|
7
|
+
var r;const a=window,p=a.trustedTypes,f=p?p.createPolicy("lit-html",{createHTML:t=>t}):void 0,d="$lit$",h=`lit$${(Math.random()+"").slice(9)}$`,c="?"+h,u=`<${c}>`,x=document,g=()=>x.createComment(""),b=t=>null===t||"object"!=typeof t&&"function"!=typeof t,v=Array.isArray,y="[ \t\n\f\r]",$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,m=/-->/g,w=/>/g,k=RegExp(`>|${y}(?:([^\\s"'>=/]+)(${y}*=${y}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),S=/'/g,z=/"/g,O=/^(?:script|style|textarea|title)$/i,E=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),C=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),D=new WeakMap,B=x.createTreeWalker(x,129,null,!1),j=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",l=$;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===$?"!--"===a[1]?l=m:void 0!==a[1]?l=w:void 0!==a[2]?(O.test(a[2])&&(s=RegExp("</"+a[2],"g")),l=k):void 0!==a[3]&&(l=k):l===k?">"===a[0]?(l=null!=s?s:$,p=-1):void 0===a[1]?p=-2:(p=l.lastIndex-a[2].length,r=a[1],l=void 0===a[3]?k:'"'===a[3]?z:S):l===z||l===S?l=k:l===m||l===w?l=$:(l=k,s=void 0);const c=l===k&&t[e+1].startsWith("/>")?" ":"";n+=l===$?i+u:p>=0?(o.push(r),i.slice(0,p)+d+i.slice(p)+h+c):i+h+(-2===p?(o.push(void 0),e):c)}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 N{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]=j(t,e);if(this.el=N.createElement(a,i),B.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=B.nextNode())&&r.length<l;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(d)||e.startsWith(h)){const i=f[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+d).split(h),e=/([.?@])?(.*)/.exec(i);r.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?M:"?"===e[1]?_:"@"===e[1]?U:T})}else r.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(O.test(o.tagName)){const t=o.textContent.split(h),e=t.length-1;if(e>0){o.textContent=p?p.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],g()),B.nextNode(),r.push({type:2,index:++s});o.append(t[e],g())}}}else if(8===o.nodeType)if(o.data===c)r.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(h,t+1));)r.push({type:7,index:s}),t+=h.length-1}s++}}static createElement(t,e){const i=x.createElement("template");return i.innerHTML=t,i}}function Z(t,e,i=t,o){var s,n,l,r;if(e===C)return e;let a=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const p=b(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=Z(t,a._$AS(t,e.values),a,o)),e}class F{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:x).importNode(i,!0);B.currentNode=s;let n=B.nextNode(),l=0,r=0,a=o[0];for(;void 0!==a;){if(l===a.index){let e;2===a.type?e=new A(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new H(n,this,t)),this._$AV.push(e),a=o[++r]}l!==(null==a?void 0:a.index)&&(n=B.nextNode(),l++)}return s}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class A{constructor(t,e,i,o){var s;this.type=2,this._$AH=I,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=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._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),b(t)?t===I||null==t||""===t?(this._$AH!==I&&this._$AR(),this._$AH=I):t!==this._$AH&&t!==C&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>v(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==I&&b(this._$AH)?this._$AA.nextSibling.data=t:this.$(x.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=N.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(i);else{const t=new F(s,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=D.get(t.strings);return void 0===e&&D.set(t.strings,e=new N(t)),e}T(t){v(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 A(this.k(g()),this.k(g()),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._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class T{constructor(t,e,i,o,s){this.type=1,this._$AH=I,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=I}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=Z(this,t,e,0),n=!b(t)||t!==this._$AH&&t!==C,n&&(this._$AH=t);else{const o=t;let l,r;for(t=s[0],l=0;l<s.length-1;l++)r=Z(this,o[i+l],e,l),r===C&&(r=this._$AH[l]),n||(n=!b(r)||r!==this._$AH[l]),r===I?t=I:t!==I&&(t+=(null!=r?r:"")+s[l+1]),this._$AH[l]=r}n&&!o&&this.j(t)}j(t){t===I?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class M extends T{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===I?void 0:t}}const R=p?p.emptyScript:"";class _ extends T{constructor(){super(...arguments),this.type=4}j(t){t&&t!==I?this.element.setAttribute(this.name,R):this.element.removeAttribute(this.name)}}class U extends T{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=Z(this,t,e,0))&&void 0!==i?i:I)===C)return;const o=this._$AH,s=t===I&&o!==I||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==I&&(o===I||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 H{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){Z(this,t)}}const P=a.litHtmlPolyfillSupport;null==P||P(N,A),(null!==(r=a.litHtmlVersions)&&void 0!==r?r:a.litHtmlVersions=[]).push("2.7.3");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
13
|
+
const W=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t._$litStatic$},K=t=>({_$litStatic$:t,r:W}),L=new Map,G=(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=V(n));)a+=s+e[++p],f=!0;p!==o&&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)})(E);var q;!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"}(q||(q={}));const X=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),Y=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),J={fontFamily:Y,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")},Q=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",X),tt=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",J.fontSize,"20px"),et=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",J.fontWeight,"normal"),it=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",J.letterSpacing,"0.15px"),ot=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",J.lineHeight,"1.2"),st=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",J.textTransform,"inherit"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",X),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",J.fontSize,"14px"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",J.fontWeight,"normal"),at=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",J.letterSpacing,"0.105px"),pt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",J.lineHeight,"1.7"),ft=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",J.textTransform,"inherit"),dt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",Y),ht=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",J.fontSize,"16px"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",J.fontWeight,"600"),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",J.letterSpacing,"0.144px"),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",J.lineHeight,"1.5"),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",J.textTransform,"inherit"),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",Y),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",J.fontSize,"14px"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",J.fontWeight,"normal"),$t=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",J.letterSpacing,"0.098px"),mt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",J.lineHeight,"1.7"),wt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",J.textTransform,"inherit"),kt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",Y),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",J.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",J.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",J.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",J.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",J.textTransform,"inherit")},St=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",Y),zt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",J.fontSize,"14px"),Ot=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",J.fontWeight,"normal"),Et=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",J.letterSpacing,"0.252px"),Ct=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",J.lineHeight,"1.4"),It=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",J.textTransform,"inherit"),Dt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",Y),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",J.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",J.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",J.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",J.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",J.textTransform,"inherit")},Bt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",Y),jt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",J.fontSize,"10px"),Nt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",J.fontWeight,"normal"),Zt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",J.letterSpacing,"0.33px"),Ft=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",J.lineHeight,"1.6"),At=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",J.textTransform,"inherit"),Tt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",Y),Mt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",J.fontSize,"10px"),Rt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",J.fontWeight,"normal"),_t=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",J.letterSpacing,"1.5px"),Ut=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",J.lineHeight,"1.6"),Ht=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",J.textTransform,"uppercase"),Pt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-button-font-family",Y),fontSize:e.FtCssVariableFactory.extend("--ft-typography-button-font-size",J.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",J.fontWeight,"600"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",J.letterSpacing,"1.246px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-button-line-height",J.lineHeight,"1.15"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",J.textTransform,"uppercase")},Wt=i.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
|
-
font-family: ${
|
|
16
|
-
font-size: ${
|
|
17
|
-
font-weight: ${
|
|
18
|
-
letter-spacing: ${
|
|
19
|
-
line-height: ${
|
|
20
|
-
text-transform: ${
|
|
21
|
-
}
|
|
22
|
-
`,
|
|
15
|
+
font-family: ${Q};
|
|
16
|
+
font-size: ${tt};
|
|
17
|
+
font-weight: ${et};
|
|
18
|
+
letter-spacing: ${it};
|
|
19
|
+
line-height: ${ot};
|
|
20
|
+
text-transform: ${st};
|
|
21
|
+
}
|
|
22
|
+
`,Vt=i.css`
|
|
23
23
|
.ft-typography--title-dense {
|
|
24
|
-
font-family: ${
|
|
25
|
-
font-size: ${
|
|
26
|
-
font-weight: ${
|
|
27
|
-
letter-spacing: ${
|
|
28
|
-
line-height: ${
|
|
29
|
-
text-transform: ${
|
|
30
|
-
}
|
|
31
|
-
`,Wt=i.css`
|
|
32
|
-
.ft-typography--subtitle1 {
|
|
33
|
-
font-family: ${pt};
|
|
34
|
-
font-size: ${ft};
|
|
35
|
-
font-weight: ${dt};
|
|
36
|
-
letter-spacing: ${ht};
|
|
37
|
-
line-height: ${ct};
|
|
38
|
-
text-transform: ${ut};
|
|
24
|
+
font-family: ${nt};
|
|
25
|
+
font-size: ${lt};
|
|
26
|
+
font-weight: ${rt};
|
|
27
|
+
letter-spacing: ${at};
|
|
28
|
+
line-height: ${pt};
|
|
29
|
+
text-transform: ${ft};
|
|
39
30
|
}
|
|
40
31
|
`,Kt=i.css`
|
|
32
|
+
.ft-typography--subtitle1 {
|
|
33
|
+
font-family: ${dt};
|
|
34
|
+
font-size: ${ht};
|
|
35
|
+
font-weight: ${ct};
|
|
36
|
+
letter-spacing: ${ut};
|
|
37
|
+
line-height: ${xt};
|
|
38
|
+
text-transform: ${gt};
|
|
39
|
+
}
|
|
40
|
+
`,Lt=i.css`
|
|
41
41
|
.ft-typography--subtitle2 {
|
|
42
|
-
font-family: ${
|
|
43
|
-
font-size: ${
|
|
44
|
-
font-weight: ${
|
|
45
|
-
letter-spacing: ${
|
|
46
|
-
line-height: ${
|
|
47
|
-
text-transform: ${
|
|
42
|
+
font-family: ${bt};
|
|
43
|
+
font-size: ${vt};
|
|
44
|
+
font-weight: ${yt};
|
|
45
|
+
letter-spacing: ${$t};
|
|
46
|
+
line-height: ${mt};
|
|
47
|
+
text-transform: ${wt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,Gt=i.css`
|
|
51
51
|
.ft-typography--body1 {
|
|
52
|
-
font-family: ${
|
|
53
|
-
font-size: ${
|
|
54
|
-
font-weight: ${
|
|
55
|
-
letter-spacing: ${
|
|
56
|
-
line-height: ${
|
|
57
|
-
text-transform: ${
|
|
52
|
+
font-family: ${kt.fontFamily};
|
|
53
|
+
font-size: ${kt.fontSize};
|
|
54
|
+
font-weight: ${kt.fontWeight};
|
|
55
|
+
letter-spacing: ${kt.letterSpacing};
|
|
56
|
+
line-height: ${kt.lineHeight};
|
|
57
|
+
text-transform: ${kt.textTransform};
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,qt=i.css`
|
|
60
60
|
.ft-typography--body2 {
|
|
61
|
-
font-family: ${
|
|
62
|
-
font-size: ${
|
|
63
|
-
font-weight: ${
|
|
64
|
-
letter-spacing: ${
|
|
65
|
-
line-height: ${
|
|
66
|
-
text-transform: ${
|
|
61
|
+
font-family: ${St};
|
|
62
|
+
font-size: ${zt};
|
|
63
|
+
font-weight: ${Ot};
|
|
64
|
+
letter-spacing: ${Et};
|
|
65
|
+
line-height: ${Ct};
|
|
66
|
+
text-transform: ${It};
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,Xt=i.css`
|
|
69
69
|
.ft-typography--caption {
|
|
70
|
-
font-family: ${
|
|
71
|
-
font-size: ${
|
|
72
|
-
font-weight: ${
|
|
73
|
-
letter-spacing: ${
|
|
74
|
-
line-height: ${
|
|
75
|
-
text-transform: ${
|
|
70
|
+
font-family: ${Dt.fontFamily};
|
|
71
|
+
font-size: ${Dt.fontSize};
|
|
72
|
+
font-weight: ${Dt.fontWeight};
|
|
73
|
+
letter-spacing: ${Dt.letterSpacing};
|
|
74
|
+
line-height: ${Dt.lineHeight};
|
|
75
|
+
text-transform: ${Dt.textTransform};
|
|
76
76
|
}
|
|
77
|
-
`,
|
|
77
|
+
`,Yt=i.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
|
-
font-family: ${
|
|
80
|
-
font-size: ${
|
|
81
|
-
font-weight: ${
|
|
82
|
-
letter-spacing: ${
|
|
83
|
-
line-height: ${
|
|
84
|
-
text-transform: ${
|
|
79
|
+
font-family: ${Bt};
|
|
80
|
+
font-size: ${jt};
|
|
81
|
+
font-weight: ${Nt};
|
|
82
|
+
letter-spacing: ${Zt};
|
|
83
|
+
line-height: ${Ft};
|
|
84
|
+
text-transform: ${At};
|
|
85
85
|
}
|
|
86
|
-
`,
|
|
86
|
+
`,Jt=i.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
|
-
font-family: ${
|
|
89
|
-
font-size: ${
|
|
90
|
-
font-weight: ${
|
|
91
|
-
letter-spacing: ${
|
|
92
|
-
line-height: ${
|
|
93
|
-
text-transform: ${
|
|
94
|
-
}
|
|
95
|
-
`,
|
|
88
|
+
font-family: ${Tt};
|
|
89
|
+
font-size: ${Mt};
|
|
90
|
+
font-weight: ${Rt};
|
|
91
|
+
letter-spacing: ${_t};
|
|
92
|
+
line-height: ${Ut};
|
|
93
|
+
text-transform: ${Ht};
|
|
94
|
+
}
|
|
95
|
+
`,Qt=i.css`
|
|
96
96
|
.ft-typography--button {
|
|
97
|
-
font-family: ${
|
|
98
|
-
font-size: ${
|
|
99
|
-
font-weight: ${
|
|
100
|
-
letter-spacing: ${
|
|
101
|
-
line-height: ${
|
|
102
|
-
text-transform: ${
|
|
103
|
-
}
|
|
104
|
-
`,
|
|
97
|
+
font-family: ${Pt.fontFamily};
|
|
98
|
+
font-size: ${Pt.fontSize};
|
|
99
|
+
font-weight: ${Pt.fontWeight};
|
|
100
|
+
letter-spacing: ${Pt.letterSpacing};
|
|
101
|
+
line-height: ${Pt.lineHeight};
|
|
102
|
+
text-transform: ${Pt.textTransform};
|
|
103
|
+
}
|
|
104
|
+
`,te=i.css`
|
|
105
105
|
.ft-typography {
|
|
106
106
|
vertical-align: inherit;
|
|
107
107
|
}
|
|
108
|
-
`;var
|
|
109
|
-
<${
|
|
108
|
+
`;var ee=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.variant=q.body1}render(){return this.element?G`
|
|
109
|
+
<${K(this.element)}
|
|
110
110
|
class="ft-typography ft-typography--${this.variant}">
|
|
111
111
|
<slot></slot>
|
|
112
|
-
</${
|
|
113
|
-
`:
|
|
112
|
+
</${K(this.element)}>
|
|
113
|
+
`:G`
|
|
114
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
115
|
-
`}}
|
|
115
|
+
`}}ie.styles=[Wt,Vt,Kt,Lt,Gt,qt,Xt,Yt,Jt,Qt,te],ee([o.property()],ie.prototype,"element",void 0),ee([o.property()],ie.prototype,"variant",void 0),e.customElement("ft-typography")(ie);const oe={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"),labelMaxWidth:e.FtCssVariableFactory.create("--ft-input-label-max-width","SIZE","100%"),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")},se=i.css`
|
|
116
116
|
.ft-input-label {
|
|
117
117
|
position: absolute;
|
|
118
118
|
inset: 0;
|
|
119
119
|
display: flex;
|
|
120
|
-
background-color: ${
|
|
121
|
-
border-radius: ${
|
|
120
|
+
background-color: ${oe.colorSurface};
|
|
121
|
+
border-radius: ${oe.borderRadiusS} ${oe.borderRadiusS} 0 0;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
.ft-input-label--outlined {
|
|
125
|
-
border-radius: ${
|
|
125
|
+
border-radius: ${oe.borderRadiusS};
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
.ft-input-label {
|
|
129
|
-
border-color: ${
|
|
129
|
+
border-color: ${oe.borderColor};
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
.ft-input-label.ft-input-label--in-error {
|
|
133
|
-
border-color: ${
|
|
133
|
+
border-color: ${oe.colorError}
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
.ft-input-label:before,
|
|
@@ -143,7 +143,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.ft-input-label:before {
|
|
146
|
-
width: calc(${
|
|
146
|
+
width: calc(${oe.horizontalSpacing} - 4px);
|
|
147
147
|
flex-shrink: 0;
|
|
148
148
|
}
|
|
149
149
|
|
|
@@ -159,20 +159,20 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
159
159
|
border-bottom-width: 1px;
|
|
160
160
|
border-bottom-style: solid;
|
|
161
161
|
border-color: inherit;
|
|
162
|
-
color: ${
|
|
162
|
+
color: ${oe.textColor};
|
|
163
163
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
164
|
-
max-width: calc(${
|
|
164
|
+
max-width: calc(${oe.labelMaxWidth} - 2 * (${oe.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
|
|
165
165
|
text-overflow: ellipsis;
|
|
166
|
-
${e.setVariable(
|
|
167
|
-
${e.setVariable(
|
|
166
|
+
${e.setVariable(Dt.fontSize,oe.fontSize)};
|
|
167
|
+
${e.setVariable(Dt.lineHeight,oe.fontSize)};
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
.ft-input-label--in-error .ft-input-label--text {
|
|
171
|
-
color: ${
|
|
171
|
+
color: ${oe.colorError}
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
.ft-input-label--disabled .ft-input-label--text {
|
|
175
|
-
color: ${
|
|
175
|
+
color: ${oe.disabledTextColor};
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
.ft-input-label--hidden-text {
|
|
@@ -189,19 +189,19 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
189
189
|
overflow: hidden;
|
|
190
190
|
white-space: nowrap;
|
|
191
191
|
text-overflow: ellipsis;
|
|
192
|
-
padding: ${
|
|
193
|
-
margin: calc(${
|
|
192
|
+
padding: ${oe.verticalSpacing} 4px;
|
|
193
|
+
margin: calc(${oe.verticalSpacing} * -1) 0;
|
|
194
194
|
max-width: 100%;
|
|
195
195
|
box-sizing: border-box;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
.ft-input-label--raised .ft-input-label--text {
|
|
199
|
-
${e.setVariable(
|
|
200
|
-
${e.setVariable(
|
|
199
|
+
${e.setVariable(Dt.fontSize,oe.raisedFontSize)};
|
|
200
|
+
${e.setVariable(Dt.lineHeight,oe.raisedFontSize)};
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
204
|
-
top: ${
|
|
204
|
+
top: ${oe.verticalSpacing};
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -214,27 +214,27 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
214
214
|
.ft-input-label--outlined:before {
|
|
215
215
|
border-left-width: 1px;
|
|
216
216
|
border-left-style: solid;
|
|
217
|
-
border-radius: ${
|
|
217
|
+
border-radius: ${oe.borderRadiusS} 0 0 ${oe.borderRadiusS};
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
.ft-input-label--outlined:after {
|
|
221
221
|
border-right-width: 1px;
|
|
222
222
|
border-right-style: solid;
|
|
223
|
-
border-radius: 0 ${
|
|
223
|
+
border-radius: 0 ${oe.borderRadiusS} ${oe.borderRadiusS} 0;
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
227
227
|
padding: 2px 4px;
|
|
228
|
-
z-index: ${
|
|
229
|
-
background-color: ${
|
|
230
|
-
border-radius: ${
|
|
228
|
+
z-index: ${oe.raisedZIndex};
|
|
229
|
+
background-color: ${oe.colorSurface};
|
|
230
|
+
border-radius: ${oe.borderRadiusS};
|
|
231
231
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
235
235
|
border-top: none;
|
|
236
236
|
}
|
|
237
|
-
`;var
|
|
237
|
+
`;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 le 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`
|
|
238
238
|
<div class="${l.classMap(t)}">
|
|
239
239
|
${this.text?i.html`
|
|
240
240
|
<div class="ft-input-label--text ft-typography--caption">
|
|
@@ -243,7 +243,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
243
243
|
</div>
|
|
244
244
|
`:null}
|
|
245
245
|
</div>
|
|
246
|
-
`}}
|
|
246
|
+
`}}le.elementDefinitions={},le.styles=[Xt,se],ne([o.property({type:String})],le.prototype,"text",void 0),ne([o.property({type:Boolean})],le.prototype,"raised",void 0),ne([o.property({type:Boolean})],le.prototype,"outlined",void 0),ne([o.property({type:Boolean})],le.prototype,"disabled",void 0),ne([o.property({type:Boolean})],le.prototype,"error",void 0),e.customElement("ft-input-label")(le);const re=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),ae={color:re,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",re),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")},pe=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),fe=pe,de=e.FtCssVariableFactory.extend("--ft-ripple-background-color",pe),he=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),ce=he,ue=e.FtCssVariableFactory.extend("--ft-ripple-background-color",he),xe=i.css`
|
|
247
247
|
:host {
|
|
248
248
|
display: contents;
|
|
249
249
|
}
|
|
@@ -265,27 +265,27 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
.ft-ripple .ft-ripple--background {
|
|
268
|
-
background-color: ${
|
|
268
|
+
background-color: ${ae.backgroundColor};
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
.ft-ripple .ft-ripple--effect {
|
|
272
|
-
background-color: ${
|
|
272
|
+
background-color: ${ae.color};
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
276
|
-
background-color: ${
|
|
276
|
+
background-color: ${ue};
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
280
|
-
background-color: ${
|
|
280
|
+
background-color: ${ce};
|
|
281
281
|
}
|
|
282
282
|
|
|
283
283
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
284
|
-
background-color: ${
|
|
284
|
+
background-color: ${de};
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
288
|
-
background-color: ${
|
|
288
|
+
background-color: ${fe};
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
.ft-ripple .ft-ripple--background {
|
|
@@ -317,22 +317,22 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
320
|
-
opacity: ${
|
|
320
|
+
opacity: ${ae.opacityContentOnSurfaceHover};
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
324
|
-
opacity: ${
|
|
324
|
+
opacity: ${ae.opacityContentOnSurfaceSelected};
|
|
325
325
|
}
|
|
326
326
|
|
|
327
327
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
328
|
-
opacity: ${
|
|
328
|
+
opacity: ${ae.opacityContentOnSurfaceFocused};
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
332
|
-
opacity: ${
|
|
332
|
+
opacity: ${ae.opacityContentOnSurfacePressed};
|
|
333
333
|
transform: translate(-50%, -50%) scale(1);
|
|
334
334
|
}
|
|
335
|
-
`;var
|
|
335
|
+
`;var ge,be,ve=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 ye 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.setupDebouncer=new e.Debouncer(10),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`
|
|
336
336
|
<style>
|
|
337
337
|
.ft-ripple .ft-ripple--effect,
|
|
338
338
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -349,7 +349,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
349
349
|
<div class="ft-ripple--background"></div>
|
|
350
350
|
<div class="ft-ripple--effect"></div>
|
|
351
351
|
</div>
|
|
352
|
-
`}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(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;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,this.target=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.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",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.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`
|
|
352
|
+
`}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(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;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,this.target=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()}}ye.elementDefinitions={},ye.styles=xe,ve([o.property({type:Boolean})],ye.prototype,"primary",void 0),ve([o.property({type:Boolean})],ye.prototype,"secondary",void 0),ve([o.property({type:Boolean})],ye.prototype,"unbounded",void 0),ve([o.property({type:Boolean})],ye.prototype,"activated",void 0),ve([o.property({type:Boolean})],ye.prototype,"selected",void 0),ve([o.property({type:Boolean})],ye.prototype,"disabled",void 0),ve([o.state()],ye.prototype,"hovered",void 0),ve([o.state()],ye.prototype,"focused",void 0),ve([o.state()],ye.prototype,"pressed",void 0),ve([o.state()],ye.prototype,"rippling",void 0),ve([o.state()],ye.prototype,"rippleSize",void 0),ve([o.state()],ye.prototype,"originX",void 0),ve([o.state()],ye.prototype,"originY",void 0),ve([o.query(".ft-ripple")],ye.prototype,"ripple",void 0),ve([o.query(".ft-ripple--effect")],ye.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(ye),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",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.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=""}(ge||(ge={})),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=""}(be||(be={})),new Map([...["abw"].map((t=>[t,be.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,be.AUDIO])),...["avi"].map((t=>[t,be.AVI])),...["chm","xhs"].map((t=>[t,be.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,be.CODE])),...["csv"].map((t=>[t,be.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,be.DITA])),...["epub"].map((t=>[t,be.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,be.EXCEL])),...["flac"].map((t=>[t,be.FLAC])),...["gif"].map((t=>[t,be.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,be.GZIP])),...["html","htm","xhtml"].map((t=>[t,be.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,be.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,be.JPEG])),...["json"].map((t=>[t,be.JSON])),...["m4a","m4p"].map((t=>[t,be.M4A])),...["mov","qt"].map((t=>[t,be.MOV])),...["mp3"].map((t=>[t,be.MP3])),...["mp4","m4v"].map((t=>[t,be.MP4])),...["ogg","oga"].map((t=>[t,be.OGG])),...["pdf","ps"].map((t=>[t,be.PDF])),...["png"].map((t=>[t,be.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,be.POWERPOINT])),...["rar"].map((t=>[t,be.RAR])),...["stp"].map((t=>[t,be.STP])),...["txt","rtf","md","mdown"].map((t=>[t,be.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,be.VIDEO])),...["wav"].map((t=>[t,be.WAV])),...["wma"].map((t=>[t,be.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,be.WORD])),...["xml","xsl","rdf"].map((t=>[t,be.XML])),...["yaml","yml","x-yaml"].map((t=>[t,be.YAML])),...["zip"].map((t=>[t,be.ZIP]))]);const $e={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")},me=i.css`
|
|
353
353
|
:host, i.ft-icon {
|
|
354
354
|
display: inline-flex;
|
|
355
355
|
align-items: center;
|
|
@@ -358,14 +358,14 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
:host {
|
|
361
|
-
width: ${
|
|
362
|
-
height: ${
|
|
361
|
+
width: ${$e.size};
|
|
362
|
+
height: ${$e.size};
|
|
363
363
|
}
|
|
364
364
|
|
|
365
365
|
i.ft-icon {
|
|
366
366
|
width: 100%;
|
|
367
367
|
height: 100%;
|
|
368
|
-
font-size: ${
|
|
368
|
+
font-size: ${$e.size};
|
|
369
369
|
line-height: 1;
|
|
370
370
|
font-weight: normal;
|
|
371
371
|
text-transform: none;
|
|
@@ -376,32 +376,32 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
376
376
|
text-rendering: auto;
|
|
377
377
|
-webkit-font-smoothing: antialiased;
|
|
378
378
|
-moz-osx-font-smoothing: grayscale;
|
|
379
|
-
vertical-align: ${
|
|
379
|
+
vertical-align: ${$e.verticalAlign};
|
|
380
380
|
}
|
|
381
381
|
|
|
382
382
|
i.ft-icon.ft-icon--fluid-topics {
|
|
383
|
-
font-family: ${
|
|
383
|
+
font-family: ${$e.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
384
384
|
|
|
385
385
|
/* Ugly fix because font is broken */
|
|
386
|
-
font-size: calc(0.
|
|
386
|
+
font-size: calc(0.75 * ${$e.size});
|
|
387
387
|
position: relative;
|
|
388
|
-
top: -
|
|
388
|
+
top: -4%;
|
|
389
389
|
justify-content: center;
|
|
390
390
|
}
|
|
391
391
|
|
|
392
392
|
.ft-icon--file-format {
|
|
393
|
-
font-family: ${
|
|
393
|
+
font-family: ${$e.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
.ft-icon--material {
|
|
397
|
-
font-family: ${
|
|
397
|
+
font-family: ${$e.materialFontFamily}, "Material Icons", sans-serif;
|
|
398
398
|
}
|
|
399
|
-
`;var
|
|
400
|
-
<i class="ft-icon ${"ft-icon--"+
|
|
399
|
+
`;var we;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(we||(we={}));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 Se extends e.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=i.nothing}render(){const t=this.variant&&Object.values(we).includes(this.variant)?this.variant:we.fluid_topics,e=t!==we.material||!!this.value;return i.html`
|
|
400
|
+
<i class="ft-icon ${"ft-icon--"+t}">
|
|
401
401
|
${n.unsafeHTML(this.resolvedIcon)}
|
|
402
|
-
<slot ?hidden=${
|
|
402
|
+
<slot ?hidden=${e}></slot>
|
|
403
403
|
</i>
|
|
404
|
-
`}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
|
|
404
|
+
`}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 we.file_format:this.resolvedIcon=null!==(t=be[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case we.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=ge[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Se.elementDefinitions={},Se.styles=me,ke([o.property()],Se.prototype,"variant",void 0),ke([o.property()],Se.prototype,"value",void 0),ke([o.state()],Se.prototype,"resolvedIcon",void 0),ke([o.query("slot")],Se.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Se);const ze={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"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-select-horizontal-spacing","SIZE","16px"),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")},Oe=i.css`
|
|
405
405
|
*:focus {
|
|
406
406
|
outline: none;
|
|
407
407
|
}
|
|
@@ -415,7 +415,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
415
415
|
.ft-select--main-panel {
|
|
416
416
|
position: relative;
|
|
417
417
|
display: flex;
|
|
418
|
-
height: calc(4 * ${
|
|
418
|
+
height: calc(4 * ${ze.verticalSpacing} + ${ze.labelSize} + ${ze.selectedOptionSize});
|
|
419
419
|
}
|
|
420
420
|
|
|
421
421
|
.ft-select--input-panel {
|
|
@@ -424,17 +424,17 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
424
424
|
display: flex;
|
|
425
425
|
align-items: center;
|
|
426
426
|
overflow: hidden;
|
|
427
|
-
padding-left: ${
|
|
428
|
-
padding-right: ${
|
|
427
|
+
padding-left: ${ze.horizontalSpacing};
|
|
428
|
+
padding-right: ${ze.horizontalSpacing};
|
|
429
429
|
gap: 8px;
|
|
430
|
-
color: ${
|
|
431
|
-
${e.setVariable(
|
|
430
|
+
color: ${ze.selectedOptionColor};
|
|
431
|
+
${e.setVariable(ae.color,ze.selectedOptionColor)};
|
|
432
432
|
}
|
|
433
433
|
|
|
434
434
|
.ft-select--input-panel,
|
|
435
435
|
.ft-select--option {
|
|
436
|
-
${e.setVariable(
|
|
437
|
-
${e.setVariable(
|
|
436
|
+
${e.setVariable(ae.opacityContentOnSurfaceHover,"0.08")};
|
|
437
|
+
${e.setVariable(ae.opacityContentOnSurfacePressed,"0.04")};
|
|
438
438
|
}
|
|
439
439
|
|
|
440
440
|
.ft-select--input-panel > *:not(ft-ripple),
|
|
@@ -444,7 +444,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
444
444
|
|
|
445
445
|
.ft-select--disabled .ft-select--input-panel,
|
|
446
446
|
.ft-select--disabled .ft-select--option {
|
|
447
|
-
color: ${
|
|
447
|
+
color: ${ze.colorOnSurfaceDisabled};
|
|
448
448
|
}
|
|
449
449
|
|
|
450
450
|
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
@@ -453,20 +453,20 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
ft-input-label {
|
|
456
|
-
${e.setVariable(
|
|
457
|
-
${e.setVariable(
|
|
458
|
-
${e.setVariable(
|
|
459
|
-
${e.setVariable(
|
|
460
|
-
${e.setVariable(
|
|
456
|
+
${e.setVariable(oe.fontSize,ze.selectedOptionSize)};
|
|
457
|
+
${e.setVariable(oe.raisedFontSize,ze.labelSize)};
|
|
458
|
+
${e.setVariable(oe.verticalSpacing,ze.verticalSpacing)};
|
|
459
|
+
${e.setVariable(oe.horizontalSpacing,ze.horizontalSpacing)};
|
|
460
|
+
${e.setVariable(oe.labelMaxWidth,`calc(100% - ${$e.size} - 8px)`)};
|
|
461
461
|
}
|
|
462
462
|
|
|
463
463
|
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
464
|
-
color: ${
|
|
464
|
+
color: ${ze.colorPrimary};
|
|
465
465
|
}
|
|
466
466
|
|
|
467
467
|
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
468
|
-
${e.setVariable(
|
|
469
|
-
${e.setVariable(
|
|
468
|
+
${e.setVariable(oe.borderColor,ze.colorPrimary)};
|
|
469
|
+
${e.setVariable(oe.textColor,ze.colorPrimary)};
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
.ft-select--selected-option {
|
|
@@ -476,12 +476,12 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
476
476
|
overflow: hidden;
|
|
477
477
|
white-space: nowrap;
|
|
478
478
|
text-overflow: ellipsis;
|
|
479
|
-
${e.setVariable(
|
|
480
|
-
${e.setVariable(
|
|
479
|
+
${e.setVariable(kt.fontSize,ze.selectedOptionSize)};
|
|
480
|
+
${e.setVariable(kt.lineHeight,ze.selectedOptionSize)};
|
|
481
481
|
}
|
|
482
482
|
|
|
483
483
|
.ft-select--in-error .ft-select--selected-option {
|
|
484
|
-
color: ${
|
|
484
|
+
color: ${ze.colorError};
|
|
485
485
|
}
|
|
486
486
|
|
|
487
487
|
ft-icon {
|
|
@@ -493,16 +493,16 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
493
493
|
}
|
|
494
494
|
|
|
495
495
|
.ft-select--filled .ft-select--input-panel {
|
|
496
|
-
border-radius: ${
|
|
496
|
+
border-radius: ${ze.borderRadiusS} ${ze.borderRadiusS} 0 0;
|
|
497
497
|
}
|
|
498
498
|
|
|
499
499
|
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
500
500
|
align-self: stretch;
|
|
501
|
-
padding-top: calc(${
|
|
501
|
+
padding-top: calc(${ze.labelSize} + 2 * ${ze.verticalSpacing});
|
|
502
502
|
}
|
|
503
503
|
|
|
504
504
|
.ft-select--outlined .ft-select--input-panel {
|
|
505
|
-
border-radius: ${
|
|
505
|
+
border-radius: ${ze.borderRadiusS};
|
|
506
506
|
}
|
|
507
507
|
|
|
508
508
|
.ft-select--options {
|
|
@@ -511,10 +511,10 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
511
511
|
top: 100%;
|
|
512
512
|
left: 0;
|
|
513
513
|
right: 0;
|
|
514
|
-
color: ${
|
|
515
|
-
background: ${
|
|
516
|
-
z-index: ${
|
|
517
|
-
box-shadow: ${
|
|
514
|
+
color: ${ze.optionsColor};
|
|
515
|
+
background: ${ze.colorSurface};
|
|
516
|
+
z-index: ${ze.optionsZIndex};
|
|
517
|
+
box-shadow: ${ze.elevation02};
|
|
518
518
|
}
|
|
519
519
|
|
|
520
520
|
.ft-select--fixed .ft-select--options {
|
|
@@ -525,13 +525,13 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
525
525
|
|
|
526
526
|
.ft-select--options-displayed .ft-select--options {
|
|
527
527
|
display: block;
|
|
528
|
-
max-height: ${
|
|
528
|
+
max-height: ${ze.optionsHeight};
|
|
529
529
|
overflow-y: auto;
|
|
530
530
|
}
|
|
531
531
|
|
|
532
532
|
.ft-select--option {
|
|
533
533
|
position: relative;
|
|
534
|
-
padding: 4px ${
|
|
534
|
+
padding: 4px ${ze.horizontalSpacing};
|
|
535
535
|
min-height: 32px;
|
|
536
536
|
display: flex;
|
|
537
537
|
align-items: center;
|
|
@@ -543,14 +543,14 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
543
543
|
}
|
|
544
544
|
|
|
545
545
|
.ft-select--helper-text {
|
|
546
|
-
padding: 0 ${
|
|
547
|
-
color: ${
|
|
546
|
+
padding: 0 ${ze.horizontalSpacing};
|
|
547
|
+
color: ${ze.helperColor};
|
|
548
548
|
}
|
|
549
549
|
|
|
550
550
|
.ft-select--in-error .ft-select--helper-text {
|
|
551
|
-
color: ${
|
|
551
|
+
color: ${ze.colorError};
|
|
552
552
|
}
|
|
553
|
-
`;var
|
|
553
|
+
`;var Ee=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 Ce 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}))}}Ce.elementDefinitions={},Ee([o.property({type:String})],Ce.prototype,"label",void 0),Ee([o.property({type:Object,converter:t=>t})],Ce.prototype,"value",void 0),Ee([o.property({type:Boolean,reflect:!0})],Ce.prototype,"selected",void 0);class Ie 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`
|
|
554
554
|
<div class="${l.classMap(d)}" part="container">
|
|
555
555
|
<div class="ft-select--main-panel" part="main-panel">
|
|
556
556
|
<ft-input-label text="${this.label}"
|
|
@@ -572,7 +572,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
572
572
|
<ft-typography variant="body1" class="ft-select--selected-option">
|
|
573
573
|
${null!==(r=null===(n=this.selectedOption)||void 0===n?void 0:n.label)&&void 0!==r?r:""}
|
|
574
574
|
</ft-typography>
|
|
575
|
-
<ft-icon
|
|
575
|
+
<ft-icon>${a?"thin_arrow_up":"thin_arrow"}</ft-icon>
|
|
576
576
|
</div>
|
|
577
577
|
<div class="ft-select--options"
|
|
578
578
|
part="options"
|
|
@@ -598,13 +598,13 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
598
598
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
599
599
|
<span>${t.label}</span>
|
|
600
600
|
</div>
|
|
601
|
-
`}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)}}
|
|
601
|
+
`}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)}}Ie.elementDefinitions={"ft-input-label":le,"ft-typography":ie,"ft-ripple":ye,"ft-icon":Se},Ie.styles=[qt,Xt,Oe],Ee([o.property({type:String})],Ie.prototype,"label",void 0),Ee([o.property({type:String})],Ie.prototype,"helper",void 0),Ee([o.property({type:Boolean})],Ie.prototype,"outlined",void 0),Ee([o.property({type:Boolean})],Ie.prototype,"disabled",void 0),Ee([o.property({type:Boolean})],Ie.prototype,"error",void 0),Ee([o.property({type:Boolean})],Ie.prototype,"fixedMenuPosition",void 0),Ee([o.property({type:Array})],Ie.prototype,"options",void 0),Ee([o.state()],Ie.prototype,"selectedOption",void 0),Ee([o.state()],Ie.prototype,"optionsDisplayed",void 0),Ee([o.state()],Ie.prototype,"focusOptions",void 0),Ee([o.query(".ft-select")],Ie.prototype,"container",void 0),Ee([o.query(".ft-select--options")],Ie.prototype,"optionsMenu",void 0),Ee([o.query(".ft-select--input-panel")],Ie.prototype,"mainPanel",void 0),Ee([o.query(".ft-select--option:first-child")],Ie.prototype,"firstOption",void 0),Ee([o.query(".ft-select--option:focus")],Ie.prototype,"focusedOption",void 0),Ee([o.query(".ft-select--option.ft-select--option-selected")],Ie.prototype,"selectedOptionElement",void 0),Ee([o.query(".ft-select--option:last-child")],Ie.prototype,"lastOption",void 0),Ee([o.query("slot")],Ie.prototype,"optionsSlot",void 0),e.customElement("ft-select")(Ie),e.customElement("ft-select-option")(Ce);
|
|
602
602
|
/**
|
|
603
603
|
* @license
|
|
604
604
|
* Copyright 2018 Google LLC
|
|
605
605
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
606
606
|
*/
|
|
607
|
-
const
|
|
607
|
+
const De={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")},Be=i.css`
|
|
608
608
|
*:focus {
|
|
609
609
|
outline: none;
|
|
610
610
|
}
|
|
@@ -617,16 +617,16 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
617
617
|
}
|
|
618
618
|
|
|
619
619
|
ft-input-label {
|
|
620
|
-
${e.setVariable(
|
|
621
|
-
${e.setVariable(
|
|
622
|
-
${e.setVariable(
|
|
623
|
-
${e.setVariable(
|
|
620
|
+
${e.setVariable(oe.fontSize,De.fontSize)};
|
|
621
|
+
${e.setVariable(oe.raisedFontSize,De.labelSize)};
|
|
622
|
+
${e.setVariable(oe.verticalSpacing,De.verticalSpacing)};
|
|
623
|
+
${e.setVariable(oe.horizontalSpacing,De.horizontalSpacing)};
|
|
624
624
|
}
|
|
625
625
|
|
|
626
626
|
.ft-text-field--main-panel {
|
|
627
627
|
position: relative;
|
|
628
628
|
display: flex;
|
|
629
|
-
height: calc(4 * ${
|
|
629
|
+
height: calc(4 * ${De.verticalSpacing} + ${De.labelSize} + ${De.fontSize});
|
|
630
630
|
}
|
|
631
631
|
|
|
632
632
|
.ft-text-field--input-panel {
|
|
@@ -635,24 +635,24 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
635
635
|
display: flex;
|
|
636
636
|
align-items: center;
|
|
637
637
|
overflow: hidden;
|
|
638
|
-
padding: 0 ${
|
|
638
|
+
padding: 0 ${De.horizontalSpacing};
|
|
639
639
|
|
|
640
|
-
${e.setVariable(
|
|
641
|
-
${e.setVariable(
|
|
640
|
+
${e.setVariable(kt.fontSize,De.fontSize)};
|
|
641
|
+
${e.setVariable(kt.lineHeight,De.fontSize)};
|
|
642
642
|
}
|
|
643
643
|
|
|
644
644
|
.ft-text-field--input-panel ft-ripple {
|
|
645
|
-
${e.setVariable(
|
|
646
|
-
${e.setVariable(
|
|
645
|
+
${e.setVariable(ae.opacityContentOnSurfaceHover,"0.08")};
|
|
646
|
+
${e.setVariable(ae.opacityContentOnSurfacePressed,"0.04")};
|
|
647
647
|
}
|
|
648
648
|
|
|
649
649
|
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input-panel {
|
|
650
650
|
align-items: flex-end;
|
|
651
|
-
padding: 0 ${
|
|
651
|
+
padding: 0 ${De.horizontalSpacing} ${De.verticalSpacing} ${De.horizontalSpacing};
|
|
652
652
|
}
|
|
653
653
|
|
|
654
654
|
.ft-text-field--prefix {
|
|
655
|
-
color: ${
|
|
655
|
+
color: ${De.prefixColor};
|
|
656
656
|
margin-right: 2px;
|
|
657
657
|
flex-shrink: 1;
|
|
658
658
|
overflow: hidden;
|
|
@@ -671,15 +671,15 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
671
671
|
flex-shrink: 1;
|
|
672
672
|
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
673
673
|
|
|
674
|
-
color: ${
|
|
675
|
-
padding: calc(2 * ${
|
|
674
|
+
color: ${De.colorOnSurface};
|
|
675
|
+
padding: calc(2 * ${De.verticalSpacing}) 0;
|
|
676
676
|
border: none;
|
|
677
677
|
background: none;
|
|
678
678
|
}
|
|
679
679
|
|
|
680
680
|
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input {
|
|
681
681
|
padding-bottom: 0;
|
|
682
|
-
padding-top: calc(${
|
|
682
|
+
padding-top: calc(${De.labelSize} + 2 * ${De.verticalSpacing});
|
|
683
683
|
}
|
|
684
684
|
|
|
685
685
|
.ft-text-field--input::-webkit-calendar-picker-indicator,
|
|
@@ -688,37 +688,37 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
688
688
|
}
|
|
689
689
|
|
|
690
690
|
.ft-text-field--disabled .ft-text-field--input {
|
|
691
|
-
color: ${
|
|
691
|
+
color: ${De.colorOnSurfaceDisabled};
|
|
692
692
|
}
|
|
693
693
|
|
|
694
694
|
.ft-text-field:not(.ft-text-field--disabled):focus-within ft-input-label {
|
|
695
|
-
${e.setVariable(
|
|
696
|
-
${e.setVariable(
|
|
695
|
+
${e.setVariable(oe.borderColor,De.colorPrimary)};
|
|
696
|
+
${e.setVariable(oe.textColor,De.colorPrimary)};
|
|
697
697
|
}
|
|
698
698
|
|
|
699
699
|
.ft-text-field--filled .ft-text-field--input-panel {
|
|
700
|
-
border-radius: ${
|
|
700
|
+
border-radius: ${De.borderRadiusS} ${De.borderRadiusS} 0 0;
|
|
701
701
|
}
|
|
702
702
|
|
|
703
703
|
.ft-text-field--outlined .ft-text-field--input-panel {
|
|
704
|
-
border-radius: ${
|
|
704
|
+
border-radius: ${De.borderRadiusS};
|
|
705
705
|
}
|
|
706
706
|
|
|
707
707
|
.ft-text-field--helper-text {
|
|
708
|
-
padding: 0 12px 0 ${
|
|
709
|
-
color: ${
|
|
708
|
+
padding: 0 12px 0 ${De.horizontalSpacing};
|
|
709
|
+
color: ${De.helperColor};
|
|
710
710
|
}
|
|
711
711
|
|
|
712
712
|
.ft-text-field--in-error .ft-text-field--input,
|
|
713
713
|
.ft-text-field--in-error .ft-text-field--helper-text,
|
|
714
714
|
.ft-text-field--in-error .ft-text-field--prefix {
|
|
715
|
-
color: ${
|
|
715
|
+
color: ${De.colorError};
|
|
716
716
|
}
|
|
717
717
|
|
|
718
718
|
.ft-text-field--icon {
|
|
719
719
|
align-self: center;
|
|
720
720
|
margin-left: 8px;
|
|
721
|
-
color: ${
|
|
721
|
+
color: ${De.iconColor};
|
|
722
722
|
}
|
|
723
723
|
|
|
724
724
|
.ft-text-field--container {
|
|
@@ -731,13 +731,13 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
731
731
|
position: absolute;
|
|
732
732
|
left: 0;
|
|
733
733
|
right: 0;
|
|
734
|
-
z-index: ${
|
|
735
|
-
background: ${
|
|
736
|
-
border: 1px solid ${
|
|
737
|
-
border-radius: 0 0 ${
|
|
738
|
-
box-shadow: ${
|
|
734
|
+
z-index: ${De.floatingZIndex};
|
|
735
|
+
background: ${De.colorSurface};
|
|
736
|
+
border: 1px solid ${De.colorOutline};
|
|
737
|
+
border-radius: 0 0 ${De.borderRadiusS} ${De.borderRadiusS};
|
|
738
|
+
box-shadow: ${De.elevation02};
|
|
739
739
|
outline: none;
|
|
740
|
-
max-height: ${
|
|
740
|
+
max-height: ${De.suggestSize};
|
|
741
741
|
overflow-y: auto;
|
|
742
742
|
}
|
|
743
743
|
|
|
@@ -754,9 +754,9 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
754
754
|
}
|
|
755
755
|
|
|
756
756
|
.ft-text-field--with-icon {
|
|
757
|
-
${e.setVariable(
|
|
757
|
+
${e.setVariable(oe.labelMaxWidth,`calc(100% - ${$e.size} - ${oe.horizontalSpacing})`)};
|
|
758
758
|
}
|
|
759
|
-
`;var
|
|
759
|
+
`;var je=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 Ne extends e.FtLitElement{constructor(){super(...arguments),this._value="",this.dispatchedValue="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.filterSuggestions=!1,this.focused=!1,this.suggestionsOnTop=!1,this.hideSuggestions=!1,this.visibleSuggestions=[]}get value(){return this._value}set value(t){this.setInternalValue(t),this.dispatchedValue=t}setInternalValue(t){const e=this._value;this._value=t,this.requestUpdate("value",e)}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--hide-suggestions":0===this.visibleSuggestions.length||this.hideSuggestions,"ft-text-field--raised-label":this.focused||""!=this.value,"ft-text-field--with-icon":!!this.icon};return i.html`
|
|
760
760
|
<div class="${l.classMap(t)}">
|
|
761
761
|
<div class="ft-text-field--main-panel"
|
|
762
762
|
@keydown=${this.handleKeyboardNavigation}
|
|
@@ -776,7 +776,7 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
776
776
|
</ft-typography>
|
|
777
777
|
`:i.nothing}
|
|
778
778
|
<input type="text"
|
|
779
|
-
maxlength=${(t=>null!=t?t:
|
|
779
|
+
maxlength=${(t=>null!=t?t:I)(this.maxLength||void 0)}
|
|
780
780
|
aria-label="${this.label}"
|
|
781
781
|
class="ft-typography--body1 ft-text-field--input"
|
|
782
782
|
?disabled=${this.disabled}
|
|
@@ -802,7 +802,7 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
802
802
|
</ft-typography>
|
|
803
803
|
`:i.nothing}
|
|
804
804
|
</div>
|
|
805
|
-
`}updated(t){super.updated(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),!this.hideSuggestions&&this.visibleSuggestions.length>0){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)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(i,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}}
|
|
805
|
+
`}updated(t){super.updated(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),!this.hideSuggestions&&this.visibleSuggestions.length>0){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)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(i,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}}Ne.elementDefinitions={"ft-input-label":le,"ft-ripple":ye,"ft-typography":ie,"ft-icon":Se},Ne.styles=[Gt,Be],je([o.property()],Ne.prototype,"label",void 0),je([o.property({noAccessor:!0})],Ne.prototype,"value",null),je([o.state()],Ne.prototype,"dispatchedValue",void 0),je([o.property()],Ne.prototype,"helper",void 0),je([o.property({type:Boolean})],Ne.prototype,"outlined",void 0),je([o.property({type:Boolean})],Ne.prototype,"disabled",void 0),je([o.property({type:Boolean})],Ne.prototype,"error",void 0),je([o.property()],Ne.prototype,"prefix",void 0),je([o.property()],Ne.prototype,"icon",void 0),je([o.property()],Ne.prototype,"iconVariant",void 0),je([o.property({type:Boolean})],Ne.prototype,"filterSuggestions",void 0),je([o.property({type:Number})],Ne.prototype,"maxLength",void 0),je([o.state()],Ne.prototype,"focused",void 0),je([o.state()],Ne.prototype,"suggestionsOnTop",void 0),je([o.state()],Ne.prototype,"hideSuggestions",void 0),je([o.state()],Ne.prototype,"visibleSuggestions",void 0),je([o.query(".ft-text-field--main-panel")],Ne.prototype,"mainPanel",void 0),je([o.query(".ft-text-field--input")],Ne.prototype,"input",void 0),je([o.query(".ft-text-field--suggestions")],Ne.prototype,"suggestionsContainer",void 0),je([o.queryAssignedElements({selector:"ft-text-field-suggestion"})],Ne.prototype,"suggestions",void 0);const Ze=i.css`
|
|
806
806
|
.ft-text-field-suggestion {
|
|
807
807
|
position: relative;
|
|
808
808
|
padding: 8px 16px;
|
|
@@ -827,7 +827,7 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
827
827
|
slot {
|
|
828
828
|
pointer-events: none;
|
|
829
829
|
}
|
|
830
|
-
`;var
|
|
830
|
+
`;var Fe=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 Ae extends CustomEvent{constructor(t){super("suggestion-selected",{detail:t,bubbles:!0,composed:!0})}}class Te extends e.FtLitElement{render(){return i.html`
|
|
831
831
|
<div class="ft-text-field-suggestion"
|
|
832
832
|
tabindex="-1"
|
|
833
833
|
@keydown=${this.onKeyDown}
|
|
@@ -839,7 +839,7 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
839
839
|
<slot></slot>
|
|
840
840
|
</ft-typography>
|
|
841
841
|
</div>
|
|
842
|
-
`}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
|
|
842
|
+
`}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 Ae(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())}}Te.elementDefinitions={"ft-ripple":ye,"ft-typography":ie,"ft-icon":Se},Te.styles=Ze,Fe([o.property()],Te.prototype,"value",void 0),Fe([o.query(".ft-text-field-suggestion")],Te.prototype,"container",void 0),Fe([o.queryAssignedNodes()],Te.prototype,"assignedNodes",void 0),e.customElement("ft-text-field")(Ne),e.customElement("ft-text-field-suggestion")(Te);const Me=e.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),Re=e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),_e=e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),Ue=e.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),He=e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),Pe=e.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),We=i.css`
|
|
843
843
|
.ft-tooltip--container {
|
|
844
844
|
display: block;
|
|
845
845
|
position: relative;
|
|
@@ -855,23 +855,23 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
855
855
|
box-sizing: border-box;
|
|
856
856
|
overflow: hidden;
|
|
857
857
|
width: max-content;
|
|
858
|
-
max-width: ${
|
|
858
|
+
max-width: ${Pe};
|
|
859
859
|
text-align: center;
|
|
860
|
-
padding: ${
|
|
861
|
-
z-index: ${
|
|
860
|
+
padding: ${Me};
|
|
861
|
+
z-index: ${Ue};
|
|
862
862
|
}
|
|
863
863
|
|
|
864
864
|
.ft-tooltip--content {
|
|
865
865
|
padding: 4px 8px;
|
|
866
|
-
border-radius: ${
|
|
867
|
-
background-color: ${
|
|
868
|
-
color: ${
|
|
866
|
+
border-radius: ${He};
|
|
867
|
+
background-color: ${_e};
|
|
868
|
+
color: ${Re};
|
|
869
869
|
top: -500px;
|
|
870
870
|
left: -500px;
|
|
871
871
|
position: relative;
|
|
872
872
|
word-break: break-word;
|
|
873
873
|
}
|
|
874
|
-
`;var
|
|
874
|
+
`;var Ve=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 Ke 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`
|
|
875
875
|
<div part="container"
|
|
876
876
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
877
877
|
@mouseenter=${this.onHover}
|
|
@@ -889,7 +889,7 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
889
889
|
</div>
|
|
890
890
|
</div>
|
|
891
891
|
</div>
|
|
892
|
-
`}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, ${
|
|
892
|
+
`}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, ${Pe})`}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())}}Ke.elementDefinitions={"ft-typography":ie},Ke.styles=We,Ve([o.property()],Ke.prototype,"text",void 0),Ve([o.property({type:Boolean})],Ke.prototype,"manual",void 0),Ve([o.property({type:Boolean})],Ke.prototype,"inline",void 0),Ve([o.property({type:Number})],Ke.prototype,"delay",void 0),Ve([o.property()],Ke.prototype,"position",void 0),Ve([o.queryAssignedNodes("",!0)],Ke.prototype,"slotNodes",void 0),Ve([o.query(".ft-tooltip--container")],Ke.prototype,"container",void 0),Ve([o.query("slot")],Ke.prototype,"target",void 0),Ve([o.query(".ft-tooltip")],Ke.prototype,"tooltip",void 0),Ve([o.query(".ft-tooltip--content")],Ke.prototype,"tooltipContent",void 0),Ve([o.state()],Ke.prototype,"visible",void 0),e.customElement("ft-tooltip")(Ke);const Le={color:e.FtCssVariableFactory.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Ge=i.css`
|
|
893
893
|
:host {
|
|
894
894
|
line-height: 0;
|
|
895
895
|
}
|
|
@@ -898,8 +898,8 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
898
898
|
display: inline-block;
|
|
899
899
|
position: relative;
|
|
900
900
|
|
|
901
|
-
width: ${
|
|
902
|
-
height: ${
|
|
901
|
+
width: ${Le.size};
|
|
902
|
+
height: ${Le.size};
|
|
903
903
|
}
|
|
904
904
|
|
|
905
905
|
.ft-loader div {
|
|
@@ -908,7 +908,7 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
908
908
|
width: 25%;
|
|
909
909
|
height: 25%;
|
|
910
910
|
border-radius: 50%;
|
|
911
|
-
background: ${
|
|
911
|
+
background: ${Le.color};
|
|
912
912
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
913
913
|
}
|
|
914
914
|
|
|
@@ -955,17 +955,17 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
955
955
|
transform: translate(0, 0);
|
|
956
956
|
}
|
|
957
957
|
100% {
|
|
958
|
-
transform: translate(calc(0.35 * ${
|
|
958
|
+
transform: translate(calc(0.35 * ${Le.size}), 0);
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
|
-
`;class
|
|
961
|
+
`;class qe extends e.FtLitElement{render(){return i.html`
|
|
962
962
|
<div class="ft-loader">
|
|
963
963
|
<div></div>
|
|
964
964
|
<div></div>
|
|
965
965
|
<div></div>
|
|
966
966
|
<div></div>
|
|
967
967
|
</div>
|
|
968
|
-
`}}
|
|
968
|
+
`}}qe.styles=Ge,e.customElement("ft-loader")(qe);const Xe=e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorPrimary),Ye={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorSurface),borderRadius:e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusL),color:Xe,fontSize:e.FtCssVariableFactory.extend("--ft-button-font-size",Pt.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:e.FtCssVariableFactory.extend("--ft-button-ripple-color",Xe),verticalPadding:e.FtCssVariableFactory.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:e.FtCssVariableFactory.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:e.FtCssVariableFactory.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},Je=e.FtCssVariableFactory.extend("--ft-button-primary-color",e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorOnPrimary)),Qe={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-primary-background-color",e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorPrimary)),color:Je,rippleColor:e.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Je)},ti=e.FtCssVariableFactory.extend("--ft-button-dense-border-radius",e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusM)),ei=e.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","SIZE","2px"),ii=e.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","SIZE","4px"),oi=e.FtCssVariableFactory.create("--ft-button-dense-icon-padding","SIZE","4px"),si=[e.noTextSelect,i.css`
|
|
969
969
|
:host {
|
|
970
970
|
display: inline-block;
|
|
971
971
|
max-width: 100%;
|
|
@@ -976,7 +976,7 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
976
976
|
box-shadow: 0px 0px 0px transparent;
|
|
977
977
|
border: 0px solid transparent;
|
|
978
978
|
text-shadow: 0px 0px 0px transparent;
|
|
979
|
-
font-size: ${
|
|
979
|
+
font-size: ${Ye.fontSize};
|
|
980
980
|
}
|
|
981
981
|
|
|
982
982
|
button:hover {
|
|
@@ -1005,32 +1005,32 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1005
1005
|
border: none;
|
|
1006
1006
|
pointer-events: auto;
|
|
1007
1007
|
|
|
1008
|
-
--ft-button-internal-line-height: calc(${
|
|
1009
|
-
--ft-button-internal-color: ${
|
|
1010
|
-
${e.setVariable(
|
|
1011
|
-
${e.setVariable(
|
|
1012
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
1008
|
+
--ft-button-internal-line-height: calc(${Ye.fontSize} + 2px);
|
|
1009
|
+
--ft-button-internal-color: ${Ye.color};
|
|
1010
|
+
${e.setVariable($e.size,Ye.iconSize)};
|
|
1011
|
+
${e.setVariable(ae.color,Ye.rippleColor)};
|
|
1012
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ye.iconSize});
|
|
1013
1013
|
|
|
1014
|
-
border-radius: ${
|
|
1015
|
-
padding: ${
|
|
1016
|
-
background-color: ${
|
|
1014
|
+
border-radius: ${Ye.borderRadius};
|
|
1015
|
+
padding: ${Ye.verticalPadding} ${Ye.horizontalPadding};
|
|
1016
|
+
background-color: ${Ye.backgroundColor};
|
|
1017
1017
|
color: var(--ft-button-internal-color);
|
|
1018
1018
|
-webkit-mask-image: radial-gradient(white, black);
|
|
1019
1019
|
}
|
|
1020
1020
|
|
|
1021
1021
|
.ft-button.ft-button--outlined {
|
|
1022
1022
|
border: 1px solid var(--ft-button-internal-color);
|
|
1023
|
-
padding: calc(${
|
|
1023
|
+
padding: calc(${Ye.verticalPadding} - 1px) calc(${Ye.horizontalPadding} - 1px);
|
|
1024
1024
|
}
|
|
1025
1025
|
|
|
1026
1026
|
.ft-button.ft-button--dense {
|
|
1027
|
-
padding: ${
|
|
1028
|
-
border-radius: ${
|
|
1029
|
-
gap: ${
|
|
1027
|
+
padding: ${ei} ${ii};
|
|
1028
|
+
border-radius: ${ti};
|
|
1029
|
+
gap: ${oi};
|
|
1030
1030
|
}
|
|
1031
1031
|
|
|
1032
1032
|
.ft-button.ft-button--dense.ft-button--outlined {
|
|
1033
|
-
padding: calc(${
|
|
1033
|
+
padding: calc(${ei} - 1px) calc(${ii} - 1px);
|
|
1034
1034
|
}
|
|
1035
1035
|
|
|
1036
1036
|
.ft-button:not([disabled]):hover {
|
|
@@ -1038,22 +1038,22 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1038
1038
|
}
|
|
1039
1039
|
|
|
1040
1040
|
.ft-button--round {
|
|
1041
|
-
border-radius: calc(var(--ft-button-internal-content-height) / 2 + ${
|
|
1041
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + ${Ye.verticalPadding});
|
|
1042
1042
|
}
|
|
1043
1043
|
|
|
1044
1044
|
.ft-button--round.ft-button--dense {
|
|
1045
|
-
border-radius: calc(var(--ft-button-internal-content-height) / 2 + ${
|
|
1045
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + ${ei});
|
|
1046
1046
|
}
|
|
1047
1047
|
|
|
1048
1048
|
.ft-button[disabled] {
|
|
1049
1049
|
filter: grayscale(1);
|
|
1050
|
-
opacity: ${
|
|
1050
|
+
opacity: ${Ye.opacityDisabled};
|
|
1051
1051
|
}
|
|
1052
1052
|
|
|
1053
1053
|
.ft-button.ft-button--primary {
|
|
1054
|
-
background-color: ${
|
|
1055
|
-
--ft-button-internal-color: ${
|
|
1056
|
-
${e.setVariable(
|
|
1054
|
+
background-color: ${Qe.backgroundColor};
|
|
1055
|
+
--ft-button-internal-color: ${Qe.color};
|
|
1056
|
+
${e.setVariable(ae.color,Qe.rippleColor)};
|
|
1057
1057
|
}
|
|
1058
1058
|
|
|
1059
1059
|
.ft-button:focus {
|
|
@@ -1066,13 +1066,13 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1066
1066
|
white-space: nowrap;
|
|
1067
1067
|
text-overflow: ellipsis;
|
|
1068
1068
|
display: block;
|
|
1069
|
-
margin: 0 ${
|
|
1070
|
-
${e.setVariable(
|
|
1071
|
-
${e.setVariable(
|
|
1069
|
+
margin: 0 ${Ye.iconPadding};
|
|
1070
|
+
${e.setVariable(Pt.fontSize,"1em")};
|
|
1071
|
+
${e.setVariable(Pt.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
1072
1072
|
}
|
|
1073
1073
|
|
|
1074
1074
|
.ft-button--dense .ft-button--label {
|
|
1075
|
-
margin: 0 ${
|
|
1075
|
+
margin: 0 ${oi};
|
|
1076
1076
|
}
|
|
1077
1077
|
|
|
1078
1078
|
.ft-button--label[hidden] {
|
|
@@ -1085,13 +1085,13 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1085
1085
|
}
|
|
1086
1086
|
|
|
1087
1087
|
.ft-button--label[hidden] + ft-icon {
|
|
1088
|
-
margin: 0 calc(${
|
|
1089
|
-
padding: 0 ${
|
|
1088
|
+
margin: 0 calc(${Ye.horizontalPadding} * -1);
|
|
1089
|
+
padding: 0 ${Ye.verticalPadding};
|
|
1090
1090
|
}
|
|
1091
1091
|
|
|
1092
1092
|
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
1093
|
-
margin: 0 calc(${
|
|
1094
|
-
padding: 0 ${
|
|
1093
|
+
margin: 0 calc(${ii} * -1);
|
|
1094
|
+
padding: 0 ${ei};
|
|
1095
1095
|
}
|
|
1096
1096
|
|
|
1097
1097
|
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
@@ -1100,10 +1100,10 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1100
1100
|
}
|
|
1101
1101
|
|
|
1102
1102
|
ft-loader {
|
|
1103
|
-
${e.setVariable(
|
|
1104
|
-
${e.setVariable(
|
|
1103
|
+
${e.setVariable(Le.size,Ye.iconSize)};
|
|
1104
|
+
${e.setVariable(Le.color,"var(--ft-button-internal-color)")};
|
|
1105
1105
|
}
|
|
1106
|
-
`];var
|
|
1106
|
+
`];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};class li extends e.FtLitElement{constructor(){super(...arguments),this.role="button",this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.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-no-text-select":!0};return this.addTooltipIfNeeded(i.html`
|
|
1107
1107
|
<button part="button"
|
|
1108
1108
|
class="${l.classMap(t)}"
|
|
1109
1109
|
aria-label="${this.getLabel()}"
|
|
@@ -1126,7 +1126,7 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1126
1126
|
</ft-tooltip>
|
|
1127
1127
|
`:t}resolveIcon(){return this.loading?i.html`
|
|
1128
1128
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?i.html`
|
|
1129
|
-
<ft-icon part="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}}
|
|
1129
|
+
<ft-icon part="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}}li.elementDefinitions={"ft-ripple":ye,"ft-tooltip":Ke,"ft-typography":ie,"ft-icon":Se,"ft-loader":qe},li.styles=[e.safariEllipsisFix,si],ni([o.property({type:String,reflect:!0})],li.prototype,"role",void 0),ni([o.property({type:Boolean})],li.prototype,"primary",void 0),ni([o.property({type:Boolean})],li.prototype,"outlined",void 0),ni([o.property({type:Boolean})],li.prototype,"disabled",void 0),ni([o.property({type:Boolean})],li.prototype,"dense",void 0),ni([o.property({type:Boolean})],li.prototype,"round",void 0),ni([o.property()],li.prototype,"label",void 0),ni([o.property()],li.prototype,"icon",void 0),ni([o.property()],li.prototype,"iconVariant",void 0),ni([o.property({type:Boolean})],li.prototype,"trailingIcon",void 0),ni([o.property({type:Boolean})],li.prototype,"loading",void 0),ni([o.property()],li.prototype,"tooltipPosition",void 0),ni([o.property({type:Boolean})],li.prototype,"hideTooltip",void 0),ni([o.property({type:Boolean})],li.prototype,"forceTooltip",void 0),ni([o.query(".ft-button")],li.prototype,"button",void 0),ni([o.query(".ft-button--label slot")],li.prototype,"slottedContent",void 0),e.customElement("ft-button")(li);class ri extends CustomEvent{constructor(t){super("row-click",{detail:t})}}const ai={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"),cellVerticalBorderWidth:e.FtCssVariableFactory.create("--ft-filterable-table-cell-vertical-border-width","SIZE","1px"),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")},pi=i.css`
|
|
1130
1130
|
:host {
|
|
1131
1131
|
display: block;
|
|
1132
1132
|
}
|
|
@@ -1142,15 +1142,15 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1142
1142
|
.header-cell {
|
|
1143
1143
|
display: flex;
|
|
1144
1144
|
flex-direction: column;
|
|
1145
|
-
background: ${
|
|
1146
|
-
color: ${
|
|
1145
|
+
background: ${ai.headerBackground};
|
|
1146
|
+
color: ${ai.colorOnSurfaceHigh};
|
|
1147
1147
|
padding: .5rem 1rem;
|
|
1148
|
-
font-family: ${
|
|
1148
|
+
font-family: ${ai.titleFont};
|
|
1149
1149
|
}
|
|
1150
1150
|
|
|
1151
1151
|
.header-cell--sticky {
|
|
1152
1152
|
top: 0;
|
|
1153
|
-
z-index: ${
|
|
1153
|
+
z-index: ${ai.stickyHeaderZIndex};
|
|
1154
1154
|
position: sticky;
|
|
1155
1155
|
}
|
|
1156
1156
|
|
|
@@ -1168,8 +1168,8 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1168
1168
|
}
|
|
1169
1169
|
|
|
1170
1170
|
.column-title-container ft-button {
|
|
1171
|
-
${e.setVariable(
|
|
1172
|
-
${e.setVariable(
|
|
1171
|
+
${e.setVariable(Ye.backgroundColor,ai.headerBackground)};
|
|
1172
|
+
${e.setVariable(Ye.color,ai.colorOnSurfaceHigh)};
|
|
1173
1173
|
}
|
|
1174
1174
|
|
|
1175
1175
|
.column-title {
|
|
@@ -1198,31 +1198,31 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1198
1198
|
|
|
1199
1199
|
.cell {
|
|
1200
1200
|
padding: 1rem;
|
|
1201
|
-
border-left-color: ${
|
|
1201
|
+
border-left-color: ${ai.headerBackground};
|
|
1202
1202
|
border-left-style: solid;
|
|
1203
|
-
border-left-width: ${
|
|
1204
|
-
border-bottom: 1px solid ${
|
|
1203
|
+
border-left-width: ${ai.cellVerticalBorderWidth};
|
|
1204
|
+
border-bottom: 1px solid ${ai.headerBackground};
|
|
1205
1205
|
overflow-x: auto;
|
|
1206
1206
|
display: flex;
|
|
1207
1207
|
align-items: center;
|
|
1208
|
-
font-family: ${
|
|
1208
|
+
font-family: ${ai.contentFont};
|
|
1209
1209
|
}
|
|
1210
1210
|
|
|
1211
1211
|
/* Even is 2n+1 and odd is 2n because of the header */
|
|
1212
1212
|
.row:nth-child(2n) > .cell {
|
|
1213
|
-
background: ${
|
|
1213
|
+
background: ${ai.oddRowBackground};
|
|
1214
1214
|
}
|
|
1215
1215
|
|
|
1216
1216
|
.row:nth-child(2n + 1) > .cell {
|
|
1217
|
-
background: ${
|
|
1217
|
+
background: ${ai.evenRowBackground};
|
|
1218
1218
|
}
|
|
1219
1219
|
|
|
1220
1220
|
.row:hover > .cell {
|
|
1221
|
-
background: ${
|
|
1221
|
+
background: ${ai.rowHoverBackground};
|
|
1222
1222
|
}
|
|
1223
1223
|
|
|
1224
1224
|
.cell:last-of-type {
|
|
1225
|
-
border-right: 1px solid ${
|
|
1225
|
+
border-right: 1px solid ${ai.headerBackground};
|
|
1226
1226
|
}
|
|
1227
1227
|
|
|
1228
1228
|
.row:last-of-type .cell:first-of-type {
|
|
@@ -1236,7 +1236,7 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1236
1236
|
.hidden {
|
|
1237
1237
|
visibility: hidden;
|
|
1238
1238
|
}
|
|
1239
|
-
`;var
|
|
1239
|
+
`;var fi=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 di=t=>i.html`${t}`,hi=(t,e)=>t-e;class ci 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`
|
|
1240
1240
|
<style>
|
|
1241
1241
|
.table {
|
|
1242
1242
|
grid-template-columns: repeat(${this.columns.length}, minmax(min-content, auto));
|
|
@@ -1248,12 +1248,12 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1248
1248
|
</div>
|
|
1249
1249
|
${s.repeat(t,((t,e)=>"row-"+e),((t,e)=>i.html`
|
|
1250
1250
|
<div class="row"
|
|
1251
|
-
@click=${()=>this.dispatchEvent(new
|
|
1251
|
+
@click=${()=>this.dispatchEvent(new ri(t))}>
|
|
1252
1252
|
${s.repeat(this.columns,((t,i)=>"cell-"+i+"-"+e),((i,o)=>this.renderCell(i,o,t,e)))}
|
|
1253
1253
|
</div>
|
|
1254
1254
|
`))}
|
|
1255
1255
|
</div>
|
|
1256
|
-
`}filterData(){return this.filters.reduce(((t,e,i)=>{var o;const s=this.columns[i];if(e&&e.value)switch(null!==(o=s.filter)&&void 0!==o?o:"text"){case"text":return t.filter((t=>this.getValueAsString(s,t,i).toLowerCase().includes(e.value.toLowerCase())));case"select":return t.filter((t=>this.getValueAsString(s,t,i)===e.value))}return t}),this.data)}sortData(t){var e;if(this.currentSort){const i=this.columns[this.currentSort.column],o=null!==(e=i.comparator)&&void 0!==e?e:
|
|
1256
|
+
`}filterData(){return this.filters.reduce(((t,e,i)=>{var o;const s=this.columns[i];if(e&&e.value)switch(null!==(o=s.filter)&&void 0!==o?o:"text"){case"text":return t.filter((t=>this.getValueAsString(s,t,i).toLowerCase().includes(e.value.toLowerCase())));case"select":return t.filter((t=>this.getValueAsString(s,t,i)===e.value))}return t}),this.data)}sortData(t){var e;if(this.currentSort){const i=this.columns[this.currentSort.column],o=null!==(e=i.comparator)&&void 0!==e?e:hi,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`
|
|
1257
1257
|
<div class="${l.classMap(o)}"
|
|
1258
1258
|
part="${this.columnPart("header-cell",e)}">
|
|
1259
1259
|
<div class="column-title-container">
|
|
@@ -1270,6 +1270,7 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1270
1270
|
round
|
|
1271
1271
|
dense
|
|
1272
1272
|
class="${null===(o=t.sortable)||void 0===o||o?"":"hidden"}"
|
|
1273
|
+
iconVariant="material"
|
|
1273
1274
|
icon="${n}"
|
|
1274
1275
|
label="Sort ${t.title}"
|
|
1275
1276
|
@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"}}}
|
|
@@ -1294,9 +1295,9 @@ const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1294
1295
|
`))}
|
|
1295
1296
|
</ft-select>
|
|
1296
1297
|
</div>
|
|
1297
|
-
`:i.nothing}return i.nothing}columnPart(t,e){return`${t} ${t}-column-${e}`}renderCell(t,e,o,s){var l;const r=null!==(l=t.render)&&void 0!==l?l:
|
|
1298
|
+
`:i.nothing}return i.nothing}columnPart(t,e){return`${t} ${t}-column-${e}`}renderCell(t,e,o,s){var l;const r=null!==(l=t.render)&&void 0!==l?l:di;return i.html`
|
|
1298
1299
|
<div class="cell"
|
|
1299
1300
|
part="${this.columnPart("cell",e)} cell-row-${s} cell-column-${e}-row-${s}">
|
|
1300
1301
|
${(t=>{const e=r(t,s);return"string"==typeof e?n.unsafeHTML(e):e})(this.getValue(t,o))}
|
|
1301
1302
|
</div>
|
|
1302
|
-
`}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)}}
|
|
1303
|
+
`}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)}}ci.styles=pi,fi([o.property({attribute:!1})],ci.prototype,"data",void 0),fi([o.property({attribute:!1})],ci.prototype,"columns",void 0),fi([o.property({attribute:!1})],ci.prototype,"sort",void 0),fi([o.property()],ci.prototype,"stickyHeaders",void 0),fi([o.state()],ci.prototype,"currentSort",void 0),e.customElement("ft-filterable-table")(ci),t.FtFilterableTable=ci,t.FtFilterableTableCssVariables=ai,t.RowClickEvent=ri,t.styles=pi}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litUnsafeHTML,ftGlobals.litClassMap);
|