tuix-webcomponents 0.0.22 → 0.0.25

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.
Files changed (133) hide show
  1. package/README.md +110 -21
  2. package/dist/assets/tuix-styles.css +72 -0
  3. package/dist/src/index.d.ts +27 -1
  4. package/dist/src/index.js +19 -16
  5. package/dist/src/react/index.d.ts +42 -0
  6. package/dist/src/react/index.js +114 -0
  7. package/dist/src/tuix-button/TuixBaseButton.d.ts +17 -0
  8. package/dist/src/tuix-button/TuixBaseButton.js +60 -0
  9. package/dist/src/tuix-button/TuixButton.d.ts +6 -12
  10. package/dist/src/tuix-button/TuixButton.js +35 -59
  11. package/dist/src/tuix-button/TuixButton.styles.d.ts +1 -0
  12. package/dist/src/tuix-button/TuixButton.styles.js +77 -44
  13. package/dist/src/tuix-button/enums/tuix-button.enums.js +3 -4
  14. package/dist/src/tuix-button/interfaces/tuix-button.interface.d.ts +1 -0
  15. package/dist/src/tuix-button/interfaces/tuix-button.interface.js +1 -0
  16. package/dist/src/tuix-checkbox/TuixCheckbox.d.ts +17 -0
  17. package/dist/src/tuix-checkbox/TuixCheckbox.js +108 -0
  18. package/dist/src/tuix-checkbox/TuixCheckbox.styles.d.ts +4 -0
  19. package/dist/src/tuix-checkbox/TuixCheckbox.styles.js +132 -0
  20. package/dist/src/tuix-checkbox/enums/tuix-checkbox.enums.d.ts +21 -0
  21. package/dist/src/tuix-checkbox/enums/tuix-checkbox.enums.js +23 -0
  22. package/dist/src/tuix-checkbox/interfaces/tuix-checkbox.interface.d.ts +5 -0
  23. package/dist/src/tuix-checkbox/interfaces/tuix-checkbox.interface.js +1 -0
  24. package/dist/src/tuix-dropdown/TuixDropdown.d.ts +13 -3
  25. package/dist/src/tuix-dropdown/TuixDropdown.js +125 -39
  26. package/dist/src/tuix-dropdown/TuixDropdown.styles.js +59 -19
  27. package/dist/src/tuix-dropdown/enums/tuix-dropdown.enums.d.ts +0 -6
  28. package/dist/src/tuix-dropdown/enums/tuix-dropdown.enums.js +0 -8
  29. package/dist/src/tuix-dropdown/interfaces/tuix-dropdown.interface.d.ts +15 -1
  30. package/dist/src/tuix-dropdown/interfaces/tuix-dropdown.interface.js +0 -1
  31. package/dist/src/tuix-icon/TuixIcon.d.ts +5 -1
  32. package/dist/src/tuix-icon/TuixIcon.icons.d.ts +2 -2
  33. package/dist/src/tuix-icon/TuixIcon.icons.js +299 -7
  34. package/dist/src/tuix-icon/TuixIcon.js +37 -23
  35. package/dist/src/tuix-icon/enums/tuix-icon.enums.d.ts +67 -21
  36. package/dist/src/tuix-icon/enums/tuix-icon.enums.js +66 -22
  37. package/dist/src/tuix-icon-button/TuixIconButton.d.ts +6 -11
  38. package/dist/src/tuix-icon-button/TuixIconButton.js +20 -49
  39. package/dist/src/tuix-input/TuixInput.d.ts +12 -6
  40. package/dist/src/tuix-input/TuixInput.js +97 -50
  41. package/dist/src/tuix-input/TuixInput.styles.js +99 -110
  42. package/dist/src/tuix-input/enums/tuix-input.enums.d.ts +10 -8
  43. package/dist/src/tuix-input/enums/tuix-input.enums.js +10 -11
  44. package/dist/src/tuix-input/interfaces/tuix-input.interface.d.ts +11 -6
  45. package/dist/src/tuix-input/interfaces/tuix-input.interface.js +5 -2
  46. package/dist/src/tuix-link/TuixLink.d.ts +8 -4
  47. package/dist/src/tuix-link/TuixLink.js +37 -38
  48. package/dist/src/tuix-link/TuixLink.styles.d.ts +2 -0
  49. package/dist/src/tuix-link/TuixLink.styles.js +55 -0
  50. package/dist/src/tuix-link/enums/linkTarget.enum.d.ts +4 -4
  51. package/dist/src/tuix-link/enums/linkTarget.enum.js +4 -5
  52. package/dist/src/tuix-modal/TuixModal.d.ts +11 -0
  53. package/dist/src/tuix-modal/TuixModal.js +65 -0
  54. package/dist/src/tuix-modal/TuixModal.styles.d.ts +2 -0
  55. package/dist/src/tuix-modal/TuixModal.styles.js +55 -0
  56. package/dist/src/tuix-paper/TuixPaper.d.ts +7 -4
  57. package/dist/src/tuix-paper/TuixPaper.js +29 -23
  58. package/dist/src/tuix-paper/TuixPaper.styles.d.ts +1 -0
  59. package/dist/src/tuix-paper/TuixPaper.styles.js +30 -0
  60. package/dist/src/tuix-paper/enums/tuix-paper.enum.d.ts +12 -6
  61. package/dist/src/tuix-paper/enums/tuix-paper.enum.js +15 -9
  62. package/dist/src/tuix-radio-button/TuixRadioButton.d.ts +17 -0
  63. package/dist/src/tuix-radio-button/TuixRadioButton.js +96 -0
  64. package/dist/src/tuix-radio-button/TuixRadioButton.styles.d.ts +5 -0
  65. package/dist/src/tuix-radio-button/TuixRadioButton.styles.js +135 -0
  66. package/dist/src/tuix-radio-button/interfaces/tuix-radio-button.interface.d.ts +3 -0
  67. package/dist/src/tuix-radio-button/interfaces/tuix-radio-button.interface.js +1 -0
  68. package/dist/src/tuix-table/TuixTable.d.ts +48 -0
  69. package/dist/src/tuix-table/TuixTable.js +369 -0
  70. package/dist/src/tuix-table/TuixTable.styles.d.ts +2 -0
  71. package/dist/src/tuix-table/TuixTable.styles.js +197 -0
  72. package/dist/src/tuix-table/interfaces/tuix-table.interface.d.ts +45 -0
  73. package/dist/src/tuix-table/interfaces/tuix-table.interface.js +1 -0
  74. package/dist/src/tuix-text/TuixText.d.ts +7 -4
  75. package/dist/src/tuix-text/TuixText.js +44 -18
  76. package/dist/src/tuix-text/TuixText.styles.d.ts +1 -0
  77. package/dist/src/tuix-text/TuixText.styles.js +145 -64
  78. package/dist/src/tuix-text/enums/tuix-text.enums.d.ts +25 -11
  79. package/dist/src/tuix-text/enums/tuix-text.enums.js +61 -14
  80. package/dist/src/tuix-toast/TuixToast.d.ts +18 -0
  81. package/dist/src/tuix-toast/TuixToast.js +103 -0
  82. package/dist/src/tuix-toast/TuixToast.styles.d.ts +3 -0
  83. package/dist/src/tuix-toast/TuixToast.styles.js +43 -0
  84. package/dist/src/tuix-toast/enums/tuix-toast.enums.d.ts +20 -0
  85. package/dist/src/tuix-toast/enums/tuix-toast.enums.js +59 -0
  86. package/dist/src/tuix-toggle-button/TuixToggleButton.d.ts +14 -0
  87. package/dist/src/tuix-toggle-button/TuixToggleButton.js +86 -0
  88. package/dist/src/tuix-toggle-button/TuixToggleButton.styles.d.ts +5 -0
  89. package/dist/src/tuix-toggle-button/TuixToggleButton.styles.js +134 -0
  90. package/dist/src/tuix-toggle-button/interfaces/tuix-toggle.interface.d.ts +2 -0
  91. package/dist/src/tuix-toggle-button/interfaces/tuix-toggle.interface.js +1 -0
  92. package/dist/src/utils/colors.d.ts +29 -11
  93. package/dist/src/utils/colors.js +31 -46
  94. package/dist/src/utils/darkColors.d.ts +32 -1
  95. package/dist/src/utils/darkColors.js +33 -11
  96. package/dist/src/utils/hex-rgb.js +0 -1
  97. package/dist/src/utils/interfaces/detail-value.interface.d.ts +3 -0
  98. package/dist/src/utils/interfaces/detail-value.interface.js +1 -0
  99. package/dist/src/utils/mainVariant.enum.js +0 -1
  100. package/dist/src/utils/screenSizes.enum.d.ts +2 -2
  101. package/dist/src/utils/screenSizes.enum.js +2 -4
  102. package/dist/src/utils/slottedClassName.d.ts +2 -0
  103. package/dist/src/utils/slottedClassName.js +1 -0
  104. package/package.json +113 -68
  105. package/dist/src/index.js.map +0 -1
  106. package/dist/src/tuix-button/TuixButton.js.map +0 -1
  107. package/dist/src/tuix-button/TuixButton.styles.js.map +0 -1
  108. package/dist/src/tuix-button/enums/tuix-button.enums.js.map +0 -1
  109. package/dist/src/tuix-dropdown/TuixDropdown.js.map +0 -1
  110. package/dist/src/tuix-dropdown/TuixDropdown.styles.js.map +0 -1
  111. package/dist/src/tuix-dropdown/enums/tuix-dropdown.enums.js.map +0 -1
  112. package/dist/src/tuix-dropdown/interfaces/tuix-dropdown.interface.js.map +0 -1
  113. package/dist/src/tuix-icon/TuixIcon.icons.js.map +0 -1
  114. package/dist/src/tuix-icon/TuixIcon.js.map +0 -1
  115. package/dist/src/tuix-icon/enums/tuix-icon.enums.js.map +0 -1
  116. package/dist/src/tuix-icon-button/TuixIconButton.js.map +0 -1
  117. package/dist/src/tuix-input/TuixInput.js.map +0 -1
  118. package/dist/src/tuix-input/TuixInput.styles.js.map +0 -1
  119. package/dist/src/tuix-input/enums/tuix-input.enums.js.map +0 -1
  120. package/dist/src/tuix-input/interfaces/tuix-input.interface.js.map +0 -1
  121. package/dist/src/tuix-link/TuixLink.js.map +0 -1
  122. package/dist/src/tuix-link/enums/linkTarget.enum.js.map +0 -1
  123. package/dist/src/tuix-paper/TuixPaper.js.map +0 -1
  124. package/dist/src/tuix-paper/enums/tuix-paper.enum.js.map +0 -1
  125. package/dist/src/tuix-text/TuixText.js.map +0 -1
  126. package/dist/src/tuix-text/TuixText.styles.js.map +0 -1
  127. package/dist/src/tuix-text/enums/tuix-text.enums.js.map +0 -1
  128. package/dist/src/utils/colors.js.map +0 -1
  129. package/dist/src/utils/darkColors.js.map +0 -1
  130. package/dist/src/utils/hex-rgb.js.map +0 -1
  131. package/dist/src/utils/mainVariant.enum.js.map +0 -1
  132. package/dist/src/utils/screenSizes.enum.js.map +0 -1
  133. package/dist/tsconfig.publish.tsbuildinfo +0 -1
