@mgdis/mg-components 5.26.0 → 5.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/dist/cjs/{index-c585c382.js → index-4b43c17b.js} +97 -81
  2. package/dist/cjs/index-4b43c17b.js.map +1 -0
  3. package/dist/cjs/{index-0a2783ee.js → index-83102ab3.js} +23 -10
  4. package/dist/cjs/index-83102ab3.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/{mg-action-more_34.cjs.entry.js → mg-action-more_36.cjs.entry.js} +995 -742
  7. package/dist/cjs/mg-action-more_36.cjs.entry.js.map +1 -0
  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-loader.cjs.entry.js +3 -3
  11. package/dist/cjs/mg-loader.cjs.entry.js.map +1 -1
  12. package/dist/collection/assets/icons/index.js +1 -206
  13. package/dist/collection/assets/icons/index.js.map +1 -1
  14. package/dist/collection/collection-manifest.json +4 -3
  15. package/dist/collection/components/atoms/mg-badge/mg-badge.js +2 -2
  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 +9 -6
  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 +5 -2
  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 +2 -2
  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 +1 -1
  24. package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js.map +1 -1
  25. package/dist/collection/components/atoms/mg-icon/mg-icon.js +13 -8
  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 +6 -3
  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 +6 -3
  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 +4 -1
  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 +1 -0
  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 +13 -3
  36. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
  37. package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js +21 -0
  38. package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js.map +1 -0
  39. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +515 -0
  40. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js.map +1 -0
  41. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +1 -5
  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 +7 -7
  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.map +1 -1
  46. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +67 -45
  47. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -1
  48. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js +1 -0
  49. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js.map +1 -1
  50. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +71 -22
  51. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -1
  52. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +52 -19
  53. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
  54. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +54 -15
  55. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -1
  56. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +40 -8
  57. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +1 -1
  58. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +44 -13
  59. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
  60. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +72 -24
  61. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
  62. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +47 -15
  63. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
  64. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +34 -21
  65. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -1
  66. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +26 -24
  67. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js.map +1 -1
  68. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.conf.js +4 -0
  69. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.conf.js.map +1 -1
  70. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +76 -9
  71. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js.map +1 -1
  72. package/dist/collection/components/molecules/mg-action-more/mg-action-more.conf.js.map +1 -1
  73. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +41 -41
  74. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -1
  75. package/dist/collection/components/molecules/mg-details/mg-details.js +5 -1
  76. package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -1
  77. package/dist/collection/components/molecules/mg-form/mg-form.js +8 -4
  78. package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
  79. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +8 -3
  80. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js.map +1 -1
  81. package/dist/collection/components/molecules/mg-item-more/mg-item-more.conf.js.map +1 -1
  82. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +20 -13
  83. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js.map +1 -1
  84. package/dist/collection/components/molecules/mg-loader/mg-loader.js +3 -3
  85. package/dist/collection/components/molecules/mg-loader/mg-loader.js.map +1 -1
  86. package/dist/collection/components/molecules/mg-message/mg-message.js +7 -3
  87. package/dist/collection/components/molecules/mg-message/mg-message.js.map +1 -1
  88. package/dist/collection/components/molecules/mg-modal/mg-modal.js +6 -2
  89. package/dist/collection/components/molecules/mg-modal/mg-modal.js.map +1 -1
  90. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +4 -4
  91. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js.map +1 -1
  92. package/dist/collection/components/molecules/mg-panel/mg-panel.js +8 -4
  93. package/dist/collection/components/molecules/mg-panel/mg-panel.js.map +1 -1
  94. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +4 -1
  95. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js.map +1 -1
  96. package/dist/collection/components/molecules/mg-popover/mg-popover.js +6 -2
  97. package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
  98. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
  99. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +4 -1
  100. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js.map +1 -1
  101. package/dist/collection/locales/en/messages.json +10 -3
  102. package/dist/collection/locales/fr/messages.json +10 -3
  103. package/dist/collection/locales/index.conf.js +2 -0
  104. package/dist/collection/locales/index.conf.js.map +1 -0
  105. package/dist/collection/utils/playwright.fixture.js +1 -1
  106. package/dist/collection/utils/playwright.fixture.js.map +1 -1
  107. package/dist/components/index.es.js +24 -24
  108. package/dist/components/index.es.js.map +1 -1
  109. package/dist/components/index2.js +24 -8
  110. package/dist/components/index2.js.map +1 -1
  111. package/dist/components/mg-action-more.js +29 -25
  112. package/dist/components/mg-action-more.js.map +1 -1
  113. package/dist/components/mg-badge2.js +1 -1
  114. package/dist/components/mg-badge2.js.map +1 -1
  115. package/dist/components/mg-button2.js +1 -1
  116. package/dist/components/mg-button2.js.map +1 -1
  117. package/dist/components/mg-card2.js +2 -2
  118. package/dist/components/mg-card2.js.map +1 -1
  119. package/dist/components/mg-character-left2.js +1 -1
  120. package/dist/components/mg-character-left2.js.map +1 -1
  121. package/dist/components/mg-details.js +1 -1
  122. package/dist/components/mg-details.js.map +1 -1
  123. package/dist/components/mg-divider.js +1 -1
  124. package/dist/components/mg-form.js +1 -1
  125. package/dist/components/mg-form.js.map +1 -1
  126. package/dist/components/mg-icon2.js +4 -416
  127. package/dist/components/mg-icon2.js.map +1 -1
  128. package/dist/components/mg-illustrated-message.js +3 -3
  129. package/dist/components/mg-illustrated-message.js.map +1 -1
  130. package/dist/components/mg-input-checkbox-paginated2.js +13 -11
  131. package/dist/components/mg-input-checkbox-paginated2.js.map +1 -1
  132. package/dist/components/mg-input-checkbox.js +71 -49
  133. package/dist/components/mg-input-checkbox.js.map +1 -1
  134. package/dist/components/mg-input-date.js +69 -20
  135. package/dist/components/mg-input-date.js.map +1 -1
  136. package/dist/components/mg-input-numeric.js +42 -13
  137. package/dist/components/mg-input-numeric.js.map +1 -1
  138. package/dist/components/mg-input-password.js +56 -12
  139. package/dist/components/mg-input-password.js.map +1 -1
  140. package/dist/components/mg-input-radio.js +41 -10
  141. package/dist/components/mg-input-radio.js.map +1 -1
  142. package/dist/components/mg-input-select2.js +42 -12
  143. package/dist/components/mg-input-select2.js.map +1 -1
  144. package/dist/components/mg-input-text2.js +56 -18
  145. package/dist/components/mg-input-text2.js.map +1 -1
  146. package/dist/components/mg-input-textarea.js +44 -13
  147. package/dist/components/mg-input-textarea.js.map +1 -1
  148. package/dist/components/mg-input-title2.js +1 -1
  149. package/dist/components/mg-input-title2.js.map +1 -1
  150. package/dist/components/mg-input-toggle.js +35 -22
  151. package/dist/components/mg-input-toggle.js.map +1 -1
  152. package/dist/components/mg-input.d.ts +11 -0
  153. package/dist/components/mg-input.js +8 -0
  154. package/dist/components/mg-input.js.map +1 -0
  155. package/dist/components/mg-input2.js +352 -0
  156. package/dist/components/mg-input2.js.map +1 -0
  157. package/dist/components/mg-item-more.js +1 -338
  158. package/dist/components/mg-item-more.js.map +1 -1
  159. package/dist/components/mg-item-more2.js +592 -0
  160. package/dist/components/mg-item-more2.js.map +1 -0
  161. package/dist/components/mg-loader.js +1 -1
  162. package/dist/components/mg-loader.js.map +1 -1
  163. package/dist/components/mg-menu-item2.js +47 -8
  164. package/dist/components/mg-menu-item2.js.map +1 -1
  165. package/dist/components/mg-menu.js +1 -1
  166. package/dist/components/mg-message.js +1 -1
  167. package/dist/components/mg-message.js.map +1 -1
  168. package/dist/components/mg-modal.js +3 -3
  169. package/dist/components/mg-modal.js.map +1 -1
  170. package/dist/components/mg-pagination2.js +12 -6
  171. package/dist/components/mg-pagination2.js.map +1 -1
  172. package/dist/components/mg-panel.js +15 -9
  173. package/dist/components/mg-panel.js.map +1 -1
  174. package/dist/components/mg-popover-content2.js +1 -1
  175. package/dist/components/mg-popover-content2.js.map +1 -1
  176. package/dist/components/mg-popover2.js +2 -2
  177. package/dist/components/mg-popover2.js.map +1 -1
  178. package/dist/components/mg-skip-links.js +1 -1
  179. package/dist/components/mg-tabs.js +1 -1
  180. package/dist/components/mg-tabs.js.map +1 -1
  181. package/dist/components/mg-tag.js +1 -1
  182. package/dist/components/mg-tag.js.map +1 -1
  183. package/dist/components/mg-tooltip-content2.js +1 -1
  184. package/dist/components/mg-tooltip-content2.js.map +1 -1
  185. package/dist/components/mg-tooltip2.js +10 -3
  186. package/dist/components/mg-tooltip2.js.map +1 -1
  187. package/dist/esm/{index-bb17de92.js → index-c4ed16b2.js} +97 -81
  188. package/dist/esm/index-c4ed16b2.js.map +1 -0
  189. package/dist/esm/{index-ad78ece7.js → index-d43d1c5d.js} +23 -10
  190. package/dist/esm/index-d43d1c5d.js.map +1 -0
  191. package/dist/esm/loader.js +3 -3
  192. package/dist/esm/{mg-action-more_34.entry.js → mg-action-more_36.entry.js} +982 -731
  193. package/dist/esm/mg-action-more_36.entry.js.map +1 -0
  194. package/dist/esm/mg-components.js +4 -4
  195. package/dist/esm/mg-components.js.map +1 -1
  196. package/dist/esm/mg-loader.entry.js +3 -3
  197. package/dist/esm/mg-loader.entry.js.map +1 -1
  198. package/dist/mg-components/locales/en/messages.json +10 -3
  199. package/dist/mg-components/locales/fr/messages.json +10 -3
  200. package/dist/mg-components/mg-components.esm.js +1 -1
  201. package/dist/mg-components/mg-components.esm.js.map +1 -1
  202. package/dist/mg-components/p-350454b9.js +2 -0
  203. package/dist/mg-components/p-350454b9.js.map +1 -0
  204. package/dist/mg-components/p-9cdd1bc9.entry.js +2 -0
  205. package/dist/mg-components/p-9cdd1bc9.entry.js.map +1 -0
  206. package/dist/mg-components/p-cf0b0988.js +3 -0
  207. package/dist/mg-components/p-cf0b0988.js.map +1 -0
  208. package/dist/mg-components/{p-d80b844d.entry.js → p-d4084a15.entry.js} +2 -2
  209. package/dist/mg-components/{p-d80b844d.entry.js.map → p-d4084a15.entry.js.map} +1 -1
  210. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +1 -1
  211. package/dist/types/components/atoms/mg-button/mg-button.d.ts +8 -5
  212. package/dist/types/components/atoms/mg-card/mg-card.d.ts +4 -1
  213. package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +1 -1
  214. package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +5 -0
  215. package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +3 -3
  216. package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +5 -2
  217. package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +5 -2
  218. package/dist/types/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.d.ts +3 -0
  219. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.conf.d.ts +2 -1
  220. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +4 -0
  221. package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +35 -0
  222. package/dist/types/components/molecules/inputs/mg-input/mg-input.d.ts +145 -0
  223. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +5 -5
  224. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +3 -5
  225. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +13 -12
  226. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.conf.d.ts +2 -1
  227. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +19 -6
  228. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +15 -9
  229. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +16 -5
  230. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +7 -3
  231. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +7 -4
  232. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +21 -12
  233. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +12 -9
  234. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +16 -12
  235. package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +4 -1
  236. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.conf.d.ts +8 -0
  237. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +25 -5
  238. package/dist/types/components/molecules/mg-action-more/mg-action-more.conf.d.ts +7 -16
  239. package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +9 -9
  240. package/dist/types/components/molecules/mg-form/mg-form.d.ts +3 -3
  241. package/dist/types/components/molecules/mg-item-more/mg-item-more.conf.d.ts +3 -12
  242. package/dist/types/components/molecules/mg-item-more/mg-item-more.d.ts +4 -3
  243. package/dist/types/components/molecules/mg-loader/mg-loader.d.ts +2 -2
  244. package/dist/types/components/molecules/mg-message/mg-message.d.ts +2 -2
  245. package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +2 -2
  246. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +3 -3
  247. package/dist/types/components/molecules/mg-popover/mg-popover-content/mg-popover-content.d.ts +3 -0
  248. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +5 -1
  249. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +3 -0
  250. package/dist/types/components.d.ts +208 -92
  251. package/dist/types/locales/index.conf.d.ts +4 -0
  252. package/ide/intellij/web-types.json +260 -96
  253. package/ide/vscode/html-custom-data.json +2596 -1222
  254. package/package.json +24 -28
  255. package/dist/cjs/index-0a2783ee.js.map +0 -1
  256. package/dist/cjs/index-c585c382.js.map +0 -1
  257. package/dist/cjs/mg-action-more_34.cjs.entry.js.map +0 -1
  258. package/dist/cjs/mg-item-more.cjs.entry.js +0 -272
  259. package/dist/cjs/mg-item-more.cjs.entry.js.map +0 -1
  260. package/dist/cjs/mg-menu.conf-c291eee6.js +0 -18
  261. package/dist/cjs/mg-menu.conf-c291eee6.js.map +0 -1
  262. package/dist/collection/components/molecules/inputs/MgInput.conf.js +0 -14
  263. package/dist/collection/components/molecules/inputs/MgInput.conf.js.map +0 -1
  264. package/dist/collection/components/molecules/inputs/MgInput.js +0 -125
  265. package/dist/collection/components/molecules/inputs/MgInput.js.map +0 -1
  266. package/dist/collection/utils/playwright.e2e.test.utils.js +0 -100
  267. package/dist/collection/utils/playwright.e2e.test.utils.js.map +0 -1
  268. package/dist/components/MgInput.js +0 -155
  269. package/dist/components/MgInput.js.map +0 -1
  270. package/dist/components/mg-menu.conf.js +0 -16
  271. package/dist/components/mg-menu.conf.js.map +0 -1
  272. package/dist/components/mg-menu2.js +0 -202
  273. package/dist/components/mg-menu2.js.map +0 -1
  274. package/dist/esm/index-ad78ece7.js.map +0 -1
  275. package/dist/esm/index-bb17de92.js.map +0 -1
  276. package/dist/esm/mg-action-more_34.entry.js.map +0 -1
  277. package/dist/esm/mg-item-more.entry.js +0 -268
  278. package/dist/esm/mg-item-more.entry.js.map +0 -1
  279. package/dist/esm/mg-menu.conf-9609bcb2.js +0 -16
  280. package/dist/esm/mg-menu.conf-9609bcb2.js.map +0 -1
  281. package/dist/mg-components/p-2db8355d.entry.js +0 -2
  282. package/dist/mg-components/p-2db8355d.entry.js.map +0 -1
  283. package/dist/mg-components/p-95653110.entry.js +0 -2
  284. package/dist/mg-components/p-95653110.entry.js.map +0 -1
  285. package/dist/mg-components/p-bc62d75e.js +0 -3
  286. package/dist/mg-components/p-bc62d75e.js.map +0 -1
  287. package/dist/mg-components/p-d41aa78b.js +0 -2
  288. package/dist/mg-components/p-d41aa78b.js.map +0 -1
  289. package/dist/mg-components/p-fe935e54.js +0 -2
  290. package/dist/mg-components/p-fe935e54.js.map +0 -1
  291. package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +0 -46
  292. package/dist/types/components/molecules/inputs/MgInput.d.ts +0 -13
