@mgdis/mg-components 5.19.2 → 5.20.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 (496) hide show
  1. package/dist/cjs/{components.utils-dc9c8a53.js → components.utils-cd908d4e.js} +102 -99
  2. package/dist/cjs/components.utils-cd908d4e.js.map +1 -0
  3. package/dist/cjs/{index-c042e24b.js → index-8532b5e9.js} +320 -137
  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 +5130 -5057
  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 +224 -224
  11. package/dist/cjs/mg-item-more.cjs.entry.js.map +1 -1
  12. package/dist/collection/assets/icons/index.js +193 -183
  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 -347
  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 +8 -0
  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 +789 -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 +589 -572
  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 +779 -767
  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 +537 -520
  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 +566 -550
  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 +701 -689
  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.conf.js +0 -4
  64. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.conf.js.map +1 -1
  65. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +771 -754
  66. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
  67. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +706 -689
  68. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
  69. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +527 -522
  70. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -1
  71. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js +2 -2
  72. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js.map +1 -1
  73. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +263 -263
  74. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js.map +1 -1
  75. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.conf.js +6 -6
  76. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.conf.js.map +1 -1
  77. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +423 -423
  78. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js.map +1 -1
  79. package/dist/collection/components/molecules/mg-action-more/mg-action-more.conf.js.map +1 -1
  80. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +214 -214
  81. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -1
  82. package/dist/collection/components/molecules/mg-details/mg-details.js +155 -150
  83. package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -1
  84. package/dist/collection/components/molecules/mg-form/mg-form.js +332 -335
  85. package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
  86. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +85 -85
  87. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js.map +1 -1
  88. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +189 -189
  89. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js.map +1 -1
  90. package/dist/collection/components/molecules/mg-message/mg-message.js +325 -304
  91. package/dist/collection/components/molecules/mg-message/mg-message.js.map +1 -1
  92. package/dist/collection/components/molecules/mg-modal/mg-modal.js +317 -317
  93. package/dist/collection/components/molecules/mg-modal/mg-modal.js.map +1 -1
  94. package/dist/collection/components/molecules/mg-pagination/mg-pagination.conf.js +2 -2
  95. package/dist/collection/components/molecules/mg-pagination/mg-pagination.conf.js.map +1 -1
  96. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +216 -216
  97. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js.map +1 -1
  98. package/dist/collection/components/molecules/mg-panel/mg-panel.js +409 -399
  99. package/dist/collection/components/molecules/mg-panel/mg-panel.js.map +1 -1
  100. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +91 -91
  101. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js.map +1 -1
  102. package/dist/collection/components/molecules/mg-popover/mg-popover.js +336 -329
  103. package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
  104. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +94 -94
  105. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js.map +1 -1
  106. package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +4 -4
  107. package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js.map +1 -1
  108. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +348 -343
  109. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js.map +1 -1
  110. package/dist/collection/locales/fr/messages.json +4 -4
  111. package/dist/collection/locales/index.spec.js +20 -20
  112. package/dist/collection/locales/index.spec.js.map +1 -1
  113. package/dist/collection/utils/behaviors.utils.js +127 -127
  114. package/dist/collection/utils/behaviors.utils.js.map +1 -1
  115. package/dist/collection/utils/behaviors.utils.spec.js +42 -42
  116. package/dist/collection/utils/behaviors.utils.spec.js.map +1 -1
  117. package/dist/collection/utils/components.utils.js +77 -75
  118. package/dist/collection/utils/components.utils.js.map +1 -1
  119. package/dist/collection/utils/components.utils.spec.js +150 -135
  120. package/dist/collection/utils/components.utils.spec.js.map +1 -1
  121. package/dist/collection/utils/e2e.test.utils.js +21 -21
  122. package/dist/collection/utils/e2e.test.utils.js.map +1 -1
  123. package/dist/collection/utils/locale.utils.js +17 -17
  124. package/dist/collection/utils/locale.utils.js.map +1 -1
  125. package/dist/collection/utils/locale.utils.spec.js +45 -45
  126. package/dist/collection/utils/locale.utils.spec.js.map +1 -1
  127. package/dist/collection/utils/playwright.e2e.test.utils.js +41 -41
  128. package/dist/collection/utils/playwright.e2e.test.utils.js.map +1 -1
  129. package/dist/collection/utils/playwright.fixture.js +24 -0
  130. package/dist/collection/utils/playwright.fixture.js.map +1 -0
  131. package/dist/collection/utils/unit.test.utils.js +50 -50
  132. package/dist/collection/utils/unit.test.utils.js.map +1 -1
  133. package/dist/components/MgInput.js +105 -97
  134. package/dist/components/MgInput.js.map +1 -1
  135. package/dist/components/components.utils.js +78 -76
  136. package/dist/components/components.utils.js.map +1 -1
  137. package/dist/components/index2.js +21 -21
  138. package/dist/components/index2.js.map +1 -1
  139. package/dist/components/mg-action-more.d.ts +2 -2
  140. package/dist/components/mg-action-more.js +173 -173
  141. package/dist/components/mg-action-more.js.map +1 -1
  142. package/dist/components/mg-badge.d.ts +2 -2
  143. package/dist/components/mg-badge2.js +83 -83
  144. package/dist/components/mg-badge2.js.map +1 -1
  145. package/dist/components/mg-button.d.ts +2 -2
  146. package/dist/components/mg-button2.js +182 -167
  147. package/dist/components/mg-button2.js.map +1 -1
  148. package/dist/components/mg-card.d.ts +2 -2
  149. package/dist/components/mg-card2.js +77 -77
  150. package/dist/components/mg-card2.js.map +1 -1
  151. package/dist/components/mg-character-left.d.ts +2 -2
  152. package/dist/components/mg-character-left2.js +50 -50
  153. package/dist/components/mg-character-left2.js.map +1 -1
  154. package/dist/components/mg-details.d.ts +2 -2
  155. package/dist/components/mg-details.js +69 -69
  156. package/dist/components/mg-details.js.map +1 -1
  157. package/dist/components/mg-divider.d.ts +2 -2
  158. package/dist/components/mg-divider.js +30 -30
  159. package/dist/components/mg-divider.js.map +1 -1
  160. package/dist/components/mg-form.d.ts +2 -2
  161. package/dist/components/mg-form.js +171 -179
  162. package/dist/components/mg-form.js.map +1 -1
  163. package/dist/components/mg-icon.d.ts +2 -2
  164. package/dist/components/mg-icon2.js +327 -309
  165. package/dist/components/mg-icon2.js.map +1 -1
  166. package/dist/components/mg-illustrated-message.d.ts +2 -2
  167. package/dist/components/mg-illustrated-message.js +51 -51
  168. package/dist/components/mg-illustrated-message.js.map +1 -1
  169. package/dist/components/mg-input-checkbox-paginated.d.ts +2 -2
  170. package/dist/components/mg-input-checkbox-paginated2.js +170 -170
  171. package/dist/components/mg-input-checkbox-paginated2.js.map +1 -1
  172. package/dist/components/mg-input-checkbox.d.ts +2 -2
  173. package/dist/components/mg-input-checkbox.js +478 -480
  174. package/dist/components/mg-input-checkbox.js.map +1 -1
  175. package/dist/components/mg-input-date.d.ts +2 -2
  176. package/dist/components/mg-input-date.js +266 -260
  177. package/dist/components/mg-input-date.js.map +1 -1
  178. package/dist/components/mg-input-numeric.d.ts +2 -2
  179. package/dist/components/mg-input-numeric.js +354 -348
  180. package/dist/components/mg-input-numeric.js.map +1 -1
  181. package/dist/components/mg-input-password.d.ts +2 -2
  182. package/dist/components/mg-input-password.js +205 -199
  183. package/dist/components/mg-input-password.js.map +1 -1
  184. package/dist/components/mg-input-radio.d.ts +2 -2
  185. package/dist/components/mg-input-radio.js +236 -231
  186. package/dist/components/mg-input-radio.js.map +1 -1
  187. package/dist/components/mg-input-select.d.ts +2 -2
  188. package/dist/components/mg-input-select2.js +316 -310
  189. package/dist/components/mg-input-select2.js.map +1 -1
  190. package/dist/components/mg-input-text.d.ts +2 -2
  191. package/dist/components/mg-input-text2.js +306 -300
  192. package/dist/components/mg-input-text2.js.map +1 -1
  193. package/dist/components/mg-input-textarea.d.ts +2 -2
  194. package/dist/components/mg-input-textarea.js +277 -271
  195. package/dist/components/mg-input-textarea.js.map +1 -1
  196. package/dist/components/mg-input-title.d.ts +2 -2
  197. package/dist/components/mg-input-title2.js +60 -60
  198. package/dist/components/mg-input-title2.js.map +1 -1
  199. package/dist/components/mg-input-toggle.d.ts +2 -2
  200. package/dist/components/mg-input-toggle.js +251 -251
  201. package/dist/components/mg-input-toggle.js.map +1 -1
  202. package/dist/components/mg-item-more.d.ts +2 -2
  203. package/dist/components/mg-item-more.js +285 -285
  204. package/dist/components/mg-item-more.js.map +1 -1
  205. package/dist/components/mg-menu-item.d.ts +2 -2
  206. package/dist/components/mg-menu-item2.js +345 -345
  207. package/dist/components/mg-menu-item2.js.map +1 -1
  208. package/dist/components/mg-menu.conf.js +2 -2
  209. package/dist/components/mg-menu.conf.js.map +1 -1
  210. package/dist/components/mg-menu.d.ts +2 -2
  211. package/dist/components/mg-menu2.js +176 -176
  212. package/dist/components/mg-menu2.js.map +1 -1
  213. package/dist/components/mg-message.d.ts +2 -2
  214. package/dist/components/mg-message.js +198 -193
  215. package/dist/components/mg-message.js.map +1 -1
  216. package/dist/components/mg-modal.d.ts +2 -2
  217. package/dist/components/mg-modal.js +198 -198
  218. package/dist/components/mg-modal.js.map +1 -1
  219. package/dist/components/mg-pagination.d.ts +2 -2
  220. package/dist/components/mg-pagination2.js +133 -133
  221. package/dist/components/mg-pagination2.js.map +1 -1
  222. package/dist/components/mg-panel.d.ts +2 -2
  223. package/dist/components/mg-panel.js +238 -238
  224. package/dist/components/mg-panel.js.map +1 -1
  225. package/dist/components/mg-popover-content.d.ts +2 -2
  226. package/dist/components/mg-popover-content2.js +70 -70
  227. package/dist/components/mg-popover-content2.js.map +1 -1
  228. package/dist/components/mg-popover.d.ts +2 -2
  229. package/dist/components/mg-popover2.js +224 -222
  230. package/dist/components/mg-popover2.js.map +1 -1
  231. package/dist/components/mg-skip-links.d.ts +2 -2
  232. package/dist/components/mg-skip-links.js +57 -57
  233. package/dist/components/mg-skip-links.js.map +1 -1
  234. package/dist/components/mg-tabs.d.ts +2 -2
  235. package/dist/components/mg-tabs.js +243 -243
  236. package/dist/components/mg-tabs.js.map +1 -1
  237. package/dist/components/mg-tag.d.ts +2 -2
  238. package/dist/components/mg-tag.js +97 -97
  239. package/dist/components/mg-tag.js.map +1 -1
  240. package/dist/components/mg-tooltip-content.d.ts +2 -2
  241. package/dist/components/mg-tooltip-content2.js +30 -30
  242. package/dist/components/mg-tooltip-content2.js.map +1 -1
  243. package/dist/components/mg-tooltip.d.ts +2 -2
  244. package/dist/components/mg-tooltip2.js +316 -316
  245. package/dist/components/mg-tooltip2.js.map +1 -1
  246. package/dist/components/popper.js +6 -12
  247. package/dist/components/popper.js.map +1 -1
  248. package/dist/esm/{components.utils-0f76010d.js → components.utils-0d67c31c.js} +102 -100
  249. package/dist/esm/components.utils-0d67c31c.js.map +1 -0
  250. package/dist/esm/{index-ce01e63b.js → index-f34a3a2c.js} +320 -137
  251. package/dist/esm/index-f34a3a2c.js.map +1 -0
  252. package/dist/esm/loader.js +3 -3
  253. package/dist/esm/mg-action-more_34.entry.js +5130 -5057
  254. package/dist/esm/mg-action-more_34.entry.js.map +1 -1
  255. package/dist/esm/mg-components.js +4 -4
  256. package/dist/esm/mg-components.js.map +1 -1
  257. package/dist/esm/mg-item-more.entry.js +224 -224
  258. package/dist/esm/mg-item-more.entry.js.map +1 -1
  259. package/dist/mg-components/locales/fr/messages.json +4 -4
  260. package/dist/mg-components/mg-components.css +1 -1
  261. package/dist/mg-components/mg-components.esm.js +1 -1
  262. package/dist/mg-components/mg-components.esm.js.map +1 -1
  263. package/dist/mg-components/p-629454f7.entry.js +2 -0
  264. package/dist/mg-components/p-629454f7.entry.js.map +1 -0
  265. package/dist/mg-components/p-7444ff40.js +3 -0
  266. package/dist/mg-components/p-7444ff40.js.map +1 -0
  267. package/dist/mg-components/p-af42d17b.js +2 -0
  268. package/dist/mg-components/p-af42d17b.js.map +1 -0
  269. package/dist/mg-components/{p-01ebc95a.entry.js → p-e0fb0f3c.entry.js} +2 -2
  270. package/dist/mg-components/p-e0fb0f3c.entry.js.map +1 -0
  271. package/dist/types/assets/icons/index.d.ts +193 -0
  272. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +41 -41
  273. package/dist/types/components/atoms/mg-button/mg-button.d.ts +100 -96
  274. package/dist/types/components/atoms/mg-card/mg-card.d.ts +39 -39
  275. package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +37 -37
  276. package/dist/types/components/atoms/mg-divider/mg-divider.d.ts +12 -12
  277. package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +56 -56
  278. package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +34 -34
  279. package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +51 -51
  280. package/dist/types/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.d.ts +12 -12
  281. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.conf.d.ts +3 -3
  282. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +113 -113
  283. package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +10 -3
  284. package/dist/types/components/molecules/inputs/MgInput.d.ts +17 -16
  285. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +100 -100
  286. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +26 -26
  287. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +262 -260
  288. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.conf.d.ts +4 -4
  289. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +150 -149
  290. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.d.ts +4 -4
  291. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +223 -222
  292. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +142 -141
  293. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.d.ts +3 -3
  294. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +152 -151
  295. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.conf.d.ts +6 -6
  296. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +193 -192
  297. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.conf.d.ts +1 -6
  298. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +195 -194
  299. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +181 -180
  300. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.d.ts +2 -2
  301. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +141 -141
  302. package/dist/types/components/molecules/menu/mg-menu/mg-menu.conf.d.ts +2 -2
  303. package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +97 -97
  304. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.conf.d.ts +6 -6
  305. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +179 -179
  306. package/dist/types/components/molecules/mg-action-more/mg-action-more.conf.d.ts +12 -11
  307. package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +72 -72
  308. package/dist/types/components/molecules/mg-details/mg-details.d.ts +45 -45
  309. package/dist/types/components/molecules/mg-form/mg-form.d.ts +103 -104
  310. package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.d.ts +27 -27
  311. package/dist/types/components/molecules/mg-item-more/mg-item-more.conf.d.ts +5 -5
  312. package/dist/types/components/molecules/mg-item-more/mg-item-more.d.ts +61 -61
  313. package/dist/types/components/molecules/mg-message/mg-message.d.ts +100 -93
  314. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +107 -107
  315. package/dist/types/components/molecules/mg-pagination/mg-pagination.conf.d.ts +2 -2
  316. package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +74 -74
  317. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +149 -149
  318. package/dist/types/components/molecules/mg-popover/mg-popover-content/mg-popover-content.d.ts +43 -43
  319. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +88 -88
  320. package/dist/types/components/molecules/mg-skip-links/mg-skip-links.conf.d.ts +2 -2
  321. package/dist/types/components/molecules/mg-skip-links/mg-skip-links.d.ts +40 -40
  322. package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +10 -10
  323. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +118 -118
  324. package/dist/types/components.d.ts +296 -32
  325. package/dist/types/locales/index.d.ts +172 -172
  326. package/dist/types/stencil-public-runtime.d.ts +29 -0
  327. package/dist/types/utils/behaviors.utils.d.ts +65 -65
  328. package/dist/types/utils/components.utils.d.ts +32 -26
  329. package/dist/types/utils/locale.utils.d.ts +2 -2
  330. package/dist/types/utils/playwright.fixture.d.ts +3 -0
  331. package/dist/types/utils/unit.test.utils.d.ts +5 -5
  332. package/package.json +33 -47
  333. package/dist/cjs/components.utils-dc9c8a53.js.map +0 -1
  334. package/dist/cjs/index-c042e24b.js.map +0 -1
  335. package/dist/collection/components/atoms/mg-badge/test/mg-badge.e2e.playwright.js +0 -33
  336. package/dist/collection/components/atoms/mg-badge/test/mg-badge.e2e.playwright.js.map +0 -1
  337. package/dist/collection/components/atoms/mg-badge/test/mg-badge.spec.js +0 -70
  338. package/dist/collection/components/atoms/mg-badge/test/mg-badge.spec.js.map +0 -1
  339. package/dist/collection/components/atoms/mg-button/test/mg-button.e2e.js +0 -91
  340. package/dist/collection/components/atoms/mg-button/test/mg-button.e2e.js.map +0 -1
  341. package/dist/collection/components/atoms/mg-button/test/mg-button.spec.js +0 -142
  342. package/dist/collection/components/atoms/mg-button/test/mg-button.spec.js.map +0 -1
  343. package/dist/collection/components/atoms/mg-card/test/mg-card.e2e.js +0 -36
  344. package/dist/collection/components/atoms/mg-card/test/mg-card.e2e.js.map +0 -1
  345. package/dist/collection/components/atoms/mg-card/test/mg-card.spec.js +0 -43
  346. package/dist/collection/components/atoms/mg-card/test/mg-card.spec.js.map +0 -1
  347. package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.e2e.js +0 -15
  348. package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.e2e.js.map +0 -1
  349. package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.spec.js +0 -42
  350. package/dist/collection/components/atoms/mg-character-left/test/mg-character-left.spec.js.map +0 -1
  351. package/dist/collection/components/atoms/mg-divider/test/mg-divider.e2e.js +0 -11
  352. package/dist/collection/components/atoms/mg-divider/test/mg-divider.e2e.js.map +0 -1
  353. package/dist/collection/components/atoms/mg-divider/test/mg-divider.spec.js +0 -14
  354. package/dist/collection/components/atoms/mg-divider/test/mg-divider.spec.js.map +0 -1
  355. package/dist/collection/components/atoms/mg-icon/test/mg-icon.e2e.js +0 -55
  356. package/dist/collection/components/atoms/mg-icon/test/mg-icon.e2e.js.map +0 -1
  357. package/dist/collection/components/atoms/mg-icon/test/mg-icon.spec.js +0 -84
  358. package/dist/collection/components/atoms/mg-icon/test/mg-icon.spec.js.map +0 -1
  359. package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.e2e.playwright.js +0 -12
  360. package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.e2e.playwright.js.map +0 -1
  361. package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.spec.js +0 -23
  362. package/dist/collection/components/atoms/mg-input-title/test/mg-input-title.spec.js.map +0 -1
  363. package/dist/collection/components/atoms/mg-tag/test/mg-tag.e2e.playwright.js +0 -23
  364. package/dist/collection/components/atoms/mg-tag/test/mg-tag.e2e.playwright.js.map +0 -1
  365. package/dist/collection/components/atoms/mg-tag/test/mg-tag.spec.js +0 -71
  366. package/dist/collection/components/atoms/mg-tag/test/mg-tag.spec.js.map +0 -1
  367. package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.e2e.js +0 -138
  368. package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.e2e.js.map +0 -1
  369. package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.spec.js +0 -272
  370. package/dist/collection/components/atoms/mg-tooltip/test/mg-tooltip.spec.js.map +0 -1
  371. package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.js +0 -237
  372. package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.js.map +0 -1
  373. package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.spec.js +0 -640
  374. package/dist/collection/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.spec.js.map +0 -1
  375. package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.e2e.js +0 -123
  376. package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.e2e.js.map +0 -1
  377. package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.spec.js +0 -379
  378. package/dist/collection/components/molecules/inputs/mg-input-date/test/mg-input-date.spec.js.map +0 -1
  379. package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.e2e.js +0 -212
  380. package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.e2e.js.map +0 -1
  381. package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.spec.js +0 -456
  382. package/dist/collection/components/molecules/inputs/mg-input-numeric/test/mg-input-numeric.spec.js.map +0 -1
  383. package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.e2e.js +0 -115
  384. package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.e2e.js.map +0 -1
  385. package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.spec.js +0 -289
  386. package/dist/collection/components/molecules/inputs/mg-input-password/test/mg-input-password.spec.js.map +0 -1
  387. package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.e2e.js +0 -154
  388. package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.e2e.js.map +0 -1
  389. package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.spec.js +0 -355
  390. package/dist/collection/components/molecules/inputs/mg-input-radio/test/mg-input-radio.spec.js.map +0 -1
  391. package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.e2e.js +0 -194
  392. package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.e2e.js.map +0 -1
  393. package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.spec.js +0 -399
  394. package/dist/collection/components/molecules/inputs/mg-input-select/test/mg-input-select.spec.js.map +0 -1
  395. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.playwright.js +0 -147
  396. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.playwright.js.map +0 -1
  397. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.spec.js +0 -353
  398. package/dist/collection/components/molecules/inputs/mg-input-text/test/mg-input-text.spec.js.map +0 -1
  399. package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.e2e.js +0 -129
  400. package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.e2e.js.map +0 -1
  401. package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.spec.js +0 -318
  402. package/dist/collection/components/molecules/inputs/mg-input-textarea/test/mg-input-textarea.spec.js.map +0 -1
  403. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.e2e.playwright.js +0 -108
  404. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.e2e.playwright.js.map +0 -1
  405. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.spec.js +0 -247
  406. package/dist/collection/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.spec.js.map +0 -1
  407. package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.e2e.playwright.js +0 -239
  408. package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.e2e.playwright.js.map +0 -1
  409. package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.spec.js +0 -175
  410. package/dist/collection/components/molecules/menu/mg-menu/test/mg-menu.spec.js.map +0 -1
  411. package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.e2e.playwright.js +0 -100
  412. package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.e2e.playwright.js.map +0 -1
  413. package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.spec.js +0 -295
  414. package/dist/collection/components/molecules/menu/mg-menu-item/test/mg-menu-item.spec.js.map +0 -1
  415. package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.e2e.playwright.js +0 -128
  416. package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.e2e.playwright.js.map +0 -1
  417. package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.spec.js +0 -187
  418. package/dist/collection/components/molecules/mg-action-more/test/mg-action-more.spec.js.map +0 -1
  419. package/dist/collection/components/molecules/mg-details/test/mg-details.e2e.playwright.js +0 -30
  420. package/dist/collection/components/molecules/mg-details/test/mg-details.e2e.playwright.js.map +0 -1
  421. package/dist/collection/components/molecules/mg-details/test/mg-details.spec.js +0 -42
  422. package/dist/collection/components/molecules/mg-details/test/mg-details.spec.js.map +0 -1
  423. package/dist/collection/components/molecules/mg-form/test/mg-form.e2e.js +0 -169
  424. package/dist/collection/components/molecules/mg-form/test/mg-form.e2e.js.map +0 -1
  425. package/dist/collection/components/molecules/mg-form/test/mg-form.spec.js +0 -277
  426. package/dist/collection/components/molecules/mg-form/test/mg-form.spec.js.map +0 -1
  427. package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.e2e.js +0 -39
  428. package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.e2e.js.map +0 -1
  429. package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.spec.js +0 -36
  430. package/dist/collection/components/molecules/mg-illustrated-message/test/mg-illustrated-message.spec.js.map +0 -1
  431. package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.e2e.playwright.js +0 -85
  432. package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.e2e.playwright.js.map +0 -1
  433. package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.spec.js +0 -106
  434. package/dist/collection/components/molecules/mg-item-more/test/mg-item-more.spec.js.map +0 -1
  435. package/dist/collection/components/molecules/mg-message/test/mg-message.e2e.js +0 -64
  436. package/dist/collection/components/molecules/mg-message/test/mg-message.e2e.js.map +0 -1
  437. package/dist/collection/components/molecules/mg-message/test/mg-message.spec.js +0 -109
  438. package/dist/collection/components/molecules/mg-message/test/mg-message.spec.js.map +0 -1
  439. package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.playwright.js +0 -62
  440. package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.playwright.js.map +0 -1
  441. package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.template.js +0 -40
  442. package/dist/collection/components/molecules/mg-modal/test/mg-modal.e2e.template.js.map +0 -1
  443. package/dist/collection/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.js +0 -26
  444. package/dist/collection/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.js.map +0 -1
  445. package/dist/collection/components/molecules/mg-modal/test/mg-modal.spec.js +0 -122
  446. package/dist/collection/components/molecules/mg-modal/test/mg-modal.spec.js.map +0 -1
  447. package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.e2e.playwright.js +0 -57
  448. package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.e2e.playwright.js.map +0 -1
  449. package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.spec.js +0 -121
  450. package/dist/collection/components/molecules/mg-pagination/test/mg-pagination.spec.js.map +0 -1
  451. package/dist/collection/components/molecules/mg-panel/test/mg-panel.e2e.playwright.js +0 -106
  452. package/dist/collection/components/molecules/mg-panel/test/mg-panel.e2e.playwright.js.map +0 -1
  453. package/dist/collection/components/molecules/mg-panel/test/mg-panel.spec.js +0 -213
  454. package/dist/collection/components/molecules/mg-panel/test/mg-panel.spec.js.map +0 -1
  455. package/dist/collection/components/molecules/mg-popover/test/mg-popover.e2e.playwright.js +0 -140
  456. package/dist/collection/components/molecules/mg-popover/test/mg-popover.e2e.playwright.js.map +0 -1
  457. package/dist/collection/components/molecules/mg-popover/test/mg-popover.spec.js +0 -142
  458. package/dist/collection/components/molecules/mg-popover/test/mg-popover.spec.js.map +0 -1
  459. package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.e2e.js +0 -55
  460. package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.e2e.js.map +0 -1
  461. package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.spec.js +0 -55
  462. package/dist/collection/components/molecules/mg-skip-links/test/mg-skip-links.spec.js.map +0 -1
  463. package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.e2e.playwright.js +0 -76
  464. package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.e2e.playwright.js.map +0 -1
  465. package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.spec.js +0 -332
  466. package/dist/collection/components/molecules/mg-tabs/test/mg-tabs.spec.js.map +0 -1
  467. package/dist/collection/utils/stencil.e2e.test.utils.js +0 -33
  468. package/dist/collection/utils/stencil.e2e.test.utils.js.map +0 -1
  469. package/dist/esm/components.utils-0f76010d.js.map +0 -1
  470. package/dist/esm/index-ce01e63b.js.map +0 -1
  471. package/dist/mg-components/p-01ebc95a.entry.js.map +0 -1
  472. package/dist/mg-components/p-1aa89acf.js +0 -3
  473. package/dist/mg-components/p-1aa89acf.js.map +0 -1
  474. package/dist/mg-components/p-71a5a848.entry.js +0 -2
  475. package/dist/mg-components/p-71a5a848.entry.js.map +0 -1
  476. package/dist/mg-components/p-c9e2c669.js +0 -2
  477. package/dist/mg-components/p-c9e2c669.js.map +0 -1
  478. package/dist/types/components/atoms/mg-badge/test/mg-badge.e2e.playwright.d.ts +0 -1
  479. package/dist/types/components/atoms/mg-input-title/test/mg-input-title.e2e.playwright.d.ts +0 -1
  480. package/dist/types/components/atoms/mg-tag/test/mg-tag.e2e.playwright.d.ts +0 -1
  481. package/dist/types/components/molecules/inputs/mg-input-checkbox/test/mg-input-checkbox.e2e.playwright.d.ts +0 -1
  482. package/dist/types/components/molecules/inputs/mg-input-text/test/mg-input-text.e2e.playwright.d.ts +0 -1
  483. package/dist/types/components/molecules/inputs/mg-input-toggle/test/mg-input-toggle.e2e.playwright.d.ts +0 -1
  484. package/dist/types/components/molecules/menu/mg-menu/test/mg-menu.e2e.playwright.d.ts +0 -1
  485. package/dist/types/components/molecules/menu/mg-menu-item/test/mg-menu-item.e2e.playwright.d.ts +0 -1
  486. package/dist/types/components/molecules/mg-action-more/test/mg-action-more.e2e.playwright.d.ts +0 -2
  487. package/dist/types/components/molecules/mg-details/test/mg-details.e2e.playwright.d.ts +0 -1
  488. package/dist/types/components/molecules/mg-item-more/test/mg-item-more.e2e.playwright.d.ts +0 -1
  489. package/dist/types/components/molecules/mg-modal/test/mg-modal.e2e.playwright.d.ts +0 -1
  490. package/dist/types/components/molecules/mg-modal/test/mg-modal.e2e.template.d.ts +0 -12
  491. package/dist/types/components/molecules/mg-modal/test/mg-modal.firefox.e2e.playwright.d.ts +0 -1
  492. package/dist/types/components/molecules/mg-pagination/test/mg-pagination.e2e.playwright.d.ts +0 -1
  493. package/dist/types/components/molecules/mg-panel/test/mg-panel.e2e.playwright.d.ts +0 -1
  494. package/dist/types/components/molecules/mg-popover/test/mg-popover.e2e.playwright.d.ts +0 -1
  495. package/dist/types/components/molecules/mg-tabs/test/mg-tabs.e2e.playwright.d.ts +0 -1
  496. package/dist/types/utils/stencil.e2e.test.utils.d.ts +0 -14
