@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,573 @@
1
+ import { h } from "@stencil/core";
2
+ import { translate } from "../../utils/locale.utils";
3
+ import tooltipIcon from "../../utils/tooltipIcon.svg";
4
+ export class PasswordInput {
5
+ constructor() {
6
+ this.touched = false;
7
+ this.originalValid = false;
8
+ this.validationPattern = '';
9
+ this.duplicateInputValue = null;
10
+ this.handleInput = (event) => {
11
+ this.value = event.target.value;
12
+ this.calculateComplexity(this.value);
13
+ this.showPopup = true;
14
+ this.touched = true;
15
+ if (this.debounceTime) {
16
+ clearTimeout(this.debounceTime);
17
+ }
18
+ this.debounceTime = setTimeout(() => {
19
+ this.isValid = this.setValidity();
20
+ this.errorMessage = this.setErrorMessage();
21
+ this.emitValueHandler(true);
22
+ }, 500);
23
+ };
24
+ this.handleRevealField = (event) => {
25
+ event.stopPropagation();
26
+ window.postMessage({ type: `registrationShow${this.name}` }, window.location.href);
27
+ };
28
+ this.handleBlur = (event) => {
29
+ this.value = event.target.value;
30
+ this.showPopup = false;
31
+ this.touched = true;
32
+ this.isValid = this.setValidity();
33
+ this.errorMessage = this.setErrorMessage();
34
+ };
35
+ this.handleFocus = () => {
36
+ this.showPopup = true;
37
+ this.calculateComplexity(this.value);
38
+ };
39
+ this.setClientStyling = () => {
40
+ let sheet = document.createElement('style');
41
+ sheet.innerHTML = this.clientStyling;
42
+ this.stylingContainer.prepend(sheet);
43
+ };
44
+ this.name = undefined;
45
+ this.displayName = undefined;
46
+ this.placeholder = undefined;
47
+ this.defaultValue = '';
48
+ this.autofilled = undefined;
49
+ this.tooltip = undefined;
50
+ this.validation = undefined;
51
+ this.language = undefined;
52
+ this.emitValue = undefined;
53
+ this.isDuplicateInput = undefined;
54
+ this.hidePasswordComplexity = false;
55
+ this.clientStyling = '';
56
+ this.isValid = undefined;
57
+ this.errorMessage = undefined;
58
+ this.limitStylingAppends = false;
59
+ this.showTooltip = false;
60
+ this.passwordComplexity = undefined;
61
+ this.showPopup = undefined;
62
+ this.value = '';
63
+ }
64
+ handleStylingChange(newValue, oldValue) {
65
+ if (newValue !== oldValue)
66
+ this.setClientStyling();
67
+ }
68
+ validityChanged() {
69
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
70
+ if (this.emitValue == true) {
71
+ this.valueHandler({ name: this.name, value: this.value });
72
+ }
73
+ }
74
+ valueChanged() {
75
+ if (!this.isDuplicateInput) {
76
+ // recalculate complexity immediately in order to send the correct validity to the duplicate
77
+ this.calculateComplexity(this.value);
78
+ this.sendOriginalValidityState.emit({ name: this.name, valid: this.setValidity() });
79
+ }
80
+ }
81
+ emitValueHandler(newValue) {
82
+ if (newValue == true && this.isValid) {
83
+ this.valueHandler({ name: this.name, value: this.value, type: 'duplicate' });
84
+ }
85
+ }
86
+ validityStateHandler(inputStateEvent) {
87
+ this.sendValidityState.emit(inputStateEvent);
88
+ }
89
+ valueHandler(inputValueEvent) {
90
+ this.sendInputValue.emit(inputValueEvent);
91
+ }
92
+ originalValidityChangedHandler(event) {
93
+ if (this.isDuplicateInput) {
94
+ if (event.detail.valid) {
95
+ this.originalValid = true;
96
+ this.isValid = this.setValidity();
97
+ }
98
+ else {
99
+ this.originalValid = false;
100
+ this.isValid = false;
101
+ // only show error if the user has touched the input, in order to not show errors on empty inputs
102
+ this.value !== '' && (this.errorMessage = this.setErrorMessage());
103
+ }
104
+ }
105
+ }
106
+ valueChangedHandler(event) {
107
+ if (this.isDuplicateInput && this.name === event.detail.name + 'Duplicate') {
108
+ this.duplicateInputValue = event.detail.value;
109
+ if (this.touched) {
110
+ this.isValid = this.setValidity();
111
+ this.errorMessage = this.setErrorMessage();
112
+ }
113
+ }
114
+ if (this.name === event.detail.name + 'Duplicate'
115
+ && this.name.replace('Duplicate', '') === event.detail.name
116
+ && this.touched === true) {
117
+ this.isValid = this.setValidity();
118
+ this.errorMessage = this.setErrorMessage();
119
+ }
120
+ }
121
+ handleClickOutside(event) {
122
+ if (event.composedPath()[0] === this.tooltipIconReference)
123
+ return;
124
+ if (event.composedPath()[0] !== this.tooltipReference)
125
+ this.showTooltip = false;
126
+ }
127
+ componentDidRender() {
128
+ // start custom styling area
129
+ if (!this.limitStylingAppends && this.stylingContainer) {
130
+ if (this.clientStyling)
131
+ this.setClientStyling();
132
+ this.limitStylingAppends = true;
133
+ }
134
+ // end custom styling area
135
+ }
136
+ componentDidLoad() {
137
+ this.inputReference = this.element.shadowRoot.querySelector('input');
138
+ this.passwordButton = this.element.shadowRoot.querySelector('vaadin-password-field-button');
139
+ this.passwordButton.tabIndex = -1;
140
+ this.passwordButton.addEventListener('click', (e) => {
141
+ this.handleRevealField(e);
142
+ });
143
+ if (this.defaultValue) {
144
+ this.value = this.defaultValue;
145
+ this.calculateComplexity(this.value);
146
+ this.valueHandler({ name: this.name, value: this.value });
147
+ if (this.isDuplicateInput) {
148
+ this.duplicateInputValue = this.defaultValue;
149
+ this.touched = true;
150
+ }
151
+ }
152
+ this.isValid = this.setValidity();
153
+ }
154
+ disconnectedCallback() {
155
+ this.passwordButton.removeEventListener('click', this.handleRevealField);
156
+ }
157
+ calculateComplexity(password) {
158
+ this.passwordComplexity = this.validation.custom
159
+ .filter(rule => rule.rule === 'regex')
160
+ .map(rule => {
161
+ const ruleRegex = new RegExp(rule.pattern);
162
+ const passed = ruleRegex.test(password);
163
+ return { rule: rule.displayName, ruleKey: rule.errorKey, passed };
164
+ });
165
+ }
166
+ setValidity() {
167
+ var _a, _b;
168
+ if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
169
+ return false;
170
+ }
171
+ else if (!((_a = this.passwordComplexity) === null || _a === void 0 ? void 0 : _a.every(complexity => complexity.passed))) {
172
+ return false;
173
+ }
174
+ else {
175
+ return (_b = this.inputReference) === null || _b === void 0 ? void 0 : _b.validity.valid;
176
+ }
177
+ }
178
+ setPattern() {
179
+ var _a, _b;
180
+ if (((_a = this.validation.custom) === null || _a === void 0 ? void 0 : _a.length) > 0) {
181
+ return (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.pattern;
182
+ }
183
+ }
184
+ setErrorMessage() {
185
+ var _a, _b, _c, _d, _e;
186
+ if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
187
+ return translate('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
188
+ }
189
+ if (this.inputReference.validity.valueMissing) {
190
+ return translate('requiredError', this.language);
191
+ }
192
+ if (this.isDuplicateInput && !this.originalValid) {
193
+ return translate('invalidOriginalPasswordError', this.language);
194
+ }
195
+ if (this.inputReference.validity.patternMismatch) {
196
+ const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
197
+ const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
198
+ return translate(`${errorCode}`, this.language) ? translate(`${errorCode}`, this.language) : errorMessage;
199
+ }
200
+ if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
201
+ const errorCode = (_c = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _c === void 0 ? void 0 : _c.errorKey;
202
+ const errorMessage = (_d = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _d === void 0 ? void 0 : _d.errorMessage;
203
+ return translate(`${errorCode}`, this.language) ? translate(`${errorCode}`, this.language) : errorMessage;
204
+ }
205
+ if (!((_e = this.passwordComplexity) === null || _e === void 0 ? void 0 : _e.every(complexity => complexity.passed)) && !this.showPopup) {
206
+ return translate('invalidPassword', this.language);
207
+ }
208
+ }
209
+ renderTooltip() {
210
+ if (this.showTooltip) {
211
+ return (h("div", { class: `password__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
212
+ }
213
+ return null;
214
+ }
215
+ renderComplexityPopup() {
216
+ const totalRules = this.passwordComplexity.length;
217
+ const passedRules = this.passwordComplexity.filter(complexity => complexity.passed).length;
218
+ const meterValue = passedRules / totalRules;
219
+ const allRulesPassed = this.passwordComplexity.every(complexity => complexity.passed);
220
+ return (h("div", { class: `password__complexity ${!this.showPopup ? 'password__complexity--hidden' : ''}` }, h("div", { class: 'password__complexity--strength' }, h("p", { class: 'password__complexity--text' }, translate('passwordStrength', this.language), "\u00A0", h("span", { class: 'password__complexity--text-bold' }, translate(`${allRulesPassed ? 'passwordStrengthStrong' : 'passwordStrengthWeak'}`, this.language))), h("meter", { value: meterValue, min: "0", max: "1" })), h("div", null, this.passwordComplexity.map((complexity, index) => {
221
+ return (h("div", { key: index }, h("input", { class: 'password__complexity--checkbox', type: "checkbox", checked: complexity.passed, disabled: true }), h("span", null, translate(`${complexity.ruleKey}`, this.language) ? translate(`${complexity.ruleKey}`, this.language) : complexity.rule)));
222
+ }))));
223
+ }
224
+ render() {
225
+ let invalidClass = '';
226
+ if (this.touched) {
227
+ invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
228
+ }
229
+ return h("div", { key: 'c6a672c226569d500598f34c6155279e75fdc79c', class: `password__wrapper ${this.autofilled ? 'password__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: '44b8bee769b7b6ce86797f0f62b6af033bf2d0cd', class: 'password__wrapper--flex' }, h("label", { key: 'b6d573c6a70f26471cea2e576c8286719f58b47f', class: `password__label ${this.validation.mandatory ? 'password__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: '76698abedf907fa52940bc8e278fff4aeda1912f', class: 'password__wrapper--relative' }, this.tooltip &&
230
+ h("img", { key: '7116b9ed6eb06b6b03c336b6d216d40571b54f55', class: 'password__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("vaadin-password-field", { key: 'b85d0ba5396b3ab6fcf21d1053dba22fdb94c7f9', type: "password", id: `${this.name}__input`, class: `password__input ${invalidClass}`, name: this.name, readOnly: this.autofilled, value: this.defaultValue, required: this.validation.mandatory, maxlength: this.validation.maxLength, minlength: this.validation.minLength, pattern: this.validationPattern, placeholder: `${this.placeholder}`, onInput: this.handleInput, onBlur: this.handleBlur, onFocus: this.handleFocus }), h("small", { key: 'c30bbcb8e49fcdb1dd8cb41bafd56d64b609be86', class: 'password__error-message' }, this.errorMessage), this.passwordComplexity && this.showPopup && !this.hidePasswordComplexity && !this.isDuplicateInput && this.renderComplexityPopup());
231
+ }
232
+ static get is() { return "password-input"; }
233
+ static get encapsulation() { return "shadow"; }
234
+ static get originalStyleUrls() {
235
+ return {
236
+ "$": ["password-input.scss"]
237
+ };
238
+ }
239
+ static get styleUrls() {
240
+ return {
241
+ "$": ["password-input.css"]
242
+ };
243
+ }
244
+ static get properties() {
245
+ return {
246
+ "name": {
247
+ "type": "string",
248
+ "mutable": false,
249
+ "complexType": {
250
+ "original": "string",
251
+ "resolved": "string",
252
+ "references": {}
253
+ },
254
+ "required": false,
255
+ "optional": false,
256
+ "docs": {
257
+ "tags": [],
258
+ "text": "Name of the input."
259
+ },
260
+ "attribute": "name",
261
+ "reflect": true
262
+ },
263
+ "displayName": {
264
+ "type": "string",
265
+ "mutable": false,
266
+ "complexType": {
267
+ "original": "string",
268
+ "resolved": "string",
269
+ "references": {}
270
+ },
271
+ "required": false,
272
+ "optional": false,
273
+ "docs": {
274
+ "tags": [],
275
+ "text": "Name of input to be shown to the user."
276
+ },
277
+ "attribute": "display-name",
278
+ "reflect": true
279
+ },
280
+ "placeholder": {
281
+ "type": "string",
282
+ "mutable": false,
283
+ "complexType": {
284
+ "original": "string",
285
+ "resolved": "string",
286
+ "references": {}
287
+ },
288
+ "required": false,
289
+ "optional": false,
290
+ "docs": {
291
+ "tags": [],
292
+ "text": "Placeholder text to be shown."
293
+ },
294
+ "attribute": "placeholder",
295
+ "reflect": true
296
+ },
297
+ "defaultValue": {
298
+ "type": "string",
299
+ "mutable": false,
300
+ "complexType": {
301
+ "original": "string",
302
+ "resolved": "string",
303
+ "references": {}
304
+ },
305
+ "required": false,
306
+ "optional": false,
307
+ "docs": {
308
+ "tags": [],
309
+ "text": "Default value for the input."
310
+ },
311
+ "attribute": "default-value",
312
+ "reflect": true,
313
+ "defaultValue": "''"
314
+ },
315
+ "autofilled": {
316
+ "type": "boolean",
317
+ "mutable": false,
318
+ "complexType": {
319
+ "original": "boolean",
320
+ "resolved": "boolean",
321
+ "references": {}
322
+ },
323
+ "required": false,
324
+ "optional": false,
325
+ "docs": {
326
+ "tags": [],
327
+ "text": "Boolean. Determines if input should be readonly."
328
+ },
329
+ "attribute": "autofilled",
330
+ "reflect": true
331
+ },
332
+ "tooltip": {
333
+ "type": "string",
334
+ "mutable": false,
335
+ "complexType": {
336
+ "original": "string",
337
+ "resolved": "string",
338
+ "references": {}
339
+ },
340
+ "required": false,
341
+ "optional": false,
342
+ "docs": {
343
+ "tags": [],
344
+ "text": "Tooltip text."
345
+ },
346
+ "attribute": "tooltip",
347
+ "reflect": true
348
+ },
349
+ "validation": {
350
+ "type": "unknown",
351
+ "mutable": false,
352
+ "complexType": {
353
+ "original": "ValidationSchema",
354
+ "resolved": "ValidationSchema",
355
+ "references": {
356
+ "ValidationSchema": {
357
+ "location": "import",
358
+ "path": "../../utils/types",
359
+ "id": "../../../../packages/stencil/general-input-hsl/src/utils/types.ts::ValidationSchema"
360
+ }
361
+ }
362
+ },
363
+ "required": false,
364
+ "optional": false,
365
+ "docs": {
366
+ "tags": [],
367
+ "text": "Object of validation rules for the input."
368
+ }
369
+ },
370
+ "language": {
371
+ "type": "string",
372
+ "mutable": false,
373
+ "complexType": {
374
+ "original": "string",
375
+ "resolved": "string",
376
+ "references": {}
377
+ },
378
+ "required": false,
379
+ "optional": false,
380
+ "docs": {
381
+ "tags": [],
382
+ "text": "Currently selected language."
383
+ },
384
+ "attribute": "language",
385
+ "reflect": true
386
+ },
387
+ "emitValue": {
388
+ "type": "boolean",
389
+ "mutable": false,
390
+ "complexType": {
391
+ "original": "boolean",
392
+ "resolved": "boolean",
393
+ "references": {}
394
+ },
395
+ "required": false,
396
+ "optional": false,
397
+ "docs": {
398
+ "tags": [],
399
+ "text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
400
+ },
401
+ "attribute": "emit-value",
402
+ "reflect": true
403
+ },
404
+ "isDuplicateInput": {
405
+ "type": "boolean",
406
+ "mutable": false,
407
+ "complexType": {
408
+ "original": "boolean",
409
+ "resolved": "boolean",
410
+ "references": {}
411
+ },
412
+ "required": false,
413
+ "optional": false,
414
+ "docs": {
415
+ "tags": [],
416
+ "text": "Flag for duplicate inputs, it sets up the input for certain validation rules."
417
+ },
418
+ "attribute": "is-duplicate-input",
419
+ "reflect": true
420
+ },
421
+ "hidePasswordComplexity": {
422
+ "type": "boolean",
423
+ "mutable": false,
424
+ "complexType": {
425
+ "original": "boolean",
426
+ "resolved": "boolean",
427
+ "references": {}
428
+ },
429
+ "required": false,
430
+ "optional": false,
431
+ "docs": {
432
+ "tags": [],
433
+ "text": "Flag for duplicate inputs, it sets up the input for certain validation rules."
434
+ },
435
+ "attribute": "hide-password-complexity",
436
+ "reflect": true,
437
+ "defaultValue": "false"
438
+ },
439
+ "clientStyling": {
440
+ "type": "string",
441
+ "mutable": false,
442
+ "complexType": {
443
+ "original": "string",
444
+ "resolved": "string",
445
+ "references": {}
446
+ },
447
+ "required": false,
448
+ "optional": false,
449
+ "docs": {
450
+ "tags": [],
451
+ "text": "Client custom styling via inline style"
452
+ },
453
+ "attribute": "client-styling",
454
+ "reflect": true,
455
+ "defaultValue": "''"
456
+ }
457
+ };
458
+ }
459
+ static get states() {
460
+ return {
461
+ "isValid": {},
462
+ "errorMessage": {},
463
+ "limitStylingAppends": {},
464
+ "showTooltip": {},
465
+ "passwordComplexity": {},
466
+ "showPopup": {},
467
+ "value": {}
468
+ };
469
+ }
470
+ static get events() {
471
+ return [{
472
+ "method": "sendOriginalValidityState",
473
+ "name": "sendOriginalValidityState",
474
+ "bubbles": true,
475
+ "cancelable": true,
476
+ "composed": true,
477
+ "docs": {
478
+ "tags": [],
479
+ "text": ""
480
+ },
481
+ "complexType": {
482
+ "original": "InputStateEvent",
483
+ "resolved": "InputStateEvent",
484
+ "references": {
485
+ "InputStateEvent": {
486
+ "location": "import",
487
+ "path": "../../utils/types",
488
+ "id": "../../../../packages/stencil/general-input-hsl/src/utils/types.ts::InputStateEvent"
489
+ }
490
+ }
491
+ }
492
+ }, {
493
+ "method": "sendValidityState",
494
+ "name": "sendValidityState",
495
+ "bubbles": true,
496
+ "cancelable": true,
497
+ "composed": true,
498
+ "docs": {
499
+ "tags": [],
500
+ "text": ""
501
+ },
502
+ "complexType": {
503
+ "original": "InputStateEvent",
504
+ "resolved": "InputStateEvent",
505
+ "references": {
506
+ "InputStateEvent": {
507
+ "location": "import",
508
+ "path": "../../utils/types",
509
+ "id": "../../../../packages/stencil/general-input-hsl/src/utils/types.ts::InputStateEvent"
510
+ }
511
+ }
512
+ }
513
+ }, {
514
+ "method": "sendInputValue",
515
+ "name": "sendInputValue",
516
+ "bubbles": true,
517
+ "cancelable": true,
518
+ "composed": true,
519
+ "docs": {
520
+ "tags": [],
521
+ "text": ""
522
+ },
523
+ "complexType": {
524
+ "original": "InputValueEvent",
525
+ "resolved": "InputValueEvent",
526
+ "references": {
527
+ "InputValueEvent": {
528
+ "location": "import",
529
+ "path": "../../utils/types",
530
+ "id": "../../../../packages/stencil/general-input-hsl/src/utils/types.ts::InputValueEvent"
531
+ }
532
+ }
533
+ }
534
+ }];
535
+ }
536
+ static get elementRef() { return "element"; }
537
+ static get watchers() {
538
+ return [{
539
+ "propName": "clientStyling",
540
+ "methodName": "handleStylingChange"
541
+ }, {
542
+ "propName": "isValid",
543
+ "methodName": "validityChanged"
544
+ }, {
545
+ "propName": "value",
546
+ "methodName": "valueChanged"
547
+ }, {
548
+ "propName": "emitValue",
549
+ "methodName": "emitValueHandler"
550
+ }];
551
+ }
552
+ static get listeners() {
553
+ return [{
554
+ "name": "sendOriginalValidityState",
555
+ "method": "originalValidityChangedHandler",
556
+ "target": "body",
557
+ "capture": false,
558
+ "passive": false
559
+ }, {
560
+ "name": "sendInputValue",
561
+ "method": "valueChangedHandler",
562
+ "target": "body",
563
+ "capture": false,
564
+ "passive": false
565
+ }, {
566
+ "name": "click",
567
+ "method": "handleClickOutside",
568
+ "target": "document",
569
+ "capture": false,
570
+ "passive": false
571
+ }];
572
+ }
573
+ }
@@ -0,0 +1,43 @@
1
+ *,
2
+ *::before,
3
+ *::after {
4
+ padding: 0;
5
+ margin: 0;
6
+ box-sizing: border-box;
7
+ }
8
+
9
+ .radio__fieldset {
10
+ border: none;
11
+ position: relative;
12
+ }
13
+ .radio__wrapper {
14
+ display: flex;
15
+ gap: 5px;
16
+ }
17
+ .radio__error-message {
18
+ position: absolute;
19
+ top: calc(100% + 5px);
20
+ left: 0;
21
+ color: var(--emw--color-error, var(--emw--color-red, #ed0909));
22
+ }
23
+ .radio__tooltip-icon {
24
+ position: absolute;
25
+ right: 0;
26
+ bottom: 10px;
27
+ }
28
+ .radio__tooltip {
29
+ position: absolute;
30
+ bottom: 35px;
31
+ right: 10px;
32
+ background-color: var(--emw--color-white, #FFFFFF);
33
+ border: 1px solid var(--emw--color-gray-100, #E6E6E6);
34
+ color: var(--emw--registration-typography, var(--emw--color-black, #000000));
35
+ padding: 10px;
36
+ border-radius: 5px;
37
+ opacity: 0;
38
+ transition: opacity 0.3s ease-in-out;
39
+ z-index: 10;
40
+ }
41
+ .radio__tooltip.visible {
42
+ opacity: 1;
43
+ }