@everymatrix/general-input-hsl 0.0.1

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 (95) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/checkbox-group-input_13.cjs.entry.js +7303 -0
  3. package/dist/cjs/general-input-hsl-2832e412.js +5800 -0
  4. package/dist/cjs/general-input-hsl.cjs.js +25 -0
  5. package/dist/cjs/index-6f821b8d.js +1299 -0
  6. package/dist/cjs/index.cjs.js +10 -0
  7. package/dist/cjs/loader.cjs.js +15 -0
  8. package/dist/collection/collection-manifest.json +24 -0
  9. package/dist/collection/components/checkbox-group-input/checkbox-group-input.css +89 -0
  10. package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +390 -0
  11. package/dist/collection/components/checkbox-input/checkbox-input.css +78 -0
  12. package/dist/collection/components/checkbox-input/checkbox-input.js +344 -0
  13. package/dist/collection/components/date-input/date-input.css +101 -0
  14. package/dist/collection/components/date-input/date-input.js +466 -0
  15. package/dist/collection/components/email-input/email-input.css +95 -0
  16. package/dist/collection/components/email-input/email-input.js +429 -0
  17. package/dist/collection/components/general-input-hsl/general-input-hsl.css +4 -0
  18. package/dist/collection/components/general-input-hsl/general-input-hsl.js +438 -0
  19. package/dist/collection/components/general-input-hsl/index.js +1 -0
  20. package/dist/collection/components/number-input/number-input.css +102 -0
  21. package/dist/collection/components/number-input/number-input.js +393 -0
  22. package/dist/collection/components/password-input/password-input.css +193 -0
  23. package/dist/collection/components/password-input/password-input.js +573 -0
  24. package/dist/collection/components/radio-input/radio-input.css +43 -0
  25. package/dist/collection/components/radio-input/radio-input.js +319 -0
  26. package/dist/collection/components/select-input/select-input.css +121 -0
  27. package/dist/collection/components/select-input/select-input.js +488 -0
  28. package/dist/collection/components/tel-input/tel-input.css +145 -0
  29. package/dist/collection/components/tel-input/tel-input.js +468 -0
  30. package/dist/collection/components/text-input/text-input.css +97 -0
  31. package/dist/collection/components/text-input/text-input.js +489 -0
  32. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.css +82 -0
  33. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +366 -0
  34. package/dist/collection/components/twofa-input/twofa-input.css +56 -0
  35. package/dist/collection/components/twofa-input/twofa-input.js +495 -0
  36. package/dist/collection/index.js +1 -0
  37. package/dist/collection/utils/locale.utils.js +81 -0
  38. package/dist/collection/utils/tooltipIcon.svg +5 -0
  39. package/dist/collection/utils/types.js +1 -0
  40. package/dist/collection/utils/utils.js +3 -0
  41. package/dist/esm/app-globals-0f993ce5.js +3 -0
  42. package/dist/esm/checkbox-group-input_13.entry.js +7288 -0
  43. package/dist/esm/general-input-hsl-31f19ad0.js +5797 -0
  44. package/dist/esm/general-input-hsl.js +20 -0
  45. package/dist/esm/index-8598bfb7.js +1270 -0
  46. package/dist/esm/index.js +2 -0
  47. package/dist/esm/loader.js +11 -0
  48. package/dist/general-input-hsl/app-globals-0f993ce5.js +1 -0
  49. package/dist/general-input-hsl/checkbox-group-input_13.entry.js +1 -0
  50. package/dist/general-input-hsl/general-input-hsl-31f19ad0.js +5614 -0
  51. package/dist/general-input-hsl/general-input-hsl.esm.js +1 -0
  52. package/dist/general-input-hsl/index-8598bfb7.js +2 -0
  53. package/dist/general-input-hsl/index.esm.js +1 -0
  54. package/dist/index.cjs.js +1 -0
  55. package/dist/index.js +1 -0
  56. package/dist/stencil.config.dev.js +19 -0
  57. package/dist/stencil.config.js +19 -0
  58. package/dist/storybook/main.js +43 -0
  59. package/dist/storybook/preview.js +9 -0
  60. package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
  61. package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/packages/stencil/general-input-hsl/stencil.config.d.ts +2 -0
  62. package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/packages/stencil/general-input-hsl/stencil.config.dev.d.ts +2 -0
  63. package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/packages/stencil/general-input-hsl/storybook/main.d.ts +3 -0
  64. package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/packages/stencil/general-input-hsl/storybook/preview.d.ts +70 -0
  65. package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/tools/plugins/index.d.ts +3 -0
  66. package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
  67. package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
  68. package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
  69. package/dist/types/components/checkbox-group-input/checkbox-group-input.d.ts +74 -0
  70. package/dist/types/components/checkbox-input/checkbox-input.d.ts +67 -0
  71. package/dist/types/components/date-input/date-input.d.ts +89 -0
  72. package/dist/types/components/email-input/email-input.d.ts +81 -0
  73. package/dist/types/components/general-input-hsl/general-input-hsl.d.ts +84 -0
  74. package/dist/types/components/general-input-hsl/index.d.ts +1 -0
  75. package/dist/types/components/number-input/number-input.d.ts +75 -0
  76. package/dist/types/components/password-input/password-input.d.ts +97 -0
  77. package/dist/types/components/radio-input/radio-input.d.ts +60 -0
  78. package/dist/types/components/select-input/select-input.d.ts +85 -0
  79. package/dist/types/components/tel-input/tel-input.d.ts +89 -0
  80. package/dist/types/components/text-input/text-input.d.ts +86 -0
  81. package/dist/types/components/toggle-checkbox-input/toggle-checkbox-input.d.ts +73 -0
  82. package/dist/types/components/twofa-input/twofa-input.d.ts +84 -0
  83. package/dist/types/components.d.ts +1599 -0
  84. package/dist/types/index.d.ts +1 -0
  85. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  86. package/dist/types/utils/locale.utils.d.ts +13 -0
  87. package/dist/types/utils/types.d.ts +111 -0
  88. package/dist/types/utils/utils.d.ts +1 -0
  89. package/loader/cdn.js +1 -0
  90. package/loader/index.cjs.js +1 -0
  91. package/loader/index.d.ts +24 -0
  92. package/loader/index.es2017.js +1 -0
  93. package/loader/index.js +2 -0
  94. package/loader/package.json +11 -0
  95. package/package.json +27 -0
