@adyen/bento-vue2 1.86.1 → 1.87.1

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 (276) hide show
  1. package/dist/@types/index.d.ts +1271 -1216
  2. package/dist/action-bar.js +1 -1
  3. package/dist/ai-tag.js +1 -1
  4. package/dist/anchor-scroller.js +1 -1
  5. package/dist/assets/accordion-item.css +1 -1
  6. package/dist/assets/action-bar.css +1 -1
  7. package/dist/assets/anchor-scroller.css +1 -1
  8. package/dist/assets/base-modal.css +1 -1
  9. package/dist/assets/button-actions.css +1 -1
  10. package/dist/assets/card.css +1 -1
  11. package/dist/assets/checkbox-group.css +1 -1
  12. package/dist/assets/checkbox.css +1 -1
  13. package/dist/assets/controls-group.css +1 -1
  14. package/dist/assets/data-grid.css +1 -1
  15. package/dist/assets/date-picker.css +1 -1
  16. package/dist/assets/date-range-picker.css +1 -1
  17. package/dist/assets/dialog-page.css +1 -1
  18. package/dist/assets/dropdown-default-textbox.css +1 -1
  19. package/dist/assets/dropdown.css +1 -1
  20. package/dist/assets/error-message.css +1 -1
  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-phone-number.css +1 -1
  25. package/dist/assets/input-field.css +1 -1
  26. package/dist/assets/inspector.css +1 -1
  27. package/dist/assets/modal-fullscreen.css +1 -1
  28. package/dist/assets/pagination.css +1 -1
  29. package/dist/assets/radio-group.css +1 -1
  30. package/dist/assets/rich-text-editor.css +1 -1
  31. package/dist/assets/selection-card-group.css +1 -1
  32. package/dist/assets/sidepanel.css +1 -1
  33. package/dist/assets/textarea.css +1 -1
  34. package/dist/button.js +1 -1
  35. package/dist/card.js +1 -1
  36. package/dist/checkbox.js +2 -2
  37. package/dist/chunks/{action-bar.Dnkt4yn7.js → action-bar.ChMlt59Z.js} +4 -4
  38. package/dist/chunks/{action-bar.Dnkt4yn7.js.map → action-bar.ChMlt59Z.js.map} +1 -1
  39. package/dist/chunks/{ai-tag.s8TECgn_.js → ai-tag.D5fCswAm.js} +2 -2
  40. package/dist/chunks/{ai-tag.s8TECgn_.js.map → ai-tag.D5fCswAm.js.map} +1 -1
  41. package/dist/chunks/anchor-scroller.Cb22EJiL.js +177 -0
  42. package/dist/chunks/{anchor-scroller.3_idPubO.js.map → anchor-scroller.Cb22EJiL.js.map} +1 -1
  43. package/dist/chunks/{base-modal.09nAcnF_.js → base-modal.CUSvvYnk.js} +14 -14
  44. package/dist/chunks/{base-modal.09nAcnF_.js.map → base-modal.CUSvvYnk.js.map} +1 -1
  45. package/dist/chunks/{button-actions-with-menu.C8tSTxrm.js → button-actions-with-menu.D14S1pym.js} +3 -3
  46. package/dist/chunks/{button-actions-with-menu.C8tSTxrm.js.map → button-actions-with-menu.D14S1pym.js.map} +1 -1
  47. package/dist/chunks/{button-actions.VSc47LLH.js → button-actions.DyPS54Yi.js} +134 -132
  48. package/dist/chunks/button-actions.DyPS54Yi.js.map +1 -0
  49. package/dist/chunks/{calendar.DiXkjQDP.js → calendar.BNg7mSj5.js} +398 -407
  50. package/dist/chunks/calendar.BNg7mSj5.js.map +1 -0
  51. package/dist/chunks/{card.BdjdBN36.js → card.9oGLUzev.js} +2 -2
  52. package/dist/chunks/{card.BdjdBN36.js.map → card.9oGLUzev.js.map} +1 -1
  53. package/dist/chunks/{checkbox-group.BOZpz83Y.js → checkbox-group.BtsDJN9I.js} +22 -22
  54. package/dist/chunks/checkbox-group.BtsDJN9I.js.map +1 -0
  55. package/dist/chunks/{checkbox.DoeTl4xh.js → checkbox.Dxvh9si9.js} +34 -37
  56. package/dist/chunks/checkbox.Dxvh9si9.js.map +1 -0
  57. package/dist/chunks/{code-snippet.DBNJgt1j.js → code-snippet.CaAEHdBl.js} +4 -4
  58. package/dist/chunks/{code-snippet.DBNJgt1j.js.map → code-snippet.CaAEHdBl.js.map} +1 -1
  59. package/dist/chunks/constructNow.CIc7d13I.js +8 -0
  60. package/dist/chunks/{constructNow.B8T1ljs6.js.map → constructNow.CIc7d13I.js.map} +1 -1
  61. package/dist/chunks/{controls-group.HUWlAOhG.js → controls-group.BCKGkHVl.js} +23 -28
  62. package/dist/chunks/controls-group.BCKGkHVl.js.map +1 -0
  63. package/dist/chunks/{copy.BXykYfg0.js → copy.DSNuoLZf.js} +3 -3
  64. package/dist/chunks/{copy.BXykYfg0.js.map → copy.DSNuoLZf.js.map} +1 -1
  65. package/dist/chunks/{dashboard-section.Cw2Ima3U.js → dashboard-section.DIesvnBa.js} +3 -3
  66. package/dist/chunks/{dashboard-section.Cw2Ima3U.js.map → dashboard-section.DIesvnBa.js.map} +1 -1
  67. package/dist/chunks/{dashed-underline.Dfw7cJ-9.js → dashed-underline.DauOBhSD.js} +3 -3
  68. package/dist/chunks/{dashed-underline.Dfw7cJ-9.js.map → dashed-underline.DauOBhSD.js.map} +1 -1
  69. package/dist/chunks/{data-grid-template.6LR2Jqka.js → data-grid-template.T-6_zLby.js} +3 -3
  70. package/dist/chunks/{data-grid-template.6LR2Jqka.js.map → data-grid-template.T-6_zLby.js.map} +1 -1
  71. package/dist/chunks/{data-grid.7trhuJ5D.js → data-grid.BvukOpky.js} +697 -697
  72. package/dist/chunks/{data-grid.7trhuJ5D.js.map → data-grid.BvukOpky.js.map} +1 -1
  73. package/dist/chunks/date-picker.BLOqU7Z9.js +173 -0
  74. package/dist/chunks/date-picker.BLOqU7Z9.js.map +1 -0
  75. package/dist/chunks/date-range-picker.BJ-ARlkH.js +880 -0
  76. package/dist/chunks/date-range-picker.BJ-ARlkH.js.map +1 -0
  77. package/dist/chunks/{de.DvtL0g75.js → de.BJvo6njq.js} +2 -2
  78. package/dist/chunks/{de.DvtL0g75.js.map → de.BJvo6njq.js.map} +1 -1
  79. package/dist/chunks/{dialog-page.DA6E6qma.js → dialog-page.4deowaF2.js} +2 -2
  80. package/dist/chunks/{dialog-page.DA6E6qma.js.map → dialog-page.4deowaF2.js.map} +1 -1
  81. package/dist/chunks/{differenceInMonths.BR4Z2HIa.js → differenceInMonths.CIYECBxK.js} +7 -7
  82. package/dist/chunks/{differenceInMonths.BR4Z2HIa.js.map → differenceInMonths.CIYECBxK.js.map} +1 -1
  83. package/dist/chunks/{dropdown-default-textbox.5WjhJWdh.js → dropdown-default-textbox.CKnrDQ2z.js} +18 -16
  84. package/dist/chunks/dropdown-default-textbox.CKnrDQ2z.js.map +1 -0
  85. package/dist/chunks/{dropdown-tag.BnMuMIDk.js → dropdown-tag.DSCZALNp.js} +3 -3
  86. package/dist/chunks/{dropdown-tag.BnMuMIDk.js.map → dropdown-tag.DSCZALNp.js.map} +1 -1
  87. package/dist/chunks/{dropdown.DDPfKc74.js → dropdown.ET_mq1_P.js} +8 -8
  88. package/dist/chunks/{dropdown.DDPfKc74.js.map → dropdown.ET_mq1_P.js.map} +1 -1
  89. package/dist/chunks/{en-GB.DCGuCmAv.js → en-GB.C3-QUpva.js} +2 -2
  90. package/dist/chunks/{en-GB.DCGuCmAv.js.map → en-GB.C3-QUpva.js.map} +1 -1
  91. package/dist/chunks/{en-US.BZii9jNW.js → en-US.YeSsZuOc.js} +150 -100
  92. package/dist/chunks/en-US.YeSsZuOc.js.map +1 -0
  93. package/dist/chunks/{error-message.VenUl2OK.js → error-message.CYfT0Qsi.js} +19 -22
  94. package/dist/chunks/error-message.CYfT0Qsi.js.map +1 -0
  95. package/dist/chunks/{es.bz0mzkMq.js → es.DyUjjSL8.js} +2 -2
  96. package/dist/chunks/{es.bz0mzkMq.js.map → es.DyUjjSL8.js.map} +1 -1
  97. package/dist/chunks/{file-uploader.BU1V40qK.js → file-uploader.BSX-zpyP.js} +377 -353
  98. package/dist/chunks/file-uploader.BSX-zpyP.js.map +1 -0
  99. package/dist/chunks/filter-bar.DrkWf7T6.js +3229 -0
  100. package/dist/chunks/filter-bar.DrkWf7T6.js.map +1 -0
  101. package/dist/chunks/{focus-trap.DMc1wL3A.js → focus-trap.DRqjHzt6.js} +2 -2
  102. package/dist/chunks/{focus-trap.DMc1wL3A.js.map → focus-trap.DRqjHzt6.js.map} +1 -1
  103. package/dist/chunks/{footer-actions.z-api8J_.js → footer-actions.Dq82H1Oc.js} +2 -2
  104. package/dist/chunks/{footer-actions.z-api8J_.js.map → footer-actions.Dq82H1Oc.js.map} +1 -1
  105. package/dist/chunks/form-layout-title.vF9Bmbre.js +212 -0
  106. package/dist/chunks/{form-layout-title.Bbq05nMT.js.map → form-layout-title.vF9Bmbre.js.map} +1 -1
  107. package/dist/chunks/{match.CMBZxEs9.js → fr.JD_4GwS8.js} +98 -61
  108. package/dist/chunks/fr.JD_4GwS8.js.map +1 -0
  109. package/dist/chunks/{header-meta.CuMQSsOm.js → header-meta.ByA0tkZw.js} +88 -94
  110. package/dist/chunks/header-meta.ByA0tkZw.js.map +1 -0
  111. package/dist/chunks/{header-with-views.BcyAUerg.js → header-with-views.DLoIc0yO.js} +9 -9
  112. package/dist/chunks/{header-with-views.BcyAUerg.js.map → header-with-views.DLoIc0yO.js.map} +1 -1
  113. package/dist/chunks/{header.YECm2GAh.js → header.BG6XUNEs.js} +3 -3
  114. package/dist/chunks/{header.YECm2GAh.js.map → header.BG6XUNEs.js.map} +1 -1
  115. package/dist/chunks/{index.BkJqgYF1.js → index.CwzYJHw2.js} +204 -197
  116. package/dist/chunks/{index.BkJqgYF1.js.map → index.CwzYJHw2.js.map} +1 -1
  117. package/dist/chunks/{info-icon.DS9ax8ZD.js → info-icon.BF8KxU-k.js} +3 -3
  118. package/dist/chunks/{info-icon.DS9ax8ZD.js.map → info-icon.BF8KxU-k.js.map} +1 -1
  119. package/dist/chunks/{input-field-password.DrI6eF5u.js → input-field-password.TIzrVzR6.js} +6 -6
  120. package/dist/chunks/{input-field-password.DrI6eF5u.js.map → input-field-password.TIzrVzR6.js.map} +1 -1
  121. package/dist/chunks/{input-field-phone-number.Buh4x3pJ.js → input-field-phone-number.s2fP7BVR.js} +42 -42
  122. package/dist/chunks/{input-field-phone-number.Buh4x3pJ.js.map → input-field-phone-number.s2fP7BVR.js.map} +1 -1
  123. package/dist/chunks/{input-field.NEKXqT4R.js → input-field.CSCJTxk1.js} +10 -10
  124. package/dist/chunks/input-field.CSCJTxk1.js.map +1 -0
  125. package/dist/chunks/{inspector.BomNgVb-.js → inspector.DgI3voTk.js} +3 -3
  126. package/dist/chunks/{inspector.BomNgVb-.js.map → inspector.DgI3voTk.js.map} +1 -1
  127. package/dist/chunks/isSameWeek.CzBCmu7d.js +14 -0
  128. package/dist/chunks/{isSameWeek.DjeUtLwI.js.map → isSameWeek.CzBCmu7d.js.map} +1 -1
  129. package/dist/chunks/{it.DIafuXtH.js → it.BlUnV-yA.js} +3 -3
  130. package/dist/chunks/{it.DIafuXtH.js.map → it.BlUnV-yA.js.map} +1 -1
  131. package/dist/chunks/{ja.Cm9tJMi2.js → ja.nUwDmVf2.js} +8 -8
  132. package/dist/chunks/{ja.Cm9tJMi2.js.map → ja.nUwDmVf2.js.map} +1 -1
  133. package/dist/chunks/{layout-row.BxuMJU4E.js → layout-row.B_IQC9Nq.js} +2 -2
  134. package/dist/chunks/{layout-row.BxuMJU4E.js.map → layout-row.B_IQC9Nq.js.map} +1 -1
  135. package/dist/chunks/{listbox-option-tag.Cv3y0TvQ.js → listbox-option-tag.BhPVuAjJ.js} +2 -2
  136. package/dist/chunks/{listbox-option-tag.Cv3y0TvQ.js.map → listbox-option-tag.BhPVuAjJ.js.map} +1 -1
  137. package/dist/chunks/modal-fullscreen.DJtDO8TR.js +235 -0
  138. package/dist/chunks/modal-fullscreen.DJtDO8TR.js.map +1 -0
  139. package/dist/chunks/{modal.DOR8c0gy.js → modal.BbsIM3qp.js} +4 -4
  140. package/dist/chunks/{modal.DOR8c0gy.js.map → modal.BbsIM3qp.js.map} +1 -1
  141. package/dist/chunks/{pagination.wuEIlDcq.js → pagination.iN0eYByB.js} +157 -138
  142. package/dist/chunks/pagination.iN0eYByB.js.map +1 -0
  143. package/dist/chunks/popover.types.hA13DZPg.js +6 -0
  144. package/dist/chunks/{popover.types.DkiRUQ4Z.js.map → popover.types.hA13DZPg.js.map} +1 -1
  145. package/dist/chunks/{popper-container.D4dworD4.js → popper-container.C_n9Ds1W.js} +2 -2
  146. package/dist/chunks/{popper-container.D4dworD4.js.map → popper-container.C_n9Ds1W.js.map} +1 -1
  147. package/dist/chunks/{promo-banner.bjMDm76T.js → promo-banner.BQreywWK.js} +2 -2
  148. package/dist/chunks/{promo-banner.bjMDm76T.js.map → promo-banner.BQreywWK.js.map} +1 -1
  149. package/dist/chunks/{pt-BR.CiGdfP45.js → pt-BR.BCU2Hj36.js} +2 -2
  150. package/dist/chunks/{pt-BR.CiGdfP45.js.map → pt-BR.BCU2Hj36.js.map} +1 -1
  151. package/dist/chunks/{radio-group.DKRxfGtE.js → radio-group.5ZxqWguJ.js} +6 -6
  152. package/dist/chunks/radio-group.5ZxqWguJ.js.map +1 -0
  153. package/dist/chunks/{rich-text-editor.RHbCDQhe.js → rich-text-editor.BJ-FvvNc.js} +132 -132
  154. package/dist/chunks/{rich-text-editor.RHbCDQhe.js.map → rich-text-editor.BJ-FvvNc.js.map} +1 -1
  155. package/dist/chunks/{search-bar.UVSaoX0h.js → search-bar.GPl6NU_w.js} +3 -3
  156. package/dist/chunks/{search-bar.UVSaoX0h.js.map → search-bar.GPl6NU_w.js.map} +1 -1
  157. package/dist/chunks/{secondary-nav.C6ldQMZ2.js → secondary-nav.DMHDxGDq.js} +3 -3
  158. package/dist/chunks/{secondary-nav.C6ldQMZ2.js.map → secondary-nav.DMHDxGDq.js.map} +1 -1
  159. package/dist/chunks/{segmented-control.BLnuxgnJ.js → segmented-control.BqIiX9hv.js} +2 -2
  160. package/dist/chunks/{segmented-control.BLnuxgnJ.js.map → segmented-control.BqIiX9hv.js.map} +1 -1
  161. package/dist/chunks/{selection-card-group.DdvpTgg4.js → selection-card-group.Hol_gJKN.js} +28 -28
  162. package/dist/chunks/selection-card-group.Hol_gJKN.js.map +1 -0
  163. package/dist/chunks/{sidepanel.BKE87Uef.js → sidepanel.CSA5e8AF.js} +5 -5
  164. package/dist/chunks/{sidepanel.BKE87Uef.js.map → sidepanel.CSA5e8AF.js.map} +1 -1
  165. package/dist/chunks/{startOfWeek.D8Yh4c0G.js → startOfWeek.CXhhX-R7.js} +2 -2
  166. package/dist/chunks/{startOfWeek.D8Yh4c0G.js.map → startOfWeek.CXhhX-R7.js.map} +1 -1
  167. package/dist/chunks/{structured-list-item.DRFRap_S.js → structured-list-item.C7W3zYcT.js} +4 -4
  168. package/dist/chunks/{structured-list-item.DRFRap_S.js.map → structured-list-item.C7W3zYcT.js.map} +1 -1
  169. package/dist/chunks/{summary-grid.types.OldkhD7S.js → summary-grid.types.nrVagy9s.js} +5 -5
  170. package/dist/chunks/{summary-grid.types.OldkhD7S.js.map → summary-grid.types.nrVagy9s.js.map} +1 -1
  171. package/dist/chunks/{tag.Cy3XkSDQ.js → tag.CocLKztJ.js} +2 -2
  172. package/dist/chunks/{tag.Cy3XkSDQ.js.map → tag.CocLKztJ.js.map} +1 -1
  173. package/dist/chunks/{textarea.Bm9MZb_W.js → textarea.CpVhEv6I.js} +33 -33
  174. package/dist/chunks/textarea.CpVhEv6I.js.map +1 -0
  175. package/dist/chunks/{timeline-item.Cpbm8IUw.js → timeline-item.CSDdHboz.js} +52 -54
  176. package/dist/chunks/timeline-item.CSDdHboz.js.map +1 -0
  177. package/dist/chunks/{tooltip.DF11J3k3.js → tooltip.CbsNGnhw.js} +2 -2
  178. package/dist/chunks/{tooltip.DF11J3k3.js.map → tooltip.CbsNGnhw.js.map} +1 -1
  179. package/dist/chunks/{tutorial.D5xtZ1Pt.js → tutorial.3dTfBKtZ.js} +4 -4
  180. package/dist/chunks/{tutorial.D5xtZ1Pt.js.map → tutorial.3dTfBKtZ.js.map} +1 -1
  181. package/dist/chunks/{use-cached-selected-values.wn2xnwYG.js → use-cached-selected-values.DiIjmiF_.js} +2 -2
  182. package/dist/chunks/{use-cached-selected-values.wn2xnwYG.js.map → use-cached-selected-values.DiIjmiF_.js.map} +1 -1
  183. package/dist/chunks/use-date-input-formatter.Dcjry8op.js +1732 -0
  184. package/dist/chunks/use-date-input-formatter.Dcjry8op.js.map +1 -0
  185. package/dist/chunks/{zh-CN.Bw_6j9Cd.js → zh-CN.ChYkuQAR.js} +3 -3
  186. package/dist/chunks/{zh-CN.Bw_6j9Cd.js.map → zh-CN.ChYkuQAR.js.map} +1 -1
  187. package/dist/code-snippet.js +1 -1
  188. package/dist/dashboard-template.js +1 -1
  189. package/dist/dashed-underline.js +1 -1
  190. package/dist/data-grid-template.js +1 -1
  191. package/dist/data-grid.js +1 -1
  192. package/dist/date-picker.js +2 -2
  193. package/dist/date-range-picker.js +2 -2
  194. package/dist/draggable-handle.js +1 -1
  195. package/dist/dropdown.js +4 -4
  196. package/dist/file-uploader.js +1 -1
  197. package/dist/filter-bar.js +1 -1
  198. package/dist/focus-trap.js +1 -1
  199. package/dist/form-layout.js +1 -1
  200. package/dist/header-with-views.js +1 -1
  201. package/dist/header.js +1 -1
  202. package/dist/index.js +50 -50
  203. package/dist/index.js.map +1 -1
  204. package/dist/info-icon.js +1 -1
  205. package/dist/input-field-password.js +1 -1
  206. package/dist/input-field-phone-number.js +1 -1
  207. package/dist/input-field.js +1 -1
  208. package/dist/inspector.js +1 -1
  209. package/dist/internal.js +11 -11
  210. package/dist/layout.js +1 -1
  211. package/dist/menu.js +1 -1
  212. package/dist/modal-fullscreen.js +1 -1
  213. package/dist/modal.js +2 -2
  214. package/dist/pagination.js +1 -1
  215. package/dist/popover.js +2 -2
  216. package/dist/popper-container.js +1 -1
  217. package/dist/promo-banner.js +1 -1
  218. package/dist/radio-group.js +1 -1
  219. package/dist/rich-text-editor.js +1 -1
  220. package/dist/search-bar.js +2 -2
  221. package/dist/secondary-nav.js +1 -1
  222. package/dist/segmented-control.js +1 -1
  223. package/dist/selection-card.js +1 -1
  224. package/dist/sidepanel.js +1 -1
  225. package/dist/structured-list.js +1 -1
  226. package/dist/summary-grid.js +1 -1
  227. package/dist/tag.js +1 -1
  228. package/dist/textarea.js +1 -1
  229. package/dist/timeline.js +1 -1
  230. package/dist/tutorial.js +1 -1
  231. package/dist/web-types.json +104 -5
  232. package/package.json +7 -12
  233. package/dist/chunks/anchor-scroller.3_idPubO.js +0 -178
  234. package/dist/chunks/button-actions.VSc47LLH.js.map +0 -1
  235. package/dist/chunks/calendar.DiXkjQDP.js.map +0 -1
  236. package/dist/chunks/checkbox-group.BOZpz83Y.js.map +0 -1
  237. package/dist/chunks/checkbox.DoeTl4xh.js.map +0 -1
  238. package/dist/chunks/constructNow.B8T1ljs6.js +0 -8
  239. package/dist/chunks/controls-group.HUWlAOhG.js.map +0 -1
  240. package/dist/chunks/date-input.etw_pFpA.js +0 -20
  241. package/dist/chunks/date-input.etw_pFpA.js.map +0 -1
  242. package/dist/chunks/date-picker.CITeN8WH.js +0 -173
  243. package/dist/chunks/date-picker.CITeN8WH.js.map +0 -1
  244. package/dist/chunks/date-range-picker.BhBpy-oH.js +0 -877
  245. package/dist/chunks/date-range-picker.BhBpy-oH.js.map +0 -1
  246. package/dist/chunks/dropdown-default-textbox.5WjhJWdh.js.map +0 -1
  247. package/dist/chunks/en-US.BZii9jNW.js.map +0 -1
  248. package/dist/chunks/error-message.VenUl2OK.js.map +0 -1
  249. package/dist/chunks/file-uploader.BU1V40qK.js.map +0 -1
  250. package/dist/chunks/filter-bar.BUVhS3jE.js +0 -3321
  251. package/dist/chunks/filter-bar.BUVhS3jE.js.map +0 -1
  252. package/dist/chunks/form-layout-title.Bbq05nMT.js +0 -197
  253. package/dist/chunks/fr-CA.B1aPU8fp.js +0 -48
  254. package/dist/chunks/fr-CA.B1aPU8fp.js.map +0 -1
  255. package/dist/chunks/fr.Dj7wEToe.js +0 -47
  256. package/dist/chunks/fr.Dj7wEToe.js.map +0 -1
  257. package/dist/chunks/getTimezoneOffsetInMilliseconds.Tu2wlbTR.js +0 -51
  258. package/dist/chunks/getTimezoneOffsetInMilliseconds.Tu2wlbTR.js.map +0 -1
  259. package/dist/chunks/header-meta.CuMQSsOm.js.map +0 -1
  260. package/dist/chunks/input-field.NEKXqT4R.js.map +0 -1
  261. package/dist/chunks/isSameWeek.DjeUtLwI.js +0 -14
  262. package/dist/chunks/ko.Ceaof6EP.js +0 -348
  263. package/dist/chunks/ko.Ceaof6EP.js.map +0 -1
  264. package/dist/chunks/match.CMBZxEs9.js.map +0 -1
  265. package/dist/chunks/modal-fullscreen.6bAjPENL.js +0 -225
  266. package/dist/chunks/modal-fullscreen.6bAjPENL.js.map +0 -1
  267. package/dist/chunks/nl.B6vCf2B9.js +0 -327
  268. package/dist/chunks/nl.B6vCf2B9.js.map +0 -1
  269. package/dist/chunks/pagination.wuEIlDcq.js.map +0 -1
  270. package/dist/chunks/popover.types.DkiRUQ4Z.js +0 -6
  271. package/dist/chunks/radio-group.DKRxfGtE.js.map +0 -1
  272. package/dist/chunks/selection-card-group.DdvpTgg4.js.map +0 -1
  273. package/dist/chunks/sv.f8EfZjMZ.js +0 -377
  274. package/dist/chunks/sv.f8EfZjMZ.js.map +0 -1
  275. package/dist/chunks/textarea.Bm9MZb_W.js.map +0 -1
  276. package/dist/chunks/timeline-item.Cpbm8IUw.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"layout-row.BxuMJU4E.js","sources":["../../src/components/layout/layout.keys.ts","../../src/components/layout/layout.vue","../../src/components/layout/layout.types.ts","../../src/components/layout/components/layout-row/layout-row.vue"],"sourcesContent":["export const LAYOUT_SIZE_INJECTION_KEY = Symbol('Layout size inject key');\n","<template>\n <component :is=\"wrapperElement\" class=\"b-layout\" :class=\"conditionalClasses\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, provide, toRef } from 'vue';\n import { type BentoLayoutProps } from './layout.types';\n import { LAYOUT_SIZE_INJECTION_KEY } from '@/components/layout/layout.keys';\n\n const props = defineProps({\n variant: { default: 'page' },\n size: { default: 'full-width' }\n});\n\n provide(LAYOUT_SIZE_INJECTION_KEY, toRef(props, 'size'));\n\n const conditionalClasses = computed(() => ({\n 'b-layout--component': props.variant === 'component',\n }));\n\n const wrapperElement = props.variant === 'page' ? 'main' : 'div';\n</script>\n\n<script lang=\"ts\">\n /**\n * Layout is a basic scaffolding of a page that defines spacing, some functionality and responsive behavior of its top level sections.\n *\n * @example\n * import { BentoLayout, BentoLayoutRow } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoLayout, BentoLayoutRow },\n * template: `\n * <bento-layout size=\"narrow\">\n * <bento-layout-row>\n * Row 1\n * </bento-layout-row>\n * <bento-layout-row>\n * Row 2\n * </bento-layout-row>\n * </bento-layout>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./layout.scss\" />\n","/**\n * @private\n */\nexport const BentoLayoutVariantOptions = ['page', 'component'] as const;\nexport const BentoLayoutSizeOptions = ['full-width', 'narrow', 'half-width'] as const;\nexport const BentoLayoutRowColumnLayoutOptions = ['3-9', '9-3', '4-8', '8-4', '6-6'] as const;\n\n// Public\nexport type BentoLayoutVariant = (typeof BentoLayoutVariantOptions)[number];\nexport type BentoLayoutSize = (typeof BentoLayoutSizeOptions)[number];\nexport type BentoLayoutRowColumnLayout = (typeof BentoLayoutRowColumnLayoutOptions)[number];\n\nexport interface BentoLayoutProps {\n /** Defines if the layout is used in a page or only a section */\n variant?: BentoLayoutVariant;\n /** Defines the size of the page */\n size?: BentoLayoutSize;\n}\n\nexport interface BentoLayoutRowProps {\n /** Sets the layout of the columns when multiple columns are used */\n columnsLayout?: BentoLayoutRowColumnLayout;\n}\n","<template>\n <bento-typography el=\"div\" class=\"b-layout-row\" :class=\"conditionalRowClass\">\n <div v-if=\"hasSlot('default')\">\n <slot />\n </div>\n <div v-else-if=\"hasSlot('col-1') && hasSlot('col-2')\" ref=\"row\" :class=\"conditionalRowWithColumnsClass\">\n <div ref=\"col1\" :class=\"conditionalColumnClass.col1\">\n <slot name=\"col-1\"></slot>\n </div>\n <div ref=\"col2\" :class=\"conditionalColumnClass.col2\">\n <slot name=\"col-2\"></slot>\n </div>\n </div>\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, nextTick, onMounted, ref, type Ref, useSlots, watch } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import {\n BentoLayoutRowColumnLayoutOptions,\n type BentoLayoutRowProps,\n type BentoLayoutSize,\n } from '../../layout.types';\n import { useMediaQuery } from '@vueuse/core';\n\n import { LAYOUT_SIZE_INJECTION_KEY } from '@/components/layout/layout.keys';\n\n const props = defineProps({\n columnsLayout: { default: '6-6' }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const size = inject<Ref<BentoLayoutSize>>(LAYOUT_SIZE_INJECTION_KEY, ref('full-width'));\n\n const row = ref<HTMLElement>(null);\n const col1 = ref<HTMLElement>(null);\n const col2 = ref<HTMLElement>(null);\n\n const isFullWidth = computed(() => size.value === 'full-width');\n const isValidColumnLayout = computed(() => BentoLayoutRowColumnLayoutOptions.includes(props.columnsLayout));\n\n const conditionalRowClass = computed(() => `b-layout-row--${size.value}`);\n\n const conditionalRowWithColumnsClass = computed(() => ({\n 'b-layout-row__column-wrapper': isFullWidth.value,\n }));\n\n const conditionalColumnClass = computed(() => {\n const columns = isValidColumnLayout.value ? props.columnsLayout.split('-') : [6, 6];\n const getColumnModifier = index => (isFullWidth.value ? columns[index] : size.value);\n\n return {\n col1: `b-layout-row__column--${getColumnModifier(0)}`,\n col2: `b-layout-row__column--${getColumnModifier(1)}`,\n };\n });\n\n watch(\n useMediaQuery('(min-width: 768px)'),\n async isLargeScreen => {\n await nextTick();\n const areColumnsInTheRightOrder = row.value?.firstChild === col1.value;\n if (isLargeScreen && !areColumnsInTheRightOrder) {\n row.value?.prepend(col1.value);\n } else if (!isLargeScreen && (props.columnsLayout === '3-9' || props.columnsLayout === '4-8')) {\n row.value?.prepend(col2.value);\n }\n },\n { immediate: true }\n );\n\n onMounted(() => {\n if (!isFullWidth.value && (hasSlot('col-1') || hasSlot('col-2'))) {\n throw new Error(\n 'Column slots can only be used with the `full-width` size. Please check documentation for more info.'\n );\n }\n\n if (!isValidColumnLayout.value) {\n throw new Error(\n `${props.columnsLayout} is not a valid column layout. Please refer to the documentation for the list of available column layouts.`\n );\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Page row is subcomponent of Layout meant to be used to generate the row layout.\n *\n * @example\n * import { BentoLayout, BentoLayoutRow } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoLayout, BentoLayoutRow },\n * template: `\n * <bento-layout>\n * <bento-layout-row columns-layout=\"3-9\">\n * <template #col-1>Narrow 3-9</template>\n * <template #col-2>Wide 3-9</template>\n * </bento-layout-row>\n * <bento-layout-row>\n * <template #col-1>6-6</template>\n * <template #col-2>6-6</template>\n * </bento-layout-row>\n * </bento-layout>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./layout-row.scss\" />\n"],"names":["LAYOUT_SIZE_INJECTION_KEY","__default__$1","provide","toRef","props","conditionalClasses","computed","wrapperElement","BentoLayoutRowColumnLayoutOptions","__default__","slots","useSlots","hasSlot","useHasSlot","size","inject","ref","row","col1","col2","isFullWidth","isValidColumnLayout","conditionalRowClass","conditionalRowWithColumnsClass","conditionalColumnClass","columns","getColumnModifier","index","watch","useMediaQuery","isLargeScreen","nextTick","areColumnsInTheRightOrder","_a","_b","_c","onMounted"],"mappings":";;;;;;AAAO,MAAAA,IAAA,uBAAA,wBAAA,GC8CHC,IAAA,CAAA;;;;;;;;;AA9BA,IAAAC,EAAAF,GAAAG,EAAAC,GAAA,MAAA,CAAA;AAEA,UAAAC,IAAAC,EAAA,OAAA;AAAA,MAA2C,uBAAAF,EAAA,YAAA;AAAA,IACE,EAAA,GAG7CG,IAAAH,EAAA,YAAA,SAAA,SAAA;;;;;;;;;;;;;;;qBCjBGI,IAAA,CAAA,OAAA,OAAA,OAAA,OAAA,KAAA,GC2GHC,IAAA,CAAA;;;;;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AAA,UAAU;AAAA,QACN;AAIR,UAAA,CAAAS,EAAA;AACI,cAAA,IAAA;AAAA,UAAU,GAAAjB,EAAA,aAAA;AAAA,QACgB;AAAA,IAE9B,CAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"layout-row.B_IQC9Nq.js","sources":["../../src/components/layout/layout.keys.ts","../../src/components/layout/layout.vue","../../src/components/layout/layout.types.ts","../../src/components/layout/components/layout-row/layout-row.vue"],"sourcesContent":["export const LAYOUT_SIZE_INJECTION_KEY = Symbol('Layout size inject key');\n","<template>\n <component :is=\"wrapperElement\" class=\"b-layout\" :class=\"conditionalClasses\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, provide, toRef } from 'vue';\n import { type BentoLayoutProps } from './layout.types';\n import { LAYOUT_SIZE_INJECTION_KEY } from '@/components/layout/layout.keys';\n\n const props = defineProps({\n variant: { default: 'page' },\n size: { default: 'full-width' }\n});\n\n provide(LAYOUT_SIZE_INJECTION_KEY, toRef(props, 'size'));\n\n const conditionalClasses = computed(() => ({\n 'b-layout--component': props.variant === 'component',\n }));\n\n const wrapperElement = props.variant === 'page' ? 'main' : 'div';\n</script>\n\n<script lang=\"ts\">\n /**\n * Layout is a basic scaffolding of a page that defines spacing, some functionality and responsive behavior of its top level sections.\n *\n * @example\n * import { BentoLayout, BentoLayoutRow } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoLayout, BentoLayoutRow },\n * template: `\n * <bento-layout size=\"narrow\">\n * <bento-layout-row>\n * Row 1\n * </bento-layout-row>\n * <bento-layout-row>\n * Row 2\n * </bento-layout-row>\n * </bento-layout>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./layout.scss\" />\n","/**\n * @private\n */\nexport const BentoLayoutVariantOptions = ['page', 'component'] as const;\nexport const BentoLayoutSizeOptions = ['full-width', 'narrow', 'half-width'] as const;\nexport const BentoLayoutRowColumnLayoutOptions = ['3-9', '9-3', '4-8', '8-4', '6-6'] as const;\n\n// Public\nexport type BentoLayoutVariant = (typeof BentoLayoutVariantOptions)[number];\nexport type BentoLayoutSize = (typeof BentoLayoutSizeOptions)[number];\nexport type BentoLayoutRowColumnLayout = (typeof BentoLayoutRowColumnLayoutOptions)[number];\n\nexport interface BentoLayoutProps {\n /** Defines if the layout is used in a page or only a section */\n variant?: BentoLayoutVariant;\n /** Defines the size of the page */\n size?: BentoLayoutSize;\n}\n\nexport interface BentoLayoutRowProps {\n /** Sets the layout of the columns when multiple columns are used */\n columnsLayout?: BentoLayoutRowColumnLayout;\n}\n","<template>\n <bento-typography el=\"div\" class=\"b-layout-row\" :class=\"conditionalRowClass\">\n <div v-if=\"hasSlot('default')\">\n <slot />\n </div>\n <div v-else-if=\"hasSlot('col-1') && hasSlot('col-2')\" ref=\"row\" :class=\"conditionalRowWithColumnsClass\">\n <div ref=\"col1\" :class=\"conditionalColumnClass.col1\">\n <slot name=\"col-1\"></slot>\n </div>\n <div ref=\"col2\" :class=\"conditionalColumnClass.col2\">\n <slot name=\"col-2\"></slot>\n </div>\n </div>\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, nextTick, onMounted, ref, type Ref, useSlots, watch } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import {\n BentoLayoutRowColumnLayoutOptions,\n type BentoLayoutRowProps,\n type BentoLayoutSize,\n } from '../../layout.types';\n import { useMediaQuery } from '@vueuse/core';\n\n import { LAYOUT_SIZE_INJECTION_KEY } from '@/components/layout/layout.keys';\n\n const props = defineProps({\n columnsLayout: { default: '6-6' }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const size = inject<Ref<BentoLayoutSize>>(LAYOUT_SIZE_INJECTION_KEY, ref('full-width'));\n\n const row = ref<HTMLElement>(null);\n const col1 = ref<HTMLElement>(null);\n const col2 = ref<HTMLElement>(null);\n\n const isFullWidth = computed(() => size.value === 'full-width');\n const isValidColumnLayout = computed(() => BentoLayoutRowColumnLayoutOptions.includes(props.columnsLayout));\n\n const conditionalRowClass = computed(() => `b-layout-row--${size.value}`);\n\n const conditionalRowWithColumnsClass = computed(() => ({\n 'b-layout-row__column-wrapper': isFullWidth.value,\n }));\n\n const conditionalColumnClass = computed(() => {\n const columns = isValidColumnLayout.value ? props.columnsLayout.split('-') : [6, 6];\n const getColumnModifier = index => (isFullWidth.value ? columns[index] : size.value);\n\n return {\n col1: `b-layout-row__column--${getColumnModifier(0)}`,\n col2: `b-layout-row__column--${getColumnModifier(1)}`,\n };\n });\n\n watch(\n useMediaQuery('(min-width: 768px)'),\n async isLargeScreen => {\n await nextTick();\n const areColumnsInTheRightOrder = row.value?.firstChild === col1.value;\n if (isLargeScreen && !areColumnsInTheRightOrder) {\n row.value?.prepend(col1.value);\n } else if (!isLargeScreen && (props.columnsLayout === '3-9' || props.columnsLayout === '4-8')) {\n row.value?.prepend(col2.value);\n }\n },\n { immediate: true }\n );\n\n onMounted(() => {\n if (!isFullWidth.value && (hasSlot('col-1') || hasSlot('col-2'))) {\n throw new Error(\n 'Column slots can only be used with the `full-width` size. Please check documentation for more info.'\n );\n }\n\n if (!isValidColumnLayout.value) {\n throw new Error(\n `${props.columnsLayout} is not a valid column layout. Please refer to the documentation for the list of available column layouts.`\n );\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Page row is subcomponent of Layout meant to be used to generate the row layout.\n *\n * @example\n * import { BentoLayout, BentoLayoutRow } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoLayout, BentoLayoutRow },\n * template: `\n * <bento-layout>\n * <bento-layout-row columns-layout=\"3-9\">\n * <template #col-1>Narrow 3-9</template>\n * <template #col-2>Wide 3-9</template>\n * </bento-layout-row>\n * <bento-layout-row>\n * <template #col-1>6-6</template>\n * <template #col-2>6-6</template>\n * </bento-layout-row>\n * </bento-layout>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./layout-row.scss\" />\n"],"names":["LAYOUT_SIZE_INJECTION_KEY","__default__$1","provide","toRef","props","conditionalClasses","computed","wrapperElement","BentoLayoutRowColumnLayoutOptions","__default__","slots","useSlots","hasSlot","useHasSlot","size","inject","ref","row","col1","col2","isFullWidth","isValidColumnLayout","conditionalRowClass","conditionalRowWithColumnsClass","conditionalColumnClass","columns","getColumnModifier","index","watch","useMediaQuery","isLargeScreen","nextTick","areColumnsInTheRightOrder","_a","_b","_c","onMounted"],"mappings":";;;;;;AAAO,MAAAA,IAAA,uBAAA,wBAAA,GC8CHC,IAAA,CAAA;;;;;;;;;AA9BA,IAAAC,EAAAF,GAAAG,EAAAC,GAAA,MAAA,CAAA;AAEA,UAAAC,IAAAC,EAAA,OAAA;AAAA,MAA2C,uBAAAF,EAAA,YAAA;AAAA,IACE,EAAA,GAG7CG,IAAAH,EAAA,YAAA,SAAA,SAAA;;;;;;;;;;;;;;;qBCjBGI,IAAA,CAAA,OAAA,OAAA,OAAA,OAAA,KAAA,GC2GHC,IAAA,CAAA;;;;;;;iBA/EAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GACAI,IAAAC,EAAAf,GAAAgB,EAAA,YAAA,CAAA,GAEAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAA,IAAA,GACAG,IAAAH,EAAA,IAAA,GAEAI,IAAAd,EAAA,MAAAQ,EAAA,UAAA,YAAA,GACAO,IAAAf,EAAA,MAAAE,EAAA,SAAAJ,EAAA,aAAA,CAAA,GAEAkB,IAAAhB,EAAA,MAAA,iBAAAQ,EAAA,KAAA,EAAA,GAEAS,IAAAjB,EAAA,OAAA;AAAA,MAAuD,gCAAAc,EAAA;AAAA,IACP,EAAA,GAGhDI,IAAAlB,EAAA,MAAA;AACI,YAAAmB,IAAAJ,EAAA,QAAAjB,EAAA,cAAA,MAAA,GAAA,IAAA,CAAA,GAAA,CAAA,GACAsB,IAAA,CAAAC,MAAAP,EAAA,QAAAK,EAAAE,CAAA,IAAAb,EAAA;AAEA,aAAA;AAAA,QAAO,MAAA,yBAAAY,EAAA,CAAA,CAAA;AAAA,QACgD,MAAA,yBAAAA,EAAA,CAAA,CAAA;AAAA,MACA;AAAA,IACvD,CAAA;AAGJ,WAAAE;AAAA,MAAAC,EAAA,oBAAA;AAAA,MACsC,OAAAC,MAAA;;AAE9B,cAAAC,EAAA;AACA,cAAAC,MAAAC,IAAAhB,EAAA,UAAA,gBAAAgB,EAAA,gBAAAf,EAAA;AACA,QAAAY,KAAA,CAAAE,KACIE,IAAAjB,EAAA,UAAA,QAAAiB,EAAA,QAAAhB,EAAA,SAA6B,CAAAY,MAAA1B,EAAA,kBAAA,SAAAA,EAAA,kBAAA,YAE7B+B,IAAAlB,EAAA,UAAA,QAAAkB,EAAA,QAAAhB,EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB,GAGtBiB,EAAA,MAAA;AACI,UAAA,CAAAhB,EAAA,UAAAR,EAAA,OAAA,KAAAA,EAAA,OAAA;AACI,cAAA,IAAA;AAAA,UAAU;AAAA,QACN;AAIR,UAAA,CAAAS,EAAA;AACI,cAAA,IAAA;AAAA,UAAU,GAAAjB,EAAA,aAAA;AAAA,QACgB;AAAA,IAE9B,CAAA;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as n, computed as e } from "vue";
