@mgdis/mg-components 6.9.0 → 6.10.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 (207) hide show
  1. package/dist/cjs/events.utils-D5SAtkpQ.js +28 -0
  2. package/dist/cjs/events.utils-D5SAtkpQ.js.map +1 -0
  3. package/dist/cjs/index-CATFkm3O.js +4 -0
  4. package/dist/cjs/{index-CTU2m-sy.js → index-CfIlskRh.js} +20 -6
  5. package/dist/cjs/{index-CTU2m-sy.js.map → index-CfIlskRh.js.map} +1 -1
  6. package/dist/cjs/index.es-BCLy9yYb.js +250 -0
  7. package/dist/cjs/index.es-BCLy9yYb.js.map +1 -0
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/mg-action-more_37.cjs.entry.js +382 -373
  10. package/dist/cjs/mg-action-more_37.cjs.entry.js.map +1 -1
  11. package/dist/cjs/mg-alert.cjs.entry.js +7 -7
  12. package/dist/cjs/mg-components.cjs.js +1 -1
  13. package/dist/cjs/mg-input-combobox.cjs.entry.js +774 -0
  14. package/dist/cjs/mg-input-combobox.cjs.entry.js.map +1 -0
  15. package/dist/cjs/mg-input-combobox.entry.cjs.js.map +1 -0
  16. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +16 -14
  17. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js.map +1 -1
  18. package/dist/cjs/mg-input-rich-text-editor.entry.cjs.js.map +1 -1
  19. package/dist/cjs/mg-loader.cjs.entry.js +5 -5
  20. package/dist/cjs/mg-progress.cjs.entry.js +11 -11
  21. package/dist/collection/collection-manifest.json +1 -0
  22. package/dist/collection/components/atoms/mg-button/mg-button.js +3 -2
  23. package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -1
  24. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +47 -57
  25. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
  26. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.js +2 -0
  27. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.js.map +1 -0
  28. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +1443 -0
  29. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js.map +1 -0
  30. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +1 -1
  31. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +2 -2
  32. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
  33. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +1 -1
  34. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +1 -1
  35. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.scss +1 -0
  36. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +3 -3
  37. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js.map +1 -1
  38. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +1 -1
  39. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +1 -1
  40. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -1
  41. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +1 -1
  42. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +2 -2
  43. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js.map +1 -1
  44. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +3 -3
  45. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js.map +1 -1
  46. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +2 -2
  47. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -1
  48. package/dist/collection/components/molecules/mg-alert/mg-alert.js +1 -1
  49. package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
  50. package/dist/collection/components/molecules/mg-form/mg-form.js +1 -1
  51. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +1 -1
  52. package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
  53. package/dist/collection/components/molecules/mg-message/mg-message.js +2 -2
  54. package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
  55. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +3 -3
  56. package/dist/collection/components/molecules/mg-panel/mg-panel.js +1 -1
  57. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
  58. package/dist/collection/components/molecules/mg-popover/mg-popover.js +55 -81
  59. package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
  60. package/dist/collection/components/molecules/mg-progress/mg-progress.js +1 -1
  61. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
  62. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +6 -5
  63. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js.map +1 -1
  64. package/dist/collection/locales/en/messages.json +8 -1
  65. package/dist/collection/locales/fr/messages.json +8 -1
  66. package/dist/collection/utils/behaviors.utils.js +3 -3
  67. package/dist/collection/utils/behaviors.utils.js.map +1 -1
  68. package/dist/collection/utils/events.utils.js +22 -0
  69. package/dist/collection/utils/events.utils.js.map +1 -0
  70. package/dist/collection/utils/floating-ui.utils.js +46 -2
  71. package/dist/collection/utils/floating-ui.utils.js.map +1 -1
  72. package/dist/components/events.utils.js +26 -0
  73. package/dist/components/events.utils.js.map +1 -0
  74. package/dist/components/floating-ui.utils.js +47 -3
  75. package/dist/components/floating-ui.utils.js.map +1 -1
  76. package/dist/components/index.es.js +136 -43
  77. package/dist/components/index.es.js.map +1 -1
  78. package/dist/components/index2.js +18 -4
  79. package/dist/components/index2.js.map +1 -1
  80. package/dist/components/mg-action-more.js +8 -8
  81. package/dist/components/mg-action-more.js.map +1 -1
  82. package/dist/components/mg-alert.js +6 -6
  83. package/dist/components/mg-badge2.js +6 -6
  84. package/dist/components/mg-button2.js +9 -8
  85. package/dist/components/mg-button2.js.map +1 -1
  86. package/dist/components/mg-character-left2.js +4 -4
  87. package/dist/components/mg-details.js +4 -4
  88. package/dist/components/mg-details.js.map +1 -1
  89. package/dist/components/mg-form.js +8 -8
  90. package/dist/components/mg-icon2.js +6 -6
  91. package/dist/components/mg-illustrated-message.js +6 -6
  92. package/dist/components/mg-input-checkbox.js +9 -9
  93. package/dist/components/mg-input-combobox.d.ts +11 -0
  94. package/dist/components/mg-input-combobox.js +897 -0
  95. package/dist/components/mg-input-combobox.js.map +1 -0
  96. package/dist/components/mg-input-date.js +18 -18
  97. package/dist/components/mg-input-date.js.map +1 -1
  98. package/dist/components/mg-input-numeric.js +16 -16
  99. package/dist/components/mg-input-numeric.js.map +1 -1
  100. package/dist/components/mg-input-password.js +5 -5
  101. package/dist/components/mg-input-password.js.map +1 -1
  102. package/dist/components/mg-input-radio.js +8 -8
  103. package/dist/components/mg-input-rich-text-editor.js +15 -13
  104. package/dist/components/mg-input-rich-text-editor.js.map +1 -1
  105. package/dist/components/mg-input-select2.js +9 -9
  106. package/dist/components/mg-input-select2.js.map +1 -1
  107. package/dist/components/mg-input-text2.js +11 -11
  108. package/dist/components/mg-input-text2.js.map +1 -1
  109. package/dist/components/mg-input-textarea.js +9 -9
  110. package/dist/components/mg-input-textarea.js.map +1 -1
  111. package/dist/components/mg-input-title2.js +4 -4
  112. package/dist/components/mg-input-toggle.js +7 -7
  113. package/dist/components/mg-input2.js +8 -8
  114. package/dist/components/mg-item-more2.js +12 -12
  115. package/dist/components/mg-item-more2.js.map +1 -1
  116. package/dist/components/mg-loader.js +1 -70
  117. package/dist/components/mg-loader.js.map +1 -1
  118. package/dist/components/mg-loader2.js +75 -0
  119. package/dist/components/mg-loader2.js.map +1 -0
  120. package/dist/components/mg-menu-item2.js +13 -13
  121. package/dist/components/mg-menu-item2.js.map +1 -1
  122. package/dist/components/mg-message2.js +6 -6
  123. package/dist/components/mg-modal.js +10 -10
  124. package/dist/components/mg-pagination2.js +9 -9
  125. package/dist/components/mg-panel.js +10 -10
  126. package/dist/components/mg-popover-content2.js +5 -5
  127. package/dist/components/mg-popover-content2.js.map +1 -1
  128. package/dist/components/mg-popover2.js +60 -86
  129. package/dist/components/mg-popover2.js.map +1 -1
  130. package/dist/components/mg-progress.js +11 -11
  131. package/dist/components/mg-skip-links.js +3 -3
  132. package/dist/components/mg-table.js +6 -6
  133. package/dist/components/mg-tabs.js +18 -17
  134. package/dist/components/mg-tabs.js.map +1 -1
  135. package/dist/components/mg-tag.js +4 -4
  136. package/dist/components/mg-tooltip-content2.js +1 -1
  137. package/dist/components/mg-tooltip-content2.js.map +1 -1
  138. package/dist/components/mg-tooltip2.js +56 -66
  139. package/dist/components/mg-tooltip2.js.map +1 -1
  140. package/dist/esm/events.utils-yMGqY8YG.js +26 -0
  141. package/dist/esm/events.utils-yMGqY8YG.js.map +1 -0
  142. package/dist/esm/index-CAuxALt5.js +4 -0
  143. package/dist/esm/{index-SQlkEaXW.js → index-DmsGewMC.js} +20 -6
  144. package/dist/esm/{index-SQlkEaXW.js.map → index-DmsGewMC.js.map} +1 -1
  145. package/dist/esm/index.es-rLV3KFPd.js +223 -0
  146. package/dist/esm/index.es-rLV3KFPd.js.map +1 -0
  147. package/dist/esm/loader.js +1 -1
  148. package/dist/esm/mg-action-more_37.entry.js +383 -374
  149. package/dist/esm/mg-action-more_37.entry.js.map +1 -1
  150. package/dist/esm/mg-alert.entry.js +7 -7
  151. package/dist/esm/mg-components.js +1 -1
  152. package/dist/esm/mg-input-combobox.entry.js +772 -0
  153. package/dist/esm/mg-input-combobox.entry.js.map +1 -0
  154. package/dist/esm/mg-input-rich-text-editor.entry.js +17 -15
  155. package/dist/esm/mg-input-rich-text-editor.entry.js.map +1 -1
  156. package/dist/esm/{mg-input.conf-BtkqaBXm.js → mg-input.conf-CNgv8hc5.js} +3 -3
  157. package/dist/esm/{mg-input.conf-BtkqaBXm.js.map → mg-input.conf-CNgv8hc5.js.map} +1 -1
  158. package/dist/esm/mg-loader.entry.js +5 -5
  159. package/dist/esm/mg-progress.entry.js +11 -11
  160. package/dist/mg-components/locales/en/messages.json +8 -1
  161. package/dist/mg-components/locales/fr/messages.json +8 -1
  162. package/dist/mg-components/mg-components.esm.js +1 -1
  163. package/dist/mg-components/mg-input-combobox.entry.esm.js.map +1 -0
  164. package/dist/mg-components/mg-input-rich-text-editor.entry.esm.js.map +1 -1
  165. package/dist/mg-components/p-0f761c6c.entry.js +2 -0
  166. package/dist/mg-components/p-0f761c6c.entry.js.map +1 -0
  167. package/dist/mg-components/{p-650d6986.entry.js → p-73099ed7.entry.js} +3 -3
  168. package/dist/mg-components/p-73099ed7.entry.js.map +1 -0
  169. package/dist/mg-components/p-88f77de2.entry.js +2 -0
  170. package/dist/mg-components/{p-680948e3.entry.js.map → p-88f77de2.entry.js.map} +1 -1
  171. package/dist/mg-components/p-CNgv8hc5.js +2 -0
  172. package/dist/mg-components/{p-BtkqaBXm.js.map → p-CNgv8hc5.js.map} +1 -1
  173. package/dist/mg-components/p-DK9teKTo.js +2 -0
  174. package/dist/mg-components/{p-CqGbLOnN.js.map → p-DK9teKTo.js.map} +1 -1
  175. package/dist/mg-components/{p-583b3769.entry.js → p-ad66e7b3.entry.js} +2 -2
  176. package/dist/mg-components/p-cdbe689e.entry.js +2 -0
  177. package/dist/mg-components/{p-9acc6504.entry.js.map → p-cdbe689e.entry.js.map} +1 -1
  178. package/dist/mg-components/p-d3a868f0.entry.js +2 -0
  179. package/dist/mg-components/p-d3a868f0.entry.js.map +1 -0
  180. package/dist/mg-components/p-rLV3KFPd.js +2 -0
  181. package/dist/mg-components/p-rLV3KFPd.js.map +1 -0
  182. package/dist/mg-components/p-yMGqY8YG.js +2 -0
  183. package/dist/mg-components/p-yMGqY8YG.js.map +1 -0
  184. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +6 -5
  185. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.d.ts +24 -0
  186. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +340 -0
  187. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +5 -9
  188. package/dist/types/components.d.ts +247 -2
  189. package/dist/types/utils/events.utils.d.ts +4 -0
  190. package/dist/types/utils/floating-ui.utils.d.ts +9 -1
  191. package/ide/intellij/web-types.json +400 -1
  192. package/ide/vscode/html-custom-data.json +332 -0
  193. package/package.json +12 -12
  194. package/dist/cjs/index.es-jXqiN1uw.js +0 -152
  195. package/dist/cjs/index.es-jXqiN1uw.js.map +0 -1
  196. package/dist/esm/index.es-DDBtzymI.js +0 -130
  197. package/dist/esm/index.es-DDBtzymI.js.map +0 -1
  198. package/dist/mg-components/p-650d6986.entry.js.map +0 -1
  199. package/dist/mg-components/p-680948e3.entry.js +0 -2
  200. package/dist/mg-components/p-9acc6504.entry.js +0 -2
  201. package/dist/mg-components/p-BtkqaBXm.js +0 -2
  202. package/dist/mg-components/p-CqGbLOnN.js +0 -2
  203. package/dist/mg-components/p-DDBtzymI.js +0 -2
  204. package/dist/mg-components/p-DDBtzymI.js.map +0 -1
  205. package/dist/mg-components/p-c0fb6f62.entry.js +0 -2
  206. package/dist/mg-components/p-c0fb6f62.entry.js.map +0 -1
  207. /package/dist/mg-components/{p-583b3769.entry.js.map → p-ad66e7b3.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { x as xt, k as kt, O as Ot, z as zt, L as Le } from './index.es.js';
2
+ import { P as Pt, Z as Zt, U as Ut, G as Gt, D as De } from './index.es.js';
3
3
  import { i as initLocales } from './index2.js';
4
4
  import { d as defineCustomElement$4 } from './mg-button2.js';
5
5
  import { d as defineCustomElement$3 } from './mg-card2.js';
@@ -26,7 +26,7 @@ const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class MgModal extends HTMLEle
26
26
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
27
27
  * If not set, it will be created.
28
28
  */
29
- this.identifier = xt('mg-modal');
29
+ this.identifier = Pt('mg-modal');
30
30
  /**
31
31
  * Modal dialog role.
32
32
  */
@@ -46,7 +46,7 @@ const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class MgModal extends HTMLEle
46
46
  /**
47
47
  * Component classes
48
48
  */
49
- this.classCollection = new kt(['mg-c-modal']);
49
+ this.classCollection = new Zt(['mg-c-modal']);
50
50
  /***********
51
51
  * Handles *
52
52
  ***********/
@@ -59,17 +59,17 @@ const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class MgModal extends HTMLEle
59
59
  };
