@adyen/bento-vue2 1.89.2 → 1.91.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 (296) hide show
  1. package/dist/@types/components.d.ts +4 -0
  2. package/dist/@types/index.d.ts +381 -118
  3. package/dist/accordion.js +1 -1
  4. package/dist/action-bar.js +1 -1
  5. package/dist/ai-tag.js +1 -1
  6. package/dist/alert.js +1 -1
  7. package/dist/anchor-scroller.js +1 -1
  8. package/dist/assets/accordion-item.css +1 -1
  9. package/dist/assets/action-bar.css +1 -1
  10. package/dist/assets/base-modal.css +1 -1
  11. package/dist/assets/button-actions.css +1 -1
  12. package/dist/assets/card.css +1 -1
  13. package/dist/assets/data-grid.css +1 -1
  14. package/dist/assets/date-picker.css +1 -1
  15. package/dist/assets/date-range-picker.css +1 -1
  16. package/dist/assets/dialog-page.css +1 -1
  17. package/dist/assets/draggable-handle.css +1 -1
  18. package/dist/assets/dropdown.css +1 -1
  19. package/dist/assets/error-message.css +1 -1
  20. package/dist/assets/field-label.css +1 -0
  21. package/dist/assets/file-uploader.css +1 -1
  22. package/dist/assets/filter-bar.css +1 -1
  23. package/dist/assets/form-layout-title.css +1 -1
  24. package/dist/assets/input-field.css +1 -1
  25. package/dist/assets/input-time.css +1 -0
  26. package/dist/assets/inspector.css +1 -1
  27. package/dist/assets/modal-fullscreen.css +1 -1
  28. package/dist/assets/secondary-nav.css +1 -1
  29. package/dist/assets/sidepanel.css +1 -1
  30. package/dist/assets/use-cached-selected-values.css +1 -1
  31. package/dist/button.js +3 -3
  32. package/dist/card.js +1 -1
  33. package/dist/checkbox.js +2 -2
  34. package/dist/chip.js +1 -1
  35. package/dist/chunks/accordion-item.D0WVCLec.js +145 -0
  36. package/dist/chunks/{accordion-item.BZDSJamR.js.map → accordion-item.D0WVCLec.js.map} +1 -1
  37. package/dist/chunks/action-bar.Dj830k6L.js +334 -0
  38. package/dist/chunks/{action-bar.CYGUYI0V.js.map → action-bar.Dj830k6L.js.map} +1 -1
  39. package/dist/chunks/{ai-button.CR_ePQRR.js → ai-button.7L9bANlk.js} +2 -2
  40. package/dist/chunks/{ai-button.CR_ePQRR.js.map → ai-button.7L9bANlk.js.map} +1 -1
  41. package/dist/chunks/ai-tag.AyG2UWCB.js +110 -0
  42. package/dist/chunks/{ai-tag.Cjf38mjR.js.map → ai-tag.AyG2UWCB.js.map} +1 -1
  43. package/dist/chunks/alert.CXRb-Smf.js +160 -0
  44. package/dist/chunks/{alert.QVQ6Zjbm.js.map → alert.CXRb-Smf.js.map} +1 -1
  45. package/dist/chunks/{anchor-scroller.CjJ26PJS.js → anchor-scroller.DWaykZQj.js} +66 -39
  46. package/dist/chunks/{anchor-scroller.CjJ26PJS.js.map → anchor-scroller.DWaykZQj.js.map} +1 -1
  47. package/dist/chunks/{base-modal.DmWkavtf.js → base-modal.C52VMtnd.js} +104 -67
  48. package/dist/chunks/{base-modal.DmWkavtf.js.map → base-modal.C52VMtnd.js.map} +1 -1
  49. package/dist/chunks/{button-actions-with-menu.Bi_HXopk.js → button-actions-with-menu.OsPQ-POD.js} +2 -2
  50. package/dist/chunks/{button-actions-with-menu.Bi_HXopk.js.map → button-actions-with-menu.OsPQ-POD.js.map} +1 -1
  51. package/dist/chunks/{button-actions.BLk114As.js → button-actions.Bdbu0bvt.js} +222 -148
  52. package/dist/chunks/{button-actions.BLk114As.js.map → button-actions.Bdbu0bvt.js.map} +1 -1
  53. package/dist/chunks/{button.DxhJNOtr.js → button.C9b2AC9w.js} +2 -2
  54. package/dist/chunks/{button.DxhJNOtr.js.map → button.C9b2AC9w.js.map} +1 -1
  55. package/dist/chunks/{calendar.CXKhBF2f.js → calendar.CqsfThnC.js} +438 -346
  56. package/dist/chunks/calendar.CqsfThnC.js.map +1 -0
  57. package/dist/chunks/card.8z7UQeVK.js +165 -0
  58. package/dist/chunks/{card.GjhsXOT0.js.map → card.8z7UQeVK.js.map} +1 -1
  59. package/dist/chunks/{checkbox-group.B2BjU3ZN.js → checkbox-group.Dur2Edtw.js} +4 -4
  60. package/dist/chunks/{checkbox-group.B2BjU3ZN.js.map → checkbox-group.Dur2Edtw.js.map} +1 -1
  61. package/dist/chunks/{checkbox.CIv8WgGp.js → checkbox.vNjt6QDJ.js} +93 -56
  62. package/dist/chunks/{checkbox.CIv8WgGp.js.map → checkbox.vNjt6QDJ.js.map} +1 -1
  63. package/dist/chunks/chip.BFY_-VCz.js +84 -0
  64. package/dist/chunks/{chip.DTpENaGC.js.map → chip.BFY_-VCz.js.map} +1 -1
  65. package/dist/chunks/{click-outside.CDz_x8mN.js → click-outside.BG01Sm0A.js} +2 -2
  66. package/dist/chunks/{click-outside.CDz_x8mN.js.map → click-outside.BG01Sm0A.js.map} +1 -1
  67. package/dist/chunks/{code-snippet.YIm2oO_o.js → code-snippet.BVpFBhKq.js} +133 -76
  68. package/dist/chunks/{code-snippet.YIm2oO_o.js.map → code-snippet.BVpFBhKq.js.map} +1 -1
  69. package/dist/chunks/{controls-group.CqotnNEF.js → controls-group.DSm2Ujwt.js} +2 -2
  70. package/dist/chunks/{controls-group.CqotnNEF.js.map → controls-group.DSm2Ujwt.js.map} +1 -1
  71. package/dist/chunks/copy.qqGYFbKJ.js +133 -0
  72. package/dist/chunks/{copy.BVGQcf22.js.map → copy.qqGYFbKJ.js.map} +1 -1
  73. package/dist/chunks/{country.D20NCLLG.js → country.BEwW8TQo.js} +3 -3
  74. package/dist/chunks/{country.D20NCLLG.js.map → country.BEwW8TQo.js.map} +1 -1
  75. package/dist/chunks/country.types.jjXwaoMl.js +2537 -0
  76. package/dist/chunks/country.types.jjXwaoMl.js.map +1 -0
  77. package/dist/chunks/{dashboard-section.BubZyu8i.js → dashboard-section.DNxNVV44.js} +3 -3
  78. package/dist/chunks/{dashboard-section.BubZyu8i.js.map → dashboard-section.DNxNVV44.js.map} +1 -1
  79. package/dist/chunks/{dashed-underline.pjYTS0m1.js → dashed-underline.DL2_sik5.js} +3 -3
  80. package/dist/chunks/{dashed-underline.pjYTS0m1.js.map → dashed-underline.DL2_sik5.js.map} +1 -1
  81. package/dist/chunks/{data-grid-template.D8RhngPj.js → data-grid-template.BFv1zr6g.js} +4 -4
  82. package/dist/chunks/{data-grid-template.D8RhngPj.js.map → data-grid-template.BFv1zr6g.js.map} +1 -1
  83. package/dist/chunks/data-grid.ZHY5EzP3.js +4071 -0
  84. package/dist/chunks/data-grid.ZHY5EzP3.js.map +1 -0
  85. package/dist/chunks/date-picker.kl6aFlr1.js +237 -0
  86. package/dist/chunks/date-picker.kl6aFlr1.js.map +1 -0
  87. package/dist/chunks/date-range-picker.LCWVAa5R.js +1089 -0
  88. package/dist/chunks/date-range-picker.LCWVAa5R.js.map +1 -0
  89. package/dist/chunks/dialog-page.EdejG53a.js +143 -0
  90. package/dist/chunks/{dialog-page.oyG153fC.js.map → dialog-page.EdejG53a.js.map} +1 -1
  91. package/dist/chunks/{directive.rXUeDb8p.js → directive.Bfr4fuOy.js} +2 -2
  92. package/dist/chunks/{directive.rXUeDb8p.js.map → directive.Bfr4fuOy.js.map} +1 -1
  93. package/dist/chunks/draggable-handle.Ba28eM8o.js +245 -0
  94. package/dist/chunks/draggable-handle.Ba28eM8o.js.map +1 -0
  95. package/dist/chunks/{dropdown-tag.BRB-emd1.js → dropdown-tag.B61hPq5n.js} +5 -5
  96. package/dist/chunks/{dropdown-tag.BRB-emd1.js.map → dropdown-tag.B61hPq5n.js.map} +1 -1
  97. package/dist/chunks/dropdown.Ca-f8tdX.js +1140 -0
  98. package/dist/chunks/dropdown.Ca-f8tdX.js.map +1 -0
  99. package/dist/chunks/{empty-state.D_Ac-XXH.js → empty-state.DMV23IZy.js} +2 -2
  100. package/dist/chunks/{empty-state.D_Ac-XXH.js.map → empty-state.DMV23IZy.js.map} +1 -1
  101. package/dist/chunks/error-message.CyERcfdt.js +72 -0
  102. package/dist/chunks/error-message.CyERcfdt.js.map +1 -0
  103. package/dist/chunks/field-label.DjjjkcO6.js +97 -0
  104. package/dist/chunks/field-label.DjjjkcO6.js.map +1 -0
  105. package/dist/chunks/{file-uploader.D5Rjsx4k.js → file-uploader.DeWmLpfp.js} +751 -469
  106. package/dist/chunks/{file-uploader.D5Rjsx4k.js.map → file-uploader.DeWmLpfp.js.map} +1 -1
  107. package/dist/chunks/{filter-bar.zD_ctViU.js → filter-bar.Bd4ghW_B.js} +1596 -1039
  108. package/dist/chunks/filter-bar.Bd4ghW_B.js.map +1 -0
  109. package/dist/chunks/fixed-scroller.DR2E_No4.js +148 -0
  110. package/dist/chunks/{fixed-scroller.MerESbd_.js.map → fixed-scroller.DR2E_No4.js.map} +1 -1
  111. package/dist/chunks/{footer-actions.CiPj7hZG.js → footer-actions.CvUaoMzj.js} +3 -3
  112. package/dist/chunks/{footer-actions.CiPj7hZG.js.map → footer-actions.CvUaoMzj.js.map} +1 -1
  113. package/dist/chunks/form-layout-title.DzGajv4U.js +248 -0
  114. package/dist/chunks/form-layout-title.DzGajv4U.js.map +1 -0
  115. package/dist/chunks/{header-meta.Dq6TlNPw.js → header-meta.AXUGoqDd.js} +127 -73
  116. package/dist/chunks/{header-meta.Dq6TlNPw.js.map → header-meta.AXUGoqDd.js.map} +1 -1
  117. package/dist/chunks/{header-with-views.DaEhkSS8.js → header-with-views.Ba4dswJF.js} +1121 -680
  118. package/dist/chunks/{header-with-views.DaEhkSS8.js.map → header-with-views.Ba4dswJF.js.map} +1 -1
  119. package/dist/chunks/{header.DkC-KKWa.js → header.C7B7RBib.js} +3 -3
  120. package/dist/chunks/{header.DkC-KKWa.js.map → header.C7B7RBib.js.map} +1 -1
  121. package/dist/chunks/{info-icon.BF8KxU-k.js → info-icon.DCR42Kvm.js} +2 -2
  122. package/dist/chunks/{info-icon.BF8KxU-k.js.map → info-icon.DCR42Kvm.js.map} +1 -1
  123. package/dist/chunks/input-field-password.BNAtIn_D.js +381 -0
  124. package/dist/chunks/{input-field-password.BKT1mYUw.js.map → input-field-password.BNAtIn_D.js.map} +1 -1
  125. package/dist/chunks/{input-field-phone-number.BjRKjQOQ.js → input-field-phone-number.CEYx1s4b.js} +98 -71
  126. package/dist/chunks/{input-field-phone-number.BjRKjQOQ.js.map → input-field-phone-number.CEYx1s4b.js.map} +1 -1
  127. package/dist/chunks/input-field.Dh5W0Az-.js +211 -0
  128. package/dist/chunks/input-field.Dh5W0Az-.js.map +1 -0
  129. package/dist/chunks/input-time.BLuMfakv.js +135 -0
  130. package/dist/chunks/input-time.BLuMfakv.js.map +1 -0
  131. package/dist/chunks/inspector.BzBPlz-5.js +172 -0
  132. package/dist/chunks/{inspector.Bnm0hl_D.js.map → inspector.BzBPlz-5.js.map} +1 -1
  133. package/dist/chunks/{link.MhoM3zQj.js → link.DB5g6d48.js} +56 -29
  134. package/dist/chunks/{link.MhoM3zQj.js.map → link.DB5g6d48.js.map} +1 -1
  135. package/dist/chunks/{list-item.BnzU1LIu.js → list-item.DqTHh8-Z.js} +2 -2
  136. package/dist/chunks/{list-item.BnzU1LIu.js.map → list-item.DqTHh8-Z.js.map} +1 -1
  137. package/dist/chunks/{listbox-option-tag.BhPVuAjJ.js → listbox-option-tag.CvbE-EuG.js} +2 -2
  138. package/dist/chunks/{listbox-option-tag.BhPVuAjJ.js.map → listbox-option-tag.CvbE-EuG.js.map} +1 -1
  139. package/dist/chunks/{modal-fullscreen.CXOq6_Cv.js → modal-fullscreen.DTvg2NLk.js} +63 -36
  140. package/dist/chunks/{modal-fullscreen.CXOq6_Cv.js.map → modal-fullscreen.DTvg2NLk.js.map} +1 -1
  141. package/dist/chunks/{modal.o0KddMiG.js → modal.D_TcWTkf.js} +63 -36
  142. package/dist/chunks/{modal.o0KddMiG.js.map → modal.D_TcWTkf.js.map} +1 -1
  143. package/dist/chunks/on-click-outside.Cy1eFULD.js +109 -0
  144. package/dist/chunks/on-click-outside.Cy1eFULD.js.map +1 -0
  145. package/dist/chunks/{pagination.ZISqB4M_.js → pagination.D6BxMw5L.js} +221 -99
  146. package/dist/chunks/{pagination.ZISqB4M_.js.map → pagination.D6BxMw5L.js.map} +1 -1
  147. package/dist/chunks/promo-banner.Dc_kK1x9.js +91 -0
  148. package/dist/chunks/{promo-banner.Db2kh2qK.js.map → promo-banner.Dc_kK1x9.js.map} +1 -1
  149. package/dist/chunks/{radio-group.DnMy7brs.js → radio-group.Bb-L-0io.js} +4 -4
  150. package/dist/chunks/{radio-group.DnMy7brs.js.map → radio-group.Bb-L-0io.js.map} +1 -1
  151. package/dist/chunks/{rich-text-editor.Cbv1DxXn.js → rich-text-editor.Dtdfh-0V.js} +1782 -1731
  152. package/dist/chunks/{rich-text-editor.Cbv1DxXn.js.map → rich-text-editor.Dtdfh-0V.js.map} +1 -1
  153. package/dist/chunks/search-bar.MVJS9-Mh.js +126 -0
  154. package/dist/chunks/{search-bar.DPjYDhja.js.map → search-bar.MVJS9-Mh.js.map} +1 -1
  155. package/dist/chunks/secondary-nav.C-nPZR-2.js +226 -0
  156. package/dist/chunks/secondary-nav.C-nPZR-2.js.map +1 -0
  157. package/dist/chunks/{segmented-control.BqIiX9hv.js → segmented-control.DDtjX-V5.js} +2 -2
  158. package/dist/chunks/{segmented-control.BqIiX9hv.js.map → segmented-control.DDtjX-V5.js.map} +1 -1
  159. package/dist/chunks/{selection-card-group.IPiouuot.js → selection-card-group.CLJPaknG.js} +3 -3
  160. package/dist/chunks/{selection-card-group.IPiouuot.js.map → selection-card-group.CLJPaknG.js.map} +1 -1
  161. package/dist/chunks/{sidepanel.BGMjjB3F.js → sidepanel.BTRfwGiS.js} +66 -39
  162. package/dist/chunks/{sidepanel.BGMjjB3F.js.map → sidepanel.BTRfwGiS.js.map} +1 -1
  163. package/dist/chunks/{step.QFER3tSj.js → step.TDm_ts1S.js} +92 -63
  164. package/dist/chunks/{step.QFER3tSj.js.map → step.TDm_ts1S.js.map} +1 -1
  165. package/dist/chunks/{structured-list-item.BDJKRC_8.js → structured-list-item.BBBtie1s.js} +58 -31
  166. package/dist/chunks/{structured-list-item.BDJKRC_8.js.map → structured-list-item.BBBtie1s.js.map} +1 -1
  167. package/dist/chunks/{summary-grid.types.CIkArZf5.js → summary-grid.types.DUIqCmwg.js} +5 -5
  168. package/dist/chunks/{summary-grid.types.CIkArZf5.js.map → summary-grid.types.DUIqCmwg.js.map} +1 -1
  169. package/dist/chunks/{tab.CaXF0dho.js → tab.CNIZyfZt.js} +2 -2
  170. package/dist/chunks/{tab.CaXF0dho.js.map → tab.CNIZyfZt.js.map} +1 -1
  171. package/dist/chunks/{tag.CocLKztJ.js → tag.D2xagTJv.js} +2 -2
  172. package/dist/chunks/{tag.CocLKztJ.js.map → tag.D2xagTJv.js.map} +1 -1
  173. package/dist/chunks/textarea.CJS-1I41.js +219 -0
  174. package/dist/chunks/{textarea.D4X6Ss9q.js.map → textarea.CJS-1I41.js.map} +1 -1
  175. package/dist/chunks/timeline-item.BOUWkLi1.js +322 -0
  176. package/dist/chunks/{timeline-item.C8BxWdy1.js.map → timeline-item.BOUWkLi1.js.map} +1 -1
  177. package/dist/chunks/{toast.BRI3G7TL.js → toast.d8vg71CB.js} +81 -54
  178. package/dist/chunks/{toast.BRI3G7TL.js.map → toast.d8vg71CB.js.map} +1 -1
  179. package/dist/chunks/{tooltip.CbsNGnhw.js → tooltip.BxtnF3is.js} +38 -36
  180. package/dist/chunks/tooltip.BxtnF3is.js.map +1 -0
  181. package/dist/chunks/{tutorial.BzV6bHQJ.js → tutorial.CZt_mcuT.js} +190 -103
  182. package/dist/chunks/{tutorial.BzV6bHQJ.js.map → tutorial.CZt_mcuT.js.map} +1 -1
  183. package/dist/chunks/{use-cached-selected-values.DqX2qsMC.js → use-cached-selected-values.BJbWbkEQ.js} +553 -417
  184. package/dist/chunks/use-cached-selected-values.BJbWbkEQ.js.map +1 -0
  185. package/dist/chunks/{use-country-items.CI8C7MLU.js → use-country-items.B4j8pAvW.js} +3 -3
  186. package/dist/chunks/{use-country-items.CI8C7MLU.js.map → use-country-items.B4j8pAvW.js.map} +1 -1
  187. package/dist/chunks/use-country-phon-code.ByqnuIni.js +6386 -0
  188. package/dist/chunks/use-country-phon-code.ByqnuIni.js.map +1 -0
  189. package/dist/chunks/{use-date-input-formatter.BYaTO3vz.js → use-date-input-formatter.Djf8AoLr.js} +2 -2
  190. package/dist/chunks/{use-date-input-formatter.BYaTO3vz.js.map → use-date-input-formatter.Djf8AoLr.js.map} +1 -1
  191. package/dist/chunks/use-touch-device.DTqFAbXh.js +11 -0
  192. package/dist/chunks/use-touch-device.DTqFAbXh.js.map +1 -0
  193. package/dist/click-outside.js +1 -1
  194. package/dist/code-snippet.js +1 -1
  195. package/dist/country.js +3 -3
  196. package/dist/dashboard-template.js +1 -1
  197. package/dist/dashed-underline.js +1 -1
  198. package/dist/data-grid-template.js +1 -1
  199. package/dist/data-grid.js +1 -1
  200. package/dist/date-picker.js +2 -2
  201. package/dist/date-range-picker.js +2 -2
  202. package/dist/draggable.js +1396 -0
  203. package/dist/draggable.js.map +1 -0
  204. package/dist/dropdown.js +11 -12
  205. package/dist/dropdown.js.map +1 -1
  206. package/dist/empty-state.js +1 -1
  207. package/dist/file-uploader.js +1 -1
  208. package/dist/filter-bar.js +1 -1
  209. package/dist/form-layout.js +1 -1
  210. package/dist/header-with-views.js +1 -1
  211. package/dist/header.js +1 -1
  212. package/dist/index.js +280 -275
  213. package/dist/index.js.map +1 -1
  214. package/dist/info-icon.js +1 -1
  215. package/dist/input-field-password.js +1 -1
  216. package/dist/input-field-phone-number.js +1 -1
  217. package/dist/input-field.js +1 -1
  218. package/dist/input-time.js +5 -0
  219. package/dist/input-time.js.map +1 -0
  220. package/dist/inspector.js +1 -1
  221. package/dist/internal.js +26 -25
  222. package/dist/internal.js.map +1 -1
  223. package/dist/link.js +1 -1
  224. package/dist/list.js +1 -1
  225. package/dist/menu.js +1 -1
  226. package/dist/modal-fullscreen.js +1 -1
  227. package/dist/modal.js +2 -2
  228. package/dist/pagination.js +1 -1
  229. package/dist/popover.js +1 -1
  230. package/dist/promo-banner.js +1 -1
  231. package/dist/radio-group.js +1 -1
  232. package/dist/rich-text-editor.js +1 -1
  233. package/dist/search-bar.js +2 -2
  234. package/dist/secondary-nav.js +1 -1
  235. package/dist/segmented-control.js +1 -1
  236. package/dist/selection-card.js +1 -1
  237. package/dist/sidepanel.js +1 -1
  238. package/dist/stepper.js +1 -1
  239. package/dist/structured-list.js +1 -1
  240. package/dist/summary-grid.js +1 -1
  241. package/dist/tabs.js +1 -1
  242. package/dist/tag.js +1 -1
  243. package/dist/textarea.js +1 -1
  244. package/dist/timeline.js +1 -1
  245. package/dist/toast.js +1 -1
  246. package/dist/tutorial.js +1 -1
  247. package/dist/web-types.json +297 -4
  248. package/package.json +10 -15
  249. package/dist/assets/dropdown-default-textbox.css +0 -1
  250. package/dist/chunks/accordion-item.BZDSJamR.js +0 -108
  251. package/dist/chunks/action-bar.CYGUYI0V.js +0 -207
  252. package/dist/chunks/ai-tag.Cjf38mjR.js +0 -73
  253. package/dist/chunks/alert.QVQ6Zjbm.js +0 -93
  254. package/dist/chunks/calendar.CXKhBF2f.js.map +0 -1
  255. package/dist/chunks/card.GjhsXOT0.js +0 -128
  256. package/dist/chunks/chip.DTpENaGC.js +0 -57
  257. package/dist/chunks/copy.BVGQcf22.js +0 -86
  258. package/dist/chunks/country.types.DxKjyd0S.js +0 -20
  259. package/dist/chunks/country.types.DxKjyd0S.js.map +0 -1
  260. package/dist/chunks/data-grid.DJG8Ty0A.js +0 -3194
  261. package/dist/chunks/data-grid.DJG8Ty0A.js.map +0 -1
  262. package/dist/chunks/date-picker.CnazYcSX.js +0 -155
  263. package/dist/chunks/date-picker.CnazYcSX.js.map +0 -1
  264. package/dist/chunks/date-range-picker.Bf9pRNL7.js +0 -811
  265. package/dist/chunks/date-range-picker.Bf9pRNL7.js.map +0 -1
  266. package/dist/chunks/debounce.DUTu11PS.js +0 -10
  267. package/dist/chunks/debounce.DUTu11PS.js.map +0 -1
  268. package/dist/chunks/dialog-page.oyG153fC.js +0 -116
  269. package/dist/chunks/dropdown-default-textbox.Dvzg0StF.js +0 -337
  270. package/dist/chunks/dropdown-default-textbox.Dvzg0StF.js.map +0 -1
  271. package/dist/chunks/dropdown.Ct7uhPr6.js +0 -696
  272. package/dist/chunks/dropdown.Ct7uhPr6.js.map +0 -1
  273. package/dist/chunks/error-message.RxdStT3S.js +0 -106
  274. package/dist/chunks/error-message.RxdStT3S.js.map +0 -1
  275. package/dist/chunks/filter-bar.zD_ctViU.js.map +0 -1
  276. package/dist/chunks/fixed-scroller.MerESbd_.js +0 -111
  277. package/dist/chunks/form-layout-title.Bw7VgOO5.js +0 -210
  278. package/dist/chunks/form-layout-title.Bw7VgOO5.js.map +0 -1
  279. package/dist/chunks/input-field-password.BKT1mYUw.js +0 -234
  280. package/dist/chunks/input-field.m1PMwa4C.js +0 -170
  281. package/dist/chunks/input-field.m1PMwa4C.js.map +0 -1
  282. package/dist/chunks/inspector.Bnm0hl_D.js +0 -105
  283. package/dist/chunks/on-click-outside.BW4rkhzG.js +0 -91
  284. package/dist/chunks/on-click-outside.BW4rkhzG.js.map +0 -1
  285. package/dist/chunks/promo-banner.Db2kh2qK.js +0 -64
  286. package/dist/chunks/search-bar.DPjYDhja.js +0 -89
  287. package/dist/chunks/secondary-nav.CwJjkJkj.js +0 -112
  288. package/dist/chunks/secondary-nav.CwJjkJkj.js.map +0 -1
  289. package/dist/chunks/textarea.D4X6Ss9q.js +0 -169
  290. package/dist/chunks/timeline-item.C8BxWdy1.js +0 -238
  291. package/dist/chunks/tooltip.CbsNGnhw.js.map +0 -1
  292. package/dist/chunks/use-cached-selected-values.DqX2qsMC.js.map +0 -1
  293. package/dist/chunks/use-country-phon-code.C6orQNnM.js +0 -291
  294. package/dist/chunks/use-country-phon-code.C6orQNnM.js.map +0 -1
  295. package/dist/draggable-handle.js +0 -149
  296. package/dist/draggable-handle.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"anchor-scroller.CjJ26PJS.js","sources":["../../src/components/anchor-scroller/components/anchor-scroller-list/anchor-scroller-list.vue","../../src/components/anchor-scroller/composables/use-scroll-spy/use-scroll-spy.ts","../../src/components/anchor-scroller/anchor-scroller.vue"],"sourcesContent":["<template>\n <ul class=\"b-anchor-scroller-list\" @keydown=\"onKeydownNavigation\">\n <li v-for=\"({ title, disabled, elementRef }, index) in items\" :key=\"index\" class=\"b-anchor-scroller-list__item\">\n <bento-button\n ref=\"listItemRefs\"\n :aria-current=\"activeIndex === index ? 'location' : null\"\n class=\"b-anchor-scroller-list__item-button\"\n :class=\"{\n 'b-anchor-scroller-list__item-button--active': activeIndex === index,\n 'b-anchor-scroller-list__item-button--disabled': disabled,\n }\"\n :aria-disabled=\"disabled\"\n :tabindex=\"activeIndex === index ? null : '-1'\"\n variant=\"tertiary-with-background\"\n @click=\"scrollToSection(elementRef, disabled)\"\n @keydown.space.native.prevent=\"scrollToSection(elementRef, disabled)\"\n @keydown.enter.native.prevent=\"scrollToSection(elementRef, disabled)\"\n >\n {{ title }}\n </bento-button>\n </li>\n </ul>\n</template>\n\n<script setup lang=\"ts\">\n import BentoButton from '@/components/button/button.vue';\n import { unrefElement } from '@/directives/click-outside/utils';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import { type BentoAnchorScrollerItem } from '../../anchor-scroller.types';\n import { type AnchorScrollerListProps } from './anchor-scroller-list.types';\n import { computed, ref, watch } from 'vue';\n import { useCycleList } from '@vueuse/core';\n\n const props = defineProps({\n activeIndex: { default: undefined },\n items: null,\n scrollOffset: { default: undefined }\n});\n\n const listItemRefs = ref([]);\n const listIndices = computed(() =>\n props.items\n .map((item, index) => ({ disabled: item.disabled, originalIndex: index }))\n .filter(({ disabled }) => !disabled)\n .map(({ originalIndex }) => originalIndex)\n );\n\n const {\n state: focusedIndex,\n next,\n prev,\n } = useCycleList(listIndices, {\n initialValue: props.activeIndex ?? listIndices.value[0],\n });\n\n watch(focusedIndex, async newIndex => {\n const targetComponent = listItemRefs.value[newIndex];\n const el = unrefElement(targetComponent); // Handles Component or DOM node\n\n if (el && typeof el.focus === 'function') {\n el.focus();\n }\n });\n\n const scrollToSection = (elementRef: BentoAnchorScrollerItem['elementRef'], disabled?: boolean) => {\n if (disabled) {\n return;\n }\n\n const el = unrefElement(elementRef);\n\n if (!el) {\n printDevelopmentWarning(`[bento-anchor-scroller] element ref not found`);\n return;\n }\n\n if (!el.style.scrollMarginTop && props.scrollOffset) {\n const currentScrollMargin = window.getComputedStyle(el).scrollMarginTop;\n\n if (currentScrollMargin === '0px' || currentScrollMargin === '') {\n el.style.scrollMarginTop = `${props.scrollOffset}px`;\n }\n }\n\n if (!el.hasAttribute('tabindex')) {\n el.setAttribute('tabindex', '-1');\n }\n\n el.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n inline: 'nearest',\n });\n\n el.focus({ preventScroll: true });\n };\n\n const onKeydownNavigation = (e: KeyboardEvent) => {\n switch (e.key) {\n case 'ArrowRight':\n e.preventDefault();\n next();\n break;\n case 'ArrowLeft':\n e.preventDefault();\n prev();\n break;\n case 'Home':\n e.preventDefault();\n focusedIndex.value = 0;\n break;\n case 'End':\n e.preventDefault();\n focusedIndex.value = listIndices.value.length - 1;\n break;\n }\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./anchor-scroller-list.scss\" />\n","import { type Ref, ref, watchEffect } from 'vue';\nimport { type MaybeRef, toValue, useWindowScroll, useWindowSize, watchThrottled } from '@vueuse/core';\n\n/**\n * Options for the useScrollSpy composable.\n */\nexport interface useScrollSpyOptions {\n /**\n * The default active index to use when no item is active or initially.\n */\n default?: Ref<number>;\n}\n\n/**\n * Composable to spy on scroll position and determine the active item based on visibility.\n *\n * @param items - The list of elements to spy on.\n * @param options - Configuration options for the scroll spy.\n * @returns An object containing the active index.\n */\nexport const useScrollSpy = (items: MaybeRef<Array<Element>>, options: useScrollSpyOptions) => {\n const activeIndex = ref(options.default?.value ?? -1);\n\n const { y: scrollY } = useWindowScroll();\n const { height: windowHeight } = useWindowSize();\n\n // Logic to find the \"winner\" when there are multiple items on the same page\n const calculateActiveIndex = () => {\n const list = toValue(items);\n const viewportHeight = windowHeight.value;\n const midpoint = viewportHeight / 2;\n\n let winnerIndex = -1;\n let maxVisibleRatio = 0;\n\n for (let i = 0; i < list.length; i++) {\n const item = list[i];\n const el = item;\n\n if (!el) {\n continue;\n }\n\n const rect = el.getBoundingClientRect();\n\n // Constraint 1: Must pass midpoint\n if (rect.top > midpoint) {\n continue;\n }\n\n // Constraint 2: Must be visible\n const visibleHeight = Math.min(rect.bottom, viewportHeight) - Math.max(rect.top, 0);\n if (visibleHeight <= 0) {\n continue;\n }\n\n // Constraint 3: Highest visible % wins\n const ratio = visibleHeight / rect.height;\n\n if (ratio > maxVisibleRatio) {\n maxVisibleRatio = ratio;\n winnerIndex = i;\n }\n }\n\n // Only update if changed to avoid unnecessary patch triggers\n if (winnerIndex !== -1 && activeIndex.value !== winnerIndex) {\n activeIndex.value = winnerIndex;\n }\n };\n\n watchThrottled([scrollY, windowHeight], calculateActiveIndex, { throttle: 100, trailing: true });\n\n watchEffect(() => {\n if (toValue(items).length) {\n calculateActiveIndex();\n }\n });\n\n return {\n activeIndex,\n };\n};\n","<template>\n <div v-if=\"computedItems.length\" class=\"b-anchor-scroller\">\n <nav\n ref=\"navigationRef\"\n class=\"b-anchor-scroller__navigation\"\n :class=\"navigationConditionalClasses\"\n :aria-labelledby=\"navLabelId\"\n >\n <fixed-scroller condensed centered>\n <div class=\"b-anchor-scroller__navigation-panel\">\n <bento-typography\n :id=\"navLabelId\"\n el=\"span\"\n class=\"b-anchor-scroller__navigation-panel-label\"\n stronger\n >\n {{ t('jumpTo') }}\n </bento-typography>\n\n <anchor-scroller-list\n :items=\"computedItems\"\n :active-index=\"currentActiveIndex\"\n :scroll-offset=\"bottom\"\n />\n </div>\n </fixed-scroller>\n </nav>\n\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, toRef, watch } from 'vue';\n import { refDebounced, useElementBounding } from '@vueuse/core';\n import BentoTypography from '@/components/typography/typography.vue';\n import { FixedScroller } from '@/internal';\n import { type BentoAnchorScrollerItem, type BentoAnchorScrollerProps } from './anchor-scroller.types';\n import { AnchorScrollerList } from './components/anchor-scroller-list';\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/core/utils/ts';\n import { unrefElement } from '@/directives/click-outside/utils';\n import messages from './messages.json';\n import { useScrollSpy } from './composables';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = defineProps({\n activeIndex: { default: undefined },\n items: null\n});\n\n const emit = defineEmits([\"update:active-index\"]);\n\n const navigationRef = ref(null);\n\n const computedItems = computed<Array<BentoAnchorScrollerItem>>(() => props.items.map(item => ({ ...item })));\n\n // Skip and cache only items that are enabled\n const enabledItems = computed(() =>\n props.items\n .map((item, originalIndex) => ({\n element: unrefElement(item.elementRef),\n originalIndex,\n disabled: item.disabled,\n }))\n .filter(\n (item): item is { element: Element; originalIndex: number; disabled: boolean } =>\n !item.disabled && !!item.element\n )\n );\n\n const { top, bottom } = useElementBounding(navigationRef);\n\n // Extract strictly the elements for the ScrollSpy to watch\n const scrollToTargets = computed(() => enabledItems.value.map(c => c.element));\n\n const navigationConditionalClasses = computed(() => ({\n 'b-anchor-scroller__navigation--pinned': top.value <= 1,\n }));\n\n const { activeIndex: relativeActiveIndex } = useScrollSpy(scrollToTargets, {\n default: toRef(props, 'activeIndex'),\n });\n\n const debouncedActiveIndex = refDebounced(relativeActiveIndex, 200);\n\n const currentActiveIndex = computed(() => {\n const candidate = enabledItems.value[debouncedActiveIndex.value];\n\n return candidate ? candidate.originalIndex : 0;\n });\n\n watch(currentActiveIndex, val => {\n if (Number.isFinite(val)) {\n emit('update:active-index', val);\n }\n });\n\n watch(\n () => props.activeIndex,\n val => {\n if (Number.isFinite(val) && computedItems.value[val].disabled) {\n printDevelopmentWarning(`[bento-anchor-scroller] activeIndex should not be a disabled item`);\n }\n }\n );\n\n const navLabelId = generateUid('bento-anchor-scroller-label');\n</script>\n\n<script lang=\"ts\">\n /**\n * A navigation component that tracks page scroll and allows jumping to sections.\n *\n * @example\n * import { BentoAnchorScroller } from '@adyen/bento-vue2';\n * import { ref } from 'vue';\n *\n * export default {\n * components: { BentoAnchorScroller },\n * template: `\n * <bento-anchor-scroller :items=\"items\">\n * <section ref=\"section1\">Section 1</section>\n * <section ref=\"section2\">Section 2</section>\n * </bento-anchor-scroller>\n * `,\n * setup() {\n * const section1 = ref(null);\n * const section2 = ref(null);\n * const items = ref([\n * { title: 'Section 1', elementRef: section1 },\n * { title: 'Section 2', elementRef: section2 },\n * ]);\n * return {\n * items,\n * section1,\n * section2,\n * }\n * }\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-anchor-scroller',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./anchor-scroller.scss\" />\n"],"names":["listItemRefs","ref","listIndices","computed","props","item","index","disabled","originalIndex","focusedIndex","next","prev","useCycleList","watch","newIndex","targetComponent","el","unrefElement","elementRef","printDevelopmentWarning","currentScrollMargin","e","useScrollSpy","items","options","activeIndex","_a","scrollY","useWindowScroll","windowHeight","useWindowSize","calculateActiveIndex","list","toValue","viewportHeight","midpoint","winnerIndex","maxVisibleRatio","i","rect","visibleHeight","ratio","watchThrottled","watchEffect","__default__","messages","useI18n","navigationRef","computedItems","enabledItems","top","bottom","useElementBounding","scrollToTargets","c","navigationConditionalClasses","relativeActiveIndex","toRef","debouncedActiveIndex","refDebounced","currentActiveIndex","candidate","val","emit","navLabelId","generateUid"],"mappings":";;;;;;;;;;;;;;;;;;iBAuCIA,IAAAC,EAAA,CAAA,CAAA,GACAC,IAAAC;AAAA,MAAoB,MAAAC,EAAA,MAAA,IAAA,CAAAC,GAAAC,OAAA,EAAA,UAAAD,EAAA,UAAA,eAAAC,EAAA,EAAA,EAAA,OAAA,CAAA,EAAA,UAAAC,EAAA,MAAA,CAAAA,CAAA,EAAA,IAAA,CAAA,EAAA,eAAAC,EAAA,MAAAA,CAAA;AAA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vue","../../src/components/anchor-scroller/composables/use-scroll-spy/use-scroll-spy.ts","../../src/components/anchor-scroller/anchor-scroller.vue"],"sourcesContent":["<template>\n <ul class=\"b-anchor-scroller-list\" @keydown=\"onKeydownNavigation\">\n <li v-for=\"({ title, disabled, elementRef }, index) in items\" :key=\"index\" class=\"b-anchor-scroller-list__item\">\n <bento-button\n ref=\"listItemRefs\"\n :aria-current=\"activeIndex === index ? 'location' : null\"\n class=\"b-anchor-scroller-list__item-button\"\n :class=\"{\n 'b-anchor-scroller-list__item-button--active': activeIndex === index,\n 'b-anchor-scroller-list__item-button--disabled': disabled,\n }\"\n :aria-disabled=\"disabled\"\n :tabindex=\"activeIndex === index ? null : '-1'\"\n variant=\"tertiary-with-background\"\n @click=\"scrollToSection(elementRef, disabled)\"\n @keydown.space.native.prevent=\"scrollToSection(elementRef, disabled)\"\n @keydown.enter.native.prevent=\"scrollToSection(elementRef, disabled)\"\n >\n {{ title }}\n </bento-button>\n </li>\n </ul>\n</template>\n\n<script setup lang=\"ts\">\n import BentoButton from '@/components/button/button.vue';\n import { unrefElement } from '@/directives/click-outside/utils';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import { type BentoAnchorScrollerItem } from '../../anchor-scroller.types';\n import { type AnchorScrollerListProps } from './anchor-scroller-list.types';\n import { computed, ref, watch } from 'vue';\n import { useCycleList } from '@vueuse/core';\n\n const props = defineProps({\n activeIndex: { default: undefined },\n items: null,\n scrollOffset: { default: undefined }\n});\n\n const listItemRefs = ref([]);\n const listIndices = computed(() =>\n props.items\n .map((item, index) => ({ disabled: item.disabled, originalIndex: index }))\n .filter(({ disabled }) => !disabled)\n .map(({ originalIndex }) => originalIndex)\n );\n\n const {\n state: focusedIndex,\n next,\n prev,\n } = useCycleList(listIndices, {\n initialValue: props.activeIndex ?? listIndices.value[0],\n });\n\n watch(focusedIndex, async newIndex => {\n const targetComponent = listItemRefs.value[newIndex];\n const el = unrefElement(targetComponent); // Handles Component or DOM node\n\n if (el && typeof el.focus === 'function') {\n el.focus();\n }\n });\n\n const scrollToSection = (elementRef: BentoAnchorScrollerItem['elementRef'], disabled?: boolean) => {\n if (disabled) {\n return;\n }\n\n const el = unrefElement(elementRef);\n\n if (!el) {\n printDevelopmentWarning(`[bento-anchor-scroller] element ref not found`);\n return;\n }\n\n if (!el.style.scrollMarginTop && props.scrollOffset) {\n const currentScrollMargin = window.getComputedStyle(el).scrollMarginTop;\n\n if (currentScrollMargin === '0px' || currentScrollMargin === '') {\n el.style.scrollMarginTop = `${props.scrollOffset}px`;\n }\n }\n\n if (!el.hasAttribute('tabindex')) {\n el.setAttribute('tabindex', '-1');\n }\n\n el.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n inline: 'nearest',\n });\n\n el.focus({ preventScroll: true });\n };\n\n const onKeydownNavigation = (e: KeyboardEvent) => {\n switch (e.key) {\n case 'ArrowRight':\n e.preventDefault();\n next();\n break;\n case 'ArrowLeft':\n e.preventDefault();\n prev();\n break;\n case 'Home':\n e.preventDefault();\n focusedIndex.value = 0;\n break;\n case 'End':\n e.preventDefault();\n focusedIndex.value = listIndices.value.length - 1;\n break;\n }\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./anchor-scroller-list.scss\" />\n","import { type Ref, ref, watchEffect } from 'vue';\nimport { type MaybeRef, toValue, useWindowScroll, useWindowSize, watchThrottled } from '@vueuse/core';\n\n/**\n * Options for the useScrollSpy composable.\n */\nexport interface useScrollSpyOptions {\n /**\n * The default active index to use when no item is active or initially.\n */\n default?: Ref<number>;\n}\n\n/**\n * Composable to spy on scroll position and determine the active item based on visibility.\n *\n * @param items - The list of elements to spy on.\n * @param options - Configuration options for the scroll spy.\n * @returns An object containing the active index.\n */\nexport const useScrollSpy = (items: MaybeRef<Array<Element>>, options: useScrollSpyOptions) => {\n const activeIndex = ref(options.default?.value ?? -1);\n\n const { y: scrollY } = useWindowScroll();\n const { height: windowHeight } = useWindowSize();\n\n // Logic to find the \"winner\" when there are multiple items on the same page\n const calculateActiveIndex = () => {\n const list = toValue(items);\n const viewportHeight = windowHeight.value;\n const midpoint = viewportHeight / 2;\n\n let winnerIndex = -1;\n let maxVisibleRatio = 0;\n\n for (let i = 0; i < list.length; i++) {\n const item = list[i];\n const el = item;\n\n if (!el) {\n continue;\n }\n\n const rect = el.getBoundingClientRect();\n\n // Constraint 1: Must pass midpoint\n if (rect.top > midpoint) {\n continue;\n }\n\n // Constraint 2: Must be visible\n const visibleHeight = Math.min(rect.bottom, viewportHeight) - Math.max(rect.top, 0);\n if (visibleHeight <= 0) {\n continue;\n }\n\n // Constraint 3: Highest visible % wins\n const ratio = visibleHeight / rect.height;\n\n if (ratio > maxVisibleRatio) {\n maxVisibleRatio = ratio;\n winnerIndex = i;\n }\n }\n\n // Only update if changed to avoid unnecessary patch triggers\n if (winnerIndex !== -1 && activeIndex.value !== winnerIndex) {\n activeIndex.value = winnerIndex;\n }\n };\n\n watchThrottled([scrollY, windowHeight], calculateActiveIndex, { throttle: 100, trailing: true });\n\n watchEffect(() => {\n if (toValue(items).length) {\n calculateActiveIndex();\n }\n });\n\n return {\n activeIndex,\n };\n};\n","<template>\n <div v-if=\"computedItems.length\" class=\"b-anchor-scroller\">\n <nav\n ref=\"navigationRef\"\n class=\"b-anchor-scroller__navigation\"\n :class=\"navigationConditionalClasses\"\n :aria-labelledby=\"navLabelId\"\n >\n <fixed-scroller condensed centered>\n <div class=\"b-anchor-scroller__navigation-panel\">\n <bento-typography\n :id=\"navLabelId\"\n el=\"span\"\n class=\"b-anchor-scroller__navigation-panel-label\"\n stronger\n >\n {{ t('jumpTo') }}\n </bento-typography>\n\n <anchor-scroller-list\n :items=\"computedItems\"\n :active-index=\"currentActiveIndex\"\n :scroll-offset=\"bottom\"\n />\n </div>\n </fixed-scroller>\n </nav>\n\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, toRef, watch } from 'vue';\n import { refDebounced, useElementBounding } from '@vueuse/core';\n import BentoTypography from '@/components/typography/typography.vue';\n import { FixedScroller } from '@/internal';\n import { type BentoAnchorScrollerItem, type BentoAnchorScrollerProps } from './anchor-scroller.types';\n import { AnchorScrollerList } from './components/anchor-scroller-list';\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/core/utils/ts';\n import { unrefElement } from '@/directives/click-outside/utils';\n import messages from './messages.json';\n import { useScrollSpy } from './composables';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = defineProps({\n activeIndex: { default: undefined },\n items: null\n});\n\n const emit = defineEmits([\"update:active-index\"]);\n\n const navigationRef = ref(null);\n\n const computedItems = computed<Array<BentoAnchorScrollerItem>>(() => props.items.map(item => ({ ...item })));\n\n // Skip and cache only items that are enabled\n const enabledItems = computed(() =>\n props.items\n .map((item, originalIndex) => ({\n element: unrefElement(item.elementRef),\n originalIndex,\n disabled: item.disabled,\n }))\n .filter(\n (item): item is { element: Element; originalIndex: number; disabled: boolean } =>\n !item.disabled && !!item.element\n )\n );\n\n const { top, bottom } = useElementBounding(navigationRef);\n\n // Extract strictly the elements for the ScrollSpy to watch\n const scrollToTargets = computed(() => enabledItems.value.map(c => c.element));\n\n const navigationConditionalClasses = computed(() => ({\n 'b-anchor-scroller__navigation--pinned': top.value <= 1,\n }));\n\n const { activeIndex: relativeActiveIndex } = useScrollSpy(scrollToTargets, {\n default: toRef(props, 'activeIndex'),\n });\n\n const debouncedActiveIndex = refDebounced(relativeActiveIndex, 200);\n\n const currentActiveIndex = computed(() => {\n const candidate = enabledItems.value[debouncedActiveIndex.value];\n\n return candidate ? candidate.originalIndex : 0;\n });\n\n watch(currentActiveIndex, val => {\n if (Number.isFinite(val)) {\n emit('update:active-index', val);\n }\n });\n\n watch(\n () => props.activeIndex,\n val => {\n if (Number.isFinite(val) && computedItems.value[val].disabled) {\n printDevelopmentWarning(`[bento-anchor-scroller] activeIndex should not be a disabled item`);\n }\n }\n );\n\n const navLabelId = generateUid('bento-anchor-scroller-label');\n</script>\n\n<script lang=\"ts\">\n /**\n * A navigation component that tracks page scroll and allows jumping to sections.\n *\n * @example\n * import { BentoAnchorScroller } from '@adyen/bento-vue2';\n * import { ref } from 'vue';\n *\n * export default {\n * components: { BentoAnchorScroller },\n * template: `\n * <bento-anchor-scroller :items=\"items\">\n * <section ref=\"section1\">Section 1</section>\n * <section ref=\"section2\">Section 2</section>\n * </bento-anchor-scroller>\n * `,\n * setup() {\n * const section1 = ref(null);\n * const section2 = ref(null);\n * const items = ref([\n * { title: 'Section 1', elementRef: section1 },\n * { title: 'Section 2', elementRef: section2 },\n * ]);\n * return {\n * items,\n * section1,\n * section2,\n * }\n * }\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-anchor-scroller',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./anchor-scroller.scss\" />\n"],"names":["listItemRefs","ref","listIndices","computed","props","item","index","disabled","originalIndex","focusedIndex","next","prev","useCycleList","watch","newIndex","targetComponent","el","unrefElement","elementRef","printDevelopmentWarning","currentScrollMargin","e","useScrollSpy","items","options","activeIndex","_a","scrollY","useWindowScroll","windowHeight","useWindowSize","calculateActiveIndex","list","toValue","viewportHeight","midpoint","winnerIndex","maxVisibleRatio","i","rect","visibleHeight","ratio","watchThrottled","watchEffect","__default__","messages","useI18n","navigationRef","computedItems","enabledItems","top","bottom","useElementBounding","scrollToTargets","c","navigationConditionalClasses","relativeActiveIndex","toRef","debouncedActiveIndex","refDebounced","currentActiveIndex","candidate","val","emit","navLabelId","generateUid"],"mappings":";;;;;;;;;;;;;;;;;;iBAuCIA,IAAAC,EAAA,CAAA,CAAA,GACAC,IAAAC;AAAA,MAAoB,MAAAC,EAAA,MAAA,IAAA,CAAAC,GAAAC,OAAA,EAAA,UAAAD,EAAA,UAAA,eAAAC,EAAA,EAAA,EAAA,OAAA,CAAA,EAAA,UAAAC,EAAA,MAAA,CAAAA,CAAA,EAAA,IAAA,CAAA,EAAA,e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defineComponent as T, useSlots as Y, ref as r, computed as l, inject as Q, watch as w, nextTick as X, onUnmounted as Z, useAttrs as V, onMounted as tt, provide as D, toRefs as et } from "vue";
