@mgdis/mg-components 3.1.0 → 4.0.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 (241) hide show
  1. package/dist/cjs/{index-85a4a0b6.js → index-88560a66.js} +123 -48
  2. package/dist/cjs/index-a39c5567.js +233 -0
  3. package/dist/cjs/loader.cjs.js +3 -17
  4. package/dist/cjs/mg-badge_21.cjs.entry.js +3538 -0
  5. package/dist/cjs/mg-components.cjs.js +3 -7
  6. package/dist/cjs/mg-modal.cjs.entry.js +117 -0
  7. package/dist/cjs/mg-popover.cjs.entry.js +170 -0
  8. package/dist/cjs/popper-71bf3058.js +1790 -0
  9. package/dist/collection/collection-manifest.json +4 -1
  10. package/dist/collection/components/atoms/mg-badge/{mg-badge.stories.js → doc/mg-badge.stories.js} +4 -1
  11. package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js +1 -1
  12. package/dist/collection/components/atoms/mg-badge/mg-badge.css +0 -2
  13. package/dist/collection/components/atoms/mg-badge/mg-badge.js +26 -10
  14. package/dist/collection/components/atoms/mg-button/{mg-button.stories.js → doc/mg-button.stories.js} +7 -2
  15. package/dist/collection/components/atoms/mg-button/mg-button.conf.js +1 -1
  16. package/dist/collection/components/atoms/mg-button/mg-button.css +46 -49
  17. package/dist/collection/components/atoms/mg-button/mg-button.js +78 -4
  18. package/dist/collection/components/atoms/mg-character-left/{mg-character-left.stories.js → doc/mg-character-left.stories.js} +8 -0
  19. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +20 -46
  20. package/dist/collection/components/atoms/mg-icon/{mg-icon.stories.js → doc/mg-icon.stories.js} +1 -1
  21. package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +104 -9
  22. package/dist/collection/components/atoms/mg-icon/mg-icon.css +9 -7
  23. package/dist/collection/components/atoms/mg-icon/mg-icon.js +33 -7
  24. package/dist/collection/components/atoms/mg-input-title/{mg-input-title.stories.js → doc/mg-input-title.stories.js} +0 -0
  25. package/dist/collection/components/atoms/mg-input-title/mg-input-title.css +4 -4
  26. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +14 -3
  27. package/dist/collection/components/atoms/mg-tag/{mg-tag.stories.js → doc/mg-tag.stories.js} +4 -1
  28. package/dist/collection/components/atoms/mg-tag/mg-tag.js +28 -6
  29. package/dist/collection/components/atoms/mg-tooltip/{mg-tooltip.stories.js → doc/mg-tooltip.stories.js} +14 -1
  30. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +20 -0
  31. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +16 -2
  32. package/dist/collection/components/molecules/inputs/MgInput.conf.js +1 -7
  33. package/dist/collection/components/molecules/inputs/MgInput.js +25 -29
  34. package/dist/collection/components/molecules/inputs/mg-input-checkbox/{mg-input-checkbox.stories.js → doc/mg-input-checkbox.stories.js} +6 -1
  35. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +25 -11
  36. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +102 -52
  37. package/dist/collection/components/molecules/inputs/mg-input-date/{mg-input-date.stories.js → doc/mg-input-date.stories.js} +6 -1
  38. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +37 -9
  39. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +136 -66
  40. package/dist/collection/components/molecules/inputs/mg-input-numeric/{mg-input-numeric.stories.js → doc/mg-input-numeric.stories.js} +15 -3
  41. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +38 -10
  42. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +180 -80
  43. package/dist/collection/components/molecules/inputs/mg-input-password/{mg-input-password.stories.js → doc/mg-input-password.stories.js} +16 -2
  44. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +37 -9
  45. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +108 -47
  46. package/dist/collection/components/molecules/inputs/mg-input-radio/{mg-input-radio.stories.js → doc/mg-input-radio.stories.js} +6 -1
  47. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +25 -11
  48. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +113 -42
  49. package/dist/collection/components/molecules/inputs/mg-input-select/{mg-input-select.stories.js → doc/mg-input-select.stories.js} +22 -2
  50. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +39 -10
  51. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +145 -71
  52. package/dist/collection/components/molecules/inputs/mg-input-text/{mg-input-text.stories.js → doc/mg-input-text.stories.js} +17 -8
  53. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +69 -19
  54. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +184 -83
  55. package/dist/collection/components/molecules/inputs/mg-input-textarea/{mg-input-textarea.stories.js → doc/mg-input-textarea.stories.js} +16 -5
  56. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +69 -13
  57. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +163 -70
  58. package/dist/collection/components/molecules/inputs/mg-input-toggle/{mg-input-toggle.stories.js → doc/mg-input-toggle.stories.js} +6 -1
  59. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +22 -10
  60. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +68 -33
  61. package/dist/collection/components/molecules/mg-form/doc/mg-form.stories.js +58 -0
  62. package/dist/collection/components/molecules/mg-form/mg-form.css +19 -0
  63. package/dist/collection/components/molecules/mg-form/mg-form.js +271 -0
  64. package/dist/collection/components/molecules/mg-message/{mg-message.stories.js → doc/mg-message.stories.js} +6 -2
  65. package/dist/collection/components/molecules/mg-message/mg-message.css +1 -1
  66. package/dist/collection/components/molecules/mg-message/mg-message.js +26 -11
  67. package/dist/collection/components/molecules/mg-modal/doc/mg-modal.stories.js +51 -0
  68. package/dist/collection/components/molecules/mg-modal/mg-modal.css +52 -0
  69. package/dist/collection/components/molecules/mg-modal/mg-modal.js +240 -0
  70. package/dist/collection/components/molecules/mg-pagination/{mg-pagination.stories.js → doc/mg-pagination.stories.js} +1 -0
  71. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +47 -28
  72. package/dist/collection/components/molecules/mg-panel/doc/mg-panel.stories.js +39 -0
  73. package/dist/collection/components/molecules/mg-panel/mg-panel.css +53 -0
  74. package/dist/collection/components/molecules/mg-panel/mg-panel.js +356 -0
  75. package/dist/collection/components/molecules/mg-popover/{mg-popover.stories.js → doc/mg-popover.stories.js} +10 -0
  76. package/dist/collection/components/molecules/mg-popover/mg-popover.conf.js +20 -0
  77. package/dist/collection/components/molecules/mg-popover/mg-popover.css +2 -2
  78. package/dist/collection/components/molecules/mg-popover/mg-popover.js +37 -12
  79. package/dist/collection/components/molecules/mg-tabs/{mg-tabs.stories.js → doc/mg-tabs.stories.js} +20 -4
  80. package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +11 -1
  81. package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +17 -3
  82. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +139 -26
  83. package/dist/collection/locales/index.js +33 -4
  84. package/dist/collection/stories/helpers.stories.js +33 -0
  85. package/dist/collection/utils/components.utils.js +16 -9
  86. package/dist/collection/utils/locale.utils.js +13 -7
  87. package/dist/collection/utils/test.utils.js +27 -15
  88. package/dist/collection/variables.css +39 -5
  89. package/dist/collection/variables.scss +39 -5
  90. package/dist/components/MgInput.js +26 -37
  91. package/dist/components/components.utils.js +16 -9
  92. package/dist/components/index.d.ts +24 -6
  93. package/dist/components/index.js +23 -0
  94. package/dist/components/index2.js +116 -17
  95. package/dist/components/locale.utils.js +13 -8
  96. package/dist/components/mg-badge2.js +25 -9
  97. package/dist/components/mg-button2.js +29 -5
  98. package/dist/components/mg-character-left2.js +14 -26
  99. package/dist/components/mg-form.d.ts +11 -0
  100. package/dist/components/mg-form.js +148 -0
  101. package/dist/components/mg-icon2.js +138 -17
  102. package/dist/components/mg-input-checkbox.js +66 -53
  103. package/dist/components/mg-input-date.js +100 -69
  104. package/dist/components/mg-input-numeric.js +125 -81
  105. package/dist/components/mg-input-password.js +69 -48
  106. package/dist/components/mg-input-radio.js +74 -46
  107. package/dist/components/mg-input-select2.js +103 -71
  108. package/dist/components/mg-input-text.js +1 -237
  109. package/dist/components/mg-input-text2.js +300 -0
  110. package/dist/components/mg-input-textarea.js +100 -46
  111. package/dist/components/mg-input-title2.js +13 -4
  112. package/dist/components/mg-input-toggle.js +39 -31
  113. package/dist/components/mg-message.js +25 -10
  114. package/dist/components/mg-modal.d.ts +11 -0
  115. package/dist/components/mg-modal.js +153 -0
  116. package/dist/components/mg-pagination.js +45 -31
  117. package/dist/components/mg-panel.d.ts +11 -0
  118. package/dist/components/mg-panel.js +244 -0
  119. package/dist/components/mg-popover.js +31 -11
  120. package/dist/components/mg-tabs.js +113 -23
  121. package/dist/components/mg-tag.js +27 -5
  122. package/dist/components/mg-tooltip2.js +10 -1
  123. package/dist/components/popper.js +6 -2
  124. package/dist/esm/{index-e3e84606.js → index-bca81100.js} +124 -46
  125. package/dist/esm/index-e51ae032.js +228 -0
  126. package/dist/esm/loader.js +3 -17
  127. package/dist/esm/mg-badge_21.entry.js +3514 -0
  128. package/dist/esm/mg-components.js +3 -7
  129. package/dist/esm/mg-modal.entry.js +113 -0
  130. package/dist/esm/mg-popover.entry.js +166 -0
  131. package/dist/esm/polyfills/css-shim.js +1 -1
  132. package/dist/esm/popper-93ecb064.js +1788 -0
  133. package/dist/index.js +1 -1
  134. package/dist/mg-components/mg-components.css +1 -1
  135. package/dist/mg-components/mg-components.esm.js +1 -1
  136. package/dist/mg-components/p-003a1344.entry.js +1 -0
  137. package/dist/mg-components/p-462d648a.entry.js +1 -0
  138. package/dist/mg-components/p-4c66f794.js +1 -0
  139. package/dist/mg-components/p-5126ab10.entry.js +1 -0
  140. package/dist/mg-components/p-780bd52d.js +1 -0
  141. package/dist/mg-components/p-b14a3443.js +2 -0
  142. package/dist/mg-components/variables.css +39 -5
  143. package/dist/mg-components/variables.scss +39 -5
  144. package/dist/types/components/atoms/mg-badge/{mg-badge.stories.d.ts → doc/mg-badge.stories.d.ts} +5 -0
  145. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +16 -5
  146. package/dist/types/components/atoms/mg-button/{mg-button.stories.d.ts → doc/mg-button.stories.d.ts} +5 -0
  147. package/dist/types/components/atoms/mg-button/mg-button.d.ts +23 -3
  148. package/dist/types/components/atoms/mg-character-left/{mg-character-left.stories.d.ts → doc/mg-character-left.stories.d.ts} +9 -0
  149. package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +16 -13
  150. package/dist/types/components/atoms/mg-icon/{mg-icon.stories.d.ts → doc/mg-icon.stories.d.ts} +0 -0
  151. package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +1 -1
  152. package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +14 -4
  153. package/dist/types/components/atoms/mg-input-title/{mg-input-title.stories.d.ts → doc/mg-input-title.stories.d.ts} +0 -0
  154. package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +11 -1
  155. package/dist/types/components/atoms/mg-tag/{mg-tag.stories.d.ts → doc/mg-tag.stories.d.ts} +5 -0
  156. package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +18 -4
  157. package/dist/types/components/atoms/mg-tooltip/doc/mg-tooltip.stories.d.ts +29 -0
  158. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.conf.d.ts +8 -0
  159. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +13 -3
  160. package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +6 -4
  161. package/dist/types/components/molecules/inputs/MgInput.d.ts +7 -8
  162. package/dist/types/components/molecules/inputs/mg-input-checkbox/{mg-input-checkbox.stories.d.ts → doc/mg-input-checkbox.stories.d.ts} +5 -0
  163. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +36 -13
  164. package/dist/types/components/molecules/inputs/mg-input-date/{mg-input-date.stories.d.ts → doc/mg-input-date.stories.d.ts} +5 -0
  165. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +46 -15
  166. package/dist/types/components/molecules/inputs/mg-input-numeric/{mg-input-numeric.stories.d.ts → doc/mg-input-numeric.stories.d.ts} +11 -0
  167. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +61 -16
  168. package/dist/types/components/molecules/inputs/mg-input-password/doc/mg-input-password.stories.d.ts +22 -0
  169. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +35 -11
  170. package/dist/types/components/molecules/inputs/mg-input-radio/{mg-input-radio.stories.d.ts → doc/mg-input-radio.stories.d.ts} +5 -0
  171. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.d.ts +1 -1
  172. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +42 -9
  173. package/dist/types/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.d.ts +34 -0
  174. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.conf.d.ts +1 -1
  175. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +37 -9
  176. package/dist/types/components/molecules/inputs/mg-input-text/{mg-input-text.stories.d.ts → doc/mg-input-text.stories.d.ts} +13 -0
  177. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +52 -16
  178. package/dist/types/components/molecules/inputs/mg-input-textarea/doc/mg-input-textarea.stories.d.ts +19 -0
  179. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +45 -17
  180. package/dist/types/components/molecules/inputs/mg-input-toggle/{mg-input-toggle.stories.d.ts → doc/mg-input-toggle.stories.d.ts} +5 -0
  181. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.d.ts +1 -1
  182. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +29 -12
  183. package/dist/types/components/molecules/{mg-popover/mg-popover.stories.d.ts → mg-form/doc/mg-form.stories.d.ts} +3 -4
  184. package/dist/types/components/molecules/mg-form/mg-form.d.ts +83 -0
  185. package/dist/types/components/molecules/mg-message/{mg-message.stories.d.ts → doc/mg-message.stories.d.ts} +10 -0
  186. package/dist/types/components/molecules/mg-message/mg-message.d.ts +13 -4
  187. package/dist/types/components/molecules/mg-modal/doc/mg-modal.stories.d.ts +13 -0
  188. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +85 -0
  189. package/dist/types/components/molecules/mg-pagination/{mg-pagination.stories.d.ts → doc/mg-pagination.stories.d.ts} +5 -0
  190. package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +31 -7
  191. package/dist/types/components/molecules/mg-panel/doc/mg-panel.stories.d.ts +11 -0
  192. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +139 -0
  193. package/dist/types/components/molecules/mg-popover/doc/mg-popover.stories.d.ts +25 -0
  194. package/dist/types/components/molecules/mg-popover/mg-popover.conf.d.ts +8 -0
  195. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +27 -4
  196. package/dist/types/components/molecules/mg-tabs/doc/mg-tabs.stories.d.ts +20 -0
  197. package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +11 -0
  198. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +70 -6
  199. package/dist/types/components.d.ts +528 -211
  200. package/dist/types/locales/index.d.ts +108 -38
  201. package/dist/types/stories/{buttons.stories.d.ts → helpers.stories.d.ts} +1 -1
  202. package/dist/types/utils/components.utils.d.ts +16 -9
  203. package/dist/types/utils/locale.utils.d.ts +13 -6
  204. package/dist/types/utils/test.utils.d.ts +13 -1
  205. package/loader/index.js +1 -1
  206. package/package.json +45 -14
  207. package/readme.md +9 -35
  208. package/dist/cjs/css-shim-a22512c4.js +0 -6
  209. package/dist/cjs/mg-badge_20.cjs.entry.js +0 -4661
  210. package/dist/cjs/shadow-css-8940f82d.js +0 -390
  211. package/dist/collection/stories/buttons.stories.js +0 -43
  212. package/dist/collection/stories/messages.stories.js +0 -44
  213. package/dist/collection/stories/tags.stories.js +0 -13
  214. package/dist/esm/css-shim-7c240feb.js +0 -4
  215. package/dist/esm/mg-badge_20.entry.js +0 -4638
  216. package/dist/esm/shadow-css-5d2d01ce.js +0 -388
  217. package/dist/esm-es5/css-shim-7c240feb.js +0 -1
  218. package/dist/esm-es5/index-e3e84606.js +0 -1
  219. package/dist/esm-es5/index.js +0 -0
  220. package/dist/esm-es5/loader.js +0 -1
  221. package/dist/esm-es5/mg-badge_20.entry.js +0 -2
  222. package/dist/esm-es5/mg-components.js +0 -1
  223. package/dist/esm-es5/shadow-css-5d2d01ce.js +0 -12
  224. package/dist/mg-components/mg-components.js +0 -132
  225. package/dist/mg-components/p-1cd24462.system.js +0 -1
  226. package/dist/mg-components/p-2e2f6b27.system.entry.js +0 -2
  227. package/dist/mg-components/p-366a224e.js +0 -1
  228. package/dist/mg-components/p-422c429b.system.js +0 -1
  229. package/dist/mg-components/p-50ea2036.system.js +0 -1
  230. package/dist/mg-components/p-62fa3797.js +0 -1
  231. package/dist/mg-components/p-71d57b8b.system.js +0 -13
  232. package/dist/mg-components/p-9a215712.system.js +0 -1
  233. package/dist/mg-components/p-cbf0464b.entry.js +0 -1
  234. package/dist/mg-components/p-f6455ab3.js +0 -12
  235. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.stories.d.ts +0 -11
  236. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.stories.d.ts +0 -9
  237. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.stories.d.ts +0 -14
  238. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.stories.d.ts +0 -6
  239. package/dist/types/components/molecules/mg-tabs/mg-tabs.stories.d.ts +0 -7
  240. package/dist/types/stories/messages.stories.d.ts +0 -13
  241. package/dist/types/stories/tags.stories.d.ts +0 -5
