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
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ function App() {
|
|
|
23
23
|
}, [])
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
|
-
<tuix-text size="xl"
|
|
26
|
+
<tuix-text size="xl" color="primary">Test text</tuix-text>
|
|
27
27
|
)
|
|
28
28
|
}
|
|
29
29
|
```
|
|
@@ -37,7 +37,7 @@ loadFonts()
|
|
|
37
37
|
function App() {
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
|
-
<tuix-text size="xl"
|
|
40
|
+
<tuix-text size="xl" color="primary">Test text</tuix-text>
|
|
41
41
|
)
|
|
42
42
|
}
|
|
43
43
|
```
|
package/dist/src/index.d.ts
CHANGED
|
@@ -27,4 +27,5 @@ export { Palette } from './utils/colors.js';
|
|
|
27
27
|
export { DarkPalette } from './utils/darkColors.js';
|
|
28
28
|
export { DropdownType } from './tuix-dropdown/enums/tuix-dropdown.enums.js';
|
|
29
29
|
export { BorderRadiusPaper } from './tuix-paper/enums/tuix-paper.enum.js';
|
|
30
|
+
export { ScreenSizes } from './utils/screenSizes.enum.js';
|
|
30
31
|
export declare function loadFonts(): void;
|
package/dist/src/index.js
CHANGED
|
@@ -20,6 +20,7 @@ export { Palette } from './utils/colors.js';
|
|
|
20
20
|
export { DarkPalette } from './utils/darkColors.js';
|
|
21
21
|
export { DropdownType } from './tuix-dropdown/enums/tuix-dropdown.enums.js';
|
|
22
22
|
export { BorderRadiusPaper } from './tuix-paper/enums/tuix-paper.enum.js';
|
|
23
|
+
export { ScreenSizes } from './utils/screenSizes.enum.js';
|
|
23
24
|
export function loadFonts() {
|
|
24
25
|
const link1 = document.createElement('link');
|
|
25
26
|
link1.rel = 'preconnect';
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,O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E,OAAO,EACL,QAAQ,EACR,eAAe,GAChB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,eAAe,EACf,SAAS,GACV,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,UAAU,SAAS;IACvB,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7C,KAAK,CAAC,GAAG,GAAG,YAAY,CAAC;IACzB,KAAK,CAAC,IAAI,GAAG,8BAA8B,CAAC;IAC5C,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7C,KAAK,CAAC,GAAG,GAAG,YAAY,CAAC;IACzB,KAAK,CAAC,IAAI,GAAG,2BAA2B,CAAC;IACzC,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7C,KAAK,CAAC,GAAG,GAAG,YAAY,CAAC;IACzB,KAAK,CAAC,IAAI;QACR,2JAA2J,CAAC;IAC9J,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC","sourcesContent":["export { CustomEventTuixButton } from './tuix-button/interfaces/tuix-button.interface.js';\nexport {\n CustomEventTuixCheckbox,\n DetailValueCheckbox,\n} from './tuix-checkbox/interfaces/tuix-checkbox.interface.js';\nexport {\n CustomEventTuixDropdownInput,\n CustomEventTuixDropdownSelect,\n} from './tuix-dropdown/interfaces/tuix-dropdown.interface.js';\nexport { CustomEventTuixInput } from './tuix-input/interfaces/tuix-input.interface.js';\nexport { CustomEventTuixRadioButton } from './tuix-radio-button/interfaces/tuix-radio-button.interface.js';\nexport { CustomEventTuixToggle } from './tuix-toggle-button/interfaces/tuix-toggle.interface.js';\nexport { DetailValue } from './utils/interfaces/detail-value.interface.js';\nexport { TuixText } from './tuix-text/TuixText.js';\nexport { TuixIcon } from './tuix-icon/TuixIcon.js';\nexport { TuixButton } from './tuix-button/TuixButton.js';\nexport { TuixPaper } from './tuix-paper/TuixPaper.js';\nexport { TuixIconButton } from './tuix-icon-button/TuixIconButton.js';\nexport { TuixLink } from './tuix-link/TuixLink.js';\nexport { TuixInput } from './tuix-input/TuixInput.js';\nexport { TuixDropdown } from './tuix-dropdown/TuixDropdown.js';\nexport { TuixCheckbox } from './tuix-checkbox/TuixCheckbox.js';\nexport { TuixRadioButton } from './tuix-radio-button/TuixRadioButton.js';\nexport { TuixToggleButton } from './tuix-toggle-button/TuixToggleButton.js';\nexport { TextSize, TextVariant } from './tuix-text/enums/tuix-text.enums.js';\nexport { MainVariant } from './utils/mainVariant.enum.js';\nexport { CheckboxLabelSide } from './tuix-checkbox/enums/tuix-checkbox.enums.js';\nexport { PaperElevation } from './tuix-paper/enums/tuix-paper.enum.js';\nexport { LinkTarget } from './tuix-link/enums/linkTarget.enum.js';\nexport {\n IconName,\n IconSizeVariant,\n} from './tuix-icon/enums/tuix-icon.enums.js';\nexport {\n DescriptionType,\n InputType,\n} from './tuix-input/enums/tuix-input.enums.js';\nexport { Palette } from './utils/colors.js';\nexport { DarkPalette } from './utils/darkColors.js';\nexport { DropdownType } from './tuix-dropdown/enums/tuix-dropdown.enums.js';\nexport { BorderRadiusPaper } from './tuix-paper/enums/tuix-paper.enum.js';\nexport { ScreenSizes } from './utils/screenSizes.enum.js';\n\nexport function loadFonts() {\n const link1 = document.createElement('link');\n link1.rel = 'preconnect';\n link1.href = 'https://fonts.googleapis.com';\n const link2 = document.createElement('link');\n link2.rel = 'preconnect';\n link2.href = 'https://fonts.gstatic.com';\n const link3 = document.createElement('link');\n link3.rel = 'stylesheet';\n link3.href =\n 'https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap';\n document.head.appendChild(link1);\n document.head.appendChild(link2);\n document.head.appendChild(link3);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TuixButton.js","sourceRoot":"","sources":["../../../src/tuix-button/TuixButton.ts"],"names":[],"mappings":";AAAA,OAAO,EAAkB,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,IAAa,UAAU,GAAvB,MAAa,UAAW,SAAQ,cAAc;IA+CzB,gBAAgB;QACjC,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,SAAS;YAAE,OAAO;QAC9C,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;IACxC,CAAC;IAEkB,cAAc;QAC/B,IAAI,QAAQ,GAAG,eAAe,CAAC,MAAM,CAAC;QAEtC,IAAI,MAAM,CAAC,KAAK,IAAI,WAAW,CAAC,MAAM,EAAE;YACtC,QAAQ,GAAG,eAAe,CAAC,KAAK,CAAC;SAClC;QACD,OAAO,IAAI,CAAA;QACP,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO;;QAErE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO;WACpE,CAAC;IACV,CAAC;;AA9DM,iBAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;2CAQoC,WAAW,CAAC,MAAM;;;;;;2CAMlB,WAAW,CAAC,MAAM;;;;;;;;;;;;;;2CAclB,WAAW,CAAC,MAAM;;;;;KAKxD;IACD,gBAAgB;IAChB,iBAAiB;IACjB,gBAAgB;CACjB,AAtCY,CAsCX;AAGF;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;6CACR;AAGrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;4CACT;AA7CT,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAgEtB;SAhEY,UAAU","sourcesContent":["import { TemplateResult, css, html, nothing } from 'lit';\nimport { IconName, IconSizeVariant } from '../tuix-icon/enums/tuix-icon.enums';\nimport {\n buttonSizeStyles,\n buttonColorStyles,\n hostButtonStyles,\n} from './TuixButton.styles';\nimport { customElement, property } from 'lit/decorators.js';\nimport { ScreenSizes } from '../utils/screenSizes.enum';\nimport { TuixBaseButton } from './TuixBaseButton';\n\n@customElement('tuix-button')\nexport class TuixButton extends TuixBaseButton {\n static styles = [\n css`\n .button {\n padding: 16px 32px;\n border-radius: 4px;\n border: none;\n font-family: '
|
|
1
|
+
{"version":3,"file":"TuixButton.js","sourceRoot":"","sources":["../../../src/tuix-button/TuixButton.ts"],"names":[],"mappings":";AAAA,OAAO,EAAkB,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,EAA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Q,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;6CACR;AAGrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;4CACT;AA7CT,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAgEtB;SAhEY,UAAU","sourcesContent":["import { TemplateResult, css, html, nothing } from 'lit';\nimport { IconName, IconSizeVariant } from '../tuix-icon/enums/tuix-icon.enums';\nimport {\n buttonSizeStyles,\n buttonColorStyles,\n hostButtonStyles,\n} from './TuixButton.styles';\nimport { customElement, property } from 'lit/decorators.js';\nimport { ScreenSizes } from '../utils/screenSizes.enum';\nimport { TuixBaseButton } from './TuixBaseButton';\n\n@customElement('tuix-button')\nexport class TuixButton extends TuixBaseButton {\n static styles = [\n css`\n .button {\n padding: 16px 32px;\n border-radius: 4px;\n border: none;\n font-family: 'Rubik', sans-serif;\n }\n\n @media only screen and (max-width: ${ScreenSizes.TABLET}px) {\n .button {\n padding: 14px 32px;\n }\n }\n\n @media only screen and (max-width: ${ScreenSizes.MOBILE}px) {\n .button {\n padding: 12px 24px;\n }\n }\n\n .container {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n gap: 8px;\n }\n\n @media only screen and (max-width: ${ScreenSizes.MOBILE}px) {\n .container {\n gap: 6px;\n }\n }\n `,\n hostButtonStyles,\n buttonColorStyles,\n buttonSizeStyles,\n ];\n\n @property({ type: IconName })\n iconRight?: IconName;\n\n @property({ type: IconName })\n iconLeft?: IconName;\n\n protected override _updateIconColor() {\n if (!this.iconLeft && !this.iconRight) return;\n this.iconColor = this._getTextColor();\n }\n\n protected override _buttonContent(): TemplateResult {\n let iconSize = IconSizeVariant.MEDIUM;\n\n if (screen.width <= ScreenSizes.TABLET) {\n iconSize = IconSizeVariant.SMALL;\n }\n return html` <div class=\"container\">\n ${this.iconLeft ? this._iconTemplate(this.iconLeft, iconSize) : nothing}\n <slot></slot>\n ${this.iconRight ? this._iconTemplate(this.iconRight, iconSize) : nothing}\n </div>`;\n }\n}\n"]}
|
|
@@ -25,7 +25,7 @@ export const hostButtonStyles = css `
|
|
|
25
25
|
--t-button-text-muted-color: ${unsafeCSS(Palette.PRIMARY_800)};
|
|
26
26
|
--t-button-disabled-bg-color: ${unsafeCSS(Palette.PRIMARY_950)};
|
|
27
27
|
--t-button-hover-primary-color: ${unsafeCSS(Palette.MAIN)};
|
|
28
|
-
--t-button-active-primary-color: ${unsafeCSS(Palette.
|
|
28
|
+
--t-button-active-primary-color: ${unsafeCSS(Palette.PRIMARY_600)};
|
|
29
29
|
--t-button-secondary-color: ${unsafeCSS(Palette.BLACK)};
|
|
30
30
|
--t-button-hover-secondary-color: ${unsafeCSS(Palette.PRIMARY_950)};
|
|
31
31
|
--t-button-active-secondary-color: ${unsafeCSS(Palette.PRIMARY_800)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TuixButton.styles.js","sourceRoot":"","sources":["../../../src/tuix-button/TuixButton.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAE9D,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;gCAEH,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC;kCACrB,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;+BAC3B,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC;6BAC9B,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;uCACd,SA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CAAC,OAAO,CAAC;;;;;oBAK9B,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC;;;;;oBAKhC,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC;;;;;;oBAMhC,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC;;;;;oBAKhC,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC;;;;;oBAKhC,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC;;;;oBAIhC,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC;oBAChC,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC;;;;;CAKjD,CAAC","sourcesContent":["import { css, unsafeCSS } from 'lit';\nimport { Palette } from '../utils/colors';\nimport { ScreenSizes } from '../utils/screenSizes.enum';\nimport { DarkPalette } from '../utils/darkColors';\nimport { MainVariant } from '../utils/mainVariant.enum';\nimport slottedClassName from '../utils/slottedClassName';\nimport { TextSize } from '../tuix-text/enums/tuix-text.enums';\n\nexport const hostButtonStyles = css`\n :host {\n --t-button-primary-color: ${unsafeCSS(Palette.MAIN)};\n --t-button-secondary-color: ${unsafeCSS(Palette.WHITE)};\n --t-button-accent-color: ${unsafeCSS(Palette.SECONDARY)};\n --t-button-text-color: ${unsafeCSS(Palette.WHITE)};\n --t-button-text-secondary-color: ${unsafeCSS(Palette.MAIN)};\n --t-button-text-muted-color: ${unsafeCSS(Palette.PRIMARY_300)};\n --t-button-disabled-bg-color: ${unsafeCSS(Palette.PRIMARY_100)};\n --t-button-hover-primary-color: ${unsafeCSS(Palette.PRIMARY_600)};\n --t-button-active-primary-color: ${unsafeCSS(Palette.PRIMARY_800)};\n --t-button-hover-secondary-color: ${unsafeCSS(Palette.PRIMARY_100)};\n --t-button-active-secondary-color: ${unsafeCSS(Palette.PRIMARY_200)};\n }\n :host([dark]) {\n --t-button-primary-color: ${unsafeCSS(DarkPalette.MAIN)};\n --t-button-text-color: ${unsafeCSS(DarkPalette.WHITE)};\n --t-button-text-muted-color: ${unsafeCSS(Palette.PRIMARY_800)};\n --t-button-disabled-bg-color: ${unsafeCSS(Palette.PRIMARY_950)};\n --t-button-hover-primary-color: ${unsafeCSS(Palette.MAIN)};\n --t-button-active-primary-color: ${unsafeCSS(Palette.
|
|
1
|
+
{"version":3,"file":"TuixButton.styles.js","sourceRoot":"","sources":["../../../src/tuix-button/TuixButton.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAE9D,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;gCAEH,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC;kCACrB,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;+BAC3B,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC;6BAC9B,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;uCACd,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC;mCAC3B,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC;oCAC7B,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC;sCAC5B,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC;uCAC7B,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC;wCAC7B,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC;yCAC7B,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC;;;gCAGvC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;6BAC9B,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC;mCACtB,SAAS,CAAC,O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Palette } from '../utils/colors';\nimport { ScreenSizes } from '../utils/screenSizes.enum';\nimport { DarkPalette } from '../utils/darkColors';\nimport { MainVariant } from '../utils/mainVariant.enum';\nimport slottedClassName from '../utils/slottedClassName';\nimport { TextSize } from '../tuix-text/enums/tuix-text.enums';\n\nexport const hostButtonStyles = css`\n :host {\n --t-button-primary-color: ${unsafeCSS(Palette.MAIN)};\n --t-button-secondary-color: ${unsafeCSS(Palette.WHITE)};\n --t-button-accent-color: ${unsafeCSS(Palette.SECONDARY)};\n --t-button-text-color: ${unsafeCSS(Palette.WHITE)};\n --t-button-text-secondary-color: ${unsafeCSS(Palette.MAIN)};\n --t-button-text-muted-color: ${unsafeCSS(Palette.PRIMARY_300)};\n --t-button-disabled-bg-color: ${unsafeCSS(Palette.PRIMARY_100)};\n --t-button-hover-primary-color: ${unsafeCSS(Palette.PRIMARY_600)};\n --t-button-active-primary-color: ${unsafeCSS(Palette.PRIMARY_800)};\n --t-button-hover-secondary-color: ${unsafeCSS(Palette.PRIMARY_100)};\n --t-button-active-secondary-color: ${unsafeCSS(Palette.PRIMARY_200)};\n }\n :host([dark]) {\n --t-button-primary-color: ${unsafeCSS(DarkPalette.MAIN)};\n --t-button-text-color: ${unsafeCSS(DarkPalette.WHITE)};\n --t-button-text-muted-color: ${unsafeCSS(Palette.PRIMARY_800)};\n --t-button-disabled-bg-color: ${unsafeCSS(Palette.PRIMARY_950)};\n --t-button-hover-primary-color: ${unsafeCSS(Palette.MAIN)};\n --t-button-active-primary-color: ${unsafeCSS(Palette.PRIMARY_600)};\n --t-button-secondary-color: ${unsafeCSS(Palette.BLACK)};\n --t-button-hover-secondary-color: ${unsafeCSS(Palette.PRIMARY_950)};\n --t-button-active-secondary-color: ${unsafeCSS(Palette.PRIMARY_800)};\n }\n`;\n\nexport const buttonSizeStyles = css`\n ${unsafeCSS(`\n ${slottedClassName(TextSize.Button)} {\n font-size: 1.25rem;\n font-weight: 400;\n line-height: 1.5rem;\n }\n @media only screen and (max-width: ${ScreenSizes.TABLET}px) {\n ${slottedClassName(TextSize.Button)} {\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.25rem;\n }\n }\n @media only screen and (max-width: ${ScreenSizes.MOBILE}px) {\n ${slottedClassName(TextSize.Button)} {\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 1rem;\n }\n }\n`)}\n`;\n\nexport const buttonColorStyles = css`\n :host([variant='${unsafeCSS(MainVariant.PRIMARY)}']) .button {\n background-color: var(--t-button-primary-color);\n outline: none;\n color: var(--t-button-text-color);\n }\n :host([variant='${unsafeCSS(MainVariant.PRIMARY)}']) .button:hover {\n background-color: var(--t-button-hover-primary-color);\n cursor: pointer;\n }\n :host([variant='${unsafeCSS(MainVariant.PRIMARY)}']) .button:focus {\n background-color: var(--t-button-hover-primary-color);\n outline: 2px solid var(--t-button-accent-color);\n }\n :host([variant='${unsafeCSS(MainVariant.PRIMARY)}']) .button:active {\n background-color: var(--t-button-active-primary-color);\n outline: none;\n }\n\n :host([variant='${unsafeCSS(MainVariant.SECONDARY)}']) .button {\n background-color: var(--t-button-secondary-color);\n outline: 1px solid var(--t-button-hover-primary-color);\n color: var(--t-button-text-secondary-color);\n }\n :host([variant='${unsafeCSS(MainVariant.SECONDARY)}']) .button:hover {\n background-color: var(--t-button-hover-secondary-color);\n outline: 1px solid var(--t-button-primary-color);\n color: var(--t-button-primary-color);\n cursor: pointer;\n }\n :host([variant='${unsafeCSS(MainVariant.SECONDARY)}']) .button:focus {\n background-color: var(--t-button-hover-secondary-color);\n outline: 2px solid var(--t-button-accent-color);\n color: var(--t-button-primary-color);\n }\n :host([variant='${unsafeCSS(MainVariant.SECONDARY)}']) .button:active {\n background-color: var(--t-button-active-secondary-color);\n outline: 1px solid var(--t-button-primary-color);\n color: var(--t-button-primary-color);\n }\n :host([variant='${unsafeCSS(MainVariant.SECONDARY)}']) .button:disabled {\n outline: 1px solid var(--t-button-text-muted-color);\n }\n\n :host([variant='${unsafeCSS(MainVariant.SECONDARY)}'][disabled]) .button,\n :host([variant='${unsafeCSS(MainVariant.PRIMARY)}'][disabled]) .button {\n background-color: var(--t-button-disabled-bg-color);\n color: var(--t-button-text-muted-color);\n cursor: not-allowed;\n }\n`;\n"]}
|
|
@@ -102,7 +102,7 @@ export const checkboxLabelStyles = css `
|
|
|
102
102
|
font-size: 1rem;
|
|
103
103
|
line-height: 1.5rem;
|
|
104
104
|
font-weight: 300;
|
|
105
|
-
font-family: '
|
|
105
|
+
font-family: 'Rubik', sans-serif;
|
|
106
106
|
color: var(--t-text-color-label);
|
|
107
107
|
margin-left: 0.625rem;
|
|
108
108
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TuixCheckbox.styles.js","sourceRoot":"","sources":["../../../src/tuix-checkbox/TuixCheckbox.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;2BAEF,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC;4BACtB,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;6BACvB,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC;4BAC/B,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;8BACtB,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC;6BAC7B,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC;4BAC/B,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;;;2BAGzB,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;4BAC1B,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC;6BAC3B,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC;4BACnC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC;8BAC1B,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC;6BACjC,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC;4BACnC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC;;CAEvD,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;CAyBzC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDzC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;CAiBrC,CAAC","sourcesContent":["import { css, unsafeCSS } from 'lit';\nimport { Palette } from '../utils/colors';\nimport { DarkPalette } from '../utils/darkColors';\n\nexport const hostStyles = css`\n :host {\n --t-main-color-tuix: ${unsafeCSS(Palette.MAIN)};\n --t-bg-color-primary: ${unsafeCSS(Palette.WHITE)};\n --t-bg-color-disabled: ${unsafeCSS(Palette.PRIMARY_100)};\n --t-text-color-error: ${unsafeCSS(Palette.ERROR)};\n --t-stroke-color-focus: ${unsafeCSS(Palette.SECONDARY)};\n --t-stroke-color-grey: ${unsafeCSS(Palette.PRIMARY_300)};\n --t-text-color-label: ${unsafeCSS(Palette.BLACK)};\n }\n :host([dark]) {\n --t-main-color-tuix: ${unsafeCSS(DarkPalette.MAIN)};\n --t-bg-color-primary: ${unsafeCSS(DarkPalette.BLACK)};\n --t-bg-color-disabled: ${unsafeCSS(DarkPalette.PRIMARY_800)};\n --t-text-color-error: ${unsafeCSS(DarkPalette.ERROR)};\n --t-stroke-color-focus: ${unsafeCSS(DarkPalette.SECONDARY)};\n --t-stroke-color-grey: ${unsafeCSS(DarkPalette.PRIMARY_100)};\n --t-text-color-label: ${unsafeCSS(DarkPalette.WHITE)};\n }\n`;\n\nexport const checkboxContainerStyles = css`\n .t-checkbox-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-checkbox-full-container {\n cursor: not-allowed;\n }\n .t-checkbox-container {\n display: block;\n position: relative;\n height: 1.5rem;\n width: 1.5rem;\n }\n .t-checkbox-container .t-checkbox {\n position: absolute;\n opacity: 0;\n height: 0;\n width: 0;\n }\n`;\n\nexport const checkboxCheckmarkStyles = css`\n .t-checkbox-container .t-checkbox-checkmark {\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n height: 1.5rem;\n width: 1.5rem;\n border-radius: 0.25rem;\n background-color: var(--t-bg-color-primary);\n border: 2px solid var(--t-stroke-color-grey);\n box-sizing: border-box;\n }\n .t-checkbox-container .t-checkbox-checkmark tuix-icon {\n margin: auto;\n display: none;\n }\n .t-checkbox-container .t-checkbox:checked ~ .t-checkbox-checkmark {\n background-color: var(--t-main-color-tuix);\n border: none;\n }\n .t-checkbox-container .t-checkbox:focus ~ .t-checkbox-checkmark {\n box-shadow: 0 0 0px 2px var(--t-stroke-color-focus);\n border: 2px solid var(--t-main-color-tuix);\n }\n .t-checkbox-container .t-checkbox:checked ~ .t-checkbox-checkmark tuix-icon {\n display: block;\n }\n .t-checkbox-full-container:hover .t-checkbox-container .t-checkbox-checkmark {\n border: 2px solid var(--t-main-color-tuix);\n }\n .t-checkbox-full-container.t-with-error\n .t-checkbox-container\n .t-checkbox-checkmark {\n border: 2px solid var(--t-text-color-error);\n }\n .t-checkbox-full-container.t-with-error\n .t-checkbox-container\n .t-checkbox:checked\n ~ .t-checkbox-checkmark {\n background-color: var(--t-text-color-error);\n border: none;\n }\n .t-checkbox-container .t-checkbox:disabled ~ .t-checkbox-checkmark {\n background-color: var(--t-bg-color-disabled);\n border: none;\n box-shadow: none;\n }\n`;\n\nexport const checkboxLabelStyles = css`\n .t-checkbox-label {\n display: block;\n font-size: 1rem;\n line-height: 1.5rem;\n font-weight: 300;\n font-family: '
|
|
1
|
+
{"version":3,"file":"TuixCheckbox.styles.js","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from 'lit';\nimport { Palette } from '../utils/colors';\nimport { DarkPalette } from '../utils/darkColors';\n\nexport const hostStyles = css`\n :host {\n --t-main-color-tuix: ${unsafeCSS(Palette.MAIN)};\n --t-bg-color-primary: ${unsafeCSS(Palette.WHITE)};\n --t-bg-color-disabled: ${unsafeCSS(Palette.PRIMARY_100)};\n --t-text-color-error: ${unsafeCSS(Palette.ERROR)};\n --t-stroke-color-focus: ${unsafeCSS(Palette.SECONDARY)};\n --t-stroke-color-grey: ${unsafeCSS(Palette.PRIMARY_300)};\n --t-text-color-label: ${unsafeCSS(Palette.BLACK)};\n }\n :host([dark]) {\n --t-main-color-tuix: ${unsafeCSS(DarkPalette.MAIN)};\n --t-bg-color-primary: ${unsafeCSS(DarkPalette.BLACK)};\n --t-bg-color-disabled: ${unsafeCSS(DarkPalette.PRIMARY_800)};\n --t-text-color-error: ${unsafeCSS(DarkPalette.ERROR)};\n --t-stroke-color-focus: ${unsafeCSS(DarkPalette.SECONDARY)};\n --t-stroke-color-grey: ${unsafeCSS(DarkPalette.PRIMARY_100)};\n --t-text-color-label: ${unsafeCSS(DarkPalette.WHITE)};\n }\n`;\n\nexport const checkboxContainerStyles = css`\n .t-checkbox-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-checkbox-full-container {\n cursor: not-allowed;\n }\n .t-checkbox-container {\n display: block;\n position: relative;\n height: 1.5rem;\n width: 1.5rem;\n }\n .t-checkbox-container .t-checkbox {\n position: absolute;\n opacity: 0;\n height: 0;\n width: 0;\n }\n`;\n\nexport const checkboxCheckmarkStyles = css`\n .t-checkbox-container .t-checkbox-checkmark {\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n height: 1.5rem;\n width: 1.5rem;\n border-radius: 0.25rem;\n background-color: var(--t-bg-color-primary);\n border: 2px solid var(--t-stroke-color-grey);\n box-sizing: border-box;\n }\n .t-checkbox-container .t-checkbox-checkmark tuix-icon {\n margin: auto;\n display: none;\n }\n .t-checkbox-container .t-checkbox:checked ~ .t-checkbox-checkmark {\n background-color: var(--t-main-color-tuix);\n border: none;\n }\n .t-checkbox-container .t-checkbox:focus ~ .t-checkbox-checkmark {\n box-shadow: 0 0 0px 2px var(--t-stroke-color-focus);\n border: 2px solid var(--t-main-color-tuix);\n }\n .t-checkbox-container .t-checkbox:checked ~ .t-checkbox-checkmark tuix-icon {\n display: block;\n }\n .t-checkbox-full-container:hover .t-checkbox-container .t-checkbox-checkmark {\n border: 2px solid var(--t-main-color-tuix);\n }\n .t-checkbox-full-container.t-with-error\n .t-checkbox-container\n .t-checkbox-checkmark {\n border: 2px solid var(--t-text-color-error);\n }\n .t-checkbox-full-container.t-with-error\n .t-checkbox-container\n .t-checkbox:checked\n ~ .t-checkbox-checkmark {\n background-color: var(--t-text-color-error);\n border: none;\n }\n .t-checkbox-container .t-checkbox:disabled ~ .t-checkbox-checkmark {\n background-color: var(--t-bg-color-disabled);\n border: none;\n box-shadow: none;\n }\n`;\n\nexport const checkboxLabelStyles = css`\n .t-checkbox-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-checkbox-full-container.t-with-label-left {\n flex-direction: row-reverse;\n }\n .t-checkbox-full-container.t-with-label-left .t-checkbox-label {\n margin-right: 0.625rem;\n margin-left: 0;\n }\n`;\n"]}
|
|
@@ -11,13 +11,13 @@ export const dropdownHostStyles = css `
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
:host([dark]) {
|
|
14
|
-
--t-field-color-option: ${unsafeCSS(DarkPalette.
|
|
14
|
+
--t-field-color-option: ${unsafeCSS(DarkPalette.ELEVATION_2)};
|
|
15
15
|
}
|
|
16
16
|
`;
|
|
17
17
|
export const dropdownMainContainerStyles = css `
|
|
18
18
|
.t-dropdown-full-container {
|
|
19
19
|
position: relative;
|
|
20
|
-
font-family: '
|
|
20
|
+
font-family: 'Rubik', sans-serif;
|
|
21
21
|
}
|
|
22
22
|
.t-dropdown-container .t-input-dropdown {
|
|
23
23
|
--t-field-input-cursor: pointer;
|
|
@@ -36,7 +36,7 @@ export const dropdownOptionStyles = css `
|
|
|
36
36
|
overflow-y: auto;
|
|
37
37
|
max-height: 250px;
|
|
38
38
|
color: var(--t-field-color-text);
|
|
39
|
-
box-shadow: 0px 2px 8px 0px
|
|
39
|
+
box-shadow: 0px 2px 8px 0px ${unsafeCSS(Palette.SHADOW)};
|
|
40
40
|
z-index: 9999;
|
|
41
41
|
}
|
|
42
42
|
.t-options-container::-webkit-scrollbar {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TuixDropdown.styles.js","sourceRoot":"","sources":["../../../src/tuix-dropdown/TuixDropdown.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAA;IACjC,UAAU;;8BAEgB,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;4BAC1B,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC;;;;8BAIrB,SAAS,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"TuixDropdown.styles.js","sourceRoot":"","sources":["../../../src/tuix-dropdown/TuixDropdown.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAA;IACjC,UAAU;;8BAEgB,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;4BAC1B,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC;;;;8BAIrB,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC;;CAE/D,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAA;;;;;;;;CAQ7C,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAA;;;;;;;;;;;;;kCAaL,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC;;;;;;;;;;wBAUnC,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAoCf,WAAW,CAAC,MAAM;;;;;;uCAMlB,WAAW,CAAC,MAAM;;;;;;CAMxD,CAAC","sourcesContent":["import { css, unsafeCSS } from 'lit';\nimport { hostStyles } from '../tuix-input/TuixInput.styles';\nimport { Palette } from '../utils/colors';\nimport { ScreenSizes } from '../utils/screenSizes.enum';\nimport { DarkPalette } from '../utils/darkColors';\n\nexport const dropdownHostStyles = css`\n ${hostStyles}\n :host {\n --t-field-color-option: ${unsafeCSS(Palette.WHITE)};\n --t-field-color-main: ${unsafeCSS(Palette.MAIN)};\n }\n\n :host([dark]) {\n --t-field-color-option: ${unsafeCSS(DarkPalette.ELEVATION_2)};\n }\n`;\n\nexport const dropdownMainContainerStyles = css`\n .t-dropdown-full-container {\n position: relative;\n font-family: 'Rubik', sans-serif;\n }\n .t-dropdown-container .t-input-dropdown {\n --t-field-input-cursor: pointer;\n }\n`;\n\nexport const dropdownOptionStyles = css`\n .t-options-container {\n width: 100%;\n position: absolute;\n top: calc(100% + 2px);\n left: 0;\n border: none;\n border-radius: 0 0 5px 5px;\n background-color: var(--t-field-color-option);\n visibility: collapse;\n overflow-y: auto;\n max-height: 250px;\n color: var(--t-field-color-text);\n box-shadow: 0px 2px 8px 0px ${unsafeCSS(Palette.SHADOW)};\n z-index: 9999;\n }\n .t-options-container::-webkit-scrollbar {\n width: 0.75rem;\n }\n .t-options-container::-webkit-scrollbar-track {\n background-color: transparent;\n }\n .t-options-container::-webkit-scrollbar-thumb {\n background-color: ${unsafeCSS(Palette.PRIMARY_100)};\n border-radius: 0.25rem;\n border: 0.188rem solid transparent;\n background-clip: content-box;\n }\n .t-options-container.show {\n visibility: visible;\n }\n .t-options-container.show.t-with-description {\n top: calc(100% + 2px - 1.5rem);\n }\n @media only screen and (max-height: 500px) {\n .t-options-container {\n max-height: 50vh;\n }\n }\n .t-dropdown-option {\n padding: 0.75rem 1rem;\n cursor: pointer;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5rem;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n .t-dropdown-option.t-option-hover {\n background-color: var(--t-field-color-form);\n }\n .t-dropdown-option.t-option-selected {\n color: var(--t-field-color-main);\n }\n .t-dropdown-option:focus {\n outline: none;\n }\n @media only screen and (max-width: ${ScreenSizes.TABLET}px) {\n .t-dropdown-option {\n font-size: 1rem;\n line-height: 1.25rem;\n }\n }\n @media only screen and (max-width: ${ScreenSizes.MOBILE}px) {\n .t-dropdown-option {\n font-size: 0.875rem;\n line-height: 1rem;\n }\n }\n`;\n"]}
|
|
@@ -64,7 +64,7 @@ export const inputComponentStyles = css `
|
|
|
64
64
|
.t-input {
|
|
65
65
|
padding: 1rem ${unsafeCSS(inputVars.paddingX)};
|
|
66
66
|
border-radius: 4px;
|
|
67
|
-
font-family: '
|
|
67
|
+
font-family: 'Rubik', sans-serif;
|
|
68
68
|
cursor: var(--t-field-input-cursor);
|
|
69
69
|
width: 100%;
|
|
70
70
|
box-sizing: border-box;
|
|
@@ -174,7 +174,7 @@ export const inputTitleStyles = css `
|
|
|
174
174
|
position: absolute;
|
|
175
175
|
top: 50%;
|
|
176
176
|
left: 1.25rem;
|
|
177
|
-
font-family: '
|
|
177
|
+
font-family: 'Rubik', sans-serif;
|
|
178
178
|
color: var(--t-field-color-title);
|
|
179
179
|
transform: translateY(-50%);
|
|
180
180
|
transition-duration: 0.3s;
|
|
@@ -301,7 +301,7 @@ export const inputSearchStyles = css `
|
|
|
301
301
|
export const inputDescriptionStyles = css `
|
|
302
302
|
.t-input-description-container {
|
|
303
303
|
margin-top: 0.5rem;
|
|
304
|
-
font-family: '
|
|
304
|
+
font-family: 'Rubik', sans-serif;
|
|
305
305
|
font-size: 0.75rem;
|
|
306
306
|
line-height: 1rem;
|
|
307
307
|
color: var(--t-field-color-description);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TuixInput.styles.js","sourceRoot":"","sources":["../../../src/tuix-input/TuixInput.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,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,SAAS,GAAG;IAChB,IAAI,EAAE,MAAM;IACZ,eAAe,EAAE,QAAQ;IACzB,cAAc,EAAE,MAAM;IACtB,QAAQ,EAAE,SAAS;CACpB,CAAC;AAEF,MAAM,iBAAiB,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;AAC3D,MAAM,YAAY,GAAG,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAEjD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;4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;;;;;;;;;;;;;;;;;CAiBxC,CAAC","sourcesContent":["import { css, unsafeCSS } from 'lit';\nimport { ScreenSizes } from '../utils/screenSizes.enum';\nimport { Palette } from '../utils/colors';\nimport { DarkPalette } from '../utils/darkColors';\nimport { hexToRgb } from '../utils/hex-rgb';\n\nconst inputVars = {\n gapX: '10px',\n iconDesktopSize: '1.5rem',\n iconTabletSize: '1rem',\n paddingX: '1.25rem',\n};\n\nconst rgbDarkValidation = hexToRgb(DarkPalette.VALIDATION);\nconst rgbDarkError = hexToRgb(DarkPalette.ERROR);\n\nexport const hostStyles = css`\n :host {\n --t-field-color-form: ${unsafeCSS(Palette.PRIMARY_50)};\n --t-field-color-title: ${unsafeCSS(Palette.PRIMARY_300)};\n --t-field-color-text: ${unsafeCSS(Palette.BLACK)};\n --t-field-color-description: ${unsafeCSS(Palette.NEUTRAL_600)};\n --t-field-color-stroke-hover: ${unsafeCSS(Palette.PRIMARY_300)};\n --t-field-color-stroke-focus: ${unsafeCSS(Palette.MAIN)};\n --t-field-color-text-disabled: ${unsafeCSS(Palette.PRIMARY_300)};\n --t-field-color-stroke-validation: ${unsafeCSS(Palette.VALIDATION_200)};\n --t-field-color-bg-validation: ${unsafeCSS(Palette.VALIDATION_50)};\n --t-field-color-stroke-loading: ${unsafeCSS(Palette.PRIMARY_300)};\n --t-field-color-bg-error: ${unsafeCSS(Palette.ERROR_50)};\n --t-field-color-stroke-error: ${unsafeCSS(Palette.ERROR_200)};\n --t-field-input-cursor: auto;\n }\n :host([dark]) {\n --t-field-color-form: ${unsafeCSS(DarkPalette.PRIMARY_950)};\n --t-field-color-text: ${unsafeCSS(DarkPalette.PRIMARY_100)};\n --t-field-color-description: ${unsafeCSS(DarkPalette.NEUTRAL_200)};\n --t-field-color-stroke-focus: ${unsafeCSS(DarkPalette.SECONDARY)};\n --t-field-color-text-disabled: ${unsafeCSS(DarkPalette.PRIMARY_800)};\n --t-field-color-stroke-validation: ${unsafeCSS(DarkPalette.VALIDATION_200)};\n --t-field-color-bg-validation: rgba(\n ${rgbDarkValidation.r},\n ${rgbDarkValidation.g},\n ${rgbDarkValidation.b},\n 0.2\n );\n --t-field-color-bg-error: rgba(\n ${rgbDarkError.r},\n ${rgbDarkError.g},\n ${rgbDarkError.b},\n 0.2\n );\n --t-field-color-stroke-error: ${unsafeCSS(DarkPalette.ERROR_200)};\n }\n`;\n\nexport const inputComponentStyles = css`\n .t-input-container {\n position: relative;\n --t-padding-x-desktop-with-icon: calc(\n ${unsafeCSS(inputVars.paddingX)} + ${unsafeCSS(inputVars.iconDesktopSize)} +\n ${unsafeCSS(inputVars.gapX)}\n );\n --t-padding-x-tablet-with-icon: calc(\n ${unsafeCSS(inputVars.paddingX)} + ${unsafeCSS(inputVars.iconTabletSize)} +\n ${unsafeCSS(inputVars.gapX)}\n );\n }\n .t-input {\n padding: 1rem ${unsafeCSS(inputVars.paddingX)};\n border-radius: 4px;\n font-family: 'rubik', sans-serif;\n cursor: var(--t-field-input-cursor);\n width: 100%;\n box-sizing: border-box;\n }\n .t-input.with-title {\n padding-top: 1.5rem;\n padding-bottom: 0.5rem;\n }\n .t-input.with-icon-right {\n padding-right: var(--t-padding-x-desktop-with-icon);\n }\n @media only screen and (max-width: ${ScreenSizes.TABLET}px) {\n .t-input {\n padding-top: 0.875rem;\n padding-bottom: 0.875rem;\n }\n .t-input.with-title {\n padding-top: 1.375rem;\n padding-bottom: 0.375rem;\n }\n .t-input.with-icon-right {\n padding-right: var(--t-padding-x-tablet-with-icon);\n }\n }\n @media only screen and (max-width: ${ScreenSizes.MOBILE}px) {\n .t-input {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n }\n .t-input.with-title {\n padding-top: 1.25rem;\n padding-bottom: 0.25rem;\n }\n .t-input.with-icon-right {\n padding-right: var(--t-padding-x-tablet-with-icon);\n }\n }\n`;\n\nexport const inputFontStyles = css`\n .t-input::placeholder,\n .t-input,\n .t-title {\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5rem;\n }\n @media only screen and (max-width: ${ScreenSizes.TABLET}px) {\n .t-input::placeholder {\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n .t-input {\n font-size: 1rem;\n line-height: 1.25rem;\n }\n }\n @media only screen and (max-width: ${ScreenSizes.MOBILE}px) {\n .t-input {\n font-size: 0.875rem;\n line-height: 1rem;\n }\n .t-input::placeholder {\n line-height: 1rem;\n }\n }\n`;\n\nexport const inputColorStyles = css`\n .t-input {\n background-color: var(--t-field-color-form);\n border: 1px solid var(--t-field-color-form);\n color: var(--t-field-color-text);\n }\n .t-input-container:hover .t-input,\n .t-input:hover {\n border: 1px solid var(--t-field-color-stroke-hover);\n }\n .t-input:focus {\n border: 1px solid var(--t-field-color-stroke-focus);\n outline: 1px solid var(--t-field-color-stroke-focus);\n }\n .t-input[disabled]:disabled {\n cursor: not-allowed;\n border: none;\n color: var(--t-field-color-text-disabled);\n }\n .t-input.with-title::placeholder {\n color: transparent;\n }\n .t-input::placeholder,\n .t-input.with-title:focus::placeholder {\n color: var(--t-field-color-title);\n }\n .t-input.with-warning {\n border: 1px solid var(--t-field-color-stroke-validation);\n background-color: var(--t-field-color-bg-validation);\n }\n .t-input.with-error {\n border: 1px solid var(--t-field-color-stroke-error);\n background-color: var(--t-field-color-bg-error);\n }\n .t-input.with-loading {\n border: 1px solid var(--t-field-color-stroke-loading);\n }\n`;\n\nexport const inputTitleStyles = css`\n .t-title {\n position: absolute;\n top: 50%;\n left: 1.25rem;\n font-family: 'rubik', sans-serif;\n color: var(--t-field-color-title);\n transform: translateY(-50%);\n transition-duration: 0.3s;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n .t-textarea-container .t-title {\n top: 1rem;\n transform: none;\n }\n .t-input.with-title:focus + .t-title,\n .t-input.with-title:not(:placeholder-shown) + .t-title {\n font-size: 0.75rem;\n font-weight: 400;\n line-height: 1rem;\n transform: translateY(0);\n top: 0.5rem;\n }\n @media only screen and (max-width: ${ScreenSizes.TABLET}px) {\n .t-title {\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n .t-input.with-title:focus + .t-title,\n .t-input.with-title:not(:placeholder-shown) + .t-title {\n top: 0.375rem;\n }\n .t-textarea-container .t-title {\n top: 0.875rem;\n }\n }\n @media only screen and (max-width: ${ScreenSizes.MOBILE}px) {\n .t-input.with-title:focus + .t-title,\n .t-input.with-title:not(:placeholder-shown) + .t-title {\n top: 0.25rem;\n }\n .t-textarea-container .t-title {\n top: 0.75rem;\n }\n }\n`;\n\nexport const inputIconStyles = css`\n .t-input-container .t-icon-set-container {\n height: ${unsafeCSS(inputVars.iconDesktopSize)};\n width: ${unsafeCSS(inputVars.iconDesktopSize)};\n cursor: var(--t-field-input-cursor);\n }\n .t-icon-set-container.t-icon-click {\n cursor: pointer;\n }\n .t-input-container .t-icon-set-container.t-icon-right {\n position: absolute;\n top: 50%;\n right: ${unsafeCSS(inputVars.paddingX)};\n transform: translateY(-50%);\n }\n .t-input-container .t-icon-set-container.t-icon-left {\n position: absolute;\n top: 50%;\n left: ${unsafeCSS(inputVars.paddingX)};\n transform: translateY(-50%);\n }\n .t-icon-inactive {\n display: inline;\n }\n .t-icon-active {\n display: none;\n }\n .t-icon-disabled {\n display: none;\n }\n .t-input-container:hover .t-icon-set-container .t-icon-inactive,\n .t-input:hover ~ .t-icon-set-container .t-icon-inactive,\n .t-input:focus ~ .t-icon-set-container .t-icon-inactive {\n display: none;\n }\n .t-input-container:hover .t-icon-set-container .t-icon-active,\n .t-input:hover ~ .t-icon-set-container .t-icon-active,\n .t-input:focus ~ .t-icon-set-container .t-icon-active {\n display: inline;\n }\n .t-input[disabled] ~ .t-icon-set-container .t-icon-active {\n display: none;\n }\n .t-input[disabled] ~ .t-icon-set-container .t-icon-inactive {\n display: none;\n }\n .t-input[disabled] ~ .t-icon-set-container .t-icon-disabled {\n display: inline;\n cursor: not-allowed;\n }\n @media only screen and (max-width: ${ScreenSizes.TABLET}px) {\n .t-input-container .t-icon-set-container {\n height: ${unsafeCSS(inputVars.iconTabletSize)};\n width: ${unsafeCSS(inputVars.iconTabletSize)};\n }\n }\n`;\n\nexport const inputSearchStyles = css`\n .t-input[type='search'] {\n padding-left: var(--t-padding-x-desktop-with-icon);\n }\n .t-input[type='search'] + .t-title {\n left: var(--t-padding-x-desktop-with-icon);\n }\n @media only screen and (max-width: ${ScreenSizes.TABLET}px) {\n .t-input[type='search'] {\n padding-left: var(--t-padding-x-tablet-with-icon);\n }\n .t-input[type='search'] + .t-title {\n left: var(--t-padding-x-tablet-with-icon);\n }\n }\n input[type='search']::-webkit-search-decoration,\n input[type='search']::-webkit-search-cancel-button,\n input[type='search']::-webkit-search-results-button,\n input[type='search']::-webkit-search-results-decoration {\n display: none;\n }\n`;\n\nexport const inputDescriptionStyles = css`\n .t-input-description-container {\n margin-top: 0.5rem;\n font-family: 'rubik', sans-serif;\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--t-field-color-description);\n display: flex;\n justify-content: space-between;\n }\n .t-input-description-container .t-letter-counter {\n align-self: flex-end;\n }\n .t-input-description-container .t-input-description {\n display: flex;\n gap: 0.5rem;\n }\n`;\n"]}
|
|
1
|
+
{"version":3,"file":"TuixInput.styles.js","sourceRoot":"","sources":["../../../src/tuix-input/TuixInput.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,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,SAAS,GAAG;IAChB,IAAI,EAAE,MAAM;IACZ,eAAe,EAAE,QAAQ;IACzB,cAAc,EAAE,MAAM;IACtB,QAAQ,EAAE,SAAS;CACpB,CAAC;AAEF,MAAM,iBAA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AGjD,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;uCAOG,WAAW,CAAC,MAAM;;;;;;;;;;;;;;CAcxD,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;CAiBxC,CAAC","sourcesContent":["import { css, unsafeCSS } from 'lit';\nimport { ScreenSizes } from '../utils/screenSizes.enum';\nimport { Palette } from '../utils/colors';\nimport { DarkPalette } from '../utils/darkColors';\nimport { hexToRgb } from '../utils/hex-rgb';\n\nconst inputVars = {\n gapX: '10px',\n iconDesktopSize: '1.5rem',\n iconTabletSize: '1rem',\n paddingX: '1.25rem',\n};\n\nconst rgbDarkValidation = hexToRgb(DarkPalette.VALIDATION);\nconst rgbDarkError = hexToRgb(DarkPalette.ERROR);\n\nexport const hostStyles = css`\n :host {\n --t-field-color-form: ${unsafeCSS(Palette.PRIMARY_50)};\n --t-field-color-title: ${unsafeCSS(Palette.PRIMARY_300)};\n --t-field-color-text: ${unsafeCSS(Palette.BLACK)};\n --t-field-color-description: ${unsafeCSS(Palette.NEUTRAL_600)};\n --t-field-color-stroke-hover: ${unsafeCSS(Palette.PRIMARY_300)};\n --t-field-color-stroke-focus: ${unsafeCSS(Palette.MAIN)};\n --t-field-color-text-disabled: ${unsafeCSS(Palette.PRIMARY_300)};\n --t-field-color-stroke-validation: ${unsafeCSS(Palette.VALIDATION_200)};\n --t-field-color-bg-validation: ${unsafeCSS(Palette.VALIDATION_50)};\n --t-field-color-stroke-loading: ${unsafeCSS(Palette.PRIMARY_300)};\n --t-field-color-bg-error: ${unsafeCSS(Palette.ERROR_50)};\n --t-field-color-stroke-error: ${unsafeCSS(Palette.ERROR_200)};\n --t-field-input-cursor: auto;\n }\n :host([dark]) {\n --t-field-color-form: ${unsafeCSS(DarkPalette.PRIMARY_950)};\n --t-field-color-text: ${unsafeCSS(DarkPalette.PRIMARY_100)};\n --t-field-color-description: ${unsafeCSS(DarkPalette.NEUTRAL_200)};\n --t-field-color-stroke-focus: ${unsafeCSS(DarkPalette.SECONDARY)};\n --t-field-color-text-disabled: ${unsafeCSS(DarkPalette.PRIMARY_800)};\n --t-field-color-stroke-validation: ${unsafeCSS(DarkPalette.VALIDATION_200)};\n --t-field-color-bg-validation: rgba(\n ${rgbDarkValidation.r},\n ${rgbDarkValidation.g},\n ${rgbDarkValidation.b},\n 0.2\n );\n --t-field-color-bg-error: rgba(\n ${rgbDarkError.r},\n ${rgbDarkError.g},\n ${rgbDarkError.b},\n 0.2\n );\n --t-field-color-stroke-error: ${unsafeCSS(DarkPalette.ERROR_200)};\n }\n`;\n\nexport const inputComponentStyles = css`\n .t-input-container {\n position: relative;\n --t-padding-x-desktop-with-icon: calc(\n ${unsafeCSS(inputVars.paddingX)} + ${unsafeCSS(inputVars.iconDesktopSize)} +\n ${unsafeCSS(inputVars.gapX)}\n );\n --t-padding-x-tablet-with-icon: calc(\n ${unsafeCSS(inputVars.paddingX)} + ${unsafeCSS(inputVars.iconTabletSize)} +\n ${unsafeCSS(inputVars.gapX)}\n );\n }\n .t-input {\n padding: 1rem ${unsafeCSS(inputVars.paddingX)};\n border-radius: 4px;\n font-family: 'Rubik', sans-serif;\n cursor: var(--t-field-input-cursor);\n width: 100%;\n box-sizing: border-box;\n }\n .t-input.with-title {\n padding-top: 1.5rem;\n padding-bottom: 0.5rem;\n }\n .t-input.with-icon-right {\n padding-right: var(--t-padding-x-desktop-with-icon);\n }\n @media only screen and (max-width: ${ScreenSizes.TABLET}px) {\n .t-input {\n padding-top: 0.875rem;\n padding-bottom: 0.875rem;\n }\n .t-input.with-title {\n padding-top: 1.375rem;\n padding-bottom: 0.375rem;\n }\n .t-input.with-icon-right {\n padding-right: var(--t-padding-x-tablet-with-icon);\n }\n }\n @media only screen and (max-width: ${ScreenSizes.MOBILE}px) {\n .t-input {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n }\n .t-input.with-title {\n padding-top: 1.25rem;\n padding-bottom: 0.25rem;\n }\n .t-input.with-icon-right {\n padding-right: var(--t-padding-x-tablet-with-icon);\n }\n }\n`;\n\nexport const inputFontStyles = css`\n .t-input::placeholder,\n .t-input,\n .t-title {\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5rem;\n }\n @media only screen and (max-width: ${ScreenSizes.TABLET}px) {\n .t-input::placeholder {\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n .t-input {\n font-size: 1rem;\n line-height: 1.25rem;\n }\n }\n @media only screen and (max-width: ${ScreenSizes.MOBILE}px) {\n .t-input {\n font-size: 0.875rem;\n line-height: 1rem;\n }\n .t-input::placeholder {\n line-height: 1rem;\n }\n }\n`;\n\nexport const inputColorStyles = css`\n .t-input {\n background-color: var(--t-field-color-form);\n border: 1px solid var(--t-field-color-form);\n color: var(--t-field-color-text);\n }\n .t-input-container:hover .t-input,\n .t-input:hover {\n border: 1px solid var(--t-field-color-stroke-hover);\n }\n .t-input:focus {\n border: 1px solid var(--t-field-color-stroke-focus);\n outline: 1px solid var(--t-field-color-stroke-focus);\n }\n .t-input[disabled]:disabled {\n cursor: not-allowed;\n border: none;\n color: var(--t-field-color-text-disabled);\n }\n .t-input.with-title::placeholder {\n color: transparent;\n }\n .t-input::placeholder,\n .t-input.with-title:focus::placeholder {\n color: var(--t-field-color-title);\n }\n .t-input.with-warning {\n border: 1px solid var(--t-field-color-stroke-validation);\n background-color: var(--t-field-color-bg-validation);\n }\n .t-input.with-error {\n border: 1px solid var(--t-field-color-stroke-error);\n background-color: var(--t-field-color-bg-error);\n }\n .t-input.with-loading {\n border: 1px solid var(--t-field-color-stroke-loading);\n }\n`;\n\nexport const inputTitleStyles = css`\n .t-title {\n position: absolute;\n top: 50%;\n left: 1.25rem;\n font-family: 'Rubik', sans-serif;\n color: var(--t-field-color-title);\n transform: translateY(-50%);\n transition-duration: 0.3s;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n .t-textarea-container .t-title {\n top: 1rem;\n transform: none;\n }\n .t-input.with-title:focus + .t-title,\n .t-input.with-title:not(:placeholder-shown) + .t-title {\n font-size: 0.75rem;\n font-weight: 400;\n line-height: 1rem;\n transform: translateY(0);\n top: 0.5rem;\n }\n @media only screen and (max-width: ${ScreenSizes.TABLET}px) {\n .t-title {\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n .t-input.with-title:focus + .t-title,\n .t-input.with-title:not(:placeholder-shown) + .t-title {\n top: 0.375rem;\n }\n .t-textarea-container .t-title {\n top: 0.875rem;\n }\n }\n @media only screen and (max-width: ${ScreenSizes.MOBILE}px) {\n .t-input.with-title:focus + .t-title,\n .t-input.with-title:not(:placeholder-shown) + .t-title {\n top: 0.25rem;\n }\n .t-textarea-container .t-title {\n top: 0.75rem;\n }\n }\n`;\n\nexport const inputIconStyles = css`\n .t-input-container .t-icon-set-container {\n height: ${unsafeCSS(inputVars.iconDesktopSize)};\n width: ${unsafeCSS(inputVars.iconDesktopSize)};\n cursor: var(--t-field-input-cursor);\n }\n .t-icon-set-container.t-icon-click {\n cursor: pointer;\n }\n .t-input-container .t-icon-set-container.t-icon-right {\n position: absolute;\n top: 50%;\n right: ${unsafeCSS(inputVars.paddingX)};\n transform: translateY(-50%);\n }\n .t-input-container .t-icon-set-container.t-icon-left {\n position: absolute;\n top: 50%;\n left: ${unsafeCSS(inputVars.paddingX)};\n transform: translateY(-50%);\n }\n .t-icon-inactive {\n display: inline;\n }\n .t-icon-active {\n display: none;\n }\n .t-icon-disabled {\n display: none;\n }\n .t-input-container:hover .t-icon-set-container .t-icon-inactive,\n .t-input:hover ~ .t-icon-set-container .t-icon-inactive,\n .t-input:focus ~ .t-icon-set-container .t-icon-inactive {\n display: none;\n }\n .t-input-container:hover .t-icon-set-container .t-icon-active,\n .t-input:hover ~ .t-icon-set-container .t-icon-active,\n .t-input:focus ~ .t-icon-set-container .t-icon-active {\n display: inline;\n }\n .t-input[disabled] ~ .t-icon-set-container .t-icon-active {\n display: none;\n }\n .t-input[disabled] ~ .t-icon-set-container .t-icon-inactive {\n display: none;\n }\n .t-input[disabled] ~ .t-icon-set-container .t-icon-disabled {\n display: inline;\n cursor: not-allowed;\n }\n @media only screen and (max-width: ${ScreenSizes.TABLET}px) {\n .t-input-container .t-icon-set-container {\n height: ${unsafeCSS(inputVars.iconTabletSize)};\n width: ${unsafeCSS(inputVars.iconTabletSize)};\n }\n }\n`;\n\nexport const inputSearchStyles = css`\n .t-input[type='search'] {\n padding-left: var(--t-padding-x-desktop-with-icon);\n }\n .t-input[type='search'] + .t-title {\n left: var(--t-padding-x-desktop-with-icon);\n }\n @media only screen and (max-width: ${ScreenSizes.TABLET}px) {\n .t-input[type='search'] {\n padding-left: var(--t-padding-x-tablet-with-icon);\n }\n .t-input[type='search'] + .t-title {\n left: var(--t-padding-x-tablet-with-icon);\n }\n }\n input[type='search']::-webkit-search-decoration,\n input[type='search']::-webkit-search-cancel-button,\n input[type='search']::-webkit-search-results-button,\n input[type='search']::-webkit-search-results-decoration {\n display: none;\n }\n`;\n\nexport const inputDescriptionStyles = css`\n .t-input-description-container {\n margin-top: 0.5rem;\n font-family: 'Rubik', sans-serif;\n font-size: 0.75rem;\n line-height: 1rem;\n color: var(--t-field-color-description);\n display: flex;\n justify-content: space-between;\n }\n .t-input-description-container .t-letter-counter {\n align-self: flex-end;\n }\n .t-input-description-container .t-input-description {\n display: flex;\n gap: 0.5rem;\n }\n`;\n"]}
|
|
@@ -5,6 +5,7 @@ import { MainVariant } from '../utils/mainVariant.enum';
|
|
|
5
5
|
import { LinkTarget } from './enums/linkTarget.enum';
|
|
6
6
|
import { classMap } from 'lit/directives/class-map.js';
|
|
7
7
|
import { linkStyles } from './TuixLink.styles';
|
|
8
|
+
import { linkFontStyles } from '../tuix-text/TuixText.styles';
|
|
8
9
|
let TuixLink = class TuixLink extends LitElement {
|
|
9
10
|
constructor() {
|
|
10
11
|
super(...arguments);
|
|
@@ -13,7 +14,7 @@ let TuixLink = class TuixLink extends LitElement {
|
|
|
13
14
|
this.disabled = false;
|
|
14
15
|
this.dark = false;
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
+
_getClassMap() {
|
|
17
18
|
return {
|
|
18
19
|
link: true,
|
|
19
20
|
disabled: this.disabled,
|
|
@@ -24,7 +25,7 @@ let TuixLink = class TuixLink extends LitElement {
|
|
|
24
25
|
return html `
|
|
25
26
|
<a
|
|
26
27
|
target="${this.disabled ? LinkTarget.SELF : this.target}"
|
|
27
|
-
class="${classMap(this.
|
|
28
|
+
class="${classMap(this._getClassMap())}"
|
|
28
29
|
href="${this.disabled ? 'javascript:void(0)' : this.href}"
|
|
29
30
|
>
|
|
30
31
|
<slot></slot>
|
|
@@ -33,7 +34,7 @@ let TuixLink = class TuixLink extends LitElement {
|
|
|
33
34
|
}
|
|
34
35
|
_divTemplate() {
|
|
35
36
|
return html `
|
|
36
|
-
<div class="${classMap(this.
|
|
37
|
+
<div class="${classMap(this._getClassMap())}">
|
|
37
38
|
<slot></slot>
|
|
38
39
|
</div>
|
|
39
40
|
`;
|
|
@@ -48,7 +49,7 @@ let TuixLink = class TuixLink extends LitElement {
|
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
};
|
|
51
|
-
TuixLink.styles = [linkStyles];
|
|
52
|
+
TuixLink.styles = [linkStyles, linkFontStyles];
|
|
52
53
|
__decorate([
|
|
53
54
|
property({ type: String })
|
|
54
55
|
], TuixLink.prototype, "href", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TuixLink.js","sourceRoot":"","sources":["../../../src/tuix-link/TuixLink.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,C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B,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI;;;;KAI3D,CAAC;IACJ,CAAC;IAEO,YAAY;QAClB,OAAO,IAAI,CAAA;oBACK,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;;;KAG5C,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;QAClD,IAAI,aAAa,EAAE;YACjB,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC;SAC/B;aAAM;YACL,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC;SAC5B;IACH,CAAC;;AApDM,eAAM,GAAG,CAAC,UAAU,EAAE,cAAc,CAAC,AAA/B,CAAgC;AAG7C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sCACb;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;wCACL;AAG1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCACjB;AAG9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAC1B;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sCAC9B;AAhBF,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAsDpB;SAtDY,QAAQ","sourcesContent":["import { html, LitElement, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { MainVariant } from '../utils/mainVariant.enum';\nimport { LinkTarget } from './enums/linkTarget.enum';\nimport { ClassInfo, classMap } from 'lit/directives/class-map.js';\nimport { linkStyles } from './TuixLink.styles';\nimport { linkFontStyles } from '../tuix-text/TuixText.styles';\n\n@customElement('tuix-link')\nexport class TuixLink extends LitElement {\n static styles = [linkStyles, linkFontStyles];\n\n @property({ type: String })\n href?: string;\n\n @property({ type: LinkTarget })\n target = LinkTarget.BLANK;\n\n @property({ type: MainVariant, reflect: true })\n variant = MainVariant.PRIMARY;\n\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n @property({ type: Boolean, reflect: true })\n dark = false;\n\n private _getClassMap(): ClassInfo {\n return {\n link: true,\n disabled: this.disabled,\n [MainVariant.SECONDARY]: this.variant === MainVariant.SECONDARY,\n };\n }\n\n private _anchorTemplate(): TemplateResult {\n return html`\n <a\n target=\"${this.disabled ? LinkTarget.SELF : this.target}\"\n class=\"${classMap(this._getClassMap())}\"\n href=\"${this.disabled ? 'javascript:void(0)' : this.href}\"\n >\n <slot></slot>\n </a>\n `;\n }\n\n private _divTemplate(): TemplateResult {\n return html`\n <div class=\"${classMap(this._getClassMap())}\">\n <slot></slot>\n </div>\n `;\n }\n\n render() {\n const isValidAnchor = this.href && !this.disabled;\n if (isValidAnchor) {\n return this._anchorTemplate();\n } else {\n return this._divTemplate();\n }\n }\n}\n"]}
|
|
@@ -1,43 +1,39 @@
|
|
|
1
1
|
import { css, unsafeCSS } from 'lit';
|
|
2
2
|
import { MainVariant } from '../utils/mainVariant.enum';
|
|
3
3
|
import { Palette } from '../utils/colors';
|
|
4
|
-
import { ScreenSizes } from '../utils/screenSizes.enum';
|
|
5
4
|
import { DarkPalette } from '../utils/darkColors';
|
|
5
|
+
export const LINK_TEXT_COLOR_VAR_NAME = '--t-link-text-color';
|
|
6
6
|
export const linkStyles = css `
|
|
7
7
|
${unsafeCSS(`
|
|
8
8
|
:host {
|
|
9
9
|
--t-link-border-color: ${Palette.MAIN};
|
|
10
|
-
|
|
10
|
+
${LINK_TEXT_COLOR_VAR_NAME}: ${Palette.MAIN}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
:host([dark]) {
|
|
14
14
|
--t-link-border-color: ${DarkPalette.MAIN};
|
|
15
|
-
|
|
15
|
+
${LINK_TEXT_COLOR_VAR_NAME}: ${DarkPalette.MAIN}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
:host([variant=${MainVariant.SECONDARY}]) {
|
|
19
19
|
--t-link-border-color: ${Palette.WHITE};
|
|
20
|
-
|
|
20
|
+
${LINK_TEXT_COLOR_VAR_NAME}: ${Palette.WHITE}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
:host([variant=${MainVariant.SECONDARY}][dark]) {
|
|
24
24
|
--t-link-border-color: ${DarkPalette.WHITE};
|
|
25
|
-
|
|
25
|
+
${LINK_TEXT_COLOR_VAR_NAME}: ${DarkPalette.WHITE}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
:host([disabled]) .link.disabled {
|
|
29
29
|
--t-link-border-color: ${Palette.PRIMARY_300};
|
|
30
|
-
|
|
30
|
+
${LINK_TEXT_COLOR_VAR_NAME}: ${Palette.PRIMARY_300}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
.link {
|
|
34
|
-
font-family: 'rubik', sans-serif;
|
|
35
|
-
font-size: 1rem;
|
|
36
|
-
font-weight: 400;
|
|
37
|
-
line-height: 1.25rem;
|
|
33
|
+
.link {
|
|
38
34
|
text-decoration: none;
|
|
39
35
|
display: inline;
|
|
40
|
-
color: var(
|
|
36
|
+
color: var(${LINK_TEXT_COLOR_VAR_NAME});
|
|
41
37
|
border-bottom: solid 1px transparent;
|
|
42
38
|
}
|
|
43
39
|
.link:hover {
|
|
@@ -45,23 +41,16 @@ export const linkStyles = css `
|
|
|
45
41
|
cursor: pointer;
|
|
46
42
|
}
|
|
47
43
|
.link.secondary {
|
|
48
|
-
color: var(
|
|
44
|
+
color: var(${LINK_TEXT_COLOR_VAR_NAME});
|
|
49
45
|
}
|
|
50
46
|
.link.secondary:hover {
|
|
51
47
|
border-bottom: solid 1px var(--t-link-border-color);
|
|
52
|
-
}
|
|
53
|
-
@media only screen and (max-width: ${ScreenSizes.TABLET}px) {
|
|
54
|
-
.link {
|
|
55
|
-
font-size: 0.875rem;
|
|
56
|
-
font-weight: 400;
|
|
57
|
-
line-height: 1rem;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
48
|
+
}
|
|
60
49
|
.link.disabled {
|
|
61
50
|
border-bottom: solid 1px var(--t-link-border-color);
|
|
62
|
-
color: var(
|
|
51
|
+
color: var(${LINK_TEXT_COLOR_VAR_NAME});
|
|
63
52
|
cursor: not-allowed;
|
|
64
|
-
}
|
|
53
|
+
}
|
|
65
54
|
`)}
|
|
66
55
|
`;
|
|
67
56
|
//# sourceMappingURL=TuixLink.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TuixLink.styles.js","sourceRoot":"","sources":["../../../src/tuix-link/TuixLink.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,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"TuixLink.styles.js","sourceRoot":"","sources":["../../../src/tuix-link/TuixLink.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,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,MAAM,CAAC,MAAM,wBAAwB,GAAG,qBAAqB,CAAC;AAE9D,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;IACzB,SAAS,CAAC;;6BAEe,OAAO,CAAC,IAAI;MACnC,wBAAwB,KAAK,OAAO,CAAC,IAAI;;;;6BAIlB,WAAW,CAAC,IAAI;MACvC,wBAAwB,KAAK,WAAW,CAAC,IAAI;;;mBAGhC,WAAW,CAAC,SAAS;6BACX,OAAO,CAAC,KAAK;MACpC,wBAAwB,KAAK,OAAO,CAAC,KAAK;;;mBAG7B,WAAW,CAAC,SAAS;6BACX,WAAW,CAAC,KAAK;MACxC,wBAAwB,KAAK,WAAW,CAAC,KAAK;;;;6BAIvB,OAAO,CAAC,WAAW;MAC1C,wBAAwB,KAAK,OAAO,CAAC,WAAW;;;;;;iBAMrC,wBAAwB;;;;;;;;iBAQxB,wBAAwB;;;;;;;iBAOxB,wBAAwB;;;CAGxC,CAAC;CACD,CAAC","sourcesContent":["import { css, unsafeCSS } from 'lit';\nimport { MainVariant } from '../utils/mainVariant.enum';\nimport { Palette } from '../utils/colors';\nimport { DarkPalette } from '../utils/darkColors';\n\nexport const LINK_TEXT_COLOR_VAR_NAME = '--t-link-text-color';\n\nexport const linkStyles = css`\n ${unsafeCSS(`\n :host {\n --t-link-border-color: ${Palette.MAIN};\n ${LINK_TEXT_COLOR_VAR_NAME}: ${Palette.MAIN}\n }\n\n :host([dark]) {\n --t-link-border-color: ${DarkPalette.MAIN};\n ${LINK_TEXT_COLOR_VAR_NAME}: ${DarkPalette.MAIN}\n }\n\n :host([variant=${MainVariant.SECONDARY}]) {\n --t-link-border-color: ${Palette.WHITE};\n ${LINK_TEXT_COLOR_VAR_NAME}: ${Palette.WHITE}\n }\n\n :host([variant=${MainVariant.SECONDARY}][dark]) {\n --t-link-border-color: ${DarkPalette.WHITE};\n ${LINK_TEXT_COLOR_VAR_NAME}: ${DarkPalette.WHITE}\n }\n\n :host([disabled]) .link.disabled {\n --t-link-border-color: ${Palette.PRIMARY_300};\n ${LINK_TEXT_COLOR_VAR_NAME}: ${Palette.PRIMARY_300}\n }\n\n .link { \n text-decoration: none;\n display: inline;\n color: var(${LINK_TEXT_COLOR_VAR_NAME});\n border-bottom: solid 1px transparent;\n }\n .link:hover {\n border-bottom: solid 1px var(--t-link-border-color);\n cursor: pointer;\n }\n .link.secondary {\n color: var(${LINK_TEXT_COLOR_VAR_NAME});\n }\n .link.secondary:hover {\n border-bottom: solid 1px var(--t-link-border-color);\n } \n .link.disabled {\n border-bottom: solid 1px var(--t-link-border-color);\n color: var(${LINK_TEXT_COLOR_VAR_NAME});\n cursor: not-allowed;\n } \n`)}\n`;\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { LitElement, TemplateResult } from 'lit';
|
|
2
2
|
import { BorderRadiusPaper, PaperElevation } from './enums/tuix-paper.enum';
|
|
3
3
|
export declare class TuixPaper extends LitElement {
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
4
5
|
elevation: PaperElevation;
|
|
5
6
|
borderRadius: BorderRadiusPaper;
|
|
6
7
|
dark: boolean;
|
|
7
|
-
static styles: import("lit").CSSResult[];
|
|
8
8
|
private _getOptionalClasses;
|
|
9
9
|
render(): TemplateResult;
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
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;;
|
|
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,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,CAAC;uCAC9B;AAVF,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 static styles = [paperStyles];\n\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 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"]}
|
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
import { css, unsafeCSS } from 'lit';
|
|
2
2
|
import { PaperElevation } from './enums/tuix-paper.enum';
|
|
3
|
+
import { Palette } from '../utils/colors';
|
|
3
4
|
const calculatedStyles = Object.values(PaperElevation)
|
|
4
5
|
.slice(1, -1)
|
|
5
6
|
.map((variant, index) => `
|
|
6
7
|
.elevation.variant_${variant} {
|
|
7
|
-
box-shadow: 0px ${2 ** index}px ${2 ** (index + 2)}px
|
|
8
|
+
box-shadow: 0px ${2 ** index}px ${2 ** (index + 2)}px ${Palette.SHADOW};
|
|
8
9
|
}
|
|
9
10
|
.elevation.dark_${variant} {
|
|
10
11
|
background-color:rgb(${23 + 3 * index},${23 + 3 * index},${26 + 5 * index});
|
|
11
12
|
}`)
|
|
12
13
|
.join('\n');
|
|
13
14
|
export const paperStyles = css `
|
|
14
|
-
${unsafeCSS(
|
|
15
|
-
.elevation
|
|
16
|
-
|
|
15
|
+
${unsafeCSS(`
|
|
16
|
+
.elevation {
|
|
17
|
+
background-color: ${Palette.WHITE};
|
|
17
18
|
}
|
|
18
|
-
.elevation.dark_${
|
|
19
|
+
.elevation.dark_${PaperElevation.VARIANT_0} {
|
|
20
|
+
background-color: ${Palette.BLACK};
|
|
21
|
+
}
|
|
22
|
+
${calculatedStyles}
|
|
23
|
+
.elevation.variant_${PaperElevation.VARIANT_4} {
|
|
24
|
+
box-shadow: 0px 7px 24px ${Palette.SHADOW};
|
|
25
|
+
}
|
|
26
|
+
.elevation.dark_${PaperElevation.VARIANT_4} {
|
|
19
27
|
background-color: rgb(33, 33, 40);
|
|
20
28
|
}
|
|
29
|
+
`)}
|
|
21
30
|
`;
|
|
22
31
|
//# sourceMappingURL=TuixPaper.styles.js.map
|
|
@@ -1 +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;
|
|
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;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,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,MAAM,OAAO,CAAC,MAAM;;oBAEtD,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;;wBAEU,OAAO,CAAC,KAAK;;oBAEjB,cAAc,CAAC,SAAS;wBACpB,OAAO,CAAC,KAAK;;IAEjC,gBAAgB;uBACG,cAAc,CAAC,SAAS;+BAChB,OAAO,CAAC,MAAM;;oBAEzB,cAAc,CAAC,SAAS;;;CAG3C,CAAC;CACD,CAAC","sourcesContent":["import { css, unsafeCSS } from 'lit';\nimport { PaperElevation } from './enums/tuix-paper.enum';\nimport { Palette } from '../utils/colors';\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 ${Palette.SHADOW};\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(`\n .elevation {\n background-color: ${Palette.WHITE};\n }\n .elevation.dark_${PaperElevation.VARIANT_0} {\n background-color: ${Palette.BLACK};\n }\n ${calculatedStyles}\n .elevation.variant_${PaperElevation.VARIANT_4} {\n box-shadow: 0px 7px 24px ${Palette.SHADOW};\n }\n .elevation.dark_${PaperElevation.VARIANT_4} {\n background-color: rgb(33, 33, 40);\n }\n`)}\n`;\n"]}
|
|
@@ -115,7 +115,7 @@ export const radioButtonLabelStyles = css `
|
|
|
115
115
|
font-size: 1rem;
|
|
116
116
|
line-height: 1.5rem;
|
|
117
117
|
font-weight: 300;
|
|
118
|
-
font-family: '
|
|
118
|
+
font-family: 'Rubik', sans-serif;
|
|
119
119
|
color: var(--t-text-color-label);
|
|
120
120
|
margin-left: 0.625rem;
|
|
121
121
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TuixRadioButton.styles.js","sourceRoot":"","sources":["../../../src/tuix-radio-button/TuixRadioButton.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;AAE1C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;IAC9B,UAAU;;;6CAG+B,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC;;CAE1E,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;CAyB5C,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CnC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BxC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;CAiBxC,CAAC","sourcesContent":["import { css, unsafeCSS } from 'lit';\nimport { hostStyles } from '../tuix-checkbox/TuixCheckbox.styles';\nimport { Palette } from '../utils/colors';\n\nexport const radioHostStyles = css`\n ${hostStyles}\n :host {\n --t-margin-between-radio-buttons: 1rem;\n --t-radio-button-inner-color-disabled: ${unsafeCSS(Palette.PRIMARY_300)};\n }\n`;\n\nexport const radioButtonContainerStyles = css`\n .t-radio-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-radio-button-full-container {\n cursor: not-allowed;\n }\n .t-radio-button-container {\n display: block;\n position: relative;\n height: 1.5rem;\n width: 1.5rem;\n }\n .t-radio-button-container .t-radio-button {\n position: absolute;\n opacity: 0;\n height: 0;\n width: 0;\n }\n`;\n\nexport const radioButtonStyles = css`\n .t-radio-button-full-container.t-multiple-options {\n margin-bottom: var(--t-margin-between-radio-buttons);\n }\n .t-radio-button-full-container:not(.t-with-label-left) {\n justify-content: flex-start;\n }\n .t-radio-button-container .t-radio-button-checkmark {\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n height: 1.5rem;\n width: 1.5rem;\n border-radius: 0.25rem;\n background-color: var(--t-bg-color-primary);\n border: 2px solid var(--t-stroke-color-grey);\n box-sizing: border-box;\n border-radius: 50%;\n }\n .t-radio-button-container\n .t-radio-button:checked\n ~ .t-radio-button-checkmark {\n border: 2px solid var(--t-main-color-tuix);\n }\n .t-radio-button-container .t-radio-button:focus ~ .t-radio-button-checkmark {\n box-shadow: 0 0 0px 2px var(--t-stroke-color-focus);\n }\n .t-radio-button-full-container:hover\n .t-radio-button-container\n .t-radio-button-checkmark {\n border: 2px solid var(--t-main-color-tuix);\n }\n .t-radio-button-full-container.t-with-error\n .t-radio-button-container\n .t-radio-button-checkmark {\n border: 2px solid var(--t-text-color-error);\n }\n .t-radio-button-container\n .t-radio-button:disabled\n ~ .t-radio-button-checkmark {\n background-color: var(--t-bg-color-disabled);\n border: none;\n box-shadow: none;\n }\n`;\n\nexport const radioButtonInnerStyles = css`\n .t-radio-button-container .t-radio-button-checkmark .t-radio-button-inner {\n background-color: var(--t-main-color-tuix);\n margin: auto;\n height: 0.625rem;\n width: 0.625rem;\n border-radius: 50%;\n display: none;\n }\n .t-radio-button-container\n .t-radio-button:checked\n ~ .t-radio-button-checkmark\n .t-radio-button-inner {\n display: block;\n }\n :host([error])\n .t-radio-button-container\n .t-radio-button-checkmark\n .t-radio-button-inner {\n background-color: var(--t-text-color-error);\n }\n :host([disabled])\n .t-radio-button-container\n .t-radio-button-checkmark\n .t-radio-button-inner {\n background-color: var(--t-radio-button-inner-color-disabled);\n cursor: not-allowed;\n }\n`;\n\nexport const radioButtonLabelStyles = css`\n .t-radio-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":"TuixRadioButton.styles.js","sourceRoot":"","sources":["../../../src/tuix-radio-button/TuixRadioButton.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;AAE1C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;IAC9B,UAAU;;;6CAG+B,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC;;CAE1E,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;CAyB5C,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CnC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BxC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;CAiBxC,CAAC","sourcesContent":["import { css, unsafeCSS } from 'lit';\nimport { hostStyles } from '../tuix-checkbox/TuixCheckbox.styles';\nimport { Palette } from '../utils/colors';\n\nexport const radioHostStyles = css`\n ${hostStyles}\n :host {\n --t-margin-between-radio-buttons: 1rem;\n --t-radio-button-inner-color-disabled: ${unsafeCSS(Palette.PRIMARY_300)};\n }\n`;\n\nexport const radioButtonContainerStyles = css`\n .t-radio-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-radio-button-full-container {\n cursor: not-allowed;\n }\n .t-radio-button-container {\n display: block;\n position: relative;\n height: 1.5rem;\n width: 1.5rem;\n }\n .t-radio-button-container .t-radio-button {\n position: absolute;\n opacity: 0;\n height: 0;\n width: 0;\n }\n`;\n\nexport const radioButtonStyles = css`\n .t-radio-button-full-container.t-multiple-options {\n margin-bottom: var(--t-margin-between-radio-buttons);\n }\n .t-radio-button-full-container:not(.t-with-label-left) {\n justify-content: flex-start;\n }\n .t-radio-button-container .t-radio-button-checkmark {\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n height: 1.5rem;\n width: 1.5rem;\n border-radius: 0.25rem;\n background-color: var(--t-bg-color-primary);\n border: 2px solid var(--t-stroke-color-grey);\n box-sizing: border-box;\n border-radius: 50%;\n }\n .t-radio-button-container\n .t-radio-button:checked\n ~ .t-radio-button-checkmark {\n border: 2px solid var(--t-main-color-tuix);\n }\n .t-radio-button-container .t-radio-button:focus ~ .t-radio-button-checkmark {\n box-shadow: 0 0 0px 2px var(--t-stroke-color-focus);\n }\n .t-radio-button-full-container:hover\n .t-radio-button-container\n .t-radio-button-checkmark {\n border: 2px solid var(--t-main-color-tuix);\n }\n .t-radio-button-full-container.t-with-error\n .t-radio-button-container\n .t-radio-button-checkmark {\n border: 2px solid var(--t-text-color-error);\n }\n .t-radio-button-container\n .t-radio-button:disabled\n ~ .t-radio-button-checkmark {\n background-color: var(--t-bg-color-disabled);\n border: none;\n box-shadow: none;\n }\n`;\n\nexport const radioButtonInnerStyles = css`\n .t-radio-button-container .t-radio-button-checkmark .t-radio-button-inner {\n background-color: var(--t-main-color-tuix);\n margin: auto;\n height: 0.625rem;\n width: 0.625rem;\n border-radius: 50%;\n display: none;\n }\n .t-radio-button-container\n .t-radio-button:checked\n ~ .t-radio-button-checkmark\n .t-radio-button-inner {\n display: block;\n }\n :host([error])\n .t-radio-button-container\n .t-radio-button-checkmark\n .t-radio-button-inner {\n background-color: var(--t-text-color-error);\n }\n :host([disabled])\n .t-radio-button-container\n .t-radio-button-checkmark\n .t-radio-button-inner {\n background-color: var(--t-radio-button-inner-color-disabled);\n cursor: not-allowed;\n }\n`;\n\nexport const radioButtonLabelStyles = css`\n .t-radio-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-radio-button-full-container.t-with-label-left {\n flex-direction: row-reverse;\n }\n .t-radio-button-full-container.t-with-label-left .t-radio-button-label {\n margin-right: 0.625rem;\n margin-left: 0;\n }\n`;\n"]}
|