@mgdis/mg-components 5.15.0 → 5.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/{mg-action-more_32.cjs.entry.js → mg-action-more_34.cjs.entry.js} +321 -107
  3. package/dist/cjs/mg-components.cjs.js +1 -1
  4. package/dist/cjs/mg-item-more.cjs.entry.js +4 -2
  5. package/dist/collection/assets/icons/index.js +179 -0
  6. package/dist/collection/collection-manifest.json +2 -0
  7. package/dist/collection/components/atoms/mg-icon/mg-icon.js +1 -1
  8. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.css +43 -0
  9. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +49 -0
  10. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.css +0 -43
  11. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +57 -12
  12. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +2 -2
  13. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +1 -1
  14. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +1 -1
  15. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +35 -15
  16. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +1 -1
  17. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +1 -1
  18. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +1 -1
  19. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +1 -1
  20. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -1
  21. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +2 -2
  22. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +9 -2
  23. package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
  24. package/dist/collection/components/molecules/mg-form/mg-form.js +11 -3
  25. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +4 -2
  26. package/dist/collection/components/molecules/mg-modal/mg-modal.conf.js +4 -0
  27. package/dist/collection/components/molecules/mg-modal/mg-modal.js +37 -5
  28. package/dist/collection/components/molecules/mg-panel/mg-panel.js +1 -1
  29. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.css +135 -0
  30. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +100 -0
  31. package/dist/collection/components/molecules/mg-popover/mg-popover.css +0 -111
  32. package/dist/collection/components/molecules/mg-popover/mg-popover.js +42 -43
  33. package/dist/collection/utils/components.utils.js +8 -7
  34. package/dist/collection/utils/unit.test.utils.js +6 -5
  35. package/dist/components/components.utils.js +8 -7
  36. package/dist/components/index.d.ts +2 -0
  37. package/dist/components/index.js +2 -0
  38. package/dist/components/mg-action-more.js +29 -16
  39. package/dist/components/mg-details.js +1 -1
  40. package/dist/components/mg-form.js +11 -3
  41. package/dist/components/mg-icon2.js +66 -14
  42. package/dist/components/mg-input-checkbox-paginated2.js +18 -12
  43. package/dist/components/mg-input-checkbox.js +36 -24
  44. package/dist/components/mg-input-date.js +13 -7
  45. package/dist/components/mg-input-numeric.js +47 -21
  46. package/dist/components/mg-input-password.js +13 -7
  47. package/dist/components/mg-input-radio.js +13 -7
  48. package/dist/components/mg-input-select2.js +13 -7
  49. package/dist/components/mg-input-text2.js +15 -9
  50. package/dist/components/mg-input-textarea.js +15 -9
  51. package/dist/components/mg-input-toggle.js +12 -6
  52. package/dist/components/mg-item-more.js +24 -16
  53. package/dist/components/mg-menu-item2.js +18 -12
  54. package/dist/components/mg-modal.js +16 -3
  55. package/dist/components/mg-pagination2.js +16 -10
  56. package/dist/components/mg-panel.js +21 -15
  57. package/dist/components/mg-popover-content.d.ts +11 -0
  58. package/dist/components/mg-popover-content.js +6 -0
  59. package/dist/components/mg-popover-content2.js +88 -0
  60. package/dist/components/mg-popover2.js +54 -47
  61. package/dist/components/mg-tooltip-content.d.ts +11 -0
  62. package/dist/components/mg-tooltip-content.js +6 -0
  63. package/dist/components/mg-tooltip-content2.js +41 -0
  64. package/dist/components/mg-tooltip2.js +64 -15
  65. package/dist/esm/loader.js +1 -1
  66. package/dist/esm/{mg-action-more_32.entry.js → mg-action-more_34.entry.js} +320 -108
  67. package/dist/esm/mg-components.js +1 -1
  68. package/dist/esm/mg-item-more.entry.js +4 -2
  69. package/dist/mg-components/mg-components.css +1 -1
  70. package/dist/mg-components/mg-components.esm.js +1 -1
  71. package/dist/mg-components/p-3286bc46.entry.js +1 -0
  72. package/dist/mg-components/p-91f4a30d.entry.js +1 -0
  73. package/dist/types/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.d.ts +14 -0
  74. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +7 -1
  75. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +19 -0
  76. package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +6 -1
  77. package/dist/types/components/molecules/mg-form/mg-form.d.ts +8 -0
  78. package/dist/types/components/molecules/mg-modal/mg-modal.conf.d.ts +8 -0
  79. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +8 -2
  80. package/dist/types/components/molecules/mg-popover/mg-popover-content/mg-popover-content.d.ts +47 -0
  81. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +8 -11
  82. package/dist/types/components.d.ts +59 -0
  83. package/package.json +8 -8
  84. package/dist/mg-components/p-4ae1130f.entry.js +0 -1
  85. package/dist/mg-components/p-6672f590.entry.js +0 -1
@@ -2,10 +2,11 @@ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/i
2
2
  import { M as MgInput } from './MgInput.js';
3
3
  import { C as ClassList } from './components.utils.js';
4
4
  import { i as initLocales } from './index2.js';
5
- import { d as defineCustomElement$4 } from './mg-character-left2.js';
6
- import { d as defineCustomElement$3 } from './mg-icon2.js';
7
- import { d as defineCustomElement$2 } from './mg-input-title2.js';
8
- import { d as defineCustomElement$1 } from './mg-tooltip2.js';
5
+ import { d as defineCustomElement$5 } from './mg-character-left2.js';
6
+ import { d as defineCustomElement$4 } from './mg-icon2.js';
7
+ import { d as defineCustomElement$3 } from './mg-input-title2.js';
8
+ import { d as defineCustomElement$2 } from './mg-tooltip2.js';
9
+ import { d as defineCustomElement$1 } from './mg-tooltip-content2.js';
9
10
 
