tuix-webcomponents 0.62.0 → 0.64.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/addon-visual-tests-assets/visual-test-illustration.mp4 +0 -0
- package/dist/assets/Color-AVL7NMMY-IH_JbDEF.js +1 -0
- package/dist/assets/DocsRenderer-PQXLIZUC-C0ZKNA9m.js +1286 -0
- package/dist/{src/tuix-icon/TuixIcon.icons.js → assets/TuixIconButton-eQtxZNXh.js} +203 -126
- package/dist/assets/TuixModal-BZFIHTi_.js +78 -0
- package/dist/assets/TuixToast-BhxwZIGo.js +62 -0
- package/dist/assets/_commonjsHelpers-CqkleIqs.js +1 -0
- package/dist/assets/axe-C59a3kt3.js +30 -0
- package/dist/assets/iframe-ClsPaEIM.js +1057 -0
- package/dist/assets/index-DBzYXxxs.js +1554 -0
- package/dist/assets/index-TjhCmV-u.js +1 -0
- package/dist/assets/matchers-7Z3WT2CE-CcSi9QFY.js +14 -0
- package/dist/assets/screenSizes.enum-C1IhC_dy.js +13 -0
- package/dist/assets/state-CLjydI9z.js +13 -0
- package/dist/assets/tuix-button.stories-Dm_yifox.js +30 -0
- package/dist/assets/tuix-checkbox.stories-DmzoygjC.js +44 -0
- package/dist/assets/tuix-dropdown-object-list.stories-Neeajtj-.js +56 -0
- package/dist/assets/tuix-dropdown.stories-B7ea8QAz.js +28 -0
- package/dist/assets/tuix-icon-button.stories-CgbOSRO4.js +21 -0
- package/dist/assets/tuix-icon.enums-DYTtwLZl.js +1 -0
- package/dist/assets/tuix-icon.stories-CjN2XsKx.js +19 -0
- package/dist/assets/tuix-input.stories-CD7onvw2.js +33 -0
- package/dist/assets/tuix-link.stories-CT7pzGlx.js +35 -0
- package/dist/assets/tuix-modal.stories-B6v3cOPq.js +39 -0
- package/dist/assets/tuix-paper.enum-DhmlUJB7.js +1 -0
- package/dist/assets/tuix-paper.stories-CLnRPHNK.js +31 -0
- package/dist/assets/tuix-radio-button.stories-BwkKC3a9.js +35 -0
- package/dist/assets/tuix-table.stories-Bn-aZa0J.js +65 -0
- package/dist/assets/tuix-text.enums-Ck8cVqZZ.js +1 -0
- package/dist/assets/tuix-text.stories-BNIqPsGD.js +29 -0
- package/dist/assets/tuix-toast.stories-CRYiLiHK.js +21 -0
- package/dist/assets/tuix-toggle-button.stories-CY6wlDnA.js +40 -0
- package/dist/favicon-wrapper.svg +46 -0
- package/dist/favicon.svg +1 -0
- package/dist/iframe.html +685 -0
- package/dist/index.html +160 -0
- package/dist/index.json +1 -0
- package/dist/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/nunito-sans-bold.woff2 +0 -0
- package/dist/nunito-sans-italic.woff2 +0 -0
- package/dist/nunito-sans-regular.woff2 +0 -0
- package/dist/project.json +1 -0
- package/dist/sb-addons/a11y-3/manager-bundle.js +5 -0
- package/dist/sb-addons/a11y-3/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/sb-addons/chromatic-com-storybook-1/manager-bundle.js +356 -0
- package/dist/sb-addons/chromatic-com-storybook-1/manager-bundle.js.LEGAL.txt +40 -0
- package/dist/sb-addons/docs-2/manager-bundle.js +151 -0
- package/dist/sb-addons/docs-2/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +971 -0
- package/dist/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
- package/dist/sb-addons/vitest-4/manager-bundle.js +3 -0
- package/dist/sb-addons/vitest-4/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/sb-common-assets/favicon-wrapper.svg +46 -0
- package/dist/sb-common-assets/favicon.svg +1 -0
- package/dist/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/dist/sb-manager/globals-module-info.js +797 -0
- package/dist/sb-manager/globals-runtime.js +69679 -0
- package/dist/sb-manager/globals.js +34 -0
- package/dist/sb-manager/runtime.js +13195 -0
- package/package.json +77 -53
- package/dist/assets/tuix-styles.css +0 -58
- package/dist/src/index.d.ts +0 -36
- package/dist/src/index.js +0 -43
- package/dist/src/index.js.map +0 -1
- package/dist/src/tuix-button/TuixBaseButton.d.ts +0 -17
- package/dist/src/tuix-button/TuixBaseButton.js +0 -62
- package/dist/src/tuix-button/TuixBaseButton.js.map +0 -1
- package/dist/src/tuix-button/TuixButton.d.ts +0 -11
- package/dist/src/tuix-button/TuixButton.js +0 -85
- package/dist/src/tuix-button/TuixButton.js.map +0 -1
- package/dist/src/tuix-button/TuixButton.styles.d.ts +0 -3
- package/dist/src/tuix-button/TuixButton.styles.js +0 -108
- package/dist/src/tuix-button/TuixButton.styles.js.map +0 -1
- package/dist/src/tuix-button/enums/tuix-button.enums.d.ts +0 -2
- package/dist/src/tuix-button/enums/tuix-button.enums.js +0 -7
- package/dist/src/tuix-button/enums/tuix-button.enums.js.map +0 -1
- package/dist/src/tuix-button/interfaces/tuix-button.interface.d.ts +0 -1
- package/dist/src/tuix-button/interfaces/tuix-button.interface.js +0 -2
- package/dist/src/tuix-button/interfaces/tuix-button.interface.js.map +0 -1
- package/dist/src/tuix-checkbox/TuixCheckbox.d.ts +0 -15
- package/dist/src/tuix-checkbox/TuixCheckbox.js +0 -107
- package/dist/src/tuix-checkbox/TuixCheckbox.js.map +0 -1
- package/dist/src/tuix-checkbox/TuixCheckbox.styles.d.ts +0 -4
- package/dist/src/tuix-checkbox/TuixCheckbox.styles.js +0 -133
- package/dist/src/tuix-checkbox/TuixCheckbox.styles.js.map +0 -1
- package/dist/src/tuix-checkbox/enums/tuix-checkbox.enums.d.ts +0 -21
- package/dist/src/tuix-checkbox/enums/tuix-checkbox.enums.js +0 -24
- package/dist/src/tuix-checkbox/enums/tuix-checkbox.enums.js.map +0 -1
- package/dist/src/tuix-checkbox/interfaces/tuix-checkbox.interface.d.ts +0 -5
- package/dist/src/tuix-checkbox/interfaces/tuix-checkbox.interface.js +0 -2
- package/dist/src/tuix-checkbox/interfaces/tuix-checkbox.interface.js.map +0 -1
- package/dist/src/tuix-dropdown/TuixDropdown.d.ts +0 -55
- package/dist/src/tuix-dropdown/TuixDropdown.js +0 -368
- package/dist/src/tuix-dropdown/TuixDropdown.js.map +0 -1
- package/dist/src/tuix-dropdown/TuixDropdown.styles.d.ts +0 -3
- package/dist/src/tuix-dropdown/TuixDropdown.styles.js +0 -126
- package/dist/src/tuix-dropdown/TuixDropdown.styles.js.map +0 -1
- package/dist/src/tuix-dropdown/enums/tuix-dropdown.enums.d.ts +0 -4
- package/dist/src/tuix-dropdown/enums/tuix-dropdown.enums.js +0 -6
- package/dist/src/tuix-dropdown/enums/tuix-dropdown.enums.js.map +0 -1
- package/dist/src/tuix-dropdown/interfaces/tuix-dropdown.interface.d.ts +0 -15
- package/dist/src/tuix-dropdown/interfaces/tuix-dropdown.interface.js +0 -2
- package/dist/src/tuix-dropdown/interfaces/tuix-dropdown.interface.js.map +0 -1
- package/dist/src/tuix-icon/TuixIcon.d.ts +0 -15
- package/dist/src/tuix-icon/TuixIcon.icons.d.ts +0 -6
- package/dist/src/tuix-icon/TuixIcon.icons.js.map +0 -1
- package/dist/src/tuix-icon/TuixIcon.js +0 -81
- package/dist/src/tuix-icon/TuixIcon.js.map +0 -1
- package/dist/src/tuix-icon/enums/tuix-icon.enums.d.ts +0 -62
- package/dist/src/tuix-icon/enums/tuix-icon.enums.js +0 -70
- package/dist/src/tuix-icon/enums/tuix-icon.enums.js.map +0 -1
- package/dist/src/tuix-icon-button/TuixIconButton.d.ts +0 -9
- package/dist/src/tuix-icon-button/TuixIconButton.js +0 -52
- package/dist/src/tuix-icon-button/TuixIconButton.js.map +0 -1
- package/dist/src/tuix-input/TuixInput.d.ts +0 -52
- package/dist/src/tuix-input/TuixInput.js +0 -374
- package/dist/src/tuix-input/TuixInput.js.map +0 -1
- package/dist/src/tuix-input/TuixInput.styles.d.ts +0 -8
- package/dist/src/tuix-input/TuixInput.styles.js +0 -296
- package/dist/src/tuix-input/TuixInput.styles.js.map +0 -1
- package/dist/src/tuix-input/enums/tuix-input.enums.d.ts +0 -38
- package/dist/src/tuix-input/enums/tuix-input.enums.js +0 -42
- package/dist/src/tuix-input/enums/tuix-input.enums.js.map +0 -1
- package/dist/src/tuix-input/interfaces/tuix-input.interface.d.ts +0 -17
- package/dist/src/tuix-input/interfaces/tuix-input.interface.js +0 -7
- package/dist/src/tuix-input/interfaces/tuix-input.interface.js.map +0 -1
- package/dist/src/tuix-link/TuixLink.d.ts +0 -15
- package/dist/src/tuix-link/TuixLink.js +0 -72
- package/dist/src/tuix-link/TuixLink.js.map +0 -1
- package/dist/src/tuix-link/TuixLink.styles.d.ts +0 -2
- package/dist/src/tuix-link/TuixLink.styles.js +0 -56
- package/dist/src/tuix-link/TuixLink.styles.js.map +0 -1
- package/dist/src/tuix-link/enums/linkTarget.enum.d.ts +0 -6
- package/dist/src/tuix-link/enums/linkTarget.enum.js +0 -8
- package/dist/src/tuix-link/enums/linkTarget.enum.js.map +0 -1
- package/dist/src/tuix-modal/TuixModal.d.ts +0 -9
- package/dist/src/tuix-modal/TuixModal.js +0 -64
- package/dist/src/tuix-modal/TuixModal.js.map +0 -1
- package/dist/src/tuix-modal/TuixModal.styles.d.ts +0 -2
- package/dist/src/tuix-modal/TuixModal.styles.js +0 -56
- package/dist/src/tuix-modal/TuixModal.styles.js.map +0 -1
- package/dist/src/tuix-paper/TuixPaper.d.ts +0 -10
- package/dist/src/tuix-paper/TuixPaper.js +0 -47
- package/dist/src/tuix-paper/TuixPaper.js.map +0 -1
- package/dist/src/tuix-paper/TuixPaper.styles.d.ts +0 -1
- package/dist/src/tuix-paper/TuixPaper.styles.js +0 -31
- package/dist/src/tuix-paper/TuixPaper.styles.js.map +0 -1
- package/dist/src/tuix-paper/enums/tuix-paper.enum.d.ts +0 -13
- package/dist/src/tuix-paper/enums/tuix-paper.enum.js +0 -16
- package/dist/src/tuix-paper/enums/tuix-paper.enum.js.map +0 -1
- package/dist/src/tuix-radio-button/TuixRadioButton.d.ts +0 -16
- package/dist/src/tuix-radio-button/TuixRadioButton.js +0 -96
- package/dist/src/tuix-radio-button/TuixRadioButton.js.map +0 -1
- package/dist/src/tuix-radio-button/TuixRadioButton.styles.d.ts +0 -5
- package/dist/src/tuix-radio-button/TuixRadioButton.styles.js +0 -136
- package/dist/src/tuix-radio-button/TuixRadioButton.styles.js.map +0 -1
- package/dist/src/tuix-radio-button/interfaces/tuix-radio-button.interface.d.ts +0 -3
- package/dist/src/tuix-radio-button/interfaces/tuix-radio-button.interface.js +0 -2
- package/dist/src/tuix-radio-button/interfaces/tuix-radio-button.interface.js.map +0 -1
- package/dist/src/tuix-table/TuixTable.d.ts +0 -46
- package/dist/src/tuix-table/TuixTable.js +0 -373
- package/dist/src/tuix-table/TuixTable.js.map +0 -1
- package/dist/src/tuix-table/TuixTable.styles.d.ts +0 -2
- package/dist/src/tuix-table/TuixTable.styles.js +0 -198
- package/dist/src/tuix-table/TuixTable.styles.js.map +0 -1
- package/dist/src/tuix-table/interfaces/tuix-table.interface.d.ts +0 -45
- package/dist/src/tuix-table/interfaces/tuix-table.interface.js +0 -2
- package/dist/src/tuix-table/interfaces/tuix-table.interface.js.map +0 -1
- package/dist/src/tuix-text/TuixText.d.ts +0 -12
- package/dist/src/tuix-text/TuixText.js +0 -67
- package/dist/src/tuix-text/TuixText.js.map +0 -1
- package/dist/src/tuix-text/TuixText.styles.d.ts +0 -2
- package/dist/src/tuix-text/TuixText.styles.js +0 -159
- package/dist/src/tuix-text/TuixText.styles.js.map +0 -1
- package/dist/src/tuix-text/enums/tuix-text.enums.d.ts +0 -31
- package/dist/src/tuix-text/enums/tuix-text.enums.js +0 -64
- package/dist/src/tuix-text/enums/tuix-text.enums.js.map +0 -1
- package/dist/src/tuix-toast/TuixToast.d.ts +0 -15
- package/dist/src/tuix-toast/TuixToast.js +0 -101
- package/dist/src/tuix-toast/TuixToast.js.map +0 -1
- package/dist/src/tuix-toast/TuixToast.styles.d.ts +0 -3
- package/dist/src/tuix-toast/TuixToast.styles.js +0 -44
- package/dist/src/tuix-toast/TuixToast.styles.js.map +0 -1
- package/dist/src/tuix-toast/enums/tuix-toast.enums.d.ts +0 -20
- package/dist/src/tuix-toast/enums/tuix-toast.enums.js +0 -60
- package/dist/src/tuix-toast/enums/tuix-toast.enums.js.map +0 -1
- package/dist/src/tuix-toggle-button/TuixToggleButton.d.ts +0 -13
- package/dist/src/tuix-toggle-button/TuixToggleButton.js +0 -86
- package/dist/src/tuix-toggle-button/TuixToggleButton.js.map +0 -1
- package/dist/src/tuix-toggle-button/TuixToggleButton.styles.d.ts +0 -5
- package/dist/src/tuix-toggle-button/TuixToggleButton.styles.js +0 -135
- package/dist/src/tuix-toggle-button/TuixToggleButton.styles.js.map +0 -1
- package/dist/src/tuix-toggle-button/interfaces/tuix-toggle.interface.d.ts +0 -2
- package/dist/src/tuix-toggle-button/interfaces/tuix-toggle.interface.js +0 -2
- package/dist/src/tuix-toggle-button/interfaces/tuix-toggle.interface.js.map +0 -1
- package/dist/src/utils/colors.d.ts +0 -29
- package/dist/src/utils/colors.js +0 -31
- package/dist/src/utils/colors.js.map +0 -1
- package/dist/src/utils/darkColors.d.ts +0 -31
- package/dist/src/utils/darkColors.js +0 -33
- package/dist/src/utils/darkColors.js.map +0 -1
- package/dist/src/utils/hex-rgb.d.ts +0 -5
- package/dist/src/utils/hex-rgb.js +0 -16
- package/dist/src/utils/hex-rgb.js.map +0 -1
- package/dist/src/utils/interfaces/detail-value.interface.d.ts +0 -3
- package/dist/src/utils/interfaces/detail-value.interface.js +0 -2
- package/dist/src/utils/interfaces/detail-value.interface.js.map +0 -1
- package/dist/src/utils/mainVariant.enum.d.ts +0 -4
- package/dist/src/utils/mainVariant.enum.js +0 -6
- package/dist/src/utils/mainVariant.enum.js.map +0 -1
- package/dist/src/utils/screenSizes.enum.d.ts +0 -4
- package/dist/src/utils/screenSizes.enum.js +0 -6
- package/dist/src/utils/screenSizes.enum.js.map +0 -1
- package/dist/src/utils/slottedClassName.d.ts +0 -2
- package/dist/src/utils/slottedClassName.js +0 -2
- package/dist/src/utils/slottedClassName.js.map +0 -1
- package/dist/tsconfig.publish.tsbuildinfo +0 -1
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
import { css, unsafeCSS } from 'lit';
|
|
2
|
-
import { ScreenSizes } from '../utils/screenSizes.enum.js';
|
|
3
|
-
import { Palette } from '../utils/colors.js';
|
|
4
|
-
import { DarkPalette } from '../utils/darkColors.js';
|
|
5
|
-
import { hexToRgb } from '../utils/hex-rgb.js';
|
|
6
|
-
const inputVars = {
|
|
7
|
-
gapX: '10px',
|
|
8
|
-
iconDesktopSize: '1.5rem',
|
|
9
|
-
iconMobileSize: '1rem',
|
|
10
|
-
paddingX: '1.25rem',
|
|
11
|
-
};
|
|
12
|
-
const rgbDarkValidation = hexToRgb(DarkPalette.VALIDATION);
|
|
13
|
-
const rgbDarkError = hexToRgb(DarkPalette.ERROR);
|
|
14
|
-
export const hostStyles = css `
|
|
15
|
-
:host {
|
|
16
|
-
--t-field-color-form: ${unsafeCSS(Palette.PRIMARY_50)};
|
|
17
|
-
--t-field-color-title: ${unsafeCSS(Palette.PRIMARY_600)};
|
|
18
|
-
--t-field-color-text: ${unsafeCSS(Palette.BLACK)};
|
|
19
|
-
--t-field-color-description: ${unsafeCSS(Palette.NEUTRAL_600)};
|
|
20
|
-
--t-field-color-stroke-hover: ${unsafeCSS(Palette.PRIMARY_300)};
|
|
21
|
-
--t-field-color-stroke-focus: ${unsafeCSS(Palette.MAIN)};
|
|
22
|
-
--t-field-color-text-disabled: ${unsafeCSS(Palette.PRIMARY_300)};
|
|
23
|
-
--t-field-color-stroke-validation: ${unsafeCSS(Palette.VALIDATION_200)};
|
|
24
|
-
--t-field-color-bg-validation: ${unsafeCSS(Palette.VALIDATION_50)};
|
|
25
|
-
--t-field-color-stroke-loading: ${unsafeCSS(Palette.PRIMARY_300)};
|
|
26
|
-
--t-field-color-bg-error: ${unsafeCSS(Palette.ERROR_50)};
|
|
27
|
-
--t-field-color-stroke-error: ${unsafeCSS(Palette.ERROR_200)};
|
|
28
|
-
--t-field-input-cursor: auto;
|
|
29
|
-
--t-field-font-size: 1rem;
|
|
30
|
-
--t-field-font-weight: 300;
|
|
31
|
-
--t-field-line-height: 1.25rem;
|
|
32
|
-
--t-field-padding-x: 1.25rem;
|
|
33
|
-
--t-field-padding-y: 1.125rem;
|
|
34
|
-
--t-field-padding-top: 1.625rem;
|
|
35
|
-
--t-field-padding-bottom: 0.625rem;
|
|
36
|
-
--t-field-title-left-position: 1.25rem;
|
|
37
|
-
}
|
|
38
|
-
:host([dark]) {
|
|
39
|
-
--t-field-color-form: ${unsafeCSS(DarkPalette.PRIMARY_950)};
|
|
40
|
-
--t-field-color-text: ${unsafeCSS(DarkPalette.PRIMARY_100)};
|
|
41
|
-
--t-field-color-description: ${unsafeCSS(DarkPalette.NEUTRAL_200)};
|
|
42
|
-
--t-field-color-stroke-focus: ${unsafeCSS(DarkPalette.SECONDARY)};
|
|
43
|
-
--t-field-color-text-disabled: ${unsafeCSS(DarkPalette.PRIMARY_800)};
|
|
44
|
-
--t-field-color-stroke-validation: ${unsafeCSS(DarkPalette.VALIDATION_200)};
|
|
45
|
-
--t-field-color-bg-validation: rgba(
|
|
46
|
-
${rgbDarkValidation.r},
|
|
47
|
-
${rgbDarkValidation.g},
|
|
48
|
-
${rgbDarkValidation.b},
|
|
49
|
-
0.2
|
|
50
|
-
);
|
|
51
|
-
--t-field-color-bg-error: rgba(
|
|
52
|
-
${rgbDarkError.r},
|
|
53
|
-
${rgbDarkError.g},
|
|
54
|
-
${rgbDarkError.b},
|
|
55
|
-
0.2
|
|
56
|
-
);
|
|
57
|
-
--t-field-color-stroke-error: ${unsafeCSS(DarkPalette.ERROR_200)};
|
|
58
|
-
}
|
|
59
|
-
`;
|
|
60
|
-
export const inputComponentStyles = css `
|
|
61
|
-
.t-textarea-main-container {
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
width: 100%;
|
|
65
|
-
height: 100%;
|
|
66
|
-
}
|
|
67
|
-
.t-input-container {
|
|
68
|
-
position: relative;
|
|
69
|
-
--t-padding-x-desktop-with-icon: calc(
|
|
70
|
-
var(--t-field-padding-x) + ${unsafeCSS(inputVars.iconDesktopSize)} +
|
|
71
|
-
${unsafeCSS(inputVars.gapX)}
|
|
72
|
-
);
|
|
73
|
-
--t-padding-x-mobile-with-icon: calc(
|
|
74
|
-
var(--t-field-padding-x) + ${unsafeCSS(inputVars.iconMobileSize)} +
|
|
75
|
-
${unsafeCSS(inputVars.gapX)}
|
|
76
|
-
);
|
|
77
|
-
--t-border-size: 1px;
|
|
78
|
-
}
|
|
79
|
-
.t-input-container.t-textarea-container {
|
|
80
|
-
height: 100%;
|
|
81
|
-
}
|
|
82
|
-
.t-input {
|
|
83
|
-
padding: calc(var(--t-field-padding-y) - var(--t-border-size))
|
|
84
|
-
var(--t-field-padding-x);
|
|
85
|
-
border-radius: 4px;
|
|
86
|
-
font-family: 'Rubik', sans-serif;
|
|
87
|
-
cursor: var(--t-field-input-cursor);
|
|
88
|
-
width: 100%;
|
|
89
|
-
box-sizing: border-box;
|
|
90
|
-
}
|
|
91
|
-
.t-input.t-textarea {
|
|
92
|
-
height: 100%;
|
|
93
|
-
display: block;
|
|
94
|
-
}
|
|
95
|
-
.t-input.with-title {
|
|
96
|
-
padding-top: calc(var(--t-field-padding-top) - var(--t-border-size));
|
|
97
|
-
padding-bottom: calc(var(--t-field-padding-bottom) - var(--t-border-size));
|
|
98
|
-
}
|
|
99
|
-
.t-input.with-icon-right {
|
|
100
|
-
padding-right: var(--t-padding-x-desktop-with-icon);
|
|
101
|
-
}
|
|
102
|
-
@media only screen and (max-width: ${ScreenSizes.MOBILE}px) {
|
|
103
|
-
.t-input.with-icon-right {
|
|
104
|
-
padding-right: var(--t-padding-x-mobile-with-icon);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
`;
|
|
108
|
-
export const inputFontStyles = css `
|
|
109
|
-
.t-input::placeholder,
|
|
110
|
-
.t-input,
|
|
111
|
-
.t-title {
|
|
112
|
-
font-size: var(--t-field-font-size);
|
|
113
|
-
font-weight: var(--t-field-font-weight);
|
|
114
|
-
line-height: var(--t-field-line-height);
|
|
115
|
-
}
|
|
116
|
-
@media only screen and (max-width: ${ScreenSizes.TABLET}px) {
|
|
117
|
-
:host {
|
|
118
|
-
--t-field-font-size: 0.813rem;
|
|
119
|
-
--t-field-line-height: 1.125rem;
|
|
120
|
-
--t-field-padding-y: 1.063rem;
|
|
121
|
-
--t-field-padding-top: 1.5rem;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
@media only screen and (max-width: ${ScreenSizes.MOBILE}px) {
|
|
125
|
-
:host {
|
|
126
|
-
--t-field-font-size: 0.813rem;
|
|
127
|
-
--t-field-line-height: 1rem;
|
|
128
|
-
--t-field-padding-y: 1rem;
|
|
129
|
-
--t-field-padding-top: 1.375rem;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
`;
|
|
133
|
-
export const inputColorStyles = css `
|
|
134
|
-
.t-input {
|
|
135
|
-
background-color: var(--t-field-color-form);
|
|
136
|
-
border: 1px solid var(--t-field-color-form);
|
|
137
|
-
color: var(--t-field-color-text);
|
|
138
|
-
}
|
|
139
|
-
.t-input-container:hover .t-input,
|
|
140
|
-
.t-input:hover {
|
|
141
|
-
border: 1px solid var(--t-field-color-stroke-hover);
|
|
142
|
-
}
|
|
143
|
-
.t-input:focus {
|
|
144
|
-
border: 1px solid var(--t-field-color-stroke-focus);
|
|
145
|
-
outline: 1px solid var(--t-field-color-stroke-focus);
|
|
146
|
-
}
|
|
147
|
-
.t-input[disabled]:disabled {
|
|
148
|
-
cursor: not-allowed;
|
|
149
|
-
border: 1px solid var(--t-field-color-form);
|
|
150
|
-
color: var(--t-field-color-text-disabled);
|
|
151
|
-
}
|
|
152
|
-
.t-input.with-title::placeholder {
|
|
153
|
-
color: transparent;
|
|
154
|
-
}
|
|
155
|
-
.t-input::placeholder,
|
|
156
|
-
.t-input.with-title:focus::placeholder {
|
|
157
|
-
color: var(--t-field-color-title);
|
|
158
|
-
}
|
|
159
|
-
.t-input.with-warning {
|
|
160
|
-
border: 1px solid var(--t-field-color-stroke-validation);
|
|
161
|
-
background-color: var(--t-field-color-bg-validation);
|
|
162
|
-
}
|
|
163
|
-
.t-input.with-error {
|
|
164
|
-
border: 1px solid var(--t-field-color-stroke-error);
|
|
165
|
-
background-color: var(--t-field-color-bg-error);
|
|
166
|
-
}
|
|
167
|
-
.t-input.with-loading {
|
|
168
|
-
border: 1px solid var(--t-field-color-stroke-loading);
|
|
169
|
-
}
|
|
170
|
-
`;
|
|
171
|
-
export const inputTitleStyles = css `
|
|
172
|
-
.t-title {
|
|
173
|
-
position: absolute;
|
|
174
|
-
top: 50%;
|
|
175
|
-
left: var(--t-field-title-left-position);
|
|
176
|
-
font-family: 'Rubik', sans-serif;
|
|
177
|
-
color: var(--t-field-color-title);
|
|
178
|
-
transform: translateY(-50%);
|
|
179
|
-
transition-duration: 0.3s;
|
|
180
|
-
pointer-events: none;
|
|
181
|
-
-webkit-user-select: none;
|
|
182
|
-
-moz-user-select: none;
|
|
183
|
-
-ms-user-select: none;
|
|
184
|
-
user-select: none;
|
|
185
|
-
}
|
|
186
|
-
.t-textarea-container .t-title {
|
|
187
|
-
top: 1rem;
|
|
188
|
-
transform: none;
|
|
189
|
-
}
|
|
190
|
-
.t-input.with-title:focus + .t-title,
|
|
191
|
-
.t-input.with-title:not(:placeholder-shown) + .t-title {
|
|
192
|
-
font-size: 0.75rem;
|
|
193
|
-
font-weight: 300;
|
|
194
|
-
line-height: 0.875rem;
|
|
195
|
-
transform: translateY(0);
|
|
196
|
-
top: 0.5rem;
|
|
197
|
-
}
|
|
198
|
-
`;
|
|
199
|
-
export const inputIconStyles = css `
|
|
200
|
-
.t-input-container .t-icon-set-container {
|
|
201
|
-
height: ${unsafeCSS(inputVars.iconDesktopSize)};
|
|
202
|
-
width: ${unsafeCSS(inputVars.iconDesktopSize)};
|
|
203
|
-
cursor: var(--t-field-input-cursor);
|
|
204
|
-
}
|
|
205
|
-
.t-icon-set-container.t-icon-click {
|
|
206
|
-
cursor: pointer;
|
|
207
|
-
}
|
|
208
|
-
.t-input-container .t-icon-set-container.t-icon-right {
|
|
209
|
-
position: absolute;
|
|
210
|
-
top: 50%;
|
|
211
|
-
right: var(--t-field-padding-x);
|
|
212
|
-
transform: translateY(-50%);
|
|
213
|
-
}
|
|
214
|
-
.t-input-container .t-icon-set-container.t-icon-left {
|
|
215
|
-
position: absolute;
|
|
216
|
-
top: 50%;
|
|
217
|
-
left: var(--t-field-padding-x);
|
|
218
|
-
transform: translateY(-50%);
|
|
219
|
-
}
|
|
220
|
-
.t-icon-inactive {
|
|
221
|
-
display: inline;
|
|
222
|
-
}
|
|
223
|
-
.t-icon-active {
|
|
224
|
-
display: none;
|
|
225
|
-
}
|
|
226
|
-
.t-icon-disabled {
|
|
227
|
-
display: none;
|
|
228
|
-
}
|
|
229
|
-
.t-input-container:hover .t-icon-set-container .t-icon-inactive,
|
|
230
|
-
.t-input:hover ~ .t-icon-set-container .t-icon-inactive,
|
|
231
|
-
.t-input:focus ~ .t-icon-set-container .t-icon-inactive {
|
|
232
|
-
display: none;
|
|
233
|
-
}
|
|
234
|
-
.t-input-container:hover .t-icon-set-container .t-icon-active,
|
|
235
|
-
.t-input:hover ~ .t-icon-set-container .t-icon-active,
|
|
236
|
-
.t-input:focus ~ .t-icon-set-container .t-icon-active {
|
|
237
|
-
display: inline;
|
|
238
|
-
}
|
|
239
|
-
.t-input[disabled] ~ .t-icon-set-container .t-icon-active {
|
|
240
|
-
display: none;
|
|
241
|
-
}
|
|
242
|
-
.t-input[disabled] ~ .t-icon-set-container .t-icon-inactive {
|
|
243
|
-
display: none;
|
|
244
|
-
}
|
|
245
|
-
.t-input[disabled] ~ .t-icon-set-container .t-icon-disabled {
|
|
246
|
-
display: inline;
|
|
247
|
-
cursor: not-allowed;
|
|
248
|
-
}
|
|
249
|
-
@media only screen and (max-width: ${ScreenSizes.MOBILE}px) {
|
|
250
|
-
.t-input-container .t-icon-set-container {
|
|
251
|
-
height: ${unsafeCSS(inputVars.iconMobileSize)};
|
|
252
|
-
width: ${unsafeCSS(inputVars.iconMobileSize)};
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
`;
|
|
256
|
-
export const inputSearchStyles = css `
|
|
257
|
-
.t-input[type='search'] {
|
|
258
|
-
padding-left: var(--t-padding-x-desktop-with-icon);
|
|
259
|
-
}
|
|
260
|
-
.t-input[type='search'] + .t-title {
|
|
261
|
-
left: var(--t-padding-x-desktop-with-icon);
|
|
262
|
-
}
|
|
263
|
-
@media only screen and (max-width: ${ScreenSizes.MOBILE}px) {
|
|
264
|
-
.t-input[type='search'] {
|
|
265
|
-
padding-left: var(--t-padding-x-mobile-with-icon);
|
|
266
|
-
}
|
|
267
|
-
.t-input[type='search'] + .t-title {
|
|
268
|
-
left: var(--t-padding-x-mobile-with-icon);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
input[type='search']::-webkit-search-decoration,
|
|
272
|
-
input[type='search']::-webkit-search-cancel-button,
|
|
273
|
-
input[type='search']::-webkit-search-results-button,
|
|
274
|
-
input[type='search']::-webkit-search-results-decoration {
|
|
275
|
-
display: none;
|
|
276
|
-
}
|
|
277
|
-
`;
|
|
278
|
-
export const inputDescriptionStyles = css `
|
|
279
|
-
.t-input-description-container {
|
|
280
|
-
margin-top: 0.5rem;
|
|
281
|
-
font-family: 'Rubik', sans-serif;
|
|
282
|
-
font-size: 0.75rem;
|
|
283
|
-
line-height: 1rem;
|
|
284
|
-
color: var(--t-field-color-description);
|
|
285
|
-
display: flex;
|
|
286
|
-
justify-content: space-between;
|
|
287
|
-
}
|
|
288
|
-
.t-input-description-container .t-letter-counter {
|
|
289
|
-
align-self: flex-end;
|
|
290
|
-
}
|
|
291
|
-
.t-input-description-container .t-input-description {
|
|
292
|
-
display: flex;
|
|
293
|
-
gap: 0.5rem;
|
|
294
|
-
}
|
|
295
|
-
`;
|
|
296
|
-
//# sourceMappingURL=TuixInput.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TuixInput.styles.js","sourceRoot":"","sources":["../../../src/tuix-input/TuixInput.styles.ts"],"names":[],"mappings":"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","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 iconMobileSize: '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_600)};\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 --t-field-font-size: 1rem;\n --t-field-font-weight: 300;\n --t-field-line-height: 1.25rem;\n --t-field-padding-x: 1.25rem;\n --t-field-padding-y: 1.125rem;\n --t-field-padding-top: 1.625rem;\n --t-field-padding-bottom: 0.625rem;\n --t-field-title-left-position: 1.25rem;\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-textarea-main-container {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n }\n .t-input-container {\n position: relative;\n --t-padding-x-desktop-with-icon: calc(\n var(--t-field-padding-x) + ${unsafeCSS(inputVars.iconDesktopSize)} +\n ${unsafeCSS(inputVars.gapX)}\n );\n --t-padding-x-mobile-with-icon: calc(\n var(--t-field-padding-x) + ${unsafeCSS(inputVars.iconMobileSize)} +\n ${unsafeCSS(inputVars.gapX)}\n );\n --t-border-size: 1px;\n }\n .t-input-container.t-textarea-container {\n height: 100%;\n }\n .t-input {\n padding: calc(var(--t-field-padding-y) - var(--t-border-size))\n var(--t-field-padding-x);\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.t-textarea {\n height: 100%;\n display: block;\n }\n .t-input.with-title {\n padding-top: calc(var(--t-field-padding-top) - var(--t-border-size));\n padding-bottom: calc(var(--t-field-padding-bottom) - var(--t-border-size));\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.MOBILE}px) {\n .t-input.with-icon-right {\n padding-right: var(--t-padding-x-mobile-with-icon);\n }\n }\n`;\n\nexport const inputFontStyles = css`\n .t-input::placeholder,\n .t-input,\n .t-title {\n font-size: var(--t-field-font-size);\n font-weight: var(--t-field-font-weight);\n line-height: var(--t-field-line-height);\n }\n @media only screen and (max-width: ${ScreenSizes.TABLET}px) {\n :host {\n --t-field-font-size: 0.813rem;\n --t-field-line-height: 1.125rem;\n --t-field-padding-y: 1.063rem;\n --t-field-padding-top: 1.5rem;\n }\n }\n @media only screen and (max-width: ${ScreenSizes.MOBILE}px) {\n :host {\n --t-field-font-size: 0.813rem;\n --t-field-line-height: 1rem;\n --t-field-padding-y: 1rem;\n --t-field-padding-top: 1.375rem;\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: 1px solid var(--t-field-color-form);\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: var(--t-field-title-left-position);\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: 300;\n line-height: 0.875rem;\n transform: translateY(0);\n top: 0.5rem;\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: var(--t-field-padding-x);\n transform: translateY(-50%);\n }\n .t-input-container .t-icon-set-container.t-icon-left {\n position: absolute;\n top: 50%;\n left: var(--t-field-padding-x);\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.MOBILE}px) {\n .t-input-container .t-icon-set-container {\n height: ${unsafeCSS(inputVars.iconMobileSize)};\n width: ${unsafeCSS(inputVars.iconMobileSize)};\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.MOBILE}px) {\n .t-input[type='search'] {\n padding-left: var(--t-padding-x-mobile-with-icon);\n }\n .t-input[type='search'] + .t-title {\n left: var(--t-padding-x-mobile-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,38 +0,0 @@
|
|
|
1
|
-
import { IconName } from '../../tuix-icon/enums/tuix-icon.enums.js';
|
|
2
|
-
import { Palette } from '../../utils/colors.js';
|
|
3
|
-
import { DarkPalette } from '../../utils/darkColors.js';
|
|
4
|
-
export declare enum InputType {
|
|
5
|
-
TEXT = "text",
|
|
6
|
-
SEARCH = "search",
|
|
7
|
-
PASSWORD = "password",
|
|
8
|
-
TEXT_AREA = "textarea"
|
|
9
|
-
}
|
|
10
|
-
export declare enum InputIconLocation {
|
|
11
|
-
LEFT = "left",
|
|
12
|
-
RIGHT = "right"
|
|
13
|
-
}
|
|
14
|
-
export declare enum DescriptionType {
|
|
15
|
-
TEXT = "text",
|
|
16
|
-
WARNING = "warning",
|
|
17
|
-
ERROR = "error",
|
|
18
|
-
SUCCESS = "success",
|
|
19
|
-
LOADING = "loading"
|
|
20
|
-
}
|
|
21
|
-
export declare const IconByDescriptionType: {
|
|
22
|
-
warning: IconName;
|
|
23
|
-
error: IconName;
|
|
24
|
-
success: IconName;
|
|
25
|
-
loading: IconName;
|
|
26
|
-
};
|
|
27
|
-
export declare const IconDescriptionColorLight: {
|
|
28
|
-
warning: Palette;
|
|
29
|
-
error: Palette;
|
|
30
|
-
success: Palette;
|
|
31
|
-
loading: Palette;
|
|
32
|
-
};
|
|
33
|
-
export declare const IconDescriptionColorDark: {
|
|
34
|
-
warning: DarkPalette;
|
|
35
|
-
error: DarkPalette;
|
|
36
|
-
success: DarkPalette;
|
|
37
|
-
loading: DarkPalette;
|
|
38
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { IconName } from '../../tuix-icon/enums/tuix-icon.enums.js';
|
|
2
|
-
import { Palette } from '../../utils/colors.js';
|
|
3
|
-
import { DarkPalette } from '../../utils/darkColors.js';
|
|
4
|
-
export var InputType;
|
|
5
|
-
(function (InputType) {
|
|
6
|
-
InputType["TEXT"] = "text";
|
|
7
|
-
InputType["SEARCH"] = "search";
|
|
8
|
-
InputType["PASSWORD"] = "password";
|
|
9
|
-
InputType["TEXT_AREA"] = "textarea";
|
|
10
|
-
})(InputType || (InputType = {}));
|
|
11
|
-
export var InputIconLocation;
|
|
12
|
-
(function (InputIconLocation) {
|
|
13
|
-
InputIconLocation["LEFT"] = "left";
|
|
14
|
-
InputIconLocation["RIGHT"] = "right";
|
|
15
|
-
})(InputIconLocation || (InputIconLocation = {}));
|
|
16
|
-
export var DescriptionType;
|
|
17
|
-
(function (DescriptionType) {
|
|
18
|
-
DescriptionType["TEXT"] = "text";
|
|
19
|
-
DescriptionType["WARNING"] = "warning";
|
|
20
|
-
DescriptionType["ERROR"] = "error";
|
|
21
|
-
DescriptionType["SUCCESS"] = "success";
|
|
22
|
-
DescriptionType["LOADING"] = "loading";
|
|
23
|
-
})(DescriptionType || (DescriptionType = {}));
|
|
24
|
-
export const IconByDescriptionType = {
|
|
25
|
-
[DescriptionType.WARNING]: IconName.TRIANGLE_EXCLAMATION,
|
|
26
|
-
[DescriptionType.ERROR]: IconName.CIRCLE_X,
|
|
27
|
-
[DescriptionType.SUCCESS]: IconName.CIRCLE_CHECK,
|
|
28
|
-
[DescriptionType.LOADING]: IconName.LOADER,
|
|
29
|
-
};
|
|
30
|
-
export const IconDescriptionColorLight = {
|
|
31
|
-
[DescriptionType.WARNING]: Palette.VALIDATION,
|
|
32
|
-
[DescriptionType.ERROR]: Palette.ERROR,
|
|
33
|
-
[DescriptionType.SUCCESS]: Palette.SUCCESS,
|
|
34
|
-
[DescriptionType.LOADING]: Palette.PRIMARY_300,
|
|
35
|
-
};
|
|
36
|
-
export const IconDescriptionColorDark = {
|
|
37
|
-
[DescriptionType.WARNING]: DarkPalette.VALIDATION,
|
|
38
|
-
[DescriptionType.ERROR]: DarkPalette.ERROR,
|
|
39
|
-
[DescriptionType.SUCCESS]: DarkPalette.SUCCESS,
|
|
40
|
-
[DescriptionType.LOADING]: DarkPalette.PRIMARY_300,
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=tuix-input.enums.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tuix-input.enums.js","sourceRoot":"","sources":["../../../../src/tuix-input/enums/tuix-input.enums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,0BAAa,CAAA;IACb,8BAAiB,CAAA;IACjB,kCAAqB,CAAA;IACrB,mCAAsB,CAAA;AACxB,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAED,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,oCAAe,CAAA;AACjB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED,MAAM,CAAN,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,sCAAmB,CAAA;IACnB,kCAAe,CAAA;IACf,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;AACrB,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,oBAAoB;IACxD,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,QAAQ;IAC1C,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,YAAY;IAChD,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM;CAC3C,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU;IAC7C,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK;IACtC,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,OAAO;IAC1C,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,WAAW;CAC/C,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,UAAU;IACjD,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK;IAC1C,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,OAAO;IAC9C,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,WAAW;CACnD,CAAC","sourcesContent":["import { IconName } from '../../tuix-icon/enums/tuix-icon.enums';\nimport { Palette } from '../../utils/colors';\nimport { DarkPalette } from '../../utils/darkColors';\n\nexport enum InputType {\n TEXT = 'text',\n SEARCH = 'search',\n PASSWORD = 'password',\n TEXT_AREA = 'textarea',\n}\n\nexport enum InputIconLocation {\n LEFT = 'left',\n RIGHT = 'right',\n}\n\nexport enum DescriptionType {\n TEXT = 'text',\n WARNING = 'warning',\n ERROR = 'error',\n SUCCESS = 'success',\n LOADING = 'loading',\n}\n\nexport const IconByDescriptionType = {\n [DescriptionType.WARNING]: IconName.TRIANGLE_EXCLAMATION,\n [DescriptionType.ERROR]: IconName.CIRCLE_X,\n [DescriptionType.SUCCESS]: IconName.CIRCLE_CHECK,\n [DescriptionType.LOADING]: IconName.LOADER,\n};\n\nexport const IconDescriptionColorLight = {\n [DescriptionType.WARNING]: Palette.VALIDATION,\n [DescriptionType.ERROR]: Palette.ERROR,\n [DescriptionType.SUCCESS]: Palette.SUCCESS,\n [DescriptionType.LOADING]: Palette.PRIMARY_300,\n};\n\nexport const IconDescriptionColorDark = {\n [DescriptionType.WARNING]: DarkPalette.VALIDATION,\n [DescriptionType.ERROR]: DarkPalette.ERROR,\n [DescriptionType.SUCCESS]: DarkPalette.SUCCESS,\n [DescriptionType.LOADING]: DarkPalette.PRIMARY_300,\n};\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { IconName } from '../../tuix-icon/enums/tuix-icon.enums.js';
|
|
2
|
-
import { DetailValue } from '../../utils/interfaces/detail-value.interface.js';
|
|
3
|
-
import { InputIconLocation } from '../enums/tuix-input.enums.js';
|
|
4
|
-
import { DarkPalette } from '../../utils/darkColors.js';
|
|
5
|
-
import { Palette } from '../../utils/colors.js';
|
|
6
|
-
export declare enum InputState {
|
|
7
|
-
INACTIVE = "inactive",
|
|
8
|
-
ACTIVE = "active",
|
|
9
|
-
DISABLED = "disabled"
|
|
10
|
-
}
|
|
11
|
-
export interface FormatIconSetParams {
|
|
12
|
-
iconName: IconName;
|
|
13
|
-
colorByState: Record<InputState, DarkPalette | Palette>;
|
|
14
|
-
location?: InputIconLocation;
|
|
15
|
-
clickHandler?: (e: MouseEvent) => void;
|
|
16
|
-
}
|
|
17
|
-
export type CustomEventTuixInput = CustomEvent<DetailValue<string>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tuix-input.interface.js","sourceRoot":"","sources":["../../../../src/tuix-input/interfaces/tuix-input.interface.ts"],"names":[],"mappings":"AAMA,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,mCAAqB,CAAA;IACrB,+BAAiB,CAAA;IACjB,mCAAqB,CAAA;AACvB,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB","sourcesContent":["import { IconName } from '../../tuix-icon/enums/tuix-icon.enums';\nimport { DetailValue } from '../../utils/interfaces/detail-value.interface';\nimport { InputIconLocation } from '../enums/tuix-input.enums';\nimport { DarkPalette } from '../../utils/darkColors';\nimport { Palette } from '../../utils/colors';\n\nexport enum InputState {\n INACTIVE = 'inactive',\n ACTIVE = 'active',\n DISABLED = 'disabled',\n}\nexport interface FormatIconSetParams {\n iconName: IconName;\n colorByState: Record<InputState, DarkPalette | Palette>;\n location?: InputIconLocation;\n clickHandler?: (e: MouseEvent) => void;\n}\n\nexport type CustomEventTuixInput = CustomEvent<DetailValue<string>>;\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
-
import { MainVariant } from '../utils/mainVariant.enum.js';
|
|
3
|
-
import { LinkTarget } from './enums/linkTarget.enum.js';
|
|
4
|
-
export declare class TuixLink extends LitElement {
|
|
5
|
-
static styles: import("lit").CSSResult[];
|
|
6
|
-
href?: string;
|
|
7
|
-
target: LinkTarget;
|
|
8
|
-
variant: MainVariant;
|
|
9
|
-
disabled: boolean;
|
|
10
|
-
dark: boolean;
|
|
11
|
-
private _getClassMap;
|
|
12
|
-
private _anchorTemplate;
|
|
13
|
-
private _divTemplate;
|
|
14
|
-
render(): TemplateResult;
|
|
15
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { html, LitElement } from 'lit';
|
|
3
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
-
import { MainVariant } from '../utils/mainVariant.enum.js';
|
|
5
|
-
import { LinkTarget } from './enums/linkTarget.enum.js';
|
|
6
|
-
import { classMap } from 'lit/directives/class-map.js';
|
|
7
|
-
import { linkStyles } from './TuixLink.styles.js';
|
|
8
|
-
import { linkFontStyles } from '../tuix-text/TuixText.styles.js';
|
|
9
|
-
let TuixLink = class TuixLink extends LitElement {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.target = LinkTarget.BLANK;
|
|
13
|
-
this.variant = MainVariant.PRIMARY;
|
|
14
|
-
this.disabled = false;
|
|
15
|
-
this.dark = false;
|
|
16
|
-
}
|
|
17
|
-
_getClassMap() {
|
|
18
|
-
return {
|
|
19
|
-
link: true,
|
|
20
|
-
disabled: this.disabled,
|
|
21
|
-
[MainVariant.SECONDARY]: this.variant === MainVariant.SECONDARY,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
_anchorTemplate() {
|
|
25
|
-
return html `
|
|
26
|
-
<a
|
|
27
|
-
target="${this.disabled ? LinkTarget.SELF : this.target}"
|
|
28
|
-
class="${classMap(this._getClassMap())}"
|
|
29
|
-
href="${this.disabled ? 'javascript:void(0)' : this.href}"
|
|
30
|
-
>
|
|
31
|
-
<slot></slot>
|
|
32
|
-
</a>
|
|
33
|
-
`;
|
|
34
|
-
}
|
|
35
|
-
_divTemplate() {
|
|
36
|
-
return html `
|
|
37
|
-
<div class="${classMap(this._getClassMap())}">
|
|
38
|
-
<slot></slot>
|
|
39
|
-
</div>
|
|
40
|
-
`;
|
|
41
|
-
}
|
|
42
|
-
render() {
|
|
43
|
-
const isValidAnchor = this.href && !this.disabled;
|
|
44
|
-
if (isValidAnchor) {
|
|
45
|
-
return this._anchorTemplate();
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
return this._divTemplate();
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
TuixLink.styles = [linkStyles, linkFontStyles];
|
|
53
|
-
__decorate([
|
|
54
|
-
property({ type: String })
|
|
55
|
-
], TuixLink.prototype, "href", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
property({ type: LinkTarget })
|
|
58
|
-
], TuixLink.prototype, "target", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
property({ type: MainVariant, reflect: true })
|
|
61
|
-
], TuixLink.prototype, "variant", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
property({ type: Boolean, reflect: true })
|
|
64
|
-
], TuixLink.prototype, "disabled", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
property({ type: Boolean, reflect: true })
|
|
67
|
-
], TuixLink.prototype, "dark", void 0);
|
|
68
|
-
TuixLink = __decorate([
|
|
69
|
-
customElement('tuix-link')
|
|
70
|
-
], TuixLink);
|
|
71
|
-
export { TuixLink };
|
|
72
|
-
//# sourceMappingURL=TuixLink.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,CAAC;AACrD,OAAO,EAAa,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG9D,IAAa,QAAQ,GAArB,MAAa,QAAS,SAAQ,UAAU;IAAxC;;QAOE,WAAM,GAAG,UAAU,CAAC,KAAK,CAAC;QAG1B,YAAO,GAAG,WAAW,CAAC,OAAO,CAAC;QAG9B,aAAQ,GAAG,KAAK,CAAC;QAGjB,SAAI,GAAG,KAAK,CAAC;IAsCf,CAAC;IApCS,YAAY;QAClB,OAAO;YACL,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,KAAK,WAAW,CAAC,SAAS;SAChE,CAAC;IACJ,CAAC;IAEO,eAAe;QACrB,OAAO,IAAI,CAAA;;kBAEG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM;iBAC9C,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;gBAC9B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,oBAAoB,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,56 +0,0 @@
|
|
|
1
|
-
import { css, unsafeCSS } from 'lit';
|
|
2
|
-
import { MainVariant } from '../utils/mainVariant.enum.js';
|
|
3
|
-
import { Palette } from '../utils/colors.js';
|
|
4
|
-
import { DarkPalette } from '../utils/darkColors.js';
|
|
5
|
-
export const LINK_TEXT_COLOR_VAR_NAME = '--t-link-text-color';
|
|
6
|
-
export const linkStyles = css `
|
|
7
|
-
${unsafeCSS(`
|
|
8
|
-
:host {
|
|
9
|
-
--t-link-border-color: ${Palette.MAIN};
|
|
10
|
-
${LINK_TEXT_COLOR_VAR_NAME}: ${Palette.MAIN}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:host([dark]) {
|
|
14
|
-
--t-link-border-color: ${DarkPalette.MAIN};
|
|
15
|
-
${LINK_TEXT_COLOR_VAR_NAME}: ${DarkPalette.MAIN}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:host([variant=${MainVariant.SECONDARY}]) {
|
|
19
|
-
--t-link-border-color: ${Palette.WHITE};
|
|
20
|
-
${LINK_TEXT_COLOR_VAR_NAME}: ${Palette.WHITE}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
:host([variant=${MainVariant.SECONDARY}][dark]) {
|
|
24
|
-
--t-link-border-color: ${DarkPalette.WHITE};
|
|
25
|
-
${LINK_TEXT_COLOR_VAR_NAME}: ${DarkPalette.WHITE}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
:host([disabled]) .link.disabled {
|
|
29
|
-
--t-link-border-color: ${Palette.PRIMARY_300};
|
|
30
|
-
${LINK_TEXT_COLOR_VAR_NAME}: ${Palette.PRIMARY_300}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.link {
|
|
34
|
-
text-decoration: none;
|
|
35
|
-
display: inline;
|
|
36
|
-
color: var(${LINK_TEXT_COLOR_VAR_NAME});
|
|
37
|
-
border-bottom: solid 1px var(--t-link-border-active-color, transparent);
|
|
38
|
-
}
|
|
39
|
-
.link:hover {
|
|
40
|
-
border-bottom: solid 1px var(--t-link-border-color);
|
|
41
|
-
cursor: pointer;
|
|
42
|
-
}
|
|
43
|
-
.link.secondary {
|
|
44
|
-
color: var(${LINK_TEXT_COLOR_VAR_NAME});
|
|
45
|
-
}
|
|
46
|
-
.link.secondary:hover {
|
|
47
|
-
border-bottom: solid 1px var(--t-link-border-color);
|
|
48
|
-
}
|
|
49
|
-
.link.disabled {
|
|
50
|
-
border-bottom: solid 1px var(--t-link-border-color);
|
|
51
|
-
color: var(${LINK_TEXT_COLOR_VAR_NAME});
|
|
52
|
-
cursor: not-allowed;
|
|
53
|
-
}
|
|
54
|
-
`)}
|
|
55
|
-
`;
|
|
56
|
-
//# sourceMappingURL=TuixLink.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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 var(--t-link-border-active-color, 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,8 +0,0 @@
|
|
|
1
|
-
export var LinkTarget;
|
|
2
|
-
(function (LinkTarget) {
|
|
3
|
-
LinkTarget["BLANK"] = "_blank";
|
|
4
|
-
LinkTarget["SELF"] = "_self";
|
|
5
|
-
LinkTarget["PARENT"] = "_parent";
|
|
6
|
-
LinkTarget["TOP"] = "_top";
|
|
7
|
-
})(LinkTarget || (LinkTarget = {}));
|
|
8
|
-
//# sourceMappingURL=linkTarget.enum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linkTarget.enum.js","sourceRoot":"","sources":["../../../../src/tuix-link/enums/linkTarget.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,8BAAgB,CAAA;IAChB,4BAAc,CAAA;IACd,gCAAkB,CAAA;IAClB,0BAAY,CAAA;AACd,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB","sourcesContent":["export enum LinkTarget {\n BLANK = '_blank',\n SELF = '_self',\n PARENT = '_parent',\n TOP = '_top',\n}\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
export declare class TuixModal extends LitElement {
|
|
3
|
-
static styles: import("lit").CSSResult[];
|
|
4
|
-
visible: boolean;
|
|
5
|
-
dark: boolean;
|
|
6
|
-
scrollable: boolean;
|
|
7
|
-
protected _onClose(): void;
|
|
8
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
9
|
-
}
|