2
- import { B as at } from "./button.DxhJNOtr.js";
1
+ import { defineComponent as G, useSlots as Y, ref as u, computed as l, inject as Q, watch as N, nextTick as X, onUnmounted as Z, useAttrs as V, onMounted as tt, provide as D, toRefs as et } from "vue";
2
+ import { B as at } from "./button.C9b2AC9w.js";
3
3
  import { B as ot } from "./focus-trap.DRqjHzt6.js";
4
4
  import { u as q } from "./use-has-slot.C9lQZ6nz.js";
5
5
  import { u as nt } from "./index.B6WW_F-J.js";
6
- import { l as st } from "./button-actions.BLk114As.js";
6
+ import { l as st } from "./button-actions.Bdbu0bvt.js";
7
7
  import { g as lt } from "./generate-uid.NJ8tVoha.js";
8
8
  import { C as it } from "./cross.CC_B-vG-.js";
9
- import { b as ut, B as ct, D as rt, a as dt } from "./dialog-page.oyG153fC.js";
9
+ import { b as ct, B as rt, D as ut, a as dt } from "./dialog-page.EdejG53a.js";
10
10
  import { B as mt } from "./typography.C8lPlsbD.js";
11
- import { F as pt } from "./footer-actions.CiPj7hZG.js";
11
+ import { F as pt } from "./footer-actions.CvUaoMzj.js";
12
12
  import { o as ft } from "./resize.Bqks3WUm.js";
