@mgdis/mg-components 6.2.0 → 6.4.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 (238) hide show
  1. package/dist/cjs/{index-52d5f3d4.js → index-911898e4.js} +410 -266
  2. package/dist/cjs/index-911898e4.js.map +1 -0
  3. package/dist/cjs/{index-cc11af95.js → index-a3269bfc.js} +3 -3
  4. package/dist/cjs/{index-cc11af95.js.map → index-a3269bfc.js.map} +1 -1
  5. package/dist/cjs/{index.es-ac7c22e3.js → index.es-325100d7.js} +47 -47
  6. package/dist/cjs/index.es-325100d7.js.map +1 -0
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/mg-action-more_36.cjs.entry.js +1414 -983
  9. package/dist/cjs/mg-action-more_36.cjs.entry.js.map +1 -1
  10. package/dist/cjs/mg-alert.cjs.entry.js +17 -12
  11. package/dist/cjs/mg-alert.cjs.entry.js.map +1 -1
  12. package/dist/cjs/mg-components.cjs.js +3 -3
  13. package/dist/cjs/mg-components.cjs.js.map +1 -1
  14. package/dist/cjs/mg-loader.cjs.entry.js +6 -8
  15. package/dist/cjs/mg-loader.cjs.entry.js.map +1 -1
  16. package/dist/cjs/mg-progress.cjs.entry.js +27 -12
  17. package/dist/cjs/mg-progress.cjs.entry.js.map +1 -1
  18. package/dist/collection/collection-manifest.json +2 -2
  19. package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js +10 -3
  20. package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js.map +1 -1
  21. package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +15 -4
  22. package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js.map +1 -1
  23. package/dist/collection/components/atoms/mg-badge/mg-badge.js +15 -4
  24. package/dist/collection/components/atoms/mg-badge/mg-badge.js.map +1 -1
  25. package/dist/collection/components/atoms/mg-button/mg-button.conf.js +4 -0
  26. package/dist/collection/components/atoms/mg-button/mg-button.conf.js.map +1 -1
  27. package/dist/collection/components/atoms/mg-button/mg-button.js +112 -12
  28. package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -1
  29. package/dist/collection/components/atoms/mg-card/mg-card.js +1 -1
  30. package/dist/collection/components/atoms/mg-divider/mg-divider.js +9 -1
  31. package/dist/collection/components/atoms/mg-divider/mg-divider.js.map +1 -1
  32. package/dist/collection/components/atoms/mg-icon/mg-icon.js +22 -6
  33. package/dist/collection/components/atoms/mg-icon/mg-icon.js.map +1 -1
  34. package/dist/collection/components/atoms/mg-tag/mg-tag.js +14 -4
  35. package/dist/collection/components/atoms/mg-tag/mg-tag.js.map +1 -1
  36. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +3 -4
  37. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js.map +1 -1
  38. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +28 -6
  39. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
  40. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +50 -13
  41. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js.map +1 -1
  42. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +29 -11
  43. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +1 -1
  44. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +106 -33
  45. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -1
  46. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +99 -36
  47. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -1
  48. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +130 -35
  49. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
  50. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +87 -25
  51. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -1
  52. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +86 -26
  53. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +1 -1
  54. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +92 -30
  55. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
  56. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +109 -32
  57. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
  58. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +109 -29
  59. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
  60. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +67 -21
  61. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -1
  62. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +16 -70
  63. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js.map +1 -1
  64. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +101 -89
  65. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js.map +1 -1
  66. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +194 -157
  67. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js.map +1 -1
  68. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +19 -8
  69. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -1
  70. package/dist/collection/components/molecules/mg-alert/mg-alert.js +31 -6
  71. package/dist/collection/components/molecules/mg-alert/mg-alert.js.map +1 -1
  72. package/dist/collection/components/molecules/mg-details/mg-details.js +17 -5
  73. package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -1
  74. package/dist/collection/components/molecules/mg-form/mg-form.js +48 -16
  75. package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
  76. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +13 -3
  77. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js.map +1 -1
  78. package/dist/collection/components/molecules/mg-loader/mg-loader.js +5 -5
  79. package/dist/collection/components/molecules/mg-loader/mg-loader.js.map +1 -1
  80. package/dist/collection/components/molecules/mg-message/mg-message.js +22 -6
  81. package/dist/collection/components/molecules/mg-message/mg-message.js.map +1 -1
  82. package/dist/collection/components/molecules/mg-modal/mg-modal.js +54 -11
  83. package/dist/collection/components/molecules/mg-modal/mg-modal.js.map +1 -1
  84. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +28 -9
  85. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js.map +1 -1
  86. package/dist/collection/components/molecules/mg-panel/mg-panel.js +48 -13
  87. package/dist/collection/components/molecules/mg-panel/mg-panel.js.map +1 -1
  88. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +10 -2
  89. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js.map +1 -1
  90. package/dist/collection/components/molecules/mg-popover/mg-popover.js +61 -7
  91. package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
  92. package/dist/collection/components/molecules/mg-progress/mg-progress.js +26 -1
  93. package/dist/collection/components/molecules/mg-progress/mg-progress.js.map +1 -1
  94. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +3 -2
  95. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js.map +1 -1
  96. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +28 -8
  97. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js.map +1 -1
  98. package/dist/collection/utils/behaviors.utils.js +44 -107
  99. package/dist/collection/utils/behaviors.utils.js.map +1 -1
  100. package/dist/components/index.es.js +42 -42
  101. package/dist/components/index.es.js.map +1 -1
  102. package/dist/components/index2.js +2 -2
  103. package/dist/components/mg-action-more.js +15 -12
  104. package/dist/components/mg-action-more.js.map +1 -1
  105. package/dist/components/mg-alert.js +15 -10
  106. package/dist/components/mg-alert.js.map +1 -1
  107. package/dist/components/mg-badge2.js +13 -10
  108. package/dist/components/mg-badge2.js.map +1 -1
  109. package/dist/components/mg-button2.js +77 -16
  110. package/dist/components/mg-button2.js.map +1 -1
  111. package/dist/components/mg-card2.js +1 -1
  112. package/dist/components/mg-character-left2.js +8 -7
  113. package/dist/components/mg-character-left2.js.map +1 -1
  114. package/dist/components/mg-details.js +11 -7
  115. package/dist/components/mg-details.js.map +1 -1
  116. package/dist/components/mg-divider2.js +7 -1
  117. package/dist/components/mg-divider2.js.map +1 -1
  118. package/dist/components/mg-form.js +35 -21
  119. package/dist/components/mg-form.js.map +1 -1
  120. package/dist/components/mg-icon2.js +17 -11
  121. package/dist/components/mg-icon2.js.map +1 -1
  122. package/dist/components/mg-illustrated-message.js +10 -4
  123. package/dist/components/mg-illustrated-message.js.map +1 -1
  124. package/dist/components/mg-input-checkbox-paginated2.js +14 -10
  125. package/dist/components/mg-input-checkbox-paginated2.js.map +1 -1
  126. package/dist/components/mg-input-checkbox.js +73 -40
  127. package/dist/components/mg-input-checkbox.js.map +1 -1
  128. package/dist/components/mg-input-date.js +77 -46
  129. package/dist/components/mg-input-date.js.map +1 -1
  130. package/dist/components/mg-input-numeric.js +90 -45
  131. package/dist/components/mg-input-numeric.js.map +1 -1
  132. package/dist/components/mg-input-password.js +56 -28
  133. package/dist/components/mg-input-password.js.map +1 -1
  134. package/dist/components/mg-input-radio.js +59 -31
  135. package/dist/components/mg-input-radio.js.map +1 -1
  136. package/dist/components/mg-input-select2.js +60 -36
  137. package/dist/components/mg-input-select2.js.map +1 -1
  138. package/dist/components/mg-input-text2.js +71 -40
  139. package/dist/components/mg-input-text2.js.map +1 -1
  140. package/dist/components/mg-input-textarea.js +72 -36
  141. package/dist/components/mg-input-textarea.js.map +1 -1
  142. package/dist/components/mg-input-title2.js +11 -8
  143. package/dist/components/mg-input-title2.js.map +1 -1
  144. package/dist/components/mg-input-toggle.js +43 -25
  145. package/dist/components/mg-input-toggle.js.map +1 -1
  146. package/dist/components/mg-input2.js +37 -20
  147. package/dist/components/mg-input2.js.map +1 -1
  148. package/dist/components/mg-item-more2.js +146 -270
  149. package/dist/components/mg-item-more2.js.map +1 -1
  150. package/dist/components/mg-loader.js +4 -6
  151. package/dist/components/mg-loader.js.map +1 -1
  152. package/dist/components/mg-menu-item2.js +193 -149
  153. package/dist/components/mg-menu-item2.js.map +1 -1
  154. package/dist/components/mg-message2.js +21 -9
  155. package/dist/components/mg-message2.js.map +1 -1
  156. package/dist/components/mg-modal.js +36 -17
  157. package/dist/components/mg-modal.js.map +1 -1
  158. package/dist/components/mg-pagination2.js +21 -14
  159. package/dist/components/mg-pagination2.js.map +1 -1
  160. package/dist/components/mg-panel.js +37 -20
  161. package/dist/components/mg-panel.js.map +1 -1
  162. package/dist/components/mg-popover-content2.js +9 -3
  163. package/dist/components/mg-popover-content2.js.map +1 -1
  164. package/dist/components/mg-popover2.js +38 -10
  165. package/dist/components/mg-popover2.js.map +1 -1
  166. package/dist/components/mg-progress.js +26 -11
  167. package/dist/components/mg-progress.js.map +1 -1
  168. package/dist/components/mg-skip-links.js +2 -3
  169. package/dist/components/mg-skip-links.js.map +1 -1
  170. package/dist/components/mg-tabs.js +27 -17
  171. package/dist/components/mg-tabs.js.map +1 -1
  172. package/dist/components/mg-tag.js +12 -8
  173. package/dist/components/mg-tag.js.map +1 -1
  174. package/dist/components/mg-tooltip-content2.js +1 -2
  175. package/dist/components/mg-tooltip-content2.js.map +1 -1
  176. package/dist/components/mg-tooltip2.js +24 -12
  177. package/dist/components/mg-tooltip2.js.map +1 -1
  178. package/dist/esm/{index-81752ffe.js → index-1f32332a.js} +410 -266
  179. package/dist/esm/index-1f32332a.js.map +1 -0
  180. package/dist/esm/{index-f3d3fb70.js → index-9bd10f5d.js} +3 -3
  181. package/dist/esm/{index-f3d3fb70.js.map → index-9bd10f5d.js.map} +1 -1
  182. package/dist/esm/{index.es-940821a9.js → index.es-a2587b72.js} +43 -43
  183. package/dist/esm/index.es-a2587b72.js.map +1 -0
  184. package/dist/esm/loader.js +3 -3
  185. package/dist/esm/mg-action-more_36.entry.js +1414 -983
  186. package/dist/esm/mg-action-more_36.entry.js.map +1 -1
  187. package/dist/esm/mg-alert.entry.js +17 -12
  188. package/dist/esm/mg-alert.entry.js.map +1 -1
  189. package/dist/esm/mg-components.js +4 -4
  190. package/dist/esm/mg-components.js.map +1 -1
  191. package/dist/esm/mg-loader.entry.js +6 -8
  192. package/dist/esm/mg-loader.entry.js.map +1 -1
  193. package/dist/esm/mg-progress.entry.js +27 -12
  194. package/dist/esm/mg-progress.entry.js.map +1 -1
  195. package/dist/mg-components/mg-components.esm.js +1 -1
  196. package/dist/mg-components/mg-components.esm.js.map +1 -1
  197. package/dist/mg-components/p-0ead5317.entry.js +2 -0
  198. package/dist/mg-components/{p-31e6c1a7.entry.js.map → p-0ead5317.entry.js.map} +1 -1
  199. package/dist/mg-components/p-35898742.js +3 -0
  200. package/dist/mg-components/p-35898742.js.map +1 -0
  201. package/dist/mg-components/p-3b052ac0.entry.js +2 -0
  202. package/dist/mg-components/p-3b052ac0.entry.js.map +1 -0
  203. package/dist/mg-components/p-6810a565.entry.js +2 -0
  204. package/dist/mg-components/p-6810a565.entry.js.map +1 -0
  205. package/dist/mg-components/{p-ee51ec5e.js → p-b986c107.js} +2 -2
  206. package/dist/mg-components/p-b986c107.js.map +1 -0
  207. package/dist/mg-components/{p-a49e2b74.js → p-dc436f3c.js} +2 -2
  208. package/dist/mg-components/p-f48d964f.entry.js +2 -0
  209. package/dist/mg-components/p-f48d964f.entry.js.map +1 -0
  210. package/dist/types/components/atoms/mg-button/mg-button.conf.d.ts +9 -1
  211. package/dist/types/components/atoms/mg-button/mg-button.d.ts +11 -1
  212. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +6 -0
  213. package/dist/types/components/molecules/internals/mg-item-more/mg-item-more.d.ts +1 -15
  214. package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +14 -30
  215. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +46 -37
  216. package/dist/types/components/molecules/mg-alert/mg-alert.d.ts +4 -0
  217. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +4 -0
  218. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +4 -0
  219. package/dist/types/components.d.ts +33 -15
  220. package/dist/types/utils/behaviors.utils.d.ts +15 -44
  221. package/ide/intellij/web-types.json +39 -11
  222. package/ide/vscode/html-custom-data.json +28 -6
  223. package/package.json +27 -37
  224. package/dist/cjs/index-52d5f3d4.js.map +0 -1
  225. package/dist/cjs/index.es-ac7c22e3.js.map +0 -1
  226. package/dist/esm/index-81752ffe.js.map +0 -1
  227. package/dist/esm/index.es-940821a9.js.map +0 -1
  228. package/dist/mg-components/p-2298352f.js +0 -3
  229. package/dist/mg-components/p-2298352f.js.map +0 -1
  230. package/dist/mg-components/p-31e6c1a7.entry.js +0 -2
  231. package/dist/mg-components/p-67c9be27.entry.js +0 -2
  232. package/dist/mg-components/p-67c9be27.entry.js.map +0 -1
  233. package/dist/mg-components/p-95895169.entry.js +0 -2
  234. package/dist/mg-components/p-95895169.entry.js.map +0 -1
  235. package/dist/mg-components/p-abddacc2.entry.js +0 -2
  236. package/dist/mg-components/p-abddacc2.entry.js.map +0 -1
  237. package/dist/mg-components/p-ee51ec5e.js.map +0 -1
  238. /package/dist/mg-components/{p-a49e2b74.js.map → p-dc436f3c.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- import{r as t,c as s,f as e,h as i,g as a}from"./p-2298352f.js";import{X as h,Y as n}from"./p-ee51ec5e.js";import{i as o}from"./p-a49e2b74.js";const r=["info","warning","success","danger"];const c=["bar-left","background"];const l=".mg-c-alert__close-button{position:absolute;top:0;right:0}.mg-c-alert.mg-c-alert--close-button{--mg-c-card-spacing:0 var(--mg-b-size-min-height) 0 0}";const u=l;const m=class{constructor(e){t(this,e);this.componentShow=s(this,"component-show",7);this.componentHide=s(this,"component-hide",7);this.classCloseButton="mg-c-alert--close-button";this.storedTimer=null;this.isFocused=false;this.isHovered=false;this.setTimer=()=>{this.storedTimer=setTimeout((()=>this.element.hidden=true),this.delay*1e3)};this.clearTimer=()=>{clearTimeout(this.storedTimer)};this.timerEvents=t=>{this.clearTimer();const s=t.type==="mouseenter";this[s?"isHovered":"isFocused"]=true;this.element.addEventListener(s?"mouseleave":"focusout",(t=>{this[t.type==="mouseleave"?"isHovered":"isFocused"]=false;if(!this.isFocused&&!this.isHovered)this.setTimer()}),{once:true})};this.handleClose=()=>{this.element.hidden=true};this.delay=undefined;this.variant=undefined;this.variantStyle=undefined;this.classCollection=new h(["mg-c-alert"]);this.hasActions=false}watchDelay(t){if(t!==undefined&&t<2){throw new Error(`<mg-alert> prop "delay" must be greater than 2 seconds. Passed value: ${n(t)}.`)}}watchVariant(t){if(t&&!r.includes(t)){throw new Error(`<mg-alert> prop "variant" must be one of: ${r.join(", ")}. Passed value: ${n(t)}.`)}}watchVariantStyle(t){if(t&&!c.includes(t)){throw new Error(`<mg-alert> prop "variantStyle" must be one of: ${c.join(", ")}. Passed value: ${n(t)}.`)}}watchHidden(t){if(typeof t==="string"&&t===""){t=true}if(t){this.componentHide.emit();["focusin","mouseenter"].forEach((t=>{this.element.removeEventListener(t,this.timerEvents)}));this.clearTimer()}else{this.componentShow.emit();if(this.delay>1){this.setTimer();["focusin","mouseenter"].forEach((t=>{this.element.addEventListener(t,this.timerEvents)}))}}e(this)}componentWillLoad(){this.messages=o(this.element).messages;this.watchVariant(this.variant);this.watchVariantStyle(this.variantStyle);this.watchDelay(this.delay);this.watchHidden(this.element.hidden);this.hasActions=this.element.querySelector('[slot="actions"]')!==null;if(!this.hasActions){this.classCollection.add(this.classCloseButton)}}render(){return i("mg-message",{key:"4023a825a33246b23dcacc322f7c35f14823f8ef",class:this.classCollection.join(),role:this.variant==="info"?"status":"alert",variant:this.variant,variantStyle:this.variantStyle},i("slot",{key:"cd1c9204c3a325d476cab4f1ce762bdd3662b074"}),this.hasActions?i("span",{slot:"actions"},i("slot",{name:"actions"})):i("span",{class:"mg-c-alert__close-button"},i("mg-button",{"is-icon":true,variant:"flat",label:this.messages.alert.closeButton,onClick:this.handleClose},i("mg-icon",{icon:"cross"}))))}get element(){return a(this)}static get watchers(){return{delay:["watchDelay"],variant:["watchVariant"],variantStyle:["watchVariantStyle"],hidden:["watchHidden"]}}};m.style=u;export{m as mg_alert};
2
- //# sourceMappingURL=p-95895169.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["variants","variantStyles","mgAlertCss","MgAlertStyle0","MgAlert","this","classCloseButton","storedTimer","isFocused","isHovered","setTimer","setTimeout","element","hidden","delay","clearTimer","clearTimeout","timerEvents","event","isMouseEvent","type","addEventListener","eventOut","once","handleClose","ClassList","watchDelay","newValue","undefined","Error","toString","watchVariant","includes","join","watchVariantStyle","watchHidden","componentHide","emit","forEach","removeEventListener","componentShow","forceUpdate","componentWillLoad","messages","initLocales","variant","variantStyle","hasActions","querySelector","classCollection","add","render","h","key","class","role","slot","name","label","alert","closeButton","onClick","icon"],"sources":["src/components/molecules/mg-alert/mg-alert.conf.ts","../styles/dist/components/mg-alert.css?tag=mg-alert&encapsulation=shadow","src/components/molecules/mg-alert/mg-alert.tsx"],"sourcesContent":["import type { Variant, VariantStyle } from '../../../types';\n\n/**\n * List available variants\n */\nexport const variants = ['info', 'warning', 'success', 'danger'] as const;\n\n/**\n * Variant type\n */\nexport type VariantType = Variant & (typeof variants)[number];\n\n/**\n * List available variant styles\n */\nexport const variantStyles = ['bar-left', 'background'] as const;\n\n/**\n * VariantStyle type\n */\nexport type VariantStyleType = VariantStyle & (typeof variantStyles)[number];\n",".mg-c-alert__close-button{position:absolute;top:0;right:0}.mg-c-alert.mg-c-alert--close-button{--mg-c-card-spacing: 0 var(--mg-b-size-min-height) 0 0}/*# sourceMappingURL=mg-alert.css.map */\n","import { Component, Element, Event, EventEmitter, h, Prop, State, Watch, forceUpdate } from '@stencil/core';\nimport { ClassList, toString } from '@mgdis/stencil-helpers';\nimport { variants, variantStyles, VariantStyleType, VariantType } from './mg-alert.conf';\nimport { initLocales } from '../../../locales';\n\n/**\n * @slot - Alert content\n * @slot actions - Actions content\n */\n@Component({\n tag: 'mg-alert',\n styleUrl: '../../../../node_modules/@mgdis/styles/dist/components/mg-alert.css',\n shadow: true,\n})\nexport class MgAlert {\n /************\n * Internal *\n ************/\n\n // Classes\n private readonly classCloseButton = 'mg-c-alert--close-button';\n\n // Stored timer setted when hide action is run from setTimeOut\n private storedTimer: ReturnType<typeof setTimeout> = null;\n\n // Manage hover\n private isFocused = false;\n private isHovered = false;\n\n // Locales\n private messages;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgAlertElement;\n\n /**\n * Add a delay to hide/close message when it passed\n * Value is defined in seconds and must greater than 2 seconds\n */\n @Prop() delay?: number;\n @Watch('delay')\n watchDelay(newValue: MgAlert['delay']): void {\n if (newValue !== undefined && newValue < 2) {\n throw new Error(`<mg-alert> prop \"delay\" must be greater than 2 seconds. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define variant\n */\n @Prop() variant?: VariantType;\n @Watch('variant')\n watchVariant(newValue: MgAlert['variant']): void {\n if (newValue && !variants.includes(newValue)) {\n throw new Error(`<mg-alert> prop \"variant\" must be one of: ${variants.join(', ')}. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define variant style\n */\n @Prop() variantStyle?: VariantStyleType;\n @Watch('variantStyle')\n watchVariantStyle(newValue: MgAlert['variantStyle']): void {\n if (newValue && !variantStyles.includes(newValue)) {\n throw new Error(`<mg-alert> prop \"variantStyle\" must be one of: ${variantStyles.join(', ')}. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Watch hidden prop\n */\n // eslint-disable-next-line @stencil-community/no-unused-watch\n @Watch('hidden')\n watchHidden(newValue: boolean): void {\n if (typeof newValue === 'string' && newValue === '') {\n newValue = true;\n }\n if (newValue) {\n this.componentHide.emit();\n // Remove event Listener\n ['focusin', 'mouseenter'].forEach(event => {\n this.element.removeEventListener(event, this.timerEvents);\n });\n // Clear Timer\n this.clearTimer();\n } else {\n this.componentShow.emit();\n // If delay is set\n if (this.delay > 1) {\n // Start timer\n this.setTimer();\n // Stop timer when get focus or mouse enter\n ['focusin', 'mouseenter'].forEach(event => {\n this.element.addEventListener(event, this.timerEvents);\n });\n }\n }\n forceUpdate(this);\n }\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-alert']);\n\n /**\n * Define if component is using actions slot\n */\n @State() hasActions = false;\n\n /**\n * Emited event when alert is diplayed\n */\n @Event({ eventName: 'component-show' }) componentShow: EventEmitter<void>;\n\n /**\n * Emited event when alert is hidden\n */\n @Event({ eventName: 'component-hide' }) componentHide: EventEmitter<void>;\n\n /**\n * Set timer\n */\n private setTimer = (): void => {\n this.storedTimer = setTimeout(() => (this.element.hidden = true), this.delay * 1000);\n };\n\n /**\n * Clear timer\n */\n private clearTimer = (): void => {\n clearTimeout(this.storedTimer);\n };\n\n /**\n * Event to add on element\n * @param event - event\n */\n private timerEvents = (event: MouseEvent | FocusEvent): void => {\n this.clearTimer();\n const isMouseEvent: boolean = event.type === 'mouseenter';\n // Needed to ensure we don't start the timer\n this[isMouseEvent ? 'isHovered' : 'isFocused'] = true;\n\n // Restart timer when loose focus AND mouse leave\n this.element.addEventListener(\n isMouseEvent ? 'mouseleave' : 'focusout',\n eventOut => {\n this[eventOut.type === 'mouseleave' ? 'isHovered' : 'isFocused'] = false;\n // Start timer if needed\n if (!this.isFocused && !this.isHovered) this.setTimer();\n },\n { once: true },\n );\n };\n\n /**\n * Handle close button\n */\n private handleClose = (): void => {\n this.element.hidden = true;\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n */\n componentWillLoad(): void {\n // Get locales\n this.messages = initLocales(this.element).messages;\n // Validate\n this.watchVariant(this.variant);\n this.watchVariantStyle(this.variantStyle);\n this.watchDelay(this.delay);\n this.watchHidden(this.element.hidden);\n // Check if component has actions slot\n this.hasActions = this.element.querySelector('[slot=\"actions\"]') !== null;\n if (!this.hasActions) {\n this.classCollection.add(this.classCloseButton);\n }\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <mg-message class={this.classCollection.join()} role={this.variant === 'info' ? 'status' : 'alert'} variant={this.variant} variantStyle={this.variantStyle}>\n <slot></slot>\n {this.hasActions ? (\n <span slot=\"actions\">\n <slot name=\"actions\"></slot>\n </span>\n ) : (\n <span class=\"mg-c-alert__close-button\">\n <mg-button is-icon variant=\"flat\" label={this.messages.alert.closeButton} onClick={this.handleClose}>\n <mg-icon icon=\"cross\"></mg-icon>\n </mg-button>\n </span>\n )}\n </mg-message>\n );\n }\n}\n"],"mappings":"+IAKO,MAAMA,EAAW,CAAC,OAAQ,UAAW,UAAW,UAUhD,MAAMC,EAAgB,CAAC,WAAY,cCf1C,MAAMC,EAAa,wJACnB,MAAAC,EAAeD,E,MCaFE,EAAO,M,qHAMDC,KAAAC,iBAAmB,2BAG5BD,KAAAE,YAA6C,KAG7CF,KAAAG,UAAY,MACZH,KAAAI,UAAY,MAuGZJ,KAAAK,SAAW,KACjBL,KAAKE,YAAcI,YAAW,IAAON,KAAKO,QAAQC,OAAS,MAAOR,KAAKS,MAAQ,IAAK,EAM9ET,KAAAU,WAAa,KACnBC,aAAaX,KAAKE,YAAY,EAOxBF,KAAAY,YAAeC,IACrBb,KAAKU,aACL,MAAMI,EAAwBD,EAAME,OAAS,aAE7Cf,KAAKc,EAAe,YAAc,aAAe,KAGjDd,KAAKO,QAAQS,iBACXF,EAAe,aAAe,YAC9BG,IACEjB,KAAKiB,EAASF,OAAS,aAAe,YAAc,aAAe,MAEnE,IAAKf,KAAKG,YAAcH,KAAKI,UAAWJ,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BAAgBC,IAAI7C,KAAKC,iB,EAQlC,MAAA6C,GACE,OACEC,EAAA,cAAAC,IAAA,2CAAYC,MAAOjD,KAAK4C,gBAAgBhB,OAAQsB,KAAMlD,KAAKwC,UAAY,OAAS,SAAW,QAASA,QAASxC,KAAKwC,QAASC,aAAczC,KAAKyC,cAC5IM,EAAA,QAAAC,IAAA,6CACChD,KAAK0C,WACJK,EAAA,QAAMI,KAAK,WACTJ,EAAA,QAAMK,KAAK,aAGbL,EAAA,QAAME,MAAM,4BACVF,EAAA,4BAAmBP,QAAQ,OAAOa,MAAOrD,KAAKsC,SAASgB,MAAMC,YAAaC,QAASxD,KAAKmB,aACtF4B,EAAA,WAASU,KAAK,Y","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r,h as e,H as s}from"./p-2298352f.js";import{m as o,Y as a,V as i}from"./p-ee51ec5e.js";const t=["progressbar","meter"];const c="/*!\n * @prop --mg-c-progress-size: Defines the size of the progress bar. Default value is `--mg-b-size-8`.\n * @prop --mg-c-progress-border-color: Defines the color of the progress bar border. Default value is `--mg-b-color-neutral-80`.\n * @prop --mg-c-progress-bar-color-background: Defines the color of the progress bar. Default value is `--mg-b-color-neutral-30`.\n * @prop --mg-c-progress-fill-color-background: Defines the color of the progress bar fill background. Default value is `--mg-b-color-app`.\n */.mg-c-progress{min-width:calc(var(--mg-b-size-16)*4)}.mg-c-progress__bar{position:relative;overflow:hidden;height:var(--mg-c-progress-size);border-width:var(--mg-b-size-border);border-style:solid;border-color:var(--mg-c-progress-border-color);border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);background-color:var(--mg-c-progress-bar-color-background)}.mg-c-progress__fill{height:100%;border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);transition:width 300ms ease-in-out}.mg-c-progress__bar.mg-c-progress__bar--active .mg-c-progress__fill{background-color:var(--mg-c-progress-fill-color-background)}";const g=c;const l=class{constructor(e){r(this,e);this.label=undefined;this.ariaRole="progressbar";this.value=0;this.min=0;this.max=100}watchLabel(r){if(!o(r)){throw new Error(`<mg-progress> prop "label" must be a valid string. Passed value: ${a(r)}.`)}}watchAriaRole(r){if(r&&!t.includes(r)){throw new Error(`<mg-progress> prop "ariaRole" must be one of: ${t.join(", ")}. Passed value: ${a(r)}.`)}}watchValue(r){if(r!==undefined&&(!i(r)||!(r>=this.min&&r<=this.max)))throw new Error(`<mg-progress> prop “value” must be a number within the range ${this.min} to ${this.max}. Passed value: ${a(r)}.`)}watchMin(r){if(r!==0&&r!==undefined&&(!i(r)||r>=this.max))throw new Error(`<mg-progress> prop “min” must be a number lower than: ${this.max}. Passed value: ${a(r)}.`)}watchMax(r){if(r!==100&&r!==undefined&&(!i(r)||r<=this.min))throw new Error(`<mg-progress> prop “max” must be a number greater than: ${this.min}. Passed value: ${a(r)}.`)}componentWillLoad(){this.watchLabel(this.label);this.watchAriaRole(this.ariaRole);this.watchMin(this.min);this.watchMax(this.max);this.watchValue(this.value)}render(){return e(s,{key:"c2a8b5264af27dab4f81981a6d20d04d572321db",role:this.ariaRole,"aria-label":this.label,"aria-valuenow":this.value,"aria-valuemin":this.min,"aria-valuemax":this.max},e("div",{key:"1ab08ca9582182c7c2e9cf1041e68cfd38390e3b",class:"mg-c-progress"},e("div",{key:"95044f35b5fcc1b5eb380828acc3935ff30c6c1f",class:{"mg-c-progress__bar":true,"mg-c-progress__bar--active":this.value>this.min}},e("div",{key:"4d3588379c0b1a135dd9118fd2cb3c00c9dd31cb",class:"mg-c-progress__fill",style:{width:`${Math.round((this.value-this.min)/(this.max-this.min)*100)}%`}}))))}static get watchers(){return{label:["watchLabel"],ariaRole:["watchAriaRole"],value:["watchValue"],min:["watchMin"],max:["watchMax"]}}};l.style=g;export{l as mg_progress};
2
- //# sourceMappingURL=p-abddacc2.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["roles","mgProgressCss","MgProgressStyle0","MgProgress","watchLabel","newValue","isValidString","Error","toString","watchAriaRole","includes","join","watchValue","undefined","isValidNumber","this","min","max","watchMin","watchMax","componentWillLoad","label","ariaRole","value","render","h","Host","key","role","class","style","width","Math","round"],"sources":["src/components/molecules/mg-progress/mg-progress.conf.ts","../styles/dist/components/mg-progress.css?tag=mg-progress&encapsulation=shadow","src/components/molecules/mg-progress/mg-progress.tsx"],"sourcesContent":["import { AriaRole } from '../../../types';\n\n/**\n * List of all possibles roles\n */\nexport const roles = ['progressbar', 'meter'] as const;\n\n/**\n * Aria Role type from roles\n */\nexport type AriaRoleType = AriaRole & (typeof roles)[number];\n","/*!\n * @prop --mg-c-progress-size: Defines the size of the progress bar. Default value is `--mg-b-size-8`.\n * @prop --mg-c-progress-border-color: Defines the color of the progress bar border. Default value is `--mg-b-color-neutral-80`.\n * @prop --mg-c-progress-bar-color-background: Defines the color of the progress bar. Default value is `--mg-b-color-neutral-30`.\n * @prop --mg-c-progress-fill-color-background: Defines the color of the progress bar fill background. Default value is `--mg-b-color-app`.\n */.mg-c-progress{min-width:calc(var(--mg-b-size-16)*4)}.mg-c-progress__bar{position:relative;overflow:hidden;height:var(--mg-c-progress-size);border-width:var(--mg-b-size-border);border-style:solid;border-color:var(--mg-c-progress-border-color);border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);background-color:var(--mg-c-progress-bar-color-background)}.mg-c-progress__fill{height:100%;border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);transition:width 300ms ease-in-out}.mg-c-progress__bar.mg-c-progress__bar--active .mg-c-progress__fill{background-color:var(--mg-c-progress-fill-color-background)}/*# sourceMappingURL=mg-progress.css.map */\n","import { Component, h, Host, Prop, Watch } from '@stencil/core';\nimport { isValidNumber, isValidString, toString } from '@mgdis/stencil-helpers';\nimport { AriaRoleType, roles } from './mg-progress.conf';\n\n@Component({\n tag: 'mg-progress',\n styleUrl: '../../../../node_modules/@mgdis/styles/dist/components/mg-progress.css',\n shadow: true,\n})\nexport class MgProgress {\n /**************\n * Decorators *\n **************/\n\n /**\n * Define label\n */\n @Prop() label!: string;\n @Watch('label')\n watchLabel(newValue: MgProgress['label']): void {\n if (!isValidString(newValue)) {\n throw new Error(`<mg-progress> prop \"label\" must be a valid string. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define progress role\n * - `progressbar` to indicate a progress, such as loading or percent completion of a task\n * - `meter` to indicate a graphical display of a numeric value that varies within a defined range\n */\n @Prop() ariaRole?: AriaRoleType = 'progressbar';\n @Watch('ariaRole')\n watchAriaRole(newValue: MgProgress['ariaRole']): void {\n if (newValue && !roles.includes(newValue)) {\n throw new Error(`<mg-progress> prop \"ariaRole\" must be one of: ${roles.join(', ')}. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define current value\n * By default, it will be displayed as a percentage value.\n * If you don’t specify the min and max props, the value should be a number within the range of 0 to 100.\n */\n @Prop() value?: number = 0;\n @Watch('value')\n watchValue(newValue: MgProgress['value']): void {\n if (newValue !== undefined && (!isValidNumber(newValue) || !(newValue >= this.min && newValue <= this.max)))\n throw new Error(`<mg-progress> prop “value” must be a number within the range ${this.min} to ${this.max}. Passed value: ${toString(newValue)}.`);\n }\n\n /**\n * Define the minimum value in the range\n */\n @Prop() min?: number = 0;\n @Watch('min')\n watchMin(newValue: MgProgress['min']): void {\n if (newValue !== 0 && newValue !== undefined && (!isValidNumber(newValue) || newValue >= this.max))\n throw new Error(`<mg-progress> prop “min” must be a number lower than: ${this.max}. Passed value: ${toString(newValue)}.`);\n }\n\n /**\n * Define the maximum value in the range\n */\n @Prop() max?: number = 100;\n @Watch('max')\n watchMax(newValue: MgProgress['max']): void {\n if (newValue !== 100 && newValue !== undefined && (!isValidNumber(newValue) || newValue <= this.min))\n throw new Error(`<mg-progress> prop “max” must be a number greater than: ${this.min}. Passed value: ${toString(newValue)}.`);\n }\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n */\n componentWillLoad(): void {\n // validate props\n this.watchLabel(this.label);\n this.watchAriaRole(this.ariaRole);\n this.watchMin(this.min);\n this.watchMax(this.max);\n this.watchValue(this.value);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n return (\n <Host role={this.ariaRole} aria-label={this.label} aria-valuenow={this.value} aria-valuemin={this.min} aria-valuemax={this.max}>\n <div class=\"mg-c-progress\">\n <div class={{ 'mg-c-progress__bar': true, 'mg-c-progress__bar--active': this.value > this.min }}>\n <div\n class=\"mg-c-progress__fill\"\n style={{\n width: `${Math.round(((this.value - this.min) / (this.max - this.min)) * 100)}%`,\n }}\n ></div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"+FAKO,MAAMA,EAAQ,CAAC,cAAe,SCLrC,MAAMC,EAAgB,mpCACtB,MAAAC,EAAeD,E,MCQFE,EAAU,M,4DAqBa,c,WAaT,E,SAUF,E,SAUA,G,CA5CvB,UAAAC,CAAWC,GACT,IAAKC,EAAcD,GAAW,CAC5B,MAAM,IAAIE,MAAM,oEAAoEC,EAASH,M,EAWjG,aAAAI,CAAcJ,GACZ,GAAIA,IAAaL,EAAMU,SAASL,GAAW,CACzC,MAAM,IAAIE,MAAM,iDAAiDP,EAAMW,KAAK,wBAAwBH,EAASH,M,EAWjH,UAAAO,CAAWP,GACT,GAAIA,IAAaQ,aAAeC,EAAcT,MAAeA,GAAYU,KAAKC,KAAOX,GAAYU,KAAKE,MACpG,MAAM,IAAIV,MAAM,gEAAgEQ,KAAKC,UAAUD,KAAKE,sBAAsBT,EAASH,M,CAQvI,QAAAa,CAASb,GACP,GAAIA,IAAa,GAAKA,IAAaQ,aAAeC,EAAcT,IAAaA,GAAYU,KAAKE,KAC5F,MAAM,IAAIV,MAAM,yDAAyDQ,KAAKE,sBAAsBT,EAASH,M,CAQjH,QAAAc,CAASd,GACP,GAAIA,IAAa,KAAOA,IAAaQ,aAAeC,EAAcT,IAAaA,GAAYU,KAAKC,KAC9F,MAAM,IAAIT,MAAM,2DAA2DQ,KAAKC,sBAAsBR,EAASH,M,CAUnH,iBAAAe,GAEEL,KAAKX,WAAWW,KAAKM,OACrBN,KAAKN,cAAcM,KAAKO,UACxBP,KAAKG,SAASH,KAAKC,KACnBD,KAAKI,SAASJ,KAAKE,KACnBF,KAAKH,WAAWG,KAAKQ,M,CAOvB,MAAAC,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CAACC,KAAMb,KAAKO,SAAQ,aAAcP,KAAKM,MAAK,gBAAiBN,KAAKQ,MAAK,gBAAiBR,KAAKC,IAAG,gBAAiBD,KAAKE,KACzHQ,EAAA,OAAAE,IAAA,2CAAKE,MAAM,iBACTJ,EAAA,OAAAE,IAAA,2CAAKE,MAAO,CAAE,qBAAsB,KAAM,6BAA8Bd,KAAKQ,MAAQR,KAAKC,MACxFS,EAAA,OAAAE,IAAA,2CACEE,MAAM,sBACNC,MAAO,CACLC,MAAO,GAAGC,KAAKC,OAAQlB,KAAKQ,MAAQR,KAAKC,MAAQD,KAAKE,IAAMF,KAAKC,KAAQ,a","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["ve","Object","defineProperty","he","e","t","s","enumerable","configurable","writable","value","g","qe","Uint8Array","crypto","getRandomValues","r","Array","from","map","o","toString","padStart","join","slice","Ge","me","exec","Xe","constructor","this","has","classes","push","indexOf","splice","includes","Je","isArray","every","Ke","tagName","toLowerCase","Qe","Ze","te","se","self","top","parent","console","error","frames","length","trim","Ye","JSON","stringify","Ve","Number","isNaN","et","toLocaleLowerCase","normalize","replaceAll","tt","async","be","Se","get","Ae","err","oe","Ee","ok","U","unwrap","je","unwrapErr","Re","isOk","isErr","Promise","then","ct","pattern","ze","timeZone","replace","ft","toISOString","split","We","closest","Intl","NumberFormat","supportedLocalesOf","lang","n","navigator","language","i","shift","keys","locale","messages","ut","style","currency","format","$t","minimumFractionDigits","toFixed","dt","maximumFractionDigits","pt","unit","unitDisplay","He","test","DateTimeFormat","Date","gt"],"sources":["../stencil-helpers/dist/index.es.js"],"sourcesContent":["var ve = Object.defineProperty;\nvar X = (e) => {\n throw TypeError(e);\n};\nvar he = (e, t, s) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;\nvar g = (e, t, s) => he(e, typeof t != \"symbol\" ? t + \"\" : t, s), ye = (e, t, s) => t.has(e) || X(\"Cannot \" + s);\nvar k = (e, t, s) => (ye(e, t, \"read from private field\"), s ? s.call(e) : t.get(e)), P = (e, t, s) => t.has(e) ? X(\"Cannot add the same private member more than once\") : t instanceof WeakSet ? t.add(e) : t.set(e, s);\nconst qe = (e = \"\", t = 10) => {\n const s = new Uint8Array(t);\n crypto.getRandomValues(s);\n const r = Array.from(s).map((o) => o.toString(16).padStart(2, \"0\")).join(\"\").slice(0, t);\n return e !== \"\" ? `${e}-${r}` : r;\n}, Ge = (e) => me(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null;\nclass Xe {\n constructor(t = []) {\n /**\n * Available classes\n */\n g(this, \"classes\");\n /**\n * Add class\n * @param className - class name to add\n */\n g(this, \"add\", (t) => {\n this.has(t) || this.classes.push(t);\n });\n /**\n * Delete class\n * @param className - class name to delete\n */\n g(this, \"delete\", (t) => {\n const s = this.classes.indexOf(t);\n s > -1 && this.classes.splice(s, 1);\n });\n /**\n * Check if class exist in list\n * @param className - class name to check\n * @returns class name is in the list\n */\n g(this, \"has\", (t) => this.classes.includes(t));\n /**\n * Join classes seperated by spaces\n * @returns joined values\n */\n g(this, \"join\", () => this.classes.join(\" \"));\n this.classes = t;\n }\n}\nconst Je = (e) => Array.isArray(e) && e.every((t) => typeof t == \"string\"), Ke = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), Qe = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]), [identifier], mg-button', Ze = (e) => {\n const t = te(e), s = se(e);\n return [e, ...t, ...s];\n}, te = (e, t = []) => {\n if (e.self !== e.top)\n try {\n const s = e.parent;\n return s ? (t.push(s), te(s, t)) : t;\n } catch (s) {\n return console.error(\"Different hosts between iframes:\", s), t;\n }\n return t;\n}, se = (e, t = []) => {\n if (e.frames.length > 0)\n for (const s of Array.from(e.frames))\n t.push(s), se(s, t);\n return t;\n}, me = (e) => typeof e == \"string\" && e.trim() !== \"\", Ye = (e) => typeof e == \"object\" ? JSON.stringify(e) : `${e}`, Ve = (e) => typeof e == \"number\" && !Number.isNaN(e), et = (e) => typeof e == \"string\" ? e.toLocaleLowerCase().normalize(\"NFD\").replaceAll(/[\\u0300-\\u036f]/g, \"\") : e, tt = async (e) => e();\nvar E = {\n allRenderFn: !1,\n cmpDidLoad: !0,\n cmpDidUnload: !1,\n cmpDidUpdate: !0,\n cmpDidRender: !0,\n cmpWillLoad: !0,\n cmpWillUpdate: !0,\n cmpWillRender: !0,\n connectedCallback: !0,\n disconnectedCallback: !0,\n element: !0,\n event: !0,\n hasRenderFn: !0,\n lifecycle: !0,\n hostListener: !0,\n hostListenerTargetWindow: !0,\n hostListenerTargetDocument: !0,\n hostListenerTargetBody: !0,\n hostListenerTargetParent: !1,\n hostListenerTarget: !0,\n member: !0,\n method: !0,\n mode: !0,\n observeAttribute: !0,\n prop: !0,\n propMutable: !0,\n reflect: !0,\n scoped: !0,\n shadowDom: !0,\n slot: !0,\n cssAnnotations: !0,\n state: !0,\n style: !0,\n formAssociated: !1,\n svg: !0,\n updatable: !0,\n vdomAttribute: !0,\n vdomXlink: !0,\n vdomClass: !0,\n vdomFunctional: !0,\n vdomKey: !0,\n vdomListener: !0,\n vdomRef: !0,\n vdomPropOrAttr: !0,\n vdomRender: !0,\n vdomStyle: !0,\n vdomText: !0,\n watchCallback: !0,\n taskQueue: !0,\n hotModuleReplacement: !1,\n isDebug: !1,\n isDev: !1,\n isTesting: !1,\n hydrateServerSide: !1,\n hydrateClientSide: !1,\n lifecycleDOMEvents: !1,\n lazyLoad: !1,\n profile: !1,\n slotRelocation: !0,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n appendChildSlotFix: !1,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n cloneNodeFix: !1,\n hydratedAttribute: !1,\n hydratedClass: !0,\n // TODO(STENCIL-1305): remove this option\n scriptDataOpts: !1,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n scopedSlotTextContentFix: !1,\n // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field\n shadowDomShim: !1,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n slotChildNodesFix: !1,\n invisiblePrehydration: !0,\n propBoolean: !0,\n propNumber: !0,\n propString: !0,\n constructableCSS: !0,\n cmpShouldUpdate: !0,\n devTools: !1,\n shadowDelegatesFocus: !0,\n initializeNextTick: !1,\n asyncLoading: !0,\n asyncQueue: !1,\n transformTagName: !1,\n attachStyles: !0,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n experimentalSlotFixes: !1\n}, be = Object.defineProperty, Se = (e, t) => {\n for (var s in t)\n be(e, s, { get: t[s], enumerable: !0 });\n}, J = (e, t) => t in e, K = \"http://www.w3.org/1999/xlink\", B = typeof window < \"u\" ? window : {}, M = B.document || { head: {} };\nB.HTMLElement;\nvar j = {\n $flags$: 0,\n $resourcesUrl$: \"\",\n jmp: (e) => e(),\n raf: (e) => requestAnimationFrame(e),\n ael: (e, t, s, r) => e.addEventListener(t, s, r),\n rel: (e, t, s, r) => e.removeEventListener(t, s, r),\n ce: (e, t) => new CustomEvent(e, t)\n}, Q = {}, Te = \"http://www.w3.org/2000/svg\", ke = \"http://www.w3.org/1999/xhtml\", xe = (e) => e != null, re = (e) => (e = typeof e, e === \"object\" || e === \"function\"), Ae = {};\nSe(Ae, {\n err: () => oe,\n map: () => Ee,\n ok: () => U,\n unwrap: () => je,\n unwrapErr: () => Re\n});\nvar U = (e) => ({\n isOk: !0,\n isErr: !1,\n value: e\n}), oe = (e) => ({\n isOk: !1,\n isErr: !0,\n value: e\n});\nfunction Ee(e, t) {\n if (e.isOk) {\n const s = t(e.value);\n return s instanceof Promise ? s.then((r) => U(r)) : U(s);\n }\n if (e.isErr) {\n const s = e.value;\n return oe(s);\n }\n throw \"should never get here\";\n}\nvar je = (e) => {\n if (e.isOk)\n return e.value;\n throw e.value;\n}, Re = (e) => {\n if (e.isErr)\n return e.value;\n throw e.value;\n}, Le = (e, t, ...s) => {\n let r = null, o = null, n = null, i = !1, a = !1;\n const c = [], d = (l) => {\n for (let $ = 0; $ < l.length; $++)\n r = l[$], Array.isArray(r) ? d(r) : r != null && typeof r != \"boolean\" && ((i = !re(r)) && (r = String(r)), i && a ? c[c.length - 1].$text$ += r : c.push(i ? W(null, r) : r), a = i);\n };\n d(s);\n const f = W(e, null);\n return f.$attrs$ = t, c.length > 0 && (f.$children$ = c), f.$key$ = o, f.$name$ = n, f;\n}, W = (e, t) => {\n const s = {\n $flags$: 0,\n $tag$: e,\n $text$: t,\n $elm$: null,\n $children$: null\n };\n return s.$attrs$ = null, s.$key$ = null, s.$name$ = null, s;\n}, Oe = {}, Ne = (e) => e && e.$tag$ === Oe, Z = (e, t, s, r, o, n) => {\n if (s !== r) {\n let i = J(e, t), a = t.toLowerCase();\n if (t === \"class\") {\n const c = e.classList, d = Y(s), f = Y(r);\n c.remove(...d.filter((l) => l && !f.includes(l))), c.add(...f.filter((l) => l && !d.includes(l)));\n } else if (t === \"style\") {\n for (const c in s)\n (!r || r[c] == null) && (c.includes(\"-\") ? e.style.removeProperty(c) : e.style[c] = \"\");\n for (const c in r)\n (!s || r[c] !== s[c]) && (c.includes(\"-\") ? e.style.setProperty(c, r[c]) : e.style[c] = r[c]);\n } else if (t !== \"key\") if (t === \"ref\")\n r && r(e);\n else if (!e.__lookupSetter__(t) && t[0] === \"o\" && t[1] === \"n\") {\n if (t[2] === \"-\" ? t = t.slice(3) : J(B, a) ? t = a.slice(2) : t = a[2] + t.slice(3), s || r) {\n const c = t.endsWith(ne);\n t = t.replace(Fe, \"\"), s && j.rel(e, t, s, c), r && j.ael(e, t, r, c);\n }\n } else {\n const c = re(r);\n if ((i || c && r !== null) && !o)\n try {\n if (e.tagName.includes(\"-\"))\n e[t] = r;\n else {\n const f = r ?? \"\";\n t === \"list\" ? i = !1 : (s == null || e[t] != f) && (typeof e.__lookupSetter__(t) == \"function\" ? e[t] = f : e.setAttribute(t, f));\n }\n } catch {\n }\n let d = !1;\n a !== (a = a.replace(/^xlink\\:?/, \"\")) && (t = a, d = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === \"\") && (d ? e.removeAttributeNS(K, t) : e.removeAttribute(t)) : (!i || n & 4 || o) && !c && (r = r === !0 ? \"\" : r, d ? e.setAttributeNS(K, t, r) : e.setAttribute(t, r));\n }\n }\n}, Me = /\\s/, Y = (e) => e ? e.split(Me) : [], ne = \"Capture\", Fe = new RegExp(ne + \"$\"), ie = (e, t, s) => {\n const r = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, o = e && e.$attrs$ || Q, n = t.$attrs$ || Q;\n for (const i of V(Object.keys(o)))\n i in n || Z(r, i, o[i], void 0, s, t.$flags$);\n for (const i of V(Object.keys(n)))\n Z(r, i, o[i], n[i], s, t.$flags$);\n};\nfunction V(e) {\n return e.includes(\"ref\") ? (\n // we need to sort these to ensure that `'ref'` is the last attr\n [...e.filter((t) => t !== \"ref\"), \"ref\"]\n ) : (\n // no need to sort, return the original array\n e\n );\n}\nvar x, H, R, F = !1, _ = !1, I = !1, h = !1, D = (e, t, s, r) => {\n var o;\n const n = t.$children$[s];\n let i = 0, a, c, d;\n if (F || (I = !0, n.$tag$ === \"slot\" && (x && r.classList.add(x + \"-s\"), n.$flags$ |= n.$children$ ? (\n // slot element has fallback content\n // still create an element that \"mocks\" the slot element\n 2\n ) : (\n // slot element does not have fallback content\n // create an html comment we'll use to always reference\n // where actual slot content should sit next to\n 1\n ))), n.$text$ !== null)\n a = n.$elm$ = M.createTextNode(n.$text$);\n else if (n.$flags$ & 1)\n a = n.$elm$ = M.createTextNode(\"\");\n else {\n if (h || (h = n.$tag$ === \"svg\"), a = n.$elm$ = M.createElementNS(\n h ? Te : ke,\n !F && E.slotRelocation && n.$flags$ & 2 ? \"slot-fb\" : n.$tag$\n ), h && n.$tag$ === \"foreignObject\" && (h = !1), ie(null, n, h), !!a.getRootNode().querySelector(\"body\") && E.scoped && xe(x) && a[\"s-si\"] !== x && a.classList.add(a[\"s-si\"] = x), G(a, r), n.$children$)\n for (i = 0; i < n.$children$.length; ++i)\n c = D(e, n, i, a), c && a.appendChild(c);\n n.$tag$ === \"svg\" ? h = !1 : a.tagName === \"foreignObject\" && (h = !0);\n }\n return a[\"s-hn\"] = R, n.$flags$ & 3 && (a[\"s-sr\"] = !0, a[\"s-cr\"] = H, a[\"s-sn\"] = n.$name$ || \"\", a[\"s-rf\"] = (o = n.$attrs$) == null ? void 0 : o.ref, d = e && e.$children$ && e.$children$[s], d && d.$tag$ === n.$tag$ && e.$elm$ && L(e.$elm$, !1)), a;\n}, L = (e, t) => {\n j.$flags$ |= 1;\n const s = Array.from(e.childNodes);\n if (e[\"s-sr\"] && E.experimentalSlotFixes) {\n let r = e;\n for (; r = r.nextSibling; )\n r && r[\"s-sn\"] === e[\"s-sn\"] && r[\"s-sh\"] === R && s.push(r);\n }\n for (let r = s.length - 1; r >= 0; r--) {\n const o = s[r];\n o[\"s-hn\"] !== R && o[\"s-ol\"] && (T(ce(o), o, q(o)), o[\"s-ol\"].remove(), o[\"s-ol\"] = void 0, o[\"s-sh\"] = void 0, I = !0), t && L(o, t);\n }\n j.$flags$ &= -2;\n}, le = (e, t, s, r, o, n) => {\n let i = e[\"s-cr\"] && e[\"s-cr\"].parentNode || e, a;\n for (i.shadowRoot && i.tagName === R && (i = i.shadowRoot); o <= n; ++o)\n r[o] && (a = D(null, s, o, e), a && (r[o].$elm$ = a, T(i, a, q(t))));\n}, ae = (e, t, s) => {\n for (let r = t; r <= s; ++r) {\n const o = e[r];\n if (o) {\n const n = o.$elm$;\n $e(o), n && (_ = !0, n[\"s-ol\"] ? n[\"s-ol\"].remove() : L(n, !0), n.remove());\n }\n }\n}, _e = (e, t, s, r, o = !1) => {\n let n = 0, i = 0, a = 0, c = 0, d = t.length - 1, f = t[0], l = t[d], $ = r.length - 1, u = r[0], p = r[$], m, y;\n for (; n <= d && i <= $; )\n if (f == null)\n f = t[++n];\n else if (l == null)\n l = t[--d];\n else if (u == null)\n u = r[++i];\n else if (p == null)\n p = r[--$];\n else if (N(f, u, o))\n A(f, u, o), f = t[++n], u = r[++i];\n else if (N(l, p, o))\n A(l, p, o), l = t[--d], p = r[--$];\n else if (N(f, p, o))\n (f.$tag$ === \"slot\" || p.$tag$ === \"slot\") && L(f.$elm$.parentNode, !1), A(f, p, o), T(e, f.$elm$, l.$elm$.nextSibling), f = t[++n], p = r[--$];\n else if (N(l, u, o))\n (f.$tag$ === \"slot\" || p.$tag$ === \"slot\") && L(l.$elm$.parentNode, !1), A(l, u, o), T(e, l.$elm$, f.$elm$), l = t[--d], u = r[++i];\n else {\n for (a = -1, c = n; c <= d; ++c)\n if (t[c] && t[c].$key$ !== null && t[c].$key$ === u.$key$) {\n a = c;\n break;\n }\n a >= 0 ? (y = t[a], y.$tag$ !== u.$tag$ ? m = D(t && t[i], s, a, e) : (A(y, u, o), t[a] = void 0, m = y.$elm$), u = r[++i]) : (m = D(t && t[i], s, i, e), u = r[++i]), m && T(ce(f.$elm$), m, q(f.$elm$));\n }\n n > d ? le(\n e,\n r[$ + 1] == null ? null : r[$ + 1].$elm$,\n s,\n r,\n i,\n $\n ) : i > $ && ae(t, n, d);\n}, N = (e, t, s = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === \"slot\" ? (\n // The component gets hydrated and no VDOM has been initialized.\n // Here the comparison can't happen as $name$ property is not set for `leftNode`.\n \"$nodeId$\" in e && s && // `leftNode` is not from type HTMLComment which would cause many\n // hydration comments to be removed\n e.$elm$.nodeType !== 8 ? !1 : e.$name$ === t.$name$\n) : s ? !0 : e.$key$ === t.$key$ : !1, q = (e) => e && e[\"s-ol\"] || e, ce = (e) => (e[\"s-ol\"] ? e[\"s-ol\"] : e).parentNode, A = (e, t, s = !1) => {\n const r = t.$elm$ = e.$elm$, o = e.$children$, n = t.$children$, i = t.$tag$, a = t.$text$;\n let c;\n a === null ? (h = i === \"svg\" ? !0 : i === \"foreignObject\" ? !1 : h, i === \"slot\" && !F || ie(e, t, h), o !== null && n !== null ? _e(r, o, t, n, s) : n !== null ? (e.$text$ !== null && (r.textContent = \"\"), le(r, null, t, n, 0, n.length - 1)) : (\n // don't do this on initial render as it can cause non-hydrated content to be removed\n !s && E.updatable && o !== null && ae(o, 0, o.length - 1)\n ), h && i === \"svg\" && (h = !1)) : (c = r[\"s-cr\"]) ? c.parentNode.textContent = a : e.$text$ !== a && (r.data = a);\n}, fe = (e) => {\n const t = e.childNodes;\n for (const s of t)\n if (s.nodeType === 1) {\n if (s[\"s-sr\"]) {\n const r = s[\"s-sn\"];\n s.hidden = !1;\n for (const o of t)\n if (o !== s) {\n if (o[\"s-hn\"] !== s[\"s-hn\"] || r !== \"\") {\n if (o.nodeType === 1 && (r === o.getAttribute(\"slot\") || r === o[\"s-sn\"]) || o.nodeType === 3 && r === o[\"s-sn\"]) {\n s.hidden = !0;\n break;\n }\n } else if (o.nodeType === 1 || o.nodeType === 3 && o.textContent.trim() !== \"\") {\n s.hidden = !0;\n break;\n }\n }\n }\n fe(s);\n }\n}, b = [], ue = (e) => {\n let t, s, r;\n for (const o of e.childNodes) {\n if (o[\"s-sr\"] && (t = o[\"s-cr\"]) && t.parentNode) {\n s = t.parentNode.childNodes;\n const n = o[\"s-sn\"];\n for (r = s.length - 1; r >= 0; r--)\n if (t = s[r], !t[\"s-cn\"] && !t[\"s-nr\"] && t[\"s-hn\"] !== o[\"s-hn\"] && !E.experimentalSlotFixes)\n if (ee(t, n)) {\n let i = b.find((a) => a.$nodeToRelocate$ === t);\n _ = !0, t[\"s-sn\"] = t[\"s-sn\"] || n, i ? (i.$nodeToRelocate$[\"s-sh\"] = o[\"s-hn\"], i.$slotRefNode$ = o) : (t[\"s-sh\"] = o[\"s-hn\"], b.push({\n $slotRefNode$: o,\n $nodeToRelocate$: t\n })), t[\"s-sr\"] && b.map((a) => {\n ee(a.$nodeToRelocate$, t[\"s-sn\"]) && (i = b.find((c) => c.$nodeToRelocate$ === t), i && !a.$slotRefNode$ && (a.$slotRefNode$ = i.$slotRefNode$));\n });\n } else b.some((i) => i.$nodeToRelocate$ === t) || b.push({\n $nodeToRelocate$: t\n });\n }\n o.nodeType === 1 && ue(o);\n }\n}, ee = (e, t) => e.nodeType === 1 ? e.getAttribute(\"slot\") === null && t === \"\" || e.getAttribute(\"slot\") === t : e[\"s-sn\"] === t ? !0 : t === \"\", $e = (e) => {\n e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map($e);\n}, T = (e, t, s) => {\n const r = e == null ? void 0 : e.insertBefore(t, s);\n return G(t, e), r;\n}, de = (e) => {\n const t = [];\n return e && t.push(\n ...e[\"s-scs\"] || [],\n e[\"s-si\"],\n e[\"s-sc\"],\n ...de(e.parentElement)\n ), t;\n}, G = (e, t, s = !1) => {\n var r;\n if (e && t && e.nodeType === 1) {\n const o = new Set(de(t).filter(Boolean));\n if (o.size && ((r = e.classList) == null || r.add(...e[\"s-scs\"] = [...o]), e[\"s-ol\"] || s))\n for (const n of Array.from(e.childNodes))\n G(n, e, !0);\n }\n}, De = (e, t, s = !1) => {\n var r, o, n, i, a;\n const c = e.$hostElement$, d = e.$cmpMeta$, f = e.$vnode$ || W(null, null), l = Ne(t) ? t : Le(null, null, t);\n if (R = c.tagName, d.$attrsToReflect$ && (l.$attrs$ = l.$attrs$ || {}, d.$attrsToReflect$.map(\n ([$, u]) => l.$attrs$[u] = c[$]\n )), s && l.$attrs$)\n for (const $ of Object.keys(l.$attrs$))\n c.hasAttribute($) && ![\"key\", \"ref\", \"style\", \"class\"].includes($) && (l.$attrs$[$] = c[$]);\n l.$tag$ = null, l.$flags$ |= 4, e.$vnode$ = l, l.$elm$ = f.$elm$ = c.shadowRoot || c, x = c[\"s-sc\"], F = (d.$flags$ & 1) !== 0, H = c[\"s-cr\"], _ = !1, A(f, l, s);\n {\n if (j.$flags$ |= 1, I) {\n ue(l.$elm$);\n for (const $ of b) {\n const u = $.$nodeToRelocate$;\n if (!u[\"s-ol\"]) {\n const p = M.createTextNode(\"\");\n p[\"s-nr\"] = u, T(u.parentNode, u[\"s-ol\"] = p, u);\n }\n }\n for (const $ of b) {\n const u = $.$nodeToRelocate$, p = $.$slotRefNode$;\n if (p) {\n const m = p.parentNode;\n let y = p.nextSibling;\n {\n let O = (r = u[\"s-ol\"]) == null ? void 0 : r.previousSibling;\n for (; O; ) {\n let v = (o = O[\"s-nr\"]) != null ? o : null;\n if (v && v[\"s-sn\"] === u[\"s-sn\"] && m === v.parentNode) {\n for (v = v.nextSibling; v === u || v != null && v[\"s-sr\"]; )\n v = v == null ? void 0 : v.nextSibling;\n if (!v || !v[\"s-nr\"]) {\n y = v;\n break;\n }\n }\n O = O.previousSibling;\n }\n }\n (!y && m !== u.parentNode || u.nextSibling !== y) && u !== y && (!u[\"s-hn\"] && u[\"s-ol\"] && (u[\"s-hn\"] = u[\"s-ol\"].parentNode.nodeName), T(m, u, y), u.nodeType === 1 && (u.hidden = (n = u[\"s-ih\"]) != null ? n : !1)), u && typeof p[\"s-rf\"] == \"function\" && p[\"s-rf\"](u);\n } else\n u.nodeType === 1 && (s && (u[\"s-ih\"] = (i = u.hidden) != null ? i : !1), u.hidden = !0);\n }\n }\n _ && fe(l.$elm$), j.$flags$ &= -2, b.length = 0;\n }\n if (E.experimentalScopedSlotChanges && d.$flags$ & 2)\n for (const $ of l.$elm$.childNodes)\n $[\"s-hn\"] !== R && !$[\"s-sh\"] && (s && $[\"s-ih\"] == null && ($[\"s-ih\"] = (a = $.hidden) != null ? a : !1), $.hidden = !0);\n H = void 0;\n};\nconst Ce = (e, t, s) => {\n [null, void 0, \"\", !1].includes(s) || [\"innerHTML\", \"style\"].includes(t) || e.setAttribute(t, [\"object\", \"function\"].includes(typeof s) ? \"/!\\\\ Object props are not rendered in the code example\" : s);\n}, pe = (e, t, s, r, o) => {\n if (t && typeof t == \"string\") {\n const n = document.createElement(t);\n Object.keys(s || {}).forEach((i) => {\n Ce(n, i, s[i]);\n }), r == null || r.forEach((i) => {\n pe(n, i.$tag$, i.$attrs$, i.$children$, i.$text$);\n }), s != null && s.innerHTML && (n.innerHTML = s.innerHTML), e.appendChild(n);\n }\n o && (e.innerHTML = o);\n}, st = (e, t) => {\n const s = {};\n if (typeof e != \"object\")\n throw new Error(\"filterArgs - args isn't an object.\");\n for (const r in e)\n if (!r.startsWith(\"slot\")) {\n const o = e[r], n = r.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n (!t || !Object.keys(t).includes(r) || t[r] !== o) && (s[n] = o);\n }\n return s;\n}, rt = (e, t) => {\n var r, o;\n const s = document.getElementById(\"storybook-root\");\n if (s !== null)\n return (o = document.querySelector(\"[lang]\")) == null || o.setAttribute(\"lang\", ((r = t.globals) == null ? void 0 : r.locale) || \"en\"), De(\n {\n $ancestorComponent$: void 0,\n $flags$: 0,\n $modeName$: void 0,\n $cmpMeta$: {\n $flags$: 0,\n $tagName$: s.tagName\n },\n $hostElement$: s\n },\n e(t)\n ), s.children[s.children.length - 1];\n}, ot = ({ $tag$: e, $attrs$: t, $children$: s, $text$: r }) => {\n const o = document.createElement(\"div\");\n return pe(o, e, t, s, r), o.innerHTML;\n}, C = (e, t) => {\n if (!t)\n return;\n const s = t.split(\"/\");\n return `${e}${s.slice(2, s.length - 1).join(\"-\")}--docs`;\n};\nvar S, w;\nclass nt {\n constructor(t) {\n /**\n * JsonDocs\n */\n g(this, \"jsonDoc\");\n /**\n * Get component data from the jsonDoc\n * @param tagName - tag name we want to get the data from\n * @returns component data\n */\n P(this, S, (t) => this.jsonDoc.components.find((s) => s.tag === t));\n /**\n * Get the control for the given prop\n * Based on https://storybook.js.org/docs/api/arg-types#controltype\n * @param prop - prop to get control for\n * @returns control type and options if applicable\n */\n P(this, w, (t) => {\n const s = t.type.replace(/\"([^\"]+)\"/g, \"$1\").replace(/\\s/g, \"\").replace(/\\(.*?\\)/g, (r) => r.replace(/\\|/g, \" OR \")).split(\"|\").map((r) => r.trim().replace(/ OR /g, \"|\"));\n return t.type === \"string\" ? { control: { type: \"text\" } } : t.type === \"number\" ? { control: { type: \"number\" } } : t.type === \"boolean\" ? { control: { type: \"boolean\" } } : t.type.startsWith(\"{\") && t.type.endsWith(\"}\") ? { control: { type: \"object\" } } : s.length > 1 ? s.includes(\"string\") ? { control: { type: \"text\" } } : s.every((r) => r == null ? void 0 : r.includes(\"[]\")) ? { control: { type: \"object\" } } : (s.unshift(void 0), { control: { type: \"select\" }, options: s }) : { control: { type: \"object\" } };\n });\n /**\n * Extract component arg types from the component data\n * @param tagName - tag name we want to extract the arg types from\n * @returns component arg types\n */\n g(this, \"extractArgTypes\", (t) => {\n const s = k(this, S).call(this, t), r = s == null ? void 0 : s.props.reduce((f, l) => {\n const { control: $, options: u } = k(this, w).call(this, l);\n return {\n ...f,\n [l.name]: {\n name: l.attr || l.name,\n description: l.docs,\n type: { required: l.required },\n table: {\n category: \"props\",\n type: { summary: l.type },\n defaultValue: { summary: l.default }\n },\n control: $,\n options: u\n }\n };\n }, {}), o = s == null ? void 0 : s.events.reduce(\n (f, l) => ({\n ...f,\n [l.event]: {\n name: l.event,\n description: l.docs,\n table: {\n category: \"events\",\n type: { summary: l.detail }\n }\n }\n }),\n {}\n ), n = s == null ? void 0 : s.methods.reduce(\n (f, l) => ({\n ...f,\n [l.name]: {\n name: l.name,\n description: l.docs,\n table: {\n category: \"methods\",\n type: { summary: l.signature }\n }\n }\n }),\n {}\n ), i = s == null ? void 0 : s.slots.reduce(\n (f, l) => ({\n ...f,\n [l.name]: {\n name: l.name !== \"\" ? l.name : \"default\",\n // default slot are unnamed\n description: l.docs,\n table: {\n category: \"slots\",\n type: { summary: void 0 }\n }\n }\n }),\n {}\n ), a = s == null ? void 0 : s.styles.reduce(\n (f, l) => ({\n ...f,\n [l.name]: {\n name: l.name,\n description: l.docs,\n table: {\n category: \"custom properties\",\n type: { summary: void 0 }\n }\n }\n }),\n {}\n ), c = s == null ? void 0 : s.dependencies.reduce((f, l) => {\n const $ = k(this, S).call(this, l);\n return {\n ...f,\n [l]: {\n name: l,\n description: `<a href=\"./?path=/docs/${C(\"\", $ == null ? void 0 : $.filePath)}\">View Component Documentation</a>`,\n table: {\n category: \"depends on\",\n type: { summary: void 0 }\n }\n }\n };\n }, {}), d = s == null ? void 0 : s.dependents.reduce((f, l) => {\n const $ = k(this, S).call(this, l);\n return {\n ...f,\n [l]: {\n name: l,\n description: `<a href=\"./?path=/docs/${C(\"\", $ == null ? void 0 : $.filePath)}\">View Component Documentation</a>`,\n table: {\n category: \"used by\",\n type: { summary: void 0 }\n }\n }\n };\n }, {});\n return {\n ...r,\n ...o,\n ...n,\n ...i,\n ...a,\n ...c,\n ...d\n };\n });\n /**\n * Extract component description from the component data\n * @param tagName - tag name we want to extract the description from\n * @returns component description\n */\n g(this, \"extractComponentDescription\", (t) => {\n const s = k(this, S).call(this, t);\n return (s == null ? void 0 : s.readme) || (s == null ? void 0 : s.docs);\n });\n this.jsonDoc = t;\n }\n}\nS = new WeakMap(), w = new WeakMap();\nconst we = (e, t) => {\n if (t)\n return `${e}${t}`;\n}, ge = (e) => {\n let t = e.overview ? `${e.overview}\n\n` : \"\";\n const s = e.props.filter(({ attr: o }) => o !== void 0);\n s.length && (t += `Attributes:\n`, t += s.map(({ attr: o, docs: n }) => `- \\`${o}\\`: ${n}\n`).join(\"\"), t += `\n`);\n const r = e.props.filter(({ attr: o }) => o === void 0);\n return r.length && (t += `Properties:\n`, t += r.map(({ name: o, docs: n }) => `- \\`${o}\\`: ${n}\n`).join(\"\"), t += `\n`), e.methods.length && (t += `Methods:\n`, t += e.methods.map(({ name: o, docs: n }) => `- \\`${o}\\`: ${n}\n`).join(\"\"), t += `\n`), e.events.length && (t += `Events:\n`, t += e.events.map(({ event: o, docs: n }) => `- \\`${o}\\`: ${n}\n`).join(\"\"), t += `\n`), e.listeners.length && (t += `Listeners:\n`, t += e.listeners.map(({ event: o }) => `- \\`${o}\\`\n`).join(\"\"), t += `\n`), e.slots.length && (t += `Slots:\n`, t += e.slots.map(({ name: o, docs: n }) => `- \\`${o}\\`: ${n}\n`).join(\"\"), t += `\n`), t;\n}, z = (e) => `${e.docs}\n\nType: \\`${e.type}\\``, it = (e, t, s, r) => ({\n $schema: \"https://json.schemastore.org/web-types\",\n name: e,\n version: t,\n \"description-markup\": \"markdown\",\n contributions: {\n html: {\n elements: s.components.map((o) => {\n const n = C(r, o.filePath);\n return {\n name: o.tag,\n description: ge(o),\n \"doc-url\": n,\n attributes: o.props.filter((i) => i.attr).map((i) => ({\n name: i.attr,\n description: z(i),\n \"doc-url\": n,\n value: {\n type: i.type,\n default: i.default,\n required: i.required\n }\n })),\n js: {\n properties: o.props.map((i) => ({\n name: i.name,\n description: z(i),\n \"doc-url\": n,\n value: {\n type: i.type,\n default: i.default,\n required: i.required\n }\n })),\n events: o.events.map((i) => ({\n name: i.event,\n description: i.docs\n }))\n },\n css: {\n properties: o.styles.map((i) => ({\n name: i.name,\n description: i.docs\n }))\n }\n };\n })\n }\n }\n}), Pe = (e, t, s) => [\n { name: \"Storybook\", url: C(e, s) },\n { name: \"Sources\", url: we(t, s) }\n], Ue = (e) => {\n if (!e.values.some(({ value: t }) => t === void 0))\n return e.values.map(({ value: t }) => ({ name: t }));\n}, lt = (e, t, s) => ({\n version: 1.1,\n tags: e.components.map((r) => {\n const o = Pe(t, s, r.filePath);\n return {\n name: r.tag,\n description: ge(r),\n attributes: r.props.map((n) => ({\n name: n.attr || n.name,\n description: z(n),\n values: Ue(n),\n references: o\n })),\n references: o\n };\n }),\n globalAttributes: [],\n valueSets: []\n}), at = (e) => ({\n version: 1.1,\n properties: e.components.flatMap(\n (t) => t.styles.map((s) => ({\n name: s.name,\n description: s.docs\n }))\n )\n}), ct = (e) => {\n const t = { value: \"2023\", pattern: \"yyyy\" }, s = { value: \"12\", pattern: \"mm\" }, r = { value: \"24\", pattern: \"dd\" };\n return ze([t.value, s.value, r.value].join(\"-\"), e, { timeZone: \"UTC\" }).replace(t.value, t.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);\n}, ft = (e) => e.toISOString().split(\"T\")[0], We = (e, t, s) => {\n const r = e.closest(\"[lang]\"), o = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), n = o.length > 0 && typeof o[0] == \"string\" ? o[0] : navigator.language || s, i = n.split(\"-\").shift();\n return Object.keys(t).length === 0 ? {\n locale: n,\n messages: { lang: s }\n } : {\n locale: n,\n messages: t[i] || t[s] || { lang: s }\n };\n}, ut = (e, t, s) => new Intl.NumberFormat(t, { style: \"currency\", currency: s }).format(e), $t = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), dt = (e, t, s = 0) => new Intl.NumberFormat(t, {\n style: \"percent\",\n minimumFractionDigits: s,\n maximumFractionDigits: s\n}).format(e), pt = (e, t, s, r = \"short\", o = 0) => new Intl.NumberFormat(t, {\n style: \"unit\",\n unit: s,\n unitDisplay: r,\n minimumFractionDigits: o,\n maximumFractionDigits: o\n}).format(e), He = /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$/, ze = (e, t, s) => typeof e != \"string\" || e === \"\" || !He.test(e) ? \"\" : new Intl.DateTimeFormat(t, s).format(new Date(e)), gt = (e, t) => (s) => We(s, e, t), vt = ({ disconnect: e, observe: t, takeRecords: s }) => {\n class r {\n constructor(n) {\n /**\n *\n */\n g(this, \"disconnect\", e);\n /**\n *\n */\n g(this, \"observe\", t);\n /**\n *\n */\n g(this, \"takeRecords\", s);\n /**\n *\n */\n g(this, \"cb\");\n this.cb = n;\n }\n }\n return [window, global].forEach((o) => {\n Object.defineProperty(o, \"MutationObserver\", {\n writable: !0,\n configurable: !0,\n value: r\n });\n }), r;\n}, ht = ({ disconnect: e, observe: t }) => {\n class s {\n constructor(o) {\n /**\n *\n */\n g(this, \"disconnect\", e);\n /**\n *\n */\n g(this, \"observe\", t);\n /**\n *\n */\n g(this, \"unobserve\");\n /**\n *\n */\n g(this, \"cb\");\n this.cb = o;\n }\n }\n return [window, global].forEach((r) => {\n Object.defineProperty(r, \"ResizeObserver\", {\n writable: !0,\n configurable: !0,\n value: s\n });\n }), s;\n};\nclass Be extends Event {\n constructor() {\n super(...arguments);\n /**\n *\n */\n g(this, \"detail\");\n }\n // eslint-disable-line @typescript-eslint/no-explicit-any\n}\nconst yt = () => {\n class e extends Be {\n }\n return [window, global].forEach((t) => {\n Object.defineProperty(t, \"SubmitEvent\", {\n writable: !0,\n configurable: !0,\n value: e\n });\n }), e;\n};\nexport {\n Xe as ClassList,\n nt as StorybookPreview,\n Je as allItemsAreString,\n et as cleanString,\n qe as createID,\n He as dateRegExp,\n ft as dateToString,\n gt as defineLocales,\n st as filterArgs,\n Qe as focusableElements,\n ct as getLocaleDatePattern,\n te as getParentWindows,\n ot as getStoryHTML,\n C as getStorybookUrl,\n Ze as getWindows,\n Ke as isTagName,\n Ve as isValidNumber,\n me as isValidString,\n Ge as isValideID,\n ut as localeCurrency,\n ze as localeDate,\n $t as localeNumber,\n dt as localePercent,\n pt as localeUnit,\n tt as nextTick,\n vt as setupMutationObserverMock,\n ht as setupResizeObserverMock,\n yt as setupSubmitEventMock,\n rt as stencilWrapper,\n Ye as toString,\n at as vsCodeCssGenerator,\n lt as vsCodeGenerator,\n it as webTypesGenerator\n};\n//# sourceMappingURL=index.es.js.map\n"],"mappings":"AAAA,IAAIA,EAAKC,OAAOC,eAIhB,IAAIC,EAAK,CAACC,EAAGC,EAAGC,IAAMD,KAAKD,EAAIJ,EAAGI,EAAGC,EAAG,CAAEE,YAAa,EAAGC,cAAe,EAAGC,UAAW,EAAGC,MAAOJ,IAAOF,EAAEC,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