@fluid-topics/ft-tooltip 0.2.2 → 0.2.6
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-tooltip.inline-styles.js +89 -89
- package/build/ft-tooltip.light.js +84 -84
- package/build/ft-tooltip.min.js +88 -88
- package/package.json +4 -4
|
@@ -4,115 +4,115 @@
|
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var s;const n=globalThis.trustedTypes,r=n?n.createPolicy("lit-html",{createHTML:t=>t}):void 0,h=`lit$${(Math.random()+"").slice(9)}$`,l="?"+h,p=`<${l}>`,a=document,f=(t="")=>a.createComment(t),y=t=>null===t||"object"!=typeof t&&"function"!=typeof t,g=Array.isArray,c=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,d=/-->/g,u=/>/g,v=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,$=/'/g,b=/"/g,x=/^(?:script|style|textarea|title)$/i,m=(t=>(i,...o)=>({_$litType$:t,strings:i,values:o}))(1),w=Symbol.for("lit-noChange"),z=Symbol.for("lit-nothing"),k=new WeakMap,A=a.createTreeWalker(a,129,null,!1),_=(t,i)=>{const o=t.length-1,e=[];let s,n=2===i?"<svg>":"",l=c;for(let i=0;i<o;i++){const o=t[i];let r,a,f=-1,y=0;for(;y<o.length&&(l.lastIndex=y,a=l.exec(o),null!==a);)y=l.lastIndex,l===c?"!--"===a[1]?l=d:void 0!==a[1]?l=u:void 0!==a[2]?(x.test(a[2])&&(s=RegExp("</"+a[2],"g")),l=v):void 0!==a[3]&&(l=v):l===v?">"===a[0]?(l=null!=s?s:c,f=-1):void 0===a[1]?f=-2:(f=l.lastIndex-a[2].length,r=a[1],l=void 0===a[3]?v:'"'===a[3]?b:$):l===b||l===$?l=v:l===d||l===u?l=c:(l=v,s=void 0);const g=l===v&&t[i+1].startsWith("/>")?" ":"";n+=l===c?o+p:f>=0?(e.push(r),o.slice(0,f)+"$lit$"+o.slice(f)+h+g):o+h+(-2===f?(e.push(void 0),i):g)}const a=n+(t[o]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==r?r.createHTML(a):a,e]};class N{constructor({strings:t,_$litType$:i},o){let e;this.parts=[];let s=0,r=0;const p=t.length-1,a=this.parts,[y,g]=_(t,i);if(this.el=N.createElement(y,o),A.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(e=A.nextNode())&&a.length<p;){if(1===e.nodeType){if(e.hasAttributes()){const t=[];for(const i of e.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(h)){const o=g[r++];if(t.push(i),void 0!==o){const t=e.getAttribute(o.toLowerCase()+"$lit$").split(h),i=/([.?@])?(.*)/.exec(o);a.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?
|
|
7
|
+
var s;const n=globalThis.trustedTypes,r=n?n.createPolicy("lit-html",{createHTML:t=>t}):void 0,h=`lit$${(Math.random()+"").slice(9)}$`,l="?"+h,p=`<${l}>`,a=document,f=(t="")=>a.createComment(t),y=t=>null===t||"object"!=typeof t&&"function"!=typeof t,g=Array.isArray,c=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,d=/-->/g,u=/>/g,v=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,$=/'/g,b=/"/g,x=/^(?:script|style|textarea|title)$/i,m=(t=>(i,...o)=>({_$litType$:t,strings:i,values:o}))(1),w=Symbol.for("lit-noChange"),z=Symbol.for("lit-nothing"),k=new WeakMap,A=a.createTreeWalker(a,129,null,!1),_=(t,i)=>{const o=t.length-1,e=[];let s,n=2===i?"<svg>":"",l=c;for(let i=0;i<o;i++){const o=t[i];let r,a,f=-1,y=0;for(;y<o.length&&(l.lastIndex=y,a=l.exec(o),null!==a);)y=l.lastIndex,l===c?"!--"===a[1]?l=d:void 0!==a[1]?l=u:void 0!==a[2]?(x.test(a[2])&&(s=RegExp("</"+a[2],"g")),l=v):void 0!==a[3]&&(l=v):l===v?">"===a[0]?(l=null!=s?s:c,f=-1):void 0===a[1]?f=-2:(f=l.lastIndex-a[2].length,r=a[1],l=void 0===a[3]?v:'"'===a[3]?b:$):l===b||l===$?l=v:l===d||l===u?l=c:(l=v,s=void 0);const g=l===v&&t[i+1].startsWith("/>")?" ":"";n+=l===c?o+p:f>=0?(e.push(r),o.slice(0,f)+"$lit$"+o.slice(f)+h+g):o+h+(-2===f?(e.push(void 0),i):g)}const a=n+(t[o]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==r?r.createHTML(a):a,e]};class N{constructor({strings:t,_$litType$:i},o){let e;this.parts=[];let s=0,r=0;const p=t.length-1,a=this.parts,[y,g]=_(t,i);if(this.el=N.createElement(y,o),A.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(e=A.nextNode())&&a.length<p;){if(1===e.nodeType){if(e.hasAttributes()){const t=[];for(const i of e.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(h)){const o=g[r++];if(t.push(i),void 0!==o){const t=e.getAttribute(o.toLowerCase()+"$lit$").split(h),i=/([.?@])?(.*)/.exec(o);a.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?E:"?"===i[1]?M:"@"===i[1]?F:O})}else a.push({type:6,index:s})}for(const i of t)e.removeAttribute(i)}if(x.test(e.tagName)){const t=e.textContent.split(h),i=t.length-1;if(i>0){e.textContent=n?n.emptyScript:"";for(let o=0;o<i;o++)e.append(t[o],f()),A.nextNode(),a.push({type:2,index:++s});e.append(t[i],f())}}}else if(8===e.nodeType)if(e.data===l)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=e.data.indexOf(h,t+1));)a.push({type:7,index:s}),t+=h.length-1}s++}}static createElement(t,i){const o=a.createElement("template");return o.innerHTML=t,o}}function S(t,i,o=t,e){var s,n,r,h;if(i===w)return i;let l=void 0!==e?null===(s=o._$Cl)||void 0===s?void 0:s[e]:o._$Cu;const p=y(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==p&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===p?l=void 0:(l=new p(t),l._$AT(t,o,e)),void 0!==e?(null!==(r=(h=o)._$Cl)&&void 0!==r?r:h._$Cl=[])[e]=l:o._$Cu=l),void 0!==l&&(i=S(t,l._$AS(t,i.values),l,e)),i}class T{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:o},parts:e}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:a).importNode(o,!0);A.currentNode=s;let n=A.nextNode(),r=0,h=0,l=e[0];for(;void 0!==l;){if(r===l.index){let i;2===l.type?i=new C(n,n.nextSibling,this,t):1===l.type?i=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(i=new U(n,this,t)),this.v.push(i),l=e[++h]}r!==(null==l?void 0:l.index)&&(n=A.nextNode(),r++)}return s}m(t){let i=0;for(const o of this.v)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,i),i+=o.strings.length-2):o._$AI(t[i])),i++}}class C{constructor(t,i,o,e){var s;this.type=2,this._$AH=z,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=o,this.options=e,this._$Cg=null===(s=null==e?void 0:e.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}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=S(this,t,i),y(t)?t===z||null==t||""===t?(this._$AH!==z&&this._$AR(),this._$AH=z):t!==this._$AH&&t!==w&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):(t=>{var i;return g(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.S(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==z&&y(this._$AH)?this._$AA.nextSibling.data=t:this.k(a.createTextNode(t)),this._$AH=t}T(t){var i;const{values:o,_$litType$:e}=t,s="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=N.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.m(o);else{const t=new T(s,this),i=t.p(this.options);t.m(o),this.k(i),this._$AH=t}}_$AC(t){let i=k.get(t.strings);return void 0===i&&k.set(t.strings,i=new N(t)),i}S(t){g(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let o,e=0;for(const s of t)e===i.length?i.push(o=new C(this.M(f()),this.M(f()),this,this.options)):o=i[e],o._$AI(s),e++;e<i.length&&(this._$AR(o&&o._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var o;for(null===(o=this._$AP)||void 0===o||o.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._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class O{constructor(t,i,o,e,s){this.type=1,this._$AH=z,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=s,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,o,e){const s=this.strings;let n=!1;if(void 0===s)t=S(this,t,i,0),n=!y(t)||t!==this._$AH&&t!==w,n&&(this._$AH=t);else{const e=t;let r,h;for(t=s[0],r=0;r<s.length-1;r++)h=S(this,e[o+r],i,r),h===w&&(h=this._$AH[r]),n||(n=!y(h)||h!==this._$AH[r]),h===z?t=z:t!==z&&(t+=(null!=h?h:"")+s[r+1]),this._$AH[r]=h}n&&!e&&this.C(t)}C(t){t===z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class E extends O{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===z?void 0:t}}const I=n?n.emptyScript:"";class M extends O{constructor(){super(...arguments),this.type=4}C(t){t&&t!==z?this.element.setAttribute(this.name,I):this.element.removeAttribute(this.name)}}class F extends O{constructor(t,i,o,e,s){super(t,i,o,e,s),this.type=5}_$AI(t,i=this){var o;if((t=null!==(o=S(this,t,i,0))&&void 0!==o?o:z)===w)return;const e=this._$AH,s=t===z&&e!==z||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==z&&(e===z||s);s&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,o;"function"==typeof this._$AH?this._$AH.call(null!==(o=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==o?o:this.element,t):this._$AH.handleEvent(t)}}class U{constructor(t,i,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const j=window.litHtmlPolyfillSupport;null==j||j(N,C),(null!==(s=globalThis.litHtmlVersions)&&void 0!==s?s:globalThis.litHtmlVersions=[]).push("2.2.4");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const R=t=>({_$litStatic$:t}),
|
|
13
|
+
const R=Symbol.for(""),Z=t=>{var i,o;if((null===(i=t)||void 0===i?void 0:i.r)===R)return null===(o=t)||void 0===o?void 0:o._$litStatic$},W=t=>({_$litStatic$:t,r:R}),B=new Map,G=(t=>(i,...o)=>{const e=o.length;let s,n;const r=[],h=[];let l,p=0,a=!1;for(;p<e;){for(l=i[p];p<e&&void 0!==(n=o[p],s=Z(n));)l+=s+i[++p],a=!0;h.push(n),r.push(l),p++}if(p===e&&r.push(i[e]),a){const t=r.join("$$lit$$");void 0===(i=B.get(t))&&(r.raw=r,B.set(t,i=r)),o=h}return t(i,...o)})(m);var H,L=function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,o):e,h=t.length-1;h>=0;h--)(s=t[h])&&(r=(n<3?s(r):n>3?s(i,o,r):s(i,o))||r);return n>3&&r&&Object.defineProperty(i,o,r),r};!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"}(H||(H={}));const K=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),D=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),q={fontFamily:D,fontSize:i.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:i.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},J=i.FtCssVariable.extend("--ft-typography-title-font-family",K),P=i.FtCssVariable.extend("--ft-typography-title-font-size",q.fontSize,"20px"),Q=i.FtCssVariable.extend("--ft-typography-title-font-weight",q.fontWeight,"normal"),V=i.FtCssVariable.extend("--ft-typography-title-letter-spacing",q.letterSpacing,"0.15px"),X=i.FtCssVariable.extend("--ft-typography-title-line-height",q.lineHeight,"24px"),Y=i.FtCssVariable.extend("--ft-typography-title-text-transform",q.textTransform,"inherit"),tt=i.FtCssVariable.extend("--ft-typography-title-dense-font-family",K),it=i.FtCssVariable.extend("--ft-typography-title-dense-font-size",q.fontSize,"14px"),ot=i.FtCssVariable.extend("--ft-typography-title-dense-font-weight",q.fontWeight,"normal"),et=i.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",q.letterSpacing,"0.105px"),st=i.FtCssVariable.extend("--ft-typography-title-dense-line-height",q.lineHeight,"24px"),nt=i.FtCssVariable.extend("--ft-typography-title-dense-text-transform",q.textTransform,"inherit"),rt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-family",D),ht=i.FtCssVariable.extend("--ft-typography-subtitle1-font-size",q.fontSize,"16px"),lt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",q.fontWeight,"600"),pt=i.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",q.letterSpacing,"0.144px"),at=i.FtCssVariable.extend("--ft-typography-subtitle1-line-height",q.lineHeight,"24px"),ft=i.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",q.textTransform,"inherit"),yt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-family",D),gt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-size",q.fontSize,"14px"),ct=i.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",q.fontWeight,"normal"),dt=i.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",q.letterSpacing,"0.098px"),ut=i.FtCssVariable.extend("--ft-typography-subtitle2-line-height",q.lineHeight,"24px"),vt=i.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",q.textTransform,"inherit"),$t=i.FtCssVariable.extend("--ft-typography-body1-font-family",D),bt=i.FtCssVariable.extend("--ft-typography-body1-font-size",q.fontSize,"16px"),xt=i.FtCssVariable.extend("--ft-typography-body1-font-weight",q.fontWeight,"normal"),mt=i.FtCssVariable.extend("--ft-typography-body1-letter-spacing",q.letterSpacing,"0.496px"),wt=i.FtCssVariable.extend("--ft-typography-body1-line-height",q.lineHeight,"24px"),zt=i.FtCssVariable.extend("--ft-typography-body1-text-transform",q.textTransform,"inherit"),kt=i.FtCssVariable.extend("--ft-typography-body2-font-family",D),At=i.FtCssVariable.extend("--ft-typography-body2-font-size",q.fontSize,"14px"),_t=i.FtCssVariable.extend("--ft-typography-body2-font-weight",q.fontWeight,"normal"),Nt=i.FtCssVariable.extend("--ft-typography-body2-letter-spacing",q.letterSpacing,"0.252px"),St=i.FtCssVariable.extend("--ft-typography-body2-line-height",q.lineHeight,"20px"),Tt=i.FtCssVariable.extend("--ft-typography-body2-text-transform",q.textTransform,"inherit"),Ct=i.FtCssVariable.extend("--ft-typography-caption-font-family",D),Ot=i.FtCssVariable.extend("--ft-typography-caption-font-size",q.fontSize,"12px"),Et=i.FtCssVariable.extend("--ft-typography-caption-font-weight",q.fontWeight,"normal"),It=i.FtCssVariable.extend("--ft-typography-caption-letter-spacing",q.letterSpacing,"0.396px"),Mt=i.FtCssVariable.extend("--ft-typography-caption-line-height",q.lineHeight,"16px"),Ft=i.FtCssVariable.extend("--ft-typography-caption-text-transform",q.textTransform,"inherit"),Ut=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",D),jt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",q.fontSize,"10px"),Rt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",q.fontWeight,"normal"),Zt=i.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",q.letterSpacing,"0.33px"),Wt=i.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",q.lineHeight,"16px"),Bt=i.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",q.textTransform,"inherit"),Gt=i.FtCssVariable.extend("--ft-typography-overline-font-family",D),Ht=i.FtCssVariable.extend("--ft-typography-overline-font-size",q.fontSize,"10px"),Lt=i.FtCssVariable.extend("--ft-typography-overline-font-weight",q.fontWeight,"normal"),Kt=i.FtCssVariable.extend("--ft-typography-overline-letter-spacing",q.letterSpacing,"1.5px"),Dt=i.FtCssVariable.extend("--ft-typography-overline-line-height",q.lineHeight,"16px"),qt=i.FtCssVariable.extend("--ft-typography-overline-text-transform",q.textTransform,"uppercase"),Jt=i.FtCssVariable.extend("--ft-typography-button-font-family",D),Pt=i.FtCssVariable.extend("--ft-typography-button-font-size",q.fontSize,"14px"),Qt=i.FtCssVariable.extend("--ft-typography-button-font-weight",q.fontWeight,"600"),Vt=i.FtCssVariable.extend("--ft-typography-button-letter-spacing",q.letterSpacing,"1.246px"),Xt=i.FtCssVariable.extend("--ft-typography-button-line-height",q.lineHeight,"16px"),Yt=i.FtCssVariable.extend("--ft-typography-button-text-transform",q.textTransform,"uppercase"),ti=o.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
|
-
font-family: ${
|
|
16
|
-
font-size: ${
|
|
17
|
-
font-weight: ${
|
|
18
|
-
letter-spacing: ${
|
|
19
|
-
line-height: ${
|
|
20
|
-
text-transform: ${
|
|
15
|
+
font-family: ${J};
|
|
16
|
+
font-size: ${P};
|
|
17
|
+
font-weight: ${Q};
|
|
18
|
+
letter-spacing: ${V};
|
|
19
|
+
line-height: ${X};
|
|
20
|
+
text-transform: ${Y};
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,ii=o.css`
|
|
23
23
|
.ft-typography--title-dense {
|
|
24
|
-
font-family: ${
|
|
25
|
-
font-size: ${
|
|
26
|
-
font-weight: ${
|
|
27
|
-
letter-spacing: ${
|
|
28
|
-
line-height: ${
|
|
29
|
-
text-transform: ${
|
|
24
|
+
font-family: ${tt};
|
|
25
|
+
font-size: ${it};
|
|
26
|
+
font-weight: ${ot};
|
|
27
|
+
letter-spacing: ${et};
|
|
28
|
+
line-height: ${st};
|
|
29
|
+
text-transform: ${nt};
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,oi=o.css`
|
|
32
32
|
.ft-typography--subtitle1 {
|
|
33
|
-
font-family: ${
|
|
34
|
-
font-size: ${
|
|
35
|
-
font-weight: ${
|
|
36
|
-
letter-spacing: ${
|
|
37
|
-
line-height: ${
|
|
38
|
-
text-transform: ${
|
|
33
|
+
font-family: ${rt};
|
|
34
|
+
font-size: ${ht};
|
|
35
|
+
font-weight: ${lt};
|
|
36
|
+
letter-spacing: ${pt};
|
|
37
|
+
line-height: ${at};
|
|
38
|
+
text-transform: ${ft};
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,ei=o.css`
|
|
41
41
|
.ft-typography--subtitle2 {
|
|
42
|
-
font-family: ${
|
|
43
|
-
font-size: ${
|
|
44
|
-
font-weight: ${
|
|
45
|
-
letter-spacing: ${
|
|
46
|
-
line-height: ${
|
|
47
|
-
text-transform: ${
|
|
42
|
+
font-family: ${yt};
|
|
43
|
+
font-size: ${gt};
|
|
44
|
+
font-weight: ${ct};
|
|
45
|
+
letter-spacing: ${dt};
|
|
46
|
+
line-height: ${ut};
|
|
47
|
+
text-transform: ${vt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,si=o.css`
|
|
51
51
|
.ft-typography--body1 {
|
|
52
|
-
font-family: ${
|
|
53
|
-
font-size: ${
|
|
54
|
-
font-weight: ${
|
|
55
|
-
letter-spacing: ${
|
|
56
|
-
line-height: ${
|
|
57
|
-
text-transform: ${
|
|
52
|
+
font-family: ${$t};
|
|
53
|
+
font-size: ${bt};
|
|
54
|
+
font-weight: ${xt};
|
|
55
|
+
letter-spacing: ${mt};
|
|
56
|
+
line-height: ${wt};
|
|
57
|
+
text-transform: ${zt};
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,ni=o.css`
|
|
60
60
|
.ft-typography--body2 {
|
|
61
|
-
font-family: ${
|
|
62
|
-
font-size: ${
|
|
63
|
-
font-weight: ${
|
|
64
|
-
letter-spacing: ${
|
|
65
|
-
line-height: ${
|
|
66
|
-
text-transform: ${
|
|
61
|
+
font-family: ${kt};
|
|
62
|
+
font-size: ${At};
|
|
63
|
+
font-weight: ${_t};
|
|
64
|
+
letter-spacing: ${Nt};
|
|
65
|
+
line-height: ${St};
|
|
66
|
+
text-transform: ${Tt};
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,ri=o.css`
|
|
69
69
|
.ft-typography--caption {
|
|
70
|
-
font-family: ${
|
|
71
|
-
font-size: ${
|
|
72
|
-
font-weight: ${
|
|
73
|
-
letter-spacing: ${
|
|
74
|
-
line-height: ${
|
|
75
|
-
text-transform: ${
|
|
70
|
+
font-family: ${Ct};
|
|
71
|
+
font-size: ${Ot};
|
|
72
|
+
font-weight: ${Et};
|
|
73
|
+
letter-spacing: ${It};
|
|
74
|
+
line-height: ${Mt};
|
|
75
|
+
text-transform: ${Ft};
|
|
76
76
|
}
|
|
77
|
-
`,
|
|
77
|
+
`,hi=o.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
|
-
font-family: ${
|
|
80
|
-
font-size: ${
|
|
81
|
-
font-weight: ${
|
|
82
|
-
letter-spacing: ${
|
|
83
|
-
line-height: ${
|
|
84
|
-
text-transform: ${
|
|
79
|
+
font-family: ${Ut};
|
|
80
|
+
font-size: ${jt};
|
|
81
|
+
font-weight: ${Rt};
|
|
82
|
+
letter-spacing: ${Zt};
|
|
83
|
+
line-height: ${Wt};
|
|
84
|
+
text-transform: ${Bt};
|
|
85
85
|
}
|
|
86
|
-
`,
|
|
86
|
+
`,li=o.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
|
-
font-family: ${
|
|
89
|
-
font-size: ${
|
|
90
|
-
font-weight: ${
|
|
91
|
-
letter-spacing: ${
|
|
92
|
-
line-height: ${
|
|
93
|
-
text-transform: ${
|
|
88
|
+
font-family: ${Gt};
|
|
89
|
+
font-size: ${Ht};
|
|
90
|
+
font-weight: ${Lt};
|
|
91
|
+
letter-spacing: ${Kt};
|
|
92
|
+
line-height: ${Dt};
|
|
93
|
+
text-transform: ${qt};
|
|
94
94
|
}
|
|
95
|
-
`,
|
|
95
|
+
`,pi=o.css`
|
|
96
96
|
.ft-typography--button {
|
|
97
|
-
font-family: ${
|
|
98
|
-
font-size: ${
|
|
99
|
-
font-weight: ${
|
|
100
|
-
letter-spacing: ${
|
|
101
|
-
line-height: ${
|
|
102
|
-
text-transform: ${
|
|
97
|
+
font-family: ${Jt};
|
|
98
|
+
font-size: ${Pt};
|
|
99
|
+
font-weight: ${Qt};
|
|
100
|
+
letter-spacing: ${Vt};
|
|
101
|
+
line-height: ${Xt};
|
|
102
|
+
text-transform: ${Yt};
|
|
103
103
|
}
|
|
104
|
-
`;class
|
|
105
|
-
<${
|
|
104
|
+
`;class ai extends i.FtLitElement{constructor(){super(...arguments),this.variant=H.body1}render(){return this.element?G`
|
|
105
|
+
<${W(this.element)}
|
|
106
106
|
class="ft-typography ft-typography--${this.variant}">
|
|
107
107
|
<slot></slot>
|
|
108
|
-
</${
|
|
109
|
-
`:
|
|
108
|
+
</${W(this.element)}>
|
|
109
|
+
`:G`
|
|
110
110
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
111
|
-
`}}
|
|
111
|
+
`}}ai.styles=[ti,ii,oi,ei,si,ni,ri,hi,li,pi,o.css`
|
|
112
112
|
.ft-typography {
|
|
113
113
|
vertical-align: inherit;
|
|
114
114
|
}
|
|
115
|
-
`],
|
|
115
|
+
`],L([e.property()],ai.prototype,"element",void 0),L([e.property()],ai.prototype,"variant",void 0),i.customElement("ft-typography")(ai);var fi=function(t,i,o,e){for(var s,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,o):e,h=t.length-1;h>=0;h--)(s=t[h])&&(r=(n<3?s(r):n>3?s(i,o,r):s(i,o))||r);return n>3&&r&&Object.defineProperty(i,o,r),r};const yi={distance:i.FtCssVariable.create("--ft-tooltip-distance","SIZE","4px"),color:i.FtCssVariable.create("--ft-tooltip-color","COLOR","#FFFFFF"),backgroundColor:i.FtCssVariable.create("--ft-tooltip-background-color","COLOR","#666666"),zIndex:i.FtCssVariable.create("--ft-tooltip-z-index","NUMBER","1"),borderRadiusS:i.FtCssVariable.external(i.designSystemVariables.borderRadiusS,"Design system")};class gi 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 o.html`
|
|
116
116
|
<div part="container"
|
|
117
117
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
118
118
|
@mouseenter=${this.onHover}
|
|
@@ -127,7 +127,7 @@ const R=t=>({_$litStatic$:t}),Z=new Map,W=(t=>(i,...o)=>{var e;const s=o.length;
|
|
|
127
127
|
</div>
|
|
128
128
|
<slot></slot>
|
|
129
129
|
</div>
|
|
130
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),o=(i.height-this.tooltip.clientHeight)/2,e=(i.width-this.tooltip.clientWidth)/2,s=this.tooltip.style;switch(this.position){case"top":s.top=-this.tooltip.clientHeight+"px",s.left=e+"px";break;case"bottom":s.top=i.height+"px",s.left=e+"px";break;case"left":s.top=o+"px",s.left=-this.tooltip.clientWidth+"px";break;case"right":s.top=o+"px",s.left=i.width+"px"}s.maxWidth=Math.max(i.width,150)+"px"}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())}}
|
|
130
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),o=(i.height-this.tooltip.clientHeight)/2,e=(i.width-this.tooltip.clientWidth)/2,s=this.tooltip.style;switch(this.position){case"top":s.top=-this.tooltip.clientHeight+"px",s.left=e+"px";break;case"bottom":s.top=i.height+"px",s.left=e+"px";break;case"left":s.top=o+"px",s.left=-this.tooltip.clientWidth+"px";break;case"right":s.top=o+"px",s.left=i.width+"px"}s.maxWidth=Math.max(i.width,150)+"px"}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())}}gi.elementDefinitions={"ft-typography":ai},gi.styles=o.css`
|
|
131
131
|
.ft-tooltip--container {
|
|
132
132
|
display: block;
|
|
133
133
|
position: relative;
|
|
@@ -145,18 +145,18 @@ const R=t=>({_$litStatic$:t}),Z=new Map,W=(t=>(i,...o)=>{var e;const s=o.length;
|
|
|
145
145
|
width: max-content;
|
|
146
146
|
max-width: 150px;
|
|
147
147
|
text-align: center;
|
|
148
|
-
padding: ${
|
|
149
|
-
z-index: ${
|
|
148
|
+
padding: ${yi.distance};
|
|
149
|
+
z-index: ${yi.zIndex};
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
.ft-tooltip--content {
|
|
153
153
|
padding: 4px 8px;
|
|
154
|
-
border-radius: ${
|
|
155
|
-
background-color: ${
|
|
156
|
-
color: ${
|
|
154
|
+
border-radius: ${yi.borderRadiusS};
|
|
155
|
+
background-color: ${yi.backgroundColor};
|
|
156
|
+
color: ${yi.color};
|
|
157
157
|
top: -500px;
|
|
158
158
|
left: -500px;
|
|
159
159
|
position: relative;
|
|
160
160
|
word-break: break-word;
|
|
161
161
|
}
|
|
162
|
-
`,
|
|
162
|
+
`,fi([e.property()],gi.prototype,"text",void 0),fi([e.property({type:Boolean})],gi.prototype,"manual",void 0),fi([e.property({type:Boolean})],gi.prototype,"inline",void 0),fi([e.property({type:Number})],gi.prototype,"delay",void 0),fi([e.property()],gi.prototype,"position",void 0),fi([e.queryAssignedNodes("",!0)],gi.prototype,"slotNodes",void 0),fi([e.query(".ft-tooltip--container")],gi.prototype,"container",void 0),fi([e.query("slot")],gi.prototype,"target",void 0),fi([e.query(".ft-tooltip")],gi.prototype,"tooltip",void 0),fi([e.query(".ft-tooltip--content")],gi.prototype,"tooltipContent",void 0),fi([e.state()],gi.prototype,"visible",void 0),i.customElement("ft-tooltip")(gi),t.FtTooltip=gi,t.FtTooltipCssVariables=yi,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators);
|