@mgdis/mg-components 6.23.0 → 6.25.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 (186) 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 +394 -260
  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 +46 -28
  13. package/dist/cjs/mg-input-file.cjs.entry.js +12 -11
  14. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +3367 -4140
  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/collection-manifest.json +1 -0
  19. package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js +1 -1
  20. package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +1 -1
  21. package/dist/collection/components/atoms/mg-badge/mg-badge.js +1 -1
  22. package/dist/collection/components/atoms/mg-button/mg-button.js +4 -1
  23. package/dist/collection/components/atoms/mg-card/mg-card.js +1 -1
  24. package/dist/collection/components/atoms/mg-divider/mg-divider.conf.js +4 -0
  25. package/dist/collection/components/atoms/mg-divider/mg-divider.js +62 -3
  26. package/dist/collection/components/atoms/mg-icon/mg-icon.js +1 -1
  27. package/dist/collection/components/atoms/mg-illustration/mg-illustration.conf.js +1 -0
  28. package/dist/collection/components/atoms/mg-illustration/mg-illustration.js +95 -0
  29. package/dist/collection/components/atoms/mg-tag/mg-tag.js +1 -1
  30. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +1 -1
  31. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +9 -7
  32. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +49 -19
  33. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +5 -2
  34. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.js +5 -1
  35. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +30 -22
  36. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +75 -30
  37. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +14 -8
  38. package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +8 -7
  39. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +21 -12
  40. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +7 -7
  41. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +15 -10
  42. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/index.js +29 -3
  43. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +260 -7
  44. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +21 -19
  45. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +18 -13
  46. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +7 -7
  47. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +10 -9
  48. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +1 -1
  49. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +7 -5
  50. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +18 -17
  51. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +7 -4
  52. package/dist/collection/components/molecules/mg-alert/mg-alert.js +6 -7
  53. package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.js +49 -6
  54. package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
  55. package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +6 -6
  56. package/dist/collection/components/molecules/mg-form/mg-form.js +16 -13
  57. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +2 -2
  58. package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
  59. package/dist/collection/components/molecules/mg-message/mg-message.js +2 -2
  60. package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
  61. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +8 -4
  62. package/dist/collection/components/molecules/mg-panel/mg-panel.js +13 -4
  63. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +2 -2
  64. package/dist/collection/components/molecules/mg-popover/mg-popover.js +29 -37
  65. package/dist/collection/components/molecules/mg-progress/mg-progress.js +1 -1
  66. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +5 -3
  67. package/dist/collection/components/molecules/mg-table/mg-table.js +10 -6
  68. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +12 -9
  69. package/dist/collection/utils/behaviors.utils.js +3 -3
  70. package/dist/collection/utils/playwright.fixture.js +7 -2
  71. package/dist/components/mg-action-more.js +1 -1
  72. package/dist/components/mg-alert.js +1 -1
  73. package/dist/components/mg-badge2.js +1 -1
  74. package/dist/components/mg-breadcrumb.js +1 -1
  75. package/dist/components/mg-button2.js +1 -1
  76. package/dist/components/mg-card2.js +1 -1
  77. package/dist/components/mg-character-left2.js +1 -1
  78. package/dist/components/mg-details.js +1 -1
  79. package/dist/components/mg-divider2.js +1 -1
  80. package/dist/components/mg-fieldset.js +1 -1
  81. package/dist/components/mg-form.js +1 -1
  82. package/dist/components/mg-icon2.js +1 -1
  83. package/dist/components/mg-illustrated-message.js +1 -1
  84. package/dist/components/mg-illustration.d.ts +11 -0
  85. package/dist/components/mg-illustration.js +1 -0
  86. package/dist/components/mg-input-checkbox.js +1 -1
  87. package/dist/components/mg-input-combobox.js +1 -1
  88. package/dist/components/mg-input-date.js +1 -1
  89. package/dist/components/mg-input-file.js +1 -1
  90. package/dist/components/mg-input-numeric.js +1 -1
  91. package/dist/components/mg-input-password.js +1 -1
  92. package/dist/components/mg-input-radio.js +1 -1
  93. package/dist/components/mg-input-rich-text-editor.js +298 -289
  94. package/dist/components/mg-input-select2.js +1 -1
  95. package/dist/components/mg-input-text2.js +1 -1
  96. package/dist/components/mg-input-textarea.js +1 -1
  97. package/dist/components/mg-input-title2.js +1 -1
  98. package/dist/components/mg-input-toggle.js +1 -1
  99. package/dist/components/mg-input2.js +1 -1
  100. package/dist/components/mg-item-more2.js +1 -1
  101. package/dist/components/mg-loader2.js +1 -1
  102. package/dist/components/mg-menu-item2.js +1 -1
  103. package/dist/components/mg-message2.js +1 -1
  104. package/dist/components/mg-modal.js +1 -1
  105. package/dist/components/mg-pagination.js +1 -1
  106. package/dist/components/mg-panel.js +1 -1
  107. package/dist/components/mg-popover-content2.js +1 -1
  108. package/dist/components/mg-popover2.js +1 -1
  109. package/dist/components/mg-progress.js +1 -1
  110. package/dist/components/mg-skip-links.js +1 -1
  111. package/dist/components/mg-table.js +1 -1
  112. package/dist/components/mg-tabs2.js +1 -1
  113. package/dist/components/mg-tag.js +1 -1
  114. package/dist/components/mg-tooltip-content2.js +1 -1
  115. package/dist/components/mg-tooltip2.js +1 -1
  116. package/dist/custom-elements.json +178 -48
  117. package/dist/esm/{index-C7xjtdiw.js → index-91BOpzAB.js} +14 -6
  118. package/dist/esm/{index-DSEloqPn.js → index-BfblyCaJ.js} +3 -1
  119. package/dist/esm/index-Ci9Hv7DG.js +3 -0
  120. package/dist/esm/{index-DshvCiTL.js → index-D4bO_UCn.js} +5 -1
  121. package/dist/esm/loader.js +3 -3
  122. package/dist/esm/mg-action-more_36.entry.js +391 -257
  123. package/dist/esm/mg-alert.entry.js +7 -8
  124. package/dist/esm/mg-breadcrumb.entry.js +27 -10
  125. package/dist/esm/mg-components.js +3 -3
  126. package/dist/esm/mg-fieldset.entry.js +8 -8
  127. package/dist/esm/mg-illustration.entry.js +55 -0
  128. package/dist/esm/mg-input-combobox.entry.js +46 -28
  129. package/dist/esm/mg-input-file.entry.js +12 -11
  130. package/dist/esm/mg-input-rich-text-editor.entry.js +3352 -4125
  131. package/dist/esm/mg-loader.entry.js +5 -5
  132. package/dist/esm/mg-progress.entry.js +3 -3
  133. package/dist/mg-components/mg-components.css +1 -1
  134. package/dist/mg-components/mg-components.esm.js +1 -1
  135. package/dist/mg-components/{p-cdb01923.entry.js → p-3ad7441c.entry.js} +1 -1
  136. package/dist/mg-components/p-413b4536.entry.js +1 -0
  137. package/dist/mg-components/p-4693077a.entry.js +1 -0
  138. package/dist/mg-components/p-5dff879a.entry.js +1 -0
  139. package/dist/mg-components/{p-236bb1d2.entry.js → p-96fc508e.entry.js} +1 -1
  140. package/dist/mg-components/p-Ci9Hv7DG.js +1 -0
  141. package/dist/mg-components/p-D4bO_UCn.js +2 -0
  142. package/dist/mg-components/{p-d0b6d8f5.entry.js → p-ad533d08.entry.js} +1 -1
  143. package/dist/mg-components/p-b20f3698.entry.js +1 -0
  144. package/dist/mg-components/p-d0d12800.entry.js +1 -0
  145. package/dist/mg-components/p-ec4bd337.entry.js +1667 -0
  146. package/dist/mg-components/p-f8e58181.entry.js +1 -0
  147. package/dist/types/assets/illustrations/index.d.ts +21 -0
  148. package/dist/types/components/atoms/mg-divider/mg-divider.conf.d.ts +9 -0
  149. package/dist/types/components/atoms/mg-divider/mg-divider.d.ts +13 -0
  150. package/dist/types/components/atoms/mg-illustration/mg-illustration.conf.d.ts +5 -0
  151. package/dist/types/components/atoms/mg-illustration/mg-illustration.d.ts +24 -0
  152. package/dist/types/components/molecules/inputs/mg-input/mg-input.d.ts +18 -0
  153. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +1 -1
  154. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +10 -5
  155. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +2 -2
  156. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +2 -2
  157. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +2 -2
  158. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +1 -1
  159. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.conf.d.ts +4 -0
  160. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.conf.d.ts +25 -0
  161. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +61 -2
  162. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +2 -2
  163. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +2 -2
  164. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +2 -2
  165. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +2 -2
  166. package/dist/types/components/molecules/menus/mg-menu-item/mg-menu-item.d.ts +2 -2
  167. package/dist/types/components/molecules/mg-alert/mg-alert.d.ts +2 -2
  168. package/dist/types/components/molecules/mg-breadcrumb/mg-breadcrumb.d.ts +11 -0
  169. package/dist/types/components/molecules/mg-popover/mg-popover-content/mg-popover-content.d.ts +1 -1
  170. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +3 -3
  171. package/dist/types/components/molecules/mg-skip-links/mg-skip-links.d.ts +1 -1
  172. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +1 -1
  173. package/dist/types/components.d.ts +145 -40
  174. package/ide/intellij/web-types.json +134 -64
  175. package/ide/vscode/css-custom-data.json +6 -2
  176. package/ide/vscode/html-custom-data.json +190 -32
  177. package/package.json +22 -22
  178. package/dist/mg-components/p-13feb37a.entry.js +0 -1
  179. package/dist/mg-components/p-79265ad3.entry.js +0 -1
  180. package/dist/mg-components/p-7c63e469.entry.js +0 -1
  181. package/dist/mg-components/p-7fd3e519.entry.js +0 -1
  182. package/dist/mg-components/p-DshvCiTL.js +0 -2
  183. package/dist/mg-components/p-a0e2c886.entry.js +0 -1
  184. package/dist/mg-components/p-d698fa67.entry.js +0 -1658
  185. /package/dist/mg-components/{p-C7xjtdiw.js → p-91BOpzAB.js} +0 -0
  186. /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,11 @@ 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.blockLevelContentRegExp = /<(address|article|aside|blockquote|details|dialog|div|dl|fieldset|figure|figcaption|footer|form|h[1-6]|header|hr|main|nav|ol|p|pre|section|table|ul)[\s/>]/i;
