@mgdis/mg-components 5.27.2 → 5.27.4

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 (123) hide show
  1. package/dist/cjs/{index-00072168.js → index-11b35234.js} +76 -36
  2. package/dist/cjs/index-11b35234.js.map +1 -0
  3. package/dist/cjs/index-3198e64e.js +1688 -0
  4. package/dist/cjs/index-3198e64e.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/mg-action-more_36.cjs.entry.js +270 -216
  7. package/dist/cjs/mg-action-more_36.cjs.entry.js.map +1 -1
  8. package/dist/cjs/mg-components.cjs.js +10 -10
  9. package/dist/cjs/mg-components.cjs.js.map +1 -1
  10. package/dist/cjs/mg-loader.cjs.entry.js +3 -3
  11. package/dist/collection/collection-manifest.json +1 -1
  12. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +124 -97
  13. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
  14. package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js +1 -0
  15. package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js.map +1 -1
  16. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +1 -1
  17. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js.map +1 -1
  18. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js.map +1 -1
  19. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +21 -3
  20. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -1
  21. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +21 -18
  22. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js.map +1 -1
  23. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +2 -1
  24. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js.map +1 -1
  25. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +4 -4
  26. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js.map +1 -1
  27. package/dist/collection/components/molecules/mg-popover/mg-popover.js +6 -2
  28. package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
  29. package/dist/components/index.es.js +65 -25
  30. package/dist/components/index.es.js.map +1 -1
  31. package/dist/components/index2.js +2 -2
  32. package/dist/components/mg-action-more.js +2 -2
  33. package/dist/components/mg-badge2.js +3 -3
  34. package/dist/components/mg-button2.js +4 -4
  35. package/dist/components/mg-card2.js +2 -2
  36. package/dist/components/mg-details.js +2 -2
  37. package/dist/components/mg-form.js +3 -3
  38. package/dist/components/mg-icon2.js +2 -2
  39. package/dist/components/mg-illustrated-message.js +2 -2
  40. package/dist/components/mg-input-checkbox-paginated2.js +1 -1
  41. package/dist/components/mg-input-checkbox-paginated2.js.map +1 -1
  42. package/dist/components/mg-input-checkbox.js +25 -7
  43. package/dist/components/mg-input-checkbox.js.map +1 -1
  44. package/dist/components/mg-input-date.js +11 -11
  45. package/dist/components/mg-input-numeric.js +5 -5
  46. package/dist/components/mg-input-password.js +3 -3
  47. package/dist/components/mg-input-radio.js +4 -4
  48. package/dist/components/mg-input-select2.js +6 -6
  49. package/dist/components/mg-input-text2.js +6 -6
  50. package/dist/components/mg-input-textarea.js +6 -6
  51. package/dist/components/mg-input-title2.js +2 -2
  52. package/dist/components/mg-input-toggle.js +4 -4
  53. package/dist/components/mg-input2.js +4 -3
  54. package/dist/components/mg-input2.js.map +1 -1
  55. package/dist/components/mg-item-more2.js +26 -23
  56. package/dist/components/mg-item-more2.js.map +1 -1
  57. package/dist/components/mg-loader.js +2 -2
  58. package/dist/components/mg-menu-item2.js +8 -7
  59. package/dist/components/mg-menu-item2.js.map +1 -1
  60. package/dist/components/mg-message.js +3 -3
  61. package/dist/components/mg-modal.js +6 -6
  62. package/dist/components/mg-pagination2.js +2 -2
  63. package/dist/components/mg-panel.js +4 -4
  64. package/dist/components/mg-popover-content2.js +3 -3
  65. package/dist/components/mg-popover2.js +9 -5
  66. package/dist/components/mg-popover2.js.map +1 -1
  67. package/dist/components/mg-skip-links.js +2 -2
  68. package/dist/components/mg-tabs.js +6 -6
  69. package/dist/components/mg-tag.js +3 -3
  70. package/dist/components/mg-tooltip2.js +134 -107
  71. package/dist/components/mg-tooltip2.js.map +1 -1
  72. package/dist/esm/{index-8d5d1bfd.js → index-00abd8c1.js} +67 -27
  73. package/dist/esm/index-00abd8c1.js.map +1 -0
  74. package/dist/esm/index-99317ec3.js +1659 -0
  75. package/dist/esm/index-99317ec3.js.map +1 -0
  76. package/dist/esm/loader.js +3 -3
  77. package/dist/esm/mg-action-more_36.entry.js +270 -216
  78. package/dist/esm/mg-action-more_36.entry.js.map +1 -1
  79. package/dist/esm/mg-components.js +11 -11
  80. package/dist/esm/mg-components.js.map +1 -1
  81. package/dist/esm/mg-loader.entry.js +3 -3
  82. package/dist/mg-components/index.esm.js.map +1 -1
  83. package/dist/mg-components/mg-components.esm.js +1 -1
  84. package/dist/mg-components/mg-components.esm.js.map +1 -1
  85. package/dist/mg-components/p-48c0a0bf.entry.js +2 -0
  86. package/dist/mg-components/p-48c0a0bf.entry.js.map +1 -0
  87. package/dist/mg-components/p-4cfcbdc2.js +2 -0
  88. package/dist/mg-components/p-4cfcbdc2.js.map +1 -0
  89. package/dist/mg-components/p-815362e4.js +3 -0
  90. package/dist/mg-components/p-815362e4.js.map +1 -0
  91. package/dist/mg-components/{p-99e2f42a.entry.js → p-d3e15dd7.entry.js} +2 -2
  92. package/dist/mg-components/{p-99e2f42a.entry.js.map → p-d3e15dd7.entry.js.map} +1 -1
  93. package/dist/mg-components/p-e1255160.js.map +1 -1
  94. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +25 -12
  95. package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +2 -1
  96. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +2 -0
  97. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +8 -0
  98. package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +1 -5
  99. package/dist/types/stencil-public-runtime.d.ts +3 -8
  100. package/ide/intellij/web-types.json +1 -1
  101. package/ide/vscode/html-custom-data.json +1 -1
  102. package/loader/cdn.js +1 -3
  103. package/loader/index.cjs.js +1 -3
  104. package/loader/index.es2017.js +1 -3
  105. package/loader/index.js +1 -3
  106. package/package.json +25 -25
  107. package/dist/cjs/index-00072168.js.map +0 -1
  108. package/dist/cjs/index-7e27c7ae.js +0 -2561
  109. package/dist/cjs/index-7e27c7ae.js.map +0 -1
  110. package/dist/esm/index-8d5d1bfd.js.map +0 -1
  111. package/dist/esm/index-e479d5ae.js +0 -2532
  112. package/dist/esm/index-e479d5ae.js.map +0 -1
  113. package/dist/esm/polyfills/core-js.js +0 -11
  114. package/dist/esm/polyfills/dom.js +0 -79
  115. package/dist/esm/polyfills/es5-html-element.js +0 -1
  116. package/dist/esm/polyfills/index.js +0 -34
  117. package/dist/esm/polyfills/system.js +0 -6
  118. package/dist/mg-components/p-7315d4a6.js +0 -3
  119. package/dist/mg-components/p-7315d4a6.js.map +0 -1
  120. package/dist/mg-components/p-8800813b.js +0 -2
  121. package/dist/mg-components/p-8800813b.js.map +0 -1
  122. package/dist/mg-components/p-f9ac8927.entry.js +0 -2
  123. package/dist/mg-components/p-f9ac8927.entry.js.map +0 -1
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-7e27c7ae.js');
6
- const index$1 = require('./index-00072168.js');
5
+ const index = require('./index-3198e64e.js');
6
+ const index$1 = require('./index-11b35234.js');
7
7
 
8
8
  /**
9
9
  * Available menu-item positions
@@ -79,7 +79,7 @@ const MgActionMore = class {
79
79
  ************/
80
80
  this.name = 'mg-action-more';
81
81
  this.classBase = 'mg-c-action-more';
82
- this.mgPopoverIdentifier = index$1.Me(this.name);
82
+ this.mgPopoverIdentifier = index$1.Ce(this.name);
83
83
  /************
84
84
  * Methods *
85
85
  ***********/
@@ -203,7 +203,7 @@ const MgBadge = class {
203
203
  this.label = undefined;
204
204
  this.variant = variants$5[0];
205
205
  this.outline = undefined;
206
- this.classCollection = new index$1.Oe(['mg-c-badge']);
206
+ this.classCollection = new index$1.He(['mg-c-badge']);
207
207
  }
