@mgdis/mg-components 6.14.0 → 6.15.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 (150) hide show
  1. package/dist/cjs/{index-DzBkSgSK.js → index-BGxkpQwi.js} +7 -1
  2. package/dist/cjs/{index-DUJwxnoi.js → index-CpENFzEo.js} +2 -2
  3. package/dist/cjs/{index-CwjAofQ1.js → index-iUZvsp-F.js} +55 -31
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/mg-action-more_37.cjs.entry.js +431 -208
  6. package/dist/cjs/mg-alert.cjs.entry.js +4 -4
  7. package/dist/cjs/mg-components.cjs.js +3 -3
  8. package/dist/cjs/mg-input-combobox.cjs.entry.js +145 -81
  9. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +1248 -16004
  10. package/dist/cjs/{mg-input.conf-WTsvDfpC.js → mg-input.conf-CwjEAih3.js} +7 -0
  11. package/dist/cjs/mg-input.utils-D-ASK4ua.js +49 -0
  12. package/dist/cjs/mg-loader.cjs.entry.js +4 -4
  13. package/dist/cjs/mg-progress.cjs.entry.js +3 -3
  14. package/dist/collection/assets/icons/index.js +1 -1
  15. package/dist/collection/collection-manifest.json +2 -2
  16. package/dist/collection/components/atoms/mg-icon/mg-icon.js +1 -1
  17. package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js +6 -0
  18. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +93 -22
  19. package/dist/collection/components/molecules/inputs/mg-input/mg-input.utils.js +21 -0
  20. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +2 -1
  21. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +49 -106
  22. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +123 -48
  23. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +140 -56
  24. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +1 -1
  25. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +6 -1
  26. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +1 -1
  27. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +63 -10
  28. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +1 -1
  29. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +54 -6
  30. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +2 -2
  31. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -1
  32. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +142 -9
  33. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +1 -1
  34. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +2 -2
  35. package/dist/collection/components/molecules/mg-alert/mg-alert.js +1 -1
  36. package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
  37. package/dist/collection/components/molecules/mg-form/mg-form.js +1 -1
  38. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +1 -1
  39. package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
  40. package/dist/collection/components/molecules/mg-message/mg-message.js +2 -2
  41. package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
  42. package/dist/collection/components/molecules/mg-panel/mg-panel.js +1 -1
  43. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
  44. package/dist/collection/components/molecules/mg-popover/mg-popover.js +1 -1
  45. package/dist/collection/components/molecules/mg-progress/mg-progress.js +1 -1
  46. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
  47. package/dist/collection/components/molecules/mg-table/mg-table.js +2 -2
  48. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
  49. package/dist/collection/locales/en/messages.json +23 -14
  50. package/dist/collection/locales/fr/messages.json +24 -15
  51. package/dist/components/index2.js +3 -3
  52. package/dist/components/index3.js +55 -31
  53. package/dist/components/mg-action-more.js +2 -2
  54. package/dist/components/mg-alert.js +2 -2
  55. package/dist/components/mg-badge2.js +1 -1
  56. package/dist/components/mg-button2.js +1 -1
  57. package/dist/components/mg-card2.js +1 -1
  58. package/dist/components/mg-character-left2.js +1 -1
  59. package/dist/components/mg-details.js +1 -97
  60. package/dist/components/mg-details2.js +99 -0
  61. package/dist/components/mg-divider2.js +1 -1
  62. package/dist/components/mg-form.js +2 -2
  63. package/dist/components/mg-icon2.js +1 -1
  64. package/dist/components/mg-illustrated-message.js +2 -2
  65. package/dist/components/mg-input-checkbox-paginated2.js +43 -124
  66. package/dist/components/mg-input-checkbox.js +136 -62
  67. package/dist/components/mg-input-combobox.js +135 -63
  68. package/dist/components/mg-input-date.js +9 -3
  69. package/dist/components/mg-input-numeric.js +14 -3
  70. package/dist/components/mg-input-password.js +10 -4
  71. package/dist/components/mg-input-radio.js +54 -13
  72. package/dist/components/mg-input-rich-text-editor.js +1266 -16016
  73. package/dist/components/mg-input-select2.js +45 -9
  74. package/dist/components/mg-input-text2.js +10 -4
  75. package/dist/components/mg-input-textarea.js +10 -4
  76. package/dist/components/mg-input-title2.js +1 -1
  77. package/dist/components/mg-input-toggle.js +97 -12
  78. package/dist/components/mg-input.utils.js +24 -0
  79. package/dist/components/mg-input2.js +100 -23
  80. package/dist/components/mg-item-more2.js +2 -2
  81. package/dist/components/mg-loader2.js +2 -2
  82. package/dist/components/mg-menu-item2.js +1 -1
  83. package/dist/components/mg-message2.js +3 -3
  84. package/dist/components/mg-modal.js +3 -3
  85. package/dist/components/mg-pagination.js +233 -1
  86. package/dist/components/mg-panel.js +14 -8
  87. package/dist/components/mg-popover-content2.js +2 -2
  88. package/dist/components/mg-popover2.js +2 -2
  89. package/dist/components/mg-progress.js +2 -2
  90. package/dist/components/mg-skip-links.js +2 -2
  91. package/dist/components/mg-table.js +3 -3
  92. package/dist/components/mg-tabs.js +1 -311
  93. package/dist/components/mg-tabs2.js +313 -0
  94. package/dist/components/mg-tag.js +1 -1
  95. package/dist/components/mg-tooltip-content2.js +1 -1
  96. package/dist/components/mg-tooltip2.js +2 -2
  97. package/dist/esm/{index-Bv7NHR-W.js → index-CKB-AnCZ.js} +55 -31
  98. package/dist/esm/{index-Degtjvph.js → index-DhAOnZJn.js} +7 -1
  99. package/dist/esm/{index-Dr7GYvIz.js → index-WtiuOkLj.js} +2 -2
  100. package/dist/esm/loader.js +3 -3
  101. package/dist/esm/mg-action-more_37.entry.js +426 -203
  102. package/dist/esm/mg-alert.entry.js +4 -4
  103. package/dist/esm/mg-components.js +4 -4
  104. package/dist/esm/mg-input-combobox.entry.js +125 -61
  105. package/dist/esm/mg-input-rich-text-editor.entry.js +1249 -16005
  106. package/dist/esm/{mg-input.conf-CNgv8hc5.js → mg-input.conf-BAUTlb6r.js} +7 -1
  107. package/dist/esm/mg-input.utils-BYI03zSi.js +46 -0
  108. package/dist/esm/mg-loader.entry.js +4 -4
  109. package/dist/esm/mg-progress.entry.js +3 -3
  110. package/dist/mg-components/locales/en/messages.json +23 -14
  111. package/dist/mg-components/locales/fr/messages.json +24 -15
  112. package/dist/mg-components/mg-components.esm.js +1 -1
  113. package/dist/mg-components/p-31856cff.entry.js +1 -0
  114. package/dist/mg-components/{p-056ba467.entry.js → p-420daa1e.entry.js} +1 -1
  115. package/dist/mg-components/{p-d13a6fdc.entry.js → p-47e19783.entry.js} +1 -1
  116. package/dist/mg-components/p-67af6274.entry.js +1 -0
  117. package/dist/mg-components/p-698dfc6c.entry.js +1 -0
  118. package/dist/mg-components/p-BAUTlb6r.js +1 -0
  119. package/dist/mg-components/p-CKB-AnCZ.js +1 -0
  120. package/dist/mg-components/p-DhAOnZJn.js +2 -0
  121. package/dist/mg-components/p-PuX-pdL4.js +1 -0
  122. package/dist/mg-components/p-WtiuOkLj.js +1 -0
  123. package/dist/mg-components/p-a0fa44cf.entry.js +1 -0
  124. package/dist/types/assets/icons/index.d.ts +6 -0
  125. package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +13 -0
  126. package/dist/types/components/molecules/inputs/mg-input/mg-input.d.ts +15 -4
  127. package/dist/types/components/molecules/inputs/mg-input/mg-input.utils.d.ts +8 -0
  128. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +17 -40
  129. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +1 -2
  130. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +36 -9
  131. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +17 -3
  132. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +18 -0
  133. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +18 -0
  134. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +40 -4
  135. package/dist/types/components.d.ts +69 -40
  136. package/ide/intellij/web-types.json +148 -22
  137. package/ide/vscode/html-custom-data.json +143 -9
  138. package/package.json +15 -15
  139. package/dist/cjs/events.utils-D5SAtkpQ.js +0 -25
  140. package/dist/components/mg-pagination2.js +0 -229
  141. package/dist/esm/events.utils-yMGqY8YG.js +0 -23
  142. package/dist/mg-components/p-625c463c.entry.js +0 -1
  143. package/dist/mg-components/p-Bv7NHR-W.js +0 -1
  144. package/dist/mg-components/p-CNgv8hc5.js +0 -1
  145. package/dist/mg-components/p-Degtjvph.js +0 -2
  146. package/dist/mg-components/p-Dr7GYvIz.js +0 -1
  147. package/dist/mg-components/p-c522f3c1.entry.js +0 -1
  148. package/dist/mg-components/p-cac23bd7.entry.js +0 -1
  149. package/dist/mg-components/p-e75f5383.entry.js +0 -10
  150. package/dist/mg-components/p-yMGqY8YG.js +0 -1