2
- import { B as s } from "./tag.Cy3XkSDQ.js";
2
+ import { B as s } from "./tag.CocLKztJ.js";
3
3
  import { B as r } from "./typography.C8lPlsbD.js";
4
4
  import { n as i } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
5
5
  import "../assets/listbox-option-tag.css";
@@ -41,4 +41,4 @@ const v = m.exports;
41
41
  export {
42
42
  v as L
43
43
  };
44
- //# sourceMappingURL=listbox-option-tag.Cv3y0TvQ.js.map
44
+ //# sourceMappingURL=listbox-option-tag.BhPVuAjJ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"listbox-option-tag.Cv3y0TvQ.js","sources":["../../src/components/internal/listbox/components/listbox-option-tag/listbox-option-tag.vue"],"sourcesContent":["<template>\n <span class=\"b-listbox-tag-option\">\n <span :aria-hidden=\"!!option.label\">\n <bento-tag class=\"b-listbox-tag-option__tag\" :label=\"option.value.toString()\" :variant=\"variant\" />\n </span>\n <bento-typography v-if=\"option.label\" el=\"span\" class=\"b-listbox-tag-option__label\">\n {{ option.label }}\n </bento-typography>\n </span>\n</template>\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import type { BentoListboxOptionItem } from '@/types/listbox';\n import { BentoTag, type BentoTagVariant } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n\n /**\n * A Tag Dropdown option item used in the Dropdown and Filter components.\n */\n export default defineComponent({\n name: 'listbox-tag-option',\n components: {\n BentoTag,\n BentoTypography,\n },\n props: {\n /**\n * The option item that contains all the option item's data.\n * @type {BentoListboxOptionItem}\n */\n option: {\n type: Object as PropType<BentoListboxOptionItem>,\n required: true,\n },\n },\n setup(props) {\n const variant = computed(() => props.option.data as BentoTagVariant);\n\n return {\n // Values\n variant,\n };\n },\n });\n</script>\n<style lang=\"scss\" scoped src=\"./listbox-option-tag.scss\" />\n"],"names":["_sfc_main","defineComponent","BentoTag","BentoTypography","props","computed"],"mappings":";;;;;AAmBA,MAAAA,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,EACA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,QAAA;AAAA,MAKA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,MAAAC,GAAA;AAIA,WAAA;AAAA;AAAA,MAAA,SAFAC,EAAA,MAAAD,EAAA,OAAA,IAAA;AAAA,IAIA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"listbox-option-tag.BhPVuAjJ.js","sources":["../../src/components/internal/listbox/components/listbox-option-tag/listbox-option-tag.vue"],"sourcesContent":["<template>\n <span class=\"b-listbox-tag-option\">\n <span :aria-hidden=\"!!option.label\">\n <bento-tag class=\"b-listbox-tag-option__tag\" :label=\"option.value.toString()\" :variant=\"variant\" />\n </span>\n <bento-typography v-if=\"option.label\" el=\"span\" class=\"b-listbox-tag-option__label\">\n {{ option.label }}\n </bento-typography>\n </span>\n</template>\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import type { BentoListboxOptionItem } from '@/types/listbox';\n import { BentoTag, type BentoTagVariant } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n\n /**\n * A Tag Dropdown option item used in the Dropdown and Filter components.\n */\n export default defineComponent({\n name: 'listbox-tag-option',\n components: {\n BentoTag,\n BentoTypography,\n },\n props: {\n /**\n * The option item that contains all the option item's data.\n * @type {BentoListboxOptionItem}\n */\n option: {\n type: Object as PropType<BentoListboxOptionItem>,\n required: true,\n },\n },\n setup(props) {\n const variant = computed(() => props.option.data as BentoTagVariant);\n\n return {\n // Values\n variant,\n };\n },\n });\n</script>\n<style lang=\"scss\" scoped src=\"./listbox-option-tag.scss\" />\n"],"names":["_sfc_main","defineComponent","BentoTag","BentoTypography","props","computed"],"mappings":";;;;;AAmBA,MAAAA,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,EACA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,QAAA;AAAA,MAKA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,MAAAC,GAAA;AAIA,WAAA;AAAA;AAAA,MAAA,SAFAC,EAAA,MAAAD,EAAA,OAAA,IAAA;AAAA,IAIA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;"}
@@ -0,0 +1,235 @@
1
+ import { defineComponent as x, useSlots as A, inject as S, onMounted as T, useListeners as y, getCurrentInstance as P, toRefs as J, ref as d, computed as U, onUnmounted as K, watch as Y, provide as f } from "vue";
2
+ import "./index.Cl4_42j5.js";
3
+ import { B as j } from "./toast.Wuy6VuOT.js";
4
+ import { B as $ } from "./focus-trap.DRqjHzt6.js";
5
+ import { B as z } from "./button.Ctj3rkxw.js";
6
+ import { B as H } from "./typography.C8lPlsbD.js";
7
+ import { u as N } from "./use-has-slot.C9lQZ6nz.js";
8
+ import { u as q } from "./index.B6WW_F-J.js";
9
+ import { i as F, j as D, B as Q, k as W } from "./button-actions.DyPS54Yi.js";
10
+ import { C as X } from "./cross.CC_B-vG-.js";
11
+ import { b as Z, B as V, D as ee, a as te } from "./dialog-page.4deowaF2.js";
12
+ import { n as k } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
13
+ import { g as O } from "./generate-uid.NJ8tVoha.js";
14
+ import "../assets/modal-fullscreen.css";
15
+ const ae = {
16
+ "en-US": {
17
+ close: "Close"
18
+ },
19
+ "ja-JP": {
20
+ close: "閉じる"
21
+ },
22
+ "pt-BR": {
23
+ close: "Fechar"
24
+ }
25
+ }, se = {
26
+ i18n: { messages: ae }
27
+ }, le = /* @__PURE__ */ x({
28
+ ...se,
29
+ __name: "modal-fullscreen-page",
30
+ props: {
31
+ /**
32
+ * List of actions that will be used to render the buttons.
33
+ * First element in the list will be rendered as "primary".
34
+ * All elements after the first will be rendered as "secondary".
35
+ *
36
+ * Each object in the list should have a `title`, an `event` and
37
+ * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.
38
+ *
39
+ * @see BentoButton for a list of all the other props supported by each button action.
40
+ */
41
+ actions: {
42
+ type: Array,
43
+ default: null
44
+ },
45
+ /**
46
+ * Label shown next to the modal actions
47
+ */
48
+ contextualLabel: {
49
+ type: String,
50
+ default: null
51
+ },
52
+ /**
53
+ * Identifier of the page, used with activePage prop to handle sidepanel navigation
54
+ */
55
+ pageId: {
56
+ type: String,
57
+ default: void 0
58
+ },
59
+ /**
60
+ * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior
61
+ * Used when the back button should not take the user to the natural previous page
62
+ * Set to `null` to hide back button in the page
63
+ */
64
+ previousPage: {
65
+ type: String,
66
+ default: void 0
67
+ },
68
+ /**
69
+ * Title of the modal
70
+ */
71
+ title: {
72
+ type: String,
73
+ default: null
74
+ },
75
+ /**
76
+ * ID to be applied to the title to be used with aria-labelledby
77
+ */
78
+ titleId: {
79
+ type: String,
80
+ default: void 0
81
+ }
82
+ },
83
+ emits: ["close"],
84
+ setup(o, { emit: e }) {
85
+ const a = o, { t } = q(), s = A(), n = N(s), r = S(F, void 0), m = a.titleId ?? r, i = S(D, void 0), p = () => {
86
+ e("close"), i == null || i();
87
+ };
88
+ return T(() => {
89
+ if (a.actions && a.actions.length > 2)
90
+ throw new Error("Not more than 2 action buttons may be provided in Bento Modal Fullscreen");
91
+ }), { __sfc: !0, t, props: a, emit: e, slots: s, hasSlot: n, injectedTitleId: r, computedTitleId: m, closeModal: i, handleClose: p, BentoButton: z, BentoButtonActions: Q, BentoTypography: H, DialogPage: Z, CrossIcon: X };
92
+ }
93
+ });
94
+ var oe = function() {
95
+ var e = this, a = e._self._c, t = e._self._setupProxy;
96
+ return a(t.DialogPage, { staticClass: "b-modal-fullscreen-page", attrs: { "page-id": e.pageId, "previous-page": e.previousPage, "always-show-border": "" }, scopedSlots: e._u([{ key: "header", fn: function() {
97
+ return [a("div", { staticClass: "b-modal-fullscreen-page__header" }, [a("div", { staticClass: "b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--title" }, [e.title ? a(t.BentoTypography, { staticClass: "b-modal-fullscreen-page__title", attrs: { id: t.computedTitleId, el: "h2", variant: "title", title: e.title } }, [e._v(e._s(e.title))]) : e._e()], 1), t.hasSlot("header") ? a("div", { staticClass: "b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--slot" }, [e._t("header")], 2) : e._e(), a("div", { staticClass: "b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--actions" }, [e.contextualLabel ? a(t.BentoTypography, { staticClass: "b-modal-fullscreen-page__contextual-label", attrs: { el: "span", title: e.contextualLabel } }, [e._v(e._s(e.contextualLabel))]) : e._e(), e.actions ? a(t.BentoButtonActions, { staticClass: "b-modal-fullscreen-page__actions", attrs: { actions: e.actions } }) : e._e(), a("div", { staticClass: "b-modal-fullscreen-page__separator" }), a("div", { staticClass: "b-modal-fullscreen-page__close-button" }, [a(t.BentoButton, { attrs: { variant: "tertiary", "aria-label": t.t("close") }, on: { click: t.handleClose }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
98
+ return [a(t.CrossIcon, { attrs: { "aria-hidden": !0 } })];
99
+ }, proxy: !0 }]) })], 1)], 1)])];
100
+ }, proxy: !0 }, { key: "content", fn: function() {
101
+ return [e._t("default")];
102
+ }, proxy: !0 }], null, !0) });
103
+ }, ne = [], re = /* @__PURE__ */ k(
104
+ le,
105
+ oe,
106
+ ne,
107
+ !1,
108
+ null,
109
+ "50f40dc1"
110
+ );
111
+ const ie = re.exports;
112
+ function ue() {
113
+ var e;
114
+ if (!window || !y && !P)
115
+ return {};
116
+ if (y)
117
+ return y();
118
+ const o = P();
119
+ return ((e = o == null ? void 0 : o.proxy) == null ? void 0 : e.$listeners) || {};
120
+ }
121
+ const ce = {}, de = /* @__PURE__ */ x({
122
+ ...ce,
123
+ __name: "modal-fullscreen",
124
+ props: {
125
+ /**
126
+ * List of actions that will be used to render the buttons.
127
+ * First element in the list will be rendered as "primary".
128
+ * All elements after the first will be rendered as "secondary".
129
+ *
130
+ * Each object in the list should have a `title`, an `event` and
131
+ * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.
132
+ *
133
+ * @see BentoButton for a list of all the other props supported by each button action.
134
+ */
135
+ actions: {
136
+ type: Array,
137
+ default: null
138
+ },
139
+ /**
140
+ * The id of the current active page
141
+ * Should be the same as the pageId of the BentoModalFullscreenPage to be displayed
142
+ */
143
+ activePage: {
144
+ type: String,
145
+ default: null
146
+ },
147
+ /**
148
+ * Label shown next to the modal actions
149
+ */
150
+ contextualLabel: {
151
+ type: String,
152
+ default: null
153
+ },
154
+ /**
155
+ * Controls the modal's state from the outside. Set it to true to open the modal
156
+ */
157
+ isOpen: {
158
+ type: Boolean,
159
+ default: null
160
+ },
161
+ /**
162
+ * Title of the modal
163
+ */
164
+ title: {
165
+ type: String,
166
+ default: null
167
+ }
168
+ },
169
+ emits: ["before-close", "update:active-page", "update:is-open"],
170
+ setup(o, { emit: e }) {
171
+ const a = o, { activePage: t, isOpen: s } = J(a), n = d(null), r = d(!1), m = O("modal-fullscreen"), i = O("modal-fullscreen-title"), p = d(!1), g = d(!1), h = ue(), b = A(), M = N(b), R = U(() => ({
172
+ "b-modal-fullscreen--hide": r.value
173
+ })), G = () => {
174
+ r.value && n.value && (n.value.close(), u.value[0] && e("update:active-page", u.value[0]), u.value = [], r.value = !1, p.value = !1, e("update:is-open", !1));
175
+ };
176
+ function C() {
177
+ if (h["before-close"]) {
178
+ e("before-close");
179
+ return;
180
+ }
181
+ v();
182
+ }
183
+ const v = () => {
184
+ !n.value || !n.value.open || (r.value = !0);
185
+ };
186
+ T(() => {
187
+ g.value = !0;
188
+ }), K(() => {
189
+ g.value = !1;
190
+ }), Y(
191
+ [() => s.value, n],
192
+ ([l, c]) => {
193
+ !g.value || !c || (l ? (p.value = !0, c.open || c.showModal(), u.value.length || u.value.push(t.value)) : c.open && v());
194
+ },
195
+ { immediate: !0, flush: "post" }
196
+ ), f(W, m), f(F, i), f(D, C);
197
+ const I = d(V.TRANSITION_LEVEL_DEEPER), _ = d([]), u = d([]), E = (l) => e("update:active-page", l);
198
+ f(ee, {
199
+ activePage: t,
200
+ animation: I,
201
+ isOpen: p,
202
+ pages: _,
203
+ previousPages: u,
204
+ updatePage: E
205
+ });
206
+ const B = (l) => () => {
207
+ var c;
208
+ _.value = (c = _.value) == null ? void 0 : c.filter((w) => w !== l);
209
+ }, L = (l) => (l && _.value.push(l), { unregisterPage: B(l) });
210
+ return f(te, L), { __sfc: !0, props: a, emit: e, activePage: t, isOpen: s, modal: n, isClosing: r, modalFullscreenId: m, titleId: i, internalIsOpen: p, isMounted: g, listeners: h, slots: b, hasSlot: M, conditionalClasses: R, closeModalAfterAnimation: G, closeModal: C, startCloseModalAnimation: v, animation: I, pages: _, previousPages: u, updatePage: E, unregisterPage: B, registerPage: L, BentoToast: j, BentoFocusTrap: $, BentoModalFullscreenPage: ie };
211
+ }
212
+ });
213
+ var pe = function() {
214
+ var e = this, a = e._self._c, t = e._self._setupProxy;
215
+ return a("dialog", { ref: "modal", staticClass: "b-modal-fullscreen", class: t.conditionalClasses, attrs: { id: t.modalFullscreenId, "data-dialog-element": "modal-fullscreen", "aria-labelledby": t.titleId }, on: { animationend: t.closeModalAfterAnimation, keydown: function(s) {
216
+ return !s.type.indexOf("key") && e._k(s.keyCode, "esc", 27, s.key, ["Esc", "Escape"]) ? null : (s.preventDefault(), t.closeModal.apply(null, arguments));
217
+ } } }, [t.internalIsOpen ? a(t.BentoFocusTrap, { staticClass: "b-modal-fullscreen__wrapper" }, [t.props.activePage ? [e._t("default")] : a(t.BentoModalFullscreenPage, { attrs: { actions: e.actions, "contextual-label": e.contextualLabel, title: e.title, "title-id": t.titleId }, on: { close: t.closeModal }, scopedSlots: e._u([t.hasSlot("default") ? { key: "default", fn: function() {
218
+ return [e._t("default")];
219
+ }, proxy: !0 } : null, t.hasSlot("header") ? { key: "header", fn: function() {
220
+ return [e._t("header")];
221
+ }, proxy: !0 } : null], null, !0) })], 2) : e._e(), t.isOpen ? [a(t.BentoToast)] : e._e()], 2);
222
+ }, _e = [], fe = /* @__PURE__ */ k(
223
+ de,
224
+ pe,
225
+ _e,
226
+ !1,
227
+ null,
228
+ "9349b04a"
229
+ );
230
+ const Oe = fe.exports;
231
+ export {
232
+ ie as B,
233
+ Oe as m
234
+ };
235
+ //# sourceMappingURL=modal-fullscreen.DJtDO8TR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal-fullscreen.DJtDO8TR.js","sources":["../../src/components/modal-fullscreen/components/modal-fullscreen-page.vue","../../src/composables/use-listeners/use-listener.ts","../../src/components/modal-fullscreen/modal-fullscreen.vue"],"sourcesContent":["<template>\n <dialog-page class=\"b-modal-fullscreen-page\" :page-id=\"pageId\" :previous-page=\"previousPage\" always-show-border>\n <template #header>\n <div class=\"b-modal-fullscreen-page__header\">\n <div class=\"b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--title\">\n <bento-typography\n v-if=\"title\"\n :id=\"computedTitleId\"\n el=\"h2\"\n variant=\"title\"\n class=\"b-modal-fullscreen-page__title\"\n :title=\"title\"\n >{{ title }}</bento-typography\n >\n </div>\n <div\n v-if=\"hasSlot('header')\"\n class=\"b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--slot\"\n >\n <slot name=\"header\" />\n </div>\n <div class=\"b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--actions\">\n <bento-typography\n v-if=\"contextualLabel\"\n class=\"b-modal-fullscreen-page__contextual-label\"\n el=\"span\"\n :title=\"contextualLabel\"\n >{{ contextualLabel }}</bento-typography\n >\n <bento-button-actions v-if=\"actions\" class=\"b-modal-fullscreen-page__actions\" :actions=\"actions\" />\n\n <div class=\"b-modal-fullscreen-page__separator\"></div>\n <div class=\"b-modal-fullscreen-page__close-button\">\n <bento-button variant=\"tertiary\" :aria-label=\"t('close')\" @click=\"handleClose\">\n <template #iconLeft><cross-icon :aria-hidden=\"true\" /></template>\n </bento-button>\n </div>\n </div>\n </div>\n </template>\n <template #content>\n <slot />\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { inject, onMounted, type PropType, useSlots } from 'vue';\n\n import { BentoButton, BentoButtonActions, type BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { DialogPage } from '@/internal';\n\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import {\n MODAL_FULLSCREEN_CLOSE_INJECTION_KEY,\n MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY,\n } from '@/components/modal-fullscreen/modal-fullscreen.keys';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\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 *\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 * @see BentoButton for a list of all the other props supported by each button action.\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Label shown next to the modal actions\n */\n contextualLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the modal\n */\n title: {\n type: String,\n default: null,\n },\n\n /**\n * ID to be applied to the title to be used with aria-labelledby\n */\n titleId: {\n type: String,\n default: undefined,\n },\n });\n const emit = defineEmits([\"close\"]);\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const injectedTitleId = inject(MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY, undefined);\n const computedTitleId = props.titleId ?? injectedTitleId;\n\n const closeModal = inject(MODAL_FULLSCREEN_CLOSE_INJECTION_KEY, undefined);\n\n const handleClose = () => {\n emit('close');\n closeModal?.();\n };\n\n onMounted(() => {\n if (props.actions && props.actions.length > 2) {\n throw new Error('Not more than 2 action buttons may be provided in Bento Modal Fullscreen');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * ModalFullscreenPage is used to render different pages of ModalFullscreen component\n *\n * @example\n * import { BentoModalFullscreen, BentoModalFullscreenPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModalFullscreen, BentoModalFullscreenPage },\n * template: `\n * <bento-modal-fullscreen active-page='page1' is-open='true'>\n * <bento-modal-fullscreen-page\n * title='Page 1'\n * pageId='page1'\n * contextual-label='Move to next page'\n * :actions=\"[\n * {\n * title: 'Next page',\n * event: () => {\n * activePage.value = 'page2';\n * },\n * }]\">\n * Page 1 info\n * </bento-modal-fullscreen-page>\n * <bento-modal-fullscreen-page\n * title='Page 2'\n * pageId='page2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Page 2 info\n * </bento-modal-fullscreen-page>\n * </bento-modal-fullscreen>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./modal-fullscreen-page.scss\" />\n","import { getCurrentInstance, useListeners as vueUseListeners } from 'vue';\n\n/**\n * A composable that provides access to the Vue2 component's listeners (see Vue3 implementation in packages/vue3/composables).\n * The listeners are kebab-case and the colons are removed (e.g. \"click\", \"update-value\").\n *\n * In environments where the Composition API is not available (e.g. during testing),\n * it falls back to using the component's non-reactive `$listeners` object.\n *\n * @returns The component's listeners.\n */\nexport function useListeners() {\n // Return nothing so tests don't require a mock of this function\n if (!window || (!vueUseListeners && !getCurrentInstance)) {\n return {};\n }\n\n if (vueUseListeners) {\n return vueUseListeners() as any;\n }\n\n const instance = getCurrentInstance();\n return instance?.proxy?.$listeners || {};\n}\n","<template>\n <dialog\n :id=\"modalFullscreenId\"\n ref=\"modal\"\n class=\"b-modal-fullscreen\"\n :class=\"conditionalClasses\"\n data-dialog-element=\"modal-fullscreen\"\n :aria-labelledby=\"titleId\"\n @animationend=\"closeModalAfterAnimation\"\n @keydown.esc.prevent=\"closeModal\"\n >\n <bento-focus-trap v-if=\"internalIsOpen\" class=\"b-modal-fullscreen__wrapper\">\n <template v-if=\"props.activePage\">\n <slot />\n </template>\n <bento-modal-fullscreen-page\n v-else\n :actions=\"actions\"\n :contextual-label=\"contextualLabel\"\n :title=\"title\"\n :title-id=\"titleId\"\n @close=\"closeModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot name=\"default\"></slot>\n </template>\n <template v-if=\"hasSlot('header')\" #header>\n <slot name=\"header\"></slot>\n </template>\n </bento-modal-fullscreen-page>\n </bento-focus-trap>\n\n <!-- Enable the toast inside the fullscreen-modal -->\n <template v-if=\"isOpen\">\n <bento-toast />\n </template>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, onUnmounted, type PropType, provide, ref, toRefs, useSlots, watch } from 'vue';\n import { isVue2 } from 'vue-demi';\n\n import { BentoToast } from '@/components/toast';\n import { type BentoButtonActionsList } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import BentoModalFullscreenPage from './components/modal-fullscreen-page.vue';\n\n import { generateUid } from '@/core/utils/ts';\n import { useHasSlot } from '@/composables';\n import { useListeners } from '@/composables/use-listeners';\n import {\n MODAL_FULLSCREEN_CLOSE_INJECTION_KEY,\n MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY,\n MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY,\n } from '@/components/modal-fullscreen/modal-fullscreen.keys';\n\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 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 *\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 * @see BentoButton for a list of all the other props supported by each button action.\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 as the pageId of the BentoModalFullscreenPage to be displayed\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * Label shown next to the modal actions\n */\n contextualLabel: {\n type: String,\n default: null,\n },\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n /**\n * Title of the modal\n */\n title: {\n type: String,\n default: null,\n },\n });\n\n const emit = defineEmits([\"before-close\", \"update:active-page\", \"update:is-open\"]);\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const modal = ref(null);\n const isClosing = ref(false);\n const modalFullscreenId = generateUid('modal-fullscreen');\n const titleId = generateUid('modal-fullscreen-title');\n const internalIsOpen = ref(false);\n const isMounted = ref(false);\n\n const listeners = useListeners();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-modal-fullscreen--hide': isClosing.value,\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 internalIsOpen.value = false;\n emit('update:is-open', false);\n }\n };\n\n /**\n * Emits the `beforeClose` event, if it is being listened to,\n * before closing the modal and omits the closing animation.\n * The animation will be triggered by the change of the `isOpen` prop instead.\n *\n * If no listener for the `before-close`, then the animation will be triggered,\n * which will close the modal and emit the `update:is-open` event instead, after it was closed.\n */\n function closeModal() {\n /**\n * Vue3 appends the prefix \"on\" and changes to camelCase\n */\n const eventName = isVue2 ? 'before-close' : 'onBeforeClose';\n if (listeners[eventName]) {\n emit('before-close');\n return;\n }\n startCloseModalAnimation();\n }\n\n const startCloseModalAnimation = () => {\n if (!modal.value || !modal.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n onMounted(() => {\n isMounted.value = true;\n });\n\n onUnmounted(() => {\n isMounted.value = false;\n });\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n [() => isOpen.value, modal],\n ([newIsOpen, newModalValue]) => {\n if (!isMounted.value || !newModalValue) {\n return;\n }\n\n if (newIsOpen) {\n internalIsOpen.value = true;\n if (!newModalValue.open) {\n newModalValue.showModal();\n }\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (newModalValue.open) {\n startCloseModalAnimation();\n }\n },\n { immediate: true, flush: 'post' }\n );\n\n // lets children components know they are inside a Modal (dialog element)\n provide(MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY, modalFullscreenId);\n provide(MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY, titleId);\n provide(MODAL_FULLSCREEN_CLOSE_INJECTION_KEY, closeModal);\n\n // Pages\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n const pages = ref<Array<string>>([]);\n const previousPages = ref([]);\n const updatePage = page => emit('update:active-page', page);\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n isOpen: internalIsOpen,\n pages,\n previousPages,\n updatePage,\n });\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 provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n</script>\n\n<script lang=\"ts\">\n /**\n * Fullscreen modal takes full available space (no content underneath is visible) and focuses the user's attention exclusively on one complex task or piece of complex information.\n *\n * @example\n * import { BentoModalFullscreen } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModalFullscreen },\n * template: `\n * <bento-modal-fullscreen\n * :is-open=\"isOpen\"\n * @update:is-open=\"isOpen = $event\"\n * title='Fullscreen modal title'\n * contextual-label='Contextual label'\n * :actions=\"[{ title: 'Action', event: () => {}]\"\n * >\n * <template #header>{{ header slot }}</template>\n * {{ content }}\n * </bento-modal-fullscreen>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./modal-fullscreen.scss\" />\n"],"names":["__default__$1","messages","useI18n","slots","useSlots","hasSlot","useHasSlot","injectedTitleId","inject","MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY","computedTitleId","props","closeModal","MODAL_FULLSCREEN_CLOSE_INJECTION_KEY","handleClose","emit","onMounted","useListeners","useListeners$1","getCurrentInstance","instance","_a","__default__","activePage","isOpen","toRefs","modal","ref","isClosing","modalFullscreenId","generateUid","titleId","internalIsOpen","isMounted","listeners","conditionalClasses","computed","closeModalAfterAnimation","previousPages","startCloseModalAnimation","onUnmounted","watch","newIsOpen","newModalValue","provide","MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY","animation","BentoDialogPageAnimation","pages","updatePage","page","DIALOG_PAGE_CONFIG_INJECTION_KEY","unregisterPage","pageIdToRemove","pageId","registerPage","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;GAuLIA,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,GAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAzHA,EAAA,EAAA,IAAAC,EAAA,GA6DAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAAC,GAAA,MAAA,GACAC,IAAAC,EAAA,WAAAJ,GAEAK,IAAAJ,EAAAK,GAAA,MAAA,GAEAC,IAAA,MAAA;AACI,MAAAC,EAAA,OAAA,GACAH,KAAA,QAAAA;AAAA,IAAa;AAGjB,WAAAI,EAAA,MAAA;AACI,UAAAL,EAAA,WAAAA,EAAA,QAAA,SAAA;AACI,cAAA,IAAA,MAAA,0EAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;;;;;;;AClID,SAAAM,KAAA;;AAEH,MAAA,CAAA,UAAA,CAAAC,KAAA,CAAAC;AACI,WAAA,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AjB,EAAA,OAAAE,CAAA;AAAA,MAC8B,CAAA,CAAAgB,GAAAC,CAAA,MAAA;AAEtB,QAAA,CAAAV,EAAA,SAAA,CAAAU,MAIAD,KACIV,EAAA,QAAA,IACAW,EAAA,QACIA,EAAA,UAAA,GAEJL,EAAA,MAAA,UACIA,EAAA,MAAA,KAAAf,EAAA,KAAA,KACJoB,EAAA,QAEAJ,EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,IAAA,OAAA,OAAA;AAAA,IACiC,GAIrCK,EAAAC,GAAAhB,CAAA,GACAe,EAAAnC,GAAAsB,CAAA,GACAa,EAAA/B,GAAAD,CAAA;AAGA,UAAAkC,IAAAnB,EAAAoB,EAAA,uBAAA,GACAC,IAAArB,EAAA,CAAA,CAAA,GACAW,IAAAX,EAAA,CAAA,CAAA,GACAsB,IAAA,CAAAC,MAAAnC,EAAA,sBAAAmC,CAAA;AAEA,IAAAN,EAAAO,IAAA;AAAA,MAAqE,YAAA5B;AAAA,MACjE,WAAAuB;AAAA,MACA,QAAAd;AAAA,MACQ,OAAAgB;AAAA,MACR,eAAAV;AAAA,MACA,YAAAW;AAAA,IACA,CAAA;AAIJ,UAAAG,IAAA,CAAAC,MAAA,MAAA;;AACI,MAAAL,EAAA,SAAA3B,IAAA2B,EAAA,UAAA,gBAAA3B,EAAA,OAAA,CAAAiC,MAAAA,MAAAD;AAAA,IAAqE,GAIzEE,IAAA,CAAAD,OACIA,KACIN,EAAA,MAAA,KAAAM,CAAA,GAGJ,EAAA,gBAAAF,EAAAE,CAAA,EAAA;AAGJ,WAAAV,EAAAY,IAAAD,CAAA;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as p, useSlots as B, onMounted as A, toRefs as E, ref as L, computed as f, useAttrs as P, watch as k } from "vue";
2
- import { B as g, h as O, a as d, d as x, e as C, g as v, f as T } from "./base-modal.09nAcnF_.js";
2
+ import { B as g, h as O, a as d, d as x, e as C, g as v, f as T } from "./base-modal.CUSvvYnk.js";
3
3
  import { u as b } from "./use-has-slot.C9lQZ6nz.js";
