@mgdis/mg-components 4.0.1 → 4.1.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 (120) hide show
  1. package/dist/.storybook/utils.js +24 -0
  2. package/dist/cjs/{index-a39c5567.js → index-179621c8.js} +11 -0
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/{mg-badge_21.cjs.entry.js → mg-badge_24.cjs.entry.js} +2362 -213
  5. package/dist/cjs/mg-components.cjs.js +2 -2
  6. package/dist/cjs/mg-modal.cjs.entry.js +1 -1
  7. package/dist/collection/collection-manifest.json +3 -1
  8. package/dist/collection/components/atoms/mg-badge/doc/mg-badge.stories.js +9 -5
  9. package/dist/collection/components/atoms/mg-button/doc/mg-button.stories.js +15 -12
  10. package/dist/collection/components/atoms/mg-button/mg-button.conf.js +4 -0
  11. package/dist/collection/components/atoms/mg-button/mg-button.js +46 -20
  12. package/dist/collection/components/atoms/mg-character-left/doc/mg-character-left.stories.js +9 -12
  13. package/dist/collection/components/atoms/mg-icon/doc/mg-icon.stories.js +11 -3
  14. package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +13 -0
  15. package/dist/collection/components/atoms/mg-input-title/doc/mg-input-title.stories.js +9 -9
  16. package/dist/collection/components/atoms/mg-tag/doc/mg-tag.stories.js +9 -7
  17. package/dist/collection/components/atoms/mg-tooltip/doc/mg-tooltip.stories.js +27 -8
  18. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +6 -0
  19. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +64 -11
  20. package/dist/collection/components/molecules/inputs/mg-input-checkbox/doc/mg-input-checkbox.stories.js +3 -15
  21. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +4 -3
  22. package/dist/collection/components/molecules/inputs/mg-input-date/doc/mg-input-date.stories.js +3 -12
  23. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +4 -3
  24. package/dist/collection/components/molecules/inputs/mg-input-numeric/doc/mg-input-numeric.stories.js +3 -14
  25. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +4 -3
  26. package/dist/collection/components/molecules/inputs/mg-input-password/doc/mg-input-password.stories.js +3 -14
  27. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +4 -3
  28. package/dist/collection/components/molecules/inputs/mg-input-radio/doc/mg-input-radio.stories.js +3 -14
  29. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +4 -3
  30. package/dist/collection/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.js +3 -16
  31. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +4 -3
  32. package/dist/collection/components/molecules/inputs/mg-input-text/doc/mg-input-text.stories.js +11 -22
  33. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +4 -3
  34. package/dist/collection/components/molecules/inputs/mg-input-textarea/doc/mg-input-textarea.stories.js +4 -13
  35. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +4 -3
  36. package/dist/collection/components/molecules/inputs/mg-input-toggle/doc/mg-input-toggle.stories.js +17 -38
  37. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +4 -3
  38. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +16 -7
  39. package/dist/collection/components/molecules/mg-details/doc/mg-details.stories.js +25 -0
  40. package/dist/collection/components/molecules/mg-details/mg-details.css +14 -0
  41. package/dist/collection/components/molecules/mg-details/mg-details.js +141 -0
  42. package/dist/collection/components/molecules/mg-form/doc/mg-form.stories.js +9 -6
  43. package/dist/collection/components/molecules/mg-form/mg-form.css +1 -1
  44. package/dist/collection/components/molecules/mg-form/mg-form.js +48 -4
  45. package/dist/collection/components/molecules/mg-illustrated-message/doc/mg-illustrated-message.stories.js +22 -0
  46. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.css +37 -0
  47. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +74 -0
  48. package/dist/collection/components/molecules/mg-message/doc/mg-message.stories.js +9 -15
  49. package/dist/collection/components/molecules/mg-modal/doc/mg-modal.stories.js +23 -31
  50. package/dist/collection/components/molecules/mg-pagination/doc/mg-pagination.stories.js +7 -11
  51. package/dist/collection/components/molecules/mg-panel/doc/mg-panel.stories.js +16 -26
  52. package/dist/collection/components/molecules/mg-panel/mg-panel.js +1 -6
  53. package/dist/collection/components/molecules/mg-popover/doc/mg-popover.stories.js +13 -17
  54. package/dist/collection/components/molecules/mg-popover/mg-popover.css +1 -1
  55. package/dist/collection/components/molecules/mg-popover/mg-popover.js +24 -8
  56. package/dist/collection/components/molecules/mg-tabs/doc/mg-tabs.stories.js +11 -12
  57. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +14 -14
  58. package/dist/collection/stories/helpers.stories.js +11 -3
  59. package/dist/collection/stories/icons.stories.js +10 -2
  60. package/dist/collection/stories/typography.stories.js +8 -1
  61. package/dist/collection/utils/components.utils.js +10 -0
  62. package/dist/components/components.utils.js +11 -1
  63. package/dist/components/index.d.ts +25 -23
  64. package/dist/components/index.js +2 -0
  65. package/dist/components/mg-button2.js +6 -14
  66. package/dist/components/mg-details.d.ts +11 -0
  67. package/dist/components/mg-details.js +87 -0
  68. package/dist/components/mg-form.js +35 -5
  69. package/dist/components/mg-icon2.js +13 -0
  70. package/dist/components/mg-illustrated-message.d.ts +11 -0
  71. package/dist/components/mg-illustrated-message.js +68 -0
  72. package/dist/components/mg-input-checkbox.js +1 -1
  73. package/dist/components/mg-input-date.js +1 -1
  74. package/dist/components/mg-input-numeric.js +1 -1
  75. package/dist/components/mg-input-password.js +1 -1
  76. package/dist/components/mg-input-radio.js +1 -1
  77. package/dist/components/mg-input-select2.js +1 -1
  78. package/dist/components/mg-input-text2.js +1 -1
  79. package/dist/components/mg-input-textarea.js +1 -1
  80. package/dist/components/mg-input-toggle.js +17 -8
  81. package/dist/components/mg-panel.js +0 -4
  82. package/dist/components/mg-popover.js +10 -9
  83. package/dist/components/mg-tabs.js +5 -4
  84. package/dist/components/mg-tooltip2.js +73 -11
  85. package/dist/esm/{index-e51ae032.js → index-7efedd97.js} +11 -1
  86. package/dist/esm/loader.js +2 -2
  87. package/dist/esm/{mg-badge_21.entry.js → mg-badge_24.entry.js} +2359 -213
  88. package/dist/esm/mg-components.js +2 -2
  89. package/dist/esm/mg-modal.entry.js +1 -1
  90. package/dist/mg-components/mg-components.css +1 -1
  91. package/dist/mg-components/mg-components.esm.js +1 -1
  92. package/dist/mg-components/p-5f89600c.js +1 -0
  93. package/dist/mg-components/{p-462d648a.entry.js → p-a2883dc7.entry.js} +1 -1
  94. package/dist/mg-components/p-cffe0519.entry.js +1 -0
  95. package/dist/types/components/atoms/mg-button/doc/mg-button.stories.d.ts +6 -0
  96. package/dist/types/components/atoms/mg-button/mg-button.conf.d.ts +8 -0
  97. package/dist/types/components/atoms/mg-button/mg-button.d.ts +11 -0
  98. package/dist/types/components/atoms/mg-character-left/doc/mg-character-left.stories.d.ts +0 -10
  99. package/dist/types/components/atoms/mg-tooltip/doc/mg-tooltip.stories.d.ts +1 -6
  100. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.conf.d.ts +5 -0
  101. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +25 -1
  102. package/dist/types/components/molecules/mg-details/doc/mg-details.stories.d.ts +11 -0
  103. package/dist/types/components/molecules/mg-details/mg-details.d.ts +49 -0
  104. package/dist/types/components/molecules/mg-form/mg-form.d.ts +13 -0
  105. package/dist/types/components/molecules/mg-illustrated-message/doc/mg-illustrated-message.stories.d.ts +6 -0
  106. package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.d.ts +28 -0
  107. package/dist/types/components/molecules/mg-popover/doc/mg-popover.stories.d.ts +4 -1
  108. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +6 -1
  109. package/dist/types/components.d.ts +95 -0
  110. package/dist/types/home/runner/work/mg-components/mg-components/.stencil/.storybook/utils.d.ts +1 -0
  111. package/dist/types/utils/components.utils.d.ts +8 -0
  112. package/package.json +11 -11
  113. package/dist/cjs/mg-popover.cjs.entry.js +0 -170
  114. package/dist/cjs/popper-71bf3058.js +0 -1790
  115. package/dist/esm/mg-popover.entry.js +0 -166
  116. package/dist/esm/popper-93ecb064.js +0 -1788
  117. package/dist/mg-components/p-4c66f794.js +0 -1
  118. package/dist/mg-components/p-5126ab10.entry.js +0 -1
  119. package/dist/mg-components/p-766c918b.entry.js +0 -1
  120. package/dist/mg-components/p-780bd52d.js +0 -1
@@ -3,8 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-88560a66.js');
6
- const index$1 = require('./index-a39c5567.js');
7
- const popper = require('./popper-71bf3058.js');
6
+ const index$1 = require('./index-179621c8.js');
8
7
 
9
8
  /**
10
9
  * List of all possibles variants
@@ -101,10 +100,6 @@ const MgButton = class {
101
100
  * If not set, it will be created.
102
101
  */
103
102
  this.identifier = index$1.createID('mg-button');
104
- /**
105
- * Disable button
106
- */
107
- this.disabled = false;
108
103
  /**
109
104
  * Define if button is round.
110
105
  * Used for icon button.
@@ -115,15 +110,6 @@ const MgButton = class {
115
110
  * Parent component have to remove the attribute 'disabled' when the process ends.
116
111
  */
117
112
  this.disableOnClick = false;
118
- /**
119
- * Prop to set aria-expanded on button element
120
- */
121
- this.expanded = false;
122
- /**
123
- * Option to set aria-haspopup
124
- * The aria-haspopup state informs assistive technology users that there is a popup and the type of popup it is, but provides no interactivity.
125
- */
126
- this.haspopup = false;
127
113
  /**
128
114
  * Define if button is loading, default to false.
129
115
  * Trigger when button is clicked or key-up ['enter', 'space], then value change to true.
@@ -202,7 +188,10 @@ const MgButton = class {
202
188
  * @returns {HTMLElement} html element
203
189
  */
204
190
  render() {
205
- return (index.h("button", { id: this.identifier, class: this.classList.join(), "aria-label": this.label, "aria-disabled": this.disabled.toString(), "aria-expanded": this.expanded, "aria-controls": this.controls, "aria-haspopup": this.haspopup, onClick: this.handleClick }, this.loading && index.h("mg-icon", { icon: "loader", spin: true }), index.h("div", { class: "mg-button__content" }, index.h("slot", null))));
191
+ return (index.h("button", { id: this.identifier, class: this.classList.join(), type: this.type, "aria-label": this.label, "aria-disabled": this.disabled !== undefined && this.disabled.toString(), "aria-expanded": this.expanded !== undefined && this.expanded.toString(), "aria-controls": this.controls, "aria-haspopup": this.haspopup !== undefined && this.haspopup.toString(), onClick: this.handleClick,
192
+ // has stencil does not support form attribute on button, we set the attribute from the ref
193
+ // https://github.com/ionic-team/stencil/issues/2703#issuecomment-1050943715
194
+ ref: btn => this.form && btn.setAttribute('form', this.form) }, this.loading && index.h("mg-icon", { icon: "loader", spin: true }), index.h("div", { class: "mg-button__content" }, index.h("slot", null))));
206
195
  }
207
196
  get element() { return index.getElement(this); }
