@mgdis/mg-components 6.22.0 → 6.22.1

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 (125) hide show
  1. package/dist/cjs/{index-C2viYwrR.js → index-Dz2LAZQT.js} +325 -1789
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/{mg-action-more_37.cjs.entry.js → mg-action-more_36.cjs.entry.js} +109 -130
  4. package/dist/cjs/mg-alert.cjs.entry.js +2 -2
  5. package/dist/cjs/mg-breadcrumb.cjs.entry.js +2 -2
  6. package/dist/cjs/mg-components.cjs.js +3 -3
  7. package/dist/cjs/mg-fieldset.cjs.entry.js +2 -2
  8. package/dist/cjs/mg-input-combobox.cjs.entry.js +2 -2
  9. package/dist/cjs/mg-input-file.cjs.entry.js +3 -3
  10. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +2498 -2474
  11. package/dist/cjs/mg-loader.cjs.entry.js +2 -2
  12. package/dist/cjs/mg-progress.cjs.entry.js +2 -2
  13. package/dist/collection/collection-manifest.json +2 -2
  14. package/dist/collection/components/atoms/mg-badge/mg-badge.js +2 -1
  15. package/dist/collection/components/atoms/mg-button/mg-button.js +6 -3
  16. package/dist/collection/components/atoms/mg-card/mg-card.js +2 -1
  17. package/dist/collection/components/atoms/mg-icon/mg-icon.js +8 -4
  18. package/dist/collection/components/atoms/mg-tag/mg-tag.js +2 -1
  19. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +2 -1
  20. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +4 -2
  21. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.js +38 -0
  22. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +3 -2
  23. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +47 -26
  24. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +13 -7
  25. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +3 -2
  26. package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +4 -3
  27. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +9 -5
  28. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +5 -3
  29. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +5 -3
  30. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +7 -4
  31. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +22 -8
  32. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +11 -6
  33. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +5 -3
  34. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +7 -4
  35. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +5 -3
  36. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +5 -3
  37. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +4 -2
  38. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +11 -7
  39. package/dist/collection/components/molecules/mg-alert/mg-alert.js +5 -3
  40. package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.js +3 -2
  41. package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
  42. package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +3 -2
  43. package/dist/collection/components/molecules/mg-form/mg-form.js +5 -3
  44. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +5 -3
  45. package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
  46. package/dist/collection/components/molecules/mg-message/mg-message.js +6 -4
  47. package/dist/collection/components/molecules/mg-modal/mg-modal.js +4 -3
  48. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +2 -1
  49. package/dist/collection/components/molecules/mg-panel/mg-panel.js +5 -3
  50. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
  51. package/dist/collection/components/molecules/mg-popover/mg-popover.js +3 -2
  52. package/dist/collection/components/molecules/mg-progress/mg-progress.js +3 -2
  53. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +3 -2
  54. package/dist/collection/components/molecules/mg-table/mg-table.js +4 -2
  55. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +3 -2
  56. package/dist/components/index2.js +1 -1
  57. package/dist/components/mg-action-more.js +1 -1
  58. package/dist/components/mg-alert.js +1 -1
  59. package/dist/components/mg-breadcrumb.js +1 -1
  60. package/dist/components/mg-details.js +1 -1
  61. package/dist/components/mg-fieldset.js +1 -1
  62. package/dist/components/mg-form.js +1 -1
  63. package/dist/components/mg-illustrated-message.js +1 -1
  64. package/dist/components/mg-input-checkbox.js +1 -1
  65. package/dist/components/mg-input-combobox.js +1 -1
  66. package/dist/components/mg-input-date.js +1 -1
  67. package/dist/components/mg-input-file.js +1 -1
  68. package/dist/components/mg-input-numeric.js +1 -1
  69. package/dist/components/mg-input-password.js +1 -1
  70. package/dist/components/mg-input-radio.js +1 -1
  71. package/dist/components/mg-input-rich-text-editor.js +2 -2
  72. package/dist/components/mg-input-select2.js +1 -1
  73. package/dist/components/mg-input-text2.js +1 -1
  74. package/dist/components/mg-input-textarea.js +1 -1
  75. package/dist/components/mg-input-toggle.js +1 -1
  76. package/dist/components/mg-item-more2.js +1 -1
  77. package/dist/components/mg-loader2.js +1 -1
  78. package/dist/components/mg-message2.js +1 -1
  79. package/dist/components/mg-modal.js +1 -1
  80. package/dist/components/mg-panel.js +1 -1
  81. package/dist/components/mg-popover-content2.js +1 -1
  82. package/dist/components/mg-popover2.js +1 -1
  83. package/dist/components/mg-progress.js +1 -1
  84. package/dist/components/mg-skip-links.js +1 -1
  85. package/dist/components/mg-tabs2.js +1 -1
  86. package/dist/esm/{index-DFwaH2hS.js → index-C3jUhxdI.js} +325 -1789
  87. package/dist/esm/loader.js +3 -3
  88. package/dist/esm/{mg-action-more_37.entry.js → mg-action-more_36.entry.js} +111 -131
  89. package/dist/esm/mg-alert.entry.js +2 -2
  90. package/dist/esm/mg-breadcrumb.entry.js +2 -2
  91. package/dist/esm/mg-components.js +4 -4
  92. package/dist/esm/mg-fieldset.entry.js +2 -2
  93. package/dist/esm/mg-input-combobox.entry.js +2 -2
  94. package/dist/esm/mg-input-file.entry.js +3 -3
  95. package/dist/esm/mg-input-rich-text-editor.entry.js +2498 -2474
  96. package/dist/esm/mg-loader.entry.js +2 -2
  97. package/dist/esm/mg-progress.entry.js +2 -2
  98. package/dist/mg-components/mg-components.esm.js +1 -1
  99. package/dist/mg-components/{p-2ee92f38.entry.js → p-06fbdb2f.entry.js} +1 -1
  100. package/dist/mg-components/{p-3b653226.entry.js → p-188b9ca9.entry.js} +1 -1
  101. package/dist/mg-components/p-4667078d.entry.js +1 -0
  102. package/dist/mg-components/{p-c63f97f0.entry.js → p-5a859ecf.entry.js} +2 -2
  103. package/dist/mg-components/{p-d5e69c95.entry.js → p-661da56b.entry.js} +1 -1
  104. package/dist/mg-components/{p-adec7fcc.entry.js → p-8e256086.entry.js} +1 -1
  105. package/dist/mg-components/p-C3jUhxdI.js +2 -0
  106. package/dist/mg-components/{p-cc793586.entry.js → p-b0b8c58f.entry.js} +1 -1
  107. package/dist/mg-components/{p-5745fbea.entry.js → p-bbcef41c.entry.js} +1 -1
  108. package/dist/mg-components/{p-c8c8cfc1.entry.js → p-c1aeb277.entry.js} +1 -1
  109. package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.d.ts +2 -2
  110. package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.d.ts +8 -0
  111. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +16 -8
  112. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +15 -5
  113. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +1 -1
  114. package/dist/types/components.d.ts +525 -170
  115. package/dist/types/stencil-public-runtime.d.ts +52 -2
  116. package/ide/intellij/web-types.json +7 -7
  117. package/ide/vscode/html-custom-data.json +3 -3
  118. package/package.json +19 -19
  119. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +0 -245
  120. package/dist/components/mg-input-checkbox-paginated.d.ts +0 -11
  121. package/dist/components/mg-input-checkbox-paginated.js +0 -1
  122. package/dist/components/mg-input-checkbox-paginated2.js +0 -1
  123. package/dist/mg-components/p-0482eb9f.entry.js +0 -1
  124. package/dist/mg-components/p-DFwaH2hS.js +0 -2
  125. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +0 -77
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, h, H as Host, a as getElement, c as createEvent } from './index-DFwaH2hS.js';
2
- import { h as createID, t as toString, C as ClassList, i as isValidString, n as nextTick, j as isValideID, k as isTagName, l as cleanString, f as formatID, m as dateRegExp, o as dateToString, b as allItemsAreString, p as getWindows, q as focusableElements } from './index-C7xjtdiw.js';
1
+ import { r as registerInstance, h, H as Host, a as getElement, c as createEvent } from './index-C3jUhxdI.js';
2
+ import { h as createID, t as toString, C as ClassList, i as isValidString, n as nextTick, j as isValideID, k as isTagName, f as formatID, l as cleanString, m as dateRegExp, o as dateToString, b as allItemsAreString, p as getWindows, q as focusableElements } from './index-C7xjtdiw.js';
3
3
  import { i as initLocales, a as localeDate, b as localeDatePattern, c as localeNumber, d as localeUnit, e as localePercent, f as localeCurrency } from './index-DSEloqPn.js';
4
4
  import { K as Keys } from './events.utils-yMGqY8YG.js';
5
5
  import { i as isMgInputFile, l as labelHeadings, t as tooltipPositions, b as classFieldset, c as classReadonly, a as classDisabled, d as classVerticalList, w as widths, e as classDisplayCharacterLeft } from './mg-input.conf-C9rmNQIL.js';