@@ -53,11 +53,11 @@ const MgPopoverContent = /*@__PURE__*/ proxyCustomElement(class MgPopoverContent
53
53
  * @returns HTML Element
54
54
  */
55
55
  render() {
56
- return (h(Host, { key: 'c87fe52d52b80954170963fd1378b3a05313f9c6' }, h("mg-card", { key: 'a38755a5a7055d4bd4166531326b1be245d2906f', class: this.classCollection.join(), shadow: true }, this.closeButton && (h("mg-button", { key: '823e99beb15aa19f6f2f7cee2c5e1088cc116425', "is-icon": true, variant: "flat", label: this.messages.general.close, onClick: this.handleCloseButton }, h("mg-icon", { key: '70daf81e59533585b6a051a6d97539a75833432e', icon: "cross" }))), h("div", { key: 'cccf70c8fba6906e6724629642383fad0c98656e', class: "mg-c-popover-content__title" }, h("slot", { key: 'b05acb47b32d27d1629d39451e4a786d2f404406', name: "title" })), h("slot", { key: '40de167b1fb77c7d8fc557f60cf176c0991e991d', name: "content" })), h("slot", { key: 'c6c1305d5ff51d2af0d56b1199731cd41645c99d', name: "arrow" })));
56
+ return (h(Host, { key: '2746e72f636c1a702d2b15836343ca8503f233e5' }, h("mg-card", { key: '84e28550627969d4e15ded5a5f8b6d19584eb891', class: this.classCollection.join(), shadow: true }, this.closeButton && (h("mg-button", { key: 'f25c773593441597e81330997df3175cd9a963e4', "is-icon": true, variant: "flat", label: this.messages.general.close, onClick: this.handleCloseButton }, h("mg-icon", { key: '723f3d1e8a85356d7aa9be9c875b273d7c9c1f72', icon: "cross" }))), h("div", { key: '283316f2a66212d9afc128aaec3fb24e4a40c0eb', class: "mg-c-popover-content__title" }, h("slot", { key: 'a1839a9a3259ccb221b90e82f786eb0e7c3d2a19', name: "title" })), h("slot", { key: '708903013417e27f4a9ed9811fde886d6b697dec', name: "content" })), h("slot", { key: 'fad6024a2474ffd5f46925101baa0e6ab9f2e951', name: "arrow" })));
57
57
  }
58
58
  get element() { return this; }
59
59
  static get style() { return mgPopoverContentCss; }
60
- }, [1, "mg-popover-content", {
60
+ }, [257, "mg-popover-content", {
61
61
  "closeButton": [4, "close-button"],
62
62
  "classCollection": [32]
63
63
  }]);