208
197
  static get watchers() { return {
@@ -255,12 +244,68 @@ const MgCharacterLeft = class {
255
244
  };
256
245
  MgCharacterLeft.style = mgCharacterLeftCss;
257
246
 
258
- const mgFormCss = ".is-asterisk{color:hsl(var(--color-danger))}.mg-form,.mg-form-group{--mg-inputs-margin-bottom:1.5rem;--mg-inputs-title-horizontal-space:3rem;--mg-inputs-title-width:15rem;--mg-inputs-shrink:0}.mg-form.mg-form--all-required,.mg-form-group.mg-form--all-required{--mg-input-title-display:none}.mg-form>p,.mg-form-group>p{font-size:1.2rem}";
247
+ const mgDetailsCss = ".mg-details summary{display:flex;align-items:baseline;cursor:pointer}.mg-details__toggle{margin-left:1.5rem;flex-shrink:0}.mg-details__details{margin-top:1.5rem}";
248
+
249
+ const MgDetails = class {
250
+ constructor(hostRef) {
251
+ index.registerInstance(this, hostRef);
252
+ this.expandedChange = index.createEvent(this, "expanded-change", 7);
253
+ /**
254
+ * Define if details are diplayed
255
+ */
256
+ this.expanded = false;
257
+ /**
258
+ * Handle details toggle
259
+ *
260
+ * @returns {void}
261
+ */
262
+ this.handleToggle = () => {
263
+ this.expanded = this.details.open;
264
+ };
265
+ }
266
+ validateTitles(newValue) {
267
+ if (newValue === undefined || newValue === '') {
268
+ throw new Error('<mg-details> prop "toggleClosed" and "toggleOpened" must be defined.');
269
+ }
270
+ }
271
+ handleExpanded(newValue) {
272
+ this.expandedChange.emit(newValue);
273
+ }
274
+ /*************
275
+ * Lifecycle *
276
+ *************/
277
+ /**
278
+ * Check if component props are well configured on init
279
+ *
280
+ * @returns {void}
281
+ */
282
+ componentWillLoad() {
283
+ this.validateTitles(this.toggleClosed);
284
+ this.validateTitles(this.toggleOpened);
285
+ }
286
+ /**
287
+ * Render
288
+ *
289
+ * @returns {HTMLElement} HTML Element
290
+ */
291
+ render() {
292
+ return (index.h("details", { class: "mg-details", onToggle: this.handleToggle, open: this.expanded, ref: el => (this.details = el) }, index.h("summary", null, index.h("slot", { name: "summary" }), index.h("span", { class: "mg-details__toggle" }, index.h("mg-icon", { icon: this.expanded ? 'chevron-up' : 'chevron-down' }), " ", this.expanded ? this.toggleOpened : this.toggleClosed)), index.h("div", { class: "mg-details__details" }, index.h("slot", { name: "details" }))));
293
+ }
294
+ static get watchers() { return {
295
+ "toggleClosed": ["validateTitles"],
296
+ "toggleOpened": ["validateTitles"],
297
+ "expanded": ["handleExpanded"]
298
+ }; }
299
+ };
300
+ MgDetails.style = mgDetailsCss;
301
+
302
+ const mgFormCss = ".is-asterisk{color:hsl(var(--color-danger))}.mg-form,.mg-form-group{--mg-inputs-title-width:var(--mg-form-inputs-title-width, 15rem);--mg-inputs-margin-bottom:1.5rem;--mg-inputs-title-horizontal-space:3rem;--mg-inputs-shrink:0}.mg-form.mg-form--all-required,.mg-form-group.mg-form--all-required{--mg-input-title-display:none}.mg-form>p,.mg-form-group>p{font-size:1.2rem}";
259
303
 
260
304
  const MgForm = class {
261
305
  constructor(hostRef) {
262
306
  index.registerInstance(this, hostRef);
263
307
  this.formValid = index.createEvent(this, "form-valid", 7);
308
+ this.formSubmit = index.createEvent(this, "form-submit", 7);
264
309
  /**
265
310
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
266
311
  * If not set, it will be created.
@@ -314,6 +359,10 @@ const MgForm = class {
314
359
  this.invalid = !validity;
315
360
  this.formValid.emit(validity);
316
361
  };
362
+ this.handleFormSubmit = (event) => {
363
+ event.preventDefault();
364
+ this.formSubmit.emit();
365
+ };
317
366
  }
318
367
  /**
319
368
  * Public method to display errors
@@ -339,11 +388,17 @@ const MgForm = class {
339
388
  componentWillLoad() {
340
389
  // Get locales
341
390
  this.messages = index$1.initLocales(this.element).messages;
342
- // Get slotted mgIputs
391
+ // Get slotted mgInputs
343
392
  this.mgInputs = Array.from(this.element.querySelectorAll('*')).filter((node) => node.nodeName.startsWith('MG-INPUT-'));
393
+ // Get slotted mgButtons
394
+ this.mgButtons = Array.from(this.element.querySelectorAll('*')).filter((node) => node.nodeName.startsWith('MG-BUTTON'));
395
+ // Set button form identifier
396
+ this.mgButtons.forEach(mgButton => {
397
+ mgButton.setAttribute('form', this.identifier);
398
+ });
344
399
  // Define required message
345
400
  this.setRequiredMessage();
346
- // Check validity when slotted mgImputs are ready
401
+ // Check validity when slotted mgInputs are ready
347
402
  Promise.all(this.mgInputs.map(async (input) => {
348
403
  // Set inputs readonly or disabled based on form configuration
349
404
  // Othewise listen to events
@@ -353,18 +408,37 @@ const MgForm = class {
353
408
  input.disabled = true;
354
409
  else
355
410
  input.addEventListener('input-valid', this.checkValidity);
356
- await input.componentOnReady();
411
+ try {
412
+ await input.componentOnReady();
413
+ }
414
+ catch (_a) { } // prevent error with VueJS first render
357
415
  })).then(() => {
358
416
  this.checkValidity();
359
417
  });
360
418
  }
419
+ /**
420
+ * Add slot listeners
421
+ *
422
+ * @returns {void}
423
+ */
424
+ componentDidLoad() {
425
+ this.mgButtons.forEach(mgButton => {
426
+ // submit buttons should trigger form submition
427
+ const button = mgButton.querySelector('button');
428
+ if (['submit', null].includes(button.getAttribute('type'))) {
429
+ mgButton.addEventListener('click', () => {
430
+ this.form.dispatchEvent(new CustomEvent('submit', { bubbles: true }));
431
+ });
432
+ }
433
+ });
434
+ }
361
435
  /**
362
436
  * Render
363
437
  *
364
438
  * @returns {HTMLElement} HTML Element
365
439
  */
366
440
  render() {
367
- return (index.h("form", { class: this.classList.join(), id: this.identifier, name: this.name }, this.requiredMessage && index.h("p", { innerHTML: this.requiredMessage }), index.h("slot", null), !this.readonly && !this.disabled && index.h("slot", { name: "actions" })));
441
+ return (index.h("form", { class: this.classList.join(), id: this.identifier, name: this.name, ref: el => (this.form = el), onSubmit: this.handleFormSubmit }, this.requiredMessage && index.h("p", { innerHTML: this.requiredMessage }), index.h("slot", null), !this.readonly && !this.disabled && index.h("slot", { name: "actions" })));
368
442
  }
369
443
  get element() { return index.getElement(this); }
370
444
  };
@@ -381,12 +455,16 @@ const icons = {
381
455
  'align-right': () => (index.h("path", { fill: "currentColor", d: "M2.12 7.1h11.76c.25 0 .45-.21.45-.46v-.9c0-.25-.2-.45-.45-.45H2.12c-.25 0-.45.2-.45.45v.9c0 .25.2.45.45.46Zm11.76 5.42H2.12c-.25 0-.45.21-.45.46v.9c0 .25.2.45.45.45h11.76c.25 0 .45-.2.45-.45V13a.466.466 0 0 0-.44-.48h-.01ZM14 1.67H6.55a.36.36 0 0 0-.36.33v1.11c0 .2.16.36.36.37H14c.2 0 .36-.17.36-.37V2a.36.36 0 0 0-.36-.33Zm0 7.23H6.55c-.2 0-.36.17-.36.37v1.08c0 .2.16.36.36.36H14c.2 0 .36-.16.36-.36V9.27c0-.2-.16-.36-.36-.37Z" })),
382
456
  'api': () => (index.h("path", { fill: "currentColor", d: "M14.44 11.47h-.02l-.66-.1-.02-.08c-.03-.11-.08-.21-.13-.31l-.04-.07.4-.54v-.02l-.52-.52h-.02l-.54.41-.07-.04c-.1-.05-.2-.09-.31-.13l-.08-.02-.1-.67v-.01h-.73v.02l-.1.66-.08.02c-.11.03-.21.08-.31.13l-.07.04-.55-.41-.52.52v.02l.41.54-.04.07c-.05.1-.09.2-.13.31l-.02.08-.67.1h-.01v.73h.02l.66.1.02.08c.03.1.08.21.13.3l.04.07-.41.55.52.52h.02l.54-.41.07.04c.1.05.2.09.31.13l.08.02.1.67v.01h.73v-.02l.1-.66.08-.02c.11-.03.21-.08.31-.13l.07-.04.55.41.52-.52v-.02l-.4-.54.04-.07c.05-.1.09-.2.13-.31l.02-.08.67-.1h.01v-.73Zm-2.46 1.38c-.56 0-1.01-.45-1.01-1.01s.45-1.01 1.01-1.01 1.01.45 1.01 1.01-.45 1.01-1.01 1.01ZM8.51 5.81c-.11-.09-.27-.14-.5-.14h-.38v1.17h.27c.26 0 .45-.05.58-.15.13-.1.19-.25.19-.44s-.05-.34-.16-.43Zm1.57 5.13-.3-.4c-.1-.1-.09-.27 0-.37l.52-.52c.1-.1.26-.1.37 0l.4.29c.06-.03.13-.06.2-.08l.07-.49c0-.14.12-.25.26-.25h.45a5.44 5.44 0 1 0-10.5-1.99 5.44 5.44 0 0 0 5.44 5.44c.78 0 1.54-.17 2.25-.49v-.6c0-.14.11-.26.26-.26l.49-.07c.02-.07.05-.13.08-.2Zm.18-5.96h.84v3.94h-.84V4.98ZM5.4 8.92l-.29-.94H3.67l-.29.94h-.9l1.39-3.96h1.02l1.4 3.96h-.9Zm3.72-1.74c-.26.23-.64.34-1.13.34h-.36v1.4h-.84V4.98h1.26c.48 0 .84.1 1.09.31.25.21.37.51.37.92 0 .42-.13.75-.4.97ZM4.4 5.57c-.06.23-.23.8-.51 1.71h1.03c-.26-.85-.41-1.33-.45-1.44-.03-.11-.06-.2-.07-.26Z" })),
383
457
  'arrow-down': () => (index.h("path", { fill: "currentColor", d: "M13,10.1H10.23a.31.31,0,0,1-.32-.28h0V.94A.3.3,0,0,0,9.59.65H6.37A.32.32,0,0,0,6,.94H6V9.81a.29.29,0,0,1-.31.29H3a.3.3,0,0,0-.31.29.27.27,0,0,0,.08.22l5.06,4.58a.36.36,0,0,0,.46,0l5-4.58a.29.29,0,0,0,0-.42C13.22,10.1,13.12,10.1,13,10.1Z" })),
458
+ 'arrow-down-right': () => (index.h("path", { fill: "currentColor", d: "m1.98 3.47 8.75 8.75H6.94c-.58 0-1.05.47-1.05 1.06s.47 1.05 1.05 1.05h6.33c.58 0 1.05-.47 1.05-1.05V6.94a1.05 1.05 0 1 0-2.1 0v3.79L3.47 1.98c-.41-.41-1.08-.41-1.49 0-.41.41-.41 1.08 0 1.49Z" })),
384
459
  'arrow-left': () => (index.h("path", { fill: "currentColor", d: "M5.88,12.93V10.18a.3.3,0,0,1,.28-.32H15a.31.31,0,0,0,.29-.33h0V6.32A.31.31,0,0,0,15,6H6.17a.32.32,0,0,1-.29-.31h0V2.93a.3.3,0,0,0-.28-.32.32.32,0,0,0-.23.09L.79,7.76a.36.36,0,0,0,0,.46l4.58,5a.31.31,0,0,0,.43,0A.4.4,0,0,0,5.88,12.93Z" })),
385
460
  'arrow-right': () => (index.h("path", { fill: "currentColor", d: "M10.16,3V5.75a.3.3,0,0,1-.28.32H1a.31.31,0,0,0-.29.33h0V9.61A.31.31,0,0,0,1,9.94H9.87a.29.29,0,0,1,.29.31h0V13a.3.3,0,0,0,.28.32.32.32,0,0,0,.23-.09l4.58-5.06a.36.36,0,0,0,0-.46l-4.58-5a.3.3,0,0,0-.42,0C10.16,2.76,10.16,2.87,10.16,3Z" })),
386
461
  'arrow-rotate': () => (index.h("path", { fill: "currentColor", d: "M8.02 1.67c-1.6 0-3.15.59-4.33 1.67a6.316 6.316 0 0 0-.38 8.94 6.324 6.324 0 0 0 8.94.37.29.29 0 0 0 0-.42l-1-1a.296.296 0 0 0-.41 0 4.302 4.302 0 0 1-5.76-.09 4.276 4.276 0 0 1-.21-6.06 4.276 4.276 0 0 1 6.06-.21L9.86 5.95c-.11.12-.18.27-.18.43 0 .34.28.62.62.62h3.44c.34-.01.6-.29.59-.63V2.94a.62.62 0 0 0-.18-.44.61.61 0 0 0-.85 0l-.91.91a6.37 6.37 0 0 0-4.38-1.75h.02Z" })),
387
462
  'arrow-rotate-backward': () => (index.h("path", { fill: "currentColor", d: "M8 1.67c-1.63 0-3.2.63-4.38 1.75l-.91-.91a.6.6 0 0 0-.85-.01h-.01a.62.62 0 0 0-.18.44v3.43c-.01.34.25.62.59.63H5.7c.34 0 .62-.28.62-.62 0-.16-.07-.31-.18-.43L5.07 4.87a4.276 4.276 0 0 1 6.06.21 4.276 4.276 0 0 1-.21 6.06 4.302 4.302 0 0 1-5.76.09.296.296 0 0 0-.41 0l-1 1a.29.29 0 0 0 0 .42 6.324 6.324 0 0 0 8.94-.37 6.316 6.316 0 0 0-.38-8.94 6.365 6.365 0 0 0-4.33-1.67Z" })),
388
463
  'arrow-up': () => (index.h("path", { fill: "currentColor", d: "M3.06,5.82H5.81a.31.31,0,0,1,.32.28h0V15a.31.31,0,0,0,.33.29H9.67A.3.3,0,0,0,10,15h0V6.11a.3.3,0,0,1,.31-.29h2.75a.3.3,0,0,0,.23-.51L8.23.73a.36.36,0,0,0-.46,0l-5,4.58a.3.3,0,0,0,0,.43C2.82,5.83,2.92,5.82,3.06,5.82Z" })),
464
+ 'arrow-up-right': () => (index.h("path", { fill: "currentColor", d: "m3.47 14.02 8.75-8.75v3.78c0 .58.47 1.05 1.06 1.05s1.05-.47 1.05-1.05V2.72c0-.58-.47-1.05-1.05-1.05H6.94a1.05 1.05 0 1 0 0 2.1h3.78l-8.74 8.76c-.41.41-.41 1.08 0 1.49s1.08.41 1.49 0Z" })),
389
465
  'arrow-up-right-square': () => (index.h("path", { fill: "currentColor", d: "M14.33 3v10A1.34 1.34 0 0 1 13 14.33H3A1.34 1.34 0 0 1 1.67 13V3A1.34 1.34 0 0 1 3 1.67h10A1.34 1.34 0 0 1 14.33 3Zm-2.48.46H8.68a.67.67 0 0 0-.68.7.63.63 0 0 0 .2.47l.91.91-5.53 5.53a.33.33 0 0 0 0 .48l.87.87a.33.33 0 0 0 .48 0l5.53-5.52.91.9a.69.69 0 0 0 1 0 .71.71 0 0 0 .19-.48V4.15a.67.67 0 0 0-.67-.67Z" })),
466
+ 'arrows-compare': () => index.h("path", { fill: "currentColor", d: "M5.81 9.47H.67v1.47h5.14v2.2l2.93-2.93-2.93-2.93v2.2Zm4.39-.73v-2.2h5.14V5.07H10.2v-2.2L7.27 5.8l2.93 2.93Z" }),
467
+ 'arrows-right-down': () => (index.h("path", { fill: "currentColor", d: "M10.68 10.78c.16.17.16.45-.02.61l-2.8 2.78a.43.43 0 0 1-.31.12.42.42 0 0 1-.31-.12l-2.8-2.78a.44.44 0 0 1 0-.62.44.44 0 0 1 .62 0l2.06 2.05V5.38H2.11c-.24 0-.44-.19-.44-.44 0-.24.2-.44.44-.44H8v8.32l2.06-2.05a.44.44 0 0 1 .62 0Zm3.53-6.14-2.78-2.8a.438.438 0 0 0-.61-.02.44.44 0 0 0 0 .62l2.05 2.06H8.89v.88h3.98l-2.05 2.06a.44.44 0 0 0 0 .62c.17.17.45.17.62 0l2.78-2.8s.07-.09.09-.14c.02-.05.03-.11.03-.17 0-.11-.04-.23-.12-.31Z" })),
390
468
  'arrows-right-left': () => (index.h("path", { fill: "currentColor", d: "M.73,5.65V5.23a.64.64,0,0,1,.64-.64H12V3.31a.64.64,0,0,1,.64-.64.63.63,0,0,1,.45.18L15.19,5a.63.63,0,0,1,0,.9L13.05,8A.65.65,0,0,1,12,7.57V6.29H1.37a.64.64,0,0,1-.64-.64Zm14,4.06H4.09V8.43A.64.64,0,0,0,3,8L.87,10.11a.63.63,0,0,0,0,.9L3,13.15a.64.64,0,0,0,.91,0,.61.61,0,0,0,.18-.45V11.41H14.73a.63.63,0,0,0,.64-.64h0v-.42a.63.63,0,0,0-.64-.64Z" })),
391
469
  'arrows-rotate': () => (index.h("path", { fill: "currentColor", d: "M14.3 6.37V2.94c0-.16-.06-.32-.18-.43a.6.6 0 0 0-.85 0l-.91.91a6.354 6.354 0 0 0-3.31-1.65 6.365 6.365 0 0 0-7.33 5.22h2.14c.16-.72.5-1.38 1-1.92v-.02a4.281 4.281 0 0 1 6.05-.18L9.84 6c-.1.1-.16.24-.18.38 0 .34.28.62.62.62h3.44c.33-.02.59-.3.58-.63ZM1.71 9.63v3.43c0 .16.06.32.18.43a.6.6 0 0 0 .85 0l.91-.91c.92.88 2.09 1.46 3.35 1.66 3.47.57 6.74-1.77 7.31-5.24h-2.14c-.17.74-.54 1.42-1.06 1.97a4.254 4.254 0 0 1-6.02.16l1.07-1.08c.11-.11.17-.27.17-.42A.63.63 0 0 0 5.72 9H2.28c-.33.03-.58.3-.57.63Z" })),
392
470
  'arrows-rotate-backward': () => (index.h("path", { fill: "currentColor", d: "M2.3,7h3.4c0.3,0,0.6-0.3,0.6-0.6c0-0.1-0.1-0.3-0.2-0.4L5.1,4.9c1.7-1.6,4.4-1.5,6,0.2c0,0,0,0,0,0 c0.5,0.5,0.8,1.2,1,1.9h2.1C13.7,3.5,10.4,1.2,7,1.8C5.7,2,4.6,2.6,3.6,3.4L2.7,2.5c-0.2-0.2-0.6-0.2-0.8,0c0,0,0,0,0,0l0,0 C1.8,2.6,1.7,2.8,1.7,2.9v3.4C1.7,6.7,1.9,7,2.3,7z M13.7,9h-3.4C9.9,9,9.7,9.3,9.7,9.6c0,0.2,0.1,0.3,0.2,0.4l1.1,1.1 c-1.7,1.6-4.4,1.5-6-0.2C4.4,10.4,4,9.7,3.8,9H1.7c0.6,3.5,3.9,5.8,7.3,5.2c1.3-0.2,2.4-0.8,3.3-1.7l0.9,0.9c0.2,0.2,0.6,0.2,0.8,0 c0,0,0,0,0,0l0,0c0.1-0.1,0.2-0.3,0.2-0.4V9.6C14.3,9.3,14.1,9,13.7,9z" })),
@@ -410,11 +488,15 @@ const icons = {
410
488
  'conversation': () => (index.h("path", { fill: "currentColor", d: "M11.22,6.48c0-2.11-2.36-3.81-5.28-3.81S.67,4.37.67,6.48a3.15,3.15,0,0,0,1,2.19A5.17,5.17,0,0,1,.72,10a.2.2,0,0,0,0,.21.23.23,0,0,0,.19.12,4.79,4.79,0,0,0,2.25-.6,6.84,6.84,0,0,0,2.82.6C8.86,10.29,11.22,8.58,11.22,6.48Zm3.1,5.23a3.08,3.08,0,0,0,1-2.19C15.28,7.93,14,6.57,12,6a3.84,3.84,0,0,1,0,.48C12,9,9.3,11.05,6,11.05a7.16,7.16,0,0,1-.8-.05A5.6,5.6,0,0,0,10,13.33a6.7,6.7,0,0,0,2.82-.59,4.66,4.66,0,0,0,2.25.59.21.21,0,0,0,.19-.11.2.2,0,0,0,0-.21,5.15,5.15,0,0,1-.91-1.3Z" })),
411
489
  'cog': () => (index.h("path", { fill: "currentColor", d: "M14.82 9.76 13.56 9a5.54 5.54 0 0 0 0-2.07l1.26-.72a.36.36 0 0 0 .18-.38A7.5 7.5 0 0 0 13.37 3a.35.35 0 0 0-.44 0l-1.26.72a5.51 5.51 0 0 0-1.79-1V1.21a.34.34 0 0 0-.27-.34 7.29 7.29 0 0 0-3.22 0 .34.34 0 0 0-.28.34v1.45a5.83 5.83 0 0 0-1.79 1L3.06 3a.35.35 0 0 0-.43 0A7.24 7.24 0 0 0 1 5.83a.34.34 0 0 0 .16.41L2.44 7a5.49 5.49 0 0 0 0 2l-1.26.73a.35.35 0 0 0-.16.41A7.24 7.24 0 0 0 2.63 13a.35.35 0 0 0 .43.07l1.26-.73a5.56 5.56 0 0 0 1.79 1v1.45a.35.35 0 0 0 .28.34 7.29 7.29 0 0 0 3.22 0 .35.35 0 0 0 .28-.34v-1.45a6 6 0 0 0 1.79-1l1.26.73a.35.35 0 0 0 .43-.07A7.39 7.39 0 0 0 15 10.17a.37.37 0 0 0-.17-.41Zm-6.82.6A2.36 2.36 0 1 1 10.35 8 2.36 2.36 0 0 1 8 10.36Z" })),
412
490
  'comment': () => (index.h("path", { fill: "currentColor", d: "M8 1.67c-3.37-.12-6.21 2.51-6.33 5.88 0 1.36.5 2.68 1.41 3.69-.26 1-.72 1.94-1.36 2.76-.04.08-.04.17 0 .25.03.08.1.13.18.13 1.3-.03 2.54-.55 3.48-1.45.83.34 1.72.51 2.62.5 3.37.12 6.21-2.51 6.33-5.88-.12-3.37-2.96-6-6.33-5.88Zm2.53 8.43c0 .14-.11.25-.25.25H5.73c-.14 0-.25-.1-.26-.24V9.2c0-.17.13-.3.3-.31h4.5c.14 0 .26.12.26.26v.95Zm.92-3.29c0 .17-.13.3-.3.3h-6.3c-.17 0-.3-.13-.3-.3V6c0-.16.12-.29.28-.3H11.15c.16 0 .29.12.3.28V6.81Z" })),
491
+ 'comment-sms': () => (index.h("path", { fill: "currentColor", d: "M8 2.67c-3.37 0-6.1 2.21-6.1 4.95.02 1.18.51 2.3 1.36 3.11-.26.85-.71 1.62-1.3 2.28a.2.2 0 0 0-.04.21c.03.07.1.11.17.11 1.22-.02 2.4-.45 3.34-1.22.82.31 1.68.46 2.56.46 3.37 0 6.1-2.22 6.1-4.95S11.37 2.67 8 2.67M4.95 8.39a.76.76 0 1 1 .76-.76c0 .42-.34.76-.76.76m3.05 0a.76.76 0 1 1 .76-.76c0 .42-.34.76-.76.76m3.05 0a.76.76 0 1 1-.02-1.52c.42 0 .77.33.77.75v.01c0 .42-.34.76-.76.76" })),
413
492
  'credit-card': () => (index.h("path", { fill: "currentColor", d: "M14 2.67H2A1.33 1.33 0 0 0 .67 4v8A1.32 1.32 0 0 0 2 13.33h12A1.32 1.32 0 0 0 15.33 12V4A1.32 1.32 0 0 0 14 2.67M14 12H2V8h12Zm0-6.67H2V4h12Z" })),
414
493
  'cross': () => (index.h("path", { fill: "currentColor", d: "M14.26 12.74 9.52 8l4.7-4.7a.29.29 0 0 0 0-.41l-1.1-1.1a.29.29 0 0 0-.41 0L8 6.48 3.26 1.74a.24.24 0 0 0-.34 0L1.74 2.91a.24.24 0 0 0 0 .34L6.48 8l-4.7 4.7a.29.29 0 0 0 0 .41l1.1 1.1a.29.29 0 0 0 .41 0L8 9.52l4.74 4.74a.24.24 0 0 0 .34 0l1.17-1.17a.24.24 0 0 0 0-.34Z" })),
415
494
  'cross-circle': () => (index.h("path", { fill: "currentColor", d: "M8.06.67H8A7.33 7.33 0 0 0 .68 8v.1a7.42 7.42 0 0 0 7.23 7.23A7.33 7.33 0 1 0 8.06.67Zm3.6 9.57a.28.28 0 0 1 0 .4l-.19.2-.61.61-.2.19a.27.27 0 0 1-.39 0L8 9.41l-2.23 2.24a.27.27 0 0 1-.39 0l-.2-.2-.6-.6-.19-.2a.28.28 0 0 1 0-.4L6.6 8 4.36 5.76a.28.28 0 0 1 0-.4l1-1a.28.28 0 0 1 .4 0L8 6.59l2.24-2.24a.28.28 0 0 1 .4 0l.2.2.6.6.2.2a.28.28 0 0 1 0 .4L9.42 8Z" })),
495
+ 'dashboard': () => index.h("path", { fill: "currentColor", d: "M1.67 8.7H7.3V1.67H1.67v7.04Zm0 5.63H7.3v-4.22H1.67v4.22Zm7.04 0h5.63V7.3H8.71v7.04Zm0-12.67v4.23h5.63V1.67H8.71Z" }),
496
+ 'dashboard-outline': () => (index.h("path", { fill: "currentColor", d: "M13.33 2.67v2.22H9.7V2.67h3.63m-7.04 0V7.7H2.67V2.67H6.3m7.04 5.63v5.04H9.71V8.3h3.63M6.3 11.11v2.22H2.67v-2.22H6.3m8.03-9.44H8.7v4.22h5.63V1.67Zm-7.04 0H1.67v7.04H7.3V1.67Zm7.04 5.63H8.7v7.04h5.63V7.3Zm-7.04 2.81H1.67v4.22H7.3v-4.22Z" })),
416
497
  'download': () => (index.h("path", { fill: "currentColor", d: "M6.4 2v4.1c0 .2-.1.3-.3.3H4c-.2 0-.3.1-.3.3 0 .1 0 .2.1.2l4 4c.1.1.3.1.4 0l4-4c.1-.1.1-.3 0-.4-.1-.1-.1-.1-.2-.1H9.9c-.2 0-.3-.1-.3-.3V2c0-.2-.1-.3-.3-.3H6.7c-.1 0-.3.1-.3.3zm7.9 11v1c0 .2-.1.3-.3.3H2c-.2 0-.3-.1-.3-.3v-1c0-.2.1-.3.3-.3h12c.2 0 .3.1.3.3z" })),
417
498
  'euro': () => (index.h("path", { fill: "currentColor", d: "M13 13.14a.4.4 0 0 0-.47-.31A7.79 7.79 0 0 1 11 13a4.31 4.31 0 0 1-4-2.79h3.8a.41.41 0 0 0 .39-.31l.19-.9a.39.39 0 0 0-.3-.47H6.51a7.07 7.07 0 0 1 0-1.38h4.89a.4.4 0 0 0 .39-.31l.22-1a.4.4 0 0 0-.3-.47H7a4.2 4.2 0 0 1 3.92-2.45 6.57 6.57 0 0 1 1.26.14.41.41 0 0 0 .47-.29l.4-1.45a.4.4 0 0 0-.28-.48A9.43 9.43 0 0 0 11 .67a7.12 7.12 0 0 0-6.83 4.7h-1.1a.4.4 0 0 0-.4.39v1a.4.4 0 0 0 .4.39h.72a9.08 9.08 0 0 0 0 1.38h-.72a.39.39 0 0 0-.4.39v.93a.4.4 0 0 0 .4.39h1A7 7 0 0 0 11 15.3a8.7 8.7 0 0 0 2-.25.39.39 0 0 0 .3-.46l-.3-1.45Z" })),
499
+ 'euro-circle': () => (index.h("path", { fill: "currentColor", d: "M8 .67C3.95.67.67 3.95.67 8S3.95 15.33 8 15.33s7.33-3.28 7.33-7.33S12.05.67 8 .67Zm2.27 11.4c-.38.09-.76.14-1.15.14a4.038 4.038 0 0 1-3.99-2.92h-.58c-.13 0-.23-.1-.23-.22v-.54c0-.12.11-.22.23-.22h.41a5.34 5.34 0 0 1 0-.8h-.41c-.13 0-.23-.1-.23-.22v-.58c0-.13.11-.22.23-.22h.63c.6-1.65 2.18-2.74 3.94-2.71.34 0 .68.03 1.02.1.12.03.19.16.16.28l-.23.84c-.03.12-.15.19-.27.17-.24-.05-.48-.08-.73-.08A2.42 2.42 0 0 0 6.81 6.5h2.71c.12.03.2.15.17.27l-.13.58c-.02.1-.12.18-.22.18H6.52c-.03.26-.03.53 0 .8h2.63c.12.03.2.15.17.27l-.11.52c-.03.1-.12.18-.22.18H6.8c.36.96 1.28 1.6 2.31 1.61.3 0 .59-.04.88-.1.12-.02.24.05.27.18l.17.84c.02.12-.05.24-.17.27v-.03Z" })),
418
500
  'exclamation-circle': () => (index.h("path", { fill: "currentColor", d: "M8 15.33c4.05 0 7.33-3.28 7.33-7.33S12.05.67 8 .67.67 3.95.67 8 3.95 15.33 8 15.33Zm.95-3.3c0 .15-.12.27-.28.27h-1.4c-.15 0-.28-.12-.28-.27v-1.31c0-.15.12-.28.28-.28h1.4c.15 0 .28.12.28.28v1.31ZM7 3.96c0-.14.11-.25.25-.25H8.7c.14 0 .25.11.25.25v4.8c0 .14-.11.25-.25.25H7.25c-.14 0-.25-.11-.25-.25V3.95Z" })),
419
501
  'exclamation-triangle': () => (index.h("path", { fill: "currentColor", d: "m14.3 13.88-6-12a.32.32 0 0 0-.41-.15.31.31 0 0 0-.15.15l-6 12a.31.31 0 0 0 .14.42.32.32 0 0 0 .14 0H14a.31.31 0 0 0 .33-.29.23.23 0 0 0-.03-.13ZM7 6a.28.28 0 0 1 .28-.28h1.46A.28.28 0 0 1 9 6v4a.29.29 0 0 1-.28.29H7.3A.29.29 0 0 1 7 10Zm2 7a.31.31 0 0 1-.31.32H7.34A.32.32 0 0 1 7 13v-1.37a.31.31 0 0 1 .32-.31h1.39a.31.31 0 0 1 .31.31Z" })),
420
502
  'eye': () => [
@@ -447,6 +529,7 @@ const icons = {
447
529
  'folder': () => (index.h("path", { fill: "currentColor", d: "M14 4.44H8.46L6.62 2.67H2C1.27 2.67.68 3.27.67 4v8c0 .73.6 1.32 1.33 1.33h12c.73 0 1.32-.6 1.33-1.33V5.78c0-.73-.6-1.33-1.33-1.34Z" })),
448
530
  'folder-lines': () => (index.h("path", { fill: "currentColor", d: "M14 4.44H8.46L6.62 2.67H2A1.35 1.35 0 0 0 .67 4v8A1.35 1.35 0 0 0 2 13.33h12A1.35 1.35 0 0 0 15.33 12V5.78A1.36 1.36 0 0 0 14 4.44Zm-4.57 6.38a.2.2 0 0 1-.2.2H3.41a.2.2 0 0 1-.2-.2v-.9a.2.2 0 0 1 .2-.2h5.82a.2.2 0 0 1 .2.2Zm3.36-2.95a.2.2 0 0 1-.2.2H3.42a.2.2 0 0 1-.2-.2V7a.2.2 0 0 1 .2-.2h9.17a.2.2 0 0 1 .2.2Z" })),
449
531
  'folder-link': () => (index.h("path", { fill: "currentColor", d: "M14 4.44H8.46L6.62 2.67H2C1.27 2.67.68 3.27.67 4v8c0 .73.6 1.32 1.33 1.33h12c.73 0 1.32-.6 1.33-1.33V5.78c0-.73-.6-1.33-1.33-1.34Zm-6.82 6.88H5.65c-1.34 0-2.42-1.08-2.42-2.42 0-1.34 1.08-2.42 2.42-2.42h.84c.14 0 .25.11.25.25 0 .06-.02.13-.06.17-.2.21-.36.45-.49.71-.04.07-.11.13-.19.14h-.33c-.62-.15-1.24.22-1.39.84-.15.62.22 1.24.84 1.39.15.04.31.04.47.02h1.58c.62 0 1.12-.48 1.15-1.1v-.22c-.02-.08 0-.16.06-.22.12-.13.29-.2.47-.2h.45c.12 0 .23.09.25.21.02.14.02.29 0 .43 0 1.32-1.05 2.39-2.37 2.42Zm3.17 0h-.84c-.06 0-.13-.02-.17-.07-.1-.1-.1-.25 0-.35.2-.21.36-.45.49-.71.02-.09.08-.16.17-.19h.36c.63.04 1.18-.43 1.23-1.07.04-.63-.43-1.18-1.07-1.23H8.83c-.64 0-1.15.51-1.15 1.15v.25c.02.08 0 .16-.06.22-.12.13-.29.21-.47.21H6.7c-.13 0-.24-.09-.26-.22-.01-.14-.01-.27 0-.41a2.41 2.41 0 0 1 2.38-2.43h1.52c1.34 0 2.42 1.07 2.43 2.41 0 1.34-1.09 2.42-2.42 2.43Z" })),
532
+ 'folder-outline': () => (index.h("path", { fill: "currentColor", d: "m6.22 3.67 1.55 1.49.29.28h5.93c.19 0 .34.16.34.34v6.21c0 .18-.15.34-.33.34H2.01c-.18 0-.34-.15-.34-.33V4.01c0-.18.15-.34.33-.34h4.22m.4-1H2C1.27 2.67.68 3.27.67 4v8c0 .73.6 1.32 1.33 1.33h12c.73 0 1.32-.6 1.33-1.33V5.78c0-.73-.6-1.33-1.33-1.34H8.46L6.62 2.67Z" })),
450
533
  'folder-star': () => (index.h("path", { fill: "currentColor", d: "M14 4.44H8.46L6.62 2.67H2A1.35 1.35 0 0 0 .67 4v8A1.35 1.35 0 0 0 2 13.33h12A1.35 1.35 0 0 0 15.33 12V5.78A1.36 1.36 0 0 0 14 4.44Zm-.2 3.89L12 9.66l.69 2a.22.22 0 0 1-.08.27.26.26 0 0 1-.13.06.39.39 0 0 1-.15-.06l-1.77-1.26L8.75 12a.34.34 0 0 1-.15 0 .31.31 0 0 1-.13 0 .23.23 0 0 1-.08-.27l.69-2-1.81-1.35a.23.23 0 0 1-.1-.17.24.24 0 0 1 .24-.24h2.21l.67-2a.26.26 0 0 1 .15-.14.24.24 0 0 1 .31.14l.67 2h2.2a.26.26 0 0 1 .26.24.3.3 0 0 1-.08.12Z" })),
451
534
  'graduation-cap': () => (index.h("path", { fill: "currentColor", d: "M14.93 5.14 8.54 2.76c-.35-.13-.73-.13-1.08 0L1.07 5.14c-.31.13-.48.47-.39.8.04.22.19.39.39.47l1.12.42c-.26.38-.4.84-.41 1.3-.35.28-.47.75-.3 1.16.06.12.14.23.24.31l-.59 3.19c-.06.22.07.45.28.53h1.37c.22-.02.38-.22.36-.44v-.1L2.55 9.6c.32-.31.4-.79.2-1.18a.814.814 0 0 0-.24-.28c0-.38.18-.75.47-1l4.48 1.65c.35.13.73.13 1.08 0l6.39-2.38c.31-.13.48-.47.39-.8a.625.625 0 0 0-.39-.47Zm-6.18 4.5c-.48.18-1.02.18-1.5 0L3.93 8.4l-.33 3.15c0 1 2 1.78 4.4 1.78s4.4-.79 4.4-1.78l-.33-3.15-3.32 1.24Z" })),
452
535
  'history': () => [
@@ -478,7 +561,10 @@ const icons = {
478
561
  'paper-plane': () => (index.h("path", { fill: "currentColor", d: "M14 1.69 1.84 7a.28.28 0 0 0-.15.36.29.29 0 0 0 .16.15l3.27 1.82a.57.57 0 0 0 .61-.06l6.45-5.57c.05 0 .15-.1.19-.06s0 .14-.06.18l-5.59 6.29a.52.52 0 0 0 0 .63l2.09 3.44a.28.28 0 0 0 .37.12.3.3 0 0 0 .13-.12l5-12.11a.3.3 0 0 0-.14-.37.28.28 0 0 0-.17-.01Z" })),
479
562
  'paper-plane-slash': () => (index.h("path", { fill: "currentColor", d: "M2.67,1.69,14.26,13.28l-1,1-2.79-2.8-1.1,2.67a.3.3,0,0,1-.13.12.28.28,0,0,1-.37-.12L6.75,10.74a.52.52,0,0,1,0-.63L7.82,8.9l-.76-.76L5.76,9.27a.57.57,0,0,1-.61.06L1.88,7.51a.29.29,0,0,1-.16-.15A.28.28,0,0,1,1.87,7L4.68,5.76l-3-3Zm11.53,0a.28.28,0,0,0-.22,0L7.53,4.51,9.26,6.24l3-2.54s.15-.1.19-.06,0,.14-.06.18L9.75,6.73l1.88,1.88,2.71-6.54A.3.3,0,0,0,14.2,1.7Z" })),
480
563
  'pen': () => (index.h("path", { fill: "currentColor", d: "M1.67,11.69v2.64h2.64l7.78-7.78-2.64-2.64L1.67,11.69ZM14.13,4.51c.27-.28,.27-.72,0-1h0l-1.65-1.64c-.28-.27-.72-.27-1,0h0l-1.28,1.29,2.64,2.64,1.29-1.29Z" })),
564
+ 'pen-circle': () => (index.h("path", { fill: "currentColor", d: "M8 .44C3.82.44.44 3.82.44 8S3.83 15.56 8 15.56s7.56-3.39 7.56-7.56C15.56 3.82 12.18.44 8 .44M5.47 12.19H3.62v-1.85l5.46-5.45 1.85 1.86-5.45 5.45Zm6.88-6.89-.9.9-1.86-1.85.9-.9c.19-.19.51-.19.7 0l1.16 1.15c.19.19.19.51 0 .7" })),
481
565
  'pen-fancy': () => (index.h("path", { fill: "currentColor", d: "M3.63,8.65c-.24,.07-.43,.26-.5,.5l-1.46,4.37,.11,.12,2.3-2.3c0-.06,0-.13,0-.19,0-.44,.35-.8,.79-.81,.44,0,.8,.35,.81,.79,0,.44-.35,.8-.79,.81,0,0-.01,0-.02,0h-.19l-2.3,2.3,.12,.11,4.37-1.46c.24-.07,.43-.26,.5-.5l.82-2.08-2.49-2.48-2.07,.82ZM10.8,2.35L6.27,7.28l2.42,2.42,4.94-4.52c2.1-1.86-.99-4.92-2.83-2.83Z" })),
566
+ 'pen-fancy-outline': () => (index.h("path", { fill: "currentColor", d: "M12.24 1.67c-.49 0-1 .21-1.44.7L6.27 7.3l2.42 2.42 4.94-4.52c1.6-1.42.19-3.53-1.39-3.53ZM8.72 8.34 7.66 7.28l3.9-4.24c.22-.24.44-.36.69-.36.41 0 .87.34 1.03.78.14.37.04.7-.32 1.02L8.73 8.36ZM5.7 7.86l-2.08.82c-.24.08-.42.26-.5.5l-1.46 4.37.12.12.56.56.12.12 4.37-1.46c.24-.08.42-.26.5-.5l.81-2.08L5.7 7.87Zm-2.57 4.46L4 9.72c.03-.08.09-.15.17-.18l1.29-.51 1.52 1.52-.5 1.29c-.03.08-.1.15-.19.18l-2.6.87.95-.95c.06.02.12.04.19.04.44 0 .79-.35.79-.79s-.35-.79-.79-.79-.79.35-.79.79c0 .07.02.13.04.19l-.95.95Z" })),
567
+ 'phone': () => (index.h("path", { fill: "currentColor", d: "M13.97 10.62 11.2 9.43a.6.6 0 0 0-.69.17l-1.23 1.5A9.137 9.137 0 0 1 4.9 6.72l1.5-1.23c.21-.17.28-.45.17-.69L5.38 2.03a.589.589 0 0 0-.68-.34l-2.57.59a.59.59 0 0 0-.46.58c0 6.34 5.14 11.48 11.48 11.48.28 0 .52-.19.58-.46l.59-2.57a.595.595 0 0 0-.35-.68Z" })),
482
568
  'picture': () => (index.h("path", { fill: "currentColor", d: "M14.33 12.93V3.07a1.4 1.4 0 0 0-1.4-1.4H3.07a1.4 1.4 0 0 0-1.4 1.4v9.86a1.4 1.4 0 0 0 1.4 1.4h9.86a1.4 1.4 0 0 0 1.4-1.4ZM5.54 9.06l1.76 2.11L9.76 8l3.17 4.22H3.07Z" })),
483
569
  'play-circle': () => (index.h("path", { fill: "currentColor", d: "M8 .67A7.33 7.33 0 1 0 15.33 8 7.33 7.33 0 0 0 8 .67Zm3.42 8-5.2 3a.72.72 0 0 1-1-.28.73.73 0 0 1-.09-.35V4.92a.71.71 0 0 1 .71-.71 1.06 1.06 0 0 1 .35.09l5.2 3.17a.71.71 0 0 1 .27 1 .64.64 0 0 1-.24.24Z" })),
484
570
  'plus': () => (index.h("path", { fill: "currentColor", d: "M9.41 6.59V1.92a.24.24 0 0 0-.24-.25H6.84a.24.24 0 0 0-.25.24v4.68H1.92a.24.24 0 0 0-.25.24v2.33a.24.24 0 0 0 .24.25h4.68v4.67a.24.24 0 0 0 .24.25h2.33a.24.24 0 0 0 .25-.24V9.41h4.67a.24.24 0 0 0 .25-.24V6.84a.24.24 0 0 0-.24-.25H9.41Z" })),
@@ -507,6 +593,7 @@ const icons = {
507
593
  'user-circle': () => (index.h("path", { fill: "currentColor", d: "M8 .62C3.95.61.66 3.9.65 7.95c0 4.05 3.28 7.34 7.33 7.35 4.04 0 7.33-3.26 7.35-7.3.02-4.05-3.25-7.36-7.3-7.38H8Zm0 .75c3.64 0 6.59 2.96 6.58 6.6V8c0 1.35-.41 2.66-1.19 3.76a2.713 2.713 0 0 0-2.66-2.37H9.54c-.98.46-2.1.46-3.08 0H5.28c-1.36 0-2.5 1.02-2.67 2.37A6.483 6.483 0 0 1 1.42 8a6.59 6.59 0 0 1 6.55-6.63H8ZM5 5.63c0-1.68 1.37-3.05 3.05-3.05 1.68 0 3.05 1.37 3.05 3.05 0 1.68-1.37 3.05-3.05 3.05H8c-1.66-.03-3-1.39-3-3.05Z" })),
508
594
  'user-group': () => (index.h("path", { fill: "currentColor", d: "M13.15 4.12c-.81-.01-1.47.65-1.48 1.46 0 .82.65 1.47 1.46 1.48s1.47-.65 1.48-1.46-.65-1.47-1.46-1.48Zm-10.04.01a1.47 1.47 0 0 0-1.58 1.59c.06.71.62 1.28 1.34 1.34.81.07 1.52-.53 1.59-1.34.06-.81-.54-1.52-1.35-1.59Zm7.36.39c-.22-.84-.87-1.51-1.71-1.75-1.36-.41-2.8.36-3.22 1.72-.18.61-.13 1.27.14 1.85.41.9 1.33 1.48 2.32 1.45 1.41.01 2.56-1.14 2.57-2.55 0-.24-.03-.49-.1-.72Zm-.71 4h-.19c-.99.49-2.14.49-3.13 0h-.19c-1.46 0-2.64 1.18-2.64 2.64v2.69c1.23.93 2.74 1.47 4.39 1.47s3.17-.55 4.4-1.48v-2.68c0-1.46-1.18-2.64-2.64-2.64Zm5.52.25a7.282 7.282 0 0 1-1.65 3.91c-.08.1-.16.19-.25.28-.08.09-.17.18-.25.27v-.55h.03v-.72s.01-.07 0-.1v-.66c.01-1.25-.66-2.4-1.76-3 .27-.26.63-.41 1-.41h1.51c.63.01 1.17.41 1.37.98ZM2.86 11.16v1.52h.01v.55l-.28-.31c-.08-.08-.15-.16-.22-.24A7.238 7.238 0 0 1 .74 8.86c.16-.62.72-1.07 1.4-1.07h1.47c.37-.01.73.12 1.01.37-1.1.6-1.77 1.75-1.76 3Z" })),
509
595
  'user-plus': () => (index.h("path", { fill: "currentColor", d: "M14,3.33H12.65V2a.36.36,0,0,0-.35-.33h-.65A.36.36,0,0,0,11.3,2V3.33H10a.34.34,0,0,0-.33.34v.66a.34.34,0,0,0,.33.34H11.3V6a.37.37,0,0,0,.35.33h.65A.37.37,0,0,0,12.65,6V4.67H14a.34.34,0,0,0,.32-.34V3.67A.34.34,0,0,0,14,3.33ZM9.28,9.77h-.2a5.19,5.19,0,0,1-3.91,0H5A3,3,0,0,0,1.7,12.46h0v.72A1.27,1.27,0,0,0,3,14.33h8.25a1.26,1.26,0,0,0,1.36-1.14v-.68A3,3,0,0,0,9.37,9.76H9.28ZM7.13,3.7A2.64,2.64,0,1,1,4.5,6.34h0A2.64,2.64,0,0,1,7.13,3.7Z" })),
596
+ 'user-question-outline': () => (index.h("path", { fill: "currentColor", d: "M5.23 11.14c.86-.66 1.01-1.9.35-2.75s-1.9-1.01-2.75-.35a1.96 1.96 0 0 0 0 3.1c-.72.42-1.16 1.2-1.16 2.03v.8c0 .2.17.37.37.37h3.98c.2 0 .37-.17.37-.37v-.8c0-.83-.44-1.61-1.16-2.03ZM2.81 9.59c0-.67.55-1.22 1.22-1.22s1.22.55 1.22 1.22-.55 1.22-1.22 1.22-1.22-.55-1.22-1.22Zm2.83 4H2.41v-.42c0-.89.72-1.62 1.62-1.62s1.62.72 1.62 1.62v.42h-.01Zm7.13-11.93H8c-.86 0-1.56.7-1.56 1.56v7.16c0 .21.17.37.37.37.08 0 .16-.03.22-.07l1.49-1.12h4.25c.86 0 1.56-.7 1.56-1.56V3.22c0-.86-.7-1.56-1.56-1.56Zm.82 6.33c0 .45-.37.82-.82.82H8.4a.41.41 0 0 0-.22.07l-1 .75V3.22c0-.45.37-.82.82-.82h4.77c.45 0 .82.37.82.82v4.77Zm-2.8-.42c0 .23-.18.41-.41.41s-.41-.18-.41-.41.18-.41.41-.41c.23 0 .41.18.41.41Zm-.41-4.34c-.83 0-1.5.67-1.5 1.5 0 .23.18.41.41.41s.41-.18.41-.41c0-.38.31-.68.69-.68.38 0 .68.31.68.69 0 .38-.31.68-.68.68-.23 0-.41.18-.41.41v.44c0 .23.18.41.41.41s.41-.18.41-.41v-.09c.8-.23 1.26-1.06 1.04-1.85-.18-.65-.77-1.09-1.44-1.09Z" })),
510
597
  'users': () => (index.h("path", { fill: "currentColor", d: "M12,8.76h-.2a5.24,5.24,0,0,1-3.93,0H7.61a3.05,3.05,0,0,0-3.3,2.75v.69a1.28,1.28,0,0,0,1.38,1.14H14a1.27,1.27,0,0,0,1.37-1.14v-.69A3.07,3.07,0,0,0,12,8.75Zm-6.4-.32A2,2,0,0,0,4.31,8H2.48A1.69,1.69,0,0,0,.65,9.53v.76a.85.85,0,0,0,.91.76H3.45A3.58,3.58,0,0,1,5.61,8.44ZM9.81,2.66A2.65,2.65,0,1,1,7.16,5.31h0A2.65,2.65,0,0,1,9.81,2.66ZM3.31,4.18A1.51,1.51,0,1,1,1.8,5.69,1.51,1.51,0,0,1,3.31,4.18Z" })),
511
598
  'wallet': () => (index.h("path", { fill: "currentColor", d: "M13.88 5H3a.43.43 0 0 1-.46-.38.43.43 0 0 1 .46-.43h11a.43.43 0 0 0 .46-.38A1.28 1.28 0 0 0 13 2.67H2.5A1.7 1.7 0 0 0 .67 4.19v7.62a1.7 1.7 0 0 0 1.83 1.52h11.38a1.32 1.32 0 0 0 1.45-1.14V6.1A1.33 1.33 0 0 0 13.88 5Zm-1.21 5.29a1.1 1.1 0 1 1 1.1-1.1 1.1 1.1 0 0 1-1.1 1.05Z" })),
512
599
  };
@@ -612,6 +699,49 @@ const MgIcon = class {
612
699
  };
613
700
  MgIcon.style = mgIconCss;
614
701
 
702
+ const mgIllustratedMessageCss = ".mg-illustrated-message{margin:auto;padding:0 1.5rem;max-width:47.5rem;box-sizing:border-box;text-align:center}.mg-illustrated-message__illustration{max-height:33.5rem}.mg-illustrated-message__illustration ::slotted([slot=illustration]){width:auto;height:auto;max-width:100%;max-height:33.5rem}.mg-illustrated-message__illustration.mg-illustrated-message__illustration--small{max-height:6rem}.mg-illustrated-message__illustration.mg-illustrated-message__illustration--small ::slotted([slot=illustration]){max-height:6rem}.mg-illustrated-message__title{margin:3rem 0 0}.mg-illustrated-message__title ::slotted([slot=title]){margin:0;font-size:2rem !important;font-family:var(--font-family) !important;font-weight:400}.mg-illustrated-message__details ::slotted([slot=details]){margin:2rem 0 0}";
703
+
704
+ const MgIllustratedMessage = class {
705
+ constructor(hostRef) {
706
+ index.registerInstance(this, hostRef);
707
+ /**
708
+ * Define illustration size
709
+ */
710
+ this.size = 'regular';
711
+ }
712
+ /*************
713
+ * Lifecycle *
714
+ *************/
715
+ /**
716
+ * Check if component props are well configured on init
717
+ *
718
+ * @returns {void}
719
+ */
720
+ componentDidLoad() {
721
+ const headingTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
722
+ const imageTags = ['img', 'svg'];
723
+ if (!index$1.isTagName(this.element.querySelector('[slot="title"]'), headingTags)) {
724
+ throw new Error(`<mg-illustrated-message> Slotted title must be a heading: ${headingTags.join(', ')}`);
725
+ }
726
+ else if (!index$1.isTagName(this.element.querySelector('[slot="illustration"]'), imageTags)) {
727
+ throw new Error(`<mg-illustrated-message> Slotted illustration must be an image: ${imageTags.join(', ')}`);
728
+ }
729
+ }
730
+ /**
731
+ * Render
732
+ *
733
+ * @returns {HTMLElement} HTML Element
734
+ */
735
+ render() {
736
+ return (index.h("div", { class: "mg-illustrated-message" }, index.h("div", { class: {
737
+ 'mg-illustrated-message__illustration': true,
738
+ 'mg-illustrated-message__illustration--small': this.size === 'small',
739
+ } }, index.h("slot", { name: "illustration" })), index.h("div", { class: "mg-illustrated-message__title" }, index.h("slot", { name: "title" })), index.h("div", { class: "mg-illustrated-message__details" }, index.h("slot", { name: "details" }))));
740
+ }
741
+ get element() { return index.getElement(this); }
742
+ };
743
+ MgIllustratedMessage.style = mgIllustratedMessageCss;
744
+
615
745
  /**
616
746
  * Apply in all input child node the aria-describedby attribute
617
747
  *
@@ -738,7 +868,7 @@ const MgInput = (props, children, utils) => {
738
868
  props.errorMessage && !props.readonly && !props.disabled && (index.h("div", { id: helpTextErrorId, class: "mg-input__error", innerHTML: props.errorMessage, "aria-live": "assertive" }))))));
739
869
  };
740
870
 
741
- const mgInputCheckboxCss = ":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-icon{display:flex}.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__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))}fieldset.mg-input{border:0;margin-left:0;margin-right:0;padding:0}fieldset.mg-input input[type=radio],fieldset.mg-input input[type=checkbox]{flex-shrink:0;width:var(--mg-input-check-size);height:var(--mg-input-check-size);margin-top:calc((var(--font-size) * var(--line-height) - var(--mg-input-check-size)) / 2);margin-right:0.6rem;margin-bottom:0;margin-left:0}fieldset.mg-input.mg-input--label-on-top .mg-input__input-group-container{margin-top:0.7rem}.mg-input__input-container mg-tooltip{margin-left:3rem}.mg-input__input-group-container{margin:0;padding:0;list-style:none;display:flex;flex-wrap:wrap;column-gap:2.3rem;row-gap:1rem;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2)}.mg-input__input-group-container--vertical{flex-direction:column}.mg-input__input-group{display:flex;align-items:top}.mg-input__input-group.mg-input__input-group--disabled label{opacity:0.3}.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}";
871
+ const mgInputCheckboxCss = ":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__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}fieldset.mg-input{border:0;margin-left:0;margin-right:0;padding:0}fieldset.mg-input input[type=radio],fieldset.mg-input input[type=checkbox]{flex-shrink:0;width:var(--mg-input-check-size);height:var(--mg-input-check-size);margin-top:calc((var(--font-size) * var(--line-height) - var(--mg-input-check-size)) / 2);margin-right:0.6rem;margin-bottom:0;margin-left:0}fieldset.mg-input.mg-input--label-on-top .mg-input__input-group-container{margin-top:0.7rem}.mg-input__input-container mg-tooltip{margin-left:3rem}.mg-input__input-group-container{margin:0;padding:0;list-style:none;display:flex;flex-wrap:wrap;column-gap:2.3rem;row-gap:1rem;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2)}.mg-input__input-group-container--vertical{flex-direction:column}.mg-input__input-group{display:flex;align-items:top}.mg-input__input-group.mg-input__input-group--disabled label{opacity:0.3}.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}";
742
872
 
743
873
  /**
744
874
  * type CheckboxItem validation function
@@ -958,7 +1088,7 @@ function localeDate(date, locale) {
958
1088
  return new Intl.DateTimeFormat(locale).format(new Date(date));
959
1089
  }
960
1090
 
961
- const mgInputDateCss = ":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-icon{display:flex}.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__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__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 hsla(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)}.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}";
1091
+ const mgInputDateCss = ":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__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 hsla(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)}.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}";
962
1092
 
963
1093
  const MgInputDate = class {
964
1094
  constructor(hostRef) {
@@ -1175,7 +1305,7 @@ var InputError;
1175
1305
  InputError["REQUIRED"] = "required";
1176
1306
  })(InputError || (InputError = {}));
1177
1307
 
1178
- const mgInputNumericCss = ":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-icon{display:flex}.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__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__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 hsla(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__input-container{flex:auto;width:100%}.mg-input.mg-input--width-full .mg-input__input-container .mg-input__box{width:100%}.mg-input.mg-input--width-16 .mg-input__box{width:21rem}.mg-input.mg-input--width-4 .mg-input__box{width:7rem}.mg-input.mg-input--width-2 .mg-input__box{width:5rem}.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}.mg-input .mg-input__box{text-align:var(--mg-inputs-text-align, right)}";
1308
+ const mgInputNumericCss = ":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__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 hsla(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__input-container{flex:auto;width:100%}.mg-input.mg-input--width-full .mg-input__input-container .mg-input__box{width:100%}.mg-input.mg-input--width-16 .mg-input__box{width:21rem}.mg-input.mg-input--width-4 .mg-input__box{width:7rem}.mg-input.mg-input--width-2 .mg-input__box{width:5rem}.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}.mg-input .mg-input__box{text-align:var(--mg-inputs-text-align, right)}";
1179
1309
 
1180
1310
  const MgInputNumeric = class {
1181
1311
  constructor(hostRef) {
@@ -1461,7 +1591,7 @@ const MgInputNumeric = class {
1461
1591
  };
1462
1592
  MgInputNumeric.style = mgInputNumericCss;
1463
1593
 
1464
- const mgInputPasswordCss = ":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-icon{display:flex}.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__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__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 hsla(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__input-container{flex:auto;width:100%}.mg-input.mg-input--width-full .mg-input__input-container .mg-input__box{width:100%}.mg-input.mg-input--width-16 .mg-input__box{width:21rem}.mg-input.mg-input--width-4 .mg-input__box{width:7rem}.mg-input.mg-input--width-2 .mg-input__box{width:5rem}.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}";
1594
+ const mgInputPasswordCss = ":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__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 hsla(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__input-container{flex:auto;width:100%}.mg-input.mg-input--width-full .mg-input__input-container .mg-input__box{width:100%}.mg-input.mg-input--width-16 .mg-input__box{width:21rem}.mg-input.mg-input--width-4 .mg-input__box{width:7rem}.mg-input.mg-input--width-2 .mg-input__box{width:5rem}.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}";
1465
1595
 
1466
1596
  const MgInputPassword = class {
1467
1597
  constructor(hostRef) {
@@ -1591,7 +1721,7 @@ const MgInputPassword = class {
1591
1721
  };
1592
1722
  MgInputPassword.style = mgInputPasswordCss;
1593
1723
 
1594
- const mgInputRadioCss = ":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-icon{display:flex}.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__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))}fieldset.mg-input{border:0;margin-left:0;margin-right:0;padding:0}fieldset.mg-input input[type=radio],fieldset.mg-input input[type=checkbox]{flex-shrink:0;width:var(--mg-input-check-size);height:var(--mg-input-check-size);margin-top:calc((var(--font-size) * var(--line-height) - var(--mg-input-check-size)) / 2);margin-right:0.6rem;margin-bottom:0;margin-left:0}fieldset.mg-input.mg-input--label-on-top .mg-input__input-group-container{margin-top:0.7rem}.mg-input__input-container mg-tooltip{margin-left:3rem}.mg-input__input-group-container{margin:0;padding:0;list-style:none;display:flex;flex-wrap:wrap;column-gap:2.3rem;row-gap:1rem;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2)}.mg-input__input-group-container--vertical{flex-direction:column}.mg-input__input-group{display:flex;align-items:top}.mg-input__input-group.mg-input__input-group--disabled label{opacity:0.3}.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}";
1724
+ const mgInputRadioCss = ":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__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}fieldset.mg-input{border:0;margin-left:0;margin-right:0;padding:0}fieldset.mg-input input[type=radio],fieldset.mg-input input[type=checkbox]{flex-shrink:0;width:var(--mg-input-check-size);height:var(--mg-input-check-size);margin-top:calc((var(--font-size) * var(--line-height) - var(--mg-input-check-size)) / 2);margin-right:0.6rem;margin-bottom:0;margin-left:0}fieldset.mg-input.mg-input--label-on-top .mg-input__input-group-container{margin-top:0.7rem}.mg-input__input-container mg-tooltip{margin-left:3rem}.mg-input__input-group-container{margin:0;padding:0;list-style:none;display:flex;flex-wrap:wrap;column-gap:2.3rem;row-gap:1rem;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2)}.mg-input__input-group-container--vertical{flex-direction:column}.mg-input__input-group{display:flex;align-items:top}.mg-input__input-group.mg-input__input-group--disabled label{opacity:0.3}.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}";
1595
1725
 
1596
1726
  /**
1597
1727
  * type Option validation function
@@ -1767,7 +1897,7 @@ const MgInputRadio = class {
1767
1897
  };
1768
1898
  MgInputRadio.style = mgInputRadioCss;
1769
1899
 
1770
- const mgInputSelectCss = ":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-icon{display:flex}.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__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__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 hsla(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__input-container{flex:auto;width:100%}.mg-input.mg-input--width-full .mg-input__input-container .mg-input__box{width:100%}.mg-input.mg-input--width-16 .mg-input__box{width:21rem}.mg-input.mg-input--width-4 .mg-input__box{width:7rem}.mg-input.mg-input--width-2 .mg-input__box{width:5rem}.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}.mg-input__box{width:100%;padding-top:0;padding-bottom:0;padding-right:1rem}";
1900
+ const mgInputSelectCss = ":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__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 hsla(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__input-container{flex:auto;width:100%}.mg-input.mg-input--width-full .mg-input__input-container .mg-input__box{width:100%}.mg-input.mg-input--width-16 .mg-input__box{width:21rem}.mg-input.mg-input--width-4 .mg-input__box{width:7rem}.mg-input.mg-input--width-2 .mg-input__box{width:5rem}.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}.mg-input__box{width:100%;padding-top:0;padding-bottom:0;padding-right:1rem}";
1771
1901
 
1772
1902
  /**
1773
1903
  * Check if item is a well configured option
@@ -1977,7 +2107,7 @@ const MgInputSelect = class {
1977
2107
  };
1978
2108
  MgInputSelect.style = mgInputSelectCss;
1979
2109
 
1980
- 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-icon{display:flex}.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__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__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 hsla(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__input-container{flex:auto;width:100%}.mg-input.mg-input--width-full .mg-input__input-container .mg-input__box{width:100%}.mg-input.mg-input--width-16 .mg-input__box{width:21rem}.mg-input.mg-input--width-4 .mg-input__box{width:7rem}.mg-input.mg-input--width-2 .mg-input__box{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}.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;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}";
2110
+ 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__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 hsla(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__input-container{flex:auto;width:100%}.mg-input.mg-input--width-full .mg-input__input-container .mg-input__box{width:100%}.mg-input.mg-input--width-16 .mg-input__box{width:21rem}.mg-input.mg-input--width-4 .mg-input__box{width:7rem}.mg-input.mg-input--width-2 .mg-input__box{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}.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;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}";
1981
2111
 
1982
2112
  const MgInputText = class {
1983
2113
  constructor(hostRef) {
@@ -2205,7 +2335,7 @@ const MgInputText = class {
2205
2335
  };
2206
2336
  MgInputText.style = mgInputTextCss;
2207
2337
 
2208
- 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-icon{display:flex}.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__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__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 hsla(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__input-container{flex:auto;width:100%}.mg-input.mg-input--width-full .mg-input__input-container .mg-input__box{width:100%}.mg-input.mg-input--width-16 .mg-input__box{width:21rem}.mg-input.mg-input--width-4 .mg-input__box{width:7rem}.mg-input.mg-input--width-2 .mg-input__box{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}.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}}";
2338
+ 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__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 hsla(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__input-container{flex:auto;width:100%}.mg-input.mg-input--width-full .mg-input__input-container .mg-input__box{width:100%}.mg-input.mg-input--width-16 .mg-input__box{width:21rem}.mg-input.mg-input--width-4 .mg-input__box{width:7rem}.mg-input.mg-input--width-2 .mg-input__box{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}.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}}";
2209
2339
 
2210
2340
  const MgInputTextarea = class {
2211
2341
  constructor(hostRef) {
@@ -2450,7 +2580,7 @@ const MgInputTitle = class {
2450
2580
  };
2451
2581
  MgInputTitle.style = mgInputTitleCss;
2452
2582
 
2453
- 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-icon{display:flex}.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__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))}.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}.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-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}.mg-input.mg-input--toggle-disabled .mg-input__button-toggle{opacity:0.3}";
2583
+ 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__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}.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-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}.mg-input.mg-input--toggle-disabled .mg-input__button-toggle{opacity:0.3}";
2454
2584
 
2455
2585
  /**
2456
2586
  * type Option validation function
@@ -2597,14 +2727,23 @@ const MgInputToggle = class {
2597
2727
  * @returns {void}
2598
2728
  */
2599
2729
  setChecked() {
2600
- // has "value" props type is not a boolean, it is bind/render as an attributes/props
2601
- // true props will be represent by "true" string so we convert it has boolean
2602
- // true attribute will be represent by "" string so we convert it has boolean
2603
- // https://stenciljs.com/docs/properties
2604
- if (['', 'true'].includes(this.value) && this.options.find(option => option.value) !== undefined) {
2605
- this.value = true;
2730
+ const optionTrueValueIndex = this.options.map(option => option.value).findIndex(value => value === true);
2731
+ if ([0, 1].includes(optionTrueValueIndex)) {
2732
+ // has "value" props type is not a boolean, it is bind/render as an attributes/props
2733
+ // true props will be represent by "true" string so we convert it has boolean
2734
+ // true attribute will be represent by "" string so we convert it has boolean
2735
+ // https://stenciljs.com/docs/properties
2736
+ if (['', 'true'].includes(this.value) && this.options.find(option => option.value) !== undefined) {
2737
+ this.value = true;
2738
+ }
2739
+ // when options are boolean values and ordered as [true,false] instead [false,true]
2740
+ // we need to reversed the checked value logic
2741
+ const selectedValue = this.value === this.options[optionTrueValueIndex].value;
2742
+ this.checked = optionTrueValueIndex === 0 ? !selectedValue : selectedValue;
2743
+ }
2744
+ else {
2745
+ this.checked = this.value === this.options[1].value;
2606
2746
  }
2607
- this.checked = this.value === this.options[1].value;
2608
2747
  }
2609
2748
  /*************
2610
2749
  * Lifecycle *
@@ -2946,10 +3085,6 @@ const MgPanel = class {
2946
3085
  * Panel is opened
2947
3086
  */
2948
3087
  this.expanded = false;
2949
- /**
2950
- * Disable possibility to toggle expand
2951
- */
2952
- this.expandToggleDisabled = false;
2953
3088
  /**
2954
3089
  * Panel title is editabled
2955
3090
  */
@@ -3103,168 +3238,2117 @@ const MgPanel = class {
3103
3238
  };
3104
3239
  MgPanel.style = mgPanelCss;
3105
3240
 
3106
- var Status;
3107
- (function (Status) {
3108
- Status["VISIBLE"] = "visible";
3109
- Status["HIDDEN"] = "hidden";
3110
- Status["DISABLED"] = "disabled";
3111
- Status["ACTIVE"] = "active";
3112
- })(Status || (Status = {}));
3113
- /**
3114
- * List of all possibles sizes
3115
- */
3116
- const sizes = ['regular', 'large'];
3241
+ var top = 'top';
3242
+ var bottom = 'bottom';
3243
+ var right = 'right';
3244
+ var left = 'left';
3245
+ var auto = 'auto';
3246
+ var basePlacements = [top, bottom, right, left];
3247
+ var start = 'start';
3248
+ var end = 'end';
3249
+ var clippingParents = 'clippingParents';
3250
+ var viewport = 'viewport';
3251
+ var popper = 'popper';
3252
+ var reference = 'reference';
3253
+ var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
3254
+ return acc.concat([placement + "-" + start, placement + "-" + end]);
3255
+ }, []);
3256
+ var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
3257
+ return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
3258
+ }, []); // modifiers that need to read the DOM
3117
3259
 
3118
- const mgTabsCss = ".mg-tabs.mg-tabs--size-regular .mg-tabs__navigation-button{padding:calc(1rem + 0.3rem) calc(1rem * 1.3) 1rem}.mg-tabs.mg-tabs--size-large .mg-tabs__navigation-button{padding:calc(1.8rem + 0.3rem) calc(1.8rem * 1.3) 1.8rem}.mg-tabs__header{display:flex;flex-direction:row;flex-wrap:wrap}.mg-tabs__navigation-button{display:flex;align-items:center;column-gap:0.5rem;background:none;border:none;border-bottom:0.3rem solid transparent;color:hsl(var(--color-dark));line-height:var(--line-height);cursor:pointer}.mg-tabs__navigation-button:disabled,.mg-tabs__navigation-button--disabled{cursor:default;opacity:30%}.mg-tabs__navigation-button:hover:not(:disabled),.mg-tabs__navigation-button:focus:not(:disabled){background-color:hsla(var(--color-info-h), var(--color-info-s), var(--color-info-l), 10%)}.mg-tabs__navigation-button.mg-tabs__navigation-button--active{color:hsl(var(--color-info));border-bottom-color:hsl(var(--color-info));font-weight:700}.mg-tabs__navigation-button.mg-tabs__navigation-button--hidden{display:none}.mg-tabs__content-container:focus-visible{outline:none}";
3260
+ var beforeRead = 'beforeRead';
3261
+ var read = 'read';
3262
+ var afterRead = 'afterRead'; // pure-logic modifiers
3119
3263
 
3120
- /**
3121
- * type TabItem validation function
3122
- *
3123
- * @param {TabItem} tab tab item
3124
- * @returns {boolean} tab item type is valid
3125
- */
3126
- const isTabItem = (tab) => typeof tab === 'object' && typeof tab.label === 'string';
3127
- const MgTabs = class {
3128
- constructor(hostRef) {
3129
- index.registerInstance(this, hostRef);
3130
- this.activeTabChange = index.createEvent(this, "active-tab-change", 7);
3131
- /************
3132
- * Internal *
3133
- ************/
3134
- this.tabPanel = 'panel';
3135
- this.startIndex = 1;
3136
- this.buttonTabBaseClass = 'mg-tabs__navigation-button';
3137
- /**
3138
- * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
3139
- * If not set, it will be created.
3140
- */
3141
- this.identifier = index$1.createID('mg-tabs');
3142
- /**
3143
- * Define tabs size
3144
- */
3145
- this.size = 'regular';
3146
- /**
3147
- * Active tab number
3148
- * default: first is 1
3149
- */
3150
- this.activeTab = 1;
3151
- /**
3152
- * Component tabs
3153
- */
3154
- this.tabs = [];
3155
- /**
3156
- * Component classes
3157
- */
3158
- this.classList = new index$1.ClassList(['mg-tabs']);
3159
- /**
3160
- * Method to set active tab
3161
- *
3162
- * @param {number} tabKey item tab key to set to ACTIVE status
3163
- * @returns {void}
3164
- */
3165
- this.setActiveTab = (tabKey) => {
3166
- // reset active tabs
3167
- this.tabs.forEach(tab => {
3168
- if (this.tabHasGivenStatus(tab, Status.ACTIVE))
3169
- tab.status = Status.VISIBLE;
3170
- });
3171
- // set active tab from given tab key
3172
- this.tabs[tabKey - this.startIndex].status = Status.ACTIVE;
3173
- // emit change active tab key event
3174
- this.activeTabChange.emit(tabKey);
3175
- };
3176
- /**
3177
- * Method to know if given tab has the given status
3178
- *
3179
- * @param {TabItem} tab item tab key to set to ACTIVE status
3180
- * @param {Status} status status to valide
3181
- * @returns {boolean} status comparaison
3182
- */
3183
- this.tabHasGivenStatus = (tab, status) => tab.status === status;
3184
- /**
3185
- * Method to get element id from index
3186
- *
3187
- * @param {string} element to get id
3188
- * @param {number} index to generate id
3189
- * @returns {string} generated element id
3190
- */
3191
- this.getElementId = (element, index) => `${element}-${this.getTabIndex(index)}`;
3192
- /**
3193
- * Method to get tab index
3194
- *
3195
- * @param {number} index to get
3196
- * @returns {number} index
3197
- */
3198
- this.getTabIndex = (index) => index + this.startIndex;
3199
- /**
3200
- * Handle click events on tabs
3201
- *
3202
- * @param {MouseEvent} event mouse event
3203
- */
3204
- this.handleClick = (event) => {
3205
- const tabId = event.currentTarget.getAttribute('data-index');
3206
- this.activeTab = Number(tabId);
3207
- };
3208
- /**
3209
- * get navigation button class from given status
3210
- *
3211
- * @param {Status} status button tab status
3212
- * @param {boolean} isSelector set if we need a CSS selector with the dot '.' at the begin. default value = false.
3213
- * @returns {string} button class/selector variant
3214
- */
3215
- this.getNavigationButtonClass = (status, isSelector = false) => `${isSelector ? '.' : ''}${this.buttonTabBaseClass}--${status}`;
3216
- /**
3217
- * Handle keyboard event on tabs
3218
- *
3219
- * @param {MouseEvent} event mouse event
3220
- * @returns {void}
3221
- */
3222
- this.handleKeydown = (event) => {
3223
- let tabId = Number(event.target.getAttribute('data-index'));
3224
- const parent = event.target.parentElement;
3225
- // change selected id from key code
3226
- if (event.key === 'ArrowRight') {
3227
- tabId++;
3228
- }
3229
- else if (event.key === 'ArrowLeft') {
3230
- tabId--;
3231
- }
3232
- // get selected tab if NOT hidden, disabled
3233
- const selectedTab = parent.querySelector(`[data-index="${tabId}"]:not(${[this.getNavigationButtonClass(Status.HIDDEN, true), this.getNavigationButtonClass(Status.DISABLED, true)].join()})`);
3234
- // apply selected tab if exist
3235
- if (selectedTab !== null) {
3236
- selectedTab.focus();
3237
- this.activeTab = tabId;
3238
- }
3239
- };
3240
- /**
3241
- * Validate slots setting
3242
- */
3243
- this.validateSlots = () => {
3244
- const slots = Array.from(this.element.children).filter(slot => { var _a; return (_a = slot.getAttribute('slot')) === null || _a === void 0 ? void 0 : _a.includes('tab_content-'); });
3245
- if (slots.length !== this.tabs.length) {
3246
- throw new Error('<mg-tabs> Must have slots counts equal to tabs count.');
3247
- }
3248
- };
3264
+ var beforeMain = 'beforeMain';
3265
+ var main = 'main';
3266
+ var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
3267
+
3268
+ var beforeWrite = 'beforeWrite';
3269
+ var write = 'write';
3270
+ var afterWrite = 'afterWrite';
3271
+ var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
3272
+
3273
+ function getNodeName(element) {
3274
+ return element ? (element.nodeName || '').toLowerCase() : null;
3275
+ }
3276
+
3277
+ function getWindow(node) {
3278
+ if (node == null) {
3279
+ return window;
3249
3280
  }
3250
- validateSize(newValue) {
3251
- if (!sizes.includes(newValue)) {
3252
- throw new Error(`<mg-tabs> prop "size" must be one of : ${sizes.join(', ')}`);
3253
- }
3254
- this.classList.add(`mg-tabs--size-${this.size}`);
3281
+
3282
+ if (node.toString() !== '[object Window]') {
3283
+ var ownerDocument = node.ownerDocument;
3284
+ return ownerDocument ? ownerDocument.defaultView || window : window;
3255
3285
  }
3256
- validateItems(newValue) {
3257
- // String array
3258
- if (index$1.allItemsAreString(newValue)) {
3259
- this.tabs = newValue.map(item => ({ label: item, status: Status.VISIBLE }));
3260
- }
3261
- // Object array
3262
- else if (newValue && newValue.every(item => isTabItem(item))) {
3263
- this.tabs = newValue;
3264
- }
3265
- else {
3266
- throw new Error('<mg-tabs> prop "items" is required and all items must be the same type: TabItem.');
3267
- }
3286
+
3287
+ return node;
3288
+ }
3289
+
3290
+ function isElement(node) {
3291
+ var OwnElement = getWindow(node).Element;
3292
+ return node instanceof OwnElement || node instanceof Element;
3293
+ }
3294
+
3295
+ function isHTMLElement(node) {
3296
+ var OwnElement = getWindow(node).HTMLElement;
3297
+ return node instanceof OwnElement || node instanceof HTMLElement;
3298
+ }
3299
+
3300
+ function isShadowRoot(node) {
3301
+ // IE 11 has no ShadowRoot
3302
+ if (typeof ShadowRoot === 'undefined') {
3303
+ return false;
3304
+ }
3305
+
3306
+ var OwnElement = getWindow(node).ShadowRoot;
3307
+ return node instanceof OwnElement || node instanceof ShadowRoot;
3308
+ }
3309
+
3310
+ // and applies them to the HTMLElements such as popper and arrow
3311
+
3312
+ function applyStyles(_ref) {
3313
+ var state = _ref.state;
3314
+ Object.keys(state.elements).forEach(function (name) {
3315
+ var style = state.styles[name] || {};
3316
+ var attributes = state.attributes[name] || {};
3317
+ var element = state.elements[name]; // arrow is optional + virtual elements
3318
+
3319
+ if (!isHTMLElement(element) || !getNodeName(element)) {
3320
+ return;
3321
+ } // Flow doesn't support to extend this property, but it's the most
3322
+ // effective way to apply styles to an HTMLElement
3323
+ // $FlowFixMe[cannot-write]
3324
+
3325
+
3326
+ Object.assign(element.style, style);
3327
+ Object.keys(attributes).forEach(function (name) {
3328
+ var value = attributes[name];
3329
+
3330
+ if (value === false) {
3331
+ element.removeAttribute(name);
3332
+ } else {
3333
+ element.setAttribute(name, value === true ? '' : value);
3334
+ }
3335
+ });
3336
+ });
3337
+ }
3338
+
3339
+ function effect$2(_ref2) {
3340
+ var state = _ref2.state;
3341
+ var initialStyles = {
3342
+ popper: {
3343
+ position: state.options.strategy,
3344
+ left: '0',
3345
+ top: '0',
3346
+ margin: '0'
3347
+ },
3348
+ arrow: {
3349
+ position: 'absolute'
3350
+ },
3351
+ reference: {}
3352
+ };
3353
+ Object.assign(state.elements.popper.style, initialStyles.popper);
3354
+ state.styles = initialStyles;
3355
+
3356
+ if (state.elements.arrow) {
3357
+ Object.assign(state.elements.arrow.style, initialStyles.arrow);
3358
+ }
3359
+
3360
+ return function () {
3361
+ Object.keys(state.elements).forEach(function (name) {
3362
+ var element = state.elements[name];
3363
+ var attributes = state.attributes[name] || {};
3364
+ var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them
3365
+
3366
+ var style = styleProperties.reduce(function (style, property) {
3367
+ style[property] = '';
3368
+ return style;
3369
+ }, {}); // arrow is optional + virtual elements
3370
+
3371
+ if (!isHTMLElement(element) || !getNodeName(element)) {
3372
+ return;
3373
+ }
3374
+
3375
+ Object.assign(element.style, style);
3376
+ Object.keys(attributes).forEach(function (attribute) {
3377
+ element.removeAttribute(attribute);
3378
+ });
3379
+ });
3380
+ };
3381
+ } // eslint-disable-next-line import/no-unused-modules
3382
+
3383
+
3384
+ const applyStyles$1 = {
3385
+ name: 'applyStyles',
3386
+ enabled: true,
3387
+ phase: 'write',
3388
+ fn: applyStyles,
3389
+ effect: effect$2,
3390
+ requires: ['computeStyles']
3391
+ };
3392
+
3393
+ function getBasePlacement(placement) {
3394
+ return placement.split('-')[0];
3395
+ }
3396
+
3397
+ var max = Math.max;
3398
+ var min = Math.min;
3399
+ var round = Math.round;
3400
+
3401
+ function getBoundingClientRect(element, includeScale) {
3402
+ if (includeScale === void 0) {
3403
+ includeScale = false;
3404
+ }
3405
+
3406
+ var rect = element.getBoundingClientRect();
3407
+ var scaleX = 1;
3408
+ var scaleY = 1;
3409
+
3410
+ if (isHTMLElement(element) && includeScale) {
3411
+ var offsetHeight = element.offsetHeight;
3412
+ var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
3413
+ // Fallback to 1 in case both values are `0`
3414
+
3415
+ if (offsetWidth > 0) {
3416
+ scaleX = round(rect.width) / offsetWidth || 1;
3417
+ }
3418
+
3419
+ if (offsetHeight > 0) {
3420
+ scaleY = round(rect.height) / offsetHeight || 1;
3421
+ }
3422
+ }
3423
+
3424
+ return {
3425
+ width: rect.width / scaleX,
3426
+ height: rect.height / scaleY,
3427
+ top: rect.top / scaleY,
3428
+ right: rect.right / scaleX,
3429
+ bottom: rect.bottom / scaleY,
3430
+ left: rect.left / scaleX,
3431
+ x: rect.left / scaleX,
3432
+ y: rect.top / scaleY
3433
+ };
3434
+ }
3435
+
3436
+ // means it doesn't take into account transforms.
3437
+
3438
+ function getLayoutRect(element) {
3439
+ var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.
3440
+ // Fixes https://github.com/popperjs/popper-core/issues/1223
3441
+
3442
+ var width = element.offsetWidth;
3443
+ var height = element.offsetHeight;
3444
+
3445
+ if (Math.abs(clientRect.width - width) <= 1) {
3446
+ width = clientRect.width;
3447
+ }
3448
+
3449
+ if (Math.abs(clientRect.height - height) <= 1) {
3450
+ height = clientRect.height;
3451
+ }
3452
+
3453
+ return {
3454
+ x: element.offsetLeft,
3455
+ y: element.offsetTop,
3456
+ width: width,
3457
+ height: height
3458
+ };
3459
+ }
3460
+
3461
+ function contains(parent, child) {
3462
+ var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method
3463
+
3464
+ if (parent.contains(child)) {
3465
+ return true;
3466
+ } // then fallback to custom implementation with Shadow DOM support
3467
+ else if (rootNode && isShadowRoot(rootNode)) {
3468
+ var next = child;
3469
+
3470
+ do {
3471
+ if (next && parent.isSameNode(next)) {
3472
+ return true;
3473
+ } // $FlowFixMe[prop-missing]: need a better way to handle this...
3474
+
3475
+
3476
+ next = next.parentNode || next.host;
3477
+ } while (next);
3478
+ } // Give up, the result is false
3479
+
3480
+
3481
+ return false;
3482
+ }
3483
+
3484
+ function getComputedStyle(element) {
3485
+ return getWindow(element).getComputedStyle(element);
3486
+ }
3487
+
3488
+ function isTableElement(element) {
3489
+ return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
3490
+ }
3491
+
3492
+ function getDocumentElement(element) {
3493
+ // $FlowFixMe[incompatible-return]: assume body is always available
3494
+ return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
3495
+ element.document) || window.document).documentElement;
3496
+ }
3497
+
3498
+ function getParentNode(element) {
3499
+ if (getNodeName(element) === 'html') {
3500
+ return element;
3501
+ }
3502
+
3503
+ return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
3504
+ // $FlowFixMe[incompatible-return]
3505
+ // $FlowFixMe[prop-missing]
3506
+ element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
3507
+ element.parentNode || ( // DOM Element detected
3508
+ isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
3509
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
3510
+ getDocumentElement(element) // fallback
3511
+
3512
+ );
3513
+ }
3514
+
3515
+ function getTrueOffsetParent(element) {
3516
+ if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
3517
+ getComputedStyle(element).position === 'fixed') {
3518
+ return null;
3519
+ }
3520
+
3521
+ return element.offsetParent;
3522
+ } // `.offsetParent` reports `null` for fixed elements, while absolute elements
3523
+ // return the containing block
3524
+
3525
+
3526
+ function getContainingBlock(element) {
3527
+ var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;
3528
+ var isIE = navigator.userAgent.indexOf('Trident') !== -1;
3529
+
3530
+ if (isIE && isHTMLElement(element)) {
3531
+ // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
3532
+ var elementCss = getComputedStyle(element);
3533
+
3534
+ if (elementCss.position === 'fixed') {
3535
+ return null;
3536
+ }
3537
+ }
3538
+
3539
+ var currentNode = getParentNode(element);
3540
+
3541
+ if (isShadowRoot(currentNode)) {
3542
+ currentNode = currentNode.host;
3543
+ }
3544
+
3545
+ while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
3546
+ var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
3547
+ // create a containing block.
3548
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
3549
+
3550
+ if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {
3551
+ return currentNode;
3552
+ } else {
3553
+ currentNode = currentNode.parentNode;
3554
+ }
3555
+ }
3556
+
3557
+ return null;
3558
+ } // Gets the closest ancestor positioned element. Handles some edge cases,
3559
+ // such as table ancestors and cross browser bugs.
3560
+
3561
+
3562
+ function getOffsetParent(element) {
3563
+ var window = getWindow(element);
3564
+ var offsetParent = getTrueOffsetParent(element);
3565
+
3566
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
3567
+ offsetParent = getTrueOffsetParent(offsetParent);
3568
+ }
3569
+
3570
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {
3571
+ return window;
3572
+ }
3573
+
3574
+ return offsetParent || getContainingBlock(element) || window;
3575
+ }
3576
+
3577
+ function getMainAxisFromPlacement(placement) {
3578
+ return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
3579
+ }
3580
+
3581
+ function within(min$1, value, max$1) {
3582
+ return max(min$1, min(value, max$1));
3583
+ }
3584
+ function withinMaxClamp(min, value, max) {
3585
+ var v = within(min, value, max);
3586
+ return v > max ? max : v;
3587
+ }
3588
+
3589
+ function getFreshSideObject() {
3590
+ return {
3591
+ top: 0,
3592
+ right: 0,
3593
+ bottom: 0,
3594
+ left: 0
3595
+ };
3596
+ }
3597
+
3598
+ function mergePaddingObject(paddingObject) {
3599
+ return Object.assign({}, getFreshSideObject(), paddingObject);
3600
+ }
3601
+
3602
+ function expandToHashMap(value, keys) {
3603
+ return keys.reduce(function (hashMap, key) {
3604
+ hashMap[key] = value;
3605
+ return hashMap;
3606
+ }, {});
3607
+ }
3608
+
3609
+ var toPaddingObject = function toPaddingObject(padding, state) {
3610
+ padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {
3611
+ placement: state.placement
3612
+ })) : padding;
3613
+ return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
3614
+ };
3615
+
3616
+ function arrow(_ref) {
3617
+ var _state$modifiersData$;
3618
+
3619
+ var state = _ref.state,
3620
+ name = _ref.name,
3621
+ options = _ref.options;
3622
+ var arrowElement = state.elements.arrow;
3623
+ var popperOffsets = state.modifiersData.popperOffsets;
3624
+ var basePlacement = getBasePlacement(state.placement);
3625
+ var axis = getMainAxisFromPlacement(basePlacement);
3626
+ var isVertical = [left, right].indexOf(basePlacement) >= 0;
3627
+ var len = isVertical ? 'height' : 'width';
3628
+
3629
+ if (!arrowElement || !popperOffsets) {
3630
+ return;
3631
+ }
3632
+
3633
+ var paddingObject = toPaddingObject(options.padding, state);
3634
+ var arrowRect = getLayoutRect(arrowElement);
3635
+ var minProp = axis === 'y' ? top : left;
3636
+ var maxProp = axis === 'y' ? bottom : right;
3637
+ var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
3638
+ var startDiff = popperOffsets[axis] - state.rects.reference[axis];
3639
+ var arrowOffsetParent = getOffsetParent(arrowElement);
3640
+ var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
3641
+ var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is
3642
+ // outside of the popper bounds
3643
+
3644
+ var min = paddingObject[minProp];
3645
+ var max = clientSize - arrowRect[len] - paddingObject[maxProp];
3646
+ var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
3647
+ var offset = within(min, center, max); // Prevents breaking syntax highlighting...
3648
+
3649
+ var axisProp = axis;
3650
+ state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);
3651
+ }
3652
+
3653
+ function effect$1(_ref2) {
3654
+ var state = _ref2.state,
3655
+ options = _ref2.options;
3656
+ var _options$element = options.element,
3657
+ arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;
3658
+
3659
+ if (arrowElement == null) {
3660
+ return;
3661
+ } // CSS selector
3662
+
3663
+
3664
+ if (typeof arrowElement === 'string') {
3665
+ arrowElement = state.elements.popper.querySelector(arrowElement);
3666
+
3667
+ if (!arrowElement) {
3668
+ return;
3669
+ }
3670
+ }
3671
+
3672
+ if (!contains(state.elements.popper, arrowElement)) {
3673
+
3674
+ return;
3675
+ }
3676
+
3677
+ state.elements.arrow = arrowElement;
3678
+ } // eslint-disable-next-line import/no-unused-modules
3679
+
3680
+
3681
+ const arrow$1 = {
3682
+ name: 'arrow',
3683
+ enabled: true,
3684
+ phase: 'main',
3685
+ fn: arrow,
3686
+ effect: effect$1,
3687
+ requires: ['popperOffsets'],
3688
+ requiresIfExists: ['preventOverflow']
3689
+ };
3690
+
3691
+ function getVariation(placement) {
3692
+ return placement.split('-')[1];
3693
+ }
3694
+
3695
+ var unsetSides = {
3696
+ top: 'auto',
3697
+ right: 'auto',
3698
+ bottom: 'auto',
3699
+ left: 'auto'
3700
+ }; // Round the offsets to the nearest suitable subpixel based on the DPR.
3701
+ // Zooming can change the DPR, but it seems to report a value that will
3702
+ // cleanly divide the values into the appropriate subpixels.
3703
+
3704
+ function roundOffsetsByDPR(_ref) {
3705
+ var x = _ref.x,
3706
+ y = _ref.y;
3707
+ var win = window;
3708
+ var dpr = win.devicePixelRatio || 1;
3709
+ return {
3710
+ x: round(x * dpr) / dpr || 0,
3711
+ y: round(y * dpr) / dpr || 0
3712
+ };
3713
+ }
3714
+
3715
+ function mapToStyles(_ref2) {
3716
+ var _Object$assign2;
3717
+
3718
+ var popper = _ref2.popper,
3719
+ popperRect = _ref2.popperRect,
3720
+ placement = _ref2.placement,
3721
+ variation = _ref2.variation,
3722
+ offsets = _ref2.offsets,
3723
+ position = _ref2.position,
3724
+ gpuAcceleration = _ref2.gpuAcceleration,
3725
+ adaptive = _ref2.adaptive,
3726
+ roundOffsets = _ref2.roundOffsets,
3727
+ isFixed = _ref2.isFixed;
3728
+ var _offsets$x = offsets.x,
3729
+ x = _offsets$x === void 0 ? 0 : _offsets$x,
3730
+ _offsets$y = offsets.y,
3731
+ y = _offsets$y === void 0 ? 0 : _offsets$y;
3732
+
3733
+ var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
3734
+ x: x,
3735
+ y: y
3736
+ }) : {
3737
+ x: x,
3738
+ y: y
3739
+ };
3740
+
3741
+ x = _ref3.x;
3742
+ y = _ref3.y;
3743
+ var hasX = offsets.hasOwnProperty('x');
3744
+ var hasY = offsets.hasOwnProperty('y');
3745
+ var sideX = left;
3746
+ var sideY = top;
3747
+ var win = window;
3748
+
3749
+ if (adaptive) {
3750
+ var offsetParent = getOffsetParent(popper);
3751
+ var heightProp = 'clientHeight';
3752
+ var widthProp = 'clientWidth';
3753
+
3754
+ if (offsetParent === getWindow(popper)) {
3755
+ offsetParent = getDocumentElement(popper);
3756
+
3757
+ if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {
3758
+ heightProp = 'scrollHeight';
3759
+ widthProp = 'scrollWidth';
3760
+ }
3761
+ } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
3762
+
3763
+
3764
+ offsetParent = offsetParent;
3765
+
3766
+ if (placement === top || (placement === left || placement === right) && variation === end) {
3767
+ sideY = bottom;
3768
+ var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
3769
+ offsetParent[heightProp];
3770
+ y -= offsetY - popperRect.height;
3771
+ y *= gpuAcceleration ? 1 : -1;
3772
+ }
3773
+
3774
+ if (placement === left || (placement === top || placement === bottom) && variation === end) {
3775
+ sideX = right;
3776
+ var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
3777
+ offsetParent[widthProp];
3778
+ x -= offsetX - popperRect.width;
3779
+ x *= gpuAcceleration ? 1 : -1;
3780
+ }
3781
+ }
3782
+
3783
+ var commonStyles = Object.assign({
3784
+ position: position
3785
+ }, adaptive && unsetSides);
3786
+
3787
+ var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
3788
+ x: x,
3789
+ y: y
3790
+ }) : {
3791
+ x: x,
3792
+ y: y
3793
+ };
3794
+
3795
+ x = _ref4.x;
3796
+ y = _ref4.y;
3797
+
3798
+ if (gpuAcceleration) {
3799
+ var _Object$assign;
3800
+
3801
+ return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
3802
+ }
3803
+
3804
+ return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
3805
+ }
3806
+
3807
+ function computeStyles(_ref5) {
3808
+ var state = _ref5.state,
3809
+ options = _ref5.options;
3810
+ var _options$gpuAccelerat = options.gpuAcceleration,
3811
+ gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
3812
+ _options$adaptive = options.adaptive,
3813
+ adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
3814
+ _options$roundOffsets = options.roundOffsets,
3815
+ roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
3816
+
3817
+ var commonStyles = {
3818
+ placement: getBasePlacement(state.placement),
3819
+ variation: getVariation(state.placement),
3820
+ popper: state.elements.popper,
3821
+ popperRect: state.rects.popper,
3822
+ gpuAcceleration: gpuAcceleration,
3823
+ isFixed: state.options.strategy === 'fixed'
3824
+ };
3825
+
3826
+ if (state.modifiersData.popperOffsets != null) {
3827
+ state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
3828
+ offsets: state.modifiersData.popperOffsets,
3829
+ position: state.options.strategy,
3830
+ adaptive: adaptive,
3831
+ roundOffsets: roundOffsets
3832
+ })));
3833
+ }
3834
+
3835
+ if (state.modifiersData.arrow != null) {
3836
+ state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
3837
+ offsets: state.modifiersData.arrow,
3838
+ position: 'absolute',
3839
+ adaptive: false,
3840
+ roundOffsets: roundOffsets
3841
+ })));
3842
+ }
3843
+
3844
+ state.attributes.popper = Object.assign({}, state.attributes.popper, {
3845
+ 'data-popper-placement': state.placement
3846
+ });
3847
+ } // eslint-disable-next-line import/no-unused-modules
3848
+
3849
+
3850
+ const computeStyles$1 = {
3851
+ name: 'computeStyles',
3852
+ enabled: true,
3853
+ phase: 'beforeWrite',
3854
+ fn: computeStyles,
3855
+ data: {}
3856
+ };
3857
+
3858
+ var passive = {
3859
+ passive: true
3860
+ };
3861
+
3862
+ function effect(_ref) {
3863
+ var state = _ref.state,
3864
+ instance = _ref.instance,
3865
+ options = _ref.options;
3866
+ var _options$scroll = options.scroll,
3867
+ scroll = _options$scroll === void 0 ? true : _options$scroll,
3868
+ _options$resize = options.resize,
3869
+ resize = _options$resize === void 0 ? true : _options$resize;
3870
+ var window = getWindow(state.elements.popper);
3871
+ var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
3872
+
3873
+ if (scroll) {
3874
+ scrollParents.forEach(function (scrollParent) {
3875
+ scrollParent.addEventListener('scroll', instance.update, passive);
3876
+ });
3877
+ }
3878
+
3879
+ if (resize) {
3880
+ window.addEventListener('resize', instance.update, passive);
3881
+ }
3882
+
3883
+ return function () {
3884
+ if (scroll) {
3885
+ scrollParents.forEach(function (scrollParent) {
3886
+ scrollParent.removeEventListener('scroll', instance.update, passive);
3887
+ });
3888
+ }
3889
+
3890
+ if (resize) {
3891
+ window.removeEventListener('resize', instance.update, passive);
3892
+ }
3893
+ };
3894
+ } // eslint-disable-next-line import/no-unused-modules
3895
+
3896
+
3897
+ const eventListeners = {
3898
+ name: 'eventListeners',
3899
+ enabled: true,
3900
+ phase: 'write',
3901
+ fn: function fn() {},
3902
+ effect: effect,
3903
+ data: {}
3904
+ };
3905
+
3906
+ var hash$1 = {
3907
+ left: 'right',
3908
+ right: 'left',
3909
+ bottom: 'top',
3910
+ top: 'bottom'
3911
+ };
3912
+ function getOppositePlacement(placement) {
3913
+ return placement.replace(/left|right|bottom|top/g, function (matched) {
3914
+ return hash$1[matched];
3915
+ });
3916
+ }
3917
+
3918
+ var hash = {
3919
+ start: 'end',
3920
+ end: 'start'
3921
+ };
3922
+ function getOppositeVariationPlacement(placement) {
3923
+ return placement.replace(/start|end/g, function (matched) {
3924
+ return hash[matched];
3925
+ });
3926
+ }
3927
+
3928
+ function getWindowScroll(node) {
3929
+ var win = getWindow(node);
3930
+ var scrollLeft = win.pageXOffset;
3931
+ var scrollTop = win.pageYOffset;
3932
+ return {
3933
+ scrollLeft: scrollLeft,
3934
+ scrollTop: scrollTop
3935
+ };
3936
+ }
3937
+
3938
+ function getWindowScrollBarX(element) {
3939
+ // If <html> has a CSS width greater than the viewport, then this will be
3940
+ // incorrect for RTL.
3941
+ // Popper 1 is broken in this case and never had a bug report so let's assume
3942
+ // it's not an issue. I don't think anyone ever specifies width on <html>
3943
+ // anyway.
3944
+ // Browsers where the left scrollbar doesn't cause an issue report `0` for
3945
+ // this (e.g. Edge 2019, IE11, Safari)
3946
+ return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
3947
+ }
3948
+
3949
+ function getViewportRect(element) {
3950
+ var win = getWindow(element);
3951
+ var html = getDocumentElement(element);
3952
+ var visualViewport = win.visualViewport;
3953
+ var width = html.clientWidth;
3954
+ var height = html.clientHeight;
3955
+ var x = 0;
3956
+ var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper
3957
+ // can be obscured underneath it.
3958
+ // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even
3959
+ // if it isn't open, so if this isn't available, the popper will be detected
3960
+ // to overflow the bottom of the screen too early.
3961
+
3962
+ if (visualViewport) {
3963
+ width = visualViewport.width;
3964
+ height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)
3965
+ // In Chrome, it returns a value very close to 0 (+/-) but contains rounding
3966
+ // errors due to floating point numbers, so we need to check precision.
3967
+ // Safari returns a number <= 0, usually < -1 when pinch-zoomed
3968
+ // Feature detection fails in mobile emulation mode in Chrome.
3969
+ // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <
3970
+ // 0.001
3971
+ // Fallback here: "Not Safari" userAgent
3972
+
3973
+ if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
3974
+ x = visualViewport.offsetLeft;
3975
+ y = visualViewport.offsetTop;
3976
+ }
3977
+ }
3978
+
3979
+ return {
3980
+ width: width,
3981
+ height: height,
3982
+ x: x + getWindowScrollBarX(element),
3983
+ y: y
3984
+ };
3985
+ }
3986
+
3987
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable
3988
+
3989
+ function getDocumentRect(element) {
3990
+ var _element$ownerDocumen;
3991
+
3992
+ var html = getDocumentElement(element);
3993
+ var winScroll = getWindowScroll(element);
3994
+ var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
3995
+ var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
3996
+ var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
3997
+ var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
3998
+ var y = -winScroll.scrollTop;
3999
+
4000
+ if (getComputedStyle(body || html).direction === 'rtl') {
4001
+ x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
4002
+ }
4003
+
4004
+ return {
4005
+ width: width,
4006
+ height: height,
4007
+ x: x,
4008
+ y: y
4009
+ };
4010
+ }
4011
+
4012
+ function isScrollParent(element) {
4013
+ // Firefox wants us to check `-x` and `-y` variations as well
4014
+ var _getComputedStyle = getComputedStyle(element),
4015
+ overflow = _getComputedStyle.overflow,
4016
+ overflowX = _getComputedStyle.overflowX,
4017
+ overflowY = _getComputedStyle.overflowY;
4018
+
4019
+ return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
4020
+ }
4021
+
4022
+ function getScrollParent(node) {
4023
+ if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
4024
+ // $FlowFixMe[incompatible-return]: assume body is always available
4025
+ return node.ownerDocument.body;
4026
+ }
4027
+
4028
+ if (isHTMLElement(node) && isScrollParent(node)) {
4029
+ return node;
4030
+ }
4031
+
4032
+ return getScrollParent(getParentNode(node));
4033
+ }
4034
+
4035
+ /*
4036
+ given a DOM element, return the list of all scroll parents, up the list of ancesors
4037
+ until we get to the top window object. This list is what we attach scroll listeners
4038
+ to, because if any of these parent elements scroll, we'll need to re-calculate the
4039
+ reference element's position.
4040
+ */
4041
+
4042
+ function listScrollParents(element, list) {
4043
+ var _element$ownerDocumen;
4044
+
4045
+ if (list === void 0) {
4046
+ list = [];
4047
+ }
4048
+
4049
+ var scrollParent = getScrollParent(element);
4050
+ var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
4051
+ var win = getWindow(scrollParent);
4052
+ var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
4053
+ var updatedList = list.concat(target);
4054
+ return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
4055
+ updatedList.concat(listScrollParents(getParentNode(target)));
4056
+ }
4057
+
4058
+ function rectToClientRect(rect) {
4059
+ return Object.assign({}, rect, {
4060
+ left: rect.x,
4061
+ top: rect.y,
4062
+ right: rect.x + rect.width,
4063
+ bottom: rect.y + rect.height
4064
+ });
4065
+ }
4066
+
4067
+ function getInnerBoundingClientRect(element) {
4068
+ var rect = getBoundingClientRect(element);
4069
+ rect.top = rect.top + element.clientTop;
4070
+ rect.left = rect.left + element.clientLeft;
4071
+ rect.bottom = rect.top + element.clientHeight;
4072
+ rect.right = rect.left + element.clientWidth;
4073
+ rect.width = element.clientWidth;
4074
+ rect.height = element.clientHeight;
4075
+ rect.x = rect.left;
4076
+ rect.y = rect.top;
4077
+ return rect;
4078
+ }
4079
+
4080
+ function getClientRectFromMixedType(element, clippingParent) {
4081
+ return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
4082
+ } // A "clipping parent" is an overflowable container with the characteristic of
4083
+ // clipping (or hiding) overflowing elements with a position different from
4084
+ // `initial`
4085
+
4086
+
4087
+ function getClippingParents(element) {
4088
+ var clippingParents = listScrollParents(getParentNode(element));
4089
+ var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;
4090
+ var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
4091
+
4092
+ if (!isElement(clipperElement)) {
4093
+ return [];
4094
+ } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
4095
+
4096
+
4097
+ return clippingParents.filter(function (clippingParent) {
4098
+ return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
4099
+ });
4100
+ } // Gets the maximum area that the element is visible in due to any number of
4101
+ // clipping parents
4102
+
4103
+
4104
+ function getClippingRect(element, boundary, rootBoundary) {
4105
+ var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
4106
+ var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
4107
+ var firstClippingParent = clippingParents[0];
4108
+ var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
4109
+ var rect = getClientRectFromMixedType(element, clippingParent);
4110
+ accRect.top = max(rect.top, accRect.top);
4111
+ accRect.right = min(rect.right, accRect.right);
4112
+ accRect.bottom = min(rect.bottom, accRect.bottom);
4113
+ accRect.left = max(rect.left, accRect.left);
4114
+ return accRect;
4115
+ }, getClientRectFromMixedType(element, firstClippingParent));
4116
+ clippingRect.width = clippingRect.right - clippingRect.left;
4117
+ clippingRect.height = clippingRect.bottom - clippingRect.top;
4118
+ clippingRect.x = clippingRect.left;
4119
+ clippingRect.y = clippingRect.top;
4120
+ return clippingRect;
4121
+ }
4122
+
4123
+ function computeOffsets(_ref) {
4124
+ var reference = _ref.reference,
4125
+ element = _ref.element,
4126
+ placement = _ref.placement;
4127
+ var basePlacement = placement ? getBasePlacement(placement) : null;
4128
+ var variation = placement ? getVariation(placement) : null;
4129
+ var commonX = reference.x + reference.width / 2 - element.width / 2;
4130
+ var commonY = reference.y + reference.height / 2 - element.height / 2;
4131
+ var offsets;
4132
+
4133
+ switch (basePlacement) {
4134
+ case top:
4135
+ offsets = {
4136
+ x: commonX,
4137
+ y: reference.y - element.height
4138
+ };
4139
+ break;
4140
+
4141
+ case bottom:
4142
+ offsets = {
4143
+ x: commonX,
4144
+ y: reference.y + reference.height
4145
+ };
4146
+ break;
4147
+
4148
+ case right:
4149
+ offsets = {
4150
+ x: reference.x + reference.width,
4151
+ y: commonY
4152
+ };
4153
+ break;
4154
+
4155
+ case left:
4156
+ offsets = {
4157
+ x: reference.x - element.width,
4158
+ y: commonY
4159
+ };
4160
+ break;
4161
+
4162
+ default:
4163
+ offsets = {
4164
+ x: reference.x,
4165
+ y: reference.y
4166
+ };
4167
+ }
4168
+
4169
+ var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
4170
+
4171
+ if (mainAxis != null) {
4172
+ var len = mainAxis === 'y' ? 'height' : 'width';
4173
+
4174
+ switch (variation) {
4175
+ case start:
4176
+ offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
4177
+ break;
4178
+
4179
+ case end:
4180
+ offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
4181
+ break;
4182
+ }
4183
+ }
4184
+
4185
+ return offsets;
4186
+ }
4187
+
4188
+ function detectOverflow(state, options) {
4189
+ if (options === void 0) {
4190
+ options = {};
4191
+ }
4192
+
4193
+ var _options = options,
4194
+ _options$placement = _options.placement,
4195
+ placement = _options$placement === void 0 ? state.placement : _options$placement,
4196
+ _options$boundary = _options.boundary,
4197
+ boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
4198
+ _options$rootBoundary = _options.rootBoundary,
4199
+ rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,
4200
+ _options$elementConte = _options.elementContext,
4201
+ elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,
4202
+ _options$altBoundary = _options.altBoundary,
4203
+ altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,
4204
+ _options$padding = _options.padding,
4205
+ padding = _options$padding === void 0 ? 0 : _options$padding;
4206
+ var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
4207
+ var altContext = elementContext === popper ? reference : popper;
4208
+ var popperRect = state.rects.popper;
4209
+ var element = state.elements[altBoundary ? altContext : elementContext];
4210
+ var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
4211
+ var referenceClientRect = getBoundingClientRect(state.elements.reference);
4212
+ var popperOffsets = computeOffsets({
4213
+ reference: referenceClientRect,
4214
+ element: popperRect,
4215
+ strategy: 'absolute',
4216
+ placement: placement
4217
+ });
4218
+ var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
4219
+ var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
4220
+ // 0 or negative = within the clipping rect
4221
+
4222
+ var overflowOffsets = {
4223
+ top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
4224
+ bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
4225
+ left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
4226
+ right: elementClientRect.right - clippingClientRect.right + paddingObject.right
4227
+ };
4228
+ var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element
4229
+
4230
+ if (elementContext === popper && offsetData) {
4231
+ var offset = offsetData[placement];
4232
+ Object.keys(overflowOffsets).forEach(function (key) {
4233
+ var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
4234
+ var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
4235
+ overflowOffsets[key] += offset[axis] * multiply;
4236
+ });
4237
+ }
4238
+
4239
+ return overflowOffsets;
4240
+ }
4241
+
4242
+ function computeAutoPlacement(state, options) {
4243
+ if (options === void 0) {
4244
+ options = {};
4245
+ }
4246
+
4247
+ var _options = options,
4248
+ placement = _options.placement,
4249
+ boundary = _options.boundary,
4250
+ rootBoundary = _options.rootBoundary,
4251
+ padding = _options.padding,
4252
+ flipVariations = _options.flipVariations,
4253
+ _options$allowedAutoP = _options.allowedAutoPlacements,
4254
+ allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;
4255
+ var variation = getVariation(placement);
4256
+ var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {
4257
+ return getVariation(placement) === variation;
4258
+ }) : basePlacements;
4259
+ var allowedPlacements = placements$1.filter(function (placement) {
4260
+ return allowedAutoPlacements.indexOf(placement) >= 0;
4261
+ });
4262
+
4263
+ if (allowedPlacements.length === 0) {
4264
+ allowedPlacements = placements$1;
4265
+ } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
4266
+
4267
+
4268
+ var overflows = allowedPlacements.reduce(function (acc, placement) {
4269
+ acc[placement] = detectOverflow(state, {
4270
+ placement: placement,
4271
+ boundary: boundary,
4272
+ rootBoundary: rootBoundary,
4273
+ padding: padding
4274
+ })[getBasePlacement(placement)];
4275
+ return acc;
4276
+ }, {});
4277
+ return Object.keys(overflows).sort(function (a, b) {
4278
+ return overflows[a] - overflows[b];
4279
+ });
4280
+ }
4281
+
4282
+ function getExpandedFallbackPlacements(placement) {
4283
+ if (getBasePlacement(placement) === auto) {
4284
+ return [];
4285
+ }
4286
+
4287
+ var oppositePlacement = getOppositePlacement(placement);
4288
+ return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
4289
+ }
4290
+
4291
+ function flip(_ref) {
4292
+ var state = _ref.state,
4293
+ options = _ref.options,
4294
+ name = _ref.name;
4295
+
4296
+ if (state.modifiersData[name]._skip) {
4297
+ return;
4298
+ }
4299
+
4300
+ var _options$mainAxis = options.mainAxis,
4301
+ checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
4302
+ _options$altAxis = options.altAxis,
4303
+ checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,
4304
+ specifiedFallbackPlacements = options.fallbackPlacements,
4305
+ padding = options.padding,
4306
+ boundary = options.boundary,
4307
+ rootBoundary = options.rootBoundary,
4308
+ altBoundary = options.altBoundary,
4309
+ _options$flipVariatio = options.flipVariations,
4310
+ flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,
4311
+ allowedAutoPlacements = options.allowedAutoPlacements;
4312
+ var preferredPlacement = state.options.placement;
4313
+ var basePlacement = getBasePlacement(preferredPlacement);
4314
+ var isBasePlacement = basePlacement === preferredPlacement;
4315
+ var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
4316
+ var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {
4317
+ return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {
4318
+ placement: placement,
4319
+ boundary: boundary,
4320
+ rootBoundary: rootBoundary,
4321
+ padding: padding,
4322
+ flipVariations: flipVariations,
4323
+ allowedAutoPlacements: allowedAutoPlacements
4324
+ }) : placement);
4325
+ }, []);
4326
+ var referenceRect = state.rects.reference;
4327
+ var popperRect = state.rects.popper;
4328
+ var checksMap = new Map();
4329
+ var makeFallbackChecks = true;
4330
+ var firstFittingPlacement = placements[0];
4331
+
4332
+ for (var i = 0; i < placements.length; i++) {
4333
+ var placement = placements[i];
4334
+
4335
+ var _basePlacement = getBasePlacement(placement);
4336
+
4337
+ var isStartVariation = getVariation(placement) === start;
4338
+ var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;
4339
+ var len = isVertical ? 'width' : 'height';
4340
+ var overflow = detectOverflow(state, {
4341
+ placement: placement,
4342
+ boundary: boundary,
4343
+ rootBoundary: rootBoundary,
4344
+ altBoundary: altBoundary,
4345
+ padding: padding
4346
+ });
4347
+ var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;
4348
+
4349
+ if (referenceRect[len] > popperRect[len]) {
4350
+ mainVariationSide = getOppositePlacement(mainVariationSide);
4351
+ }
4352
+
4353
+ var altVariationSide = getOppositePlacement(mainVariationSide);
4354
+ var checks = [];
4355
+
4356
+ if (checkMainAxis) {
4357
+ checks.push(overflow[_basePlacement] <= 0);
4358
+ }
4359
+
4360
+ if (checkAltAxis) {
4361
+ checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
4362
+ }
4363
+
4364
+ if (checks.every(function (check) {
4365
+ return check;
4366
+ })) {
4367
+ firstFittingPlacement = placement;
4368
+ makeFallbackChecks = false;
4369
+ break;
4370
+ }
4371
+
4372
+ checksMap.set(placement, checks);
4373
+ }
4374
+
4375
+ if (makeFallbackChecks) {
4376
+ // `2` may be desired in some cases – research later
4377
+ var numberOfChecks = flipVariations ? 3 : 1;
4378
+
4379
+ var _loop = function _loop(_i) {
4380
+ var fittingPlacement = placements.find(function (placement) {
4381
+ var checks = checksMap.get(placement);
4382
+
4383
+ if (checks) {
4384
+ return checks.slice(0, _i).every(function (check) {
4385
+ return check;
4386
+ });
4387
+ }
4388
+ });
4389
+
4390
+ if (fittingPlacement) {
4391
+ firstFittingPlacement = fittingPlacement;
4392
+ return "break";
4393
+ }
4394
+ };
4395
+
4396
+ for (var _i = numberOfChecks; _i > 0; _i--) {
4397
+ var _ret = _loop(_i);
4398
+
4399
+ if (_ret === "break") break;
4400
+ }
4401
+ }
4402
+
4403
+ if (state.placement !== firstFittingPlacement) {
4404
+ state.modifiersData[name]._skip = true;
4405
+ state.placement = firstFittingPlacement;
4406
+ state.reset = true;
4407
+ }
4408
+ } // eslint-disable-next-line import/no-unused-modules
4409
+
4410
+
4411
+ const flip$1 = {
4412
+ name: 'flip',
4413
+ enabled: true,
4414
+ phase: 'main',
4415
+ fn: flip,
4416
+ requiresIfExists: ['offset'],
4417
+ data: {
4418
+ _skip: false
4419
+ }
4420
+ };
4421
+
4422
+ function getSideOffsets(overflow, rect, preventedOffsets) {
4423
+ if (preventedOffsets === void 0) {
4424
+ preventedOffsets = {
4425
+ x: 0,
4426
+ y: 0
4427
+ };
4428
+ }
4429
+
4430
+ return {
4431
+ top: overflow.top - rect.height - preventedOffsets.y,
4432
+ right: overflow.right - rect.width + preventedOffsets.x,
4433
+ bottom: overflow.bottom - rect.height + preventedOffsets.y,
4434
+ left: overflow.left - rect.width - preventedOffsets.x
4435
+ };
4436
+ }
4437
+
4438
+ function isAnySideFullyClipped(overflow) {
4439
+ return [top, right, bottom, left].some(function (side) {
4440
+ return overflow[side] >= 0;
4441
+ });
4442
+ }
4443
+
4444
+ function hide(_ref) {
4445
+ var state = _ref.state,
4446
+ name = _ref.name;
4447
+ var referenceRect = state.rects.reference;
4448
+ var popperRect = state.rects.popper;
4449
+ var preventedOffsets = state.modifiersData.preventOverflow;
4450
+ var referenceOverflow = detectOverflow(state, {
4451
+ elementContext: 'reference'
4452
+ });
4453
+ var popperAltOverflow = detectOverflow(state, {
4454
+ altBoundary: true
4455
+ });
4456
+ var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
4457
+ var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
4458
+ var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
4459
+ var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
4460
+ state.modifiersData[name] = {
4461
+ referenceClippingOffsets: referenceClippingOffsets,
4462
+ popperEscapeOffsets: popperEscapeOffsets,
4463
+ isReferenceHidden: isReferenceHidden,
4464
+ hasPopperEscaped: hasPopperEscaped
4465
+ };
4466
+ state.attributes.popper = Object.assign({}, state.attributes.popper, {
4467
+ 'data-popper-reference-hidden': isReferenceHidden,
4468
+ 'data-popper-escaped': hasPopperEscaped
4469
+ });
4470
+ } // eslint-disable-next-line import/no-unused-modules
4471
+
4472
+
4473
+ const hide$1 = {
4474
+ name: 'hide',
4475
+ enabled: true,
4476
+ phase: 'main',
4477
+ requiresIfExists: ['preventOverflow'],
4478
+ fn: hide
4479
+ };
4480
+
4481
+ function distanceAndSkiddingToXY(placement, rects, offset) {
4482
+ var basePlacement = getBasePlacement(placement);
4483
+ var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
4484
+
4485
+ var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {
4486
+ placement: placement
4487
+ })) : offset,
4488
+ skidding = _ref[0],
4489
+ distance = _ref[1];
4490
+
4491
+ skidding = skidding || 0;
4492
+ distance = (distance || 0) * invertDistance;
4493
+ return [left, right].indexOf(basePlacement) >= 0 ? {
4494
+ x: distance,
4495
+ y: skidding
4496
+ } : {
4497
+ x: skidding,
4498
+ y: distance
4499
+ };
4500
+ }
4501
+
4502
+ function offset(_ref2) {
4503
+ var state = _ref2.state,
4504
+ options = _ref2.options,
4505
+ name = _ref2.name;
4506
+ var _options$offset = options.offset,
4507
+ offset = _options$offset === void 0 ? [0, 0] : _options$offset;
4508
+ var data = placements.reduce(function (acc, placement) {
4509
+ acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
4510
+ return acc;
4511
+ }, {});
4512
+ var _data$state$placement = data[state.placement],
4513
+ x = _data$state$placement.x,
4514
+ y = _data$state$placement.y;
4515
+
4516
+ if (state.modifiersData.popperOffsets != null) {
4517
+ state.modifiersData.popperOffsets.x += x;
4518
+ state.modifiersData.popperOffsets.y += y;
4519
+ }
4520
+
4521
+ state.modifiersData[name] = data;
4522
+ } // eslint-disable-next-line import/no-unused-modules
4523
+
4524
+
4525
+ const offset$1 = {
4526
+ name: 'offset',
4527
+ enabled: true,
4528
+ phase: 'main',
4529
+ requires: ['popperOffsets'],
4530
+ fn: offset
4531
+ };
4532
+
4533
+ function popperOffsets(_ref) {
4534
+ var state = _ref.state,
4535
+ name = _ref.name;
4536
+ // Offsets are the actual position the popper needs to have to be
4537
+ // properly positioned near its reference element
4538
+ // This is the most basic placement, and will be adjusted by
4539
+ // the modifiers in the next step
4540
+ state.modifiersData[name] = computeOffsets({
4541
+ reference: state.rects.reference,
4542
+ element: state.rects.popper,
4543
+ strategy: 'absolute',
4544
+ placement: state.placement
4545
+ });
4546
+ } // eslint-disable-next-line import/no-unused-modules
4547
+
4548
+
4549
+ const popperOffsets$1 = {
4550
+ name: 'popperOffsets',
4551
+ enabled: true,
4552
+ phase: 'read',
4553
+ fn: popperOffsets,
4554
+ data: {}
4555
+ };
4556
+
4557
+ function getAltAxis(axis) {
4558
+ return axis === 'x' ? 'y' : 'x';
4559
+ }
4560
+
4561
+ function preventOverflow(_ref) {
4562
+ var state = _ref.state,
4563
+ options = _ref.options,
4564
+ name = _ref.name;
4565
+ var _options$mainAxis = options.mainAxis,
4566
+ checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
4567
+ _options$altAxis = options.altAxis,
4568
+ checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,
4569
+ boundary = options.boundary,
4570
+ rootBoundary = options.rootBoundary,
4571
+ altBoundary = options.altBoundary,
4572
+ padding = options.padding,
4573
+ _options$tether = options.tether,
4574
+ tether = _options$tether === void 0 ? true : _options$tether,
4575
+ _options$tetherOffset = options.tetherOffset,
4576
+ tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
4577
+ var overflow = detectOverflow(state, {
4578
+ boundary: boundary,
4579
+ rootBoundary: rootBoundary,
4580
+ padding: padding,
4581
+ altBoundary: altBoundary
4582
+ });
4583
+ var basePlacement = getBasePlacement(state.placement);
4584
+ var variation = getVariation(state.placement);
4585
+ var isBasePlacement = !variation;
4586
+ var mainAxis = getMainAxisFromPlacement(basePlacement);
4587
+ var altAxis = getAltAxis(mainAxis);
4588
+ var popperOffsets = state.modifiersData.popperOffsets;
4589
+ var referenceRect = state.rects.reference;
4590
+ var popperRect = state.rects.popper;
4591
+ var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
4592
+ placement: state.placement
4593
+ })) : tetherOffset;
4594
+ var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
4595
+ mainAxis: tetherOffsetValue,
4596
+ altAxis: tetherOffsetValue
4597
+ } : Object.assign({
4598
+ mainAxis: 0,
4599
+ altAxis: 0
4600
+ }, tetherOffsetValue);
4601
+ var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
4602
+ var data = {
4603
+ x: 0,
4604
+ y: 0
4605
+ };
4606
+
4607
+ if (!popperOffsets) {
4608
+ return;
4609
+ }
4610
+
4611
+ if (checkMainAxis) {
4612
+ var _offsetModifierState$;
4613
+
4614
+ var mainSide = mainAxis === 'y' ? top : left;
4615
+ var altSide = mainAxis === 'y' ? bottom : right;
4616
+ var len = mainAxis === 'y' ? 'height' : 'width';
4617
+ var offset = popperOffsets[mainAxis];
4618
+ var min$1 = offset + overflow[mainSide];
4619
+ var max$1 = offset - overflow[altSide];
4620
+ var additive = tether ? -popperRect[len] / 2 : 0;
4621
+ var minLen = variation === start ? referenceRect[len] : popperRect[len];
4622
+ var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
4623
+ // outside the reference bounds
4624
+
4625
+ var arrowElement = state.elements.arrow;
4626
+ var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
4627
+ width: 0,
4628
+ height: 0
4629
+ };
4630
+ var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();
4631
+ var arrowPaddingMin = arrowPaddingObject[mainSide];
4632
+ var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want
4633
+ // to include its full size in the calculation. If the reference is small
4634
+ // and near the edge of a boundary, the popper can overflow even if the
4635
+ // reference is not overflowing as well (e.g. virtual elements with no
4636
+ // width or height)
4637
+
4638
+ var arrowLen = within(0, referenceRect[len], arrowRect[len]);
4639
+ var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
4640
+ var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
4641
+ var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
4642
+ var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
4643
+ var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
4644
+ var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
4645
+ var tetherMax = offset + maxOffset - offsetModifierValue;
4646
+ var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
4647
+ popperOffsets[mainAxis] = preventedOffset;
4648
+ data[mainAxis] = preventedOffset - offset;
4649
+ }
4650
+
4651
+ if (checkAltAxis) {
4652
+ var _offsetModifierState$2;
4653
+
4654
+ var _mainSide = mainAxis === 'x' ? top : left;
4655
+
4656
+ var _altSide = mainAxis === 'x' ? bottom : right;
4657
+
4658
+ var _offset = popperOffsets[altAxis];
4659
+
4660
+ var _len = altAxis === 'y' ? 'height' : 'width';
4661
+
4662
+ var _min = _offset + overflow[_mainSide];
4663
+
4664
+ var _max = _offset - overflow[_altSide];
4665
+
4666
+ var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
4667
+
4668
+ var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
4669
+
4670
+ var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
4671
+
4672
+ var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
4673
+
4674
+ var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
4675
+
4676
+ popperOffsets[altAxis] = _preventedOffset;
4677
+ data[altAxis] = _preventedOffset - _offset;
4678
+ }
4679
+
4680
+ state.modifiersData[name] = data;
4681
+ } // eslint-disable-next-line import/no-unused-modules
4682
+
4683
+
4684
+ const preventOverflow$1 = {
4685
+ name: 'preventOverflow',
4686
+ enabled: true,
4687
+ phase: 'main',
4688
+ fn: preventOverflow,
4689
+ requiresIfExists: ['offset']
4690
+ };
4691
+
4692
+ function getHTMLElementScroll(element) {
4693
+ return {
4694
+ scrollLeft: element.scrollLeft,
4695
+ scrollTop: element.scrollTop
4696
+ };
4697
+ }
4698
+
4699
+ function getNodeScroll(node) {
4700
+ if (node === getWindow(node) || !isHTMLElement(node)) {
4701
+ return getWindowScroll(node);
4702
+ } else {
4703
+ return getHTMLElementScroll(node);
4704
+ }
4705
+ }
4706
+
4707
+ function isElementScaled(element) {
4708
+ var rect = element.getBoundingClientRect();
4709
+ var scaleX = round(rect.width) / element.offsetWidth || 1;
4710
+ var scaleY = round(rect.height) / element.offsetHeight || 1;
4711
+ return scaleX !== 1 || scaleY !== 1;
4712
+ } // Returns the composite rect of an element relative to its offsetParent.
4713
+ // Composite means it takes into account transforms as well as layout.
4714
+
4715
+
4716
+ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
4717
+ if (isFixed === void 0) {
4718
+ isFixed = false;
4719
+ }
4720
+
4721
+ var isOffsetParentAnElement = isHTMLElement(offsetParent);
4722
+ var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
4723
+ var documentElement = getDocumentElement(offsetParent);
4724
+ var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
4725
+ var scroll = {
4726
+ scrollLeft: 0,
4727
+ scrollTop: 0
4728
+ };
4729
+ var offsets = {
4730
+ x: 0,
4731
+ y: 0
4732
+ };
4733
+
4734
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
4735
+ if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
4736
+ isScrollParent(documentElement)) {
4737
+ scroll = getNodeScroll(offsetParent);
4738
+ }
4739
+
4740
+ if (isHTMLElement(offsetParent)) {
4741
+ offsets = getBoundingClientRect(offsetParent, true);
4742
+ offsets.x += offsetParent.clientLeft;
4743
+ offsets.y += offsetParent.clientTop;
4744
+ } else if (documentElement) {
4745
+ offsets.x = getWindowScrollBarX(documentElement);
4746
+ }
4747
+ }
4748
+
4749
+ return {
4750
+ x: rect.left + scroll.scrollLeft - offsets.x,
4751
+ y: rect.top + scroll.scrollTop - offsets.y,
4752
+ width: rect.width,
4753
+ height: rect.height
4754
+ };
4755
+ }
4756
+
4757
+ function order(modifiers) {
4758
+ var map = new Map();
4759
+ var visited = new Set();
4760
+ var result = [];
4761
+ modifiers.forEach(function (modifier) {
4762
+ map.set(modifier.name, modifier);
4763
+ }); // On visiting object, check for its dependencies and visit them recursively
4764
+
4765
+ function sort(modifier) {
4766
+ visited.add(modifier.name);
4767
+ var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
4768
+ requires.forEach(function (dep) {
4769
+ if (!visited.has(dep)) {
4770
+ var depModifier = map.get(dep);
4771
+
4772
+ if (depModifier) {
4773
+ sort(depModifier);
4774
+ }
4775
+ }
4776
+ });
4777
+ result.push(modifier);
4778
+ }
4779
+
4780
+ modifiers.forEach(function (modifier) {
4781
+ if (!visited.has(modifier.name)) {
4782
+ // check for visited object
4783
+ sort(modifier);
4784
+ }
4785
+ });
4786
+ return result;
4787
+ }
4788
+
4789
+ function orderModifiers(modifiers) {
4790
+ // order based on dependencies
4791
+ var orderedModifiers = order(modifiers); // order based on phase
4792
+
4793
+ return modifierPhases.reduce(function (acc, phase) {
4794
+ return acc.concat(orderedModifiers.filter(function (modifier) {
4795
+ return modifier.phase === phase;
4796
+ }));
4797
+ }, []);
4798
+ }
4799
+
4800
+ function debounce(fn) {
4801
+ var pending;
4802
+ return function () {
4803
+ if (!pending) {
4804
+ pending = new Promise(function (resolve) {
4805
+ Promise.resolve().then(function () {
4806
+ pending = undefined;
4807
+ resolve(fn());
4808
+ });
4809
+ });
4810
+ }
4811
+
4812
+ return pending;
4813
+ };
4814
+ }
4815
+
4816
+ function mergeByName(modifiers) {
4817
+ var merged = modifiers.reduce(function (merged, current) {
4818
+ var existing = merged[current.name];
4819
+ merged[current.name] = existing ? Object.assign({}, existing, current, {
4820
+ options: Object.assign({}, existing.options, current.options),
4821
+ data: Object.assign({}, existing.data, current.data)
4822
+ }) : current;
4823
+ return merged;
4824
+ }, {}); // IE11 does not support Object.values
4825
+
4826
+ return Object.keys(merged).map(function (key) {
4827
+ return merged[key];
4828
+ });
4829
+ }
4830
+
4831
+ var DEFAULT_OPTIONS = {
4832
+ placement: 'bottom',
4833
+ modifiers: [],
4834
+ strategy: 'absolute'
4835
+ };
4836
+
4837
+ function areValidElements() {
4838
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
4839
+ args[_key] = arguments[_key];
4840
+ }
4841
+
4842
+ return !args.some(function (element) {
4843
+ return !(element && typeof element.getBoundingClientRect === 'function');
4844
+ });
4845
+ }
4846
+
4847
+ function popperGenerator(generatorOptions) {
4848
+ if (generatorOptions === void 0) {
4849
+ generatorOptions = {};
4850
+ }
4851
+
4852
+ var _generatorOptions = generatorOptions,
4853
+ _generatorOptions$def = _generatorOptions.defaultModifiers,
4854
+ defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
4855
+ _generatorOptions$def2 = _generatorOptions.defaultOptions,
4856
+ defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
4857
+ return function createPopper(reference, popper, options) {
4858
+ if (options === void 0) {
4859
+ options = defaultOptions;
4860
+ }
4861
+
4862
+ var state = {
4863
+ placement: 'bottom',
4864
+ orderedModifiers: [],
4865
+ options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
4866
+ modifiersData: {},
4867
+ elements: {
4868
+ reference: reference,
4869
+ popper: popper
4870
+ },
4871
+ attributes: {},
4872
+ styles: {}
4873
+ };
4874
+ var effectCleanupFns = [];
4875
+ var isDestroyed = false;
4876
+ var instance = {
4877
+ state: state,
4878
+ setOptions: function setOptions(setOptionsAction) {
4879
+ var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;
4880
+ cleanupModifierEffects();
4881
+ state.options = Object.assign({}, defaultOptions, state.options, options);
4882
+ state.scrollParents = {
4883
+ reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
4884
+ popper: listScrollParents(popper)
4885
+ }; // Orders the modifiers based on their dependencies and `phase`
4886
+ // properties
4887
+
4888
+ var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
4889
+
4890
+ state.orderedModifiers = orderedModifiers.filter(function (m) {
4891
+ return m.enabled;
4892
+ }); // Validate the provided modifiers so that the consumer will get warned
4893
+
4894
+ runModifierEffects();
4895
+ return instance.update();
4896
+ },
4897
+ // Sync update – it will always be executed, even if not necessary. This
4898
+ // is useful for low frequency updates where sync behavior simplifies the
4899
+ // logic.
4900
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
4901
+ // prefer the async Popper#update method
4902
+ forceUpdate: function forceUpdate() {
4903
+ if (isDestroyed) {
4904
+ return;
4905
+ }
4906
+
4907
+ var _state$elements = state.elements,
4908
+ reference = _state$elements.reference,
4909
+ popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
4910
+ // anymore
4911
+
4912
+ if (!areValidElements(reference, popper)) {
4913
+
4914
+ return;
4915
+ } // Store the reference and popper rects to be read by modifiers
4916
+
4917
+
4918
+ state.rects = {
4919
+ reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
4920
+ popper: getLayoutRect(popper)
4921
+ }; // Modifiers have the ability to reset the current update cycle. The
4922
+ // most common use case for this is the `flip` modifier changing the
4923
+ // placement, which then needs to re-run all the modifiers, because the
4924
+ // logic was previously ran for the previous placement and is therefore
4925
+ // stale/incorrect
4926
+
4927
+ state.reset = false;
4928
+ state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
4929
+ // is filled with the initial data specified by the modifier. This means
4930
+ // it doesn't persist and is fresh on each update.
4931
+ // To ensure persistent data, use `${name}#persistent`
4932
+
4933
+ state.orderedModifiers.forEach(function (modifier) {
4934
+ return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
4935
+ });
4936
+
4937
+ for (var index = 0; index < state.orderedModifiers.length; index++) {
4938
+
4939
+ if (state.reset === true) {
4940
+ state.reset = false;
4941
+ index = -1;
4942
+ continue;
4943
+ }
4944
+
4945
+ var _state$orderedModifie = state.orderedModifiers[index],
4946
+ fn = _state$orderedModifie.fn,
4947
+ _state$orderedModifie2 = _state$orderedModifie.options,
4948
+ _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
4949
+ name = _state$orderedModifie.name;
4950
+
4951
+ if (typeof fn === 'function') {
4952
+ state = fn({
4953
+ state: state,
4954
+ options: _options,
4955
+ name: name,
4956
+ instance: instance
4957
+ }) || state;
4958
+ }
4959
+ }
4960
+ },
4961
+ // Async and optimistically optimized update – it will not be executed if
4962
+ // not necessary (debounced to run at most once-per-tick)
4963
+ update: debounce(function () {
4964
+ return new Promise(function (resolve) {
4965
+ instance.forceUpdate();
4966
+ resolve(state);
4967
+ });
4968
+ }),
4969
+ destroy: function destroy() {
4970
+ cleanupModifierEffects();
4971
+ isDestroyed = true;
4972
+ }
4973
+ };
4974
+
4975
+ if (!areValidElements(reference, popper)) {
4976
+
4977
+ return instance;
4978
+ }
4979
+
4980
+ instance.setOptions(options).then(function (state) {
4981
+ if (!isDestroyed && options.onFirstUpdate) {
4982
+ options.onFirstUpdate(state);
4983
+ }
4984
+ }); // Modifiers have the ability to execute arbitrary code before the first
4985
+ // update cycle runs. They will be executed in the same order as the update
4986
+ // cycle. This is useful when a modifier adds some persistent data that
4987
+ // other modifiers need to use, but the modifier is run after the dependent
4988
+ // one.
4989
+
4990
+ function runModifierEffects() {
4991
+ state.orderedModifiers.forEach(function (_ref3) {
4992
+ var name = _ref3.name,
4993
+ _ref3$options = _ref3.options,
4994
+ options = _ref3$options === void 0 ? {} : _ref3$options,
4995
+ effect = _ref3.effect;
4996
+
4997
+ if (typeof effect === 'function') {
4998
+ var cleanupFn = effect({
4999
+ state: state,
5000
+ name: name,
5001
+ instance: instance,
5002
+ options: options
5003
+ });
5004
+
5005
+ var noopFn = function noopFn() {};
5006
+
5007
+ effectCleanupFns.push(cleanupFn || noopFn);
5008
+ }
5009
+ });
5010
+ }
5011
+
5012
+ function cleanupModifierEffects() {
5013
+ effectCleanupFns.forEach(function (fn) {
5014
+ return fn();
5015
+ });
5016
+ effectCleanupFns = [];
5017
+ }
5018
+
5019
+ return instance;
5020
+ };
5021
+ }
5022
+
5023
+ var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];
5024
+ var createPopper = /*#__PURE__*/popperGenerator({
5025
+ defaultModifiers: defaultModifiers
5026
+ }); // eslint-disable-next-line import/no-unused-modules
5027
+
5028
+ const mgPopoverCss = "mg-popover.sc-mg-popover{display:contents}mg-popover.sc-mg-popover-s>*{display:inline-block}.mg-popover.sc-mg-popover{display:none;padding:1.5rem;z-index:9999;border-radius:0.5rem;background-color:hsl(var(--mg-popover-background-color));box-shadow:var(--box-shadow);color:hsl(var(--mg-popover-font-color))}.mg-popover[data-show].sc-mg-popover{display:block}.mg-popover.sc-mg-popover mg-button.sc-mg-popover{float:right;margin-right:calc(0rem - (var(--default-size) - var(--mg-icon-regular-size)) / 2);margin-top:calc(0rem - (var(--default-size) - var(--mg-popover-title-font-size) * var(--line-height)) / 2);margin-left:3rem}.mg-popover.sc-mg-popover .mg-popover__arrow.sc-mg-popover,.mg-popover.sc-mg-popover .mg-popover__arrow.sc-mg-popover::before{position:absolute;width:2rem;height:2rem;z-index:-1;background:inherit}.mg-popover.sc-mg-popover .mg-popover__arrow.sc-mg-popover{visibility:hidden}.mg-popover.sc-mg-popover .mg-popover__arrow.sc-mg-popover::before{visibility:visible;content:\"\";transform:rotate(45deg)}.mg-popover[data-popper-placement^=top].sc-mg-popover>.mg-popover__arrow.sc-mg-popover{bottom:-6px}.mg-popover[data-popper-placement^=bottom].sc-mg-popover>.mg-popover__arrow.sc-mg-popover{top:-6px}.mg-popover[data-popper-placement^=left].sc-mg-popover>.mg-popover__arrow.sc-mg-popover{right:-6px}.mg-popover[data-popper-placement^=right].sc-mg-popover>.mg-popover__arrow.sc-mg-popover{left:-6px}.mg-popover__title.sc-mg-popover-s>[slot=title],.mg-popover__title .sc-mg-popover-s>[slot=title]{margin:0 0 1rem;font-size:var(--mg-popover-title-font-size);font-weight:600}";
5029
+
5030
+ const MgPopover = class {
5031
+ constructor(hostRef) {
5032
+ index.registerInstance(this, hostRef);
5033
+ this.displayChange = index.createEvent(this, "display-change", 7);
5034
+ this.closeButtonId = '';
5035
+ /**
5036
+ * Sets an `id` attribute.
5037
+ * Needed by the input for accessibility `aria-decribedby`.
5038
+ */
5039
+ this.identifier = index$1.createID('mg-popover');
5040
+ /**
5041
+ * Popover placement
5042
+ */
5043
+ this.placement = 'bottom';
5044
+ /**
5045
+ * Define if popover has a cross button
5046
+ */
5047
+ this.closeButton = false;
5048
+ /**
5049
+ * Display popover
5050
+ */
5051
+ this.display = false;
5052
+ /**
5053
+ * Disable popover
5054
+ */
5055
+ this.disabled = false;
5056
+ /**
5057
+ * Check if clicked outside of component
5058
+ *
5059
+ * @param {MouseEvent} event mouse event
5060
+ * @returns {void}
5061
+ */
5062
+ this.clickOutside = (event) => {
5063
+ var _a;
5064
+ if (!this.disabled && ((_a = event.target.closest(`#${this.identifier}`)) === null || _a === void 0 ? void 0 : _a.parentElement.nodeName) !== 'MG-POPOVER') {
5065
+ this.display = false;
5066
+ }
5067
+ };
5068
+ /**
5069
+ * Show popover
5070
+ *
5071
+ * @returns {void}
5072
+ */
5073
+ this.show = () => {
5074
+ // Make the popover visible
5075
+ this.popover.setAttribute('data-show', '');
5076
+ // Enable the event listeners
5077
+ this.popper.setOptions(options => (Object.assign(Object.assign({}, options), { modifiers: [...options.modifiers, { name: 'eventListeners', enabled: true }] })));
5078
+ // Update its position
5079
+ this.popper.update();
5080
+ // hide when click outside
5081
+ // setTimeout is used to prevent event to trigger after creation
5082
+ setTimeout(() => {
5083
+ document.addEventListener('click', this.clickOutside, false);
5084
+ }, 0);
5085
+ };
5086
+ /**
5087
+ * Hide popover
5088
+ *
5089
+ * @returns {void}
5090
+ */
5091
+ this.hide = () => {
5092
+ // Hide the popover
5093
+ this.popover.removeAttribute('data-show');
5094
+ // Disable the event listeners
5095
+ this.popper.setOptions(options => (Object.assign(Object.assign({}, options), { modifiers: [...options.modifiers, { name: 'eventListeners', enabled: false }] })));
5096
+ // Remove event listener
5097
+ document.removeEventListener('click', this.clickOutside, false);
5098
+ };
5099
+ /**
5100
+ * Handle action for close button
5101
+ *
5102
+ * @returns {void}
5103
+ */
5104
+ this.handleCloseButton = () => {
5105
+ this.display = false;
5106
+ };
5107
+ }
5108
+ handleDisplay(newValue) {
5109
+ if (newValue) {
5110
+ this.show();
5111
+ }
5112
+ else {
5113
+ this.hide();
5114
+ }
5115
+ this.displayChange.emit(newValue);
5116
+ }
5117
+ /*************
5118
+ * Lifecycle *
5119
+ *************/
5120
+ /**
5121
+ * Check if component props are well configured on init
5122
+ *
5123
+ * @returns {void} timeout
5124
+ */
5125
+ componentWillLoad() {
5126
+ // Get locales
5127
+ this.messages = index$1.initLocales(this.element).messages;
5128
+ }
5129
+ /**
5130
+ * Check if component props are well configured on init
5131
+ *
5132
+ * @returns {void}
5133
+ */
5134
+ componentDidLoad() {
5135
+ const headingTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
5136
+ const slotedTitleElement = this.element.querySelector('[slot="title"]');
5137
+ if (slotedTitleElement && !index$1.isTagName(slotedTitleElement, headingTags)) {
5138
+ throw new Error(`<mg-popover> Slotted title must be a heading: ${headingTags.join(', ')}`);
5139
+ }
5140
+ // Set close button id
5141
+ if (this.closeButton) {
5142
+ this.closeButtonId = `${this.identifier}-close-button`;
5143
+ }
5144
+ // Get popover content
5145
+ this.popover = this.element.querySelector(`#${this.identifier}`);
5146
+ //Get interactive element
5147
+ const interactiveElement = this.element.firstElementChild;
5148
+ // Add aria attributes
5149
+ interactiveElement.setAttribute('aria-controls', this.identifier);
5150
+ interactiveElement.setAttribute('aria-expanded', `${this.display}`);
5151
+ // Create popperjs popover
5152
+ this.popper = createPopper(interactiveElement, this.popover, {
5153
+ placement: this.placement,
5154
+ modifiers: [
5155
+ {
5156
+ name: 'offset',
5157
+ options: {
5158
+ offset: [0, 10],
5159
+ },
5160
+ },
5161
+ ],
5162
+ });
5163
+ // Add events to toggle display
5164
+ interactiveElement.addEventListener('click', () => {
5165
+ if (!this.disabled)
5166
+ this.display = !this.display;
5167
+ });
5168
+ // Add events to hide popover
5169
+ this.element.addEventListener('keydown', e => {
5170
+ if (!this.disabled && e.code === 'Escape')
5171
+ this.display = false;
5172
+ });
5173
+ this.handleDisplay(this.display);
5174
+ }
5175
+ /**
5176
+ * Render
5177
+ *
5178
+ * @returns {HTMLElement} HTML Element
5179
+ */
5180
+ render() {
5181
+ return (index.h(index.Host, null, index.h("slot", null), index.h("div", { id: this.identifier, class: "mg-popover" }, !this.disabled && this.closeButton && (index.h("mg-button", { identifier: this.closeButtonId, "is-icon": true, variant: "flat", label: this.messages.general.close, onClick: this.handleCloseButton }, index.h("mg-icon", { icon: "cross" }))), index.h("div", { class: "mg-popover__title" }, index.h("slot", { name: "title" })), index.h("slot", { name: "content" }), index.h("div", { class: "mg-popover__arrow", "data-popper-arrow": true }))));
5182
+ }
5183
+ get element() { return index.getElement(this); }
5184
+ static get watchers() { return {
5185
+ "display": ["handleDisplay"]
5186
+ }; }
5187
+ };
5188
+ MgPopover.style = mgPopoverCss;
5189
+
5190
+ var Status;
5191
+ (function (Status) {
5192
+ Status["VISIBLE"] = "visible";
5193
+ Status["HIDDEN"] = "hidden";
5194
+ Status["DISABLED"] = "disabled";
5195
+ Status["ACTIVE"] = "active";
5196
+ })(Status || (Status = {}));
5197
+ /**
5198
+ * List of all possibles sizes
5199
+ */
5200
+ const sizes = ['regular', 'large'];
5201
+
5202
+ const mgTabsCss = ".mg-tabs.mg-tabs--size-regular .mg-tabs__navigation-button{padding:calc(1rem + 0.3rem) calc(1rem * 1.3) 1rem}.mg-tabs.mg-tabs--size-large .mg-tabs__navigation-button{padding:calc(1.8rem + 0.3rem) calc(1.8rem * 1.3) 1.8rem}.mg-tabs__header{display:flex;flex-direction:row;flex-wrap:wrap}.mg-tabs__navigation-button{display:flex;align-items:center;column-gap:0.5rem;background:none;border:none;border-bottom:0.3rem solid transparent;color:hsl(var(--color-dark));line-height:var(--line-height);cursor:pointer}.mg-tabs__navigation-button:disabled,.mg-tabs__navigation-button--disabled{cursor:default;opacity:30%}.mg-tabs__navigation-button:hover:not(:disabled),.mg-tabs__navigation-button:focus:not(:disabled){background-color:hsla(var(--color-info-h), var(--color-info-s), var(--color-info-l), 10%)}.mg-tabs__navigation-button.mg-tabs__navigation-button--active{color:hsl(var(--color-info));border-bottom-color:hsl(var(--color-info));font-weight:700}.mg-tabs__navigation-button.mg-tabs__navigation-button--hidden{display:none}.mg-tabs__content-container:focus-visible{outline:none}";
5203
+
5204
+ /**
5205
+ * type TabItem validation function
5206
+ *
5207
+ * @param {TabItem} tab tab item
5208
+ * @returns {boolean} tab item type is valid
5209
+ */
5210
+ const isTabItem = (tab) => typeof tab === 'object' && typeof tab.label === 'string';
5211
+ const MgTabs = class {
5212
+ constructor(hostRef) {
5213
+ index.registerInstance(this, hostRef);
5214
+ this.activeTabChange = index.createEvent(this, "active-tab-change", 7);
5215
+ /************
5216
+ * Internal *
5217
+ ************/
5218
+ this.tabPanel = 'panel';
5219
+ this.startIndex = 1;
5220
+ this.buttonTabBaseClass = 'mg-tabs__navigation-button';
5221
+ /**
5222
+ * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
5223
+ * If not set, it will be created.
5224
+ */
5225
+ this.identifier = index$1.createID('mg-tabs');
5226
+ /**
5227
+ * Define tabs size
5228
+ */
5229
+ this.size = 'regular';
5230
+ /**
5231
+ * Active tab number
5232
+ * default: first is 1
5233
+ */
5234
+ this.activeTab = 1;
5235
+ /**
5236
+ * Component tabs
5237
+ */
5238
+ this.tabs = [];
5239
+ /**
5240
+ * Component classes
5241
+ */
5242
+ this.classList = new index$1.ClassList(['mg-tabs']);
5243
+ /**
5244
+ * Method to set active tab
5245
+ *
5246
+ * @param {number} tabKey item tab key to set to ACTIVE status
5247
+ * @returns {void}
5248
+ */
5249
+ this.setActiveTab = (tabKey) => {
5250
+ // reset active tabs
5251
+ this.tabs.forEach(tab => {
5252
+ if (this.tabHasGivenStatus(tab, Status.ACTIVE))
5253
+ tab.status = Status.VISIBLE;
5254
+ });
5255
+ // set active tab from given tab key
5256
+ this.tabs[tabKey - this.startIndex].status = Status.ACTIVE;
5257
+ // emit change active tab key event
5258
+ this.activeTabChange.emit(tabKey);
5259
+ };
5260
+ /**
5261
+ * Method to know if given tab has the given status
5262
+ *
5263
+ * @param {TabItem} tab item tab key to set to ACTIVE status
5264
+ * @param {Status} status status to valide
5265
+ * @returns {boolean} status comparaison
5266
+ */
5267
+ this.tabHasGivenStatus = (tab, status) => tab.status === status;
5268
+ /**
5269
+ * Method to get element id from index
5270
+ *
5271
+ * @param {string} element to get id
5272
+ * @param {number} index to generate id
5273
+ * @returns {string} generated element id
5274
+ */
5275
+ this.getElementId = (element, index) => `${element}-${this.getTabIndex(index)}`;
5276
+ /**
5277
+ * Method to get tab index
5278
+ *
5279
+ * @param {number} index to get
5280
+ * @returns {number} index
5281
+ */
5282
+ this.getTabIndex = (index) => index + this.startIndex;
5283
+ /**
5284
+ * Handle click events on tabs
5285
+ *
5286
+ * @param {MouseEvent} event mouse event
5287
+ */
5288
+ this.handleClick = (event) => {
5289
+ const tabId = event.currentTarget.getAttribute('data-index');
5290
+ this.activeTab = Number(tabId);
5291
+ };
5292
+ /**
5293
+ * get navigation button class from given status
5294
+ *
5295
+ * @param {Status} status button tab status
5296
+ * @param {boolean} isSelector set if we need a CSS selector with the dot '.' at the begin. default value = false.
5297
+ * @returns {string} button class/selector variant
5298
+ */
5299
+ this.getNavigationButtonClass = (status, isSelector = false) => `${isSelector ? '.' : ''}${this.buttonTabBaseClass}--${status}`;
5300
+ /**
5301
+ * Handle keyboard event on tabs
5302
+ *
5303
+ * @param {MouseEvent} event mouse event
5304
+ * @returns {void}
5305
+ */
5306
+ this.handleKeydown = (event) => {
5307
+ let tabId = Number(event.target.getAttribute('data-index'));
5308
+ const parent = event.target.parentElement;
5309
+ // change selected id from key code
5310
+ if (event.key === 'ArrowRight') {
5311
+ tabId++;
5312
+ }
5313
+ else if (event.key === 'ArrowLeft') {
5314
+ tabId--;
5315
+ }
5316
+ // get selected tab if NOT hidden, disabled
5317
+ const selectedTab = parent.querySelector(`[data-index="${tabId}"]:not(${[this.getNavigationButtonClass(Status.HIDDEN, true), this.getNavigationButtonClass(Status.DISABLED, true)].join()})`);
5318
+ // apply selected tab if exist
5319
+ if (selectedTab !== null) {
5320
+ selectedTab.focus();
5321
+ this.activeTab = tabId;
5322
+ }
5323
+ };
5324
+ /**
5325
+ * Validate slots setting
5326
+ */
5327
+ this.validateSlots = () => {
5328
+ const slots = Array.from(this.element.children).filter(slot => { var _a; return (_a = slot.getAttribute('slot')) === null || _a === void 0 ? void 0 : _a.includes('tab_content-'); });
5329
+ if (slots.length !== this.tabs.length) {
5330
+ throw new Error('<mg-tabs> Must have slots counts equal to tabs count.');
5331
+ }
5332
+ };
5333
+ }
5334
+ validateSize(newValue) {
5335
+ if (!sizes.includes(newValue)) {
5336
+ throw new Error(`<mg-tabs> prop "size" must be one of : ${sizes.join(', ')}`);
5337
+ }
5338
+ this.classList.add(`mg-tabs--size-${this.size}`);
5339
+ }
5340
+ validateItems(newValue) {
5341
+ // String array
5342
+ if (index$1.allItemsAreString(newValue)) {
5343
+ this.tabs = newValue.map(item => ({ label: item, status: Status.VISIBLE }));
5344
+ }
5345
+ // Object array
5346
+ else if (newValue && newValue.every(item => isTabItem(item))) {
5347
+ this.tabs = newValue;
5348
+ }
5349
+ else {
5350
+ throw new Error('<mg-tabs> prop "items" is required and all items must be the same type: TabItem.');
5351
+ }
3268
5352
  }
3269
5353
  validateActiveTab(newValue) {
3270
5354
  if (newValue < 1 || newValue > this.tabs.length) {
@@ -3295,12 +5379,12 @@ const MgTabs = class {
3295
5379
  * @returns {HTMLElement} HTML Element
3296
5380
  */
3297
5381
  render() {
3298
- return (index.h(index.Host, null, index.h("div", { class: this.classList.join() }, index.h("header", { role: "tablist", "aria-label": this.label, class: "mg-tabs__header" }, this.tabs.map((tab, index$1) => (index.h("button", { role: "tab", id: this.getElementId(this.identifier, index$1), class: {
5382
+ return (index.h("div", { class: this.classList.join() }, index.h("header", { role: "tablist", "aria-label": this.label, class: "mg-tabs__header" }, this.tabs.map((tab, index$1) => (index.h("button", { role: "tab", id: this.getElementId(this.identifier, index$1), class: {
3299
5383
  [`${this.buttonTabBaseClass}`]: true,
3300
5384
  [`${this.getNavigationButtonClass(Status.ACTIVE)}`]: this.tabHasGivenStatus(tab, Status.ACTIVE),
3301
5385
  [`${this.getNavigationButtonClass(Status.DISABLED)}`]: this.tabHasGivenStatus(tab, Status.DISABLED),
3302
5386
  [`${this.getNavigationButtonClass(Status.HIDDEN)}`]: this.tabHasGivenStatus(tab, Status.HIDDEN),
3303
- }, tabindex: this.tabHasGivenStatus(tab, Status.ACTIVE) ? 0 : -1, "aria-selected": this.tabHasGivenStatus(tab, Status.ACTIVE).toString(), "aria-controls": this.getElementId(this.tabPanel, index$1), onClick: this.handleClick, onKeyDown: this.handleKeydown, "data-index": this.getTabIndex(index$1), disabled: this.tabHasGivenStatus(tab, Status.DISABLED) }, tab.icon !== undefined && index.h("mg-icon", { icon: tab.icon }), tab.label, tab.badge !== undefined && index.h("mg-badge", { variant: "info", value: tab.badge.value, label: tab.badge.label }))))), this.tabs.map((tab, index$1) => (index.h("article", { role: "tabpanel", id: this.getElementId(this.tabPanel, index$1), hidden: !this.tabHasGivenStatus(tab, Status.ACTIVE), "aria-labelledby": this.getElementId(this.identifier, index$1), tabindex: this.tabHasGivenStatus(tab, Status.ACTIVE) ? 0 : -1, class: "mg-tabs__content-container" }, index.h("slot", { name: this.getElementId('tab_content', index$1) })))))));
5387
+ }, tabindex: this.tabHasGivenStatus(tab, Status.ACTIVE) ? 0 : -1, "aria-selected": this.tabHasGivenStatus(tab, Status.ACTIVE).toString(), "aria-controls": this.getElementId(this.tabPanel, index$1), onClick: this.handleClick, onKeyDown: this.handleKeydown, "data-index": this.getTabIndex(index$1), disabled: this.tabHasGivenStatus(tab, Status.DISABLED) }, tab.icon !== undefined && index.h("mg-icon", { icon: tab.icon }), tab.label, tab.badge !== undefined && index.h("mg-badge", { variant: "info", value: tab.badge.value, label: tab.badge.label }))))), this.tabs.map((tab, index$1) => (index.h("article", { role: "tabpanel", id: this.getElementId(this.tabPanel, index$1), hidden: !this.tabHasGivenStatus(tab, Status.ACTIVE), "aria-labelledby": this.getElementId(this.identifier, index$1), tabindex: this.tabHasGivenStatus(tab, Status.ACTIVE) ? 0 : -1, class: "mg-tabs__content-container" }, index.h("slot", { name: this.getElementId('tab_content', index$1) }))))));
3304
5388
  }
3305
5389
  get element() { return index.getElement(this); }
3306
5390
  static get watchers() { return {
@@ -3382,6 +5466,16 @@ const MgTag = class {
3382
5466
  };
3383
5467
  MgTag.style = mgTagCss;
3384
5468
 
5469
+ /**
5470
+ * List of all possibles placements
5471
+ */
5472
+ var Guard;
5473
+ (function (Guard) {
5474
+ Guard["FOCUS"] = "focus";
5475
+ Guard["HOVER_TOOLTIP_ELEMENT"] = "hoverTooltipGuard";
5476
+ Guard["HOVER_TOOLTIPED_ELEMENT"] = "hoverTooltipedGuard";
5477
+ })(Guard || (Guard = {}));
5478
+
3385
5479
  const mgTooltipCss = ".sc-mg-tooltip-h{display:inline-block}.mg-tooltip.sc-mg-tooltip{display:none;padding:0.5rem 0.8rem;z-index:9999;border-radius:var(--mg-tooltip-border-radius);background-color:hsl(var(--mg-tooltip-background-color));color:hsl(var(--mg-tooltip-font-color));text-align:start}.mg-tooltip[data-show].sc-mg-tooltip{display:block}.mg-tooltip.sc-mg-tooltip .mg-tooltip__arrow.sc-mg-tooltip,.mg-tooltip.sc-mg-tooltip .mg-tooltip__arrow.sc-mg-tooltip::before{position:absolute;width:0.8rem;height:0.8rem;z-index:9999;background:inherit}.mg-tooltip.sc-mg-tooltip .mg-tooltip__arrow.sc-mg-tooltip{visibility:hidden}.mg-tooltip.sc-mg-tooltip .mg-tooltip__arrow.sc-mg-tooltip::before{visibility:visible;content:\"\";transform:rotate(45deg)}.mg-tooltip[data-popper-placement^=top].sc-mg-tooltip>.mg-tooltip__arrow.sc-mg-tooltip{bottom:-4px}.mg-tooltip[data-popper-placement^=bottom].sc-mg-tooltip>.mg-tooltip__arrow.sc-mg-tooltip{top:-4px}.mg-tooltip[data-popper-placement^=left].sc-mg-tooltip>.mg-tooltip__arrow.sc-mg-tooltip{right:-4px}.mg-tooltip[data-popper-placement^=right].sc-mg-tooltip>.mg-tooltip__arrow.sc-mg-tooltip{left:-4px}";
3386
5480
 
3387
5481
  const MgTooltip = class {
@@ -3428,9 +5522,51 @@ const MgTooltip = class {
3428
5522
  // Disable the event listeners
3429
5523
  this.popper.setOptions(options => (Object.assign(Object.assign({}, options), { modifiers: [...options.modifiers, { name: 'eventListeners', enabled: false }] })));
3430
5524
  };
5525
+ /**
5526
+ * Method to set display prop
5527
+ *
5528
+ * @param {boolean} newValue display prop new value
5529
+ * @param {boolean} condition additionnal condition to apply display prop newValue
5530
+ * @returns {void}
5531
+ */
5532
+ this.setDisplay = (newValue, condition = true) => {
5533
+ if (!this.disabled && condition)
5534
+ this.display = newValue;
5535
+ };
5536
+ /**
5537
+ * Action for tooltip element and tooltiped element mouse listener
5538
+ *
5539
+ * @param {Guard} elementGuard tooltip element guard
5540
+ * @param {boolean} isMouseenter mouseenter validation
5541
+ * @param {Guard} conditionalGuard guard condition
5542
+ * @returns {void}
5543
+ */
5544
+ this.tooltipMouseListenerAction = (elementGuard, isMouseenter, conditionalGuard) => {
5545
+ // we mutate elementGuard
5546
+ if (this.guard !== Guard.FOCUS) {
5547
+ this.guard = elementGuard;
5548
+ if (!isMouseenter) {
5549
+ setTimeout(() => {
5550
+ this.setDisplay(isMouseenter, this.guard !== conditionalGuard);
5551
+ this.resetGuard();
5552
+ }, 100);
5553
+ }
5554
+ else if (isMouseenter && elementGuard === Guard.HOVER_TOOLTIPED_ELEMENT) {
5555
+ this.setDisplay(isMouseenter);
5556
+ }
5557
+ }
5558
+ };
5559
+ /**
5560
+ * Method to reset guard value
5561
+ *
5562
+ * @returns {void}
5563
+ */
5564
+ this.resetGuard = () => {
5565
+ this.guard = undefined;
5566
+ };
3431
5567
  }
3432
- handleDisplay(newVal) {
3433
- if (newVal) {
5568
+ handleDisplay(newValue) {
5569
+ if (newValue) {
3434
5570
  this.show();
3435
5571
  }
3436
5572
  else {
@@ -3470,7 +5606,7 @@ const MgTooltip = class {
3470
5606
  slotElement.setAttribute('aria-describedby', `${ariaDescribedby} ${this.identifier}`);
3471
5607
  }
3472
5608
  // Create popperjs tooltip
3473
- this.popper = popper.createPopper(tooltipedElement, this.tooltip, {
5609
+ this.popper = createPopper(tooltipedElement, this.tooltip, {
3474
5610
  placement: this.placement,
3475
5611
  modifiers: [
3476
5612
  {
@@ -3481,21 +5617,31 @@ const MgTooltip = class {
3481
5617
  },
3482
5618
  ],
3483
5619
  });
3484
- // Add events
3485
- ['mouseenter', 'focus'].forEach(event => {
3486
- tooltipedElement.addEventListener(event, () => {
3487
- if (!this.disabled)
3488
- this.display = true;
3489
- });
5620
+ // Manage tooltipedElement focus/blur events
5621
+ tooltipedElement.addEventListener('focus', () => {
5622
+ this.guard = Guard.FOCUS;
5623
+ this.setDisplay(true);
3490
5624
  });
3491
- ['mouseleave', 'blur', 'keydown'].forEach(event => {
5625
+ ['blur', 'keydown'].forEach(event => {
3492
5626
  tooltipedElement.addEventListener(event, (e) => {
3493
5627
  // we continue to process ONLY for KeyboardEvents 'Escape'
3494
5628
  if (e.type === 'keydown' && e.code !== 'Escape') {
3495
5629
  return;
3496
5630
  }
3497
- if (!this.disabled)
3498
- this.display = false;
5631
+ this.resetGuard();
5632
+ this.setDisplay(false);
5633
+ });
5634
+ });
5635
+ // manage tooltipElement & tooltipedElement mouseenter/mouseleave events
5636
+ ['mouseenter', 'mouseleave'].forEach(event => {
5637
+ const isMouseenter = event === 'mouseenter';
5638
+ [
5639
+ { element: this.tooltip, action: () => this.tooltipMouseListenerAction(Guard.HOVER_TOOLTIP_ELEMENT, isMouseenter, Guard.HOVER_TOOLTIPED_ELEMENT) },
5640
+ { element: tooltipedElement, action: () => this.tooltipMouseListenerAction(Guard.HOVER_TOOLTIPED_ELEMENT, isMouseenter, Guard.HOVER_TOOLTIP_ELEMENT) },
5641
+ ].forEach(({ element, action }) => {
5642
+ element.addEventListener(event, () => {
5643
+ action();
5644
+ });
3499
5645
  });
3500
5646
  });
3501
5647
  this.handleDisplay(this.display);
@@ -3518,8 +5664,10 @@ MgTooltip.style = mgTooltipCss;
3518
5664
  exports.mg_badge = MgBadge;
3519
5665
  exports.mg_button = MgButton;
3520
5666
  exports.mg_character_left = MgCharacterLeft;
5667
+ exports.mg_details = MgDetails;
3521
5668
  exports.mg_form = MgForm;
3522
5669
  exports.mg_icon = MgIcon;
5670
+ exports.mg_illustrated_message = MgIllustratedMessage;
3523
5671
  exports.mg_input_checkbox = MgInputCheckbox;
3524
5672
  exports.mg_input_date = MgInputDate;
3525
5673
  exports.mg_input_numeric = MgInputNumeric;
@@ -3533,6 +5681,7 @@ exports.mg_input_toggle = MgInputToggle;
3533
5681
  exports.mg_message = MgMessage;
3534
5682
  exports.mg_pagination = MgPagination;
3535
5683
  exports.mg_panel = MgPanel;
5684
+ exports.mg_popover = MgPopover;
3536
5685
  exports.mg_tabs = MgTabs;
3537
5686
  exports.mg_tag = MgTag;
3538
5687
  exports.mg_tooltip = MgTooltip;