10
11
  const mgInputTextCss = ":host{display:block}.mg-input{display:flex;align-items:flex-start;min-height:var(--default-size);max-width:100%;margin-bottom:var(--mg-inputs-margin-bottom, 0);}.mg-input mg-input-title{flex-shrink:var(--mg-inputs-shrink, 1);width:var(--mg-inputs-title-width, auto);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-input.mg-input--label-on-top{flex-direction:column}.mg-input.mg-input--label-on-top .mg-input__input-container{width:100%}.mg-input__title{display:flex;align-items:baseline;margin-bottom:0.3rem}.mg-input__title mg-input-title{flex-shrink:1;width:auto;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-input__title mg-tooltip{margin-top:0}.mg-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-input__input-container{min-height:var(--default-size);}.mg-input__input-container>strong{display:inline-block;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);min-height:var(--font-size)}.mg-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-input__input-container .mg-input__help-text,.mg-input__input-container .mg-input__error{text-align:start;font-size:1.2rem}.mg-input__input{display:flex;}.mg-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input__input.mg-input__input--has-error .mg-input__box{border-color:hsl(var(--color-danger))}.mg-input__input+.mg-input__help-text,.mg-input__input+.mg-input__error{margin-top:0.5rem}.mg-input__input .mg-input__box:disabled,.mg-input__input-group--disabled label,.mg-input.mg-input--toggle-disabled .mg-input__input .mg-input__button-toggle,.mg-input.mg-input--checkbox-multi-disabled .mg-input__input strong{opacity:var(--mg-disabled-opacity)}.mg-input__error{display:inline-block;margin-top:0.2rem;padding:0.3rem 0.8rem;border-radius:0.3rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}.mg-input__input mg-icon,.mg-input__error mg-icon{display:flex}.mg-input__box{padding:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2) var(--mg-inputs-spacer);height:var(--default-size);box-sizing:border-box;border-width:var(--mg-inputs-border-width);border-style:solid;border-color:var(--mg-inputs-color);border-radius:var(--mg-inputs-border-radius);background-color:hsl(var(--color-light));font-family:inherit;color:hsl(var(--color-dark));font-size:var(--font-size);text-align:var(--mg-inputs-text-align, left)}.mg-input__box::placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-input__box:focus{box-shadow:0 0 0.6rem hsl(var(--mg-inputs-color-shadow-focus-hsl), 0.5)}.mg-input__box:disabled{opacity:0.3}.mg-input.mg-input--is-input-group-append{--mg-button-border-radius-top-left:0;--mg-button-border-radius-bottom-left:0;}.mg-input.mg-input--is-input-group-append .mg-input__box{margin-right:-0.1rem;border-top-right-radius:0;border-bottom-right-radius:0}.mg-input.mg-input--is-input-group-append .mg-input__box:focus-visible{outline-style:solid;outline-offset:-0.2rem;outline-width:0.2rem}.mg-input.mg-input--is-input-group-append.mg-input--readonly slot[name=append-input]{display:none}.mg-input.mg-input--label-on-top .mg-input__box{width:auto;max-width:100%}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-button-border-radius-top-right:0;--mg-button-border-radius-bottom-right:0}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-button-border-right-width:0}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-button-border-radius-top-right:var(--mg-inputs-border-radius);--mg-button-border-radius-bottom-right:var(--mg-inputs-border-radius)}.mg-input.mg-input--is-append-input-slot-content:not(.mg-input--readonly) ::slotted([slot=append-input]){padding-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input.mg-input--width-full:not(.mg-input--label-on-top){justify-content:space-between}.mg-input.mg-input--width-full.mg-input--label-on-top .mg-input__box{width:100%}.mg-input.mg-input--width-full .mg-input__input-container{flex:auto;width:100%}.mg-input.mg-input--width-full .mg-input__input-container .mg-input__box{max-width:100%}.mg-input:not(.mg-input--label-on-top) .mg-input__box{width:100%;max-width:calc(17.7rem + var(--mg-inputs-spacer) * 2);min-width:5rem}.mg-input.mg-input--width-16 .mg-input__input-container{width:100%}.mg-input.mg-input--width-16 .mg-input__input-container .mg-input__input{width:100%;max-width:21rem}.mg-input.mg-input--width-16 .mg-input__input-container .mg-input__with-character-left{width:100%}.mg-input.mg-input--width-16 .mg-input__input-container .mg-input__box{max-width:21rem;min-width:100%}.mg-input.mg-input--width-4 .mg-input__input-container .mg-input__box{max-width:7rem}.mg-input.mg-input--width-2 .mg-input__input-container .mg-input__box{max-width:5rem}.mg-input mg-character-left{opacity:0.6;font-size:1.1rem}.mg-input.mg-input--has-display-character-left .mg-input__input+.mg-input__help-text,.mg-input.mg-input--has-display-character-left .mg-input__input+.mg-input__error{margin-top:0}.sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){.mg-a11y-animation{animation:none !important;transition:none !important}}.mg-input.mg-input--has-icon .mg-input__with-character-left>mg-icon{position:absolute;top:50%;left:var(--mg-inputs-spacer);color:var(--mg-inputs-color);transform:translateY(-50%)}.mg-input.mg-input--has-icon .mg-input__with-character-left .mg-input__box{padding-left:calc(var(--mg-icon-regular-size) + var(--mg-inputs-spacer) * 2)}.mg-input__with-character-left{position:relative;display:inline-flex}.mg-input--width-full .mg-input__with-character-left{width:100%}.mg-input.is-focused .mg-input__with-character-left .mg-input__box{padding-right:calc(var(--mg-character-left-message-length) * 1ch + 0.8rem)}.mg-input__with-character-left mg-character-left{position:absolute;display:none;top:50%;right:1rem;opacity:0.6;transform:translateY(-50%);font-size:1.1rem}.mg-input.is-focused .mg-input__with-character-left mg-character-left{display:block}";
11
12
 
@@ -191,7 +192,7 @@ const MgInputText = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
191
192
  '--mg-character-left-message-length': (this.displayCharacterLeft
192
193
  ? (this.maxlength - (this.value || '').length).toString().length + this.maxlength.toString().length + 1
193
194
  : 0).toString(),
194
- } }, this.icon !== undefined && h("mg-icon", { icon: this.icon }), h("input", { type: this.type, class: "mg-input__box", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, maxlength: this.maxlength, disabled: this.disabled, required: this.required, pattern: this.pattern, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: el => {
195
+ } }, this.icon !== undefined && h("mg-icon", { icon: this.icon }), h("input", { type: this.type, class: "mg-input__box", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, maxlength: this.maxlength, disabled: this.disabled, required: this.required, pattern: this.pattern, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: (el) => {
195
196
  if (el !== null)
196
197
  this.input = el;
197
198
  } }), this.displayCharacterLeft && this.maxlength > 0 && (h("mg-character-left", { identifier: this.characterLeftId, characters: this.value, maxlength: this.maxlength }))), h("slot", { name: "append-input" })));
