@fluid-topics/ft-filterable-table 0.2.1 → 0.2.2
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.
|
@@ -1,118 +1,118 @@
|
|
|
1
|
-
!function(t,e,i,o,n,s,l){
|
|
1
|
+
!function(t,e,i,o,n,s,l,r){
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var
|
|
7
|
+
var a;const p=globalThis.trustedTypes,f=p?p.createPolicy("lit-html",{createHTML:t=>t}):void 0,d=`lit$${(Math.random()+"").slice(9)}$`,h="?"+d,c=`<${h}>`,u=document,b=(t="")=>u.createComment(t),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,v=Array.isArray,y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,g=/-->/g,m=/>/g,$=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,w=/'/g,k=/"/g,z=/^(?:script|style|textarea|title)$/i,S=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),O=Symbol.for("lit-noChange"),C=Symbol.for("lit-nothing"),E=new WeakMap,F=u.createTreeWalker(u,129,null,!1),D=(t,e)=>{const i=t.length-1,o=[];let n,s=2===e?"<svg>":"",l=y;for(let e=0;e<i;e++){const i=t[e];let r,a,p=-1,f=0;for(;f<i.length&&(l.lastIndex=f,a=l.exec(i),null!==a);)f=l.lastIndex,l===y?"!--"===a[1]?l=g:void 0!==a[1]?l=m:void 0!==a[2]?(z.test(a[2])&&(n=RegExp("</"+a[2],"g")),l=$):void 0!==a[3]&&(l=$):l===$?">"===a[0]?(l=null!=n?n:y,p=-1):void 0===a[1]?p=-2:(p=l.lastIndex-a[2].length,r=a[1],l=void 0===a[3]?$:'"'===a[3]?k:w):l===k||l===w?l=$:l===g||l===m?l=y:(l=$,n=void 0);const h=l===$&&t[e+1].startsWith("/>")?" ":"";s+=l===y?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=s+(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,s=0;const l=t.length-1,r=this.parts,[a,f]=D(t,e);if(this.el=I.createElement(a,i),F.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=F.nextNode())&&r.length<l;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(d)){const i=f[s++];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]?T:"?"===e[1]?R:"@"===e[1]?_:A})}else r.push({type:6,index:n})}for(const e of t)o.removeAttribute(e)}if(z.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],b()),F.nextNode(),r.push({type:2,index:++n});o.append(t[e],b())}}}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,s,l,r;if(e===O)return e;let a=void 0!==o?null===(n=i._$Cl)||void 0===n?void 0:n[o]:i._$Cu;const p=x(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(s=null==a?void 0:a._$AO)||void 0===s||s.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,i,o)),void 0!==o?(null!==(l=(r=i)._$Cl)&&void 0!==l?l:r._$Cl=[])[o]=a:i._$Cu=a),void 0!==a&&(e=j(t,a._$AS(t,e.values),a,o)),e}class B{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:o}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:u).importNode(i,!0);F.currentNode=n;let s=F.nextNode(),l=0,r=0,a=o[0];for(;void 0!==a;){if(l===a.index){let e;2===a.type?e=new N(s,s.nextSibling,this,t):1===a.type?e=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(e=new M(s,this,t)),this.v.push(e),a=o[++r]}l!==(null==a?void 0:a.index)&&(s=F.nextNode(),l++)}return n}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class 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._$Cg=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._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=j(this,t,e),x(t)?t===C||null==t||""===t?(this._$AH!==C&&this._$AR(),this._$AH=C):t!==this._$AH&&t!==O&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var e;return v(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==C&&x(this._$AH)?this._$AA.nextSibling.data=t:this.S(u.createTextNode(t)),this._$AH=t}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.m(i);else{const t=new B(n,this),e=t.p(this.options);t.m(i),this.S(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}A(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.M(b()),this.M(b()),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._$Cg=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 s=!1;if(void 0===n)t=j(this,t,e,0),s=!x(t)||t!==this._$AH&&t!==O,s&&(this._$AH=t);else{const o=t;let l,r;for(t=n[0],l=0;l<n.length-1;l++)r=j(this,o[i+l],e,l),r===O&&(r=this._$AH[l]),s||(s=!x(r)||r!==this._$AH[l]),r===C?t=C:t!==C&&(t+=(null!=r?r:"")+n[l+1]),this._$AH[l]=r}s&&!o&&this.k(t)}k(t){t===C?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class T extends A{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===C?void 0:t}}const Z=p?p.emptyScript:"";class R extends A{constructor(){super(...arguments),this.type=4}k(t){t&&t!==C?this.element.setAttribute(this.name,Z):this.element.removeAttribute(this.name)}}class _ 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,s=t!==C&&(o===C||n);n&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class M{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){j(this,t)}}const U=window.litHtmlPolyfillSupport;null==U||U(I,N),(null!==(a=globalThis.litHtmlVersions)&&void 0!==a?a:globalThis.litHtmlVersions=[]).push("2.1.3");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
13
|
+
const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(e,...i)=>{var o;const n=i.length;let s,l;const r=[],a=[];let p,f=0,d=!1;for(;f<n;){for(p=e[f];f<n&&void 0!==(l=i[f],s=null===(o=l)||void 0===o?void 0:o._$litStatic$);)p+=s+e[++f],d=!0;a.push(l),r.push(p),f++}if(f===n&&r.push(e[n]),d){const t=r.join("$$lit$$");void 0===(e=L.get(t))&&(r.raw=r,L.set(t,e=r)),i=a}return t(e,...i)})(S);var K,G=function(t,e,i,o){for(var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};!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"}(K||(K={}));const P=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),V=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),q={fontFamily:V,fontSize:e.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:e.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},X=e.FtCssVariable.extend("--ft-typography-title-font-family",P),Y=e.FtCssVariable.extend("--ft-typography-title-font-size",q.fontSize,"20px"),J=e.FtCssVariable.extend("--ft-typography-title-font-weight",q.fontWeight,"normal"),Q=e.FtCssVariable.extend("--ft-typography-title-letter-spacing",q.letterSpacing,"0.15px"),tt=e.FtCssVariable.extend("--ft-typography-title-line-height",q.lineHeight,"24px"),et=e.FtCssVariable.extend("--ft-typography-title-text-transform",q.textTransform,"inherit"),it=e.FtCssVariable.extend("--ft-typography-title-dense-font-family",P),ot=e.FtCssVariable.extend("--ft-typography-title-dense-font-size",q.fontSize,"14px"),nt=e.FtCssVariable.extend("--ft-typography-title-dense-font-weight",q.fontWeight,"normal"),st=e.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",q.letterSpacing,"0.105px"),lt=e.FtCssVariable.extend("--ft-typography-title-dense-line-height",q.lineHeight,"24px"),rt=e.FtCssVariable.extend("--ft-typography-title-dense-text-transform",q.textTransform,"inherit"),at=e.FtCssVariable.extend("--ft-typography-subtitle1-font-family",V),pt=e.FtCssVariable.extend("--ft-typography-subtitle1-font-size",q.fontSize,"16px"),ft=e.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",q.fontWeight,"600"),dt=e.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",q.letterSpacing,"0.144px"),ht=e.FtCssVariable.extend("--ft-typography-subtitle1-line-height",q.lineHeight,"24px"),ct=e.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",q.textTransform,"inherit"),ut=e.FtCssVariable.extend("--ft-typography-subtitle2-font-family",V),bt=e.FtCssVariable.extend("--ft-typography-subtitle2-font-size",q.fontSize,"14px"),xt=e.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",q.fontWeight,"normal"),vt=e.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",q.letterSpacing,"0.098px"),yt=e.FtCssVariable.extend("--ft-typography-subtitle2-line-height",q.lineHeight,"24px"),gt=e.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",q.textTransform,"inherit"),mt={fontFamily:e.FtCssVariable.extend("--ft-typography-body1-font-family",V),fontSize:e.FtCssVariable.extend("--ft-typography-body1-font-size",q.fontSize,"16px"),fontWeight:e.FtCssVariable.extend("--ft-typography-body1-font-weight",q.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-body1-letter-spacing",q.letterSpacing,"0.496px"),lineHeight:e.FtCssVariable.extend("--ft-typography-body1-line-height",q.lineHeight,"24px"),textTransform:e.FtCssVariable.extend("--ft-typography-body1-text-transform",q.textTransform,"inherit")},$t=e.FtCssVariable.extend("--ft-typography-body2-font-family",V),wt=e.FtCssVariable.extend("--ft-typography-body2-font-size",q.fontSize,"14px"),kt=e.FtCssVariable.extend("--ft-typography-body2-font-weight",q.fontWeight,"normal"),zt=e.FtCssVariable.extend("--ft-typography-body2-letter-spacing",q.letterSpacing,"0.252px"),St=e.FtCssVariable.extend("--ft-typography-body2-line-height",q.lineHeight,"20px"),Ot=e.FtCssVariable.extend("--ft-typography-body2-text-transform",q.textTransform,"inherit"),Ct={fontFamily:e.FtCssVariable.extend("--ft-typography-caption-font-family",V),fontSize:e.FtCssVariable.extend("--ft-typography-caption-font-size",q.fontSize,"12px"),fontWeight:e.FtCssVariable.extend("--ft-typography-caption-font-weight",q.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-caption-letter-spacing",q.letterSpacing,"0.396px"),lineHeight:e.FtCssVariable.extend("--ft-typography-caption-line-height",q.lineHeight,"16px"),textTransform:e.FtCssVariable.extend("--ft-typography-caption-text-transform",q.textTransform,"inherit")},Et=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",V),Ft=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",q.fontSize,"10px"),Dt=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",q.fontWeight,"normal"),It=e.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",q.letterSpacing,"0.33px"),jt=e.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",q.lineHeight,"16px"),Bt=e.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",q.textTransform,"inherit"),Nt=e.FtCssVariable.extend("--ft-typography-overline-font-family",V),At=e.FtCssVariable.extend("--ft-typography-overline-font-size",q.fontSize,"10px"),Tt=e.FtCssVariable.extend("--ft-typography-overline-font-weight",q.fontWeight,"normal"),Zt=e.FtCssVariable.extend("--ft-typography-overline-letter-spacing",q.letterSpacing,"1.5px"),Rt=e.FtCssVariable.extend("--ft-typography-overline-line-height",q.lineHeight,"16px"),_t=e.FtCssVariable.extend("--ft-typography-overline-text-transform",q.textTransform,"uppercase"),Mt={fontFamily:e.FtCssVariable.extend("--ft-typography-button-font-family",V),fontSize:e.FtCssVariable.extend("--ft-typography-button-font-size",q.fontSize,"14px"),fontWeight:e.FtCssVariable.extend("--ft-typography-button-font-weight",q.fontWeight,"600"),letterSpacing:e.FtCssVariable.extend("--ft-typography-button-letter-spacing",q.letterSpacing,"1.246px"),lineHeight:e.FtCssVariable.extend("--ft-typography-button-line-height",q.lineHeight,"16px"),textTransform:e.FtCssVariable.extend("--ft-typography-button-text-transform",q.textTransform,"uppercase")},Ut=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: ${
|
|
15
|
+
font-family: ${X};
|
|
16
|
+
font-size: ${Y};
|
|
17
|
+
font-weight: ${J};
|
|
18
|
+
letter-spacing: ${Q};
|
|
19
|
+
line-height: ${tt};
|
|
20
|
+
text-transform: ${et};
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,Ht=i.css`
|
|
23
23
|
.ft-typography--title-dense {
|
|
24
|
-
font-family: ${
|
|
25
|
-
font-size: ${
|
|
26
|
-
font-weight: ${
|
|
27
|
-
letter-spacing: ${
|
|
28
|
-
line-height: ${
|
|
29
|
-
text-transform: ${
|
|
24
|
+
font-family: ${it};
|
|
25
|
+
font-size: ${ot};
|
|
26
|
+
font-weight: ${nt};
|
|
27
|
+
letter-spacing: ${st};
|
|
28
|
+
line-height: ${lt};
|
|
29
|
+
text-transform: ${rt};
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,Lt=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: ${at};
|
|
34
|
+
font-size: ${pt};
|
|
35
|
+
font-weight: ${ft};
|
|
36
|
+
letter-spacing: ${dt};
|
|
37
|
+
line-height: ${ht};
|
|
38
|
+
text-transform: ${ct};
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,Wt=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: ${ut};
|
|
43
|
+
font-size: ${bt};
|
|
44
|
+
font-weight: ${xt};
|
|
45
|
+
letter-spacing: ${vt};
|
|
46
|
+
line-height: ${yt};
|
|
47
|
+
text-transform: ${gt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,Kt=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: ${mt.fontFamily};
|
|
53
|
+
font-size: ${mt.fontSize};
|
|
54
|
+
font-weight: ${mt.fontWeight};
|
|
55
|
+
letter-spacing: ${mt.letterSpacing};
|
|
56
|
+
line-height: ${mt.lineHeight};
|
|
57
|
+
text-transform: ${mt.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: ${$t};
|
|
62
|
+
font-size: ${wt};
|
|
63
|
+
font-weight: ${kt};
|
|
64
|
+
letter-spacing: ${zt};
|
|
65
|
+
line-height: ${St};
|
|
66
|
+
text-transform: ${Ot};
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,Pt=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: ${Ct.fontFamily};
|
|
71
|
+
font-size: ${Ct.fontSize};
|
|
72
|
+
font-weight: ${Ct.fontWeight};
|
|
73
|
+
letter-spacing: ${Ct.letterSpacing};
|
|
74
|
+
line-height: ${Ct.lineHeight};
|
|
75
|
+
text-transform: ${Ct.textTransform};
|
|
76
76
|
}
|
|
77
|
-
`,
|
|
77
|
+
`,Vt=i.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
|
-
font-family: ${
|
|
80
|
-
font-size: ${
|
|
81
|
-
font-weight: ${
|
|
82
|
-
letter-spacing: ${
|
|
79
|
+
font-family: ${Et};
|
|
80
|
+
font-size: ${Ft};
|
|
81
|
+
font-weight: ${Dt};
|
|
82
|
+
letter-spacing: ${It};
|
|
83
83
|
line-height: ${jt};
|
|
84
|
-
text-transform: ${
|
|
84
|
+
text-transform: ${Bt};
|
|
85
85
|
}
|
|
86
|
-
`,
|
|
86
|
+
`,qt=i.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
|
-
font-family: ${
|
|
88
|
+
font-family: ${Nt};
|
|
89
89
|
font-size: ${At};
|
|
90
|
-
font-weight: ${
|
|
91
|
-
letter-spacing: ${
|
|
92
|
-
line-height: ${
|
|
90
|
+
font-weight: ${Tt};
|
|
91
|
+
letter-spacing: ${Zt};
|
|
92
|
+
line-height: ${Rt};
|
|
93
93
|
text-transform: ${_t};
|
|
94
94
|
}
|
|
95
|
-
`,
|
|
95
|
+
`,Xt=i.css`
|
|
96
96
|
.ft-typography--button {
|
|
97
|
-
font-family: ${
|
|
98
|
-
font-size: ${
|
|
99
|
-
font-weight: ${
|
|
100
|
-
letter-spacing: ${
|
|
101
|
-
line-height: ${
|
|
102
|
-
text-transform: ${
|
|
97
|
+
font-family: ${Mt.fontFamily};
|
|
98
|
+
font-size: ${Mt.fontSize};
|
|
99
|
+
font-weight: ${Mt.fontWeight};
|
|
100
|
+
letter-spacing: ${Mt.letterSpacing};
|
|
101
|
+
line-height: ${Mt.lineHeight};
|
|
102
|
+
text-transform: ${Mt.textTransform};
|
|
103
103
|
}
|
|
104
|
-
`;class
|
|
105
|
-
<${
|
|
104
|
+
`;class Yt extends e.FtLitElement{constructor(){super(...arguments),this.variant=K.body1}render(){return this.element?W`
|
|
105
|
+
<${H(this.element)}
|
|
106
106
|
class="ft-typography ft-typography--${this.variant}">
|
|
107
107
|
<slot></slot>
|
|
108
|
-
</${
|
|
109
|
-
`:
|
|
108
|
+
</${H(this.element)}>
|
|
109
|
+
`:W`
|
|
110
110
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
111
|
-
`}}
|
|
111
|
+
`}}Yt.styles=[Ut,Ht,Lt,Wt,Kt,Gt,Pt,Vt,qt,Xt,i.css`
|
|
112
112
|
.ft-typography {
|
|
113
113
|
vertical-align: inherit;
|
|
114
114
|
}
|
|
115
|
-
`],
|
|
115
|
+
`],G([o.property()],Yt.prototype,"element",void 0),G([o.property()],Yt.prototype,"variant",void 0),e.customElement("ft-typography")(Yt);var Jt=function(t,e,i,o){for(var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};const Qt={fontSize:e.FtCssVariable.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:e.FtCssVariable.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:e.FtCssVariable.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:e.FtCssVariable.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariable.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:e.FtCssVariable.extend("--ft-input-label-border-color",e.designSystemVariables.colorOutline),textColor:e.FtCssVariable.extend("--ft-input-label-text-color",e.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:e.FtCssVariable.extend("--ft-input-label-disabled-text-color",e.designSystemVariables.colorOnSurfaceDisabled),colorSurface:e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system"),borderRadiusS:e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system")};class te extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!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};return i.html`
|
|
116
116
|
<div class="${l.classMap(t)}">
|
|
117
117
|
${this.text?i.html`
|
|
118
118
|
<div class="ft-input-label--text ft-typography--caption">
|
|
@@ -121,7 +121,7 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
121
121
|
</div>
|
|
122
122
|
`:null}
|
|
123
123
|
</div>
|
|
124
|
-
`}}
|
|
124
|
+
`}}te.elementDefinitions={},te.styles=[Pt,i.css`
|
|
125
125
|
.ft-input-label {
|
|
126
126
|
position: absolute;
|
|
127
127
|
inset: 0;
|
|
@@ -129,7 +129,7 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
.ft-input-label {
|
|
132
|
-
border-color: ${
|
|
132
|
+
border-color: ${Qt.borderColor};
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
.ft-input-label:before,
|
|
@@ -142,7 +142,7 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
.ft-input-label:before {
|
|
145
|
-
width: ${
|
|
145
|
+
width: ${Qt.horizontalSpacing};
|
|
146
146
|
flex-shrink: 0;
|
|
147
147
|
}
|
|
148
148
|
|
|
@@ -158,14 +158,14 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
158
158
|
border-bottom-width: 1px;
|
|
159
159
|
border-bottom-style: solid;
|
|
160
160
|
border-color: inherit;
|
|
161
|
-
color: ${
|
|
161
|
+
color: ${Qt.textColor};
|
|
162
162
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
163
|
-
${e.setVariable(
|
|
164
|
-
${e.setVariable(
|
|
163
|
+
${e.setVariable(Ct.fontSize,Qt.fontSize)};
|
|
164
|
+
${e.setVariable(Ct.lineHeight,Qt.fontSize)};
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
.ft-input-label--disabled .ft-input-label--text {
|
|
168
|
-
color: ${
|
|
168
|
+
color: ${Qt.disabledTextColor};
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
.ft-input-label--hidden-text {
|
|
@@ -181,17 +181,17 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
181
181
|
overflow: hidden;
|
|
182
182
|
white-space: nowrap;
|
|
183
183
|
text-overflow: ellipsis;
|
|
184
|
-
padding: ${
|
|
185
|
-
margin: calc(${
|
|
184
|
+
padding: ${Qt.verticalSpacing} 4px;
|
|
185
|
+
margin: calc(${Qt.verticalSpacing} * -1) 0;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
.ft-input-label--raised .ft-input-label--text {
|
|
189
|
-
${e.setVariable(
|
|
190
|
-
${e.setVariable(
|
|
189
|
+
${e.setVariable(Ct.fontSize,Qt.raisedFontSize)};
|
|
190
|
+
${e.setVariable(Ct.lineHeight,Qt.raisedFontSize)};
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
194
|
-
top: ${
|
|
194
|
+
top: ${Qt.verticalSpacing};
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -204,27 +204,27 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
204
204
|
.ft-input-label--outlined:before {
|
|
205
205
|
border-left-width: 1px;
|
|
206
206
|
border-left-style: solid;
|
|
207
|
-
border-radius: ${
|
|
207
|
+
border-radius: ${Qt.borderRadiusS} 0 0 ${Qt.borderRadiusS};
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
.ft-input-label--outlined:after {
|
|
211
211
|
border-right-width: 1px;
|
|
212
212
|
border-right-style: solid;
|
|
213
|
-
border-radius: 0 ${
|
|
213
|
+
border-radius: 0 ${Qt.borderRadiusS} ${Qt.borderRadiusS} 0;
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
217
217
|
padding: 2px 4px;
|
|
218
|
-
z-index: ${
|
|
219
|
-
background-color: ${
|
|
220
|
-
border-radius: ${
|
|
218
|
+
z-index: ${Qt.raisedZIndex};
|
|
219
|
+
background-color: ${Qt.colorSurface};
|
|
220
|
+
border-radius: ${Qt.borderRadiusS};
|
|
221
221
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
225
225
|
border-top: none;
|
|
226
226
|
}
|
|
227
|
-
`],
|
|
227
|
+
`],Jt([o.property({type:String})],te.prototype,"text",void 0),Jt([o.property({type:Boolean})],te.prototype,"raised",void 0),Jt([o.property({type:Boolean})],te.prototype,"outlined",void 0),Jt([o.property({type:Boolean})],te.prototype,"disabled",void 0),e.customElement("ft-input-label")(te);var ee=function(t,e,i,o){for(var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};const ie={color:e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorContent),primaryColor:e.FtCssVariable.extend("--ft-ripple-primary-color",e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary)),secondaryColor:e.FtCssVariable.extend("--ft-ripple-secondary-color",e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary)),opacityContentOnSurfacePressed:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")};class oe 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.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed)},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:n}=this.getCoordinates(t),s=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-s.x:s.width/2),this.originY=Math.round(null!=n?n-s.y:s.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`
|
|
228
228
|
<style>
|
|
229
229
|
.ft-ripple .ft-ripple--effect,
|
|
230
230
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -241,7 +241,7 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
241
241
|
<div class="ft-ripple--background"></div>
|
|
242
242
|
<div class="ft-ripple--effect"></div>
|
|
243
243
|
</div>
|
|
244
|
-
`}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){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple(),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()}}var
|
|
244
|
+
`}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){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple(),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()}}var ne,se;oe.elementDefinitions={},oe.styles=i.css`
|
|
245
245
|
:host {
|
|
246
246
|
display: contents;
|
|
247
247
|
}
|
|
@@ -260,17 +260,17 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
260
260
|
.ft-ripple .ft-ripple--effect {
|
|
261
261
|
position: absolute;
|
|
262
262
|
opacity: 0;
|
|
263
|
-
background-color: ${
|
|
263
|
+
background-color: ${ie.color};
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background,
|
|
267
267
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
268
|
-
background-color: ${
|
|
268
|
+
background-color: ${ie.secondaryColor};
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
.ft-ripple.ft-ripple--primary .ft-ripple--background,
|
|
272
272
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
273
|
-
background-color: ${
|
|
273
|
+
background-color: ${ie.primaryColor};
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
.ft-ripple .ft-ripple--background {
|
|
@@ -301,36 +301,36 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
304
|
-
opacity: ${
|
|
304
|
+
opacity: ${ie.opacityContentOnSurfaceHover};
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
308
|
-
opacity: ${
|
|
308
|
+
opacity: ${ie.opacityContentOnSurfaceSelected};
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
312
|
-
opacity: ${
|
|
312
|
+
opacity: ${ie.opacityContentOnSurfaceFocused};
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
316
|
-
opacity: ${
|
|
316
|
+
opacity: ${ie.opacityContentOnSurfacePressed};
|
|
317
317
|
transform: translate(-50%, -50%) scale(1);
|
|
318
318
|
}
|
|
319
|
-
`,
|
|
319
|
+
`,ee([o.property({type:Boolean})],oe.prototype,"primary",void 0),ee([o.property({type:Boolean})],oe.prototype,"secondary",void 0),ee([o.property({type:Boolean})],oe.prototype,"unbounded",void 0),ee([o.property({type:Boolean})],oe.prototype,"activated",void 0),ee([o.property({type:Boolean})],oe.prototype,"selected",void 0),ee([o.property({type:Boolean})],oe.prototype,"disabled",void 0),ee([o.state()],oe.prototype,"hovered",void 0),ee([o.state()],oe.prototype,"focused",void 0),ee([o.state()],oe.prototype,"pressed",void 0),ee([o.state()],oe.prototype,"rippling",void 0),ee([o.state()],oe.prototype,"rippleSize",void 0),ee([o.state()],oe.prototype,"originX",void 0),ee([o.state()],oe.prototype,"originY",void 0),ee([o.query(".ft-ripple")],oe.prototype,"ripple",void 0),ee([o.query(".ft-ripple--effect")],oe.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(oe),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=""}(ne||(ne={})),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=""}(se||(se={})),new Map([...["abw"].map((t=>[t,se.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,se.AUDIO])),...["avi"].map((t=>[t,se.AVI])),...["chm","xhs"].map((t=>[t,se.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,se.CODE])),...["csv"].map((t=>[t,se.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,se.DITA])),...["epub"].map((t=>[t,se.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,se.EXCEL])),...["flac"].map((t=>[t,se.FLAC])),...["gif"].map((t=>[t,se.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,se.GZIP])),...["html","htm","xhtml"].map((t=>[t,se.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,se.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,se.JPEG])),...["json"].map((t=>[t,se.JSON])),...["m4a","m4p"].map((t=>[t,se.M4A])),...["mov","qt"].map((t=>[t,se.MOV])),...["mp3"].map((t=>[t,se.MP3])),...["mp4","m4v"].map((t=>[t,se.MP4])),...["ogg","oga"].map((t=>[t,se.OGG])),...["pdf","ps"].map((t=>[t,se.PDF])),...["png"].map((t=>[t,se.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,se.POWERPOINT])),...["rar"].map((t=>[t,se.RAR])),...["stp"].map((t=>[t,se.STP])),...["txt","rtf","md","mdown"].map((t=>[t,se.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,se.VIDEO])),...["wav"].map((t=>[t,se.WAV])),...["wma"].map((t=>[t,se.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,se.WORD])),...["xml","xsl","rdf"].map((t=>[t,se.XML])),...["yaml","yml","x-yaml"].map((t=>[t,se.YAML])),...["zip"].map((t=>[t,se.ZIP]))]);var le,re=function(t,e,i,o){for(var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(le||(le={}));const ae={size:e.FtCssVariable.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:e.FtCssVariable.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:e.FtCssVariable.extend("--ft-icon-file-format-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:e.FtCssVariable.extend("--ft-icon-material-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class pe extends e.FtLitElement{constructor(){super(...arguments),this.variant=le.fluid_topics}render(){return i.html`
|
|
320
320
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
321
321
|
${s.unsafeHTML(this.getIcon())}
|
|
322
322
|
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
323
323
|
</i>
|
|
324
|
-
`}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:""}getIcon(){var t,e;let o=this.textContent;return this.variant===
|
|
324
|
+
`}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:""}getIcon(){var t,e;let o=this.textContent;return this.variant===le.file_format?null!==(t=se[o.toUpperCase()])&&void 0!==t?t:o:this.variant===le.fluid_topics?null!==(e=ne[o.toUpperCase()])&&void 0!==e?e:o:i.nothing}}pe.elementDefinitions={},pe.styles=i.css`
|
|
325
325
|
:host, i.ft-icon {
|
|
326
326
|
display: inline-block;
|
|
327
|
-
width: ${
|
|
328
|
-
height: ${
|
|
327
|
+
width: ${ae.size};
|
|
328
|
+
height: ${ae.size};
|
|
329
329
|
text-align: center;
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
i.ft-icon {
|
|
333
|
-
font-size: ${
|
|
333
|
+
font-size: ${ae.size};
|
|
334
334
|
line-height: 1;
|
|
335
335
|
font-weight: normal;
|
|
336
336
|
text-transform: none;
|
|
@@ -344,17 +344,17 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
344
344
|
}
|
|
345
345
|
|
|
346
346
|
.ft-icon--fluid-topics {
|
|
347
|
-
font-family: ${
|
|
347
|
+
font-family: ${ae.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
348
348
|
}
|
|
349
349
|
|
|
350
350
|
.ft-icon--file-format {
|
|
351
|
-
font-family: ${
|
|
351
|
+
font-family: ${ae.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
352
352
|
}
|
|
353
353
|
|
|
354
354
|
.ft-icon--material {
|
|
355
|
-
font-family: ${
|
|
355
|
+
font-family: ${ae.materialFontFamily}, "Material Icons", sans-serif;
|
|
356
356
|
}
|
|
357
|
-
`,
|
|
357
|
+
`,re([o.property()],pe.prototype,"variant",void 0),re([o.query("slot")],pe.prototype,"slottedContent",void 0),e.customElement("ft-icon")(pe);var fe=function(t,e,i,o){for(var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};class de 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}))}}de.elementDefinitions={},fe([o.property({type:String})],de.prototype,"label",void 0),fe([o.property({type:Object,converter:t=>t})],de.prototype,"value",void 0),fe([o.property({type:Boolean,reflect:!0})],de.prototype,"selected",void 0);const he={labelSize:e.FtCssVariable.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:e.FtCssVariable.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:e.FtCssVariable.create("--ft-select-vertical-spacing","SIZE","4px"),selectedOptionColor:e.FtCssVariable.extend("--ft-select-selected-option-color",e.designSystemVariables.colorOnSurface),helperColor:e.FtCssVariable.extend("--ft-select-helper-color",e.designSystemVariables.colorOnSurfaceMedium),optionsColor:e.FtCssVariable.extend("--ft-select-options-color",e.designSystemVariables.colorOnSurface),optionsZIndex:e.FtCssVariable.create("--ft-select-options-z-index","NUMBER","2"),colorSurface:e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),borderRadiusS:e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system"),elevation02:e.FtCssVariable.external(e.designSystemVariables.elevation02,"Design system")};class ce extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,o,s,r;let a=!this.disabled&&this.optionsDisplayed&&this.hasOptions,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};return i.html`
|
|
358
358
|
<div class="${l.classMap(d)}" part="container">
|
|
359
359
|
<div class="ft-select--main-panel" part="main-panel">
|
|
360
360
|
<ft-input-label text="${this.label}"
|
|
@@ -400,7 +400,7 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
400
400
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
401
401
|
${t.label}
|
|
402
402
|
</div>
|
|
403
|
-
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,n,s;let l;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),l=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),l=null!==(s=null===(n=this.focusedOption)||void 0===n?void 0:n.nextElementSibling)&&void 0!==s?s:this.firstOption}null==l||l.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){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)}}
|
|
403
|
+
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,n,s;let l;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),l=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),l=null!==(s=null===(n=this.focusedOption)||void 0===n?void 0:n.nextElementSibling)&&void 0!==s?s:this.firstOption}null==l||l.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}ce.elementDefinitions={"ft-input-label":te,"ft-typography":Yt,"ft-ripple":oe,"ft-icon":pe},ce.styles=[Gt,Pt,i.css`
|
|
404
404
|
*:focus {
|
|
405
405
|
outline: none;
|
|
406
406
|
}
|
|
@@ -414,7 +414,7 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
414
414
|
.ft-select--main-panel {
|
|
415
415
|
position: relative;
|
|
416
416
|
display: flex;
|
|
417
|
-
height: calc(4 * ${
|
|
417
|
+
height: calc(4 * ${he.verticalSpacing} + ${he.labelSize} + ${he.selectedOptionSize});
|
|
418
418
|
}
|
|
419
419
|
|
|
420
420
|
.ft-select--input-panel {
|
|
@@ -426,19 +426,19 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
426
426
|
padding-left: 16px;
|
|
427
427
|
padding-right: 8px;
|
|
428
428
|
gap: 8px;
|
|
429
|
-
color: ${
|
|
430
|
-
${e.setVariable(
|
|
429
|
+
color: ${he.selectedOptionColor};
|
|
430
|
+
${e.setVariable(ie.color,he.selectedOptionColor)};
|
|
431
431
|
}
|
|
432
432
|
|
|
433
433
|
.ft-select--input-panel,
|
|
434
434
|
.ft-select--option {
|
|
435
|
-
${e.setVariable(
|
|
436
|
-
${e.setVariable(
|
|
435
|
+
${e.setVariable(ie.opacityContentOnSurfaceHover,"0.08")};
|
|
436
|
+
${e.setVariable(ie.opacityContentOnSurfacePressed,"0.04")};
|
|
437
437
|
}
|
|
438
438
|
|
|
439
439
|
.ft-select--disabled .ft-select--input-panel,
|
|
440
440
|
.ft-select--disabled .ft-select--option {
|
|
441
|
-
color: ${
|
|
441
|
+
color: ${he.colorOnSurfaceDisabled};
|
|
442
442
|
}
|
|
443
443
|
|
|
444
444
|
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
@@ -447,18 +447,18 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
447
447
|
}
|
|
448
448
|
|
|
449
449
|
ft-input-label {
|
|
450
|
-
${e.setVariable(
|
|
451
|
-
${e.setVariable(
|
|
452
|
-
${e.setVariable(
|
|
450
|
+
${e.setVariable(Qt.fontSize,he.selectedOptionSize)};
|
|
451
|
+
${e.setVariable(Qt.raisedFontSize,he.labelSize)};
|
|
452
|
+
${e.setVariable(Qt.verticalSpacing,he.verticalSpacing)};
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
456
|
-
color: ${
|
|
456
|
+
color: ${he.colorPrimary};
|
|
457
457
|
}
|
|
458
458
|
|
|
459
459
|
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
460
|
-
${e.setVariable(
|
|
461
|
-
${e.setVariable(
|
|
460
|
+
${e.setVariable(Qt.borderColor,he.colorPrimary)};
|
|
461
|
+
${e.setVariable(Qt.textColor,he.colorPrimary)};
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
.ft-select--selected-option {
|
|
@@ -468,8 +468,8 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
468
468
|
overflow: hidden;
|
|
469
469
|
white-space: nowrap;
|
|
470
470
|
text-overflow: ellipsis;
|
|
471
|
-
${e.setVariable(
|
|
472
|
-
${e.setVariable(
|
|
471
|
+
${e.setVariable(mt.fontSize,he.selectedOptionSize)};
|
|
472
|
+
${e.setVariable(mt.lineHeight,he.selectedOptionSize)};
|
|
473
473
|
}
|
|
474
474
|
|
|
475
475
|
ft-icon {
|
|
@@ -481,16 +481,16 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
481
481
|
}
|
|
482
482
|
|
|
483
483
|
.ft-select--filled .ft-select--input-panel {
|
|
484
|
-
border-radius: ${
|
|
484
|
+
border-radius: ${he.borderRadiusS} ${he.borderRadiusS} 0 0;
|
|
485
485
|
}
|
|
486
486
|
|
|
487
487
|
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
488
488
|
align-self: stretch;
|
|
489
|
-
padding-top: calc(${
|
|
489
|
+
padding-top: calc(${he.labelSize} + 2 * ${he.verticalSpacing});
|
|
490
490
|
}
|
|
491
491
|
|
|
492
492
|
.ft-select--outlined .ft-select--input-panel {
|
|
493
|
-
border-radius: ${
|
|
493
|
+
border-radius: ${he.borderRadiusS};
|
|
494
494
|
}
|
|
495
495
|
|
|
496
496
|
.ft-select--options {
|
|
@@ -499,10 +499,10 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
499
499
|
top: 100%;
|
|
500
500
|
left: 0;
|
|
501
501
|
right: 0;
|
|
502
|
-
color: ${
|
|
503
|
-
background: ${
|
|
504
|
-
z-index: ${
|
|
505
|
-
box-shadow: ${
|
|
502
|
+
color: ${he.optionsColor};
|
|
503
|
+
background: ${he.colorSurface};
|
|
504
|
+
z-index: ${he.optionsZIndex};
|
|
505
|
+
box-shadow: ${he.elevation02};
|
|
506
506
|
}
|
|
507
507
|
|
|
508
508
|
.ft-select--options-displayed .ft-select--options {
|
|
@@ -519,9 +519,9 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
519
519
|
|
|
520
520
|
.ft-select--helper-text {
|
|
521
521
|
padding: 0 12px 0 16px;
|
|
522
|
-
color: ${
|
|
522
|
+
color: ${he.helperColor};
|
|
523
523
|
}
|
|
524
|
-
`],
|
|
524
|
+
`],fe([o.property({type:String})],ce.prototype,"label",void 0),fe([o.property({type:String})],ce.prototype,"helper",void 0),fe([o.property({type:Boolean})],ce.prototype,"outlined",void 0),fe([o.property({type:Boolean})],ce.prototype,"disabled",void 0),fe([o.property({type:Array})],ce.prototype,"options",void 0),fe([o.state()],ce.prototype,"selectedOption",void 0),fe([o.state()],ce.prototype,"optionsDisplayed",void 0),fe([o.state()],ce.prototype,"focusOptions",void 0),fe([o.query(".ft-select")],ce.prototype,"container",void 0),fe([o.query(".ft-select--input-panel")],ce.prototype,"mainPanel",void 0),fe([o.query(".ft-select--option:first-child")],ce.prototype,"firstOption",void 0),fe([o.query(".ft-select--option:focus")],ce.prototype,"focusedOption",void 0),fe([o.query(".ft-select--option.ft-select--option-selected")],ce.prototype,"selectedOptionElement",void 0),fe([o.query(".ft-select--option:last-child")],ce.prototype,"lastOption",void 0),fe([o.query("slot")],ce.prototype,"optionsSlot",void 0),e.customElement("ft-select")(ce),e.customElement("ft-select-option")(de);var ue=function(t,e,i,o){for(var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};const be={fontSize:e.FtCssVariable.create("--ft-text-field-font-size","SIZE","14px"),labelSize:e.FtCssVariable.create("--ft-text-field-label-size","SIZE","11px"),verticalSpacing:e.FtCssVariable.create("--ft-text-field-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariable.create("--ft-text-field-horizontal-spacing","SIZE","16px"),helperColor:e.FtCssVariable.extend("--ft-text-field-helper-color",e.designSystemVariables.colorOnSurfaceMedium),colorPrimary:e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:e.FtCssVariable.external(e.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system")};class xe extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value="",this.helper="",this.outlined=!1,this.disabled=!1,this.dataList=[],this.focused=!1}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};return i.html`
|
|
525
525
|
<div class="${l.classMap(t)}">
|
|
526
526
|
<div class="ft-text-field--main-panel">
|
|
527
527
|
<ft-input-label text="${this.label}"
|
|
@@ -556,7 +556,7 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
556
556
|
<ft-typography class="ft-text-field--helper-text" variant="caption">${this.helper}
|
|
557
557
|
</ft-typography>`:void 0}
|
|
558
558
|
</div>
|
|
559
|
-
`}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)||""}}
|
|
559
|
+
`}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)||""}}xe.elementDefinitions={"ft-input-label":te,"ft-ripple":oe,"ft-typography":Yt},xe.styles=[Kt,i.css`
|
|
560
560
|
*:focus {
|
|
561
561
|
outline: none;
|
|
562
562
|
}
|
|
@@ -568,16 +568,16 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
568
568
|
}
|
|
569
569
|
|
|
570
570
|
ft-input-label {
|
|
571
|
-
${e.setVariable(
|
|
572
|
-
${e.setVariable(
|
|
573
|
-
${e.setVariable(
|
|
574
|
-
${e.setVariable(
|
|
571
|
+
${e.setVariable(Qt.fontSize,be.fontSize)};
|
|
572
|
+
${e.setVariable(Qt.raisedFontSize,be.labelSize)};
|
|
573
|
+
${e.setVariable(Qt.verticalSpacing,be.verticalSpacing)};
|
|
574
|
+
${e.setVariable(Qt.horizontalSpacing,i.css`calc(${be.horizontalSpacing} - 4px)`)};
|
|
575
575
|
}
|
|
576
576
|
|
|
577
577
|
.ft-text-field--main-panel {
|
|
578
578
|
position: relative;
|
|
579
579
|
display: flex;
|
|
580
|
-
height: calc(4 * ${
|
|
580
|
+
height: calc(4 * ${be.verticalSpacing} + ${be.labelSize} + ${be.fontSize});
|
|
581
581
|
}
|
|
582
582
|
|
|
583
583
|
.ft-text-field--input-panel {
|
|
@@ -590,8 +590,8 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
590
590
|
}
|
|
591
591
|
|
|
592
592
|
.ft-text-field--input-panel ft-ripple {
|
|
593
|
-
${e.setVariable(
|
|
594
|
-
${e.setVariable(
|
|
593
|
+
${e.setVariable(ie.opacityContentOnSurfaceHover,"0.08")};
|
|
594
|
+
${e.setVariable(ie.opacityContentOnSurfacePressed,"0.04")};
|
|
595
595
|
}
|
|
596
596
|
|
|
597
597
|
.ft-text-field--input {
|
|
@@ -600,11 +600,11 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
600
600
|
flex-shrink: 1;
|
|
601
601
|
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
602
602
|
|
|
603
|
-
${e.setVariable(
|
|
604
|
-
${e.setVariable(
|
|
605
|
-
color: ${
|
|
603
|
+
${e.setVariable(mt.fontSize,be.fontSize)};
|
|
604
|
+
${e.setVariable(mt.lineHeight,be.fontSize)};
|
|
605
|
+
color: ${be.colorOnSurface};
|
|
606
606
|
|
|
607
|
-
padding: 0 ${
|
|
607
|
+
padding: 0 ${be.horizontalSpacing};
|
|
608
608
|
|
|
609
609
|
border: none;
|
|
610
610
|
background: none;
|
|
@@ -616,7 +616,7 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
616
616
|
}
|
|
617
617
|
|
|
618
618
|
.ft-text-field--disabled .ft-text-field--input {
|
|
619
|
-
color: ${
|
|
619
|
+
color: ${be.colorOnSurfaceDisabled};
|
|
620
620
|
}
|
|
621
621
|
|
|
622
622
|
.ft-text-field:not(.ft-text-field--disabled) .ft-text-field--input-panel {
|
|
@@ -624,29 +624,29 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
624
624
|
}
|
|
625
625
|
|
|
626
626
|
.ft-text-field:not(.ft-text-field--disabled):focus-within ft-input-label {
|
|
627
|
-
${e.setVariable(
|
|
628
|
-
${e.setVariable(
|
|
627
|
+
${e.setVariable(Qt.borderColor,be.colorPrimary)};
|
|
628
|
+
${e.setVariable(Qt.textColor,be.colorPrimary)};
|
|
629
629
|
}
|
|
630
630
|
|
|
631
631
|
.ft-text-field--filled .ft-text-field--input-panel {
|
|
632
|
-
border-radius: ${
|
|
632
|
+
border-radius: ${be.borderRadiusS} ${be.borderRadiusS} 0 0;
|
|
633
633
|
}
|
|
634
634
|
|
|
635
635
|
.ft-text-field--filled:not(.ft-text-field--no-label) .ft-text-field--input {
|
|
636
636
|
align-self: stretch;
|
|
637
|
-
padding-bottom: ${
|
|
638
|
-
padding-top: calc(${
|
|
637
|
+
padding-bottom: ${be.verticalSpacing};
|
|
638
|
+
padding-top: calc(${be.labelSize} + 2 * ${be.verticalSpacing});
|
|
639
639
|
}
|
|
640
640
|
|
|
641
641
|
.ft-text-field--outlined .ft-text-field--input-panel {
|
|
642
|
-
border-radius: ${
|
|
642
|
+
border-radius: ${be.borderRadiusS};
|
|
643
643
|
}
|
|
644
644
|
|
|
645
645
|
.ft-text-field--helper-text {
|
|
646
|
-
padding: 0 12px 0 ${
|
|
647
|
-
color: ${
|
|
646
|
+
padding: 0 12px 0 ${be.horizontalSpacing};
|
|
647
|
+
color: ${be.helperColor};
|
|
648
648
|
}
|
|
649
|
-
`],
|
|
649
|
+
`],ue([o.property({type:String})],xe.prototype,"label",void 0),ue([o.property({reflect:!0})],xe.prototype,"value",void 0),ue([o.property({type:String})],xe.prototype,"helper",void 0),ue([o.property({type:Boolean})],xe.prototype,"outlined",void 0),ue([o.property({type:Boolean})],xe.prototype,"disabled",void 0),ue([o.query(".ft-text-field--input")],xe.prototype,"input",void 0),ue([o.property({attribute:!1})],xe.prototype,"dataList",void 0),ue([o.state()],xe.prototype,"focused",void 0),e.customElement("ft-text-field")(xe);var ve=function(t,e,i,o){for(var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};const ye=e.FtCssVariable.create("--ft-tooltip-distance","SIZE","4px"),ge=e.FtCssVariable.create("--ft-tooltip-color","COLOR","#FFFFFF"),me=e.FtCssVariable.create("--ft-tooltip-background-color","COLOR","#666666"),$e=e.FtCssVariable.create("--ft-tooltip-z-index","NUMBER","1"),we=e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system");class ke extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new e.Debouncer,this.revealDebouncer=new e.Debouncer}render(){return i.html`
|
|
650
650
|
<div part="container"
|
|
651
651
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
652
652
|
@mouseenter=${this.onHover}
|
|
@@ -661,7 +661,7 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
661
661
|
</div>
|
|
662
662
|
<slot></slot>
|
|
663
663
|
</div>
|
|
664
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2,n=this.tooltip.style;switch(this.position){case"top":n.top=-this.tooltip.clientHeight+"px",n.left=o+"px";break;case"bottom":n.top=e.height+"px",n.left=o+"px";break;case"left":n.top=i+"px",n.left=-this.tooltip.clientWidth+"px";break;case"right":n.top=i+"px",n.left=e.width+"px"}n.maxWidth=Math.max(e.width,150)+"px"}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())}}
|
|
664
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2,n=this.tooltip.style;switch(this.position){case"top":n.top=-this.tooltip.clientHeight+"px",n.left=o+"px";break;case"bottom":n.top=e.height+"px",n.left=o+"px";break;case"left":n.top=i+"px",n.left=-this.tooltip.clientWidth+"px";break;case"right":n.top=i+"px",n.left=e.width+"px"}n.maxWidth=Math.max(e.width,150)+"px"}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}ke.elementDefinitions={"ft-typography":Yt},ke.styles=i.css`
|
|
665
665
|
.ft-tooltip--container {
|
|
666
666
|
display: block;
|
|
667
667
|
position: relative;
|
|
@@ -679,21 +679,21 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
679
679
|
width: max-content;
|
|
680
680
|
max-width: 150px;
|
|
681
681
|
text-align: center;
|
|
682
|
-
padding: ${
|
|
683
|
-
z-index: ${
|
|
682
|
+
padding: ${ye};
|
|
683
|
+
z-index: ${$e};
|
|
684
684
|
}
|
|
685
685
|
|
|
686
686
|
.ft-tooltip--content {
|
|
687
687
|
padding: 4px 8px;
|
|
688
|
-
border-radius: ${
|
|
689
|
-
background-color: ${
|
|
690
|
-
color: ${
|
|
688
|
+
border-radius: ${we};
|
|
689
|
+
background-color: ${me};
|
|
690
|
+
color: ${ge};
|
|
691
691
|
top: -500px;
|
|
692
692
|
left: -500px;
|
|
693
693
|
position: relative;
|
|
694
694
|
word-break: break-word;
|
|
695
695
|
}
|
|
696
|
-
`,
|
|
696
|
+
`,ve([o.property()],ke.prototype,"text",void 0),ve([o.property({type:Boolean})],ke.prototype,"manual",void 0),ve([o.property({type:Boolean})],ke.prototype,"inline",void 0),ve([o.property({type:Number})],ke.prototype,"delay",void 0),ve([o.property()],ke.prototype,"position",void 0),ve([o.queryAssignedNodes("",!0)],ke.prototype,"slotNodes",void 0),ve([o.query(".ft-tooltip--container")],ke.prototype,"container",void 0),ve([o.query("slot")],ke.prototype,"target",void 0),ve([o.query(".ft-tooltip")],ke.prototype,"tooltip",void 0),ve([o.query(".ft-tooltip--content")],ke.prototype,"tooltipContent",void 0),ve([o.state()],ke.prototype,"visible",void 0),e.customElement("ft-tooltip")(ke);const ze={color:e.FtCssVariable.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariable.create("--ft-loader-size","SIZE","80px")};class Se extends e.FtLitElement{static get styles(){return i.css`
|
|
697
697
|
:host {
|
|
698
698
|
line-height: 0;
|
|
699
699
|
}
|
|
@@ -702,8 +702,8 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
702
702
|
display: inline-block;
|
|
703
703
|
position: relative;
|
|
704
704
|
|
|
705
|
-
width: ${
|
|
706
|
-
height: ${
|
|
705
|
+
width: ${ze.size};
|
|
706
|
+
height: ${ze.size};
|
|
707
707
|
}
|
|
708
708
|
|
|
709
709
|
.ft-loader div {
|
|
@@ -712,7 +712,7 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
712
712
|
width: 25%;
|
|
713
713
|
height: 25%;
|
|
714
714
|
border-radius: 50%;
|
|
715
|
-
background: ${
|
|
715
|
+
background: ${ze.color};
|
|
716
716
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
717
717
|
}
|
|
718
718
|
|
|
@@ -759,7 +759,7 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
759
759
|
transform: translate(0, 0);
|
|
760
760
|
}
|
|
761
761
|
100% {
|
|
762
|
-
transform: translate(calc(0.35 * ${
|
|
762
|
+
transform: translate(calc(0.35 * ${ze.size}), 0);
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
765
|
`}render(){return i.html`
|
|
@@ -769,7 +769,7 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
769
769
|
<div></div>
|
|
770
770
|
<div></div>
|
|
771
771
|
</div>
|
|
772
|
-
`}}e.customElement("ft-loader")(
|
|
772
|
+
`}}e.customElement("ft-loader")(Se);var Oe=function(t,e,i,o){for(var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};const Ce=e.FtCssVariable.extend("--ft-button-color",e.designSystemVariables.colorPrimary),Ee={backgroundColor:e.FtCssVariable.extend("--ft-button-background-color",e.designSystemVariables.colorSurface),borderRadius:e.FtCssVariable.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusL),color:Ce,fontSize:e.FtCssVariable.extend("--ft-button-font-size",Mt.fontSize),iconSize:e.FtCssVariable.create("--ft-button-icon-size","SIZE","24px"),rippleColor:e.FtCssVariable.extend("--ft-button-ripple-color",Ce),opacityDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},Fe=e.FtCssVariable.extend("--ft-button-primary-color",e.FtCssVariable.extend("--ft-button-color",e.designSystemVariables.colorOnPrimary)),De={backgroundColor:e.FtCssVariable.extend("--ft-button-primary-background-color",e.FtCssVariable.extend("--ft-button-background-color",e.designSystemVariables.colorPrimary)),color:Fe,rippleColor:e.FtCssVariable.extend("--ft-button-primary-ripple-color",Fe)},Ie=e.FtCssVariable.extend("--ft-button-dense-border-radius",e.FtCssVariable.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusM));class je extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}static get styles(){return[e.noTextSelect,i.css`
|
|
773
773
|
:host {
|
|
774
774
|
display: inline-block;
|
|
775
775
|
max-width: 100%;
|
|
@@ -808,18 +808,18 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
808
808
|
border: none;
|
|
809
809
|
pointer-events: auto;
|
|
810
810
|
|
|
811
|
-
--ft-button-internal-font-size: ${
|
|
811
|
+
--ft-button-internal-font-size: ${Ee.fontSize};
|
|
812
812
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
813
|
-
--ft-button-internal-color: ${
|
|
814
|
-
${e.setVariable(
|
|
813
|
+
--ft-button-internal-color: ${Ee.color};
|
|
814
|
+
${e.setVariable(ae.size,Ee.iconSize)};
|
|
815
815
|
--ft-button-internal-vertical-padding: 6px;
|
|
816
816
|
--ft-button-internal-horizontal-padding: 8px;
|
|
817
|
-
${e.setVariable(
|
|
818
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
817
|
+
${e.setVariable(ie.color,Ee.rippleColor)};
|
|
818
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ee.iconSize});
|
|
819
819
|
|
|
820
|
-
border-radius: ${
|
|
820
|
+
border-radius: ${Ee.borderRadius};
|
|
821
821
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
822
|
-
background-color: ${
|
|
822
|
+
background-color: ${Ee.backgroundColor};
|
|
823
823
|
color: var(--ft-button-internal-color);
|
|
824
824
|
-webkit-mask-image: radial-gradient(white, black);
|
|
825
825
|
}
|
|
@@ -831,7 +831,7 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
831
831
|
.ft-button--dense {
|
|
832
832
|
--ft-button-internal-vertical-padding: 2px;
|
|
833
833
|
--ft-button-internal-horizontal-padding: 4px;
|
|
834
|
-
border-radius: ${
|
|
834
|
+
border-radius: ${Ie};
|
|
835
835
|
}
|
|
836
836
|
|
|
837
837
|
.ft-button--round {
|
|
@@ -840,13 +840,13 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
840
840
|
|
|
841
841
|
.ft-button[disabled] {
|
|
842
842
|
filter: grayscale(1);
|
|
843
|
-
opacity: ${
|
|
843
|
+
opacity: ${Ee.opacityDisabled};
|
|
844
844
|
}
|
|
845
845
|
|
|
846
846
|
.ft-button.ft-button--primary {
|
|
847
|
-
background-color: ${
|
|
848
|
-
--ft-button-internal-color: ${
|
|
849
|
-
${e.setVariable(
|
|
847
|
+
background-color: ${De.backgroundColor};
|
|
848
|
+
--ft-button-internal-color: ${De.color};
|
|
849
|
+
${e.setVariable(ie.color,De.rippleColor)};
|
|
850
850
|
}
|
|
851
851
|
|
|
852
852
|
.ft-button.ft-button--outlined {
|
|
@@ -864,8 +864,8 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
864
864
|
text-overflow: ellipsis;
|
|
865
865
|
display: block;
|
|
866
866
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
867
|
-
${e.setVariable(
|
|
868
|
-
${e.setVariable(
|
|
867
|
+
${e.setVariable(Mt.fontSize,"var(--ft-button-internal-font-size)")};
|
|
868
|
+
${e.setVariable(Mt.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
869
869
|
}
|
|
870
870
|
|
|
871
871
|
.ft-button--safari-fix .ft-button--label {
|
|
@@ -897,8 +897,8 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
897
897
|
}
|
|
898
898
|
|
|
899
899
|
ft-loader {
|
|
900
|
-
${e.setVariable(
|
|
901
|
-
${e.setVariable(
|
|
900
|
+
${e.setVariable(ze.size,Ee.iconSize)};
|
|
901
|
+
${e.setVariable(ze.color,"var(--ft-button-internal-color)")};
|
|
902
902
|
}
|
|
903
903
|
`]}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":e.isSafari,"ft-no-text-select":!0};return this.addTooltip(i.html`
|
|
904
904
|
<button part="button"
|
|
@@ -922,7 +922,7 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
922
922
|
</ft-tooltip>
|
|
923
923
|
`}resolveIcon(){return this.loading?i.html`
|
|
924
924
|
<ft-loader></ft-loader> `:this.icon?i.html`
|
|
925
|
-
<ft-icon variant="material">${this.icon}</ft-icon> `:i.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}je.elementDefinitions={"ft-ripple":
|
|
925
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:i.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}je.elementDefinitions={"ft-ripple":oe,"ft-tooltip":ke,"ft-typography":Yt,"ft-icon":pe,"ft-loader":Se},Oe([o.property({type:Boolean})],je.prototype,"primary",void 0),Oe([o.property({type:Boolean})],je.prototype,"outlined",void 0),Oe([o.property({type:Boolean})],je.prototype,"disabled",void 0),Oe([o.property({type:Boolean})],je.prototype,"dense",void 0),Oe([o.property({type:Boolean})],je.prototype,"round",void 0),Oe([o.property({type:String})],je.prototype,"label",void 0),Oe([o.property({type:String})],je.prototype,"icon",void 0),Oe([o.property({type:Boolean})],je.prototype,"trailingIcon",void 0),Oe([o.property({type:Boolean})],je.prototype,"loading",void 0),Oe([o.property({type:String})],je.prototype,"tooltipPosition",void 0),Oe([o.query(".ft-button")],je.prototype,"button",void 0),Oe([o.query(".ft-button--label slot")],je.prototype,"slottedContent",void 0),e.customElement("ft-button")(je);var Be=function(t,e,i,o){for(var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};class Ne extends CustomEvent{constructor(t){super("row-click",{detail:t})}}const Ae={headerBackground:e.FtCssVariable.create("--ft-filterable-table-header-background","COLOR","whitesmoke"),oddRowBackground:e.FtCssVariable.create("--ft-filterable-table-odd-row-background","COLOR","#FFFFFF"),evenRowBackground:e.FtCssVariable.create("--ft-filterable-table-even-row-background","COLOR","#fdfdfd"),rowHoverBackground:e.FtCssVariable.create("--ft-filterable-table-row-hover-background","COLOR","#fafafa"),stickyHeaderZIndex:e.FtCssVariable.create("--ft-filterable-table-sticky-header-zindex","NUMBER","100"),colorOnSurfaceHigh:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceHigh,"Design system"),titleFont:e.FtCssVariable.external(e.designSystemVariables.titleFont,"Design system"),contentFont:e.FtCssVariable.external(e.designSystemVariables.contentFont,"Design system")},Te=t=>i.html`${t}`,Ze=(t,e)=>t-e;class Re 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`
|
|
926
926
|
<style>
|
|
927
927
|
.table {
|
|
928
928
|
grid-template-columns: repeat(${this.columns.length}, minmax(min-content, auto));
|
|
@@ -934,20 +934,21 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
934
934
|
</div>
|
|
935
935
|
${n.repeat(t,((t,e)=>"row-"+e),((t,e)=>i.html`
|
|
936
936
|
<div class="row"
|
|
937
|
-
@click=${()=>this.dispatchEvent(new
|
|
937
|
+
@click=${()=>this.dispatchEvent(new Ne(t))}>
|
|
938
938
|
${n.repeat(this.columns,((t,i)=>"cell-"+e+" "+i),(i=>this.renderCell(i,t,e)))}
|
|
939
939
|
</div>
|
|
940
940
|
`))}
|
|
941
941
|
</div>
|
|
942
|
-
`}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:
|
|
943
|
-
<div class="
|
|
942
|
+
`}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:Ze,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`
|
|
943
|
+
<div class="${r.classMap(o)}">
|
|
944
944
|
<div class="column-title-container">
|
|
945
945
|
<span class="column-title">${t.title}</span>
|
|
946
946
|
${this.renderColumnSort(t,e)}
|
|
947
947
|
</div>
|
|
948
|
+
${t.filter?i.html`
|
|
948
949
|
<div class="column-filter">
|
|
949
950
|
${this.renderColumnFilter(t,e)}
|
|
950
|
-
</div
|
|
951
|
+
</div>`:null}
|
|
951
952
|
</div>
|
|
952
953
|
`}renderColumnSort(t,e){var o;const n=this.currentSort&&this.currentSort.column===e,s=n?"asc"===this.currentSort.order?"expand_more":"expand_less":"unfold_more";return i.html`
|
|
953
954
|
<ft-button
|
|
@@ -970,9 +971,9 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
970
971
|
<ft-select-option value="${t}" label="${t}"></ft-select-option>
|
|
971
972
|
`))}
|
|
972
973
|
</ft-select>
|
|
973
|
-
`:null}return null}renderCell(t,e,o){var n;const l=null!==(n=t.render)&&void 0!==n?n:
|
|
974
|
+
`:null}return null}renderCell(t,e,o){var n;const l=null!==(n=t.render)&&void 0!==n?n:Te;return i.html`
|
|
974
975
|
<div class="cell">${(t=>{const e=l(t,o);return"string"==typeof e?s.unsafeHTML(e):e})(this.getValue(t,e))}</div>
|
|
975
|
-
`}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)}}
|
|
976
|
+
`}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)}}Re.styles=i.css`
|
|
976
977
|
:host {
|
|
977
978
|
display: block;
|
|
978
979
|
}
|
|
@@ -993,6 +994,12 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
993
994
|
padding: .5rem 1rem;
|
|
994
995
|
font-family: ${Ae.titleFont};
|
|
995
996
|
}
|
|
997
|
+
|
|
998
|
+
.header-cell--sticky {
|
|
999
|
+
top: 0;
|
|
1000
|
+
z-index: ${Ae.stickyHeaderZIndex};
|
|
1001
|
+
position: sticky;
|
|
1002
|
+
}
|
|
996
1003
|
|
|
997
1004
|
.header-cell:first-of-type {
|
|
998
1005
|
border-radius: .5rem 0 0 0;
|
|
@@ -1008,14 +1015,17 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
1008
1015
|
}
|
|
1009
1016
|
|
|
1010
1017
|
.column-title-container ft-button {
|
|
1011
|
-
${e.setVariable(
|
|
1012
|
-
${e.setVariable(
|
|
1018
|
+
${e.setVariable(Ee.backgroundColor,Ae.headerBackground)};
|
|
1019
|
+
${e.setVariable(Ee.color,Ae.colorOnSurfaceHigh)};
|
|
1013
1020
|
}
|
|
1014
1021
|
|
|
1015
1022
|
.column-title {
|
|
1016
1023
|
white-space: nowrap;
|
|
1017
1024
|
text-transform: uppercase;
|
|
1018
1025
|
margin-right: .5rem;
|
|
1026
|
+
font-weight: normal;
|
|
1027
|
+
letter-spacing: 1.5px;
|
|
1028
|
+
font-size: 0.8em;
|
|
1019
1029
|
}
|
|
1020
1030
|
|
|
1021
1031
|
.column-filter {
|
|
@@ -1071,4 +1081,4 @@ const U=t=>({_$litStatic$:t}),H=new Map,L=(t=>(e,...i)=>{var o;const n=i.length;
|
|
|
1071
1081
|
.hidden {
|
|
1072
1082
|
visibility: hidden;
|
|
1073
1083
|
}
|
|
1074
|
-
`,
|
|
1084
|
+
`,Be([o.property({attribute:!1})],Re.prototype,"data",void 0),Be([o.property({attribute:!1})],Re.prototype,"columns",void 0),Be([o.property({attribute:!1})],Re.prototype,"sort",void 0),Be([o.property()],Re.prototype,"stickyHeaders",void 0),Be([o.state()],Re.prototype,"currentSort",void 0),e.customElement("ft-filterable-table")(Re),t.FtFilterableTable=Re,t.FtFilterableTableCssVariables=Ae,t.RowClickEvent=Ne,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litUnsafeHTML,ftGlobals.litClassMap,classMap);
|