60
60
  }
61
61
  watchIdentifier(newValue) {
62
- if (!Ot(newValue)) {
63
- throw new Error(`<mg-modal> prop "identifier" value is invalid. Passed value: ${zt(newValue)}.`);
62
+ if (!Ut(newValue)) {
63
+ throw new Error(`<mg-modal> prop "identifier" value is invalid. Passed value: ${Gt(newValue)}.`);
64
64
  }
65
65
  }
66
66
  validateDialogRole(newValue) {
67
67
  if (!dialogRoles.includes(newValue))
68
- throw new Error(`<mg-modal> prop "dialogRole" must be one of: ${dialogRoles.join(', ')}. Passed value: ${zt(newValue)}.`);
68
+ throw new Error(`<mg-modal> prop "dialogRole" must be one of: ${dialogRoles.join(', ')}. Passed value: ${Gt(newValue)}.`);
69
69
  }
70
70
  validateModalTitle(newValue) {
71
- if (!Le(newValue)) {
72
- throw new Error(`<mg-modal> prop "modalTitle" is required. Passed value: ${zt(newValue)}.`);
71
+ if (!De(newValue)) {
72
+ throw new Error(`<mg-modal> prop "modalTitle" is required. Passed value: ${Gt(newValue)}.`);
73
73
  }
74
74
  }
75
75
  watchOpen(newValue) {
@@ -118,11 +118,11 @@ const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class MgModal extends HTMLEle
118
118
  * @returns HTML Element
119
119
  */
120
120
  render() {
121
- return (h("dialog", { key: 'fff52c253f0aeaceec427982c5fea96fc948a4f5', role: this.dialogRole, id: this.identifier, class: this.classCollection.join(), "aria-labelledby": this.titleId, ref: (el) => {
121
+ return (h("dialog", { key: '4b7346b707b895a8a110bb7553f0db32d1c5778c', role: this.dialogRole, id: this.identifier, class: this.classCollection.join(), "aria-labelledby": this.titleId, ref: (el) => {
122
122
  if (el !== null) {
123
123
  this.dialog = el;
124
124
  }
125
- } }, h("mg-card", { key: '597aee771927b73fc59c082075d74c76c9d8130c' }, h("div", { key: '75136546eefd38191ecf536e5c10cfbeb7172dc4', class: "mg-c-modal__dialog" }, h("header", { key: '09c79927ddffa0d461eabfa195849cdabe37a6ac', class: "mg-c-modal__header" }, this.closeButton && (h("span", { key: 'b37aabbf4a77ebaa4ca72e72f477aece9c9484de', class: "mg-c-modal__close-button" }, h("mg-button", { key: 'a4ca599e0665489f2cba2d3e668c92baff0a3fdb', "is-icon": true, variant: "flat", label: this.messages.modal.closeButton, onClick: this.handleClose }, h("mg-icon", { key: 'd77c434f5e2aa6d82772ab3af10a93c6f580c709', icon: "cross" })))), h("h1", { key: '6daf305683895d5cc50960b4ce86dd2ffebc3246', class: "mg-c-modal__title", id: this.titleId }, this.modalTitle)), h("article", { key: '075ac4bfa9ab3e495b58a340719a8e0cefaac8c4', class: "mg-c-modal__content" }, h("slot", { key: '7013d03bfbd806671ad4cf081df9c7fe842f285c' })), this.hasActions && (h("footer", { key: '20ba80cc79e6d43cf2b820425ee0e4f75953da19', class: "mg-c-modal__footer" }, h("slot", { key: 'cfa6c3920891dfceecd0f01fbab2a1496db66f35', name: "actions" })))))));
125
+ } }, h("mg-card", { key: '2aaabab2e1be14013bcae66d100ac56c1a9bbf4d' }, h("div", { key: '56a03d6cbda094d7ae4444ca3fab924982f73e2a', class: "mg-c-modal__dialog" }, h("header", { key: 'e7eb70e614a9e6c6b3f14f9e165bf801b780b031', class: "mg-c-modal__header" }, this.closeButton && (h("span", { key: 'c57ccc8f049893c5e46d769b527cc2e2c5ff14c0', class: "mg-c-modal__close-button" }, h("mg-button", { key: 'b1b4357af8c875aab9f1104895de3cc228d12feb', "is-icon": true, variant: "flat", label: this.messages.modal.closeButton, onClick: this.handleClose }, h("mg-icon", { key: 'cfe5fba2577ece682368332d3836cf709bb1b0e1', icon: "cross" })))), h("h1", { key: '718527902ea4814d55bf4d1c89d111a965233f0a', class: "mg-c-modal__title", id: this.titleId }, this.modalTitle)), h("article", { key: '78603fdb8fffa93e5caa6cf0ece9c6dbdbdfefde', class: "mg-c-modal__content" }, h("slot", { key: '1cd5a0415e53cb836428f8b9c4fc02dac11447a9' })), this.hasActions && (h("footer", { key: 'da72e5c2f43308d0f94d4e2eb36e317a13b5b16e', class: "mg-c-modal__footer" }, h("slot", { key: '49467ef13123cb4f4e2b315d293379d857ca3245', name: "actions" })))))));
126
126
  }
127
127
  get element() { return this; }
128
128
  static get watchers() { return {
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { x as xt, O as Ot, z as zt } from './index.es.js';
2
+ import { P as Pt, U as Ut, G as Gt } from './index.es.js';
3
3
  import { i as initLocales } from './index2.js';
4
4
  import { d as defineCustomElement$7 } from './mg-button2.js';
5
5
  import { d as defineCustomElement$6 } from './mg-icon2.js';
@@ -48,7 +48,7 @@ const MgPagination = /*@__PURE__*/ proxyCustomElement(class MgPagination extends
48
48
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
49
49
  * If not set, it will be created.
50
50
  */
51
- this.identifier = xt('mg-pagination');
51
+ this.identifier = Pt('mg-pagination');
52
52
  /**
53
53
  * Hide navigation label
54
54
  */
@@ -93,18 +93,18 @@ const MgPagination = /*@__PURE__*/ proxyCustomElement(class MgPagination extends
93
93
  };
94
94
  }
95
95
  watchIdentifier(newValue) {
96
- if (!Ot(newValue)) {
97
- console.error(`<mg-pagination> prop "identifier" value is invalid. Passed value: ${zt(newValue)}.`);
96
+ if (!Ut(newValue)) {
97
+ console.error(`<mg-pagination> prop "identifier" value is invalid. Passed value: ${Gt(newValue)}.`);
98
98
  }
99
99
  }
100
100
  validateTotalPages(newValue) {
101
101
  if (newValue < 1) {
102
- throw new Error(`<mg-pagination> prop "totalPages" must be greater than 0. Passed value: ${zt(newValue)}.`);
102
+ throw new Error(`<mg-pagination> prop "totalPages" must be greater than 0. Passed value: ${Gt(newValue)}.`);
103
103
  }
104
104
  }
105
105
  validateCurrentPage(newValue) {
106
106
  if (newValue < 1) {
107
- throw new Error(`<mg-pagination> prop "currentPage" must be greater than 0. Passed value: ${zt(newValue)}.`);
107
+ throw new Error(`<mg-pagination> prop "currentPage" must be greater than 0. Passed value: ${Gt(newValue)}.`);
108
108
  }
109
109
  else if (newValue > this.totalPages) {
110
110
  throw new Error('<mg-pagination> prop "currentPage" can not be greater than total page.');
@@ -134,10 +134,10 @@ const MgPagination = /*@__PURE__*/ proxyCustomElement(class MgPagination extends
134
134
  * @returns HTML Element
135
135
  */
136
136
  render() {
137
- const navigationActionButton = (disabled, action) => (h("mg-button", { key: '3c29dbe0db55d6eda6d53ee174e0e38c086beddf', label: this.messages.pagination[`${action}Page`],
137
+ const navigationActionButton = (disabled, action) => (h("mg-button", { key: 'b6983bde889955b35b1e580ffd5ece96a2919eca', label: this.messages.pagination[`${action}Page`],
138
138
  // eslint-disable-next-line react/jsx-no-bind
139
- onClick: () => this.handleGoToPage(action, disabled), disabled: disabled, variant: "flat", isIcon: this.hideNavigationLabels }, action === NavigationAction.PREVIOUS && h("mg-icon", { key: '677232241e8eb8beca9b9ce4a6f997dd69a5e3c1', icon: "chevron-left" }), !this.hideNavigationLabels && this.messages.general[action], action === NavigationAction.NEXT && h("mg-icon", { key: '83f0db42841d81a3bc2cea5bec4106b1f102a6e5', icon: "chevron-right" })));
140
- return (h(Host, { key: '26dea8cd6c77188eddec2e1b35dcf01d8ee458eb', hidden: this.totalPages < 2 }, h("nav", { key: 'afe38df7e48edb84598774aad6ca72225ef074e8', role: "navigation", "aria-label": this.label, id: this.identifier, class: { 'mg-c-pagination': true, 'mg-c-pagination--hide-page-count': this.hidePageCount } }, navigationActionButton(this.currentPage <= 1, NavigationAction.PREVIOUS), !this.hidePageCount && (h("div", { key: '1cfd5d883a640fc274fe5f6c8baec734e4479486', class: "mg-c-pagination__page-count" }, h("mg-input-select", { key: 'e58e285a97a1dedf7410a0240ea5607808d66db1', identifier: `${this.identifier}-select`, items: range(1, this.totalPages).map(page => page.toString()), label: this.messages.pagination.selectPage, "label-hide": true, "on-value-change": this.handleSelect, value: this.currentPage.toString(), "placeholder-hide": true }), h("span", { key: 'd5d2cc3dc4324d1a3e2386eaf1da03024313fe24', class: "mg-u-visually-hidden" }, this.messages.pagination.page, " ", this.currentPage), "/ ", this.totalPages, " ", this.totalPages > 1 ? this.messages.pagination.pages : this.messages.pagination.page)), navigationActionButton(this.currentPage >= this.totalPages, NavigationAction.NEXT))));
139
+ onClick: () => this.handleGoToPage(action, disabled), disabled: disabled, variant: "flat", isIcon: this.hideNavigationLabels }, action === NavigationAction.PREVIOUS && h("mg-icon", { key: '64316742287d7cb9adf0c4bb3cb902a3c1cea6b5', icon: "chevron-left" }), !this.hideNavigationLabels && this.messages.general[action], action === NavigationAction.NEXT && h("mg-icon", { key: '2c405c1530509f3e6938e7c1d754b7aff216a6f7', icon: "chevron-right" })));
140
+ return (h(Host, { key: 'a341519e24868b594c1bb91c12549c0338fc0f49', hidden: this.totalPages < 2 }, h("nav", { key: '1102f256da9b8c25e8dbe6be64b934267d58f4b8', role: "navigation", "aria-label": this.label, id: this.identifier, class: { 'mg-c-pagination': true, 'mg-c-pagination--hide-page-count': this.hidePageCount } }, navigationActionButton(this.currentPage <= 1, NavigationAction.PREVIOUS), !this.hidePageCount && (h("div", { key: '32498b13867e363f6f51ffbaff6f18623cbd698d', class: "mg-c-pagination__page-count" }, h("mg-input-select", { key: 'ff80a43e9fa1bf7cc13c7104e41730df0c044c3e', identifier: `${this.identifier}-select`, items: range(1, this.totalPages).map(page => page.toString()), label: this.messages.pagination.selectPage, "label-hide": true, "on-value-change": this.handleSelect, value: this.currentPage.toString(), "placeholder-hide": true }), h("span", { key: 'c3e331768f997740ed95cde7dc7433df7d065122', class: "mg-u-visually-hidden" }, this.messages.pagination.page, " ", this.currentPage), "/ ", this.totalPages, " ", this.totalPages > 1 ? this.messages.pagination.pages : this.messages.pagination.page)), navigationActionButton(this.currentPage >= this.totalPages, NavigationAction.NEXT))));
141
141
  }
142
142
  get element() { return this; }
143
143
  static get watchers() { return {
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { x as xt, k as kt, O as Ot, z as zt, L as Le } from './index.es.js';
2
+ import { P as Pt, Z as Zt, U as Ut, G as Gt, D as De } from './index.es.js';
3
3
  import { i as initLocales } from './index2.js';
4
4
  import { d as defineCustomElement$a } from './mg-button2.js';
5
5
  import { d as defineCustomElement$9 } from './mg-card2.js';
@@ -33,7 +33,7 @@ const MgPanel$1 = /*@__PURE__*/ proxyCustomElement(class MgPanel extends HTMLEle
33
33
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
34
34
  * If not set, it will be created.
35
35
  */
36
- this.identifier = xt('mg-panel');
36
+ this.identifier = Pt('mg-panel');
37
37
  /**
38
38
  * Define if panel title is editable
39
39
  */
@@ -57,7 +57,7 @@ const MgPanel$1 = /*@__PURE__*/ proxyCustomElement(class MgPanel extends HTMLEle
57
57
  /**
58
58
  * Component classes
59
59
  */
60
- this.classCollection = new kt(['mg-c-panel']);
60
+ this.classCollection = new Zt(['mg-c-panel']);
61
61
  /**
62
62
  * Title is in edition mode
63
63
  */
@@ -156,13 +156,13 @@ const MgPanel$1 = /*@__PURE__*/ proxyCustomElement(class MgPanel extends HTMLEle
156
156
  };
157
157
  }
158
158
  watchIdentifier(newValue) {
159
- if (!Ot(newValue)) {
160
- console.error(`<mg-panel> prop "identifier" value is invalid. Passed value: ${zt(newValue)}.`);
159
+ if (!Ut(newValue)) {
160
+ console.error(`<mg-panel> prop "identifier" value is invalid. Passed value: ${Gt(newValue)}.`);
161
161
  }
162
162
  }
163
163
  validatePanelTitle(newValue) {
164
- if (!Le(newValue))
165
- throw new Error(`<mg-panel> prop "panelTitle" is required and must be a string. Passed value: ${zt(newValue)}.`);
164
+ if (!De(newValue))
165
+ throw new Error(`<mg-panel> prop "panelTitle" is required and must be a string. Passed value: ${Gt(newValue)}.`);
166
166
  this.titleChange.emit(newValue);
167
167
  }
168
168
  validateTitlePattern(newValue) {
@@ -171,14 +171,14 @@ const MgPanel$1 = /*@__PURE__*/ proxyCustomElement(class MgPanel extends HTMLEle
171
171
  }
172
172
  validateTitlePosition(newValue) {
173
173
  if (!titlePositions.includes(newValue))
174
- throw new Error(`<mg-panel> prop "titlePosition" must be one of: ${titlePositions.join(', ')}. Passed value: ${zt(newValue)}.`);
174
+ throw new Error(`<mg-panel> prop "titlePosition" must be one of: ${titlePositions.join(', ')}. Passed value: ${Gt(newValue)}.`);
175
175
  }
176
176
  handleExpanded(newValue) {
177
177
  this.expandedChange.emit(newValue);
178
178
  }
179
179
  validateExpandToggleDisplay(newValue) {
180
180
  if (!expandToggleDisplays.includes(newValue))
181
- throw new Error(`<mg-panel> prop "expandToggleDisplay" must be one of: ${expandToggleDisplays.join(', ')}. Passed value: ${zt(newValue)}.`);
181
+ throw new Error(`<mg-panel> prop "expandToggleDisplay" must be one of: ${expandToggleDisplays.join(', ')}. Passed value: ${Gt(newValue)}.`);
182
182
  if (newValue === 'icon' && this.titleEditable)
183
183
  this.titleEditable = false;
184
184
  }
@@ -213,7 +213,7 @@ const MgPanel$1 = /*@__PURE__*/ proxyCustomElement(class MgPanel extends HTMLEle
213
213
  */
214
214
  render() {
215
215
  const headerId = `${this.identifier}-header`;
216
- return (h("section", { key: '82d79e85a6d6e376482b89fa9d03f5e381499dbc', class: this.classCollection.join(), id: this.identifier }, h("mg-card", { key: '6b1753575b2faece344d14d473ded961bc6ac7a1' }, h("header", { key: 'aae91889ab75aacfee1eb0b164fb60ee90d3be30', class: { 'mg-c-panel__header': true, 'mg-c-panel__header--reverse': this.titlePosition === 'right' }, id: headerId }, this.renderHeaderChildren()), h("article", { key: 'eb2cc533c8181e962c21666d67cf920b2e17cdd6', class: "mg-c-panel__content", id: `${this.identifier}-content`, "aria-labelledby": headerId, hidden: !this.expanded }, h("slot", { key: '8a638a7194bd57a4b3f849401436e5a05160080a' })))));
216
+ return (h("section", { key: '73b9b1ab03307718bc7085799675da7447787c73', class: this.classCollection.join(), id: this.identifier }, h("mg-card", { key: '91702feab4cde0548c276f3d32fa193ff1093cae' }, h("header", { key: '442a17d42f86e73648ffa33124a1745fef3b07e3', class: { 'mg-c-panel__header': true, 'mg-c-panel__header--reverse': this.titlePosition === 'right' }, id: headerId }, this.renderHeaderChildren()), h("article", { key: '0df72fb9e53f0a8307c062d506e8c744fd6780f3', class: "mg-c-panel__content", id: `${this.identifier}-content`, "aria-labelledby": headerId, hidden: !this.expanded }, h("slot", { key: '44fa7501182e1c671d229929ebc12031c3048fdb' })))));
217
217
  }
218
218
  get element() { return this; }
219
219
  static get watchers() { return {
@@ -1,11 +1,11 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { k as kt, T as Tt } from './index.es.js';
2
+ import { Z as Zt, q as qt } from './index.es.js';
3
3
  import { i as initLocales } from './index2.js';
4
4
  import { d as defineCustomElement$3 } from './mg-button2.js';
5
5
  import { d as defineCustomElement$2 } from './mg-card2.js';
6
6
  import { d as defineCustomElement$1 } from './mg-icon2.js';
7
7
 
8
- const mgPopoverContentCss = ":host{position:relative;z-index:2000;display:none;padding:var(--mg-b-size-8);color:var(--mg-c-popover-color-text)}:host([data-show]){display:block}:host([data-placement^=left-start]),:host([data-placement^=left-end]),:host([data-placement^=right-start]),:host([data-placement^=right-end]){padding:0 var(--mg-b-size-8)}.mg-c-popover-content{--mg-c-card-max-width:var(--mg-c-popover-max-width);--mg-c-card-min-width:var(--mg-c-popover-min-width)}.mg-c-popover-content mg-button{margin-top:calc(-1*(var(--mg-b-size-min-height) - var(--mg-c-popover-title-font-size)*var(--mg-b-line-height))/2);margin-right:calc(-1*(var(--mg-b-size-min-height) - var(--mg-b-size-16))/2);margin-left:var(--mg-b-size-32);float:right}.mg-c-popover-content__title ::slotted([slot=title]){margin:0 0 var(--mg-b-size-8) !important;font-size:var(--mg-c-popover-title-font-size) !important;font-weight:600 !important}.mg-c-popover-content ::slotted(*:not(mg-panel,mg-message,mg-modal)){--mg-c-card-border:var(--mg-c-card-border-default);--mg-c-card-spacing:var(--mg-c-card-spacing-default);--mg-c-card-border-radius:var(--mg-c-card-border-radius-default);--mg-c-card-color-background:var(--mg-c-card-color-background-default);--mg-c-card-box-shadow:var(--mg-c-card-box-shadow-default);--mg-c-card-max-width:unset;--mg-c-card-min-width:unset}:host([data-placement^=top][data-arrow-hide]){padding-bottom:0}:host([data-placement^=bottom][data-arrow-hide]){padding-top:0}:host([data-placement$=end][data-arrow-hide]),:host([data-placement^=left][data-arrow-hide]){padding-right:0}:host([data-placement$=start][data-arrow-hide]),:host([data-placement^=right][data-arrow-hide]){padding-left:0}::slotted([slot=arrow]){position:absolute;width:calc(var(--mg-b-size-24) + 2*var(--mg-c-card-border-radius) + 2*var(--mg-b-size-8));height:calc(var(--mg-b-size-24) + 2*var(--mg-c-card-border-radius) + 2*var(--mg-b-size-8));visibility:hidden}::slotted([slot=arrow])::before{position:absolute;content:\"\";visibility:visible}:host([data-arrow-hide]) ::slotted([slot=arrow]){display:none}:host([data-placement^=top]) ::slotted([slot=arrow]),:host([data-placement^=bottom]) ::slotted([slot=arrow]){height:var(--mg-b-size-8)}:host([data-placement^=top]) ::slotted([slot=arrow])::before,:host([data-placement^=bottom]) ::slotted([slot=arrow])::before{left:calc(var(--mg-c-card-border-radius) + var(--mg-b-size-8));border-right:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0);border-left:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0)}:host([data-placement^=top]) ::slotted([slot=arrow]){bottom:var(--mg-b-size-border);filter:drop-shadow(0 0.5rem 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-placement^=top]) ::slotted([slot=arrow])::before{border-top:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-placement^=bottom]) ::slotted([slot=arrow]){top:var(--mg-b-size-border);filter:drop-shadow(0 -0.5rem 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-placement^=bottom]) ::slotted([slot=arrow])::before{border-bottom:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-placement^=left]) ::slotted([slot=arrow]),:host([data-placement^=right]) ::slotted([slot=arrow]){width:var(--mg-b-size-8)}:host([data-placement^=left]) ::slotted([slot=arrow])::before,:host([data-placement^=right]) ::slotted([slot=arrow])::before{top:calc(var(--mg-c-card-border-radius) + var(--mg-b-size-8));border-top:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0);border-bottom:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0)}:host([data-placement^=left]) ::slotted([slot=arrow]){right:var(--mg-b-size-border);filter:drop-shadow(0.5rem 0 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-placement^=left]) ::slotted([slot=arrow])::before{border-left:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-placement^=right]) ::slotted([slot=arrow]){left:var(--mg-b-size-border);filter:drop-shadow(-0.5rem 0 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-placement^=right]) ::slotted([slot=arrow])::before{border-right:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-placement^=left-start]) ::slotted([slot=arrow]),:host([data-placement^=left-end]) ::slotted([slot=arrow]),:host([data-placement^=right-start]) ::slotted([slot=arrow]),:host([data-placement^=right-end]) ::slotted([slot=arrow]){height:calc(var(--mg-b-size-24) + 2*var(--mg-c-card-border-radius))}:host([data-placement^=left-start]) ::slotted([slot=arrow])::before,:host([data-placement^=left-end]) ::slotted([slot=arrow])::before,:host([data-placement^=right-start]) ::slotted([slot=arrow])::before,:host([data-placement^=right-end]) ::slotted([slot=arrow])::before{top:var(--mg-c-card-border-radius)}";
8
+ const mgPopoverContentCss = ":host{position:fixed;z-index:2000;top:0;left:0;display:none;padding:var(--mg-b-size-8);color:var(--mg-c-popover-color-text)}:host([data-show]){display:block}:host([data-placement^=left-start]),:host([data-placement^=left-end]),:host([data-placement^=right-start]),:host([data-placement^=right-end]){padding:0 var(--mg-b-size-8)}.mg-c-popover-content{--mg-c-card-max-width:var(--mg-c-popover-max-width);--mg-c-card-min-width:var(--mg-c-popover-min-width)}.mg-c-popover-content mg-button{margin-top:calc(-1*(var(--mg-b-size-min-height) - var(--mg-c-popover-title-font-size)*var(--mg-b-line-height))/2);margin-right:calc(-1*(var(--mg-b-size-min-height) - var(--mg-b-size-16))/2);margin-left:var(--mg-b-size-32);float:right}.mg-c-popover-content__title ::slotted([slot=title]){margin:0 0 var(--mg-b-size-8) !important;font-size:var(--mg-c-popover-title-font-size) !important;font-weight:600 !important}.mg-c-popover-content ::slotted(*:not(mg-panel,mg-message,mg-modal)){--mg-c-card-border:var(--mg-c-card-border-default);--mg-c-card-spacing:var(--mg-c-card-spacing-default);--mg-c-card-border-radius:var(--mg-c-card-border-radius-default);--mg-c-card-color-background:var(--mg-c-card-color-background-default);--mg-c-card-box-shadow:var(--mg-c-card-box-shadow-default);--mg-c-card-max-width:unset;--mg-c-card-min-width:unset}:host([data-placement^=top][data-arrow-hide]){padding-bottom:0}:host([data-placement^=bottom][data-arrow-hide]){padding-top:0}:host([data-placement$=end][data-arrow-hide]),:host([data-placement^=left][data-arrow-hide]){padding-right:0}:host([data-placement$=start][data-arrow-hide]),:host([data-placement^=right][data-arrow-hide]){padding-left:0}::slotted([slot=arrow]){position:absolute;width:calc(var(--mg-b-size-24) + 2*var(--mg-c-card-border-radius) + 2*var(--mg-b-size-8));height:calc(var(--mg-b-size-24) + 2*var(--mg-c-card-border-radius) + 2*var(--mg-b-size-8));visibility:hidden}::slotted([slot=arrow])::before{position:absolute;content:\"\";visibility:visible}:host([data-arrow-hide]) ::slotted([slot=arrow]){display:none}:host([data-placement^=top]) ::slotted([slot=arrow]),:host([data-placement^=bottom]) ::slotted([slot=arrow]){height:var(--mg-b-size-8)}:host([data-placement^=top]) ::slotted([slot=arrow])::before,:host([data-placement^=bottom]) ::slotted([slot=arrow])::before{left:calc(var(--mg-c-card-border-radius) + var(--mg-b-size-8));border-right:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0);border-left:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0)}:host([data-placement^=top]) ::slotted([slot=arrow]){bottom:var(--mg-b-size-border);filter:drop-shadow(0 0.5rem 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-placement^=top]) ::slotted([slot=arrow])::before{border-top:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-placement^=bottom]) ::slotted([slot=arrow]){top:var(--mg-b-size-border);filter:drop-shadow(0 -0.5rem 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-placement^=bottom]) ::slotted([slot=arrow])::before{border-bottom:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-placement^=left]) ::slotted([slot=arrow]),:host([data-placement^=right]) ::slotted([slot=arrow]){width:var(--mg-b-size-8)}:host([data-placement^=left]) ::slotted([slot=arrow])::before,:host([data-placement^=right]) ::slotted([slot=arrow])::before{top:calc(var(--mg-c-card-border-radius) + var(--mg-b-size-8));border-top:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0);border-bottom:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0)}:host([data-placement^=left]) ::slotted([slot=arrow]){right:var(--mg-b-size-border);filter:drop-shadow(0.5rem 0 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-placement^=left]) ::slotted([slot=arrow])::before{border-left:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-placement^=right]) ::slotted([slot=arrow]){left:var(--mg-b-size-border);filter:drop-shadow(-0.5rem 0 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-placement^=right]) ::slotted([slot=arrow])::before{border-right:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-placement^=left-start]) ::slotted([slot=arrow]),:host([data-placement^=left-end]) ::slotted([slot=arrow]),:host([data-placement^=right-start]) ::slotted([slot=arrow]),:host([data-placement^=right-end]) ::slotted([slot=arrow]){height:calc(var(--mg-b-size-24) + 2*var(--mg-c-card-border-radius))}:host([data-placement^=left-start]) ::slotted([slot=arrow])::before,:host([data-placement^=left-end]) ::slotted([slot=arrow])::before,:host([data-placement^=right-start]) ::slotted([slot=arrow])::before,:host([data-placement^=right-end]) ::slotted([slot=arrow])::before{top:var(--mg-c-card-border-radius)}";
9
9
 
10
10
  const MgPopoverContent = /*@__PURE__*/ proxyCustomElement(class MgPopoverContent extends HTMLElement {
11
11
  constructor() {
@@ -20,7 +20,7 @@ const MgPopoverContent = /*@__PURE__*/ proxyCustomElement(class MgPopoverContent
20
20
  /**
21
21
  * Component classes
22
22
  */
23
- this.classCollection = new kt(['mg-c-popover-content']);
23
+ this.classCollection = new Zt(['mg-c-popover-content']);
24
24
  /**
25
25
  * Handle action for close button
26
26
  */
@@ -44,7 +44,7 @@ const MgPopoverContent = /*@__PURE__*/ proxyCustomElement(class MgPopoverContent
44
44
  componentDidLoad() {
45
45
  const headingTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
46
46
  const slottedTitleElement = this.element.querySelector('[slot="title"]');
47
- if (slottedTitleElement && !Tt(slottedTitleElement, headingTags)) {
47
+ if (slottedTitleElement && !qt(slottedTitleElement, headingTags)) {
48
48
  throw new Error(`<mg-popover> Slotted title must be a heading: ${headingTags.join(', ')}.`);
49
49
  }
50
50
  }
@@ -53,7 +53,7 @@ const MgPopoverContent = /*@__PURE__*/ proxyCustomElement(class MgPopoverContent
53
53
  * @returns HTML Element
54
54
  */
55
55
  render() {
56
- return (h(Host, { key: '44aa95d34a4c4beeb5c6d1a59e7e7df999393e52' }, h("mg-card", { key: '483195ec364eaaf78df768993706129cb0ce268e', class: this.classCollection.join() }, this.closeButton && (h("mg-button", { key: '4e2b4f7b563c591120ba208e74c501b0bee7497b', "is-icon": true, variant: "flat", label: this.messages.general.close, onClick: this.handleCloseButton }, h("mg-icon", { key: '58a678df3947e4dbfb718c588ccdc97e611915b9', icon: "cross" }))), h("div", { key: 'e7a9debe373ea8947cde108732f635f39b5305a6', class: "mg-c-popover-content__title" }, h("slot", { key: '15fb949256a5f31e8776cdbd7465f46a73db4876', name: "title" })), h("slot", { key: 'ee914630e089763ec3a059cdd6b4c3eba0c2cfa0', name: "content" })), h("slot", { key: '9c25549d1543a77b3cc459caf8bd8df0b279a036', name: "arrow" })));
56
+ return (h(Host, { key: '8d2dd7d21518de744c18f0280b7b418f3a76acca' }, h("mg-card", { key: '8beab7c9fb692c1983515709a1ee888dc7e5157a', class: this.classCollection.join() }, this.closeButton && (h("mg-button", { key: 'e636569be26b0c741e0b03e806787d91b47ded5c', "is-icon": true, variant: "flat", label: this.messages.general.close, onClick: this.handleCloseButton }, h("mg-icon", { key: '3edc717cbe542494d892566c182883e20b1ca4cb', icon: "cross" }))), h("div", { key: 'd18525218972d92b6932984edb50844658e12970', class: "mg-c-popover-content__title" }, h("slot", { key: '2cceb41fd4ebb00b889e71cab211431e5894d04c', name: "title" })), h("slot", { key: 'a6615d9d7c85b32fb63d3d89db02fae2f8d5c1b2', name: "content" })), h("slot", { key: '0ff4bf72de19a3d56aafb64391cfc276d70e2f18', name: "arrow" })));
57
57
  }
58
58
  get element() { return this; }
59
59
  static get style() { return mgPopoverContentCss; }
@@ -1 +1 @@
1
- {"file":"mg-popover-content2.js","mappings":";;;;;;;AAAA,MAAM,mBAAmB,GAAG,gtJAAgtJ;;MCY/tJ,gBAAgB,iBAAAA,kBAAA,CAAA,MAAA,gBAAA,SAAA,WAAA,CAAA;AAL7B,IAAA,WAAA,GAAA;;;;;AAsBE;;AAEG;AACK,QAAA,IAAW,CAAA,WAAA,GAAG,KAAK;AAE3B;;AAEG;QACM,IAAe,CAAA,eAAA,GAAc,IAAIC,EAAS,CAAC,CAAC,sBAAsB,CAAC,CAAC;AAO7E;;AAEG;AACK,QAAA,IAAiB,CAAA,iBAAA,GAAG,MAAW;AACrC,YAAA,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE;AACzB,SAAC;AAgDF;AA9CC;;AAEe;AAEf;;AAEG;IACH,iBAAiB,GAAA;;QAEf,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ;;AAGpD;;AAEG;IACH,gBAAgB,GAAA;AACd,QAAA,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;QAExD,MAAM,mBAAmB,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC;QACxE,IAAI,mBAAmB,IAAI,CAACC,EAAS,CAAC,mBAAmB,EAAE,WAAW,CAAC,EAAE;AACvE,YAAA,MAAM,IAAI,KAAK,CAAC,CAAA,8CAAA,EAAiD,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAG,CAAA,CAAA,CAAC;;;AAI/F;;;AAGG;IACH,MAAM,GAAA;AACJ,QAAA,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACH,CAAA,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAS,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,EAAA,EACxC,IAAI,CAAC,WAAW,KACf,mFAAmB,OAAO,EAAC,MAAM,EAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAA,EACnG,CAAA,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAS,IAAI,EAAC,OAAO,EAAA,CAAW,CACtB,CACb,EACD,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,6BAA6B,EAAA,EACtC,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,OAAO,EAAA,CAAQ,CACtB,EACN,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,SAAS,EAAA,CAAQ,CACpB,EACV,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,OAAO,EAAQ,CAAA,CACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","ClassList","isTagName"],"sources":["../styles/dist/components/mg-popover-content.css?tag=mg-popover-content&encapsulation=shadow","src/components/molecules/mg-popover/mg-popover-content/mg-popover-content.tsx"],"sourcesContent":[":host{position:relative;z-index:2000;display:none;padding:var(--mg-b-size-8);color:var(--mg-c-popover-color-text)}:host([data-show]){display:block}:host([data-placement^=left-start]),:host([data-placement^=left-end]),:host([data-placement^=right-start]),:host([data-placement^=right-end]){padding:0 var(--mg-b-size-8)}.mg-c-popover-content{--mg-c-card-max-width: var(--mg-c-popover-max-width);--mg-c-card-min-width: var(--mg-c-popover-min-width)}.mg-c-popover-content mg-button{margin-top:calc(-1*(var(--mg-b-size-min-height) - var(--mg-c-popover-title-font-size)*var(--mg-b-line-height))/2);margin-right:calc(-1*(var(--mg-b-size-min-height) - var(--mg-b-size-16))/2);margin-left:var(--mg-b-size-32);float:right}.mg-c-popover-content__title ::slotted([slot=title]){margin:0 0 var(--mg-b-size-8) !important;font-size:var(--mg-c-popover-title-font-size) !important;font-weight:600 !important}.mg-c-popover-content ::slotted(*:not(mg-panel,mg-message,mg-modal)){--mg-c-card-border: var(--mg-c-card-border-default);--mg-c-card-spacing: var(--mg-c-card-spacing-default);--mg-c-card-border-radius: var(--mg-c-card-border-radius-default);--mg-c-card-color-background: var(--mg-c-card-color-background-default);--mg-c-card-box-shadow: var(--mg-c-card-box-shadow-default);--mg-c-card-max-width: unset;--mg-c-card-min-width: unset}:host([data-placement^=top][data-arrow-hide]){padding-bottom:0}:host([data-placement^=bottom][data-arrow-hide]){padding-top:0}:host([data-placement$=end][data-arrow-hide]),:host([data-placement^=left][data-arrow-hide]){padding-right:0}:host([data-placement$=start][data-arrow-hide]),:host([data-placement^=right][data-arrow-hide]){padding-left:0}::slotted([slot=arrow]){position:absolute;width:calc(var(--mg-b-size-24) + 2*var(--mg-c-card-border-radius) + 2*var(--mg-b-size-8));height:calc(var(--mg-b-size-24) + 2*var(--mg-c-card-border-radius) + 2*var(--mg-b-size-8));visibility:hidden}::slotted([slot=arrow])::before{position:absolute;content:\"\";visibility:visible}:host([data-arrow-hide]) ::slotted([slot=arrow]){display:none}:host([data-placement^=top]) ::slotted([slot=arrow]),:host([data-placement^=bottom]) ::slotted([slot=arrow]){height:var(--mg-b-size-8)}:host([data-placement^=top]) ::slotted([slot=arrow])::before,:host([data-placement^=bottom]) ::slotted([slot=arrow])::before{left:calc(var(--mg-c-card-border-radius) + var(--mg-b-size-8));border-right:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0);border-left:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0)}:host([data-placement^=top]) ::slotted([slot=arrow]){bottom:var(--mg-b-size-border);filter:drop-shadow(0 0.5rem 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-placement^=top]) ::slotted([slot=arrow])::before{border-top:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-placement^=bottom]) ::slotted([slot=arrow]){top:var(--mg-b-size-border);filter:drop-shadow(0 -0.5rem 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-placement^=bottom]) ::slotted([slot=arrow])::before{border-bottom:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-placement^=left]) ::slotted([slot=arrow]),:host([data-placement^=right]) ::slotted([slot=arrow]){width:var(--mg-b-size-8)}:host([data-placement^=left]) ::slotted([slot=arrow])::before,:host([data-placement^=right]) ::slotted([slot=arrow])::before{top:calc(var(--mg-c-card-border-radius) + var(--mg-b-size-8));border-top:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0);border-bottom:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0)}:host([data-placement^=left]) ::slotted([slot=arrow]){right:var(--mg-b-size-border);filter:drop-shadow(0.5rem 0 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-placement^=left]) ::slotted([slot=arrow])::before{border-left:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-placement^=right]) ::slotted([slot=arrow]){left:var(--mg-b-size-border);filter:drop-shadow(-0.5rem 0 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-placement^=right]) ::slotted([slot=arrow])::before{border-right:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-placement^=left-start]) ::slotted([slot=arrow]),:host([data-placement^=left-end]) ::slotted([slot=arrow]),:host([data-placement^=right-start]) ::slotted([slot=arrow]),:host([data-placement^=right-end]) ::slotted([slot=arrow]){height:calc(var(--mg-b-size-24) + 2*var(--mg-c-card-border-radius))}:host([data-placement^=left-start]) ::slotted([slot=arrow])::before,:host([data-placement^=left-end]) ::slotted([slot=arrow])::before,:host([data-placement^=right-start]) ::slotted([slot=arrow])::before,:host([data-placement^=right-end]) ::slotted([slot=arrow])::before{top:var(--mg-c-card-border-radius)}/*# sourceMappingURL=mg-popover-content.css.map */\n","import { Component, Element, Host, h, Prop, EventEmitter, Event, State } from '@stencil/core';\nimport { isTagName, ClassList } from '@mgdis/stencil-helpers';\nimport { initLocales } from '../../../../locales';\n\n/**\n * @internal\n */\n@Component({\n tag: 'mg-popover-content',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-popover-content.css',\n shadow: true,\n})\nexport class MgPopoverContent {\n /************\n * Internal *\n ************/\n\n // Locales\n private messages;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgPopoverContentElement;\n\n /**\n * Define if popover has a cross button\n */\n @Prop() closeButton = false;\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-popover-content']);\n\n /**\n * Emited event when close button is clicked\n */\n @Event({ eventName: 'hide-content' }) hideContent: EventEmitter<void>;\n\n /**\n * Handle action for close button\n */\n private handleCloseButton = (): void => {\n this.hideContent.emit();\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are valide\n */\n componentWillLoad(): void {\n // Get locales\n this.messages = initLocales(this.element).messages;\n }\n\n /**\n * Check if component slots are valide\n */\n componentDidLoad(): void {\n const headingTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];\n\n const slottedTitleElement = this.element.querySelector('[slot=\"title\"]');\n if (slottedTitleElement && !isTagName(slottedTitleElement, headingTags)) {\n throw new Error(`<mg-popover> Slotted title must be a heading: ${headingTags.join(', ')}.`);\n }\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <Host>\n <mg-card class={this.classCollection.join()}>\n {this.closeButton && (\n <mg-button is-icon variant=\"flat\" label={this.messages.general.close} onClick={this.handleCloseButton}>\n <mg-icon icon=\"cross\"></mg-icon>\n </mg-button>\n )}\n <div class=\"mg-c-popover-content__title\">\n <slot name=\"title\"></slot>\n </div>\n <slot name=\"content\"></slot>\n </mg-card>\n <slot name=\"arrow\"></slot>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"mg-popover-content2.js","mappings":";;;;;;;AAAA,MAAM,mBAAmB,GAAG,0tJAA0tJ;;MCYzuJ,gBAAgB,iBAAAA,kBAAA,CAAA,MAAA,gBAAA,SAAA,WAAA,CAAA;AAL7B,IAAA,WAAA,GAAA;;;;;AAsBE;;AAEG;AACK,QAAA,IAAW,CAAA,WAAA,GAAG,KAAK;AAE3B;;AAEG;QACM,IAAe,CAAA,eAAA,GAAc,IAAIC,EAAS,CAAC,CAAC,sBAAsB,CAAC,CAAC;AAO7E;;AAEG;AACK,QAAA,IAAiB,CAAA,iBAAA,GAAG,MAAW;AACrC,YAAA,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE;AACzB,SAAC;AAgDF;AA9CC;;AAEe;AAEf;;AAEG;IACH,iBAAiB,GAAA;;QAEf,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ;;AAGpD;;AAEG;IACH,gBAAgB,GAAA;AACd,QAAA,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;QAExD,MAAM,mBAAmB,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC;QACxE,IAAI,mBAAmB,IAAI,CAACC,EAAS,CAAC,mBAAmB,EAAE,WAAW,CAAC,EAAE;AACvE,YAAA,MAAM,IAAI,KAAK,CAAC,CAAA,8CAAA,EAAiD,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAG,CAAA,CAAA,CAAC;;;AAI/F;;;AAGG;IACH,MAAM,GAAA;AACJ,QAAA,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACH,CAAA,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAS,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,EAAA,EACxC,IAAI,CAAC,WAAW,KACf,mFAAmB,OAAO,EAAC,MAAM,EAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAA,EACnG,CAAA,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAS,IAAI,EAAC,OAAO,EAAA,CAAW,CACtB,CACb,EACD,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,6BAA6B,EAAA,EACtC,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,OAAO,EAAA,CAAQ,CACtB,EACN,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,SAAS,EAAA,CAAQ,CACpB,EACV,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,OAAO,EAAQ,CAAA,CACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","ClassList","isTagName"],"sources":["../styles/dist/components/mg-popover-content.css?tag=mg-popover-content&encapsulation=shadow","src/components/molecules/mg-popover/mg-popover-content/mg-popover-content.tsx"],"sourcesContent":[":host{position:fixed;z-index:2000;top:0;left:0;display:none;padding:var(--mg-b-size-8);color:var(--mg-c-popover-color-text)}:host([data-show]){display:block}:host([data-placement^=left-start]),:host([data-placement^=left-end]),:host([data-placement^=right-start]),:host([data-placement^=right-end]){padding:0 var(--mg-b-size-8)}.mg-c-popover-content{--mg-c-card-max-width: var(--mg-c-popover-max-width);--mg-c-card-min-width: var(--mg-c-popover-min-width)}.mg-c-popover-content mg-button{margin-top:calc(-1*(var(--mg-b-size-min-height) - var(--mg-c-popover-title-font-size)*var(--mg-b-line-height))/2);margin-right:calc(-1*(var(--mg-b-size-min-height) - var(--mg-b-size-16))/2);margin-left:var(--mg-b-size-32);float:right}.mg-c-popover-content__title ::slotted([slot=title]){margin:0 0 var(--mg-b-size-8) !important;font-size:var(--mg-c-popover-title-font-size) !important;font-weight:600 !important}.mg-c-popover-content ::slotted(*:not(mg-panel,mg-message,mg-modal)){--mg-c-card-border: var(--mg-c-card-border-default);--mg-c-card-spacing: var(--mg-c-card-spacing-default);--mg-c-card-border-radius: var(--mg-c-card-border-radius-default);--mg-c-card-color-background: var(--mg-c-card-color-background-default);--mg-c-card-box-shadow: var(--mg-c-card-box-shadow-default);--mg-c-card-max-width: unset;--mg-c-card-min-width: unset}:host([data-placement^=top][data-arrow-hide]){padding-bottom:0}:host([data-placement^=bottom][data-arrow-hide]){padding-top:0}:host([data-placement$=end][data-arrow-hide]),:host([data-placement^=left][data-arrow-hide]){padding-right:0}:host([data-placement$=start][data-arrow-hide]),:host([data-placement^=right][data-arrow-hide]){padding-left:0}::slotted([slot=arrow]){position:absolute;width:calc(var(--mg-b-size-24) + 2*var(--mg-c-card-border-radius) + 2*var(--mg-b-size-8));height:calc(var(--mg-b-size-24) + 2*var(--mg-c-card-border-radius) + 2*var(--mg-b-size-8));visibility:hidden}::slotted([slot=arrow])::before{position:absolute;content:\"\";visibility:visible}:host([data-arrow-hide]) ::slotted([slot=arrow]){display:none}:host([data-placement^=top]) ::slotted([slot=arrow]),:host([data-placement^=bottom]) ::slotted([slot=arrow]){height:var(--mg-b-size-8)}:host([data-placement^=top]) ::slotted([slot=arrow])::before,:host([data-placement^=bottom]) ::slotted([slot=arrow])::before{left:calc(var(--mg-c-card-border-radius) + var(--mg-b-size-8));border-right:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0);border-left:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0)}:host([data-placement^=top]) ::slotted([slot=arrow]){bottom:var(--mg-b-size-border);filter:drop-shadow(0 0.5rem 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-placement^=top]) ::slotted([slot=arrow])::before{border-top:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-placement^=bottom]) ::slotted([slot=arrow]){top:var(--mg-b-size-border);filter:drop-shadow(0 -0.5rem 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-placement^=bottom]) ::slotted([slot=arrow])::before{border-bottom:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-placement^=left]) ::slotted([slot=arrow]),:host([data-placement^=right]) ::slotted([slot=arrow]){width:var(--mg-b-size-8)}:host([data-placement^=left]) ::slotted([slot=arrow])::before,:host([data-placement^=right]) ::slotted([slot=arrow])::before{top:calc(var(--mg-c-card-border-radius) + var(--mg-b-size-8));border-top:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0);border-bottom:calc(var(--mg-b-size-24)/2) solid rgba(0,0,0,0)}:host([data-placement^=left]) ::slotted([slot=arrow]){right:var(--mg-b-size-border);filter:drop-shadow(0.5rem 0 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-placement^=left]) ::slotted([slot=arrow])::before{border-left:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-placement^=right]) ::slotted([slot=arrow]){left:var(--mg-b-size-border);filter:drop-shadow(-0.5rem 0 0.25rem color-mix(in srgb, var(--mg-b-color-dark), transparent 85%))}:host([data-placement^=right]) ::slotted([slot=arrow])::before{border-right:var(--mg-b-size-8) solid var(--mg-c-popover-color-background)}:host([data-placement^=left-start]) ::slotted([slot=arrow]),:host([data-placement^=left-end]) ::slotted([slot=arrow]),:host([data-placement^=right-start]) ::slotted([slot=arrow]),:host([data-placement^=right-end]) ::slotted([slot=arrow]){height:calc(var(--mg-b-size-24) + 2*var(--mg-c-card-border-radius))}:host([data-placement^=left-start]) ::slotted([slot=arrow])::before,:host([data-placement^=left-end]) ::slotted([slot=arrow])::before,:host([data-placement^=right-start]) ::slotted([slot=arrow])::before,:host([data-placement^=right-end]) ::slotted([slot=arrow])::before{top:var(--mg-c-card-border-radius)}/*# sourceMappingURL=mg-popover-content.css.map */\n","import { Component, Element, Host, h, Prop, EventEmitter, Event, State } from '@stencil/core';\nimport { isTagName, ClassList } from '@mgdis/stencil-helpers';\nimport { initLocales } from '../../../../locales';\n\n/**\n * @internal\n */\n@Component({\n tag: 'mg-popover-content',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-popover-content.css',\n shadow: true,\n})\nexport class MgPopoverContent {\n /************\n * Internal *\n ************/\n\n // Locales\n private messages;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgPopoverContentElement;\n\n /**\n * Define if popover has a cross button\n */\n @Prop() closeButton = false;\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-popover-content']);\n\n /**\n * Emited event when close button is clicked\n */\n @Event({ eventName: 'hide-content' }) hideContent: EventEmitter<void>;\n\n /**\n * Handle action for close button\n */\n private handleCloseButton = (): void => {\n this.hideContent.emit();\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are valide\n */\n componentWillLoad(): void {\n // Get locales\n this.messages = initLocales(this.element).messages;\n }\n\n /**\n * Check if component slots are valide\n */\n componentDidLoad(): void {\n const headingTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];\n\n const slottedTitleElement = this.element.querySelector('[slot=\"title\"]');\n if (slottedTitleElement && !isTagName(slottedTitleElement, headingTags)) {\n throw new Error(`<mg-popover> Slotted title must be a heading: ${headingTags.join(', ')}.`);\n }\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <Host>\n <mg-card class={this.classCollection.join()}>\n {this.closeButton && (\n <mg-button is-icon variant=\"flat\" label={this.messages.general.close} onClick={this.handleCloseButton}>\n <mg-icon icon=\"cross\"></mg-icon>\n </mg-button>\n )}\n <div class=\"mg-c-popover-content__title\">\n <slot name=\"title\"></slot>\n </div>\n <slot name=\"content\"></slot>\n </mg-card>\n <slot name=\"arrow\"></slot>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { x as xt, O as Ot, z as zt, R as Rt } from './index.es.js';
3
- import { i as isFloatingUIPlacement, s as sides, a as alignments, b as autoUpdate, c as computePosition, o as offset, f as flip, d as shift, e as arrow, l as limitShift } from './floating-ui.utils.js';
2
+ import { P as Pt, U as Ut, G as Gt, B as Bt } from './index.es.js';
3
+ import { i as isFloatingUIPlacement, s as sides, a as alignments, b as autoUpdate, c as computePosition, o as offset, f as flip, d as shift, e as arrow, g as getTransformation, n as numberToPx, l as limitShift } from './floating-ui.utils.js';
4
4
  import { d as defineCustomElement$4 } from './mg-button2.js';
5
5
  import { d as defineCustomElement$3 } from './mg-card2.js';
6
6
  import { d as defineCustomElement$2 } from './mg-icon2.js';
@@ -19,7 +19,7 @@ const MgPopover = /*@__PURE__*/ proxyCustomElement(class MgPopover extends HTMLE
19
19
  * Sets an `id` attribute.
20
20
  * Needed by the input for accessibility `aria-decribedby`.
21
21
  */
22
- this.identifier = xt('mg-popover');
22
+ this.identifier = Pt('mg-popover');
23
23
  /**
24
24
  * Popover placement
25
25
  */
@@ -49,16 +49,6 @@ const MgPopover = /*@__PURE__*/ proxyCustomElement(class MgPopover extends HTMLE
49
49
  this.display = false;
50
50
  }
51
51
  };
52
- /**
53
- * Update aria-expanded attribute on interactive element
54
- * @param expanded - expanded state
55
- */
56
- this.updateAriaExpanded = (expanded) => {
57
- const interactiveElement = this.element.querySelector(':not([slot])');
58
- if (interactiveElement !== null) {
59
- interactiveElement.setAttribute('aria-expanded', String(expanded));
60
- }
61
- };
62
52
  /**
63
53
  * Show popover
64
54
  */
@@ -66,12 +56,13 @@ const MgPopover = /*@__PURE__*/ proxyCustomElement(class MgPopover extends HTMLE
66
56
  // Make the popover visible
67
57
  this.mgPopover.dataset.show = '';
68
58
  // Update aria-expanded
69
- this.updateAriaExpanded(true);
59
+ this.interactiveElement.setAttribute('aria-expanded', 'true');
70
60
  // hide when click outside
71
61
  // setTimeout is used to prevent event to trigger after creation
72
62
  setTimeout(() => {
73
63
  this.manageClickOutsideListeners('addEventListener');
74
64
  });
65
+ this.updatePopover();
75
66
  };
76
67
  /**
77
68
  * Hide popover
@@ -80,7 +71,7 @@ const MgPopover = /*@__PURE__*/ proxyCustomElement(class MgPopover extends HTMLE
80
71
  // Hide the popover
81
72
  this.mgPopover.removeAttribute('data-show');
82
73
  // Update aria-expanded
83
- this.updateAriaExpanded(false);
74
+ this.interactiveElement.setAttribute('aria-expanded', 'false');
84
75
  // Remove event listener
85
76
  this.manageClickOutsideListeners('removeEventListener');
86
77
  };
@@ -159,63 +150,50 @@ const MgPopover = /*@__PURE__*/ proxyCustomElement(class MgPopover extends HTMLE
159
150
  return Array.from(new Set([...currentSidePlacements, ...sides.filter(otherSide => otherSide !== side)])).filter(isFloatingUIPlacement);
160
151
  };
161
152
  /**
162
- * Set up Floating UI positioning and arrow behavior
163
- * @param interactiveElement - Element that triggers the popover
153
+ * Update popover position
154
+ * @returns autoUpdate function
164
155
  */
165
- this.setFloatingUI = (interactiveElement) => {
166
- this.floatingUICleanup = autoUpdate(interactiveElement, this.mgPopover, () => {
167
- computePosition(interactiveElement, this.mgPopover, {
168
- placement: this.placement,
169
- strategy: 'fixed',
170
- middleware: [
171
- offset(0),
172
- flip({
173
- fallbackPlacements: this.getClosestPlacements(this.placement),
174
- }),
175
- shift({
176
- limiter: limitShift(),
177
- }),
178
- arrow({
179
- element: this.mgPopover.querySelector('[data-floating-arrow]'),
180
- }),
181
- ],
182
- }).then(({ x, y, placement, middlewareData }) => {
183
- Object.assign(this.mgPopover.style, {
184
- position: 'fixed',
185
- top: '0',
186
- left: '0',
187
- transform: `translate(${Math.round(x)}px, ${Math.round(y)}px)`,
188
- });
189
- // Update arrow style
190
- const staticSide = {
191
- top: 'bottom',
192
- right: 'left',
193
- bottom: 'top',
194
- left: 'right',
195
- }[placement.split('-')[0]];
196
- const arrowElement = this.mgPopover.querySelector('[data-floating-arrow]');
197
- const { x: arrowX, y: arrowY } = middlewareData.arrow;
198
- // https://floating-ui.com/docs/arrow
199
- // Unlike the floating element, which has both coordinates defined at all times, the arrow only has one defined.
200
- // Due to this, either x or y will be undefined, depending on the side of placement.
201
- // The above code uses `isNaN` to check for null and undefined simultaneously.
202
- // Don't remove `isNaN`, because either value can be falsy (0), causing a bug!
203
- const numberToPx = (number) => (!isNaN(number) ? `${number}px` : '');
204
- if (arrowElement !== null)
205
- Object.assign(arrowElement.style, {
206
- position: 'absolute',
207
- left: numberToPx(arrowX),
208
- top: numberToPx(arrowY),
209
- [staticSide]: '1px',
210
- });
211
- this.mgPopover.setAttribute('data-placement', placement);
212
- });
156
+ this.updatePopover = () => autoUpdate(this.interactiveElement, this.mgPopover, async () => {
157
+ const { x, y, placement, middlewareData } = await computePosition(this.interactiveElement, this.mgPopover, {
158
+ placement: this.placement,
159
+ strategy: 'fixed',
160
+ middleware: [
161
+ offset(0),
162
+ flip({
163
+ fallbackPlacements: this.getClosestPlacements(this.placement),
164
+ }),
165
+ shift({
166
+ limiter: limitShift(),
167
+ }),
168
+ arrow({
169
+ element: this.arrowElement,
170
+ }),
171
+ ],
213
172
  });
214
- };
173
+ Object.assign(this.mgPopover.style, {
174
+ transform: getTransformation(x, y),
175
+ });
176
+ // Arrow positioning
177
+ if (this.arrowElement !== null) {
178
+ const { x: arrowX, y: arrowY } = middlewareData.arrow;
179
+ const staticSide = {
180
+ top: 'bottom',
181
+ right: 'left',
182
+ bottom: 'top',
183
+ left: 'right',
184
+ }[placement.split('-')[0]];
185
+ Object.assign(this.arrowElement.style, {
186
+ left: numberToPx(arrowX),
187
+ top: numberToPx(arrowY),
188
+ [staticSide]: '1px',
189
+ });
190
+ this.mgPopover.setAttribute('data-placement', placement);
191
+ }
192
+ });
215
193
  }
216
194
  validateIdentifier(newValue) {
217
- if (!Ot(newValue)) {
218
- throw new Error(`<mg-popover> prop "identifier" value is invalid. Passed value: ${zt(newValue)}.`);
195
+ if (!Ut(newValue)) {
196
+ throw new Error(`<mg-popover> prop "identifier" value is invalid. Passed value: ${Gt(newValue)}.`);
219
197
  }
220
198
  // use renderPopoverContent to update popover-content id
221
199
  this.renderPopoverContent();
@@ -249,14 +227,14 @@ const MgPopover = /*@__PURE__*/ proxyCustomElement(class MgPopover extends HTMLE
249
227
  * update popper position after props change on component did update hook to benefit from render ended
250
228
  */
251
229
  componentDidUpdate() {
252
- this.floatingUICleanup();
230
+ this.updatePopover();
253
231
  }
254
232
  /**
255
233
  * Check if component props are well configured on init
256
234
  */
257
235
  componentWillLoad() {
258
236
  // Get windows to attach events
259
- this.windows = Rt(window);
237
+ this.windows = Bt(window);
260
238
  // render mg-popover-content slot
261
239
  this.renderPopoverContent();
262
240
  this.validateCloseButton(this.closeButton);
@@ -270,26 +248,21 @@ const MgPopover = /*@__PURE__*/ proxyCustomElement(class MgPopover extends HTMLE
270
248
  componentDidLoad() {
271
249
  // Get popover content
272
250
  this.mgPopover = this.element.querySelector(`#${this.identifier}`);
251
+ // Get arrow element
252
+ this.arrowElement = this.mgPopover.querySelector('[data-floating-arrow]');
273
253
  // Get interactive element (first element without slot attribute)
274
- const interactiveElement = this.element.querySelector(':not([slot])');
254
+ this.interactiveElement = this.element.querySelector(':not([slot])');
275
255
  // Add aria attributes
276
- interactiveElement.setAttribute('aria-controls', this.identifier);
277
- interactiveElement.setAttribute('aria-expanded', `${this.display}`);
278
- // Initial styles configuration
279
- Object.assign(this.mgPopover.style, {
280
- position: 'fixed',
281
- });
282
- // Create Floating UI instance
283
- this.setFloatingUI(interactiveElement);
256
+ this.interactiveElement.setAttribute('aria-controls', this.identifier);
257
+ this.interactiveElement.setAttribute('aria-expanded', `${this.display}`);
284
258
  // Add resize observer
285
- [interactiveElement, this.mgPopoverContent].forEach(element => {
259
+ [this.interactiveElement, this.mgPopoverContent].forEach(element => {
286
260
  new ResizeObserver(() => {
287
- this.floatingUICleanup();
288
- this.setFloatingUI(interactiveElement);
261
+ this.updatePopover();
289
262
  }).observe(element);
290
263
  });
291
264
  // Add events to toggle display
292
- interactiveElement.addEventListener('click', () => {
265
+ this.interactiveElement.addEventListener('click', () => {
293
266
  if (!this.disabled)
294
267
  this.display = !this.display;
295
268
  });
@@ -304,7 +277,7 @@ const MgPopover = /*@__PURE__*/ proxyCustomElement(class MgPopover extends HTMLE
304
277
  if (!this.disabled && e.code === 'Escape') {
305
278
  this.display = false;
306
279
  this.componentClose.emit();
307
- interactiveElement.focus();
280
+ this.interactiveElement.focus();
308
281
  }
309
282
  });
310
283
  this.handleDisplay(this.display);
@@ -313,15 +286,16 @@ const MgPopover = /*@__PURE__*/ proxyCustomElement(class MgPopover extends HTMLE
313
286
  * Cleanup when component is disconnected
314
287
  */
315
288
  disconnectedCallback() {
289
+ var _a;
316
290
  // Cleanup Floating UI instance
317
- this.floatingUICleanup();
291
+ (_a = this.updatePopover) === null || _a === void 0 ? void 0 : _a.call(this);
318
292
  }
319
293
  /**
320
294
  * Render
321
295
  * @returns HTML Element
322
296
  */
323
297
  render() {
324
- return (h(Host, { key: 'a2c883c6f1458bfc76d77d944afe99210d0ecdb3' }, h("slot", { key: 'c3d2e25f47c5761be6594cb6cd487e4960e5d30b' }), h("slot", { key: '93bb53d3eac2c2b966eacb00b772faa403b5a86c', name: "content" })));
298
+ return (h(Host, { key: '26244db5e6a35b731b5220c06b77ad1f14378245' }, h("slot", { key: '92ca05ac9637cf9634d86b177393fd6d0e6c6796' }), h("slot", { key: 'bdc8f8a8b4f2c891e473cdac5a305c3f1ab615b0', name: "content" })));
325
299
  }
326
300
  get element() { return this; }
327
301
  static get watchers() { return {