@@ -249,7 +249,7 @@ const MgPopover = /*@__PURE__*/ proxyCustomElement(class MgPopover extends HTMLE
249
249
  * @returns HTML Element
250
250
  */
251
251
  render() {
252
- return (h(Host, { key: 'c25d773831395cf154f85cda3be67af22d6d8767' }, h("slot", { key: 'c6fb5897222e527cc36c78e1f32aaadc4d3c4b01' }), h("slot", { key: 'd7f682fdf78caa8491b8e9a74e6d5e91dbf5ef84', name: "content" })));
252
+ return (h(Host, { key: '7ea28f19a5a61f6191c2aece439e85da8f067270' }, h("slot", { key: 'aa6a627b90246ca327e2971329ab58b02eeb1d04' }), h("slot", { key: '1851353a6b4de659d6027a0bf3ba5f2120f7137d', name: "content" })));
253
253
  }
254
254
  get element() { return this; }
255
255
  static get watchers() { return {
@@ -259,7 +259,7 @@ const MgPopover = /*@__PURE__*/ proxyCustomElement(class MgPopover extends HTMLE
259
259
  "display": ["handleDisplay"]
260
260
  }; }
261
261
  static get style() { return mgPopoverCss; }
262
- }, [1, "mg-popover", {
262
+ }, [257, "mg-popover", {
263
263
  "identifier": [1],
264
264
  "placement": [1],
265
265
  "arrowHide": [4, "arrow-hide"],
@@ -75,7 +75,7 @@ const MgProgress$1 = /*@__PURE__*/ proxyCustomElement(class MgProgress extends H
75
75
  * @returns HTML Element
76
76
  */
77
77
  render() {
78
- return (h(Host, { key: 'e6d254a68f35c5019158ab17fcb0e4dfd1943ef8', role: this.ariaRole, "aria-label": this.label, "aria-valuenow": this.value, "aria-valuemin": this.min, "aria-valuemax": this.max }, h("div", { key: '5b427579ad97336076504a45013a0be00673f9a9', class: "mg-c-progress" }, h("div", { key: '76dbdf88550caf51890e10c45c034d73cd02db5d', class: { 'mg-c-progress__bar': true, 'mg-c-progress__bar--active': this.value > this.min } }, h("div", { key: 'b0ab6f784cdb8cc25a40b83a0d97bcda5b5c1f9b', class: "mg-c-progress__fill", style: {
78
+ return (h(Host, { key: '62c66dbd93249bfde3eb8ff449b49884edfe49c3', role: this.ariaRole, "aria-label": this.label, "aria-valuenow": this.value, "aria-valuemin": this.min, "aria-valuemax": this.max }, h("div", { key: 'b349c9d7358086ca4668705a1935fd8bbdb86afa', class: "mg-c-progress" }, h("div", { key: '57cc19d07c0f006f8ecf3a1f86ec12e37ffd8d6b', class: { 'mg-c-progress__bar': true, 'mg-c-progress__bar--active': this.value > this.min } }, h("div", { key: 'b4c49d94d9cfe2e1a6d8013aa4a39cde51b36d04', class: "mg-c-progress__fill", style: {
79
79
  width: `${Math.round(((this.value - this.min) / (this.max - this.min)) * 100)}%`,
80
80
  } })))));
81
81
  }
@@ -87,7 +87,7 @@ const MgProgress$1 = /*@__PURE__*/ proxyCustomElement(class MgProgress extends H
87
87
  "max": ["watchMax"]
88
88
  }; }
89
89
  static get style() { return mgProgressCss; }
90
- }, [1, "mg-progress", {
90
+ }, [257, "mg-progress", {
91
91
  "label": [1],
92
92
  "ariaRole": [1, "aria-role"],
93
93
  "value": [2],
@@ -43,14 +43,14 @@ const MgSkipLinks$1 = /*@__PURE__*/ proxyCustomElement(class MgSkipLinks extends
43
43
  * @returns HTML Element
44
44
  */
45
45
  render() {
46
- return (h("nav", { key: '9df42d332b207abf989ef73f3c83ebbcfcf222a6', class: "mg-c-skip-links", role: "navigation", "aria-label": this.messages.skipLinks.navLabel }, h("ul", { key: '0185490dbd3dfb08b534a898fe779850ce96c427', 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)))))));
46
+ return (h("nav", { key: '66ea9a2abfd1db7a1c7c46e9cdcd15af013ea406', class: "mg-c-skip-links", role: "navigation", "aria-label": this.messages.skipLinks.navLabel }, h("ul", { key: '07f404865c3ad0d815b87e32a46716136ed77d7d', 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)))))));
47
47
  }
48
48
  get element() { return this; }
49
49
  static get watchers() { return {
50
50
  "links": ["validateLinks"]
51
51
  }; }
52
52
  static get style() { return mgSkipLinksCss; }
53
- }, [1, "mg-skip-links", {
53
+ }, [257, "mg-skip-links", {
54
54
  "links": [16]
55
55
  }, undefined, {
56
56
  "links": ["validateLinks"]
@@ -16,7 +16,7 @@ const textAlignments = ['left', 'center', 'right'];
16
16
  // Define possible data types
17
17
  const dataTypes = ['string', 'numeric', 'date'];
18
18
 
19
- 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}}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}@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)}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)}";
19
+ 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}}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}@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-size:var(--mg-b-font-size-h1);font-weight:bold}h2,.mg-u-h2{font-family:var(--mg-b-font-family-heading);font-size:var(--mg-b-font-size-h2);font-weight:bold}h3,.mg-u-h3{font-family:var(--mg-b-font-family-heading);font-size:var(--mg-b-font-size-h3);font-weight:bold}h4,.mg-u-h4{font-family:var(--mg-b-font-family-heading);font-size:var(--mg-b-font-size-h4);font-weight:bold}h5,.mg-u-h5{font-family:var(--mg-b-font-family-heading);font-size:var(--mg-b-font-size-h5);font-weight:bold}h6,.mg-u-h6{font-family:var(--mg-b-font-family-heading);font-size:var(--mg-b-font-size-h6);font-weight:bold}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)}";
20
20
 
