@fluid-topics/ft-select 0.1.17 → 0.2.1
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-select.d.ts +3 -3
- package/build/ft-select.inline-styles.js +622 -0
- package/build/ft-select.js +137 -147
- package/build/ft-select.light.js +420 -469
- package/build/ft-select.min.js +461 -506
- package/build/index.d.ts +2 -0
- package/build/index.js +6 -0
- package/build/inline-styles.d.ts +2 -0
- package/build/inline-styles.js +5 -0
- package/package.json +9 -9
package/build/ft-select.light.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
!function(t,e,i,
|
|
1
|
+
!function(t,e,i,o,s,l,n){
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var
|
|
7
|
+
var r;const p=globalThis.trustedTypes,a=p?p.createPolicy("lit-html",{createHTML:t=>t}):void 0,f=`lit$${(Math.random()+"").slice(9)}$`,h="?"+f,d=`<${h}>`,c=document,u=(t="")=>c.createComment(t),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,y=Array.isArray,g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,b=/>/g,m=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,$=/'/g,w=/"/g,k=/^(?:script|style|textarea|title)$/i,z=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),S=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),C=new WeakMap,E=c.createTreeWalker(c,129,null,!1),A=(t,e)=>{const i=t.length-1,o=[];let s,l=2===e?"<svg>":"",n=g;for(let e=0;e<i;e++){const i=t[e];let r,p,a=-1,h=0;for(;h<i.length&&(n.lastIndex=h,p=n.exec(i),null!==p);)h=n.lastIndex,n===g?"!--"===p[1]?n=v:void 0!==p[1]?n=b:void 0!==p[2]?(k.test(p[2])&&(s=RegExp("</"+p[2],"g")),n=m):void 0!==p[3]&&(n=m):n===m?">"===p[0]?(n=null!=s?s:g,a=-1):void 0===p[1]?a=-2:(a=n.lastIndex-p[2].length,r=p[1],n=void 0===p[3]?m:'"'===p[3]?w:$):n===w||n===$?n=m:n===v||n===b?n=g:(n=m,s=void 0);const c=n===m&&t[e+1].startsWith("/>")?" ":"";l+=n===g?i+d:a>=0?(o.push(r),i.slice(0,a)+"$lit$"+i.slice(a)+f+c):i+f+(-2===a?(o.push(void 0),e):c)}const r=l+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==a?a.createHTML(r):r,o]};class j{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,l=0;const n=t.length-1,r=this.parts,[a,d]=A(t,e);if(this.el=j.createElement(a,i),E.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=E.nextNode())&&r.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(f)){const i=d[l++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(f),e=/([.?@])?(.*)/.exec(i);r.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?M:"?"===e[1]?B:"@"===e[1]?T:_})}else r.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(k.test(o.tagName)){const t=o.textContent.split(f),e=t.length-1;if(e>0){o.textContent=p?p.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],u()),E.nextNode(),r.push({type:2,index:++s});o.append(t[e],u())}}}else if(8===o.nodeType)if(o.data===h)r.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(f,t+1));)r.push({type:7,index:s}),t+=f.length-1}s++}}static createElement(t,e){const i=c.createElement("template");return i.innerHTML=t,i}}function N(t,e,i=t,o){var s,l,n,r;if(e===S)return e;let p=void 0!==o?null===(s=i._$Cl)||void 0===s?void 0:s[o]:i._$Cu;const a=x(e)?void 0:e._$litDirective$;return(null==p?void 0:p.constructor)!==a&&(null===(l=null==p?void 0:p._$AO)||void 0===l||l.call(p,!1),void 0===a?p=void 0:(p=new a(t),p._$AT(t,i,o)),void 0!==o?(null!==(n=(r=i)._$Cl)&&void 0!==n?n:r._$Cl=[])[o]=p:i._$Cu=p),void 0!==p&&(e=N(t,p._$AS(t,e.values),p,o)),e}class I{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:c).importNode(i,!0);E.currentNode=s;let l=E.nextNode(),n=0,r=0,p=o[0];for(;void 0!==p;){if(n===p.index){let e;2===p.type?e=new D(l,l.nextSibling,this,t):1===p.type?e=new p.ctor(l,p.name,p.strings,this,t):6===p.type&&(e=new U(l,this,t)),this.v.push(e),p=o[++r]}n!==(null==p?void 0:p.index)&&(l=E.nextNode(),n++)}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 D{constructor(t,e,i,o){var s;this.type=2,this._$AH=O,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=N(this,t,e),x(t)?t===O||null==t||""===t?(this._$AH!==O&&this._$AR(),this._$AH=O):t!==this._$AH&&t!==S&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var e;return y(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!==O&&x(this._$AH)?this._$AA.nextSibling.data=t:this.S(c.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 I(s,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=C.get(t.strings);return void 0===e&&C.set(t.strings,e=new j(t)),e}A(t){y(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 D(this.M(u()),this.M(u()),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 _{constructor(t,e,i,o,s){this.type=1,this._$AH=O,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=O}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let l=!1;if(void 0===s)t=N(this,t,e,0),l=!x(t)||t!==this._$AH&&t!==S,l&&(this._$AH=t);else{const o=t;let n,r;for(t=s[0],n=0;n<s.length-1;n++)r=N(this,o[i+n],e,n),r===S&&(r=this._$AH[n]),l||(l=!x(r)||r!==this._$AH[n]),r===O?t=O:t!==O&&(t+=(null!=r?r:"")+s[n+1]),this._$AH[n]=r}l&&!o&&this.k(t)}k(t){t===O?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class M extends _{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===O?void 0:t}}const Z=p?p.emptyScript:"";class B extends _{constructor(){super(...arguments),this.type=4}k(t){t&&t!==O?this.element.setAttribute(this.name,Z):this.element.removeAttribute(this.name)}}class T extends _{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=N(this,t,e,0))&&void 0!==i?i:O)===S)return;const o=this._$AH,s=t===O&&o!==O||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,l=t!==O&&(o===O||s);s&&this.element.removeEventListener(this.name,this,o),l&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class U{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){N(this,t)}}const R=window.litHtmlPolyfillSupport;null==R||R(j,D),(null!==(r=globalThis.litHtmlVersions)&&void 0!==r?r:globalThis.litHtmlVersions=[]).push("2.1.3");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
13
|
+
const W=t=>({_$litStatic$:t}),K=new Map,F=(t=>(e,...i)=>{var o;const s=i.length;let l,n;const r=[],p=[];let a,f=0,h=!1;for(;f<s;){for(a=e[f];f<s&&void 0!==(n=i[f],l=null===(o=n)||void 0===o?void 0:o._$litStatic$);)a+=l+e[++f],h=!0;p.push(n),r.push(a),f++}if(f===s&&r.push(e[s]),h){const t=r.join("$$lit$$");void 0===(e=K.get(t))&&(r.raw=r,K.set(t,e=r)),i=p}return t(e,...i)})(z);var G,H=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(G||(G={}));const P=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),q=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),L={fontFamily:q,fontSize:e.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:e.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},X=e.FtCssVariable.extend("--ft-typography-title-font-family",P),Y=e.FtCssVariable.extend("--ft-typography-title-font-size",L.fontSize,"20px"),J=e.FtCssVariable.extend("--ft-typography-title-font-weight",L.fontWeight,"normal"),Q=e.FtCssVariable.extend("--ft-typography-title-letter-spacing",L.letterSpacing,"0.15px"),V=e.FtCssVariable.extend("--ft-typography-title-line-height",L.lineHeight,"24px"),tt=e.FtCssVariable.extend("--ft-typography-title-text-transform",L.textTransform,"inherit"),et=e.FtCssVariable.extend("--ft-typography-title-dense-font-family",P),it=e.FtCssVariable.extend("--ft-typography-title-dense-font-size",L.fontSize,"14px"),ot=e.FtCssVariable.extend("--ft-typography-title-dense-font-weight",L.fontWeight,"normal"),st=e.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",L.letterSpacing,"0.105px"),lt=e.FtCssVariable.extend("--ft-typography-title-dense-line-height",L.lineHeight,"24px"),nt=e.FtCssVariable.extend("--ft-typography-title-dense-text-transform",L.textTransform,"inherit"),rt=e.FtCssVariable.extend("--ft-typography-subtitle1-font-family",q),pt=e.FtCssVariable.extend("--ft-typography-subtitle1-font-size",L.fontSize,"16px"),at=e.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",L.fontWeight,"600"),ft=e.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",L.letterSpacing,"0.144px"),ht=e.FtCssVariable.extend("--ft-typography-subtitle1-line-height",L.lineHeight,"24px"),dt=e.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",L.textTransform,"inherit"),ct=e.FtCssVariable.extend("--ft-typography-subtitle2-font-family",q),ut=e.FtCssVariable.extend("--ft-typography-subtitle2-font-size",L.fontSize,"14px"),xt=e.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",L.fontWeight,"normal"),yt=e.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",L.letterSpacing,"0.098px"),gt=e.FtCssVariable.extend("--ft-typography-subtitle2-line-height",L.lineHeight,"24px"),vt=e.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",L.textTransform,"inherit"),bt={fontFamily:e.FtCssVariable.extend("--ft-typography-body1-font-family",q),fontSize:e.FtCssVariable.extend("--ft-typography-body1-font-size",L.fontSize,"16px"),fontWeight:e.FtCssVariable.extend("--ft-typography-body1-font-weight",L.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-body1-letter-spacing",L.letterSpacing,"0.496px"),lineHeight:e.FtCssVariable.extend("--ft-typography-body1-line-height",L.lineHeight,"24px"),textTransform:e.FtCssVariable.extend("--ft-typography-body1-text-transform",L.textTransform,"inherit")},mt=e.FtCssVariable.extend("--ft-typography-body2-font-family",q),$t=e.FtCssVariable.extend("--ft-typography-body2-font-size",L.fontSize,"14px"),wt=e.FtCssVariable.extend("--ft-typography-body2-font-weight",L.fontWeight,"normal"),kt=e.FtCssVariable.extend("--ft-typography-body2-letter-spacing",L.letterSpacing,"0.252px"),zt=e.FtCssVariable.extend("--ft-typography-body2-line-height",L.lineHeight,"20px"),St=e.FtCssVariable.extend("--ft-typography-body2-text-transform",L.textTransform,"inherit"),Ot={fontFamily:e.FtCssVariable.extend("--ft-typography-caption-font-family",q),fontSize:e.FtCssVariable.extend("--ft-typography-caption-font-size",L.fontSize,"12px"),fontWeight:e.FtCssVariable.extend("--ft-typography-caption-font-weight",L.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-caption-letter-spacing",L.letterSpacing,"0.396px"),lineHeight:e.FtCssVariable.extend("--ft-typography-caption-line-height",L.lineHeight,"16px"),textTransform:e.FtCssVariable.extend("--ft-typography-caption-text-transform",L.textTransform,"inherit")},Ct=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",q),Et=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",L.fontSize,"10px"),At=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",L.fontWeight,"normal"),jt=e.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",L.letterSpacing,"0.33px"),Nt=e.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",L.lineHeight,"16px"),It=e.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",L.textTransform,"inherit"),Dt=e.FtCssVariable.extend("--ft-typography-overline-font-family",q),_t=e.FtCssVariable.extend("--ft-typography-overline-font-size",L.fontSize,"10px"),Mt=e.FtCssVariable.extend("--ft-typography-overline-font-weight",L.fontWeight,"normal"),Zt=e.FtCssVariable.extend("--ft-typography-overline-letter-spacing",L.letterSpacing,"1.5px"),Bt=e.FtCssVariable.extend("--ft-typography-overline-line-height",L.lineHeight,"16px"),Tt=e.FtCssVariable.extend("--ft-typography-overline-text-transform",L.textTransform,"uppercase"),Ut=e.FtCssVariable.extend("--ft-typography-button-font-family",q),Rt=e.FtCssVariable.extend("--ft-typography-button-font-size",L.fontSize,"14px"),Wt=e.FtCssVariable.extend("--ft-typography-button-font-weight",L.fontWeight,"600"),Kt=e.FtCssVariable.extend("--ft-typography-button-letter-spacing",L.letterSpacing,"1.246px"),Ft=e.FtCssVariable.extend("--ft-typography-button-line-height",L.lineHeight,"16px"),Gt=e.FtCssVariable.extend("--ft-typography-button-text-transform",L.textTransform,"uppercase"),Ht=i.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
|
-
font-family: ${
|
|
16
|
-
font-size: ${
|
|
17
|
-
font-weight: ${
|
|
18
|
-
letter-spacing: ${
|
|
19
|
-
line-height: ${
|
|
15
|
+
font-family: ${X};
|
|
16
|
+
font-size: ${Y};
|
|
17
|
+
font-weight: ${J};
|
|
18
|
+
letter-spacing: ${Q};
|
|
19
|
+
line-height: ${V};
|
|
20
20
|
text-transform: ${tt};
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,Pt=i.css`
|
|
23
23
|
.ft-typography--title-dense {
|
|
24
24
|
font-family: ${et};
|
|
25
25
|
font-size: ${it};
|
|
26
|
-
font-weight: ${
|
|
27
|
-
letter-spacing: ${
|
|
28
|
-
line-height: ${
|
|
29
|
-
text-transform: ${
|
|
26
|
+
font-weight: ${ot};
|
|
27
|
+
letter-spacing: ${st};
|
|
28
|
+
line-height: ${lt};
|
|
29
|
+
text-transform: ${nt};
|
|
30
30
|
}
|
|
31
|
-
`,qt=
|
|
31
|
+
`,qt=i.css`
|
|
32
32
|
.ft-typography--subtitle1 {
|
|
33
|
-
font-family: ${
|
|
34
|
-
font-size: ${
|
|
35
|
-
font-weight: ${
|
|
36
|
-
letter-spacing: ${
|
|
37
|
-
line-height: ${
|
|
38
|
-
text-transform: ${
|
|
33
|
+
font-family: ${rt};
|
|
34
|
+
font-size: ${pt};
|
|
35
|
+
font-weight: ${at};
|
|
36
|
+
letter-spacing: ${ft};
|
|
37
|
+
line-height: ${ht};
|
|
38
|
+
text-transform: ${dt};
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,Lt=i.css`
|
|
41
41
|
.ft-typography--subtitle2 {
|
|
42
|
-
font-family: ${
|
|
43
|
-
font-size: ${
|
|
44
|
-
font-weight: ${
|
|
42
|
+
font-family: ${ct};
|
|
43
|
+
font-size: ${ut};
|
|
44
|
+
font-weight: ${xt};
|
|
45
45
|
letter-spacing: ${yt};
|
|
46
46
|
line-height: ${gt};
|
|
47
47
|
text-transform: ${vt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,Xt=i.css`
|
|
51
51
|
.ft-typography--body1 {
|
|
52
52
|
font-family: ${bt.fontFamily};
|
|
53
53
|
font-size: ${bt.fontSize};
|
|
@@ -56,518 +56,469 @@ const U=t=>({_$litStatic$:t}),P=new Map,G=(t=>(e,...i)=>{var r;const o=i.length;
|
|
|
56
56
|
line-height: ${bt.lineHeight};
|
|
57
57
|
text-transform: ${bt.textTransform};
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,Yt=i.css`
|
|
60
60
|
.ft-typography--body2 {
|
|
61
|
-
font-family: ${
|
|
62
|
-
font-size: ${
|
|
61
|
+
font-family: ${mt};
|
|
62
|
+
font-size: ${$t};
|
|
63
63
|
font-weight: ${wt};
|
|
64
64
|
letter-spacing: ${kt};
|
|
65
|
-
line-height: ${
|
|
66
|
-
text-transform: ${
|
|
65
|
+
line-height: ${zt};
|
|
66
|
+
text-transform: ${St};
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,Jt=i.css`
|
|
69
69
|
.ft-typography--caption {
|
|
70
|
-
font-family: ${
|
|
71
|
-
font-size: ${
|
|
72
|
-
font-weight: ${
|
|
73
|
-
letter-spacing: ${
|
|
74
|
-
line-height: ${
|
|
75
|
-
text-transform: ${
|
|
70
|
+
font-family: ${Ot.fontFamily};
|
|
71
|
+
font-size: ${Ot.fontSize};
|
|
72
|
+
font-weight: ${Ot.fontWeight};
|
|
73
|
+
letter-spacing: ${Ot.letterSpacing};
|
|
74
|
+
line-height: ${Ot.lineHeight};
|
|
75
|
+
text-transform: ${Ot.textTransform};
|
|
76
76
|
}
|
|
77
|
-
`,
|
|
77
|
+
`,Qt=i.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
|
-
font-family: ${
|
|
80
|
-
font-size: ${
|
|
81
|
-
font-weight: ${
|
|
82
|
-
letter-spacing: ${
|
|
83
|
-
line-height: ${
|
|
79
|
+
font-family: ${Ct};
|
|
80
|
+
font-size: ${Et};
|
|
81
|
+
font-weight: ${At};
|
|
82
|
+
letter-spacing: ${jt};
|
|
83
|
+
line-height: ${Nt};
|
|
84
84
|
text-transform: ${It};
|
|
85
85
|
}
|
|
86
|
-
`,
|
|
86
|
+
`,Vt=i.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
88
|
font-family: ${Dt};
|
|
89
|
-
font-size: ${
|
|
90
|
-
font-weight: ${
|
|
91
|
-
letter-spacing: ${
|
|
89
|
+
font-size: ${_t};
|
|
90
|
+
font-weight: ${Mt};
|
|
91
|
+
letter-spacing: ${Zt};
|
|
92
92
|
line-height: ${Bt};
|
|
93
|
-
text-transform: ${
|
|
93
|
+
text-transform: ${Tt};
|
|
94
94
|
}
|
|
95
|
-
`,te=
|
|
95
|
+
`,te=i.css`
|
|
96
96
|
.ft-typography--button {
|
|
97
|
-
font-family: ${
|
|
98
|
-
font-size: ${
|
|
99
|
-
font-weight: ${
|
|
100
|
-
letter-spacing: ${
|
|
101
|
-
line-height: ${
|
|
102
|
-
text-transform: ${
|
|
97
|
+
font-family: ${Ut};
|
|
98
|
+
font-size: ${Rt};
|
|
99
|
+
font-weight: ${Wt};
|
|
100
|
+
letter-spacing: ${Kt};
|
|
101
|
+
line-height: ${Ft};
|
|
102
|
+
text-transform: ${Gt};
|
|
103
103
|
}
|
|
104
|
-
`;
|
|
105
|
-
.
|
|
106
|
-
vertical-align: inherit;
|
|
107
|
-
}
|
|
108
|
-
`]}getTemplate(){return this.element?G`
|
|
109
|
-
<${U(this.element)}
|
|
104
|
+
`;class ee extends e.FtLitElement{constructor(){super(...arguments),this.variant=G.body1}render(){return this.element?F`
|
|
105
|
+
<${W(this.element)}
|
|
110
106
|
class="ft-typography ft-typography--${this.variant}">
|
|
111
107
|
<slot></slot>
|
|
112
|
-
</${
|
|
113
|
-
`:
|
|
108
|
+
</${W(this.element)}>
|
|
109
|
+
`:F`
|
|
114
110
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
115
|
-
`}}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
.ft-input-label {
|
|
123
|
-
border-color: ${re.borderColor};
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.ft-input-label:before,
|
|
127
|
-
.ft-input-label:after {
|
|
128
|
-
content: "";
|
|
129
|
-
display: flex;
|
|
130
|
-
border-bottom-width: 1px;
|
|
131
|
-
border-bottom-style: solid;
|
|
132
|
-
border-color: inherit;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.ft-input-label:before {
|
|
136
|
-
width: ${re.horizontalSpacing};
|
|
137
|
-
flex-shrink: 0;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.ft-input-label:after {
|
|
141
|
-
flex-grow: 1;
|
|
142
|
-
flex-shrink: 1;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.ft-input-label--text {
|
|
146
|
-
display: flex;
|
|
147
|
-
flex-shrink: 1;
|
|
148
|
-
position: relative;
|
|
149
|
-
border-bottom-width: 1px;
|
|
150
|
-
border-bottom-style: solid;
|
|
151
|
-
border-color: inherit;
|
|
152
|
-
color: ${re.textColor};
|
|
153
|
-
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
154
|
-
${a.setVariable(zt.fontSize,re.fontSize)};
|
|
155
|
-
${a.setVariable(zt.lineHeight,re.fontSize)};
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.ft-input-label--disabled .ft-input-label--text {
|
|
159
|
-
color: ${re.disabledTextColor};
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.ft-input-label--hidden-text {
|
|
163
|
-
padding: 0 4px;
|
|
164
|
-
opacity: 0;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.ft-input-label--floating-text {
|
|
168
|
-
position: absolute;
|
|
169
|
-
top: calc(50% - var(--ft-typography-caption-line-height) / 2);
|
|
170
|
-
transition: top 250ms;
|
|
171
|
-
width: calc(100% - 8px);
|
|
172
|
-
overflow: hidden;
|
|
173
|
-
white-space: nowrap;
|
|
174
|
-
text-overflow: ellipsis;
|
|
175
|
-
padding: ${re.verticalSpacing} 4px;
|
|
176
|
-
margin: calc(${re.verticalSpacing} * -1) 0;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.ft-input-label--raised .ft-input-label--text {
|
|
180
|
-
${a.setVariable(zt.fontSize,re.raisedFontSize)};
|
|
181
|
-
${a.setVariable(zt.lineHeight,re.raisedFontSize)};
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.ft-input-label--raised .ft-input-label--floating-text {
|
|
185
|
-
top: ${re.verticalSpacing};
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.ft-input-label--outlined .ft-input-label--text,
|
|
189
|
-
.ft-input-label--outlined:before,
|
|
190
|
-
.ft-input-label--outlined:after {
|
|
191
|
-
border-top-width: 1px;
|
|
192
|
-
border-top-style: solid;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.ft-input-label--outlined:before {
|
|
196
|
-
border-left-width: 1px;
|
|
197
|
-
border-left-style: solid;
|
|
198
|
-
border-radius: ${re.borderRadiusS} 0 0 ${re.borderRadiusS};
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.ft-input-label--outlined:after {
|
|
202
|
-
border-right-width: 1px;
|
|
203
|
-
border-right-style: solid;
|
|
204
|
-
border-radius: 0 ${re.borderRadiusS} ${re.borderRadiusS} 0;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
208
|
-
padding: 2px 4px;
|
|
209
|
-
z-index: ${re.raisedZIndex};
|
|
210
|
-
background-color: ${re.colorSurface};
|
|
211
|
-
border-radius: ${re.borderRadiusS};
|
|
212
|
-
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
216
|
-
border-top: none;
|
|
217
|
-
}
|
|
218
|
-
`]}getTemplate(){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 e.html`
|
|
219
|
-
<div class="${r.classMap(t)}">
|
|
220
|
-
${this.text?e.html`
|
|
111
|
+
`}}ee.styles=[Ht,Pt,qt,Lt,Xt,Yt,Jt,Qt,Vt,te,i.css`
|
|
112
|
+
.ft-typography {
|
|
113
|
+
vertical-align: inherit;
|
|
114
|
+
}
|
|
115
|
+
`],H([o.property()],ee.prototype,"element",void 0),H([o.property()],ee.prototype,"variant",void 0),e.customElement("ft-typography")(ee);var ie=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};const oe={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 se extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled};return i.html`
|
|
116
|
+
<div class="${s.classMap(t)}">
|
|
117
|
+
${this.text?i.html`
|
|
221
118
|
<div class="ft-input-label--text ft-typography--caption">
|
|
222
119
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
223
120
|
<span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span>
|
|
224
121
|
</div>
|
|
225
122
|
`:null}
|
|
226
123
|
</div>
|
|
227
|
-
`}}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
235
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
236
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
237
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
238
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
239
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
240
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
241
|
-
***************************************************************************** */
|
|
242
|
-
var ae=function(t,e){return ae=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])},ae(t,e)};var se=function(){return se=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},se.apply(this,arguments)};function pe(t,e,i,r){for(var o,a=arguments.length,s=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,p=t.length-1;p>=0;p--)(o=t[p])&&(s=(a<3?o(s):a>3?o(e,i,s):o(e,i))||s);return a>3&&s&&Object.defineProperty(e,i,s),s}function ne(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.")}
|
|
243
|
-
/**
|
|
244
|
-
* @license
|
|
245
|
-
* Copyright 2018 Google Inc.
|
|
246
|
-
*
|
|
247
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
248
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
249
|
-
* in the Software without restriction, including without limitation the rights
|
|
250
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
251
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
252
|
-
* furnished to do so, subject to the following conditions:
|
|
253
|
-
*
|
|
254
|
-
* The above copyright notice and this permission notice shall be included in
|
|
255
|
-
* all copies or substantial portions of the Software.
|
|
256
|
-
*
|
|
257
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
258
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
259
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
260
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
261
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
262
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
263
|
-
* THE SOFTWARE.
|
|
264
|
-
*/
|
|
265
|
-
/**
|
|
266
|
-
* @license
|
|
267
|
-
* Copyright 2018 Google LLC
|
|
268
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
269
|
-
*/
|
|
270
|
-
const ce=()=>{},le={get passive(){return!1}};document.addEventListener("x",ce,le),document.removeEventListener("x",ce);
|
|
271
|
-
/**
|
|
272
|
-
* @license
|
|
273
|
-
* Copyright 2018 Google LLC
|
|
274
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
275
|
-
*/
|
|
276
|
-
class de extends e.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()}}
|
|
277
|
-
/**
|
|
278
|
-
* @license
|
|
279
|
-
* Copyright 2016 Google Inc.
|
|
280
|
-
*
|
|
281
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
282
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
283
|
-
* in the Software without restriction, including without limitation the rights
|
|
284
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
285
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
286
|
-
* furnished to do so, subject to the following conditions:
|
|
287
|
-
*
|
|
288
|
-
* The above copyright notice and this permission notice shall be included in
|
|
289
|
-
* all copies or substantial portions of the Software.
|
|
290
|
-
*
|
|
291
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
292
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
293
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
294
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
295
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
296
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
297
|
-
* THE SOFTWARE.
|
|
298
|
-
*/var fe=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}(),ue={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"},he={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"},me={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};
|
|
299
|
-
/**
|
|
300
|
-
* @license
|
|
301
|
-
* Copyright 2016 Google Inc.
|
|
302
|
-
*
|
|
303
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
304
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
305
|
-
* in the Software without restriction, including without limitation the rights
|
|
306
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
307
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
308
|
-
* furnished to do so, subject to the following conditions:
|
|
309
|
-
*
|
|
310
|
-
* The above copyright notice and this permission notice shall be included in
|
|
311
|
-
* all copies or substantial portions of the Software.
|
|
312
|
-
*
|
|
313
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
314
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
315
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
316
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
317
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
318
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
319
|
-
* THE SOFTWARE.
|
|
320
|
-
*/
|
|
321
|
-
/**
|
|
322
|
-
* @license
|
|
323
|
-
* Copyright 2016 Google Inc.
|
|
324
|
-
*
|
|
325
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
326
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
327
|
-
* in the Software without restriction, including without limitation the rights
|
|
328
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
329
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
330
|
-
* furnished to do so, subject to the following conditions:
|
|
331
|
-
*
|
|
332
|
-
* The above copyright notice and this permission notice shall be included in
|
|
333
|
-
* all copies or substantial portions of the Software.
|
|
334
|
-
*
|
|
335
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
336
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
337
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
338
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
339
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
340
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
341
|
-
* THE SOFTWARE.
|
|
342
|
-
*/
|
|
343
|
-
var ye=["touchstart","pointerdown","mousedown","keydown"],ge=["touchend","pointerup","mouseup","contextmenu"],ve=[],be=function(t){function e(i){var r=t.call(this,se(se({},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 function(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}ae(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return ue},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return he},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return me},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=ne(ye),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=ne(ge),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=ne(ye),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=ne(ge),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&&ve.length>0&&ve.some((function(t){return e.adapter.containsEventTarget(t)}))?this.resetActivationState():(void 0!==t&&(ve.push(t.target),this.registerDeactivationHandlers(t)),i.wasElementMadeActive=this.checkElementMadeActive(t),i.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){ve=[],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,s=a.FG_DEACTIVATION,p=a.FG_ACTIVATION,n=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var c="",l="";if(!this.adapter.isUnbounded()){var d=this.getFgTranslationCoordinates(),f=d.startPoint,u=d.endPoint;c=f.x+"px, "+f.y+"px",l=u.x+"px, "+u.y+"px"}this.adapter.updateCssVariable(r,c),this.adapter.updateCssVariable(o,l),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(s),this.adapter.computeBoundingRect(),this.adapter.addClass(p),this.activationTimer=setTimeout((function(){t.activationTimerCallback()}),n)},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,s=e.y,p=a+i.left,n=s+i.top;if("touchstart"===t.type){var c=t;r=c.changedTouches[0].pageX-p,o=c.changedTouches[0].pageY-n}else{var l=t;r=l.pageX-p,o=l.pageY-n}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)}),me.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=se({},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}(fe),$e=be;
|
|
344
|
-
/**
|
|
345
|
-
* @license
|
|
346
|
-
* Copyright 2018 Google LLC
|
|
347
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
348
|
-
*/
|
|
349
|
-
class xe extends de{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=$e}get isActive(){return t=this.parentElement||this,e=":active",(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e);var t,e}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),i=this.selected&&(this.primary||!this.accent),o={"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":i,"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 e.html`
|
|
350
|
-
<div class="mdc-ripple-surface mdc-ripple-upgraded ${r.classMap(o)}"
|
|
351
|
-
style="${s.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>`}}pe([i.query(".mdc-ripple-surface")],xe.prototype,"mdcRoot",void 0),pe([i.property({type:Boolean})],xe.prototype,"primary",void 0),pe([i.property({type:Boolean})],xe.prototype,"accent",void 0),pe([i.property({type:Boolean})],xe.prototype,"unbounded",void 0),pe([i.property({type:Boolean})],xe.prototype,"disabled",void 0),pe([i.property({type:Boolean})],xe.prototype,"activated",void 0),pe([i.property({type:Boolean})],xe.prototype,"selected",void 0),pe([i.property({type:Boolean})],xe.prototype,"internalUseStateLayerCustomProperties",void 0),pe([i.state()],xe.prototype,"hovering",void 0),pe([i.state()],xe.prototype,"bgFocused",void 0),pe([i.state()],xe.prototype,"fgActivation",void 0),pe([i.state()],xe.prototype,"fgDeactivation",void 0),pe([i.state()],xe.prototype,"fgScale",void 0),pe([i.state()],xe.prototype,"fgSize",void 0),pe([i.state()],xe.prototype,"translateStart",void 0),pe([i.state()],xe.prototype,"translateEnd",void 0),pe([i.state()],xe.prototype,"leftPos",void 0),pe([i.state()],xe.prototype,"topPos",void 0);
|
|
352
|
-
/**
|
|
353
|
-
* @license
|
|
354
|
-
* Copyright 2021 Google LLC
|
|
355
|
-
* SPDX-LIcense-Identifier: Apache-2.0
|
|
356
|
-
*/
|
|
357
|
-
const we=e.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)}`
|
|
358
|
-
/**
|
|
359
|
-
* @license
|
|
360
|
-
* Copyright 2018 Google LLC
|
|
361
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
362
|
-
*/;let ke=class extends xe{};ke.styles=[we],ke=pe([i.customElement("mwc-ripple")],ke);
|
|
363
|
-
/**
|
|
364
|
-
* @license
|
|
365
|
-
* Copyright 2020 Google LLC
|
|
366
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
367
|
-
*/
|
|
368
|
-
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()}))}}}var Ae=function(t,e,i,r){for(var o,a=arguments.length,s=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,p=t.length-1;p>=0;p--)(o=t[p])&&(s=(a<3?o(s):a>3?o(e,i,s):o(e,i))||s);return a>3&&s&&Object.defineProperty(e,i,s),s};const ze={color:a.FtCssVariable.extend("--ft-ripple-color",a.designSystemVariables.colorContent),primaryColor:a.FtCssVariable.extend("--ft-ripple-primary-color",a.FtCssVariable.extend("--ft-ripple-color",a.designSystemVariables.colorPrimary)),secondaryColor:a.FtCssVariable.extend("--ft-ripple-secondary-color",a.FtCssVariable.extend("--ft-ripple-color",a.designSystemVariables.colorSecondary)),opacityContentOnSurfacePressed:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),opacityContentOnSurfaceDragged:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfaceDragged,"Design system")};let Oe=class extends a.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1}getStyles(){return e.css`
|
|
369
|
-
:host {
|
|
370
|
-
display: contents;
|
|
371
|
-
|
|
372
|
-
--mdc-ripple-color: ${ze.color};
|
|
373
|
-
--mdc-ripple-press-opacity: ${ze.opacityContentOnSurfacePressed};
|
|
374
|
-
--mdc-ripple-hover-opacity: ${ze.opacityContentOnSurfaceHover};
|
|
375
|
-
--mdc-ripple-focus-opacity: ${ze.opacityContentOnSurfaceFocused};
|
|
376
|
-
--mdc-ripple-selected-opacity: ${ze.opacityContentOnSurfaceSelected};
|
|
377
|
-
--mdc-ripple-activated-opacity: ${ze.opacityContentOnSurfaceDragged};
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
mwc-ripple.ft-ripple--secondary {
|
|
381
|
-
--mdc-ripple-color: ${ze.secondaryColor};
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
mwc-ripple.ft-ripple--primary {
|
|
385
|
-
--mdc-ripple-color: ${ze.primaryColor};
|
|
386
|
-
}
|
|
387
|
-
`}getTemplate(){return e.html`
|
|
388
|
-
<mwc-ripple
|
|
389
|
-
class="${this.primary?"ft-ripple--primary":this.secondary?"ft-ripple--secondary":""}"
|
|
390
|
-
?unbounded=${this.unbounded}
|
|
391
|
-
?activated=${this.activated}
|
|
392
|
-
?selected=${this.selected}
|
|
393
|
-
?disabled=${this.disabled}
|
|
394
|
-
></mwc-ripple>
|
|
395
|
-
`}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple()}endRipple(){var t,e,i;null===(t=this.rippleHandlers)||void 0===t||t.endHover(),null===(e=this.rippleHandlers)||void 0===e||e.endFocus(),null===(i=this.rippleHandlers)||void 0===i||i.endPress()}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentNode;if(e){const t=new Se((async()=>this.mwcRipple)),i=(...e)=>i=>{e.forEach((e=>window.addEventListener(e,t.endPress,{once:!0}))),t.startPress(i)},r=i("mouseup"),o=i("touchend","touchcancel"),a=t=>{["Enter"," "].includes(t.key)&&i("keyup")()};e.addEventListener("mouseenter",t.startHover),e.addEventListener("mouseleave",t.endHover),e.addEventListener("mousedown",r),e.addEventListener("touchstart",o),e.addEventListener("keydown",a),e.addEventListener("focus",t.startFocus),e.addEventListener("blur",t.endFocus),this.onDisconnect=()=>{e.removeEventListener("mouseenter",t.startHover),e.removeEventListener("mouseleave",t.endHover),e.removeEventListener("mousedown",r),e.removeEventListener("touchstart",o),e.removeEventListener("keydown",a),e.removeEventListener("focus",t.startFocus),e.removeEventListener("blur",t.endFocus)},this.rippleHandlers=t}}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};Oe.elementDefinitions={"mwc-ripple":ke},Ae([i.property({type:Boolean})],Oe.prototype,"primary",void 0),Ae([i.property({type:Boolean})],Oe.prototype,"secondary",void 0),Ae([i.property({type:Boolean})],Oe.prototype,"unbounded",void 0),Ae([i.property({type:Boolean})],Oe.prototype,"activated",void 0),Ae([i.property({type:Boolean})],Oe.prototype,"selected",void 0),Ae([i.property({type:Boolean})],Oe.prototype,"disabled",void 0),Ae([i.query("mwc-ripple")],Oe.prototype,"mwcRipple",void 0),Oe=Ae([a.customElement("ft-ripple")],Oe);
|
|
396
|
-
/**
|
|
397
|
-
* @license
|
|
398
|
-
* Copyright 2021 Google LLC
|
|
399
|
-
* SPDX-LIcense-Identifier: Apache-2.0
|
|
400
|
-
*/
|
|
401
|
-
const Te=e.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"}`
|
|
402
|
-
/**
|
|
403
|
-
* @license
|
|
404
|
-
* Copyright 2018 Google LLC
|
|
405
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
406
|
-
*/;let _e=class extends e.LitElement{render(){return e.html`<span><slot></slot></span>`}};_e.styles=[Te],_e=pe([i.customElement("mwc-icon")],_e);var Ee=function(t,e,i,r){for(var o,a=arguments.length,s=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,p=t.length-1;p>=0;p--)(o=t[p])&&(s=(a<3?o(s):a>3?o(e,i,s):o(e,i))||s);return a>3&&s&&Object.defineProperty(e,i,s),s};t.FtSelectOption=class extends a.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}getTemplate(){return e.html``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}},t.FtSelectOption.elementDefinitions={},Ee([i.property({type:String})],t.FtSelectOption.prototype,"label",void 0),Ee([i.property({type:Object,converter:t=>t})],t.FtSelectOption.prototype,"value",void 0),Ee([i.property({type:Boolean,reflect:!0})],t.FtSelectOption.prototype,"selected",void 0),t.FtSelectOption=Ee([a.customElement("ft-select-option")],t.FtSelectOption);const Ce={labelSize:a.FtCssVariable.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:a.FtCssVariable.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:a.FtCssVariable.create("--ft-select-vertical-spacing","SIZE","4px"),selectedOptionColor:a.FtCssVariable.extend("--ft-select-selected-option-color",a.designSystemVariables.colorOnSurface),helperColor:a.FtCssVariable.extend("--ft-select-helper-color",a.designSystemVariables.colorOnSurfaceMedium),optionsColor:a.FtCssVariable.extend("--ft-select-options-color",a.designSystemVariables.colorOnSurface),optionsZIndex:a.FtCssVariable.create("--ft-select-options-z-index","NUMBER","2"),colorSurface:a.FtCssVariable.external(a.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceDisabled:a.FtCssVariable.external(a.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:a.FtCssVariable.external(a.designSystemVariables.colorPrimary,"Design system"),borderRadiusS:a.FtCssVariable.external(a.designSystemVariables.borderRadiusS,"Design system"),elevation02:a.FtCssVariable.external(a.designSystemVariables.elevation02,"Design system")};t.FtSelect=class extends a.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)}getStyles(){return[Xt,Yt,e.css`
|
|
407
|
-
*:focus {
|
|
408
|
-
outline: none;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
.ft-select {
|
|
412
|
-
display: flex;
|
|
413
|
-
flex-direction: column;
|
|
414
|
-
align-items: stretch;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
.ft-select--main-panel {
|
|
418
|
-
position: relative;
|
|
419
|
-
display: flex;
|
|
420
|
-
height: calc(4 * ${Ce.verticalSpacing} + ${Ce.labelSize} + ${Ce.selectedOptionSize});
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
.ft-select--input-panel {
|
|
424
|
-
flex-grow: 1;
|
|
425
|
-
position: relative;
|
|
426
|
-
display: flex;
|
|
427
|
-
align-items: center;
|
|
428
|
-
overflow: hidden;
|
|
429
|
-
padding-left: 16px;
|
|
430
|
-
padding-right: 8px;
|
|
431
|
-
gap: 8px;
|
|
432
|
-
color: ${Ce.selectedOptionColor};
|
|
433
|
-
${a.setVariable(ze.color,Ce.selectedOptionColor)};
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
.ft-select--input-panel,
|
|
437
|
-
.ft-select--option {
|
|
438
|
-
${a.setVariable(ze.opacityContentOnSurfaceHover,"0.08")};
|
|
439
|
-
${a.setVariable(ze.opacityContentOnSurfaceDragged,"0.04")};
|
|
440
|
-
}
|
|
124
|
+
`}}se.elementDefinitions={},se.styles=[Jt,i.css`
|
|
125
|
+
.ft-input-label {
|
|
126
|
+
position: absolute;
|
|
127
|
+
inset: 0;
|
|
128
|
+
display: flex;
|
|
129
|
+
}
|
|
441
130
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
}
|
|
131
|
+
.ft-input-label {
|
|
132
|
+
border-color: ${oe.borderColor};
|
|
133
|
+
}
|
|
446
134
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
135
|
+
.ft-input-label:before,
|
|
136
|
+
.ft-input-label:after {
|
|
137
|
+
content: "";
|
|
138
|
+
display: flex;
|
|
139
|
+
border-bottom-width: 1px;
|
|
140
|
+
border-bottom-style: solid;
|
|
141
|
+
border-color: inherit;
|
|
142
|
+
}
|
|
451
143
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
}
|
|
144
|
+
.ft-input-label:before {
|
|
145
|
+
width: ${oe.horizontalSpacing};
|
|
146
|
+
flex-shrink: 0;
|
|
147
|
+
}
|
|
457
148
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
149
|
+
.ft-input-label:after {
|
|
150
|
+
flex-grow: 1;
|
|
151
|
+
flex-shrink: 1;
|
|
152
|
+
}
|
|
461
153
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
154
|
+
.ft-input-label--text {
|
|
155
|
+
display: flex;
|
|
156
|
+
flex-shrink: 1;
|
|
157
|
+
position: relative;
|
|
158
|
+
border-bottom-width: 1px;
|
|
159
|
+
border-bottom-style: solid;
|
|
160
|
+
border-color: inherit;
|
|
161
|
+
color: ${oe.textColor};
|
|
162
|
+
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
163
|
+
${e.setVariable(Ot.fontSize,oe.fontSize)};
|
|
164
|
+
${e.setVariable(Ot.lineHeight,oe.fontSize)};
|
|
165
|
+
}
|
|
466
166
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
flex-shrink: 1;
|
|
471
|
-
overflow: hidden;
|
|
472
|
-
white-space: nowrap;
|
|
473
|
-
text-overflow: ellipsis;
|
|
474
|
-
${a.setVariable(bt.fontSize,Ce.selectedOptionSize)};
|
|
475
|
-
${a.setVariable(bt.lineHeight,Ce.selectedOptionSize)};
|
|
476
|
-
}
|
|
167
|
+
.ft-input-label--disabled .ft-input-label--text {
|
|
168
|
+
color: ${oe.disabledTextColor};
|
|
169
|
+
}
|
|
477
170
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
171
|
+
.ft-input-label--hidden-text {
|
|
172
|
+
padding: 0 4px;
|
|
173
|
+
opacity: 0;
|
|
174
|
+
}
|
|
481
175
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
176
|
+
.ft-input-label--floating-text {
|
|
177
|
+
position: absolute;
|
|
178
|
+
top: calc(50% - var(--ft-typography-caption-line-height) / 2);
|
|
179
|
+
transition: top 250ms;
|
|
180
|
+
width: calc(100% - 8px);
|
|
181
|
+
overflow: hidden;
|
|
182
|
+
white-space: nowrap;
|
|
183
|
+
text-overflow: ellipsis;
|
|
184
|
+
padding: ${oe.verticalSpacing} 4px;
|
|
185
|
+
margin: calc(${oe.verticalSpacing} * -1) 0;
|
|
186
|
+
}
|
|
485
187
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
}
|
|
188
|
+
.ft-input-label--raised .ft-input-label--text {
|
|
189
|
+
${e.setVariable(Ot.fontSize,oe.raisedFontSize)};
|
|
190
|
+
${e.setVariable(Ot.lineHeight,oe.raisedFontSize)};
|
|
191
|
+
}
|
|
489
192
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
}
|
|
193
|
+
.ft-input-label--raised .ft-input-label--floating-text {
|
|
194
|
+
top: ${oe.verticalSpacing};
|
|
195
|
+
}
|
|
494
196
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
197
|
+
.ft-input-label--outlined .ft-input-label--text,
|
|
198
|
+
.ft-input-label--outlined:before,
|
|
199
|
+
.ft-input-label--outlined:after {
|
|
200
|
+
border-top-width: 1px;
|
|
201
|
+
border-top-style: solid;
|
|
202
|
+
}
|
|
498
203
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
right: 0;
|
|
505
|
-
color: ${Ce.optionsColor};
|
|
506
|
-
background: ${Ce.colorSurface};
|
|
507
|
-
z-index: ${Ce.optionsZIndex};
|
|
508
|
-
box-shadow: ${Ce.elevation02};
|
|
509
|
-
}
|
|
204
|
+
.ft-input-label--outlined:before {
|
|
205
|
+
border-left-width: 1px;
|
|
206
|
+
border-left-style: solid;
|
|
207
|
+
border-radius: ${oe.borderRadiusS} 0 0 ${oe.borderRadiusS};
|
|
208
|
+
}
|
|
510
209
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
210
|
+
.ft-input-label--outlined:after {
|
|
211
|
+
border-right-width: 1px;
|
|
212
|
+
border-right-style: solid;
|
|
213
|
+
border-radius: 0 ${oe.borderRadiusS} ${oe.borderRadiusS} 0;
|
|
214
|
+
}
|
|
514
215
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
216
|
+
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
217
|
+
padding: 2px 4px;
|
|
218
|
+
z-index: ${oe.raisedZIndex};
|
|
219
|
+
background-color: ${oe.colorSurface};
|
|
220
|
+
border-radius: ${oe.borderRadiusS};
|
|
221
|
+
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
222
|
+
}
|
|
522
223
|
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
224
|
+
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
225
|
+
border-top: none;
|
|
226
|
+
}
|
|
227
|
+
`],ie([o.property({type:String})],se.prototype,"text",void 0),ie([o.property({type:Boolean})],se.prototype,"raised",void 0),ie([o.property({type:Boolean})],se.prototype,"outlined",void 0),ie([o.property({type:Boolean})],se.prototype,"disabled",void 0),e.customElement("ft-input-label")(se);var le=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};const ne={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 re 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),l=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-l.x:l.width/2),this.originY=Math.round(null!=s?s-l.y:l.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return i.html`
|
|
228
|
+
<style>
|
|
229
|
+
.ft-ripple .ft-ripple--effect,
|
|
230
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
231
|
+
width: ${this.rippleSize}px;
|
|
232
|
+
height: ${this.rippleSize}px;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.ft-ripple .ft-ripple--effect {
|
|
236
|
+
left: ${this.originX}px;
|
|
237
|
+
top: ${this.originY}px;
|
|
238
|
+
}
|
|
239
|
+
</style>
|
|
240
|
+
<div class="${s.classMap(t)}">
|
|
241
|
+
<div class="ft-ripple--background"></div>
|
|
242
|
+
<div class="ft-ripple--effect"></div>
|
|
243
|
+
</div>
|
|
244
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple(),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),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()}}var pe,ae;re.elementDefinitions={},re.styles=i.css`
|
|
245
|
+
:host {
|
|
246
|
+
display: contents;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.ft-ripple {
|
|
250
|
+
position: absolute;
|
|
251
|
+
inset: 0;
|
|
252
|
+
pointer-events: none;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
256
|
+
overflow: hidden;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.ft-ripple .ft-ripple--background,
|
|
260
|
+
.ft-ripple .ft-ripple--effect {
|
|
261
|
+
position: absolute;
|
|
262
|
+
opacity: 0;
|
|
263
|
+
background-color: ${ne.color};
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background,
|
|
267
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
268
|
+
background-color: ${ne.secondaryColor};
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background,
|
|
272
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
273
|
+
background-color: ${ne.primaryColor};
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.ft-ripple .ft-ripple--background {
|
|
277
|
+
top: 0;
|
|
278
|
+
left: 0;
|
|
279
|
+
height: 100%;
|
|
280
|
+
width: 100%;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.ft-ripple .ft-ripple--effect,
|
|
284
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
285
|
+
border-radius: 50%;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.ft-ripple .ft-ripple--effect {
|
|
289
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
290
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
294
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
295
|
+
left: 50%;
|
|
296
|
+
top: 50%;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
300
|
+
transform: translate(-50%, -50%);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
304
|
+
opacity: ${ne.opacityContentOnSurfaceHover};
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
308
|
+
opacity: ${ne.opacityContentOnSurfaceSelected};
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
312
|
+
opacity: ${ne.opacityContentOnSurfaceFocused};
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
316
|
+
opacity: ${ne.opacityContentOnSurfacePressed};
|
|
317
|
+
transform: translate(-50%, -50%) scale(1);
|
|
318
|
+
}
|
|
319
|
+
`,le([o.property({type:Boolean})],re.prototype,"primary",void 0),le([o.property({type:Boolean})],re.prototype,"secondary",void 0),le([o.property({type:Boolean})],re.prototype,"unbounded",void 0),le([o.property({type:Boolean})],re.prototype,"activated",void 0),le([o.property({type:Boolean})],re.prototype,"selected",void 0),le([o.property({type:Boolean})],re.prototype,"disabled",void 0),le([o.state()],re.prototype,"hovered",void 0),le([o.state()],re.prototype,"focused",void 0),le([o.state()],re.prototype,"pressed",void 0),le([o.state()],re.prototype,"rippling",void 0),le([o.state()],re.prototype,"rippleSize",void 0),le([o.state()],re.prototype,"originX",void 0),le([o.state()],re.prototype,"originY",void 0),le([o.query(".ft-ripple")],re.prototype,"ripple",void 0),le([o.query(".ft-ripple--effect")],re.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(re),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=""}(pe||(pe={})),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=""}(ae||(ae={})),new Map([...["abw"].map((t=>[t,ae.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,ae.AUDIO])),...["avi"].map((t=>[t,ae.AVI])),...["chm","xhs"].map((t=>[t,ae.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,ae.CODE])),...["csv"].map((t=>[t,ae.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,ae.DITA])),...["epub"].map((t=>[t,ae.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,ae.EXCEL])),...["flac"].map((t=>[t,ae.FLAC])),...["gif"].map((t=>[t,ae.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,ae.GZIP])),...["html","htm","xhtml"].map((t=>[t,ae.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,ae.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,ae.JPEG])),...["json"].map((t=>[t,ae.JSON])),...["m4a","m4p"].map((t=>[t,ae.M4A])),...["mov","qt"].map((t=>[t,ae.MOV])),...["mp3"].map((t=>[t,ae.MP3])),...["mp4","m4v"].map((t=>[t,ae.MP4])),...["ogg","oga"].map((t=>[t,ae.OGG])),...["pdf","ps"].map((t=>[t,ae.PDF])),...["png"].map((t=>[t,ae.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,ae.POWERPOINT])),...["rar"].map((t=>[t,ae.RAR])),...["stp"].map((t=>[t,ae.STP])),...["txt","rtf","md","mdown"].map((t=>[t,ae.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,ae.VIDEO])),...["wav"].map((t=>[t,ae.WAV])),...["wma"].map((t=>[t,ae.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,ae.WORD])),...["xml","xsl","rdf"].map((t=>[t,ae.XML])),...["yaml","yml","x-yaml"].map((t=>[t,ae.YAML])),...["zip"].map((t=>[t,ae.ZIP]))]);var fe,he=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(fe||(fe={}));const de=e.FtCssVariable.create("--ft-icon-font-size","SIZE","24px"),ce=e.FtCssVariable.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-icons")),ue=e.FtCssVariable.extend("--ft-icon-file-format-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-mime")),xe=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=fe.fluid_topics}render(){return i.html`
|
|
320
|
+
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
321
|
+
${n.unsafeHTML(this.getIcon())}
|
|
322
|
+
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
323
|
+
</i>
|
|
324
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;let o=this.textContent;return this.variant===fe.file_format?null!==(t=ae[o.toUpperCase()])&&void 0!==t?t:o:this.variant===fe.fluid_topics?null!==(e=pe[o.toUpperCase()])&&void 0!==e?e:o:i.nothing}}ye.elementDefinitions={},ye.styles=i.css`
|
|
325
|
+
:host, i.ft-icon {
|
|
326
|
+
display: inline-block;
|
|
327
|
+
width: ${de};
|
|
328
|
+
height: ${de};
|
|
329
|
+
text-align: center;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
i.ft-icon {
|
|
333
|
+
font-size: ${de};
|
|
334
|
+
line-height: 1;
|
|
335
|
+
font-weight: normal;
|
|
336
|
+
text-transform: none;
|
|
337
|
+
font-style: normal;
|
|
338
|
+
font-variant: normal;
|
|
339
|
+
speak: none;
|
|
340
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
341
|
+
text-rendering: auto;
|
|
342
|
+
-webkit-font-smoothing: antialiased;
|
|
343
|
+
-moz-osx-font-smoothing: grayscale;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.ft-icon--fluid-topics {
|
|
347
|
+
font-family: ${ce}, ft-icons, fticons, sans-serif;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.ft-icon--file-format {
|
|
351
|
+
font-family: ${ue}, ft-mime, sans-serif;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.ft-icon--material {
|
|
355
|
+
font-family: ${xe}, "Material Icons", sans-serif;
|
|
356
|
+
}
|
|
357
|
+
`,he([o.property()],ye.prototype,"variant",void 0),he([o.query("slot")],ye.prototype,"slottedContent",void 0),e.customElement("ft-icon")(ye);var ge=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class ve 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}))}}ve.elementDefinitions={},ge([o.property({type:String})],ve.prototype,"label",void 0),ge([o.property({type:Object,converter:t=>t})],ve.prototype,"value",void 0),ge([o.property({type:Boolean,reflect:!0})],ve.prototype,"selected",void 0);const be={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 me 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,n,r;let p=!this.disabled&&this.optionsDisplayed&&this.hasOptions,a=this.disabled||!this.hasOptions;const f=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(o=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==o?o:"").length>0,h={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":a,"ft-select--options-displayed":p,"ft-select--has-option-selected":f,"ft-select--no-label":!this.label};return i.html`
|
|
358
|
+
<div class="${s.classMap(h)}" part="container">
|
|
529
359
|
<div class="ft-select--main-panel" part="main-panel">
|
|
530
360
|
<ft-input-label text="${this.label}"
|
|
531
361
|
part="label"
|
|
532
|
-
?disabled=${
|
|
362
|
+
?disabled=${a}
|
|
533
363
|
?outlined=${this.outlined}
|
|
534
|
-
?raised=${
|
|
364
|
+
?raised=${f||p}
|
|
535
365
|
></ft-input-label>
|
|
536
366
|
<div class="ft-select--input-panel"
|
|
537
367
|
part="selected-value"
|
|
538
|
-
tabindex="${
|
|
368
|
+
tabindex="${a?"-1":"0"}"
|
|
539
369
|
@click=${()=>{this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=this.optionsDisplayed}}
|
|
540
370
|
@keydown=${this.onMainPanelKeyDown}
|
|
541
371
|
aria-label="${this.label}"
|
|
542
372
|
aria-haspopup="listbox"
|
|
543
|
-
aria-expanded="${
|
|
544
|
-
<ft-ripple ?disabled=${
|
|
373
|
+
aria-expanded="${p}">
|
|
374
|
+
<ft-ripple ?disabled=${a} ?activated=${!this.outlined}></ft-ripple>
|
|
545
375
|
<ft-typography variant="body1" class="ft-select--selected-option">
|
|
546
|
-
${null!==(
|
|
376
|
+
${null!==(r=null===(n=this.selectedOption)||void 0===n?void 0:n.label)&&void 0!==r?r:""}
|
|
547
377
|
</ft-typography>
|
|
548
|
-
<
|
|
378
|
+
<ft-icon variant="material">${p?"expand_less":"expand_more"}</ft-icon>
|
|
549
379
|
</div>
|
|
550
380
|
<div class="ft-select--options"
|
|
551
381
|
part="options"
|
|
552
382
|
@keydown=${this.onOptionsKeyDown}
|
|
553
383
|
innerrole="listbox">
|
|
554
|
-
${
|
|
384
|
+
${l.repeat(this.options,(t=>t.value),(t=>this.renderOption(t)))}
|
|
555
385
|
</div>
|
|
556
386
|
</div>
|
|
557
|
-
${this.helper?
|
|
387
|
+
${this.helper?i.html`
|
|
558
388
|
<ft-typography class="ft-select--helper-text" variant="caption">${this.helper}
|
|
559
389
|
</ft-typography>`:void 0}
|
|
560
390
|
</div>
|
|
561
391
|
<slot @slotchange=${this.updateOptionsFromSlot}
|
|
562
392
|
@option-change=${this.updateOptionsFromSlot}
|
|
563
393
|
></slot>
|
|
564
|
-
`}renderOption(t){let
|
|
565
|
-
<div class="${
|
|
394
|
+
`}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`
|
|
395
|
+
<div class="${s.classMap(o)}"
|
|
566
396
|
part="option"
|
|
567
397
|
tabindex="0"
|
|
568
398
|
@keydown=${e=>this.onOptionKeyDown(e,t)}
|
|
569
399
|
@click=${()=>this.selectOption(t)}>
|
|
570
|
-
<ft-ripple ?primary=${
|
|
400
|
+
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
571
401
|
${t.label}
|
|
572
402
|
</div>
|
|
573
|
-
`}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,
|
|
403
|
+
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,l;let n;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),n=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),n=null!==(l=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==l?l:this.firstOption}null==n||n.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){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)}}me.elementDefinitions={"ft-input-label":se,"ft-typography":ee,"ft-ripple":re,"ft-icon":ye},me.styles=[Yt,Jt,i.css`
|
|
404
|
+
*:focus {
|
|
405
|
+
outline: none;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.ft-select {
|
|
409
|
+
display: flex;
|
|
410
|
+
flex-direction: column;
|
|
411
|
+
align-items: stretch;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.ft-select--main-panel {
|
|
415
|
+
position: relative;
|
|
416
|
+
display: flex;
|
|
417
|
+
height: calc(4 * ${be.verticalSpacing} + ${be.labelSize} + ${be.selectedOptionSize});
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.ft-select--input-panel {
|
|
421
|
+
flex-grow: 1;
|
|
422
|
+
position: relative;
|
|
423
|
+
display: flex;
|
|
424
|
+
align-items: center;
|
|
425
|
+
overflow: hidden;
|
|
426
|
+
padding-left: 16px;
|
|
427
|
+
padding-right: 8px;
|
|
428
|
+
gap: 8px;
|
|
429
|
+
color: ${be.selectedOptionColor};
|
|
430
|
+
${e.setVariable(ne.color,be.selectedOptionColor)};
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.ft-select--input-panel,
|
|
434
|
+
.ft-select--option {
|
|
435
|
+
${e.setVariable(ne.opacityContentOnSurfaceHover,"0.08")};
|
|
436
|
+
${e.setVariable(ne.opacityContentOnSurfacePressed,"0.04")};
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.ft-select--disabled .ft-select--input-panel,
|
|
440
|
+
.ft-select--disabled .ft-select--option {
|
|
441
|
+
color: ${be.colorOnSurfaceDisabled};
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
445
|
+
.ft-select:not(.ft-select--disabled) .ft-select--option {
|
|
446
|
+
cursor: pointer;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
ft-input-label {
|
|
450
|
+
${e.setVariable(oe.fontSize,be.selectedOptionSize)};
|
|
451
|
+
${e.setVariable(oe.raisedFontSize,be.labelSize)};
|
|
452
|
+
${e.setVariable(oe.verticalSpacing,be.verticalSpacing)};
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
456
|
+
color: ${be.colorPrimary};
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
460
|
+
${e.setVariable(oe.borderColor,be.colorPrimary)};
|
|
461
|
+
${e.setVariable(oe.textColor,be.colorPrimary)};
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.ft-select--selected-option {
|
|
465
|
+
display: block;
|
|
466
|
+
flex-grow: 1;
|
|
467
|
+
flex-shrink: 1;
|
|
468
|
+
overflow: hidden;
|
|
469
|
+
white-space: nowrap;
|
|
470
|
+
text-overflow: ellipsis;
|
|
471
|
+
${e.setVariable(bt.fontSize,be.selectedOptionSize)};
|
|
472
|
+
${e.setVariable(bt.lineHeight,be.selectedOptionSize)};
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
ft-icon {
|
|
476
|
+
flex-shrink: 0;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
slot {
|
|
480
|
+
display: none;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.ft-select--filled .ft-select--input-panel {
|
|
484
|
+
border-radius: ${be.borderRadiusS} ${be.borderRadiusS} 0 0;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
488
|
+
align-self: stretch;
|
|
489
|
+
padding-top: calc(${be.labelSize} + 2 * ${be.verticalSpacing});
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.ft-select--outlined .ft-select--input-panel {
|
|
493
|
+
border-radius: ${be.borderRadiusS};
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.ft-select--options {
|
|
497
|
+
display: none;
|
|
498
|
+
position: absolute;
|
|
499
|
+
top: 100%;
|
|
500
|
+
left: 0;
|
|
501
|
+
right: 0;
|
|
502
|
+
color: ${be.optionsColor};
|
|
503
|
+
background: ${be.colorSurface};
|
|
504
|
+
z-index: ${be.optionsZIndex};
|
|
505
|
+
box-shadow: ${be.elevation02};
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.ft-select--options-displayed .ft-select--options {
|
|
509
|
+
display: block;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.ft-select--option {
|
|
513
|
+
position: relative;
|
|
514
|
+
padding: 4px 16px;
|
|
515
|
+
min-height: 32px;
|
|
516
|
+
display: flex;
|
|
517
|
+
align-items: center;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.ft-select--helper-text {
|
|
521
|
+
padding: 0 12px 0 16px;
|
|
522
|
+
color: ${be.helperColor};
|
|
523
|
+
}
|
|
524
|
+
`],ge([o.property({type:String})],me.prototype,"label",void 0),ge([o.property({type:String})],me.prototype,"helper",void 0),ge([o.property({type:Boolean})],me.prototype,"outlined",void 0),ge([o.property({type:Boolean})],me.prototype,"disabled",void 0),ge([o.property({type:Array})],me.prototype,"options",void 0),ge([o.state()],me.prototype,"selectedOption",void 0),ge([o.state()],me.prototype,"optionsDisplayed",void 0),ge([o.state()],me.prototype,"focusOptions",void 0),ge([o.query(".ft-select")],me.prototype,"container",void 0),ge([o.query(".ft-select--input-panel")],me.prototype,"mainPanel",void 0),ge([o.query(".ft-select--option:first-child")],me.prototype,"firstOption",void 0),ge([o.query(".ft-select--option:focus")],me.prototype,"focusedOption",void 0),ge([o.query(".ft-select--option.ft-select--option-selected")],me.prototype,"selectedOptionElement",void 0),ge([o.query(".ft-select--option:last-child")],me.prototype,"lastOption",void 0),ge([o.query("slot")],me.prototype,"optionsSlot",void 0),e.customElement("ft-select")(me),e.customElement("ft-select-option")(ve),t.FtSelect=me,t.FtSelectCssVariables=be,t.FtSelectOption=ve,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litRepeat,ftGlobals.litUnsafeHTML);
|