@fluid-topics/ft-tooltip 0.2.22 → 0.3.0
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.d.ts +6 -6
- package/build/ft-tooltip.js +6 -6
- package/build/ft-tooltip.light.js +25 -25
- package/build/ft-tooltip.min.js +37 -37
- package/package.json +5 -5
package/build/ft-tooltip.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropertyValues } from "lit";
|
|
2
|
-
import { ElementDefinitionsMap,
|
|
2
|
+
import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
3
3
|
export interface FtTooltipProperties {
|
|
4
4
|
text: string;
|
|
5
5
|
inline: boolean;
|
|
@@ -8,11 +8,11 @@ export interface FtTooltipProperties {
|
|
|
8
8
|
position: Position;
|
|
9
9
|
}
|
|
10
10
|
export declare const FtTooltipCssVariables: {
|
|
11
|
-
distance: FtCssVariable;
|
|
12
|
-
color: FtCssVariable;
|
|
13
|
-
backgroundColor: FtCssVariable;
|
|
14
|
-
zIndex: FtCssVariable;
|
|
15
|
-
borderRadiusS: FtCssVariable;
|
|
11
|
+
distance: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
12
|
+
color: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
13
|
+
backgroundColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
14
|
+
zIndex: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
15
|
+
borderRadiusS: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
16
16
|
};
|
|
17
17
|
export declare type Position = "top" | "bottom" | "left" | "right";
|
|
18
18
|
export declare class FtTooltip extends FtLitElement implements FtTooltipProperties {
|
package/build/ft-tooltip.js
CHANGED
|
@@ -6,14 +6,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { css, html } from "lit";
|
|
8
8
|
import { property, query, queryAssignedNodes, state } from "lit/decorators.js";
|
|
9
|
-
import { Debouncer, designSystemVariables,
|
|
9
|
+
import { Debouncer, designSystemVariables, FtCssVariableFactory, FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
10
10
|
import { FtTypography } from "@fluid-topics/ft-typography";
|
|
11
11
|
export const FtTooltipCssVariables = {
|
|
12
|
-
distance:
|
|
13
|
-
color:
|
|
14
|
-
backgroundColor:
|
|
15
|
-
zIndex:
|
|
16
|
-
borderRadiusS:
|
|
12
|
+
distance: FtCssVariableFactory.create("--ft-tooltip-distance", "SIZE", "4px"),
|
|
13
|
+
color: FtCssVariableFactory.create("--ft-tooltip-color", "COLOR", "#FFFFFF"),
|
|
14
|
+
backgroundColor: FtCssVariableFactory.create("--ft-tooltip-background-color", "COLOR", "#666666"),
|
|
15
|
+
zIndex: FtCssVariableFactory.create("--ft-tooltip-z-index", "NUMBER", "1"),
|
|
16
|
+
borderRadiusS: FtCssVariableFactory.external(designSystemVariables.borderRadiusS, "Design system"),
|
|
17
17
|
};
|
|
18
18
|
export class FtTooltip extends FtLitElement {
|
|
19
19
|
constructor() {
|
|
@@ -4,16 +4,16 @@
|
|
|
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,
|
|
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=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),$=/'/g,b=/"/g,m=/^(?:script|style|textarea|title)$/i,x=(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),N=(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]?(m.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 _{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]=N(t,i);if(this.el=_.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]?C:"?"===i[1]?M:"@"===i[1]?R:E})}else a.push({type:6,index:s})}for(const i of t)e.removeAttribute(i)}if(m.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 O(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 O{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._$C_=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._$C_}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(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.k(t):(t=>g(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.S(t):this.T(t)}j(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.j(t))}T(t){this._$AH!==z&&y(this._$AH)?this._$AA.nextSibling.data=t:this.k(a.createTextNode(t)),this._$AH=t}$(t){var i;const{values:o,_$litType$:e}=t,s="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=_.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 _(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 O(this.j(f()),this.j(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._$C_=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class E{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.P(t)}P(t){t===z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class C extends E{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===z?void 0:t}}const I=n?n.emptyScript:"";class M extends E{constructor(){super(...arguments),this.type=4}P(t){t&&t!==z?this.element.setAttribute(this.name,I):this.element.removeAttribute(this.name)}}class R extends E{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(_,O),(null!==(s=globalThis.litHtmlVersions)&&void 0!==s?s:globalThis.litHtmlVersions=[]).push("2.2.7");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
13
|
+
const F=Symbol.for(""),Z=t=>{if((null==t?void 0:t.r)===F)return null==t?void 0:t._$litStatic$},B=t=>({_$litStatic$:t,r:F}),W=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=W.get(t))&&(r.raw=r,W.set(t,i=r)),o=h}return t(i,...o)})(x);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 P=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),K=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),D={fontFamily:K,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")},q=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",P),J=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",D.fontSize,"20px"),Q=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",D.fontWeight,"normal"),V=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",D.letterSpacing,"0.15px"),X=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",D.lineHeight,"1.2"),Y=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",D.textTransform,"inherit"),tt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",P),it=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",D.fontSize,"14px"),ot=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",D.fontWeight,"normal"),et=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",D.letterSpacing,"0.105px"),st=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",D.lineHeight,"1.7"),nt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",D.textTransform,"inherit"),rt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",K),ht=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",D.fontSize,"16px"),lt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",D.fontWeight,"600"),pt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",D.letterSpacing,"0.144px"),at=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",D.lineHeight,"1.5"),ft=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",D.textTransform,"inherit"),yt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",K),gt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",D.fontSize,"14px"),ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",D.fontWeight,"normal"),dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",D.letterSpacing,"0.098px"),ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",D.lineHeight,"1.7"),vt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",D.textTransform,"inherit"),$t=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",K),bt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",D.fontSize,"16px"),mt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",D.fontWeight,"normal"),xt=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",D.letterSpacing,"0.496px"),wt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",D.lineHeight,"1.5"),zt=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",D.textTransform,"inherit"),kt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",K),At=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",D.fontSize,"14px"),Nt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",D.fontWeight,"normal"),_t=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",D.letterSpacing,"0.252px"),St=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",D.lineHeight,"1.4"),Tt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",D.textTransform,"inherit"),Ot=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",K),Et=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",D.fontSize,"12px"),Ct=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",D.fontWeight,"normal"),It=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",D.letterSpacing,"0.396px"),Mt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",D.lineHeight,"1.33"),Rt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",D.textTransform,"inherit"),Ut=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",K),jt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",D.fontSize,"10px"),Ft=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",D.fontWeight,"normal"),Zt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",D.letterSpacing,"0.33px"),Bt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",D.lineHeight,"1.6"),Wt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",D.textTransform,"inherit"),Gt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",K),Ht=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",D.fontSize,"10px"),Lt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",D.fontWeight,"normal"),Pt=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",D.letterSpacing,"1.5px"),Kt=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",D.lineHeight,"1.6"),Dt=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",D.textTransform,"uppercase"),qt=i.FtCssVariableFactory.extend("--ft-typography-button-font-family",K),Jt=i.FtCssVariableFactory.extend("--ft-typography-button-font-size",D.fontSize,"14px"),Qt=i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",D.fontWeight,"600"),Vt=i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",D.letterSpacing,"1.246px"),Xt=i.FtCssVariableFactory.extend("--ft-typography-button-line-height",D.lineHeight,"1.15"),Yt=i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",D.textTransform,"uppercase"),ti=o.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
|
-
font-family: ${
|
|
16
|
-
font-size: ${
|
|
15
|
+
font-family: ${q};
|
|
16
|
+
font-size: ${J};
|
|
17
17
|
font-weight: ${Q};
|
|
18
18
|
letter-spacing: ${V};
|
|
19
19
|
line-height: ${X};
|
|
@@ -33,8 +33,8 @@ const j=Symbol.for(""),Z=t=>{var i,o;if((null===(i=t)||void 0===i?void 0:i.r)===
|
|
|
33
33
|
font-family: ${rt};
|
|
34
34
|
font-size: ${ht};
|
|
35
35
|
font-weight: ${lt};
|
|
36
|
-
letter-spacing: ${
|
|
37
|
-
line-height: ${
|
|
36
|
+
letter-spacing: ${pt};
|
|
37
|
+
line-height: ${at};
|
|
38
38
|
text-transform: ${ft};
|
|
39
39
|
}
|
|
40
40
|
`,ei=o.css`
|
|
@@ -67,18 +67,18 @@ const j=Symbol.for(""),Z=t=>{var i,o;if((null===(i=t)||void 0===i?void 0:i.r)===
|
|
|
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: ${Ot};
|
|
71
|
+
font-size: ${Et};
|
|
72
|
+
font-weight: ${Ct};
|
|
73
|
+
letter-spacing: ${It};
|
|
74
|
+
line-height: ${Mt};
|
|
75
|
+
text-transform: ${Rt};
|
|
76
76
|
}
|
|
77
77
|
`,hi=o.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
|
-
font-family: ${
|
|
80
|
-
font-size: ${
|
|
81
|
-
font-weight: ${
|
|
79
|
+
font-family: ${Ut};
|
|
80
|
+
font-size: ${jt};
|
|
81
|
+
font-weight: ${Ft};
|
|
82
82
|
letter-spacing: ${Zt};
|
|
83
83
|
line-height: ${Bt};
|
|
84
84
|
text-transform: ${Wt};
|
|
@@ -88,31 +88,31 @@ const j=Symbol.for(""),Z=t=>{var i,o;if((null===(i=t)||void 0===i?void 0:i.r)===
|
|
|
88
88
|
font-family: ${Gt};
|
|
89
89
|
font-size: ${Ht};
|
|
90
90
|
font-weight: ${Lt};
|
|
91
|
-
letter-spacing: ${
|
|
92
|
-
line-height: ${
|
|
93
|
-
text-transform: ${
|
|
91
|
+
letter-spacing: ${Pt};
|
|
92
|
+
line-height: ${Kt};
|
|
93
|
+
text-transform: ${Dt};
|
|
94
94
|
}
|
|
95
|
-
`,
|
|
95
|
+
`,pi=o.css`
|
|
96
96
|
.ft-typography--button {
|
|
97
|
-
font-family: ${
|
|
98
|
-
font-size: ${
|
|
97
|
+
font-family: ${qt};
|
|
98
|
+
font-size: ${Jt};
|
|
99
99
|
font-weight: ${Qt};
|
|
100
100
|
letter-spacing: ${Vt};
|
|
101
101
|
line-height: ${Xt};
|
|
102
102
|
text-transform: ${Yt};
|
|
103
103
|
}
|
|
104
|
-
`;class
|
|
104
|
+
`;class ai extends i.FtLitElement{constructor(){super(...arguments),this.variant=H.body1}render(){return this.element?G`
|
|
105
105
|
<${B(this.element)}
|
|
106
106
|
class="ft-typography ft-typography--${this.variant}">
|
|
107
107
|
<slot></slot>
|
|
108
108
|
</${B(this.element)}>
|
|
109
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
|
-
`],L([e.property()],
|
|
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.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),color:i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),backgroundColor:i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),zIndex:i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),borderRadiusS:i.FtCssVariableFactory.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 j=Symbol.for(""),Z=t=>{var i,o;if((null===(i=t)||void 0===i?void 0:i.r)===
|
|
|
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())}}gi.elementDefinitions={"ft-typography":
|
|
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;
|
package/build/ft-tooltip.min.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,i=window.customElements.define,e=window.customElements.get,o=window.customElements,n=new WeakMap,s=new WeakMap,r=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=n.prototype.attributeChangedCallback,l=new Set(n.observedAttributes||[]);
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,i=window.customElements.define,e=window.customElements.get,o=window.customElements,n=new WeakMap,s=new WeakMap,r=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=n.prototype.attributeChangedCallback,l=new Set(n.observedAttributes||[]);f(n,l,a);const h={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,h),this._definitionsByClass.set(n,h);let c=e.call(o,t);c||(c=p(t),i.call(o,t,c)),this===window.customElements&&(r.set(n,h),h.standInClass=c);const u=this._awaitingUpgrade.get(t);if(u){this._awaitingUpgrade.delete(t);for(const t of u)s.delete(t),d(t,h,!0)}const y=this._whenDefinedPromises.get(t);return void 0!==y&&(y.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){g.push(this),o.upgrade.apply(o,arguments),g.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const i=this._getDefinition(t);if(void 0!==i)return Promise.resolve(i.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,i,e){let o=this._awaitingUpgrade.get(i);o||this._awaitingUpgrade.set(i,o=new Set),e?o.add(t):o.delete(t)}},window.HTMLElement=function(){let i=l;if(i)return l=void 0,i;const e=r.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return i=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(i,this.constructor.prototype),n.set(i,e),i},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,c=t=>{let i=t.getRootNode();if(!h(i)){const t=g[g.length-1];if(t instanceof CustomElementRegistry)return t;i=t.getRootNode(),h(i)||(i=a.get(i)?.getRootNode()||document)}return i.customElements},p=i=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const o=c(e)||window.customElements,n=o._getDefinition(i);return n?d(e,n):s.set(e,o),e}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,i,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,i,!1)}adoptedCallback(){n.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,i,e)=>{if(0===i.size||void 0===e)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const s=t.toLowerCase();if(i.has(s)){const t=this.getAttribute(s);o.call(this,s,n),e.call(this,s,t,n)}else o.call(this,s,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(i.has(o)){const t=this.getAttribute(o);n.call(this,o),e.call(this,o,t,null)}else n.call(this,o)})},u=i=>{const e=Object.getPrototypeOf(i);if(e!==window.HTMLElement)return e===t||"HTMLElement"===e?.prototype?.constructor?.name?Object.setPrototypeOf(i,window.HTMLElement):u(e)},d=(t,i,e=!1)=>{Object.setPrototypeOf(t,i.elementClass.prototype),n.set(t,i),l=t;try{new i.elementClass}catch(t){u(i.elementClass),new i.elementClass}i.observedAttributes.forEach((e=>{t.hasAttribute(e)&&i.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&i.connectedCallback&&t.isConnected&&i.connectedCallback.call(t)},y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const i=y.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};let g=[document];const v=(t,i,e)=>{const o=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){g.push(this);const t=o.apply(e||this,arguments);return void 0!==t&&a.set(t,this),g.pop(),t}};v(ShadowRoot,"createElement",document),v(ShadowRoot,"importNode",document),v(Element,"insertAdjacentHTML");const b=(t,i)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,i);Object.defineProperty(t.prototype,i,{...e,set(t){g.push(this),e.set.call(this,t),g.pop()}})};if(b(Element,"innerHTML"),b(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,i=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const o=i.call(this,...e);return t.set(o,this),o},e.forEach((i=>{const e=window.ElementInternals.prototype,o=e[i];e[i]=function(...i){const e=t.get(this);if(!0!==n.get(e).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...i)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class s{constructor(t){const i=new Map;t.forEach(((t,e)=>{const o=t.getAttribute("name"),n=i.get(o)||[];this[+e]=t,n.push(t),i.set(o,n)})),this.length=t.length,i.forEach(((t,i)=>{t&&(1===t.length?this[i]=t[0]:this[i]=new o(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),i=[];for(const e of t){const t=n.get(e);t&&!0!==t.formAssociated||i.push(e)}return new s(i)}})}}try{window.customElements.define("custom-element",null)}catch(yt){const t=window.customElements.define;window.customElements.define=(i,e,o)=>{try{t.bind(window.customElements)(i,e,o)}catch(t){console.warn(i,e,o,t)}}}class i{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,i){this.callbacks=[t],this.debounce(i)}queue(t,i){this.callbacks.push(t),this.debounce(i)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -46,34 +46,34 @@ const n=({finisher:t,descriptor:i})=>(e,o)=>{var n;if(void 0===o){const o=null!=
|
|
|
46
46
|
* Copyright 2019 Google LLC
|
|
47
47
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
48
48
|
*/
|
|
49
|
-
const h=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,c=Symbol(),p=new
|
|
49
|
+
const h=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,c=Symbol(),p=new WeakMap;class f{constructor(t,i,e){if(this._$cssResult$=!0,e!==c)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}get styleSheet(){let t=this.o;const i=this.t;if(h&&void 0===t){const e=void 0!==i&&1===i.length;e&&(t=p.get(i)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&p.set(i,t))}return t}toString(){return this.cssText}}const u=t=>new f("string"==typeof t?t:t+"",void 0,c),d=(t,...i)=>{const e=1===t.length?t[0]:i.reduce(((i,e,o)=>i+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+t[o+1]),t[0]);return new f(e,t,c)},y=(t,i)=>{h?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((i=>{const e=document.createElement("style"),o=window.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=i.cssText,t.appendChild(e)}))},g=h?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let i="";for(const e of t.cssRules)i+=e.cssText;return u(i)})(t):t
|
|
50
50
|
/**
|
|
51
51
|
* @license
|
|
52
52
|
* Copyright 2017 Google LLC
|
|
53
53
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
54
|
-
*/;var v;const b=window.trustedTypes,m=b?b.emptyScript:"",x=window.reactiveElementPolyfillSupport,w={toAttribute(t,i){switch(i){case Boolean:t=t?m:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let e=t;switch(i){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(t){e=null}}return e}}
|
|
54
|
+
*/;var v;const b=window.trustedTypes,m=b?b.emptyScript:"",x=window.reactiveElementPolyfillSupport,w={toAttribute(t,i){switch(i){case Boolean:t=t?m:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let e=t;switch(i){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(t){e=null}}return e}},$=(t,i)=>i!==t&&(i==i||t==t),O={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:$};class S extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var i;null!==(i=this.h)&&void 0!==i||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,e)=>{const o=this._$Ep(e,i);void 0!==o&&(this._$Ev.set(o,e),t.push(o))})),t}static createProperty(t,i=O){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const e="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,e,i);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,i,e){return{get(){return this[i]},set(o){const n=this[t];this[i]=o,this.requestUpdate(t,n,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||O}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const e of i)this.createProperty(e,t[e])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)i.unshift(g(t))}else void 0!==t&&i.push(g(t));return i}static _$Ep(t,i){const e=i.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,e;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(e=t.hostConnected)||void 0===e||e.call(t))}removeController(t){var i;null===(i=this._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return y(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,e){this._$AK(t,e)}_$EO(t,i,e=O){var o,n;const s=this.constructor._$Ep(t,e);if(void 0!==s&&!0===e.reflect){const r=(null!==(n=null===(o=e.converter)||void 0===o?void 0:o.toAttribute)&&void 0!==n?n:w.toAttribute)(i,e.type);this._$El=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$El=null}}_$AK(t,i){var e,o;const n=this.constructor,s=n._$Ev.get(t);if(void 0!==s&&this._$El!==s){const t=n.getPropertyOptions(s),r=t.converter,a=null!==(o=null!==(e=null==r?void 0:r.fromAttribute)&&void 0!==e?e:"function"==typeof r?r:null)&&void 0!==o?o:w.fromAttribute;this._$El=s,this[s]=a(i,t.type),this._$El=null}}requestUpdate(t,i,e){let o=!0;void 0!==t&&(((e=e||this.constructor.getPropertyOptions(t)).hasChanged||$)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===e.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,e))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const e=this._$AL;try{i=this.shouldUpdate(e),i?(this.willUpdate(e),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(e)):this._$Ek()}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(e)}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
55
55
|
/**
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright 2017 Google LLC
|
|
58
58
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
59
59
|
*/
|
|
60
|
-
var N;S.finalized=!0,S.elementProperties=new Map,S.elementStyles=[],S.shadowRootOptions={mode:"open"},null==x||x({ReactiveElement:S}),(null!==(v=globalThis.reactiveElementVersions)&&void 0!==v?v:globalThis.reactiveElementVersions=[]).push("1.3.
|
|
60
|
+
var N;S.finalized=!0,S.elementProperties=new Map,S.elementStyles=[],S.shadowRootOptions={mode:"open"},null==x||x({ReactiveElement:S}),(null!==(v=globalThis.reactiveElementVersions)&&void 0!==v?v:globalThis.reactiveElementVersions=[]).push("1.3.4");const C=globalThis.trustedTypes,R=C?C.createPolicy("lit-html",{createHTML:t=>t}):void 0,E=`lit$${(Math.random()+"").slice(9)}$`,M="?"+E,k=`<${M}>`,U=document,F=(t="")=>U.createComment(t),L=t=>null===t||"object"!=typeof t&&"function"!=typeof t,A=Array.isArray,P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,T=/-->/g,z=/>/g,j=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),B=/'/g,_=/"/g,W=/^(?:script|style|textarea|title)$/i,D=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),H=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),I=new WeakMap,Z=U.createTreeWalker(U,129,null,!1),V=(t,i)=>{const e=t.length-1,o=[];let n,s=2===i?"<svg>":"",r=P;for(let i=0;i<e;i++){const e=t[i];let a,l,h=-1,c=0;for(;c<e.length&&(r.lastIndex=c,l=r.exec(e),null!==l);)c=r.lastIndex,r===P?"!--"===l[1]?r=T:void 0!==l[1]?r=z:void 0!==l[2]?(W.test(l[2])&&(n=RegExp("</"+l[2],"g")),r=j):void 0!==l[3]&&(r=j):r===j?">"===l[0]?(r=null!=n?n:P,h=-1):void 0===l[1]?h=-2:(h=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?j:'"'===l[3]?_:B):r===_||r===B?r=j:r===T||r===z?r=P:(r=j,n=void 0);const p=r===j&&t[i+1].startsWith("/>")?" ":"";s+=r===P?e+k:h>=0?(o.push(a),e.slice(0,h)+"$lit$"+e.slice(h)+E+p):e+E+(-2===h?(o.push(void 0),i):p)}const a=s+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==R?R.createHTML(a):a,o]};class J{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,s=0;const r=t.length-1,a=this.parts,[l,h]=V(t,i);if(this.el=J.createElement(l,e),Z.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=Z.nextNode())&&a.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(E)){const e=h[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(E),i=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?Y:"?"===i[1]?it:"@"===i[1]?et:Q})}else a.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(W.test(o.tagName)){const t=o.textContent.split(E),i=t.length-1;if(i>0){o.textContent=C?C.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],F()),Z.nextNode(),a.push({type:2,index:++n});o.append(t[i],F())}}}else if(8===o.nodeType)if(o.data===M)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(E,t+1));)a.push({type:7,index:n}),t+=E.length-1}n++}}static createElement(t,i){const e=U.createElement("template");return e.innerHTML=t,e}}function q(t,i,e=t,o){var n,s,r,a;if(i===H)return i;let l=void 0!==o?null===(n=e._$Cl)||void 0===n?void 0:n[o]:e._$Cu;const h=L(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,e,o)),void 0!==o?(null!==(r=(a=e)._$Cl)&&void 0!==r?r:a._$Cl=[])[o]=l:e._$Cu=l),void 0!==l&&(i=q(t,l._$AS(t,i.values),l,o)),i}class X{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:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:U).importNode(e,!0);Z.currentNode=n;let s=Z.nextNode(),r=0,a=0,l=o[0];for(;void 0!==l;){if(r===l.index){let i;2===l.type?i=new G(s,s.nextSibling,this,t):1===l.type?i=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(i=new ot(s,this,t)),this.v.push(i),l=o[++a]}r!==(null==l?void 0:l.index)&&(s=Z.nextNode(),r++)}return n}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class G{constructor(t,i,e,o){var n;this.type=2,this._$AH=K,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$C_=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._$C_}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=q(this,t,i),L(t)?t===K||null==t||""===t?(this._$AH!==K&&this._$AR(),this._$AH=K):t!==this._$AH&&t!==H&&this.T(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.k(t):(t=>A(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.S(t):this.T(t)}j(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.j(t))}T(t){this._$AH!==K&&L(this._$AH)?this._$AA.nextSibling.data=t:this.k(U.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=J.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.m(e);else{const t=new X(n,this),i=t.p(this.options);t.m(e),this.k(i),this._$AH=t}}_$AC(t){let i=I.get(t.strings);return void 0===i&&I.set(t.strings,i=new J(t)),i}S(t){A(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 G(this.j(F()),this.j(F()),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._$C_=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class Q{constructor(t,i,e,o,n){this.type=1,this._$AH=K,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=K}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let s=!1;if(void 0===n)t=q(this,t,i,0),s=!L(t)||t!==this._$AH&&t!==H,s&&(this._$AH=t);else{const o=t;let r,a;for(t=n[0],r=0;r<n.length-1;r++)a=q(this,o[e+r],i,r),a===H&&(a=this._$AH[r]),s||(s=!L(a)||a!==this._$AH[r]),a===K?t=K:t!==K&&(t+=(null!=a?a:"")+n[r+1]),this._$AH[r]=a}s&&!o&&this.P(t)}P(t){t===K?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Y extends Q{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===K?void 0:t}}const tt=C?C.emptyScript:"";class it extends Q{constructor(){super(...arguments),this.type=4}P(t){t&&t!==K?this.element.setAttribute(this.name,tt):this.element.removeAttribute(this.name)}}class et extends Q{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=q(this,t,i,0))&&void 0!==e?e:K)===H)return;const o=this._$AH,n=t===K&&o!==K||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==K&&(o===K||n);n&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class ot{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){q(this,t)}}const nt=window.litHtmlPolyfillSupport;
|
|
61
61
|
/**
|
|
62
62
|
* @license
|
|
63
63
|
* Copyright 2017 Google LLC
|
|
64
64
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
65
65
|
*/
|
|
66
|
-
var st,rt;null==nt||nt(J,G),(null!==(N=globalThis.litHtmlVersions)&&void 0!==N?N:globalThis.litHtmlVersions=[]).push("2.2.
|
|
66
|
+
var st,rt;null==nt||nt(J,G),(null!==(N=globalThis.litHtmlVersions)&&void 0!==N?N:globalThis.litHtmlVersions=[]).push("2.2.7");class at extends S{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,i;const e=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=e.firstChild),e}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,i,e)=>{var o,n;const s=null!==(o=null==e?void 0:e.renderBefore)&&void 0!==o?o:i;let r=s._$litPart$;if(void 0===r){const t=null!==(n=null==e?void 0:e.renderBefore)&&void 0!==n?n:null;s._$litPart$=r=new G(i.insertBefore(F(),t),t,void 0,null!=e?e:{})}return r._$AI(t),r})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return H}}at.finalized=!0,at._$litElement$=!0,null===(st=globalThis.litElementHydrateSupport)||void 0===st||st.call(globalThis,{LitElement:at});const lt=globalThis.litElementPolyfillSupport;null==lt||lt({LitElement:at}),(null!==(rt=globalThis.litElementVersions)&&void 0!==rt?rt:globalThis.litElementVersions=[]).push("3.2.2");class ht{static create(t,i,e){let o=t=>u(null!=t?t:e),n=d`var(${u(t)}, ${o(e)})`;return n.name=t,n.category=i,n.defaultValue=e,n.defaultCssValue=o,n.get=i=>d`var(${u(t)}, ${o(i)})`,n.breadcrumb=()=>[],n.lastResortDefaultValue=()=>e,n}static extend(t,i,e){let o=t=>i.get(null!=t?t:e),n=d`var(${u(t)}, ${o(e)})`;return n.name=t,n.category=i.category,n.fallbackVariable=i,n.defaultValue=e,n.defaultCssValue=o,n.get=i=>d`var(${u(t)}, ${o(i)})`,n.breadcrumb=()=>[i.name,...i.breadcrumb()],n.lastResortDefaultValue=()=>e,n}static external(t,i){let e=i=>t.fallbackVariable?t.fallbackVariable.get(null!=i?i:t.defaultValue):u(null!=i?i:t.defaultValue),o=d`var(${u(t.name)}, ${e(t.defaultValue)})`;return o.name=t.name,o.category=t.category,o.fallbackVariable=t.fallbackVariable,o.defaultValue=t.defaultValue,o.context=i,o.defaultCssValue=e,o.get=i=>d`var(${u(t.name)}, ${e(i)})`,o.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],o.lastResortDefaultValue=()=>{var i,e;return null!==(i=t.defaultValue)&&void 0!==i?i:null===(e=t.fallbackVariable)||void 0===e?void 0:e.lastResortDefaultValue()},o}}const ct={colorPrimary:ht.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:ht.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:ht.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:ht.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:ht.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:ht.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:ht.create("--ft-color-error","COLOR","#B00020"),colorOutline:ht.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:ht.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:ht.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:ht.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:ht.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:ht.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:ht.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:ht.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:ht.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:ht.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:ht.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:ht.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:ht.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:ht.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:ht.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:ht.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:ht.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:ht.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:ht.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:ht.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:ht.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:ht.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:ht.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:ht.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:ht.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:ht.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:ht.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:ht.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:ht.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:ht.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:ht.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:ht.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:ht.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:ht.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:ht.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:ht.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:ht.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:ht.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:ht.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:ht.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:ht.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:ht.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:ht.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:ht.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:ht.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:ht.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:ht.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:ht.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:ht.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:ht.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:ht.create("--ft-border-radius-XL","SIZE","16px"),titleFont:ht.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:ht.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:ht.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:ht.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
67
67
|
/**
|
|
68
68
|
* @license
|
|
69
69
|
* Copyright 2021 Google LLC
|
|
70
70
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
71
|
-
*/var pt,ut
|
|
72
|
-
${t.map((t=>
|
|
71
|
+
*/var pt,ft,ut=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class dt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:i,elementDefinitions:e,shadowRootOptions:o}=t;e&&!i&&(t.registry=new CustomElementRegistry,Object.entries(e).forEach((([i,e])=>t.registry.define(i,e))));const n=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return y(n,this.constructor.elementStyles),n}}}(at)){getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),D`
|
|
72
|
+
${t.map((t=>D`
|
|
73
73
|
<style>${t}</style>
|
|
74
74
|
`))}
|
|
75
75
|
${this.getTemplate()}
|
|
76
|
-
`}updated(t){super.updated(t),setTimeout((()=>{var i;this.contentAvailableCallback(t),(null===(i=this.exportpartsPrefix)||void 0===i?void 0:i.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}),0)}setExportpartsAttribute(t){var i,e,o,n,s,r;const a=t=>null!=t&&t.trim().length>0,l=t.filter(a).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(e=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelectorAll("[part],[exportparts]"))&&void 0!==e?e:[]){const i=null!==(n=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==n?n:[],e=null!==(r=null===(s=t.getAttribute("exportparts"))||void 0===s?void 0:s.split(",").map((t=>t.split(":")[1])))&&void 0!==r?r:[];new Array(...i,...e).filter(a).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const c=[...h.values()].flatMap((t=>l.map((i=>`${t}:${i}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}contentAvailableCallback(t){}}
|
|
76
|
+
`}updated(t){super.updated(t),setTimeout((()=>{var i;this.contentAvailableCallback(t),(null===(i=this.exportpartsPrefix)||void 0===i?void 0:i.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}),0)}setExportpartsAttribute(t){var i,e,o,n,s,r;const a=t=>null!=t&&t.trim().length>0,l=t.filter(a).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(e=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelectorAll("[part],[exportparts]"))&&void 0!==e?e:[]){const i=null!==(n=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==n?n:[],e=null!==(r=null===(s=t.getAttribute("exportparts"))||void 0===s?void 0:s.split(",").map((t=>t.split(":")[1])))&&void 0!==r?r:[];new Array(...i,...e).filter(a).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const c=[...h.values()].flatMap((t=>l.map((i=>`${t}:${i}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}contentAvailableCallback(t){}}ut([o()],dt.prototype,"exportpartsPrefix",void 0),ut([function(t,i){const e=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return e();try{return JSON.parse(t)}catch{return e()}},toAttribute:t=>JSON.stringify(t)},...null!=i?i:{}})}([])],dt.prototype,"exportpartsPrefixes",void 0),d`
|
|
77
77
|
.ft-no-text-select {
|
|
78
78
|
-webkit-touch-callout: none;
|
|
79
79
|
-webkit-user-select: none;
|
|
@@ -82,50 +82,50 @@ var st,rt;null==nt||nt(J,G),(null!==(N=globalThis.litHtmlVersions)&&void 0!==N?N
|
|
|
82
82
|
-ms-user-select: none;
|
|
83
83
|
user-select: none;
|
|
84
84
|
}
|
|
85
|
-
`,navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(
|
|
85
|
+
`,navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(ft=null===(pt=window.safari)||void 0===pt?void 0:pt.pushNotification)||void 0===ft||ft.toString());
|
|
86
86
|
/**
|
|
87
87
|
* @license
|
|
88
88
|
* Copyright 2020 Google LLC
|
|
89
89
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
90
90
|
*/
|
|
91
|
-
const yt=Symbol.for(""),gt=t=>{
|
|
91
|
+
const yt=Symbol.for(""),gt=t=>{if((null==t?void 0:t.r)===yt)return null==t?void 0:t._$litStatic$},vt=t=>({_$litStatic$:t,r:yt}),bt=new Map,mt=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],a=[];let l,h=0,c=!1;for(;h<o;){for(l=i[h];h<o&&void 0!==(s=e[h],n=gt(s));)l+=n+i[++h],c=!0;a.push(s),r.push(l),h++}if(h===o&&r.push(i[o]),c){const t=r.join("$$lit$$");void 0===(i=bt.get(t))&&(r.raw=r,bt.set(t,i=r)),e=a}return t(i,...e)})(D);var xt,wt=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};!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"}(xt||(xt={}));const $t=ht.extend("--ft-typography-font-family",ct.titleFont),Ot=ht.extend("--ft-typography-font-family",ct.contentFont),St={fontFamily:Ot,fontSize:ht.create("--ft-typography-font-size","SIZE","16px"),fontWeight:ht.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:ht.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:ht.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:ht.create("--ft-typography-text-transform","UNKNOWN","inherit")},Nt=ht.extend("--ft-typography-title-font-family",$t),Ct=ht.extend("--ft-typography-title-font-size",St.fontSize,"20px"),Rt=ht.extend("--ft-typography-title-font-weight",St.fontWeight,"normal"),Et=ht.extend("--ft-typography-title-letter-spacing",St.letterSpacing,"0.15px"),Mt=ht.extend("--ft-typography-title-line-height",St.lineHeight,"1.2"),kt=ht.extend("--ft-typography-title-text-transform",St.textTransform,"inherit"),Ut=ht.extend("--ft-typography-title-dense-font-family",$t),Ft=ht.extend("--ft-typography-title-dense-font-size",St.fontSize,"14px"),Lt=ht.extend("--ft-typography-title-dense-font-weight",St.fontWeight,"normal"),At=ht.extend("--ft-typography-title-dense-letter-spacing",St.letterSpacing,"0.105px"),Pt=ht.extend("--ft-typography-title-dense-line-height",St.lineHeight,"1.7"),Tt=ht.extend("--ft-typography-title-dense-text-transform",St.textTransform,"inherit"),zt=ht.extend("--ft-typography-subtitle1-font-family",Ot),jt=ht.extend("--ft-typography-subtitle1-font-size",St.fontSize,"16px"),Bt=ht.extend("--ft-typography-subtitle1-font-weight",St.fontWeight,"600"),_t=ht.extend("--ft-typography-subtitle1-letter-spacing",St.letterSpacing,"0.144px"),Wt=ht.extend("--ft-typography-subtitle1-line-height",St.lineHeight,"1.5"),Dt=ht.extend("--ft-typography-subtitle1-text-transform",St.textTransform,"inherit"),Ht=ht.extend("--ft-typography-subtitle2-font-family",Ot),Kt=ht.extend("--ft-typography-subtitle2-font-size",St.fontSize,"14px"),It=ht.extend("--ft-typography-subtitle2-font-weight",St.fontWeight,"normal"),Zt=ht.extend("--ft-typography-subtitle2-letter-spacing",St.letterSpacing,"0.098px"),Vt=ht.extend("--ft-typography-subtitle2-line-height",St.lineHeight,"1.7"),Jt=ht.extend("--ft-typography-subtitle2-text-transform",St.textTransform,"inherit"),qt=ht.extend("--ft-typography-body1-font-family",Ot),Xt=ht.extend("--ft-typography-body1-font-size",St.fontSize,"16px"),Gt=ht.extend("--ft-typography-body1-font-weight",St.fontWeight,"normal"),Qt=ht.extend("--ft-typography-body1-letter-spacing",St.letterSpacing,"0.496px"),Yt=ht.extend("--ft-typography-body1-line-height",St.lineHeight,"1.5"),ti=ht.extend("--ft-typography-body1-text-transform",St.textTransform,"inherit"),ii=ht.extend("--ft-typography-body2-font-family",Ot),ei=ht.extend("--ft-typography-body2-font-size",St.fontSize,"14px"),oi=ht.extend("--ft-typography-body2-font-weight",St.fontWeight,"normal"),ni=ht.extend("--ft-typography-body2-letter-spacing",St.letterSpacing,"0.252px"),si=ht.extend("--ft-typography-body2-line-height",St.lineHeight,"1.4"),ri=ht.extend("--ft-typography-body2-text-transform",St.textTransform,"inherit"),ai=ht.extend("--ft-typography-caption-font-family",Ot),li=ht.extend("--ft-typography-caption-font-size",St.fontSize,"12px"),hi=ht.extend("--ft-typography-caption-font-weight",St.fontWeight,"normal"),ci=ht.extend("--ft-typography-caption-letter-spacing",St.letterSpacing,"0.396px"),pi=ht.extend("--ft-typography-caption-line-height",St.lineHeight,"1.33"),fi=ht.extend("--ft-typography-caption-text-transform",St.textTransform,"inherit"),ui=ht.extend("--ft-typography-breadcrumb-font-family",Ot),di=ht.extend("--ft-typography-breadcrumb-font-size",St.fontSize,"10px"),yi=ht.extend("--ft-typography-breadcrumb-font-weight",St.fontWeight,"normal"),gi=ht.extend("--ft-typography-breadcrumb-letter-spacing",St.letterSpacing,"0.33px"),vi=ht.extend("--ft-typography-breadcrumb-line-height",St.lineHeight,"1.6"),bi=ht.extend("--ft-typography-breadcrumb-text-transform",St.textTransform,"inherit"),mi=ht.extend("--ft-typography-overline-font-family",Ot),xi=ht.extend("--ft-typography-overline-font-size",St.fontSize,"10px"),wi=ht.extend("--ft-typography-overline-font-weight",St.fontWeight,"normal"),$i=ht.extend("--ft-typography-overline-letter-spacing",St.letterSpacing,"1.5px"),Oi=ht.extend("--ft-typography-overline-line-height",St.lineHeight,"1.6"),Si=ht.extend("--ft-typography-overline-text-transform",St.textTransform,"uppercase"),Ni=ht.extend("--ft-typography-button-font-family",Ot),Ci=ht.extend("--ft-typography-button-font-size",St.fontSize,"14px"),Ri=ht.extend("--ft-typography-button-font-weight",St.fontWeight,"600"),Ei=ht.extend("--ft-typography-button-letter-spacing",St.letterSpacing,"1.246px"),Mi=ht.extend("--ft-typography-button-line-height",St.lineHeight,"1.15"),ki=ht.extend("--ft-typography-button-text-transform",St.textTransform,"uppercase"),Ui=d`
|
|
92
92
|
.ft-typography--title {
|
|
93
93
|
font-family: ${Nt};
|
|
94
94
|
font-size: ${Ct};
|
|
95
95
|
font-weight: ${Rt};
|
|
96
96
|
letter-spacing: ${Et};
|
|
97
97
|
line-height: ${Mt};
|
|
98
|
-
text-transform: ${
|
|
98
|
+
text-transform: ${kt};
|
|
99
99
|
}
|
|
100
100
|
`,Fi=d`
|
|
101
101
|
.ft-typography--title-dense {
|
|
102
|
-
font-family: ${
|
|
102
|
+
font-family: ${Ut};
|
|
103
103
|
font-size: ${Ft};
|
|
104
104
|
font-weight: ${Lt};
|
|
105
105
|
letter-spacing: ${At};
|
|
106
|
-
line-height: ${
|
|
107
|
-
text-transform: ${
|
|
106
|
+
line-height: ${Pt};
|
|
107
|
+
text-transform: ${Tt};
|
|
108
108
|
}
|
|
109
109
|
`,Li=d`
|
|
110
110
|
.ft-typography--subtitle1 {
|
|
111
|
-
font-family: ${
|
|
112
|
-
font-size: ${
|
|
113
|
-
font-weight: ${
|
|
111
|
+
font-family: ${zt};
|
|
112
|
+
font-size: ${jt};
|
|
113
|
+
font-weight: ${Bt};
|
|
114
114
|
letter-spacing: ${_t};
|
|
115
|
-
line-height: ${
|
|
116
|
-
text-transform: ${
|
|
115
|
+
line-height: ${Wt};
|
|
116
|
+
text-transform: ${Dt};
|
|
117
117
|
}
|
|
118
118
|
`,Ai=d`
|
|
119
119
|
.ft-typography--subtitle2 {
|
|
120
120
|
font-family: ${Ht};
|
|
121
121
|
font-size: ${Kt};
|
|
122
122
|
font-weight: ${It};
|
|
123
|
-
letter-spacing: ${
|
|
124
|
-
line-height: ${
|
|
123
|
+
letter-spacing: ${Zt};
|
|
124
|
+
line-height: ${Vt};
|
|
125
125
|
text-transform: ${Jt};
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
`,
|
|
128
|
+
`,Pi=d`
|
|
129
129
|
.ft-typography--body1 {
|
|
130
130
|
font-family: ${qt};
|
|
131
131
|
font-size: ${Xt};
|
|
@@ -134,7 +134,7 @@ const yt=Symbol.for(""),gt=t=>{var i,e;if((null===(i=t)||void 0===i?void 0:i.r)=
|
|
|
134
134
|
line-height: ${Yt};
|
|
135
135
|
text-transform: ${ti};
|
|
136
136
|
}
|
|
137
|
-
`,
|
|
137
|
+
`,Ti=d`
|
|
138
138
|
.ft-typography--body2 {
|
|
139
139
|
font-family: ${ii};
|
|
140
140
|
font-size: ${ei};
|
|
@@ -143,31 +143,31 @@ const yt=Symbol.for(""),gt=t=>{var i,e;if((null===(i=t)||void 0===i?void 0:i.r)=
|
|
|
143
143
|
line-height: ${si};
|
|
144
144
|
text-transform: ${ri};
|
|
145
145
|
}
|
|
146
|
-
`,
|
|
146
|
+
`,zi=d`
|
|
147
147
|
.ft-typography--caption {
|
|
148
148
|
font-family: ${ai};
|
|
149
149
|
font-size: ${li};
|
|
150
150
|
font-weight: ${hi};
|
|
151
151
|
letter-spacing: ${ci};
|
|
152
152
|
line-height: ${pi};
|
|
153
|
-
text-transform: ${
|
|
153
|
+
text-transform: ${fi};
|
|
154
154
|
}
|
|
155
|
-
`,
|
|
155
|
+
`,ji=d`
|
|
156
156
|
.ft-typography--breadcrumb {
|
|
157
|
-
font-family: ${
|
|
157
|
+
font-family: ${ui};
|
|
158
158
|
font-size: ${di};
|
|
159
159
|
font-weight: ${yi};
|
|
160
160
|
letter-spacing: ${gi};
|
|
161
161
|
line-height: ${vi};
|
|
162
162
|
text-transform: ${bi};
|
|
163
163
|
}
|
|
164
|
-
`,
|
|
164
|
+
`,Bi=d`
|
|
165
165
|
.ft-typography--overline {
|
|
166
166
|
font-family: ${mi};
|
|
167
167
|
font-size: ${xi};
|
|
168
168
|
font-weight: ${wi};
|
|
169
|
-
letter-spacing: ${
|
|
170
|
-
line-height: ${
|
|
169
|
+
letter-spacing: ${$i};
|
|
170
|
+
line-height: ${Oi};
|
|
171
171
|
text-transform: ${Si};
|
|
172
172
|
}
|
|
173
173
|
`,_i=d`
|
|
@@ -177,20 +177,20 @@ const yt=Symbol.for(""),gt=t=>{var i,e;if((null===(i=t)||void 0===i?void 0:i.r)=
|
|
|
177
177
|
font-weight: ${Ri};
|
|
178
178
|
letter-spacing: ${Ei};
|
|
179
179
|
line-height: ${Mi};
|
|
180
|
-
text-transform: ${
|
|
180
|
+
text-transform: ${ki};
|
|
181
181
|
}
|
|
182
|
-
`;class
|
|
182
|
+
`;class Wi extends dt{constructor(){super(...arguments),this.variant=xt.body1}render(){return this.element?mt`
|
|
183
183
|
<${vt(this.element)}
|
|
184
184
|
class="ft-typography ft-typography--${this.variant}">
|
|
185
185
|
<slot></slot>
|
|
186
186
|
</${vt(this.element)}>
|
|
187
187
|
`:mt`
|
|
188
188
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
189
|
-
`}}
|
|
189
|
+
`}}Wi.styles=[Ui,Fi,Li,Ai,Pi,Ti,zi,ji,Bi,_i,d`
|
|
190
190
|
.ft-typography {
|
|
191
191
|
vertical-align: inherit;
|
|
192
192
|
}
|
|
193
|
-
`],wt([o()],
|
|
193
|
+
`],wt([o()],Wi.prototype,"element",void 0),wt([o()],Wi.prototype,"variant",void 0),l("ft-typography")(Wi);var Di=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};const Hi={distance:ht.create("--ft-tooltip-distance","SIZE","4px"),color:ht.create("--ft-tooltip-color","COLOR","#FFFFFF"),backgroundColor:ht.create("--ft-tooltip-background-color","COLOR","#666666"),zIndex:ht.create("--ft-tooltip-z-index","NUMBER","1"),borderRadiusS:ht.external(ct.borderRadiusS,"Design system")};class Ki extends dt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new i,this.revealDebouncer=new i}render(){return D`
|
|
194
194
|
<div part="container"
|
|
195
195
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
196
196
|
@mouseenter=${this.onHover}
|
|
@@ -205,7 +205,7 @@ const yt=Symbol.for(""),gt=t=>{var i,e;if((null===(i=t)||void 0===i?void 0:i.r)=
|
|
|
205
205
|
</div>
|
|
206
206
|
<slot></slot>
|
|
207
207
|
</div>
|
|
208
|
-
`}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(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2,n=this.tooltip.style;switch(this.position){case"top":n.top=-this.tooltip.clientHeight+"px",n.left=o+"px";break;case"bottom":n.top=i.height+"px",n.left=o+"px";break;case"left":n.top=e+"px",n.left=-this.tooltip.clientWidth+"px";break;case"right":n.top=e+"px",n.left=i.width+"px"}n.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())}}Ki.elementDefinitions={"ft-typography":
|
|
208
|
+
`}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(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2,n=this.tooltip.style;switch(this.position){case"top":n.top=-this.tooltip.clientHeight+"px",n.left=o+"px";break;case"bottom":n.top=i.height+"px",n.left=o+"px";break;case"left":n.top=e+"px",n.left=-this.tooltip.clientWidth+"px";break;case"right":n.top=e+"px",n.left=i.width+"px"}n.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())}}Ki.elementDefinitions={"ft-typography":Wi},Ki.styles=d`
|
|
209
209
|
.ft-tooltip--container {
|
|
210
210
|
display: block;
|
|
211
211
|
position: relative;
|
|
@@ -237,10 +237,10 @@ const yt=Symbol.for(""),gt=t=>{var i,e;if((null===(i=t)||void 0===i?void 0:i.r)=
|
|
|
237
237
|
position: relative;
|
|
238
238
|
word-break: break-word;
|
|
239
239
|
}
|
|
240
|
-
`,
|
|
240
|
+
`,Di([o()],Ki.prototype,"text",void 0),Di([o({type:Boolean})],Ki.prototype,"manual",void 0),Di([o({type:Boolean})],Ki.prototype,"inline",void 0),Di([o({type:Number})],Ki.prototype,"delay",void 0),Di([o()],Ki.prototype,"position",void 0),Di([
|
|
241
241
|
/**
|
|
242
242
|
* @license
|
|
243
243
|
* Copyright 2017 Google LLC
|
|
244
244
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
245
245
|
*/
|
|
246
|
-
function(t,i,e){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:i},e?function(t){const{slot:i,selector:e}=null!=t?t:{};return n({descriptor:o=>({get(){var o;const n="slot"+(i?`[name=${i}]`:":not([name])"),s=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),r=null!=s?a(s,t):[];return e?r.filter((t=>t.matches(e))):r},enumerable:!0,configurable:!0})})}({slot:s,flatten:i,selector:e}):n({descriptor:t=>({get(){var t,i;const e="slot"+(s?`[name=${s}]`:":not([name])"),n=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e);return null!==(i=null==n?void 0:n.assignedNodes(o))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}("",!0)],Ki.prototype,"slotNodes",void 0),
|
|
246
|
+
function(t,i,e){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:i},e?function(t){const{slot:i,selector:e}=null!=t?t:{};return n({descriptor:o=>({get(){var o;const n="slot"+(i?`[name=${i}]`:":not([name])"),s=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),r=null!=s?a(s,t):[];return e?r.filter((t=>t.matches(e))):r},enumerable:!0,configurable:!0})})}({slot:s,flatten:i,selector:e}):n({descriptor:t=>({get(){var t,i;const e="slot"+(s?`[name=${s}]`:":not([name])"),n=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e);return null!==(i=null==n?void 0:n.assignedNodes(o))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}("",!0)],Ki.prototype,"slotNodes",void 0),Di([s(".ft-tooltip--container")],Ki.prototype,"container",void 0),Di([s("slot")],Ki.prototype,"target",void 0),Di([s(".ft-tooltip")],Ki.prototype,"tooltip",void 0),Di([s(".ft-tooltip--content")],Ki.prototype,"tooltipContent",void 0),Di([function(t){return o({...t,state:!0})}()],Ki.prototype,"visible",void 0),l("ft-tooltip")(Ki),t.FtTooltip=Ki,t.FtTooltipCssVariables=Hi,Object.defineProperty(t,"i",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-tooltip",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "A simple tooltip component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-typography": "^0.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "^0.
|
|
24
|
-
"lit": "2.
|
|
22
|
+
"@fluid-topics/ft-typography": "^0.3.0",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "^0.3.0",
|
|
24
|
+
"lit": "2.2.8"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "2019aceb4a578402211f951ec3d68dbc0acf25c7"
|
|
27
27
|
}
|