@@ -1,39 +1,48 @@
1
1
  import { css, unsafeCSS } from 'lit';
2
2
  import { ScreenSizes } from '../utils/screenSizes.enum';
3
- import { palette } from '../utils/colors';
4
- import { darkPalette } from '../utils/darkColors';
3
+ import { Palette } from '../utils/colors';
4
+ import { DarkPalette } from '../utils/darkColors';
5
5
  import { hexToRgb } from '../utils/hex-rgb';
6
6
  const inputVars = {
7
7
  gapX: '10px',
8
8
  iconDesktopSize: '1.5rem',
9
- iconTabletSize: '1rem',
9
+ iconMobileSize: '1rem',
10
10
  paddingX: '1.25rem',
11
11
  };
12
- const rgbDarkValidation = hexToRgb(darkPalette.validation);
13
- const rgbDarkError = hexToRgb(darkPalette.error);
12
+ const rgbDarkValidation = hexToRgb(DarkPalette.VALIDATION);
13
+ const rgbDarkError = hexToRgb(DarkPalette.ERROR);
14
14
  export const hostStyles = css `
15
15
  :host {
16
- --t-field-color-form: ${unsafeCSS(palette.primary_50)};
17
- --t-field-color-title: ${unsafeCSS(palette.primary_300)};
18
- --t-field-color-text: ${unsafeCSS(palette.dark)};
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)};
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
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;
29
37
  }
30
38
  :host([dark]) {
31
- --t-field-color-form: ${unsafeCSS(darkPalette.primary_950)};
32
- --t-field-color-text: ${unsafeCSS(darkPalette.primary_100)};
33
- --t-field-color-description: ${unsafeCSS(darkPalette.neutral_200)};
34
- --t-field-color-stroke-focus: ${unsafeCSS(darkPalette.secondary)};
35
- --t-field-color-text-disabled: ${unsafeCSS(darkPalette.primary_800)};
36
- --t-field-color-stroke-validation: ${unsafeCSS(darkPalette.validation_200)};
39
+ --t-field-color-form: ${unsafeCSS(DarkPalette.PRIMARY_950)};
40
+ --t-field-color-title: ${unsafeCSS(DarkPalette.PRIMARY_400)};
41
+ --t-field-color-text: ${unsafeCSS(DarkPalette.PRIMARY_100)};
42
+ --t-field-color-description: ${unsafeCSS(DarkPalette.NEUTRAL_200)};
43
+ --t-field-color-stroke-focus: ${unsafeCSS(DarkPalette.SECONDARY)};
44
+ --t-field-color-text-disabled: ${unsafeCSS(DarkPalette.PRIMARY_800)};
45
+ --t-field-color-stroke-validation: ${unsafeCSS(DarkPalette.VALIDATION_200)};
37
46
  --t-field-color-bg-validation: rgba(
38
47
  ${rgbDarkValidation.r},
39
48
  ${rgbDarkValidation.g},
@@ -46,58 +55,54 @@ export const hostStyles = css `
46
55
  ${rgbDarkError.b},
