tuix-webcomponents 0.66.0 → 0.67.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.
Files changed (108) hide show
  1. package/README.md +2 -2
  2. package/package.json +4 -4
  3. package/dist/src/index.d.ts +0 -36
  4. package/dist/src/index.js +0 -42
  5. package/dist/src/tuix-button/TuixBaseButton.d.ts +0 -17
  6. package/dist/src/tuix-button/TuixBaseButton.js +0 -60
  7. package/dist/src/tuix-button/TuixButton.d.ts +0 -11
  8. package/dist/src/tuix-button/TuixButton.js +0 -84
  9. package/dist/src/tuix-button/TuixButton.styles.d.ts +0 -3
  10. package/dist/src/tuix-button/TuixButton.styles.js +0 -107
  11. package/dist/src/tuix-button/enums/tuix-button.enums.d.ts +0 -2
  12. package/dist/src/tuix-button/enums/tuix-button.enums.js +0 -6
  13. package/dist/src/tuix-button/interfaces/tuix-button.interface.d.ts +0 -1
  14. package/dist/src/tuix-button/interfaces/tuix-button.interface.js +0 -1
  15. package/dist/src/tuix-checkbox/TuixCheckbox.d.ts +0 -15
  16. package/dist/src/tuix-checkbox/TuixCheckbox.js +0 -106
  17. package/dist/src/tuix-checkbox/TuixCheckbox.styles.d.ts +0 -4
  18. package/dist/src/tuix-checkbox/TuixCheckbox.styles.js +0 -132
  19. package/dist/src/tuix-checkbox/enums/tuix-checkbox.enums.d.ts +0 -21
  20. package/dist/src/tuix-checkbox/enums/tuix-checkbox.enums.js +0 -23
  21. package/dist/src/tuix-checkbox/interfaces/tuix-checkbox.interface.d.ts +0 -5
  22. package/dist/src/tuix-checkbox/interfaces/tuix-checkbox.interface.js +0 -1
  23. package/dist/src/tuix-dropdown/TuixDropdown.d.ts +0 -55
  24. package/dist/src/tuix-dropdown/TuixDropdown.js +0 -360
  25. package/dist/src/tuix-dropdown/TuixDropdown.styles.d.ts +0 -3
  26. package/dist/src/tuix-dropdown/TuixDropdown.styles.js +0 -125
  27. package/dist/src/tuix-dropdown/enums/tuix-dropdown.enums.d.ts +0 -4
  28. package/dist/src/tuix-dropdown/enums/tuix-dropdown.enums.js +0 -5
  29. package/dist/src/tuix-dropdown/interfaces/tuix-dropdown.interface.d.ts +0 -15
  30. package/dist/src/tuix-dropdown/interfaces/tuix-dropdown.interface.js +0 -1
  31. package/dist/src/tuix-icon/TuixIcon.d.ts +0 -15
  32. package/dist/src/tuix-icon/TuixIcon.icons.d.ts +0 -6
  33. package/dist/src/tuix-icon/TuixIcon.icons.js +0 -290
  34. package/dist/src/tuix-icon/TuixIcon.js +0 -79
  35. package/dist/src/tuix-icon/enums/tuix-icon.enums.d.ts +0 -62
  36. package/dist/src/tuix-icon/enums/tuix-icon.enums.js +0 -69
  37. package/dist/src/tuix-icon-button/TuixIconButton.d.ts +0 -9
  38. package/dist/src/tuix-icon-button/TuixIconButton.js +0 -51
  39. package/dist/src/tuix-input/TuixInput.d.ts +0 -52
  40. package/dist/src/tuix-input/TuixInput.js +0 -370
  41. package/dist/src/tuix-input/TuixInput.styles.d.ts +0 -8
  42. package/dist/src/tuix-input/TuixInput.styles.js +0 -295
  43. package/dist/src/tuix-input/enums/tuix-input.enums.d.ts +0 -38
  44. package/dist/src/tuix-input/enums/tuix-input.enums.js +0 -41
  45. package/dist/src/tuix-input/interfaces/tuix-input.interface.d.ts +0 -18
  46. package/dist/src/tuix-input/interfaces/tuix-input.interface.js +0 -5
  47. package/dist/src/tuix-link/TuixLink.d.ts +0 -15
  48. package/dist/src/tuix-link/TuixLink.js +0 -71
  49. package/dist/src/tuix-link/TuixLink.styles.d.ts +0 -2
  50. package/dist/src/tuix-link/TuixLink.styles.js +0 -55
  51. package/dist/src/tuix-link/enums/linkTarget.enum.d.ts +0 -6
  52. package/dist/src/tuix-link/enums/linkTarget.enum.js +0 -7
  53. package/dist/src/tuix-modal/TuixModal.d.ts +0 -9
  54. package/dist/src/tuix-modal/TuixModal.js +0 -63
  55. package/dist/src/tuix-modal/TuixModal.styles.d.ts +0 -2
  56. package/dist/src/tuix-modal/TuixModal.styles.js +0 -55
  57. package/dist/src/tuix-paper/TuixPaper.d.ts +0 -10
  58. package/dist/src/tuix-paper/TuixPaper.js +0 -46
  59. package/dist/src/tuix-paper/TuixPaper.styles.d.ts +0 -1
  60. package/dist/src/tuix-paper/TuixPaper.styles.js +0 -30
  61. package/dist/src/tuix-paper/enums/tuix-paper.enum.d.ts +0 -13
  62. package/dist/src/tuix-paper/enums/tuix-paper.enum.js +0 -15
  63. package/dist/src/tuix-radio-button/TuixRadioButton.d.ts +0 -16
  64. package/dist/src/tuix-radio-button/TuixRadioButton.js +0 -95
  65. package/dist/src/tuix-radio-button/TuixRadioButton.styles.d.ts +0 -5
  66. package/dist/src/tuix-radio-button/TuixRadioButton.styles.js +0 -135
  67. package/dist/src/tuix-radio-button/interfaces/tuix-radio-button.interface.d.ts +0 -3
  68. package/dist/src/tuix-radio-button/interfaces/tuix-radio-button.interface.js +0 -1
  69. package/dist/src/tuix-table/TuixTable.d.ts +0 -46
  70. package/dist/src/tuix-table/TuixTable.js +0 -367
  71. package/dist/src/tuix-table/TuixTable.styles.d.ts +0 -2
  72. package/dist/src/tuix-table/TuixTable.styles.js +0 -197
  73. package/dist/src/tuix-table/interfaces/tuix-table.interface.d.ts +0 -45
  74. package/dist/src/tuix-table/interfaces/tuix-table.interface.js +0 -1
  75. package/dist/src/tuix-text/TuixText.d.ts +0 -12
  76. package/dist/src/tuix-text/TuixText.js +0 -66
  77. package/dist/src/tuix-text/TuixText.styles.d.ts +0 -2
  78. package/dist/src/tuix-text/TuixText.styles.js +0 -158
  79. package/dist/src/tuix-text/enums/tuix-text.enums.d.ts +0 -31
  80. package/dist/src/tuix-text/enums/tuix-text.enums.js +0 -63
  81. package/dist/src/tuix-toast/TuixToast.d.ts +0 -15
  82. package/dist/src/tuix-toast/TuixToast.js +0 -100
  83. package/dist/src/tuix-toast/TuixToast.styles.d.ts +0 -3
  84. package/dist/src/tuix-toast/TuixToast.styles.js +0 -43
  85. package/dist/src/tuix-toast/enums/tuix-toast.enums.d.ts +0 -20
  86. package/dist/src/tuix-toast/enums/tuix-toast.enums.js +0 -59
  87. package/dist/src/tuix-toggle-button/TuixToggleButton.d.ts +0 -13
  88. package/dist/src/tuix-toggle-button/TuixToggleButton.js +0 -85
  89. package/dist/src/tuix-toggle-button/TuixToggleButton.styles.d.ts +0 -5
  90. package/dist/src/tuix-toggle-button/TuixToggleButton.styles.js +0 -134
  91. package/dist/src/tuix-toggle-button/interfaces/tuix-toggle.interface.d.ts +0 -2
  92. package/dist/src/tuix-toggle-button/interfaces/tuix-toggle.interface.js +0 -1
  93. package/dist/src/utils/colors.d.ts +0 -29
  94. package/dist/src/utils/colors.js +0 -30
  95. package/dist/src/utils/darkColors.d.ts +0 -31
  96. package/dist/src/utils/darkColors.js +0 -32
  97. package/dist/src/utils/hex-rgb.d.ts +0 -5
  98. package/dist/src/utils/hex-rgb.js +0 -15
  99. package/dist/src/utils/interfaces/detail-value.interface.d.ts +0 -3
  100. package/dist/src/utils/interfaces/detail-value.interface.js +0 -1
  101. package/dist/src/utils/mainVariant.enum.d.ts +0 -4
  102. package/dist/src/utils/mainVariant.enum.js +0 -5
  103. package/dist/src/utils/screenSizes.enum.d.ts +0 -4
  104. package/dist/src/utils/screenSizes.enum.js +0 -5
  105. package/dist/src/utils/slottedClassName.d.ts +0 -2
  106. package/dist/src/utils/slottedClassName.js +0 -1
  107. package/dist/tsconfig.publish.tsbuildinfo +0 -1
  108. package/package-build/src/index.js +0 -42
