@mgdis/mg-components 5.27.0 → 5.27.2

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 (219) hide show
  1. package/dist/cjs/{index-1d560837.js → index-00072168.js} +46 -46
  2. package/dist/cjs/index-00072168.js.map +1 -0
  3. package/dist/cjs/{index-7072369e.js → index-7e27c7ae.js} +34 -10
  4. package/dist/cjs/index-7e27c7ae.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/{mg-action-more_35.cjs.entry.js → mg-action-more_36.cjs.entry.js} +513 -179
  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 +4 -4
  11. package/dist/collection/collection-manifest.json +2 -2
  12. package/dist/collection/components/atoms/mg-button/mg-button.js +4 -1
  13. package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -1
  14. package/dist/collection/components/atoms/mg-card/mg-card.js +4 -1
  15. package/dist/collection/components/atoms/mg-card/mg-card.js.map +1 -1
  16. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +1 -1
  17. package/dist/collection/components/atoms/mg-divider/mg-divider.js +1 -1
  18. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +4 -1
  19. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js.map +1 -1
  20. package/dist/collection/components/atoms/mg-tag/mg-tag.js +4 -1
  21. package/dist/collection/components/atoms/mg-tag/mg-tag.js.map +1 -1
  22. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +4 -1
  23. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js.map +1 -1
  24. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +1 -0
  25. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js.map +1 -1
  26. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +13 -3
  27. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
  28. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +7 -1
  29. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js.map +1 -1
  30. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +2 -2
  31. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +1 -1
  32. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +1 -1
  33. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js +1 -0
  34. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js.map +1 -1
  35. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +42 -11
  36. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -1
  37. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +6 -3
  38. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
  39. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +2 -2
  40. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -1
  41. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +1 -1
  42. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +2 -2
  43. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
  44. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +12 -3
  45. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
  46. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +2 -2
  47. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
  48. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +5 -1
  49. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -1
  50. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +24 -22
  51. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js.map +1 -1
  52. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +34 -3
  53. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js.map +1 -1
  54. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +3 -3
  55. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -1
  56. package/dist/collection/components/molecules/mg-details/mg-details.js +5 -1
  57. package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -1
  58. package/dist/collection/components/molecules/mg-form/mg-form.js +5 -1
  59. package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
  60. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +8 -3
  61. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js.map +1 -1
  62. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +10 -4
  63. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js.map +1 -1
  64. package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
  65. package/dist/collection/components/molecules/mg-message/mg-message.js +5 -1
  66. package/dist/collection/components/molecules/mg-message/mg-message.js.map +1 -1
  67. package/dist/collection/components/molecules/mg-modal/mg-modal.js +6 -2
  68. package/dist/collection/components/molecules/mg-modal/mg-modal.js.map +1 -1
  69. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +3 -3
  70. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js.map +1 -1
  71. package/dist/collection/components/molecules/mg-panel/mg-panel.js +5 -1
  72. package/dist/collection/components/molecules/mg-panel/mg-panel.js.map +1 -1
  73. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +4 -1
  74. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js.map +1 -1
  75. package/dist/collection/components/molecules/mg-popover/mg-popover.js +5 -1
  76. package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
  77. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
  78. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +4 -1
  79. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js.map +1 -1
  80. package/dist/components/index.es.js +42 -42
  81. package/dist/components/index.es.js.map +1 -1
  82. package/dist/components/index2.js +2 -2
  83. package/dist/components/mg-action-more.js +20 -16
  84. package/dist/components/mg-action-more.js.map +1 -1
  85. package/dist/components/mg-badge2.js +3 -3
  86. package/dist/components/mg-button2.js +5 -5
  87. package/dist/components/mg-button2.js.map +1 -1
  88. package/dist/components/mg-card2.js +3 -3
  89. package/dist/components/mg-card2.js.map +1 -1
  90. package/dist/components/mg-character-left2.js +1 -1
  91. package/dist/components/mg-details.js +3 -3
  92. package/dist/components/mg-details.js.map +1 -1
  93. package/dist/components/mg-divider.js +1 -1
  94. package/dist/components/mg-form.js +4 -4
  95. package/dist/components/mg-form.js.map +1 -1
  96. package/dist/components/mg-icon2.js +2 -2
  97. package/dist/components/mg-illustrated-message.js +5 -5
  98. package/dist/components/mg-illustrated-message.js.map +1 -1
  99. package/dist/components/mg-input-checkbox-paginated2.js +2 -2
  100. package/dist/components/mg-input-checkbox-paginated2.js.map +1 -1
  101. package/dist/components/mg-input-checkbox.js +5 -5
  102. package/dist/components/mg-input-date.js +49 -18
  103. package/dist/components/mg-input-date.js.map +1 -1
  104. package/dist/components/mg-input-numeric.js +7 -7
  105. package/dist/components/mg-input-numeric.js.map +1 -1
  106. package/dist/components/mg-input-password.js +5 -5
  107. package/dist/components/mg-input-password.js.map +1 -1
  108. package/dist/components/mg-input-radio.js +5 -5
  109. package/dist/components/mg-input-select2.js +8 -8
  110. package/dist/components/mg-input-select2.js.map +1 -1
  111. package/dist/components/mg-input-text2.js +15 -9
  112. package/dist/components/mg-input-text2.js.map +1 -1
  113. package/dist/components/mg-input-textarea.js +8 -8
  114. package/dist/components/mg-input-textarea.js.map +1 -1
  115. package/dist/components/mg-input-title2.js +3 -3
  116. package/dist/components/mg-input-title2.js.map +1 -1
  117. package/dist/components/mg-input-toggle.js +5 -5
  118. package/dist/components/mg-input-toggle.js.map +1 -1
  119. package/dist/components/mg-input2.js +4 -4
  120. package/dist/components/mg-input2.js.map +1 -1
  121. package/dist/components/mg-item-more.js +1 -339
  122. package/dist/components/mg-item-more.js.map +1 -1
  123. package/dist/components/mg-item-more2.js +592 -0
  124. package/dist/components/mg-item-more2.js.map +1 -0
  125. package/dist/components/mg-loader.js +3 -3
  126. package/dist/components/mg-menu-item2.js +30 -8
  127. package/dist/components/mg-menu-item2.js.map +1 -1
  128. package/dist/components/mg-menu.js +1 -1
  129. package/dist/components/mg-message.js +4 -4
  130. package/dist/components/mg-message.js.map +1 -1
  131. package/dist/components/mg-modal.js +8 -8
  132. package/dist/components/mg-modal.js.map +1 -1
  133. package/dist/components/mg-pagination2.js +5 -5
  134. package/dist/components/mg-pagination2.js.map +1 -1
  135. package/dist/components/mg-panel.js +5 -5
  136. package/dist/components/mg-panel.js.map +1 -1
  137. package/dist/components/mg-popover-content2.js +4 -4
  138. package/dist/components/mg-popover-content2.js.map +1 -1
  139. package/dist/components/mg-popover2.js +4 -4
  140. package/dist/components/mg-popover2.js.map +1 -1
  141. package/dist/components/mg-skip-links.js +3 -3
  142. package/dist/components/mg-tabs.js +7 -7
  143. package/dist/components/mg-tabs.js.map +1 -1
  144. package/dist/components/mg-tag.js +4 -4
  145. package/dist/components/mg-tag.js.map +1 -1
  146. package/dist/components/mg-tooltip-content2.js +1 -1
  147. package/dist/components/mg-tooltip-content2.js.map +1 -1
  148. package/dist/components/mg-tooltip2.js +16 -9
  149. package/dist/components/mg-tooltip2.js.map +1 -1
  150. package/dist/esm/{index-445fc2a0.js → index-8d5d1bfd.js} +44 -44
  151. package/dist/esm/index-8d5d1bfd.js.map +1 -0
  152. package/dist/esm/{index-629a42c7.js → index-e479d5ae.js} +34 -10
  153. package/dist/esm/index-e479d5ae.js.map +1 -0
  154. package/dist/esm/loader.js +3 -3
  155. package/dist/esm/{mg-action-more_35.entry.js → mg-action-more_36.entry.js} +501 -168
  156. package/dist/esm/mg-action-more_36.entry.js.map +1 -0
  157. package/dist/esm/mg-components.js +4 -4
  158. package/dist/esm/mg-components.js.map +1 -1
  159. package/dist/esm/mg-loader.entry.js +4 -4
  160. package/dist/mg-components/mg-components.esm.js +1 -1
  161. package/dist/mg-components/mg-components.esm.js.map +1 -1
  162. package/dist/mg-components/p-7315d4a6.js +3 -0
  163. package/dist/mg-components/p-7315d4a6.js.map +1 -0
  164. package/dist/mg-components/p-8800813b.js +2 -0
  165. package/dist/mg-components/p-8800813b.js.map +1 -0
  166. package/dist/mg-components/{p-fe347f48.entry.js → p-99e2f42a.entry.js} +2 -2
  167. package/dist/mg-components/p-f9ac8927.entry.js +2 -0
  168. package/dist/mg-components/p-f9ac8927.entry.js.map +1 -0
  169. package/dist/types/components/atoms/mg-button/mg-button.d.ts +3 -0
  170. package/dist/types/components/atoms/mg-card/mg-card.d.ts +3 -0
  171. package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +3 -0
  172. package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +3 -0
  173. package/dist/types/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.d.ts +3 -0
  174. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.conf.d.ts +2 -1
  175. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +4 -0
  176. package/dist/types/components/molecules/inputs/mg-input/mg-input.d.ts +6 -0
  177. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.conf.d.ts +2 -1
  178. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +11 -0
  179. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +3 -0
  180. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +3 -0
  181. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +4 -0
  182. package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +3 -0
  183. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +15 -0
  184. package/dist/types/components/molecules/mg-popover/mg-popover-content/mg-popover-content.d.ts +3 -0
  185. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +4 -0
  186. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +3 -0
  187. package/dist/types/components.d.ts +5 -0
  188. package/ide/intellij/web-types.json +20 -81
  189. package/ide/vscode/html-custom-data.json +14 -74
  190. package/package.json +25 -25
  191. package/dist/cjs/index-1d560837.js.map +0 -1
  192. package/dist/cjs/index-7072369e.js.map +0 -1
  193. package/dist/cjs/mg-action-more_35.cjs.entry.js.map +0 -1
  194. package/dist/cjs/mg-item-more.cjs.entry.js +0 -273
  195. package/dist/cjs/mg-item-more.cjs.entry.js.map +0 -1
  196. package/dist/cjs/mg-menu.conf-c291eee6.js +0 -18
  197. package/dist/cjs/mg-menu.conf-c291eee6.js.map +0 -1
  198. package/dist/components/mg-menu.conf.js +0 -16
  199. package/dist/components/mg-menu.conf.js.map +0 -1
  200. package/dist/components/mg-menu2.js +0 -202
  201. package/dist/components/mg-menu2.js.map +0 -1
  202. package/dist/esm/index-445fc2a0.js.map +0 -1
  203. package/dist/esm/index-629a42c7.js.map +0 -1
  204. package/dist/esm/mg-action-more_35.entry.js.map +0 -1
  205. package/dist/esm/mg-item-more.entry.js +0 -269
  206. package/dist/esm/mg-item-more.entry.js.map +0 -1
  207. package/dist/esm/mg-menu.conf-9609bcb2.js +0 -16
  208. package/dist/esm/mg-menu.conf-9609bcb2.js.map +0 -1
  209. package/dist/mg-components/p-3ebe6845.js +0 -2
  210. package/dist/mg-components/p-3ebe6845.js.map +0 -1
  211. package/dist/mg-components/p-6735e4b2.entry.js +0 -2
  212. package/dist/mg-components/p-6735e4b2.entry.js.map +0 -1
  213. package/dist/mg-components/p-9dfaa41f.js +0 -3
  214. package/dist/mg-components/p-9dfaa41f.js.map +0 -1
  215. package/dist/mg-components/p-b3e0f7b3.entry.js +0 -2
  216. package/dist/mg-components/p-b3e0f7b3.entry.js.map +0 -1
  217. package/dist/mg-components/p-fe935e54.js +0 -2
  218. package/dist/mg-components/p-fe935e54.js.map +0 -1
  219. /package/dist/mg-components/{p-fe347f48.entry.js.map → p-99e2f42a.entry.js.map} +0 -0
@@ -1,6 +1,5 @@
1
- import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-629a42c7.js';
2
- import { R as Re, i as initLocales, M as Me, B as Be, U as Ue, F as Fe, N as Ne, g as ge, W as We, P as Pe, d as de, z as ze, q as qe, O as Oe, D as De, _ as _e } from './index-445fc2a0.js';
3
- import { D as Direction, s as sizes$2 } from './mg-menu.conf-9609bcb2.js';
1
+ import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-e479d5ae.js';
2
+ import { M as Me, i as initLocales, O as Oe, N as Ne, C as Ce, D as De, U as Ue, g as ge, p as pe, z as ze, W as We, q as qe, w as we, F as Fe, _ as _e, B as Be } from './index-8d5d1bfd.js';
4
3
 
5
4
  /**
6
5
  * Available menu-item positions
@@ -25,6 +24,19 @@ var Status$1;
25
24
  */
26
25
  const targets = ['_blank', '_self', '_parent', '_top'];
27
26
 
27
+ /**
28
+ * Menu direction type
29
+ */
30
+ var Direction;
31
+ (function (Direction) {
32
+ Direction["VERTICAL"] = "vertical";
33
+ Direction["HORIZONTAL"] = "horizontal";
34
+ })(Direction || (Direction = {}));
35
+ /**
36
+ * List of all possibles sizes
37
+ */
38
+ const sizes$2 = ['regular', 'medium', 'large'];
39
+
28
40
  const mgActionMoreCss = ".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}}:host{--mg-popover-padding-vertical:1rem;--mg-popover-padding-horizontal:0;--mg-popover-max-width:unset}.mg-c-action-more__chevron{transition:200ms}.mg-c-action-more__chevron--rotate.mg-c-action-more__chevron{transform:rotate(180deg)}";
29
41
  const MgActionMoreStyle0 = mgActionMoreCss;
30
42
 
