@fluid-topics/ft-reader-topic-metadata 1.0.56 → 1.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-reader-topic-metadata.light.js +164 -164
- package/build/ft-reader-topic-metadata.min.js +163 -163
- package/package.json +3 -3
|
@@ -2,120 +2,120 @@
|
|
|
2
2
|
:host {
|
|
3
3
|
display: inline-block;
|
|
4
4
|
}
|
|
5
|
-
`;var a=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class
|
|
5
|
+
`;var a;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS"}(a||(a={}));var l=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class p extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const h=Symbol("registerInterval");class f extends(function(t){var i;class e extends t{constructor(){super(...arguments),this[i]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[h]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[h]):this.dispatchEvent(new p)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return i=h,l([o.state()],e.prototype,"stateManager",void 0),e}(i.FtLitElementRedux)){}var c=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class d extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}const u=Symbol("registerInterval");class g extends(function(t){var i;class e extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this[i]=0}connectedCallback(){super.connectedCallback(),this[u]=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this[u]):this.dispatchEvent(new d)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return i=u,c([o.state()],e.prototype,"tocNode",void 0),c([o.state()],e.prototype,"disableContextInteractions",void 0),e}(f)){}
|
|
6
6
|
/**
|
|
7
7
|
* @license
|
|
8
8
|
* Copyright 2017 Google LLC
|
|
9
9
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
10
|
-
*/var
|
|
10
|
+
*/var x;const v=window,b=v.trustedTypes,y=b?b.createPolicy("lit-html",{createHTML:t=>t}):void 0,m="$lit$",$=`lit$${(Math.random()+"").slice(9)}$`,w="?"+$,k=`<${w}>`,z=document,S=()=>z.createComment(""),C=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,O="[ \t\n\f\r]",E=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,N=/>/g,T=RegExp(`>|${O}(?:([^\\s"'>=/]+)(${O}*=${O}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),B=/'/g,A=/"/g,M=/^(?:script|style|textarea|title)$/i,Z=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),F=Symbol.for("lit-noChange"),_=Symbol.for("lit-nothing"),R=new WeakMap,U=z.createTreeWalker(z,129,null,!1),D=(t,i)=>{const e=t.length-1,o=[];let n,r=2===i?"<svg>":"",s=E;for(let i=0;i<e;i++){const e=t[i];let a,l,p=-1,h=0;for(;h<e.length&&(s.lastIndex=h,l=s.exec(e),null!==l);)h=s.lastIndex,s===E?"!--"===l[1]?s=j:void 0!==l[1]?s=N:void 0!==l[2]?(M.test(l[2])&&(n=RegExp("</"+l[2],"g")),s=T):void 0!==l[3]&&(s=T):s===T?">"===l[0]?(s=null!=n?n:E,p=-1):void 0===l[1]?p=-2:(p=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?T:'"'===l[3]?A:B):s===A||s===B?s=T:s===j||s===N?s=E:(s=T,n=void 0);const f=s===T&&t[i+1].startsWith("/>")?" ":"";r+=s===E?e+k:p>=0?(o.push(a),e.slice(0,p)+m+e.slice(p)+$+f):e+$+(-2===p?(o.push(void 0),i):f)}const a=r+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==y?y.createHTML(a):a,o]};class K{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,r=0;const s=t.length-1,a=this.parts,[l,p]=D(t,i);if(this.el=K.createElement(l,e),U.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=U.nextNode())&&a.length<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith(m)||i.startsWith($)){const e=p[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+m).split($),i=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?G:"?"===i[1]?q:"@"===i[1]?X:H})}else a.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(M.test(o.tagName)){const t=o.textContent.split($),i=t.length-1;if(i>0){o.textContent=b?b.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],S()),U.nextNode(),a.push({type:2,index:++n});o.append(t[i],S())}}}else if(8===o.nodeType)if(o.data===w)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf($,t+1));)a.push({type:7,index:n}),t+=$.length-1}n++}}static createElement(t,i){const e=z.createElement("template");return e.innerHTML=t,e}}function L(t,i,e=t,o){var n,r,s,a;if(i===F)return i;let l=void 0!==o?null===(n=e._$Co)||void 0===n?void 0:n[o]:e._$Cl;const p=C(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==p&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===p?l=void 0:(l=new p(t),l._$AT(t,e,o)),void 0!==o?(null!==(s=(a=e)._$Co)&&void 0!==s?s:a._$Co=[])[o]=l:e._$Cl=l),void 0!==l&&(i=L(t,l._$AS(t,i.values),l,o)),i}class W{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:z).importNode(e,!0);U.currentNode=n;let r=U.nextNode(),s=0,a=0,l=o[0];for(;void 0!==l;){if(s===l.index){let i;2===l.type?i=new P(r,r.nextSibling,this,t):1===l.type?i=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(i=new Y(r,this,t)),this._$AV.push(i),l=o[++a]}s!==(null==l?void 0:l.index)&&(r=U.nextNode(),s++)}return n}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class P{constructor(t,i,e,o){var n;this.type=2,this._$AH=_,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=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._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=L(this,t,i),C(t)?t===_||null==t||""===t?(this._$AH!==_&&this._$AR(),this._$AH=_):t!==this._$AH&&t!==F&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>I(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==_&&C(this._$AH)?this._$AA.nextSibling.data=t:this.$(z.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=K.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.v(e);else{const t=new W(n,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=R.get(t.strings);return void 0===i&&R.set(t.strings,i=new K(t)),i}T(t){I(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 P(this.k(S()),this.k(S()),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._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class H{constructor(t,i,e,o,n){this.type=1,this._$AH=_,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=_}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let r=!1;if(void 0===n)t=L(this,t,i,0),r=!C(t)||t!==this._$AH&&t!==F,r&&(this._$AH=t);else{const o=t;let s,a;for(t=n[0],s=0;s<n.length-1;s++)a=L(this,o[e+s],i,s),a===F&&(a=this._$AH[s]),r||(r=!C(a)||a!==this._$AH[s]),a===_?t=_:t!==_&&(t+=(null!=a?a:"")+n[s+1]),this._$AH[s]=a}r&&!o&&this.j(t)}j(t){t===_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class G extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===_?void 0:t}}const V=b?b.emptyScript:"";class q extends H{constructor(){super(...arguments),this.type=4}j(t){t&&t!==_?this.element.setAttribute(this.name,V):this.element.removeAttribute(this.name)}}class X extends H{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=L(this,t,i,0))&&void 0!==e?e:_)===F)return;const o=this._$AH,n=t===_&&o!==_||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==_&&(o===_||n);n&&this.element.removeEventListener(this.name,this,o),r&&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 Y{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){L(this,t)}}const J=v.litHtmlPolyfillSupport;null==J||J(K,P),(null!==(x=v.litHtmlVersions)&&void 0!==x?x:v.litHtmlVersions=[]).push("2.7.3");
|
|
11
11
|
/**
|
|
12
12
|
* @license
|
|
13
13
|
* Copyright 2020 Google LLC
|
|
14
14
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
15
15
|
*/
|
|
16
|
-
const
|
|
16
|
+
const Q=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===Q)return null==t?void 0:t._$litStatic$},it=t=>({_$litStatic$:t,r:Q}),et=new Map,ot=(t=>(i,...e)=>{const o=e.length;let n,r;const s=[],a=[];let l,p=0,h=!1;for(;p<o;){for(l=i[p];p<o&&void 0!==(r=e[p],n=tt(r));)l+=n+i[++p],h=!0;p!==o&&a.push(r),s.push(l),p++}if(p===o&&s.push(i[o]),h){const t=s.join("$$lit$$");void 0===(i=et.get(t))&&(s.raw=s,et.set(t,i=s)),e=a}return t(i,...e)})(Z);var nt;!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"}(nt||(nt={}));const rt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),st=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),at={fontFamily:st,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")},lt=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",rt),pt=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",at.fontSize,"20px"),ht=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",at.fontWeight,"normal"),ft=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",at.letterSpacing,"0.15px"),ct=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",at.lineHeight,"1.2"),dt=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",at.textTransform,"inherit"),ut=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",rt),gt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",at.fontSize,"14px"),xt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",at.fontWeight,"normal"),vt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",at.letterSpacing,"0.105px"),bt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",at.lineHeight,"1.7"),yt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",at.textTransform,"inherit"),mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",st),$t=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",at.fontSize,"16px"),wt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",at.fontWeight,"600"),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",at.letterSpacing,"0.144px"),zt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",at.lineHeight,"1.5"),St=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",at.textTransform,"inherit"),Ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",st),It=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",at.fontSize,"14px"),Ot=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",at.fontWeight,"normal"),Et=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",at.letterSpacing,"0.098px"),jt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",at.lineHeight,"1.7"),Nt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",at.textTransform,"inherit"),Tt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",st),Bt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",at.fontSize,"16px"),At=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",at.fontWeight,"normal"),Mt=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",at.letterSpacing,"0.496px"),Zt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",at.lineHeight,"1.5"),Ft=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",at.textTransform,"inherit"),_t={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",st),fontSize:i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",at.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",at.fontWeight,"normal"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",at.letterSpacing,"0.252px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",at.lineHeight,"1.4"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",at.textTransform,"inherit")},Rt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",st),Ut=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",at.fontSize,"12px"),Dt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",at.fontWeight,"normal"),Kt=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",at.letterSpacing,"0.396px"),Lt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",at.lineHeight,"1.33"),Wt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",at.textTransform,"inherit"),Pt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",st),Ht=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",at.fontSize,"10px"),Gt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",at.fontWeight,"normal"),Vt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",at.letterSpacing,"0.33px"),qt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",at.lineHeight,"1.6"),Xt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",at.textTransform,"inherit"),Yt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",st),Jt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",at.fontSize,"10px"),Qt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",at.fontWeight,"normal"),ti=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",at.letterSpacing,"1.5px"),ii=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",at.lineHeight,"1.6"),ei=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",at.textTransform,"uppercase"),oi={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-button-font-family",st),fontSize:i.FtCssVariableFactory.extend("--ft-typography-button-font-size",at.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",at.fontWeight,"600"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",at.letterSpacing,"1.246px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-button-line-height",at.lineHeight,"1.15"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",at.textTransform,"uppercase")},ni=e.css`
|
|
17
17
|
.ft-typography--title {
|
|
18
|
-
font-family: ${
|
|
19
|
-
font-size: ${
|
|
20
|
-
font-weight: ${
|
|
21
|
-
letter-spacing: ${
|
|
22
|
-
line-height: ${
|
|
23
|
-
text-transform: ${
|
|
24
|
-
}
|
|
25
|
-
`,ni=e.css`
|
|
26
|
-
.ft-typography--title-dense {
|
|
27
|
-
font-family: ${dt};
|
|
28
|
-
font-size: ${ut};
|
|
29
|
-
font-weight: ${gt};
|
|
30
|
-
letter-spacing: ${xt};
|
|
31
|
-
line-height: ${vt};
|
|
32
|
-
text-transform: ${bt};
|
|
18
|
+
font-family: ${lt};
|
|
19
|
+
font-size: ${pt};
|
|
20
|
+
font-weight: ${ht};
|
|
21
|
+
letter-spacing: ${ft};
|
|
22
|
+
line-height: ${ct};
|
|
23
|
+
text-transform: ${dt};
|
|
33
24
|
}
|
|
34
25
|
`,ri=e.css`
|
|
35
|
-
.ft-typography--
|
|
36
|
-
font-family: ${
|
|
37
|
-
font-size: ${
|
|
38
|
-
font-weight: ${
|
|
39
|
-
letter-spacing: ${
|
|
40
|
-
line-height: ${
|
|
41
|
-
text-transform: ${
|
|
26
|
+
.ft-typography--title-dense {
|
|
27
|
+
font-family: ${ut};
|
|
28
|
+
font-size: ${gt};
|
|
29
|
+
font-weight: ${xt};
|
|
30
|
+
letter-spacing: ${vt};
|
|
31
|
+
line-height: ${bt};
|
|
32
|
+
text-transform: ${yt};
|
|
42
33
|
}
|
|
43
34
|
`,si=e.css`
|
|
35
|
+
.ft-typography--subtitle1 {
|
|
36
|
+
font-family: ${mt};
|
|
37
|
+
font-size: ${$t};
|
|
38
|
+
font-weight: ${wt};
|
|
39
|
+
letter-spacing: ${kt};
|
|
40
|
+
line-height: ${zt};
|
|
41
|
+
text-transform: ${St};
|
|
42
|
+
}
|
|
43
|
+
`,ai=e.css`
|
|
44
44
|
.ft-typography--subtitle2 {
|
|
45
|
-
font-family: ${
|
|
46
|
-
font-size: ${
|
|
47
|
-
font-weight: ${
|
|
48
|
-
letter-spacing: ${
|
|
45
|
+
font-family: ${Ct};
|
|
46
|
+
font-size: ${It};
|
|
47
|
+
font-weight: ${Ot};
|
|
48
|
+
letter-spacing: ${Et};
|
|
49
49
|
line-height: ${jt};
|
|
50
|
-
text-transform: ${
|
|
50
|
+
text-transform: ${Nt};
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
`,
|
|
53
|
+
`,li=e.css`
|
|
54
54
|
.ft-typography--body1 {
|
|
55
|
-
font-family: ${
|
|
56
|
-
font-size: ${
|
|
57
|
-
font-weight: ${
|
|
55
|
+
font-family: ${Tt};
|
|
56
|
+
font-size: ${Bt};
|
|
57
|
+
font-weight: ${At};
|
|
58
58
|
letter-spacing: ${Mt};
|
|
59
59
|
line-height: ${Zt};
|
|
60
|
-
text-transform: ${
|
|
60
|
+
text-transform: ${Ft};
|
|
61
61
|
}
|
|
62
|
-
`,
|
|
62
|
+
`,pi=e.css`
|
|
63
63
|
.ft-typography--body2 {
|
|
64
|
-
font-family: ${
|
|
65
|
-
font-size: ${
|
|
66
|
-
font-weight: ${
|
|
67
|
-
letter-spacing: ${
|
|
68
|
-
line-height: ${
|
|
69
|
-
text-transform: ${
|
|
64
|
+
font-family: ${_t.fontFamily};
|
|
65
|
+
font-size: ${_t.fontSize};
|
|
66
|
+
font-weight: ${_t.fontWeight};
|
|
67
|
+
letter-spacing: ${_t.letterSpacing};
|
|
68
|
+
line-height: ${_t.lineHeight};
|
|
69
|
+
text-transform: ${_t.textTransform};
|
|
70
70
|
}
|
|
71
|
-
`,
|
|
71
|
+
`,hi=e.css`
|
|
72
72
|
.ft-typography--caption {
|
|
73
|
-
font-family: ${
|
|
73
|
+
font-family: ${Rt};
|
|
74
74
|
font-size: ${Ut};
|
|
75
|
-
font-weight: ${
|
|
76
|
-
letter-spacing: ${
|
|
77
|
-
line-height: ${
|
|
78
|
-
text-transform: ${
|
|
75
|
+
font-weight: ${Dt};
|
|
76
|
+
letter-spacing: ${Kt};
|
|
77
|
+
line-height: ${Lt};
|
|
78
|
+
text-transform: ${Wt};
|
|
79
79
|
}
|
|
80
|
-
`,
|
|
80
|
+
`,fi=e.css`
|
|
81
81
|
.ft-typography--breadcrumb {
|
|
82
82
|
font-family: ${Pt};
|
|
83
83
|
font-size: ${Ht};
|
|
84
|
-
font-weight: ${
|
|
85
|
-
letter-spacing: ${
|
|
86
|
-
line-height: ${
|
|
87
|
-
text-transform: ${
|
|
88
|
-
}
|
|
89
|
-
`,fi=e.css`
|
|
90
|
-
.ft-typography--overline {
|
|
91
|
-
font-family: ${Xt};
|
|
92
|
-
font-size: ${Yt};
|
|
93
|
-
font-weight: ${Jt};
|
|
94
|
-
letter-spacing: ${Qt};
|
|
95
|
-
line-height: ${ti};
|
|
96
|
-
text-transform: ${ii};
|
|
84
|
+
font-weight: ${Gt};
|
|
85
|
+
letter-spacing: ${Vt};
|
|
86
|
+
line-height: ${qt};
|
|
87
|
+
text-transform: ${Xt};
|
|
97
88
|
}
|
|
98
89
|
`,ci=e.css`
|
|
99
|
-
.ft-typography--
|
|
100
|
-
font-family: ${
|
|
101
|
-
font-size: ${
|
|
102
|
-
font-weight: ${
|
|
103
|
-
letter-spacing: ${
|
|
104
|
-
line-height: ${
|
|
105
|
-
text-transform: ${ei
|
|
90
|
+
.ft-typography--overline {
|
|
91
|
+
font-family: ${Yt};
|
|
92
|
+
font-size: ${Jt};
|
|
93
|
+
font-weight: ${Qt};
|
|
94
|
+
letter-spacing: ${ti};
|
|
95
|
+
line-height: ${ii};
|
|
96
|
+
text-transform: ${ei};
|
|
106
97
|
}
|
|
107
98
|
`,di=e.css`
|
|
99
|
+
.ft-typography--button {
|
|
100
|
+
font-family: ${oi.fontFamily};
|
|
101
|
+
font-size: ${oi.fontSize};
|
|
102
|
+
font-weight: ${oi.fontWeight};
|
|
103
|
+
letter-spacing: ${oi.letterSpacing};
|
|
104
|
+
line-height: ${oi.lineHeight};
|
|
105
|
+
text-transform: ${oi.textTransform};
|
|
106
|
+
}
|
|
107
|
+
`,ui=e.css`
|
|
108
108
|
.ft-typography {
|
|
109
109
|
vertical-align: inherit;
|
|
110
110
|
}
|
|
111
|
-
`;var
|
|
112
|
-
<${
|
|
111
|
+
`;var gi=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class xi extends i.FtLitElement{constructor(){super(...arguments),this.variant=nt.body1}render(){return this.element?ot`
|
|
112
|
+
<${it(this.element)}
|
|
113
113
|
class="ft-typography ft-typography--${this.variant}">
|
|
114
114
|
<slot></slot>
|
|
115
|
-
</${
|
|
116
|
-
`:
|
|
115
|
+
</${it(this.element)}>
|
|
116
|
+
`:ot`
|
|
117
117
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
118
|
-
`}}
|
|
118
|
+
`}}xi.styles=[ni,ri,si,ai,li,pi,hi,fi,ci,di,ui],gi([o.property()],xi.prototype,"element",void 0),gi([o.property()],xi.prototype,"variant",void 0),i.customElement("ft-typography")(xi);const vi=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),bi=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),yi=i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),mi=i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","100"),$i=i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),wi=i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),ki=e.css`
|
|
119
119
|
.ft-tooltip--container {
|
|
120
120
|
display: block;
|
|
121
121
|
}
|
|
@@ -130,21 +130,21 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
130
130
|
box-sizing: border-box;
|
|
131
131
|
overflow: hidden;
|
|
132
132
|
width: max-content;
|
|
133
|
-
max-width: ${
|
|
133
|
+
max-width: ${wi};
|
|
134
134
|
text-align: center;
|
|
135
|
-
padding: ${
|
|
136
|
-
z-index: ${
|
|
135
|
+
padding: ${vi};
|
|
136
|
+
z-index: ${mi};
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
.ft-tooltip--content {
|
|
140
140
|
padding: 4px 8px;
|
|
141
|
-
border-radius: ${
|
|
142
|
-
background-color: ${
|
|
143
|
-
color: ${
|
|
141
|
+
border-radius: ${$i};
|
|
142
|
+
background-color: ${yi};
|
|
143
|
+
color: ${bi};
|
|
144
144
|
position: relative;
|
|
145
145
|
word-break: break-word;
|
|
146
146
|
}
|
|
147
|
-
`;var
|
|
147
|
+
`;var zi=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class Si extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return e.html`
|
|
148
148
|
<div part="container"
|
|
149
149
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
150
150
|
@mouseenter=${this.onHover}
|
|
@@ -162,7 +162,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
162
162
|
</div>
|
|
163
163
|
</div>
|
|
164
164
|
</div>
|
|
165
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.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.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=this.tooltip.offsetWidth,e=this.tooltip.offsetHeight,o=(t.offsetHeight-e)/2,n=(t.offsetWidth-i)/2;let r=0,s=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":s=t.offsetTop-e-this.tooltip.offsetTop,r=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"bottom":s=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,r=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"left":s=t.offsetTop+o-this.tooltip.offsetTop,r=t.offsetLeft-i-this.tooltip.offsetLeft;break;case"right":s=t.offsetTop+o-this.tooltip.offsetTop,r=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const a=this.tooltip.style;a.left=r+"px",a.top=s+"px";const l=this.tooltip.getBoundingClientRect();let p=-l.x,h=l.x+l.width-window.innerWidth;a.left=r+Math.round(this.correctOutOfWindowPixels(p,h))+"px";let f=-l.y,c=l.y+l.height-window.innerHeight;a.top=s+Math.round(this.correctOutOfWindowPixels(f,c))+"px",a.maxWidth=`max(${t.offsetWidth}px, ${
|
|
165
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.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.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=this.tooltip.offsetWidth,e=this.tooltip.offsetHeight,o=(t.offsetHeight-e)/2,n=(t.offsetWidth-i)/2;let r=0,s=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":s=t.offsetTop-e-this.tooltip.offsetTop,r=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"bottom":s=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,r=t.offsetLeft+n-this.tooltip.offsetLeft;break;case"left":s=t.offsetTop+o-this.tooltip.offsetTop,r=t.offsetLeft-i-this.tooltip.offsetLeft;break;case"right":s=t.offsetTop+o-this.tooltip.offsetTop,r=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const a=this.tooltip.style;a.left=r+"px",a.top=s+"px";const l=this.tooltip.getBoundingClientRect();let p=-l.x,h=l.x+l.width-window.innerWidth;a.left=r+Math.round(this.correctOutOfWindowPixels(p,h))+"px";let f=-l.y,c=l.y+l.height-window.innerHeight;a.top=s+Math.round(this.correctOutOfWindowPixels(f,c))+"px",a.maxWidth=`max(${t.offsetWidth}px, ${wi})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,i){return Math.max(t,Math.min(0,-i))}}Si.elementDefinitions={"ft-typography":xi},Si.styles=ki,zi([o.property()],Si.prototype,"text",void 0),zi([o.property({type:Boolean})],Si.prototype,"manual",void 0),zi([o.property({type:Boolean})],Si.prototype,"inline",void 0),zi([o.property({type:Number})],Si.prototype,"delay",void 0),zi([o.property()],Si.prototype,"position",void 0),zi([o.queryAssignedNodes("",!0)],Si.prototype,"slotNodes",void 0),zi([o.query(".ft-tooltip--container")],Si.prototype,"container",void 0),zi([o.query(".ft-tooltip")],Si.prototype,"tooltip",void 0),zi([o.query(".ft-tooltip--content")],Si.prototype,"tooltipContent",void 0),zi([o.state()],Si.prototype,"visible",void 0),i.customElement("ft-tooltip")(Si);const Ci=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),Ii={color:Ci,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",Ci),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"),borderRadius:i.FtCssVariableFactory.create("--ft-ripple-border-radius","SIZE","0px")},Oi=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),Ei=Oi,ji=i.FtCssVariableFactory.extend("--ft-ripple-background-color",Oi),Ni=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),Ti=Ni,Bi=i.FtCssVariableFactory.extend("--ft-ripple-background-color",Ni),Ai=e.css`
|
|
166
166
|
:host {
|
|
167
167
|
display: contents;
|
|
168
168
|
}
|
|
@@ -175,7 +175,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
175
175
|
|
|
176
176
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
177
177
|
overflow: hidden;
|
|
178
|
-
border-radius: ${
|
|
178
|
+
border-radius: ${Ii.borderRadius};
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
.ft-ripple .ft-ripple--background,
|
|
@@ -209,19 +209,19 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
.ft-ripple .ft-ripple--background {
|
|
212
|
-
background-color: ${
|
|
212
|
+
background-color: ${Ii.backgroundColor};
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
.ft-ripple .ft-ripple--effect {
|
|
216
|
-
background-color: ${
|
|
216
|
+
background-color: ${Ii.color};
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
220
|
-
background-color: ${
|
|
220
|
+
background-color: ${Bi};
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
224
|
-
background-color: ${
|
|
224
|
+
background-color: ${Ti};
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
@@ -229,7 +229,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
232
|
-
background-color: ${
|
|
232
|
+
background-color: ${Ei};
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
.ft-ripple .ft-ripple--background {
|
|
@@ -259,22 +259,22 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
262
|
-
opacity: ${
|
|
262
|
+
opacity: ${Ii.opacityContentOnSurfaceHover};
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
266
|
-
opacity: ${
|
|
266
|
+
opacity: ${Ii.opacityContentOnSurfaceSelected};
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
270
|
-
opacity: ${
|
|
270
|
+
opacity: ${Ii.opacityContentOnSurfaceFocused};
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
274
|
-
opacity: ${
|
|
274
|
+
opacity: ${Ii.opacityContentOnSurfacePressed};
|
|
275
275
|
transform: translate(-50%, -50%) scale(1);
|
|
276
276
|
}
|
|
277
|
-
`;var Mi,Zi,
|
|
277
|
+
`;var Mi,Zi,Fi=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class _i 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.originX=0,this.originY=0,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.setupDebouncer=new i.Debouncer(10),this.moveRipple=t=>{var i,e;let{x:o,y:n}=this.getCoordinates(t),r=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-r.x:r.width/2),this.originY=Math.round(null!=n?n-r.y:r.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(null==t?void 0:t.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return e.html`
|
|
278
278
|
<style>
|
|
279
279
|
.ft-ripple .ft-ripple--effect {
|
|
280
280
|
left: ${this.originX}px;
|
|
@@ -285,7 +285,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
285
285
|
<div class="ft-ripple--background"></div>
|
|
286
286
|
<div class="ft-ripple--effect"></div>
|
|
287
287
|
</div>
|
|
288
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var i,e;super.update(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"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(i=this.target)&&void 0!==i?i:e)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const 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,this.target=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}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}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.endRipple()}}Fi.elementDefinitions={},Fi.styles=Bi,Ai([o.property({type:Boolean})],Fi.prototype,"primary",void 0),Ai([o.property({type:Boolean})],Fi.prototype,"secondary",void 0),Ai([o.property({type:Boolean})],Fi.prototype,"unbounded",void 0),Ai([o.property({type:Boolean})],Fi.prototype,"activated",void 0),Ai([o.property({type:Boolean})],Fi.prototype,"selected",void 0),Ai([o.property({type:Boolean})],Fi.prototype,"disabled",void 0),Ai([o.state()],Fi.prototype,"hovered",void 0),Ai([o.state()],Fi.prototype,"focused",void 0),Ai([o.state()],Fi.prototype,"pressed",void 0),Ai([o.state()],Fi.prototype,"rippling",void 0),Ai([o.state()],Fi.prototype,"originX",void 0),Ai([o.state()],Fi.prototype,"originY",void 0),Ai([o.query(".ft-ripple")],Fi.prototype,"ripple",void 0),Ai([o.query(".ft-ripple--effect")],Fi.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(Fi),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(Mi||(Mi={})),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=""}(Zi||(Zi={})),new Map([...["abw"].map((t=>[t,Zi.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,Zi.AUDIO])),...["avi"].map((t=>[t,Zi.AVI])),...["chm","xhs"].map((t=>[t,Zi.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,Zi.CODE])),...["csv"].map((t=>[t,Zi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Zi.DITA])),...["epub"].map((t=>[t,Zi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Zi.EXCEL])),...["flac"].map((t=>[t,Zi.FLAC])),...["gif"].map((t=>[t,Zi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Zi.GZIP])),...["html","htm","xhtml"].map((t=>[t,Zi.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,Zi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Zi.JPEG])),...["json"].map((t=>[t,Zi.JSON])),...["m4a","m4p"].map((t=>[t,Zi.M4A])),...["mov","qt"].map((t=>[t,Zi.MOV])),...["mp3"].map((t=>[t,Zi.MP3])),...["mp4","m4v"].map((t=>[t,Zi.MP4])),...["ogg","oga"].map((t=>[t,Zi.OGG])),...["pdf","ps"].map((t=>[t,Zi.PDF])),...["png"].map((t=>[t,Zi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Zi.POWERPOINT])),...["rar"].map((t=>[t,Zi.RAR])),...["stp"].map((t=>[t,Zi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Zi.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,Zi.VIDEO])),...["wav"].map((t=>[t,Zi.WAV])),...["wma"].map((t=>[t,Zi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Zi.WORD])),...["xml","xsl","rdf"].map((t=>[t,Zi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Zi.YAML])),...["zip"].map((t=>[t,Zi.ZIP]))]);const _i={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")},Ui=e.css`
|
|
288
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var i,e;super.update(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"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(i=this.target)&&void 0!==i?i:e)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const 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,this.target=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}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}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.endRipple()}}_i.elementDefinitions={},_i.styles=Ai,Fi([o.property({type:Boolean})],_i.prototype,"primary",void 0),Fi([o.property({type:Boolean})],_i.prototype,"secondary",void 0),Fi([o.property({type:Boolean})],_i.prototype,"unbounded",void 0),Fi([o.property({type:Boolean})],_i.prototype,"activated",void 0),Fi([o.property({type:Boolean})],_i.prototype,"selected",void 0),Fi([o.property({type:Boolean})],_i.prototype,"disabled",void 0),Fi([o.state()],_i.prototype,"hovered",void 0),Fi([o.state()],_i.prototype,"focused",void 0),Fi([o.state()],_i.prototype,"pressed",void 0),Fi([o.state()],_i.prototype,"rippling",void 0),Fi([o.state()],_i.prototype,"originX",void 0),Fi([o.state()],_i.prototype,"originY",void 0),Fi([o.query(".ft-ripple")],_i.prototype,"ripple",void 0),Fi([o.query(".ft-ripple--effect")],_i.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(_i),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(Mi||(Mi={})),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=""}(Zi||(Zi={})),new Map([...["abw"].map((t=>[t,Zi.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,Zi.AUDIO])),...["avi"].map((t=>[t,Zi.AVI])),...["chm","xhs"].map((t=>[t,Zi.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,Zi.CODE])),...["csv"].map((t=>[t,Zi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Zi.DITA])),...["epub"].map((t=>[t,Zi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Zi.EXCEL])),...["flac"].map((t=>[t,Zi.FLAC])),...["gif"].map((t=>[t,Zi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Zi.GZIP])),...["html","htm","xhtml"].map((t=>[t,Zi.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,Zi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Zi.JPEG])),...["json"].map((t=>[t,Zi.JSON])),...["m4a","m4p"].map((t=>[t,Zi.M4A])),...["mov","qt"].map((t=>[t,Zi.MOV])),...["mp3"].map((t=>[t,Zi.MP3])),...["mp4","m4v"].map((t=>[t,Zi.MP4])),...["ogg","oga"].map((t=>[t,Zi.OGG])),...["pdf","ps"].map((t=>[t,Zi.PDF])),...["png"].map((t=>[t,Zi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Zi.POWERPOINT])),...["rar"].map((t=>[t,Zi.RAR])),...["stp"].map((t=>[t,Zi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Zi.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,Zi.VIDEO])),...["wav"].map((t=>[t,Zi.WAV])),...["wma"].map((t=>[t,Zi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Zi.WORD])),...["xml","xsl","rdf"].map((t=>[t,Zi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Zi.YAML])),...["zip"].map((t=>[t,Zi.ZIP]))]);const Ri={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")},Ui=e.css`
|
|
289
289
|
:host, i.ft-icon {
|
|
290
290
|
display: inline-flex;
|
|
291
291
|
align-items: center;
|
|
@@ -294,14 +294,14 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
294
294
|
}
|
|
295
295
|
|
|
296
296
|
:host {
|
|
297
|
-
width: ${
|
|
298
|
-
height: ${
|
|
297
|
+
width: ${Ri.size};
|
|
298
|
+
height: ${Ri.size};
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
i.ft-icon {
|
|
302
302
|
width: 100%;
|
|
303
303
|
height: 100%;
|
|
304
|
-
font-size: ${
|
|
304
|
+
font-size: ${Ri.size};
|
|
305
305
|
line-height: 1;
|
|
306
306
|
font-weight: normal;
|
|
307
307
|
text-transform: none;
|
|
@@ -312,33 +312,33 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
312
312
|
text-rendering: auto;
|
|
313
313
|
-webkit-font-smoothing: antialiased;
|
|
314
314
|
-moz-osx-font-smoothing: grayscale;
|
|
315
|
-
vertical-align: ${
|
|
315
|
+
vertical-align: ${Ri.verticalAlign};
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
i.ft-icon.ft-icon--fluid-topics {
|
|
319
|
-
font-family: ${
|
|
319
|
+
font-family: ${Ri.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
320
320
|
|
|
321
321
|
/* Ugly fix because font is broken */
|
|
322
|
-
font-size: calc(0.75 * ${
|
|
323
|
-
line-height: ${
|
|
322
|
+
font-size: calc(0.75 * ${Ri.size});
|
|
323
|
+
line-height: ${Ri.size};
|
|
324
324
|
position: relative;
|
|
325
325
|
top: -4%;
|
|
326
326
|
justify-content: center;
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
.ft-icon--file-format {
|
|
330
|
-
font-family: ${
|
|
330
|
+
font-family: ${Ri.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
331
331
|
}
|
|
332
332
|
|
|
333
333
|
.ft-icon--material {
|
|
334
|
-
font-family: ${
|
|
334
|
+
font-family: ${Ri.materialFontFamily}, "Material Icons", sans-serif;
|
|
335
335
|
}
|
|
336
|
-
`;var
|
|
336
|
+
`;var Di;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Di||(Di={}));var Ki=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class Li extends i.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=e.nothing}render(){const t=this.variant&&Object.values(Di).includes(this.variant)?this.variant:Di.fluid_topics,i=t!==Di.material||!!this.value;return e.html`
|
|
337
337
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
338
338
|
${r.unsafeHTML(this.resolvedIcon)}
|
|
339
339
|
<slot ?hidden=${i}></slot>
|
|
340
340
|
</i>
|
|
341
|
-
`}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
|
|
341
|
+
`}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 Di.file_format:this.resolvedIcon=null!==(t=Zi[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Di.material:this.resolvedIcon=this.value||e.nothing;break;default:this.resolvedIcon=null!==(i=Mi[o.replace("-","_").toUpperCase()])&&void 0!==i?i:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Li.elementDefinitions={},Li.styles=Ui,Ki([o.property()],Li.prototype,"variant",void 0),Ki([o.property()],Li.prototype,"value",void 0),Ki([o.state()],Li.prototype,"resolvedIcon",void 0),Ki([o.query("slot")],Li.prototype,"slottedContent",void 0),i.customElement("ft-icon")(Li);const Wi={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Pi=e.css`
|
|
342
342
|
:host {
|
|
343
343
|
line-height: 0;
|
|
344
344
|
}
|
|
@@ -347,8 +347,8 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
347
347
|
display: inline-block;
|
|
348
348
|
position: relative;
|
|
349
349
|
|
|
350
|
-
width: ${
|
|
351
|
-
height: ${
|
|
350
|
+
width: ${Wi.size};
|
|
351
|
+
height: ${Wi.size};
|
|
352
352
|
}
|
|
353
353
|
|
|
354
354
|
.ft-loader div {
|
|
@@ -357,7 +357,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
357
357
|
width: 25%;
|
|
358
358
|
height: 25%;
|
|
359
359
|
border-radius: 50%;
|
|
360
|
-
background: ${
|
|
360
|
+
background: ${Wi.color};
|
|
361
361
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
362
362
|
}
|
|
363
363
|
|
|
@@ -404,7 +404,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
404
404
|
transform: translate(0, 0);
|
|
405
405
|
}
|
|
406
406
|
100% {
|
|
407
|
-
transform: translate(calc(0.35 * ${
|
|
407
|
+
transform: translate(calc(0.35 * ${Wi.size}), 0);
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
`;class Hi extends i.FtLitElement{render(){return e.html`
|
|
@@ -414,7 +414,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
414
414
|
<div></div>
|
|
415
415
|
<div></div>
|
|
416
416
|
</div>
|
|
417
|
-
`}}Hi.styles=Pi,i.customElement("ft-loader")(Hi);const
|
|
417
|
+
`}}Hi.styles=Pi,i.customElement("ft-loader")(Hi);const Gi=i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorPrimary),Vi={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:Gi,fontSize:i.FtCssVariableFactory.extend("--ft-button-font-size",oi.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariableFactory.extend("--ft-button-ripple-color",Gi),verticalPadding:i.FtCssVariableFactory.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:i.FtCssVariableFactory.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:i.FtCssVariableFactory.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},qi=i.FtCssVariableFactory.extend("--ft-button-primary-color",i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),Xi={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-primary-background-color",i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:qi,rippleColor:i.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",qi)},Yi=i.FtCssVariableFactory.extend("--ft-button-dense-border-radius",i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM)),Ji=i.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","SIZE","2px"),Qi=i.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","SIZE","4px"),te=i.FtCssVariableFactory.create("--ft-button-dense-icon-padding","SIZE","4px"),ie=[e.css`
|
|
418
418
|
:host {
|
|
419
419
|
display: inline-block;
|
|
420
420
|
max-width: 100%;
|
|
@@ -425,7 +425,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
425
425
|
box-shadow: 0px 0px 0px transparent;
|
|
426
426
|
border: 0px solid transparent;
|
|
427
427
|
text-shadow: 0px 0px 0px transparent;
|
|
428
|
-
font-size: ${
|
|
428
|
+
font-size: ${Vi.fontSize};
|
|
429
429
|
}
|
|
430
430
|
|
|
431
431
|
button:hover {
|
|
@@ -454,31 +454,31 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
454
454
|
border: none;
|
|
455
455
|
pointer-events: auto;
|
|
456
456
|
|
|
457
|
-
--ft-button-internal-line-height: max(calc(${
|
|
458
|
-
--ft-button-internal-color: ${
|
|
459
|
-
${i.setVariable(
|
|
460
|
-
${i.setVariable(
|
|
457
|
+
--ft-button-internal-line-height: max(calc(${Vi.fontSize} + 2px), ${Vi.iconSize});
|
|
458
|
+
--ft-button-internal-color: ${Vi.color};
|
|
459
|
+
${i.setVariable(Ri.size,Vi.iconSize)};
|
|
460
|
+
${i.setVariable(Ii.color,Vi.rippleColor)};
|
|
461
461
|
|
|
462
|
-
border-radius: ${
|
|
463
|
-
padding: ${
|
|
464
|
-
background-color: ${
|
|
462
|
+
border-radius: ${Vi.borderRadius};
|
|
463
|
+
padding: ${Vi.verticalPadding} ${Vi.horizontalPadding};
|
|
464
|
+
background-color: ${Vi.backgroundColor};
|
|
465
465
|
color: var(--ft-button-internal-color);
|
|
466
466
|
-webkit-mask-image: radial-gradient(white, black);
|
|
467
467
|
}
|
|
468
468
|
|
|
469
469
|
.ft-button.ft-button--outlined {
|
|
470
470
|
border: 1px solid var(--ft-button-internal-color);
|
|
471
|
-
padding: calc(${
|
|
471
|
+
padding: calc(${Vi.verticalPadding} - 1px) calc(${Vi.horizontalPadding} - 1px);
|
|
472
472
|
}
|
|
473
473
|
|
|
474
474
|
.ft-button.ft-button--dense {
|
|
475
|
-
padding: ${
|
|
476
|
-
border-radius: ${
|
|
477
|
-
gap: ${
|
|
475
|
+
padding: ${Ji} ${Qi};
|
|
476
|
+
border-radius: ${Yi};
|
|
477
|
+
gap: ${te};
|
|
478
478
|
}
|
|
479
479
|
|
|
480
480
|
.ft-button.ft-button--dense.ft-button--outlined {
|
|
481
|
-
padding: calc(${
|
|
481
|
+
padding: calc(${Ji} - 1px) calc(${Qi} - 1px);
|
|
482
482
|
}
|
|
483
483
|
|
|
484
484
|
.ft-button:not([disabled]):hover {
|
|
@@ -486,22 +486,22 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
486
486
|
}
|
|
487
487
|
|
|
488
488
|
.ft-button--round {
|
|
489
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
489
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${Vi.verticalPadding});
|
|
490
490
|
}
|
|
491
491
|
|
|
492
492
|
.ft-button--round.ft-button--dense {
|
|
493
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
493
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${Ji});
|
|
494
494
|
}
|
|
495
495
|
|
|
496
496
|
.ft-button[disabled] {
|
|
497
497
|
filter: grayscale(1);
|
|
498
|
-
opacity: ${
|
|
498
|
+
opacity: ${Vi.opacityDisabled};
|
|
499
499
|
}
|
|
500
500
|
|
|
501
501
|
.ft-button.ft-button--primary {
|
|
502
|
-
background-color: ${
|
|
503
|
-
--ft-button-internal-color: ${
|
|
504
|
-
${i.setVariable(
|
|
502
|
+
background-color: ${Xi.backgroundColor};
|
|
503
|
+
--ft-button-internal-color: ${Xi.color};
|
|
504
|
+
${i.setVariable(Ii.color,Xi.rippleColor)};
|
|
505
505
|
}
|
|
506
506
|
|
|
507
507
|
.ft-button:focus {
|
|
@@ -514,13 +514,13 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
514
514
|
white-space: nowrap;
|
|
515
515
|
text-overflow: ellipsis;
|
|
516
516
|
display: block;
|
|
517
|
-
margin: 0 ${
|
|
518
|
-
${i.setVariable(
|
|
519
|
-
${i.setVariable(
|
|
517
|
+
margin: 0 ${Vi.iconPadding};
|
|
518
|
+
${i.setVariable(oi.fontSize,"1em")};
|
|
519
|
+
${i.setVariable(oi.lineHeight,"var(--ft-button-internal-line-height)")};
|
|
520
520
|
}
|
|
521
521
|
|
|
522
522
|
.ft-button--dense .ft-button--label {
|
|
523
|
-
margin: 0 ${
|
|
523
|
+
margin: 0 ${te};
|
|
524
524
|
}
|
|
525
525
|
|
|
526
526
|
.ft-button--label[hidden] {
|
|
@@ -533,13 +533,13 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
533
533
|
}
|
|
534
534
|
|
|
535
535
|
.ft-button--label[hidden] + ft-icon {
|
|
536
|
-
margin: 0 calc(${
|
|
537
|
-
padding: 0 ${
|
|
536
|
+
margin: 0 calc(${Vi.horizontalPadding} * -1);
|
|
537
|
+
padding: 0 ${Vi.verticalPadding};
|
|
538
538
|
}
|
|
539
539
|
|
|
540
540
|
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
541
|
-
margin: 0 calc(${
|
|
542
|
-
padding: 0 ${
|
|
541
|
+
margin: 0 calc(${Qi} * -1);
|
|
542
|
+
padding: 0 ${Ji};
|
|
543
543
|
}
|
|
544
544
|
|
|
545
545
|
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
@@ -548,10 +548,10 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
548
548
|
}
|
|
549
549
|
|
|
550
550
|
ft-loader {
|
|
551
|
-
${i.setVariable(
|
|
552
|
-
${i.setVariable(
|
|
551
|
+
${i.setVariable(Wi.size,Vi.iconSize)};
|
|
552
|
+
${i.setVariable(Wi.color,"var(--ft-button-internal-color)")};
|
|
553
553
|
}
|
|
554
|
-
`,i.noTextSelect];var
|
|
554
|
+
`,i.noTextSelect];var ee=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class oe extends i.FtLitElement{constructor(){super(...arguments),this.role="button",this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
|
|
555
555
|
<button part="button"
|
|
556
556
|
class="${n.classMap(t)}"
|
|
557
557
|
aria-label="${this.getLabel()}"
|
|
@@ -574,7 +574,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
574
574
|
</ft-tooltip>
|
|
575
575
|
`:t}resolveIcon(){return this.loading?e.html`
|
|
576
576
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?e.html`
|
|
577
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}
|
|
577
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}oe.elementDefinitions={"ft-ripple":_i,"ft-tooltip":Si,"ft-typography":xi,"ft-icon":Li,"ft-loader":Hi},oe.styles=[i.safariEllipsisFix,ie],ee([o.property({type:String,reflect:!0})],oe.prototype,"role",void 0),ee([o.property({type:Boolean})],oe.prototype,"primary",void 0),ee([o.property({type:Boolean})],oe.prototype,"outlined",void 0),ee([o.property({type:Boolean})],oe.prototype,"disabled",void 0),ee([o.property({type:Boolean})],oe.prototype,"dense",void 0),ee([o.property({type:Boolean})],oe.prototype,"round",void 0),ee([o.property()],oe.prototype,"label",void 0),ee([o.property()],oe.prototype,"icon",void 0),ee([o.property()],oe.prototype,"iconVariant",void 0),ee([o.property({type:Boolean})],oe.prototype,"trailingIcon",void 0),ee([o.property({type:Boolean})],oe.prototype,"loading",void 0),ee([o.property()],oe.prototype,"tooltipPosition",void 0),ee([o.property({type:Boolean})],oe.prototype,"hideTooltip",void 0),ee([o.property({type:Boolean})],oe.prototype,"forceTooltip",void 0),ee([o.query(".ft-button")],oe.prototype,"button",void 0),ee([o.query(".ft-button--label slot")],oe.prototype,"slottedContent",void 0),i.customElement("ft-button")(oe);const ne=i.FtCssVariableFactory.extend("--ft-chip-color",i.designSystemVariables.colorOnSurface),re={backgroundColor:i.FtCssVariableFactory.extend("--ft-chip-background-color",i.designSystemVariables.colorSurface),color:ne,fontSize:i.FtCssVariableFactory.extend("--ft-chip-font-size",_t.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:i.FtCssVariableFactory.extend("--ft-chip-ripple-color",ne),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")},se=i.FtCssVariableFactory.extend("--ft-chip-highlighted-color",i.FtCssVariableFactory.extend("--ft-chip-color",i.designSystemVariables.colorOnPrimary)),ae={backgroundColor:i.FtCssVariableFactory.extend("--ft-chip-highlighted-background-color",i.FtCssVariableFactory.extend("--ft-chip-background-color",i.designSystemVariables.colorPrimary)),color:se,rippleColor:i.FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color",se)},le=i.FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),pe=i.FtCssVariableFactory.create("--ft-chip-dense-vertical-padding","SIZE","4px"),he=[i.noTextSelect,e.css`
|
|
578
578
|
:host {
|
|
579
579
|
display: inline-block;
|
|
580
580
|
max-width: 100%;
|
|
@@ -590,20 +590,20 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
590
590
|
box-sizing: border-box;
|
|
591
591
|
pointer-events: auto;
|
|
592
592
|
|
|
593
|
-
--ft-chip-internal-font-size: ${
|
|
593
|
+
--ft-chip-internal-font-size: ${re.fontSize};
|
|
594
594
|
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
595
|
-
${i.setVariable(
|
|
596
|
-
--ft-chip-internal-vertical-padding: ${
|
|
597
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
595
|
+
${i.setVariable(Ri.size,re.iconSize)};
|
|
596
|
+
--ft-chip-internal-vertical-padding: ${re.verticalPadding};
|
|
597
|
+
--ft-chip-internal-horizontal-padding: ${re.horizontalPadding};
|
|
598
598
|
--ft-chip-internal-icon-padding: 3px;
|
|
599
|
-
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${
|
|
599
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${re.iconSize});
|
|
600
600
|
|
|
601
|
-
border: 1px solid ${
|
|
602
|
-
color: ${
|
|
603
|
-
${i.setVariable(
|
|
601
|
+
border: 1px solid ${re.colorOutline};
|
|
602
|
+
color: ${re.color};
|
|
603
|
+
${i.setVariable(Ii.color,re.rippleColor)};
|
|
604
604
|
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
605
605
|
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
606
|
-
background-color: ${
|
|
606
|
+
background-color: ${re.backgroundColor};
|
|
607
607
|
line-height: var(--ft-chip-internal-content-height);
|
|
608
608
|
}
|
|
609
609
|
|
|
@@ -613,8 +613,8 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
613
613
|
|
|
614
614
|
.ft-chip--dense {
|
|
615
615
|
--ft-chip-internal-icon-padding: 3px;
|
|
616
|
-
--ft-chip-internal-vertical-padding: ${
|
|
617
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
616
|
+
--ft-chip-internal-vertical-padding: ${pe};
|
|
617
|
+
--ft-chip-internal-horizontal-padding: ${le};
|
|
618
618
|
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
619
619
|
}
|
|
620
620
|
|
|
@@ -626,15 +626,15 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
626
626
|
cursor: default;
|
|
627
627
|
pointer-events: none;
|
|
628
628
|
filter: grayscale(1);
|
|
629
|
-
opacity: ${
|
|
629
|
+
opacity: ${re.opacityDisabled};
|
|
630
630
|
}
|
|
631
631
|
|
|
632
632
|
.ft-chip--highlighted {
|
|
633
633
|
border: none;
|
|
634
634
|
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
635
|
-
background-color: ${
|
|
636
|
-
${i.setVariable(
|
|
637
|
-
color: ${
|
|
635
|
+
background-color: ${ae.backgroundColor};
|
|
636
|
+
${i.setVariable(Ii.color,ae.rippleColor)};
|
|
637
|
+
color: ${ae.color};
|
|
638
638
|
}
|
|
639
639
|
|
|
640
640
|
.ft-chip--clickable {
|
|
@@ -664,9 +664,9 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
664
664
|
}
|
|
665
665
|
|
|
666
666
|
.ft-chip--icon-button {
|
|
667
|
-
${i.setVariable(
|
|
668
|
-
${i.setVariable(
|
|
669
|
-
${i.setVariable(
|
|
667
|
+
${i.setVariable(Vi.iconSize,re.iconSize)};
|
|
668
|
+
${i.setVariable(Vi.horizontalPadding,"var(--ft-chip-internal-icon-padding)")};
|
|
669
|
+
${i.setVariable(Vi.verticalPadding,"var(--ft-chip-internal-icon-padding)")};
|
|
670
670
|
margin: calc((-1) * var(--ft-chip-internal-icon-padding));
|
|
671
671
|
}
|
|
672
672
|
|
|
@@ -674,8 +674,8 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
674
674
|
vertical-align: bottom;
|
|
675
675
|
display: block;
|
|
676
676
|
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
677
|
-
${i.setVariable(
|
|
678
|
-
${i.setVariable(
|
|
677
|
+
${i.setVariable(_t.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
678
|
+
${i.setVariable(_t.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
679
679
|
}
|
|
680
680
|
|
|
681
681
|
.ft-chip--safari-fix .ft-chip--label {
|
|
@@ -711,7 +711,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
711
711
|
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-button {
|
|
712
712
|
order: -1;
|
|
713
713
|
}
|
|
714
|
-
`];var
|
|
714
|
+
`];var fe=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class ce extends CustomEvent{constructor(){super("icon-click")}}class de 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.iconLabel="",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`
|
|
715
715
|
<div class="${n.classMap(t)}"
|
|
716
716
|
aria-label="${this.getLabel()}"
|
|
717
717
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
@@ -734,7 +734,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
734
734
|
<div class="ft-chip--icon-container ft-no-text-select">
|
|
735
735
|
<ft-icon .variant=${this.iconVariant} .value="${this.internalIcon}"></ft-icon>
|
|
736
736
|
</div>
|
|
737
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new
|
|
737
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new ce))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new ce))}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?"close":void 0)}}de.elementDefinitions={"ft-ripple":_i,"ft-typography":xi,"ft-icon":Li,"ft-button":oe},de.styles=he,fe([o.property({type:Boolean})],de.prototype,"highlighted",void 0),fe([o.property({type:Boolean})],de.prototype,"removable",void 0),fe([o.property({type:Boolean})],de.prototype,"disabled",void 0),fe([o.property({type:Boolean})],de.prototype,"clickable",void 0),fe([o.property({type:Boolean})],de.prototype,"iconClickable",void 0),fe([o.property({type:Boolean})],de.prototype,"dense",void 0),fe([o.property({type:Boolean})],de.prototype,"multiLine",void 0),fe([o.property()],de.prototype,"label",void 0),fe([o.property()],de.prototype,"iconLabel",void 0),fe([o.property()],de.prototype,"icon",void 0),fe([o.property()],de.prototype,"iconVariant",void 0),fe([o.property({type:Boolean})],de.prototype,"trailingIcon",void 0),fe([o.query("ft-typography slot")],de.prototype,"slottedContent",void 0),i.customElement("ft-chip")(de);var ue=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class ge extends g{constructor(){super(...arguments),this.editorMode=!1}render(){return e.html`
|
|
738
738
|
<ft-tooltip text="${this.tooltipText}">
|
|
739
739
|
<ft-chip>
|
|
740
740
|
${this.renderContent()}
|
|
@@ -747,4 +747,4 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
747
747
|
display: none !important;
|
|
748
748
|
}
|
|
749
749
|
</style>
|
|
750
|
-
`}get valueText(){var t,i;return null!==(i=null===(t=this.metadata)||void 0===t?void 0:t.values.join(", "))&&void 0!==i?i:""}get tooltipText(){var t,i;return this.metadata?`${null!==(i=null===(t=this.metadata)||void 0===t?void 0:t.label)&&void 0!==i?i:this.metadata.key}: ${this.valueText}`:""}update(t){super.update(t),["key","tocNode"].some((i=>t.has(i)))&&this.updateContent()}onStoreAvailable(){super.onStoreAvailable(),this.updateContent()}updateContent(){var t;this.metadata=void 0,this.tocNode&&this.key&&(null===(t=this.service)||void 0===t||t.getTopicInfo(this.tocNode).then((t=>this.metadata=t.metadata.find((t=>t.key===this.key)))).catch((()=>null)))}}
|
|
750
|
+
`}get valueText(){var t,i;return null!==(i=null===(t=this.metadata)||void 0===t?void 0:t.values.join(", "))&&void 0!==i?i:""}get tooltipText(){var t,i;return this.metadata?`${null!==(i=null===(t=this.metadata)||void 0===t?void 0:t.label)&&void 0!==i?i:this.metadata.key}: ${this.valueText}`:""}update(t){super.update(t),["key","tocNode"].some((i=>t.has(i)))&&this.updateContent()}onStoreAvailable(){super.onStoreAvailable(),this.updateContent()}updateContent(){var t;this.metadata=void 0,this.tocNode&&this.key&&(null===(t=this.service)||void 0===t||t.getTopicInfo(this.tocNode).then((t=>this.metadata=t.metadata.find((t=>t.key===this.key)))).catch((()=>null)))}}ge.elementDefinitions={"ft-tooltip":Si,"ft-chip":de},ge.styles=s,ue([o.property()],ge.prototype,"key",void 0),ue([o.state()],ge.prototype,"editorMode",void 0),ue([o.state()],ge.prototype,"metadata",void 0),i.customElement("ft-reader-topic-metadata")(ge),t.FtReaderTopicMetadata=ge,t.FtReaderTopicMetadataCssVariables={},t.styles=s}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|