21
21
  /**
22
22
  * Check if value is a valid align object
@@ -127,11 +127,11 @@ const MgTable$1 = /*@__PURE__*/ proxyCustomElement(class MgTable extends HTMLEle
127
127
  Object.entries(this.columns).forEach(([key, value]) => {
128
128
  // Add alignment to stylesheet
129
129
  if (value.align !== undefined) {
130
- this.alignmentStylesheet.insertRule(`.${this.componentClass}{th:nth-child(${key}),td:nth-child(${key}){text-align:${value.align}}}`);
130
+ this.alignmentStylesheet.insertRule(`.${this.componentClass} th:nth-child(${key}),td:nth-child(${key}){text-align:${value.align};&>*{display:inline-block;}}`);
131
131
  }
132
132
  // if align is not defined and datatype is number, align right
133
133
  else if (value.datatype === 'numeric') {
134
- this.alignmentStylesheet.insertRule(`.${this.componentClass}{th:nth-child(${key}),td:nth-child(${key}){text-align:right}}`);
134
+ this.alignmentStylesheet.insertRule(`.${this.componentClass} th:nth-child(${key}),td:nth-child(${key}){text-align:right;&>*{display:inline-block;}}`);
135
135
  }
136
136
  // Define if column is sortable
137
137
  if (value.sortable) {
@@ -1,314 +1,4 @@
1
- import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { c as createID, C as ClassList, n as nextTick, a as isValideID, t as toString, i as isValidString, d as allItemsAreString } from './index2.js';
3
- import { K as Keys } from './events.utils.js';
4
- import { d as defineCustomElement$3 } from './mg-badge2.js';
5
- import { d as defineCustomElement$2 } from './mg-icon2.js';
6
-
7
- /**
8
- * Available tabs items status
9
- */
10
- const Status = {
11
- VISIBLE: 'visible',
12
- HIDDEN: 'hidden',
13
- DISABLED: 'disabled',
14
- ACTIVE: 'active',
15
- };
16
- /**
17
- * List of all possibles sizes
18
- */
19
- const sizes = ['medium', 'large'];
20
-
21
- const mgTabsCss = "/*!\n * @prop --mg-c-tabs-color: Defines tabs global color, used for bottom line and active tabs. Default value: `--mg-b-color-app`.\n * @prop --mg-c-tabs-color-text: Defines tabs text color. Unset by default, fallback on `--mg-b-color-dark`.\n */.mg-c-tabs.mg-c-tabs--size-medium .mg-c-tabs__navigation-button,.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--size-medium{padding:var(--mg-b-size-12) var(--mg-b-size-16)}.mg-c-tabs.mg-c-tabs--size-medium .mg-c-tabs__navigation-button,.mg-c-tabs.mg-c-tabs--size-medium .mg-c-tabs__navigation-button ::slotted([slot=label]),.mg-c-tabs.mg-c-tabs--size-medium .mg-c-tabs__navigation-button ::slotted([slot=metadata]),.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--size-medium,.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--size-medium ::slotted([slot=label]),.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--size-medium ::slotted([slot=metadata]){font-size:var(--mg-b-font-size)}.mg-c-tabs.mg-c-tabs--size-medium .mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--horizontal,.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--size-medium.mg-c-tabs__navigation-button--horizontal{padding-bottom:var(--mg-b-size-12)}.mg-c-tabs.mg-c-tabs--size-medium .mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--vertical,.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--size-medium.mg-c-tabs__navigation-button--vertical{padding-left:var(--mg-b-size-16)}.mg-c-tabs.mg-c-tabs--size-large .mg-c-tabs__navigation-button,.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--size-large{padding:var(--mg-b-size-16) var(--mg-b-size-32)}.mg-c-tabs.mg-c-tabs--size-large .mg-c-tabs__navigation-button,.mg-c-tabs.mg-c-tabs--size-large .mg-c-tabs__navigation-button ::slotted([slot=label]),.mg-c-tabs.mg-c-tabs--size-large .mg-c-tabs__navigation-button ::slotted([slot=metadata]),.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--size-large,.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--size-large ::slotted([slot=label]),.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--size-large ::slotted([slot=metadata]){font-size:var(--mg-b-font-size-h4)}.mg-c-tabs.mg-c-tabs--size-large .mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--horizontal,.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--size-large.mg-c-tabs__navigation-button--horizontal{padding-bottom:var(--mg-b-size-16)}.mg-c-tabs.mg-c-tabs--size-large .mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--vertical,.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--size-large.mg-c-tabs__navigation-button--vertical{padding-left:var(--mg-b-size-32)}.mg-c-tabs__navigation-button{display:flex;box-sizing:border-box;align-items:center;border:none;background-color:unset;color:var(--mg-c-tabs-color-text, var(--mg-b-color-dark));column-gap:var(--mg-c-tabs-navigation-button-column-gap, var(--mg-b-size-8));cursor:pointer;font-family:var(--mg-b-font-family);font-weight:400;line-height:var(--mg-b-line-height);text-decoration:none;white-space:nowrap}.mg-c-tabs__navigation-button:disabled,.mg-c-tabs__navigation-button--disabled{cursor:default;opacity:var(--mg-b-opacity-element-disabled)}.mg-c-tabs__navigation-button:focus-visible{z-index:10}.mg-c-tabs__navigation-button:hover:not(.mg-c-tabs__navigation-button--disabled),.mg-c-tabs__navigation-button:focus-visible:not(.mg-c-tabs__navigation-button--disabled){background-color:color-mix(in srgb, var(--mg-c-tabs-color), transparent 90%)}.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--active{color:var(--mg-c-tabs-color);font-weight:600}.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--active.mg-c-tabs__navigation-button--horizontal{box-shadow:inset 0 calc(-1*var(--mg-b-size-4)) var(--mg-c-tabs-color)}.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--active.mg-c-tabs__navigation-button--vertical{box-shadow:inset var(--mg-b-size-4) 0 var(--mg-c-tabs-color)}.mg-c-tabs__navigation-button.mg-c-tabs__navigation-button--hidden{display:none}.mg-c-tabs__header{display:flex;flex-flow:row wrap;border-bottom:var(--mg-b-size-border) solid color-mix(in srgb, var(--mg-c-tabs-color), transparent 90%)}.mg-c-tabs__content-container:focus-visible{outline:none}.mg-c-tabs__navigation-button-text{flex:0 0 content}";
22
-
23
- /**
24
- * type TabItem validation function
25
- * @param tab - tab item
26
- * @returns tab item type is valid
27
- */
28
- const isTabItem = (tab) => typeof tab === 'object' && typeof tab.label === 'string';
29
- const MgTabs$1 = /*@__PURE__*/ proxyCustomElement(class MgTabs extends HTMLElement {
30
- constructor() {
31
- super();
32
- this.__registerHost();
33
- this.__attachShadow();
34
- this.activeTabChange = createEvent(this, "active-tab-change", 7);
35
- /************
36
- * Internal *
37
- ************/
38
- // classes
39
- this.tabPanel = 'panel';
40
- this.buttonTabBaseClass = 'mg-c-tabs__navigation-button';
41
- this.startIndex = 1;
42
- /**
43
- * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
44
- * If not set, it will be created.
45
- */
46
- this.identifier = createID('mg-tabs');
47
- /**
48
- * Define tabs size
49
- */
50
- this.size = 'medium';
51
- /**
52
- * Component tabs
53
- */
54
- this.tabs = [];
55
- /**
56
- * Component classes
57
- */
58
- this.classCollection = new ClassList(['mg-c-tabs']);
59
- /**
60
- * Validate that new tab status can be `Status.ACTIVE`
61
- * @param tab - tab item
62
- * @returns true when tab match condition to get a `Status.ACTIVE`
63
- */
64
- this.isActivableTab = (tab) => [undefined, Status.ACTIVE, Status.VISIBLE].includes(tab.status);
65
- /**
66
- * Method to know if given tab has the given status
67
- * @param tab - item tab key to set to ACTIVE status
68
- * @param status - status to valide
69
- * @returns status comparaison
70
- */
71
- this.tabHasStatus = (tab, status) => tab.status === status;
72
- /**
73
- * Method to get element id from index
74
- * @param element - to get id
75
- * @param index - to generate id
76
- * @returns generated element id
77
- */
78
- this.getElementId = (element, index) => `${element}-${this.getTabItemIndex(index)}`;
79
- /**
80
- * Method to get tab item index
81
- * @param index - to get
82
- * @returns index
83
- */
84
- this.getTabItemIndex = (index) => index + this.startIndex;
85
- /**
86
- * Handle click events on tabs
87
- * @param event - mouse event
88
- */
89
- this.handleClick = (event) => {
90
- const tabId = event.currentTarget.dataset.index;
91
- if (!this.isActivableTab(this.tabs[Number(tabId) - this.startIndex])) {
92
- event.preventDefault();
93
- }
94
- else {
95
- this.activeTab = Number(tabId);
96
- this.tabFocus = undefined;
97
- }
98
- };
99
- /**
100
- * get navigation button class from given status
101
- * @param status - button tab status
102
- * @returns button class/selector variant
103
- */
104
- this.getNavigationButtonClass = (status) => `${this.buttonTabBaseClass}--${status}`;
105
- /**
106
- * Handle keyboard event on tabs
107
- * @param event - mouse event
108
- */
109
- this.handleKeydown = (event) => {
110
- const parent = event.target.parentElement;
111
- if ([Keys.ARROWLEFT, Keys.ARROWRIGHT].includes(event.key)) {
112
- this.tabFocus = Number(event.target.dataset.index);
113
- parent.querySelector(`[data-index="${this.tabFocus}"]`).setAttribute('tabindex', '-1');
114
- // Move right
115
- if (event.key === Keys.ARROWRIGHT) {
116
- this.tabFocus++;
117
- // If we're at the end, go to the start
118
- if (this.tabFocus > this.tabs.length)
119
- this.tabFocus = this.startIndex;
120
- // Move left
121
- }
122
- else if (event.key === Keys.ARROWLEFT) {
123
- this.tabFocus--;
124
- // If we're at the start, move to the end
125
- if (this.tabFocus < this.startIndex)
126
- this.tabFocus = this.tabs.length;
127
- }
128
- const parentButtonElement = parent.querySelector(`[data-index="${this.tabFocus}"]`);
129
- // if focus item is ['hidden'] we recursively repeat action
130
- if (this.tabHasStatus(this.tabs[this.tabFocus - 1], Status.HIDDEN)) {
131
- parentButtonElement.dispatchEvent(new KeyboardEvent('keydown', { key: event.key, bubbles: true }));
132
- // else run focus methods on tabFocus element
133
- }
134
- else {
135
- parentButtonElement.setAttribute('tabindex', '0');
136
- parentButtonElement.focus();
137
- }
138
- }
139
- else if (event.key === Keys.TAB) {
140
- this.resetFocus();
141
- }
142
- };
143
- /**
144
- * Reset focus on document click
145
- * @param event - mouse event
146
- */
147
- this.handleDocumentClick = (event) => {
148
- if (event.target.closest('mg-tabs') !== this.element)
149
- this.resetFocus();
150
- };
151
- /**
152
- * Method to reset focus behavior
153
- */
154
- this.resetFocus = () => {
155
- // update asynchronously tabindex to prevent get focus on new tabindex at then end of event process
156
- nextTick(() => {
157
- this.tabFocus = undefined;
158
- Array.from(this.element.shadowRoot.querySelectorAll('[data-index]')).forEach((tab, index) => {
159
- tab.setAttribute('tabindex', this.activeTab - this.startIndex !== index ? '-1' : '0');
160
- });
161
- });
162
- };
163
- /**
164
- * Validate slots setting
165
- */
166
- this.validateSlots = () => {
167
- const slots = Array.from(this.element.children).filter(slot => { var _a; return (_a = slot.getAttribute('slot')) === null || _a === void 0 ? void 0 : _a.includes('tab_content-'); });
168
- if (slots.length !== this.tabs.length)
169
- throw new Error('<mg-tabs> Must have slots counts equal to tabs count.');
170
- };
171
- }
172
- watchIdentifier(newValue) {
173
- if (!isValideID(newValue)) {
174
- console.error(`<mg-tabs> prop "identifier" value is invalid. Passed value: ${toString(newValue)}.`);
175
- }
176
- }
177
- validateLabel(newValue) {
178
- if (!isValidString(newValue)) {
179
- throw new Error(`<mg-tabs> prop "label" is required and must be a string. Passed value: ${toString(newValue)}.`);
180
- }
181
- }
182
- validateSize(newValue) {
183
- if (!sizes.includes(newValue)) {
184
- throw new Error(`<mg-tabs> prop "size" must be one of: ${sizes.join(', ')}. Passed value: ${toString(newValue)}.`);
185
- }
186
- this.classCollection.add(`mg-c-tabs--size-${this.size}`);
187
- }
188
- validateItems(newValue) {
189
- // String array
190
- if (allItemsAreString(newValue))
191
- this.tabs = newValue.map(item => ({ label: item, status: Status.VISIBLE }));
192
- // Object array
193
- else if (Array.isArray(newValue) && newValue.length > 0 && newValue.every(isTabItem))
194
- this.tabs = newValue;
195
- else
196
- throw new Error(`<mg-tabs> prop "items" is required and all items must be the same type: TabItem. Passed value: ${toString(newValue)}.`);
197
- }
198
- validateActiveTab(newValue) {
199
- // when `active-tab` is undefined we set default value by searching an item with `Status.ACTIVE` or we use the `startIndex` has fallback value
200
- // after setting new value to `active-tab` the validate will be triggered again with the updated value and process the tab update
201
- if (newValue === undefined) {
202
- this.activeTab = this.tabs.some(tab => this.tabHasStatus(tab, Status.ACTIVE))
203
- ? this.getTabItemIndex(this.tabs.findIndex(tab => this.tabHasStatus(tab, Status.ACTIVE)))
204
- : this.startIndex;
205
- }
206
- else if (typeof newValue === 'number' && newValue >= this.startIndex && newValue <= this.tabs.length && this.isActivableTab(this.tabs[newValue - this.startIndex])) {
207
- // if new 'active-tab' is activable we update tab status to ACTIVE and toggle past ACTIVE to VISIBLE
208
- this.tabs.forEach((tab, index) => {
209
- const isNewActiveTab = index === newValue - this.startIndex;
210
- // reset active tabs
211
- if (this.tabHasStatus(tab, Status.ACTIVE) && !isNewActiveTab)
212
- tab.status = Status.VISIBLE;
213
- // set active tab from given tab key
214
- else if (this.isActivableTab(tab) && isNewActiveTab)
215
- tab.status = Status.ACTIVE;
216
- });
217
- // emit change active tab key event
218
- this.activeTabChange.emit(newValue);
219
- }
220
- else {
221
- throw new Error(`<mg-tabs> prop "activeTab" must be a number between ${this.startIndex} and ${this.tabs.length} and new value must be "activable". Passed value: ${toString(newValue)}.`);
222
- }
223
- }
224
- /*************
225
- * Lifecycle *
226
- *************/
227
- /**
228
- * Check if component props are well configured on init
229
- */
230
- componentWillLoad() {
231
- // Check tabs format
232
- this.watchIdentifier(this.identifier);
233
- this.validateLabel(this.label);
234
- this.validateItems(this.items);
235
- this.validateActiveTab(this.activeTab);
236
- this.validateSize(this.size);
237
- this.validateSlots();
238
- }
239
- /**
240
- * add listners
241
- */
242
- componentDidLoad() {
243
- document.addEventListener('click', this.handleDocumentClick, false);
244
- }
245
- /**
246
- * remove listeners
247
- */
248
- disconnectedCallback() {
249
- document.removeEventListener('keydown', this.handleDocumentClick);
250
- }
251
- /**
252
- * Render
253
- * @returns HTML Element
254
- */
255
- render() {
256
- return (h("div", { key: '06dd97d9d4e77f606dee3c4a8960b51265345666', class: this.classCollection.join() }, h("header", { key: 'ea3771bdfe8576bb8b443823a2c338a51ed3ba69', 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: {
257
- [`${this.buttonTabBaseClass}`]: true,
258
- [`${this.buttonTabBaseClass}--horizontal`]: true,
259
- [`${this.getNavigationButtonClass(Status.ACTIVE)}`]: this.tabHasStatus(tab, Status.ACTIVE),
260
- [`${this.getNavigationButtonClass(Status.DISABLED)}`]: this.tabHasStatus(tab, Status.DISABLED),
261
- [`${this.getNavigationButtonClass(Status.HIDDEN)}`]: this.tabHasStatus(tab, Status.HIDDEN),
262
- }, tabindex: this.tabHasStatus(tab, Status.ACTIVE) ? 0 : -1, "aria-selected": this.tabHasStatus(tab, Status.ACTIVE).toString(), "aria-controls": this.getElementId(this.tabPanel, index), "aria-disabled": this.tabHasStatus(tab, Status.DISABLED), onClick: this.handleClick, onKeyDown: this.handleKeydown, "data-index": this.getTabItemIndex(index) }, tab.icon !== undefined && h("mg-icon", { icon: tab.icon }), tab.label, tab.badge !== undefined && h("mg-badge", { variant: "text-color", value: tab.badge.value, label: tab.badge.label, outline: tab.badge.role === 'information' }))))), this.tabs.map((tab, index) => (h("article", { key: tab.label, role: "tabpanel", id: this.getElementId(this.tabPanel, index), hidden: !this.tabHasStatus(tab, Status.ACTIVE), "aria-labelledby": this.getElementId(this.identifier, index), tabindex: this.tabHasStatus(tab, Status.ACTIVE) ? 0 : -1, class: "mg-c-tabs__content-container" }, h("slot", { name: this.getElementId('tab_content', index) }))))));
263
- }
264
- get element() { return this; }
265
- static get watchers() { return {
266
- "identifier": ["watchIdentifier"],
267
- "label": ["validateLabel"],
268
- "size": ["validateSize"],
269
- "items": ["validateItems"],
270
- "activeTab": ["validateActiveTab"]
271
- }; }
272
- static get style() { return mgTabsCss; }
273
- }, [1, "mg-tabs", {
274
- "identifier": [1],
275
- "label": [1],
276
- "size": [1],
277
- "items": [16],
278
- "activeTab": [1538, "active-tab"],
279
- "tabs": [32],
280
- "classCollection": [32]
281
- }, undefined, {
282
- "identifier": ["watchIdentifier"],
283
- "label": ["validateLabel"],
284
- "size": ["validateSize"],
285
- "items": ["validateItems"],
286
- "activeTab": ["validateActiveTab"]
287
- }]);
288
- function defineCustomElement$1() {
289
- if (typeof customElements === "undefined") {
290
- return;
291
- }
292
- const components = ["mg-tabs", "mg-badge", "mg-icon"];
293
- components.forEach(tagName => { switch (tagName) {
294
- case "mg-tabs":
295
- if (!customElements.get(tagName)) {
296
- customElements.define(tagName, MgTabs$1);
297
- }
298
- break;
299
- case "mg-badge":
300
- if (!customElements.get(tagName)) {
301
- defineCustomElement$3();
302
- }
303
- break;
304
- case "mg-icon":
305
- if (!customElements.get(tagName)) {
306
- defineCustomElement$2();
307
- }
308
- break;
309
- } });
310
- }
311
- defineCustomElement$1();
1
+ import { M as MgTabs$1, d as defineCustomElement$1 } from './mg-tabs2.js';
312
2
 
313
3
  const MgTabs = MgTabs$1;
314
4
  const defineCustomElement = defineCustomElement$1;