@mgdis/mg-components 5.19.3 → 5.21.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 (493) hide show
  1. package/dist/cjs/{components.utils-69435877.js → components.utils-cd908d4e.js} +102 -99
  2. package/dist/cjs/components.utils-cd908d4e.js.map +1 -0
  3. package/dist/cjs/{index-60dd0c56.js → index-8532b5e9.js} +185 -87
  4. package/dist/cjs/index-8532b5e9.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/mg-action-more_34.cjs.entry.js +5140 -5107
  7. package/dist/cjs/mg-action-more_34.cjs.entry.js.map +1 -1
  8. package/dist/cjs/mg-components.cjs.js +3 -3
  9. package/dist/cjs/mg-components.cjs.js.map +1 -1
  10. package/dist/cjs/mg-item-more.cjs.entry.js +237 -222
  11. package/dist/cjs/mg-item-more.cjs.entry.js.map +1 -1
  12. package/dist/collection/assets/icons/index.js +193 -191
  13. package/dist/collection/assets/icons/index.js.map +1 -0
  14. package/dist/collection/collection-manifest.json +6 -6
  15. package/dist/collection/components/atoms/mg-badge/mg-badge.js +161 -161
  16. package/dist/collection/components/atoms/mg-badge/mg-badge.js.map +1 -1
  17. package/dist/collection/components/atoms/mg-button/mg-button.js +362 -362
  18. package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -1
  19. package/dist/collection/components/atoms/mg-card/mg-card.js +126 -126
  20. package/dist/collection/components/atoms/mg-card/mg-card.js.map +1 -1
  21. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +101 -101
  22. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js.map +1 -1
  23. package/dist/collection/components/atoms/mg-divider/mg-divider.js +47 -47
  24. package/dist/collection/components/atoms/mg-divider/mg-divider.js.map +1 -1
  25. package/dist/collection/components/atoms/mg-icon/mg-icon.js +231 -231
  26. package/dist/collection/components/atoms/mg-icon/mg-icon.js.map +1 -1
  27. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +132 -132
  28. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js.map +1 -1
  29. package/dist/collection/components/atoms/mg-tag/mg-tag.js +158 -158
  30. package/dist/collection/components/atoms/mg-tag/mg-tag.js.map +1 -1
  31. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +46 -46
  32. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js.map +1 -1
  33. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +3 -3
  34. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js.map +1 -1
  35. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +398 -398
  36. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
  37. package/dist/collection/components/molecules/inputs/MgInput.conf.js +2 -2
  38. package/dist/collection/components/molecules/inputs/MgInput.conf.js.map +1 -1
  39. package/dist/collection/components/molecules/inputs/MgInput.js +84 -84
  40. package/dist/collection/components/molecules/inputs/MgInput.js.map +1 -1
  41. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +8 -8
  42. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js.map +1 -1
  43. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +266 -266
  44. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +1 -1
  45. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +4 -4
  46. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js.map +1 -1
  47. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +788 -791
  48. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -1
  49. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js +4 -4
  50. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js.map +1 -1
  51. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +588 -578
  52. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -1
  53. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.js +4 -4
  54. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.js.map +1 -1
  55. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +778 -773
  56. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
  57. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +536 -526
  58. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -1
  59. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +565 -555
  60. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +1 -1
  61. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +700 -695
  62. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
  63. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +770 -760
  64. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
  65. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +705 -695
  66. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
  67. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +527 -522
  68. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -1
  69. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js +2 -2
  70. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js.map +1 -1
  71. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +263 -263
  72. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js.map +1 -1
  73. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.conf.js +6 -6
  74. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.conf.js.map +1 -1
  75. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +423 -423
  76. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js.map +1 -1
  77. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +214 -214
  78. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -1
  79. package/dist/collection/components/molecules/mg-details/mg-details.js +155 -150
  80. package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -1
  81. package/dist/collection/components/molecules/mg-form/mg-form.conf.js +9 -0
  82. package/dist/collection/components/molecules/mg-form/mg-form.conf.js.map +1 -0
  83. package/dist/collection/components/molecules/mg-form/mg-form.js +405 -327
  84. package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
  85. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +85 -85
  86. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js.map +1 -1
  87. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +203 -188
  88. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js.map +1 -1
  89. package/dist/collection/components/molecules/mg-message/mg-message.js +325 -304
  90. package/dist/collection/components/molecules/mg-message/mg-message.js.map +1 -1
  91. package/dist/collection/components/molecules/mg-modal/mg-modal.js +317 -317
  92. package/dist/collection/components/molecules/mg-modal/mg-modal.js.map +1 -1
  93. package/dist/collection/components/molecules/mg-pagination/mg-pagination.conf.js +2 -2
  94. package/dist/collection/components/molecules/mg-pagination/mg-pagination.conf.js.map +1 -1
  95. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +216 -216
  96. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js.map +1 -1
  97. package/dist/collection/components/molecules/mg-panel/mg-panel.js +409 -399
  98. package/dist/collection/components/molecules/mg-panel/mg-panel.js.map +1 -1
  99. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +91 -91
  100. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js.map +1 -1
  101. package/dist/collection/components/molecules/mg-popover/mg-popover.js +336 -329
  102. package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
  103. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +94 -94
  104. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js.map +1 -1
  105. package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +4 -4
  106. package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js.map +1 -1
  107. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +348 -343
  108. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js.map +1 -1
  109. package/dist/collection/locales/fr/messages.json +4 -4
  110. package/dist/collection/locales/index.spec.js +20 -20
  111. package/dist/collection/locales/index.spec.js.map +1 -1
  112. package/dist/collection/utils/behaviors.utils.js +127 -127
  113. package/dist/collection/utils/behaviors.utils.js.map +1 -1
  114. package/dist/collection/utils/behaviors.utils.spec.js +46 -42
  115. package/dist/collection/utils/behaviors.utils.spec.js.map +1 -1
  116. package/dist/collection/utils/components.utils.js +77 -75
  117. package/dist/collection/utils/components.utils.js.map +1 -1
  118. package/dist/collection/utils/components.utils.spec.js +150 -140
  119. package/dist/collection/utils/components.utils.spec.js.map +1 -1
  120. package/dist/collection/utils/e2e.test.utils.js +21 -21
  121. package/dist/collection/utils/e2e.test.utils.js.map +1 -1
  122. package/dist/collection/utils/locale.utils.js +17 -17
  123. package/dist/collection/utils/locale.utils.js.map +1 -1
  124. package/dist/collection/utils/locale.utils.spec.js +45 -45
  125. package/dist/collection/utils/locale.utils.spec.js.map +1 -1
  126. package/dist/collection/utils/playwright.e2e.test.utils.js +41 -41
  127. package/dist/collection/utils/playwright.e2e.test.utils.js.map +1 -1
  128. package/dist/collection/utils/playwright.fixture.js +24 -0
  129. package/dist/collection/utils/playwright.fixture.js.map +1 -0
  130. package/dist/collection/utils/unit.test.utils.js +50 -50
  131. package/dist/collection/utils/unit.test.utils.js.map +1 -1
  132. package/dist/components/MgInput.js +98 -98
  133. package/dist/components/MgInput.js.map +1 -1
  134. package/dist/components/components.utils.js +78 -76
  135. package/dist/components/components.utils.js.map +1 -1
  136. package/dist/components/index2.js +21 -21
  137. package/dist/components/index2.js.map +1 -1
  138. package/dist/components/mg-action-more.d.ts +2 -2
  139. package/dist/components/mg-action-more.js +173 -173
  140. package/dist/components/mg-action-more.js.map +1 -1
  141. package/dist/components/mg-badge.d.ts +2 -2
  142. package/dist/components/mg-badge2.js +83 -83
  143. package/dist/components/mg-badge2.js.map +1 -1
  144. package/dist/components/mg-button.d.ts +2 -2
  145. package/dist/components/mg-button2.js +182 -182
  146. package/dist/components/mg-button2.js.map +1 -1
  147. package/dist/components/mg-card.d.ts +2 -2
  148. package/dist/components/mg-card2.js +77 -77
  149. package/dist/components/mg-card2.js.map +1 -1
  150. package/dist/components/mg-character-left.d.ts +2 -2
  151. package/dist/components/mg-character-left2.js +50 -50
  152. package/dist/components/mg-character-left2.js.map +1 -1
  153. package/dist/components/mg-details.d.ts +2 -2
  154. package/dist/components/mg-details.js +69 -69
  155. package/dist/components/mg-details.js.map +1 -1
  156. package/dist/components/mg-divider.d.ts +2 -2
  157. package/dist/components/mg-divider.js +30 -30
  158. package/dist/components/mg-divider.js.map +1 -1
  159. package/dist/components/mg-form.d.ts +2 -2
  160. package/dist/components/mg-form.js +203 -171
  161. package/dist/components/mg-form.js.map +1 -1
  162. package/dist/components/mg-icon.d.ts +2 -2
  163. package/dist/components/mg-icon2.js +319 -317
  164. package/dist/components/mg-icon2.js.map +1 -1
  165. package/dist/components/mg-illustrated-message.d.ts +2 -2
  166. package/dist/components/mg-illustrated-message.js +51 -51
  167. package/dist/components/mg-illustrated-message.js.map +1 -1
  168. package/dist/components/mg-input-checkbox-paginated.d.ts +2 -2
  169. package/dist/components/mg-input-checkbox-paginated2.js +170 -170
  170. package/dist/components/mg-input-checkbox-paginated2.js.map +1 -1
  171. package/dist/components/mg-input-checkbox.d.ts +2 -2
  172. package/dist/components/mg-input-checkbox.js +477 -480
  173. package/dist/components/mg-input-checkbox.js.map +1 -1
  174. package/dist/components/mg-input-date.d.ts +2 -2
  175. package/dist/components/mg-input-date.js +265 -265
  176. package/dist/components/mg-input-date.js.map +1 -1
  177. package/dist/components/mg-input-numeric.d.ts +2 -2
  178. package/dist/components/mg-input-numeric.js +353 -353
  179. package/dist/components/mg-input-numeric.js.map +1 -1
  180. package/dist/components/mg-input-password.d.ts +2 -2
  181. package/dist/components/mg-input-password.js +204 -204
  182. package/dist/components/mg-input-password.js.map +1 -1
  183. package/dist/components/mg-input-radio.d.ts +2 -2
  184. package/dist/components/mg-input-radio.js +234 -234
  185. package/dist/components/mg-input-radio.js.map +1 -1
  186. package/dist/components/mg-input-select.d.ts +2 -2
  187. package/dist/components/mg-input-select2.js +315 -315
  188. package/dist/components/mg-input-select2.js.map +1 -1
  189. package/dist/components/mg-input-text.d.ts +2 -2
  190. package/dist/components/mg-input-text2.js +305 -305
  191. package/dist/components/mg-input-text2.js.map +1 -1
  192. package/dist/components/mg-input-textarea.d.ts +2 -2
  193. package/dist/components/mg-input-textarea.js +276 -276
  194. package/dist/components/mg-input-textarea.js.map +1 -1
  195. package/dist/components/mg-input-title.d.ts +2 -2
  196. package/dist/components/mg-input-title2.js +60 -60
  197. package/dist/components/mg-input-title2.js.map +1 -1
  198. package/dist/components/mg-input-toggle.d.ts +2 -2
  199. package/dist/components/mg-input-toggle.js +251 -251
  200. package/dist/components/mg-input-toggle.js.map +1 -1
  201. package/dist/components/mg-item-more.d.ts +2 -2
  202. package/dist/components/mg-item-more.js +298 -283
  203. package/dist/components/mg-item-more.js.map +1 -1
  204. package/dist/components/mg-menu-item.d.ts +2 -2
  205. package/dist/components/mg-menu-item2.js +345 -345
  206. package/dist/components/mg-menu-item2.js.map +1 -1
  207. package/dist/components/mg-menu.conf.js +2 -2
  208. package/dist/components/mg-menu.conf.js.map +1 -1
  209. package/dist/components/mg-menu.d.ts +2 -2
  210. package/dist/components/mg-menu2.js +176 -176
  211. package/dist/components/mg-menu2.js.map +1 -1
  212. package/dist/components/mg-message.d.ts +2 -2
  213. package/dist/components/mg-message.js +197 -192
  214. package/dist/components/mg-message.js.map +1 -1
  215. package/dist/components/mg-modal.d.ts +2 -2
  216. package/dist/components/mg-modal.js +198 -198
  217. package/dist/components/mg-modal.js.map +1 -1
  218. package/dist/components/mg-pagination.d.ts +2 -2
  219. package/dist/components/mg-pagination2.js +133 -133
  220. package/dist/components/mg-pagination2.js.map +1 -1
  221. package/dist/components/mg-panel.d.ts +2 -2
  222. package/dist/components/mg-panel.js +238 -238
  223. package/dist/components/mg-panel.js.map +1 -1
  224. package/dist/components/mg-popover-content.d.ts +2 -2
  225. package/dist/components/mg-popover-content2.js +69 -69
  226. package/dist/components/mg-popover-content2.js.map +1 -1
  227. package/dist/components/mg-popover.d.ts +2 -2
  228. package/dist/components/mg-popover2.js +224 -222
  229. package/dist/components/mg-popover2.js.map +1 -1
  230. package/dist/components/mg-skip-links.d.ts +2 -2
  231. package/dist/components/mg-skip-links.js +57 -57
  232. package/dist/components/mg-skip-links.js.map +1 -1
  233. package/dist/components/mg-tabs.d.ts +2 -2
  234. package/dist/components/mg-tabs.js +243 -243
  235. package/dist/components/mg-tabs.js.map +1 -1
  236. package/dist/components/mg-tag.d.ts +2 -2
  237. package/dist/components/mg-tag.js +97 -97
  238. package/dist/components/mg-tag.js.map +1 -1
  239. package/dist/components/mg-tooltip-content.d.ts +2 -2
  240. package/dist/components/mg-tooltip-content2.js +30 -30
  241. package/dist/components/mg-tooltip-content2.js.map +1 -1
  242. package/dist/components/mg-tooltip.d.ts +2 -2
  243. package/dist/components/mg-tooltip2.js +316 -316
  244. package/dist/components/mg-tooltip2.js.map +1 -1
  245. package/dist/esm/{components.utils-6cf27db1.js → components.utils-0d67c31c.js} +102 -100
  246. package/dist/esm/components.utils-0d67c31c.js.map +1 -0
  247. package/dist/esm/{index-0f833068.js → index-f34a3a2c.js} +185 -87
  248. package/dist/esm/index-f34a3a2c.js.map +1 -0
  249. package/dist/esm/loader.js +3 -3
  250. package/dist/esm/mg-action-more_34.entry.js +5140 -5107
  251. package/dist/esm/mg-action-more_34.entry.js.map +1 -1
  252. package/dist/esm/mg-components.js +4 -4
  253. package/dist/esm/mg-components.js.map +1 -1
  254. package/dist/esm/mg-item-more.entry.js +237 -222
  255. package/dist/esm/mg-item-more.entry.js.map +1 -1
  256. package/dist/mg-components/locales/fr/messages.json +4 -4
  257. package/dist/mg-components/mg-components.esm.js +1 -1
  258. package/dist/mg-components/mg-components.esm.js.map +1 -1
  259. package/dist/mg-components/p-7444ff40.js +3 -0
  260. package/dist/mg-components/p-7444ff40.js.map +1 -0
  261. package/dist/mg-components/p-af42d17b.js +2 -0
  262. package/dist/mg-components/p-af42d17b.js.map +1 -0
  263. package/dist/mg-components/p-ce356bc0.entry.js +2 -0
  264. package/dist/mg-components/p-ce356bc0.entry.js.map +1 -0
  265. package/dist/mg-components/p-e591ba8f.entry.js +2 -0
  266. package/dist/mg-components/p-e591ba8f.entry.js.map +1 -0
  267. package/dist/types/assets/icons/index.d.ts +193 -0
  268. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +41 -41
  269. package/dist/types/components/atoms/mg-button/mg-button.d.ts +100 -100
  270. package/dist/types/components/atoms/mg-card/mg-card.d.ts +39 -39
  271. package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +37 -37
  272. package/dist/types/components/atoms/mg-divider/mg-divider.d.ts +12 -12
  273. package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +56 -56
  274. package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +34 -34
  275. package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +51 -51
  276. package/dist/types/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.d.ts +12 -12
  277. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.conf.d.ts +3 -3
  278. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +113 -113
  279. package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +5 -5
  280. package/dist/types/components/molecules/inputs/MgInput.d.ts +16 -16
  281. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +100 -100
  282. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +26 -26
  283. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +262 -262
  284. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.conf.d.ts +4 -4
  285. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +150 -150
  286. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.d.ts +4 -4
  287. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +223 -223
  288. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +142 -142
  289. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.d.ts +3 -3
  290. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +152 -152
  291. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.conf.d.ts +6 -6
  292. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +193 -193
  293. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +195 -195
  294. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +181 -181
  295. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.d.ts +2 -2
  296. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +141 -141
  297. package/dist/types/components/molecules/menu/mg-menu/mg-menu.conf.d.ts +2 -2
  298. package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +97 -97
  299. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.conf.d.ts +6 -6
  300. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +179 -179
  301. package/dist/types/components/molecules/mg-action-more/mg-action-more.conf.d.ts +12 -12
  302. package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +72 -72
  303. package/dist/types/components/molecules/mg-details/mg-details.d.ts +45 -45
  304. package/dist/types/components/molecules/mg-form/mg-form.conf.d.ts +16 -0
  305. package/dist/types/components/molecules/mg-form/mg-form.d.ts +120 -103
  306. package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.d.ts +27 -27
  307. package/dist/types/components/molecules/mg-item-more/mg-item-more.conf.d.ts +5 -5
  308. package/dist/types/components/molecules/mg-item-more/mg-item-more.d.ts +67 -61
  309. package/dist/types/components/molecules/mg-message/mg-message.d.ts +100 -93
  310. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +107 -107
  311. package/dist/types/components/molecules/mg-pagination/mg-pagination.conf.d.ts +2 -2
  312. package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +74 -74
  313. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +149 -149
  314. package/dist/types/components/molecules/mg-popover/mg-popover-content/mg-popover-content.d.ts +43 -43
  315. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +88 -88
  316. package/dist/types/components/molecules/mg-skip-links/mg-skip-links.conf.d.ts +2 -2
  317. package/dist/types/components/molecules/mg-skip-links/mg-skip-links.d.ts +40 -40
  318. package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +10 -10
  319. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +118 -118
  320. package/dist/types/components.d.ts +312 -30
  321. package/dist/types/locales/index.d.ts +172 -172
  322. package/dist/types/stencil-public-runtime.d.ts +29 -0
  323. package/dist/types/utils/behaviors.utils.d.ts +65 -65
  324. package/dist/types/utils/components.utils.d.ts +32 -26
  325. package/dist/types/utils/locale.utils.d.ts +2 -2
  326. package/dist/types/utils/playwright.fixture.d.ts +3 -0
  327. package/dist/types/utils/unit.test.utils.d.ts +5 -5
  328. package/package.json +19 -33
  329. package/dist/cjs/components.utils-69435877.js.map +0 -1
  330. package/dist/cjs/index-60dd0c56.js.map +0 -1
  331. package/dist/collection/components/atoms/mg-badge/test/mg-badge.e2e.playwright.js +0 -33
  332. package/dist/collection/components/atoms/mg-badge/test/mg-badge.e2e.playwright.js.map +0 -1
  333. package/dist/collection/components/atoms/mg-badge/test/mg-badge.spec.js +0 -70
  334. package/dist/collection/components/atoms/mg-badge/test/mg-badge.spec.js.map +0 -1
  335. package/dist/collection/components/atoms/mg-button/test/mg-button.e2e.js +0 -91
  336. package/dist/collection/components/atoms/mg-button/test/mg-button.e2e.js.map +0 -1
  337. package/dist/collection/components/atoms/mg-button/test/mg-button.spec.js +0 -192
  338. package/dist/collection/components/atoms/mg-button/test/mg-button.spec.js.map +0 -1
  339. package/dist/collection/components/atoms/mg-card/test/mg-card.e2e.js +0 -36
  340. package/dist/collection/components/atoms/mg-card/test/mg-card.e2e.js.map +0 -1
  341. package/dist/collection/components/atoms/mg-card/test/mg-card.spec.js +0 -43
  342. package/dist/collection/components/atoms/mg-card/test/mg-card.spec.js.map +0 -1
  343. package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.e2e.js +0 -15
  344. package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.e2e.js.map +0 -1
  345. package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.spec.js +0 -42
  346. package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.spec.js.map +0 -1
  347. package/dist/collection/components/atoms/mg-divider/test/mg-divider.e2e.js +0 -11
  348. package/dist/collection/components/atoms/mg-divider/test/mg-divider.e2e.js.map +0 -1
  349. package/dist/collection/components/atoms/mg-divider/test/mg-divider.spec.js +0 -14
  350. package/dist/collection/components/atoms/mg-divider/test/mg-divider.spec.js.map +0 -1
  351. package/dist/collection/components/atoms/mg-icon/test/mg-icon.e2e.js +0 -55
  352. package/dist/collection/components/atoms/mg-icon/test/mg-icon.e2e.js.map +0 -1
  353. package/dist/collection/components/atoms/mg-icon/test/mg-icon.spec.js +0 -84
  354. package/dist/collection/components/atoms/mg-icon/test/mg-icon.spec.js.map +0 -1
  355. package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.e2e.playwright.js +0 -12
  356. package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.e2e.playwright.js.map +0 -1
  357. package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.spec.js +0 -23
  358. package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.spec.js.map +0 -1
  359. package/dist/collection/components/atoms/mg-tag/test/mg-tag.e2e.playwright.js +0 -23
  360. package/dist/collection/components/atoms/mg-tag/test/mg-tag.e2e.playwright.js.map +0 -1
  361. package/dist/collection/components/atoms/mg-tag/test/mg-tag.spec.js +0 -71
  362. package/dist/collection/components/atoms/mg-tag/test/mg-tag.spec.js.map +0 -1
  363. package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.e2e.js +0 -138
  364. package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.e2e.js.map +0 -1
  365. package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.spec.js +0 -272
  366. package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.spec.js.map +0 -1
  367. package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.js +0 -237
  368. package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.js.map +0 -1
  369. package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.spec.js +0 -634
  370. package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.spec.js.map +0 -1
  371. package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.e2e.js +0 -123
  372. package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.e2e.js.map +0 -1
  373. package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.spec.js +0 -383
  374. package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.spec.js.map +0 -1
  375. package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.e2e.js +0 -212
  376. package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.e2e.js.map +0 -1
  377. package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.spec.js +0 -460
  378. package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.spec.js.map +0 -1
  379. package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.e2e.js +0 -115
  380. package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.e2e.js.map +0 -1
  381. package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.spec.js +0 -293
  382. package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.spec.js.map +0 -1
  383. package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.e2e.js +0 -154
  384. package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.e2e.js.map +0 -1
  385. package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.spec.js +0 -359
  386. package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.spec.js.map +0 -1
  387. package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.e2e.js +0 -194
  388. package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.e2e.js.map +0 -1
  389. package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.spec.js +0 -403
  390. package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.spec.js.map +0 -1
  391. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.playwright.js +0 -147
  392. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.playwright.js.map +0 -1
  393. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.spec.js +0 -355
  394. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.spec.js.map +0 -1
  395. package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.e2e.js +0 -129
  396. package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.e2e.js.map +0 -1
  397. package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.spec.js +0 -320
  398. package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.spec.js.map +0 -1
  399. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.e2e.playwright.js +0 -108
  400. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.e2e.playwright.js.map +0 -1
  401. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.spec.js +0 -247
  402. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.spec.js.map +0 -1
  403. package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.e2e.playwright.js +0 -239
  404. package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.e2e.playwright.js.map +0 -1
  405. package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.spec.js +0 -175
  406. package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.spec.js.map +0 -1
  407. package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.e2e.playwright.js +0 -100
  408. package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.e2e.playwright.js.map +0 -1
  409. package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.spec.js +0 -295
  410. package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.spec.js.map +0 -1
  411. package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.e2e.playwright.js +0 -136
  412. package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.e2e.playwright.js.map +0 -1
  413. package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.spec.js +0 -195
  414. package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.spec.js.map +0 -1
  415. package/dist/collection/components/molecules/mg-details/test/mg-details.e2e.playwright.js +0 -30
  416. package/dist/collection/components/molecules/mg-details/test/mg-details.e2e.playwright.js.map +0 -1
  417. package/dist/collection/components/molecules/mg-details/test/mg-details.spec.js +0 -42
  418. package/dist/collection/components/molecules/mg-details/test/mg-details.spec.js.map +0 -1
  419. package/dist/collection/components/molecules/mg-form/test/mg-form.e2e.js +0 -169
  420. package/dist/collection/components/molecules/mg-form/test/mg-form.e2e.js.map +0 -1
  421. package/dist/collection/components/molecules/mg-form/test/mg-form.spec.js +0 -292
  422. package/dist/collection/components/molecules/mg-form/test/mg-form.spec.js.map +0 -1
  423. package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.e2e.js +0 -39
  424. package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.e2e.js.map +0 -1
  425. package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.spec.js +0 -36
  426. package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.spec.js.map +0 -1
  427. package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.e2e.playwright.js +0 -85
  428. package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.e2e.playwright.js.map +0 -1
  429. package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.spec.js +0 -106
  430. package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.spec.js.map +0 -1
  431. package/dist/collection/components/molecules/mg-message/test/mg-message.e2e.js +0 -64
  432. package/dist/collection/components/molecules/mg-message/test/mg-message.e2e.js.map +0 -1
  433. package/dist/collection/components/molecules/mg-message/test/mg-message.spec.js +0 -109
  434. package/dist/collection/components/molecules/mg-message/test/mg-message.spec.js.map +0 -1
  435. package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.playwright.js +0 -62
  436. package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.playwright.js.map +0 -1
  437. package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.template.js +0 -40
  438. package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.template.js.map +0 -1
  439. package/dist/collection/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.js +0 -26
  440. package/dist/collection/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.js.map +0 -1
  441. package/dist/collection/components/molecules/mg-modal/test/mg-modal.spec.js +0 -122
  442. package/dist/collection/components/molecules/mg-modal/test/mg-modal.spec.js.map +0 -1
  443. package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.e2e.playwright.js +0 -57
  444. package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.e2e.playwright.js.map +0 -1
  445. package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.spec.js +0 -121
  446. package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.spec.js.map +0 -1
  447. package/dist/collection/components/molecules/mg-panel/test/mg-panel.e2e.playwright.js +0 -106
  448. package/dist/collection/components/molecules/mg-panel/test/mg-panel.e2e.playwright.js.map +0 -1
  449. package/dist/collection/components/molecules/mg-panel/test/mg-panel.spec.js +0 -213
  450. package/dist/collection/components/molecules/mg-panel/test/mg-panel.spec.js.map +0 -1
  451. package/dist/collection/components/molecules/mg-popover/test/mg-popover.e2e.playwright.js +0 -140
  452. package/dist/collection/components/molecules/mg-popover/test/mg-popover.e2e.playwright.js.map +0 -1
  453. package/dist/collection/components/molecules/mg-popover/test/mg-popover.spec.js +0 -142
  454. package/dist/collection/components/molecules/mg-popover/test/mg-popover.spec.js.map +0 -1
  455. package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.e2e.js +0 -55
  456. package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.e2e.js.map +0 -1
  457. package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.spec.js +0 -55
  458. package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.spec.js.map +0 -1
  459. package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.e2e.playwright.js +0 -76
  460. package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.e2e.playwright.js.map +0 -1
  461. package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.spec.js +0 -332
  462. package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.spec.js.map +0 -1
  463. package/dist/collection/utils/stencil.e2e.test.utils.js +0 -33
  464. package/dist/collection/utils/stencil.e2e.test.utils.js.map +0 -1
  465. package/dist/esm/components.utils-6cf27db1.js.map +0 -1
  466. package/dist/esm/index-0f833068.js.map +0 -1
  467. package/dist/mg-components/p-10ed4425.entry.js +0 -2
  468. package/dist/mg-components/p-10ed4425.entry.js.map +0 -1
  469. package/dist/mg-components/p-36a51c5e.js +0 -2
  470. package/dist/mg-components/p-36a51c5e.js.map +0 -1
  471. package/dist/mg-components/p-91feda5a.entry.js +0 -2
  472. package/dist/mg-components/p-91feda5a.entry.js.map +0 -1
  473. package/dist/mg-components/p-9b12021b.js +0 -3
  474. package/dist/mg-components/p-9b12021b.js.map +0 -1
  475. package/dist/types/components/atoms/mg-badge/test/mg-badge.e2e.playwright.d.ts +0 -1
  476. package/dist/types/components/atoms/mg-input-title/test/mg-input-title.e2e.playwright.d.ts +0 -1
  477. package/dist/types/components/atoms/mg-tag/test/mg-tag.e2e.playwright.d.ts +0 -1
  478. package/dist/types/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.d.ts +0 -1
  479. package/dist/types/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.playwright.d.ts +0 -1
  480. package/dist/types/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.e2e.playwright.d.ts +0 -1
  481. package/dist/types/components/molecules/menu/mg-menu/test/mg-menu.e2e.playwright.d.ts +0 -1
  482. package/dist/types/components/molecules/menu/mg-menu-item/test/mg-menu-item.e2e.playwright.d.ts +0 -1
  483. package/dist/types/components/molecules/mg-action-more/test/mg-action-more.e2e.playwright.d.ts +0 -2
  484. package/dist/types/components/molecules/mg-details/test/mg-details.e2e.playwright.d.ts +0 -1
  485. package/dist/types/components/molecules/mg-item-more/test/mg-item-more.e2e.playwright.d.ts +0 -1
  486. package/dist/types/components/molecules/mg-modal/test/mg-modal.e2e.playwright.d.ts +0 -1
  487. package/dist/types/components/molecules/mg-modal/test/mg-modal.e2e.template.d.ts +0 -12
  488. package/dist/types/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.d.ts +0 -1
  489. package/dist/types/components/molecules/mg-pagination/test/mg-pagination.e2e.playwright.d.ts +0 -1
  490. package/dist/types/components/molecules/mg-panel/test/mg-panel.e2e.playwright.d.ts +0 -1
  491. package/dist/types/components/molecules/mg-popover/test/mg-popover.e2e.playwright.d.ts +0 -1
  492. package/dist/types/components/molecules/mg-tabs/test/mg-tabs.e2e.playwright.d.ts +0 -1
  493. package/dist/types/utils/stencil.e2e.test.utils.d.ts +0 -14