@@ -1 +1 @@
1
- {"file":"mg-input-textarea.js","mappings":";;;;;;;;;;AAAA,MAAM,kBAAkB,GAAG,i8MAAi8M;;MCW/8MA,iBAAe;;;;;;;;;;;IAMlB,eAAU,GAAG,iBAAiB,CAAC;IAC/B,iCAA4B,GAAG,wCAAwC,CAAC;;IAYxE,sBAAiB,GAAG,KAAK,CAAC;;;;IAuN1B,gBAAW,GAAG;MACpB,IAAI,IAAI,CAAC,iBAAiB,EAAE;QAC1B,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,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,eAAe,CAAC,GAAG,CAAC,IAAI,CAA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Q,kBACT,CAAC,IAAI,CAAC,OAAO,KAAK,IAAI,EAAE,QAAQ,EAAE,EAChD,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,GAAG,EAAE,CAAC,EAAuB;QAC3B,IAAI,EAAE,KAAK,IAAI;UAAE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;OAClC,GACS,EACX,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,SAAS,GAAG,CAAC,KAC9C,yBAAmB,UAAU,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,EAAE,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,GAAsB,CAC7H,CACG,CACE,EACV;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["MgInputTextarea"],"sources":["../styles/dist/components/mg-input-textarea.css?tag=mg-input-textarea&encapsulation=shadow","src/components/molecules/inputs/mg-input-textarea/mg-input-textarea.tsx"],"sourcesContent":[":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-c-input mg-character-left{font-size:1.1rem;opacity:.6}.mg-c-input.mg-c-input--has-display-character-left .mg-c-input__input+.mg-c-input__help-text,.mg-c-input.mg-c-input--has-display-character-left .mg-c-input__input+.mg-c-input__error{margin-top:0}.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__box{display:block;height:auto;resize:none}.mg-c-input__box.mg-c-input__box--resizable{resize:both}.mg-c-input__box.mg-c-input__box--resizable-horizontal{resize:horizontal}.mg-c-input__box.mg-c-input__box--resizable-vertical{resize:vertical}.mg-c-input__with-character-left{width:100%}.mg-c-input__with-character-left mg-character-left{display:block;margin-top:.2rem;text-align:end;visibility:hidden}.mg-c-input.mg-u-is-focused .mg-c-input__with-character-left mg-character-left{visibility:visible}@-moz-document url-prefix(){.mg-c-input__box{overflow-x:hidden}}/*# sourceMappingURL=mg-input-textarea.css.map */\n","import { Component, Element, Event, h, Prop, EventEmitter, State, Method, Watch } from '@stencil/core';\nimport { MgInput } from '../MgInput';\nimport { Width } from '../MgInput.conf';\nimport { ClassList, isValidString } from '../../../../utils/components.utils';\nimport { initLocales } from '../../../../locales';\n\n@Component({\n tag: 'mg-input-textarea',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-input-textarea.css',\n shadow: true,\n})\nexport class MgInputTextarea {\n /************\n * Internal *\n ************/\n\n // Classes\n private classFocus = 'mg-u-is-focused';\n private classHasDisplayCharacterLeft = 'mg-c-input--has-display-character-left';\n\n // IDs\n private characterLeftId;\n\n // HTML selector\n private input: HTMLTextAreaElement;\n\n // Locales\n private messages;\n\n // hasDisplayedError (triggered by blur event)\n private hasDisplayedError = false;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgInputTextareaElement;\n\n /**\n * Component value\n */\n @Prop({ mutable: true, reflect: true }) value: string;\n @Watch('value')\n handleValue(newValue: string): void {\n this.checkValidity();\n this.valueChange.emit(newValue);\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 * Input max length\n */\n @Prop() maxlength = 4000;\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 = 'full';\n\n /**\n * Define input pattern to validate\n */\n @Prop() pattern: string;\n\n /**\n * Define input pattern error message\n */\n @Prop() patternErrorMessage: string;\n @Watch('pattern')\n @Watch('patternErrorMessage')\n validatePattern(newValue: string): void {\n if (newValue !== undefined && !(isValidString(this.pattern) && isValidString(this.patternErrorMessage))) {\n throw new Error('<mg-input-textarea> props \"pattern\" and \"patternErrorMessage\" must be non-empty string and paired.');\n }\n }\n\n /**\n * Define the number of visible text lines for the control\n */\n @Prop() rows = 3;\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip: string;\n\n /**\n * Define if component should display character left\n */\n @Prop() displayCharacterLeft = true;\n @Watch('displayCharacterLeft')\n validateDisplayCharacterLeft(newValue: boolean): void {\n if (newValue) {\n this.classCollection.add(this.classHasDisplayCharacterLeft);\n } else {\n this.classCollection.delete(this.classHasDisplayCharacterLeft);\n }\n }\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 input valid state\n */\n @Prop({ mutable: true }) valid: boolean;\n\n /**\n * Define input invalid state\n */\n @Prop({ mutable: true }) invalid: boolean;\n\n /**\n * Define if input is resizable\n */\n @Prop() resizable: 'none' | 'both' | 'horizontal' | 'vertical' = 'none';\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-input--textarea']);\n\n /**\n * Error message to display\n */\n @State() errorMessage: string;\n\n /**\n * Emited event when value change\n */\n @Event({ eventName: 'value-change' }) valueChange: EventEmitter<string>;\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: MgInputTextarea['valid'], errorMessage: string): Promise<void> {\n if (typeof valid !== 'boolean') {\n throw new Error('<mg-input-textarea> method \"setError()\" param \"valid\" must be a boolean');\n } else if (!isValidString(errorMessage)) {\n throw new Error('<mg-input-textarea> 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: MgInputTextarea['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 this.inputValid.emit(this.valid);\n }\n /**\n * Handle input event\n */\n private handleInput = (): void => {\n if (this.hasDisplayedError) {\n this.checkValidity();\n this.setErrorMessage();\n }\n this.value = this.input.value;\n };\n\n /**\n * Handle focus event\n */\n private handleFocus = (): void => {\n this.classCollection.add(this.classFocus);\n this.classCollection = new ClassList(this.classCollection.classes);\n };\n\n /**\n * Handle blur event\n */\n private handleBlur = (): void => {\n // Manage focus\n this.classCollection.delete(this.classFocus);\n this.classCollection = new ClassList(this.classCollection.classes);\n // Display Error\n this.displayError();\n };\n\n /**\n * Get pattern validity\n * Pattern is not defined on textarea field: https://developer.mozilla.org/fr/docs/Web/HTML/Element/Textarea\n * @returns is pattern valid\n */\n private getPatternValidity = (): boolean => this.pattern === undefined || new RegExp(`^${this.pattern}$`, 'u').test(this.value);\n\n /**\n * Check if input is valid\n */\n private checkValidity = (): void => {\n this.setValidity(this.readonly || this.disabled || (this.input?.checkValidity !== undefined && this.input.checkValidity() && this.getPatternValidity()));\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 // Does not match pattern\n if (!this.valid) {\n if (errorMessage !== undefined) {\n this.errorMessage = errorMessage;\n } else if (!this.getPatternValidity()) {\n this.errorMessage = this.patternErrorMessage;\n }\n // required\n else if (this.input.validity.valueMissing) {\n this.errorMessage = this.messages.errors.required;\n }\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 this.messages = initLocales(this.element).messages;\n this.characterLeftId = `${this.identifier}-character-left`;\n // Validate\n this.validateDisplayCharacterLeft(this.displayCharacterLeft);\n this.validatePattern(this.pattern);\n this.validatePattern(this.patternErrorMessage);\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={[this.characterLeftId]}\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={undefined}\n tooltip={this.tooltip}\n helpText={this.helpText}\n errorMessage={this.errorMessage}\n isFieldset={false}\n >\n <div class=\"mg-c-input__with-character-left\">\n <textarea\n class={{\n 'mg-c-input__box': true,\n 'mg-c-input__box--resizable': this.resizable === 'both',\n 'mg-c-input__box--resizable-horizontal': this.resizable === 'horizontal',\n 'mg-c-input__box--resizable-vertical': this.resizable === 'vertical',\n }}\n value={this.value}\n id={this.identifier}\n name={this.name}\n placeholder={this.placeholder}\n title={this.placeholder}\n rows={this.rows}\n maxlength={this.maxlength}\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: HTMLTextAreaElement) => {\n if (el !== null) this.input = el;\n }}\n ></textarea>\n {this.displayCharacterLeft && this.maxlength > 0 && (\n <mg-character-left identifier={this.characterLeftId} characters={this.value} maxlength={this.maxlength}></mg-character-left>\n )}\n </div>\n </MgInput>\n );\n }\n}\n"],"version":3}
1
+ {"file":"mg-input-textarea.js","mappings":";;;;;;;;;;AAAA,MAAM,kBAAkB,GAAG,i8MAAi8M;;MCW/8MA,iBAAe;;;;;;;;;;;QAMlB,eAA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KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["MgInputTextarea"],"sources":["../styles/dist/components/mg-input-textarea.css?tag=mg-input-textarea&encapsulation=shadow","src/components/molecules/inputs/mg-input-textarea/mg-input-textarea.tsx"],"sourcesContent":[":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-c-input mg-character-left{font-size:1.1rem;opacity:.6}.mg-c-input.mg-c-input--has-display-character-left .mg-c-input__input+.mg-c-input__help-text,.mg-c-input.mg-c-input--has-display-character-left .mg-c-input__input+.mg-c-input__error{margin-top:0}.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__box{display:block;height:auto;resize:none}.mg-c-input__box.mg-c-input__box--resizable{resize:both}.mg-c-input__box.mg-c-input__box--resizable-horizontal{resize:horizontal}.mg-c-input__box.mg-c-input__box--resizable-vertical{resize:vertical}.mg-c-input__with-character-left{width:100%}.mg-c-input__with-character-left mg-character-left{display:block;margin-top:.2rem;text-align:end;visibility:hidden}.mg-c-input.mg-u-is-focused .mg-c-input__with-character-left mg-character-left{visibility:visible}@-moz-document url-prefix(){.mg-c-input__box{overflow-x:hidden}}/*# sourceMappingURL=mg-input-textarea.css.map */\n","import { Component, Element, Event, h, Prop, EventEmitter, State, Method, Watch } from '@stencil/core';\nimport { MgInput } from '../MgInput';\nimport { Handler, Width } from '../MgInput.conf';\nimport { ClassList, isValidString } from '../../../../utils/components.utils';\nimport { initLocales } from '../../../../locales';\n\n@Component({\n tag: 'mg-input-textarea',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-input-textarea.css',\n shadow: true,\n})\nexport class MgInputTextarea {\n /************\n * Internal *\n ************/\n\n // Classes\n private classFocus = 'mg-u-is-focused';\n private classHasDisplayCharacterLeft = 'mg-c-input--has-display-character-left';\n\n // IDs\n private characterLeftId;\n\n // HTML selector\n private input: HTMLTextAreaElement;\n\n // Locales\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: HTMLMgInputTextareaElement;\n\n /**\n * Component value\n */\n @Prop({ mutable: true, reflect: true }) value: string;\n @Watch('value')\n handleValue(newValue: string): void {\n this.checkValidity();\n this.valueChange.emit(newValue);\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 * Input max length\n */\n @Prop() maxlength = 4000;\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 = 'full';\n\n /**\n * Define input pattern to validate\n */\n @Prop() pattern: string;\n\n /**\n * Define input pattern error message\n */\n @Prop() patternErrorMessage: string;\n @Watch('pattern')\n @Watch('patternErrorMessage')\n validatePattern(newValue: string): void {\n if (newValue !== undefined && !(isValidString(this.pattern) && isValidString(this.patternErrorMessage))) {\n throw new Error('<mg-input-textarea> props \"pattern\" and \"patternErrorMessage\" must be non-empty string and paired.');\n }\n }\n\n /**\n * Define the number of visible text lines for the control\n */\n @Prop() rows = 3;\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip: string;\n\n /**\n * Define if component should display character left\n */\n @Prop() displayCharacterLeft = true;\n @Watch('displayCharacterLeft')\n validateDisplayCharacterLeft(newValue: boolean): void {\n if (newValue) {\n this.classCollection.add(this.classHasDisplayCharacterLeft);\n } else {\n this.classCollection.delete(this.classHasDisplayCharacterLeft);\n }\n }\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 input valid state\n */\n @Prop({ mutable: true }) valid: boolean;\n\n /**\n * Define input invalid state\n */\n @Prop({ mutable: true }) invalid: boolean;\n\n /**\n * Define if input is resizable\n */\n @Prop() resizable: 'none' | 'both' | 'horizontal' | 'vertical' = 'none';\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-input--textarea']);\n\n /**\n * Error message to display\n */\n @State() errorMessage: string;\n\n /**\n * Emited event when value change\n */\n @Event({ eventName: 'value-change' }) valueChange: EventEmitter<HTMLMgInputTextareaElement['value']>;\n\n /**\n * Emited event when checking validity\n */\n @Event({ eventName: 'input-valid' }) inputValid: EventEmitter<HTMLMgInputTextareaElement['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: MgInputTextarea['valid'], errorMessage: string): Promise<void> {\n if (typeof valid !== 'boolean') {\n throw new Error('<mg-input-textarea> method \"setError()\" param \"valid\" must be a boolean');\n } else if (!isValidString(errorMessage)) {\n throw new Error('<mg-input-textarea> 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: MgInputTextarea['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 * Handle input event\n */\n private handleInput = (): void => {\n if (this.hasDisplayedError) {\n this.checkValidity();\n this.setErrorMessage();\n }\n this.value = this.input.value;\n };\n\n /**\n * Handle focus event\n */\n private handleFocus = (): void => {\n this.classCollection.add(this.classFocus);\n this.classCollection = new ClassList(this.classCollection.classes);\n };\n\n /**\n * Handle blur event\n */\n private handleBlur = (): void => {\n // Manage focus\n this.classCollection.delete(this.classFocus);\n this.classCollection = new ClassList(this.classCollection.classes);\n // Display Error\n this.handlerInProgress = Handler.BLUR;\n this.displayError().finally(() => {\n // reset guard\n this.handlerInProgress = undefined;\n });\n };\n\n /**\n * Get pattern validity\n * Pattern is not defined on textarea field: https://developer.mozilla.org/fr/docs/Web/HTML/Element/Textarea\n * @returns is pattern valid\n */\n private getPatternValidity = (): boolean => this.pattern === undefined || new RegExp(`^${this.pattern}$`, 'u').test(this.value);\n\n /**\n * Check if input is valid\n */\n private checkValidity = (): void => {\n this.setValidity(this.readonly || this.disabled || (this.input?.checkValidity !== undefined && this.input.checkValidity() && this.getPatternValidity()));\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 // Does not match pattern\n if (!this.valid) {\n if (errorMessage !== undefined) {\n this.errorMessage = errorMessage;\n } else if (!this.getPatternValidity()) {\n this.errorMessage = this.patternErrorMessage;\n }\n // required\n else if (this.input.validity.valueMissing) {\n this.errorMessage = this.messages.errors.required;\n }\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 this.messages = initLocales(this.element).messages;\n this.characterLeftId = `${this.identifier}-character-left`;\n // Validate\n this.validateDisplayCharacterLeft(this.displayCharacterLeft);\n this.validatePattern(this.pattern);\n this.validatePattern(this.patternErrorMessage);\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={[this.characterLeftId]}\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={undefined}\n tooltip={this.tooltip}\n helpText={this.helpText}\n errorMessage={this.errorMessage}\n isFieldset={false}\n >\n <div class=\"mg-c-input__with-character-left\">\n <textarea\n class={{\n 'mg-c-input__box': true,\n 'mg-c-input__box--resizable': this.resizable === 'both',\n 'mg-c-input__box--resizable-horizontal': this.resizable === 'horizontal',\n 'mg-c-input__box--resizable-vertical': this.resizable === 'vertical',\n }}\n value={this.value}\n id={this.identifier}\n name={this.name}\n placeholder={this.placeholder}\n title={this.placeholder}\n rows={this.rows}\n maxlength={this.maxlength}\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: HTMLTextAreaElement) => {\n if (el !== null) this.input = el;\n }}\n ></textarea>\n {this.displayCharacterLeft && this.maxlength > 0 && (\n <mg-character-left identifier={this.characterLeftId} characters={this.value} maxlength={this.maxlength}></mg-character-left>\n )}\n </div>\n </MgInput>\n );\n }\n}\n"],"version":3}
@@ -2,8 +2,8 @@ import type { Components, JSX } from "../types/components";
2
2
 
3
3
  interface MgInputTitle extends Components.MgInputTitle, HTMLElement {}
4
4
  export const MgInputTitle: {
5
- prototype: MgInputTitle;
6
- new (): MgInputTitle;
5
+ prototype: MgInputTitle;
6
+ new (): MgInputTitle;
7
7
  };
8
8
  /**
9
9
  * Used to define this component and all nested components recursively.
@@ -4,69 +4,69 @@ import { i as isValidString } from './components.utils.js';
4
4
  const mgInputTitleCss = ".mg-u-is-asterisk.sc-mg-input-title{color:hsl(var(--color-danger))}legend.mg-c-input-title.sc-mg-input-title{padding-right:0;padding-left:0}.mg-c-input-title__required.sc-mg-input-title{display:var(--mg-input-title-display, unset)}";
5
5
 
6
6
  const MgInputTitle = /*@__PURE__*/ proxyCustomElement(class MgInputTitle extends HTMLElement {
7
- constructor() {
8
- super();
9
- this.__registerHost();
10
- this.identifier = undefined;
11
- this.required = undefined;
12
- this.readonly = undefined;
13
- this.isLegend = false;
14
- this.tagName = 'label';
15
- }
16
- validateIdentifier(newValue) {
17
- if (!isValidString(newValue)) {
18
- throw new Error('<mg-input-title> prop "identifier" is required.');
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.identifier = undefined;
11
+ this.required = undefined;
12
+ this.readonly = undefined;
13
+ this.isLegend = false;
14
+ this.tagName = 'label';
19
15
  }
20
- }
21
- validateIsLegend(newValue) {
22
- this.tagName = newValue ? 'legend' : 'label';
23
- }
24
- /*************
25
- * Lifecycle *
26
- *************/
27
- /**
28
- * Init tag name
29
- */
30
- componentWillLoad() {
31
- this.validateIdentifier(this.identifier);
32
- this.validateIsLegend(this.isLegend);
33
- }
34
- /**
35
- * Render
36
- * @returns HTML element
37
- */
38
- render() {
39
- const TagName = this.readonly ? 'span' : this.tagName;
40
- // \u00A0 represent a &nbsp;
41
- return (h(TagName, { class: "mg-c-input-title", htmlFor: this.isLegend ? undefined : this.identifier }, h("slot", null), this.required && (h("span", { class: "mg-c-input-title__required" }, "\u00A0", h("span", { class: "mg-u-is-asterisk" }, "*")))));
42
- }
43
- static get watchers() { return {
44
- "identifier": ["validateIdentifier"],
45
- "isLegend": ["validateIsLegend"]
46
- }; }
47
- static get style() { return mgInputTitleCss; }
16
+ validateIdentifier(newValue) {
17
+ if (!isValidString(newValue)) {
18
+ throw new Error('<mg-input-title> prop "identifier" is required.');
19
+ }
20
+ }
21
+ validateIsLegend(newValue) {
22
+ this.tagName = newValue ? 'legend' : 'label';
23
+ }
24
+ /*************
25
+ * Lifecycle *
26
+ *************/
27
+ /**
28
+ * Init tag name
29
+ */
30
+ componentWillLoad() {
31
+ this.validateIdentifier(this.identifier);
32
+ this.validateIsLegend(this.isLegend);
33
+ }
34
+ /**
35
+ * Render
36
+ * @returns HTML element
37
+ */
38
+ render() {
39
+ const TagName = this.readonly ? 'span' : this.tagName;
40
+ // \u00A0 represent a &nbsp;
41
+ return (h(TagName, { class: "mg-c-input-title", htmlFor: this.isLegend ? undefined : this.identifier }, h("slot", null), this.required && (h("span", { class: "mg-c-input-title__required" }, "\u00A0", h("span", { class: "mg-u-is-asterisk" }, "*")))));
42
+ }
43
+ static get watchers() { return {
44
+ "identifier": ["validateIdentifier"],
45
+ "isLegend": ["validateIsLegend"]
46
+ }; }
47
+ static get style() { return mgInputTitleCss; }
48
48
  }, [6, "mg-input-title", {
49
- "identifier": [1],
50
- "required": [4],
51
- "readonly": [4],
52
- "isLegend": [4, "is-legend"],
53
- "tagName": [32]
54
- }, undefined, {
55
- "identifier": ["validateIdentifier"],
56
- "isLegend": ["validateIsLegend"]
57
- }]);
49
+ "identifier": [1],
50
+ "required": [4],
51
+ "readonly": [4],
52
+ "isLegend": [4, "is-legend"],
53
+ "tagName": [32]
54
+ }, undefined, {
55
+ "identifier": ["validateIdentifier"],
56
+ "isLegend": ["validateIsLegend"]
57
+ }]);
58
58
  function defineCustomElement() {
59
- if (typeof customElements === "undefined") {
60
- return;
61
- }
62
- const components = ["mg-input-title"];
63
- components.forEach(tagName => { switch (tagName) {
64
- case "mg-input-title":
65
- if (!customElements.get(tagName)) {
66
- customElements.define(tagName, MgInputTitle);
67
- }
68
- break;
69
- } });
59
+ if (typeof customElements === "undefined") {
60
+ return;
61
+ }
62
+ const components = ["mg-input-title"];
63
+ components.forEach(tagName => { switch (tagName) {
64
+ case "mg-input-title":
65
+ if (!customElements.get(tagName)) {
66
+ customElements.define(tagName, MgInputTitle);
67
+ }
68
+ break;
69
+ } });
70
70
  }