47
56
  0.2
48
57
  );
49
- --t-field-color-stroke-error: ${unsafeCSS(darkPalette.error_200)};
58
+ --t-field-color-stroke-error: ${unsafeCSS(DarkPalette.ERROR_200)};
50
59
  }
51
60
  `;
52
61
  export const inputComponentStyles = css `
62
+ .t-textarea-main-container {
63
+ display: flex;
64
+ flex-direction: column;
65
+ width: 100%;
66
+ height: 100%;
67
+ }
53
68
  .t-input-container {
54
69
  position: relative;
55
70
  --t-padding-x-desktop-with-icon: calc(
56
- ${unsafeCSS(inputVars.paddingX)} + ${unsafeCSS(inputVars.iconDesktopSize)} +
71
+ var(--t-field-padding-x) + ${unsafeCSS(inputVars.iconDesktopSize)} +
57
72
  ${unsafeCSS(inputVars.gapX)}
58
73
  );
59
- --t-padding-x-tablet-with-icon: calc(
60
- ${unsafeCSS(inputVars.paddingX)} + ${unsafeCSS(inputVars.iconTabletSize)} +
74
+ --t-padding-x-mobile-with-icon: calc(
75
+ var(--t-field-padding-x) + ${unsafeCSS(inputVars.iconMobileSize)} +
61
76
  ${unsafeCSS(inputVars.gapX)}
62
77
  );
78
+ --t-border-size: 1px;
79
+ }
80
+ .t-input-container.t-textarea-container {
81
+ height: 100%;
63
82
  }
64
83
  .t-input {
65
- padding: 1rem ${unsafeCSS(inputVars.paddingX)};
84
+ padding: calc(var(--t-field-padding-y) - var(--t-border-size))
85
+ var(--t-field-padding-x);
66
86
  border-radius: 4px;
67
- font-family: 'rubik', sans-serif;
87
+ font-family: 'Rubik', sans-serif;
68
88
  cursor: var(--t-field-input-cursor);
89
+ width: 100%;
90
+ box-sizing: border-box;
91
+ }
92
+ .t-input.t-textarea {
93
+ height: 100%;
94
+ display: block;
69
95
  }
70
96
  .t-input.with-title {
71
- padding-top: 1.5rem;
72
- padding-bottom: 0.5rem;
97
+ padding-top: calc(var(--t-field-padding-top) - var(--t-border-size));
98
+ padding-bottom: calc(var(--t-field-padding-bottom) - var(--t-border-size));
73
99
  }
74
100
  .t-input.with-icon-right {
75
101
  padding-right: var(--t-padding-x-desktop-with-icon);
76
102
  }
77
- @media only screen and (max-width: ${ScreenSizes.TABLET}px) {
78
- .t-input {
79
- padding-top: 0.875rem;
80
- padding-bottom: 0.875rem;
81
- }
82
- .t-input.with-title {
83
- padding-top: 1.375rem;
84
- padding-bottom: 0.375rem;
85
- }
86
- .t-input.with-icon-right {
87
- padding-right: var(--t-padding-x-tablet-with-icon);
88
- }
89
- }
90
103
  @media only screen and (max-width: ${ScreenSizes.MOBILE}px) {
91
- .t-input {
92
- padding-top: 0.75rem;
93
- padding-bottom: 0.75rem;
94
- }
95
- .t-input.with-title {
96
- padding-top: 1.25rem;
97
- padding-bottom: 0.25rem;
98
- }
99
104
  .t-input.with-icon-right {
100
- padding-right: var(--t-padding-x-tablet-with-icon);
105
+ padding-right: var(--t-padding-x-mobile-with-icon);
101
106
  }
102
107
  }
103
108
  `;
@@ -105,27 +110,24 @@ export const inputFontStyles = css `
105
110
  .t-input::placeholder,
106
111
  .t-input,
107
112
  .t-title {
108
- font-size: 1rem;
109
- font-weight: 400;
110
- line-height: 1.5rem;
113
+ font-size: var(--t-field-font-size);
114
+ font-weight: var(--t-field-font-weight);
115
+ line-height: var(--t-field-line-height);
111
116
  }
112
117
  @media only screen and (max-width: ${ScreenSizes.TABLET}px) {
113
- .t-input::placeholder {
114
- font-size: 0.875rem;
115
- line-height: 1.25rem;
116
- }
117
- .t-input {
118
- font-size: 1rem;
119
- line-height: 1.25rem;
118
+ :host {
119
+ --t-field-font-size: 0.813rem;
120
+ --t-field-line-height: 1.125rem;
121
+ --t-field-padding-y: 1.063rem;
122
+ --t-field-padding-top: 1.5rem;
120
123
  }
121
124
  }
122
125
  @media only screen and (max-width: ${ScreenSizes.MOBILE}px) {
123
- .t-input {
124
- font-size: 0.875rem;
125
- line-height: 1rem;
126
- }
127
- .t-input::placeholder {
128
- line-height: 1rem;
126
+ :host {
127
+ --t-field-font-size: 0.813rem;
128
+ --t-field-line-height: 1rem;
129
+ --t-field-padding-y: 1rem;
130
+ --t-field-padding-top: 1.375rem;
129
131
  }
130
132
  }
131
133
  `;
@@ -143,8 +145,9 @@ export const inputColorStyles = css `
143
145
  border: 1px solid var(--t-field-color-stroke-focus);
144
146
  outline: 1px solid var(--t-field-color-stroke-focus);
145
147
  }
146
- .t-input[disabled] {
147
- pointer-events: none;
148
+ .t-input[disabled]:disabled {
149
+ cursor: not-allowed;
150
+ border: 1px solid var(--t-field-color-form);
148
151
  color: var(--t-field-color-text-disabled);
149
152
  }
150
153
  .t-input.with-title::placeholder {
@@ -170,12 +173,16 @@ export const inputTitleStyles = css `
170
173
  .t-title {
171
174
  position: absolute;
172
175
  top: 50%;
173
- left: 1.25rem;
174
- font-family: 'rubik', sans-serif;
176
+ left: var(--t-field-title-left-position);
177
+ font-family: 'Rubik', sans-serif;
175
178
  color: var(--t-field-color-title);
176
179
  transform: translateY(-50%);
177
180
  transition-duration: 0.3s;
178
181
  pointer-events: none;
182
+ -webkit-user-select: none;
183
+ -moz-user-select: none;
184
+ -ms-user-select: none;
185
+ user-select: none;
179
186
  }
180
187
  .t-textarea-container .t-title {
181
188
  top: 1rem;
@@ -184,52 +191,31 @@ export const inputTitleStyles = css `
184
191
  .t-input.with-title:focus + .t-title,
185
192
  .t-input.with-title:not(:placeholder-shown) + .t-title {
186
193
  font-size: 0.75rem;
187
- font-weight: 400;
188
- line-height: 1rem;
194
+ font-weight: 300;
195
+ line-height: 0.875rem;
189
196
  transform: translateY(0);
190
197
  top: 0.5rem;
191
198
  }
192
- @media only screen and (max-width: ${ScreenSizes.TABLET}px) {
193
- .t-title {
194
- font-size: 0.875rem;
195
- line-height: 1.25rem;
196
- }
197
- .t-input.with-title:focus + .t-title,
198
- .t-input.with-title:not(:placeholder-shown) + .t-title {
199
- top: 0.375rem;
200
- }
201
- .t-textarea-container .t-title {
202
- top: 0.875rem;
203
- }
204
- }
205
- @media only screen and (max-width: ${ScreenSizes.MOBILE}px) {
206
- .t-input.with-title:focus + .t-title,
207
- .t-input.with-title:not(:placeholder-shown) + .t-title {
208
- top: 0.25rem;
209
- }
210
- .t-textarea-container .t-title {
211
- top: 0.75rem;
212
- }
213
- }
214
199
  `;
215
200
  export const inputIconStyles = css `
216
- .t-icon-set-container.t-icon-click {
217
- cursor: pointer;
218
- }
219
201
  .t-input-container .t-icon-set-container {
220
202
  height: ${unsafeCSS(inputVars.iconDesktopSize)};
221
203
  width: ${unsafeCSS(inputVars.iconDesktopSize)};
204
+ cursor: var(--t-field-input-cursor);
205
+ }
206
+ .t-icon-set-container.t-icon-click {
207
+ cursor: pointer;
222
208
  }
223
209
  .t-input-container .t-icon-set-container.t-icon-right {
224
210
  position: absolute;
225
211
  top: 50%;
226
- right: ${unsafeCSS(inputVars.paddingX)};
212
+ right: var(--t-field-padding-x);
227
213
  transform: translateY(-50%);
228
214
  }
229
215
  .t-input-container .t-icon-set-container.t-icon-left {
230
216
  position: absolute;
231
217
  top: 50%;
232
- left: ${unsafeCSS(inputVars.paddingX)};
218
+ left: var(--t-field-padding-x);
233
219
  transform: translateY(-50%);
234
220
  }
235
221
  .t-icon-inactive {
@@ -251,16 +237,20 @@ export const inputIconStyles = css `
251
237
  .t-input:focus ~ .t-icon-set-container .t-icon-active {
252
238
  display: inline;
253
239
  }
240
+ .t-input[disabled] ~ .t-icon-set-container .t-icon-active {
241
+ display: none;
242
+ }
254
243
  .t-input[disabled] ~ .t-icon-set-container .t-icon-inactive {
255
244
  display: none;
256
245
  }
257
246
  .t-input[disabled] ~ .t-icon-set-container .t-icon-disabled {
258
247
  display: inline;
248
+ cursor: not-allowed;
259
249
  }
260
- @media only screen and (max-width: ${ScreenSizes.TABLET}px) {
250
+ @media only screen and (max-width: ${ScreenSizes.MOBILE}px) {
261
251
  .t-input-container .t-icon-set-container {
262
- height: ${unsafeCSS(inputVars.iconTabletSize)};
263
- width: ${unsafeCSS(inputVars.iconTabletSize)};
252
+ height: ${unsafeCSS(inputVars.iconMobileSize)};
253
+ width: ${unsafeCSS(inputVars.iconMobileSize)};
264
254
  }
265
255
  }
266
256
  `;
@@ -271,12 +261,12 @@ export const inputSearchStyles = css `
271
261
  .t-input[type='search'] + .t-title {
272
262
  left: var(--t-padding-x-desktop-with-icon);
273
263
  }
274
- @media only screen and (max-width: ${ScreenSizes.TABLET}px) {
264
+ @media only screen and (max-width: ${ScreenSizes.MOBILE}px) {
275
265
  .t-input[type='search'] {
276
- padding-left: var(--t-padding-x-tablet-with-icon);
266
+ padding-left: var(--t-padding-x-mobile-with-icon);
277
267
  }
278
268
  .t-input[type='search'] + .t-title {
279
- left: var(--t-padding-x-tablet-with-icon);
269
+ left: var(--t-padding-x-mobile-with-icon);
280
270
  }
281
271
  }
282
272
  input[type='search']::-webkit-search-decoration,
@@ -289,7 +279,7 @@ export const inputSearchStyles = css `
289
279
  export const inputDescriptionStyles = css `
290
280
  .t-input-description-container {
291
281
  margin-top: 0.5rem;
292
- font-family: 'rubik', sans-serif;
282
+ font-family: 'Rubik', sans-serif;
293
283
  font-size: 0.75rem;
294
284
  line-height: 1rem;
295
285
  color: var(--t-field-color-description);
@@ -304,4 +294,3 @@ export const inputDescriptionStyles = css `
304
294
  gap: 0.5rem;
305
295
  }
306
296
  `;
307
- //# sourceMappingURL=TuixInput.styles.js.map
@@ -1,4 +1,6 @@
1
1
  import { IconName } from '../../tuix-icon/enums/tuix-icon.enums';
2
+ import { Palette } from '../../utils/colors';
3
+ import { DarkPalette } from '../../utils/darkColors';
2
4
  export declare enum InputType {
3
5
  TEXT = "text",
4
6
  SEARCH = "search",
@@ -23,14 +25,14 @@ export declare const IconByDescriptionType: {
23
25
  loading: IconName;
24
26
  };
25
27
  export declare const IconDescriptionColorLight: {
26
- warning: string;
27
- error: string;
28
- success: string;
29
- loading: string;
28
+ warning: Palette;
29
+ error: Palette;
30
+ success: Palette;
31
+ loading: Palette;
30
32
  };
31
33
  export declare const IconDescriptionColorDark: {
32
- warning: string;
33
- error: string;
34
- success: string;
35
- loading: string;
34
+ warning: DarkPalette;
35
+ error: DarkPalette;
36
+ success: DarkPalette;
37
+ loading: DarkPalette;
36
38
  };
@@ -1,6 +1,6 @@
1
1
  import { IconName } from '../../tuix-icon/enums/tuix-icon.enums';
2
- import { palette } from '../../utils/colors';
3
- import { darkPalette } from '../../utils/darkColors';
2
+ import { Palette } from '../../utils/colors';
3
+ import { DarkPalette } from '../../utils/darkColors';
4
4
  export var InputType;
5
5
  (function (InputType) {
6
6
  InputType["TEXT"] = "text";
@@ -28,15 +28,14 @@ export const IconByDescriptionType = {
28
28
  [DescriptionType.LOADING]: IconName.LOADER,
29
29
  };
30
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,
31
+ [DescriptionType.WARNING]: Palette.VALIDATION,
32
+ [DescriptionType.ERROR]: Palette.ERROR,
33
+ [DescriptionType.SUCCESS]: Palette.SUCCESS,
34
+ [DescriptionType.LOADING]: Palette.PRIMARY_300,
35
35
  };
36
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,
37
+ [DescriptionType.WARNING]: DarkPalette.VALIDATION,
38
+ [DescriptionType.ERROR]: DarkPalette.ERROR,
39
+ [DescriptionType.SUCCESS]: DarkPalette.SUCCESS,
40
+ [DescriptionType.LOADING]: DarkPalette.PRIMARY_300,
41
41
  };
42
- //# sourceMappingURL=tuix-input.enums.js.map
@@ -1,13 +1,18 @@
1
1
  import { IconName } from '../../tuix-icon/enums/tuix-icon.enums';
2
+ import { type DetailValue } from '../../utils/interfaces/detail-value.interface';
2
3
  import { InputIconLocation } from '../enums/tuix-input.enums';
3
- export interface InputIconColors {
4
- inactive: string;
5
- active: string;
6
- disabled: string;
7
- }
4
+ import { DarkPalette } from '../../utils/darkColors';
5
+ import { Palette } from '../../utils/colors';
6
+ export declare const InputState: {
7
+ INACTIVE: string;
8
+ ACTIVE: string;
9
+ DISABLED: string;
10
+ };
11
+ export type InputState = (typeof InputState)[keyof typeof InputState];
8
12
  export interface FormatIconSetParams {
9
13
  iconName: IconName;
10
- colorByState: InputIconColors;
14
+ colorByState: Record<InputState, DarkPalette | Palette>;
11
15
  location?: InputIconLocation;
12
16
  clickHandler?: (e: MouseEvent) => void;
13
17
  }
18
+ export type CustomEventTuixInput = CustomEvent<DetailValue<string>>;
@@ -1,2 +1,5 @@
1
- export {};
2
- //# sourceMappingURL=tuix-input.interface.js.map
1
+ export const InputState = {
2
+ INACTIVE: 'inactive',
3
+ ACTIVE: 'active',
4
+ DISABLED: 'disabled',
5
+ };
@@ -1,11 +1,15 @@
1
- import { LitElement } from 'lit';
1
+ import { LitElement, type TemplateResult } from 'lit';
2
2
  import { MainVariant } from '../utils/mainVariant.enum';
3
3
  import { LinkTarget } from './enums/linkTarget.enum';
4
4
  export declare class TuixLink extends LitElement {
5
- static styles: import("lit").CSSResult;
6
- href: string;
5
+ static styles: import("lit").CSSResult[];
6
+ href?: string;
7
7
  target: LinkTarget;
8
8
  variant: MainVariant;
9
9
  disabled: boolean;
10
- render(): import("lit-html").TemplateResult<1>;
10
+ dark: boolean;
11
+ private _getClassMap;
12
+ private _anchorTemplate;
13
+ private _divTemplate;
14
+ render(): TemplateResult;
11
15
  }
@@ -1,58 +1,55 @@
1
1
  import { __decorate } from "tslib";
2
- import { html, css, LitElement, unsafeCSS } from 'lit';
2
+ import { html, LitElement } from 'lit';
3
3
  import { customElement, property } from 'lit/decorators.js';
4
- import { palette } from '../utils/colors';
5
- import { ScreenSizes } from '../utils/screenSizes.enum';
6
4
  import { MainVariant } from '../utils/mainVariant.enum';
7
5
  import { LinkTarget } from './enums/linkTarget.enum';
6
+ import { classMap } from 'lit/directives/class-map.js';
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);
11
- this.href = '';
12
- this.target = LinkTarget.Blank;
12
+ this.target = LinkTarget.BLANK;
13
13
  this.variant = MainVariant.PRIMARY;
14
14
  this.disabled = false;
15
+ this.dark = false;
15
16
  }
16
- render() {
17
+ static { this.styles = [linkStyles, linkFontStyles]; }
18
+ _getClassMap() {
19
+ return {
20
+ link: true,
21
+ disabled: this.disabled,
22
+ [MainVariant.SECONDARY]: this.variant === MainVariant.SECONDARY,
23
+ };
24
+ }
25
+ _anchorTemplate() {
17
26
  return html `
18
27
  <a
19
- target="${this.disabled ? LinkTarget.Self : this.target}"
20
- class="link ${this.variant} ${this.disabled ? 'disabled' : ''}"
28
+ target="${this.disabled ? LinkTarget.SELF : this.target}"
29
+ class="${classMap(this._getClassMap())}"
21
30
  href="${this.disabled ? 'javascript:void(0)' : this.href}"
22
31
  >
23
32
  <slot></slot>
24
33
  </a>
25
34
  `;
26
35
  }
27
- };
28
- TuixLink.styles = css `
29
- a.link {
30
- font-family: 'rubik', sans-serif;
31
- font-size: 1rem;
32
- font-weight: 400;
33
- line-height: 1.25rem;
34
- text-decoration: none;
35
- color: ${unsafeCSS(palette.main)};
36
- }
37
- a.link:hover {
38
- text-decoration: underline;
39
- }
40
- a.link.secondary {
41
- color: ${unsafeCSS(palette.white)};
42
- }
43
- @media only screen and (max-width: ${ScreenSizes.TABLET}px) {
44
- a.link {
45
- font-size: 0.875rem;
46
- font-weight: 400;
47
- line-height: 1rem;
48
- }
36
+ _divTemplate() {
37
+ return html `
38
+ <div class="${classMap(this._getClassMap())}">
39
+ <slot></slot>
40
+ </div>
41
+ `;
49
42
  }
50
- a.link.disabled {
51
- text-decoration: underline;
52
- color: ${unsafeCSS(palette.primary_300)};
53
- cursor: not-allowed;
43
+ render() {
44
+ const isValidAnchor = this.href && !this.disabled;
45
+ if (isValidAnchor) {
46
+ return this._anchorTemplate();
47
+ }
48
+ else {
49
+ return this._divTemplate();
50
+ }
54
51
  }
55
- `;
52
+ };
56
53
  __decorate([
57
54
  property({ type: String })
58
55
  ], TuixLink.prototype, "href", void 0);
@@ -60,13 +57,15 @@ __decorate([
60
57
  property({ type: LinkTarget })
61
58
  ], TuixLink.prototype, "target", void 0);
62
59
  __decorate([
63
- property({ type: MainVariant })
60
+ property({ type: MainVariant, reflect: true })
64
61
  ], TuixLink.prototype, "variant", void 0);
65
62
  __decorate([
66
- property({ type: Boolean })
63
+ property({ type: Boolean, reflect: true })
67
64
  ], TuixLink.prototype, "disabled", void 0);
65
+ __decorate([
66
+ property({ type: Boolean, reflect: true })
67
+ ], TuixLink.prototype, "dark", void 0);
68
68
  TuixLink = __decorate([
69
69
  customElement('tuix-link')
70
70
  ], TuixLink);
71
71
  export { TuixLink };
72
- //# sourceMappingURL=TuixLink.js.map
@@ -0,0 +1,2 @@
1
+ export declare const LINK_TEXT_COLOR_VAR_NAME = "--t-link-text-color";
2
+ export declare const linkStyles: import("lit").CSSResult;
@@ -0,0 +1,55 @@
1
+ import { css, unsafeCSS } from 'lit';
2
+ import { MainVariant } from '../utils/mainVariant.enum';
3
+ import { Palette } from '../utils/colors';
4
+ import { DarkPalette } from '../utils/darkColors';
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.PRIMARY_50};
25
+ ${LINK_TEXT_COLOR_VAR_NAME}: ${DarkPalette.PRIMARY_50}
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
+ `;
@@ -1,6 +1,6 @@
1
1
  export declare enum LinkTarget {
2
- Blank = "_blank",
3
- Self = "_self",
4
- Parent = "_parent",
5
- Top = "_top"
2
+ BLANK = "_blank",
3
+ SELF = "_self",
4
+ PARENT = "_parent",
5
+ TOP = "_top"
6
6
  }
@@ -1,8 +1,7 @@
1
1
  export var LinkTarget;
2
2
  (function (LinkTarget) {
3
- LinkTarget["Blank"] = "_blank";
4
- LinkTarget["Self"] = "_self";
5
- LinkTarget["Parent"] = "_parent";
6
- LinkTarget["Top"] = "_top";
3
+ LinkTarget["BLANK"] = "_blank";
4
+ LinkTarget["SELF"] = "_self";
5
+ LinkTarget["PARENT"] = "_parent";
6
+ LinkTarget["TOP"] = "_top";
7
7
  })(LinkTarget || (LinkTarget = {}));
8
- //# sourceMappingURL=linkTarget.enum.js.map
@@ -0,0 +1,11 @@
1
+ import { LitElement } from 'lit';
2
+ import '../tuix-icon/TuixIcon.js';
3
+ import '../tuix-paper/TuixPaper.js';
4
+ export declare class TuixModal extends LitElement {
5
+ static styles: import("lit").CSSResult[];
6
+ visible: boolean;
7
+ dark: boolean;
8
+ scrollable: boolean;
9
+ protected _onClose(): void;
10
+ render(): import("lit-html").TemplateResult<1>;
11
+ }