@fluid-topics/ft-filter 0.3.67 → 0.3.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-filter.light.js +122 -111
- package/build/ft-filter.min.js +89 -78
- package/package.json +10 -10
package/build/ft-filter.min.js
CHANGED
|
@@ -66,7 +66,7 @@ var l;const a=null!=(null===(l=window.HTMLSlotElement)||void 0===l?void 0:l.prot
|
|
|
66
66
|
* Copyright 2017 Google LLC
|
|
67
67
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
68
68
|
*/
|
|
69
|
-
var R;M.finalized=!0,M.elementProperties=new Map,M.elementStyles=[],M.shadowRootOptions={mode:"open"},null==C||C({ReactiveElement:M}),(null!==(w=k.reactiveElementVersions)&&void 0!==w?w:k.reactiveElementVersions=[]).push("1.4.1");const j=window,B=j.trustedTypes,F=B?B.createPolicy("lit-html",{createHTML:t=>t}):void 0,U=`lit$${(Math.random()+"").slice(9)}$`,L="?"+U,D=`<${L}>`,A=document,T=(t="")=>A.createComment(t),P=t=>null===t||"object"!=typeof t&&"function"!=typeof t,
|
|
69
|
+
var R;M.finalized=!0,M.elementProperties=new Map,M.elementStyles=[],M.shadowRootOptions={mode:"open"},null==C||C({ReactiveElement:M}),(null!==(w=k.reactiveElementVersions)&&void 0!==w?w:k.reactiveElementVersions=[]).push("1.4.1");const j=window,B=j.trustedTypes,F=B?B.createPolicy("lit-html",{createHTML:t=>t}):void 0,U=`lit$${(Math.random()+"").slice(9)}$`,L="?"+U,D=`<${L}>`,A=document,T=(t="")=>A.createComment(t),P=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,_=t=>I(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,H=/-->/g,K=/>/g,V=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),Z=/'/g,J=/"/g,q=/^(?:script|style|textarea|title)$/i,X=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),Y=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),Q=new WeakMap,tt=A.createTreeWalker(A,129,null,!1),et=(t,e)=>{const i=t.length-1,o=[];let s,r=2===e?"<svg>":"",n=W;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,c=0;for(;c<i.length&&(n.lastIndex=c,a=n.exec(i),null!==a);)c=n.lastIndex,n===W?"!--"===a[1]?n=H:void 0!==a[1]?n=K:void 0!==a[2]?(q.test(a[2])&&(s=RegExp("</"+a[2],"g")),n=V):void 0!==a[3]&&(n=V):n===V?">"===a[0]?(n=null!=s?s:W,h=-1):void 0===a[1]?h=-2:(h=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?V:'"'===a[3]?J:Z):n===J||n===Z?n=V:n===H||n===K?n=W:(n=V,s=void 0);const p=n===V&&t[e+1].startsWith("/>")?" ":"";r+=n===W?i+D:h>=0?(o.push(l),i.slice(0,h)+"$lit$"+i.slice(h)+U+p):i+U+(-2===h?(o.push(void 0),e):p)}const l=r+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==F?F.createHTML(l):l,o]};class it{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,r=0;const n=t.length-1,l=this.parts,[a,h]=et(t,e);if(this.el=it.createElement(a,i),tt.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=tt.nextNode())&&l.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(U)){const i=h[r++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(U),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?lt:"?"===e[1]?ht:"@"===e[1]?ct:nt})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(q.test(o.tagName)){const t=o.textContent.split(U),e=t.length-1;if(e>0){o.textContent=B?B.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],T()),tt.nextNode(),l.push({type:2,index:++s});o.append(t[e],T())}}}else if(8===o.nodeType)if(o.data===L)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(U,t+1));)l.push({type:7,index:s}),t+=U.length-1}s++}}static createElement(t,e){const i=A.createElement("template");return i.innerHTML=t,i}}function ot(t,e,i=t,o){var s,r,n,l;if(e===Y)return e;let a=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const h=P(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,i,o)),void 0!==o?(null!==(n=(l=i)._$Co)&&void 0!==n?n:l._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=ot(t,a._$AS(t,e.values),a,o)),e}class st{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:A).importNode(i,!0);tt.currentNode=s;let r=tt.nextNode(),n=0,l=0,a=o[0];for(;void 0!==a;){if(n===a.index){let e;2===a.type?e=new rt(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new pt(r,this,t)),this.u.push(e),a=o[++l]}n!==(null==a?void 0:a.index)&&(r=tt.nextNode(),n++)}return s}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class rt{constructor(t,e,i,o){var s;this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=ot(this,t,e),P(t)?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==Y&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):_(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==G&&P(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=it.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.p(i);else{const t=new st(s,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=Q.get(t.strings);return void 0===e&&Q.set(t.strings,e=new it(t)),e}k(t){I(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 rt(this.O(T()),this.O(T()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class nt{constructor(t,e,i,o,s){this.type=1,this._$AH=G,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=G}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let r=!1;if(void 0===s)t=ot(this,t,e,0),r=!P(t)||t!==this._$AH&&t!==Y,r&&(this._$AH=t);else{const o=t;let n,l;for(t=s[0],n=0;n<s.length-1;n++)l=ot(this,o[i+n],e,n),l===Y&&(l=this._$AH[n]),r||(r=!P(l)||l!==this._$AH[n]),l===G?t=G:t!==G&&(t+=(null!=l?l:"")+s[n+1]),this._$AH[n]=l}r&&!o&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class lt extends nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}}const at=B?B.emptyScript:"";class ht extends nt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==G?this.element.setAttribute(this.name,at):this.element.removeAttribute(this.name)}}class ct extends nt{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=ot(this,t,e,0))&&void 0!==i?i:G)===Y)return;const o=this._$AH,s=t===G&&o!==G||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==G&&(o===G||s);s&&this.element.removeEventListener(this.name,this,o),r&&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 pt{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){ot(this,t)}}const dt={P:"$lit$",A:U,M:L,C:1,L:et,R:st,D:_,V:ot,I:rt,H:nt,N:ht,U:ct,B:lt,F:pt},ft=j.litHtmlPolyfillSupport;null==ft||ft(it,rt),(null!==(R=j.litHtmlVersions)&&void 0!==R?R:j.litHtmlVersions=[]).push("2.4.0");
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
|
72
72
|
* Copyright 2017 Google LLC
|
|
@@ -119,13 +119,13 @@ var ut,vt;class bt extends M{constructor(){super(...arguments),this.renderOption
|
|
|
119
119
|
* @license
|
|
120
120
|
* Copyright 2020 Google LLC
|
|
121
121
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
122
|
-
*/var Ft;!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"}(Ft||(Ft={}));const Ut=yt.extend("--ft-typography-font-family",mt.titleFont),Lt=yt.extend("--ft-typography-font-family",mt.contentFont),Dt={fontFamily:Lt,fontSize:yt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:yt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:yt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:yt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:yt.create("--ft-typography-text-transform","UNKNOWN","inherit")},At=yt.extend("--ft-typography-title-font-family",Ut),Tt=yt.extend("--ft-typography-title-font-size",Dt.fontSize,"20px"),Pt=yt.extend("--ft-typography-title-font-weight",Dt.fontWeight,"normal"),
|
|
122
|
+
*/var Ft;!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"}(Ft||(Ft={}));const Ut=yt.extend("--ft-typography-font-family",mt.titleFont),Lt=yt.extend("--ft-typography-font-family",mt.contentFont),Dt={fontFamily:Lt,fontSize:yt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:yt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:yt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:yt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:yt.create("--ft-typography-text-transform","UNKNOWN","inherit")},At=yt.extend("--ft-typography-title-font-family",Ut),Tt=yt.extend("--ft-typography-title-font-size",Dt.fontSize,"20px"),Pt=yt.extend("--ft-typography-title-font-weight",Dt.fontWeight,"normal"),It=yt.extend("--ft-typography-title-letter-spacing",Dt.letterSpacing,"0.15px"),_t=yt.extend("--ft-typography-title-line-height",Dt.lineHeight,"1.2"),Wt=yt.extend("--ft-typography-title-text-transform",Dt.textTransform,"inherit"),Ht=yt.extend("--ft-typography-title-dense-font-family",Ut),Kt=yt.extend("--ft-typography-title-dense-font-size",Dt.fontSize,"14px"),Vt=yt.extend("--ft-typography-title-dense-font-weight",Dt.fontWeight,"normal"),Zt=yt.extend("--ft-typography-title-dense-letter-spacing",Dt.letterSpacing,"0.105px"),Jt=yt.extend("--ft-typography-title-dense-line-height",Dt.lineHeight,"1.7"),qt=yt.extend("--ft-typography-title-dense-text-transform",Dt.textTransform,"inherit"),Xt=yt.extend("--ft-typography-subtitle1-font-family",Lt),Yt=yt.extend("--ft-typography-subtitle1-font-size",Dt.fontSize,"16px"),Gt=yt.extend("--ft-typography-subtitle1-font-weight",Dt.fontWeight,"600"),Qt=yt.extend("--ft-typography-subtitle1-letter-spacing",Dt.letterSpacing,"0.144px"),te=yt.extend("--ft-typography-subtitle1-line-height",Dt.lineHeight,"1.5"),ee=yt.extend("--ft-typography-subtitle1-text-transform",Dt.textTransform,"inherit"),ie=yt.extend("--ft-typography-subtitle2-font-family",Lt),oe=yt.extend("--ft-typography-subtitle2-font-size",Dt.fontSize,"14px"),se=yt.extend("--ft-typography-subtitle2-font-weight",Dt.fontWeight,"normal"),re=yt.extend("--ft-typography-subtitle2-letter-spacing",Dt.letterSpacing,"0.098px"),ne=yt.extend("--ft-typography-subtitle2-line-height",Dt.lineHeight,"1.7"),le=yt.extend("--ft-typography-subtitle2-text-transform",Dt.textTransform,"inherit"),ae=yt.extend("--ft-typography-body1-font-family",Lt),he=yt.extend("--ft-typography-body1-font-size",Dt.fontSize,"16px"),ce=yt.extend("--ft-typography-body1-font-weight",Dt.fontWeight,"normal"),pe=yt.extend("--ft-typography-body1-letter-spacing",Dt.letterSpacing,"0.496px"),de=yt.extend("--ft-typography-body1-line-height",Dt.lineHeight,"1.5"),fe=yt.extend("--ft-typography-body1-text-transform",Dt.textTransform,"inherit"),ue={fontFamily:yt.extend("--ft-typography-body2-font-family",Lt),fontSize:yt.extend("--ft-typography-body2-font-size",Dt.fontSize,"14px"),fontWeight:yt.extend("--ft-typography-body2-font-weight",Dt.fontWeight,"normal"),letterSpacing:yt.extend("--ft-typography-body2-letter-spacing",Dt.letterSpacing,"0.252px"),lineHeight:yt.extend("--ft-typography-body2-line-height",Dt.lineHeight,"1.4"),textTransform:yt.extend("--ft-typography-body2-text-transform",Dt.textTransform,"inherit")},ve=yt.extend("--ft-typography-caption-font-family",Lt),be=yt.extend("--ft-typography-caption-font-size",Dt.fontSize,"12px"),xe=yt.extend("--ft-typography-caption-font-weight",Dt.fontWeight,"normal"),ye=yt.extend("--ft-typography-caption-letter-spacing",Dt.letterSpacing,"0.396px"),ge=yt.extend("--ft-typography-caption-line-height",Dt.lineHeight,"1.33"),me=yt.extend("--ft-typography-caption-text-transform",Dt.textTransform,"inherit"),$e=yt.extend("--ft-typography-breadcrumb-font-family",Lt),we=yt.extend("--ft-typography-breadcrumb-font-size",Dt.fontSize,"10px"),ke=yt.extend("--ft-typography-breadcrumb-font-weight",Dt.fontWeight,"normal"),Oe=yt.extend("--ft-typography-breadcrumb-letter-spacing",Dt.letterSpacing,"0.33px"),Se=yt.extend("--ft-typography-breadcrumb-line-height",Dt.lineHeight,"1.6"),Ce=yt.extend("--ft-typography-breadcrumb-text-transform",Dt.textTransform,"inherit"),Ee=yt.extend("--ft-typography-overline-font-family",Lt),Ne=yt.extend("--ft-typography-overline-font-size",Dt.fontSize,"10px"),ze=yt.extend("--ft-typography-overline-font-weight",Dt.fontWeight,"normal"),Me=yt.extend("--ft-typography-overline-letter-spacing",Dt.letterSpacing,"1.5px"),Re=yt.extend("--ft-typography-overline-line-height",Dt.lineHeight,"1.6"),je=yt.extend("--ft-typography-overline-text-transform",Dt.textTransform,"uppercase"),Be={fontFamily:yt.extend("--ft-typography-button-font-family",Lt),fontSize:yt.extend("--ft-typography-button-font-size",Dt.fontSize,"14px"),fontWeight:yt.extend("--ft-typography-button-font-weight",Dt.fontWeight,"600"),letterSpacing:yt.extend("--ft-typography-button-letter-spacing",Dt.letterSpacing,"1.246px"),lineHeight:yt.extend("--ft-typography-button-line-height",Dt.lineHeight,"1.15"),textTransform:yt.extend("--ft-typography-button-text-transform",Dt.textTransform,"uppercase")},Fe=g`
|
|
123
123
|
.ft-typography--title {
|
|
124
124
|
font-family: ${At};
|
|
125
125
|
font-size: ${Tt};
|
|
126
126
|
font-weight: ${Pt};
|
|
127
|
-
letter-spacing: ${
|
|
128
|
-
line-height: ${
|
|
127
|
+
letter-spacing: ${It};
|
|
128
|
+
line-height: ${_t};
|
|
129
129
|
text-transform: ${Wt};
|
|
130
130
|
}
|
|
131
131
|
`,Ue=g`
|
|
@@ -183,7 +183,7 @@ var ut,vt;class bt extends M{constructor(){super(...arguments),this.renderOption
|
|
|
183
183
|
line-height: ${ge};
|
|
184
184
|
text-transform: ${me};
|
|
185
185
|
}
|
|
186
|
-
`,
|
|
186
|
+
`,Ie=g`
|
|
187
187
|
.ft-typography--breadcrumb {
|
|
188
188
|
font-family: ${$e};
|
|
189
189
|
font-size: ${we};
|
|
@@ -192,7 +192,7 @@ var ut,vt;class bt extends M{constructor(){super(...arguments),this.renderOption
|
|
|
192
192
|
line-height: ${Se};
|
|
193
193
|
text-transform: ${Ce};
|
|
194
194
|
}
|
|
195
|
-
`,
|
|
195
|
+
`,_e=g`
|
|
196
196
|
.ft-typography--overline {
|
|
197
197
|
font-family: ${Ee};
|
|
198
198
|
font-size: ${Ne};
|
|
@@ -226,7 +226,7 @@ var ut,vt;class bt extends M{constructor(){super(...arguments),this.renderOption
|
|
|
226
226
|
* @license
|
|
227
227
|
* Copyright 2017 Google LLC
|
|
228
228
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
229
|
-
*/Ve.styles=[Fe,Ue,Le,De,Ae,Te,Pe,_e,
|
|
229
|
+
*/Ve.styles=[Fe,Ue,Le,De,Ae,Te,Pe,Ie,_e,We,He],Ke([o()],Ve.prototype,"element",void 0),Ke([o()],Ve.prototype,"variant",void 0),p("ft-typography")(Ve);const Je=1,qe=2,Xe=t=>(...e)=>({_$litDirective$:t,values:e});class Ye{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
230
230
|
/**
|
|
231
231
|
* @license
|
|
232
232
|
* Copyright 2020 Google LLC
|
|
@@ -526,7 +526,7 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
526
526
|
${Ri(this.resolvedIcon)}
|
|
527
527
|
<slot ?hidden=${i}></slot>
|
|
528
528
|
</i>
|
|
529
|
-
`}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 i=this.value||this.textContent;switch(this.variant){case Li.file_format:this.resolvedIcon=null!==(t=Bi[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case Li.material:this.resolvedIcon=this.value||G;break;default:this.resolvedIcon=null!==(e=ji[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ai.elementDefinitions={},Ai.styles=Ui,Di([o()],Ai.prototype,"variant",void 0),Di([o()],Ai.prototype,"value",void 0),Di([s()],Ai.prototype,"resolvedIcon",void 0),Di([n("slot")],Ai.prototype,"slottedContent",void 0),p("ft-icon")(Ai);const Ti=yt.extend("--ft-button-color",mt.colorPrimary),Pi={backgroundColor:yt.extend("--ft-button-background-color",mt.colorSurface),borderRadius:yt.extend("--ft-button-border-radius",mt.borderRadiusL),color:Ti,fontSize:yt.extend("--ft-button-font-size",Be.fontSize),iconSize:yt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:yt.extend("--ft-button-ripple-color",Ti),verticalPadding:yt.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:yt.create("--ft-button-horizontal-padding","SIZE","8px"),opacityDisabled:yt.external(mt.colorOpacityDisabled,"Design system")},
|
|
529
|
+
`}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 i=this.value||this.textContent;switch(this.variant){case Li.file_format:this.resolvedIcon=null!==(t=Bi[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case Li.material:this.resolvedIcon=this.value||G;break;default:this.resolvedIcon=null!==(e=ji[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ai.elementDefinitions={},Ai.styles=Ui,Di([o()],Ai.prototype,"variant",void 0),Di([o()],Ai.prototype,"value",void 0),Di([s()],Ai.prototype,"resolvedIcon",void 0),Di([n("slot")],Ai.prototype,"slottedContent",void 0),p("ft-icon")(Ai);const Ti=yt.extend("--ft-button-color",mt.colorPrimary),Pi={backgroundColor:yt.extend("--ft-button-background-color",mt.colorSurface),borderRadius:yt.extend("--ft-button-border-radius",mt.borderRadiusL),color:Ti,fontSize:yt.extend("--ft-button-font-size",Be.fontSize),iconSize:yt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:yt.extend("--ft-button-ripple-color",Ti),verticalPadding:yt.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:yt.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:yt.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:yt.external(mt.colorOpacityDisabled,"Design system")},Ii=yt.extend("--ft-button-primary-color",yt.extend("--ft-button-color",mt.colorOnPrimary)),_i={backgroundColor:yt.extend("--ft-button-primary-background-color",yt.extend("--ft-button-background-color",mt.colorPrimary)),color:Ii,rippleColor:yt.extend("--ft-button-primary-ripple-color",Ii)},Wi=yt.extend("--ft-button-dense-border-radius",yt.extend("--ft-button-border-radius",mt.borderRadiusM)),Hi=yt.create("--ft-button-dense-vertical-padding","SIZE","2px"),Ki=yt.create("--ft-button-dense-horizontal-padding","SIZE","4px"),Vi=yt.create("--ft-button-dense-icon-padding","SIZE","4px"),Zi=[kt,g`
|
|
530
530
|
:host {
|
|
531
531
|
display: inline-block;
|
|
532
532
|
max-width: 100%;
|
|
@@ -565,12 +565,11 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
565
565
|
box-sizing: border-box;
|
|
566
566
|
border: none;
|
|
567
567
|
pointer-events: auto;
|
|
568
|
+
gap: ${Pi.iconPadding};
|
|
568
569
|
|
|
569
570
|
--ft-button-internal-line-height: calc(${Pi.fontSize} + 2px);
|
|
570
571
|
--ft-button-internal-color: ${Pi.color};
|
|
571
572
|
${gt(Fi.size,Pi.iconSize)};
|
|
572
|
-
--ft-button-internal-vertical-padding: 6px;
|
|
573
|
-
--ft-button-internal-horizontal-padding: 8px;
|
|
574
573
|
${gt(ai.color,Pi.rippleColor)};
|
|
575
574
|
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Pi.iconSize});
|
|
576
575
|
|
|
@@ -581,18 +580,31 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
581
580
|
-webkit-mask-image: radial-gradient(white, black);
|
|
582
581
|
}
|
|
583
582
|
|
|
583
|
+
.ft-button.ft-button--outlined {
|
|
584
|
+
border: 1px solid var(--ft-button-internal-color);
|
|
585
|
+
padding: calc(${Pi.verticalPadding} - 1px) calc(${Pi.horizontalPadding} - 1px);
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
.ft-button.ft-button--dense {
|
|
589
|
+
padding: ${Hi} ${Ki};
|
|
590
|
+
border-radius: ${Wi};
|
|
591
|
+
gap: ${Vi};
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
.ft-button.ft-button--dense.ft-button--outlined {
|
|
595
|
+
padding: calc(${Hi} - 1px) calc(${Ki} - 1px);
|
|
596
|
+
}
|
|
597
|
+
|
|
584
598
|
.ft-button:not([disabled]):hover {
|
|
585
599
|
cursor: pointer;
|
|
586
600
|
}
|
|
587
601
|
|
|
588
|
-
.ft-button--
|
|
589
|
-
--ft-button-internal-
|
|
590
|
-
--ft-button-internal-horizontal-padding: 4px;
|
|
591
|
-
border-radius: ${Wi};
|
|
602
|
+
.ft-button--round {
|
|
603
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + ${Pi.verticalPadding});
|
|
592
604
|
}
|
|
593
605
|
|
|
594
|
-
.ft-button--round {
|
|
595
|
-
border-radius: calc(var(--ft-button-internal-content-height) / 2 +
|
|
606
|
+
.ft-button--round.ft-button--dense {
|
|
607
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + ${Hi});
|
|
596
608
|
}
|
|
597
609
|
|
|
598
610
|
.ft-button[disabled] {
|
|
@@ -601,14 +613,9 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
601
613
|
}
|
|
602
614
|
|
|
603
615
|
.ft-button.ft-button--primary {
|
|
604
|
-
background-color: ${
|
|
605
|
-
--ft-button-internal-color: ${
|
|
606
|
-
${gt(ai.color,
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
.ft-button.ft-button--outlined {
|
|
610
|
-
border: 1px solid var(--ft-button-internal-color);
|
|
611
|
-
padding: calc(${Pi.verticalPadding} - 1px) calc(${Pi.horizontalPadding} - 1px);
|
|
616
|
+
background-color: ${_i.backgroundColor};
|
|
617
|
+
--ft-button-internal-color: ${_i.color};
|
|
618
|
+
${gt(ai.color,_i.rippleColor)};
|
|
612
619
|
}
|
|
613
620
|
|
|
614
621
|
.ft-button:focus {
|
|
@@ -621,7 +628,6 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
621
628
|
white-space: nowrap;
|
|
622
629
|
text-overflow: ellipsis;
|
|
623
630
|
display: block;
|
|
624
|
-
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
625
631
|
${gt(Be.fontSize,"1em")};
|
|
626
632
|
${gt(Be.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
627
633
|
}
|
|
@@ -636,8 +642,13 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
636
642
|
}
|
|
637
643
|
|
|
638
644
|
.ft-button--label[hidden] + ft-icon {
|
|
639
|
-
margin: 0 calc(
|
|
640
|
-
padding: 0
|
|
645
|
+
margin: 0 calc(${Pi.horizontalPadding} * -1);
|
|
646
|
+
padding: 0 ${Pi.verticalPadding};
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
650
|
+
margin: 0 calc(${Ki} * -1);
|
|
651
|
+
padding: 0 ${Hi};
|
|
641
652
|
}
|
|
642
653
|
|
|
643
654
|
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
@@ -649,7 +660,7 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
649
660
|
${gt(Ei.size,Pi.iconSize)};
|
|
650
661
|
${gt(Ei.color,"var(--ft-button-internal-color)")};
|
|
651
662
|
}
|
|
652
|
-
`];var
|
|
663
|
+
`];var Ji=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class qi extends wt{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.iconVariant=Li.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(X`
|
|
653
664
|
<button part="button"
|
|
654
665
|
class="${ni(t)}"
|
|
655
666
|
aria-label="${this.getLabel()}"
|
|
@@ -672,14 +683,14 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
672
683
|
</ft-tooltip>
|
|
673
684
|
`:t}resolveIcon(){return this.loading?X`
|
|
674
685
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?X`
|
|
675
|
-
<ft-icon part="icon" variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:G}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}}
|
|
686
|
+
<ft-icon part="icon" variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:G}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}}qi.elementDefinitions={"ft-ripple":xi,"ft-tooltip":Ci,"ft-typography":Ve,"ft-icon":Ai,"ft-loader":zi},qi.styles=[Ot,Zi],Ji([o({type:String,reflect:!0})],qi.prototype,"role",void 0),Ji([o({type:Boolean})],qi.prototype,"primary",void 0),Ji([o({type:Boolean})],qi.prototype,"outlined",void 0),Ji([o({type:Boolean})],qi.prototype,"disabled",void 0),Ji([o({type:Boolean})],qi.prototype,"dense",void 0),Ji([o({type:Boolean})],qi.prototype,"round",void 0),Ji([o({type:String})],qi.prototype,"label",void 0),Ji([o({type:String})],qi.prototype,"icon",void 0),Ji([o({type:String})],qi.prototype,"iconVariant",void 0),Ji([o({type:Boolean})],qi.prototype,"trailingIcon",void 0),Ji([o({type:Boolean})],qi.prototype,"loading",void 0),Ji([o({type:String})],qi.prototype,"tooltipPosition",void 0),Ji([o({type:Boolean})],qi.prototype,"hideTooltip",void 0),Ji([o({type:Boolean})],qi.prototype,"forceTooltip",void 0),Ji([n(".ft-button")],qi.prototype,"button",void 0),Ji([n(".ft-button--label slot")],qi.prototype,"slottedContent",void 0),p("ft-button")(qi);const Xi=yt.extend("--ft-checkbox-text-color",mt.colorOnSurfaceHigh),Yi=yt.external(mt.colorPrimary,"Design system"),Gi=yt.external(mt.colorOnPrimary,"Design system"),Qi=yt.extend("--ft-checkbox-border-color",mt.colorOnSurfaceMedium),to=yt.external(mt.colorOnSurfaceDisabled,"Design system"),eo=g`
|
|
676
687
|
* {
|
|
677
688
|
box-sizing: border-box;
|
|
678
689
|
}
|
|
679
690
|
|
|
680
691
|
.ft-checkbox {
|
|
681
692
|
box-sizing: border-box;
|
|
682
|
-
color: ${
|
|
693
|
+
color: ${Xi};
|
|
683
694
|
|
|
684
695
|
display: inline-flex;
|
|
685
696
|
align-items: center;
|
|
@@ -687,7 +698,7 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
687
698
|
}
|
|
688
699
|
|
|
689
700
|
.ft-checkbox--disabled {
|
|
690
|
-
color: ${
|
|
701
|
+
color: ${to};
|
|
691
702
|
}
|
|
692
703
|
|
|
693
704
|
input {
|
|
@@ -711,26 +722,26 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
711
722
|
|
|
712
723
|
.ft-checkbox--box {
|
|
713
724
|
display: flex;
|
|
714
|
-
border: 2px solid ${
|
|
725
|
+
border: 2px solid ${Qi};
|
|
715
726
|
border-radius: 2px;
|
|
716
727
|
|
|
717
728
|
width: 18px;
|
|
718
729
|
height: 18px;
|
|
719
730
|
|
|
720
|
-
color: ${
|
|
731
|
+
color: ${Gi};
|
|
721
732
|
}
|
|
722
733
|
|
|
723
734
|
|
|
724
735
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
725
736
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
726
|
-
border-color: ${
|
|
727
|
-
background-color: ${
|
|
737
|
+
border-color: ${Yi};
|
|
738
|
+
background-color: ${Yi};
|
|
728
739
|
}
|
|
729
740
|
|
|
730
741
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
731
|
-
border-color: ${
|
|
742
|
+
border-color: ${to};
|
|
732
743
|
background-color: transparent;
|
|
733
|
-
color: ${
|
|
744
|
+
color: ${to};
|
|
734
745
|
}
|
|
735
746
|
|
|
736
747
|
.ft-checkbox--checkmark {
|
|
@@ -749,7 +760,7 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
749
760
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
750
761
|
opacity: 1;
|
|
751
762
|
}
|
|
752
|
-
`;var
|
|
763
|
+
`;var io=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class oo extends wt{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return X`
|
|
753
764
|
<label class="${ni(t)}" for="checkbox-input">
|
|
754
765
|
<div class="ft-checkbox--box-container">
|
|
755
766
|
<ft-ripple
|
|
@@ -775,14 +786,14 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
775
786
|
<slot></slot>
|
|
776
787
|
</ft-typography>
|
|
777
788
|
</label>
|
|
778
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}}
|
|
789
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}}oo.elementDefinitions={"ft-ripple":xi,"ft-typography":Ve},oo.styles=eo,io([o()],oo.prototype,"name",void 0),io([o({type:Boolean,reflect:!0})],oo.prototype,"checked",void 0),io([o({type:Boolean})],oo.prototype,"indeterminate",void 0),io([o({type:Boolean})],oo.prototype,"disabled",void 0),io([n(".ft-checkbox")],oo.prototype,"container",void 0),io([n("ft-ripple")],oo.prototype,"ripple",void 0),p("ft-checkbox")(oo);const so=yt.extend("--ft-radio-text-color",mt.colorOnSurfaceHigh),ro=yt.external(mt.colorPrimary,"Design system"),no=(yt.external(mt.colorOnPrimary,"Design system"),yt.extend("--ft-radio-border-color",mt.colorOnSurfaceMedium)),lo=yt.external(mt.colorOnSurfaceDisabled,"Design system"),ao=g`
|
|
779
790
|
* {
|
|
780
791
|
box-sizing: border-box;
|
|
781
792
|
}
|
|
782
793
|
|
|
783
794
|
.ft-radio {
|
|
784
795
|
box-sizing: border-box;
|
|
785
|
-
color: ${
|
|
796
|
+
color: ${so};
|
|
786
797
|
|
|
787
798
|
display: inline-flex;
|
|
788
799
|
align-items: center;
|
|
@@ -790,7 +801,7 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
790
801
|
}
|
|
791
802
|
|
|
792
803
|
.ft-radio--disabled {
|
|
793
|
-
color: ${
|
|
804
|
+
color: ${lo};
|
|
794
805
|
}
|
|
795
806
|
|
|
796
807
|
input {
|
|
@@ -813,7 +824,7 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
813
824
|
}
|
|
814
825
|
|
|
815
826
|
.ft-radio--box {
|
|
816
|
-
border: 2px solid ${
|
|
827
|
+
border: 2px solid ${no};
|
|
817
828
|
border-radius: 50%;
|
|
818
829
|
|
|
819
830
|
display: flex;
|
|
@@ -826,7 +837,7 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
826
837
|
|
|
827
838
|
.ft-radio--box:after {
|
|
828
839
|
content: " ";
|
|
829
|
-
background-color: ${
|
|
840
|
+
background-color: ${ro};
|
|
830
841
|
|
|
831
842
|
border-radius: 50%;
|
|
832
843
|
|
|
@@ -838,7 +849,7 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
838
849
|
}
|
|
839
850
|
|
|
840
851
|
.ft-radio--checked .ft-radio--box {
|
|
841
|
-
border-color: ${
|
|
852
|
+
border-color: ${ro};
|
|
842
853
|
}
|
|
843
854
|
|
|
844
855
|
|
|
@@ -847,14 +858,14 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
847
858
|
}
|
|
848
859
|
|
|
849
860
|
.ft-radio--disabled .ft-radio--box {
|
|
850
|
-
border-color: ${
|
|
861
|
+
border-color: ${lo};
|
|
851
862
|
background-color: transparent;
|
|
852
863
|
}
|
|
853
864
|
|
|
854
865
|
.ft-radio--disabled .ft-radio--box:after {
|
|
855
|
-
background-color: ${
|
|
866
|
+
background-color: ${lo};
|
|
856
867
|
}
|
|
857
|
-
`;var
|
|
868
|
+
`;var ho=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class co extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class po extends wt{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return X`
|
|
858
869
|
<div class="${ni(t)}">
|
|
859
870
|
<div class="ft-radio--box-container">
|
|
860
871
|
<ft-ripple
|
|
@@ -879,17 +890,17 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
879
890
|
</ft-typography>
|
|
880
891
|
</label>
|
|
881
892
|
</div>
|
|
882
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
893
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new co(this.value,this.checked))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new co(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}po.elementDefinitions={"ft-ripple":xi,"ft-typography":Ve},po.styles=ao,ho([o()],po.prototype,"value",void 0),ho([o()],po.prototype,"name",void 0),ho([o({type:Boolean,reflect:!0})],po.prototype,"checked",void 0),ho([o({type:Boolean})],po.prototype,"disabled",void 0),ho([n(".ft-radio")],po.prototype,"container",void 0),ho([n("ft-ripple")],po.prototype,"ripple",void 0),ho([n("input")],po.prototype,"input",void 0);const fo=g`
|
|
883
894
|
:host {
|
|
884
895
|
display: contents;
|
|
885
896
|
}
|
|
886
|
-
`;var
|
|
897
|
+
`;var uo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class vo extends wt{constructor(){super(...arguments),this.name=""}render(){return X`
|
|
887
898
|
<slot @slotchange=${this.onSlotChange}
|
|
888
899
|
@change=${this.onChange}
|
|
889
900
|
@keydown=${this.onKeyDown}
|
|
890
901
|
@focusin=${this.focusCurrentValue}
|
|
891
902
|
></slot>
|
|
892
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}
|
|
903
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}vo.elementDefinitions={},vo.styles=fo,uo([o()],vo.prototype,"name",void 0),uo([h()],vo.prototype,"radioButtons",void 0),p("ft-radio")(po),p("ft-radio-group")(vo);const bo={borderRadiusM:yt.external(mt.borderRadiusM,"Design system"),colorOutline:yt.external(mt.colorOutline,"Design system"),colorOnSurface:yt.external(mt.colorOnSurface,"Design system"),colorOnSurfaceMedium:yt.external(mt.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:yt.external(mt.colorOnSurfaceDisabled,"Design system"),colorPrimary:yt.external(mt.colorPrimary,"Design system"),colorOnPrimary:yt.external(mt.colorOnPrimary,"Design system"),fontFamily:yt.external(ue.fontFamily,"Body2 typography"),fontSize:yt.external(ue.fontSize,"Body2 typography"),fontWeight:yt.external(ue.fontWeight,"Body2 typography"),letterSpacing:yt.external(ue.letterSpacing,"Body2 typography"),lineHeight:yt.external(ue.lineHeight,"Body2 typography"),textTransform:yt.external(ue.textTransform,"Body2 typography")},xo=g`
|
|
893
904
|
.ft-filter-level--container {
|
|
894
905
|
display: flex;
|
|
895
906
|
flex-direction: column;
|
|
@@ -903,14 +914,14 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
903
914
|
flex-shrink: 0;
|
|
904
915
|
text-decoration: none;
|
|
905
916
|
position: relative;
|
|
906
|
-
border-radius: ${
|
|
917
|
+
border-radius: ${bo.borderRadiusM};
|
|
907
918
|
overflow: hidden;
|
|
908
919
|
display: flex;
|
|
909
920
|
align-items: center;
|
|
910
921
|
padding: 4px 4px;
|
|
911
922
|
gap: 4px;
|
|
912
923
|
cursor: pointer;
|
|
913
|
-
color: ${
|
|
924
|
+
color: ${bo.colorOnSurface};
|
|
914
925
|
}
|
|
915
926
|
|
|
916
927
|
.ft-filter-level--go-back:focus {
|
|
@@ -939,7 +950,7 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
939
950
|
}
|
|
940
951
|
|
|
941
952
|
ft-button {
|
|
942
|
-
${gt(Pi.color,
|
|
953
|
+
${gt(Pi.color,bo.colorOnSurface)};
|
|
943
954
|
}
|
|
944
955
|
|
|
945
956
|
ft-radio, ft-checkbox {
|
|
@@ -953,9 +964,9 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
953
964
|
|
|
954
965
|
.ft-filter-level--no-values {
|
|
955
966
|
margin: 10px 0;
|
|
956
|
-
color: ${
|
|
967
|
+
color: ${bo.colorOnSurfaceMedium};
|
|
957
968
|
}
|
|
958
|
-
`;var
|
|
969
|
+
`;var yo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class go extends wt{constructor(){super(...arguments),this.id="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}render(){let t=[...this.options];this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const e=t.slice(0,this.limit);return X`
|
|
959
970
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
960
971
|
${null==this.parent?null:X`
|
|
961
972
|
<div tabindex="0"
|
|
@@ -1019,7 +1030,7 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
1019
1030
|
@change=${t=>t.stopPropagation()}>
|
|
1020
1031
|
${t.renderOption?t.renderOption:t.label}
|
|
1021
1032
|
</ft-radio>
|
|
1022
|
-
`}onRadioKeyUp(t,e){e.selected&&" "===t.key&&this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}
|
|
1033
|
+
`}onRadioKeyUp(t,e){e.selected&&" "===t.key&&this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}go.elementDefinitions={"ft-button":qi,"ft-ripple":xi,"ft-typography":Ve,"ft-checkbox":oo,"ft-icon":Ai,"ft-radio":po},go.styles=xo,yo([o({type:String})],go.prototype,"id",void 0),yo([o({type:Object})],go.prototype,"parent",void 0),yo([o({type:Array})],go.prototype,"options",void 0),yo([o({type:Boolean})],go.prototype,"multivalued",void 0),yo([o({type:Boolean})],go.prototype,"disabled",void 0),yo([o({type:Boolean})],go.prototype,"hideSelectedOptions",void 0),yo([o({type:Boolean})],go.prototype,"preventNavigation",void 0),yo([o({type:String})],go.prototype,"filter",void 0),yo([o({type:String})],go.prototype,"moreValuesButtonLabel",void 0),yo([o({type:String})],go.prototype,"noValuesLabel",void 0),yo([o({type:Number})],go.prototype,"displayedValuesLimit",void 0),yo([n(".ft-filter-level--container")],go.prototype,"container",void 0),yo([s()],go.prototype,"displayedPages",void 0);const mo={buttonsColor:yt.extend("--ft-snap-scroll-buttons-color",mt.colorPrimary),buttonsZIndex:yt.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:yt.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:yt.external(mt.colorSurface,"Design system")},$o=g`
|
|
1023
1034
|
.ft-snap-scroll {
|
|
1024
1035
|
box-sizing: border-box;
|
|
1025
1036
|
position: relative;
|
|
@@ -1054,7 +1065,7 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
1054
1065
|
flex-wrap: nowrap;
|
|
1055
1066
|
align-items: flex-start;
|
|
1056
1067
|
justify-content: flex-start;
|
|
1057
|
-
gap: ${
|
|
1068
|
+
gap: ${mo.gap};
|
|
1058
1069
|
}
|
|
1059
1070
|
|
|
1060
1071
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -1097,11 +1108,11 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
1097
1108
|
.ft-snap-scroll--next {
|
|
1098
1109
|
position: absolute;
|
|
1099
1110
|
display: flex;
|
|
1100
|
-
z-index: ${
|
|
1111
|
+
z-index: ${mo.buttonsZIndex};
|
|
1101
1112
|
opacity: 1;
|
|
1102
1113
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1103
1114
|
${gt(Pi.backgroundColor,"transparent")};
|
|
1104
|
-
${gt(Pi.color,
|
|
1115
|
+
${gt(Pi.color,mo.buttonsColor)};
|
|
1105
1116
|
}
|
|
1106
1117
|
|
|
1107
1118
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1114,37 +1125,37 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
1114
1125
|
top: 0;
|
|
1115
1126
|
left: -1px;
|
|
1116
1127
|
bottom: 0;
|
|
1117
|
-
background: linear-gradient(to right, ${
|
|
1128
|
+
background: linear-gradient(to right, ${mo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1118
1129
|
}
|
|
1119
1130
|
|
|
1120
1131
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1121
1132
|
top: -1px;
|
|
1122
1133
|
left: 0;
|
|
1123
1134
|
right: 0;
|
|
1124
|
-
background: linear-gradient(to bottom, ${
|
|
1135
|
+
background: linear-gradient(to bottom, ${mo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1125
1136
|
}
|
|
1126
1137
|
|
|
1127
1138
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1128
1139
|
top: 0;
|
|
1129
1140
|
right: -1px;
|
|
1130
1141
|
bottom: 0;
|
|
1131
|
-
background: linear-gradient(to left, ${
|
|
1142
|
+
background: linear-gradient(to left, ${mo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1132
1143
|
}
|
|
1133
1144
|
|
|
1134
1145
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1135
1146
|
left: 0;
|
|
1136
1147
|
right: 0;
|
|
1137
1148
|
bottom: -1px;
|
|
1138
|
-
background: linear-gradient(to top, ${
|
|
1149
|
+
background: linear-gradient(to top, ${mo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1139
1150
|
}
|
|
1140
1151
|
|
|
1141
1152
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1142
1153
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1143
1154
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1144
1155
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1145
|
-
background-color: ${
|
|
1156
|
+
background-color: ${mo.colorSurface};
|
|
1146
1157
|
}
|
|
1147
|
-
`;var
|
|
1158
|
+
`;var wo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ko extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class Oo extends wt{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new e(200),this.updateScrollDebouncer=new e(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,i=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<i||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=ni({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":Nt}),e=this.controls&&this.withScroll;return X`
|
|
1148
1159
|
<div part="container" class="${t}">
|
|
1149
1160
|
<ft-button
|
|
1150
1161
|
class="ft-snap-scroll--previous"
|
|
@@ -1168,7 +1179,7 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
1168
1179
|
@click=${this.next}
|
|
1169
1180
|
></ft-button>
|
|
1170
1181
|
</div>
|
|
1171
|
-
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new
|
|
1182
|
+
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new ko(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,i;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(i=this.contentSlot)||void 0===i||i.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}}Oo.elementDefinitions={"ft-button":qi},Oo.styles=$o,wo([o({type:Boolean})],Oo.prototype,"horizontal",void 0),wo([o({type:Boolean})],Oo.prototype,"hideScrollbar",void 0),wo([o({type:Boolean})],Oo.prototype,"controls",void 0),wo([o({type:Boolean})],Oo.prototype,"limitSize",void 0),wo([s()],Oo.prototype,"elements",void 0),wo([s()],Oo.prototype,"currentElement",void 0),wo([s()],Oo.prototype,"withScroll",void 0),wo([s()],Oo.prototype,"startReached",void 0),wo([s()],Oo.prototype,"endReached",void 0),wo([n(".ft-snap-scroll--content")],Oo.prototype,"contentSlot",void 0),p("ft-snap-scroll")(Oo);const So={colorOutline:yt.external(mt.colorOutline,"Design system"),colorOnSurface:yt.external(mt.colorOnSurface,"Design system"),colorOnSurfaceMedium:yt.external(mt.colorOnSurfaceMedium,"Design system"),colorPrimary:yt.external(mt.colorPrimary,"Design system"),colorSurface:yt.external(mt.colorSurface,"Design system"),transitionDuration:yt.external(mt.transitionDuration,"Design system"),transitionTimingFunction:yt.external(mt.transitionTimingFunction,"Design system")},Co=[Pe,g`
|
|
1172
1183
|
:host {
|
|
1173
1184
|
display: flex;
|
|
1174
1185
|
max-height: 100%;
|
|
@@ -1181,7 +1192,7 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
1181
1192
|
flex-direction: column;
|
|
1182
1193
|
max-height: 100%;
|
|
1183
1194
|
max-width: 100%;
|
|
1184
|
-
color: ${
|
|
1195
|
+
color: ${So.colorOnSurface};
|
|
1185
1196
|
}
|
|
1186
1197
|
|
|
1187
1198
|
.ft-filter--header {
|
|
@@ -1217,8 +1228,8 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
1217
1228
|
padding: 0 10px;
|
|
1218
1229
|
overflow: hidden;
|
|
1219
1230
|
height: 32px;
|
|
1220
|
-
transition: height ${
|
|
1221
|
-
margin ${
|
|
1231
|
+
transition: height ${So.transitionDuration} ${So.transitionTimingFunction},
|
|
1232
|
+
margin ${So.transitionDuration} ${So.transitionTimingFunction};
|
|
1222
1233
|
transition-delay: 500ms;
|
|
1223
1234
|
}
|
|
1224
1235
|
|
|
@@ -1231,15 +1242,15 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
1231
1242
|
display: block;
|
|
1232
1243
|
width: 100%;
|
|
1233
1244
|
border-radius: 4px;
|
|
1234
|
-
border: 1px solid ${
|
|
1245
|
+
border: 1px solid ${So.colorOutline};
|
|
1235
1246
|
padding: 4px;
|
|
1236
|
-
background-color: ${
|
|
1237
|
-
color: ${
|
|
1238
|
-
outline-color: ${
|
|
1247
|
+
background-color: ${So.colorSurface};
|
|
1248
|
+
color: ${So.colorOnSurface};
|
|
1249
|
+
outline-color: ${So.colorPrimary};
|
|
1239
1250
|
}
|
|
1240
1251
|
|
|
1241
1252
|
input::placeholder {
|
|
1242
|
-
color: ${
|
|
1253
|
+
color: ${So.colorOnSurfaceMedium};
|
|
1243
1254
|
}
|
|
1244
1255
|
|
|
1245
1256
|
input:placeholder-shown {
|
|
@@ -1255,7 +1266,7 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
1255
1266
|
}
|
|
1256
1267
|
|
|
1257
1268
|
.ft-filter--separator {
|
|
1258
|
-
border-top: 1px solid ${
|
|
1269
|
+
border-top: 1px solid ${So.colorOutline};
|
|
1259
1270
|
margin: 4px 10px;
|
|
1260
1271
|
}
|
|
1261
1272
|
|
|
@@ -1280,7 +1291,7 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
1280
1291
|
slot {
|
|
1281
1292
|
display: none;
|
|
1282
1293
|
}
|
|
1283
|
-
`];var
|
|
1294
|
+
`];var Eo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class No extends CustomEvent{constructor(t){super("change",{detail:t})}}class zo extends wt{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.hideClearButton=!1,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new e(300),this.changeDebouncer=new e(10)}get flatOptions(){return Ze(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}get selectedValues(){return this.flatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){var t,e;const i=this.flatOptions.some((t=>t.selected)),o=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e,s=this.filterPlaceHolder.replace("{0}",this.label);return X`
|
|
1284
1295
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1285
1296
|
part="container">
|
|
1286
1297
|
${this.label||i?X`
|
|
@@ -1350,6 +1361,6 @@ class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error
|
|
|
1350
1361
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1351
1362
|
noValuesLabel="${this.noValuesLabel}"
|
|
1352
1363
|
></ft-filter-level>
|
|
1353
|
-
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.dispatchEvent(new
|
|
1364
|
+
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.dispatchEvent(new No(this.selectedValues)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,e;this.filter=null!==(e=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==e?e:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}zo.elementDefinitions={"ft-button":qi,"ft-filter-level":go,"ft-snap-scroll":Oo,"ft-typography":Ve},zo.styles=Co,Eo([o({type:String})],zo.prototype,"id",void 0),Eo([o({type:String})],zo.prototype,"label",void 0),Eo([o({type:String})],zo.prototype,"filterPlaceHolder",void 0),Eo([o({type:String})],zo.prototype,"clearButtonLabel",void 0),Eo([o({type:String})],zo.prototype,"moreValuesButtonLabel",void 0),Eo([o({type:String})],zo.prototype,"noValuesLabel",void 0),Eo([d([])],zo.prototype,"options",void 0),Eo([o({type:Boolean})],zo.prototype,"multivalued",void 0),Eo([o({type:Boolean})],zo.prototype,"disabled",void 0),Eo([o({type:Boolean})],zo.prototype,"raiseSelectedOptions",void 0),Eo([o({type:Number})],zo.prototype,"displayedValuesLimit",void 0),Eo([o({type:Boolean})],zo.prototype,"hideClearButton",void 0),Eo([n(".ft-filter--slot")],zo.prototype,"slotElement",void 0),Eo([n(".ft-filter--container")],zo.prototype,"container",void 0),Eo([n(".ft-filter--values")],zo.prototype,"valuesContainer",void 0),Eo([n(".ft-filter--levels")],zo.prototype,"levelsContainer",void 0),Eo([n(".ft-filter--levels ft-filter-level:last-child")],zo.prototype,"lastLevel",void 0),Eo([n(".ft-filter--filter input")],zo.prototype,"filterInput",void 0),Eo([function(t){return r({descriptor:e=>({get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}(".ft-filter--levels ft-filter-level")],zo.prototype,"levels",void 0),Eo([s()],zo.prototype,"withScroll",void 0),Eo([s()],zo.prototype,"filter",void 0),Eo([s()],zo.prototype,"slideIn",void 0),Eo([s()],zo.prototype,"slideOut",void 0);var Mo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Ro extends wt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return X`
|
|
1354
1365
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1355
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}
|
|
1366
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Ro.elementDefinitions={},Mo([o({type:String})],Ro.prototype,"label",void 0),Mo([o({type:Object,converter:t=>t})],Ro.prototype,"value",void 0),Mo([o({type:Boolean,reflect:!0})],Ro.prototype,"selected",void 0),Mo([o({type:Object})],Ro.prototype,"subOptions",void 0),Mo([d({})],Ro.prototype,"renderOption",void 0),Mo([n(".ft-filter-option--slot")],Ro.prototype,"slotElement",void 0),p("ft-filter")(zo),p("ft-filter-option")(Ro),t.FtFilter=zo,t.FtFilterChangeEvent=No,t.FtFilterCssVariables=So,t.FtFilterOption=Ro,t.styles=Co,Object.defineProperty(t,"i",{value:!0})}({});
|