tuix-webcomponents 0.0.21 → 0.0.22
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/README.md +29 -5
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.js +7 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/tuix-button/TuixButton.d.ts +17 -0
- package/dist/src/tuix-button/TuixButton.js +108 -0
- package/dist/src/tuix-button/TuixButton.js.map +1 -0
- package/dist/src/tuix-button/TuixButton.styles.d.ts +2 -0
- package/dist/src/tuix-button/TuixButton.styles.js +74 -0
- package/dist/src/tuix-button/TuixButton.styles.js.map +1 -0
- package/dist/src/tuix-button/enums/tuix-button.enums.d.ts +2 -0
- package/dist/src/tuix-button/enums/tuix-button.enums.js +7 -0
- package/dist/src/tuix-button/enums/tuix-button.enums.js.map +1 -0
- package/dist/src/tuix-dropdown/TuixDropdown.d.ts +46 -0
- package/dist/src/tuix-dropdown/TuixDropdown.js +275 -0
- package/dist/src/tuix-dropdown/TuixDropdown.js.map +1 -0
- package/dist/src/tuix-dropdown/TuixDropdown.styles.d.ts +3 -0
- package/dist/src/tuix-dropdown/TuixDropdown.styles.js +85 -0
- package/dist/src/tuix-dropdown/TuixDropdown.styles.js.map +1 -0
- package/dist/src/tuix-dropdown/enums/tuix-dropdown.enums.d.ts +10 -0
- package/dist/src/tuix-dropdown/enums/tuix-dropdown.enums.js +13 -0
- package/dist/src/tuix-dropdown/enums/tuix-dropdown.enums.js.map +1 -0
- package/dist/src/tuix-dropdown/interfaces/tuix-dropdown.interface.d.ts +1 -0
- package/dist/src/tuix-dropdown/interfaces/tuix-dropdown.interface.js +2 -0
- package/dist/src/tuix-dropdown/interfaces/tuix-dropdown.interface.js.map +1 -0
- package/dist/src/tuix-icon/TuixIcon.d.ts +11 -0
- package/dist/src/tuix-icon/TuixIcon.icons.d.ts +6 -0
- package/dist/src/tuix-icon/TuixIcon.icons.js +103 -0
- package/dist/src/tuix-icon/TuixIcon.icons.js.map +1 -0
- package/dist/src/tuix-icon/TuixIcon.js +65 -0
- package/dist/src/tuix-icon/TuixIcon.js.map +1 -0
- package/dist/src/tuix-icon/enums/tuix-icon.enums.d.ts +43 -0
- package/dist/src/tuix-icon/enums/tuix-icon.enums.js +52 -0
- package/dist/src/tuix-icon/enums/tuix-icon.enums.js.map +1 -0
- package/dist/src/tuix-icon-button/TuixIconButton.d.ts +14 -0
- package/dist/src/tuix-icon-button/TuixIconButton.js +80 -0
- package/dist/src/tuix-icon-button/TuixIconButton.js.map +1 -0
- package/dist/src/tuix-input/TuixInput.d.ts +46 -0
- package/dist/src/tuix-input/TuixInput.js +327 -0
- package/dist/src/tuix-input/TuixInput.js.map +1 -0
- package/dist/src/tuix-input/TuixInput.styles.d.ts +8 -0
- package/dist/src/tuix-input/TuixInput.styles.js +307 -0
- package/dist/src/tuix-input/TuixInput.styles.js.map +1 -0
- package/dist/src/tuix-input/enums/tuix-input.enums.d.ts +36 -0
- package/dist/src/tuix-input/enums/tuix-input.enums.js +42 -0
- package/dist/src/tuix-input/enums/tuix-input.enums.js.map +1 -0
- package/dist/src/tuix-input/interfaces/tuix-input.interface.d.ts +13 -0
- package/dist/src/tuix-input/interfaces/tuix-input.interface.js +2 -0
- package/dist/src/tuix-input/interfaces/tuix-input.interface.js.map +1 -0
- package/dist/src/tuix-link/TuixLink.d.ts +11 -0
- package/dist/src/tuix-link/TuixLink.js +72 -0
- package/dist/src/tuix-link/TuixLink.js.map +1 -0
- package/dist/src/tuix-link/enums/linkTarget.enum.d.ts +6 -0
- package/dist/src/tuix-link/enums/linkTarget.enum.js +8 -0
- package/dist/src/tuix-link/enums/linkTarget.enum.js.map +1 -0
- package/dist/src/tuix-paper/TuixPaper.d.ts +7 -0
- package/dist/src/tuix-paper/TuixPaper.js +40 -0
- package/dist/src/tuix-paper/TuixPaper.js.map +1 -0
- package/dist/src/tuix-paper/enums/tuix-paper.enum.d.ts +7 -0
- package/dist/src/tuix-paper/enums/tuix-paper.enum.js +9 -0
- package/dist/src/tuix-paper/enums/tuix-paper.enum.js.map +1 -0
- package/dist/src/tuix-text/TuixText.d.ts +3 -4
- package/dist/src/tuix-text/TuixText.js +10 -128
- package/dist/src/tuix-text/TuixText.js.map +1 -1
- package/dist/src/tuix-text/TuixText.styles.d.ts +1 -0
- package/dist/src/tuix-text/TuixText.styles.js +114 -0
- package/dist/src/tuix-text/TuixText.styles.js.map +1 -0
- package/dist/src/{enums → tuix-text/enums}/tuix-text.enums.d.ts +6 -8
- package/dist/src/{enums → tuix-text/enums}/tuix-text.enums.js +5 -9
- package/dist/src/tuix-text/enums/tuix-text.enums.js.map +1 -0
- package/dist/src/utils/colors.d.ts +12 -10
- package/dist/src/utils/colors.js +42 -7
- package/dist/src/utils/colors.js.map +1 -1
- package/dist/src/utils/darkColors.d.ts +1 -0
- package/dist/src/utils/darkColors.js +11 -0
- package/dist/src/utils/darkColors.js.map +1 -0
- package/dist/src/utils/hex-rgb.d.ts +5 -0
- package/dist/src/utils/hex-rgb.js +16 -0
- package/dist/src/utils/hex-rgb.js.map +1 -0
- package/dist/src/utils/mainVariant.enum.d.ts +4 -0
- package/dist/src/utils/mainVariant.enum.js +6 -0
- package/dist/src/utils/mainVariant.enum.js.map +1 -0
- package/dist/src/utils/screenSizes.enum.d.ts +4 -0
- package/dist/src/utils/screenSizes.enum.js +7 -0
- package/dist/src/utils/screenSizes.enum.js.map +1 -0
- package/dist/tsconfig.publish.tsbuildinfo +1 -1
- package/package.json +18 -7
- package/dist/src/enums/tuix-text.enums.js.map +0 -1
|
@@ -2,17 +2,16 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { html, css, LitElement } from 'lit';
|
|
3
3
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
4
4
|
import { customElement, property } from 'lit/decorators.js';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { TextSize } from './enums/tuix-text.enums.js';
|
|
6
|
+
import { textStyles } from './TuixText.styles.js';
|
|
7
|
+
import { TextVariant, colorText } from '../utils/colors.js';
|
|
8
|
+
import { buttonSizeStyles } from '../tuix-button/TuixButton.styles.js';
|
|
7
9
|
let TuixText = class TuixText extends LitElement {
|
|
8
|
-
getTextClass() {
|
|
9
|
-
return `${this.type} ${this.size}`;
|
|
10
|
-
}
|
|
11
10
|
render() {
|
|
12
11
|
return html ` <div
|
|
13
|
-
class="text ${this.
|
|
12
|
+
class="text ${this.size}"
|
|
14
13
|
style="${styleMap({
|
|
15
|
-
color:
|
|
14
|
+
color: colorText[this.color || TextVariant.PRIMARY],
|
|
16
15
|
})}"
|
|
17
16
|
>
|
|
18
17
|
<slot></slot>
|
|
@@ -24,133 +23,16 @@ TuixText.styles = [
|
|
|
24
23
|
.text {
|
|
25
24
|
font-family: 'Rubik', sans-serif;
|
|
26
25
|
}
|
|
27
|
-
|
|
28
|
-
.text.headline.xl {
|
|
29
|
-
font-size: 4rem;
|
|
30
|
-
font-weight: 600;
|
|
31
|
-
line-height: 4.4rem;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.text.headline.l {
|
|
35
|
-
font-size: 3.5rem;
|
|
36
|
-
font-weight: 600;
|
|
37
|
-
line-height: 4.2rem;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.text.headline.m {
|
|
41
|
-
font-size: 2.25rem;
|
|
42
|
-
font-weight: 500;
|
|
43
|
-
line-height: 2.7rem;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.text.headline.s {
|
|
47
|
-
font-size: 1.5rem;
|
|
48
|
-
font-weight: 500;
|
|
49
|
-
line-height: 1.8rem;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.text.headline.xs {
|
|
53
|
-
font-size: 1.125rem;
|
|
54
|
-
font-weight: 500;
|
|
55
|
-
line-height: 1.35;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.text.body.m {
|
|
59
|
-
font-size: 1rem;
|
|
60
|
-
font-weight: 300;
|
|
61
|
-
line-height: 1.4rem;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.text.body.s {
|
|
65
|
-
font-size: 0.875rem;
|
|
66
|
-
font-weight: 300;
|
|
67
|
-
line-height: 1.225rem;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.text.button_link.xl {
|
|
71
|
-
font-size: 1.25rem;
|
|
72
|
-
font-weight: 400;
|
|
73
|
-
line-height: 1.5rem;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.text.button_link.l {
|
|
77
|
-
font-size: 1.25rem;
|
|
78
|
-
font-weight: 400;
|
|
79
|
-
line-height: 1.5rem;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
@media only screen and (max-width: 40rem) {
|
|
83
|
-
.text.button_link.m {
|
|
84
|
-
font-size: 1rem;
|
|
85
|
-
font-weight: 400;
|
|
86
|
-
line-height: 1.25rem;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.text.body.m {
|
|
90
|
-
line-height: 1.3rem;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.text.body.s {
|
|
94
|
-
line-height: 1.1375rem;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.text.headline.xl {
|
|
98
|
-
font-size: 3rem;
|
|
99
|
-
line-height: 3.3rem;
|
|
100
|
-
}
|
|
101
|
-
.text.headline.l {
|
|
102
|
-
font-size: 2rem;
|
|
103
|
-
line-height: 2.4rem;
|
|
104
|
-
}
|
|
105
|
-
.text.headline.m {
|
|
106
|
-
font-size: 1.5rem;
|
|
107
|
-
line-height: 1.8rem;
|
|
108
|
-
}
|
|
109
|
-
.text.headline.s {
|
|
110
|
-
font-size: 1.125rem;
|
|
111
|
-
line-height: 1.35rem;
|
|
112
|
-
}
|
|
113
|
-
.text.headline.xs {
|
|
114
|
-
font-size: 1rem;
|
|
115
|
-
line-height: 1.2rem;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
@media only screen and (max-width: 20rem) {
|
|
120
|
-
.text.button_link.s {
|
|
121
|
-
font-size: 0.875rem;
|
|
122
|
-
font-weight: 400;
|
|
123
|
-
line-height: 1rem;
|
|
124
|
-
}
|
|
125
|
-
.text.button_link.xs {
|
|
126
|
-
font-size: 0.875rem;
|
|
127
|
-
font-weight: 400;
|
|
128
|
-
line-height: 1rem;
|
|
129
|
-
}
|
|
130
|
-
.text.headline.xl {
|
|
131
|
-
font-size: 1.5rem;
|
|
132
|
-
line-height: 1.8rem;
|
|
133
|
-
}
|
|
134
|
-
.text.headline.l {
|
|
135
|
-
font-size: 1.375rem;
|
|
136
|
-
line-height: 1.65rem;
|
|
137
|
-
}
|
|
138
|
-
.text.headline.m {
|
|
139
|
-
font-size: 1.25rem;
|
|
140
|
-
line-height: 1.5rem;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
26
|
`,
|
|
27
|
+
textStyles,
|
|
28
|
+
buttonSizeStyles,
|
|
144
29
|
];
|
|
145
30
|
__decorate([
|
|
146
|
-
property({ type:
|
|
31
|
+
property({ type: TextSize })
|
|
147
32
|
], TuixText.prototype, "size", void 0);
|
|
148
33
|
__decorate([
|
|
149
|
-
property({ type:
|
|
34
|
+
property({ type: TextVariant })
|
|
150
35
|
], TuixText.prototype, "color", void 0);
|
|
151
|
-
__decorate([
|
|
152
|
-
property({ type: TextType })
|
|
153
|
-
], TuixText.prototype, "type", void 0);
|
|
154
36
|
TuixText = __decorate([
|
|
155
37
|
customElement('tuix-text')
|
|
156
38
|
], TuixText);
|
|
@@ -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;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,
|
|
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;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAGvE,IAAa,QAAQ,GAArB,MAAa,QAAS,SAAQ,UAAU;IAiBtC,MAAM;QACJ,OAAO,IAAI,CAAA;oBACK,IAAI,CAAC,IAAI;eACd,QAAQ,CAAC;YAChB,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,KAAK,IAAI,WAAW,CAAC,OAAO,CAAC;SACpD,CAAC;;;WAGG,CAAC;IACV,CAAC;;AAnBM,eAAM,GAAG;IACd,GAAG,CAAA;;;;KAIF;IACD,UAAU;IACV,gBAAgB;CACjB,AARY,CAQX;AAbF;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;sCACb;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;uCACJ;AALjB,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CA2BpB;SA3BY,QAAQ","sourcesContent":["import { html, css, LitElement } from 'lit';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport { TextSize } from './enums/tuix-text.enums.js';\nimport { textStyles } from './TuixText.styles.js';\nimport { TextVariant, colorText } from '../utils/colors.js';\nimport { buttonSizeStyles } from '../tuix-button/TuixButton.styles.js';\n\n@customElement('tuix-text')\nexport class TuixText extends LitElement {\n @property({ type: TextSize })\n size?: TextSize;\n\n @property({ type: TextVariant })\n color?: TextVariant.PRIMARY;\n\n static styles = [\n css`\n .text {\n font-family: 'Rubik', sans-serif;\n }\n `,\n textStyles,\n buttonSizeStyles,\n ];\n\n render() {\n return html` <div\n class=\"text ${this.size}\"\n style=\"${styleMap({\n color: colorText[this.color || TextVariant.PRIMARY],\n })}\"\n >\n <slot></slot>\n </div>`;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const textStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
import { ScreenSizes } from '../utils/screenSizes.enum';
|
|
3
|
+
export const textStyles = css `
|
|
4
|
+
.xl {
|
|
5
|
+
font-size: 4rem;
|
|
6
|
+
font-weight: 600;
|
|
7
|
+
line-height: 4.4rem;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.l {
|
|
11
|
+
font-size: 3.5rem;
|
|
12
|
+
font-weight: 600;
|
|
13
|
+
line-height: 4.2rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.m {
|
|
17
|
+
font-size: 2.25rem;
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
line-height: 2.7rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.s {
|
|
23
|
+
font-size: 1.5rem;
|
|
24
|
+
font-weight: 500;
|
|
25
|
+
line-height: 1.8rem;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.xs {
|
|
29
|
+
font-size: 1.125rem;
|
|
30
|
+
font-weight: 500;
|
|
31
|
+
line-height: 1.35rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.body1 {
|
|
35
|
+
font-size: 1rem;
|
|
36
|
+
font-weight: 300;
|
|
37
|
+
line-height: 1.4rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.body2 {
|
|
41
|
+
font-size: 0.875rem;
|
|
42
|
+
font-weight: 300;
|
|
43
|
+
line-height: 1.225rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.field1 {
|
|
47
|
+
font-size: 1rem;
|
|
48
|
+
font-weight: 300;
|
|
49
|
+
line-height: 1.5rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.field2 {
|
|
53
|
+
font-size: 0.75rem;
|
|
54
|
+
font-weight: 300;
|
|
55
|
+
line-height: 1rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@media only screen and (max-width: ${ScreenSizes.TABLET}px) {
|
|
59
|
+
.body1 {
|
|
60
|
+
line-height: 1.3rem;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.body2 {
|
|
64
|
+
line-height: 1.1375rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.xl {
|
|
68
|
+
font-size: 3rem;
|
|
69
|
+
line-height: 3.3rem;
|
|
70
|
+
}
|
|
71
|
+
.l {
|
|
72
|
+
font-size: 2rem;
|
|
73
|
+
line-height: 2.4rem;
|
|
74
|
+
}
|
|
75
|
+
.m {
|
|
76
|
+
font-size: 1.5rem;
|
|
77
|
+
line-height: 1.8rem;
|
|
78
|
+
}
|
|
79
|
+
.s {
|
|
80
|
+
font-size: 1.125rem;
|
|
81
|
+
line-height: 1.35rem;
|
|
82
|
+
}
|
|
83
|
+
.xs {
|
|
84
|
+
font-size: 1rem;
|
|
85
|
+
line-height: 1.2rem;
|
|
86
|
+
font-weight: 400;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@media only screen and (max-width: ${ScreenSizes.MOBILE}px) {
|
|
91
|
+
.body1 {
|
|
92
|
+
font-size: 0.875rem;
|
|
93
|
+
font-weight: 300;
|
|
94
|
+
line-height: 1.1375rem;
|
|
95
|
+
}
|
|
96
|
+
.body2 {
|
|
97
|
+
font-size: 0.75rem;
|
|
98
|
+
line-height: 0.975rem;
|
|
99
|
+
}
|
|
100
|
+
.xl {
|
|
101
|
+
font-size: 1.5rem;
|
|
102
|
+
line-height: 1.8rem;
|
|
103
|
+
}
|
|
104
|
+
.l {
|
|
105
|
+
font-size: 1.375rem;
|
|
106
|
+
line-height: 1.65rem;
|
|
107
|
+
}
|
|
108
|
+
.m {
|
|
109
|
+
font-size: 1.25rem;
|
|
110
|
+
line-height: 1.5rem;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
`;
|
|
114
|
+
//# sourceMappingURL=TuixText.styles.js.map
|
|
@@ -0,0 +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;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAuDU,WAAW,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAgClB,WAAW,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;CAuBxD,CAAC","sourcesContent":["import { css } from 'lit';\nimport { ScreenSizes } from '../utils/screenSizes.enum';\n\nexport const textStyles = css`\n .xl {\n font-size: 4rem;\n font-weight: 600;\n line-height: 4.4rem;\n }\n\n .l {\n font-size: 3.5rem;\n font-weight: 600;\n line-height: 4.2rem;\n }\n\n .m {\n font-size: 2.25rem;\n font-weight: 500;\n line-height: 2.7rem;\n }\n\n .s {\n font-size: 1.5rem;\n font-weight: 500;\n line-height: 1.8rem;\n }\n\n .xs {\n font-size: 1.125rem;\n font-weight: 500;\n line-height: 1.35rem;\n }\n\n .body1 {\n font-size: 1rem;\n font-weight: 300;\n line-height: 1.4rem;\n }\n\n .body2 {\n font-size: 0.875rem;\n font-weight: 300;\n line-height: 1.225rem;\n }\n\n .field1 {\n font-size: 1rem;\n font-weight: 300;\n line-height: 1.5rem;\n }\n\n .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 .body1 {\n line-height: 1.3rem;\n }\n\n .body2 {\n line-height: 1.1375rem;\n }\n\n .xl {\n font-size: 3rem;\n line-height: 3.3rem;\n }\n .l {\n font-size: 2rem;\n line-height: 2.4rem;\n }\n .m {\n font-size: 1.5rem;\n line-height: 1.8rem;\n }\n .s {\n font-size: 1.125rem;\n line-height: 1.35rem;\n }\n .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 .body1 {\n font-size: 0.875rem;\n font-weight: 300;\n line-height: 1.1375rem;\n }\n .body2 {\n font-size: 0.75rem;\n line-height: 0.975rem;\n }\n .xl {\n font-size: 1.5rem;\n line-height: 1.8rem;\n }\n .l {\n font-size: 1.375rem;\n line-height: 1.65rem;\n }\n .m {\n font-size: 1.25rem;\n line-height: 1.5rem;\n }\n }\n`;\n"]}
|
|
@@ -3,7 +3,12 @@ export declare enum TextSize {
|
|
|
3
3
|
L = "l",
|
|
4
4
|
M = "m",
|
|
5
5
|
S = "s",
|
|
6
|
-
XS = "xs"
|
|
6
|
+
XS = "xs",
|
|
7
|
+
Body1 = "body1",
|
|
8
|
+
Body2 = "body2",
|
|
9
|
+
Button = "button",
|
|
10
|
+
Field1 = "field1",
|
|
11
|
+
Field2 = "field2"
|
|
7
12
|
}
|
|
8
13
|
export declare enum TextColor {
|
|
9
14
|
Primary = "primary",
|
|
@@ -15,10 +20,3 @@ export declare enum TextColor {
|
|
|
15
20
|
Error = "error",
|
|
16
21
|
Success = "success"
|
|
17
22
|
}
|
|
18
|
-
export declare enum TextType {
|
|
19
|
-
Headline = "headline",
|
|
20
|
-
Body = "body",
|
|
21
|
-
Button = "button_link",
|
|
22
|
-
Link = "button_link",
|
|
23
|
-
Fields = "fields"
|
|
24
|
-
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
1
|
export var TextSize;
|
|
3
2
|
(function (TextSize) {
|
|
4
3
|
TextSize["XL"] = "xl";
|
|
@@ -6,6 +5,11 @@ export var TextSize;
|
|
|
6
5
|
TextSize["M"] = "m";
|
|
7
6
|
TextSize["S"] = "s";
|
|
8
7
|
TextSize["XS"] = "xs";
|
|
8
|
+
TextSize["Body1"] = "body1";
|
|
9
|
+
TextSize["Body2"] = "body2";
|
|
10
|
+
TextSize["Button"] = "button";
|
|
11
|
+
TextSize["Field1"] = "field1";
|
|
12
|
+
TextSize["Field2"] = "field2";
|
|
9
13
|
})(TextSize || (TextSize = {}));
|
|
10
14
|
export var TextColor;
|
|
11
15
|
(function (TextColor) {
|
|
@@ -18,12 +22,4 @@ export var TextColor;
|
|
|
18
22
|
TextColor["Error"] = "error";
|
|
19
23
|
TextColor["Success"] = "success";
|
|
20
24
|
})(TextColor || (TextColor = {}));
|
|
21
|
-
export var TextType;
|
|
22
|
-
(function (TextType) {
|
|
23
|
-
TextType["Headline"] = "headline";
|
|
24
|
-
TextType["Body"] = "body";
|
|
25
|
-
TextType["Button"] = "button_link";
|
|
26
|
-
TextType["Link"] = "button_link";
|
|
27
|
-
TextType["Fields"] = "fields";
|
|
28
|
-
})(TextType || (TextType = {}));
|
|
29
25
|
//# sourceMappingURL=tuix-text.enums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tuix-text.enums.js","sourceRoot":"","sources":["../../../../src/tuix-text/enums/tuix-text.enums.ts"],"names":[],"mappings":"AAAA,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,SASX;AATD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,oCAAuB,CAAA;IACvB,0BAAa,CAAA;IACb,oCAAuB,CAAA;IACvB,kCAAqB,CAAA;IACrB,sCAAyB,CAAA;IACzB,4BAAe,CAAA;IACf,gCAAmB,CAAA;AACrB,CAAC,EATW,SAAS,KAAT,SAAS,QASpB","sourcesContent":["export 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 TextColor {\n Primary = 'primary',\n Secondary = 'secondary',\n Grey = 'grey',\n LightGrey = 'lightGrey',\n Disabled = 'disabled',\n Validation = 'validation',\n Error = 'error',\n Success = 'success',\n}\n"]}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
export declare const palette: Record<string, string>;
|
|
2
|
+
export declare enum TextVariant {
|
|
3
|
+
PRIMARY = "primary",
|
|
4
|
+
SECONDARY = "secondary",
|
|
5
|
+
GREY = "grey",
|
|
6
|
+
LIGHT_GREY = "light_grey",
|
|
7
|
+
DISABLED = "disabled",
|
|
8
|
+
VALIDATION = "validation",
|
|
9
|
+
ERROR = "error",
|
|
10
|
+
SUCCESS = "success"
|
|
11
|
+
}
|
|
12
|
+
export declare const colorText: Record<TextVariant, string>;
|
package/dist/src/utils/colors.js
CHANGED
|
@@ -1,11 +1,46 @@
|
|
|
1
|
-
export const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export const palette = {
|
|
2
|
+
primary_50: '#F5F5FA',
|
|
3
|
+
primary_100: '#EBEAF4',
|
|
4
|
+
primary_200: '#D1D1E6',
|
|
5
|
+
primary_300: '#A8A9D1',
|
|
6
|
+
main: '#585A9D',
|
|
7
|
+
primary_600: '#454584',
|
|
8
|
+
primary_700: '#3A396B',
|
|
9
|
+
primary_800: '#32325A',
|
|
10
|
+
primary_900: '#2E2D4D',
|
|
11
|
+
primary_950: '#1F1E33',
|
|
12
|
+
secondary: '#BBADFF',
|
|
13
|
+
white: '#FFFFFF',
|
|
14
|
+
black: '#121212',
|
|
15
|
+
neutral_200: '#C9C8D3',
|
|
16
|
+
neutral_600: '#8A8894',
|
|
17
|
+
success: '#439F6E',
|
|
7
18
|
validation: '#FFB82E',
|
|
19
|
+
validation_50: '#FFFBF4',
|
|
20
|
+
validation_200: '#FFEAC1',
|
|
8
21
|
error: '#F93232',
|
|
9
|
-
|
|
22
|
+
error_50: '#FFF5F5',
|
|
23
|
+
error_200: '#FFD8D8',
|
|
24
|
+
};
|
|
25
|
+
export var TextVariant;
|
|
26
|
+
(function (TextVariant) {
|
|
27
|
+
TextVariant["PRIMARY"] = "primary";
|
|
28
|
+
TextVariant["SECONDARY"] = "secondary";
|
|
29
|
+
TextVariant["GREY"] = "grey";
|
|
30
|
+
TextVariant["LIGHT_GREY"] = "light_grey";
|
|
31
|
+
TextVariant["DISABLED"] = "disabled";
|
|
32
|
+
TextVariant["VALIDATION"] = "validation";
|
|
33
|
+
TextVariant["ERROR"] = "error";
|
|
34
|
+
TextVariant["SUCCESS"] = "success";
|
|
35
|
+
})(TextVariant || (TextVariant = {}));
|
|
36
|
+
export const colorText = {
|
|
37
|
+
[TextVariant.PRIMARY]: palette.black,
|
|
38
|
+
[TextVariant.SECONDARY]: palette.white,
|
|
39
|
+
[TextVariant.GREY]: palette.neutral_600,
|
|
40
|
+
[TextVariant.LIGHT_GREY]: palette.neutral_200,
|
|
41
|
+
[TextVariant.DISABLED]: palette.primary_200,
|
|
42
|
+
[TextVariant.VALIDATION]: palette.validation,
|
|
43
|
+
[TextVariant.ERROR]: palette.error,
|
|
44
|
+
[TextVariant.SUCCESS]: palette.success,
|
|
10
45
|
};
|
|
11
46
|
//# sourceMappingURL=colors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../../src/utils/colors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../../src/utils/colors.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,OAAO,GAA2B;IAC7C,UAAU,EAAE,SAAS;IACrB,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,SAAS;IACtB,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,SAAS;IACtB,SAAS,EAAE,SAAS;IACpB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,SAAS;IACtB,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,SAAS;IACrB,aAAa,EAAE,SAAS;IACxB,cAAc,EAAE,SAAS;IACzB,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,SAAS;CACrB,CAAC;AAEF,MAAM,CAAN,IAAY,WASX;AATD,WAAY,WAAW;IACrB,kCAA6B,CAAA;IAC7B,sCAAiC,CAAA;IACjC,4BAAa,CAAA;IACb,wCAAyB,CAAA;IACzB,oCAAqB,CAAA;IACrB,wCAAyB,CAAA;IACzB,8BAAe,CAAA;IACf,kCAAmB,CAAA;AACrB,CAAC,EATW,WAAW,KAAX,WAAW,QAStB;AAED,MAAM,CAAC,MAAM,SAAS,GAAgC;IACpD,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;CACvC,CAAC","sourcesContent":["import { MainVariant } from './mainVariant.enum';\n\nexport const palette: Record<string, string> = {\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};\n\nexport enum TextVariant {\n PRIMARY = MainVariant.PRIMARY,\n SECONDARY = MainVariant.SECONDARY,\n GREY = 'grey',\n LIGHT_GREY = 'light_grey',\n DISABLED = 'disabled',\n VALIDATION = 'validation',\n ERROR = 'error',\n SUCCESS = 'success',\n}\n\nexport const colorText: Record<TextVariant, string> = {\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};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const darkPalette: Record<string, string>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { palette } from './colors';
|
|
2
|
+
export const darkPalette = {
|
|
3
|
+
...palette,
|
|
4
|
+
main: '#7A7CB6',
|
|
5
|
+
success: '#82C5A9',
|
|
6
|
+
validation: '#FFD489',
|
|
7
|
+
error: '#FF8486',
|
|
8
|
+
error_50: '#FFF5F5',
|
|
9
|
+
error_200: '#FFD8D8',
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=darkColors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"darkColors.js","sourceRoot":"","sources":["../../../src/utils/darkColors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,MAAM,CAAC,MAAM,WAAW,GAA2B;IACjD,GAAG,OAAO;IACV,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,SAAS;IACrB,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,SAAS;CACrB,CAAC","sourcesContent":["import { palette } from './colors';\n\nexport const darkPalette: Record<string, string> = {\n ...palette,\n main: '#7A7CB6',\n success: '#82C5A9',\n validation: '#FFD489',\n error: '#FF8486',\n error_50: '#FFF5F5',\n error_200: '#FFD8D8',\n};\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const hexToRgb = (hex) => {
|
|
2
|
+
const hexExp = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;
|
|
3
|
+
const result = hexExp.exec(hex);
|
|
4
|
+
return result
|
|
5
|
+
? {
|
|
6
|
+
r: parseInt(result[1], 16),
|
|
7
|
+
g: parseInt(result[2], 16),
|
|
8
|
+
b: parseInt(result[3], 16),
|
|
9
|
+
}
|
|
10
|
+
: {
|
|
11
|
+
r: 0,
|
|
12
|
+
g: 0,
|
|
13
|
+
b: 0,
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=hex-rgb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hex-rgb.js","sourceRoot":"","sources":["../../../src/utils/hex-rgb.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,EAAE;IACtC,MAAM,MAAM,GAAG,2CAA2C,CAAC;IAC3D,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChC,OAAO,MAAM;QACX,CAAC,CAAC;YACE,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YAC1B,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YAC1B,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;SAC3B;QACH,CAAC,CAAC;YACE,CAAC,EAAE,CAAC;YACJ,CAAC,EAAE,CAAC;YACJ,CAAC,EAAE,CAAC;SACL,CAAC;AACR,CAAC,CAAC","sourcesContent":["export const hexToRgb = (hex: string) => {\n const hexExp = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i;\n const result = hexExp.exec(hex);\n return result\n ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16),\n }\n : {\n r: 0,\n g: 0,\n b: 0,\n };\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mainVariant.enum.js","sourceRoot":"","sources":["../../../src/utils/mainVariant.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,sCAAuB,CAAA;AACzB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB","sourcesContent":["export enum MainVariant {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenSizes.enum.js","sourceRoot":"","sources":["../../../src/utils/screenSizes.enum.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,mDAAY,CAAA;IACZ,mDAAY,CAAA;AACd,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB","sourcesContent":["// Sizes in px\nexport enum ScreenSizes {\n TABLET = 640,\n MOBILE = 320,\n}\n"]}
|