@fluid-topics/ft-filterable-table 0.3.18 → 0.3.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-filterable-table.light.js +226 -226
- package/build/ft-filterable-table.min.js +272 -272
- package/package.json +6 -6
|
@@ -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=
|
|
7
|
+
var r;const a=window,p=a.trustedTypes,f=p?p.createPolicy("lit-html",{createHTML:t=>t}):void 0,d=`lit$${(Math.random()+"").slice(9)}$`,h="?"+d,c=`<${h}>`,u=document,x=(t="")=>u.createComment(t),b=t=>null===t||"object"!=typeof t&&"function"!=typeof t,v=Array.isArray,g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,m=/>/g,$=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),w=/'/g,k=/"/g,S=/^(?:script|style|textarea|title)$/i,z=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),O=Symbol.for("lit-noChange"),C=Symbol.for("lit-nothing"),E=new WeakMap,B=u.createTreeWalker(u,129,null,!1),D=(t,e)=>{const i=t.length-1,o=[];let n,l=2===e?"<svg>":"",s=g;for(let e=0;e<i;e++){const i=t[e];let r,a,p=-1,f=0;for(;f<i.length&&(s.lastIndex=f,a=s.exec(i),null!==a);)f=s.lastIndex,s===g?"!--"===a[1]?s=y:void 0!==a[1]?s=m:void 0!==a[2]?(S.test(a[2])&&(n=RegExp("</"+a[2],"g")),s=$):void 0!==a[3]&&(s=$):s===$?">"===a[0]?(s=null!=n?n:g,p=-1):void 0===a[1]?p=-2:(p=s.lastIndex-a[2].length,r=a[1],s=void 0===a[3]?$:'"'===a[3]?k:w):s===k||s===w?s=$:s===y||s===m?s=g:(s=$,n=void 0);const h=s===$&&t[e+1].startsWith("/>")?" ":"";l+=s===g?i+c:p>=0?(o.push(r),i.slice(0,p)+"$lit$"+i.slice(p)+d+h):i+d+(-2===p?(o.push(void 0),e):h)}const r=l+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==f?f.createHTML(r):r,o]};class I{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,l=0;const s=t.length-1,r=this.parts,[a,f]=D(t,e);if(this.el=I.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<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(d)){const i=f[l++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(d),e=/([.?@])?(.*)/.exec(i);r.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?Z:"?"===e[1]?T:"@"===e[1]?M:A})}else r.push({type:6,index:n})}for(const e of t)o.removeAttribute(e)}if(S.test(o.tagName)){const t=o.textContent.split(d),e=t.length-1;if(e>0){o.textContent=p?p.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],x()),B.nextNode(),r.push({type:2,index:++n});o.append(t[e],x())}}}else if(8===o.nodeType)if(o.data===h)r.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(d,t+1));)r.push({type:7,index:n}),t+=d.length-1}n++}}static createElement(t,e){const i=u.createElement("template");return i.innerHTML=t,i}}function j(t,e,i=t,o){var n,l,s,r;if(e===O)return e;let a=void 0!==o?null===(n=i._$Co)||void 0===n?void 0:n[o]:i._$Cl;const p=b(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(l=null==a?void 0:a._$AO)||void 0===l||l.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,i,o)),void 0!==o?(null!==(s=(r=i)._$Co)&&void 0!==s?s:r._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=j(t,a._$AS(t,e.values),a,o)),e}class F{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:u).importNode(i,!0);B.currentNode=n;let l=B.nextNode(),s=0,r=0,a=o[0];for(;void 0!==a;){if(s===a.index){let e;2===a.type?e=new N(l,l.nextSibling,this,t):1===a.type?e=new a.ctor(l,a.name,a.strings,this,t):6===a.type&&(e=new _(l,this,t)),this.u.push(e),a=o[++r]}s!==(null==a?void 0:a.index)&&(l=B.nextNode(),s++)}return n}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class N{constructor(t,e,i,o){var n;this.type=2,this._$AH=C,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=j(this,t,e),b(t)?t===C||null==t||""===t?(this._$AH!==C&&this._$AR(),this._$AH=C):t!==this._$AH&&t!==O&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>v(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==C&&b(this._$AH)?this._$AA.nextSibling.data=t:this.T(u.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=I.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.p(i);else{const t=new F(n,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=E.get(t.strings);return void 0===e&&E.set(t.strings,e=new I(t)),e}k(t){v(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new N(this.O(x()),this.O(x()),this,this.options)):i=e[o],i._$AI(n),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class A{constructor(t,e,i,o,n){this.type=1,this._$AH=C,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=C}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const n=this.strings;let l=!1;if(void 0===n)t=j(this,t,e,0),l=!b(t)||t!==this._$AH&&t!==O,l&&(this._$AH=t);else{const o=t;let s,r;for(t=n[0],s=0;s<n.length-1;s++)r=j(this,o[i+s],e,s),r===O&&(r=this._$AH[s]),l||(l=!b(r)||r!==this._$AH[s]),r===C?t=C:t!==C&&(t+=(null!=r?r:"")+n[s+1]),this._$AH[s]=r}l&&!o&&this.j(t)}j(t){t===C?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Z extends A{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===C?void 0:t}}const R=p?p.emptyScript:"";class T extends A{constructor(){super(...arguments),this.type=4}j(t){t&&t!==C?this.element.setAttribute(this.name,R):this.element.removeAttribute(this.name)}}class M extends A{constructor(t,e,i,o,n){super(t,e,i,o,n),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=j(this,t,e,0))&&void 0!==i?i:C)===O)return;const o=this._$AH,n=t===C&&o!==C||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,l=t!==C&&(o===C||n);n&&this.element.removeEventListener(this.name,this,o),l&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class _{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){j(this,t)}}const U=a.litHtmlPolyfillSupport;null==U||U(I,N),(null!==(r=a.litHtmlVersions)&&void 0!==r?r:a.litHtmlVersions=[]).push("2.4.0");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
13
|
+
const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t._$litStatic$},K=t=>({_$litStatic$:t,r:H}),L=new Map,P=(t=>(e,...i)=>{const o=i.length;let n,l;const s=[],r=[];let a,p=0,f=!1;for(;p<o;){for(a=e[p];p<o&&void 0!==(l=i[p],n=W(l));)a+=n+e[++p],f=!0;r.push(l),s.push(a),p++}if(p===o&&s.push(e[o]),f){const t=s.join("$$lit$$");void 0===(e=L.get(t))&&(s.raw=s,L.set(t,e=s)),i=r}return t(e,...i)})(z);var G;!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"}(G||(G={}));const V=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),q=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),X={fontFamily:q,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},Y=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",V),J=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",X.fontSize,"20px"),Q=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",X.fontWeight,"normal"),tt=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",X.letterSpacing,"0.15px"),et=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",X.lineHeight,"1.2"),it=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",X.textTransform,"inherit"),ot=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",V),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",X.fontSize,"14px"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",X.fontWeight,"normal"),st=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",X.letterSpacing,"0.105px"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",X.lineHeight,"1.7"),at=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",X.textTransform,"inherit"),pt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",q),ft=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",X.fontSize,"16px"),dt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",X.fontWeight,"600"),ht=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",X.letterSpacing,"0.144px"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",X.lineHeight,"1.5"),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",X.textTransform,"inherit"),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",q),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",X.fontSize,"14px"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",X.fontWeight,"normal"),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",X.letterSpacing,"0.098px"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",X.lineHeight,"1.7"),mt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",X.textTransform,"inherit"),$t={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",X.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",X.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",X.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",X.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",X.textTransform,"inherit")},wt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",q),kt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",X.fontSize,"14px"),St=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",X.fontWeight,"normal"),zt=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",X.letterSpacing,"0.252px"),Ot=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",X.lineHeight,"1.4"),Ct=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",X.textTransform,"inherit"),Et={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",X.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",X.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",X.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",X.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",X.textTransform,"inherit")},Bt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",q),Dt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",X.fontSize,"10px"),It=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",X.fontWeight,"normal"),jt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",X.letterSpacing,"0.33px"),Ft=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",X.lineHeight,"1.6"),Nt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",X.textTransform,"inherit"),At=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",q),Zt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",X.fontSize,"10px"),Rt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",X.fontWeight,"normal"),Tt=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",X.letterSpacing,"1.5px"),Mt=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",X.lineHeight,"1.6"),_t=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",X.textTransform,"uppercase"),Ut={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-button-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-button-font-size",X.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",X.fontWeight,"600"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",X.letterSpacing,"1.246px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-button-line-height",X.lineHeight,"1.15"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",X.textTransform,"uppercase")},Ht=i.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
|
-
font-family: ${
|
|
16
|
-
font-size: ${
|
|
17
|
-
font-weight: ${
|
|
18
|
-
letter-spacing: ${
|
|
19
|
-
line-height: ${
|
|
20
|
-
text-transform: ${
|
|
21
|
-
}
|
|
22
|
-
`,Ht=i.css`
|
|
23
|
-
.ft-typography--title-dense {
|
|
24
|
-
font-family: ${it};
|
|
25
|
-
font-size: ${ot};
|
|
26
|
-
font-weight: ${nt};
|
|
27
|
-
letter-spacing: ${lt};
|
|
28
|
-
line-height: ${st};
|
|
29
|
-
text-transform: ${rt};
|
|
15
|
+
font-family: ${Y};
|
|
16
|
+
font-size: ${J};
|
|
17
|
+
font-weight: ${Q};
|
|
18
|
+
letter-spacing: ${tt};
|
|
19
|
+
line-height: ${et};
|
|
20
|
+
text-transform: ${it};
|
|
30
21
|
}
|
|
31
22
|
`,Wt=i.css`
|
|
23
|
+
.ft-typography--title-dense {
|
|
24
|
+
font-family: ${ot};
|
|
25
|
+
font-size: ${nt};
|
|
26
|
+
font-weight: ${lt};
|
|
27
|
+
letter-spacing: ${st};
|
|
28
|
+
line-height: ${rt};
|
|
29
|
+
text-transform: ${at};
|
|
30
|
+
}
|
|
31
|
+
`,Kt=i.css`
|
|
32
32
|
.ft-typography--subtitle1 {
|
|
33
|
-
font-family: ${
|
|
34
|
-
font-size: ${
|
|
35
|
-
font-weight: ${
|
|
36
|
-
letter-spacing: ${
|
|
37
|
-
line-height: ${
|
|
38
|
-
text-transform: ${
|
|
33
|
+
font-family: ${pt};
|
|
34
|
+
font-size: ${ft};
|
|
35
|
+
font-weight: ${dt};
|
|
36
|
+
letter-spacing: ${ht};
|
|
37
|
+
line-height: ${ct};
|
|
38
|
+
text-transform: ${ut};
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,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: ${xt};
|
|
43
|
+
font-size: ${bt};
|
|
44
|
+
font-weight: ${vt};
|
|
45
|
+
letter-spacing: ${gt};
|
|
46
|
+
line-height: ${yt};
|
|
47
|
+
text-transform: ${mt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,Pt=i.css`
|
|
51
51
|
.ft-typography--body1 {
|
|
52
|
-
font-family: ${
|
|
53
|
-
font-size: ${
|
|
54
|
-
font-weight: ${
|
|
55
|
-
letter-spacing: ${
|
|
56
|
-
line-height: ${
|
|
57
|
-
text-transform: ${
|
|
52
|
+
font-family: ${$t.fontFamily};
|
|
53
|
+
font-size: ${$t.fontSize};
|
|
54
|
+
font-weight: ${$t.fontWeight};
|
|
55
|
+
letter-spacing: ${$t.letterSpacing};
|
|
56
|
+
line-height: ${$t.lineHeight};
|
|
57
|
+
text-transform: ${$t.textTransform};
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,Gt=i.css`
|
|
60
60
|
.ft-typography--body2 {
|
|
61
|
-
font-family: ${
|
|
62
|
-
font-size: ${
|
|
63
|
-
font-weight: ${
|
|
64
|
-
letter-spacing: ${
|
|
65
|
-
line-height: ${
|
|
66
|
-
text-transform: ${
|
|
61
|
+
font-family: ${wt};
|
|
62
|
+
font-size: ${kt};
|
|
63
|
+
font-weight: ${St};
|
|
64
|
+
letter-spacing: ${zt};
|
|
65
|
+
line-height: ${Ot};
|
|
66
|
+
text-transform: ${Ct};
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,Vt=i.css`
|
|
69
69
|
.ft-typography--caption {
|
|
70
|
-
font-family: ${
|
|
71
|
-
font-size: ${
|
|
72
|
-
font-weight: ${
|
|
73
|
-
letter-spacing: ${
|
|
74
|
-
line-height: ${
|
|
75
|
-
text-transform: ${
|
|
70
|
+
font-family: ${Et.fontFamily};
|
|
71
|
+
font-size: ${Et.fontSize};
|
|
72
|
+
font-weight: ${Et.fontWeight};
|
|
73
|
+
letter-spacing: ${Et.letterSpacing};
|
|
74
|
+
line-height: ${Et.lineHeight};
|
|
75
|
+
text-transform: ${Et.textTransform};
|
|
76
76
|
}
|
|
77
|
-
`,
|
|
77
|
+
`,qt=i.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
|
-
font-family: ${
|
|
80
|
-
font-size: ${
|
|
81
|
-
font-weight: ${
|
|
82
|
-
letter-spacing: ${
|
|
79
|
+
font-family: ${Bt};
|
|
80
|
+
font-size: ${Dt};
|
|
81
|
+
font-weight: ${It};
|
|
82
|
+
letter-spacing: ${jt};
|
|
83
83
|
line-height: ${Ft};
|
|
84
|
-
text-transform: ${
|
|
85
|
-
}
|
|
86
|
-
`,qt=i.css`
|
|
87
|
-
.ft-typography--overline {
|
|
88
|
-
font-family: ${Nt};
|
|
89
|
-
font-size: ${At};
|
|
90
|
-
font-weight: ${Tt};
|
|
91
|
-
letter-spacing: ${Zt};
|
|
92
|
-
line-height: ${Rt};
|
|
93
|
-
text-transform: ${Mt};
|
|
84
|
+
text-transform: ${Nt};
|
|
94
85
|
}
|
|
95
86
|
`,Xt=i.css`
|
|
96
|
-
.ft-typography--
|
|
97
|
-
font-family: ${
|
|
98
|
-
font-size: ${
|
|
99
|
-
font-weight: ${
|
|
100
|
-
letter-spacing: ${
|
|
101
|
-
line-height: ${
|
|
102
|
-
text-transform: ${_t
|
|
87
|
+
.ft-typography--overline {
|
|
88
|
+
font-family: ${At};
|
|
89
|
+
font-size: ${Zt};
|
|
90
|
+
font-weight: ${Rt};
|
|
91
|
+
letter-spacing: ${Tt};
|
|
92
|
+
line-height: ${Mt};
|
|
93
|
+
text-transform: ${_t};
|
|
103
94
|
}
|
|
104
95
|
`,Yt=i.css`
|
|
96
|
+
.ft-typography--button {
|
|
97
|
+
font-family: ${Ut.fontFamily};
|
|
98
|
+
font-size: ${Ut.fontSize};
|
|
99
|
+
font-weight: ${Ut.fontWeight};
|
|
100
|
+
letter-spacing: ${Ut.letterSpacing};
|
|
101
|
+
line-height: ${Ut.lineHeight};
|
|
102
|
+
text-transform: ${Ut.textTransform};
|
|
103
|
+
}
|
|
104
|
+
`,Jt=i.css`
|
|
105
105
|
.ft-typography {
|
|
106
106
|
vertical-align: inherit;
|
|
107
107
|
}
|
|
108
|
-
`;var
|
|
109
|
-
<${
|
|
108
|
+
`;var Qt=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};class te extends e.FtLitElement{constructor(){super(...arguments),this.variant=G.body1}render(){return this.element?P`
|
|
109
|
+
<${K(this.element)}
|
|
110
110
|
class="ft-typography ft-typography--${this.variant}">
|
|
111
111
|
<slot></slot>
|
|
112
|
-
</${
|
|
113
|
-
`:
|
|
112
|
+
</${K(this.element)}>
|
|
113
|
+
`:P`
|
|
114
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
115
|
-
`}}
|
|
115
|
+
`}}te.styles=[Ht,Wt,Kt,Lt,Pt,Gt,Vt,qt,Xt,Yt,Jt],Qt([o.property()],te.prototype,"element",void 0),Qt([o.property()],te.prototype,"variant",void 0),e.customElement("ft-typography")(te);const ee={fontSize:e.FtCssVariableFactory.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:e.FtCssVariableFactory.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:e.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:e.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:e.FtCssVariableFactory.extend("--ft-input-label-border-color",e.designSystemVariables.colorOutline),textColor:e.FtCssVariableFactory.extend("--ft-input-label-text-color",e.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:e.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color",e.designSystemVariables.colorOnSurfaceDisabled),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system")},ie=i.css`
|
|
116
116
|
.ft-input-label {
|
|
117
117
|
position: absolute;
|
|
118
118
|
inset: 0;
|
|
119
119
|
display: flex;
|
|
120
|
-
background-color: ${
|
|
121
|
-
border-radius: ${
|
|
120
|
+
background-color: ${ee.colorSurface};
|
|
121
|
+
border-radius: ${ee.borderRadiusS} ${ee.borderRadiusS} 0 0;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
.ft-input-label--outlined {
|
|
125
|
-
border-radius: ${
|
|
125
|
+
border-radius: ${ee.borderRadiusS};
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
.ft-input-label {
|
|
129
|
-
border-color: ${
|
|
129
|
+
border-color: ${ee.borderColor};
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
.ft-input-label.ft-input-label--in-error {
|
|
133
|
-
border-color: ${
|
|
133
|
+
border-color: ${ee.colorError}
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
.ft-input-label:before,
|
|
@@ -143,7 +143,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.ft-input-label:before {
|
|
146
|
-
width: ${
|
|
146
|
+
width: ${ee.horizontalSpacing};
|
|
147
147
|
flex-shrink: 0;
|
|
148
148
|
}
|
|
149
149
|
|
|
@@ -159,18 +159,18 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)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: ${ee.textColor};
|
|
163
163
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
164
|
-
${e.setVariable(
|
|
165
|
-
${e.setVariable(
|
|
164
|
+
${e.setVariable(Et.fontSize,ee.fontSize)};
|
|
165
|
+
${e.setVariable(Et.lineHeight,ee.fontSize)};
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
.ft-input-label--in-error .ft-input-label--text {
|
|
169
|
-
color: ${
|
|
169
|
+
color: ${ee.colorError}
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
.ft-input-label--disabled .ft-input-label--text {
|
|
173
|
-
color: ${
|
|
173
|
+
color: ${ee.disabledTextColor};
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
.ft-input-label--hidden-text {
|
|
@@ -185,17 +185,17 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
185
185
|
overflow: hidden;
|
|
186
186
|
white-space: nowrap;
|
|
187
187
|
text-overflow: ellipsis;
|
|
188
|
-
padding: ${
|
|
189
|
-
margin: calc(${
|
|
188
|
+
padding: ${ee.verticalSpacing} 4px;
|
|
189
|
+
margin: calc(${ee.verticalSpacing} * -1) 0;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
.ft-input-label--raised .ft-input-label--text {
|
|
193
|
-
${e.setVariable(
|
|
194
|
-
${e.setVariable(
|
|
193
|
+
${e.setVariable(Et.fontSize,ee.raisedFontSize)};
|
|
194
|
+
${e.setVariable(Et.lineHeight,ee.raisedFontSize)};
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
198
|
-
top: ${
|
|
198
|
+
top: ${ee.verticalSpacing};
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -208,27 +208,27 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
208
208
|
.ft-input-label--outlined:before {
|
|
209
209
|
border-left-width: 1px;
|
|
210
210
|
border-left-style: solid;
|
|
211
|
-
border-radius: ${
|
|
211
|
+
border-radius: ${ee.borderRadiusS} 0 0 ${ee.borderRadiusS};
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
.ft-input-label--outlined:after {
|
|
215
215
|
border-right-width: 1px;
|
|
216
216
|
border-right-style: solid;
|
|
217
|
-
border-radius: 0 ${
|
|
217
|
+
border-radius: 0 ${ee.borderRadiusS} ${ee.borderRadiusS} 0;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
221
221
|
padding: 2px 4px;
|
|
222
|
-
z-index: ${
|
|
223
|
-
background-color: ${
|
|
224
|
-
border-radius: ${
|
|
222
|
+
z-index: ${ee.raisedZIndex};
|
|
223
|
+
background-color: ${ee.colorSurface};
|
|
224
|
+
border-radius: ${ee.borderRadiusS};
|
|
225
225
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
229
229
|
border-top: none;
|
|
230
230
|
}
|
|
231
|
-
`;var
|
|
231
|
+
`;var oe=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};class ne extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return i.html`
|
|
232
232
|
<div class="${s.classMap(t)}">
|
|
233
233
|
${this.text?i.html`
|
|
234
234
|
<div class="ft-input-label--text ft-typography--caption">
|
|
@@ -237,7 +237,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
237
237
|
</div>
|
|
238
238
|
`:null}
|
|
239
239
|
</div>
|
|
240
|
-
`}}
|
|
240
|
+
`}}ne.elementDefinitions={},ne.styles=[Vt,ie],oe([o.property({type:String})],ne.prototype,"text",void 0),oe([o.property({type:Boolean})],ne.prototype,"raised",void 0),oe([o.property({type:Boolean})],ne.prototype,"outlined",void 0),oe([o.property({type:Boolean})],ne.prototype,"disabled",void 0),oe([o.property({type:Boolean})],ne.prototype,"error",void 0),e.customElement("ft-input-label")(ne);const le=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),se={color:le,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",le),opacityContentOnSurfacePressed:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},re=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),ae=re,pe=e.FtCssVariableFactory.extend("--ft-ripple-background-color",re),fe=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),de=fe,he=e.FtCssVariableFactory.extend("--ft-ripple-background-color",fe),ce=i.css`
|
|
241
241
|
:host {
|
|
242
242
|
display: contents;
|
|
243
243
|
}
|
|
@@ -259,27 +259,27 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
.ft-ripple .ft-ripple--background {
|
|
262
|
-
background-color: ${
|
|
262
|
+
background-color: ${se.backgroundColor};
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
.ft-ripple .ft-ripple--effect {
|
|
266
|
-
background-color: ${
|
|
266
|
+
background-color: ${se.color};
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
270
|
-
background-color: ${
|
|
270
|
+
background-color: ${he};
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
274
|
-
background-color: ${
|
|
274
|
+
background-color: ${de};
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
278
|
-
background-color: ${
|
|
278
|
+
background-color: ${pe};
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
282
|
-
background-color: ${
|
|
282
|
+
background-color: ${ae};
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
.ft-ripple .ft-ripple--background {
|
|
@@ -311,22 +311,22 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
314
|
-
opacity: ${
|
|
314
|
+
opacity: ${se.opacityContentOnSurfaceHover};
|
|
315
315
|
}
|
|
316
316
|
|
|
317
317
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
318
|
-
opacity: ${
|
|
318
|
+
opacity: ${se.opacityContentOnSurfaceSelected};
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
322
|
-
opacity: ${
|
|
322
|
+
opacity: ${se.opacityContentOnSurfaceFocused};
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
326
|
-
opacity: ${
|
|
326
|
+
opacity: ${se.opacityContentOnSurfacePressed};
|
|
327
327
|
transform: translate(-50%, -50%) scale(1);
|
|
328
328
|
}
|
|
329
|
-
`;var
|
|
329
|
+
`;var ue,xe,be=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};class ve extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:n}=this.getCoordinates(t),l=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-l.x:l.width/2),this.originY=Math.round(null!=n?n-l.y:l.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return i.html`
|
|
330
330
|
<style>
|
|
331
331
|
.ft-ripple .ft-ripple--effect,
|
|
332
332
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -343,19 +343,19 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
343
343
|
<div class="ft-ripple--background"></div>
|
|
344
344
|
<div class="ft-ripple--effect"></div>
|
|
345
345
|
</div>
|
|
346
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}be.elementDefinitions={},be.styles=he,xe([o.property({type:Boolean})],be.prototype,"primary",void 0),xe([o.property({type:Boolean})],be.prototype,"secondary",void 0),xe([o.property({type:Boolean})],be.prototype,"unbounded",void 0),xe([o.property({type:Boolean})],be.prototype,"activated",void 0),xe([o.property({type:Boolean})],be.prototype,"selected",void 0),xe([o.property({type:Boolean})],be.prototype,"disabled",void 0),xe([o.state()],be.prototype,"hovered",void 0),xe([o.state()],be.prototype,"focused",void 0),xe([o.state()],be.prototype,"pressed",void 0),xe([o.state()],be.prototype,"rippling",void 0),xe([o.state()],be.prototype,"rippleSize",void 0),xe([o.state()],be.prototype,"originX",void 0),xe([o.state()],be.prototype,"originY",void 0),xe([o.query(".ft-ripple")],be.prototype,"ripple",void 0),xe([o.query(".ft-ripple--effect")],be.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(be),function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(ce||(ce={})),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=""}(ue||(ue={})),new Map([...["abw"].map((t=>[t,ue.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,ue.AUDIO])),...["avi"].map((t=>[t,ue.AVI])),...["chm","xhs"].map((t=>[t,ue.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,ue.CODE])),...["csv"].map((t=>[t,ue.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,ue.DITA])),...["epub"].map((t=>[t,ue.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,ue.EXCEL])),...["flac"].map((t=>[t,ue.FLAC])),...["gif"].map((t=>[t,ue.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,ue.GZIP])),...["html","htm","xhtml"].map((t=>[t,ue.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,ue.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,ue.JPEG])),...["json"].map((t=>[t,ue.JSON])),...["m4a","m4p"].map((t=>[t,ue.M4A])),...["mov","qt"].map((t=>[t,ue.MOV])),...["mp3"].map((t=>[t,ue.MP3])),...["mp4","m4v"].map((t=>[t,ue.MP4])),...["ogg","oga"].map((t=>[t,ue.OGG])),...["pdf","ps"].map((t=>[t,ue.PDF])),...["png"].map((t=>[t,ue.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,ue.POWERPOINT])),...["rar"].map((t=>[t,ue.RAR])),...["stp"].map((t=>[t,ue.STP])),...["txt","rtf","md","mdown"].map((t=>[t,ue.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,ue.VIDEO])),...["wav"].map((t=>[t,ue.WAV])),...["wma"].map((t=>[t,ue.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,ue.WORD])),...["xml","xsl","rdf"].map((t=>[t,ue.XML])),...["yaml","yml","x-yaml"].map((t=>[t,ue.YAML])),...["zip"].map((t=>[t,ue.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")},ge=i.css`
|
|
346
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}ve.elementDefinitions={},ve.styles=ce,be([o.property({type:Boolean})],ve.prototype,"primary",void 0),be([o.property({type:Boolean})],ve.prototype,"secondary",void 0),be([o.property({type:Boolean})],ve.prototype,"unbounded",void 0),be([o.property({type:Boolean})],ve.prototype,"activated",void 0),be([o.property({type:Boolean})],ve.prototype,"selected",void 0),be([o.property({type:Boolean})],ve.prototype,"disabled",void 0),be([o.state()],ve.prototype,"hovered",void 0),be([o.state()],ve.prototype,"focused",void 0),be([o.state()],ve.prototype,"pressed",void 0),be([o.state()],ve.prototype,"rippling",void 0),be([o.state()],ve.prototype,"rippleSize",void 0),be([o.state()],ve.prototype,"originX",void 0),be([o.state()],ve.prototype,"originY",void 0),be([o.query(".ft-ripple")],ve.prototype,"ripple",void 0),be([o.query(".ft-ripple--effect")],ve.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(ve),function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(ue||(ue={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(xe||(xe={})),new Map([...["abw"].map((t=>[t,xe.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,xe.AUDIO])),...["avi"].map((t=>[t,xe.AVI])),...["chm","xhs"].map((t=>[t,xe.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,xe.CODE])),...["csv"].map((t=>[t,xe.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,xe.DITA])),...["epub"].map((t=>[t,xe.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,xe.EXCEL])),...["flac"].map((t=>[t,xe.FLAC])),...["gif"].map((t=>[t,xe.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,xe.GZIP])),...["html","htm","xhtml"].map((t=>[t,xe.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,xe.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,xe.JPEG])),...["json"].map((t=>[t,xe.JSON])),...["m4a","m4p"].map((t=>[t,xe.M4A])),...["mov","qt"].map((t=>[t,xe.MOV])),...["mp3"].map((t=>[t,xe.MP3])),...["mp4","m4v"].map((t=>[t,xe.MP4])),...["ogg","oga"].map((t=>[t,xe.OGG])),...["pdf","ps"].map((t=>[t,xe.PDF])),...["png"].map((t=>[t,xe.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,xe.POWERPOINT])),...["rar"].map((t=>[t,xe.RAR])),...["stp"].map((t=>[t,xe.STP])),...["txt","rtf","md","mdown"].map((t=>[t,xe.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,xe.VIDEO])),...["wav"].map((t=>[t,xe.WAV])),...["wma"].map((t=>[t,xe.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,xe.WORD])),...["xml","xsl","rdf"].map((t=>[t,xe.XML])),...["yaml","yml","x-yaml"].map((t=>[t,xe.YAML])),...["zip"].map((t=>[t,xe.ZIP]))]);const ge={size:e.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},ye=i.css`
|
|
347
347
|
:host {
|
|
348
348
|
display: inline-block;
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
:host, i.ft-icon {
|
|
352
|
-
width: ${
|
|
353
|
-
height: ${
|
|
352
|
+
width: ${ge.size};
|
|
353
|
+
height: ${ge.size};
|
|
354
354
|
text-align: center;
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
i.ft-icon {
|
|
358
|
-
font-size: ${
|
|
358
|
+
font-size: ${ge.size};
|
|
359
359
|
line-height: 1;
|
|
360
360
|
font-weight: normal;
|
|
361
361
|
text-transform: none;
|
|
@@ -366,26 +366,26 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
366
366
|
text-rendering: auto;
|
|
367
367
|
-webkit-font-smoothing: antialiased;
|
|
368
368
|
-moz-osx-font-smoothing: grayscale;
|
|
369
|
-
vertical-align: ${
|
|
369
|
+
vertical-align: ${ge.verticalAlign};
|
|
370
370
|
}
|
|
371
371
|
|
|
372
372
|
.ft-icon--fluid-topics {
|
|
373
|
-
font-family: ${
|
|
373
|
+
font-family: ${ge.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
.ft-icon--file-format {
|
|
377
|
-
font-family: ${
|
|
377
|
+
font-family: ${ge.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
378
378
|
}
|
|
379
379
|
|
|
380
380
|
.ft-icon--material {
|
|
381
|
-
font-family: ${
|
|
381
|
+
font-family: ${ge.materialFontFamily}, "Material Icons", sans-serif;
|
|
382
382
|
}
|
|
383
|
-
`;var
|
|
383
|
+
`;var me;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(me||(me={}));var $e=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};class we extends e.FtLitElement{constructor(){super(...arguments),this.variant=me.fluid_topics,this.resolvedIcon=i.nothing}render(){const t="material"!==this.variant||this.value;return i.html`
|
|
384
384
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
385
385
|
${l.unsafeHTML(this.resolvedIcon)}
|
|
386
386
|
<slot ?hidden=${t}></slot>
|
|
387
387
|
</i>
|
|
388
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case
|
|
388
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case me.file_format:this.resolvedIcon=null!==(t=xe[o.toUpperCase()])&&void 0!==t?t:o;break;case me.fluid_topics:this.resolvedIcon=null!==(e=ue[o.toUpperCase()])&&void 0!==e?e:o;break;default:this.resolvedIcon=this.value||i.nothing}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}we.elementDefinitions={},we.styles=ye,$e([o.property()],we.prototype,"variant",void 0),$e([o.property()],we.prototype,"value",void 0),$e([o.state()],we.prototype,"resolvedIcon",void 0),$e([o.query("slot")],we.prototype,"slottedContent",void 0),e.customElement("ft-icon")(we);const ke={labelSize:e.FtCssVariableFactory.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:e.FtCssVariableFactory.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:e.FtCssVariableFactory.create("--ft-select-vertical-spacing","SIZE","4px"),optionsHeight:e.FtCssVariableFactory.create("--ft-select-options-height","SIZE","unset"),selectedOptionColor:e.FtCssVariableFactory.extend("--ft-select-selected-option-color",e.designSystemVariables.colorOnSurface),helperColor:e.FtCssVariableFactory.extend("--ft-select-helper-color",e.designSystemVariables.colorOnSurfaceMedium),optionsColor:e.FtCssVariableFactory.extend("--ft-select-options-color",e.designSystemVariables.colorOnSurface),optionsZIndex:e.FtCssVariableFactory.create("--ft-select-options-z-index","NUMBER","3"),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),elevation02:e.FtCssVariableFactory.external(e.designSystemVariables.elevation02,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system")},Se=i.css`
|
|
389
389
|
*:focus {
|
|
390
390
|
outline: none;
|
|
391
391
|
}
|
|
@@ -399,7 +399,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
399
399
|
.ft-select--main-panel {
|
|
400
400
|
position: relative;
|
|
401
401
|
display: flex;
|
|
402
|
-
height: calc(4 * ${
|
|
402
|
+
height: calc(4 * ${ke.verticalSpacing} + ${ke.labelSize} + ${ke.selectedOptionSize});
|
|
403
403
|
}
|
|
404
404
|
|
|
405
405
|
.ft-select--input-panel {
|
|
@@ -411,14 +411,14 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
411
411
|
padding-left: 16px;
|
|
412
412
|
padding-right: 8px;
|
|
413
413
|
gap: 8px;
|
|
414
|
-
color: ${
|
|
415
|
-
${e.setVariable(
|
|
414
|
+
color: ${ke.selectedOptionColor};
|
|
415
|
+
${e.setVariable(se.color,ke.selectedOptionColor)};
|
|
416
416
|
}
|
|
417
417
|
|
|
418
418
|
.ft-select--input-panel,
|
|
419
419
|
.ft-select--option {
|
|
420
|
-
${e.setVariable(
|
|
421
|
-
${e.setVariable(
|
|
420
|
+
${e.setVariable(se.opacityContentOnSurfaceHover,"0.08")};
|
|
421
|
+
${e.setVariable(se.opacityContentOnSurfacePressed,"0.04")};
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
.ft-select--input-panel > *:not(ft-ripple),
|
|
@@ -428,7 +428,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
428
428
|
|
|
429
429
|
.ft-select--disabled .ft-select--input-panel,
|
|
430
430
|
.ft-select--disabled .ft-select--option {
|
|
431
|
-
color: ${
|
|
431
|
+
color: ${ke.colorOnSurfaceDisabled};
|
|
432
432
|
}
|
|
433
433
|
|
|
434
434
|
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
@@ -437,18 +437,18 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
437
437
|
}
|
|
438
438
|
|
|
439
439
|
ft-input-label {
|
|
440
|
-
${e.setVariable(
|
|
441
|
-
${e.setVariable(
|
|
442
|
-
${e.setVariable(
|
|
440
|
+
${e.setVariable(ee.fontSize,ke.selectedOptionSize)};
|
|
441
|
+
${e.setVariable(ee.raisedFontSize,ke.labelSize)};
|
|
442
|
+
${e.setVariable(ee.verticalSpacing,ke.verticalSpacing)};
|
|
443
443
|
}
|
|
444
444
|
|
|
445
445
|
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
446
|
-
color: ${
|
|
446
|
+
color: ${ke.colorPrimary};
|
|
447
447
|
}
|
|
448
448
|
|
|
449
449
|
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
450
|
-
${e.setVariable(
|
|
451
|
-
${e.setVariable(
|
|
450
|
+
${e.setVariable(ee.borderColor,ke.colorPrimary)};
|
|
451
|
+
${e.setVariable(ee.textColor,ke.colorPrimary)};
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
.ft-select--selected-option {
|
|
@@ -458,12 +458,12 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
458
458
|
overflow: hidden;
|
|
459
459
|
white-space: nowrap;
|
|
460
460
|
text-overflow: ellipsis;
|
|
461
|
-
${e.setVariable(
|
|
462
|
-
${e.setVariable(
|
|
461
|
+
${e.setVariable($t.fontSize,ke.selectedOptionSize)};
|
|
462
|
+
${e.setVariable($t.lineHeight,ke.selectedOptionSize)};
|
|
463
463
|
}
|
|
464
464
|
|
|
465
465
|
.ft-select--in-error .ft-select--selected-option {
|
|
466
|
-
color: ${
|
|
466
|
+
color: ${ke.colorError};
|
|
467
467
|
}
|
|
468
468
|
|
|
469
469
|
ft-icon {
|
|
@@ -475,16 +475,16 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
475
475
|
}
|
|
476
476
|
|
|
477
477
|
.ft-select--filled .ft-select--input-panel {
|
|
478
|
-
border-radius: ${
|
|
478
|
+
border-radius: ${ke.borderRadiusS} ${ke.borderRadiusS} 0 0;
|
|
479
479
|
}
|
|
480
480
|
|
|
481
481
|
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
482
482
|
align-self: stretch;
|
|
483
|
-
padding-top: calc(${
|
|
483
|
+
padding-top: calc(${ke.labelSize} + 2 * ${ke.verticalSpacing});
|
|
484
484
|
}
|
|
485
485
|
|
|
486
486
|
.ft-select--outlined .ft-select--input-panel {
|
|
487
|
-
border-radius: ${
|
|
487
|
+
border-radius: ${ke.borderRadiusS};
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
.ft-select--options {
|
|
@@ -493,10 +493,10 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
493
493
|
top: 100%;
|
|
494
494
|
left: 0;
|
|
495
495
|
right: 0;
|
|
496
|
-
color: ${
|
|
497
|
-
background: ${
|
|
498
|
-
z-index: ${
|
|
499
|
-
box-shadow: ${
|
|
496
|
+
color: ${ke.optionsColor};
|
|
497
|
+
background: ${ke.colorSurface};
|
|
498
|
+
z-index: ${ke.optionsZIndex};
|
|
499
|
+
box-shadow: ${ke.elevation02};
|
|
500
500
|
}
|
|
501
501
|
|
|
502
502
|
.ft-select--fixed .ft-select--options {
|
|
@@ -507,7 +507,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
507
507
|
|
|
508
508
|
.ft-select--options-displayed .ft-select--options {
|
|
509
509
|
display: block;
|
|
510
|
-
max-height: ${
|
|
510
|
+
max-height: ${ke.optionsHeight};
|
|
511
511
|
overflow-y: auto;
|
|
512
512
|
}
|
|
513
513
|
|
|
@@ -526,13 +526,13 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
526
526
|
|
|
527
527
|
.ft-select--helper-text {
|
|
528
528
|
padding: 0 12px 0 16px;
|
|
529
|
-
color: ${
|
|
529
|
+
color: ${ke.helperColor};
|
|
530
530
|
}
|
|
531
531
|
|
|
532
532
|
.ft-select--in-error .ft-select--helper-text {
|
|
533
|
-
color: ${
|
|
533
|
+
color: ${ke.colorError};
|
|
534
534
|
}
|
|
535
|
-
`;var
|
|
535
|
+
`;var ze=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};class Oe extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return i.html``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Oe.elementDefinitions={},ze([o.property({type:String})],Oe.prototype,"label",void 0),ze([o.property({type:Object,converter:t=>t})],Oe.prototype,"value",void 0),ze([o.property({type:Boolean,reflect:!0})],Oe.prototype,"selected",void 0);class Ce extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,o,l,r;let a=this.hasOptionsMenuOpen,p=this.disabled||!this.hasOptions;const f=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(o=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==o?o:"").length>0,d={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":p,"ft-select--options-displayed":a,"ft-select--has-option-selected":f,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return i.html`
|
|
536
536
|
<div class="${s.classMap(d)}" part="container">
|
|
537
537
|
<div class="ft-select--main-panel" part="main-panel">
|
|
538
538
|
<ft-input-label text="${this.label}"
|
|
@@ -580,7 +580,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
580
580
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
581
581
|
<span>${t.label}</span>
|
|
582
582
|
</div>
|
|
583
|
-
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value}))),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,n,l;let s;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),s=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),s=null!==(l=null===(n=this.focusedOption)||void 0===n?void 0:n.nextElementSibling)&&void 0!==l?l:this.firstOption}null==s||s.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}
|
|
583
|
+
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value}))),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,n,l;let s;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),s=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),s=null!==(l=null===(n=this.focusedOption)||void 0===n?void 0:n.nextElementSibling)&&void 0!==l?l:this.firstOption}null==s||s.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Ce.elementDefinitions={"ft-input-label":ne,"ft-typography":te,"ft-ripple":ve,"ft-icon":we},Ce.styles=[Gt,Vt,Se],ze([o.property({type:String})],Ce.prototype,"label",void 0),ze([o.property({type:String})],Ce.prototype,"helper",void 0),ze([o.property({type:Boolean})],Ce.prototype,"outlined",void 0),ze([o.property({type:Boolean})],Ce.prototype,"disabled",void 0),ze([o.property({type:Boolean})],Ce.prototype,"error",void 0),ze([o.property({type:Boolean})],Ce.prototype,"fixedMenuPosition",void 0),ze([o.property({type:Array})],Ce.prototype,"options",void 0),ze([o.state()],Ce.prototype,"selectedOption",void 0),ze([o.state()],Ce.prototype,"optionsDisplayed",void 0),ze([o.state()],Ce.prototype,"focusOptions",void 0),ze([o.query(".ft-select")],Ce.prototype,"container",void 0),ze([o.query(".ft-select--options")],Ce.prototype,"optionsMenu",void 0),ze([o.query(".ft-select--input-panel")],Ce.prototype,"mainPanel",void 0),ze([o.query(".ft-select--option:first-child")],Ce.prototype,"firstOption",void 0),ze([o.query(".ft-select--option:focus")],Ce.prototype,"focusedOption",void 0),ze([o.query(".ft-select--option.ft-select--option-selected")],Ce.prototype,"selectedOptionElement",void 0),ze([o.query(".ft-select--option:last-child")],Ce.prototype,"lastOption",void 0),ze([o.query("slot")],Ce.prototype,"optionsSlot",void 0),e.customElement("ft-select")(Ce),e.customElement("ft-select-option")(Oe);const Ee={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SIZE","14px"),labelSize:e.FtCssVariableFactory.create("--ft-text-field-label-size","SIZE","11px"),verticalSpacing:e.FtCssVariableFactory.create("--ft-text-field-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-text-field-horizontal-spacing","SIZE","16px"),helperColor:e.FtCssVariableFactory.extend("--ft-text-field-helper-color",e.designSystemVariables.colorOnSurfaceMedium),colorPrimary:e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system"),prefixColor:e.FtCssVariableFactory.extend("--ft-text-field-prefix-color",e.designSystemVariables.colorOnSurfaceMedium),iconColor:e.FtCssVariableFactory.extend("--ft-text-field-icon-color",e.designSystemVariables.colorOnSurfaceMedium)},Be=i.css`
|
|
584
584
|
*:focus {
|
|
585
585
|
outline: none;
|
|
586
586
|
}
|
|
@@ -592,16 +592,16 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
592
592
|
}
|
|
593
593
|
|
|
594
594
|
ft-input-label {
|
|
595
|
-
${e.setVariable(
|
|
596
|
-
${e.setVariable(
|
|
597
|
-
${e.setVariable(
|
|
598
|
-
${e.setVariable(
|
|
595
|
+
${e.setVariable(ee.fontSize,Ee.fontSize)};
|
|
596
|
+
${e.setVariable(ee.raisedFontSize,Ee.labelSize)};
|
|
597
|
+
${e.setVariable(ee.verticalSpacing,Ee.verticalSpacing)};
|
|
598
|
+
${e.setVariable(ee.horizontalSpacing,i.css`calc(${Ee.horizontalSpacing} - 4px)`)};
|
|
599
599
|
}
|
|
600
600
|
|
|
601
601
|
.ft-text-field--main-panel {
|
|
602
602
|
position: relative;
|
|
603
603
|
display: flex;
|
|
604
|
-
height: calc(4 * ${
|
|
604
|
+
height: calc(4 * ${Ee.verticalSpacing} + ${Ee.labelSize} + ${Ee.fontSize});
|
|
605
605
|
}
|
|
606
606
|
|
|
607
607
|
.ft-text-field--input-panel {
|
|
@@ -613,8 +613,8 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
613
613
|
}
|
|
614
614
|
|
|
615
615
|
.ft-text-field--input-panel ft-ripple {
|
|
616
|
-
${e.setVariable(
|
|
617
|
-
${e.setVariable(
|
|
616
|
+
${e.setVariable(se.opacityContentOnSurfaceHover,"0.08")};
|
|
617
|
+
${e.setVariable(se.opacityContentOnSurfacePressed,"0.04")};
|
|
618
618
|
}
|
|
619
619
|
|
|
620
620
|
.ft-text-field--input-wrapper {
|
|
@@ -624,20 +624,20 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
624
624
|
display: flex;
|
|
625
625
|
align-items: center;
|
|
626
626
|
|
|
627
|
-
${e.setVariable(
|
|
628
|
-
${e.setVariable(
|
|
627
|
+
${e.setVariable($t.fontSize,Ee.fontSize)};
|
|
628
|
+
${e.setVariable($t.lineHeight,Ee.fontSize)};
|
|
629
629
|
|
|
630
|
-
padding: 0 ${
|
|
630
|
+
padding: 0 ${Ee.horizontalSpacing};
|
|
631
631
|
}
|
|
632
632
|
|
|
633
633
|
.ft-text-field--filled:not(.ft-text-field--no-label) .ft-text-field--input-wrapper {
|
|
634
634
|
align-items: flex-end;
|
|
635
|
-
padding: 0 ${
|
|
635
|
+
padding: 0 ${Ee.horizontalSpacing} ${Ee.verticalSpacing} ${Ee.horizontalSpacing};
|
|
636
636
|
}
|
|
637
637
|
|
|
638
638
|
.ft-text-field--prefix {
|
|
639
639
|
display: none;
|
|
640
|
-
color: ${
|
|
640
|
+
color: ${Ee.prefixColor}
|
|
641
641
|
}
|
|
642
642
|
|
|
643
643
|
.ft-text-field--with-prefix.ft-text-field--raised-label .ft-text-field--prefix {
|
|
@@ -651,15 +651,15 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
651
651
|
flex-shrink: 1;
|
|
652
652
|
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
653
653
|
|
|
654
|
-
color: ${
|
|
655
|
-
padding: calc(2 * ${
|
|
654
|
+
color: ${Ee.colorOnSurface};
|
|
655
|
+
padding: calc(2 * ${Ee.verticalSpacing}) 0;
|
|
656
656
|
border: none;
|
|
657
657
|
background: none;
|
|
658
658
|
}
|
|
659
659
|
|
|
660
660
|
.ft-text-field--filled:not(.ft-text-field--no-label) .ft-text-field--input {
|
|
661
661
|
padding-bottom: 0;
|
|
662
|
-
padding-top: calc(${
|
|
662
|
+
padding-top: calc(${Ee.labelSize} + 2 * ${Ee.verticalSpacing});
|
|
663
663
|
}
|
|
664
664
|
|
|
665
665
|
.ft-text-field--input::-webkit-calendar-picker-indicator,
|
|
@@ -668,7 +668,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
668
668
|
}
|
|
669
669
|
|
|
670
670
|
.ft-text-field--disabled .ft-text-field--input {
|
|
671
|
-
color: ${
|
|
671
|
+
color: ${Ee.colorOnSurfaceDisabled};
|
|
672
672
|
}
|
|
673
673
|
|
|
674
674
|
.ft-text-field:not(.ft-text-field--disabled) .ft-text-field--input-panel {
|
|
@@ -676,34 +676,34 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
676
676
|
}
|
|
677
677
|
|
|
678
678
|
.ft-text-field:not(.ft-text-field--disabled):focus-within ft-input-label {
|
|
679
|
-
${e.setVariable(
|
|
680
|
-
${e.setVariable(
|
|
679
|
+
${e.setVariable(ee.borderColor,Ee.colorPrimary)};
|
|
680
|
+
${e.setVariable(ee.textColor,Ee.colorPrimary)};
|
|
681
681
|
}
|
|
682
682
|
|
|
683
683
|
.ft-text-field--filled .ft-text-field--input-panel {
|
|
684
|
-
border-radius: ${
|
|
684
|
+
border-radius: ${Ee.borderRadiusS} ${Ee.borderRadiusS} 0 0;
|
|
685
685
|
}
|
|
686
686
|
|
|
687
687
|
.ft-text-field--outlined .ft-text-field--input-panel {
|
|
688
|
-
border-radius: ${
|
|
688
|
+
border-radius: ${Ee.borderRadiusS};
|
|
689
689
|
}
|
|
690
690
|
|
|
691
691
|
.ft-text-field--helper-text {
|
|
692
|
-
padding: 0 12px 0 ${
|
|
693
|
-
color: ${
|
|
692
|
+
padding: 0 12px 0 ${Ee.horizontalSpacing};
|
|
693
|
+
color: ${Ee.helperColor};
|
|
694
694
|
}
|
|
695
695
|
|
|
696
696
|
.ft-text-field--in-error .ft-text-field--input,
|
|
697
697
|
.ft-text-field--in-error .ft-text-field--helper-text,
|
|
698
698
|
.ft-text-field--in-error .ft-text-field--prefix {
|
|
699
|
-
color: ${
|
|
699
|
+
color: ${Ee.colorError};
|
|
700
700
|
}
|
|
701
701
|
|
|
702
702
|
.ft-text-field--icon {
|
|
703
|
-
padding-right: ${
|
|
704
|
-
color: ${
|
|
703
|
+
padding-right: ${Ee.horizontalSpacing};
|
|
704
|
+
color: ${Ee.iconColor};
|
|
705
705
|
}
|
|
706
|
-
`;var
|
|
706
|
+
`;var De=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};class Ie extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix="",this.icon="",this.iconVariant="",this.focused=!1}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--no-label":!this.label,"ft-text-field--in-error":this.error,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--raised-label":this.focused||""!=this.value};return i.html`
|
|
707
707
|
<div class="${s.classMap(t)}">
|
|
708
708
|
<div class="ft-text-field--main-panel">
|
|
709
709
|
<ft-input-label text="${this.label}"
|
|
@@ -738,7 +738,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
738
738
|
<ft-typography class="ft-text-field--helper-text" variant="caption">${this.helper}
|
|
739
739
|
</ft-typography>`:void 0}
|
|
740
740
|
</div>
|
|
741
|
-
`}updated(t){super.updated(t),t.has("value")&&this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}updateValueFromInputField(){var t;this.value=(null===(t=this.input)||void 0===t?void 0:t.value)||"",this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.input)||void 0===t?void 0:t.value)||""}}
|
|
741
|
+
`}updated(t){super.updated(t),t.has("value")&&this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}updateValueFromInputField(){var t;this.value=(null===(t=this.input)||void 0===t?void 0:t.value)||"",this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.input)||void 0===t?void 0:t.value)||""}}Ie.elementDefinitions={"ft-input-label":ne,"ft-ripple":ve,"ft-typography":te,"ft-icon":we},Ie.styles=[Pt,Be],De([o.property({type:String})],Ie.prototype,"label",void 0),De([o.property({reflect:!0})],Ie.prototype,"value",void 0),De([o.property({type:String})],Ie.prototype,"helper",void 0),De([o.property({type:Boolean})],Ie.prototype,"outlined",void 0),De([o.property({type:Boolean})],Ie.prototype,"disabled",void 0),De([o.property({type:Boolean})],Ie.prototype,"error",void 0),De([o.query(".ft-text-field--input")],Ie.prototype,"input",void 0),De([o.property({type:String})],Ie.prototype,"prefix",void 0),De([o.property({type:String})],Ie.prototype,"icon",void 0),De([o.property({type:String})],Ie.prototype,"iconVariant",void 0),De([o.state()],Ie.prototype,"focused",void 0),e.customElement("ft-text-field")(Ie);const je=e.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),Fe=e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),Ne=e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),Ae=e.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),Ze=e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),Re=e.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),Te=i.css`
|
|
742
742
|
.ft-tooltip--container {
|
|
743
743
|
display: block;
|
|
744
744
|
position: relative;
|
|
@@ -754,23 +754,23 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
754
754
|
box-sizing: border-box;
|
|
755
755
|
overflow: hidden;
|
|
756
756
|
width: max-content;
|
|
757
|
-
max-width: ${
|
|
757
|
+
max-width: ${Re};
|
|
758
758
|
text-align: center;
|
|
759
|
-
padding: ${
|
|
760
|
-
z-index: ${
|
|
759
|
+
padding: ${je};
|
|
760
|
+
z-index: ${Ae};
|
|
761
761
|
}
|
|
762
762
|
|
|
763
763
|
.ft-tooltip--content {
|
|
764
764
|
padding: 4px 8px;
|
|
765
|
-
border-radius: ${
|
|
766
|
-
background-color: ${
|
|
765
|
+
border-radius: ${Ze};
|
|
766
|
+
background-color: ${Ne};
|
|
767
767
|
color: ${Fe};
|
|
768
768
|
top: -500px;
|
|
769
769
|
left: -500px;
|
|
770
770
|
position: relative;
|
|
771
771
|
word-break: break-word;
|
|
772
772
|
}
|
|
773
|
-
`;var
|
|
773
|
+
`;var Me=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};class _e extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new e.Debouncer,this.revealDebouncer=new e.Debouncer}render(){return i.html`
|
|
774
774
|
<div part="container"
|
|
775
775
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
776
776
|
@mouseenter=${this.onHover}
|
|
@@ -786,7 +786,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
786
786
|
</div>
|
|
787
787
|
<slot></slot>
|
|
788
788
|
</div>
|
|
789
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has(
|
|
789
|
+
`}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.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let n=0,l=0;switch(this.position){case"top":l=-this.tooltip.clientHeight,n=o;break;case"bottom":l=e.height,n=o;break;case"left":l=i,n=-this.tooltip.clientWidth;break;case"right":l=i,n=e.width}e.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+n<0&&(n=0);const s=this.tooltip.style;s.left=n+"px",s.top=l+"px",s.maxWidth=`max(${e.width}px, ${Re})`}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())}}_e.elementDefinitions={"ft-typography":te},_e.styles=Te,Me([o.property()],_e.prototype,"text",void 0),Me([o.property({type:Boolean})],_e.prototype,"manual",void 0),Me([o.property({type:Boolean})],_e.prototype,"inline",void 0),Me([o.property({type:Number})],_e.prototype,"delay",void 0),Me([o.property()],_e.prototype,"position",void 0),Me([o.queryAssignedNodes("",!0)],_e.prototype,"slotNodes",void 0),Me([o.query(".ft-tooltip--container")],_e.prototype,"container",void 0),Me([o.query("slot")],_e.prototype,"target",void 0),Me([o.query(".ft-tooltip")],_e.prototype,"tooltip",void 0),Me([o.query(".ft-tooltip--content")],_e.prototype,"tooltipContent",void 0),Me([o.state()],_e.prototype,"visible",void 0),e.customElement("ft-tooltip")(_e);const Ue={color:e.FtCssVariableFactory.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},He=i.css`
|
|
790
790
|
:host {
|
|
791
791
|
line-height: 0;
|
|
792
792
|
}
|
|
@@ -795,8 +795,8 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
795
795
|
display: inline-block;
|
|
796
796
|
position: relative;
|
|
797
797
|
|
|
798
|
-
width: ${
|
|
799
|
-
height: ${
|
|
798
|
+
width: ${Ue.size};
|
|
799
|
+
height: ${Ue.size};
|
|
800
800
|
}
|
|
801
801
|
|
|
802
802
|
.ft-loader div {
|
|
@@ -805,7 +805,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
805
805
|
width: 25%;
|
|
806
806
|
height: 25%;
|
|
807
807
|
border-radius: 50%;
|
|
808
|
-
background: ${
|
|
808
|
+
background: ${Ue.color};
|
|
809
809
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
810
810
|
}
|
|
811
811
|
|
|
@@ -852,17 +852,17 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
852
852
|
transform: translate(0, 0);
|
|
853
853
|
}
|
|
854
854
|
100% {
|
|
855
|
-
transform: translate(calc(0.35 * ${
|
|
855
|
+
transform: translate(calc(0.35 * ${Ue.size}), 0);
|
|
856
856
|
}
|
|
857
857
|
}
|
|
858
|
-
`;class
|
|
858
|
+
`;class We extends e.FtLitElement{render(){return i.html`
|
|
859
859
|
<div class="ft-loader">
|
|
860
860
|
<div></div>
|
|
861
861
|
<div></div>
|
|
862
862
|
<div></div>
|
|
863
863
|
<div></div>
|
|
864
864
|
</div>
|
|
865
|
-
`}}
|
|
865
|
+
`}}We.styles=He,e.customElement("ft-loader")(We);const Ke=e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorPrimary),Le={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorSurface),borderRadius:e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusL),color:Ke,fontSize:e.FtCssVariableFactory.extend("--ft-button-font-size",Ut.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:e.FtCssVariableFactory.extend("--ft-button-ripple-color",Ke),opacityDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},Pe=e.FtCssVariableFactory.extend("--ft-button-primary-color",e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorOnPrimary)),Ge={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-primary-background-color",e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorPrimary)),color:Pe,rippleColor:e.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Pe)},Ve=e.FtCssVariableFactory.extend("--ft-button-dense-border-radius",e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusM)),qe=[e.noTextSelect,i.css`
|
|
866
866
|
:host {
|
|
867
867
|
display: inline-block;
|
|
868
868
|
max-width: 100%;
|
|
@@ -873,7 +873,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
873
873
|
box-shadow: 0px 0px 0px transparent;
|
|
874
874
|
border: 0px solid transparent;
|
|
875
875
|
text-shadow: 0px 0px 0px transparent;
|
|
876
|
-
font-size: ${
|
|
876
|
+
font-size: ${Le.fontSize};
|
|
877
877
|
}
|
|
878
878
|
|
|
879
879
|
button:hover {
|
|
@@ -902,17 +902,17 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
902
902
|
border: none;
|
|
903
903
|
pointer-events: auto;
|
|
904
904
|
|
|
905
|
-
--ft-button-internal-line-height: calc(${
|
|
906
|
-
--ft-button-internal-color: ${
|
|
907
|
-
${e.setVariable(
|
|
905
|
+
--ft-button-internal-line-height: calc(${Le.fontSize} + 2px);
|
|
906
|
+
--ft-button-internal-color: ${Le.color};
|
|
907
|
+
${e.setVariable(ge.size,Le.iconSize)};
|
|
908
908
|
--ft-button-internal-vertical-padding: 6px;
|
|
909
909
|
--ft-button-internal-horizontal-padding: 8px;
|
|
910
|
-
${e.setVariable(
|
|
911
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
910
|
+
${e.setVariable(se.color,Le.rippleColor)};
|
|
911
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Le.iconSize});
|
|
912
912
|
|
|
913
|
-
border-radius: ${
|
|
913
|
+
border-radius: ${Le.borderRadius};
|
|
914
914
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
915
|
-
background-color: ${
|
|
915
|
+
background-color: ${Le.backgroundColor};
|
|
916
916
|
color: var(--ft-button-internal-color);
|
|
917
917
|
-webkit-mask-image: radial-gradient(white, black);
|
|
918
918
|
}
|
|
@@ -924,7 +924,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
924
924
|
.ft-button--dense {
|
|
925
925
|
--ft-button-internal-vertical-padding: 2px;
|
|
926
926
|
--ft-button-internal-horizontal-padding: 4px;
|
|
927
|
-
border-radius: ${
|
|
927
|
+
border-radius: ${Ve};
|
|
928
928
|
}
|
|
929
929
|
|
|
930
930
|
.ft-button--round {
|
|
@@ -933,13 +933,13 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
933
933
|
|
|
934
934
|
.ft-button[disabled] {
|
|
935
935
|
filter: grayscale(1);
|
|
936
|
-
opacity: ${
|
|
936
|
+
opacity: ${Le.opacityDisabled};
|
|
937
937
|
}
|
|
938
938
|
|
|
939
939
|
.ft-button.ft-button--primary {
|
|
940
|
-
background-color: ${
|
|
941
|
-
--ft-button-internal-color: ${
|
|
942
|
-
${e.setVariable(
|
|
940
|
+
background-color: ${Ge.backgroundColor};
|
|
941
|
+
--ft-button-internal-color: ${Ge.color};
|
|
942
|
+
${e.setVariable(se.color,Ge.rippleColor)};
|
|
943
943
|
}
|
|
944
944
|
|
|
945
945
|
.ft-button.ft-button--outlined {
|
|
@@ -958,8 +958,8 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
958
958
|
text-overflow: ellipsis;
|
|
959
959
|
display: block;
|
|
960
960
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
961
|
-
${e.setVariable(
|
|
962
|
-
${e.setVariable(
|
|
961
|
+
${e.setVariable(Ut.fontSize,"1em")};
|
|
962
|
+
${e.setVariable(Ut.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
963
963
|
}
|
|
964
964
|
|
|
965
965
|
.ft-button--safari-fix .ft-button--label {
|
|
@@ -992,10 +992,10 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
992
992
|
}
|
|
993
993
|
|
|
994
994
|
ft-loader {
|
|
995
|
-
${e.setVariable(
|
|
996
|
-
${e.setVariable(
|
|
995
|
+
${e.setVariable(Ue.size,Le.iconSize)};
|
|
996
|
+
${e.setVariable(Ue.color,"var(--ft-button-internal-color)")};
|
|
997
997
|
}
|
|
998
|
-
`];var
|
|
998
|
+
`];var Xe=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};class Ye extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=me.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":e.isSafari,"ft-no-text-select":!0};return this.addTooltipIfNeeded(i.html`
|
|
999
999
|
<button part="button"
|
|
1000
1000
|
class="${s.classMap(t)}"
|
|
1001
1001
|
aria-label="${this.getLabel()}"
|
|
@@ -1017,7 +1017,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1017
1017
|
</ft-tooltip>
|
|
1018
1018
|
`:t}resolveIcon(){return this.loading?i.html`
|
|
1019
1019
|
<ft-loader></ft-loader> `:this.icon?i.html`
|
|
1020
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:i.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}
|
|
1020
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:i.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Ye.elementDefinitions={"ft-ripple":ve,"ft-tooltip":_e,"ft-typography":te,"ft-icon":we,"ft-loader":We},Ye.styles=qe,Xe([o.property({type:Boolean})],Ye.prototype,"primary",void 0),Xe([o.property({type:Boolean})],Ye.prototype,"outlined",void 0),Xe([o.property({type:Boolean})],Ye.prototype,"disabled",void 0),Xe([o.property({type:Boolean})],Ye.prototype,"dense",void 0),Xe([o.property({type:Boolean})],Ye.prototype,"round",void 0),Xe([o.property({type:String})],Ye.prototype,"label",void 0),Xe([o.property({type:String})],Ye.prototype,"icon",void 0),Xe([o.property({type:String})],Ye.prototype,"iconVariant",void 0),Xe([o.property({type:Boolean})],Ye.prototype,"trailingIcon",void 0),Xe([o.property({type:Boolean})],Ye.prototype,"loading",void 0),Xe([o.property({type:String})],Ye.prototype,"tooltipPosition",void 0),Xe([o.property({type:Boolean})],Ye.prototype,"hideTooltip",void 0),Xe([o.property({type:Boolean})],Ye.prototype,"forceTooltip",void 0),Xe([o.query(".ft-button")],Ye.prototype,"button",void 0),Xe([o.query(".ft-button--label slot")],Ye.prototype,"slottedContent",void 0),e.customElement("ft-button")(Ye);class Je extends CustomEvent{constructor(t){super("row-click",{detail:t})}}const Qe={headerBackground:e.FtCssVariableFactory.create("--ft-filterable-table-header-background","COLOR","whitesmoke"),oddRowBackground:e.FtCssVariableFactory.create("--ft-filterable-table-odd-row-background","COLOR","#FFFFFF"),evenRowBackground:e.FtCssVariableFactory.create("--ft-filterable-table-even-row-background","COLOR","#fdfdfd"),rowHoverBackground:e.FtCssVariableFactory.create("--ft-filterable-table-row-hover-background","COLOR","#fafafa"),stickyHeaderZIndex:e.FtCssVariableFactory.create("--ft-filterable-table-sticky-header-zindex","NUMBER","100"),colorOnSurfaceHigh:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceHigh,"Design system"),titleFont:e.FtCssVariableFactory.external(e.designSystemVariables.titleFont,"Design system"),contentFont:e.FtCssVariableFactory.external(e.designSystemVariables.contentFont,"Design system")},ti=i.css`
|
|
1021
1021
|
:host {
|
|
1022
1022
|
display: block;
|
|
1023
1023
|
}
|
|
@@ -1033,15 +1033,15 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1033
1033
|
.header-cell {
|
|
1034
1034
|
display: flex;
|
|
1035
1035
|
flex-direction: column;
|
|
1036
|
-
background: ${
|
|
1037
|
-
color: ${
|
|
1036
|
+
background: ${Qe.headerBackground};
|
|
1037
|
+
color: ${Qe.colorOnSurfaceHigh};
|
|
1038
1038
|
padding: .5rem 1rem;
|
|
1039
|
-
font-family: ${
|
|
1039
|
+
font-family: ${Qe.titleFont};
|
|
1040
1040
|
}
|
|
1041
1041
|
|
|
1042
1042
|
.header-cell--sticky {
|
|
1043
1043
|
top: 0;
|
|
1044
|
-
z-index: ${
|
|
1044
|
+
z-index: ${Qe.stickyHeaderZIndex};
|
|
1045
1045
|
position: sticky;
|
|
1046
1046
|
}
|
|
1047
1047
|
|
|
@@ -1059,8 +1059,8 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1059
1059
|
}
|
|
1060
1060
|
|
|
1061
1061
|
.column-title-container ft-button {
|
|
1062
|
-
${e.setVariable(
|
|
1063
|
-
${e.setVariable(
|
|
1062
|
+
${e.setVariable(Le.backgroundColor,Qe.headerBackground)};
|
|
1063
|
+
${e.setVariable(Le.color,Qe.colorOnSurfaceHigh)};
|
|
1064
1064
|
}
|
|
1065
1065
|
|
|
1066
1066
|
.column-title {
|
|
@@ -1089,29 +1089,29 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1089
1089
|
|
|
1090
1090
|
.cell {
|
|
1091
1091
|
padding: 1rem;
|
|
1092
|
-
border-left: 1px solid ${
|
|
1093
|
-
border-bottom: 1px solid ${
|
|
1092
|
+
border-left: 1px solid ${Qe.headerBackground};
|
|
1093
|
+
border-bottom: 1px solid ${Qe.headerBackground};
|
|
1094
1094
|
overflow-x: auto;
|
|
1095
1095
|
display: flex;
|
|
1096
1096
|
align-items: center;
|
|
1097
|
-
font-family: ${
|
|
1097
|
+
font-family: ${Qe.contentFont};
|
|
1098
1098
|
}
|
|
1099
1099
|
|
|
1100
1100
|
/* Even is 2n+1 and odd is 2n because of the header */
|
|
1101
1101
|
.row:nth-child(2n) > .cell {
|
|
1102
|
-
background: ${
|
|
1102
|
+
background: ${Qe.oddRowBackground};
|
|
1103
1103
|
}
|
|
1104
1104
|
|
|
1105
1105
|
.row:nth-child(2n + 1) > .cell {
|
|
1106
|
-
background: ${
|
|
1106
|
+
background: ${Qe.evenRowBackground};
|
|
1107
1107
|
}
|
|
1108
1108
|
|
|
1109
1109
|
.row:hover > .cell {
|
|
1110
|
-
background: ${
|
|
1110
|
+
background: ${Qe.rowHoverBackground};
|
|
1111
1111
|
}
|
|
1112
1112
|
|
|
1113
1113
|
.cell:last-of-type {
|
|
1114
|
-
border-right: 1px solid ${
|
|
1114
|
+
border-right: 1px solid ${Qe.headerBackground};
|
|
1115
1115
|
}
|
|
1116
1116
|
|
|
1117
1117
|
.row:last-of-type .cell:first-of-type {
|
|
@@ -1125,7 +1125,7 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1125
1125
|
.hidden {
|
|
1126
1126
|
visibility: hidden;
|
|
1127
1127
|
}
|
|
1128
|
-
`;var
|
|
1128
|
+
`;var ei=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};const ii=t=>i.html`${t}`,oi=(t,e)=>t-e;class ni 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`
|
|
1129
1129
|
<style>
|
|
1130
1130
|
.table {
|
|
1131
1131
|
grid-template-columns: repeat(${this.columns.length}, minmax(min-content, auto));
|
|
@@ -1137,12 +1137,12 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1137
1137
|
</div>
|
|
1138
1138
|
${n.repeat(t,((t,e)=>"row-"+e),((t,e)=>i.html`
|
|
1139
1139
|
<div class="row"
|
|
1140
|
-
@click=${()=>this.dispatchEvent(new
|
|
1140
|
+
@click=${()=>this.dispatchEvent(new Je(t))}>
|
|
1141
1141
|
${n.repeat(this.columns,((t,i)=>"cell-"+e+" "+i),(i=>this.renderCell(i,t,e)))}
|
|
1142
1142
|
</div>
|
|
1143
1143
|
`))}
|
|
1144
1144
|
</div>
|
|
1145
|
-
`}filterData(){let t=[...this.data];return this.filters.forEach(((e,i)=>{var o;const n=this.columns[i];if(e)switch(null!==(o=n.filter)&&void 0!==o?o:"text"){case"text":e.value&&(t=t.filter((t=>this.getValueAsString(n,t,i).toLowerCase().includes(e.value.toLowerCase()))));break;case"select":e.value&&(t=t.filter((t=>this.getValueAsString(n,t,i)===e.value)))}})),t}sortData(t){var e;if(this.currentSort){const i=this.columns[this.currentSort.column],o=null!==(e=i.comparator)&&void 0!==e?e:
|
|
1145
|
+
`}filterData(){let t=[...this.data];return this.filters.forEach(((e,i)=>{var o;const n=this.columns[i];if(e)switch(null!==(o=n.filter)&&void 0!==o?o:"text"){case"text":e.value&&(t=t.filter((t=>this.getValueAsString(n,t,i).toLowerCase().includes(e.value.toLowerCase()))));break;case"select":e.value&&(t=t.filter((t=>this.getValueAsString(n,t,i)===e.value)))}})),t}sortData(t){var e;if(this.currentSort){const i=this.columns[this.currentSort.column],o=null!==(e=i.comparator)&&void 0!==e?e:oi,n="asc"===this.currentSort.order?o:(t,e)=>-o(t,e);return t.sort(((t,e)=>n(this.getValue(i,t),this.getValue(i,e))))}return t}update(t){super.update(t),t.has("sort")&&(this.currentSort=this.sort),(t.has("data")||t.has("columns"))&&this.updateSelectData()}updateSelectData(){this.selectData=[];const t=this.data,e=this.columns;for(let i in e){const o=e[i];"select"===o.filter&&(this.selectData[i]=[...new Set(t.map(((t,e)=>this.getValueAsString(o,t,e))))].sort(((t,e)=>t.localeCompare(e))))}this.requestUpdate()}renderHeader(t,e){const o={"header-cell":!0,"header-cell--sticky":this.stickyHeaders};return i.html`
|
|
1146
1146
|
<div class="${s.classMap(o)}">
|
|
1147
1147
|
<div class="column-title-container">
|
|
1148
1148
|
<span class="column-title">${t.title}</span>
|
|
@@ -1174,6 +1174,6 @@ const U=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
1174
1174
|
<ft-select-option value="${t}" label="${t}"></ft-select-option>
|
|
1175
1175
|
`))}
|
|
1176
1176
|
</ft-select>
|
|
1177
|
-
`:null}return null}renderCell(t,e,o){var n;const s=null!==(n=t.render)&&void 0!==n?n:
|
|
1177
|
+
`:null}return null}renderCell(t,e,o){var n;const s=null!==(n=t.render)&&void 0!==n?n:ii;return i.html`
|
|
1178
1178
|
<div class="cell">${(t=>{const e=s(t,o);return"string"==typeof e?l.unsafeHTML(e):e})(this.getValue(t,e))}</div>
|
|
1179
|
-
`}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)}}
|
|
1179
|
+
`}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)}}ni.styles=ti,ei([o.property({attribute:!1})],ni.prototype,"data",void 0),ei([o.property({attribute:!1})],ni.prototype,"columns",void 0),ei([o.property({attribute:!1})],ni.prototype,"sort",void 0),ei([o.property()],ni.prototype,"stickyHeaders",void 0),ei([o.state()],ni.prototype,"currentSort",void 0),e.customElement("ft-filterable-table")(ni),t.FtFilterableTable=ni,t.FtFilterableTableCssVariables=Qe,t.RowClickEvent=Je,t.styles=ti,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litUnsafeHTML,ftGlobals.litClassMap);
|