@fluid-topics/ft-search-bar 0.1.18 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-search-bar.inline-styles.js +648 -825
- package/build/ft-search-bar.js +1 -3
- package/build/ft-search-bar.light.js +574 -730
- package/build/ft-search-bar.min.js +643 -820
- package/package.json +13 -14
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
!function(t,e,i,
|
|
1
|
+
!function(t,e,i,o,s,n,r){var l,a,c=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};!function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(l||(l={}));class h extends CustomEvent{constructor(t,e){super("change",{detail:{size:t,category:e}})}}class p extends e.FtLitElement{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=l.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new e.Debouncer}render(){return i.html`
|
|
2
2
|
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
3
3
|
<div class="ft-size-watcher--watcher"></div>
|
|
4
4
|
</div>
|
|
5
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=
|
|
5
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=l.S:this.size<976?this.category=l.M:this.size<1024?this.category=l.L:this.size<1440?this.category=l.XL:this.category=l.XXL,this.dispatchEvent(new h(this.size,this.category)))}),this.debounceTimeout)}}p.elementDefinitions={},p.styles=i.css`
|
|
6
6
|
.ft-size-watcher--pixel {
|
|
7
7
|
width: 0;
|
|
8
8
|
height: 0;
|
|
@@ -21,60 +21,69 @@
|
|
|
21
21
|
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
22
22
|
width: 100%;
|
|
23
23
|
}
|
|
24
|
-
`,
|
|
24
|
+
`,c([o.property({type:Number})],p.prototype,"debounceTimeout",void 0),c([o.property({type:Boolean})],p.prototype,"local",void 0),c([o.property({type:Number,reflect:!0})],p.prototype,"size",void 0),c([o.property({type:String,reflect:!0})],p.prototype,"category",void 0),c([o.query(".ft-size-watcher--watcher")],p.prototype,"watcher",void 0),e.customElement("ft-size-watcher")(p);const f=globalThis.trustedTypes,d=f?f.createPolicy("lit-html",{createHTML:t=>t}):void 0,u=`lit$${(Math.random()+"").slice(9)}$`,b="?"+u,v=`<${b}>`,g=document,x=(t="")=>g.createComment(t),y=t=>null===t||"object"!=typeof t&&"function"!=typeof t,m=Array.isArray,$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,w=/-->/g,k=/>/g,S=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,z=/'/g,O=/"/g,B=/^(?:script|style|textarea|title)$/i,C=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),E=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),D=new WeakMap,F=g.createTreeWalker(g,129,null,!1),L=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=$;for(let e=0;e<i;e++){const i=t[e];let l,a,c=-1,h=0;for(;h<i.length&&(r.lastIndex=h,a=r.exec(i),null!==a);)h=r.lastIndex,r===$?"!--"===a[1]?r=w:void 0!==a[1]?r=k:void 0!==a[2]?(B.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=S):void 0!==a[3]&&(r=S):r===S?">"===a[0]?(r=null!=s?s:$,c=-1):void 0===a[1]?c=-2:(c=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?S:'"'===a[3]?O:z):r===O||r===z?r=S:r===w||r===k?r=$:(r=S,s=void 0);const p=r===S&&t[e+1].startsWith("/>")?" ":"";n+=r===$?i+v:c>=0?(o.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+u+p):i+u+(-2===c?(o.push(void 0),e):p)}const l=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==d?d.createHTML(l):l,o]};class j{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]=L(t,e);if(this.el=j.createElement(a,i),F.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=F.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(u)){const i=c[n++];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]?R:"?"===e[1]?_:"@"===e[1]?U:N})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(B.test(o.tagName)){const t=o.textContent.split(u),e=t.length-1;if(e>0){o.textContent=f?f.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],x()),F.nextNode(),l.push({type:2,index:++s});o.append(t[e],x())}}}else if(8===o.nodeType)if(o.data===b)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=g.createElement("template");return i.innerHTML=t,i}}function M(t,e,i=t,o){var s,n,r,l;if(e===E)return e;let a=void 0!==o?null===(s=i._$Cl)||void 0===s?void 0:s[o]:i._$Cu;const c=y(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)._$Cl)&&void 0!==r?r:l._$Cl=[])[o]=a:i._$Cu=a),void 0!==a&&(e=M(t,a._$AS(t,e.values),a,o)),e}class A{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:g).importNode(i,!0);F.currentNode=s;let n=F.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new T(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new Z(n,this,t)),this.v.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=F.nextNode(),r++)}return s}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class T{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._$Cg=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._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=M(this,t,e),y(t)?t===I||null==t||""===t?(this._$AH!==I&&this._$AR(),this._$AH=I):t!==this._$AH&&t!==E&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var e;return m(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==I&&y(this._$AH)?this._$AA.nextSibling.data=t:this.S(g.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=j.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.m(i);else{const t=new A(s,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=D.get(t.strings);return void 0===e&&D.set(t.strings,e=new j(t)),e}A(t){m(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 T(this.M(x()),this.M(x()),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._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class N{constructor(t,e,i,o,s){this.type=1,this._$AH=I,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=I}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let n=!1;if(void 0===s)t=M(this,t,e,0),n=!y(t)||t!==this._$AH&&t!==E,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=M(this,o[i+r],e,r),l===E&&(l=this._$AH[r]),n||(n=!y(l)||l!==this._$AH[r]),l===I?t=I:t!==I&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.k(t)}k(t){t===I?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class R extends N{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===I?void 0:t}}const P=f?f.emptyScript:"";class _ extends N{constructor(){super(...arguments),this.type=4}k(t){t&&t!==I?this.element.setAttribute(this.name,P):this.element.removeAttribute(this.name)}}class U extends N{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=M(this,t,e,0))&&void 0!==i?i:I)===E)return;const o=this._$AH,s=t===I&&o!==I||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==I&&(o===I||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class Z{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){M(this,t)}}const H=window.litHtmlPolyfillSupport;null==H||H(j,T),(null!==(a=globalThis.litHtmlVersions)&&void 0!==a?a:globalThis.litHtmlVersions=[]).push("2.1.3");
|
|
25
25
|
/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2020 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
29
|
*/
|
|
30
|
-
const
|
|
30
|
+
const K=t=>({_$litStatic$:t}),q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;let n,r;const l=[],a=[];let c,h=0,p=!1;for(;h<s;){for(c=e[h];h<s&&void 0!==(r=i[h],n=null===(o=r)||void 0===o?void 0:o._$litStatic$);)c+=n+e[++h],p=!0;a.push(r),l.push(c),h++}if(h===s&&l.push(e[s]),p){const t=l.join("$$lit$$");void 0===(e=q.get(t))&&(l.raw=l,q.set(t,e=l)),i=a}return t(e,...i)})(C);var W,G=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};!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"}(W||(W={}));const X=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),J=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),Y={fontFamily:J,fontSize:e.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:e.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},Q=e.FtCssVariable.extend("--ft-typography-title-font-family",X),tt=e.FtCssVariable.extend("--ft-typography-title-font-size",Y.fontSize,"20px"),et=e.FtCssVariable.extend("--ft-typography-title-font-weight",Y.fontWeight,"normal"),it=e.FtCssVariable.extend("--ft-typography-title-letter-spacing",Y.letterSpacing,"0.15px"),ot=e.FtCssVariable.extend("--ft-typography-title-line-height",Y.lineHeight,"24px"),st=e.FtCssVariable.extend("--ft-typography-title-text-transform",Y.textTransform,"inherit"),nt=e.FtCssVariable.extend("--ft-typography-title-dense-font-family",X),rt=e.FtCssVariable.extend("--ft-typography-title-dense-font-size",Y.fontSize,"14px"),lt=e.FtCssVariable.extend("--ft-typography-title-dense-font-weight",Y.fontWeight,"normal"),at=e.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",Y.letterSpacing,"0.105px"),ct=e.FtCssVariable.extend("--ft-typography-title-dense-line-height",Y.lineHeight,"24px"),ht=e.FtCssVariable.extend("--ft-typography-title-dense-text-transform",Y.textTransform,"inherit"),pt=e.FtCssVariable.extend("--ft-typography-subtitle1-font-family",J),ft=e.FtCssVariable.extend("--ft-typography-subtitle1-font-size",Y.fontSize,"16px"),dt=e.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",Y.fontWeight,"600"),ut=e.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",Y.letterSpacing,"0.144px"),bt=e.FtCssVariable.extend("--ft-typography-subtitle1-line-height",Y.lineHeight,"24px"),vt=e.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",Y.textTransform,"inherit"),gt=e.FtCssVariable.extend("--ft-typography-subtitle2-font-family",J),xt=e.FtCssVariable.extend("--ft-typography-subtitle2-font-size",Y.fontSize,"14px"),yt=e.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",Y.fontWeight,"normal"),mt=e.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",Y.letterSpacing,"0.098px"),$t=e.FtCssVariable.extend("--ft-typography-subtitle2-line-height",Y.lineHeight,"24px"),wt=e.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",Y.textTransform,"inherit"),kt={fontFamily:e.FtCssVariable.extend("--ft-typography-body1-font-family",J),fontSize:e.FtCssVariable.extend("--ft-typography-body1-font-size",Y.fontSize,"16px"),fontWeight:e.FtCssVariable.extend("--ft-typography-body1-font-weight",Y.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-body1-letter-spacing",Y.letterSpacing,"0.496px"),lineHeight:e.FtCssVariable.extend("--ft-typography-body1-line-height",Y.lineHeight,"24px"),textTransform:e.FtCssVariable.extend("--ft-typography-body1-text-transform",Y.textTransform,"inherit")},St={fontFamily:e.FtCssVariable.extend("--ft-typography-body2-font-family",J),fontSize:e.FtCssVariable.extend("--ft-typography-body2-font-size",Y.fontSize,"14px"),fontWeight:e.FtCssVariable.extend("--ft-typography-body2-font-weight",Y.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-body2-letter-spacing",Y.letterSpacing,"0.252px"),lineHeight:e.FtCssVariable.extend("--ft-typography-body2-line-height",Y.lineHeight,"20px"),textTransform:e.FtCssVariable.extend("--ft-typography-body2-text-transform",Y.textTransform,"inherit")},zt={fontFamily:e.FtCssVariable.extend("--ft-typography-caption-font-family",J),fontSize:e.FtCssVariable.extend("--ft-typography-caption-font-size",Y.fontSize,"12px"),fontWeight:e.FtCssVariable.extend("--ft-typography-caption-font-weight",Y.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-caption-letter-spacing",Y.letterSpacing,"0.396px"),lineHeight:e.FtCssVariable.extend("--ft-typography-caption-line-height",Y.lineHeight,"16px"),textTransform:e.FtCssVariable.extend("--ft-typography-caption-text-transform",Y.textTransform,"inherit")},Ot=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",J),Bt=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",Y.fontSize,"10px"),Ct=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",Y.fontWeight,"normal"),Et=e.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",Y.letterSpacing,"0.33px"),It=e.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",Y.lineHeight,"16px"),Dt=e.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",Y.textTransform,"inherit"),Ft=e.FtCssVariable.extend("--ft-typography-overline-font-family",J),Lt=e.FtCssVariable.extend("--ft-typography-overline-font-size",Y.fontSize,"10px"),jt=e.FtCssVariable.extend("--ft-typography-overline-font-weight",Y.fontWeight,"normal"),Mt=e.FtCssVariable.extend("--ft-typography-overline-letter-spacing",Y.letterSpacing,"1.5px"),At=e.FtCssVariable.extend("--ft-typography-overline-line-height",Y.lineHeight,"16px"),Tt=e.FtCssVariable.extend("--ft-typography-overline-text-transform",Y.textTransform,"uppercase"),Nt={fontFamily:e.FtCssVariable.extend("--ft-typography-button-font-family",J),fontSize:e.FtCssVariable.extend("--ft-typography-button-font-size",Y.fontSize,"14px"),fontWeight:e.FtCssVariable.extend("--ft-typography-button-font-weight",Y.fontWeight,"600"),letterSpacing:e.FtCssVariable.extend("--ft-typography-button-letter-spacing",Y.letterSpacing,"1.246px"),lineHeight:e.FtCssVariable.extend("--ft-typography-button-line-height",Y.lineHeight,"16px"),textTransform:e.FtCssVariable.extend("--ft-typography-button-text-transform",Y.textTransform,"uppercase")},Rt=i.css`
|
|
31
31
|
.ft-typography--title {
|
|
32
|
-
font-family: ${
|
|
33
|
-
font-size: ${
|
|
34
|
-
font-weight: ${
|
|
35
|
-
letter-spacing: ${
|
|
32
|
+
font-family: ${Q};
|
|
33
|
+
font-size: ${tt};
|
|
34
|
+
font-weight: ${et};
|
|
35
|
+
letter-spacing: ${it};
|
|
36
36
|
line-height: ${ot};
|
|
37
|
-
text-transform: ${
|
|
37
|
+
text-transform: ${st};
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
39
|
+
`,Pt=i.css`
|
|
40
40
|
.ft-typography--title-dense {
|
|
41
|
-
font-family: ${
|
|
42
|
-
font-size: ${
|
|
43
|
-
font-weight: ${
|
|
44
|
-
letter-spacing: ${
|
|
45
|
-
line-height: ${
|
|
46
|
-
text-transform: ${
|
|
47
|
-
}
|
|
48
|
-
`,
|
|
41
|
+
font-family: ${nt};
|
|
42
|
+
font-size: ${rt};
|
|
43
|
+
font-weight: ${lt};
|
|
44
|
+
letter-spacing: ${at};
|
|
45
|
+
line-height: ${ct};
|
|
46
|
+
text-transform: ${ht};
|
|
47
|
+
}
|
|
48
|
+
`,_t=i.css`
|
|
49
49
|
.ft-typography--subtitle1 {
|
|
50
|
-
font-family: ${
|
|
50
|
+
font-family: ${pt};
|
|
51
51
|
font-size: ${ft};
|
|
52
|
-
font-weight: ${
|
|
53
|
-
letter-spacing: ${
|
|
52
|
+
font-weight: ${dt};
|
|
53
|
+
letter-spacing: ${ut};
|
|
54
54
|
line-height: ${bt};
|
|
55
|
-
text-transform: ${
|
|
55
|
+
text-transform: ${vt};
|
|
56
56
|
}
|
|
57
57
|
`,Ut=i.css`
|
|
58
58
|
.ft-typography--subtitle2 {
|
|
59
|
-
font-family: ${
|
|
59
|
+
font-family: ${gt};
|
|
60
60
|
font-size: ${xt};
|
|
61
61
|
font-weight: ${yt};
|
|
62
|
-
letter-spacing: ${
|
|
62
|
+
letter-spacing: ${mt};
|
|
63
63
|
line-height: ${$t};
|
|
64
|
-
text-transform: ${
|
|
64
|
+
text-transform: ${wt};
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
`,
|
|
67
|
+
`,Zt=i.css`
|
|
68
68
|
.ft-typography--body1 {
|
|
69
|
-
font-family: ${
|
|
70
|
-
font-size: ${
|
|
71
|
-
font-weight: ${
|
|
72
|
-
letter-spacing: ${
|
|
73
|
-
line-height: ${
|
|
74
|
-
text-transform: ${
|
|
69
|
+
font-family: ${kt.fontFamily};
|
|
70
|
+
font-size: ${kt.fontSize};
|
|
71
|
+
font-weight: ${kt.fontWeight};
|
|
72
|
+
letter-spacing: ${kt.letterSpacing};
|
|
73
|
+
line-height: ${kt.lineHeight};
|
|
74
|
+
text-transform: ${kt.textTransform};
|
|
75
75
|
}
|
|
76
|
-
`,
|
|
76
|
+
`,Ht=i.css`
|
|
77
77
|
.ft-typography--body2 {
|
|
78
|
+
font-family: ${St.fontFamily};
|
|
79
|
+
font-size: ${St.fontSize};
|
|
80
|
+
font-weight: ${St.fontWeight};
|
|
81
|
+
letter-spacing: ${St.letterSpacing};
|
|
82
|
+
line-height: ${St.lineHeight};
|
|
83
|
+
text-transform: ${St.textTransform};
|
|
84
|
+
}
|
|
85
|
+
`,Kt=i.css`
|
|
86
|
+
.ft-typography--caption {
|
|
78
87
|
font-family: ${zt.fontFamily};
|
|
79
88
|
font-size: ${zt.fontSize};
|
|
80
89
|
font-weight: ${zt.fontWeight};
|
|
@@ -83,261 +92,44 @@ const q=t=>({_$litStatic$:t}),G=new Map,K=(t=>(e,...i)=>{var r;const o=i.length;
|
|
|
83
92
|
text-transform: ${zt.textTransform};
|
|
84
93
|
}
|
|
85
94
|
`,qt=i.css`
|
|
86
|
-
.ft-typography--caption {
|
|
87
|
-
font-family: ${St.fontFamily};
|
|
88
|
-
font-size: ${St.fontSize};
|
|
89
|
-
font-weight: ${St.fontWeight};
|
|
90
|
-
letter-spacing: ${St.letterSpacing};
|
|
91
|
-
line-height: ${St.lineHeight};
|
|
92
|
-
text-transform: ${St.textTransform};
|
|
93
|
-
}
|
|
94
|
-
`,Gt=i.css`
|
|
95
95
|
.ft-typography--breadcrumb {
|
|
96
96
|
font-family: ${Ot};
|
|
97
|
-
font-size: ${
|
|
98
|
-
font-weight: ${
|
|
97
|
+
font-size: ${Bt};
|
|
98
|
+
font-weight: ${Ct};
|
|
99
99
|
letter-spacing: ${Et};
|
|
100
|
-
line-height: ${
|
|
101
|
-
text-transform: ${
|
|
100
|
+
line-height: ${It};
|
|
101
|
+
text-transform: ${Dt};
|
|
102
102
|
}
|
|
103
|
-
`,
|
|
103
|
+
`,Vt=i.css`
|
|
104
104
|
.ft-typography--overline {
|
|
105
|
-
font-family: ${
|
|
106
|
-
font-size: ${
|
|
107
|
-
font-weight: ${
|
|
108
|
-
letter-spacing: ${
|
|
109
|
-
line-height: ${
|
|
110
|
-
text-transform: ${
|
|
105
|
+
font-family: ${Ft};
|
|
106
|
+
font-size: ${Lt};
|
|
107
|
+
font-weight: ${jt};
|
|
108
|
+
letter-spacing: ${Mt};
|
|
109
|
+
line-height: ${At};
|
|
110
|
+
text-transform: ${Tt};
|
|
111
111
|
}
|
|
112
112
|
`,Wt=i.css`
|
|
113
113
|
.ft-typography--button {
|
|
114
|
-
font-family: ${
|
|
115
|
-
font-size: ${
|
|
116
|
-
font-weight: ${
|
|
117
|
-
letter-spacing: ${
|
|
118
|
-
line-height: ${
|
|
119
|
-
text-transform: ${
|
|
120
|
-
}
|
|
121
|
-
`;class
|
|
122
|
-
<${
|
|
114
|
+
font-family: ${Nt.fontFamily};
|
|
115
|
+
font-size: ${Nt.fontSize};
|
|
116
|
+
font-weight: ${Nt.fontWeight};
|
|
117
|
+
letter-spacing: ${Nt.letterSpacing};
|
|
118
|
+
line-height: ${Nt.lineHeight};
|
|
119
|
+
text-transform: ${Nt.textTransform};
|
|
120
|
+
}
|
|
121
|
+
`;class Gt extends e.FtLitElement{constructor(){super(...arguments),this.variant=W.body1}render(){return this.element?V`
|
|
122
|
+
<${K(this.element)}
|
|
123
123
|
class="ft-typography ft-typography--${this.variant}">
|
|
124
124
|
<slot></slot>
|
|
125
|
-
</${
|
|
126
|
-
`:
|
|
125
|
+
</${K(this.element)}>
|
|
126
|
+
`:V`
|
|
127
127
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
128
|
-
`}}function
|
|
128
|
+
`}}function Xt(t,e){return t.flatMap((t=>[t,...Xt(e(t),e)]))}function Jt(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function Yt(t,e){return{label:t.label,selected:!e&&t.selected,subOptions:t.childNodes.map((e=>Yt(e,t.selected))),value:t.value}}function Qt(t){return{id:t.key,label:t.label,multivalued:t.multiSelectionable,options:t.rootNodes.map((t=>Yt(t,!1)))}}Gt.styles=[Rt,Pt,_t,Ut,Zt,Ht,Kt,qt,Vt,Wt,i.css`
|
|
129
129
|
.ft-typography {
|
|
130
130
|
vertical-align: inherit;
|
|
131
131
|
}
|
|
132
|
-
`],
|
|
133
|
-
/*! *****************************************************************************
|
|
134
|
-
Copyright (c) Microsoft Corporation.
|
|
135
|
-
|
|
136
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
137
|
-
purpose with or without fee is hereby granted.
|
|
138
|
-
|
|
139
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
140
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
141
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
142
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
143
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
144
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
145
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
146
|
-
***************************************************************************** */
|
|
147
|
-
var ee=function(t,e){return ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},ee(t,e)};function ie(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}ee(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var re=function(){return re=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},re.apply(this,arguments)};function oe(t,e,i,r){for(var o,a=arguments.length,c=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,n=t.length-1;n>=0;n--)(o=t[n])&&(c=(a<3?o(c):a>3?o(e,i,c):o(e,i))||c);return a>3&&c&&Object.defineProperty(e,i,c),c}function ae(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],r=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}
|
|
148
|
-
/**
|
|
149
|
-
* @license
|
|
150
|
-
* Copyright 2018 Google Inc.
|
|
151
|
-
*
|
|
152
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
153
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
154
|
-
* in the Software without restriction, including without limitation the rights
|
|
155
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
156
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
157
|
-
* furnished to do so, subject to the following conditions:
|
|
158
|
-
*
|
|
159
|
-
* The above copyright notice and this permission notice shall be included in
|
|
160
|
-
* all copies or substantial portions of the Software.
|
|
161
|
-
*
|
|
162
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
163
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
164
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
165
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
166
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
167
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
168
|
-
* THE SOFTWARE.
|
|
169
|
-
*/const ce=()=>{},ne={get passive(){return!1}};document.addEventListener("x",ce,ne),document.removeEventListener("x",ce);
|
|
170
|
-
/**
|
|
171
|
-
* @license
|
|
172
|
-
* Copyright 2018 Google LLC
|
|
173
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
174
|
-
*/
|
|
175
|
-
class se extends i.LitElement{click(){if(this.mdcRoot)return this.mdcRoot.focus(),void this.mdcRoot.click();super.click()}createFoundation(){void 0!==this.mdcFoundation&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}firstUpdated(){this.createFoundation()}}
|
|
176
|
-
/**
|
|
177
|
-
* @license
|
|
178
|
-
* Copyright 2016 Google Inc.
|
|
179
|
-
*
|
|
180
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
181
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
182
|
-
* in the Software without restriction, including without limitation the rights
|
|
183
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
184
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
185
|
-
* furnished to do so, subject to the following conditions:
|
|
186
|
-
*
|
|
187
|
-
* The above copyright notice and this permission notice shall be included in
|
|
188
|
-
* all copies or substantial portions of the Software.
|
|
189
|
-
*
|
|
190
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
191
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
192
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
193
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
194
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
195
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
196
|
-
* THE SOFTWARE.
|
|
197
|
-
*/var le=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),de={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},pe={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},he={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};
|
|
198
|
-
/**
|
|
199
|
-
* @license
|
|
200
|
-
* Copyright 2016 Google Inc.
|
|
201
|
-
*
|
|
202
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
203
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
204
|
-
* in the Software without restriction, including without limitation the rights
|
|
205
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
206
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
207
|
-
* furnished to do so, subject to the following conditions:
|
|
208
|
-
*
|
|
209
|
-
* The above copyright notice and this permission notice shall be included in
|
|
210
|
-
* all copies or substantial portions of the Software.
|
|
211
|
-
*
|
|
212
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
213
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
214
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
215
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
216
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
217
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
218
|
-
* THE SOFTWARE.
|
|
219
|
-
*/
|
|
220
|
-
/**
|
|
221
|
-
* @license
|
|
222
|
-
* Copyright 2016 Google Inc.
|
|
223
|
-
*
|
|
224
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
225
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
226
|
-
* in the Software without restriction, including without limitation the rights
|
|
227
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
228
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
229
|
-
* furnished to do so, subject to the following conditions:
|
|
230
|
-
*
|
|
231
|
-
* The above copyright notice and this permission notice shall be included in
|
|
232
|
-
* all copies or substantial portions of the Software.
|
|
233
|
-
*
|
|
234
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
235
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
236
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
237
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
238
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
239
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
240
|
-
* THE SOFTWARE.
|
|
241
|
-
*/
|
|
242
|
-
var fe=["touchstart","pointerdown","mousedown","keydown"],ue=["touchend","pointerup","mouseup","contextmenu"],me=[],be=function(t){function e(i){var r=t.call(this,re(re({},e.defaultAdapter),i))||this;return r.activationAnimationHasEnded=!1,r.activationTimer=0,r.fgDeactivationRemovalTimer=0,r.fgScale="0",r.frame={width:0,height:0},r.initialSize=0,r.layoutFrame=0,r.maxRadius=0,r.unboundedCoords={left:0,top:0},r.activationState=r.defaultActivationState(),r.activationTimerCallback=function(){r.activationAnimationHasEnded=!0,r.runDeactivationUXLogicIfReady()},r.activateHandler=function(t){r.activateImpl(t)},r.deactivateHandler=function(){r.deactivateImpl()},r.focusHandler=function(){r.handleFocus()},r.blurHandler=function(){r.handleBlur()},r.resizeHandler=function(){r.layout()},r}return ie(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return de},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return pe},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return he},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this,i=this.supportsPressRipple();if(this.registerRootHandlers(i),i){var r=e.cssClasses,o=r.ROOT,a=r.UNBOUNDED;requestAnimationFrame((function(){t.adapter.addClass(o),t.adapter.isUnbounded()&&(t.adapter.addClass(a),t.layoutInternal())}))}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(e.cssClasses.FG_DEACTIVATION));var i=e.cssClasses,r=i.ROOT,o=i.UNBOUNDED;requestAnimationFrame((function(){t.adapter.removeClass(r),t.adapter.removeClass(o),t.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},e.prototype.activate=function(t){this.activateImpl(t)},e.prototype.deactivate=function(){this.deactivateImpl()},e.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){t.layoutInternal(),t.layoutFrame=0}))},e.prototype.setUnbounded=function(t){var i=e.cssClasses.UNBOUNDED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame((function(){return t.adapter.addClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame((function(){return t.adapter.removeClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},e.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers=function(t){var e,i;if(t){try{for(var r=ae(fe),o=r.next();!o.done;o=r.next()){var a=o.value;this.adapter.registerInteractionHandler(a,this.activateHandler)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},e.prototype.registerDeactivationHandlers=function(t){var e,i;if("keydown"===t.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var r=ae(ue),o=r.next();!o.done;o=r.next()){var a=o.value;this.adapter.registerDocumentInteractionHandler(a,this.deactivateHandler)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}},e.prototype.deregisterRootHandlers=function(){var t,e;try{for(var i=ae(fe),r=i.next();!r.done;r=i.next()){var o=r.value;this.adapter.deregisterInteractionHandler(o,this.activateHandler)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},e.prototype.deregisterDeactivationHandlers=function(){var t,e;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var i=ae(ue),r=i.next();!r.done;r=i.next()){var o=r.value;this.adapter.deregisterDocumentInteractionHandler(o,this.deactivateHandler)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}},e.prototype.removeCssVars=function(){var t=this,i=e.strings;Object.keys(i).forEach((function(e){0===e.indexOf("VAR_")&&t.adapter.updateCssVariable(i[e],null)}))},e.prototype.activateImpl=function(t){var e=this;if(!this.adapter.isSurfaceDisabled()){var i=this.activationState;if(!i.isActivated){var r=this.previousActivationEvent;if(!(r&&void 0!==t&&r.type!==t.type))i.isActivated=!0,i.isProgrammatic=void 0===t,i.activationEvent=t,i.wasActivatedByPointer=!i.isProgrammatic&&(void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type)),void 0!==t&&me.length>0&&me.some((function(t){return e.adapter.containsEventTarget(t)}))?this.resetActivationState():(void 0!==t&&(me.push(t.target),this.registerDeactivationHandlers(t)),i.wasElementMadeActive=this.checkElementMadeActive(t),i.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){me=[],i.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(i.wasElementMadeActive=e.checkElementMadeActive(t),i.wasElementMadeActive&&e.animateActivation()),i.wasElementMadeActive||(e.activationState=e.defaultActivationState())})))}}},e.prototype.checkElementMadeActive=function(t){return void 0===t||"keydown"!==t.type||this.adapter.isSurfaceActive()},e.prototype.animateActivation=function(){var t=this,i=e.strings,r=i.VAR_FG_TRANSLATE_START,o=i.VAR_FG_TRANSLATE_END,a=e.cssClasses,c=a.FG_DEACTIVATION,n=a.FG_ACTIVATION,s=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var l="",d="";if(!this.adapter.isUnbounded()){var p=this.getFgTranslationCoordinates(),h=p.startPoint,f=p.endPoint;l=h.x+"px, "+h.y+"px",d=f.x+"px, "+f.y+"px"}this.adapter.updateCssVariable(r,l),this.adapter.updateCssVariable(o,d),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(c),this.adapter.computeBoundingRect(),this.adapter.addClass(n),this.activationTimer=setTimeout((function(){t.activationTimerCallback()}),s)},e.prototype.getFgTranslationCoordinates=function(){var t,e=this.activationState,i=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?function(t,e,i){if(!t)return{x:0,y:0};var r,o,a=e.x,c=e.y,n=a+i.left,s=c+i.top;if("touchstart"===t.type){var l=t;r=l.changedTouches[0].pageX-n,o=l.changedTouches[0].pageY-s}else{var d=t;r=d.pageX-n,o=d.pageY-s}return{x:r,y:o}}(i,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2}).x-this.initialSize/2,y:t.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},e.prototype.runDeactivationUXLogicIfReady=function(){var t=this,i=e.cssClasses.FG_DEACTIVATION,r=this.activationState,o=r.hasDeactivationUXRun,a=r.isActivated;(o||!a)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(i),this.fgDeactivationRemovalTimer=setTimeout((function(){t.adapter.removeClass(i)}),he.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},e.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return t.previousActivationEvent=void 0}),e.numbers.TAP_DELAY_MS)},e.prototype.deactivateImpl=function(){var t=this,e=this.activationState;if(e.isActivated){var i=re({},e);e.isProgrammatic?(requestAnimationFrame((function(){t.animateDeactivation(i)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(i),t.resetActivationState()})))}},e.prototype.animateDeactivation=function(t){var e=t.wasActivatedByPointer,i=t.wasElementMadeActive;(e||i)&&this.runDeactivationUXLogicIfReady()},e.prototype.layoutInternal=function(){var t=this;this.frame=this.adapter.computeBoundingRect();var i=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?i:Math.sqrt(Math.pow(t.frame.width,2)+Math.pow(t.frame.height,2))+e.numbers.PADDING;var r=Math.floor(i*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&r%2!=0?this.initialSize=r-1:this.initialSize=r,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},e.prototype.updateLayoutCssVars=function(){var t=e.strings,i=t.VAR_FG_SIZE,r=t.VAR_LEFT,o=t.VAR_TOP,a=t.VAR_FG_SCALE;this.adapter.updateCssVariable(i,this.initialSize+"px"),this.adapter.updateCssVariable(a,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(r,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(o,this.unboundedCoords.top+"px"))},e}(le),ge=be;
|
|
243
|
-
/**
|
|
244
|
-
* @license
|
|
245
|
-
* Copyright 2018 Google LLC
|
|
246
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
247
|
-
*/
|
|
248
|
-
class ve extends se{constructor(){super(...arguments),this.primary=!1,this.accent=!1,this.unbounded=!1,this.disabled=!1,this.activated=!1,this.selected=!1,this.internalUseStateLayerCustomProperties=!1,this.hovering=!1,this.bgFocused=!1,this.fgActivation=!1,this.fgDeactivation=!1,this.fgScale="",this.fgSize="",this.translateStart="",this.translateEnd="",this.leftPos="",this.topPos="",this.mdcFoundationClass=ge}get isActive(){return t=this.parentElement||this,e=":active",(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e);var t,e;
|
|
249
|
-
/**
|
|
250
|
-
* @license
|
|
251
|
-
* Copyright 2018 Google LLC
|
|
252
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
253
|
-
*/}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>this.unbounded,isSurfaceActive:()=>this.isActive,isSurfaceDisabled:()=>this.disabled,addClass:t=>{switch(t){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!0;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!0;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!0}},removeClass:t=>{switch(t){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!1;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!1;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!1}},containsEventTarget:()=>!0,registerInteractionHandler:()=>{},deregisterInteractionHandler:()=>{},registerDocumentInteractionHandler:()=>{},deregisterDocumentInteractionHandler:()=>{},registerResizeHandler:()=>{},deregisterResizeHandler:()=>{},updateCssVariable:(t,e)=>{switch(t){case"--mdc-ripple-fg-scale":this.fgScale=e;break;case"--mdc-ripple-fg-size":this.fgSize=e;break;case"--mdc-ripple-fg-translate-end":this.translateEnd=e;break;case"--mdc-ripple-fg-translate-start":this.translateStart=e;break;case"--mdc-ripple-left":this.leftPos=e;break;case"--mdc-ripple-top":this.topPos=e}},computeBoundingRect:()=>(this.parentElement||this).getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})}}startPress(t){this.waitForFoundation((()=>{this.mdcFoundation.activate(t)}))}endPress(){this.waitForFoundation((()=>{this.mdcFoundation.deactivate()}))}startFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleFocus()}))}endFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleBlur()}))}startHover(){this.hovering=!0}endHover(){this.hovering=!1}waitForFoundation(t){this.mdcFoundation?t():this.updateComplete.then(t)}update(t){t.has("disabled")&&this.disabled&&this.endHover(),super.update(t)}render(){const t=this.activated&&(this.primary||!this.accent),e=this.selected&&(this.primary||!this.accent),r={"mdc-ripple-surface--accent":this.accent,"mdc-ripple-surface--primary--activated":t,"mdc-ripple-surface--accent--activated":this.accent&&this.activated,"mdc-ripple-surface--primary--selected":e,"mdc-ripple-surface--accent--selected":this.accent&&this.selected,"mdc-ripple-surface--disabled":this.disabled,"mdc-ripple-surface--hover":this.hovering,"mdc-ripple-surface--primary":this.primary,"mdc-ripple-surface--selected":this.selected,"mdc-ripple-upgraded--background-focused":this.bgFocused,"mdc-ripple-upgraded--foreground-activation":this.fgActivation,"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation,"mdc-ripple-upgraded--unbounded":this.unbounded,"mdc-ripple-surface--internal-use-state-layer-custom-properties":this.internalUseStateLayerCustomProperties};return i.html`
|
|
254
|
-
<div class="mdc-ripple-surface mdc-ripple-upgraded ${a.classMap(r)}"
|
|
255
|
-
style="${c.styleMap({"--mdc-ripple-fg-scale":this.fgScale,"--mdc-ripple-fg-size":this.fgSize,"--mdc-ripple-fg-translate-end":this.translateEnd,"--mdc-ripple-fg-translate-start":this.translateStart,"--mdc-ripple-left":this.leftPos,"--mdc-ripple-top":this.topPos})}"></div>`}}oe([r.query(".mdc-ripple-surface")],ve.prototype,"mdcRoot",void 0),oe([r.property({type:Boolean})],ve.prototype,"primary",void 0),oe([r.property({type:Boolean})],ve.prototype,"accent",void 0),oe([r.property({type:Boolean})],ve.prototype,"unbounded",void 0),oe([r.property({type:Boolean})],ve.prototype,"disabled",void 0),oe([r.property({type:Boolean})],ve.prototype,"activated",void 0),oe([r.property({type:Boolean})],ve.prototype,"selected",void 0),oe([r.property({type:Boolean})],ve.prototype,"internalUseStateLayerCustomProperties",void 0),oe([r.state()],ve.prototype,"hovering",void 0),oe([r.state()],ve.prototype,"bgFocused",void 0),oe([r.state()],ve.prototype,"fgActivation",void 0),oe([r.state()],ve.prototype,"fgDeactivation",void 0),oe([r.state()],ve.prototype,"fgScale",void 0),oe([r.state()],ve.prototype,"fgSize",void 0),oe([r.state()],ve.prototype,"translateStart",void 0),oe([r.state()],ve.prototype,"translateEnd",void 0),oe([r.state()],ve.prototype,"leftPos",void 0),oe([r.state()],ve.prototype,"topPos",void 0);
|
|
256
|
-
/**
|
|
257
|
-
* @license
|
|
258
|
-
* Copyright 2021 Google LLC
|
|
259
|
-
* SPDX-LIcense-Identifier: Apache-2.0
|
|
260
|
-
*/
|
|
261
|
-
const xe=i.css`.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}`
|
|
262
|
-
/**
|
|
263
|
-
* @license
|
|
264
|
-
* Copyright 2018 Google LLC
|
|
265
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
266
|
-
*/;let ye=class extends ve{};function ke(t,e,i){if(void 0!==e)
|
|
267
|
-
/**
|
|
268
|
-
* @license
|
|
269
|
-
* Copyright 2021 Google LLC
|
|
270
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
271
|
-
*/
|
|
272
|
-
return function(t,e,i){const r=t.constructor;if(!i){const t=`__${e}`;if(!(i=r.getPropertyDescriptor(e,t)))throw new Error("@ariaProperty must be used after a @property decorator")}const o=i;let a="";if(!o.set)throw new Error(`@ariaProperty requires a setter for ${e}`);if(t.dispatchWizEvent)return i;const c={configurable:!0,enumerable:!0,set(t){if(""===a){const t=r.getPropertyOptions(e);a="string"==typeof t.attribute?t.attribute:e}this.hasAttribute(a)&&this.removeAttribute(a),o.set.call(this,t)}};return o.get&&(c.get=function(){return o.get.call(this)}),c}(t,e,i);throw new Error("@ariaProperty only supports TypeScript Decorators")}
|
|
273
|
-
/**
|
|
274
|
-
* @license
|
|
275
|
-
* Copyright 2018 Google LLC
|
|
276
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
277
|
-
*/var $e,_e;ye.styles=[xe],ye=oe([r.customElement("mwc-ripple")],ye);const we=null!==(_e=null===($e=window.ShadyDOM)||void 0===$e?void 0:$e.inUse)&&void 0!==_e&&_e;class ze extends se{constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=t=>{this.disabled||this.setFormData(t.formData)}}findFormElement(){if(!this.shadowRoot||we)return null;const t=this.getRootNode().querySelectorAll("form");for(const e of Array.from(t))if(e.contains(this))return e;return null}connectedCallback(){var t;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(t=this.containingForm)||void 0===t||t.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.containingForm)||void 0===t||t.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(t=>{this.dispatchEvent(new Event("change",t))}))}}ze.shadowRootOptions={mode:"open",delegatesFocus:!0},oe([r.property({type:Boolean})],ze.prototype,"disabled",void 0);
|
|
278
|
-
/**
|
|
279
|
-
* @license
|
|
280
|
-
* Copyright 2020 Google LLC
|
|
281
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
282
|
-
*/
|
|
283
|
-
class Se{constructor(t){this.startPress=e=>{t().then((t=>{t&&t.startPress(e)}))},this.endPress=()=>{t().then((t=>{t&&t.endPress()}))},this.startFocus=()=>{t().then((t=>{t&&t.startFocus()}))},this.endFocus=()=>{t().then((t=>{t&&t.endFocus()}))},this.startHover=()=>{t().then((t=>{t&&t.startHover()}))},this.endHover=()=>{t().then((t=>{t&&t.endHover()}))}}}
|
|
284
|
-
/**
|
|
285
|
-
* @license
|
|
286
|
-
* Copyright 2018 Google LLC
|
|
287
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
288
|
-
*/const Oe=t=>null!=t?t:A
|
|
289
|
-
/**
|
|
290
|
-
* @license
|
|
291
|
-
* Copyright 2019 Google LLC
|
|
292
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
293
|
-
*/;class Ce extends ze{constructor(){super(...arguments),this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.name="",this.value="on",this.reducedTouchTarget=!1,this.animationClass="",this.shouldRenderRipple=!1,this.focused=!1,this.mdcFoundationClass=void 0,this.mdcFoundation=void 0,this.rippleElement=null,this.rippleHandlers=new Se((()=>(this.shouldRenderRipple=!0,this.ripple.then((t=>this.rippleElement=t)),this.ripple)))}createAdapter(){return{}}update(t){const e=t.get("indeterminate"),i=t.get("checked"),r=t.get("disabled");if(void 0!==e||void 0!==i||void 0!==r){const t=this.calculateAnimationStateName(!!i,!!e,!!r),o=this.calculateAnimationStateName(this.checked,this.indeterminate,this.disabled);this.animationClass=`${t}-${o}`}super.update(t)}calculateAnimationStateName(t,e,i){return i?"disabled":e?"indeterminate":t?"checked":"unchecked"}renderRipple(){return this.shouldRenderRipple?this.renderRippleTemplate():""}renderRippleTemplate(){return i.html`<mwc-ripple
|
|
294
|
-
.disabled="${this.disabled}"
|
|
295
|
-
unbounded></mwc-ripple>`}render(){const t=this.indeterminate||this.checked,e={"mdc-checkbox--disabled":this.disabled,"mdc-checkbox--selected":t,"mdc-checkbox--touch":!this.reducedTouchTarget,"mdc-ripple-upgraded--background-focused":this.focused,"mdc-checkbox--anim-checked-indeterminate":"checked-indeterminate"==this.animationClass,"mdc-checkbox--anim-checked-unchecked":"checked-unchecked"==this.animationClass,"mdc-checkbox--anim-indeterminate-checked":"indeterminate-checked"==this.animationClass,"mdc-checkbox--anim-indeterminate-unchecked":"indeterminate-unchecked"==this.animationClass,"mdc-checkbox--anim-unchecked-checked":"unchecked-checked"==this.animationClass,"mdc-checkbox--anim-unchecked-indeterminate":"unchecked-indeterminate"==this.animationClass},r=this.indeterminate?"mixed":void 0;return i.html`
|
|
296
|
-
<div class="mdc-checkbox mdc-checkbox--upgraded ${a.classMap(e)}">
|
|
297
|
-
<input type="checkbox"
|
|
298
|
-
class="mdc-checkbox__native-control"
|
|
299
|
-
name="${Oe(this.name)}"
|
|
300
|
-
aria-checked="${Oe(r)}"
|
|
301
|
-
aria-label="${Oe(this.ariaLabel)}"
|
|
302
|
-
aria-labelledby="${Oe(this.ariaLabelledBy)}"
|
|
303
|
-
aria-describedby="${Oe(this.ariaDescribedBy)}"
|
|
304
|
-
data-indeterminate="${this.indeterminate?"true":"false"}"
|
|
305
|
-
?disabled="${this.disabled}"
|
|
306
|
-
.indeterminate="${this.indeterminate}"
|
|
307
|
-
.checked="${this.checked}"
|
|
308
|
-
.value="${this.value}"
|
|
309
|
-
@change="${this.handleChange}"
|
|
310
|
-
@focus="${this.handleFocus}"
|
|
311
|
-
@blur="${this.handleBlur}"
|
|
312
|
-
@mousedown="${this.handleRippleMouseDown}"
|
|
313
|
-
@mouseenter="${this.handleRippleMouseEnter}"
|
|
314
|
-
@mouseleave="${this.handleRippleMouseLeave}"
|
|
315
|
-
@touchstart="${this.handleRippleTouchStart}"
|
|
316
|
-
@touchend="${this.handleRippleDeactivate}"
|
|
317
|
-
@touchcancel="${this.handleRippleDeactivate}">
|
|
318
|
-
<div class="mdc-checkbox__background"
|
|
319
|
-
@animationend="${this.resetAnimationClass}">
|
|
320
|
-
<svg class="mdc-checkbox__checkmark"
|
|
321
|
-
viewBox="0 0 24 24">
|
|
322
|
-
<path class="mdc-checkbox__checkmark-path"
|
|
323
|
-
fill="none"
|
|
324
|
-
d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
|
|
325
|
-
</svg>
|
|
326
|
-
<div class="mdc-checkbox__mixedmark"></div>
|
|
327
|
-
</div>
|
|
328
|
-
${this.renderRipple()}
|
|
329
|
-
</div>`}setFormData(t){this.name&&this.checked&&t.append(this.name,this.value)}handleFocus(){this.focused=!0,this.handleRippleFocus()}handleBlur(){this.focused=!1,this.handleRippleBlur()}handleRippleMouseDown(t){const e=()=>{window.removeEventListener("mouseup",e),this.handleRippleDeactivate()};window.addEventListener("mouseup",e),this.rippleHandlers.startPress(t)}handleRippleTouchStart(t){this.rippleHandlers.startPress(t)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}handleChange(){this.checked=this.formElement.checked,this.indeterminate=this.formElement.indeterminate}resetAnimationClass(){this.animationClass=""}get isRippleActive(){var t;return(null===(t=this.rippleElement)||void 0===t?void 0:t.isActive)||!1}}oe([r.query(".mdc-checkbox")],Ce.prototype,"mdcRoot",void 0),oe([r.query("input")],Ce.prototype,"formElement",void 0),oe([r.property({type:Boolean,reflect:!0})],Ce.prototype,"checked",void 0),oe([r.property({type:Boolean})],Ce.prototype,"indeterminate",void 0),oe([r.property({type:Boolean,reflect:!0})],Ce.prototype,"disabled",void 0),oe([r.property({type:String,reflect:!0})],Ce.prototype,"name",void 0),oe([r.property({type:String})],Ce.prototype,"value",void 0),oe([ke,r.property({type:String,attribute:"aria-label"})],Ce.prototype,"ariaLabel",void 0),oe([ke,r.property({type:String,attribute:"aria-labelledby"})],Ce.prototype,"ariaLabelledBy",void 0),oe([ke,r.property({type:String,attribute:"aria-describedby"})],Ce.prototype,"ariaDescribedBy",void 0),oe([r.property({type:Boolean})],Ce.prototype,"reducedTouchTarget",void 0),oe([r.state()],Ce.prototype,"animationClass",void 0),oe([r.state()],Ce.prototype,"shouldRenderRipple",void 0),oe([r.state()],Ce.prototype,"focused",void 0),oe([r.queryAsync("mwc-ripple")],Ce.prototype,"ripple",void 0),oe([r.eventOptions({passive:!0})],Ce.prototype,"handleRippleTouchStart",null);
|
|
330
|
-
/**
|
|
331
|
-
* @license
|
|
332
|
-
* Copyright 2021 Google LLC
|
|
333
|
-
* SPDX-LIcense-Identifier: Apache-2.0
|
|
334
|
-
*/
|
|
335
|
-
const Be=i.css`.mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);margin:calc((40px - 40px) / 2);margin:calc((var(--mdc-checkbox-touch-target-size, 40px) - 40px) / 2)}.mdc-checkbox .mdc-checkbox__ripple::before,.mdc-checkbox .mdc-checkbox__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-checkbox:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox.mdc-checkbox--selected:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox .mdc-checkbox__background{top:calc((40px - 18px) / 2);top:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);left:calc((40px - 18px) / 2);left:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2)}.mdc-checkbox .mdc-checkbox__native-control{top:calc((40px - 40px) / 2);top:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);right:calc((40px - 40px) / 2);right:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);left:calc((40px - 40px) / 2);left:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);width:40px;width:var(--mdc-checkbox-touch-target-size, 40px);height:40px;height:var(--mdc-checkbox-touch-target-size, 40px)}.mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}100%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.38);border-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:rgba(0, 0, 0, 0.38);background-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38))}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:GrayText;border-color:var(--mdc-checkbox-disabled-color, GrayText);background-color:transparent}.mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:GrayText;background-color:transparent;background-color:var(--mdc-checkbox-disabled-color, transparent)}.mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:GrayText;color:var(--mdc-checkbox-ink-color, GrayText)}.mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:GrayText;border-color:var(--mdc-checkbox-ink-color, GrayText)}.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:transparent;pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((48px - 40px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((40px - 48px) / 2);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);right:calc((40px - 48px) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);left:calc((40px - 48px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);width:48px;width:var(--mdc-checkbox-state-layer-size, 48px);height:48px;height:var(--mdc-checkbox-state-layer-size, 48px)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}:host{outline:none;display:inline-flex;-webkit-tap-highlight-color:transparent}:host([checked]),:host([indeterminate]){--mdc-ripple-color:var(--mdc-theme-secondary, #018786)}.mdc-checkbox .mdc-checkbox__background::before{content:none}`
|
|
336
|
-
/**
|
|
337
|
-
* @license
|
|
338
|
-
* Copyright 2018 Google LLC
|
|
339
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
340
|
-
*/;let Ee=class extends Ce{};Ee.styles=[Be],Ee=oe([r.customElement("mwc-checkbox")],Ee);var Ae=function(t,e,i,r){for(var o,a=arguments.length,c=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,n=t.length-1;n>=0;n--)(o=t[n])&&(c=(a<3?o(c):a>3?o(e,i,c):o(e,i))||c);return a>3&&c&&Object.defineProperty(e,i,c),c};const Fe={color:e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorContent),primaryColor:e.FtCssVariable.extend("--ft-ripple-primary-color",e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary)),secondaryColor:e.FtCssVariable.extend("--ft-ripple-secondary-color",e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary)),opacityContentOnSurfacePressed:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")};class Ie extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed)},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:r,y:o}=this.getCoordinates(t),a=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!=r?r-a.x:a.width/2),this.originY=Math.round(null!=o?o-a.y:a.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`
|
|
132
|
+
`],G([o.property()],Gt.prototype,"element",void 0),G([o.property()],Gt.prototype,"variant",void 0),e.customElement("ft-typography")(Gt);var te=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};const ee={color:e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorContent),primaryColor:e.FtCssVariable.extend("--ft-ripple-primary-color",e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary)),secondaryColor:e.FtCssVariable.extend("--ft-ripple-secondary-color",e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary)),opacityContentOnSurfacePressed:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")};class ie extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed)},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),n=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return i.html`
|
|
341
133
|
<style>
|
|
342
134
|
.ft-ripple .ft-ripple--effect,
|
|
343
135
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -350,11 +142,11 @@ const Be=i.css`.mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(-
|
|
|
350
142
|
top: ${this.originY}px;
|
|
351
143
|
}
|
|
352
144
|
</style>
|
|
353
|
-
<div class="${
|
|
145
|
+
<div class="${n.classMap(t)}">
|
|
354
146
|
<div class="ft-ripple--background"></div>
|
|
355
147
|
<div class="ft-ripple--effect"></div>
|
|
356
148
|
</div>
|
|
357
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple(),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),
|
|
149
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple(),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}ie.elementDefinitions={},ie.styles=i.css`
|
|
358
150
|
:host {
|
|
359
151
|
display: contents;
|
|
360
152
|
}
|
|
@@ -373,17 +165,17 @@ const Be=i.css`.mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(-
|
|
|
373
165
|
.ft-ripple .ft-ripple--effect {
|
|
374
166
|
position: absolute;
|
|
375
167
|
opacity: 0;
|
|
376
|
-
background-color: ${
|
|
168
|
+
background-color: ${ee.color};
|
|
377
169
|
}
|
|
378
170
|
|
|
379
171
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background,
|
|
380
172
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
381
|
-
background-color: ${
|
|
173
|
+
background-color: ${ee.secondaryColor};
|
|
382
174
|
}
|
|
383
175
|
|
|
384
176
|
.ft-ripple.ft-ripple--primary .ft-ripple--background,
|
|
385
177
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
386
|
-
background-color: ${
|
|
178
|
+
background-color: ${ee.primaryColor};
|
|
387
179
|
}
|
|
388
180
|
|
|
389
181
|
.ft-ripple .ft-ripple--background {
|
|
@@ -414,33 +206,22 @@ const Be=i.css`.mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(-
|
|
|
414
206
|
}
|
|
415
207
|
|
|
416
208
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
417
|
-
opacity: ${
|
|
209
|
+
opacity: ${ee.opacityContentOnSurfaceHover};
|
|
418
210
|
}
|
|
419
211
|
|
|
420
212
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
421
|
-
opacity: ${
|
|
213
|
+
opacity: ${ee.opacityContentOnSurfaceSelected};
|
|
422
214
|
}
|
|
423
215
|
|
|
424
216
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
425
|
-
opacity: ${
|
|
217
|
+
opacity: ${ee.opacityContentOnSurfaceFocused};
|
|
426
218
|
}
|
|
427
219
|
|
|
428
220
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
429
|
-
opacity: ${
|
|
221
|
+
opacity: ${ee.opacityContentOnSurfacePressed};
|
|
430
222
|
transform: translate(-50%, -50%) scale(1);
|
|
431
223
|
}
|
|
432
|
-
`,
|
|
433
|
-
/**
|
|
434
|
-
* @license
|
|
435
|
-
* Copyright 2021 Google LLC
|
|
436
|
-
* SPDX-LIcense-Identifier: Apache-2.0
|
|
437
|
-
*/
|
|
438
|
-
const Te=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}`
|
|
439
|
-
/**
|
|
440
|
-
* @license
|
|
441
|
-
* Copyright 2018 Google LLC
|
|
442
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
443
|
-
*/;let Re=class extends i.LitElement{render(){return i.html`<span><slot></slot></span>`}};Re.styles=[Te],Re=oe([r.customElement("mwc-icon")],Re);var De=function(t,e,i,r){for(var o,a=arguments.length,c=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,n=t.length-1;n>=0;n--)(o=t[n])&&(c=(a<3?o(c):a>3?o(e,i,c):o(e,i))||c);return a>3&&c&&Object.defineProperty(e,i,c),c};const Le=e.FtCssVariable.create("--ft-tooltip-distance","SIZE","4px"),je=e.FtCssVariable.create("--ft-tooltip-color","COLOR","#FFFFFF"),Me=e.FtCssVariable.create("--ft-tooltip-background-color","COLOR","#666666"),Pe=e.FtCssVariable.create("--ft-tooltip-z-index","NUMBER","1"),Ne=e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system");class He extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new e.Debouncer,this.revealDebouncer=new e.Debouncer}render(){return i.html`
|
|
224
|
+
`,te([o.property({type:Boolean})],ie.prototype,"primary",void 0),te([o.property({type:Boolean})],ie.prototype,"secondary",void 0),te([o.property({type:Boolean})],ie.prototype,"unbounded",void 0),te([o.property({type:Boolean})],ie.prototype,"activated",void 0),te([o.property({type:Boolean})],ie.prototype,"selected",void 0),te([o.property({type:Boolean})],ie.prototype,"disabled",void 0),te([o.state()],ie.prototype,"hovered",void 0),te([o.state()],ie.prototype,"focused",void 0),te([o.state()],ie.prototype,"pressed",void 0),te([o.state()],ie.prototype,"rippling",void 0),te([o.state()],ie.prototype,"rippleSize",void 0),te([o.state()],ie.prototype,"originX",void 0),te([o.state()],ie.prototype,"originY",void 0),te([o.query(".ft-ripple")],ie.prototype,"ripple",void 0),te([o.query(".ft-ripple--effect")],ie.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(ie);var oe=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};const se=e.FtCssVariable.create("--ft-tooltip-distance","SIZE","4px"),ne=e.FtCssVariable.create("--ft-tooltip-color","COLOR","#FFFFFF"),re=e.FtCssVariable.create("--ft-tooltip-background-color","COLOR","#666666"),le=e.FtCssVariable.create("--ft-tooltip-z-index","NUMBER","1"),ae=e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system");class ce extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new e.Debouncer,this.revealDebouncer=new e.Debouncer}render(){return i.html`
|
|
444
225
|
<div part="container"
|
|
445
226
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
446
227
|
@mouseenter=${this.onHover}
|
|
@@ -455,7 +236,7 @@ const Te=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
455
236
|
</div>
|
|
456
237
|
<slot></slot>
|
|
457
238
|
</div>
|
|
458
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,
|
|
239
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2,s=this.tooltip.style;switch(this.position){case"top":s.top=-this.tooltip.clientHeight+"px",s.left=o+"px";break;case"bottom":s.top=e.height+"px",s.left=o+"px";break;case"left":s.top=i+"px",s.left=-this.tooltip.clientWidth+"px";break;case"right":s.top=i+"px",s.left=e.width+"px"}s.maxWidth=Math.max(e.width,150)+"px"}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}ce.elementDefinitions={"ft-typography":Gt},ce.styles=i.css`
|
|
459
240
|
.ft-tooltip--container {
|
|
460
241
|
display: block;
|
|
461
242
|
position: relative;
|
|
@@ -473,21 +254,21 @@ const Te=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
473
254
|
width: max-content;
|
|
474
255
|
max-width: 150px;
|
|
475
256
|
text-align: center;
|
|
476
|
-
padding: ${
|
|
477
|
-
z-index: ${
|
|
257
|
+
padding: ${se};
|
|
258
|
+
z-index: ${le};
|
|
478
259
|
}
|
|
479
260
|
|
|
480
261
|
.ft-tooltip--content {
|
|
481
262
|
padding: 4px 8px;
|
|
482
|
-
border-radius: ${
|
|
483
|
-
background-color: ${
|
|
484
|
-
color: ${
|
|
263
|
+
border-radius: ${ae};
|
|
264
|
+
background-color: ${re};
|
|
265
|
+
color: ${ne};
|
|
485
266
|
top: -500px;
|
|
486
267
|
left: -500px;
|
|
487
268
|
position: relative;
|
|
488
269
|
word-break: break-word;
|
|
489
270
|
}
|
|
490
|
-
`,
|
|
271
|
+
`,oe([o.property()],ce.prototype,"text",void 0),oe([o.property({type:Boolean})],ce.prototype,"manual",void 0),oe([o.property({type:Boolean})],ce.prototype,"inline",void 0),oe([o.property({type:Number})],ce.prototype,"delay",void 0),oe([o.property()],ce.prototype,"position",void 0),oe([o.queryAssignedNodes("",!0)],ce.prototype,"slotNodes",void 0),oe([o.query(".ft-tooltip--container")],ce.prototype,"container",void 0),oe([o.query("slot")],ce.prototype,"target",void 0),oe([o.query(".ft-tooltip")],ce.prototype,"tooltip",void 0),oe([o.query(".ft-tooltip--content")],ce.prototype,"tooltipContent",void 0),oe([o.state()],ce.prototype,"visible",void 0),e.customElement("ft-tooltip")(ce);const he={color:e.FtCssVariable.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariable.create("--ft-loader-size","SIZE","80px")};class pe extends e.FtLitElement{static get styles(){return i.css`
|
|
491
272
|
:host {
|
|
492
273
|
line-height: 0;
|
|
493
274
|
}
|
|
@@ -496,8 +277,8 @@ const Te=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
496
277
|
display: inline-block;
|
|
497
278
|
position: relative;
|
|
498
279
|
|
|
499
|
-
width: ${
|
|
500
|
-
height: ${
|
|
280
|
+
width: ${he.size};
|
|
281
|
+
height: ${he.size};
|
|
501
282
|
}
|
|
502
283
|
|
|
503
284
|
.ft-loader div {
|
|
@@ -506,7 +287,7 @@ const Te=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
506
287
|
width: 25%;
|
|
507
288
|
height: 25%;
|
|
508
289
|
border-radius: 50%;
|
|
509
|
-
background: ${
|
|
290
|
+
background: ${he.color};
|
|
510
291
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
511
292
|
}
|
|
512
293
|
|
|
@@ -553,7 +334,7 @@ const Te=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
553
334
|
transform: translate(0, 0);
|
|
554
335
|
}
|
|
555
336
|
100% {
|
|
556
|
-
transform: translate(calc(0.35 * ${
|
|
337
|
+
transform: translate(calc(0.35 * ${he.size}), 0);
|
|
557
338
|
}
|
|
558
339
|
}
|
|
559
340
|
`}render(){return i.html`
|
|
@@ -563,7 +344,45 @@ const Te=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
563
344
|
<div></div>
|
|
564
345
|
<div></div>
|
|
565
346
|
</div>
|
|
566
|
-
`}}e.customElement("ft-loader")(
|
|
347
|
+
`}}var fe,de;e.customElement("ft-loader")(pe),function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(fe||(fe={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(de||(de={}));const ue=new Map([...["abw"].map((t=>[t,de.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,de.AUDIO])),...["avi"].map((t=>[t,de.AVI])),...["chm","xhs"].map((t=>[t,de.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,de.CODE])),...["csv"].map((t=>[t,de.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,de.DITA])),...["epub"].map((t=>[t,de.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,de.EXCEL])),...["flac"].map((t=>[t,de.FLAC])),...["gif"].map((t=>[t,de.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,de.GZIP])),...["html","htm","xhtml"].map((t=>[t,de.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,de.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,de.JPEG])),...["json"].map((t=>[t,de.JSON])),...["m4a","m4p"].map((t=>[t,de.M4A])),...["mov","qt"].map((t=>[t,de.MOV])),...["mp3"].map((t=>[t,de.MP3])),...["mp4","m4v"].map((t=>[t,de.MP4])),...["ogg","oga"].map((t=>[t,de.OGG])),...["pdf","ps"].map((t=>[t,de.PDF])),...["png"].map((t=>[t,de.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,de.POWERPOINT])),...["rar"].map((t=>[t,de.RAR])),...["stp"].map((t=>[t,de.STP])),...["txt","rtf","md","mdown"].map((t=>[t,de.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,de.VIDEO])),...["wav"].map((t=>[t,de.WAV])),...["wma"].map((t=>[t,de.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,de.WORD])),...["xml","xsl","rdf"].map((t=>[t,de.XML])),...["yaml","yml","x-yaml"].map((t=>[t,de.YAML])),...["zip"].map((t=>[t,de.ZIP]))]),be=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);var ve,ge=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};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(ve||(ve={}));const xe={size:e.FtCssVariable.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:e.FtCssVariable.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:e.FtCssVariable.extend("--ft-icon-file-format-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:e.FtCssVariable.extend("--ft-icon-material-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class ye extends e.FtLitElement{constructor(){super(...arguments),this.variant=ve.fluid_topics}render(){return i.html`
|
|
348
|
+
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
349
|
+
${r.unsafeHTML(this.getIcon())}
|
|
350
|
+
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
351
|
+
</i>
|
|
352
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;let o=this.textContent;return this.variant===ve.file_format?null!==(t=de[o.toUpperCase()])&&void 0!==t?t:o:this.variant===ve.fluid_topics?null!==(e=fe[o.toUpperCase()])&&void 0!==e?e:o:i.nothing}}ye.elementDefinitions={},ye.styles=i.css`
|
|
353
|
+
:host, i.ft-icon {
|
|
354
|
+
display: inline-block;
|
|
355
|
+
width: ${xe.size};
|
|
356
|
+
height: ${xe.size};
|
|
357
|
+
text-align: center;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
i.ft-icon {
|
|
361
|
+
font-size: ${xe.size};
|
|
362
|
+
line-height: 1;
|
|
363
|
+
font-weight: normal;
|
|
364
|
+
text-transform: none;
|
|
365
|
+
font-style: normal;
|
|
366
|
+
font-variant: normal;
|
|
367
|
+
speak: none;
|
|
368
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
369
|
+
text-rendering: auto;
|
|
370
|
+
-webkit-font-smoothing: antialiased;
|
|
371
|
+
-moz-osx-font-smoothing: grayscale;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.ft-icon--fluid-topics {
|
|
375
|
+
font-family: ${xe.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.ft-icon--file-format {
|
|
379
|
+
font-family: ${xe.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.ft-icon--material {
|
|
383
|
+
font-family: ${xe.materialFontFamily}, "Material Icons", sans-serif;
|
|
384
|
+
}
|
|
385
|
+
`,ge([o.property()],ye.prototype,"variant",void 0),ge([o.query("slot")],ye.prototype,"slottedContent",void 0),e.customElement("ft-icon")(ye);var me=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};const $e=e.FtCssVariable.extend("--ft-button-color",e.designSystemVariables.colorPrimary),we={backgroundColor:e.FtCssVariable.extend("--ft-button-background-color",e.designSystemVariables.colorSurface),borderRadius:e.FtCssVariable.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusL),color:$e,fontSize:e.FtCssVariable.extend("--ft-button-font-size",Nt.fontSize),iconSize:e.FtCssVariable.create("--ft-button-icon-size","SIZE","24px"),rippleColor:e.FtCssVariable.extend("--ft-button-ripple-color",$e),opacityDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},ke=e.FtCssVariable.extend("--ft-button-primary-color",e.FtCssVariable.extend("--ft-button-color",e.designSystemVariables.colorOnPrimary)),Se={backgroundColor:e.FtCssVariable.extend("--ft-button-primary-background-color",e.FtCssVariable.extend("--ft-button-background-color",e.designSystemVariables.colorPrimary)),color:ke,rippleColor:e.FtCssVariable.extend("--ft-button-primary-ripple-color",ke)},ze=e.FtCssVariable.extend("--ft-button-dense-border-radius",e.FtCssVariable.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusM));class Oe extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}static get styles(){return[e.noTextSelect,i.css`
|
|
567
386
|
:host {
|
|
568
387
|
display: inline-block;
|
|
569
388
|
max-width: 100%;
|
|
@@ -602,18 +421,18 @@ const Te=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
602
421
|
border: none;
|
|
603
422
|
pointer-events: auto;
|
|
604
423
|
|
|
605
|
-
--ft-button-internal-font-size: ${
|
|
424
|
+
--ft-button-internal-font-size: ${we.fontSize};
|
|
606
425
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
607
|
-
--ft-button-internal-color: ${
|
|
608
|
-
|
|
426
|
+
--ft-button-internal-color: ${we.color};
|
|
427
|
+
${e.setVariable(xe.size,we.iconSize)};
|
|
609
428
|
--ft-button-internal-vertical-padding: 6px;
|
|
610
429
|
--ft-button-internal-horizontal-padding: 8px;
|
|
611
|
-
${e.setVariable(
|
|
612
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height),
|
|
430
|
+
${e.setVariable(ee.color,we.rippleColor)};
|
|
431
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${we.iconSize});
|
|
613
432
|
|
|
614
|
-
border-radius: ${
|
|
433
|
+
border-radius: ${we.borderRadius};
|
|
615
434
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
616
|
-
background-color: ${
|
|
435
|
+
background-color: ${we.backgroundColor};
|
|
617
436
|
color: var(--ft-button-internal-color);
|
|
618
437
|
-webkit-mask-image: radial-gradient(white, black);
|
|
619
438
|
}
|
|
@@ -625,7 +444,7 @@ const Te=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
625
444
|
.ft-button--dense {
|
|
626
445
|
--ft-button-internal-vertical-padding: 2px;
|
|
627
446
|
--ft-button-internal-horizontal-padding: 4px;
|
|
628
|
-
border-radius: ${
|
|
447
|
+
border-radius: ${ze};
|
|
629
448
|
}
|
|
630
449
|
|
|
631
450
|
.ft-button--round {
|
|
@@ -634,13 +453,13 @@ const Te=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
634
453
|
|
|
635
454
|
.ft-button[disabled] {
|
|
636
455
|
filter: grayscale(1);
|
|
637
|
-
opacity: ${
|
|
456
|
+
opacity: ${we.opacityDisabled};
|
|
638
457
|
}
|
|
639
458
|
|
|
640
459
|
.ft-button.ft-button--primary {
|
|
641
|
-
background-color: ${
|
|
642
|
-
--ft-button-internal-color: ${
|
|
643
|
-
${e.setVariable(
|
|
460
|
+
background-color: ${Se.backgroundColor};
|
|
461
|
+
--ft-button-internal-color: ${Se.color};
|
|
462
|
+
${e.setVariable(ee.color,Se.rippleColor)};
|
|
644
463
|
}
|
|
645
464
|
|
|
646
465
|
.ft-button.ft-button--outlined {
|
|
@@ -658,8 +477,8 @@ const Te=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
658
477
|
text-overflow: ellipsis;
|
|
659
478
|
display: block;
|
|
660
479
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
661
|
-
${e.setVariable(
|
|
662
|
-
${e.setVariable(
|
|
480
|
+
${e.setVariable(Nt.fontSize,"var(--ft-button-internal-font-size)")};
|
|
481
|
+
${e.setVariable(Nt.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
663
482
|
}
|
|
664
483
|
|
|
665
484
|
.ft-button--safari-fix .ft-button--label {
|
|
@@ -676,28 +495,27 @@ const Te=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
676
495
|
display: none;
|
|
677
496
|
}
|
|
678
497
|
|
|
679
|
-
|
|
498
|
+
ft-icon {
|
|
680
499
|
flex-shrink: 0;
|
|
681
|
-
width: var(--mdc-icon-size);
|
|
682
500
|
}
|
|
683
501
|
|
|
684
|
-
.ft-button--label[hidden] +
|
|
502
|
+
.ft-button--label[hidden] + ft-icon {
|
|
685
503
|
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
686
504
|
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
687
505
|
}
|
|
688
506
|
|
|
689
|
-
.ft-button:not(.ft-button--trailing-icon)
|
|
507
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
690
508
|
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
691
509
|
order: -1;
|
|
692
510
|
}
|
|
693
511
|
|
|
694
512
|
ft-loader {
|
|
695
|
-
${e.setVariable(
|
|
696
|
-
${e.setVariable(
|
|
513
|
+
${e.setVariable(he.size,we.iconSize)};
|
|
514
|
+
${e.setVariable(he.color,"var(--ft-button-internal-color)")};
|
|
697
515
|
}
|
|
698
516
|
`]}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":e.isSafari,"ft-no-text-select":!0};return this.addTooltip(i.html`
|
|
699
517
|
<button part="button"
|
|
700
|
-
class="${
|
|
518
|
+
class="${n.classMap(t)}"
|
|
701
519
|
aria-label="${this.getLabel()}"
|
|
702
520
|
?disabled=${this.isDisabled()}>
|
|
703
521
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
@@ -717,131 +535,222 @@ const Te=i.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
717
535
|
</ft-tooltip>
|
|
718
536
|
`}resolveIcon(){return this.loading?i.html`
|
|
719
537
|
<ft-loader></ft-loader> `:this.icon?i.html`
|
|
720
|
-
<
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
.
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
538
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:i.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Oe.elementDefinitions={"ft-ripple":ie,"ft-tooltip":ce,"ft-typography":Gt,"ft-icon":ye,"ft-loader":pe},me([o.property({type:Boolean})],Oe.prototype,"primary",void 0),me([o.property({type:Boolean})],Oe.prototype,"outlined",void 0),me([o.property({type:Boolean})],Oe.prototype,"disabled",void 0),me([o.property({type:Boolean})],Oe.prototype,"dense",void 0),me([o.property({type:Boolean})],Oe.prototype,"round",void 0),me([o.property({type:String})],Oe.prototype,"label",void 0),me([o.property({type:String})],Oe.prototype,"icon",void 0),me([o.property({type:Boolean})],Oe.prototype,"trailingIcon",void 0),me([o.property({type:Boolean})],Oe.prototype,"loading",void 0),me([o.property({type:String})],Oe.prototype,"tooltipPosition",void 0),me([o.query(".ft-button")],Oe.prototype,"button",void 0),me([o.query(".ft-button--label slot")],Oe.prototype,"slottedContent",void 0),e.customElement("ft-button")(Oe);var Be=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};const Ce=e.FtCssVariable.extend("--ft-checkbox-text-color",e.designSystemVariables.colorOnSurfaceHigh),Ee=e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),Ie=e.FtCssVariable.external(e.designSystemVariables.colorOnPrimary,"Design system"),De=e.FtCssVariable.extend("--ft-checkbox-border-color",e.designSystemVariables.colorOnSurfaceMedium),Fe=e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system");class Le extends e.FtLitElement{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 i.html`
|
|
539
|
+
<label class="${n.classMap(t)}">
|
|
540
|
+
<div class="ft-checkbox--box-container">
|
|
541
|
+
<input type="checkbox"
|
|
542
|
+
name=${this.name}
|
|
543
|
+
.checked=${this.checked}
|
|
544
|
+
.disabled=${this.disabled}
|
|
545
|
+
@change=${this.onChange}
|
|
546
|
+
>
|
|
547
|
+
<ft-ripple
|
|
548
|
+
?disabled=${this.disabled}
|
|
549
|
+
?primary=${this.checked||this.indeterminate}
|
|
550
|
+
unbounded>
|
|
551
|
+
</ft-ripple>
|
|
552
|
+
<div class="ft-checkbox--box">
|
|
553
|
+
<svg class="ft-checkbox--checkmark" viewBox="0 0 24 24">
|
|
554
|
+
<path class="ft-checkbox--checkmark-path" fill="none"
|
|
555
|
+
d=${this.indeterminate&&!this.checked?"M2,12 22,12":"M1.73,12.91 8.1,19.28 22.79,4.59"}></path>
|
|
556
|
+
</svg>
|
|
557
|
+
</div>
|
|
558
|
+
</div>
|
|
559
|
+
<ft-typography variant="body2">
|
|
560
|
+
<slot></slot>
|
|
561
|
+
</ft-typography>
|
|
562
|
+
</label>
|
|
563
|
+
`}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)}}Le.elementDefinitions={"ft-ripple":ie,"ft-typography":Gt},Le.styles=i.css`
|
|
564
|
+
* {
|
|
565
|
+
box-sizing: border-box;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.ft-checkbox {
|
|
569
|
+
box-sizing: border-box;
|
|
570
|
+
color: ${Ce};
|
|
571
|
+
|
|
572
|
+
display: inline-flex;
|
|
573
|
+
align-items: center;
|
|
574
|
+
gap: 4px;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.ft-checkbox--disabled {
|
|
578
|
+
color: ${Fe};
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
input {
|
|
582
|
+
opacity: 0;
|
|
583
|
+
position: absolute;
|
|
584
|
+
width: 40px;
|
|
585
|
+
height: 40px;
|
|
586
|
+
margin: 0;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.ft-checkbox--box-container {
|
|
590
|
+
position: relative;
|
|
591
|
+
width: 40px;
|
|
592
|
+
height: 40px;
|
|
593
|
+
|
|
594
|
+
display: flex;
|
|
595
|
+
justify-content: center;
|
|
596
|
+
align-items: center;
|
|
597
|
+
flex-shrink: 0;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.ft-checkbox--box {
|
|
601
|
+
border: 2px solid ${De};
|
|
602
|
+
border-radius: 2px;
|
|
603
|
+
|
|
604
|
+
width: 18px;
|
|
605
|
+
height: 18px;
|
|
606
|
+
|
|
607
|
+
color: ${Ie};
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
.ft-checkbox--checked .ft-checkbox--box,
|
|
612
|
+
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
613
|
+
border-color: ${Ee};
|
|
614
|
+
background-color: ${Ee};
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
.ft-checkbox--disabled .ft-checkbox--box {
|
|
618
|
+
border-color: ${Fe};
|
|
619
|
+
background-color: transparent;
|
|
620
|
+
color: ${Fe};
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
.ft-checkbox--checkmark {
|
|
624
|
+
transition: opacity 180ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 180ms cubic-bezier(0, 0, 0.2, 1) 0ms;
|
|
625
|
+
opacity: 0;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.ft-checkbox--checkmark-path {
|
|
629
|
+
stroke-dashoffset: 0;
|
|
630
|
+
stroke: currentcolor;
|
|
631
|
+
stroke-width: 3px;
|
|
632
|
+
stroke-dasharray: 30;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
.ft-checkbox--checked .ft-checkbox--checkmark,
|
|
636
|
+
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
637
|
+
opacity: 1;
|
|
638
|
+
}
|
|
639
|
+
`,Be([o.property()],Le.prototype,"name",void 0),Be([o.property({type:Boolean})],Le.prototype,"checked",void 0),Be([o.property({type:Boolean})],Le.prototype,"indeterminate",void 0),Be([o.property({type:Boolean})],Le.prototype,"disabled",void 0),Be([o.query(".ft-checkbox")],Le.prototype,"container",void 0),Be([o.query("ft-ripple")],Le.prototype,"ripple",void 0),e.customElement("ft-checkbox")(Le);var je=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};const Me=e.FtCssVariable.extend("--ft-radio-text-color",e.designSystemVariables.colorOnSurfaceHigh),Ae=e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),Te=(e.FtCssVariable.external(e.designSystemVariables.colorOnPrimary,"Design system"),e.FtCssVariable.extend("--ft-radio-border-color",e.designSystemVariables.colorOnSurfaceMedium)),Ne=e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system");class Re extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class Pe extends e.FtLitElement{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 i.html`
|
|
640
|
+
<div class="${n.classMap(t)}">
|
|
641
|
+
<div class="ft-radio--box-container">
|
|
642
|
+
<input id="radio-button"
|
|
643
|
+
type="radio"
|
|
644
|
+
name="${this.name}"
|
|
645
|
+
value="${this.value}"
|
|
646
|
+
.checked=${this.checked}
|
|
647
|
+
.disabled=${this.disabled}
|
|
648
|
+
@change=${this.onChange}
|
|
649
|
+
>
|
|
650
|
+
<ft-ripple
|
|
651
|
+
?disabled=${this.disabled}
|
|
652
|
+
?primary=${this.checked}
|
|
653
|
+
unbounded>
|
|
654
|
+
</ft-ripple>
|
|
655
|
+
<div class="ft-radio--box">
|
|
656
|
+
</div>
|
|
657
|
+
</div>
|
|
658
|
+
<label for="radio-button" @click=${t=>t.stopPropagation()}>
|
|
659
|
+
<ft-typography variant="body2">
|
|
660
|
+
<slot></slot>
|
|
661
|
+
</ft-typography>
|
|
662
|
+
</label>
|
|
663
|
+
</div>
|
|
664
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new Re(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 Re(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Pe.elementDefinitions={"ft-ripple":ie,"ft-typography":Gt},Pe.styles=i.css`
|
|
665
|
+
* {
|
|
666
|
+
box-sizing: border-box;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
.ft-radio {
|
|
670
|
+
box-sizing: border-box;
|
|
671
|
+
color: ${Me};
|
|
672
|
+
|
|
673
|
+
display: inline-flex;
|
|
674
|
+
align-items: center;
|
|
675
|
+
gap: 4px;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
.ft-radio--disabled {
|
|
679
|
+
color: ${Ne};
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
input {
|
|
683
|
+
opacity: 0;
|
|
684
|
+
position: absolute;
|
|
685
|
+
width: 40px;
|
|
686
|
+
height: 40px;
|
|
687
|
+
margin: 0;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
.ft-radio--box-container {
|
|
691
|
+
position: relative;
|
|
692
|
+
width: 40px;
|
|
693
|
+
height: 40px;
|
|
694
|
+
|
|
695
|
+
display: flex;
|
|
696
|
+
justify-content: center;
|
|
697
|
+
align-items: center;
|
|
698
|
+
flex-shrink: 0;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
.ft-radio--box {
|
|
702
|
+
border: 2px solid ${Te};
|
|
703
|
+
border-radius: 50%;
|
|
704
|
+
|
|
705
|
+
display: flex;
|
|
706
|
+
justify-content: center;
|
|
707
|
+
align-items: center;
|
|
708
|
+
|
|
709
|
+
width: 20px;
|
|
710
|
+
height: 20px;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.ft-radio--box:after {
|
|
714
|
+
content: " ";
|
|
715
|
+
background-color: ${Ae};
|
|
716
|
+
|
|
717
|
+
border-radius: 50%;
|
|
718
|
+
|
|
719
|
+
width: 12px;
|
|
720
|
+
height: 12px;
|
|
721
|
+
|
|
722
|
+
transform: scale(0);
|
|
723
|
+
transition: transform 100ms ease;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
.ft-radio--checked .ft-radio--box {
|
|
727
|
+
border-color: ${Ae};
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
.ft-radio--checked .ft-radio--box:after {
|
|
732
|
+
transform: scale(1);
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
.ft-radio--disabled .ft-radio--box {
|
|
736
|
+
border-color: ${Ne};
|
|
737
|
+
background-color: transparent;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
.ft-radio--disabled .ft-radio--box:after {
|
|
741
|
+
background-color: ${Ne};
|
|
742
|
+
}
|
|
743
|
+
`,je([o.property()],Pe.prototype,"value",void 0),je([o.property()],Pe.prototype,"name",void 0),je([o.property({type:Boolean})],Pe.prototype,"checked",void 0),je([o.property({type:Boolean})],Pe.prototype,"disabled",void 0),je([o.query(".ft-radio")],Pe.prototype,"container",void 0),je([o.query("ft-ripple")],Pe.prototype,"ripple",void 0),je([o.query("input")],Pe.prototype,"input",void 0);var _e=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 Ue extends e.FtLitElement{constructor(){super(...arguments),this.name=""}render(){return i.html`
|
|
744
|
+
<slot @slotchange=${this.onSlotChange}
|
|
745
|
+
@change=${this.onChange}
|
|
746
|
+
@keydown=${this.onKeyDown}
|
|
747
|
+
@focusin=${this.onFocusIn}
|
|
748
|
+
></slot>
|
|
749
|
+
`}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}))}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))}onFocusIn(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}Ue.elementDefinitions={},Ue.styles=i.css`
|
|
750
|
+
:host {
|
|
751
|
+
display: contents;
|
|
752
|
+
}
|
|
753
|
+
`,_e([o.property()],Ue.prototype,"name",void 0),_e([o.queryAssignedElements()],Ue.prototype,"radioButtons",void 0),e.customElement("ft-radio")(Pe),e.customElement("ft-radio-group")(Ue);var Ze=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};const He={borderRadiusM:e.FtCssVariable.external(e.designSystemVariables.borderRadiusM,"Design system"),colorOutline:e.FtCssVariable.external(e.designSystemVariables.colorOutline,"Design system"),colorOnSurface:e.FtCssVariable.external(e.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:e.FtCssVariable.external(e.designSystemVariables.colorOnPrimary,"Design system"),fontFamily:e.FtCssVariable.external(St.fontFamily,"Body2 typography"),fontSize:e.FtCssVariable.external(St.fontSize,"Body2 typography"),fontWeight:e.FtCssVariable.external(St.fontWeight,"Body2 typography"),letterSpacing:e.FtCssVariable.external(St.letterSpacing,"Body2 typography"),lineHeight:e.FtCssVariable.external(St.lineHeight,"Body2 typography"),textTransform:e.FtCssVariable.external(St.textTransform,"Body2 typography")};class Ke extends e.FtLitElement{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 i.html`
|
|
845
754
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
846
755
|
${null==this.parent?null:i.html`
|
|
847
756
|
<div tabindex="0"
|
|
@@ -850,11 +759,11 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
850
759
|
@keyup=${this.goBackOnKeyPress}
|
|
851
760
|
@click=${this.goBackOnClick}>
|
|
852
761
|
<ft-ripple></ft-ripple>
|
|
853
|
-
<
|
|
762
|
+
<ft-icon variant="material">chevron_left</ft-icon>
|
|
854
763
|
<ft-typography variant="body2">${this.parent.label}</ft-typography>
|
|
855
764
|
</div>
|
|
856
765
|
`}
|
|
857
|
-
${
|
|
766
|
+
${s.repeat(e,(t=>t.value),(t=>{var e;return i.html`
|
|
858
767
|
<div class="ft-filter-level--option" part="options">
|
|
859
768
|
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
860
769
|
${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?i.nothing:i.html`
|
|
@@ -877,26 +786,24 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
877
786
|
`:i.nothing}
|
|
878
787
|
</div>
|
|
879
788
|
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var e;return i.html`
|
|
880
|
-
<
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
></mwc-checkbox>
|
|
888
|
-
</mwc-formfield>
|
|
789
|
+
<ft-checkbox name="${this.id}"
|
|
790
|
+
.checked=${t.selected}
|
|
791
|
+
.disabled=${this.disabled}
|
|
792
|
+
.indeterminate=${Xt(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}
|
|
793
|
+
@change=${e=>this.optionsChanged(e,t)}>
|
|
794
|
+
${t.label}
|
|
795
|
+
</ft-checkbox>
|
|
889
796
|
`}buildMonoValuedOption(t){return i.html`
|
|
890
|
-
<
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
</
|
|
899
|
-
`}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}
|
|
797
|
+
<ft-radio name="${this.id+Math.round(1e6*Math.random())}"
|
|
798
|
+
.checked=${t.selected}
|
|
799
|
+
?disabled=${this.disabled}
|
|
800
|
+
@click=${e=>this.optionsChanged(e,t)}
|
|
801
|
+
@keyup=${e=>this.onRadioKeyUp(e,t)}
|
|
802
|
+
@change=${t=>t.stopPropagation()}>
|
|
803
|
+
|
|
804
|
+
${t.label}
|
|
805
|
+
</ft-radio>
|
|
806
|
+
`}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}))}}Ke.elementDefinitions={"ft-button":Oe,"ft-ripple":ie,"ft-typography":Gt,"ft-checkbox":Le,"ft-icon":ye,"ft-radio":Pe},Ke.styles=[i.css`
|
|
900
807
|
.ft-filter-level--container {
|
|
901
808
|
display: flex;
|
|
902
809
|
flex-direction: column;
|
|
@@ -910,21 +817,21 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
910
817
|
flex-shrink: 0;
|
|
911
818
|
text-decoration: none;
|
|
912
819
|
position: relative;
|
|
913
|
-
border-radius: ${
|
|
820
|
+
border-radius: ${He.borderRadiusM};
|
|
914
821
|
overflow: hidden;
|
|
915
822
|
display: flex;
|
|
916
823
|
align-items: center;
|
|
917
824
|
padding: 4px 4px;
|
|
918
825
|
gap: 4px;
|
|
919
826
|
cursor: pointer;
|
|
920
|
-
color: ${
|
|
827
|
+
color: ${He.colorOnSurface};
|
|
921
828
|
}
|
|
922
829
|
|
|
923
830
|
.ft-filter-level--go-back:focus {
|
|
924
831
|
outline: none;
|
|
925
832
|
}
|
|
926
833
|
|
|
927
|
-
.ft-filter-level--go-back
|
|
834
|
+
.ft-filter-level--go-back ft-icon {
|
|
928
835
|
flex-shrink: 0;
|
|
929
836
|
}
|
|
930
837
|
|
|
@@ -946,49 +853,26 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
946
853
|
}
|
|
947
854
|
|
|
948
855
|
ft-button {
|
|
949
|
-
${e.setVariable(
|
|
856
|
+
${e.setVariable(we.color,He.colorOnSurface)};
|
|
950
857
|
}
|
|
951
858
|
|
|
952
|
-
|
|
859
|
+
ft-radio, ft-checkbox {
|
|
953
860
|
flex-shrink: 1;
|
|
954
861
|
flex-grow: 1;
|
|
955
862
|
display: block;
|
|
956
863
|
max-width: calc(100% + 10px);
|
|
957
864
|
margin-left: -10px;
|
|
958
865
|
word-break: break-word;
|
|
959
|
-
|
|
960
|
-
--mdc-theme-secondary: ${mi.colorPrimary};
|
|
961
|
-
|
|
962
|
-
--mdc-radio-unchecked-color: ${mi.colorOnSurfaceMedium};
|
|
963
|
-
--mdc-checkbox-unchecked-color: ${mi.colorOnSurfaceMedium};
|
|
964
|
-
--mdc-checkbox-ink-color: ${mi.colorOnPrimary};
|
|
965
|
-
|
|
966
|
-
--mdc-radio-disabled-color: ${mi.colorOnSurfaceDisabled};
|
|
967
|
-
--mdc-checkbox-disabled-color: ${mi.colorOnSurfaceDisabled};
|
|
968
|
-
|
|
969
|
-
--mdc-theme-on-surface: ${mi.colorPrimary};
|
|
970
|
-
|
|
971
|
-
--mdc-typography-body2-font-family: ${mi.fontFamily};
|
|
972
|
-
--mdc-typography-body2-font-size: ${mi.fontSize};
|
|
973
|
-
--mdc-typography-body2-font-weight: ${mi.fontWeight};
|
|
974
|
-
--mdc-typography-body2-letter-spacing: ${mi.letterSpacing};
|
|
975
|
-
--mdc-typography-body2-line-height: ${mi.lineHeight};
|
|
976
|
-
--mdc-typography-body2-text-transform: ${mi.textTransform};
|
|
977
|
-
--mdc-theme-text-primary-on-background: ${mi.colorOnSurface};
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
.ft-filter--disabled {
|
|
981
|
-
--mdc-theme-text-primary-on-background: ${mi.colorOnSurfaceDisabled};
|
|
982
866
|
}
|
|
983
|
-
`],
|
|
867
|
+
`],Ze([o.property({type:String})],Ke.prototype,"id",void 0),Ze([o.property({type:Object})],Ke.prototype,"parent",void 0),Ze([o.property({type:Array})],Ke.prototype,"options",void 0),Ze([o.property({type:Boolean})],Ke.prototype,"multivalued",void 0),Ze([o.property({type:Boolean})],Ke.prototype,"disabled",void 0),Ze([o.property({type:Boolean})],Ke.prototype,"hideSelectedOptions",void 0),Ze([o.property({type:Boolean})],Ke.prototype,"preventNavigation",void 0),Ze([o.property({type:String})],Ke.prototype,"filter",void 0),Ze([o.property({type:String})],Ke.prototype,"moreValuesButtonLabel",void 0),Ze([o.property({type:Number})],Ke.prototype,"displayedValuesLimit",void 0),Ze([o.query(".ft-filter-level--container")],Ke.prototype,"container",void 0),Ze([o.state()],Ke.prototype,"displayedPages",void 0);var qe=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};const Ve={buttonsColor:e.FtCssVariable.extend("--ft-snap-scroll-buttons-color",e.designSystemVariables.colorPrimary),buttonsZIndex:e.FtCssVariable.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:e.FtCssVariable.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system")};class We extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class Ge extends e.FtLitElement{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.Debouncer(200),this.updateScrollDebouncer=new e.Debouncer(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=n.classMap({"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":e.isSafari}),o=this.controls&&this.withScroll;return i.html`
|
|
984
868
|
<div part="container" class="${t}">
|
|
985
869
|
<ft-button
|
|
986
870
|
class="ft-snap-scroll--previous"
|
|
987
871
|
part="controls"
|
|
988
872
|
primary
|
|
989
873
|
icon="${this.horizontal?"arrow_back_ios_new":"expand_less"}"
|
|
990
|
-
?hidden=${!
|
|
991
|
-
?disabled=${!
|
|
874
|
+
?hidden=${!o||this.startReached}
|
|
875
|
+
?disabled=${!o||this.startReached}
|
|
992
876
|
@click=${this.previous}
|
|
993
877
|
></ft-button>
|
|
994
878
|
<slot class="ft-snap-scroll--content"
|
|
@@ -999,12 +883,12 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
999
883
|
part="controls"
|
|
1000
884
|
primary
|
|
1001
885
|
icon="${this.horizontal?"arrow_forward_ios":"expand_more"}"
|
|
1002
|
-
?hidden=${!
|
|
1003
|
-
?disabled=${!
|
|
886
|
+
?hidden=${!o||this.endReached}
|
|
887
|
+
?disabled=${!o||this.endReached}
|
|
1004
888
|
@click=${this.next}
|
|
1005
889
|
></ft-button>
|
|
1006
890
|
</div>
|
|
1007
|
-
`}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
|
|
891
|
+
`}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 We(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)}}Ge.elementDefinitions={"ft-button":Oe},Ge.styles=i.css`
|
|
1008
892
|
.ft-snap-scroll {
|
|
1009
893
|
box-sizing: border-box;
|
|
1010
894
|
position: relative;
|
|
@@ -1039,7 +923,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1039
923
|
flex-wrap: nowrap;
|
|
1040
924
|
align-items: flex-start;
|
|
1041
925
|
justify-content: flex-start;
|
|
1042
|
-
gap: ${
|
|
926
|
+
gap: ${Ve.gap};
|
|
1043
927
|
}
|
|
1044
928
|
|
|
1045
929
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -1082,11 +966,11 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1082
966
|
.ft-snap-scroll--next {
|
|
1083
967
|
position: absolute;
|
|
1084
968
|
display: flex;
|
|
1085
|
-
z-index: ${
|
|
969
|
+
z-index: ${Ve.buttonsZIndex};
|
|
1086
970
|
opacity: 1;
|
|
1087
971
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1088
|
-
${e.setVariable(
|
|
1089
|
-
${e.setVariable(
|
|
972
|
+
${e.setVariable(we.backgroundColor,"transparent")};
|
|
973
|
+
${e.setVariable(we.color,Ve.buttonsColor)};
|
|
1090
974
|
}
|
|
1091
975
|
|
|
1092
976
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1099,55 +983,55 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1099
983
|
top: 0;
|
|
1100
984
|
left: -1px;
|
|
1101
985
|
bottom: 0;
|
|
1102
|
-
background: linear-gradient(to right, ${
|
|
986
|
+
background: linear-gradient(to right, ${Ve.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1103
987
|
}
|
|
1104
988
|
|
|
1105
989
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1106
990
|
top: -1px;
|
|
1107
991
|
left: 0;
|
|
1108
992
|
right: 0;
|
|
1109
|
-
background: linear-gradient(to bottom, ${
|
|
993
|
+
background: linear-gradient(to bottom, ${Ve.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1110
994
|
}
|
|
1111
995
|
|
|
1112
996
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1113
997
|
top: 0;
|
|
1114
998
|
right: -1px;
|
|
1115
999
|
bottom: 0;
|
|
1116
|
-
background: linear-gradient(to left, ${
|
|
1000
|
+
background: linear-gradient(to left, ${Ve.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1117
1001
|
}
|
|
1118
1002
|
|
|
1119
1003
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1120
1004
|
left: 0;
|
|
1121
1005
|
right: 0;
|
|
1122
1006
|
bottom: -1px;
|
|
1123
|
-
background: linear-gradient(to top, ${
|
|
1007
|
+
background: linear-gradient(to top, ${Ve.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1124
1008
|
}
|
|
1125
1009
|
|
|
1126
1010
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1127
1011
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1128
1012
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1129
1013
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1130
|
-
background-color: ${
|
|
1014
|
+
background-color: ${Ve.colorSurface};
|
|
1131
1015
|
}
|
|
1132
|
-
`,
|
|
1016
|
+
`,qe([o.property({type:Boolean})],Ge.prototype,"horizontal",void 0),qe([o.property({type:Boolean})],Ge.prototype,"hideScrollbar",void 0),qe([o.property({type:Boolean})],Ge.prototype,"controls",void 0),qe([o.property({type:Boolean})],Ge.prototype,"limitSize",void 0),qe([o.state()],Ge.prototype,"elements",void 0),qe([o.state()],Ge.prototype,"currentElement",void 0),qe([o.state()],Ge.prototype,"withScroll",void 0),qe([o.state()],Ge.prototype,"startReached",void 0),qe([o.state()],Ge.prototype,"endReached",void 0),qe([o.query(".ft-snap-scroll--content")],Ge.prototype,"contentSlot",void 0),e.customElement("ft-snap-scroll")(Ge);var Xe=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};const Je=e.FtCssVariable.external(e.designSystemVariables.colorOutline,"Design system"),Ye=e.FtCssVariable.external(e.designSystemVariables.colorOnSurface,"Design system"),Qe=e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),ti=e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),ei=e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system"),ii=e.FtCssVariable.external(e.designSystemVariables.transitionDuration,"Design system"),oi=e.FtCssVariable.external(e.designSystemVariables.transitionTimingFunction,"Design system");class si extends CustomEvent{constructor(t){super("change",{detail:t})}}class ni extends e.FtLitElement{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new e.Debouncer(300),this.changeDebouncer=new e.Debouncer(10)}get flatOptions(){return Xt(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}render(){var t,e;const o=this.flatOptions.some((t=>t.selected));let s=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e;return i.html`
|
|
1133
1017
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1134
1018
|
part="container">
|
|
1135
|
-
${this.label||
|
|
1019
|
+
${this.label||o?i.html`
|
|
1136
1020
|
<div class="ft-filter--header" part="header">
|
|
1137
1021
|
<ft-typography class="ft-filter--label" variant="overline" part="label">${this.label}
|
|
1138
1022
|
</ft-typography>
|
|
1139
|
-
${
|
|
1023
|
+
${o?i.html`
|
|
1140
1024
|
<ft-button icon="close" dense @click=${this.clear} part="clear-button">
|
|
1141
1025
|
${this.clearButtonLabel}
|
|
1142
1026
|
</ft-button>
|
|
1143
1027
|
`:null}
|
|
1144
1028
|
</div>
|
|
1145
1029
|
`:null}
|
|
1146
|
-
<div class="ft-filter--filter" ?hidden=${!
|
|
1030
|
+
<div class="ft-filter--filter" ?hidden=${!s}>
|
|
1147
1031
|
<input type="search"
|
|
1148
1032
|
part="input"
|
|
1149
1033
|
class="ft-typography--caption"
|
|
1150
|
-
?disabled=${!
|
|
1034
|
+
?disabled=${!s}
|
|
1151
1035
|
placeholder="${this.filterPlaceHolder.replace("{0}",this.label)}"
|
|
1152
1036
|
@keyup=${this.onFilterChange}>
|
|
1153
1037
|
</div>
|
|
@@ -1158,7 +1042,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1158
1042
|
@slotchange=${this.updateOptionsFromSlot}
|
|
1159
1043
|
@option-change=${this.optionsChanged}></slot>
|
|
1160
1044
|
</div>
|
|
1161
|
-
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),
|
|
1045
|
+
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),o=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,s=o<0?"ft-filter--level-center":"ft-filter--level-left";return i.html`
|
|
1162
1046
|
${this.raiseSelectedOptions&&e.length>0?i.html`
|
|
1163
1047
|
<ft-filter-level
|
|
1164
1048
|
id="${this.id}"
|
|
@@ -1174,10 +1058,10 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1174
1058
|
<ft-snap-scroll horizontal hideScrollbar
|
|
1175
1059
|
class="ft-filter--levels"
|
|
1176
1060
|
@current-element-change=${t=>this.levelsScrollDebouncer.run((()=>{for(;t.detail.index<this.displayedLevels.length;)this.displayedLevels.pop();this.requestUpdate()}))}>
|
|
1177
|
-
${this.renderLevel(
|
|
1178
|
-
${this.displayedLevels.map((e=>t.find((t=>t.value===e)))).map(((t,e)=>{var i;const
|
|
1061
|
+
${this.renderLevel(s,this.options)}
|
|
1062
|
+
${this.displayedLevels.map((e=>t.find((t=>t.value===e)))).map(((t,e)=>{var i;const s=(null==t?void 0:t.value)===this.slideIn||(null==t?void 0:t.value)===this.slideOut?"ft-filter--level-right":e===o?"ft-filter--level-center":"ft-filter--level-left";return this.renderLevel(s,null!==(i=null==t?void 0:t.subOptions)&&void 0!==i?i:[],t)}))}
|
|
1179
1063
|
</ft-snap-scroll>
|
|
1180
|
-
`}renderLevel(t,e,
|
|
1064
|
+
`}renderLevel(t,e,o){return i.html`
|
|
1181
1065
|
<ft-filter-level
|
|
1182
1066
|
class="${t}"
|
|
1183
1067
|
id="${this.id}"
|
|
@@ -1186,7 +1070,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1186
1070
|
?multivalued=${this.multivalued}
|
|
1187
1071
|
?disabled=${this.disabled||"ft-filter--level-center"!==t}
|
|
1188
1072
|
?hideSelectedOptions=${this.raiseSelectedOptions}
|
|
1189
|
-
.parent=${
|
|
1073
|
+
.parent=${o}
|
|
1190
1074
|
.options=${e}
|
|
1191
1075
|
.displayedValuesLimit=${this.displayedValuesLimit}
|
|
1192
1076
|
@change=${this.onChange}
|
|
@@ -1194,7 +1078,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1194
1078
|
@display-level=${this.onDisplayLevel}
|
|
1195
1079
|
part="values"
|
|
1196
1080
|
></ft-filter-level>
|
|
1197
|
-
`}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
|
|
1081
|
+
`}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;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new si(e)),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(t){const e=t.composedPath()[0];this.filter=e.value}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}ni.elementDefinitions={"ft-button":Oe,"ft-filter-level":Ke,"ft-snap-scroll":Ge,"ft-typography":Gt},ni.styles=[Kt,i.css`
|
|
1198
1082
|
:host {
|
|
1199
1083
|
display: flex;
|
|
1200
1084
|
max-height: 100%;
|
|
@@ -1207,8 +1091,8 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1207
1091
|
flex-direction: column;
|
|
1208
1092
|
max-height: 100%;
|
|
1209
1093
|
max-width: 100%;
|
|
1210
|
-
color: ${
|
|
1211
|
-
background: ${
|
|
1094
|
+
color: ${Ye};
|
|
1095
|
+
background: ${ei};
|
|
1212
1096
|
}
|
|
1213
1097
|
|
|
1214
1098
|
.ft-filter--header {
|
|
@@ -1218,13 +1102,13 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1218
1102
|
flex-shrink: 0;
|
|
1219
1103
|
padding: 0 10px;
|
|
1220
1104
|
margin-bottom: 8px;
|
|
1221
|
-
${e.setVariable(
|
|
1105
|
+
${e.setVariable(Y.fontSize,"14px")};
|
|
1222
1106
|
}
|
|
1223
1107
|
|
|
1224
1108
|
.ft-filter--header ft-button {
|
|
1225
1109
|
flex-shrink: 0;
|
|
1226
1110
|
margin-left: auto;
|
|
1227
|
-
${e.setVariable(
|
|
1111
|
+
${e.setVariable(we.iconSize,"18px")};
|
|
1228
1112
|
}
|
|
1229
1113
|
|
|
1230
1114
|
.ft-filter--label {
|
|
@@ -1232,8 +1116,8 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1232
1116
|
flex-shrink: 1;
|
|
1233
1117
|
flex-grow: 1;
|
|
1234
1118
|
word-break: break-word;
|
|
1235
|
-
${e.setVariable(
|
|
1236
|
-
${e.setVariable(
|
|
1119
|
+
${e.setVariable(Y.lineHeight,"22px")};
|
|
1120
|
+
${e.setVariable(Y.fontWeight,"bold")};
|
|
1237
1121
|
}
|
|
1238
1122
|
|
|
1239
1123
|
.ft-filter--filter {
|
|
@@ -1244,8 +1128,8 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1244
1128
|
padding: 0 10px;
|
|
1245
1129
|
overflow: hidden;
|
|
1246
1130
|
height: 32px;
|
|
1247
|
-
transition: height ${
|
|
1248
|
-
margin ${
|
|
1131
|
+
transition: height ${ii} ${oi},
|
|
1132
|
+
margin ${ii} ${oi};
|
|
1249
1133
|
transition-delay: 500ms;
|
|
1250
1134
|
}
|
|
1251
1135
|
|
|
@@ -1258,11 +1142,11 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1258
1142
|
display: block;
|
|
1259
1143
|
width: 100%;
|
|
1260
1144
|
border-radius: 4px;
|
|
1261
|
-
border: 1px solid ${
|
|
1145
|
+
border: 1px solid ${Je};
|
|
1262
1146
|
padding: 4px;
|
|
1263
|
-
background-color: ${
|
|
1264
|
-
color: ${
|
|
1265
|
-
outline-color: ${
|
|
1147
|
+
background-color: ${ei};
|
|
1148
|
+
color: ${Qe};
|
|
1149
|
+
outline-color: ${ti};
|
|
1266
1150
|
}
|
|
1267
1151
|
|
|
1268
1152
|
.ft-filter--values {
|
|
@@ -1274,7 +1158,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1274
1158
|
}
|
|
1275
1159
|
|
|
1276
1160
|
.ft-filter--separator {
|
|
1277
|
-
border-top: 1px solid ${
|
|
1161
|
+
border-top: 1px solid ${Je};
|
|
1278
1162
|
margin: 4px 10px;
|
|
1279
1163
|
}
|
|
1280
1164
|
|
|
@@ -1299,57 +1183,17 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1299
1183
|
slot {
|
|
1300
1184
|
display: none;
|
|
1301
1185
|
}
|
|
1302
|
-
`],
|
|
1186
|
+
`],Xe([o.property({type:String})],ni.prototype,"id",void 0),Xe([o.property({type:String})],ni.prototype,"label",void 0),Xe([o.property({type:String})],ni.prototype,"filterPlaceHolder",void 0),Xe([o.property({type:String})],ni.prototype,"clearButtonLabel",void 0),Xe([o.property({type:String})],ni.prototype,"moreValuesButtonLabel",void 0),Xe([e.jsonProperty([])],ni.prototype,"options",void 0),Xe([o.property({type:Boolean})],ni.prototype,"multivalued",void 0),Xe([o.property({type:Boolean})],ni.prototype,"disabled",void 0),Xe([o.property({type:Boolean})],ni.prototype,"raiseSelectedOptions",void 0),Xe([o.property({type:Number})],ni.prototype,"displayedValuesLimit",void 0),Xe([o.query(".ft-filter--slot")],ni.prototype,"slotElement",void 0),Xe([o.query(".ft-filter--container")],ni.prototype,"container",void 0),Xe([o.query(".ft-filter--values")],ni.prototype,"valuesContainer",void 0),Xe([o.query(".ft-filter--levels")],ni.prototype,"levelsContainer",void 0),Xe([o.query(".ft-filter--levels ft-filter-level:last-child")],ni.prototype,"lastLevel",void 0),Xe([o.queryAll(".ft-filter--levels ft-filter-level")],ni.prototype,"levels",void 0),Xe([o.state()],ni.prototype,"withScroll",void 0),Xe([o.state()],ni.prototype,"filter",void 0),Xe([o.state()],ni.prototype,"slideIn",void 0),Xe([o.state()],ni.prototype,"slideOut",void 0);var ri=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 e.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return i.html`
|
|
1303
1187
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1304
|
-
`}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}))}}
|
|
1305
|
-
.ft-icon--fluid-topics {
|
|
1306
|
-
font-family: ${Pi}, ft-icons, fticons, sans-serif;
|
|
1307
|
-
font-size: ${Mi};
|
|
1308
|
-
line-height: 1;
|
|
1309
|
-
font-weight: normal;
|
|
1310
|
-
text-transform: none;
|
|
1311
|
-
font-style: normal;
|
|
1312
|
-
font-variant: normal;
|
|
1313
|
-
speak: none;
|
|
1314
|
-
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
1315
|
-
text-rendering: auto;
|
|
1316
|
-
-webkit-font-smoothing: antialiased;
|
|
1317
|
-
-moz-osx-font-smoothing: grayscale;
|
|
1318
|
-
}
|
|
1319
|
-
`,Ui=i.css`
|
|
1320
|
-
.ft-icon--file-format {
|
|
1321
|
-
font-family: ${Ni}, ft-mime, sans-serif;
|
|
1322
|
-
font-size: ${Mi};
|
|
1323
|
-
line-height: 1;
|
|
1324
|
-
font-weight: normal;
|
|
1325
|
-
text-transform: none;
|
|
1326
|
-
font-style: normal;
|
|
1327
|
-
font-variant: normal;
|
|
1328
|
-
speak: none;
|
|
1329
|
-
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
1330
|
-
text-rendering: auto;
|
|
1331
|
-
-webkit-font-smoothing: antialiased;
|
|
1332
|
-
-moz-osx-font-smoothing: grayscale;
|
|
1333
|
-
}
|
|
1334
|
-
`;class Vi extends e.FtLitElement{constructor(){super(...arguments),this.variant=Li.fluid_topics}render(){return i.html`
|
|
1335
|
-
<slot @slotchange=${()=>this.requestUpdate()} hidden></slot>
|
|
1336
|
-
<i class="ft-icon ${"ft-icon--"+this.variant}">${n.unsafeHTML(this.getIcon())}</i>
|
|
1337
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;return this.variant===Li.file_format?null!==(t=Fi[this.textContent.toUpperCase()])&&void 0!==t?t:this.textContent:null!==(e=Ai[this.textContent.toUpperCase()])&&void 0!==e?e:this.textContent}}Vi.elementDefinitions={},Vi.styles=[Hi,Ui,i.css`
|
|
1338
|
-
:host, i.ft-icon {
|
|
1339
|
-
display: inline-block;
|
|
1340
|
-
width: ${Mi};
|
|
1341
|
-
height: ${Mi};
|
|
1342
|
-
text-align: center;
|
|
1343
|
-
}
|
|
1344
|
-
`],ji([r.property()],Vi.prototype,"variant",void 0),ji([r.query("slot")],Vi.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Vi);var Zi=function(t,e,i,r){for(var o,a=arguments.length,c=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,n=t.length-1;n>=0;n--)(o=t[n])&&(c=(a<3?o(c):a>3?o(e,i,c):o(e,i))||c);return a>3&&c&&Object.defineProperty(e,i,c),c};class qi extends e.FtLitElement{constructor(){super(...arguments),this.multi=!1}render(){return i.html`
|
|
1188
|
+
`}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}))}}li.elementDefinitions={},ri([o.property({type:String})],li.prototype,"label",void 0),ri([o.property({type:Object,converter:t=>t})],li.prototype,"value",void 0),ri([o.property({type:Boolean,reflect:!0})],li.prototype,"selected",void 0),ri([o.property({type:Object})],li.prototype,"subOptions",void 0),ri([o.query(".ft-filter-option--slot")],li.prototype,"slotElement",void 0),e.customElement("ft-filter")(ni),e.customElement("ft-filter-option")(li);var ai=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 ci extends e.FtLitElement{constructor(){super(...arguments),this.multi=!1}render(){return i.html`
|
|
1345
1189
|
<div class="ft-accordion">
|
|
1346
1190
|
<slot @activated=${this.onChange}></slot>
|
|
1347
1191
|
</div>
|
|
1348
|
-
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}
|
|
1192
|
+
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}ci.elementDefinitions={},ci.styles=i.css`
|
|
1349
1193
|
.ft-accordion {
|
|
1350
1194
|
box-sizing: border-box;
|
|
1351
1195
|
}
|
|
1352
|
-
`,
|
|
1196
|
+
`,ai([o.property({type:Boolean})],ci.prototype,"multi",void 0),ai([o.query("slot")],ci.prototype,"content",void 0);var hi=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};const pi=e.FtCssVariable.create("--ft-accordion-toggle-horizontal-spacing","SIZE","16px"),fi=e.FtCssVariable.create("--ft-accordion-toggle-vertical-spacing","SIZE","16px"),di=e.FtCssVariable.external(e.designSystemVariables.colorOutline,"Design system");class ui extends e.FtLitElement{constructor(){super(...arguments),this.icon="",this.label="",this.active=!1}render(){return i.html`
|
|
1353
1197
|
<div class="ft-accordion-item ${this.active?"ft-accordion-item--active":""}">
|
|
1354
1198
|
<div class="ft-accordion-item--toggle"
|
|
1355
1199
|
part="toggle"
|
|
@@ -1358,7 +1202,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1358
1202
|
tabindex="0">
|
|
1359
1203
|
<ft-ripple part="toggle-ripple"></ft-ripple>
|
|
1360
1204
|
${this.icon?i.html`
|
|
1361
|
-
<
|
|
1205
|
+
<ft-icon variant="material">${this.icon}</ft-icon>
|
|
1362
1206
|
`:null}
|
|
1363
1207
|
${this.label?i.html`
|
|
1364
1208
|
<ft-typography class="ft-accordion-item--label" variant="body1" part="label">${this.label}
|
|
@@ -1366,14 +1210,14 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1366
1210
|
`:i.html`
|
|
1367
1211
|
<slot class="ft-accordion-item--label" name="toggle" part="label"></slot>
|
|
1368
1212
|
`}
|
|
1369
|
-
<
|
|
1213
|
+
<ft-icon variant="material">${this.active?"expand_less":"expand_more"}</ft-icon>
|
|
1370
1214
|
</div>
|
|
1371
1215
|
<div class="ft-accordion-item--content" part="content" @focusin=${()=>this.active=!0}>
|
|
1372
1216
|
<slot></slot>
|
|
1373
1217
|
</div>
|
|
1374
1218
|
<div class="ft-accordion-item--separator" part="separator"></div>
|
|
1375
1219
|
</div>
|
|
1376
|
-
`}update(t){super.update(t),t.has("active")&&this.active&&this.dispatchEvent(new Event("activated",{composed:!0,bubbles:!0}))}onToggleKeyDown(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.active=!this.active)}}
|
|
1220
|
+
`}update(t){super.update(t),t.has("active")&&this.active&&this.dispatchEvent(new Event("activated",{composed:!0,bubbles:!0}))}onToggleKeyDown(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.active=!this.active)}}ui.elementDefinitions={"ft-ripple":ie,"ft-typography":Gt,"ft-icon":ye},ui.styles=i.css`
|
|
1377
1221
|
.ft-accordion-item {
|
|
1378
1222
|
display: flex;
|
|
1379
1223
|
flex-direction: column;
|
|
@@ -1386,8 +1230,8 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1386
1230
|
display: flex;
|
|
1387
1231
|
align-items: center;
|
|
1388
1232
|
cursor: pointer;
|
|
1389
|
-
padding: ${
|
|
1390
|
-
gap: calc(${
|
|
1233
|
+
padding: ${fi} ${pi};
|
|
1234
|
+
gap: calc(${pi} / 2);
|
|
1391
1235
|
outline: none;
|
|
1392
1236
|
}
|
|
1393
1237
|
|
|
@@ -1408,13 +1252,13 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1408
1252
|
.ft-accordion-item--active .ft-accordion-item--content {
|
|
1409
1253
|
height: initial;
|
|
1410
1254
|
overflow: visible;
|
|
1411
|
-
padding: ${
|
|
1255
|
+
padding: ${fi} ${pi};
|
|
1412
1256
|
}
|
|
1413
1257
|
|
|
1414
1258
|
.ft-accordion-item--separator {
|
|
1415
|
-
border-bottom: 1px solid ${
|
|
1259
|
+
border-bottom: 1px solid ${di};
|
|
1416
1260
|
}
|
|
1417
|
-
`,
|
|
1261
|
+
`,hi([o.property({type:String})],ui.prototype,"icon",void 0),hi([o.property({type:String})],ui.prototype,"label",void 0),hi([o.property({type:Boolean,reflect:!0})],ui.prototype,"active",void 0),e.customElement("ft-accordion")(ci),e.customElement("ft-accordion-item")(ui);var bi=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};const vi=e.FtCssVariable.extend("--ft-chip-color",e.designSystemVariables.colorOnSurface),gi={backgroundColor:e.FtCssVariable.extend("--ft-chip-background-color",e.designSystemVariables.colorSurface),color:vi,fontSize:e.FtCssVariable.extend("--ft-chip-font-size",St.fontSize),iconSize:e.FtCssVariable.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:e.FtCssVariable.extend("--ft-chip-ripple-color",vi),horizontalPadding:e.FtCssVariable.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:e.FtCssVariable.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:e.FtCssVariable.external(e.designSystemVariables.colorOutline,"Design system"),opacityDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},xi=e.FtCssVariable.extend("--ft-chip-highlighted-color",e.FtCssVariable.extend("--ft-chip-color",e.designSystemVariables.colorOnPrimary)),yi={backgroundColor:e.FtCssVariable.extend("--ft-chip-highlighted-background-color",e.FtCssVariable.extend("--ft-chip-background-color",e.designSystemVariables.colorPrimary)),color:xi,rippleColor:e.FtCssVariable.extend("--ft-chip-highlighted-ripple-color",xi)},mi=e.FtCssVariable.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),$i=e.FtCssVariable.create("--ft-chip-dense-vertical-padding","SIZE","4px");class wi extends CustomEvent{constructor(){super("icon-click")}}class ki extends e.FtLitElement{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}static get styles(){return[e.noTextSelect,i.css`
|
|
1418
1262
|
:host {
|
|
1419
1263
|
display: inline-block;
|
|
1420
1264
|
max-width: 100%;
|
|
@@ -1431,27 +1275,27 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1431
1275
|
box-sizing: border-box;
|
|
1432
1276
|
pointer-events: auto;
|
|
1433
1277
|
|
|
1434
|
-
--ft-chip-internal-font-size: ${
|
|
1278
|
+
--ft-chip-internal-font-size: ${gi.fontSize};
|
|
1435
1279
|
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1436
|
-
|
|
1437
|
-
--ft-chip-internal-vertical-padding: ${
|
|
1438
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
1280
|
+
${e.setVariable(xe.size,gi.iconSize)};
|
|
1281
|
+
--ft-chip-internal-vertical-padding: ${gi.verticalPadding};
|
|
1282
|
+
--ft-chip-internal-horizontal-padding: ${gi.horizontalPadding};
|
|
1439
1283
|
--ft-chip-internal-icon-padding: 3px;
|
|
1440
|
-
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height),
|
|
1284
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${gi.iconSize});
|
|
1441
1285
|
|
|
1442
|
-
border: 1px solid ${
|
|
1443
|
-
color: ${
|
|
1444
|
-
${e.setVariable(
|
|
1286
|
+
border: 1px solid ${gi.colorOutline};
|
|
1287
|
+
color: ${gi.color};
|
|
1288
|
+
${e.setVariable(ee.color,gi.rippleColor)};
|
|
1445
1289
|
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
1446
1290
|
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
1447
|
-
background-color: ${
|
|
1291
|
+
background-color: ${gi.backgroundColor};
|
|
1448
1292
|
line-height: var(--ft-chip-internal-content-height);
|
|
1449
1293
|
}
|
|
1450
1294
|
|
|
1451
1295
|
.ft-chip--dense {
|
|
1452
1296
|
--ft-chip-internal-icon-padding: 3px;
|
|
1453
|
-
--ft-chip-internal-vertical-padding: ${
|
|
1454
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
1297
|
+
--ft-chip-internal-vertical-padding: ${$i};
|
|
1298
|
+
--ft-chip-internal-horizontal-padding: ${mi};
|
|
1455
1299
|
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1456
1300
|
}
|
|
1457
1301
|
|
|
@@ -1463,15 +1307,15 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1463
1307
|
cursor: default;
|
|
1464
1308
|
pointer-events: none;
|
|
1465
1309
|
filter: grayscale(1);
|
|
1466
|
-
opacity: ${
|
|
1310
|
+
opacity: ${gi.opacityDisabled};
|
|
1467
1311
|
}
|
|
1468
1312
|
|
|
1469
1313
|
.ft-chip--highlighted {
|
|
1470
1314
|
border: none;
|
|
1471
1315
|
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
1472
|
-
background-color: ${
|
|
1473
|
-
${e.setVariable(
|
|
1474
|
-
color: ${
|
|
1316
|
+
background-color: ${yi.backgroundColor};
|
|
1317
|
+
${e.setVariable(ee.color,yi.rippleColor)};
|
|
1318
|
+
color: ${yi.color};
|
|
1475
1319
|
}
|
|
1476
1320
|
|
|
1477
1321
|
.ft-chip--clickable {
|
|
@@ -1500,8 +1344,8 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1500
1344
|
vertical-align: bottom;
|
|
1501
1345
|
display: block;
|
|
1502
1346
|
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
1503
|
-
${e.setVariable(
|
|
1504
|
-
${e.setVariable(
|
|
1347
|
+
${e.setVariable(St.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
1348
|
+
${e.setVariable(St.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
1505
1349
|
}
|
|
1506
1350
|
|
|
1507
1351
|
.ft-chip--safari-fix .ft-chip--label {
|
|
@@ -1537,7 +1381,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1537
1381
|
order: -1;
|
|
1538
1382
|
}
|
|
1539
1383
|
`]}render(){const t={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":e.isSafari};return i.html`
|
|
1540
|
-
<div class="${
|
|
1384
|
+
<div class="${n.classMap(t)}"
|
|
1541
1385
|
aria-label="${this.getLabel()}"
|
|
1542
1386
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
1543
1387
|
@keyup=${this.onKeyUp}>
|
|
@@ -1553,10 +1397,10 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1553
1397
|
@click=${this.onIconClick}
|
|
1554
1398
|
@keyup=${this.onIconKeyUp}>
|
|
1555
1399
|
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
1556
|
-
<
|
|
1400
|
+
<ft-icon variant="material">${this.internalIcon}</ft-icon>
|
|
1557
1401
|
</div>
|
|
1558
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new
|
|
1559
|
-
<div class="${
|
|
1402
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new wi))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new wi))}getLabel(){return this.label||this.textContent}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:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}}ki.elementDefinitions={"ft-ripple":ie,"ft-typography":Gt,"ft-icon":ye},bi([o.property({type:Boolean})],ki.prototype,"highlighted",void 0),bi([o.property({type:Boolean})],ki.prototype,"removable",void 0),bi([o.property({type:Boolean})],ki.prototype,"disabled",void 0),bi([o.property({type:Boolean})],ki.prototype,"clickable",void 0),bi([o.property({type:Boolean})],ki.prototype,"iconClickable",void 0),bi([o.property({type:Boolean})],ki.prototype,"dense",void 0),bi([o.property({type:Boolean})],ki.prototype,"multiLine",void 0),bi([o.property({type:String})],ki.prototype,"label",void 0),bi([o.property({type:String})],ki.prototype,"icon",void 0),bi([o.property({type:Boolean})],ki.prototype,"trailingIcon",void 0),bi([o.query("ft-typography slot")],ki.prototype,"slottedContent",void 0),e.customElement("ft-chip")(ki);var Si=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};const zi={fontSize:e.FtCssVariable.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:e.FtCssVariable.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:e.FtCssVariable.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:e.FtCssVariable.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariable.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:e.FtCssVariable.extend("--ft-input-label-border-color",e.designSystemVariables.colorOutline),textColor:e.FtCssVariable.extend("--ft-input-label-text-color",e.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:e.FtCssVariable.extend("--ft-input-label-disabled-text-color",e.designSystemVariables.colorOnSurfaceDisabled),colorSurface:e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system"),borderRadiusS:e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system")};class Oi extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled};return i.html`
|
|
1403
|
+
<div class="${n.classMap(t)}">
|
|
1560
1404
|
${this.text?i.html`
|
|
1561
1405
|
<div class="ft-input-label--text ft-typography--caption">
|
|
1562
1406
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
@@ -1564,7 +1408,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1564
1408
|
</div>
|
|
1565
1409
|
`:null}
|
|
1566
1410
|
</div>
|
|
1567
|
-
`}}
|
|
1411
|
+
`}}Oi.elementDefinitions={},Oi.styles=[Kt,i.css`
|
|
1568
1412
|
.ft-input-label {
|
|
1569
1413
|
position: absolute;
|
|
1570
1414
|
inset: 0;
|
|
@@ -1572,7 +1416,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1572
1416
|
}
|
|
1573
1417
|
|
|
1574
1418
|
.ft-input-label {
|
|
1575
|
-
border-color: ${
|
|
1419
|
+
border-color: ${zi.borderColor};
|
|
1576
1420
|
}
|
|
1577
1421
|
|
|
1578
1422
|
.ft-input-label:before,
|
|
@@ -1585,7 +1429,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1585
1429
|
}
|
|
1586
1430
|
|
|
1587
1431
|
.ft-input-label:before {
|
|
1588
|
-
width: ${
|
|
1432
|
+
width: ${zi.horizontalSpacing};
|
|
1589
1433
|
flex-shrink: 0;
|
|
1590
1434
|
}
|
|
1591
1435
|
|
|
@@ -1601,14 +1445,14 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1601
1445
|
border-bottom-width: 1px;
|
|
1602
1446
|
border-bottom-style: solid;
|
|
1603
1447
|
border-color: inherit;
|
|
1604
|
-
color: ${
|
|
1448
|
+
color: ${zi.textColor};
|
|
1605
1449
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
1606
|
-
${e.setVariable(
|
|
1607
|
-
${e.setVariable(
|
|
1450
|
+
${e.setVariable(zt.fontSize,zi.fontSize)};
|
|
1451
|
+
${e.setVariable(zt.lineHeight,zi.fontSize)};
|
|
1608
1452
|
}
|
|
1609
1453
|
|
|
1610
1454
|
.ft-input-label--disabled .ft-input-label--text {
|
|
1611
|
-
color: ${
|
|
1455
|
+
color: ${zi.disabledTextColor};
|
|
1612
1456
|
}
|
|
1613
1457
|
|
|
1614
1458
|
.ft-input-label--hidden-text {
|
|
@@ -1624,17 +1468,17 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1624
1468
|
overflow: hidden;
|
|
1625
1469
|
white-space: nowrap;
|
|
1626
1470
|
text-overflow: ellipsis;
|
|
1627
|
-
padding: ${
|
|
1628
|
-
margin: calc(${
|
|
1471
|
+
padding: ${zi.verticalSpacing} 4px;
|
|
1472
|
+
margin: calc(${zi.verticalSpacing} * -1) 0;
|
|
1629
1473
|
}
|
|
1630
1474
|
|
|
1631
1475
|
.ft-input-label--raised .ft-input-label--text {
|
|
1632
|
-
${e.setVariable(
|
|
1633
|
-
${e.setVariable(
|
|
1476
|
+
${e.setVariable(zt.fontSize,zi.raisedFontSize)};
|
|
1477
|
+
${e.setVariable(zt.lineHeight,zi.raisedFontSize)};
|
|
1634
1478
|
}
|
|
1635
1479
|
|
|
1636
1480
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
1637
|
-
top: ${
|
|
1481
|
+
top: ${zi.verticalSpacing};
|
|
1638
1482
|
}
|
|
1639
1483
|
|
|
1640
1484
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -1647,54 +1491,54 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1647
1491
|
.ft-input-label--outlined:before {
|
|
1648
1492
|
border-left-width: 1px;
|
|
1649
1493
|
border-left-style: solid;
|
|
1650
|
-
border-radius: ${
|
|
1494
|
+
border-radius: ${zi.borderRadiusS} 0 0 ${zi.borderRadiusS};
|
|
1651
1495
|
}
|
|
1652
1496
|
|
|
1653
1497
|
.ft-input-label--outlined:after {
|
|
1654
1498
|
border-right-width: 1px;
|
|
1655
1499
|
border-right-style: solid;
|
|
1656
|
-
border-radius: 0 ${
|
|
1500
|
+
border-radius: 0 ${zi.borderRadiusS} ${zi.borderRadiusS} 0;
|
|
1657
1501
|
}
|
|
1658
1502
|
|
|
1659
1503
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
1660
1504
|
padding: 2px 4px;
|
|
1661
|
-
z-index: ${
|
|
1662
|
-
background-color: ${
|
|
1663
|
-
border-radius: ${
|
|
1505
|
+
z-index: ${zi.raisedZIndex};
|
|
1506
|
+
background-color: ${zi.colorSurface};
|
|
1507
|
+
border-radius: ${zi.borderRadiusS};
|
|
1664
1508
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
1665
1509
|
}
|
|
1666
1510
|
|
|
1667
1511
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
1668
1512
|
border-top: none;
|
|
1669
1513
|
}
|
|
1670
|
-
`],
|
|
1671
|
-
<div class="${
|
|
1514
|
+
`],Si([o.property({type:String})],Oi.prototype,"text",void 0),Si([o.property({type:Boolean})],Oi.prototype,"raised",void 0),Si([o.property({type:Boolean})],Oi.prototype,"outlined",void 0),Si([o.property({type:Boolean})],Oi.prototype,"disabled",void 0),e.customElement("ft-input-label")(Oi);var Bi=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 Ci 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}))}}Ci.elementDefinitions={},Bi([o.property({type:String})],Ci.prototype,"label",void 0),Bi([o.property({type:Object,converter:t=>t})],Ci.prototype,"value",void 0),Bi([o.property({type:Boolean,reflect:!0})],Ci.prototype,"selected",void 0);const Ei={labelSize:e.FtCssVariable.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:e.FtCssVariable.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:e.FtCssVariable.create("--ft-select-vertical-spacing","SIZE","4px"),selectedOptionColor:e.FtCssVariable.extend("--ft-select-selected-option-color",e.designSystemVariables.colorOnSurface),helperColor:e.FtCssVariable.extend("--ft-select-helper-color",e.designSystemVariables.colorOnSurfaceMedium),optionsColor:e.FtCssVariable.extend("--ft-select-options-color",e.designSystemVariables.colorOnSurface),optionsZIndex:e.FtCssVariable.create("--ft-select-options-z-index","NUMBER","2"),colorSurface:e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),borderRadiusS:e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system"),elevation02:e.FtCssVariable.external(e.designSystemVariables.elevation02,"Design system")};class Ii extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,o,r,l;let a=!this.disabled&&this.optionsDisplayed&&this.hasOptions,c=this.disabled||!this.hasOptions;const h=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,p={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":c,"ft-select--options-displayed":a,"ft-select--has-option-selected":h,"ft-select--no-label":!this.label};return i.html`
|
|
1515
|
+
<div class="${n.classMap(p)}" part="container">
|
|
1672
1516
|
<div class="ft-select--main-panel" part="main-panel">
|
|
1673
1517
|
<ft-input-label text="${this.label}"
|
|
1674
1518
|
part="label"
|
|
1675
|
-
?disabled=${
|
|
1519
|
+
?disabled=${c}
|
|
1676
1520
|
?outlined=${this.outlined}
|
|
1677
|
-
?raised=${
|
|
1521
|
+
?raised=${h||a}
|
|
1678
1522
|
></ft-input-label>
|
|
1679
1523
|
<div class="ft-select--input-panel"
|
|
1680
1524
|
part="selected-value"
|
|
1681
|
-
tabindex="${
|
|
1525
|
+
tabindex="${c?"-1":"0"}"
|
|
1682
1526
|
@click=${()=>{this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=this.optionsDisplayed}}
|
|
1683
1527
|
@keydown=${this.onMainPanelKeyDown}
|
|
1684
1528
|
aria-label="${this.label}"
|
|
1685
1529
|
aria-haspopup="listbox"
|
|
1686
|
-
aria-expanded="${
|
|
1687
|
-
<ft-ripple ?disabled=${
|
|
1530
|
+
aria-expanded="${a}">
|
|
1531
|
+
<ft-ripple ?disabled=${c} ?activated=${!this.outlined}></ft-ripple>
|
|
1688
1532
|
<ft-typography variant="body1" class="ft-select--selected-option">
|
|
1689
|
-
${null!==(
|
|
1533
|
+
${null!==(l=null===(r=this.selectedOption)||void 0===r?void 0:r.label)&&void 0!==l?l:""}
|
|
1690
1534
|
</ft-typography>
|
|
1691
|
-
<
|
|
1535
|
+
<ft-icon variant="material">${a?"expand_less":"expand_more"}</ft-icon>
|
|
1692
1536
|
</div>
|
|
1693
1537
|
<div class="ft-select--options"
|
|
1694
1538
|
part="options"
|
|
1695
1539
|
@keydown=${this.onOptionsKeyDown}
|
|
1696
1540
|
innerrole="listbox">
|
|
1697
|
-
${
|
|
1541
|
+
${s.repeat(this.options,(t=>t.value),(t=>this.renderOption(t)))}
|
|
1698
1542
|
</div>
|
|
1699
1543
|
</div>
|
|
1700
1544
|
${this.helper?i.html`
|
|
@@ -1704,8 +1548,8 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1704
1548
|
<slot @slotchange=${this.updateOptionsFromSlot}
|
|
1705
1549
|
@option-change=${this.updateOptionsFromSlot}
|
|
1706
1550
|
></slot>
|
|
1707
|
-
`}renderOption(t){let e=this.selectedOption===t;const
|
|
1708
|
-
<div class="${
|
|
1551
|
+
`}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`
|
|
1552
|
+
<div class="${n.classMap(o)}"
|
|
1709
1553
|
part="option"
|
|
1710
1554
|
tabindex="0"
|
|
1711
1555
|
@keydown=${e=>this.onOptionKeyDown(e,t)}
|
|
@@ -1713,7 +1557,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1713
1557
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
1714
1558
|
${t.label}
|
|
1715
1559
|
</div>
|
|
1716
|
-
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,
|
|
1560
|
+
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,n;let r;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(),r=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(),r=null!==(n=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstOption}null==r||r.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Ii.elementDefinitions={"ft-input-label":Oi,"ft-typography":Gt,"ft-ripple":ie,"ft-icon":ye},Ii.styles=[Ht,Kt,i.css`
|
|
1717
1561
|
*:focus {
|
|
1718
1562
|
outline: none;
|
|
1719
1563
|
}
|
|
@@ -1727,7 +1571,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1727
1571
|
.ft-select--main-panel {
|
|
1728
1572
|
position: relative;
|
|
1729
1573
|
display: flex;
|
|
1730
|
-
height: calc(4 * ${
|
|
1574
|
+
height: calc(4 * ${Ei.verticalSpacing} + ${Ei.labelSize} + ${Ei.selectedOptionSize});
|
|
1731
1575
|
}
|
|
1732
1576
|
|
|
1733
1577
|
.ft-select--input-panel {
|
|
@@ -1739,19 +1583,19 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1739
1583
|
padding-left: 16px;
|
|
1740
1584
|
padding-right: 8px;
|
|
1741
1585
|
gap: 8px;
|
|
1742
|
-
color: ${
|
|
1743
|
-
${e.setVariable(
|
|
1586
|
+
color: ${Ei.selectedOptionColor};
|
|
1587
|
+
${e.setVariable(ee.color,Ei.selectedOptionColor)};
|
|
1744
1588
|
}
|
|
1745
1589
|
|
|
1746
1590
|
.ft-select--input-panel,
|
|
1747
1591
|
.ft-select--option {
|
|
1748
|
-
${e.setVariable(
|
|
1749
|
-
${e.setVariable(
|
|
1592
|
+
${e.setVariable(ee.opacityContentOnSurfaceHover,"0.08")};
|
|
1593
|
+
${e.setVariable(ee.opacityContentOnSurfacePressed,"0.04")};
|
|
1750
1594
|
}
|
|
1751
1595
|
|
|
1752
1596
|
.ft-select--disabled .ft-select--input-panel,
|
|
1753
1597
|
.ft-select--disabled .ft-select--option {
|
|
1754
|
-
color: ${
|
|
1598
|
+
color: ${Ei.colorOnSurfaceDisabled};
|
|
1755
1599
|
}
|
|
1756
1600
|
|
|
1757
1601
|
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
@@ -1760,18 +1604,18 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1760
1604
|
}
|
|
1761
1605
|
|
|
1762
1606
|
ft-input-label {
|
|
1763
|
-
${e.setVariable(
|
|
1764
|
-
${e.setVariable(
|
|
1765
|
-
${e.setVariable(
|
|
1607
|
+
${e.setVariable(zi.fontSize,Ei.selectedOptionSize)};
|
|
1608
|
+
${e.setVariable(zi.raisedFontSize,Ei.labelSize)};
|
|
1609
|
+
${e.setVariable(zi.verticalSpacing,Ei.verticalSpacing)};
|
|
1766
1610
|
}
|
|
1767
1611
|
|
|
1768
|
-
.ft-select:not(.ft-select--disabled):focus-within
|
|
1769
|
-
color: ${
|
|
1612
|
+
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
1613
|
+
color: ${Ei.colorPrimary};
|
|
1770
1614
|
}
|
|
1771
1615
|
|
|
1772
1616
|
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
1773
|
-
${e.setVariable(
|
|
1774
|
-
${e.setVariable(
|
|
1617
|
+
${e.setVariable(zi.borderColor,Ei.colorPrimary)};
|
|
1618
|
+
${e.setVariable(zi.textColor,Ei.colorPrimary)};
|
|
1775
1619
|
}
|
|
1776
1620
|
|
|
1777
1621
|
.ft-select--selected-option {
|
|
@@ -1781,11 +1625,11 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1781
1625
|
overflow: hidden;
|
|
1782
1626
|
white-space: nowrap;
|
|
1783
1627
|
text-overflow: ellipsis;
|
|
1784
|
-
${e.setVariable(
|
|
1785
|
-
${e.setVariable(
|
|
1628
|
+
${e.setVariable(kt.fontSize,Ei.selectedOptionSize)};
|
|
1629
|
+
${e.setVariable(kt.lineHeight,Ei.selectedOptionSize)};
|
|
1786
1630
|
}
|
|
1787
1631
|
|
|
1788
|
-
|
|
1632
|
+
ft-icon {
|
|
1789
1633
|
flex-shrink: 0;
|
|
1790
1634
|
}
|
|
1791
1635
|
|
|
@@ -1794,16 +1638,16 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1794
1638
|
}
|
|
1795
1639
|
|
|
1796
1640
|
.ft-select--filled .ft-select--input-panel {
|
|
1797
|
-
border-radius: ${
|
|
1641
|
+
border-radius: ${Ei.borderRadiusS} ${Ei.borderRadiusS} 0 0;
|
|
1798
1642
|
}
|
|
1799
1643
|
|
|
1800
1644
|
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
1801
1645
|
align-self: stretch;
|
|
1802
|
-
padding-top: calc(${
|
|
1646
|
+
padding-top: calc(${Ei.labelSize} + 2 * ${Ei.verticalSpacing});
|
|
1803
1647
|
}
|
|
1804
1648
|
|
|
1805
1649
|
.ft-select--outlined .ft-select--input-panel {
|
|
1806
|
-
border-radius: ${
|
|
1650
|
+
border-radius: ${Ei.borderRadiusS};
|
|
1807
1651
|
}
|
|
1808
1652
|
|
|
1809
1653
|
.ft-select--options {
|
|
@@ -1812,10 +1656,10 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1812
1656
|
top: 100%;
|
|
1813
1657
|
left: 0;
|
|
1814
1658
|
right: 0;
|
|
1815
|
-
color: ${
|
|
1816
|
-
background: ${
|
|
1817
|
-
z-index: ${
|
|
1818
|
-
box-shadow: ${
|
|
1659
|
+
color: ${Ei.optionsColor};
|
|
1660
|
+
background: ${Ei.colorSurface};
|
|
1661
|
+
z-index: ${Ei.optionsZIndex};
|
|
1662
|
+
box-shadow: ${Ei.elevation02};
|
|
1819
1663
|
}
|
|
1820
1664
|
|
|
1821
1665
|
.ft-select--options-displayed .ft-select--options {
|
|
@@ -1832,9 +1676,9 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1832
1676
|
|
|
1833
1677
|
.ft-select--helper-text {
|
|
1834
1678
|
padding: 0 12px 0 16px;
|
|
1835
|
-
color: ${
|
|
1679
|
+
color: ${Ei.helperColor};
|
|
1836
1680
|
}
|
|
1837
|
-
`],
|
|
1681
|
+
`],Bi([o.property({type:String})],Ii.prototype,"label",void 0),Bi([o.property({type:String})],Ii.prototype,"helper",void 0),Bi([o.property({type:Boolean})],Ii.prototype,"outlined",void 0),Bi([o.property({type:Boolean})],Ii.prototype,"disabled",void 0),Bi([o.property({type:Array})],Ii.prototype,"options",void 0),Bi([o.state()],Ii.prototype,"selectedOption",void 0),Bi([o.state()],Ii.prototype,"optionsDisplayed",void 0),Bi([o.state()],Ii.prototype,"focusOptions",void 0),Bi([o.query(".ft-select")],Ii.prototype,"container",void 0),Bi([o.query(".ft-select--input-panel")],Ii.prototype,"mainPanel",void 0),Bi([o.query(".ft-select--option:first-child")],Ii.prototype,"firstOption",void 0),Bi([o.query(".ft-select--option:focus")],Ii.prototype,"focusedOption",void 0),Bi([o.query(".ft-select--option.ft-select--option-selected")],Ii.prototype,"selectedOptionElement",void 0),Bi([o.query(".ft-select--option:last-child")],Ii.prototype,"lastOption",void 0),Bi([o.query("slot")],Ii.prototype,"optionsSlot",void 0),e.customElement("ft-select")(Ii),e.customElement("ft-select-option")(Ci);const Di={height:e.FtCssVariable.create("--ft-search-bar-height","SIZE","38px"),borderRadius:e.FtCssVariable.extend("--ft-search-bar-border-radius",e.designSystemVariables.borderRadiusS),mobileOpenPosition:e.FtCssVariable.create("--ft-search-bar-mobile-open-position","POSITION","fixed"),mobileOpenTop:e.FtCssVariable.create("--ft-search-bar-mobile-open-top","SIZE","0"),mobileOpenBottom:e.FtCssVariable.create("--ft-search-bar-mobile-open-bottom","SIZE","0"),mobileOpenLeft:e.FtCssVariable.create("--ft-search-bar-mobile-open-left","SIZE","0"),mobileOpenRight:e.FtCssVariable.create("--ft-search-bar-mobile-open-right","SIZE","0"),floatingZIndex:e.FtCssVariable.create("--ft-search-bar-floating-components-z-index","NUMBER","2"),colorSurface:e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system"),colorOnSurface:e.FtCssVariable.external(e.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOutline:e.FtCssVariable.external(e.designSystemVariables.colorOutline,"Design system"),colorPrimary:e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),elevation02:e.FtCssVariable.external(e.designSystemVariables.elevation02,"Design system"),buttonColor:e.FtCssVariable.external(we.color,"Button"),buttonRippleColor:e.FtCssVariable.external(we.rippleColor,"Button")},Fi=i.css`
|
|
1838
1682
|
* {
|
|
1839
1683
|
box-sizing: border-box;
|
|
1840
1684
|
}
|
|
@@ -1843,7 +1687,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1843
1687
|
display: flex;
|
|
1844
1688
|
flex-direction: column;
|
|
1845
1689
|
gap: 8px;
|
|
1846
|
-
color: ${
|
|
1690
|
+
color: ${Di.colorOnSurface};
|
|
1847
1691
|
outline: none;
|
|
1848
1692
|
}
|
|
1849
1693
|
|
|
@@ -1852,14 +1696,14 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1852
1696
|
}
|
|
1853
1697
|
|
|
1854
1698
|
.ft-search-bar--mobile-menu-open {
|
|
1855
|
-
position: ${
|
|
1856
|
-
top: ${
|
|
1857
|
-
bottom: ${
|
|
1858
|
-
left: ${
|
|
1859
|
-
right: ${
|
|
1860
|
-
z-index: ${
|
|
1699
|
+
position: ${Di.mobileOpenPosition};
|
|
1700
|
+
top: ${Di.mobileOpenTop};
|
|
1701
|
+
bottom: ${Di.mobileOpenBottom};
|
|
1702
|
+
left: ${Di.mobileOpenLeft};
|
|
1703
|
+
right: ${Di.mobileOpenRight};
|
|
1704
|
+
z-index: ${Di.floatingZIndex};
|
|
1861
1705
|
padding: 16px;
|
|
1862
|
-
background: ${
|
|
1706
|
+
background: ${Di.colorSurface};
|
|
1863
1707
|
}
|
|
1864
1708
|
|
|
1865
1709
|
.ft-search-bar {
|
|
@@ -1867,15 +1711,15 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1867
1711
|
display: flex;
|
|
1868
1712
|
flex-direction: row;
|
|
1869
1713
|
align-items: center;
|
|
1870
|
-
height: ${
|
|
1714
|
+
height: ${Di.height};
|
|
1871
1715
|
|
|
1872
|
-
background: ${
|
|
1873
|
-
border: 1px solid ${
|
|
1874
|
-
border-radius: ${
|
|
1716
|
+
background: ${Di.colorSurface};
|
|
1717
|
+
border: 1px solid ${Di.colorOutline};
|
|
1718
|
+
border-radius: ${Di.borderRadius};
|
|
1875
1719
|
}
|
|
1876
1720
|
|
|
1877
1721
|
.ft-search-bar--floating-panel-open .ft-search-bar {
|
|
1878
|
-
border-radius: ${
|
|
1722
|
+
border-radius: ${Di.borderRadius} ${Di.borderRadius} 0 0;
|
|
1879
1723
|
}
|
|
1880
1724
|
|
|
1881
1725
|
.ft-search-bar--input-container {
|
|
@@ -1893,7 +1737,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1893
1737
|
align-self: stretch;
|
|
1894
1738
|
display: grid;
|
|
1895
1739
|
padding: 0 8px;
|
|
1896
|
-
border-radius: ${
|
|
1740
|
+
border-radius: ${Di.borderRadius};
|
|
1897
1741
|
}
|
|
1898
1742
|
|
|
1899
1743
|
.ft-search-bar--dense .ft-search-bar--input-outline {
|
|
@@ -1902,7 +1746,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1902
1746
|
}
|
|
1903
1747
|
|
|
1904
1748
|
.ft-search-bar--input-container:focus-within .ft-search-bar--input-outline {
|
|
1905
|
-
outline: 2px solid ${
|
|
1749
|
+
outline: 2px solid ${Di.colorPrimary};
|
|
1906
1750
|
}
|
|
1907
1751
|
|
|
1908
1752
|
.ft-search-bar--input {
|
|
@@ -1923,8 +1767,8 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1923
1767
|
}
|
|
1924
1768
|
|
|
1925
1769
|
.ft-search-bar--left-action {
|
|
1926
|
-
${e.setVariable(
|
|
1927
|
-
border-right: 1px solid ${
|
|
1770
|
+
${e.setVariable(we.borderRadius,i.css`calc(${Di.borderRadius} - 1px) 0 0 calc(${Di.borderRadius} - 1px)`)};
|
|
1771
|
+
border-right: 1px solid ${Di.colorOutline};
|
|
1928
1772
|
height: 100%;
|
|
1929
1773
|
}
|
|
1930
1774
|
|
|
@@ -1933,7 +1777,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1933
1777
|
}
|
|
1934
1778
|
|
|
1935
1779
|
.ft-search-bar--floating-panel-open .ft-search-bar--left-action {
|
|
1936
|
-
${e.setVariable(
|
|
1780
|
+
${e.setVariable(we.borderRadius,i.css`calc(${Di.borderRadius} - 1px) 0 0 0`)};
|
|
1937
1781
|
}
|
|
1938
1782
|
|
|
1939
1783
|
.ft-search-bar .ft-search-bar--launch-search,
|
|
@@ -1943,13 +1787,13 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1943
1787
|
|
|
1944
1788
|
.ft-search-bar--separator {
|
|
1945
1789
|
height: 20px;
|
|
1946
|
-
border-right: 1px solid ${
|
|
1790
|
+
border-right: 1px solid ${Di.colorOutline};
|
|
1947
1791
|
}
|
|
1948
1792
|
|
|
1949
1793
|
.ft-search-bar--left-action.ft-search-bar--content-locale {
|
|
1950
|
-
${e.setVariable(
|
|
1951
|
-
${e.setVariable(
|
|
1952
|
-
${e.setVariable(
|
|
1794
|
+
${e.setVariable(zi.borderColor,"transparent")};
|
|
1795
|
+
${e.setVariable(zi.borderRadiusS,i.css`calc(${Di.borderRadius} - 1px)`)};
|
|
1796
|
+
${e.setVariable(Ei.selectedOptionColor,Di.buttonColor)};
|
|
1953
1797
|
}
|
|
1954
1798
|
|
|
1955
1799
|
.ft-search-bar--left-action.ft-search-bar--content-locale,
|
|
@@ -1966,17 +1810,17 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1966
1810
|
}
|
|
1967
1811
|
|
|
1968
1812
|
.ft-search-bar--left-action.ft-search-bar--content-locale::part(selected-value) {
|
|
1969
|
-
border-radius: calc(${
|
|
1813
|
+
border-radius: calc(${Di.borderRadius} - 1px) 0 0 calc(${Di.borderRadius} - 1px);
|
|
1970
1814
|
}
|
|
1971
1815
|
|
|
1972
|
-
`,
|
|
1816
|
+
`,Li=i.css`
|
|
1973
1817
|
.ft-search-bar--floating-panel .ft-search-bar--presets {
|
|
1974
1818
|
margin-right: auto;
|
|
1975
1819
|
}
|
|
1976
1820
|
|
|
1977
1821
|
.ft-search-bar--floating-panel .ft-search-bar--presets {
|
|
1978
1822
|
min-width: 250px;
|
|
1979
|
-
${e.setVariable(
|
|
1823
|
+
${e.setVariable(Ei.optionsZIndex,"2")};
|
|
1980
1824
|
}
|
|
1981
1825
|
|
|
1982
1826
|
.ft-search-bar--floating-panel {
|
|
@@ -2068,7 +1912,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2068
1912
|
|
|
2069
1913
|
.ft-search-bar--filter-label > :last-child {
|
|
2070
1914
|
flex-shrink: 1;
|
|
2071
|
-
color: ${
|
|
1915
|
+
color: ${Di.colorOnSurfaceMedium};
|
|
2072
1916
|
}
|
|
2073
1917
|
|
|
2074
1918
|
ft-accordion-item::part(toggle) {
|
|
@@ -2088,7 +1932,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2088
1932
|
.ft-search-bar--floating-panel .ft-search-bar--launch-search {
|
|
2089
1933
|
margin: 0;
|
|
2090
1934
|
}
|
|
2091
|
-
`,
|
|
1935
|
+
`,ji=i.css`
|
|
2092
1936
|
.ft-search-bar--selected-filters:not(ft-snap-scroll) {
|
|
2093
1937
|
flex-shrink: 0;
|
|
2094
1938
|
display: flex;
|
|
@@ -2099,7 +1943,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2099
1943
|
|
|
2100
1944
|
ft-snap-scroll.ft-search-bar--selected-filters {
|
|
2101
1945
|
overflow: hidden;
|
|
2102
|
-
${e.setVariable(
|
|
1946
|
+
${e.setVariable(Ve.gap,"4px")};
|
|
2103
1947
|
}
|
|
2104
1948
|
|
|
2105
1949
|
ft-snap-scroll.ft-search-bar--selected-filters::part(content) {
|
|
@@ -2107,8 +1951,8 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2107
1951
|
}
|
|
2108
1952
|
|
|
2109
1953
|
.ft-search-bar--desktop ft-snap-scroll.ft-search-bar--selected-filters {
|
|
2110
|
-
${e.setVariable(
|
|
2111
|
-
${e.setVariable(
|
|
1954
|
+
${e.setVariable(gi.iconSize,"17px")};
|
|
1955
|
+
${e.setVariable(gi.fontSize,"12px")};
|
|
2112
1956
|
}
|
|
2113
1957
|
|
|
2114
1958
|
.ft-search-bar--selected-filters * {
|
|
@@ -2118,7 +1962,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2118
1962
|
.ft-search-bar--selected-filters ft-chip {
|
|
2119
1963
|
flex-grow: 0;
|
|
2120
1964
|
}
|
|
2121
|
-
`,
|
|
1965
|
+
`,Mi=i.css`
|
|
2122
1966
|
.ft-search-bar--mobile .ft-search-bar--suggestions {
|
|
2123
1967
|
flex-grow: 1;
|
|
2124
1968
|
flex-shrink: 1;
|
|
@@ -2127,7 +1971,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2127
1971
|
}
|
|
2128
1972
|
|
|
2129
1973
|
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
2130
|
-
border-top: 1px solid ${
|
|
1974
|
+
border-top: 1px solid ${Di.colorOutline};
|
|
2131
1975
|
}
|
|
2132
1976
|
|
|
2133
1977
|
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
@@ -2142,10 +1986,10 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2142
1986
|
left: -1px;
|
|
2143
1987
|
right: -1px;
|
|
2144
1988
|
display: none;
|
|
2145
|
-
background: ${
|
|
2146
|
-
border: 1px solid ${
|
|
2147
|
-
border-radius: 0 0 ${
|
|
2148
|
-
box-shadow: ${
|
|
1989
|
+
background: ${Di.colorSurface};
|
|
1990
|
+
border: 1px solid ${Di.colorOutline};
|
|
1991
|
+
border-radius: 0 0 ${Di.borderRadius} ${Di.borderRadius};
|
|
1992
|
+
box-shadow: ${Di.elevation02};
|
|
2149
1993
|
outline: none;
|
|
2150
1994
|
}
|
|
2151
1995
|
|
|
@@ -2160,7 +2004,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2160
2004
|
.ft-search-bar--no-suggestions {
|
|
2161
2005
|
text-align: center;
|
|
2162
2006
|
padding: 8px;
|
|
2163
|
-
color: ${
|
|
2007
|
+
color: ${Di.colorOnSurface};
|
|
2164
2008
|
}
|
|
2165
2009
|
|
|
2166
2010
|
.ft-search-bar--suggestion {
|
|
@@ -2171,7 +2015,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2171
2015
|
padding: 8px;
|
|
2172
2016
|
gap: 8px;
|
|
2173
2017
|
cursor: pointer;
|
|
2174
|
-
color: ${
|
|
2018
|
+
color: ${Di.colorOnSurface};
|
|
2175
2019
|
min-height: 52px;
|
|
2176
2020
|
}
|
|
2177
2021
|
|
|
@@ -2184,7 +2028,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2184
2028
|
}
|
|
2185
2029
|
|
|
2186
2030
|
.ft-search-bar--recent-search + .ft-search-bar--suggestion:not(.ft-search-bar--recent-search) {
|
|
2187
|
-
border-top: 1px solid ${
|
|
2031
|
+
border-top: 1px solid ${Di.colorOutline};
|
|
2188
2032
|
}
|
|
2189
2033
|
|
|
2190
2034
|
.ft-search-bar--suggestion ft-typography {
|
|
@@ -2192,9 +2036,9 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2192
2036
|
flex-grow: 1;
|
|
2193
2037
|
flex-shrink: 1;
|
|
2194
2038
|
}
|
|
2195
|
-
`;var
|
|
2039
|
+
`;var Ai=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};null==window.fluidtopics&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");const Ti={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",searchButton:"Search",noSuggestions:"No results found…",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Preset",removeRecentSearch:"Remove",back:"Back"};class Ni extends CustomEvent{constructor(t){super("launch-search",{detail:t})}}class Ri extends CustomEvent{constructor(t){super("change",{detail:t})}}class Pi extends e.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.labels={},this.labelResolver=new e.ParametrizedLabelResolver(Ti,{}),this.displayedFilters=[],this.presets=[],this.searchRequestSerializer=t=>function(t,e){var i;const o=new URLSearchParams({"content-lang":null!==(i=e.contentLocale)&&void 0!==i?i:"all",query:e.query});if(e.filters.length>0){const t=e.filters.map((t=>{const e=t.values.map((t=>t.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*"))).map((t=>encodeURIComponent(function(t){return`"${t}"`}(t)))).join("_");return`${t.key}~${e}`})).join("*");o.append("filters",t)}return new URL(`${t}/search/all?${o.toString()}`).href}(this.baseUrl,t),this.searchFilters=[],this.sizeCategory=l.S,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.knownFacetLabels={},this.query="",this.suggestions=[],this.suggestionsLoaded=!0,this.recentSearches=[],this.updateFacetsDebouncer=new e.Debouncer(500),this.suggestDebouncer=new e.Debouncer(300),this.facetsLoaded=!1,this.closeFloatingContainer=t=>{this.isMobile||(this.displayFacets=this.displayFacets&&t.composedPath().some((t=>t===this.floatingContainer)))},this.compareFilters=(t,e)=>t.key===e.key&&t.negative==e.negative&&t.values.length===e.values.length&&t.values.every((t=>e.values.includes(t))),this.compareRequests=(t,e)=>(null==t.contentLocale||null==e.contentLocale||t.contentLocale===e.contentLocale)&&t.filters.length===e.filters.length&&t.filters.every((t=>e.filters.some((e=>this.compareFilters(t,e)))))}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,filters:this.searchFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){const t=this.searchFilters.filter((t=>!this.displayedFilters.includes(t.key))).map((t=>({id:t.key})));return[...this.displayedFilters.map((t=>({id:t}))),...t]}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,filters:this.searchFilters,sort:[]}}get isMobile(){return this.sizeCategory===l.S}get hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return this.presets.length>0}get hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var t;null===(t=this.container)||void 0===t||t.focus()}clear(){this.query="",this.searchFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}render(){const t={"ft-search-bar--container":!0,"ft-search-bar--dense":!this.isMobile&&this.dense,"ft-search-bar--mobile":this.isMobile,"ft-search-bar--desktop":!this.isMobile,"ft-search-bar--floating-panel-open":!this.isMobile&&this.displayFacets,"ft-search-bar--mobile-menu-open":this.mobileMenuOpen};return i.html`
|
|
2196
2040
|
<ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
|
|
2197
|
-
<div class="${
|
|
2041
|
+
<div class="${n.classMap(t)}" part="container" tabindex="-1">
|
|
2198
2042
|
${this.isMobile?this.renderMobileSearchBar():this.renderDesktopSearchBar()}
|
|
2199
2043
|
</div>
|
|
2200
2044
|
`}renderMobileSearchBar(){return i.html`
|
|
@@ -2258,12 +2102,12 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2258
2102
|
></ft-filter>
|
|
2259
2103
|
</ft-accordion-item>
|
|
2260
2104
|
`:null}
|
|
2261
|
-
${
|
|
2105
|
+
${s.repeat(this.facets,(t=>t.key),(t=>{const e=Qt(t);return i.html`
|
|
2262
2106
|
<ft-accordion-item data-facet-key="${t.key}">
|
|
2263
2107
|
<div class="ft-search-bar--filter-label" slot="toggle">
|
|
2264
2108
|
<ft-typography variant="button">${t.label}</ft-typography>
|
|
2265
2109
|
<ft-typography variant="body2">
|
|
2266
|
-
${function(t){return
|
|
2110
|
+
${function(t){return Xt(t.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).filter((t=>t.selected)).map((t=>t.label))}(e).join(", ")}
|
|
2267
2111
|
</ft-typography>
|
|
2268
2112
|
</div>
|
|
2269
2113
|
<ft-filter
|
|
@@ -2326,7 +2170,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2326
2170
|
class="ft-search-bar--content-locale ft-search-bar--left-action"
|
|
2327
2171
|
part="content-locale"
|
|
2328
2172
|
@change=${t=>this.contentLocale=null==t.detail?void 0:t.detail}>
|
|
2329
|
-
${
|
|
2173
|
+
${s.repeat(this.availableContentLocales,(t=>t.lang),(t=>i.html`
|
|
2330
2174
|
<ft-select-option .value=${t.lang}
|
|
2331
2175
|
label="${t.label}"
|
|
2332
2176
|
?selected=${t.lang===this.contentLocale}>
|
|
@@ -2360,7 +2204,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2360
2204
|
label="${this.labelResolver.resolve("presetsSelector")}"
|
|
2361
2205
|
outlined
|
|
2362
2206
|
@change=${t=>this.selectedPreset=t.detail}>
|
|
2363
|
-
${
|
|
2207
|
+
${s.repeat(this.presets,(t=>t.name),(t=>i.html`
|
|
2364
2208
|
<ft-select-option value="${t.name}"
|
|
2365
2209
|
label="${t.name}"
|
|
2366
2210
|
?selected=${t.name===this.selectedPreset}>
|
|
@@ -2389,9 +2233,9 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2389
2233
|
@change=${t=>this.contentLocale=t.detail[0]}
|
|
2390
2234
|
></ft-filter>
|
|
2391
2235
|
`:i.nothing}
|
|
2392
|
-
${
|
|
2236
|
+
${s.repeat(this.facets,(t=>t.key),(t=>{const e=Qt(t),o=e.options.some((t=>{var e,i;return(null!==(i=null===(e=t.subOptions)||void 0===e?void 0:e.length)&&void 0!==i?i:0)>0}));return i.html`
|
|
2393
2237
|
<ft-filter
|
|
2394
|
-
class="${
|
|
2238
|
+
class="${o?"ft-search-bar--hierarchical-filter":""}"
|
|
2395
2239
|
part="filters"
|
|
2396
2240
|
id="${e.id}"
|
|
2397
2241
|
label="${e.label}"
|
|
@@ -2415,22 +2259,22 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2415
2259
|
${this.getLocaleLabel(this.contentLocale)}
|
|
2416
2260
|
</ft-chip>
|
|
2417
2261
|
`:null}
|
|
2418
|
-
${
|
|
2262
|
+
${s.repeat(this.facets,(t=>t.key),(e=>{const o=function(t){return Xt(t.rootNodes,(t=>t.selected?[]:t.childNodes)).filter((t=>t.selected)).map((t=>t.value))}(e);return s.repeat(o,(s=>{let n=e.label+": "+function(t){return Jt(t).split("|").join(" > ")}(s);const r=i.html`
|
|
2419
2263
|
<ft-chip
|
|
2420
2264
|
part="selected-filters"
|
|
2421
2265
|
?dense=${this.dense&&!this.isMobile}
|
|
2422
2266
|
?clickable=${this.isMobile}
|
|
2423
2267
|
?removable=${!this.isMobile}
|
|
2424
2268
|
icon=${this.isMobile?i.nothing:"close"}
|
|
2425
|
-
label="${
|
|
2426
|
-
title=${t?
|
|
2269
|
+
label="${n}"
|
|
2270
|
+
title=${t?n:i.nothing}
|
|
2427
2271
|
@click=${()=>this.openMobileFilters(e.key)}
|
|
2428
|
-
@icon-click=${()=>this.setFilter(e.key,
|
|
2429
|
-
${function(t){return Jt(t).split("|").pop()}(
|
|
2272
|
+
@icon-click=${()=>this.setFilter(e.key,o.filter((t=>t!==s)))}>
|
|
2273
|
+
${function(t){return Jt(t).split("|").pop()}(s)}
|
|
2430
2274
|
</ft-chip>
|
|
2431
|
-
`;return t?
|
|
2432
|
-
<ft-tooltip inline text="${
|
|
2433
|
-
${
|
|
2275
|
+
`;return t?r:i.html`
|
|
2276
|
+
<ft-tooltip inline text="${n}">
|
|
2277
|
+
${r}
|
|
2434
2278
|
</ft-tooltip>
|
|
2435
2279
|
`}))}))}
|
|
2436
2280
|
${this.isMobile?i.html`
|
|
@@ -2454,14 +2298,14 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2454
2298
|
`}renderSuggestions(){const t=this.recentSearches.filter((t=>t.toLowerCase().includes(this.query.toLowerCase()))),e=this.query.length>2||t.length>0;return i.html`
|
|
2455
2299
|
<div class="ft-search-bar--suggestions ${e?"ft-search-bar--suggestions-not-empty":""}"
|
|
2456
2300
|
@keydown=${this.onSuggestKeyDown}>
|
|
2457
|
-
${
|
|
2301
|
+
${s.repeat(t.slice(0,5),(t=>t),(t=>i.html`
|
|
2458
2302
|
<a href="${this.searchRequestSerializer({...this.request,query:t})}"
|
|
2459
2303
|
part="suggestions"
|
|
2460
2304
|
class="ft-search-bar--suggestion ft-search-bar--recent-search"
|
|
2461
2305
|
@keyup=${e=>this.onSuggestKeyUp(e,t)}
|
|
2462
2306
|
@click=${e=>this.onSuggestClick(e,t)}>
|
|
2463
2307
|
<ft-ripple></ft-ripple>
|
|
2464
|
-
<
|
|
2308
|
+
<ft-icon variant="material" part="suggestion-icon">history</ft-icon>
|
|
2465
2309
|
<ft-typography variant="body1">${t}</ft-typography>
|
|
2466
2310
|
<ft-button icon="close"
|
|
2467
2311
|
round
|
|
@@ -2471,7 +2315,7 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2471
2315
|
@click=${e=>this.removeRecentSearch(e,t)}></ft-button>
|
|
2472
2316
|
</a>
|
|
2473
2317
|
`))}
|
|
2474
|
-
${
|
|
2318
|
+
${s.repeat(this.suggestions,(t=>t.value),(t=>i.html`
|
|
2475
2319
|
<a href="${this.searchRequestSerializer({...this.request,query:t.value})}"
|
|
2476
2320
|
part="suggestions"
|
|
2477
2321
|
class="ft-search-bar--suggestion"
|
|
@@ -2489,8 +2333,8 @@ const hi=i.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2489
2333
|
</ft-typography>
|
|
2490
2334
|
`:null}
|
|
2491
2335
|
</div>
|
|
2492
|
-
`}getIcon(t){const e="DOCUMENT"===t.type?
|
|
2336
|
+
`}getIcon(t){const e="DOCUMENT"===t.type?ve.file_format:ve.fluid_topics;let o;switch(t.type){case"MAP":o="BOOK"===t.editorialType?fe.BOOK:fe.ARTICLE;break;case"DOCUMENT":o=function(t,e){var i,o,s,n;t=(null!=t?t:"").toLowerCase(),e=(null!=e?e:"").toLowerCase();const[r,l]=((null!==(i=be.get(t))&&void 0!==i?i:t)+"/").split("/");return null!==(n=null!==(s=null!==(o=ue.get(l))&&void 0!==o?o:ue.get(e))&&void 0!==s?s:ue.get(r))&&void 0!==n?n:de.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":o=fe.TOPICS}return i.html`
|
|
2493
2337
|
<ft-icon variant="${e}" part="suggestion-icon">
|
|
2494
|
-
${
|
|
2338
|
+
${o}
|
|
2495
2339
|
</ft-icon>
|
|
2496
|
-
`}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){var e,i;super.firstUpdated(t),this.initApi(),this.availableContentLocales=null!==(i=await(null===(e=this.api)||void 0===e?void 0:e.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[]))))&&void 0!==i?i:[]}update(t){var i,
|
|
2340
|
+
`}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){var e,i;super.firstUpdated(t),this.initApi(),this.availableContentLocales=null!==(i=await(null===(e=this.api)||void 0===e?void 0:e.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[]))))&&void 0!==i?i:[]}update(t){var i,o,s;if(t.has("labels")&&(this.labelResolver=new e.ParametrizedLabelResolver(Ti,this.labels)),t.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile),super.update(t),(t.has("availableContentLocales")||t.has("contentLocale"))&&this.availableContentLocales.length>0){const e=t=>this.availableContentLocales.some((e=>e.lang===t));e(this.contentLocale)||(this.contentLocale=t.has("contentLocale")&&e(t.get("contentLocale"))?t.get("contentLocale"):null===(i=this.availableContentLocales[0])||void 0===i?void 0:i.lang)}if(t.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.recentSearches=JSON.parse(null!==(o=window.localStorage.getItem(this.recentSearchesStorageKey))&&void 0!==o?o:"[]")),t.has("selectedPreset")){const t=this.presets.find((t=>t.name===this.selectedPreset));t&&!this.compareRequests(this.request,t)&&this.setFiltersFromPreset(t)}["contentLocale","searchFilters"].some((e=>t.has(e)))&&(this.selectedPreset=null===(s=this.presets.find((t=>this.compareRequests(t,this.request))))||void 0===s?void 0:s.name),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&this.setApi(),["uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateFacets(),["query","uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateSuggestions(),["query","uiLocale","contentLocale","searchFilters"].some((e=>t.has(e)))&&this.dispatchEvent(new Ri(this.request))}contentAvailableCallback(t){var e,i,o;if(super.contentAvailableCallback(t),t.has("displayFacets")&&this.displayFacets&&(null===(e=this.floatingContainer)||void 0===e||e.focus()),null!=this.scrollToFacet&&this.facetsLoaded){null===(i=this.scrollingFiltersContainer)||void 0===i||i.scrollIndexIntoView(this.facets.findIndex((t=>t.key===this.scrollToFacet)));const t=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`ft-accordion-item[data-facet-key="${this.scrollToFacet}"]`);t&&(t.active=!0),this.scrollToFacet=void 0}}initApi(){null==this.api&&(this.setApi(),setTimeout((()=>this.initApi()),100))}setApi(){this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0}updateFacets(){this.facetsRequest.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run((async()=>{var t,e;this.facets=null!==(e=await(null===(t=this.api)||void 0===t?void 0:t.search({...this.request,query:""}).then((t=>t.facets)).catch((()=>[]))))&&void 0!==e?e:[],this.facets.forEach((t=>this.knownFacetLabels[t.key]=t.label)),this.facetsLoaded=!0}))):this.facets=[]}updateSuggestions(){this.suggestionsLoaded=!1,this.suggestDebouncer.run((async()=>{this.suggestions=this.api&&this.query.length>2?await this.api.getSuggestions(this.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],this.suggestionsLoaded=!0}))}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.query=e.value,"Enter"===t.key&&this.launchSearch()}onSearchBarKeyDown(t){var e,i;switch(t.key){case"Escape":this.mobileMenuOpen=!1,null===(e=this.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),null===(i=this.firstSuggestion)||void 0===i||i.focus()}}onFloatingContainerKeyUp(t){var e;"Escape"===t.key&&(this.displayFacets=!1,null===(e=this.filtersOpener)||void 0===e||e.focus())}setQuery(t){this.input&&(this.input.value=t),this.query=t}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.setQuery(e),this.launchSearch()}launchSearch(){if(this.query){let t=this.recentSearches.filter((t=>t.toLowerCase()!==this.query.toLowerCase())).filter(((t,e)=>e<20));this.recentSearches=[this.query,...t],this.saveRecentSearches()}this.dispatchEvent(new Ni(this.request)),this.mobileMenuOpen=!1,this.displayFacets=!1,this.focus()}saveRecentSearches(){window.localStorage.setItem(this.recentSearchesStorageKey,JSON.stringify(this.recentSearches))}connectedCallback(){super.connectedCallback(),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}updateSize(t){this.sizeCategory=t.detail.category}getLocaleLabel(t){var e;return null!==(e=this.availableContentLocales.filter((e=>{var i;return(null!==(i=e.lang)&&void 0!==i?i:"").toLowerCase()===(null!=t?t:"").toLowerCase()})).map((t=>t.label)).pop())&&void 0!==e?e:t}setFilter(t,e){let i=this.searchFilters.filter((e=>e.key!==t));this.facets.forEach((i=>{i.key===t&&Xt(i.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=e.includes(t.value)))})),e.length&&i.push({key:t,negative:!1,values:e}),this.searchFilters=i,this.scrollToFacet=t}setFiltersFromPreset(t){null!=t&&(null!=t.contentLocale&&(this.contentLocale=t.contentLocale),this.searchFilters=t.filters)}clearFilters(){this.facets.forEach((t=>Xt(t.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=!1)))),this.searchFilters=[];const t=this.facets[0];this.scrollToFacet=null==t?void 0:t.key}removeRecentSearch(t,e){var i,o,s,n;t.preventDefault(),t.stopPropagation();const r=null!==(n=null!==(o=null===(i=this.focusedSuggestion)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:null===(s=this.focusedSuggestion)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.input;null==r||r.focus(),this.recentSearches=this.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.saveRecentSearches()}onSuggestKeyDown(t){var e,i,o,s,n,r;switch(t.key){case"ArrowUp":null===(o=null!==(i=null===(e=this.focusedSuggestion)||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.lastSuggestion)||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(r=null!==(n=null===(s=this.focusedSuggestion)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstSuggestion)||void 0===r||r.focus(),t.preventDefault(),t.stopPropagation()}}}Pi.elementDefinitions={"ft-accordion":ci,"ft-accordion-item":ui,"ft-button":Oe,"ft-chip":ki,"ft-filter":ni,"ft-filter-option":li,"ft-icon":ye,"ft-ripple":ie,"ft-select":Ii,"ft-select-option":Ci,"ft-size-watcher":p,"ft-snap-scroll":Ge,"ft-tooltip":ce,"ft-typography":Gt},Pi.styles=[Ht,Fi,Li,ji,Mi],Ai([o.property({type:Boolean})],Pi.prototype,"dense",void 0),Ai([o.property({type:String})],Pi.prototype,"baseUrl",void 0),Ai([o.property({type:String})],Pi.prototype,"apiIntegrationIdentifier",void 0),Ai([o.property({type:String})],Pi.prototype,"contentLocale",void 0),Ai([o.state()],Pi.prototype,"availableContentLocales",void 0),Ai([o.property({type:String})],Pi.prototype,"uiLocale",void 0),Ai([e.jsonProperty({})],Pi.prototype,"labels",void 0),Ai([e.jsonProperty([])],Pi.prototype,"displayedFilters",void 0),Ai([e.jsonProperty([])],Pi.prototype,"presets",void 0),Ai([o.property({type:String,reflect:!0})],Pi.prototype,"selectedPreset",void 0),Ai([o.property()],Pi.prototype,"searchRequestSerializer",void 0),Ai([o.state()],Pi.prototype,"searchFilters",void 0),Ai([o.state()],Pi.prototype,"sizeCategory",void 0),Ai([o.state()],Pi.prototype,"displayFacets",void 0),Ai([o.state()],Pi.prototype,"mobileMenuOpen",void 0),Ai([o.state()],Pi.prototype,"facets",void 0),Ai([o.query(".ft-search-bar--container")],Pi.prototype,"container",void 0),Ai([o.query(".ft-search-bar--filters-opener")],Pi.prototype,"filtersOpener",void 0),Ai([o.query(".ft-search-bar--floating-panel")],Pi.prototype,"floatingContainer",void 0),Ai([o.query("ft-snap-scroll.ft-search-bar--filters-container")],Pi.prototype,"scrollingFiltersContainer",void 0),Ai([o.query(".ft-search-bar--input")],Pi.prototype,"input",void 0),Ai([o.state()],Pi.prototype,"query",void 0),Ai([o.state()],Pi.prototype,"suggestions",void 0),Ai([o.state()],Pi.prototype,"suggestionsLoaded",void 0),Ai([o.state()],Pi.prototype,"recentSearches",void 0),Ai([o.state()],Pi.prototype,"scrollToFacet",void 0),Ai([o.query(".ft-search-bar--suggestion:first-child")],Pi.prototype,"firstSuggestion",void 0),Ai([o.query(".ft-search-bar--suggestion:focus-within")],Pi.prototype,"focusedSuggestion",void 0),Ai([o.query(".ft-search-bar--suggestion:last-child")],Pi.prototype,"lastSuggestion",void 0),Ai([o.state()],Pi.prototype,"api",void 0),e.customElement("ft-search-bar")(Pi),t.DEFAULT_LABELS=Ti,t.FtSearchBar=Pi,t.FtSearchBarCssVariables=Di,t.LaunchSearchEvent=Ni,t.SearchStateChangeEvent=Ri,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|