@@ -167,7 +167,7 @@ const MgActionMore = class {
167
167
  [`${this.classBase}__chevron--rotate`]: this.expanded === true,
168
168
  } }, h("mg-icon", { icon: "chevron-down" })));
169
169
  }
170
- return (h(Host, { key: 'bef7d0e0c5a991f321ca930d65fa458873fc7564', "data-mg-popover-guard": this.mgPopoverIdentifier }, h("span", { key: '4e47d1513749cc1ac15ef8febd2fb914e362bbee', class: this.classBase }, h("mg-popover", { key: 'ab6dfc93422f03b49a78d2896196aa6901841aef', identifier: this.mgPopoverIdentifier, display: this.expanded, "onDisplay-change": this.handleDisplayChange }, h("mg-button", { key: '921f17c4ede5f1783dc336429539b0b082902fdd', variant: this.button.variant, isIcon: this.button.isIcon, disabled: this.button.disabled, type: "button", label: buttonLabel, onClick: this.handleButton }, this.icon && h("mg-icon", Object.assign({ key: '19bf9e015cbd82d8dffc62269de735607ab4f2bb' }, this.icon)), !this.button.isIcon && buttonContent), h("div", { key: '56a43a5adebd31264742c0ef8905ccb0bd8fb581', slot: "content" }, h("mg-menu", { key: '70520957ac07a3190ef753ee435996af96dbc5b5', direction: directions$1.VERTICAL, label: this.messages.label }, this.items.map(item => {
170
+ return (h(Host, { key: '184355435ec346d682c2df4aa8b33bf5f54e77e7', "data-mg-popover-guard": this.mgPopoverIdentifier }, h("span", { key: '8176489e5dd7741311745d015b8ef7f2a4f63ea9', class: this.classBase }, h("mg-popover", { key: '3ee64b21556ee9e910939ad2fc9e3fbf8e4bd964', identifier: this.mgPopoverIdentifier, display: this.expanded, "onDisplay-change": this.handleDisplayChange }, h("mg-button", { key: 'cf8f7f4f736d6a8338a4f6eebce04b4e2be49825', variant: this.button.variant, isIcon: this.button.isIcon, disabled: this.button.disabled, type: "button", label: buttonLabel, onClick: this.handleButton }, this.icon && h("mg-icon", Object.assign({ key: 'ee8b4f13bac85ccdd5e9d72edbaa957054c304ec' }, this.icon)), !this.button.isIcon && buttonContent), h("div", { key: '1c78fb9a98d59fa5422c5105ecb13d2f2884c7d2', slot: "content" }, h("mg-menu", { key: '522d915d4a38529f7709640bb96eebb81ccc86af', direction: directions$1.VERTICAL, label: this.messages.label }, this.items.map(item => {
171
171
  var _a, _b;
172
172
  return isMgActionMoreDivider(item) ? (h("mg-divider", { class: "mg-c-action-more__divider", key: "divider", "full-width": true })) : (h("mg-menu-item", { key: item.label, status: item.status || Status$1.VISIBLE, target: item.target, href: item.href,
173
173
  // eslint-disable-next-line react/jsx-no-bind
@@ -689,7 +689,7 @@ const MgDetails = class {
689
689
  * @returns HTML Element
690
690
  */
691
691
  render() {
692
- return (h("details", { key: '4da17afd7a964a14b5b101bcfadc241be569d55a', class: { 'mg-c-details': true, 'mg-c-details--empty-summary': this.isEmptySummary }, onToggle: this.handleToggle, open: this.expanded, ref: (el) => (this.details = el) }, h("summary", { key: '515d6c4e117b547fe80a310fb90e114900f645e8' }, h("slot", { key: '0c9c0dcc47dd418e34e541d878bfc03ca137c68d', name: "summary" }), h("span", { key: 'c94f52994843b10c1161c0d85f38f8cb917ea806', class: "mg-c-details__toggle" }, h("mg-icon", { key: '9421452572af3deb03146a8dfd189369b249ba2d', icon: "chevron-up", class: { 'mg-c-details__toggle-icon': true, 'mg-c-details__toggle-icon--reverse': !this.expanded } }), h("span", { key: 'dbfb0b34da00e37f55ec07236611c2babdd6b7c5', class: { 'mg-u-visually-hidden': this.hideSummary } }, this.expanded ? this.toggleOpened : this.toggleClosed))), h("div", { key: '1b18b65a98e39a8663fa5d7e51eef5fbe2b92f76', class: "mg-c-details__details" }, h("slot", { key: '81c213594b1b67747db439624090784eaa5e6fcd', name: "details" }))));
692
+ return (h("details", { key: 'bbaac6909fa5f3fbd3236b2a8ace0f7c80b2580b', class: { 'mg-c-details': true, 'mg-c-details--empty-summary': this.isEmptySummary }, onToggle: this.handleToggle, open: this.expanded, ref: (el) => (this.details = el) }, h("summary", { key: '2ed8228b63403dd9b386bf3fa70c9094516b6f0e' }, h("slot", { key: '5461d77d2b2869b14737a5c7cfc40a1f9584ee03', name: "summary" }), h("span", { key: 'bb089365bdeaa7b934b97cff6f5f7c67587048e1', class: "mg-c-details__toggle" }, h("mg-icon", { key: 'dc1a30338703ad4182d50f9953a903ae0f68ecb1', icon: "chevron-up", class: { 'mg-c-details__toggle-icon': true, 'mg-c-details__toggle-icon--reverse': !this.expanded } }), h("span", { key: 'a32cbaf9e38b71540deeaa8980895c34a7288ecb', class: { 'mg-u-visually-hidden': this.hideSummary } }, this.expanded ? this.toggleOpened : this.toggleClosed))), h("div", { key: 'b9c2bc7d681da8ac8b4dec5ff25287bc68975fb6', class: "mg-c-details__details" }, h("slot", { key: '069f05b4c133ff13055681e0b05bb98744303137', name: "details" }))));
693
693
  }
694
694
  get element() { return getElement(this); }
695
695
  static get watchers() { return {
@@ -982,7 +982,7 @@ const MgForm = class {
982
982
  * @returns HTML Element
983
983
  */
984
984
  render() {
985
- return (h("form", { key: 'b1a6b50f2bbb9b71cecd23d419771cf1b40e13b4', class: this.classCollection.join(), id: this.identifier, name: this.name, onSubmit: this.handleFormSubmit, role: this.ariaRole }, this.requiredMessageText && h("p", { key: '9c878f3730a06e1b683240057511b588edf5e887', innerHTML: this.requiredMessageText }), h("slot", { key: '3cf5ca0f07e2f3573615cf6566e230f4d5678b31' }), !this.readonly && !this.disabled && h("slot", { key: '6cbfd58e9600f7a9d9b55ec23bdd64877c03f0d7', name: "actions" })));
985
+ return (h("form", { key: 'e528a49eba4e57f809dd0a6dd5462c2be3677da5', class: this.classCollection.join(), id: this.identifier, name: this.name, onSubmit: this.handleFormSubmit, role: this.ariaRole }, this.requiredMessageText && h("p", { key: '37eb0c30984b998ef8d78ff8ae74949c4761c21a', innerHTML: this.requiredMessageText }), h("slot", { key: '8ae80522118a3e87ca735545a48844c1e4e3ab30' }), !this.readonly && !this.disabled && h("slot", { key: '4cdeba849881f9753ff08df6c456397e859c6a0d', name: "actions" })));
986
986
  }
987
987
  get element() { return getElement(this); }
988
988
  static get watchers() { return {
@@ -1260,7 +1260,7 @@ const MgIllustratedMessage = class {
1260
1260
  * @returns HTML Element
1261
1261
  */
1262
1262
  render() {
1263
- return (h("div", { key: 'ed3b924f5c5a75706aef03ef8798cb699679012d', class: this.classCollection.join() }, h("div", { key: '59b7f7b3fe4ad808377094f93e8b6e86ba2f49ec', class: "mg-c-illustrated-message__illustration" }, h("slot", { key: 'd28aa873cd7025647f56f3a4ed62d9e35dde25d3', name: "illustration" })), h("div", { key: '3b150411a26531827c988a2d34e2990a2302f982', class: "mg-c-illustrated-message__slots" }, h("slot", { key: '8ffea6e50bf5dc4b870d414cb710fc88e0984f61', name: "title" }), h("slot", { key: 'ec85b4a50d28ddf14dbd6b0feff59e2030348b68', name: "details" }))));
1263
+ return (h("div", { key: 'c9d8c8bfd2792b1cf5e78ab9d168d597b20e9a1e', class: this.classCollection.join() }, h("div", { key: 'cc8fa03147b9e59e6e8e015be9ed2b8dddd92ded', class: "mg-c-illustrated-message__illustration" }, h("slot", { key: '83a4ec2223c4e74511beb7c0abfa10e77cee425d', name: "illustration" })), h("div", { key: 'dbb4d13ca5324cab889fa2acc9b9b22522d7a8ec', class: "mg-c-illustrated-message__slots" }, h("slot", { key: '9e74d84becf29539ec9c37e8ad1e317714f3c86c', name: "title" }), h("slot", { key: 'ae97d25c19b76ca092560d2555ebd6a87f542ffe', name: "details" }))));
1264
1264
  }
1265
1265
  get element() { return getElement(this); }
1266
1266
  static get watchers() { return {
@@ -1683,8 +1683,9 @@ const checkboxTypes = ['checkbox', 'multi'];
1683
1683
  * mg-input-checkbox-paginated section kind value
1684
1684
  */
1685
1685
  const SectionKind = {
1686
- SELECTED: 'selected',
1687
- NOT_SELECTED: 'not-selected',
1686
+ NOT_SELECTED: 0,
1687
+ SELECTED: 1,
1688
+ SEARCH: 2,
1688
1689
  };
1689
1690
 
1690
1691
  /**
@@ -1707,10 +1708,46 @@ const Status = {
1707
1708
  ACTIVE: 'active',
1708
1709
  };
1709
1710
 
1711
+ /**
1712
+ * Get items from checkboxes and limit
1713
+ * @param checkboxes - checkboxes to slice
1714
+ * @param limit - number of items to return
1715
+ * @returns list of items to display in section
1716
+ */
1717
+ const getItems = (checkboxes, limit) => [...checkboxes].slice(0, limit);
1718
+ /**
1719
+ * Component has next checkboxes to display
1720
+ * @param checkboxes - checkboxes to check
1721
+ * @param limit - number of items to display
1722
+ * @returns truthy if have next elements
1723
+ */
1724
+ const hasNext = (checkboxes, limit) => checkboxes.length > limit;
1725
+ /**
1726
+ * Internal component use to manage sections instances
1727
+ * @param props - MgInputCheckboxList Interface Props
1728
+ * @returns input template
1729
+ */
1730
+ const MgInputCheckboxPaginated = (props) => {
1731
+ const items = getItems(props.checkboxes, props.limit);
1732
+ const listId = formatID(props.messages.label);
1733
+ const tabId = `tab-info-${props.key}`;
1734
+ /**
1735
+ * Handle load-more <mg-button> click event
1736
+ */
1737
+ const handleLoadMoreClick = () => {
1738
+ if (hasNext(props.checkboxes, props.limit)) {
1739
+ props.handleLoadMore();
1740
+ }
1741
+ };
1742
+ return (h("div", { class: "mg-input-checkbox-paginated mg-c-input__tab", slot: `tab_content-${props.key + 1}` },
1743
+ // Mass action depends on all checkboxes list, not only displayed items
1744
+ typeof props.handleMassAction === 'function' && props.checkboxes.length > 0 && props.checkboxes.some(checkbox => checkbox.disabled !== true) && (h("mg-tooltip", { slot: "header-action", class: "mg-c-input__tabs-action", message: props.messages.tooltip }, h("mg-button", { variant: "link", onClick: props.handleMassAction }, props.messages.action))), h("div", { class: "mg-c-input__tabs-content" }, h("p", { id: tabId, class: { 'mg-c-input__popover-info': true, 'mg-u-visually-hidden': items.length !== 0 }, "aria-live": items.length !== 0 ? 'polite' : undefined }, items.length === 0 ? props.messages.noValue : props.messages.values.replace('{count}', items.length.toString())), items.length > 0 && (h(MgInputCheckboxList, { checkboxes: items, labelledby: tabId, id: listId, disabled: props.disabled, name: props.name, invalid: props.invalid })), hasNext(props.checkboxes, props.limit) && (h("mg-button", { key: "load-more", variant: "flat", class: "mg-c-input__load-more", tabIndex: -1, "full-width": true, onClick: handleLoadMoreClick, "aria-controls": listId }, h("mg-icon", { icon: "chevron-down" }), props.messages.showMore)))));
1745
+ };
1746
+
1710
1747
  const mgInputCheckboxCss = () => `.mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);overflow-wrap:anywhere}.mg-c-input.mg-c-input--fieldset{padding:0;border:0;margin-right:0;margin-left:0}.mg-c-input.mg-c-input--fieldset input[type=radio],.mg-c-input.mg-c-input--fieldset input[type=checkbox]{width:var(--mg-c-input-check-size);height:var(--mg-c-input-check-size);flex-shrink:0;margin:calc((var(--mg-b-font-size)*var(--mg-b-line-height) - var(--mg-c-input-check-size))/2) var(--mg-b-size-8) 0 0}.mg-c-input.mg-c-input--fieldset .mg-c-input__input-group{display:flex;align-items:start}.mg-c-input.mg-c-input--fieldset .mg-c-input__input-group-container{display:flex;flex-wrap:wrap;padding:0;margin:0;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);gap:var(--mg-b-size-12) var(--mg-b-size-24);list-style:none}.mg-c-input.mg-c-input--fieldset .mg-c-input__input-group.mg-c-input__input-group--disabled label{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--fieldset.mg-c-input--vertical-list .mg-c-input__input-group-container,.mg-c-input.mg-c-input--fieldset.mg-c-input--checkbox-multi .mg-c-input__input-group-container{flex-direction:column}.mg-c-input.mg-c-input--fieldset.mg-c-input--label-on-top .mg-c-input__input-group-container{margin-top:var(--mg-b-size-8)}.mg-c-input__popover-info{padding:var(--mg-b-size-8);margin:0;color:var(--mg-b-color-neutral-90);text-align:center}.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}}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-group-container{padding:var(--mg-b-size-4) var(--mg-b-size-8);margin:0}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-container{display:flex;width:unset;flex:unset;flex-wrap:wrap;column-gap:var(--mg-b-size-8)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-container-list{display:flex;flex-flow:row wrap;padding:0;margin:0;gap:var(--mg-b-size-4);list-style:none}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__tab{display:block;min-height:calc(var(--mg-b-size-4)*55)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__tabs{min-height:0;flex-shrink:1}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__tabs-action{padding-top:var(--mg-b-size-16);padding-bottom:var(--mg-b-size-12)}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__tabs-content{height:calc(24*var(--mg-b-size-8) - 2*var(--mg-b-size-8));overflow-y:auto}.mg-c-input.mg-c-input--checkbox-multi .mg-c-input__input-value{display:inline-flex;min-width:var(--mg-b-size-min-height);min-height:var(--mg-b-size-min-height);box-sizing:border-box;align-items:center;justify-content:center;padding:calc((var(--mg-b-size-min-height) - 2*var(--mg-b-size-border) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-12);border-radius:var(--mg-b-size-4);background-color:var(--mg-b-color-neutral-20);font-size:var(--mg-b-font-size)}.mg-c-input.mg-c-input--checkbox-multi b{margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2)}.mg-c-input.mg-c-input--checkbox-multi.mg-c-input--disabled .mg-c-input__input-container b{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--checkbox-multi.mg-c-input--with-values .mg-c-input__input-container{gap:var(--mg-b-size-4)}.mg-c-input.mg-c-input--checkbox-multi.mg-c-input--search-mode .mg-c-input__content{display:flex;width:calc(var(--mg-b-size-floating-element-max-width) - var(--mg-b-size-16));flex-direction:column;gap:var(--mg-b-size-4)}.mg-c-input.mg-c-input--checkbox-multi.mg-c-input--search-mode .mg-c-input__content .mg-c-input__tabs-content{min-height:calc(var(--mg-b-size-4)*55)}.mg-c-input.mg-c-input--checkbox-multi:not(.mg-c-input--label-on-top) mg-tooltip:not(.mg-c-input__section-header-tootlip){margin-left:var(--mg-b-size-8)}.mg-c-input.mg-c-input--checkbox-multi mg-popover{--mg-c-card-spacing:var(--mg-b-size-8)}.mg-c-input.mg-c-input--readonly ul{display:flex;min-height:var(--mg-b-font-size);flex-flow:column wrap;padding:0;margin:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) 0 0;list-style:none;row-gap:var(--mg-b-size-8)}`;
1711
1748
 
1712
1749
  /**
1713
- * type CheckboxItem validation function
1750
+ * type ICheckboxItem validation function
1714
1751
  * @param items - Checkbox item
1715
1752
  * @returns match item type
1716
1753
  */
@@ -1733,6 +1770,7 @@ const MgInputCheckbox = class {
1733
1770
  // "multi" setup
1734
1771
  this.multiStart = 5;
1735
1772
  this.searchStart = 10;
1773
+ this.paginatedStep = 10;
1736
1774
  // popover variables
1737
1775
  this.hasOpenedPopover = false;
1738
1776
  this.checkboxesId = 'checkboxes-list';
@@ -1798,6 +1836,10 @@ const MgInputCheckbox = class {
1798
1836
  * Define <mg-tabs> active-tab
1799
1837
  */
1800
1838
  this.activeTab = 1;
1839
+ /**
1840
+ * Paginated sections limit per key
1841
+ */
1842
+ this.paginatedLimits = {};
1801
1843
  /**
1802
1844
  * Handle input event
1803
1845
  * @param event - input event
@@ -1843,8 +1885,9 @@ const MgInputCheckbox = class {
1843
1885
  * @param event - input value-change event
1844
1886
  */
1845
1887
  this.handleSearchChange = (event) => {
1846
- this.searchValue = event.detail;
1847
1888
  event.stopPropagation();
1889
+ event.preventDefault();
1890
+ this.searchValue = event.detail;
1848
1891
  };
1849
1892
  /**
1850
1893
  * Handle <mg-tabs> tab-change event
@@ -1976,9 +2019,15 @@ const MgInputCheckbox = class {
1976
2019
  * Reset <mg-input-checkbox-paginated> limit state
1977
2020
  */
1978
2021
  this.resetTabsLimit = () => {
1979
- Array.from(this.element.shadowRoot.querySelectorAll('mg-input-checkbox-paginated')).forEach(component => {
1980
- component.resetLimit();
1981
- });
2022
+ this.paginatedLimits = {};
2023
+ };
2024
+ /**
2025
+ * Handle load-more action for a paginated section
2026
+ * @param key - section key
2027
+ */
2028
+ this.handlePaginatedLoadMore = (key) => {
2029
+ var _a;
2030
+ this.paginatedLimits = Object.assign(Object.assign({}, this.paginatedLimits), { [key]: ((_a = this.paginatedLimits[key]) !== null && _a !== void 0 ? _a : this.paginatedStep) + this.paginatedStep });
1982
2031
  };
1983
2032
  /**
1984
2033
  * Renders the readonly value of the input.
@@ -1999,7 +2048,7 @@ const MgInputCheckbox = class {
1999
2048
  this.valueChange.emit(newValue);
2000
2049
  }
2001
2050
  else {
2002
- throw new Error(`<mg-input-checkbox> prop "value" is required and all values must be the same type, CheckboxItem. Passed value: ${toString(newValue)}.`);
2051
+ throw new Error(`<mg-input-checkbox> prop "value" is required and all values must be the same type, ICheckboxItem. Passed value: ${toString(newValue)}.`);
2003
2052
  }
2004
2053
  }
2005
2054
  validateType(newValue) {
@@ -2224,7 +2273,7 @@ const MgInputCheckbox = class {
2224
2273
  * @param checkboxes - checkboxes to render
2225
2274
  * @returns render sections of checkboxes
2226
2275
  */
2227
- renderCheckboxTabs(checkboxes, checkboxPaginatedProps) {
2276
+ renderCheckboxTabs(props) {
2228
2277
  const handleMassAction = (kind) => () => {
2229
2278
  const displayItems = this.getDisplayItems();
2230
2279
  // update only displayed items
@@ -2235,39 +2284,43 @@ const MgInputCheckbox = class {
2235
2284
  });
2236
2285
  this.updateValues();
2237
2286
  };
2238
- const [checkedValues, notCheckedValues] = checkboxes.reduce((acc, curr) => {
2287
+ const [checkedValues, notCheckedValues] = props.checkboxes.reduce((acc, curr) => {
2239
2288
  acc[curr.value ? 0 : 1].push(curr);
2240
2289
  return acc;
2241
2290
  }, [[], []]);
2242
2291
  const sections = [
2243
- Object.assign(Object.assign({}, checkboxPaginatedProps), { checkboxes: notCheckedValues, messages: Object.assign(Object.assign({}, this.messages.input.checkbox.sections.notSelected), { showMore: this.messages.input.showMore }), handleMassAction: handleMassAction(SectionKind.NOT_SELECTED) }),
2244
- Object.assign(Object.assign({}, checkboxPaginatedProps), { checkboxes: checkedValues, messages: Object.assign(Object.assign({}, this.messages.input.checkbox.sections.selected), { showMore: this.messages.input.showMore }), handleMassAction: handleMassAction(SectionKind.SELECTED) }),
2292
+ Object.assign(Object.assign({}, props), { checkboxes: notCheckedValues, messages: Object.assign(Object.assign({}, this.messages.input.checkbox.sections.notSelected), { showMore: this.messages.input.showMore }), key: SectionKind.NOT_SELECTED, handleMassAction: handleMassAction(SectionKind.NOT_SELECTED) }),
2293
+ Object.assign(Object.assign({}, props), { checkboxes: checkedValues, messages: Object.assign(Object.assign({}, this.messages.input.checkbox.sections.selected), { showMore: this.messages.input.showMore }), key: SectionKind.SELECTED, handleMassAction: handleMassAction(SectionKind.SELECTED) }),
2245
2294
  ];
2246
2295
  return (h("mg-tabs", { identifier: `${this.identifier}-tabs`, class: "mg-c-input__tabs", label: this.messages.input.checkbox.sections.label, items: sections.map((section, key) => ({
2247
2296
  label: section.messages.title,
2248
2297
  badge: { value: section.checkboxes.length, label: this.messages.input.checkbox.sections.badge.label, role: 'information' },
2249
2298
  status: key + 1 === this.activeTab ? Status.ACTIVE : Status.VISIBLE,
2250
- })), activeTab: this.activeTab, "onActive-tab-change": this.handleActiveTabChange }, sections.map((section, key) => (h("mg-input-checkbox-paginated", Object.assign({ class: "mg-c-input__tab", slot: `tab_content-${key + 1}` }, section, { key: section.messages.title }), section.checkboxes.length > 0 && section.checkboxes.some(checkbox => checkbox.disabled !== true) && (h("mg-tooltip", { slot: "header-action", class: "mg-c-input__tabs-action", message: section.messages.tooltip }, h("mg-button", { variant: "link", onClick: section.handleMassAction }, section.messages.action))))))));
2299
+ })), activeTab: this.activeTab, "onActive-tab-change": this.handleActiveTabChange }, sections.map(section => {
2300
+ var _a;
2301
+ return (h(MgInputCheckboxPaginated, Object.assign({}, section, { limit: (_a = this.paginatedLimits[section.key]) !== null && _a !== void 0 ? _a : this.paginatedStep, handleLoadMore: () => this.handlePaginatedLoadMore(section.key) })));
2302
+ })));
2251
2303
  }
2252
2304
  /**
2253
2305
  * render checkbox multi element
2254
2306
  * @returns html element
2255
2307
  */
2256
2308
  renderCheckboxMulti() {
2309
+ var _a;
2257
2310
  const selectedValuesNb = this.getSelectedItems().length;
2258
- const checkboxes = this.getDisplayItems();
2259
- const checkboxPaginatedProps = {
2311
+ const props = {
2260
2312
  readonly: this.readonly,
2261
2313
  disabled: this.disabled,
2262
- identifier: this.identifier,
2314
+ checkboxes: this.getDisplayItems(),
2263
2315
  };
2316
+ const checkboxesPaginatedSearchProps = Object.assign(Object.assign({}, props), { messages: Object.assign(Object.assign({}, this.messages.input.checkbox.sections.search), { showMore: this.messages.input.showMore }), key: SectionKind.SEARCH, limit: (_a = this.paginatedLimits[SectionKind.SEARCH]) !== null && _a !== void 0 ? _a : this.paginatedStep, handleLoadMore: () => this.handlePaginatedLoadMore(SectionKind.SEARCH) });
2264
2317
  return (h("div", { class: "mg-c-input__input-container" }, h("mg-popover", { arrowHide: true, identifier: this.getMgPopoverIdentifier(), display: this.hasOpenedPopover, "onDisplay-change": this.handleMgPopoverDisplayChange, ref: (el) => {
2265
2318
  if (el !== null)
2266
2319
  this.mgPopover = el;
2267
2320
  } }, h("mg-button", { variant: "secondary", "aria-describedby": `${this.identifier}-title` }, h("mg-icon", { icon: "list" }), this.getSelectValuesButtonMessage()), h("div", { slot: "content", class: "mg-c-input__content" }, this.displaySearchInput ? ([
2268
2321
  h("mg-input-text", { key: "input-search", identifier: `${this.identifier}-input-search`, icon: "magnifying-glass", type: "search", placeholder: this.messages.input.checkbox.sections.search.label, label: this.messages.input.checkbox.sections.search.label, mgWidth: "full", value: this.searchValue, labelHide: true, characterLeftHide: true, name: "q", "onValue-change": this.handleSearchChange }),
2269
- this.searchValue.length > 0 ? (h("mg-input-checkbox-paginated", Object.assign({ class: "mg-c-input__tab" }, checkboxPaginatedProps, { messages: Object.assign(Object.assign({}, this.messages.input.checkbox.sections.search), { showMore: this.messages.input.showMore }), checkboxes: checkboxes, key: "search" }))) : (this.renderCheckboxTabs(checkboxes, checkboxPaginatedProps)),
2270
- ]) : (h(MgInputCheckboxList, { checkboxes: checkboxes, id: this.checkboxesId, disabled: this.disabled, name: this.name, invalid: this.invalid })))), this.displaySelectedValues ? (selectedValuesNb > 0 && (h("ul", { role: "list", class: "mg-c-input__input-container-list" }, this.getSelectedItems().map(({ title }) => (h("li", { class: "mg-c-input__input-value", key: title }, title)))))) : (h("b", null, this.messages.input.checkbox[selectedValuesNb > 1 ? 'selectedValues' : 'selectedValue'].replace('{nb}', selectedValuesNb)))));
2322
+ this.searchValue.length > 0 ? h(MgInputCheckboxPaginated, Object.assign({}, checkboxesPaginatedSearchProps)) : this.renderCheckboxTabs(props),
2323
+ ]) : (h(MgInputCheckboxList, Object.assign({}, props, { id: this.checkboxesId, name: this.name, invalid: this.invalid }))))), this.displaySelectedValues ? (selectedValuesNb > 0 && (h("ul", { role: "list", class: "mg-c-input__input-container-list" }, this.getSelectedItems().map(({ title }) => (h("li", { class: "mg-c-input__input-value", key: title }, title)))))) : (h("b", null, this.messages.input.checkbox[selectedValuesNb > 1 ? 'selectedValues' : 'selectedValue'].replace('{nb}', selectedValuesNb)))));
2271
2324
  }
2272
2325
  /**
2273
2326
  * Render
@@ -2285,7 +2338,7 @@ const MgInputCheckbox = class {
2285
2338
  else {
2286
2339
  inputContent = this.renderCheckboxMulti();
2287
2340
  }
2288
- return (h("mg-input", { key: 'c5797a119a653c27004a171b7b79be7d4504800d', label: this.label, identifier: this.identifier, class: this.classCollection.join(), 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));
2341
+ return (h("mg-input", { key: '11b725ebb111707aaf7dc39d191fe6a9efb25ea6', label: this.label, identifier: this.identifier, class: this.classCollection.join(), 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));
2289
2342
  }
2290
2343
  get element() { return getElement(this); }
2291
2344
  static get watchers() { return {
@@ -2327,90 +2380,6 @@ const MgInputCheckbox = class {
2327
2380
  };
2328
2381
  MgInputCheckbox.style = mgInputCheckboxCss();
2329
2382
 
2330
- const MgInputCheckboxPaginated = class {
2331
- constructor(hostRef) {
2332
- registerInstance(this, hostRef);
2333
- this.step = 10;
2334
- /*************
2335
- * Decorators *
2336
- *************/
2337
- /**
2338
- * Define if mg-input-checkbox-list is readonly
2339
- */
2340
- this.readonly = false;
2341
- /**
2342
- * Define if mg-input-checkbox-list is disabled
2343
- */
2344
- this.disabled = false;
2345
- /**
2346
- * Page items limit to display
2347
- */
2348
- this.limit = this.step;
2349
- /***********
2350
- * Methods *
2351
- ***********/
2352
- /**
2353
- * Component has next checkboxes to display
2354
- * @returns truthy if have next elements
2355
- */
2356
- this.hasNext = () => {
2357
- return this.checkboxes.length > this.limit;
2358
- };
2359
- /**
2360
- * Set items from checkboxes and limit
2361
- */
2362
- this.setItems = () => {
2363
- this.items = this.checkboxes.slice(0, this.limit);
2364
- };
2365
- /**
2366
- * Handle load-more <mg-button> click event
2367
- */
2368
- this.handleLoadMore = () => {
2369
- if (this.hasNext()) {
2370
- this.limit += this.step;
2371
- }
2372
- };
2373
- }
2374
- watchCheckboxes() {
2375
- this.setItems();
2376
- }
2377
- watchLimit() {
2378
- this.setItems();
2379
- }
2380
- /**
2381
- * Method to reset limit
2382
- */
2383
- async resetLimit() {
2384
- this.limit = this.step;
2385
- }
2386
- /*************
2387
- * Lifecycle *
2388
- *************/
2389
- /**
2390
- * Validate props
2391
- */
2392
- componentWillLoad() {
2393
- this.watchCheckboxes();
2394
- }
2395
- /**
2396
- * Render
2397
- * @returns HTML Element
2398
- */
2399
- render() {
2400
- const listId = formatID(this.messages.label);
2401
- const tabId = 'tab-info';
2402
- return (h(Host, { key: 'ce0fe4a842cc21f7f981b6a9286d592c2c28819b' }, h("slot", { key: '683c26f98e76262c565613529c76e7f3b27efbc5', name: "header-action" }), h("div", { key: 'eb9e9bfa54a467b44f4e90a8575ae8b1fe40ea10', class: "mg-c-input__tabs-content" }, h("p", { key: '6eeb40f89a0cc0b8ea0837f44babe8cd440ced0f', id: tabId, class: { 'mg-c-input__popover-info': true, 'mg-u-visually-hidden': this.items.length !== 0 }, "aria-live": this.items.length !== 0 ? 'polite' : undefined }, this.items.length === 0 ? this.messages.noValue : this.messages.values.replace('{count}', this.items.length.toString())), this.items.length > 0 && (h(MgInputCheckboxList, { key: '1625b0bdbb1de6ef0c55850e3a08a2cf322da317', checkboxes: this.items, labelledby: tabId, id: listId, disabled: this.disabled, name: this.name, invalid: this.invalid })), this.hasNext() && (h("mg-button", { key: "load-more", variant: "flat", class: "mg-c-input__load-more", tabIndex: -1, "full-width": true, onClick: this.handleLoadMore, "aria-controls": listId }, h("mg-icon", { key: '8f10cc6152899cf869023ff1c465763e9a05d7b6', icon: "chevron-down" }), this.messages.showMore)))));
2403
- }
2404
- static get watchers() { return {
2405
- "checkboxes": [{
2406
- "watchCheckboxes": 0
2407
- }],
2408
- "limit": [{
2409
- "watchLimit": 0
2410
- }]
2411
- }; }
2412
- };
2413
-
2414
2383
  const DEFAULT_MAX_DATE = '9999-12-31';
2415
2384
 
2416
2385
  const mgInputDateCss = () => `.mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);overflow-wrap:anywhere}.mg-c-input__box{height:var(--mg-b-size-min-height);box-sizing:border-box;padding:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-8);border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light);color:var(--mg-b-color-dark);font-family:inherit;font-size:var(--mg-b-font-size);text-align:var(--mg-c-input-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-c-input-placeholder-color-text);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus)}.mg-c-input__box:disabled{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--has-error .mg-c-input__box{border-color:var(--mg-b-color-danger)}.mg-c-input.mg-c-input--is-input-group-append{--mg-c-button-border-radius-top-left:0;--mg-c-button-border-radius-bottom-left:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:calc(-1*var(--mg-b-size-border));border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-c-button-border-radius-top-right:0;--mg-c-button-border-radius-bottom-right:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-c-button-border-right-width:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-c-button-border-radius-top-right:var(--mg-c-input-border-radius);--mg-c-button-border-radius-bottom-right:var(--mg-c-input-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){align-self:start;padding-top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2)}.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container{position:relative}.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container>mg-icon:first-of-type{position:absolute;top:50%;left:var(--mg-b-size-8);color:var(--mg-c-input-color-icon);transform:translateY(-50%)}.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container .mg-c-input__box{padding-left:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2)}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}`;
@@ -2771,7 +2740,7 @@ const MgInputDate = class {
2771
2740
  * @returns HTML Element
2772
2741
  */
2773
2742
  render() {
2774
- return (h("mg-input", { key: '53d23a27355884d3b3ac996188f619ad325d58b6', label: this.label, identifier: this.identifier, class: this.classCollection.join(), 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) => {
2743
+ return (h("mg-input", { key: '0c3e08b8c467207110ef75f7d2516c36adc2ec4c', label: this.label, identifier: this.identifier, class: this.classCollection.join(), 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) => {
2775
2744
  if (el !== null)
2776
2745
  this.input = el;
2777
2746
  } }))));
@@ -3272,7 +3241,7 @@ const MgInputNumeric = class {
3272
3241
  * @returns HTML Element
3273
3242
  */
3274
3243
  render() {
3275
- return (h("mg-input", { key: '4529f67fe43372530d723e8e8a7a6c44f5057bbd', label: this.label, identifier: this.identifier, class: this.classCollection.join(), 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
3244
+ return (h("mg-input", { key: '9bea775c3e8d7339a45d18aeb1b3974d6da9a650', label: this.label, identifier: this.identifier, class: this.classCollection.join(), 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
3276
3245
  ? this.readonlyValue && this.renderReadonly()
3277
3246
  : [
3278
3247
  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) => {
@@ -3576,7 +3545,7 @@ const MgInputPassword = class {
3576
3545
  * @returns HTML Element
3577
3546
  */
3578
3547
  render() {
3579
- return (h("mg-input", { key: '7154d79c2c609f47ae7c9542cffd1c92d26ce383', label: this.label, identifier: this.identifier, class: this.classCollection.join(), 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) => {
3548
+ return (h("mg-input", { key: 'bfa5f289eb4d357c21cd9a753550bab1df846df8', label: this.label, identifier: this.identifier, class: this.classCollection.join(), 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) => {
3580
3549
  if (el !== null)
3581
3550
  this.input = el;
3582
3551
  } }), 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') }))))));
@@ -3893,7 +3862,7 @@ const MgInputRadio = class {
3893
3862
  * @returns HTML Element
3894
3863
  */
3895
3864
  render() {
3896
- return (h("mg-input", { key: 'bdeb5a98bc7f4567beb293c1fcf4f99169089fa6', label: this.label, identifier: this.identifier, class: this.classCollection.join(), 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("div", { class: "mg-c-input__input-group-container" }, this.options.map((input, index) => (h("div", { 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) => {
3865
+ return (h("mg-input", { key: 'a24a80156ef3e7760d02a52900d93099cd570db8', label: this.label, identifier: this.identifier, class: this.classCollection.join(), 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("div", { class: "mg-c-input__input-group-container" }, this.options.map((input, index) => (h("div", { 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) => {
3897
3866
  if (el !== null)
3898
3867
  this.inputs[index] = el;
3899
3868
  } }), h("label", { htmlFor: this.identifier + '_' + index }, input.title))))))));
@@ -4058,11 +4027,19 @@ const MgInputSelect = class {
4058
4027
  }
4059
4028
  };
4060
4029
  /**
4061
- * Method to compare item.title with input.value
4030
+ * Method to compare item with input.value
4062
4031
  * @param item - item to compare with
4063
4032
  * @returns truthy if input.value is an item
4064
4033
  */
4065
- this.isInputValue = (item) => { var _a; return item.title === ((_a = this.input) === null || _a === void 0 ? void 0 : _a.value); };
4034
+ this.isInputValue = (item) => {
4035
+ if (this.input === undefined)
4036
+ return false;
4037
+ // String items keep native DOM values.
4038
+ if (allItemsAreString(this.items))
4039
+ return item.title === this.input.value;
4040
+ // Object items use stringified values.
4041
+ return toString(item.value) === this.input.value;
4042
+ };
4066
4043
  /**
4067
4044
  * Handle blur event
4068
4045
  */
@@ -4107,7 +4084,10 @@ const MgInputSelect = class {
4107
4084
  * @param option - to render
4108
4085
  * @returns render option
4109
4086
  */
4110
- this.renderOption = (option) => (h("option", { key: option.title, value: option.title, selected: JSON.stringify(this.value) === JSON.stringify(option.value), disabled: option.disabled }, option.title));
4087
+ this.renderOption = (option) => {
4088
+ const serializedValue = allItemsAreString(this.items) ? option.title : toString(option.value);
4089
+ return (h("option", { key: serializedValue, value: serializedValue, selected: JSON.stringify(this.value) === JSON.stringify(option.value), disabled: option.disabled }, option.title));
4090
+ };
4111
4091
  }
4112
4092
  validateValue(newValue) {
4113
4093
  setTimeout(() => {
@@ -4301,7 +4281,7 @@ const MgInputSelect = class {
4301
4281
  */
4302
4282
  render() {
4303
4283
  const readonlyValue = this.getReadonlyValue();
4304
- return (h("mg-input", { key: 'ad948f6ed1a8e749ab7b62a198814a40ef99e884', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && readonlyValue === null ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, 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) => {
4284
+ return (h("mg-input", { key: '7d544e8f67a37d5781697da10d3d4f47cc5027e3', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && readonlyValue === null ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, 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) => {
4305
4285
  if (el !== null)
4306
4286
  this.input = el;
4307
4287
  } }, (!this.placeholderHide || !this.valueExist) && ( // In case passed value does not match any option we display the placeholder
@@ -4717,7 +4697,7 @@ const MgInputText = class {
4717
4697
  * @returns HTML Element
4718
4698
  */
4719
4699
  render() {
4720
- return (h("mg-input", { key: 'aa227eef42e7cfcb1ad0c6c2664498674b5cdd47', 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
4700
+ return (h("mg-input", { key: '068e38b82ef4e2254fb8d37f21ecf11dc4f3a012', 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
4721
4701
  ? this.value && this.renderReadonly()
4722
4702
  : [
4723
4703
  h("div", { key: "input", class: "mg-c-input__input-group-container", style: {
@@ -5062,7 +5042,7 @@ const MgInputTextarea = class {
5062
5042
  * @returns HTML Element
5063
5043
  */
5064
5044
  render() {
5065
- return (h("mg-input", { key: '68f259138df7207d7ba16a8f36f3b45e8fb143d0', 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__input-group-container" }, h("textarea", { class: {
5045
+ return (h("mg-input", { key: '021aa902aa952730d98fbc2eaa5136975b484319', 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__input-group-container" }, h("textarea", { class: {
5066
5046
  'mg-c-input__box': true,
5067
5047
  'mg-c-input__box--width': true,
5068
5048
  'mg-c-input__box--resizable': this.resizable === 'both',
@@ -5432,7 +5412,7 @@ const MgInputToggle = class {
5432
5412
  */
5433
5413
  render() {
5434
5414
  const currentOption = this.options[this.getCurrentOptionIndex(this.value)];
5435
- return (h("mg-input", { key: '834a0b0713019490b91d799ac9688661f930de43', label: this.label, helpText: this.helpText, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: undefined, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, errorMessage: this.errorMessage }, this.readonly ? (currentOption && h("b", { class: "mg-c-input__readonly-value" }, currentOption.title)) : (h("button", { type: "button", role: "switch", "aria-checked": this.isChecked(this.value).toString(), "aria-readonly": this.disabled || this.readonly, id: this.identifier, class: "mg-c-input__button-toggle", disabled: this.disabled || this.readonly, onClick: this.handleSwitchButton, ref: el => {
5415
+ return (h("mg-input", { key: '3f440a16156b4fc89590addba025b350218ccf9c', label: this.label, helpText: this.helpText, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: undefined, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, errorMessage: this.errorMessage }, this.readonly ? (currentOption && h("b", { class: "mg-c-input__readonly-value" }, currentOption.title)) : (h("button", { type: "button", role: "switch", "aria-checked": this.isChecked(this.value).toString(), "aria-readonly": this.disabled || this.readonly, id: this.identifier, class: "mg-c-input__button-toggle", disabled: this.disabled || this.readonly, onClick: this.handleSwitchButton, ref: el => {
5436
5416
  if (el !== null)
5437
5417
  this.button = el;
5438
5418
  } }, 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" }))))));
@@ -5782,7 +5762,7 @@ const MgMenu = class {
5782
5762
  * @returns HTML Element
5783
5763
  */
5784
5764
  render() {
5785
- return (h(Host, { key: '17b5111014e866939f58170452ca74ee40c8454c', role: "list", "aria-label": this.label }, h("slot", { key: '7c2a9aafccbc7526c74acaf7a505d7a33befc5ad' })));
5765
+ return (h(Host, { key: 'c16a69485fabb9a7a91efe032501fafa98862882', role: "list", "aria-label": this.label }, h("slot", { key: 'f5bca6fdb93d9273e5fcc753d2c58c0a0504c0d0' })));
5786
5766
  }
5787
5767
  get element() { return getElement(this); }
5788
5768
  static get watchers() { return {
@@ -6294,9 +6274,9 @@ const MgMessage = class {
6294
6274
  * @returns HTML Element
6295
6275
  */
6296
6276
  render() {
6297
- return (h("div", { key: '516691c613b30edf92d43fb9596169459dd8058a', class: this.classCollection.join() }, h("mg-card", { key: '2be929dd6ed5458927b155d2f4c94fa15f9717e9', shadow: true }, this.variantStyle === 'bar-left' && h("span", { key: '604d5a7bd37abc571b40f8be09ac5dadbde69ec1', class: "mg-c-message__bar" }), h("span", { key: '837cce7c506997955de6efb4cffc53e5107fb602', class: "mg-c-message__icon" }, h("mg-icon", { key: '3fd70f747cad5605f129bec491aa1bfd5ea42a95', icon: this.getIcon() })), h("div", { key: 'bf0b166fee2c94014fc35980b06a45dfc91b8596', class: "mg-c-message__content" }, h("span", { key: '305f79545b87055a954831c7355e7685340d1aa6', class: "mg-c-message__content-slot" }, h("slot", { key: 'd25113f6305d8ceaa39d12672fecc4e4bf6ffb49' })), this.hasActions && [
6277
+ return (h("div", { key: 'f99bf527eb2c6005eeaec11f89aaa08f8865ea57', class: this.classCollection.join() }, h("mg-card", { key: 'beede3cd97b022d947c216b6bba454a104ba5790', shadow: true }, this.variantStyle === 'bar-left' && h("span", { key: '515828d725a996c9d57b39ad75e9373150a1b78a', class: "mg-c-message__bar" }), h("span", { key: '02ae41c66af25c2611b9b6cb8c87a1ad99346fa3', class: "mg-c-message__icon" }, h("mg-icon", { key: '3eadb40ed0dfa5ec51155608a67769c5fee3d402', icon: this.getIcon() })), h("div", { key: 'b832251e8f330d00b512bcd508ae9bf6e5f511cb', class: "mg-c-message__content" }, h("span", { key: 'c3520fc49bd5c3c187a83823050ceb9ca8c12d46', class: "mg-c-message__content-slot" }, h("slot", { key: 'f4064dff9536cbb76e45c5c4c1a89621da9531b2' })), this.hasActions && [
6298
6278
  h("span", { class: "mg-c-message__content-separator", key: "content-separator" }),
6299
- h("span", { class: "mg-c-message__content-actions-slot", key: "content-actions-slot" }, h("slot", { key: '744098ecfdcc8bb5f5e0b913884126498c21d3f0', name: "actions" })),
6279
+ h("span", { class: "mg-c-message__content-actions-slot", key: "content-actions-slot" }, h("slot", { key: '5585f7c14c2c3896cfdb5319414cd82f4d4b3a8b', name: "actions" })),
6300
6280
  ]))));
6301
6281
  }
6302
6282
  get element() { return getElement(this); }
@@ -6422,11 +6402,11 @@ const MgModal = class {
6422
6402
  * @returns HTML Element
6423
6403
  */
6424
6404
  render() {
6425
- return (h("dialog", { key: 'fe7c7abaf53fbc5c87d2855cc72de2212dfe8642', role: this.dialogRole, id: this.identifier, class: this.classCollection.join(), "aria-labelledby": this.titleId, ref: (el) => {
6405
+ return (h("dialog", { key: '2d99322fd3c80b8cbfea70589cf579e0c1c6f06b', role: this.dialogRole, id: this.identifier, class: this.classCollection.join(), "aria-labelledby": this.titleId, ref: (el) => {
6426
6406
  if (el !== null) {
6427
6407
  this.dialog = el;
6428
6408
  }
6429
- } }, h("mg-card", { key: '4b361ad45cd0b20253cf82e8f68c574429dd451c', shadow: true }, h("div", { key: '90f5490fb82f2900403f0a7549b338e884eea171', class: "mg-c-modal__dialog" }, h("header", { key: 'a58be90f41ad4448c387b1d18372aa31522d8d35', class: "mg-c-modal__header" }, this.closeButton && (h("span", { key: 'd9a0f9c1944b89b4a64f35fc9c1b70bea60f5423', class: "mg-c-modal__close-button" }, h("mg-button", { key: 'd7ecae6a2c2b2b094fea6b4a6d3c761f0f975b29', "is-icon": true, variant: "flat", label: this.messages.modal.closeButton, onClick: this.handleClose }, h("mg-icon", { key: '54b91decfd0deb5e452e03c23f68bac58d97677a', icon: "cross" })))), h("h1", { key: '7dc2519bdf97ebc5cc18505fbbd347c7b1a4c336', class: "mg-c-modal__title", id: this.titleId }, this.modalTitle)), h("article", { key: 'b6a27c0bb6e5a350e10addbd0325b04626b07239', class: "mg-c-modal__content" }, h("slot", { key: '41acebdafae6289d2f03fc3226eb7f3c4334e33f' })), this.hasActions && (h("footer", { key: '04a934a044bfbfa64f65642361e1962d2f599bf9', class: "mg-c-modal__footer" }, h("slot", { key: '8d72488a4095c245b638d7d0e5fdbda77fa5ab01', name: "actions" })))))));
6409
+ } }, h("mg-card", { key: '32692a6d41ef30b3d3e61ddcfea47350d374ed09', shadow: true }, h("div", { key: 'c87bb43bb069671b65a9759ee293e77975707597', class: "mg-c-modal__dialog" }, h("header", { key: '1272a946878efcf8c69f3b09852ba6938cbe31b0', class: "mg-c-modal__header" }, this.closeButton && (h("span", { key: '0704656c7c5ac4c8d405f2cd673e91f72763ee8f', class: "mg-c-modal__close-button" }, h("mg-button", { key: '4402971c763ee34145de5bd69d367fde68f9d1a2', "is-icon": true, variant: "flat", label: this.messages.modal.closeButton, onClick: this.handleClose }, h("mg-icon", { key: '9e16add6a3e387971507a252671c895b6c94a586', icon: "cross" })))), h("h1", { key: '3e4fc2b4419398528565d382b728b8b752758ddd', class: "mg-c-modal__title", id: this.titleId }, this.modalTitle)), h("article", { key: '170ff6bd9592687baa4c561615f540ad1c7400e4', class: "mg-c-modal__content" }, h("slot", { key: 'cb710e2a57e4c997deac367169b56047af1200b1' })), this.hasActions && (h("footer", { key: '1e08d67caeaaaf75eb97faa11528719ea537c24c', class: "mg-c-modal__footer" }, h("slot", { key: '461ec8e4117477aef08dc6d346ad0bf6007ec12d', name: "actions" })))))));
6430
6410
  }
6431
6411
  get element() { return getElement(this); }
6432
6412
  static get watchers() { return {
@@ -6838,7 +6818,7 @@ const MgPanel = class {
6838
6818
  */
6839
6819
  render() {
6840
6820
  const headerId = `${this.identifier}-header`;
6841
- return (h("section", { key: 'e92b270e15717a1b6ab7d938674ccd785fe3ee97', class: this.classCollection.join(), id: this.identifier }, h("mg-card", { key: '40647ea277463f5e915c2fb5aa982f22527545ea', shadow: this.shadow }, h("header", { key: '604611af47d683cf1f0d3ffc8b5873be390e3fb9', class: { 'mg-c-panel__header': true, 'mg-c-panel__header--reverse': this.titlePosition === 'right' }, id: headerId }, this.renderHeaderChildren()), h("article", { key: 'ff640071dd4813aa113f5928b2a0350f4528a22c', class: "mg-c-panel__content", id: `${this.identifier}-content`, "aria-labelledby": headerId, hidden: !this.expanded }, h("slot", { key: 'fe54d2ca332c573e8dfa782a3e72454501b47adf' })))));
6821
+ return (h("section", { key: '3662204d763051c34ea13de4b7b3f7abc7914b81', class: this.classCollection.join(), id: this.identifier }, h("mg-card", { key: '46f113258172b1d040f65a4d312554b0c0551489', shadow: this.shadow }, h("header", { key: '1d7e7a48a5c4f89d141a5a7e46b220d4f9c082a5', class: { 'mg-c-panel__header': true, 'mg-c-panel__header--reverse': this.titlePosition === 'right' }, id: headerId }, this.renderHeaderChildren()), h("article", { key: 'ab0aec831cc79d982b7556d6e245c80ae2979083', class: "mg-c-panel__content", id: `${this.identifier}-content`, "aria-labelledby": headerId, hidden: !this.expanded }, h("slot", { key: 'e831573fe9d5ff783073d123b7e2a54baad73bfc' })))));
6842
6822
  }
6843
6823
  get element() { return getElement(this); }
6844
6824
  static get watchers() { return {
@@ -8900,7 +8880,7 @@ const MgPopover = class {
8900
8880
  * @returns HTML Element
8901
8881
  */
8902
8882
  render() {
8903
- return (h(Host, { key: '530971c84be3edae39c5aed0013d0c5b9005a1c1' }, h("slot", { key: '6e717bc8c5aa3d58fc048c4232e706cc78ab66ec' }), h("slot", { key: 'e779db01e55a28ffaedde21e9944f5ef3c79fa29', name: "content" })));
8883
+ return (h(Host, { key: '2c1506b8e2da100519aeeae75fc5c378a81c473c' }, h("slot", { key: 'f9aea885e8cbc168614c05761829f0a0740eba9e' }), h("slot", { key: 'fa6106a660a73b3761d4783f8d46d401c47b4eb6', name: "content" })));
8904
8884
  }
8905
8885
  get element() { return getElement(this); }
8906
8886
  static get watchers() { return {
@@ -8966,7 +8946,7 @@ const MgPopoverContent = class {
8966
8946
  * @returns HTML Element
8967
8947
  */
8968
8948
  render() {
8969
- return (h(Host, { key: '56962c792e0015e1b52f8121914829b7da136283' }, h("mg-card", { key: '05b557704fd10e1be87e1931fe672f5c29d3afc4', class: this.classCollection.join(), shadow: true }, this.closeButton && (h("mg-button", { key: 'd2fc38c5be7ea92d0d0efc36133d6c683baa4e68', "is-icon": true, variant: "flat", label: this.messages.general.close, onClick: this.handleCloseButton }, h("mg-icon", { key: '5d2091d064f3908a291af3b90acaddc59e2b9268', icon: "cross" }))), h("div", { key: 'd599231cfe330cdbc73f4bf7553b2cc66baf4889', class: "mg-c-popover-content__title" }, h("slot", { key: 'fbb836bac9d9f5f2327ecba13ddc3b1cab974930', name: "title" })), h("slot", { key: 'bdb29d255f35931efa24be57c13c4303ba326778', name: "content" })), h("slot", { key: 'b09b667ea04096baaeac07fac9097a3a22335f2b', name: "arrow" })));
8949
+ return (h(Host, { key: '054fc82954b39a488f7fe5cb391d89b5fa4a61fe' }, h("mg-card", { key: 'bb89bada37069b50295bd93d988667c3b85eada3', class: this.classCollection.join(), shadow: true }, this.closeButton && (h("mg-button", { key: 'a59d6610574b964be1e2ce34ccd8e31c1395b6ff', "is-icon": true, variant: "flat", label: this.messages.general.close, onClick: this.handleCloseButton }, h("mg-icon", { key: '5bcc9e4eb21396f4fc66a6f1e4d6c5cdf68ec1f4', icon: "cross" }))), h("div", { key: '57be2022f3b61220e1249faeaf2acee9960027fe', class: "mg-c-popover-content__title" }, h("slot", { key: 'c7870e86a9f105cf6b9d4520c77874bce9235d72', name: "title" })), h("slot", { key: '5af8462232625d9c7d694bab46351d5e646f62ca', name: "content" })), h("slot", { key: '599863410dd7d751e82c440cd6c4fb7f2c48d9f3', name: "arrow" })));
8970
8950
  }
8971
8951
  get element() { return getElement(this); }
8972
8952
  };
@@ -9011,7 +8991,7 @@ const MgSkipLinks = class {
9011
8991
  * @returns HTML Element
9012
8992
  */
9013
8993
  render() {
9014
- return (h("nav", { key: 'b126d6fe3aa2553562fe18a0d4340205e178fbe0', class: "mg-c-skip-links", role: "navigation", "aria-label": this.messages.skipLinks.navLabel }, h("ul", { key: '1028704238d5119f67cf2e7a77282dec504bbc4f', class: "mg-c-skip-links__list", role: "list" }, this.links.map(link => (h("li", { key: link.href }, h("a", { class: "mg-c-skip-links__link", href: link.href, onClick: this.handleLinkCLick }, link.label)))))));
8994
+ return (h("nav", { key: '5bf4427662bdca6512969bee91aa03f43a126743', class: "mg-c-skip-links", role: "navigation", "aria-label": this.messages.skipLinks.navLabel }, h("ul", { key: '1d2b2a56b3960f70a3d37b333c77bf686643e0fd', class: "mg-c-skip-links__list", role: "list" }, this.links.map(link => (h("li", { key: link.href }, h("a", { class: "mg-c-skip-links__link", href: link.href, onClick: this.handleLinkCLick }, link.label)))))));
9015
8995
  }
9016
8996
  get element() { return getElement(this); }
9017
8997
  static get watchers() { return {
@@ -9545,7 +9525,7 @@ const MgTabs = class {
9545
9525
  * @returns HTML Element
9546
9526
  */
9547
9527
  render() {
9548
- return (h("div", { key: 'c971ca94267dd64a173740d9d7a81c0ea00852b9', class: this.classCollection.join() }, h("header", { key: 'd160fdca50842a310fe2b710f8ffcc6f7cd1bd3d', role: "tablist", "aria-label": this.label, class: "mg-c-tabs__header" }, this.tabs.map((tab, index) => (h("button", { key: tab.label, role: "tab", id: this.getElementId(this.identifier, index), class: {
9528
+ return (h("div", { key: 'c58c255ddffc83ad6d911d37f626bcadaea61747', class: this.classCollection.join() }, h("header", { key: 'ba6d581a4a8bc4338d6341372c267a28df882113', role: "tablist", "aria-label": this.label, class: "mg-c-tabs__header" }, this.tabs.map((tab, index) => (h("button", { key: tab.label, role: "tab", id: this.getElementId(this.identifier, index), class: {
9549
9529
  [`${this.buttonTabBaseClass}`]: true,
9550
9530
  [`${this.buttonTabBaseClass}--horizontal`]: true,
9551
9531
  [`${this.getNavigationButtonClass(Status.ACTIVE)}`]: this.tabHasStatus(tab, Status.ACTIVE),
@@ -10084,4 +10064,4 @@ const MgTooltipContent = class {
10084
10064
  };
10085
10065
  MgTooltipContent.style = mgTooltipContentCss();
10086
10066
 
10087
- export { MgActionMore as mg_action_more, MgBadge as mg_badge, MgButton as mg_button, MgCard as mg_card, MgCharacterLeft as mg_character_left, MgDetails as mg_details, MgDivider as mg_divider, MgForm as mg_form, MgIcon as mg_icon, MgIllustratedMessage as mg_illustrated_message, MgInput as mg_input, MgInputCheckbox as mg_input_checkbox, MgInputCheckboxPaginated as mg_input_checkbox_paginated, MgInputDate as mg_input_date, MgInputNumeric as mg_input_numeric, MgInputPassword as mg_input_password, MgInputRadio as mg_input_radio, MgInputSelect as mg_input_select, MgInputText as mg_input_text, MgInputTextarea as mg_input_textarea, MgInputTitle as mg_input_title, MgInputToggle as mg_input_toggle, MgItemMore as mg_item_more, MgMenu as mg_menu, MgMenuItem as mg_menu_item, MgMessage as mg_message, MgModal as mg_modal, MgPagination as mg_pagination, MgPanel as mg_panel, MgPopover as mg_popover, MgPopoverContent as mg_popover_content, MgSkipLinks as mg_skip_links, MgTable as mg_table, MgTabs as mg_tabs, MgTag as mg_tag, MgTooltip as mg_tooltip, MgTooltipContent as mg_tooltip_content };
10067
+ export { MgActionMore as mg_action_more, MgBadge as mg_badge, MgButton as mg_button, MgCard as mg_card, MgCharacterLeft as mg_character_left, MgDetails as mg_details, MgDivider as mg_divider, MgForm as mg_form, MgIcon as mg_icon, MgIllustratedMessage as mg_illustrated_message, MgInput as mg_input, MgInputCheckbox as mg_input_checkbox, MgInputDate as mg_input_date, MgInputNumeric as mg_input_numeric, MgInputPassword as mg_input_password, MgInputRadio as mg_input_radio, MgInputSelect as mg_input_select, MgInputText as mg_input_text, MgInputTextarea as mg_input_textarea, MgInputTitle as mg_input_title, MgInputToggle as mg_input_toggle, MgItemMore as mg_item_more, MgMenu as mg_menu, MgMenuItem as mg_menu_item, MgMessage as mg_message, MgModal as mg_modal, MgPagination as mg_pagination, MgPanel as mg_panel, MgPopover as mg_popover, MgPopoverContent as mg_popover_content, MgSkipLinks as mg_skip_links, MgTable as mg_table, MgTabs as mg_tabs, MgTag as mg_tag, MgTooltip as mg_tooltip, MgTooltipContent as mg_tooltip_content };
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, f as forceUpdate, h, a as getElement } from './index-DFwaH2hS.js';
1
+ import { r as registerInstance, c as createEvent, f as forceUpdate, h, a as getElement } from './index-C3jUhxdI.js';
2
2
  import { C as ClassList, t as toString } from './index-C7xjtdiw.js';
3
3
  import { i as initLocales } from './index-DSEloqPn.js';
4
4
 
@@ -153,7 +153,7 @@ const MgAlert = class {
153
153
  * @returns HTML Element
154
154
  */
155
155
  render() {
156
- return (h("mg-message", { key: '6085a45d00c4762bae88d98e89f44c20d5f9b6c4', class: this.classCollection.join(), role: ['info', 'success'].includes(this.variant) ? 'status' : 'alert', variant: this.variant, variantStyle: this.variantStyle }, h("slot", { key: '55491d1b41609883958680c14a2ddb8dd84a3bd4' }), this.hasActions ? (h("span", { slot: "actions" }, h("slot", { name: "actions" }))) : (h("span", { class: "mg-c-alert__close-button" }, h("mg-button", { "is-icon": true, variant: "flat", label: this.messages.alert.closeButton, onClick: this.handleClose }, h("mg-icon", { icon: "cross" }))))));
156
+ return (h("mg-message", { key: '9041d8643bf4d0d44f20d30ac3c1d9aa46d6e060', class: this.classCollection.join(), role: ['info', 'success'].includes(this.variant) ? 'status' : 'alert', variant: this.variant, variantStyle: this.variantStyle }, h("slot", { key: '94d1a430e9af605fa2ea2b557e82fc15f1cc148b' }), this.hasActions ? (h("span", { slot: "actions" }, h("slot", { name: "actions" }))) : (h("span", { class: "mg-c-alert__close-button" }, h("mg-button", { "is-icon": true, variant: "flat", label: this.messages.alert.closeButton, onClick: this.handleClose }, h("mg-icon", { icon: "cross" }))))));
157
157
  }
158
158
  get element() { return getElement(this); }
159
159
  static get watchers() { return {
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, a as getElement } from './index-DFwaH2hS.js';
1
+ import { r as registerInstance, h, a as getElement } from './index-C3jUhxdI.js';
2
2
  import { i as initLocales } from './index-DSEloqPn.js';
3
3
  import { t as toString, i as isValidString } from './index-C7xjtdiw.js';
4
4
 
@@ -44,7 +44,7 @@ const MgBreadcrumb = class {
44
44
  this.messages = initLocales(this.element).messages.breadcrumb;
45
45
  }
46
46
  render() {
47
- return (h("nav", { key: '5181512072a7de6e161adcbb9988ae3407f61301', "aria-label": this.messages.label, class: "mg-c-breadcrumb" }, h("ol", { key: '2a4cec366a72027091ebcbccd78d552884005b93', class: "mg-c-breadcrumb__list" }, this.items.map((item, index) => {
47
+ return (h("nav", { key: 'af5c541e6a268af67762eb9d384269511fe0be17', "aria-label": this.messages.label, class: "mg-c-breadcrumb" }, h("ol", { key: 'b5fdfe61eb2c826b3462bdd65cacfb73d4f00484', class: "mg-c-breadcrumb__list" }, this.items.map((item, index) => {
48
48
  var _a;
49
49
  return (h("li", { key: `${index}-${(_a = item.href) !== null && _a !== void 0 ? _a : item.label}`, class: "mg-c-breadcrumb__list-item" }, this.renderItem(item, index === this.items.length - 1)));
50
50
  }))));