13
18
  // style
14
19
  this.classInput = 'mg-c-input';
15
20
  this.classHasError = 'mg-c-input--has-error';
@@ -82,7 +87,7 @@ export class MgInput {
82
87
  * Get tooltip node
83
88
  * @returns mg-tooltip
84
89
  */
85
- this.renderTooltip = () => (h("mg-tooltip", { identifier: `${this.identifier}-tooltip`, message: this.tooltip }, h("mg-icon", { icon: "info-circle" })));
90
+ this.renderTooltip = () => (h("mg-tooltip", { identifier: `${this.identifier}-tooltip`, message: this.tooltip }, h("mg-icon", { icon: "info-circle-outline" })));
86
91
  /**
87
92
  * Get input container element
88
93
  * @returns ordered elements
@@ -92,7 +97,10 @@ export class MgInput {
92
97
  this.helptextMessageSlotElement && (h("div", { class: "mg-c-input__help-text" }, h("slot", { name: this.slotHelpText }))),
93
98
  !this.isDisabled && this.errorMessage && (h("div", { class: "mg-c-input__error", "aria-live": "assertive" }, h("slot", { name: this.slotError }))),
94
99
  ];
95
- const inputSlot = (h("div", { class: "mg-c-input__input" }, h("slot", null), this.tooltip && !this.labelOnTop && (this.tooltipPosition === 'input' || this.labelHide) && this.renderTooltip()));
100
+ const inputSlot = (h("div", { class: "mg-c-input__input" }, h("slot", null), this.tooltip &&
101
+ !this.labelOnTop &&
102
+ (this.tooltipPosition === 'input' || this.labelHide) &&
103
+ this.renderTooltip()));
96
104
  if (this.inputsOnBottom) {
97
105
  return [...elements, inputSlot];
98
106
  }
@@ -189,7 +197,7 @@ export class MgInput {
189
197
  this.ariaDescribedbyIDs = this.ariaDescribedbyIDs.split(' ');
190
198
  return;
191
199
  }
192
- else if (!(Array.isArray(this.ariaDescribedbyIDs) && this.ariaDescribedbyIDs.every(entry => typeof entry === 'string'))) {
200
+ else if (!(Array.isArray(this.ariaDescribedbyIDs) && this.ariaDescribedbyIDs.every((entry) => typeof entry === 'string'))) {
193
201
  this.ariaDescribedbyIDs = [];
194
202
  return;
195
203
  }
@@ -222,7 +230,6 @@ export class MgInput {
222
230
  /**
223
231
  * Component classes
224
232
  */
225
- // eslint-disable-next-line @stencil-community/no-unused-watch
226
233
  watchClass() {
227
234
  if (!this.element.classList.contains(this.classInput)) {
228
235
  this.element.classList.add(this.classInput);
@@ -235,7 +242,6 @@ export class MgInput {
235
242
  /**
236
243
  * Trigger label update
237
244
  */
238
- // eslint-disable-next-line @stencil-community/no-unused-watch
239
245
  watchLabel() {
240
246
  if (!isValidString(this.label)) {
241
247
  throw new Error(`<mg-input> prop "label" is required and must be a string. Passed value: ${toString(this.label)}.`);
@@ -278,16 +284,42 @@ export class MgInput {
278
284
  // update aria-describedby
279
285
  this.watchAriaDescribedbyIDs();
280
286
  }
287
+ /**
288
+ * Get the semantic tag name for a slotted message.
289
+ * Phrasing (textual/inline) content uses <p> (RGAA 8.9); block-level content falls back to
290
+ * <div> to avoid invalid nesting such as <p><p>…</p></p> (RGAA 8.2).
291
+ * @param content - the HTML content that will be injected in the slot
292
+ * @returns the tag name to use
293
+ */
294
+ getSlotMessageTagName(content) {
295
+ return this.blockLevelContentRegExp.test(content) ? 'div' : 'p';
296
+ }
297
+ /**
298
+ * Get the existing slotted element or (re)create it with the expected tag.
299
+ * The element is recreated when its current tag no longer matches the expected one
300
+ * (e.g. the content switched from text to block HTML), keeping the slot id and position.
301
+ * @param slot - the slot name
302
+ * @param tagName - the expected tag name
303
+ * @returns the slotted element
304
+ */
305
+ getSlotMessageElement(slot, tagName) {
306
+ let slotElement = this.element.querySelector(`[slot=${slot}]`);
307
+ if (slotElement !== null && slotElement.tagName.toLowerCase() !== tagName) {
308
+ slotElement.remove();
309
+ slotElement = null;
310
+ }
311
+ if (slotElement === null) {
312
+ slotElement = document.createElement(tagName);
313
+ slotElement.setAttribute('slot', slot);
314
+ this.element.appendChild(slotElement);
315
+ }
316
+ return slotElement;
317
+ }
281
318
  /**
282
319
  * Render error message
283
320
  */
284
321
  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
- }
322
+ this.errorMessageSlotElement = this.getSlotMessageElement(this.slotError, this.getSlotMessageTagName(this.errorMessage));
291
323
  this.errorMessageSlotElement.setAttribute('id', this.helpTextErrorId);
292
324
  this.errorMessageSlotElement.innerHTML = this.errorMessage;
293
325
  }
@@ -295,12 +327,7 @@ export class MgInput {
295
327
  * Render help text message
296
328
  */
297
329
  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
- }
330
+ this.helptextMessageSlotElement = this.getSlotMessageElement(this.slotHelpText, this.getSlotMessageTagName(this.helpText));
304
331
  this.helptextMessageSlotElement.setAttribute('id', this.helpTextId);
305
332
  this.helptextMessageSlotElement.innerHTML = this.helpText;
306
333
  }
@@ -339,7 +366,10 @@ export class MgInput {
339
366
  */
340
367
  render() {
341
368
  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())));
369
+ return (h(Host, { key: 'e5803717999bac5e4a08910008176baeb426f634', class: this.element.classList.toString(), role: isGroup ? 'group' : undefined, "aria-labelledby": isGroup ? `${this.identifier}-title` : undefined }, h("div", { key: '32b04b05e8a4352536965fcd792f3c206dad9270', class: { 'mg-c-input__title': true, 'mg-u-visually-hidden': this.labelHide } }, h("slot", { key: '2bb360ff8b4a86facb0b7f97fdf7dbbb49b5f6c0', name: this.slotLabel }), this.tooltip &&
370
+ (this.tooltipPosition === 'label' || this.labelOnTop) &&
371
+ !this.labelHide &&
372
+ this.renderTooltip()), h("div", { key: '0c6751757d182029e1ac6ea4f8a4fcc7aeffb85e', class: "mg-c-input__input-container" }, this.inputContainerElements())));
343
373
  }
344
374
  static get is() { return "mg-input"; }
345
375
  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
  };