13
13
  import { a as gt, G as _t } from "./grid-layout.1aIiz2N_.js";
14
14
  import { n as W } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
15
- import { B as vt } from "./directive.rXUeDb8p.js";
15
+ import { B as vt } from "./directive.Bfr4fuOy.js";
16
16
  import "../assets/base-modal.css";
17
- var yt = /* @__PURE__ */ ((a) => (a.DEFAULT = "default", a.DIALOG = "dialog", a))(yt || {}), Ct = /* @__PURE__ */ ((a) => (a.DEFAULT = "BentoModalDefault", a.DIALOG = "BentoModalDialog", a))(Ct || {}), G = /* @__PURE__ */ ((a) => (a.SMALL = "small", a.MEDIUM = "medium", a.LARGE = "large", a))(G || {}), E = /* @__PURE__ */ ((a) => (a.SMALLER = "smaller", a.EQUAL = "equal", a.BIGGER = "bigger", a))(E || {}), F = /* @__PURE__ */ ((a) => (a.DIALOG = "dialog", a.ALERT_DIALOG = "alertdialog", a))(F || {}), ht = /* @__PURE__ */ ((a) => (a.CONFIRMATION = "confirmation", a.DESTRUCTIVE = "destructive", a.INFO = "info", a.ACKNOWLEDGEMENT = "acknowledgement", a))(ht || {}), bt = /* @__PURE__ */ ((a) => (a.CLOSE_MODAL = "close-modal", a))(bt || {});
17
+ var yt = /* @__PURE__ */ ((a) => (a.DEFAULT = "default", a.DIALOG = "dialog", a))(yt || {}), Ct = /* @__PURE__ */ ((a) => (a.DEFAULT = "BentoModalDefault", a.DIALOG = "BentoModalDialog", a))(Ct || {}), F = /* @__PURE__ */ ((a) => (a.SMALL = "small", a.MEDIUM = "medium", a.LARGE = "large", a))(F || {}), E = /* @__PURE__ */ ((a) => (a.SMALLER = "smaller", a.EQUAL = "equal", a.BIGGER = "bigger", a))(E || {}), w = /* @__PURE__ */ ((a) => (a.DIALOG = "dialog", a.ALERT_DIALOG = "alertdialog", a))(w || {}), bt = /* @__PURE__ */ ((a) => (a.CONFIRMATION = "confirmation", a.DESTRUCTIVE = "destructive", a.INFO = "info", a.ACKNOWLEDGEMENT = "acknowledgement", a))(bt || {}), ht = /* @__PURE__ */ ((a) => (a.CLOSE_MODAL = "close-modal", a))(ht || {});
18
18
  const Lt = {
19
- "en-US": { ariaLabelFallback: "modal", close: "Close" },
20
- "ja-JP": { ariaLabelFallback: "モーダル", close: "閉じる" },
21
- "pt-BR": { ariaLabelFallback: "modal", close: "Fechar" }
22
- }, j = /* @__PURE__ */ Symbol("modal config data injection key"), At = T({}), Pt = /* @__PURE__ */ T({
19
+ "de-DE": {
20
+ ariaLabelFallback: "Modal",
21
+ close: "Schließen"
22
+ },
23
+ "en-GB": {
24
+ ariaLabelFallback: "modal",
25
+ close: "Close"
26
+ },
27
+ "en-US": {
28
+ ariaLabelFallback: "modal",
29
+ close: "Close"
30
+ },
31
+ "es-ES": {
32
+ ariaLabelFallback: "modal",
33
+ close: "Cerrar"
34
+ },
35
+ "es-MX": {
36
+ ariaLabelFallback: "modal",
37
+ close: "Cerrar"
38
+ },
39
+ "fr-FR": {
40
+ ariaLabelFallback: "fenêtre modale",
41
+ close: "Fermer"
42
+ },
43
+ "it-IT": {
44
+ ariaLabelFallback: "modale",
45
+ close: "Chiudi"
46
+ },
47
+ "ja-JP": {
48
+ ariaLabelFallback: "モーダル",
49
+ close: "閉じる"
50
+ },
51
+ "pt-BR": {
52
+ ariaLabelFallback: "modal",
53
+ close: "Fechar"
54
+ },
55
+ "zh-CN": {
56
+ ariaLabelFallback: "模态",
57
+ close: "关闭"
58
+ }
59
+ }, j = /* @__PURE__ */ Symbol("modal config data injection key"), At = G({}), St = /* @__PURE__ */ G({
23
60
  ...At,
24
61
  __name: "modal-page",
25
62
  props: {
@@ -33,33 +70,33 @@ const Lt = {
33
70
  previousPage: { default: void 0 }
34
71
  },
35
72
  setup(a) {
36
- const e = a, o = 26, t = Y(), n = q(t), d = r(null), O = l(() => ({
73
+ const e = a, o = 26, t = Y(), n = q(t), d = u(null), O = l(() => ({
37
74
  "b-modal-page--custom-padding": e.customPadding
38
75
  })), I = l(() => {
39
- var c;
76
+ var r;
40
77
  return {
41
78
  "b-modal-page__content--with-header": n("default"),
42
- "b-modal-page__content--with-actions": n("actions") || ((c = e.actions) == null ? void 0 : c.length)
79
+ "b-modal-page__content--with-actions": n("actions") || ((r = e.actions) == null ? void 0 : r.length)
43
80
  };
44
- }), R = l(() => {
81
+ }), T = l(() => {
45
82
  if (!e.customPadding)
46
83
  return {};
47
- const c = {
84
+ const r = {
48
85
  paddingLeft: e.customPadding,
49
86
  paddingRight: e.customPadding
50
- }, i = { ...c, paddingTop: void 0, paddingBottom: void 0 };
87
+ }, i = { ...r, paddingTop: void 0, paddingBottom: void 0 };
51
88
  return n("default") || (i.paddingTop = e.customPadding), n("actions") || (i.paddingBottom = e.customPadding), {
52
89
  header: {
53
- ...c,
90
+ ...r,
54
91
  paddingTop: e.customPadding,
55
92
  paddingRight: `${parseInt(e.customPadding, 10) + o}px`,
56
93
  flex: 1
57
94
  },
58
95
  content: i,
59
- actions: { ...c, paddingBottom: e.customPadding },
96
+ actions: { ...r, paddingBottom: e.customPadding },
60
97
  backButton: { top: e.customPadding, paddingLeft: e.customPadding }
61
98
  };
62
- }), u = l(() => e.withColumnLayout && L.value === G.LARGE), f = l(() => e.columnsSize === E.SMALLER ? [
99
+ }), c = l(() => e.withColumnLayout && L.value === F.LARGE), f = l(() => e.columnsSize === E.SMALLER ? [
63
100
  { small: 4, medium: 4, large: 4 },
64
101
  { small: 8, medium: 8, large: 8 }
65
102
  ] : e.columnsSize === E.BIGGER ? [
@@ -68,25 +105,25 @@ const Lt = {
68
105
  ] : [
69
106
  { small: 6, medium: 6, large: 6 },
70
107
  { small: 6, medium: 6, large: 6 }
71
- ]), { activePage: g, height: _, isAnimationActive: m, pageCustomPadding: B, showCloseButton: x, size: L } = Q(j), h = l(() => g.value === e.pageId || !g.value);
108
+ ]), { activePage: g, height: _, isAnimationActive: m, pageCustomPadding: k, showCloseButton: R, size: L } = Q(j), b = l(() => g.value === e.pageId || !g.value);
72
109
  let p = null;
73
- return w(
110
+ return N(
74
111
  () => g.value,
75
- async (c, i) => {
76
- var b, k;
77
- h.value && (await X(), _.value = `${(k = (b = d.value) == null ? void 0 : b.$el) == null ? void 0 : k.clientHeight}px`, B.value = e.customPadding, m.value = i !== void 0, p = ft(d.value, () => {
78
- var v, P;
79
- const A = `${(P = (v = d.value) == null ? void 0 : v.$el) == null ? void 0 : P.clientHeight}px`;
112
+ async (r, i) => {
113
+ var h, B;
114
+ b.value && (await X(), _.value = `${(B = (h = d.value) == null ? void 0 : h.$el) == null ? void 0 : B.clientHeight}px`, k.value = e.customPadding, m.value = i !== void 0, p = ft(d.value, () => {
115
+ var v, S;
116
+ const A = `${(S = (v = d.value) == null ? void 0 : v.$el) == null ? void 0 : S.clientHeight}px`;
80
117
  A && A !== _.value && (_.value = A);
81
118
  }));
82
119
  },
83
120
  { immediate: !0 }
84
121
  ), Z(() => {
85
122
  p == null || p.disconnect();
86
- }), { __sfc: !0, CLOSE_BUTTON_ICON_WIDTH: o, slots: t, hasSlot: n, page: d, props: e, modalPageConditionalClasses: O, modalContentConditionalClasses: I, customPaddingStyles: R, hasColumnLayout: u, computedColumnWidth: f, activePage: g, height: _, isAnimationActive: m, pageCustomPadding: B, showCloseButton: x, size: L, isCurrentPage: h, pageElementObserver: p, BentoTypography: mt, GridLayout: _t, GridLayoutContainerType: gt, FooterActions: pt, DialogPage: ut };
123
+ }), { __sfc: !0, CLOSE_BUTTON_ICON_WIDTH: o, slots: t, hasSlot: n, page: d, props: e, modalPageConditionalClasses: O, modalContentConditionalClasses: I, customPaddingStyles: T, hasColumnLayout: c, computedColumnWidth: f, activePage: g, height: _, isAnimationActive: m, pageCustomPadding: k, showCloseButton: R, size: L, isCurrentPage: b, pageElementObserver: p, BentoTypography: mt, GridLayout: _t, GridLayoutContainerType: gt, FooterActions: pt, DialogPage: ct };
87
124
  }
88
125
  });
89
- var St = function() {
126
+ var Pt = function() {
90
127
  var n;
91
128
  var e = this, o = e._self._c, t = e._self._setupProxy;
92
129
  return o(t.DialogPage, { ref: "page", staticClass: "b-modal-page", class: t.modalPageConditionalClasses, attrs: { "page-id": e.pageId, "always-show-border": t.hasColumnLayout, "back-button-styling": (n = t.customPaddingStyles) == null ? void 0 : n.backButton, "previous-page": e.previousPage }, on: { animationend: function(d) {
@@ -105,18 +142,18 @@ var St = function() {
105
142
  return [o("div", { staticClass: "b-modal-page__actions-container", style: t.customPaddingStyles.actions }, [o(t.FooterActions, { attrs: { actions: e.actions, "actions-label": e.actionsLabel, "destructive-actions": e.destructiveActions } })], 1)];
106
143
  }, proxy: !0 } : null], null, !0) });
107
144
  }, Et = [], Ot = /* @__PURE__ */ W(
108
- Pt,
109
145
  St,
146
+ Pt,
110
147
  Et,
111
148
  !1,
112
149
  null,
113
150
  "a4b63aa0"
114
151
  );
115
- const It = Ot.exports, Bt = T({
152
+ const It = Ot.exports, kt = G({
116
153
  i18n: { messages: Lt },
117
154
  name: "base-modal"
118
- }), kt = /* @__PURE__ */ T({
119
- ...Bt,
155
+ }), Bt = /* @__PURE__ */ G({
156
+ ...kt,
120
157
  props: {
121
158
  /**
122
159
  * List of actions that will be used to render the buttons.
@@ -192,13 +229,13 @@ const It = Ot.exports, Bt = T({
192
229
  /**
193
230
  * Defines whether the modal will be an alert modal
194
231
  */
195
- modalRole: { type: String, default: F.DIALOG },
232
+ modalRole: { type: String, default: w.DIALOG },
196
233
  /**
197
234
  * Sets the width of the modal
198
235
  */
199
236
  size: {
200
237
  type: String,
201
- default: G.SMALL
238
+ default: F.SMALL
202
239
  },
203
240
  /**
204
241
  * If provided, renders the modal's content in a two-column layout an wth dividers separating its content
@@ -207,32 +244,32 @@ const It = Ot.exports, Bt = T({
207
244
  },
208
245
  emits: ["update:active-page", "close-modal"],
209
246
  setup(a, { expose: e, emit: o }) {
210
- const t = a, n = 500, { t: d } = nt(), O = Y(), I = V(), R = q(O), u = r(null), f = r(!1), g = lt("modal"), _ = l(() => t.isDismissible && !t.hideCloseButton), m = r(t.customPadding), B = l(() => m.value ? { top: m.value, right: m.value } : {}), x = l(() => I["aria-label"] ?? d("ariaLabelFallback")), L = l(() => t.withColumnLayout && t.size === G.LARGE), h = () => {
211
- u.value.showModal();
247
+ const t = a, n = 500, { t: d } = nt(), O = Y(), I = V(), T = q(O), c = u(null), f = u(!1), g = lt("modal"), _ = l(() => t.isDismissible && !t.hideCloseButton), m = u(t.customPadding), k = l(() => m.value ? { top: m.value, right: m.value } : {}), R = l(() => I["aria-label"] ?? d("ariaLabelFallback")), L = l(() => t.withColumnLayout && t.size === F.LARGE), b = () => {
248
+ c.value.showModal();
212
249
  }, p = () => {
213
250
  o("close-modal");
214
- }, c = () => {
215
- f.value && u.value && (u.value.close(), y.value[0] && o("update:active-page", y.value[0]), y.value = [], f.value = !1, p());
251
+ }, r = () => {
252
+ f.value && c.value && (c.value.close(), y.value[0] && o("update:active-page", y.value[0]), y.value = [], f.value = !1, p());
216
253
  }, i = () => {
217
- u.value.open && (f.value = !0);
218
- }, b = (s) => {
219
- s && s.preventDefault(), !(!t.isDismissible && t.modalRole === F.DIALOG) && i();
220
- }, k = () => {
221
- t.isDismissible && b();
254
+ c.value.open && (f.value = !0);
255
+ }, h = (s) => {
256
+ s && s.preventDefault(), !(!t.isDismissible && t.modalRole === w.DIALOG) && i();
257
+ }, B = () => {
258
+ t.isDismissible && h();
222
259
  }, A = l(() => ({
223
260
  [`b-modal-base__container--${t.size}`]: t.size,
224
261
  "b-modal-base__container--hide": f.value,
225
262
  "b-modal-base__container--column-layout": L.value,
226
263
  "b-modal-base__container--animation": M.value
227
264
  }));
228
- w(
229
- () => [t.isOpen, u.value],
230
- ([s, C], [, N]) => {
265
+ N(
266
+ () => [t.isOpen, c.value],
267
+ ([s, C], [, x]) => {
231
268
  if (!C)
232
269
  return;
233
- s ? (h(), y.value.length || y.value.push(v.value)) : !N || i();
270
+ s ? (b(), y.value.length || y.value.push(v.value)) : !x || i();
234
271
  }
235
- ), w(
272
+ ), N(
236
273
  () => t.actions,
237
274
  () => {
238
275
  var s, C;
@@ -240,14 +277,14 @@ const It = Ot.exports, Bt = T({
240
277
  },
241
278
  { deep: !0 }
242
279
  ), tt(() => {
243
- t.isOpen && u.value && h();
280
+ t.isOpen && c.value && b();
244
281
  }), e({
245
- internalModalActionClose: b
282
+ internalModalActionClose: h
246
283
  }), D(st, g);
247
- const { activePage: v, isOpen: P, size: z } = et(t), U = r(ct.TRANSITION_LEVEL_DEEPER), S = r([]), y = r([]), $ = (s) => o("update:active-page", s), H = (s) => () => {
284
+ const { activePage: v, isOpen: S, size: z } = et(t), U = u(rt.TRANSITION_LEVEL_DEEPER), P = u([]), y = u([]), $ = (s) => o("update:active-page", s), H = (s) => () => {
248
285
  var C;
249
- S.value = (C = S.value) == null ? void 0 : C.filter((N) => N !== s);
250
- }, J = (s) => (s && S.value.push(s), { unregisterPage: H(s) }), K = r(""), M = r(!1);
286
+ P.value = (C = P.value) == null ? void 0 : C.filter((x) => x !== s);
287
+ }, J = (s) => (s && P.value.push(s), { unregisterPage: H(s) }), K = u(""), M = u(!1);
251
288
  return D(j, {
252
289
  activePage: v,
253
290
  height: K,
@@ -255,14 +292,14 @@ const It = Ot.exports, Bt = T({
255
292
  pageCustomPadding: m,
256
293
  showCloseButton: _,
257
294
  size: z
258
- }), D(rt, {
295
+ }), D(ut, {
259
296
  activePage: v,
260
297
  animation: U,
261
- isOpen: P,
262
- pages: S,
298
+ isOpen: S,
299
+ pages: P,
263
300
  previousPages: y,
264
301
  updatePage: $
265
- }), D(dt, J), { __sfc: !0, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME: n, t: d, slots: O, attrs: I, hasSlot: R, modal: u, isClosing: f, modalId: g, emit: o, props: t, showCloseButton: _, pageCustomPadding: m, customPaddingStyles: B, computedAriaLabel: x, hasColumnLayout: L, openModal: h, emitCloseEvent: p, closeModalAfterAnimation: c, startCloseModalAnimation: i, internalModalActionClose: b, closeModalOnClickOutside: k, modalConditionalClasses: A, activePage: v, isOpen: P, size: z, animation: U, pages: S, previousPages: y, updatePage: $, unregisterPage: H, registerPage: J, height: K, isAnimationActive: M, BentoButton: at, BentoFocusTrap: ot, vBentoClickOutsideDirective: vt, BentoModalPage: It, CrossIcon: it };
302
+ }), D(dt, J), { __sfc: !0, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME: n, t: d, slots: O, attrs: I, hasSlot: T, modal: c, isClosing: f, modalId: g, emit: o, props: t, showCloseButton: _, pageCustomPadding: m, customPaddingStyles: k, computedAriaLabel: R, hasColumnLayout: L, openModal: b, emitCloseEvent: p, closeModalAfterAnimation: r, startCloseModalAnimation: i, internalModalActionClose: h, closeModalOnClickOutside: B, modalConditionalClasses: A, activePage: v, isOpen: S, size: z, animation: U, pages: P, previousPages: y, updatePage: $, unregisterPage: H, registerPage: J, height: K, isAnimationActive: M, BentoButton: at, BentoFocusTrap: ot, vBentoClickOutsideDirective: vt, BentoModalPage: It, CrossIcon: it };
266
303
  }
267
304
  });
268
305
  var Dt = function() {
@@ -280,24 +317,24 @@ var Dt = function() {
280
317
  }, proxy: !0 } : null, t.hasSlot("actions") ? { key: "actions", fn: function() {
281
318
  return [e._t("actions")];
282
319
  }, proxy: !0 } : null], null, !0) })], 2) : e._e()], 1)]);
283
- }, Gt = [], Tt = /* @__PURE__ */ W(
284
- kt,
320
+ }, Ft = [], Gt = /* @__PURE__ */ W(
321
+ Bt,
285
322
  Dt,
286
- Gt,
323
+ Ft,
287
324
  !1,
288
325
  null,
289
326
  "4fdcf8c3"
290
327
  );
291
- const Qt = Tt.exports;
328
+ const Qt = Gt.exports;
292
329
  export {
293
330
  E as B,
294
- ht as a,
295
- bt as b,
331
+ bt as a,
332
+ ht as b,
296
333
  It as c,
297
- F as d,
298
- G as e,
334
+ w as d,
335
+ F as e,
299
336
  yt as f,
300
337
  Ct as g,
301
338
  Qt as h
302
339
  };
303
- //# sourceMappingURL=base-modal.DmWkavtf.js.map
340
+ //# sourceMappingURL=base-modal.C52VMtnd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-modal.DmWkavtf.js","sources":["../../src/components/modal/modal.types.ts","../../src/components/modal/modal.keys.ts","../../src/components/modal/components/modal-page/modal-page.vue","../../src/components/modal/components/base-modal/base-modal.vue"],"sourcesContent":["import { type ComputedRef, type Ref } from 'vue';\n\n/**\n * Public\n */\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalVariant {\n DEFAULT = 'default',\n DIALOG = 'dialog',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalVariantMapping {\n DEFAULT = 'BentoModalDefault',\n DIALOG = 'BentoModalDialog',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalColumnLayoutVariant {\n SMALLER = 'smaller',\n EQUAL = 'equal',\n BIGGER = 'bigger',\n}\n\nexport enum BentoModalRole {\n DIALOG = 'dialog',\n ALERT_DIALOG = 'alertdialog',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalDialogType {\n CONFIRMATION = 'confirmation',\n DESTRUCTIVE = 'destructive',\n INFO = 'info',\n ACKNOWLEDGEMENT = 'acknowledgement',\n}\n\nexport enum BentoModalEvent {\n CLOSE_MODAL = 'close-modal',\n}\n\n/**\n * Private\n */\nexport interface BentoModalConfigData {\n activePage: Ref<string>;\n height: Ref<string>;\n isAnimationActive: Ref<boolean>;\n pageCustomPadding: Ref<string>;\n showCloseButton: ComputedRef<boolean>;\n size: Ref<BentoModalSize | `${BentoModalSize}`>;\n}\n","export const MODAL_CONFIG_INJECTION_KEY = Symbol('modal config data injection key');\n","<template>\n <dialog-page\n ref=\"page\"\n class=\"b-modal-page\"\n :class=\"modalPageConditionalClasses\"\n :page-id=\"pageId\"\n :always-show-border=\"hasColumnLayout\"\n :back-button-styling=\"customPaddingStyles?.backButton\"\n :previous-page=\"previousPage\"\n @animationend=\"isAnimationActive = false\"\n >\n <template v-if=\"hasSlot('default') || showCloseButton\" #header>\n <div class=\"b-modal-page__header-container\" :style=\"customPaddingStyles.header\">\n <div class=\"b-modal-page__header\">\n <bento-typography class=\"b-modal-page__title\" el=\"span\" variant=\"title\" stronger>\n <slot v-if=\"hasSlot('default')\" />\n </bento-typography>\n </div>\n </div>\n </template>\n\n <template #content>\n <div\n class=\"b-modal-page__content\"\n :class=\"modalContentConditionalClasses\"\n :style=\"customPaddingStyles.content\"\n >\n <bento-typography\n v-if=\"hasSlot('content') || (hasSlot('content-col-1') && hasSlot('content-col-2'))\"\n el=\"div\"\n >\n <grid-layout\n v-if=\"hasColumnLayout\"\n :column-width=\"computedColumnWidth\"\n :container-type=\"GridLayoutContainerType.NORMAL\"\n no-gap\n class=\"b-modal-page__grid\"\n >\n <template #col-1><slot name=\"content-col-1\"></slot></template>\n <template #col-2><slot name=\"content-col-2\"></slot></template>\n </grid-layout>\n <slot v-else name=\"content\" />\n </bento-typography>\n </div>\n </template>\n <template v-if=\"hasSlot('actions')\" #footer>\n <div class=\"b-modal-page__actions-container\" :style=\"customPaddingStyles.actions\">\n <div aria-label=\"modal actions\" class=\"b-modal-page__actions\">\n <slot name=\"actions\" />\n </div>\n </div>\n </template>\n <template v-else-if=\"actions && actions.length > 0\" #footer>\n <div class=\"b-modal-page__actions-container\" :style=\"customPaddingStyles.actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </div>\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, inject, nextTick, onUnmounted, ref, useSlots, watch } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n type BentoModalConfigData,\n BentoModalSize,\n } from '@/components/modal/modal.types';\n import { BentoTypography } from '@/components/typography';\n import { GridLayout, GridLayoutContainerType } from '@/internal';\n import { useHasSlot } from '@/composables';\n\n import { FooterActions } from '@/components/internal/footer-actions';\n\n import DialogPage from '@/internal/dialog-page/dialog-page.vue';\n import { MODAL_CONFIG_INJECTION_KEY } from '../../modal.keys';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import type { BentoModalPageProps } from './modal-page.types';\n\n const CLOSE_BUTTON_ICON_WIDTH = 26;\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const page = ref<InstanceType<typeof DialogPage>>(null);\n\n const props = defineProps({\n actions: { default: null },\n actionsLabel: { default: null },\n columnsSize: { default: BentoModalColumnLayoutVariant.SMALLER },\n customPadding: { default: null },\n destructiveActions: { type: Boolean, default: false },\n withColumnLayout: { type: Boolean, default: false },\n pageId: { default: undefined },\n previousPage: { default: undefined }\n});\n\n const modalPageConditionalClasses = computed(() => ({\n 'b-modal-page--custom-padding': props.customPadding,\n }));\n\n const modalContentConditionalClasses = computed(() => ({\n 'b-modal-page__content--with-header': hasSlot('default'),\n 'b-modal-page__content--with-actions': hasSlot('actions') || props.actions?.length,\n }));\n\n // Setting custom padding styles\n const customPaddingStyles = computed(() => {\n if (!props.customPadding) {\n return {};\n }\n\n const xPadding = {\n paddingLeft: props.customPadding,\n paddingRight: props.customPadding,\n };\n\n const content = { ...xPadding, paddingTop: undefined, paddingBottom: undefined };\n\n if (!hasSlot('default')) {\n content.paddingTop = props.customPadding;\n }\n\n if (!hasSlot('actions')) {\n content.paddingBottom = props.customPadding;\n }\n\n return {\n header: {\n ...xPadding,\n paddingTop: props.customPadding,\n paddingRight: `${parseInt(props.customPadding, 10) + CLOSE_BUTTON_ICON_WIDTH}px`,\n flex: 1,\n },\n content,\n actions: { ...xPadding, paddingBottom: props.customPadding },\n backButton: { top: props.customPadding, paddingLeft: props.customPadding },\n };\n });\n\n // Column layout styles\n const hasColumnLayout = computed(() => props.withColumnLayout && size.value === BentoModalSize.LARGE);\n\n const computedColumnWidth = computed(() => {\n if (props.columnsSize === BentoModalColumnLayoutVariant.SMALLER) {\n return [\n { small: 4, medium: 4, large: 4 },\n { small: 8, medium: 8, large: 8 },\n ];\n }\n if (props.columnsSize === BentoModalColumnLayoutVariant.BIGGER) {\n return [\n { small: 8, medium: 8, large: 8 },\n { small: 4, medium: 4, large: 4 },\n ];\n }\n return [\n { small: 6, medium: 6, large: 6 },\n { small: 6, medium: 6, large: 6 },\n ];\n });\n\n // Register page to parent component and inject data from parent component\n const { activePage, height, isAnimationActive, pageCustomPadding, showCloseButton, size } =\n inject<BentoModalConfigData>(MODAL_CONFIG_INJECTION_KEY);\n\n const isCurrentPage = computed(() => activePage.value === props.pageId || !activePage.value);\n\n // Animation\n // Set resize observer on mount of update the height of the dialog on resize\n let pageElementObserver: ResizeObserver | null = null;\n\n // Watching activePage changes to set the height of the page and set isAnimationActive\n watch(\n () => activePage.value,\n async (value, oldValue) => {\n if (isCurrentPage.value) {\n await nextTick();\n height.value = `${page.value?.$el?.clientHeight}px`;\n pageCustomPadding.value = props.customPadding;\n // only set isAnimationActive to true if its going from two different pages and not from null to the first page\n isAnimationActive.value = oldValue !== undefined;\n\n pageElementObserver = observeSizeOfElement(page.value, () => {\n const pageHeight = `${page.value?.$el?.clientHeight}px`;\n if (pageHeight && pageHeight !== height.value) {\n height.value = pageHeight;\n }\n });\n }\n },\n { immediate: true }\n );\n\n // Disconnect observer on unmounting the page\n onUnmounted(() => {\n pageElementObserver?.disconnect();\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * ModalPage is used to render different pages of the Modal component\n *\n * @example\n * import { BentoModal, BentoModalPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModal, BentoModalPage },\n * template: `\n * <bento-modal active-page='page1' :is-open='true'>\n * <bento-modal-page\n * pageId='page1'\n * actions-label='Move to next page'\n * :actions=\"[\n * {\n * title: 'Next page',\n * event: () => {\n * activePage.value = 'page2';\n * },\n * }]\">\n * Page 1\n * <template #content>\n * Page 1 content\n * </template>\n * </bento-modal-page>\n * <bento-modal-page\n * pageId='page2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Page 2\n * <template #content>\n * Page 2 content\n * </template>\n * </bento-modal-page>\n * </bento-modal>\n * `\n * }\n */\n export default defineComponent({});\n</script>\n\n<style lang=\"scss\" scoped src=\"./modal-page.scss\" />\n","<template>\n <div class=\"b-modal-base\">\n <dialog\n ref=\"modal\"\n :role=\"modalRole\"\n :aria-label=\"computedAriaLabel\"\n :style=\"{ height: height }\"\n class=\"b-modal-base__container\"\n :class=\"modalConditionalClasses\"\n :open=\"initiallyOpen\"\n @animationend=\"closeModalAfterAnimation\"\n @keydown.esc=\"internalModalActionClose\"\n >\n <bento-focus-trap\n v-if=\"isOpen || initiallyOpen\"\n :id=\"modalId\"\n v-bento-click-outside-directive=\"closeModalOnClickOutside\"\n >\n <bento-button\n v-if=\"showCloseButton\"\n class=\"b-modal-base__close-button\"\n variant=\"tertiary\"\n type=\"button\"\n :style=\"customPaddingStyles\"\n @click=\"internalModalActionClose\"\n >\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n <template v-if=\"props.activePage\">\n <slot />\n </template>\n <bento-modal-page\n v-else\n :with-column-layout=\"withColumnLayout\"\n :size=\"size\"\n :custom-padding=\"customPadding\"\n :columns-size=\"columnsSize\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template v-if=\"hasSlot('content-col-1')\" #content-col-1\n ><slot name=\"content-col-1\"></slot\n ></template>\n <template v-if=\"hasSlot('content-col-2')\" #content-col-2\n ><slot name=\"content-col-2\"></slot\n ></template>\n <template v-if=\"hasSlot('content')\" #content><slot name=\"content\"></slot></template>\n <template v-if=\"hasSlot('actions')\" #actions><slot name=\"actions\"></slot></template>\n </bento-modal-page>\n </bento-focus-trap>\n </dialog>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import {\n computed,\n defineComponent,\n onMounted,\n type PropType,\n provide,\n ref,\n toRefs,\n useAttrs,\n useSlots,\n watch,\n } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n type BentoModalConfigData,\n BentoModalRole,\n BentoModalSize,\n } from '@/components/modal/modal.types';\n import { BentoButton, type BentoButtonActionsList } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import { MODAL_DIALOG_ID_INJECTION_KEY } from '@/components/modal/components/base-modal/base-modal.keys';\n import { generateUid } from '@/core/utils/ts';\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives/click-outside';\n import messages from './messages.json';\n\n import { BentoModalPage } from '@/components/modal/components/modal-page';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { MODAL_CONFIG_INJECTION_KEY } from '../../modal.keys';\n import {\n BentoDialogPageAnimation,\n type BentoDialogPageConfigData,\n type BentoDialogPageRegisterPage,\n DIALOG_PAGE_CONFIG_INJECTION_KEY,\n DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,\n } from '@/internal';\n\n type MessageSchema = (typeof messages)['en-US'];\n const LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME = 500;\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const slots = useSlots();\n const attrs = useAttrs();\n const hasSlot = useHasSlot(slots);\n const modal = ref<HTMLDialogElement>(null);\n const isClosing = ref(false);\n const modalId = generateUid('modal');\n\n const emit = defineEmits([\"update:active-page\", \"close-modal\"]);\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * The id of the current active page\n * Should be the same id as the BentoModalPage to be displayed\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n },\n\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: { type: String, default: null },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: { type: Boolean, default: false },\n\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: { type: Boolean, required: true },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: { type: Boolean, default: false },\n\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: { type: Boolean, required: true },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: { type: Boolean, required: true },\n\n /**\n * Defines whether the modal will be an alert modal\n */\n modalRole: { type: String, default: BentoModalRole.DIALOG },\n\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n default: BentoModalSize.SMALL,\n },\n\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: { type: Boolean, default: false },\n });\n\n const showCloseButton = computed(() => props.isDismissible && !props.hideCloseButton);\n\n const pageCustomPadding = ref(props.customPadding);\n\n const customPaddingStyles = computed(() => {\n if (!pageCustomPadding.value) {\n return {};\n }\n\n return { top: pageCustomPadding.value, right: pageCustomPadding.value };\n });\n\n const computedAriaLabel = computed(() => (attrs['aria-label'] as string) ?? (t('ariaLabelFallback') as string));\n const hasColumnLayout = computed(() => props.withColumnLayout && props.size === BentoModalSize.LARGE);\n\n const openModal = (): void => {\n modal.value.showModal();\n };\n\n const emitCloseEvent = (): void => {\n emit('close-modal');\n };\n\n // Handle closing and closing animation for dialog element\n const closeModalAfterAnimation = () => {\n if (isClosing.value && modal.value) {\n modal.value.close();\n if (previousPages.value[0]) {\n emit('update:active-page', previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n emitCloseEvent();\n }\n };\n\n const startCloseModalAnimation = () => {\n if (!modal.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n /**\n * If the user has pressed escape, clicked outside or clicked the close icon.\n * Needs to be called from outside, following the \"dialog.close()\" pattern,\n * when the closing event is triggered outside of the \"base-modal\"\n * component (e.g. from a closing action).\n */\n const internalModalActionClose = (event?: Event) => {\n if (event) {\n event.preventDefault();\n }\n if (!props.isDismissible && props.modalRole === BentoModalRole.DIALOG) {\n return;\n }\n startCloseModalAnimation();\n };\n\n const closeModalOnClickOutside = () => {\n if (props.isDismissible) {\n internalModalActionClose();\n }\n };\n\n const modalConditionalClasses = computed(() => ({\n [`b-modal-base__container--${props.size}`]: props.size,\n 'b-modal-base__container--hide': isClosing.value,\n 'b-modal-base__container--column-layout': hasColumnLayout.value,\n 'b-modal-base__container--animation': isAnimationActive.value,\n }));\n\n watch(\n () => [props.isOpen, modal.value],\n ([newIsOpen, newModalValue], [, oldModalValue]): void => {\n if (!newModalValue) {\n return;\n }\n\n const isFirstMutation = !oldModalValue;\n if (newIsOpen) {\n openModal();\n // add the first page to the array when the modal opens\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (!isFirstMutation) {\n startCloseModalAnimation();\n }\n }\n );\n\n // If the first button is a loading button then close the modal have 0.5 seconds\n // if the state is changed to 'success'.\n watch(\n () => props.actions,\n () => {\n if (props.actions?.[0]?.state === 'success') {\n setTimeout(startCloseModalAnimation, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME);\n }\n },\n { deep: true }\n );\n\n onMounted(() => {\n if (props.isOpen && modal.value) {\n openModal();\n }\n });\n\n /**\n * Expose methods through its 'ref'\n */\n defineExpose({\n internalModalActionClose,\n });\n\n // Let's Children components know they are inside a Modal (dialog element)\n provide(MODAL_DIALOG_ID_INJECTION_KEY, modalId);\n\n // Modal pagination\n const { activePage, isOpen, size } = toRefs(props);\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n\n const pages = ref<Array<string>>([]);\n const previousPages = ref([]);\n\n const updatePage = page => emit('update:active-page', page);\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(pageId => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoDialogPageRegisterPage = pageId => {\n if (pageId) {\n pages.value.push(pageId);\n }\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n const height = ref('');\n const isAnimationActive = ref(false);\n\n provide<BentoModalConfigData>(MODAL_CONFIG_INJECTION_KEY, {\n activePage,\n height,\n isAnimationActive,\n pageCustomPadding,\n showCloseButton,\n size,\n });\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n isOpen,\n pages,\n previousPages,\n updatePage,\n });\n\n provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n</script>\n\n<script lang=\"ts\">\n /**\n * Dialog container. It creates a dialog HTML element for the modal to use.\n *\n * @example\n * import BaseModal from './components/base-modal/base-modal.vue';\n *\n * export default {\n * components: { BaseModal },\n * template: `\n * <base-modal\n * :hide-close-button=\"true\"\n * :is-dismissible=\"false\"\n * :is-open=\"isOpen\"\n * @close-modal=\"isOpen = false\"\n * >\n * <template #content-col-1>\n * // Content on the left side column\n * </template>\n *\n * <template #content-col-2>\n * // Content on the right side column\n * </template>\n *\n * <template v-if=\"actions\" #actions>\n * <footer-actions :actions=\"actions\" />\n * </template>\n * </base-modal>\n * `,\n * setup() {\n * const isOpen = ref(true)\n * const footerActions = [{\n * title: 'Primary action',\n * event: () => { ... }\n * }]\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'base-modal',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./base-modal.scss\" />\n"],"names":["BentoModalVariant","BentoModalVariant2","BentoModalVariantMapping","BentoModalVariantMapping2","BentoModalSize","BentoModalSize2","BentoModalColumnLayoutVariant","BentoModalColumnLayoutVariant2","BentoModalRole","BentoModalRole2","BentoModalDialogType","BentoModalDialogType2","BentoModalEvent","BentoModalEvent2","MODAL_CONFIG_INJECTION_KEY","__default__$1","defineComponent","CLOSE_BUTTON_ICON_WIDTH","slots","useSlots","hasSlot","useHasSlot","page","ref","modalPageConditionalClasses","computed","props","modalContentConditionalClasses","_a","customPaddingStyles","xPadding","content","hasColumnLayout","size","computedColumnWidth","activePage","height","isAnimationActive","pageCustomPadding","showCloseButton","inject","isCurrentPage","pageElementObserver","watch","value","oldValue","nextTick","_b","observeSizeOfElement","pageHeight","onUnmounted","__default__","messages","LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME","t","useI18n","attrs","useAttrs","modal","isClosing","modalId","generateUid","computedAriaLabel","openModal","emitCloseEvent","emit","closeModalAfterAnimation","previousPages","startCloseModalAnimation","internalModalActionClose","event","closeModalOnClickOutside","modalConditionalClasses","newIsOpen","newModalValue","oldModalValue","onMounted","expose","provide","MODAL_DIALOG_ID_INJECTION_KEY","isOpen","toRefs","animation","BentoDialogPageAnimation","pages","updatePage","unregisterPage","pageIdToRemove","pageId","registerPage","DIALOG_PAGE_CONFIG_INJECTION_KEY","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY"],"mappings":";;;;;;;;;;;;;;;;AASO,IAAAA,KAAA,kBAAAC,OACHA,EAAA,UAAA,WACAA,EAAA,SAAA,UAFQA,IAAAD,MAAA,CAAA,CAAA,GAQLE,KAAA,kBAAAC,OACHA,EAAA,UAAA,qBACAA,EAAA,SAAA,oBAFQA,IAAAD,MAAA,CAAA,CAAA,GAQLE,IAAA,kBAAAC,OACHA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA,GASLE,IAAA,kBAAAC,OACHA,EAAA,UAAA,WACAA,EAAA,QAAA,SACAA,EAAA,SAAA,UAHQA,IAAAD,KAAA,CAAA,CAAA,GAMLE,IAAA,kBAAAC,OACHA,EAAA,SAAA,UACAA,EAAA,eAAA,eAFQA,IAAAD,KAAA,CAAA,CAAA,GAQLE,KAAA,kBAAAC,OACHA,EAAA,eAAA,gBACAA,EAAA,cAAA,eACAA,EAAA,OAAA,QACAA,EAAA,kBAAA,mBA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AA,CAAA/D,MAAA2C,EAAA,sBAAA3C,CAAA,GAGAgE,IAAA,CAAAC,MAAA,MAAA;;AACI,MAAAH,EAAA,SAAAxD,IAAAwD,EAAA,UAAA,gBAAAxD,EAAA,OAAA,CAAA4D,MAAAA,MAAAD;AAAA,IAAqE,GAIzEE,IAAA,CAAAD,OACIA,KACIJ,EAAA,MAAA,KAAAI,CAAA,GAGJ,EAAA,gBAAAF,EAAAE,CAAA,EAAA,IAGJpD,IAAAb,EAAA,EAAA,GACAc,IAAAd,EAAA,EAAA;AAEA,WAAAuD,EAAAhE,GAAA;AAAA,MAA0D,YAAAqB;AAAA,MACtD,QAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,MAAAN;AAAA,IACA,CAAA,GAGJ6C,EAAAY,IAAA;AAAA,MAAqE,YAAAvD;AAAA,MACjE,WAAA+C;AAAA,MACA,QAAAF;AAAA,MACA,OAAAI;AAAA,MACA,eAAAjB;AAAA,MACA,YAAAkB;AAAA,IACA,CAAA,GAGJP,EAAAa,IAAAF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"base-modal.C52VMtnd.js","sources":["../../src/components/modal/modal.types.ts","../../src/components/modal/modal.keys.ts","../../src/components/modal/components/modal-page/modal-page.vue","../../src/components/modal/components/base-modal/base-modal.vue"],"sourcesContent":["import { type ComputedRef, type Ref } from 'vue';\n\n/**\n * Public\n */\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalVariant {\n DEFAULT = 'default',\n DIALOG = 'dialog',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalVariantMapping {\n DEFAULT = 'BentoModalDefault',\n DIALOG = 'BentoModalDialog',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalColumnLayoutVariant {\n SMALLER = 'smaller',\n EQUAL = 'equal',\n BIGGER = 'bigger',\n}\n\nexport enum BentoModalRole {\n DIALOG = 'dialog',\n ALERT_DIALOG = 'alertdialog',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalDialogType {\n CONFIRMATION = 'confirmation',\n DESTRUCTIVE = 'destructive',\n INFO = 'info',\n ACKNOWLEDGEMENT = 'acknowledgement',\n}\n\nexport enum BentoModalEvent {\n CLOSE_MODAL = 'close-modal',\n}\n\n/**\n * Private\n */\nexport interface BentoModalConfigData {\n activePage: Ref<string>;\n height: Ref<string>;\n isAnimationActive: Ref<boolean>;\n pageCustomPadding: Ref<string>;\n showCloseButton: ComputedRef<boolean>;\n size: Ref<BentoModalSize | `${BentoModalSize}`>;\n}\n","export const MODAL_CONFIG_INJECTION_KEY = Symbol('modal config data injection key');\n","<template>\n <dialog-page\n ref=\"page\"\n class=\"b-modal-page\"\n :class=\"modalPageConditionalClasses\"\n :page-id=\"pageId\"\n :always-show-border=\"hasColumnLayout\"\n :back-button-styling=\"customPaddingStyles?.backButton\"\n :previous-page=\"previousPage\"\n @animationend=\"isAnimationActive = false\"\n >\n <template v-if=\"hasSlot('default') || showCloseButton\" #header>\n <div class=\"b-modal-page__header-container\" :style=\"customPaddingStyles.header\">\n <div class=\"b-modal-page__header\">\n <bento-typography class=\"b-modal-page__title\" el=\"span\" variant=\"title\" stronger>\n <slot v-if=\"hasSlot('default')\" />\n </bento-typography>\n </div>\n </div>\n </template>\n\n <template #content>\n <div\n class=\"b-modal-page__content\"\n :class=\"modalContentConditionalClasses\"\n :style=\"customPaddingStyles.content\"\n >\n <bento-typography\n v-if=\"hasSlot('content') || (hasSlot('content-col-1') && hasSlot('content-col-2'))\"\n el=\"div\"\n >\n <grid-layout\n v-if=\"hasColumnLayout\"\n :column-width=\"computedColumnWidth\"\n :container-type=\"GridLayoutContainerType.NORMAL\"\n no-gap\n class=\"b-modal-page__grid\"\n >\n <template #col-1><slot name=\"content-col-1\"></slot></template>\n <template #col-2><slot name=\"content-col-2\"></slot></template>\n </grid-layout>\n <slot v-else name=\"content\" />\n </bento-typography>\n </div>\n </template>\n <template v-if=\"hasSlot('actions')\" #footer>\n <div class=\"b-modal-page__actions-container\" :style=\"customPaddingStyles.actions\">\n <div aria-label=\"modal actions\" class=\"b-modal-page__actions\">\n <slot name=\"actions\" />\n </div>\n </div>\n </template>\n <template v-else-if=\"actions && actions.length > 0\" #footer>\n <div class=\"b-modal-page__actions-container\" :style=\"customPaddingStyles.actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </div>\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, inject, nextTick, onUnmounted, ref, useSlots, watch } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n type BentoModalConfigData,\n BentoModalSize,\n } from '@/components/modal/modal.types';\n import { BentoTypography } from '@/components/typography';\n import { GridLayout, GridLayoutContainerType } from '@/internal';\n import { useHasSlot } from '@/composables';\n\n import { FooterActions } from '@/components/internal/footer-actions';\n\n import DialogPage from '@/internal/dialog-page/dialog-page.vue';\n import { MODAL_CONFIG_INJECTION_KEY } from '../../modal.keys';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import type { BentoModalPageProps } from './modal-page.types';\n\n const CLOSE_BUTTON_ICON_WIDTH = 26;\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const page = ref<InstanceType<typeof DialogPage>>(null);\n\n const props = defineProps({\n actions: { default: null },\n actionsLabel: { default: null },\n columnsSize: { default: BentoModalColumnLayoutVariant.SMALLER },\n customPadding: { default: null },\n destructiveActions: { type: Boolean, default: false },\n withColumnLayout: { type: Boolean, default: false },\n pageId: { default: undefined },\n previousPage: { default: undefined }\n});\n\n const modalPageConditionalClasses = computed(() => ({\n 'b-modal-page--custom-padding': props.customPadding,\n }));\n\n const modalContentConditionalClasses = computed(() => ({\n 'b-modal-page__content--with-header': hasSlot('default'),\n 'b-modal-page__content--with-actions': hasSlot('actions') || props.actions?.length,\n }));\n\n // Setting custom padding styles\n const customPaddingStyles = computed(() => {\n if (!props.customPadding) {\n return {};\n }\n\n const xPadding = {\n paddingLeft: props.customPadding,\n paddingRight: props.customPadding,\n };\n\n const content = { ...xPadding, paddingTop: undefined, paddingBottom: undefined };\n\n if (!hasSlot('default')) {\n content.paddingTop = props.customPadding;\n }\n\n if (!hasSlot('actions')) {\n content.paddingBottom = props.customPadding;\n }\n\n return {\n header: {\n ...xPadding,\n paddingTop: props.customPadding,\n paddingRight: `${parseInt(props.customPadding, 10) + CLOSE_BUTTON_ICON_WIDTH}px`,\n flex: 1,\n },\n content,\n actions: { ...xPadding, paddingBottom: props.customPadding },\n backButton: { top: props.customPadding, paddingLeft: props.customPadding },\n };\n });\n\n // Column layout styles\n const hasColumnLayout = computed(() => props.withColumnLayout && size.value === BentoModalSize.LARGE);\n\n const computedColumnWidth = computed(() => {\n if (props.columnsSize === BentoModalColumnLayoutVariant.SMALLER) {\n return [\n { small: 4, medium: 4, large: 4 },\n { small: 8, medium: 8, large: 8 },\n ];\n }\n if (props.columnsSize === BentoModalColumnLayoutVariant.BIGGER) {\n return [\n { small: 8, medium: 8, large: 8 },\n { small: 4, medium: 4, large: 4 },\n ];\n }\n return [\n { small: 6, medium: 6, large: 6 },\n { small: 6, medium: 6, large: 6 },\n ];\n });\n\n // Register page to parent component and inject data from parent component\n const { activePage, height, isAnimationActive, pageCustomPadding, showCloseButton, size } =\n inject<BentoModalConfigData>(MODAL_CONFIG_INJECTION_KEY);\n\n const isCurrentPage = computed(() => activePage.value === props.pageId || !activePage.value);\n\n // Animation\n // Set resize observer on mount of update the height of the dialog on resize\n let pageElementObserver: ResizeObserver | null = null;\n\n // Watching activePage changes to set the height of the page and set isAnimationActive\n watch(\n () => activePage.value,\n async (value, oldValue) => {\n if (isCurrentPage.value) {\n await nextTick();\n height.value = `${page.value?.$el?.clientHeight}px`;\n pageCustomPadding.value = props.customPadding;\n // only set isAnimationActive to true if its going from two different pages and not from null to the first page\n isAnimationActive.value = oldValue !== undefined;\n\n pageElementObserver = observeSizeOfElement(page.value, () => {\n const pageHeight = `${page.value?.$el?.clientHeight}px`;\n if (pageHeight && pageHeight !== height.value) {\n height.value = pageHeight;\n }\n });\n }\n },\n { immediate: true }\n );\n\n // Disconnect observer on unmounting the page\n onUnmounted(() => {\n pageElementObserver?.disconnect();\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * ModalPage is used to render different pages of the Modal component\n *\n * @example\n * import { BentoModal, BentoModalPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModal, BentoModalPage },\n * template: `\n * <bento-modal active-page='page1' :is-open='true'>\n * <bento-modal-page\n * pageId='page1'\n * actions-label='Move to next page'\n * :actions=\"[\n * {\n * title: 'Next page',\n * event: () => {\n * activePage.value = 'page2';\n * },\n * }]\">\n * Page 1\n * <template #content>\n * Page 1 content\n * </template>\n * </bento-modal-page>\n * <bento-modal-page\n * pageId='page2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Page 2\n * <template #content>\n * Page 2 content\n * </template>\n * </bento-modal-page>\n * </bento-modal>\n * `\n * }\n */\n export default defineComponent({});\n</script>\n\n<style lang=\"scss\" scoped src=\"./modal-page.scss\" />\n","<template>\n <div class=\"b-modal-base\">\n <dialog\n ref=\"modal\"\n :role=\"modalRole\"\n :aria-label=\"computedAriaLabel\"\n :style=\"{ height: height }\"\n class=\"b-modal-base__container\"\n :class=\"modalConditionalClasses\"\n :open=\"initiallyOpen\"\n @animationend=\"closeModalAfterAnimation\"\n @keydown.esc=\"internalModalActionClose\"\n >\n <bento-focus-trap\n v-if=\"isOpen || initiallyOpen\"\n :id=\"modalId\"\n v-bento-click-outside-directive=\"closeModalOnClickOutside\"\n >\n <bento-button\n v-if=\"showCloseButton\"\n class=\"b-modal-base__close-button\"\n variant=\"tertiary\"\n type=\"button\"\n :style=\"customPaddingStyles\"\n @click=\"internalModalActionClose\"\n >\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n <template v-if=\"props.activePage\">\n <slot />\n </template>\n <bento-modal-page\n v-else\n :with-column-layout=\"withColumnLayout\"\n :size=\"size\"\n :custom-padding=\"customPadding\"\n :columns-size=\"columnsSize\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template v-if=\"hasSlot('content-col-1')\" #content-col-1\n ><slot name=\"content-col-1\"></slot\n ></template>\n <template v-if=\"hasSlot('content-col-2')\" #content-col-2\n ><slot name=\"content-col-2\"></slot\n ></template>\n <template v-if=\"hasSlot('content')\" #content><slot name=\"content\"></slot></template>\n <template v-if=\"hasSlot('actions')\" #actions><slot name=\"actions\"></slot></template>\n </bento-modal-page>\n </bento-focus-trap>\n </dialog>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import {\n computed,\n defineComponent,\n onMounted,\n type PropType,\n provide,\n ref,\n toRefs,\n useAttrs,\n useSlots,\n watch,\n } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n type BentoModalConfigData,\n BentoModalRole,\n BentoModalSize,\n } from '@/components/modal/modal.types';\n import { BentoButton, type BentoButtonActionsList } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import { MODAL_DIALOG_ID_INJECTION_KEY } from '@/components/modal/components/base-modal/base-modal.keys';\n import { generateUid } from '@/core/utils/ts';\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives/click-outside';\n import messages from './messages.json';\n\n import { BentoModalPage } from '@/components/modal/components/modal-page';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { MODAL_CONFIG_INJECTION_KEY } from '../../modal.keys';\n import {\n BentoDialogPageAnimation,\n type BentoDialogPageConfigData,\n type BentoDialogPageRegisterPage,\n DIALOG_PAGE_CONFIG_INJECTION_KEY,\n DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,\n } from '@/internal';\n\n type MessageSchema = (typeof messages)['en-US'];\n const LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME = 500;\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const slots = useSlots();\n const attrs = useAttrs();\n const hasSlot = useHasSlot(slots);\n const modal = ref<HTMLDialogElement>(null);\n const isClosing = ref(false);\n const modalId = generateUid('modal');\n\n const emit = defineEmits([\"update:active-page\", \"close-modal\"]);\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * The id of the current active page\n * Should be the same id as the BentoModalPage to be displayed\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n },\n\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: { type: String, default: null },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: { type: Boolean, default: false },\n\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: { type: Boolean, required: true },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: { type: Boolean, default: false },\n\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: { type: Boolean, required: true },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: { type: Boolean, required: true },\n\n /**\n * Defines whether the modal will be an alert modal\n */\n modalRole: { type: String, default: BentoModalRole.DIALOG },\n\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n default: BentoModalSize.SMALL,\n },\n\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: { type: Boolean, default: false },\n });\n\n const showCloseButton = computed(() => props.isDismissible && !props.hideCloseButton);\n\n const pageCustomPadding = ref(props.customPadding);\n\n const customPaddingStyles = computed(() => {\n if (!pageCustomPadding.value) {\n return {};\n }\n\n return { top: pageCustomPadding.value, right: pageCustomPadding.value };\n });\n\n const computedAriaLabel = computed(() => (attrs['aria-label'] as string) ?? (t('ariaLabelFallback') as string));\n const hasColumnLayout = computed(() => props.withColumnLayout && props.size === BentoModalSize.LARGE);\n\n const openModal = (): void => {\n modal.value.showModal();\n };\n\n const emitCloseEvent = (): void => {\n emit('close-modal');\n };\n\n // Handle closing and closing animation for dialog element\n const closeModalAfterAnimation = () => {\n if (isClosing.value && modal.value) {\n modal.value.close();\n if (previousPages.value[0]) {\n emit('update:active-page', previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n emitCloseEvent();\n }\n };\n\n const startCloseModalAnimation = () => {\n if (!modal.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n /**\n * If the user has pressed escape, clicked outside or clicked the close icon.\n * Needs to be called from outside, following the \"dialog.close()\" pattern,\n * when the closing event is triggered outside of the \"base-modal\"\n * component (e.g. from a closing action).\n */\n const internalModalActionClose = (event?: Event) => {\n if (event) {\n event.preventDefault();\n }\n if (!props.isDismissible && props.modalRole === BentoModalRole.DIALOG) {\n return;\n }\n startCloseModalAnimation();\n };\n\n const closeModalOnClickOutside = () => {\n if (props.isDismissible) {\n internalModalActionClose();\n }\n };\n\n const modalConditionalClasses = computed(() => ({\n [`b-modal-base__container--${props.size}`]: props.size,\n 'b-modal-base__container--hide': isClosing.value,\n 'b-modal-base__container--column-layout': hasColumnLayout.value,\n 'b-modal-base__container--animation': isAnimationActive.value,\n }));\n\n watch(\n () => [props.isOpen, modal.value],\n ([newIsOpen, newModalValue], [, oldModalValue]): void => {\n if (!newModalValue) {\n return;\n }\n\n const isFirstMutation = !oldModalValue;\n if (newIsOpen) {\n openModal();\n // add the first page to the array when the modal opens\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (!isFirstMutation) {\n startCloseModalAnimation();\n }\n }\n );\n\n // If the first button is a loading button then close the modal have 0.5 seconds\n // if the state is changed to 'success'.\n watch(\n () => props.actions,\n () => {\n if (props.actions?.[0]?.state === 'success') {\n setTimeout(startCloseModalAnimation, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME);\n }\n },\n { deep: true }\n );\n\n onMounted(() => {\n if (props.isOpen && modal.value) {\n openModal();\n }\n });\n\n /**\n * Expose methods through its 'ref'\n */\n defineExpose({\n internalModalActionClose,\n });\n\n // Let's Children components know they are inside a Modal (dialog element)\n provide(MODAL_DIALOG_ID_INJECTION_KEY, modalId);\n\n // Modal pagination\n const { activePage, isOpen, size } = toRefs(props);\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n\n const pages = ref<Array<string>>([]);\n const previousPages = ref([]);\n\n const updatePage = page => emit('update:active-page', page);\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(pageId => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoDialogPageRegisterPage = pageId => {\n if (pageId) {\n pages.value.push(pageId);\n }\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n const height = ref('');\n const isAnimationActive = ref(false);\n\n provide<BentoModalConfigData>(MODAL_CONFIG_INJECTION_KEY, {\n activePage,\n height,\n isAnimationActive,\n pageCustomPadding,\n showCloseButton,\n size,\n });\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n isOpen,\n pages,\n previousPages,\n updatePage,\n });\n\n provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n</script>\n\n<script lang=\"ts\">\n /**\n * Dialog container. It creates a dialog HTML element for the modal to use.\n *\n * @example\n * import BaseModal from './components/base-modal/base-modal.vue';\n *\n * export default {\n * components: { BaseModal },\n * template: `\n * <base-modal\n * :hide-close-button=\"true\"\n * :is-dismissible=\"false\"\n * :is-open=\"isOpen\"\n * @close-modal=\"isOpen = false\"\n * >\n * <template #content-col-1>\n * // Content on the left side column\n * </template>\n *\n * <template #content-col-2>\n * // Content on the right side column\n * </template>\n *\n * <template v-if=\"actions\" #actions>\n * <footer-actions :actions=\"actions\" />\n * </template>\n * </base-modal>\n * `,\n * setup() {\n * const isOpen = ref(true)\n * const footerActions = [{\n * title: 'Primary action',\n * event: () => { ... }\n * }]\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'base-modal',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./base-modal.scss\" />\n"],"names":["BentoModalVariant","BentoModalVariant2","BentoModalVariantMapping","BentoModalVariantMapping2","BentoModalSize","BentoModalSize2","BentoModalColumnLayoutVariant","BentoModalColumnLayoutVariant2","BentoModalRole","BentoModalRole2","BentoModalDialogType","BentoModalDialogType2","BentoModalEvent","BentoModalEvent2","MODAL_CONFIG_INJECTION_KEY","__default__$1","defineComponent","CLOSE_BUTTON_ICON_WIDTH","slots","useSlots","hasSlot","useHasSlot","page","ref","modalPageConditionalClasses","computed","props","modalContentConditionalClasses","_a","customPaddingStyles","xPadding","content","hasColumnLayout","size","computedColumnWidth","activePage","height","isAnimationActive","pageCustomPadding","showCloseButton","inject","isCurrentPage","pageElementObserver","watch","value","oldValue","nextTick","_b","observeSizeOfElement","pageHeight","onUnmounted","__default__","messages","LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME","t","useI18n","attrs","useAttrs","modal","isClosing","modalId","generateUid","computedAriaLabel","openModal","emitCloseEvent","emit","closeModalAfterAnimation","previousPages","startCloseModalAnimation","internalModalActionClose","event","closeModalOnClickOutside","modalConditionalClasses","newIsOpen","newModalValue","oldModalValue","onMounted","expose","provide","MODAL_DIALOG_ID_INJECTION_KEY","isOpen","toRefs","animation","BentoDialogPageAnimation","pages","updatePage","unregisterPage","pageIdToRemove","pageId","registerPage","DIALOG_PAGE_CONFIG_INJECTION_KEY","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY"],"mappings":";;;;;;;;;;;;;;;;AASO,IAAAA,KAAA,kBAAAC,OACHA,EAAA,UAAA,WACAA,EAAA,SAAA,UAFQA,IAAAD,MAAA,CAAA,CAAA,GAQLE,KAAA,kBAAAC,OACHA,EAAA,UAAA,qBACAA,EAAA,SAAA,oBAFQA,IAAAD,MAAA,CAAA,CAAA,GAQLE,IAAA,kBAAAC,OACHA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA,GASLE,IAAA,kBAAAC,OACHA,EAAA,UAAA,WACAA,EAAA,QAAA,SACAA,EAAA,SAAA,UAHQA,IAAAD,KAAA,CAAA,CAAA,GAMLE,IAAA,kBAAAC,OACHA,EAAA,SAAA,UACAA,EAAA,eAAA,eAFQA,IAAAD,KAAA,CAAA,CAAA,GAQLE,KAAA,kBAAAC,OACHA,EAAA,eAAA,gBACAA,EAAA,cAAA,eACAA,EAAA,OAAA,QACAA,EAAA,kBAAA,mBAJQA,IAAAD,MAAA,CAAA,CAAA,GAOLE,KAAA,kBAAAC,O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/D,MAAA2C,EAAA,sBAAA3C,CAAA,GAGAgE,IAAA,CAAAC,MAAA,MAAA;;AACI,MAAAH,EAAA,SAAAxD,IAAAwD,EAAA,UAAA,gBAAAxD,EAAA,OAAA,CAAA4D,MAAAA,MAAAD;AAAA,IAAqE,GAIzEE,IAAA,CAAAD,OACIA,KACIJ,EAAA,MAAA,KAAAI,CAAA,GAGJ,EAAA,gBAAAF,EAAAE,CAAA,EAAA,IAGJpD,IAAAb,EAAA,EAAA,GACAc,IAAAd,EAAA,EAAA;AAEA,WAAAuD,EAAAhE,GAAA;AAAA,MAA0D,YAAAqB;AAAA,MACtD,QAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,MAAAN;AAAA,IACA,CAAA,GAGJ6C,EAAAY,IAAA;AAAA,MAAqE,YAAAvD;AAAA,MACjE,WAAA+C;AAAA,MACA,QAAAF;AAAA,MACA,OAAAI;AAAA,MACA,eAAAjB;AAAA,MACA,YAAAkB;AAAA,IACA,CAAA,GAGJP,EAAAa,IAAAF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { ref as v, watch as A, nextTick as m, defineComponent as w, toRef as b, computed as _, provide as h } from "vue";
2
- import { M as y, d as B, f as C, B as M } from "./button-actions.BLk114As.js";
2
+ import { M as y, d as B, f as C, B as M } from "./button-actions.Bdbu0bvt.js";
3
3
  import { u as T } from "./index.CwzYJHw2.js";
4
4
  import { n as N } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
5
5
  import "../assets/button-actions-with-menu.css";
@@ -82,4 +82,4 @@ const S = g.exports;
82
82
  export {
83
83
  S as B
84
84
  };
85
- //# sourceMappingURL=button-actions-with-menu.Bi_HXopk.js.map
85
+ //# sourceMappingURL=button-actions-with-menu.OsPQ-POD.js.map