@fluid-topics/ft-text-area 0.3.11 → 0.3.13
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.css.d.ts +14 -0
- package/build/ft-text-area.css.js +121 -0
- package/build/ft-text-area.d.ts +1 -20
- package/build/ft-text-area.js +7 -119
- package/build/ft-text-area.light.js +445 -445
- package/build/ft-text-area.min.js +448 -448
- package/build/ft-text-area.properties.d.ts +9 -0
- package/build/ft-text-area.properties.js +2 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/package.json +5 -5
|
@@ -10,151 +10,169 @@ var n;const l=globalThis.trustedTypes,a=l?l.createPolicy("lit-html",{createHTML:
|
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const F=Symbol.for(""),R=t=>{if((null==t?void 0:t.r)===F)return null==t?void 0:t._$litStatic$},W=t=>({_$litStatic$:t,r:F}),H=new Map,K=(t=>(e,...i)=>{const o=i.length;let s,r;const n=[],l=[];let a,p=0,f=!1;for(;p<o;){for(a=e[p];p<o&&void 0!==(r=i[p],s=R(r));)a+=s+e[++p],f=!0;l.push(r),n.push(a),p++}if(p===o&&n.push(e[o]),f){const t=n.join("$$lit$$");void 0===(e=H.get(t))&&(n.raw=n,H.set(t,e=n)),i=l}return t(e,...i)})(z);var G
|
|
13
|
+
const F=Symbol.for(""),R=t=>{if((null==t?void 0:t.r)===F)return null==t?void 0:t._$litStatic$},W=t=>({_$litStatic$:t,r:F}),H=new Map,K=(t=>(e,...i)=>{const o=i.length;let s,r;const n=[],l=[];let a,p=0,f=!1;for(;p<o;){for(a=e[p];p<o&&void 0!==(r=i[p],s=R(r));)a+=s+e[++p],f=!0;l.push(r),n.push(a),p++}if(p===o&&n.push(e[o]),f){const t=n.join("$$lit$$");void 0===(e=H.get(t))&&(n.raw=n,H.set(t,e=n)),i=l}return t(e,...i)})(z);var G;!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.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),q=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),L={fontFamily:q,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},V=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",P),X=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",L.fontSize,"20px"),Y=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",L.fontWeight,"normal"),J=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",L.letterSpacing,"0.15px"),Q=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",L.lineHeight,"1.2"),tt=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",L.textTransform,"inherit"),et=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",P),it=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",L.fontSize,"14px"),ot=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",L.fontWeight,"normal"),st=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",L.letterSpacing,"0.105px"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",L.lineHeight,"1.7"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",L.textTransform,"inherit"),lt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",q),at=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",L.fontSize,"16px"),pt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",L.fontWeight,"600"),ft=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",L.letterSpacing,"0.144px"),ht=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",L.lineHeight,"1.5"),dt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",L.textTransform,"inherit"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",q),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",L.fontSize,"14px"),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",L.fontWeight,"normal"),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",L.letterSpacing,"0.098px"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",L.lineHeight,"1.7"),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",L.textTransform,"inherit"),mt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",L.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",L.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",L.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",L.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",L.textTransform,"inherit")},vt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",q),$t=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",L.fontSize,"14px"),wt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",L.fontWeight,"normal"),zt=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",L.letterSpacing,"0.252px"),kt=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",L.lineHeight,"1.4"),St=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",L.textTransform,"inherit"),Nt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",L.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",L.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",L.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",L.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",L.textTransform,"inherit")},Et=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",q),Ot=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",L.fontSize,"10px"),jt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",L.fontWeight,"normal"),It=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",L.letterSpacing,"0.33px"),Ct=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",L.lineHeight,"1.6"),Dt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",L.textTransform,"inherit"),At=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",q),_t=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",L.fontSize,"10px"),Bt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",L.fontWeight,"normal"),Mt=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",L.letterSpacing,"1.5px"),Tt=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",L.lineHeight,"1.6"),Ut=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",L.textTransform,"uppercase"),Zt=e.FtCssVariableFactory.extend("--ft-typography-button-font-family",q),Ft=e.FtCssVariableFactory.extend("--ft-typography-button-font-size",L.fontSize,"14px"),Rt=e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",L.fontWeight,"600"),Wt=e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",L.letterSpacing,"1.246px"),Ht=e.FtCssVariableFactory.extend("--ft-typography-button-line-height",L.lineHeight,"1.15"),Kt=e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",L.textTransform,"uppercase"),Gt=i.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
|
-
font-family: ${
|
|
16
|
-
font-size: ${
|
|
17
|
-
font-weight: ${
|
|
18
|
-
letter-spacing: ${
|
|
19
|
-
line-height: ${
|
|
20
|
-
text-transform: ${
|
|
15
|
+
font-family: ${V};
|
|
16
|
+
font-size: ${X};
|
|
17
|
+
font-weight: ${Y};
|
|
18
|
+
letter-spacing: ${J};
|
|
19
|
+
line-height: ${Q};
|
|
20
|
+
text-transform: ${tt};
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,Pt=i.css`
|
|
23
23
|
.ft-typography--title-dense {
|
|
24
|
-
font-family: ${
|
|
25
|
-
font-size: ${
|
|
26
|
-
font-weight: ${
|
|
27
|
-
letter-spacing: ${
|
|
28
|
-
line-height: ${
|
|
29
|
-
text-transform: ${
|
|
24
|
+
font-family: ${et};
|
|
25
|
+
font-size: ${it};
|
|
26
|
+
font-weight: ${ot};
|
|
27
|
+
letter-spacing: ${st};
|
|
28
|
+
line-height: ${rt};
|
|
29
|
+
text-transform: ${nt};
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
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: ${lt};
|
|
34
|
+
font-size: ${at};
|
|
35
|
+
font-weight: ${pt};
|
|
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: ${
|
|
45
|
-
letter-spacing: ${
|
|
46
|
-
line-height: ${
|
|
47
|
-
text-transform: ${
|
|
42
|
+
font-family: ${ct};
|
|
43
|
+
font-size: ${ut};
|
|
44
|
+
font-weight: ${xt};
|
|
45
|
+
letter-spacing: ${gt};
|
|
46
|
+
line-height: ${yt};
|
|
47
|
+
text-transform: ${bt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,Vt=i.css`
|
|
51
51
|
.ft-typography--body1 {
|
|
52
|
-
font-family: ${
|
|
53
|
-
font-size: ${
|
|
54
|
-
font-weight: ${
|
|
55
|
-
letter-spacing: ${
|
|
56
|
-
line-height: ${
|
|
57
|
-
text-transform: ${
|
|
52
|
+
font-family: ${mt.fontFamily};
|
|
53
|
+
font-size: ${mt.fontSize};
|
|
54
|
+
font-weight: ${mt.fontWeight};
|
|
55
|
+
letter-spacing: ${mt.letterSpacing};
|
|
56
|
+
line-height: ${mt.lineHeight};
|
|
57
|
+
text-transform: ${mt.textTransform};
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,Xt=i.css`
|
|
60
60
|
.ft-typography--body2 {
|
|
61
|
-
font-family: ${
|
|
62
|
-
font-size: ${
|
|
63
|
-
font-weight: ${
|
|
64
|
-
letter-spacing: ${
|
|
65
|
-
line-height: ${
|
|
66
|
-
text-transform: ${
|
|
61
|
+
font-family: ${vt};
|
|
62
|
+
font-size: ${$t};
|
|
63
|
+
font-weight: ${wt};
|
|
64
|
+
letter-spacing: ${zt};
|
|
65
|
+
line-height: ${kt};
|
|
66
|
+
text-transform: ${St};
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,Yt=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: ${Nt.fontFamily};
|
|
71
|
+
font-size: ${Nt.fontSize};
|
|
72
|
+
font-weight: ${Nt.fontWeight};
|
|
73
|
+
letter-spacing: ${Nt.letterSpacing};
|
|
74
|
+
line-height: ${Nt.lineHeight};
|
|
75
|
+
text-transform: ${Nt.textTransform};
|
|
76
76
|
}
|
|
77
|
-
`,
|
|
77
|
+
`,Jt=i.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
|
-
font-family: ${
|
|
80
|
-
font-size: ${
|
|
81
|
-
font-weight: ${
|
|
82
|
-
letter-spacing: ${
|
|
83
|
-
line-height: ${
|
|
84
|
-
text-transform: ${
|
|
79
|
+
font-family: ${Et};
|
|
80
|
+
font-size: ${Ot};
|
|
81
|
+
font-weight: ${jt};
|
|
82
|
+
letter-spacing: ${It};
|
|
83
|
+
line-height: ${Ct};
|
|
84
|
+
text-transform: ${Dt};
|
|
85
85
|
}
|
|
86
|
-
`,
|
|
86
|
+
`,Qt=i.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
|
-
font-family: ${
|
|
89
|
-
font-size: ${
|
|
90
|
-
font-weight: ${
|
|
91
|
-
letter-spacing: ${
|
|
92
|
-
line-height: ${
|
|
93
|
-
text-transform: ${
|
|
88
|
+
font-family: ${At};
|
|
89
|
+
font-size: ${_t};
|
|
90
|
+
font-weight: ${Bt};
|
|
91
|
+
letter-spacing: ${Mt};
|
|
92
|
+
line-height: ${Tt};
|
|
93
|
+
text-transform: ${Ut};
|
|
94
94
|
}
|
|
95
|
-
`,
|
|
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: ${
|
|
103
|
-
}
|
|
104
|
-
|
|
97
|
+
font-family: ${Zt};
|
|
98
|
+
font-size: ${Ft};
|
|
99
|
+
font-weight: ${Rt};
|
|
100
|
+
letter-spacing: ${Wt};
|
|
101
|
+
line-height: ${Ht};
|
|
102
|
+
text-transform: ${Kt};
|
|
103
|
+
}
|
|
104
|
+
`,ee=i.css`
|
|
105
|
+
.ft-typography {
|
|
106
|
+
vertical-align: inherit;
|
|
107
|
+
}
|
|
108
|
+
`;var ie,oe,se=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class re extends e.FtLitElement{constructor(){super(...arguments),this.variant=G.body1}render(){return this.element?K`
|
|
105
109
|
<${W(this.element)}
|
|
106
110
|
class="ft-typography ft-typography--${this.variant}">
|
|
107
111
|
<slot></slot>
|
|
108
112
|
</${W(this.element)}>
|
|
109
113
|
`:K`
|
|
110
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
111
|
-
`}}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
`}}re.styles=[Gt,Pt,qt,Lt,Vt,Xt,Yt,Jt,Qt,te,ee],se([o.property()],re.prototype,"element",void 0),se([o.property()],re.prototype,"variant",void 0),e.customElement("ft-typography")(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=""}(ie||(ie={})),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=""}(oe||(oe={})),new Map([...["abw"].map((t=>[t,oe.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,oe.AUDIO])),...["avi"].map((t=>[t,oe.AVI])),...["chm","xhs"].map((t=>[t,oe.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,oe.CODE])),...["csv"].map((t=>[t,oe.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,oe.DITA])),...["epub"].map((t=>[t,oe.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,oe.EXCEL])),...["flac"].map((t=>[t,oe.FLAC])),...["gif"].map((t=>[t,oe.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,oe.GZIP])),...["html","htm","xhtml"].map((t=>[t,oe.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,oe.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,oe.JPEG])),...["json"].map((t=>[t,oe.JSON])),...["m4a","m4p"].map((t=>[t,oe.M4A])),...["mov","qt"].map((t=>[t,oe.MOV])),...["mp3"].map((t=>[t,oe.MP3])),...["mp4","m4v"].map((t=>[t,oe.MP4])),...["ogg","oga"].map((t=>[t,oe.OGG])),...["pdf","ps"].map((t=>[t,oe.PDF])),...["png"].map((t=>[t,oe.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,oe.POWERPOINT])),...["rar"].map((t=>[t,oe.RAR])),...["stp"].map((t=>[t,oe.STP])),...["txt","rtf","md","mdown"].map((t=>[t,oe.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,oe.VIDEO])),...["wav"].map((t=>[t,oe.WAV])),...["wma"].map((t=>[t,oe.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,oe.WORD])),...["xml","xsl","rdf"].map((t=>[t,oe.XML])),...["yaml","yml","x-yaml"].map((t=>[t,oe.YAML])),...["zip"].map((t=>[t,oe.ZIP]))]);const ne=e.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),le=e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),ae=e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),pe=e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),fe=e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset"),he=i.css`
|
|
116
|
+
:host {
|
|
117
|
+
display: inline-block;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
:host, i.ft-icon {
|
|
121
|
+
width: ${ne};
|
|
122
|
+
height: ${ne};
|
|
123
|
+
text-align: center;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
i.ft-icon {
|
|
127
|
+
font-size: ${ne};
|
|
128
|
+
line-height: 1;
|
|
129
|
+
font-weight: normal;
|
|
130
|
+
text-transform: none;
|
|
131
|
+
font-style: normal;
|
|
132
|
+
font-variant: normal;
|
|
133
|
+
speak: none;
|
|
134
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
135
|
+
text-rendering: auto;
|
|
136
|
+
-webkit-font-smoothing: antialiased;
|
|
137
|
+
-moz-osx-font-smoothing: grayscale;
|
|
138
|
+
vertical-align: ${fe};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.ft-icon--fluid-topics {
|
|
142
|
+
font-family: ${le}, ft-icons, fticons, sans-serif;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.ft-icon--file-format {
|
|
146
|
+
font-family: ${ae}, ft-mime, sans-serif;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.ft-icon--material {
|
|
150
|
+
font-family: ${pe}, "Material Icons", sans-serif;
|
|
151
|
+
}
|
|
152
|
+
`;var de;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(de||(de={}));var ce=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ue extends e.FtLitElement{constructor(){super(...arguments),this.variant=de.fluid_topics,this.resolvedIcon=i.nothing}render(){const t="material"!==this.variant||this.value;return i.html`
|
|
116
153
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
117
154
|
${r.unsafeHTML(this.resolvedIcon)}
|
|
118
|
-
<slot ?hidden=${
|
|
155
|
+
<slot ?hidden=${t}></slot>
|
|
119
156
|
</i>
|
|
120
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
140
|
-
text-rendering: auto;
|
|
141
|
-
-webkit-font-smoothing: antialiased;
|
|
142
|
-
-moz-osx-font-smoothing: grayscale;
|
|
143
|
-
vertical-align: ${he};
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.ft-icon--fluid-topics {
|
|
147
|
-
font-family: ${ae}, ft-icons, fticons, sans-serif;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.ft-icon--file-format {
|
|
151
|
-
font-family: ${pe}, ft-mime, sans-serif;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.ft-icon--material {
|
|
155
|
-
font-family: ${fe}, "Material Icons", sans-serif;
|
|
156
|
-
}
|
|
157
|
-
`,ne([o.property()],de.prototype,"variant",void 0),ne([o.property()],de.prototype,"value",void 0),ne([o.state()],de.prototype,"resolvedIcon",void 0),ne([o.query("slot")],de.prototype,"slottedContent",void 0),e.customElement("ft-icon")(de);var ce=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ue extends CustomEvent{constructor(t,e){super("resize",{detail:{width:t,height:e}})}}const xe=e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),ge=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system");class ye extends e.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)}}render(){return i.html`
|
|
157
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case de.file_format:this.resolvedIcon=null!==(t=oe[o.toUpperCase()])&&void 0!==t?t:o;break;case de.fluid_topics:this.resolvedIcon=null!==(e=ie[o.toUpperCase()])&&void 0!==e?e:o;break;default:this.resolvedIcon=this.value||i.nothing}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}ue.elementDefinitions={},ue.styles=he,ce([o.property()],ue.prototype,"variant",void 0),ce([o.property()],ue.prototype,"value",void 0),ce([o.state()],ue.prototype,"resolvedIcon",void 0),ce([o.query("slot")],ue.prototype,"slottedContent",void 0),e.customElement("ft-icon")(ue);const xe=e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),ge=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),ye=i.css`
|
|
158
|
+
:host {
|
|
159
|
+
display: block;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.ft-resizer {
|
|
163
|
+
display: flex;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
ft-icon {
|
|
167
|
+
transform: rotate(-45deg);
|
|
168
|
+
color: ${xe};
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.ft-resizer--dragging ft-icon,
|
|
172
|
+
.ft-resizer:hover ft-icon {
|
|
173
|
+
color: ${ge};
|
|
174
|
+
}
|
|
175
|
+
`;var be=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class me extends CustomEvent{constructor(t,e){super("resize",{detail:{width:t,height:e}})}}class ve extends e.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)}}render(){return i.html`
|
|
158
176
|
<style>
|
|
159
177
|
.ft-resizer {
|
|
160
178
|
cursor: ${i.unsafeCSS(this.cursor)}
|
|
@@ -165,25 +183,123 @@ const F=Symbol.for(""),R=t=>{if((null==t?void 0:t.r)===F)return null==t?void 0:t
|
|
|
165
183
|
@touchstart=${this.initDragFromTouch}>
|
|
166
184
|
<ft-icon variant="material">${this.icon}</ft-icon>
|
|
167
185
|
</div>
|
|
168
|
-
`}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,o=this.fixedHeight+e-this.startY;this.dispatchEvent(new
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
186
|
+
`}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,o=this.fixedHeight+e-this.startY;this.dispatchEvent(new me(i,o))}}ve.elementDefinitions={"ft-icon":ue},ve.styles=[e.noTextSelect,ye],be([o.property({type:Number})],ve.prototype,"initialWidth",void 0),be([o.property({type:Number})],ve.prototype,"initialHeight",void 0),be([o.property()],ve.prototype,"icon",void 0),be([o.property()],ve.prototype,"cursor",void 0),be([o.state()],ve.prototype,"dragging",void 0),e.customElement("ft-resizer")(ve);const $e={fontSize:e.FtCssVariableFactory.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:e.FtCssVariableFactory.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:e.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:e.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:e.FtCssVariableFactory.extend("--ft-input-label-border-color",e.designSystemVariables.colorOutline),textColor:e.FtCssVariableFactory.extend("--ft-input-label-text-color",e.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:e.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color",e.designSystemVariables.colorOnSurfaceDisabled),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system")},we=i.css`
|
|
187
|
+
.ft-input-label {
|
|
188
|
+
position: absolute;
|
|
189
|
+
inset: 0;
|
|
190
|
+
display: flex;
|
|
191
|
+
background-color: ${$e.colorSurface};
|
|
192
|
+
border-radius: ${$e.borderRadiusS} ${$e.borderRadiusS} 0 0;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.ft-input-label--outlined {
|
|
196
|
+
border-radius: ${$e.borderRadiusS};
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.ft-input-label {
|
|
200
|
+
border-color: ${$e.borderColor};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.ft-input-label.ft-input-label--in-error {
|
|
204
|
+
border-color: ${$e.colorError}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.ft-input-label:before,
|
|
208
|
+
.ft-input-label:after {
|
|
209
|
+
content: "";
|
|
210
|
+
display: flex;
|
|
211
|
+
border-bottom-width: 1px;
|
|
212
|
+
border-bottom-style: solid;
|
|
213
|
+
border-color: inherit;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.ft-input-label:before {
|
|
217
|
+
width: ${$e.horizontalSpacing};
|
|
218
|
+
flex-shrink: 0;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.ft-input-label:after {
|
|
222
|
+
flex-grow: 1;
|
|
223
|
+
flex-shrink: 1;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.ft-input-label--text {
|
|
227
|
+
display: flex;
|
|
228
|
+
flex-shrink: 1;
|
|
229
|
+
position: relative;
|
|
230
|
+
border-bottom-width: 1px;
|
|
231
|
+
border-bottom-style: solid;
|
|
232
|
+
border-color: inherit;
|
|
233
|
+
color: ${$e.textColor};
|
|
234
|
+
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
235
|
+
${e.setVariable(Nt.fontSize,$e.fontSize)};
|
|
236
|
+
${e.setVariable(Nt.lineHeight,$e.fontSize)};
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.ft-input-label--in-error .ft-input-label--text {
|
|
240
|
+
color: ${$e.colorError}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.ft-input-label--disabled .ft-input-label--text {
|
|
244
|
+
color: ${$e.disabledTextColor};
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.ft-input-label--hidden-text {
|
|
248
|
+
padding: 0 4px;
|
|
249
|
+
opacity: 0;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.ft-input-label--floating-text {
|
|
253
|
+
position: absolute;
|
|
254
|
+
top: calc(50% - var(--ft-typography-caption-line-height) / 2);
|
|
255
|
+
transition: top 250ms;
|
|
256
|
+
overflow: hidden;
|
|
257
|
+
white-space: nowrap;
|
|
258
|
+
text-overflow: ellipsis;
|
|
259
|
+
padding: ${$e.verticalSpacing} 4px;
|
|
260
|
+
margin: calc(${$e.verticalSpacing} * -1) 0;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.ft-input-label--raised .ft-input-label--text {
|
|
264
|
+
${e.setVariable(Nt.fontSize,$e.raisedFontSize)};
|
|
265
|
+
${e.setVariable(Nt.lineHeight,$e.raisedFontSize)};
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.ft-input-label--raised .ft-input-label--floating-text {
|
|
269
|
+
top: ${$e.verticalSpacing};
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.ft-input-label--outlined .ft-input-label--text,
|
|
273
|
+
.ft-input-label--outlined:before,
|
|
274
|
+
.ft-input-label--outlined:after {
|
|
275
|
+
border-top-width: 1px;
|
|
276
|
+
border-top-style: solid;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.ft-input-label--outlined:before {
|
|
280
|
+
border-left-width: 1px;
|
|
281
|
+
border-left-style: solid;
|
|
282
|
+
border-radius: ${$e.borderRadiusS} 0 0 ${$e.borderRadiusS};
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.ft-input-label--outlined:after {
|
|
286
|
+
border-right-width: 1px;
|
|
287
|
+
border-right-style: solid;
|
|
288
|
+
border-radius: 0 ${$e.borderRadiusS} ${$e.borderRadiusS} 0;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
292
|
+
padding: 2px 4px;
|
|
293
|
+
z-index: ${$e.raisedZIndex};
|
|
294
|
+
background-color: ${$e.colorSurface};
|
|
295
|
+
border-radius: ${$e.borderRadiusS};
|
|
296
|
+
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
300
|
+
border-top: none;
|
|
301
|
+
}
|
|
302
|
+
`;var ze=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ke extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return i.html`
|
|
187
303
|
<div class="${s.classMap(t)}">
|
|
188
304
|
${this.text?i.html`
|
|
189
305
|
<div class="ft-input-label--text ft-typography--caption">
|
|
@@ -192,123 +308,96 @@ const F=Symbol.for(""),R=t=>{if((null==t?void 0:t.r)===F)return null==t?void 0:t
|
|
|
192
308
|
</div>
|
|
193
309
|
`:null}
|
|
194
310
|
</div>
|
|
195
|
-
`}}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
border-top-style: solid;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.ft-input-label--outlined:before {
|
|
289
|
-
border-left-width: 1px;
|
|
290
|
-
border-left-style: solid;
|
|
291
|
-
border-radius: ${me.borderRadiusS} 0 0 ${me.borderRadiusS};
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
.ft-input-label--outlined:after {
|
|
295
|
-
border-right-width: 1px;
|
|
296
|
-
border-right-style: solid;
|
|
297
|
-
border-radius: 0 ${me.borderRadiusS} ${me.borderRadiusS} 0;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
301
|
-
padding: 2px 4px;
|
|
302
|
-
z-index: ${me.raisedZIndex};
|
|
303
|
-
background-color: ${me.colorSurface};
|
|
304
|
-
border-radius: ${me.borderRadiusS};
|
|
305
|
-
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
309
|
-
border-top: none;
|
|
310
|
-
}
|
|
311
|
-
`],be([o.property({type:String})],ve.prototype,"text",void 0),be([o.property({type:Boolean})],ve.prototype,"raised",void 0),be([o.property({type:Boolean})],ve.prototype,"outlined",void 0),be([o.property({type:Boolean})],ve.prototype,"disabled",void 0),be([o.property({type:Boolean})],ve.prototype,"error",void 0),e.customElement("ft-input-label")(ve);var $e=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};const we=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),ze={color:we,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",we),opacityContentOnSurfacePressed:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},ke=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),Se=ke,Ne=e.FtCssVariableFactory.extend("--ft-ripple-background-color",ke),Ee=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),Oe=Ee,je=e.FtCssVariableFactory.extend("--ft-ripple-background-color",Ee);class Ie extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),r=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-r.x:r.width/2),this.originY=Math.round(null!=s?s-r.y:r.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`
|
|
311
|
+
`}}ke.elementDefinitions={},ke.styles=[Yt,we],ze([o.property({type:String})],ke.prototype,"text",void 0),ze([o.property({type:Boolean})],ke.prototype,"raised",void 0),ze([o.property({type:Boolean})],ke.prototype,"outlined",void 0),ze([o.property({type:Boolean})],ke.prototype,"disabled",void 0),ze([o.property({type:Boolean})],ke.prototype,"error",void 0),e.customElement("ft-input-label")(ke);const Se=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),Ne={color:Se,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",Se),opacityContentOnSurfacePressed:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},Ee=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),Oe=Ee,je=e.FtCssVariableFactory.extend("--ft-ripple-background-color",Ee),Ie=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),Ce=Ie,De=e.FtCssVariableFactory.extend("--ft-ripple-background-color",Ie),Ae=i.css`
|
|
312
|
+
:host {
|
|
313
|
+
display: contents;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.ft-ripple {
|
|
317
|
+
position: absolute;
|
|
318
|
+
inset: 0;
|
|
319
|
+
pointer-events: none;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
323
|
+
overflow: hidden;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.ft-ripple .ft-ripple--background,
|
|
327
|
+
.ft-ripple .ft-ripple--effect {
|
|
328
|
+
position: absolute;
|
|
329
|
+
opacity: 0;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.ft-ripple .ft-ripple--background {
|
|
333
|
+
background-color: ${Ne.backgroundColor};
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.ft-ripple .ft-ripple--effect {
|
|
337
|
+
background-color: ${Ne.color};
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
341
|
+
background-color: ${De};
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
345
|
+
background-color: ${Ce};
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
349
|
+
background-color: ${je};
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
353
|
+
background-color: ${Oe};
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.ft-ripple .ft-ripple--background {
|
|
357
|
+
top: 0;
|
|
358
|
+
left: 0;
|
|
359
|
+
height: 100%;
|
|
360
|
+
width: 100%;
|
|
361
|
+
transition: opacity 75ms linear;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.ft-ripple .ft-ripple--effect,
|
|
365
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
366
|
+
border-radius: 50%;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.ft-ripple .ft-ripple--effect {
|
|
370
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
371
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
375
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
376
|
+
left: 50%;
|
|
377
|
+
top: 50%;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
381
|
+
transform: translate(-50%, -50%);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
385
|
+
opacity: ${Ne.opacityContentOnSurfaceHover};
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
389
|
+
opacity: ${Ne.opacityContentOnSurfaceSelected};
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
393
|
+
opacity: ${Ne.opacityContentOnSurfaceFocused};
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
397
|
+
opacity: ${Ne.opacityContentOnSurfacePressed};
|
|
398
|
+
transform: translate(-50%, -50%) scale(1);
|
|
399
|
+
}
|
|
400
|
+
`;var _e=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Be extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),r=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-r.x:r.width/2),this.originY=Math.round(null!=s?s-r.y:r.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`
|
|
312
401
|
<style>
|
|
313
402
|
.ft-ripple .ft-ripple--effect,
|
|
314
403
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -325,99 +414,111 @@ const F=Symbol.for(""),R=t=>{if((null==t?void 0:t.r)===F)return null==t?void 0:t
|
|
|
325
414
|
<div class="ft-ripple--background"></div>
|
|
326
415
|
<div class="ft-ripple--effect"></div>
|
|
327
416
|
</div>
|
|
328
|
-
`}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){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),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()}}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
.
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
.
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
.
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
}
|
|
417
|
-
|
|
417
|
+
`}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){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),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()}}Be.elementDefinitions={},Be.styles=Ae,_e([o.property({type:Boolean})],Be.prototype,"primary",void 0),_e([o.property({type:Boolean})],Be.prototype,"secondary",void 0),_e([o.property({type:Boolean})],Be.prototype,"unbounded",void 0),_e([o.property({type:Boolean})],Be.prototype,"activated",void 0),_e([o.property({type:Boolean})],Be.prototype,"selected",void 0),_e([o.property({type:Boolean})],Be.prototype,"disabled",void 0),_e([o.state()],Be.prototype,"hovered",void 0),_e([o.state()],Be.prototype,"focused",void 0),_e([o.state()],Be.prototype,"pressed",void 0),_e([o.state()],Be.prototype,"rippling",void 0),_e([o.state()],Be.prototype,"rippleSize",void 0),_e([o.state()],Be.prototype,"originX",void 0),_e([o.state()],Be.prototype,"originY",void 0),_e([o.query(".ft-ripple")],Be.prototype,"ripple",void 0),_e([o.query(".ft-ripple--effect")],Be.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(Be);const Me={fontSize:e.FtCssVariableFactory.create("--ft-text-area-font-size","SIZE","14px"),labelSize:e.FtCssVariableFactory.create("--ft-text-area-label-size","SIZE","11px"),verticalSpacing:e.FtCssVariableFactory.create("--ft-text-area-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-text-area-horizontal-spacing","SIZE","16px"),helperColor:e.FtCssVariableFactory.extend("--ft-text-area-helper-color",e.designSystemVariables.colorOnSurfaceMedium),colorPrimary:e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system")},Te=i.css`
|
|
418
|
+
*:focus {
|
|
419
|
+
outline: none;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.ft-text-area {
|
|
423
|
+
display: flex;
|
|
424
|
+
flex-direction: column;
|
|
425
|
+
align-items: stretch;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
ft-input-label {
|
|
429
|
+
${e.setVariable($e.fontSize,Me.fontSize)};
|
|
430
|
+
${e.setVariable($e.raisedFontSize,Me.labelSize)};
|
|
431
|
+
${e.setVariable($e.verticalSpacing,Me.verticalSpacing)};
|
|
432
|
+
${e.setVariable($e.horizontalSpacing,i.css`calc(${Me.horizontalSpacing} - 4px)`)};
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.ft-text-area--main-panel {
|
|
436
|
+
position: relative;
|
|
437
|
+
display: flex;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.ft-text-area--input-panel {
|
|
441
|
+
flex-grow: 1;
|
|
442
|
+
position: relative;
|
|
443
|
+
display: flex;
|
|
444
|
+
align-items: center;
|
|
445
|
+
overflow: hidden;
|
|
446
|
+
gap: 8px;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.ft-text-area--input-panel ft-ripple {
|
|
450
|
+
${e.setVariable(Ne.opacityContentOnSurfaceHover,"0.08")};
|
|
451
|
+
${e.setVariable(Ne.opacityContentOnSurfacePressed,"0.04")};
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.ft-text-area--input {
|
|
455
|
+
display: block;
|
|
456
|
+
position: relative;
|
|
457
|
+
flex-grow: 1;
|
|
458
|
+
flex-shrink: 1;
|
|
459
|
+
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
460
|
+
align-self: stretch;
|
|
461
|
+
resize: none;
|
|
462
|
+
|
|
463
|
+
${e.setVariable(mt.fontSize,Me.fontSize)};
|
|
464
|
+
${e.setVariable(mt.lineHeight,Me.fontSize)};
|
|
465
|
+
color: ${Me.colorOnSurface};
|
|
466
|
+
|
|
467
|
+
padding: 0 ${Me.horizontalSpacing};
|
|
468
|
+
margin: calc(${Me.verticalSpacing} + ${Me.labelSize} / 2) 0 ${Me.verticalSpacing} 0;
|
|
469
|
+
|
|
470
|
+
border: none;
|
|
471
|
+
background: none;
|
|
472
|
+
|
|
473
|
+
line-height: 1.4;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.ft-text-area--disabled .ft-text-area--input {
|
|
477
|
+
color: ${Me.colorOnSurfaceDisabled};
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.ft-text-area:not(.ft-text-area--disabled) .ft-text-area--input-panel {
|
|
481
|
+
cursor: pointer;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.ft-text-area:not(.ft-text-area--disabled):focus-within ft-input-label {
|
|
485
|
+
${e.setVariable($e.borderColor,Me.colorPrimary)};
|
|
486
|
+
${e.setVariable($e.textColor,Me.colorPrimary)};
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.ft-text-area--filled .ft-text-area--input-panel {
|
|
490
|
+
border-radius: ${Me.borderRadiusS} ${Me.borderRadiusS} 0 0;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.ft-text-area--filled:not(.ft-text-area--no-label) .ft-text-area--input {
|
|
494
|
+
align-self: stretch;
|
|
495
|
+
margin-bottom: ${Me.verticalSpacing};
|
|
496
|
+
margin-top: calc(${Me.labelSize} + 2 * ${Me.verticalSpacing});
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.ft-text-area--outlined .ft-text-area--input-panel {
|
|
500
|
+
border-radius: ${Me.borderRadiusS};
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.ft-text-area--helper-text {
|
|
504
|
+
padding: 0 12px 0 ${Me.horizontalSpacing};
|
|
505
|
+
color: ${Me.helperColor};
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.ft-text-area--in-error .ft-text-area--input,
|
|
509
|
+
.ft-text-area--in-error .ft-text-area--helper-text {
|
|
510
|
+
color: ${Me.colorError};
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
ft-resizer {
|
|
514
|
+
position: absolute;
|
|
515
|
+
right: 0;
|
|
516
|
+
bottom: 0;
|
|
517
|
+
}
|
|
518
|
+
`;var Ue=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Ze extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.height=50,this.focused=!1}render(){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,"ft-text-area--in-error":this.error};return i.html`
|
|
418
519
|
<style>
|
|
419
520
|
.ft-text-area--main-panel {
|
|
420
|
-
height: calc(4 * ${
|
|
521
|
+
height: calc(4 * ${Me.verticalSpacing} + ${Me.labelSize} + ${Me.fontSize} + ${this.height}px);
|
|
421
522
|
}
|
|
422
523
|
</style>
|
|
423
524
|
<div class="${s.classMap(t)}">
|
|
@@ -452,105 +553,4 @@ const F=Symbol.for(""),R=t=>{if((null==t?void 0:t.r)===F)return null==t?void 0:t
|
|
|
452
553
|
${this.helper}
|
|
453
554
|
</ft-typography>`:void 0}
|
|
454
555
|
</div>
|
|
455
|
-
`}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)}}
|
|
456
|
-
*:focus {
|
|
457
|
-
outline: none;
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
.ft-text-area {
|
|
461
|
-
display: flex;
|
|
462
|
-
flex-direction: column;
|
|
463
|
-
align-items: stretch;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
ft-input-label {
|
|
467
|
-
${e.setVariable(me.fontSize,De.fontSize)};
|
|
468
|
-
${e.setVariable(me.raisedFontSize,De.labelSize)};
|
|
469
|
-
${e.setVariable(me.verticalSpacing,De.verticalSpacing)};
|
|
470
|
-
${e.setVariable(me.horizontalSpacing,i.css`calc(${De.horizontalSpacing} - 4px)`)};
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
.ft-text-area--main-panel {
|
|
474
|
-
position: relative;
|
|
475
|
-
display: flex;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
.ft-text-area--input-panel {
|
|
479
|
-
flex-grow: 1;
|
|
480
|
-
position: relative;
|
|
481
|
-
display: flex;
|
|
482
|
-
align-items: center;
|
|
483
|
-
overflow: hidden;
|
|
484
|
-
gap: 8px;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
.ft-text-area--input-panel ft-ripple {
|
|
488
|
-
${e.setVariable(ze.opacityContentOnSurfaceHover,"0.08")};
|
|
489
|
-
${e.setVariable(ze.opacityContentOnSurfacePressed,"0.04")};
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
.ft-text-area--input {
|
|
493
|
-
display: block;
|
|
494
|
-
position: relative;
|
|
495
|
-
flex-grow: 1;
|
|
496
|
-
flex-shrink: 1;
|
|
497
|
-
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
498
|
-
align-self: stretch;
|
|
499
|
-
resize: none;
|
|
500
|
-
|
|
501
|
-
${e.setVariable(vt.fontSize,De.fontSize)};
|
|
502
|
-
${e.setVariable(vt.lineHeight,De.fontSize)};
|
|
503
|
-
color: ${De.colorOnSurface};
|
|
504
|
-
|
|
505
|
-
padding: 0 ${De.horizontalSpacing};
|
|
506
|
-
margin: calc(${De.verticalSpacing} + ${De.labelSize} / 2) 0 ${De.verticalSpacing} 0;
|
|
507
|
-
|
|
508
|
-
border: none;
|
|
509
|
-
background: none;
|
|
510
|
-
|
|
511
|
-
line-height: 1.4;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
.ft-text-area--disabled .ft-text-area--input {
|
|
515
|
-
color: ${De.colorOnSurfaceDisabled};
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
.ft-text-area:not(.ft-text-area--disabled) .ft-text-area--input-panel {
|
|
519
|
-
cursor: pointer;
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
.ft-text-area:not(.ft-text-area--disabled):focus-within ft-input-label {
|
|
523
|
-
${e.setVariable(me.borderColor,De.colorPrimary)};
|
|
524
|
-
${e.setVariable(me.textColor,De.colorPrimary)};
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
.ft-text-area--filled .ft-text-area--input-panel {
|
|
528
|
-
border-radius: ${De.borderRadiusS} ${De.borderRadiusS} 0 0;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
.ft-text-area--filled:not(.ft-text-area--no-label) .ft-text-area--input {
|
|
532
|
-
align-self: stretch;
|
|
533
|
-
margin-bottom: ${De.verticalSpacing};
|
|
534
|
-
margin-top: calc(${De.labelSize} + 2 * ${De.verticalSpacing});
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
.ft-text-area--outlined .ft-text-area--input-panel {
|
|
538
|
-
border-radius: ${De.borderRadiusS};
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
.ft-text-area--helper-text {
|
|
542
|
-
padding: 0 12px 0 ${De.horizontalSpacing};
|
|
543
|
-
color: ${De.helperColor};
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
.ft-text-area--in-error .ft-text-area--input,
|
|
547
|
-
.ft-text-area--in-error .ft-text-area--helper-text {
|
|
548
|
-
color: ${De.colorError};
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
ft-resizer {
|
|
552
|
-
position: absolute;
|
|
553
|
-
right: 0;
|
|
554
|
-
bottom: 0;
|
|
555
|
-
}
|
|
556
|
-
`],Ce([o.property({type:String})],Ae.prototype,"label",void 0),Ce([o.property({reflect:!0})],Ae.prototype,"value",void 0),Ce([o.property({type:String})],Ae.prototype,"helper",void 0),Ce([o.property({type:Boolean})],Ae.prototype,"outlined",void 0),Ce([o.property({type:Boolean})],Ae.prototype,"disabled",void 0),Ce([o.property({type:Boolean})],Ae.prototype,"error",void 0),Ce([o.property({type:Number,reflect:!0})],Ae.prototype,"height",void 0),Ce([o.query("textarea")],Ae.prototype,"textarea",void 0),Ce([o.state()],Ae.prototype,"focused",void 0),e.customElement("ft-text-area")(Ae),t.FtTextArea=Ae,t.FtTextAreaCssVariables=De,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|
|
556
|
+
`}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)}}Ze.elementDefinitions={"ft-input-label":ke,"ft-resizer":ve,"ft-ripple":Be,"ft-typography":re},Ze.styles=[Vt,Te],Ue([o.property({type:String})],Ze.prototype,"label",void 0),Ue([o.property({reflect:!0})],Ze.prototype,"value",void 0),Ue([o.property({type:String})],Ze.prototype,"helper",void 0),Ue([o.property({type:Boolean})],Ze.prototype,"outlined",void 0),Ue([o.property({type:Boolean})],Ze.prototype,"disabled",void 0),Ue([o.property({type:Boolean})],Ze.prototype,"error",void 0),Ue([o.property({type:Number,reflect:!0})],Ze.prototype,"height",void 0),Ue([o.query("textarea")],Ze.prototype,"textarea",void 0),Ue([o.state()],Ze.prototype,"focused",void 0),e.customElement("ft-text-area")(Ze),t.FtTextArea=Ze,t.FtTextAreaCssVariables=Me,t.styles=Te,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|