@mgdis/mg-components 6.24.0 → 6.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/dist/cjs/index-Acmyl4hv.js +5 -0
  2. package/dist/cjs/{index-BxB20_Vw.js → index-B6J2EllP.js} +3 -1
  3. package/dist/cjs/{index-BEF-cqV9.js → index-BmFwLEZT.js} +5 -1
  4. package/dist/cjs/{index-CpENFzEo.js → index-DrZECzp6.js} +14 -6
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/mg-action-more_36.cjs.entry.js +452 -261
  7. package/dist/cjs/mg-alert.cjs.entry.js +7 -8
  8. package/dist/cjs/mg-breadcrumb.cjs.entry.js +27 -10
  9. package/dist/cjs/mg-components.cjs.js +2 -2
  10. package/dist/cjs/mg-fieldset.cjs.entry.js +8 -8
  11. package/dist/cjs/mg-illustration.cjs.entry.js +57 -0
  12. package/dist/cjs/mg-input-combobox.cjs.entry.js +40 -23
  13. package/dist/cjs/mg-input-file.cjs.entry.js +12 -11
  14. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +2565 -4013
  15. package/dist/cjs/mg-loader.cjs.entry.js +5 -5
  16. package/dist/cjs/mg-progress.cjs.entry.js +3 -3
  17. package/dist/collection/assets/illustrations/index.js +1 -0
  18. package/dist/collection/assets/jodit/jodit.css +5821 -0
  19. package/dist/collection/collection-manifest.json +1 -0
  20. package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js +1 -1
  21. package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +1 -1
  22. package/dist/collection/components/atoms/mg-badge/mg-badge.js +1 -1
  23. package/dist/collection/components/atoms/mg-button/mg-button.js +4 -1
  24. package/dist/collection/components/atoms/mg-card/mg-card.js +1 -1
  25. package/dist/collection/components/atoms/mg-divider/mg-divider.conf.js +4 -0
  26. package/dist/collection/components/atoms/mg-divider/mg-divider.js +62 -3
  27. package/dist/collection/components/atoms/mg-icon/mg-icon.js +1 -1
  28. package/dist/collection/components/atoms/mg-illustration/mg-illustration.conf.js +1 -0
  29. package/dist/collection/components/atoms/mg-illustration/mg-illustration.js +95 -0
  30. package/dist/collection/components/atoms/mg-tag/mg-tag.js +1 -1
  31. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +1 -1
  32. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +9 -7
  33. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +84 -19
  34. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +5 -2
  35. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.js +5 -1
  36. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +30 -22
  37. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +69 -25
  38. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +14 -8
  39. package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +8 -7
  40. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +21 -12
  41. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +9 -8
  42. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +15 -10
  43. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/custom-properties.css +50 -0
  44. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/index.js +29 -3
  45. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +262 -9
  46. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +21 -19
  47. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +18 -13
  48. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +7 -7
  49. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +10 -9
  50. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +1 -1
  51. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +7 -5
  52. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +18 -17
  53. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +7 -4
  54. package/dist/collection/components/molecules/mg-alert/mg-alert.js +6 -7
  55. package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.js +49 -6
  56. package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
  57. package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +6 -6
  58. package/dist/collection/components/molecules/mg-form/mg-form.js +16 -13
  59. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.js +4 -0
  60. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +51 -2
  61. package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
  62. package/dist/collection/components/molecules/mg-message/mg-message.js +2 -2
  63. package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
  64. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +8 -4
  65. package/dist/collection/components/molecules/mg-panel/mg-panel.js +13 -4
  66. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +2 -2
  67. package/dist/collection/components/molecules/mg-popover/mg-popover.js +24 -37
  68. package/dist/collection/components/molecules/mg-progress/mg-progress.js +1 -1
  69. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +5 -3
  70. package/dist/collection/components/molecules/mg-table/mg-table.js +10 -6
  71. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +12 -9
  72. package/dist/collection/utils/behaviors.utils.js +3 -3
  73. package/dist/collection/utils/playwright.fixture.js +7 -2
  74. package/dist/components/mg-action-more.js +1 -1
  75. package/dist/components/mg-alert.js +1 -1
  76. package/dist/components/mg-badge2.js +1 -1
  77. package/dist/components/mg-breadcrumb.js +1 -1
  78. package/dist/components/mg-button2.js +1 -1
  79. package/dist/components/mg-card2.js +1 -1
  80. package/dist/components/mg-character-left2.js +1 -1
  81. package/dist/components/mg-details.js +1 -1
  82. package/dist/components/mg-divider2.js +1 -1
  83. package/dist/components/mg-fieldset.js +1 -1
  84. package/dist/components/mg-form.js +1 -1
  85. package/dist/components/mg-icon2.js +1 -1
  86. package/dist/components/mg-illustrated-message.js +1 -1
  87. package/dist/components/mg-illustration.d.ts +11 -0
  88. package/dist/components/mg-illustration.js +1 -0
  89. package/dist/components/mg-input-checkbox.js +1 -1
  90. package/dist/components/mg-input-combobox.js +1 -1
  91. package/dist/components/mg-input-date.js +1 -1
  92. package/dist/components/mg-input-file.js +1 -1
  93. package/dist/components/mg-input-numeric.js +1 -1
  94. package/dist/components/mg-input-password.js +1 -1
  95. package/dist/components/mg-input-radio.js +1 -1
  96. package/dist/components/mg-input-rich-text-editor.js +294 -284
  97. package/dist/components/mg-input-select2.js +1 -1
  98. package/dist/components/mg-input-text2.js +1 -1
  99. package/dist/components/mg-input-textarea.js +1 -1
  100. package/dist/components/mg-input-title2.js +1 -1
  101. package/dist/components/mg-input-toggle.js +1 -1
  102. package/dist/components/mg-input2.js +1 -1
  103. package/dist/components/mg-item-more2.js +1 -1
  104. package/dist/components/mg-loader2.js +1 -1
  105. package/dist/components/mg-menu-item2.js +1 -1
  106. package/dist/components/mg-message2.js +1 -1
  107. package/dist/components/mg-modal.js +1 -1
  108. package/dist/components/mg-pagination.js +1 -1
  109. package/dist/components/mg-panel.js +1 -1
  110. package/dist/components/mg-popover-content2.js +1 -1
  111. package/dist/components/mg-popover2.js +1 -1
  112. package/dist/components/mg-progress.js +1 -1
  113. package/dist/components/mg-skip-links.js +1 -1
  114. package/dist/components/mg-table.js +1 -1
  115. package/dist/components/mg-tabs2.js +1 -1
  116. package/dist/components/mg-tag.js +1 -1
  117. package/dist/components/mg-tooltip-content2.js +1 -1
  118. package/dist/components/mg-tooltip2.js +1 -1
  119. package/dist/custom-elements.json +197 -48
  120. package/dist/esm/{index-C7xjtdiw.js → index-91BOpzAB.js} +14 -6
  121. package/dist/esm/{index-DSEloqPn.js → index-BfblyCaJ.js} +3 -1
  122. package/dist/esm/index-Ci9Hv7DG.js +3 -0
  123. package/dist/esm/{index-DshvCiTL.js → index-D4bO_UCn.js} +5 -1
  124. package/dist/esm/loader.js +3 -3
  125. package/dist/esm/mg-action-more_36.entry.js +449 -258
  126. package/dist/esm/mg-alert.entry.js +7 -8
  127. package/dist/esm/mg-breadcrumb.entry.js +27 -10
  128. package/dist/esm/mg-components.js +3 -3
  129. package/dist/esm/mg-fieldset.entry.js +8 -8
  130. package/dist/esm/mg-illustration.entry.js +55 -0
  131. package/dist/esm/mg-input-combobox.entry.js +40 -23
  132. package/dist/esm/mg-input-file.entry.js +12 -11
  133. package/dist/esm/mg-input-rich-text-editor.entry.js +2550 -3998
  134. package/dist/esm/mg-loader.entry.js +5 -5
  135. package/dist/esm/mg-progress.entry.js +3 -3
  136. package/dist/mg-components/mg-components.css +1 -1
  137. package/dist/mg-components/mg-components.esm.js +1 -1
  138. package/dist/mg-components/p-206505b5.entry.js +1667 -0
  139. package/dist/mg-components/{p-cdb01923.entry.js → p-3ad7441c.entry.js} +1 -1
  140. package/dist/mg-components/p-413b4536.entry.js +1 -0
  141. package/dist/mg-components/p-5dff879a.entry.js +1 -0
  142. package/dist/mg-components/{p-08d3d957.entry.js → p-96fc508e.entry.js} +1 -1
  143. package/dist/mg-components/p-Ci9Hv7DG.js +1 -0
  144. package/dist/mg-components/p-D4bO_UCn.js +2 -0
  145. package/dist/mg-components/{p-d0b6d8f5.entry.js → p-ad533d08.entry.js} +1 -1
  146. package/dist/mg-components/p-b20f3698.entry.js +1 -0
  147. package/dist/mg-components/p-bf2252c9.entry.js +1 -0
  148. package/dist/mg-components/p-d0d12800.entry.js +1 -0
  149. package/dist/mg-components/p-f8e58181.entry.js +1 -0
  150. package/dist/types/assets/illustrations/index.d.ts +21 -0
  151. package/dist/types/components/atoms/mg-divider/mg-divider.conf.d.ts +9 -0
  152. package/dist/types/components/atoms/mg-divider/mg-divider.d.ts +13 -0
  153. package/dist/types/components/atoms/mg-illustration/mg-illustration.conf.d.ts +5 -0
  154. package/dist/types/components/atoms/mg-illustration/mg-illustration.d.ts +24 -0
  155. package/dist/types/components/molecules/inputs/mg-input/mg-input.d.ts +19 -0
  156. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +1 -1
  157. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +10 -5
  158. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +2 -2
  159. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +2 -2
  160. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +2 -2
  161. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +1 -1
  162. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.conf.d.ts +4 -0
  163. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.conf.d.ts +25 -0
  164. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +61 -2
  165. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +2 -2
  166. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +2 -2
  167. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +2 -2
  168. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +2 -2
  169. package/dist/types/components/molecules/menus/mg-menu-item/mg-menu-item.d.ts +2 -2
  170. package/dist/types/components/molecules/mg-alert/mg-alert.d.ts +2 -2
  171. package/dist/types/components/molecules/mg-breadcrumb/mg-breadcrumb.d.ts +11 -0
  172. package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.conf.d.ts +8 -0
  173. package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.d.ts +9 -1
  174. package/dist/types/components/molecules/mg-popover/mg-popover-content/mg-popover-content.d.ts +1 -1
  175. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +3 -3
  176. package/dist/types/components/molecules/mg-skip-links/mg-skip-links.d.ts +1 -1
  177. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +1 -1
  178. package/dist/types/components.d.ts +158 -42
  179. package/ide/intellij/web-types.json +145 -65
  180. package/ide/vscode/css-custom-data.json +6 -2
  181. package/ide/vscode/html-custom-data.json +216 -33
  182. package/package.json +22 -22
  183. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/custom-properties.scss +0 -212
  184. package/dist/mg-components/p-13feb37a.entry.js +0 -1
  185. package/dist/mg-components/p-7c63e469.entry.js +0 -1
  186. package/dist/mg-components/p-7fd3e519.entry.js +0 -1
  187. package/dist/mg-components/p-9953b835.entry.js +0 -1
  188. package/dist/mg-components/p-9c0a9fc7.entry.js +0 -1657
  189. package/dist/mg-components/p-DshvCiTL.js +0 -2
  190. package/dist/mg-components/p-a338088e.entry.js +0 -1
  191. /package/dist/mg-components/{p-C7xjtdiw.js → p-91BOpzAB.js} +0 -0
  192. /package/dist/mg-components/{p-DSEloqPn.js → p-BfblyCaJ.js} +0 -0