71
71
  defineCustomElement();
72
72
 
@@ -1 +1 @@
1
- {"file":"mg-input-title2.js","mappings":";;;AAAA,MAAM,eAAe,GAAG,yOAAyO;;MCQpP,YAAY;;;;;;;oBAyBJ,KAAK;mBASL,OAAO;;EA5B1B,kBAAkB,CAAC,QAAoC;IACrD,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE;MAC5B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;KACpE;GACF;EAiBD,gBAAgB,CAAC,QAAkC;IACjD,IAAI,CAAC,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;GAC9C;;;;;;;EAcD,iBAAiB;IACf,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACzC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;GACtC;;;;;EAMD,MAAM;IACJ,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;;IAEtD,QACE,EAAC,OAAO,IAAC,KAAK,EAAC,kBAAkB,EAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC,UAAU,IACpF,eAAa,EACZ,IAAI,CAAC,QAAQ,KACZ,YAAM,KAAK,EAAC,4BAA4B,cAChC,YAAM,KAAK,EAAC,kBAAkB,QAAS,CACxC,CACR,CACO,EACV;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["../styles/dist/components/mg-input-title.css?tag=mg-input-title&encapsulation=scoped","src/components/atoms/mg-input-title/mg-input-title.tsx"],"sourcesContent":[".mg-u-is-asterisk{color:hsl(var(--color-danger))}legend.mg-c-input-title{padding-right:0;padding-left:0}.mg-c-input-title__required{display:var(--mg-input-title-display, unset)}/*# sourceMappingURL=mg-input-title.css.map */\n","import { Component, h, Prop, State, Watch } from '@stencil/core';\nimport { isValidString } from '../../../utils/components.utils';\n\n@Component({\n tag: 'mg-input-title',\n styleUrl: '../../../../node_modules/@mgdis/styles/dist/components/mg-input-title.css',\n scoped: true,\n})\nexport class MgInputTitle {\n /**\n * Label input id\n */\n @Prop() identifier!: string;\n @Watch('identifier')\n validateIdentifier(newValue: MgInputTitle['identifier']): void {\n if (!isValidString(newValue)) {\n throw new Error('<mg-input-title> prop \"identifier\" is required.');\n }\n }\n\n /**\n * If input is required an asterisk is added at the end of the label\n */\n @Prop() required: boolean;\n\n /**\n * If input is required an asterisk is added at the end of the label\n */\n @Prop() readonly: boolean;\n\n /**\n * Switch from label to fieldset sementic\n */\n @Prop() isLegend = false;\n @Watch('isLegend')\n validateIsLegend(newValue: MgInputTitle['isLegend']) {\n this.tagName = newValue ? 'legend' : 'label';\n }\n\n /**\n * Component parent tagname\n */\n @State() tagName = 'label';\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Init tag name\n */\n componentWillLoad(): void {\n this.validateIdentifier(this.identifier);\n this.validateIsLegend(this.isLegend);\n }\n\n /**\n * Render\n * @returns HTML element\n */\n render(): HTMLElement {\n const TagName = this.readonly ? 'span' : this.tagName;\n // \\u00A0 represent a &nbsp;\n return (\n <TagName class=\"mg-c-input-title\" htmlFor={this.isLegend ? undefined : this.identifier}>\n <slot></slot>\n {this.required && (\n <span class=\"mg-c-input-title__required\">\n &nbsp;<span class=\"mg-u-is-asterisk\">*</span>\n </span>\n )}\n </TagName>\n );\n }\n}\n"],"version":3}
1
+ {"file":"mg-input-title2.js","mappings":";;;AAAA,MAAM,eAAe,GAAG,yOAAyO;;MCQpP,YAAY;;;;;;;wBAyBJ,KAAK;uBASL,OAAO;;IA5B1B,kBAAkB,CAAC,QAAoC;QACrD,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;SACpE;KACF;IAiBD,gBAAgB,CAAC,QAAkC;QACjD,IAAI,CAAC,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;KAC9C;;;;;;;IAcD,iBAAiB;QACf,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACzC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACtC;;;;;IAMD,MAAM;QACJ,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;;QAEtD,QACE,EAAC,OAAO,IAAC,KAAK,EAAC,kBAAkB,EAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC,UAAU,IACpF,eAAa,EACZ,IAAI,CAAC,QAAQ,KACZ,YAAM,KAAK,EAAC,4BAA4B,cAChC,YAAM,KAAK,EAAC,kBAAkB,QAAS,CACxC,CACR,CACO,EACV;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["../styles/dist/components/mg-input-title.css?tag=mg-input-title&encapsulation=scoped","src/components/atoms/mg-input-title/mg-input-title.tsx"],"sourcesContent":[".mg-u-is-asterisk{color:hsl(var(--color-danger))}legend.mg-c-input-title{padding-right:0;padding-left:0}.mg-c-input-title__required{display:var(--mg-input-title-display, unset)}/*# sourceMappingURL=mg-input-title.css.map */\n","import { Component, h, Prop, State, Watch } from '@stencil/core';\nimport { isValidString } from '../../../utils/components.utils';\n\n@Component({\n tag: 'mg-input-title',\n styleUrl: '../../../../node_modules/@mgdis/styles/dist/components/mg-input-title.css',\n scoped: true,\n})\nexport class MgInputTitle {\n /**\n * Label input id\n */\n @Prop() identifier!: string;\n @Watch('identifier')\n validateIdentifier(newValue: MgInputTitle['identifier']): void {\n if (!isValidString(newValue)) {\n throw new Error('<mg-input-title> prop \"identifier\" is required.');\n }\n }\n\n /**\n * If input is required an asterisk is added at the end of the label\n */\n @Prop() required: boolean;\n\n /**\n * If input is required an asterisk is added at the end of the label\n */\n @Prop() readonly: boolean;\n\n /**\n * Switch from label to fieldset sementic\n */\n @Prop() isLegend = false;\n @Watch('isLegend')\n validateIsLegend(newValue: MgInputTitle['isLegend']) {\n this.tagName = newValue ? 'legend' : 'label';\n }\n\n /**\n * Component parent tagname\n */\n @State() tagName = 'label';\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Init tag name\n */\n componentWillLoad(): void {\n this.validateIdentifier(this.identifier);\n this.validateIsLegend(this.isLegend);\n }\n\n /**\n * Render\n * @returns HTML element\n */\n render(): HTMLElement {\n const TagName = this.readonly ? 'span' : this.tagName;\n // \\u00A0 represent a &nbsp;\n return (\n <TagName class=\"mg-c-input-title\" htmlFor={this.isLegend ? undefined : this.identifier}>\n <slot></slot>\n {this.required && (\n <span class=\"mg-c-input-title__required\">\n &nbsp;<span class=\"mg-u-is-asterisk\">*</span>\n </span>\n )}\n </TagName>\n );\n }\n}\n"],"version":3}
@@ -2,8 +2,8 @@ import type { Components, JSX } from "../types/components";
2
2
 
3
3
  interface MgInputToggle extends Components.MgInputToggle, HTMLElement {}
4
4
  export const MgInputToggle: {
5
- prototype: MgInputToggle;
6
- new (): MgInputToggle;
5
+ prototype: MgInputToggle;
6
+ new (): MgInputToggle;
7
7
  };
8
8
  /**
9
9
  * Used to define this component and all nested components recursively.