@@ -34,13 +34,13 @@ const MgIllustratedMessage$1 = /*@__PURE__*/ proxyCustomElement(class MgIllustra
34
34
  * @returns HTML Element
35
35
  */
36
36
  render() {
37
- return (h("div", { key: '2fdba6c8f99b0db0955f4f6e85c90e6b73aeb506', class: {
37
+ return (h("div", { key: '566da859acf529d2389b892db469a2293f85c67e', class: {
38
38
  'mg-c-illustrated-message': true,
39
39
  'mg-c-illustrated-message--horizontal': this.direction === 'horizontal',
40
- } }, h("div", { key: 'c41ca15c897ae3f855ce0e922e1afc6f0475c014', class: {
40
+ } }, h("div", { key: '7d2d44156ae0c8c0ac2364e6f1fc7c41242f7d6c', class: {
41
41
  'mg-c-illustrated-message__illustration': true,
42
42
  'mg-c-illustrated-message__illustration--small': this.size === 'small',
43
- } }, h("slot", { key: 'c0f9308201945fae94d13afc45596ba45efdd890', name: "illustration" })), h("div", { key: '5c020c6c0154a527485662dd47eda0ad141e2efc', class: "mg-c-illustrated-message__slots" }, h("div", { key: 'e5ff38b7a081232af9382c6bda756bdd31360f86', class: "mg-c-illustrated-message__title" }, h("slot", { key: '39b3ff01828d05780bd18f04a9971acc0b47a684', name: "title" })), h("div", { key: 'f0cc3464ff7c28ad6a26445ffeca1a0dc40d51ce', class: "mg-c-illustrated-message__details" }, h("slot", { key: '32f4165453cc3dba7b78d1ad0addc63cf35d246d', name: "details" })))));
43
+ } }, h("slot", { key: '3a477be62f6866dece99be8882f89dcd2a620c5e', name: "illustration" })), h("div", { key: 'd6d8950d4bb5b8c6cafe1c148978bed1291f5768', class: "mg-c-illustrated-message__slots" }, h("div", { key: '47d0406a0d5eb2ea2388472defdc44411ba2977d', class: "mg-c-illustrated-message__title" }, h("slot", { key: '8126236dfce191b268f84f45183cc8304019c129', name: "title" })), h("div", { key: '64641dadca2ed82f3ad4b24d677ee01cc002dabf', class: "mg-c-illustrated-message__details" }, h("slot", { key: '65b61b0c16c9dde9cd2eab062b97fe189f53e5a2', name: "details" })))));
44
44
  }
45
45
  get element() { return this; }
46
46
  static get style() { return MgIllustratedMessageStyle0; }
@@ -1 +1 @@
1
- {"file":"mg-illustrated-message.js","mappings":";;;AAAA,MAAM,uBAAuB,GAAG,ysCAAysC,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edMessage","isTagName"],"sources":["../styles/dist/components/mg-illustrated-message.css?tag=mg-illustrated-message&encapsulation=shadow","src/components/molecules/mg-illustrated-message/mg-illustrated-message.tsx"],"sourcesContent":[".mg-c-illustrated-message{display:flex;max-width:47.5rem;box-sizing:border-box;flex-direction:column;justify-content:center;padding:var(--mg-illustrated-message-padding-vertical) 1.5rem;margin:auto;gap:3em 7rem;text-align:center}.mg-c-illustrated-message__illustration{max-height:18.4rem}.mg-c-illustrated-message__illustration ::slotted([slot=illustration]){width:auto;max-width:100%;height:auto;max-height:18.4rem}.mg-c-illustrated-message__illustration.mg-c-illustrated-message__illustration--small{max-height:6rem}.mg-c-illustrated-message__illustration.mg-c-illustrated-message__illustration--small ::slotted([slot=illustration]){max-height:6rem}.mg-c-illustrated-message.mg-c-illustrated-message--horizontal{max-width:unset;flex-flow:row wrap;align-items:center}.mg-c-illustrated-message.mg-c-illustrated-message--horizontal .mg-c-illustrated-message__slots,.mg-c-illustrated-message.mg-c-illustrated-message--horizontal .mg-c-illustrated-message__illustration{max-width:47.5rem}.mg-c-illustrated-message__title ::slotted([slot=title]){margin:0;font-family:var(--font-family) !important;font-size:2rem !important;font-weight:400 !important}.mg-c-illustrated-message__details ::slotted([slot=details]){margin:2rem 0 0}/*# sourceMappingURL=mg-illustrated-message.css.map */\n","import { Component, Element, h, Prop } from '@stencil/core';\nimport { isTagName } from '@mgdis/stencil-helpers';\n\n@Component({\n tag: 'mg-illustrated-message',\n styleUrl: '../../../../node_modules/@mgdis/styles/dist/components/mg-illustrated-message.css',\n shadow: true,\n})\nexport class MgIllustratedMessage {\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgIllustratedMessageElement;\n\n /**\n * Define illustration size\n */\n @Prop() size: 'regular' | 'small' = 'regular';\n\n /**\n * Define component orientation\n */\n @Prop() direction: 'vertical' | 'horizontal' = 'vertical';\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n */\n componentDidLoad(): void {\n const headingTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];\n const slottedIllustrations = this.element.querySelectorAll('[slot=\"illustration\"]');\n\n if (!isTagName(this.element.querySelector('[slot=\"title\"]'), headingTags)) {\n throw new Error(`<mg-illustrated-message> Slotted title must be a heading: ${headingTags.join(', ')}`);\n } else if (slottedIllustrations.length !== 1) {\n throw new Error('<mg-illustrated-message> Slotted illustration must be present and unique.');\n }\n\n slottedIllustrations[0].setAttribute('aria-hidden', 'true');\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <div\n class={{\n 'mg-c-illustrated-message': true,\n 'mg-c-illustrated-message--horizontal': this.direction === 'horizontal',\n }}\n >\n <div\n class={{\n 'mg-c-illustrated-message__illustration': true,\n 'mg-c-illustrated-message__illustration--small': this.size === 'small',\n }}\n >\n <slot name=\"illustration\"></slot>\n </div>\n <div class=\"mg-c-illustrated-message__slots\">\n <div class=\"mg-c-illustrated-message__title\">\n <slot name=\"title\"></slot>\n </div>\n <div class=\"mg-c-illustrated-message__details\">\n <slot name=\"details\"></slot>\n </div>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"mg-illustrated-message.js","mappings":";;;AAAA,MAAM,uBAAuB,GAAG,ysCAAysC,CAAC;AAC1uC,mCAAe,uBAAuB;;MCYzBA,sBAAoB;;;;;oBAaK,SAAS;yBAKE,UAAU;;;;;;;;IASzD,gBAAgB;QACd,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QACzD,MAAM,oBAAoB,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC;QAEpF,IAAI,CAACC,EAAS,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,EAAE,WAAW,CAAC,EAAE;YACzE,MAAM,IAAI,KAAK,CAAC,6DAA6D,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SACxG;aAAM,IAAI,oBAAoB,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5C,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC,CAAC;SAC9F;QAED,oBAAoB,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;KAC7D;;;;;IAMD,MAAM;QACJ,QACE,4DACE,KAAK,EAAE;gBACL,0BAA0B,EAAE,IAAI;gBAChC,sCAAsC,EAAE,IAAI,CAAC,SAAS,KAAK,YAAY;aACxE,IAED,4DACE,KAAK,EAAE;gBACL,wCAAwC,EAAE,IAAI;gBAC9C,+CAA+C,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;aACvE,IAED,6DAAM,IAAI,EAAC,cAAc,GAAQ,CAC7B,EACN,4DAAK,KAAK,EAAC,iCAAiC,IAC1C,4DAAK,KAAK,EAAC,iCAAiC,IAC1C,6DAAM,IAAI,EAAC,OAAO,GAAQ,CACtB,EACN,4DAAK,KAAK,EAAC,mCAAmC,IAC5C,6DAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,CACF,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["MgIllustratedMessage","isTagName"],"sources":["../styles/dist/components/mg-illustrated-message.css?tag=mg-illustrated-message&encapsulation=shadow","src/components/molecules/mg-illustrated-message/mg-illustrated-message.tsx"],"sourcesContent":[".mg-c-illustrated-message{display:flex;max-width:47.5rem;box-sizing:border-box;flex-direction:column;justify-content:center;padding:var(--mg-illustrated-message-padding-vertical) 1.5rem;margin:auto;gap:3em 7rem;text-align:center}.mg-c-illustrated-message__illustration{max-height:18.4rem}.mg-c-illustrated-message__illustration ::slotted([slot=illustration]){width:auto;max-width:100%;height:auto;max-height:18.4rem}.mg-c-illustrated-message__illustration.mg-c-illustrated-message__illustration--small{max-height:6rem}.mg-c-illustrated-message__illustration.mg-c-illustrated-message__illustration--small ::slotted([slot=illustration]){max-height:6rem}.mg-c-illustrated-message.mg-c-illustrated-message--horizontal{max-width:unset;flex-flow:row wrap;align-items:center}.mg-c-illustrated-message.mg-c-illustrated-message--horizontal .mg-c-illustrated-message__slots,.mg-c-illustrated-message.mg-c-illustrated-message--horizontal .mg-c-illustrated-message__illustration{max-width:47.5rem}.mg-c-illustrated-message__title ::slotted([slot=title]){margin:0;font-family:var(--font-family) !important;font-size:2rem !important;font-weight:400 !important}.mg-c-illustrated-message__details ::slotted([slot=details]){margin:2rem 0 0}/*# sourceMappingURL=mg-illustrated-message.css.map */\n","import { Component, Element, h, Prop } from '@stencil/core';\nimport { isTagName } from '@mgdis/stencil-helpers';\n\n/*\n * @slot illustration - Illustration content\n * @slot title - Title content\n * @slot details - Details content\n */\n@Component({\n tag: 'mg-illustrated-message',\n styleUrl: '../../../../node_modules/@mgdis/styles/dist/components/mg-illustrated-message.css',\n shadow: true,\n})\nexport class MgIllustratedMessage {\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgIllustratedMessageElement;\n\n /**\n * Define illustration size\n */\n @Prop() size: 'regular' | 'small' = 'regular';\n\n /**\n * Define component orientation\n */\n @Prop() direction: 'vertical' | 'horizontal' = 'vertical';\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n */\n componentDidLoad(): void {\n const headingTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];\n const slottedIllustrations = this.element.querySelectorAll('[slot=\"illustration\"]');\n\n if (!isTagName(this.element.querySelector('[slot=\"title\"]'), headingTags)) {\n throw new Error(`<mg-illustrated-message> Slotted title must be a heading: ${headingTags.join(', ')}`);\n } else if (slottedIllustrations.length !== 1) {\n throw new Error('<mg-illustrated-message> Slotted illustration must be present and unique.');\n }\n\n slottedIllustrations[0].setAttribute('aria-hidden', 'true');\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <div\n class={{\n 'mg-c-illustrated-message': true,\n 'mg-c-illustrated-message--horizontal': this.direction === 'horizontal',\n }}\n >\n <div\n class={{\n 'mg-c-illustrated-message__illustration': true,\n 'mg-c-illustrated-message__illustration--small': this.size === 'small',\n }}\n >\n <slot name=\"illustration\"></slot>\n </div>\n <div class=\"mg-c-illustrated-message__slots\">\n <div class=\"mg-c-illustrated-message__title\">\n <slot name=\"title\"></slot>\n </div>\n <div class=\"mg-c-illustrated-message__details\">\n <slot name=\"details\"></slot>\n </div>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,6 +1,7 @@
1
1
  import { h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client';
2
- import { d as defineCustomElement$7 } from './mg-button2.js';
3
- import { d as defineCustomElement$6 } from './mg-icon2.js';
2
+ import { d as defineCustomElement$8 } from './mg-button2.js';
3
+ import { d as defineCustomElement$7 } from './mg-icon2.js';
4
+ import { d as defineCustomElement$6 } from './mg-input2.js';
4
5
  import { d as defineCustomElement$5 } from './mg-input-select2.js';
5
6
  import { d as defineCustomElement$4 } from './mg-input-title2.js';
6
7
  import { d as defineCustomElement$3 } from './mg-pagination2.js';
@@ -44,11 +45,7 @@ var SelectValuesButtonKey;
44
45
  */
45
46
  const MgInputCheckboxList = (props) => (
46
47
  // eslint-disable-next-line jsx-a11y/no-redundant-roles
47
- h("ul", { class: {
48
- 'mg-c-input__input-group-container': true,
49
- 'mg-c-input__input-group-container--vertical': props.inputVerticalList || props.type === 'multi',
50
- 'mg-c-input__input-checkbox-multi-inputs': props.type === 'multi',
51
- }, role: "list", "aria-describedby": props.displaySearchInput ? 'search-results' : undefined, "aria-label": props.displaySearchInput ? props.messages.searchResults : undefined, "aria-live": props.displaySearchInput ? 'polite' : undefined, id: props.id }, props.checkboxes.map(input => {
48
+ h("ul", { class: "mg-c-input__input-group-container", role: "list", "aria-describedby": props.displaySearchInput ? 'search-results' : undefined, "aria-label": props.displaySearchInput ? props.messages.searchResults : undefined, "aria-live": props.displaySearchInput ? 'polite' : undefined, id: props.id }, props.checkboxes.map(input => {
52
49
  var _a, _b;
53
50
  return (h("li", { key: input._id, class: { 'mg-c-input__input-group': true, 'mg-c-input__input-group--disabled': props.disabled || input.disabled } },
54
51
  h("input", { type: "checkbox", id: input._id, name: props.name, value: (_a = input.value) === null || _a === void 0 ? void 0 : _a.toString(), checked: Boolean(input.value), required: input.required, "aria-invalid": ((_b = props.invalid) === null || _b === void 0 ? void 0 : _b.toString()) || 'false', disabled: props.disabled || input.disabled, indeterminate: input.value === null, onInput: input._handleInput, onBlur: input._handleBlur, onKeyDown: input._handleKeydown }),
@@ -153,10 +150,10 @@ const MgInputCheckboxPaginated = /*@__PURE__*/ proxyCustomElement(class MgInputC
153
150
  * @returns HTML Element
154
151
  */
155
152
  render() {
156
- const getText = (checkboxes) => (h("em", { key: '28eedd949445bc6c7a5a750359af7159055657d8', class: "mg-c-input__input-checkbox-multi-section-header-label" }, `${this.messages[checkboxes.length > 1 ? 'titlePlurial' : 'title']} (${checkboxes.length})`));
153
+ const getText = (checkboxes) => (h("em", { key: 'd1377fde2a3fdf69077a52d9b81e38b7c52881ec', class: "mg-c-input__section-header-title-label" }, `${this.messages[checkboxes.length > 1 ? 'titlePlurial' : 'title']} (${checkboxes.length})`));
157
154
  const [from, to] = this.getFromToIndexes();
158
155
  const itemsContainerId = `items-${this.sectionKind}-container`;
159
- return (h(Host, { key: 'a7ade87a72bb1cba4d0c20dde425cefc5c7fbff4', hidden: this.checkboxes.length < 1 }, h("div", { key: '38711edade3945e940ba29b44492424c3e5b7063', class: "mg-c-input__input-checkbox-multi-section-header" }, this.titleKind === SectionTitleKind.BUTTON ? (h("mg-button", { variant: "flat", onClick: this.handleToggleClick, "aria-controls": itemsContainerId, "aria-expanded": this.expanded.toString() }, h("mg-icon", { icon: this.expanded ? 'chevron-up' : 'chevron-down', size: "small" }), h("span", { class: "mg-c-input__input-checkbox-multi-text" }, getText(this.checkboxes)))) : (h("p", { class: "mg-c-input__input-checkbox-multi-title" }, getText(this.checkboxes))), ((this.sectionKind === SectionKind.SELECTED && this.expanded) || this.sectionKind === SectionKind.NOT_SELECTED) && (h("mg-tooltip", { class: "mg-c-input__input-checkbox-multi-section-header-tootlip", message: this.messages.tooltip, "data-popper-strategy": "absolute" }, h("mg-button", { variant: "link", onClick: this.massActionHandler }, this.messages.action))), this.expanded && this.getPageCount(this.checkboxes) > 1 && (h("mg-pagination", { key: "search-pagination", totalPages: this.getPageCount(this.checkboxes), currentPage: this.currentPage, "onCurrent-page-change": this.handleCurrentPageChange, hideNavigationLabels: true, hidePageCount: true, identifier: `input-checkbox-pagination-${this.sectionKind}` }))), h("div", { key: '3a514d5711da9ebb57d21e70609b7f6f2d1e621e', hidden: !this.expanded, id: itemsContainerId, class: "mg-c-input__input-checkbox-multi-section-content" }, h(MgInputCheckboxList, { key: '84223d73e67e355ce01a4f70ef75a42a18fd96b4', checkboxes: this.getArrayRange(this.checkboxes, from, to), inputVerticalList: true, type: 'multi', displaySearchInput: true, messages: this.messages, id: `items-${this.sectionKind}`, disabled: this.disabled, name: this.name, invalid: this.invalid }))));
156
+ return (h(Host, { key: '782f416233239ad46f653bfb34bc2adf2bf5c7b7', hidden: this.checkboxes.length < 1 }, h("div", { key: 'cbcc808b0aa6701cccf3dd23c78ad7c763dcedd5', class: "mg-c-input__section-header" }, this.titleKind === SectionTitleKind.BUTTON ? (h("mg-button", { variant: "flat", onClick: this.handleToggleClick, "aria-controls": itemsContainerId, "aria-expanded": this.expanded.toString() }, h("mg-icon", { icon: this.expanded ? 'chevron-up' : 'chevron-down', size: "small" }), h("span", { class: "mg-c-input__section-header-title" }, getText(this.checkboxes)))) : (h("p", { class: "mg-c-input__section-header-title mg-c-input__section-header-title--static" }, getText(this.checkboxes))), ((this.sectionKind === SectionKind.SELECTED && this.expanded) || this.sectionKind === SectionKind.NOT_SELECTED) && (h("mg-tooltip", { class: "mg-c-input__section-header-tootlip", message: this.messages.tooltip, "data-popper-strategy": "absolute" }, h("mg-button", { variant: "link", onClick: this.massActionHandler }, this.messages.action))), this.expanded && this.getPageCount(this.checkboxes) > 1 && (h("mg-pagination", { key: "search-pagination", totalPages: this.getPageCount(this.checkboxes), currentPage: this.currentPage, "onCurrent-page-change": this.handleCurrentPageChange, hideNavigationLabels: true, hidePageCount: true, identifier: `input-checkbox-pagination-${this.sectionKind}` }))), h("div", { key: 'e3a31d6c97ec062b80932a6d22c422e1b42f3866', hidden: !this.expanded, id: itemsContainerId, class: "mg-c-input__section-content" }, h(MgInputCheckboxList, { key: '44c4a5908286e4ec4f477d6cddf05752f83e26c1', checkboxes: this.getArrayRange(this.checkboxes, from, to), displaySearchInput: true, messages: this.messages, id: `items-${this.sectionKind}`, disabled: this.disabled, name: this.name, invalid: this.invalid }))));
160
157
  }
161
158
  static get watchers() { return {
162
159
  "checkboxes": ["validateCheckboxes"],
@@ -181,7 +178,7 @@ function defineCustomElement() {
181
178
  if (typeof customElements === "undefined") {
182
179
  return;
183
180
  }
184
- const components = ["mg-input-checkbox-paginated", "mg-button", "mg-icon", "mg-input-select", "mg-input-title", "mg-pagination", "mg-tooltip", "mg-tooltip-content"];
181
+ const components = ["mg-input-checkbox-paginated", "mg-button", "mg-icon", "mg-input", "mg-input-select", "mg-input-title", "mg-pagination", "mg-tooltip", "mg-tooltip-content"];
185
182
  components.forEach(tagName => { switch (tagName) {
186
183
  case "mg-input-checkbox-paginated":
187
184
  if (!customElements.get(tagName)) {
@@ -190,10 +187,15 @@ function defineCustomElement() {
190
187
  break;
191
188
  case "mg-button":
192
189
  if (!customElements.get(tagName)) {
193
- defineCustomElement$7();
190
+ defineCustomElement$8();
194
191
  }
195
192
  break;
196
193
  case "mg-icon":
194
+ if (!customElements.get(tagName)) {
195
+ defineCustomElement$7();
196
+ }
197
+ break;
198
+ case "mg-input":
197
199
  if (!customElements.get(tagName)) {
198
200
  defineCustomElement$6();
199
201
  }
@@ -1 +1 @@
1
- {"file":"mg-input-checkbox-paginated2.js","mappings":";;;;;;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ACD,CACd,EACA,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KACtD,qBACE,GAAG,EAAC,mBAAmB,EACvB,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,EAC9C,WAAW,EAAE,IAAI,CAAC,WAAW,2BACN,IAAI,CAAC,uBAAuB,EACnD,oBAAoB,EAAE,IAAI,EAC1B,aAAa,EAAE,IAAI,EACnB,UAAU,EAAE,6BAA6B,IAAI,CAAC,WAAW,EAAE,GAC5C,CAClB,CACG,EACN,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAC,kDAAkD,IACzG,EAAC,mBAAmB,qDAClB,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,EACzD,iBAAiB,EAAE,IAAI,EACvB,IAAI,EAAE,OAAO,EACb,kBAAkB,EAAE,IAAI,EACxB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,EAAE,EAAE,SAAS,IAAI,CAAC,WAAW,EAAE,EAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,IAAI,CAAC,OAAO,GACA,CACnB,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.ts","src/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.tsx","src/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.tsx"],"sourcesContent":["/**\n * interface CheckboxValue\n * use to match returned value\n */\nexport interface CheckboxValue {\n title: string;\n value: boolean | null;\n disabled?: boolean;\n required?: boolean;\n}\n\n/**\n * interface CheckboxItem\n * use to match checkbox attributes\n */\nexport interface CheckboxItem extends CheckboxValue {\n _id: string;\n _handleInput: (event: InputEvent & { target: HTMLInputElement }) => void;\n _handleBlur: () => void;\n _handleKeydown: (event: KeyboardEvent & { target: HTMLElement }) => void;\n}\n\n/**\n * List of all availables checkbox type\n */\nexport const checkboxTypes = ['checkbox', 'multi'] as const;\n\n/**\n * ChecboxType from checkbox types\n */\nexport type CheckboxType = (typeof checkboxTypes)[number];\n\n/**\n * mg-input-checkbox-paginated section kind\n */\nexport enum SectionKind {\n SELECTED = 'selected',\n NOT_SELECTED = 'not-selected',\n}\n\n/**\n * mg-input-checkbox-paginated section title kind\n */\nexport enum SectionTitleKind {\n BUTTON = 'button',\n TEXT = 'text',\n}\n\n/**\n * Base mg-input-checkbox interface\n */\nexport interface IMgInputCheckboxBase {\n disabled: boolean;\n name: string;\n invalid: boolean;\n}\n\n/**\n * mg-input-checkbox-list interface\n */\nexport interface MgInputCheckboxListProps extends IMgInputCheckboxBase {\n inputVerticalList: boolean;\n type: CheckboxType;\n displaySearchInput: boolean;\n messages: Record<string, unknown>;\n checkboxes: CheckboxItem[];\n id: string;\n}\n\n/**\n * Define select values button key\n */\nexport enum SelectValuesButtonKey {\n EDIT = 'editButton',\n SHOW = 'showButton',\n SELECT = 'selectButton',\n}\n","import { FunctionalComponent, h, VNode } from '@stencil/core';\nimport { MgInputCheckboxListProps } from './mg-input-checkbox.conf';\n\n/**\n * Get checkboxes list template\n * @param props - MgInputCheckboxList Interface Props\n * @returns input template\n */\nexport const MgInputCheckboxList: FunctionalComponent<MgInputCheckboxListProps> = (props: MgInputCheckboxListProps): VNode[] => (\n // eslint-disable-next-line jsx-a11y/no-redundant-roles\n <ul\n class={{\n 'mg-c-input__input-group-container': true,\n 'mg-c-input__input-group-container--vertical': props.inputVerticalList || props.type === 'multi',\n 'mg-c-input__input-checkbox-multi-inputs': props.type === 'multi',\n }}\n role=\"list\"\n aria-describedby={props.displaySearchInput ? 'search-results' : undefined}\n aria-label={props.displaySearchInput ? props.messages.searchResults : undefined}\n aria-live={props.displaySearchInput ? 'polite' : undefined}\n id={props.id}\n >\n {props.checkboxes.map(input => (\n <li key={input._id} class={{ 'mg-c-input__input-group': true, 'mg-c-input__input-group--disabled': props.disabled || input.disabled }}>\n <input\n type=\"checkbox\"\n id={input._id}\n name={props.name}\n value={input.value?.toString()}\n checked={Boolean(input.value)}\n required={input.required}\n aria-invalid={props.invalid?.toString() || 'false'}\n disabled={props.disabled || input.disabled}\n indeterminate={input.value === null}\n onInput={input._handleInput}\n onBlur={input._handleBlur}\n onKeyDown={input._handleKeydown}\n />\n <label htmlFor={input._id}>{input.title}</label>\n </li>\n ))}\n </ul>\n);\n","import { Component, h, Prop, State, Event, EventEmitter, Watch, Host } from '@stencil/core';\nimport { CheckboxItem, IMgInputCheckboxBase, SectionKind, SectionTitleKind } from '../mg-input-checkbox.conf';\nimport { MgInputCheckboxList } from '../MgInputCheckboxList';\n\n/**\n * Internal component use to manage sections instances\n */\n@Component({\n tag: 'mg-input-checkbox-paginated',\n shadow: false,\n scoped: true,\n})\nexport class MgInputCheckboxPaginated implements IMgInputCheckboxBase {\n /*************\n * Constantes *\n *************/\n private readonly offset = 10;\n\n /*************\n * Decorators *\n *************/\n\n /**\n * Define if mg-input-checkbox-list is readonly\n */\n @Prop() readonly: boolean;\n\n /**\n * Define if mg-input-checkbox-list is disabled\n */\n @Prop() disabled: boolean;\n\n /**\n * Define mg-input-checkbox input name\n */\n @Prop() name: string;\n\n /**\n * Define mg-input-checkbox input invalid\n */\n @Prop() invalid: boolean;\n\n /**\n * Current page\n */\n @Prop({ mutable: true }) currentPage = 1;\n\n /**\n * Define checkboxes to paginate\n */\n @Prop() checkboxes: CheckboxItem[] = [];\n @Watch('checkboxes')\n validateCheckboxes(newValue: MgInputCheckboxPaginated['checkboxes'], oldValue: MgInputCheckboxPaginated['checkboxes']): void {\n const pageCountNewValue = this.getPageCount(newValue);\n const pageCountOldValue = this.getPageCount(oldValue);\n // after each array.length update we reset pagination\n // when items fill on page, we set current page to 1\n if (pageCountNewValue === 1 || (pageCountNewValue !== 0 && this.currentPage === 0)) {\n this.currentPage = 1;\n }\n // when old items page numbers match the current page AND new items page number is lower than current page, we set the new last page\n else if (pageCountOldValue === this.currentPage && pageCountNewValue < this.currentPage) {\n this.currentPage--;\n }\n }\n\n /**\n * Define section kind\n */\n @Prop() sectionKind: SectionKind;\n @Watch('sectionKind')\n validateSectionKind(newValue: MgInputCheckboxPaginated['sectionKind']): void {\n if (newValue === SectionKind.SELECTED) this.titleKind = SectionTitleKind.BUTTON;\n else this.titleKind = SectionTitleKind.TEXT;\n }\n\n /**\n * Define component message\n */\n @Prop() messages: Record<string, string>;\n\n /**\n * Emit 'mass-action' event\n * used to informe that select-all/unselect-all button listner is triggered\n */\n @Event({ eventName: 'mass-action' }) massAction: EventEmitter<HTMLMgInputCheckboxPaginatedElement['sectionKind']>;\n\n /**\n * Define section title\n */\n @State() titleKind: SectionTitleKind;\n\n /**\n * Is checked items values expanded\n */\n @State() expanded = true;\n\n /***********\n * Methods *\n ***********/\n\n /**\n * Mass action handler\n */\n private massActionHandler = (): void => {\n this.massAction.emit(this.sectionKind);\n };\n\n /**\n * Toggle items button handler\n */\n private handleToggleClick = (): void => {\n this.expanded = !this.expanded;\n };\n\n /**\n * Method to get a array range\n * @param from - array start index\n * @param to - array end index\n * @returns array's range\n */\n private getArrayRange = <ItemType,>(array: ItemType[], from: number, to: number): ItemType[] => array.slice(from, to);\n\n /**\n * Get from and to index\n * @returns [from,to] index\n */\n private getFromToIndexes(): number[] {\n const isFirstPage = this.currentPage === 1;\n const from = isFirstPage ? 0 : (this.currentPage - 1) * this.offset;\n const to = isFirstPage ? this.offset : this.currentPage * this.offset;\n return [from, to];\n }\n\n /**\n * Method to get page count from items\n * @param items - items to count\n * @returns page count from items\n */\n private getPageCount = (item: unknown[]): number => Math.ceil(item.length / this.offset);\n\n /**\n * Handle mg-pagination current page change event\n * @param event - pagination current page change event\n */\n private handleCurrentPageChange = (event: CustomEvent): void => {\n this.currentPage = Number(event.detail);\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n */\n componentWillLoad(): void {\n this.validateSectionKind(this.sectionKind);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n const getText = (checkboxes: CheckboxItem[]): HTMLElement => (\n <em class=\"mg-c-input__input-checkbox-multi-section-header-label\">{`${this.messages[checkboxes.length > 1 ? 'titlePlurial' : 'title']} (${checkboxes.length})`}</em>\n );\n const [from, to] = this.getFromToIndexes();\n const itemsContainerId = `items-${this.sectionKind}-container`;\n\n return (\n <Host hidden={this.checkboxes.length < 1}>\n <div class=\"mg-c-input__input-checkbox-multi-section-header\">\n {this.titleKind === SectionTitleKind.BUTTON ? (\n <mg-button variant=\"flat\" onClick={this.handleToggleClick} aria-controls={itemsContainerId} aria-expanded={this.expanded.toString()}>\n <mg-icon icon={this.expanded ? 'chevron-up' : 'chevron-down'} size=\"small\"></mg-icon>\n <span class=\"mg-c-input__input-checkbox-multi-text\">{getText(this.checkboxes)}</span>\n </mg-button>\n ) : (\n <p class=\"mg-c-input__input-checkbox-multi-title\">{getText(this.checkboxes)}</p>\n )}\n {((this.sectionKind === SectionKind.SELECTED && this.expanded) || this.sectionKind === SectionKind.NOT_SELECTED) && (\n <mg-tooltip class=\"mg-c-input__input-checkbox-multi-section-header-tootlip\" message={this.messages.tooltip} data-popper-strategy=\"absolute\">\n <mg-button variant=\"link\" onClick={this.massActionHandler}>\n {this.messages.action}\n </mg-button>\n </mg-tooltip>\n )}\n {this.expanded && this.getPageCount(this.checkboxes) > 1 && (\n <mg-pagination\n key=\"search-pagination\"\n totalPages={this.getPageCount(this.checkboxes)}\n currentPage={this.currentPage}\n onCurrent-page-change={this.handleCurrentPageChange}\n hideNavigationLabels={true}\n hidePageCount={true}\n identifier={`input-checkbox-pagination-${this.sectionKind}`}\n ></mg-pagination>\n )}\n </div>\n <div hidden={!this.expanded} id={itemsContainerId} class=\"mg-c-input__input-checkbox-multi-section-content\">\n <MgInputCheckboxList\n checkboxes={this.getArrayRange(this.checkboxes, from, to)}\n inputVerticalList={true}\n type={'multi'}\n displaySearchInput={true}\n messages={this.messages}\n id={`items-${this.sectionKind}`}\n disabled={this.disabled}\n name={this.name}\n invalid={this.invalid}\n ></MgInputCheckboxList>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"mg-input-checkbox-paginated2.js","mappings":";;;;;;;;;;AAsBA;;;MAGa,aAAa,GAAG,CAAC,UAAU,EAAE,OAAO,EAAW;AAO5D;;;IAGY;AAAZ,WAAY,WAAW;IACrB,oCAAqB,CAAA;IACrB,4CAA6B,CAAA;AAC/B,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB;AAED;;;AAGA,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,iCAAa,CAAA;AACf,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAqBD;;;IAGY;AAAZ,WAAY,qBAAqB;IAC/B,4CAAmB,CAAA;IACnB,4CAAmB,CAAA;IACnB,gDAAuB,CAAA;AACzB,CAAC,EAJW,qBAAqB,KAArB,qBAAqB;;ACnEjC;;;;;MAKa,mBAAmB,GAAkD,CAAC,KAA+B;AAChH;AACA,UACE,KAAK,EAAC,mCAAmC,EACzC,IAAI,EAAC,MAAM,sBACO,KAAK,CAAC,kBAAkB,GAAG,gBAAgB,GAAG,SAAS,gBAC7D,KAAK,CAAC,kBAAkB,GAAG,KAAK,CAAC,QAAQ,CAAC,aAAa,GAAG,SAAS,eACpE,KAAK,CAAC,kBAAkB,GAAG,QAAQ,GAAG,SAAS,EAC1D,EAAE,EAAE,KAAK,CAAC,EAAE,IAEX,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK;;IAAI,QAC7B,UAAI,GAAG,EAAE,KAAK,CAAC,GAA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,KAAK,EAAC,oCAAoC,EAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,0BAAuB,UAAU,IACpH,iBAAW,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,IAAI,CAAC,iBAAiB,IACtD,IAAI,CAAC,QAAQ,CAAC,MAAM,CACX,CACD,CACd,EACA,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KACtD,qBACE,GAAG,EAAC,mBAAmB,EACvB,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,EAC9C,WAAW,EAAE,IAAI,CAAC,WAAW,2BACN,IAAI,CAAC,uBAAuB,EACnD,oBAAoB,EAAE,IAAI,EAC1B,aAAa,EAAE,IAAI,EACnB,UAAU,EAAE,6BAA6B,IAAI,CAAC,WAAW,EAAE,GAC5C,CAClB,CACG,EACN,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAC,6BAA6B,IACpF,EAAC,mBAAmB,qDAClB,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,EACzD,kBAAkB,EAAE,IAAI,EACxB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,EAAE,EAAE,SAAS,IAAI,CAAC,WAAW,EAAE,EAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,IAAI,CAAC,OAAO,GACA,CACnB,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.ts","src/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.tsx","src/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.tsx"],"sourcesContent":["/**\n * interface CheckboxValue\n * use to match returned value\n */\nexport interface CheckboxValue {\n title: string;\n value: boolean | null;\n disabled?: boolean;\n required?: boolean;\n}\n\n/**\n * interface CheckboxItem\n * use to match checkbox attributes\n */\nexport interface CheckboxItem extends CheckboxValue {\n _id: string;\n _handleInput: (event: InputEvent & { target: HTMLInputElement }) => void;\n _handleBlur: () => void;\n _handleKeydown: (event: KeyboardEvent & { target: HTMLElement }) => void;\n}\n\n/**\n * List of all availables checkbox type\n */\nexport const checkboxTypes = ['checkbox', 'multi'] as const;\n\n/**\n * ChecboxType from checkbox types\n */\nexport type CheckboxType = (typeof checkboxTypes)[number];\n\n/**\n * mg-input-checkbox-paginated section kind\n */\nexport enum SectionKind {\n SELECTED = 'selected',\n NOT_SELECTED = 'not-selected',\n}\n\n/**\n * mg-input-checkbox-paginated section title kind\n */\nexport enum SectionTitleKind {\n BUTTON = 'button',\n TEXT = 'text',\n}\n\n/**\n * Base mg-input-checkbox interface\n */\nexport interface IMgInputCheckboxBase {\n disabled?: boolean;\n name?: string;\n invalid?: boolean;\n}\n\n/**\n * mg-input-checkbox-list interface\n */\nexport interface MgInputCheckboxListProps extends IMgInputCheckboxBase {\n displaySearchInput: boolean;\n messages: Record<string, unknown>;\n checkboxes: CheckboxItem[];\n id: string;\n}\n\n/**\n * Define select values button key\n */\nexport enum SelectValuesButtonKey {\n EDIT = 'editButton',\n SHOW = 'showButton',\n SELECT = 'selectButton',\n}\n","import { FunctionalComponent, h, VNode } from '@stencil/core';\nimport { MgInputCheckboxListProps } from './mg-input-checkbox.conf';\n\n/**\n * Get checkboxes list template\n * @param props - MgInputCheckboxList Interface Props\n * @returns input template\n */\nexport const MgInputCheckboxList: FunctionalComponent<MgInputCheckboxListProps> = (props: MgInputCheckboxListProps): VNode[] => (\n // eslint-disable-next-line jsx-a11y/no-redundant-roles\n <ul\n class=\"mg-c-input__input-group-container\"\n role=\"list\"\n aria-describedby={props.displaySearchInput ? 'search-results' : undefined}\n aria-label={props.displaySearchInput ? props.messages.searchResults : undefined}\n aria-live={props.displaySearchInput ? 'polite' : undefined}\n id={props.id}\n >\n {props.checkboxes.map(input => (\n <li key={input._id} class={{ 'mg-c-input__input-group': true, 'mg-c-input__input-group--disabled': props.disabled || input.disabled }}>\n <input\n type=\"checkbox\"\n id={input._id}\n name={props.name}\n value={input.value?.toString()}\n checked={Boolean(input.value)}\n required={input.required}\n aria-invalid={props.invalid?.toString() || 'false'}\n disabled={props.disabled || input.disabled}\n indeterminate={input.value === null}\n onInput={input._handleInput}\n onBlur={input._handleBlur}\n onKeyDown={input._handleKeydown}\n />\n <label htmlFor={input._id}>{input.title}</label>\n </li>\n ))}\n </ul>\n);\n","import { Component, h, Prop, State, Event, EventEmitter, Watch, Host } from '@stencil/core';\nimport { CheckboxItem, IMgInputCheckboxBase, SectionKind, SectionTitleKind } from '../mg-input-checkbox.conf';\nimport { MgInputCheckboxList } from '../MgInputCheckboxList';\n\n/**\n * Internal component use to manage sections instances\n */\n@Component({\n tag: 'mg-input-checkbox-paginated',\n shadow: false,\n scoped: true,\n})\nexport class MgInputCheckboxPaginated implements IMgInputCheckboxBase {\n /*************\n * Constantes *\n *************/\n private readonly offset = 10;\n\n /*************\n * Decorators *\n *************/\n\n /**\n * Define if mg-input-checkbox-list is readonly\n */\n @Prop() readonly?: boolean;\n\n /**\n * Define if mg-input-checkbox-list is disabled\n */\n @Prop() disabled?: boolean;\n\n /**\n * Define mg-input-checkbox input name\n */\n @Prop() name?: string;\n\n /**\n * Define mg-input-checkbox input invalid\n */\n @Prop() invalid?: boolean;\n\n /**\n * Current page\n */\n @Prop({ mutable: true }) currentPage = 1;\n\n /**\n * Define checkboxes to paginate\n */\n @Prop() checkboxes: CheckboxItem[] = [];\n @Watch('checkboxes')\n validateCheckboxes(newValue: MgInputCheckboxPaginated['checkboxes'], oldValue: MgInputCheckboxPaginated['checkboxes']): void {\n const pageCountNewValue = this.getPageCount(newValue);\n const pageCountOldValue = this.getPageCount(oldValue);\n // after each array.length update we reset pagination\n // when items fill on page, we set current page to 1\n if (pageCountNewValue === 1 || (pageCountNewValue !== 0 && this.currentPage === 0)) {\n this.currentPage = 1;\n }\n // when old items page numbers match the current page AND new items page number is lower than current page, we set the new last page\n else if (pageCountOldValue === this.currentPage && pageCountNewValue < this.currentPage) {\n this.currentPage--;\n }\n }\n\n /**\n * Define section kind\n */\n @Prop() sectionKind?: SectionKind;\n @Watch('sectionKind')\n validateSectionKind(newValue: MgInputCheckboxPaginated['sectionKind']): void {\n if (newValue === SectionKind.SELECTED) this.titleKind = SectionTitleKind.BUTTON;\n else this.titleKind = SectionTitleKind.TEXT;\n }\n\n /**\n * Define component message\n */\n @Prop() messages: Record<string, string>;\n\n /**\n * Emit 'mass-action' event\n * used to informe that select-all/unselect-all button listner is triggered\n */\n @Event({ eventName: 'mass-action' }) massAction: EventEmitter<HTMLMgInputCheckboxPaginatedElement['sectionKind']>;\n\n /**\n * Define section title\n */\n @State() titleKind: SectionTitleKind;\n\n /**\n * Is checked items values expanded\n */\n @State() expanded = true;\n\n /***********\n * Methods *\n ***********/\n\n /**\n * Mass action handler\n */\n private massActionHandler = (): void => {\n this.massAction.emit(this.sectionKind);\n };\n\n /**\n * Toggle items button handler\n */\n private handleToggleClick = (): void => {\n this.expanded = !this.expanded;\n };\n\n /**\n * Method to get a array range\n * @param from - array start index\n * @param to - array end index\n * @returns array's range\n */\n private getArrayRange = <ItemType,>(array: ItemType[], from: number, to: number): ItemType[] => array.slice(from, to);\n\n /**\n * Get from and to index\n * @returns [from,to] index\n */\n private getFromToIndexes(): number[] {\n const isFirstPage = this.currentPage === 1;\n const from = isFirstPage ? 0 : (this.currentPage - 1) * this.offset;\n const to = isFirstPage ? this.offset : this.currentPage * this.offset;\n return [from, to];\n }\n\n /**\n * Method to get page count from items\n * @param items - items to count\n * @returns page count from items\n */\n private getPageCount = (item: unknown[]): number => Math.ceil(item.length / this.offset);\n\n /**\n * Handle mg-pagination current page change event\n * @param event - pagination current page change event\n */\n private handleCurrentPageChange = (event: CustomEvent): void => {\n this.currentPage = Number(event.detail);\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n */\n componentWillLoad(): void {\n this.validateSectionKind(this.sectionKind);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n const getText = (checkboxes: CheckboxItem[]): HTMLElement => (\n <em class=\"mg-c-input__section-header-title-label\">{`${this.messages[checkboxes.length > 1 ? 'titlePlurial' : 'title']} (${checkboxes.length})`}</em>\n );\n const [from, to] = this.getFromToIndexes();\n const itemsContainerId = `items-${this.sectionKind}-container`;\n\n return (\n <Host hidden={this.checkboxes.length < 1}>\n <div class=\"mg-c-input__section-header\">\n {this.titleKind === SectionTitleKind.BUTTON ? (\n <mg-button variant=\"flat\" onClick={this.handleToggleClick} aria-controls={itemsContainerId} aria-expanded={this.expanded.toString()}>\n <mg-icon icon={this.expanded ? 'chevron-up' : 'chevron-down'} size=\"small\"></mg-icon>\n <span class=\"mg-c-input__section-header-title\">{getText(this.checkboxes)}</span>\n </mg-button>\n ) : (\n <p class=\"mg-c-input__section-header-title mg-c-input__section-header-title--static\">{getText(this.checkboxes)}</p>\n )}\n {((this.sectionKind === SectionKind.SELECTED && this.expanded) || this.sectionKind === SectionKind.NOT_SELECTED) && (\n <mg-tooltip class=\"mg-c-input__section-header-tootlip\" message={this.messages.tooltip} data-popper-strategy=\"absolute\">\n <mg-button variant=\"link\" onClick={this.massActionHandler}>\n {this.messages.action}\n </mg-button>\n </mg-tooltip>\n )}\n {this.expanded && this.getPageCount(this.checkboxes) > 1 && (\n <mg-pagination\n key=\"search-pagination\"\n totalPages={this.getPageCount(this.checkboxes)}\n currentPage={this.currentPage}\n onCurrent-page-change={this.handleCurrentPageChange}\n hideNavigationLabels={true}\n hidePageCount={true}\n identifier={`input-checkbox-pagination-${this.sectionKind}`}\n ></mg-pagination>\n )}\n </div>\n <div hidden={!this.expanded} id={itemsContainerId} class=\"mg-c-input__section-content\">\n <MgInputCheckboxList\n checkboxes={this.getArrayRange(this.checkboxes, from, to)}\n displaySearchInput={true}\n messages={this.messages}\n id={`items-${this.sectionKind}`}\n disabled={this.disabled}\n name={this.name}\n invalid={this.invalid}\n ></MgInputCheckboxList>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,12 +1,12 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { H as Handler, M as MgInput } from './MgInput.js';
3
2
  import { N as Ne, M as Me, B as Be } from './index.es.js';
4
- import { i as initLocales } from './index2.js';
5
3
  import { d as defineCustomElement$a, S as SelectValuesButtonKey, c as checkboxTypes, a as SectionKind, M as MgInputCheckboxList } from './mg-input-checkbox-paginated2.js';
6
- import { d as defineCustomElement$e } from './mg-button2.js';
7
- import { d as defineCustomElement$d } from './mg-card2.js';
8
- import { d as defineCustomElement$c } from './mg-character-left2.js';
9
- import { d as defineCustomElement$b } from './mg-icon2.js';
4
+ import { d as defineCustomElement$b, H as Handler, c as classFieldset, a as classVerticalList, b as classReadonly, e as classDisabled } from './mg-input2.js';
5
+ import { i as initLocales } from './index2.js';
6
+ import { d as defineCustomElement$f } from './mg-button2.js';
7
+ import { d as defineCustomElement$e } from './mg-card2.js';
8
+ import { d as defineCustomElement$d } from './mg-character-left2.js';
9
+ import { d as defineCustomElement$c } from './mg-icon2.js';
10
10
  import { d as defineCustomElement$9 } from './mg-input-select2.js';
11
11
  import { d as defineCustomElement$8 } from './mg-input-text2.js';
12
12
  import { d as defineCustomElement$7 } from './mg-input-title2.js';
@@ -16,7 +16,7 @@ import { d as defineCustomElement$4 } from './mg-popover-content2.js';
16
16
  import { d as defineCustomElement$3 } from './mg-tooltip2.js';
17
17
  import { d as defineCustomElement$2 } from './mg-tooltip-content2.js';
18
18
 
19
- const mgInputCheckboxCss = ":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__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>ul{display:flex;flex-flow:column wrap;padding:0;margin:0;list-style:none;row-gap:.8rem}.mg-c-input__input-container>strong{display:inline-block}.mg-c-input__input-container>strong,.mg-c-input__input-container>ul{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__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__title{display:flex;width:var(--mg-inputs-title-width, auto);flex-shrink:0;align-items:baseline;justify-content:flex-end;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__title mg-input-title+mg-tooltip{margin-left:.4rem}.mg-c-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-c-input.mg-c-input--label-on-top{flex-direction:column}.mg-c-input.mg-c-input--label-on-top .mg-c-input__title{width:auto;justify-content:flex-start;margin-top:0;margin-right:0;margin-bottom:.3rem;text-align:left}.mg-c-input.mg-c-input--label-on-top .mg-c-input__title mg-input-title{width:100%;flex-shrink:1}.mg-c-input.mg-c-input--label-on-top .mg-c-input__input-container{width:100%}@media screen and (max-width: 767px){.mg-c-input{flex-direction:column}.mg-c-input .mg-c-input__title{width:auto;justify-content:flex-start;margin-top:0;margin-right:0;margin-bottom:.3rem;text-align:left}.mg-c-input .mg-c-input__title mg-input-title{width:100%;flex-shrink:1}.mg-c-input .mg-c-input__input-container{width:100%}}.mg-c-input__input-group-container{display:flex;flex-wrap:wrap;padding:0;margin:0;margin-top:calc((var(--default-size) - var(--font-size)*var(--line-height))/2);gap:1rem 2.3rem;list-style:none}.mg-c-input__input-group-container--vertical{flex-direction:column}fieldset.mg-c-input{padding:0;border:0;margin-right:0;margin-left:0}fieldset.mg-c-input input[type=radio],fieldset.mg-c-input input[type=checkbox]{width:var(--mg-input-check-size);height:var(--mg-input-check-size);flex-shrink:0;margin:calc((var(--font-size)*var(--line-height) - var(--mg-input-check-size))/2) .6rem 0 0}fieldset.mg-c-input.mg-c-input--label-on-top .mg-c-input__input-group-container{margin-top:.7rem}.mg-c-input__input-container mg-tooltip{margin-left:3rem}.mg-c-input__input-group{display:flex;align-items:start}.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--checkbox-multi .mg-c-input__input-checkbox-multi{display:flex;flex-wrap:wrap;column-gap:calc(var(--mg-inputs-spacer)*1.2)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-checkbox-multi--with-values.mg-c-input__input-checkbox-multi{gap:.4rem}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-checkbox-multi .mg-c-input__input-checkbox-multi-content{display:flex;flex-flow:column nowrap;gap:calc(0.4rem*2)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-checkbox-multi .mg-c-input__input-checkbox-multi-content .mg-c-input__input-group{margin-left:calc(0.4rem*2)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-checkbox-multi--search-mode.mg-c-input__input-checkbox-multi .mg-c-input__input-checkbox-multi-content{width:37rem;height:40rem}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-checkbox-multi-values-container{display:flex;flex-flow:row wrap;gap:calc(0.4rem*1);padding:0;margin:0;list-style:none}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-checkbox-multi-value{display:inline-flex;min-width:var(--default-size);min-height:var(--default-size);box-sizing:border-box;align-items:center;justify-content:center;padding:calc((var(--default-size) - .2rem - var(--font-size)*var(--line-height))/2) 1.1rem;border-radius:.3rem;background-color:hsl(var(--mg-color-dark-5-hsl));font-size:var(--font-size)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-checkbox-multi-no-result{text-align:center}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-checkbox-multi-text,.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-checkbox-multi-title{display:inline;margin:0;color:hsl(var(--mg-color-dark-40-hsl))}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-checkbox-multi-title{margin:0 1.1rem}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-checkbox-multi-sections{display:flex;flex-flow:column wrap;gap:calc(0.4rem*1)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-checkbox-multi-sections-container{display:flex;flex-flow:column nowrap;gap:calc(0.4rem*0);max-height:80vh;padding-right:1rem;overflow-y:auto}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-checkbox-multi-section-header{display:flex;flex-flow:row wrap;gap:calc(0.4rem*2);min-height:var(--default-size);flex-wrap:nowrap;align-items:center;text-wrap:nowrap}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-checkbox-multi-section-header-tootlip{display:inline-block;width:auto;height:auto;margin:0}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-checkbox-multi-section-header-label{font-size:var(--font-size)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-checkbox-multi-inputs{padding:.4rem calc(0.4rem*2) .4rem calc(0.4rem/2);margin:0}.mg-c-input.mg-c-input--checkbox-multi:not(.mg-c-input--label-on-top) mg-tooltip:not(.mg-c-input__input-checkbox-multi-section-header-tootlip){margin-left:var(--mg-inputs-spacer)}.mg-c-input.mg-c-input--checkbox-multi mg-popover{--mg-popover-min-width:7rem;--mg-card-padding:calc(0.4rem * 2)}.mg-c-input.mg-c-input--checkbox-multi mg-input-text{--mg-inputs-margin-bottom:0}";
19
+ const mgInputCheckboxCss = ".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__input-container{width:100%;flex:1 auto}.mg-c-input__box.mg-c-input__box--width{width:100%;min-width:5rem;max-width:calc(17.7rem + var(--mg-inputs-spacer)*2)}.mg-c-input.mg-c-input--width-2 .mg-c-input__box,.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left{max-width:5rem}.mg-c-input.mg-c-input--width-4 .mg-c-input__box,.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left{max-width:7rem}.mg-c-input.mg-c-input--width-16 .mg-c-input__box,.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left{max-width:21rem}.mg-c-input.mg-c-input--width-full .mg-c-input__box{width:100%;max-width:100%}.mg-c-input.mg-c-input--label-on-top.mg-c-input--width-2 .mg-c-input__box,.mg-c-input.mg-c-input--label-on-top.mg-c-input--width-2 .mg-c-input__with-character-left{max-width:5rem}.mg-c-input.mg-c-input--label-on-top.mg-c-input--width-4 .mg-c-input__box,.mg-c-input.mg-c-input--label-on-top.mg-c-input--width-4 .mg-c-input__with-character-left{max-width:7rem}.mg-c-input.mg-c-input--label-on-top.mg-c-input--width-16 .mg-c-input__box,.mg-c-input.mg-c-input--label-on-top.mg-c-input--width-16 .mg-c-input__with-character-left{max-width:21rem}.mg-c-input.mg-c-input--label-on-top.mg-c-input--width-full .mg-c-input__box{width:100%;max-width:100%}.mg-c-input.mg-c-input--label-on-top .mg-c-input__box{width:auto}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:stretch}.mg-c-input.mg-c-input--is-input-group-append ::slotted([slot=append-input]),.mg-c-input.mg-c-input--is-append-input-slot-content ::slotted([slot=append-input]){width:auto}:host(.mg-c-input.mg-c-input--width-full) ::slotted(*:not(mg-input-title)){width:100%;max-width:100%}.mg-c-input.mg-c-input--fieldset{padding:0;border:0;margin-right:0;margin-left:0}.mg-c-input.mg-c-input--fieldset input[type=radio],.mg-c-input.mg-c-input--fieldset input[type=checkbox]{width:var(--mg-input-check-size);height:var(--mg-input-check-size);flex-shrink:0;margin:calc((var(--font-size)*var(--line-height) - var(--mg-input-check-size))/2) .6rem 0 0}.mg-c-input.mg-c-input--fieldset .mg-c-input__input-group{display:flex;align-items:start}.mg-c-input.mg-c-input--fieldset .mg-c-input__input-group-container{display:flex;flex-wrap:wrap;padding:0;margin:0;margin-top:calc((var(--default-size) - var(--font-size)*var(--line-height))/2);gap:1rem 2.3rem;list-style:none}.mg-c-input.mg-c-input--fieldset.mg-c-input--vertical-list .mg-c-input__input-group-container,.mg-c-input.mg-c-input--fieldset.mg-c-input--checkbox-multi .mg-c-input__input-group-container{flex-direction:column}.mg-c-input.mg-c-input--fieldset.mg-c-input--label-on-top .mg-c-input__input-group-container{margin-top:.7rem}:host(.mg-c-input.mg-c-input--fieldset:not(.mg-c-input--checkbox-multi)) .mg-c-input__input-container mg-tooltip{margin-left:3rem}:host(.mg-c-input.mg-c-input--checkbox) .mg-c-input__input,:host(.mg-c-input.mg-c-input--radio) .mg-c-input__input{min-height:unset;align-items:flex-start}:host{display:block}.mg-c-input__input mg-icon,.mg-c-input__error mg-icon{display:flex}.mg-c-input{display:flex;min-height:var(--default-size);align-items:flex-start;margin-bottom:var(--mg-inputs-margin-bottom, 0)}.mg-c-input__input-container{min-height:var(--default-size)}.mg-c-input__input-container>ul{display:flex;flex-flow:column wrap;padding:0;margin:0;list-style:none;row-gap:.8rem}.mg-c-input__input-container>strong{display:inline-block}.mg-c-input__input-container>strong,.mg-c-input__input-container>ul{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{display:flex;min-height:var(--default-size);align-items:center;justify-content:start}.mg-c-input__input mg-tooltip{align-self:baseline;margin-top:calc((var(--default-size) - var(--mg-icon-regular-size))/2)}.mg-c-input__input .mg-c-input__box:disabled,.mg-c-input__input ::slotted(.mg-c-input__button-toggle:disabled),.mg-c-input__input-group--disabled label,.mg-c-input.mg-c-input--checkbox-multi.mg-c-input--disabled .mg-c-input__input-container strong{opacity:var(--mg-disabled-opacity)}.mg-c-input__title{display:flex;width:var(--mg-inputs-title-width, auto);flex-shrink:0;align-items:baseline;justify-content:flex-end;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__title slot[name=label]+mg-tooltip{margin-left:.4rem}.mg-c-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-c-input__error{display:inline-block;padding:.3rem .8rem;border-radius:.3rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}.mg-c-input__error ::slotted(*),.mg-c-input__help-text ::slotted(*){font-size:1.2rem;text-align:start}.mg-c-input__help-text+.mg-c-input__error{margin-top:.2rem}:host(:not(.mg-c-input--textarea)) .mg-c-input__input+.mg-c-input__error,:host(:not(.mg-c-input--textarea)) .mg-c-input__input+.mg-c-input__help-text{margin-top:.5rem}.mg-c-input.mg-c-input--readonly>*:not([slot=label],[name=append-input]),.mg-c-input.mg-c-input--readonly ::slotted(mg-button[slot=append-input]){display:none}.mg-c-input.mg-c-input--has-error .mg-c-input__box{border-color:hsl(var(--color-danger))}:host(.mg-c-input){display:flex}:host(.mg-c-input.mg-c-input--textarea.mg-c-input--readonly) .mg-c-input__input-container{white-space:pre-line}:host(.mg-c-input.mg-c-input--checkbox,.mg-c-input.mg-c-input--radio) .mg-c-input__input{min-height:unset}:host(.mg-c-input.mg-c-input--label-on-top){flex-direction:column}:host(.mg-c-input.mg-c-input--label-on-top) .mg-c-input__title{width:100%;flex:0;justify-content:flex-start;margin-top:0;margin-right:0;margin-bottom:.3rem;text-align:left}:host(.mg-c-input.mg-c-input--label-on-top) .mg-c-input__title ::slotted(mg-input-title){flex-shrink:1}@media screen and (max-width: 767px){:host(.mg-c-input){flex-direction:column}:host(.mg-c-input) .mg-c-input__title{width:100%;flex:0;justify-content:flex-start;margin-top:0;margin-right:0;margin-bottom:.3rem;text-align:left}:host(.mg-c-input) .mg-c-input__title ::slotted(mg-input-title){flex-shrink:1}}.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--checkbox-multi .mg-c-input__input-group-container{padding:.4rem calc(0.4rem*2) .4rem calc(0.4rem/2);margin:0}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-container{display:flex;width:unset;flex:unset;flex-wrap:wrap;column-gap:calc(var(--mg-inputs-spacer)*1.2)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-container-list{display:flex;flex-flow:row wrap;gap:calc(0.4rem*1);padding:0;margin:0;list-style:none}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__sections{display:flex;flex-flow:column nowrap;gap:calc(0.4rem*0);max-height:80vh;padding-right:1rem;overflow-y:auto}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__section-header{display:flex;flex-flow:row wrap;gap:calc(0.4rem*2);min-height:var(--default-size);flex-wrap:nowrap;align-items:center;text-wrap:nowrap}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__section-header-tootlip{display:inline-block;width:auto;height:auto;margin:0}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__section-header-title{display:inline;margin:0;color:hsl(var(--mg-color-dark-40-hsl))}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__section-header-title-label{font-size:var(--font-size)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__section-header-title--static.mg-c-input__section-header-title{margin:0 1.1rem}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-value{display:inline-flex;min-width:var(--default-size);min-height:var(--default-size);box-sizing:border-box;align-items:center;justify-content:center;padding:calc((var(--default-size) - .2rem - var(--font-size)*var(--line-height))/2) 1.1rem;border-radius:.3rem;background-color:hsl(var(--mg-color-dark-5-hsl));font-size:var(--font-size)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__content{display:flex;flex-flow:column nowrap;gap:calc(0.4rem*2)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-group{margin-left:calc(0.4rem*2)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-no-result{text-align:center}.mg-c-input.mg-c-input--checkbox-multi.mg-c-input--with-values .mg-c-input__input-container{gap:.4rem}.mg-c-input.mg-c-input--checkbox-multi.mg-c-input--search-mode .mg-c-input__content{width:37rem;height:40rem}.mg-c-input.mg-c-input--checkbox-multi:not(.mg-c-input--label-on-top) mg-tooltip:not(.mg-c-input__section-header-tootlip){margin-left:var(--mg-inputs-spacer)}.mg-c-input.mg-c-input--checkbox-multi mg-popover{--mg-popover-min-width:7rem;--mg-card-padding:calc(0.4rem * 2)}.mg-c-input.mg-c-input--checkbox-multi mg-input-text{--mg-inputs-margin-bottom:0}";
20
20
  const MgInputCheckboxStyle0 = mgInputCheckboxCss;
21
21
 
22
22
  /**
@@ -38,6 +38,9 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
38
38
  this.mode = 'custom';
39
39
  // style
40
40
  this.baseClassName = 'mg-c-input--checkbox';
41
+ this.classTypeMulti = 'mg-c-input--checkbox-multi';
42
+ this.classWithValues = 'mg-c-input--with-values';
43
+ this.classSearchMode = 'mg-c-input--search-mode';
41
44
  // "multi" setup
42
45
  this.multiStart = 5;
43
46
  this.searchStart = 10;
@@ -92,6 +95,7 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
92
95
  */
93
96
  this.handleSearchChange = (event) => {
94
97
  this.searchValue = event.detail;
98
+ event.stopPropagation();
95
99
  };
96
100
  /**
97
101
  * popover display-change handler
@@ -137,16 +141,6 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
137
141
  return o;
138
142
  });
139
143
  };
140
- /**
141
- * Get readonly values
142
- * @returns formated readonly value
143
- */
144
- this.getReadonlyValues = () => this.inputVerticalList
145
- ? this.value.filter(({ value }) => value).map(({ title }) => title)
146
- : this.value
147
- .filter(({ value }) => value)
148
- .map(({ title }) => title)
149
- .join(', ');
150
144
  /**
151
145
  * has invalid input
152
146
  * @returns true if at least one input is invalid
@@ -159,7 +153,7 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
159
153
  this.searchResults = this.checkboxItems.filter(item => Ne(item.title).includes(Ne(this.searchValue)));
160
154
  };
161
155
  /**
162
- * Methode to validate if one of inputs value is checked id required
156
+ * Method to validate if one of inputs value is checked id required
163
157
  * @returns truthy if condition is valid
164
158
  */
165
159
  this.validateRequired = () => !this.required || this.checkboxItems.some(({ value }) => value);
@@ -230,7 +224,7 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
230
224
  this.helpText = undefined;
231
225
  this.valid = undefined;
232
226
  this.invalid = undefined;
233
- this.classCollection = new Me([this.baseClassName]);
227
+ this.classCollection = new Me([this.baseClassName, classFieldset]);
234
228
  this.errorMessage = undefined;
235
229
  this.checkboxItems = [];
236
230
  this.displaySearchInput = undefined;
@@ -255,16 +249,32 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
255
249
  this.mode = 'auto';
256
250
  this.type = checkboxTypes[0];
257
251
  }
252
+ else if (newValue === 'multi') {
253
+ this.classCollection.add(this.classTypeMulti);
254
+ this.element.dataset.mgPopoverGuard = this.getMgPopoverIdentifier();
255
+ }
258
256
  else {
259
- const className = `${this.baseClassName}-multi`;
260
- if (newValue === 'multi') {
261
- this.classCollection.add(className);
262
- this.element.dataset.mgPopoverGuard = this.getMgPopoverIdentifier();
263
- }
264
- else
265
- this.classCollection.delete(className);
257
+ this.classCollection.delete(this.classTypeMulti);
266
258
  }
267
259
  }
260
+ watchInputVerticalList(newValue) {
261
+ if (newValue)
262
+ this.classCollection.add(classVerticalList);
263
+ else
264
+ this.classCollection.delete(classVerticalList);
265
+ }
266
+ watchReadonly(newValue) {
267
+ if (newValue)
268
+ this.classCollection.add(classReadonly);
269
+ else
270
+ this.classCollection.delete(classReadonly);
271
+ }
272
+ watchDisplaySelectedValues(newValue) {
273
+ if (newValue)
274
+ this.classCollection.add(this.classWithValues);
275
+ else
276
+ this.classCollection.delete(this.classWithValues);
277
+ }
268
278
  handleValidityChange(newValue, _oldValue, prop) {
269
279
  if (prop !== 'readonly')
270
280
  this.updateCheckboxItems(prop, newValue);
@@ -276,11 +286,10 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
276
286
  this.setButtonText();
277
287
  }
278
288
  validateDisabled(newValue) {
279
- const className = `${this.baseClassName}-multi-disabled`;
280
- if (newValue && this.type === 'multi')
281
- this.classCollection.add(className);
289
+ if (newValue)
290
+ this.classCollection.add(classDisabled);
282
291
  else
283
- this.classCollection.delete(className);
292
+ this.classCollection.delete(classDisabled);
284
293
  }
285
294
  validateCheckboxItems(newValue) {
286
295
  // For the 'auto' mode we update the type depending on the new value's length.
@@ -293,6 +302,12 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
293
302
  this.updateSearchResults();
294
303
  this.setButtonText();
295
304
  }
305
+ watchDisplaySearchInput(newValue) {
306
+ if (newValue)
307
+ this.classCollection.add(this.classSearchMode);
308
+ else
309
+ this.classCollection.delete(this.classSearchMode);
310
+ }
296
311
  validateSearchValue() {
297
312
  // refresh search values
298
313
  this.updateSearchResults();
@@ -367,7 +382,10 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
367
382
  this.validateType(this.type);
368
383
  this.validateValue(this.value);
369
384
  this.validateDisabled(this.disabled);
370
- this.legendId = `${this.identifier}-title`;
385
+ this.watchReadonly(this.readonly);
386
+ this.watchInputVerticalList(this.inputVerticalList);
387
+ this.watchDisplaySelectedValues(this.displaySelectedValues);
388
+ this.watchDisplaySearchInput(this.displaySearchInput);
371
389
  // Check validity when component is ready
372
390
  // return a promise to process action only in the FIRST render().
373
391
  // https://stenciljs.com/docs/component-lifecycle#componentwillload
@@ -381,7 +399,6 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
381
399
  componentDidLoad() {
382
400
  var _a, _b;
383
401
  if (!this.readonly) {
384
- this.element.shadowRoot.querySelector('legend').setAttribute('id', this.legendId);
385
402
  this.searchInput = (_a = this.element.shadowRoot.querySelector('mg-input-text')) === null || _a === void 0 ? void 0 : _a.shadowRoot.querySelector('input');
386
403
  (_b = this.searchInput) === null || _b === void 0 ? void 0 : _b.addEventListener('keydown', this.handleKeydown);
387
404
  }
@@ -414,36 +431,33 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
414
431
  renderCheckboxMulti() {
415
432
  const selectedValuesNb = this.getSelectedItems().length;
416
433
  const checkboxes = this.getDisplayItems();
417
- return (h("div", { class: {
418
- 'mg-c-input__input-container': true,
419
- 'mg-c-input__input-checkbox-multi': true,
420
- 'mg-c-input__input-checkbox-multi--with-values': this.displaySelectedValues,
421
- 'mg-c-input__input-checkbox-multi--search-mode': this.displaySearchInput,
422
- } }, h("mg-popover", { arrowHide: true, identifier: this.getMgPopoverIdentifier(), display: this.hasOpenedPopover, "onDisplay-change": this.handleMgPopoverDisplayChange, ref: (el) => {
434
+ return (h("div", { class: "mg-c-input__input-container" }, h("mg-popover", { arrowHide: true, identifier: this.getMgPopoverIdentifier(), display: this.hasOpenedPopover, "onDisplay-change": this.handleMgPopoverDisplayChange, ref: (el) => {
423
435
  if (el)
424
436
  this.mgPopover = el;
425
- } }, h("mg-button", { variant: "secondary", "aria-describedby": this.legendId }, h("mg-icon", { icon: "list" }), this.messages.input.checkbox[this.selectValuesButtonKey]), h("div", { slot: "content", class: "mg-c-input__input-checkbox-multi-content" }, this.displaySearchInput ? ([
437
+ } }, h("mg-button", { variant: "secondary", "aria-describedby": `${this.identifier}-title` }, h("mg-icon", { icon: "list" }), this.messages.input.checkbox[this.selectValuesButtonKey]), h("div", { slot: "content", class: "mg-c-input__content" }, this.displaySearchInput ? ([
426
438
  h("mg-input-text", { key: "input-search", identifier: `${this.identifier}-input-search`, icon: "magnifying-glass", type: "search", placeholder: this.messages.input.checkbox.label, label: this.messages.input.checkbox.label, mgWidth: "full", value: this.searchValue, labelHide: true, displayCharacterLeft: false, name: "q", "onValue-change": this.handleSearchChange, "aria-controls": "search-results items-list" }),
427
439
  h("p", { key: "search-results", role: "status", class: "mg-u-visually-hidden", id: "search-results" }, `${checkboxes.length} ${this.messages.input.checkbox[checkboxes.length > 0 ? 'results' : 'result']}`),
428
- h("div", { key: "sections-container", class: "mg-c-input__input-checkbox-multi-sections-container" }, this.renderCheckboxBySection(checkboxes)),
429
- ]) : (h(MgInputCheckboxList, { checkboxes: checkboxes, inputVerticalList: true, type: this.type, displaySearchInput: this.displaySearchInput, messages: this.messages.input.checkbox, id: "checkboxes-list", disabled: this.disabled, name: this.name, invalid: this.invalid })), this.displaySearchInput && checkboxes.length === 0 && h("p", { class: "mg-c-input__input-checkbox-multi-no-result" }, this.messages.input.checkbox.noResult))), this.displaySelectedValues ? (selectedValuesNb > 0 && (h("ul", { role: "list", class: "mg-c-input__input-checkbox-multi-values-container" }, this.getSelectedItems().map(({ title }) => (h("li", { class: "mg-c-input__input-checkbox-multi-value", key: title }, title)))))) : (h("strong", null, this.messages.input.checkbox[selectedValuesNb > 1 ? 'selectedValues' : 'selectedValue'].replace('{nb}', selectedValuesNb)))));
440
+ h("div", { key: "sections-container", class: "mg-c-input__sections" }, this.renderCheckboxBySection(checkboxes)),
441
+ ]) : (h(MgInputCheckboxList, { checkboxes: checkboxes, displaySearchInput: this.displaySearchInput, messages: this.messages.input.checkbox, id: "checkboxes-list", disabled: this.disabled, name: this.name, invalid: this.invalid })), this.displaySearchInput && checkboxes.length === 0 && h("p", { class: "mg-c-input__input-no-result" }, this.messages.input.checkbox.noResult))), this.displaySelectedValues ? (selectedValuesNb > 0 && (h("ul", { role: "list", class: "mg-c-input__input-container-list" }, this.getSelectedItems().map(({ title }) => (h("li", { class: "mg-c-input__input-value", key: title }, title)))))) : (h("strong", null, this.messages.input.checkbox[selectedValuesNb > 1 ? 'selectedValues' : 'selectedValue'].replace('{nb}', selectedValuesNb)))));
430
442
  }
431
443
  /**
432
444
  * Render
433
445
  * @returns HTML Element
434
446
  */
435
447
  render() {
436
- var _a;
437
- return (h(MgInput, { key: 'a36e398ac67e25249ea078b9ad70af146f045fde', identifier: this.identifier, classCollection: this.classCollection, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: !this.readonly ? this.required : undefined, readonly: this.readonly, mgWidth: undefined, disabled: this.disabled, value: (_a = this.value) === null || _a === void 0 ? void 0 : _a.toString(), readonlyValue: this.getReadonlyValues(), tooltip: !this.readonly ? this.tooltip : undefined, tooltipPosition: this.tooltipPosition, helpText: !this.readonly ? this.helpText : undefined, errorMessage: !this.readonly ? this.errorMessage : undefined, isFieldset: true }, this.type === 'checkbox' ? (h(MgInputCheckboxList, { checkboxes: this.checkboxItems, inputVerticalList: this.inputVerticalList, type: this.type, displaySearchInput: this.displaySearchInput, messages: this.messages.input.checkbox, id: "checkboxes-list", disabled: this.disabled, name: this.name, invalid: this.invalid })) : (this.renderCheckboxMulti())));
448
+ return (h("mg-input", { key: '97f239b0bb233a2ea1afb4124f810a54c0be09f9', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: !this.readonly ? this.required : undefined, readonlyValue: this.value.filter(({ value }) => value).map(({ title }) => title), tooltip: !this.readonly ? this.tooltip : undefined, tooltipPosition: this.tooltipPosition, helpText: !this.readonly ? this.helpText : undefined, errorMessage: !this.readonly ? this.errorMessage : undefined }, this.type === 'checkbox' || this.readonly ? (h(MgInputCheckboxList, { checkboxes: this.checkboxItems, displaySearchInput: this.displaySearchInput, messages: this.messages.input.checkbox, id: "checkboxes-list", disabled: this.disabled, name: this.name, invalid: this.invalid })) : (this.renderCheckboxMulti())));
438
449
  }
439
450
  get element() { return this; }
440
451
  static get watchers() { return {
441
452
  "value": ["validateValue"],
442
453
  "type": ["validateType"],
454
+ "inputVerticalList": ["watchInputVerticalList"],
455
+ "readonly": ["watchReadonly", "handleValidityChange"],
456
+ "displaySelectedValues": ["watchDisplaySelectedValues"],
443
457
  "required": ["handleValidityChange"],
444
- "readonly": ["handleValidityChange"],
445
458
  "disabled": ["handleValidityChange", "validateDisabled"],
446
459
  "checkboxItems": ["validateCheckboxItems"],
460
+ "displaySearchInput": ["watchDisplaySearchInput"],
447
461
  "searchValue": ["validateSearchValue"]
448
462
  }; }
449
463
  static get style() { return MgInputCheckboxStyle0; }
@@ -477,17 +491,20 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class MgInputCheckbox
477
491
  }, undefined, {
478
492
  "value": ["validateValue"],
479
493
  "type": ["validateType"],
494
+ "inputVerticalList": ["watchInputVerticalList"],
495
+ "readonly": ["watchReadonly", "handleValidityChange"],
496
+ "displaySelectedValues": ["watchDisplaySelectedValues"],
480
497
  "required": ["handleValidityChange"],
481
- "readonly": ["handleValidityChange"],
482
498
  "disabled": ["handleValidityChange", "validateDisabled"],
483
499
  "checkboxItems": ["validateCheckboxItems"],
500
+ "displaySearchInput": ["watchDisplaySearchInput"],
484
501
  "searchValue": ["validateSearchValue"]
485
502
  }]);
486
503
  function defineCustomElement$1() {
487
504
  if (typeof customElements === "undefined") {
488
505
  return;
489
506
  }
490
- const components = ["mg-input-checkbox", "mg-button", "mg-card", "mg-character-left", "mg-icon", "mg-input-checkbox-paginated", "mg-input-select", "mg-input-text", "mg-input-title", "mg-pagination", "mg-popover", "mg-popover-content", "mg-tooltip", "mg-tooltip-content"];
507
+ const components = ["mg-input-checkbox", "mg-button", "mg-card", "mg-character-left", "mg-icon", "mg-input", "mg-input-checkbox-paginated", "mg-input-select", "mg-input-text", "mg-input-title", "mg-pagination", "mg-popover", "mg-popover-content", "mg-tooltip", "mg-tooltip-content"];
491
508
  components.forEach(tagName => { switch (tagName) {
492
509
  case "mg-input-checkbox":
493
510
  if (!customElements.get(tagName)) {
@@ -496,20 +513,25 @@ function defineCustomElement$1() {
496
513
  break;
497
514
  case "mg-button":
498
515
  if (!customElements.get(tagName)) {
499
- defineCustomElement$e();
516
+ defineCustomElement$f();
500
517
  }
501
518
  break;
502
519
  case "mg-card":
503
520
  if (!customElements.get(tagName)) {
504
- defineCustomElement$d();
521
+ defineCustomElement$e();
505
522
  }
506
523
  break;
507
524
  case "mg-character-left":
508
525
  if (!customElements.get(tagName)) {
509
- defineCustomElement$c();
526
+ defineCustomElement$d();
510
527
  }
511
528
  break;
512
529
  case "mg-icon":
530
+ if (!customElements.get(tagName)) {
531
+ defineCustomElement$c();
532
+ }
533
+ break;
534
+ case "mg-input":
513
535
  if (!customElements.get(tagName)) {
514
536
  defineCustomElement$b();
515
537
  }