@fluid-topics/ft-trend 0.3.12 → 0.3.14
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-trend.css.d.ts +6 -0
- package/build/ft-trend.css.js +18 -0
- package/build/ft-trend.d.ts +1 -9
- package/build/ft-trend.js +4 -17
- package/build/ft-trend.light.js +86 -86
- package/build/ft-trend.min.js +86 -86
- package/build/ft-trend.properties.d.ts +6 -0
- package/build/ft-trend.properties.js +2 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/package.json +4 -4
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const FtTrendCssVariables: {
|
|
2
|
+
textColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
3
|
+
titleColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
4
|
+
};
|
|
5
|
+
export declare const styles: import("lit").CSSResult;
|
|
6
|
+
//# sourceMappingURL=ft-trend.css.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
import { designSystemVariables, FtCssVariableFactory } from "@fluid-topics/ft-wc-utils";
|
|
3
|
+
export const FtTrendCssVariables = {
|
|
4
|
+
textColor: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceHigh, "Design system"),
|
|
5
|
+
titleColor: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceMedium, "Design system")
|
|
6
|
+
};
|
|
7
|
+
// language=CSS
|
|
8
|
+
export const styles = css `
|
|
9
|
+
.ft-trend {
|
|
10
|
+
text-align: center;
|
|
11
|
+
color: ${FtTrendCssVariables.textColor};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ft-trend > div {
|
|
15
|
+
padding-top: 5px;
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
//# sourceMappingURL=ft-trend.css.js.map
|
package/build/ft-trend.d.ts
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
2
|
-
|
|
3
|
-
label: string;
|
|
4
|
-
currentValue: number;
|
|
5
|
-
previousValue: number;
|
|
6
|
-
}
|
|
7
|
-
export declare const FtTrendCssVariables: {
|
|
8
|
-
textColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
9
|
-
titleColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
10
|
-
};
|
|
2
|
+
import { FtTrendProperties } from "./ft-trend.properties";
|
|
11
3
|
export declare class FtTrend extends FtLitElement implements FtTrendProperties {
|
|
12
4
|
static elementDefinitions: ElementDefinitionsMap;
|
|
13
5
|
static styles: import("lit").CSSResult;
|
package/build/ft-trend.js
CHANGED
|
@@ -4,14 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import {
|
|
7
|
+
import { html } from "lit";
|
|
8
8
|
import { property } from "lit/decorators.js";
|
|
9
|
-
import {
|
|
9
|
+
import { FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
10
10
|
import { FtTypography } from "@fluid-topics/ft-typography";
|
|
11
|
-
|
|
12
|
-
textColor: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceHigh, "Design system"),
|
|
13
|
-
titleColor: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceMedium, "Design system")
|
|
14
|
-
};
|
|
11
|
+
import { styles } from "./ft-trend.css";
|
|
15
12
|
export class FtTrend extends FtLitElement {
|
|
16
13
|
constructor() {
|
|
17
14
|
super(...arguments);
|
|
@@ -72,17 +69,7 @@ export class FtTrend extends FtLitElement {
|
|
|
72
69
|
}
|
|
73
70
|
}
|
|
74
71
|
FtTrend.elementDefinitions = { "ft-typography": FtTypography };
|
|
75
|
-
|
|
76
|
-
FtTrend.styles = css `
|
|
77
|
-
.ft-trend {
|
|
78
|
-
text-align: center;
|
|
79
|
-
color: ${FtTrendCssVariables.textColor};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.ft-trend > div {
|
|
83
|
-
padding-top: 5px;
|
|
84
|
-
}
|
|
85
|
-
`;
|
|
72
|
+
FtTrend.styles = styles;
|
|
86
73
|
__decorate([
|
|
87
74
|
property({ type: String })
|
|
88
75
|
], FtTrend.prototype, "label", void 0);
|
package/build/ft-trend.light.js
CHANGED
|
@@ -4,115 +4,124 @@
|
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var n;const s=globalThis.trustedTypes,r=s?s.createPolicy("lit-html",{createHTML:t=>t}):void 0,h=`lit$${(Math.random()+"").slice(9)}$`,p="?"+h,
|
|
7
|
+
var n;const s=globalThis.trustedTypes,r=s?s.createPolicy("lit-html",{createHTML:t=>t}):void 0,h=`lit$${(Math.random()+"").slice(9)}$`,p="?"+h,a=`<${p}>`,l=document,f=(t="")=>l.createComment(t),y=t=>null===t||"object"!=typeof t&&"function"!=typeof t,g=Array.isArray,d=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,c=/-->/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,...e)=>({_$litType$:t,strings:i,values:e}))(1),w=Symbol.for("lit-noChange"),z=Symbol.for("lit-nothing"),_=new WeakMap,A=l.createTreeWalker(l,129,null,!1),N=(t,i)=>{const e=t.length-1,o=[];let n,s=2===i?"<svg>":"",p=d;for(let i=0;i<e;i++){const e=t[i];let r,l,f=-1,y=0;for(;y<e.length&&(p.lastIndex=y,l=p.exec(e),null!==l);)y=p.lastIndex,p===d?"!--"===l[1]?p=c:void 0!==l[1]?p=u:void 0!==l[2]?(m.test(l[2])&&(n=RegExp("</"+l[2],"g")),p=v):void 0!==l[3]&&(p=v):p===v?">"===l[0]?(p=null!=n?n:d,f=-1):void 0===l[1]?f=-2:(f=p.lastIndex-l[2].length,r=l[1],p=void 0===l[3]?v:'"'===l[3]?b:$):p===b||p===$?p=v:p===c||p===u?p=d:(p=v,n=void 0);const g=p===v&&t[i+1].startsWith("/>")?" ":"";s+=p===d?e+a:f>=0?(o.push(r),e.slice(0,f)+"$lit$"+e.slice(f)+h+g):e+h+(-2===f?(o.push(void 0),i):g)}const l=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(l):l,o]};class S{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,r=0;const a=t.length-1,l=this.parts,[y,g]=N(t,i);if(this.el=S.createElement(y,e),A.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=A.nextNode())&&l.length<a;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(h)){const e=g[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(h),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?I:"?"===i[1]?U:"@"===i[1]?C:j})}else l.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(m.test(o.tagName)){const t=o.textContent.split(h),i=t.length-1;if(i>0){o.textContent=s?s.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],f()),A.nextNode(),l.push({type:2,index:++n});o.append(t[i],f())}}}else if(8===o.nodeType)if(o.data===p)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(h,t+1));)l.push({type:7,index:n}),t+=h.length-1}n++}}static createElement(t,i){const e=l.createElement("template");return e.innerHTML=t,e}}function T(t,i,e=t,o){var n,s,r,h;if(i===w)return i;let p=void 0!==o?null===(n=e._$Cl)||void 0===n?void 0:n[o]:e._$Cu;const a=y(i)?void 0:i._$litDirective$;return(null==p?void 0:p.constructor)!==a&&(null===(s=null==p?void 0:p._$AO)||void 0===s||s.call(p,!1),void 0===a?p=void 0:(p=new a(t),p._$AT(t,e,o)),void 0!==o?(null!==(r=(h=e)._$Cl)&&void 0!==r?r:h._$Cl=[])[o]=p:e._$Cu=p),void 0!==p&&(i=T(t,p._$AS(t,i.values),p,o)),i}class E{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:l).importNode(e,!0);A.currentNode=n;let s=A.nextNode(),r=0,h=0,p=o[0];for(;void 0!==p;){if(r===p.index){let i;2===p.type?i=new M(s,s.nextSibling,this,t):1===p.type?i=new p.ctor(s,p.name,p.strings,this,t):6===p.type&&(i=new P(s,this,t)),this.v.push(i),p=o[++h]}r!==(null==p?void 0:p.index)&&(s=A.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 M{constructor(t,i,e,o){var n;this.type=2,this._$AH=z,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=T(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(l.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=S.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 E(n,this),i=t.p(this.options);t.m(e),this.k(i),this._$AH=t}}_$AC(t){let i=_.get(t.strings);return void 0===i&&_.set(t.strings,i=new S(t)),i}S(t){g(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 M(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 j{constructor(t,i,e,o,n){this.type=1,this._$AH=z,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=z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let s=!1;if(void 0===n)t=T(this,t,i,0),s=!y(t)||t!==this._$AH&&t!==w,s&&(this._$AH=t);else{const o=t;let r,h;for(t=n[0],r=0;r<n.length-1;r++)h=T(this,o[e+r],i,r),h===w&&(h=this._$AH[r]),s||(s=!y(h)||h!==this._$AH[r]),h===z?t=z:t!==z&&(t+=(null!=h?h:"")+n[r+1]),this._$AH[r]=h}s&&!o&&this.P(t)}P(t){t===z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class I extends j{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===z?void 0:t}}const O=s?s.emptyScript:"";class U extends j{constructor(){super(...arguments),this.type=4}P(t){t&&t!==z?this.element.setAttribute(this.name,O):this.element.removeAttribute(this.name)}}class C extends j{constructor(t,i,e,o,n){super(t,i,e,o,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=T(this,t,i,0))&&void 0!==e?e:z)===w)return;const o=this._$AH,n=t===z&&o!==z||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==z&&(o===z||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 P{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){T(this,t)}}const R=window.litHtmlPolyfillSupport;null==R||R(S,M),(null!==(n=globalThis.litHtmlVersions)&&void 0!==n?n: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 W=Symbol.for(""),Z=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t._$litStatic$},G=t=>({_$litStatic$:t,r:W}),k=new Map,D=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],h=[];let p,
|
|
13
|
+
const W=Symbol.for(""),Z=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t._$litStatic$},G=t=>({_$litStatic$:t,r:W}),k=new Map,D=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],h=[];let p,a=0,l=!1;for(;a<o;){for(p=i[a];a<o&&void 0!==(s=e[a],n=Z(s));)p+=n+i[++a],l=!0;h.push(s),r.push(p),a++}if(a===o&&r.push(i[o]),l){const t=r.join("$$lit$$");void 0===(i=k.get(t))&&(r.raw=r,k.set(t,i=r)),e=h}return t(i,...e)})(x);var H;!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.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),V=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),B={fontFamily:V,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")},F=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",K),L=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",B.fontSize,"20px"),q=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",B.fontWeight,"normal"),J=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",B.letterSpacing,"0.15px"),Q=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",B.lineHeight,"1.2"),X=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",B.textTransform,"inherit"),Y=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",K),tt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",B.fontSize,"14px"),it=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",B.fontWeight,"normal"),et=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",B.letterSpacing,"0.105px"),ot=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",B.lineHeight,"1.7"),nt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",B.textTransform,"inherit"),st=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",V),rt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",B.fontSize,"16px"),ht=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",B.fontWeight,"600"),pt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",B.letterSpacing,"0.144px"),at=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",B.lineHeight,"1.5"),lt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",B.textTransform,"inherit"),ft=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",V),yt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",B.fontSize,"14px"),gt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",B.fontWeight,"normal"),dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",B.letterSpacing,"0.098px"),ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",B.lineHeight,"1.7"),ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",B.textTransform,"inherit"),vt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",V),$t=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",B.fontSize,"16px"),bt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",B.fontWeight,"normal"),mt=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",B.letterSpacing,"0.496px"),xt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",B.lineHeight,"1.5"),wt=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",B.textTransform,"inherit"),zt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",V),_t=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",B.fontSize,"14px"),At=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",B.fontWeight,"normal"),Nt=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",B.letterSpacing,"0.252px"),St=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",B.lineHeight,"1.4"),Tt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",B.textTransform,"inherit"),Et=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",V),Mt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",B.fontSize,"12px"),jt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",B.fontWeight,"normal"),It=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",B.letterSpacing,"0.396px"),Ot=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",B.lineHeight,"1.33"),Ut=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",B.textTransform,"inherit"),Ct=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",V),Pt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",B.fontSize,"10px"),Rt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",B.fontWeight,"normal"),Wt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",B.letterSpacing,"0.33px"),Zt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",B.lineHeight,"1.6"),Gt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",B.textTransform,"inherit"),kt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",V),Dt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",B.fontSize,"10px"),Ht=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",B.fontWeight,"normal"),Kt=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",B.letterSpacing,"1.5px"),Vt=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",B.lineHeight,"1.6"),Bt=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",B.textTransform,"uppercase"),Ft=i.FtCssVariableFactory.extend("--ft-typography-button-font-family",V),Lt=i.FtCssVariableFactory.extend("--ft-typography-button-font-size",B.fontSize,"14px"),qt=i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",B.fontWeight,"600"),Jt=i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",B.letterSpacing,"1.246px"),Qt=i.FtCssVariableFactory.extend("--ft-typography-button-line-height",B.lineHeight,"1.15"),Xt=i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",B.textTransform,"uppercase"),Yt=e.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: ${F};
|
|
16
|
+
font-size: ${L};
|
|
17
|
+
font-weight: ${q};
|
|
18
|
+
letter-spacing: ${J};
|
|
19
|
+
line-height: ${Q};
|
|
20
|
+
text-transform: ${X};
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,ti=e.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: ${Y};
|
|
25
|
+
font-size: ${tt};
|
|
26
|
+
font-weight: ${it};
|
|
27
|
+
letter-spacing: ${et};
|
|
28
|
+
line-height: ${ot};
|
|
29
|
+
text-transform: ${nt};
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,ii=e.css`
|
|
32
32
|
.ft-typography--subtitle1 {
|
|
33
|
-
font-family: ${
|
|
34
|
-
font-size: ${
|
|
35
|
-
font-weight: ${
|
|
36
|
-
letter-spacing: ${
|
|
33
|
+
font-family: ${st};
|
|
34
|
+
font-size: ${rt};
|
|
35
|
+
font-weight: ${ht};
|
|
36
|
+
letter-spacing: ${pt};
|
|
37
37
|
line-height: ${at};
|
|
38
|
-
text-transform: ${
|
|
38
|
+
text-transform: ${lt};
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,ei=e.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: ${ft};
|
|
43
|
+
font-size: ${yt};
|
|
44
|
+
font-weight: ${gt};
|
|
45
|
+
letter-spacing: ${dt};
|
|
46
|
+
line-height: ${ct};
|
|
47
|
+
text-transform: ${ut};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,oi=e.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: ${vt};
|
|
53
|
+
font-size: ${$t};
|
|
54
|
+
font-weight: ${bt};
|
|
55
|
+
letter-spacing: ${mt};
|
|
56
|
+
line-height: ${xt};
|
|
57
|
+
text-transform: ${wt};
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,ni=e.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: ${zt};
|
|
62
|
+
font-size: ${_t};
|
|
63
|
+
font-weight: ${At};
|
|
64
|
+
letter-spacing: ${Nt};
|
|
65
|
+
line-height: ${St};
|
|
66
|
+
text-transform: ${Tt};
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,si=e.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: ${Et};
|
|
71
|
+
font-size: ${Mt};
|
|
72
|
+
font-weight: ${jt};
|
|
73
|
+
letter-spacing: ${It};
|
|
74
|
+
line-height: ${Ot};
|
|
75
|
+
text-transform: ${Ut};
|
|
76
76
|
}
|
|
77
|
-
`,
|
|
77
|
+
`,ri=e.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: ${Ct};
|
|
80
|
+
font-size: ${Pt};
|
|
81
|
+
font-weight: ${Rt};
|
|
82
|
+
letter-spacing: ${Wt};
|
|
83
|
+
line-height: ${Zt};
|
|
84
|
+
text-transform: ${Gt};
|
|
85
85
|
}
|
|
86
|
-
`,
|
|
86
|
+
`,hi=e.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: ${kt};
|
|
89
|
+
font-size: ${Dt};
|
|
90
|
+
font-weight: ${Ht};
|
|
91
|
+
letter-spacing: ${Kt};
|
|
92
|
+
line-height: ${Vt};
|
|
93
|
+
text-transform: ${Bt};
|
|
94
94
|
}
|
|
95
|
-
`,
|
|
95
|
+
`,pi=e.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: ${Ft};
|
|
98
|
+
font-size: ${Lt};
|
|
99
|
+
font-weight: ${qt};
|
|
100
|
+
letter-spacing: ${Jt};
|
|
101
|
+
line-height: ${Qt};
|
|
102
|
+
text-transform: ${Xt};
|
|
103
103
|
}
|
|
104
|
-
|
|
104
|
+
`,ai=e.css`
|
|
105
|
+
.ft-typography {
|
|
106
|
+
vertical-align: inherit;
|
|
107
|
+
}
|
|
108
|
+
`;var li=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,h=t.length-1;h>=0;h--)(n=t[h])&&(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 fi extends i.FtLitElement{constructor(){super(...arguments),this.variant=H.body1}render(){return this.element?D`
|
|
105
109
|
<${G(this.element)}
|
|
106
110
|
class="ft-typography ft-typography--${this.variant}">
|
|
107
111
|
<slot></slot>
|
|
108
112
|
</${G(this.element)}>
|
|
109
113
|
`:D`
|
|
110
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
111
|
-
`}}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
`}}fi.styles=[Yt,ti,ii,ei,oi,ni,si,ri,hi,pi,ai],li([o.property()],fi.prototype,"element",void 0),li([o.property()],fi.prototype,"variant",void 0),i.customElement("ft-typography")(fi);const yi={textColor:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceHigh,"Design system"),titleColor:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system")},gi=e.css`
|
|
116
|
+
.ft-trend {
|
|
117
|
+
text-align: center;
|
|
118
|
+
color: ${yi.textColor};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.ft-trend > div {
|
|
122
|
+
padding-top: 5px;
|
|
123
|
+
}
|
|
124
|
+
`;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,h=t.length-1;h>=0;h--)(n=t[h])&&(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 ci extends i.FtLitElement{constructor(){super(...arguments),this.label="Trend",this.currentValue=3,this.previousValue=2}getTrendIcon(){return this.currentValue==this.previousValue?"→":this.currentValue>this.previousValue?"↗":"↘"}getTrendPercentage(){let t=(this.currentValue-this.previousValue)/this.previousValue,i=Math.round(100*t);return`${i>=0?"+":"-"}${Math.abs(i)}%`}render(){return 0==this.previousValue?e.html`
|
|
116
125
|
<div class="ft-trend">
|
|
117
126
|
<ft-typography variant="subtitle2">
|
|
118
127
|
${this.label}
|
|
@@ -138,13 +147,4 @@ const W=Symbol.for(""),Z=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
138
147
|
</ft-typography>
|
|
139
148
|
</div>
|
|
140
149
|
</div>
|
|
141
|
-
`}}
|
|
142
|
-
.ft-trend {
|
|
143
|
-
text-align: center;
|
|
144
|
-
color: ${yi.textColor};
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.ft-trend > div {
|
|
148
|
-
padding-top: 5px;
|
|
149
|
-
}
|
|
150
|
-
`,fi([o.property({type:String})],gi.prototype,"label",void 0),fi([o.property({type:Number})],gi.prototype,"currentValue",void 0),fi([o.property({type:Number})],gi.prototype,"previousValue",void 0),i.customElement("ft-trend")(gi),t.FtTrend=gi,t.FtTrendCssVariables=yi,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators);
|
|
150
|
+
`}}ci.elementDefinitions={"ft-typography":fi},ci.styles=gi,di([o.property({type:String})],ci.prototype,"label",void 0),di([o.property({type:Number})],ci.prototype,"currentValue",void 0),di([o.property({type:Number})],ci.prototype,"previousValue",void 0),i.customElement("ft-trend")(ci),t.FtTrend=ci,t.FtTrendCssVariables=yi,t.styles=gi,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators);
|
package/build/ft-trend.min.js
CHANGED
|
@@ -72,109 +72,118 @@ var et,it;null==tt||tt(K,Z),(null!==(w=globalThis.litHtmlVersions)&&void 0!==w?w
|
|
|
72
72
|
* Copyright 2020 Google LLC
|
|
73
73
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
74
74
|
*/
|
|
75
|
-
const pt=Symbol.for(""),ft=t=>{if((null==t?void 0:t.r)===pt)return null==t?void 0:t._$litStatic$},ut=t=>({_$litStatic$:t,r:pt}),dt=new Map,yt=(t=>(e,...i)=>{const o=i.length;let n,r;const s=[],a=[];let l,h=0,c=!1;for(;h<o;){for(l=e[h];h<o&&void 0!==(r=i[h],n=ft(r));)l+=n+e[++h],c=!0;a.push(r),s.push(l),h++}if(h===o&&s.push(e[o]),c){const t=s.join("$$lit$$");void 0===(e=dt.get(t))&&(s.raw=s,dt.set(t,e=s)),i=a}return t(e,...i)})(z);var gt
|
|
75
|
+
const pt=Symbol.for(""),ft=t=>{if((null==t?void 0:t.r)===pt)return null==t?void 0:t._$litStatic$},ut=t=>({_$litStatic$:t,r:pt}),dt=new Map,yt=(t=>(e,...i)=>{const o=i.length;let n,r;const s=[],a=[];let l,h=0,c=!1;for(;h<o;){for(l=e[h];h<o&&void 0!==(r=i[h],n=ft(r));)l+=n+e[++h],c=!0;a.push(r),s.push(l),h++}if(h===o&&s.push(e[o]),c){const t=s.join("$$lit$$");void 0===(e=dt.get(t))&&(s.raw=s,dt.set(t,e=s)),i=a}return t(e,...i)})(z);var gt;!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"}(gt||(gt={}));const vt=rt.extend("--ft-typography-font-family",st.titleFont),bt=rt.extend("--ft-typography-font-family",st.contentFont),mt={fontFamily:bt,fontSize:rt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:rt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:rt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:rt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:rt.create("--ft-typography-text-transform","UNKNOWN","inherit")},xt=rt.extend("--ft-typography-title-font-family",vt),wt=rt.extend("--ft-typography-title-font-size",mt.fontSize,"20px"),$t=rt.extend("--ft-typography-title-font-weight",mt.fontWeight,"normal"),Ot=rt.extend("--ft-typography-title-letter-spacing",mt.letterSpacing,"0.15px"),St=rt.extend("--ft-typography-title-line-height",mt.lineHeight,"1.2"),Nt=rt.extend("--ft-typography-title-text-transform",mt.textTransform,"inherit"),Ct=rt.extend("--ft-typography-title-dense-font-family",vt),Et=rt.extend("--ft-typography-title-dense-font-size",mt.fontSize,"14px"),Rt=rt.extend("--ft-typography-title-dense-font-weight",mt.fontWeight,"normal"),Mt=rt.extend("--ft-typography-title-dense-letter-spacing",mt.letterSpacing,"0.105px"),Ut=rt.extend("--ft-typography-title-dense-line-height",mt.lineHeight,"1.7"),Ft=rt.extend("--ft-typography-title-dense-text-transform",mt.textTransform,"inherit"),kt=rt.extend("--ft-typography-subtitle1-font-family",bt),Lt=rt.extend("--ft-typography-subtitle1-font-size",mt.fontSize,"16px"),At=rt.extend("--ft-typography-subtitle1-font-weight",mt.fontWeight,"600"),Pt=rt.extend("--ft-typography-subtitle1-letter-spacing",mt.letterSpacing,"0.144px"),Tt=rt.extend("--ft-typography-subtitle1-line-height",mt.lineHeight,"1.5"),jt=rt.extend("--ft-typography-subtitle1-text-transform",mt.textTransform,"inherit"),zt=rt.extend("--ft-typography-subtitle2-font-family",bt),Bt=rt.extend("--ft-typography-subtitle2-font-size",mt.fontSize,"14px"),_t=rt.extend("--ft-typography-subtitle2-font-weight",mt.fontWeight,"normal"),Dt=rt.extend("--ft-typography-subtitle2-letter-spacing",mt.letterSpacing,"0.098px"),Wt=rt.extend("--ft-typography-subtitle2-line-height",mt.lineHeight,"1.7"),Ht=rt.extend("--ft-typography-subtitle2-text-transform",mt.textTransform,"inherit"),Kt=rt.extend("--ft-typography-body1-font-family",bt),It=rt.extend("--ft-typography-body1-font-size",mt.fontSize,"16px"),Vt=rt.extend("--ft-typography-body1-font-weight",mt.fontWeight,"normal"),Zt=rt.extend("--ft-typography-body1-letter-spacing",mt.letterSpacing,"0.496px"),Jt=rt.extend("--ft-typography-body1-line-height",mt.lineHeight,"1.5"),Xt=rt.extend("--ft-typography-body1-text-transform",mt.textTransform,"inherit"),qt=rt.extend("--ft-typography-body2-font-family",bt),Gt=rt.extend("--ft-typography-body2-font-size",mt.fontSize,"14px"),Qt=rt.extend("--ft-typography-body2-font-weight",mt.fontWeight,"normal"),Yt=rt.extend("--ft-typography-body2-letter-spacing",mt.letterSpacing,"0.252px"),te=rt.extend("--ft-typography-body2-line-height",mt.lineHeight,"1.4"),ee=rt.extend("--ft-typography-body2-text-transform",mt.textTransform,"inherit"),ie=rt.extend("--ft-typography-caption-font-family",bt),oe=rt.extend("--ft-typography-caption-font-size",mt.fontSize,"12px"),ne=rt.extend("--ft-typography-caption-font-weight",mt.fontWeight,"normal"),re=rt.extend("--ft-typography-caption-letter-spacing",mt.letterSpacing,"0.396px"),se=rt.extend("--ft-typography-caption-line-height",mt.lineHeight,"1.33"),ae=rt.extend("--ft-typography-caption-text-transform",mt.textTransform,"inherit"),le=rt.extend("--ft-typography-breadcrumb-font-family",bt),he=rt.extend("--ft-typography-breadcrumb-font-size",mt.fontSize,"10px"),ce=rt.extend("--ft-typography-breadcrumb-font-weight",mt.fontWeight,"normal"),pe=rt.extend("--ft-typography-breadcrumb-letter-spacing",mt.letterSpacing,"0.33px"),fe=rt.extend("--ft-typography-breadcrumb-line-height",mt.lineHeight,"1.6"),ue=rt.extend("--ft-typography-breadcrumb-text-transform",mt.textTransform,"inherit"),de=rt.extend("--ft-typography-overline-font-family",bt),ye=rt.extend("--ft-typography-overline-font-size",mt.fontSize,"10px"),ge=rt.extend("--ft-typography-overline-font-weight",mt.fontWeight,"normal"),ve=rt.extend("--ft-typography-overline-letter-spacing",mt.letterSpacing,"1.5px"),be=rt.extend("--ft-typography-overline-line-height",mt.lineHeight,"1.6"),me=rt.extend("--ft-typography-overline-text-transform",mt.textTransform,"uppercase"),xe=rt.extend("--ft-typography-button-font-family",bt),we=rt.extend("--ft-typography-button-font-size",mt.fontSize,"14px"),$e=rt.extend("--ft-typography-button-font-weight",mt.fontWeight,"600"),Oe=rt.extend("--ft-typography-button-letter-spacing",mt.letterSpacing,"1.246px"),Se=rt.extend("--ft-typography-button-line-height",mt.lineHeight,"1.15"),Ne=rt.extend("--ft-typography-button-text-transform",mt.textTransform,"uppercase"),Ce=c`
|
|
76
76
|
.ft-typography--title {
|
|
77
|
-
font-family: ${
|
|
78
|
-
font-size: ${
|
|
79
|
-
font-weight: ${
|
|
80
|
-
letter-spacing: ${
|
|
81
|
-
line-height: ${
|
|
82
|
-
text-transform: ${
|
|
77
|
+
font-family: ${xt};
|
|
78
|
+
font-size: ${wt};
|
|
79
|
+
font-weight: ${$t};
|
|
80
|
+
letter-spacing: ${Ot};
|
|
81
|
+
line-height: ${St};
|
|
82
|
+
text-transform: ${Nt};
|
|
83
83
|
}
|
|
84
|
-
`,
|
|
84
|
+
`,Ee=c`
|
|
85
85
|
.ft-typography--title-dense {
|
|
86
|
-
font-family: ${
|
|
87
|
-
font-size: ${
|
|
88
|
-
font-weight: ${
|
|
89
|
-
letter-spacing: ${
|
|
90
|
-
line-height: ${
|
|
91
|
-
text-transform: ${
|
|
86
|
+
font-family: ${Ct};
|
|
87
|
+
font-size: ${Et};
|
|
88
|
+
font-weight: ${Rt};
|
|
89
|
+
letter-spacing: ${Mt};
|
|
90
|
+
line-height: ${Ut};
|
|
91
|
+
text-transform: ${Ft};
|
|
92
92
|
}
|
|
93
|
-
`,
|
|
93
|
+
`,Re=c`
|
|
94
94
|
.ft-typography--subtitle1 {
|
|
95
|
-
font-family: ${
|
|
96
|
-
font-size: ${
|
|
97
|
-
font-weight: ${
|
|
98
|
-
letter-spacing: ${
|
|
99
|
-
line-height: ${
|
|
100
|
-
text-transform: ${
|
|
95
|
+
font-family: ${kt};
|
|
96
|
+
font-size: ${Lt};
|
|
97
|
+
font-weight: ${At};
|
|
98
|
+
letter-spacing: ${Pt};
|
|
99
|
+
line-height: ${Tt};
|
|
100
|
+
text-transform: ${jt};
|
|
101
101
|
}
|
|
102
|
-
`,
|
|
102
|
+
`,Me=c`
|
|
103
103
|
.ft-typography--subtitle2 {
|
|
104
|
-
font-family: ${
|
|
105
|
-
font-size: ${
|
|
106
|
-
font-weight: ${
|
|
107
|
-
letter-spacing: ${
|
|
108
|
-
line-height: ${
|
|
109
|
-
text-transform: ${
|
|
104
|
+
font-family: ${zt};
|
|
105
|
+
font-size: ${Bt};
|
|
106
|
+
font-weight: ${_t};
|
|
107
|
+
letter-spacing: ${Dt};
|
|
108
|
+
line-height: ${Wt};
|
|
109
|
+
text-transform: ${Ht};
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
`,
|
|
112
|
+
`,Ue=c`
|
|
113
113
|
.ft-typography--body1 {
|
|
114
|
-
font-family: ${
|
|
115
|
-
font-size: ${
|
|
116
|
-
font-weight: ${
|
|
117
|
-
letter-spacing: ${
|
|
118
|
-
line-height: ${
|
|
119
|
-
text-transform: ${
|
|
114
|
+
font-family: ${Kt};
|
|
115
|
+
font-size: ${It};
|
|
116
|
+
font-weight: ${Vt};
|
|
117
|
+
letter-spacing: ${Zt};
|
|
118
|
+
line-height: ${Jt};
|
|
119
|
+
text-transform: ${Xt};
|
|
120
120
|
}
|
|
121
|
-
`,
|
|
121
|
+
`,Fe=c`
|
|
122
122
|
.ft-typography--body2 {
|
|
123
|
-
font-family: ${
|
|
124
|
-
font-size: ${
|
|
125
|
-
font-weight: ${
|
|
126
|
-
letter-spacing: ${
|
|
127
|
-
line-height: ${
|
|
128
|
-
text-transform: ${
|
|
123
|
+
font-family: ${qt};
|
|
124
|
+
font-size: ${Gt};
|
|
125
|
+
font-weight: ${Qt};
|
|
126
|
+
letter-spacing: ${Yt};
|
|
127
|
+
line-height: ${te};
|
|
128
|
+
text-transform: ${ee};
|
|
129
129
|
}
|
|
130
|
-
`,
|
|
130
|
+
`,ke=c`
|
|
131
131
|
.ft-typography--caption {
|
|
132
|
-
font-family: ${
|
|
133
|
-
font-size: ${
|
|
134
|
-
font-weight: ${
|
|
135
|
-
letter-spacing: ${
|
|
136
|
-
line-height: ${
|
|
137
|
-
text-transform: ${
|
|
132
|
+
font-family: ${ie};
|
|
133
|
+
font-size: ${oe};
|
|
134
|
+
font-weight: ${ne};
|
|
135
|
+
letter-spacing: ${re};
|
|
136
|
+
line-height: ${se};
|
|
137
|
+
text-transform: ${ae};
|
|
138
138
|
}
|
|
139
|
-
`,
|
|
139
|
+
`,Le=c`
|
|
140
140
|
.ft-typography--breadcrumb {
|
|
141
|
-
font-family: ${
|
|
142
|
-
font-size: ${
|
|
143
|
-
font-weight: ${
|
|
144
|
-
letter-spacing: ${
|
|
145
|
-
line-height: ${
|
|
146
|
-
text-transform: ${
|
|
141
|
+
font-family: ${le};
|
|
142
|
+
font-size: ${he};
|
|
143
|
+
font-weight: ${ce};
|
|
144
|
+
letter-spacing: ${pe};
|
|
145
|
+
line-height: ${fe};
|
|
146
|
+
text-transform: ${ue};
|
|
147
147
|
}
|
|
148
|
-
`,
|
|
148
|
+
`,Ae=c`
|
|
149
149
|
.ft-typography--overline {
|
|
150
|
-
font-family: ${
|
|
151
|
-
font-size: ${
|
|
152
|
-
font-weight: ${
|
|
153
|
-
letter-spacing: ${
|
|
154
|
-
line-height: ${
|
|
155
|
-
text-transform: ${
|
|
150
|
+
font-family: ${de};
|
|
151
|
+
font-size: ${ye};
|
|
152
|
+
font-weight: ${ge};
|
|
153
|
+
letter-spacing: ${ve};
|
|
154
|
+
line-height: ${be};
|
|
155
|
+
text-transform: ${me};
|
|
156
156
|
}
|
|
157
|
-
`,
|
|
157
|
+
`,Pe=c`
|
|
158
158
|
.ft-typography--button {
|
|
159
|
-
font-family: ${
|
|
160
|
-
font-size: ${
|
|
161
|
-
font-weight: ${
|
|
162
|
-
letter-spacing: ${
|
|
163
|
-
line-height: ${
|
|
164
|
-
text-transform: ${
|
|
159
|
+
font-family: ${xe};
|
|
160
|
+
font-size: ${we};
|
|
161
|
+
font-weight: ${$e};
|
|
162
|
+
letter-spacing: ${Oe};
|
|
163
|
+
line-height: ${Se};
|
|
164
|
+
text-transform: ${Ne};
|
|
165
165
|
}
|
|
166
|
-
|
|
166
|
+
`,Te=c`
|
|
167
|
+
.ft-typography {
|
|
168
|
+
vertical-align: inherit;
|
|
169
|
+
}
|
|
170
|
+
`;var je=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class ze extends ct{constructor(){super(...arguments),this.variant=gt.body1}render(){return this.element?yt`
|
|
167
171
|
<${ut(this.element)}
|
|
168
172
|
class="ft-typography ft-typography--${this.variant}">
|
|
169
173
|
<slot></slot>
|
|
170
174
|
</${ut(this.element)}>
|
|
171
175
|
`:yt`
|
|
172
176
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
173
|
-
`}}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
177
|
+
`}}ze.styles=[Ce,Ee,Re,Me,Ue,Fe,ke,Le,Ae,Pe,Te],je([i()],ze.prototype,"element",void 0),je([i()],ze.prototype,"variant",void 0),n("ft-typography")(ze);const Be={textColor:rt.external(st.colorOnSurfaceHigh,"Design system"),titleColor:rt.external(st.colorOnSurfaceMedium,"Design system")},_e=c`
|
|
178
|
+
.ft-trend {
|
|
179
|
+
text-align: center;
|
|
180
|
+
color: ${Be.textColor};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.ft-trend > div {
|
|
184
|
+
padding-top: 5px;
|
|
185
|
+
}
|
|
186
|
+
`;var De=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class We extends ct{constructor(){super(...arguments),this.label="Trend",this.currentValue=3,this.previousValue=2}getTrendIcon(){return this.currentValue==this.previousValue?"→":this.currentValue>this.previousValue?"↗":"↘"}getTrendPercentage(){let t=(this.currentValue-this.previousValue)/this.previousValue,e=Math.round(100*t);return`${e>=0?"+":"-"}${Math.abs(e)}%`}render(){return 0==this.previousValue?z`
|
|
178
187
|
<div class="ft-trend">
|
|
179
188
|
<ft-typography variant="subtitle2">
|
|
180
189
|
${this.label}
|
|
@@ -200,13 +209,4 @@ const pt=Symbol.for(""),ft=t=>{if((null==t?void 0:t.r)===pt)return null==t?void
|
|
|
200
209
|
</ft-typography>
|
|
201
210
|
</div>
|
|
202
211
|
</div>
|
|
203
|
-
`}}
|
|
204
|
-
.ft-trend {
|
|
205
|
-
text-align: center;
|
|
206
|
-
color: ${Be.textColor};
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.ft-trend > div {
|
|
210
|
-
padding-top: 5px;
|
|
211
|
-
}
|
|
212
|
-
`,ze([i({type:String})],_e.prototype,"label",void 0),ze([i({type:Number})],_e.prototype,"currentValue",void 0),ze([i({type:Number})],_e.prototype,"previousValue",void 0),n("ft-trend")(_e),t.FtTrend=_e,t.FtTrendCssVariables=Be,Object.defineProperty(t,"i",{value:!0})}({});
|
|
212
|
+
`}}We.elementDefinitions={"ft-typography":ze},We.styles=_e,De([i({type:String})],We.prototype,"label",void 0),De([i({type:Number})],We.prototype,"currentValue",void 0),De([i({type:Number})],We.prototype,"previousValue",void 0),n("ft-trend")(We),t.FtTrend=We,t.FtTrendCssVariables=Be,t.styles=_e,Object.defineProperty(t,"i",{value:!0})}({});
|
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { customElement } from "@fluid-topics/ft-wc-utils";
|
|
2
2
|
import { FtTrend } from "./ft-trend";
|
|
3
3
|
export * from "./ft-trend";
|
|
4
|
+
export * from "./ft-trend.css";
|
|
5
|
+
export * from "./ft-trend.properties";
|
|
4
6
|
customElement("ft-trend")(FtTrend);
|
|
5
7
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-trend",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.14",
|
|
4
4
|
"description": "Single stat value with a trend",
|
|
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.3.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
22
|
+
"@fluid-topics/ft-typography": "0.3.14",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "0.3.14",
|
|
24
24
|
"lit": "2.2.8"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "46cc9dd160b2f3189a2e581a8237e962f1ae464d"
|
|
27
27
|
}
|