@@ -236,7 +237,7 @@ function defineCustomElement() {
236
237
  if (typeof customElements === "undefined") {
237
238
  return;
238
239
  }
239
- const components = ["mg-input-text", "mg-character-left", "mg-icon", "mg-input-title", "mg-tooltip"];
240
+ const components = ["mg-input-text", "mg-character-left", "mg-icon", "mg-input-title", "mg-tooltip", "mg-tooltip-content"];
240
241
  components.forEach(tagName => { switch (tagName) {
241
242
  case "mg-input-text":
242
243
  if (!customElements.get(tagName)) {
@@ -245,20 +246,25 @@ function defineCustomElement() {
245
246
  break;
246
247
  case "mg-character-left":
247
248
  if (!customElements.get(tagName)) {
248
- defineCustomElement$4();
249
+ defineCustomElement$5();
249
250
  }
250
251
  break;
251
252
  case "mg-icon":
252
253
  if (!customElements.get(tagName)) {
253
- defineCustomElement$3();
254
+ defineCustomElement$4();
254
255
  }
255
256
  break;
256
257
  case "mg-input-title":
257
258
  if (!customElements.get(tagName)) {
258
- defineCustomElement$2();
259
+ defineCustomElement$3();
259
260
  }
260
261
  break;
261
262
  case "mg-tooltip":
263
+ if (!customElements.get(tagName)) {
264
+ defineCustomElement$2();
265
+ }
266
+ break;
267
+ case "mg-tooltip-content":
262
268
  if (!customElements.get(tagName)) {
263
269
  defineCustomElement$1();
264
270
  }
@@ -2,10 +2,11 @@ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/i
2
2
  import { M as MgInput } from './MgInput.js';
3
3
  import { C as ClassList } from './components.utils.js';
4
4
  import { i as initLocales } from './index2.js';
5
- import { d as defineCustomElement$5 } from './mg-character-left2.js';
6
- import { d as defineCustomElement$4 } from './mg-icon2.js';
7
- import { d as defineCustomElement$3 } from './mg-input-title2.js';
8
- import { d as defineCustomElement$2 } from './mg-tooltip2.js';
5
+ import { d as defineCustomElement$6 } from './mg-character-left2.js';
6
+ import { d as defineCustomElement$5 } from './mg-icon2.js';
7
+ import { d as defineCustomElement$4 } from './mg-input-title2.js';
8
+ import { d as defineCustomElement$3 } from './mg-tooltip2.js';
9
+ import { d as defineCustomElement$2 } from './mg-tooltip-content2.js';
9
10
 
10
11
  const mgInputTextareaCss = ":host{display:block}.mg-input{display:flex;align-items:flex-start;min-height:var(--default-size);max-width:100%;margin-bottom:var(--mg-inputs-margin-bottom, 0);}.mg-input mg-input-title{flex-shrink:var(--mg-inputs-shrink, 1);width:var(--mg-inputs-title-width, auto);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-input.mg-input--label-on-top{flex-direction:column}.mg-input.mg-input--label-on-top .mg-input__input-container{width:100%}.mg-input__title{display:flex;align-items:baseline;margin-bottom:0.3rem}.mg-input__title mg-input-title{flex-shrink:1;width:auto;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-input__title mg-tooltip{margin-top:0}.mg-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-input__input-container{min-height:var(--default-size);}.mg-input__input-container>strong{display:inline-block;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);min-height:var(--font-size)}.mg-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-input__input-container .mg-input__help-text,.mg-input__input-container .mg-input__error{text-align:start;font-size:1.2rem}.mg-input__input{display:flex;}.mg-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input__input.mg-input__input--has-error .mg-input__box{border-color:hsl(var(--color-danger))}.mg-input__input+.mg-input__help-text,.mg-input__input+.mg-input__error{margin-top:0.5rem}.mg-input__input .mg-input__box:disabled,.mg-input__input-group--disabled label,.mg-input.mg-input--toggle-disabled .mg-input__input .mg-input__button-toggle,.mg-input.mg-input--checkbox-multi-disabled .mg-input__input strong{opacity:var(--mg-disabled-opacity)}.mg-input__error{display:inline-block;margin-top:0.2rem;padding:0.3rem 0.8rem;border-radius:0.3rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}.mg-input__input mg-icon,.mg-input__error mg-icon{display:flex}.mg-input__box{padding:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2) var(--mg-inputs-spacer);height:var(--default-size);box-sizing:border-box;border-width:var(--mg-inputs-border-width);border-style:solid;border-color:var(--mg-inputs-color);border-radius:var(--mg-inputs-border-radius);background-color:hsl(var(--color-light));font-family:inherit;color:hsl(var(--color-dark));font-size:var(--font-size);text-align:var(--mg-inputs-text-align, left)}.mg-input__box::placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-input__box:focus{box-shadow:0 0 0.6rem hsl(var(--mg-inputs-color-shadow-focus-hsl), 0.5)}.mg-input__box:disabled{opacity:0.3}.mg-input.mg-input--is-input-group-append{--mg-button-border-radius-top-left:0;--mg-button-border-radius-bottom-left:0;}.mg-input.mg-input--is-input-group-append .mg-input__box{margin-right:-0.1rem;border-top-right-radius:0;border-bottom-right-radius:0}.mg-input.mg-input--is-input-group-append .mg-input__box:focus-visible{outline-style:solid;outline-offset:-0.2rem;outline-width:0.2rem}.mg-input.mg-input--is-input-group-append.mg-input--readonly slot[name=append-input]{display:none}.mg-input.mg-input--label-on-top .mg-input__box{width:auto;max-width:100%}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-button-border-radius-top-right:0;--mg-button-border-radius-bottom-right:0}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-button-border-right-width:0}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-button-border-radius-top-right:var(--mg-inputs-border-radius);--mg-button-border-radius-bottom-right:var(--mg-inputs-border-radius)}.mg-input.mg-input--is-append-input-slot-content:not(.mg-input--readonly) ::slotted([slot=append-input]){padding-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input.mg-input--width-full:not(.mg-input--label-on-top){justify-content:space-between}.mg-input.mg-input--width-full.mg-input--label-on-top .mg-input__box{width:100%}.mg-input.mg-input--width-full .mg-input__input-container{flex:auto;width:100%}.mg-input.mg-input--width-full .mg-input__input-container .mg-input__box{max-width:100%}.mg-input:not(.mg-input--label-on-top) .mg-input__box{width:100%;max-width:calc(17.7rem + var(--mg-inputs-spacer) * 2);min-width:5rem}.mg-input.mg-input--width-16 .mg-input__input-container{width:100%}.mg-input.mg-input--width-16 .mg-input__input-container .mg-input__input{width:100%;max-width:21rem}.mg-input.mg-input--width-16 .mg-input__input-container .mg-input__with-character-left{width:100%}.mg-input.mg-input--width-16 .mg-input__input-container .mg-input__box{max-width:21rem;min-width:100%}.mg-input.mg-input--width-4 .mg-input__input-container .mg-input__box{max-width:7rem}.mg-input.mg-input--width-2 .mg-input__input-container .mg-input__box{max-width:5rem}.mg-input mg-character-left{opacity:0.6;font-size:1.1rem}.mg-input.mg-input--has-display-character-left .mg-input__input+.mg-input__help-text,.mg-input.mg-input--has-display-character-left .mg-input__input+.mg-input__error{margin-top:0}.sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){.mg-a11y-animation{animation:none !important;transition:none !important}}.mg-input .mg-input__box{display:block;height:auto;resize:none}.mg-input .mg-input__box.mg-input__box--resizable{resize:both}.mg-input .mg-input__box.mg-input__box--resizable-horizontal{resize:horizontal}.mg-input .mg-input__box.mg-input__box--resizable-vertical{resize:vertical}.mg-input__with-character-left{width:100%}.mg-input__with-character-left mg-character-left{display:block;visibility:hidden;margin-top:0.2rem;text-align:end}.mg-input.is-focused .mg-input__with-character-left mg-character-left{visibility:visible}@-moz-document url-prefix(){.mg-input__box{overflow-x:hidden}}";
11
12
 
@@ -178,7 +179,7 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
178
179
  'mg-input__box--resizable': this.resizable === 'both',
179
180
  'mg-input__box--resizable-horizontal': this.resizable === 'horizontal',
180
181
  'mg-input__box--resizable-vertical': this.resizable === 'vertical',
181
- }, value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, rows: this.rows, maxlength: this.maxlength, disabled: this.disabled, required: this.required, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: el => {
182
+ }, value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, rows: this.rows, maxlength: this.maxlength, disabled: this.disabled, required: this.required, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: (el) => {
182
183
  if (el !== null)
183
184
  this.input = el;
184
185
  } }), this.displayCharacterLeft && this.maxlength > 0 && (h("mg-character-left", { identifier: this.characterLeftId, characters: this.value, maxlength: this.maxlength })))));
