@mgdis/mg-components 6.12.0 → 6.13.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 (102) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mg-action-more_37.cjs.entry.js +211 -45
  3. package/dist/cjs/mg-action-more_37.cjs.entry.js.map +1 -1
  4. package/dist/cjs/mg-components.cjs.js +1 -1
  5. package/dist/cjs/mg-input-combobox.cjs.entry.js +38 -16
  6. package/dist/cjs/mg-input-combobox.cjs.entry.js.map +1 -1
  7. package/dist/cjs/mg-input-combobox.entry.cjs.js.map +1 -1
  8. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +33 -15
  9. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js.map +1 -1
  10. package/dist/cjs/mg-input-rich-text-editor.entry.cjs.js.map +1 -1
  11. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +2 -1
  12. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +1 -1
  13. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +42 -5
  14. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -1
  15. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +38 -16
  16. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js.map +1 -1
  17. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +39 -5
  18. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -1
  19. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +41 -6
  20. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
  21. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +39 -4
  22. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -1
  23. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +40 -4
  24. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +1 -1
  25. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +51 -16
  26. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js.map +1 -1
  27. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +39 -4
  28. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
  29. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +19 -7
  30. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
  31. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +39 -4
  32. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
  33. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +40 -6
  34. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -1
  35. package/dist/collection/components/molecules/mg-form/mg-form.js +23 -1
  36. package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
  37. package/dist/components/mg-form.js +9 -1
  38. package/dist/components/mg-form.js.map +1 -1
  39. package/dist/components/mg-input-checkbox-paginated2.js +2 -1
  40. package/dist/components/mg-input-checkbox-paginated2.js.map +1 -1
  41. package/dist/components/mg-input-checkbox.js +26 -5
  42. package/dist/components/mg-input-checkbox.js.map +1 -1
  43. package/dist/components/mg-input-combobox.js +38 -16
  44. package/dist/components/mg-input-combobox.js.map +1 -1
  45. package/dist/components/mg-input-date.js +23 -5
  46. package/dist/components/mg-input-date.js.map +1 -1
  47. package/dist/components/mg-input-numeric.js +23 -4
  48. package/dist/components/mg-input-numeric.js.map +1 -1
  49. package/dist/components/mg-input-password.js +23 -4
  50. package/dist/components/mg-input-password.js.map +1 -1
  51. package/dist/components/mg-input-radio.js +24 -4
  52. package/dist/components/mg-input-radio.js.map +1 -1
  53. package/dist/components/mg-input-rich-text-editor.js +34 -15
  54. package/dist/components/mg-input-rich-text-editor.js.map +1 -1
  55. package/dist/components/mg-input-select2.js +23 -4
  56. package/dist/components/mg-input-select2.js.map +1 -1
  57. package/dist/components/mg-input-text2.js +18 -6
  58. package/dist/components/mg-input-text2.js.map +1 -1
  59. package/dist/components/mg-input-textarea.js +23 -4
  60. package/dist/components/mg-input-textarea.js.map +1 -1
  61. package/dist/components/mg-input-toggle.js +24 -6
  62. package/dist/components/mg-input-toggle.js.map +1 -1
  63. package/dist/components/mg-table.js +1 -1
  64. package/dist/components/mg-table.js.map +1 -1
  65. package/dist/esm/loader.js +1 -1
  66. package/dist/esm/mg-action-more_37.entry.js +211 -45
  67. package/dist/esm/mg-action-more_37.entry.js.map +1 -1
  68. package/dist/esm/mg-components.js +1 -1
  69. package/dist/esm/mg-input-combobox.entry.js +38 -16
  70. package/dist/esm/mg-input-combobox.entry.js.map +1 -1
  71. package/dist/esm/mg-input-rich-text-editor.entry.js +33 -15
  72. package/dist/esm/mg-input-rich-text-editor.entry.js.map +1 -1
  73. package/dist/mg-components/mg-components.esm.js +1 -1
  74. package/dist/mg-components/mg-input-combobox.entry.esm.js.map +1 -1
  75. package/dist/mg-components/mg-input-rich-text-editor.entry.esm.js.map +1 -1
  76. package/dist/mg-components/p-3e92299a.entry.js +2 -0
  77. package/dist/mg-components/p-3e92299a.entry.js.map +1 -0
  78. package/dist/mg-components/p-c907ddac.entry.js +2 -0
  79. package/dist/mg-components/p-c907ddac.entry.js.map +1 -0
  80. package/dist/mg-components/{p-3853afb5.entry.js → p-e7a7c651.entry.js} +2 -2
  81. package/dist/mg-components/p-e7a7c651.entry.js.map +1 -0
  82. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +4 -0
  83. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +1 -1
  84. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +4 -0
  85. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +6 -2
  86. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +4 -0
  87. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +4 -0
  88. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +4 -0
  89. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +4 -0
  90. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +1 -1
  91. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +4 -0
  92. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +9 -4
  93. package/dist/types/components/molecules/mg-form/mg-form.d.ts +4 -0
  94. package/dist/types/components.d.ts +47 -6
  95. package/ide/intellij/web-types.json +21 -17
  96. package/ide/vscode/html-custom-data.json +14 -14
  97. package/package.json +20 -20
  98. package/dist/mg-components/p-3853afb5.entry.js.map +0 -1
  99. package/dist/mg-components/p-5a05b1da.entry.js +0 -2
  100. package/dist/mg-components/p-5a05b1da.entry.js.map +0 -1
  101. package/dist/mg-components/p-74b5112a.entry.js +0 -2
  102. package/dist/mg-components/p-74b5112a.entry.js.map +0 -1
@@ -666,6 +666,7 @@ const MgForm = class {
666
666
  registerInstance(this, hostRef);
667
667
  this.formValid = createEvent(this, "form-valid");
668
668
  this.formSubmit = createEvent(this, "form-submit");
669
+ this.formReset = createEvent(this, "form-reset");
669
670
  // Classes
670
671
  this.classAllRequired = 'mg-c-form--all-required';
671
672
  this.classLabelOnTop = 'mg-c-form--label-on-top';
@@ -830,6 +831,8 @@ const MgForm = class {
830
831
  await input.reset();
831
832
  }
832
833
  }));