@@ -0,0 +1 @@
1
+ var t="top",n="bottom",e="right",r="left",o=[t,n,e,r],i=o.reduce((function(t,n){return t.concat([n+"-start",n+"-end"])}),[]),a=[].concat(o,["auto"]).reduce((function(t,n){return t.concat([n,n+"-start",n+"-end"])}),[]),u=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function f(t){return t?(t.nodeName||"").toLowerCase():null}function c(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function p(t){return t instanceof c(t).Element||t instanceof Element}function d(t){return t instanceof c(t).HTMLElement||t instanceof HTMLElement}function s(t){return"undefined"!=typeof ShadowRoot&&(t instanceof c(t).ShadowRoot||t instanceof ShadowRoot)}function l(t){return t.split("-")[0]}var v=Math.max,b=Math.min,h=Math.round;function y(t,n){void 0===n&&(n=!1);var e=t.getBoundingClientRect(),r=1,o=1;if(d(t)&&n){var i=t.offsetHeight,a=t.offsetWidth;a>0&&(r=h(e.width)/a||1),i>0&&(o=h(e.height)/i||1)}return{width:e.width/r,height:e.height/o,top:e.top/o,right:e.right/r,bottom:e.bottom/o,left:e.left/r,x:e.left/r,y:e.top/o}}function m(t){var n=y(t),e=t.offsetWidth,r=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-r)<=1&&(r=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:r}}function x(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&s(e)){var r=n;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function w(t){return c(t).getComputedStyle(t)}function O(t){return["table","td","th"].indexOf(f(t))>=0}function g(t){return((p(t)?t.ownerDocument:t.document)||window.document).documentElement}function j(t){return"html"===f(t)?t:t.assignedSlot||t.parentNode||(s(t)?t.host:null)||g(t)}function M(t){return d(t)&&"fixed"!==w(t).position?t.offsetParent:null}function k(t){for(var n=c(t),e=M(t);e&&O(e)&&"static"===w(e).position;)e=M(e);return e&&("html"===f(e)||"body"===f(e)&&"static"===w(e).position)?n:e||function(t){var n=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&d(t)&&"fixed"===w(t).position)return null;var e=j(t);for(s(e)&&(e=e.host);d(e)&&["html","body"].indexOf(f(e))<0;){var r=w(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||n&&"filter"===r.willChange||n&&r.filter&&"none"!==r.filter)return e;e=e.parentNode}return null}(t)||n}function E(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function q(t,n,e){return v(t,b(n,e))}function A(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function B(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function P(t){return t.split("-")[1]}var R={top:"auto",right:"auto",bottom:"auto",left:"auto"};function S(o){var i,a=o.popper,u=o.popperRect,f=o.placement,p=o.variation,d=o.offsets,s=o.position,l=o.gpuAcceleration,v=o.adaptive,b=o.roundOffsets,y=o.isFixed,m=d.x,x=void 0===m?0:m,O=d.y,j=void 0===O?0:O,M="function"==typeof b?b({x,y:j}):{x,y:j};x=M.x,j=M.y;var E=d.hasOwnProperty("x"),q=d.hasOwnProperty("y"),A=r,B=t,P=window;if(v){var S=k(a),W="clientHeight",L="clientWidth";S===c(a)&&"static"!==w(S=g(a)).position&&"absolute"===s&&(W="scrollHeight",L="scrollWidth"),S=S,(f===t||(f===r||f===e)&&"end"===p)&&(B=n,j-=(y&&S===P&&P.visualViewport?P.visualViewport.height:S[W])-u.height,j*=l?1:-1),f!==r&&(f!==t&&f!==n||"end"!==p)||(A=e,x-=(y&&S===P&&P.visualViewport?P.visualViewport.width:S[L])-u.width,x*=l?1:-1)}var T,H=Object.assign({position:s},v&&R),I=!0===b?function(t){var n=t.y,e=window.devicePixelRatio||1;return{x:h(t.x*e)/e||0,y:h(n*e)/e||0}}({x,y:j}):{x,y:j};return x=I.x,j=I.y,Object.assign({},H,l?((T={})[B]=q?"0":"",T[A]=E?"0":"",T.transform=(P.devicePixelRatio||1)<=1?"translate("+x+"px, "+j+"px)":"translate3d("+x+"px, "+j+"px, 0)",T):((i={})[B]=q?j+"px":"",i[A]=E?x+"px":"",i.transform="",i))}var W={passive:!0},L={left:"right",right:"left",bottom:"top",top:"bottom"};function T(t){return t.replace(/left|right|bottom|top/g,(function(t){return L[t]}))}var H={start:"end",end:"start"};function I(t){return t.replace(/start|end/g,(function(t){return H[t]}))}function z(t){var n=c(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function C(t){return y(g(t)).left+z(t).scrollLeft}function D(t){var n=w(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function F(t){return["html","body","#document"].indexOf(f(t))>=0?t.ownerDocument.body:d(t)&&D(t)?t:F(j(t))}function U(t,n){var e;void 0===n&&(n=[]);var r=F(t),o=r===(null==(e=t.ownerDocument)?void 0:e.body),i=c(r),a=o?[i].concat(i.visualViewport||[],D(r)?r:[]):r,u=n.concat(a);return o?u:u.concat(U(j(a)))}function V(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function _(t,n){return"viewport"===n?V(function(t){var n=c(t),e=g(t),r=n.visualViewport,o=e.clientWidth,i=e.clientHeight,a=0,u=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,u=r.offsetTop)),{width:o,height:i,x:a+C(t),y:u}}(t)):p(n)?function(t){var n=y(t);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(n):V(function(t){var n,e=g(t),r=z(t),o=null==(n=t.ownerDocument)?void 0:n.body,i=v(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=v(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-r.scrollLeft+C(t),f=-r.scrollTop;return"rtl"===w(o||e).direction&&(u+=v(e.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:u,y:f}}(g(t)))}function G(o){var i,a=o.reference,u=o.element,f=o.placement,c=f?l(f):null,p=f?P(f):null,d=a.x+a.width/2-u.width/2,s=a.y+a.height/2-u.height/2;switch(c){case t:i={x:d,y:a.y-u.height};break;case n:i={x:d,y:a.y+a.height};break;case e:i={x:a.x+a.width,y:s};break;case r:i={x:a.x-u.width,y:s};break;default:i={x:a.x,y:a.y}}var v=c?E(c):null;if(null!=v){var b="y"===v?"height":"width";switch(p){case"start":i[v]=i[v]-(a[b]/2-u[b]/2);break;case"end":i[v]=i[v]+(a[b]/2-u[b]/2)}}return i}function J(r,i){void 0===i&&(i={});var a=i.placement,u=void 0===a?r.placement:a,c=i.boundary,s=void 0===c?"clippingParents":c,l=i.rootBoundary,h=void 0===l?"viewport":l,m=i.elementContext,O=void 0===m?"popper":m,M=i.altBoundary,E=void 0!==M&&M,q=i.padding,P=void 0===q?0:q,R=A("number"!=typeof P?P:B(P,o)),S=r.rects.popper,W=r.elements[E?"popper"===O?"reference":"popper":O],L=function(t,n,e){var r="clippingParents"===n?function(t){var n=U(j(t)),e=["absolute","fixed"].indexOf(w(t).position)>=0&&d(t)?k(t):t;return p(e)?n.filter((function(t){return p(t)&&x(t,e)&&"body"!==f(t)})):[]}(t):[].concat(n),o=[].concat(r,[e]),i=o.reduce((function(n,e){var r=_(t,e);return n.top=v(r.top,n.top),n.right=b(r.right,n.right),n.bottom=b(r.bottom,n.bottom),n.left=v(r.left,n.left),n}),_(t,o[0]));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}(p(W)?W:W.contextElement||g(r.elements.popper),s,h),T=y(r.elements.reference),H=G({reference:T,element:S,strategy:"absolute",placement:u}),I=V(Object.assign({},S,H)),z="popper"===O?I:T,C={top:L.top-z.top+R.top,bottom:z.bottom-L.bottom+R.bottom,left:L.left-z.left+R.left,right:z.right-L.right+R.right},D=r.modifiersData.offset;if("popper"===O&&D){var F=D[u];Object.keys(C).forEach((function(r){var o=[e,n].indexOf(r)>=0?1:-1,i=[t,n].indexOf(r)>=0?"y":"x";C[r]+=F[i]*o}))}return C}function K(t,n){void 0===n&&(n={});var e=n.boundary,r=n.rootBoundary,u=n.padding,f=n.flipVariations,c=n.allowedAutoPlacements,p=void 0===c?a:c,d=P(n.placement),s=d?f?i:i.filter((function(t){return P(t)===d})):o,v=s.filter((function(t){return p.indexOf(t)>=0}));0===v.length&&(v=s);var b=v.reduce((function(n,o){return n[o]=J(t,{placement:o,boundary:e,rootBoundary:r,padding:u})[l(o)],n}),{});return Object.keys(b).sort((function(t,n){return b[t]-b[n]}))}function N(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function Q(o){return[t,e,n,r].some((function(t){return o[t]>=0}))}function X(t,n,e){void 0===e&&(e=!1);var r,o,i=d(n),a=d(n)&&function(t){var n=t.getBoundingClientRect(),e=h(n.width)/t.offsetWidth||1,r=h(n.height)/t.offsetHeight||1;return 1!==e||1!==r}(n),u=g(n),p=y(t,a),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&(("body"!==f(n)||D(u))&&(s=(r=n)!==c(r)&&d(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:z(r)),d(n)?((l=y(n,!0)).x+=n.clientLeft,l.y+=n.clientTop):u&&(l.x=C(u))),{x:p.left+s.scrollLeft-l.x,y:p.top+s.scrollTop-l.y,width:p.width,height:p.height}}function Y(t){var n=new Map,e=new Set,r=[];function o(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var r=n.get(t);r&&o(r)}})),r.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||o(t)})),r}var Z={placement:"bottom",modifiers:[],strategy:"absolute"};function $(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function tt(t){void 0===t&&(t={});var n=t.defaultModifiers,e=void 0===n?[]:n,r=t.defaultOptions,o=void 0===r?Z:r;return function(t,n,r){void 0===r&&(r=o);var i,a,f={placement:"bottom",orderedModifiers:[],options:Object.assign({},Z,o),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},c=[],d=!1,s={state:f,setOptions:function(r){var i="function"==typeof r?r(f.options):r;l(),f.options=Object.assign({},o,f.options,i),f.scrollParents={reference:p(t)?U(t):t.contextElement?U(t.contextElement):[],popper:U(n)};var a,d,v=function(t){var n=Y(t);return u.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}((a=[].concat(e,f.options.modifiers),d=a.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{}),Object.keys(d).map((function(t){return d[t]}))));return f.orderedModifiers=v.filter((function(t){return t.enabled})),f.orderedModifiers.forEach((function(t){var n=t.options,e=t.effect;if("function"==typeof e){var r=e({state:f,name:t.name,instance:s,options:void 0===n?{}:n});c.push(r||function(){})}})),s.update()},forceUpdate:function(){if(!d){var t=f.elements,n=t.reference,e=t.popper;if($(n,e)){f.rects={reference:X(n,k(e),"fixed"===f.options.strategy),popper:m(e)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach((function(t){return f.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<f.orderedModifiers.length;r++)if(!0!==f.reset){var o=f.orderedModifiers[r],i=o.fn,a=o.options;"function"==typeof i&&(f=i({state:f,options:void 0===a?{}:a,name:o.name,instance:s})||f)}else f.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(t){s.forceUpdate(),t(f)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(i())}))}))),a}),destroy:function(){l(),d=!0}};if(!$(t,n))return s;function l(){c.forEach((function(t){return t()})),c=[]}return s.setOptions(r).then((function(t){!d&&r.onFirstUpdate&&r.onFirstUpdate(t)})),s}}var nt=tt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,r=t.options,o=r.scroll,i=void 0===o||o,a=r.resize,u=void 0===a||a,f=c(n.elements.popper),p=[].concat(n.scrollParents.reference,n.scrollParents.popper);return i&&p.forEach((function(t){t.addEventListener("scroll",e.update,W)})),u&&f.addEventListener("resize",e.update,W),function(){i&&p.forEach((function(t){t.removeEventListener("scroll",e.update,W)})),u&&f.removeEventListener("resize",e.update,W)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state;n.modifiersData[t.name]=G({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,r=e.gpuAcceleration,o=void 0===r||r,i=e.adaptive,a=void 0===i||i,u=e.roundOffsets,f=void 0===u||u,c={placement:l(n.placement),variation:P(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:o,isFixed:"fixed"===n.options.strategy};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,S(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:a,roundOffsets:f})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,S(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},r=n.attributes[t]||{},o=n.elements[t];d(o)&&f(o)&&(Object.assign(o.style,e),Object.keys(r).forEach((function(t){var n=r[t];!1===n?o.removeAttribute(t):o.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var r=n.elements[t],o=n.attributes[t]||{},i=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});d(r)&&f(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(n){var o=n.state,i=n.name,u=n.options.offset,f=void 0===u?[0,0]:u,c=a.reduce((function(n,i){return n[i]=function(n,o,i){var a=l(n),u=[r,t].indexOf(a)>=0?-1:1,f="function"==typeof i?i(Object.assign({},o,{placement:n})):i,c=f[0],p=f[1];return c=c||0,p=(p||0)*u,[r,e].indexOf(a)>=0?{x:p,y:c}:{x:c,y:p}}(i,o.rects,f),n}),{}),p=c[o.placement],d=p.y;null!=o.modifiersData.popperOffsets&&(o.modifiersData.popperOffsets.x+=p.x,o.modifiersData.popperOffsets.y+=d),o.modifiersData[i]=c}},{name:"flip",enabled:!0,phase:"main",fn:function(o){var i=o.state,a=o.options,u=o.name;if(!i.modifiersData[u]._skip){for(var f=a.mainAxis,c=void 0===f||f,p=a.altAxis,d=void 0===p||p,s=a.fallbackPlacements,v=a.padding,b=a.boundary,h=a.rootBoundary,y=a.altBoundary,m=a.flipVariations,x=void 0===m||m,w=a.allowedAutoPlacements,O=i.options.placement,g=l(O),j=s||(g!==O&&x?function(t){if("auto"===l(t))return[];var n=T(t);return[I(t),n,I(n)]}(O):[T(O)]),M=[O].concat(j).reduce((function(t,n){return t.concat("auto"===l(n)?K(i,{placement:n,boundary:b,rootBoundary:h,padding:v,flipVariations:x,allowedAutoPlacements:w}):n)}),[]),k=i.rects.reference,E=i.rects.popper,q=new Map,A=!0,B=M[0],R=0;R<M.length;R++){var S=M[R],W=l(S),L="start"===P(S),H=[t,n].indexOf(W)>=0,z=H?"width":"height",C=J(i,{placement:S,boundary:b,rootBoundary:h,altBoundary:y,padding:v}),D=H?L?e:r:L?n:t;k[z]>E[z]&&(D=T(D));var F=T(D),U=[];if(c&&U.push(C[W]<=0),d&&U.push(C[D]<=0,C[F]<=0),U.every((function(t){return t}))){B=S,A=!1;break}q.set(S,U)}if(A)for(var V=function(t){var n=M.find((function(n){var e=q.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return B=n,"break"},_=x?3:1;_>0&&"break"!==V(_);_--);i.placement!==B&&(i.modifiersData[u]._skip=!0,i.placement=B,i.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(o){var i=o.state,a=o.options,u=o.name,f=a.mainAxis,c=void 0===f||f,p=a.altAxis,d=void 0!==p&&p,s=a.tether,h=void 0===s||s,y=a.tetherOffset,x=void 0===y?0:y,w=J(i,{boundary:a.boundary,rootBoundary:a.rootBoundary,padding:a.padding,altBoundary:a.altBoundary}),O=l(i.placement),g=P(i.placement),j=!g,M=E(O),A="x"===M?"y":"x",B=i.modifiersData.popperOffsets,R=i.rects.reference,S=i.rects.popper,W="function"==typeof x?x(Object.assign({},i.rects,{placement:i.placement})):x,L="number"==typeof W?{mainAxis:W,altAxis:W}:Object.assign({mainAxis:0,altAxis:0},W),T=i.modifiersData.offset?i.modifiersData.offset[i.placement]:null,H={x:0,y:0};if(B){if(c){var I,z="y"===M?t:r,C="y"===M?n:e,D="y"===M?"height":"width",F=B[M],U=F+w[z],V=F-w[C],_=h?-S[D]/2:0,G="start"===g?R[D]:S[D],K="start"===g?-S[D]:-R[D],N=i.elements.arrow,Q=h&&N?m(N):{width:0,height:0},X=i.modifiersData["arrow#persistent"]?i.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Y=X[z],Z=X[C],$=q(0,R[D],Q[D]),tt=j?R[D]/2-_-$-Y-L.mainAxis:G-$-Y-L.mainAxis,nt=j?-R[D]/2+_+$+Z+L.mainAxis:K+$+Z+L.mainAxis,et=i.elements.arrow&&k(i.elements.arrow),rt=null!=(I=null==T?void 0:T[M])?I:0,ot=F+nt-rt,it=q(h?b(U,F+tt-rt-(et?"y"===M?et.clientTop||0:et.clientLeft||0:0)):U,F,h?v(V,ot):V);B[M]=it,H[M]=it-F}if(d){var at,ut=B[A],ft="y"===A?"height":"width",ct=ut+w["x"===M?t:r],pt=ut-w["x"===M?n:e],dt=-1!==[t,r].indexOf(O),st=null!=(at=null==T?void 0:T[A])?at:0,lt=dt?ct:ut-R[ft]-S[ft]-st+L.altAxis,vt=dt?ut+R[ft]+S[ft]-st-L.altAxis:pt,bt=h&&dt?function(t,n,e){var r=q(t,n,e);return r>e?e:r}(lt,ut,vt):q(h?lt:ct,ut,h?vt:pt);B[A]=bt,H[A]=bt-ut}i.modifiersData[u]=H}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(i){var a,u=i.state,f=i.name,c=i.options,p=u.elements.arrow,d=u.modifiersData.popperOffsets,s=l(u.placement),v=E(s),b=[r,e].indexOf(s)>=0?"height":"width";if(p&&d){var h=function(t,n){return A("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:B(t,o))}(c.padding,u),y=m(p),x="y"===v?t:r,w="y"===v?n:e,O=u.rects.reference[b]+u.rects.reference[v]-d[v]-u.rects.popper[b],g=d[v]-u.rects.reference[v],j=k(p),M=j?"y"===v?j.clientHeight||0:j.clientWidth||0:0,P=M/2-y[b]/2+(O/2-g/2),R=q(h[x],P,M-y[b]-h[w]);u.modifiersData[f]=((a={})[v]=R,a.centerOffset=R-P,a)}},effect:function(t){var n=t.state,e=t.options.element,r=void 0===e?"[data-popper-arrow]":e;null!=r&&("string"!=typeof r||(r=n.elements.popper.querySelector(r)))&&x(n.elements.popper,r)&&(n.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,r=n.rects.reference,o=n.rects.popper,i=n.modifiersData.preventOverflow,a=J(n,{elementContext:"reference"}),u=J(n,{altBoundary:!0}),f=N(a,r),c=N(u,o,i),p=Q(f),d=Q(c);n.modifiersData[e]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:d},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":d})}}]});export{nt as c}
@@ -0,0 +1 @@
1
+ import{r as o,h as e,H as t,g as p}from"./p-b14a3443.js";import{c as r,i as s}from"./p-780bd52d.js";import{c as i}from"./p-4c66f794.js";const a=class{constructor(e){o(this,e),this.closeButtonId="",this.identifier=r("mg-popover"),this.placement="bottom",this.closeButton=!1,this.display=!1,this.disabled=!1,this.clickOutside=o=>{var e;this.disabled||"MG-POPOVER"===(null===(e=o.target.closest(`#${this.identifier}`))||void 0===e?void 0:e.parentElement.nodeName)||(this.display=!1)},this.show=()=>{this.popover.setAttribute("data-show",""),this.popper.setOptions((o=>Object.assign(Object.assign({},o),{modifiers:[...o.modifiers,{name:"eventListeners",enabled:!0}]}))),this.popper.update(),setTimeout((()=>{document.addEventListener("click",this.clickOutside,!1)}),0)},this.hide=()=>{this.popover.removeAttribute("data-show"),this.popper.setOptions((o=>Object.assign(Object.assign({},o),{modifiers:[...o.modifiers,{name:"eventListeners",enabled:!1}]}))),document.removeEventListener("click",this.clickOutside,!1)},this.handleCloseButton=()=>{this.display=!1}}handleDisplay(o){o?this.show():this.hide()}componentWillLoad(){this.messages=s(this.element).messages}componentDidLoad(){const o=["h1","h2","h3","h4","h5","h6"],e=this.element.querySelector('[slot="title"]');if(null!==e&&!o.includes(e.tagName.toLowerCase()))throw new Error(`<mg-popover> Slotted title must be a heading: ${o.join(", ")}.`);this.closeButton&&(this.closeButtonId=`${this.identifier}-close-button`),this.popover=this.element.querySelector(`#${this.identifier}`);const t=this.element.firstElementChild;t.setAttribute("aria-controls",this.identifier),t.setAttribute("aria-expanded",`${this.display}`),this.popper=i(t,this.popover,{placement:this.placement,modifiers:[{name:"offset",options:{offset:[0,10]}}]}),t.addEventListener("click",(()=>{this.disabled||(this.display=!this.display)})),this.element.addEventListener("keydown",(o=>{this.disabled||"Escape"!==o.code||(this.display=!1)})),this.handleDisplay(this.display)}render(){return e(t,null,e("slot",null),e("div",{id:this.identifier,class:"mg-popover"},!this.disabled&&this.closeButton&&e("mg-button",{identifier:this.closeButtonId,"is-icon":!0,variant:"flat",label:this.messages.general.close,onClick:this.handleCloseButton},e("mg-icon",{icon:"cross"})),e("div",{class:"mg-popover__title"},e("slot",{name:"title"})),e("slot",{name:"content"}),e("div",{class:"mg-popover__arrow","data-popper-arrow":!0})))}get element(){return p(this)}static get watchers(){return{display:["handleDisplay"]}}};a.style='mg-popover.sc-mg-popover{display:contents}mg-popover.sc-mg-popover-s>*{display:inline-block}.mg-popover.sc-mg-popover{display:none;padding:1.5rem;z-index:9999;border-radius:0.5rem;background-color:hsl(var(--mg-popover-background-color));box-shadow:var(--box-shadow);color:hsl(var(--mg-popover-font-color))}.mg-popover[data-show].sc-mg-popover{display:block}.mg-popover.sc-mg-popover mg-button.sc-mg-popover{float:right;margin-right:calc(0rem - (var(--default-size) - var(--mg-icon-regular-size)) / 2);margin-top:calc(0rem - (var(--default-size) - var(--mg-popover-title-font-size) * var(--line-height)) / 2);margin-left:3rem}.mg-popover.sc-mg-popover .mg-popover__arrow.sc-mg-popover,.mg-popover.sc-mg-popover .mg-popover__arrow.sc-mg-popover::before{position:absolute;width:2rem;height:2rem;z-index:-1;background:inherit}.mg-popover.sc-mg-popover .mg-popover__arrow.sc-mg-popover{visibility:hidden}.mg-popover.sc-mg-popover .mg-popover__arrow.sc-mg-popover::before{visibility:visible;content:"";transform:rotate(45deg)}.mg-popover[data-popper-placement^=top].sc-mg-popover>.mg-popover__arrow.sc-mg-popover{bottom:-6px}.mg-popover[data-popper-placement^=bottom].sc-mg-popover>.mg-popover__arrow.sc-mg-popover{top:-6px}.mg-popover[data-popper-placement^=left].sc-mg-popover>.mg-popover__arrow.sc-mg-popover{right:-6px}.mg-popover[data-popper-placement^=right].sc-mg-popover>.mg-popover__arrow.sc-mg-popover{left:-6px}.mg-popover__title.sc-mg-popover-s>*,.mg-popover__title .sc-mg-popover-s>*{margin:0 0 1rem;font-size:var(--mg-popover-title-font-size);font-weight:600}';export{a as mg_popover}
@@ -0,0 +1 @@
1
+ function e(e="",a=10){let t="";const n="abcdefghijklmnopqrstuvwxyz0123456789",r=n.length;for(let e=0;e<a;e++)t+=n.charAt(Math.floor(Math.random()*r));return(""!==e?`${e}-`:"")+t}class a{constructor(e=[]){this.add=e=>{this.has(e)||this.classes.push(e)},this.delete=e=>{const a=this.classes.indexOf(e);a>-1&&this.classes.splice(a,1)},this.has=e=>this.classes.includes(e),this.join=()=>this.classes.join(" "),this.classes=e}}function t(e){return e&&e.every((e=>"string"==typeof e))}const n={en:{errors:{required:"This field is required.",date:{badInput:'The date format must be <span aria-hidden="true">mm/dd/yyyy</span><span class="sr-only">m m / d d / y y y y</span> and the date must be greater than {min}',min:"The date cannot be earlier than {min}",max:"The date cannot be later than {max}",minMax:"The date must be between {min} and {max}"},numeric:{min:"The value cannot be less than {min}",max:"The value cannot be greater than {max}",minMax:"The value must be between {min} et {max}"}},nbCharLeft:"{counter} characters left.",input:{select:{placeholder:"Select a value"}},form:{required:'Fields with a <strong class="is-asterisk">*</strong> are required',allRequired:"All fields are required"},message:{closeButton:"Close message"},modal:{closeButton:"Close modal"},pagination:{label:"Pagination",page:"page",pages:"pages",nextPage:"Next page",previousPage:"Previous page",selectPage:"Select the page to display."},panel:{editLabel:"Edit section title."},general:{confirm:"Confirm",cancel:"Cancel",close:"Close",next:"next",previous:"previous"}},fr:{errors:{required:"Ce champ est obligatoire.",date:{badInput:'Le format de la date doit être du type <span aria-hidden="true">jj/mm/aaaa</span><span class="sr-only">j j / m m / a a a a</span> et la date supérieure au {min}',min:"La date ne peut pas être antérieure au {min}",max:"La date ne peut pas être postérieure au {max}",minMax:"La date doit être comprise entre le {min} et le {max}"},numeric:{min:"La valeur ne peut pas être inférieure à {min}",max:"La valeur ne peut pas être supérieure à {max}",minMax:"La valeur doit être comprise entre {min} et {max}"}},nbCharLeft:"{counter} caractères disponibles.",input:{select:{placeholder:"Sélectionnez une valeur"}},form:{required:'Les champs marqués d\'un <strong class="is-asterisk">*</strong> sont obligatoires',allRequired:"Tous les champs sont obligatoires"},message:{closeButton:"Fermer le message"},modal:{closeButton:"Fermer la modale"},pagination:{label:"Pagination",page:"page",pages:"pages",nextPage:"Page suivante",previousPage:"Page précédente",selectPage:"Sélectionner la page à afficher."},panel:{editLabel:"Modifier le titre de la section."},general:{confirm:"Valider",cancel:"Annuler",close:"Fermer",next:"suivant",previous:"précédent"}}},r=e=>{const a=(e=>{var a;return(null===(a=e.closest("[lang]"))||void 0===a?void 0:a.lang)||navigator.language||"en"})(e),t=a.split("-").shift();return{locale:a,messages:n[t]||n.en}};export{a as C,t as a,e as c,r as i}
@@ -0,0 +1,2 @@
1
+ let t,e,n,l=!1,o=!1,s=!1,r=!1,c=!1;const i="undefined"!=typeof window?window:{},f=i.document||{head:{}},a={t:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},u=t=>Promise.resolve(t),$=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),d=(t,e,n)=>{n&&n.map((([n,l,o])=>{const s=m(t,n),r=h(e,o),c=p(n);a.ael(s,l,r,c),(e.o=e.o||[]).push((()=>a.rel(s,l,r,c)))}))},h=(t,e)=>n=>{try{256&t.t?t.i[e](n):(t.u=t.u||[]).push([e,n])}catch(t){at(t)}},m=(t,e)=>8&e?i:t,p=t=>0!=(2&t),y=new WeakMap,b=t=>"sc-"+t.$,w={},g=t=>"object"==(t=typeof t)||"function"===t,v=(t,e,...n)=>{let l=null,o=null,s=!1,r=!1;const c=[],i=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!g(l))&&(l+=""),s&&r?c[c.length-1].h+=l:c.push(s?j(null,l):l),r=s)};if(i(n),e){e.name&&(o=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,c,O);const f=j(t,null);return f.m=e,c.length>0&&(f.p=c),f.g=o,f},j=(t,e)=>({t:0,v:t,h:e,j:null,p:null,m:null,g:null}),S={},O={forEach:(t,e)=>t.map(k).forEach(e),map:(t,e)=>t.map(k).map(e).map(M)},k=t=>({vattrs:t.m,vchildren:t.p,vkey:t.S,vname:t.g,vtag:t.v,vtext:t.h}),M=t=>{if("function"==typeof t.vtag){const e=Object.assign({},t.vattrs);return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),v(t.vtag,e,...t.vchildren||[])}const e=j(t.vtag,t.vtext);return e.m=t.vattrs,e.p=t.vchildren,e.S=t.vkey,e.g=t.vname,e},C=(t,e,n,l,o,s)=>{if(n!==l){let r=ft(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,o=x(n),s=x(l);e.remove(...o.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!o.includes(t))))}else if("style"===e){for(const e in n)l&&null!=l[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in l)n&&l[e]===n[e]||(e.includes("-")?t.style.setProperty(e,l[e]):t.style[e]=l[e])}else if("ref"===e)l&&l(t);else if(r||"o"!==e[0]||"n"!==e[1]){const c=g(l);if((r||c&&null!==l)&&!o)try{if(t.tagName.includes("-"))t[e]=l;else{const o=null==l?"":l;"list"===e?r=!1:null!=n&&t[e]==o||(t[e]=o)}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&s||o)&&!c&&t.setAttribute(e,l=!0===l?"":l)}else e="-"===e[2]?e.slice(3):ft(i,c)?c.slice(2):c[2]+e.slice(3),n&&a.rel(t,e,n,!1),l&&a.ael(t,e,l,!1)}},R=/\s/,x=t=>t?t.split(R):[],P=(t,e,n,l)=>{const o=11===e.j.nodeType&&e.j.host?e.j.host:e.j,s=t&&t.m||w,r=e.m||w;for(l in s)l in r||C(o,l,s[l],void 0,n,e.t);for(l in r)C(o,l,s[l],r[l],n,e.t)},T=(o,c,i,a)=>{const u=c.p[i];let $,d,h,m=0;if(l||(s=!0,"slot"===u.v&&(t&&a.classList.add(t+"-s"),u.t|=u.p?2:1)),null!==u.h)$=u.j=f.createTextNode(u.h);else if(1&u.t)$=u.j=f.createTextNode("");else{if(r||(r="svg"===u.v),$=u.j=f.createElementNS(r?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&u.t?"slot-fb":u.v),r&&"foreignObject"===u.v&&(r=!1),P(null,u,r),null!=t&&$["s-si"]!==t&&$.classList.add($["s-si"]=t),u.p)for(m=0;m<u.p.length;++m)d=T(o,u,m,$),d&&$.appendChild(d);"svg"===u.v?r=!1:"foreignObject"===$.tagName&&(r=!0)}return $["s-hn"]=n,3&u.t&&($["s-sr"]=!0,$["s-cr"]=e,$["s-sn"]=u.g||"",h=o&&o.p&&o.p[i],h&&h.v===u.v&&o.j&&E(o.j,!1)),$},E=(t,e)=>{a.t|=1;const l=t.childNodes;for(let t=l.length-1;t>=0;t--){const o=l[t];o["s-hn"]!==n&&o["s-ol"]&&(D(o).insertBefore(o,A(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),e&&E(o,e)}a.t&=-2},L=(t,e,l,o,s,r)=>{let c,i=t["s-cr"]&&t["s-cr"].parentNode||t;for(i.shadowRoot&&i.tagName===n&&(i=i.shadowRoot);s<=r;++s)o[s]&&(c=T(null,l,s,t),c&&(o[s].j=c,i.insertBefore(c,A(e))))},N=(t,e,n,l,s)=>{for(;e<=n;++e)(l=t[e])&&(s=l.j,_(l),o=!0,s["s-ol"]?s["s-ol"].remove():E(s,!0),s.remove())},W=(t,e)=>t.v===e.v&&("slot"!==t.v||t.g===e.g),A=t=>t&&t["s-ol"]||t,D=t=>(t["s-ol"]?t["s-ol"]:t).parentNode,F=(t,e)=>{const n=e.j=t.j,l=t.p,o=e.p,s=e.v,c=e.h;let i;null===c?(r="svg"===s||"foreignObject"!==s&&r,"slot"===s||P(t,e,r),null!==l&&null!==o?((t,e,n,l)=>{let o,s=0,r=0,c=e.length-1,i=e[0],f=e[c],a=l.length-1,u=l[0],$=l[a];for(;s<=c&&r<=a;)null==i?i=e[++s]:null==f?f=e[--c]:null==u?u=l[++r]:null==$?$=l[--a]:W(i,u)?(F(i,u),i=e[++s],u=l[++r]):W(f,$)?(F(f,$),f=e[--c],$=l[--a]):W(i,$)?("slot"!==i.v&&"slot"!==$.v||E(i.j.parentNode,!1),F(i,$),t.insertBefore(i.j,f.j.nextSibling),i=e[++s],$=l[--a]):W(f,u)?("slot"!==i.v&&"slot"!==$.v||E(f.j.parentNode,!1),F(f,u),t.insertBefore(f.j,i.j),f=e[--c],u=l[++r]):(o=T(e&&e[r],n,r,t),u=l[++r],o&&D(i.j).insertBefore(o,A(i.j)));s>c?L(t,null==l[a+1]?null:l[a+1].j,n,l,r,a):r>a&&N(e,s,c)})(n,l,e,o):null!==o?(null!==t.h&&(n.textContent=""),L(n,null,e,o,0,o.length-1)):null!==l&&N(l,0,l.length-1),r&&"svg"===s&&(r=!1)):(i=n["s-cr"])?i.parentNode.textContent=c:t.h!==c&&(n.data=c)},H=t=>{const e=t.childNodes;let n,l,o,s,r,c;for(l=0,o=e.length;l<o;l++)if(n=e[l],1===n.nodeType){if(n["s-sr"])for(r=n["s-sn"],n.hidden=!1,s=0;s<o;s++)if(c=e[s].nodeType,e[s]["s-hn"]!==n["s-hn"]||""!==r){if(1===c&&r===e[s].getAttribute("slot")){n.hidden=!0;break}}else if(1===c||3===c&&""!==e[s].textContent.trim()){n.hidden=!0;break}H(n)}},U=[],q=t=>{let e,n,l,s,r,c,i=0;const f=t.childNodes,a=f.length;for(;i<a;i++){if(e=f[i],e["s-sr"]&&(n=e["s-cr"])&&n.parentNode)for(l=n.parentNode.childNodes,s=e["s-sn"],c=l.length-1;c>=0;c--)n=l[c],n["s-cn"]||n["s-nr"]||n["s-hn"]===e["s-hn"]||(V(n,s)?(r=U.find((t=>t.O===n)),o=!0,n["s-sn"]=n["s-sn"]||s,r?r.k=e:U.push({k:e,O:n}),n["s-sr"]&&U.map((t=>{V(t.O,n["s-sn"])&&(r=U.find((t=>t.O===n)),r&&!t.k&&(t.k=r.k))}))):U.some((t=>t.O===n))||U.push({O:n}));1===e.nodeType&&q(e)}},V=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,_=t=>{t.m&&t.m.ref&&t.m.ref(null),t.p&&t.p.map(_)},z=t=>rt(t).M,B=(t,e,n)=>{const l=z(t);return{emit:t=>G(l,e,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:t})}},G=(t,e,n)=>{const l=a.ce(e,n);return t.dispatchEvent(l),l},I=(t,e)=>{e&&!t.C&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.C=e)))},J=(t,e)=>{if(t.t|=16,!(4&t.t))return I(t,t.R),gt((()=>K(t,e)));t.t|=512},K=(t,e)=>{const n=t.i;let l;return e&&(t.t|=256,t.u&&(t.u.map((([t,e])=>tt(n,t,e))),t.u=null),l=tt(n,"componentWillLoad")),et(l,(()=>Q(t,n,e)))},Q=async(t,e,n)=>{const l=t.M,o=l["s-rc"];n&&(t=>{const e=t.P,n=t.M,l=e.t,o=((t,e)=>{let n=b(e);const l=dt.get(n);if(t=11===t.nodeType?t:f,l)if("string"==typeof l){let e,o=y.get(t=t.head||t);o||y.set(t,o=new Set),o.has(n)||(e=f.createElement("style"),e.innerHTML=l,t.insertBefore(e,t.querySelector("link")),o&&o.add(n))}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"),2&l&&n.classList.add(o+"-s"))})(t);X(t,e),o&&(o.map((t=>t())),l["s-rc"]=void 0);{const e=l["s-p"],n=()=>Y(t);0===e.length?n():(Promise.all(e).then(n),t.t|=4,e.length=0)}},X=(r,c)=>{try{c=c.render(),r.t&=-17,r.t|=2,((r,c)=>{const i=r.M,u=r.P,$=r.T||j(null,null),d=(t=>t&&t.v===S)(c)?c:v(null,null,c);if(n=i.tagName,u.L&&(d.m=d.m||{},u.L.map((([t,e])=>d.m[e]=i[t]))),d.v=null,d.t|=4,r.T=d,d.j=$.j=i.shadowRoot||i,t=i["s-sc"],e=i["s-cr"],l=0!=(1&u.t),o=!1,F($,d),a.t|=1,s){let t,e,n,l,o,s;q(d.j);let r=0;for(;r<U.length;r++)t=U[r],e=t.O,e["s-ol"]||(n=f.createTextNode(""),n["s-nr"]=e,e.parentNode.insertBefore(e["s-ol"]=n,e));for(r=0;r<U.length;r++)if(t=U[r],e=t.O,t.k){for(l=t.k.parentNode,o=t.k.nextSibling,n=e["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===e["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==e.parentNode||e.nextSibling!==o)&&e!==o&&(!e["s-hn"]&&e["s-ol"]&&(e["s-hn"]=e["s-ol"].parentNode.nodeName),l.insertBefore(e,o))}else 1===e.nodeType&&(e.hidden=!0)}o&&H(d.j),a.t&=-2,U.length=0})(r,c)}catch(t){at(t,r.M)}return null},Y=t=>{const e=t.M,n=t.i,l=t.R;tt(n,"componentDidRender"),64&t.t||(t.t|=64,nt(e),tt(n,"componentDidLoad"),t.N(e),l||Z()),t.W(e),t.C&&(t.C(),t.C=void 0),512&t.t&&wt((()=>J(t,!1))),t.t&=-517},Z=()=>{nt(f.documentElement),wt((()=>G(i,"appload",{detail:{namespace:"mg-components"}})))},tt=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){at(t)}},et=(t,e)=>t&&t.then?t.then(e):e(),nt=t=>t.classList.add("hydrated"),lt=(t,e,n)=>{if(e.A){t.watchers&&(e.D=t.watchers);const l=Object.entries(e.A),o=t.prototype;if(l.map((([t,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(o,t,{get(){return((t,e)=>rt(this).F.get(e))(0,t)},set(n){((t,e,n,l)=>{const o=rt(t),s=o.M,r=o.F.get(e),c=o.t,i=o.i;if(n=((t,e)=>null==t||g(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(n,l.A[e][0]),(!(8&c)||void 0===r)&&n!==r&&(!Number.isNaN(r)||!Number.isNaN(n))&&(o.F.set(e,n),i)){if(l.D&&128&c){const t=l.D[e];t&&t.map((t=>{try{i[t](n,r,e)}catch(t){at(t,s)}}))}2==(18&c)&&J(o,!1)}})(this,t,n,e)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(o,t,{value(...e){const n=rt(this);return n.H.then((()=>n.i[t](...e)))}})})),1&n){const n=new Map;o.attributeChangedCallback=function(t,e,l){a.jmp((()=>{const e=n.get(t);if(this.hasOwnProperty(e))l=this[e],delete this[e];else if(o.hasOwnProperty(e)&&"number"==typeof this[e]&&this[e]==l)return;this[e]=(null!==l||"boolean"!=typeof this[e])&&l}))},t.observedAttributes=l.filter((([t,e])=>15&e[0])).map((([t,l])=>{const o=l[1]||t;return n.set(o,t),512&l[0]&&e.L.push([t,o]),o}))}}return t},ot=(t,e={})=>{const n=[],l=e.exclude||[],o=i.customElements,s=f.head,r=s.querySelector("meta[charset]"),c=f.createElement("style"),u=[];let h,m=!0;Object.assign(a,e),a.l=new URL(e.resourcesUrl||"./",f.baseURI).href,t.map((t=>{t[1].map((e=>{const s={t:e[0],$:e[1],A:e[2],U:e[3]};s.A=e[2],s.U=e[3],s.L=[],s.D={};const r=s.$,c=class extends HTMLElement{constructor(t){super(t),it(t=this,s),1&s.t&&t.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),m?u.push(this):a.jmp((()=>(t=>{if(0==(1&a.t)){const e=rt(t),n=e.P,l=()=>{};if(1&e.t)d(t,e,n.U);else{e.t|=1,12&n.t&&(t=>{const e=t["s-cr"]=f.createComment("");e["s-cn"]=!0,t.insertBefore(e,t.firstChild)})(t);{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){I(e,e.R=n);break}}n.A&&Object.entries(n.A).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n,l,o)=>{if(0==(32&e.t)){{if(e.t|=32,(o=$t(n)).then){const t=()=>{};o=await o,t()}o.isProxied||(n.D=o.watchers,lt(o,n,2),o.isProxied=!0);const t=()=>{};e.t|=8;try{new o(e)}catch(t){at(t)}e.t&=-9,e.t|=128,t()}if(o.style){let t=o.style;const e=b(n);if(!dt.has(e)){const l=()=>{};((t,e,n)=>{let l=dt.get(t);$&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,dt.set(t,l)})(e,t,!!(1&n.t)),l()}}}const s=e.R,r=()=>J(e,!0);s&&s["s-rc"]?s["s-rc"].push(r):r()})(0,e,n)}l()}})(this)))}disconnectedCallback(){a.jmp((()=>(()=>{if(0==(1&a.t)){const t=rt(this);t.o&&(t.o.map((t=>t())),t.o=void 0)}})()))}componentOnReady(){return rt(this).q}};s.V=t[0],l.includes(r)||o.get(r)||(n.push(r),o.define(r,lt(c,s,1)))}))})),c.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",c.setAttribute("data-styles",""),s.insertBefore(c,r?r.nextSibling:s.firstChild),m=!1,u.length?u.map((t=>t.connectedCallback())):a.jmp((()=>h=setTimeout(Z,30)))},st=new WeakMap,rt=t=>st.get(t),ct=(t,e)=>st.set(e.i=t,e),it=(t,e)=>{const n={t:0,M:t,P:e,F:new Map};return n.H=new Promise((t=>n.W=t)),n.q=new Promise((t=>n.N=t)),t["s-p"]=[],t["s-rc"]=[],d(t,n,e.U),st.set(t,n)},ft=(t,e)=>e in t,at=(t,e)=>(0,console.error)(t,e),ut=new Map,$t=t=>{const e=t.$.replace(/-/g,"_"),n=t.V,l=ut.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(ut.set(n,t),t[e])),at)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},dt=new Map,ht=[],mt=[],pt=(t,e)=>n=>{t.push(n),c||(c=!0,e&&4&a.t?wt(bt):a.raf(bt))},yt=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){at(t)}t.length=0},bt=()=>{yt(ht),yt(mt),(c=ht.length>0)&&a.raf(bt)},wt=t=>u().then(t),gt=pt(mt,!0);export{S as H,ot as b,B as c,z as g,v as h,u as p,ct as r}
@@ -53,11 +53,11 @@
53
53
  --color-info: var(--color-info-h), var(--color-info-s), var(--color-info-l);
54
54
 
55
55
  /* Danger */
56
- /* #df242c; */
57
- /* rgb(223, 36, 44); */
56
+ /* #db1f29; */
57
+ /* rgb(219, 31, 41); */
58
58
  --color-danger-h: 357;
59
- --color-danger-s: 74.5%;
60
- --color-danger-l: 50.8%;
59
+ --color-danger-s: 75%;
60
+ --color-danger-l: 49%;
61
61
  --color-danger: var(--color-danger-h), var(--color-danger-s), var(--color-danger-l);
62
62
 
63
63
  /* Dark */
@@ -76,6 +76,21 @@
76
76
  --color-light-l: 100%;
77
77
  --color-light: var(--color-light-h), var(--color-light-s), var(--color-light-l);
78
78
 
79
+ /* Primary */
80
+ --color-primary-h: hsl(var(--color-dark-h));
81
+ --color-primary-s: hsl(var(--color-dark-s));
82
+ --color-primary-l: hsl(var(--color-dark-l));
83
+ --color-primary: hsl(var(--color-dark));
84
+
85
+ /* Secondary */
86
+ --color-secondary-h: hsl(var(--color-neutral-h));
87
+ --color-secondary-s: hsl(var(--color-neutral-s));
88
+ --color-secondary-l: hsl(var(--color-neutral-l));
89
+ --color-secondary: hsl(var(--color-neutral));
90
+
91
+ /* Shadow */
92
+ --box-shadow: 0 0.3rem 0.8rem 0 rgba(0, 0, 0, 0.1);
93
+
79
94
  /*
80
95
  Global
81
96
  */
@@ -84,6 +99,7 @@
84
99
  /*
85
100
  <mg-icon>
86
101
  */
102
+ --mg-icon-small-size: 1.2rem;
87
103
  --mg-icon-regular-size: 1.6rem;
88
104
  --mg-icon-large-size: 2.4rem;
89
105
  --mg-icon-extra-large-size: 3.6rem;
@@ -95,6 +111,8 @@
95
111
  --mg-button-border-radius: 0.3rem;
96
112
  --mg-button-icon-border-radius: var(--default-size);
97
113
  --mg-button-disabled-opacity: 0.6;
114
+ --mg-button-gradient: 1; /* Can only be 1 or 0 to enable disable gradient */
115
+ --mg-button-border-variation: 1; /* Can only be 1 or 0 to enable disable border variation */
98
116
 
99
117
  /* Primary */
100
118
  --mg-button-primary-color-h: var(--color-dark-h);
@@ -140,6 +158,20 @@
140
158
  */
141
159
  --mg-message-border-radius: 0.3rem;
142
160
 
161
+ /*
162
+ <mg-modal>
163
+ */
164
+ --mg-modal-border-radius: 0.5rem;
165
+ --mg-modal-title-font-size: 1.8rem;
166
+ --mg-modal-content-font-size: 1.2rem;
167
+
168
+ /*
169
+ <mg-panel>
170
+ */
171
+
172
+ --mg-panel-border-radius: 0.5rem;
173
+ --mg-panel-background: var(--color-info-h) var(--color-info-s) calc(var(--color-info-l) + 68%);
174
+
143
175
  /*
144
176
  Layout
145
177
  */
@@ -148,7 +180,6 @@
148
180
  /*
149
181
  Forms
150
182
  */
151
- --mg-form-group-vertical-space: 1.5rem;
152
183
 
153
184
  /*
154
185
  <mg-input-...>
@@ -158,6 +189,9 @@
158
189
  --mg-inputs-color: #b5c2c9;
159
190
  --mg-inputs-spacer: 1rem;
160
191
 
192
+ /* Error message background */
193
+ --mg-inputs-error-bg-color: var(--color-danger-h), calc(var(--color-danger-s) + 5%), calc(var(--color-danger-l) + 49%);
194
+
161
195
  /* Input focus shadow */
162
196
  /* #b5c2c9 */
163
197
  /* rgb(0, 221, 255); */
@@ -53,11 +53,11 @@
53
53
  --color-info: var(--color-info-h), var(--color-info-s), var(--color-info-l);
54
54
 
55
55
  /* Danger */
56
- /* #df242c; */
57
- /* rgb(223, 36, 44); */
56
+ /* #db1f29; */
57
+ /* rgb(219, 31, 41); */
58
58
  --color-danger-h: 357;
59
- --color-danger-s: 74.5%;
60
- --color-danger-l: 50.8%;
59
+ --color-danger-s: 75%;
60
+ --color-danger-l: 49%;
61
61
  --color-danger: var(--color-danger-h), var(--color-danger-s), var(--color-danger-l);
62
62
 
63
63
  /* Dark */
@@ -76,6 +76,21 @@
76
76
  --color-light-l: 100%;
77
77
  --color-light: var(--color-light-h), var(--color-light-s), var(--color-light-l);
78
78
 
79
+ /* Primary */
80
+ --color-primary-h: hsl(var(--color-dark-h));
81
+ --color-primary-s: hsl(var(--color-dark-s));
82
+ --color-primary-l: hsl(var(--color-dark-l));
83
+ --color-primary: hsl(var(--color-dark));
84
+
85
+ /* Secondary */
86
+ --color-secondary-h: hsl(var(--color-neutral-h));
87
+ --color-secondary-s: hsl(var(--color-neutral-s));
88
+ --color-secondary-l: hsl(var(--color-neutral-l));
89
+ --color-secondary: hsl(var(--color-neutral));
90
+
91
+ /* Shadow */
92
+ --box-shadow: 0 0.3rem 0.8rem 0 rgba(0, 0, 0, 0.1);
93
+
79
94
  /*
80
95
  Global
81
96
  */
@@ -84,6 +99,7 @@
84
99
  /*
85
100
  <mg-icon>
86
101
  */
102
+ --mg-icon-small-size: 1.2rem;
87
103
  --mg-icon-regular-size: 1.6rem;
88
104
  --mg-icon-large-size: 2.4rem;
89
105
  --mg-icon-extra-large-size: 3.6rem;
@@ -95,6 +111,8 @@
95
111
  --mg-button-border-radius: 0.3rem;
96
112
  --mg-button-icon-border-radius: var(--default-size);
97
113
  --mg-button-disabled-opacity: 0.6;
114
+ --mg-button-gradient: 1; /* Can only be 1 or 0 to enable disable gradient */
115
+ --mg-button-border-variation: 1; /* Can only be 1 or 0 to enable disable border variation */
98
116
 
99
117
  /* Primary */
100
118
  --mg-button-primary-color-h: var(--color-dark-h);
@@ -140,6 +158,20 @@
140
158
  */
141
159
  --mg-message-border-radius: 0.3rem;
142
160
 
161
+ /*
162
+ <mg-modal>
163
+ */
164
+ --mg-modal-border-radius: 0.5rem;
165
+ --mg-modal-title-font-size: 1.8rem;
166
+ --mg-modal-content-font-size: 1.2rem;
167
+
168
+ /*
169
+ <mg-panel>
170
+ */
171
+
172
+ --mg-panel-border-radius: 0.5rem;
173
+ --mg-panel-background: var(--color-info-h) var(--color-info-s) calc(var(--color-info-l) + 68%);
174
+
143
175
  /*
144
176
  Layout
145
177
  */
@@ -148,7 +180,6 @@
148
180
  /*
149
181
  Forms
150
182
  */
151
- --mg-form-group-vertical-space: 1.5rem;
152
183
 
153
184
  /*
154
185
  <mg-input-...>
@@ -158,6 +189,9 @@
158
189
  --mg-inputs-color: #b5c2c9;
159
190
  --mg-inputs-spacer: 1rem;
160
191
 
192
+ /* Error message background */
193
+ --mg-inputs-error-bg-color: var(--color-danger-h), calc(var(--color-danger-s) + 5%), calc(var(--color-danger-l) + 49%);
194
+
161
195
  /* Input focus shadow */
162
196
  /* #b5c2c9 */
163
197
  /* rgb(0, 221, 255); */
@@ -7,6 +7,11 @@ declare const _default: {
7
7
  control: {
8
8
  type: string;
9
9
  };
10
+ table: {
11
+ defaultValue: {
12
+ summary: string;
13
+ };
14
+ };
10
15
  };
11
16
  value: {
12
17
  control: {
@@ -1,11 +1,18 @@
1
1
  import { BadgeType } from './mg-badge.conf';
2
2
  import { ClassList } from '../../../utils/components.utils';
3
3
  export declare class MgBadge {
4
+ /************
5
+ * Internal *
6
+ ************/
7
+ private classOutline;
8
+ /**************
9
+ * Decorators *
10
+ **************/
4
11
  /**
5
12
  * Badge value
6
13
  */
7
14
  value: BadgeType['value'];
8
- valideValue(newValue: any): void;
15
+ validateValue(newValue: BadgeType['value']): void;
9
16
  /**
10
17
  * Badge label. Include short description.
11
18
  * Required for accessibility
@@ -14,12 +21,12 @@ export declare class MgBadge {
14
21
  /**
15
22
  * Define button variant
16
23
  */
17
- variant?: string;
18
- validateVariant(newValue: string): void;
24
+ variant: string;
25
+ validateVariant(newValue: string, oldValue?: string): void;
19
26
  /**
20
27
  * Define if button is using outline style
21
28
  */
22
- outline?: boolean;
29
+ outline: boolean;
23
30
  validateOutline(newValue: boolean): void;
24
31
  /**
25
32
  * Component classes
@@ -27,10 +34,14 @@ export declare class MgBadge {
27
34
  classList: ClassList;
28
35
  /**
29
36
  * Check if props are well configured on init
37
+ *
38
+ * @returns {void}
30
39
  */
31
40
  componentWillLoad(): void;
32
41
  /**
33
42
  * Render
43
+ *
44
+ * @returns {HTMLElement} HTML Element
34
45
  */
35
- render(): any;
46
+ render(): HTMLElement;
36
47
  }
@@ -7,6 +7,11 @@ declare const _default: {
7
7
  control: {
8
8
  type: string;
9
9
  };
10
+ table: {
11
+ defaultValue: {
12
+ summary: string;
13
+ };
14
+ };
10
15
  };
11
16
  };
12
17
  };
@@ -15,12 +15,12 @@ export declare class MgButton {
15
15
  * Define button variant
16
16
  */
17
17
  variant: string;
18
- validateVariant(newValue: string): void;
18
+ validateVariant(newValue: string, oldValue?: string): void;
19
19
  /**
20
20
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
21
21
  * If not set, it will be created.
22
22
  */
23
- identifier?: string;
23
+ identifier: string;
24
24
  /**
25
25
  * aria-label
26
26
  * In case button text is not explicit enough
@@ -41,6 +41,19 @@ export declare class MgButton {
41
41
  * Parent component have to remove the attribute 'disabled' when the process ends.
42
42
  */
43
43
  disableOnClick: boolean;
44
+ /**
45
+ * Prop to set aria-expanded on button element
46
+ */
47
+ expanded: boolean;
48
+ /**
49
+ * Prop to set aria-controls on button element
50
+ */
51
+ controls: string;
52
+ /**
53
+ * Option to set aria-haspopup
54
+ * The aria-haspopup state informs assistive technology users that there is a popup and the type of popup it is, but provides no interactivity.
55
+ */
56
+ haspopup: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
44
57
  /**
45
58
  * Define if button is loading, default to false.
46
59
  * Trigger when button is clicked or key-up ['enter', 'space], then value change to true.
@@ -54,14 +67,21 @@ export declare class MgButton {
54
67
  classList: ClassList;
55
68
  /**
56
69
  * Trigger actions onClick event
70
+ *
71
+ * @param {MouseEvent} event click event
72
+ * @returns {void}
57
73
  */
58
74
  private handleClick;
59
75
  /**
60
76
  * Check if props are well configured on init
77
+ *
78
+ * @returns {void}
61
79
  */
62
80
  componentWillLoad(): void;
63
81
  /**
64
82
  * Render component
83
+ *
84
+ * @returns {HTMLElement} html element
65
85
  */
66
- render(): any;
86
+ render(): HTMLElement;
67
87
  }
@@ -1,6 +1,15 @@
1
1
  declare const _default: {
2
2
  component: string;
3
3
  title: string;
4
+ argTypes: {
5
+ template: {
6
+ table: {
7
+ defaultValue: {
8
+ summary: string;
9
+ };
10
+ };
11
+ };
12
+ };
4
13
  };
5
14
  export default _default;
6
15
  export declare const MgCharacterLeft: any;
@@ -2,21 +2,19 @@ export declare class MgCharacterLeft {
2
2
  /************
3
3
  * Internal *
4
4
  ************/
5
- private mustacheCounter;
5
+ private messages;
6
6
  /**************
7
7
  * Decorators *
8
8
  **************/
9
+ /**
10
+ * Get component DOM element
11
+ */
12
+ element: HTMLMgCharacterLeftElement;
9
13
  /**
10
14
  * Sets an `id` attribute.
11
15
  * Needed by the input for accessibility `aria-decribedby`.
12
16
  */
13
17
  identifier: string;
14
- /**
15
- * Template to display remaining characters.
16
- * Must have {counter} inside
17
- */
18
- template: string;
19
- validateTemplate(newValue: string): void;
20
18
  /**
21
19
  * Sets the characters to count
22
20
  */
@@ -26,14 +24,19 @@ export declare class MgCharacterLeft {
26
24
  */
27
25
  maxlength: number;
28
26
  validateMaxlength(newValue: number): void;
29
- /**
30
- * Calculate number character left
31
- * @returns {string}
32
- */
33
- private getMessage;
34
27
  /*************
35
28
  * Lifecycle *
36
29
  *************/
30
+ /**
31
+ * Check if props are well configured on init
32
+ *
33
+ * @returns {void}
34
+ */
37
35
  componentWillLoad(): void;
38
- render(): any;
36
+ /**
37
+ * Render component
38
+ *
39
+ * @returns {HTMLElement} HTML Element
40
+ */
41
+ render(): HTMLElement;
39
42
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Icon SVG paths
3
3
  */
4
- export declare const icons: Object;
4
+ export declare const icons: unknown;
5
5
  /**
6
6
  * List of all possibles sizes
7
7
  */
@@ -4,18 +4,18 @@ export declare class MgIcon {
4
4
  * Icon to display
5
5
  */
6
6
  icon: string;
7
- validateIcon(newValue: string): void;
7
+ validateIcon(newValue: string, oldValue?: string): void;
8
8
  /**
9
9
  * Define icon size
10
10
  */
11
11
  size: string;
12
- validateSize(newValue: string): void;
12
+ validateSize(newValue: string, oldValue?: string): void;
13
13
  /**
14
14
  * Define icon variant
15
15
  * Add a background to the icon based on variant color
16
16
  */
17
17
  variant: string;
18
- validateVariant(newValue: string): void;
18
+ validateVariant(newValue: string, oldValue?: string): void;
19
19
  /**
20
20
  * Make the icon spin
21
21
  */
@@ -25,12 +25,22 @@ export declare class MgIcon {
25
25
  * Component classes
26
26
  */
27
27
  classList: ClassList;
28
+ /**
29
+ * getIcon
30
+ *
31
+ * @returns {HTMLElement} icon html
32
+ */
33
+ private getIcon;
28
34
  /**
29
35
  * Check if props are well configured on init
36
+ *
37
+ * @returns {void}
30
38
  */
31
39
  componentWillLoad(): void;
32
40
  /**
33
41
  * Render component
42
+ *
43
+ * @returns {HTMLElement} HTML Element
34
44
  */
35
- render(): any;
45
+ render(): HTMLElement;
36
46
  }
@@ -19,6 +19,16 @@ export declare class MgInputTitle {
19
19
  /*************
20
20
  * Lifecycle *
21
21
  *************/
22
+ /**
23
+ * Init tag name
24
+ *
25
+ * @returns {void}
26
+ */
22
27
  componentWillLoad(): void;
23
- render(): any;
28
+ /**
29
+ * Render
30
+ *
31
+ * @returns {HTMLElement} HTML Element
32
+ */
33
+ render(): HTMLElement;
24
34
  }
@@ -7,6 +7,11 @@ declare const _default: {
7
7
  control: {
8
8
  type: string;
9
9
  };
10
+ table: {
11
+ defaultValue: {
12
+ summary: string;
13
+ };
14
+ };
10
15
  };
11
16
  };
12
17
  };
@@ -1,25 +1,39 @@
1
1
  import { ClassList } from '../../../utils/components.utils';
2
2
  export declare class MgTag {
3
+ /************
4
+ * Internal *
5
+ ************/
6
+ private classOutline;
7
+ /**************
8
+ * Decorators *
9
+ **************/
3
10
  /**
4
11
  * Define button variant
5
12
  */
6
- variant?: string;
7
- validateVariant(newValue: string): void;
13
+ variant: string;
14
+ validateVariant(newValue: string, oldValue?: string): void;
8
15
  /**
9
16
  * Define if button is using outline style
10
17
  */
11
- outline?: boolean;
18
+ outline: boolean;
12
19
  validateOutline(newValue: boolean): void;
13
20
  /**
14
21
  * Component classes
15
22
  */
16
23
  classList: ClassList;
24
+ /*************
25
+ * Lifecycle *
26
+ *************/
17
27
  /**
18
28
  * Check if props are well configured on init
29
+ *
30
+ * @returns {void}
19
31
  */
20
32
  componentWillLoad(): void;
21
33
  /**
22
34
  * Render
35
+ *
36
+ * @returns {HTMLElement} HTML Element
23
37
  */
24
- render(): any;
38
+ render(): HTMLElement;
25
39
  }
@@ -0,0 +1,29 @@
1
+ declare const _default: {
2
+ component: string;
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ };
7
+ argTypes: {
8
+ placement: {
9
+ options: readonly ["auto", "auto-start", "auto-end", "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "right", "right-start", "right-end", "left", "left-start", "left-end"];
10
+ control: {
11
+ type: string;
12
+ };
13
+ table: {
14
+ defaultValue: {
15
+ summary: "auto";
16
+ };
17
+ };
18
+ };
19
+ value: {
20
+ control: {
21
+ type: string;
22
+ };
23
+ };
24
+ };
25
+ };
26
+ export default _default;
27
+ export declare const MgTooltip: any;
28
+ export declare const MgTooltipOnButton: any;
29
+ export declare const MgTooltipOnSpan: any;