@@ -9,6 +9,7 @@
9
9
  "components/atoms/internals/mg-input-title/mg-input-title.js",
10
10
  "components/atoms/mg-card/mg-card.js",
11
11
  "components/atoms/mg-divider/mg-divider.js",
12
+ "components/atoms/mg-illustration/mg-illustration.js",
12
13
  "components/atoms/mg-tag/mg-tag.js",
13
14
  "components/atoms/mg-tooltip/mg-tooltip.js",
14
15
  "components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js",
@@ -37,7 +37,7 @@ export class MgCharacterLeft {
37
37
  * @returns HTML Element
38
38
  */
39
39
  render() {
40
- return (h("span", { key: '41b489eafc25e9fe2e32b54a72542090d79e1052', id: this.identifier, "aria-live": "polite" }, h("span", { key: 'c9dd3eb15ebc866333d4e911e1a560cac1c07ef7', "aria-hidden": "true" }, this.maxlength - this.characters.length, "/", this.maxlength), h("span", { key: '0e4664f577b8db68f0355fc92f9df251f945dedd', class: "mg-u-visually-hidden" }, this.messages.nbCharLeft.replace('{counter}', this.maxlength - this.characters.length))));
40
+ return (h("span", { key: '45b074ad1ffaa1041e5c4d62417ed44ea76aa218', id: this.identifier, "aria-live": "polite" }, h("span", { key: 'ed5f631cb268f888287e5ffafbd5ce22b07c71d5', "aria-hidden": "true" }, this.maxlength - this.characters.length, "/", this.maxlength), h("span", { key: 'd9cda093c2ece7c3e39ea1bbd9499318c964b7f6', class: "mg-u-visually-hidden" }, this.messages.nbCharLeft.replace('{counter}', this.maxlength - this.characters.length))));
41
41
  }
42
42
  static get is() { return "mg-character-left"; }
43
43
  static get encapsulation() { return "scoped"; }
@@ -44,7 +44,7 @@ export class MgInputTitle {
44
44
  render() {
45
45
  const TagName = this.readonly ? 'span' : this.tagName;
46
46
  // \u00A0 represent a  
47
- return (h(TagName, { key: '316341d052fa751e442f749ce66e2712ecd864c2', class: "mg-c-input-title", htmlFor: !this.isLegend && this.identifier, id: this.isLegend ? `${this.identifier}-title` : undefined }, h("slot", { key: '4df4df8d18f46b09081ebc13619034f923132697' }), this.required && !this.readonly && (h("span", { key: '778a3317990278dd95a450dd9aa91c3afafb1b43', class: "mg-c-input-title__required" }, "\u00A0", h("span", { key: '509a4ecc94111d61f3df3ae28286bf23bf8c7d0f', class: "mg-u-is-asterisk" }, "*")))));
47
+ return (h(TagName, { key: 'a3b4b081eb6612ae8f94e687d6ee55e0a4fc8747', class: "mg-c-input-title", htmlFor: !this.isLegend && this.identifier, id: this.isLegend ? `${this.identifier}-title` : undefined }, h("slot", { key: '849858a8fca06a38cb33da241c52d29ad2af559b' }), this.required && !this.readonly && (h("span", { key: '4b6a62fbe70f027a8123e512cfdaad5c37c8e94a', class: "mg-c-input-title__required" }, "\u00A0", h("span", { key: '520b037e53779a58bc013f40d16ab724da734315', class: "mg-u-is-asterisk" }, "*")))));
48
48
  }
49
49
  static get is() { return "mg-input-title"; }
50
50
  static get encapsulation() { return "scoped"; }
@@ -69,7 +69,7 @@ export class MgBadge {
69
69
  * @returns HTML Element
70
70
  */
71
71
  render() {
72
- return (h("span", { key: 'b4c55957d7e59c889147cf3ddeb57f94c7afdaaa', class: this.classCollection.join() }, h("span", { key: '3f9bfae0e36de3c14d71d3a904f426508b1d5872', class: "mg-c-badge__value" }, this.value), h("span", { key: '2e6ee3c010b6f0c8c1df7bfdd3aed755e5afc0d8', class: "mg-u-visually-hidden" }, this.label)));
72
+ return (h("span", { key: 'af4f655ca8a11422a34cdce3e8febf46269ca574', class: this.classCollection.join() }, h("span", { key: 'bcc8c0a863615ba503f135f562bd970216599df0', class: "mg-c-badge__value" }, this.value), h("span", { key: '136d338c9a7b7791178dec1dae3898f4a7b099ea', class: "mg-u-visually-hidden" }, this.label)));
73
73
  }
74
74
  static get is() { return "mg-badge"; }
75
75
  static get encapsulation() { return "shadow"; }
@@ -162,6 +162,9 @@ export class MgButton {
162
162
  throw new Error(`<mg-button> prop "label" is mandatory when prop "isIcon" is set to true.`);
163
163
  }
164
164
  }
165
+ else {
166
+ this.classCollection.delete(`mg-c-button--icon`);
167
+ }
165
168
  this.setIconSize();
166
169
  }
167
170
  loadingHandler(newValue) {
@@ -207,7 +210,7 @@ export class MgButton {
207
210
  */
208
211
  render() {
209
212
  var _a;
210
- return (h(Host, { key: 'e79494f9da9f0c4c19841d44a85ee955f2e19016', role: "button", tabIndex: this.element.getAttribute('tabindex') || 0, type: this.type, form: this.form, "full-width": this.fullWidth, "aria-label": this.label, "aria-disabled": (_a = this.disabled) === null || _a === void 0 ? void 0 : _a.toString(), onClick: this.handleClick, onKeyup: this.handleKeyup, onKeydown: this.handleKeydown }, h("div", { key: '1a4802637eca8125d09cae3363ff11fe9b50ffd4', class: this.classCollection.join() }, this.loading && h("mg-icon", { key: '9f4512a0ed650c3af63e8216baa5b0eaabd4bfd2', icon: "loader", spin: true }), h("div", { key: '9c0647c6741a0610a516bc2ac1cce328d3004d51', class: "mg-c-button__content" }, h("slot", { key: '7875b875d0a8a8ac74faf233b0cd49462a775dc6' })))));
213
+ return (h(Host, { key: '9efa9dbbcdb2965cb8fd301c86988d0b0d97b474', role: "button", tabIndex: this.element.getAttribute('tabindex') || 0, type: this.type, form: this.form, "full-width": this.fullWidth, "aria-label": this.label, "aria-disabled": (_a = this.disabled) === null || _a === void 0 ? void 0 : _a.toString(), onClick: this.handleClick, onKeyup: this.handleKeyup, onKeydown: this.handleKeydown }, h("div", { key: '36918b5b208a9e0a9650107f4418cac35ade1ed2', class: this.classCollection.join() }, this.loading && h("mg-icon", { key: '8ad3e911d273f69441f2a405f8040cc685a0a486', icon: "loader", spin: true }), h("div", { key: 'a6b199c669ef6b15bfc345c98192290ce11e65cb', class: "mg-c-button__content" }, h("slot", { key: 'b13d317001dbf66c945cdf9e97c06338ce073c12' })))));
211
214
  }
212
215
  static get is() { return "mg-button"; }
213
216
  static get encapsulation() { return "shadow"; }
@@ -58,7 +58,7 @@ export class MgCard {
58
58
  * @returns HTML Element
59
59
  */
60
60
  render() {
61
- return (h("div", { key: 'd652bf6913d37428bb9729d32fb3541543418a71', class: this.classCollection.join() }, h("slot", { key: '5157ee6cf1330c907babad1f2190973dd4d9f39e' })));
61
+ return (h("div", { key: '8fb6d9aa655b838e219a077670ce6296640d0854', class: this.classCollection.join() }, h("slot", { key: '9413035054408e44b8c8bb3f2033ff970931c347' })));
62
62
  }
63
63
  static get is() { return "mg-card"; }
64
64
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * List of all possibles directions
3
+ */
4
+ export const directions = ['horizontal', 'vertical'];
@@ -1,4 +1,6 @@
1
- import { h } from "@stencil/core";
1
+ import { h, Host } from "@stencil/core";
2
+ import { toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { directions } from "./mg-divider.conf";
2
4
  export class MgDivider {
3
5
  constructor() {
4
6
  /**************
@@ -8,16 +10,40 @@ export class MgDivider {
8
10
  * Define component size
9
11
  */
10
12
  this.fullWidth = false;
13
+ /**
14
+ * Define component direction
15
+ */
16
+ this.direction = 'horizontal';
17
+ }
18
+ validateDirection(newValue) {
19
+ if (newValue === '') {
20
+ // Reactive frameworks (ex. Vue) can pass "" instead of undefined.
21
+ // Treat it as "use the default", do not throw.
22
+ this.direction = directions[0];
23
+ }
24
+ else if (!directions.includes(newValue)) {
25
+ throw new Error(`<mg-divider> prop "direction" must be one of: ${directions.join(', ')}. Passed value: ${toString(newValue)}.`);
26
+ }
27
+ }
28
+ /*************
29
+ * Lifecycle *
30
+ *************/
31
+ /**
32
+ * Check if component props are well configured on init
33
+ */
34
+ componentWillLoad() {
35
+ this.validateDirection(this.direction);
11
36
  }
12
37
  /**
13
38
  * Render
14
39
  * @returns HTML Element
15
40
  */
16
41
  render() {
17
- return (h("div", { key: 'a1b0e3b95ed9f52febab9f8d50b4053d1c13f7fb', class: {
42
+ return (h(Host, { key: '33f0896876d43052fd99a20ebf943d3ee30dfc7a', role: "separator", "aria-orientation": this.direction }, h("div", { key: 'a9e87c1d097177b5995649485da427ca25436f8c', class: {
18
43
  'mg-c-divider': true,
19
44
  'mg-c-divider--full-width': this.fullWidth,
20
- } }));
45
+ 'mg-c-divider--direction-vertical': this.direction === 'vertical',
46
+ } })));
21
47
  }
22
48
  static get is() { return "mg-divider"; }
23
49
  static get encapsulation() { return "shadow"; }
@@ -52,7 +78,40 @@ export class MgDivider {
52
78
  "reflect": false,
53
79
  "attribute": "full-width",
54
80
  "defaultValue": "false"
81
+ },
82
+ "direction": {
83
+ "type": "string",
84
+ "mutable": true,
85
+ "complexType": {
86
+ "original": "DividerDirectionType",
87
+ "resolved": "\"horizontal\" | \"vertical\"",
88
+ "references": {
89
+ "DividerDirectionType": {
90
+ "location": "import",
91
+ "path": "./mg-divider.conf",
92
+ "id": "src/components/atoms/mg-divider/mg-divider.conf.ts::DividerDirectionType",
93
+ "referenceLocation": "DividerDirectionType"
94
+ }
95
+ }
96
+ },
97
+ "required": false,
98
+ "optional": false,
99
+ "docs": {
100
+ "tags": [],
101
+ "text": "Define component direction"
102
+ },
103
+ "getter": false,
104
+ "setter": false,
105
+ "reflect": false,
106
+ "attribute": "direction",
107
+ "defaultValue": "'horizontal'"
55
108
  }
56
109
  };
57
110
  }
111
+ static get watchers() {
112
+ return [{
113
+ "propName": "direction",
114
+ "methodName": "validateDirection"
115
+ }];
116
+ }
58
117
  }
@@ -1,4 +1,4 @@
1
- import { sizes, variants, variantStyles } from "./mg-icon.conf";
1
+ import { sizes, variants, variantStyles, } from "./mg-icon.conf";
2
2
  import { ClassList, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
3
  import { icons } from "../../../assets/icons";
4
4
  export class MgIcon {
@@ -0,0 +1,95 @@
1
+ import { toString } from "@mgdis/core-ui-helpers/dist/utils";
2
+ import { illustrations } from "../../../assets/illustrations";
3
+ /**
4
+ * @part illustration - The inlined illustration SVG. Recolor its brand accent through the `--mg-b-color-app` custom property.
5
+ */
6
+ export class MgIllustration {
7
+ constructor() {
8
+ /**
9
+ * Render illustration in shadowroot
10
+ * @param illustration - illustration to render
11
+ */
12
+ this.renderIllustration = (illustration) => {
13
+ var _a;
14
+ // Remove existing SVG from ShadowRoot
15
+ (_a = this.element.shadowRoot.querySelector('svg')) === null || _a === void 0 ? void 0 : _a.remove();
16
+ // Append new SVG to ShadowRoot. A <template> parses the string into an inert fragment,
17
+ // and appending moves the <svg> out of it — no throwaway container element left behind.
18
+ const template = document.createElement('template');
19
+ template.innerHTML = illustrations[illustration];
20
+ this.element.shadowRoot.append(template.content.firstElementChild);
21
+ // Update svg attributes (only the <svg> is swapped above, so Stencil's injected <style> is kept)
22
+ const svg = this.element.shadowRoot.querySelector('svg');
23
+ svg.setAttribute('aria-hidden', 'true');
24
+ svg.setAttribute('focusable', 'false');
25
+ svg.setAttribute('class', 'mg-c-illustration');
26
+ svg.setAttribute('part', 'illustration');
27
+ };
28
+ }
29
+ validateIllustration(newValue) {
30
+ if (!Object.keys(illustrations).includes(newValue)) {
31
+ throw new Error(`<mg-illustration> prop "illustration" must be one of: ${Object.keys(illustrations).join(', ')}. Passed value: ${toString(newValue)}.`);
32
+ }
33
+ else {
34
+ this.renderIllustration(newValue);
35
+ }
36
+ }
37
+ /**
38
+ * Check if props are well configured on init
39
+ */
40
+ componentWillLoad() {
41
+ this.validateIllustration(this.illustration);
42
+ }
43
+ static get is() { return "mg-illustration"; }
44
+ static get encapsulation() { return "shadow"; }
45
+ static get originalStyleUrls() {
46
+ return {
47
+ "$": ["../../../../node_modules/@mgdis/styles/dist/components/mg-illustration.css"]
48
+ };
49
+ }
50
+ static get styleUrls() {
51
+ return {
52
+ "$": ["../../../../node_modules/@mgdis/styles/dist/components/mg-illustration.css"]
53
+ };
54
+ }
55
+ static get properties() {
56
+ return {
57
+ "illustration": {
58
+ "type": "string",
59
+ "mutable": false,
60
+ "complexType": {
61
+ "original": "IllustrationType",
62
+ "resolved": "\"aides\" | \"all-done\" | \"convention-empty\" | \"conviviale\" | \"digital-forms\" | \"digital-security\" | \"disconnected\" | \"documents\" | \"echanges\" | \"empty\" | \"missing-informations\" | \"neutral\" | \"no-data\" | \"no-result\" | \"request-sent\" | \"search-no-result\" | \"secure-data\" | \"stage\" | \"welcome\"",
63
+ "references": {
64
+ "IllustrationType": {
65
+ "location": "import",
66
+ "path": "./mg-illustration.conf",
67
+ "id": "src/components/atoms/mg-illustration/mg-illustration.conf.ts::IllustrationType",
68
+ "referenceLocation": "IllustrationType"
69
+ }
70
+ }
71
+ },
72
+ "required": true,
73
+ "optional": false,
74
+ "docs": {
75
+ "tags": [{
76
+ "name": "mgdis",
77
+ "text": "/img."
78
+ }],
79
+ "text": "Illustration to display, by name from"
80
+ },
81
+ "getter": false,
82
+ "setter": false,
83
+ "reflect": false,
84
+ "attribute": "illustration"
85
+ }
86
+ };
87
+ }
88
+ static get elementRef() { return "element"; }
89
+ static get watchers() {
90
+ return [{
91
+ "propName": "illustration",
92
+ "methodName": "validateIllustration"
93
+ }];
94
+ }
95
+ }
@@ -84,7 +84,7 @@ export class MgTag {
84
84
  * @returns HTML Element
85
85
  */
86
86
  render() {
87
- return (h("span", { key: '3604851191691e002f8f7a701e37abe0059238e3', class: this.classCollection.join() }, h("slot", { key: 'c51e18e61908772878f380d1ae798e5e5f43ca02' })));
87
+ return (h("span", { key: 'd0a9551f29695cd9c49751c4950db3c13065490e', class: this.classCollection.join() }, h("slot", { key: '51f2a2e1c9578f6449bb9c124335ad707d5ebeb1' })));
88
88
  }
89
89
  static get is() { return "mg-tag"; }
90
90
  static get encapsulation() { return "shadow"; }
@@ -11,7 +11,7 @@ export class MgTooltipContent {
11
11
  * @returns HTML Element
12
12
  */
13
13
  render() {
14
- return (h(Host, { key: 'efe7a2b2622713929caf9a2e114e7a1267643f5e', role: "tooltip" }, h("span", { key: '00f0066cfa058e55a88533f8b6daaa8ab283b29c', innerHTML: this.message, class: "mg-tooltip-content__message" }), h("slot", { key: 'fd952c4db7b77b54591bf2c58012096579de45c2', name: "arrow" })));
14
+ return (h(Host, { key: '49dc32a8c7191fb291d2c47fc1e903d16e0774ab', role: "tooltip" }, h("span", { key: '913adc1f23eec27eb4b83cc4f4d9b4c1d6f9b2c2', innerHTML: this.message, class: "mg-tooltip-content__message" }), h("slot", { key: '44da4832c535df385cbde0fd32791d901c538e84', name: "arrow" })));
15
15
  }
16
16
  static get is() { return "mg-tooltip-content"; }
17
17
  static get encapsulation() { return "shadow"; }
@@ -1,5 +1,5 @@
1
1
  import { h, Host } from "@stencil/core";
2
- import { createID, focusableElements, getWindows, isValideID, isValidString, nextTick, toString } from "@mgdis/core-ui-helpers/dist/utils";
2
+ import { createID, focusableElements, getWindows, isValideID, isValidString, nextTick, toString, } from "@mgdis/core-ui-helpers/dist/utils";
3
3
  import { createPopper } from "@popperjs/core";
4
4
  import { Guard } from "./mg-tooltip.conf";
5
5
  /**
@@ -37,7 +37,7 @@ export class MgTooltip {
37
37
  // Make the tooltip visible
38
38
  this.mgTooltipContent.dataset.show = '';
39
39
  // Enable the event listeners
40
- this.popper.setOptions(options => (Object.assign(Object.assign({}, options), { modifiers: [...options.modifiers, { name: 'eventListeners', enabled: true }] })));
40
+ this.popper.setOptions((options) => (Object.assign(Object.assign({}, options), { modifiers: [...options.modifiers, { name: 'eventListeners', enabled: true }] })));
41
41
  // hide when click outside on nextTick to prevent event to trigger after creation
42
42
  nextTick(() => {
43
43
  this.windows.forEach((localWindow) => {
@@ -53,7 +53,7 @@ export class MgTooltip {
53
53
  // Hide the tooltip
54
54
  this.mgTooltipContent.removeAttribute('data-show');
55
55
  // Disable the event listeners
56
- this.popper.setOptions(options => (Object.assign(Object.assign({}, options), { modifiers: [...options.modifiers, { name: 'eventListeners', enabled: false }] })));
56
+ this.popper.setOptions((options) => (Object.assign(Object.assign({}, options), { modifiers: [...options.modifiers, { name: 'eventListeners', enabled: false }] })));
57
57
  // Remove event listener
58
58
  this.windows.forEach((localWindow) => {
59
59
  localWindow.removeEventListener('click', this.handleClickOutside, false);
@@ -201,9 +201,9 @@ export class MgTooltip {
201
201
  * @param mgButton - mg-button to observe
202
202
  */
203
203
  this.setMgButtonMutationObserver = (mgButton) => {
204
- new MutationObserver(mutationList => {
204
+ new MutationObserver((mutationList) => {
205
205
  // stop process when none of mutations attributed is disabled
206
- if (!mutationList.some(mutation => ['aria-disabled', 'disabled'].includes(mutation.attributeName)))
206
+ if (!mutationList.some((mutation) => ['aria-disabled', 'disabled'].includes(mutation.attributeName)))
207
207
  return;
208
208
  // set guard when one of mutations is for a disabled with disabled-on-click
209
209
  if (mutationList.some((mutation) => mutation.target.disabled && mutation.target.disableOnClick)) {
@@ -318,7 +318,9 @@ export class MgTooltip {
318
318
  // get slotted element wich is not the tooltip
319
319
  const slotElement = this.element.querySelector(`*:not(#${this.identifier})`);
320
320
  // Get interactive element
321
- const interactiveElement = slotElement.matches(focusableElements) ? slotElement : (_a = slotElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(focusableElements);
321
+ const interactiveElement = slotElement.matches(focusableElements)
322
+ ? slotElement
323
+ : (_a = slotElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(focusableElements);
322
324
  this.setTooltipedElement(interactiveElement || slotElement);
323
325
  // Check if slotted element is a disabled mg-button
324
326
  // In this case we wrap the mg-button into a div to enable the tooltip
@@ -369,7 +371,7 @@ export class MgTooltip {
369
371
  * @returns HTML Element
370
372
  */
371
373
  render() {
372
- return (h(Host, { key: 'f8fe2bfb1fe70bf169abf8ddd77323342af2ac54' }, h("slot", { key: '6d478d941b9cf9374395e597a703ba7c8411eb75' }), h("slot", { key: 'bbbb59eda24731ec2fa54a909b0f3f93000083e5', name: "content" })));
374
+ return (h(Host, { key: '5cd926147c1b6723065c5334699764f32a8a06c9' }, h("slot", { key: 'a1b208798c79e34a207f3bedb2ad9662e02e83e2' }), h("slot", { key: '4f332961968fd3541caf47c2fd9072720fa2ee71', name: "content" })));
373
375
  }
374
376
  static get is() { return "mg-tooltip"; }
375
377
  static get encapsulation() { return "shadow"; }
@@ -1,7 +1,7 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import { isValidString, isValideID, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
3
  import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
4
- import { tooltipPositions, classFieldset, classReadonly, classDisabled, classVerticalList, labelHeadings } from "./mg-input.conf";
4
+ import { tooltipPositions, classFieldset, classReadonly, classDisabled, classVerticalList, labelHeadings, } from "./mg-input.conf";
5
5
  /**
6
6
  * @slot - Input content
7
7
  */
@@ -10,6 +10,42 @@ export class MgInput {
10
10
  this.slotLabel = 'label';
11
11
  this.slotError = 'error';
12
12
  this.slotHelpText = 'help-text';
13
+ // Block-level elements that cannot be nested inside a <p>.
14
+ // helpText/errorMessage are injected via innerHTML and may contain HTML: when block content
15
+ // is detected we fall back to <div> to keep the markup valid (RGAA 8.2), otherwise we use a
16
+ // semantic <p> for the (textual) message (RGAA 8.9).
17
+ this.blockLevelTags = new Set([
18
+ 'address',
19
+ 'article',
20
+ 'aside',
21
+ 'blockquote',
22
+ 'details',
23
+ 'dialog',
24
+ 'div',
25
+ 'dl',
26
+ 'fieldset',
27
+ 'figure',
28
+ 'figcaption',
29
+ 'footer',
30
+ 'form',
31
+ 'h1',
32
+ 'h2',
33
+ 'h3',
34
+ 'h4',
35
+ 'h5',
36
+ 'h6',
37
+ 'header',
38
+ 'hr',
39
+ 'main',
40
+ 'nav',
41
+ 'ol',
42
+ 'p',
43
+ 'pre',
44
+ 'section',
45
+ 'table',
46
+ 'ul',
47
+ ]);
48
+ this.openingTagRegExp = /<([a-z1-6]+)[\s/>]/gi;
13
49
  // style
14
50
  this.classInput = 'mg-c-input';
15
51
  this.classHasError = 'mg-c-input--has-error';
@@ -82,7 +118,7 @@ export class MgInput {
82
118
  * Get tooltip node
83
119
  * @returns mg-tooltip
84
120
  */
85
- this.renderTooltip = () => (h("mg-tooltip", { identifier: `${this.identifier}-tooltip`, message: this.tooltip }, h("mg-icon", { icon: "info-circle" })));
121
+ this.renderTooltip = () => (h("mg-tooltip", { identifier: `${this.identifier}-tooltip`, message: this.tooltip }, h("mg-icon", { icon: "info-circle-outline" })));
86
122
  /**
87
123
  * Get input container element
88
124
  * @returns ordered elements
@@ -92,7 +128,10 @@ export class MgInput {
92
128
  this.helptextMessageSlotElement && (h("div", { class: "mg-c-input__help-text" }, h("slot", { name: this.slotHelpText }))),
93
129
  !this.isDisabled && this.errorMessage && (h("div", { class: "mg-c-input__error", "aria-live": "assertive" }, h("slot", { name: this.slotError }))),
94
130
  ];
95
- const inputSlot = (h("div", { class: "mg-c-input__input" }, h("slot", null), this.tooltip && !this.labelOnTop && (this.tooltipPosition === 'input' || this.labelHide) && this.renderTooltip()));
131
+ const inputSlot = (h("div", { class: "mg-c-input__input" }, h("slot", null), this.tooltip &&
132
+ !this.labelOnTop &&
133
+ (this.tooltipPosition === 'input' || this.labelHide) &&
134
+ this.renderTooltip()));
96
135
  if (this.inputsOnBottom) {
97
136
  return [...elements, inputSlot];
98
137
  }
@@ -189,7 +228,7 @@ export class MgInput {
189
228
  this.ariaDescribedbyIDs = this.ariaDescribedbyIDs.split(' ');
190
229
  return;
191
230
  }
192
- else if (!(Array.isArray(this.ariaDescribedbyIDs) && this.ariaDescribedbyIDs.every(entry => typeof entry === 'string'))) {
231
+ else if (!(Array.isArray(this.ariaDescribedbyIDs) && this.ariaDescribedbyIDs.every((entry) => typeof entry === 'string'))) {
193
232
  this.ariaDescribedbyIDs = [];
194
233
  return;
195
234
  }
@@ -222,7 +261,6 @@ export class MgInput {
222
261
  /**
223
262
  * Component classes
224
263
  */
225
- // eslint-disable-next-line @stencil-community/no-unused-watch
226
264
  watchClass() {
227
265
  if (!this.element.classList.contains(this.classInput)) {
228
266
  this.element.classList.add(this.classInput);
@@ -235,7 +273,6 @@ export class MgInput {
235
273
  /**
236
274
  * Trigger label update
237
275
  */
238
- // eslint-disable-next-line @stencil-community/no-unused-watch
239
276
  watchLabel() {
240
277
  if (!isValidString(this.label)) {
241
278
  throw new Error(`<mg-input> prop "label" is required and must be a string. Passed value: ${toString(this.label)}.`);
@@ -278,16 +315,46 @@ export class MgInput {
278
315
  // update aria-describedby
279
316
  this.watchAriaDescribedbyIDs();
280
317
  }
318
+ /**
319
+ * Get the semantic tag name for a slotted message.
320
+ * Phrasing (textual/inline) content uses <p> (RGAA 8.9); block-level content falls back to
321
+ * <div> to avoid invalid nesting such as <p><p>…</p></p> (RGAA 8.2).
322
+ * @param content - the HTML content that will be injected in the slot
323
+ * @returns the tag name to use
324
+ */
325
+ getSlotMessageTagName(content) {
326
+ for (const [, tagName] of content.matchAll(this.openingTagRegExp)) {
327
+ if (this.blockLevelTags.has(tagName.toLowerCase()))
328
+ return 'div';
329
+ }
330
+ return 'p';
331
+ }
332
+ /**
333
+ * Get the existing slotted element or (re)create it with the expected tag.
334
+ * The element is recreated when its current tag no longer matches the expected one
335
+ * (e.g. the content switched from text to block HTML), keeping the slot id and position.
336
+ * @param slot - the slot name
337
+ * @param tagName - the expected tag name
338
+ * @returns the slotted element
339
+ */
340
+ getSlotMessageElement(slot, tagName) {
341
+ let slotElement = this.element.querySelector(`[slot=${slot}]`);
342
+ if (slotElement !== null && slotElement.tagName.toLowerCase() !== tagName) {
343
+ slotElement.remove();
344
+ slotElement = null;
345
+ }
346
+ if (slotElement === null) {
347
+ slotElement = document.createElement(tagName);
348
+ slotElement.setAttribute('slot', slot);
349
+ this.element.appendChild(slotElement);
350
+ }
351
+ return slotElement;
352
+ }
281
353
  /**
282
354
  * Render error message
283
355
  */
284
356
  renderErrorMessage() {
285
- this.errorMessageSlotElement = this.element.querySelector(`[slot=${this.slotError}]`);
286
- if (this.errorMessageSlotElement === null) {
287
- this.errorMessageSlotElement = document.createElement('div');
288
- this.errorMessageSlotElement.setAttribute('slot', this.slotError);
289
- this.element.appendChild(this.errorMessageSlotElement);
290
- }
357
+ this.errorMessageSlotElement = this.getSlotMessageElement(this.slotError, this.getSlotMessageTagName(this.errorMessage));
291
358
  this.errorMessageSlotElement.setAttribute('id', this.helpTextErrorId);
292
359
  this.errorMessageSlotElement.innerHTML = this.errorMessage;
293
360
  }
@@ -295,12 +362,7 @@ export class MgInput {
295
362
  * Render help text message
296
363
  */
297
364
  renderHelpText() {
298
- this.helptextMessageSlotElement = this.element.querySelector(`[slot=${this.slotHelpText}]`);
299
- if (this.helptextMessageSlotElement === null) {
300
- this.helptextMessageSlotElement = document.createElement('div');
301
- this.helptextMessageSlotElement.setAttribute('slot', this.slotHelpText);
302
- this.element.appendChild(this.helptextMessageSlotElement);
303
- }
365
+ this.helptextMessageSlotElement = this.getSlotMessageElement(this.slotHelpText, this.getSlotMessageTagName(this.helpText));
304
366
  this.helptextMessageSlotElement.setAttribute('id', this.helpTextId);
305
367
  this.helptextMessageSlotElement.innerHTML = this.helpText;
306
368
  }
@@ -339,7 +401,10 @@ export class MgInput {
339
401
  */
340
402
  render() {
341
403
  const isGroup = this.isFieldset && !this.isReadonly;
342
- return (h(Host, { key: 'b5952c998fe8562eb2e5dc0e425484f0aa9177f3', class: this.element.classList.toString(), role: isGroup ? 'group' : undefined, "aria-labelledby": isGroup ? `${this.identifier}-title` : undefined }, h("div", { key: 'd6399c7f4798af37639218373f775739fc04e593', class: { 'mg-c-input__title': true, 'mg-u-visually-hidden': this.labelHide } }, h("slot", { key: '58a593bb16193a5ca6b0374919b22fa64aab26a4', name: this.slotLabel }), this.tooltip && (this.tooltipPosition === 'label' || this.labelOnTop) && !this.labelHide && this.renderTooltip()), h("div", { key: '1a70d0b00d6cf235c7a64d3ebde212eef62e213c', class: "mg-c-input__input-container" }, this.inputContainerElements())));
404
+ return (h(Host, { key: '5a321d04d50aa63f86237a1dd72d2ac508b8d4cf', class: this.element.classList.toString(), role: isGroup ? 'group' : undefined, "aria-labelledby": isGroup ? `${this.identifier}-title` : undefined }, h("div", { key: '5d247500c19370d6ee1de79e14ef0c016fe38f7a', class: { 'mg-c-input__title': true, 'mg-u-visually-hidden': this.labelHide } }, h("slot", { key: 'cf56e42a0b56ab855a1b6089fbbd573ef5676b3d', name: this.slotLabel }), this.tooltip &&
405
+ (this.tooltipPosition === 'label' || this.labelOnTop) &&
406
+ !this.labelHide &&
407
+ this.renderTooltip()), h("div", { key: 'dfc9112bb933c1c536bdb4e9ef462e0f921a0b82', class: "mg-c-input__input-container" }, this.inputContainerElements())));
343
408
  }
344
409
  static get is() { return "mg-input"; }
345
410
  static get encapsulation() { return "shadow"; }
@@ -4,7 +4,10 @@ import { h } from "@stencil/core";
4
4
  * @param props - MgInputCheckboxList Interface Props
5
5
  * @returns input template
6
6
  */
7
- export const MgInputCheckboxList = (props) => (h("div", { class: "mg-c-input__input-group-container", "aria-labelledby": props.labelledby, id: props.id }, props.checkboxes.map(input => {
7
+ export const MgInputCheckboxList = (props) => (h("div", { class: "mg-c-input__input-group-container", "aria-labelledby": props.labelledby, id: props.id }, props.checkboxes.map((input) => {
8
8
  var _a, _b;
9
- return (h("div", { key: input._id, class: { 'mg-c-input__input-group': true, 'mg-c-input__input-group--disabled': props.disabled || input.disabled } }, 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 }), h("label", { htmlFor: input._id }, input.title)));
9
+ return (h("div", { key: input._id, class: {
10
+ 'mg-c-input__input-group': true,
11
+ 'mg-c-input__input-group--disabled': props.disabled || input.disabled,
12
+ } }, 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 }), h("label", { htmlFor: input._id }, input.title)));
10
13
  })));
@@ -34,5 +34,9 @@ export const MgInputCheckboxPaginated = (props) => {
34
34
  };
35
35
  return (h("div", { class: "mg-input-checkbox-paginated mg-c-input__tab", slot: `tab_content-${props.key + 1}` },
36
36
  // Mass action depends on all checkboxes list, not only displayed items
37
- typeof props.handleMassAction === 'function' && props.checkboxes.length > 0 && props.checkboxes.some(checkbox => checkbox.disabled !== true) && (h("mg-tooltip", { slot: "header-action", class: "mg-c-input__tabs-action", message: props.messages.tooltip }, h("mg-button", { variant: "link", onClick: props.handleMassAction }, props.messages.action))), h("div", { class: "mg-c-input__tabs-content" }, h("p", { id: tabId, class: { 'mg-c-input__popover-info': true, 'mg-u-visually-hidden': items.length !== 0 }, "aria-live": items.length !== 0 ? 'polite' : undefined }, items.length === 0 ? props.messages.noValue : props.messages.values.replace('{count}', items.length.toString())), items.length > 0 && (h(MgInputCheckboxList, { checkboxes: items, labelledby: tabId, id: listId, disabled: props.disabled, name: props.name, invalid: props.invalid })), hasNext(props.checkboxes, props.limit) && (h("mg-button", { key: "load-more", variant: "flat", class: "mg-c-input__load-more", tabIndex: -1, "full-width": true, onClick: handleLoadMoreClick, "aria-controls": listId }, h("mg-icon", { icon: "chevron-down" }), props.messages.showMore)))));
37
+ typeof props.handleMassAction === 'function' &&
38
+ props.checkboxes.length > 0 &&
39
+ props.checkboxes.some((checkbox) => checkbox.disabled !== true) && (h("mg-tooltip", { slot: "header-action", class: "mg-c-input__tabs-action", message: props.messages.tooltip }, h("mg-button", { variant: "link", onClick: props.handleMassAction }, props.messages.action))), h("div", { class: "mg-c-input__tabs-content" }, h("p", { id: tabId, class: { 'mg-c-input__popover-info': true, 'mg-u-visually-hidden': items.length !== 0 }, "aria-live": items.length !== 0 ? 'polite' : undefined }, items.length === 0
40
+ ? props.messages.noValue
41
+ : props.messages.values.replace('{count}', items.length.toString())), items.length > 0 && (h(MgInputCheckboxList, { checkboxes: items, labelledby: tabId, id: listId, disabled: props.disabled, name: props.name, invalid: props.invalid })), hasNext(props.checkboxes, props.limit) && (h("mg-button", { key: "load-more", variant: "flat", class: "mg-c-input__load-more", tabIndex: -1, "full-width": true, onClick: handleLoadMoreClick, "aria-controls": listId }, h("mg-icon", { icon: "chevron-down" }), props.messages.showMore)))));
38
42
  };