@@ -1 +1 @@
1
- {"file":"mg-input-numeric.js","mappings":";;;;;;;;;AAAA;;;AAGO,MAAM,KAAK,GAAa,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAElE,IAAY,UAKX;AALD,WAAY,UAAU;EACpB,yBAAW,CAAA;EACX,yBAAW,CAAA;EACX,+BAAiB,CAAA;EACjB,mCAAqB,CAAA;AACvB,CAAC,EALW,UAAU,KAAV,UAAU;;ACLtB,MAAM,iBAAiB,GAAG,itLAAitL;;MCa9tLA,gBAAc;;;;;;;;IAkBjB,sBAAiB,GAAG,KAAK,CAAC;;;;IA8R1B,gBAAW,GAAG;;MAEpB,IAAI,CAAC,aAAa,EAAE,CAAC;MACrB,IAAI,IAAI,CAAC,iBAAiB,EAAE;QAC1B,IAAI,CAAC,eAAe,EAAE,CAAC;OACxB;MACD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;KAC/B,CAAC;;;;IAKM,gBAAW,GAAG;MACpB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;KACtB,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["MgInputNumeric"],"sources":["src/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.ts","../styles/dist/components/mg-input-numeric.css?tag=mg-input-numeric&encapsulation=shadow","src/components/molecules/inputs/mg-input-numeric/mg-input-numeric.tsx"],"sourcesContent":["/**\n * List of all possibles types\n */\nexport const types: string[] = ['decimal', 'integer', 'currency'];\n\nexport enum InputError {\n MIN = 'min',\n MAX = 'max',\n MINMAX = 'minMax',\n REQUIRED = 'required',\n}\n",":host{display:block}.mg-c-input__input mg-icon,.mg-c-input__error mg-icon{display:flex}.mg-c-input{display:flex;max-width:100%;min-height:var(--default-size);align-items:flex-start;margin-bottom:var(--mg-inputs-margin-bottom, 0)}.mg-c-input mg-input-title{width:var(--mg-inputs-title-width, auto);flex-shrink:var(--mg-inputs-shrink, 1);margin-top:calc((var(--default-size) - var(--font-size)*var(--line-height))/2);margin-right:var(--mg-inputs-title-horizontal-space, var(--mg-inputs-spacer));text-align:right}.mg-c-input__error{display:inline-block;padding:.3rem .8rem;border-radius:.3rem;margin-top:.2rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}.mg-c-input__input-container{min-height:var(--default-size)}.mg-c-input__input-container>strong{display:inline-block;min-height:var(--font-size);margin-top:calc((var(--default-size) - var(--font-size)*var(--line-height))/2)}.mg-c-input__input-container mg-tooltip{display:inline-flex;width:var(--mg-icon-regular-size);height:var(--mg-icon-regular-size);margin-left:var(--mg-inputs-spacer)}.mg-c-input__input-container .mg-c-input__help-text,.mg-c-input__input-container .mg-c-input__error{font-size:1.2rem;text-align:start}.mg-c-input.mg-c-input--label-on-top{flex-direction:column}.mg-c-input.mg-c-input--label-on-top .mg-c-input__input-container{width:100%}.mg-c-input__title{display:flex;align-items:baseline;margin-bottom:.3rem}.mg-c-input__title mg-input-title{width:auto;flex-shrink:1;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-c-input__title mg-tooltip{margin-top:0}.mg-c-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-c-input__input{display:flex}.mg-c-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size))/2)}.mg-c-input__input.mg-c-input__input--has-error .mg-c-input__box{border-color:hsl(var(--color-danger))}.mg-c-input__input+.mg-c-input__help-text,.mg-c-input__input+.mg-c-input__error{margin-top:.5rem}.mg-c-input__input .mg-c-input__box:disabled,.mg-c-input__input-group--disabled label,.mg-c-input.mg-c-input--toggle-disabled .mg-c-input__input .mg-c-input__button-toggle,.mg-c-input.mg-c-input--checkbox-multi-disabled .mg-c-input__input strong{opacity:var(--mg-disabled-opacity)}.mg-c-input__box{height:var(--default-size);box-sizing:border-box;padding:calc((var(--default-size) - var(--font-size)*var(--line-height))/2) var(--mg-inputs-spacer);border-width:var(--mg-inputs-border-width);border-style:solid;border-color:var(--mg-inputs-color);border-radius:var(--mg-inputs-border-radius);background-color:hsl(var(--color-light));color:hsl(var(--color-dark));font-family:inherit;font-size:var(--font-size);text-align:var(--mg-inputs-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 .6rem hsl(var(--mg-inputs-color-shadow-focus-hsl)/50%)}.mg-c-input__box:disabled{opacity:.3}.mg-c-input.mg-c-input--label-on-top .mg-c-input__box{width:auto;max-width:100%}.mg-c-input.mg-c-input--is-input-group-append{--mg-button-border-radius-top-left: 0;--mg-button-border-radius-bottom-left: 0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:-0.1rem;border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--is-input-group-append.mg-c-input--readonly slot[name=append-input]{display:none}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-button-border-radius-top-right: 0;--mg-button-border-radius-bottom-right: 0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-button-border-right-width: 0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-button-border-radius-top-right: var(--mg-inputs-border-radius);--mg-button-border-radius-bottom-right: var(--mg-inputs-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){padding-top:calc((var(--default-size) - var(--mg-icon-regular-size))/2)}.mg-c-input:not(.mg-c-input--label-on-top) .mg-c-input__box{width:100%;min-width:5rem;max-width:calc(17.7rem + var(--mg-inputs-spacer)*2)}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:space-between}.mg-c-input.mg-c-input--width-full.mg-c-input--label-on-top .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-full .mg-c-input__input-container{width:100%;flex:auto}.mg-c-input.mg-c-input--width-full .mg-c-input__input-container .mg-c-input__box{max-width:100%}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container{width:100%}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container .mg-c-input__input{width:100%;max-width:21rem}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container .mg-c-input__with-character-left{width:100%}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container .mg-c-input__box{min-width:100%;max-width:21rem}.mg-c-input.mg-c-input--width-4 .mg-c-input__input-container .mg-c-input__box{max-width:7rem}.mg-c-input.mg-c-input--width-2 .mg-c-input__input-container .mg-c-input__box{max-width:5rem}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media(prefers-reduced-motion){*{animation:none !important;transition:none !important}}.mg-c-input .mg-c-input__box{text-align:var(--mg-inputs-text-align, right)}/*# sourceMappingURL=mg-input-numeric.css.map */\n","import { Component, Element, Event, h, Prop, EventEmitter, State, Watch, Method } from '@stencil/core';\nimport { MgInput } from '../MgInput';\nimport { Handler, Width } from '../MgInput.conf';\nimport { types, InputError } from './mg-input-numeric.conf';\nimport { ClassList, isValidString } from '../../../../utils/components.utils';\nimport { initLocales } from '../../../../locales/';\nimport { localeCurrency, localeNumber } from '../../../../utils/locale.utils';\n\n@Component({\n tag: 'mg-input-numeric',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-input-numeric.css',\n shadow: true,\n})\nexport class MgInputNumeric {\n /************\n * Internal *\n ************/\n\n // Manage different values\n private storedValue: string;\n private numericValue: number;\n private readonlyValue: string;\n\n // HTML selector\n private input: HTMLInputElement;\n\n // Locales\n private locale: string;\n private messages;\n\n // hasDisplayedError (triggered by blur event)\n private hasDisplayedError = false;\n private handlerInProgress: Handler;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgInputNumericElement;\n\n /**\n * Component value\n */\n @Prop({ mutable: true, reflect: true }) value: string;\n @Watch('value')\n validateValue(newValue: MgInputNumeric['value']): void {\n // has input value is always render as string we get a stringified value or a '' for nullish value, so we test string type\n if (typeof newValue === 'string') {\n // Split number and decimal\n const [integer, decimal = ''] = newValue.replace('-', '').split(/[.,]/);\n // Regex\n const regex = this.type === 'integer' ? /^-?\\d+$/ : /^-?\\d+(?:[.,]\\d*)?$/;\n // Filter input\n if (this.isValidValue(newValue, regex, integer, decimal)) {\n this.storedValue = newValue;\n } else {\n newValue = this.handleInvalidValue();\n }\n // Set value and input value\n this.updateValues(newValue);\n }\n }\n\n /**\n * Identifier is used for the element ID (id is a reserved prop in Stencil.js)\n */\n @Prop() identifier!: string;\n\n /**\n * Input name\n * If not set the value equals the identifier\n */\n @Prop() name: string = this.identifier;\n\n /**\n * Input label\n */\n @Prop() label!: string;\n\n /**\n * Define if label is displayed on top\n */\n @Prop() labelOnTop: boolean;\n\n /**\n * Define if label is visible\n */\n @Prop() labelHide = false;\n\n /**\n * Input placeholder.\n * It should be a word or short phrase that demonstrates the expected type of data, not a replacement for labels or help text.\n */\n @Prop() placeholder: string;\n\n /**\n * Define if input is required\n */\n @Prop() required = false;\n\n /**\n * Define if input is readonly\n */\n @Prop() readonly = false;\n\n /**\n * Define if input is disabled\n */\n @Prop() disabled = false;\n @Watch('required')\n @Watch('readonly')\n @Watch('disabled')\n handleValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void {\n if (this.input !== undefined) {\n this.input[prop] = newValue;\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n this.hasDisplayedError = false;\n }\n }\n }\n\n /**\n * Define input width\n */\n @Prop() mgWidth: Width;\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip: string;\n\n /**\n * Add a help text under the input, usually expected data format and example\n */\n @Prop() helpText: string;\n\n /**\n * Define numeric type\n */\n @Prop() type: string = types[0];\n @Watch('type')\n validateType(newValue: MgInputNumeric['type']): void {\n if (!types.includes(newValue)) {\n throw new Error(`<mg-input-numeric> prop \"type\" must be one of: ${types.join(', ')}`);\n }\n }\n\n /**\n * Define currency\n */\n @Prop() currency = 'USD';\n\n /**\n * Maximum value\n */\n @Prop() max: number;\n\n /**\n * Minimum value\n */\n @Prop() min: number;\n\n /**\n * Override integer length\n * integer is the number before the decimal point\n */\n @Prop() integerLength = 13;\n @Watch('integerLength')\n validateIntegerLength(newValue: MgInputNumeric['integerLength']): void {\n if (newValue < 1) {\n throw new Error(`<mg-input-numeric> prop \"integer-length\" must be a positive number.`);\n }\n }\n\n /**\n * Override decimal length\n * decimal is the number after the decimal point\n */\n @Prop() decimalLength = 2;\n @Watch('decimalLength')\n validateDecimalLength(newValue: MgInputNumeric['decimalLength']): void {\n if (newValue < 1) {\n throw new Error(`<mg-input-numeric> prop \"decimal-length\" must be a positive number, consider using prop \"type\" to \"integer\" instead.`);\n }\n }\n\n /**\n * Define input pattern to validate\n */\n @Prop({ mutable: true }) valid: boolean;\n\n /**\n * Define input pattern error message\n */\n @Prop({ mutable: true }) invalid: boolean;\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-input--numeric']);\n\n /**\n * Error message to display\n */\n @State() errorMessage: string;\n\n /**\n * Define if input has focus\n */\n @State() hasFocus: boolean;\n\n /**\n * Emited event when value change\n */\n @Event({ eventName: 'value-change' }) valueChange: EventEmitter<number>;\n\n /**\n * Emited event when checking validity\n */\n @Event({ eventName: 'input-valid' }) inputValid: EventEmitter<boolean>;\n\n /**\n * Display input error if it exists.\n */\n @Method()\n async displayError(): Promise<void> {\n this.checkValidity();\n this.setErrorMessage();\n this.hasDisplayedError = this.invalid;\n }\n\n /**\n * Set an error and display a custom error message.\n * This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.\n * It must be paired with an error message to display for the given context.\n * When used to set validity to `false`, you should use this method again to reset the validity to `true`.\n * @param valid - value indicating the validity\n * @param errorMessage - the error message to display\n */\n @Method()\n async setError(valid: MgInputNumeric['valid'], errorMessage: string): Promise<void> {\n if (typeof valid !== 'boolean') {\n throw new Error('<mg-input-numeric> method \"setError()\" param \"valid\" must be a boolean');\n } else if (!isValidString(errorMessage)) {\n throw new Error('<mg-input-numeric> method \"setError()\" param \"errorMessage\" must be a string');\n } else {\n this.setValidity(valid);\n this.setErrorMessage(valid ? undefined : errorMessage);\n this.hasDisplayedError = this.invalid;\n }\n }\n\n /**\n * Method to set validity values\n * @param newValue - valid new value\n */\n private setValidity(newValue: MgInputNumeric['valid']) {\n const oldValidValue = this.valid;\n this.valid = newValue;\n this.invalid = !this.valid;\n // We need to send valid event even if it is the same value\n if (this.handlerInProgress === undefined || (this.handlerInProgress === Handler.BLUR && this.valid !== oldValidValue)) this.inputValid.emit(this.valid);\n }\n\n /**\n * Checks if the given value is valid according to the defined rules.\n * @param value - The input value to validate.\n * @param regex - The regular expression for validation.\n * @param integer - The integer part of the value.\n * @param decimal - The decimal part of the value.\n * @returns Returns true if the value is valid, otherwise false.\n */\n private isValidValue(value: string, regex: RegExp, integer: string, decimal: string): boolean {\n return (\n ['', '-'].includes(value) || (regex.exec(value) !== null && integer.length <= this.integerLength && decimal.length <= (this.type === 'integer' ? 0 : this.decimalLength))\n );\n }\n\n /**\n * Handles invalid input values and returns a corrected value.\n * @returns The corrected value.\n */\n private handleInvalidValue(): string | null {\n return this.storedValue ?? null;\n }\n\n /**\n * Updates the component values based on the validated input value.\n * @param newValue - The validated input value.\n */\n private updateValues(newValue: string | null): void {\n this.value = newValue;\n if (this.input !== undefined) this.input.value = this.value;\n\n this.numericValue = !['', null].includes(this.value) ? parseFloat(this.value.replace(',', '.')) : null;\n this.valueChange.emit(this.numericValue);\n\n this.readonlyValue = this.numericValue !== null ? this.formatValue(this.numericValue) : '';\n }\n\n /**\n * Displayed value in input\n * Change on focus/blur\n * @returns display value\n */\n private displayValue(): MgInputNumeric['value'] | MgInputNumeric['readonlyValue'] {\n return this.hasFocus ? this.value : this.readonlyValue;\n }\n\n /**\n * Handle input event\n */\n private handleInput = (): void => {\n // Check validity\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n }\n this.value = this.input.value;\n };\n\n /**\n * Handle focus event\n */\n private handleFocus = (): void => {\n this.hasFocus = true;\n };\n\n /**\n * Handle blur event\n */\n private handleBlur = (): void => {\n if (this.value === '-') this.value = '';\n // Display Error\n this.handlerInProgress = Handler.BLUR;\n this.displayError().finally(() => {\n // reset guard\n this.handlerInProgress = undefined;\n this.hasFocus = false;\n });\n };\n\n /**\n * Check if input is valid\n */\n private checkValidity = (): void => {\n this.setValidity(this.readonly || this.disabled || this.getInputError() === null);\n };\n\n /**\n * Set input error message\n * @param errorMessage - errorMessage override\n */\n private setErrorMessage = (errorMessage?: string): void => {\n // Set error message\n this.errorMessage = undefined;\n if (!this.valid) {\n const inputError = this.getInputError();\n if (errorMessage !== undefined) {\n this.errorMessage = errorMessage;\n } else if (inputError === InputError.REQUIRED) {\n this.errorMessage = this.messages.errors[inputError];\n } else {\n this.errorMessage = this.messages.errors.numeric[inputError].replace('{min}', `${this.formatValue(this.min)}`).replace('{max}', `${this.formatValue(this.max)}`);\n }\n }\n };\n\n /**\n * Get input error code\n * @returns error code\n */\n private getInputError = (): null | InputError => {\n let inputError = null;\n const hasNotEmptyValues = (toControl: unknown[]) => !toControl.some(value => [null, undefined].includes(value));\n\n if (!hasNotEmptyValues([this.input])) return inputError;\n\n // required\n if (!this.input.checkValidity() && this.input.validity.valueMissing) {\n inputError = InputError.REQUIRED;\n }\n // Min & Max\n else if (hasNotEmptyValues([this.min, this.numericValue]) && this.numericValue < this.min && this.max === undefined) {\n // Only a min value is set\n inputError = InputError.MIN;\n } else if (hasNotEmptyValues([this.max, this.numericValue]) && this.numericValue > this.max && this.min === undefined) {\n // Only a max value is set\n inputError = InputError.MAX;\n } else if (hasNotEmptyValues([this.min, this.max, this.numericValue]) && (this.numericValue < this.min || this.numericValue > this.max)) {\n // both min and max values are set\n inputError = InputError.MINMAX;\n }\n return inputError;\n };\n\n /**\n * Format value based on type\n * @param value - value to format\n * @returns formated local value\n */\n private formatValue = (value: number): string => (this.type === 'currency' ? localeCurrency(value, this.locale, this.currency) : localeNumber(value, this.locale));\n\n /**\n * Validate append slot\n */\n private validateAppendSlot = (): void => {\n const slotAppendInput: HTMLSlotElement = this.element.querySelector('[slot=\"append-input\"]');\n if (slotAppendInput !== null) {\n this.classCollection.add(slotAppendInput.nodeName === 'MG-BUTTON' ? 'mg-c-input--is-input-group-append' : 'mg-c-input--is-append-input-slot-content');\n }\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n * @returns timeout\n */\n componentWillLoad(): ReturnType<typeof setTimeout> {\n // Get locales\n const locales = initLocales(this.element);\n this.locale = locales.locale;\n this.messages = locales.messages;\n // Validate component config\n this.validateType(this.type);\n this.validateIntegerLength(this.integerLength);\n this.validateDecimalLength(this.decimalLength);\n // validate value\n this.validateValue(this.value);\n this.validateAppendSlot();\n // Check validity when component is ready\n // return a promise to process action only in the FIRST render().\n // https://stenciljs.com/docs/component-lifecycle#componentwillload\n return setTimeout(() => {\n this.checkValidity();\n }, 0);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <MgInput\n identifier={this.identifier}\n classCollection={this.classCollection}\n ariaDescribedbyIDs={[]}\n label={this.label}\n labelOnTop={this.labelOnTop}\n labelHide={this.labelHide}\n required={this.required}\n readonly={this.readonly}\n mgWidth={this.mgWidth}\n disabled={this.disabled}\n value={this.value}\n readonlyValue={this.readonlyValue}\n tooltip={this.tooltip}\n helpText={this.helpText}\n errorMessage={this.errorMessage}\n isFieldset={false}\n >\n <input\n type=\"text\"\n class=\"mg-c-input__box\"\n value={this.displayValue()}\n id={this.identifier}\n name={this.name}\n placeholder={this.placeholder}\n title={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n aria-invalid={(this.invalid === true).toString()}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n ref={(el: HTMLInputElement) => {\n if (el !== null) this.input = el;\n }}\n />\n <slot name=\"append-input\"></slot>\n </MgInput>\n );\n }\n}\n"],"version":3}
1
+ {"file":"mg-input-numeric.js","mappings":";;;;;;;;;AAAA;;;AAGO,MAAM,KAAK,GAAa,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAElE,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,yBAAW,CAAA;IACX,yBAAW,CAAA;IACX,+BAAiB,CAAA;IACjB,mCAAqB,CAAA;AACvB,CAAC,EALW,UAAU,KAAV,UAAU;;ACLtB,MAAM,iBAAiB,GAAG,itLAAitL;;MCa9tLA,gBAAc;;;;;;;;QAkBjB,sBAAiB,GAAG,KAAK,CAAC;;;;QA8R1B,gBAAW,GAAG;;YAEpB,IAAI,CAAC,aAAa,EAAE,CAAC;YACrB,IAAI,I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I,CAAC,WAAW,EACzB,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,GAAG,EAAE,CAAC,EAAoB;gBACxB,IAAI,EAAE,KAAK,IAAI;oBAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;aAClC,GACD,EACF,YAAM,IAAI,EAAC,cAAc,GAAQ,CACzB,EACV;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["MgInputNumeric"],"sources":["src/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.ts","../styles/dist/components/mg-input-numeric.css?tag=mg-input-numeric&encapsulation=shadow","src/components/molecules/inputs/mg-input-numeric/mg-input-numeric.tsx"],"sourcesContent":["/**\n * List of all possibles types\n */\nexport const types: string[] = ['decimal', 'integer', 'currency'];\n\nexport enum InputError {\n MIN = 'min',\n MAX = 'max',\n MINMAX = 'minMax',\n REQUIRED = 'required',\n}\n",":host{display:block}.mg-c-input__input mg-icon,.mg-c-input__error mg-icon{display:flex}.mg-c-input{display:flex;max-width:100%;min-height:var(--default-size);align-items:flex-start;margin-bottom:var(--mg-inputs-margin-bottom, 0)}.mg-c-input mg-input-title{width:var(--mg-inputs-title-width, auto);flex-shrink:var(--mg-inputs-shrink, 1);margin-top:calc((var(--default-size) - var(--font-size)*var(--line-height))/2);margin-right:var(--mg-inputs-title-horizontal-space, var(--mg-inputs-spacer));text-align:right}.mg-c-input__error{display:inline-block;padding:.3rem .8rem;border-radius:.3rem;margin-top:.2rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}.mg-c-input__input-container{min-height:var(--default-size)}.mg-c-input__input-container>strong{display:inline-block;min-height:var(--font-size);margin-top:calc((var(--default-size) - var(--font-size)*var(--line-height))/2)}.mg-c-input__input-container mg-tooltip{display:inline-flex;width:var(--mg-icon-regular-size);height:var(--mg-icon-regular-size);margin-left:var(--mg-inputs-spacer)}.mg-c-input__input-container .mg-c-input__help-text,.mg-c-input__input-container .mg-c-input__error{font-size:1.2rem;text-align:start}.mg-c-input.mg-c-input--label-on-top{flex-direction:column}.mg-c-input.mg-c-input--label-on-top .mg-c-input__input-container{width:100%}.mg-c-input__title{display:flex;align-items:baseline;margin-bottom:.3rem}.mg-c-input__title mg-input-title{width:auto;flex-shrink:1;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-c-input__title mg-tooltip{margin-top:0}.mg-c-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-c-input__input{display:flex}.mg-c-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size))/2)}.mg-c-input__input.mg-c-input__input--has-error .mg-c-input__box{border-color:hsl(var(--color-danger))}.mg-c-input__input+.mg-c-input__help-text,.mg-c-input__input+.mg-c-input__error{margin-top:.5rem}.mg-c-input__input .mg-c-input__box:disabled,.mg-c-input__input-group--disabled label,.mg-c-input.mg-c-input--toggle-disabled .mg-c-input__input .mg-c-input__button-toggle,.mg-c-input.mg-c-input--checkbox-multi-disabled .mg-c-input__input strong{opacity:var(--mg-disabled-opacity)}.mg-c-input__box{height:var(--default-size);box-sizing:border-box;padding:calc((var(--default-size) - var(--font-size)*var(--line-height))/2) var(--mg-inputs-spacer);border-width:var(--mg-inputs-border-width);border-style:solid;border-color:var(--mg-inputs-color);border-radius:var(--mg-inputs-border-radius);background-color:hsl(var(--color-light));color:hsl(var(--color-dark));font-family:inherit;font-size:var(--font-size);text-align:var(--mg-inputs-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 .6rem hsl(var(--mg-inputs-color-shadow-focus-hsl)/50%)}.mg-c-input__box:disabled{opacity:.3}.mg-c-input.mg-c-input--label-on-top .mg-c-input__box{width:auto;max-width:100%}.mg-c-input.mg-c-input--is-input-group-append{--mg-button-border-radius-top-left: 0;--mg-button-border-radius-bottom-left: 0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:-0.1rem;border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--is-input-group-append.mg-c-input--readonly slot[name=append-input]{display:none}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-button-border-radius-top-right: 0;--mg-button-border-radius-bottom-right: 0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-button-border-right-width: 0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-button-border-radius-top-right: var(--mg-inputs-border-radius);--mg-button-border-radius-bottom-right: var(--mg-inputs-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){padding-top:calc((var(--default-size) - var(--mg-icon-regular-size))/2)}.mg-c-input:not(.mg-c-input--label-on-top) .mg-c-input__box{width:100%;min-width:5rem;max-width:calc(17.7rem + var(--mg-inputs-spacer)*2)}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:space-between}.mg-c-input.mg-c-input--width-full.mg-c-input--label-on-top .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-full .mg-c-input__input-container{width:100%;flex:auto}.mg-c-input.mg-c-input--width-full .mg-c-input__input-container .mg-c-input__box{max-width:100%}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container{width:100%}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container .mg-c-input__input{width:100%;max-width:21rem}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container .mg-c-input__with-character-left{width:100%}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container .mg-c-input__box{min-width:100%;max-width:21rem}.mg-c-input.mg-c-input--width-4 .mg-c-input__input-container .mg-c-input__box{max-width:7rem}.mg-c-input.mg-c-input--width-2 .mg-c-input__input-container .mg-c-input__box{max-width:5rem}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media(prefers-reduced-motion){*{animation:none !important;transition:none !important}}.mg-c-input .mg-c-input__box{text-align:var(--mg-inputs-text-align, right)}/*# sourceMappingURL=mg-input-numeric.css.map */\n","import { Component, Element, Event, h, Prop, EventEmitter, State, Watch, Method } from '@stencil/core';\nimport { MgInput } from '../MgInput';\nimport { Handler, Width } from '../MgInput.conf';\nimport { types, InputError } from './mg-input-numeric.conf';\nimport { ClassList, isValidString } from '../../../../utils/components.utils';\nimport { initLocales } from '../../../../locales/';\nimport { localeCurrency, localeNumber } from '../../../../utils/locale.utils';\n\n@Component({\n tag: 'mg-input-numeric',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-input-numeric.css',\n shadow: true,\n})\nexport class MgInputNumeric {\n /************\n * Internal *\n ************/\n\n // Manage different values\n private storedValue: string;\n private numericValue: number;\n private readonlyValue: string;\n\n // HTML selector\n private input: HTMLInputElement;\n\n // Locales\n private locale: string;\n private messages;\n\n // hasDisplayedError (triggered by blur event)\n private hasDisplayedError = false;\n private handlerInProgress: Handler;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgInputNumericElement;\n\n /**\n * Component value\n */\n @Prop({ mutable: true, reflect: true }) value: string;\n @Watch('value')\n validateValue(newValue: MgInputNumeric['value']): void {\n // has input value is always render as string we get a stringified value or a '' for nullish value, so we test string type\n if (typeof newValue === 'string') {\n // Split number and decimal\n const [integer, decimal = ''] = newValue.replace('-', '').split(/[.,]/);\n // Regex\n const regex = this.type === 'integer' ? /^-?\\d+$/ : /^-?\\d+(?:[.,]\\d*)?$/;\n // Filter input\n if (this.isValidValue(newValue, regex, integer, decimal)) {\n this.storedValue = newValue;\n } else {\n newValue = this.handleInvalidValue();\n }\n // Set value and input value\n this.updateValues(newValue);\n }\n }\n\n /**\n * Identifier is used for the element ID (id is a reserved prop in Stencil.js)\n */\n @Prop() identifier!: string;\n\n /**\n * Input name\n * If not set the value equals the identifier\n */\n @Prop() name: string = this.identifier;\n\n /**\n * Input label\n */\n @Prop() label!: string;\n\n /**\n * Define if label is displayed on top\n */\n @Prop() labelOnTop: boolean;\n\n /**\n * Define if label is visible\n */\n @Prop() labelHide = false;\n\n /**\n * Input placeholder.\n * It should be a word or short phrase that demonstrates the expected type of data, not a replacement for labels or help text.\n */\n @Prop() placeholder: string;\n\n /**\n * Define if input is required\n */\n @Prop() required = false;\n\n /**\n * Define if input is readonly\n */\n @Prop() readonly = false;\n\n /**\n * Define if input is disabled\n */\n @Prop() disabled = false;\n @Watch('required')\n @Watch('readonly')\n @Watch('disabled')\n handleValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void {\n if (this.input !== undefined) {\n this.input[prop] = newValue;\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n this.hasDisplayedError = false;\n }\n }\n }\n\n /**\n * Define input width\n */\n @Prop() mgWidth: Width;\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip: string;\n\n /**\n * Add a help text under the input, usually expected data format and example\n */\n @Prop() helpText: string;\n\n /**\n * Define numeric type\n */\n @Prop() type: string = types[0];\n @Watch('type')\n validateType(newValue: MgInputNumeric['type']): void {\n if (!types.includes(newValue)) {\n throw new Error(`<mg-input-numeric> prop \"type\" must be one of: ${types.join(', ')}`);\n }\n }\n\n /**\n * Define currency\n */\n @Prop() currency = 'USD';\n\n /**\n * Maximum value\n */\n @Prop() max: number;\n\n /**\n * Minimum value\n */\n @Prop() min: number;\n\n /**\n * Override integer length\n * integer is the number before the decimal point\n */\n @Prop() integerLength = 13;\n @Watch('integerLength')\n validateIntegerLength(newValue: MgInputNumeric['integerLength']): void {\n if (newValue < 1) {\n throw new Error(`<mg-input-numeric> prop \"integer-length\" must be a positive number.`);\n }\n }\n\n /**\n * Override decimal length\n * decimal is the number after the decimal point\n */\n @Prop() decimalLength = 2;\n @Watch('decimalLength')\n validateDecimalLength(newValue: MgInputNumeric['decimalLength']): void {\n if (newValue < 1) {\n throw new Error(`<mg-input-numeric> prop \"decimal-length\" must be a positive number, consider using prop \"type\" to \"integer\" instead.`);\n }\n }\n\n /**\n * Define input pattern to validate\n */\n @Prop({ mutable: true }) valid: boolean;\n\n /**\n * Define input pattern error message\n */\n @Prop({ mutable: true }) invalid: boolean;\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-input--numeric']);\n\n /**\n * Error message to display\n */\n @State() errorMessage: string;\n\n /**\n * Define if input has focus\n */\n @State() hasFocus: boolean;\n\n /**\n * Emited event when value change\n */\n @Event({ eventName: 'value-change' }) valueChange: EventEmitter<number>;\n\n /**\n * Emited event when checking validity\n */\n @Event({ eventName: 'input-valid' }) inputValid: EventEmitter<HTMLMgInputNumericElement['valid']>;\n\n /**\n * Display input error if it exists.\n */\n @Method()\n async displayError(): Promise<void> {\n this.checkValidity();\n this.setErrorMessage();\n this.hasDisplayedError = this.invalid;\n }\n\n /**\n * Set an error and display a custom error message.\n * This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.\n * It must be paired with an error message to display for the given context.\n * When used to set validity to `false`, you should use this method again to reset the validity to `true`.\n * @param valid - value indicating the validity\n * @param errorMessage - the error message to display\n */\n @Method()\n async setError(valid: MgInputNumeric['valid'], errorMessage: string): Promise<void> {\n if (typeof valid !== 'boolean') {\n throw new Error('<mg-input-numeric> method \"setError()\" param \"valid\" must be a boolean');\n } else if (!isValidString(errorMessage)) {\n throw new Error('<mg-input-numeric> method \"setError()\" param \"errorMessage\" must be a string');\n } else {\n this.setValidity(valid);\n this.setErrorMessage(valid ? undefined : errorMessage);\n this.hasDisplayedError = this.invalid;\n }\n }\n\n /**\n * Method to set validity values\n * @param newValue - valid new value\n */\n private setValidity(newValue: MgInputNumeric['valid']) {\n const oldValidValue = this.valid;\n this.valid = newValue;\n this.invalid = !this.valid;\n // We need to send valid event even if it is the same value\n if (this.handlerInProgress === undefined || (this.handlerInProgress === Handler.BLUR && this.valid !== oldValidValue)) this.inputValid.emit(this.valid);\n }\n\n /**\n * Checks if the given value is valid according to the defined rules.\n * @param value - The input value to validate.\n * @param regex - The regular expression for validation.\n * @param integer - The integer part of the value.\n * @param decimal - The decimal part of the value.\n * @returns Returns true if the value is valid, otherwise false.\n */\n private isValidValue(value: string, regex: RegExp, integer: string, decimal: string): boolean {\n return (\n ['', '-'].includes(value) || (regex.exec(value) !== null && integer.length <= this.integerLength && decimal.length <= (this.type === 'integer' ? 0 : this.decimalLength))\n );\n }\n\n /**\n * Handles invalid input values and returns a corrected value.\n * @returns The corrected value.\n */\n private handleInvalidValue(): string | null {\n return this.storedValue ?? null;\n }\n\n /**\n * Updates the component values based on the validated input value.\n * @param newValue - The validated input value.\n */\n private updateValues(newValue: string | null): void {\n this.value = newValue;\n if (this.input !== undefined) this.input.value = this.value;\n\n this.numericValue = !['', null].includes(this.value) ? parseFloat(this.value.replace(',', '.')) : null;\n this.valueChange.emit(this.numericValue);\n\n this.readonlyValue = this.numericValue !== null ? this.formatValue(this.numericValue) : '';\n }\n\n /**\n * Displayed value in input\n * Change on focus/blur\n * @returns display value\n */\n private displayValue(): MgInputNumeric['value'] | MgInputNumeric['readonlyValue'] {\n return this.hasFocus ? this.value : this.readonlyValue;\n }\n\n /**\n * Handle input event\n */\n private handleInput = (): void => {\n // Check validity\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n }\n this.value = this.input.value;\n };\n\n /**\n * Handle focus event\n */\n private handleFocus = (): void => {\n this.hasFocus = true;\n };\n\n /**\n * Handle blur event\n */\n private handleBlur = (): void => {\n if (this.value === '-') this.value = '';\n // Display Error\n this.handlerInProgress = Handler.BLUR;\n this.displayError().finally(() => {\n // reset guard\n this.handlerInProgress = undefined;\n this.hasFocus = false;\n });\n };\n\n /**\n * Check if input is valid\n */\n private checkValidity = (): void => {\n this.setValidity(this.readonly || this.disabled || this.getInputError() === null);\n };\n\n /**\n * Set input error message\n * @param errorMessage - errorMessage override\n */\n private setErrorMessage = (errorMessage?: string): void => {\n // Set error message\n this.errorMessage = undefined;\n if (!this.valid) {\n const inputError = this.getInputError();\n if (errorMessage !== undefined) {\n this.errorMessage = errorMessage;\n } else if (inputError === InputError.REQUIRED) {\n this.errorMessage = this.messages.errors[inputError];\n } else {\n this.errorMessage = this.messages.errors.numeric[inputError].replace('{min}', `${this.formatValue(this.min)}`).replace('{max}', `${this.formatValue(this.max)}`);\n }\n }\n };\n\n /**\n * Get input error code\n * @returns error code\n */\n private getInputError = (): null | InputError => {\n let inputError = null;\n const hasNotEmptyValues = (toControl: unknown[]) => !toControl.some(value => [null, undefined].includes(value));\n\n if (!hasNotEmptyValues([this.input])) return inputError;\n\n // required\n if (!this.input.checkValidity() && this.input.validity.valueMissing) {\n inputError = InputError.REQUIRED;\n }\n // Min & Max\n else if (hasNotEmptyValues([this.min, this.numericValue]) && this.numericValue < this.min && this.max === undefined) {\n // Only a min value is set\n inputError = InputError.MIN;\n } else if (hasNotEmptyValues([this.max, this.numericValue]) && this.numericValue > this.max && this.min === undefined) {\n // Only a max value is set\n inputError = InputError.MAX;\n } else if (hasNotEmptyValues([this.min, this.max, this.numericValue]) && (this.numericValue < this.min || this.numericValue > this.max)) {\n // both min and max values are set\n inputError = InputError.MINMAX;\n }\n return inputError;\n };\n\n /**\n * Format value based on type\n * @param value - value to format\n * @returns formated local value\n */\n private formatValue = (value: number): string => (this.type === 'currency' ? localeCurrency(value, this.locale, this.currency) : localeNumber(value, this.locale));\n\n /**\n * Validate append slot\n */\n private validateAppendSlot = (): void => {\n const slotAppendInput: HTMLSlotElement = this.element.querySelector('[slot=\"append-input\"]');\n if (slotAppendInput !== null) {\n this.classCollection.add(slotAppendInput.nodeName === 'MG-BUTTON' ? 'mg-c-input--is-input-group-append' : 'mg-c-input--is-append-input-slot-content');\n }\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n * @returns timeout\n */\n componentWillLoad(): ReturnType<typeof setTimeout> {\n // Get locales\n const locales = initLocales(this.element);\n this.locale = locales.locale;\n this.messages = locales.messages;\n // Validate component config\n this.validateType(this.type);\n this.validateIntegerLength(this.integerLength);\n this.validateDecimalLength(this.decimalLength);\n // validate value\n this.validateValue(this.value);\n this.validateAppendSlot();\n // Check validity when component is ready\n // return a promise to process action only in the FIRST render().\n // https://stenciljs.com/docs/component-lifecycle#componentwillload\n return setTimeout(() => {\n this.checkValidity();\n }, 0);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <MgInput\n identifier={this.identifier}\n classCollection={this.classCollection}\n ariaDescribedbyIDs={[]}\n label={this.label}\n labelOnTop={this.labelOnTop}\n labelHide={this.labelHide}\n required={this.required}\n readonly={this.readonly}\n mgWidth={this.mgWidth}\n disabled={this.disabled}\n value={this.value}\n readonlyValue={this.readonlyValue}\n tooltip={this.tooltip}\n helpText={this.helpText}\n errorMessage={this.errorMessage}\n isFieldset={false}\n >\n <input\n type=\"text\"\n class=\"mg-c-input__box\"\n value={this.displayValue()}\n id={this.identifier}\n name={this.name}\n placeholder={this.placeholder}\n title={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n aria-invalid={(this.invalid === true).toString()}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n ref={(el: HTMLInputElement) => {\n if (el !== null) this.input = el;\n }}\n />\n <slot name=\"append-input\"></slot>\n </MgInput>\n );\n }\n}\n"],"version":3}
@@ -2,8 +2,8 @@ import type { Components, JSX } from "../types/components";
2
2
 
3
3
  interface MgInputPassword extends Components.MgInputPassword, HTMLElement {}
4
4
  export const MgInputPassword: {
5
- prototype: MgInputPassword;
6
- new (): MgInputPassword;
5
+ prototype: MgInputPassword;
6
+ new (): MgInputPassword;
7
7
  };
8
8
  /**
9
9
  * Used to define this component and all nested components recursively.
@@ -10,223 +10,223 @@ import { d as defineCustomElement$2 } from './mg-tooltip-content2.js';
10
10
  const mgInputPasswordCss = ":host{display:block}.mg-c-input__input mg-icon,.mg-c-input__error mg-icon{display:flex}.mg-c-input{display:flex;max-width:100%;min-height:var(--default-size);align-items:flex-start;margin-bottom:var(--mg-inputs-margin-bottom, 0)}.mg-c-input mg-input-title{width:var(--mg-inputs-title-width, auto);flex-shrink:var(--mg-inputs-shrink, 1);margin-top:calc((var(--default-size) - var(--font-size)*var(--line-height))/2);margin-right:var(--mg-inputs-title-horizontal-space, var(--mg-inputs-spacer));text-align:right}.mg-c-input__error{display:inline-block;padding:.3rem .8rem;border-radius:.3rem;margin-top:.2rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}.mg-c-input__input-container{min-height:var(--default-size)}.mg-c-input__input-container>strong{display:inline-block;min-height:var(--font-size);margin-top:calc((var(--default-size) - var(--font-size)*var(--line-height))/2)}.mg-c-input__input-container mg-tooltip{display:inline-flex;width:var(--mg-icon-regular-size);height:var(--mg-icon-regular-size);margin-left:var(--mg-inputs-spacer)}.mg-c-input__input-container .mg-c-input__help-text,.mg-c-input__input-container .mg-c-input__error{font-size:1.2rem;text-align:start}.mg-c-input.mg-c-input--label-on-top{flex-direction:column}.mg-c-input.mg-c-input--label-on-top .mg-c-input__input-container{width:100%}.mg-c-input__title{display:flex;align-items:baseline;margin-bottom:.3rem}.mg-c-input__title mg-input-title{width:auto;flex-shrink:1;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-c-input__title mg-tooltip{margin-top:0}.mg-c-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-c-input__input{display:flex}.mg-c-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size))/2)}.mg-c-input__input.mg-c-input__input--has-error .mg-c-input__box{border-color:hsl(var(--color-danger))}.mg-c-input__input+.mg-c-input__help-text,.mg-c-input__input+.mg-c-input__error{margin-top:.5rem}.mg-c-input__input .mg-c-input__box:disabled,.mg-c-input__input-group--disabled label,.mg-c-input.mg-c-input--toggle-disabled .mg-c-input__input .mg-c-input__button-toggle,.mg-c-input.mg-c-input--checkbox-multi-disabled .mg-c-input__input strong{opacity:var(--mg-disabled-opacity)}.mg-c-input__box{height:var(--default-size);box-sizing:border-box;padding:calc((var(--default-size) - var(--font-size)*var(--line-height))/2) var(--mg-inputs-spacer);border-width:var(--mg-inputs-border-width);border-style:solid;border-color:var(--mg-inputs-color);border-radius:var(--mg-inputs-border-radius);background-color:hsl(var(--color-light));color:hsl(var(--color-dark));font-family:inherit;font-size:var(--font-size);text-align:var(--mg-inputs-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 .6rem hsl(var(--mg-inputs-color-shadow-focus-hsl)/50%)}.mg-c-input__box:disabled{opacity:.3}.mg-c-input.mg-c-input--label-on-top .mg-c-input__box{width:auto;max-width:100%}.mg-c-input.mg-c-input--is-input-group-append{--mg-button-border-radius-top-left:0;--mg-button-border-radius-bottom-left:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:-0.1rem;border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--is-input-group-append.mg-c-input--readonly slot[name=append-input]{display:none}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-button-border-radius-top-right:0;--mg-button-border-radius-bottom-right:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-button-border-right-width:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-button-border-radius-top-right:var(--mg-inputs-border-radius);--mg-button-border-radius-bottom-right:var(--mg-inputs-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){padding-top:calc((var(--default-size) - var(--mg-icon-regular-size))/2)}.mg-c-input:not(.mg-c-input--label-on-top) .mg-c-input__box{width:100%;min-width:5rem;max-width:calc(17.7rem + var(--mg-inputs-spacer)*2)}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:space-between}.mg-c-input.mg-c-input--width-full.mg-c-input--label-on-top .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-full .mg-c-input__input-container{width:100%;flex:auto}.mg-c-input.mg-c-input--width-full .mg-c-input__input-container .mg-c-input__box{max-width:100%}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container{width:100%}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container .mg-c-input__input{width:100%;max-width:21rem}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container .mg-c-input__with-character-left{width:100%}.mg-c-input.mg-c-input--width-16 .mg-c-input__input-container .mg-c-input__box{min-width:100%;max-width:21rem}.mg-c-input.mg-c-input--width-4 .mg-c-input__input-container .mg-c-input__box{max-width:7rem}.mg-c-input.mg-c-input--width-2 .mg-c-input__input-container .mg-c-input__box{max-width:5rem}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}";
11
11
 
12
12
  const MgInputPassword$1 = /*@__PURE__*/ proxyCustomElement(class MgInputPassword extends HTMLElement {
13
- constructor() {
14
- super();
15
- this.__registerHost();
16
- this.__attachShadow();
17
- this.valueChange = createEvent(this, "value-change", 7);
18
- this.inputValid = createEvent(this, "input-valid", 7);
19
- // hasDisplayedError (triggered by blur event)
20
- this.hasDisplayedError = false;
13
+ constructor() {
14
+ super();
15
+ this.__registerHost();
16
+ this.__attachShadow();
17
+ this.valueChange = createEvent(this, "value-change", 7);
18
+ this.inputValid = createEvent(this, "input-valid", 7);
19
+ // hasDisplayedError (triggered by blur event)
20
+ this.hasDisplayedError = false;
21
+ /**
22
+ * Handle input event
23
+ */
24
+ this.handleInput = () => {
25
+ this.checkValidity();
26
+ if (this.hasDisplayedError) {
27
+ this.setErrorMessage();
28
+ }
29
+ this.value = this.input.value;
30
+ };
31
+ /**
32
+ * Handle blur event
33
+ */
34
+ this.handleBlur = () => {
35
+ this.handlerInProgress = Handler.BLUR;
36
+ this.displayError().finally(() => {
37
+ // reset guard
38
+ this.handlerInProgress = undefined;
39
+ });
40
+ };
41
+ /**
42
+ * Check if input is valid
43
+ */
44
+ this.checkValidity = () => {
45
+ var _a;
46
+ this.setValidity(this.readonly || this.disabled || (((_a = this.input) === null || _a === void 0 ? void 0 : _a.checkValidity) !== undefined ? this.input.checkValidity() : true));
47
+ };
48
+ /**
49
+ * Set input error message
50
+ * @param errorMessage - errorMessage override
51
+ */
52
+ this.setErrorMessage = (errorMessage) => {
53
+ // Set error message
54
+ this.errorMessage = undefined;
55
+ if (!this.valid) {
56
+ if (errorMessage !== undefined) {
57
+ this.errorMessage = errorMessage;
58
+ }
59
+ // required
60
+ else if (this.input.validity.valueMissing) {
61
+ this.errorMessage = this.messages.errors.required;
62
+ }
63
+ }
64
+ };
65
+ this.value = undefined;
66
+ this.identifier = undefined;
67
+ this.name = this.identifier;
68
+ this.label = undefined;
69
+ this.labelOnTop = undefined;
70
+ this.labelHide = false;
71
+ this.placeholder = undefined;
72
+ this.required = false;
73
+ this.readonly = false;
74
+ this.disabled = false;
75
+ this.mgWidth = 'full';
76
+ this.tooltip = undefined;
77
+ this.helpText = undefined;
78
+ this.valid = undefined;
79
+ this.invalid = undefined;
80
+ this.classCollection = new ClassList(['mg-c-input--password']);
81
+ this.errorMessage = undefined;
82
+ }
83
+ handleValue(newValue) {
84
+ this.valueChange.emit(newValue);
85
+ }
86
+ handleValidityChange(newValue, _oldValue, prop) {
87
+ if (this.input !== undefined) {
88
+ this.input[prop] = newValue;
89
+ this.checkValidity();
90
+ if (this.hasDisplayedError) {
91
+ this.setErrorMessage();
92
+ this.hasDisplayedError = false;
93
+ }
94
+ }
95
+ }
21
96
  /**
22
- * Handle input event
97
+ * Display input error if it exists.
23
98
  */
24
- this.handleInput = () => {
25
- this.checkValidity();
26
- if (this.hasDisplayedError) {
99
+ async displayError() {
100
+ this.checkValidity();
27
101
  this.setErrorMessage();
28
- }
29
- this.value = this.input.value;
30
- };
31
- /**
32
- * Handle blur event
33
- */
34
- this.handleBlur = () => {
35
- this.handlerInProgress = Handler.BLUR;
36
- this.displayError().finally(() => {
37
- // reset guard
38
- this.handlerInProgress = undefined;
39
- });
40
- };
41
- /**
42
- * Check if input is valid
43
- */
44
- this.checkValidity = () => {
45
- var _a;
46
- this.setValidity(this.readonly || this.disabled || (((_a = this.input) === null || _a === void 0 ? void 0 : _a.checkValidity) !== undefined ? this.input.checkValidity() : true));
47
- };
102
+ this.hasDisplayedError = this.invalid;
103
+ }
48
104
  /**
49
- * Set input error message
50
- * @param errorMessage - errorMessage override
105
+ * Set an error and display a custom error message.
106
+ * This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.
107
+ * It must be paired with an error message to display for the given context.
108
+ * When used to set validity to `false`, you should use this method again to reset the validity to `true`.
109
+ * @param valid - value indicating the validity
110
+ * @param errorMessage - the error message to display
51
111
  */
52
- this.setErrorMessage = (errorMessage) => {
53
- // Set error message
54
- this.errorMessage = undefined;
55
- if (!this.valid) {
56
- if (errorMessage !== undefined) {
57
- this.errorMessage = errorMessage;
112
+ async setError(valid, errorMessage) {
113
+ if (typeof valid !== 'boolean') {
114
+ throw new Error('<mg-input-password> method "setError()" param "valid" must be a boolean');
58
115
  }
59
- // required
60
- else if (this.input.validity.valueMissing) {
61
- this.errorMessage = this.messages.errors.required;
116
+ else if (!isValidString(errorMessage)) {
117
+ throw new Error('<mg-input-password> method "setError()" param "errorMessage" must be a string');
118
+ }
119
+ else {
120
+ this.setValidity(valid);
121
+ this.setErrorMessage(valid ? undefined : errorMessage);
122
+ this.hasDisplayedError = this.invalid;
62
123
  }
63
- }
64
- };
65
- this.value = undefined;
66
- this.identifier = undefined;
67
- this.name = this.identifier;
68
- this.label = undefined;
69
- this.labelOnTop = undefined;
70
- this.labelHide = false;
71
- this.placeholder = undefined;
72
- this.required = false;
73
- this.readonly = false;
74
- this.disabled = false;
75
- this.mgWidth = 'full';
76
- this.tooltip = undefined;
77
- this.helpText = undefined;
78
- this.valid = undefined;
79
- this.invalid = undefined;
80
- this.classCollection = new ClassList(['mg-c-input--password']);
81
- this.errorMessage = undefined;
82
- }
83
- handleValue(newValue) {
84
- this.valueChange.emit(newValue);
85
- }
86
- handleValidityChange(newValue, _oldValue, prop) {
87
- if (this.input !== undefined) {
88
- this.input[prop] = newValue;
89
- this.checkValidity();
90
- if (this.hasDisplayedError) {
91
- this.setErrorMessage();
92
- this.hasDisplayedError = false;
93
- }
94
124
  }
95
- }
96
- /**
97
- * Display input error if it exists.
98
- */
99
- async displayError() {
100
- this.checkValidity();
101
- this.setErrorMessage();
102
- this.hasDisplayedError = this.invalid;
103
- }
104
- /**
105
- * Set an error and display a custom error message.
106
- * This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.
107
- * It must be paired with an error message to display for the given context.
108
- * When used to set validity to `false`, you should use this method again to reset the validity to `true`.
109
- * @param valid - value indicating the validity
110
- * @param errorMessage - the error message to display
111
- */
112
- async setError(valid, errorMessage) {
113
- if (typeof valid !== 'boolean') {
114
- throw new Error('<mg-input-password> method "setError()" param "valid" must be a boolean');
125
+ /**
126
+ * Method to set validity values
127
+ * @param newValue - valid new value
128
+ */
129
+ setValidity(newValue) {
130
+ const oldValidValue = this.valid;
131
+ this.valid = newValue;
132
+ this.invalid = !this.valid;
133
+ // We need to send valid event even if it is the same value
134
+ if (this.handlerInProgress === undefined || (this.handlerInProgress === Handler.BLUR && this.valid !== oldValidValue))
135
+ this.inputValid.emit(this.valid);
115
136
  }
116
- else if (!isValidString(errorMessage)) {
117
- throw new Error('<mg-input-password> method "setError()" param "errorMessage" must be a string');
137
+ /*************
138
+ * Lifecycle *
139
+ *************/
140
+ /**
141
+ * Check if component props are well configured on init
142
+ * @returns timeout
143
+ */
144
+ componentWillLoad() {
145
+ // Get locales
146
+ this.messages = initLocales(this.element).messages;
147
+ // Check validity when component is ready
148
+ // return a promise to process action only in the FIRST render().
149
+ // https://stenciljs.com/docs/component-lifecycle#componentwillload
150
+ return setTimeout(() => {
151
+ this.checkValidity();
152
+ }, 0);
118
153
  }
119
- else {
120
- this.setValidity(valid);
121
- this.setErrorMessage(valid ? undefined : errorMessage);
122
- this.hasDisplayedError = this.invalid;
154
+ /**
155
+ * Render
156
+ * @returns HTML Element
157
+ */
158
+ render() {
159
+ return (h(MgInput, { identifier: this.identifier, classCollection: this.classCollection, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly, mgWidth: this.mgWidth, disabled: this.disabled, value: this.value, readonlyValue: this.value !== undefined ? '•'.repeat(this.value.length) : undefined, tooltip: this.tooltip, helpText: this.helpText, errorMessage: this.errorMessage, isFieldset: false }, h("input", { type: "password", class: "mg-c-input__box", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
160
+ if (el !== null)
161
+ this.input = el;
162
+ } })));
123
163
  }
124
- }
125
- /**
126
- * Method to set validity values
127
- * @param newValue - valid new value
128
- */
129
- setValidity(newValue) {
130
- const oldValidValue = this.valid;
131
- this.valid = newValue;
132
- this.invalid = !this.valid;
133
- // We need to send valid event even if it is the same value
134
- if (this.handlerInProgress === undefined || (this.handlerInProgress === Handler.BLUR && this.valid !== oldValidValue))
135
- this.inputValid.emit(this.valid);
136
- }
137
- /*************
138
- * Lifecycle *
139
- *************/
140
- /**
141
- * Check if component props are well configured on init
142
- * @returns timeout
143
- */
144
- componentWillLoad() {
145
- // Get locales
146
- this.messages = initLocales(this.element).messages;
147
- // Check validity when component is ready
148
- // return a promise to process action only in the FIRST render().
149
- // https://stenciljs.com/docs/component-lifecycle#componentwillload
150
- return setTimeout(() => {
151
- this.checkValidity();
152
- }, 0);
153
- }
154
- /**
155
- * Render
156
- * @returns HTML Element
157
- */
158
- render() {
159
- return (h(MgInput, { identifier: this.identifier, classCollection: this.classCollection, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly, mgWidth: this.mgWidth, disabled: this.disabled, value: this.value, readonlyValue: this.value !== undefined ? '•'.repeat(this.value.length) : undefined, tooltip: this.tooltip, helpText: this.helpText, errorMessage: this.errorMessage, isFieldset: false }, h("input", { type: "password", class: "mg-c-input__box", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
160
- if (el !== null)
161
- this.input = el;
162
- } })));
163
- }
164
- get element() { return this; }
165
- static get watchers() { return {
166
- "value": ["handleValue"],
167
- "required": ["handleValidityChange"],
168
- "readonly": ["handleValidityChange"],
169
- "disabled": ["handleValidityChange"]
170
- }; }
171
- static get style() { return mgInputPasswordCss; }
164
+ get element() { return this; }
165
+ static get watchers() { return {
166
+ "value": ["handleValue"],
167
+ "required": ["handleValidityChange"],
168
+ "readonly": ["handleValidityChange"],
169
+ "disabled": ["handleValidityChange"]
170
+ }; }
171
+ static get style() { return mgInputPasswordCss; }
172
172
  }, [1, "mg-input-password", {
173
- "value": [1537],
174
- "identifier": [1],
175
- "name": [1],
176
- "label": [1],
177
- "labelOnTop": [4, "label-on-top"],
178
- "labelHide": [4, "label-hide"],
179
- "placeholder": [1],
180
- "required": [4],
181
- "readonly": [4],
182
- "disabled": [4],
183
- "mgWidth": [8, "mg-width"],
184
- "tooltip": [1],
185
- "helpText": [1, "help-text"],
186
- "valid": [1028],
187
- "invalid": [1028],
188
- "classCollection": [32],
189
- "errorMessage": [32],
190
- "displayError": [64],
191
- "setError": [64]
192
- }, undefined, {
193
- "value": ["handleValue"],
194
- "required": ["handleValidityChange"],
195
- "readonly": ["handleValidityChange"],
196
- "disabled": ["handleValidityChange"]
197
- }]);
173
+ "value": [1537],
174
+ "identifier": [1],
175
+ "name": [1],
176
+ "label": [1],
177
+ "labelOnTop": [4, "label-on-top"],
178
+ "labelHide": [4, "label-hide"],
179
+ "placeholder": [1],
180
+ "required": [4],
181
+ "readonly": [4],
182
+ "disabled": [4],
183
+ "mgWidth": [8, "mg-width"],
184
+ "tooltip": [1],
185
+ "helpText": [1, "help-text"],
186
+ "valid": [1028],
187
+ "invalid": [1028],
188
+ "classCollection": [32],
189
+ "errorMessage": [32],
190
+ "displayError": [64],
191
+ "setError": [64]
192
+ }, undefined, {
193
+ "value": ["handleValue"],
194
+ "required": ["handleValidityChange"],
195
+ "readonly": ["handleValidityChange"],
196
+ "disabled": ["handleValidityChange"]
197
+ }]);
198
198
  function defineCustomElement$1() {
199
- if (typeof customElements === "undefined") {
200
- return;
201
- }
202
- const components = ["mg-input-password", "mg-icon", "mg-input-title", "mg-tooltip", "mg-tooltip-content"];
203
- components.forEach(tagName => { switch (tagName) {
204
- case "mg-input-password":
205
- if (!customElements.get(tagName)) {
206
- customElements.define(tagName, MgInputPassword$1);
207
- }
208
- break;
209
- case "mg-icon":
210
- if (!customElements.get(tagName)) {
211
- defineCustomElement$5();
212
- }
213
- break;
214
- case "mg-input-title":
215
- if (!customElements.get(tagName)) {
216
- defineCustomElement$4();
217
- }
218
- break;
219
- case "mg-tooltip":
220
- if (!customElements.get(tagName)) {
221
- defineCustomElement$3();
222
- }
223
- break;
224
- case "mg-tooltip-content":
225
- if (!customElements.get(tagName)) {
226
- defineCustomElement$2();
227
- }
228
- break;
229
- } });
199
+ if (typeof customElements === "undefined") {
200
+ return;
201
+ }
202
+ const components = ["mg-input-password", "mg-icon", "mg-input-title", "mg-tooltip", "mg-tooltip-content"];
203
+ components.forEach(tagName => { switch (tagName) {
204
+ case "mg-input-password":
205
+ if (!customElements.get(tagName)) {
206
+ customElements.define(tagName, MgInputPassword$1);
207
+ }
208
+ break;
209
+ case "mg-icon":
210
+ if (!customElements.get(tagName)) {
211
+ defineCustomElement$5();
212
+ }
213
+ break;
214
+ case "mg-input-title":
215
+ if (!customElements.get(tagName)) {
216
+ defineCustomElement$4();
217
+ }
218
+ break;
219
+ case "mg-tooltip":
220
+ if (!customElements.get(tagName)) {
221
+ defineCustomElement$3();
222
+ }
223
+ break;
224
+ case "mg-tooltip-content":
225
+ if (!customElements.get(tagName)) {
226
+ defineCustomElement$2();
227
+ }
228
+ break;
229
+ } });
230
230
  }
231
231
  defineCustomElement$1();
232
232