@fluid-topics/ft-text-area 0.1.6 → 0.1.9
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-text-area.light.js +559 -0
- package/build/ft-text-area.min.js +124 -48
- package/package.json +5 -5
|
@@ -0,0 +1,559 @@
|
|
|
1
|
+
!function(t,e,i,r,a,o){
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2017 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
var s;const p=globalThis.trustedTypes,n=p?p.createPolicy("lit-html",{createHTML:t=>t}):void 0,c=`lit$${(Math.random()+"").slice(9)}$`,l="?"+c,d=`<${l}>`,f=document,u=(t="")=>f.createComment(t),h=t=>null===t||"object"!=typeof t&&"function"!=typeof t,m=Array.isArray,y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,g=/-->/g,v=/>/g,b=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,x=/'/g,$=/"/g,w=/^(?:script|style|textarea|title)$/i,z=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),S=Symbol.for("lit-noChange"),k=Symbol.for("lit-nothing"),A=new WeakMap,O=f.createTreeWalker(f,129,null,!1),T=(t,e)=>{const i=t.length-1,r=[];let a,o=2===e?"<svg>":"",s=y;for(let e=0;e<i;e++){const i=t[e];let p,n,l=-1,f=0;for(;f<i.length&&(s.lastIndex=f,n=s.exec(i),null!==n);)f=s.lastIndex,s===y?"!--"===n[1]?s=g:void 0!==n[1]?s=v:void 0!==n[2]?(w.test(n[2])&&(a=RegExp("</"+n[2],"g")),s=b):void 0!==n[3]&&(s=b):s===b?">"===n[0]?(s=null!=a?a:y,l=-1):void 0===n[1]?l=-2:(l=s.lastIndex-n[2].length,p=n[1],s=void 0===n[3]?b:'"'===n[3]?$:x):s===$||s===x?s=b:s===g||s===v?s=y:(s=b,a=void 0);const u=s===b&&t[e+1].startsWith("/>")?" ":"";o+=s===y?i+d:l>=0?(r.push(p),i.slice(0,l)+"$lit$"+i.slice(l)+c+u):i+c+(-2===l?(r.push(void 0),e):u)}const p=o+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==n?n.createHTML(p):p,r]};class _{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let a=0,o=0;const s=t.length-1,n=this.parts,[d,f]=T(t,e);if(this.el=_.createElement(d,i),O.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=O.nextNode())&&n.length<s;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const e of r.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(c)){const i=f[o++];if(t.push(e),void 0!==i){const t=r.getAttribute(i.toLowerCase()+"$lit$").split(c),e=/([.?@])?(.*)/.exec(i);n.push({type:1,index:a,name:e[2],strings:t,ctor:"."===e[1]?F:"?"===e[1]?R:"@"===e[1]?N:C})}else n.push({type:6,index:a})}for(const e of t)r.removeAttribute(e)}if(w.test(r.tagName)){const t=r.textContent.split(c),e=t.length-1;if(e>0){r.textContent=p?p.emptyScript:"";for(let i=0;i<e;i++)r.append(t[i],u()),O.nextNode(),n.push({type:2,index:++a});r.append(t[e],u())}}}else if(8===r.nodeType)if(r.data===l)n.push({type:2,index:a});else{let t=-1;for(;-1!==(t=r.data.indexOf(c,t+1));)n.push({type:7,index:a}),t+=c.length-1}a++}}static createElement(t,e){const i=f.createElement("template");return i.innerHTML=t,i}}function E(t,e,i=t,r){var a,o,s,p;if(e===S)return e;let n=void 0!==r?null===(a=i._$Cl)||void 0===a?void 0:a[r]:i._$Cu;const c=h(e)?void 0:e._$litDirective$;return(null==n?void 0:n.constructor)!==c&&(null===(o=null==n?void 0:n._$AO)||void 0===o||o.call(n,!1),void 0===c?n=void 0:(n=new c(t),n._$AT(t,i,r)),void 0!==r?(null!==(s=(p=i)._$Cl)&&void 0!==s?s:p._$Cl=[])[r]=n:i._$Cu=n),void 0!==n&&(e=E(t,n._$AS(t,e.values),n,r)),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:r}=this._$AD,a=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:f).importNode(i,!0);O.currentNode=a;let o=O.nextNode(),s=0,p=0,n=r[0];for(;void 0!==n;){if(s===n.index){let e;2===n.type?e=new D(o,o.nextSibling,this,t):1===n.type?e=new n.ctor(o,n.name,n.strings,this,t):6===n.type&&(e=new B(o,this,t)),this.v.push(e),n=r[++p]}s!==(null==n?void 0:n.index)&&(o=O.nextNode(),s++)}return a}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,r){var a;this.type=2,this._$AH=k,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cg=null===(a=null==r?void 0:r.isConnected)||void 0===a||a}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=E(this,t,e),h(t)?t===k||null==t||""===t?(this._$AH!==k&&this._$AR(),this._$AH=k):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 m(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==k&&h(this._$AH)?this._$AA.nextSibling.data=t:this.S(f.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:r}=t,a="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=_.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===a)this._$AH.m(i);else{const t=new I(a,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=A.get(t.strings);return void 0===e&&A.set(t.strings,e=new _(t)),e}A(t){m(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const a of t)r===e.length?e.push(i=new D(this.M(u()),this.M(u()),this,this.options)):i=e[r],i._$AI(a),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$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 C{constructor(t,e,i,r,a){this.type=1,this._$AH=k,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=a,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=k}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,r){const a=this.strings;let o=!1;if(void 0===a)t=E(this,t,e,0),o=!h(t)||t!==this._$AH&&t!==S,o&&(this._$AH=t);else{const r=t;let s,p;for(t=a[0],s=0;s<a.length-1;s++)p=E(this,r[i+s],e,s),p===S&&(p=this._$AH[s]),o||(o=!h(p)||p!==this._$AH[s]),p===k?t=k:t!==k&&(t+=(null!=p?p:"")+a[s+1]),this._$AH[s]=p}o&&!r&&this.k(t)}k(t){t===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class F extends C{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===k?void 0:t}}const j=p?p.emptyScript:"";class R extends C{constructor(){super(...arguments),this.type=4}k(t){t&&t!==k?this.element.setAttribute(this.name,j):this.element.removeAttribute(this.name)}}class N extends C{constructor(t,e,i,r,a){super(t,e,i,r,a),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=E(this,t,e,0))&&void 0!==i?i:k)===S)return;const r=this._$AH,a=t===k&&r!==k||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==k&&(r===k||a);a&&this.element.removeEventListener(this.name,this,r),o&&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 B{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){E(this,t)}}const H=window.litHtmlPolyfillSupport;null==H||H(_,D),(null!==(s=globalThis.litHtmlVersions)&&void 0!==s?s:globalThis.litHtmlVersions=[]).push("2.1.3");
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
* Copyright 2020 Google LLC
|
|
11
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
+
*/
|
|
13
|
+
const M=t=>({_$litStatic$:t}),U=new Map,V=(t=>(e,...i)=>{var r;const a=i.length;let o,s;const p=[],n=[];let c,l=0,d=!1;for(;l<a;){for(c=e[l];l<a&&void 0!==(s=i[l],o=null===(r=s)||void 0===r?void 0:r._$litStatic$);)c+=o+e[++l],d=!0;n.push(s),p.push(c),l++}if(l===a&&p.push(e[a]),d){const t=p.join("$$lit$$");void 0===(e=U.get(t))&&(p.raw=p,U.set(t,e=p)),i=n}return t(e,...i)})(z);var P,G=function(t,e,i,r){for(var a,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,p=t.length-1;p>=0;p--)(a=t[p])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};!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"}(P||(P={}));const Z=a.FtCssVariable.extend("--ft-typography-font-family",a.designSystemVariables.titleFont),L=a.FtCssVariable.extend("--ft-typography-font-family",a.designSystemVariables.contentFont),W={fontFamily:L,fontSize:a.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:a.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:a.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:a.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:a.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},q=a.FtCssVariable.extend("--ft-typography-title-font-family",Z),K=a.FtCssVariable.extend("--ft-typography-title-font-size",W.fontSize,"20px"),X=a.FtCssVariable.extend("--ft-typography-title-font-weight",W.fontWeight,"normal"),Y=a.FtCssVariable.extend("--ft-typography-title-letter-spacing",W.letterSpacing,"0.15px"),J=a.FtCssVariable.extend("--ft-typography-title-line-height",W.lineHeight,"24px"),Q=a.FtCssVariable.extend("--ft-typography-title-text-transform",W.textTransform,"inherit"),tt=a.FtCssVariable.extend("--ft-typography-title-dense-font-family",Z),et=a.FtCssVariable.extend("--ft-typography-title-dense-font-size",W.fontSize,"14px"),it=a.FtCssVariable.extend("--ft-typography-title-dense-font-weight",W.fontWeight,"normal"),rt=a.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",W.letterSpacing,"0.105px"),at=a.FtCssVariable.extend("--ft-typography-title-dense-line-height",W.lineHeight,"24px"),ot=a.FtCssVariable.extend("--ft-typography-title-dense-text-transform",W.textTransform,"inherit"),st=a.FtCssVariable.extend("--ft-typography-subtitle1-font-family",L),pt=a.FtCssVariable.extend("--ft-typography-subtitle1-font-size",W.fontSize,"16px"),nt=a.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",W.fontWeight,"600"),ct=a.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",W.letterSpacing,"0.144px"),lt=a.FtCssVariable.extend("--ft-typography-subtitle1-line-height",W.lineHeight,"24px"),dt=a.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",W.textTransform,"inherit"),ft=a.FtCssVariable.extend("--ft-typography-subtitle2-font-family",L),ut=a.FtCssVariable.extend("--ft-typography-subtitle2-font-size",W.fontSize,"14px"),ht=a.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",W.fontWeight,"normal"),mt=a.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",W.letterSpacing,"0.098px"),yt=a.FtCssVariable.extend("--ft-typography-subtitle2-line-height",W.lineHeight,"24px"),gt=a.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",W.textTransform,"inherit"),vt={fontFamily:a.FtCssVariable.extend("--ft-typography-body1-font-family",L),fontSize:a.FtCssVariable.extend("--ft-typography-body1-font-size",W.fontSize,"16px"),fontWeight:a.FtCssVariable.extend("--ft-typography-body1-font-weight",W.fontWeight,"normal"),letterSpacing:a.FtCssVariable.extend("--ft-typography-body1-letter-spacing",W.letterSpacing,"0.496px"),lineHeight:a.FtCssVariable.extend("--ft-typography-body1-line-height",W.lineHeight,"24px"),textTransform:a.FtCssVariable.extend("--ft-typography-body1-text-transform",W.textTransform,"inherit")},bt=a.FtCssVariable.extend("--ft-typography-body2-font-family",L),xt=a.FtCssVariable.extend("--ft-typography-body2-font-size",W.fontSize,"14px"),$t=a.FtCssVariable.extend("--ft-typography-body2-font-weight",W.fontWeight,"normal"),wt=a.FtCssVariable.extend("--ft-typography-body2-letter-spacing",W.letterSpacing,"0.252px"),zt=a.FtCssVariable.extend("--ft-typography-body2-line-height",W.lineHeight,"20px"),St=a.FtCssVariable.extend("--ft-typography-body2-text-transform",W.textTransform,"inherit"),kt={fontFamily:a.FtCssVariable.extend("--ft-typography-caption-font-family",L),fontSize:a.FtCssVariable.extend("--ft-typography-caption-font-size",W.fontSize,"12px"),fontWeight:a.FtCssVariable.extend("--ft-typography-caption-font-weight",W.fontWeight,"normal"),letterSpacing:a.FtCssVariable.extend("--ft-typography-caption-letter-spacing",W.letterSpacing,"0.396px"),lineHeight:a.FtCssVariable.extend("--ft-typography-caption-line-height",W.lineHeight,"16px"),textTransform:a.FtCssVariable.extend("--ft-typography-caption-text-transform",W.textTransform,"inherit")},At=a.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",L),Ot=a.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",W.fontSize,"10px"),Tt=a.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",W.fontWeight,"normal"),_t=a.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",W.letterSpacing,"0.33px"),Et=a.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",W.lineHeight,"16px"),It=a.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",W.textTransform,"inherit"),Dt=a.FtCssVariable.extend("--ft-typography-overline-font-family",L),Ct=a.FtCssVariable.extend("--ft-typography-overline-font-size",W.fontSize,"10px"),Ft=a.FtCssVariable.extend("--ft-typography-overline-font-weight",W.fontWeight,"normal"),jt=a.FtCssVariable.extend("--ft-typography-overline-letter-spacing",W.letterSpacing,"1.5px"),Rt=a.FtCssVariable.extend("--ft-typography-overline-line-height",W.lineHeight,"16px"),Nt=a.FtCssVariable.extend("--ft-typography-overline-text-transform",W.textTransform,"uppercase"),Bt=a.FtCssVariable.extend("--ft-typography-button-font-family",L),Ht=a.FtCssVariable.extend("--ft-typography-button-font-size",W.fontSize,"14px"),Mt=a.FtCssVariable.extend("--ft-typography-button-font-weight",W.fontWeight,"600"),Ut=a.FtCssVariable.extend("--ft-typography-button-letter-spacing",W.letterSpacing,"1.246px"),Vt=a.FtCssVariable.extend("--ft-typography-button-line-height",W.lineHeight,"16px"),Pt=a.FtCssVariable.extend("--ft-typography-button-text-transform",W.textTransform,"uppercase"),Gt=e.css`
|
|
14
|
+
.ft-typography--title {
|
|
15
|
+
font-family: ${q};
|
|
16
|
+
font-size: ${K};
|
|
17
|
+
font-weight: ${X};
|
|
18
|
+
letter-spacing: ${Y};
|
|
19
|
+
line-height: ${J};
|
|
20
|
+
text-transform: ${Q};
|
|
21
|
+
}
|
|
22
|
+
`,Zt=e.css`
|
|
23
|
+
.ft-typography--title-dense {
|
|
24
|
+
font-family: ${tt};
|
|
25
|
+
font-size: ${et};
|
|
26
|
+
font-weight: ${it};
|
|
27
|
+
letter-spacing: ${rt};
|
|
28
|
+
line-height: ${at};
|
|
29
|
+
text-transform: ${ot};
|
|
30
|
+
}
|
|
31
|
+
`,Lt=e.css`
|
|
32
|
+
.ft-typography--subtitle1 {
|
|
33
|
+
font-family: ${st};
|
|
34
|
+
font-size: ${pt};
|
|
35
|
+
font-weight: ${nt};
|
|
36
|
+
letter-spacing: ${ct};
|
|
37
|
+
line-height: ${lt};
|
|
38
|
+
text-transform: ${dt};
|
|
39
|
+
}
|
|
40
|
+
`,Wt=e.css`
|
|
41
|
+
.ft-typography--subtitle2 {
|
|
42
|
+
font-family: ${ft};
|
|
43
|
+
font-size: ${ut};
|
|
44
|
+
font-weight: ${ht};
|
|
45
|
+
letter-spacing: ${mt};
|
|
46
|
+
line-height: ${yt};
|
|
47
|
+
text-transform: ${gt};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
`,qt=e.css`
|
|
51
|
+
.ft-typography--body1 {
|
|
52
|
+
font-family: ${vt.fontFamily};
|
|
53
|
+
font-size: ${vt.fontSize};
|
|
54
|
+
font-weight: ${vt.fontWeight};
|
|
55
|
+
letter-spacing: ${vt.letterSpacing};
|
|
56
|
+
line-height: ${vt.lineHeight};
|
|
57
|
+
text-transform: ${vt.textTransform};
|
|
58
|
+
}
|
|
59
|
+
`,Kt=e.css`
|
|
60
|
+
.ft-typography--body2 {
|
|
61
|
+
font-family: ${bt};
|
|
62
|
+
font-size: ${xt};
|
|
63
|
+
font-weight: ${$t};
|
|
64
|
+
letter-spacing: ${wt};
|
|
65
|
+
line-height: ${zt};
|
|
66
|
+
text-transform: ${St};
|
|
67
|
+
}
|
|
68
|
+
`,Xt=e.css`
|
|
69
|
+
.ft-typography--caption {
|
|
70
|
+
font-family: ${kt.fontFamily};
|
|
71
|
+
font-size: ${kt.fontSize};
|
|
72
|
+
font-weight: ${kt.fontWeight};
|
|
73
|
+
letter-spacing: ${kt.letterSpacing};
|
|
74
|
+
line-height: ${kt.lineHeight};
|
|
75
|
+
text-transform: ${kt.textTransform};
|
|
76
|
+
}
|
|
77
|
+
`,Yt=e.css`
|
|
78
|
+
.ft-typography--breadcrumb {
|
|
79
|
+
font-family: ${At};
|
|
80
|
+
font-size: ${Ot};
|
|
81
|
+
font-weight: ${Tt};
|
|
82
|
+
letter-spacing: ${_t};
|
|
83
|
+
line-height: ${Et};
|
|
84
|
+
text-transform: ${It};
|
|
85
|
+
}
|
|
86
|
+
`,Jt=e.css`
|
|
87
|
+
.ft-typography--overline {
|
|
88
|
+
font-family: ${Dt};
|
|
89
|
+
font-size: ${Ct};
|
|
90
|
+
font-weight: ${Ft};
|
|
91
|
+
letter-spacing: ${jt};
|
|
92
|
+
line-height: ${Rt};
|
|
93
|
+
text-transform: ${Nt};
|
|
94
|
+
}
|
|
95
|
+
`,Qt=e.css`
|
|
96
|
+
.ft-typography--button {
|
|
97
|
+
font-family: ${Bt};
|
|
98
|
+
font-size: ${Ht};
|
|
99
|
+
font-weight: ${Mt};
|
|
100
|
+
letter-spacing: ${Ut};
|
|
101
|
+
line-height: ${Vt};
|
|
102
|
+
text-transform: ${Pt};
|
|
103
|
+
}
|
|
104
|
+
`;let te=class extends a.FtLitElement{constructor(){super(...arguments),this.variant=P.body1}getStyles(){return[Gt,Zt,Lt,Wt,qt,Kt,Xt,Yt,Jt,Qt,e.css`
|
|
105
|
+
.ft-typography {
|
|
106
|
+
vertical-align: inherit;
|
|
107
|
+
}
|
|
108
|
+
`]}getTemplate(){return this.element?V`
|
|
109
|
+
<${M(this.element)}
|
|
110
|
+
class="ft-typography ft-typography--${this.variant}">
|
|
111
|
+
<slot></slot>
|
|
112
|
+
</${M(this.element)}>
|
|
113
|
+
`:V`
|
|
114
|
+
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
115
|
+
`}};G([i.property()],te.prototype,"element",void 0),G([i.property()],te.prototype,"variant",void 0),te=G([a.customElement("ft-typography")],te);
|
|
116
|
+
/*! *****************************************************************************
|
|
117
|
+
Copyright (c) Microsoft Corporation.
|
|
118
|
+
|
|
119
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
120
|
+
purpose with or without fee is hereby granted.
|
|
121
|
+
|
|
122
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
123
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
124
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
125
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
126
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
127
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
128
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
129
|
+
***************************************************************************** */
|
|
130
|
+
var ee=function(t,e){return ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},ee(t,e)};var ie=function(){return ie=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var a in e=arguments[i])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t},ie.apply(this,arguments)};function re(t,e,i,r){for(var a,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,p=t.length-1;p>=0;p--)(a=t[p])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s}function ae(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],r=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}
|
|
131
|
+
/**
|
|
132
|
+
* @license
|
|
133
|
+
* Copyright 2021 Google LLC
|
|
134
|
+
* SPDX-LIcense-Identifier: Apache-2.0
|
|
135
|
+
*/const oe=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"}`
|
|
136
|
+
/**
|
|
137
|
+
* @license
|
|
138
|
+
* Copyright 2018 Google LLC
|
|
139
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
140
|
+
*/;let se=class extends e.LitElement{render(){return e.html`<span><slot></slot></span>`}};se.styles=[oe],se=re([i.customElement("mwc-icon")],se);var pe=function(t,e,i,r){for(var a,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,p=t.length-1;p>=0;p--)(a=t[p])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class ne extends CustomEvent{constructor(t,e){super("resize",{detail:{width:t,height:e}})}}const ce=a.FtCssVariable.external(a.designSystemVariables.colorOutline,"Design system"),le=a.FtCssVariable.external(a.designSystemVariables.colorOnSurfaceMedium,"Design system");let de=class extends a.FtLitElement{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.cursor="nwse-resize",this.dragging=!1,this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragFromMouse=t=>this.doDrag(t.clientX,t.clientY),this.doDragFromTouch=t=>this.doDrag(t.touches[0].clientX,t.touches[0].clientY),this.stopDrag=()=>{this.dragging=!1,document.removeEventListener("mousemove",this.doDragFromMouse,!1),document.removeEventListener("mouseup",this.stopDrag,!1),document.removeEventListener("touchmove",this.doDragFromTouch,!1),document.removeEventListener("touchend",this.stopDrag,!1),document.removeEventListener("touchcancel",this.stopDrag,!1)}}getStyles(){return[a.noTextSelect,e.css`
|
|
141
|
+
:host {
|
|
142
|
+
display: block;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.ft-resizer {
|
|
146
|
+
display: flex;
|
|
147
|
+
cursor: ${e.unsafeCSS(this.cursor)}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
mwc-icon {
|
|
151
|
+
transform: rotate(-45deg);
|
|
152
|
+
color: ${ce};
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.ft-resizer--dragging mwc-icon,
|
|
156
|
+
.ft-resizer:hover mwc-icon {
|
|
157
|
+
color: ${le};
|
|
158
|
+
}
|
|
159
|
+
`]}getTemplate(){return e.html`
|
|
160
|
+
<div class="ft-resizer ft-no-text-select ${this.dragging?"ft-resizer--dragging":""}"
|
|
161
|
+
@mousedown=${this.initDragFromMouse}
|
|
162
|
+
@touchstart=${this.initDragFromTouch}>
|
|
163
|
+
<mwc-icon>${this.icon}</mwc-icon>
|
|
164
|
+
</div>
|
|
165
|
+
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,e){this.dragging=!0,this.startX=t,this.startY=e,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,e){let i=this.fixedWidth+t-this.startX,r=this.fixedHeight+e-this.startY;this.dispatchEvent(new ne(i,r))}};de.elementDefinitions={"mwc-icon":se},pe([i.property({type:Number})],de.prototype,"initialWidth",void 0),pe([i.property({type:Number})],de.prototype,"initialHeight",void 0),pe([i.property()],de.prototype,"icon",void 0),pe([i.property()],de.prototype,"cursor",void 0),pe([i.state()],de.prototype,"dragging",void 0),de=pe([i.customElement("ft-resizer")],de);var fe=function(t,e,i,r){for(var a,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,p=t.length-1;p>=0;p--)(a=t[p])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};const ue={fontSize:a.FtCssVariable.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:a.FtCssVariable.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:a.FtCssVariable.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:a.FtCssVariable.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:a.FtCssVariable.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:a.FtCssVariable.extend("--ft-input-label-border-color",a.designSystemVariables.colorOutline),textColor:a.FtCssVariable.extend("--ft-input-label-text-color",a.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:a.FtCssVariable.extend("--ft-input-label-disabled-text-color",a.designSystemVariables.colorOnSurfaceDisabled),colorSurface:a.FtCssVariable.external(a.designSystemVariables.colorSurface,"Design system"),borderRadiusS:a.FtCssVariable.external(a.designSystemVariables.borderRadiusS,"Design system")};let he=class extends a.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1}getStyles(){return[Xt,e.css`
|
|
166
|
+
.ft-input-label {
|
|
167
|
+
position: absolute;
|
|
168
|
+
inset: 0;
|
|
169
|
+
display: flex;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.ft-input-label {
|
|
173
|
+
border-color: ${ue.borderColor};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.ft-input-label:before,
|
|
177
|
+
.ft-input-label:after {
|
|
178
|
+
content: "";
|
|
179
|
+
display: flex;
|
|
180
|
+
border-bottom-width: 1px;
|
|
181
|
+
border-bottom-style: solid;
|
|
182
|
+
border-color: inherit;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.ft-input-label:before {
|
|
186
|
+
width: ${ue.horizontalSpacing};
|
|
187
|
+
flex-shrink: 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.ft-input-label:after {
|
|
191
|
+
flex-grow: 1;
|
|
192
|
+
flex-shrink: 1;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.ft-input-label--text {
|
|
196
|
+
display: flex;
|
|
197
|
+
flex-shrink: 1;
|
|
198
|
+
position: relative;
|
|
199
|
+
border-bottom-width: 1px;
|
|
200
|
+
border-bottom-style: solid;
|
|
201
|
+
border-color: inherit;
|
|
202
|
+
color: ${ue.textColor};
|
|
203
|
+
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
204
|
+
${a.setVariable(kt.fontSize,ue.fontSize)};
|
|
205
|
+
${a.setVariable(kt.lineHeight,ue.fontSize)};
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.ft-input-label--disabled .ft-input-label--text {
|
|
209
|
+
color: ${ue.disabledTextColor};
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.ft-input-label--hidden-text {
|
|
213
|
+
padding: 0 4px;
|
|
214
|
+
opacity: 0;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.ft-input-label--floating-text {
|
|
218
|
+
position: absolute;
|
|
219
|
+
top: calc(50% - var(--ft-typography-caption-line-height) / 2);
|
|
220
|
+
transition: top 250ms;
|
|
221
|
+
width: calc(100% - 8px);
|
|
222
|
+
overflow: hidden;
|
|
223
|
+
white-space: nowrap;
|
|
224
|
+
text-overflow: ellipsis;
|
|
225
|
+
padding: ${ue.verticalSpacing} 4px;
|
|
226
|
+
margin: calc(${ue.verticalSpacing} * -1) 0;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.ft-input-label--raised .ft-input-label--text {
|
|
230
|
+
${a.setVariable(kt.fontSize,ue.raisedFontSize)};
|
|
231
|
+
${a.setVariable(kt.lineHeight,ue.raisedFontSize)};
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.ft-input-label--raised .ft-input-label--floating-text {
|
|
235
|
+
top: ${ue.verticalSpacing};
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.ft-input-label--outlined .ft-input-label--text,
|
|
239
|
+
.ft-input-label--outlined:before,
|
|
240
|
+
.ft-input-label--outlined:after {
|
|
241
|
+
border-top-width: 1px;
|
|
242
|
+
border-top-style: solid;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.ft-input-label--outlined:before {
|
|
246
|
+
border-left-width: 1px;
|
|
247
|
+
border-left-style: solid;
|
|
248
|
+
border-radius: ${ue.borderRadiusS} 0 0 ${ue.borderRadiusS};
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.ft-input-label--outlined:after {
|
|
252
|
+
border-right-width: 1px;
|
|
253
|
+
border-right-style: solid;
|
|
254
|
+
border-radius: 0 ${ue.borderRadiusS} ${ue.borderRadiusS} 0;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
258
|
+
padding: 2px 4px;
|
|
259
|
+
z-index: ${ue.raisedZIndex};
|
|
260
|
+
background-color: ${ue.colorSurface};
|
|
261
|
+
border-radius: ${ue.borderRadiusS};
|
|
262
|
+
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
266
|
+
border-top: none;
|
|
267
|
+
}
|
|
268
|
+
`]}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`
|
|
269
|
+
<div class="${r.classMap(t)}">
|
|
270
|
+
${this.text?e.html`
|
|
271
|
+
<div class="ft-input-label--text ft-typography--caption">
|
|
272
|
+
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
273
|
+
<span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span>
|
|
274
|
+
</div>
|
|
275
|
+
`:null}
|
|
276
|
+
</div>
|
|
277
|
+
`}};he.elementDefinitions={},fe([i.property({type:String})],he.prototype,"text",void 0),fe([i.property({type:Boolean})],he.prototype,"raised",void 0),fe([i.property({type:Boolean})],he.prototype,"outlined",void 0),fe([i.property({type:Boolean})],he.prototype,"disabled",void 0),he=fe([a.customElement("ft-input-label")],he);
|
|
278
|
+
/**
|
|
279
|
+
* @license
|
|
280
|
+
* Copyright 2018 Google LLC
|
|
281
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
282
|
+
*/
|
|
283
|
+
const me=()=>{},ye={get passive(){return!1}};document.addEventListener("x",me,ye),document.removeEventListener("x",me);
|
|
284
|
+
/**
|
|
285
|
+
* @license
|
|
286
|
+
* Copyright 2018 Google LLC
|
|
287
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
288
|
+
*/
|
|
289
|
+
class ge 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()}}
|
|
290
|
+
/**
|
|
291
|
+
* @license
|
|
292
|
+
* Copyright 2016 Google Inc.
|
|
293
|
+
*
|
|
294
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
295
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
296
|
+
* in the Software without restriction, including without limitation the rights
|
|
297
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
298
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
299
|
+
* furnished to do so, subject to the following conditions:
|
|
300
|
+
*
|
|
301
|
+
* The above copyright notice and this permission notice shall be included in
|
|
302
|
+
* all copies or substantial portions of the Software.
|
|
303
|
+
*
|
|
304
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
305
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
306
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
307
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
308
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
309
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
310
|
+
* THE SOFTWARE.
|
|
311
|
+
*/var ve=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}(),be={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"},xe={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"},$e={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};
|
|
312
|
+
/**
|
|
313
|
+
* @license
|
|
314
|
+
* Copyright 2016 Google Inc.
|
|
315
|
+
*
|
|
316
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
317
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
318
|
+
* in the Software without restriction, including without limitation the rights
|
|
319
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
320
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
321
|
+
* furnished to do so, subject to the following conditions:
|
|
322
|
+
*
|
|
323
|
+
* The above copyright notice and this permission notice shall be included in
|
|
324
|
+
* all copies or substantial portions of the Software.
|
|
325
|
+
*
|
|
326
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
327
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
328
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
329
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
330
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
331
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
332
|
+
* THE SOFTWARE.
|
|
333
|
+
*/
|
|
334
|
+
/**
|
|
335
|
+
* @license
|
|
336
|
+
* Copyright 2016 Google Inc.
|
|
337
|
+
*
|
|
338
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
339
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
340
|
+
* in the Software without restriction, including without limitation the rights
|
|
341
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
342
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
343
|
+
* furnished to do so, subject to the following conditions:
|
|
344
|
+
*
|
|
345
|
+
* The above copyright notice and this permission notice shall be included in
|
|
346
|
+
* all copies or substantial portions of the Software.
|
|
347
|
+
*
|
|
348
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
349
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
350
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
351
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
352
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
353
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
354
|
+
* THE SOFTWARE.
|
|
355
|
+
*/
|
|
356
|
+
var we=["touchstart","pointerdown","mousedown","keydown"],ze=["touchend","pointerup","mouseup","contextmenu"],Se=[],ke=function(t){function e(i){var r=t.call(this,ie(ie({},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}ee(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return be},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return xe},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return $e},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,a=r.ROOT,o=r.UNBOUNDED;requestAnimationFrame((function(){t.adapter.addClass(a),t.adapter.isUnbounded()&&(t.adapter.addClass(o),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,a=i.UNBOUNDED;requestAnimationFrame((function(){t.adapter.removeClass(r),t.adapter.removeClass(a),t.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},e.prototype.activate=function(t){this.activateImpl(t)},e.prototype.deactivate=function(){this.deactivateImpl()},e.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){t.layoutInternal(),t.layoutFrame=0}))},e.prototype.setUnbounded=function(t){var i=e.cssClasses.UNBOUNDED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame((function(){return t.adapter.addClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame((function(){return t.adapter.removeClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},e.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers=function(t){var e,i;if(t){try{for(var r=ae(we),a=r.next();!a.done;a=r.next()){var o=a.value;this.adapter.registerInteractionHandler(o,this.activateHandler)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},e.prototype.registerDeactivationHandlers=function(t){var e,i;if("keydown"===t.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var r=ae(ze),a=r.next();!a.done;a=r.next()){var o=a.value;this.adapter.registerDocumentInteractionHandler(o,this.deactivateHandler)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}},e.prototype.deregisterRootHandlers=function(){var t,e;try{for(var i=ae(we),r=i.next();!r.done;r=i.next()){var a=r.value;this.adapter.deregisterInteractionHandler(a,this.activateHandler)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},e.prototype.deregisterDeactivationHandlers=function(){var t,e;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var i=ae(ze),r=i.next();!r.done;r=i.next()){var a=r.value;this.adapter.deregisterDocumentInteractionHandler(a,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&&Se.length>0&&Se.some((function(t){return e.adapter.containsEventTarget(t)}))?this.resetActivationState():(void 0!==t&&(Se.push(t.target),this.registerDeactivationHandlers(t)),i.wasElementMadeActive=this.checkElementMadeActive(t),i.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){Se=[],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,a=i.VAR_FG_TRANSLATE_END,o=e.cssClasses,s=o.FG_DEACTIVATION,p=o.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(a,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,a,o=e.x,s=e.y,p=o+i.left,n=s+i.top;if("touchstart"===t.type){var c=t;r=c.changedTouches[0].pageX-p,a=c.changedTouches[0].pageY-n}else{var l=t;r=l.pageX-p,a=l.pageY-n}return{x:r,y:a}}(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,a=r.hasDeactivationUXRun,o=r.isActivated;(a||!o)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(i),this.fgDeactivationRemovalTimer=setTimeout((function(){t.adapter.removeClass(i)}),$e.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=ie({},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,a=t.VAR_TOP,o=t.VAR_FG_SCALE;this.adapter.updateCssVariable(i,this.initialSize+"px"),this.adapter.updateCssVariable(o,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(a,this.unboundedCoords.top+"px"))},e}(ve),Ae=ke;
|
|
357
|
+
/**
|
|
358
|
+
* @license
|
|
359
|
+
* Copyright 2018 Google LLC
|
|
360
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
361
|
+
*/
|
|
362
|
+
class Oe extends ge{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=Ae}get isActive(){return t=this.parentElement||this,e=":active",(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e);
|
|
363
|
+
/**
|
|
364
|
+
* @license
|
|
365
|
+
* Copyright 2018 Google Inc.
|
|
366
|
+
*
|
|
367
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
368
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
369
|
+
* in the Software without restriction, including without limitation the rights
|
|
370
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
371
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
372
|
+
* furnished to do so, subject to the following conditions:
|
|
373
|
+
*
|
|
374
|
+
* The above copyright notice and this permission notice shall be included in
|
|
375
|
+
* all copies or substantial portions of the Software.
|
|
376
|
+
*
|
|
377
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
378
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
379
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
380
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
381
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
382
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
383
|
+
* THE SOFTWARE.
|
|
384
|
+
*/
|
|
385
|
+
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),a={"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`
|
|
386
|
+
<div class="mdc-ripple-surface mdc-ripple-upgraded ${r.classMap(a)}"
|
|
387
|
+
style="${o.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>`}}re([i.query(".mdc-ripple-surface")],Oe.prototype,"mdcRoot",void 0),re([i.property({type:Boolean})],Oe.prototype,"primary",void 0),re([i.property({type:Boolean})],Oe.prototype,"accent",void 0),re([i.property({type:Boolean})],Oe.prototype,"unbounded",void 0),re([i.property({type:Boolean})],Oe.prototype,"disabled",void 0),re([i.property({type:Boolean})],Oe.prototype,"activated",void 0),re([i.property({type:Boolean})],Oe.prototype,"selected",void 0),re([i.property({type:Boolean})],Oe.prototype,"internalUseStateLayerCustomProperties",void 0),re([i.state()],Oe.prototype,"hovering",void 0),re([i.state()],Oe.prototype,"bgFocused",void 0),re([i.state()],Oe.prototype,"fgActivation",void 0),re([i.state()],Oe.prototype,"fgDeactivation",void 0),re([i.state()],Oe.prototype,"fgScale",void 0),re([i.state()],Oe.prototype,"fgSize",void 0),re([i.state()],Oe.prototype,"translateStart",void 0),re([i.state()],Oe.prototype,"translateEnd",void 0),re([i.state()],Oe.prototype,"leftPos",void 0),re([i.state()],Oe.prototype,"topPos",void 0);
|
|
388
|
+
/**
|
|
389
|
+
* @license
|
|
390
|
+
* Copyright 2021 Google LLC
|
|
391
|
+
* SPDX-LIcense-Identifier: Apache-2.0
|
|
392
|
+
*/
|
|
393
|
+
const Te=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)}`
|
|
394
|
+
/**
|
|
395
|
+
* @license
|
|
396
|
+
* Copyright 2018 Google LLC
|
|
397
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
398
|
+
*/;let _e=class extends Oe{};_e.styles=[Te],_e=re([i.customElement("mwc-ripple")],_e);
|
|
399
|
+
/**
|
|
400
|
+
* @license
|
|
401
|
+
* Copyright 2020 Google LLC
|
|
402
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
403
|
+
*/
|
|
404
|
+
class Ee{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 Ie=function(t,e,i,r){for(var a,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,p=t.length-1;p>=0;p--)(a=t[p])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};const De={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 Ce=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`
|
|
405
|
+
:host {
|
|
406
|
+
display: contents;
|
|
407
|
+
|
|
408
|
+
--mdc-ripple-color: ${De.color};
|
|
409
|
+
--mdc-ripple-press-opacity: ${De.opacityContentOnSurfacePressed};
|
|
410
|
+
--mdc-ripple-hover-opacity: ${De.opacityContentOnSurfaceHover};
|
|
411
|
+
--mdc-ripple-focus-opacity: ${De.opacityContentOnSurfaceFocused};
|
|
412
|
+
--mdc-ripple-selected-opacity: ${De.opacityContentOnSurfaceSelected};
|
|
413
|
+
--mdc-ripple-activated-opacity: ${De.opacityContentOnSurfaceDragged};
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
mwc-ripple.ft-ripple--secondary {
|
|
417
|
+
--mdc-ripple-color: ${De.secondaryColor};
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
mwc-ripple.ft-ripple--primary {
|
|
421
|
+
--mdc-ripple-color: ${De.primaryColor};
|
|
422
|
+
}
|
|
423
|
+
`}getTemplate(){return e.html`
|
|
424
|
+
<mwc-ripple
|
|
425
|
+
class="${this.primary?"ft-ripple--primary":this.secondary?"ft-ripple--secondary":""}"
|
|
426
|
+
?unbounded=${this.unbounded}
|
|
427
|
+
?activated=${this.activated}
|
|
428
|
+
?selected=${this.selected}
|
|
429
|
+
?disabled=${this.disabled}
|
|
430
|
+
></mwc-ripple>
|
|
431
|
+
`}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 Ee((async()=>this.mwcRipple)),i=(...e)=>i=>{e.forEach((e=>window.addEventListener(e,t.endPress,{once:!0}))),t.startPress(i)},r=i("mouseup"),a=i("touchend","touchcancel"),o=t=>{["Enter"," "].includes(t.key)&&i("keyup")()};e.addEventListener("mouseenter",t.startHover),e.addEventListener("mouseleave",t.endHover),e.addEventListener("mousedown",r),e.addEventListener("touchstart",a),e.addEventListener("keydown",o),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",a),e.removeEventListener("keydown",o),e.removeEventListener("focus",t.startFocus),e.removeEventListener("blur",t.endFocus)},this.rippleHandlers=t}}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};Ce.elementDefinitions={"mwc-ripple":_e},Ie([i.property({type:Boolean})],Ce.prototype,"primary",void 0),Ie([i.property({type:Boolean})],Ce.prototype,"secondary",void 0),Ie([i.property({type:Boolean})],Ce.prototype,"unbounded",void 0),Ie([i.property({type:Boolean})],Ce.prototype,"activated",void 0),Ie([i.property({type:Boolean})],Ce.prototype,"selected",void 0),Ie([i.property({type:Boolean})],Ce.prototype,"disabled",void 0),Ie([i.query("mwc-ripple")],Ce.prototype,"mwcRipple",void 0),Ce=Ie([a.customElement("ft-ripple")],Ce);var Fe=function(t,e,i,r){for(var a,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,p=t.length-1;p>=0;p--)(a=t[p])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};const je={fontSize:a.FtCssVariable.create("--ft-text-area-font-size","SIZE","14px"),labelSize:a.FtCssVariable.create("--ft-text-area-label-size","SIZE","11px"),verticalSpacing:a.FtCssVariable.create("--ft-text-area-vertical-spacing","SIZE","4px"),horizontalSpacing:a.FtCssVariable.create("--ft-text-area-horizontal-spacing","SIZE","16px"),helperColor:a.FtCssVariable.extend("--ft-text-area-helper-color",a.designSystemVariables.colorOnSurfaceMedium),colorPrimary:a.FtCssVariable.external(a.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:a.FtCssVariable.external(a.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:a.FtCssVariable.external(a.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:a.FtCssVariable.external(a.designSystemVariables.borderRadiusS,"Design system")};t.FtTextArea=class extends a.FtLitElement{constructor(){super(...arguments),this.label="",this.value="",this.helper="",this.outlined=!1,this.disabled=!1,this.height=50,this.focused=!1}getStyles(){return[qt,e.css`
|
|
432
|
+
*:focus {
|
|
433
|
+
outline: none;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.ft-text-area {
|
|
437
|
+
display: flex;
|
|
438
|
+
flex-direction: column;
|
|
439
|
+
align-items: stretch;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
ft-input-label {
|
|
443
|
+
${a.setVariable(ue.fontSize,je.fontSize)};
|
|
444
|
+
${a.setVariable(ue.raisedFontSize,je.labelSize)};
|
|
445
|
+
${a.setVariable(ue.verticalSpacing,je.verticalSpacing)};
|
|
446
|
+
${a.setVariable(ue.horizontalSpacing,e.css`calc(${je.horizontalSpacing} - 4px)`)};
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.ft-text-area--main-panel {
|
|
450
|
+
position: relative;
|
|
451
|
+
display: flex;
|
|
452
|
+
height: calc(4 * ${je.verticalSpacing} + ${je.labelSize} + ${je.fontSize} + ${this.height}px);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.ft-text-area--input-panel {
|
|
456
|
+
flex-grow: 1;
|
|
457
|
+
position: relative;
|
|
458
|
+
display: flex;
|
|
459
|
+
align-items: center;
|
|
460
|
+
overflow: hidden;
|
|
461
|
+
gap: 8px;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.ft-text-area--input-panel ft-ripple {
|
|
465
|
+
${a.setVariable(De.opacityContentOnSurfaceHover,"0.08")};
|
|
466
|
+
${a.setVariable(De.opacityContentOnSurfaceDragged,"0.04")};
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.ft-text-area--input {
|
|
470
|
+
display: block;
|
|
471
|
+
flex-grow: 1;
|
|
472
|
+
flex-shrink: 1;
|
|
473
|
+
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
474
|
+
align-self: stretch;
|
|
475
|
+
resize: none;
|
|
476
|
+
|
|
477
|
+
${a.setVariable(vt.fontSize,je.fontSize)};
|
|
478
|
+
${a.setVariable(vt.lineHeight,je.fontSize)};
|
|
479
|
+
color: ${je.colorOnSurface};
|
|
480
|
+
|
|
481
|
+
padding: 0 ${je.horizontalSpacing};
|
|
482
|
+
margin: calc(${je.verticalSpacing} + ${je.labelSize} / 2) 0 ${je.verticalSpacing} 0;
|
|
483
|
+
|
|
484
|
+
border: none;
|
|
485
|
+
background: none;
|
|
486
|
+
|
|
487
|
+
line-height: 1.4;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.ft-text-area--disabled .ft-text-area--input {
|
|
491
|
+
color: ${je.colorOnSurfaceDisabled};
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.ft-text-area:not(.ft-text-area--disabled) .ft-text-area--input-panel {
|
|
495
|
+
cursor: pointer;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.ft-text-area:not(.ft-text-area--disabled):focus-within ft-input-label {
|
|
499
|
+
${a.setVariable(ue.borderColor,je.colorPrimary)};
|
|
500
|
+
${a.setVariable(ue.textColor,je.colorPrimary)};
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.ft-text-area--filled .ft-text-area--input-panel {
|
|
504
|
+
border-radius: ${je.borderRadiusS} ${je.borderRadiusS} 0 0;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.ft-text-area--filled:not(.ft-text-area--no-label) .ft-text-area--input {
|
|
508
|
+
align-self: stretch;
|
|
509
|
+
margin-bottom: ${je.verticalSpacing};
|
|
510
|
+
margin-top: calc(${je.labelSize} + 2 * ${je.verticalSpacing});
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.ft-text-area--outlined .ft-text-area--input-panel {
|
|
514
|
+
border-radius: ${je.borderRadiusS};
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.ft-text-area--helper-text {
|
|
518
|
+
padding: 0 12px 0 ${je.horizontalSpacing};
|
|
519
|
+
color: ${je.helperColor};
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
ft-resizer {
|
|
523
|
+
position: absolute;
|
|
524
|
+
right: 0;
|
|
525
|
+
bottom: 0;
|
|
526
|
+
}
|
|
527
|
+
`]}getTemplate(){const t={"ft-text-area":!0,"ft-text-area--filled":!this.outlined,"ft-text-area--outlined":this.outlined,"ft-text-area--disabled":this.disabled,"ft-text-area--has-value":!!this.value,"ft-text-area--no-label":!this.label};return e.html`
|
|
528
|
+
<div class="${r.classMap(t)}">
|
|
529
|
+
<div class="ft-text-area--main-panel">
|
|
530
|
+
<ft-input-label text="${this.label}"
|
|
531
|
+
?disabled=${this.disabled}
|
|
532
|
+
?outlined=${this.outlined}
|
|
533
|
+
?raised=${this.focused||""!=this.value}
|
|
534
|
+
></ft-input-label>
|
|
535
|
+
<div class="ft-text-area--input-panel"
|
|
536
|
+
aria-label="${this.label}">
|
|
537
|
+
${this.outlined?null:e.html`
|
|
538
|
+
<ft-ripple ?disabled=${this.disabled} activated></ft-ripple>
|
|
539
|
+
`}
|
|
540
|
+
<textarea class="ft-typography--body1 ft-text-area--input"
|
|
541
|
+
?disabled=${this.disabled}
|
|
542
|
+
.value=${this.value}
|
|
543
|
+
@change=${this.updateValueFromInputField}
|
|
544
|
+
@keydown=${this.onKeyDown}
|
|
545
|
+
@keyup=${this.liveUpdateValueFromInputField}
|
|
546
|
+
@focus=${()=>this.focused=!0}
|
|
547
|
+
@focusout=${()=>this.focused=!1}>
|
|
548
|
+
</textarea>
|
|
549
|
+
</div>
|
|
550
|
+
<ft-resizer @resize=${this.onResize}
|
|
551
|
+
initialHeight="${this.height}"
|
|
552
|
+
cursor="ns-resize"></ft-resizer>
|
|
553
|
+
</div>
|
|
554
|
+
${this.helper?e.html`
|
|
555
|
+
<ft-typography class="ft-text-area--helper-text" variant="caption">
|
|
556
|
+
${this.helper}
|
|
557
|
+
</ft-typography>`:void 0}
|
|
558
|
+
</div>
|
|
559
|
+
`}updated(t){super.updated(t),t.has("value")&&this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onKeyDown(t){"Enter"!==t.key&&" "!==t.key||t.stopPropagation()}updateValueFromInputField(){this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.textarea)||void 0===t?void 0:t.value)||""}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}},t.FtTextArea.elementDefinitions={"ft-input-label":he,"ft-resizer":de,"ft-ripple":Ce,"ft-typography":te},Fe([i.property({type:String})],t.FtTextArea.prototype,"label",void 0),Fe([i.property({reflect:!0})],t.FtTextArea.prototype,"value",void 0),Fe([i.property({type:String})],t.FtTextArea.prototype,"helper",void 0),Fe([i.property({type:Boolean})],t.FtTextArea.prototype,"outlined",void 0),Fe([i.property({type:Boolean})],t.FtTextArea.prototype,"disabled",void 0),Fe([i.property({type:Number,reflect:!0})],t.FtTextArea.prototype,"height",void 0),Fe([i.query("textarea")],t.FtTextArea.prototype,"textarea",void 0),Fe([i.state()],t.FtTextArea.prototype,"focused",void 0),t.FtTextArea=Fe([a.customElement("ft-text-area")],t.FtTextArea),t.FtTextAreaCssVariables=je,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.wcUtils,ftGlobals.litStyleMap);
|