834
+ this.checkValidity();
835
+ this.formReset.emit(true);
833
836
  }
834
837
  }
835
838
  /*************
@@ -850,6 +853,11 @@ const MgForm = class {
850
853
  // Set button form identifier
851
854
  this.mgButtons.forEach(mgButton => {
852
855
  mgButton.setAttribute('form', this.identifier);
856
+ if (mgButton.type === 'reset') {
857
+ mgButton.addEventListener('click', () => {
858
+ this.reset();
859
+ });
860
+ }
853
861
  });
854
862
  // Set mgInputs
855
863
  this.setMgInputs();
@@ -882,7 +890,7 @@ const MgForm = class {
882
890
  * @returns HTML Element
883
891
  */
884
892
  render() {
885
- return (h("form", { key: '9080c660259ae4bacd80e1b9230357e32b034375', class: this.classCollection.join(), id: this.identifier, name: this.name, onSubmit: this.handleFormSubmit, role: this.ariaRole }, this.requiredMessageText && h("p", { key: '477b0b4f73559078d2ae898c65f581fb0d3f7400', innerHTML: this.requiredMessageText }), h("slot", { key: 'df79ec2a3b9b20c4960a1d0b3f4fe2825114c123' }), !this.readonly && !this.disabled && h("slot", { key: 'e18812f3f0894552bd931d94a842af6a13f4d770', name: "actions" })));
893
+ return (h("form", { key: '6330085d26ecd493eab3fd0fd63344ce1a00e589', class: this.classCollection.join(), id: this.identifier, name: this.name, onSubmit: this.handleFormSubmit, role: this.ariaRole }, this.requiredMessageText && h("p", { key: '386adf6d3ee2d0d8ec6adf791da8f21a6fb6ac11', innerHTML: this.requiredMessageText }), h("slot", { key: '5349f004f644b4e02e1c5da27f49df4efacac016' }), !this.readonly && !this.disabled && h("slot", { key: '2ed9817b514033c89933751a3dc00ed668331b68', name: "actions" })));
886
894
  }
887
895
  get element() { return getElement(this); }
