@fluid-topics/ft-filterable-table 1.0.0-alpha.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
!function(t,e,i,o,s,n
|
|
1
|
+
!function(t,e,i,o,s,l,n){
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var r;const a=window,p=a.trustedTypes,f=p?p.createPolicy("lit-html",{createHTML:t=>t}):void 0,d="$lit$",h=`lit$${(Math.random()+"").slice(9)}$`,c="?"+h,u=`<${c}>`,x=document,g=()=>x.createComment(""),b=t=>null===t||"object"!=typeof t&&"function"!=typeof t,v=Array.isArray,y="[ \t\n\f\r]",$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,m=/-->/g,w=/>/g,k=RegExp(`>|${y}(?:([^\\s"'>=/]+)(${y}*=${y}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),S=/'/g,z=/"/g,O=/^(?:script|style|textarea|title)$/i,E=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),C=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),D=new WeakMap,B=x.createTreeWalker(x,129,null,!1),j=(t,e)=>{const i=t.length-1,o=[];let s,
|
|
7
|
+
var r;const a=window,p=a.trustedTypes,f=p?p.createPolicy("lit-html",{createHTML:t=>t}):void 0,d="$lit$",h=`lit$${(Math.random()+"").slice(9)}$`,c="?"+h,u=`<${c}>`,x=document,g=()=>x.createComment(""),b=t=>null===t||"object"!=typeof t&&"function"!=typeof t,v=Array.isArray,y="[ \t\n\f\r]",$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,m=/-->/g,w=/>/g,k=RegExp(`>|${y}(?:([^\\s"'>=/]+)(${y}*=${y}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),S=/'/g,z=/"/g,O=/^(?:script|style|textarea|title)$/i,E=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),C=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),D=new WeakMap,B=x.createTreeWalker(x,129,null,!1),j=(t,e)=>{const i=t.length-1,o=[];let s,l=2===e?"<svg>":"",n=$;for(let e=0;e<i;e++){const i=t[e];let r,a,p=-1,f=0;for(;f<i.length&&(n.lastIndex=f,a=n.exec(i),null!==a);)f=n.lastIndex,n===$?"!--"===a[1]?n=m:void 0!==a[1]?n=w:void 0!==a[2]?(O.test(a[2])&&(s=RegExp("</"+a[2],"g")),n=k):void 0!==a[3]&&(n=k):n===k?">"===a[0]?(n=null!=s?s:$,p=-1):void 0===a[1]?p=-2:(p=n.lastIndex-a[2].length,r=a[1],n=void 0===a[3]?k:'"'===a[3]?z:S):n===z||n===S?n=k:n===m||n===w?n=$:(n=k,s=void 0);const c=n===k&&t[e+1].startsWith("/>")?" ":"";l+=n===$?i+u:p>=0?(o.push(r),i.slice(0,p)+d+i.slice(p)+h+c):i+h+(-2===p?(o.push(void 0),e):c)}const r=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 N{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,l=0;const n=t.length-1,r=this.parts,[a,f]=j(t,e);if(this.el=N.createElement(a,i),B.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=B.nextNode())&&r.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(d)||e.startsWith(h)){const i=f[l++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+d).split(h),e=/([.?@])?(.*)/.exec(i);r.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?T:"?"===e[1]?_:"@"===e[1]?U:R})}else r.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(O.test(o.tagName)){const t=o.textContent.split(h),e=t.length-1;if(e>0){o.textContent=p?p.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],g()),B.nextNode(),r.push({type:2,index:++s});o.append(t[e],g())}}}else if(8===o.nodeType)if(o.data===c)r.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(h,t+1));)r.push({type:7,index:s}),t+=h.length-1}s++}}static createElement(t,e){const i=x.createElement("template");return i.innerHTML=t,i}}function Z(t,e,i=t,o){var s,l,n,r;if(e===C)return e;let a=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const p=b(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(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!==(n=(r=i)._$Co)&&void 0!==n?n:r._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=Z(t,a._$AS(t,e.values),a,o)),e}class F{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:x).importNode(i,!0);B.currentNode=s;let l=B.nextNode(),n=0,r=0,a=o[0];for(;void 0!==a;){if(n===a.index){let e;2===a.type?e=new A(l,l.nextSibling,this,t):1===a.type?e=new a.ctor(l,a.name,a.strings,this,t):6===a.type&&(e=new H(l,this,t)),this._$AV.push(e),a=o[++r]}n!==(null==a?void 0:a.index)&&(l=B.nextNode(),n++)}return s}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class A{constructor(t,e,i,o){var s;this.type=2,this._$AH=I,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),b(t)?t===I||null==t||""===t?(this._$AH!==I&&this._$AR(),this._$AH=I):t!==this._$AH&&t!==C&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>v(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==I&&b(this._$AH)?this._$AA.nextSibling.data=t:this.$(x.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=N.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(i);else{const t=new F(s,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=D.get(t.strings);return void 0===e&&D.set(t.strings,e=new N(t)),e}T(t){v(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new A(this.k(g()),this.k(g()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class R{constructor(t,e,i,o,s){this.type=1,this._$AH=I,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=I}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let l=!1;if(void 0===s)t=Z(this,t,e,0),l=!b(t)||t!==this._$AH&&t!==C,l&&(this._$AH=t);else{const o=t;let n,r;for(t=s[0],n=0;n<s.length-1;n++)r=Z(this,o[i+n],e,n),r===C&&(r=this._$AH[n]),l||(l=!b(r)||r!==this._$AH[n]),r===I?t=I:t!==I&&(t+=(null!=r?r:"")+s[n+1]),this._$AH[n]=r}l&&!o&&this.j(t)}j(t){t===I?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class T extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===I?void 0:t}}const M=p?p.emptyScript:"";class _ extends R{constructor(){super(...arguments),this.type=4}j(t){t&&t!==I?this.element.setAttribute(this.name,M):this.element.removeAttribute(this.name)}}class U extends R{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Z(this,t,e,0))&&void 0!==i?i:I)===C)return;const o=this._$AH,s=t===I&&o!==I||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,l=t!==I&&(o===I||s);s&&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 H{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const P=a.litHtmlPolyfillSupport;null==P||P(N,A),(null!==(r=a.litHtmlVersions)&&void 0!==r?r:a.litHtmlVersions=[]).push("2.7.3");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const W=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t._$litStatic$},K=t=>({_$litStatic$:t,r:W}),L=new Map,G=(t=>(e,...i)=>{const o=i.length;let s,
|
|
13
|
+
const W=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t._$litStatic$},K=t=>({_$litStatic$:t,r:W}),L=new Map,G=(t=>(e,...i)=>{const o=i.length;let s,l;const n=[],r=[];let a,p=0,f=!1;for(;p<o;){for(a=e[p];p<o&&void 0!==(l=i[p],s=V(l));)a+=s+e[++p],f=!0;p!==o&&r.push(l),n.push(a),p++}if(p===o&&n.push(e[o]),f){const t=n.join("$$lit$$");void 0===(e=L.get(t))&&(n.raw=n,L.set(t,e=n)),i=r}return t(e,...i)})(E);var q;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(q||(q={}));const X=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),Y=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),J={fontFamily:Y,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},Q=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",X),tt=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",J.fontSize,"20px"),et=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",J.fontWeight,"normal"),it=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",J.letterSpacing,"0.15px"),ot=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",J.lineHeight,"1.2"),st=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",J.textTransform,"inherit"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",X),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",J.fontSize,"14px"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",J.fontWeight,"normal"),at=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",J.letterSpacing,"0.105px"),pt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",J.lineHeight,"1.7"),ft=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",J.textTransform,"inherit"),dt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",Y),ht=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",J.fontSize,"16px"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",J.fontWeight,"600"),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",J.letterSpacing,"0.144px"),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",J.lineHeight,"1.5"),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",J.textTransform,"inherit"),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",Y),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",J.fontSize,"14px"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",J.fontWeight,"normal"),$t=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",J.letterSpacing,"0.098px"),mt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",J.lineHeight,"1.7"),wt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",J.textTransform,"inherit"),kt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",Y),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",J.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",J.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",J.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",J.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",J.textTransform,"inherit")},St=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",Y),zt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",J.fontSize,"14px"),Ot=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",J.fontWeight,"normal"),Et=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",J.letterSpacing,"0.252px"),Ct=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",J.lineHeight,"1.4"),It=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",J.textTransform,"inherit"),Dt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",Y),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",J.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",J.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",J.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",J.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",J.textTransform,"inherit")},Bt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",Y),jt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",J.fontSize,"10px"),Nt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",J.fontWeight,"normal"),Zt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",J.letterSpacing,"0.33px"),Ft=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",J.lineHeight,"1.6"),At=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",J.textTransform,"inherit"),Rt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",Y),Tt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",J.fontSize,"10px"),Mt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",J.fontWeight,"normal"),_t=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",J.letterSpacing,"1.5px"),Ut=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",J.lineHeight,"1.6"),Ht=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",J.textTransform,"uppercase"),Pt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-button-font-family",Y),fontSize:e.FtCssVariableFactory.extend("--ft-typography-button-font-size",J.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",J.fontWeight,"600"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",J.letterSpacing,"1.246px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-button-line-height",J.lineHeight,"1.15"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",J.textTransform,"uppercase")},Wt=i.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
15
|
font-family: ${Q};
|
|
16
16
|
font-size: ${tt};
|
|
@@ -21,8 +21,8 @@ const W=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
21
21
|
}
|
|
22
22
|
`,Vt=i.css`
|
|
23
23
|
.ft-typography--title-dense {
|
|
24
|
-
font-family: ${
|
|
25
|
-
font-size: ${
|
|
24
|
+
font-family: ${lt};
|
|
25
|
+
font-size: ${nt};
|
|
26
26
|
font-weight: ${rt};
|
|
27
27
|
letter-spacing: ${at};
|
|
28
28
|
line-height: ${pt};
|
|
@@ -85,9 +85,9 @@ const W=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
85
85
|
}
|
|
86
86
|
`,Jt=i.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
|
-
font-family: ${
|
|
89
|
-
font-size: ${
|
|
90
|
-
font-weight: ${
|
|
88
|
+
font-family: ${Rt};
|
|
89
|
+
font-size: ${Tt};
|
|
90
|
+
font-weight: ${Mt};
|
|
91
91
|
letter-spacing: ${_t};
|
|
92
92
|
line-height: ${Ut};
|
|
93
93
|
text-transform: ${Ht};
|
|
@@ -105,7 +105,7 @@ const W=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
105
105
|
.ft-typography {
|
|
106
106
|
vertical-align: inherit;
|
|
107
107
|
}
|
|
108
|
-
`;var ee=function(t,e,i,o){for(var s,
|
|
108
|
+
`;var ee=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class ie extends e.FtLitElement{constructor(){super(...arguments),this.variant=q.body1}render(){return this.element?G`
|
|
109
109
|
<${K(this.element)}
|
|
110
110
|
class="ft-typography ft-typography--${this.variant}">
|
|
111
111
|
<slot></slot>
|
|
@@ -234,8 +234,8 @@ const W=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
234
234
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
235
235
|
border-top: none;
|
|
236
236
|
}
|
|
237
|
-
`;var
|
|
238
|
-
<div class="${
|
|
237
|
+
`;var le=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};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`
|
|
238
|
+
<div class="${n.classMap(t)}">
|
|
239
239
|
${this.text?i.html`
|
|
240
240
|
<div class="ft-input-label--text ft-typography--caption">
|
|
241
241
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
@@ -243,7 +243,7 @@ const W=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
243
243
|
</div>
|
|
244
244
|
`:null}
|
|
245
245
|
</div>
|
|
246
|
-
`}}
|
|
246
|
+
`}}ne.elementDefinitions={},ne.styles=[Xt,se],le([o.property({type:String})],ne.prototype,"text",void 0),le([o.property({type:Boolean})],ne.prototype,"raised",void 0),le([o.property({type:Boolean})],ne.prototype,"outlined",void 0),le([o.property({type:Boolean})],ne.prototype,"disabled",void 0),le([o.property({type:Boolean})],ne.prototype,"error",void 0),e.customElement("ft-input-label")(ne);const re=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),ae={color:re,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",re),opacityContentOnSurfacePressed:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:e.FtCssVariableFactory.create("--ft-ripple-border-radius","SIZE","0px")},pe=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),fe=pe,de=e.FtCssVariableFactory.extend("--ft-ripple-background-color",pe),he=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),ce=he,ue=e.FtCssVariableFactory.extend("--ft-ripple-background-color",he),xe=i.css`
|
|
247
247
|
:host {
|
|
248
248
|
display: contents;
|
|
249
249
|
}
|
|
@@ -256,6 +256,7 @@ const W=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
256
256
|
|
|
257
257
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
258
258
|
overflow: hidden;
|
|
259
|
+
border-radius: ${ae.borderRadius};
|
|
259
260
|
}
|
|
260
261
|
|
|
261
262
|
.ft-ripple .ft-ripple--background,
|
|
@@ -332,7 +333,7 @@ const W=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
332
333
|
opacity: ${ae.opacityContentOnSurfacePressed};
|
|
333
334
|
transform: translate(-50%, -50%) scale(1);
|
|
334
335
|
}
|
|
335
|
-
`;var ge,be,ve=function(t,e,i,o){for(var s,
|
|
336
|
+
`;var ge,be,ve=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class ye extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new e.Debouncer(10),this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),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!=s?s-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`
|
|
336
337
|
<style>
|
|
337
338
|
.ft-ripple .ft-ripple--effect,
|
|
338
339
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -345,7 +346,7 @@ const W=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
345
346
|
top: ${this.originY}px;
|
|
346
347
|
}
|
|
347
348
|
</style>
|
|
348
|
-
<div class="${
|
|
349
|
+
<div class="${n.classMap(t)}">
|
|
349
350
|
<div class="ft-ripple--background"></div>
|
|
350
351
|
<div class="ft-ripple--effect"></div>
|
|
351
352
|
</div>
|
|
@@ -384,6 +385,7 @@ const W=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
384
385
|
|
|
385
386
|
/* Ugly fix because font is broken */
|
|
386
387
|
font-size: calc(0.75 * ${$e.size});
|
|
388
|
+
line-height: ${$e.size};
|
|
387
389
|
position: relative;
|
|
388
390
|
top: -4%;
|
|
389
391
|
justify-content: center;
|
|
@@ -396,9 +398,9 @@ const W=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
396
398
|
.ft-icon--material {
|
|
397
399
|
font-family: ${$e.materialFontFamily}, "Material Icons", sans-serif;
|
|
398
400
|
}
|
|
399
|
-
`;var we;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(we||(we={}));var ke=function(t,e,i,o){for(var s,
|
|
400
|
-
<i class="ft-icon
|
|
401
|
-
${
|
|
401
|
+
`;var we;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(we||(we={}));var ke=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class Se extends e.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=i.nothing}render(){const t=this.variant&&Object.values(we).includes(this.variant)?this.variant:we.fluid_topics,e=t!==we.material||!!this.value;return i.html`
|
|
402
|
+
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
403
|
+
${l.unsafeHTML(this.resolvedIcon)}
|
|
402
404
|
<slot ?hidden=${e}></slot>
|
|
403
405
|
</i>
|
|
404
406
|
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case we.file_format:this.resolvedIcon=null!==(t=be[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case we.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=ge[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Se.elementDefinitions={},Se.styles=me,ke([o.property()],Se.prototype,"variant",void 0),ke([o.property()],Se.prototype,"value",void 0),ke([o.state()],Se.prototype,"resolvedIcon",void 0),ke([o.query("slot")],Se.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Se);const ze={labelSize:e.FtCssVariableFactory.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:e.FtCssVariableFactory.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:e.FtCssVariableFactory.create("--ft-select-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-select-horizontal-spacing","SIZE","16px"),optionsHeight:e.FtCssVariableFactory.create("--ft-select-options-height","SIZE","unset"),selectedOptionColor:e.FtCssVariableFactory.extend("--ft-select-selected-option-color",e.designSystemVariables.colorOnSurface),helperColor:e.FtCssVariableFactory.extend("--ft-select-helper-color",e.designSystemVariables.colorOnSurfaceMedium),optionsColor:e.FtCssVariableFactory.extend("--ft-select-options-color",e.designSystemVariables.colorOnSurface),optionsZIndex:e.FtCssVariableFactory.create("--ft-select-options-z-index","NUMBER","3"),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),elevation02:e.FtCssVariableFactory.external(e.designSystemVariables.elevation02,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system")},Oe=i.css`
|
|
@@ -550,8 +552,8 @@ const W=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
550
552
|
.ft-select--in-error .ft-select--helper-text {
|
|
551
553
|
color: ${ze.colorError};
|
|
552
554
|
}
|
|
553
|
-
`;var Ee=function(t,e,i,o){for(var s,
|
|
554
|
-
<div class="${
|
|
555
|
+
`;var Ee=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class Ce extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return i.html``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Ce.elementDefinitions={},Ee([o.property({type:String})],Ce.prototype,"label",void 0),Ee([o.property({type:Object,converter:t=>t})],Ce.prototype,"value",void 0),Ee([o.property({type:Boolean,reflect:!0})],Ce.prototype,"selected",void 0);class Ie extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,o,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`
|
|
556
|
+
<div class="${n.classMap(d)}" part="container">
|
|
555
557
|
<div class="ft-select--main-panel" part="main-panel">
|
|
556
558
|
<ft-input-label text="${this.label}"
|
|
557
559
|
part="label"
|
|
@@ -570,7 +572,7 @@ const W=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
570
572
|
aria-expanded="${a}">
|
|
571
573
|
<ft-ripple ?disabled=${p} ?activated=${!this.outlined}></ft-ripple>
|
|
572
574
|
<ft-typography variant="body1" class="ft-select--selected-option">
|
|
573
|
-
${null!==(r=null===(
|
|
575
|
+
${null!==(r=null===(l=this.selectedOption)||void 0===l?void 0:l.label)&&void 0!==r?r:""}
|
|
574
576
|
</ft-typography>
|
|
575
577
|
<ft-icon>${a?"thin_arrow_up":"thin_arrow"}</ft-icon>
|
|
576
578
|
</div>
|
|
@@ -589,7 +591,7 @@ const W=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
589
591
|
@option-change=${this.updateOptionsFromSlot}
|
|
590
592
|
></slot>
|
|
591
593
|
`}renderOption(t){let e=this.selectedOption===t;const o={"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0};return i.html`
|
|
592
|
-
<div class="${
|
|
594
|
+
<div class="${n.classMap(o)}"
|
|
593
595
|
part="option"
|
|
594
596
|
tabindex="0"
|
|
595
597
|
data-value="${t.value}"
|
|
@@ -598,7 +600,7 @@ const W=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
598
600
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
599
601
|
<span>${t.label}</span>
|
|
600
602
|
</div>
|
|
601
|
-
`}updated(t){super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,
|
|
603
|
+
`}updated(t){super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,l;let n;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(),n=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(),n=null!==(l=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==l?l:this.firstOption}null==n||n.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){var i,o;if(!e.deepEqual(null===(i=this.selectedOption)||void 0===i?void 0:i.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(o=this.selectedOption)||void 0===o?void 0:o.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Ie.elementDefinitions={"ft-input-label":ne,"ft-typography":ie,"ft-ripple":ye,"ft-icon":Se},Ie.styles=[qt,Xt,Oe],Ee([o.property({type:String})],Ie.prototype,"label",void 0),Ee([o.property({type:String})],Ie.prototype,"helper",void 0),Ee([o.property({type:Boolean})],Ie.prototype,"outlined",void 0),Ee([o.property({type:Boolean})],Ie.prototype,"disabled",void 0),Ee([o.property({type:Boolean})],Ie.prototype,"error",void 0),Ee([o.property({type:Boolean})],Ie.prototype,"fixedMenuPosition",void 0),Ee([o.property({type:Array})],Ie.prototype,"options",void 0),Ee([o.state()],Ie.prototype,"selectedOption",void 0),Ee([o.state()],Ie.prototype,"optionsDisplayed",void 0),Ee([o.state()],Ie.prototype,"focusOptions",void 0),Ee([o.query(".ft-select")],Ie.prototype,"container",void 0),Ee([o.query(".ft-select--options")],Ie.prototype,"optionsMenu",void 0),Ee([o.query(".ft-select--input-panel")],Ie.prototype,"mainPanel",void 0),Ee([o.query(".ft-select--option:first-child")],Ie.prototype,"firstOption",void 0),Ee([o.query(".ft-select--option:focus")],Ie.prototype,"focusedOption",void 0),Ee([o.query(".ft-select--option.ft-select--option-selected")],Ie.prototype,"selectedOptionElement",void 0),Ee([o.query(".ft-select--option:last-child")],Ie.prototype,"lastOption",void 0),Ee([o.query("slot")],Ie.prototype,"optionsSlot",void 0),e.customElement("ft-select")(Ie),e.customElement("ft-select-option")(Ce);
|
|
602
604
|
/**
|
|
603
605
|
* @license
|
|
604
606
|
* Copyright 2018 Google LLC
|
|
@@ -756,8 +758,8 @@ const De={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
756
758
|
.ft-text-field--with-icon {
|
|
757
759
|
${e.setVariable(oe.labelMaxWidth,`calc(100% - ${$e.size} - ${oe.horizontalSpacing})`)};
|
|
758
760
|
}
|
|
759
|
-
`;var je=function(t,e,i,o){for(var s,
|
|
760
|
-
<div class="${
|
|
761
|
+
`;var je=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class Ne extends e.FtLitElement{constructor(){super(...arguments),this._value="",this.dispatchedValue="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.filterSuggestions=!1,this.focused=!1,this.suggestionsOnTop=!1,this.hideSuggestions=!1,this.visibleSuggestions=[]}get value(){return this._value||""}set value(t){this.setInternalValue(t||""),this.dispatchedValue=t||""}setInternalValue(t){const e=this._value;this._value=t||"",this.requestUpdate("value",e)}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":this.error,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":0===this.visibleSuggestions.length||this.hideSuggestions,"ft-text-field--raised-label":this.focused||""!=this.value,"ft-text-field--with-icon":!!this.icon};return i.html`
|
|
762
|
+
<div class="${n.classMap(t)}">
|
|
761
763
|
<div class="ft-text-field--main-panel"
|
|
762
764
|
@keydown=${this.handleKeyboardNavigation}
|
|
763
765
|
@focusout=${this.onMainPanelBlur}>
|
|
@@ -802,7 +804,7 @@ const De={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
802
804
|
</ft-typography>
|
|
803
805
|
`:i.nothing}
|
|
804
806
|
</div>
|
|
805
|
-
`}updated(t){super.updated(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),o=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&o&&(this.suggestionsOnTop=t.bottom+o.height>window.innerHeight&&t.top-o.height>0)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(i,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}}Ne.elementDefinitions={"ft-input-label":
|
|
807
|
+
`}updated(t){super.updated(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),o=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&o&&(this.suggestionsOnTop=t.bottom+o.height>window.innerHeight&&t.top-o.height>0)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(i,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}}Ne.elementDefinitions={"ft-input-label":ne,"ft-ripple":ye,"ft-typography":ie,"ft-icon":Se},Ne.styles=[Gt,Be],je([o.property()],Ne.prototype,"label",void 0),je([o.property({noAccessor:!0})],Ne.prototype,"value",null),je([o.state()],Ne.prototype,"dispatchedValue",void 0),je([o.property()],Ne.prototype,"helper",void 0),je([o.property({type:Boolean})],Ne.prototype,"outlined",void 0),je([o.property({type:Boolean})],Ne.prototype,"disabled",void 0),je([o.property({type:Boolean})],Ne.prototype,"error",void 0),je([o.property()],Ne.prototype,"prefix",void 0),je([o.property()],Ne.prototype,"icon",void 0),je([o.property()],Ne.prototype,"iconVariant",void 0),je([o.property({type:Boolean})],Ne.prototype,"filterSuggestions",void 0),je([o.property({type:Number})],Ne.prototype,"maxLength",void 0),je([o.state()],Ne.prototype,"focused",void 0),je([o.state()],Ne.prototype,"suggestionsOnTop",void 0),je([o.state()],Ne.prototype,"hideSuggestions",void 0),je([o.state()],Ne.prototype,"visibleSuggestions",void 0),je([o.query(".ft-text-field--main-panel")],Ne.prototype,"mainPanel",void 0),je([o.query(".ft-text-field--input")],Ne.prototype,"input",void 0),je([o.query(".ft-text-field--suggestions")],Ne.prototype,"suggestionsContainer",void 0),je([o.queryAssignedElements({selector:"ft-text-field-suggestion"})],Ne.prototype,"suggestions",void 0);const Ze=i.css`
|
|
806
808
|
.ft-text-field-suggestion {
|
|
807
809
|
position: relative;
|
|
808
810
|
padding: 8px 16px;
|
|
@@ -827,7 +829,7 @@ const De={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
827
829
|
slot {
|
|
828
830
|
pointer-events: none;
|
|
829
831
|
}
|
|
830
|
-
`;var Fe=function(t,e,i,o){for(var s,
|
|
832
|
+
`;var Fe=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class Ae extends CustomEvent{constructor(t){super("suggestion-selected",{detail:t,bubbles:!0,composed:!0})}}class Re extends e.FtLitElement{render(){return i.html`
|
|
831
833
|
<div class="ft-text-field-suggestion"
|
|
832
834
|
tabindex="-1"
|
|
833
835
|
@keydown=${this.onKeyDown}
|
|
@@ -839,7 +841,7 @@ const De={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
839
841
|
<slot></slot>
|
|
840
842
|
</ft-typography>
|
|
841
843
|
</div>
|
|
842
|
-
`}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new Ae(this.getValue()))}getValue(){return this.value||this.textContent}get textContent(){return this.assignedNodes.map((t=>t.textContent)).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}}
|
|
844
|
+
`}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new Ae(this.getValue()))}getValue(){return this.value||this.textContent}get textContent(){return this.assignedNodes.map((t=>t.textContent)).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}}Re.elementDefinitions={"ft-ripple":ye,"ft-typography":ie,"ft-icon":Se},Re.styles=Ze,Fe([o.property()],Re.prototype,"value",void 0),Fe([o.query(".ft-text-field-suggestion")],Re.prototype,"container",void 0),Fe([o.queryAssignedNodes()],Re.prototype,"assignedNodes",void 0),e.customElement("ft-text-field")(Ne),e.customElement("ft-text-field-suggestion")(Re);const Te=e.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),Me=e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),_e=e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),Ue=e.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),He=e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),Pe=e.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),We=i.css`
|
|
843
845
|
.ft-tooltip--container {
|
|
844
846
|
display: block;
|
|
845
847
|
position: relative;
|
|
@@ -857,7 +859,7 @@ const De={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
857
859
|
width: max-content;
|
|
858
860
|
max-width: ${Pe};
|
|
859
861
|
text-align: center;
|
|
860
|
-
padding: ${
|
|
862
|
+
padding: ${Te};
|
|
861
863
|
z-index: ${Ue};
|
|
862
864
|
}
|
|
863
865
|
|
|
@@ -865,13 +867,13 @@ const De={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
865
867
|
padding: 4px 8px;
|
|
866
868
|
border-radius: ${He};
|
|
867
869
|
background-color: ${_e};
|
|
868
|
-
color: ${
|
|
870
|
+
color: ${Me};
|
|
869
871
|
top: -500px;
|
|
870
872
|
left: -500px;
|
|
871
873
|
position: relative;
|
|
872
874
|
word-break: break-word;
|
|
873
875
|
}
|
|
874
|
-
`;var Ve=function(t,e,i,o){for(var s,
|
|
876
|
+
`;var Ve=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class Ke extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new e.Debouncer,this.revealDebouncer=new e.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return i.html`
|
|
875
877
|
<div part="container"
|
|
876
878
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
877
879
|
@mouseenter=${this.onHover}
|
|
@@ -889,7 +891,7 @@ const De={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
889
891
|
</div>
|
|
890
892
|
</div>
|
|
891
893
|
</div>
|
|
892
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,
|
|
894
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,l=0;switch(this.validPosition){case"top":l=-this.tooltip.clientHeight,s=o;break;case"bottom":l=e.height,s=o;break;case"left":l=i,s=-this.tooltip.clientWidth;break;case"right":l=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const n=this.tooltip.style;n.left=s+"px",n.top=l+"px",n.maxWidth=`max(${e.width}px, ${Pe})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}Ke.elementDefinitions={"ft-typography":ie},Ke.styles=We,Ve([o.property()],Ke.prototype,"text",void 0),Ve([o.property({type:Boolean})],Ke.prototype,"manual",void 0),Ve([o.property({type:Boolean})],Ke.prototype,"inline",void 0),Ve([o.property({type:Number})],Ke.prototype,"delay",void 0),Ve([o.property()],Ke.prototype,"position",void 0),Ve([o.queryAssignedNodes("",!0)],Ke.prototype,"slotNodes",void 0),Ve([o.query(".ft-tooltip--container")],Ke.prototype,"container",void 0),Ve([o.query("slot")],Ke.prototype,"target",void 0),Ve([o.query(".ft-tooltip")],Ke.prototype,"tooltip",void 0),Ve([o.query(".ft-tooltip--content")],Ke.prototype,"tooltipContent",void 0),Ve([o.state()],Ke.prototype,"visible",void 0),e.customElement("ft-tooltip")(Ke);const Le={color:e.FtCssVariableFactory.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Ge=i.css`
|
|
893
895
|
:host {
|
|
894
896
|
line-height: 0;
|
|
895
897
|
}
|
|
@@ -965,7 +967,7 @@ const De={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
965
967
|
<div></div>
|
|
966
968
|
<div></div>
|
|
967
969
|
</div>
|
|
968
|
-
`}}qe.styles=Ge,e.customElement("ft-loader")(qe);const Xe=e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorPrimary),Ye={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorSurface),borderRadius:e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusL),color:Xe,fontSize:e.FtCssVariableFactory.extend("--ft-button-font-size",Pt.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:e.FtCssVariableFactory.extend("--ft-button-ripple-color",Xe),verticalPadding:e.FtCssVariableFactory.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:e.FtCssVariableFactory.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:e.FtCssVariableFactory.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},Je=e.FtCssVariableFactory.extend("--ft-button-primary-color",e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorOnPrimary)),Qe={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-primary-background-color",e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorPrimary)),color:Je,rippleColor:e.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Je)},ti=e.FtCssVariableFactory.extend("--ft-button-dense-border-radius",e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusM)),ei=e.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","SIZE","2px"),ii=e.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","SIZE","4px"),oi=e.FtCssVariableFactory.create("--ft-button-dense-icon-padding","SIZE","4px"),si=[
|
|
970
|
+
`}}qe.styles=Ge,e.customElement("ft-loader")(qe);const Xe=e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorPrimary),Ye={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorSurface),borderRadius:e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusL),color:Xe,fontSize:e.FtCssVariableFactory.extend("--ft-button-font-size",Pt.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:e.FtCssVariableFactory.extend("--ft-button-ripple-color",Xe),verticalPadding:e.FtCssVariableFactory.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:e.FtCssVariableFactory.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:e.FtCssVariableFactory.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},Je=e.FtCssVariableFactory.extend("--ft-button-primary-color",e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorOnPrimary)),Qe={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-primary-background-color",e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorPrimary)),color:Je,rippleColor:e.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Je)},ti=e.FtCssVariableFactory.extend("--ft-button-dense-border-radius",e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusM)),ei=e.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","SIZE","2px"),ii=e.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","SIZE","4px"),oi=e.FtCssVariableFactory.create("--ft-button-dense-icon-padding","SIZE","4px"),si=[i.css`
|
|
969
971
|
:host {
|
|
970
972
|
display: inline-block;
|
|
971
973
|
max-width: 100%;
|
|
@@ -1005,11 +1007,10 @@ const De={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1005
1007
|
border: none;
|
|
1006
1008
|
pointer-events: auto;
|
|
1007
1009
|
|
|
1008
|
-
--ft-button-internal-line-height: calc(${Ye.fontSize} + 2px);
|
|
1010
|
+
--ft-button-internal-line-height: max(calc(${Ye.fontSize} + 2px), ${Ye.iconSize});
|
|
1009
1011
|
--ft-button-internal-color: ${Ye.color};
|
|
1010
1012
|
${e.setVariable($e.size,Ye.iconSize)};
|
|
1011
1013
|
${e.setVariable(ae.color,Ye.rippleColor)};
|
|
1012
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ye.iconSize});
|
|
1013
1014
|
|
|
1014
1015
|
border-radius: ${Ye.borderRadius};
|
|
1015
1016
|
padding: ${Ye.verticalPadding} ${Ye.horizontalPadding};
|
|
@@ -1038,11 +1039,11 @@ const De={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1038
1039
|
}
|
|
1039
1040
|
|
|
1040
1041
|
.ft-button--round {
|
|
1041
|
-
border-radius: calc(var(--ft-button-internal-
|
|
1042
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${Ye.verticalPadding});
|
|
1042
1043
|
}
|
|
1043
1044
|
|
|
1044
1045
|
.ft-button--round.ft-button--dense {
|
|
1045
|
-
border-radius: calc(var(--ft-button-internal-
|
|
1046
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${ei});
|
|
1046
1047
|
}
|
|
1047
1048
|
|
|
1048
1049
|
.ft-button[disabled] {
|
|
@@ -1068,7 +1069,7 @@ const De={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1068
1069
|
display: block;
|
|
1069
1070
|
margin: 0 ${Ye.iconPadding};
|
|
1070
1071
|
${e.setVariable(Pt.fontSize,"1em")};
|
|
1071
|
-
${e.setVariable(Pt.lineHeight,"var(--ft-button-internal-
|
|
1072
|
+
${e.setVariable(Pt.lineHeight,"var(--ft-button-internal-line-height)")};
|
|
1072
1073
|
}
|
|
1073
1074
|
|
|
1074
1075
|
.ft-button--dense .ft-button--label {
|
|
@@ -1103,9 +1104,9 @@ const De={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1103
1104
|
${e.setVariable(Le.size,Ye.iconSize)};
|
|
1104
1105
|
${e.setVariable(Le.color,"var(--ft-button-internal-color)")};
|
|
1105
1106
|
}
|
|
1106
|
-
|
|
1107
|
+
`,e.noTextSelect];var li=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class ni extends e.FtLitElement{constructor(){super(...arguments),this.role="button",this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(i.html`
|
|
1107
1108
|
<button part="button"
|
|
1108
|
-
class="${
|
|
1109
|
+
class="${n.classMap(t)}"
|
|
1109
1110
|
aria-label="${this.getLabel()}"
|
|
1110
1111
|
?disabled=${this.isDisabled()}>
|
|
1111
1112
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
@@ -1126,7 +1127,7 @@ const De={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1126
1127
|
</ft-tooltip>
|
|
1127
1128
|
`:t}resolveIcon(){return this.loading?i.html`
|
|
1128
1129
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?i.html`
|
|
1129
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:i.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}
|
|
1130
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:i.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}ni.elementDefinitions={"ft-ripple":ye,"ft-tooltip":Ke,"ft-typography":ie,"ft-icon":Se,"ft-loader":qe},ni.styles=[e.safariEllipsisFix,si],li([o.property({type:String,reflect:!0})],ni.prototype,"role",void 0),li([o.property({type:Boolean})],ni.prototype,"primary",void 0),li([o.property({type:Boolean})],ni.prototype,"outlined",void 0),li([o.property({type:Boolean})],ni.prototype,"disabled",void 0),li([o.property({type:Boolean})],ni.prototype,"dense",void 0),li([o.property({type:Boolean})],ni.prototype,"round",void 0),li([o.property()],ni.prototype,"label",void 0),li([o.property()],ni.prototype,"icon",void 0),li([o.property()],ni.prototype,"iconVariant",void 0),li([o.property({type:Boolean})],ni.prototype,"trailingIcon",void 0),li([o.property({type:Boolean})],ni.prototype,"loading",void 0),li([o.property()],ni.prototype,"tooltipPosition",void 0),li([o.property({type:Boolean})],ni.prototype,"hideTooltip",void 0),li([o.property({type:Boolean})],ni.prototype,"forceTooltip",void 0),li([o.query(".ft-button")],ni.prototype,"button",void 0),li([o.query(".ft-button--label slot")],ni.prototype,"slottedContent",void 0),e.customElement("ft-button")(ni);class ri extends CustomEvent{constructor(t){super("row-click",{detail:t})}}const ai={headerBackground:e.FtCssVariableFactory.create("--ft-filterable-table-header-background","COLOR","whitesmoke"),oddRowBackground:e.FtCssVariableFactory.create("--ft-filterable-table-odd-row-background","COLOR","#FFFFFF"),evenRowBackground:e.FtCssVariableFactory.create("--ft-filterable-table-even-row-background","COLOR","#fdfdfd"),rowHoverBackground:e.FtCssVariableFactory.create("--ft-filterable-table-row-hover-background","COLOR","#fafafa"),stickyHeaderZIndex:e.FtCssVariableFactory.create("--ft-filterable-table-sticky-header-zindex","NUMBER","100"),cellVerticalBorderWidth:e.FtCssVariableFactory.create("--ft-filterable-table-cell-vertical-border-width","SIZE","1px"),colorOnSurfaceHigh:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceHigh,"Design system"),titleFont:e.FtCssVariableFactory.external(e.designSystemVariables.titleFont,"Design system"),contentFont:e.FtCssVariableFactory.external(e.designSystemVariables.contentFont,"Design system")},pi=i.css`
|
|
1130
1131
|
:host {
|
|
1131
1132
|
display: block;
|
|
1132
1133
|
}
|
|
@@ -1236,7 +1237,7 @@ const De={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1236
1237
|
.hidden {
|
|
1237
1238
|
visibility: hidden;
|
|
1238
1239
|
}
|
|
1239
|
-
`;var fi=function(t,e,i,o){for(var s,
|
|
1240
|
+
`;var fi=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};const di=t=>i.html`${t}`,hi=(t,e)=>t-e;class ci extends e.FtLitElement{constructor(){super(...arguments),this.data=[],this.columns=[],this.stickyHeaders=!1,this.filters=[],this.selectData=[]}init(t,e,i){this.data=t,this.columns=e,this.sort=i}render(){let t=this.sortData(this.filterData());return i.html`
|
|
1240
1241
|
<style>
|
|
1241
1242
|
.table {
|
|
1242
1243
|
grid-template-columns: repeat(${this.columns.length}, minmax(min-content, auto));
|
|
@@ -1254,7 +1255,7 @@ const De={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1254
1255
|
`))}
|
|
1255
1256
|
</div>
|
|
1256
1257
|
`}filterData(){return this.filters.reduce(((t,e,i)=>{var o;const s=this.columns[i];if(e&&e.value)switch(null!==(o=s.filter)&&void 0!==o?o:"text"){case"text":return t.filter((t=>this.getValueAsString(s,t,i).toLowerCase().includes(e.value.toLowerCase())));case"select":return t.filter((t=>this.getValueAsString(s,t,i)===e.value))}return t}),this.data)}sortData(t){var e;if(this.currentSort){const i=this.columns[this.currentSort.column],o=null!==(e=i.comparator)&&void 0!==e?e:hi,s="asc"===this.currentSort.order?o:(t,e)=>-o(t,e);return[...t].sort(((t,e)=>s(this.getValue(i,t),this.getValue(i,e))))}return t}update(t){super.update(t),t.has("sort")&&(this.currentSort=this.sort),(t.has("data")||t.has("columns"))&&this.updateSelectData()}updateSelectData(){this.selectData=[];const t=this.data,e=this.columns;for(let i in e){const o=e[i];"select"===o.filter&&(this.selectData[i]=[...new Set(t.map(((t,e)=>this.getValueAsString(o,t,e))))].sort(((t,e)=>t.localeCompare(e))))}this.requestUpdate()}renderHeader(t,e){const o={"header-cell":!0,"header-cell--sticky":this.stickyHeaders};return i.html`
|
|
1257
|
-
<div class="${
|
|
1258
|
+
<div class="${n.classMap(o)}"
|
|
1258
1259
|
part="${this.columnPart("header-cell",e)}">
|
|
1259
1260
|
<div class="column-title-container">
|
|
1260
1261
|
<span class="column-title"
|
|
@@ -1265,29 +1266,29 @@ const De={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1265
1266
|
</div>
|
|
1266
1267
|
${this.renderColumnFilter(t,e)}
|
|
1267
1268
|
</div>
|
|
1268
|
-
`}renderColumnSort(t,e){var o;const s=this.currentSort&&this.currentSort.column===e,
|
|
1269
|
+
`}renderColumnSort(t,e){var o;const s=this.currentSort&&this.currentSort.column===e,l=s?"asc"===this.currentSort.order?"expand_more":"expand_less":"unfold_more";return i.html`
|
|
1269
1270
|
<ft-button
|
|
1270
1271
|
round
|
|
1271
1272
|
dense
|
|
1272
1273
|
class="${null===(o=t.sortable)||void 0===o||o?"":"hidden"}"
|
|
1273
1274
|
iconVariant="material"
|
|
1274
|
-
icon="${
|
|
1275
|
+
icon="${l}"
|
|
1275
1276
|
label="Sort ${t.title}"
|
|
1276
1277
|
@click=${()=>{var t;s?"asc"===(null===(t=this.currentSort)||void 0===t?void 0:t.order)?this.currentSort={column:e,order:"desc"}:this.currentSort=void 0:this.currentSort={column:e,order:"asc"}}}
|
|
1277
1278
|
part="${this.columnPart("sort-button",e)}"
|
|
1278
1279
|
></ft-button>
|
|
1279
|
-
`}renderColumnFilter(t,e){var o,s;const
|
|
1280
|
+
`}renderColumnFilter(t,e){var o,s;const l=t=>{this.filters[e]={value:t.detail},this.requestUpdate()};switch(null!==(o=t.filter)&&void 0!==o?o:"text"){case"text":return i.html`
|
|
1280
1281
|
<div class="column-filter" part="${this.columnPart("filter-container",e)}">
|
|
1281
1282
|
<ft-text-field
|
|
1282
1283
|
label="Search ${t.title}"
|
|
1283
|
-
@live-change="${
|
|
1284
|
+
@live-change="${l}"
|
|
1284
1285
|
part="${this.columnPart("filter",e)}"
|
|
1285
1286
|
></ft-text-field>
|
|
1286
1287
|
</div>
|
|
1287
1288
|
`;case"select":const o=null!==(s=this.selectData[e])&&void 0!==s?s:[];return o.length?i.html`
|
|
1288
1289
|
<div class="column-filter" part="${this.columnPart("filter-container",e)}">
|
|
1289
1290
|
<ft-select label="Filter ${t.title}"
|
|
1290
|
-
@change=${
|
|
1291
|
+
@change=${l}
|
|
1291
1292
|
part="${this.columnPart("filter",e)}">
|
|
1292
1293
|
<ft-select-option></ft-select-option>
|
|
1293
1294
|
${o.map((t=>i.html`
|
|
@@ -1295,9 +1296,9 @@ const De={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SI
|
|
|
1295
1296
|
`))}
|
|
1296
1297
|
</ft-select>
|
|
1297
1298
|
</div>
|
|
1298
|
-
`:i.nothing}return i.nothing}columnPart(t,e){return`${t} ${t}-column-${e}`}renderCell(t,e,o,s){var
|
|
1299
|
+
`:i.nothing}return i.nothing}columnPart(t,e){return`${t} ${t}-column-${e}`}renderCell(t,e,o,s){var n;const r=null!==(n=t.render)&&void 0!==n?n:di;return i.html`
|
|
1299
1300
|
<div class="cell"
|
|
1300
1301
|
part="${this.columnPart("cell",e)} cell-row-${s} cell-column-${e}-row-${s}">
|
|
1301
|
-
${(t=>{const e=r(t,s);return"string"==typeof e?
|
|
1302
|
+
${(t=>{const e=r(t,s);return"string"==typeof e?l.unsafeHTML(e):e})(this.getValue(t,o))}
|
|
1302
1303
|
</div>
|
|
1303
1304
|
`}getValue(t,e){return"string"==typeof t.getter?e[t.getter]:t.getter(e)}getValueAsString(t,e,i){const o=this.getValue(t,e);return"function"==typeof t.stringify?t.stringify(o,i):(t=>""+t)(o)}}ci.styles=pi,fi([o.property({attribute:!1})],ci.prototype,"data",void 0),fi([o.property({attribute:!1})],ci.prototype,"columns",void 0),fi([o.property({attribute:!1})],ci.prototype,"sort",void 0),fi([o.property()],ci.prototype,"stickyHeaders",void 0),fi([o.state()],ci.prototype,"currentSort",void 0),e.customElement("ft-filterable-table")(ci),t.FtFilterableTable=ci,t.FtFilterableTableCssVariables=ai,t.RowClickEvent=ri,t.styles=pi}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litUnsafeHTML,ftGlobals.litClassMap);
|
|
@@ -61,7 +61,7 @@ const h=window,u=h.ShadowRoot&&(void 0===h.ShadyCSS||h.ShadyCSS.nativeShadow)&&"
|
|
|
61
61
|
* Copyright 2017 Google LLC
|
|
62
62
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
63
63
|
*/
|
|
64
|
-
var M;z.finalized=!0,z.elementProperties=new Map,z.elementStyles=[],z.shadowRootOptions={mode:"open"},null==E||E({ReactiveElement:z}),(null!==(w=O.reactiveElementVersions)&&void 0!==w?w:O.reactiveElementVersions=[]).push("1.6.1");const F=window,U=F.trustedTypes,j=U?U.createPolicy("lit-html",{createHTML:t=>t}):void 0,B="$lit$",D=`lit$${(Math.random()+"").slice(9)}$`,
|
|
64
|
+
var M;z.finalized=!0,z.elementProperties=new Map,z.elementStyles=[],z.shadowRootOptions={mode:"open"},null==E||E({ReactiveElement:z}),(null!==(w=O.reactiveElementVersions)&&void 0!==w?w:O.reactiveElementVersions=[]).push("1.6.1");const F=window,U=F.trustedTypes,j=U?U.createPolicy("lit-html",{createHTML:t=>t}):void 0,B="$lit$",D=`lit$${(Math.random()+"").slice(9)}$`,I="?"+D,A=`<${I}>`,P=document,L=()=>P.createComment(""),T=t=>null===t||"object"!=typeof t&&"function"!=typeof t,_=Array.isArray,Z=t=>_(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),W="[ \t\n\f\r]",H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,K=/-->/g,V=/>/g,J=RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),q=/'/g,X=/"/g,Y=/^(?:script|style|textarea|title)$/i,G=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),Q=Symbol.for("lit-noChange"),tt=Symbol.for("lit-nothing"),et=new WeakMap,it=P.createTreeWalker(P,129,null,!1),ot=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=H;for(let e=0;e<i;e++){const i=t[e];let l,a,c=-1,p=0;for(;p<i.length&&(r.lastIndex=p,a=r.exec(i),null!==a);)p=r.lastIndex,r===H?"!--"===a[1]?r=K:void 0!==a[1]?r=V:void 0!==a[2]?(Y.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=J):void 0!==a[3]&&(r=J):r===J?">"===a[0]?(r=null!=s?s:H,c=-1):void 0===a[1]?c=-2:(c=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?J:'"'===a[3]?X:q):r===X||r===q?r=J:r===K||r===V?r=H:(r=J,s=void 0);const d=r===J&&t[e+1].startsWith("/>")?" ":"";n+=r===H?i+A:c>=0?(o.push(l),i.slice(0,c)+B+i.slice(c)+D+d):i+D+(-2===c?(o.push(void 0),e):d)}const l=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==j?j.createHTML(l):l,o]};class st{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,c]=ot(t,e);if(this.el=st.createElement(a,i),it.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=it.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(B)||e.startsWith(D)){const i=c[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+B).split(D),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?ct:"?"===e[1]?dt:"@"===e[1]?ft:at})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(Y.test(o.tagName)){const t=o.textContent.split(D),e=t.length-1;if(e>0){o.textContent=U?U.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],L()),it.nextNode(),l.push({type:2,index:++s});o.append(t[e],L())}}}else if(8===o.nodeType)if(o.data===I)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(D,t+1));)l.push({type:7,index:s}),t+=D.length-1}s++}}static createElement(t,e){const i=P.createElement("template");return i.innerHTML=t,i}}function nt(t,e,i=t,o){var s,n,r,l;if(e===Q)return e;let a=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const c=T(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==c&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===c?a=void 0:(a=new c(t),a._$AT(t,i,o)),void 0!==o?(null!==(r=(l=i)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=nt(t,a._$AS(t,e.values),a,o)),e}class rt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:P).importNode(i,!0);it.currentNode=s;let n=it.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new lt(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new ht(n,this,t)),this._$AV.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=it.nextNode(),r++)}return s}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class lt{constructor(t,e,i,o){var s;this.type=2,this._$AH=tt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=nt(this,t,e),T(t)?t===tt||null==t||""===t?(this._$AH!==tt&&this._$AR(),this._$AH=tt):t!==this._$AH&&t!==Q&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):Z(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==tt&&T(this._$AH)?this._$AA.nextSibling.data=t:this.$(P.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=st.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(i);else{const t=new rt(s,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=et.get(t.strings);return void 0===e&&et.set(t.strings,e=new st(t)),e}T(t){_(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new lt(this.k(L()),this.k(L()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class at{constructor(t,e,i,o,s){this.type=1,this._$AH=tt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=tt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let n=!1;if(void 0===s)t=nt(this,t,e,0),n=!T(t)||t!==this._$AH&&t!==Q,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=nt(this,o[i+r],e,r),l===Q&&(l=this._$AH[r]),n||(n=!T(l)||l!==this._$AH[r]),l===tt?t=tt:t!==tt&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.j(t)}j(t){t===tt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class ct extends at{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===tt?void 0:t}}const pt=U?U.emptyScript:"";class dt extends at{constructor(){super(...arguments),this.type=4}j(t){t&&t!==tt?this.element.setAttribute(this.name,pt):this.element.removeAttribute(this.name)}}class ft extends at{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=nt(this,t,e,0))&&void 0!==i?i:tt)===Q)return;const o=this._$AH,s=t===tt&&o!==tt||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==tt&&(o===tt||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class ht{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){nt(this,t)}}const ut={O:B,P:D,A:I,C:1,M:ot,L:rt,D:Z,R:nt,I:lt,V:at,H:dt,N:ft,U:ct,F:ht},vt=F.litHtmlPolyfillSupport;null==vt||vt(st,lt),(null!==(M=F.litHtmlVersions)&&void 0!==M?M:F.litHtmlVersions=[]).push("2.7.3");
|
|
65
65
|
/**
|
|
66
66
|
* @license
|
|
67
67
|
* Copyright 2017 Google LLC
|
|
@@ -99,7 +99,7 @@ var xt,bt;let gt=class extends z{constructor(){super(...arguments),this.renderOp
|
|
|
99
99
|
display: inline-block;
|
|
100
100
|
width: 0;
|
|
101
101
|
}
|
|
102
|
-
`;var Ft,Ut,jt;const Bt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(jt=null===(Ut=null===(Ft=window.safari)||void 0===Ft?void 0:Ft.pushNotification)||void 0===Ut?void 0:Ut.toString())&&void 0!==jt?jt:""),Dt=1,
|
|
102
|
+
`;var Ft,Ut,jt;const Bt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(jt=null===(Ut=null===(Ft=window.safari)||void 0===Ft?void 0:Ft.pushNotification)||void 0===Ut?void 0:Ut.toString())&&void 0!==jt?jt:""),Dt=1,It=2,At=t=>(...e)=>({_$litDirective$:t,values:e});
|
|
103
103
|
/**
|
|
104
104
|
* @license
|
|
105
105
|
* Copyright 2017 Google LLC
|
|
@@ -109,7 +109,7 @@ var xt,bt;let gt=class extends z{constructor(){super(...arguments),this.renderOp
|
|
|
109
109
|
* @license
|
|
110
110
|
* Copyright 2020 Google LLC
|
|
111
111
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
112
|
-
*/const{I:Lt}=ut,Tt=()=>document.createComment(""),_t=(t,e,i)=>{var o;const s=t._$AA.parentNode,n=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Tt(),n),o=s.insertBefore(Tt(),n);i=new Lt(e,o,t,t.options)}else{const e=i._$AB.nextSibling,r=i._$AM,l=r!==t;if(l){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==r._$AU&&i._$AP(e)}if(e!==n||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,n),t=e}}}return i},Zt=(t,e,i=t)=>(t._$AI(e,i),t),Wt={},Ht=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const o=t._$AB.nextSibling;for(;i!==o;){const t=i.nextSibling;i.remove(),i=t}},Kt=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},Vt=
|
|
112
|
+
*/const{I:Lt}=ut,Tt=()=>document.createComment(""),_t=(t,e,i)=>{var o;const s=t._$AA.parentNode,n=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Tt(),n),o=s.insertBefore(Tt(),n);i=new Lt(e,o,t,t.options)}else{const e=i._$AB.nextSibling,r=i._$AM,l=r!==t;if(l){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==r._$AU&&i._$AP(e)}if(e!==n||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,n),t=e}}}return i},Zt=(t,e,i=t)=>(t._$AI(e,i),t),Wt={},Ht=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const o=t._$AB.nextSibling;for(;i!==o;){const t=i.nextSibling;i.remove(),i=t}},Kt=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},Vt=At(class extends Pt{constructor(t){if(super(t),t.type!==It)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const s=[],n=[];let r=0;for(const e of t)s[r]=o?o(e,r):r,n[r]=i(e,r),r++;return{values:n,keys:s}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,o]){var s;const n=(t=>t._$AH)(t),{values:r,keys:l}=this.dt(e,i,o);if(!Array.isArray(n))return this.ht=l,r;const a=null!==(s=this.ht)&&void 0!==s?s:this.ht=[],c=[];let p,d,f=0,h=n.length-1,u=0,v=r.length-1;for(;f<=h&&u<=v;)if(null===n[f])f++;else if(null===n[h])h--;else if(a[f]===l[u])c[u]=Zt(n[f],r[u]),f++,u++;else if(a[h]===l[v])c[v]=Zt(n[h],r[v]),h--,v--;else if(a[f]===l[v])c[v]=Zt(n[f],r[v]),_t(t,c[v+1],n[f]),f++,v--;else if(a[h]===l[u])c[u]=Zt(n[h],r[u]),_t(t,n[f],n[h]),h--,u++;else if(void 0===p&&(p=Kt(l,u,v),d=Kt(a,f,h)),p.has(a[f]))if(p.has(a[h])){const e=d.get(l[u]),i=void 0!==e?n[e]:null;if(null===i){const e=_t(t,n[f]);Zt(e,r[u]),c[u]=e}else c[u]=Zt(i,r[u]),_t(t,n[f],i),n[e]=null;u++}else Ht(n[h]),h--;else Ht(n[f]),f++;for(;u<=v;){const e=_t(t,c[v+1]);Zt(e,r[u]),c[u++]=e}for(;f<=h;){const t=n[f++];null!==t&&Ht(t)}return this.ht=l,((t,e=Wt)=>{t._$AH=e})(t,c),Q}});
|
|
113
113
|
/**
|
|
114
114
|
* @license
|
|
115
115
|
* Copyright 2017 Google LLC
|
|
@@ -120,12 +120,12 @@ var xt,bt;let gt=class extends z{constructor(){super(...arguments),this.renderOp
|
|
|
120
120
|
* Copyright 2017 Google LLC
|
|
121
121
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
122
122
|
*/
|
|
123
|
-
let Jt=class extends Pt{constructor(t){if(super(t),this.et=tt,t.type!==
|
|
123
|
+
let Jt=class extends Pt{constructor(t){if(super(t),this.et=tt,t.type!==It)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===tt||null==t)return this.ft=void 0,this.et=t;if(t===Q)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}};Jt.directiveName="unsafeHTML",Jt.resultType=1;const qt=At(Jt),Xt=At(class extends Pt{constructor(t){var e;if(super(t),t.type!==Dt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.nt)||void 0===i?void 0:i.has(t))&&this.it.add(t);return this.render(e)}const s=t.element.classList;this.it.forEach((t=>{t in e||(s.remove(t),this.it.delete(t))}));for(const t in e){const i=!!e[t];i===this.it.has(t)||(null===(o=this.nt)||void 0===o?void 0:o.has(t))||(i?(s.add(t),this.it.add(t)):(s.remove(t),this.it.delete(t)))}return Q}}),Yt=Symbol.for(""),Gt=t=>{if((null==t?void 0:t.r)===Yt)return null==t?void 0:t._$litStatic$},Qt=t=>({_$litStatic$:t,r:Yt}),te=new Map,ee=(t=>(e,...i)=>{const o=i.length;let s,n;const r=[],l=[];let a,c=0,p=!1;for(;c<o;){for(a=e[c];c<o&&void 0!==(n=i[c],s=Gt(n));)a+=s+e[++c],p=!0;c!==o&&l.push(n),r.push(a),c++}if(c===o&&r.push(e[o]),p){const t=r.join("$$lit$$");void 0===(e=te.get(t))&&(r.raw=r,te.set(t,e=r)),i=l}return t(e,...i)})(G);
|
|
124
124
|
/**
|
|
125
125
|
* @license
|
|
126
126
|
* Copyright 2018 Google LLC
|
|
127
127
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
128
|
-
*/var ie;!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"}(ie||(ie={}));const oe=mt.extend("--ft-typography-font-family",wt.titleFont),se=mt.extend("--ft-typography-font-family",wt.contentFont),ne={fontFamily:se,fontSize:mt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:mt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:mt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:mt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:mt.create("--ft-typography-text-transform","UNKNOWN","inherit")},re=mt.extend("--ft-typography-title-font-family",oe),le=mt.extend("--ft-typography-title-font-size",ne.fontSize,"20px"),ae=mt.extend("--ft-typography-title-font-weight",ne.fontWeight,"normal"),ce=mt.extend("--ft-typography-title-letter-spacing",ne.letterSpacing,"0.15px"),pe=mt.extend("--ft-typography-title-line-height",ne.lineHeight,"1.2"),de=mt.extend("--ft-typography-title-text-transform",ne.textTransform,"inherit"),fe=mt.extend("--ft-typography-title-dense-font-family",oe),he=mt.extend("--ft-typography-title-dense-font-size",ne.fontSize,"14px"),ue=mt.extend("--ft-typography-title-dense-font-weight",ne.fontWeight,"normal"),ve=mt.extend("--ft-typography-title-dense-letter-spacing",ne.letterSpacing,"0.105px"),xe=mt.extend("--ft-typography-title-dense-line-height",ne.lineHeight,"1.7"),be=mt.extend("--ft-typography-title-dense-text-transform",ne.textTransform,"inherit"),ge=mt.extend("--ft-typography-subtitle1-font-family",se),ye=mt.extend("--ft-typography-subtitle1-font-size",ne.fontSize,"16px"),me=mt.extend("--ft-typography-subtitle1-font-weight",ne.fontWeight,"600"),$e=mt.extend("--ft-typography-subtitle1-letter-spacing",ne.letterSpacing,"0.144px"),we=mt.extend("--ft-typography-subtitle1-line-height",ne.lineHeight,"1.5"),Oe=mt.extend("--ft-typography-subtitle1-text-transform",ne.textTransform,"inherit"),Se=mt.extend("--ft-typography-subtitle2-font-family",se),ke=mt.extend("--ft-typography-subtitle2-font-size",ne.fontSize,"14px"),Ee=mt.extend("--ft-typography-subtitle2-font-weight",ne.fontWeight,"normal"),Ce=mt.extend("--ft-typography-subtitle2-letter-spacing",ne.letterSpacing,"0.098px"),Ne=mt.extend("--ft-typography-subtitle2-line-height",ne.lineHeight,"1.7"),Re=mt.extend("--ft-typography-subtitle2-text-transform",ne.textTransform,"inherit"),ze={fontFamily:mt.extend("--ft-typography-body1-font-family",se),fontSize:mt.extend("--ft-typography-body1-font-size",ne.fontSize,"16px"),fontWeight:mt.extend("--ft-typography-body1-font-weight",ne.fontWeight,"normal"),letterSpacing:mt.extend("--ft-typography-body1-letter-spacing",ne.letterSpacing,"0.496px"),lineHeight:mt.extend("--ft-typography-body1-line-height",ne.lineHeight,"1.5"),textTransform:mt.extend("--ft-typography-body1-text-transform",ne.textTransform,"inherit")},Me=mt.extend("--ft-typography-body2-font-family",se),Fe=mt.extend("--ft-typography-body2-font-size",ne.fontSize,"14px"),Ue=mt.extend("--ft-typography-body2-font-weight",ne.fontWeight,"normal"),je=mt.extend("--ft-typography-body2-letter-spacing",ne.letterSpacing,"0.252px"),Be=mt.extend("--ft-typography-body2-line-height",ne.lineHeight,"1.4"),De=mt.extend("--ft-typography-body2-text-transform",ne.textTransform,"inherit"),
|
|
128
|
+
*/var ie;!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"}(ie||(ie={}));const oe=mt.extend("--ft-typography-font-family",wt.titleFont),se=mt.extend("--ft-typography-font-family",wt.contentFont),ne={fontFamily:se,fontSize:mt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:mt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:mt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:mt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:mt.create("--ft-typography-text-transform","UNKNOWN","inherit")},re=mt.extend("--ft-typography-title-font-family",oe),le=mt.extend("--ft-typography-title-font-size",ne.fontSize,"20px"),ae=mt.extend("--ft-typography-title-font-weight",ne.fontWeight,"normal"),ce=mt.extend("--ft-typography-title-letter-spacing",ne.letterSpacing,"0.15px"),pe=mt.extend("--ft-typography-title-line-height",ne.lineHeight,"1.2"),de=mt.extend("--ft-typography-title-text-transform",ne.textTransform,"inherit"),fe=mt.extend("--ft-typography-title-dense-font-family",oe),he=mt.extend("--ft-typography-title-dense-font-size",ne.fontSize,"14px"),ue=mt.extend("--ft-typography-title-dense-font-weight",ne.fontWeight,"normal"),ve=mt.extend("--ft-typography-title-dense-letter-spacing",ne.letterSpacing,"0.105px"),xe=mt.extend("--ft-typography-title-dense-line-height",ne.lineHeight,"1.7"),be=mt.extend("--ft-typography-title-dense-text-transform",ne.textTransform,"inherit"),ge=mt.extend("--ft-typography-subtitle1-font-family",se),ye=mt.extend("--ft-typography-subtitle1-font-size",ne.fontSize,"16px"),me=mt.extend("--ft-typography-subtitle1-font-weight",ne.fontWeight,"600"),$e=mt.extend("--ft-typography-subtitle1-letter-spacing",ne.letterSpacing,"0.144px"),we=mt.extend("--ft-typography-subtitle1-line-height",ne.lineHeight,"1.5"),Oe=mt.extend("--ft-typography-subtitle1-text-transform",ne.textTransform,"inherit"),Se=mt.extend("--ft-typography-subtitle2-font-family",se),ke=mt.extend("--ft-typography-subtitle2-font-size",ne.fontSize,"14px"),Ee=mt.extend("--ft-typography-subtitle2-font-weight",ne.fontWeight,"normal"),Ce=mt.extend("--ft-typography-subtitle2-letter-spacing",ne.letterSpacing,"0.098px"),Ne=mt.extend("--ft-typography-subtitle2-line-height",ne.lineHeight,"1.7"),Re=mt.extend("--ft-typography-subtitle2-text-transform",ne.textTransform,"inherit"),ze={fontFamily:mt.extend("--ft-typography-body1-font-family",se),fontSize:mt.extend("--ft-typography-body1-font-size",ne.fontSize,"16px"),fontWeight:mt.extend("--ft-typography-body1-font-weight",ne.fontWeight,"normal"),letterSpacing:mt.extend("--ft-typography-body1-letter-spacing",ne.letterSpacing,"0.496px"),lineHeight:mt.extend("--ft-typography-body1-line-height",ne.lineHeight,"1.5"),textTransform:mt.extend("--ft-typography-body1-text-transform",ne.textTransform,"inherit")},Me=mt.extend("--ft-typography-body2-font-family",se),Fe=mt.extend("--ft-typography-body2-font-size",ne.fontSize,"14px"),Ue=mt.extend("--ft-typography-body2-font-weight",ne.fontWeight,"normal"),je=mt.extend("--ft-typography-body2-letter-spacing",ne.letterSpacing,"0.252px"),Be=mt.extend("--ft-typography-body2-line-height",ne.lineHeight,"1.4"),De=mt.extend("--ft-typography-body2-text-transform",ne.textTransform,"inherit"),Ie={fontFamily:mt.extend("--ft-typography-caption-font-family",se),fontSize:mt.extend("--ft-typography-caption-font-size",ne.fontSize,"12px"),fontWeight:mt.extend("--ft-typography-caption-font-weight",ne.fontWeight,"normal"),letterSpacing:mt.extend("--ft-typography-caption-letter-spacing",ne.letterSpacing,"0.396px"),lineHeight:mt.extend("--ft-typography-caption-line-height",ne.lineHeight,"1.33"),textTransform:mt.extend("--ft-typography-caption-text-transform",ne.textTransform,"inherit")},Ae=mt.extend("--ft-typography-breadcrumb-font-family",se),Pe=mt.extend("--ft-typography-breadcrumb-font-size",ne.fontSize,"10px"),Le=mt.extend("--ft-typography-breadcrumb-font-weight",ne.fontWeight,"normal"),Te=mt.extend("--ft-typography-breadcrumb-letter-spacing",ne.letterSpacing,"0.33px"),_e=mt.extend("--ft-typography-breadcrumb-line-height",ne.lineHeight,"1.6"),Ze=mt.extend("--ft-typography-breadcrumb-text-transform",ne.textTransform,"inherit"),We=mt.extend("--ft-typography-overline-font-family",se),He=mt.extend("--ft-typography-overline-font-size",ne.fontSize,"10px"),Ke=mt.extend("--ft-typography-overline-font-weight",ne.fontWeight,"normal"),Ve=mt.extend("--ft-typography-overline-letter-spacing",ne.letterSpacing,"1.5px"),Je=mt.extend("--ft-typography-overline-line-height",ne.lineHeight,"1.6"),qe=mt.extend("--ft-typography-overline-text-transform",ne.textTransform,"uppercase"),Xe={fontFamily:mt.extend("--ft-typography-button-font-family",se),fontSize:mt.extend("--ft-typography-button-font-size",ne.fontSize,"14px"),fontWeight:mt.extend("--ft-typography-button-font-weight",ne.fontWeight,"600"),letterSpacing:mt.extend("--ft-typography-button-letter-spacing",ne.letterSpacing,"1.246px"),lineHeight:mt.extend("--ft-typography-button-line-height",ne.lineHeight,"1.15"),textTransform:mt.extend("--ft-typography-button-text-transform",ne.textTransform,"uppercase")},Ye=y`
|
|
129
129
|
.ft-typography--title {
|
|
130
130
|
font-family: ${re};
|
|
131
131
|
font-size: ${le};
|
|
@@ -182,16 +182,16 @@ let Jt=class extends Pt{constructor(t){if(super(t),this.et=tt,t.type!==At)throw
|
|
|
182
182
|
}
|
|
183
183
|
`,oi=y`
|
|
184
184
|
.ft-typography--caption {
|
|
185
|
-
font-family: ${
|
|
186
|
-
font-size: ${
|
|
187
|
-
font-weight: ${
|
|
188
|
-
letter-spacing: ${
|
|
189
|
-
line-height: ${
|
|
190
|
-
text-transform: ${
|
|
185
|
+
font-family: ${Ie.fontFamily};
|
|
186
|
+
font-size: ${Ie.fontSize};
|
|
187
|
+
font-weight: ${Ie.fontWeight};
|
|
188
|
+
letter-spacing: ${Ie.letterSpacing};
|
|
189
|
+
line-height: ${Ie.lineHeight};
|
|
190
|
+
text-transform: ${Ie.textTransform};
|
|
191
191
|
}
|
|
192
192
|
`,si=y`
|
|
193
193
|
.ft-typography--breadcrumb {
|
|
194
|
-
font-family: ${
|
|
194
|
+
font-family: ${Ae};
|
|
195
195
|
font-size: ${Pe};
|
|
196
196
|
font-weight: ${Le};
|
|
197
197
|
letter-spacing: ${Te};
|
|
@@ -278,8 +278,8 @@ let Jt=class extends Pt{constructor(t){if(super(t),this.et=tt,t.type!==At)throw
|
|
|
278
278
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
279
279
|
max-width: calc(${pi.labelMaxWidth} - 2 * (${pi.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
|
|
280
280
|
text-overflow: ellipsis;
|
|
281
|
-
${$t(
|
|
282
|
-
${$t(
|
|
281
|
+
${$t(Ie.fontSize,pi.fontSize)};
|
|
282
|
+
${$t(Ie.lineHeight,pi.fontSize)};
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
.ft-input-label--in-error .ft-input-label--text {
|
|
@@ -311,8 +311,8 @@ let Jt=class extends Pt{constructor(t){if(super(t),this.et=tt,t.type!==At)throw
|
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
.ft-input-label--raised .ft-input-label--text {
|
|
314
|
-
${$t(
|
|
315
|
-
${$t(
|
|
314
|
+
${$t(Ie.fontSize,pi.raisedFontSize)};
|
|
315
|
+
${$t(Ie.lineHeight,pi.raisedFontSize)};
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
@@ -358,7 +358,7 @@ let Jt=class extends Pt{constructor(t){if(super(t),this.et=tt,t.type!==At)throw
|
|
|
358
358
|
</div>
|
|
359
359
|
`:null}
|
|
360
360
|
</div>
|
|
361
|
-
`}}hi.elementDefinitions={},hi.styles=[oi,di],fi([o({type:String})],hi.prototype,"text",void 0),fi([o({type:Boolean})],hi.prototype,"raised",void 0),fi([o({type:Boolean})],hi.prototype,"outlined",void 0),fi([o({type:Boolean})],hi.prototype,"disabled",void 0),fi([o({type:Boolean})],hi.prototype,"error",void 0),f("ft-input-label")(hi);const ui=mt.extend("--ft-ripple-color",wt.colorContent),vi={color:ui,backgroundColor:mt.extend("--ft-ripple-background-color",ui),opacityContentOnSurfacePressed:mt.external(wt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:mt.external(wt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:mt.external(wt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:mt.external(wt.opacityContentOnSurfaceSelected,"Design system")},xi=mt.extend("--ft-ripple-color",wt.colorPrimary),bi=xi,gi=mt.extend("--ft-ripple-background-color",xi),yi=mt.extend("--ft-ripple-color",wt.colorSecondary),mi=yi,$i=mt.extend("--ft-ripple-background-color",yi),wi=y`
|
|
361
|
+
`}}hi.elementDefinitions={},hi.styles=[oi,di],fi([o({type:String})],hi.prototype,"text",void 0),fi([o({type:Boolean})],hi.prototype,"raised",void 0),fi([o({type:Boolean})],hi.prototype,"outlined",void 0),fi([o({type:Boolean})],hi.prototype,"disabled",void 0),fi([o({type:Boolean})],hi.prototype,"error",void 0),f("ft-input-label")(hi);const ui=mt.extend("--ft-ripple-color",wt.colorContent),vi={color:ui,backgroundColor:mt.extend("--ft-ripple-background-color",ui),opacityContentOnSurfacePressed:mt.external(wt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:mt.external(wt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:mt.external(wt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:mt.external(wt.opacityContentOnSurfaceSelected,"Design system"),borderRadius:mt.create("--ft-ripple-border-radius","SIZE","0px")},xi=mt.extend("--ft-ripple-color",wt.colorPrimary),bi=xi,gi=mt.extend("--ft-ripple-background-color",xi),yi=mt.extend("--ft-ripple-color",wt.colorSecondary),mi=yi,$i=mt.extend("--ft-ripple-background-color",yi),wi=y`
|
|
362
362
|
:host {
|
|
363
363
|
display: contents;
|
|
364
364
|
}
|
|
@@ -371,6 +371,7 @@ let Jt=class extends Pt{constructor(t){if(super(t),this.et=tt,t.type!==At)throw
|
|
|
371
371
|
|
|
372
372
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
373
373
|
overflow: hidden;
|
|
374
|
+
border-radius: ${vi.borderRadius};
|
|
374
375
|
}
|
|
375
376
|
|
|
376
377
|
.ft-ripple .ft-ripple--background,
|
|
@@ -499,6 +500,7 @@ let Jt=class extends Pt{constructor(t){if(super(t),this.et=tt,t.type!==At)throw
|
|
|
499
500
|
|
|
500
501
|
/* Ugly fix because font is broken */
|
|
501
502
|
font-size: calc(0.75 * ${Ci.size});
|
|
503
|
+
line-height: ${Ci.size};
|
|
502
504
|
position: relative;
|
|
503
505
|
top: -4%;
|
|
504
506
|
justify-content: center;
|
|
@@ -512,7 +514,7 @@ let Jt=class extends Pt{constructor(t){if(super(t),this.et=tt,t.type!==At)throw
|
|
|
512
514
|
font-family: ${Ci.materialFontFamily}, "Material Icons", sans-serif;
|
|
513
515
|
}
|
|
514
516
|
`;var Ri;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ri||(Ri={}));var zi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Mi extends Rt{constructor(){super(...arguments),this.resolvedIcon=tt}render(){const t=this.variant&&Object.values(Ri).includes(this.variant)?this.variant:Ri.fluid_topics,e=t!==Ri.material||!!this.value;return G`
|
|
515
|
-
<i class="ft-icon
|
|
517
|
+
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
516
518
|
${qt(this.resolvedIcon)}
|
|
517
519
|
<slot ?hidden=${e}></slot>
|
|
518
520
|
</i>
|
|
@@ -719,7 +721,7 @@ let Jt=class extends Pt{constructor(t){if(super(t),this.et=tt,t.type!==At)throw
|
|
|
719
721
|
* Copyright 2018 Google LLC
|
|
720
722
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
721
723
|
*/
|
|
722
|
-
const
|
|
724
|
+
const Ii={fontSize:mt.create("--ft-text-field-font-size","SIZE","14px"),labelSize:mt.create("--ft-text-field-label-size","SIZE","11px"),verticalSpacing:mt.create("--ft-text-field-vertical-spacing","SIZE","4px"),horizontalSpacing:mt.create("--ft-text-field-horizontal-spacing","SIZE","16px"),helperColor:mt.extend("--ft-text-field-helper-color",wt.colorOnSurfaceMedium),colorPrimary:mt.external(wt.colorPrimary,"Design system"),colorOnSurface:mt.external(wt.colorOnSurface,"Design system"),colorOnSurfaceDisabled:mt.external(wt.colorOnSurfaceDisabled,"Design system"),borderRadiusS:mt.external(wt.borderRadiusS,"Design system"),colorError:mt.external(wt.colorError,"Design system"),prefixColor:mt.extend("--ft-text-field-prefix-color",wt.colorOnSurfaceMedium),iconColor:mt.extend("--ft-text-field-icon-color",wt.colorOnSurfaceMedium),floatingZIndex:mt.create("--ft-text-field-floating-components-z-index","NUMBER","3"),colorSurface:mt.external(wt.colorSurface,"Design system"),colorOutline:mt.external(wt.colorOutline,"Design system"),elevation02:mt.external(wt.elevation02,"Design system"),suggestSize:mt.create("--ft-text-field-suggest-size","SIZE","300px")},Ai=y`
|
|
723
725
|
*:focus {
|
|
724
726
|
outline: none;
|
|
725
727
|
}
|
|
@@ -732,16 +734,16 @@ const Ai={fontSize:mt.create("--ft-text-field-font-size","SIZE","14px"),labelSiz
|
|
|
732
734
|
}
|
|
733
735
|
|
|
734
736
|
ft-input-label {
|
|
735
|
-
${$t(pi.fontSize,
|
|
736
|
-
${$t(pi.raisedFontSize,
|
|
737
|
-
${$t(pi.verticalSpacing,
|
|
738
|
-
${$t(pi.horizontalSpacing,
|
|
737
|
+
${$t(pi.fontSize,Ii.fontSize)};
|
|
738
|
+
${$t(pi.raisedFontSize,Ii.labelSize)};
|
|
739
|
+
${$t(pi.verticalSpacing,Ii.verticalSpacing)};
|
|
740
|
+
${$t(pi.horizontalSpacing,Ii.horizontalSpacing)};
|
|
739
741
|
}
|
|
740
742
|
|
|
741
743
|
.ft-text-field--main-panel {
|
|
742
744
|
position: relative;
|
|
743
745
|
display: flex;
|
|
744
|
-
height: calc(4 * ${
|
|
746
|
+
height: calc(4 * ${Ii.verticalSpacing} + ${Ii.labelSize} + ${Ii.fontSize});
|
|
745
747
|
}
|
|
746
748
|
|
|
747
749
|
.ft-text-field--input-panel {
|
|
@@ -750,10 +752,10 @@ const Ai={fontSize:mt.create("--ft-text-field-font-size","SIZE","14px"),labelSiz
|
|
|
750
752
|
display: flex;
|
|
751
753
|
align-items: center;
|
|
752
754
|
overflow: hidden;
|
|
753
|
-
padding: 0 ${
|
|
755
|
+
padding: 0 ${Ii.horizontalSpacing};
|
|
754
756
|
|
|
755
|
-
${$t(ze.fontSize,
|
|
756
|
-
${$t(ze.lineHeight,
|
|
757
|
+
${$t(ze.fontSize,Ii.fontSize)};
|
|
758
|
+
${$t(ze.lineHeight,Ii.fontSize)};
|
|
757
759
|
}
|
|
758
760
|
|
|
759
761
|
.ft-text-field--input-panel ft-ripple {
|
|
@@ -763,11 +765,11 @@ const Ai={fontSize:mt.create("--ft-text-field-font-size","SIZE","14px"),labelSiz
|
|
|
763
765
|
|
|
764
766
|
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input-panel {
|
|
765
767
|
align-items: flex-end;
|
|
766
|
-
padding: 0 ${
|
|
768
|
+
padding: 0 ${Ii.horizontalSpacing} ${Ii.verticalSpacing} ${Ii.horizontalSpacing};
|
|
767
769
|
}
|
|
768
770
|
|
|
769
771
|
.ft-text-field--prefix {
|
|
770
|
-
color: ${
|
|
772
|
+
color: ${Ii.prefixColor};
|
|
771
773
|
margin-right: 2px;
|
|
772
774
|
flex-shrink: 1;
|
|
773
775
|
overflow: hidden;
|
|
@@ -786,15 +788,15 @@ const Ai={fontSize:mt.create("--ft-text-field-font-size","SIZE","14px"),labelSiz
|
|
|
786
788
|
flex-shrink: 1;
|
|
787
789
|
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
788
790
|
|
|
789
|
-
color: ${
|
|
790
|
-
padding: calc(2 * ${
|
|
791
|
+
color: ${Ii.colorOnSurface};
|
|
792
|
+
padding: calc(2 * ${Ii.verticalSpacing}) 0;
|
|
791
793
|
border: none;
|
|
792
794
|
background: none;
|
|
793
795
|
}
|
|
794
796
|
|
|
795
797
|
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input {
|
|
796
798
|
padding-bottom: 0;
|
|
797
|
-
padding-top: calc(${
|
|
799
|
+
padding-top: calc(${Ii.labelSize} + 2 * ${Ii.verticalSpacing});
|
|
798
800
|
}
|
|
799
801
|
|
|
800
802
|
.ft-text-field--input::-webkit-calendar-picker-indicator,
|
|
@@ -803,37 +805,37 @@ const Ai={fontSize:mt.create("--ft-text-field-font-size","SIZE","14px"),labelSiz
|
|
|
803
805
|
}
|
|
804
806
|
|
|
805
807
|
.ft-text-field--disabled .ft-text-field--input {
|
|
806
|
-
color: ${
|
|
808
|
+
color: ${Ii.colorOnSurfaceDisabled};
|
|
807
809
|
}
|
|
808
810
|
|
|
809
811
|
.ft-text-field:not(.ft-text-field--disabled):focus-within ft-input-label {
|
|
810
|
-
${$t(pi.borderColor,
|
|
811
|
-
${$t(pi.textColor,
|
|
812
|
+
${$t(pi.borderColor,Ii.colorPrimary)};
|
|
813
|
+
${$t(pi.textColor,Ii.colorPrimary)};
|
|
812
814
|
}
|
|
813
815
|
|
|
814
816
|
.ft-text-field--filled .ft-text-field--input-panel {
|
|
815
|
-
border-radius: ${
|
|
817
|
+
border-radius: ${Ii.borderRadiusS} ${Ii.borderRadiusS} 0 0;
|
|
816
818
|
}
|
|
817
819
|
|
|
818
820
|
.ft-text-field--outlined .ft-text-field--input-panel {
|
|
819
|
-
border-radius: ${
|
|
821
|
+
border-radius: ${Ii.borderRadiusS};
|
|
820
822
|
}
|
|
821
823
|
|
|
822
824
|
.ft-text-field--helper-text {
|
|
823
|
-
padding: 0 12px 0 ${
|
|
824
|
-
color: ${
|
|
825
|
+
padding: 0 12px 0 ${Ii.horizontalSpacing};
|
|
826
|
+
color: ${Ii.helperColor};
|
|
825
827
|
}
|
|
826
828
|
|
|
827
829
|
.ft-text-field--in-error .ft-text-field--input,
|
|
828
830
|
.ft-text-field--in-error .ft-text-field--helper-text,
|
|
829
831
|
.ft-text-field--in-error .ft-text-field--prefix {
|
|
830
|
-
color: ${
|
|
832
|
+
color: ${Ii.colorError};
|
|
831
833
|
}
|
|
832
834
|
|
|
833
835
|
.ft-text-field--icon {
|
|
834
836
|
align-self: center;
|
|
835
837
|
margin-left: 8px;
|
|
836
|
-
color: ${
|
|
838
|
+
color: ${Ii.iconColor};
|
|
837
839
|
}
|
|
838
840
|
|
|
839
841
|
.ft-text-field--container {
|
|
@@ -846,13 +848,13 @@ const Ai={fontSize:mt.create("--ft-text-field-font-size","SIZE","14px"),labelSiz
|
|
|
846
848
|
position: absolute;
|
|
847
849
|
left: 0;
|
|
848
850
|
right: 0;
|
|
849
|
-
z-index: ${
|
|
850
|
-
background: ${
|
|
851
|
-
border: 1px solid ${
|
|
852
|
-
border-radius: 0 0 ${
|
|
853
|
-
box-shadow: ${
|
|
851
|
+
z-index: ${Ii.floatingZIndex};
|
|
852
|
+
background: ${Ii.colorSurface};
|
|
853
|
+
border: 1px solid ${Ii.colorOutline};
|
|
854
|
+
border-radius: 0 0 ${Ii.borderRadiusS} ${Ii.borderRadiusS};
|
|
855
|
+
box-shadow: ${Ii.elevation02};
|
|
854
856
|
outline: none;
|
|
855
|
-
max-height: ${
|
|
857
|
+
max-height: ${Ii.suggestSize};
|
|
856
858
|
overflow-y: auto;
|
|
857
859
|
}
|
|
858
860
|
|
|
@@ -871,7 +873,7 @@ const Ai={fontSize:mt.create("--ft-text-field-font-size","SIZE","14px"),labelSiz
|
|
|
871
873
|
.ft-text-field--with-icon {
|
|
872
874
|
${$t(pi.labelMaxWidth,`calc(100% - ${Ci.size} - ${pi.horizontalSpacing})`)};
|
|
873
875
|
}
|
|
874
|
-
`;var Pi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Li extends Rt{constructor(){super(...arguments),this._value="",this.dispatchedValue="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.filterSuggestions=!1,this.focused=!1,this.suggestionsOnTop=!1,this.hideSuggestions=!1,this.visibleSuggestions=[]}get value(){return this._value}set value(t){this.setInternalValue(t),this.dispatchedValue=t}setInternalValue(t){const e=this._value;this._value=t,this.requestUpdate("value",e)}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":this.error,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":0===this.visibleSuggestions.length||this.hideSuggestions,"ft-text-field--raised-label":this.focused||""!=this.value,"ft-text-field--with-icon":!!this.icon};return G`
|
|
876
|
+
`;var Pi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Li extends Rt{constructor(){super(...arguments),this._value="",this.dispatchedValue="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.filterSuggestions=!1,this.focused=!1,this.suggestionsOnTop=!1,this.hideSuggestions=!1,this.visibleSuggestions=[]}get value(){return this._value||""}set value(t){this.setInternalValue(t||""),this.dispatchedValue=t||""}setInternalValue(t){const e=this._value;this._value=t||"",this.requestUpdate("value",e)}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":this.error,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":0===this.visibleSuggestions.length||this.hideSuggestions,"ft-text-field--raised-label":this.focused||""!=this.value,"ft-text-field--with-icon":!!this.icon};return G`
|
|
875
877
|
<div class="${Xt(t)}">
|
|
876
878
|
<div class="ft-text-field--main-panel"
|
|
877
879
|
@keydown=${this.handleKeyboardNavigation}
|
|
@@ -917,7 +919,7 @@ const Ai={fontSize:mt.create("--ft-text-field-font-size","SIZE","14px"),labelSiz
|
|
|
917
919
|
</ft-typography>
|
|
918
920
|
`:tt}
|
|
919
921
|
</div>
|
|
920
|
-
`}updated(t){super.updated(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),o=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&o&&(this.suggestionsOnTop=t.bottom+o.height>window.innerHeight&&t.top-o.height>0)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(i,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}}Li.elementDefinitions={"ft-input-label":hi,"ft-ripple":Ei,"ft-typography":ci,"ft-icon":Mi},Li.styles=[ei,
|
|
922
|
+
`}updated(t){super.updated(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),o=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&o&&(this.suggestionsOnTop=t.bottom+o.height>window.innerHeight&&t.top-o.height>0)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(i,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}}Li.elementDefinitions={"ft-input-label":hi,"ft-ripple":Ei,"ft-typography":ci,"ft-icon":Mi},Li.styles=[ei,Ai],Pi([o()],Li.prototype,"label",void 0),Pi([o({noAccessor:!0})],Li.prototype,"value",null),Pi([s()],Li.prototype,"dispatchedValue",void 0),Pi([o()],Li.prototype,"helper",void 0),Pi([o({type:Boolean})],Li.prototype,"outlined",void 0),Pi([o({type:Boolean})],Li.prototype,"disabled",void 0),Pi([o({type:Boolean})],Li.prototype,"error",void 0),Pi([o()],Li.prototype,"prefix",void 0),Pi([o()],Li.prototype,"icon",void 0),Pi([o()],Li.prototype,"iconVariant",void 0),Pi([o({type:Boolean})],Li.prototype,"filterSuggestions",void 0),Pi([o({type:Number})],Li.prototype,"maxLength",void 0),Pi([s()],Li.prototype,"focused",void 0),Pi([s()],Li.prototype,"suggestionsOnTop",void 0),Pi([s()],Li.prototype,"hideSuggestions",void 0),Pi([s()],Li.prototype,"visibleSuggestions",void 0),Pi([r(".ft-text-field--main-panel")],Li.prototype,"mainPanel",void 0),Pi([r(".ft-text-field--input")],Li.prototype,"input",void 0),Pi([r(".ft-text-field--suggestions")],Li.prototype,"suggestionsContainer",void 0),Pi([c({selector:"ft-text-field-suggestion"})],Li.prototype,"suggestions",void 0);const Ti=y`
|
|
921
923
|
.ft-text-field-suggestion {
|
|
922
924
|
position: relative;
|
|
923
925
|
padding: 8px 16px;
|
|
@@ -1080,7 +1082,7 @@ const Ai={fontSize:mt.create("--ft-text-field-font-size","SIZE","14px"),labelSiz
|
|
|
1080
1082
|
<div></div>
|
|
1081
1083
|
<div></div>
|
|
1082
1084
|
</div>
|
|
1083
|
-
`}}io.styles=eo,f("ft-loader")(io);const oo=mt.extend("--ft-button-color",wt.colorPrimary),so={backgroundColor:mt.extend("--ft-button-background-color",wt.colorSurface),borderRadius:mt.extend("--ft-button-border-radius",wt.borderRadiusL),color:oo,fontSize:mt.extend("--ft-button-font-size",Xe.fontSize),iconSize:mt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:mt.extend("--ft-button-ripple-color",oo),verticalPadding:mt.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:mt.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:mt.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:mt.external(wt.colorOpacityDisabled,"Design system")},no=mt.extend("--ft-button-primary-color",mt.extend("--ft-button-color",wt.colorOnPrimary)),ro={backgroundColor:mt.extend("--ft-button-primary-background-color",mt.extend("--ft-button-background-color",wt.colorPrimary)),color:no,rippleColor:mt.extend("--ft-button-primary-ripple-color",no)},lo=mt.extend("--ft-button-dense-border-radius",mt.extend("--ft-button-border-radius",wt.borderRadiusM)),ao=mt.create("--ft-button-dense-vertical-padding","SIZE","2px"),co=mt.create("--ft-button-dense-horizontal-padding","SIZE","4px"),po=mt.create("--ft-button-dense-icon-padding","SIZE","4px"),fo=[
|
|
1085
|
+
`}}io.styles=eo,f("ft-loader")(io);const oo=mt.extend("--ft-button-color",wt.colorPrimary),so={backgroundColor:mt.extend("--ft-button-background-color",wt.colorSurface),borderRadius:mt.extend("--ft-button-border-radius",wt.borderRadiusL),color:oo,fontSize:mt.extend("--ft-button-font-size",Xe.fontSize),iconSize:mt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:mt.extend("--ft-button-ripple-color",oo),verticalPadding:mt.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:mt.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:mt.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:mt.external(wt.colorOpacityDisabled,"Design system")},no=mt.extend("--ft-button-primary-color",mt.extend("--ft-button-color",wt.colorOnPrimary)),ro={backgroundColor:mt.extend("--ft-button-primary-background-color",mt.extend("--ft-button-background-color",wt.colorPrimary)),color:no,rippleColor:mt.extend("--ft-button-primary-ripple-color",no)},lo=mt.extend("--ft-button-dense-border-radius",mt.extend("--ft-button-border-radius",wt.borderRadiusM)),ao=mt.create("--ft-button-dense-vertical-padding","SIZE","2px"),co=mt.create("--ft-button-dense-horizontal-padding","SIZE","4px"),po=mt.create("--ft-button-dense-icon-padding","SIZE","4px"),fo=[y`
|
|
1084
1086
|
:host {
|
|
1085
1087
|
display: inline-block;
|
|
1086
1088
|
max-width: 100%;
|
|
@@ -1120,11 +1122,10 @@ const Ai={fontSize:mt.create("--ft-text-field-font-size","SIZE","14px"),labelSiz
|
|
|
1120
1122
|
border: none;
|
|
1121
1123
|
pointer-events: auto;
|
|
1122
1124
|
|
|
1123
|
-
--ft-button-internal-line-height: calc(${so.fontSize} + 2px);
|
|
1125
|
+
--ft-button-internal-line-height: max(calc(${so.fontSize} + 2px), ${so.iconSize});
|
|
1124
1126
|
--ft-button-internal-color: ${so.color};
|
|
1125
1127
|
${$t(Ci.size,so.iconSize)};
|
|
1126
1128
|
${$t(vi.color,so.rippleColor)};
|
|
1127
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${so.iconSize});
|
|
1128
1129
|
|
|
1129
1130
|
border-radius: ${so.borderRadius};
|
|
1130
1131
|
padding: ${so.verticalPadding} ${so.horizontalPadding};
|
|
@@ -1153,11 +1154,11 @@ const Ai={fontSize:mt.create("--ft-text-field-font-size","SIZE","14px"),labelSiz
|
|
|
1153
1154
|
}
|
|
1154
1155
|
|
|
1155
1156
|
.ft-button--round {
|
|
1156
|
-
border-radius: calc(var(--ft-button-internal-
|
|
1157
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${so.verticalPadding});
|
|
1157
1158
|
}
|
|
1158
1159
|
|
|
1159
1160
|
.ft-button--round.ft-button--dense {
|
|
1160
|
-
border-radius: calc(var(--ft-button-internal-
|
|
1161
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${ao});
|
|
1161
1162
|
}
|
|
1162
1163
|
|
|
1163
1164
|
.ft-button[disabled] {
|
|
@@ -1183,7 +1184,7 @@ const Ai={fontSize:mt.create("--ft-text-field-font-size","SIZE","14px"),labelSiz
|
|
|
1183
1184
|
display: block;
|
|
1184
1185
|
margin: 0 ${so.iconPadding};
|
|
1185
1186
|
${$t(Xe.fontSize,"1em")};
|
|
1186
|
-
${$t(Xe.lineHeight,"var(--ft-button-internal-
|
|
1187
|
+
${$t(Xe.lineHeight,"var(--ft-button-internal-line-height)")};
|
|
1187
1188
|
}
|
|
1188
1189
|
|
|
1189
1190
|
.ft-button--dense .ft-button--label {
|
|
@@ -1218,7 +1219,7 @@ const Ai={fontSize:mt.create("--ft-text-field-font-size","SIZE","14px"),labelSiz
|
|
|
1218
1219
|
${$t(to.size,so.iconSize)};
|
|
1219
1220
|
${$t(to.color,"var(--ft-button-internal-color)")};
|
|
1220
1221
|
}
|
|
1221
|
-
|
|
1222
|
+
`,zt];var ho=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class uo extends Rt{constructor(){super(...arguments),this.role="button",this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(G`
|
|
1222
1223
|
<button part="button"
|
|
1223
1224
|
class="${Xt(t)}"
|
|
1224
1225
|
aria-label="${this.getLabel()}"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-filterable-table",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "A dynamic table with filters",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@fluid-topics/ft-button": "1.0.0
|
|
26
|
-
"@fluid-topics/ft-select": "1.0.0
|
|
27
|
-
"@fluid-topics/ft-text-field": "1.0.0
|
|
28
|
-
"@fluid-topics/ft-wc-utils": "1.0.0
|
|
25
|
+
"@fluid-topics/ft-button": "1.0.0",
|
|
26
|
+
"@fluid-topics/ft-select": "1.0.0",
|
|
27
|
+
"@fluid-topics/ft-text-field": "1.0.0",
|
|
28
|
+
"@fluid-topics/ft-wc-utils": "1.0.0",
|
|
29
29
|
"lit": "2.7.2"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "90895771e0ea740f1a0d972b9fd3796051757255"
|
|
32
32
|
}
|