@fluid-topics/ft-reader-toc 0.3.12 → 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-reader-toc.css.d.ts +11 -0
- package/build/ft-reader-toc.css.js +48 -0
- package/build/ft-reader-toc.d.ts +2 -22
- package/build/ft-reader-toc.js +7 -50
- package/build/ft-reader-toc.light.js +469 -469
- package/build/ft-reader-toc.min.js +478 -478
- package/build/ft-reader-toc.properties.d.ts +15 -0
- package/build/ft-reader-toc.properties.js +5 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/package.json +7 -7
|
@@ -4,166 +4,255 @@
|
|
|
4
4
|
* Copyright 2020 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t._$litStatic$},H=t=>({_$litStatic$:t,r:G}),V=new Map,X=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],a=[];let l,h=0,p=!1;for(;h<o;){for(l=i[h];h<o&&void 0!==(s=e[h],n=K(s));)l+=n+i[++h],p=!0;a.push(s),r.push(l),h++}if(h===o&&r.push(i[o]),p){const t=r.join("$$lit$$");void 0===(i=V.get(t))&&(r.raw=r,V.set(t,i=r)),e=a}return t(i,...e)})(O);var q
|
|
7
|
+
const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t._$litStatic$},H=t=>({_$litStatic$:t,r:G}),V=new Map,X=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],a=[];let l,h=0,p=!1;for(;h<o;){for(l=i[h];h<o&&void 0!==(s=e[h],n=K(s));)l+=n+i[++h],p=!0;a.push(s),r.push(l),h++}if(h===o&&r.push(i[o]),p){const t=r.join("$$lit$$");void 0===(i=V.get(t))&&(r.raw=r,V.set(t,i=r)),e=a}return t(i,...e)})(O);var q;!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"}(q||(q={}));const Y=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),J=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),Q={fontFamily:J,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")},tt=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",Y),it=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",Q.fontSize,"20px"),et=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",Q.fontWeight,"normal"),ot=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",Q.letterSpacing,"0.15px"),nt=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",Q.lineHeight,"1.2"),st=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",Q.textTransform,"inherit"),rt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",Y),at=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",Q.fontSize,"14px"),lt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",Q.fontWeight,"normal"),ht=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",Q.letterSpacing,"0.105px"),pt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",Q.lineHeight,"1.7"),ft=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",Q.textTransform,"inherit"),dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",J),ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",Q.fontSize,"16px"),ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",Q.fontWeight,"600"),gt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",Q.letterSpacing,"0.144px"),vt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",Q.lineHeight,"1.5"),xt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",Q.textTransform,"inherit"),yt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",J),bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",Q.fontSize,"14px"),mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",Q.fontWeight,"normal"),$t=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",Q.letterSpacing,"0.098px"),wt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",Q.lineHeight,"1.7"),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",Q.textTransform,"inherit"),zt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",J),St=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",Q.fontSize,"16px"),Nt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",Q.fontWeight,"normal"),Ct=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",Q.letterSpacing,"0.496px"),Ot=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",Q.lineHeight,"1.5"),jt=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",Q.textTransform,"inherit"),Tt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",J),Et=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",Q.fontSize,"14px"),It=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",Q.fontWeight,"normal"),Bt=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",Q.letterSpacing,"0.252px"),At=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",Q.lineHeight,"1.4"),Ft=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",Q.textTransform,"inherit"),Mt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",J),Ut=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",Q.fontSize,"12px"),_t=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",Q.fontWeight,"normal"),Rt=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",Q.letterSpacing,"0.396px"),Zt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",Q.lineHeight,"1.33"),Wt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",Q.textTransform,"inherit"),Lt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",J),Dt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",Q.fontSize,"10px"),Pt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",Q.fontWeight,"normal"),Gt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",Q.letterSpacing,"0.33px"),Kt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",Q.lineHeight,"1.6"),Ht=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",Q.textTransform,"inherit"),Vt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",J),Xt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",Q.fontSize,"10px"),qt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",Q.fontWeight,"normal"),Yt=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",Q.letterSpacing,"1.5px"),Jt=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",Q.lineHeight,"1.6"),Qt=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",Q.textTransform,"uppercase"),ti={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-button-font-family",J),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")},ii=e.css`
|
|
8
8
|
.ft-typography--title {
|
|
9
|
-
font-family: ${
|
|
10
|
-
font-size: ${
|
|
11
|
-
font-weight: ${
|
|
12
|
-
letter-spacing: ${
|
|
13
|
-
line-height: ${
|
|
14
|
-
text-transform: ${
|
|
9
|
+
font-family: ${tt};
|
|
10
|
+
font-size: ${it};
|
|
11
|
+
font-weight: ${et};
|
|
12
|
+
letter-spacing: ${ot};
|
|
13
|
+
line-height: ${nt};
|
|
14
|
+
text-transform: ${st};
|
|
15
15
|
}
|
|
16
|
-
`,
|
|
16
|
+
`,ei=e.css`
|
|
17
17
|
.ft-typography--title-dense {
|
|
18
|
-
font-family: ${
|
|
19
|
-
font-size: ${
|
|
20
|
-
font-weight: ${
|
|
21
|
-
letter-spacing: ${
|
|
22
|
-
line-height: ${
|
|
23
|
-
text-transform: ${
|
|
18
|
+
font-family: ${rt};
|
|
19
|
+
font-size: ${at};
|
|
20
|
+
font-weight: ${lt};
|
|
21
|
+
letter-spacing: ${ht};
|
|
22
|
+
line-height: ${pt};
|
|
23
|
+
text-transform: ${ft};
|
|
24
24
|
}
|
|
25
|
-
`,
|
|
25
|
+
`,oi=e.css`
|
|
26
26
|
.ft-typography--subtitle1 {
|
|
27
|
-
font-family: ${
|
|
28
|
-
font-size: ${
|
|
29
|
-
font-weight: ${
|
|
30
|
-
letter-spacing: ${
|
|
31
|
-
line-height: ${
|
|
32
|
-
text-transform: ${
|
|
27
|
+
font-family: ${dt};
|
|
28
|
+
font-size: ${ct};
|
|
29
|
+
font-weight: ${ut};
|
|
30
|
+
letter-spacing: ${gt};
|
|
31
|
+
line-height: ${vt};
|
|
32
|
+
text-transform: ${xt};
|
|
33
33
|
}
|
|
34
|
-
`,
|
|
34
|
+
`,ni=e.css`
|
|
35
35
|
.ft-typography--subtitle2 {
|
|
36
|
-
font-family: ${
|
|
37
|
-
font-size: ${
|
|
38
|
-
font-weight: ${
|
|
39
|
-
letter-spacing: ${
|
|
40
|
-
line-height: ${
|
|
41
|
-
text-transform: ${
|
|
36
|
+
font-family: ${yt};
|
|
37
|
+
font-size: ${bt};
|
|
38
|
+
font-weight: ${mt};
|
|
39
|
+
letter-spacing: ${$t};
|
|
40
|
+
line-height: ${wt};
|
|
41
|
+
text-transform: ${kt};
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
`,
|
|
44
|
+
`,si=e.css`
|
|
45
45
|
.ft-typography--body1 {
|
|
46
|
-
font-family: ${
|
|
47
|
-
font-size: ${
|
|
48
|
-
font-weight: ${
|
|
49
|
-
letter-spacing: ${
|
|
50
|
-
line-height: ${
|
|
51
|
-
text-transform: ${
|
|
46
|
+
font-family: ${zt};
|
|
47
|
+
font-size: ${St};
|
|
48
|
+
font-weight: ${Nt};
|
|
49
|
+
letter-spacing: ${Ct};
|
|
50
|
+
line-height: ${Ot};
|
|
51
|
+
text-transform: ${jt};
|
|
52
52
|
}
|
|
53
|
-
`,
|
|
53
|
+
`,ri=e.css`
|
|
54
54
|
.ft-typography--body2 {
|
|
55
|
-
font-family: ${
|
|
56
|
-
font-size: ${
|
|
57
|
-
font-weight: ${
|
|
58
|
-
letter-spacing: ${
|
|
59
|
-
line-height: ${
|
|
60
|
-
text-transform: ${
|
|
55
|
+
font-family: ${Tt};
|
|
56
|
+
font-size: ${Et};
|
|
57
|
+
font-weight: ${It};
|
|
58
|
+
letter-spacing: ${Bt};
|
|
59
|
+
line-height: ${At};
|
|
60
|
+
text-transform: ${Ft};
|
|
61
61
|
}
|
|
62
|
-
`,
|
|
62
|
+
`,ai=e.css`
|
|
63
63
|
.ft-typography--caption {
|
|
64
|
-
font-family: ${
|
|
65
|
-
font-size: ${
|
|
66
|
-
font-weight: ${
|
|
67
|
-
letter-spacing: ${
|
|
68
|
-
line-height: ${
|
|
69
|
-
text-transform: ${
|
|
64
|
+
font-family: ${Mt};
|
|
65
|
+
font-size: ${Ut};
|
|
66
|
+
font-weight: ${_t};
|
|
67
|
+
letter-spacing: ${Rt};
|
|
68
|
+
line-height: ${Zt};
|
|
69
|
+
text-transform: ${Wt};
|
|
70
70
|
}
|
|
71
|
-
`,
|
|
71
|
+
`,li=e.css`
|
|
72
72
|
.ft-typography--breadcrumb {
|
|
73
|
-
font-family: ${
|
|
74
|
-
font-size: ${
|
|
75
|
-
font-weight: ${
|
|
76
|
-
letter-spacing: ${
|
|
77
|
-
line-height: ${
|
|
78
|
-
text-transform: ${
|
|
73
|
+
font-family: ${Lt};
|
|
74
|
+
font-size: ${Dt};
|
|
75
|
+
font-weight: ${Pt};
|
|
76
|
+
letter-spacing: ${Gt};
|
|
77
|
+
line-height: ${Kt};
|
|
78
|
+
text-transform: ${Ht};
|
|
79
79
|
}
|
|
80
|
-
`,
|
|
80
|
+
`,hi=e.css`
|
|
81
81
|
.ft-typography--overline {
|
|
82
|
-
font-family: ${
|
|
83
|
-
font-size: ${
|
|
84
|
-
font-weight: ${
|
|
85
|
-
letter-spacing: ${
|
|
86
|
-
line-height: ${
|
|
87
|
-
text-transform: ${
|
|
82
|
+
font-family: ${Vt};
|
|
83
|
+
font-size: ${Xt};
|
|
84
|
+
font-weight: ${qt};
|
|
85
|
+
letter-spacing: ${Yt};
|
|
86
|
+
line-height: ${Jt};
|
|
87
|
+
text-transform: ${Qt};
|
|
88
88
|
}
|
|
89
|
-
`,
|
|
89
|
+
`,pi=e.css`
|
|
90
90
|
.ft-typography--button {
|
|
91
|
-
font-family: ${
|
|
92
|
-
font-size: ${
|
|
93
|
-
font-weight: ${
|
|
94
|
-
letter-spacing: ${
|
|
95
|
-
line-height: ${
|
|
96
|
-
text-transform: ${
|
|
97
|
-
}
|
|
98
|
-
|
|
91
|
+
font-family: ${ti.fontFamily};
|
|
92
|
+
font-size: ${ti.fontSize};
|
|
93
|
+
font-weight: ${ti.fontWeight};
|
|
94
|
+
letter-spacing: ${ti.letterSpacing};
|
|
95
|
+
line-height: ${ti.lineHeight};
|
|
96
|
+
text-transform: ${ti.textTransform};
|
|
97
|
+
}
|
|
98
|
+
`,fi=e.css`
|
|
99
|
+
.ft-typography {
|
|
100
|
+
vertical-align: inherit;
|
|
101
|
+
}
|
|
102
|
+
`;var di=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.variant=q.body1}render(){return this.element?X`
|
|
99
103
|
<${H(this.element)}
|
|
100
104
|
class="ft-typography ft-typography--${this.variant}">
|
|
101
105
|
<slot></slot>
|
|
102
106
|
</${H(this.element)}>
|
|
103
107
|
`:X`
|
|
104
108
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
105
|
-
`}}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
109
|
+
`}}ci.styles=[ii,ei,oi,ni,si,ri,ai,li,hi,pi,fi],di([r.property()],ci.prototype,"element",void 0),di([r.property()],ci.prototype,"variant",void 0),i.customElement("ft-typography")(ci);const ui=i.FtCssVariableFactory.extend("--ft-reader-internal-link-outline-color",i.designSystemVariables.colorPrimary),gi=e.css`
|
|
110
|
+
a:focus {
|
|
111
|
+
outline-color: ${ui};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.ft-reader-link--remove-style {
|
|
115
|
+
text-decoration: none;
|
|
116
|
+
color: inherit;
|
|
117
|
+
}
|
|
118
|
+
`;var vi,xi,yi=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 bi extends f{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let i=n.classMap({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return e.html`
|
|
110
119
|
<a class=${i}
|
|
111
120
|
href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
|
|
112
121
|
@click=${t=>this.onClick(t)}>
|
|
113
122
|
<slot></slot>
|
|
114
123
|
</a>
|
|
115
|
-
`}onClick(t){var i;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(i=this.stateManager)||void 0===i||i.navigateToTopic(this.tocId,this.section,this.pageNumber)))}}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
124
|
+
`}onClick(t){var i;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(i=this.stateManager)||void 0===i||i.navigateToTopic(this.tocId,this.section,this.pageNumber)))}}bi.styles=gi,yi([r.property()],bi.prototype,"tocId",void 0),yi([r.property()],bi.prototype,"section",void 0),yi([r.property({type:Number})],bi.prototype,"pageNumber",void 0),yi([r.property({type:Boolean})],bi.prototype,"removeStyle",void 0),i.customElement("ft-reader-internal-link")(bi),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=""}(vi||(vi={})),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=""}(xi||(xi={})),new Map([...["abw"].map((t=>[t,xi.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,xi.AUDIO])),...["avi"].map((t=>[t,xi.AVI])),...["chm","xhs"].map((t=>[t,xi.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,xi.CODE])),...["csv"].map((t=>[t,xi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,xi.DITA])),...["epub"].map((t=>[t,xi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,xi.EXCEL])),...["flac"].map((t=>[t,xi.FLAC])),...["gif"].map((t=>[t,xi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,xi.GZIP])),...["html","htm","xhtml"].map((t=>[t,xi.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,xi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,xi.JPEG])),...["json"].map((t=>[t,xi.JSON])),...["m4a","m4p"].map((t=>[t,xi.M4A])),...["mov","qt"].map((t=>[t,xi.MOV])),...["mp3"].map((t=>[t,xi.MP3])),...["mp4","m4v"].map((t=>[t,xi.MP4])),...["ogg","oga"].map((t=>[t,xi.OGG])),...["pdf","ps"].map((t=>[t,xi.PDF])),...["png"].map((t=>[t,xi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,xi.POWERPOINT])),...["rar"].map((t=>[t,xi.RAR])),...["stp"].map((t=>[t,xi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,xi.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,xi.VIDEO])),...["wav"].map((t=>[t,xi.WAV])),...["wma"].map((t=>[t,xi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,xi.WORD])),...["xml","xsl","rdf"].map((t=>[t,xi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,xi.YAML])),...["zip"].map((t=>[t,xi.ZIP]))]);const mi={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")},$i=e.css`
|
|
125
|
+
:host {
|
|
126
|
+
display: inline-block;
|
|
127
|
+
}
|
|
119
128
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
129
|
+
:host, i.ft-icon {
|
|
130
|
+
width: ${mi.size};
|
|
131
|
+
height: ${mi.size};
|
|
132
|
+
text-align: center;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
i.ft-icon {
|
|
136
|
+
font-size: ${mi.size};
|
|
137
|
+
line-height: 1;
|
|
138
|
+
font-weight: normal;
|
|
139
|
+
text-transform: none;
|
|
140
|
+
font-style: normal;
|
|
141
|
+
font-variant: normal;
|
|
142
|
+
speak: none;
|
|
143
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
144
|
+
text-rendering: auto;
|
|
145
|
+
-webkit-font-smoothing: antialiased;
|
|
146
|
+
-moz-osx-font-smoothing: grayscale;
|
|
147
|
+
vertical-align: ${mi.verticalAlign};
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.ft-icon--fluid-topics {
|
|
151
|
+
font-family: ${mi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.ft-icon--file-format {
|
|
155
|
+
font-family: ${mi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.ft-icon--material {
|
|
159
|
+
font-family: ${mi.materialFontFamily}, "Material Icons", sans-serif;
|
|
160
|
+
}
|
|
161
|
+
`;var wi;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(wi||(wi={}));var ki=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 zi extends i.FtLitElement{constructor(){super(...arguments),this.variant=wi.fluid_topics,this.resolvedIcon=e.nothing}render(){const t="material"!==this.variant||this.value;return e.html`
|
|
125
162
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
126
163
|
${a.unsafeHTML(this.resolvedIcon)}
|
|
127
164
|
<slot ?hidden=${t}></slot>
|
|
128
165
|
</i>
|
|
129
|
-
`}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
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
166
|
+
`}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 wi.file_format:this.resolvedIcon=null!==(t=xi[o.toUpperCase()])&&void 0!==t?t:o;break;case wi.fluid_topics:this.resolvedIcon=null!==(i=vi[o.toUpperCase()])&&void 0!==i?i:o;break;default:this.resolvedIcon=this.value||e.nothing}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}zi.elementDefinitions={},zi.styles=$i,ki([r.property()],zi.prototype,"variant",void 0),ki([r.property()],zi.prototype,"value",void 0),ki([r.state()],zi.prototype,"resolvedIcon",void 0),ki([r.query("slot")],zi.prototype,"slottedContent",void 0),i.customElement("ft-icon")(zi);const Si=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),Ni={color:Si,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",Si),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")},Ci=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),Oi=Ci,ji=i.FtCssVariableFactory.extend("--ft-ripple-background-color",Ci),Ti=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),Ei=Ti,Ii=i.FtCssVariableFactory.extend("--ft-ripple-background-color",Ti),Bi=e.css`
|
|
167
|
+
:host {
|
|
168
|
+
display: contents;
|
|
169
|
+
}
|
|
133
170
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
171
|
+
.ft-ripple {
|
|
172
|
+
position: absolute;
|
|
173
|
+
inset: 0;
|
|
174
|
+
pointer-events: none;
|
|
175
|
+
}
|
|
139
176
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
font-weight: normal;
|
|
144
|
-
text-transform: none;
|
|
145
|
-
font-style: normal;
|
|
146
|
-
font-variant: normal;
|
|
147
|
-
speak: none;
|
|
148
|
-
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
149
|
-
text-rendering: auto;
|
|
150
|
-
-webkit-font-smoothing: antialiased;
|
|
151
|
-
-moz-osx-font-smoothing: grayscale;
|
|
152
|
-
vertical-align: ${mi.verticalAlign};
|
|
153
|
-
}
|
|
177
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
178
|
+
overflow: hidden;
|
|
179
|
+
}
|
|
154
180
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
181
|
+
.ft-ripple .ft-ripple--background,
|
|
182
|
+
.ft-ripple .ft-ripple--effect {
|
|
183
|
+
position: absolute;
|
|
184
|
+
opacity: 0;
|
|
185
|
+
}
|
|
158
186
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
187
|
+
.ft-ripple .ft-ripple--background {
|
|
188
|
+
background-color: ${Ni.backgroundColor};
|
|
189
|
+
}
|
|
162
190
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
191
|
+
.ft-ripple .ft-ripple--effect {
|
|
192
|
+
background-color: ${Ni.color};
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
196
|
+
background-color: ${Ii};
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
200
|
+
background-color: ${Ei};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
204
|
+
background-color: ${ji};
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
208
|
+
background-color: ${Oi};
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.ft-ripple .ft-ripple--background {
|
|
212
|
+
top: 0;
|
|
213
|
+
left: 0;
|
|
214
|
+
height: 100%;
|
|
215
|
+
width: 100%;
|
|
216
|
+
transition: opacity 75ms linear;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.ft-ripple .ft-ripple--effect,
|
|
220
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
221
|
+
border-radius: 50%;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.ft-ripple .ft-ripple--effect {
|
|
225
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
226
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
230
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
231
|
+
left: 50%;
|
|
232
|
+
top: 50%;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
236
|
+
transform: translate(-50%, -50%);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
240
|
+
opacity: ${Ni.opacityContentOnSurfaceHover};
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
244
|
+
opacity: ${Ni.opacityContentOnSurfaceSelected};
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
248
|
+
opacity: ${Ni.opacityContentOnSurfaceFocused};
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
252
|
+
opacity: ${Ni.opacityContentOnSurfacePressed};
|
|
253
|
+
transform: translate(-50%, -50%) scale(1);
|
|
254
|
+
}
|
|
255
|
+
`;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.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`
|
|
167
256
|
<style>
|
|
168
257
|
.ft-ripple .ft-ripple--effect,
|
|
169
258
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -180,96 +269,39 @@ const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
180
269
|
<div class="ft-ripple--background"></div>
|
|
181
270
|
<div class="ft-ripple--effect"></div>
|
|
182
271
|
</div>
|
|
183
|
-
`}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()}}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
.ft-ripple {
|
|
189
|
-
position: absolute;
|
|
190
|
-
inset: 0;
|
|
191
|
-
pointer-events: none;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
195
|
-
overflow: hidden;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.ft-ripple .ft-ripple--background,
|
|
199
|
-
.ft-ripple .ft-ripple--effect {
|
|
200
|
-
position: absolute;
|
|
201
|
-
opacity: 0;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.ft-ripple .ft-ripple--background {
|
|
205
|
-
background-color: ${zi.backgroundColor};
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.ft-ripple .ft-ripple--effect {
|
|
209
|
-
background-color: ${zi.color};
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
213
|
-
background-color: ${Ti};
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
217
|
-
background-color: ${ji};
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
221
|
-
background-color: ${Ci};
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
225
|
-
background-color: ${Ni};
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
.ft-ripple .ft-ripple--background {
|
|
229
|
-
top: 0;
|
|
230
|
-
left: 0;
|
|
231
|
-
height: 100%;
|
|
232
|
-
width: 100%;
|
|
233
|
-
transition: opacity 75ms linear;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.ft-ripple .ft-ripple--effect,
|
|
237
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
238
|
-
border-radius: 50%;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.ft-ripple .ft-ripple--effect {
|
|
242
|
-
transform: translate(-50%, -50%) scale(0.15);
|
|
243
|
-
transition: transform 300ms ease, opacity 75ms linear;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
247
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
248
|
-
left: 50%;
|
|
249
|
-
top: 50%;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
253
|
-
transform: translate(-50%, -50%);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
257
|
-
opacity: ${zi.opacityContentOnSurfaceHover};
|
|
258
|
-
}
|
|
272
|
+
`}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()}}Fi.elementDefinitions={},Fi.styles=Bi,Ai([r.property({type:Boolean})],Fi.prototype,"primary",void 0),Ai([r.property({type:Boolean})],Fi.prototype,"secondary",void 0),Ai([r.property({type:Boolean})],Fi.prototype,"unbounded",void 0),Ai([r.property({type:Boolean})],Fi.prototype,"activated",void 0),Ai([r.property({type:Boolean})],Fi.prototype,"selected",void 0),Ai([r.property({type:Boolean})],Fi.prototype,"disabled",void 0),Ai([r.state()],Fi.prototype,"hovered",void 0),Ai([r.state()],Fi.prototype,"focused",void 0),Ai([r.state()],Fi.prototype,"pressed",void 0),Ai([r.state()],Fi.prototype,"rippling",void 0),Ai([r.state()],Fi.prototype,"rippleSize",void 0),Ai([r.state()],Fi.prototype,"originX",void 0),Ai([r.state()],Fi.prototype,"originY",void 0),Ai([r.query(".ft-ripple")],Fi.prototype,"ripple",void 0),Ai([r.query(".ft-ripple--effect")],Fi.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(Fi);const Mi=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),Ui=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),_i=i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),Ri=i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),Zi=i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),Wi=i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),Li=e.css`
|
|
273
|
+
.ft-tooltip--container {
|
|
274
|
+
display: block;
|
|
275
|
+
position: relative;
|
|
276
|
+
}
|
|
259
277
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
278
|
+
.ft-tooltip--inline {
|
|
279
|
+
display: inline-block;
|
|
280
|
+
max-width: 100%;
|
|
281
|
+
}
|
|
263
282
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
283
|
+
.ft-tooltip {
|
|
284
|
+
position: absolute;
|
|
285
|
+
box-sizing: border-box;
|
|
286
|
+
overflow: hidden;
|
|
287
|
+
width: max-content;
|
|
288
|
+
max-width: ${Wi};
|
|
289
|
+
text-align: center;
|
|
290
|
+
padding: ${Mi};
|
|
291
|
+
z-index: ${Ri};
|
|
292
|
+
}
|
|
267
293
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
}
|
|
272
|
-
|
|
294
|
+
.ft-tooltip--content {
|
|
295
|
+
padding: 4px 8px;
|
|
296
|
+
border-radius: ${Zi};
|
|
297
|
+
background-color: ${_i};
|
|
298
|
+
color: ${Ui};
|
|
299
|
+
top: -500px;
|
|
300
|
+
left: -500px;
|
|
301
|
+
position: relative;
|
|
302
|
+
word-break: break-word;
|
|
303
|
+
}
|
|
304
|
+
`;var Di=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 Pi 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`
|
|
273
305
|
<div part="container"
|
|
274
306
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
275
307
|
@mouseenter=${this.onHover}
|
|
@@ -285,248 +317,216 @@ const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
285
317
|
</div>
|
|
286
318
|
<slot></slot>
|
|
287
319
|
</div>
|
|
288
|
-
`}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, ${
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
320
|
+
`}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, ${Wi})`}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())}}Pi.elementDefinitions={"ft-typography":ci},Pi.styles=Li,Di([r.property()],Pi.prototype,"text",void 0),Di([r.property({type:Boolean})],Pi.prototype,"manual",void 0),Di([r.property({type:Boolean})],Pi.prototype,"inline",void 0),Di([r.property({type:Number})],Pi.prototype,"delay",void 0),Di([r.property()],Pi.prototype,"position",void 0),Di([r.queryAssignedNodes("",!0)],Pi.prototype,"slotNodes",void 0),Di([r.query(".ft-tooltip--container")],Pi.prototype,"container",void 0),Di([r.query("slot")],Pi.prototype,"target",void 0),Di([r.query(".ft-tooltip")],Pi.prototype,"tooltip",void 0),Di([r.query(".ft-tooltip--content")],Pi.prototype,"tooltipContent",void 0),Di([r.state()],Pi.prototype,"visible",void 0),i.customElement("ft-tooltip")(Pi);const Gi={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Ki=e.css`
|
|
321
|
+
:host {
|
|
322
|
+
line-height: 0;
|
|
323
|
+
}
|
|
293
324
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
}
|
|
325
|
+
.ft-loader {
|
|
326
|
+
display: inline-block;
|
|
327
|
+
position: relative;
|
|
298
328
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
overflow: hidden;
|
|
303
|
-
width: max-content;
|
|
304
|
-
max-width: ${_i};
|
|
305
|
-
text-align: center;
|
|
306
|
-
padding: ${Bi};
|
|
307
|
-
z-index: ${Mi};
|
|
308
|
-
}
|
|
329
|
+
width: ${Gi.size};
|
|
330
|
+
height: ${Gi.size};
|
|
331
|
+
}
|
|
309
332
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
333
|
+
.ft-loader div {
|
|
334
|
+
position: absolute;
|
|
335
|
+
top: 37.5%;
|
|
336
|
+
width: 25%;
|
|
337
|
+
height: 25%;
|
|
338
|
+
border-radius: 50%;
|
|
339
|
+
background: ${Gi.color};
|
|
340
|
+
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.ft-loader div:nth-child(1) {
|
|
344
|
+
left: 2.5%;
|
|
345
|
+
animation: appear 0.6s infinite;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.ft-loader div:nth-child(2) {
|
|
349
|
+
left: 2.5%;
|
|
350
|
+
animation: move 0.6s infinite;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.ft-loader div:nth-child(3) {
|
|
354
|
+
left: 37.5%;
|
|
355
|
+
animation: move 0.6s infinite;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.ft-loader div:nth-child(4) {
|
|
359
|
+
left: 72.5%;
|
|
360
|
+
animation: disappear 0.6s infinite;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
@keyframes appear {
|
|
364
|
+
0% {
|
|
365
|
+
transform: scale(0);
|
|
319
366
|
}
|
|
320
|
-
|
|
321
|
-
:
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
.ft-loader {
|
|
326
|
-
display: inline-block;
|
|
327
|
-
position: relative;
|
|
328
|
-
|
|
329
|
-
width: ${Zi.size};
|
|
330
|
-
height: ${Zi.size};
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
.ft-loader div {
|
|
334
|
-
position: absolute;
|
|
335
|
-
top: 37.5%;
|
|
336
|
-
width: 25%;
|
|
337
|
-
height: 25%;
|
|
338
|
-
border-radius: 50%;
|
|
339
|
-
background: ${Zi.color};
|
|
340
|
-
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
.ft-loader div:nth-child(1) {
|
|
344
|
-
left: 2.5%;
|
|
345
|
-
animation: appear 0.6s infinite;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
.ft-loader div:nth-child(2) {
|
|
349
|
-
left: 2.5%;
|
|
350
|
-
animation: move 0.6s infinite;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.ft-loader div:nth-child(3) {
|
|
354
|
-
left: 37.5%;
|
|
355
|
-
animation: move 0.6s infinite;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
.ft-loader div:nth-child(4) {
|
|
359
|
-
left: 72.5%;
|
|
360
|
-
animation: disappear 0.6s infinite;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
@keyframes appear {
|
|
364
|
-
0% {
|
|
365
|
-
transform: scale(0);
|
|
366
|
-
}
|
|
367
|
-
100% {
|
|
368
|
-
transform: scale(1);
|
|
369
|
-
}
|
|
370
|
-
}
|
|
367
|
+
100% {
|
|
368
|
+
transform: scale(1);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
371
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
372
|
+
@keyframes disappear {
|
|
373
|
+
0% {
|
|
374
|
+
transform: scale(1);
|
|
375
|
+
}
|
|
376
|
+
100% {
|
|
377
|
+
transform: scale(0);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
380
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
381
|
+
@keyframes move {
|
|
382
|
+
0% {
|
|
383
|
+
transform: translate(0, 0);
|
|
384
|
+
}
|
|
385
|
+
100% {
|
|
386
|
+
transform: translate(calc(0.35 * ${Gi.size}), 0);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
`;class Hi extends i.FtLitElement{render(){return e.html`
|
|
390
390
|
<div class="ft-loader">
|
|
391
391
|
<div></div>
|
|
392
392
|
<div></div>
|
|
393
393
|
<div></div>
|
|
394
394
|
<div></div>
|
|
395
395
|
</div>
|
|
396
|
-
`}}i.customElement("ft-loader")(
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
396
|
+
`}}Hi.styles=Ki,i.customElement("ft-loader")(Hi);const Vi=i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorPrimary),Xi={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:Vi,fontSize:i.FtCssVariableFactory.extend("--ft-button-font-size",ti.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariableFactory.extend("--ft-button-ripple-color",Vi),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},qi=i.FtCssVariableFactory.extend("--ft-button-primary-color",i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),Yi={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-primary-background-color",i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:qi,rippleColor:i.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",qi)},Ji=i.FtCssVariableFactory.extend("--ft-button-dense-border-radius",i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM)),Qi=[i.noTextSelect,e.css`
|
|
397
|
+
:host {
|
|
398
|
+
display: inline-block;
|
|
399
|
+
max-width: 100%;
|
|
400
|
+
pointer-events: none;
|
|
401
|
+
}
|
|
402
402
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
403
|
+
button {
|
|
404
|
+
box-shadow: 0px 0px 0px transparent;
|
|
405
|
+
border: 0px solid transparent;
|
|
406
|
+
text-shadow: 0px 0px 0px transparent;
|
|
407
|
+
font-size: ${Xi.fontSize};
|
|
408
|
+
}
|
|
409
409
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
410
|
+
button:hover {
|
|
411
|
+
box-shadow: 0px 0px 0px transparent;
|
|
412
|
+
border: 0px solid transparent;
|
|
413
|
+
text-shadow: 0px 0px 0px transparent;
|
|
414
|
+
}
|
|
415
415
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
416
|
+
button:active {
|
|
417
|
+
outline: none;
|
|
418
|
+
border: none;
|
|
419
|
+
}
|
|
420
420
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
421
|
+
button:focus {
|
|
422
|
+
outline: 0;
|
|
423
|
+
}
|
|
424
424
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
--ft-button-internal-line-height: calc(${Pi.fontSize} + 2px);
|
|
437
|
-
--ft-button-internal-color: ${Pi.color};
|
|
438
|
-
${i.setVariable(mi.size,Pi.iconSize)};
|
|
439
|
-
--ft-button-internal-vertical-padding: 6px;
|
|
440
|
-
--ft-button-internal-horizontal-padding: 8px;
|
|
441
|
-
${i.setVariable(zi.color,Pi.rippleColor)};
|
|
442
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Pi.iconSize});
|
|
443
|
-
|
|
444
|
-
border-radius: ${Pi.borderRadius};
|
|
445
|
-
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
446
|
-
background-color: ${Pi.backgroundColor};
|
|
447
|
-
color: var(--ft-button-internal-color);
|
|
448
|
-
-webkit-mask-image: radial-gradient(white, black);
|
|
449
|
-
}
|
|
425
|
+
.ft-button {
|
|
426
|
+
position: relative;
|
|
427
|
+
display: flex;
|
|
428
|
+
justify-content: center;
|
|
429
|
+
align-items: center;
|
|
430
|
+
width: 100%;
|
|
431
|
+
overflow: hidden;
|
|
432
|
+
box-sizing: border-box;
|
|
433
|
+
border: none;
|
|
434
|
+
pointer-events: auto;
|
|
450
435
|
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
436
|
+
--ft-button-internal-line-height: calc(${Xi.fontSize} + 2px);
|
|
437
|
+
--ft-button-internal-color: ${Xi.color};
|
|
438
|
+
${i.setVariable(mi.size,Xi.iconSize)};
|
|
439
|
+
--ft-button-internal-vertical-padding: 6px;
|
|
440
|
+
--ft-button-internal-horizontal-padding: 8px;
|
|
441
|
+
${i.setVariable(Ni.color,Xi.rippleColor)};
|
|
442
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Xi.iconSize});
|
|
454
443
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
444
|
+
border-radius: ${Xi.borderRadius};
|
|
445
|
+
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
446
|
+
background-color: ${Xi.backgroundColor};
|
|
447
|
+
color: var(--ft-button-internal-color);
|
|
448
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
449
|
+
}
|
|
460
450
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
451
|
+
.ft-button:not([disabled]):hover {
|
|
452
|
+
cursor: pointer;
|
|
453
|
+
}
|
|
464
454
|
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
455
|
+
.ft-button--dense {
|
|
456
|
+
--ft-button-internal-vertical-padding: 2px;
|
|
457
|
+
--ft-button-internal-horizontal-padding: 4px;
|
|
458
|
+
border-radius: ${Ji};
|
|
459
|
+
}
|
|
469
460
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
${i.setVariable(zi.color,Ki.rippleColor)};
|
|
474
|
-
}
|
|
461
|
+
.ft-button--round {
|
|
462
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + var(--ft-button-internal-vertical-padding));
|
|
463
|
+
}
|
|
475
464
|
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
465
|
+
.ft-button[disabled] {
|
|
466
|
+
filter: grayscale(1);
|
|
467
|
+
opacity: ${Xi.opacityDisabled};
|
|
468
|
+
}
|
|
480
469
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
470
|
+
.ft-button.ft-button--primary {
|
|
471
|
+
background-color: ${Yi.backgroundColor};
|
|
472
|
+
--ft-button-internal-color: ${Yi.color};
|
|
473
|
+
${i.setVariable(Ni.color,Yi.rippleColor)};
|
|
474
|
+
}
|
|
484
475
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
text-overflow: ellipsis;
|
|
490
|
-
display: block;
|
|
491
|
-
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
492
|
-
${i.setVariable(ii.fontSize,"1em")};
|
|
493
|
-
${i.setVariable(ii.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
494
|
-
}
|
|
476
|
+
.ft-button.ft-button--outlined {
|
|
477
|
+
border: 1px solid var(--ft-button-internal-color);
|
|
478
|
+
padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
|
|
479
|
+
}
|
|
495
480
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
481
|
+
.ft-button:focus {
|
|
482
|
+
outline: none;
|
|
483
|
+
}
|
|
499
484
|
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
485
|
+
.ft-button--label {
|
|
486
|
+
position: relative;
|
|
487
|
+
overflow: hidden;
|
|
488
|
+
white-space: nowrap;
|
|
489
|
+
text-overflow: ellipsis;
|
|
490
|
+
display: block;
|
|
491
|
+
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
492
|
+
${i.setVariable(ti.fontSize,"1em")};
|
|
493
|
+
${i.setVariable(ti.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
494
|
+
}
|
|
505
495
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
496
|
+
.ft-button--safari-fix .ft-button--label {
|
|
497
|
+
margin-right: 0;
|
|
498
|
+
}
|
|
509
499
|
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
500
|
+
.ft-button--safari-fix .ft-button--label:after {
|
|
501
|
+
content: "\\0000a0";
|
|
502
|
+
display: inline-block;
|
|
503
|
+
width: 0;
|
|
504
|
+
}
|
|
514
505
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
}
|
|
506
|
+
.ft-button--label[hidden] {
|
|
507
|
+
display: none;
|
|
508
|
+
}
|
|
519
509
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
510
|
+
ft-icon {
|
|
511
|
+
flex-shrink: 0;
|
|
512
|
+
position: relative;
|
|
513
|
+
}
|
|
524
514
|
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
515
|
+
.ft-button--label[hidden] + ft-icon {
|
|
516
|
+
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
517
|
+
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
521
|
+
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
522
|
+
order: -1;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
ft-loader {
|
|
526
|
+
${i.setVariable(Gi.size,Xi.iconSize)};
|
|
527
|
+
${i.setVariable(Gi.color,"var(--ft-button-internal-color)")};
|
|
528
|
+
}
|
|
529
|
+
`];var te,ie=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 ee 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=wi.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`
|
|
530
530
|
<button part="button"
|
|
531
531
|
class="${n.classMap(t)}"
|
|
532
532
|
aria-label="${this.getLabel()}"
|
|
@@ -548,41 +548,73 @@ const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
548
548
|
</ft-tooltip>
|
|
549
549
|
`}resolveIcon(){return this.loading?e.html`
|
|
550
550
|
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
551
|
-
<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}}
|
|
551
|
+
<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}}ee.elementDefinitions={"ft-ripple":Fi,"ft-tooltip":Pi,"ft-typography":ci,"ft-icon":zi,"ft-loader":Hi},ee.styles=Qi,ie([r.property({type:Boolean})],ee.prototype,"primary",void 0),ie([r.property({type:Boolean})],ee.prototype,"outlined",void 0),ie([r.property({type:Boolean})],ee.prototype,"disabled",void 0),ie([r.property({type:Boolean})],ee.prototype,"dense",void 0),ie([r.property({type:Boolean})],ee.prototype,"round",void 0),ie([r.property({type:String})],ee.prototype,"label",void 0),ie([r.property({type:String})],ee.prototype,"icon",void 0),ie([r.property({type:String})],ee.prototype,"iconVariant",void 0),ie([r.property({type:Boolean})],ee.prototype,"trailingIcon",void 0),ie([r.property({type:Boolean})],ee.prototype,"loading",void 0),ie([r.property({type:String})],ee.prototype,"tooltipPosition",void 0),ie([r.property({type:Boolean})],ee.prototype,"hideTooltip",void 0),ie([r.query(".ft-button")],ee.prototype,"button",void 0),ie([r.query(".ft-button--label slot")],ee.prototype,"slottedContent",void 0),i.customElement("ft-button")(ee),function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(te||(te={}));const oe=e.css`
|
|
552
|
+
.ft-size-watcher--pixel {
|
|
553
|
+
width: 0;
|
|
554
|
+
height: 0;
|
|
555
|
+
overflow: hidden;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.ft-size-watcher--pixel.ft-size-watcher--local {
|
|
559
|
+
width: 100%;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.ft-size-watcher--watcher {
|
|
563
|
+
height: 1px;
|
|
564
|
+
width: 100vw;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
568
|
+
width: 100%;
|
|
569
|
+
}
|
|
570
|
+
`;var ne=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 se extends CustomEvent{constructor(t,i){super("change",{detail:{size:t,category:i}})}}class re extends i.FtLitElement{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=te.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new i.Debouncer}render(){return e.html`
|
|
552
571
|
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
553
572
|
<div class="ft-size-watcher--watcher"></div>
|
|
554
573
|
</div>
|
|
555
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
overflow: hidden;
|
|
560
|
-
}
|
|
574
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=te.S:this.size<976?this.category=te.M:this.size<1024?this.category=te.L:this.size<1440?this.category=te.XL:this.category=te.XXL,this.dispatchEvent(new se(this.size,this.category)))}),this.debounceTimeout)}}re.elementDefinitions={},re.styles=oe,ne([r.property({type:Number})],re.prototype,"debounceTimeout",void 0),ne([r.property({type:Boolean})],re.prototype,"local",void 0),ne([r.property({type:Number,reflect:!0})],re.prototype,"size",void 0),ne([r.property({type:String,reflect:!0})],re.prototype,"category",void 0),ne([r.query(".ft-size-watcher--watcher")],re.prototype,"watcher",void 0),i.customElement("ft-size-watcher")(re);const ae={expand:"Expand {0}",collapse:"Collapse {0}"},le={tabulationSize:i.FtCssVariableFactory.create("--ft-reader-toc-tabulation-size","SIZE","16px"),verticalSpacing:i.FtCssVariableFactory.create("--ft-reader-toc-vertical-spacing","SIZE","4px"),textColor:i.FtCssVariableFactory.extend("--ft-reader-toc-text-color",i.designSystemVariables.colorOnSurface),highlightedTextColor:i.FtCssVariableFactory.extend("--ft-reader-toc-highlighted-text-color",i.designSystemVariables.colorPrimary),highlightedFontWeight:i.FtCssVariableFactory.create("--ft-reader-toc-highlighted-font-weight","UNKNOWN","bold"),highlightedBackgroundColor:i.FtCssVariableFactory.create("--ft-reader-toc-highlighted-background-color","COLOR","transparent"),iconFontSize:i.FtCssVariableFactory.create("--ft-reader-toc-icon-font-size","SIZE","16px")},he=e.css`
|
|
575
|
+
.ft-reader-toc {
|
|
576
|
+
color: ${le.textColor};
|
|
577
|
+
}
|
|
561
578
|
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
}
|
|
579
|
+
.ft-reader-toc--node-highlighted > .ft-reader-toc--link-container {
|
|
580
|
+
background-color: ${le.highlightedBackgroundColor};
|
|
581
|
+
color: ${le.highlightedTextColor};
|
|
582
|
+
${i.setVariable(Q.fontWeight,le.highlightedFontWeight)}
|
|
583
|
+
}
|
|
565
584
|
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
}
|
|
585
|
+
.ft-reader-toc--link-container {
|
|
586
|
+
display: flex;
|
|
587
|
+
gap: 4px;
|
|
588
|
+
padding: ${le.verticalSpacing} 4px; /* left padding is override on inline style */
|
|
589
|
+
align-items: center;
|
|
590
|
+
}
|
|
570
591
|
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
}
|
|
574
|
-
|
|
592
|
+
.ft-reader-toc-mobile .ft-reader-toc--toggle-container {
|
|
593
|
+
flex-shrink: 0;
|
|
594
|
+
width: calc(${le.iconFontSize} + 12px); /*--ft-button-internal-horizontal-padding: 8px; in ft-button NOT dense*/
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.ft-reader-toc-desktop .ft-reader-toc--toggle-container {
|
|
598
|
+
flex-shrink: 0;
|
|
599
|
+
width: calc(${le.iconFontSize} + 4px); /*--ft-button-internal-horizontal-padding: 4px; in ft-button dense*/
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
ft-button {
|
|
603
|
+
${i.setVariable(Xi.iconSize,le.iconFontSize)};
|
|
604
|
+
${i.setVariable(Xi.backgroundColor,"transparent")};
|
|
605
|
+
}
|
|
606
|
+
`;var pe=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 fe extends f{constructor(){super(...arguments),this.expanded=!1,this.iconVariant=wi.fluid_topics,this.collapseIcon="MINUS",this.expandIcon="PLUS",this.autoCollapse=!1,this.labels={},this.labelResolver=new i.ParametrizedLabelResolver(ae,{}),this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set,this.viewportSize=te.M}update(t){var e,o;super.update(t),t.has("labels")&&(this.labelResolver=new i.ParametrizedLabelResolver(ae,this.labels)),!this.expanded&&["splitToc","visibleTopics","currentPage","toc"].some((i=>t.has(i)))&&(this.automaticallyExpandedNodes=this.buildAutomaticallyExpandedNodes(this.splitToc?[null===(e=this.currentPage)||void 0===e?void 0:e.rootTocId]:null!==(o=this.visibleTopics)&&void 0!==o?o:[]))}render(){var t;const i={"ft-reader-toc":!0,"ft-reader-toc-mobile":this.viewportSize===te.S,"ft-reader-toc-desktop":this.viewportSize!==te.S};return e.html`
|
|
575
607
|
<div class=${n.classMap(i)}>
|
|
576
608
|
<ft-size-watcher @change=${this.onViewportSizeChange}></ft-size-watcher>
|
|
577
609
|
${o.repeat(null!==(t=this.toc)&&void 0!==t?t:[],(t=>t.tocId),(t=>this.renderNode(t)))}
|
|
578
610
|
</div>
|
|
579
|
-
`}renderNode(t){var i,n;const r=this.splitToc&&null!=t.page&&!t.page.onItsOwn,a=this.splitToc?(null===(i=this.currentPage)||void 0===i?void 0:i.rootTocId)===t.tocId:null===(n=this.visibleTopics)||void 0===n?void 0:n.includes(t.tocId),l=this.expanded||this.manuallyExpandedNodes.has(t.tocId)||this.automaticallyExpandedNodes.has(t.tocId)&&!this.manuallyCollapsedNodes.has(t.tocId),h=!r&&t.children.length>0,p=h&&!this.expanded,f={"padding-left":`calc( ${
|
|
611
|
+
`}renderNode(t){var i,n;const r=this.splitToc&&null!=t.page&&!t.page.onItsOwn,a=this.splitToc?(null===(i=this.currentPage)||void 0===i?void 0:i.rootTocId)===t.tocId:null===(n=this.visibleTopics)||void 0===n?void 0:n.includes(t.tocId),l=this.expanded||this.manuallyExpandedNodes.has(t.tocId)||this.automaticallyExpandedNodes.has(t.tocId)&&!this.manuallyCollapsedNodes.has(t.tocId),h=!r&&t.children.length>0,p=h&&!this.expanded,f={"padding-left":`calc( ${le.tabulationSize} * ${t.depth-1} + 4px)`};return e.html`
|
|
580
612
|
<div class="ft-reader-toc--node ${a?"ft-reader-toc--node-highlighted":""}">
|
|
581
613
|
<div class="ft-reader-toc--link-container" data-depth="${t.depth}" style=${s.styleMap(f)}>
|
|
582
614
|
<div class="ft-reader-toc--toggle-container">
|
|
583
615
|
${p?e.html`
|
|
584
616
|
<ft-button round hideTooltip
|
|
585
|
-
?dense=${this.viewportSize!==
|
|
617
|
+
?dense=${this.viewportSize!==te.S}
|
|
586
618
|
label="${this.labelResolver.resolve(l?"collapse":"expand",t.title)}"
|
|
587
619
|
iconVariant="${this.iconVariant}"
|
|
588
620
|
icon="${l?this.collapseIcon:this.expandIcon}"
|
|
@@ -604,36 +636,4 @@ const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
604
636
|
</div>
|
|
605
637
|
`:e.nothing}
|
|
606
638
|
</div>
|
|
607
|
-
`}buildAutomaticallyExpandedNodes(t){var i,e;let o=new Set(this.autoCollapse?[]:this.automaticallyExpandedNodes);for(let n of t)for(;n&&!o.has(n);)o.add(n),this.manuallyCollapsedNodes.delete(n),n=null===(e=null===(i=this.service)||void 0===i?void 0:i.getTocNodeOrThrow(n))||void 0===e?void 0:e.parentTocId;return o}manuallyToggle(t,i){i?(this.manuallyCollapsedNodes.add(t),this.manuallyExpandedNodes.delete(t)):(this.manuallyExpandedNodes.add(t),this.manuallyCollapsedNodes.delete(t)),this.requestUpdate()}onViewportSizeChange(t){this.viewportSize=t.detail.category}}
|
|
608
|
-
.ft-reader-toc {
|
|
609
|
-
color: ${ie.textColor};
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
.ft-reader-toc--node-highlighted > .ft-reader-toc--link-container {
|
|
613
|
-
background-color: ${ie.highlightedBackgroundColor};
|
|
614
|
-
color: ${ie.highlightedTextColor};
|
|
615
|
-
${i.setVariable(tt.fontWeight,ie.highlightedFontWeight)}
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
.ft-reader-toc--link-container {
|
|
619
|
-
display: flex;
|
|
620
|
-
gap: 4px;
|
|
621
|
-
padding: ${ie.verticalSpacing} 4px; /* left padding is override on inline style */
|
|
622
|
-
align-items: center;
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
.ft-reader-toc-mobile .ft-reader-toc--toggle-container {
|
|
626
|
-
flex-shrink: 0;
|
|
627
|
-
width: calc(${ie.iconFontSize} + 12px); /*--ft-button-internal-horizontal-padding: 8px; in ft-button NOT dense*/
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
.ft-reader-toc-desktop .ft-reader-toc--toggle-container {
|
|
631
|
-
flex-shrink: 0;
|
|
632
|
-
width: calc(${ie.iconFontSize} + 4px); /*--ft-button-internal-horizontal-padding: 4px; in ft-button dense*/
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
ft-button {
|
|
636
|
-
${i.setVariable(Pi.iconSize,ie.iconFontSize)};
|
|
637
|
-
${i.setVariable(Pi.backgroundColor,"transparent")};
|
|
638
|
-
}
|
|
639
|
-
`,Qi([r.property({type:Boolean})],ee.prototype,"expanded",void 0),Qi([r.property()],ee.prototype,"iconVariant",void 0),Qi([r.property()],ee.prototype,"collapseIcon",void 0),Qi([r.property()],ee.prototype,"expandIcon",void 0),Qi([r.property({type:Boolean})],ee.prototype,"autoCollapse",void 0),Qi([i.jsonProperty({})],ee.prototype,"labels",void 0),Qi([i.redux()],ee.prototype,"toc",void 0),Qi([i.redux((t=>{var i;return null===(i=t.map)||void 0===i?void 0:i.shouldSplitCurrentPageToc}))],ee.prototype,"splitToc",void 0),Qi([i.redux()],ee.prototype,"currentPage",void 0),Qi([i.redux()],ee.prototype,"visibleTopics",void 0),Qi([r.state({hasChanged:(t,e)=>!i.deepEqual(t,e)})],ee.prototype,"automaticallyExpandedNodes",void 0),Qi([r.state({hasChanged:(t,e)=>!i.deepEqual(t,e)})],ee.prototype,"manuallyExpandedNodes",void 0),Qi([r.state({hasChanged:(t,e)=>!i.deepEqual(t,e)})],ee.prototype,"manuallyCollapsedNodes",void 0),Qi([r.state()],ee.prototype,"viewportSize",void 0),i.customElement("ft-reader-toc")(ee),t.DEFAULT_LABELS=te,t.FtReaderToc=ee,t.FtReaderTocCssVariables=ie,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litStyleMap,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML);
|
|
639
|
+
`}buildAutomaticallyExpandedNodes(t){var i,e;let o=new Set(this.autoCollapse?[]:this.automaticallyExpandedNodes);for(let n of t)for(;n&&!o.has(n);)o.add(n),this.manuallyCollapsedNodes.delete(n),n=null===(e=null===(i=this.service)||void 0===i?void 0:i.getTocNodeOrThrow(n))||void 0===e?void 0:e.parentTocId;return o}manuallyToggle(t,i){i?(this.manuallyCollapsedNodes.add(t),this.manuallyExpandedNodes.delete(t)):(this.manuallyExpandedNodes.add(t),this.manuallyCollapsedNodes.delete(t)),this.requestUpdate()}onViewportSizeChange(t){this.viewportSize=t.detail.category}}fe.elementDefinitions={"ft-button":ee,"ft-reader-internal-link":bi,"ft-size-watcher":re,"ft-typography":ci},fe.styles=he,pe([r.property({type:Boolean})],fe.prototype,"expanded",void 0),pe([r.property()],fe.prototype,"iconVariant",void 0),pe([r.property()],fe.prototype,"collapseIcon",void 0),pe([r.property()],fe.prototype,"expandIcon",void 0),pe([r.property({type:Boolean})],fe.prototype,"autoCollapse",void 0),pe([i.jsonProperty({})],fe.prototype,"labels",void 0),pe([i.redux()],fe.prototype,"toc",void 0),pe([i.redux((t=>{var i;return null===(i=t.map)||void 0===i?void 0:i.shouldSplitCurrentPageToc}))],fe.prototype,"splitToc",void 0),pe([i.redux()],fe.prototype,"currentPage",void 0),pe([i.redux()],fe.prototype,"visibleTopics",void 0),pe([r.state({hasChanged:(t,e)=>!i.deepEqual(t,e)})],fe.prototype,"automaticallyExpandedNodes",void 0),pe([r.state({hasChanged:(t,e)=>!i.deepEqual(t,e)})],fe.prototype,"manuallyExpandedNodes",void 0),pe([r.state({hasChanged:(t,e)=>!i.deepEqual(t,e)})],fe.prototype,"manuallyCollapsedNodes",void 0),pe([r.state()],fe.prototype,"viewportSize",void 0),i.customElement("ft-reader-toc")(fe),t.DEFAULT_LABELS=ae,t.FtReaderToc=fe,t.FtReaderTocCssVariables=le,t.styles=he,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litStyleMap,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML);
|