888
896
  static get watchers() { return {
@@ -1584,7 +1592,9 @@ const MgInputCheckbox = class {
1584
1592
  const displayItems = this.getDisplayItems();
1585
1593
  // update only displayed items
1586
1594
  displayItems.forEach(item => {
1587
- item.value = event.detail !== SectionKind.SELECTED;
1595
+ if (item.disabled !== true) {
1596
+ item.value = event.detail !== SectionKind.SELECTED;
1597
+ }
1588
1598
  });
1589
1599
  this.updateValues();
1590
1600
  };
@@ -1777,6 +1787,13 @@ const MgInputCheckbox = class {
1777
1787
  // refresh search values
1778
1788
  this.updateSearchResults();
1779
1789
  }
1790
+ /**
1791
+ * Set focus on input.
1792
+ */
1793
+ async setFocus() {
1794
+ var _a;
1795
+ (_a = this.element.shadowRoot.querySelector('input')) === null || _a === void 0 ? void 0 : _a.focus();
1796
+ }
1780
1797
  /**
1781
1798
  * Display input error if it exists.
1782
1799
  */
@@ -1823,9 +1840,20 @@ const MgInputCheckbox = class {
1823
1840
  async reset() {
1824
1841
  if (!this.readonly) {
1825
1842
  this.value = this.value.map(item => (Object.assign(Object.assign({}, item), { value: false })));
1826
- this.checkValidity();
1827
- this.errorMessage = undefined;
1828
- this.hasDisplayedError = false;
1843
+ // Use `Promise` as requested for stencil method
1844
+ // Use `requestAnimationFrame` to ensure:
1845
+ // - DOM is fully updated before validation
1846
+ // - Async operations are completed
1847
+ // - No timing issues with Stencil's render cycle
1848
+ // - Keep everything in sync both inside and outside the component
1849
+ return new Promise(resolve => {
1850
+ requestAnimationFrame(() => {
1851
+ this.checkValidity();
1852
+ this.errorMessage = undefined;
1853
+ this.hasDisplayedError = false;
1854
+ resolve();
1855
+ });
1856
+ });
1829
1857
  }
1830
1858
  }
1831
1859
  /**
@@ -1945,7 +1973,7 @@ const MgInputCheckbox = class {
1945
1973
  else {
1946
1974
  inputContent = this.renderCheckboxMulti();
1947
1975
  }
1948
- return (h("mg-input", { key: '27f167ac343dd9b8ad18007d02112ece285badf0', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: !this.readonly ? this.required : undefined, tooltip: this.tooltip, tooltipPosition: this.readonly && readonlyValue.length === 0 ? 'label' : this.tooltipPosition, helpText: !this.readonly ? this.helpText : undefined, errorMessage: !this.readonly ? this.errorMessage : undefined }, inputContent));
1976
+ return (h("mg-input", { key: '9778efa758e52b1da2a91fa57da2bd7f9a708d35', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: !this.readonly ? this.required : undefined, tooltip: this.tooltip, tooltipPosition: this.readonly && readonlyValue.length === 0 ? 'label' : this.tooltipPosition, helpText: !this.readonly ? this.helpText : undefined, errorMessage: !this.readonly ? this.errorMessage : undefined }, inputContent));
1949
1977
  }
1950
1978
  get element() { return getElement(this); }
1951
1979
  static get watchers() { return {
@@ -2071,7 +2099,8 @@ const MgInputCheckboxPaginated = class {
2071
2099
  const getText = (checkboxes) => (h("em", { key: '0bf489a95090b519c85a4649d6c3b9a0e97bf0d8', class: "mg-c-input__section-header-title-label" }, `${this.messages[checkboxes.length > 1 ? 'titlePlural' : 'title']} (${checkboxes.length})`));
2072
2100
  const [from, to] = this.getFromToIndexes();
2073
2101
  const itemsContainerId = `items-${this.sectionKind}-container`;
2074
- return (h(Host, { key: 'ee67aa1705efa2b88010748b6978e0c1dec6e4de', hidden: this.checkboxes.length < 1 }, h("div", { key: 'b713e2a0e21f57d3b238b72163f3d7a4781b7026', class: "mg-c-input__section-header" }, this.sectionKind === SectionKind.SELECTED ? (h("mg-button", { variant: "flat", onClick: this.handleToggleClick, "aria-controls": itemsContainerId, "aria-expanded": this.expanded.toString() }, h("mg-icon", { icon: this.expanded ? 'chevron-up' : 'chevron-down' }), h("span", { class: "mg-c-input__section-header-title" }, getText(this.checkboxes)))) : (h("p", { class: "mg-c-input__section-header-title mg-c-input__section-header-title--static" }, getText(this.checkboxes))), ((this.sectionKind === SectionKind.SELECTED && this.expanded) || this.sectionKind === SectionKind.NOT_SELECTED) && (h("mg-tooltip", { key: 'ef75381dab8028c3da4cbcefba644770322c2e7e', class: "mg-c-input__section-header-tootlip", message: this.messages.tooltip }, h("mg-button", { key: '6e33b32300e7932f09ce1152462a3cf19e452df8', variant: "link", onClick: this.massActionHandler }, this.messages.action))), this.expanded && this.getPageCount(this.checkboxes) > 1 && (h("mg-pagination", { key: "search-pagination", totalPages: this.getPageCount(this.checkboxes), currentPage: this.currentPage, "onCurrent-page-change": this.handleCurrentPageChange, hideNavigationLabels: true, hidePageCount: true, identifier: `input-checkbox-pagination-${this.sectionKind}` }))), h("div", { key: '727ef2955d5866131e421c0809244ccc42c75dd0', hidden: !this.expanded, id: itemsContainerId, class: "mg-c-input__section-content" }, h(MgInputCheckboxList, { key: 'd26de7f05b85142df7218ad9941e4b201cfb2e01', checkboxes: this.getArrayRange(this.checkboxes, from, to), displaySearchInput: true, messages: this.messages, id: `items-${this.sectionKind}`, disabled: this.disabled, name: this.name, invalid: this.invalid }))));
2102
+ return (h(Host, { key: 'ee67aa1705efa2b88010748b6978e0c1dec6e4de', hidden: this.checkboxes.length < 1 }, h("div", { key: 'b713e2a0e21f57d3b238b72163f3d7a4781b7026', class: "mg-c-input__section-header" }, this.sectionKind === SectionKind.SELECTED ? (h("mg-button", { variant: "flat", onClick: this.handleToggleClick, "aria-controls": itemsContainerId, "aria-expanded": this.expanded.toString() }, h("mg-icon", { icon: this.expanded ? 'chevron-up' : 'chevron-down' }), h("span", { class: "mg-c-input__section-header-title" }, getText(this.checkboxes)))) : (h("p", { class: "mg-c-input__section-header-title mg-c-input__section-header-title--static" }, getText(this.checkboxes))), ((this.sectionKind === SectionKind.SELECTED && this.expanded && this.checkboxes.some(checkbox => checkbox.value === true && checkbox.disabled !== true)) ||
2103
+ (this.sectionKind === SectionKind.NOT_SELECTED && this.checkboxes.some(checkbox => checkbox.value === false && checkbox.disabled !== true))) && (h("mg-tooltip", { key: '7e5cba3b03cdc7bab68650b9aed36c195ca4dfe6', class: "mg-c-input__section-header-tootlip", message: this.messages.tooltip }, h("mg-button", { key: '4980f26ade12cbfaa6ef6041fa84918900cb652a', variant: "link", onClick: this.massActionHandler }, this.messages.action))), this.expanded && this.getPageCount(this.checkboxes) > 1 && (h("mg-pagination", { key: "search-pagination", totalPages: this.getPageCount(this.checkboxes), currentPage: this.currentPage, "onCurrent-page-change": this.handleCurrentPageChange, hideNavigationLabels: true, hidePageCount: true, identifier: `input-checkbox-pagination-${this.sectionKind}` }))), h("div", { key: '950b07ea9c59e8bc21e236bf32e3bf0a9318a008', hidden: !this.expanded, id: itemsContainerId, class: "mg-c-input__section-content" }, h(MgInputCheckboxList, { key: '276f679e01756d6d60f043dc1c04807b5058750a', checkboxes: this.getArrayRange(this.checkboxes, from, to), displaySearchInput: true, messages: this.messages, id: `items-${this.sectionKind}`, disabled: this.disabled, name: this.name, invalid: this.invalid }))));
2075
2104
  }
2076
2105
  static get watchers() { return {
2077
2106
  "checkboxes": ["watchCheckboxes"]
@@ -2329,6 +2358,13 @@ const MgInputDate = class {
2329
2358
  else
2330
2359
  this.classCollection.delete(classDisabled);
2331
2360
  }
2361
+ /**
2362
+ * Set focus on input.
2363
+ */
2364
+ async setFocus() {
2365
+ var _a;
2366
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.focus();
2367
+ }
2332
2368
  /**
2333
2369
  * Display input error if it exists.
2334
2370
  */
@@ -2375,10 +2411,20 @@ const MgInputDate = class {
2375
2411
  async reset() {
2376
2412
  if (!this.readonly) {
2377
2413
  this.value = null;
2378
- this.checkValidity();
2379
- this.invalid = false;
2380
- this.errorMessage = undefined;
2381
- this.hasDisplayedError = false;
2414
+ // Use `Promise` as requested for stencil method
2415
+ // Use `requestAnimationFrame` to ensure:
2416
+ // - DOM is fully updated before validation
2417
+ // - Async operations are completed
2418
+ // - No timing issues with Stencil's render cycle
2419
+ // - Keep everything in sync both inside and outside the component
2420
+ return new Promise(resolve => {
2421
+ requestAnimationFrame(() => {
2422
+ this.checkValidity();
2423
+ this.errorMessage = undefined;
2424
+ this.hasDisplayedError = false;
2425
+ resolve();
2426
+ });
2427
+ });
2382
2428
  }
2383
2429
  }
2384
2430
  /**
@@ -2426,7 +2472,7 @@ const MgInputDate = class {
2426
2472
  * @returns HTML Element
2427
2473
  */
2428
2474
  render() {
2429
- return (h("mg-input", { key: 'f70668308972435503fc53cc194b3f14abab6d3c', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === null ? 'label' : this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, this.readonly ? (this.value && h("b", { class: "mg-c-input__readonly-value" }, localeDate(this.value, this.locale))) : (h("input", { type: "date", class: "mg-c-input__box", min: this.min, max: this.max, value: this.value, id: this.identifier, name: this.name, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, ref: (el) => {
2475
+ return (h("mg-input", { key: '9afadd8001b3db8101678116996a28c88fc047be', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === null ? 'label' : this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, this.readonly ? (this.value && h("b", { class: "mg-c-input__readonly-value" }, localeDate(this.value, this.locale))) : (h("input", { type: "date", class: "mg-c-input__box", min: this.min, max: this.max, value: this.value, id: this.identifier, name: this.name, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, ref: (el) => {
2430
2476
  if (el !== null)
2431
2477
  this.input = el;
2432
2478
  } }))));
@@ -2754,6 +2800,13 @@ const MgInputNumeric = class {
2754
2800
  throw new Error(`<mg-input-numeric> prop "decimal-length" must be a positive number, consider using prop "type" to "integer" instead. Passed value: ${toString(newValue)}.`);
2755
2801
  }
2756
2802
  }
2803
+ /**
2804
+ * Set focus on input.
2805
+ */
2806
+ async setFocus() {
2807
+ var _a;
2808
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.focus();
2809
+ }
2757
2810
  /**
2758
2811
  * Display input error if it exists.
2759
2812
  */
@@ -2800,9 +2853,20 @@ const MgInputNumeric = class {
2800
2853
  async reset() {
2801
2854
  if (!this.readonly) {
2802
2855
  this.value = '';
2803
- this.checkValidity();
2804
- this.errorMessage = undefined;
2805
- this.hasDisplayedError = false;
2856
+ // Use `Promise` as requested for stencil method
2857
+ // Use `requestAnimationFrame` to ensure:
2858
+ // - DOM is fully updated before validation
2859
+ // - Async operations are completed
2860
+ // - No timing issues with Stencil's render cycle
2861
+ // - Keep everything in sync both inside and outside the component
2862
+ return new Promise(resolve => {
2863
+ requestAnimationFrame(() => {
2864
+ this.checkValidity();
2865
+ this.errorMessage = undefined;
2866
+ this.hasDisplayedError = false;
2867
+ resolve();
2868
+ });
2869
+ });
2806
2870
  }
2807
2871
  }
2808
2872
  /**
@@ -2886,7 +2950,7 @@ const MgInputNumeric = class {
2886
2950
  * @returns HTML Element
2887
2951
  */
2888
2952
  render() {
2889
- return (h("mg-input", { key: '2f6c8a691f5d089cb24a3541a70b2bfb62a5d381', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, this.readonly
2953
+ return (h("mg-input", { key: '4b882a2d468ea59b1ece7cb59cdb8372ce4d2299', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, this.readonly
2890
2954
  ? this.readonlyValue && this.renderReadonly()
2891
2955
  : [
2892
2956
  h("input", { key: "input", type: "text", class: "mg-c-input__box mg-c-input__box--width", value: this.displayValue(), id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, autocomplete: "off", "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: (el) => {
@@ -3047,6 +3111,13 @@ const MgInputPassword = class {
3047
3111
  if (newValue !== undefined)
3048
3112
  this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);
3049
3113
  }
3114
+ /**
3115
+ * Set focus on input.
3116
+ */
3117
+ async setFocus() {
3118
+ var _a;
3119
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.focus();
3120
+ }
3050
3121
  /**
3051
3122
  * Display input error if it exists.
3052
3123
  */
@@ -3093,9 +3164,20 @@ const MgInputPassword = class {
3093
3164
  async reset() {
3094
3165
  if (!this.readonly) {
3095
3166
  this.value = '';
3096
- this.checkValidity();
3097
- this.errorMessage = undefined;
3098
- this.hasDisplayedError = false;
3167
+ // Use `Promise` as requested for stencil method
3168
+ // Use `requestAnimationFrame` to ensure:
3169
+ // - DOM is fully updated before validation
3170
+ // - Async operations are completed
3171
+ // - No timing issues with Stencil's render cycle
3172
+ // - Keep everything in sync both inside and outside the component
3173
+ return new Promise(resolve => {
3174
+ requestAnimationFrame(() => {
3175
+ this.checkValidity();
3176
+ this.errorMessage = undefined;
3177
+ this.hasDisplayedError = false;
3178
+ resolve();
3179
+ });
3180
+ });
3099
3181
  }
3100
3182
  }
3101
3183
  /**
@@ -3135,7 +3217,7 @@ const MgInputPassword = class {
3135
3217
  * @returns HTML Element
3136
3218
  */
3137
3219
  render() {
3138
- return (h("mg-input", { key: '7d2c89d5d0089768179be40837166db5b40cb387', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.value !== undefined && h("b", { class: "mg-c-input__readonly-value" }, '•'.repeat(this.value.length))) : (h("span", { class: "mg-c-input__input-group" }, h("input", { type: this.displayPassword ? 'text' : 'password', class: "mg-c-input__box mg-c-input__box--width", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, maxlength: this.maxlength, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
3220
+ return (h("mg-input", { key: '00d40d4c4c8b9ca57e9c9f34575e69ec535aea22', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.value !== undefined && h("b", { class: "mg-c-input__readonly-value" }, '•'.repeat(this.value.length))) : (h("span", { class: "mg-c-input__input-group" }, h("input", { type: this.displayPassword ? 'text' : 'password', class: "mg-c-input__box mg-c-input__box--width", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, maxlength: this.maxlength, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
3139
3221
  if (el !== null)
3140
3222
  this.input = el;
3141
3223
  } }), h("mg-button", { label: this.messages.input.password[this.displayPassword ? 'hide' : 'display'], disabled: this.disabled, variant: "flat", class: "mg-c-input__append-button", "is-icon": true, onClick: this.toggleDisplayPassword, "aria-controls": this.identifier }, h("mg-icon", { class: "mg-c-input__input-icon", icon: this.displayPassword ? 'eye-slash' : 'eye' }))))));
@@ -3316,6 +3398,14 @@ const MgInputRadio = class {
3316
3398
  else
3317
3399
  this.classCollection.delete(classDisabled);
3318
3400
  }
3401
+ /**
3402
+ * Set focus on input.
3403
+ */
3404
+ async setFocus() {
3405
+ if (this.inputs.length > 0) {
3406
+ this.inputs[0].focus();
3407
+ }
3408
+ }
3319
3409
  /**
3320
3410
  * Display input error if it exists.
3321
3411
  */
@@ -3362,9 +3452,20 @@ const MgInputRadio = class {
3362
3452
  async reset() {
3363
3453
  if (!this.readonly) {
3364
3454
  this.value = undefined;
3365
- this.checkValidity();
3366
- this.errorMessage = undefined;
3367
- this.hasDisplayedError = false;
3455
+ // Use `Promise` as requested for stencil method
3456
+ // Use `requestAnimationFrame` to ensure:
3457
+ // - DOM is fully updated before validation
3458
+ // - Async operations are completed
3459
+ // - No timing issues with Stencil's render cycle
3460
+ // - Keep everything in sync both inside and outside the component
3461
+ return new Promise(resolve => {
3462
+ requestAnimationFrame(() => {
3463
+ this.checkValidity();
3464
+ this.errorMessage = undefined;
3465
+ this.hasDisplayedError = false;
3466
+ resolve();
3467
+ });
3468
+ });
3368
3469
  }
3369
3470
  }
3370
3471
  /**
@@ -3407,7 +3508,7 @@ const MgInputRadio = class {
3407
3508
  * @returns HTML Element
3408
3509
  */
3409
3510
  render() {
3410
- return (h("mg-input", { key: '29331953486dee2ea14a562e16975b80eb672d5a', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && !this.value ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, this.readonlyValue)) : (h("ul", { class: "mg-c-input__input-group-container", role: "list" }, this.options.map((input, index) => (h("li", { key: input.title, class: { 'mg-c-input__input-group': true, 'mg-c-input__input-group--disabled': this.disabled || input.disabled } }, h("input", { type: "radio", id: this.identifier + '_' + index, name: this.identifier, value: index, checked: JSON.stringify(this.value) === JSON.stringify(this.options[index].value), disabled: this.disabled || input.disabled, required: this.required, onBlur: this.handleBlur, onInput: this.handleInput, ref: (el) => {
3511
+ return (h("mg-input", { key: '9460e2802454e18c1f79ebc63bef0b5e4712acf8', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && !this.value ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, this.readonlyValue)) : (h("ul", { class: "mg-c-input__input-group-container", role: "list" }, this.options.map((input, index) => (h("li", { key: input.title, class: { 'mg-c-input__input-group': true, 'mg-c-input__input-group--disabled': this.disabled || input.disabled } }, h("input", { type: "radio", id: this.identifier + '_' + index, name: this.identifier, value: index, checked: JSON.stringify(this.value) === JSON.stringify(this.options[index].value), disabled: this.disabled || input.disabled, required: this.required, onBlur: this.handleBlur, onInput: this.handleInput, ref: (el) => {
3411
3512
  if (el !== null)
3412
3513
  this.inputs[index] = el;
3413
3514
  } }), h("label", { htmlFor: this.identifier + '_' + index }, input.title))))))));
@@ -3666,6 +3767,13 @@ const MgInputSelect = class {
3666
3767
  if (newValue !== undefined)
3667
3768
  this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);
3668
3769
  }
3770
+ /**
3771
+ * Set focus on input.
3772
+ */
3773
+ async setFocus() {
3774
+ var _a;
3775
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.focus();
3776
+ }
3669
3777
  /**
3670
3778
  * Display input error if it exists.
3671
3779
  */
@@ -3712,9 +3820,20 @@ const MgInputSelect = class {
3712
3820
  async reset() {
3713
3821
  if (!this.readonly) {
3714
3822
  this.value = null;
3715
- this.checkValidity();
3716
- this.errorMessage = undefined;
3717
- this.hasDisplayedError = false;
3823
+ // Use `Promise` as requested for stencil method
3824
+ // Use `requestAnimationFrame` to ensure:
3825
+ // - DOM is fully updated before validation
3826
+ // - Async operations are completed
3827
+ // - No timing issues with Stencil's render cycle
3828
+ // - Keep everything in sync both inside and outside the component
3829
+ return new Promise(resolve => {
3830
+ requestAnimationFrame(() => {
3831
+ this.checkValidity();
3832
+ this.errorMessage = undefined;
3833
+ this.hasDisplayedError = false;
3834
+ resolve();
3835
+ });
3836
+ });
3718
3837
  }
3719
3838
  }
3720
3839
  /**
@@ -3762,7 +3881,7 @@ const MgInputSelect = class {
3762
3881
  * @returns HTML Element
3763
3882
  */
3764
3883
  render() {
3765
- return (h("mg-input", { key: '0f03bf159be06827dca10a9dbfbaf953a003832d', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.readonlyValue === null ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, this.readonlyValue)) : (h("select", { class: "mg-c-input__box", id: this.identifier, name: this.name, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
3884
+ return (h("mg-input", { key: 'c755e68979b8cb479f409c0ac99d4fc47d1e4c25', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.readonlyValue === null ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, this.readonlyValue)) : (h("select", { class: "mg-c-input__box", id: this.identifier, name: this.name, title: this.placeholder, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
3766
3885
  if (el !== null)
3767
3886
  this.input = el;
3768
3887
  } }, (!this.placeholderHide || !this.valueExist) && ( // In case passed value does not match any option we display the placeholder
@@ -4038,10 +4157,11 @@ const MgInputText = class {
4038
4157
  }
4039
4158
  }
4040
4159
  /**
4041
- * Public method to play input focus
4160
+ * Set focus on input.
4042
4161
  */
4043
4162
  async setFocus() {
4044
- this.input.focus();
4163
+ var _a;
4164
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.focus();
4045
4165
  }
4046
4166
  /**
4047
4167
  * Display input error if it exists.
@@ -4089,9 +4209,20 @@ const MgInputText = class {
4089
4209
  async reset() {
4090
4210
  if (!this.readonly) {
4091
4211
  this.value = '';
4092
- this.checkValidity();
4093
- this.errorMessage = undefined;
4094
- this.hasDisplayedError = false;
4212
+ // Use `Promise` as requested for stencil method
4213
+ // Use `requestAnimationFrame` to ensure:
4214
+ // - DOM is fully updated before validation
4215
+ // - Async operations are completed
4216
+ // - No timing issues with Stencil's render cycle
4217
+ // - Keep everything in sync both inside and outside the component
4218
+ return new Promise(resolve => {
4219
+ requestAnimationFrame(() => {
4220
+ this.checkValidity();
4221
+ this.errorMessage = undefined;
4222
+ this.hasDisplayedError = false;
4223
+ resolve();
4224
+ });
4225
+ });
4095
4226
  }
4096
4227
  }
4097
4228
  /**
@@ -4140,7 +4271,7 @@ const MgInputText = class {
4140
4271
  * @returns HTML Element
4141
4272
  */
4142
4273
  render() {
4143
- return (h("mg-input", { key: '2a9455e4b6ea63a275743efd9eb0f19ca84ed6a8', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [this.characterLeftId], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly
4274
+ return (h("mg-input", { key: '76e332d40fea8e1897da15271989f29d710c6550', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [this.characterLeftId], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly
4144
4275
  ? this.value && this.renderReadonly()
4145
4276
  : [
4146
4277
  h("div", { key: "input", class: "mg-c-input__with-character-left", style: {
@@ -4350,6 +4481,13 @@ const MgInputTextarea = class {
4350
4481
  this.classCollection.add(this.classDisplayCharacterLeft);
4351
4482
  }
4352
4483
  }
4484
+ /**
4485
+ * Set focus on input.
4486
+ */
4487
+ async setFocus() {
4488
+ var _a;
4489
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.focus();
4490
+ }
4353
4491
  /**
4354
4492
  * Display input error if it exists.
4355
4493
  */
@@ -4396,9 +4534,20 @@ const MgInputTextarea = class {
4396
4534
  async reset() {
4397
4535
  if (!this.readonly) {
4398
4536
  this.value = '';
4399
- this.checkValidity();
4400
- this.errorMessage = undefined;
4401
- this.hasDisplayedError = false;
4537
+ // Use `Promise` as requested for stencil method
4538
+ // Use `requestAnimationFrame` to ensure:
4539
+ // - DOM is fully updated before validation
4540
+ // - Async operations are completed
4541
+ // - No timing issues with Stencil's render cycle
4542
+ // - Keep everything in sync both inside and outside the component
4543
+ return new Promise(resolve => {
4544
+ requestAnimationFrame(() => {
4545
+ this.checkValidity();
4546
+ this.errorMessage = undefined;
4547
+ this.hasDisplayedError = false;
4548
+ resolve();
4549
+ });
4550
+ });
4402
4551
  }
4403
4552
  }
4404
4553
  /**
@@ -4443,7 +4592,7 @@ const MgInputTextarea = class {
4443
4592
  * @returns HTML Element
4444
4593
  */
4445
4594
  render() {
4446
- return (h("mg-input", { key: '17ae0e252ce0aaf46c1497ef088d744f49d7db59', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [this.characterLeftId], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.value && h("b", { class: "mg-c-input__readonly-value" }, this.value)) : (h("div", { class: "mg-c-input__with-character-left" }, h("textarea", { class: {
4595
+ return (h("mg-input", { key: '7bcbb8d4ca3244f2278ebad0b85f83be0187a996', label: this.label, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [this.characterLeftId], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.value && h("b", { class: "mg-c-input__readonly-value" }, this.value)) : (h("div", { class: "mg-c-input__with-character-left" }, h("textarea", { class: {
4447
4596
  'mg-c-input__box': true,
4448
4597
  'mg-c-input__box--width': true,
4449
4598
  'mg-c-input__box--resizable': this.resizable === 'both',
@@ -4532,9 +4681,6 @@ const MgInputToggle = class {
4532
4681
  registerInstance(this, hostRef);
4533
4682
  this.valueChange = createEvent(this, "value-change");
4534
4683
  this.inputValid = createEvent(this, "input-valid");
4535
- /************
4536
- * Internal *
4537
- ************/
4538
4684
  // Classes
4539
4685
  this.classIsActive = 'mg-c-input--toggle-is-active';
4540
4686
  this.classOnOff = 'mg-c-input--toggle-on-off';
@@ -4683,6 +4829,13 @@ const MgInputToggle = class {
4683
4829
  // update value
4684
4830
  this.value = this.getCheckedItem(newValue).value;
4685
4831
  }
4832
+ /**
4833
+ * Set focus on input.
4834
+ */
4835
+ async setFocus() {
4836
+ var _a;
4837
+ (_a = this.button) === null || _a === void 0 ? void 0 : _a.focus();
4838
+ }
4686
4839
  /**
4687
4840
  * Set an error and display a custom error message.
4688
4841
  * This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter.
@@ -4710,9 +4863,19 @@ const MgInputToggle = class {
4710
4863
  async reset() {
4711
4864
  if (!this.readonly) {
4712
4865
  this.value = this.options[0].value;
4713
- this.errorMessage = undefined;
4714
- this.valid = undefined;
4715
4866
  this.setChecked();
4867
+ // Use `Promise` as requested for stencil method
4868
+ // Use `requestAnimationFrame` to ensure:
4869
+ // - DOM is fully updated before validation
4870
+ // - Async operations are completed
4871
+ // - No timing issues with Stencil's render cycle
4872
+ // - Keep everything in sync both inside and outside the component
4873
+ return new Promise(resolve => {
4874
+ requestAnimationFrame(() => {
4875
+ this.errorMessage = undefined;
4876
+ resolve();
4877
+ });
4878
+ });
4716
4879
  }
4717
4880
  }
4718
4881
  /**
@@ -4762,7 +4925,10 @@ const MgInputToggle = class {
4762
4925
  */
4763
4926
  render() {
4764
4927
  const checkedItem = this.getCheckedItem(this.checked);
4765
- return (h("mg-input", { key: 'cad9cfb403949c1a2092657d2d05956dc7bfe701', label: this.label, helpText: this.helpText, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: undefined, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, errorMessage: this.errorMessage }, this.readonly ? (checkedItem && h("b", { class: "mg-c-input__readonly-value" }, checkedItem.title)) : (h("button", { type: "button", role: "switch", "aria-checked": this.checked.toString(), "aria-readonly": this.disabled || this.readonly, id: this.identifier, class: "mg-c-input__button-toggle", disabled: this.disabled || this.readonly, onClick: this.toggleChecked }, h("span", { "aria-hidden": "true", class: "mg-c-input__toggle-item-container" }, h("slot", { name: "item-1" })), h("span", { "aria-hidden": "true", class: "mg-c-input__toggle-item-container" }, h("slot", { name: "item-2" }))))));
4928
+ return (h("mg-input", { key: '2e92c411cfa6fdcbcc6ed0546eed6e804ed4d9cb', label: this.label, helpText: this.helpText, identifier: this.identifier, class: this.classCollection.join(), ariaDescribedbyIDs: [], labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: undefined, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, errorMessage: this.errorMessage }, this.readonly ? (checkedItem && h("b", { class: "mg-c-input__readonly-value" }, checkedItem.title)) : (h("button", { type: "button", role: "switch", "aria-checked": this.checked.toString(), "aria-readonly": this.disabled || this.readonly, id: this.identifier, class: "mg-c-input__button-toggle", disabled: this.disabled || this.readonly, onClick: this.toggleChecked, ref: el => {
4929
+ if (el !== null)
4930
+ this.button = el;
4931
+ } }, h("span", { "aria-hidden": "true", class: "mg-c-input__toggle-item-container" }, h("slot", { name: "item-1" })), h("span", { "aria-hidden": "true", class: "mg-c-input__toggle-item-container" }, h("slot", { name: "item-2" }))))));
4766
4932
  }
4767
4933
  get element() { return getElement(this); }
4768
4934
  static get watchers() { return {
@@ -8252,7 +8418,7 @@ const textAlignments = ['left', 'center', 'right'];
8252
8418
  // Define possible data types
8253
8419
  const dataTypes = ['string', 'numeric', 'date'];
8254
8420
 
8255
- const mgTableCss = ".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}@font-face{font-family:\"Open Sans\";src:url(\"fonts/OpenSans-Regular.ttf\") format(\"truetype\")}@font-face{font-family:\"Open Sans\";font-weight:600;src:url(\"fonts/OpenSans-SemiBold.ttf\") format(\"truetype\")}@font-face{font-family:\"Open Sans\";font-weight:700;src:url(\"fonts/OpenSans-Bold.ttf\") format(\"truetype\")}p{margin:0}p+p{margin-top:var(--mg-b-size-8)}h1,.mg-u-h1{font-family:var(--mg-b-font-family-heading);font-weight:bold}h2,.mg-u-h2{font-family:var(--mg-b-font-family-heading);font-weight:bold}h3,.mg-u-h3{font-family:var(--mg-b-font-family-heading);font-weight:bold}h4,.mg-u-h4{font-family:var(--mg-b-font-family-heading);font-weight:bold}h5,.mg-u-h5{font-family:var(--mg-b-font-family-heading);font-weight:bold}h6,.mg-u-h6{font-family:var(--mg-b-font-family-heading);font-weight:bold}h1,.mg-u-h1{font-size:var(--mg-b-font-size-h1)}h2,.mg-u-h2{font-size:var(--mg-b-font-size-h2)}h3,.mg-u-h3{font-size:var(--mg-b-font-size-h3)}h4,.mg-u-h4{font-size:var(--mg-b-font-size-h4)}h5,.mg-u-h5{font-size:var(--mg-b-font-size-h5)}h6,.mg-u-h6{font-size:var(--mg-b-font-size-h6)}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}small{font-size:var(--mg-b-small-font-size)}.mg-u-text-left{text-align:left !important}.mg-u-text-center{text-align:center !important}.mg-u-text-right{text-align:right !important}.mg-c-table{--mg-c-table-cell-spacing:var(--mg-b-size-8) var(--mg-b-size-16);--mg-c-table-cell-height:var(--mg-b-size-40);--mg-c-table-header-cell-height:calc(var(--mg-b-size-min-height) + 2 * var(--mg-b-size-8));overflow:hidden;border:var(--mg-b-size-border) solid var(--mg-b-color-neutral-30);border-radius:var(--mg-b-size-12);background:var(--mg-b-color-light);border-spacing:0;color:var(--mg-b-color-dark)}.mg-c-table td,.mg-c-table th{height:var(--mg-c-table-cell-height);box-sizing:border-box;padding:var(--mg-c-table-cell-spacing);text-align:start}.mg-c-table thead{height:var(--mg-c-table-header-cell-height)}.mg-c-table thead,.mg-c-table tfoot{background-color:var(--mg-b-color-neutral-10)}.mg-c-table thead td,.mg-c-table tfoot td,.mg-c-table th{font-weight:600}.mg-c-table tr th,.mg-c-table tr td{border-block-end:var(--mg-b-size-border) solid var(--mg-b-color-neutral-30)}.mg-c-table tfoot tr:last-of-type th,.mg-c-table tfoot tr:last-of-type td{border-block-end:none}.mg-c-table.mg-c-table--size-small{--mg-c-table-cell-spacing:var(--mg-b-size-4) var(--mg-b-size-16);--mg-c-table-cell-height:var(--mg-b-size-32);--mg-c-table-header-cell-height:var(--mg-b-size-32)}.mg-c-table.mg-c-table--size-large{--mg-c-table-cell-height:var(--mg-c-table-header-cell-height)}.mg-c-table.mg-c-table--size-xlarge{--mg-c-table-cell-spacing:var(--mg-b-size-12) var(--mg-b-size-16);--mg-c-table-cell-height:var(--mg-b-size-64);--mg-c-table-header-cell-height:var(--mg-b-size-64)}.mg-c-table.mg-c-table--full-width{width:100%}.mg-c-table-wrapper{overflow:auto}.mg-c-table thead td,.mg-c-table thead th{position:relative}.mg-c-table thead td .mg-c-table__sort-button,.mg-c-table thead th .mg-c-table__sort-button{padding:0;border:none;margin:0;background:none;color:inherit;font-size:inherit;font-weight:600}.mg-c-table thead td .mg-c-table__sort-button::after,.mg-c-table thead th .mg-c-table__sort-button::after{position:absolute;content:\"\";inset:0}.mg-c-table thead td .mg-c-table__sort-button:hover,.mg-c-table thead th .mg-c-table__sort-button:hover{cursor:pointer}.mg-c-table thead td .mg-c-table__sort-button mg-icon,.mg-c-table thead th .mg-c-table__sort-button mg-icon{margin-left:var(--mg-b-size-4)}.mg-c-table thead td:has(.mg-c-table__sort-button):hover,.mg-c-table thead td[aria-sort=descending],.mg-c-table thead td[aria-sort=ascending],.mg-c-table thead th:has(.mg-c-table__sort-button):hover,.mg-c-table thead th[aria-sort=descending],.mg-c-table thead th[aria-sort=ascending]{background-color:var(--mg-b-color-neutral-20)}";
8421
+ const mgTableCss = ".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}@font-face{font-family:\"Open Sans\";src:url(\"fonts/OpenSans-Regular.ttf\") format(\"truetype\")}@font-face{font-family:\"Open Sans\";font-weight:600;src:url(\"fonts/OpenSans-SemiBold.ttf\") format(\"truetype\")}@font-face{font-family:\"Open Sans\";font-weight:700;src:url(\"fonts/OpenSans-Bold.ttf\") format(\"truetype\")}p{margin:0}p+p{margin-top:var(--mg-b-size-8)}h1,.mg-u-h1{font-family:var(--mg-b-font-family-heading);font-weight:bold}h2,.mg-u-h2{font-family:var(--mg-b-font-family-heading);font-weight:bold}h3,.mg-u-h3{font-family:var(--mg-b-font-family-heading);font-weight:bold}h4,.mg-u-h4{font-family:var(--mg-b-font-family-heading);font-weight:bold}h5,.mg-u-h5{font-family:var(--mg-b-font-family-heading);font-weight:bold}h6,.mg-u-h6{font-family:var(--mg-b-font-family-heading);font-weight:bold}h1,.mg-u-h1{font-size:var(--mg-b-font-size-h1)}h2,.mg-u-h2{font-size:var(--mg-b-font-size-h2)}h3,.mg-u-h3{font-size:var(--mg-b-font-size-h3)}h4,.mg-u-h4{font-size:var(--mg-b-font-size-h4)}h5,.mg-u-h5{font-size:var(--mg-b-font-size-h5)}h6,.mg-u-h6{font-size:var(--mg-b-font-size-h6)}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}small{font-size:var(--mg-b-small-font-size)}.mg-u-text-left{text-align:left !important}.mg-u-text-center{text-align:center !important}.mg-u-text-right{text-align:right !important}.mg-c-table{--mg-c-table-cell-spacing:var(--mg-b-size-8) var(--mg-b-size-16);--mg-c-table-cell-height:var(--mg-b-size-40);--mg-c-table-header-cell-height:calc(var(--mg-b-size-min-height) + 2 * var(--mg-b-size-8));overflow:hidden;border:var(--mg-b-size-border) solid var(--mg-b-color-neutral-30);border-radius:var(--mg-b-size-12);background:var(--mg-b-color-light);border-spacing:0;color:var(--mg-b-color-dark)}.mg-c-table td,.mg-c-table th{height:var(--mg-c-table-cell-height);box-sizing:border-box;padding:var(--mg-c-table-cell-spacing);text-align:start}.mg-c-table thead{height:var(--mg-c-table-header-cell-height)}.mg-c-table thead,.mg-c-table tfoot{background-color:var(--mg-b-color-neutral-10)}.mg-c-table thead td,.mg-c-table tfoot td,.mg-c-table th{font-weight:600}.mg-c-table tr th,.mg-c-table tr td{border-block-end:var(--mg-b-size-border) solid var(--mg-b-color-neutral-30)}.mg-c-table tfoot tr:last-of-type th,.mg-c-table tfoot tr:last-of-type td{border-block-end:none}.mg-c-table.mg-c-table--size-small{--mg-c-table-cell-spacing:var(--mg-b-size-4) var(--mg-b-size-16);--mg-c-table-cell-height:var(--mg-b-size-32);--mg-c-table-header-cell-height:var(--mg-b-size-32)}.mg-c-table.mg-c-table--size-large{--mg-c-table-cell-height:var(--mg-c-table-header-cell-height)}.mg-c-table.mg-c-table--size-xlarge{--mg-c-table-cell-spacing:var(--mg-b-size-12) var(--mg-b-size-16);--mg-c-table-cell-height:var(--mg-b-size-64);--mg-c-table-header-cell-height:var(--mg-b-size-64)}.mg-c-table.mg-c-table--full-width{width:100%}.mg-c-table-wrapper{overflow:auto}.mg-c-table thead td,.mg-c-table thead th{position:relative}.mg-c-table thead td .mg-c-table__sort-button,.mg-c-table thead th .mg-c-table__sort-button{display:inline-flex;align-items:center;padding:0;border:none;margin:0;background:none;color:inherit;font-size:inherit;font-weight:600;gap:var(--mg-b-size-4);text-align:left}.mg-c-table thead td .mg-c-table__sort-button::after,.mg-c-table thead th .mg-c-table__sort-button::after{position:absolute;content:\"\";inset:0}.mg-c-table thead td .mg-c-table__sort-button:hover,.mg-c-table thead th .mg-c-table__sort-button:hover{cursor:pointer}.mg-c-table thead td:has(.mg-c-table__sort-button):hover,.mg-c-table thead td[aria-sort=descending],.mg-c-table thead td[aria-sort=ascending],.mg-c-table thead th:has(.mg-c-table__sort-button):hover,.mg-c-table thead th[aria-sort=descending],.mg-c-table thead th[aria-sort=ascending]{background-color:var(--mg-b-color-neutral-20)}";
8256
8422
 
8257
8423
  /**
8258
8424
  * Check if value is a valid align object