@fluid-topics/ft-reader-toc 1.0.57 → 1.0.58
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.light.js +161 -161
- package/build/ft-reader-toc.min.js +179 -179
- package/package.json +7 -7
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
!function(t,e,i,o,n,s,r,l){var a=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class
|
|
1
|
+
!function(t,e,i,o,n,s,r,l){var a;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS"}(a||(a={}));var h=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class p extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const d=Symbol("registerInterval");class f extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[d]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[d]):this.dispatchEvent(new p)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=d,h([r.state()],i.prototype,"stateManager",void 0),i}(e.FtLitElementRedux)){}
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/var
|
|
6
|
+
*/var c;const u=window,x=u.trustedTypes,g=x?x.createPolicy("lit-html",{createHTML:t=>t}):void 0,v="$lit$",y=`lit$${(Math.random()+"").slice(9)}$`,b="?"+y,m=`<${b}>`,$=document,w=()=>$.createComment(""),k=t=>null===t||"object"!=typeof t&&"function"!=typeof t,z=Array.isArray,S="[ \t\n\f\r]",C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,I=/>/g,O=RegExp(`>|${S}(?:([^\\s"'>=/]+)(${S}*=${S}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),A=/'/g,E=/"/g,j=/^(?:script|style|textarea|title)$/i,T=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),B=Symbol.for("lit-noChange"),L=Symbol.for("lit-nothing"),M=new WeakMap,F=$.createTreeWalker($,129,null,!1),_=(t,e)=>{const i=t.length-1,o=[];let n,s=2===e?"<svg>":"",r=C;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,p=0;for(;p<i.length&&(r.lastIndex=p,a=r.exec(i),null!==a);)p=r.lastIndex,r===C?"!--"===a[1]?r=N:void 0!==a[1]?r=I:void 0!==a[2]?(j.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=O):void 0!==a[3]&&(r=O):r===O?">"===a[0]?(r=null!=n?n:C,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?O:'"'===a[3]?E:A):r===E||r===A?r=O:r===N||r===I?r=C:(r=O,n=void 0);const d=r===O&&t[e+1].startsWith("/>")?" ":"";s+=r===C?i+m:h>=0?(o.push(l),i.slice(0,h)+v+i.slice(h)+y+d):i+y+(-2===h?(o.push(void 0),e):d)}const l=s+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==g?g.createHTML(l):l,o]};class U{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,s=0;const r=t.length-1,l=this.parts,[a,h]=_(t,e);if(this.el=U.createElement(a,i),F.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=F.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(v)||e.startsWith(y)){const i=h[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+v).split(y),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?D:"?"===e[1]?H:"@"===e[1]?G:W})}else l.push({type:6,index:n})}for(const e of t)o.removeAttribute(e)}if(j.test(o.tagName)){const t=o.textContent.split(y),e=t.length-1;if(e>0){o.textContent=x?x.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],w()),F.nextNode(),l.push({type:2,index:++n});o.append(t[e],w())}}}else if(8===o.nodeType)if(o.data===b)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(y,t+1));)l.push({type:7,index:n}),t+=y.length-1}n++}}static createElement(t,e){const i=$.createElement("template");return i.innerHTML=t,i}}function Z(t,e,i=t,o){var n,s,r,l;if(e===B)return e;let a=void 0!==o?null===(n=i._$Co)||void 0===n?void 0:n[o]:i._$Cl;const h=k(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(s=null==a?void 0:a._$AO)||void 0===s||s.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,i,o)),void 0!==o?(null!==(r=(l=i)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=Z(t,a._$AS(t,e.values),a,o)),e}class P{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:$).importNode(i,!0);F.currentNode=n;let s=F.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new R(s,s.nextSibling,this,t):1===a.type?e=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(e=new V(s,this,t)),this._$AV.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(s=F.nextNode(),r++)}return n}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class R{constructor(t,e,i,o){var n;this.type=2,this._$AH=L,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),k(t)?t===L||null==t||""===t?(this._$AH!==L&&this._$AR(),this._$AH=L):t!==this._$AH&&t!==B&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>z(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==L&&k(this._$AH)?this._$AA.nextSibling.data=t:this.$($.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=U.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.v(i);else{const t=new P(n,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=M.get(t.strings);return void 0===e&&M.set(t.strings,e=new U(t)),e}T(t){z(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new R(this.k(w()),this.k(w()),this,this.options)):i=e[o],i._$AI(n),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class W{constructor(t,e,i,o,n){this.type=1,this._$AH=L,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=L}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const n=this.strings;let s=!1;if(void 0===n)t=Z(this,t,e,0),s=!k(t)||t!==this._$AH&&t!==B,s&&(this._$AH=t);else{const o=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=Z(this,o[i+r],e,r),l===B&&(l=this._$AH[r]),s||(s=!k(l)||l!==this._$AH[r]),l===L?t=L:t!==L&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}s&&!o&&this.j(t)}j(t){t===L?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class D extends W{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===L?void 0:t}}const K=x?x.emptyScript:"";class H extends W{constructor(){super(...arguments),this.type=4}j(t){t&&t!==L?this.element.setAttribute(this.name,K):this.element.removeAttribute(this.name)}}class G extends W{constructor(t,e,i,o,n){super(t,e,i,o,n),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Z(this,t,e,0))&&void 0!==i?i:L)===B)return;const o=this._$AH,n=t===L&&o!==L||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==L&&(o===L||n);n&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class V{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const X=u.litHtmlPolyfillSupport;null==X||X(U,R),(null!==(c=u.litHtmlVersions)&&void 0!==c?c:u.litHtmlVersions=[]).push("2.7.3");
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2020 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
11
|
*/
|
|
12
|
-
const
|
|
12
|
+
const q=Symbol.for(""),Y=t=>{if((null==t?void 0:t.r)===q)return null==t?void 0:t._$litStatic$},J=t=>({_$litStatic$:t,r:q}),Q=new Map,tt=(t=>(e,...i)=>{const o=i.length;let n,s;const r=[],l=[];let a,h=0,p=!1;for(;h<o;){for(a=e[h];h<o&&void 0!==(s=i[h],n=Y(s));)a+=n+e[++h],p=!0;h!==o&&l.push(s),r.push(a),h++}if(h===o&&r.push(e[o]),p){const t=r.join("$$lit$$");void 0===(e=Q.get(t))&&(r.raw=r,Q.set(t,e=r)),i=l}return t(e,...i)})(T);var et;!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"}(et||(et={}));const it=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),ot=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),nt={fontFamily:ot,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},st=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",it),rt=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",nt.fontSize,"20px"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",nt.fontWeight,"normal"),at=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",nt.letterSpacing,"0.15px"),ht=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",nt.lineHeight,"1.2"),pt=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",nt.textTransform,"inherit"),dt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",it),ft=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",nt.fontSize,"14px"),ct=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",nt.fontWeight,"normal"),ut=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",nt.letterSpacing,"0.105px"),xt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",nt.lineHeight,"1.7"),gt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",nt.textTransform,"inherit"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",ot),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",nt.fontSize,"16px"),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",nt.fontWeight,"600"),mt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",nt.letterSpacing,"0.144px"),$t=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",nt.lineHeight,"1.5"),wt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",nt.textTransform,"inherit"),kt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",ot),zt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",nt.fontSize,"14px"),St=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",nt.fontWeight,"normal"),Ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",nt.letterSpacing,"0.098px"),Nt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",nt.lineHeight,"1.7"),It=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",nt.textTransform,"inherit"),Ot=e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",ot),At=e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",nt.fontSize,"16px"),Et=e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",nt.fontWeight,"normal"),jt=e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",nt.letterSpacing,"0.496px"),Tt=e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",nt.lineHeight,"1.5"),Bt=e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",nt.textTransform,"inherit"),Lt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",ot),Mt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",nt.fontSize,"14px"),Ft=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",nt.fontWeight,"normal"),_t=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",nt.letterSpacing,"0.252px"),Ut=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",nt.lineHeight,"1.4"),Zt=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",nt.textTransform,"inherit"),Pt=e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",ot),Rt=e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",nt.fontSize,"12px"),Wt=e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",nt.fontWeight,"normal"),Dt=e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",nt.letterSpacing,"0.396px"),Kt=e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",nt.lineHeight,"1.33"),Ht=e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",nt.textTransform,"inherit"),Gt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",ot),Vt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",nt.fontSize,"10px"),Xt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",nt.fontWeight,"normal"),qt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",nt.letterSpacing,"0.33px"),Yt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",nt.lineHeight,"1.6"),Jt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",nt.textTransform,"inherit"),Qt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",ot),te=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",nt.fontSize,"10px"),ee=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",nt.fontWeight,"normal"),ie=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",nt.letterSpacing,"1.5px"),oe=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",nt.lineHeight,"1.6"),ne=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",nt.textTransform,"uppercase"),se={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-button-font-family",ot),fontSize:e.FtCssVariableFactory.extend("--ft-typography-button-font-size",nt.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",nt.fontWeight,"600"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",nt.letterSpacing,"1.246px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-button-line-height",nt.lineHeight,"1.15"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",nt.textTransform,"uppercase")},re=i.css`
|
|
13
13
|
.ft-typography--title {
|
|
14
|
-
font-family: ${
|
|
15
|
-
font-size: ${
|
|
16
|
-
font-weight: ${
|
|
17
|
-
letter-spacing: ${
|
|
18
|
-
line-height: ${
|
|
19
|
-
text-transform: ${
|
|
20
|
-
}
|
|
21
|
-
`,re=i.css`
|
|
22
|
-
.ft-typography--title-dense {
|
|
23
|
-
font-family: ${pt};
|
|
24
|
-
font-size: ${dt};
|
|
25
|
-
font-weight: ${ft};
|
|
26
|
-
letter-spacing: ${ct};
|
|
27
|
-
line-height: ${ut};
|
|
28
|
-
text-transform: ${xt};
|
|
14
|
+
font-family: ${st};
|
|
15
|
+
font-size: ${rt};
|
|
16
|
+
font-weight: ${lt};
|
|
17
|
+
letter-spacing: ${at};
|
|
18
|
+
line-height: ${ht};
|
|
19
|
+
text-transform: ${pt};
|
|
29
20
|
}
|
|
30
21
|
`,le=i.css`
|
|
31
|
-
.ft-typography--
|
|
32
|
-
font-family: ${
|
|
33
|
-
font-size: ${
|
|
34
|
-
font-weight: ${
|
|
35
|
-
letter-spacing: ${
|
|
36
|
-
line-height: ${
|
|
37
|
-
text-transform: ${
|
|
22
|
+
.ft-typography--title-dense {
|
|
23
|
+
font-family: ${dt};
|
|
24
|
+
font-size: ${ft};
|
|
25
|
+
font-weight: ${ct};
|
|
26
|
+
letter-spacing: ${ut};
|
|
27
|
+
line-height: ${xt};
|
|
28
|
+
text-transform: ${gt};
|
|
38
29
|
}
|
|
39
30
|
`,ae=i.css`
|
|
31
|
+
.ft-typography--subtitle1 {
|
|
32
|
+
font-family: ${vt};
|
|
33
|
+
font-size: ${yt};
|
|
34
|
+
font-weight: ${bt};
|
|
35
|
+
letter-spacing: ${mt};
|
|
36
|
+
line-height: ${$t};
|
|
37
|
+
text-transform: ${wt};
|
|
38
|
+
}
|
|
39
|
+
`,he=i.css`
|
|
40
40
|
.ft-typography--subtitle2 {
|
|
41
|
-
font-family: ${
|
|
42
|
-
font-size: ${
|
|
43
|
-
font-weight: ${
|
|
44
|
-
letter-spacing: ${
|
|
45
|
-
line-height: ${
|
|
46
|
-
text-transform: ${
|
|
41
|
+
font-family: ${kt};
|
|
42
|
+
font-size: ${zt};
|
|
43
|
+
font-weight: ${St};
|
|
44
|
+
letter-spacing: ${Ct};
|
|
45
|
+
line-height: ${Nt};
|
|
46
|
+
text-transform: ${It};
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
`,
|
|
49
|
+
`,pe=i.css`
|
|
50
50
|
.ft-typography--body1 {
|
|
51
|
-
font-family: ${
|
|
52
|
-
font-size: ${
|
|
53
|
-
font-weight: ${
|
|
54
|
-
letter-spacing: ${
|
|
55
|
-
line-height: ${
|
|
56
|
-
text-transform: ${
|
|
51
|
+
font-family: ${Ot};
|
|
52
|
+
font-size: ${At};
|
|
53
|
+
font-weight: ${Et};
|
|
54
|
+
letter-spacing: ${jt};
|
|
55
|
+
line-height: ${Tt};
|
|
56
|
+
text-transform: ${Bt};
|
|
57
57
|
}
|
|
58
|
-
`,
|
|
58
|
+
`,de=i.css`
|
|
59
59
|
.ft-typography--body2 {
|
|
60
|
-
font-family: ${
|
|
60
|
+
font-family: ${Lt};
|
|
61
61
|
font-size: ${Mt};
|
|
62
|
-
font-weight: ${
|
|
62
|
+
font-weight: ${Ft};
|
|
63
63
|
letter-spacing: ${_t};
|
|
64
|
-
line-height: ${
|
|
65
|
-
text-transform: ${
|
|
64
|
+
line-height: ${Ut};
|
|
65
|
+
text-transform: ${Zt};
|
|
66
66
|
}
|
|
67
|
-
`,
|
|
67
|
+
`,fe=i.css`
|
|
68
68
|
.ft-typography--caption {
|
|
69
|
-
font-family: ${
|
|
70
|
-
font-size: ${
|
|
71
|
-
font-weight: ${
|
|
72
|
-
letter-spacing: ${
|
|
73
|
-
line-height: ${
|
|
69
|
+
font-family: ${Pt};
|
|
70
|
+
font-size: ${Rt};
|
|
71
|
+
font-weight: ${Wt};
|
|
72
|
+
letter-spacing: ${Dt};
|
|
73
|
+
line-height: ${Kt};
|
|
74
74
|
text-transform: ${Ht};
|
|
75
75
|
}
|
|
76
|
-
`,
|
|
76
|
+
`,ce=i.css`
|
|
77
77
|
.ft-typography--breadcrumb {
|
|
78
78
|
font-family: ${Gt};
|
|
79
|
-
font-size: ${
|
|
80
|
-
font-weight: ${
|
|
81
|
-
letter-spacing: ${
|
|
82
|
-
line-height: ${
|
|
83
|
-
text-transform: ${
|
|
84
|
-
}
|
|
85
|
-
`,ce=i.css`
|
|
86
|
-
.ft-typography--overline {
|
|
87
|
-
font-family: ${Jt};
|
|
88
|
-
font-size: ${Qt};
|
|
89
|
-
font-weight: ${te};
|
|
90
|
-
letter-spacing: ${ee};
|
|
91
|
-
line-height: ${ie};
|
|
92
|
-
text-transform: ${oe};
|
|
79
|
+
font-size: ${Vt};
|
|
80
|
+
font-weight: ${Xt};
|
|
81
|
+
letter-spacing: ${qt};
|
|
82
|
+
line-height: ${Yt};
|
|
83
|
+
text-transform: ${Jt};
|
|
93
84
|
}
|
|
94
85
|
`,ue=i.css`
|
|
95
|
-
.ft-typography--
|
|
96
|
-
font-family: ${
|
|
97
|
-
font-size: ${
|
|
98
|
-
font-weight: ${
|
|
99
|
-
letter-spacing: ${
|
|
100
|
-
line-height: ${
|
|
101
|
-
text-transform: ${ne
|
|
86
|
+
.ft-typography--overline {
|
|
87
|
+
font-family: ${Qt};
|
|
88
|
+
font-size: ${te};
|
|
89
|
+
font-weight: ${ee};
|
|
90
|
+
letter-spacing: ${ie};
|
|
91
|
+
line-height: ${oe};
|
|
92
|
+
text-transform: ${ne};
|
|
102
93
|
}
|
|
103
94
|
`,xe=i.css`
|
|
95
|
+
.ft-typography--button {
|
|
96
|
+
font-family: ${se.fontFamily};
|
|
97
|
+
font-size: ${se.fontSize};
|
|
98
|
+
font-weight: ${se.fontWeight};
|
|
99
|
+
letter-spacing: ${se.letterSpacing};
|
|
100
|
+
line-height: ${se.lineHeight};
|
|
101
|
+
text-transform: ${se.textTransform};
|
|
102
|
+
}
|
|
103
|
+
`,ge=i.css`
|
|
104
104
|
.ft-typography {
|
|
105
105
|
vertical-align: inherit;
|
|
106
106
|
}
|
|
107
|
-
`;var
|
|
108
|
-
<${
|
|
107
|
+
`;var ve=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class ye extends e.FtLitElement{constructor(){super(...arguments),this.variant=et.body1}render(){return this.element?tt`
|
|
108
|
+
<${J(this.element)}
|
|
109
109
|
class="ft-typography ft-typography--${this.variant}">
|
|
110
110
|
<slot></slot>
|
|
111
|
-
</${
|
|
112
|
-
`:
|
|
111
|
+
</${J(this.element)}>
|
|
112
|
+
`:tt`
|
|
113
113
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
114
|
-
`}}
|
|
114
|
+
`}}ye.styles=[re,le,ae,he,pe,de,fe,ce,ue,xe,ge],ve([r.property()],ye.prototype,"element",void 0),ve([r.property()],ye.prototype,"variant",void 0),e.customElement("ft-typography")(ye);const be=e.FtCssVariableFactory.extend("--ft-reader-internal-link-outline-color",e.designSystemVariables.colorPrimary),me=i.css`
|
|
115
115
|
:host {
|
|
116
116
|
display: contents;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
a:focus {
|
|
120
|
-
outline-color: ${
|
|
120
|
+
outline-color: ${be};
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
.ft-reader-link--remove-style {
|
|
124
124
|
text-decoration: none;
|
|
125
125
|
color: inherit;
|
|
126
126
|
}
|
|
127
|
-
`;var
|
|
127
|
+
`;var $e,we,ke=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class ze extends f{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let e=n.classMap({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return i.html`
|
|
128
128
|
<a class=${e}
|
|
129
129
|
href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
|
|
130
130
|
@click=${t=>this.onLinkClick(t)}>
|
|
131
131
|
<slot></slot>
|
|
132
132
|
</a>
|
|
133
|
-
`}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber),this.click())}}
|
|
133
|
+
`}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber),this.click())}}ze.styles=me,ke([r.property()],ze.prototype,"tocId",void 0),ke([r.property()],ze.prototype,"section",void 0),ke([r.property({type:Number})],ze.prototype,"pageNumber",void 0),ke([r.property({type:Boolean})],ze.prototype,"removeStyle",void 0),e.customElement("ft-reader-internal-link")(ze),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",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.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="",t.EYE_SLASH="",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="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}($e||($e={})),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=""}(we||(we={})),new Map([...["abw"].map((t=>[t,we.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,we.AUDIO])),...["avi"].map((t=>[t,we.AVI])),...["chm","xhs"].map((t=>[t,we.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,we.CODE])),...["csv"].map((t=>[t,we.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,we.DITA])),...["epub"].map((t=>[t,we.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,we.EXCEL])),...["flac"].map((t=>[t,we.FLAC])),...["gif"].map((t=>[t,we.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,we.GZIP])),...["html","htm","xhtml"].map((t=>[t,we.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,we.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,we.JPEG])),...["json"].map((t=>[t,we.JSON])),...["m4a","m4p"].map((t=>[t,we.M4A])),...["mov","qt"].map((t=>[t,we.MOV])),...["mp3"].map((t=>[t,we.MP3])),...["mp4","m4v"].map((t=>[t,we.MP4])),...["ogg","oga"].map((t=>[t,we.OGG])),...["pdf","ps"].map((t=>[t,we.PDF])),...["png"].map((t=>[t,we.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,we.POWERPOINT])),...["rar"].map((t=>[t,we.RAR])),...["stp"].map((t=>[t,we.STP])),...["txt","rtf","md","mdown"].map((t=>[t,we.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,we.VIDEO])),...["wav"].map((t=>[t,we.WAV])),...["wma"].map((t=>[t,we.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,we.WORD])),...["xml","xsl","rdf"].map((t=>[t,we.XML])),...["yaml","yml","x-yaml"].map((t=>[t,we.YAML])),...["zip"].map((t=>[t,we.ZIP]))]);const Se={size:e.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},Ce=i.css`
|
|
134
134
|
:host, i.ft-icon {
|
|
135
135
|
display: inline-flex;
|
|
136
136
|
align-items: center;
|
|
@@ -139,14 +139,14 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
:host {
|
|
142
|
-
width: ${
|
|
143
|
-
height: ${
|
|
142
|
+
width: ${Se.size};
|
|
143
|
+
height: ${Se.size};
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
i.ft-icon {
|
|
147
147
|
width: 100%;
|
|
148
148
|
height: 100%;
|
|
149
|
-
font-size: ${
|
|
149
|
+
font-size: ${Se.size};
|
|
150
150
|
line-height: 1;
|
|
151
151
|
font-weight: normal;
|
|
152
152
|
text-transform: none;
|
|
@@ -157,33 +157,33 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
157
157
|
text-rendering: auto;
|
|
158
158
|
-webkit-font-smoothing: antialiased;
|
|
159
159
|
-moz-osx-font-smoothing: grayscale;
|
|
160
|
-
vertical-align: ${
|
|
160
|
+
vertical-align: ${Se.verticalAlign};
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
i.ft-icon.ft-icon--fluid-topics {
|
|
164
|
-
font-family: ${
|
|
164
|
+
font-family: ${Se.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
165
165
|
|
|
166
166
|
/* Ugly fix because font is broken */
|
|
167
|
-
font-size: calc(0.75 * ${
|
|
168
|
-
line-height: ${
|
|
167
|
+
font-size: calc(0.75 * ${Se.size});
|
|
168
|
+
line-height: ${Se.size};
|
|
169
169
|
position: relative;
|
|
170
170
|
top: -4%;
|
|
171
171
|
justify-content: center;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
.ft-icon--file-format {
|
|
175
|
-
font-family: ${
|
|
175
|
+
font-family: ${Se.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
.ft-icon--material {
|
|
179
|
-
font-family: ${
|
|
179
|
+
font-family: ${Se.materialFontFamily}, "Material Icons", sans-serif;
|
|
180
180
|
}
|
|
181
|
-
`;var
|
|
181
|
+
`;var Ne;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ne||(Ne={}));var Ie=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Oe extends e.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=i.nothing}render(){const t=this.variant&&Object.values(Ne).includes(this.variant)?this.variant:Ne.fluid_topics,e=t!==Ne.material||!!this.value;return i.html`
|
|
182
182
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
183
183
|
${l.unsafeHTML(this.resolvedIcon)}
|
|
184
184
|
<slot ?hidden=${e}></slot>
|
|
185
185
|
</i>
|
|
186
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case
|
|
186
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case Ne.file_format:this.resolvedIcon=null!==(t=we[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Ne.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=$e[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Oe.elementDefinitions={},Oe.styles=Ce,Ie([r.property()],Oe.prototype,"variant",void 0),Ie([r.property()],Oe.prototype,"value",void 0),Ie([r.state()],Oe.prototype,"resolvedIcon",void 0),Ie([r.query("slot")],Oe.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Oe);const Ae=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),Ee={color:Ae,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",Ae),opacityContentOnSurfacePressed:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:e.FtCssVariableFactory.create("--ft-ripple-border-radius","SIZE","0px")},je=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),Te=je,Be=e.FtCssVariableFactory.extend("--ft-ripple-background-color",je),Le=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),Me=Le,Fe=e.FtCssVariableFactory.extend("--ft-ripple-background-color",Le),_e=i.css`
|
|
187
187
|
:host {
|
|
188
188
|
display: contents;
|
|
189
189
|
}
|
|
@@ -196,7 +196,7 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
196
196
|
|
|
197
197
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
198
198
|
overflow: hidden;
|
|
199
|
-
border-radius: ${
|
|
199
|
+
border-radius: ${Ee.borderRadius};
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
.ft-ripple .ft-ripple--background,
|
|
@@ -230,15 +230,15 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
.ft-ripple .ft-ripple--background {
|
|
233
|
-
background-color: ${
|
|
233
|
+
background-color: ${Ee.backgroundColor};
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
.ft-ripple .ft-ripple--effect {
|
|
237
|
-
background-color: ${
|
|
237
|
+
background-color: ${Ee.color};
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
241
|
-
background-color: ${
|
|
241
|
+
background-color: ${Fe};
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
@@ -246,11 +246,11 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
249
|
-
background-color: ${
|
|
249
|
+
background-color: ${Be};
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
253
|
-
background-color: ${
|
|
253
|
+
background-color: ${Te};
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
.ft-ripple .ft-ripple--background {
|
|
@@ -280,22 +280,22 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
283
|
-
opacity: ${
|
|
283
|
+
opacity: ${Ee.opacityContentOnSurfaceHover};
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
287
|
-
opacity: ${
|
|
287
|
+
opacity: ${Ee.opacityContentOnSurfaceSelected};
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
291
|
-
opacity: ${
|
|
291
|
+
opacity: ${Ee.opacityContentOnSurfaceFocused};
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
295
|
-
opacity: ${
|
|
295
|
+
opacity: ${Ee.opacityContentOnSurfacePressed};
|
|
296
296
|
transform: translate(-50%, -50%) scale(1);
|
|
297
297
|
}
|
|
298
|
-
`;var
|
|
298
|
+
`;var Ue=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Ze extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new e.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new e.Debouncer(10),this.moveRipple=t=>{var e,i;let{x:o,y:n}=this.getCoordinates(t),s=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-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.isFocusVisible(null==t?void 0:t.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return i.html`
|
|
299
299
|
<style>
|
|
300
300
|
.ft-ripple .ft-ripple--effect {
|
|
301
301
|
left: ${this.originX}px;
|
|
@@ -306,7 +306,7 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
306
306
|
<div class="ft-ripple--background"></div>
|
|
307
307
|
<div class="ft-ripple--effect"></div>
|
|
308
308
|
</div>
|
|
309
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",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",i),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,this.target=void 0}}getCoordinates(t){const e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}
|
|
309
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",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",i),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,this.target=void 0}}getCoordinates(t){const e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}Ze.elementDefinitions={},Ze.styles=_e,Ue([r.property({type:Boolean})],Ze.prototype,"primary",void 0),Ue([r.property({type:Boolean})],Ze.prototype,"secondary",void 0),Ue([r.property({type:Boolean})],Ze.prototype,"unbounded",void 0),Ue([r.property({type:Boolean})],Ze.prototype,"activated",void 0),Ue([r.property({type:Boolean})],Ze.prototype,"selected",void 0),Ue([r.property({type:Boolean})],Ze.prototype,"disabled",void 0),Ue([r.state()],Ze.prototype,"hovered",void 0),Ue([r.state()],Ze.prototype,"focused",void 0),Ue([r.state()],Ze.prototype,"pressed",void 0),Ue([r.state()],Ze.prototype,"rippling",void 0),Ue([r.state()],Ze.prototype,"originX",void 0),Ue([r.state()],Ze.prototype,"originY",void 0),Ue([r.query(".ft-ripple")],Ze.prototype,"ripple",void 0),Ue([r.query(".ft-ripple--effect")],Ze.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(Ze);const Pe=e.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),Re=e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),We=e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),De=e.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","100"),Ke=e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),He=e.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),Ge=i.css`
|
|
310
310
|
.ft-tooltip--container {
|
|
311
311
|
display: block;
|
|
312
312
|
}
|
|
@@ -323,19 +323,19 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
323
323
|
width: max-content;
|
|
324
324
|
max-width: ${He};
|
|
325
325
|
text-align: center;
|
|
326
|
-
padding: ${
|
|
327
|
-
z-index: ${
|
|
326
|
+
padding: ${Pe};
|
|
327
|
+
z-index: ${De};
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
.ft-tooltip--content {
|
|
331
331
|
padding: 4px 8px;
|
|
332
|
-
border-radius: ${
|
|
333
|
-
background-color: ${
|
|
334
|
-
color: ${
|
|
332
|
+
border-radius: ${Ke};
|
|
333
|
+
background-color: ${We};
|
|
334
|
+
color: ${Re};
|
|
335
335
|
position: relative;
|
|
336
336
|
word-break: break-word;
|
|
337
337
|
}
|
|
338
|
-
`;var
|
|
338
|
+
`;var Ve=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Xe extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new e.Debouncer,this.revealDebouncer=new e.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return i.html`
|
|
339
339
|
<div part="container"
|
|
340
340
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
341
341
|
@mouseenter=${this.onHover}
|
|
@@ -353,7 +353,7 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
353
353
|
</div>
|
|
354
354
|
</div>
|
|
355
355
|
</div>
|
|
356
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&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.validPosition){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 e=this.tooltip.offsetWidth,i=this.tooltip.offsetHeight,o=(t.offsetHeight-i)/2,n=(t.offsetWidth-e)/2;let s=0,r=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":r=t.offsetTop-i-this.tooltip.offsetTop,s=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"bottom":r=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,s=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"left":r=t.offsetTop+o-this.tooltip.offsetTop,s=t.offsetLeft-e-this.tooltip.offsetLeft;break;case"right":r=t.offsetTop+o-this.tooltip.offsetTop,s=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const l=this.tooltip.style;l.left=s+"px",l.top=r+"px";const a=this.tooltip.getBoundingClientRect();let h=-a.x,p=a.x+a.width-window.innerWidth;l.left=s+Math.round(this.correctOutOfWindowPixels(h,p))+"px";let d=-a.y,f=a.y+a.height-window.innerHeight;l.top=r+Math.round(this.correctOutOfWindowPixels(d,f))+"px",l.maxWidth=`max(${t.offsetWidth}px, ${He})`}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())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}
|
|
356
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&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.validPosition){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 e=this.tooltip.offsetWidth,i=this.tooltip.offsetHeight,o=(t.offsetHeight-i)/2,n=(t.offsetWidth-e)/2;let s=0,r=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":r=t.offsetTop-i-this.tooltip.offsetTop,s=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"bottom":r=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,s=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"left":r=t.offsetTop+o-this.tooltip.offsetTop,s=t.offsetLeft-e-this.tooltip.offsetLeft;break;case"right":r=t.offsetTop+o-this.tooltip.offsetTop,s=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const l=this.tooltip.style;l.left=s+"px",l.top=r+"px";const a=this.tooltip.getBoundingClientRect();let h=-a.x,p=a.x+a.width-window.innerWidth;l.left=s+Math.round(this.correctOutOfWindowPixels(h,p))+"px";let d=-a.y,f=a.y+a.height-window.innerHeight;l.top=r+Math.round(this.correctOutOfWindowPixels(d,f))+"px",l.maxWidth=`max(${t.offsetWidth}px, ${He})`}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())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}Xe.elementDefinitions={"ft-typography":ye},Xe.styles=Ge,Ve([r.property()],Xe.prototype,"text",void 0),Ve([r.property({type:Boolean})],Xe.prototype,"manual",void 0),Ve([r.property({type:Boolean})],Xe.prototype,"inline",void 0),Ve([r.property({type:Number})],Xe.prototype,"delay",void 0),Ve([r.property()],Xe.prototype,"position",void 0),Ve([r.queryAssignedNodes("",!0)],Xe.prototype,"slotNodes",void 0),Ve([r.query(".ft-tooltip--container")],Xe.prototype,"container",void 0),Ve([r.query(".ft-tooltip")],Xe.prototype,"tooltip",void 0),Ve([r.query(".ft-tooltip--content")],Xe.prototype,"tooltipContent",void 0),Ve([r.state()],Xe.prototype,"visible",void 0),e.customElement("ft-tooltip")(Xe);const qe={color:e.FtCssVariableFactory.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Ye=i.css`
|
|
357
357
|
:host {
|
|
358
358
|
line-height: 0;
|
|
359
359
|
}
|
|
@@ -362,8 +362,8 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
362
362
|
display: inline-block;
|
|
363
363
|
position: relative;
|
|
364
364
|
|
|
365
|
-
width: ${
|
|
366
|
-
height: ${
|
|
365
|
+
width: ${qe.size};
|
|
366
|
+
height: ${qe.size};
|
|
367
367
|
}
|
|
368
368
|
|
|
369
369
|
.ft-loader div {
|
|
@@ -372,7 +372,7 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
372
372
|
width: 25%;
|
|
373
373
|
height: 25%;
|
|
374
374
|
border-radius: 50%;
|
|
375
|
-
background: ${
|
|
375
|
+
background: ${qe.color};
|
|
376
376
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
377
377
|
}
|
|
378
378
|
|
|
@@ -419,17 +419,17 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
419
419
|
transform: translate(0, 0);
|
|
420
420
|
}
|
|
421
421
|
100% {
|
|
422
|
-
transform: translate(calc(0.35 * ${
|
|
422
|
+
transform: translate(calc(0.35 * ${qe.size}), 0);
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
`;class
|
|
425
|
+
`;class Je extends e.FtLitElement{render(){return i.html`
|
|
426
426
|
<div class="ft-loader">
|
|
427
427
|
<div></div>
|
|
428
428
|
<div></div>
|
|
429
429
|
<div></div>
|
|
430
430
|
<div></div>
|
|
431
431
|
</div>
|
|
432
|
-
`}}
|
|
432
|
+
`}}Je.styles=Ye,e.customElement("ft-loader")(Je);const Qe=e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorPrimary),ti={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorSurface),borderRadius:e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusL),color:Qe,fontSize:e.FtCssVariableFactory.extend("--ft-button-font-size",se.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:e.FtCssVariableFactory.extend("--ft-button-ripple-color",Qe),verticalPadding:e.FtCssVariableFactory.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:e.FtCssVariableFactory.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:e.FtCssVariableFactory.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},ei=e.FtCssVariableFactory.extend("--ft-button-primary-color",e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorOnPrimary)),ii={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-primary-background-color",e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorPrimary)),color:ei,rippleColor:e.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",ei)},oi=e.FtCssVariableFactory.extend("--ft-button-dense-border-radius",e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusM)),ni=e.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","SIZE","2px"),si=e.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","SIZE","4px"),ri=e.FtCssVariableFactory.create("--ft-button-dense-icon-padding","SIZE","4px"),li=[i.css`
|
|
433
433
|
:host {
|
|
434
434
|
display: inline-block;
|
|
435
435
|
max-width: 100%;
|
|
@@ -440,7 +440,7 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
440
440
|
box-shadow: 0px 0px 0px transparent;
|
|
441
441
|
border: 0px solid transparent;
|
|
442
442
|
text-shadow: 0px 0px 0px transparent;
|
|
443
|
-
font-size: ${
|
|
443
|
+
font-size: ${ti.fontSize};
|
|
444
444
|
}
|
|
445
445
|
|
|
446
446
|
button:hover {
|
|
@@ -469,31 +469,31 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
469
469
|
border: none;
|
|
470
470
|
pointer-events: auto;
|
|
471
471
|
|
|
472
|
-
--ft-button-internal-line-height: max(calc(${
|
|
473
|
-
--ft-button-internal-color: ${
|
|
474
|
-
${e.setVariable(
|
|
475
|
-
${e.setVariable(
|
|
472
|
+
--ft-button-internal-line-height: max(calc(${ti.fontSize} + 2px), ${ti.iconSize});
|
|
473
|
+
--ft-button-internal-color: ${ti.color};
|
|
474
|
+
${e.setVariable(Se.size,ti.iconSize)};
|
|
475
|
+
${e.setVariable(Ee.color,ti.rippleColor)};
|
|
476
476
|
|
|
477
|
-
border-radius: ${
|
|
478
|
-
padding: ${
|
|
479
|
-
background-color: ${
|
|
477
|
+
border-radius: ${ti.borderRadius};
|
|
478
|
+
padding: ${ti.verticalPadding} ${ti.horizontalPadding};
|
|
479
|
+
background-color: ${ti.backgroundColor};
|
|
480
480
|
color: var(--ft-button-internal-color);
|
|
481
481
|
-webkit-mask-image: radial-gradient(white, black);
|
|
482
482
|
}
|
|
483
483
|
|
|
484
484
|
.ft-button.ft-button--outlined {
|
|
485
485
|
border: 1px solid var(--ft-button-internal-color);
|
|
486
|
-
padding: calc(${
|
|
486
|
+
padding: calc(${ti.verticalPadding} - 1px) calc(${ti.horizontalPadding} - 1px);
|
|
487
487
|
}
|
|
488
488
|
|
|
489
489
|
.ft-button.ft-button--dense {
|
|
490
|
-
padding: ${
|
|
491
|
-
border-radius: ${
|
|
492
|
-
gap: ${
|
|
490
|
+
padding: ${ni} ${si};
|
|
491
|
+
border-radius: ${oi};
|
|
492
|
+
gap: ${ri};
|
|
493
493
|
}
|
|
494
494
|
|
|
495
495
|
.ft-button.ft-button--dense.ft-button--outlined {
|
|
496
|
-
padding: calc(${
|
|
496
|
+
padding: calc(${ni} - 1px) calc(${si} - 1px);
|
|
497
497
|
}
|
|
498
498
|
|
|
499
499
|
.ft-button:not([disabled]):hover {
|
|
@@ -501,22 +501,22 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
501
501
|
}
|
|
502
502
|
|
|
503
503
|
.ft-button--round {
|
|
504
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
504
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${ti.verticalPadding});
|
|
505
505
|
}
|
|
506
506
|
|
|
507
507
|
.ft-button--round.ft-button--dense {
|
|
508
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
508
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${ni});
|
|
509
509
|
}
|
|
510
510
|
|
|
511
511
|
.ft-button[disabled] {
|
|
512
512
|
filter: grayscale(1);
|
|
513
|
-
opacity: ${
|
|
513
|
+
opacity: ${ti.opacityDisabled};
|
|
514
514
|
}
|
|
515
515
|
|
|
516
516
|
.ft-button.ft-button--primary {
|
|
517
|
-
background-color: ${
|
|
518
|
-
--ft-button-internal-color: ${
|
|
519
|
-
${e.setVariable(
|
|
517
|
+
background-color: ${ii.backgroundColor};
|
|
518
|
+
--ft-button-internal-color: ${ii.color};
|
|
519
|
+
${e.setVariable(Ee.color,ii.rippleColor)};
|
|
520
520
|
}
|
|
521
521
|
|
|
522
522
|
.ft-button:focus {
|
|
@@ -529,13 +529,13 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
529
529
|
white-space: nowrap;
|
|
530
530
|
text-overflow: ellipsis;
|
|
531
531
|
display: block;
|
|
532
|
-
margin: 0 ${
|
|
533
|
-
${e.setVariable(
|
|
534
|
-
${e.setVariable(
|
|
532
|
+
margin: 0 ${ti.iconPadding};
|
|
533
|
+
${e.setVariable(se.fontSize,"1em")};
|
|
534
|
+
${e.setVariable(se.lineHeight,"var(--ft-button-internal-line-height)")};
|
|
535
535
|
}
|
|
536
536
|
|
|
537
537
|
.ft-button--dense .ft-button--label {
|
|
538
|
-
margin: 0 ${
|
|
538
|
+
margin: 0 ${ri};
|
|
539
539
|
}
|
|
540
540
|
|
|
541
541
|
.ft-button--label[hidden] {
|
|
@@ -548,13 +548,13 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
548
548
|
}
|
|
549
549
|
|
|
550
550
|
.ft-button--label[hidden] + ft-icon {
|
|
551
|
-
margin: 0 calc(${
|
|
552
|
-
padding: 0 ${
|
|
551
|
+
margin: 0 calc(${ti.horizontalPadding} * -1);
|
|
552
|
+
padding: 0 ${ti.verticalPadding};
|
|
553
553
|
}
|
|
554
554
|
|
|
555
555
|
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
556
|
-
margin: 0 calc(${
|
|
557
|
-
padding: 0 ${
|
|
556
|
+
margin: 0 calc(${si} * -1);
|
|
557
|
+
padding: 0 ${ni};
|
|
558
558
|
}
|
|
559
559
|
|
|
560
560
|
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
@@ -563,10 +563,10 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
563
563
|
}
|
|
564
564
|
|
|
565
565
|
ft-loader {
|
|
566
|
-
${e.setVariable(
|
|
567
|
-
${e.setVariable(
|
|
566
|
+
${e.setVariable(qe.size,ti.iconSize)};
|
|
567
|
+
${e.setVariable(qe.color,"var(--ft-button-internal-color)")};
|
|
568
568
|
}
|
|
569
|
-
`,e.noTextSelect];var
|
|
569
|
+
`,e.noTextSelect];var ai,hi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class pi extends e.FtLitElement{constructor(){super(...arguments),this.role="button",this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!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-no-text-select":!0};return this.addTooltipIfNeeded(i.html`
|
|
570
570
|
<button part="button"
|
|
571
571
|
class="${n.classMap(t)}"
|
|
572
572
|
aria-label="${this.getLabel()}"
|
|
@@ -589,7 +589,7 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
589
589
|
</ft-tooltip>
|
|
590
590
|
`:t}resolveIcon(){return this.loading?i.html`
|
|
591
591
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?i.html`
|
|
592
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:i.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}}
|
|
592
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:i.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}}pi.elementDefinitions={"ft-ripple":Ze,"ft-tooltip":Xe,"ft-typography":ye,"ft-icon":Oe,"ft-loader":Je},pi.styles=[e.safariEllipsisFix,li],hi([r.property({type:String,reflect:!0})],pi.prototype,"role",void 0),hi([r.property({type:Boolean})],pi.prototype,"primary",void 0),hi([r.property({type:Boolean})],pi.prototype,"outlined",void 0),hi([r.property({type:Boolean})],pi.prototype,"disabled",void 0),hi([r.property({type:Boolean})],pi.prototype,"dense",void 0),hi([r.property({type:Boolean})],pi.prototype,"round",void 0),hi([r.property()],pi.prototype,"label",void 0),hi([r.property()],pi.prototype,"icon",void 0),hi([r.property()],pi.prototype,"iconVariant",void 0),hi([r.property({type:Boolean})],pi.prototype,"trailingIcon",void 0),hi([r.property({type:Boolean})],pi.prototype,"loading",void 0),hi([r.property()],pi.prototype,"tooltipPosition",void 0),hi([r.property({type:Boolean})],pi.prototype,"hideTooltip",void 0),hi([r.property({type:Boolean})],pi.prototype,"forceTooltip",void 0),hi([r.query(".ft-button")],pi.prototype,"button",void 0),hi([r.query(".ft-button--label slot")],pi.prototype,"slottedContent",void 0),e.customElement("ft-button")(pi),function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(ai||(ai={}));const di=i.css`
|
|
593
593
|
.ft-size-watcher--pixel {
|
|
594
594
|
width: 0;
|
|
595
595
|
height: 0;
|
|
@@ -608,34 +608,34 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
608
608
|
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
609
609
|
width: 100%;
|
|
610
610
|
}
|
|
611
|
-
`;var
|
|
611
|
+
`;var fi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class ci extends CustomEvent{constructor(t,e){super("change",{detail:{size:t,category:e}})}}class ui extends e.FtLitElement{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=ai.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new e.Debouncer}render(){return i.html`
|
|
612
612
|
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
613
613
|
<div class="ft-size-watcher--watcher"></div>
|
|
614
614
|
</div>
|
|
615
|
-
`}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=
|
|
615
|
+
`}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=ai.S:this.size<976?this.category=ai.M:this.size<1024?this.category=ai.L:this.size<1440?this.category=ai.XL:this.category=ai.XXL,this.dispatchEvent(new ci(this.size,this.category)))}),this.debounceTimeout)}}ui.elementDefinitions={},ui.styles=di,fi([r.property({type:Number})],ui.prototype,"debounceTimeout",void 0),fi([r.property({type:Boolean})],ui.prototype,"local",void 0),fi([r.property({type:Number,reflect:!0})],ui.prototype,"size",void 0),fi([r.property({type:String,reflect:!0})],ui.prototype,"category",void 0),fi([r.query(".ft-size-watcher--watcher")],ui.prototype,"watcher",void 0),e.customElement("ft-size-watcher")(ui);const xi={expand:"Expand {0}",collapse:"Collapse {0}",expandAll:"Expand all",expandAllLong:"Expand all table of contents",collapseAll:"Collapse all",collapseAllLong:"Collapse all table of contents"},gi={tabulationSize:e.FtCssVariableFactory.create("--ft-reader-toc-tabulation-size","SIZE","16px"),verticalSpacing:e.FtCssVariableFactory.create("--ft-reader-toc-vertical-spacing","SIZE","4px"),textColor:e.FtCssVariableFactory.extend("--ft-reader-toc-text-color",e.designSystemVariables.colorOnSurface),hoverColor:e.FtCssVariableFactory.extend("--ft-reader-toc-hover-color",e.designSystemVariables.colorPrimary),highlightedTextColor:e.FtCssVariableFactory.extend("--ft-reader-toc-highlighted-text-color",e.designSystemVariables.colorPrimary),highlightedFontWeight:e.FtCssVariableFactory.create("--ft-reader-toc-highlighted-font-weight","UNKNOWN","bold"),highlightedBackgroundColor:e.FtCssVariableFactory.create("--ft-reader-toc-highlighted-background-color","COLOR","transparent"),iconFontSize:e.FtCssVariableFactory.create("--ft-reader-toc-icon-font-size","SIZE","16px")},vi=i.css`
|
|
616
616
|
.ft-reader-toc {
|
|
617
|
-
color: ${
|
|
617
|
+
color: ${gi.textColor};
|
|
618
618
|
}
|
|
619
619
|
|
|
620
620
|
.ft-reader-toc--node-highlighted > .ft-reader-toc--link-container {
|
|
621
|
-
background-color: ${
|
|
622
|
-
color: ${
|
|
623
|
-
${e.setVariable(
|
|
621
|
+
background-color: ${gi.highlightedBackgroundColor};
|
|
622
|
+
color: ${gi.highlightedTextColor};
|
|
623
|
+
${e.setVariable(nt.fontWeight,gi.highlightedFontWeight)}
|
|
624
624
|
}
|
|
625
625
|
|
|
626
626
|
.ft-reader-toc--link-container {
|
|
627
627
|
display: flex;
|
|
628
628
|
gap: 4px;
|
|
629
|
-
padding: ${
|
|
629
|
+
padding: ${gi.verticalSpacing} 4px; /* left padding is override on inline style */
|
|
630
630
|
align-items: center;
|
|
631
631
|
}
|
|
632
632
|
|
|
633
633
|
.ft-reader-toc--link-container ft-reader-internal-link:hover {
|
|
634
|
-
color: ${
|
|
634
|
+
color: ${gi.hoverColor};
|
|
635
635
|
}
|
|
636
636
|
|
|
637
637
|
ft-button {
|
|
638
|
-
${e.setVariable(
|
|
638
|
+
${e.setVariable(ti.iconSize,gi.iconFontSize)};
|
|
639
639
|
}
|
|
640
640
|
|
|
641
641
|
.ft-reader-toc--toggle-container {
|
|
@@ -643,11 +643,11 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
643
643
|
}
|
|
644
644
|
|
|
645
645
|
.ft-reader-toc-mobile .ft-reader-toc--toggle-container {
|
|
646
|
-
width: calc(${
|
|
646
|
+
width: calc(${gi.iconFontSize} + 12px); /*--ft-button-internal-horizontal-padding: 8px; in ft-button NOT dense*/
|
|
647
647
|
}
|
|
648
648
|
|
|
649
649
|
.ft-reader-toc-desktop .ft-reader-toc--toggle-container {
|
|
650
|
-
width: calc(${
|
|
650
|
+
width: calc(${gi.iconFontSize} + 4px); /*--ft-button-internal-horizontal-padding: 4px; in ft-button dense*/
|
|
651
651
|
}
|
|
652
652
|
|
|
653
653
|
.ft-reader-toc-expanded .ft-reader-toc--toggle-container {
|
|
@@ -670,7 +670,7 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
670
670
|
.ft-reader-toc-expand-collapse-all-justify ft-button {
|
|
671
671
|
flex-grow: 1;
|
|
672
672
|
}
|
|
673
|
-
`;var
|
|
673
|
+
`;var yi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class bi extends f{constructor(){super(...arguments),this.expanded=!1,this.iconVariant=Ne.fluid_topics,this.collapseIcon="MINUS",this.expandIcon="PLUS",this.expandCollapseAll=!1,this.expandCollapseAllHideLabel=!1,this.expandCollapseAllTrailingIcon=!1,this.expandCollapseAllAlignment="left",this.expandCollapseAllHideIcon=!1,this.collapseAllIcon="ICON_COLLAPSE",this.expandAllIcon="ICON_EXPAND",this.autoCollapse=!1,this.scope="pages",this.hideIfEmpty=!1,this.empty=!0,this.labels={},this.labelResolver=new e.ParametrizedLabelResolver(xi,{}),this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set,this.expandAll=!1,this.viewportSize=ai.M,this.nodesToExpandExist=!1}get isCurrentPageToc(){return"current-page"===this.scope}update(t){var i,o,n;super.update(t),t.has("toc")&&(this.nodesToExpandExist=(null!==(i=this.toc)&&void 0!==i?i:[]).some((t=>t.children.length>0))),t.has("labels")&&(this.labelResolver=new e.ParametrizedLabelResolver(xi,this.labels)),t.has("highlightedTocIds")&&!this.expanded&&(this.automaticallyExpandedNodes=this.buildAutomaticallyExpandedNodes(null!==(o=this.highlightedTocIds)&&void 0!==o?o:[])),this.empty=0===(null!==(n=this.toc)&&void 0!==n?n:[]).length}render(){var t;const e={"ft-reader-toc":!0,"ft-reader-toc-mobile":this.viewportSize===ai.S,"ft-reader-toc-desktop":this.viewportSize!==ai.S,"ft-reader-toc-loaded":null!=this.currentPage,"ft-reader-toc-expanded":this.expanded};return i.html`
|
|
674
674
|
${this.hideIfEmpty&&this.empty?i.html`
|
|
675
675
|
<style>
|
|
676
676
|
:host {
|
|
@@ -698,7 +698,7 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
698
698
|
${this.expandCollapseAllHideLabel?"":this.labelResolver.resolve(this.expandAll?"collapseAll":"expandAll")}
|
|
699
699
|
</ft-button>
|
|
700
700
|
</div>
|
|
701
|
-
`:i.nothing}renderNode(t){var e,n,r;const l=null===(e=this.highlightedTocIds)||void 0===e?void 0:e.includes(t.tocId),a=this.expanded||this.manuallyExpandedNodes.has(t.tocId)||(this.expandAll||this.automaticallyExpandedNodes.has(t.tocId))&&!this.manuallyCollapsedNodes.has(t.tocId),h=t.children.length>0,p=this.isCurrentPageToc?(null!==(r=null===(n=this.currentPage)||void 0===n?void 0:n.breadcrumb.length)&&void 0!==r?r:0)+1:0,d=t.depth-1-p,f={"padding-left":`calc( ${
|
|
701
|
+
`:i.nothing}renderNode(t){var e,n,r;const l=null===(e=this.highlightedTocIds)||void 0===e?void 0:e.includes(t.tocId),a=this.expanded||this.manuallyExpandedNodes.has(t.tocId)||(this.expandAll||this.automaticallyExpandedNodes.has(t.tocId))&&!this.manuallyCollapsedNodes.has(t.tocId),h=t.children.length>0,p=this.isCurrentPageToc?(null!==(r=null===(n=this.currentPage)||void 0===n?void 0:n.breadcrumb.length)&&void 0!==r?r:0)+1:0,d=t.depth-1-p,f={"padding-left":`calc( ${gi.tabulationSize} * ${d} + 4px)`};return i.html`
|
|
702
702
|
<div class="ft-reader-toc--node ${l?"ft-reader-toc--node-highlighted":""}">
|
|
703
703
|
<div class="ft-reader-toc--link-container" data-depth="${t.depth}" style=${s.styleMap(f)}>
|
|
704
704
|
${this.nodesToExpandExist&&!this.expanded?i.html`
|
|
@@ -707,7 +707,7 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
707
707
|
<ft-button
|
|
708
708
|
part="expand-collapse-node"
|
|
709
709
|
round hideTooltip
|
|
710
|
-
?dense=${this.viewportSize!==
|
|
710
|
+
?dense=${this.viewportSize!==ai.S}
|
|
711
711
|
label="${this.labelResolver.resolve(a?"collapse":"expand",t.title)}"
|
|
712
712
|
.iconVariant="${this.iconVariant}"
|
|
713
713
|
icon="${a?this.collapseIcon||"MINUS":this.expandIcon||"PLUS"}"
|
|
@@ -734,4 +734,4 @@ const X=Symbol.for(""),q=t=>{if((null==t?void 0:t.r)===X)return null==t?void 0:t
|
|
|
734
734
|
</div>
|
|
735
735
|
`:i.nothing}
|
|
736
736
|
</div>
|
|
737
|
-
`}buildAutomaticallyExpandedNodes(t){var e,i;let o=new Set(this.autoCollapse?[]:this.automaticallyExpandedNodes);for(let n of t){let t=n;for(;t&&!o.has(t);)o.add(t),this.manuallyCollapsedNodes.delete(t),t=null===(i=null===(e=this.service)||void 0===e?void 0:e.getTocNodeNow(t))||void 0===i?void 0:i.parentTocId}return o}manuallyToggle(t,e){e?(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}toggleExpandCollapseAll(){this.expandAll=!this.expandAll,this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set}getExpandCollapseAllTooltipPosition(){switch(this.expandCollapseAllAlignment){case"right":return"left";case"left":return"right";default:return"bottom"}}}
|
|
737
|
+
`}buildAutomaticallyExpandedNodes(t){var e,i;let o=new Set(this.autoCollapse?[]:this.automaticallyExpandedNodes);for(let n of t){let t=n;for(;t&&!o.has(t);)o.add(t),this.manuallyCollapsedNodes.delete(t),t=null===(i=null===(e=this.service)||void 0===e?void 0:e.getTocNodeNow(t))||void 0===i?void 0:i.parentTocId}return o}manuallyToggle(t,e){e?(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}toggleExpandCollapseAll(){this.expandAll=!this.expandAll,this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set}getExpandCollapseAllTooltipPosition(){switch(this.expandCollapseAllAlignment){case"right":return"left";case"left":return"right";default:return"bottom"}}}bi.elementDefinitions={"ft-button":pi,"ft-reader-internal-link":ze,"ft-size-watcher":ui,"ft-typography":ye},bi.styles=vi,yi([r.property({type:Boolean})],bi.prototype,"expanded",void 0),yi([r.property()],bi.prototype,"iconVariant",void 0),yi([r.property()],bi.prototype,"collapseIcon",void 0),yi([r.property()],bi.prototype,"expandIcon",void 0),yi([r.property({type:Boolean})],bi.prototype,"expandCollapseAll",void 0),yi([r.property({type:Boolean})],bi.prototype,"expandCollapseAllHideLabel",void 0),yi([r.property({type:Boolean})],bi.prototype,"expandCollapseAllTrailingIcon",void 0),yi([r.property()],bi.prototype,"expandCollapseAllAlignment",void 0),yi([r.property({type:Boolean})],bi.prototype,"expandCollapseAllHideIcon",void 0),yi([r.property()],bi.prototype,"expandCollapseAllIconVariant",void 0),yi([r.property()],bi.prototype,"collapseAllIcon",void 0),yi([r.property()],bi.prototype,"expandAllIcon",void 0),yi([r.property({type:Boolean})],bi.prototype,"autoCollapse",void 0),yi([r.property()],bi.prototype,"scope",void 0),yi([r.property({type:Boolean})],bi.prototype,"hideIfEmpty",void 0),yi([r.property({type:Boolean,reflect:!0})],bi.prototype,"empty",void 0),yi([e.jsonProperty({})],bi.prototype,"labels",void 0),yi([e.redux({selector:(t,e)=>{var i,o,n;return e.isCurrentPageToc?(null===(i=t.paginationConfiguration)||void 0===i?void 0:i.splitCurrentPageToc)?null===(o=t.currentPage)||void 0===o?void 0:o.toc:void 0:(null===(n=t.paginationConfiguration)||void 0===n?void 0:n.splitCurrentPageToc)?t.pagesToc:t.toc}})],bi.prototype,"toc",void 0),yi([e.redux({selector:t=>{var e;return null===(e=t.paginationConfiguration)||void 0===e?void 0:e.splitCurrentPageToc}})],bi.prototype,"splitToc",void 0),yi([e.redux()],bi.prototype,"currentPage",void 0),yi([e.redux({selector:(t,e)=>{var i,o;return(null===(i=t.paginationConfiguration)||void 0===i?void 0:i.splitCurrentPageToc)&&!e.isCurrentPageToc?[null===(o=t.currentPage)||void 0===o?void 0:o.rootTocId]:t.visibleTopics}})],bi.prototype,"highlightedTocIds",void 0),yi([r.state({hasChanged:(t,i)=>!e.deepEqual(t,i)})],bi.prototype,"automaticallyExpandedNodes",void 0),yi([r.state({hasChanged:(t,i)=>!e.deepEqual(t,i)})],bi.prototype,"manuallyExpandedNodes",void 0),yi([r.state({hasChanged:(t,i)=>!e.deepEqual(t,i)})],bi.prototype,"manuallyCollapsedNodes",void 0),yi([r.state()],bi.prototype,"expandAll",void 0),yi([r.state()],bi.prototype,"viewportSize",void 0),e.customElement("ft-reader-toc")(bi),t.DEFAULT_LABELS=xi,t.FtReaderToc=bi,t.FtReaderTocCssVariables=gi,t.styles=vi}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litStyleMap,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML);
|