@@ -63,7 +75,7 @@ const MgActionMore = class {
63
75
  ************/
64
76
  this.name = 'mg-action-more';
65
77
  this.classBase = 'mg-c-action-more';
66
- this.mgPopoverIdentifier = Re(this.name);
78
+ this.mgPopoverIdentifier = Me(this.name);
67
79
  /************
68
80
  * Methods *
69
81
  ***********/
@@ -145,12 +157,12 @@ const MgActionMore = class {
145
157
  const buttonLabel = this.button.label || this.messages.label;
146
158
  const buttonContent = [buttonLabel];
147
159
  if (!this.button.isIcon && this.displayChevron) {
148
- buttonContent.push(h("span", { key: '9d7980e769806efa8da21b233aa8039fea6e1321', class: {
160
+ buttonContent.push(h("span", { class: {
149
161
  [`${this.classBase}__chevron`]: true,
150
162
  [`${this.classBase}__chevron--rotate`]: this.expanded === true,
151
- } }, h("mg-icon", { key: '40cd8ad011debcda6794b5a3f6ae6a42ea6c385d', icon: "chevron-down", size: "small" })));
163
+ } }, h("mg-icon", { icon: "chevron-down", size: "small" })));
152
164
  }
153
- return (h(Host, { key: '3a0959e16e76ab50c857e489ddb91a9ed9758fbd', "data-mg-popover-guard": this.mgPopoverIdentifier }, h("span", { key: '1e37a919b19563aab4333a94f1676cb6b9d60289', class: "mg-action-more" }, h("mg-popover", { key: 'd539fd10e3cf38774c05180e906b35840b37f11a', identifier: this.mgPopoverIdentifier, display: this.expanded, "onDisplay-change": this.handleDisplayChange }, h("mg-button", { key: 'e2fb983a112fe074ca9e9fd8629181274aaddd17', variant: this.button.variant, isIcon: this.button.isIcon, disabled: this.button.disabled, type: "button", label: buttonLabel, onClick: this.handleButton }, this.icon && h("mg-icon", Object.assign({}, this.icon)), !this.button.isIcon && buttonContent), h("div", { key: 'e09d81146a0d5188a90d4e1204852608ea74d433', slot: "content" }, h("mg-menu", { key: '00949f8628192c04d537ed9c4c4261b33fb06c71', direction: Direction.VERTICAL, label: this.messages.label }, this.items.map(item => {
165
+ return (h(Host, { key: '3833ffe89499015c991ac366c5bb87283948962b', "data-mg-popover-guard": this.mgPopoverIdentifier }, h("span", { key: '3393bfd576f5bbef7570090a5813a4eecc944559', class: "mg-action-more" }, h("mg-popover", { key: '6c589e9efbbfef4adba6f2c59eb3f562c621daf1', identifier: this.mgPopoverIdentifier, display: this.expanded, "onDisplay-change": this.handleDisplayChange }, h("mg-button", { key: '485538eb6f660de92c372ebd395e18ff7ef66c96', variant: this.button.variant, isIcon: this.button.isIcon, disabled: this.button.disabled, type: "button", label: buttonLabel, onClick: this.handleButton }, this.icon && h("mg-icon", Object.assign({ key: 'd385d7c69f118b8f20d59547357dad7d8a56766d' }, this.icon)), !this.button.isIcon && buttonContent), h("div", { key: '553f7704a5fc0b1a89062ce234607296d8bf53f2', slot: "content" }, h("mg-menu", { key: '4a161502b2d1dec2b17cd7c44cd492ec745cb7dd', direction: Direction.VERTICAL, label: this.messages.label }, this.items.map(item => {
154
166
  var _a;
155
167
  return (
156
168
  // eslint-disable-next-line react/jsx-no-bind
@@ -187,7 +199,7 @@ const MgBadge = class {
187
199
  this.label = undefined;
188
200
  this.variant = variants$5[0];
189
201
  this.outline = undefined;
190
- this.classCollection = new Me(['mg-c-badge']);
202
+ this.classCollection = new Oe(['mg-c-badge']);
191
203
  }
192
204
  validateValue(newValue) {
193
205
  if (/^(\d+\+*|[?*!a-z])$/i.exec(`${newValue}`) === null) {
@@ -195,7 +207,7 @@ const MgBadge = class {
195
207
  }
196
208
  }
197
209
  validateLabel(newValue) {
198
- if (!Be(newValue)) {
210
+ if (!Ne(newValue)) {
199
211
  throw new Error('<mg-badge> prop "label" is required.');
200
212
  }
201
213
  }
@@ -306,7 +318,7 @@ const MgButton = class {
306
318
  this.isIcon = false;
307
319
  this.disableOnClick = false;
308
320
  this.loading = false;
309
- this.classCollection = new Me(['mg-c-button']);
321
+ this.classCollection = new Oe(['mg-c-button']);
310
322
  }
311
323
  validateVariant(newValue, oldValue) {
312
324
  if (!variants$4.includes(newValue)) {
@@ -365,7 +377,7 @@ const MgButton = class {
365
377
  this.validateFullWidth(this.fullWidth);
366
378
  if (this.isIcon) {
367
379
  this.classCollection.add(`mg-c-button--icon`);
368
- if (!Be(this.label)) {
380
+ if (!Ne(this.label)) {
369
381
  throw new Error(`<mg-button> prop "label" is mandatory when prop "isIcon" is set to true.`);
370
382
  }
371
383
  }
@@ -377,7 +389,7 @@ const MgButton = class {
377
389
  * Add listners
378
390
  */
379
391
  componentDidLoad() {
380
- Ue(() => {
392
+ Ce(() => {
381
393
  var _a;
382
394
  const closestForm = this.element.closest('form') || ((_a = this.element.closest('mg-form')) === null || _a === void 0 ? void 0 : _a.shadowRoot.querySelector('form'));
383
395
  // submit buttons should trigger form submition;
@@ -394,7 +406,7 @@ const MgButton = class {
394
406
  */
395
407
  render() {
396
408
  var _a;
397
- return (h(Host, { key: 'f00c1fada18aee3205f5747113e1e4004b1ecf75', role: "button", 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: '4010a7cb779fb4a9154b8d83af7aec1b093af129', class: this.classCollection.join(), id: this.identifier }, this.loading && h("mg-icon", { icon: "loader", spin: true }), h("div", { key: '4571c578e953d983f925954d5d6a05dfa5097876', class: "mg-c-button__content" }, h("slot", { key: '6d08cc980db4375577569753562ec088378bfdfb' })))));
409
+ return (h(Host, { key: '8aa45a51510eccbb021e452d540c77844f3f4792', role: "button", 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: '9743ead1b9fd1f70ef0690087806a1767c5825b0', class: this.classCollection.join(), id: this.identifier }, this.loading && h("mg-icon", { key: '543718fe45ad3e1901c4ef0c39b98705aa9fd64e', icon: "loader", spin: true }), h("div", { key: '21bc8c1a14f93db8b2373864a18da5c651e1ac4d', class: "mg-c-button__content" }, h("slot", { key: 'd16d710b4cb94ec1b7e3dfee2d4a70ee059528b4' })))));
398
410
  }
399
411
  get element() { return getElement(this); }
400
412
  static get watchers() { return {
@@ -436,7 +448,7 @@ const MgCard = class {
436
448
  };
437
449
  this.variant = undefined;
438
450
  this.variantStyle = undefined;
439
- this.classCollection = new Me([this.classBase]);
451
+ this.classCollection = new Oe([this.classBase]);
440
452
  }
441
453
  validateVariant(newValue, oldValue) {
442
454
  if (newValue && !variants$3.includes(newValue))
@@ -474,7 +486,7 @@ const MgCard = class {
474
486
  */
475
487
  render() {
476
488
  var _a;
477
- return (h("div", { key: 'fe38aa48dae7528a45e66c68fef10444f1cf8b54', class: this.classCollection.join() }, ((_a = this.variantStyle) === null || _a === void 0 ? void 0 : _a.startsWith('bar-')) && h("span", { class: "mg-c-card__bar" }), h("slot", { key: 'ca9d1a1e15b851381f9f857eac392dea33c0bf89' })));
489
+ return (h("div", { key: 'b786a9ff3b706dcb24f6b3218feef97e284e2b9a', class: this.classCollection.join() }, ((_a = this.variantStyle) === null || _a === void 0 ? void 0 : _a.startsWith('bar-')) && h("span", { key: '11a3b421c49864667832919e6d2cbe9ea19f9344', class: "mg-c-card__bar" }), h("slot", { key: '7421932644500c619d34cbe003a0f0bb50b612a7' })));
478
490
  }
479
491
  static get watchers() { return {
480
492
  "variant": ["validateVariant"],
@@ -513,7 +525,7 @@ const MgCharacterLeft = class {
513
525
  * @returns HTML Element
514
526
  */
515
527
  render() {
516
- return (h("span", { key: 'fafe1f542f085f5f910a7b43cf6fa7e9fe9fd302', id: this.identifier, "aria-live": "polite" }, h("span", { key: '54b74d3a1161c583e47b0ad96845664e3ad9623d', "aria-hidden": "true" }, this.maxlength - this.characters.length, "/", this.maxlength), h("span", { key: '390ad6cd724c66230fb726a307391922ddfe7c2c', class: "mg-u-visually-hidden" }, this.messages.nbCharLeft.replace('{counter}', this.maxlength - this.characters.length))));
528
+ return (h("span", { key: 'd67db2514f27a2c0de9c187036f8f7e192761ce2', id: this.identifier, "aria-live": "polite" }, h("span", { key: 'e0622c110944075e1d659347965b20a9bfb5ebac', "aria-hidden": "true" }, this.maxlength - this.characters.length, "/", this.maxlength), h("span", { key: '82a7deaf6f6f2ad32a8d2cfe57787b2b7a20fd4b', class: "mg-u-visually-hidden" }, this.messages.nbCharLeft.replace('{counter}', this.maxlength - this.characters.length))));
517
529
  }
518
530
  get element() { return getElement(this); }
519
531
  static get watchers() { return {
@@ -541,7 +553,7 @@ const MgDetails = class {
541
553
  this.expanded = false;
542
554
  }
543
555
  validateTitles(newValue) {
544
- if (!Be(newValue)) {
556
+ if (!Ne(newValue)) {
545
557
  throw new Error('<mg-details> prop "toggleClosed" and "toggleOpened" must be defined.');
546
558
  }
547
559
  }
@@ -563,7 +575,7 @@ const MgDetails = class {
563
575
  * @returns HTML Element
564
576
  */
565
577
  render() {
566
- return (h("details", { key: '8427ea64231dcd5986af4c28f2923695289a2677', class: "mg-c-details", onToggle: this.handleToggle, open: this.expanded, ref: (el) => (this.details = el) }, h("summary", { key: '9618d302733fbbaf57e10415dabe60d3f418bcf1' }, h("slot", { key: '73117b9cb92a313ad8229608a4d974b8df9237b9', name: "summary" }), h("span", { key: '6b527905309929e8433aa7ee3ea15761c4924d4e', class: "mg-c-details__toggle" }, h("mg-icon", { key: '67bea97bb282ab5e7531aced3a5b1fc8941de30c', icon: "chevron-up", size: "small", class: { 'mg-c-details__toggle-icon': true, 'mg-c-details__toggle-icon--reverse': !this.expanded } }), h("span", { key: 'ebbef038c63b1458b6d02c2c64a1a24dcdcf48ca', class: { 'mg-u-visually-hidden': this.hideSummary } }, this.expanded ? this.toggleOpened : this.toggleClosed))), h("div", { key: 'be34e7a1e1f08a284a49a438858282dadaedf9a9', class: "mg-c-details__details" }, h("slot", { key: '417269d8d1d5f15754c3ba1ca6daf81aa8b4d013', name: "details" }))));
578
+ return (h("details", { key: '9c629e03b5286afb8b9139aa4e182f10a1005c81', class: "mg-c-details", onToggle: this.handleToggle, open: this.expanded, ref: (el) => (this.details = el) }, h("summary", { key: 'a525137281cb20fe8b74db56fe0e6f4f59427e4d' }, h("slot", { key: '7fb96692cfa339e904894bbddffd2211ff7741b5', name: "summary" }), h("span", { key: 'b322eb9e02173a24bcff738d6f1333ce6ab68912', class: "mg-c-details__toggle" }, h("mg-icon", { key: 'fd952a2abf6b689360faa0ef5219eb400b1a6f61', icon: "chevron-up", size: "small", class: { 'mg-c-details__toggle-icon': true, 'mg-c-details__toggle-icon--reverse': !this.expanded } }), h("span", { key: '10b0a8a350f857296ae5600de5f68a9b528a3739', class: { 'mg-u-visually-hidden': this.hideSummary } }, this.expanded ? this.toggleOpened : this.toggleClosed))), h("div", { key: 'e54fe3d881a04ccbb3d394b0492f6ab906eac1f8', class: "mg-c-details__details" }, h("slot", { key: 'ae05e78c61d9fa8e1d90aa58ac7d6ce8862128ff', name: "details" }))));
567
579
  }
568
580
  static get watchers() { return {
569
581
  "toggleClosed": ["validateTitles"],
@@ -586,7 +598,7 @@ const MgDivider = class {
586
598
  * @returns HTML Element
587
599
  */
588
600
  render() {
589
- return (h("div", { key: '7250dfa7ca66ea0831292a25ea7e76c29ca36500', class: {
601
+ return (h("div", { key: '92413bf42dc057ea1dfd645b4d619a7f180e5aca', class: {
590
602
  'mg-c-divider': true,
591
603
  'mg-c-divider--full': this.size === 'full',
592
604
  } }));
@@ -699,7 +711,7 @@ const MgForm = class {
699
711
  }
700
712
  });
701
713
  };
702
- this.identifier = Re('mg-form');
714
+ this.identifier = Me('mg-form');
703
715
  this.name = this.identifier;
704
716
  this.readonly = false;
705
717
  this.requiredMessage = undefined;
@@ -708,7 +720,7 @@ const MgForm = class {
708
720
  this.disabled = false;
709
721
  this.valid = undefined;
710
722
  this.invalid = undefined;
711
- this.classCollection = new Me(['mg-c-form']);
723
+ this.classCollection = new Oe(['mg-c-form']);
712
724
  this.requiredMessageText = undefined;
713
725
  }
714
726
  validateRequiredMessage(newValue) {
@@ -790,7 +802,7 @@ const MgForm = class {
790
802
  * @returns HTML Element
791
803
  */
792
804
  render() {
793
- return (h("form", { key: '1e102f0f152829ae6754da1e4431b8d9db0a3d9a', class: this.classCollection.join(), id: this.identifier, name: this.name, onSubmit: this.handleFormSubmit, role: this.ariaRole }, this.requiredMessageText && h("p", { innerHTML: this.requiredMessageText }), h("slot", { key: '624d29818d782e0228a406c63ba6554475a8f08a' }), !this.readonly && !this.disabled && h("slot", { name: "actions" })));
805
+ return (h("form", { key: '498fe7564261b0aad99bab2686a6f0f4624785cc', class: this.classCollection.join(), id: this.identifier, name: this.name, onSubmit: this.handleFormSubmit, role: this.ariaRole }, this.requiredMessageText && h("p", { key: 'd0d0f1f6373eff660de65104afb3ba40835a58e3', innerHTML: this.requiredMessageText }), h("slot", { key: '9e98e1b0fda2a8b69f8efb8bacccb6cd1173ba4f' }), !this.readonly && !this.disabled && h("slot", { key: '083f5490c17548defa713bb697b731b02fad9198', name: "actions" })));
794
806
  }
795
807
  get element() { return getElement(this); }
796
808
  static get watchers() { return {
@@ -849,7 +861,7 @@ const MgIcon = class {
849
861
  this.variant = undefined;
850
862
  this.variantStyle = undefined;
851
863
  this.spin = false;
852
- this.classCollection = new Me(['mg-c-icon']);
864
+ this.classCollection = new Oe(['mg-c-icon']);
853
865
  }
854
866
  validateIcon(newValue, oldValue) {
855
867
  if (!Object.keys(icons).includes(newValue))
@@ -948,7 +960,7 @@ const MgIllustratedMessage = class {
948
960
  componentDidLoad() {
949
961
  const headingTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
950
962
  const slottedIllustrations = this.element.querySelectorAll('[slot="illustration"]');
951
- if (!Fe(this.element.querySelector('[slot="title"]'), headingTags)) {
963
+ if (!De(this.element.querySelector('[slot="title"]'), headingTags)) {
952
964
  throw new Error(`<mg-illustrated-message> Slotted title must be a heading: ${headingTags.join(', ')}`);
953
965
  }
954
966
  else if (slottedIllustrations.length !== 1) {
@@ -961,13 +973,13 @@ const MgIllustratedMessage = class {
961
973
  * @returns HTML Element
962
974
  */
963
975
  render() {
964
- return (h("div", { key: '7b4e52979bc173b70ccab6a61acffb4e0ed8f01f', class: {
976
+ return (h("div", { key: '042f4e43323c30176c3d2b4d596d55a25a4382b7', class: {
965
977
  'mg-c-illustrated-message': true,
966
978
  'mg-c-illustrated-message--horizontal': this.direction === 'horizontal',
967
- } }, h("div", { key: '86d098229b950c5191ed3335dde757c169749900', class: {
979
+ } }, h("div", { key: 'ebda1c1ca89ac40ff69820f96c10c0515ab9590a', class: {
968
980
  'mg-c-illustrated-message__illustration': true,
969
981
  'mg-c-illustrated-message__illustration--small': this.size === 'small',
970
- } }, h("slot", { key: '19b4a9161013c8d8569f731755b4aa716c13c9eb', name: "illustration" })), h("div", { key: '23e8e83466613a4e3becf251f39e82e344c5bff8', class: "mg-c-illustrated-message__slots" }, h("div", { key: 'be5407092e1135567a2ce4779a4b1a2c77a532a0', class: "mg-c-illustrated-message__title" }, h("slot", { key: '1231d2a4fbcb30ad4c6d3b737f41db24300af182', name: "title" })), h("div", { key: '25b0d0b5aa3a03bfb2dd2fae2129641b6a43c595', class: "mg-c-illustrated-message__details" }, h("slot", { key: 'ef5ef7b66350be1256d36996e70e26a6132c6682', name: "details" })))));
982
+ } }, h("slot", { key: 'aa65a2f9ea28bba75b7b7ad8c0816ea9efe4c180', name: "illustration" })), h("div", { key: '8173740ede93f2800ef9de9645fd4cc05ee66e3b', class: "mg-c-illustrated-message__slots" }, h("div", { key: '970bba9668cd3ab806399cee83e6a8c9648adff0', class: "mg-c-illustrated-message__title" }, h("slot", { key: '590d7970e1845e48658ae6287fdf91e782fcfe57', name: "title" })), h("div", { key: '0c49e0842c7d12e6810fbf95404d8a66f7139320', class: "mg-c-illustrated-message__details" }, h("slot", { key: 'efec02b5d379d2a042591e4a02896691be8d67cb', name: "details" })))));
971
983
  }
972
984
  get element() { return getElement(this); }
973
985
  };
@@ -1048,7 +1060,7 @@ const MgInput = class {
1048
1060
  this.isVerticalList = false;
1049
1061
  }
1050
1062
  watchIdentifier(newValue) {
1051
- if (!Be(newValue)) {
1063
+ if (!Ne(newValue)) {
1052
1064
  throw new Error('<mg-input> prop "identifier" is required.');
1053
1065
  }
1054
1066
  else {
@@ -1133,7 +1145,7 @@ const MgInput = class {
1133
1145
  */
1134
1146
  // eslint-disable-next-line @stencil-community/no-unused-watch
1135
1147
  watchLabel() {
1136
- if (!Be(this.label)) {
1148
+ if (!Ne(this.label)) {
1137
1149
  throw new Error('<mg-input> prop "label" is required.');
1138
1150
  }
1139
1151
  else {
@@ -1227,7 +1239,7 @@ const MgInput = class {
1227
1239
  render() {
1228
1240
  const readonlyValue = this.getReadonlyValues();
1229
1241
  const isGroup = this.isFieldset && !this.isReadonly;
1230
- return (h(Host, { key: 'de3590a7b4e4f3b8b9e63af5b9b5562dd5da69fc', class: this.element.classList.toString(), role: isGroup ? 'group' : undefined, "aria-labelledby": isGroup ? `${this.identifier}-title` : undefined }, h("div", { key: 'b530d05b3456a7a68a36c931591958742a44c8c9', class: { 'mg-c-input__title': true, 'mg-u-visually-hidden': this.labelHide } }, h("slot", { key: '0fddf2c64ecc28626be04c920663efee9d67cf0a', name: this.slotLabel }), this.tooltip && !this.isReadonly && (this.tooltipPosition === 'label' || this.labelOnTop) && !this.labelHide && this.renderTooltip()), h("div", { key: 'afa1657e3ecb323076c59063901e7dda505e0096', class: "mg-c-input__input-container" }, this.isReadonly
1242
+ return (h(Host, { key: '7a344b1c43f967771a6a3460adf83d60aa7fcc7e', class: this.element.classList.toString(), role: isGroup ? 'group' : undefined, "aria-labelledby": isGroup ? `${this.identifier}-title` : undefined }, h("div", { key: 'e88dbd6ad81f94b6ab3fdd2d73986b06f05f233d', class: { 'mg-c-input__title': true, 'mg-u-visually-hidden': this.labelHide } }, h("slot", { key: '12f3e23bd14c710ef5ecad3dedeb4f3d058c49d7', name: this.slotLabel }), this.tooltip && !this.isReadonly && (this.tooltipPosition === 'label' || this.labelOnTop) && !this.labelHide && this.renderTooltip()), h("div", { key: 'd7adace17ac5d68597dd5ece286ec04e405abccd', class: "mg-c-input__input-container" }, this.isReadonly
1231
1243
  ? [
1232
1244
  Array.isArray(readonlyValue) ? (h("ul", { key: "readonly-value-list" }, readonlyValue.map(value => (h("li", { key: value }, h("strong", null, value)))))) : (h("strong", { key: "readonly-value" }, readonlyValue)),
1233
1245
  h("slot", { key: "default-slot" }),
@@ -1429,7 +1441,7 @@ const MgInputCheckbox = class {
1429
1441
  * Method to update searchResults
1430
1442
  */
1431
1443
  this.updateSearchResults = () => {
1432
- this.searchResults = this.checkboxItems.filter(item => Ne(item.title).includes(Ne(this.searchValue)));
1444
+ this.searchResults = this.checkboxItems.filter(item => Ue(item.title).includes(Ue(this.searchValue)));
1433
1445
  };
1434
1446
  /**
1435
1447
  * Method to validate if one of inputs value is checked id required
@@ -1503,7 +1515,7 @@ const MgInputCheckbox = class {
1503
1515
  this.helpText = undefined;
1504
1516
  this.valid = undefined;
1505
1517
  this.invalid = undefined;
1506
- this.classCollection = new Me([this.baseClassName, classFieldset]);
1518
+ this.classCollection = new Oe([this.baseClassName, classFieldset]);
1507
1519
  this.errorMessage = undefined;
1508
1520
  this.checkboxItems = [];
1509
1521
  this.displaySearchInput = undefined;
@@ -1611,7 +1623,7 @@ const MgInputCheckbox = class {
1611
1623
  if (typeof valid !== 'boolean') {
1612
1624
  throw new Error('<mg-input-checkbox> method "setError()" param "valid" must be a boolean');
1613
1625
  }
1614
- else if (!Be(errorMessage)) {
1626
+ else if (!Ne(errorMessage)) {
1615
1627
  throw new Error('<mg-input-checkbox> method "setError()" param "errorMessage" must be a string');
1616
1628
  }
1617
1629
  else {
@@ -1724,7 +1736,7 @@ const MgInputCheckbox = class {
1724
1736
  * @returns HTML Element
1725
1737
  */
1726
1738
  render() {
1727
- 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())));
1739
+ return (h("mg-input", { key: 'b695390b3a9525ba849c4442c6c6b0e643ec7348', 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())));
1728
1740
  }
1729
1741
  get element() { return getElement(this); }
1730
1742
  static get watchers() { return {
@@ -1839,10 +1851,10 @@ const MgInputCheckboxPaginated = class {
1839
1851
  * @returns HTML Element
1840
1852
  */
1841
1853
  render() {
1842
- const getText = (checkboxes) => (h("em", { key: 'd1377fde2a3fdf69077a52d9b81e38b7c52881ec', class: "mg-c-input__section-header-title-label" }, `${this.messages[checkboxes.length > 1 ? 'titlePlurial' : 'title']} (${checkboxes.length})`));
1854
+ const getText = (checkboxes) => (h("em", { key: '0a1e9d02d508a27fda294b25d835f44b73d4c443', class: "mg-c-input__section-header-title-label" }, `${this.messages[checkboxes.length > 1 ? 'titlePlurial' : 'title']} (${checkboxes.length})`));
1843
1855
  const [from, to] = this.getFromToIndexes();
1844
1856
  const itemsContainerId = `items-${this.sectionKind}-container`;
1845
- 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 }))));
1857
+ return (h(Host, { key: '71c72a433b984a609046fdce7cf4c6130c8e1ada', hidden: this.checkboxes.length < 1 }, h("div", { key: 'b2bd73e01db4db0edca92c5e7fc64edfda9d3b6d', 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", { key: 'dcc6b405032e5b59cc748f1cbc87ab087c37cc31', class: "mg-c-input__section-header-tootlip", message: this.messages.tooltip, "data-popper-strategy": "absolute" }, h("mg-button", { key: 'a1d38aedc328d81ac8139f70e8564538f7e4b4c4', 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: 'd9913a7ceeac5d91f0c58e5021a88f1bf37b1387', hidden: !this.expanded, id: itemsContainerId, class: "mg-c-input__section-content" }, h(MgInputCheckboxList, { key: 'f262b871762d3c3f3e9828ed04cd735a89f9f27d', 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 }))));
1846
1858
  }
1847
1859
  static get watchers() { return {
1848
1860
  "checkboxes": ["validateCheckboxes"],
@@ -1856,6 +1868,7 @@ var InputError$1;
1856
1868
  InputError["MAX"] = "max";
1857
1869
  InputError["MINMAX"] = "minMax";
1858
1870
  InputError["REQUIRED"] = "required";
1871
+ InputError["PATTERN"] = "badInput";
1859
1872
  })(InputError$1 || (InputError$1 = {}));
1860
1873
 
1861
1874
  const mgInputDateCss = ".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-c-input__box{height:var(--default-size);box-sizing:border-box;padding:calc((var(--default-size) - var(--font-size)*var(--line-height))/2) var(--mg-inputs-spacer);border-width:var(--mg-inputs-border-width);border-style:solid;border-color:var(--mg-inputs-color);border-radius:var(--mg-inputs-border-radius);background-color:hsl(var(--color-light));color:hsl(var(--color-dark));font-family:inherit;font-size:var(--font-size);text-align:var(--mg-inputs-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 .6rem hsl(var(--mg-inputs-color-shadow-focus-hsl)/50%)}.mg-c-input__box:disabled{opacity:.3}.mg-c-input.mg-c-input--is-input-group-append{--mg-button-border-radius-top-left:0;--mg-button-border-radius-bottom-left:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:-0.1rem;border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-button-border-radius-top-right:0;--mg-button-border-radius-bottom-right:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-button-border-right-width:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-button-border-radius-top-right:var(--mg-inputs-border-radius);--mg-button-border-radius-bottom-right:var(--mg-inputs-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){align-self:start;padding-top:calc((var(--default-size) - var(--mg-icon-regular-size))/2)}.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}}";
@@ -1868,6 +1881,12 @@ const MgInputDate = class {
1868
1881
  this.inputValid = createEvent(this, "input-valid", 7);
1869
1882
  // hasDisplayedError (triggered by blur event)
1870
1883
  this.hasDisplayedError = false;
1884
+ /**
1885
+ * Method to validate date pattern string
1886
+ * @param value - value to test
1887
+ * @returns truthy when value match the pattern
1888
+ */
1889
+ this.isValidPattern = (value) => Ne(value) && ge.test(value);
1871
1890
  /**
1872
1891
  * Format help text to display
1873
1892
  * @param helpText - help text format
@@ -1875,10 +1894,10 @@ const MgInputDate = class {
1875
1894
  */
1876
1895
  this.formatHelpText = (helpText) => {
1877
1896
  const defaultHelpTextVariable = '{defaultHelpText}';
1878
- let text = Be(helpText) ? helpText : this.messages.input.date.helpText;
1897
+ let text = Ne(helpText) ? helpText : this.messages.input.date.helpText;
1879
1898
  if (text.includes(defaultHelpTextVariable))
1880
1899
  text = text.replace(defaultHelpTextVariable, this.formatHelpText(this.messages.input.date.helpText));
1881
- return text.replace('{pattern}', this.renderPattern()).replace('{date}', ge(We(new Date('2023-12-24')), this.systemLocale));
1900
+ return text.replace('{pattern}', this.renderPattern()).replace('{date}', pe(ze(new Date('2023-12-24')), this.systemLocale));
1882
1901
  };
1883
1902
  /**
1884
1903
  * Handle input event
@@ -1900,32 +1919,52 @@ const MgInputDate = class {
1900
1919
  this.handlerInProgress = undefined;
1901
1920
  });
1902
1921
  };
1922
+ /**
1923
+ * Handle keydown event
1924
+ * @param event - input keydown event
1925
+ */
1926
+ this.handleKeyDown = (event) => {
1927
+ // bypass the native "Delete" action wich trigger an "input" event with "checkValidty() => false" with a falsy badInput = true,
1928
+ // when we reset the field we need to test a blank value.
1929
+ if (['Delete', 'Backspace'].includes(event.key)) {
1930
+ event.preventDefault();
1931
+ this.value = '';
1932
+ this.checkValidity();
1933
+ if (this.hasDisplayedError) {
1934
+ this.setErrorMessage();
1935
+ }
1936
+ }
1937
+ };
1903
1938
  /**
1904
1939
  * Check if input is valid
1905
1940
  */
1906
1941
  this.checkValidity = () => {
1907
- this.setValidity(this.readonly || this.disabled || this.input.checkValidity());
1942
+ this.setValidity(this.readonly || this.disabled || (this.input.checkValidity() && (!this.value || this.isValidPattern(this.value))));
1908
1943
  };
1909
1944
  /**
1910
1945
  * get input error code
1911
1946
  * @returns error code
1912
1947
  */
1913
1948
  this.getInputError = () => {
1914
- var _a, _b;
1949
+ var _a;
1915
1950
  let inputError = null;
1916
1951
  // required
1917
1952
  if (this.input.validity.valueMissing) {
1918
1953
  inputError = InputError$1.REQUIRED;
1919
1954
  }
1955
+ // pattern
1956
+ else if (this.value && !this.isValidPattern(this.value)) {
1957
+ inputError = InputError$1.PATTERN;
1958
+ }
1920
1959
  // min & max
1921
- else if ((this.input.validity.rangeUnderflow || this.input.validity.rangeOverflow) && ((_a = this.min) === null || _a === void 0 ? void 0 : _a.length) > 0 && ((_b = this.max) === null || _b === void 0 ? void 0 : _b.length) > 0) {
1960
+ else if ((this.input.validity.rangeUnderflow || this.input.validity.rangeOverflow) && ((_a = this.min) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.max !== '9999-12-31') {
1922
1961
  inputError = InputError$1.MINMAX;
1923
1962
  }
1924
1963
  // min
1925
1964
  else if (this.input.validity.rangeUnderflow) {
1926
1965
  inputError = InputError$1.MIN;
1927
1966
  }
1928
- //max
1967
+ // max
1929
1968
  else if (this.input.validity.rangeOverflow) {
1930
1969
  inputError = InputError$1.MAX;
1931
1970
  }
@@ -1950,8 +1989,8 @@ const MgInputDate = class {
1950
1989
  // min, max & minMax
1951
1990
  else if ([InputError$1.MIN, InputError$1.MAX, InputError$1.MINMAX].includes(inputError)) {
1952
1991
  this.errorMessage = this.messages.errors.date[inputError]
1953
- .replace('{min}', ge(this.min, this.systemLocale))
1954
- .replace('{max}', ge(this.max, this.systemLocale));
1992
+ .replace('{min}', pe(this.min, this.systemLocale))
1993
+ .replace('{max}', pe(this.max, this.systemLocale));
1955
1994
  }
1956
1995
  // wrong date format
1957
1996
  // element.validity.badInput is default error message
@@ -1965,7 +2004,7 @@ const MgInputDate = class {
1965
2004
  * @returns translated html pattern
1966
2005
  */
1967
2006
  this.renderPattern = () => {
1968
- let patternLocal = Pe(this.systemLocale);
2007
+ let patternLocal = We(this.systemLocale);
1969
2008
  for (const key in this.messages.input.date.pattern) {
1970
2009
  patternLocal = patternLocal.replace(key, this.messages.input.date.pattern[key]);
1971
2010
  }
@@ -1980,26 +2019,30 @@ const MgInputDate = class {
1980
2019
  this.required = false;
1981
2020
  this.readonly = false;
1982
2021
  this.min = undefined;
1983
- this.max = undefined;
2022
+ this.max = '9999-12-31';
1984
2023
  this.disabled = false;
1985
2024
  this.tooltip = undefined;
1986
2025
  this.tooltipPosition = 'input';
1987
2026
  this.helpText = undefined;
1988
2027
  this.valid = undefined;
1989
2028
  this.invalid = undefined;
1990
- this.classCollection = new Me(['mg-c-input--date']);
2029
+ this.classCollection = new Oe(['mg-c-input--date']);
1991
2030
  this.errorMessage = undefined;
1992
2031
  }
1993
2032
  validateValue(newValue) {
1994
2033
  // When the input is not fully completed or has been cleared, the value becomes an empty string.
1995
2034
  if (newValue === '')
1996
2035
  newValue = null;
1997
- if (newValue !== undefined && newValue !== null && (typeof newValue !== 'string' || !de.test(newValue))) {
1998
- throw new Error("<mg-input-date> props 'value' doesn't match pattern: yyyy-mm-dd");
2036
+ // check value validity
2037
+ if (newValue && !Ne(newValue)) {
2038
+ throw new Error("<mg-input-date> props 'value' must be a valid string");
1999
2039
  }
2000
- else {
2040
+ else if (!newValue || (newValue && this.isValidPattern(newValue))) {
2001
2041
  this.valueChange.emit(newValue);
2002
2042
  }
2043
+ else {
2044
+ console.error("<mg-input-date> props 'value' doesn't match pattern: yyyy-mm-dd");
2045
+ }
2003
2046
  }
2004
2047
  watchReadonly(newValue) {
2005
2048
  if (newValue)
@@ -2008,7 +2051,7 @@ const MgInputDate = class {
2008
2051
  this.classCollection.delete(classReadonly);
2009
2052
  }
2010
2053
  validateMinMax(newValue) {
2011
- if ((newValue === null || newValue === void 0 ? void 0 : newValue.length) === 0 || ((newValue === null || newValue === void 0 ? void 0 : newValue.length) > 0 && !(typeof newValue === 'string' && de.test(newValue)))) {
2054
+ if (newValue && !this.isValidPattern(newValue)) {
2012
2055
  throw new Error("<mg-input-date> props 'min/max' doesn't match pattern: yyyy-mm-dd");
2013
2056
  }
2014
2057
  }
@@ -2048,7 +2091,7 @@ const MgInputDate = class {
2048
2091
  if (typeof valid !== 'boolean') {
2049
2092
  throw new Error('<mg-input-date> method "setError()" param "valid" must be a boolean');
2050
2093
  }
2051
- else if (!Be(errorMessage)) {
2094
+ else if (!Ne(errorMessage)) {
2052
2095
  throw new Error('<mg-input-date> method "setError()" param "errorMessage" must be a string');
2053
2096
  }
2054
2097
  else {
@@ -2102,7 +2145,7 @@ const MgInputDate = class {
2102
2145
  * @returns HTML Element
2103
2146
  */
2104
2147
  render() {
2105
- return (h("mg-input", { key: 'b5eea353e13d76c1fe9569b3c237bf7e787774fe', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonlyValue: ge(this.value, this.locale), tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, h("input", { key: '6e75312c774aadde75dc6dbd197b7224d08fd7ba', type: "date", class: "mg-c-input__box", min: this.min, max: this.max, value: this.value, id: this.identifier, name: this.name, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
2148
+ return (h("mg-input", { key: 'f38d79cb71311149b4d15885b65cd8f025dde15d', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonlyValue: pe(this.value, this.locale), tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, h("input", { key: '67bf6f0ad58ee1a506ffd0d3d41d5954db68465c', type: "date", class: "mg-c-input__box", min: this.min, max: this.max, value: this.value, id: this.identifier, name: this.name, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, ref: (el) => {
2106
2149
  if (el !== null)
2107
2150
  this.input = el;
2108
2151
  } })));
@@ -2233,9 +2276,9 @@ const MgInputNumeric = class {
2233
2276
  this.formatValue = (value) => {
2234
2277
  switch (this.format) {
2235
2278
  case 'number':
2236
- return qe(value, this.locale);
2279
+ return we(value, this.locale, this.type === 'decimal' ? this.decimalLength : undefined);
2237
2280
  case 'currency':
2238
- return ze(value, this.locale, this.currency);
2281
+ return qe(value, this.locale, this.currency);
2239
2282
  case 'none':
2240
2283
  return value.toString();
2241
2284
  }
@@ -2272,7 +2315,7 @@ const MgInputNumeric = class {
2272
2315
  this.decimalLength = 2;
2273
2316
  this.valid = undefined;
2274
2317
  this.invalid = undefined;
2275
- this.classCollection = new Me(['mg-c-input--numeric']);
2318
+ this.classCollection = new Oe(['mg-c-input--numeric']);
2276
2319
  this.errorMessage = undefined;
2277
2320
  this.hasFocus = undefined;
2278
2321
  }
@@ -2368,7 +2411,7 @@ const MgInputNumeric = class {
2368
2411
  if (typeof valid !== 'boolean') {
2369
2412
  throw new Error('<mg-input-numeric> method "setError()" param "valid" must be a boolean');
2370
2413
  }
2371
- else if (!Be(errorMessage)) {
2414
+ else if (!Ne(errorMessage)) {
2372
2415
  throw new Error('<mg-input-numeric> method "setError()" param "errorMessage" must be a string');
2373
2416
  }
2374
2417
  else {
@@ -2463,10 +2506,10 @@ const MgInputNumeric = class {
2463
2506
  * @returns HTML Element
2464
2507
  */
2465
2508
  render() {
2466
- return (h("mg-input", { key: 'ad31254b8cd13d07b07a1fc40ddd515047ddbfed', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonlyValue: this.readonlyValue, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("input", { key: '9d094501fa4f4a07eb9b3d50bda55f1344099fb9', type: "text", class: "mg-c-input__box mg-c-input__box--width", value: this.displayValue(), id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: (el) => {
2509
+ return (h("mg-input", { key: '52a1e1cc7a6f16290a62c258e099cd8c0cc30567', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonlyValue: this.readonlyValue, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("input", { key: 'a36bbe191ff0fcacbf7bd459ad7d743a623eba44', type: "text", class: "mg-c-input__box mg-c-input__box--width", value: this.displayValue(), id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: (el) => {
2467
2510
  if (el !== null)
2468
2511
  this.input = el;
2469
- } }), h("slot", { key: 'c1970cbf9e7fce07abd63382d401f4e2834bc4d0', name: "append-input" })));
2512
+ } }), h("slot", { key: '6b6ae5ae8aa3de2c1d0360c2ddef962a7b3e6bc0', name: "append-input" })));
2470
2513
  }
2471
2514
  get element() { return getElement(this); }
2472
2515
  static get watchers() { return {
@@ -2560,7 +2603,7 @@ const MgInputPassword = class {
2560
2603
  this.helpText = undefined;
2561
2604
  this.valid = undefined;
2562
2605
  this.invalid = undefined;
2563
- this.classCollection = new Me(['mg-c-input--password']);
2606
+ this.classCollection = new Oe(['mg-c-input--password']);
2564
2607
  this.errorMessage = undefined;
2565
2608
  this.displayPassword = false;
2566
2609
  }
@@ -2618,7 +2661,7 @@ const MgInputPassword = class {
2618
2661
  if (typeof valid !== 'boolean') {
2619
2662
  throw new Error('<mg-input-password> method "setError()" param "valid" must be a boolean');
2620
2663
  }
2621
- else if (!Be(errorMessage)) {
2664
+ else if (!Ne(errorMessage)) {
2622
2665
  throw new Error('<mg-input-password> method "setError()" param "errorMessage" must be a string');
2623
2666
  }
2624
2667
  else {
@@ -2664,10 +2707,10 @@ const MgInputPassword = class {
2664
2707
  * @returns HTML Element
2665
2708
  */
2666
2709
  render() {
2667
- return (h("mg-input", { key: '0743de03e00b3eeeca1e155fefa6fa3fa8dd20e4', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonlyValue: this.value !== undefined ? '•'.repeat(this.value.length) : undefined, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("span", { key: '35c61d84248fe5b65c91afcb932d8e71aa0db71f', class: "mg-c-input__input-group" }, h("input", { key: 'b546544ac71d8d29ea7ac18146faccfdb1d738de', type: this.displayPassword ? 'text' : 'password', class: "mg-c-input__box mg-c-input__box--width", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
2710
+ return (h("mg-input", { key: '39c2a1a17b4b64cb79ed6ca7036dd304ed01a8e6', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonlyValue: this.value !== undefined ? '•'.repeat(this.value.length) : undefined, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("span", { key: 'd85a4240b6d178cde418ee72164f337c4986aeff', class: "mg-c-input__input-group" }, h("input", { key: '2caccd24026632f5e65dd4cf12914bf71ca656d3', type: this.displayPassword ? 'text' : 'password', class: "mg-c-input__box mg-c-input__box--width", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
2668
2711
  if (el !== null)
2669
2712
  this.input = el;
2670
- } }), h("mg-button", { key: '95724fdf30124db514f45482f8832e384e26eeda', label: this.messages.input.password[this.displayPassword ? 'hide' : 'display'], disabled: this.disabled, variant: "flat", class: "mg-c-input__append-button", "is-icon": true, onClick: this.toggleDisplayPassword }, h("mg-icon", { key: '0561963f435ae27b1118411d4654447cd43577a1', icon: this.displayPassword ? 'eye-slash' : 'eye' })))));
2713
+ } }), h("mg-button", { key: '59bd6c94c412eb8bcd5ece82e569e7df6fadaf9a', label: this.messages.input.password[this.displayPassword ? 'hide' : 'display'], disabled: this.disabled, variant: "flat", class: "mg-c-input__append-button", "is-icon": true, onClick: this.toggleDisplayPassword, "aria-controls": this.identifier }, h("mg-icon", { key: '22db9c43220335f258b8fa5978cb66a5d4c14c61', icon: this.displayPassword ? 'eye-slash' : 'eye' })))));
2671
2714
  }
2672
2715
  get element() { return getElement(this); }
2673
2716
  static get watchers() { return {
@@ -2765,7 +2808,7 @@ const MgInputRadio = class {
2765
2808
  this.helpText = undefined;
2766
2809
  this.valid = undefined;
2767
2810
  this.invalid = undefined;
2768
- this.classCollection = new Me(['mg-c-input--radio', classFieldset]);
2811
+ this.classCollection = new Oe(['mg-c-input--radio', classFieldset]);
2769
2812
  this.errorMessage = undefined;
2770
2813
  this.options = undefined;
2771
2814
  }
@@ -2778,7 +2821,7 @@ const MgInputRadio = class {
2778
2821
  throw new Error('<mg-input-radio> prop "items" require at least 2 items.');
2779
2822
  }
2780
2823
  // String array
2781
- else if (Oe(newValue)) {
2824
+ else if (Fe(newValue)) {
2782
2825
  this.options = newValue.map(item => ({ title: item, value: item, disabled: this.disabled }));
2783
2826
  }
2784
2827
  // Object array
@@ -2837,7 +2880,7 @@ const MgInputRadio = class {
2837
2880
  if (typeof valid !== 'boolean') {
2838
2881
  throw new Error('<mg-input-radio> method "setError()" param "valid" must be a boolean');
2839
2882
  }
2840
- else if (!Be(errorMessage)) {
2883
+ else if (!Ne(errorMessage)) {
2841
2884
  throw new Error('<mg-input-radio> method "setError()" param "errorMessage" must be a string');
2842
2885
  }
2843
2886
  else {
@@ -2886,7 +2929,7 @@ const MgInputRadio = class {
2886
2929
  */
2887
2930
  render() {
2888
2931
  var _a;
2889
- return (h("mg-input", { key: 'e09de122464247bc706e0ec83257cad72645406a', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonlyValue: (_a = this.value) === null || _a === void 0 ? void 0 : _a.toString(), tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("ul", { key: '28cf4fa269394ec663e05355eb1b6158da1d8328', class: "mg-c-input__input-group-container", role: "list" }, this.options.map((input, index) => (h("li", { key: input.title, class: { 'mg-c-input__input-group': true, 'mg-c-input__input-group--disabled': this.disabled || input.disabled } }, h("input", { type: "radio", id: this.identifier + '_' + index, name: this.identifier, value: index, checked: JSON.stringify(this.value) === JSON.stringify(this.options[index].value), disabled: this.disabled || input.disabled, required: this.required, onBlur: this.handleBlur, onInput: this.handleInput, ref: (el) => {
2932
+ return (h("mg-input", { key: 'a987bc86a4bf97aead796cd7c91110cc0e3c90df', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonlyValue: (_a = this.value) === null || _a === void 0 ? void 0 : _a.toString(), tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("ul", { key: 'e5e249a744ecb1f09cdbe7f9ec9d8f44b8b20ece', class: "mg-c-input__input-group-container", role: "list" }, this.options.map((input, index) => (h("li", { key: input.title, class: { 'mg-c-input__input-group': true, 'mg-c-input__input-group--disabled': this.disabled || input.disabled } }, h("input", { type: "radio", id: this.identifier + '_' + index, name: this.identifier, value: index, checked: JSON.stringify(this.value) === JSON.stringify(this.options[index].value), disabled: this.disabled || input.disabled, required: this.required, onBlur: this.handleBlur, onInput: this.handleInput, ref: (el) => {
2890
2933
  if (el !== null)
2891
2934
  this.inputs[index] = el;
2892
2935
  } }), h("label", { htmlFor: this.identifier + '_' + index }, input.title)))))));
@@ -2984,7 +3027,7 @@ const MgInputSelect = class {
2984
3027
  if (this.input.value === '') {
2985
3028
  this.setValue(null);
2986
3029
  }
2987
- else if (Oe(this.items) && this.items.includes(this.input.value)) {
3030
+ else if (Fe(this.items) && this.items.includes(this.input.value)) {
2988
3031
  this.setValue(this.input.value);
2989
3032
  }
2990
3033
  else if (allItemsAreOptions(this.items) && typeof this.input.value === 'string' && this.items.some(this.isInputValue)) {
@@ -3058,7 +3101,7 @@ const MgInputSelect = class {
3058
3101
  this.helpText = undefined;
3059
3102
  this.valid = undefined;
3060
3103
  this.invalid = undefined;
3061
- this.classCollection = new Me(['mg-c-input--select']);
3104
+ this.classCollection = new Oe(['mg-c-input--select']);
3062
3105
  this.errorMessage = undefined;
3063
3106
  this.options = undefined;
3064
3107
  this.valueExist = undefined;
@@ -3066,7 +3109,7 @@ const MgInputSelect = class {
3066
3109
  }
3067
3110
  validateValue(newValue) {
3068
3111
  var _a, _b;
3069
- if (Oe(this.items) && typeof newValue === 'string') {
3112
+ if (Fe(this.items) && typeof newValue === 'string') {
3070
3113
  this.readonlyValue = ((_a = this.input) === null || _a === void 0 ? void 0 : _a.value) ? this.input.value : newValue;
3071
3114
  }
3072
3115
  else if (allItemsAreOptions(this.items)) {
@@ -3083,7 +3126,7 @@ const MgInputSelect = class {
3083
3126
  this.options = [];
3084
3127
  }
3085
3128
  // String array
3086
- else if (Oe(newValue)) {
3129
+ else if (Fe(newValue)) {
3087
3130
  if (typeof this.value === 'string')
3088
3131
  this.valueExist = newValue.includes(this.value);
3089
3132
  this.options = newValue.map(item => ({ title: item, value: item }));
@@ -3155,7 +3198,7 @@ const MgInputSelect = class {
3155
3198
  if (typeof valid !== 'boolean') {
3156
3199
  throw new Error('<mg-input-select> method "setError()" param "valid" must be a boolean');
3157
3200
  }
3158
- else if (!Be(errorMessage)) {
3201
+ else if (!Ne(errorMessage)) {
3159
3202
  throw new Error('<mg-input-select> method "setError()" param "errorMessage" must be a string');
3160
3203
  }
3161
3204
  else {
@@ -3208,11 +3251,11 @@ const MgInputSelect = class {
3208
3251
  * @returns HTML Element
3209
3252
  */
3210
3253
  render() {
3211
- return (h("mg-input", { key: '66df624f7671f6403b623718110403a83c8282ad', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonlyValue: this.readonlyValue, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("select", { key: '005b1893fb651cbaebfbb66ca816b4605d874808', class: "mg-c-input__box", id: this.identifier, name: this.name, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
3254
+ return (h("mg-input", { key: 'b6e431b881062928dfff44b35b40e2c16a8c56fc', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonlyValue: this.readonlyValue, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("select", { key: '964162aae800e85cf9801c67c264736061fd80c6', class: "mg-c-input__box", id: this.identifier, name: this.name, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
3212
3255
  if (el !== null)
3213
3256
  this.input = el;
3214
3257
  } }, (!this.placeholderHide || !this.valueExist) && ( // In case passed value does not match any option we display the placeholder
3215
- h("option", { value: "", disabled: this.placeholderDisabled && this.valueExist }, this.placeholder)), this.options.map(option => isOptGroup(option) ? (h("optgroup", { label: option.group, key: option.group }, option.options.map(this.renderOption))) : (isOption$1(option) && this.renderOption(option))))));
3258
+ h("option", { key: '9c24f8983858810541a0a626a5705ac9d05e26e0', value: "", disabled: this.placeholderDisabled && this.valueExist }, this.placeholder)), this.options.map(option => isOptGroup(option) ? (h("optgroup", { label: option.group, key: option.group }, option.options.map(this.renderOption))) : (isOption$1(option) && this.renderOption(option))))));
3216
3259
  }
3217
3260
  get element() { return getElement(this); }
3218
3261
  static get watchers() { return {
@@ -3229,6 +3272,12 @@ MgInputSelect.style = MgInputSelectStyle0;
3229
3272
  const mgInputTextCss = ".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-c-input__box{height:var(--default-size);box-sizing:border-box;padding:calc((var(--default-size) - var(--font-size)*var(--line-height))/2) var(--mg-inputs-spacer);border-width:var(--mg-inputs-border-width);border-style:solid;border-color:var(--mg-inputs-color);border-radius:var(--mg-inputs-border-radius);background-color:hsl(var(--color-light));color:hsl(var(--color-dark));font-family:inherit;font-size:var(--font-size);text-align:var(--mg-inputs-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 .6rem hsl(var(--mg-inputs-color-shadow-focus-hsl)/50%)}.mg-c-input__box:disabled{opacity:.3}.mg-c-input.mg-c-input--is-input-group-append{--mg-button-border-radius-top-left:0;--mg-button-border-radius-bottom-left:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:-0.1rem;border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-button-border-radius-top-right:0;--mg-button-border-radius-bottom-right:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-button-border-right-width:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-button-border-radius-top-right:var(--mg-inputs-border-radius);--mg-button-border-radius-bottom-right:var(--mg-inputs-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){align-self:start;padding-top:calc((var(--default-size) - var(--mg-icon-regular-size))/2)}.mg-c-input.mg-c-input--has-display-character-left mg-character-left{font-size:1.1rem;opacity:.6}.mg-c-input.mg-c-input--has-display-character-left .mg-c-input__input+.mg-c-input__help-text ::slotted(*),.mg-c-input.mg-c-input--has-display-character-left .mg-c-input__input+.mg-c-input__error ::slotted(*){margin-top:0}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}.mg-c-input__with-character-left{position:relative;width:100%}.mg-c-input.mg-u-is-focused .mg-c-input__with-character-left .mg-c-input__box{padding-right:calc(var(--mg-character-left-message-length)*1ch + .8rem)}.mg-c-input__with-character-left mg-character-left{position:absolute;top:50%;right:1rem;display:none;font-size:1.1rem;opacity:.6;transform:translateY(-50%)}.mg-c-input.mg-u-is-focused .mg-c-input__with-character-left mg-character-left{display:block}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left>mg-icon{position:absolute;top:50%;left:var(--mg-inputs-spacer);color:var(--mg-inputs-color);transform:translateY(-50%)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left .mg-c-input__box{padding-left:calc(var(--mg-icon-regular-size) + var(--mg-inputs-spacer)*2)}";
3230
3273
  const MgInputTextStyle0 = mgInputTextCss;
3231
3274
 
3275
+ /**
3276
+ * Check if datalist options are well structured.
3277
+ *
3278
+ * @param options - Datalist options to check.
3279
+ * @returns True if datalist is well structured.
3280
+ */
3232
3281
  const isDatalistOption = (options) => Array.isArray(options) && options.every(option => typeof option === 'string');
3233
3282
  const MgInputText = class {
3234
3283
  constructor(hostRef) {
@@ -3261,7 +3310,7 @@ const MgInputText = class {
3261
3310
  */
3262
3311
  this.handleFocus = () => {
3263
3312
  this.classCollection.add(this.classFocus);
3264
- this.classCollection = new Me(this.classCollection.classes);
3313
+ this.classCollection = new Oe(this.classCollection.classes);
3265
3314
  };
3266
3315
  /**
3267
3316
  * Handle blur event
@@ -3269,7 +3318,7 @@ const MgInputText = class {
3269
3318
  this.handleBlur = () => {
3270
3319
  // Manage focus
3271
3320
  this.classCollection.delete(this.classFocus);
3272
- this.classCollection = new Me(this.classCollection.classes);
3321
+ this.classCollection = new Oe(this.classCollection.classes);
3273
3322
  // Display Error
3274
3323
  this.handlerInProgress = Handler.BLUR;
3275
3324
  this.displayError().finally(() => {
@@ -3344,7 +3393,7 @@ const MgInputText = class {
3344
3393
  this.helpText = undefined;
3345
3394
  this.valid = undefined;
3346
3395
  this.invalid = undefined;
3347
- this.classCollection = new Me(['mg-c-input--text']);
3396
+ this.classCollection = new Oe(['mg-c-input--text']);
3348
3397
  this.errorMessage = undefined;
3349
3398
  }
3350
3399
  handleValue(newValue) {
@@ -3395,7 +3444,7 @@ const MgInputText = class {
3395
3444
  this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);
3396
3445
  }
3397
3446
  validatePattern(newValue) {
3398
- if (newValue !== undefined && !(Be(this.pattern) && Be(this.patternErrorMessage))) {
3447
+ if (newValue !== undefined && !(Ne(this.pattern) && Ne(this.patternErrorMessage))) {
3399
3448
  throw new Error('<mg-input-text> props "pattern" and "patternErrorMessage" must be non-empty string and paired.');
3400
3449
  }
3401
3450
  }
@@ -3425,7 +3474,7 @@ const MgInputText = class {
3425
3474
  if (typeof valid !== 'boolean') {
3426
3475
  throw new Error('<mg-input-text> method "setError()" param "valid" must be a boolean');
3427
3476
  }
3428
- else if (!Be(errorMessage)) {
3477
+ else if (!Ne(errorMessage)) {
3429
3478
  throw new Error('<mg-input-text> method "setError()" param "errorMessage" must be a string');
3430
3479
  }
3431
3480
  else {
@@ -3479,14 +3528,14 @@ const MgInputText = class {
3479
3528
  * @returns HTML Element
3480
3529
  */
3481
3530
  render() {
3482
- return (h("mg-input", { key: 'd374af889d485ffa2548f30c9555400b1cbdd5d9', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [this.characterLeftId], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonlyValue: this.value, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("div", { key: '71bf68b39704b5a1a8c5fc941c9dc1d5acd16e85', class: "mg-c-input__with-character-left", style: {
3531
+ return (h("mg-input", { key: 'ee9b290a3c97af6c264b37958c3a6123d516f391', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [this.characterLeftId], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonlyValue: this.value, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("div", { key: 'e348db67a88f9941c549cb190aaca88c93aac54c', class: "mg-c-input__with-character-left", style: {
3483
3532
  '--mg-character-left-message-length': (this.displayCharacterLeft
3484
3533
  ? (this.maxlength - (this.value || '').length).toString().length + this.maxlength.toString().length + 1
3485
3534
  : 0).toString(),
3486
- } }, this.icon !== undefined && h("mg-icon", { icon: this.icon }), h("input", { key: 'c25b28a20c97d17c2d9cd4f14970e5c9e7f0e40c', type: this.type, class: "mg-c-input__box mg-c-input__box--width", value: this.value, id: this.identifier, list: this.hasDatalist() ? this.datalistId : undefined, autocomplete: this.hasDatalist() ? 'off' : undefined, name: this.name, placeholder: this.placeholder, title: this.placeholder, maxlength: this.maxlength, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), pattern: this.pattern, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: (el) => {
3535
+ } }, this.icon !== undefined && h("mg-icon", { key: 'dfe0ce7e271c40d4da20f00b35ad4fe104e08c91', icon: this.icon }), h("input", { key: '451af2cff19f47d9b9d3de824546324b6bfaf235', type: this.type, class: "mg-c-input__box mg-c-input__box--width", value: this.value, id: this.identifier, list: this.hasDatalist() ? this.datalistId : undefined, autocomplete: this.hasDatalist() ? 'off' : undefined, name: this.name, placeholder: this.placeholder, title: this.placeholder, maxlength: this.maxlength, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), pattern: this.pattern, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: (el) => {
3487
3536
  if (el !== null)
3488
3537
  this.input = el;
3489
- } }), this.hasDatalist() && (h("datalist", { id: this.datalistId }, this.datalistoptions.map(option => (h("option", { value: option, key: option }))))), this.displayCharacterLeft && this.maxlength > 0 && (h("mg-character-left", { identifier: this.characterLeftId, characters: this.value, maxlength: this.maxlength }))), h("slot", { key: '9b6286d6942ae75226f28d4274bf8454a9f422e8', name: "append-input" })));
3538
+ } }), this.hasDatalist() && (h("datalist", { key: '387530d84dd29575c5e8985ad40211e490bb04e4', id: this.datalistId }, this.datalistoptions.map(option => (h("option", { value: option, key: option }))))), this.displayCharacterLeft && this.maxlength > 0 && (h("mg-character-left", { key: 'e0278d4295d5c923f21f617bbf37ee09bd907b54', identifier: this.characterLeftId, characters: this.value, maxlength: this.maxlength }))), h("slot", { key: '3d896e5ad21380c04c58fe925b8186e9f0a9207b', name: "append-input" })));
3490
3539
  }
3491
3540
  get element() { return getElement(this); }
3492
3541
  static get watchers() { return {
@@ -3534,7 +3583,7 @@ const MgInputTextarea = class {
3534
3583
  */
3535
3584
  this.handleFocus = () => {
3536
3585
  this.classCollection.add(this.classFocus);
3537
- this.classCollection = new Me(this.classCollection.classes);
3586
+ this.classCollection = new Oe(this.classCollection.classes);
3538
3587
  };
3539
3588
  /**
3540
3589
  * Handle blur event
@@ -3542,7 +3591,7 @@ const MgInputTextarea = class {
3542
3591
  this.handleBlur = () => {
3543
3592
  // Manage focus
3544
3593
  this.classCollection.delete(this.classFocus);
3545
- this.classCollection = new Me(this.classCollection.classes);
3594
+ this.classCollection = new Oe(this.classCollection.classes);
3546
3595
  // Display Error
3547
3596
  this.handlerInProgress = Handler.BLUR;
3548
3597
  this.displayError().finally(() => {
@@ -3605,7 +3654,7 @@ const MgInputTextarea = class {
3605
3654
  this.valid = undefined;
3606
3655
  this.invalid = undefined;
3607
3656
  this.resizable = 'none';
3608
- this.classCollection = new Me(['mg-c-input--textarea']);
3657
+ this.classCollection = new Oe(['mg-c-input--textarea']);
3609
3658
  this.errorMessage = undefined;
3610
3659
  }
3611
3660
  handleValue(newValue) {
@@ -3644,7 +3693,7 @@ const MgInputTextarea = class {
3644
3693
  this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);
3645
3694
  }
3646
3695
  validatePattern(newValue) {
3647
- if (newValue !== undefined && !(Be(this.pattern) && Be(this.patternErrorMessage))) {
3696
+ if (newValue !== undefined && !(Ne(this.pattern) && Ne(this.patternErrorMessage))) {
3648
3697
  throw new Error('<mg-input-textarea> props "pattern" and "patternErrorMessage" must be non-empty string and paired.');
3649
3698
  }
3650
3699
  }
@@ -3676,7 +3725,7 @@ const MgInputTextarea = class {
3676
3725
  if (typeof valid !== 'boolean') {
3677
3726
  throw new Error('<mg-input-textarea> method "setError()" param "valid" must be a boolean');
3678
3727
  }
3679
- else if (!Be(errorMessage)) {
3728
+ else if (!Ne(errorMessage)) {
3680
3729
  throw new Error('<mg-input-textarea> method "setError()" param "errorMessage" must be a string');
3681
3730
  }
3682
3731
  else {
@@ -3727,7 +3776,7 @@ const MgInputTextarea = class {
3727
3776
  * @returns HTML Element
3728
3777
  */
3729
3778
  render() {
3730
- return (h("mg-input", { key: '4196a4eb5187ed2e644c23cf40ff24d6015d0f36', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [this.characterLeftId], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonlyValue: this.value, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("div", { key: '2e5a57ef5a936618685d65251d9445a5e25f8149', class: "mg-c-input__with-character-left" }, h("textarea", { key: 'a7deac1e7a713db46e285e73785eed01f2961639', class: {
3779
+ return (h("mg-input", { key: 'c4386e9b6efe517276d3cd55d213819ff90d7e20', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [this.characterLeftId], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonlyValue: this.value, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("div", { key: '2d30db0ea21becffcdce57e46734e76877dc4858', class: "mg-c-input__with-character-left" }, h("textarea", { key: 'bc95d0db89014cafbb4e45893974e1ad09a41bf9', class: {
3731
3780
  'mg-c-input__box': true,
3732
3781
  'mg-c-input__box--width': true,
3733
3782
  'mg-c-input__box--resizable': this.resizable === 'both',
@@ -3736,7 +3785,7 @@ const MgInputTextarea = class {
3736
3785
  }, value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, rows: this.rows, maxlength: this.maxlength, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: (el) => {
3737
3786
  if (el !== null)
3738
3787
  this.input = el;
3739
- } }), this.displayCharacterLeft && this.maxlength > 0 && (h("mg-character-left", { identifier: this.characterLeftId, characters: this.value, maxlength: this.maxlength })))));
3788
+ } }), this.displayCharacterLeft && this.maxlength > 0 && (h("mg-character-left", { key: '522f8440ff28f9767c7273f56936cc994dfa17da', identifier: this.characterLeftId, characters: this.value, maxlength: this.maxlength })))));
3740
3789
  }
3741
3790
  get element() { return getElement(this); }
3742
3791
  static get watchers() { return {
@@ -3765,7 +3814,7 @@ const MgInputTitle = class {
3765
3814
  this.tagName = 'label';
3766
3815
  }
3767
3816
  validateIdentifier(newValue) {
3768
- if (!Be(newValue)) {
3817
+ if (!Ne(newValue)) {
3769
3818
  throw new Error('<mg-input-title> prop "identifier" is required.');
3770
3819
  }
3771
3820
  }
@@ -3789,7 +3838,7 @@ const MgInputTitle = class {
3789
3838
  render() {
3790
3839
  const TagName = this.readonly ? 'span' : this.tagName;
3791
3840
  // \u00A0 represent a &nbsp;
3792
- return (h(TagName, { key: '2dda0af49de9de4324834cb429ad1798f1ff6f97', class: "mg-c-input-title", htmlFor: !this.isLegend && this.identifier, id: this.isLegend ? `${this.identifier}-title` : undefined }, h("slot", { key: '2a6ebb613b43b7baddc0f2499d10f0d0e7b42ab3' }), this.required && !this.readonly && (h("span", { class: "mg-c-input-title__required" }, "\u00A0", h("span", { class: "mg-u-is-asterisk" }, "*")))));
3841
+ return (h(TagName, { key: '217fcd80f25886c71c9ec8da6673e3ba5dbb78f7', class: "mg-c-input-title", htmlFor: !this.isLegend && this.identifier, id: this.isLegend ? `${this.identifier}-title` : undefined }, h("slot", { key: '0efdaadd578a4a557e96f76ebfe1182af2ffdfac' }), this.required && !this.readonly && (h("span", { key: 'ebb62ba6769b0e6c8807d67aa0d4bcb80db76ac7', class: "mg-c-input-title__required" }, "\u00A0", h("span", { key: '9945e1bff4ec58e1c705a25cef538b2dab806fab', class: "mg-u-is-asterisk" }, "*")))));
3793
3842
  }
3794
3843
  static get watchers() { return {
3795
3844
  "identifier": ["validateIdentifier"],
@@ -3879,7 +3928,7 @@ const MgInputToggle = class {
3879
3928
  this.tooltip = undefined;
3880
3929
  this.tooltipPosition = 'input';
3881
3930
  this.helpText = undefined;
3882
- this.classCollection = new Me(['mg-c-input--toggle']);
3931
+ this.classCollection = new Oe(['mg-c-input--toggle']);
3883
3932
  this.options = undefined;
3884
3933
  this.errorMessage = undefined;
3885
3934
  this.valid = undefined;
@@ -3896,7 +3945,7 @@ const MgInputToggle = class {
3896
3945
  throw new Error('<mg-input-toggle> prop "items" require 2 items.');
3897
3946
  }
3898
3947
  // String array
3899
- else if (Oe(newValue)) {
3948
+ else if (Fe(newValue)) {
3900
3949
  this.options = newValue.map(item => ({ title: item, value: item }));
3901
3950
  }
3902
3951
  // Object array
@@ -3952,7 +4001,7 @@ const MgInputToggle = class {
3952
4001
  if (typeof valid !== 'boolean') {
3953
4002
  throw new Error('<mg-input-toggle> method "setError()" param "valid" must be a boolean');
3954
4003
  }
3955
- else if (!Be(errorMessage)) {
4004
+ else if (!Ne(errorMessage)) {
3956
4005
  throw new Error('<mg-input-toggle> method "setError()" param "errorMessage" must be a string');
3957
4006
  }
3958
4007
  else {
@@ -4008,7 +4057,7 @@ const MgInputToggle = class {
4008
4057
  */
4009
4058
  render() {
4010
4059
  var _a;
4011
- return (h("mg-input", { key: 'cbc77969b10f865f6933812e40612b845b02eeda', label: this.label, helpText: this.helpText, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: undefined, readonlyValue: (_a = this.getCheckedItem(this.checked)) === null || _a === void 0 ? void 0 : _a.title, tooltip: !this.readonly && this.tooltip, tooltipPosition: this.tooltipPosition, errorMessage: this.errorMessage }, h("button", { key: '2ece5d5af0ed99fa2acada3c3ea413b78d417bc1', type: "button", role: "switch", "aria-checked": this.checked.toString(), "aria-readonly": this.disabled || this.readonly, id: this.identifier, class: "mg-c-input__button-toggle", disabled: this.disabled || this.readonly, onClick: this.toggleChecked }, h("span", { key: '0c96299db7e9eb0e6ef110c09f83c070696a5908', "aria-hidden": "true", class: "mg-c-input__toggle-item-container" }, h("slot", { key: 'ceb7d2bfbec1492e993131bf3f276210a3321a8b', name: "item-1" })), h("span", { key: '8060ab06e8055ad3cab05b6e964c734e69d6e2c2', "aria-hidden": "true", class: "mg-c-input__toggle-item-container" }, h("slot", { key: 'bc5aed352763ec5e12e650f5a3a9991de01003e1', name: "item-2" })))));
4060
+ return (h("mg-input", { key: '8d4b88c7a14660ee3cfc69c3fce7f35f41b8a199', label: this.label, helpText: this.helpText, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: undefined, readonlyValue: (_a = this.getCheckedItem(this.checked)) === null || _a === void 0 ? void 0 : _a.title, tooltip: !this.readonly && this.tooltip, tooltipPosition: this.tooltipPosition, errorMessage: this.errorMessage }, h("button", { key: '9af8b4159d4159894b9c37867cd5581296c48295', type: "button", role: "switch", "aria-checked": this.checked.toString(), "aria-readonly": this.disabled || this.readonly, id: this.identifier, class: "mg-c-input__button-toggle", disabled: this.disabled || this.readonly, onClick: this.toggleChecked }, h("span", { key: '7b11e8151dc231718c81c73f7d99980eec4bb1ed', "aria-hidden": "true", class: "mg-c-input__toggle-item-container" }, h("slot", { key: '7efaeced52095c79b2d61f9b3628ec2f605d747b', name: "item-1" })), h("span", { key: 'd2e3775fbae5c6c679125ac99c56dfde431ecdc2', "aria-hidden": "true", class: "mg-c-input__toggle-item-container" }, h("slot", { key: 'edbb817680e42f7012f5b8d69e1c47626d97a161', name: "item-2" })))));
4012
4061
  }
4013
4062
  get element() { return getElement(this); }
4014
4063
  static get watchers() { return {
@@ -4023,6 +4072,274 @@ const MgInputToggle = class {
4023
4072
  };
4024
4073
  MgInputToggle.style = MgInputToggleStyle0;
4025
4074
 
4075
+ /**
4076
+ * MgItemMore type guard
4077
+ * @param element - element to control type
4078
+ * @returns truthy if element is mg-item-more
4079
+ */
4080
+ const isMgItemMore = (element) => element.nodeName === 'MG-ITEM-MORE';
4081
+ var OverflowBehaviorElements;
4082
+ (function (OverflowBehaviorElements) {
4083
+ OverflowBehaviorElements["BASE_INDEX"] = "data-overflow-base-index";
4084
+ OverflowBehaviorElements["PROXY_INDEX"] = "data-overflow-proxy-index";
4085
+ })(OverflowBehaviorElements || (OverflowBehaviorElements = {}));
4086
+ class OverflowBehavior {
4087
+ constructor(element, render) {
4088
+ this.element = element;
4089
+ this.render = render;
4090
+ /**********
4091
+ * Public *
4092
+ **********/
4093
+ /**
4094
+ * Disconnect ResizeObserver
4095
+ */
4096
+ this.disconnect = () => {
4097
+ this._resizeObserver.disconnect();
4098
+ };
4099
+ /************
4100
+ * Internal *
4101
+ ************/
4102
+ /**
4103
+ * run overflow behavior
4104
+ * @param width - width of the container. Optional.
4105
+ */
4106
+ this.run = (width) => {
4107
+ if (this._moreElement === undefined) {
4108
+ // set moreElement
4109
+ this._moreElement = this.render();
4110
+ // set children
4111
+ this._baseChildren = this.getInteractiveItems(this.element);
4112
+ if (isMgItemMore(this._moreElement)) {
4113
+ this._proxyChildren = this.getInteractiveItems(this._moreElement.shadowRoot.querySelector('mg-menu'));
4114
+ }
4115
+ // update children
4116
+ this._baseChildren.forEach((child, index) => {
4117
+ child.setAttribute(OverflowBehaviorElements.BASE_INDEX, `${index}`);
4118
+ // set moreElement children
4119
+ this._proxyChildren[index].setAttribute(OverflowBehaviorElements.PROXY_INDEX, `${index}`);
4120
+ });
4121
+ }
4122
+ if (width !== undefined)
4123
+ this.updateDisplayedItems(width);
4124
+ };
4125
+ /**
4126
+ * Get interactive children filtred by authorized nodeName ['MG-MENU-ITEM', 'MG-BUTTON']
4127
+ * @param element - element to parse
4128
+ * @returns children
4129
+ */
4130
+ this.getInteractiveItems = (element) => { var _a; return (((_a = element.children) === null || _a === void 0 ? void 0 : _a.length) > 0 ? Array.from(element.children) : []).filter(element => ['MG-MENU-ITEM', 'MG-BUTTON'].includes(element.nodeName)); };
4131
+ /**
4132
+ * Update displayed items in container from a given available space
4133
+ * @param availableWidth - available width in container to display child items
4134
+ */
4135
+ this.updateDisplayedItems = (availableWidth) => {
4136
+ this.restoreItems();
4137
+ const acc = { accWidth: 0, previousItem: null };
4138
+ [...this._baseChildren, this._moreElement].forEach((child) => {
4139
+ acc.accWidth += child.offsetWidth;
4140
+ const hasPreviuosItem = acc.previousItem !== null;
4141
+ const isPreviousItemHidden = hasPreviuosItem && acc.previousItem.getAttribute('hidden') !== null;
4142
+ // if previous item is hidden AND is NOT more element we hidde current
4143
+ // OR if item has an overflow we hidde current
4144
+ // OR if current item is more element AND have NOT previous hidden items, current more element item is an hidden item
4145
+ // ELSE current is a display item
4146
+ this.toggleItem(child, (isPreviousItemHidden && !this.isMoreElement(child)) || this.isOverflowElement(acc.accWidth, child, availableWidth) || (this.isMoreElement(child) && !isPreviousItemHidden));
4147
+ // update previous item with current item
4148
+ acc.previousItem = child;
4149
+ });
4150
+ };
4151
+ /**
4152
+ * Utility method to know if item overflow partialy or totaly in the container
4153
+ * @param cumulateWidth - previous sibling elements cumulate width + item width
4154
+ * @param item - item HTML element
4155
+ * @param availableWidth - container available width
4156
+ * @returns truthy if element is overflow
4157
+ */
4158
+ this.isOverflowElement = (cumulateWidth, item, availableWidth) => {
4159
+ if (item.previousElementSibling === null || this.isMoreElement(item))
4160
+ return false;
4161
+ else if (!this.isMoreElement(item.nextElementSibling))
4162
+ return cumulateWidth + this._moreElement.offsetWidth > availableWidth;
4163
+ else
4164
+ return cumulateWidth > availableWidth;
4165
+ };
4166
+ /**
4167
+ * Utility method to know if a given element is the 'MORE' element
4168
+ * @param element - element to match with 'MORE' element
4169
+ * @returns truthy if element is the 'MORE' element
4170
+ */
4171
+ this.isMoreElement = (element) => element.nodeName === 'MG-ITEM-MORE';
4172
+ /**
4173
+ * Toggle display item element
4174
+ * @param item - item to control
4175
+ * @param isHidden - is item hidden
4176
+ */
4177
+ this.toggleItem = (item, isHidden) => {
4178
+ const mgActionMenuindex = Number(item.getAttribute(OverflowBehaviorElements.BASE_INDEX));
4179
+ if (this.isMoreElement(item))
4180
+ this.toggleElement(this._moreElement, isHidden);
4181
+ else if (mgActionMenuindex >= 0) {
4182
+ this.toggleElement(item, isHidden);
4183
+ this.toggleElement(this._proxyChildren[mgActionMenuindex], !isHidden);
4184
+ }
4185
+ };
4186
+ /**
4187
+ * Toggle element's hidde attribute
4188
+ * @param element - element to toggle
4189
+ * @param isHidden - element is hidden
4190
+ */
4191
+ this.toggleElement = (element, isHidden) => {
4192
+ if (isHidden)
4193
+ element.setAttribute('hidden', '');
4194
+ else
4195
+ element.removeAttribute('hidden');
4196
+ };
4197
+ /**
4198
+ * Remove hidden attributes on all items
4199
+ */
4200
+ this.restoreItems = () => {
4201
+ [...this._baseChildren, this._moreElement].forEach(item => item.removeAttribute('hidden'));
4202
+ };
4203
+ if (this._resizeObserver === undefined) {
4204
+ // add resize observer
4205
+ this._resizeObserver = new ResizeObserver(entries => {
4206
+ entries.forEach(entry => {
4207
+ this.run(entry.contentRect.width);
4208
+ });
4209
+ });
4210
+ this._resizeObserver.observe(this.element);
4211
+ }
4212
+ this.run();
4213
+ }
4214
+ }
4215
+
4216
+ const mgItemMoreCss = ".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}}:host:not([hidden]){display:flex}";
4217
+ const MgItemMoreStyle0 = mgItemMoreCss;
4218
+
4219
+ const MgItemMore = class {
4220
+ constructor(hostRef) {
4221
+ registerInstance(this, hostRef);
4222
+ /************
4223
+ * Internal *
4224
+ ************/
4225
+ this.name = 'mg-item-more';
4226
+ this.canRenderMgMenuItemOverflowElement = true;
4227
+ /***********
4228
+ * Methods *
4229
+ ***********/
4230
+ /**
4231
+ * render mg-item-more overflow element
4232
+ * @returns mg-item-more element
4233
+ */
4234
+ this.renderMgMenuItemOverflowElement = () => {
4235
+ // create menu items proxy element from item clones
4236
+ this.parentMenuItems.forEach((child) => {
4237
+ this.moreElementMenuItem.querySelector('mg-menu').appendChild(child.cloneNode(true));
4238
+ });
4239
+ const allMenuItem = Array.from(this.parentMenu.querySelectorAll('mg-menu-item:not([data-overflow-more])'));
4240
+ Array.from(this.moreElementMenuItem.querySelectorAll('mg-menu-item:not([data-overflow-more])')).forEach((proxy, index) => {
4241
+ const proxified = allMenuItem[index];
4242
+ // manage click on proxy to mirror it on initial element
4243
+ proxy.addEventListener('click', () => {
4244
+ // be carefull to use element.click() method instead of dispatchEvent to ensure bubbles outside shadowDom
4245
+ const navElement = allMenuItem[index].shadowRoot.querySelector('a, button');
4246
+ if (navElement instanceof HTMLButtonElement || navElement instanceof HTMLAnchorElement)
4247
+ navElement.click();
4248
+ });
4249
+ // add id suffix to prevent duplicate key. default html id is: '';
4250
+ if (Ne(proxy.id))
4251
+ proxy.id = `${proxy.id}-proxy`;
4252
+ // update properties and DOM when proxyfied item is updated
4253
+ proxified.addEventListener('item-updated', (event) => {
4254
+ Object.assign(proxy, event.target);
4255
+ proxy.innerHTML = event.target.innerHTML;
4256
+ });
4257
+ // manage status change miror in proxyfied element
4258
+ proxified.addEventListener('status-change', (event) => {
4259
+ proxy.setAttribute('status', event.detail);
4260
+ });
4261
+ });
4262
+ return this.element;
4263
+ };
4264
+ this.icon = { icon: 'ellipsis-vertical' };
4265
+ this.slotlabel = { display: false };
4266
+ this.size = undefined;
4267
+ this.parentMenu = undefined;
4268
+ }
4269
+ validateIcon(newValue) {
4270
+ if (typeof newValue !== 'object' || (typeof newValue === 'object' && typeof newValue.icon !== 'string'))
4271
+ throw new Error(`<${this.name}> prop "icon" must match MgItemMore['icon'] type.`);
4272
+ }
4273
+ validateSlotLabel(newValue) {
4274
+ if (typeof newValue !== 'object' || (typeof newValue === 'object' && typeof newValue.display !== 'boolean'))
4275
+ throw new Error(`<${this.name}> prop "slotlabel" must match MgItemMore['slotlabel'] type.`);
4276
+ else if (typeof newValue.label !== 'string')
4277
+ this.slotlabel.label = this.messages.menuLabel;
4278
+ }
4279
+ validateSize(newValue) {
4280
+ if (newValue && typeof newValue !== 'string')
4281
+ throw new Error(`<${this.name}> prop "size" must match MgItemMore['size'] type.`);
4282
+ }
4283
+ /*************
4284
+ * Lifecycle *
4285
+ *************/
4286
+ /**
4287
+ * Set variables and validate props
4288
+ */
4289
+ componentWillLoad() {
4290
+ // init variables
4291
+ this.messages = initLocales(this.element).messages.itemMore;
4292
+ // validate props
4293
+ this.validateIcon(this.icon);
4294
+ this.validateSlotLabel(this.slotlabel);
4295
+ this.validateSize(this.size);
4296
+ }
4297
+ /**
4298
+ * Ensure parent DOM is fully rendered with timeout method before parse elements
4299
+ * @returns timeout
4300
+ */
4301
+ componentDidLoad() {
4302
+ // ensure parent menu is fully rendered
4303
+ return setTimeout(() => {
4304
+ this.parentMenu = this.element.closest('mg-menu');
4305
+ });
4306
+ }
4307
+ /**
4308
+ * Set OverflowBehavior when parentMenu state is upate AND defined
4309
+ */
4310
+ componentDidUpdate() {
4311
+ if (this.parentMenu && this.canRenderMgMenuItemOverflowElement) {
4312
+ this.parentMenuItems = Array.from(this.parentMenu.children).filter(item => item.nodeName === 'MG-MENU-ITEM');
4313
+ this.overflowBehavior = new OverflowBehavior(this.parentMenu, this.renderMgMenuItemOverflowElement);
4314
+ this.canRenderMgMenuItemOverflowElement = false;
4315
+ }
4316
+ }
4317
+ /**
4318
+ * Disconnect overflow ResizeObserver
4319
+ */
4320
+ disconnectedCallback() {
4321
+ var _a;
4322
+ (_a = this.overflowBehavior) === null || _a === void 0 ? void 0 : _a.disconnect();
4323
+ }
4324
+ /**
4325
+ * Render
4326
+ * @returns HTML Element
4327
+ */
4328
+ render() {
4329
+ return (h(Host, { key: '18e3ecec55a7078662bdb04ba6325a4d44ff1c78', role: "listitem" }, this.parentMenu && (h("mg-menu-item", { key: 'e04f4b62b1ce70eeae25f959ef6aeca2e4a2690d', "data-overflow-more": true, "data-size": this.parentMenu.size, ref: el => {
4330
+ if (el)
4331
+ this.moreElementMenuItem = el;
4332
+ } }, h("mg-icon", { key: '8f20ef688479578ebee9eabb63644837e1d45113', icon: this.icon.icon, slot: "image" }), h("span", { key: '7a4f08410d1e85682a8c3e1935525c418a4141de', class: { 'mg-u-visually-hidden': !this.slotlabel.display }, slot: "label" }, this.slotlabel.label), h("mg-menu", { key: 'f67f53d289cf65883a3534f17fb2baaa91314a66', direction: Direction.VERTICAL, label: this.messages.menuLabel, size: this.size })))));
4333
+ }
4334
+ get element() { return getElement(this); }
4335
+ static get watchers() { return {
4336
+ "icon": ["validateIcon"],
4337
+ "slotlabel": ["validateSlotLabel"],
4338
+ "size": ["validateSize"]
4339
+ }; }
4340
+ };
4341
+ MgItemMore.style = MgItemMoreStyle0;
4342
+
4026
4343
  const mgMenuCss = ".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}}:host{display:flex;background-color:hsl(var(--mg-menu-background-color-hsl, var(--color-light)))}:host([direction=vertical]){height:100%;flex-direction:column;overflow-y:auto}";
4027
4344
  const MgMenuStyle0 = mgMenuCss;
4028
4345
 
@@ -4065,7 +4382,7 @@ const MgMenu = class {
4065
4382
  */
4066
4383
  this.setItemListener = (item, index) => {
4067
4384
  ['click', 'focus'].forEach(trigger => {
4068
- (item.shadowRoot.querySelector('button') || item.shadowRoot.querySelector('a')).addEventListener(trigger, () => {
4385
+ item.shadowRoot.querySelector('button,a').addEventListener(trigger, () => {
4069
4386
  this.focusedMenuItem = index;
4070
4387
  // reset expanded on previous active menu item
4071
4388
  (this.getItemMoreMenuItem() ? [...this.menuItems, this.getItemMoreMenuItem()] : this.menuItems).forEach((item, index) => {
@@ -4093,13 +4410,21 @@ const MgMenu = class {
4093
4410
  * render mg-item-more
4094
4411
  */
4095
4412
  this.renderMgItemMore = () => {
4413
+ if (this.direction !== Direction.HORIZONTAL || this.isChildMenu) {
4414
+ return;
4415
+ }
4096
4416
  // /!\ externalise item tag name to get a string type and bypass type checking when value is used in next createElement
4097
4417
  // by doing this we prevent stencil to generate a circular dependencies graph at build time with mg-item-more component.
4098
- const item = 'mg-item-more';
4099
- const mgItemMore = document.createElement(item);
4100
- Object.assign(mgItemMore, this.itemmore);
4101
- mgItemMore.addEventListener('item-loaded', this.handleItemLoaded);
4102
- this.element.appendChild(mgItemMore);
4418
+ let mgItemMore = this.getItemMore();
4419
+ if (!mgItemMore) {
4420
+ mgItemMore = document.createElement('mg-item-more');
4421
+ mgItemMore.addEventListener('item-loaded', this.handleItemLoaded);
4422
+ Object.assign(mgItemMore, this.itemmore || {});
4423
+ this.element.appendChild(mgItemMore);
4424
+ }
4425
+ else {
4426
+ Object.defineProperties(mgItemMore, this.itemmore || {});
4427
+ }
4103
4428
  };
4104
4429
  this.label = undefined;
4105
4430
  this.direction = Direction.HORIZONTAL;
@@ -4152,22 +4477,13 @@ const MgMenu = class {
4152
4477
  this.menuItems = Array.from(this.element.children).filter(child => child.nodeName === 'MG-MENU-ITEM');
4153
4478
  this.isChildMenu = this.element.closest('mg-menu-item') !== null;
4154
4479
  // add mg-item-more to manage OverflowBehavior
4155
- if (this.direction === Direction.HORIZONTAL && !this.isChildMenu)
4480
+ // when all props, states and DOM are already rendered we can render the mg-item-more
4481
+ this.renderMgItemMore();
4482
+ // then use mutation observer on children to improve reactivity
4483
+ new MutationObserver(() => {
4156
4484
  this.renderMgItemMore();
4157
- // use mutation observer to improve reactivity
4158
- new MutationObserver(entries => {
4159
- const mgItemMore = this.getItemMore();
4160
- // prevent infinit loop by exclude mg-item-more deletion entry
4161
- if (entries.some(entry => entry.type === 'childList' && Array.from(entry.removedNodes).some(node => node.nodeName === 'MG-ITEM-MORE')))
4162
- return;
4163
- else if (mgItemMore !== null) {
4164
- // render a new mg-item-more
4165
- mgItemMore.remove();
4166
- mgItemMore.removeEventListener('item-loaded', this.handleItemLoaded);
4167
- this.renderMgItemMore();
4168
- }
4169
- }).observe(this.element, { childList: true, characterData: true, subtree: true });
4170
- }, 0);
4485
+ }).observe(this.element, { childList: true });
4486
+ });
4171
4487
  }
4172
4488
  /**
4173
4489
  * Add listeners to items
@@ -4180,7 +4496,7 @@ const MgMenu = class {
4180
4496
  * @returns HTML Element
4181
4497
  */
4182
4498
  render() {
4183
- return (h(Host, { key: '086439eeee2cbd3ee887bf047f04271de3e909b1', role: "list", "aria-label": this.label }, h("slot", { key: '332f520ff53aa203bfa299afce5251aa108e7e55' })));
4499
+ return (h(Host, { key: 'a5fe4a1a61b4255cc9a06217f30ef2f154fd797d', role: "list", "aria-label": this.label }, h("slot", { key: '37de5388d1cca3fa46dfbb73ab26ba6e299940b5' })));
4184
4500
  }
4185
4501
  get element() { return getElement(this); }
4186
4502
  static get watchers() { return {
@@ -4200,6 +4516,7 @@ const MgMenuItem = class {
4200
4516
  registerInstance(this, hostRef);
4201
4517
  this.statusChange = createEvent(this, "status-change", 7);
4202
4518
  this.itemLoaded = createEvent(this, "item-loaded", 7);
4519
+ this.itemUpdated = createEvent(this, "item-updated", 7);
4203
4520
  /************
4204
4521
  * Internal *
4205
4522
  ************/
@@ -4257,7 +4574,7 @@ const MgMenuItem = class {
4257
4574
  throw new Error(`<${this.name}> slot "label" is required.`);
4258
4575
  ['label', 'metadata'].forEach(slot => {
4259
4576
  Array.from(this.element.querySelectorAll(`[slot="${slot}"]`)).forEach(element => {
4260
- if (!Be(element.textContent))
4577
+ if (!Ne(element.textContent))
4261
4578
  throw new Error(`<${this.name}> slot "${slot}" must have text content.`);
4262
4579
  if ((guard && element.getAttribute('title') === null) || !guard)
4263
4580
  element.setAttribute('title', element.textContent);
@@ -4326,13 +4643,13 @@ const MgMenuItem = class {
4326
4643
  * @returns HTML Element
4327
4644
  */
4328
4645
  this.renderSlot = () => h("slot", null);
4329
- this.identifier = Re('mg-menu-item');
4646
+ this.identifier = Me('mg-menu-item');
4330
4647
  this.href = undefined;
4331
4648
  this.target = undefined;
4332
4649
  this.status = Status$1.VISIBLE;
4333
4650
  this.expanded = false;
4334
4651
  this.size = 'regular';
4335
- this.navigationButtonClassList = new Me([this.navigationButton]);
4652
+ this.navigationButtonClassList = new Oe([this.navigationButton]);
4336
4653
  this.direction = undefined;
4337
4654
  this.isInMainMenu = undefined;
4338
4655
  this.isItemMore = undefined;
@@ -4453,10 +4770,11 @@ const MgMenuItem = class {
4453
4770
  this.itemLoaded.emit();
4454
4771
  new MutationObserver(mutationsList => {
4455
4772
  if (mutationsList.some(mutation => mutation.attributeName === 'hidden'))
4456
- this.updateStatus();
4773
+ this.updateStatus([Status$1.ACTIVE]);
4457
4774
  if (mutationsList.some(mutation => mutation.type === 'characterData'))
4458
4775
  this.validateSlot();
4459
4776
  this.updateDisplayNotificationBadge();
4777
+ this.itemUpdated.emit();
4460
4778
  }).observe(this.element, { attributes: true, childList: true, characterData: true, subtree: true });
4461
4779
  }, 0);
4462
4780
  }
@@ -4474,6 +4792,14 @@ const MgMenuItem = class {
4474
4792
  [`${this.navigationButton}-chevron--rotate`]: this.expanded === true,
4475
4793
  } }, h("mg-icon", { icon: "chevron-down", size: "small" })))));
4476
4794
  }
4795
+ /**
4796
+ * Emit event when component is updated
4797
+ */
4798
+ componentShouldUpdate() {
4799
+ return Ce(() => {
4800
+ this.itemUpdated.emit();
4801
+ });
4802
+ }
4477
4803
  /**
4478
4804
  * Render
4479
4805
  * @returns HTML Element
@@ -4483,7 +4809,7 @@ const MgMenuItem = class {
4483
4809
  ['mg-c-menu-item__collapse-container']: true,
4484
4810
  ['mg-c-menu-item__collapse-container--first-level']: (this.isInMainMenu || this.isItemMore) && this.isDirection(Direction.HORIZONTAL),
4485
4811
  });
4486
- return (h(Host, { key: '8d1b7b3019b4d5c75d30489754ccb0a85244976d', role: this.isItemMore ? 'presentation' : 'listitem' }, this.displayPopover() ? (h("mg-popover", { display: this.expanded, placement: "bottom-start", arrowHide: true, "onDisplay-change": this.handlePopoverDisplay, identifier: this.getPopoverIdentifier() }, this.renderInteractiveElement(), h("div", { class: getContainerClasses(), slot: "content" }, this.renderSlot()))) : ([
4812
+ return (h(Host, { key: '10b41e1b90d01a0f0df082cd9fc50884e87c2e59', role: this.isItemMore ? 'presentation' : 'listitem' }, this.displayPopover() ? (h("mg-popover", { display: this.expanded, placement: "bottom-start", arrowHide: true, "onDisplay-change": this.handlePopoverDisplay, identifier: this.getPopoverIdentifier() }, this.renderInteractiveElement(), h("div", { class: getContainerClasses(), slot: "content" }, this.renderSlot()))) : ([
4487
4813
  this.renderInteractiveElement(),
4488
4814
  h("div", { key: "vertical-container", class: getContainerClasses(), hidden: !this.expanded }, this.renderSlot()),
4489
4815
  ])));
@@ -4576,13 +4902,13 @@ const MgMessage = class {
4576
4902
  return 'exclamation-circle';
4577
4903
  }
4578
4904
  };
4579
- this.identifier = Re('mg-message');
4905
+ this.identifier = Me('mg-message');
4580
4906
  this.delay = undefined;
4581
4907
  this.variant = variants$1[0];
4582
4908
  this.closeButton = false;
4583
4909
  this.hide = false;
4584
4910
  this.noAriaRole = undefined;
4585
- this.classCollection = new Me(['mg-c-message']);
4911
+ this.classCollection = new Oe(['mg-c-message']);
4586
4912
  this.hasActions = false;
4587
4913
  }
4588
4914
  validateDelay(newValue) {
@@ -4661,7 +4987,7 @@ const MgMessage = class {
4661
4987
  let role;
4662
4988
  if (!this.noAriaRole)
4663
4989
  role = this.variant === 'info' ? 'status' : 'alert';
4664
- return (h("div", { key: '426c30a149e1d0aef99c9b34ef8b09384b876e7f', id: this.identifier, class: this.classCollection.join(), role: role }, h("mg-card", { key: 'f8e00eaf99b8fcc828bbade2745293931da76619', variant: this.variant, "variant-style": "bar-left" }, h("span", { key: '94f7c67946985fafacfba078237926823315362f', class: "mg-c-message__icon" }, h("mg-icon", { key: '8e9b5c24bcb20ade8bb2a160a886973b9e9575fe', icon: this.getIcon() })), h("div", { key: '2104ace2484f87109c5dfa76cd3423216412fe28', class: "mg-c-message__content" }, h("span", { key: 'e1af1bc257beb682e9ad44627b4208e1ce52b28c', class: "mg-c-message__content-slot" }, h("slot", { key: '7688aed5413d37855f7704c625f4669400bdaaff' })), this.hasActions && h("span", { class: "mg-c-message__content-separator" }), this.hasActions && (h("span", { class: "mg-c-message__content-actions-slot" }, h("slot", { name: "actions" })))), this.closeButton && (h("span", { class: "mg-c-message__close-button" }, h("mg-button", { identifier: this.closeButtonId, "is-icon": true, variant: "flat", label: this.messages.message.closeButton, onClick: this.handleClose }, h("mg-icon", { icon: "cross" })))))));
4990
+ return (h("div", { key: 'a30da97a75717852677dc66ba0e9bc0a000c8c35', id: this.identifier, class: this.classCollection.join(), role: role }, h("mg-card", { key: '9cea0e509146e245a91290e76bc3908fcf3e3806', variant: this.variant, "variant-style": "bar-left" }, h("span", { key: '0beb527b84230d6cafed7ac1d2c9caa59ad1f80f', class: "mg-c-message__icon" }, h("mg-icon", { key: 'e0346db73f7c2c4595bb09e1be93039763106a5d', icon: this.getIcon() })), h("div", { key: '128567f70f2d664688cf012ab995a57eea2bca17', class: "mg-c-message__content" }, h("span", { key: '2b1cc03309002908b6c54b95c6ad58bdc966e787', class: "mg-c-message__content-slot" }, h("slot", { key: 'fd7b3e74c3bd2a70d2cbbef0a9519cdee38da5ce' })), this.hasActions && h("span", { key: 'adb6d3b819226a5e6173f077650be05c64e69f13', class: "mg-c-message__content-separator" }), this.hasActions && (h("span", { key: '136b8a00d7b0dbb14750d7637bce7d83d8cfd112', class: "mg-c-message__content-actions-slot" }, h("slot", { key: '926939a26ee3fa4e3b4625cdc4003dccc9d2e2e3', name: "actions" })))), this.closeButton && (h("span", { key: '770a2313622d50f5dc027d65b878e2955a134ca3', class: "mg-c-message__close-button" }, h("mg-button", { key: '094652edc8aa518cb3c0322025b5bf5c66b3fa33', identifier: this.closeButtonId, "is-icon": true, variant: "flat", label: this.messages.message.closeButton, onClick: this.handleClose }, h("mg-icon", { key: '2b0ee538aec157e9507bf3c14026e71c422fc365', icon: "cross" })))))));
4665
4991
  }
4666
4992
  get element() { return getElement(this); }
4667
4993
  static get watchers() { return {
@@ -4725,12 +5051,12 @@ const MgModal = class {
4725
5051
  */
4726
5052
  this.setFocus = () => {
4727
5053
  // Get all focusable elements
4728
- const slottedFocusableElements = Array.from(this.element.querySelectorAll(De));
5054
+ const slottedFocusableElements = Array.from(this.element.querySelectorAll(_e));
4729
5055
  // If close button is enabled or at least one of the slotted element is focusable
4730
5056
  if (this.closeButton || slottedFocusableElements.length > 0) {
4731
5057
  // Check if slotted focusable elements have shadowDom with focusable elements
4732
5058
  this.modalFocusableElements = slottedFocusableElements.reduce((acc, focusableElement) => {
4733
- acc.push(focusableElement.shadowRoot !== null ? focusableElement.shadowRoot.querySelector(De) || focusableElement : focusableElement);
5059
+ acc.push(focusableElement.shadowRoot !== null ? focusableElement.shadowRoot.querySelector(_e) || focusableElement : focusableElement);
4734
5060
  return acc;
4735
5061
  }, []);
4736
5062
  // When close button is enabled it's the first focusable element.
@@ -4752,21 +5078,21 @@ const MgModal = class {
4752
5078
  this.handleClose = () => {
4753
5079
  this.hide = true;
4754
5080
  };
4755
- this.identifier = Re('mg-modal');
5081
+ this.identifier = Me('mg-modal');
4756
5082
  this.dialogRole = dialogRoles[0];
4757
5083
  this.modalTitle = undefined;
4758
5084
  this.closeButton = false;
4759
5085
  this.hide = undefined;
4760
5086
  this.hasActions = false;
4761
5087
  this.hasContent = false;
4762
- this.classCollection = new Me(['mg-c-modal']);
5088
+ this.classCollection = new Oe(['mg-c-modal']);
4763
5089
  }
4764
5090
  validateDialogRole(newValue) {
4765
5091
  if (!dialogRoles.includes(newValue))
4766
5092
  throw new Error(`<mg-modal> prop "dialogRole" must be one of: ${dialogRoles.join(', ')}.`);
4767
5093
  }
4768
5094
  validateModalTitle(newValue) {
4769
- if (!Be(newValue)) {
5095
+ if (!Ne(newValue)) {
4770
5096
  throw new Error('<mg-modal> prop "modalTitle" is required.');
4771
5097
  }
4772
5098
  }
@@ -4834,14 +5160,14 @@ const MgModal = class {
4834
5160
  * @returns HTML Element
4835
5161
  */
4836
5162
  render() {
4837
- return (h("div", { key: 'cc3a33438dcf5ec90831f5bb39ddb0de558063ab', role: this.dialogRole, id: this.identifier, class: this.classCollection.join(), tabindex: "-1", "aria-labelledby": this.titleId, "aria-modal": "true", "aria-hidden": this.hide }, h("mg-card", { key: '18a6cf3cd69c667573489b051de9f15aa853784d' }, h("div", { key: '5e856e4a0ed625ffa1879d35efa27b5292ea3f11', class: "mg-c-modal__dialog" }, h("header", { key: 'fb701088cdd08194f68cf22920cd1d30ef24db0b', class: "mg-c-modal__header" }, this.closeButton && (h("span", { class: "mg-c-modal__close-button" }, h("mg-button", { identifier: `${this.identifier}-close-button`, "is-icon": true, variant: "flat", label: this.messages.modal.closeButton, onClick: this.handleClose, ref: (el) => {
5163
+ return (h("div", { key: '472cae1bd3a5291e14265d00ee594c726f179a1f', role: this.dialogRole, id: this.identifier, class: this.classCollection.join(), tabindex: "-1", "aria-labelledby": this.titleId, "aria-modal": "true", "aria-hidden": this.hide }, h("mg-card", { key: '870e59e1126988fefe5c04380b5bbd593e8629af' }, h("div", { key: '9d49127cf8bf68b55549f379b760c6597b1a2d6c', class: "mg-c-modal__dialog" }, h("header", { key: 'b8629ece3524f5dd64b248080fa06f21980ddf7b', class: "mg-c-modal__header" }, this.closeButton && (h("span", { key: 'f38d648290d1db901fb2cc09ae8b8ed13bf7e0b6', class: "mg-c-modal__close-button" }, h("mg-button", { key: 'b12aecfd77b5fb7588c3b2f6487c10c2cba9f097', identifier: `${this.identifier}-close-button`, "is-icon": true, variant: "flat", label: this.messages.modal.closeButton, onClick: this.handleClose, ref: (el) => {
4838
5164
  if (el !== null) {
4839
5165
  // store closeButton Element
4840
5166
  this.closeButtonElement = el;
4841
5167
  // add close button element to modalFocusableElements when it is render
4842
5168
  this.modalFocusableElements.unshift(this.closeButtonElement);
4843
5169
  }
4844
- } }, h("mg-icon", { icon: "cross" })))), h("h1", { key: '2b99fc7fc7440a3c9899a88f1bd138a36500df94', class: "mg-c-modal__title", id: this.titleId }, this.modalTitle)), this.hasContent && (h("article", { class: "mg-c-modal__content" }, h("slot", { name: "content" }))), this.hasActions && (h("footer", { class: "mg-c-modal__footer" }, h("slot", { name: "actions" })))))));
5170
+ } }, h("mg-icon", { key: '2e5590b14d6b4da659f4f6d8630606a9bafdb9c6', icon: "cross" })))), h("h1", { key: '6ca12328af9955d0716c330c32004c68cca11b4c', class: "mg-c-modal__title", id: this.titleId }, this.modalTitle)), this.hasContent && (h("article", { key: '0873f01de1bfe75c2e91ea89b762d433006e7878', class: "mg-c-modal__content" }, h("slot", { key: 'dd8fd2e6527d640c40261dcbae76846d107337dc', name: "content" }))), this.hasActions && (h("footer", { key: 'e97c6d3ad9bbca892afcabeb5b15e63425d05070', class: "mg-c-modal__footer" }, h("slot", { key: 'c865f0b4244f5ea4ed5e7733813a8b10bc985504', name: "actions" })))))));
4845
5171
  }
4846
5172
  get element() { return getElement(this); }
4847
5173
  static get watchers() { return {
@@ -4913,7 +5239,7 @@ const MgPagination = class {
4913
5239
  this.handleGoToPage = (action, disabled) => {
4914
5240
  !disabled && this.goToPage(action === NavigationAction.NEXT ? this.currentPage + 1 : this.currentPage - 1);
4915
5241
  };
4916
- this.identifier = Re('mg-pagination');
5242
+ this.identifier = Me('mg-pagination');
4917
5243
  this.label = undefined;
4918
5244
  this.hideNavigationLabels = undefined;
4919
5245
  this.hidePageCount = undefined;
@@ -4956,10 +5282,10 @@ const MgPagination = class {
4956
5282
  * @returns HTML Element
4957
5283
  */
4958
5284
  render() {
4959
- const navigationActionButton = (disabled, action) => (h("mg-button", { key: '762b566216021bdfdcbfea249c7a1dbfa409c831', identifier: `${this.identifier}-button-${action}`, label: this.messages.pagination[`${action}Page`],
5285
+ const navigationActionButton = (disabled, action) => (h("mg-button", { key: 'b708c70615e0fb49d1628dc6cf83e54ea5ab0a61', identifier: `${this.identifier}-button-${action}`, label: this.messages.pagination[`${action}Page`],
4960
5286
  // eslint-disable-next-line react/jsx-no-bind
4961
- onClick: () => this.handleGoToPage(action, disabled), disabled: disabled, variant: "flat", isIcon: this.hideNavigationLabels }, action === NavigationAction.PREVIOUS && h("mg-icon", { icon: "chevron-left" }), !this.hideNavigationLabels && this.messages.general[action], action === NavigationAction.NEXT && h("mg-icon", { icon: "chevron-right" })));
4962
- return (h(Host, { key: '9bfc7cd582798b28f847f1be74bc966a10afaf01', hidden: this.totalPages < 2 }, h("nav", { key: 'e79017c814781d4452868bb2f50a71682c4da1f1', role: "navigation", "aria-label": this.label, id: this.identifier, class: { 'mg-c-pagination': true, 'mg-c-pagination--hide-page-count': this.hidePageCount } }, navigationActionButton(this.currentPage <= 1, NavigationAction.PREVIOUS), !this.hidePageCount && (h("mg-input-select", { identifier: `${this.identifier}-select`, items: range(1, this.totalPages).map(page => page.toString()), label: this.messages.pagination.selectPage, "label-hide": true, "on-value-change": this.handleSelect, value: this.currentPage.toString(), "placeholder-hide": true })), h("span", { key: '5e9cdd8126ee7d00db9199d5b738d76f651c8585', class: "mg-u-visually-hidden" }, this.messages.pagination.page, " ", this.currentPage), h("span", { key: '55d248aabdc782a0e3a06b28fd2df36aca4733b0', class: { 'mg-u-visually-hidden': this.hidePageCount } }, "/ ", this.totalPages, " ", this.totalPages > 1 ? this.messages.pagination.pages : this.messages.pagination.page), navigationActionButton(this.currentPage >= this.totalPages, NavigationAction.NEXT))));
5287
+ onClick: () => this.handleGoToPage(action, disabled), disabled: disabled, variant: "flat", isIcon: this.hideNavigationLabels }, action === NavigationAction.PREVIOUS && h("mg-icon", { key: '1c8375c68fd7729fb7ea91220ffb4f7267ac3a47', icon: "chevron-left" }), !this.hideNavigationLabels && this.messages.general[action], action === NavigationAction.NEXT && h("mg-icon", { key: '1af0c20c2d5ce86e593b2eca82dee410a782c193', icon: "chevron-right" })));
5288
+ return (h(Host, { key: '4490a0b9d3c0ac55519d052b4d76ab8f682f0f3a', hidden: this.totalPages < 2 }, h("nav", { key: 'eaf362cd327e88290f3af5dcfd1d46fff6178ff9', role: "navigation", "aria-label": this.label, id: this.identifier, class: { 'mg-c-pagination': true, 'mg-c-pagination--hide-page-count': this.hidePageCount } }, navigationActionButton(this.currentPage <= 1, NavigationAction.PREVIOUS), !this.hidePageCount && (h("mg-input-select", { key: '06c9786c833302a4ee88ed7f2217875112ee7a20', identifier: `${this.identifier}-select`, items: range(1, this.totalPages).map(page => page.toString()), label: this.messages.pagination.selectPage, "label-hide": true, "on-value-change": this.handleSelect, value: this.currentPage.toString(), "placeholder-hide": true })), h("span", { key: '7877dbee55a509b13c8cf881154d96bbe1c5cee7', class: "mg-u-visually-hidden" }, this.messages.pagination.page, " ", this.currentPage), h("span", { key: 'd4615625b40108526f7aaa8f8a8505b2a61e43e9', class: { 'mg-u-visually-hidden': this.hidePageCount } }, "/ ", this.totalPages, " ", this.totalPages > 1 ? this.messages.pagination.pages : this.messages.pagination.page), navigationActionButton(this.currentPage >= this.totalPages, NavigationAction.NEXT))));
4963
5289
  }
4964
5290
  get element() { return getElement(this); }
4965
5291
  static get watchers() { return {
@@ -5078,7 +5404,7 @@ const MgPanel = class {
5078
5404
  ];
5079
5405
  return this.titlePosition === 'right' ? children.reverse() : children;
5080
5406
  };
5081
- this.identifier = Re('mg-panel');
5407
+ this.identifier = Me('mg-panel');
5082
5408
  this.panelTitle = undefined;
5083
5409
  this.titlePattern = undefined;
5084
5410
  this.titlePatternErrorMessage = undefined;
@@ -5087,12 +5413,12 @@ const MgPanel = class {
5087
5413
  this.expanded = false;
5088
5414
  this.expandToggleDisplay = expandToggleDisplays[0];
5089
5415
  this.expandToggleDisabled = undefined;
5090
- this.classCollection = new Me(['mg-c-panel']);
5416
+ this.classCollection = new Oe(['mg-c-panel']);
5091
5417
  this.isEditing = false;
5092
5418
  this.updatedPanelTitle = undefined;
5093
5419
  }
5094
5420
  validatePanelTitle(newValue) {
5095
- if (!Be(newValue))
5421
+ if (!Ne(newValue))
5096
5422
  throw new Error('<mg-panel> prop "panelTitle" is required.');
5097
5423
  this.titleChange.emit(newValue);
5098
5424
  }
@@ -5143,7 +5469,7 @@ const MgPanel = class {
5143
5469
  */
5144
5470
  render() {
5145
5471
  const headerId = `${this.identifier}-header`;
5146
- return (h("section", { key: '0f4e6da36c14880761294b950aef7273fb3b254e', class: this.classCollection.join(), id: this.identifier }, h("mg-card", { key: '3f604c637fb25eb7a236efb26d4c9da7c106cada' }, h("header", { key: '86b24eee8ab6a59789579ccee766e34ce1b60206', class: { 'mg-c-panel__header': true, 'mg-c-panel__header--reverse': this.titlePosition === 'right' }, id: headerId }, this.renderHeaderChildren()), h("article", { key: '054a9aee122a1273aa431750daa15d2e5cfec316', class: "mg-c-panel__content", id: `${this.identifier}-content`, "aria-labelledby": headerId, hidden: !this.expanded }, h("slot", { key: 'b2daff9ba6ebe460c849f33e019bfd6583376451' })))));
5472
+ return (h("section", { key: 'd01136210425cb7790aab87d6c137ba74fc02af5', class: this.classCollection.join(), id: this.identifier }, h("mg-card", { key: '84084da775de623fd20c069de5e49d2542755907' }, h("header", { key: '9f3ef1d0d7b2dc275d0c7b39175e0f775cbb1e1b', class: { 'mg-c-panel__header': true, 'mg-c-panel__header--reverse': this.titlePosition === 'right' }, id: headerId }, this.renderHeaderChildren()), h("article", { key: '4b6cd2b1b604515d657368642fe21b21eb33b55b', class: "mg-c-panel__content", id: `${this.identifier}-content`, "aria-labelledby": headerId, hidden: !this.expanded }, h("slot", { key: '45db8591e0b85ed5e9704dc1a42fa75d24e96e39' })))));
5147
5473
  }
5148
5474
  get element() { return getElement(this); }
5149
5475
  static get watchers() { return {
@@ -7043,7 +7369,7 @@ const MgPopover = class {
7043
7369
  mgPopoverContent.setAttribute('id', this.identifier);
7044
7370
  }
7045
7371
  };
7046
- this.identifier = Re('mg-popover');
7372
+ this.identifier = Me('mg-popover');
7047
7373
  this.placement = 'bottom';
7048
7374
  this.arrowHide = false;
7049
7375
  this.closeButton = false;
@@ -7086,7 +7412,7 @@ const MgPopover = class {
7086
7412
  */
7087
7413
  componentWillLoad() {
7088
7414
  // Get windows to attach events
7089
- this.windows = _e(window);
7415
+ this.windows = Be(window);
7090
7416
  // render mg-popover-content slot
7091
7417
  this.renderPopoverContent();
7092
7418
  this.validateCloseButton(this.closeButton);
@@ -7148,7 +7474,7 @@ const MgPopover = class {
7148
7474
  * @returns HTML Element
7149
7475
  */
7150
7476
  render() {
7151
- return (h(Host, { key: 'd6ebc1c018e61ca61593905ec3e2535394bd53a7' }, h("slot", { key: 'a47ad7ad03453c782aea2994254c5cd98a1e3b92' }), h("slot", { key: '6ba88b5e57dc91474de84037c0d7a793755ed18f', name: "content" })));
7477
+ return (h(Host, { key: '788fd2a8f759f8ae9188b05395cbfc33b5b06c69' }, h("slot", { key: '9109948237f93d375e6d1b234274f8283c0260d3' }), h("slot", { key: 'e76a1093edab91746a4d3302d7976129ed7c6042', name: "content" })));
7152
7478
  }
7153
7479
  get element() { return getElement(this); }
7154
7480
  static get watchers() { return {
@@ -7174,7 +7500,7 @@ const MgPopoverContent = class {
7174
7500
  this.hideContent.emit();
7175
7501
  };
7176
7502
  this.closeButton = false;
7177
- this.classCollection = new Me(['mg-c-popover-content']);
7503
+ this.classCollection = new Oe(['mg-c-popover-content']);
7178
7504
  }
7179
7505
  /*************
7180
7506
  * Lifecycle *
@@ -7192,7 +7518,7 @@ const MgPopoverContent = class {
7192
7518
  componentDidLoad() {
7193
7519
  const headingTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
7194
7520
  const slottedTitleElement = this.element.querySelector('[slot="title"]');
7195
- if (slottedTitleElement && !Fe(slottedTitleElement, headingTags)) {
7521
+ if (slottedTitleElement && !De(slottedTitleElement, headingTags)) {
7196
7522
  throw new Error(`<mg-popover> Slotted title must be a heading: ${headingTags.join(', ')}`);
7197
7523
  }
7198
7524
  }
@@ -7201,7 +7527,7 @@ const MgPopoverContent = class {
7201
7527
  * @returns HTML Element
7202
7528
  */
7203
7529
  render() {
7204
- return (h(Host, { key: 'e7344c0999adb28766413b2b5cdb2a682d0761ac' }, h("mg-card", { key: '04e73d6b68b89bd915a5ce9ebcc6a4c06742b6f1', class: this.classCollection.join() }, this.closeButton && (h("mg-button", { "is-icon": true, variant: "flat", label: this.messages.general.close, onClick: this.handleCloseButton }, h("mg-icon", { icon: "cross" }))), h("div", { key: 'e2d30d49368722078c32edb5d95191fa2f03af22', class: "mg-c-popover-content__title" }, h("slot", { key: '0aee7ff2b06f57ff5256a2420c75ed987b48975b', name: "title" })), h("slot", { key: '2d2ec48ad494aeec5554572dbd3b1620856ac5ba', name: "content" })), h("slot", { key: '90d1985eeaf2d7424b9418d2e7ce26ef6bc35efe', name: "arrow" })));
7530
+ return (h(Host, { key: 'ffe73fca1c2d8ffa0f5ac2359b50a453b37df7be' }, h("mg-card", { key: 'f6e04d90892104abf496cf3ca3a601cb747346c9', class: this.classCollection.join() }, this.closeButton && (h("mg-button", { key: '53b6f7360b07321c0433fb2f44f1b1dd9016f204', "is-icon": true, variant: "flat", label: this.messages.general.close, onClick: this.handleCloseButton }, h("mg-icon", { key: 'aa638786bca9af815d36e1de905559d60e68e44c', icon: "cross" }))), h("div", { key: '0b9f1319e409a0b1d75d16236806fd024c8b804e', class: "mg-c-popover-content__title" }, h("slot", { key: '7f52704d2ed49ea048ffd06b763a238d288ccaf3', name: "title" })), h("slot", { key: '7a2fd6b013e592acb616793439b2f4e8458ec372', name: "content" })), h("slot", { key: 'ceb0a6453ece1b861fe5ab3d63e803b1f41cb148', name: "arrow" })));
7205
7531
  }
7206
7532
  get element() { return getElement(this); }
7207
7533
  };
@@ -7228,7 +7554,7 @@ const MgSkipLinks = class {
7228
7554
  this.links = undefined;
7229
7555
  }
7230
7556
  validateLinks(links) {
7231
- if (links === undefined || links.length === 0 || links.some(link => !Be(link.href) || !link.href.startsWith('#') || !Be(link.label))) {
7557
+ if (links === undefined || links.length === 0 || links.some(link => !Ne(link.href) || !link.href.startsWith('#') || !Ne(link.label))) {
7232
7558
  throw new Error(`<mg-skip-links> prop "links": Cannot be empty and each link must contains an href starting with a "#" and a non empty label attributes.`);
7233
7559
  }
7234
7560
  }
@@ -7247,7 +7573,7 @@ const MgSkipLinks = class {
7247
7573
  * @returns HTML Element
7248
7574
  */
7249
7575
  render() {
7250
- return (h("nav", { key: 'c66cf3fb09a459865bb10f21a7f1b7c1c04eec87', class: "mg-c-skip-links", role: "navigation", "aria-label": this.messages.skipLinks.navLabel }, h("ul", { key: 'a8855a047dc8352df52ac16ca9c9a4b7ccf100c0', class: "mg-c-skip-links__list", role: "list" }, this.links.map(link => (h("li", { key: link.href }, h("a", { class: "mg-c-skip-links__link", href: link.href, onClick: this.handleLinkCLick }, link.label)))))));
7576
+ return (h("nav", { key: '2dac1b6dab0eb2634b803240325822ea3c8bae63', class: "mg-c-skip-links", role: "navigation", "aria-label": this.messages.skipLinks.navLabel }, h("ul", { key: 'e050de2426d080ede6a2b983ec0f9452b0e0f43b', class: "mg-c-skip-links__list", role: "list" }, this.links.map(link => (h("li", { key: link.href }, h("a", { class: "mg-c-skip-links__link", href: link.href, onClick: this.handleLinkCLick }, link.label)))))));
7251
7577
  }
7252
7578
  get element() { return getElement(this); }
7253
7579
  static get watchers() { return {
@@ -7380,7 +7706,7 @@ const MgTabs = class {
7380
7706
  */
7381
7707
  this.resetFocus = () => {
7382
7708
  // update asynchronously tabindex to prevent get focus on new tabindex at then end of event process
7383
- Ue(() => {
7709
+ Ce(() => {
7384
7710
  this.tabFocus = undefined;
7385
7711
  Array.from(this.element.shadowRoot.querySelectorAll('[data-index]')).forEach((tab, index) => {
7386
7712
  tab.setAttribute('tabindex', this.activeTab - this.startIndex !== index ? '-1' : '0');
@@ -7395,16 +7721,16 @@ const MgTabs = class {
7395
7721
  if (slots.length !== this.tabs.length)
7396
7722
  throw new Error('<mg-tabs> Must have slots counts equal to tabs count.');
7397
7723
  };
7398
- this.identifier = Re('mg-tabs');
7724
+ this.identifier = Me('mg-tabs');
7399
7725
  this.label = undefined;
7400
7726
  this.size = 'regular';
7401
7727
  this.items = undefined;
7402
7728
  this.activeTab = undefined;
7403
7729
  this.tabs = [];
7404
- this.classCollection = new Me(['mg-c-tabs']);
7730
+ this.classCollection = new Oe(['mg-c-tabs']);
7405
7731
  }
7406
7732
  validateLabel(newValue) {
7407
- if (!Be(newValue)) {
7733
+ if (!Ne(newValue)) {
7408
7734
  throw new Error('<mg-tabs> prop "label" is required.');
7409
7735
  }
7410
7736
  }
@@ -7416,7 +7742,7 @@ const MgTabs = class {
7416
7742
  }
7417
7743
  validateItems(newValue) {
7418
7744
  // String array
7419
- if (Oe(newValue))
7745
+ if (Fe(newValue))
7420
7746
  this.tabs = newValue.map(item => ({ label: item, status: Status.VISIBLE }));
7421
7747
  // Object array
7422
7748
  else if (Array.isArray(newValue) && newValue.length > 0 && newValue.every(isTabItem))
@@ -7478,7 +7804,7 @@ const MgTabs = class {
7478
7804
  * @returns HTML Element
7479
7805
  */
7480
7806
  render() {
7481
- return (h("div", { key: '0a0e2fdcb11b2dd79803cc114a429b2ef4cc3c89', class: this.classCollection.join() }, h("header", { key: '332ba66756df3c83dcec8daf2d83386f5f93a6bb', role: "tablist", "aria-label": this.label, class: "mg-c-tabs__header" }, this.tabs.map((tab, index) => (h("button", { key: tab.label, role: "tab", id: this.getElementId(this.identifier, index), class: {
7807
+ return (h("div", { key: '9327c6fb0d13d41d82b50e2f4f79696916ef142f', class: this.classCollection.join() }, h("header", { key: 'b783c343af1e817a2ab231d803e8ecf32df52566', role: "tablist", "aria-label": this.label, class: "mg-c-tabs__header" }, this.tabs.map((tab, index) => (h("button", { key: tab.label, role: "tab", id: this.getElementId(this.identifier, index), class: {
7482
7808
  [`${this.buttonTabBaseClass}`]: true,
7483
7809
  [`${this.buttonTabBaseClass}--horizontal`]: true,
7484
7810
  [`${this.getNavigationButtonClass(Status.ACTIVE)}`]: this.tabHasStatus(tab, Status.ACTIVE),
@@ -7516,7 +7842,7 @@ const MgTag = class {
7516
7842
  this.variant = variants[0];
7517
7843
  this.outline = undefined;
7518
7844
  this.soft = undefined;
7519
- this.classCollection = new Me(['mg-c-tag']);
7845
+ this.classCollection = new Oe(['mg-c-tag']);
7520
7846
  }
7521
7847
  validateVariant(newValue, oldValue) {
7522
7848
  if (!variants.includes(newValue)) {
@@ -7553,7 +7879,7 @@ const MgTag = class {
7553
7879
  * @param textContent - html element textContent property
7554
7880
  */
7555
7881
  validateTextContent(textContent) {
7556
- if (!Be(textContent))
7882
+ if (!Ne(textContent))
7557
7883
  throw new Error('<mg-tag> slot must contain a text content.');
7558
7884
  }
7559
7885
  /*************
@@ -7573,7 +7899,7 @@ const MgTag = class {
7573
7899
  * @returns HTML Element
7574
7900
  */
7575
7901
  render() {
7576
- return (h("span", { key: 'c528cdd483287d210928ed3a993b491cdedd5b42', class: this.classCollection.join() }, h("slot", { key: '36403304976bb40067529c5cd0a810dca41055b1' })));
7902
+ return (h("span", { key: '0746ab46695d72da229ea6b899c5ec9d4d09b0f0', class: this.classCollection.join() }, h("slot", { key: 'c1b246aaf9b5b199726c856b7e6a67be54e55b7c' })));
7577
7903
  }
7578
7904
  get element() { return getElement(this); }
7579
7905
  static get watchers() { return {
@@ -7589,6 +7915,7 @@ var Guard;
7589
7915
  Guard["FOCUS"] = "focus";
7590
7916
  Guard["HOVER_TOOLTIP_ELEMENT"] = "hoverTooltipGuard";
7591
7917
  Guard["HOVER_TOOLTIPED_ELEMENT"] = "hoverTooltipedGuard";
7918
+ Guard["DISABLE_ON_CLICK"] = "disableOnClick";
7592
7919
  })(Guard || (Guard = {}));
7593
7920
 
7594
7921
  const mgTooltipCss = ":host{display:inline-block}mg-tooltip-content{font-family:var(--font-family);font-size:var(--font-size);font-weight:200}";
@@ -7612,7 +7939,7 @@ const MgTooltip = class {
7612
7939
  // Enable the event listeners
7613
7940
  this.popper.setOptions(options => (Object.assign(Object.assign({}, options), { modifiers: [...options.modifiers, { name: 'eventListeners', enabled: true }] })));
7614
7941
  // hide when click outside on nextTick to prevent event to trigger after creation
7615
- Ue(() => {
7942
+ Ce(() => {
7616
7943
  this.windows.forEach((localWindow) => {
7617
7944
  localWindow.addEventListener('click', this.clickOutside, false);
7618
7945
  localWindow.addEventListener('keydown', this.pressEscape, false);
@@ -7668,7 +7995,7 @@ const MgTooltip = class {
7668
7995
  */
7669
7996
  this.tooltipMouseListenerAction = (elementGuard, isMouseenter, conditionalGuard) => {
7670
7997
  // we mutate elementGuard
7671
- if (this.guard !== Guard.FOCUS) {
7998
+ if (![Guard.FOCUS, Guard.DISABLE_ON_CLICK].includes(this.guard)) {
7672
7999
  this.guard = elementGuard;
7673
8000
  if (!isMouseenter) {
7674
8001
  // process action in the next event loop macro task
@@ -7749,6 +8076,12 @@ const MgTooltip = class {
7749
8076
  ],
7750
8077
  });
7751
8078
  // Manage tooltipedElement focus/blur events
8079
+ this.tooltipedElement.addEventListener('disabled-change', (event) => {
8080
+ if (event.target.disableOnClick) {
8081
+ this.guard = event.detail ? Guard.DISABLE_ON_CLICK : null;
8082
+ }
8083
+ });
8084
+ // Manage tooltipedElement focus/blur events
7752
8085
  this.tooltipedElement.addEventListener('focus', () => {
7753
8086
  this.guard = Guard.FOCUS;
7754
8087
  this.setDisplay(true);
@@ -7777,7 +8110,7 @@ const MgTooltip = class {
7777
8110
  });
7778
8111
  });
7779
8112
  };
7780
- this.identifier = Re('mg-tooltip');
8113
+ this.identifier = Me('mg-tooltip');
7781
8114
  this.message = undefined;
7782
8115
  this.placement = 'bottom';
7783
8116
  this.display = false;
@@ -7788,7 +8121,7 @@ const MgTooltip = class {
7788
8121
  this.renderTooltipContent();
7789
8122
  }
7790
8123
  validateMessage(newValue) {
7791
- if (!Be(newValue)) {
8124
+ if (!Ne(newValue)) {
7792
8125
  throw new Error('<mg-tooltip> prop "message" is required.');
7793
8126
  }
7794
8127
  this.mgTooltipContent.message = newValue;
@@ -7837,7 +8170,7 @@ const MgTooltip = class {
7837
8170
  */
7838
8171
  componentWillLoad() {
7839
8172
  // Get windows to attach events
7840
- this.windows = _e(window);
8173
+ this.windows = Be(window);
7841
8174
  // Get tooltip element
7842
8175
  this.renderTooltipContent();
7843
8176
  this.mgTooltipContent = this.element.querySelector(`#${this.identifier}`);
@@ -7856,14 +8189,14 @@ const MgTooltip = class {
7856
8189
  // get slotted element wich is not the tooltip
7857
8190
  const slotElement = this.element.querySelector(`*:not(#${this.identifier})`);
7858
8191
  // Get interactive element
7859
- const interactiveElement = slotElement.matches(De) ? slotElement : (_a = slotElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(De);
8192
+ const interactiveElement = slotElement.matches(_e) ? slotElement : (_a = slotElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(_e);
7860
8193
  // define selected element to become tooltip selector
7861
8194
  this.tooltipedElement = interactiveElement || slotElement;
7862
8195
  // Check if slotted element is a disabled mg-button
7863
8196
  // In this case we wrap the mg-button into a div to enable the tooltip
7864
8197
  if (isButton(slotElement)) {
7865
8198
  new MutationObserver(mutationList => {
7866
- if (mutationList.some(mutation => ['aria-disabled', 'disabled'].includes(mutation.attributeName))) {
8199
+ if (mutationList.some(mutation => ['aria-disabled', 'disabled'].includes(mutation.attributeName)) && this.guard !== Guard.DISABLE_ON_CLICK) {
7867
8200
  this.setMgButtonWrapper(slotElement);
7868
8201
  // Since Firefox doesn't trigger a "blur" event when the "disabled" attribute is added or removed from a button
7869
8202
  // we have to manually unlock the guard because the "blur" handler of the tooltipedElement won't do it.
@@ -7888,7 +8221,7 @@ const MgTooltip = class {
7888
8221
  * @returns HTML Element
7889
8222
  */
7890
8223
  render() {
7891
- return (h(Host, { key: '39e72edae07252421d527bfbeede585a27d2663c' }, h("slot", { key: '0402c8ea5aa2dea27e66a621e3d905356786dd27' }), h("slot", { key: 'e194462c062b565a6cb0e6330fa841a29746445d', name: "content" })));
8224
+ return (h(Host, { key: 'bc92b38b5934945abf8657aeb56804c81274a11e' }, h("slot", { key: '5fca70b68f35c72c92252106d4b26766e2f671bb' }), h("slot", { key: '4426a5f6f55f549791ff22cc7220d728d2cca04f', name: "content" })));
7892
8225
  }
7893
8226
  get element() { return getElement(this); }
7894
8227
  static get watchers() { return {
@@ -7916,11 +8249,11 @@ const MgTooltipContent = class {
7916
8249
  * @returns HTML Element
7917
8250
  */
7918
8251
  render() {
7919
- return (h(Host, { key: 'a26eb86dd6c3461563b2c532b1330f8897eb2da6', role: "tooltip" }, h("span", { key: 'eff274511b40c5e60429ebc387e32717854f7ffc', innerHTML: this.message, class: "mg-tooltip-content__message" }), h("slot", { key: '3b26eabf4471f34ae3997faa81e667341d26bee5', name: "arrow" })));
8252
+ return (h(Host, { key: '749056e11074a73ef0bbe1aab102c334f0de8fed', role: "tooltip" }, h("span", { key: 'e7db4c4ab009e7ebd9908c86d151216919c59e9a', innerHTML: this.message, class: "mg-tooltip-content__message" }), h("slot", { key: 'f260fbe909763b8e221acd4178df0880f650a3a5', name: "arrow" })));
7920
8253
  }
7921
8254
  };
7922
8255
  MgTooltipContent.style = MgTooltipContentStyle0;
7923
8256
 
7924
- export { MgActionMore as mg_action_more, MgBadge as mg_badge, MgButton as mg_button, MgCard as mg_card, MgCharacterLeft as mg_character_left, MgDetails as mg_details, MgDivider as mg_divider, MgForm as mg_form, MgIcon as mg_icon, MgIllustratedMessage as mg_illustrated_message, MgInput as mg_input, MgInputCheckbox as mg_input_checkbox, MgInputCheckboxPaginated as mg_input_checkbox_paginated, MgInputDate as mg_input_date, MgInputNumeric as mg_input_numeric, MgInputPassword as mg_input_password, MgInputRadio as mg_input_radio, MgInputSelect as mg_input_select, MgInputText as mg_input_text, MgInputTextarea as mg_input_textarea, MgInputTitle as mg_input_title, MgInputToggle as mg_input_toggle, MgMenu as mg_menu, MgMenuItem as mg_menu_item, MgMessage as mg_message, MgModal as mg_modal, MgPagination as mg_pagination, MgPanel as mg_panel, MgPopover as mg_popover, MgPopoverContent as mg_popover_content, MgSkipLinks as mg_skip_links, MgTabs as mg_tabs, MgTag as mg_tag, MgTooltip as mg_tooltip, MgTooltipContent as mg_tooltip_content };
8257
+ export { MgActionMore as mg_action_more, MgBadge as mg_badge, MgButton as mg_button, MgCard as mg_card, MgCharacterLeft as mg_character_left, MgDetails as mg_details, MgDivider as mg_divider, MgForm as mg_form, MgIcon as mg_icon, MgIllustratedMessage as mg_illustrated_message, MgInput as mg_input, MgInputCheckbox as mg_input_checkbox, MgInputCheckboxPaginated as mg_input_checkbox_paginated, MgInputDate as mg_input_date, MgInputNumeric as mg_input_numeric, MgInputPassword as mg_input_password, MgInputRadio as mg_input_radio, MgInputSelect as mg_input_select, MgInputText as mg_input_text, MgInputTextarea as mg_input_textarea, MgInputTitle as mg_input_title, MgInputToggle as mg_input_toggle, MgItemMore as mg_item_more, MgMenu as mg_menu, MgMenuItem as mg_menu_item, MgMessage as mg_message, MgModal as mg_modal, MgPagination as mg_pagination, MgPanel as mg_panel, MgPopover as mg_popover, MgPopoverContent as mg_popover_content, MgSkipLinks as mg_skip_links, MgTabs as mg_tabs, MgTag as mg_tag, MgTooltip as mg_tooltip, MgTooltipContent as mg_tooltip_content };
7925
8258
 
7926
- //# sourceMappingURL=mg-action-more_35.entry.js.map
8259
+ //# sourceMappingURL=mg-action-more_36.entry.js.map