@@ -0,0 +1,488 @@
1
+ import { h } from "@stencil/core";
2
+ import { translate } from "../../utils/locale.utils";
3
+ import tooltipIcon from "../../utils/tooltipIcon.svg";
4
+ export class SelectInput {
5
+ constructor() {
6
+ this.touched = false;
7
+ this.handleComboChange = (event) => {
8
+ this.touched = true;
9
+ const selectedValue = event.target.value;
10
+ // Find the original option based on case-insensitive comparison
11
+ const originalOption = this.options.find(option => option.value.toLowerCase() === selectedValue.toLowerCase());
12
+ if (originalOption) {
13
+ this.value = originalOption.value;
14
+ }
15
+ else {
16
+ this.value = selectedValue;
17
+ }
18
+ this.isValid = this.setValidity();
19
+ this.errorMessage = this.setErrorMessage();
20
+ this.emitValueHandler(true);
21
+ };
22
+ this.handleBlur = (event) => {
23
+ const field = event.currentTarget;
24
+ if (field.opened)
25
+ return;
26
+ this.touched = true;
27
+ this.value = field.value;
28
+ this.isValid = this.setValidity();
29
+ this.errorMessage = this.setErrorMessage();
30
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
31
+ };
32
+ this.handleSelectChange = (event) => {
33
+ this.touched = true;
34
+ this.value = event.target.value;
35
+ this.isValid = this.setValidity();
36
+ this.errorMessage = this.setErrorMessage();
37
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
38
+ this.emitValueHandler(true);
39
+ };
40
+ this.setClientStyling = () => {
41
+ let sheet = document.createElement('style');
42
+ sheet.innerHTML = this.clientStyling;
43
+ this.stylingContainer.prepend(sheet);
44
+ };
45
+ this.name = undefined;
46
+ this.displayName = undefined;
47
+ this.placeholder = undefined;
48
+ this.action = undefined;
49
+ this.defaultValue = '';
50
+ this.autofilled = undefined;
51
+ this.tooltip = undefined;
52
+ this.options = [];
53
+ this.validation = undefined;
54
+ this.language = undefined;
55
+ this.emitValue = undefined;
56
+ this.clientStyling = '';
57
+ this.errorMessage = undefined;
58
+ this.isValid = undefined;
59
+ this.limitStylingAppends = false;
60
+ this.showTooltip = false;
61
+ }
62
+ handleStylingChange(newValue, oldValue) {
63
+ if (newValue !== oldValue)
64
+ this.setClientStyling();
65
+ }
66
+ validityChanged() {
67
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
68
+ if (this.emitValue == true) {
69
+ this.valueHandler({ name: this.name, value: this.value });
70
+ }
71
+ }
72
+ validityStateHandler(inputStateEvent) {
73
+ this.sendValidityState.emit(inputStateEvent);
74
+ }
75
+ emitValueHandler(newValue) {
76
+ if (newValue == true && this.isValid) {
77
+ this.valueHandler({ name: this.name, value: this.value });
78
+ }
79
+ }
80
+ valueHandler(inputValueEvent) {
81
+ this.sendInputValue.emit(inputValueEvent);
82
+ }
83
+ handleClickOutside(event) {
84
+ if (event.composedPath()[0] === this.tooltipIconReference)
85
+ return;
86
+ if (event.composedPath()[0] !== this.tooltipReference)
87
+ this.showTooltip = false;
88
+ }
89
+ connectedCallback() {
90
+ this.displayedOptions = this.options.map(option => ({
91
+ label: option.label,
92
+ value: option.value
93
+ }));
94
+ }
95
+ componentWillLoad() {
96
+ if (this.action && !this.options.length) {
97
+ if (this.action.split(" ")[0] == 'GET') {
98
+ const endpoint = this.action.split(" ")[1];
99
+ return this.getOptions(endpoint).then((options) => {
100
+ const firstKey = Object.keys(options)[0];
101
+ this.displayedOptions = options[firstKey].map(option => {
102
+ return { label: option.Name, value: option.Alpha2Code };
103
+ });
104
+ });
105
+ }
106
+ }
107
+ }
108
+ componentDidRender() {
109
+ // start custom styling area
110
+ if (!this.limitStylingAppends && this.stylingContainer) {
111
+ if (this.clientStyling)
112
+ this.setClientStyling();
113
+ this.limitStylingAppends = true;
114
+ }
115
+ // end custom styling area
116
+ }
117
+ componentDidLoad() {
118
+ this.inputReference = this.vaadinCombo.querySelector('input');
119
+ if (this.defaultValue) {
120
+ const defaultOption = this.displayedOptions.find(option => option.value.toUpperCase() === this.defaultValue.toUpperCase());
121
+ this.value = defaultOption.value;
122
+ this.valueHandler({ name: this.name, value: this.value });
123
+ this.inputReference.value = this.value;
124
+ }
125
+ this.isValid = this.setValidity();
126
+ if (this.vaadinCombo) {
127
+ this.vaadinCombo.addEventListener('opened-changed', (event) => {
128
+ if (event.detail.value === true) {
129
+ this.errorMessage = '';
130
+ }
131
+ else {
132
+ const field = event.currentTarget;
133
+ this.touched = true;
134
+ this.value = field.value;
135
+ this.isValid = this.setValidity();
136
+ this.errorMessage = this.setErrorMessage();
137
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
138
+ }
139
+ });
140
+ }
141
+ }
142
+ getOptions(endpoint) {
143
+ const url = new URL(endpoint);
144
+ return new Promise((resolve, reject) => {
145
+ fetch(url.href)
146
+ .then((res) => res.json())
147
+ .then((options) => {
148
+ resolve(options);
149
+ }).catch((err) => {
150
+ console.error(err);
151
+ reject(err);
152
+ });
153
+ });
154
+ }
155
+ setValidity() {
156
+ var _a;
157
+ if ((_a = this.validation) === null || _a === void 0 ? void 0 : _a.mandatory) {
158
+ return !!this.value;
159
+ }
160
+ return true;
161
+ }
162
+ setErrorMessage() {
163
+ var _a, _b, _c;
164
+ if (((_b = (_a = this.inputReference) === null || _a === void 0 ? void 0 : _a.validity) === null || _b === void 0 ? void 0 : _b.valueMissing) || ((_c = this.vaadinCombo) === null || _c === void 0 ? void 0 : _c.invalid)) {
165
+ return translate('requiredError', this.language);
166
+ }
167
+ }
168
+ renderTooltip() {
169
+ if (this.showTooltip) {
170
+ return (h("div", { class: `select__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
171
+ }
172
+ return null;
173
+ }
174
+ render() {
175
+ var _a;
176
+ let invalidClass = '';
177
+ if (this.touched) {
178
+ invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
179
+ }
180
+ return h("div", { key: '1a257ae01b7bafc671e798cce771d80007291242', class: `select__wrapper ${this.autofilled ? 'select__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: 'a99ebb1279581c8ffa7c22af358935580a0d1e13', class: 'select__wrapper--flex' }, h("label", { key: '80333b126fc9fa984501eb8534fed41c18f5487c', class: 'select__label', htmlFor: `${this.name}__input` }, `${this.displayName} ${this.validation.mandatory ? '*' : ''}`), h("div", { key: 'bd5c7af4a0f108ff1c70954361aa2ea9741545f6', class: 'select__wrapper--relative' }, this.tooltip &&
181
+ h("img", { key: '4e905aa21811ab38f56d73114a2af959ab77e9f3', class: 'select__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("vaadin-combo-box", { key: '7f871733f8cebf5ab9bbe26043f83de768642bef', name: this.name, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", ref: (el) => this.vaadinCombo = el, readOnly: this.autofilled, required: (_a = this.validation) === null || _a === void 0 ? void 0 : _a.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleComboChange, onBlur: this.handleBlur }), h("small", { key: '068600695821cecaf180033c166c8f36fa844fa3', class: 'select__error-message' }, this.errorMessage));
182
+ }
183
+ static get is() { return "select-input"; }
184
+ static get encapsulation() { return "shadow"; }
185
+ static get originalStyleUrls() {
186
+ return {
187
+ "$": ["select-input.scss"]
188
+ };
189
+ }
190
+ static get styleUrls() {
191
+ return {
192
+ "$": ["select-input.css"]
193
+ };
194
+ }
195
+ static get properties() {
196
+ return {
197
+ "name": {
198
+ "type": "string",
199
+ "mutable": false,
200
+ "complexType": {
201
+ "original": "string",
202
+ "resolved": "string",
203
+ "references": {}
204
+ },
205
+ "required": false,
206
+ "optional": false,
207
+ "docs": {
208
+ "tags": [],
209
+ "text": "Name of the input."
210
+ },
211
+ "attribute": "name",
212
+ "reflect": true
213
+ },
214
+ "displayName": {
215
+ "type": "string",
216
+ "mutable": false,
217
+ "complexType": {
218
+ "original": "string",
219
+ "resolved": "string",
220
+ "references": {}
221
+ },
222
+ "required": false,
223
+ "optional": false,
224
+ "docs": {
225
+ "tags": [],
226
+ "text": "Name of input to be shown to the user."
227
+ },
228
+ "attribute": "display-name",
229
+ "reflect": true
230
+ },
231
+ "placeholder": {
232
+ "type": "string",
233
+ "mutable": false,
234
+ "complexType": {
235
+ "original": "string",
236
+ "resolved": "string",
237
+ "references": {}
238
+ },
239
+ "required": false,
240
+ "optional": false,
241
+ "docs": {
242
+ "tags": [],
243
+ "text": "Placeholder text to be shown."
244
+ },
245
+ "attribute": "placeholder",
246
+ "reflect": true
247
+ },
248
+ "action": {
249
+ "type": "string",
250
+ "mutable": false,
251
+ "complexType": {
252
+ "original": "string",
253
+ "resolved": "string",
254
+ "references": {}
255
+ },
256
+ "required": false,
257
+ "optional": false,
258
+ "docs": {
259
+ "tags": [],
260
+ "text": "Special behaviour an input should have. Can be fetching for data."
261
+ },
262
+ "attribute": "action",
263
+ "reflect": true
264
+ },
265
+ "defaultValue": {
266
+ "type": "string",
267
+ "mutable": false,
268
+ "complexType": {
269
+ "original": "string",
270
+ "resolved": "string",
271
+ "references": {}
272
+ },
273
+ "required": false,
274
+ "optional": false,
275
+ "docs": {
276
+ "tags": [],
277
+ "text": "Default value for the input."
278
+ },
279
+ "attribute": "default-value",
280
+ "reflect": true,
281
+ "defaultValue": "''"
282
+ },
283
+ "autofilled": {
284
+ "type": "boolean",
285
+ "mutable": false,
286
+ "complexType": {
287
+ "original": "boolean",
288
+ "resolved": "boolean",
289
+ "references": {}
290
+ },
291
+ "required": false,
292
+ "optional": false,
293
+ "docs": {
294
+ "tags": [],
295
+ "text": "Boolean. Determines if input should be readonly."
296
+ },
297
+ "attribute": "autofilled",
298
+ "reflect": true
299
+ },
300
+ "tooltip": {
301
+ "type": "string",
302
+ "mutable": false,
303
+ "complexType": {
304
+ "original": "string",
305
+ "resolved": "string",
306
+ "references": {}
307
+ },
308
+ "required": false,
309
+ "optional": false,
310
+ "docs": {
311
+ "tags": [],
312
+ "text": "Tooltip text."
313
+ },
314
+ "attribute": "tooltip",
315
+ "reflect": true
316
+ },
317
+ "options": {
318
+ "type": "unknown",
319
+ "mutable": false,
320
+ "complexType": {
321
+ "original": "Option[]",
322
+ "resolved": "Option[]",
323
+ "references": {
324
+ "Option": {
325
+ "location": "import",
326
+ "path": "../../utils/types",
327
+ "id": "../../../../packages/stencil/general-input-hsl/src/utils/types.ts::Option"
328
+ }
329
+ }
330
+ },
331
+ "required": false,
332
+ "optional": false,
333
+ "docs": {
334
+ "tags": [],
335
+ "text": "Options of the input."
336
+ },
337
+ "defaultValue": "[]"
338
+ },
339
+ "validation": {
340
+ "type": "unknown",
341
+ "mutable": false,
342
+ "complexType": {
343
+ "original": "ValidationSchema",
344
+ "resolved": "ValidationSchema",
345
+ "references": {
346
+ "ValidationSchema": {
347
+ "location": "import",
348
+ "path": "../../utils/types",
349
+ "id": "../../../../packages/stencil/general-input-hsl/src/utils/types.ts::ValidationSchema"
350
+ }
351
+ }
352
+ },
353
+ "required": false,
354
+ "optional": false,
355
+ "docs": {
356
+ "tags": [],
357
+ "text": "Object of validation rules for the input."
358
+ }
359
+ },
360
+ "language": {
361
+ "type": "string",
362
+ "mutable": false,
363
+ "complexType": {
364
+ "original": "string",
365
+ "resolved": "string",
366
+ "references": {}
367
+ },
368
+ "required": false,
369
+ "optional": false,
370
+ "docs": {
371
+ "tags": [],
372
+ "text": "Currently selected language."
373
+ },
374
+ "attribute": "language",
375
+ "reflect": true
376
+ },
377
+ "emitValue": {
378
+ "type": "boolean",
379
+ "mutable": false,
380
+ "complexType": {
381
+ "original": "boolean",
382
+ "resolved": "boolean",
383
+ "references": {}
384
+ },
385
+ "required": false,
386
+ "optional": false,
387
+ "docs": {
388
+ "tags": [],
389
+ "text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
390
+ },
391
+ "attribute": "emit-value",
392
+ "reflect": true
393
+ },
394
+ "clientStyling": {
395
+ "type": "string",
396
+ "mutable": false,
397
+ "complexType": {
398
+ "original": "string",
399
+ "resolved": "string",
400
+ "references": {}
401
+ },
402
+ "required": false,
403
+ "optional": false,
404
+ "docs": {
405
+ "tags": [],
406
+ "text": "Client custom styling via inline style"
407
+ },
408
+ "attribute": "client-styling",
409
+ "reflect": true,
410
+ "defaultValue": "''"
411
+ }
412
+ };
413
+ }
414
+ static get states() {
415
+ return {
416
+ "errorMessage": {},
417
+ "isValid": {},
418
+ "limitStylingAppends": {},
419
+ "showTooltip": {}
420
+ };
421
+ }
422
+ static get events() {
423
+ return [{
424
+ "method": "sendValidityState",
425
+ "name": "sendValidityState",
426
+ "bubbles": true,
427
+ "cancelable": true,
428
+ "composed": true,
429
+ "docs": {
430
+ "tags": [],
431
+ "text": ""
432
+ },
433
+ "complexType": {
434
+ "original": "InputStateEvent",
435
+ "resolved": "InputStateEvent",
436
+ "references": {
437
+ "InputStateEvent": {
438
+ "location": "import",
439
+ "path": "../../utils/types",
440
+ "id": "../../../../packages/stencil/general-input-hsl/src/utils/types.ts::InputStateEvent"
441
+ }
442
+ }
443
+ }
444
+ }, {
445
+ "method": "sendInputValue",
446
+ "name": "sendInputValue",
447
+ "bubbles": true,
448
+ "cancelable": true,
449
+ "composed": true,
450
+ "docs": {
451
+ "tags": [],
452
+ "text": ""
453
+ },
454
+ "complexType": {
455
+ "original": "InputValueEvent",
456
+ "resolved": "InputValueEvent",
457
+ "references": {
458
+ "InputValueEvent": {
459
+ "location": "import",
460
+ "path": "../../utils/types",
461
+ "id": "../../../../packages/stencil/general-input-hsl/src/utils/types.ts::InputValueEvent"
462
+ }
463
+ }
464
+ }
465
+ }];
466
+ }
467
+ static get watchers() {
468
+ return [{
469
+ "propName": "clientStyling",
470
+ "methodName": "handleStylingChange"
471
+ }, {
472
+ "propName": "isValid",
473
+ "methodName": "validityChanged"
474
+ }, {
475
+ "propName": "emitValue",
476
+ "methodName": "emitValueHandler"
477
+ }];
478
+ }
479
+ static get listeners() {
480
+ return [{
481
+ "name": "click",
482
+ "method": "handleClickOutside",
483
+ "target": "document",
484
+ "capture": false,
485
+ "passive": false
486
+ }];
487
+ }
488
+ }
@@ -0,0 +1,145 @@
1
+ *,
2
+ *::before,
3
+ *::after {
4
+ padding: 0;
5
+ margin: 0;
6
+ box-sizing: border-box;
7
+ }
8
+
9
+ .tel {
10
+ font-family: "Roboto";
11
+ font-style: normal;
12
+ }
13
+ .tel__wrapper {
14
+ position: relative;
15
+ width: 100%;
16
+ display: flex;
17
+ flex-direction: column;
18
+ gap: 5px;
19
+ }
20
+ .tel__wrapper--autofilled {
21
+ pointer-events: none;
22
+ }
23
+ .tel__wrapper--autofilled .tel__label {
24
+ color: var(--emw--registration-typography, var(--emw--color-black, #000000));
25
+ }
26
+ .tel__wrapper--autofilled .tel__input::part(input-field) {
27
+ color: var(--emw--color-black, #000000);
28
+ }
29
+ .tel__wrapper--flex {
30
+ width: inherit;
31
+ display: flex;
32
+ align-items: center;
33
+ border-radius: 4px;
34
+ border: 1px solid var(--emw--color-gray-100, #E6E6E6);
35
+ background-color: var(--emw--color-white, #FFFFFF);
36
+ overflow: hidden;
37
+ }
38
+ .tel__wrapper--flex:focus-within {
39
+ border-color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));
40
+ }
41
+ .tel__wrapper--flex-label {
42
+ display: flex;
43
+ gap: 5px;
44
+ }
45
+ .tel__wrapper--flex--relative {
46
+ position: relative;
47
+ }
48
+ .tel__wrapper .text__input--invalid {
49
+ border: 1px solid var(--emw--color-error, var(--emw--color-red, #ed0909));
50
+ }
51
+ .tel__label {
52
+ font-family: inherit;
53
+ font-style: normal;
54
+ font-weight: 500;
55
+ font-size: 16px;
56
+ line-height: 20px;
57
+ color: var(--emw--registration-typography, var(--emw--color-black, #000000));
58
+ }
59
+ .tel__label--required::after {
60
+ content: "*";
61
+ font-family: inherit;
62
+ color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));
63
+ margin-left: 2px;
64
+ }
65
+ .tel__prefix {
66
+ --vaadin-field-default-width: 90px;
67
+ }
68
+ .tel__prefix[focus] {
69
+ outline: none;
70
+ }
71
+ .tel__prefix::part(input-field) {
72
+ border-radius: 0 5px 5px 0;
73
+ background-color: var(--emw--color-white, #FFFFFF);
74
+ color: var(--emw--color-black, #000000);
75
+ font-family: inherit;
76
+ font-style: normal;
77
+ font-weight: 300;
78
+ font-size: 16px;
79
+ line-height: 1.5;
80
+ border: none;
81
+ border-right: 2px solid #DDE0EE;
82
+ border-image-source: linear-gradient(to bottom, rgba(221, 224, 238, 0) 25%, rgb(221, 224, 238) 25%, rgb(221, 224, 238) 75%, rgba(221, 224, 238, 0) 75%);
83
+ border-image-slice: 1;
84
+ border-image-repeat: round;
85
+ }
86
+ .tel__prefix::part(input-field):hover {
87
+ background-color: var(--emw--color-white, #FFFFFF);
88
+ }
89
+ .tel__prefix::part(toggle-button) {
90
+ color: var(--emw--registration-typography, var(--emw--color-black, #000000));
91
+ }
92
+ .tel__input {
93
+ font-family: inherit;
94
+ border-radius: 5px;
95
+ width: 100%;
96
+ color: var(--emw--registration-typography, var(--emw--color-black, #000000));
97
+ background-color: var(--emw--color-white, #FFFFFF);
98
+ border: none;
99
+ width: inherit;
100
+ position: relative;
101
+ font-size: 16px;
102
+ font-weight: 300;
103
+ line-height: 1.5;
104
+ padding: 5px 15px;
105
+ height: 42px;
106
+ /* Firefox */
107
+ -moz-appearance: textfield;
108
+ /* Chrome, Safari, Edge, Opera */
109
+ }
110
+ .tel__input:focus {
111
+ outline: none;
112
+ }
113
+ .tel__input::-webkit-outer-spin-button, .tel__input::-webkit-inner-spin-button {
114
+ -webkit-appearance: none;
115
+ margin: 0;
116
+ }
117
+ .tel__input::placeholder {
118
+ color: var(--emw--color-gray-150, #979797);
119
+ }
120
+ .tel__error-message {
121
+ position: absolute;
122
+ top: calc(100% + 5px);
123
+ left: 0;
124
+ color: var(--emw--color-error, var(--emw--color-red, #ed0909));
125
+ }
126
+ .tel__tooltip-icon {
127
+ width: 16px;
128
+ height: auto;
129
+ }
130
+ .tel__tooltip {
131
+ position: absolute;
132
+ top: 0;
133
+ left: 20px;
134
+ background-color: var(--emw--color-white, #FFFFFF);
135
+ border: 1px solid var(--emw--color-gray-100, #E6E6E6);
136
+ color: var(--emw--registration-typography, var(--emw--color-black, #000000));
137
+ padding: 10px;
138
+ border-radius: 5px;
139
+ opacity: 0;
140
+ transition: opacity 0.3s ease-in-out;
141
+ z-index: 10;
142
+ }
143
+ .tel__tooltip.visible {
144
+ opacity: 1;
145
+ }