@fluid-topics/ft-reader-toc 0.3.31 → 0.3.32
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 +1 -0
- package/build/ft-reader-toc.css.js +24 -3
- package/build/ft-reader-toc.d.ts +13 -0
- package/build/ft-reader-toc.js +102 -27
- package/build/ft-reader-toc.light.js +193 -148
- package/build/ft-reader-toc.min.js +142 -97
- package/build/ft-reader-toc.properties.d.ts +12 -0
- package/build/ft-reader-toc.properties.js +4 -0
- package/package.json +7 -7
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
!function(t,i,
|
|
1
|
+
!function(t,e,i,o,n,s,r,l){var a,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})}}class d extends(function(t){class e extends t{setReaderStateManager(t){this.stateManager=t,this.store=t.store}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),setTimeout((()=>this.dispatchEvent(new p)),10)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}return h([r.state()],e.prototype,"stateManager",void 0),e}(e.FtLitElementRedux)){}
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/const
|
|
6
|
+
*/const f=window,c=f.trustedTypes,u=c?c.createPolicy("lit-html",{createHTML:t=>t}):void 0,v=`lit$${(Math.random()+"").slice(9)}$`,g="?"+v,x=`<${g}>`,y=document,b=(t="")=>y.createComment(t),m=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,w=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,k=/-->/g,z=/>/g,C=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),S=/'/g,N=/"/g,O=/^(?:script|style|textarea|title)$/i,A=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),I=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),E=new WeakMap,T=y.createTreeWalker(y,129,null,!1),B=(t,e)=>{const i=t.length-1,o=[];let n,s=2===e?"<svg>":"",r=w;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===w?"!--"===a[1]?r=k:void 0!==a[1]?r=z:void 0!==a[2]?(O.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=C):void 0!==a[3]&&(r=C):r===C?">"===a[0]?(r=null!=n?n:w,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?C:'"'===a[3]?N:S):r===N||r===S?r=C:r===k||r===z?r=w:(r=C,n=void 0);const d=r===C&&t[e+1].startsWith("/>")?" ":"";s+=r===w?i+x:h>=0?(o.push(l),i.slice(0,h)+"$lit$"+i.slice(h)+v+d):i+v+(-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!==u?u.createHTML(l):l,o]};class L{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]=B(t,e);if(this.el=L.createElement(a,i),T.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=T.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(v)){const i=h[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(v),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?R:"?"===e[1]?Z:"@"===e[1]?W:U})}else l.push({type:6,index:n})}for(const e of t)o.removeAttribute(e)}if(O.test(o.tagName)){const t=o.textContent.split(v),e=t.length-1;if(e>0){o.textContent=c?c.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],b()),T.nextNode(),l.push({type:2,index:++n});o.append(t[e],b())}}}else if(8===o.nodeType)if(o.data===g)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(v,t+1));)l.push({type:7,index:n}),t+=v.length-1}n++}}static createElement(t,e){const i=y.createElement("template");return i.innerHTML=t,i}}function _(t,e,i=t,o){var n,s,r,l;if(e===I)return e;let a=void 0!==o?null===(n=i._$Co)||void 0===n?void 0:n[o]:i._$Cl;const h=m(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=_(t,a._$AS(t,e.values),a,o)),e}class F{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:y).importNode(i,!0);T.currentNode=n;let s=T.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new M(s,s.nextSibling,this,t):1===a.type?e=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(e=new D(s,this,t)),this.u.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(s=T.nextNode(),r++)}return n}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class M{constructor(t,e,i,o){var n;this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=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._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=_(this,t,e),m(t)?t===j||null==t||""===t?(this._$AH!==j&&this._$AR(),this._$AH=j):t!==this._$AH&&t!==I&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>$(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==j&&m(this._$AH)?this._$AA.nextSibling.data=t:this.T(y.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=L.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.p(i);else{const t=new F(n,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=E.get(t.strings);return void 0===e&&E.set(t.strings,e=new L(t)),e}k(t){$(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 M(this.O(b()),this.O(b()),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._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class U{constructor(t,e,i,o,n){this.type=1,this._$AH=j,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=j}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=_(this,t,e,0),s=!m(t)||t!==this._$AH&&t!==I,s&&(this._$AH=t);else{const o=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=_(this,o[i+r],e,r),l===I&&(l=this._$AH[r]),s||(s=!m(l)||l!==this._$AH[r]),l===j?t=j:t!==j&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}s&&!o&&this.j(t)}j(t){t===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class R extends U{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===j?void 0:t}}const P=c?c.emptyScript:"";class Z extends U{constructor(){super(...arguments),this.type=4}j(t){t&&t!==j?this.element.setAttribute(this.name,P):this.element.removeAttribute(this.name)}}class W extends U{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=_(this,t,e,0))&&void 0!==i?i:j)===I)return;const o=this._$AH,n=t===j&&o!==j||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==j&&(o===j||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 D{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){_(this,t)}}const H=f.litHtmlPolyfillSupport;null==H||H(L,M),(null!==(a=f.litHtmlVersions)&&void 0!==a?a:f.litHtmlVersions=[]).push("2.4.0");
|
|
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 G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t._$litStatic$},V=t=>({_$litStatic$:t,r:G}),X=new Map,q=(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=K(s));)a+=n+e[++h],p=!0;l.push(s),r.push(a),h++}if(h===o&&r.push(e[o]),p){const t=r.join("$$lit$$");void 0===(e=X.get(t))&&(r.raw=r,X.set(t,e=r)),i=l}return t(e,...i)})(A);var Y;!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"}(Y||(Y={}));const J=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),Q=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),tt={fontFamily:Q,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},et=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",J),it=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",tt.fontSize,"20px"),ot=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",tt.fontWeight,"normal"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",tt.letterSpacing,"0.15px"),st=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",tt.lineHeight,"1.2"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",tt.textTransform,"inherit"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",J),at=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",tt.fontSize,"14px"),ht=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",tt.fontWeight,"normal"),pt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",tt.letterSpacing,"0.105px"),dt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",tt.lineHeight,"1.7"),ft=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",tt.textTransform,"inherit"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",Q),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",tt.fontSize,"16px"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",tt.fontWeight,"600"),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",tt.letterSpacing,"0.144px"),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",tt.lineHeight,"1.5"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",tt.textTransform,"inherit"),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",Q),mt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",tt.fontSize,"14px"),$t=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",tt.fontWeight,"normal"),wt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",tt.letterSpacing,"0.098px"),kt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",tt.lineHeight,"1.7"),zt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",tt.textTransform,"inherit"),Ct=e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",Q),St=e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",tt.fontSize,"16px"),Nt=e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",tt.fontWeight,"normal"),Ot=e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",tt.letterSpacing,"0.496px"),At=e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",tt.lineHeight,"1.5"),It=e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",tt.textTransform,"inherit"),jt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",Q),Et=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",tt.fontSize,"14px"),Tt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",tt.fontWeight,"normal"),Bt=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",tt.letterSpacing,"0.252px"),Lt=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",tt.lineHeight,"1.4"),_t=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",tt.textTransform,"inherit"),Ft=e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",Q),Mt=e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",tt.fontSize,"12px"),Ut=e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",tt.fontWeight,"normal"),Rt=e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",tt.letterSpacing,"0.396px"),Pt=e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",tt.lineHeight,"1.33"),Zt=e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",tt.textTransform,"inherit"),Wt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",Q),Dt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",tt.fontSize,"10px"),Ht=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",tt.fontWeight,"normal"),Gt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",tt.letterSpacing,"0.33px"),Kt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",tt.lineHeight,"1.6"),Vt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",tt.textTransform,"inherit"),Xt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",Q),qt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",tt.fontSize,"10px"),Yt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",tt.fontWeight,"normal"),Jt=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",tt.letterSpacing,"1.5px"),Qt=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",tt.lineHeight,"1.6"),te=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",tt.textTransform,"uppercase"),ee={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-button-font-family",Q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-button-font-size",tt.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",tt.fontWeight,"600"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",tt.letterSpacing,"1.246px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-button-line-height",tt.lineHeight,"1.15"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",tt.textTransform,"uppercase")},ie=i.css`
|
|
13
13
|
.ft-typography--title {
|
|
14
|
-
font-family: ${
|
|
15
|
-
font-size: ${
|
|
14
|
+
font-family: ${et};
|
|
15
|
+
font-size: ${it};
|
|
16
16
|
font-weight: ${ot};
|
|
17
17
|
letter-spacing: ${nt};
|
|
18
18
|
line-height: ${st};
|
|
19
19
|
text-transform: ${rt};
|
|
20
20
|
}
|
|
21
|
-
`,
|
|
21
|
+
`,oe=i.css`
|
|
22
22
|
.ft-typography--title-dense {
|
|
23
|
-
font-family: ${
|
|
24
|
-
font-size: ${
|
|
23
|
+
font-family: ${lt};
|
|
24
|
+
font-size: ${at};
|
|
25
25
|
font-weight: ${ht};
|
|
26
26
|
letter-spacing: ${pt};
|
|
27
|
-
line-height: ${
|
|
28
|
-
text-transform: ${
|
|
27
|
+
line-height: ${dt};
|
|
28
|
+
text-transform: ${ft};
|
|
29
29
|
}
|
|
30
|
-
`,
|
|
30
|
+
`,ne=i.css`
|
|
31
31
|
.ft-typography--subtitle1 {
|
|
32
32
|
font-family: ${ct};
|
|
33
33
|
font-size: ${ut};
|
|
@@ -36,7 +36,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
36
36
|
line-height: ${xt};
|
|
37
37
|
text-transform: ${yt};
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
39
|
+
`,se=i.css`
|
|
40
40
|
.ft-typography--subtitle2 {
|
|
41
41
|
font-family: ${bt};
|
|
42
42
|
font-size: ${mt};
|
|
@@ -46,99 +46,103 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
46
46
|
text-transform: ${zt};
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
`,
|
|
49
|
+
`,re=i.css`
|
|
50
50
|
.ft-typography--body1 {
|
|
51
|
-
font-family: ${
|
|
52
|
-
font-size: ${
|
|
51
|
+
font-family: ${Ct};
|
|
52
|
+
font-size: ${St};
|
|
53
53
|
font-weight: ${Nt};
|
|
54
54
|
letter-spacing: ${Ot};
|
|
55
|
-
line-height: ${
|
|
55
|
+
line-height: ${At};
|
|
56
56
|
text-transform: ${It};
|
|
57
57
|
}
|
|
58
|
-
`,
|
|
58
|
+
`,le=i.css`
|
|
59
59
|
.ft-typography--body2 {
|
|
60
|
-
font-family: ${
|
|
60
|
+
font-family: ${jt};
|
|
61
61
|
font-size: ${Et};
|
|
62
|
-
font-weight: ${
|
|
63
|
-
letter-spacing: ${
|
|
64
|
-
line-height: ${
|
|
65
|
-
text-transform: ${
|
|
62
|
+
font-weight: ${Tt};
|
|
63
|
+
letter-spacing: ${Bt};
|
|
64
|
+
line-height: ${Lt};
|
|
65
|
+
text-transform: ${_t};
|
|
66
66
|
}
|
|
67
|
-
`,
|
|
67
|
+
`,ae=i.css`
|
|
68
68
|
.ft-typography--caption {
|
|
69
|
-
font-family: ${
|
|
70
|
-
font-size: ${
|
|
71
|
-
font-weight: ${
|
|
72
|
-
letter-spacing: ${
|
|
73
|
-
line-height: ${Wt};
|
|
74
|
-
text-transform: ${Lt};
|
|
75
|
-
}
|
|
76
|
-
`,hi=e.css`
|
|
77
|
-
.ft-typography--breadcrumb {
|
|
78
|
-
font-family: ${Dt};
|
|
79
|
-
font-size: ${Gt};
|
|
80
|
-
font-weight: ${Kt};
|
|
81
|
-
letter-spacing: ${Ht};
|
|
69
|
+
font-family: ${Ft};
|
|
70
|
+
font-size: ${Mt};
|
|
71
|
+
font-weight: ${Ut};
|
|
72
|
+
letter-spacing: ${Rt};
|
|
82
73
|
line-height: ${Pt};
|
|
74
|
+
text-transform: ${Zt};
|
|
75
|
+
}
|
|
76
|
+
`,he=i.css`
|
|
77
|
+
.ft-typography--breadcrumb {
|
|
78
|
+
font-family: ${Wt};
|
|
79
|
+
font-size: ${Dt};
|
|
80
|
+
font-weight: ${Ht};
|
|
81
|
+
letter-spacing: ${Gt};
|
|
82
|
+
line-height: ${Kt};
|
|
83
83
|
text-transform: ${Vt};
|
|
84
84
|
}
|
|
85
|
-
`,
|
|
85
|
+
`,pe=i.css`
|
|
86
86
|
.ft-typography--overline {
|
|
87
87
|
font-family: ${Xt};
|
|
88
88
|
font-size: ${qt};
|
|
89
89
|
font-weight: ${Yt};
|
|
90
90
|
letter-spacing: ${Jt};
|
|
91
91
|
line-height: ${Qt};
|
|
92
|
-
text-transform: ${
|
|
92
|
+
text-transform: ${te};
|
|
93
93
|
}
|
|
94
|
-
`,
|
|
94
|
+
`,de=i.css`
|
|
95
95
|
.ft-typography--button {
|
|
96
|
-
font-family: ${
|
|
97
|
-
font-size: ${
|
|
98
|
-
font-weight: ${
|
|
99
|
-
letter-spacing: ${
|
|
100
|
-
line-height: ${
|
|
101
|
-
text-transform: ${
|
|
102
|
-
}
|
|
103
|
-
`,
|
|
96
|
+
font-family: ${ee.fontFamily};
|
|
97
|
+
font-size: ${ee.fontSize};
|
|
98
|
+
font-weight: ${ee.fontWeight};
|
|
99
|
+
letter-spacing: ${ee.letterSpacing};
|
|
100
|
+
line-height: ${ee.lineHeight};
|
|
101
|
+
text-transform: ${ee.textTransform};
|
|
102
|
+
}
|
|
103
|
+
`,fe=i.css`
|
|
104
104
|
.ft-typography {
|
|
105
105
|
vertical-align: inherit;
|
|
106
106
|
}
|
|
107
|
-
`;var
|
|
107
|
+
`;var ce=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 ue extends e.FtLitElement{constructor(){super(...arguments),this.variant=Y.body1}render(){return this.element?q`
|
|
108
108
|
<${V(this.element)}
|
|
109
109
|
class="ft-typography ft-typography--${this.variant}">
|
|
110
110
|
<slot></slot>
|
|
111
111
|
</${V(this.element)}>
|
|
112
112
|
`:q`
|
|
113
113
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
114
|
-
`}}
|
|
114
|
+
`}}ue.styles=[ie,oe,ne,se,re,le,ae,he,pe,de,fe],ce([r.property()],ue.prototype,"element",void 0),ce([r.property()],ue.prototype,"variant",void 0),e.customElement("ft-typography")(ue);const ve=e.FtCssVariableFactory.extend("--ft-reader-internal-link-outline-color",e.designSystemVariables.colorPrimary),ge=i.css`
|
|
115
|
+
:host {
|
|
116
|
+
display: contents;
|
|
117
|
+
}
|
|
118
|
+
|
|
115
119
|
a:focus {
|
|
116
|
-
outline-color: ${
|
|
120
|
+
outline-color: ${ve};
|
|
117
121
|
}
|
|
118
122
|
|
|
119
123
|
.ft-reader-link--remove-style {
|
|
120
124
|
text-decoration: none;
|
|
121
125
|
color: inherit;
|
|
122
126
|
}
|
|
123
|
-
`;var
|
|
124
|
-
<a class=${
|
|
127
|
+
`;var xe,ye,be=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 me extends d{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
|
+
<a class=${e}
|
|
125
129
|
href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
|
|
126
130
|
@click=${t=>this.onClick(t)}>
|
|
127
131
|
<slot></slot>
|
|
128
132
|
</a>
|
|
129
|
-
`}onClick(t){var
|
|
133
|
+
`}onClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber)))}}me.styles=ge,be([r.property()],me.prototype,"tocId",void 0),be([r.property()],me.prototype,"section",void 0),be([r.property({type:Number})],me.prototype,"pageNumber",void 0),be([r.property({type:Boolean})],me.prototype,"removeStyle",void 0),e.customElement("ft-reader-internal-link")(me),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=""}(xe||(xe={})),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=""}(ye||(ye={})),new Map([...["abw"].map((t=>[t,ye.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,ye.AUDIO])),...["avi"].map((t=>[t,ye.AVI])),...["chm","xhs"].map((t=>[t,ye.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,ye.CODE])),...["csv"].map((t=>[t,ye.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,ye.DITA])),...["epub"].map((t=>[t,ye.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,ye.EXCEL])),...["flac"].map((t=>[t,ye.FLAC])),...["gif"].map((t=>[t,ye.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,ye.GZIP])),...["html","htm","xhtml"].map((t=>[t,ye.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,ye.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,ye.JPEG])),...["json"].map((t=>[t,ye.JSON])),...["m4a","m4p"].map((t=>[t,ye.M4A])),...["mov","qt"].map((t=>[t,ye.MOV])),...["mp3"].map((t=>[t,ye.MP3])),...["mp4","m4v"].map((t=>[t,ye.MP4])),...["ogg","oga"].map((t=>[t,ye.OGG])),...["pdf","ps"].map((t=>[t,ye.PDF])),...["png"].map((t=>[t,ye.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,ye.POWERPOINT])),...["rar"].map((t=>[t,ye.RAR])),...["stp"].map((t=>[t,ye.STP])),...["txt","rtf","md","mdown"].map((t=>[t,ye.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,ye.VIDEO])),...["wav"].map((t=>[t,ye.WAV])),...["wma"].map((t=>[t,ye.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,ye.WORD])),...["xml","xsl","rdf"].map((t=>[t,ye.XML])),...["yaml","yml","x-yaml"].map((t=>[t,ye.YAML])),...["zip"].map((t=>[t,ye.ZIP]))]);const $e={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")},we=i.css`
|
|
130
134
|
:host {
|
|
131
135
|
display: inline-block;
|
|
132
136
|
}
|
|
133
137
|
|
|
134
138
|
:host, i.ft-icon {
|
|
135
|
-
width: ${$
|
|
136
|
-
height: ${$
|
|
139
|
+
width: ${$e.size};
|
|
140
|
+
height: ${$e.size};
|
|
137
141
|
text-align: center;
|
|
138
142
|
}
|
|
139
143
|
|
|
140
144
|
i.ft-icon {
|
|
141
|
-
font-size: ${$
|
|
145
|
+
font-size: ${$e.size};
|
|
142
146
|
line-height: 1;
|
|
143
147
|
font-weight: normal;
|
|
144
148
|
text-transform: none;
|
|
@@ -149,26 +153,26 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
149
153
|
text-rendering: auto;
|
|
150
154
|
-webkit-font-smoothing: antialiased;
|
|
151
155
|
-moz-osx-font-smoothing: grayscale;
|
|
152
|
-
vertical-align: ${$
|
|
156
|
+
vertical-align: ${$e.verticalAlign};
|
|
153
157
|
}
|
|
154
158
|
|
|
155
159
|
.ft-icon--fluid-topics {
|
|
156
|
-
font-family: ${$
|
|
160
|
+
font-family: ${$e.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
157
161
|
}
|
|
158
162
|
|
|
159
163
|
.ft-icon--file-format {
|
|
160
|
-
font-family: ${$
|
|
164
|
+
font-family: ${$e.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
161
165
|
}
|
|
162
166
|
|
|
163
167
|
.ft-icon--material {
|
|
164
|
-
font-family: ${$
|
|
168
|
+
font-family: ${$e.materialFontFamily}, "Material Icons", sans-serif;
|
|
165
169
|
}
|
|
166
|
-
`;var
|
|
170
|
+
`;var ke;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(ke||(ke={}));var ze=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 Ce extends e.FtLitElement{constructor(){super(...arguments),this.variant=ke.fluid_topics,this.resolvedIcon=i.nothing}render(){const t="material"!==this.variant||this.value;return i.html`
|
|
167
171
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
168
|
-
${
|
|
172
|
+
${l.unsafeHTML(this.resolvedIcon)}
|
|
169
173
|
<slot ?hidden=${t}></slot>
|
|
170
174
|
</i>
|
|
171
|
-
`}get textContent(){var t,
|
|
175
|
+
`}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 ke.file_format:this.resolvedIcon=null!==(t=ye[o.toUpperCase()])&&void 0!==t?t:o;break;case ke.fluid_topics:this.resolvedIcon=null!==(e=xe[o.toUpperCase()])&&void 0!==e?e:o;break;default:this.resolvedIcon=this.value||i.nothing}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}Ce.elementDefinitions={},Ce.styles=we,ze([r.property()],Ce.prototype,"variant",void 0),ze([r.property()],Ce.prototype,"value",void 0),ze([r.state()],Ce.prototype,"resolvedIcon",void 0),ze([r.query("slot")],Ce.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Ce);const Se=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),Ne={color:Se,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",Se),opacityContentOnSurfacePressed:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},Oe=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),Ae=Oe,Ie=e.FtCssVariableFactory.extend("--ft-ripple-background-color",Oe),je=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),Ee=je,Te=e.FtCssVariableFactory.extend("--ft-ripple-background-color",je),Be=i.css`
|
|
172
176
|
:host {
|
|
173
177
|
display: contents;
|
|
174
178
|
}
|
|
@@ -190,27 +194,27 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
190
194
|
}
|
|
191
195
|
|
|
192
196
|
.ft-ripple .ft-ripple--background {
|
|
193
|
-
background-color: ${
|
|
197
|
+
background-color: ${Ne.backgroundColor};
|
|
194
198
|
}
|
|
195
199
|
|
|
196
200
|
.ft-ripple .ft-ripple--effect {
|
|
197
|
-
background-color: ${
|
|
201
|
+
background-color: ${Ne.color};
|
|
198
202
|
}
|
|
199
203
|
|
|
200
204
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
201
|
-
background-color: ${
|
|
205
|
+
background-color: ${Te};
|
|
202
206
|
}
|
|
203
207
|
|
|
204
208
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
205
|
-
background-color: ${
|
|
209
|
+
background-color: ${Ee};
|
|
206
210
|
}
|
|
207
211
|
|
|
208
212
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
209
|
-
background-color: ${
|
|
213
|
+
background-color: ${Ie};
|
|
210
214
|
}
|
|
211
215
|
|
|
212
216
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
213
|
-
background-color: ${
|
|
217
|
+
background-color: ${Ae};
|
|
214
218
|
}
|
|
215
219
|
|
|
216
220
|
.ft-ripple .ft-ripple--background {
|
|
@@ -242,22 +246,22 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
242
246
|
}
|
|
243
247
|
|
|
244
248
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
245
|
-
opacity: ${
|
|
249
|
+
opacity: ${Ne.opacityContentOnSurfaceHover};
|
|
246
250
|
}
|
|
247
251
|
|
|
248
252
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
249
|
-
opacity: ${
|
|
253
|
+
opacity: ${Ne.opacityContentOnSurfaceSelected};
|
|
250
254
|
}
|
|
251
255
|
|
|
252
256
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
253
|
-
opacity: ${
|
|
257
|
+
opacity: ${Ne.opacityContentOnSurfaceFocused};
|
|
254
258
|
}
|
|
255
259
|
|
|
256
260
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
257
|
-
opacity: ${
|
|
261
|
+
opacity: ${Ne.opacityContentOnSurfacePressed};
|
|
258
262
|
transform: translate(-50%, -50%) scale(1);
|
|
259
263
|
}
|
|
260
|
-
`;var
|
|
264
|
+
`;var Le=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 _e extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y: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.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`
|
|
261
265
|
<style>
|
|
262
266
|
.ft-ripple .ft-ripple--effect,
|
|
263
267
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -274,7 +278,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
274
278
|
<div class="ft-ripple--background"></div>
|
|
275
279
|
<div class="ft-ripple--effect"></div>
|
|
276
280
|
</div>
|
|
277
|
-
`}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
|
|
281
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),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}}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}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}_e.elementDefinitions={},_e.styles=Be,Le([r.property({type:Boolean})],_e.prototype,"primary",void 0),Le([r.property({type:Boolean})],_e.prototype,"secondary",void 0),Le([r.property({type:Boolean})],_e.prototype,"unbounded",void 0),Le([r.property({type:Boolean})],_e.prototype,"activated",void 0),Le([r.property({type:Boolean})],_e.prototype,"selected",void 0),Le([r.property({type:Boolean})],_e.prototype,"disabled",void 0),Le([r.state()],_e.prototype,"hovered",void 0),Le([r.state()],_e.prototype,"focused",void 0),Le([r.state()],_e.prototype,"pressed",void 0),Le([r.state()],_e.prototype,"rippling",void 0),Le([r.state()],_e.prototype,"rippleSize",void 0),Le([r.state()],_e.prototype,"originX",void 0),Le([r.state()],_e.prototype,"originY",void 0),Le([r.query(".ft-ripple")],_e.prototype,"ripple",void 0),Le([r.query(".ft-ripple--effect")],_e.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(_e);const Fe=e.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),Me=e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),Ue=e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),Re=e.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),Pe=e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),Ze=e.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),We=i.css`
|
|
278
282
|
.ft-tooltip--container {
|
|
279
283
|
display: block;
|
|
280
284
|
position: relative;
|
|
@@ -290,23 +294,23 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
290
294
|
box-sizing: border-box;
|
|
291
295
|
overflow: hidden;
|
|
292
296
|
width: max-content;
|
|
293
|
-
max-width: ${
|
|
297
|
+
max-width: ${Ze};
|
|
294
298
|
text-align: center;
|
|
295
|
-
padding: ${
|
|
296
|
-
z-index: ${
|
|
299
|
+
padding: ${Fe};
|
|
300
|
+
z-index: ${Re};
|
|
297
301
|
}
|
|
298
302
|
|
|
299
303
|
.ft-tooltip--content {
|
|
300
304
|
padding: 4px 8px;
|
|
301
|
-
border-radius: ${
|
|
302
|
-
background-color: ${
|
|
303
|
-
color: ${
|
|
305
|
+
border-radius: ${Pe};
|
|
306
|
+
background-color: ${Ue};
|
|
307
|
+
color: ${Me};
|
|
304
308
|
top: -500px;
|
|
305
309
|
left: -500px;
|
|
306
310
|
position: relative;
|
|
307
311
|
word-break: break-word;
|
|
308
312
|
}
|
|
309
|
-
`;var
|
|
313
|
+
`;var De=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 He extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new e.Debouncer,this.revealDebouncer=new e.Debouncer}render(){return i.html`
|
|
310
314
|
<div part="container"
|
|
311
315
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
312
316
|
@mouseenter=${this.onHover}
|
|
@@ -322,7 +326,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
322
326
|
</div>
|
|
323
327
|
<slot></slot>
|
|
324
328
|
</div>
|
|
325
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((
|
|
329
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}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.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 e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.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=e.height,n=o;break;case"left":s=i,n=-this.tooltip.clientWidth;break;case"right":s=i,n=e.width}e.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+n<0&&(n=0);const r=this.tooltip.style;r.left=n+"px",r.top=s+"px",r.maxWidth=`max(${e.width}px, ${Ze})`}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())}}He.elementDefinitions={"ft-typography":ue},He.styles=We,De([r.property()],He.prototype,"text",void 0),De([r.property({type:Boolean})],He.prototype,"manual",void 0),De([r.property({type:Boolean})],He.prototype,"inline",void 0),De([r.property({type:Number})],He.prototype,"delay",void 0),De([r.property()],He.prototype,"position",void 0),De([r.queryAssignedNodes("",!0)],He.prototype,"slotNodes",void 0),De([r.query(".ft-tooltip--container")],He.prototype,"container",void 0),De([r.query("slot")],He.prototype,"target",void 0),De([r.query(".ft-tooltip")],He.prototype,"tooltip",void 0),De([r.query(".ft-tooltip--content")],He.prototype,"tooltipContent",void 0),De([r.state()],He.prototype,"visible",void 0),e.customElement("ft-tooltip")(He);const Ge={color:e.FtCssVariableFactory.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Ke=i.css`
|
|
326
330
|
:host {
|
|
327
331
|
line-height: 0;
|
|
328
332
|
}
|
|
@@ -331,8 +335,8 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
331
335
|
display: inline-block;
|
|
332
336
|
position: relative;
|
|
333
337
|
|
|
334
|
-
width: ${
|
|
335
|
-
height: ${
|
|
338
|
+
width: ${Ge.size};
|
|
339
|
+
height: ${Ge.size};
|
|
336
340
|
}
|
|
337
341
|
|
|
338
342
|
.ft-loader div {
|
|
@@ -341,7 +345,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
341
345
|
width: 25%;
|
|
342
346
|
height: 25%;
|
|
343
347
|
border-radius: 50%;
|
|
344
|
-
background: ${
|
|
348
|
+
background: ${Ge.color};
|
|
345
349
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
346
350
|
}
|
|
347
351
|
|
|
@@ -388,17 +392,17 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
388
392
|
transform: translate(0, 0);
|
|
389
393
|
}
|
|
390
394
|
100% {
|
|
391
|
-
transform: translate(calc(0.35 * ${
|
|
395
|
+
transform: translate(calc(0.35 * ${Ge.size}), 0);
|
|
392
396
|
}
|
|
393
397
|
}
|
|
394
|
-
`;class
|
|
398
|
+
`;class Ve extends e.FtLitElement{render(){return i.html`
|
|
395
399
|
<div class="ft-loader">
|
|
396
400
|
<div></div>
|
|
397
401
|
<div></div>
|
|
398
402
|
<div></div>
|
|
399
403
|
<div></div>
|
|
400
404
|
</div>
|
|
401
|
-
`}}
|
|
405
|
+
`}}Ve.styles=Ke,e.customElement("ft-loader")(Ve);const Xe=e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorPrimary),qe={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorSurface),borderRadius:e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusL),color:Xe,fontSize:e.FtCssVariableFactory.extend("--ft-button-font-size",ee.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:e.FtCssVariableFactory.extend("--ft-button-ripple-color",Xe),opacityDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},Ye=e.FtCssVariableFactory.extend("--ft-button-primary-color",e.FtCssVariableFactory.extend("--ft-button-color",e.designSystemVariables.colorOnPrimary)),Je={backgroundColor:e.FtCssVariableFactory.extend("--ft-button-primary-background-color",e.FtCssVariableFactory.extend("--ft-button-background-color",e.designSystemVariables.colorPrimary)),color:Ye,rippleColor:e.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Ye)},Qe=e.FtCssVariableFactory.extend("--ft-button-dense-border-radius",e.FtCssVariableFactory.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusM)),ti=[e.noTextSelect,i.css`
|
|
402
406
|
:host {
|
|
403
407
|
display: inline-block;
|
|
404
408
|
max-width: 100%;
|
|
@@ -409,7 +413,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
409
413
|
box-shadow: 0px 0px 0px transparent;
|
|
410
414
|
border: 0px solid transparent;
|
|
411
415
|
text-shadow: 0px 0px 0px transparent;
|
|
412
|
-
font-size: ${
|
|
416
|
+
font-size: ${qe.fontSize};
|
|
413
417
|
}
|
|
414
418
|
|
|
415
419
|
button:hover {
|
|
@@ -438,17 +442,17 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
438
442
|
border: none;
|
|
439
443
|
pointer-events: auto;
|
|
440
444
|
|
|
441
|
-
--ft-button-internal-line-height: calc(${
|
|
442
|
-
--ft-button-internal-color: ${
|
|
443
|
-
${
|
|
445
|
+
--ft-button-internal-line-height: calc(${qe.fontSize} + 2px);
|
|
446
|
+
--ft-button-internal-color: ${qe.color};
|
|
447
|
+
${e.setVariable($e.size,qe.iconSize)};
|
|
444
448
|
--ft-button-internal-vertical-padding: 6px;
|
|
445
449
|
--ft-button-internal-horizontal-padding: 8px;
|
|
446
|
-
${
|
|
447
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
450
|
+
${e.setVariable(Ne.color,qe.rippleColor)};
|
|
451
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${qe.iconSize});
|
|
448
452
|
|
|
449
|
-
border-radius: ${
|
|
453
|
+
border-radius: ${qe.borderRadius};
|
|
450
454
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
451
|
-
background-color: ${
|
|
455
|
+
background-color: ${qe.backgroundColor};
|
|
452
456
|
color: var(--ft-button-internal-color);
|
|
453
457
|
-webkit-mask-image: radial-gradient(white, black);
|
|
454
458
|
}
|
|
@@ -460,7 +464,7 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
460
464
|
.ft-button--dense {
|
|
461
465
|
--ft-button-internal-vertical-padding: 2px;
|
|
462
466
|
--ft-button-internal-horizontal-padding: 4px;
|
|
463
|
-
border-radius: ${
|
|
467
|
+
border-radius: ${Qe};
|
|
464
468
|
}
|
|
465
469
|
|
|
466
470
|
.ft-button--round {
|
|
@@ -469,13 +473,13 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
469
473
|
|
|
470
474
|
.ft-button[disabled] {
|
|
471
475
|
filter: grayscale(1);
|
|
472
|
-
opacity: ${
|
|
476
|
+
opacity: ${qe.opacityDisabled};
|
|
473
477
|
}
|
|
474
478
|
|
|
475
479
|
.ft-button.ft-button--primary {
|
|
476
|
-
background-color: ${
|
|
477
|
-
--ft-button-internal-color: ${
|
|
478
|
-
${
|
|
480
|
+
background-color: ${Je.backgroundColor};
|
|
481
|
+
--ft-button-internal-color: ${Je.color};
|
|
482
|
+
${e.setVariable(Ne.color,Je.rippleColor)};
|
|
479
483
|
}
|
|
480
484
|
|
|
481
485
|
.ft-button.ft-button--outlined {
|
|
@@ -494,8 +498,8 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
494
498
|
text-overflow: ellipsis;
|
|
495
499
|
display: block;
|
|
496
500
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
497
|
-
${
|
|
498
|
-
${
|
|
501
|
+
${e.setVariable(ee.fontSize,"1em")};
|
|
502
|
+
${e.setVariable(ee.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
499
503
|
}
|
|
500
504
|
|
|
501
505
|
.ft-button--safari-fix .ft-button--label {
|
|
@@ -528,10 +532,10 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
528
532
|
}
|
|
529
533
|
|
|
530
534
|
ft-loader {
|
|
531
|
-
${
|
|
532
|
-
${
|
|
535
|
+
${e.setVariable(Ge.size,qe.iconSize)};
|
|
536
|
+
${e.setVariable(Ge.color,"var(--ft-button-internal-color)")};
|
|
533
537
|
}
|
|
534
|
-
`];var
|
|
538
|
+
`];var ei,ii=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 oi extends e.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=ke.material,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-button--safari-fix":e.isSafari,"ft-no-text-select":!0};return this.addTooltipIfNeeded(i.html`
|
|
535
539
|
<button part="button"
|
|
536
540
|
class="${n.classMap(t)}"
|
|
537
541
|
aria-label="${this.getLabel()}"
|
|
@@ -545,15 +549,15 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
545
549
|
</ft-typography>
|
|
546
550
|
${this.resolveIcon()}
|
|
547
551
|
</button>
|
|
548
|
-
`)}addTooltipIfNeeded(t){return this.getLabel().trim().length>0&&(this.forceTooltip||!this.hasTextContent()&&!this.hideTooltip)?
|
|
552
|
+
`)}addTooltipIfNeeded(t){return this.getLabel().trim().length>0&&(this.forceTooltip||!this.hasTextContent()&&!this.hideTooltip)?i.html`
|
|
549
553
|
<ft-tooltip part="tooltip"
|
|
550
554
|
text="${this.getLabel()}"
|
|
551
555
|
position="${this.tooltipPosition}">
|
|
552
556
|
${t}
|
|
553
557
|
</ft-tooltip>
|
|
554
|
-
`:t}resolveIcon(){return this.loading?
|
|
555
|
-
<ft-loader></ft-loader> `:this.icon?
|
|
556
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:
|
|
558
|
+
`:t}resolveIcon(){return this.loading?i.html`
|
|
559
|
+
<ft-loader></ft-loader> `:this.icon?i.html`
|
|
560
|
+
<ft-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}}oi.elementDefinitions={"ft-ripple":_e,"ft-tooltip":He,"ft-typography":ue,"ft-icon":Ce,"ft-loader":Ve},oi.styles=ti,ii([r.property({type:Boolean})],oi.prototype,"primary",void 0),ii([r.property({type:Boolean})],oi.prototype,"outlined",void 0),ii([r.property({type:Boolean})],oi.prototype,"disabled",void 0),ii([r.property({type:Boolean})],oi.prototype,"dense",void 0),ii([r.property({type:Boolean})],oi.prototype,"round",void 0),ii([r.property({type:String})],oi.prototype,"label",void 0),ii([r.property({type:String})],oi.prototype,"icon",void 0),ii([r.property({type:String})],oi.prototype,"iconVariant",void 0),ii([r.property({type:Boolean})],oi.prototype,"trailingIcon",void 0),ii([r.property({type:Boolean})],oi.prototype,"loading",void 0),ii([r.property({type:String})],oi.prototype,"tooltipPosition",void 0),ii([r.property({type:Boolean})],oi.prototype,"hideTooltip",void 0),ii([r.property({type:Boolean})],oi.prototype,"forceTooltip",void 0),ii([r.query(".ft-button")],oi.prototype,"button",void 0),ii([r.query(".ft-button--label slot")],oi.prototype,"slottedContent",void 0),e.customElement("ft-button")(oi),function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(ei||(ei={}));const ni=i.css`
|
|
557
561
|
.ft-size-watcher--pixel {
|
|
558
562
|
width: 0;
|
|
559
563
|
height: 0;
|
|
@@ -572,86 +576,127 @@ const H=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
572
576
|
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
573
577
|
width: 100%;
|
|
574
578
|
}
|
|
575
|
-
`;var
|
|
579
|
+
`;var si=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 ri extends CustomEvent{constructor(t,e){super("change",{detail:{size:t,category:e}})}}class li extends e.FtLitElement{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=ei.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new e.Debouncer}render(){return i.html`
|
|
576
580
|
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
577
581
|
<div class="ft-size-watcher--watcher"></div>
|
|
578
582
|
</div>
|
|
579
|
-
`}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=
|
|
583
|
+
`}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=ei.S:this.size<976?this.category=ei.M:this.size<1024?this.category=ei.L:this.size<1440?this.category=ei.XL:this.category=ei.XXL,this.dispatchEvent(new ri(this.size,this.category)))}),this.debounceTimeout)}}li.elementDefinitions={},li.styles=ni,si([r.property({type:Number})],li.prototype,"debounceTimeout",void 0),si([r.property({type:Boolean})],li.prototype,"local",void 0),si([r.property({type:Number,reflect:!0})],li.prototype,"size",void 0),si([r.property({type:String,reflect:!0})],li.prototype,"category",void 0),si([r.query(".ft-size-watcher--watcher")],li.prototype,"watcher",void 0),e.customElement("ft-size-watcher")(li);const ai={expand:"Expand {0}",collapse:"Collapse {0}",expandAll:"Expand all",expandAllLong:"Expand all table of contents",collapseAll:"Collapse all",collapseAllLong:"Collapse all table of contents"},hi={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")},pi=i.css`
|
|
580
584
|
.ft-reader-toc {
|
|
581
|
-
color: ${
|
|
585
|
+
color: ${hi.textColor};
|
|
582
586
|
}
|
|
583
587
|
|
|
584
588
|
.ft-reader-toc--node-highlighted > .ft-reader-toc--link-container {
|
|
585
|
-
background-color: ${
|
|
586
|
-
color: ${
|
|
587
|
-
${
|
|
589
|
+
background-color: ${hi.highlightedBackgroundColor};
|
|
590
|
+
color: ${hi.highlightedTextColor};
|
|
591
|
+
${e.setVariable(tt.fontWeight,hi.highlightedFontWeight)}
|
|
588
592
|
}
|
|
589
593
|
|
|
590
594
|
.ft-reader-toc--link-container {
|
|
591
595
|
display: flex;
|
|
592
596
|
gap: 4px;
|
|
593
|
-
padding: ${
|
|
597
|
+
padding: ${hi.verticalSpacing} 4px; /* left padding is override on inline style */
|
|
594
598
|
align-items: center;
|
|
595
599
|
}
|
|
596
600
|
|
|
601
|
+
.ft-reader-toc--link-container ft-reader-internal-link:hover {
|
|
602
|
+
color: ${hi.hoverColor};
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
ft-button {
|
|
606
|
+
${e.setVariable(qe.iconSize,hi.iconFontSize)};
|
|
607
|
+
}
|
|
608
|
+
|
|
597
609
|
.ft-reader-toc--toggle-container {
|
|
598
610
|
flex-shrink: 0;
|
|
599
611
|
}
|
|
600
612
|
|
|
601
613
|
.ft-reader-toc-mobile .ft-reader-toc--toggle-container {
|
|
602
|
-
width: calc(${
|
|
614
|
+
width: calc(${hi.iconFontSize} + 12px); /*--ft-button-internal-horizontal-padding: 8px; in ft-button NOT dense*/
|
|
603
615
|
}
|
|
604
616
|
|
|
605
617
|
.ft-reader-toc-desktop .ft-reader-toc--toggle-container {
|
|
606
|
-
width: calc(${
|
|
618
|
+
width: calc(${hi.iconFontSize} + 4px); /*--ft-button-internal-horizontal-padding: 4px; in ft-button dense*/
|
|
607
619
|
}
|
|
608
620
|
|
|
609
621
|
.ft-reader-toc-expanded .ft-reader-toc--toggle-container {
|
|
610
622
|
width: 0;
|
|
611
623
|
}
|
|
612
624
|
|
|
613
|
-
ft-
|
|
614
|
-
|
|
615
|
-
|
|
625
|
+
.ft-reader-toc-expand-collapse-all-container {
|
|
626
|
+
margin: 8px 4px;
|
|
627
|
+
display: flex;
|
|
616
628
|
}
|
|
617
|
-
|
|
618
|
-
|
|
629
|
+
|
|
630
|
+
.ft-reader-toc-expand-collapse-all-right {
|
|
631
|
+
justify-content: flex-end;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.ft-reader-toc-expand-collapse-all-center {
|
|
635
|
+
justify-content: center;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.ft-reader-toc-expand-collapse-all-justify ft-button {
|
|
639
|
+
flex-grow: 1;
|
|
640
|
+
}
|
|
641
|
+
`;var di=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 fi extends d{constructor(){super(...arguments),this.expanded=!1,this.iconVariant=ke.fluid_topics,this.collapseIcon="MINUS",this.expandIcon="PLUS",this.expandCollapseAll=!1,this.expandCollapseAllHideLabel=!1,this.expandCollapseAllTrailingIcon=!1,this.expandCollapseAllAlignment="left",this.expandCollapseAllHideIcon=!1,this.expandCollapseAllIconVariant=ke.fluid_topics,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(ai,{}),this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set,this.expandAll=!1,this.viewportSize=ei.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(ai,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===ei.S,"ft-reader-toc-desktop":this.viewportSize!==ei.S,"ft-reader-toc-loaded":null!=this.currentPage,"ft-reader-toc-expanded":this.expanded};return i.html`
|
|
642
|
+
${this.hideIfEmpty&&this.empty?i.html`
|
|
619
643
|
<style>
|
|
620
644
|
:host {
|
|
621
645
|
display: none !important;
|
|
622
646
|
}
|
|
623
647
|
</style>
|
|
624
|
-
`:
|
|
625
|
-
<div class=${n.classMap(
|
|
648
|
+
`:i.nothing}
|
|
649
|
+
<div class=${n.classMap(e)}>
|
|
626
650
|
<ft-size-watcher @change=${this.onViewportSizeChange}></ft-size-watcher>
|
|
651
|
+
${this.renderExpandCollapseAll()}
|
|
627
652
|
${o.repeat(null!==(t=this.toc)&&void 0!==t?t:[],(t=>t.tocId),(t=>this.renderNode(t)))}
|
|
628
653
|
</div>
|
|
629
|
-
`}
|
|
630
|
-
<div
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
654
|
+
`}renderExpandCollapseAll(){return this.expandCollapseAll&&!this.expanded&&this.nodesToExpandExist?i.html`
|
|
655
|
+
<div part="expand-collapse-all-container"
|
|
656
|
+
class="ft-reader-toc-expand-collapse-all-container ft-reader-toc-expand-collapse-all-${this.expandCollapseAllAlignment}">
|
|
657
|
+
<ft-button
|
|
658
|
+
part="expand-collapse-all"
|
|
659
|
+
iconVariant="${this.expandCollapseAllIconVariant}"
|
|
660
|
+
icon="${this.expandCollapseAllHideIcon?"":this.expandAll?this.collapseAllIcon||"ICON_COLLAPSE":this.expandAllIcon||"ICON_EXPAND"}"
|
|
661
|
+
label="${this.labelResolver.resolve(this.expandAll?"collapseAllLong":"expandAllLong")}"
|
|
662
|
+
tooltipPosition="${this.getExpandCollapseAllTooltipPosition()}"
|
|
663
|
+
?trailingIcon=${this.expandCollapseAllTrailingIcon}
|
|
664
|
+
@click=${()=>this.toggleExpandCollapseAll()}
|
|
665
|
+
>
|
|
666
|
+
${this.expandCollapseAllHideLabel?"":this.labelResolver.resolve(this.expandAll?"collapseAll":"expandAll")}
|
|
667
|
+
</ft-button>
|
|
668
|
+
</div>
|
|
669
|
+
`: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( ${hi.tabulationSize} * ${d} + 4px)`};return i.html`
|
|
670
|
+
<div class="ft-reader-toc--node ${l?"ft-reader-toc--node-highlighted":""}">
|
|
671
|
+
<div class="ft-reader-toc--link-container" data-depth="${t.depth}" style=${s.styleMap(f)}>
|
|
672
|
+
${this.nodesToExpandExist&&!this.expanded?i.html`
|
|
673
|
+
<div class="ft-reader-toc--toggle-container">
|
|
674
|
+
${h?i.html`
|
|
675
|
+
<ft-button
|
|
676
|
+
part="expand-collapse-node"
|
|
677
|
+
round hideTooltip
|
|
678
|
+
?dense=${this.viewportSize!==ei.S}
|
|
679
|
+
label="${this.labelResolver.resolve(a?"collapse":"expand",t.title)}"
|
|
680
|
+
iconVariant="${this.iconVariant}"
|
|
681
|
+
icon="${a?this.collapseIcon||"MINUS":this.expandIcon||"PLUS"}"
|
|
682
|
+
@click=${()=>this.manuallyToggle(t.tocId,a)}
|
|
683
|
+
data-expand-node="${t.tocId}"
|
|
684
|
+
>
|
|
685
|
+
</ft-button>
|
|
686
|
+
`:i.nothing}
|
|
687
|
+
</div>
|
|
688
|
+
`:i.nothing}
|
|
645
689
|
<ft-reader-internal-link
|
|
690
|
+
part="node-link"
|
|
646
691
|
tocId="${t.tocId}"
|
|
647
692
|
removeStyle>
|
|
648
|
-
<ft-typography variant="body2">${t.title}</ft-typography>
|
|
693
|
+
<ft-typography part="node-label" variant="body2">${t.title}</ft-typography>
|
|
649
694
|
</ft-reader-internal-link>
|
|
650
695
|
</div>
|
|
651
|
-
${h?
|
|
696
|
+
${h?i.html`
|
|
652
697
|
<div class="ft-reader-toc--node-children">
|
|
653
|
-
${
|
|
698
|
+
${a?o.repeat(t.children,(t=>t.tocId),(t=>this.renderNode(t))):i.nothing}
|
|
654
699
|
</div>
|
|
655
|
-
`:
|
|
700
|
+
`:i.nothing}
|
|
656
701
|
</div>
|
|
657
|
-
`}buildAutomaticallyExpandedNodes(t){var i,
|
|
702
|
+
`}buildAutomaticallyExpandedNodes(t){var e,i,o,n;let s=new Set(this.autoCollapse?[]:this.automaticallyExpandedNodes);for(let r of t){let t=null===(i=null===(e=this.service)||void 0===e?void 0:e.getTocNodeNow(r))||void 0===i?void 0:i.parentTocId;for(;t&&!s.has(t);)s.add(t),this.manuallyCollapsedNodes.delete(t),t=null===(n=null===(o=this.service)||void 0===o?void 0:o.getTocNodeNow(t))||void 0===n?void 0:n.parentTocId}return s}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"}}}fi.elementDefinitions={"ft-button":oi,"ft-reader-internal-link":me,"ft-size-watcher":li,"ft-typography":ue},fi.styles=pi,di([r.property({type:Boolean})],fi.prototype,"expanded",void 0),di([r.property()],fi.prototype,"iconVariant",void 0),di([r.property()],fi.prototype,"collapseIcon",void 0),di([r.property()],fi.prototype,"expandIcon",void 0),di([r.property({type:Boolean})],fi.prototype,"expandCollapseAll",void 0),di([r.property({type:Boolean})],fi.prototype,"expandCollapseAllHideLabel",void 0),di([r.property({type:Boolean})],fi.prototype,"expandCollapseAllTrailingIcon",void 0),di([r.property()],fi.prototype,"expandCollapseAllAlignment",void 0),di([r.property({type:Boolean})],fi.prototype,"expandCollapseAllHideIcon",void 0),di([r.property()],fi.prototype,"expandCollapseAllIconVariant",void 0),di([r.property()],fi.prototype,"collapseAllIcon",void 0),di([r.property()],fi.prototype,"expandAllIcon",void 0),di([r.property({type:Boolean})],fi.prototype,"autoCollapse",void 0),di([r.property()],fi.prototype,"scope",void 0),di([r.property({type:Boolean})],fi.prototype,"hideIfEmpty",void 0),di([r.property({type:Boolean,reflect:!0})],fi.prototype,"empty",void 0),di([e.jsonProperty({})],fi.prototype,"labels",void 0),di([e.redux(((t,e)=>{var i,o,n;return e.isCurrentPageToc?(null===(i=t.map)||void 0===i?void 0:i.shouldSplitCurrentPageToc)?null===(o=t.currentPage)||void 0===o?void 0:o.toc:void 0:(null===(n=t.map)||void 0===n?void 0:n.shouldSplitCurrentPageToc)?t.pagesToc:t.toc}))],fi.prototype,"toc",void 0),di([e.redux((t=>{var e;return null===(e=t.map)||void 0===e?void 0:e.shouldSplitCurrentPageToc}))],fi.prototype,"splitToc",void 0),di([e.redux()],fi.prototype,"currentPage",void 0),di([e.redux(((t,e)=>{var i,o;return(null===(i=t.map)||void 0===i?void 0:i.shouldSplitCurrentPageToc)&&!e.isCurrentPageToc?[null===(o=t.currentPage)||void 0===o?void 0:o.rootTocId]:t.visibleTopics}))],fi.prototype,"highlightedTocIds",void 0),di([r.state({hasChanged:(t,i)=>!e.deepEqual(t,i)})],fi.prototype,"automaticallyExpandedNodes",void 0),di([r.state({hasChanged:(t,i)=>!e.deepEqual(t,i)})],fi.prototype,"manuallyExpandedNodes",void 0),di([r.state({hasChanged:(t,i)=>!e.deepEqual(t,i)})],fi.prototype,"manuallyCollapsedNodes",void 0),di([r.state()],fi.prototype,"expandAll",void 0),di([r.state()],fi.prototype,"viewportSize",void 0),e.customElement("ft-reader-toc")(fi),t.DEFAULT_LABELS=ai,t.FtReaderToc=fi,t.FtReaderTocCssVariables=hi,t.styles=pi,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litStyleMap,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML);
|