@@ -222,7 +223,7 @@ function defineCustomElement$1() {
222
223
  if (typeof customElements === "undefined") {
223
224
  return;
224
225
  }
225
- const components = ["mg-input-textarea", "mg-character-left", "mg-icon", "mg-input-title", "mg-tooltip"];
226
+ const components = ["mg-input-textarea", "mg-character-left", "mg-icon", "mg-input-title", "mg-tooltip", "mg-tooltip-content"];
226
227
  components.forEach(tagName => { switch (tagName) {
227
228
  case "mg-input-textarea":
228
229
  if (!customElements.get(tagName)) {
@@ -231,20 +232,25 @@ function defineCustomElement$1() {
231
232
  break;
232
233
  case "mg-character-left":
233
234
  if (!customElements.get(tagName)) {
234
- defineCustomElement$5();
235
+ defineCustomElement$6();
235
236
  }
236
237
  break;
237
238
  case "mg-icon":
238
239
  if (!customElements.get(tagName)) {
239
- defineCustomElement$4();
240
+ defineCustomElement$5();
240
241
  }
241
242
  break;
242
243
  case "mg-input-title":
243
244
  if (!customElements.get(tagName)) {
244
- defineCustomElement$3();
245
+ defineCustomElement$4();
245
246
  }
246
247
  break;
247
248
  case "mg-tooltip":
249
+ if (!customElements.get(tagName)) {
250
+ defineCustomElement$3();
251
+ }
252
+ break;
253
+ case "mg-tooltip-content":
248
254
  if (!customElements.get(tagName)) {
249
255
  defineCustomElement$2();
250
256
  }
@@ -1,9 +1,10 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { M as MgInput } from './MgInput.js';
3
3
  import { C as ClassList, a as allItemsAreString } from './components.utils.js';
4
- import { d as defineCustomElement$4 } from './mg-icon2.js';
5
- import { d as defineCustomElement$3 } from './mg-input-title2.js';
6
- import { d as defineCustomElement$2 } from './mg-tooltip2.js';
4
+ import { d as defineCustomElement$5 } from './mg-icon2.js';
5
+ import { d as defineCustomElement$4 } from './mg-input-title2.js';
6
+ import { d as defineCustomElement$3 } from './mg-tooltip2.js';
7
+ import { d as defineCustomElement$2 } from './mg-tooltip-content2.js';
7
8
 
8
9
  const mgInputToggleCss = ":host{display:block}.mg-input{display:flex;align-items:flex-start;min-height:var(--default-size);max-width:100%;margin-bottom:var(--mg-inputs-margin-bottom, 0);}.mg-input mg-input-title{flex-shrink:var(--mg-inputs-shrink, 1);width:var(--mg-inputs-title-width, auto);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-input.mg-input--label-on-top{flex-direction:column}.mg-input.mg-input--label-on-top .mg-input__input-container{width:100%}.mg-input__title{display:flex;align-items:baseline;margin-bottom:0.3rem}.mg-input__title mg-input-title{flex-shrink:1;width:auto;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-input__title mg-tooltip{margin-top:0}.mg-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-input__input-container{min-height:var(--default-size);}.mg-input__input-container>strong{display:inline-block;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);min-height:var(--font-size)}.mg-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-input__input-container .mg-input__help-text,.mg-input__input-container .mg-input__error{text-align:start;font-size:1.2rem}.mg-input__input{display:flex;}.mg-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input__input.mg-input__input--has-error .mg-input__box{border-color:hsl(var(--color-danger))}.mg-input__input+.mg-input__help-text,.mg-input__input+.mg-input__error{margin-top:0.5rem}.mg-input__input .mg-input__box:disabled,.mg-input__input-group--disabled label,.mg-input.mg-input--toggle-disabled .mg-input__input .mg-input__button-toggle,.mg-input.mg-input--checkbox-multi-disabled .mg-input__input strong{opacity:var(--mg-disabled-opacity)}.mg-input__error{display:inline-block;margin-top:0.2rem;padding:0.3rem 0.8rem;border-radius:0.3rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}.mg-input__input mg-icon,.mg-input__error mg-icon{display:flex}.sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){.mg-a11y-animation{animation:none !important;transition:none !important}}.mg-input.mg-input.mg-input--toggle .mg-input__input-container{flex:auto;min-width:0}.mg-input__button-toggle{display:flex;padding:0.2rem;min-width:0;background-color:hsl(var(--color-light));border-width:var(--mg-inputs-border-width);border-style:solid;border-color:var(--mg-inputs-color);border-radius:calc((var(--font-size) * var(--line-height) + 2 * (0.7rem + var(--mg-inputs-border-width))) / var(--mg-input-toggle-border-radius-ratio));font-family:var(--font-family);font-size:inherit;line-height:inherit;cursor:pointer}.mg-input__button-toggle:disabled{cursor:default}.mg-input__toggle-item-container{padding:0.5rem 0.9rem;border:0;box-sizing:border-box;border-radius:calc((var(--font-size) * var(--line-height) + 1rem) / var(--mg-input-toggle-border-radius-ratio));background-color:unset;font-weight:unset;color:hsl(var(--color-dark));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mg-input__toggle-item-container:first-of-type{font-weight:600;color:hsl(var(--color-info));background-color:hsl(var(--color-info-h), calc(var(--color-info-s) - 64%), calc(var(--color-info-l) + 55%))}.mg-input.mg-input--toggle-is-active .mg-input__toggle-item-container:first-of-type{background-color:unset;font-weight:unset;color:hsl(var(--color-dark))}.mg-input.mg-input--toggle-is-active .mg-input__toggle-item-container:last-of-type{font-weight:600;color:hsl(var(--color-info));background-color:hsl(var(--color-info-h), calc(var(--color-info-s) - 64%), calc(var(--color-info-l) + 55%))}.mg-input.mg-input--toggle-icon .mg-input__toggle-item-container{display:flex;justify-content:center;align-items:center;width:calc(var(--font-size) * var(--line-height) + 1rem);height:calc(var(--font-size) * var(--line-height) + 1rem);padding:0;visibility:hidden}.mg-input.mg-input--toggle-icon .mg-input__toggle-item-container:first-of-type{visibility:visible}.mg-input.mg-input--toggle-icon .mg-input__toggle-item-container ::slotted(mg-icon){display:flex}.mg-input.mg-input--toggle-icon.mg-input--toggle-is-active .mg-input__toggle-item-container:first-of-type{visibility:hidden}.mg-input.mg-input--toggle-icon.mg-input--toggle-is-active .mg-input__toggle-item-container:last-of-type{visibility:visible}.mg-input.mg-input--toggle-on-off .mg-input__toggle-item-container:first-of-type{font-weight:600;color:hsl(var(--color-dark));background-color:hsl(var(--color-dark-h), calc(var(--color-dark-s) - 30%), calc(var(--color-dark-l) + 75%))}.mg-input.mg-input--toggle-on-off.mg-input--toggle-is-active .mg-input__toggle-item-container:first-of-type{background-color:unset;font-weight:unset;color:hsl(var(--color-dark))}.mg-input.mg-input--toggle-readonly .mg-input__button-toggle{border-color:transparent;background-color:transparent;cursor:initial}.mg-input.mg-input--toggle-readonly .mg-input__toggle-item-container:last-of-type{display:none}.mg-input.mg-input--toggle-readonly.mg-input--toggle-is-active .mg-input__toggle-item-container:first-of-type{display:none}.mg-input.mg-input--toggle-readonly.mg-input--toggle-is-active .mg-input__toggle-item-container:last-of-type{display:flex}";
9
10
 
@@ -202,7 +203,7 @@ function defineCustomElement$1() {
202
203
  if (typeof customElements === "undefined") {
203
204
  return;
204
205
  }
205
- const components = ["mg-input-toggle", "mg-icon", "mg-input-title", "mg-tooltip"];
206
+ const components = ["mg-input-toggle", "mg-icon", "mg-input-title", "mg-tooltip", "mg-tooltip-content"];
206
207
  components.forEach(tagName => { switch (tagName) {
207
208
  case "mg-input-toggle":
208
209
  if (!customElements.get(tagName)) {
@@ -211,15 +212,20 @@ function defineCustomElement$1() {
211
212
  break;
212
213
  case "mg-icon":
213
214
  if (!customElements.get(tagName)) {
214
- defineCustomElement$4();
215
+ defineCustomElement$5();
215
216
  }
216
217
  break;
217
218
  case "mg-input-title":
218
219
  if (!customElements.get(tagName)) {
219
- defineCustomElement$3();
220
+ defineCustomElement$4();
220
221
  }
221
222
  break;
222
223
  case "mg-tooltip":
224
+ if (!customElements.get(tagName)) {
225
+ defineCustomElement$3();
226
+ }
227
+ break;
228
+ case "mg-tooltip-content":
223
229
  if (!customElements.get(tagName)) {
224
230
  defineCustomElement$2();
225
231
  }
@@ -1,13 +1,14 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { i as initLocales } from './index2.js';
3
3
  import { D as Direction } from './mg-menu.conf.js';
4
- import { d as defineCustomElement$8 } from './mg-badge2.js';
5
- import { d as defineCustomElement$7 } from './mg-button2.js';
6
- import { d as defineCustomElement$6 } from './mg-card2.js';
7
- import { d as defineCustomElement$5 } from './mg-icon2.js';
8
- import { d as defineCustomElement$4 } from './mg-menu2.js';
9
- import { d as defineCustomElement$3 } from './mg-menu-item2.js';
10
- import { d as defineCustomElement$2 } from './mg-popover2.js';
4
+ import { d as defineCustomElement$9 } from './mg-badge2.js';
5
+ import { d as defineCustomElement$8 } from './mg-button2.js';
6
+ import { d as defineCustomElement$7 } from './mg-card2.js';
7
+ import { d as defineCustomElement$6 } from './mg-icon2.js';
8
+ import { d as defineCustomElement$5 } from './mg-menu2.js';
9
+ import { d as defineCustomElement$4 } from './mg-menu-item2.js';
10
+ import { d as defineCustomElement$3 } from './mg-popover2.js';
11
+ import { d as defineCustomElement$2 } from './mg-popover-content2.js';
11
12
 
12
13
  /**
13
14
  * MgItemMore type guard
@@ -178,7 +179,9 @@ const MgItemMore$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
178
179
  // manage click on proxy to mirror it on initial element
179
180
  proxy.addEventListener('click', () => {
180
181
  // be carefull to use element.click() method instead of dispatchEvent to ensure bubbles outside shadowDom
181
- allMenuItem[index].shadowRoot.querySelector('a, button').click();
182
+ const navElement = allMenuItem[index].shadowRoot.querySelector('a, button');
183
+ if (navElement instanceof HTMLButtonElement || navElement instanceof HTMLAnchorElement)
184
+ navElement.click();
182
185
  });
183
186
  // add id suffix to prevent duplicate key. default html id is: '';
184
187
  if (proxy.id.trim() !== '')
@@ -242,7 +245,7 @@ const MgItemMore$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
242
245
  * @returns HTML Element
243
246
  */
244
247
  render() {
245
- return (h(Host, { role: "menuitem", "aria-haspopup": "true" }, h("mg-menu-item", { "data-overflow-more": true, "data-size": this.parentMenu.size }, h("mg-icon", { icon: this.icon.icon, slot: "image" }), h("span", { class: { 'sr-only': !this.slotlabel.display }, slot: "label" }, this.slotlabel.label), h("mg-menu", { direction: Direction.VERTICAL, label: this.messages.moreLabel, size: this.size }))));
248
+ return (h(Host, { role: "listitem" }, h("mg-menu-item", { "data-overflow-more": true, "data-size": this.parentMenu.size }, h("mg-icon", { icon: this.icon.icon, slot: "image" }), h("span", { class: { 'sr-only': !this.slotlabel.display }, slot: "label" }, this.slotlabel.label), h("mg-menu", { direction: Direction.VERTICAL, label: this.messages.moreLabel, size: this.size }))));
246
249
  }
247
250
  get element() { return this; }
248
251
  static get watchers() { return {
@@ -261,7 +264,7 @@ function defineCustomElement$1() {
261
264
  if (typeof customElements === "undefined") {
262
265
  return;
263
266
  }
264
- const components = ["mg-item-more", "mg-badge", "mg-button", "mg-card", "mg-icon", "mg-menu", "mg-menu-item", "mg-popover"];
267
+ const components = ["mg-item-more", "mg-badge", "mg-button", "mg-card", "mg-icon", "mg-menu", "mg-menu-item", "mg-popover", "mg-popover-content"];
265
268
  components.forEach(tagName => { switch (tagName) {
266
269
  case "mg-item-more":
267
270
  if (!customElements.get(tagName)) {
@@ -270,35 +273,40 @@ function defineCustomElement$1() {
270
273
  break;
271
274
  case "mg-badge":
272
275
  if (!customElements.get(tagName)) {
273
- defineCustomElement$8();
276
+ defineCustomElement$9();
274
277
  }
275
278
  break;
276
279
  case "mg-button":
277
280
  if (!customElements.get(tagName)) {
278
- defineCustomElement$7();
281
+ defineCustomElement$8();
279
282
  }
280
283
  break;
281
284
  case "mg-card":
282
285
  if (!customElements.get(tagName)) {
283
- defineCustomElement$6();
286
+ defineCustomElement$7();
284
287
  }
285
288
  break;
286
289
  case "mg-icon":
287
290
  if (!customElements.get(tagName)) {
288
- defineCustomElement$5();
291
+ defineCustomElement$6();
289
292
  }
290
293
  break;
291
294
  case "mg-menu":
292
295
  if (!customElements.get(tagName)) {
293
- defineCustomElement$4();
296
+ defineCustomElement$5();
294
297
  }
295
298
  break;
296
299
  case "mg-menu-item":
297
300
  if (!customElements.get(tagName)) {
298
- defineCustomElement$3();
301
+ defineCustomElement$4();
299
302
  }
300
303
  break;
301
304
  case "mg-popover":
305
+ if (!customElements.get(tagName)) {
306
+ defineCustomElement$3();
307
+ }
308
+ break;
309
+ case "mg-popover-content":
302
310
  if (!customElements.get(tagName)) {
303
311
  defineCustomElement$2();
304
312
  }
@@ -2,11 +2,12 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
2
2
  import { c as createID, C as ClassList } from './components.utils.js';
3
3
  import { i as initLocales } from './index2.js';
4
4
  import { D as Direction } from './mg-menu.conf.js';
5
- import { d as defineCustomElement$5 } from './mg-badge2.js';
6
- import { d as defineCustomElement$4 } from './mg-button2.js';
7
- import { d as defineCustomElement$3 } from './mg-card2.js';
8
- import { d as defineCustomElement$2 } from './mg-icon2.js';
9
- import { d as defineCustomElement$1 } from './mg-popover2.js';
5
+ import { d as defineCustomElement$6 } from './mg-badge2.js';
6
+ import { d as defineCustomElement$5 } from './mg-button2.js';
7
+ import { d as defineCustomElement$4 } from './mg-card2.js';
8
+ import { d as defineCustomElement$3 } from './mg-icon2.js';
9
+ import { d as defineCustomElement$2 } from './mg-popover2.js';
10
+ import { d as defineCustomElement$1 } from './mg-popover-content2.js';
10
11
 
11
12
  /**
12
13
  * Available menu-item positions
@@ -295,7 +296,7 @@ const MgMenuItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
295
296
  */
296
297
  renderInteractiveElement() {
297
298
  const TagName = this.href !== undefined ? 'a' : 'button';
298
- return (h(TagName, { href: this.href, class: this.navigationButtonClassList.join(), tabindex: [Status.DISABLED, Status.HIDDEN].includes(this.status) ? -1 : 0, disabled: this.status === Status.DISABLED, hidden: this.status === Status.HIDDEN, "aria-expanded": this.hasChildren && this.expanded.toString(), "aria-current": this.status === Status.ACTIVE && 'page', onClick: this.handleElementCLick }, h("slot", { name: "image" }), h("div", { class: `${this.navigationButton}-center` }, h("div", { class: `${this.navigationButton}-text-content` }, h("slot", { name: "label" }), !this.displayNotificationBadge && h("slot", { name: "information" }), this.displayNotificationBadge && (h("span", { class: "mg-menu-item__navigation-button-text-content-notification" }, h("mg-badge", { label: this.badgeLabel, value: "!", variant: "text-color", slot: "information" })))), this.size !== 'regular' && h("slot", { name: "metadata" })), this.hasChildren && this.href === undefined && (h("span", { class: {
299
+ return (h(TagName, { href: this.href, class: this.navigationButtonClassList.join(), tabindex: [Status.DISABLED, Status.HIDDEN].includes(this.status) ? -1 : undefined, disabled: this.status === Status.DISABLED, hidden: this.status === Status.HIDDEN, "aria-expanded": this.hasChildren && this.expanded.toString(), "aria-current": this.status === Status.ACTIVE && 'page', onClick: this.handleElementCLick }, h("slot", { name: "image" }), h("div", { class: `${this.navigationButton}-center` }, h("div", { class: `${this.navigationButton}-text-content` }, h("slot", { name: "label" }), !this.displayNotificationBadge && h("slot", { name: "information" }), this.displayNotificationBadge && (h("span", { class: "mg-menu-item__navigation-button-text-content-notification" }, h("mg-badge", { label: this.badgeLabel, value: "!", variant: "text-color", slot: "information" })))), this.size !== 'regular' && h("slot", { name: "metadata" })), this.hasChildren && this.href === undefined && (h("span", { class: {
299
300
  [`${this.navigationButton}-chevron`]: true,
300
301
  [`${this.navigationButton}-chevron--rotate`]: this.expanded === true,
301
302
  'mg-a11y-animation': true,
@@ -310,7 +311,7 @@ const MgMenuItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
310
311
  [`${this.name}__collapse-container`]: true,
311
312
  [`${this.name}__collapse-container--first-level`]: (this.isInMainMenu || this.isItemMore) && this.isDirection(Direction.HORIZONTAL),
312
313
  });
313
- return (h(Host, { role: "listitem" }, this.displayPopover() ? (h("mg-popover", { display: this.expanded, placement: "bottom-start", arrowHide: true, "onDisplay-change": this.handlePopoverDisplay, identifier: this.getPopoverIdentifier() }, this.renderInteractiveElement(), h("div", { class: getContainerClasses(), slot: "content" }, this.renderSlot()))) : ([
314
+ return (h(Host, { role: this.isItemMore ? 'presentation' : 'listitem' }, this.displayPopover() ? (h("mg-popover", { display: this.expanded, placement: "bottom-start", arrowHide: true, "onDisplay-change": this.handlePopoverDisplay, identifier: this.getPopoverIdentifier() }, this.renderInteractiveElement(), h("div", { class: getContainerClasses(), slot: "content" }, this.renderSlot()))) : ([
314
315
  this.renderInteractiveElement(),
315
316
  h("div", { key: "vertical-container", class: getContainerClasses(), hidden: !this.expanded }, this.renderSlot()),
316
317
  ])));
@@ -341,7 +342,7 @@ function defineCustomElement() {
341
342
  if (typeof customElements === "undefined") {
342
343
  return;
343
344
  }
344
- const components = ["mg-menu-item", "mg-badge", "mg-button", "mg-card", "mg-icon", "mg-popover"];
345
+ const components = ["mg-menu-item", "mg-badge", "mg-button", "mg-card", "mg-icon", "mg-popover", "mg-popover-content"];
345
346
  components.forEach(tagName => { switch (tagName) {
346
347
  case "mg-menu-item":
347
348
  if (!customElements.get(tagName)) {
@@ -350,25 +351,30 @@ function defineCustomElement() {
350
351
  break;
351
352
  case "mg-badge":
352
353
  if (!customElements.get(tagName)) {
353
- defineCustomElement$5();
354
+ defineCustomElement$6();
354
355
  }
355
356
  break;
356
357
  case "mg-button":
357
358
  if (!customElements.get(tagName)) {
358
- defineCustomElement$4();
359
+ defineCustomElement$5();
359
360
  }
360
361
  break;
361
362
  case "mg-card":
362
363
  if (!customElements.get(tagName)) {
363
- defineCustomElement$3();
364
+ defineCustomElement$4();
364
365
  }
365
366
  break;
366
367
  case "mg-icon":
367
368
  if (!customElements.get(tagName)) {
368
- defineCustomElement$2();
369
+ defineCustomElement$3();
369
370
  }
370
371
  break;
371
372
  case "mg-popover":
373
+ if (!customElements.get(tagName)) {
374
+ defineCustomElement$2();
375
+ }
376
+ break;
377
+ case "mg-popover-content":
372
378
  if (!customElements.get(tagName)) {
373
379
  defineCustomElement$1();
374
380
  }
@@ -5,6 +5,11 @@ import { d as defineCustomElement$4 } from './mg-button2.js';
5
5
  import { d as defineCustomElement$3 } from './mg-card2.js';
6
6
  import { d as defineCustomElement$2 } from './mg-icon2.js';
7
7
 
8
+ /**
9
+ * List of all possibles dialog roles
10
+ */
11
+ const dialogRoles = ['dialog', 'alertdialog'];
12
+
8
13
  const mgModalCss = ":host{--mg-card-border-radius:var(--mg-modal-border-radius);--mg-card-padding:1.5rem 2.5rem;--mg-card-border:none}.mg-modal{display:flex;justify-content:center;align-items:center;position:fixed;top:0;right:0;bottom:0;left:0;z-index:2000;padding:2rem 0;background-color:hsl(var(--color-light), 0.85)}.mg-modal mg-card{display:flex;width:60rem;max-width:100%;max-height:100%}.mg-modal__dialog{display:flex;position:relative;flex-direction:column;align-self:center;row-gap:3rem;height:fit-content;max-height:100%}.mg-modal__header{margin-bottom:0.5rem}.mg-modal__title{margin:0;font-family:var(--font-family-heading);font-size:var(--mg-modal-title-font-size);font-weight:600}.mg-modal__close-button{float:right;height:var(--mg-modal-title-font-size);margin-top:calc((var(--default-size) - var(--mg-modal-title-font-size) * var(--line-height)) / 2 * -1);margin-right:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2 * -1)}.mg-modal__content{overflow-y:auto}.mg-modal__content::slotted(*){font-size:var(--mg-modal-content-font-size)}.mg-modal.mg-modal--hide{display:none}.mg-modal ::slotted(*){--mg-card-border:var(--mg-card-border-default);--mg-card-padding:var(--mg-card-padding-default);--mg-card-border-radius:var(--mg-card-border-radius-default);--mg-card-background:var(--mg-card-background-default);--mg-card-box-shadow:var(--mg-card-box-shadow-default);--mg-card-max-width:unset;--mg-card-min-width:unset}";
9
14
 
10
15
  const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
@@ -80,13 +85,18 @@ const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
80
85
  this.hide = true;
81
86
  };
82
87
  this.identifier = createID('mg-modal');
88
+ this.dialogRole = dialogRoles[0];
83
89
  this.modalTitle = undefined;
84
90
  this.closeButton = false;
85
- this.hide = false;
91
+ this.hide = undefined;
86
92
  this.hasActions = false;
87
93
  this.hasContent = false;
88
94
  this.classCollection = new ClassList(['mg-modal']);
89
95
  }
96
+ validateDialogRole(newValue) {
97
+ if (!dialogRoles.includes(newValue))
98
+ throw new Error(`<mg-modal> prop "dialogRole" must be one of: ${dialogRoles.join(', ')}.`);
99
+ }
90
100
  validateModalTitle(newValue) {
91
101
  if (typeof newValue !== 'string' || newValue.trim() === '') {
92
102
  throw new Error('<mg-modal> prop "modalTitle" is required.');
@@ -103,7 +113,7 @@ const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
103
113
  if (this.modalFocusableElements.length > 0)
104
114
  this.modalFocusableElements[0].removeEventListener('keydown', this.handleFirstFocusableElement);
105
115
  }
106
- else {
116
+ else if (newValue === false) {
107
117
  this.componentShow.emit();
108
118
  this.classCollection.delete(this.classHide);
109
119
  document.body.style.overflow = 'hidden';
@@ -137,6 +147,7 @@ const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
137
147
  this.titleId = `${this.identifier}-title`;
138
148
  this.validateModalTitle(this.modalTitle);
139
149
  this.validateHide(this.hide);
150
+ this.validateDialogRole(this.dialogRole);
140
151
  }
141
152
  /**
142
153
  * Add observer on component to set focus when displayed
@@ -155,7 +166,7 @@ const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
155
166
  * @returns HTML Element
156
167
  */
157
168
  render() {
158
- return (h("div", { role: "alertdialog", id: this.identifier, class: this.classCollection.join(), tabindex: "-1", "aria-labelledby": this.titleId, "aria-modal": "true", "aria-hidden": this.hide }, h("mg-card", null, h("div", { class: "mg-modal__dialog" }, h("header", { class: "mg-modal__header" }, this.closeButton && (h("span", { class: "mg-modal__close-button" }, h("mg-button", { identifier: `${this.identifier}-close-button`, "is-icon": true, variant: "flat", label: this.messages.modal.closeButton, onClick: this.handleClose, ref: el => {
169
+ return (h("div", { role: this.dialogRole, id: this.identifier, class: this.classCollection.join(), tabindex: "-1", "aria-labelledby": this.titleId, "aria-modal": "true", "aria-hidden": this.hide }, h("mg-card", null, h("div", { class: "mg-modal__dialog" }, h("header", { class: "mg-modal__header" }, this.closeButton && (h("span", { class: "mg-modal__close-button" }, h("mg-button", { identifier: `${this.identifier}-close-button`, "is-icon": true, variant: "flat", label: this.messages.modal.closeButton, onClick: this.handleClose, ref: (el) => {
159
170
  if (el !== null) {
160
171
  // store closeButton Element
161
172
  this.closeButtonElement = el;
@@ -166,12 +177,14 @@ const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
166
177
  }
167
178
  get element() { return this; }
168
179
  static get watchers() { return {
180
+ "dialogRole": ["validateDialogRole"],
169
181
  "modalTitle": ["validateModalTitle"],
170
182
  "hide": ["validateHide"]
171
183
  }; }
172
184
  static get style() { return mgModalCss; }
173
185
  }, [1, "mg-modal", {
174
186
  "identifier": [1],
187
+ "dialogRole": [1, "dialog-role"],
175
188
  "modalTitle": [1, "modal-title"],
176
189
  "closeButton": [4, "close-button"],
177
190
  "hide": [1028],
@@ -1,11 +1,12 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { c as createID } from './components.utils.js';
3
3
  import { i as initLocales } from './index2.js';
4
- import { d as defineCustomElement$5 } from './mg-button2.js';
5
- import { d as defineCustomElement$4 } from './mg-icon2.js';
6
- import { d as defineCustomElement$3 } from './mg-input-select2.js';
7
- import { d as defineCustomElement$2 } from './mg-input-title2.js';
8
- import { d as defineCustomElement$1 } from './mg-tooltip2.js';
4
+ import { d as defineCustomElement$6 } from './mg-button2.js';
5
+ import { d as defineCustomElement$5 } from './mg-icon2.js';
6
+ import { d as defineCustomElement$4 } from './mg-input-select2.js';
7
+ import { d as defineCustomElement$3 } from './mg-input-title2.js';
8
+ import { d as defineCustomElement$2 } from './mg-tooltip2.js';
9
+ import { d as defineCustomElement$1 } from './mg-tooltip-content2.js';
9
10
 
10
11
  var NavigationAction;
11
12
  (function (NavigationAction) {
@@ -135,7 +136,7 @@ function defineCustomElement() {
135
136
  if (typeof customElements === "undefined") {
136
137
  return;
137
138
  }
138
- const components = ["mg-pagination", "mg-button", "mg-icon", "mg-input-select", "mg-input-title", "mg-tooltip"];
139
+ const components = ["mg-pagination", "mg-button", "mg-icon", "mg-input-select", "mg-input-title", "mg-tooltip", "mg-tooltip-content"];
139
140
  components.forEach(tagName => { switch (tagName) {
140
141
  case "mg-pagination":
141
142
  if (!customElements.get(tagName)) {
@@ -144,25 +145,30 @@ function defineCustomElement() {
144
145
  break;
145
146
  case "mg-button":
146
147
  if (!customElements.get(tagName)) {
147
- defineCustomElement$5();
148
+ defineCustomElement$6();
148
149
  }
149
150
  break;
150
151
  case "mg-icon":
151
152
  if (!customElements.get(tagName)) {
152
- defineCustomElement$4();
153
+ defineCustomElement$5();
153
154
  }
154
155
  break;
155
156
  case "mg-input-select":
156
157
  if (!customElements.get(tagName)) {
157
- defineCustomElement$3();
158
+ defineCustomElement$4();
158
159
  }
159
160
  break;
160
161
  case "mg-input-title":
161
162
  if (!customElements.get(tagName)) {
162
- defineCustomElement$2();
163
+ defineCustomElement$3();
163
164
  }
164
165
  break;
165
166
  case "mg-tooltip":
167
+ if (!customElements.get(tagName)) {
168
+ defineCustomElement$2();
169
+ }
170
+ break;
171
+ case "mg-tooltip-content":
166
172
  if (!customElements.get(tagName)) {
167
173
  defineCustomElement$1();
168
174
  }
@@ -1,13 +1,14 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { c as createID, C as ClassList } from './components.utils.js';
3
3
  import { i as initLocales } from './index2.js';
4
- import { d as defineCustomElement$8 } from './mg-button2.js';
5
- import { d as defineCustomElement$7 } from './mg-card2.js';
6
- import { d as defineCustomElement$6 } from './mg-character-left2.js';
7
- import { d as defineCustomElement$5 } from './mg-icon2.js';
8
- import { d as defineCustomElement$4 } from './mg-input-text2.js';
9
- import { d as defineCustomElement$3 } from './mg-input-title2.js';
10
- import { d as defineCustomElement$2 } from './mg-tooltip2.js';
4
+ import { d as defineCustomElement$9 } from './mg-button2.js';
5
+ import { d as defineCustomElement$8 } from './mg-card2.js';
6
+ import { d as defineCustomElement$7 } from './mg-character-left2.js';
7
+ import { d as defineCustomElement$6 } from './mg-icon2.js';
8
+ import { d as defineCustomElement$5 } from './mg-input-text2.js';
9
+ import { d as defineCustomElement$4 } from './mg-input-title2.js';
10
+ import { d as defineCustomElement$3 } from './mg-tooltip2.js';
11
+ import { d as defineCustomElement$2 } from './mg-tooltip-content2.js';
11
12
 
12
13
  /**
13
14
  * Available expand toggle display options
@@ -93,7 +94,7 @@ const MgPanel$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
93
94
  * Render input button
94
95
  * @returns edit title input
95
96
  */
96
- this.renderEditInput = () => (h("mg-input-text", { key: "edition-input", label: this.messages.panel.editLabel, "label-hide": true, value: this.panelTitle, "onValue-change": this.handleUpdateTitle, displayCharacterLeft: false, pattern: this.titlePattern, "pattern-error-message": this.titlePatternErrorMessage, identifier: `${this.identifier}-edition-input`, ref: el => (this.editInputElement = el) }, h("mg-button", { slot: "append-input", label: this.messages.general.cancel, "is-icon": true, variant: "secondary", onClick: this.handleCancelEditButton, identifier: `${this.identifier}-edition-button-cancel` }, h("mg-icon", { icon: "cross" })), h("mg-button", { slot: "append-input", label: this.messages.general.confirm, "is-icon": true, variant: "secondary", onClick: this.handleValidateEditButton, identifier: `${this.identifier}-edition-button-validate` }, h("mg-icon", { icon: "check" }))));
97
+ this.renderEditInput = () => (h("mg-input-text", { key: "edition-input", label: this.messages.panel.editLabel, "label-hide": true, value: this.panelTitle, "onValue-change": this.handleUpdateTitle, displayCharacterLeft: false, pattern: this.titlePattern, "pattern-error-message": this.titlePatternErrorMessage, identifier: `${this.identifier}-edition-input`, ref: (el) => (this.editInputElement = el) }, h("mg-button", { slot: "append-input", label: this.messages.general.cancel, "is-icon": true, variant: "secondary", onClick: this.handleCancelEditButton, identifier: `${this.identifier}-edition-button-cancel` }, h("mg-icon", { icon: "cross" })), h("mg-button", { slot: "append-input", label: this.messages.general.confirm, "is-icon": true, variant: "secondary", onClick: this.handleValidateEditButton, identifier: `${this.identifier}-edition-button-validate` }, h("mg-icon", { icon: "check" }))));
97
98
  /**
98
99
  * Render title
99
100
  * @returns title element
@@ -214,7 +215,7 @@ function defineCustomElement$1() {
214
215
  if (typeof customElements === "undefined") {
215
216
  return;
216
217
  }
217
- const components = ["mg-panel", "mg-button", "mg-card", "mg-character-left", "mg-icon", "mg-input-text", "mg-input-title", "mg-tooltip"];
218
+ const components = ["mg-panel", "mg-button", "mg-card", "mg-character-left", "mg-icon", "mg-input-text", "mg-input-title", "mg-tooltip", "mg-tooltip-content"];
218
219
  components.forEach(tagName => { switch (tagName) {
219
220
  case "mg-panel":
220
221
  if (!customElements.get(tagName)) {
@@ -223,35 +224,40 @@ function defineCustomElement$1() {
223
224
  break;
224
225
  case "mg-button":
225
226
  if (!customElements.get(tagName)) {
226
- defineCustomElement$8();
227
+ defineCustomElement$9();
227
228
  }
228
229
  break;
229
230
  case "mg-card":
230
231
  if (!customElements.get(tagName)) {
231
- defineCustomElement$7();
232
+ defineCustomElement$8();
232
233
  }
233
234
  break;
234
235
  case "mg-character-left":
235
236
  if (!customElements.get(tagName)) {
236
- defineCustomElement$6();
237
+ defineCustomElement$7();
237
238
  }
238
239
  break;
239
240
  case "mg-icon":
240
241
  if (!customElements.get(tagName)) {
241
- defineCustomElement$5();
242
+ defineCustomElement$6();
242
243
  }
243
244
  break;
244
245
  case "mg-input-text":
245
246
  if (!customElements.get(tagName)) {
246
- defineCustomElement$4();
247
+ defineCustomElement$5();
247
248
  }
248
249
  break;
249
250
  case "mg-input-title":
250
251
  if (!customElements.get(tagName)) {
251
- defineCustomElement$3();
252
+ defineCustomElement$4();
252
253
  }
253
254
  break;
254
255
  case "mg-tooltip":
256
+ if (!customElements.get(tagName)) {
257
+ defineCustomElement$3();
258
+ }
259
+ break;
260
+ case "mg-tooltip-content":
255
261
  if (!customElements.get(tagName)) {
256
262
  defineCustomElement$2();
257
263
  }
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface MgPopoverContent extends Components.MgPopoverContent, HTMLElement {}
4
+ export const MgPopoverContent: {
5
+ prototype: MgPopoverContent;
6
+ new (): MgPopoverContent;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { M as MgPopoverContent$1, d as defineCustomElement$1 } from './mg-popover-content2.js';
2
+
3
+ const MgPopoverContent = MgPopoverContent$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { MgPopoverContent, defineCustomElement };