208
208
  validateValue(newValue) {
209
209
  if (/^(\d+\+*|[?*!a-z])$/i.exec(`${newValue}`) === null) {
@@ -211,7 +211,7 @@ const MgBadge = class {
211
211
  }
212
212
  }
213
213
  validateLabel(newValue) {
214
- if (!index$1.Ne(newValue)) {
214
+ if (!index$1.Ie(newValue)) {
215
215
  throw new Error('<mg-badge> prop "label" is required.');
216
216
  }
217
217
  }
@@ -322,7 +322,7 @@ const MgButton = class {
322
322
  this.isIcon = false;
323
323
  this.disableOnClick = false;
324
324
  this.loading = false;
325
- this.classCollection = new index$1.Oe(['mg-c-button']);
325
+ this.classCollection = new index$1.He(['mg-c-button']);
326
326
  }
327
327
  validateVariant(newValue, oldValue) {
328
328
  if (!variants$4.includes(newValue)) {
@@ -381,7 +381,7 @@ const MgButton = class {
381
381
  this.validateFullWidth(this.fullWidth);
382
382
  if (this.isIcon) {
383
383
  this.classCollection.add(`mg-c-button--icon`);
384
- if (!index$1.Ne(this.label)) {
384
+ if (!index$1.Ie(this.label)) {
385
385
  throw new Error(`<mg-button> prop "label" is mandatory when prop "isIcon" is set to true.`);
386
386
  }
387
387
  }
@@ -393,7 +393,7 @@ const MgButton = class {
393
393
  * Add listners
394
394
  */
395
395
  componentDidLoad() {
396
- index$1.Ce(() => {
396
+ index$1.Ge(() => {
397
397
  var _a;
398
398
  const closestForm = this.element.closest('form') || ((_a = this.element.closest('mg-form')) === null || _a === void 0 ? void 0 : _a.shadowRoot.querySelector('form'));
399
399
  // submit buttons should trigger form submition;
@@ -452,7 +452,7 @@ const MgCard = class {
452
452
  };
453
453
  this.variant = undefined;
454
454
  this.variantStyle = undefined;
455
- this.classCollection = new index$1.Oe([this.classBase]);
455
+ this.classCollection = new index$1.He([this.classBase]);
456
456
  }
457
457
  validateVariant(newValue, oldValue) {
458
458
  if (newValue && !variants$3.includes(newValue))
@@ -557,7 +557,7 @@ const MgDetails = class {
557
557
  this.expanded = false;
558
558
  }
559
559
  validateTitles(newValue) {
560
- if (!index$1.Ne(newValue)) {
560
+ if (!index$1.Ie(newValue)) {
561
561
  throw new Error('<mg-details> prop "toggleClosed" and "toggleOpened" must be defined.');
562
562
  }
563
563
  }
@@ -715,7 +715,7 @@ const MgForm = class {
715
715
  }
716
716
  });
717
717
  };
718
- this.identifier = index$1.Me('mg-form');
718
+ this.identifier = index$1.Ce('mg-form');
719
719
  this.name = this.identifier;
720
720
  this.readonly = false;
721
721
  this.requiredMessage = undefined;
@@ -724,7 +724,7 @@ const MgForm = class {
724
724
  this.disabled = false;
725
725
  this.valid = undefined;
726
726
  this.invalid = undefined;
727
- this.classCollection = new index$1.Oe(['mg-c-form']);
727
+ this.classCollection = new index$1.He(['mg-c-form']);
728
728
  this.requiredMessageText = undefined;
729
729
  }
730
730
  validateRequiredMessage(newValue) {
@@ -865,7 +865,7 @@ const MgIcon = class {
865
865
  this.variant = undefined;
866
866
  this.variantStyle = undefined;
867
867
  this.spin = false;
868
- this.classCollection = new index$1.Oe(['mg-c-icon']);
868
+ this.classCollection = new index$1.He(['mg-c-icon']);
869
869
  }
870
870
  validateIcon(newValue, oldValue) {
871
871
  if (!Object.keys(icons).includes(newValue))
@@ -964,7 +964,7 @@ const MgIllustratedMessage = class {
964
964
  componentDidLoad() {
965
965
  const headingTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
966
966
  const slottedIllustrations = this.element.querySelectorAll('[slot="illustration"]');
967
- if (!index$1.De(this.element.querySelector('[slot="title"]'), headingTags)) {
967
+ if (!index$1.Be(this.element.querySelector('[slot="title"]'), headingTags)) {
968
968
  throw new Error(`<mg-illustrated-message> Slotted title must be a heading: ${headingTags.join(', ')}`);
969
969
  }
970
970
  else if (slottedIllustrations.length !== 1) {
@@ -1004,6 +1004,7 @@ var Handler;
1004
1004
  (function (Handler) {
1005
1005
  Handler["BLUR"] = "blur";
1006
1006
  Handler["FOCUS"] = "focus";
1007
+ Handler["MOUSEENTER"] = "mouseenter";
1007
1008
  })(Handler || (Handler = {}));
1008
1009
  const classFieldset = 'mg-c-input--fieldset';
1009
1010
  const classDisabled = 'mg-c-input--disabled';
@@ -1064,7 +1065,7 @@ const MgInput = class {
1064
1065
  this.isVerticalList = false;
1065
1066
  }
1066
1067
  watchIdentifier(newValue) {
1067
- if (!index$1.Ne(newValue)) {
1068
+ if (!index$1.Ie(newValue)) {
1068
1069
  throw new Error('<mg-input> prop "identifier" is required.');
1069
1070
  }
1070
1071
  else {
@@ -1149,7 +1150,7 @@ const MgInput = class {
1149
1150
  */
1150
1151
  // eslint-disable-next-line @stencil-community/no-unused-watch
1151
1152
  watchLabel() {
1152
- if (!index$1.Ne(this.label)) {
1153
+ if (!index$1.Ie(this.label)) {
1153
1154
  throw new Error('<mg-input> prop "label" is required.');
1154
1155
  }
1155
1156
  else {
@@ -1310,7 +1311,7 @@ index.h("ul", { class: "mg-c-input__input-group-container", role: "list", "aria-
1310
1311
  var _a, _b;
1311
1312
  return (index.h("li", { key: input._id, class: { 'mg-c-input__input-group': true, 'mg-c-input__input-group--disabled': props.disabled || input.disabled } },
1312
1313
  index.h("input", { type: "checkbox", id: input._id, name: props.name, value: (_a = input.value) === null || _a === void 0 ? void 0 : _a.toString(), checked: Boolean(input.value), required: input.required, "aria-invalid": ((_b = props.invalid) === null || _b === void 0 ? void 0 : _b.toString()) || 'false', disabled: props.disabled || input.disabled, indeterminate: input.value === null, onInput: input._handleInput, onBlur: input._handleBlur, onKeyDown: input._handleKeydown }),
1313
- index.h("label", { htmlFor: input._id }, input.title)));
1314
+ index.h("label", { htmlFor: input._id, onMouseEnter: input._handleMouseEnter, onMouseLeave: input._handleMouseLeave }, input.title)));
1314
1315
  })));
1315
1316
 
1316
1317
  const mgInputCheckboxCss = ".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}.mg-c-input__input-container{width:100%;flex:1 auto}.mg-c-input__box.mg-c-input__box--width{width:100%;min-width:5rem;max-width:calc(17.7rem + var(--mg-inputs-spacer)*2)}.mg-c-input.mg-c-input--width-2 .mg-c-input__box,.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left{max-width:5rem}.mg-c-input.mg-c-input--width-4 .mg-c-input__box,.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left{max-width:7rem}.mg-c-input.mg-c-input--width-16 .mg-c-input__box,.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left{max-width:21rem}.mg-c-input.mg-c-input--width-full .mg-c-input__box{width:100%;max-width:100%}.mg-c-input.mg-c-input--label-on-top.mg-c-input--width-2 .mg-c-input__box,.mg-c-input.mg-c-input--label-on-top.mg-c-input--width-2 .mg-c-input__with-character-left{max-width:5rem}.mg-c-input.mg-c-input--label-on-top.mg-c-input--width-4 .mg-c-input__box,.mg-c-input.mg-c-input--label-on-top.mg-c-input--width-4 .mg-c-input__with-character-left{max-width:7rem}.mg-c-input.mg-c-input--label-on-top.mg-c-input--width-16 .mg-c-input__box,.mg-c-input.mg-c-input--label-on-top.mg-c-input--width-16 .mg-c-input__with-character-left{max-width:21rem}.mg-c-input.mg-c-input--label-on-top.mg-c-input--width-full .mg-c-input__box{width:100%;max-width:100%}.mg-c-input.mg-c-input--label-on-top .mg-c-input__box{width:auto}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:stretch}.mg-c-input.mg-c-input--is-input-group-append ::slotted([slot=append-input]),.mg-c-input.mg-c-input--is-append-input-slot-content ::slotted([slot=append-input]){width:auto}:host(.mg-c-input.mg-c-input--width-full) ::slotted(*:not(mg-input-title)){width:100%;max-width:100%}.mg-c-input.mg-c-input--fieldset{padding:0;border:0;margin-right:0;margin-left:0}.mg-c-input.mg-c-input--fieldset input[type=radio],.mg-c-input.mg-c-input--fieldset input[type=checkbox]{width:var(--mg-input-check-size);height:var(--mg-input-check-size);flex-shrink:0;margin:calc((var(--font-size)*var(--line-height) - var(--mg-input-check-size))/2) .6rem 0 0}.mg-c-input.mg-c-input--fieldset .mg-c-input__input-group{display:flex;align-items:start}.mg-c-input.mg-c-input--fieldset .mg-c-input__input-group-container{display:flex;flex-wrap:wrap;padding:0;margin:0;margin-top:calc((var(--default-size) - var(--font-size)*var(--line-height))/2);gap:1rem 2.3rem;list-style:none}.mg-c-input.mg-c-input--fieldset.mg-c-input--vertical-list .mg-c-input__input-group-container,.mg-c-input.mg-c-input--fieldset.mg-c-input--checkbox-multi .mg-c-input__input-group-container{flex-direction:column}.mg-c-input.mg-c-input--fieldset.mg-c-input--label-on-top .mg-c-input__input-group-container{margin-top:.7rem}:host(.mg-c-input.mg-c-input--fieldset:not(.mg-c-input--checkbox-multi)) .mg-c-input__input-container mg-tooltip{margin-left:3rem}:host(.mg-c-input.mg-c-input--checkbox) .mg-c-input__input,:host(.mg-c-input.mg-c-input--radio) .mg-c-input__input{min-height:unset;align-items:flex-start}:host{display:block}.mg-c-input__input mg-icon,.mg-c-input__error mg-icon{display:flex}.mg-c-input{display:flex;min-height:var(--default-size);align-items:flex-start;margin-bottom:var(--mg-inputs-margin-bottom, 0)}.mg-c-input__input-container{min-height:var(--default-size)}.mg-c-input__input-container>ul{display:flex;flex-flow:column wrap;padding:0;margin:0;list-style:none;row-gap:.8rem}.mg-c-input__input-container>strong{display:inline-block}.mg-c-input__input-container>strong,.mg-c-input__input-container>ul{min-height:var(--font-size);margin-top:calc((var(--default-size) - var(--font-size)*var(--line-height))/2)}.mg-c-input__input-container mg-tooltip{display:inline-flex;width:var(--mg-icon-regular-size);height:var(--mg-icon-regular-size);margin-left:var(--mg-inputs-spacer)}.mg-c-input__input{display:flex;min-height:var(--default-size);align-items:center;justify-content:start}.mg-c-input__input mg-tooltip{align-self:baseline;margin-top:calc((var(--default-size) - var(--mg-icon-regular-size))/2)}.mg-c-input__input .mg-c-input__box:disabled,.mg-c-input__input ::slotted(.mg-c-input__button-toggle:disabled),.mg-c-input__input-group--disabled label,.mg-c-input.mg-c-input--checkbox-multi.mg-c-input--disabled .mg-c-input__input-container strong{opacity:var(--mg-disabled-opacity)}.mg-c-input__title{display:flex;width:var(--mg-inputs-title-width, auto);flex-shrink:0;align-items:baseline;justify-content:flex-end;margin-top:calc((var(--default-size) - var(--font-size)*var(--line-height))/2);margin-right:var(--mg-inputs-title-horizontal-space, var(--mg-inputs-spacer));text-align:right}.mg-c-input__title slot[name=label]+mg-tooltip{margin-left:.4rem}.mg-c-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-c-input__error{display:inline-block;padding:.3rem .8rem;border-radius:.3rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}.mg-c-input__error ::slotted(*),.mg-c-input__help-text ::slotted(*){font-size:1.2rem;text-align:start}.mg-c-input__help-text+.mg-c-input__error{margin-top:.2rem}:host(:not(.mg-c-input--textarea)) .mg-c-input__input+.mg-c-input__error,:host(:not(.mg-c-input--textarea)) .mg-c-input__input+.mg-c-input__help-text{margin-top:.5rem}.mg-c-input.mg-c-input--readonly>*:not([slot=label],[name=append-input]),.mg-c-input.mg-c-input--readonly ::slotted(mg-button[slot=append-input]){display:none}.mg-c-input.mg-c-input--has-error .mg-c-input__box{border-color:hsl(var(--color-danger))}:host(.mg-c-input){display:flex}:host(.mg-c-input.mg-c-input--textarea.mg-c-input--readonly) .mg-c-input__input-container{white-space:pre-line}:host(.mg-c-input.mg-c-input--checkbox,.mg-c-input.mg-c-input--radio) .mg-c-input__input{min-height:unset}:host(.mg-c-input.mg-c-input--label-on-top){flex-direction:column}:host(.mg-c-input.mg-c-input--label-on-top) .mg-c-input__title{width:100%;flex:0;justify-content:flex-start;margin-top:0;margin-right:0;margin-bottom:.3rem;text-align:left}:host(.mg-c-input.mg-c-input--label-on-top) .mg-c-input__title ::slotted(mg-input-title){flex-shrink:1}@media screen and (max-width: 767px){:host(.mg-c-input){flex-direction:column}:host(.mg-c-input) .mg-c-input__title{width:100%;flex:0;justify-content:flex-start;margin-top:0;margin-right:0;margin-bottom:.3rem;text-align:left}:host(.mg-c-input) .mg-c-input__title ::slotted(mg-input-title){flex-shrink:1}}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-group-container{padding:.4rem calc(0.4rem*2) .4rem calc(0.4rem/2);margin:0}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-container{display:flex;width:unset;flex:unset;flex-wrap:wrap;column-gap:calc(var(--mg-inputs-spacer)*1.2)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-container-list{display:flex;flex-flow:row wrap;gap:calc(0.4rem*1);padding:0;margin:0;list-style:none}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__sections{display:flex;flex-flow:column nowrap;gap:calc(0.4rem*0);max-height:80vh;padding-right:1rem;overflow-y:auto}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__section-header{display:flex;flex-flow:row wrap;gap:calc(0.4rem*2);min-height:var(--default-size);flex-wrap:nowrap;align-items:center;text-wrap:nowrap}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__section-header-tootlip{display:inline-block;width:auto;height:auto;margin:0}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__section-header-title{display:inline;margin:0;color:hsl(var(--mg-color-dark-40-hsl))}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__section-header-title-label{font-size:var(--font-size)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__section-header-title--static.mg-c-input__section-header-title{margin:0 1.1rem}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-value{display:inline-flex;min-width:var(--default-size);min-height:var(--default-size);box-sizing:border-box;align-items:center;justify-content:center;padding:calc((var(--default-size) - .2rem - var(--font-size)*var(--line-height))/2) 1.1rem;border-radius:.3rem;background-color:hsl(var(--mg-color-dark-5-hsl));font-size:var(--font-size)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__content{display:flex;flex-flow:column nowrap;gap:calc(0.4rem*2)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-group{margin-left:calc(0.4rem*2)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-no-result{text-align:center}.mg-c-input.mg-c-input--checkbox-multi.mg-c-input--with-values .mg-c-input__input-container{gap:.4rem}.mg-c-input.mg-c-input--checkbox-multi.mg-c-input--search-mode .mg-c-input__content{width:37rem;height:40rem}.mg-c-input.mg-c-input--checkbox-multi:not(.mg-c-input--label-on-top) mg-tooltip:not(.mg-c-input__section-header-tootlip){margin-left:var(--mg-inputs-spacer)}.mg-c-input.mg-c-input--checkbox-multi mg-popover{--mg-popover-min-width:7rem;--mg-card-padding:calc(0.4rem * 2)}.mg-c-input.mg-c-input--checkbox-multi mg-input-text{--mg-inputs-margin-bottom:0}";
@@ -1375,7 +1376,11 @@ const MgInputCheckbox = class {
1375
1376
  /**
1376
1377
  * Handle blur event
1377
1378
  */
1378
- this.handleBlur = () => {
1379
+ this.handleBlur = (event) => {
1380
+ if (this.handlerInProgress === Handler.MOUSEENTER) {
1381
+ event.preventDefault();
1382
+ return;
1383
+ }
1379
1384
  // set guard
1380
1385
  this.handlerInProgress = Handler.BLUR;
1381
1386
  // Check validity
@@ -1424,6 +1429,18 @@ const MgInputCheckbox = class {
1424
1429
  });
1425
1430
  this.updateValues();
1426
1431
  };
1432
+ /**
1433
+ * Handle input label mouseenter event
1434
+ */
1435
+ this.handleMouseEnter = () => {
1436
+ this.handlerInProgress = Handler.MOUSEENTER;
1437
+ };
1438
+ /**
1439
+ * Handle input label leave event
1440
+ */
1441
+ this.handleMouseLeave = () => {
1442
+ this.handlerInProgress = undefined;
1443
+ };
1427
1444
  /**
1428
1445
  * Update values
1429
1446
  */
@@ -1432,6 +1449,8 @@ const MgInputCheckbox = class {
1432
1449
  delete o._handleBlur;
1433
1450
  delete o._handleInput;
1434
1451
  delete o._handleKeydown;
1452
+ delete o._handleMouseEnter;
1453
+ delete o._handleMouseLeave;
1435
1454
  delete o._id;
1436
1455
  return o;
1437
1456
  });
@@ -1445,7 +1464,7 @@ const MgInputCheckbox = class {
1445
1464
  * Method to update searchResults
1446
1465
  */
1447
1466
  this.updateSearchResults = () => {
1448
- this.searchResults = this.checkboxItems.filter(item => index$1.Ue(item.title).includes(index$1.Ue(this.searchValue)));
1467
+ this.searchResults = this.checkboxItems.filter(item => index$1.qe(item.title).includes(index$1.qe(this.searchValue)));
1449
1468
  };
1450
1469
  /**
1451
1470
  * Method to validate if one of inputs value is checked id required
@@ -1519,7 +1538,7 @@ const MgInputCheckbox = class {
1519
1538
  this.helpText = undefined;
1520
1539
  this.valid = undefined;
1521
1540
  this.invalid = undefined;
1522
- this.classCollection = new index$1.Oe([this.baseClassName, classFieldset]);
1541
+ this.classCollection = new index$1.He([this.baseClassName, classFieldset]);
1523
1542
  this.errorMessage = undefined;
1524
1543
  this.checkboxItems = [];
1525
1544
  this.displaySearchInput = undefined;
@@ -1529,7 +1548,7 @@ const MgInputCheckbox = class {
1529
1548
  }
1530
1549
  validateValue(newValue) {
1531
1550
  if (isCheckboxItems(newValue)) {
1532
- this.checkboxItems = newValue.map((item, index) => (Object.assign(Object.assign({}, item), { _id: `${this.identifier}_${index}`, _handleInput: this.handleInput.bind(this), _handleBlur: this.handleBlur.bind(this), _handleKeydown: this.handleKeydown.bind(this) })));
1551
+ this.checkboxItems = newValue.map((item, index) => (Object.assign(Object.assign({}, item), { _id: `${this.identifier}_${index}`, _handleInput: this.handleInput.bind(this), _handleBlur: this.handleBlur.bind(this), _handleKeydown: this.handleKeydown.bind(this), _handleMouseEnter: this.handleMouseEnter.bind(this), _handleMouseLeave: this.handleMouseLeave.bind(this) })));
1533
1552
  this.valueChange.emit(newValue);
1534
1553
  }
1535
1554
  else {
@@ -1627,7 +1646,7 @@ const MgInputCheckbox = class {
1627
1646
  if (typeof valid !== 'boolean') {
1628
1647
  throw new Error('<mg-input-checkbox> method "setError()" param "valid" must be a boolean');
1629
1648
  }
1630
- else if (!index$1.Ne(errorMessage)) {
1649
+ else if (!index$1.Ie(errorMessage)) {
1631
1650
  throw new Error('<mg-input-checkbox> method "setError()" param "errorMessage" must be a string');
1632
1651
  }
1633
1652
  else {
@@ -1740,7 +1759,7 @@ const MgInputCheckbox = class {
1740
1759
  * @returns HTML Element
1741
1760
  */
1742
1761
  render() {
1743
- return (index.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 ? (index.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())));
1762
+ return (index.h("mg-input", { key: '619a108d13b49c7b74dded7afa759202aa909abb', 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 ? (index.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())));
1744
1763
  }
1745
1764
  get element() { return index.getElement(this); }
1746
1765
  static get watchers() { return {
@@ -1890,7 +1909,7 @@ const MgInputDate = class {
1890
1909
  * @param value - value to test
1891
1910
  * @returns truthy when value match the pattern
1892
1911
  */
1893
- this.isValidPattern = (value) => index$1.Ne(value) && index$1.ge.test(value);
1912
+ this.isValidPattern = (value) => index$1.Ie(value) && index$1.he.test(value);
1894
1913
  /**
1895
1914
  * Format help text to display
1896
1915
  * @param helpText - help text format
@@ -1898,10 +1917,10 @@ const MgInputDate = class {
1898
1917
  */
1899
1918
  this.formatHelpText = (helpText) => {
1900
1919
  const defaultHelpTextVariable = '{defaultHelpText}';
1901
- let text = index$1.Ne(helpText) ? helpText : this.messages.input.date.helpText;
1920
+ let text = index$1.Ie(helpText) ? helpText : this.messages.input.date.helpText;
1902
1921
  if (text.includes(defaultHelpTextVariable))
1903
1922
  text = text.replace(defaultHelpTextVariable, this.formatHelpText(this.messages.input.date.helpText));
1904
- return text.replace('{pattern}', this.renderPattern()).replace('{date}', index$1.pe(index$1.ze(new Date('2023-12-24')), this.systemLocale));
1923
+ return text.replace('{pattern}', this.renderPattern()).replace('{date}', index$1.ye(index$1.Ze(new Date('2023-12-24')), this.systemLocale));
1905
1924
  };
1906
1925
  /**
1907
1926
  * Handle input event
@@ -1993,8 +2012,8 @@ const MgInputDate = class {
1993
2012
  // min, max & minMax
1994
2013
  else if ([InputError$1.MIN, InputError$1.MAX, InputError$1.MINMAX].includes(inputError)) {
1995
2014
  this.errorMessage = this.messages.errors.date[inputError]
1996
- .replace('{min}', index$1.pe(this.min, this.systemLocale))
1997
- .replace('{max}', index$1.pe(this.max, this.systemLocale));
2015
+ .replace('{min}', index$1.ye(this.min, this.systemLocale))
2016
+ .replace('{max}', index$1.ye(this.max, this.systemLocale));
1998
2017
  }
1999
2018
  // wrong date format
2000
2019
  // element.validity.badInput is default error message
@@ -2008,7 +2027,7 @@ const MgInputDate = class {
2008
2027
  * @returns translated html pattern
2009
2028
  */
2010
2029
  this.renderPattern = () => {
2011
- let patternLocal = index$1.We(this.systemLocale);
2030
+ let patternLocal = index$1.Qe(this.systemLocale);
2012
2031
  for (const key in this.messages.input.date.pattern) {
2013
2032
  patternLocal = patternLocal.replace(key, this.messages.input.date.pattern[key]);
2014
2033
  }
@@ -2030,7 +2049,7 @@ const MgInputDate = class {
2030
2049
  this.helpText = undefined;
2031
2050
  this.valid = undefined;
2032
2051
  this.invalid = undefined;
2033
- this.classCollection = new index$1.Oe(['mg-c-input--date']);
2052
+ this.classCollection = new index$1.He(['mg-c-input--date']);
2034
2053
  this.errorMessage = undefined;
2035
2054
  }
2036
2055
  validateValue(newValue) {
@@ -2038,7 +2057,7 @@ const MgInputDate = class {
2038
2057
  if (newValue === '')
2039
2058
  newValue = null;
2040
2059
  // check value validity
2041
- if (newValue && !index$1.Ne(newValue)) {
2060
+ if (newValue && !index$1.Ie(newValue)) {
2042
2061
  throw new Error("<mg-input-date> props 'value' must be a valid string");
2043
2062
  }
2044
2063
  else if (!newValue || (newValue && this.isValidPattern(newValue))) {
@@ -2095,7 +2114,7 @@ const MgInputDate = class {
2095
2114
  if (typeof valid !== 'boolean') {
2096
2115
  throw new Error('<mg-input-date> method "setError()" param "valid" must be a boolean');
2097
2116
  }
2098
- else if (!index$1.Ne(errorMessage)) {
2117
+ else if (!index$1.Ie(errorMessage)) {
2099
2118
  throw new Error('<mg-input-date> method "setError()" param "errorMessage" must be a string');
2100
2119
  }
2101
2120
  else {
@@ -2149,7 +2168,7 @@ const MgInputDate = class {
2149
2168
  * @returns HTML Element
2150
2169
  */
2151
2170
  render() {
2152
- return (index.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: index$1.pe(this.value, this.locale), tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, index.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) => {
2171
+ return (index.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: index$1.ye(this.value, this.locale), tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, index.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) => {
2153
2172
  if (el !== null)
2154
2173
  this.input = el;
2155
2174
  } })));
@@ -2280,9 +2299,9 @@ const MgInputNumeric = class {
2280
2299
  this.formatValue = (value) => {
2281
2300
  switch (this.format) {
2282
2301
  case 'number':
2283
- return index$1.we(value, this.locale, this.type === 'decimal' ? this.decimalLength : undefined);
2302
+ return index$1.Ye(value, this.locale, this.type === 'decimal' ? this.decimalLength : undefined);
2284
2303
  case 'currency':
2285
- return index$1.qe(value, this.locale, this.currency);
2304
+ return index$1.Je(value, this.locale, this.currency);
2286
2305
  case 'none':
2287
2306
  return value.toString();
2288
2307
  }
@@ -2319,7 +2338,7 @@ const MgInputNumeric = class {
2319
2338
  this.decimalLength = 2;
2320
2339
  this.valid = undefined;
2321
2340
  this.invalid = undefined;
2322
- this.classCollection = new index$1.Oe(['mg-c-input--numeric']);
2341
+ this.classCollection = new index$1.He(['mg-c-input--numeric']);
2323
2342
  this.errorMessage = undefined;
2324
2343
  this.hasFocus = undefined;
2325
2344
  }
@@ -2415,7 +2434,7 @@ const MgInputNumeric = class {
2415
2434
  if (typeof valid !== 'boolean') {
2416
2435
  throw new Error('<mg-input-numeric> method "setError()" param "valid" must be a boolean');
2417
2436
  }
2418
- else if (!index$1.Ne(errorMessage)) {
2437
+ else if (!index$1.Ie(errorMessage)) {
2419
2438
  throw new Error('<mg-input-numeric> method "setError()" param "errorMessage" must be a string');
2420
2439
  }
2421
2440
  else {
@@ -2607,7 +2626,7 @@ const MgInputPassword = class {
2607
2626
  this.helpText = undefined;
2608
2627
  this.valid = undefined;
2609
2628
  this.invalid = undefined;
2610
- this.classCollection = new index$1.Oe(['mg-c-input--password']);
2629
+ this.classCollection = new index$1.He(['mg-c-input--password']);
2611
2630
  this.errorMessage = undefined;
2612
2631
  this.displayPassword = false;
2613
2632
  }
@@ -2665,7 +2684,7 @@ const MgInputPassword = class {
2665
2684
  if (typeof valid !== 'boolean') {
2666
2685
  throw new Error('<mg-input-password> method "setError()" param "valid" must be a boolean');
2667
2686
  }
2668
- else if (!index$1.Ne(errorMessage)) {
2687
+ else if (!index$1.Ie(errorMessage)) {
2669
2688
  throw new Error('<mg-input-password> method "setError()" param "errorMessage" must be a string');
2670
2689
  }
2671
2690
  else {
@@ -2812,7 +2831,7 @@ const MgInputRadio = class {
2812
2831
  this.helpText = undefined;
2813
2832
  this.valid = undefined;
2814
2833
  this.invalid = undefined;
2815
- this.classCollection = new index$1.Oe(['mg-c-input--radio', classFieldset]);
2834
+ this.classCollection = new index$1.He(['mg-c-input--radio', classFieldset]);
2816
2835
  this.errorMessage = undefined;
2817
2836
  this.options = undefined;
2818
2837
  }
@@ -2825,7 +2844,7 @@ const MgInputRadio = class {
2825
2844
  throw new Error('<mg-input-radio> prop "items" require at least 2 items.');
2826
2845
  }
2827
2846
  // String array
2828
- else if (index$1.Fe(newValue)) {
2847
+ else if (index$1.Pe(newValue)) {
2829
2848
  this.options = newValue.map(item => ({ title: item, value: item, disabled: this.disabled }));
2830
2849
  }
2831
2850
  // Object array
@@ -2884,7 +2903,7 @@ const MgInputRadio = class {
2884
2903
  if (typeof valid !== 'boolean') {
2885
2904
  throw new Error('<mg-input-radio> method "setError()" param "valid" must be a boolean');
2886
2905
  }
2887
- else if (!index$1.Ne(errorMessage)) {
2906
+ else if (!index$1.Ie(errorMessage)) {
2888
2907
  throw new Error('<mg-input-radio> method "setError()" param "errorMessage" must be a string');
2889
2908
  }
2890
2909
  else {
@@ -3031,7 +3050,7 @@ const MgInputSelect = class {
3031
3050
  if (this.input.value === '') {
3032
3051
  this.setValue(null);
3033
3052
  }
3034
- else if (index$1.Fe(this.items) && this.items.includes(this.input.value)) {
3053
+ else if (index$1.Pe(this.items) && this.items.includes(this.input.value)) {
3035
3054
  this.setValue(this.input.value);
3036
3055
  }
3037
3056
  else if (allItemsAreOptions(this.items) && typeof this.input.value === 'string' && this.items.some(this.isInputValue)) {
@@ -3105,7 +3124,7 @@ const MgInputSelect = class {
3105
3124
  this.helpText = undefined;
3106
3125
  this.valid = undefined;
3107
3126
  this.invalid = undefined;
3108
- this.classCollection = new index$1.Oe(['mg-c-input--select']);
3127
+ this.classCollection = new index$1.He(['mg-c-input--select']);
3109
3128
  this.errorMessage = undefined;
3110
3129
  this.options = undefined;
3111
3130
  this.valueExist = undefined;
@@ -3113,7 +3132,7 @@ const MgInputSelect = class {
3113
3132
  }
3114
3133
  validateValue(newValue) {
3115
3134
  var _a, _b;
3116
- if (index$1.Fe(this.items) && typeof newValue === 'string') {
3135
+ if (index$1.Pe(this.items) && typeof newValue === 'string') {
3117
3136
  this.readonlyValue = ((_a = this.input) === null || _a === void 0 ? void 0 : _a.value) ? this.input.value : newValue;
3118
3137
  }
3119
3138
  else if (allItemsAreOptions(this.items)) {
@@ -3130,7 +3149,7 @@ const MgInputSelect = class {
3130
3149
  this.options = [];
3131
3150
  }
3132
3151
  // String array
3133
- else if (index$1.Fe(newValue)) {
3152
+ else if (index$1.Pe(newValue)) {
3134
3153
  if (typeof this.value === 'string')
3135
3154
  this.valueExist = newValue.includes(this.value);
3136
3155
  this.options = newValue.map(item => ({ title: item, value: item }));
@@ -3202,7 +3221,7 @@ const MgInputSelect = class {
3202
3221
  if (typeof valid !== 'boolean') {
3203
3222
  throw new Error('<mg-input-select> method "setError()" param "valid" must be a boolean');
3204
3223
  }
3205
- else if (!index$1.Ne(errorMessage)) {
3224
+ else if (!index$1.Ie(errorMessage)) {
3206
3225
  throw new Error('<mg-input-select> method "setError()" param "errorMessage" must be a string');
3207
3226
  }
3208
3227
  else {
@@ -3314,7 +3333,7 @@ const MgInputText = class {
3314
3333
  */
3315
3334
  this.handleFocus = () => {
3316
3335
  this.classCollection.add(this.classFocus);
3317
- this.classCollection = new index$1.Oe(this.classCollection.classes);
3336
+ this.classCollection = new index$1.He(this.classCollection.classes);
3318
3337
  };
3319
3338
  /**
3320
3339
  * Handle blur event
@@ -3322,7 +3341,7 @@ const MgInputText = class {
3322
3341
  this.handleBlur = () => {
3323
3342
  // Manage focus
3324
3343
  this.classCollection.delete(this.classFocus);
3325
- this.classCollection = new index$1.Oe(this.classCollection.classes);
3344
+ this.classCollection = new index$1.He(this.classCollection.classes);
3326
3345
  // Display Error
3327
3346
  this.handlerInProgress = Handler.BLUR;
3328
3347
  this.displayError().finally(() => {
@@ -3397,7 +3416,7 @@ const MgInputText = class {
3397
3416
  this.helpText = undefined;
3398
3417
  this.valid = undefined;
3399
3418
  this.invalid = undefined;
3400
- this.classCollection = new index$1.Oe(['mg-c-input--text']);
3419
+ this.classCollection = new index$1.He(['mg-c-input--text']);
3401
3420
  this.errorMessage = undefined;
3402
3421
  }
3403
3422
  handleValue(newValue) {
@@ -3448,7 +3467,7 @@ const MgInputText = class {
3448
3467
  this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);
3449
3468
  }
3450
3469
  validatePattern(newValue) {
3451
- if (newValue !== undefined && !(index$1.Ne(this.pattern) && index$1.Ne(this.patternErrorMessage))) {
3470
+ if (newValue !== undefined && !(index$1.Ie(this.pattern) && index$1.Ie(this.patternErrorMessage))) {
3452
3471
  throw new Error('<mg-input-text> props "pattern" and "patternErrorMessage" must be non-empty string and paired.');
3453
3472
  }
3454
3473
  }
@@ -3478,7 +3497,7 @@ const MgInputText = class {
3478
3497
  if (typeof valid !== 'boolean') {
3479
3498
  throw new Error('<mg-input-text> method "setError()" param "valid" must be a boolean');
3480
3499
  }
3481
- else if (!index$1.Ne(errorMessage)) {
3500
+ else if (!index$1.Ie(errorMessage)) {
3482
3501
  throw new Error('<mg-input-text> method "setError()" param "errorMessage" must be a string');
3483
3502
  }
3484
3503
  else {
@@ -3587,7 +3606,7 @@ const MgInputTextarea = class {
3587
3606
  */
3588
3607
  this.handleFocus = () => {
3589
3608
  this.classCollection.add(this.classFocus);
3590
- this.classCollection = new index$1.Oe(this.classCollection.classes);
3609
+ this.classCollection = new index$1.He(this.classCollection.classes);
3591
3610
  };
3592
3611
  /**
3593
3612
  * Handle blur event
@@ -3595,7 +3614,7 @@ const MgInputTextarea = class {
3595
3614
  this.handleBlur = () => {
3596
3615
  // Manage focus
3597
3616
  this.classCollection.delete(this.classFocus);
3598
- this.classCollection = new index$1.Oe(this.classCollection.classes);
3617
+ this.classCollection = new index$1.He(this.classCollection.classes);
3599
3618
  // Display Error
3600
3619
  this.handlerInProgress = Handler.BLUR;
3601
3620
  this.displayError().finally(() => {
@@ -3658,7 +3677,7 @@ const MgInputTextarea = class {
3658
3677
  this.valid = undefined;
3659
3678
  this.invalid = undefined;
3660
3679
  this.resizable = 'none';
3661
- this.classCollection = new index$1.Oe(['mg-c-input--textarea']);
3680
+ this.classCollection = new index$1.He(['mg-c-input--textarea']);
3662
3681
  this.errorMessage = undefined;
3663
3682
  }
3664
3683
  handleValue(newValue) {
@@ -3697,7 +3716,7 @@ const MgInputTextarea = class {
3697
3716
  this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);
3698
3717
  }
3699
3718
  validatePattern(newValue) {
3700
- if (newValue !== undefined && !(index$1.Ne(this.pattern) && index$1.Ne(this.patternErrorMessage))) {
3719
+ if (newValue !== undefined && !(index$1.Ie(this.pattern) && index$1.Ie(this.patternErrorMessage))) {
3701
3720
  throw new Error('<mg-input-textarea> props "pattern" and "patternErrorMessage" must be non-empty string and paired.');
3702
3721
  }
3703
3722
  }
@@ -3729,7 +3748,7 @@ const MgInputTextarea = class {
3729
3748
  if (typeof valid !== 'boolean') {
3730
3749
  throw new Error('<mg-input-textarea> method "setError()" param "valid" must be a boolean');
3731
3750
  }
3732
- else if (!index$1.Ne(errorMessage)) {
3751
+ else if (!index$1.Ie(errorMessage)) {
3733
3752
  throw new Error('<mg-input-textarea> method "setError()" param "errorMessage" must be a string');
3734
3753
  }
3735
3754
  else {
@@ -3818,7 +3837,7 @@ const MgInputTitle = class {
3818
3837
  this.tagName = 'label';
3819
3838
  }
3820
3839
  validateIdentifier(newValue) {
3821
- if (!index$1.Ne(newValue)) {
3840
+ if (!index$1.Ie(newValue)) {
3822
3841
  throw new Error('<mg-input-title> prop "identifier" is required.');
3823
3842
  }
3824
3843
  }
@@ -3932,7 +3951,7 @@ const MgInputToggle = class {
3932
3951
  this.tooltip = undefined;
3933
3952
  this.tooltipPosition = 'input';
3934
3953
  this.helpText = undefined;
3935
- this.classCollection = new index$1.Oe(['mg-c-input--toggle']);
3954
+ this.classCollection = new index$1.He(['mg-c-input--toggle']);
3936
3955
  this.options = undefined;
3937
3956
  this.errorMessage = undefined;
3938
3957
  this.valid = undefined;
@@ -3949,7 +3968,7 @@ const MgInputToggle = class {
3949
3968
  throw new Error('<mg-input-toggle> prop "items" require 2 items.');
3950
3969
  }
3951
3970
  // String array
3952
- else if (index$1.Fe(newValue)) {
3971
+ else if (index$1.Pe(newValue)) {
3953
3972
  this.options = newValue.map(item => ({ title: item, value: item }));
3954
3973
  }
3955
3974
  // Object array
@@ -4005,7 +4024,7 @@ const MgInputToggle = class {
4005
4024
  if (typeof valid !== 'boolean') {
4006
4025
  throw new Error('<mg-input-toggle> method "setError()" param "valid" must be a boolean');
4007
4026
  }
4008
- else if (!index$1.Ne(errorMessage)) {
4027
+ else if (!index$1.Ie(errorMessage)) {
4009
4028
  throw new Error('<mg-input-toggle> method "setError()" param "errorMessage" must be a string');
4010
4029
  }
4011
4030
  else {
@@ -4251,7 +4270,7 @@ const MgItemMore = class {
4251
4270
  navElement.click();
4252
4271
  });
4253
4272
  // add id suffix to prevent duplicate key. default html id is: '';
4254
- if (index$1.Ne(proxy.id))
4273
+ if (index$1.Ie(proxy.id))
4255
4274
  proxy.id = `${proxy.id}-proxy`;
4256
4275
  // update properties and DOM when proxyfied item is updated
4257
4276
  proxified.addEventListener('item-updated', (event) => {
@@ -4281,7 +4300,7 @@ const MgItemMore = class {
4281
4300
  this.slotlabel.label = this.messages.menuLabel;
4282
4301
  }
4283
4302
  validateSize(newValue) {
4284
- if (newValue && typeof newValue !== 'string')
4303
+ if (newValue && !sizes$2.includes(newValue))
4285
4304
  throw new Error(`<${this.name}> prop "size" must match MgItemMore['size'] type.`);
4286
4305
  }
4287
4306
  /*************
@@ -4330,10 +4349,10 @@ const MgItemMore = class {
4330
4349
  * @returns HTML Element
4331
4350
  */
4332
4351
  render() {
4333
- return (index.h(index.Host, { key: '18e3ecec55a7078662bdb04ba6325a4d44ff1c78', role: "listitem" }, this.parentMenu && (index.h("mg-menu-item", { key: 'e04f4b62b1ce70eeae25f959ef6aeca2e4a2690d', "data-overflow-more": true, "data-size": this.parentMenu.size, ref: el => {
4352
+ return (index.h(index.Host, { key: 'b490696ded183a1db05673b3e9ba9744ee134382', role: "listitem" }, this.parentMenu && (index.h("mg-menu-item", { key: '6f8b1967da50e77d87355cedde8aeb2327ddd0ab', "data-overflow-more": true, "data-size": this.parentMenu.size, ref: el => {
4334
4353
  if (el)
4335
4354
  this.moreElementMenuItem = el;
4336
- } }, index.h("mg-icon", { key: '8f20ef688479578ebee9eabb63644837e1d45113', icon: this.icon.icon, slot: "image" }), index.h("span", { key: '7a4f08410d1e85682a8c3e1935525c418a4141de', class: { 'mg-u-visually-hidden': !this.slotlabel.display }, slot: "label" }, this.slotlabel.label), index.h("mg-menu", { key: 'f67f53d289cf65883a3534f17fb2baaa91314a66', direction: Direction.VERTICAL, label: this.messages.menuLabel, size: this.size })))));
4355
+ } }, index.h("mg-icon", { key: 'ddcf120831d42bc6cb9b8e147abac9ba7cbeedb6', icon: this.icon.icon, size: this.size, slot: "image" }), index.h("span", { key: 'fae667ee2f6ac8f4d4f85c5a8db91dede3f470e6', class: { 'mg-u-visually-hidden': !this.slotlabel.display }, slot: "label" }, this.slotlabel.label), index.h("mg-menu", { key: '912d544f80b84b4cffa28517ffbc91d60792a460', direction: Direction.VERTICAL, label: this.messages.menuLabel, size: this.size })))));
4337
4356
  }
4338
4357
  get element() { return index.getElement(this); }
4339
4358
  static get watchers() { return {
@@ -4369,16 +4388,11 @@ const MgMenu = class {
4369
4388
  item.expanded = false;
4370
4389
  }
4371
4390
  };
4372
- /**
4373
- * get mg-item-more element
4374
- * @returns mg-item-more element
4375
- */
4376
- this.getItemMore = () => this.element.querySelector('mg-item-more');
4377
4391
  /**
4378
4392
  * get mg-item-more child mg-menu-item element
4379
4393
  * @returns mg-menu-item element
4380
4394
  */
4381
- this.getItemMoreMenuItem = () => { var _a, _b; return (_b = (_a = this.getItemMore()) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('mg-menu-item'); };
4395
+ this.getItemMoreMenuItem = () => { var _a, _b; return (_b = (_a = this.itemMoreElement) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('mg-menu-item'); };
4382
4396
  /**
4383
4397
  * Set item listend
4384
4398
  * @param item - mg-menu-item element
@@ -4414,20 +4428,25 @@ const MgMenu = class {
4414
4428
  * render mg-item-more
4415
4429
  */
4416
4430
  this.renderMgItemMore = () => {
4417
- if (this.direction !== Direction.HORIZONTAL || this.isChildMenu) {
4431
+ if (this.direction !== Direction.HORIZONTAL || this.isChildMenu || this.element.children.length <= 1) {
4418
4432
  return;
4419
4433
  }
4420
- // /!\ externalise item tag name to get a string type and bypass type checking when value is used in next createElement
4421
- // by doing this we prevent stencil to generate a circular dependencies graph at build time with mg-item-more component.
4422
- let mgItemMore = this.getItemMore();
4423
- if (!mgItemMore) {
4424
- mgItemMore = document.createElement('mg-item-more');
4425
- mgItemMore.addEventListener('item-loaded', this.handleItemLoaded);
4426
- Object.assign(mgItemMore, this.itemmore || {});
4427
- this.element.appendChild(mgItemMore);
4434
+ // Insert mg-item-more outside the mg-menu shadowdom
4435
+ if (!this.itemMoreElement) {
4436
+ this.itemMoreElement = document.createElement('mg-item-more');
4437
+ this.itemMoreElement.addEventListener('item-loaded', this.handleItemLoaded);
4438
+ this.element.appendChild(this.itemMoreElement);
4428
4439
  }
4429
- else {
4430
- Object.defineProperties(mgItemMore, this.itemmore || {});
4440
+ // update mg-item-more props
4441
+ for (const attribute in this.itemmore) {
4442
+ const newValue = this.itemmore[attribute];
4443
+ // to improve rendering we use HTML attributes as much as possible
4444
+ if (['string', 'number'].includes(typeof newValue)) {
4445
+ this.itemMoreElement.setAttribute(attribute, newValue);
4446
+ }
4447
+ else {
4448
+ this.itemMoreElement[attribute] = newValue;
4449
+ }
4431
4450
  }
4432
4451
  };
4433
4452
  this.label = undefined;
@@ -4450,6 +4469,9 @@ const MgMenu = class {
4450
4469
  if (newValue !== undefined && this.direction !== Direction.HORIZONTAL) {
4451
4470
  throw new Error(`<${this.name}> prop "itemmore" must be paired with direction ${Direction.HORIZONTAL}.`);
4452
4471
  }
4472
+ else if (newValue) {
4473
+ this.renderMgItemMore();
4474
+ }
4453
4475
  }
4454
4476
  validateSize(newValue) {
4455
4477
  if (!sizes$2.includes(newValue)) {
@@ -4500,7 +4522,7 @@ const MgMenu = class {
4500
4522
  * @returns HTML Element
4501
4523
  */
4502
4524
  render() {
4503
- return (index.h(index.Host, { key: 'a5fe4a1a61b4255cc9a06217f30ef2f154fd797d', role: "list", "aria-label": this.label }, index.h("slot", { key: '37de5388d1cca3fa46dfbb73ab26ba6e299940b5' })));
4525
+ return (index.h(index.Host, { key: 'a29897d754b7cbb34cc8d63b5ecb025c0d252e12', role: "list", "aria-label": this.label }, index.h("slot", { key: '7fc9dbd765f529e17f0c7ca2012d1b6bf86a05d9' })));
4504
4526
  }
4505
4527
  get element() { return index.getElement(this); }
4506
4528
  static get watchers() { return {
@@ -4512,7 +4534,7 @@ const MgMenu = class {
4512
4534
  };
4513
4535
  MgMenu.style = MgMenuStyle0;
4514
4536
 
4515
- const mgMenuItemCss = ".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-menu-item.mg-c-menu-item--size-regular .mg-c-menu-item__navigation-button,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular{height:3.8rem;padding:1rem 2rem}.mg-c-menu-item.mg-c-menu-item--size-regular .mg-c-menu-item__navigation-button,.mg-c-menu-item.mg-c-menu-item--size-regular .mg-c-menu-item__navigation-button ::slotted([slot=label]),.mg-c-menu-item.mg-c-menu-item--size-regular .mg-c-menu-item__navigation-button ::slotted([slot=metadata]),.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular ::slotted([slot=label]),.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular ::slotted([slot=metadata]){font-size:var(--font-size)}.mg-c-menu-item.mg-c-menu-item--size-regular .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--horizontal,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular.mg-c-menu-item__navigation-button--horizontal{padding-bottom:calc(1rem - 0.3rem)}.mg-c-menu-item.mg-c-menu-item--size-regular .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--vertical,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular.mg-c-menu-item__navigation-button--vertical{padding-left:calc(2rem - 0.3rem)}.mg-c-menu-item.mg-c-menu-item--size-medium .mg-c-menu-item__navigation-button,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{height:5.1rem;padding:1rem 3rem}.mg-c-menu-item.mg-c-menu-item--size-medium .mg-c-menu-item__navigation-button,.mg-c-menu-item.mg-c-menu-item--size-medium .mg-c-menu-item__navigation-button ::slotted([slot=label]),.mg-c-menu-item.mg-c-menu-item--size-medium .mg-c-menu-item__navigation-button ::slotted([slot=metadata]),.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium ::slotted([slot=label]),.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium ::slotted([slot=metadata]){font-size:calc(var(--font-size) + .2rem)}.mg-c-menu-item.mg-c-menu-item--size-medium .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--horizontal,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium.mg-c-menu-item__navigation-button--horizontal{padding-bottom:calc(1rem - 0.3rem)}.mg-c-menu-item.mg-c-menu-item--size-medium .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--vertical,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium.mg-c-menu-item__navigation-button--vertical{padding-left:calc(3rem - 0.3rem)}.mg-c-menu-item.mg-c-menu-item--size-large .mg-c-menu-item__navigation-button,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{height:7.1rem;padding:1rem 4rem}.mg-c-menu-item.mg-c-menu-item--size-large .mg-c-menu-item__navigation-button,.mg-c-menu-item.mg-c-menu-item--size-large .mg-c-menu-item__navigation-button ::slotted([slot=label]),.mg-c-menu-item.mg-c-menu-item--size-large .mg-c-menu-item__navigation-button ::slotted([slot=metadata]),.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large ::slotted([slot=label]),.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large ::slotted([slot=metadata]){font-size:calc(var(--font-size) + .2rem)}.mg-c-menu-item.mg-c-menu-item--size-large .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--horizontal,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large.mg-c-menu-item__navigation-button--horizontal{padding-bottom:calc(1rem - 0.3rem)}.mg-c-menu-item.mg-c-menu-item--size-large .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--vertical,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large.mg-c-menu-item__navigation-button--vertical{padding-left:calc(4rem - 0.3rem)}.mg-c-menu-item__navigation-button{display:flex;box-sizing:border-box;align-items:center;border:none;background-color:unset;color:hsl(var(--mg-menu-item-color-hsl, var(--color-dark)));column-gap:var(--mg-menu-item-navigation-button-column-gap, 1rem);cursor:pointer;font-family:var(--font-family);font-weight:400;line-height:var(--line-height);text-decoration:none;white-space:nowrap}.mg-c-menu-item__navigation-button:disabled,.mg-c-menu-item__navigation-button--disabled{cursor:default;opacity:var(--mg-disabled-opacity)}.mg-c-menu-item__navigation-button:focus-visible{z-index:10}.mg-c-menu-item__navigation-button:hover:not(.mg-c-menu-item__navigation-button--disabled),.mg-c-menu-item__navigation-button:focus-visible:not(.mg-c-menu-item__navigation-button--disabled){background-color:hsl(var(--mg-menu-item-focused-background-color-hsl)/10%)}.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--active{color:hsl(var(--mg-menu-item-color-active-hsl));font-weight:600}.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--active.mg-c-menu-item__navigation-button--horizontal{border-bottom-color:hsl(var(--mg-menu-item-border-color-active-hsl))}.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--active.mg-c-menu-item__navigation-button--vertical{border-left-color:hsl(var(--mg-menu-item-border-color-active-hsl))}.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--hidden{display:none}.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--horizontal{border-bottom:.3rem solid rgba(0,0,0,0)}.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--vertical{border-left:.3rem solid rgba(0,0,0,0)}:host([data-style-direction=vertical][data-level=\"1\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular{padding-left:calc(1*2rem - .3rem)}:host([data-level=\"1\"]) .mg-c-menu-item__collapse-container{z-index:calc(1*10)}:host([data-style-direction=vertical][data-level=\"2\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular{padding-left:calc(2*2rem - .3rem)}:host([data-level=\"2\"]) .mg-c-menu-item__collapse-container{z-index:calc(2*10)}:host([data-style-direction=vertical][data-level=\"3\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular{padding-left:calc(3*2rem - .3rem)}:host([data-level=\"3\"]) .mg-c-menu-item__collapse-container{z-index:calc(3*10)}:host([data-style-direction=vertical][data-level=\"4\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular{padding-left:calc(4*2rem - .3rem)}:host([data-level=\"4\"]) .mg-c-menu-item__collapse-container{z-index:calc(4*10)}:host([data-style-direction=vertical][data-level=\"5\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular{padding-left:calc(5*2rem - .3rem)}:host([data-level=\"5\"]) .mg-c-menu-item__collapse-container{z-index:calc(5*10)}:host([data-style-direction=vertical][data-level=\"6\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular{padding-left:calc(6*2rem - .3rem)}:host([data-level=\"6\"]) .mg-c-menu-item__collapse-container{z-index:calc(6*10)}:host([data-style-direction=vertical][data-level=\"1\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{padding-left:calc(1*3rem - .3rem)}:host([data-level=\"1\"]) .mg-c-menu-item__collapse-container{z-index:calc(1*10)}:host([data-style-direction=vertical][data-level=\"2\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{padding-left:calc(2*3rem - .3rem)}:host([data-level=\"2\"]) .mg-c-menu-item__collapse-container{z-index:calc(2*10)}:host([data-style-direction=vertical][data-level=\"3\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{padding-left:calc(3*3rem - .3rem)}:host([data-level=\"3\"]) .mg-c-menu-item__collapse-container{z-index:calc(3*10)}:host([data-style-direction=vertical][data-level=\"4\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{padding-left:calc(4*3rem - .3rem)}:host([data-level=\"4\"]) .mg-c-menu-item__collapse-container{z-index:calc(4*10)}:host([data-style-direction=vertical][data-level=\"5\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{padding-left:calc(5*3rem - .3rem)}:host([data-level=\"5\"]) .mg-c-menu-item__collapse-container{z-index:calc(5*10)}:host([data-style-direction=vertical][data-level=\"6\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{padding-left:calc(6*3rem - .3rem)}:host([data-level=\"6\"]) .mg-c-menu-item__collapse-container{z-index:calc(6*10)}:host([data-style-direction=vertical][data-level=\"1\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{padding-left:calc(1*4rem - .3rem)}:host([data-level=\"1\"]) .mg-c-menu-item__collapse-container{z-index:calc(1*10)}:host([data-style-direction=vertical][data-level=\"2\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{padding-left:calc(2*4rem - .3rem)}:host([data-level=\"2\"]) .mg-c-menu-item__collapse-container{z-index:calc(2*10)}:host([data-style-direction=vertical][data-level=\"3\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{padding-left:calc(3*4rem - .3rem)}:host([data-level=\"3\"]) .mg-c-menu-item__collapse-container{z-index:calc(3*10)}:host([data-style-direction=vertical][data-level=\"4\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{padding-left:calc(4*4rem - .3rem)}:host([data-level=\"4\"]) .mg-c-menu-item__collapse-container{z-index:calc(4*10)}:host([data-style-direction=vertical][data-level=\"5\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{padding-left:calc(5*4rem - .3rem)}:host([data-level=\"5\"]) .mg-c-menu-item__collapse-container{z-index:calc(5*10)}:host([data-style-direction=vertical][data-level=\"6\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{padding-left:calc(6*4rem - .3rem)}:host([data-level=\"6\"]) .mg-c-menu-item__collapse-container{z-index:calc(6*10)}.mg-c-menu-item{max-width:var(--mg-menu-item-navigation-button-max-width)}.mg-c-menu-item__collapse-container{z-index:10;width:max-content}.mg-c-menu-item__navigation-button-center{min-width:0}.mg-c-menu-item__navigation-button-text-content{display:flex;width:100%;align-items:center}.mg-c-menu-item__navigation-button-text-content-notification,.mg-c-menu-item__navigation-button-text-content ::slotted([slot=information]){margin-left:1rem;font-size:var(--font-size)}.mg-c-menu-item__navigation-button-new-tab{margin-left:.6rem}.mg-c-menu-item__navigation-button-chevron{margin-left:auto;transition:200ms}.mg-c-menu-item__navigation-button-chevron--rotate.mg-c-menu-item__navigation-button-chevron{transform:rotate(180deg)}:host{position:relative;display:flex;--mg-popover-padding-vertical:0;--mg-popover-padding-horizontal:0;--mg-popover-max-width:unset}:host([data-style-direction=vertical]){flex-direction:column}:host([data-style-direction=vertical]) .mg-c-menu-item__navigation-button{width:100%}:host([data-style-direction=vertical]) .mg-c-menu-item__collapse-container{position:unset;top:unset;left:unset;width:unset}:host([data-style-direction=vertical]) .mg-c-menu-item-chevron{margin-left:auto}:host([data-overflow-more]){--mg-menu-item-navigation-button-column-gap:0}:host([data-overflow-more]) .mg-c-menu-item__navigation-button-chevron{display:none}:host([data-overflow-more]) .mg-c-menu-item__navigation-button-text-content ::slotted([slot=information]){margin-left:0}:host([data-overflow-more]) ::slotted(mg-menu){--mg-menu-item-navigation-button-column-gap:1rem}:host([data-style-direction=horizontal]) .mg-c-menu-item__collapse-container.mg-c-menu-item__collapse-container--first-level,:host([data-overflow-more]) .mg-c-menu-item__collapse-container.mg-c-menu-item__collapse-container--first-level{background-color:hsl(var(--color-light))}:host([data-style-direction=horizontal]) .mg-c-menu-item__collapse-container.mg-c-menu-item__collapse-container--first-level ::slotted(mg-menu),:host([data-overflow-more]) .mg-c-menu-item__collapse-container.mg-c-menu-item__collapse-container--first-level ::slotted(mg-menu){padding:1rem 0}::slotted([slot=label]),::slotted([slot=metadata]){display:block;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}::slotted(*){display:flex;flex-direction:column}:host([status=disabled]){pointer-events:none}:host([hidden]){display:none}";
4537
+ const mgMenuItemCss = ".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-menu-item.mg-c-menu-item--size-regular .mg-c-menu-item__navigation-button,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular{height:3.8rem;padding:1rem 2rem}.mg-c-menu-item.mg-c-menu-item--size-regular .mg-c-menu-item__navigation-button,.mg-c-menu-item.mg-c-menu-item--size-regular .mg-c-menu-item__navigation-button ::slotted([slot=label]),.mg-c-menu-item.mg-c-menu-item--size-regular .mg-c-menu-item__navigation-button ::slotted([slot=metadata]),.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular ::slotted([slot=label]),.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular ::slotted([slot=metadata]){font-size:var(--font-size)}.mg-c-menu-item.mg-c-menu-item--size-regular .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--horizontal,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular.mg-c-menu-item__navigation-button--horizontal{padding-bottom:calc(1rem - 0.3rem)}.mg-c-menu-item.mg-c-menu-item--size-regular .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--vertical,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular.mg-c-menu-item__navigation-button--vertical{padding-left:calc(2rem - 0.3rem)}.mg-c-menu-item.mg-c-menu-item--size-medium .mg-c-menu-item__navigation-button,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{height:5.1rem;padding:1rem 3rem}.mg-c-menu-item.mg-c-menu-item--size-medium .mg-c-menu-item__navigation-button,.mg-c-menu-item.mg-c-menu-item--size-medium .mg-c-menu-item__navigation-button ::slotted([slot=label]),.mg-c-menu-item.mg-c-menu-item--size-medium .mg-c-menu-item__navigation-button ::slotted([slot=metadata]),.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium ::slotted([slot=label]),.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium ::slotted([slot=metadata]){font-size:calc(var(--font-size) + .2rem)}.mg-c-menu-item.mg-c-menu-item--size-medium .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--horizontal,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium.mg-c-menu-item__navigation-button--horizontal{padding-bottom:calc(1rem - 0.3rem)}.mg-c-menu-item.mg-c-menu-item--size-medium .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--vertical,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium.mg-c-menu-item__navigation-button--vertical{padding-left:calc(3rem - 0.3rem)}.mg-c-menu-item.mg-c-menu-item--size-large .mg-c-menu-item__navigation-button,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{height:7.1rem;padding:1rem 4rem}.mg-c-menu-item.mg-c-menu-item--size-large .mg-c-menu-item__navigation-button,.mg-c-menu-item.mg-c-menu-item--size-large .mg-c-menu-item__navigation-button ::slotted([slot=label]),.mg-c-menu-item.mg-c-menu-item--size-large .mg-c-menu-item__navigation-button ::slotted([slot=metadata]),.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large ::slotted([slot=label]),.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large ::slotted([slot=metadata]){font-size:calc(var(--font-size) + .2rem)}.mg-c-menu-item.mg-c-menu-item--size-large .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--horizontal,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large.mg-c-menu-item__navigation-button--horizontal{padding-bottom:calc(1rem - 0.3rem)}.mg-c-menu-item.mg-c-menu-item--size-large .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--vertical,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large.mg-c-menu-item__navigation-button--vertical{padding-left:calc(4rem - 0.3rem)}.mg-c-menu-item__navigation-button{display:flex;box-sizing:border-box;align-items:center;border:none;background-color:unset;color:hsl(var(--mg-menu-item-color-hsl, var(--color-dark)));column-gap:var(--mg-menu-item-navigation-button-column-gap, 1rem);cursor:pointer;font-family:var(--font-family);font-weight:400;line-height:var(--line-height);text-decoration:none;white-space:nowrap}.mg-c-menu-item__navigation-button:disabled,.mg-c-menu-item__navigation-button--disabled{cursor:default;opacity:var(--mg-disabled-opacity)}.mg-c-menu-item__navigation-button:focus-visible{z-index:10}.mg-c-menu-item__navigation-button:hover:not(.mg-c-menu-item__navigation-button--disabled),.mg-c-menu-item__navigation-button:focus-visible:not(.mg-c-menu-item__navigation-button--disabled){background-color:hsl(var(--mg-menu-item-focused-background-color-hsl)/10%)}.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--active{color:hsl(var(--mg-menu-item-color-active-hsl));font-weight:600}.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--active.mg-c-menu-item__navigation-button--horizontal{border-bottom-color:hsl(var(--mg-menu-item-border-color-active-hsl))}.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--active.mg-c-menu-item__navigation-button--vertical{border-left-color:hsl(var(--mg-menu-item-border-color-active-hsl))}.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--hidden{display:none}.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--horizontal{border-bottom:.3rem solid rgba(0,0,0,0)}.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--vertical{border-left:.3rem solid rgba(0,0,0,0)}:host([data-style-direction=vertical][data-level=\"1\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular{padding-left:calc(1*2rem - .3rem)}:host([data-level=\"1\"]) .mg-c-menu-item__collapse-container{z-index:calc(1*10)}:host([data-style-direction=vertical][data-level=\"2\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular{padding-left:calc(2*2rem - .3rem)}:host([data-level=\"2\"]) .mg-c-menu-item__collapse-container{z-index:calc(2*10)}:host([data-style-direction=vertical][data-level=\"3\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular{padding-left:calc(3*2rem - .3rem)}:host([data-level=\"3\"]) .mg-c-menu-item__collapse-container{z-index:calc(3*10)}:host([data-style-direction=vertical][data-level=\"4\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular{padding-left:calc(4*2rem - .3rem)}:host([data-level=\"4\"]) .mg-c-menu-item__collapse-container{z-index:calc(4*10)}:host([data-style-direction=vertical][data-level=\"5\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular{padding-left:calc(5*2rem - .3rem)}:host([data-level=\"5\"]) .mg-c-menu-item__collapse-container{z-index:calc(5*10)}:host([data-style-direction=vertical][data-level=\"6\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-regular{padding-left:calc(6*2rem - .3rem)}:host([data-level=\"6\"]) .mg-c-menu-item__collapse-container{z-index:calc(6*10)}:host([data-style-direction=vertical][data-level=\"1\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{padding-left:calc(1*3rem - .3rem)}:host([data-level=\"1\"]) .mg-c-menu-item__collapse-container{z-index:calc(1*10)}:host([data-style-direction=vertical][data-level=\"2\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{padding-left:calc(2*3rem - .3rem)}:host([data-level=\"2\"]) .mg-c-menu-item__collapse-container{z-index:calc(2*10)}:host([data-style-direction=vertical][data-level=\"3\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{padding-left:calc(3*3rem - .3rem)}:host([data-level=\"3\"]) .mg-c-menu-item__collapse-container{z-index:calc(3*10)}:host([data-style-direction=vertical][data-level=\"4\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{padding-left:calc(4*3rem - .3rem)}:host([data-level=\"4\"]) .mg-c-menu-item__collapse-container{z-index:calc(4*10)}:host([data-style-direction=vertical][data-level=\"5\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{padding-left:calc(5*3rem - .3rem)}:host([data-level=\"5\"]) .mg-c-menu-item__collapse-container{z-index:calc(5*10)}:host([data-style-direction=vertical][data-level=\"6\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{padding-left:calc(6*3rem - .3rem)}:host([data-level=\"6\"]) .mg-c-menu-item__collapse-container{z-index:calc(6*10)}:host([data-style-direction=vertical][data-level=\"1\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{padding-left:calc(1*4rem - .3rem)}:host([data-level=\"1\"]) .mg-c-menu-item__collapse-container{z-index:calc(1*10)}:host([data-style-direction=vertical][data-level=\"2\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{padding-left:calc(2*4rem - .3rem)}:host([data-level=\"2\"]) .mg-c-menu-item__collapse-container{z-index:calc(2*10)}:host([data-style-direction=vertical][data-level=\"3\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{padding-left:calc(3*4rem - .3rem)}:host([data-level=\"3\"]) .mg-c-menu-item__collapse-container{z-index:calc(3*10)}:host([data-style-direction=vertical][data-level=\"4\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{padding-left:calc(4*4rem - .3rem)}:host([data-level=\"4\"]) .mg-c-menu-item__collapse-container{z-index:calc(4*10)}:host([data-style-direction=vertical][data-level=\"5\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{padding-left:calc(5*4rem - .3rem)}:host([data-level=\"5\"]) .mg-c-menu-item__collapse-container{z-index:calc(5*10)}:host([data-style-direction=vertical][data-level=\"6\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{padding-left:calc(6*4rem - .3rem)}:host([data-level=\"6\"]) .mg-c-menu-item__collapse-container{z-index:calc(6*10)}.mg-c-menu-item{max-width:var(--mg-menu-item-navigation-button-max-width)}.mg-c-menu-item__collapse-container{z-index:10;width:max-content}.mg-c-menu-item__navigation-button-center{min-width:0}.mg-c-menu-item__navigation-button-text-content{display:flex;width:100%;align-items:center}.mg-c-menu-item__navigation-button-text-content-notification,.mg-c-menu-item__navigation-button-text-content ::slotted([slot=information]){margin-left:1rem;font-size:var(--font-size)}.mg-c-menu-item__navigation-button-new-tab{margin-left:.6rem}.mg-c-menu-item__navigation-button-chevron{display:var(--mg-c-menu-item-chevron-display);margin-left:auto;transition:200ms}.mg-c-menu-item__navigation-button-chevron--rotate.mg-c-menu-item__navigation-button-chevron{transform:rotate(180deg)}:host{position:relative;display:flex;--mg-popover-padding-vertical:0;--mg-popover-padding-horizontal:0;--mg-popover-max-width:unset}:host([data-style-direction=vertical]){flex-direction:column}:host([data-style-direction=vertical]) .mg-c-menu-item__navigation-button{width:100%}:host([data-style-direction=vertical]) .mg-c-menu-item__collapse-container{position:unset;top:unset;left:unset;width:unset}:host([data-style-direction=vertical]) .mg-c-menu-item-chevron{margin-left:auto}:host([data-overflow-more]){--mg-menu-item-navigation-button-column-gap:0}:host([data-overflow-more]) .mg-c-menu-item__navigation-button-chevron{--mg-c-menu-item-chevron-display:none}:host([data-overflow-more]) .mg-c-menu-item__navigation-button-text-content ::slotted([slot=information]){margin-left:0}:host([data-overflow-more]) ::slotted(mg-menu){--mg-menu-item-navigation-button-column-gap:1rem}:host([data-style-direction=horizontal]) .mg-c-menu-item__collapse-container.mg-c-menu-item__collapse-container--first-level,:host([data-overflow-more]) .mg-c-menu-item__collapse-container.mg-c-menu-item__collapse-container--first-level{background-color:hsl(var(--color-light))}:host([data-style-direction=horizontal]) .mg-c-menu-item__collapse-container.mg-c-menu-item__collapse-container--first-level ::slotted(mg-menu),:host([data-overflow-more]) .mg-c-menu-item__collapse-container.mg-c-menu-item__collapse-container--first-level ::slotted(mg-menu){padding:1rem 0}::slotted([slot=label]),::slotted([slot=metadata]){display:block;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}::slotted(*){display:flex;flex-direction:column}:host([status=disabled]){pointer-events:none}:host([hidden]){display:none}";
4516
4538
  const MgMenuItemStyle0 = mgMenuItemCss;
4517
4539
 
4518
4540
  const MgMenuItem = class {
@@ -4578,7 +4600,7 @@ const MgMenuItem = class {
4578
4600
  throw new Error(`<${this.name}> slot "label" is required.`);
4579
4601
  ['label', 'metadata'].forEach(slot => {
4580
4602
  Array.from(this.element.querySelectorAll(`[slot="${slot}"]`)).forEach(element => {
4581
- if (!index$1.Ne(element.textContent))
4603
+ if (!index$1.Ie(element.textContent))
4582
4604
  throw new Error(`<${this.name}> slot "${slot}" must have text content.`);
4583
4605
  if ((guard && element.getAttribute('title') === null) || !guard)
4584
4606
  element.setAttribute('title', element.textContent);
@@ -4647,13 +4669,13 @@ const MgMenuItem = class {
4647
4669
  * @returns HTML Element
4648
4670
  */
4649
4671
  this.renderSlot = () => index.h("slot", null);
4650
- this.identifier = index$1.Me('mg-menu-item');
4672
+ this.identifier = index$1.Ce('mg-menu-item');
4651
4673
  this.href = undefined;
4652
4674
  this.target = undefined;
4653
4675
  this.status = Status$1.VISIBLE;
4654
4676
  this.expanded = false;
4655
4677
  this.size = 'regular';
4656
- this.navigationButtonClassList = new index$1.Oe([this.navigationButton]);
4678
+ this.navigationButtonClassList = new index$1.He([this.navigationButton]);
4657
4679
  this.direction = undefined;
4658
4680
  this.isInMainMenu = undefined;
4659
4681
  this.isItemMore = undefined;
@@ -4800,7 +4822,7 @@ const MgMenuItem = class {
4800
4822
  * Emit event when component is updated
4801
4823
  */
4802
4824
  componentShouldUpdate() {
4803
- return index$1.Ce(() => {
4825
+ return index$1.Ge(() => {
4804
4826
  this.itemUpdated.emit();
4805
4827
  });
4806
4828
  }
@@ -4813,7 +4835,8 @@ const MgMenuItem = class {
4813
4835
  ['mg-c-menu-item__collapse-container']: true,
4814
4836
  ['mg-c-menu-item__collapse-container--first-level']: (this.isInMainMenu || this.isItemMore) && this.isDirection(Direction.HORIZONTAL),
4815
4837
  });
4816
- return (index.h(index.Host, { key: '10b41e1b90d01a0f0df082cd9fc50884e87c2e59', role: this.isItemMore ? 'presentation' : 'listitem' }, this.displayPopover() ? (index.h("mg-popover", { display: this.expanded, placement: "bottom-start", arrowHide: true, "onDisplay-change": this.handlePopoverDisplay, identifier: this.getPopoverIdentifier() }, this.renderInteractiveElement(), index.h("div", { class: getContainerClasses(), slot: "content" }, this.renderSlot()))) : ([
4838
+ return (index.h(index.Host, { key: '10b41e1b90d01a0f0df082cd9fc50884e87c2e59', role: this.isItemMore ? 'presentation' : 'listitem' }, this.displayPopover() ? (index.h("mg-popover", { display: this.expanded, placement: "bottom-start", arrowHide: true, "onDisplay-change": this.handlePopoverDisplay, identifier: this.getPopoverIdentifier(), "data-fallback-placement": "bottom-end" // use for the last element of the menu if it is placed on the right side
4839
+ }, this.renderInteractiveElement(), index.h("div", { class: getContainerClasses(), slot: "content" }, this.renderSlot()))) : ([
4817
4840
  this.renderInteractiveElement(),
4818
4841
  index.h("div", { key: "vertical-container", class: getContainerClasses(), hidden: !this.expanded }, this.renderSlot()),
4819
4842
  ])));
@@ -4906,13 +4929,13 @@ const MgMessage = class {
4906
4929
  return 'exclamation-circle';
4907
4930
  }
4908
4931
  };
4909
- this.identifier = index$1.Me('mg-message');
4932
+ this.identifier = index$1.Ce('mg-message');
4910
4933
  this.delay = undefined;
4911
4934
  this.variant = variants$1[0];
4912
4935
  this.closeButton = false;
4913
4936
  this.hide = false;
4914
4937
  this.noAriaRole = undefined;
4915
- this.classCollection = new index$1.Oe(['mg-c-message']);
4938
+ this.classCollection = new index$1.He(['mg-c-message']);
4916
4939
  this.hasActions = false;
4917
4940
  }
4918
4941
  validateDelay(newValue) {
@@ -5055,12 +5078,12 @@ const MgModal = class {
5055
5078
  */
5056
5079
  this.setFocus = () => {
5057
5080
  // Get all focusable elements
5058
- const slottedFocusableElements = Array.from(this.element.querySelectorAll(index$1._e));
5081
+ const slottedFocusableElements = Array.from(this.element.querySelectorAll(index$1.We));
5059
5082
  // If close button is enabled or at least one of the slotted element is focusable
5060
5083
  if (this.closeButton || slottedFocusableElements.length > 0) {
5061
5084
  // Check if slotted focusable elements have shadowDom with focusable elements
5062
5085
  this.modalFocusableElements = slottedFocusableElements.reduce((acc, focusableElement) => {
5063
- acc.push(focusableElement.shadowRoot !== null ? focusableElement.shadowRoot.querySelector(index$1._e) || focusableElement : focusableElement);
5086
+ acc.push(focusableElement.shadowRoot !== null ? focusableElement.shadowRoot.querySelector(index$1.We) || focusableElement : focusableElement);
5064
5087
  return acc;
5065
5088
  }, []);
5066
5089
  // When close button is enabled it's the first focusable element.
@@ -5082,21 +5105,21 @@ const MgModal = class {
5082
5105
  this.handleClose = () => {
5083
5106
  this.hide = true;
5084
5107
  };
5085
- this.identifier = index$1.Me('mg-modal');
5108
+ this.identifier = index$1.Ce('mg-modal');
5086
5109
  this.dialogRole = dialogRoles[0];
5087
5110
  this.modalTitle = undefined;
5088
5111
  this.closeButton = false;
5089
5112
  this.hide = undefined;
5090
5113
  this.hasActions = false;
5091
5114
  this.hasContent = false;
5092
- this.classCollection = new index$1.Oe(['mg-c-modal']);
5115
+ this.classCollection = new index$1.He(['mg-c-modal']);
5093
5116
  }
5094
5117
  validateDialogRole(newValue) {
5095
5118
  if (!dialogRoles.includes(newValue))
5096
5119
  throw new Error(`<mg-modal> prop "dialogRole" must be one of: ${dialogRoles.join(', ')}.`);
5097
5120
  }
5098
5121
  validateModalTitle(newValue) {
5099
- if (!index$1.Ne(newValue)) {
5122
+ if (!index$1.Ie(newValue)) {
5100
5123
  throw new Error('<mg-modal> prop "modalTitle" is required.');
5101
5124
  }
5102
5125
  }
@@ -5243,7 +5266,7 @@ const MgPagination = class {
5243
5266
  this.handleGoToPage = (action, disabled) => {
5244
5267
  !disabled && this.goToPage(action === NavigationAction.NEXT ? this.currentPage + 1 : this.currentPage - 1);
5245
5268
  };
5246
- this.identifier = index$1.Me('mg-pagination');
5269
+ this.identifier = index$1.Ce('mg-pagination');
5247
5270
  this.label = undefined;
5248
5271
  this.hideNavigationLabels = undefined;
5249
5272
  this.hidePageCount = undefined;
@@ -5408,7 +5431,7 @@ const MgPanel = class {
5408
5431
  ];
5409
5432
  return this.titlePosition === 'right' ? children.reverse() : children;
5410
5433
  };
5411
- this.identifier = index$1.Me('mg-panel');
5434
+ this.identifier = index$1.Ce('mg-panel');
5412
5435
  this.panelTitle = undefined;
5413
5436
  this.titlePattern = undefined;
5414
5437
  this.titlePatternErrorMessage = undefined;
@@ -5417,12 +5440,12 @@ const MgPanel = class {
5417
5440
  this.expanded = false;
5418
5441
  this.expandToggleDisplay = expandToggleDisplays[0];
5419
5442
  this.expandToggleDisabled = undefined;
5420
- this.classCollection = new index$1.Oe(['mg-c-panel']);
5443
+ this.classCollection = new index$1.He(['mg-c-panel']);
5421
5444
  this.isEditing = false;
5422
5445
  this.updatedPanelTitle = undefined;
5423
5446
  }
5424
5447
  validatePanelTitle(newValue) {
5425
- if (!index$1.Ne(newValue))
5448
+ if (!index$1.Ie(newValue))
5426
5449
  throw new Error('<mg-panel> prop "panelTitle" is required.');
5427
5450
  this.titleChange.emit(newValue);
5428
5451
  }
@@ -7373,7 +7396,7 @@ const MgPopover = class {
7373
7396
  mgPopoverContent.setAttribute('id', this.identifier);
7374
7397
  }
7375
7398
  };
7376
- this.identifier = index$1.Me('mg-popover');
7399
+ this.identifier = index$1.Ce('mg-popover');
7377
7400
  this.placement = 'bottom';
7378
7401
  this.arrowHide = false;
7379
7402
  this.closeButton = false;
@@ -7416,7 +7439,7 @@ const MgPopover = class {
7416
7439
  */
7417
7440
  componentWillLoad() {
7418
7441
  // Get windows to attach events
7419
- this.windows = index$1.Be(window);
7442
+ this.windows = index$1.ze(window);
7420
7443
  // render mg-popover-content slot
7421
7444
  this.renderPopoverContent();
7422
7445
  this.validateCloseButton(this.closeButton);
@@ -7434,6 +7457,10 @@ const MgPopover = class {
7434
7457
  // Add aria attributes
7435
7458
  interactiveElement.setAttribute('aria-controls', this.identifier);
7436
7459
  interactiveElement.setAttribute('aria-expanded', `${this.display}`);
7460
+ const fallbackPlacements = [];
7461
+ if (this.element.dataset.fallbackPlacement) {
7462
+ fallbackPlacements.push(this.element.dataset.fallbackPlacement);
7463
+ }
7437
7464
  // Create popperjs popover
7438
7465
  this.popper = createPopper(interactiveElement, this.mgPopover, {
7439
7466
  placement: this.placement,
@@ -7448,7 +7475,7 @@ const MgPopover = class {
7448
7475
  {
7449
7476
  name: 'flip',
7450
7477
  options: {
7451
- fallbackPlacements: ['auto'],
7478
+ fallbackPlacements: [...fallbackPlacements, 'auto'],
7452
7479
  },
7453
7480
  },
7454
7481
  ],
@@ -7478,7 +7505,7 @@ const MgPopover = class {
7478
7505
  * @returns HTML Element
7479
7506
  */
7480
7507
  render() {
7481
- return (index.h(index.Host, { key: '788fd2a8f759f8ae9188b05395cbfc33b5b06c69' }, index.h("slot", { key: '9109948237f93d375e6d1b234274f8283c0260d3' }), index.h("slot", { key: 'e76a1093edab91746a4d3302d7976129ed7c6042', name: "content" })));
7508
+ return (index.h(index.Host, { key: 'a01aff00a17da32a72491629ba80ec51a34cdb0e' }, index.h("slot", { key: 'bb314190042b65bf899e34efac1781ce9230930f' }), index.h("slot", { key: 'daba0b8cb0b1b3b4637bb972da309a9afb73f99e', name: "content" })));
7482
7509
  }
7483
7510
  get element() { return index.getElement(this); }
7484
7511
  static get watchers() { return {
@@ -7504,7 +7531,7 @@ const MgPopoverContent = class {
7504
7531
  this.hideContent.emit();
7505
7532
  };
7506
7533
  this.closeButton = false;
7507
- this.classCollection = new index$1.Oe(['mg-c-popover-content']);
7534
+ this.classCollection = new index$1.He(['mg-c-popover-content']);
7508
7535
  }
7509
7536
  /*************
7510
7537
  * Lifecycle *
@@ -7522,7 +7549,7 @@ const MgPopoverContent = class {
7522
7549
  componentDidLoad() {
7523
7550
  const headingTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
7524
7551
  const slottedTitleElement = this.element.querySelector('[slot="title"]');
7525
- if (slottedTitleElement && !index$1.De(slottedTitleElement, headingTags)) {
7552
+ if (slottedTitleElement && !index$1.Be(slottedTitleElement, headingTags)) {
7526
7553
  throw new Error(`<mg-popover> Slotted title must be a heading: ${headingTags.join(', ')}`);
7527
7554
  }
7528
7555
  }
@@ -7558,7 +7585,7 @@ const MgSkipLinks = class {
7558
7585
  this.links = undefined;
7559
7586
  }
7560
7587
  validateLinks(links) {
7561
- if (links === undefined || links.length === 0 || links.some(link => !index$1.Ne(link.href) || !link.href.startsWith('#') || !index$1.Ne(link.label))) {
7588
+ if (links === undefined || links.length === 0 || links.some(link => !index$1.Ie(link.href) || !link.href.startsWith('#') || !index$1.Ie(link.label))) {
7562
7589
  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.`);
7563
7590
  }
7564
7591
  }
@@ -7710,7 +7737,7 @@ const MgTabs = class {
7710
7737
  */
7711
7738
  this.resetFocus = () => {
7712
7739
  // update asynchronously tabindex to prevent get focus on new tabindex at then end of event process
7713
- index$1.Ce(() => {
7740
+ index$1.Ge(() => {
7714
7741
  this.tabFocus = undefined;
7715
7742
  Array.from(this.element.shadowRoot.querySelectorAll('[data-index]')).forEach((tab, index) => {
7716
7743
  tab.setAttribute('tabindex', this.activeTab - this.startIndex !== index ? '-1' : '0');
@@ -7725,16 +7752,16 @@ const MgTabs = class {
7725
7752
  if (slots.length !== this.tabs.length)
7726
7753
  throw new Error('<mg-tabs> Must have slots counts equal to tabs count.');
7727
7754
  };
7728
- this.identifier = index$1.Me('mg-tabs');
7755
+ this.identifier = index$1.Ce('mg-tabs');
7729
7756
  this.label = undefined;
7730
7757
  this.size = 'regular';
7731
7758
  this.items = undefined;
7732
7759
  this.activeTab = undefined;
7733
7760
  this.tabs = [];
7734
- this.classCollection = new index$1.Oe(['mg-c-tabs']);
7761
+ this.classCollection = new index$1.He(['mg-c-tabs']);
7735
7762
  }
7736
7763
  validateLabel(newValue) {
7737
- if (!index$1.Ne(newValue)) {
7764
+ if (!index$1.Ie(newValue)) {
7738
7765
  throw new Error('<mg-tabs> prop "label" is required.');
7739
7766
  }
7740
7767
  }
@@ -7746,7 +7773,7 @@ const MgTabs = class {
7746
7773
  }
7747
7774
  validateItems(newValue) {
7748
7775
  // String array
7749
- if (index$1.Fe(newValue))
7776
+ if (index$1.Pe(newValue))
7750
7777
  this.tabs = newValue.map(item => ({ label: item, status: Status.VISIBLE }));
7751
7778
  // Object array
7752
7779
  else if (Array.isArray(newValue) && newValue.length > 0 && newValue.every(isTabItem))
@@ -7846,7 +7873,7 @@ const MgTag = class {
7846
7873
  this.variant = variants[0];
7847
7874
  this.outline = undefined;
7848
7875
  this.soft = undefined;
7849
- this.classCollection = new index$1.Oe(['mg-c-tag']);
7876
+ this.classCollection = new index$1.He(['mg-c-tag']);
7850
7877
  }
7851
7878
  validateVariant(newValue, oldValue) {
7852
7879
  if (!variants.includes(newValue)) {
@@ -7883,7 +7910,7 @@ const MgTag = class {
7883
7910
  * @param textContent - html element textContent property
7884
7911
  */
7885
7912
  validateTextContent(textContent) {
7886
- if (!index$1.Ne(textContent))
7913
+ if (!index$1.Ie(textContent))
7887
7914
  throw new Error('<mg-tag> slot must contain a text content.');
7888
7915
  }
7889
7916
  /*************
@@ -7943,10 +7970,10 @@ const MgTooltip = class {
7943
7970
  // Enable the event listeners
7944
7971
  this.popper.setOptions(options => (Object.assign(Object.assign({}, options), { modifiers: [...options.modifiers, { name: 'eventListeners', enabled: true }] })));
7945
7972
  // hide when click outside on nextTick to prevent event to trigger after creation
7946
- index$1.Ce(() => {
7973
+ index$1.Ge(() => {
7947
7974
  this.windows.forEach((localWindow) => {
7948
- localWindow.addEventListener('click', this.clickOutside, false);
7949
- localWindow.addEventListener('keydown', this.pressEscape, false);
7975
+ localWindow.addEventListener('click', this.handleClickOutside, false);
7976
+ localWindow.addEventListener('keydown', this.handlePressEscape, false);
7950
7977
  });
7951
7978
  });
7952
7979
  };
@@ -7960,15 +7987,15 @@ const MgTooltip = class {
7960
7987
  this.popper.setOptions(options => (Object.assign(Object.assign({}, options), { modifiers: [...options.modifiers, { name: 'eventListeners', enabled: false }] })));
7961
7988
  // Remove event listener
7962
7989
  this.windows.forEach((localWindow) => {
7963
- localWindow.removeEventListener('click', this.clickOutside, false);
7964
- localWindow.removeEventListener('keyboard', this.pressEscape, false);
7990
+ localWindow.removeEventListener('click', this.handleClickOutside, false);
7991
+ localWindow.removeEventListener('keyboard', this.handlePressEscape, false);
7965
7992
  });
7966
7993
  };
7967
7994
  /**
7968
7995
  * Check if clicked outside of component and hidde tooltip
7969
7996
  * @param event - mouse event
7970
7997
  */
7971
- this.clickOutside = (event) => {
7998
+ this.handleClickOutside = (event) => {
7972
7999
  if (event.target.closest('mg-tooltip') !== this.element)
7973
8000
  this.setDisplay(false);
7974
8001
  };
@@ -7976,7 +8003,7 @@ const MgTooltip = class {
7976
8003
  * Check if 'Escape' key is pressed of component and hidde tooltip
7977
8004
  * @param event - keyboard event
7978
8005
  */
7979
- this.pressEscape = (event) => {
8006
+ this.handlePressEscape = (event) => {
7980
8007
  if (event.code === 'Escape') {
7981
8008
  this.setDisplay(false);
7982
8009
  this.resetGuard();
@@ -7994,23 +8021,25 @@ const MgTooltip = class {
7994
8021
  /**
7995
8022
  * Action for tooltip element and tooltiped element mouse listener
7996
8023
  * @param elementGuard - tooltip element guard
7997
- * @param isMouseenter - mouseenter validation
8024
+ * @param eventName - event name
7998
8025
  * @param conditionalGuard - guard condition
7999
8026
  */
8000
- this.tooltipMouseListenerAction = (elementGuard, isMouseenter, conditionalGuard) => {
8001
- // we mutate elementGuard
8002
- if (![Guard.FOCUS, Guard.DISABLE_ON_CLICK].includes(this.guard)) {
8003
- this.guard = elementGuard;
8004
- if (!isMouseenter) {
8005
- // process action in the next event loop macro task
8006
- setTimeout(() => {
8007
- this.setDisplay(isMouseenter, this.guard !== conditionalGuard);
8008
- this.resetGuard();
8009
- }, 100);
8010
- }
8011
- else if (this.guard === Guard.HOVER_TOOLTIPED_ELEMENT) {
8012
- this.setDisplay(isMouseenter);
8013
- }
8027
+ this.tooltipMouseListenerAction = (elementGuard, eventName, conditionalGuard) => {
8028
+ // active FOCUS guard cancel process
8029
+ if ([Guard.FOCUS, Guard.DISABLE_ON_CLICK].includes(this.guard)) {
8030
+ return;
8031
+ }
8032
+ // Update guard by element guard
8033
+ this.guard = elementGuard;
8034
+ if (eventName !== 'mouseenter') {
8035
+ // process action in the next event loop macro task
8036
+ setTimeout(() => {
8037
+ this.setDisplay(false, this.guard !== conditionalGuard);
8038
+ this.resetGuard();
8039
+ }, 100);
8040
+ }
8041
+ else if (this.guard === Guard.HOVER_TOOLTIPED_ELEMENT) {
8042
+ this.setDisplay(true);
8014
8043
  }
8015
8044
  };
8016
8045
  /**
@@ -8037,27 +8066,9 @@ const MgTooltip = class {
8037
8066
  }
8038
8067
  };
8039
8068
  /**
8040
- * Init tooltip
8041
- * @param slotElement - slotted element
8042
- * @param interactiveElement - interactive element
8069
+ * Set popper instance
8043
8070
  */
8044
- this.initTooltip = (slotElement, interactiveElement) => {
8045
- // Add tabindex to slotted element if we can't find any interactive element
8046
- if (!this.disabled && !interactiveElement) {
8047
- this.hasCustomTabIndex = true;
8048
- slotElement.tabIndex = 0;
8049
- // Add role on non-interactive element to work with "aria-describedby" for screen readers
8050
- slotElement.setAttribute('role', 'button');
8051
- }
8052
- // Set aria-describedby
8053
- const ariaDescribedby = slotElement.getAttribute('aria-describedby');
8054
- if (ariaDescribedby === null) {
8055
- this.tooltipedElement.setAttribute('aria-describedby', this.identifier);
8056
- }
8057
- else {
8058
- // We ensure to have uniq ids
8059
- slotElement.setAttribute('aria-describedby', `${[...new Set([...ariaDescribedby.split(' '), this.identifier])].join(' ')}`);
8060
- }
8071
+ this.setPopper = () => {
8061
8072
  // use element data attribute: `data-popper-strategy`, in order to get popper strategy configuration
8062
8073
  const strategy = (this.element.dataset.popperStrategy || 'fixed');
8063
8074
  // Create popperjs tooltip
@@ -8079,13 +8090,14 @@ const MgTooltip = class {
8079
8090
  },
8080
8091
  ],
8081
8092
  });
8082
- // Manage tooltipedElement focus/blur events
8083
- this.tooltipedElement.addEventListener('disabled-change', (event) => {
8084
- if (event.target.disableOnClick) {
8085
- this.guard = event.detail ? Guard.DISABLE_ON_CLICK : null;
8086
- }
8087
- });
8088
- // Manage tooltipedElement focus/blur events
8093
+ };
8094
+ /**
8095
+ * Define selected element to become tooltip selector and init listeners
8096
+ * @param element - tooltiped element
8097
+ */
8098
+ this.setTooltipedElement = (element) => {
8099
+ this.tooltipedElement = element;
8100
+ // Manage tooltipedElement focus events
8089
8101
  this.tooltipedElement.addEventListener('focus', () => {
8090
8102
  this.guard = Guard.FOCUS;
8091
8103
  this.setDisplay(true);
@@ -8100,37 +8112,71 @@ const MgTooltip = class {
8100
8112
  this.resetGuard();
8101
8113
  this.setDisplay(false);
8102
8114
  });
8103
- document.addEventListener('keydown', this.pressEscape);
8104
8115
  // manage tooltipElement & tooltipedElement mouseenter/mouseleave events
8105
- ['mouseenter', 'mouseleave'].forEach(eventType => {
8106
- const isMouseenter = eventType === 'mouseenter';
8107
- [
8108
- { element: this.mgTooltipContent, action: () => this.tooltipMouseListenerAction(Guard.HOVER_TOOLTIP_ELEMENT, isMouseenter, Guard.HOVER_TOOLTIPED_ELEMENT) },
8109
- { element: this.tooltipedElement, action: () => this.tooltipMouseListenerAction(Guard.HOVER_TOOLTIPED_ELEMENT, isMouseenter, Guard.HOVER_TOOLTIP_ELEMENT) },
8110
- ].forEach(({ element, action }) => {
8111
- element.addEventListener(eventType, () => {
8112
- action();
8113
- });
8114
- });
8116
+ this.tooltipedElement.addEventListener('mouseenter', () => {
8117
+ this.tooltipMouseListenerAction(Guard.HOVER_TOOLTIPED_ELEMENT, 'mouseenter', Guard.HOVER_TOOLTIP_ELEMENT);
8118
+ });
8119
+ this.tooltipedElement.addEventListener('mouseleave', () => {
8120
+ this.tooltipMouseListenerAction(Guard.HOVER_TOOLTIPED_ELEMENT, 'mouseleave', Guard.HOVER_TOOLTIP_ELEMENT);
8115
8121
  });
8116
8122
  };
8117
- this.identifier = index$1.Me('mg-tooltip');
8123
+ /**
8124
+ * Set button mutation observer
8125
+ * @param mgButton - mg-button to observe
8126
+ */
8127
+ this.setMgButtonMutationObserver = (mgButton) => {
8128
+ new MutationObserver(mutationList => {
8129
+ // stop process when none of mutations attributed is disabled
8130
+ if (!mutationList.some(mutation => ['aria-disabled', 'disabled'].includes(mutation.attributeName)))
8131
+ return;
8132
+ // set guard when one of mutations is for a disabled with disabled-on-click
8133
+ if (mutationList.some((mutation) => mutation.target.disabled && mutation.target.disableOnClick)) {
8134
+ this.guard = Guard.DISABLE_ON_CLICK;
8135
+ }
8136
+ // when the disabled-on-click guard is running we stop process
8137
+ if (this.guard === Guard.DISABLE_ON_CLICK)
8138
+ return;
8139
+ // update button wrapper
8140
+ this.setMgButtonWrapper(mgButton);
8141
+ // Since Firefox doesn't trigger a "blur" event when the "disabled" attribute is added or removed from a button
8142
+ // we have to manually unlock the guard because the "blur" handler of the tooltipedElement won't do it.
8143
+ this.resetGuard();
8144
+ // update popper instance
8145
+ this.popper.update();
8146
+ }).observe(mgButton, { attributes: true });
8147
+ };
8148
+ /**
8149
+ * Set tooltiped element aria-describedby
8150
+ * @param element - element to update
8151
+ */
8152
+ this.setAriaDescribedby = (element) => {
8153
+ // Set aria-describedby
8154
+ const ariaDescribedby = element.getAttribute('aria-describedby');
8155
+ if (ariaDescribedby === null) {
8156
+ this.tooltipedElement.setAttribute('aria-describedby', this.identifier);
8157
+ }
8158
+ else {
8159
+ // We ensure to have uniq ids
8160
+ element.setAttribute('aria-describedby', `${[...new Set([...ariaDescribedby.split(' '), this.identifier])].join(' ')}`);
8161
+ }
8162
+ };
8163
+ this.identifier = index$1.Ce('mg-tooltip');
8118
8164
  this.message = undefined;
8119
8165
  this.placement = 'bottom';
8120
8166
  this.display = false;
8121
8167
  this.disabled = false;
8122
8168
  }
8123
- validateIdentifier() {
8169
+ watchIdentifier() {
8124
8170
  // use renderTooltipContent to update tooltip-content id
8125
8171
  this.renderTooltipContent();
8126
8172
  }
8127
- validateMessage(newValue) {
8128
- if (!index$1.Ne(newValue)) {
8173
+ watchMessage(newValue) {
8174
+ if (!index$1.Ie(newValue)) {
8129
8175
  throw new Error('<mg-tooltip> prop "message" is required.');
8130
8176
  }
8131
8177
  this.mgTooltipContent.message = newValue;
8132
8178
  }
8133
- handleDisplay(newValue) {
8179
+ watchDisplay(newValue) {
8134
8180
  if (newValue) {
8135
8181
  this.show();
8136
8182
  }
@@ -8138,7 +8184,7 @@ const MgTooltip = class {
8138
8184
  this.hide();
8139
8185
  }
8140
8186
  }
8141
- validateDisabled(newValue) {
8187
+ watchDisabled(newValue) {
8142
8188
  if (this.hasCustomTabIndex) {
8143
8189
  if (newValue)
8144
8190
  this.tooltipedElement.removeAttribute('tabindex');
@@ -8147,23 +8193,29 @@ const MgTooltip = class {
8147
8193
  }
8148
8194
  }
8149
8195
  /**
8150
- * Render tooltip content element
8196
+ * Render tooltip content element and init listeners
8151
8197
  */
8152
8198
  renderTooltipContent() {
8153
- const mgTooltipContent = this.element.querySelector('mg-tooltip-content');
8154
- if (mgTooltipContent === null) {
8155
- const mgTooltipContent = document.createElement('mg-tooltip-content');
8156
- mgTooltipContent.setAttribute('slot', 'content');
8157
- mgTooltipContent.setAttribute('id', this.identifier);
8199
+ if (this.mgTooltipContent) {
8200
+ this.mgTooltipContent.setAttribute('id', this.identifier);
8201
+ }
8202
+ else {
8203
+ this.mgTooltipContent = document.createElement('mg-tooltip-content');
8204
+ this.mgTooltipContent.setAttribute('slot', 'content');
8205
+ this.mgTooltipContent.setAttribute('id', this.identifier);
8158
8206
  const arrow = document.createElement('div');
8159
8207
  arrow.setAttribute('slot', 'arrow');
8160
8208
  arrow.dataset.popperArrow = '';
8161
- mgTooltipContent.appendChild(arrow);
8209
+ this.mgTooltipContent.appendChild(arrow);
8210
+ // manage tooltipElement & tooltipedElement mouseenter/mouseleave events
8211
+ this.mgTooltipContent.addEventListener('mouseenter', () => {
8212
+ this.tooltipMouseListenerAction(Guard.HOVER_TOOLTIP_ELEMENT, 'mouseenter', Guard.HOVER_TOOLTIPED_ELEMENT);
8213
+ });
8214
+ this.mgTooltipContent.addEventListener('mouseleave', () => {
8215
+ this.tooltipMouseListenerAction(Guard.HOVER_TOOLTIP_ELEMENT, 'mouseleave', Guard.HOVER_TOOLTIPED_ELEMENT);
8216
+ });
8162
8217
  // append tooltip element to component
8163
- this.element.appendChild(mgTooltipContent);
8164
- }
8165
- else {
8166
- mgTooltipContent.setAttribute('id', this.identifier);
8218
+ this.element.appendChild(this.mgTooltipContent);
8167
8219
  }
8168
8220
  }
8169
8221
  /*************
@@ -8174,14 +8226,13 @@ const MgTooltip = class {
8174
8226
  */
8175
8227
  componentWillLoad() {
8176
8228
  // Get windows to attach events
8177
- this.windows = index$1.Be(window);
8229
+ this.windows = index$1.ze(window);
8178
8230
  // Get tooltip element
8179
8231
  this.renderTooltipContent();
8180
- this.mgTooltipContent = this.element.querySelector(`#${this.identifier}`);
8181
8232
  //validate properties
8182
- this.validateDisabled(this.disabled);
8183
- this.validateMessage(this.message);
8184
- this.validateIdentifier();
8233
+ this.watchDisabled(this.disabled);
8234
+ this.watchMessage(this.message);
8235
+ this.watchIdentifier();
8185
8236
  }
8186
8237
  /**
8187
8238
  * Get slotted element
@@ -8193,26 +8244,29 @@ const MgTooltip = class {
8193
8244
  // get slotted element wich is not the tooltip
8194
8245
  const slotElement = this.element.querySelector(`*:not(#${this.identifier})`);
8195
8246
  // Get interactive element
8196
- const interactiveElement = slotElement.matches(index$1._e) ? slotElement : (_a = slotElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(index$1._e);
8197
- // define selected element to become tooltip selector
8198
- this.tooltipedElement = interactiveElement || slotElement;
8247
+ const interactiveElement = slotElement.matches(index$1.We) ? slotElement : (_a = slotElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(index$1.We);
8248
+ this.setTooltipedElement(interactiveElement || slotElement);
8199
8249
  // Check if slotted element is a disabled mg-button
8200
8250
  // In this case we wrap the mg-button into a div to enable the tooltip
8201
8251
  if (isButton(slotElement)) {
8202
- new MutationObserver(mutationList => {
8203
- if (mutationList.some(mutation => ['aria-disabled', 'disabled'].includes(mutation.attributeName)) && this.guard !== Guard.DISABLE_ON_CLICK) {
8204
- this.setMgButtonWrapper(slotElement);
8205
- // Since Firefox doesn't trigger a "blur" event when the "disabled" attribute is added or removed from a button
8206
- // we have to manually unlock the guard because the "blur" handler of the tooltipedElement won't do it.
8207
- this.resetGuard();
8208
- this.initTooltip(slotElement, interactiveElement);
8209
- }
8210
- }).observe(slotElement, { attributes: true });
8252
+ this.setMgButtonMutationObserver(slotElement);
8211
8253
  this.setMgButtonWrapper(slotElement);
8212
8254
  }
8213
- // Init Tooltip
8214
- this.initTooltip(slotElement, interactiveElement);
8215
- this.handleDisplay(this.display);
8255
+ // Add tabindex to slotted element if we can't find any interactive element
8256
+ if (!this.disabled && !interactiveElement) {
8257
+ this.hasCustomTabIndex = true;
8258
+ slotElement.tabIndex = 0;
8259
+ // Add role on non-interactive element to work with "aria-describedby" for screen readers
8260
+ slotElement.setAttribute('role', 'button');
8261
+ }
8262
+ // apply a11y aria
8263
+ this.setAriaDescribedby(slotElement);
8264
+ // set Tooltip
8265
+ this.setPopper();
8266
+ // add document keyboard handler
8267
+ document.addEventListener('keydown', this.handlePressEscape);
8268
+ // check props
8269
+ this.watchDisplay(this.display);
8216
8270
  }
8217
8271
  /**
8218
8272
  * update popper position after props change on component did update hook to benefit from render ended
@@ -8225,14 +8279,14 @@ const MgTooltip = class {
8225
8279
  * @returns HTML Element
8226
8280
  */
8227
8281
  render() {
8228
- return (index.h(index.Host, { key: 'bc92b38b5934945abf8657aeb56804c81274a11e' }, index.h("slot", { key: '5fca70b68f35c72c92252106d4b26766e2f671bb' }), index.h("slot", { key: '4426a5f6f55f549791ff22cc7220d728d2cca04f', name: "content" })));
8282
+ return (index.h(index.Host, { key: '9d7c428ba22f6b8e41ad1b62837d7b369e38314d' }, index.h("slot", { key: 'f5bdcac81a64674dd57e88e1c00b540dd49310f6' }), index.h("slot", { key: '8d40b6f4f1d3f385dcdf582509f89b3ec0dbd676', name: "content" })));
8229
8283
  }
8230
8284
  get element() { return index.getElement(this); }
8231
8285
  static get watchers() { return {
8232
- "identifier": ["validateIdentifier"],
8233
- "message": ["validateMessage"],
8234
- "display": ["handleDisplay"],
8235
- "disabled": ["validateDisabled"]
8286
+ "identifier": ["watchIdentifier"],
8287
+ "message": ["watchMessage"],
8288
+ "display": ["watchDisplay"],
8289
+ "disabled": ["watchDisabled"]
8236
8290
  }; }
8237
8291
  };
8238
8292
  MgTooltip.style = MgTooltipStyle0;