tuix-webcomponents 0.4.0 → 0.6.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/README.md +2 -2
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/tuix-button/TuixButton.js +1 -1
- package/dist/src/tuix-button/TuixButton.js.map +1 -1
- package/dist/src/tuix-button/TuixButton.styles.js +1 -1
- package/dist/src/tuix-button/TuixButton.styles.js.map +1 -1
- package/dist/src/tuix-checkbox/TuixCheckbox.styles.js +1 -1
- package/dist/src/tuix-checkbox/TuixCheckbox.styles.js.map +1 -1
- package/dist/src/tuix-dropdown/TuixDropdown.styles.js +3 -3
- package/dist/src/tuix-dropdown/TuixDropdown.styles.js.map +1 -1
- package/dist/src/tuix-input/TuixInput.styles.js +3 -3
- package/dist/src/tuix-input/TuixInput.styles.js.map +1 -1
- package/dist/src/tuix-link/TuixLink.d.ts +1 -1
- package/dist/src/tuix-link/TuixLink.js +5 -4
- 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 +12 -23
- package/dist/src/tuix-link/TuixLink.styles.js.map +1 -1
- package/dist/src/tuix-paper/TuixPaper.d.ts +1 -1
- package/dist/src/tuix-paper/TuixPaper.js.map +1 -1
- package/dist/src/tuix-paper/TuixPaper.styles.js +14 -5
- package/dist/src/tuix-paper/TuixPaper.styles.js.map +1 -1
- package/dist/src/tuix-radio-button/TuixRadioButton.styles.js +1 -1
- package/dist/src/tuix-radio-button/TuixRadioButton.styles.js.map +1 -1
- package/dist/src/tuix-text/TuixText.d.ts +2 -0
- package/dist/src/tuix-text/TuixText.js +18 -6
- 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 +21 -0
- 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 +8 -0
- package/dist/src/tuix-text/enums/tuix-text.enums.js.map +1 -1
- package/dist/src/tuix-toggle-button/TuixToggleButton.styles.js +1 -1
- package/dist/src/tuix-toggle-button/TuixToggleButton.styles.js.map +1 -1
- package/dist/src/utils/colors.d.ts +3 -1
- package/dist/src/utils/colors.js +2 -0
- package/dist/src/utils/colors.js.map +1 -1
- package/dist/src/utils/darkColors.d.ts +7 -2
- package/dist/src/utils/darkColors.js +6 -1
- package/dist/src/utils/darkColors.js.map +1 -1
- package/dist/tsconfig.publish.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -3,15 +3,28 @@ 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
|
-
import { textStyles } from './TuixText.styles.js';
|
|
6
|
+
import { linkFontStyles, textStyles } from './TuixText.styles.js';
|
|
7
7
|
import { buttonSizeStyles } from '../tuix-button/TuixButton.styles.js';
|
|
8
8
|
import slottedClassName from '../utils/slottedClassName.js';
|
|
9
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
10
|
+
import { LINK_TEXT_COLOR_VAR_NAME } from '../tuix-link/TuixLink.styles.js';
|
|
9
11
|
let TuixText = class TuixText extends LitElement {
|
|
10
12
|
constructor() {
|
|
11
13
|
super(...arguments);
|
|
12
14
|
this.size = TextSize.Body1;
|
|
13
15
|
this.color = TextVariant.PRIMARY;
|
|
14
16
|
this.dark = false;
|
|
17
|
+
this._getStyleMap = () => {
|
|
18
|
+
return {
|
|
19
|
+
color: `var(${LINK_TEXT_COLOR_VAR_NAME}, ${this._getTextColor()})`,
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
this._getClassMap = () => {
|
|
23
|
+
return {
|
|
24
|
+
text: true,
|
|
25
|
+
[this.size]: true,
|
|
26
|
+
};
|
|
27
|
+
};
|
|
15
28
|
}
|
|
16
29
|
_getTextColor() {
|
|
17
30
|
const colorMap = this.dark ? colorTextDark : colorText;
|
|
@@ -19,10 +32,8 @@ let TuixText = class TuixText extends LitElement {
|
|
|
19
32
|
}
|
|
20
33
|
render() {
|
|
21
34
|
return html ` <div
|
|
22
|
-
class="
|
|
23
|
-
style="${styleMap(
|
|
24
|
-
color: this._getTextColor(),
|
|
25
|
-
})}"
|
|
35
|
+
class="${classMap(this._getClassMap())}"
|
|
36
|
+
style="${styleMap(this._getStyleMap())}"
|
|
26
37
|
>
|
|
27
38
|
<slot></slot>
|
|
28
39
|
</div>`;
|
|
@@ -32,11 +43,12 @@ TuixText.styles = [
|
|
|
32
43
|
css `
|
|
33
44
|
${unsafeCSS(slottedClassName('text'))} {
|
|
34
45
|
font-family: 'Rubik', sans-serif;
|
|
35
|
-
display:
|
|
46
|
+
display: inline;
|
|
36
47
|
margin: 0;
|
|
37
48
|
}
|
|
38
49
|
`,
|
|
39
50
|
textStyles,
|
|
51
|
+
linkFontStyles,
|
|
40
52
|
buttonSizeStyles,
|
|
41
53
|
];
|
|
42
54
|
__decorate([
|
|
@@ -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,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;
|
|
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,cAAc,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,gBAAgB,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAa,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAG3E,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;QAoBL,iBAAY,GAAG,GAAG,EAAE;YAC1B,OAAO;gBACL,KAAK,EAAE,OAAO,wBAAwB,KAAK,IAAI,CAAC,aAAa,EAAE,GAAG;aACnE,CAAC;QACJ,CAAC,CAAC;QAEM,iBAAY,GAAG,GAAc,EAAE;YACrC,OAAO;gBACL,IAAI,EAAE,IAAI;gBACV,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI;aAClB,CAAC;QACJ,CAAC,CAAC;IAUJ,CAAC;IA1BS,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;eACA,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;eAC7B,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;;;WAGjC,CAAC;IACV,CAAC;;AAtCM,eAAM,GAAG;IACd,GAAG,CAAA;QACC,SAAS,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;;;;;KAKtC;IACD,UAAU;IACV,cAAc;IACd,gBAAgB;CACjB,AAXY,CAWX;AAnBF;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,CAiDpB;SAjDY,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 { linkFontStyles, textStyles } from './TuixText.styles.js';\nimport { buttonSizeStyles } from '../tuix-button/TuixButton.styles.js';\nimport slottedClassName from '../utils/slottedClassName.js';\nimport { ClassInfo, classMap } from 'lit/directives/class-map.js';\nimport { LINK_TEXT_COLOR_VAR_NAME } from '../tuix-link/TuixLink.styles.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: inline;\n margin: 0;\n }\n `,\n textStyles,\n linkFontStyles,\n buttonSizeStyles,\n ];\n\n private _getTextColor() {\n const colorMap = this.dark ? colorTextDark : colorText;\n return colorMap[this.color || TextVariant.PRIMARY];\n }\n\n private _getStyleMap = () => {\n return {\n color: `var(${LINK_TEXT_COLOR_VAR_NAME}, ${this._getTextColor()})`,\n };\n };\n\n private _getClassMap = (): ClassInfo => {\n return {\n text: true,\n [this.size]: true,\n };\n };\n\n render() {\n return html` <div\n class=\"${classMap(this._getClassMap())}\"\n style=\"${styleMap(this._getStyleMap())}\"\n >\n <slot></slot>\n </div>`;\n }\n}\n"]}
|
|
@@ -2,6 +2,22 @@ import { css, unsafeCSS } from 'lit';
|
|
|
2
2
|
import { ScreenSizes } from '../utils/screenSizes.enum';
|
|
3
3
|
import { TextSize } from './enums/tuix-text.enums';
|
|
4
4
|
import slottedClassName from '../utils/slottedClassName';
|
|
5
|
+
export const linkFontStyles = css `
|
|
6
|
+
${unsafeCSS(`
|
|
7
|
+
${slottedClassName(TextSize.Link)} {
|
|
8
|
+
font-family: 'Rubik', sans-serif;
|
|
9
|
+
font-size: 1rem;
|
|
10
|
+
font-weight: 400;
|
|
11
|
+
line-height: 1.25rem;
|
|
12
|
+
}
|
|
13
|
+
@media only screen and (max-width: ${ScreenSizes.TABLET}px) {
|
|
14
|
+
${slottedClassName(TextSize.Link)} {
|
|
15
|
+
font-size: 0.875rem;
|
|
16
|
+
line-height: 1rem;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
`)}
|
|
20
|
+
`;
|
|
5
21
|
export const textStyles = css `
|
|
6
22
|
${unsafeCSS(`
|
|
7
23
|
${slottedClassName(TextSize.XL)} {
|
|
@@ -100,6 +116,11 @@ export const textStyles = css `
|
|
|
100
116
|
font-size: 0.75rem;
|
|
101
117
|
line-height: 0.975rem;
|
|
102
118
|
}
|
|
119
|
+
${slottedClassName(TextSize.Field1)} {
|
|
120
|
+
font-size: 0.875rem;
|
|
121
|
+
font-weight: 300;
|
|
122
|
+
line-height: 1.25rem;
|
|
123
|
+
}
|
|
103
124
|
${slottedClassName(TextSize.XL)} {
|
|
104
125
|
font-size: 1.5rem;
|
|
105
126
|
line-height: 1.8rem;
|
|
@@ -1 +1 @@
|
|
|
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"]}
|
|
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,cAAc,GAAG,GAAG,CAAA;IAC7B,SAAS,CAAC;IACV,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC;;;;;;uCAMI,WAAW,CAAC,MAAM;MACnD,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC;;;;;CAKpC,CAAC;CACD,CAAC;AAEF,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,MAAM,CAAC;;;;;MAKjC,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 linkFontStyles = css`\n ${unsafeCSS(`\n ${slottedClassName(TextSize.Link)} {\n font-family: 'Rubik', sans-serif;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.25rem; \n }\n @media only screen and (max-width: ${ScreenSizes.TABLET}px) {\n ${slottedClassName(TextSize.Link)} { \n font-size: 0.875rem;\n line-height: 1rem; \n } \n }\n`)}\n`;\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.Field1)} {\n font-size: 0.875rem;\n font-weight: 300;\n line-height: 1.25rem;\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"]}
|
|
@@ -6,6 +6,7 @@ export declare enum TextSize {
|
|
|
6
6
|
XS = "xs",
|
|
7
7
|
Body1 = "body1",
|
|
8
8
|
Body2 = "body2",
|
|
9
|
+
Link = "link",
|
|
9
10
|
Button = "button",
|
|
10
11
|
Field1 = "field1",
|
|
11
12
|
Field2 = "field2"
|
|
@@ -14,6 +15,7 @@ export declare enum TextVariant {
|
|
|
14
15
|
PRIMARY = "primary",
|
|
15
16
|
SECONDARY = "secondary",
|
|
16
17
|
MAIN = "main",
|
|
18
|
+
DARK_MAIN = "dark_main",
|
|
17
19
|
GREY = "grey",
|
|
18
20
|
LIGHT_GREY = "light_grey",
|
|
19
21
|
DISABLED = "disabled",
|
|
@@ -21,7 +23,8 @@ export declare enum TextVariant {
|
|
|
21
23
|
ERROR = "error",
|
|
22
24
|
SUCCESS = "success",
|
|
23
25
|
LIGHT = "light",
|
|
24
|
-
DARK = "dark"
|
|
26
|
+
DARK = "dark",
|
|
27
|
+
DARK_BLUE = "dark_blue"
|
|
25
28
|
}
|
|
26
29
|
export declare const colorText: Record<TextVariant, string>;
|
|
27
30
|
export declare const colorTextDark: Record<TextVariant, string>;
|
|
@@ -9,6 +9,7 @@ export var TextSize;
|
|
|
9
9
|
TextSize["XS"] = "xs";
|
|
10
10
|
TextSize["Body1"] = "body1";
|
|
11
11
|
TextSize["Body2"] = "body2";
|
|
12
|
+
TextSize["Link"] = "link";
|
|
12
13
|
TextSize["Button"] = "button";
|
|
13
14
|
TextSize["Field1"] = "field1";
|
|
14
15
|
TextSize["Field2"] = "field2";
|
|
@@ -18,6 +19,7 @@ export var TextVariant;
|
|
|
18
19
|
TextVariant["PRIMARY"] = "primary";
|
|
19
20
|
TextVariant["SECONDARY"] = "secondary";
|
|
20
21
|
TextVariant["MAIN"] = "main";
|
|
22
|
+
TextVariant["DARK_MAIN"] = "dark_main";
|
|
21
23
|
TextVariant["GREY"] = "grey";
|
|
22
24
|
TextVariant["LIGHT_GREY"] = "light_grey";
|
|
23
25
|
TextVariant["DISABLED"] = "disabled";
|
|
@@ -26,9 +28,11 @@ export var TextVariant;
|
|
|
26
28
|
TextVariant["SUCCESS"] = "success";
|
|
27
29
|
TextVariant["LIGHT"] = "light";
|
|
28
30
|
TextVariant["DARK"] = "dark";
|
|
31
|
+
TextVariant["DARK_BLUE"] = "dark_blue";
|
|
29
32
|
})(TextVariant || (TextVariant = {}));
|
|
30
33
|
export const colorText = {
|
|
31
34
|
[TextVariant.MAIN]: Palette.MAIN,
|
|
35
|
+
[TextVariant.DARK_MAIN]: Palette.DARK_MAIN,
|
|
32
36
|
[TextVariant.PRIMARY]: Palette.BLACK,
|
|
33
37
|
[TextVariant.SECONDARY]: Palette.WHITE,
|
|
34
38
|
[TextVariant.GREY]: Palette.NEUTRAL_600,
|
|
@@ -39,9 +43,12 @@ export const colorText = {
|
|
|
39
43
|
[TextVariant.SUCCESS]: Palette.SUCCESS,
|
|
40
44
|
[TextVariant.LIGHT]: Palette.WHITE,
|
|
41
45
|
[TextVariant.DARK]: Palette.BLACK,
|
|
46
|
+
[TextVariant.DARK_BLUE]: Palette.DARK_MAIN,
|
|
42
47
|
};
|
|
43
48
|
export const colorTextDark = {
|
|
44
49
|
...colorText,
|
|
50
|
+
[TextVariant.MAIN]: DarkPalette.MAIN,
|
|
51
|
+
[TextVariant.DARK_MAIN]: DarkPalette.NEUTRAL_600,
|
|
45
52
|
[TextVariant.PRIMARY]: DarkPalette.WHITE,
|
|
46
53
|
[TextVariant.SECONDARY]: Palette.BLACK,
|
|
47
54
|
[TextVariant.GREY]: DarkPalette.NEUTRAL_600,
|
|
@@ -49,5 +56,6 @@ export const colorTextDark = {
|
|
|
49
56
|
[TextVariant.ERROR]: DarkPalette.ERROR,
|
|
50
57
|
[TextVariant.SUCCESS]: DarkPalette.SUCCESS,
|
|
51
58
|
[TextVariant.LIGHT]: DarkPalette.WHITE,
|
|
59
|
+
[TextVariant.DARK_BLUE]: DarkPalette.PRIMARY_800,
|
|
52
60
|
};
|
|
53
61
|
//# 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,
|
|
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,QAYX;AAZD,WAAY,QAAQ;IAClB,qBAAS,CAAA;IACT,mBAAO,CAAA;IACP,mBAAO,CAAA;IACP,mBAAO,CAAA;IACP,qBAAS,CAAA;IACT,2BAAe,CAAA;IACf,2BAAe,CAAA;IACf,yBAAa,CAAA;IACb,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;AACnB,CAAC,EAZW,QAAQ,KAAR,QAAQ,QAYnB;AAED,MAAM,CAAN,IAAY,WAcX;AAdD,WAAY,WAAW;IACrB,kCAA6B,CAAA;IAC7B,sCAAiC,CAAA;IACjC,4BAAa,CAAA;IACb,sCAAuB,CAAA;IACvB,4BAAa,CAAA;IACb,wCAAyB,CAAA;IACzB,oCAAqB,CAAA;IACrB,wCAAyB,CAAA;IACzB,8BAAe,CAAA;IACf,kCAAmB,CAAA;IACnB,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,sCAAuB,CAAA;AACzB,CAAC,EAdW,WAAW,KAAX,WAAW,QActB;AAED,MAAM,CAAC,MAAM,SAAS,GAAgC;IACpD,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,IAAI;IAChC,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,SAAS;IAC1C,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;IACjC,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,SAAS;CAC3C,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAgC;IACxD,GAAG,SAAS;IACZ,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,IAAI;IACpC,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC,WAAW;IAChD,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;IACtC,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC,WAAW;CACjD,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 Link = 'link',\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 DARK_MAIN = 'dark_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 DARK_BLUE = 'dark_blue',\n}\n\nexport const colorText: Record<TextVariant, string> = {\n [TextVariant.MAIN]: Palette.MAIN,\n [TextVariant.DARK_MAIN]: Palette.DARK_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 [TextVariant.DARK_BLUE]: Palette.DARK_MAIN,\n};\n\nexport const colorTextDark: Record<TextVariant, string> = {\n ...colorText,\n [TextVariant.MAIN]: DarkPalette.MAIN,\n [TextVariant.DARK_MAIN]: DarkPalette.NEUTRAL_600,\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 [TextVariant.DARK_BLUE]: DarkPalette.PRIMARY_800,\n};\n"]}
|
|
@@ -101,7 +101,7 @@ export const toggleButtonLabelStyles = css `
|
|
|
101
101
|
font-size: 1rem;
|
|
102
102
|
line-height: 1.5rem;
|
|
103
103
|
font-weight: 300;
|
|
104
|
-
font-family: '
|
|
104
|
+
font-family: 'Rubik', sans-serif;
|
|
105
105
|
color: var(--t-text-color-label);
|
|
106
106
|
margin-left: 0.625rem;
|
|
107
107
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TuixToggleButton.styles.js","sourceRoot":"","sources":["../../../src/tuix-toggle-button/TuixToggleButton.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;IACrC,UAAU;;4BAEc,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC;6BAC7B,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC;;;;;4BAK/B,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC;6BACjC,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC;;CAE9D,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B7C,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC7C,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAA;;wBAElB,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;;;;;;;;;;;;;;CAc/C,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;CAiBzC,CAAC","sourcesContent":["import { css, unsafeCSS } from 'lit';\nimport { hostStyles } from '../tuix-checkbox/TuixCheckbox.styles';\nimport { Palette } from '../utils/colors';\nimport { DarkPalette } from '../utils/darkColors';\n\nexport const toggleButtonHostStyles = css`\n ${hostStyles}\n :host {\n --t-bg-color-primary: ${unsafeCSS(Palette.PRIMARY_300)};\n --t-bg-color-disabled: ${unsafeCSS(Palette.PRIMARY_100)};\n --t-toggle-shadow-color-focus: rgba(142, 141, 208, 0.16);\n --t-toggle-inner-radio: 1rem;\n }\n :host([dark]) {\n --t-bg-color-primary: ${unsafeCSS(DarkPalette.PRIMARY_800)};\n --t-bg-color-disabled: ${unsafeCSS(DarkPalette.NEUTRAL_200)};\n }\n`;\n\nexport const toggleButtonContainerStyles = css`\n .t-toggle-button-full-container {\n display: flex;\n justify-content: space-between;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n :host([disabled]) .t-toggle-button-full-container {\n cursor: not-allowed;\n }\n .t-toggle-button-container {\n display: block;\n position: relative;\n height: 1.5rem;\n width: 3rem;\n }\n .t-toggle-button-container .t-toggle-button {\n position: absolute;\n opacity: 0;\n height: 0;\n width: 0;\n }\n .t-radio-button-full-container:not(.t-with-label-left) {\n justify-content: flex-start;\n }\n`;\n\nexport const toggleButtonCheckmarkStyles = css`\n .t-toggle-button-container .t-toggle-button-checkmark {\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n height: 1.5rem;\n width: 3rem;\n border-radius: 0.75rem;\n background-color: var(--t-bg-color-primary);\n box-sizing: border-box;\n }\n .t-toggle-button-container\n .t-toggle-button:checked\n ~ .t-toggle-button-checkmark {\n background-color: var(--t-main-color-tuix);\n }\n .t-toggle-button-full-container:hover\n .t-toggle-button-container\n .t-toggle-button-checkmark {\n box-shadow: 0px 4px 4px 0px var(--t-toggle-shadow-color-focus);\n }\n .t-toggle-button-container\n .t-toggle-button:focus\n ~ .t-toggle-button-checkmark {\n box-shadow: 0 0 0px 2px var(--t-stroke-color-focus);\n }\n .t-toggle-button-container\n .t-toggle-button:disabled\n ~ .t-toggle-button-checkmark {\n background-color: var(--t-bg-color-disabled);\n box-shadow: none;\n }\n`;\n\nexport const toggleButtonInnerStyles = css`\n .t-toggle-button-container .t-toggle-button-checkmark .t-toggle-button-inner {\n background-color: ${unsafeCSS(Palette.WHITE)};\n margin: auto auto auto 0.25rem;\n height: var(--t-toggle-inner-radio);\n width: var(--t-toggle-inner-radio);\n border-radius: 50%;\n display: block;\n transition: 0.3s;\n }\n .t-toggle-button-container\n .t-toggle-button:checked\n ~ .t-toggle-button-checkmark\n .t-toggle-button-inner {\n transform: translateX(calc(3rem - var(--t-toggle-inner-radio) - 0.5rem));\n }\n`;\n\nexport const toggleButtonLabelStyles = css`\n .t-toggle-button-label {\n display: block;\n font-size: 1rem;\n line-height: 1.5rem;\n font-weight: 300;\n font-family: '
|
|
1
|
+
{"version":3,"file":"TuixToggleButton.styles.js","sourceRoot":"","sources":["../../../src/tuix-toggle-button/TuixToggleButton.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;IACrC,UAAU;;4BAEc,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC;6BAC7B,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC;;;;;4BAK/B,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC;6BACjC,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC;;CAE9D,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B7C,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC7C,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAA;;wBAElB,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;;;;;;;;;;;;;;CAc/C,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;CAiBzC,CAAC","sourcesContent":["import { css, unsafeCSS } from 'lit';\nimport { hostStyles } from '../tuix-checkbox/TuixCheckbox.styles';\nimport { Palette } from '../utils/colors';\nimport { DarkPalette } from '../utils/darkColors';\n\nexport const toggleButtonHostStyles = css`\n ${hostStyles}\n :host {\n --t-bg-color-primary: ${unsafeCSS(Palette.PRIMARY_300)};\n --t-bg-color-disabled: ${unsafeCSS(Palette.PRIMARY_100)};\n --t-toggle-shadow-color-focus: rgba(142, 141, 208, 0.16);\n --t-toggle-inner-radio: 1rem;\n }\n :host([dark]) {\n --t-bg-color-primary: ${unsafeCSS(DarkPalette.PRIMARY_800)};\n --t-bg-color-disabled: ${unsafeCSS(DarkPalette.NEUTRAL_200)};\n }\n`;\n\nexport const toggleButtonContainerStyles = css`\n .t-toggle-button-full-container {\n display: flex;\n justify-content: space-between;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n :host([disabled]) .t-toggle-button-full-container {\n cursor: not-allowed;\n }\n .t-toggle-button-container {\n display: block;\n position: relative;\n height: 1.5rem;\n width: 3rem;\n }\n .t-toggle-button-container .t-toggle-button {\n position: absolute;\n opacity: 0;\n height: 0;\n width: 0;\n }\n .t-radio-button-full-container:not(.t-with-label-left) {\n justify-content: flex-start;\n }\n`;\n\nexport const toggleButtonCheckmarkStyles = css`\n .t-toggle-button-container .t-toggle-button-checkmark {\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n height: 1.5rem;\n width: 3rem;\n border-radius: 0.75rem;\n background-color: var(--t-bg-color-primary);\n box-sizing: border-box;\n }\n .t-toggle-button-container\n .t-toggle-button:checked\n ~ .t-toggle-button-checkmark {\n background-color: var(--t-main-color-tuix);\n }\n .t-toggle-button-full-container:hover\n .t-toggle-button-container\n .t-toggle-button-checkmark {\n box-shadow: 0px 4px 4px 0px var(--t-toggle-shadow-color-focus);\n }\n .t-toggle-button-container\n .t-toggle-button:focus\n ~ .t-toggle-button-checkmark {\n box-shadow: 0 0 0px 2px var(--t-stroke-color-focus);\n }\n .t-toggle-button-container\n .t-toggle-button:disabled\n ~ .t-toggle-button-checkmark {\n background-color: var(--t-bg-color-disabled);\n box-shadow: none;\n }\n`;\n\nexport const toggleButtonInnerStyles = css`\n .t-toggle-button-container .t-toggle-button-checkmark .t-toggle-button-inner {\n background-color: ${unsafeCSS(Palette.WHITE)};\n margin: auto auto auto 0.25rem;\n height: var(--t-toggle-inner-radio);\n width: var(--t-toggle-inner-radio);\n border-radius: 50%;\n display: block;\n transition: 0.3s;\n }\n .t-toggle-button-container\n .t-toggle-button:checked\n ~ .t-toggle-button-checkmark\n .t-toggle-button-inner {\n transform: translateX(calc(3rem - var(--t-toggle-inner-radio) - 0.5rem));\n }\n`;\n\nexport const toggleButtonLabelStyles = css`\n .t-toggle-button-label {\n display: block;\n font-size: 1rem;\n line-height: 1.5rem;\n font-weight: 300;\n font-family: 'Rubik', sans-serif;\n color: var(--t-text-color-label);\n margin-left: 0.625rem;\n }\n .t-toggle-button-full-container.t-with-label-left {\n flex-direction: row-reverse;\n }\n .t-toggle-button-full-container.t-with-label-left .t-toggle-button-label {\n margin-right: 0.625rem;\n margin-left: 0;\n }\n`;\n"]}
|
|
@@ -4,6 +4,7 @@ export declare enum Palette {
|
|
|
4
4
|
PRIMARY_200 = "#D1D1E6",
|
|
5
5
|
PRIMARY_300 = "#A8A9D1",
|
|
6
6
|
MAIN = "#585A9D",
|
|
7
|
+
DARK_MAIN = "#33355B",
|
|
7
8
|
PRIMARY_600 = "#454584",
|
|
8
9
|
PRIMARY_700 = "#3A396B",
|
|
9
10
|
PRIMARY_800 = "#32325A",
|
|
@@ -21,5 +22,6 @@ export declare enum Palette {
|
|
|
21
22
|
ERROR = "#F93232",
|
|
22
23
|
ERROR_50 = "#FFF5F5",
|
|
23
24
|
ERROR_200 = "#FFD8D8",
|
|
24
|
-
SECTION_BG = "#FAFAFA"
|
|
25
|
+
SECTION_BG = "#FAFAFA",
|
|
26
|
+
SHADOW = "rgba(66, 79, 101, 0.16)"
|
|
25
27
|
}
|
package/dist/src/utils/colors.js
CHANGED
|
@@ -5,6 +5,7 @@ export var Palette;
|
|
|
5
5
|
Palette["PRIMARY_200"] = "#D1D1E6";
|
|
6
6
|
Palette["PRIMARY_300"] = "#A8A9D1";
|
|
7
7
|
Palette["MAIN"] = "#585A9D";
|
|
8
|
+
Palette["DARK_MAIN"] = "#33355B";
|
|
8
9
|
Palette["PRIMARY_600"] = "#454584";
|
|
9
10
|
Palette["PRIMARY_700"] = "#3A396B";
|
|
10
11
|
Palette["PRIMARY_800"] = "#32325A";
|
|
@@ -23,5 +24,6 @@ export var Palette;
|
|
|
23
24
|
Palette["ERROR_50"] = "#FFF5F5";
|
|
24
25
|
Palette["ERROR_200"] = "#FFD8D8";
|
|
25
26
|
Palette["SECTION_BG"] = "#FAFAFA";
|
|
27
|
+
Palette["SHADOW"] = "rgba(66, 79, 101, 0.16)";
|
|
26
28
|
})(Palette || (Palette = {}));
|
|
27
29
|
//# sourceMappingURL=colors.js.map
|
|
@@ -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,OA0BX;AA1BD,WAAY,OAAO;IACjB,iCAAsB,CAAA;IACtB,kCAAuB,CAAA;IACvB,kCAAuB,CAAA;IACvB,kCAAuB,CAAA;IACvB,2BAAgB,CAAA;IAChB,gCAAqB,CAAA;IACrB,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;IACtB,6CAAkC,CAAA;AACpC,CAAC,EA1BW,OAAO,KAAP,OAAO,QA0BlB","sourcesContent":["export enum Palette {\n PRIMARY_50 = '#F5F5FA',\n PRIMARY_100 = '#EBEAF4',\n PRIMARY_200 = '#D1D1E6',\n PRIMARY_300 = '#A8A9D1',\n MAIN = '#585A9D',\n DARK_MAIN = '#33355B',\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 SHADOW = 'rgba(66, 79, 101, 0.16)',\n}\n"]}
|
|
@@ -4,6 +4,7 @@ export declare enum DarkPalette {
|
|
|
4
4
|
PRIMARY_200 = "#D1D1E6",
|
|
5
5
|
PRIMARY_300 = "#A8A9D1",
|
|
6
6
|
MAIN = "#7A7CB6",
|
|
7
|
+
DARK_MAIN = "#33355B",
|
|
7
8
|
PRIMARY_600 = "#454584",
|
|
8
9
|
PRIMARY_700 = "#3A396B",
|
|
9
10
|
PRIMARY_800 = "#32325A",
|
|
@@ -11,7 +12,7 @@ export declare enum DarkPalette {
|
|
|
11
12
|
PRIMARY_950 = "#1F1E33",
|
|
12
13
|
SECONDARY = "#BBADFF",
|
|
13
14
|
WHITE = "rgba(255, 255, 255, 0.87)",
|
|
14
|
-
BLACK = "#
|
|
15
|
+
BLACK = "#121212",
|
|
15
16
|
NEUTRAL_200 = "#C9C8D3",
|
|
16
17
|
NEUTRAL_600 = "rgba(255, 255, 255, 0.60)",
|
|
17
18
|
SUCCESS = "#82C5A9",
|
|
@@ -21,5 +22,9 @@ export declare enum DarkPalette {
|
|
|
21
22
|
ERROR = "#FF8486",
|
|
22
23
|
ERROR_50 = "#FFF5F5",
|
|
23
24
|
ERROR_200 = "#FFD8D8",
|
|
24
|
-
SECTION_BG = "#0E0E0E"
|
|
25
|
+
SECTION_BG = "#0E0E0E",
|
|
26
|
+
ELEVATION_1 = "#17171A",
|
|
27
|
+
ELEVATION_2 = "#1A1A1F",
|
|
28
|
+
ELEVATION_3 = "#1D1E24",
|
|
29
|
+
ELEVATION_4 = "#212128"
|
|
25
30
|
}
|
|
@@ -5,6 +5,7 @@ export var DarkPalette;
|
|
|
5
5
|
DarkPalette["PRIMARY_200"] = "#D1D1E6";
|
|
6
6
|
DarkPalette["PRIMARY_300"] = "#A8A9D1";
|
|
7
7
|
DarkPalette["MAIN"] = "#7A7CB6";
|
|
8
|
+
DarkPalette["DARK_MAIN"] = "#33355B";
|
|
8
9
|
DarkPalette["PRIMARY_600"] = "#454584";
|
|
9
10
|
DarkPalette["PRIMARY_700"] = "#3A396B";
|
|
10
11
|
DarkPalette["PRIMARY_800"] = "#32325A";
|
|
@@ -12,7 +13,7 @@ export var DarkPalette;
|
|
|
12
13
|
DarkPalette["PRIMARY_950"] = "#1F1E33";
|
|
13
14
|
DarkPalette["SECONDARY"] = "#BBADFF";
|
|
14
15
|
DarkPalette["WHITE"] = "rgba(255, 255, 255, 0.87)";
|
|
15
|
-
DarkPalette["BLACK"] = "#
|
|
16
|
+
DarkPalette["BLACK"] = "#121212";
|
|
16
17
|
DarkPalette["NEUTRAL_200"] = "#C9C8D3";
|
|
17
18
|
DarkPalette["NEUTRAL_600"] = "rgba(255, 255, 255, 0.60)";
|
|
18
19
|
DarkPalette["SUCCESS"] = "#82C5A9";
|
|
@@ -23,5 +24,9 @@ export var DarkPalette;
|
|
|
23
24
|
DarkPalette["ERROR_50"] = "#FFF5F5";
|
|
24
25
|
DarkPalette["ERROR_200"] = "#FFD8D8";
|
|
25
26
|
DarkPalette["SECTION_BG"] = "#0E0E0E";
|
|
27
|
+
DarkPalette["ELEVATION_1"] = "#17171A";
|
|
28
|
+
DarkPalette["ELEVATION_2"] = "#1A1A1F";
|
|
29
|
+
DarkPalette["ELEVATION_3"] = "#1D1E24";
|
|
30
|
+
DarkPalette["ELEVATION_4"] = "#212128";
|
|
26
31
|
})(DarkPalette || (DarkPalette = {}));
|
|
27
32
|
//# 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,WA6BX;AA7BD,WAAY,WAAW;IACrB,qCAA+B,CAAA;IAC/B,sCAAiC,CAAA;IACjC,sCAAiC,CAAA;IACjC,sCAAiC,CAAA;IACjC,+BAAgB,CAAA;IAChB,oCAA6B,CAAA;IAC7B,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;IACtB,sCAAuB,CAAA;IACvB,sCAAuB,CAAA;IACvB,sCAAuB,CAAA;IACvB,sCAAuB,CAAA;AACzB,CAAC,EA7BW,WAAW,KAAX,WAAW,QA6BtB","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 DARK_MAIN = Palette.DARK_MAIN,\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 = '#121212',\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 ELEVATION_1 = '#17171A',\n ELEVATION_2 = '#1A1A1F',\n ELEVATION_3 = '#1D1E24',\n ELEVATION_4 = '#212128',\n}\n"]}
|