@@ -1,295 +0,0 @@
1
- import { css, unsafeCSS } from 'lit';
2
- import { ScreenSizes } from '../utils/screenSizes.enum';
3
- import { Palette } from '../utils/colors';
4
- import { DarkPalette } from '../utils/darkColors';
5
- import { hexToRgb } from '../utils/hex-rgb';
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
- `;
@@ -1,38 +0,0 @@
1
- import { IconName } from '../../tuix-icon/enums/tuix-icon.enums';
2
- import { Palette } from '../../utils/colors';
3
- import { DarkPalette } from '../../utils/darkColors';
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,41 +0,0 @@
1
- import { IconName } from '../../tuix-icon/enums/tuix-icon.enums';
2
- import { Palette } from '../../utils/colors';
3
- import { DarkPalette } from '../../utils/darkColors';
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
- };
@@ -1,18 +0,0 @@
1
- import { IconName } from '../../tuix-icon/enums/tuix-icon.enums';
2
- import { type DetailValue } from '../../utils/interfaces/detail-value.interface';
3
- import { InputIconLocation } from '../enums/tuix-input.enums';
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];
12
- export interface FormatIconSetParams {
13
- iconName: IconName;
14
- colorByState: Record<InputState, DarkPalette | Palette>;
15
- location?: InputIconLocation;
16
- clickHandler?: (e: MouseEvent) => void;
17
- }
18
- export type CustomEventTuixInput = CustomEvent<DetailValue<string>>;
@@ -1,5 +0,0 @@
1
- export const InputState = {
2
- INACTIVE: 'inactive',
3
- ACTIVE: 'active',
4
- DISABLED: 'disabled',
5
- };
@@ -1,15 +0,0 @@
1
- import { LitElement, type TemplateResult } from 'lit';
2
- import { MainVariant } from '../utils/mainVariant.enum';
3
- import { LinkTarget } from './enums/linkTarget.enum';
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,71 +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';
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';
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
- 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() {
26
- return html `
27
- <a
28
- target="${this.disabled ? LinkTarget.SELF : this.target}"
29
- class="${classMap(this._getClassMap())}"
30
- href="${this.disabled ? 'javascript:void(0)' : this.href}"
31
- >
32
- <slot></slot>
33
- </a>
34
- `;
35
- }
36
- _divTemplate() {
37
- return html `
38
- <div class="${classMap(this._getClassMap())}">
39
- <slot></slot>
40
- </div>
41
- `;
42
- }
43
- render() {
44
- const isValidAnchor = this.href && !this.disabled;
45
- if (isValidAnchor) {
46
- return this._anchorTemplate();
47
- }
48
- else {
49
- return this._divTemplate();
50
- }
51
- }
52
- };
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 };
@@ -1,2 +0,0 @@
1
- export declare const LINK_TEXT_COLOR_VAR_NAME = "--t-link-text-color";
2
- export declare const linkStyles: import("lit").CSSResult;
@@ -1,55 +0,0 @@
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.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
- `;
@@ -1,6 +0,0 @@
1
- export declare enum LinkTarget {
2
- BLANK = "_blank",
3
- SELF = "_self",
4
- PARENT = "_parent",
5
- TOP = "_top"
6
- }
@@ -1,7 +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 = {}));
@@ -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
- }
@@ -1,63 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { html, LitElement } from 'lit';
3
- import { customElement, property } from 'lit/decorators.js';
4
- import { BorderRadiusPaper, PaperElevation, } from '../tuix-paper/enums/tuix-paper.enum.js';
5
- import { commonModalStyles, mobileModalStyles } from './TuixModal.styles.js';
6
- import { TextVariant } from '../tuix-text/enums/tuix-text.enums.js';
7
- import { IconName, IconSizeVariant, } from '../tuix-icon/enums/tuix-icon.enums.js';
8
- let TuixModal = class TuixModal extends LitElement {
9
- constructor() {
10
- super(...arguments);
11
- this.visible = false;
12
- this.dark = false;
13
- this.scrollable = false;
14
- }
15
- static { this.styles = [commonModalStyles, mobileModalStyles]; }
16
- _onClose() {
17
- this.visible = false;
18
- this.dispatchEvent(new CustomEvent('on-close', { bubbles: true }));
19
- }
20
- render() {
21
- return html `
22
- <tuix-paper
23
- class="modal-container"
24
- elevation=${PaperElevation.VARIANT_4}
25
- border-radius=${BorderRadiusPaper.SOFT}
26
- ?dark=${this.dark}
27
- >
28
- <div class="content">
29
- <header>
30
- <slot name="title"></slot>
31
- <tuix-icon
32
- @click=${this._onClose}
33
- class="close-icon"
34
- size="${IconSizeVariant.MEDIUM}"
35
- name="${IconName.X}"
36
- color="${TextVariant.MAIN}"
37
- ?dark=${this.dark}
38
- ></tuix-icon>
39
- </header>
40
- <div class="body" ?scrollable=${this.scrollable}>
41
- <slot name="body"></slot>
42
- </div>
43
- <div class="action-buttons">
44
- <slot name="actions"></slot>
45
- </div>
46
- </div>
47
- </tuix-paper>
48
- `;
49
- }
50
- };
51
- __decorate([
52
- property({ type: Boolean, reflect: true })
53
- ], TuixModal.prototype, "visible", void 0);
54
- __decorate([
55
- property({ type: Boolean, reflect: true })
56
- ], TuixModal.prototype, "dark", void 0);
57
- __decorate([
58
- property({ type: Boolean, reflect: true })
59
- ], TuixModal.prototype, "scrollable", void 0);
60
- TuixModal = __decorate([
61
- customElement('tuix-modal')
62
- ], TuixModal);
63
- export { TuixModal };
@@ -1,2 +0,0 @@
1
- export declare const commonModalStyles: import("lit").CSSResult;
2
- export declare const mobileModalStyles: import("lit").CSSResult;