4
- import { F as R } from "./footer-actions.z-api8J_.js";
4
+ import { F as R } from "./footer-actions.Dq82H1Oc.js";
5
5
  import { n as S } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
6
6
  import { b as M } from "./button.Ctj3rkxw.js";
7
7
  import { u as z } from "./index.B6WW_F-J.js";
8
- import { B as N } from "./button-actions.VSc47LLH.js";
8
+ import { B as N } from "./button-actions.DyPS54Yi.js";
9
9
  import { d as $ } from "./typography.C8lPlsbD.js";
10
10
  const F = p({
11
11
  name: "bento-modal-default"
@@ -442,4 +442,4 @@ const pt = ot.exports;
442
442
  export {
443
443
  pt as B
444
444
  };
445
- //# sourceMappingURL=modal.DOR8c0gy.js.map
445
+ //# sourceMappingURL=modal.BbsIM3qp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal.DOR8c0gy.js","sources":["../../src/components/modal/components/modal-default/modal-default.vue","../../src/components/modal/components/modal-dialog/modal-dialog.vue","../../src/components/modal/modal.vue"],"sourcesContent":["<template>\n <base-modal\n class=\"b-modal-default\"\n v-bind=\"$attrs\"\n :actions=\"actions\"\n :active-page=\"activePage\"\n :size=\"size\"\n :hide-close-button=\"hideCloseButton\"\n :columns-size=\"columnsSize\"\n :custom-padding=\"customPadding\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :with-column-layout=\"withColumnLayout\"\n :initially-open=\"initiallyOpen\"\n @update:active-page=\"emit('update:active-page', $event)\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template v-if=\"hasSlot('content-col-1')\" #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template v-if=\"hasSlot('content-col-2')\" #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template v-if=\"hasSlot('content')\" #content><slot name=\"content\"></slot></template>\n\n <template v-if=\"actions && actions.length > 0\" #actions>\n <slot name=\"actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </slot>\n </template>\n </base-modal>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, onMounted, type PropType, useSlots } from 'vue';\n import { BentoModalColumnLayoutVariant, type BentoModalSize } from '@/components/modal/modal.types';\n import { useHasSlot } from '@/composables';\n import { type BentoButtonActionsList } from '@/components/button';\n import { FooterActions } from '@/components/internal/footer-actions';\n import BaseModal from '@/components/modal/components/base-modal/base-modal.vue';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\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 * Text label that is displayed left to the action buttons\n */\n actionsLabel: { type: String, default: null },\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 provided, manages the padding of the whole modal container\n */\n customPadding: { type: String, default: null },\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 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, default: false },\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 * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n required: true,\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 onCloseModal = () => {\n emit('close-modal');\n };\n\n onMounted(() => {\n if (!(hasSlot('content') || (hasSlot('content-col-1') && hasSlot('content-col-2'))) && !props.activePage) {\n throw new Error('Bento Modal default variant requires content slot or column slots');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Creates a Modal based off the `base-modal` component.\n * It allows two column modals as well as content modals.\n *\n * @example\n * import { BentoModalDefault } from '@/components/modal/components';\n *\n * export default {\n * components: { BentoModalDefault },\n * template: `\n * <bento-modal-default\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 * </bento-modal-default>\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 name: 'bento-modal-default',\n });\n</script>\n","<template>\n <base-modal\n ref=\"modalRef\"\n class=\"b-modal-dialog\"\n :actions=\"actions\"\n :active-page=\"activePage\"\n :class=\"modalDialogConditionalClasses\"\n :hide-close-button=\"true\"\n size=\"small\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :modal-role=\"BentoModalRole.ALERT_DIALOG\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"$attrs\"\n @close-modal=\"onCloseModal\"\n >\n <template #default>\n <slot></slot>\n </template>\n <template #content>\n {{ content }}\n </template>\n\n <template #actions>\n <bento-button-actions\n v-if=\"dialogType === 'acknowledgement'\"\n :actions=\"acknowledgementDialogActions\"\n layout=\"buttons-end\"\n />\n\n <bento-button-actions v-else :actions=\"dialogActions\" layout=\"buttons-end\" />\n </template>\n </base-modal>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, onMounted, type PropType, type Ref, ref, toRefs, useSlots } from 'vue';\n import { BentoModalDialogType, BentoModalRole } from '@/components/modal/modal.types';\n import { useHasSlot } from '@/composables';\n import {\n type BentoButtonActionObject,\n BentoButtonActions,\n type BentoButtonActionsList,\n BentoButtonVariant,\n } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import BaseModal from '@/components/modal/components/base-modal/base-modal.vue';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const emit = defineEmits([\"close-modal\"]);\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * Only 1 action button is allowed for Modal Dialog\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 * ```\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 * Text that is displayed in the content section of modal\n */\n content: { type: String, required: true },\n\n /**\n * Sets different action buttons styling and appearance\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n required: true,\n },\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 const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { actions, dialogType } = toRefs(props);\n const modalRef: Ref<InstanceType<typeof BaseModal>> = ref(null);\n\n const onCloseModal = () => {\n emit('close-modal');\n };\n\n const onCloseActionButton = (event: Event) => {\n // Calls \"base-modal\" internal function to initialize the\n // \"close\" animation and trigger the \"close\" event.\n // This follows the same \"dialog\" pattern of calling \"dialog.close()\"\n modalRef.value.internalModalActionClose(event);\n };\n\n const acknowledgementDialogActions = computed(() => [\n {\n title: t('ok') as string,\n event: onCloseActionButton,\n variant: BentoButtonVariant.SECONDARY,\n },\n ]);\n\n const dialogActions = computed(() => {\n const mandatoryCancelActionButton: BentoButtonActionObject = {\n title: 'Cancel',\n event: onCloseActionButton,\n };\n const updatedPassedActionsObject: BentoButtonActionObject = actions?.value?.[0];\n\n if (dialogType.value === BentoModalDialogType.DESTRUCTIVE) {\n updatedPassedActionsObject.critical = true;\n } else if (dialogType.value === BentoModalDialogType.INFO) {\n updatedPassedActionsObject.variant = BentoButtonVariant.SECONDARY;\n }\n\n return [updatedPassedActionsObject, mandatoryCancelActionButton];\n });\n\n const modalDialogConditionalClasses = computed(() => ({\n [`b-modal-dialog--${dialogType.value}`]: dialogType.value,\n }));\n\n onMounted(() => {\n if (props.activePage) {\n throw new Error(\n 'Bento Modal Dialog cannot contain multiple pages. Use Bento Modal default variant instead.'\n );\n }\n\n if (!hasSlot('default') || (!props.content && !hasSlot('content'))) {\n throw new Error('Bento Modal Dialog requires header title and content');\n }\n\n if (actions?.value?.length > 1) {\n throw new Error('Not more than 1 action button may be provided to Modal Dialog');\n }\n\n if (dialogType.value !== BentoModalDialogType.ACKNOWLEDGEMENT && !actions?.value) {\n throw new Error('Modal Dialog, except ACKNOWLEDGEMENT type, always has to contain one action button');\n }\n\n if (dialogType.value === BentoModalDialogType.ACKNOWLEDGEMENT && actions?.value?.length) {\n throw new Error('Acknowledgement Modal Dialog does not accept action buttons');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Creates a \"dialog\" type of modal.\n * These are are modals that require a deliberate user action or acknowledgement\n * (confirmations or destructive actions).\n *\n * It’s not customizable and consists of title, description label and one action.\n *\n * @example\n * import { BentoModalDialog } from '@/components/modal/components';\n *\n * export default {\n * components: { BentoModalDialog },\n * template: `\n * <bento-modal-dialog\n * dialog-type=\"destructive\"\n * :is-dismissible=\"false\"\n * :is-open=\"isOpen\"\n * @close-modal=\"isOpen = false\"\n * >\n * Dialog content\n * </bento-modal-dialog>\n * `,\n * setup() {\n * const isOpen = ref(true)\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-modal-dialog',\n });\n</script>\n","<template>\n <component\n :is=\"computedVariant\"\n class=\"b-modal\"\n :is-open=\"isOpen\"\n :actions=\"actions\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"customProps\"\n @close-modal=\"onCloseModal\"\n @update:active-page=\"emit('update:active-page', $event)\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template v-if=\"hasSlot('content-col-1')\" #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template v-if=\"hasSlot('content-col-2')\" #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template v-if=\"hasSlot('content')\" #content><slot name=\"content\"></slot></template>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType, useAttrs, useSlots, watch } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n BentoModalDialogType,\n BentoModalSize,\n BentoModalVariant,\n BentoModalVariantMapping,\n } from './modal.types';\n import { BentoModalDefault, BentoModalDialog } from '@/components/modal/components';\n import { useHasSlot } from '@/composables';\n import { type BentoButtonActionsList } from '@/components/button';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME = 500;\n\n type BentoModalVariantProp = BentoModalVariant | `${BentoModalVariant}` | `${BentoModalVariantMapping}`;\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const attrs = useAttrs();\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 *\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 * Text label that is displayed left to the action buttons\n */\n actionsLabel: { type: String, default: null },\n\n /**\n * Text that will be displayed in the content section of Modal\n */\n content: { type: String, default: null },\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 | `${BentoModalColumnLayoutVariant}`>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n validator: (value: BentoModalColumnLayoutVariant) =>\n Object.values(BentoModalColumnLayoutVariant).includes(value),\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 * Changes the visual styling of action buttons\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n default: BentoModalDialogType.CONFIRMATION,\n validator: (value: BentoModalDialogType) => Object.values(BentoModalDialogType).includes(value),\n },\n\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: { type: Boolean, default: false },\n\n /**\n * If set to true, it allows the modal to be closed without performing an action\n */\n isDismissible: { type: Boolean, default: null },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n default: false,\n },\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 * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n default: BentoModalSize.SMALL,\n validator: (value: BentoModalSize) => Object.values(BentoModalSize).includes(value),\n },\n\n /**\n * Choose between default or dialog versions of modal\n */\n variant: {\n type: String as PropType<BentoModalVariantProp>,\n default: 'default',\n validator: (value: BentoModalVariantProp) =>\n Object.values<BentoModalVariantProp>(BentoModalVariant).includes(value) ||\n Object.values<BentoModalVariantProp>(BentoModalVariantMapping).includes(value),\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 computedVariant = computed(() => {\n if (Object.values<BentoModalVariantProp>(BentoModalVariantMapping).includes(props.variant)) {\n return props.variant;\n }\n return BentoModalVariantMapping[props.variant.toUpperCase()];\n });\n\n const customProps = computed(() =>\n computedVariant.value === BentoModalVariantMapping.DEFAULT\n ? {\n activePage: props.activePage,\n hideCloseButton: props.hideCloseButton,\n size: props.size,\n customPadding: props.customPadding,\n actionsLabel: props.actionsLabel,\n destructiveActions: props.destructiveActions,\n isDismissible: props.isDismissible ?? true,\n withColumnLayout: props.withColumnLayout,\n columnsSize: props.columnsSize,\n ...attrs,\n }\n : {\n activePage: props.activePage,\n dialogType: props.dialogType,\n content: props.content,\n isDismissible: props.isDismissible ?? false,\n ...attrs,\n }\n );\n\n const onCloseModal = () => {\n emit('close-modal');\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(onCloseModal, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME);\n }\n }\n );\n\n if (Object.keys(attrs).includes('overflow-visible')) {\n deprecate(\n 'BentoModal \"overflow-visible\" property',\n `\"overflow-visible\" property was made redundant. BentoModal can work correctly without the need to pass the propery.\n Remove the \"overflow-visible\" prop from BentoModal to remove this error.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Modal is a window that appear over any other page content\n * and focus user attention exclusively on one task or piece of\n * information at the moment.\n *\n * @example\n * import { BentoModal } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModal },\n * template: `\n * <bento-modal :isOpen=\"true\">\n * Title of the Modal\n * <template #content>\n * Mandatory content slot\n * </template>\n * </bento-modal>\n * `\n * };\n */\n export default defineComponent({\n components: { BentoModalDefault, BentoModalDialog },\n });\n</script>\n"],"names":["__default__","defineComponent","slots","useSlots","hasSlot","useHasSlot","onCloseModal","emit","onMounted","props","messages","t","useI18n","actions","dialogType","toRefs","modalRef","ref","onCloseActionButton","event","acknowledgementDialogActions","computed","BentoButtonVariant","dialogActions","mandatoryCancelActionButton","updatedPassedActionsObject","_a","BentoModalDialogType","modalDialogConditionalClasses","_b","BentoModalDefault","BentoModalDialog","LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME","attrs","useAttrs","computedVariant","BentoModalVariantMapping","customProps","watch","deprecate"],"mappings":";;;;;;;;;AAqMI,MAAAA,IAAeC,EAAgB;AA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EA,EAAM,UAEV2B,EAAyB3B,EAAM,QAAQ,YAAA,CAAa,CAC9D,GAEK4B,IAAchB;AAAA,MAAS,MACzBc,EAAgB,UAAUC,EAAyB,UAC7C;AAAA,QACI,YAAY3B,EAAM;AAAA,QAClB,iBAAiBA,EAAM;AAAA,QACvB,MAAMA,EAAM;AAAA,QACZ,eAAeA,EAAM;AAAA,QACrB,cAAcA,EAAM;AAAA,QACpB,oBAAoBA,EAAM;AAAA,QAC1B,eAAeA,EAAM,iBAAiB;AAAA,QACtC,kBAAkBA,EAAM;AAAA,QACxB,aAAaA,EAAM;AAAA,QACnB,GAAGwB;AAAA,MAAA,IAEP;AAAA,QACI,YAAYxB,EAAM;AAAA,QAClB,YAAYA,EAAM;AAAA,QAClB,SAASA,EAAM;AAAA,QACf,eAAeA,EAAM,iBAAiB;AAAA,QACtC,GAAGwB;AAAA,MAAA;AAAA,IACP,GAGJ3B,IAAe,MAAM;AACvB,MAAAC,EAAK,aAAa;AAAA,IACtB;AAIA,WAAA+B;AAAA,MACI,MAAM7B,EAAM;AAAA,MACZ,MAAM;;AACF,UAAIoB,KAAAH,IAAAjB,EAAM,YAAN,gBAAAiB,EAAgB,OAAhB,gBAAAG,EAAoB,WAAU,aAC9B,WAAWvB,GAAc0B,CAA0C;AAAA,MAE3E;AAAA,IAAA,GAGA,OAAO,KAAKC,CAAK,EAAE,SAAS,kBAAkB,KAC9CM;AAAA,MACI;AAAA,MACA;AAAA;AAAA,MAEA;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"modal.BbsIM3qp.js","sources":["../../src/components/modal/components/modal-default/modal-default.vue","../../src/components/modal/components/modal-dialog/modal-dialog.vue","../../src/components/modal/modal.vue"],"sourcesContent":["<template>\n <base-modal\n class=\"b-modal-default\"\n v-bind=\"$attrs\"\n :actions=\"actions\"\n :active-page=\"activePage\"\n :size=\"size\"\n :hide-close-button=\"hideCloseButton\"\n :columns-size=\"columnsSize\"\n :custom-padding=\"customPadding\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :with-column-layout=\"withColumnLayout\"\n :initially-open=\"initiallyOpen\"\n @update:active-page=\"emit('update:active-page', $event)\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template v-if=\"hasSlot('content-col-1')\" #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template v-if=\"hasSlot('content-col-2')\" #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template v-if=\"hasSlot('content')\" #content><slot name=\"content\"></slot></template>\n\n <template v-if=\"actions && actions.length > 0\" #actions>\n <slot name=\"actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </slot>\n </template>\n </base-modal>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, onMounted, type PropType, useSlots } from 'vue';\n import { BentoModalColumnLayoutVariant, type BentoModalSize } from '@/components/modal/modal.types';\n import { useHasSlot } from '@/composables';\n import { type BentoButtonActionsList } from '@/components/button';\n import { FooterActions } from '@/components/internal/footer-actions';\n import BaseModal from '@/components/modal/components/base-modal/base-modal.vue';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\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 * Text label that is displayed left to the action buttons\n */\n actionsLabel: { type: String, default: null },\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 provided, manages the padding of the whole modal container\n */\n customPadding: { type: String, default: null },\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 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, default: false },\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 * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n required: true,\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 onCloseModal = () => {\n emit('close-modal');\n };\n\n onMounted(() => {\n if (!(hasSlot('content') || (hasSlot('content-col-1') && hasSlot('content-col-2'))) && !props.activePage) {\n throw new Error('Bento Modal default variant requires content slot or column slots');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Creates a Modal based off the `base-modal` component.\n * It allows two column modals as well as content modals.\n *\n * @example\n * import { BentoModalDefault } from '@/components/modal/components';\n *\n * export default {\n * components: { BentoModalDefault },\n * template: `\n * <bento-modal-default\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 * </bento-modal-default>\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 name: 'bento-modal-default',\n });\n</script>\n","<template>\n <base-modal\n ref=\"modalRef\"\n class=\"b-modal-dialog\"\n :actions=\"actions\"\n :active-page=\"activePage\"\n :class=\"modalDialogConditionalClasses\"\n :hide-close-button=\"true\"\n size=\"small\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :modal-role=\"BentoModalRole.ALERT_DIALOG\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"$attrs\"\n @close-modal=\"onCloseModal\"\n >\n <template #default>\n <slot></slot>\n </template>\n <template #content>\n {{ content }}\n </template>\n\n <template #actions>\n <bento-button-actions\n v-if=\"dialogType === 'acknowledgement'\"\n :actions=\"acknowledgementDialogActions\"\n layout=\"buttons-end\"\n />\n\n <bento-button-actions v-else :actions=\"dialogActions\" layout=\"buttons-end\" />\n </template>\n </base-modal>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, onMounted, type PropType, type Ref, ref, toRefs, useSlots } from 'vue';\n import { BentoModalDialogType, BentoModalRole } from '@/components/modal/modal.types';\n import { useHasSlot } from '@/composables';\n import {\n type BentoButtonActionObject,\n BentoButtonActions,\n type BentoButtonActionsList,\n BentoButtonVariant,\n } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import BaseModal from '@/components/modal/components/base-modal/base-modal.vue';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const emit = defineEmits([\"close-modal\"]);\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * Only 1 action button is allowed for Modal Dialog\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 * ```\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 * Text that is displayed in the content section of modal\n */\n content: { type: String, required: true },\n\n /**\n * Sets different action buttons styling and appearance\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n required: true,\n },\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 const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { actions, dialogType } = toRefs(props);\n const modalRef: Ref<InstanceType<typeof BaseModal>> = ref(null);\n\n const onCloseModal = () => {\n emit('close-modal');\n };\n\n const onCloseActionButton = (event: Event) => {\n // Calls \"base-modal\" internal function to initialize the\n // \"close\" animation and trigger the \"close\" event.\n // This follows the same \"dialog\" pattern of calling \"dialog.close()\"\n modalRef.value.internalModalActionClose(event);\n };\n\n const acknowledgementDialogActions = computed(() => [\n {\n title: t('ok') as string,\n event: onCloseActionButton,\n variant: BentoButtonVariant.SECONDARY,\n },\n ]);\n\n const dialogActions = computed(() => {\n const mandatoryCancelActionButton: BentoButtonActionObject = {\n title: 'Cancel',\n event: onCloseActionButton,\n };\n const updatedPassedActionsObject: BentoButtonActionObject = actions?.value?.[0];\n\n if (dialogType.value === BentoModalDialogType.DESTRUCTIVE) {\n updatedPassedActionsObject.critical = true;\n } else if (dialogType.value === BentoModalDialogType.INFO) {\n updatedPassedActionsObject.variant = BentoButtonVariant.SECONDARY;\n }\n\n return [updatedPassedActionsObject, mandatoryCancelActionButton];\n });\n\n const modalDialogConditionalClasses = computed(() => ({\n [`b-modal-dialog--${dialogType.value}`]: dialogType.value,\n }));\n\n onMounted(() => {\n if (props.activePage) {\n throw new Error(\n 'Bento Modal Dialog cannot contain multiple pages. Use Bento Modal default variant instead.'\n );\n }\n\n if (!hasSlot('default') || (!props.content && !hasSlot('content'))) {\n throw new Error('Bento Modal Dialog requires header title and content');\n }\n\n if (actions?.value?.length > 1) {\n throw new Error('Not more than 1 action button may be provided to Modal Dialog');\n }\n\n if (dialogType.value !== BentoModalDialogType.ACKNOWLEDGEMENT && !actions?.value) {\n throw new Error('Modal Dialog, except ACKNOWLEDGEMENT type, always has to contain one action button');\n }\n\n if (dialogType.value === BentoModalDialogType.ACKNOWLEDGEMENT && actions?.value?.length) {\n throw new Error('Acknowledgement Modal Dialog does not accept action buttons');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Creates a \"dialog\" type of modal.\n * These are are modals that require a deliberate user action or acknowledgement\n * (confirmations or destructive actions).\n *\n * It’s not customizable and consists of title, description label and one action.\n *\n * @example\n * import { BentoModalDialog } from '@/components/modal/components';\n *\n * export default {\n * components: { BentoModalDialog },\n * template: `\n * <bento-modal-dialog\n * dialog-type=\"destructive\"\n * :is-dismissible=\"false\"\n * :is-open=\"isOpen\"\n * @close-modal=\"isOpen = false\"\n * >\n * Dialog content\n * </bento-modal-dialog>\n * `,\n * setup() {\n * const isOpen = ref(true)\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-modal-dialog',\n });\n</script>\n","<template>\n <component\n :is=\"computedVariant\"\n class=\"b-modal\"\n :is-open=\"isOpen\"\n :actions=\"actions\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"customProps\"\n @close-modal=\"onCloseModal\"\n @update:active-page=\"emit('update:active-page', $event)\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template v-if=\"hasSlot('content-col-1')\" #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template v-if=\"hasSlot('content-col-2')\" #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template v-if=\"hasSlot('content')\" #content><slot name=\"content\"></slot></template>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType, useAttrs, useSlots, watch } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n BentoModalDialogType,\n BentoModalSize,\n BentoModalVariant,\n BentoModalVariantMapping,\n } from './modal.types';\n import { BentoModalDefault, BentoModalDialog } from '@/components/modal/components';\n import { useHasSlot } from '@/composables';\n import { type BentoButtonActionsList } from '@/components/button';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME = 500;\n\n type BentoModalVariantProp = BentoModalVariant | `${BentoModalVariant}` | `${BentoModalVariantMapping}`;\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const attrs = useAttrs();\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 *\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 * Text label that is displayed left to the action buttons\n */\n actionsLabel: { type: String, default: null },\n\n /**\n * Text that will be displayed in the content section of Modal\n */\n content: { type: String, default: null },\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 | `${BentoModalColumnLayoutVariant}`>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n validator: (value: BentoModalColumnLayoutVariant) =>\n Object.values(BentoModalColumnLayoutVariant).includes(value),\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 * Changes the visual styling of action buttons\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n default: BentoModalDialogType.CONFIRMATION,\n validator: (value: BentoModalDialogType) => Object.values(BentoModalDialogType).includes(value),\n },\n\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: { type: Boolean, default: false },\n\n /**\n * If set to true, it allows the modal to be closed without performing an action\n */\n isDismissible: { type: Boolean, default: null },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n default: false,\n },\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 * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n default: BentoModalSize.SMALL,\n validator: (value: BentoModalSize) => Object.values(BentoModalSize).includes(value),\n },\n\n /**\n * Choose between default or dialog versions of modal\n */\n variant: {\n type: String as PropType<BentoModalVariantProp>,\n default: 'default',\n validator: (value: BentoModalVariantProp) =>\n Object.values<BentoModalVariantProp>(BentoModalVariant).includes(value) ||\n Object.values<BentoModalVariantProp>(BentoModalVariantMapping).includes(value),\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 computedVariant = computed(() => {\n if (Object.values<BentoModalVariantProp>(BentoModalVariantMapping).includes(props.variant)) {\n return props.variant;\n }\n return BentoModalVariantMapping[props.variant.toUpperCase()];\n });\n\n const customProps = computed(() =>\n computedVariant.value === BentoModalVariantMapping.DEFAULT\n ? {\n activePage: props.activePage,\n hideCloseButton: props.hideCloseButton,\n size: props.size,\n customPadding: props.customPadding,\n actionsLabel: props.actionsLabel,\n destructiveActions: props.destructiveActions,\n isDismissible: props.isDismissible ?? true,\n withColumnLayout: props.withColumnLayout,\n columnsSize: props.columnsSize,\n ...attrs,\n }\n : {\n activePage: props.activePage,\n dialogType: props.dialogType,\n content: props.content,\n isDismissible: props.isDismissible ?? false,\n ...attrs,\n }\n );\n\n const onCloseModal = () => {\n emit('close-modal');\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(onCloseModal, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME);\n }\n }\n );\n\n if (Object.keys(attrs).includes('overflow-visible')) {\n deprecate(\n 'BentoModal \"overflow-visible\" property',\n `\"overflow-visible\" property was made redundant. BentoModal can work correctly without the need to pass the propery.\n Remove the \"overflow-visible\" prop from BentoModal to remove this error.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Modal is a window that appear over any other page content\n * and focus user attention exclusively on one task or piece of\n * information at the moment.\n *\n * @example\n * import { BentoModal } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModal },\n * template: `\n * <bento-modal :isOpen=\"true\">\n * Title of the Modal\n * <template #content>\n * Mandatory content slot\n * </template>\n * </bento-modal>\n * `\n * };\n */\n export default defineComponent({\n components: { BentoModalDefault, BentoModalDialog },\n });\n</script>\n"],"names":["__default__","defineComponent","slots","useSlots","hasSlot","useHasSlot","onCloseModal","emit","onMounted","props","messages","t","useI18n","actions","dialogType","toRefs","modalRef","ref","onCloseActionButton","event","acknowledgementDialogActions","computed","BentoButtonVariant","dialogActions","mandatoryCancelActionButton","updatedPassedActionsObject","_a","BentoModalDialogType","modalDialogConditionalClasses","_b","BentoModalDefault","BentoModalDialog","LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME","attrs","useAttrs","computedVariant","BentoModalVariantMapping","customProps","watch","deprecate"],"mappings":";;;;;;;;;AAqMI,MAAAA,IAAeC,EAAgB;AAAA,EAC3B,MAAM;AACV,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA3JKC,IAAQC,EAAA,GACRC,IAAUC,EAAWH,CAAK,GAuG1BI,IAAe,MAAM;AACvB,MAAAC,EAAK,aAAa;AAAA,IACtB;AAEA,WAAAC,EAAU,MAAM;AACZ,UAAI,EAAEJ,EAAQ,SAAS,KAAMA,EAAQ,eAAe,KAAKA,EAAQ,eAAe,MAAO,CAACK,EAAM;AAC1F,cAAM,IAAI,MAAM,mEAAmE;AAAA,IAE3F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GC6DDT,IAAeC,EAAgB;AAAA,EAC3B,MAAM,EAAE,UAAAS,EAAA;AAAA,EACR,MAAM;AACV,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAtGK,EAAE,GAAAC,MAAMC,EAAgD,GAExDV,IAAQC,EAAA,GACRC,IAAUC,EAAWH,CAAK,GAC1B,EAAE,SAAAW,GAAS,YAAAC,MAAeC,EAAON,CAAK,GACtCO,IAAgDC,EAAI,IAAI,GAExDX,IAAe,MAAM;AACvB,MAA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