@fluid-topics/ft-dialog 0.3.12 → 0.3.14
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-dialog.css.d.ts +16 -0
- package/build/ft-dialog.css.js +111 -0
- package/build/ft-dialog.d.ts +2 -23
- package/build/ft-dialog.js +5 -112
- package/build/ft-dialog.light.js +500 -500
- package/build/ft-dialog.min.js +517 -517
- package/build/ft-dialog.properties.d.ts +9 -0
- package/build/ft-dialog.properties.js +2 -0
- package/build/index.d.ts +2 -2
- package/build/index.js +2 -1
- package/package.json +6 -6
package/build/ft-dialog.light.js
CHANGED
|
@@ -10,151 +10,240 @@ var r;const a=globalThis.trustedTypes,l=a?a.createPolicy("lit-html",{createHTML:
|
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const U=Symbol.for(""),D=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t._$litStatic$},W=t=>({_$litStatic$:t,r:U}),K=new Map,H=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],a=[];let l,p=0,h=!1;for(;p<o;){for(l=i[p];p<o&&void 0!==(s=e[p],n=D(s));)l+=n+i[++p],h=!0;a.push(s),r.push(l),p++}if(p===o&&r.push(i[o]),h){const t=r.join("$$lit$$");void 0===(i=K.get(t))&&(r.raw=r,K.set(t,i=r)),e=a}return t(i,...e)})(k);var L
|
|
13
|
+
const U=Symbol.for(""),D=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t._$litStatic$},W=t=>({_$litStatic$:t,r:U}),K=new Map,H=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],a=[];let l,p=0,h=!1;for(;p<o;){for(l=i[p];p<o&&void 0!==(s=e[p],n=D(s));)l+=n+i[++p],h=!0;a.push(s),r.push(l),p++}if(p===o&&r.push(i[o]),h){const t=r.join("$$lit$$");void 0===(i=K.get(t))&&(r.raw=r,K.set(t,i=r)),e=a}return t(i,...e)})(k);var L;!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"}(L||(L={}));const G=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),P=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),q={fontFamily:P,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},V=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",G),X=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",q.fontSize,"20px"),Y=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",q.fontWeight,"normal"),J=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",q.letterSpacing,"0.15px"),Q=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",q.lineHeight,"1.2"),tt=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",q.textTransform,"inherit"),it=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",G),et=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",q.fontSize,"14px"),ot=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",q.fontWeight,"normal"),nt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",q.letterSpacing,"0.105px"),st=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",q.lineHeight,"1.7"),rt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",q.textTransform,"inherit"),at=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",P),lt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",q.fontSize,"16px"),pt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",q.fontWeight,"600"),ht=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",q.letterSpacing,"0.144px"),ft=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",q.lineHeight,"1.5"),dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",q.textTransform,"inherit"),ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",P),ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",q.fontSize,"14px"),gt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",q.fontWeight,"normal"),yt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",q.letterSpacing,"0.098px"),xt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",q.lineHeight,"1.7"),bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",q.textTransform,"inherit"),vt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",P),mt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",q.fontSize,"16px"),$t=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",q.fontWeight,"normal"),wt=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",q.letterSpacing,"0.496px"),kt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",q.lineHeight,"1.5"),zt=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",q.textTransform,"inherit"),St=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",P),Ct=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",q.fontSize,"14px"),Ot=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",q.fontWeight,"normal"),Nt=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",q.letterSpacing,"0.252px"),Et=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",q.lineHeight,"1.4"),jt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",q.textTransform,"inherit"),Bt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",P),It=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",q.fontSize,"12px"),Tt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",q.fontWeight,"normal"),At=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",q.letterSpacing,"0.396px"),Ft=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",q.lineHeight,"1.33"),_t=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",q.textTransform,"inherit"),Mt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",P),Zt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",q.fontSize,"10px"),Rt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",q.fontWeight,"normal"),Ut=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",q.letterSpacing,"0.33px"),Dt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",q.lineHeight,"1.6"),Wt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",q.textTransform,"inherit"),Kt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",P),Ht=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",q.fontSize,"10px"),Lt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",q.fontWeight,"normal"),Gt=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",q.letterSpacing,"1.5px"),Pt=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",q.lineHeight,"1.6"),qt=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",q.textTransform,"uppercase"),Vt={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-button-font-family",P),fontSize:i.FtCssVariableFactory.extend("--ft-typography-button-font-size",q.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",q.fontWeight,"600"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",q.letterSpacing,"1.246px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-button-line-height",q.lineHeight,"1.15"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",q.textTransform,"uppercase")},Xt=e.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
|
+
`,Yt=e.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: ${it};
|
|
25
|
+
font-size: ${et};
|
|
26
|
+
font-weight: ${ot};
|
|
27
|
+
letter-spacing: ${nt};
|
|
28
|
+
line-height: ${st};
|
|
29
|
+
text-transform: ${rt};
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,Jt=e.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: ${at};
|
|
34
|
+
font-size: ${lt};
|
|
35
|
+
font-weight: ${pt};
|
|
36
|
+
letter-spacing: ${ht};
|
|
37
|
+
line-height: ${ft};
|
|
38
|
+
text-transform: ${dt};
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,Qt=e.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: ${gt};
|
|
45
|
+
letter-spacing: ${yt};
|
|
46
|
+
line-height: ${xt};
|
|
47
|
+
text-transform: ${bt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,ti=e.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: ${vt};
|
|
53
|
+
font-size: ${mt};
|
|
54
|
+
font-weight: ${$t};
|
|
55
|
+
letter-spacing: ${wt};
|
|
56
|
+
line-height: ${kt};
|
|
57
|
+
text-transform: ${zt};
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,ii=e.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: ${St};
|
|
62
|
+
font-size: ${Ct};
|
|
63
|
+
font-weight: ${Ot};
|
|
64
|
+
letter-spacing: ${Nt};
|
|
65
|
+
line-height: ${Et};
|
|
66
|
+
text-transform: ${jt};
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,ei=e.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: ${Bt};
|
|
71
|
+
font-size: ${It};
|
|
72
|
+
font-weight: ${Tt};
|
|
73
|
+
letter-spacing: ${At};
|
|
74
|
+
line-height: ${Ft};
|
|
75
|
+
text-transform: ${_t};
|
|
76
76
|
}
|
|
77
|
-
`,
|
|
77
|
+
`,oi=e.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: ${Mt};
|
|
80
|
+
font-size: ${Zt};
|
|
81
|
+
font-weight: ${Rt};
|
|
82
|
+
letter-spacing: ${Ut};
|
|
83
|
+
line-height: ${Dt};
|
|
84
|
+
text-transform: ${Wt};
|
|
85
85
|
}
|
|
86
|
-
`,
|
|
86
|
+
`,ni=e.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: ${Kt};
|
|
89
|
+
font-size: ${Ht};
|
|
90
|
+
font-weight: ${Lt};
|
|
91
|
+
letter-spacing: ${Gt};
|
|
92
|
+
line-height: ${Pt};
|
|
93
|
+
text-transform: ${qt};
|
|
94
94
|
}
|
|
95
|
-
`,
|
|
95
|
+
`,si=e.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: ${Vt.fontFamily};
|
|
98
|
+
font-size: ${Vt.fontSize};
|
|
99
|
+
font-weight: ${Vt.fontWeight};
|
|
100
|
+
letter-spacing: ${Vt.letterSpacing};
|
|
101
|
+
line-height: ${Vt.lineHeight};
|
|
102
|
+
text-transform: ${Vt.textTransform};
|
|
103
|
+
}
|
|
104
|
+
`,ri=e.css`
|
|
105
|
+
.ft-typography {
|
|
106
|
+
vertical-align: inherit;
|
|
107
|
+
}
|
|
108
|
+
`;var ai,li,pi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class hi extends i.FtLitElement{constructor(){super(...arguments),this.variant=L.body1}render(){return this.element?H`
|
|
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
|
`:H`
|
|
110
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
111
|
-
`}}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
`}}hi.styles=[Xt,Yt,Jt,Qt,ti,ii,ei,oi,ni,si,ri],pi([o.property()],hi.prototype,"element",void 0),pi([o.property()],hi.prototype,"variant",void 0),i.customElement("ft-typography")(hi),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=""}(ai||(ai={})),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=""}(li||(li={})),new Map([...["abw"].map((t=>[t,li.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,li.AUDIO])),...["avi"].map((t=>[t,li.AVI])),...["chm","xhs"].map((t=>[t,li.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,li.CODE])),...["csv"].map((t=>[t,li.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,li.DITA])),...["epub"].map((t=>[t,li.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,li.EXCEL])),...["flac"].map((t=>[t,li.FLAC])),...["gif"].map((t=>[t,li.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,li.GZIP])),...["html","htm","xhtml"].map((t=>[t,li.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,li.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,li.JPEG])),...["json"].map((t=>[t,li.JSON])),...["m4a","m4p"].map((t=>[t,li.M4A])),...["mov","qt"].map((t=>[t,li.MOV])),...["mp3"].map((t=>[t,li.MP3])),...["mp4","m4v"].map((t=>[t,li.MP4])),...["ogg","oga"].map((t=>[t,li.OGG])),...["pdf","ps"].map((t=>[t,li.PDF])),...["png"].map((t=>[t,li.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,li.POWERPOINT])),...["rar"].map((t=>[t,li.RAR])),...["stp"].map((t=>[t,li.STP])),...["txt","rtf","md","mdown"].map((t=>[t,li.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,li.VIDEO])),...["wav"].map((t=>[t,li.WAV])),...["wma"].map((t=>[t,li.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,li.WORD])),...["xml","xsl","rdf"].map((t=>[t,li.XML])),...["yaml","yml","x-yaml"].map((t=>[t,li.YAML])),...["zip"].map((t=>[t,li.ZIP]))]);const fi={size:i.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:i.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:i.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:i.FtCssVariableFactory.extend("--ft-icon-material-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:i.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},di=e.css`
|
|
116
|
+
:host {
|
|
117
|
+
display: inline-block;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
:host, i.ft-icon {
|
|
121
|
+
width: ${fi.size};
|
|
122
|
+
height: ${fi.size};
|
|
123
|
+
text-align: center;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
i.ft-icon {
|
|
127
|
+
font-size: ${fi.size};
|
|
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: ${fi.verticalAlign};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.ft-icon--fluid-topics {
|
|
142
|
+
font-family: ${fi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.ft-icon--file-format {
|
|
146
|
+
font-family: ${fi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.ft-icon--material {
|
|
150
|
+
font-family: ${fi.materialFontFamily}, "Material Icons", sans-serif;
|
|
151
|
+
}
|
|
152
|
+
`;var ci;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(ci||(ci={}));var ui=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class gi extends i.FtLitElement{constructor(){super(...arguments),this.variant=ci.fluid_topics,this.resolvedIcon=e.nothing}render(){const t="material"!==this.variant||this.value;return e.html`
|
|
116
153
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
117
154
|
${n.unsafeHTML(this.resolvedIcon)}
|
|
118
155
|
<slot ?hidden=${t}></slot>
|
|
119
156
|
</i>
|
|
120
|
-
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
157
|
+
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case ci.file_format:this.resolvedIcon=null!==(t=li[o.toUpperCase()])&&void 0!==t?t:o;break;case ci.fluid_topics:this.resolvedIcon=null!==(i=ai[o.toUpperCase()])&&void 0!==i?i:o;break;default:this.resolvedIcon=this.value||e.nothing}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}gi.elementDefinitions={},gi.styles=di,ui([o.property()],gi.prototype,"variant",void 0),ui([o.property()],gi.prototype,"value",void 0),ui([o.state()],gi.prototype,"resolvedIcon",void 0),ui([o.query("slot")],gi.prototype,"slottedContent",void 0),i.customElement("ft-icon")(gi);const yi=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),xi={color:yi,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",yi),opacityContentOnSurfacePressed:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},bi=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),vi=bi,mi=i.FtCssVariableFactory.extend("--ft-ripple-background-color",bi),$i=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),wi=$i,ki=i.FtCssVariableFactory.extend("--ft-ripple-background-color",$i),zi=e.css`
|
|
158
|
+
:host {
|
|
159
|
+
display: contents;
|
|
160
|
+
}
|
|
124
161
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
162
|
+
.ft-ripple {
|
|
163
|
+
position: absolute;
|
|
164
|
+
inset: 0;
|
|
165
|
+
pointer-events: none;
|
|
166
|
+
}
|
|
130
167
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
font-weight: normal;
|
|
135
|
-
text-transform: none;
|
|
136
|
-
font-style: normal;
|
|
137
|
-
font-variant: normal;
|
|
138
|
-
speak: none;
|
|
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: ${di.verticalAlign};
|
|
144
|
-
}
|
|
168
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
169
|
+
overflow: hidden;
|
|
170
|
+
}
|
|
145
171
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
172
|
+
.ft-ripple .ft-ripple--background,
|
|
173
|
+
.ft-ripple .ft-ripple--effect {
|
|
174
|
+
position: absolute;
|
|
175
|
+
opacity: 0;
|
|
176
|
+
}
|
|
149
177
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
178
|
+
.ft-ripple .ft-ripple--background {
|
|
179
|
+
background-color: ${xi.backgroundColor};
|
|
180
|
+
}
|
|
153
181
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
182
|
+
.ft-ripple .ft-ripple--effect {
|
|
183
|
+
background-color: ${xi.color};
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
187
|
+
background-color: ${ki};
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
191
|
+
background-color: ${wi};
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
195
|
+
background-color: ${mi};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
199
|
+
background-color: ${vi};
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.ft-ripple .ft-ripple--background {
|
|
203
|
+
top: 0;
|
|
204
|
+
left: 0;
|
|
205
|
+
height: 100%;
|
|
206
|
+
width: 100%;
|
|
207
|
+
transition: opacity 75ms linear;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.ft-ripple .ft-ripple--effect,
|
|
211
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
212
|
+
border-radius: 50%;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.ft-ripple .ft-ripple--effect {
|
|
216
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
217
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
221
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
222
|
+
left: 50%;
|
|
223
|
+
top: 50%;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
227
|
+
transform: translate(-50%, -50%);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
231
|
+
opacity: ${xi.opacityContentOnSurfaceHover};
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
235
|
+
opacity: ${xi.opacityContentOnSurfaceSelected};
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
239
|
+
opacity: ${xi.opacityContentOnSurfaceFocused};
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
243
|
+
opacity: ${xi.opacityContentOnSurfacePressed};
|
|
244
|
+
transform: translate(-50%, -50%) scale(1);
|
|
245
|
+
}
|
|
246
|
+
`;var Si=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Ci extends i.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 i.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 i,e;let{x:o,y:n}=this.getCoordinates(t),s=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-s.x:s.width/2),this.originY=Math.round(null!=n?n-s.y:s.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 e.html`
|
|
158
247
|
<style>
|
|
159
248
|
.ft-ripple .ft-ripple--effect,
|
|
160
249
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -171,96 +260,39 @@ const U=Symbol.for(""),D=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
171
260
|
<div class="ft-ripple--background"></div>
|
|
172
261
|
<div class="ft-ripple--effect"></div>
|
|
173
262
|
</div>
|
|
174
|
-
`}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 i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.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 i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),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 i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),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",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),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 i=t,e=t;let o,n;return null!=i.x?({x:o,y:n}=i):null!=e.touches&&(o=e.touches[0].clientX,n=e.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
.ft-ripple {
|
|
180
|
-
position: absolute;
|
|
181
|
-
inset: 0;
|
|
182
|
-
pointer-events: none;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
186
|
-
overflow: hidden;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.ft-ripple .ft-ripple--background,
|
|
190
|
-
.ft-ripple .ft-ripple--effect {
|
|
191
|
-
position: absolute;
|
|
192
|
-
opacity: 0;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.ft-ripple .ft-ripple--background {
|
|
196
|
-
background-color: ${yi.backgroundColor};
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.ft-ripple .ft-ripple--effect {
|
|
200
|
-
background-color: ${yi.color};
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
204
|
-
background-color: ${wi};
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
208
|
-
background-color: ${$i};
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
212
|
-
background-color: ${vi};
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
216
|
-
background-color: ${bi};
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.ft-ripple .ft-ripple--background {
|
|
220
|
-
top: 0;
|
|
221
|
-
left: 0;
|
|
222
|
-
height: 100%;
|
|
223
|
-
width: 100%;
|
|
224
|
-
transition: opacity 75ms linear;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.ft-ripple .ft-ripple--effect,
|
|
228
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
229
|
-
border-radius: 50%;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.ft-ripple .ft-ripple--effect {
|
|
233
|
-
transform: translate(-50%, -50%) scale(0.15);
|
|
234
|
-
transition: transform 300ms ease, opacity 75ms linear;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
238
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
239
|
-
left: 50%;
|
|
240
|
-
top: 50%;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
244
|
-
transform: translate(-50%, -50%);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
248
|
-
opacity: ${yi.opacityContentOnSurfaceHover};
|
|
249
|
-
}
|
|
263
|
+
`}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 i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.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 i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),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 i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),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",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),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 i=t,e=t;let o,n;return null!=i.x?({x:o,y:n}=i):null!=e.touches&&(o=e.touches[0].clientX,n=e.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}Ci.elementDefinitions={},Ci.styles=zi,Si([o.property({type:Boolean})],Ci.prototype,"primary",void 0),Si([o.property({type:Boolean})],Ci.prototype,"secondary",void 0),Si([o.property({type:Boolean})],Ci.prototype,"unbounded",void 0),Si([o.property({type:Boolean})],Ci.prototype,"activated",void 0),Si([o.property({type:Boolean})],Ci.prototype,"selected",void 0),Si([o.property({type:Boolean})],Ci.prototype,"disabled",void 0),Si([o.state()],Ci.prototype,"hovered",void 0),Si([o.state()],Ci.prototype,"focused",void 0),Si([o.state()],Ci.prototype,"pressed",void 0),Si([o.state()],Ci.prototype,"rippling",void 0),Si([o.state()],Ci.prototype,"rippleSize",void 0),Si([o.state()],Ci.prototype,"originX",void 0),Si([o.state()],Ci.prototype,"originY",void 0),Si([o.query(".ft-ripple")],Ci.prototype,"ripple",void 0),Si([o.query(".ft-ripple--effect")],Ci.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(Ci);const Oi=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),Ni=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),Ei=i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),ji=i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),Bi=i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),Ii=i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),Ti=e.css`
|
|
264
|
+
.ft-tooltip--container {
|
|
265
|
+
display: block;
|
|
266
|
+
position: relative;
|
|
267
|
+
}
|
|
250
268
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
269
|
+
.ft-tooltip--inline {
|
|
270
|
+
display: inline-block;
|
|
271
|
+
max-width: 100%;
|
|
272
|
+
}
|
|
254
273
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
274
|
+
.ft-tooltip {
|
|
275
|
+
position: absolute;
|
|
276
|
+
box-sizing: border-box;
|
|
277
|
+
overflow: hidden;
|
|
278
|
+
width: max-content;
|
|
279
|
+
max-width: ${Ii};
|
|
280
|
+
text-align: center;
|
|
281
|
+
padding: ${Oi};
|
|
282
|
+
z-index: ${ji};
|
|
283
|
+
}
|
|
258
284
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
|
|
285
|
+
.ft-tooltip--content {
|
|
286
|
+
padding: 4px 8px;
|
|
287
|
+
border-radius: ${Bi};
|
|
288
|
+
background-color: ${Ei};
|
|
289
|
+
color: ${Ni};
|
|
290
|
+
top: -500px;
|
|
291
|
+
left: -500px;
|
|
292
|
+
position: relative;
|
|
293
|
+
word-break: break-word;
|
|
294
|
+
}
|
|
295
|
+
`;var Ai=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Fi extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}render(){return e.html`
|
|
264
296
|
<div part="container"
|
|
265
297
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
266
298
|
@mouseenter=${this.onHover}
|
|
@@ -276,248 +308,216 @@ const U=Symbol.for(""),D=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
276
308
|
</div>
|
|
277
309
|
<slot></slot>
|
|
278
310
|
</div>
|
|
279
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let n=0,s=0;switch(this.position){case"top":s=-this.tooltip.clientHeight,n=o;break;case"bottom":s=i.height,n=o;break;case"left":s=e,n=-this.tooltip.clientWidth;break;case"right":s=e,n=i.width}i.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+n<0&&(n=0);const r=this.tooltip.style;r.left=n+"px",r.top=s+"px",r.maxWidth=`max(${i.width}px, ${
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
}
|
|
311
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let n=0,s=0;switch(this.position){case"top":s=-this.tooltip.clientHeight,n=o;break;case"bottom":s=i.height,n=o;break;case"left":s=e,n=-this.tooltip.clientWidth;break;case"right":s=e,n=i.width}i.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+n<0&&(n=0);const r=this.tooltip.style;r.left=n+"px",r.top=s+"px",r.maxWidth=`max(${i.width}px, ${Ii})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}Fi.elementDefinitions={"ft-typography":hi},Fi.styles=Ti,Ai([o.property()],Fi.prototype,"text",void 0),Ai([o.property({type:Boolean})],Fi.prototype,"manual",void 0),Ai([o.property({type:Boolean})],Fi.prototype,"inline",void 0),Ai([o.property({type:Number})],Fi.prototype,"delay",void 0),Ai([o.property()],Fi.prototype,"position",void 0),Ai([o.queryAssignedNodes("",!0)],Fi.prototype,"slotNodes",void 0),Ai([o.query(".ft-tooltip--container")],Fi.prototype,"container",void 0),Ai([o.query("slot")],Fi.prototype,"target",void 0),Ai([o.query(".ft-tooltip")],Fi.prototype,"tooltip",void 0),Ai([o.query(".ft-tooltip--content")],Fi.prototype,"tooltipContent",void 0),Ai([o.state()],Fi.prototype,"visible",void 0),i.customElement("ft-tooltip")(Fi);const _i={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Mi=e.css`
|
|
312
|
+
:host {
|
|
313
|
+
line-height: 0;
|
|
314
|
+
}
|
|
284
315
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
}
|
|
316
|
+
.ft-loader {
|
|
317
|
+
display: inline-block;
|
|
318
|
+
position: relative;
|
|
289
319
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
overflow: hidden;
|
|
294
|
-
width: max-content;
|
|
295
|
-
max-width: ${ji};
|
|
296
|
-
text-align: center;
|
|
297
|
-
padding: ${Si};
|
|
298
|
-
z-index: ${Ni};
|
|
299
|
-
}
|
|
320
|
+
width: ${_i.size};
|
|
321
|
+
height: ${_i.size};
|
|
322
|
+
}
|
|
300
323
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
324
|
+
.ft-loader div {
|
|
325
|
+
position: absolute;
|
|
326
|
+
top: 37.5%;
|
|
327
|
+
width: 25%;
|
|
328
|
+
height: 25%;
|
|
329
|
+
border-radius: 50%;
|
|
330
|
+
background: ${_i.color};
|
|
331
|
+
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.ft-loader div:nth-child(1) {
|
|
335
|
+
left: 2.5%;
|
|
336
|
+
animation: appear 0.6s infinite;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.ft-loader div:nth-child(2) {
|
|
340
|
+
left: 2.5%;
|
|
341
|
+
animation: move 0.6s infinite;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.ft-loader div:nth-child(3) {
|
|
345
|
+
left: 37.5%;
|
|
346
|
+
animation: move 0.6s infinite;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.ft-loader div:nth-child(4) {
|
|
350
|
+
left: 72.5%;
|
|
351
|
+
animation: disappear 0.6s infinite;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
@keyframes appear {
|
|
355
|
+
0% {
|
|
356
|
+
transform: scale(0);
|
|
310
357
|
}
|
|
311
|
-
|
|
312
|
-
:
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
.ft-loader {
|
|
317
|
-
display: inline-block;
|
|
318
|
-
position: relative;
|
|
319
|
-
|
|
320
|
-
width: ${Ii.size};
|
|
321
|
-
height: ${Ii.size};
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
.ft-loader div {
|
|
325
|
-
position: absolute;
|
|
326
|
-
top: 37.5%;
|
|
327
|
-
width: 25%;
|
|
328
|
-
height: 25%;
|
|
329
|
-
border-radius: 50%;
|
|
330
|
-
background: ${Ii.color};
|
|
331
|
-
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
.ft-loader div:nth-child(1) {
|
|
335
|
-
left: 2.5%;
|
|
336
|
-
animation: appear 0.6s infinite;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
.ft-loader div:nth-child(2) {
|
|
340
|
-
left: 2.5%;
|
|
341
|
-
animation: move 0.6s infinite;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
.ft-loader div:nth-child(3) {
|
|
345
|
-
left: 37.5%;
|
|
346
|
-
animation: move 0.6s infinite;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
.ft-loader div:nth-child(4) {
|
|
350
|
-
left: 72.5%;
|
|
351
|
-
animation: disappear 0.6s infinite;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
@keyframes appear {
|
|
355
|
-
0% {
|
|
356
|
-
transform: scale(0);
|
|
357
|
-
}
|
|
358
|
-
100% {
|
|
359
|
-
transform: scale(1);
|
|
360
|
-
}
|
|
361
|
-
}
|
|
358
|
+
100% {
|
|
359
|
+
transform: scale(1);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
362
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
363
|
+
@keyframes disappear {
|
|
364
|
+
0% {
|
|
365
|
+
transform: scale(1);
|
|
366
|
+
}
|
|
367
|
+
100% {
|
|
368
|
+
transform: scale(0);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
371
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
372
|
+
@keyframes move {
|
|
373
|
+
0% {
|
|
374
|
+
transform: translate(0, 0);
|
|
375
|
+
}
|
|
376
|
+
100% {
|
|
377
|
+
transform: translate(calc(0.35 * ${_i.size}), 0);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
`;class Zi extends i.FtLitElement{render(){return e.html`
|
|
381
381
|
<div class="ft-loader">
|
|
382
382
|
<div></div>
|
|
383
383
|
<div></div>
|
|
384
384
|
<div></div>
|
|
385
385
|
<div></div>
|
|
386
386
|
</div>
|
|
387
|
-
`}}i.customElement("ft-loader")(
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
387
|
+
`}}Zi.styles=Mi,i.customElement("ft-loader")(Zi);const Ri=i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorPrimary),Ui={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:Ri,fontSize:i.FtCssVariableFactory.extend("--ft-button-font-size",Vt.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariableFactory.extend("--ft-button-ripple-color",Ri),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Di=i.FtCssVariableFactory.extend("--ft-button-primary-color",i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),Wi={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-primary-background-color",i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:Di,rippleColor:i.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Di)},Ki=i.FtCssVariableFactory.extend("--ft-button-dense-border-radius",i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM)),Hi=[i.noTextSelect,e.css`
|
|
388
|
+
:host {
|
|
389
|
+
display: inline-block;
|
|
390
|
+
max-width: 100%;
|
|
391
|
+
pointer-events: none;
|
|
392
|
+
}
|
|
393
393
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
394
|
+
button {
|
|
395
|
+
box-shadow: 0px 0px 0px transparent;
|
|
396
|
+
border: 0px solid transparent;
|
|
397
|
+
text-shadow: 0px 0px 0px transparent;
|
|
398
|
+
font-size: ${Ui.fontSize};
|
|
399
|
+
}
|
|
400
400
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
401
|
+
button:hover {
|
|
402
|
+
box-shadow: 0px 0px 0px transparent;
|
|
403
|
+
border: 0px solid transparent;
|
|
404
|
+
text-shadow: 0px 0px 0px transparent;
|
|
405
|
+
}
|
|
406
406
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
407
|
+
button:active {
|
|
408
|
+
outline: none;
|
|
409
|
+
border: none;
|
|
410
|
+
}
|
|
411
411
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
412
|
+
button:focus {
|
|
413
|
+
outline: 0;
|
|
414
|
+
}
|
|
415
415
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
416
|
+
.ft-button {
|
|
417
|
+
position: relative;
|
|
418
|
+
display: flex;
|
|
419
|
+
justify-content: center;
|
|
420
|
+
align-items: center;
|
|
421
|
+
width: 100%;
|
|
422
|
+
overflow: hidden;
|
|
423
|
+
box-sizing: border-box;
|
|
424
|
+
border: none;
|
|
425
|
+
pointer-events: auto;
|
|
426
|
+
|
|
427
|
+
--ft-button-internal-line-height: calc(${Ui.fontSize} + 2px);
|
|
428
|
+
--ft-button-internal-color: ${Ui.color};
|
|
429
|
+
${i.setVariable(fi.size,Ui.iconSize)};
|
|
430
|
+
--ft-button-internal-vertical-padding: 6px;
|
|
431
|
+
--ft-button-internal-horizontal-padding: 8px;
|
|
432
|
+
${i.setVariable(xi.color,Ui.rippleColor)};
|
|
433
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ui.iconSize});
|
|
434
|
+
|
|
435
|
+
border-radius: ${Ui.borderRadius};
|
|
436
|
+
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
437
|
+
background-color: ${Ui.backgroundColor};
|
|
438
|
+
color: var(--ft-button-internal-color);
|
|
439
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
440
|
+
}
|
|
441
441
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
442
|
+
.ft-button:not([disabled]):hover {
|
|
443
|
+
cursor: pointer;
|
|
444
|
+
}
|
|
445
445
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
446
|
+
.ft-button--dense {
|
|
447
|
+
--ft-button-internal-vertical-padding: 2px;
|
|
448
|
+
--ft-button-internal-horizontal-padding: 4px;
|
|
449
|
+
border-radius: ${Ki};
|
|
450
|
+
}
|
|
451
451
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
452
|
+
.ft-button--round {
|
|
453
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + var(--ft-button-internal-vertical-padding));
|
|
454
|
+
}
|
|
455
455
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
456
|
+
.ft-button[disabled] {
|
|
457
|
+
filter: grayscale(1);
|
|
458
|
+
opacity: ${Ui.opacityDisabled};
|
|
459
|
+
}
|
|
460
460
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
461
|
+
.ft-button.ft-button--primary {
|
|
462
|
+
background-color: ${Wi.backgroundColor};
|
|
463
|
+
--ft-button-internal-color: ${Wi.color};
|
|
464
|
+
${i.setVariable(xi.color,Wi.rippleColor)};
|
|
465
|
+
}
|
|
466
466
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
467
|
+
.ft-button.ft-button--outlined {
|
|
468
|
+
border: 1px solid var(--ft-button-internal-color);
|
|
469
|
+
padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
|
|
470
|
+
}
|
|
471
471
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
472
|
+
.ft-button:focus {
|
|
473
|
+
outline: none;
|
|
474
|
+
}
|
|
475
475
|
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
476
|
+
.ft-button--label {
|
|
477
|
+
position: relative;
|
|
478
|
+
overflow: hidden;
|
|
479
|
+
white-space: nowrap;
|
|
480
|
+
text-overflow: ellipsis;
|
|
481
|
+
display: block;
|
|
482
|
+
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
483
|
+
${i.setVariable(Vt.fontSize,"1em")};
|
|
484
|
+
${i.setVariable(Vt.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
485
|
+
}
|
|
486
486
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
487
|
+
.ft-button--safari-fix .ft-button--label {
|
|
488
|
+
margin-right: 0;
|
|
489
|
+
}
|
|
490
490
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
491
|
+
.ft-button--safari-fix .ft-button--label:after {
|
|
492
|
+
content: "\\0000a0";
|
|
493
|
+
display: inline-block;
|
|
494
|
+
width: 0;
|
|
495
|
+
}
|
|
496
496
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
497
|
+
.ft-button--label[hidden] {
|
|
498
|
+
display: none;
|
|
499
|
+
}
|
|
500
500
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
501
|
+
ft-icon {
|
|
502
|
+
flex-shrink: 0;
|
|
503
|
+
position: relative;
|
|
504
|
+
}
|
|
505
505
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
506
|
+
.ft-button--label[hidden] + ft-icon {
|
|
507
|
+
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
508
|
+
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
509
|
+
}
|
|
510
510
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
511
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
512
|
+
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
513
|
+
order: -1;
|
|
514
|
+
}
|
|
515
515
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
516
|
+
ft-loader {
|
|
517
|
+
${i.setVariable(_i.size,Ui.iconSize)};
|
|
518
|
+
${i.setVariable(_i.color,"var(--ft-button-internal-color)")};
|
|
519
|
+
}
|
|
520
|
+
`];var Li=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Gi extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=ci.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":i.isSafari,"ft-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
|
|
521
521
|
<button part="button"
|
|
522
522
|
class="${s.classMap(t)}"
|
|
523
523
|
aria-label="${this.getLabel()}"
|
|
@@ -539,98 +539,98 @@ const U=Symbol.for(""),D=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
539
539
|
</ft-tooltip>
|
|
540
540
|
`}resolveIcon(){return this.loading?e.html`
|
|
541
541
|
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
542
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
542
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Gi.elementDefinitions={"ft-ripple":Ci,"ft-tooltip":Fi,"ft-typography":hi,"ft-icon":gi,"ft-loader":Zi},Gi.styles=Hi,Li([o.property({type:Boolean})],Gi.prototype,"primary",void 0),Li([o.property({type:Boolean})],Gi.prototype,"outlined",void 0),Li([o.property({type:Boolean})],Gi.prototype,"disabled",void 0),Li([o.property({type:Boolean})],Gi.prototype,"dense",void 0),Li([o.property({type:Boolean})],Gi.prototype,"round",void 0),Li([o.property({type:String})],Gi.prototype,"label",void 0),Li([o.property({type:String})],Gi.prototype,"icon",void 0),Li([o.property({type:String})],Gi.prototype,"iconVariant",void 0),Li([o.property({type:Boolean})],Gi.prototype,"trailingIcon",void 0),Li([o.property({type:Boolean})],Gi.prototype,"loading",void 0),Li([o.property({type:String})],Gi.prototype,"tooltipPosition",void 0),Li([o.property({type:Boolean})],Gi.prototype,"hideTooltip",void 0),Li([o.query(".ft-button")],Gi.prototype,"button",void 0),Li([o.query(".ft-button--label slot")],Gi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Gi);const Pi={zIndex:i.FtCssVariableFactory.create("--ft-dialog-z-index","NUMBER","2"),overlayBackgroundColor:i.FtCssVariableFactory.create("--ft-dialog-overlay-background-color","COLOR","rgba(0, 0, 0, 0.3)"),height:i.FtCssVariableFactory.create("--ft-dialog-height","SIZE","unset"),width:i.FtCssVariableFactory.create("--ft-dialog-width","SIZE","unset"),minWidth:i.FtCssVariableFactory.create("--ft-dialog-min-width","SIZE","unset"),paddingTop:i.FtCssVariableFactory.create("--ft-dialog-padding-top","SIZE","20px"),paddingSide:i.FtCssVariableFactory.create("--ft-dialog-padding-side","SIZE","16px"),paddingButtons:i.FtCssVariableFactory.create("--ft-dialog-padding-buttons","SIZE","20px"),colorSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system"),headingColor:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),borderRadiusS:i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),elevation24:i.FtCssVariableFactory.external(i.designSystemVariables.elevation24,"Design system")},qi=e.css`
|
|
543
|
+
.ft-dialog {
|
|
544
|
+
position: fixed;
|
|
545
|
+
top: 0;
|
|
546
|
+
right: 0;
|
|
547
|
+
bottom: 0;
|
|
548
|
+
left: 0;
|
|
549
|
+
z-index: ${Pi.zIndex};
|
|
550
|
+
|
|
551
|
+
display: flex;
|
|
552
|
+
flex-direction: column;
|
|
553
|
+
justify-content: center;
|
|
554
|
+
align-items: center;
|
|
555
|
+
|
|
556
|
+
margin: auto;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.ft-dialog-overlay {
|
|
560
|
+
position: fixed;
|
|
561
|
+
top: 0;
|
|
562
|
+
right: 0;
|
|
563
|
+
bottom: 0;
|
|
564
|
+
left: 0;
|
|
565
|
+
|
|
566
|
+
height: 100%;
|
|
567
|
+
width: 100%;
|
|
568
|
+
|
|
569
|
+
background-color: ${Pi.overlayBackgroundColor};
|
|
570
|
+
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
.ft-dialog-wrapper {
|
|
574
|
+
position: fixed;
|
|
575
|
+
display: flex;
|
|
576
|
+
flex-direction: column;
|
|
577
|
+
|
|
578
|
+
width: ${Pi.width};
|
|
579
|
+
height: ${Pi.height};
|
|
580
|
+
max-width: 95vw;
|
|
581
|
+
max-height: 95vh;
|
|
582
|
+
min-width: ${Pi.minWidth};
|
|
583
|
+
|
|
584
|
+
padding-top: ${Pi.paddingTop};
|
|
585
|
+
padding-right: ${Pi.paddingSide};
|
|
586
|
+
padding-left: ${Pi.paddingSide};
|
|
587
|
+
|
|
588
|
+
background-color: ${Pi.colorSurface};
|
|
589
|
+
|
|
590
|
+
border-radius: ${Pi.borderRadiusS};
|
|
591
|
+
box-shadow: ${Pi.elevation24};
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
.ft-dialog-content {
|
|
595
|
+
flex-grow: 2;
|
|
596
|
+
overflow: auto;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.ft-dialog-heading {
|
|
600
|
+
text-overflow: ellipsis;
|
|
601
|
+
overflow: hidden;
|
|
602
|
+
white-space: nowrap;
|
|
603
|
+
|
|
604
|
+
display: flex;
|
|
605
|
+
align-items: center;
|
|
606
|
+
margin-bottom: 20px;
|
|
607
|
+
gap: 8px;
|
|
608
|
+
|
|
609
|
+
color: ${Pi.headingColor};
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
.ft-dialog-buttons {
|
|
613
|
+
padding-top: ${Pi.paddingButtons};
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
slot[name=buttons] {
|
|
617
|
+
display: flex;
|
|
618
|
+
align-items: center;
|
|
619
|
+
justify-content: flex-end;
|
|
620
|
+
gap: 8px;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
slot[name=buttons]::slotted(*) {
|
|
624
|
+
margin-top: 8px;
|
|
625
|
+
margin-bottom: 8px
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.ft-dialog-heading ft-button {
|
|
629
|
+
margin-left: auto;
|
|
630
|
+
${i.setVariable(Ui.color,Pi.headingColor)};
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
`;var Vi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Xi extends i.FtLitElement{constructor(){super(...arguments),this.opened=!1,this.closeOnEsc=!1,this.closeOnClickOutside=!1,this.closable=!1,this.beforeClose=()=>!0,this.heading="",this.icon=""}render(){return this.opened?e.html`
|
|
634
634
|
<div class="ft-dialog">
|
|
635
635
|
<div class="ft-dialog-overlay" @click="${()=>this.watchClickOutside()}"></div>
|
|
636
636
|
<div class="ft-dialog-wrapper">
|
|
@@ -651,4 +651,4 @@ const U=Symbol.for(""),D=t=>{if((null==t?void 0:t.r)===U)return null==t?void 0:t
|
|
|
651
651
|
</div>
|
|
652
652
|
</div>
|
|
653
653
|
</div>
|
|
654
|
-
`:null}updated(t){if(t.has("opened")){const t=new CustomEvent("opened-changed",{detail:{opened:this.opened}});this.dispatchEvent(t)}}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.watchEscapeKey.bind(this))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.watchEscapeKey.bind(this))}close(){this.beforeClose()&&(this.opened=!1)}open(){this.opened=!0}watchEscapeKey(t){"Escape"===t.key&&this.closeOnEsc&&this.close()}watchClickOutside(){this.closeOnClickOutside&&this.close()}}
|
|
654
|
+
`:null}updated(t){if(t.has("opened")){const t=new CustomEvent("opened-changed",{detail:{opened:this.opened}});this.dispatchEvent(t)}}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.watchEscapeKey.bind(this))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.watchEscapeKey.bind(this))}close(){this.beforeClose()&&(this.opened=!1)}open(){this.opened=!0}watchEscapeKey(t){"Escape"===t.key&&this.closeOnEsc&&this.close()}watchClickOutside(){this.closeOnClickOutside&&this.close()}}Xi.elementDefinitions={"ft-typography":hi,"ft-icon":gi,"ft-button":Gi},Xi.styles=qi,Vi([o.property({type:Boolean,hasChanged:(t,i)=>!1===i&&!0===t||!0===i&&!1===t})],Xi.prototype,"opened",void 0),Vi([o.property({type:Boolean})],Xi.prototype,"closeOnEsc",void 0),Vi([o.property({type:Boolean})],Xi.prototype,"closeOnClickOutside",void 0),Vi([o.property({type:Boolean})],Xi.prototype,"closable",void 0),Vi([o.property({type:()=>Boolean})],Xi.prototype,"beforeClose",void 0),Vi([o.property({type:String})],Xi.prototype,"heading",void 0),Vi([o.property({type:String})],Xi.prototype,"icon",void 0),i.customElement("ft-dialog")(Xi),t.FtDialog=Xi,t.FtDialogCssVariables=Pi,t.styles=qi,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML,ftGlobals.litClassMap);
|