@everymatrix/general-input 1.32.4 → 1.33.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 (136) hide show
  1. package/dist/cjs/checkbox-group-input_10.cjs.entry.js +36077 -0
  2. package/dist/cjs/general-input.cjs.entry.js +75 -0
  3. package/dist/cjs/general-input.cjs.js +19 -0
  4. package/dist/cjs/index-132a0774.js +1327 -0
  5. package/dist/cjs/index.cjs.js +18 -0
  6. package/dist/cjs/loader.cjs.js +21 -0
  7. package/dist/cjs/locale.utils-cef1d3b6.js +128 -0
  8. package/dist/cjs/toggle-checkbox-input.cjs.entry.js +85 -0
  9. package/dist/cjs/tooltipIcon-092a795f.js +5 -0
  10. package/dist/collection/collection-manifest.json +23 -0
  11. package/dist/collection/components/checkbox-group-input/checkbox-group-input.css +82 -0
  12. package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +366 -0
  13. package/dist/collection/components/checkbox-input/checkbox-input.css +68 -0
  14. package/dist/collection/components/checkbox-input/checkbox-input.js +324 -0
  15. package/dist/collection/components/date-input/date-input.css +101 -0
  16. package/dist/collection/components/date-input/date-input.js +396 -0
  17. package/dist/collection/components/email-input/email-input.css +95 -0
  18. package/dist/collection/components/email-input/email-input.js +403 -0
  19. package/dist/collection/components/general-input/general-input.css +4 -0
  20. package/dist/collection/components/general-input/general-input.js +373 -0
  21. package/dist/collection/components/number-input/number-input.css +102 -0
  22. package/dist/collection/components/number-input/number-input.js +368 -0
  23. package/dist/collection/components/password-input/password-input.css +182 -0
  24. package/dist/collection/components/password-input/password-input.js +527 -0
  25. package/dist/collection/components/radio-input/radio-input.css +43 -0
  26. package/dist/collection/components/radio-input/radio-input.js +297 -0
  27. package/dist/collection/components/select-input/select-input.css +122 -0
  28. package/dist/collection/components/select-input/select-input.js +429 -0
  29. package/dist/collection/components/tel-input/tel-input.css +145 -0
  30. package/dist/collection/components/tel-input/tel-input.js +440 -0
  31. package/dist/collection/components/text-input/text-input.css +98 -0
  32. package/dist/collection/components/text-input/text-input.js +448 -0
  33. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.css +82 -0
  34. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +324 -0
  35. package/dist/collection/index.js +17 -0
  36. package/dist/collection/utils/locale.utils.js +123 -0
  37. package/dist/collection/utils/tooltipIcon.svg +5 -0
  38. package/dist/collection/utils/types.js +1 -0
  39. package/dist/collection/utils/utils.js +5 -0
  40. package/dist/components/active-mixin.js +975 -0
  41. package/dist/components/checkbox-group-input.d.ts +11 -0
  42. package/dist/components/checkbox-group-input.js +6 -0
  43. package/dist/components/checkbox-group-input2.js +1078 -0
  44. package/dist/components/checkbox-input.d.ts +11 -0
  45. package/dist/components/checkbox-input.js +6 -0
  46. package/dist/components/checkbox-input2.js +129 -0
  47. package/dist/components/date-input.d.ts +11 -0
  48. package/dist/components/date-input.js +6 -0
  49. package/dist/components/date-input2.js +11556 -0
  50. package/dist/components/email-input.d.ts +11 -0
  51. package/dist/components/email-input.js +6 -0
  52. package/dist/components/email-input2.js +171 -0
  53. package/dist/components/field-mixin.js +12426 -0
  54. package/dist/components/general-input.d.ts +11 -0
  55. package/dist/components/general-input.js +6 -0
  56. package/dist/components/general-input2.js +341 -0
  57. package/dist/components/index.d.ts +26 -0
  58. package/dist/components/index.js +18 -0
  59. package/dist/components/input-field-shared-styles.js +1211 -0
  60. package/dist/components/number-input.d.ts +11 -0
  61. package/dist/components/number-input.js +6 -0
  62. package/dist/components/number-input2.js +158 -0
  63. package/dist/components/password-input.d.ts +11 -0
  64. package/dist/components/password-input.js +6 -0
  65. package/dist/components/password-input2.js +1041 -0
  66. package/dist/components/radio-input.d.ts +11 -0
  67. package/dist/components/radio-input.js +6 -0
  68. package/dist/components/radio-input2.js +114 -0
  69. package/dist/components/select-input.d.ts +11 -0
  70. package/dist/components/select-input.js +6 -0
  71. package/dist/components/select-input2.js +183 -0
  72. package/dist/components/tel-input.d.ts +11 -0
  73. package/dist/components/tel-input.js +6 -0
  74. package/dist/components/tel-input2.js +197 -0
  75. package/dist/components/text-input.d.ts +11 -0
  76. package/dist/components/text-input.js +6 -0
  77. package/dist/components/text-input2.js +199 -0
  78. package/dist/components/toggle-checkbox-input.d.ts +11 -0
  79. package/dist/components/toggle-checkbox-input.js +6 -0
  80. package/dist/components/tooltipIcon.js +127 -0
  81. package/dist/components/vaadin-button.js +490 -0
  82. package/dist/components/vaadin-combo-box.js +4512 -0
  83. package/dist/components/virtual-keyboard-controller.js +2001 -0
  84. package/dist/esm/checkbox-group-input_10.entry.js +36064 -0
  85. package/dist/esm/general-input.entry.js +71 -0
  86. package/dist/esm/general-input.js +17 -0
  87. package/dist/esm/index-db76d5b5.js +1299 -0
  88. package/dist/esm/index.js +16 -0
  89. package/dist/esm/loader.js +17 -0
  90. package/dist/esm/locale.utils-de759721.js +125 -0
  91. package/dist/esm/polyfills/core-js.js +11 -0
  92. package/dist/esm/polyfills/css-shim.js +1 -0
  93. package/dist/esm/polyfills/dom.js +79 -0
  94. package/dist/esm/polyfills/es5-html-element.js +1 -0
  95. package/dist/esm/polyfills/index.js +34 -0
  96. package/dist/esm/polyfills/system.js +6 -0
  97. package/dist/esm/toggle-checkbox-input.entry.js +81 -0
  98. package/dist/esm/tooltipIcon-99c1c7b7.js +3 -0
  99. package/dist/general-input/general-input.esm.js +1 -0
  100. package/dist/general-input/index.esm.js +1 -0
  101. package/dist/general-input/p-10efdf3f.js +1 -0
  102. package/dist/general-input/p-613c3e00.entry.js +1 -0
  103. package/dist/general-input/p-660bcdd1.entry.js +1 -0
  104. package/dist/general-input/p-9b6b0396.entry.js +3646 -0
  105. package/dist/general-input/p-b408093e.js +1 -0
  106. package/dist/general-input/p-f4f4ccda.js +1 -0
  107. package/dist/index.cjs.js +1 -0
  108. package/dist/index.js +1 -0
  109. package/dist/stencil.config.js +22 -0
  110. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/general-input/.stencil/packages/general-input/stencil.config.d.ts +2 -0
  111. package/dist/types/components/checkbox-group-input/checkbox-group-input.d.ts +74 -0
  112. package/dist/types/components/checkbox-input/checkbox-input.d.ts +65 -0
  113. package/dist/types/components/date-input/date-input.d.ts +84 -0
  114. package/dist/types/components/email-input/email-input.d.ts +80 -0
  115. package/dist/types/components/general-input/general-input.d.ts +75 -0
  116. package/dist/types/components/number-input/number-input.d.ts +74 -0
  117. package/dist/types/components/password-input/password-input.d.ts +91 -0
  118. package/dist/types/components/radio-input/radio-input.d.ts +59 -0
  119. package/dist/types/components/select-input/select-input.d.ts +83 -0
  120. package/dist/types/components/tel-input/tel-input.d.ts +89 -0
  121. package/dist/types/components/text-input/text-input.d.ts +84 -0
  122. package/dist/types/components/toggle-checkbox-input/toggle-checkbox-input.d.ts +67 -0
  123. package/dist/types/components.d.ts +1268 -0
  124. package/dist/types/index.d.ts +1 -0
  125. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  126. package/dist/types/utils/locale.utils.d.ts +17 -0
  127. package/dist/types/utils/types.d.ts +87 -0
  128. package/dist/types/utils/utils.d.ts +1 -0
  129. package/loader/cdn.js +3 -0
  130. package/loader/index.cjs.js +3 -0
  131. package/loader/index.d.ts +12 -0
  132. package/loader/index.es2017.js +3 -0
  133. package/loader/index.js +4 -0
  134. package/loader/package.json +10 -0
  135. package/package.json +2 -3
  136. package/LICENSE +0 -21
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ function safeDecorator(fn) {
4
+ // eslint-disable-next-line func-names
5
+ return function (...args) {
6
+ try {
7
+ return fn.apply(this, args);
8
+ }
9
+ catch (error) {
10
+ if (error instanceof DOMException &&
11
+ error.message.includes('has already been used with this registry') || error.message.includes('Cannot define multiple custom elements with the same tag name')) {
12
+ return false;
13
+ }
14
+ throw error;
15
+ }
16
+ };
17
+ }
18
+ customElements.define = safeDecorator(customElements.define);
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-132a0774.js');
6
+
7
+ /*
8
+ Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
9
+ */
10
+ const patchEsm = () => {
11
+ return index.promiseResolve();
12
+ };
13
+
14
+ const defineCustomElements = (win, options) => {
15
+ if (typeof window === 'undefined') return Promise.resolve();
16
+ return patchEsm().then(() => {
17
+ return index.bootstrapLazy([["checkbox-group-input_10.cjs",[[1,"checkbox-group-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"selectedValues":[32]},[[4,"click","handleClickOutside"]]],[1,"checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"date-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"dateFormat":[513,"date-format"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"email-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]]],[1,"number-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"password-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"passwordComplexity":[32],"showPopup":[32],"value":[32]},[[16,"sendOriginalValidityState","originalValidityChangedHandler"],[16,"sendInputValue","valueChangedHandler"],[4,"click","handleClickOutside"]]],[1,"radio-input",{"name":[513],"displayName":[513,"display-name"],"optionsGroup":[16],"validation":[16],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"select-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"tel-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"showLabels":[516,"show-labels"],"action":[513],"validation":[16],"defaultValue":[520,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"]]],[1,"text-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"checkValidity":[516,"check-validity"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[4,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]]]]],["general-input.cjs",[[1,"general-input",{"type":[513],"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"validation":[16],"options":[520],"language":[513],"autofilled":[516],"tooltip":[513],"defaultValue":[520,"default-value"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[520,"client-styling"],"dateFormat":[513,"date-format"],"translationUrl":[513,"translation-url"],"emitOnClick":[516,"emit-on-click"]}]]],["toggle-checkbox-input.cjs",[[1,"toggle-checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"options":[16],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"showFields":[32]},[[4,"click","handleClickOutside"]]]]]], options);
18
+ });
19
+ };
20
+
21
+ exports.defineCustomElements = defineCustomElements;
@@ -0,0 +1,128 @@
1
+ 'use strict';
2
+
3
+ const DEFAULT_LANGUAGE = 'en';
4
+ const TRANSLATIONS = {
5
+ "en": {
6
+ "dateError": 'The selected date should be between {min} and {max}',
7
+ "dateError2": 'The selected date is not within the accepted range',
8
+ "numberLengthError": 'The number should be between {min} and {max}',
9
+ "lengthError": `The length should be between {minLength} and {maxLength}`,
10
+ "requiredError": 'This input is required.',
11
+ "invalidOriginalPasswordError": "Initial password field does not validate all criteria.",
12
+ "passwordStrength": "Password strength",
13
+ "passwordStrengthWeak": "is not adequate",
14
+ "passwordStrengthStrong": "is adequate",
15
+ "SpecialCharactersNotAllowed": 'Should not contain special characters',
16
+ "InvalidEmailFormat": "Invalid email format.",
17
+ "EmailNotMatching": "Emails not matching!",
18
+ "PasswordNotMatching": "Passwords not matching",
19
+ "MustIncludeNumber": "include a number",
20
+ "MustContainCapital": "contain capital letters",
21
+ "MustIncludePunctation": "punctuation",
22
+ "OnlyNumbers": "Should contains only numbers."
23
+ },
24
+ "hu": {
25
+ "dateError": 'A választott dátumnak {min} és {max} között kell lennie',
26
+ "numberLengthError": 'A számnak {min} és {max} között kell lennie',
27
+ "lengthError": `A hossznak {minLength} és {maxLength} között kell lennie`,
28
+ "requiredError": 'Ez a beviteli mező kötelező.',
29
+ "invalidOriginalPasswordError": "Initial password field does not validate all criteria.",
30
+ "passwordStrength": "Jelszó erőssége",
31
+ "passwordStrengthWeak": "nem megfelelő",
32
+ "passwordStrengthStrong": "megfelelő",
33
+ "SpecialCharactersNotAllowed": 'Nem tartalmazhat speciális karaktereket',
34
+ "InvalidEmailFormat": "Érvénytelen e-mail formátum.",
35
+ "EmailNotMatching": "Az e-mailek nem egyeznek!",
36
+ "PasswordNotMatching": "A jelszavak nem egyeznek",
37
+ "MustIncludeNumber": "tartalmaznia kell egy számot",
38
+ "MustContainCapital": "nagybetűket kell tartalmaznia",
39
+ "MustIncludePunctation": "írásjelet",
40
+ "OnlyNumbers": "Csak számokat kell tartalmaznia."
41
+ },
42
+ "hr": {
43
+ "dateError": 'Odabrani datum treba biti između {min} i {max}',
44
+ "dateError2": 'Odabrani datum nije unutar prihvaćenog raspona',
45
+ "numberLengthError": 'Broj bi trebao biti između {min} i {max}',
46
+ "lengthError": `Duljina bi trebala biti između {minLength} i {maxLength}`,
47
+ "requiredError": 'Ovaj unos je obavezan.',
48
+ "invalidOriginalPasswordError": "Polje početne lozinke ne potvrđuje sve kriterije",
49
+ "passwordStrength": "Jačina zaporke",
50
+ "passwordStrengthWeak": "nije adekvatno",
51
+ "passwordStrengthStrong": "je adekvatan",
52
+ "SpecialCharactersNotAllowed": 'Ne smije sadržavati posebne znakove',
53
+ "InvalidEmailFormat": "Nevažeći format e-maila",
54
+ "EmailNotMatching": "E-mailovi se ne podudaraju!",
55
+ "PasswordNotMatching": "Lozinke se ne podudaraju",
56
+ "MustIncludeNumber": "uključiti broj",
57
+ "MustContainCapital": "sadrže velika slova",
58
+ "MustIncludePunctation": "interpunkcija",
59
+ "OnlyNumbers": "Treba sadržavati samo brojeve."
60
+ },
61
+ 'pt-br': {
62
+ "dateError": "A data selecionada deve estar entre {min} e {max}",
63
+ "dateError2": "A data selecionada não está dentro de um intervalo válido",
64
+ "numberLengthError": "O número deve estar entre {min} e {max}",
65
+ "lengthError": "O comprimento deve estar entre {minLength} e {maxLength}",
66
+ "requiredError": "Este campo é obrigatório",
67
+ "invalidOriginalPasswordError": "O campo de senha inicial não faz parte dos critérios válidos",
68
+ "PasswordStrength": "Força da senha",
69
+ "PasswordStrengthWeak": "Não é adequado",
70
+ "PasswordStrengthStrong": "é apropriado",
71
+ "SpecialCharactersNotAllowed": "Não deve conter caracteres especiais",
72
+ "InvalidEmailFormat": "Formato de email inválido",
73
+ "EmailNotMatching": "E-mail não corresponde",
74
+ "PasswordNotMatching": "Senha não corresponde",
75
+ "MustIncludeNumber": "inclui um número",
76
+ "MustContainCapital": "contém letras maiúsculas",
77
+ "MustIncludePunctation": "pontuação",
78
+ "OnlyNumbers": "Deve conter apenas números"
79
+ },
80
+ 'es-mx': {
81
+ "dateError": "La fecha seleccionada debe ser entre {min} y {max}",
82
+ "dateError2": "La fecha seleccionada no está dentro de un rango válido",
83
+ "numberLengthError": "El número debe ser entre {min} y {max}",
84
+ "lengthError": "La longitud deber ser entre {minLength} y {maxLength}",
85
+ "requiredError": "Este campo es requerido",
86
+ "invalidOriginalPasswordError": "El campo de contraseña inicial no es parte del criterio válido",
87
+ "PasswordStrength": "La fortaleza de la contraseña",
88
+ "PasswordStrengthWeak": "no es adecuada",
89
+ "PasswordStrengthStrong": "es adecuada",
90
+ "SpecialCharactersNotAllowed": "No debe contener caracteres especiales",
91
+ "InvalidEmailFormat": "Formato inválido de correo",
92
+ "EmailNotMatching": "El correo electrónico no coincide",
93
+ "PasswordNotMatching": "La contraseña no coincide",
94
+ "MustIncludeNumber": "incluye un número",
95
+ "MustContainCapital": "contiene mayúsculas",
96
+ "MustIncludePunctation": "puntuación",
97
+ "OnlyNumbers": "Solo debe contener números"
98
+ }
99
+ };
100
+ const translate = (key, customLang, values) => {
101
+ const lang = customLang;
102
+ let translation = TRANSLATIONS[lang !== undefined ? lang : DEFAULT_LANGUAGE][key];
103
+ if (values !== undefined) {
104
+ for (const [key, value] of Object.entries(values.values)) {
105
+ const regex = new RegExp(`{${key}}`, 'g');
106
+ translation = translation.replace(regex, value);
107
+ }
108
+ }
109
+ return translation;
110
+ };
111
+ const getTranslations = (url) => {
112
+ // fetch url, get the data, replace the TRANSLATIONS content
113
+ return new Promise((resolve) => {
114
+ fetch(url)
115
+ .then((res) => res.json())
116
+ .then((data) => {
117
+ Object.keys(data).forEach((item) => {
118
+ for (let key in data[item]) {
119
+ TRANSLATIONS[item][key] = data[item][key];
120
+ }
121
+ });
122
+ resolve(true);
123
+ });
124
+ });
125
+ };
126
+
127
+ exports.getTranslations = getTranslations;
128
+ exports.translate = translate;
@@ -0,0 +1,85 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-132a0774.js');
6
+ const locale_utils = require('./locale.utils-cef1d3b6.js');
7
+ const tooltipIcon = require('./tooltipIcon-092a795f.js');
8
+
9
+ const toggleCheckboxInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.togglecheckbox{font-family:\"Roboto\";font-style:normal;font-size:15px}.togglecheckbox__wrapper{position:relative}.togglecheckbox__wrapper--flex{display:flex;gap:10px;align-items:baseline}.togglecheckbox__wrapper--relative{position:relative;display:inline}.togglecheckbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.togglecheckbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.togglecheckbox__label-text{font-size:16px}.togglecheckbox__label a{color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.togglecheckbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.togglecheckbox__tooltip-icon{width:16px;height:auto}.togglecheckbox__tooltip{position:absolute;top:0;right:0;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.togglecheckbox__tooltip.visible{opacity:1}.togglecheckbox__fields-wrapper{margin-top:40px;display:flex;flex-direction:column;gap:40px}.hidden{display:none}";
10
+
11
+ const ToggleCheckboxInput = class {
12
+ constructor(hostRef) {
13
+ index.registerInstance(this, hostRef);
14
+ this.sendValidityState = index.createEvent(this, "sendValidityState", 7);
15
+ this.sendInputValue = index.createEvent(this, "sendInputValue", 7);
16
+ /**
17
+ * Default value for the input.
18
+ */
19
+ this.defaultValue = '';
20
+ /**
21
+ * Client custom styling via inline style
22
+ */
23
+ this.clientStyling = '';
24
+ this.limitStylingAppends = false;
25
+ this.showTooltip = false;
26
+ this.value = '';
27
+ this.setClientStyling = () => {
28
+ let sheet = document.createElement('style');
29
+ sheet.innerHTML = this.clientStyling;
30
+ this.stylingContainer.prepend(sheet);
31
+ };
32
+ }
33
+ validityStateHandler(inputStateEvent) {
34
+ this.sendValidityState.emit(inputStateEvent);
35
+ }
36
+ valueHandler(inputValueEvent) {
37
+ this.sendInputValue.emit(inputValueEvent);
38
+ }
39
+ handleClickOutside(event) {
40
+ if (event.composedPath()[0] === this.tooltipIconReference)
41
+ return;
42
+ if (event.composedPath()[0] !== this.tooltipReference)
43
+ this.showTooltip = false;
44
+ }
45
+ componentDidRender() {
46
+ // start custom styling area
47
+ if (!this.limitStylingAppends && this.stylingContainer) {
48
+ if (this.clientStyling)
49
+ this.setClientStyling();
50
+ this.limitStylingAppends = true;
51
+ }
52
+ // end custom styling area
53
+ }
54
+ handleClick() {
55
+ this.showFields = this.checkboxReference.checked;
56
+ this.errorMessage = this.setErrorMessage();
57
+ this.isValid = this.setValidity();
58
+ }
59
+ setValidity() {
60
+ return this.checkboxReference.validity.valid;
61
+ }
62
+ setErrorMessage() {
63
+ if (this.checkboxReference.validity.valueMissing) {
64
+ return locale_utils.translate('requiredError', this.language);
65
+ }
66
+ }
67
+ renderLabel() {
68
+ return (index.h("label", { class: 'togglecheckbox__label', htmlFor: `${this.name}__input` }, index.h("div", { class: 'togglecheckbox__label-text', innerHTML: `${this.displayName} ${this.validation.mandatory ? '*' : ''}` })));
69
+ }
70
+ renderTooltip() {
71
+ if (this.showTooltip) {
72
+ return (index.h("div", { class: `togglecheckbox__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
73
+ }
74
+ return null;
75
+ }
76
+ render() {
77
+ return index.h("div", { class: `togglecheckbox__wrapper ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { class: 'togglecheckbox__wrapper--flex' }, index.h("input", { class: 'togglecheckbox__input', type: "checkbox", id: `${this.name}__input`, ref: (el) => this.checkboxReference = el, name: this.name, checked: this.defaultValue === "true", readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), this.renderLabel()), index.h("small", { class: 'togglecheckbox__error-message' }, this.errorMessage), index.h("div", { class: 'togglecheckbox__wrapper--relative' }, this.tooltip &&
78
+ index.h("img", { class: 'togglecheckbox__tooltip-icon', src: tooltipIcon.tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()), index.h("div", { class: `togglecheckbox__fields-wrapper ${this.showFields ? '' : 'hidden'}` }, this.options.map(subfield => {
79
+ return index.h("general-input", { type: subfield.inputType, name: subfield.name, displayName: subfield.displayName, validation: subfield.validate, action: subfield.action || null, defaultValue: subfield.defaultValue, autofilled: subfield.autofill, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: subfield.tooltip, placeholder: subfield.placeholder == null ? '' : subfield.placeholder });
80
+ })));
81
+ }
82
+ };
83
+ ToggleCheckboxInput.style = toggleCheckboxInputCss;
84
+
85
+ exports.toggle_checkbox_input = ToggleCheckboxInput;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const tooltipIconSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==';
4
+
5
+ exports.tooltipIconSvg = tooltipIconSvg;
@@ -0,0 +1,23 @@
1
+ {
2
+ "entries": [
3
+ "./components/checkbox-group-input/checkbox-group-input.js",
4
+ "./components/checkbox-input/checkbox-input.js",
5
+ "./components/date-input/date-input.js",
6
+ "./components/email-input/email-input.js",
7
+ "./components/general-input/general-input.js",
8
+ "./components/number-input/number-input.js",
9
+ "./components/password-input/password-input.js",
10
+ "./components/radio-input/radio-input.js",
11
+ "./components/select-input/select-input.js",
12
+ "./components/tel-input/tel-input.js",
13
+ "./components/text-input/text-input.js",
14
+ "./components/toggle-checkbox-input/toggle-checkbox-input.js"
15
+ ],
16
+ "compiler": {
17
+ "name": "@stencil/core",
18
+ "version": "2.15.2",
19
+ "typescriptVersion": "4.5.4"
20
+ },
21
+ "collections": [],
22
+ "bundles": []
23
+ }
@@ -0,0 +1,82 @@
1
+ *,
2
+ *::before,
3
+ *::after {
4
+ padding: 0;
5
+ margin: 0;
6
+ box-sizing: border-box;
7
+ }
8
+
9
+ vaadin-checkbox-group {
10
+ margin-top: 5px;
11
+ margin-left: 40px;
12
+ }
13
+
14
+ .checkboxgroup {
15
+ font-family: "Roboto";
16
+ font-style: normal;
17
+ font-size: 15px;
18
+ }
19
+ .checkboxgroup__wrapper {
20
+ position: relative;
21
+ }
22
+ .checkboxgroup__wrapper--flex {
23
+ display: flex;
24
+ gap: 5px;
25
+ align-content: flex-start;
26
+ }
27
+ .checkboxgroup__wrapper--relative {
28
+ position: relative;
29
+ display: inline;
30
+ }
31
+ .checkboxgroup__input {
32
+ vertical-align: baseline;
33
+ }
34
+ .checkboxgroup__input[indeterminate]::part(checkbox)::after, .checkboxgroup__input[indeterminate]::part(checkbox), .checkboxgroup__input[checked]::part(checkbox) {
35
+ background-color: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));
36
+ }
37
+ .checkboxgroup__label {
38
+ font-style: inherit;
39
+ font-family: inherit;
40
+ font-weight: 400;
41
+ font-size: 16px;
42
+ color: var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));
43
+ line-height: 1.5;
44
+ padding-left: 10px;
45
+ vertical-align: baseline;
46
+ }
47
+ .checkboxgroup__label-text {
48
+ font-size: 16px;
49
+ }
50
+ .checkboxgroup__label a {
51
+ color: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));
52
+ }
53
+ .checkboxgroup__error-message {
54
+ position: absolute;
55
+ top: calc(100% + 5px);
56
+ left: 0;
57
+ color: var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909));
58
+ }
59
+ .checkboxgroup__tooltip-icon {
60
+ width: 16px;
61
+ height: auto;
62
+ }
63
+ .checkboxgroup__tooltip {
64
+ position: absolute;
65
+ top: 0;
66
+ right: 0;
67
+ background-color: var(--emfe-w-color-white, #FFFFFF);
68
+ border: 1px solid var(--emfe-w-color-gray-100, #E6E6E6);
69
+ color: var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));
70
+ padding: 10px;
71
+ border-radius: 5px;
72
+ opacity: 0;
73
+ transition: opacity 0.3s ease-in-out;
74
+ z-index: 10;
75
+ }
76
+ .checkboxgroup__tooltip.visible {
77
+ opacity: 1;
78
+ }
79
+
80
+ .checkbox__input[indeterminate]::part(checkbox), .checkbox__input[checked]::part(checkbox) {
81
+ background-color: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));
82
+ }