tuix-webcomponents 0.3.0 → 0.4.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/dist/src/index.d.ts +2 -1
- package/dist/src/index.js +2 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/tuix-button/TuixButton.styles.js +7 -3
- package/dist/src/tuix-button/TuixButton.styles.js.map +1 -1
- package/dist/src/tuix-dropdown/TuixDropdown.styles.js +1 -3
- package/dist/src/tuix-dropdown/TuixDropdown.styles.js.map +1 -1
- package/dist/src/tuix-icon/TuixIcon.d.ts +2 -1
- package/dist/src/tuix-icon/TuixIcon.icons.js +7 -0
- package/dist/src/tuix-icon/TuixIcon.icons.js.map +1 -1
- package/dist/src/tuix-icon/TuixIcon.js +7 -2
- package/dist/src/tuix-icon/TuixIcon.js.map +1 -1
- package/dist/src/tuix-icon/enums/tuix-icon.enums.d.ts +2 -1
- package/dist/src/tuix-icon/enums/tuix-icon.enums.js +1 -0
- package/dist/src/tuix-icon/enums/tuix-icon.enums.js.map +1 -1
- package/dist/src/tuix-link/TuixLink.d.ts +6 -4
- package/dist/src/tuix-link/TuixLink.js +21 -34
- package/dist/src/tuix-link/TuixLink.js.map +1 -1
- package/dist/src/tuix-link/TuixLink.styles.d.ts +1 -0
- package/dist/src/tuix-link/TuixLink.styles.js +67 -0
- package/dist/src/tuix-link/TuixLink.styles.js.map +1 -0
- package/dist/src/tuix-paper/TuixPaper.d.ts +4 -3
- package/dist/src/tuix-paper/TuixPaper.js +16 -26
- package/dist/src/tuix-paper/TuixPaper.js.map +1 -1
- package/dist/src/tuix-paper/TuixPaper.styles.d.ts +1 -0
- package/dist/src/tuix-paper/TuixPaper.styles.js +22 -0
- package/dist/src/tuix-paper/TuixPaper.styles.js.map +1 -0
- package/dist/src/tuix-paper/enums/tuix-paper.enum.d.ts +7 -1
- package/dist/src/tuix-paper/enums/tuix-paper.enum.js +15 -8
- package/dist/src/tuix-paper/enums/tuix-paper.enum.js.map +1 -1
- package/dist/src/tuix-text/TuixText.d.ts +1 -1
- package/dist/src/tuix-text/TuixText.js +7 -6
- package/dist/src/tuix-text/TuixText.js.map +1 -1
- package/dist/src/tuix-text/TuixText.styles.js +26 -22
- package/dist/src/tuix-text/TuixText.styles.js.map +1 -1
- package/dist/src/tuix-text/enums/tuix-text.enums.d.ts +4 -1
- package/dist/src/tuix-text/enums/tuix-text.enums.js +10 -0
- package/dist/src/tuix-text/enums/tuix-text.enums.js.map +1 -1
- package/dist/src/utils/colors.d.ts +2 -1
- package/dist/src/utils/colors.js +1 -0
- package/dist/src/utils/colors.js.map +1 -1
- package/dist/src/utils/darkColors.d.ts +4 -3
- package/dist/src/utils/darkColors.js +3 -2
- package/dist/src/utils/darkColors.js.map +1 -1
- package/dist/src/utils/screenSizes.enum.d.ts +2 -2
- package/dist/src/utils/screenSizes.enum.js +2 -3
- package/dist/src/utils/screenSizes.enum.js.map +1 -1
- package/dist/src/utils/slottedClassName.d.ts +2 -0
- package/dist/src/utils/slottedClassName.js +2 -0
- package/dist/src/utils/slottedClassName.js.map +1 -0
- package/dist/tsconfig.publish.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,52 +1,42 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { LitElement,
|
|
2
|
+
import { LitElement, html } from 'lit';
|
|
3
3
|
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
-
import {
|
|
4
|
+
import { BorderRadiusPaper, PaperElevation } from './enums/tuix-paper.enum';
|
|
5
5
|
import { classMap } from 'lit/directives/class-map.js';
|
|
6
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
7
|
+
import { paperStyles } from './TuixPaper.styles';
|
|
6
8
|
let TuixPaper = class TuixPaper extends LitElement {
|
|
7
9
|
constructor() {
|
|
8
10
|
super(...arguments);
|
|
9
|
-
this.elevation =
|
|
11
|
+
this.elevation = PaperElevation.VARIANT_1;
|
|
12
|
+
this.borderRadius = BorderRadiusPaper.NONE;
|
|
10
13
|
this.dark = false;
|
|
11
14
|
}
|
|
12
15
|
_getOptionalClasses() {
|
|
13
|
-
const elevationClass = `elevation `;
|
|
14
16
|
const variantClass = `variant_${this.elevation}`;
|
|
15
17
|
const darkClass = `dark_${this.elevation}`;
|
|
16
18
|
return {
|
|
17
|
-
|
|
19
|
+
elevation: true,
|
|
18
20
|
[variantClass]: !this.dark,
|
|
19
21
|
[darkClass]: this.dark,
|
|
20
22
|
};
|
|
21
23
|
}
|
|
22
24
|
render() {
|
|
23
|
-
return html ` <div
|
|
25
|
+
return html ` <div
|
|
26
|
+
class="${classMap(this._getOptionalClasses())}"
|
|
27
|
+
style="${styleMap({ borderRadius: this.borderRadius })}"
|
|
28
|
+
>
|
|
24
29
|
<slot></slot>
|
|
25
30
|
</div>`;
|
|
26
31
|
}
|
|
27
32
|
};
|
|
28
|
-
|
|
29
|
-
TuixPaper.styles = css `
|
|
30
|
-
.elevation {
|
|
31
|
-
border-radius: 20px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
${unsafeCSS(Object.values(PaperVariant).slice(1)
|
|
35
|
-
.map((variant, index) => {
|
|
36
|
-
return `
|
|
37
|
-
.elevation.variant_${variant} {
|
|
38
|
-
box-shadow: 0px ${Math.pow(2, index)}px ${Math.pow(2, (index + 2))}px rgba(66, 79, 101, 0.16);
|
|
39
|
-
}
|
|
40
|
-
.elevation.dark_${variant} {
|
|
41
|
-
background-color: ${unsafeCSS(`rgb(${23 + 3 * (index)}, ${23 + 3 * (index)}, ${26 + 5 * (index)})`)};
|
|
42
|
-
}
|
|
43
|
-
`;
|
|
44
|
-
})
|
|
45
|
-
.join('\n'))}
|
|
46
|
-
`;
|
|
33
|
+
TuixPaper.styles = [paperStyles];
|
|
47
34
|
__decorate([
|
|
48
|
-
property({ type:
|
|
35
|
+
property({ type: PaperElevation })
|
|
49
36
|
], TuixPaper.prototype, "elevation", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
property({ type: String, attribute: 'border-radius' })
|
|
39
|
+
], TuixPaper.prototype, "borderRadius", void 0);
|
|
50
40
|
__decorate([
|
|
51
41
|
property({ type: Boolean, reflect: true })
|
|
52
42
|
], TuixPaper.prototype, "dark", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TuixPaper.js","sourceRoot":"","sources":["../../../src/tuix-paper/TuixPaper.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAkB,
|
|
1
|
+
{"version":3,"file":"TuixPaper.js","sourceRoot":"","sources":["../../../src/tuix-paper/TuixPaper.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAkB,IAAI,EAAE,MAAM,KAAK,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAa,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,IAAa,SAAS,GAAtB,MAAa,SAAU,SAAQ,UAAU;IAAzC;;QAEE,cAAS,GAAG,cAAc,CAAC,SAAS,CAAC;QAGrC,iBAAY,GAAG,iBAAiB,CAAC,IAAI,CAAC;QAGtC,SAAI,GAAG,KAAK,CAAC;IAsBf,CAAC;IAlBS,mBAAmB;QACzB,MAAM,YAAY,GAAG,WAAW,IAAI,CAAC,SAAS,EAAE,CAAC;QACjD,MAAM,SAAS,GAAG,QAAQ,IAAI,CAAC,SAAS,EAAE,CAAC;QAC3C,OAAO;YACL,SAAS,EAAE,IAAI;YACf,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI;YAC1B,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,IAAI;SACvB,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;eACA,QAAQ,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC;eACpC,QAAQ,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC;;;WAGjD,CAAC;IACV,CAAC;;AAnBM,gBAAM,GAAG,CAAC,WAAW,CAAC,AAAhB,CAAiB;AAR9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;4CACE;AAGrC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;+CACjB;AAGtC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCAC9B;AARF,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CA8BrB;SA9BY,SAAS","sourcesContent":["import { LitElement, TemplateResult, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { BorderRadiusPaper, PaperElevation } from './enums/tuix-paper.enum';\nimport { ClassInfo, classMap } from 'lit/directives/class-map.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { paperStyles } from './TuixPaper.styles';\n\n@customElement('tuix-paper')\nexport class TuixPaper extends LitElement {\n @property({ type: PaperElevation })\n elevation = PaperElevation.VARIANT_1;\n\n @property({ type: String, attribute: 'border-radius' })\n borderRadius = BorderRadiusPaper.NONE;\n\n @property({ type: Boolean, reflect: true })\n dark = false;\n\n static styles = [paperStyles];\n\n private _getOptionalClasses(): ClassInfo {\n const variantClass = `variant_${this.elevation}`;\n const darkClass = `dark_${this.elevation}`;\n return {\n elevation: true,\n [variantClass]: !this.dark,\n [darkClass]: this.dark,\n };\n }\n\n render(): TemplateResult {\n return html` <div\n class=\"${classMap(this._getOptionalClasses())}\"\n style=\"${styleMap({ borderRadius: this.borderRadius })}\"\n >\n <slot></slot>\n </div>`;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const paperStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { css, unsafeCSS } from 'lit';
|
|
2
|
+
import { PaperElevation } from './enums/tuix-paper.enum';
|
|
3
|
+
const calculatedStyles = Object.values(PaperElevation)
|
|
4
|
+
.slice(1, -1)
|
|
5
|
+
.map((variant, index) => `
|
|
6
|
+
.elevation.variant_${variant} {
|
|
7
|
+
box-shadow: 0px ${2 ** index}px ${2 ** (index + 2)}px #424f6529;
|
|
8
|
+
}
|
|
9
|
+
.elevation.dark_${variant} {
|
|
10
|
+
background-color:rgb(${23 + 3 * index},${23 + 3 * index},${26 + 5 * index});
|
|
11
|
+
}`)
|
|
12
|
+
.join('\n');
|
|
13
|
+
export const paperStyles = css `
|
|
14
|
+
${unsafeCSS(calculatedStyles)}
|
|
15
|
+
.elevation.variant_${unsafeCSS(PaperElevation.VARIANT_4)} {
|
|
16
|
+
box-shadow: 0px 7px 24px #424f6529;
|
|
17
|
+
}
|
|
18
|
+
.elevation.dark_${unsafeCSS(PaperElevation.VARIANT_4)} {
|
|
19
|
+
background-color: rgb(33, 33, 40);
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
//# sourceMappingURL=TuixPaper.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TuixPaper.styles.js","sourceRoot":"","sources":["../../../src/tuix-paper/TuixPaper.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC;KACnD,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;KACZ,GAAG,CACF,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC;uBACD,OAAO;sBACR,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;;oBAElC,OAAO;2BACA,EAAE,GAAG,CAAC,GAAG,KAAK,IAAI,EAAE,GAAG,CAAC,GAAG,KAAK,IAAI,EAAE,GAAG,CAAC,GAAG,KAAK;IACzE,CACD;KACA,IAAI,CAAC,IAAI,CAAC,CAAC;AAEd,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAA;IAC1B,SAAS,CAAC,gBAAgB,CAAC;uBACR,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC;;;oBAGtC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC;;;CAGtD,CAAC","sourcesContent":["import { css, unsafeCSS } from 'lit';\nimport { PaperElevation } from './enums/tuix-paper.enum';\n\nconst calculatedStyles = Object.values(PaperElevation)\n .slice(1, -1)\n .map(\n (variant, index) => `\n .elevation.variant_${variant} {\n box-shadow: 0px ${2 ** index}px ${2 ** (index + 2)}px #424f6529;\n }\n .elevation.dark_${variant} {\n background-color:rgb(${23 + 3 * index},${23 + 3 * index},${26 + 5 * index});\n }`\n )\n .join('\\n');\n\nexport const paperStyles = css`\n ${unsafeCSS(calculatedStyles)}\n .elevation.variant_${unsafeCSS(PaperElevation.VARIANT_4)} {\n box-shadow: 0px 7px 24px #424f6529;\n }\n .elevation.dark_${unsafeCSS(PaperElevation.VARIANT_4)} {\n background-color: rgb(33, 33, 40);\n }\n`;\n"]}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
export declare enum
|
|
1
|
+
export declare enum PaperElevation {
|
|
2
2
|
VARIANT_0 = "0",
|
|
3
3
|
VARIANT_1 = "1",
|
|
4
4
|
VARIANT_2 = "2",
|
|
5
5
|
VARIANT_3 = "3",
|
|
6
6
|
VARIANT_4 = "4"
|
|
7
7
|
}
|
|
8
|
+
export declare enum BorderRadiusPaper {
|
|
9
|
+
NONE = "0px",
|
|
10
|
+
SOFT = "4px",
|
|
11
|
+
MEDIUM = "10px",
|
|
12
|
+
STRONG = "20px"
|
|
13
|
+
}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
export var
|
|
2
|
-
(function (
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
})(
|
|
1
|
+
export var PaperElevation;
|
|
2
|
+
(function (PaperElevation) {
|
|
3
|
+
PaperElevation["VARIANT_0"] = "0";
|
|
4
|
+
PaperElevation["VARIANT_1"] = "1";
|
|
5
|
+
PaperElevation["VARIANT_2"] = "2";
|
|
6
|
+
PaperElevation["VARIANT_3"] = "3";
|
|
7
|
+
PaperElevation["VARIANT_4"] = "4";
|
|
8
|
+
})(PaperElevation || (PaperElevation = {}));
|
|
9
|
+
export var BorderRadiusPaper;
|
|
10
|
+
(function (BorderRadiusPaper) {
|
|
11
|
+
BorderRadiusPaper["NONE"] = "0px";
|
|
12
|
+
BorderRadiusPaper["SOFT"] = "4px";
|
|
13
|
+
BorderRadiusPaper["MEDIUM"] = "10px";
|
|
14
|
+
BorderRadiusPaper["STRONG"] = "20px";
|
|
15
|
+
})(BorderRadiusPaper || (BorderRadiusPaper = {}));
|
|
9
16
|
//# sourceMappingURL=tuix-paper.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tuix-paper.enum.js","sourceRoot":"","sources":["../../../../src/tuix-paper/enums/tuix-paper.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"tuix-paper.enum.js","sourceRoot":"","sources":["../../../../src/tuix-paper/enums/tuix-paper.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,iCAAe,CAAA;IACf,iCAAe,CAAA;IACf,iCAAe,CAAA;IACf,iCAAe,CAAA;AACjB,CAAC,EANW,cAAc,KAAd,cAAc,QAMzB;AAED,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,iCAAY,CAAA;IACZ,iCAAY,CAAA;IACZ,oCAAe,CAAA;IACf,oCAAe,CAAA;AACjB,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B","sourcesContent":["export enum PaperElevation {\n VARIANT_0 = '0',\n VARIANT_1 = '1',\n VARIANT_2 = '2',\n VARIANT_3 = '3',\n VARIANT_4 = '4',\n}\n\nexport enum BorderRadiusPaper {\n NONE = '0px',\n SOFT = '4px',\n MEDIUM = '10px',\n STRONG = '20px',\n}\n"]}
|
|
@@ -2,7 +2,7 @@ import { LitElement } from 'lit';
|
|
|
2
2
|
import { TextSize, TextVariant } from './enums/tuix-text.enums.js';
|
|
3
3
|
export declare class TuixText extends LitElement {
|
|
4
4
|
size: TextSize;
|
|
5
|
-
color?: TextVariant;
|
|
5
|
+
color?: TextVariant | undefined;
|
|
6
6
|
dark: boolean;
|
|
7
7
|
static styles: import("lit").CSSResult[];
|
|
8
8
|
private _getTextColor;
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { html, css, LitElement } from 'lit';
|
|
2
|
+
import { html, css, LitElement, unsafeCSS } from 'lit';
|
|
3
3
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
4
4
|
import { customElement, property } from 'lit/decorators.js';
|
|
5
5
|
import { TextSize, TextVariant, colorText, colorTextDark, } from './enums/tuix-text.enums.js';
|
|
6
6
|
import { textStyles } from './TuixText.styles.js';
|
|
7
7
|
import { buttonSizeStyles } from '../tuix-button/TuixButton.styles.js';
|
|
8
|
+
import slottedClassName from '../utils/slottedClassName.js';
|
|
8
9
|
let TuixText = class TuixText extends LitElement {
|
|
9
10
|
constructor() {
|
|
10
11
|
super(...arguments);
|
|
11
12
|
this.size = TextSize.Body1;
|
|
13
|
+
this.color = TextVariant.PRIMARY;
|
|
12
14
|
this.dark = false;
|
|
13
15
|
}
|
|
14
16
|
_getTextColor() {
|
|
15
|
-
const defaultColor = this.dark
|
|
16
|
-
? TextVariant.SECONDARY
|
|
17
|
-
: TextVariant.PRIMARY;
|
|
18
17
|
const colorMap = this.dark ? colorTextDark : colorText;
|
|
19
|
-
return colorMap[this.color ||
|
|
18
|
+
return colorMap[this.color || TextVariant.PRIMARY];
|
|
20
19
|
}
|
|
21
20
|
render() {
|
|
22
21
|
return html ` <div
|
|
@@ -31,8 +30,10 @@ let TuixText = class TuixText extends LitElement {
|
|
|
31
30
|
};
|
|
32
31
|
TuixText.styles = [
|
|
33
32
|
css `
|
|
34
|
-
|
|
33
|
+
${unsafeCSS(slottedClassName('text'))} {
|
|
35
34
|
font-family: 'Rubik', sans-serif;
|
|
35
|
+
display: block;
|
|
36
|
+
margin: 0;
|
|
36
37
|
}
|
|
37
38
|
`,
|
|
38
39
|
textStyles,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TuixText.js","sourceRoot":"","sources":["../../../src/tuix-text/TuixText.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"TuixText.js","sourceRoot":"","sources":["../../../src/tuix-text/TuixText.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EACL,QAAQ,EACR,WAAW,EACX,SAAS,EACT,aAAa,GACd,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,gBAAgB,MAAM,8BAA8B,CAAC;AAG5D,IAAa,QAAQ,GAArB,MAAa,QAAS,SAAQ,UAAU;IAAxC;;QAEE,SAAI,GAAG,QAAQ,CAAC,KAAK,CAAC;QAGtB,UAAK,GAAI,WAAW,CAAC,OAAO,CAAC;QAG7B,SAAI,GAAG,KAAK,CAAC;IA6Bf,CAAC;IAfS,aAAa;QACnB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;QACvD,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;oBACK,IAAI,CAAC,IAAI;eACd,QAAQ,CAAC;YAChB,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE;SAC5B,CAAC;;;WAGG,CAAC;IACV,CAAC;;AA1BM,eAAM,GAAG;IACd,GAAG,CAAA;QACC,SAAS,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;;;;;KAKtC;IACD,UAAU;IACV,gBAAgB;CACjB,AAVY,CAUX;AAlBF;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;sCACP;AAGtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;uCACH;AAG7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sCAC9B;AARF,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAqCpB;SArCY,QAAQ","sourcesContent":["import { html, css, LitElement, unsafeCSS } from 'lit';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport {\n TextSize,\n TextVariant,\n colorText,\n colorTextDark,\n} from './enums/tuix-text.enums.js';\nimport { textStyles } from './TuixText.styles.js';\nimport { buttonSizeStyles } from '../tuix-button/TuixButton.styles.js';\nimport slottedClassName from '../utils/slottedClassName.js';\n\n@customElement('tuix-text')\nexport class TuixText extends LitElement {\n @property({ type: TextSize })\n size = TextSize.Body1;\n\n @property({ type: TextVariant })\n color? = TextVariant.PRIMARY;\n\n @property({ type: Boolean, reflect: true })\n dark = false;\n\n static styles = [\n css`\n ${unsafeCSS(slottedClassName('text'))} {\n font-family: 'Rubik', sans-serif;\n display: block;\n margin: 0;\n }\n `,\n textStyles,\n buttonSizeStyles,\n ];\n\n private _getTextColor() {\n const colorMap = this.dark ? colorTextDark : colorText;\n return colorMap[this.color || TextVariant.PRIMARY];\n }\n\n render() {\n return html` <div\n class=\"text ${this.size}\"\n style=\"${styleMap({\n color: this._getTextColor(),\n })}\"\n >\n <slot></slot>\n </div>`;\n }\n}\n"]}
|
|
@@ -1,86 +1,89 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
1
|
+
import { css, unsafeCSS } from 'lit';
|
|
2
2
|
import { ScreenSizes } from '../utils/screenSizes.enum';
|
|
3
|
+
import { TextSize } from './enums/tuix-text.enums';
|
|
4
|
+
import slottedClassName from '../utils/slottedClassName';
|
|
3
5
|
export const textStyles = css `
|
|
4
|
-
|
|
6
|
+
${unsafeCSS(`
|
|
7
|
+
${slottedClassName(TextSize.XL)} {
|
|
5
8
|
font-size: 4rem;
|
|
6
9
|
font-weight: 600;
|
|
7
10
|
line-height: 4.4rem;
|
|
8
11
|
}
|
|
9
12
|
|
|
10
|
-
.
|
|
13
|
+
${slottedClassName(TextSize.L)} {
|
|
11
14
|
font-size: 3.5rem;
|
|
12
15
|
font-weight: 600;
|
|
13
16
|
line-height: 4.2rem;
|
|
14
17
|
}
|
|
15
18
|
|
|
16
|
-
.
|
|
19
|
+
${slottedClassName(TextSize.M)} {
|
|
17
20
|
font-size: 2.25rem;
|
|
18
21
|
font-weight: 500;
|
|
19
22
|
line-height: 2.7rem;
|
|
20
23
|
}
|
|
21
24
|
|
|
22
|
-
.
|
|
25
|
+
${slottedClassName(TextSize.S)} {
|
|
23
26
|
font-size: 1.5rem;
|
|
24
27
|
font-weight: 500;
|
|
25
28
|
line-height: 1.8rem;
|
|
26
29
|
}
|
|
27
30
|
|
|
28
|
-
.
|
|
31
|
+
${slottedClassName(TextSize.XS)} {
|
|
29
32
|
font-size: 1.125rem;
|
|
30
33
|
font-weight: 500;
|
|
31
34
|
line-height: 1.35rem;
|
|
32
35
|
}
|
|
33
36
|
|
|
34
|
-
.
|
|
37
|
+
${slottedClassName(TextSize.Body1)} {
|
|
35
38
|
font-size: 1rem;
|
|
36
39
|
font-weight: 300;
|
|
37
40
|
line-height: 1.4rem;
|
|
38
41
|
}
|
|
39
42
|
|
|
40
|
-
.
|
|
43
|
+
${slottedClassName(TextSize.Body2)} {
|
|
41
44
|
font-size: 0.875rem;
|
|
42
45
|
font-weight: 300;
|
|
43
46
|
line-height: 1.225rem;
|
|
44
47
|
}
|
|
45
48
|
|
|
46
|
-
.
|
|
49
|
+
${slottedClassName(TextSize.Field1)} {
|
|
47
50
|
font-size: 1rem;
|
|
48
51
|
font-weight: 300;
|
|
49
52
|
line-height: 1.5rem;
|
|
50
53
|
}
|
|
51
54
|
|
|
52
|
-
.
|
|
55
|
+
${slottedClassName(TextSize.Field2)} {
|
|
53
56
|
font-size: 0.75rem;
|
|
54
57
|
font-weight: 300;
|
|
55
58
|
line-height: 1rem;
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
@media only screen and (max-width: ${ScreenSizes.TABLET}px) {
|
|
59
|
-
.
|
|
62
|
+
${slottedClassName(TextSize.Body1)} {
|
|
60
63
|
line-height: 1.3rem;
|
|
61
64
|
}
|
|
62
65
|
|
|
63
|
-
.
|
|
66
|
+
${slottedClassName(TextSize.Body2)} {
|
|
64
67
|
line-height: 1.1375rem;
|
|
65
68
|
}
|
|
66
69
|
|
|
67
|
-
.
|
|
70
|
+
${slottedClassName(TextSize.XL)} {
|
|
68
71
|
font-size: 3rem;
|
|
69
72
|
line-height: 3.3rem;
|
|
70
73
|
}
|
|
71
|
-
.
|
|
74
|
+
${slottedClassName(TextSize.L)} {
|
|
72
75
|
font-size: 2rem;
|
|
73
76
|
line-height: 2.4rem;
|
|
74
77
|
}
|
|
75
|
-
.
|
|
78
|
+
${slottedClassName(TextSize.M)} {
|
|
76
79
|
font-size: 1.5rem;
|
|
77
80
|
line-height: 1.8rem;
|
|
78
81
|
}
|
|
79
|
-
.
|
|
82
|
+
${slottedClassName(TextSize.S)} {
|
|
80
83
|
font-size: 1.125rem;
|
|
81
84
|
line-height: 1.35rem;
|
|
82
85
|
}
|
|
83
|
-
.
|
|
86
|
+
${slottedClassName(TextSize.XS)} {
|
|
84
87
|
font-size: 1rem;
|
|
85
88
|
line-height: 1.2rem;
|
|
86
89
|
font-weight: 400;
|
|
@@ -88,27 +91,28 @@ export const textStyles = css `
|
|
|
88
91
|
}
|
|
89
92
|
|
|
90
93
|
@media only screen and (max-width: ${ScreenSizes.MOBILE}px) {
|
|
91
|
-
.
|
|
94
|
+
${slottedClassName(TextSize.Body1)} {
|
|
92
95
|
font-size: 0.875rem;
|
|
93
96
|
font-weight: 300;
|
|
94
97
|
line-height: 1.1375rem;
|
|
95
98
|
}
|
|
96
|
-
.
|
|
99
|
+
${slottedClassName(TextSize.Body2)} {
|
|
97
100
|
font-size: 0.75rem;
|
|
98
101
|
line-height: 0.975rem;
|
|
99
102
|
}
|
|
100
|
-
.
|
|
103
|
+
${slottedClassName(TextSize.XL)} {
|
|
101
104
|
font-size: 1.5rem;
|
|
102
105
|
line-height: 1.8rem;
|
|
103
106
|
}
|
|
104
|
-
.
|
|
107
|
+
${slottedClassName(TextSize.L)} {
|
|
105
108
|
font-size: 1.375rem;
|
|
106
109
|
line-height: 1.65rem;
|
|
107
110
|
}
|
|
108
|
-
.
|
|
111
|
+
${slottedClassName(TextSize.M)} {
|
|
109
112
|
font-size: 1.25rem;
|
|
110
113
|
line-height: 1.5rem;
|
|
111
114
|
}
|
|
112
115
|
}
|
|
116
|
+
`)}
|
|
113
117
|
`;
|
|
114
118
|
//# sourceMappingURL=TuixText.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TuixText.styles.js","sourceRoot":"","sources":["../../../src/tuix-text/TuixText.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"TuixText.styles.js","sourceRoot":"","sources":["../../../src/tuix-text/TuixText.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AAEzD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;IACzB,SAAS,CAAC;IACV,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC;;;;;;IAM7B,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;;;;;;IAM5B,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;;;;;;IAM5B,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;;;;;;IAM5B,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC;;;;;;IAM7B,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC;;;;;;IAMhC,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC;;;;;;IAMhC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC;;;;;;IAMjC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC;;;;;;uCAME,WAAW,CAAC,MAAM;MACnD,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC;;;;MAIhC,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC;;;;MAIhC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC;;;;MAI7B,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;;;;MAI5B,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;;;;MAI5B,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;;;;MAI5B,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC;;;;;;;uCAOI,WAAW,CAAC,MAAM;MACnD,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC;;;;;MAKhC,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC;;;;MAIhC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC;;;;MAI7B,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;;;;MAI5B,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;;;;;CAKjC,CAAC;CACD,CAAC","sourcesContent":["import { css, unsafeCSS } from 'lit';\nimport { ScreenSizes } from '../utils/screenSizes.enum';\nimport { TextSize } from './enums/tuix-text.enums';\nimport slottedClassName from '../utils/slottedClassName';\n\nexport const textStyles = css`\n ${unsafeCSS(`\n ${slottedClassName(TextSize.XL)} {\n font-size: 4rem;\n font-weight: 600;\n line-height: 4.4rem;\n }\n\n ${slottedClassName(TextSize.L)} {\n font-size: 3.5rem;\n font-weight: 600;\n line-height: 4.2rem;\n }\n\n ${slottedClassName(TextSize.M)} {\n font-size: 2.25rem;\n font-weight: 500;\n line-height: 2.7rem;\n }\n\n ${slottedClassName(TextSize.S)} {\n font-size: 1.5rem;\n font-weight: 500;\n line-height: 1.8rem;\n }\n\n ${slottedClassName(TextSize.XS)} {\n font-size: 1.125rem;\n font-weight: 500;\n line-height: 1.35rem;\n }\n\n ${slottedClassName(TextSize.Body1)} {\n font-size: 1rem;\n font-weight: 300;\n line-height: 1.4rem;\n }\n\n ${slottedClassName(TextSize.Body2)} {\n font-size: 0.875rem;\n font-weight: 300;\n line-height: 1.225rem;\n }\n\n ${slottedClassName(TextSize.Field1)} {\n font-size: 1rem;\n font-weight: 300;\n line-height: 1.5rem;\n }\n\n ${slottedClassName(TextSize.Field2)} {\n font-size: 0.75rem;\n font-weight: 300;\n line-height: 1rem;\n }\n\n @media only screen and (max-width: ${ScreenSizes.TABLET}px) {\n ${slottedClassName(TextSize.Body1)} {\n line-height: 1.3rem;\n }\n\n ${slottedClassName(TextSize.Body2)} {\n line-height: 1.1375rem;\n }\n\n ${slottedClassName(TextSize.XL)} {\n font-size: 3rem;\n line-height: 3.3rem;\n }\n ${slottedClassName(TextSize.L)} {\n font-size: 2rem;\n line-height: 2.4rem;\n }\n ${slottedClassName(TextSize.M)} {\n font-size: 1.5rem;\n line-height: 1.8rem;\n }\n ${slottedClassName(TextSize.S)} {\n font-size: 1.125rem;\n line-height: 1.35rem;\n }\n ${slottedClassName(TextSize.XS)} {\n font-size: 1rem;\n line-height: 1.2rem;\n font-weight: 400;\n }\n }\n\n @media only screen and (max-width: ${ScreenSizes.MOBILE}px) {\n ${slottedClassName(TextSize.Body1)} {\n font-size: 0.875rem;\n font-weight: 300;\n line-height: 1.1375rem;\n }\n ${slottedClassName(TextSize.Body2)} {\n font-size: 0.75rem;\n line-height: 0.975rem;\n }\n ${slottedClassName(TextSize.XL)} {\n font-size: 1.5rem;\n line-height: 1.8rem;\n }\n ${slottedClassName(TextSize.L)} {\n font-size: 1.375rem;\n line-height: 1.65rem;\n }\n ${slottedClassName(TextSize.M)} {\n font-size: 1.25rem;\n line-height: 1.5rem;\n }\n }\n`)}\n`;\n"]}
|
|
@@ -13,12 +13,15 @@ export declare enum TextSize {
|
|
|
13
13
|
export declare enum TextVariant {
|
|
14
14
|
PRIMARY = "primary",
|
|
15
15
|
SECONDARY = "secondary",
|
|
16
|
+
MAIN = "main",
|
|
16
17
|
GREY = "grey",
|
|
17
18
|
LIGHT_GREY = "light_grey",
|
|
18
19
|
DISABLED = "disabled",
|
|
19
20
|
VALIDATION = "validation",
|
|
20
21
|
ERROR = "error",
|
|
21
|
-
SUCCESS = "success"
|
|
22
|
+
SUCCESS = "success",
|
|
23
|
+
LIGHT = "light",
|
|
24
|
+
DARK = "dark"
|
|
22
25
|
}
|
|
23
26
|
export declare const colorText: Record<TextVariant, string>;
|
|
24
27
|
export declare const colorTextDark: Record<TextVariant, string>;
|
|
@@ -17,14 +17,18 @@ export var TextVariant;
|
|
|
17
17
|
(function (TextVariant) {
|
|
18
18
|
TextVariant["PRIMARY"] = "primary";
|
|
19
19
|
TextVariant["SECONDARY"] = "secondary";
|
|
20
|
+
TextVariant["MAIN"] = "main";
|
|
20
21
|
TextVariant["GREY"] = "grey";
|
|
21
22
|
TextVariant["LIGHT_GREY"] = "light_grey";
|
|
22
23
|
TextVariant["DISABLED"] = "disabled";
|
|
23
24
|
TextVariant["VALIDATION"] = "validation";
|
|
24
25
|
TextVariant["ERROR"] = "error";
|
|
25
26
|
TextVariant["SUCCESS"] = "success";
|
|
27
|
+
TextVariant["LIGHT"] = "light";
|
|
28
|
+
TextVariant["DARK"] = "dark";
|
|
26
29
|
})(TextVariant || (TextVariant = {}));
|
|
27
30
|
export const colorText = {
|
|
31
|
+
[TextVariant.MAIN]: Palette.MAIN,
|
|
28
32
|
[TextVariant.PRIMARY]: Palette.BLACK,
|
|
29
33
|
[TextVariant.SECONDARY]: Palette.WHITE,
|
|
30
34
|
[TextVariant.GREY]: Palette.NEUTRAL_600,
|
|
@@ -33,11 +37,17 @@ export const colorText = {
|
|
|
33
37
|
[TextVariant.VALIDATION]: Palette.VALIDATION,
|
|
34
38
|
[TextVariant.ERROR]: Palette.ERROR,
|
|
35
39
|
[TextVariant.SUCCESS]: Palette.SUCCESS,
|
|
40
|
+
[TextVariant.LIGHT]: Palette.WHITE,
|
|
41
|
+
[TextVariant.DARK]: Palette.BLACK,
|
|
36
42
|
};
|
|
37
43
|
export const colorTextDark = {
|
|
38
44
|
...colorText,
|
|
45
|
+
[TextVariant.PRIMARY]: DarkPalette.WHITE,
|
|
46
|
+
[TextVariant.SECONDARY]: Palette.BLACK,
|
|
47
|
+
[TextVariant.GREY]: DarkPalette.NEUTRAL_600,
|
|
39
48
|
[TextVariant.VALIDATION]: DarkPalette.VALIDATION,
|
|
40
49
|
[TextVariant.ERROR]: DarkPalette.ERROR,
|
|
41
50
|
[TextVariant.SUCCESS]: DarkPalette.SUCCESS,
|
|
51
|
+
[TextVariant.LIGHT]: DarkPalette.WHITE,
|
|
42
52
|
};
|
|
43
53
|
//# sourceMappingURL=tuix-text.enums.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tuix-text.enums.js","sourceRoot":"","sources":["../../../../src/tuix-text/enums/tuix-text.enums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGrD,MAAM,CAAN,IAAY,QAWX;AAXD,WAAY,QAAQ;IAClB,qBAAS,CAAA;IACT,mBAAO,CAAA;IACP,mBAAO,CAAA;IACP,mBAAO,CAAA;IACP,qBAAS,CAAA;IACT,2BAAe,CAAA;IACf,2BAAe,CAAA;IACf,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;AACnB,CAAC,EAXW,QAAQ,KAAR,QAAQ,QAWnB;AAED,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"tuix-text.enums.js","sourceRoot":"","sources":["../../../../src/tuix-text/enums/tuix-text.enums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGrD,MAAM,CAAN,IAAY,QAWX;AAXD,WAAY,QAAQ;IAClB,qBAAS,CAAA;IACT,mBAAO,CAAA;IACP,mBAAO,CAAA;IACP,mBAAO,CAAA;IACP,qBAAS,CAAA;IACT,2BAAe,CAAA;IACf,2BAAe,CAAA;IACf,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;AACnB,CAAC,EAXW,QAAQ,KAAR,QAAQ,QAWnB;AAED,MAAM,CAAN,IAAY,WAYX;AAZD,WAAY,WAAW;IACrB,kCAA6B,CAAA;IAC7B,sCAAiC,CAAA;IACjC,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,wCAAyB,CAAA;IACzB,oCAAqB,CAAA;IACrB,wCAAyB,CAAA;IACzB,8BAAe,CAAA;IACf,kCAAmB,CAAA;IACnB,8BAAe,CAAA;IACf,4BAAa,CAAA;AACf,CAAC,EAZW,WAAW,KAAX,WAAW,QAYtB;AAED,MAAM,CAAC,MAAM,SAAS,GAAgC;IACpD,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,IAAI;IAChC,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,KAAK;IACpC,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,KAAK;IACtC,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW;IACvC,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,WAAW;IAC7C,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,WAAW;IAC3C,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU;IAC5C,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK;IAClC,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,OAAO;IACtC,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK;IAClC,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK;CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAgC;IACxD,GAAG,SAAS;IACZ,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,KAAK;IACxC,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,KAAK;IACtC,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,WAAW;IAC3C,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC,UAAU;IAChD,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK;IACtC,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,OAAO;IAC1C,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK;CACvC,CAAC","sourcesContent":["import { Palette } from '../../utils/colors';\nimport { DarkPalette } from '../../utils/darkColors';\nimport { MainVariant } from '../../utils/mainVariant.enum';\n\nexport enum TextSize {\n XL = 'xl',\n L = 'l',\n M = 'm',\n S = 's',\n XS = 'xs',\n Body1 = 'body1',\n Body2 = 'body2',\n Button = 'button',\n Field1 = 'field1',\n Field2 = 'field2',\n}\n\nexport enum TextVariant {\n PRIMARY = MainVariant.PRIMARY,\n SECONDARY = MainVariant.SECONDARY,\n MAIN = 'main',\n GREY = 'grey',\n LIGHT_GREY = 'light_grey',\n DISABLED = 'disabled',\n VALIDATION = 'validation',\n ERROR = 'error',\n SUCCESS = 'success',\n LIGHT = 'light',\n DARK = 'dark',\n}\n\nexport const colorText: Record<TextVariant, string> = {\n [TextVariant.MAIN]: Palette.MAIN,\n [TextVariant.PRIMARY]: Palette.BLACK,\n [TextVariant.SECONDARY]: Palette.WHITE,\n [TextVariant.GREY]: Palette.NEUTRAL_600,\n [TextVariant.LIGHT_GREY]: Palette.NEUTRAL_200,\n [TextVariant.DISABLED]: Palette.PRIMARY_200,\n [TextVariant.VALIDATION]: Palette.VALIDATION,\n [TextVariant.ERROR]: Palette.ERROR,\n [TextVariant.SUCCESS]: Palette.SUCCESS,\n [TextVariant.LIGHT]: Palette.WHITE,\n [TextVariant.DARK]: Palette.BLACK,\n};\n\nexport const colorTextDark: Record<TextVariant, string> = {\n ...colorText,\n [TextVariant.PRIMARY]: DarkPalette.WHITE,\n [TextVariant.SECONDARY]: Palette.BLACK,\n [TextVariant.GREY]: DarkPalette.NEUTRAL_600,\n [TextVariant.VALIDATION]: DarkPalette.VALIDATION,\n [TextVariant.ERROR]: DarkPalette.ERROR,\n [TextVariant.SUCCESS]: DarkPalette.SUCCESS,\n [TextVariant.LIGHT]: DarkPalette.WHITE,\n};\n"]}
|
package/dist/src/utils/colors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../../src/utils/colors.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../../src/utils/colors.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,OAwBX;AAxBD,WAAY,OAAO;IACjB,iCAAsB,CAAA;IACtB,kCAAuB,CAAA;IACvB,kCAAuB,CAAA;IACvB,kCAAuB,CAAA;IACvB,2BAAgB,CAAA;IAChB,kCAAuB,CAAA;IACvB,kCAAuB,CAAA;IACvB,kCAAuB,CAAA;IACvB,kCAAuB,CAAA;IACvB,kCAAuB,CAAA;IACvB,gCAAqB,CAAA;IACrB,4BAAiB,CAAA;IACjB,4BAAiB,CAAA;IACjB,kCAAuB,CAAA;IACvB,kCAAuB,CAAA;IACvB,8BAAmB,CAAA;IACnB,iCAAsB,CAAA;IACtB,oCAAyB,CAAA;IACzB,qCAA0B,CAAA;IAC1B,4BAAiB,CAAA;IACjB,+BAAoB,CAAA;IACpB,gCAAqB,CAAA;IACrB,iCAAsB,CAAA;AACxB,CAAC,EAxBW,OAAO,KAAP,OAAO,QAwBlB","sourcesContent":["export enum Palette {\n PRIMARY_50 = '#F5F5FA',\n PRIMARY_100 = '#EBEAF4',\n PRIMARY_200 = '#D1D1E6',\n PRIMARY_300 = '#A8A9D1',\n MAIN = '#585A9D',\n PRIMARY_600 = '#454584',\n PRIMARY_700 = '#3A396B',\n PRIMARY_800 = '#32325A',\n PRIMARY_900 = '#2E2D4D',\n PRIMARY_950 = '#1F1E33',\n SECONDARY = '#BBADFF',\n WHITE = '#FFFFFF',\n BLACK = '#121212',\n NEUTRAL_200 = '#C9C8D3',\n NEUTRAL_600 = '#8A8894',\n SUCCESS = '#439F6E',\n VALIDATION = '#FFB82E',\n VALIDATION_50 = '#FFFBF4',\n VALIDATION_200 = '#FFEAC1',\n ERROR = '#F93232',\n ERROR_50 = '#FFF5F5',\n ERROR_200 = '#FFD8D8',\n SECTION_BG = '#FAFAFA',\n}\n"]}
|
|
@@ -10,15 +10,16 @@ export declare enum DarkPalette {
|
|
|
10
10
|
PRIMARY_900 = "#2E2D4D",
|
|
11
11
|
PRIMARY_950 = "#1F1E33",
|
|
12
12
|
SECONDARY = "#BBADFF",
|
|
13
|
-
WHITE = "
|
|
13
|
+
WHITE = "rgba(255, 255, 255, 0.87)",
|
|
14
14
|
BLACK = "#1A1A1F",
|
|
15
15
|
NEUTRAL_200 = "#C9C8D3",
|
|
16
|
-
NEUTRAL_600 = "
|
|
16
|
+
NEUTRAL_600 = "rgba(255, 255, 255, 0.60)",
|
|
17
17
|
SUCCESS = "#82C5A9",
|
|
18
18
|
VALIDATION = "#FFD489",
|
|
19
19
|
VALIDATION_50 = "#FFFBF4",
|
|
20
20
|
VALIDATION_200 = "#FFEAC1",
|
|
21
21
|
ERROR = "#FF8486",
|
|
22
22
|
ERROR_50 = "#FFF5F5",
|
|
23
|
-
ERROR_200 = "#FFD8D8"
|
|
23
|
+
ERROR_200 = "#FFD8D8",
|
|
24
|
+
SECTION_BG = "#0E0E0E"
|
|
24
25
|
}
|
|
@@ -11,10 +11,10 @@ export var DarkPalette;
|
|
|
11
11
|
DarkPalette["PRIMARY_900"] = "#2E2D4D";
|
|
12
12
|
DarkPalette["PRIMARY_950"] = "#1F1E33";
|
|
13
13
|
DarkPalette["SECONDARY"] = "#BBADFF";
|
|
14
|
-
DarkPalette["WHITE"] = "
|
|
14
|
+
DarkPalette["WHITE"] = "rgba(255, 255, 255, 0.87)";
|
|
15
15
|
DarkPalette["BLACK"] = "#1A1A1F";
|
|
16
16
|
DarkPalette["NEUTRAL_200"] = "#C9C8D3";
|
|
17
|
-
DarkPalette["NEUTRAL_600"] = "
|
|
17
|
+
DarkPalette["NEUTRAL_600"] = "rgba(255, 255, 255, 0.60)";
|
|
18
18
|
DarkPalette["SUCCESS"] = "#82C5A9";
|
|
19
19
|
DarkPalette["VALIDATION"] = "#FFD489";
|
|
20
20
|
DarkPalette["VALIDATION_50"] = "#FFFBF4";
|
|
@@ -22,5 +22,6 @@ export var DarkPalette;
|
|
|
22
22
|
DarkPalette["ERROR"] = "#FF8486";
|
|
23
23
|
DarkPalette["ERROR_50"] = "#FFF5F5";
|
|
24
24
|
DarkPalette["ERROR_200"] = "#FFD8D8";
|
|
25
|
+
DarkPalette["SECTION_BG"] = "#0E0E0E";
|
|
25
26
|
})(DarkPalette || (DarkPalette = {}));
|
|
26
27
|
//# sourceMappingURL=darkColors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"darkColors.js","sourceRoot":"","sources":["../../../src/utils/darkColors.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"darkColors.js","sourceRoot":"","sources":["../../../src/utils/darkColors.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,WAwBX;AAxBD,WAAY,WAAW;IACrB,qCAA+B,CAAA;IAC/B,sCAAiC,CAAA;IACjC,sCAAiC,CAAA;IACjC,sCAAiC,CAAA;IACjC,+BAAgB,CAAA;IAChB,sCAAiC,CAAA;IACjC,sCAAiC,CAAA;IACjC,sCAAiC,CAAA;IACjC,sCAAiC,CAAA;IACjC,sCAAiC,CAAA;IACjC,oCAA6B,CAAA;IAC7B,kDAAmC,CAAA;IACnC,gCAAiB,CAAA;IACjB,sCAAiC,CAAA;IACjC,wDAAyC,CAAA;IACzC,kCAAmB,CAAA;IACnB,qCAAsB,CAAA;IACtB,wCAAyB,CAAA;IACzB,yCAA0B,CAAA;IAC1B,gCAAiB,CAAA;IACjB,mCAA2B,CAAA;IAC3B,oCAA6B,CAAA;IAC7B,qCAAsB,CAAA;AACxB,CAAC,EAxBW,WAAW,KAAX,WAAW,QAwBtB","sourcesContent":["import { Palette } from './colors';\n\nexport enum DarkPalette {\n PRIMARY_50 = Palette.PRIMARY_50,\n PRIMARY_100 = Palette.PRIMARY_100,\n PRIMARY_200 = Palette.PRIMARY_200,\n PRIMARY_300 = Palette.PRIMARY_300,\n MAIN = '#7A7CB6',\n PRIMARY_600 = Palette.PRIMARY_600,\n PRIMARY_700 = Palette.PRIMARY_700,\n PRIMARY_800 = Palette.PRIMARY_800,\n PRIMARY_900 = Palette.PRIMARY_900,\n PRIMARY_950 = Palette.PRIMARY_950,\n SECONDARY = Palette.SECONDARY,\n WHITE = 'rgba(255, 255, 255, 0.87)',\n BLACK = '#1A1A1F',\n NEUTRAL_200 = Palette.NEUTRAL_200,\n NEUTRAL_600 = 'rgba(255, 255, 255, 0.60)',\n SUCCESS = '#82C5A9',\n VALIDATION = '#FFD489',\n VALIDATION_50 = '#FFFBF4',\n VALIDATION_200 = '#FFEAC1',\n ERROR = '#FF8486',\n ERROR_50 = Palette.ERROR_50,\n ERROR_200 = Palette.ERROR_200,\n SECTION_BG = '#0E0E0E',\n}\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
// Sizes in px
|
|
2
1
|
export var ScreenSizes;
|
|
3
2
|
(function (ScreenSizes) {
|
|
4
|
-
ScreenSizes[ScreenSizes["TABLET"] =
|
|
5
|
-
ScreenSizes[ScreenSizes["MOBILE"] =
|
|
3
|
+
ScreenSizes[ScreenSizes["TABLET"] = 1280] = "TABLET";
|
|
4
|
+
ScreenSizes[ScreenSizes["MOBILE"] = 640] = "MOBILE";
|
|
6
5
|
})(ScreenSizes || (ScreenSizes = {}));
|
|
7
6
|
//# sourceMappingURL=screenSizes.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenSizes.enum.js","sourceRoot":"","sources":["../../../src/utils/screenSizes.enum.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"screenSizes.enum.js","sourceRoot":"","sources":["../../../src/utils/screenSizes.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,oDAAa,CAAA;IACb,mDAAY,CAAA;AACd,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB","sourcesContent":["export enum ScreenSizes {\n TABLET = 1280,\n MOBILE = 640,\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slottedClassName.js","sourceRoot":"","sources":["../../../src/utils/slottedClassName.ts"],"names":[],"mappings":"AAAA,eAAe,CAAC,SAAiB,EAAE,EAAE,CACnC,IAAI,SAAS,MAAM,SAAS,eAAe,CAAC","sourcesContent":["export default (className: string) =>\n `.${className}, .${className} ::slotted(*)`;\n"]}
|