@fluid-topics/ft-reader-metadata 0.3.19 → 0.3.20
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-metadata.light.js +126 -126
- package/build/ft-reader-metadata.min.js +154 -154
- package/package.json +5 -5
|
@@ -2,115 +2,115 @@
|
|
|
2
2
|
:host {
|
|
3
3
|
display: inline-block;
|
|
4
4
|
}
|
|
5
|
-
`;var l,p=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class a extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class h extends i.FtLitElementRedux{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 a)),10)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}p([o.state()],h.prototype,"stateManager",void 0);const f=
|
|
5
|
+
`;var l,p=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class a extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class h extends i.FtLitElementRedux{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 a)),10)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}p([o.state()],h.prototype,"stateManager",void 0);const f=window,c=f.trustedTypes,d=c?c.createPolicy("lit-html",{createHTML:t=>t}):void 0,g=`lit$${(Math.random()+"").slice(9)}$`,u="?"+g,y=`<${u}>`,x=document,v=(t="")=>x.createComment(t),m=t=>null===t||"object"!=typeof t&&"function"!=typeof t,b=Array.isArray,$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,w=/-->/g,k=/>/g,z=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),O=/'/g,C=/"/g,S=/^(?:script|style|textarea|title)$/i,j=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),N=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),E=new WeakMap,A=x.createTreeWalker(x,129,null,!1),B=(t,i)=>{const e=t.length-1,o=[];let n,s=2===i?"<svg>":"",r=$;for(let i=0;i<e;i++){const e=t[i];let l,p,a=-1,h=0;for(;h<e.length&&(r.lastIndex=h,p=r.exec(e),null!==p);)h=r.lastIndex,r===$?"!--"===p[1]?r=w:void 0!==p[1]?r=k:void 0!==p[2]?(S.test(p[2])&&(n=RegExp("</"+p[2],"g")),r=z):void 0!==p[3]&&(r=z):r===z?">"===p[0]?(r=null!=n?n:$,a=-1):void 0===p[1]?a=-2:(a=r.lastIndex-p[2].length,l=p[1],r=void 0===p[3]?z:'"'===p[3]?C:O):r===C||r===O?r=z:r===w||r===k?r=$:(r=z,n=void 0);const f=r===z&&t[i+1].startsWith("/>")?" ":"";s+=r===$?e+y:a>=0?(o.push(l),e.slice(0,a)+"$lit$"+e.slice(a)+g+f):e+g+(-2===a?(o.push(void 0),i):f)}const l=s+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==d?d.createHTML(l):l,o]};class F{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,s=0;const r=t.length-1,l=this.parts,[p,a]=B(t,i);if(this.el=F.createElement(p,e),A.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=A.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(g)){const e=a[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(g),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?Z:"?"===i[1]?W:"@"===i[1]?D:U})}else l.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(S.test(o.tagName)){const t=o.textContent.split(g),i=t.length-1;if(i>0){o.textContent=c?c.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],v()),A.nextNode(),l.push({type:2,index:++n});o.append(t[i],v())}}}else if(8===o.nodeType)if(o.data===u)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(g,t+1));)l.push({type:7,index:n}),t+=g.length-1}n++}}static createElement(t,i){const e=x.createElement("template");return e.innerHTML=t,e}}function T(t,i,e=t,o){var n,s,r,l;if(i===N)return i;let p=void 0!==o?null===(n=e._$Co)||void 0===n?void 0:n[o]:e._$Cl;const a=m(i)?void 0:i._$litDirective$;return(null==p?void 0:p.constructor)!==a&&(null===(s=null==p?void 0:p._$AO)||void 0===s||s.call(p,!1),void 0===a?p=void 0:(p=new a(t),p._$AT(t,e,o)),void 0!==o?(null!==(r=(l=e)._$Co)&&void 0!==r?r:l._$Co=[])[o]=p:e._$Cl=p),void 0!==p&&(i=T(t,p._$AS(t,i.values),p,o)),i}class M{constructor(t,i){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:x).importNode(e,!0);A.currentNode=n;let s=A.nextNode(),r=0,l=0,p=o[0];for(;void 0!==p;){if(r===p.index){let i;2===p.type?i=new _(s,s.nextSibling,this,t):1===p.type?i=new p.ctor(s,p.name,p.strings,this,t):6===p.type&&(i=new K(s,this,t)),this.u.push(i),p=o[++l]}r!==(null==p?void 0:p.index)&&(s=A.nextNode(),r++)}return n}p(t){let i=0;for(const e of this.u)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class _{constructor(t,i,e,o){var n;this.type=2,this._$AH=I,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cm=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=T(this,t,i),m(t)?t===I||null==t||""===t?(this._$AH!==I&&this._$AR(),this._$AH=I):t!==this._$AH&&t!==N&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>b(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==I&&m(this._$AH)?this._$AA.nextSibling.data=t:this.T(x.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=F.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.p(e);else{const t=new M(n,this),i=t.v(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let i=E.get(t.strings);return void 0===i&&E.set(t.strings,i=new F(t)),i}k(t){b(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const n of t)o===i.length?i.push(e=new _(this.O(v()),this.O(v()),this,this.options)):e=i[o],e._$AI(n),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cm=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class U{constructor(t,i,e,o,n){this.type=1,this._$AH=I,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=I}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let s=!1;if(void 0===n)t=T(this,t,i,0),s=!m(t)||t!==this._$AH&&t!==N,s&&(this._$AH=t);else{const o=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=T(this,o[e+r],i,r),l===N&&(l=this._$AH[r]),s||(s=!m(l)||l!==this._$AH[r]),l===I?t=I:t!==I&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}s&&!o&&this.j(t)}j(t){t===I?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Z extends U{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===I?void 0:t}}const R=c?c.emptyScript:"";class W extends U{constructor(){super(...arguments),this.type=4}j(t){t&&t!==I?this.element.setAttribute(this.name,R):this.element.removeAttribute(this.name)}}class D extends U{constructor(t,i,e,o,n){super(t,i,e,o,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=T(this,t,i,0))&&void 0!==e?e:I)===N)return;const o=this._$AH,n=t===I&&o!==I||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==I&&(o===I||n);n&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class K{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){T(this,t)}}const L=f.litHtmlPolyfillSupport;null==L||L(F,_),(null!==(l=f.litHtmlVersions)&&void 0!==l?l:f.litHtmlVersions=[]).push("2.4.0");
|
|
6
6
|
/**
|
|
7
7
|
* @license
|
|
8
8
|
* Copyright 2020 Google LLC
|
|
9
9
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
10
10
|
*/
|
|
11
|
-
const
|
|
11
|
+
const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t._$litStatic$},P=t=>({_$litStatic$:t,r:G}),q=new Map,X=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],l=[];let p,a=0,h=!1;for(;a<o;){for(p=i[a];a<o&&void 0!==(s=e[a],n=H(s));)p+=n+i[++a],h=!0;l.push(s),r.push(p),a++}if(a===o&&r.push(i[o]),h){const t=r.join("$$lit$$");void 0===(i=q.get(t))&&(r.raw=r,q.set(t,i=r)),e=l}return t(i,...e)})(j);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=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),Q=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),V={fontFamily:Q,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},tt=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",J),it=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",V.fontSize,"20px"),et=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",V.fontWeight,"normal"),ot=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",V.letterSpacing,"0.15px"),nt=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",V.lineHeight,"1.2"),st=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",V.textTransform,"inherit"),rt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",J),lt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",V.fontSize,"14px"),pt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",V.fontWeight,"normal"),at=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",V.letterSpacing,"0.105px"),ht=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",V.lineHeight,"1.7"),ft=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",V.textTransform,"inherit"),ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",Q),dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",V.fontSize,"16px"),gt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",V.fontWeight,"600"),ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",V.letterSpacing,"0.144px"),yt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",V.lineHeight,"1.5"),xt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",V.textTransform,"inherit"),vt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",Q),mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",V.fontSize,"14px"),bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",V.fontWeight,"normal"),$t=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",V.letterSpacing,"0.098px"),wt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",V.lineHeight,"1.7"),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",V.textTransform,"inherit"),zt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",Q),Ot=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",V.fontSize,"16px"),Ct=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",V.fontWeight,"normal"),St=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",V.letterSpacing,"0.496px"),jt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",V.lineHeight,"1.5"),Nt=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",V.textTransform,"inherit"),It={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",Q),fontSize:i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",V.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",V.fontWeight,"normal"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",V.letterSpacing,"0.252px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",V.lineHeight,"1.4"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",V.textTransform,"inherit")},Et=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",Q),At=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",V.fontSize,"12px"),Bt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",V.fontWeight,"normal"),Ft=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",V.letterSpacing,"0.396px"),Tt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",V.lineHeight,"1.33"),Mt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",V.textTransform,"inherit"),_t=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",Q),Ut=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",V.fontSize,"10px"),Zt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",V.fontWeight,"normal"),Rt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",V.letterSpacing,"0.33px"),Wt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",V.lineHeight,"1.6"),Dt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",V.textTransform,"inherit"),Kt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",Q),Lt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",V.fontSize,"10px"),Gt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",V.fontWeight,"normal"),Ht=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",V.letterSpacing,"1.5px"),Pt=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",V.lineHeight,"1.6"),qt=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",V.textTransform,"uppercase"),Xt=i.FtCssVariableFactory.extend("--ft-typography-button-font-family",Q),Yt=i.FtCssVariableFactory.extend("--ft-typography-button-font-size",V.fontSize,"14px"),Jt=i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",V.fontWeight,"600"),Qt=i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",V.letterSpacing,"1.246px"),Vt=i.FtCssVariableFactory.extend("--ft-typography-button-line-height",V.lineHeight,"1.15"),ti=i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",V.textTransform,"uppercase"),ii=e.css`
|
|
12
12
|
.ft-typography--title {
|
|
13
|
-
font-family: ${
|
|
14
|
-
font-size: ${
|
|
15
|
-
font-weight: ${
|
|
16
|
-
letter-spacing: ${
|
|
17
|
-
line-height: ${
|
|
18
|
-
text-transform: ${
|
|
19
|
-
}
|
|
20
|
-
`,ii=e.css`
|
|
21
|
-
.ft-typography--title-dense {
|
|
22
|
-
font-family: ${st};
|
|
23
|
-
font-size: ${rt};
|
|
24
|
-
font-weight: ${lt};
|
|
25
|
-
letter-spacing: ${pt};
|
|
26
|
-
line-height: ${at};
|
|
27
|
-
text-transform: ${ht};
|
|
13
|
+
font-family: ${tt};
|
|
14
|
+
font-size: ${it};
|
|
15
|
+
font-weight: ${et};
|
|
16
|
+
letter-spacing: ${ot};
|
|
17
|
+
line-height: ${nt};
|
|
18
|
+
text-transform: ${st};
|
|
28
19
|
}
|
|
29
20
|
`,ei=e.css`
|
|
30
|
-
.ft-typography--
|
|
31
|
-
font-family: ${
|
|
32
|
-
font-size: ${
|
|
33
|
-
font-weight: ${
|
|
34
|
-
letter-spacing: ${
|
|
35
|
-
line-height: ${
|
|
36
|
-
text-transform: ${
|
|
21
|
+
.ft-typography--title-dense {
|
|
22
|
+
font-family: ${rt};
|
|
23
|
+
font-size: ${lt};
|
|
24
|
+
font-weight: ${pt};
|
|
25
|
+
letter-spacing: ${at};
|
|
26
|
+
line-height: ${ht};
|
|
27
|
+
text-transform: ${ft};
|
|
37
28
|
}
|
|
38
29
|
`,oi=e.css`
|
|
30
|
+
.ft-typography--subtitle1 {
|
|
31
|
+
font-family: ${ct};
|
|
32
|
+
font-size: ${dt};
|
|
33
|
+
font-weight: ${gt};
|
|
34
|
+
letter-spacing: ${ut};
|
|
35
|
+
line-height: ${yt};
|
|
36
|
+
text-transform: ${xt};
|
|
37
|
+
}
|
|
38
|
+
`,ni=e.css`
|
|
39
39
|
.ft-typography--subtitle2 {
|
|
40
|
-
font-family: ${
|
|
41
|
-
font-size: ${
|
|
42
|
-
font-weight: ${
|
|
43
|
-
letter-spacing: ${
|
|
44
|
-
line-height: ${
|
|
45
|
-
text-transform: ${
|
|
40
|
+
font-family: ${vt};
|
|
41
|
+
font-size: ${mt};
|
|
42
|
+
font-weight: ${bt};
|
|
43
|
+
letter-spacing: ${$t};
|
|
44
|
+
line-height: ${wt};
|
|
45
|
+
text-transform: ${kt};
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
`,
|
|
48
|
+
`,si=e.css`
|
|
49
49
|
.ft-typography--body1 {
|
|
50
|
-
font-family: ${
|
|
51
|
-
font-size: ${
|
|
52
|
-
font-weight: ${
|
|
50
|
+
font-family: ${zt};
|
|
51
|
+
font-size: ${Ot};
|
|
52
|
+
font-weight: ${Ct};
|
|
53
53
|
letter-spacing: ${St};
|
|
54
|
-
line-height: ${
|
|
55
|
-
text-transform: ${
|
|
56
|
-
}
|
|
57
|
-
`,si=e.css`
|
|
58
|
-
.ft-typography--body2 {
|
|
59
|
-
font-family: ${Nt.fontFamily};
|
|
60
|
-
font-size: ${Nt.fontSize};
|
|
61
|
-
font-weight: ${Nt.fontWeight};
|
|
62
|
-
letter-spacing: ${Nt.letterSpacing};
|
|
63
|
-
line-height: ${Nt.lineHeight};
|
|
64
|
-
text-transform: ${Nt.textTransform};
|
|
54
|
+
line-height: ${jt};
|
|
55
|
+
text-transform: ${Nt};
|
|
65
56
|
}
|
|
66
57
|
`,ri=e.css`
|
|
67
|
-
.ft-typography--
|
|
68
|
-
font-family: ${It};
|
|
69
|
-
font-size: ${
|
|
70
|
-
font-weight: ${
|
|
71
|
-
letter-spacing: ${
|
|
72
|
-
line-height: ${
|
|
73
|
-
text-transform: ${
|
|
58
|
+
.ft-typography--body2 {
|
|
59
|
+
font-family: ${It.fontFamily};
|
|
60
|
+
font-size: ${It.fontSize};
|
|
61
|
+
font-weight: ${It.fontWeight};
|
|
62
|
+
letter-spacing: ${It.letterSpacing};
|
|
63
|
+
line-height: ${It.lineHeight};
|
|
64
|
+
text-transform: ${It.textTransform};
|
|
74
65
|
}
|
|
75
66
|
`,li=e.css`
|
|
76
|
-
.ft-typography--
|
|
77
|
-
font-family: ${
|
|
78
|
-
font-size: ${
|
|
79
|
-
font-weight: ${
|
|
80
|
-
letter-spacing: ${
|
|
81
|
-
line-height: ${
|
|
82
|
-
text-transform: ${
|
|
67
|
+
.ft-typography--caption {
|
|
68
|
+
font-family: ${Et};
|
|
69
|
+
font-size: ${At};
|
|
70
|
+
font-weight: ${Bt};
|
|
71
|
+
letter-spacing: ${Ft};
|
|
72
|
+
line-height: ${Tt};
|
|
73
|
+
text-transform: ${Mt};
|
|
83
74
|
}
|
|
84
75
|
`,pi=e.css`
|
|
85
|
-
.ft-typography--
|
|
86
|
-
font-family: ${
|
|
87
|
-
font-size: ${
|
|
88
|
-
font-weight: ${
|
|
89
|
-
letter-spacing: ${
|
|
90
|
-
line-height: ${
|
|
91
|
-
text-transform: ${
|
|
76
|
+
.ft-typography--breadcrumb {
|
|
77
|
+
font-family: ${_t};
|
|
78
|
+
font-size: ${Ut};
|
|
79
|
+
font-weight: ${Zt};
|
|
80
|
+
letter-spacing: ${Rt};
|
|
81
|
+
line-height: ${Wt};
|
|
82
|
+
text-transform: ${Dt};
|
|
92
83
|
}
|
|
93
84
|
`,ai=e.css`
|
|
94
|
-
.ft-typography--
|
|
95
|
-
font-family: ${
|
|
96
|
-
font-size: ${
|
|
97
|
-
font-weight: ${
|
|
98
|
-
letter-spacing: ${
|
|
99
|
-
line-height: ${
|
|
100
|
-
text-transform: ${
|
|
85
|
+
.ft-typography--overline {
|
|
86
|
+
font-family: ${Kt};
|
|
87
|
+
font-size: ${Lt};
|
|
88
|
+
font-weight: ${Gt};
|
|
89
|
+
letter-spacing: ${Ht};
|
|
90
|
+
line-height: ${Pt};
|
|
91
|
+
text-transform: ${qt};
|
|
101
92
|
}
|
|
102
93
|
`,hi=e.css`
|
|
94
|
+
.ft-typography--button {
|
|
95
|
+
font-family: ${Xt};
|
|
96
|
+
font-size: ${Yt};
|
|
97
|
+
font-weight: ${Jt};
|
|
98
|
+
letter-spacing: ${Qt};
|
|
99
|
+
line-height: ${Vt};
|
|
100
|
+
text-transform: ${ti};
|
|
101
|
+
}
|
|
102
|
+
`,fi=e.css`
|
|
103
103
|
.ft-typography {
|
|
104
104
|
vertical-align: inherit;
|
|
105
105
|
}
|
|
106
|
-
`;var
|
|
107
|
-
<${
|
|
106
|
+
`;var ci=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class di extends i.FtLitElement{constructor(){super(...arguments),this.variant=Y.body1}render(){return this.element?X`
|
|
107
|
+
<${P(this.element)}
|
|
108
108
|
class="ft-typography ft-typography--${this.variant}">
|
|
109
109
|
<slot></slot>
|
|
110
|
-
</${
|
|
111
|
-
`:
|
|
110
|
+
</${P(this.element)}>
|
|
111
|
+
`:X`
|
|
112
112
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
113
|
-
`}}
|
|
113
|
+
`}}di.styles=[ii,ei,oi,ni,si,ri,li,pi,ai,hi,fi],ci([o.property()],di.prototype,"element",void 0),ci([o.property()],di.prototype,"variant",void 0),i.customElement("ft-typography")(di);const gi=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),ui=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),yi=i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),xi=i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),vi=i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),mi=i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),bi=e.css`
|
|
114
114
|
.ft-tooltip--container {
|
|
115
115
|
display: block;
|
|
116
116
|
position: relative;
|
|
@@ -126,23 +126,23 @@ const L=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===L)return null==t?void 0:t
|
|
|
126
126
|
box-sizing: border-box;
|
|
127
127
|
overflow: hidden;
|
|
128
128
|
width: max-content;
|
|
129
|
-
max-width: ${
|
|
129
|
+
max-width: ${mi};
|
|
130
130
|
text-align: center;
|
|
131
|
-
padding: ${
|
|
132
|
-
z-index: ${
|
|
131
|
+
padding: ${gi};
|
|
132
|
+
z-index: ${xi};
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
.ft-tooltip--content {
|
|
136
136
|
padding: 4px 8px;
|
|
137
|
-
border-radius: ${
|
|
138
|
-
background-color: ${
|
|
139
|
-
color: ${
|
|
137
|
+
border-radius: ${vi};
|
|
138
|
+
background-color: ${yi};
|
|
139
|
+
color: ${ui};
|
|
140
140
|
top: -500px;
|
|
141
141
|
left: -500px;
|
|
142
142
|
position: relative;
|
|
143
143
|
word-break: break-word;
|
|
144
144
|
}
|
|
145
|
-
`;var
|
|
145
|
+
`;var $i=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class wi extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}render(){return e.html`
|
|
146
146
|
<div part="container"
|
|
147
147
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
148
148
|
@mouseenter=${this.onHover}
|
|
@@ -158,7 +158,7 @@ const L=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===L)return null==t?void 0:t
|
|
|
158
158
|
</div>
|
|
159
159
|
<slot></slot>
|
|
160
160
|
</div>
|
|
161
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has(
|
|
161
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let n=0,s=0;switch(this.position){case"top":s=-this.tooltip.clientHeight,n=o;break;case"bottom":s=i.height,n=o;break;case"left":s=e,n=-this.tooltip.clientWidth;break;case"right":s=e,n=i.width}i.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+n<0&&(n=0);const r=this.tooltip.style;r.left=n+"px",r.top=s+"px",r.maxWidth=`max(${i.width}px, ${mi})`}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())}}wi.elementDefinitions={"ft-typography":di},wi.styles=bi,$i([o.property()],wi.prototype,"text",void 0),$i([o.property({type:Boolean})],wi.prototype,"manual",void 0),$i([o.property({type:Boolean})],wi.prototype,"inline",void 0),$i([o.property({type:Number})],wi.prototype,"delay",void 0),$i([o.property()],wi.prototype,"position",void 0),$i([o.queryAssignedNodes("",!0)],wi.prototype,"slotNodes",void 0),$i([o.query(".ft-tooltip--container")],wi.prototype,"container",void 0),$i([o.query("slot")],wi.prototype,"target",void 0),$i([o.query(".ft-tooltip")],wi.prototype,"tooltip",void 0),$i([o.query(".ft-tooltip--content")],wi.prototype,"tooltipContent",void 0),$i([o.state()],wi.prototype,"visible",void 0),i.customElement("ft-tooltip")(wi);const ki=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),zi={color:ki,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",ki),opacityContentOnSurfacePressed:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},Oi=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),Ci=Oi,Si=i.FtCssVariableFactory.extend("--ft-ripple-background-color",Oi),ji=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),Ni=ji,Ii=i.FtCssVariableFactory.extend("--ft-ripple-background-color",ji),Ei=e.css`
|
|
162
162
|
:host {
|
|
163
163
|
display: contents;
|
|
164
164
|
}
|
|
@@ -180,19 +180,19 @@ const L=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===L)return null==t?void 0:t
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
.ft-ripple .ft-ripple--background {
|
|
183
|
-
background-color: ${
|
|
183
|
+
background-color: ${zi.backgroundColor};
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
.ft-ripple .ft-ripple--effect {
|
|
187
|
-
background-color: ${
|
|
187
|
+
background-color: ${zi.color};
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
191
|
-
background-color: ${
|
|
191
|
+
background-color: ${Ii};
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
195
|
-
background-color: ${
|
|
195
|
+
background-color: ${Ni};
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
@@ -200,7 +200,7 @@ const L=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===L)return null==t?void 0:t
|
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
203
|
-
background-color: ${
|
|
203
|
+
background-color: ${Ci};
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
.ft-ripple .ft-ripple--background {
|
|
@@ -232,22 +232,22 @@ const L=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===L)return null==t?void 0:t
|
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
235
|
-
opacity: ${
|
|
235
|
+
opacity: ${zi.opacityContentOnSurfaceHover};
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
239
|
-
opacity: ${
|
|
239
|
+
opacity: ${zi.opacityContentOnSurfaceSelected};
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
243
|
-
opacity: ${
|
|
243
|
+
opacity: ${zi.opacityContentOnSurfaceFocused};
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
247
|
-
opacity: ${
|
|
247
|
+
opacity: ${zi.opacityContentOnSurfacePressed};
|
|
248
248
|
transform: translate(-50%, -50%) scale(1);
|
|
249
249
|
}
|
|
250
|
-
`;var
|
|
250
|
+
`;var Ai,Bi,Fi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Ti extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new i.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var i,e;let{x:o,y:n}=this.getCoordinates(t),s=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-s.x:s.width/2),this.originY=Math.round(null!=n?n-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return e.html`
|
|
251
251
|
<style>
|
|
252
252
|
.ft-ripple .ft-ripple--effect,
|
|
253
253
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -264,19 +264,19 @@ const L=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===L)return null==t?void 0:t
|
|
|
264
264
|
<div class="ft-ripple--background"></div>
|
|
265
265
|
<div class="ft-ripple--effect"></div>
|
|
266
266
|
</div>
|
|
267
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const i=t,e=t;let o,n;return null!=i.x?({x:o,y:n}=i):null!=e.touches&&(o=e.touches[0].clientX,n=e.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}Bi.elementDefinitions={},Bi.styles=Ii,Ai([o.property({type:Boolean})],Bi.prototype,"primary",void 0),Ai([o.property({type:Boolean})],Bi.prototype,"secondary",void 0),Ai([o.property({type:Boolean})],Bi.prototype,"unbounded",void 0),Ai([o.property({type:Boolean})],Bi.prototype,"activated",void 0),Ai([o.property({type:Boolean})],Bi.prototype,"selected",void 0),Ai([o.property({type:Boolean})],Bi.prototype,"disabled",void 0),Ai([o.state()],Bi.prototype,"hovered",void 0),Ai([o.state()],Bi.prototype,"focused",void 0),Ai([o.state()],Bi.prototype,"pressed",void 0),Ai([o.state()],Bi.prototype,"rippling",void 0),Ai([o.state()],Bi.prototype,"rippleSize",void 0),Ai([o.state()],Bi.prototype,"originX",void 0),Ai([o.state()],Bi.prototype,"originY",void 0),Ai([o.query(".ft-ripple")],Bi.prototype,"ripple",void 0),Ai([o.query(".ft-ripple--effect")],Bi.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(Bi),function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(Ei||(Ei={})),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=""}(Ti||(Ti={})),new Map([...["abw"].map((t=>[t,Ti.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,Ti.AUDIO])),...["avi"].map((t=>[t,Ti.AVI])),...["chm","xhs"].map((t=>[t,Ti.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,Ti.CODE])),...["csv"].map((t=>[t,Ti.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ti.DITA])),...["epub"].map((t=>[t,Ti.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ti.EXCEL])),...["flac"].map((t=>[t,Ti.FLAC])),...["gif"].map((t=>[t,Ti.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ti.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ti.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,Ti.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ti.JPEG])),...["json"].map((t=>[t,Ti.JSON])),...["m4a","m4p"].map((t=>[t,Ti.M4A])),...["mov","qt"].map((t=>[t,Ti.MOV])),...["mp3"].map((t=>[t,Ti.MP3])),...["mp4","m4v"].map((t=>[t,Ti.MP4])),...["ogg","oga"].map((t=>[t,Ti.OGG])),...["pdf","ps"].map((t=>[t,Ti.PDF])),...["png"].map((t=>[t,Ti.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ti.POWERPOINT])),...["rar"].map((t=>[t,Ti.RAR])),...["stp"].map((t=>[t,Ti.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ti.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,Ti.VIDEO])),...["wav"].map((t=>[t,Ti.WAV])),...["wma"].map((t=>[t,Ti.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ti.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ti.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ti.YAML])),...["zip"].map((t=>[t,Ti.ZIP]))]);const Fi={size:i.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:i.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:i.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:i.FtCssVariableFactory.extend("--ft-icon-material-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:i.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},Mi=e.css`
|
|
267
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const i=t,e=t;let o,n;return null!=i.x?({x:o,y:n}=i):null!=e.touches&&(o=e.touches[0].clientX,n=e.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}Ti.elementDefinitions={},Ti.styles=Ei,Fi([o.property({type:Boolean})],Ti.prototype,"primary",void 0),Fi([o.property({type:Boolean})],Ti.prototype,"secondary",void 0),Fi([o.property({type:Boolean})],Ti.prototype,"unbounded",void 0),Fi([o.property({type:Boolean})],Ti.prototype,"activated",void 0),Fi([o.property({type:Boolean})],Ti.prototype,"selected",void 0),Fi([o.property({type:Boolean})],Ti.prototype,"disabled",void 0),Fi([o.state()],Ti.prototype,"hovered",void 0),Fi([o.state()],Ti.prototype,"focused",void 0),Fi([o.state()],Ti.prototype,"pressed",void 0),Fi([o.state()],Ti.prototype,"rippling",void 0),Fi([o.state()],Ti.prototype,"rippleSize",void 0),Fi([o.state()],Ti.prototype,"originX",void 0),Fi([o.state()],Ti.prototype,"originY",void 0),Fi([o.query(".ft-ripple")],Ti.prototype,"ripple",void 0),Fi([o.query(".ft-ripple--effect")],Ti.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(Ti),function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(Ai||(Ai={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(Bi||(Bi={})),new Map([...["abw"].map((t=>[t,Bi.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,Bi.AUDIO])),...["avi"].map((t=>[t,Bi.AVI])),...["chm","xhs"].map((t=>[t,Bi.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,Bi.CODE])),...["csv"].map((t=>[t,Bi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Bi.DITA])),...["epub"].map((t=>[t,Bi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Bi.EXCEL])),...["flac"].map((t=>[t,Bi.FLAC])),...["gif"].map((t=>[t,Bi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Bi.GZIP])),...["html","htm","xhtml"].map((t=>[t,Bi.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,Bi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Bi.JPEG])),...["json"].map((t=>[t,Bi.JSON])),...["m4a","m4p"].map((t=>[t,Bi.M4A])),...["mov","qt"].map((t=>[t,Bi.MOV])),...["mp3"].map((t=>[t,Bi.MP3])),...["mp4","m4v"].map((t=>[t,Bi.MP4])),...["ogg","oga"].map((t=>[t,Bi.OGG])),...["pdf","ps"].map((t=>[t,Bi.PDF])),...["png"].map((t=>[t,Bi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Bi.POWERPOINT])),...["rar"].map((t=>[t,Bi.RAR])),...["stp"].map((t=>[t,Bi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Bi.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,Bi.VIDEO])),...["wav"].map((t=>[t,Bi.WAV])),...["wma"].map((t=>[t,Bi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Bi.WORD])),...["xml","xsl","rdf"].map((t=>[t,Bi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Bi.YAML])),...["zip"].map((t=>[t,Bi.ZIP]))]);const Mi={size:i.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:i.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:i.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:i.FtCssVariableFactory.extend("--ft-icon-material-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:i.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},_i=e.css`
|
|
268
268
|
:host {
|
|
269
269
|
display: inline-block;
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
:host, i.ft-icon {
|
|
273
|
-
width: ${
|
|
274
|
-
height: ${
|
|
273
|
+
width: ${Mi.size};
|
|
274
|
+
height: ${Mi.size};
|
|
275
275
|
text-align: center;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
i.ft-icon {
|
|
279
|
-
font-size: ${
|
|
279
|
+
font-size: ${Mi.size};
|
|
280
280
|
line-height: 1;
|
|
281
281
|
font-weight: normal;
|
|
282
282
|
text-transform: none;
|
|
@@ -287,26 +287,26 @@ const L=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===L)return null==t?void 0:t
|
|
|
287
287
|
text-rendering: auto;
|
|
288
288
|
-webkit-font-smoothing: antialiased;
|
|
289
289
|
-moz-osx-font-smoothing: grayscale;
|
|
290
|
-
vertical-align: ${
|
|
290
|
+
vertical-align: ${Mi.verticalAlign};
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
.ft-icon--fluid-topics {
|
|
294
|
-
font-family: ${
|
|
294
|
+
font-family: ${Mi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
.ft-icon--file-format {
|
|
298
|
-
font-family: ${
|
|
298
|
+
font-family: ${Mi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
.ft-icon--material {
|
|
302
|
-
font-family: ${
|
|
302
|
+
font-family: ${Mi.materialFontFamily}, "Material Icons", sans-serif;
|
|
303
303
|
}
|
|
304
|
-
`;var
|
|
304
|
+
`;var Ui;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ui||(Ui={}));var Zi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Ri extends i.FtLitElement{constructor(){super(...arguments),this.variant=Ui.fluid_topics,this.resolvedIcon=e.nothing}render(){const t="material"!==this.variant||this.value;return e.html`
|
|
305
305
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
306
306
|
${s.unsafeHTML(this.resolvedIcon)}
|
|
307
307
|
<slot ?hidden=${t}></slot>
|
|
308
308
|
</i>
|
|
309
|
-
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case
|
|
309
|
+
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case Ui.file_format:this.resolvedIcon=null!==(t=Bi[o.toUpperCase()])&&void 0!==t?t:o;break;case Ui.fluid_topics:this.resolvedIcon=null!==(i=Ai[o.toUpperCase()])&&void 0!==i?i:o;break;default:this.resolvedIcon=this.value||e.nothing}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}Ri.elementDefinitions={},Ri.styles=_i,Zi([o.property()],Ri.prototype,"variant",void 0),Zi([o.property()],Ri.prototype,"value",void 0),Zi([o.state()],Ri.prototype,"resolvedIcon",void 0),Zi([o.query("slot")],Ri.prototype,"slottedContent",void 0),i.customElement("ft-icon")(Ri);const Wi=i.FtCssVariableFactory.extend("--ft-chip-color",i.designSystemVariables.colorOnSurface),Di={backgroundColor:i.FtCssVariableFactory.extend("--ft-chip-background-color",i.designSystemVariables.colorSurface),color:Wi,fontSize:i.FtCssVariableFactory.extend("--ft-chip-font-size",It.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:i.FtCssVariableFactory.extend("--ft-chip-ripple-color",Wi),horizontalPadding:i.FtCssVariableFactory.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:i.FtCssVariableFactory.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Ki=i.FtCssVariableFactory.extend("--ft-chip-highlighted-color",i.FtCssVariableFactory.extend("--ft-chip-color",i.designSystemVariables.colorOnPrimary)),Li={backgroundColor:i.FtCssVariableFactory.extend("--ft-chip-highlighted-background-color",i.FtCssVariableFactory.extend("--ft-chip-background-color",i.designSystemVariables.colorPrimary)),color:Ki,rippleColor:i.FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color",Ki)},Gi=i.FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),Hi=i.FtCssVariableFactory.create("--ft-chip-dense-vertical-padding","SIZE","4px"),Pi=[i.noTextSelect,e.css`
|
|
310
310
|
:host {
|
|
311
311
|
display: inline-block;
|
|
312
312
|
max-width: 100%;
|
|
@@ -323,20 +323,20 @@ const L=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===L)return null==t?void 0:t
|
|
|
323
323
|
box-sizing: border-box;
|
|
324
324
|
pointer-events: auto;
|
|
325
325
|
|
|
326
|
-
--ft-chip-internal-font-size: ${
|
|
326
|
+
--ft-chip-internal-font-size: ${Di.fontSize};
|
|
327
327
|
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
328
|
-
${i.setVariable(
|
|
329
|
-
--ft-chip-internal-vertical-padding: ${
|
|
330
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
328
|
+
${i.setVariable(Mi.size,Di.iconSize)};
|
|
329
|
+
--ft-chip-internal-vertical-padding: ${Di.verticalPadding};
|
|
330
|
+
--ft-chip-internal-horizontal-padding: ${Di.horizontalPadding};
|
|
331
331
|
--ft-chip-internal-icon-padding: 3px;
|
|
332
|
-
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${
|
|
332
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${Di.iconSize});
|
|
333
333
|
|
|
334
|
-
border: 1px solid ${
|
|
335
|
-
color: ${
|
|
336
|
-
${i.setVariable(
|
|
334
|
+
border: 1px solid ${Di.colorOutline};
|
|
335
|
+
color: ${Di.color};
|
|
336
|
+
${i.setVariable(zi.color,Di.rippleColor)};
|
|
337
337
|
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
338
338
|
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
339
|
-
background-color: ${
|
|
339
|
+
background-color: ${Di.backgroundColor};
|
|
340
340
|
line-height: var(--ft-chip-internal-content-height);
|
|
341
341
|
}
|
|
342
342
|
|
|
@@ -346,8 +346,8 @@ const L=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===L)return null==t?void 0:t
|
|
|
346
346
|
|
|
347
347
|
.ft-chip--dense {
|
|
348
348
|
--ft-chip-internal-icon-padding: 3px;
|
|
349
|
-
--ft-chip-internal-vertical-padding: ${
|
|
350
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
349
|
+
--ft-chip-internal-vertical-padding: ${Hi};
|
|
350
|
+
--ft-chip-internal-horizontal-padding: ${Gi};
|
|
351
351
|
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
352
352
|
}
|
|
353
353
|
|
|
@@ -359,15 +359,15 @@ const L=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===L)return null==t?void 0:t
|
|
|
359
359
|
cursor: default;
|
|
360
360
|
pointer-events: none;
|
|
361
361
|
filter: grayscale(1);
|
|
362
|
-
opacity: ${
|
|
362
|
+
opacity: ${Di.opacityDisabled};
|
|
363
363
|
}
|
|
364
364
|
|
|
365
365
|
.ft-chip--highlighted {
|
|
366
366
|
border: none;
|
|
367
367
|
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
368
|
-
background-color: ${
|
|
369
|
-
${i.setVariable(
|
|
370
|
-
color: ${
|
|
368
|
+
background-color: ${Li.backgroundColor};
|
|
369
|
+
${i.setVariable(zi.color,Li.rippleColor)};
|
|
370
|
+
color: ${Li.color};
|
|
371
371
|
}
|
|
372
372
|
|
|
373
373
|
.ft-chip--clickable {
|
|
@@ -400,8 +400,8 @@ const L=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===L)return null==t?void 0:t
|
|
|
400
400
|
vertical-align: bottom;
|
|
401
401
|
display: block;
|
|
402
402
|
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
403
|
-
${i.setVariable(
|
|
404
|
-
${i.setVariable(
|
|
403
|
+
${i.setVariable(It.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
404
|
+
${i.setVariable(It.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
405
405
|
}
|
|
406
406
|
|
|
407
407
|
.ft-chip--safari-fix .ft-chip--label {
|
|
@@ -436,7 +436,7 @@ const L=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===L)return null==t?void 0:t
|
|
|
436
436
|
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container {
|
|
437
437
|
order: -1;
|
|
438
438
|
}
|
|
439
|
-
`];var
|
|
439
|
+
`];var qi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Xi extends CustomEvent{constructor(){super("icon-click")}}class Yi extends i.FtLitElement{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}render(){const t={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":i.isSafari};return e.html`
|
|
440
440
|
<div class="${n.classMap(t)}"
|
|
441
441
|
aria-label="${this.getLabel()}"
|
|
442
442
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
@@ -455,7 +455,7 @@ const L=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===L)return null==t?void 0:t
|
|
|
455
455
|
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
456
456
|
<ft-icon variant="material">${this.internalIcon}</ft-icon>
|
|
457
457
|
</div>
|
|
458
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new
|
|
458
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Xi))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Xi))}getLabel(){return this.label||this.textContent}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}}Yi.elementDefinitions={"ft-ripple":Ti,"ft-typography":di,"ft-icon":Ri},Yi.styles=Pi,qi([o.property({type:Boolean})],Yi.prototype,"highlighted",void 0),qi([o.property({type:Boolean})],Yi.prototype,"removable",void 0),qi([o.property({type:Boolean})],Yi.prototype,"disabled",void 0),qi([o.property({type:Boolean})],Yi.prototype,"clickable",void 0),qi([o.property({type:Boolean})],Yi.prototype,"iconClickable",void 0),qi([o.property({type:Boolean})],Yi.prototype,"dense",void 0),qi([o.property({type:Boolean})],Yi.prototype,"multiLine",void 0),qi([o.property({type:String})],Yi.prototype,"label",void 0),qi([o.property({type:String})],Yi.prototype,"icon",void 0),qi([o.property({type:Boolean})],Yi.prototype,"trailingIcon",void 0),qi([o.query("ft-typography slot")],Yi.prototype,"slottedContent",void 0),i.customElement("ft-chip")(Yi);var Ji=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Qi extends h{constructor(){super(...arguments),this.editorMode=!1}render(){return e.html`
|
|
459
459
|
<ft-tooltip text="${this.tooltipText}">
|
|
460
460
|
<ft-chip>
|
|
461
461
|
${this.renderContent()}
|
|
@@ -468,4 +468,4 @@ const L=Symbol.for(""),P=t=>{if((null==t?void 0:t.r)===L)return null==t?void 0:t
|
|
|
468
468
|
display: none !important;
|
|
469
469
|
}
|
|
470
470
|
</style>
|
|
471
|
-
`}get metadata(){var t,i;return null===(i=null===(t=this.map)||void 0===t?void 0:t.metadata)||void 0===i?void 0:i.find((t=>t.key==this.key))}get valueText(){var t;let i=(null===(t=this.metadata)||void 0===t?void 0:t.values.join(", "))||"";return this.maxLength?(null==i?void 0:i.substring(0,this.maxLength))+"...":i}get tooltipText(){return this.metadata?`${this.key}: ${this.valueText}`:""}}
|
|
471
|
+
`}get metadata(){var t,i;return null===(i=null===(t=this.map)||void 0===t?void 0:t.metadata)||void 0===i?void 0:i.find((t=>t.key==this.key))}get valueText(){var t;let i=(null===(t=this.metadata)||void 0===t?void 0:t.values.join(", "))||"";return this.maxLength?(null==i?void 0:i.substring(0,this.maxLength))+"...":i}get tooltipText(){return this.metadata?`${this.key}: ${this.valueText}`:""}}Qi.elementDefinitions={"ft-tooltip":wi,"ft-chip":Yi},Qi.styles=r,Ji([o.property()],Qi.prototype,"key",void 0),Ji([o.property({attribute:"max-length",type:Number})],Qi.prototype,"maxLength",void 0),Ji([o.property({attribute:!1})],Qi.prototype,"editorMode",void 0),Ji([i.redux()],Qi.prototype,"map",void 0),i.customElement("ft-reader-metadata")(Qi),t.FtReaderMetadata=Qi,t.FtReaderMetadataCssVariables={},t.styles=r,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|