@adyen/bento-vue3 1.47.0 → 1.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/dist/@types/components.d.ts +4 -0
  2. package/dist/@types/index.d.ts +347 -111
  3. package/dist/accordion.js +1 -1
  4. package/dist/action-bar.js +1 -1
  5. package/dist/alert.js +1 -1
  6. package/dist/assets/accordion-item.css +1 -1
  7. package/dist/assets/action-bar.css +1 -1
  8. package/dist/assets/base-modal.css +1 -1
  9. package/dist/assets/card.css +1 -1
  10. package/dist/assets/chip.css +1 -0
  11. package/dist/assets/data-grid.css +1 -1
  12. package/dist/assets/date-range-picker.css +1 -1
  13. package/dist/assets/dialog-page.css +1 -1
  14. package/dist/assets/file-uploader.css +1 -1
  15. package/dist/assets/input-field-password.css +1 -1
  16. package/dist/assets/input-field-phone-number.css +1 -0
  17. package/dist/assets/input-field.css +1 -1
  18. package/dist/assets/inspector.css +1 -1
  19. package/dist/assets/link.css +1 -1
  20. package/dist/assets/menu.css +1 -1
  21. package/dist/assets/modal-fullscreen.css +1 -1
  22. package/dist/assets/popover.css +1 -1
  23. package/dist/assets/segmented-control.css +1 -1
  24. package/dist/assets/sidepanel.css +1 -1
  25. package/dist/assets/summary-grid-item-custom.css +1 -1
  26. package/dist/button.js +1 -1
  27. package/dist/card.js +1 -1
  28. package/dist/checkbox.js +2 -2
  29. package/dist/chip.js +5 -0
  30. package/dist/chip.js.map +1 -0
  31. package/dist/chunks/{accordion-item.LeB4jteX.js → accordion-item.Cf184uiI.js} +2 -2
  32. package/dist/chunks/{accordion-item.LeB4jteX.js.map → accordion-item.Cf184uiI.js.map} +1 -1
  33. package/dist/chunks/{action-bar.BN-AoRn0.js → action-bar.DWekSxPr.js} +5 -5
  34. package/dist/chunks/{action-bar.BN-AoRn0.js.map → action-bar.DWekSxPr.js.map} +1 -1
  35. package/dist/chunks/{alert.DTX7XqPC.js → alert.Dd2DYCZ1.js} +2 -2
  36. package/dist/chunks/{alert.DTX7XqPC.js.map → alert.Dd2DYCZ1.js.map} +1 -1
  37. package/dist/chunks/{base-modal.BsD3EOCY.js → base-modal.DOrcARK1.js} +4 -4
  38. package/dist/chunks/{base-modal.BsD3EOCY.js.map → base-modal.DOrcARK1.js.map} +1 -1
  39. package/dist/chunks/{button-actions-with-menu.CUL1q1Ca.js → button-actions-with-menu.BRdRrr4J.js} +4 -4
  40. package/dist/chunks/{button-actions-with-menu.CUL1q1Ca.js.map → button-actions-with-menu.BRdRrr4J.js.map} +1 -1
  41. package/dist/chunks/{button-actions.DBgK5Qwo.js → button-actions.ncthaz2m.js} +2 -2
  42. package/dist/chunks/{button-actions.DBgK5Qwo.js.map → button-actions.ncthaz2m.js.map} +1 -1
  43. package/dist/chunks/{calendar.CKY08nCx.js → calendar.BdLQOioy.js} +4 -4
  44. package/dist/chunks/{calendar.CKY08nCx.js.map → calendar.BdLQOioy.js.map} +1 -1
  45. package/dist/chunks/{card.BUBXMpP5.js → card.BAg7yMMT.js} +3 -3
  46. package/dist/chunks/{card.BUBXMpP5.js.map → card.BAg7yMMT.js.map} +1 -1
  47. package/dist/chunks/{checkbox-group.DOAFzAX-.js → checkbox-group.C-EmVp5t.js} +4 -4
  48. package/dist/chunks/{checkbox-group.DOAFzAX-.js.map → checkbox-group.C-EmVp5t.js.map} +1 -1
  49. package/dist/chunks/{checkbox.J51-tG4g.js → checkbox.BOtqaTUl.js} +18 -18
  50. package/dist/chunks/{checkbox.J51-tG4g.js.map → checkbox.BOtqaTUl.js.map} +1 -1
  51. package/dist/chunks/chip.sG_6gh3Z.js +71 -0
  52. package/dist/chunks/chip.sG_6gh3Z.js.map +1 -0
  53. package/dist/chunks/{code-snippet.CUzz3c-V.js → code-snippet.C9fCiM5V.js} +6 -6
  54. package/dist/chunks/{code-snippet.CUzz3c-V.js.map → code-snippet.C9fCiM5V.js.map} +1 -1
  55. package/dist/chunks/{codemirror.0fz2cWJS.js → codemirror.Zv80n3Z2.js} +13 -14
  56. package/dist/chunks/{codemirror.0fz2cWJS.js.map → codemirror.Zv80n3Z2.js.map} +1 -1
  57. package/dist/chunks/{controls-group.CjqybvY2.js → controls-group.BeK9igGT.js} +2 -2
  58. package/dist/chunks/{controls-group.CjqybvY2.js.map → controls-group.BeK9igGT.js.map} +1 -1
  59. package/dist/chunks/{copy.VRsofU-g.js → copy.HpUjy6OL.js} +2 -2
  60. package/dist/chunks/{copy.VRsofU-g.js.map → copy.HpUjy6OL.js.map} +1 -1
  61. package/dist/chunks/{country.D2t_VEYd.js → country.D0WFfaql.js} +14 -13
  62. package/dist/chunks/{country.D2t_VEYd.js.map → country.D0WFfaql.js.map} +1 -1
  63. package/dist/chunks/country.types.C0Q_hhgJ.js +269 -0
  64. package/dist/chunks/country.types.C0Q_hhgJ.js.map +1 -0
  65. package/dist/chunks/{currency.DGX-aejv.js → currency.DagWnTry.js} +2 -2
  66. package/dist/chunks/{currency.DGX-aejv.js.map → currency.DagWnTry.js.map} +1 -1
  67. package/dist/chunks/{dashboard-section.BAJgkMXW.js → dashboard-section.DoGuJKz_.js} +3 -3
  68. package/dist/chunks/{dashboard-section.BAJgkMXW.js.map → dashboard-section.DoGuJKz_.js.map} +1 -1
  69. package/dist/chunks/{dashed-underline.B_eVv1aB.js → dashed-underline.DZuyR-N7.js} +2 -2
  70. package/dist/chunks/{dashed-underline.B_eVv1aB.js.map → dashed-underline.DZuyR-N7.js.map} +1 -1
  71. package/dist/chunks/{data-grid-template.DrwGj6Yq.js → data-grid-template.BpJbblNT.js} +3 -3
  72. package/dist/chunks/{data-grid-template.DrwGj6Yq.js.map → data-grid-template.BpJbblNT.js.map} +1 -1
  73. package/dist/chunks/{data-grid.V4b5UdXZ.js → data-grid.CdTcZ3DP.js} +846 -841
  74. package/dist/chunks/data-grid.CdTcZ3DP.js.map +1 -0
  75. package/dist/chunks/{date-picker.DjuQyWzZ.js → date-picker.CjbhJWGH.js} +19 -19
  76. package/dist/chunks/{date-picker.DjuQyWzZ.js.map → date-picker.CjbhJWGH.js.map} +1 -1
  77. package/dist/chunks/date-range-picker.CoonfpYT.js +1086 -0
  78. package/dist/chunks/date-range-picker.CoonfpYT.js.map +1 -0
  79. package/dist/chunks/{date.DeaBl297.js → date.Cvfyq77s.js} +70 -2
  80. package/dist/chunks/{date.DeaBl297.js.map → date.Cvfyq77s.js.map} +1 -1
  81. package/dist/chunks/{dialog-page.CJBSluwk.js → dialog-page.D_r_CbyD.js} +2 -2
  82. package/dist/chunks/{dialog-page.CJBSluwk.js.map → dialog-page.D_r_CbyD.js.map} +1 -1
  83. package/dist/chunks/{dropdown-default-textbox.Dl8Jv2bS.js → dropdown-default-textbox.BpvVMlcX.js} +2 -2
  84. package/dist/chunks/{dropdown-default-textbox.Dl8Jv2bS.js.map → dropdown-default-textbox.BpvVMlcX.js.map} +1 -1
  85. package/dist/chunks/{dropdown-tag.D8hXRrMj.js → dropdown-tag.B5QFkTl_.js} +6 -6
  86. package/dist/chunks/{dropdown-tag.D8hXRrMj.js.map → dropdown-tag.B5QFkTl_.js.map} +1 -1
  87. package/dist/chunks/{dropdown.BWu3fV-K.js → dropdown.BN6DALZa.js} +29 -29
  88. package/dist/chunks/{dropdown.BWu3fV-K.js.map → dropdown.BN6DALZa.js.map} +1 -1
  89. package/dist/chunks/{error-message.qsc0nOWT.js → error-message.X-gxnQcx.js} +2 -2
  90. package/dist/chunks/{error-message.qsc0nOWT.js.map → error-message.X-gxnQcx.js.map} +1 -1
  91. package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
  92. package/dist/chunks/{file-uploader.BNGBBltW.js → file-uploader.CLZ1rPz0.js} +4 -4
  93. package/dist/chunks/{file-uploader.BNGBBltW.js.map → file-uploader.CLZ1rPz0.js.map} +1 -1
  94. package/dist/chunks/{filter-bar.Db-KfD-S.js → filter-bar.zvHeHs9B.js} +277 -279
  95. package/dist/chunks/filter-bar.zvHeHs9B.js.map +1 -0
  96. package/dist/chunks/{fixed-scroller.XaGPUsUO.js → fixed-scroller.BZwgM5Io.js} +2 -2
  97. package/dist/chunks/{fixed-scroller.XaGPUsUO.js.map → fixed-scroller.BZwgM5Io.js.map} +1 -1
  98. package/dist/chunks/{footer-actions.BG8-pOU-.js → footer-actions.X_RokrtM.js} +2 -2
  99. package/dist/chunks/{footer-actions.BG8-pOU-.js.map → footer-actions.X_RokrtM.js.map} +1 -1
  100. package/dist/chunks/{form-layout-title._25l9_Xm.js → form-layout-title.xkALokzl.js} +2 -2
  101. package/dist/chunks/{form-layout-title._25l9_Xm.js.map → form-layout-title.xkALokzl.js.map} +1 -1
  102. package/dist/chunks/get-slot-text.DQlZEsId.js +12 -0
  103. package/dist/chunks/get-slot-text.DQlZEsId.js.map +1 -0
  104. package/dist/chunks/{header.vPx_0dwO.js → header.CUhyy9NL.js} +5 -5
  105. package/dist/chunks/{header.vPx_0dwO.js.map → header.CUhyy9NL.js.map} +1 -1
  106. package/dist/chunks/{i18n.WMYWtwxB.js → i18n.D9azDLPe.js} +14 -1
  107. package/dist/chunks/{i18n.WMYWtwxB.js.map → i18n.D9azDLPe.js.map} +1 -1
  108. package/dist/chunks/{info-icon-with-popover.CieLDo3g.js → info-icon-with-popover.NzQciGvf.js} +3 -3
  109. package/dist/chunks/{info-icon-with-popover.CieLDo3g.js.map → info-icon-with-popover.NzQciGvf.js.map} +1 -1
  110. package/dist/chunks/{input-field-password.CS7rxMCK.js → input-field-password.B4HgGilX.js} +4 -4
  111. package/dist/chunks/{input-field-password.CS7rxMCK.js.map → input-field-password.B4HgGilX.js.map} +1 -1
  112. package/dist/chunks/input-field-phone-number.CpY2BLfO.js +3107 -0
  113. package/dist/chunks/input-field-phone-number.CpY2BLfO.js.map +1 -0
  114. package/dist/chunks/{input-field.Cx4fMIb7.js → input-field.DQKiMtZo.js} +30 -25
  115. package/dist/chunks/input-field.DQKiMtZo.js.map +1 -0
  116. package/dist/chunks/{inspector.types.DQQN1eqF.js → inspector.types.C-Qos3dV.js} +2 -2
  117. package/dist/chunks/{inspector.types.DQQN1eqF.js.map → inspector.types.C-Qos3dV.js.map} +1 -1
  118. package/dist/chunks/{keyboard-navigation.C3QMVRKY.js → keyboard-navigation.CqgGzfZQ.js} +2 -1
  119. package/dist/chunks/{keyboard-navigation.C3QMVRKY.js.map → keyboard-navigation.CqgGzfZQ.js.map} +1 -1
  120. package/dist/chunks/{listbox-option-tag.zYn_kSFz.js → listbox-option-tag.CFNRfAtf.js} +2 -2
  121. package/dist/chunks/{listbox-option-tag.zYn_kSFz.js.map → listbox-option-tag.CFNRfAtf.js.map} +1 -1
  122. package/dist/chunks/{menu.CihQsfY6.js → menu.DIKy_Pyt.js} +3 -3
  123. package/dist/chunks/{menu.CihQsfY6.js.map → menu.DIKy_Pyt.js.map} +1 -1
  124. package/dist/chunks/{modal-fullscreen.D39_mhdY.js → modal-fullscreen.Fqcd3B6-.js} +4 -4
  125. package/dist/chunks/{modal-fullscreen.D39_mhdY.js.map → modal-fullscreen.Fqcd3B6-.js.map} +1 -1
  126. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BHd_MGgH.js → modal.vue_vue_type_script_setup_true_lang.PEGJemgc.js} +5 -5
  127. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BHd_MGgH.js.map → modal.vue_vue_type_script_setup_true_lang.PEGJemgc.js.map} +1 -1
  128. package/dist/chunks/{pagination.CbzgV2xT.js → pagination.DogGVwa2.js} +3 -3
  129. package/dist/chunks/{pagination.CbzgV2xT.js.map → pagination.DogGVwa2.js.map} +1 -1
  130. package/dist/chunks/{payment-method.2IeC7f4x.js → payment-method.NguqkTwG.js} +2 -2
  131. package/dist/chunks/{payment-method.2IeC7f4x.js.map → payment-method.NguqkTwG.js.map} +1 -1
  132. package/dist/chunks/{popover.Bzb-pzfB.js → popover.NEP6wuPa.js} +2 -2
  133. package/dist/chunks/{popover.Bzb-pzfB.js.map → popover.NEP6wuPa.js.map} +1 -1
  134. package/dist/chunks/{promo-banner.BjLfDhBq.js → promo-banner.DTH4CZ_2.js} +2 -2
  135. package/dist/chunks/{promo-banner.BjLfDhBq.js.map → promo-banner.DTH4CZ_2.js.map} +1 -1
  136. package/dist/chunks/{radio-group.DkfCMh_u.js → radio-group.BLHcC22p.js} +5 -5
  137. package/dist/chunks/{radio-group.DkfCMh_u.js.map → radio-group.BLHcC22p.js.map} +1 -1
  138. package/dist/chunks/{search-bar.BTu1j3Ll.js → search-bar.CatznIEM.js} +4 -4
  139. package/dist/chunks/{search-bar.BTu1j3Ll.js.map → search-bar.CatznIEM.js.map} +1 -1
  140. package/dist/chunks/{secondary-nav.Bqvz5hjH.js → secondary-nav.LIzkbQY1.js} +3 -3
  141. package/dist/chunks/{secondary-nav.Bqvz5hjH.js.map → secondary-nav.LIzkbQY1.js.map} +1 -1
  142. package/dist/chunks/{segmented-control.BIwBQ8i3.js → segmented-control.DOxyrdMz.js} +33 -32
  143. package/dist/chunks/segmented-control.DOxyrdMz.js.map +1 -0
  144. package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
  145. package/dist/chunks/{selection-card-group.BHYvAL-T.js → selection-card-group.BKatprYB.js} +11 -11
  146. package/dist/chunks/{selection-card-group.BHYvAL-T.js.map → selection-card-group.BKatprYB.js.map} +1 -1
  147. package/dist/chunks/{sidepanel.Bk35AAFF.js → sidepanel.Be3uyOVd.js} +4 -4
  148. package/dist/chunks/{sidepanel.Bk35AAFF.js.map → sidepanel.Be3uyOVd.js.map} +1 -1
  149. package/dist/chunks/status.types.Bdv2zuuh.js +44 -0
  150. package/dist/chunks/{status.types.DsYAH3RM.js.map → status.types.Bdv2zuuh.js.map} +1 -1
  151. package/dist/chunks/{step.DAB8h_4u.js → step.DsfmsUU6.js} +3 -3
  152. package/dist/chunks/{step.DAB8h_4u.js.map → step.DsfmsUU6.js.map} +1 -1
  153. package/dist/chunks/{structured-list-item.wpnBS69h.js → structured-list-item.BwgEJywb.js} +3 -3
  154. package/dist/chunks/{structured-list-item.wpnBS69h.js.map → structured-list-item.BwgEJywb.js.map} +1 -1
  155. package/dist/chunks/{summary-grid-item-custom.C8AD1NAh.js → summary-grid-item-custom.Vx_YxH7S.js} +97 -92
  156. package/dist/chunks/summary-grid-item-custom.Vx_YxH7S.js.map +1 -0
  157. package/dist/chunks/summary-grid.keys.CxTf_FOc.js +6 -0
  158. package/dist/chunks/summary-grid.keys.CxTf_FOc.js.map +1 -0
  159. package/dist/chunks/{tabs.B5-PZCxc.js → tabs.CR2tWuz3.js} +2 -2
  160. package/dist/chunks/{tabs.B5-PZCxc.js.map → tabs.CR2tWuz3.js.map} +1 -1
  161. package/dist/chunks/{tag.BuUbvgok.js → tag.Chr4TP7d.js} +2 -2
  162. package/dist/chunks/{tag.BuUbvgok.js.map → tag.Chr4TP7d.js.map} +1 -1
  163. package/dist/chunks/{textarea.C0k8by9A.js → textarea.BLhKC_iw.js} +3 -3
  164. package/dist/chunks/{textarea.C0k8by9A.js.map → textarea.BLhKC_iw.js.map} +1 -1
  165. package/dist/chunks/{timeline-item.CYw68jQr.js → timeline-item.BVm2YscV.js} +7 -7
  166. package/dist/chunks/{timeline-item.CYw68jQr.js.map → timeline-item.BVm2YscV.js.map} +1 -1
  167. package/dist/chunks/{toast.CVy2sf_5.js → toast.A5f1_NqV.js} +2 -2
  168. package/dist/chunks/{toast.CVy2sf_5.js.map → toast.A5f1_NqV.js.map} +1 -1
  169. package/dist/chunks/{toggle.Dl82VpiQ.js → toggle.BmwlaQon.js} +2 -2
  170. package/dist/chunks/{toggle.Dl82VpiQ.js.map → toggle.BmwlaQon.js.map} +1 -1
  171. package/dist/chunks/truncate.BfIl_-71.js +8 -0
  172. package/dist/chunks/truncate.BfIl_-71.js.map +1 -0
  173. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CjlNffBI.js → tutorial.vue_vue_type_script_setup_true_lang.D4ifiOTn.js} +5 -5
  174. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CjlNffBI.js.map → tutorial.vue_vue_type_script_setup_true_lang.D4ifiOTn.js.map} +1 -1
  175. package/dist/chunks/{use-cached-selected-values.YAg3m-Af.js → use-cached-selected-values.CoelUIEy.js} +5 -5
  176. package/dist/chunks/{use-cached-selected-values.YAg3m-Af.js.map → use-cached-selected-values.CoelUIEy.js.map} +1 -1
  177. package/dist/chunks/use-country-items.BMhCqIWd.js +30 -0
  178. package/dist/chunks/{use-country-items.DJn6gU4P.js.map → use-country-items.BMhCqIWd.js.map} +1 -1
  179. package/dist/chunks/{country.types.CLjbulKL.js → use-country-phon-code.DVgE19zT.js} +497 -761
  180. package/dist/chunks/use-country-phon-code.DVgE19zT.js.map +1 -0
  181. package/dist/code-snippet.js +1 -1
  182. package/dist/country.js +7 -6
  183. package/dist/country.js.map +1 -1
  184. package/dist/currency.js +1 -1
  185. package/dist/dashboard-template.js +1 -1
  186. package/dist/dashed-underline.js +1 -1
  187. package/dist/data-grid-template.js +1 -1
  188. package/dist/data-grid.js +1 -1
  189. package/dist/date-picker.js +2 -2
  190. package/dist/date-range-picker.js +2 -2
  191. package/dist/date.js +1 -1
  192. package/dist/dropdown.js +4 -4
  193. package/dist/file-uploader.js +1 -1
  194. package/dist/filter-bar.js +1 -1
  195. package/dist/form-layout.js +1 -1
  196. package/dist/header.js +1 -1
  197. package/dist/index.js +196 -191
  198. package/dist/index.js.map +1 -1
  199. package/dist/input-field-password.js +1 -1
  200. package/dist/input-field-phone-number.js +5 -0
  201. package/dist/input-field-phone-number.js.map +1 -0
  202. package/dist/input-field.js +1 -1
  203. package/dist/inspector.js +1 -1
  204. package/dist/internal.js +11 -11
  205. package/dist/menu.js +1 -1
  206. package/dist/modal-fullscreen.js +1 -1
  207. package/dist/modal.js +2 -2
  208. package/dist/pagination.js +1 -1
  209. package/dist/payment-method.js +1 -1
  210. package/dist/popover.js +1 -1
  211. package/dist/promo-banner.js +1 -1
  212. package/dist/radio-group.js +1 -1
  213. package/dist/search-bar.js +2 -2
  214. package/dist/secondary-nav.js +1 -1
  215. package/dist/segmented-control.js +1 -1
  216. package/dist/selection-card.js +1 -1
  217. package/dist/sidepanel.js +1 -1
  218. package/dist/status.js +1 -1
  219. package/dist/stepper.js +1 -1
  220. package/dist/structured-list.js +1 -1
  221. package/dist/styles/bento-dark.css +15 -1
  222. package/dist/styles/bento-light.css +15 -1
  223. package/dist/styles/bento.css +15 -1
  224. package/dist/styles/legacy.css +14 -0
  225. package/dist/styles/styleguide.css +15 -1
  226. package/dist/summary-grid.js +1 -1
  227. package/dist/tabs.js +1 -1
  228. package/dist/tag.js +1 -1
  229. package/dist/textarea.js +1 -1
  230. package/dist/timeline.js +1 -1
  231. package/dist/toast.js +1 -1
  232. package/dist/toggle.js +1 -1
  233. package/dist/tutorial.js +1 -1
  234. package/dist/web-types.json +1 -1
  235. package/package.json +4 -3
  236. package/dist/chunks/country.types.CLjbulKL.js.map +0 -1
  237. package/dist/chunks/data-grid.V4b5UdXZ.js.map +0 -1
  238. package/dist/chunks/date-range-picker.CmxXWnBc.js +0 -1042
  239. package/dist/chunks/date-range-picker.CmxXWnBc.js.map +0 -1
  240. package/dist/chunks/filter-bar.Db-KfD-S.js.map +0 -1
  241. package/dist/chunks/get-slot-text.D5WBGjic.js +0 -9
  242. package/dist/chunks/get-slot-text.D5WBGjic.js.map +0 -1
  243. package/dist/chunks/input-field.Cx4fMIb7.js.map +0 -1
  244. package/dist/chunks/segmented-control.BIwBQ8i3.js.map +0 -1
  245. package/dist/chunks/status.types.DsYAH3RM.js +0 -45
  246. package/dist/chunks/summary-grid-item-custom.C8AD1NAh.js.map +0 -1
  247. package/dist/chunks/summary-grid.keys.BBbFrFGF.js +0 -5
  248. package/dist/chunks/summary-grid.keys.BBbFrFGF.js.map +0 -1
  249. package/dist/chunks/use-country-items.DJn6gU4P.js +0 -29
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.CbzgV2xT.js","sources":["../../../vue2/src/components/pagination/components/pagination-results-per-page/pagination-results-per-page.vue","../../../vue2/src/components/pagination/components/pagination-context/pagination-context.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/skip-left.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/skip-right.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-left-small.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-right-small.vue","../../../vue2/src/components/pagination/components/pagination-controls/pagination-controls.vue","../../../vue2/src/components/pagination/pagination.vue"],"sourcesContent":["<template>\n <div class=\"b-pagination-results-per-page\">\n <bento-typography el=\"div\">\n <component\n :is=\"i18nComponent\"\n v-bind=\"getI18nProps(translationPathKey)\"\n class=\"b-pagination-results-per-page__dropdown-container\"\n tag=\"div\"\n :plural=\"totalCount\"\n >\n <template #itemCount>\n <bento-dropdown\n :id=\"dropdownId\"\n :aria-label=\"t(translationPathKey, { itemCount: itemsPerPage, totalCount })\"\n class=\"b-pagination-results-per-page__dropdown\"\n condensed\n :items=\"dropdownOptions\"\n :value=\"itemsPerPage\"\n @input=\"onSelectChange\"\n />\n </template>\n <template v-if=\"!!totalCount\" #totalCount>{{ totalCount }}</template>\n </component>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoDropdown } from '@/components/dropdown';\n import { generateUid } from '@/core/utils/ts';\n import { getI18nComponent, getI18nProps, useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const PREDEFINED_RESULTS_PER_PAGE_VALUES = [\n { label: '10', value: 10 },\n { label: '20', value: 20 },\n { label: '50', value: 50 },\n { label: '75', value: 75 },\n { label: '100', value: 100 },\n ];\n\n const props = withDefaults(\n defineProps<{\n /**\n * The amount of items the pager is paging through.\n */\n itemsPerPage?: number;\n /**\n * The total number of items the pager is paging through.\n */\n totalCount?: number;\n }>(),\n {\n itemsPerPage: 50,\n totalCount: null,\n }\n );\n\n const emit = defineEmits<{\n (e: 'select', value: number);\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const dropdownId = generateUid('b-pagination-context-number-elements');\n const dropdownOptions = ref(PREDEFINED_RESULTS_PER_PAGE_VALUES);\n const i18nComponent = getI18nComponent();\n\n const onSelectChange = (selectedNumberOfResults: number) => {\n emit('select', selectedNumberOfResults);\n };\n\n const translationPathKey = computed(() => (props.totalCount ? 'showingItemsWithTotal' : 'showingItems'));\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination-results-per-page.scss\" />\n","<template>\n <div class=\"b-pagination-context\">\n <bento-typography v-if=\"totalPages > 1\" el=\"div\">\n <component :is=\"i18nComponent\" v-bind=\"getI18nProps('pageOfTotalPages')\" tag=\"div\">\n <template #page>\n <bento-dropdown\n :id=\"dropdownId\"\n :aria-label=\"t('pageOfTotalPages', { page, totalPages })\"\n class=\"b-pagination-context__dropdown\"\n condensed\n :items=\"listOfAvailablePages\"\n :value=\"page\"\n :virtual-scroll=\"virtualScroll\"\n @input=\"onPageSelectChange\"\n />\n </template>\n <template #totalPages>{{ totalPages }}</template>\n </component>\n </bento-typography>\n <bento-typography v-else-if=\"totalPages === 1\" el=\"span\">\n {{ t('pageOneOfOne') }}\n </bento-typography>\n <bento-typography v-else el=\"span\">\n {{ t('pageNumber', { page }) }}\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoListboxOptionItem } from '@/types';\n import { generateUid } from '@/core/utils/ts';\n import messages from './messages.json';\n import { getI18nComponent, getI18nProps, useI18n } from '@/utils/ts/i18n';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = withDefaults(\n defineProps<{\n /**\n * The current page number of the pager.\n */\n page?: number;\n\n /**\n * The total number of items the pager is paging through.\n */\n totalPages?: number;\n\n /**\n * Enables virtual scrolling on all dropdowns if set to true.\n */\n virtualScroll?: boolean;\n }>(),\n {\n page: 1,\n totalPages: null,\n virtualScroll: false,\n }\n );\n const emit = defineEmits<{\n (e: 'page-selected', value: string | number);\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const dropdownId = generateUid('bento-pagination-context-current-page');\n const onPageSelectChange = (selectedPage: string | number) => emit('page-selected', selectedPage);\n const i18nComponent = getI18nComponent();\n\n // Generate a list of pages from 1 to \"totalPages\"\n const transformIntoOption = (value: number): BentoListboxOptionItem => ({\n label: value.toString(),\n value,\n });\n const transformToPageNumber = (_, index) => index + 1;\n const listOfAvailablePages = computed(() =>\n Array.from(new Array(props.totalPages), transformToPageNumber).map(transformIntoOption)\n );\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination-context.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M9.06055 8.00011L12.0605 5.00011L10.9999 3.93945L6.93923 8.00011L10.9999 12.0608L12.0605 11.0001L9.06055 8.00011Z\"/><path fill=\"#00112C\" d=\"M4.25 4.25L4.25 11.75H5.75L5.75 4.25L4.25 4.25Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M6.93945 7.99962L3.93945 10.9996L5.00011 12.0603L9.06077 7.99963L5.00011 3.93896L3.93945 4.99963L6.93945 7.99962Z\"/><path fill=\"#00112C\" d=\"M11.75 11.7497V4.24974L10.25 4.24974V11.7497H11.75Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M10.5608 5.00011L7.56077 8.00011L10.5608 11.0001L9.50011 12.0608L5.43945 8.00011L9.50011 3.93945L10.5608 5.00011Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M5.43924 10.9999L8.43924 7.99989L5.43924 4.99989L6.4999 3.93923L10.5606 7.99989L6.4999 12.0605L5.43924 10.9999Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","<template>\n <ul class=\"b-pagination-controls\">\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the first page -->\n <bento-button :disabled=\"isCurrentPageFirst\" variant=\"tertiary\" condensed @click=\"navigate(1)\">\n <template #iconLeft>\n <skip-left :svg-title=\"t('navigateToTheFirstPage')\" />\n </template>\n </bento-button>\n </li>\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the previous page -->\n <bento-button :disabled=\"isCurrentPageFirst\" variant=\"tertiary\" condensed @click=\"navigate(page - 1)\">\n <template #iconLeft>\n <chevron-left :svg-title=\"t('navigateToThePreviousPage')\" />\n </template>\n </bento-button>\n </li>\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the next page -->\n <bento-button :disabled=\"isNextButtonDisabled\" variant=\"tertiary\" condensed @click=\"navigate(page + 1)\">\n <template #iconLeft>\n <chevron-right :svg-title=\"t('navigateToTheNextPage')\" />\n </template>\n </bento-button>\n </li>\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the last page -->\n <bento-button\n :disabled=\"isLastPageButtonDisabled\"\n variant=\"tertiary\"\n condensed\n @click=\"navigate(totalPages)\"\n >\n <template #iconLeft>\n <skip-right :svg-title=\"t('navigateToTheLastPage')\" />\n </template>\n </bento-button>\n </li>\n </ul>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoButton } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import SkipLeft from '@adyen/ui-assets-icons-16/vue/skip-left';\n import SkipRight from '@adyen/ui-assets-icons-16/vue/skip-right';\n import ChevronLeft from '@adyen/ui-assets-icons-16/vue/chevron-left-small';\n import ChevronRight from '@adyen/ui-assets-icons-16/vue/chevron-right-small';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = withDefaults(\n defineProps<{\n /**\n * Use to determine if the pager has a \"next page\".\n */\n hasNext?: boolean;\n\n /**\n * The current page number of the pager.\n */\n page: number;\n\n /**\n * The current page number of the pager.\n */\n totalPages?: number;\n }>(),\n {\n hasNext: null,\n totalPages: null,\n }\n );\n\n const emit = defineEmits<{\n (e: 'navigate', value: number);\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const isCurrentPageFirst = computed(() => props.page === 1);\n const isCurrentPageLast = computed(() => props.page === props.totalPages);\n const isNextButtonDisabled = computed(() => {\n const hasNoNextPage = !props.hasNext;\n return hasNoNextPage || isCurrentPageLast.value;\n });\n const isLastPageButtonDisabled = computed(() => {\n const hasNoNextPage = !props.hasNext;\n const hasNoTotalPagesNumber = !props.totalPages;\n\n return hasNoNextPage || isCurrentPageLast.value || hasNoTotalPagesNumber;\n });\n\n const navigate = (pageArg: number) => {\n emit('navigate', pageArg);\n };\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination-controls.scss\" />\n","<template>\n <div class=\"b-pagination\">\n <nav :aria-label=\"computedAriaLabel\" class=\"b-pagination__navigation\" :class=\"navigationConditionalClasses()\">\n <bento-pagination-results-per-page\n v-if=\"!hidePageSize\"\n class=\"b-pagination__results-per-page\"\n :items-per-page=\"size\"\n :total-count=\"totalCount\"\n @select=\"onItemsPerPageChange\"\n />\n <bento-typography v-else-if=\"hasSlot('default')\"><slot /></bento-typography>\n\n <div class=\"b-pagination__page-navigator\">\n <bento-pagination-context\n class=\"b-pagination__context\"\n :total-pages=\"totalPages\"\n :page=\"page\"\n :total-count=\"totalCount\"\n :virtual-scroll=\"virtualScroll\"\n @page-selected=\"onPageSelected\"\n />\n\n <div class=\"b-pagination__divider\"></div>\n\n <bento-pagination-controls\n class=\"b-pagination__controls\"\n :has-next=\"hasNext\"\n :page=\"page\"\n :total-pages=\"totalPages\"\n @navigate=\"navigate\"\n />\n </div>\n </nav>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, toRefs, useAttrs, useSlots } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import BentoPaginationResultsPerPage from './components/pagination-results-per-page/pagination-results-per-page.vue';\n import BentoPaginationContext from './components/pagination-context/pagination-context.vue';\n import BentoPaginationControls from './components/pagination-controls/pagination-controls.vue';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useHasSlot } from '@/composables';\n\n const props = withDefaults(\n defineProps<{\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * A brief description of the purpose of the navigation (for a11y).\n * Omit the term \"navigation\", as the screen reader will read both the role and the contents of the label.\n */\n ariaLabel?: string;\n\n /**\n * Use to determine if the pager has a \"next page\".\n */\n hasNext?: boolean;\n\n /**\n * Toggles the visibility of the \"results per page\" part of the pagination component.\n */\n hidePageSize?: boolean;\n\n /**\n * The current page number of the pager.\n */\n page?: number;\n\n /**\n * The size of the items the pager is paging through.\n */\n size?: number;\n\n /**\n * The total number of items the pager is paging through.\n */\n totalCount?: number;\n\n /**\n * Enables virtual scrolling on all dropdowns if set to true.\n */\n virtualScroll?: boolean;\n }>(),\n {\n ariaLabel: null,\n hasNext: null,\n hidePageSize: false,\n page: 1,\n size: 20,\n totalCount: null,\n virtualScroll: false,\n }\n );\n\n const emit = defineEmits<{\n /**\n * Triggered when the navigation controls are clicked or the items per page is changed (i.e. when the arrow buttons to the\n * rightmost of the screen or either dropdown is updated). It indicates to which page it should go next and also the page size.\n */\n (e: 'navigate', page: number, items?: number): void;\n\n /**\n * Triggered when the number of items per page is changed from the left hand dropdown.\n * It indicates the new number of items that will be displayed.\n */\n (e: 'items-page', size: number): void;\n\n /**\n * Triggered when the navigation controls are clicked, whether the arrow buttons to the\n * right most of the screen or the dropdown on the right hand is updated.\n * It indicates to which page it should go next\n * (easily achieved using the [sync modifier](https://v2.vuejs.org/v2/guide/components-custom-events.html#sync-Modifier))\n * e.g. `:page.sync=\"currentPage\"`\n */\n (e: 'update:page', page: number): void;\n\n /**\n * Triggered when the number of items per page is changed from the left hand dropdown.\n * It indicates the new number of items that will be displayed.\n * (easily achieved using the [sync modifier](https://v2.vuejs.org/v2/guide/components-custom-events.html#sync-Modifier))\n * e.g. `:size.sync=\"itemsPerPage\"`\n */\n (e: 'update:size', size: number): void;\n }>();\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const attrs = useAttrs();\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n });\n\n const totalPages = computed(() =>\n !props.totalCount || !props.size ? null : Math.ceil(props.totalCount / props.size)\n );\n\n const navigate = (pageArg: number, itemsPerPage?: number) => {\n if (props.hidePageSize) {\n emit('navigate', pageArg);\n } else {\n emit('navigate', pageArg, itemsPerPage ?? props?.size);\n }\n emit('update:page', pageArg);\n };\n\n const onPageSelected = (pageNumber: number) => {\n navigate(pageNumber);\n };\n\n const onItemsPerPageChange = (elements: number) => {\n emit('items-page', elements);\n emit('update:size', elements);\n\n // Always go to first page when the\n // number of items page changes\n navigate(1, elements);\n };\n\n const navigationConditionalClasses = () => ({\n 'b-pagination__navigation--only-page-navigator': !hasSlot('default') && props.hidePageSize,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Paginiation component to help users page through data sets.\n *\n * There are two ways of doing navigation in this component:\n * 1. (Basic) You tell the component if there is a next page (hasNext)\n * 2. (Enhanced) You tell the component:\n * - How many total items exist (totalCount)\n * - The max number of items that you show/fetch per page (size)\n * - In this case you should not set the hasNext props\n *\n * If you have the data available and opt to use the Enhanced way you get extra controls:\n * - Page dropdown selector\n * - Last page button\n * - \"Showing 10 of 200 items\" text\n *\n * @usage\n * import { BentoPagination } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoPagination },\n * template: `\n * <bento-pagination :has-next=\"isNextPage\" />\n * `,\n * }\n */\n\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination.scss\" />\n"],"names":["__default__$3","messages$2","PREDEFINED_RESULTS_PER_PAGE_VALUES","props","__props","emit","__emit","t","useI18n","dropdownId","generateUid","dropdownOptions","ref","i18nComponent","getI18nComponent","onSelectChange","selectedNumberOfResults","translationPathKey","computed","__default__$2","messages$1","onPageSelectChange","selectedPage","transformIntoOption","value","transformToPageNumber","_","index","listOfAvailablePages","uuid$3","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","uuid$2","uuid$1","uuid","__default__$1","messages","isCurrentPageFirst","isCurrentPageLast","isNextButtonDisabled","isLastPageButtonDisabled","hasNoNextPage","hasNoTotalPagesNumber","navigate","pageArg","__default__","slots","useSlots","hasSlot","useHasSlot","attrs","useAttrs","ariaLabelAttribute","ariaLabel","toRefs","computedAriaLabel","useAriaLabel","totalPages","itemsPerPage","onPageSelected","pageNumber","onItemsPerPageChange","elements","navigationConditionalClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAgFIA,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;AA5CA,UAAAC,IAAA;AAAA,MAA2C,EAAA,OAAA,MAAA,OAAA,GAAA;AAAA,MACd,EAAA,OAAA,MAAA,OAAA,GAAA;AAAA,MACA,EAAA,OAAA,MAAA,OAAA,GAAA;AAAA,MACA,EAAA,OAAA,MAAA,OAAA,GAAA;AAAA,MACA,EAAA,OAAA,OAAA,OAAA,IAAA;AAAA,IACE,GAG/BC,IAAAC,GAiBAC,IAAAC,GAIA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAP,EAAA,CAAA,GACAQ,IAAAC,EAAA,sCAAA,GACAC,IAAAC,EAAAV,CAAA,GACAW,IAAAC,EAAA,GAEAC,IAAA,CAAAC,MAAA;AACI,MAAAX,EAAA,UAAAW,CAAA;AAAA,IAAsC,GAG1CC,IAAAC,EAAA,MAAAf,EAAA,aAAA,0BAAA,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CCOAgB,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;AA9CA,UAAA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;;;;;;;;;;;;;;;;;;;;;;;yKCoG5BC,KAAA,CAAA;;;;;;;;;;;;;;AAzJA,UAAA7C,IAAAC,GAoDAC,IAAAC,GA+BA2C,IAAAC,EAAA,GACAC,IAAAC,GAAAH,CAAA,GAEAI,IAAAC,EAAA,GACAC,IAAA3C,EAAAyC,EAAA,YAAA,CAAA,GACA,EAAA,WAAAG,EAAA,IAAAC,EAAAtD,CAAA,GACAuD,IAAAC,EAAA;AAAA,MAAuC,WAAAJ,EAAA;AAAA;AAAA,MACL,OAAAC;AAAA,IAEvB,CAAA,GAGXI,IAAA1C;AAAA,MAAmB,MAAA,CAAAf,EAAA,cAAA,CAAAA,EAAA,OAAA,OAAA,KAAA,KAAAA,EAAA,aAAAA,EAAA,IAAA;AAAA,IACkE,GAGrF2C,IAAA,CAAAC,GAAAc,MAAA;AACI,MAAA1D,EAAA,eACIE,EAAA,YAAA0C,CAAA,IAEA1C,EAAA,YAAA0C,GAAAc,MAAA1D,KAAA,gBAAAA,EAAA,KAAA,GAEJE,EAAA,eAAA0C,CAAA;AAAA,IAA2B,GAG/Be,IAAA,CAAAC,MAAA;AACI,MAAAjB,EAAAiB,CAAA;AAAA,IAAmB,GAGvBC,IAAA,CAAAC,MAAA;AACI,MAAA5D,EAAA,cAAA4D,CAAA,GACA5D,EAAA,eAAA4D,CAAA,GAIAnB,EAAA,GAAAmB,CAAA;AAAA,IAAoB,GAGxBC,IAAA,OAAA;AAAA,MAA4C,iDAAA,CAAAf,EAAA,SAAA,KAAAhD,EAAA;AAAA,IACsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[2,3,4,5]}
1
+ {"version":3,"file":"pagination.DogGVwa2.js","sources":["../../../vue2/src/components/pagination/components/pagination-results-per-page/pagination-results-per-page.vue","../../../vue2/src/components/pagination/components/pagination-context/pagination-context.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/skip-left.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/skip-right.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-left-small.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-right-small.vue","../../../vue2/src/components/pagination/components/pagination-controls/pagination-controls.vue","../../../vue2/src/components/pagination/pagination.vue"],"sourcesContent":["<template>\n <div class=\"b-pagination-results-per-page\">\n <bento-typography el=\"div\">\n <component\n :is=\"i18nComponent\"\n v-bind=\"getI18nProps(translationPathKey)\"\n class=\"b-pagination-results-per-page__dropdown-container\"\n tag=\"div\"\n :plural=\"totalCount\"\n >\n <template #itemCount>\n <bento-dropdown\n :id=\"dropdownId\"\n :aria-label=\"t(translationPathKey, { itemCount: itemsPerPage, totalCount })\"\n class=\"b-pagination-results-per-page__dropdown\"\n condensed\n :items=\"dropdownOptions\"\n :value=\"itemsPerPage\"\n @input=\"onSelectChange\"\n />\n </template>\n <template v-if=\"!!totalCount\" #totalCount>{{ totalCount }}</template>\n </component>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoDropdown } from '@/components/dropdown';\n import { generateUid } from '@/core/utils/ts';\n import { getI18nComponent, getI18nProps, useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const PREDEFINED_RESULTS_PER_PAGE_VALUES = [\n { label: '10', value: 10 },\n { label: '20', value: 20 },\n { label: '50', value: 50 },\n { label: '75', value: 75 },\n { label: '100', value: 100 },\n ];\n\n const props = withDefaults(\n defineProps<{\n /**\n * The amount of items the pager is paging through.\n */\n itemsPerPage?: number;\n /**\n * The total number of items the pager is paging through.\n */\n totalCount?: number;\n }>(),\n {\n itemsPerPage: 50,\n totalCount: null,\n }\n );\n\n const emit = defineEmits<{\n (e: 'select', value: number);\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const dropdownId = generateUid('b-pagination-context-number-elements');\n const dropdownOptions = ref(PREDEFINED_RESULTS_PER_PAGE_VALUES);\n const i18nComponent = getI18nComponent();\n\n const onSelectChange = (selectedNumberOfResults: number) => {\n emit('select', selectedNumberOfResults);\n };\n\n const translationPathKey = computed(() => (props.totalCount ? 'showingItemsWithTotal' : 'showingItems'));\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination-results-per-page.scss\" />\n","<template>\n <div class=\"b-pagination-context\">\n <bento-typography v-if=\"totalPages > 1\" el=\"div\">\n <component :is=\"i18nComponent\" v-bind=\"getI18nProps('pageOfTotalPages')\" tag=\"div\">\n <template #page>\n <bento-dropdown\n :id=\"dropdownId\"\n :aria-label=\"t('pageOfTotalPages', { page, totalPages })\"\n class=\"b-pagination-context__dropdown\"\n condensed\n :items=\"listOfAvailablePages\"\n :value=\"page\"\n :virtual-scroll=\"virtualScroll\"\n @input=\"onPageSelectChange\"\n />\n </template>\n <template #totalPages>{{ totalPages }}</template>\n </component>\n </bento-typography>\n <bento-typography v-else-if=\"totalPages === 1\" el=\"span\">\n {{ t('pageOneOfOne') }}\n </bento-typography>\n <bento-typography v-else el=\"span\">\n {{ t('pageNumber', { page }) }}\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoListboxOptionItem } from '@/types';\n import { generateUid } from '@/core/utils/ts';\n import messages from './messages.json';\n import { getI18nComponent, getI18nProps, useI18n } from '@/utils/ts/i18n';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = withDefaults(\n defineProps<{\n /**\n * The current page number of the pager.\n */\n page?: number;\n\n /**\n * The total number of items the pager is paging through.\n */\n totalPages?: number;\n\n /**\n * Enables virtual scrolling on all dropdowns if set to true.\n */\n virtualScroll?: boolean;\n }>(),\n {\n page: 1,\n totalPages: null,\n virtualScroll: false,\n }\n );\n const emit = defineEmits<{\n (e: 'page-selected', value: string | number);\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const dropdownId = generateUid('bento-pagination-context-current-page');\n const onPageSelectChange = (selectedPage: string | number) => emit('page-selected', selectedPage);\n const i18nComponent = getI18nComponent();\n\n // Generate a list of pages from 1 to \"totalPages\"\n const transformIntoOption = (value: number): BentoListboxOptionItem => ({\n label: value.toString(),\n value,\n });\n const transformToPageNumber = (_, index) => index + 1;\n const listOfAvailablePages = computed(() =>\n Array.from(new Array(props.totalPages), transformToPageNumber).map(transformIntoOption)\n );\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination-context.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M9.06055 8.00011L12.0605 5.00011L10.9999 3.93945L6.93923 8.00011L10.9999 12.0608L12.0605 11.0001L9.06055 8.00011Z\"/><path fill=\"#00112C\" d=\"M4.25 4.25L4.25 11.75H5.75L5.75 4.25L4.25 4.25Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M6.93945 7.99962L3.93945 10.9996L5.00011 12.0603L9.06077 7.99963L5.00011 3.93896L3.93945 4.99963L6.93945 7.99962Z\"/><path fill=\"#00112C\" d=\"M11.75 11.7497V4.24974L10.25 4.24974V11.7497H11.75Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M10.5608 5.00011L7.56077 8.00011L10.5608 11.0001L9.50011 12.0608L5.43945 8.00011L9.50011 3.93945L10.5608 5.00011Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M5.43924 10.9999L8.43924 7.99989L5.43924 4.99989L6.4999 3.93923L10.5606 7.99989L6.4999 12.0605L5.43924 10.9999Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","<template>\n <ul class=\"b-pagination-controls\">\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the first page -->\n <bento-button :disabled=\"isCurrentPageFirst\" variant=\"tertiary\" condensed @click=\"navigate(1)\">\n <template #iconLeft>\n <skip-left :svg-title=\"t('navigateToTheFirstPage')\" />\n </template>\n </bento-button>\n </li>\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the previous page -->\n <bento-button :disabled=\"isCurrentPageFirst\" variant=\"tertiary\" condensed @click=\"navigate(page - 1)\">\n <template #iconLeft>\n <chevron-left :svg-title=\"t('navigateToThePreviousPage')\" />\n </template>\n </bento-button>\n </li>\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the next page -->\n <bento-button :disabled=\"isNextButtonDisabled\" variant=\"tertiary\" condensed @click=\"navigate(page + 1)\">\n <template #iconLeft>\n <chevron-right :svg-title=\"t('navigateToTheNextPage')\" />\n </template>\n </bento-button>\n </li>\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the last page -->\n <bento-button\n :disabled=\"isLastPageButtonDisabled\"\n variant=\"tertiary\"\n condensed\n @click=\"navigate(totalPages)\"\n >\n <template #iconLeft>\n <skip-right :svg-title=\"t('navigateToTheLastPage')\" />\n </template>\n </bento-button>\n </li>\n </ul>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoButton } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import SkipLeft from '@adyen/ui-assets-icons-16/vue/skip-left';\n import SkipRight from '@adyen/ui-assets-icons-16/vue/skip-right';\n import ChevronLeft from '@adyen/ui-assets-icons-16/vue/chevron-left-small';\n import ChevronRight from '@adyen/ui-assets-icons-16/vue/chevron-right-small';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = withDefaults(\n defineProps<{\n /**\n * Use to determine if the pager has a \"next page\".\n */\n hasNext?: boolean;\n\n /**\n * The current page number of the pager.\n */\n page: number;\n\n /**\n * The current page number of the pager.\n */\n totalPages?: number;\n }>(),\n {\n hasNext: null,\n totalPages: null,\n }\n );\n\n const emit = defineEmits<{\n (e: 'navigate', value: number);\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const isCurrentPageFirst = computed(() => props.page === 1);\n const isCurrentPageLast = computed(() => props.page === props.totalPages);\n const isNextButtonDisabled = computed(() => {\n const hasNoNextPage = !props.hasNext;\n return hasNoNextPage || isCurrentPageLast.value;\n });\n const isLastPageButtonDisabled = computed(() => {\n const hasNoNextPage = !props.hasNext;\n const hasNoTotalPagesNumber = !props.totalPages;\n\n return hasNoNextPage || isCurrentPageLast.value || hasNoTotalPagesNumber;\n });\n\n const navigate = (pageArg: number) => {\n emit('navigate', pageArg);\n };\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination-controls.scss\" />\n","<template>\n <div class=\"b-pagination\">\n <nav :aria-label=\"computedAriaLabel\" class=\"b-pagination__navigation\" :class=\"navigationConditionalClasses()\">\n <bento-pagination-results-per-page\n v-if=\"!hidePageSize\"\n class=\"b-pagination__results-per-page\"\n :items-per-page=\"size\"\n :total-count=\"totalCount\"\n @select=\"onItemsPerPageChange\"\n />\n <bento-typography v-else-if=\"hasSlot('default')\"><slot /></bento-typography>\n\n <div class=\"b-pagination__page-navigator\">\n <bento-pagination-context\n class=\"b-pagination__context\"\n :total-pages=\"totalPages\"\n :page=\"page\"\n :total-count=\"totalCount\"\n :virtual-scroll=\"virtualScroll\"\n @page-selected=\"onPageSelected\"\n />\n\n <div class=\"b-pagination__divider\"></div>\n\n <bento-pagination-controls\n class=\"b-pagination__controls\"\n :has-next=\"hasNext\"\n :page=\"page\"\n :total-pages=\"totalPages\"\n @navigate=\"navigate\"\n />\n </div>\n </nav>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, toRefs, useAttrs, useSlots } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import BentoPaginationResultsPerPage from './components/pagination-results-per-page/pagination-results-per-page.vue';\n import BentoPaginationContext from './components/pagination-context/pagination-context.vue';\n import BentoPaginationControls from './components/pagination-controls/pagination-controls.vue';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useHasSlot } from '@/composables';\n\n const props = withDefaults(\n defineProps<{\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * A brief description of the purpose of the navigation (for a11y).\n * Omit the term \"navigation\", as the screen reader will read both the role and the contents of the label.\n */\n ariaLabel?: string;\n\n /**\n * Use to determine if the pager has a \"next page\".\n */\n hasNext?: boolean;\n\n /**\n * Toggles the visibility of the \"results per page\" part of the pagination component.\n */\n hidePageSize?: boolean;\n\n /**\n * The current page number of the pager.\n */\n page?: number;\n\n /**\n * The size of the items the pager is paging through.\n */\n size?: number;\n\n /**\n * The total number of items the pager is paging through.\n */\n totalCount?: number;\n\n /**\n * Enables virtual scrolling on all dropdowns if set to true.\n */\n virtualScroll?: boolean;\n }>(),\n {\n ariaLabel: null,\n hasNext: null,\n hidePageSize: false,\n page: 1,\n size: 20,\n totalCount: null,\n virtualScroll: false,\n }\n );\n\n const emit = defineEmits<{\n /**\n * Triggered when the navigation controls are clicked or the items per page is changed (i.e. when the arrow buttons to the\n * rightmost of the screen or either dropdown is updated). It indicates to which page it should go next and also the page size.\n */\n (e: 'navigate', page: number, items?: number): void;\n\n /**\n * Triggered when the number of items per page is changed from the left hand dropdown.\n * It indicates the new number of items that will be displayed.\n */\n (e: 'items-page', size: number): void;\n\n /**\n * Triggered when the navigation controls are clicked, whether the arrow buttons to the\n * right most of the screen or the dropdown on the right hand is updated.\n * It indicates to which page it should go next\n * (easily achieved using the [sync modifier](https://v2.vuejs.org/v2/guide/components-custom-events.html#sync-Modifier))\n * e.g. `:page.sync=\"currentPage\"`\n */\n (e: 'update:page', page: number): void;\n\n /**\n * Triggered when the number of items per page is changed from the left hand dropdown.\n * It indicates the new number of items that will be displayed.\n * (easily achieved using the [sync modifier](https://v2.vuejs.org/v2/guide/components-custom-events.html#sync-Modifier))\n * e.g. `:size.sync=\"itemsPerPage\"`\n */\n (e: 'update:size', size: number): void;\n }>();\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const attrs = useAttrs();\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n });\n\n const totalPages = computed(() =>\n !props.totalCount || !props.size ? null : Math.ceil(props.totalCount / props.size)\n );\n\n const navigate = (pageArg: number, itemsPerPage?: number) => {\n if (props.hidePageSize) {\n emit('navigate', pageArg);\n } else {\n emit('navigate', pageArg, itemsPerPage ?? props?.size);\n }\n emit('update:page', pageArg);\n };\n\n const onPageSelected = (pageNumber: number) => {\n navigate(pageNumber);\n };\n\n const onItemsPerPageChange = (elements: number) => {\n emit('items-page', elements);\n emit('update:size', elements);\n\n // Always go to first page when the\n // number of items page changes\n navigate(1, elements);\n };\n\n const navigationConditionalClasses = () => ({\n 'b-pagination__navigation--only-page-navigator': !hasSlot('default') && props.hidePageSize,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Paginiation component to help users page through data sets.\n *\n * There are two ways of doing navigation in this component:\n * 1. (Basic) You tell the component if there is a next page (hasNext)\n * 2. (Enhanced) You tell the component:\n * - How many total items exist (totalCount)\n * - The max number of items that you show/fetch per page (size)\n * - In this case you should not set the hasNext props\n *\n * If you have the data available and opt to use the Enhanced way you get extra controls:\n * - Page dropdown selector\n * - Last page button\n * - \"Showing 10 of 200 items\" text\n *\n * @usage\n * import { BentoPagination } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoPagination },\n * template: `\n * <bento-pagination :has-next=\"isNextPage\" />\n * `,\n * }\n */\n\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination.scss\" />\n"],"names":["__default__$3","messages$2","PREDEFINED_RESULTS_PER_PAGE_VALUES","props","__props","emit","__emit","t","useI18n","dropdownId","generateUid","dropdownOptions","ref","i18nComponent","getI18nComponent","onSelectChange","selectedNumberOfResults","translationPathKey","computed","__default__$2","messages$1","onPageSelectChange","selectedPage","transformIntoOption","value","transformToPageNumber","_","index","listOfAvailablePages","uuid$3","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","uuid$2","uuid$1","uuid","__default__$1","messages","isCurrentPageFirst","isCurrentPageLast","isNextButtonDisabled","isLastPageButtonDisabled","hasNoNextPage","hasNoTotalPagesNumber","navigate","pageArg","__default__","slots","useSlots","hasSlot","useHasSlot","attrs","useAttrs","ariaLabelAttribute","ariaLabel","toRefs","computedAriaLabel","useAriaLabel","totalPages","itemsPerPage","onPageSelected","pageNumber","onItemsPerPageChange","elements","navigationConditionalClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAgFIA,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;AA5CA,UAAAC,IAAA;AAAA,MAA2C,EAAA,OAAA,MAAA,OAAA,GAAA;AAAA,MACd,EAAA,OAAA,MAAA,OAAA,GAAA;AAAA,MACA,EAAA,OAAA,MAAA,OAAA,GAAA;AAAA,MACA,EAAA,OAAA,MAAA,OAAA,GAAA;AAAA,MACA,EAAA,OAAA,OAAA,OAAA,IAAA;AAAA,IACE,GAG/BC,IAAAC,GAiBAC,IAAAC,GAIA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAP,EAAA,CAAA,GACAQ,IAAAC,EAAA,sCAAA,GACAC,IAAAC,EAAAV,CAAA,GACAW,IAAAC,EAAA,GAEAC,IAAA,CAAAC,MAAA;AACI,MAAAX,EAAA,UAAAW,CAAA;AAAA,IAAsC,GAG1CC,IAAAC,EAAA,MAAAf,EAAA,aAAA,0BAAA,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CCOAgB,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;AA9CA,UAAAjB,IAAAC,GAuBAC,IAAAC,GAIA,EAAA,GAAAC,EAAA,IAAAC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;;;;;;;AAzJA,UAAA7C,IAAAC,GAoDAC,IAAAC,GA+BA2C,IAAAC,EAAA,GACAC,IAAAC,GAAAH,CAAA,GAEAI,IAAAC,EAAA,GACAC,IAAA3C,EAAAyC,EAAA,YAAA,CAAA,GACA,EAAA,WAAAG,EAAA,IAAAC,EAAAtD,CAAA,GACAuD,IAAAC,EAAA;AAAA,MAAuC,WAAAJ,EAAA;AAAA;AAAA,MACL,OAAAC;AAAA,IAEvB,CAAA,GAGXI,IAAA1C;AAAA,MAAmB,MAAA,CAAAf,EAAA,cAAA,CAAAA,EAAA,OAAA,OAAA,KAAA,KAAAA,EAAA,aAAAA,EAAA,IAAA;AAAA,IACkE,GAGrF2C,IAAA,CAAAC,GAAAc,MAAA;AACI,MAAA1D,EAAA,eACIE,EAAA,YAAA0C,CAAA,IAEA1C,EAAA,YAAA0C,GAAAc,MAAA1D,KAAA,gBAAAA,EAAA,KAAA,GAEJE,EAAA,eAAA0C,CAAA;AAAA,IAA2B,GAG/Be,IAAA,CAAAC,MAAA;AACI,MAAAjB,EAAAiB,CAAA;AAAA,IAAmB,GAGvBC,IAAA,CAAAC,MAAA;AACI,MAAA5D,EAAA,cAAA4D,CAAA,GACA5D,EAAA,eAAA4D,CAAA,GAIAnB,EAAA,GAAAmB,CAAA;AAAA,IAAoB,GAGxBC,IAAA,OAAA;AAAA,MAA4C,iDAAA,CAAAf,EAAA,SAAA,KAAAhD,EAAA;AAAA,IACsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[2,3,4,5]}
@@ -1,6 +1,6 @@
1
1
  import { ref as m, watch as _, defineComponent as b, toRef as g, computed as k, inject as S, resolveComponent as p, createElementBlock as l, openBlock as r, createElementVNode as y, createBlock as u, normalizeClass as I, toDisplayString as h, withCtx as v, createTextVNode as C } from "vue";
2
2
  import { B as E } from "./typography.DN5eC5ch.js";
3
- import { S as B } from "./summary-grid.keys.BBbFrFGF.js";
3
+ import { S as B } from "./summary-grid.keys.CxTf_FOc.js";
4
4
  import w from "@adyen/ui-assets-payment-method-icons/vue/unknowncard";
5
5
  import { _ as M } from "./_plugin-vue_export-helper.CHgC5LLL.js";
6
6
  import "../assets/payment-method.css";
@@ -100,4 +100,4 @@ const z = /* @__PURE__ */ M(L, [["render", Y], ["__scopeId", "data-v-7ceb550e"]]
100
100
  export {
101
101
  z as B
102
102
  };
103
- //# sourceMappingURL=payment-method.2IeC7f4x.js.map
103
+ //# sourceMappingURL=payment-method.NguqkTwG.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"payment-method.2IeC7f4x.js","sources":["../../../vue2/src/components/payment-method/composables/use-payment-icon/use-payment-icon.ts","../../../vue2/src/components/payment-method/payment-method.vue"],"sourcesContent":["import { ref, Ref, watch } from 'vue';\n\n/**\n * Generates the payment icon URl from a payment icons string.\n * @param paymentType - the payment icon you wish to generate a URL for.\n * @returns the payment icon URL to the SVG for a specific payment icon.\n */\nexport const paymentMethodToCdnUrl = (paymentType: string) =>\n `https://checkoutshopper-live.cdn.adyen.com/checkoutshopper/images/logos/${paymentType.toLowerCase()}.svg`;\n\n/**\n * Dynamically retrieves the payment method icon SVG from the @adyen/ui-assets-payment-method-icons package.\n *\n * @param type the type of payment method\n * @param useFallback if fallback icon should be used in case of error\n * @returns\n */\nexport const usePaymentIcon = (type: Ref<string>) => {\n const paymentType = ref(type);\n const paymentIconSrc = ref<string>();\n\n watch(\n paymentType,\n newPaymentType => {\n if (newPaymentType == null || newPaymentType === 'Unknowncard') {\n return;\n }\n // TODO: what about when to use checkoutshopper-test? Should we add this to the config of Bento?\n paymentIconSrc.value = paymentMethodToCdnUrl(newPaymentType);\n },\n { immediate: true }\n );\n\n return paymentIconSrc;\n};\n","<template>\n <div class=\"b-payment-method\">\n <div class=\"b-payment-method__icon-container\">\n <img\n v-if=\"type !== 'Unknowncard' && !hasErroredOnImage\"\n aria-hidden=\"true\"\n class=\"b-payment-method__icon\"\n :class=\"conditionalIconClasses\"\n :alt=\"label\"\n :src=\"paymentMethodIconSrc\"\n @error=\"onSrcError\"\n />\n <unknown-card-icon v-else :svg-title=\"label\" aria-hidden=\"true\" />\n </div>\n <div class=\"b-payment-method__label\">\n <span v-if=\"isSummaryGridLayout\">{{ label }}</span>\n <bento-typography v-else el=\"span\">{{ label }}</bento-typography>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, inject, ref, toRef, watch } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { SUMMARY_GRID_LAYOUT_INJECTION_KEY } from '@/components/summary-grid/summary-grid.keys';\n import { BentoSummaryGridLayout } from '@/components/summary-grid';\n import { usePaymentIcon } from './composables/use-payment-icon/use-payment-icon';\n import UnknownCardIcon from '@adyen/ui-assets-payment-method-icons/vue/unknowncard';\n\n /**\n * A payment method type component to display the type's icon and label.\n *\n * @example\n * import { BentoPaymentMethod} from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoPaymentMethod },\n * template: `\n * <bento-payment-method type=\"Ideal\" />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-payment-method',\n components: { BentoTypography, UnknownCardIcon },\n props: {\n /**\n * The type of payment method to display.\n */\n type: {\n type: String,\n default: 'Unknowncard',\n },\n\n /**\n * The label describing to the payment method icon.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Render payment method icon in a smaller size\n */\n small: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n const type = toRef(props, 'type');\n const hasErroredOnImage = ref(false);\n const paymentMethodIconSrc = usePaymentIcon(type);\n const conditionalIconClasses = computed(() => ({\n 'b-payment-method__icon--small': props.small,\n }));\n\n /* == Summary-grid styles == */\n const registerPaymentMethodInSummaryGrid: BentoSummaryGridLayout = inject(\n SUMMARY_GRID_LAYOUT_INJECTION_KEY,\n () => ({\n isSummaryGridLayout: false,\n })\n );\n\n const { isSummaryGridLayout } = registerPaymentMethodInSummaryGrid();\n\n /**\n * This funciton is fired if the payment image source is not valid and has thrown an error.\n */\n const onSrcError = () => {\n hasErroredOnImage.value = true;\n };\n\n // Reset the image error to be able to load the new payment type\n watch(\n () => type.value,\n (newType, oldType) => {\n if (newType !== oldType) {\n hasErroredOnImage.value = false;\n }\n }\n );\n\n return {\n // Values\n conditionalIconClasses,\n hasErroredOnImage,\n isSummaryGridLayout,\n paymentMethodIconSrc,\n\n // Methods\n onSrcError,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./payment-method.scss\" />\n"],"names":["paymentMethodToCdnUrl","paymentType","usePaymentIcon","type","ref","paymentIconSrc","watch","newPaymentType","_sfc_main","defineComponent","BentoTypography","UnknownCardIcon","props","toRef","hasErroredOnImage","paymentMethodIconSrc","conditionalIconClasses","computed","registerPaymentMethodInSummaryGrid","inject","SUMMARY_GRID_LAYOUT_INJECTION_KEY","isSummaryGridLayout","onSrcError","newType","oldType","_hoisted_1","_hoisted_2","_hoisted_3","createElementVNode","_ctx","openBlock","createElementBlock","normalizeClass","createBlock","_component_unknown_card_icon","_hoisted_4","_hoisted_5","toDisplayString","_component_bento_typography","createTextVNode"],"mappings":";;;;;;AAOO,MAAAA,IAAA,CAAAC,MAAA,2EAAAA,EAAA,YAAA,CAAA,QAUMC,IAAA,CAAAC,MAAA;AACT,QAAAF,IAAAG,EAAAD,CAAA,GACAE,IAAAD,EAAA;AAEA,SAAAE;AAAA,IAAAL;AAAA,IACI,CAAAM,MAAA;AAEI,MAAAA,KAAA,QAAAA,MAAA,kBAIAF,EAAA,QAAAL,EAAAO,CAAA;AAAA,IAA2D;AAAA,IAC/D,EAAA,WAAA,GAAA;AAAA,EACkB,GAGtBF;AACJ,GCQIG,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,iBAAAC,GAAA,iBAAAC,EAAA;AAAA,EACyC,OAAA;AAAA;AAAA;AAAA;AAAA,IACxC,MAAA;AAAA,MAIG,MAAA;AAAA,MACI,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,OAAA;AAAA,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AAAF,CAAA,MAAAG,EAAA,GAAAG,EAAAC,GAAA;AAAA,QAAvB,KAAA;AAAA,QAAE,aAAAL,EAAA;AAAA;MAEjD,GAAA,MAAA,GAAA,CAAA,WAAA,CAAA;AAAA,IAAA,CAAA;AAAA,IACID,EAAA,OAAAO,GAAA;AAAA,MAAAN,EAAA,uBAAAC,EAAA,GAAAC,EAAA,QAAAK,GAAAC,EAAAR,EAAA,KAAA,GAAA,CAAA,MAAAC,EAAA,GAAAG,EAAAK,GAAA;AAAA,QACkC,KAAA;AAAA,QAhB9C,IAAA;AAAA,MAAA,GAAA;AAAA;UAAAC,EAAAF,EAAAR,EAAA,KAAA,GAAA,CAAA;AAAA,QAAA,CAAA;AAAA;;;;;;"}
1
+ {"version":3,"file":"payment-method.NguqkTwG.js","sources":["../../../vue2/src/components/payment-method/composables/use-payment-icon/use-payment-icon.ts","../../../vue2/src/components/payment-method/payment-method.vue"],"sourcesContent":["import { ref, Ref, watch } from 'vue';\n\n/**\n * Generates the payment icon URl from a payment icons string.\n * @param paymentType - the payment icon you wish to generate a URL for.\n * @returns the payment icon URL to the SVG for a specific payment icon.\n */\nexport const paymentMethodToCdnUrl = (paymentType: string) =>\n `https://checkoutshopper-live.cdn.adyen.com/checkoutshopper/images/logos/${paymentType.toLowerCase()}.svg`;\n\n/**\n * Dynamically retrieves the payment method icon SVG from the @adyen/ui-assets-payment-method-icons package.\n *\n * @param type the type of payment method\n * @param useFallback if fallback icon should be used in case of error\n * @returns\n */\nexport const usePaymentIcon = (type: Ref<string>) => {\n const paymentType = ref(type);\n const paymentIconSrc = ref<string>();\n\n watch(\n paymentType,\n newPaymentType => {\n if (newPaymentType == null || newPaymentType === 'Unknowncard') {\n return;\n }\n // TODO: what about when to use checkoutshopper-test? Should we add this to the config of Bento?\n paymentIconSrc.value = paymentMethodToCdnUrl(newPaymentType);\n },\n { immediate: true }\n );\n\n return paymentIconSrc;\n};\n","<template>\n <div class=\"b-payment-method\">\n <div class=\"b-payment-method__icon-container\">\n <img\n v-if=\"type !== 'Unknowncard' && !hasErroredOnImage\"\n aria-hidden=\"true\"\n class=\"b-payment-method__icon\"\n :class=\"conditionalIconClasses\"\n :alt=\"label\"\n :src=\"paymentMethodIconSrc\"\n @error=\"onSrcError\"\n />\n <unknown-card-icon v-else :svg-title=\"label\" aria-hidden=\"true\" />\n </div>\n <div class=\"b-payment-method__label\">\n <span v-if=\"isSummaryGridLayout\">{{ label }}</span>\n <bento-typography v-else el=\"span\">{{ label }}</bento-typography>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, inject, ref, toRef, watch } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { SUMMARY_GRID_LAYOUT_INJECTION_KEY } from '@/components/summary-grid/summary-grid.keys';\n import { BentoSummaryGridLayout } from '@/components/summary-grid';\n import { usePaymentIcon } from './composables/use-payment-icon/use-payment-icon';\n import UnknownCardIcon from '@adyen/ui-assets-payment-method-icons/vue/unknowncard';\n\n /**\n * A payment method type component to display the type's icon and label.\n *\n * @example\n * import { BentoPaymentMethod} from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoPaymentMethod },\n * template: `\n * <bento-payment-method type=\"Ideal\" />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-payment-method',\n components: { BentoTypography, UnknownCardIcon },\n props: {\n /**\n * The type of payment method to display.\n */\n type: {\n type: String,\n default: 'Unknowncard',\n },\n\n /**\n * The label describing to the payment method icon.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Render payment method icon in a smaller size\n */\n small: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n const type = toRef(props, 'type');\n const hasErroredOnImage = ref(false);\n const paymentMethodIconSrc = usePaymentIcon(type);\n const conditionalIconClasses = computed(() => ({\n 'b-payment-method__icon--small': props.small,\n }));\n\n /* == Summary-grid styles == */\n const registerPaymentMethodInSummaryGrid: BentoSummaryGridLayout = inject(\n SUMMARY_GRID_LAYOUT_INJECTION_KEY,\n () => ({\n isSummaryGridLayout: false,\n })\n );\n\n const { isSummaryGridLayout } = registerPaymentMethodInSummaryGrid();\n\n /**\n * This funciton is fired if the payment image source is not valid and has thrown an error.\n */\n const onSrcError = () => {\n hasErroredOnImage.value = true;\n };\n\n // Reset the image error to be able to load the new payment type\n watch(\n () => type.value,\n (newType, oldType) => {\n if (newType !== oldType) {\n hasErroredOnImage.value = false;\n }\n }\n );\n\n return {\n // Values\n conditionalIconClasses,\n hasErroredOnImage,\n isSummaryGridLayout,\n paymentMethodIconSrc,\n\n // Methods\n onSrcError,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./payment-method.scss\" />\n"],"names":["paymentMethodToCdnUrl","paymentType","usePaymentIcon","type","ref","paymentIconSrc","watch","newPaymentType","_sfc_main","defineComponent","BentoTypography","UnknownCardIcon","props","toRef","hasErroredOnImage","paymentMethodIconSrc","conditionalIconClasses","computed","registerPaymentMethodInSummaryGrid","inject","SUMMARY_GRID_LAYOUT_INJECTION_KEY","isSummaryGridLayout","onSrcError","newType","oldType","_hoisted_1","_hoisted_2","_hoisted_3","createElementVNode","_ctx","openBlock","createElementBlock","normalizeClass","createBlock","_component_unknown_card_icon","_hoisted_4","_hoisted_5","toDisplayString","_component_bento_typography","createTextVNode"],"mappings":";;;;;;AAOO,MAAAA,IAAA,CAAAC,MAAA,2EAAAA,EAAA,YAAA,CAAA,QAUMC,IAAA,CAAAC,MAAA;AACT,QAAAF,IAAAG,EAAAD,CAAA,GACAE,IAAAD,EAAA;AAEA,SAAAE;AAAA,IAAAL;AAAA,IACI,CAAAM,MAAA;AAEI,MAAAA,KAAA,QAAAA,MAAA,kBAIAF,EAAA,QAAAL,EAAAO,CAAA;AAAA,IAA2D;AAAA,IAC/D,EAAA,WAAA,GAAA;AAAA,EACkB,GAGtBF;AACJ,GCQIG,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,iBAAAC,GAAA,iBAAAC,EAAA;AAAA,EACyC,OAAA;AA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AAC,EAAA,CAAA,0BAAAH,EAAA,sBAAA,CAAA;AAAA,QACe,KAAAA,EAAA;AAAA,QACpB,KAAAA,EAAA;AAAA;MAEwD,GAAA,MAAA,IAAAF,CAAA,MAAAG,EAAA,GAAAG,EAAAC,GAAA;AAAA,QAAvB,KAAA;AAAA,QAAE,aAAAL,EAAA;AAAA;MAEjD,GAAA,MAAA,GAAA,CAAA,WAAA,CAAA;AAAA,IAAA,CAAA;AAAA,IACID,EAAA,OAAAO,GAAA;AAAA,MAAAN,EAAA,uBAAAC,EAAA,GAAAC,EAAA,QAAAK,GAAAC,EAAAR,EAAA,KAAA,GAAA,CAAA,MAAAC,EAAA,GAAAG,EAAAK,GAAA;AAAA,QACkC,KAAA;AAAA,QAhB9C,IAAA;AAAA,MAAA,GAAA;AAAA;UAAAC,EAAAF,EAAAR,EAAA,KAAA,GAAA,CAAA;AAAA,QAAA,CAAA;AAAA;;;;;;"}
@@ -7,7 +7,7 @@ import { B as X } from "./button.Cneb6rPP.js";
7
7
  import { C as Z } from "./cross.BZYw4R3N.js";
8
8
  import { u as tt } from "./use-has-slot.B7eQSabc.js";
9
9
  import { u as et } from "./aria-label.CaUURpnB.js";
10
- import { c as $, B as ot } from "./button-actions.DBgK5Qwo.js";
10
+ import { c as $, B as ot } from "./button-actions.ncthaz2m.js";
11
11
  import "../assets/popover.css";
12
12
  const at = C({
13
13
  components: { BentoTypography: Q },
@@ -339,4 +339,4 @@ export {
339
339
  N as a,
340
340
  ct as b
341
341
  };
342
- //# sourceMappingURL=popover.Bzb-pzfB.js.map
342
+ //# sourceMappingURL=popover.NEP6wuPa.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover.Bzb-pzfB.js","sources":["../../../vue2/src/components/popover/components/popover-title/popover-title.vue","../../../vue2/src/components/popover/components/popover-dismiss-button/popover-dismiss-button.vue","../../../vue2/src/components/popover/popover.types.ts","../../../vue2/src/components/popover/popover.keys.ts","../../../vue2/src/components/filter-bar/components/input-filter/input-filter.keys.ts","../../../vue2/src/components/filter-bar/components/input-with-dropdown-filter/input-with-dropdown-filter.keys.ts","../../../vue2/src/components/popover/popover.vue"],"sourcesContent":["<template>\n <bento-typography :strongest=\"isStrongest\" :variant=\"titleVariant\" el=\"span\">\n {{ title }}\n </bento-typography>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoTypography, BentoTypographyVariant } from '@/components/typography';\n\n export default defineComponent({\n components: { BentoTypography },\n props: {\n /**\n * Indicates if the popover contains an image.\n */\n isImageTitle: { type: Boolean, default: false },\n\n /**\n * Indicates the title you want to give the popover.\n */\n title: { type: String, default: null },\n },\n setup(props) {\n // Use strongest only when it has no image\n const isStrongest = computed(() => !props.isImageTitle);\n\n // If an image is present, change the variant from BODY to SUBTITLE and remove the \"strongest\" property of the title\n const titleVariant = computed(() =>\n props.isImageTitle ? BentoTypographyVariant.SUBTITLE : BentoTypographyVariant.BODY\n );\n\n return {\n // Values\n isStrongest,\n titleVariant,\n };\n },\n });\n</script>\n","<template>\n <bento-button :class=\"conditionalClass\" variant=\"tertiary\" @click=\"$emit('click')\">\n <template #iconLeft>\n <cross-icon svg-title=\"dismiss\" />\n </template>\n </bento-button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoButton } from '@/components/button';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n export default defineComponent({\n name: 'bento-popover-dismiss-button',\n components: { BentoButton, CrossIcon },\n props: {\n onImage: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n const conditionalClass = computed(() => ({ 'b-popover-dismiss-button--on-image': props.onImage }));\n\n return {\n // Values\n conditionalClass,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./popover-dismiss-button.scss\" />\n","import { PopperContainerPosition } from '../popper-container';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport const BentoPopoverPositions = { ...PopperContainerPosition };\nexport type BentoPopoverPositions = PopperContainerPosition;\n","export const POPOVER_OFFSET_INJECTION_KEY = Symbol('popover offset injection key');\n","/**\n * @deprecated from version 2.0.0. Use BentoFilterItemType.INPUT_DROPDOWN and INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY instead.\n */\nexport const INPUT_FILTER_POPOVER_INJECTION_KEY = Symbol('input field popover injection key');\n","export const INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY = Symbol('input field popover injection key');\n","<template>\n <Transition name=\"b-popover__animation\">\n <popper-container\n v-if=\"open\"\n :id=\"computedAttributes['id']\"\n :aria-role=\"PopperContainerAriaRole.POPOVER\"\n :aria-label=\"computedAriaLabel\"\n :arrow=\"{ classes: ['b-popover__arrow'] }\"\n :disabled-focus-trap=\"disableFocusTrap\"\n :class=\"conditionalClasses\"\n :fallback-position=\"fallbackPosition\"\n :fixed-positioning=\"fixedPositioning\"\n :offset=\"[0, offset]\"\n :position=\"position\"\n :target-element=\"targetElement\"\n class=\"b-popover\"\n @placement=\"$emit('placement', $event)\"\n >\n <div v-if=\"hasSlot('image')\" class=\"b-popover__image\">\n <div v-if=\"dismissible\" class=\"b-popover__image-dismiss-button\">\n <bento-popover-dismiss-button on-image @click=\"dismissPopover\" />\n </div>\n <slot name=\"image\"></slot>\n </div>\n <div v-if=\"title\" class=\"b-popover__header\">\n <div class=\"b-popover__header-title\">\n <slot v-if=\"hasSlot('headerIcon')\" name=\"headerIcon\"></slot>\n <bento-popover-title :title=\"title\" :is-image-title=\"!!hasSlot('image')\" />\n </div>\n <div v-if=\"dismissible && !hasSlot('image')\">\n <bento-popover-dismiss-button @click=\"dismissPopover\" />\n </div>\n </div>\n\n <div v-if=\"hasSlot('default')\" class=\"b-popover__content\" :class=\"contentConditionalClasses\">\n <slot></slot>\n </div>\n\n <div v-if=\"actions\" class=\"b-popover__footer\">\n <bento-button-actions :actions=\"actions\" :layout=\"actionsLayout\"></bento-button-actions>\n </div>\n </popper-container>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, PropType, ref, toRefs, useAttrs, useSlots } from 'vue';\n\n import { BentoButtonActions, BentoButtonActionsLayout, BentoButtonActionsList } from '@/components/button';\n import { PopperContainer, PopperContainerAriaRole } from '@/components/popper-container';\n import BentoPopoverTitle from './components/popover-title/popover-title.vue';\n import BentoPopoverDismissButton from './components/popover-dismiss-button/popover-dismiss-button.vue';\n\n import { BentoPopoverPositions } from './popover.types';\n import { Placement } from '@floating-ui/vue';\n\n import { useHasSlot } from '@/composables';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n\n import { POPOVER_OFFSET_INJECTION_KEY } from './popover.keys';\n import { INPUT_FILTER_POPOVER_INJECTION_KEY } from '@/components/filter-bar/components/input-filter/input-filter.keys';\n import { INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY } from '@/components/filter-bar/components/input-with-dropdown-filter/input-with-dropdown-filter.keys';\n\n const DEFAULT_OFFSET = 2;\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',\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 * Defines the layout in which the button actions is presented.\n * It can be one of:\n *\n * @values BUTTONS_END\n * @values FILL_CONTAINER\n * @values SPACE_BETWEEN\n * @values VERTICAL_STACK\n */\n actionsLayout: {\n type: String as PropType<BentoButtonActionsLayout | `${BentoButtonActionsLayout}`>,\n default: BentoButtonActionsLayout.BUTTONS_END,\n validator: (value: BentoButtonActionsLayout) => Object.values(BentoButtonActionsLayout).includes(value),\n },\n\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Defines a string value that provides an accessible name for the popover.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Adds a divider line to the actions section, reduces the top/bottom paddings and removes all padding in the \"default\" slot.\n */\n divider: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Supports disabling focus trap functionality to avoid scroll into view behavior when we don't need it.\n * */\n disableFocusTrap: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Adds a \"dismiss\" icon that triggers the \"dismiss\" event. Requires the `title` prop to be set.\n */\n dismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Allows to configure to fallback position to the one specified, it could be ['right', 'top', ...].\n * Useful when not using auto as starting placement.\n * https://floating-ui.com/docs/flip#fallbackplacements\n */\n fallbackPosition: {\n type: Array as PropType<Placement[]>,\n default: () => ['bottom-start', 'right-start', 'top-start', 'left-start'],\n },\n\n /**\n * Sets the size of the container to fit its content\n */\n fitContent: { type: Boolean, default: false },\n\n /**\n * Instructs popover to be visible outside of the containing container.\n * Useful when component would be used in limited containers like Modal, Side panel, etc.\n * @see {@link https://floating-ui.com/docs/usefloating#strategy}\n */\n fixedPositioning: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Toggles the popover open and closed\n */\n open: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displays the popover in a large size.\n */\n large: {\n type: Boolean,\n default: false,\n },\n\n /**\n * @deprecated\n * NOTE: This property no longer functions since moving to the floating-ui framework.\n */\n modifiers: { type: Array, default: null },\n\n /**\n * Popover's position relative to the target element.\n * Possible values are:\n * 'auto', 'auto-start', 'auto-end',\n * 'top', 'top-start', 'top-end'\n * 'right', 'right-start', 'right-end'\n * 'bottom', 'bottom-start', 'bottom-end'\n * 'left', 'left-start', 'left-end'\n */\n position: {\n type: String as PropType<BentoPopoverPositions | `${BentoPopoverPositions}`>,\n default: BentoPopoverPositions.BOTTOM_START,\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n\n /**\n * Displays the popover in a small size.\n */\n small: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Indicates the title you want to give the popover.\n */\n title: {\n type: String,\n default: null,\n },\n\n /**\n * Popover's target element.\n * The popover will position itself relatively to target element, in specified position.\n */\n targetElement: {\n type: PopperContainer.props?.targetElement.type,\n required: true,\n },\n /**\n * Displays the popover without padding.\n */\n withoutSpace: {\n type: Boolean,\n default: false,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Triggered when the `dismiss` button is clicked\n */\n (e: 'dismiss'): void;\n /**\n * Triggered when the popover `placement` changes\n */\n (e: 'placement', placement: Placement): void;\n }>();\n\n const slots = useSlots();\n const attrs = useAttrs();\n\n const computedAttributes = computed(() => ({\n id: attrs.id?.toString() as string,\n }));\n\n const offset = inject<number>(POPOVER_OFFSET_INJECTION_KEY, DEFAULT_OFFSET);\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel, title } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: title,\n });\n\n const isOverflowVisible =\n inject(INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY, false) ||\n inject(INPUT_FILTER_POPOVER_INJECTION_KEY, false);\n\n const conditionalClasses = computed(() => ({\n 'b-popover--small': props.small && !props.large,\n 'b-popover--with-divider': !!props.divider,\n 'b-popover--large': props.large && !props.small,\n 'b-popover--fit-content': props.fitContent,\n 'b-popover--without-space': props.withoutSpace,\n 'b-popover--overflow-visible': isOverflowVisible,\n }));\n\n const contentConditionalClasses = computed(() => ({\n 'b-popover__content--with-title': !!props.title,\n }));\n\n const dismissPopover = () => emit('dismiss');\n\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Example description of the component...\n *\n * @example\n * import { BentoPopover } from '@adyen/adl-vue2';\n *\n * export default {\n * components: { BentoPopover },\n * template: `\n * <bento-popover id=\"your-popover-id\">\n * ...Example code of the component\n * </bento-popover>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./popover.scss\" />\n"],"names":["_sfc_main$2","defineComponent","BentoTypography","props","isStrongest","computed","titleVariant","BentoTypographyVariant","_component_bento_typography","resolveComponent","openBlock","createBlock","_ctx","createTextVNode","toDisplayString","_sfc_main$1","BentoButton","CrossIcon","_component_bento_button","normalizeClass","_cache","$event","createVNode","_component_cross_icon","BentoPopoverPositions","PopperContainerPosition","POPOVER_OFFSET_INJECTION_KEY","INPUT_FILTER_POPOVER_INJECTION_KEY","INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY","__default__","__props","emit","__emit","slots","useSlots","attrs","useAttrs","computedAttributes","_a","offset","inject","ariaLabelAttribute","ref","ariaLabel","title","toRefs","computedAriaLabel","useAriaLabel","isOverflowVisible","conditionalClasses","contentConditionalClasses","dismissPopover","hasSlot","useHasSlot"],"mappings":";;;;;;;;;;;AAUI,MAAAA,KAAAC,EAAA;AAAA,EAA+B,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACG,OAAA;AAAA;AAAA;AAAA;AAAA,IACvB,cAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAI2C,OAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA,EAKT;AAAA,EACzC,MAAAC,GAAA;AAGI,UAAAC,IAAAC,EAAA,MAAA,CAAAF,EAAA,YAAA,GAGAG,IAAAD;AAAA,MAAqB,MAAAF,EAAA,eAAAI,EAAA,WAAAA,EAAA;AAAA,IAC6D;AAGlF,WAAA;AAAA;AAAA,MAAO,aAAAH;AAAA,MAEH,cAAAE;AAAA,IACA;AAAA,EACJ;AAER,CAAA;;AAnCmB,QAAAE,IAAAC,EAAA,kBAAA;AAFyB,SAAAC,EAAA,GAAAC,EAAAH,GAAA;AAAA,IAAq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;AAAA,QAA2C,KAAAiC,IAAAH,EAAA,OAAA,gBAAAG,EAAA;AAAA,MAChB;AAAA,KAAA,GAG3BC,IAAAC,EAAAd,IAAA,CAAA,GAEAe,IAAAC,EAAAP,EAAA,YAAA,CAAA,GACA,EAAA,WAAAQ,GAAA,OAAAC,EAAA,IAAAC,EAAA1C,CAAA,GACA2C,IAAAC,GAAA;AAAA,MAAuC,WAAAN,EAAA;AAAA;AAAA,MACL,OAAAE;AAAA,MAEvB,iBAAAC;AAAA,IACU,CAAA,GAGrBI,IAAAR,EAAAZ,IAAA,EAAA,KAAAY,EAAAb,IAAA,EAAA,GAIAsB,IAAA5C,EAAA,OAAA;AAAA,MAA2C,oBAAAF,EAAA,SAAA,CAAAA,EAAA;AAAA,MACG,2BAAA,CAAA,CAAAA,EAAA;AAAA,MACP,oBAAAA,EAAA,SAAA,CAAAA,EAAA;AAAA,MACO,0BAAAA,EAAA;AAAA,MACV,4BAAAA,EAAA;AAAA,MACE,+BAAA6C;AAAA,IACH,EAAA,GAGnCE,IAAA7C,EAAA,OAAA;AAAA,MAAkD,kCAAA,CAAA,CAAAF,EAAA;AAAA,IACJ,EAAA,GAG9CgD,IAAA,MAAApB,EAAA,SAAA,GAEAqB,IAAAC,GAAApB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"popover.NEP6wuPa.js","sources":["../../../vue2/src/components/popover/components/popover-title/popover-title.vue","../../../vue2/src/components/popover/components/popover-dismiss-button/popover-dismiss-button.vue","../../../vue2/src/components/popover/popover.types.ts","../../../vue2/src/components/popover/popover.keys.ts","../../../vue2/src/components/filter-bar/components/input-filter/input-filter.keys.ts","../../../vue2/src/components/filter-bar/components/input-with-dropdown-filter/input-with-dropdown-filter.keys.ts","../../../vue2/src/components/popover/popover.vue"],"sourcesContent":["<template>\n <bento-typography :strongest=\"isStrongest\" :variant=\"titleVariant\" el=\"span\">\n {{ title }}\n </bento-typography>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoTypography, BentoTypographyVariant } from '@/components/typography';\n\n export default defineComponent({\n components: { BentoTypography },\n props: {\n /**\n * Indicates if the popover contains an image.\n */\n isImageTitle: { type: Boolean, default: false },\n\n /**\n * Indicates the title you want to give the popover.\n */\n title: { type: String, default: null },\n },\n setup(props) {\n // Use strongest only when it has no image\n const isStrongest = computed(() => !props.isImageTitle);\n\n // If an image is present, change the variant from BODY to SUBTITLE and remove the \"strongest\" property of the title\n const titleVariant = computed(() =>\n props.isImageTitle ? BentoTypographyVariant.SUBTITLE : BentoTypographyVariant.BODY\n );\n\n return {\n // Values\n isStrongest,\n titleVariant,\n };\n },\n });\n</script>\n","<template>\n <bento-button :class=\"conditionalClass\" variant=\"tertiary\" @click=\"$emit('click')\">\n <template #iconLeft>\n <cross-icon svg-title=\"dismiss\" />\n </template>\n </bento-button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoButton } from '@/components/button';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n export default defineComponent({\n name: 'bento-popover-dismiss-button',\n components: { BentoButton, CrossIcon },\n props: {\n onImage: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n const conditionalClass = computed(() => ({ 'b-popover-dismiss-button--on-image': props.onImage }));\n\n return {\n // Values\n conditionalClass,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./popover-dismiss-button.scss\" />\n","import { PopperContainerPosition } from '../popper-container';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport const BentoPopoverPositions = { ...PopperContainerPosition };\nexport type BentoPopoverPositions = PopperContainerPosition;\n","export const POPOVER_OFFSET_INJECTION_KEY = Symbol('popover offset injection key');\n","/**\n * @deprecated from version 2.0.0. Use BentoFilterItemType.INPUT_DROPDOWN and INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY instead.\n */\nexport const INPUT_FILTER_POPOVER_INJECTION_KEY = Symbol('input field popover injection key');\n","export const INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY = Symbol('input field popover injection key');\n","<template>\n <Transition name=\"b-popover__animation\">\n <popper-container\n v-if=\"open\"\n :id=\"computedAttributes['id']\"\n :aria-role=\"PopperContainerAriaRole.POPOVER\"\n :aria-label=\"computedAriaLabel\"\n :arrow=\"{ classes: ['b-popover__arrow'] }\"\n :disabled-focus-trap=\"disableFocusTrap\"\n :class=\"conditionalClasses\"\n :fallback-position=\"fallbackPosition\"\n :fixed-positioning=\"fixedPositioning\"\n :offset=\"[0, offset]\"\n :position=\"position\"\n :target-element=\"targetElement\"\n class=\"b-popover\"\n @placement=\"$emit('placement', $event)\"\n >\n <div v-if=\"hasSlot('image')\" class=\"b-popover__image\">\n <div v-if=\"dismissible\" class=\"b-popover__image-dismiss-button\">\n <bento-popover-dismiss-button on-image @click=\"dismissPopover\" />\n </div>\n <slot name=\"image\"></slot>\n </div>\n <div v-if=\"title\" class=\"b-popover__header\">\n <div class=\"b-popover__header-title\">\n <slot v-if=\"hasSlot('headerIcon')\" name=\"headerIcon\"></slot>\n <bento-popover-title :title=\"title\" :is-image-title=\"!!hasSlot('image')\" />\n </div>\n <div v-if=\"dismissible && !hasSlot('image')\">\n <bento-popover-dismiss-button @click=\"dismissPopover\" />\n </div>\n </div>\n\n <div v-if=\"hasSlot('default')\" class=\"b-popover__content\" :class=\"contentConditionalClasses\">\n <slot></slot>\n </div>\n\n <div v-if=\"actions\" class=\"b-popover__footer\">\n <bento-button-actions :actions=\"actions\" :layout=\"actionsLayout\"></bento-button-actions>\n </div>\n </popper-container>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, PropType, ref, toRefs, useAttrs, useSlots } from 'vue';\n\n import { BentoButtonActions, BentoButtonActionsLayout, BentoButtonActionsList } from '@/components/button';\n import { PopperContainer, PopperContainerAriaRole } from '@/components/popper-container';\n import BentoPopoverTitle from './components/popover-title/popover-title.vue';\n import BentoPopoverDismissButton from './components/popover-dismiss-button/popover-dismiss-button.vue';\n\n import { BentoPopoverPositions } from './popover.types';\n import { Placement } from '@floating-ui/vue';\n\n import { useHasSlot } from '@/composables';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n\n import { POPOVER_OFFSET_INJECTION_KEY } from './popover.keys';\n import { INPUT_FILTER_POPOVER_INJECTION_KEY } from '@/components/filter-bar/components/input-filter/input-filter.keys';\n import { INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY } from '@/components/filter-bar/components/input-with-dropdown-filter/input-with-dropdown-filter.keys';\n\n const DEFAULT_OFFSET = 2;\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',\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 * Defines the layout in which the button actions is presented.\n * It can be one of:\n *\n * @values BUTTONS_END\n * @values FILL_CONTAINER\n * @values SPACE_BETWEEN\n * @values VERTICAL_STACK\n */\n actionsLayout: {\n type: String as PropType<BentoButtonActionsLayout | `${BentoButtonActionsLayout}`>,\n default: BentoButtonActionsLayout.BUTTONS_END,\n validator: (value: BentoButtonActionsLayout) => Object.values(BentoButtonActionsLayout).includes(value),\n },\n\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Defines a string value that provides an accessible name for the popover.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Adds a divider line to the actions section, reduces the top/bottom paddings and removes all padding in the \"default\" slot.\n */\n divider: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Supports disabling focus trap functionality to avoid scroll into view behavior when we don't need it.\n * */\n disableFocusTrap: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Adds a \"dismiss\" icon that triggers the \"dismiss\" event. Requires the `title` prop to be set.\n */\n dismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Allows to configure to fallback position to the one specified, it could be ['right', 'top', ...].\n * Useful when not using auto as starting placement.\n * https://floating-ui.com/docs/flip#fallbackplacements\n */\n fallbackPosition: {\n type: Array as PropType<Placement[]>,\n default: () => ['bottom-start', 'right-start', 'top-start', 'left-start'],\n },\n\n /**\n * Sets the size of the container to fit its content\n */\n fitContent: { type: Boolean, default: false },\n\n /**\n * Instructs popover to be visible outside of the containing container.\n * Useful when component would be used in limited containers like Modal, Side panel, etc.\n * @see {@link https://floating-ui.com/docs/usefloating#strategy}\n */\n fixedPositioning: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Toggles the popover open and closed\n */\n open: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displays the popover in a large size.\n */\n large: {\n type: Boolean,\n default: false,\n },\n\n /**\n * @deprecated\n * NOTE: This property no longer functions since moving to the floating-ui framework.\n */\n modifiers: { type: Array, default: null },\n\n /**\n * Popover's position relative to the target element.\n * Possible values are:\n * 'auto', 'auto-start', 'auto-end',\n * 'top', 'top-start', 'top-end'\n * 'right', 'right-start', 'right-end'\n * 'bottom', 'bottom-start', 'bottom-end'\n * 'left', 'left-start', 'left-end'\n */\n position: {\n type: String as PropType<BentoPopoverPositions | `${BentoPopoverPositions}`>,\n default: BentoPopoverPositions.BOTTOM_START,\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n\n /**\n * Displays the popover in a small size.\n */\n small: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Indicates the title you want to give the popover.\n */\n title: {\n type: String,\n default: null,\n },\n\n /**\n * Popover's target element.\n * The popover will position itself relatively to target element, in specified position.\n */\n targetElement: {\n type: PopperContainer.props?.targetElement.type,\n required: true,\n },\n /**\n * Displays the popover without padding.\n */\n withoutSpace: {\n type: Boolean,\n default: false,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Triggered when the `dismiss` button is clicked\n */\n (e: 'dismiss'): void;\n /**\n * Triggered when the popover `placement` changes\n */\n (e: 'placement', placement: Placement): void;\n }>();\n\n const slots = useSlots();\n const attrs = useAttrs();\n\n const computedAttributes = computed(() => ({\n id: attrs.id?.toString() as string,\n }));\n\n const offset = inject<number>(POPOVER_OFFSET_INJECTION_KEY, DEFAULT_OFFSET);\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel, title } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: title,\n });\n\n const isOverflowVisible =\n inject(INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY, false) ||\n inject(INPUT_FILTER_POPOVER_INJECTION_KEY, false);\n\n const conditionalClasses = computed(() => ({\n 'b-popover--small': props.small && !props.large,\n 'b-popover--with-divider': !!props.divider,\n 'b-popover--large': props.large && !props.small,\n 'b-popover--fit-content': props.fitContent,\n 'b-popover--without-space': props.withoutSpace,\n 'b-popover--overflow-visible': isOverflowVisible,\n }));\n\n const contentConditionalClasses = computed(() => ({\n 'b-popover__content--with-title': !!props.title,\n }));\n\n const dismissPopover = () => emit('dismiss');\n\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Example description of the component...\n *\n * @example\n * import { BentoPopover } from '@adyen/adl-vue2';\n *\n * export default {\n * components: { BentoPopover },\n * template: `\n * <bento-popover id=\"your-popover-id\">\n * ...Example code of the component\n * </bento-popover>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./popover.scss\" />\n"],"names":["_sfc_main$2","defineComponent","BentoTypography","props","isStrongest","computed","titleVariant","BentoTypographyVariant","_component_bento_typography","resolveComponent","openBlock","createBlock","_ctx","createTextVNode","toDisplayString","_sfc_main$1","BentoButton","CrossIcon","_component_bento_button","normalizeClass","_cache","$event","createVNode","_component_cross_icon","BentoPopoverPositions","PopperContainerPosition","POPOVER_OFFSET_INJECTION_KEY","INPUT_FILTER_POPOVER_INJECTION_KEY","INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY","__default__","__props","emit","__emit","slots","useSlots","attrs","useAttrs","computedAttributes","_a","offset","inject","ariaLabelAttribute","ref","ariaLabel","title","toRefs","computedAriaLabel","useAriaLabel","isOverflowVisible","conditionalClasses","contentConditionalClasses","dismissPopover","hasSlot","useHasSlot"],"mappings":";;;;;;;;;;;AAUI,MAAAA,KAAAC,EAAA;AAAA,EAA+B,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACG,OAAA;AAAA;AAAA;AAAA;AAAA,IACvB,cAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAI2C,OAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA,EAKT;AAAA,EACzC,MAAAC,GAAA;AAGI,UAAAC,IAAAC,EAAA,MAAA,CAAAF,EAAA,YAAA,GAGAG,IAAAD;AAAA,MAAqB,MAAAF,EAAA,eAAAI,EAAA,WAAAA,EAAA;AAAA,IAC6D;AAGlF,WAAA;AAAA;AAAA,MAAO,aAAAH;AAAA,MAEH,cAAAE;AAAA,IACA;AAAA,EACJ;AAER,CAAA;;AAnCmB,QAAAE,IAAAC,EAAA,kBAAA;AAFyB,SAAAC,EAAA,GAAAC,EAAAH,GAAA;AAAA,IAAqB,WAAAI,EAAA;AAAA,IAAW,SAAAA,EAAA;AAAA,IADhF,IAAA;AAAA,EAAA,GAAA;AAAA;MAAAC,EAAAC,EAAAF,EAAA,KAAA,GAAA,CAAA;AAAA,IAAA,CAAA;AAAA;;;oDCaI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AAA,WAAAQ,GAAA,OAAAC,EAAA,IAAAC,EAAA1C,CAAA,GACA2C,IAAAC,GAAA;AAAA,MAAuC,WAAAN,EAAA;AAAA;AAAA,MACL,OAAAE;AAAA,MAEvB,iBAAAC;AAAA,IACU,CAAA,GAGrBI,IAAAR,EAAAZ,IAAA,EAAA,KAAAY,EAAAb,IAAA,EAAA,GAIAsB,IAAA5C,EAAA,OAAA;AAAA,MAA2C,oBAAAF,EAAA,SAAA,CAAAA,EAAA;AAAA,MACG,2BAAA,CAAA,CAAAA,EAAA;AAAA,MACP,oBAAAA,EAAA,SAAA,CAAAA,EAAA;AAAA,MACO,0BAAAA,EAAA;AAAA,MACV,4BAAAA,EAAA;AAAA,MACE,+BAAA6C;AAAA,IACH,EAAA,GAGnCE,IAAA7C,EAAA,OAAA;AAAA,MAAkD,kCAAA,CAAA,CAAAF,EAAA;AAAA,IACJ,EAAA,GAG9CgD,IAAA,MAAApB,EAAA,SAAA,GAEAqB,IAAAC,GAAApB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,7 +3,7 @@ import { a as Z } from "./index.BMkVmbZj.js";
3
3
  import { B as k } from "./button.Cneb6rPP.js";
4
4
  import { B as f, _ as w, a as F } from "./image.vue_vue_type_script_setup_true_lang.DQT2oNEF.js";
5
5
  import { B as Y } from "./typography.DN5eC5ch.js";
6
- import { u as J } from "./i18n.WMYWtwxB.js";
6
+ import { u as J } from "./i18n.D9azDLPe.js";
7
7
  import { g as P } from "./generate-uid.NJ8tVoha.js";
8
8
  import { _ as q } from "./_plugin-vue_export-helper.CHgC5LLL.js";
9
9
  import "../assets/promo-banner.css";
@@ -123,4 +123,4 @@ export {
123
123
  m as a,
124
124
  ce as p
125
125
  };
126
- //# sourceMappingURL=promo-banner.BjLfDhBq.js.map
126
+ //# sourceMappingURL=promo-banner.DTH4CZ_2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"promo-banner.BjLfDhBq.js","sources":["../../../vue2/src/components/promo-banner/promo-banner.types.ts","../../../vue2/src/components/promo-banner/promo-banner.vue"],"sourcesContent":["import { BentoButtonActionObject } from '@/core/components/button-actions/button-actions.types';\nimport { BentoButtonVariant } from '../button';\nimport { BentoImageAspectRatio, BentoImageProps } from '../image';\n\nexport interface BentoPromoBannerProps {\n /**\n * List of actions that will be used to render the buttons.\n *\n * Each object in the list should have a `title`, an `event` and a `variant`.\n *\n * `title`: Button's text.\n * `event`: Event triggered when clicking the Button.\n * `variant`: Button's style.\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * variant: 'primary'\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * variant: 'secondary'\n * }]\n * ```\n */\n actions?: BentoPromoBannerAction[];\n\n /**\n * Defines the color of banner's background\n */\n color?: `${BentoPromoBannerColor}`;\n\n /**\n * Defines whether the banner has a `Dismiss` button\n */\n isDismissible?: boolean;\n\n /**\n * Defines whether the banner has a `Dismiss` button\n */\n dismissButtonText?: string;\n\n /**\n * Defines the image used in the banner.\n *\n * The promotional banner adapts to different container sizes based on the image's `aspect-ratio`.\n * Only the following `aspect-ratio` values are supported: `16:9`, `2:1`, and `1:1`.\n *\n * In Storybook, to verify the image display, update `image.src` and `image.aspectRatio` as follows:\n * - `./1-1.png` with an aspect ratio of `1:1`\n * - `./2-1.png` with an aspect ratio of `2:1`\n * - `./16-9.png` with an aspect ratio of `16:9`\n */\n image: BentoPromoBannerImage;\n\n /**\n * Defines style of the banner.\n *\n * The horizontal layout is responsive to the container size and\n * changes depending on the image aspect ratio.\n *\n * The vertical layout remains the same regardless of container size.\n */\n layout?: `${BentoPromoBannerLayout}`;\n\n /**\n * Defines the title text to be shown on the banner\n */\n title: string;\n}\n\nexport type BentoPromoBannerImageAspectRatio = `${\n | BentoImageAspectRatio.P16_9\n | BentoImageAspectRatio.P2_1\n | BentoImageAspectRatio.P1_1}`;\n\nexport type BentoPromoBannerButtonVariant = `${BentoButtonVariant.PRIMARY | BentoButtonVariant.SECONDARY}`;\n\nexport type BentoPromoBannerAction<IconType = object> = BentoButtonActionObject<IconType> & {\n variant: BentoPromoBannerButtonVariant;\n};\n\nexport type BentoPromoBannerImage = {\n src: BentoImageProps['src'];\n alt?: BentoImageProps['alt'];\n aspectRatio: BentoPromoBannerImageAspectRatio;\n};\n\nexport enum BentoPromoBannerColor {\n BLUE = 'blue',\n GREY = 'grey',\n GREEN = 'green',\n}\n\nexport enum BentoPromoBannerLayout {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n","<template>\n <section\n ref=\"promoBannerRef\"\n class=\"b-promo-banner\"\n :class=\"bannerConditionalClass\"\n :aria-labelledby=\"promoBannerTitleId\"\n >\n <div class=\"b-promo-banner__content\">\n <div class=\"b-promo-banner__content-header\">\n <bento-typography :id=\"promoBannerTitleId\" variant=\"title\" large>\n {{ title }}\n </bento-typography>\n\n <slot name=\"description\" />\n </div>\n\n <div class=\"b-promo-banner__content-actions\">\n <template v-if=\"actions\">\n <bento-button\n v-for=\"(button, index) in actions\"\n :key=\"index\"\n :variant=\"button.variant\"\n :critical=\"button.critical\"\n :disabled=\"button.disabled\"\n :inverse=\"button.inverse\"\n :icon-only=\"button.iconOnly\"\n :link=\"button.link\"\n @click=\"button.event\"\n >\n <template v-if=\"button.icon || button.iconLeft\" #iconLeft>\n <component :is=\"button.icon || button.iconLeft\" :svg-title=\"button.title\"></component>\n </template>\n\n <template v-if=\"!isIconOnly(button)\" #default>\n {{ button.title }}\n </template>\n\n <template v-if=\"button.iconRight\" #iconRight>\n <component :is=\"button.iconRight\" :svg-title=\"button.title\"></component>\n </template>\n </bento-button>\n </template>\n\n <bento-button v-if=\"isDismissible\" variant=\"secondary\" @click=\"emit('dismiss')\">\n {{ computedDismissButtonText }}\n </bento-button>\n </div>\n </div>\n\n <div class=\"b-promo-banner__image\">\n <bento-image\n class=\"b-promo-banner__image-item\"\n :src=\"image.src\"\n :alt=\"image.alt ?? ''\"\n :aspect-ratio=\"image.aspectRatio\"\n :object-fit=\"BentoImageObjectFit.CONTAIN\"\n ></bento-image>\n </div>\n </section>\n</template>\n\n<script setup lang=\"ts\">\n import { useElementSize } from '@vueuse/core';\n import { computed, ref } from 'vue';\n\n // Components\n import { BentoButton, BentoButtonActionObject } from '@/components/button';\n import { BentoImage, BentoImageAspectRatio, BentoImageObjectFit } from '@/components/image';\n import { BentoTypography } from '@/components/typography';\n import { BentoPromoBannerColor, BentoPromoBannerLayout, BentoPromoBannerProps } from './promo-banner.types';\n\n // Utils\n import { useI18n } from '@/utils/ts/i18n';\n\n import { generateUid } from '@/core/utils/ts';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = withDefaults(defineProps<BentoPromoBannerProps>(), {\n actions: null,\n color: BentoPromoBannerColor.GREY,\n isDismissible: true,\n dismissButtonText: null,\n layout: BentoPromoBannerLayout.HORIZONTAL,\n });\n\n const emit = defineEmits<{\n /**\n * Emits a dismiss event when dismiss button on the promotional banner is pressed\n */\n (e: 'dismiss');\n }>();\n\n const promoBannerRef = ref(null);\n const promoBannerSize = useElementSize(promoBannerRef);\n const promoBannerTitleId = generateUid('promoBannerTitle');\n\n const horizontalLayoutBreakpoint = computed(() => {\n if (props.image.aspectRatio === BentoImageAspectRatio.P16_9) {\n return 800;\n } else if (props.image.aspectRatio === BentoImageAspectRatio.P2_1) {\n return 850;\n } else if (props.image.aspectRatio === BentoImageAspectRatio.P1_1) {\n return 623;\n }\n\n return 0;\n });\n\n const bannerLayoutClass = computed(() => {\n // only horizontal layout is responsive and, by design, follows the container size\n if (\n props.layout === BentoPromoBannerLayout.HORIZONTAL &&\n promoBannerSize.width.value <= horizontalLayoutBreakpoint.value\n ) {\n return BentoPromoBannerLayout.VERTICAL;\n }\n\n return props.layout;\n });\n\n const bannerConditionalClass = computed(() =>\n [`b-promo-banner--${bannerLayoutClass.value}`, `b-promo-banner--${props.color}`].join(' ')\n );\n\n const isIconOnly = (button: BentoButtonActionObject) =>\n button.iconOnly && (button.iconLeft || button.iconRight || button.icon);\n\n const computedDismissButtonText = computed(() => props.dismissButtonText || t('dismiss'));\n</script>\n\n<script lang=\"ts\">\n /**\n * Promotional Banner highlights important information, announcements, or promotions.\n *\n * @example\n * import { BentoPromoBanner } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoPromoBanner },\n * template: `\n * <bento-promo-banner\n * title=\"Title\"\n * description=\"Brief description explaining and giving more information about the title\"\n * :image=\"{ src: '16-1.png', aspectRatio: '16:9' }\"\n * :actions=\"[{ title: 'Primary', event: () => {} }]\"\n * >\n * </bento-promo-banner>\n * `\n * };\n */\n export default {\n i18n: { messages },\n name: 'bento-promo-banner',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./promo-banner.scss\" />\n"],"names":["BentoPromoBannerColor","BentoPromoBannerColor2","BentoPromoBannerLayout","BentoPromoBannerLayout2","__default__","messages","t","useI18n","props","__props","emit","__emit","promoBannerRef","ref","promoBannerSize","useElementSize","promoBannerTitleId","generateUid","horizontalLayoutBreakpoint","computed","BentoImageAspectRatio","bannerLayoutClass","bannerConditionalClass","isIconOnly","button","computedDismissButtonText"],"mappings":";;;;;;;;;AAyFY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,OAAA,QACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA,GAMAE,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;iNC2DRE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;;AA9EA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GAEAG,IAAAC,GAQAC,IAAAC,GAOAC,IAAAC,EAAA,IAAA,GACAC,IAAAC,EAAAH,CAAA,GACAI,IAAAC,EAAA,kBAAA,GAEAC,IAAAC,EAAA,MACIX,EAAA,MAAA,gBAAAY,EAAA,QACI,MAAOZ,EAAA,MAAA,gBAAAY,EAAA,OAEP,MAAOZ,EAAA,MAAA,gBAAAY,EAAA,OAEP,MAGJ,CAAO,GAGXC,IAAAF,EAAA,MAEIX,EAAA,WAAAN,EAAA,cAAAY,EAAA,MAAA,SAAAI,EAAA,QAIIhB,EAAA,WAGJM,EAAA,MAAa,GAGjBc,IAAAH;AAAA,MAA+B,MAAA,CAAA,mBAAAE,EAAA,KAAA,IAAA,mBAAAb,EAAA,KAAA,EAAA,EAAA,KAAA,GAAA;AAAA,IAC8D,GAG7Fe,IAAA,CAAAC,MAAAA,EAAA,aAAAA,EAAA,YAAAA,EAAA,aAAAA,EAAA,OAGAC,IAAAN,EAAA,MAAAX,EAAA,qBAAAF,EAAA,SAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"promo-banner.DTH4CZ_2.js","sources":["../../../vue2/src/components/promo-banner/promo-banner.types.ts","../../../vue2/src/components/promo-banner/promo-banner.vue"],"sourcesContent":["import { BentoButtonActionObject } from '@/core/components/button-actions/button-actions.types';\nimport { BentoButtonVariant } from '../button';\nimport { BentoImageAspectRatio, BentoImageProps } from '../image';\n\nexport interface BentoPromoBannerProps {\n /**\n * List of actions that will be used to render the buttons.\n *\n * Each object in the list should have a `title`, an `event` and a `variant`.\n *\n * `title`: Button's text.\n * `event`: Event triggered when clicking the Button.\n * `variant`: Button's style.\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * variant: 'primary'\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * variant: 'secondary'\n * }]\n * ```\n */\n actions?: BentoPromoBannerAction[];\n\n /**\n * Defines the color of banner's background\n */\n color?: `${BentoPromoBannerColor}`;\n\n /**\n * Defines whether the banner has a `Dismiss` button\n */\n isDismissible?: boolean;\n\n /**\n * Defines whether the banner has a `Dismiss` button\n */\n dismissButtonText?: string;\n\n /**\n * Defines the image used in the banner.\n *\n * The promotional banner adapts to different container sizes based on the image's `aspect-ratio`.\n * Only the following `aspect-ratio` values are supported: `16:9`, `2:1`, and `1:1`.\n *\n * In Storybook, to verify the image display, update `image.src` and `image.aspectRatio` as follows:\n * - `./1-1.png` with an aspect ratio of `1:1`\n * - `./2-1.png` with an aspect ratio of `2:1`\n * - `./16-9.png` with an aspect ratio of `16:9`\n */\n image: BentoPromoBannerImage;\n\n /**\n * Defines style of the banner.\n *\n * The horizontal layout is responsive to the container size and\n * changes depending on the image aspect ratio.\n *\n * The vertical layout remains the same regardless of container size.\n */\n layout?: `${BentoPromoBannerLayout}`;\n\n /**\n * Defines the title text to be shown on the banner\n */\n title: string;\n}\n\nexport type BentoPromoBannerImageAspectRatio = `${\n | BentoImageAspectRatio.P16_9\n | BentoImageAspectRatio.P2_1\n | BentoImageAspectRatio.P1_1}`;\n\nexport type BentoPromoBannerButtonVariant = `${BentoButtonVariant.PRIMARY | BentoButtonVariant.SECONDARY}`;\n\nexport type BentoPromoBannerAction<IconType = object> = BentoButtonActionObject<IconType> & {\n variant: BentoPromoBannerButtonVariant;\n};\n\nexport type BentoPromoBannerImage = {\n src: BentoImageProps['src'];\n alt?: BentoImageProps['alt'];\n aspectRatio: BentoPromoBannerImageAspectRatio;\n};\n\nexport enum BentoPromoBannerColor {\n BLUE = 'blue',\n GREY = 'grey',\n GREEN = 'green',\n}\n\nexport enum BentoPromoBannerLayout {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n","<template>\n <section\n ref=\"promoBannerRef\"\n class=\"b-promo-banner\"\n :class=\"bannerConditionalClass\"\n :aria-labelledby=\"promoBannerTitleId\"\n >\n <div class=\"b-promo-banner__content\">\n <div class=\"b-promo-banner__content-header\">\n <bento-typography :id=\"promoBannerTitleId\" variant=\"title\" large>\n {{ title }}\n </bento-typography>\n\n <slot name=\"description\" />\n </div>\n\n <div class=\"b-promo-banner__content-actions\">\n <template v-if=\"actions\">\n <bento-button\n v-for=\"(button, index) in actions\"\n :key=\"index\"\n :variant=\"button.variant\"\n :critical=\"button.critical\"\n :disabled=\"button.disabled\"\n :inverse=\"button.inverse\"\n :icon-only=\"button.iconOnly\"\n :link=\"button.link\"\n @click=\"button.event\"\n >\n <template v-if=\"button.icon || button.iconLeft\" #iconLeft>\n <component :is=\"button.icon || button.iconLeft\" :svg-title=\"button.title\"></component>\n </template>\n\n <template v-if=\"!isIconOnly(button)\" #default>\n {{ button.title }}\n </template>\n\n <template v-if=\"button.iconRight\" #iconRight>\n <component :is=\"button.iconRight\" :svg-title=\"button.title\"></component>\n </template>\n </bento-button>\n </template>\n\n <bento-button v-if=\"isDismissible\" variant=\"secondary\" @click=\"emit('dismiss')\">\n {{ computedDismissButtonText }}\n </bento-button>\n </div>\n </div>\n\n <div class=\"b-promo-banner__image\">\n <bento-image\n class=\"b-promo-banner__image-item\"\n :src=\"image.src\"\n :alt=\"image.alt ?? ''\"\n :aspect-ratio=\"image.aspectRatio\"\n :object-fit=\"BentoImageObjectFit.CONTAIN\"\n ></bento-image>\n </div>\n </section>\n</template>\n\n<script setup lang=\"ts\">\n import { useElementSize } from '@vueuse/core';\n import { computed, ref } from 'vue';\n\n // Components\n import { BentoButton, BentoButtonActionObject } from '@/components/button';\n import { BentoImage, BentoImageAspectRatio, BentoImageObjectFit } from '@/components/image';\n import { BentoTypography } from '@/components/typography';\n import { BentoPromoBannerColor, BentoPromoBannerLayout, BentoPromoBannerProps } from './promo-banner.types';\n\n // Utils\n import { useI18n } from '@/utils/ts/i18n';\n\n import { generateUid } from '@/core/utils/ts';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = withDefaults(defineProps<BentoPromoBannerProps>(), {\n actions: null,\n color: BentoPromoBannerColor.GREY,\n isDismissible: true,\n dismissButtonText: null,\n layout: BentoPromoBannerLayout.HORIZONTAL,\n });\n\n const emit = defineEmits<{\n /**\n * Emits a dismiss event when dismiss button on the promotional banner is pressed\n */\n (e: 'dismiss');\n }>();\n\n const promoBannerRef = ref(null);\n const promoBannerSize = useElementSize(promoBannerRef);\n const promoBannerTitleId = generateUid('promoBannerTitle');\n\n const horizontalLayoutBreakpoint = computed(() => {\n if (props.image.aspectRatio === BentoImageAspectRatio.P16_9) {\n return 800;\n } else if (props.image.aspectRatio === BentoImageAspectRatio.P2_1) {\n return 850;\n } else if (props.image.aspectRatio === BentoImageAspectRatio.P1_1) {\n return 623;\n }\n\n return 0;\n });\n\n const bannerLayoutClass = computed(() => {\n // only horizontal layout is responsive and, by design, follows the container size\n if (\n props.layout === BentoPromoBannerLayout.HORIZONTAL &&\n promoBannerSize.width.value <= horizontalLayoutBreakpoint.value\n ) {\n return BentoPromoBannerLayout.VERTICAL;\n }\n\n return props.layout;\n });\n\n const bannerConditionalClass = computed(() =>\n [`b-promo-banner--${bannerLayoutClass.value}`, `b-promo-banner--${props.color}`].join(' ')\n );\n\n const isIconOnly = (button: BentoButtonActionObject) =>\n button.iconOnly && (button.iconLeft || button.iconRight || button.icon);\n\n const computedDismissButtonText = computed(() => props.dismissButtonText || t('dismiss'));\n</script>\n\n<script lang=\"ts\">\n /**\n * Promotional Banner highlights important information, announcements, or promotions.\n *\n * @example\n * import { BentoPromoBanner } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoPromoBanner },\n * template: `\n * <bento-promo-banner\n * title=\"Title\"\n * description=\"Brief description explaining and giving more information about the title\"\n * :image=\"{ src: '16-1.png', aspectRatio: '16:9' }\"\n * :actions=\"[{ title: 'Primary', event: () => {} }]\"\n * >\n * </bento-promo-banner>\n * `\n * };\n */\n export default {\n i18n: { messages },\n name: 'bento-promo-banner',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./promo-banner.scss\" />\n"],"names":["BentoPromoBannerColor","BentoPromoBannerColor2","BentoPromoBannerLayout","BentoPromoBannerLayout2","__default__","messages","t","useI18n","props","__props","emit","__emit","promoBannerRef","ref","promoBannerSize","useElementSize","promoBannerTitleId","generateUid","horizontalLayoutBreakpoint","computed","BentoImageAspectRatio","bannerLayoutClass","bannerConditionalClass","isIconOnly","button","computedDismissButtonText"],"mappings":";;;;;;;;;AAyFY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,OAAA,QACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA,GAMAE,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;iNC2DRE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;;AA9EA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GAEAG,IAAAC,GAQAC,IAAAC,GAOAC,IAAAC,EAAA,IAAA,GACAC,IAAAC,EAAAH,CAAA,GACAI,IAAAC,EAAA,kBAAA,GAEAC,IAAAC,EAAA,MACIX,EAAA,MAAA,gBAAAY,EAAA,QACI,MAAOZ,EAAA,MAAA,gBAAAY,EAAA,OAEP,MAAOZ,EAAA,MAAA,gBAAAY,EAAA,OAEP,MAGJ,CAAO,GAGXC,IAAAF,EAAA,MAEIX,EAAA,WAAAN,EAAA,cAAAY,EAAA,MAAA,SAAAI,EAAA,QAIIhB,EAAA,WAGJM,EAAA,MAAa,GAGjBc,IAAAH;AAAA,MAA+B,MAAA,CAAA,mBAAAE,EAAA,KAAA,IAAA,mBAAAb,EAAA,KAAA,EAAA,EAAA,KAAA,GAAA;AAAA,IAC8D,GAG7Fe,IAAA,CAAAC,MAAAA,EAAA,aAAAA,EAAA,YAAAA,EAAA,aAAAA,EAAA,OAGAC,IAAAN,EAAA,MAAAX,EAAA,qBAAAF,EAAA,SAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,14 +3,14 @@ import { u as J } from "./use-form-layout-loading.D3lALhtC.js";
3
3
  import { u as H } from "./use-has-slot.B7eQSabc.js";
4
4
  import { g as T } from "./generate-uid.NJ8tVoha.js";
5
5
  import { B as L, d as K } from "./typography.DN5eC5ch.js";
6
- import { C as Q } from "./controls-group.CjqybvY2.js";
7
- import { B as W } from "./tag.BuUbvgok.js";
6
+ import { C as Q } from "./controls-group.BeK9igGT.js";
7
+ import { B as W } from "./tag.Chr4TP7d.js";
8
8
  import { u as X } from "./aria-label.CaUURpnB.js";
9
9
  import { u as ee } from "./use-default-slot-validator.O02rzsob.js";
10
- import { g as te } from "./get-slot-text.D5WBGjic.js";
10
+ import { g as te } from "./get-slot-text.DQlZEsId.js";
11
11
  import { R as A, a as ae } from "./radio-input.DKfQGxtp.js";
12
12
  import { _ as U } from "./_plugin-vue_export-helper.CHgC5LLL.js";
13
- import { E as oe } from "./error-message.qsc0nOWT.js";
13
+ import { E as oe } from "./error-message.X-gxnQcx.js";
14
14
  import "../assets/radio-group.css";
15
15
  const re = ["for"], le = {
16
16
  key: 0,
@@ -318,4 +318,4 @@ export {
318
318
  I as a,
319
319
  se as b
320
320
  };
321
- //# sourceMappingURL=radio-group.DkfCMh_u.js.map
321
+ //# sourceMappingURL=radio-group.BLHcC22p.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.DkfCMh_u.js","sources":["../../../vue2/src/components/radio-group/components/radio-button/radio-button.vue","../../../vue2/src/components/radio-group/radio-group.types.ts","../../../vue2/src/components/radio-group/radio-group.vue"],"sourcesContent":["<template>\n <div class=\"b-radio-button\" data-testid=\"radio-button-container\" :class=\"conditionalClassContainer\">\n <radio-input\n :id=\"radioButtonId\"\n ref=\"radioInputRef\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"hasSlot('description') ? descriptionId : ''\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :has-error=\"hasError\"\n :value=\"value\"\n :model-value=\"modelValue\"\n :name=\"name\"\n @update:model-value=\"onChange\"\n />\n <div>\n <label v-if=\"hasSlot('default')\" :for=\"radioButtonId\" class=\"b-radio-button__label-container\">\n <span v-if=\"hasSlot('default')\" class=\"b-radio-button__primary-label\">\n <bento-typography class=\"b-radio-button__label\" el=\"span\" variant=\"body\"><slot /></bento-typography>\n <bento-tag v-if=\"tag\" class=\"b-radio-button__label-tag\" v-bind=\"tag\" />\n </span>\n <bento-typography\n v-if=\"hasSlot('default') && hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-radio-button__description\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"description\"></slot>\n </bento-typography>\n </label>\n <bento-typography v-if=\"hasSlot('content') && isChecked\" class=\"b-radio-button__content\" el=\"div\">\n <slot name=\"content\"></slot>\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTag } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n import { RadioInput } from '../../../internal/radio-input';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { generateUid } from '@/core/utils/ts';\n import { computed, ComputedRef, PropType, ref, toRefs, useSlots } from 'vue';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { BentoRadioButtonStateClass, BentoRadioButtonTag, BentoRadioButtonValue } from './radio-button.types';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * Disable the radio button (optional)\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Shows bento-radio-button in error state (optional)\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * This property should not be used directly.\n * It will be used by v-model directive on radio component.\n */\n modelValue: {\n type: [String, Number] as PropType<BentoRadioButtonValue>,\n default: null,\n },\n\n /**\n * Sets the radio button to readonly (optional)\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Sets the properties of the BentoTag component that is placed next to the label.\n * {@see BentoTag}\n */\n tag: { type: Object as PropType<BentoRadioButtonTag>, default: undefined },\n\n /**\n * Indicates the value of the input that will be returned when it's checked\n */\n value: {\n type: [String, Number] as PropType<BentoRadioButtonValue>,\n required: true,\n },\n\n /**\n * Sets the name of the radio input.\n * Used for differentiating radio groups or accessing input via form submission.\n */\n name: {\n type: String,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the radio button is clicked. Enables Vue2 \"v-model\"\n */\n (e: 'input', value: BentoRadioButtonValue);\n\n /**\n * Emitted when the radio button is clicked. Enables Vue3 \"v-model\"\n */\n (e: 'update:model-value', value: BentoRadioButtonValue);\n }>();\n\n const { value } = toRefs(props);\n const radioButtonId = generateUid('bento-radio-button');\n const descriptionId = generateUid('description');\n const radioInputRef = ref(null);\n\n useDefaultSlotValidator('bento-radio-button', slots.default, slots.description);\n\n const conditionalClassContainer = computed(() => ({\n [`b-radio-button--${BentoRadioButtonStateClass.DISABLED}`]: props.disabled,\n [`b-radio-button--${BentoRadioButtonStateClass.READONLY}`]: props.readonly,\n }));\n\n const ariaLabel = useAriaLabel({\n ariaLabel: getSlotText(slots)('default'),\n label: value.value as string,\n });\n\n const isChecked: ComputedRef<boolean> = computed(() => props.value === props.modelValue);\n\n const onChange = () => {\n if (!props.disabled && !props.readonly) {\n emit('update:model-value', props.value);\n emit('input', props.value);\n }\n };\n\n const focus = () => {\n radioInputRef.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Radio buttons are used when two or more options are mutually exclusive,\n * the user can only select a single option from a list of pre-defined options.\n * The label tag area is also clickable.\n * Only to be used internally.\n *\n * @example\n * import { BentoRadioButton } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoRadioButton },\n * template: `\n * <bento-radio-button\n * disabled\n * value=\"inputRadio\"\n * model-value.sync=\"modelValue\"\n * >\n * Label text\n * <template #description>Description text below label</template>\n * <template #content>Content shown when checked</template>\n * </bento-radio-button>\n * `,\n * setup() {\n * const modelValue = ref('anyValue')\n * const value = 'option-value'\n *\n * return {\n * modelValue,\n * value,\n * }\n * }\n * }\n */\n export default {\n name: 'bento-radio-button',\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-button.scss\" />\n","import type { BentoRadioButtonTag, BentoRadioButtonValue } from './components/radio-button';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoRadioGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\nexport type BentoRadioGroupValue = BentoRadioButtonValue;\n\nexport interface BentoRadioGroupItem {\n value: BentoRadioGroupValue;\n label: string;\n description?: string;\n disabled?: boolean;\n readonly?: boolean;\n hasError?: boolean;\n tag?: BentoRadioButtonTag;\n}\n\nexport type BentoRadioGroupItems = Array<BentoRadioGroupItem>;\n","<template>\n <div class=\"b-radio-group\">\n <controls-group\n class=\"b-radio-group__buttons\"\n :aria-describedby=\"shouldShowErrorMessage ? errorId : ''\"\n :component-name=\"COMPONENT_NAME\"\n :class=\"conditionalClasses\"\n :description=\"description\"\n :disabled=\"disabled\"\n :form=\"formId\"\n :label=\"label\"\n :optional=\"optional\"\n :required=\"required\"\n :hide-label=\"hideLabel\"\n :tooltip-text=\"tooltipText\"\n >\n <bento-radio-button\n v-for=\"item in items\"\n ref=\"radioButton\"\n :key=\"item.value\"\n :model-value=\"inputValue\"\n :value=\"item.value\"\n :disabled=\"disabled || item.disabled\"\n :readonly=\"isReadOnly || item.readonly\"\n :has-error=\"shouldShowError || item.hasError\"\n :tag=\"item.tag\"\n :name=\"formId || label\"\n @update:model-value=\"onInput\"\n >\n <template #default>{{ item.label }}</template>\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n <template v-if=\"hasSlot('content') && isVertical\" #content>\n <slot name=\"content\"></slot>\n </template>\n </bento-radio-button>\n </controls-group>\n <error-message\n v-if=\"shouldShowErrorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-radio-group__error-message\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, ref, toRef, useSlots, watch } from 'vue';\n import { ControlsGroup, ErrorMessage } from '@/components/internal';\n import { BentoRadioButton } from './components/radio-button';\n import { useHasSlot } from '@/composables';\n import { generateUid } from '@/core/utils/ts';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoRadioGroupItems, BentoRadioGroupValue, BentoRadioGroupVariant } from './radio-group.types';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n /**\n * The name of the component to be used in the Vue devtools and console warnings.\n */\n const COMPONENT_NAME = 'bento-radio-group';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits<{\n /**\n * Emitted when an option inside the group is selected. Enables Vue2 \"v-model\"\n */\n (e: 'input', value: BentoRadioGroupValue);\n\n /**\n * Emitted when an option inside the group is selected. Enables Vue3 \"v-model\"\n */\n (e: 'update:model-value', value: BentoRadioGroupValue);\n }>();\n\n const props = defineProps({\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * If set to true, renders all bento-radio-buttons in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * If passed as a prop, all bento-radio-buttons in an error state and renders the string beneath the buttons.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The form id the radio group is associated with. Defaults to null, as a radio group can also be used standalone.\n */\n formId: { type: String, default: null },\n\n /**\n * If set to true, renders all bento-radio-buttons in the group in an error state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * The radio group's items.\n */\n items: {\n type: Array as PropType<BentoRadioGroupItems>,\n required: true,\n },\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n */\n label: { type: String, required: true },\n\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoRadioButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: {\n type: [Number, String] as PropType<BentoRadioGroupValue>,\n default: null,\n },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * If set to true, renders all bento-radio-button in the group in a readonly state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * The radio group's layout. It can be vertical or horizontal. Defaults to vertical.\n */\n variant: {\n type: String as PropType<BentoRadioGroupVariant | `${BentoRadioGroupVariant}`>,\n default: BentoRadioGroupVariant.VERTICAL,\n validator: (value: BentoRadioGroupVariant) => Object.values(BentoRadioGroupVariant).includes(value),\n },\n });\n\n const inputValue = toRef(props, 'modelValue');\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const radioButton = ref(null);\n\n const shouldShowError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.hasError)\n );\n const shouldShowErrorMessage = computed(() => !props.disabled && !isReadOnly.value && !!props.errorMessage);\n\n const conditionalClasses = computed(() => ({\n 'b-radio-group__buttons--horizontal': props.variant === BentoRadioGroupVariant.HORIZONTAL,\n }));\n\n // Content slot logic\n const isVertical = computed(() => props.variant === 'vertical');\n const shouldShowSlotError = computed(() => hasSlot('content') && !isVertical?.value);\n\n const onInput = value => {\n emit('update:model-value', value);\n emit('input', value);\n };\n\n if (props.hasError) {\n deprecate(\n 'BentoRadioGroup \"hasError\" property',\n `Use the BentoRadioGroup \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-radio-group errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n watch(\n shouldShowSlotError,\n newVal => {\n if (newVal) {\n throw new Error('The content slot is only available for the vertical radio group layout');\n }\n },\n {\n immediate: true,\n }\n );\n\n const focus = () => {\n radioButton.value[0].focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * A radio group component should be used whenever it is necessary to use a set of radio buttons\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * import { BentoRadioGroup } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { BentoRadioGroup },\n * template: `\n * <bento-radio-group\n * label=\"Your group label\"\n * :items=\"[\n * { value: 1, label: 'Your label' },\n * { value: 2, label: 'Another label', description: 'Your descriptive sub label' },\n * ]\"\n * variant=\"horizontal\"\n * />\n * `\n * };\n */\n export default {\n name: 'bento-radio-group',\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-group.scss\" />\n"],"names":["__default__$1","slots","useSlots","hasSlot","useHasSlot","props","__props","emit","__emit","value","toRefs","radioButtonId","generateUid","descriptionId","radioInputRef","ref","useDefaultSlotValidator","conditionalClassContainer","computed","RadioInputStateClass","ariaLabel","useAriaLabel","getSlotText","isChecked","onChange","__expose","BentoRadioGroupVariant","BentoRadioGroupVariant2","__default__","COMPONENT_NAME","inputValue","toRef","errorId","isReadOnly","useFormLayoutFieldLoading","radioButton","shouldShowError","shouldShowErrorMessage","conditionalClasses","isVertical","shouldShowSlotError","onInput","deprecate","watch","newVal"],"mappings":";;;;;;;;;;;;;;;;;GAsLIA,KAAA;AAAA,EAAe,MAAA;AAAA,EACL,OAAA,EAAA,MAAA,aAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAvIA,UAAAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GACAI,IAAAC,GAiDAC,IAAAC,GAYA,EAAA,OAAAC,EAAA,IAAAC,EAAAL,CAAA,GACAM,IAAAC,EAAA,oBAAA,GACAC,IAAAD,EAAA,aAAA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8B,IAAApB,EAAA,IAAA,GAEAqB,IAAAlB;AAAA,MAAwB,MAAA,CAAAb,EAAA,YAAA,CAAA4B,EAAA,UAAA,CAAA,CAAA5B,EAAA,gBAAAA,EAAA;AAAA,IACyD,GAEjFgC,IAAAnB,EAAA,MAAA,CAAAb,EAAA,YAAA,CAAA4B,EAAA,SAAA,CAAA,CAAA5B,EAAA,YAAA,GAEAiC,IAAApB,EAAA,OAAA;AAAA,MAA2C,sCAAAb,EAAA,YAAAqB,EAAA;AAAA,IACwC,EAAA,GAInFa,IAAArB,EAAA,MAAAb,EAAA,YAAA,UAAA,GACAmC,IAAAtB,EAAA,MAAAf,EAAA,SAAA,KAAA,EAAAoC,KAAA,QAAAA,EAAA,MAAA,GAEAE,IAAA,CAAAhC,MAAA;AACI,MAAAF,EAAA,sBAAAE,CAAA,GACAF,EAAA,SAAAE,CAAA;AAAA,IAAmB;AAGvB,WAAAJ,EAAA,YACIqC;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIRC;AAAA,MAAAH;AAAA,MACI,CAAAI,MAAA;AAEI,YAAAA;AACI,gBAAA,IAAA,MAAA,wEAAA;AAAA,MACJ;AAAA,MACJ;AAAA,QACA,WAAA;AAAA,MACe;AAAA,IACf,GAOJnB,EAAA;AAAA,MAAa,OAJb,MAAA;AACI,QAAAU,EAAA,MAAA,CAAA,EAAA,MAAA;AAAA,MAA2B;AAAA,IAI3B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"radio-group.BLHcC22p.js","sources":["../../../vue2/src/components/radio-group/components/radio-button/radio-button.vue","../../../vue2/src/components/radio-group/radio-group.types.ts","../../../vue2/src/components/radio-group/radio-group.vue"],"sourcesContent":["<template>\n <div class=\"b-radio-button\" data-testid=\"radio-button-container\" :class=\"conditionalClassContainer\">\n <radio-input\n :id=\"radioButtonId\"\n ref=\"radioInputRef\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"hasSlot('description') ? descriptionId : ''\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :has-error=\"hasError\"\n :value=\"value\"\n :model-value=\"modelValue\"\n :name=\"name\"\n @update:model-value=\"onChange\"\n />\n <div>\n <label v-if=\"hasSlot('default')\" :for=\"radioButtonId\" class=\"b-radio-button__label-container\">\n <span v-if=\"hasSlot('default')\" class=\"b-radio-button__primary-label\">\n <bento-typography class=\"b-radio-button__label\" el=\"span\" variant=\"body\"><slot /></bento-typography>\n <bento-tag v-if=\"tag\" class=\"b-radio-button__label-tag\" v-bind=\"tag\" />\n </span>\n <bento-typography\n v-if=\"hasSlot('default') && hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-radio-button__description\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"description\"></slot>\n </bento-typography>\n </label>\n <bento-typography v-if=\"hasSlot('content') && isChecked\" class=\"b-radio-button__content\" el=\"div\">\n <slot name=\"content\"></slot>\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTag } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n import { RadioInput } from '../../../internal/radio-input';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { generateUid } from '@/core/utils/ts';\n import { computed, ComputedRef, PropType, ref, toRefs, useSlots } from 'vue';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { BentoRadioButtonStateClass, BentoRadioButtonTag, BentoRadioButtonValue } from './radio-button.types';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * Disable the radio button (optional)\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Shows bento-radio-button in error state (optional)\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * This property should not be used directly.\n * It will be used by v-model directive on radio component.\n */\n modelValue: {\n type: [String, Number] as PropType<BentoRadioButtonValue>,\n default: null,\n },\n\n /**\n * Sets the radio button to readonly (optional)\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Sets the properties of the BentoTag component that is placed next to the label.\n * {@see BentoTag}\n */\n tag: { type: Object as PropType<BentoRadioButtonTag>, default: undefined },\n\n /**\n * Indicates the value of the input that will be returned when it's checked\n */\n value: {\n type: [String, Number] as PropType<BentoRadioButtonValue>,\n required: true,\n },\n\n /**\n * Sets the name of the radio input.\n * Used for differentiating radio groups or accessing input via form submission.\n */\n name: {\n type: String,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the radio button is clicked. Enables Vue2 \"v-model\"\n */\n (e: 'input', value: BentoRadioButtonValue);\n\n /**\n * Emitted when the radio button is clicked. Enables Vue3 \"v-model\"\n */\n (e: 'update:model-value', value: BentoRadioButtonValue);\n }>();\n\n const { value } = toRefs(props);\n const radioButtonId = generateUid('bento-radio-button');\n const descriptionId = generateUid('description');\n const radioInputRef = ref(null);\n\n useDefaultSlotValidator('bento-radio-button', slots.default, slots.description);\n\n const conditionalClassContainer = computed(() => ({\n [`b-radio-button--${BentoRadioButtonStateClass.DISABLED}`]: props.disabled,\n [`b-radio-button--${BentoRadioButtonStateClass.READONLY}`]: props.readonly,\n }));\n\n const ariaLabel = useAriaLabel({\n ariaLabel: getSlotText(slots)('default'),\n label: value.value as string,\n });\n\n const isChecked: ComputedRef<boolean> = computed(() => props.value === props.modelValue);\n\n const onChange = () => {\n if (!props.disabled && !props.readonly) {\n emit('update:model-value', props.value);\n emit('input', props.value);\n }\n };\n\n const focus = () => {\n radioInputRef.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Radio buttons are used when two or more options are mutually exclusive,\n * the user can only select a single option from a list of pre-defined options.\n * The label tag area is also clickable.\n * Only to be used internally.\n *\n * @example\n * import { BentoRadioButton } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoRadioButton },\n * template: `\n * <bento-radio-button\n * disabled\n * value=\"inputRadio\"\n * model-value.sync=\"modelValue\"\n * >\n * Label text\n * <template #description>Description text below label</template>\n * <template #content>Content shown when checked</template>\n * </bento-radio-button>\n * `,\n * setup() {\n * const modelValue = ref('anyValue')\n * const value = 'option-value'\n *\n * return {\n * modelValue,\n * value,\n * }\n * }\n * }\n */\n export default {\n name: 'bento-radio-button',\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-button.scss\" />\n","import type { BentoRadioButtonTag, BentoRadioButtonValue } from './components/radio-button';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoRadioGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\nexport type BentoRadioGroupValue = BentoRadioButtonValue;\n\nexport interface BentoRadioGroupItem {\n value: BentoRadioGroupValue;\n label: string;\n description?: string;\n disabled?: boolean;\n readonly?: boolean;\n hasError?: boolean;\n tag?: BentoRadioButtonTag;\n}\n\nexport type BentoRadioGroupItems = Array<BentoRadioGroupItem>;\n","<template>\n <div class=\"b-radio-group\">\n <controls-group\n class=\"b-radio-group__buttons\"\n :aria-describedby=\"shouldShowErrorMessage ? errorId : ''\"\n :component-name=\"COMPONENT_NAME\"\n :class=\"conditionalClasses\"\n :description=\"description\"\n :disabled=\"disabled\"\n :form=\"formId\"\n :label=\"label\"\n :optional=\"optional\"\n :required=\"required\"\n :hide-label=\"hideLabel\"\n :tooltip-text=\"tooltipText\"\n >\n <bento-radio-button\n v-for=\"item in items\"\n ref=\"radioButton\"\n :key=\"item.value\"\n :model-value=\"inputValue\"\n :value=\"item.value\"\n :disabled=\"disabled || item.disabled\"\n :readonly=\"isReadOnly || item.readonly\"\n :has-error=\"shouldShowError || item.hasError\"\n :tag=\"item.tag\"\n :name=\"formId || label\"\n @update:model-value=\"onInput\"\n >\n <template #default>{{ item.label }}</template>\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n <template v-if=\"hasSlot('content') && isVertical\" #content>\n <slot name=\"content\"></slot>\n </template>\n </bento-radio-button>\n </controls-group>\n <error-message\n v-if=\"shouldShowErrorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-radio-group__error-message\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, ref, toRef, useSlots, watch } from 'vue';\n import { ControlsGroup, ErrorMessage } from '@/components/internal';\n import { BentoRadioButton } from './components/radio-button';\n import { useHasSlot } from '@/composables';\n import { generateUid } from '@/core/utils/ts';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoRadioGroupItems, BentoRadioGroupValue, BentoRadioGroupVariant } from './radio-group.types';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n /**\n * The name of the component to be used in the Vue devtools and console warnings.\n */\n const COMPONENT_NAME = 'bento-radio-group';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits<{\n /**\n * Emitted when an option inside the group is selected. Enables Vue2 \"v-model\"\n */\n (e: 'input', value: BentoRadioGroupValue);\n\n /**\n * Emitted when an option inside the group is selected. Enables Vue3 \"v-model\"\n */\n (e: 'update:model-value', value: BentoRadioGroupValue);\n }>();\n\n const props = defineProps({\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * If set to true, renders all bento-radio-buttons in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * If passed as a prop, all bento-radio-buttons in an error state and renders the string beneath the buttons.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The form id the radio group is associated with. Defaults to null, as a radio group can also be used standalone.\n */\n formId: { type: String, default: null },\n\n /**\n * If set to true, renders all bento-radio-buttons in the group in an error state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * The radio group's items.\n */\n items: {\n type: Array as PropType<BentoRadioGroupItems>,\n required: true,\n },\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n */\n label: { type: String, required: true },\n\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoRadioButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: {\n type: [Number, String] as PropType<BentoRadioGroupValue>,\n default: null,\n },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * If set to true, renders all bento-radio-button in the group in a readonly state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * The radio group's layout. It can be vertical or horizontal. Defaults to vertical.\n */\n variant: {\n type: String as PropType<BentoRadioGroupVariant | `${BentoRadioGroupVariant}`>,\n default: BentoRadioGroupVariant.VERTICAL,\n validator: (value: BentoRadioGroupVariant) => Object.values(BentoRadioGroupVariant).includes(value),\n },\n });\n\n const inputValue = toRef(props, 'modelValue');\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const radioButton = ref(null);\n\n const shouldShowError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.hasError)\n );\n const shouldShowErrorMessage = computed(() => !props.disabled && !isReadOnly.value && !!props.errorMessage);\n\n const conditionalClasses = computed(() => ({\n 'b-radio-group__buttons--horizontal': props.variant === BentoRadioGroupVariant.HORIZONTAL,\n }));\n\n // Content slot logic\n const isVertical = computed(() => props.variant === 'vertical');\n const shouldShowSlotError = computed(() => hasSlot('content') && !isVertical?.value);\n\n const onInput = value => {\n emit('update:model-value', value);\n emit('input', value);\n };\n\n if (props.hasError) {\n deprecate(\n 'BentoRadioGroup \"hasError\" property',\n `Use the BentoRadioGroup \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-radio-group errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n watch(\n shouldShowSlotError,\n newVal => {\n if (newVal) {\n throw new Error('The content slot is only available for the vertical radio group layout');\n }\n },\n {\n immediate: true,\n }\n );\n\n const focus = () => {\n radioButton.value[0].focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * A radio group component should be used whenever it is necessary to use a set of radio buttons\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * import { BentoRadioGroup } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { BentoRadioGroup },\n * template: `\n * <bento-radio-group\n * label=\"Your group label\"\n * :items=\"[\n * { value: 1, label: 'Your label' },\n * { value: 2, label: 'Another label', description: 'Your descriptive sub label' },\n * ]\"\n * variant=\"horizontal\"\n * />\n * `\n * };\n */\n export default {\n name: 'bento-radio-group',\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-group.scss\" />\n"],"names":["__default__$1","slots","useSlots","hasSlot","useHasSlot","props","__props","emit","__emit","value","toRefs","radioButtonId","generateUid","descriptionId","radioInputRef","ref","useDefaultSlotValidator","conditionalClassContainer","computed","RadioInputStateClass","ariaLabel","useAriaLabel","getSlotText","isChecked","onChange","__expose","BentoRadioGroupVariant","BentoRadioGroupVariant2","__default__","COMPONENT_NAME","inputValue","toRef","errorId","isReadOnly","useFormLayoutFieldLoading","radioButton","shouldShowError","shouldShowErrorMessage","conditionalClasses","isVertical","shouldShowSlotError","onInput","deprecate","watch","newVal"],"mappings":";;;;;;;;;;;;;;;;;GAsLIA,KAAA;AAAA,EAAe,MAAA;AAAA,EACL,OAAA,EAAA,MAAA,aAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAvIA,UAAAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GACAI,IAAAC,GAiDAC,IAAAC,GAYA,EAAA,OAAAC,EAAA,IAAAC,EAAAL,CAAA,GACA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A,IAAAC,EAAAH,EAAA1B,GAAA,UAAA,CAAA,GACA8B,IAAApB,EAAA,IAAA,GAEAqB,IAAAlB;AAAA,MAAwB,MAAA,CAAAb,EAAA,YAAA,CAAA4B,EAAA,UAAA,CAAA,CAAA5B,EAAA,gBAAAA,EAAA;AAAA,IACyD,GAEjFgC,IAAAnB,EAAA,MAAA,CAAAb,EAAA,YAAA,CAAA4B,EAAA,SAAA,CAAA,CAAA5B,EAAA,YAAA,GAEAiC,IAAApB,EAAA,OAAA;AAAA,MAA2C,sCAAAb,EAAA,YAAAqB,EAAA;AAAA,IACwC,EAAA,GAInFa,IAAArB,EAAA,MAAAb,EAAA,YAAA,UAAA,GACAmC,IAAAtB,EAAA,MAAAf,EAAA,SAAA,KAAA,EAAAoC,KAAA,QAAAA,EAAA,MAAA,GAEAE,IAAA,CAAAhC,MAAA;AACI,MAAAF,EAAA,sBAAAE,CAAA,GACAF,EAAA,SAAAE,CAAA;AAAA,IAAmB;AAGvB,WAAAJ,EAAA,YACIqC;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIRC;AAAA,MAAAH;AAAA,MACI,CAAAI,MAAA;AAEI,YAAAA;AACI,gBAAA,IAAA,MAAA,wEAAA;AAAA,MACJ;AAAA,MACJ;AAAA,QACA,WAAA;AAAA,MACe;AAAA,IACf,GAOJnB,EAAA;AAAA,MAAa,OAJb,MAAA;AACI,QAAAU,EAAA,MAAA,CAAA,EAAA,MAAA;AAAA,MAA2B;AAAA,IAI3B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as S, provide as E, toRef as g, useAttrs as A, ref as p, watch as P, createElementBlock as T, openBlock as N, createVNode as n, mergeProps as F, unref as s, createSlots as x, withCtx as m, createElementVNode as L, withKeys as f } from "vue";
2
2
  import { d as U } from "./debounce.DUTu11PS.js";
3
- import { u as k } from "./i18n.WMYWtwxB.js";
4
- import { B as K } from "./input-field.Cx4fMIb7.js";
5
- import { I as R } from "./dropdown.BWu3fV-K.js";
3
+ import { u as k } from "./i18n.D9azDLPe.js";
4
+ import { B as K } from "./input-field.DQKiMtZo.js";
5
+ import { I as R } from "./dropdown.BN6DALZa.js";
6
6
  import { S as w } from "./search.KgjmJMHa.js";
7
7
  import { C as D } from "./cross-circle-fill.BzSjakuO.js";
8
8
  import { _ as $ } from "./_plugin-vue_export-helper.CHgC5LLL.js";
@@ -129,4 +129,4 @@ export {
129
129
  h as a,
130
130
  B as b
131
131
  };
132
- //# sourceMappingURL=search-bar.BTu1j3Ll.js.map
132
+ //# sourceMappingURL=search-bar.CatznIEM.js.map