@adyen/bento-vue2 1.43.0 → 1.45.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 (297) hide show
  1. package/dist/@types/index.d.ts +118 -143
  2. package/dist/accordion.js +1 -1
  3. package/dist/action-bar.js +1 -1
  4. package/dist/alert.js +1 -1
  5. package/dist/assets/accordion-item.css +1 -1
  6. package/dist/assets/action-bar.css +1 -1
  7. package/dist/assets/base-button.css +1 -1
  8. package/dist/assets/base-modal.css +1 -1
  9. package/dist/assets/button-actions-with-menu.css +1 -1
  10. package/dist/assets/button-actions.css +1 -1
  11. package/dist/assets/button.css +1 -1
  12. package/dist/assets/card.css +1 -1
  13. package/dist/assets/checkbox.css +1 -1
  14. package/dist/assets/data-grid.css +1 -1
  15. package/dist/assets/dialog-page.css +1 -1
  16. package/dist/assets/dropdown-default-textbox.css +1 -1
  17. package/dist/assets/dropdown.css +1 -1
  18. package/dist/assets/file-uploader.css +1 -1
  19. package/dist/assets/focus-trap.css +1 -1
  20. package/dist/assets/header.css +1 -1
  21. package/dist/assets/info-icon-with-popover.css +1 -0
  22. package/dist/assets/input-field.css +1 -1
  23. package/dist/assets/inspector.css +1 -1
  24. package/dist/assets/layout-row.css +1 -1
  25. package/dist/assets/link.css +1 -1
  26. package/dist/assets/menu.css +1 -1
  27. package/dist/assets/modal-fullscreen.css +1 -1
  28. package/dist/assets/popover.css +1 -1
  29. package/dist/assets/popper-container.css +1 -1
  30. package/dist/assets/radio-input.css +1 -1
  31. package/dist/assets/selection-card-group.css +1 -1
  32. package/dist/assets/sidepanel.css +1 -1
  33. package/dist/assets/tabs.css +1 -1
  34. package/dist/assets/textarea.css +1 -1
  35. package/dist/assets/use-cached-selected-values.css +1 -1
  36. package/dist/avatar.js +1 -1
  37. package/dist/button.js +8 -9
  38. package/dist/button.js.map +1 -1
  39. package/dist/card.js +1 -1
  40. package/dist/checkbox.js +2 -2
  41. package/dist/chunks/{accordion-item.BjXzREaK.js → accordion-item.CzKttO4w.js} +5 -5
  42. package/dist/chunks/{accordion-item.BjXzREaK.js.map → accordion-item.CzKttO4w.js.map} +1 -1
  43. package/dist/chunks/{action-bar.kPPYSgQK.js → action-bar.BXemSuq4.js} +18 -18
  44. package/dist/chunks/action-bar.BXemSuq4.js.map +1 -0
  45. package/dist/chunks/{alert.D2Z_aiFC.js → alert.CAIp-87f.js} +3 -3
  46. package/dist/chunks/{alert.D2Z_aiFC.js.map → alert.CAIp-87f.js.map} +1 -1
  47. package/dist/chunks/{avatar.DXzyWKsI.js → avatar.BgwjpLQO.js} +2 -2
  48. package/dist/chunks/{avatar.DXzyWKsI.js.map → avatar.BgwjpLQO.js.map} +1 -1
  49. package/dist/chunks/{base-button.4UYC3kp2.js → base-button.-gx_u8Bd.js} +3 -3
  50. package/dist/chunks/base-button.-gx_u8Bd.js.map +1 -0
  51. package/dist/chunks/{base-modal.DroVbSCn.js → base-modal.4JSNBM4T.js} +12 -12
  52. package/dist/chunks/{base-modal.DroVbSCn.js.map → base-modal.4JSNBM4T.js.map} +1 -1
  53. package/dist/chunks/{button-actions-with-menu.dp6C-PKX.js → button-actions-with-menu.ieopdfI7.js} +38 -29
  54. package/dist/chunks/button-actions-with-menu.ieopdfI7.js.map +1 -0
  55. package/dist/chunks/button-actions.CtFB6iRj.js +252 -0
  56. package/dist/chunks/button-actions.CtFB6iRj.js.map +1 -0
  57. package/dist/chunks/{button.CufUNBkv.js → button.BX6ZJxF7.js} +13 -13
  58. package/dist/chunks/button.BX6ZJxF7.js.map +1 -0
  59. package/dist/chunks/{calendar.B9WZ8ub3.js → calendar.BouORZfb.js} +9 -9
  60. package/dist/chunks/{calendar.B9WZ8ub3.js.map → calendar.BouORZfb.js.map} +1 -1
  61. package/dist/chunks/{card.BcjxzwZV.js → card.BabmUkTG.js} +6 -6
  62. package/dist/chunks/{card.BcjxzwZV.js.map → card.BabmUkTG.js.map} +1 -1
  63. package/dist/chunks/{checkbox-group.Bcqac3y8.js → checkbox-group.DbLznnsa.js} +7 -7
  64. package/dist/chunks/{checkbox-group.Bcqac3y8.js.map → checkbox-group.DbLznnsa.js.map} +1 -1
  65. package/dist/chunks/{checkbox.B1qjI4R_.js → checkbox.fhQLs-NN.js} +6 -6
  66. package/dist/chunks/checkbox.fhQLs-NN.js.map +1 -0
  67. package/dist/chunks/{chevron-left.CtnrsqUy.js → chevron-left.PIu6yPqe.js} +3 -3
  68. package/dist/chunks/{chevron-left.CtnrsqUy.js.map → chevron-left.PIu6yPqe.js.map} +1 -1
  69. package/dist/chunks/{chevron-up.B2uWhZf7.js → chevron-up.DVfo78kV.js} +3 -3
  70. package/dist/chunks/{chevron-up.B2uWhZf7.js.map → chevron-up.DVfo78kV.js.map} +1 -1
  71. package/dist/chunks/{code-snippet.DuZDA7gH.js → code-snippet.5iJcUZSo.js} +20 -20
  72. package/dist/chunks/{code-snippet.DuZDA7gH.js.map → code-snippet.5iJcUZSo.js.map} +1 -1
  73. package/dist/chunks/{codemirror.BlV6WO5w.js → codemirror.CXFEqvAi.js} +2047 -2053
  74. package/dist/chunks/{codemirror.BlV6WO5w.js.map → codemirror.CXFEqvAi.js.map} +1 -1
  75. package/dist/chunks/{controls-group.J8shO_JL.js → controls-group.CnXzOQkX.js} +3 -3
  76. package/dist/chunks/{controls-group.J8shO_JL.js.map → controls-group.CnXzOQkX.js.map} +1 -1
  77. package/dist/chunks/{copy.DgzxvExj.js → copy.DN0tClPm.js} +4 -4
  78. package/dist/chunks/{copy.DgzxvExj.js.map → copy.DN0tClPm.js.map} +1 -1
  79. package/dist/chunks/{country.CM5oZOyZ.js → country.Bft91V1L.js} +3 -3
  80. package/dist/chunks/{country.CM5oZOyZ.js.map → country.Bft91V1L.js.map} +1 -1
  81. package/dist/chunks/{country.types.Br0AjxGy.js → country.types.pilf5B3F.js} +483 -480
  82. package/dist/chunks/{country.types.Br0AjxGy.js.map → country.types.pilf5B3F.js.map} +1 -1
  83. package/dist/chunks/{currency.P7Psn_SK.js → currency.BmI4Sqy5.js} +2 -2
  84. package/dist/chunks/{currency.P7Psn_SK.js.map → currency.BmI4Sqy5.js.map} +1 -1
  85. package/dist/chunks/{dashboard-section.CExqPbQb.js → dashboard-section.DYXZhtop.js} +5 -5
  86. package/dist/chunks/{dashboard-section.CExqPbQb.js.map → dashboard-section.DYXZhtop.js.map} +1 -1
  87. package/dist/chunks/{dashed-underline.dGO33Q_E.js → dashed-underline.BvSZS1-m.js} +4 -4
  88. package/dist/chunks/{dashed-underline.dGO33Q_E.js.map → dashed-underline.BvSZS1-m.js.map} +1 -1
  89. package/dist/chunks/{data-grid-template.BF7JMfoJ.js → data-grid-template.Du92TEFY.js} +4 -4
  90. package/dist/chunks/{data-grid-template.BF7JMfoJ.js.map → data-grid-template.Du92TEFY.js.map} +1 -1
  91. package/dist/chunks/{data-grid.BXB98JQr.js → data-grid.Kwtf1DMq.js} +46 -46
  92. package/dist/chunks/{data-grid.BXB98JQr.js.map → data-grid.Kwtf1DMq.js.map} +1 -1
  93. package/dist/chunks/{date-picker.Dfg1_eo6.js → date-picker.B7mTNghB.js} +11 -11
  94. package/dist/chunks/{date-picker.Dfg1_eo6.js.map → date-picker.B7mTNghB.js.map} +1 -1
  95. package/dist/chunks/{date-range-picker.xYGf0SRg.js → date-range-picker.DPLri9D-.js} +241 -241
  96. package/dist/chunks/{date-range-picker.xYGf0SRg.js.map → date-range-picker.DPLri9D-.js.map} +1 -1
  97. package/dist/chunks/{date.BQ29-2L1.js → date.1zs9CRhw.js} +2 -4
  98. package/dist/chunks/{date.BQ29-2L1.js.map → date.1zs9CRhw.js.map} +1 -1
  99. package/dist/chunks/{dialog-page.CplkzZGZ.js → dialog-page.DcJ7LaOE.js} +33 -32
  100. package/dist/chunks/dialog-page.DcJ7LaOE.js.map +1 -0
  101. package/dist/chunks/{dropdown-default-textbox.DPZmj7xJ.js → dropdown-default-textbox.DBoSso4J.js} +124 -104
  102. package/dist/chunks/dropdown-default-textbox.DBoSso4J.js.map +1 -0
  103. package/dist/chunks/{dropdown-tag.B4RMse5R.js → dropdown-tag.XIlES6IT.js} +8 -8
  104. package/dist/chunks/{dropdown-tag.B4RMse5R.js.map → dropdown-tag.XIlES6IT.js.map} +1 -1
  105. package/dist/chunks/{dropdown.BfzsI2Th.js → dropdown.BqsoncJr.js} +228 -222
  106. package/dist/chunks/dropdown.BqsoncJr.js.map +1 -0
  107. package/dist/chunks/{empty-state.B8ZeRgDi.js → empty-state.1TyzB5ju.js} +5 -5
  108. package/dist/chunks/{empty-state.B8ZeRgDi.js.map → empty-state.1TyzB5ju.js.map} +1 -1
  109. package/dist/chunks/{error-message.B7uoqQpq.js → error-message.Ccc1sTTp.js} +3 -3
  110. package/dist/chunks/{error-message.B7uoqQpq.js.map → error-message.Ccc1sTTp.js.map} +1 -1
  111. package/dist/chunks/es6.jIyAPBgt.js +11 -0
  112. package/dist/chunks/{es6.b4enG1py.js.map → es6.jIyAPBgt.js.map} +1 -1
  113. package/dist/chunks/{file-uploader.CK-Frs_q.js → file-uploader.C6kcnhqp.js} +228 -227
  114. package/dist/chunks/file-uploader.C6kcnhqp.js.map +1 -0
  115. package/dist/chunks/{filter-bar.hBPWastb.js → filter-bar.DT_-lVmf.js} +54 -55
  116. package/dist/chunks/{filter-bar.hBPWastb.js.map → filter-bar.DT_-lVmf.js.map} +1 -1
  117. package/dist/chunks/{fixed-scroller.B880PL1J.js → fixed-scroller.IPM3AzHS.js} +4 -4
  118. package/dist/chunks/{fixed-scroller.B880PL1J.js.map → fixed-scroller.IPM3AzHS.js.map} +1 -1
  119. package/dist/chunks/focus-trap.CGypVwG6.js +495 -0
  120. package/dist/chunks/focus-trap.CGypVwG6.js.map +1 -0
  121. package/dist/chunks/{footer-actions.DwnLB4NW.js → footer-actions.D0uH9JWq.js} +4 -4
  122. package/dist/chunks/{footer-actions.DwnLB4NW.js.map → footer-actions.D0uH9JWq.js.map} +1 -1
  123. package/dist/chunks/{form-layout-title.BarHgyjC.js → form-layout-title.DN0jonFa.js} +3 -3
  124. package/dist/chunks/{form-layout-title.BarHgyjC.js.map → form-layout-title.DN0jonFa.js.map} +1 -1
  125. package/dist/chunks/{generate-uid.D-HFI38h.js → generate-uid.NJ8tVoha.js} +2 -2
  126. package/dist/chunks/{generate-uid.D-HFI38h.js.map → generate-uid.NJ8tVoha.js.map} +1 -1
  127. package/dist/chunks/header.BvZxtIOD.js +205 -0
  128. package/dist/chunks/header.BvZxtIOD.js.map +1 -0
  129. package/dist/chunks/{index.Gcw_BUVh.js → index.D8ivUe7P.js} +6 -5
  130. package/dist/chunks/{index.Gcw_BUVh.js.map → index.D8ivUe7P.js.map} +1 -1
  131. package/dist/chunks/info-icon-with-popover.DEjsASNU.js +71 -0
  132. package/dist/chunks/info-icon-with-popover.DEjsASNU.js.map +1 -0
  133. package/dist/chunks/{info-icon.p-28zHUJ.js → info-icon.0d0GzDe2.js} +3 -3
  134. package/dist/chunks/{info-icon.p-28zHUJ.js.map → info-icon.0d0GzDe2.js.map} +1 -1
  135. package/dist/chunks/{input-field-password.BmfOGkrH.js → input-field-password.HRDEb0jL.js} +10 -10
  136. package/dist/chunks/{input-field-password.BmfOGkrH.js.map → input-field-password.HRDEb0jL.js.map} +1 -1
  137. package/dist/chunks/{input-field.CHD3Fzzg.js → input-field.D6N2kt7s.js} +6 -6
  138. package/dist/chunks/input-field.D6N2kt7s.js.map +1 -0
  139. package/dist/chunks/{inspector.types.DaY6OOzz.js → inspector.types.2YEArjPi.js} +5 -5
  140. package/dist/chunks/{inspector.types.DaY6OOzz.js.map → inspector.types.2YEArjPi.js.map} +1 -1
  141. package/dist/chunks/{layout-row.DzS_XyyF.js → layout-row.BfS-cPky.js} +5 -5
  142. package/dist/chunks/layout-row.BfS-cPky.js.map +1 -0
  143. package/dist/chunks/{link.v-y0fKjn.js → link.UOEUR35A.js} +7 -7
  144. package/dist/chunks/{link.v-y0fKjn.js.map → link.UOEUR35A.js.map} +1 -1
  145. package/dist/chunks/{listbox-option-tag.BnX0H4HE.js → listbox-option-tag.Co0ycEdQ.js} +3 -3
  146. package/dist/chunks/{listbox-option-tag.BnX0H4HE.js.map → listbox-option-tag.Co0ycEdQ.js.map} +1 -1
  147. package/dist/chunks/{menu.N41WnXc8.js → menu.CLaN9Eys.js} +83 -56
  148. package/dist/chunks/menu.CLaN9Eys.js.map +1 -0
  149. package/dist/chunks/{modal-fullscreen.BbNe6M9T.js → modal-fullscreen.B-qr1Szh.js} +7 -7
  150. package/dist/chunks/{modal-fullscreen.BbNe6M9T.js.map → modal-fullscreen.B-qr1Szh.js.map} +1 -1
  151. package/dist/chunks/{modal.Cb4zg5fN.js → modal.wU3uUJKq.js} +6 -6
  152. package/dist/chunks/{modal.Cb4zg5fN.js.map → modal.wU3uUJKq.js.map} +1 -1
  153. package/dist/chunks/{pagination.DORr-ox0.js → pagination.BM3FhtxJ.js} +5 -5
  154. package/dist/chunks/{pagination.DORr-ox0.js.map → pagination.BM3FhtxJ.js.map} +1 -1
  155. package/dist/chunks/{payment-method.CoXB0ZAW.js → payment-method.UaERFtej.js} +2 -2
  156. package/dist/chunks/{payment-method.CoXB0ZAW.js.map → payment-method.UaERFtej.js.map} +1 -1
  157. package/dist/chunks/{popover.Uy-vuQq5.js → popover.DsUymZWJ.js} +5 -5
  158. package/dist/chunks/{popover.Uy-vuQq5.js.map → popover.DsUymZWJ.js.map} +1 -1
  159. package/dist/chunks/{popper-container.CnWphJTN.js → popper-container.B1iB2ovW.js} +5 -5
  160. package/dist/chunks/popper-container.B1iB2ovW.js.map +1 -0
  161. package/dist/chunks/{promo-banner.cTUF9seG.js → promo-banner.BXtIM4C9.js} +7 -7
  162. package/dist/chunks/{promo-banner.cTUF9seG.js.map → promo-banner.BXtIM4C9.js.map} +1 -1
  163. package/dist/chunks/{radio-group.EnMXbuly.js → radio-group.DMob8x2J.js} +15 -15
  164. package/dist/chunks/{radio-group.EnMXbuly.js.map → radio-group.DMob8x2J.js.map} +1 -1
  165. package/dist/chunks/{radio-input.q980f8Uf.js → radio-input.C1DZbkcT.js} +5 -5
  166. package/dist/chunks/radio-input.C1DZbkcT.js.map +1 -0
  167. package/dist/chunks/{search-bar.BtFX4039.js → search-bar.rubkdbcD.js} +3 -3
  168. package/dist/chunks/{search-bar.BtFX4039.js.map → search-bar.rubkdbcD.js.map} +1 -1
  169. package/dist/chunks/{secondary-nav.DtnWRhFW.js → secondary-nav.DKSjc5bn.js} +5 -5
  170. package/dist/chunks/{secondary-nav.DtnWRhFW.js.map → secondary-nav.DKSjc5bn.js.map} +1 -1
  171. package/dist/chunks/{segmented-control.CVeUROYR.js → segmented-control.DL0W7lJ_.js} +4 -4
  172. package/dist/chunks/{segmented-control.CVeUROYR.js.map → segmented-control.DL0W7lJ_.js.map} +1 -1
  173. package/dist/chunks/{selection-card-group.B6XXbJsv.js → selection-card-group.iYyZ9yX4.js} +12 -12
  174. package/dist/chunks/{selection-card-group.B6XXbJsv.js.map → selection-card-group.iYyZ9yX4.js.map} +1 -1
  175. package/dist/chunks/{sidepanel.CRJN9Acz.js → sidepanel.CQnLpV8A.js} +7 -7
  176. package/dist/chunks/{sidepanel.CRJN9Acz.js.map → sidepanel.CQnLpV8A.js.map} +1 -1
  177. package/dist/chunks/{status.types.B0jtv0c7.js → status.types.Cv6hHRMu.js} +2 -2
  178. package/dist/chunks/{status.types.B0jtv0c7.js.map → status.types.Cv6hHRMu.js.map} +1 -1
  179. package/dist/chunks/{step.5g9BIi15.js → step.BsIdWhaZ.js} +3 -3
  180. package/dist/chunks/{step.5g9BIi15.js.map → step.BsIdWhaZ.js.map} +1 -1
  181. package/dist/chunks/{structured-list-item.BEhWyaVP.js → structured-list-item.BhBbmkbw.js} +6 -6
  182. package/dist/chunks/{structured-list-item.BEhWyaVP.js.map → structured-list-item.BhBbmkbw.js.map} +1 -1
  183. package/dist/chunks/{summary-grid-item-custom.CSXo4NjY.js → summary-grid-item-custom.CicAOBVQ.js} +5 -5
  184. package/dist/chunks/{summary-grid-item-custom.CSXo4NjY.js.map → summary-grid-item-custom.CicAOBVQ.js.map} +1 -1
  185. package/dist/chunks/{tabs.Casntai-.js → tabs.9kObZry9.js} +5 -5
  186. package/dist/chunks/{tabs.Casntai-.js.map → tabs.9kObZry9.js.map} +1 -1
  187. package/dist/chunks/{tag.wTXg-O7i.js → tag.-YNhsBv7.js} +3 -3
  188. package/dist/chunks/{tag.wTXg-O7i.js.map → tag.-YNhsBv7.js.map} +1 -1
  189. package/dist/chunks/{teleport.CQKBJZU5.js → teleport.B5fwsT5y.js} +26 -17
  190. package/dist/chunks/teleport.B5fwsT5y.js.map +1 -0
  191. package/dist/chunks/textarea.Cf21WMwL.js +196 -0
  192. package/dist/chunks/{textarea.Y3yd_3ll.js.map → textarea.Cf21WMwL.js.map} +1 -1
  193. package/dist/chunks/{timeline-item.CCV4U3Zx.js → timeline-item.Cu5b-Mqj.js} +12 -12
  194. package/dist/chunks/timeline-item.Cu5b-Mqj.js.map +1 -0
  195. package/dist/chunks/{toast.BEipTIrz.js → toast.DgJbW9CL.js} +4 -4
  196. package/dist/chunks/{toast.BEipTIrz.js.map → toast.DgJbW9CL.js.map} +1 -1
  197. package/dist/chunks/{toggle-button.CYplDIO-.js → toggle-button.Cf8C7p6e.js} +2 -2
  198. package/dist/chunks/{toggle-button.CYplDIO-.js.map → toggle-button.Cf8C7p6e.js.map} +1 -1
  199. package/dist/chunks/{toggle.INRYdQzz.js → toggle.CnS7qszG.js} +3 -3
  200. package/dist/chunks/{toggle.INRYdQzz.js.map → toggle.CnS7qszG.js.map} +1 -1
  201. package/dist/chunks/{tooltip.DH8TqpYV.js → tooltip.R2sqydIE.js} +4 -4
  202. package/dist/chunks/{tooltip.DH8TqpYV.js.map → tooltip.R2sqydIE.js.map} +1 -1
  203. package/dist/chunks/{tutorial.4r7MKNEU.js → tutorial.w2ZqeOh1.js} +9 -9
  204. package/dist/chunks/{tutorial.4r7MKNEU.js.map → tutorial.w2ZqeOh1.js.map} +1 -1
  205. package/dist/chunks/{typography.Bu_WAKdf.js → typography.J1v_SPG3.js} +2 -1
  206. package/dist/chunks/{typography.Bu_WAKdf.js.map → typography.J1v_SPG3.js.map} +1 -1
  207. package/dist/chunks/{use-bento-toast-controller.BVVMh0wc.js → use-bento-toast-controller.Cn_2Eogn.js} +3 -3
  208. package/dist/chunks/{use-bento-toast-controller.BVVMh0wc.js.map → use-bento-toast-controller.Cn_2Eogn.js.map} +1 -1
  209. package/dist/chunks/{use-cached-selected-values.CAlfyb_L.js → use-cached-selected-values.impKjAIS.js} +46 -46
  210. package/dist/chunks/use-cached-selected-values.impKjAIS.js.map +1 -0
  211. package/dist/chunks/{use-country-items.C25TI6tp.js → use-country-items.DPBbl1KK.js} +2 -2
  212. package/dist/chunks/{use-country-items.C25TI6tp.js.map → use-country-items.DPBbl1KK.js.map} +1 -1
  213. package/dist/code-snippet.js +1 -1
  214. package/dist/country.js +2 -2
  215. package/dist/currency.js +1 -1
  216. package/dist/dashboard-template.js +1 -1
  217. package/dist/dashed-underline.js +1 -1
  218. package/dist/data-grid-template.js +1 -1
  219. package/dist/data-grid.js +1 -1
  220. package/dist/date-picker.js +2 -2
  221. package/dist/date-range-picker.js +2 -2
  222. package/dist/date.js +1 -1
  223. package/dist/dropdown.js +4 -4
  224. package/dist/empty-state.js +1 -1
  225. package/dist/file-uploader.js +1 -1
  226. package/dist/filter-bar.js +1 -1
  227. package/dist/focus-trap.js +1 -1
  228. package/dist/form-layout.js +1 -1
  229. package/dist/header.js +1 -1
  230. package/dist/index.js +115 -116
  231. package/dist/index.js.map +1 -1
  232. package/dist/info-icon.js +1 -1
  233. package/dist/input-field-password.js +1 -1
  234. package/dist/input-field.js +1 -1
  235. package/dist/inspector.js +1 -1
  236. package/dist/internal.js +33 -27
  237. package/dist/internal.js.map +1 -1
  238. package/dist/layout.js +1 -1
  239. package/dist/link.js +1 -1
  240. package/dist/menu.js +1 -1
  241. package/dist/modal-fullscreen.js +1 -1
  242. package/dist/modal.js +2 -2
  243. package/dist/pagination.js +1 -1
  244. package/dist/payment-method.js +1 -1
  245. package/dist/popover.js +1 -1
  246. package/dist/popper-container.js +1 -1
  247. package/dist/promo-banner.js +1 -1
  248. package/dist/radio-group.js +2 -2
  249. package/dist/search-bar.js +2 -2
  250. package/dist/secondary-nav.js +1 -1
  251. package/dist/segmented-control.js +1 -1
  252. package/dist/selection-card.js +1 -1
  253. package/dist/sidepanel.js +1 -1
  254. package/dist/status.js +1 -1
  255. package/dist/stepper.js +1 -1
  256. package/dist/structured-list.js +1 -1
  257. package/dist/summary-grid.js +1 -1
  258. package/dist/tabs.js +1 -1
  259. package/dist/tag.js +1 -1
  260. package/dist/textarea.js +1 -1
  261. package/dist/timeline.js +1 -1
  262. package/dist/toast.js +1 -1
  263. package/dist/toggle.js +1 -1
  264. package/dist/tutorial.js +1 -1
  265. package/dist/typography.js +1 -1
  266. package/dist/web-types.json +49 -3
  267. package/package.json +7 -6
  268. package/dist/assets/loading-button.css +0 -1
  269. package/dist/chunks/action-bar.kPPYSgQK.js.map +0 -1
  270. package/dist/chunks/base-button.4UYC3kp2.js.map +0 -1
  271. package/dist/chunks/button-actions-with-menu.dp6C-PKX.js.map +0 -1
  272. package/dist/chunks/button-actions.Cpx4PQp0.js +0 -111
  273. package/dist/chunks/button-actions.Cpx4PQp0.js.map +0 -1
  274. package/dist/chunks/button.CufUNBkv.js.map +0 -1
  275. package/dist/chunks/checkbox.B1qjI4R_.js.map +0 -1
  276. package/dist/chunks/dialog-page.CplkzZGZ.js.map +0 -1
  277. package/dist/chunks/dropdown-default-textbox.DPZmj7xJ.js.map +0 -1
  278. package/dist/chunks/dropdown.BfzsI2Th.js.map +0 -1
  279. package/dist/chunks/es6.b4enG1py.js +0 -10
  280. package/dist/chunks/file-uploader.CK-Frs_q.js.map +0 -1
  281. package/dist/chunks/focus-trap.DSkLNO_i.js +0 -443
  282. package/dist/chunks/focus-trap.DSkLNO_i.js.map +0 -1
  283. package/dist/chunks/header.CAJtHW1k.js +0 -266
  284. package/dist/chunks/header.CAJtHW1k.js.map +0 -1
  285. package/dist/chunks/input-field.CHD3Fzzg.js.map +0 -1
  286. package/dist/chunks/layout-row.DzS_XyyF.js.map +0 -1
  287. package/dist/chunks/loading-button.CiPmvU7F.js +0 -113
  288. package/dist/chunks/loading-button.CiPmvU7F.js.map +0 -1
  289. package/dist/chunks/menu.N41WnXc8.js.map +0 -1
  290. package/dist/chunks/popper-container.CnWphJTN.js.map +0 -1
  291. package/dist/chunks/radio-input.q980f8Uf.js.map +0 -1
  292. package/dist/chunks/teleport.CQKBJZU5.js.map +0 -1
  293. package/dist/chunks/textarea.Y3yd_3ll.js +0 -192
  294. package/dist/chunks/timeline-item.CCV4U3Zx.js.map +0 -1
  295. package/dist/chunks/use-cached-selected-values.CAlfyb_L.js.map +0 -1
  296. package/dist/chunks/use-click-outside.D6aIgS15.js +0 -14
  297. package/dist/chunks/use-click-outside.D6aIgS15.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { ref as n, onMounted as R, computed as f, defineComponent as L } from "vue";
2
- import { B as x } from "./button.CufUNBkv.js";
2
+ import { B as x } from "./button.BX6ZJxF7.js";
3
3
  import { u as C } from "./i18n.BQkEbtPM.js";
4
- import { C as b, a as y } from "./chevron-left.CtnrsqUy.js";
4
+ import { C as b, a as y } from "./chevron-left.PIu6yPqe.js";
5
5
  import { o as m } from "./resize.Bqks3WUm.js";
6
6
  import { n as W } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
7
7
  import "../assets/fixed-scroller.css";
@@ -78,7 +78,7 @@ const w = 1, g = 40, F = ({
78
78
  leftButtonRef: r,
79
79
  rightButtonRef: l
80
80
  });
81
- return { __sfc: !0, t: e, contentRef: o, fixedScrollerRef: t, leftButtonRef: r, rightButtonRef: l, offset: u, shouldShowLeftButton: a, shouldShowRightButton: _, scrollLeft: i, scrollRight: v, BentoButton: x, ChevronLeftIcon: b, ChevronRightIcon: y };
81
+ return { __sfc: !0, t: e, contentRef: o, fixedScrollerRef: t, leftButtonRef: r, rightButtonRef: l, offset: u, shouldShowLeftButton: a, shouldShowRightButton: _, scrollLeft: i, scrollRight: v, BentoButton: x, ChevronLeftIcon: y, ChevronRightIcon: b };
82
82
  }
83
83
  });
84
84
  var E = function() {
@@ -103,4 +103,4 @@ const U = P.exports;
103
103
  export {
104
104
  U as F
105
105
  };
106
- //# sourceMappingURL=fixed-scroller.B880PL1J.js.map
106
+ //# sourceMappingURL=fixed-scroller.IPM3AzHS.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fixed-scroller.B880PL1J.js","sources":["../../src/components/internal/fixed-scroller/composables/useFixedScroller.ts","../../src/components/internal/fixed-scroller/fixed-scroller.vue"],"sourcesContent":["import { observeSizeOfElement } from '@/utils/ts/resize';\nimport { computed, onMounted, ref } from 'vue';\nimport type { Ref, UnwrapRef } from 'vue';\n\n// Adding an offset of \"1\" so that the border can be shown within the boundaries\nconst OVERFLOW_CLIP_OFFSET = 1;\n// Add the gradient offset to the calculations\nconst GRADIENT_OFFSET = 40;\n\ninterface useFixedScrollerProps {\n contentRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n containerRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n leftButtonRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n rightButtonRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n}\n\n/**\n * Function to calculate the offset of each view and change the \"view\" via offsets\n * through the functions `scrollLeft` and `scrollRight` whilst providing a way to\n * show and hide the buttons based on the current \"view\" via\n * `shouldShowLeftButton` and `shouldShowRightButton`.\n *\n * Each view is pre-calculated (offsetArray) and updated if the content changes as a computed ref:\n * First view: Always 0 (x axis beginning).\n * Last view: total content space - visible width\n * Intermediate views: Previous offset (to the left) plus the visible space taking\n * away the space the buttons take so that the whole view can be rendered\n *\n *\n * @param props - All the necessary references to calculate the scroll\n * @param props.containerRef - Reference to the container, this defines the visible space width\n * @param props.contentRef - Reference to the content itself, this defines the total content width\n * @param props.leftButtonRef - Reference to the left button, used to calculate total space in which the content will be rendered\n * @param props.rightButtonRef - Reference to the right button, used to calculate total space in which the content will be rendered\n * @returns response - Values used in the view to show the buttons and to change the view right or left\n * @returns response.offset - Offset value by which the view will move on the x axis. To be used in `styles`.\n * @returns response.shouldShowLeftButton - Indicates if the button on the left should be shown\n * @returns response.shouldShowRightButton - Indicates if the button on the right should be shown\n * @returns response.scrollLeft - Used to shift the view to the left\n * @returns response.scrollRight - Used to shift the view to the right\n */\nexport const useFixedScroller = ({\n contentRef,\n containerRef,\n leftButtonRef,\n rightButtonRef,\n}: useFixedScrollerProps) => {\n const offset = ref(0);\n const currentView = ref(0);\n\n // Calculated using 'scrollWidth' to get the full width of the content\n const totalContentWidth = ref(0);\n // Calculated using 'clientWidth' to get the rendered componen width\n const visibleSpaceWidth = ref(0);\n\n onMounted(() => {\n observeSizeOfElement(containerRef.value, () => {\n if (containerRef.value) {\n // Set new width when resized\n visibleSpaceWidth.value = containerRef.value.offsetWidth;\n // Reset the offset and view\n currentView.value = 0;\n offset.value = 0;\n }\n });\n\n observeSizeOfElement(contentRef.value, () => {\n totalContentWidth.value = contentRef.value?.scrollWidth;\n });\n });\n\n // Sum of the space used by the Left and Right buttons\n // Used to calculate how much space the \"actual\" visible space is\n const buttonsWidth = computed(() => {\n const leftButtonWidth = leftButtonRef.value?.scrollWidth\n ? leftButtonRef.value.scrollWidth + GRADIENT_OFFSET\n : 0;\n const rightButtonWidth = rightButtonRef.value?.scrollWidth\n ? rightButtonRef.value.scrollWidth + GRADIENT_OFFSET\n : 0;\n\n return leftButtonWidth + rightButtonWidth;\n });\n // Total number of pages/views available.\n // Calculated as \"ceil\" because if the space doesn't fit \"one view\" (irrational number) the content flows to the next view (integer).\n const totalViews = computed(() => Math.ceil(totalContentWidth.value / visibleSpaceWidth.value) ?? 0);\n\n // Calculation of offsets per view (index).\n // This allows to easily swap the offset without on-the-fly calculations\n const offsetArray = computed(() => {\n const calculatedOffsetList = new Array(totalViews.value).fill(0);\n\n calculatedOffsetList.forEach((_, index) => {\n // First offset will be 0\n if (index === 0) {\n return;\n }\n\n // Calculate last\n if (index === totalViews.value - 1) {\n calculatedOffsetList[calculatedOffsetList.length - 1] = -(\n totalContentWidth.value -\n visibleSpaceWidth.value +\n OVERFLOW_CLIP_OFFSET\n );\n\n return;\n }\n\n // Calculate each offset - Move 1 view\n const previousOffset = calculatedOffsetList[index - 1];\n calculatedOffsetList[index] = -(visibleSpaceWidth.value + Math.abs(previousOffset) - buttonsWidth.value);\n });\n\n return calculatedOffsetList;\n });\n\n // Hide left button when it's the first view\n const shouldShowLeftButton = computed(() => currentView.value !== 0);\n // Hide right button if it's the last view\n const shouldShowRightButton = computed(\n () => offset.value >= -(totalContentWidth.value - visibleSpaceWidth.value - 1)\n );\n\n /**\n * Shifts the current offset by one view to the left.\n */\n const scrollLeft = () => {\n // Do nothing if it is already in page 0\n if (currentView.value === 0) {\n return;\n }\n\n currentView.value -= 1;\n offset.value = offsetArray.value[currentView.value];\n };\n\n /**\n * Shifts the current offset by one view to the right.\n */\n const scrollRight = () => {\n // Do nothing if it is already in last page\n if (currentView.value === totalViews.value - 1) {\n return;\n }\n\n currentView.value += 1;\n offset.value = offsetArray.value[currentView.value];\n };\n\n return {\n offset,\n shouldShowLeftButton,\n shouldShowRightButton,\n\n // Methods\n scrollLeft,\n scrollRight,\n };\n};\n","<template>\n <div ref=\"fixedScrollerRef\" class=\"b-fixed-scroller\">\n <div class=\"b-fixed-scroller__container\">\n <div\n ref=\"contentRef\"\n class=\"b-fixed-scroller__content\"\n :style=\"{\n transform: `translateX(${offset}px)`,\n paddingTop: shouldShowLeftButton || shouldShowRightButton ? `${extraPaddingTop}px` : null,\n }\"\n >\n <slot></slot>\n </div>\n </div>\n\n <div v-if=\"shouldShowLeftButton\" ref=\"leftButtonRef\" class=\"b-fixed-scroller__left\">\n <bento-button variant=\"secondary\" :aria-label=\"t('scrollLeft')\" :condensed=\"condensed\" @click=\"scrollLeft\">\n <template #iconLeft>\n <chevron-left-icon svg-title=\"checked\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n <div v-if=\"shouldShowRightButton\" ref=\"rightButtonRef\" class=\"b-fixed-scroller__right\">\n <bento-button\n variant=\"secondary\"\n :aria-label=\"t('scrollRight')\"\n :condensed=\"condensed\"\n @click=\"scrollRight\"\n >\n <template #iconLeft>\n <chevron-right-icon svg-title=\"checked\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { BentoButton } from '@/components/button';\n import { useFixedScroller } from './composables';\n import { useI18n } from '@/utils/ts/i18n';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n\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 contentRef = ref(null);\n const fixedScrollerRef = ref(null);\n const leftButtonRef = ref(null);\n const rightButtonRef = ref(null);\n\n defineProps({\n /**\n * Applies the condensed style to the buttons\n */\n condensed: { type: Boolean, default: false },\n /**\n * Padding to be applied to the top of the scroller container\n */\n extraPaddingTop: { type: Number, default: 0 },\n });\n\n const { offset, shouldShowLeftButton, shouldShowRightButton, scrollLeft, scrollRight } = useFixedScroller({\n contentRef,\n containerRef: fixedScrollerRef,\n leftButtonRef,\n rightButtonRef,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Allows to horizontally scroll content by one view at a time.\n *\n * @example\n * import { FixedScroller } from '@/internal';\n *\n * export default {\n * components: { FixedScroller },\n * template: `\n * <fixed-scroller>\n * <div style=\"display: flex; gap: 8px;\">\n * {{ Content here }}\n * </div>\n * </fixed-scroller>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./fixed-scroller.scss\" />\n"],"names":["OVERFLOW_CLIP_OFFSET","GRADIENT_OFFSET","useFixedScroller","contentRef","containerRef","leftButtonRef","rightButtonRef","offset","ref","currentView","totalContentWidth","visibleSpaceWidth","onMounted","observeSizeOfElement","_a","buttonsWidth","computed","leftButtonWidth","rightButtonWidth","_b","totalViews","offsetArray","calculatedOffsetList","_","index","previousOffset","shouldShowLeftButton","shouldShowRightButton","__default__","messages","t","useI18n","fixedScrollerRef","scrollLeft","scrollRight"],"mappings":";;;;;;;AAKA,MAAAA,IAAA,GAEAC,IAAA,IAkCOC,IAAA,CAAA;AAAA,EAA0B,YAAAC;AAAA,EAC7B,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,gBAAAC;AAEJ,MAAA;AACI,QAAAC,IAAAC,EAAA,CAAA,GACAC,IAAAD,EAAA,CAAA,GAGAE,IAAAF,EAAA,CAAA,GAEAG,IAAAH,EAAA,CAAA;AAEA,EAAAI,EAAA,MAAA;AACI,IAAAC,EAAAT,EAAA,OAAA,MAAA;AACI,MAAAA,EAAA,UAEIO,EAAA,QAAAP,EAAA,MAAA,aAEAK,EAAA,QAAA,GACAF,EAAA,QAAA;AAAA,IACJ,CAAA,GAGJM,EAAAV,EAAA,OAAA,MAAA;;AACI,MAAAO,EAAA,SAAAI,IAAAX,EAAA,UAAA,gBAAAW,EAAA;AAAA,IAA4C,CAAA;AAAA,EAC/C,CAAA;AAKL,QAAAC,IAAAC,EAAA,MAAA;;AACI,UAAAC,KAAAH,IAAAT,EAAA,UAAA,QAAAS,EAAA,cAAAT,EAAA,MAAA,cAAAJ,IAAA,GAGAiB,KAAAC,IAAAb,EAAA,UAAA,QAAAa,EAAA,cAAAb,EAAA,MAAA,cAAAL,IAAA;AAIA,WAAAgB,IAAAC;AAAA,EAAyB,CAAA,GAI7BE,IAAAJ,EAAA,MAAA,KAAA,KAAAN,EAAA,QAAAC,EAAA,KAAA,KAAA,CAAA,GAIAU,IAAAL,EAAA,MAAA;AACI,UAAAM,IAAA,IAAA,MAAAF,EAAA,KAAA,EAAA,KAAA,CAAA;AAEA,WAAAE,EAAA,QAAA,CAAAC,GAAAC,MAAA;AAEI,UAAAA,MAAA;AACI;AAIJ,UAAAA,MAAAJ,EAAA,QAAA,GAAA;AACI,QAAAE,EAAAA,EAAA,SAAA,CAAA,IAAA,EAAAZ,EAAA,QAAAC,EAAA,QAAAX;AAMA;AAAA,MAAA;AAIJ,YAAAyB,IAAAH,EAAAE,IAAA,CAAA;AACA,MAAAF,EAAAE,CAAA,IAAA,EAAAb,EAAA,QAAA,KAAA,IAAAc,CAAA,IAAAV,EAAA;AAAA,IAAkG,CAAA,GAGtGO;AAAA,EAAO,CAAA,GAIXI,IAAAV,EAAA,MAAAP,EAAA,UAAA,CAAA,GAEAkB,IAAAX;AAAA,IAA8B,MAAAT,EAAA,SAAA,EAAAG,EAAA,QAAAC,EAAA,QAAA;AAAA,EACkD;AA6BhF,SAAA;AAAA,IAAO,QAAAJ;AAAA,IACH,sBAAAmB;AAAA,IACA,uBAAAC;AAAA;AAAA,IACA,YA1BJ,MAAA;AAEI,MAAAlB,EAAA,UAAA,MAIAA,EAAA,SAAA,GACAF,EAAA,QAAAc,EAAA,MAAAZ,EAAA,KAAA;AAAA,IAAkD;AAAA,IAsBlD,aAhBJ,MAAA;AAEI,MAAAA,EAAA,UAAAW,EAAA,QAAA,MAIAX,EAAA,SAAA,GACAF,EAAA,QAAAc,EAAA,MAAAZ,EAAA,KAAA;AAAA,IAAkD;AAAA,EAUlD;AAER;;;;;GClEImB,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;AA9CA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAEA5B,IAAAK,EAAA,IAAA,GACAwB,IAAAxB,EAAA,IAAA,GACAH,IAAAG,EAAA,IAAA,GACAF,IAAAE,EAAA,IAAA,GAaA,EAAA,QAAAD,GAAA,sBAAAmB,GAAA,uBAAAC,GAAA,YAAAM,GAAA,aAAAC,EAAA,IAAAhC,EAAA;AAAA,MAA0G,YAAAC;AAAA,MACtG,cAAA6B;AAAA,MACc,eAAA3B;AAAA,MACd,gBAAAC;AAAA,IACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"fixed-scroller.IPM3AzHS.js","sources":["../../src/components/internal/fixed-scroller/composables/useFixedScroller.ts","../../src/components/internal/fixed-scroller/fixed-scroller.vue"],"sourcesContent":["import { observeSizeOfElement } from '@/utils/ts/resize';\nimport { computed, onMounted, ref } from 'vue';\nimport type { Ref, UnwrapRef } from 'vue';\n\n// Adding an offset of \"1\" so that the border can be shown within the boundaries\nconst OVERFLOW_CLIP_OFFSET = 1;\n// Add the gradient offset to the calculations\nconst GRADIENT_OFFSET = 40;\n\ninterface useFixedScrollerProps {\n contentRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n containerRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n leftButtonRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n rightButtonRef?: Ref<UnwrapRef<HTMLDivElement | undefined>>;\n}\n\n/**\n * Function to calculate the offset of each view and change the \"view\" via offsets\n * through the functions `scrollLeft` and `scrollRight` whilst providing a way to\n * show and hide the buttons based on the current \"view\" via\n * `shouldShowLeftButton` and `shouldShowRightButton`.\n *\n * Each view is pre-calculated (offsetArray) and updated if the content changes as a computed ref:\n * First view: Always 0 (x axis beginning).\n * Last view: total content space - visible width\n * Intermediate views: Previous offset (to the left) plus the visible space taking\n * away the space the buttons take so that the whole view can be rendered\n *\n *\n * @param props - All the necessary references to calculate the scroll\n * @param props.containerRef - Reference to the container, this defines the visible space width\n * @param props.contentRef - Reference to the content itself, this defines the total content width\n * @param props.leftButtonRef - Reference to the left button, used to calculate total space in which the content will be rendered\n * @param props.rightButtonRef - Reference to the right button, used to calculate total space in which the content will be rendered\n * @returns response - Values used in the view to show the buttons and to change the view right or left\n * @returns response.offset - Offset value by which the view will move on the x axis. To be used in `styles`.\n * @returns response.shouldShowLeftButton - Indicates if the button on the left should be shown\n * @returns response.shouldShowRightButton - Indicates if the button on the right should be shown\n * @returns response.scrollLeft - Used to shift the view to the left\n * @returns response.scrollRight - Used to shift the view to the right\n */\nexport const useFixedScroller = ({\n contentRef,\n containerRef,\n leftButtonRef,\n rightButtonRef,\n}: useFixedScrollerProps) => {\n const offset = ref(0);\n const currentView = ref(0);\n\n // Calculated using 'scrollWidth' to get the full width of the content\n const totalContentWidth = ref(0);\n // Calculated using 'clientWidth' to get the rendered componen width\n const visibleSpaceWidth = ref(0);\n\n onMounted(() => {\n observeSizeOfElement(containerRef.value, () => {\n if (containerRef.value) {\n // Set new width when resized\n visibleSpaceWidth.value = containerRef.value.offsetWidth;\n // Reset the offset and view\n currentView.value = 0;\n offset.value = 0;\n }\n });\n\n observeSizeOfElement(contentRef.value, () => {\n totalContentWidth.value = contentRef.value?.scrollWidth;\n });\n });\n\n // Sum of the space used by the Left and Right buttons\n // Used to calculate how much space the \"actual\" visible space is\n const buttonsWidth = computed(() => {\n const leftButtonWidth = leftButtonRef.value?.scrollWidth\n ? leftButtonRef.value.scrollWidth + GRADIENT_OFFSET\n : 0;\n const rightButtonWidth = rightButtonRef.value?.scrollWidth\n ? rightButtonRef.value.scrollWidth + GRADIENT_OFFSET\n : 0;\n\n return leftButtonWidth + rightButtonWidth;\n });\n // Total number of pages/views available.\n // Calculated as \"ceil\" because if the space doesn't fit \"one view\" (irrational number) the content flows to the next view (integer).\n const totalViews = computed(() => Math.ceil(totalContentWidth.value / visibleSpaceWidth.value) ?? 0);\n\n // Calculation of offsets per view (index).\n // This allows to easily swap the offset without on-the-fly calculations\n const offsetArray = computed(() => {\n const calculatedOffsetList = new Array(totalViews.value).fill(0);\n\n calculatedOffsetList.forEach((_, index) => {\n // First offset will be 0\n if (index === 0) {\n return;\n }\n\n // Calculate last\n if (index === totalViews.value - 1) {\n calculatedOffsetList[calculatedOffsetList.length - 1] = -(\n totalContentWidth.value -\n visibleSpaceWidth.value +\n OVERFLOW_CLIP_OFFSET\n );\n\n return;\n }\n\n // Calculate each offset - Move 1 view\n const previousOffset = calculatedOffsetList[index - 1];\n calculatedOffsetList[index] = -(visibleSpaceWidth.value + Math.abs(previousOffset) - buttonsWidth.value);\n });\n\n return calculatedOffsetList;\n });\n\n // Hide left button when it's the first view\n const shouldShowLeftButton = computed(() => currentView.value !== 0);\n // Hide right button if it's the last view\n const shouldShowRightButton = computed(\n () => offset.value >= -(totalContentWidth.value - visibleSpaceWidth.value - 1)\n );\n\n /**\n * Shifts the current offset by one view to the left.\n */\n const scrollLeft = () => {\n // Do nothing if it is already in page 0\n if (currentView.value === 0) {\n return;\n }\n\n currentView.value -= 1;\n offset.value = offsetArray.value[currentView.value];\n };\n\n /**\n * Shifts the current offset by one view to the right.\n */\n const scrollRight = () => {\n // Do nothing if it is already in last page\n if (currentView.value === totalViews.value - 1) {\n return;\n }\n\n currentView.value += 1;\n offset.value = offsetArray.value[currentView.value];\n };\n\n return {\n offset,\n shouldShowLeftButton,\n shouldShowRightButton,\n\n // Methods\n scrollLeft,\n scrollRight,\n };\n};\n","<template>\n <div ref=\"fixedScrollerRef\" class=\"b-fixed-scroller\">\n <div class=\"b-fixed-scroller__container\">\n <div\n ref=\"contentRef\"\n class=\"b-fixed-scroller__content\"\n :style=\"{\n transform: `translateX(${offset}px)`,\n paddingTop: shouldShowLeftButton || shouldShowRightButton ? `${extraPaddingTop}px` : null,\n }\"\n >\n <slot></slot>\n </div>\n </div>\n\n <div v-if=\"shouldShowLeftButton\" ref=\"leftButtonRef\" class=\"b-fixed-scroller__left\">\n <bento-button variant=\"secondary\" :aria-label=\"t('scrollLeft')\" :condensed=\"condensed\" @click=\"scrollLeft\">\n <template #iconLeft>\n <chevron-left-icon svg-title=\"checked\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n <div v-if=\"shouldShowRightButton\" ref=\"rightButtonRef\" class=\"b-fixed-scroller__right\">\n <bento-button\n variant=\"secondary\"\n :aria-label=\"t('scrollRight')\"\n :condensed=\"condensed\"\n @click=\"scrollRight\"\n >\n <template #iconLeft>\n <chevron-right-icon svg-title=\"checked\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { BentoButton } from '@/components/button';\n import { useFixedScroller } from './composables';\n import { useI18n } from '@/utils/ts/i18n';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n\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 contentRef = ref(null);\n const fixedScrollerRef = ref(null);\n const leftButtonRef = ref(null);\n const rightButtonRef = ref(null);\n\n defineProps({\n /**\n * Applies the condensed style to the buttons\n */\n condensed: { type: Boolean, default: false },\n /**\n * Padding to be applied to the top of the scroller container\n */\n extraPaddingTop: { type: Number, default: 0 },\n });\n\n const { offset, shouldShowLeftButton, shouldShowRightButton, scrollLeft, scrollRight } = useFixedScroller({\n contentRef,\n containerRef: fixedScrollerRef,\n leftButtonRef,\n rightButtonRef,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Allows to horizontally scroll content by one view at a time.\n *\n * @example\n * import { FixedScroller } from '@/internal';\n *\n * export default {\n * components: { FixedScroller },\n * template: `\n * <fixed-scroller>\n * <div style=\"display: flex; gap: 8px;\">\n * {{ Content here }}\n * </div>\n * </fixed-scroller>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./fixed-scroller.scss\" />\n"],"names":["OVERFLOW_CLIP_OFFSET","GRADIENT_OFFSET","useFixedScroller","contentRef","containerRef","leftButtonRef","rightButtonRef","offset","ref","currentView","totalContentWidth","visibleSpaceWidth","onMounted","observeSizeOfElement","_a","buttonsWidth","computed","leftButtonWidth","rightButtonWidth","_b","totalViews","offsetArray","calculatedOffsetList","_","index","previousOffset","shouldShowLeftButton","shouldShowRightButton","__default__","messages","t","useI18n","fixedScrollerRef","scrollLeft","scrollRight"],"mappings":";;;;;;;AAKA,MAAAA,IAAA,GAEAC,IAAA,IAkCOC,IAAA,CAAA;AAAA,EAA0B,YAAAC;AAAA,EAC7B,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,gBAAAC;AAEJ,MAAA;AACI,QAAAC,IAAAC,EAAA,CAAA,GACAC,IAAAD,EAAA,CAAA,GAGAE,IAAAF,EAAA,CAAA,GAEAG,IAAAH,EAAA,CAAA;AAEA,EAAAI,EAAA,MAAA;AACI,IAAAC,EAAAT,EAAA,OAAA,MAAA;AACI,MAAAA,EAAA,UAEIO,EAAA,QAAAP,EAAA,MAAA,aAEAK,EAAA,QAAA,GACAF,EAAA,QAAA;AAAA,IACJ,CAAA,GAGJM,EAAAV,EAAA,OAAA,MAAA;;AACI,MAAAO,EAAA,SAAAI,IAAAX,EAAA,UAAA,gBAAAW,EAAA;AAAA,IAA4C,CAAA;AAAA,EAC/C,CAAA;AAKL,QAAAC,IAAAC,EAAA,MAAA;;AACI,UAAAC,KAAAH,IAAAT,EAAA,UAAA,QAAAS,EAAA,cAAAT,EAAA,MAAA,cAAAJ,IAAA,GAGAiB,KAAAC,IAAAb,EAAA,UAAA,QAAAa,EAAA,cAAAb,EAAA,MAAA,cAAAL,IAAA;AAIA,WAAAgB,IAAAC;AAAA,EAAyB,CAAA,GAI7BE,IAAAJ,EAAA,MAAA,KAAA,KAAAN,EAAA,QAAAC,EAAA,KAAA,KAAA,CAAA,GAIAU,IAAAL,EAAA,MAAA;AACI,UAAAM,IAAA,IAAA,MAAAF,EAAA,KAAA,EAAA,KAAA,CAAA;AAEA,WAAAE,EAAA,QAAA,CAAAC,GAAAC,MAAA;AAEI,UAAAA,MAAA;AACI;AAIJ,UAAAA,MAAAJ,EAAA,QAAA,GAAA;AACI,QAAAE,EAAAA,EAAA,SAAA,CAAA,IAAA,EAAAZ,EAAA,QAAAC,EAAA,QAAAX;AAMA;AAAA,MAAA;AAIJ,YAAAyB,IAAAH,EAAAE,IAAA,CAAA;AACA,MAAAF,EAAAE,CAAA,IAAA,EAAAb,EAAA,QAAA,KAAA,IAAAc,CAAA,IAAAV,EAAA;AAAA,IAAkG,CAAA,GAGtGO;AAAA,EAAO,CAAA,GAIXI,IAAAV,EAAA,MAAAP,EAAA,UAAA,CAAA,GAEAkB,IAAAX;AAAA,IAA8B,MAAAT,EAAA,SAAA,EAAAG,EAAA,QAAAC,EAAA,QAAA;AAAA,EACkD;AA6BhF,SAAA;AAAA,IAAO,QAAAJ;AAAA,IACH,sBAAAmB;AAAA,IACA,uBAAAC;AAAA;AAAA,IACA,YA1BJ,MAAA;AAEI,MAAAlB,EAAA,UAAA,MAIAA,EAAA,SAAA,GACAF,EAAA,QAAAc,EAAA,MAAAZ,EAAA,KAAA;AAAA,IAAkD;AAAA,IAsBlD,aAhBJ,MAAA;AAEI,MAAAA,EAAA,UAAAW,EAAA,QAAA,MAIAX,EAAA,SAAA,GACAF,EAAA,QAAAc,EAAA,MAAAZ,EAAA,KAAA;AAAA,IAAkD;AAAA,EAUlD;AAER;;;;;GClEImB,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;AA9CA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAEA5B,IAAAK,EAAA,IAAA,GACAwB,IAAAxB,EAAA,IAAA,GACAH,IAAAG,EAAA,IAAA,GACAF,IAAAE,EAAA,IAAA,GAaA,EAAA,QAAAD,GAAA,sBAAAmB,GAAA,uBAAAC,GAAA,YAAAM,GAAA,aAAAC,EAAA,IAAAhC,EAAA;AAAA,MAA0G,YAAAC;AAAA,MACtG,cAAA6B;AAAA,MACc,eAAA3B;AAAA,MACd,gBAAAC;AAAA,IACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,495 @@
1
+ import { ref as W, onUnmounted as ne, isRef as oe, defineComponent as ae } from "vue";
2
+ import { u as ie } from "./use-has-slot.C9lQZ6nz.js";
3
+ import { f as ue } from "./index.D8ivUe7P.js";
4
+ import { n as se } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
5
+ import "../assets/focus-trap.css";
6
+ var R = "data-focus-lock", ce = "data-focus-lock-disabled", fe = "data-no-focus-lock", le = "data-autofocus-inside", de = "data-no-autofocus", b = function(e) {
7
+ for (var t = Array(e.length), r = 0; r < e.length; ++r)
8
+ t[r] = e[r];
9
+ return t;
10
+ }, I = function(e) {
11
+ return Array.isArray(e) ? e : [e];
12
+ }, ve = function(e) {
13
+ if (e.nodeType !== Node.ELEMENT_NODE)
14
+ return !1;
15
+ var t = window.getComputedStyle(e, null);
16
+ return !t || !t.getPropertyValue ? !1 : t.getPropertyValue("display") === "none" || t.getPropertyValue("visibility") === "hidden";
17
+ }, V = function(e) {
18
+ return e.parentNode && e.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? (
19
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
+ e.parentNode.host
21
+ ) : e.parentNode;
22
+ }, G = function(e) {
23
+ return e === document || e && e.nodeType === Node.DOCUMENT_NODE;
24
+ }, me = function(e, t) {
25
+ return !e || G(e) || !ve(e) && t(V(e));
26
+ }, q = function(e, t) {
27
+ var r = e.get(t);
28
+ if (r !== void 0)
29
+ return r;
30
+ var n = me(t, q.bind(void 0, e));
31
+ return e.set(t, n), n;
32
+ }, be = function(e, t) {
33
+ return e && !G(e) ? ge(e) ? t(V(e)) : !1 : !0;
34
+ }, K = function(e, t) {
35
+ var r = e.get(t);
36
+ if (r !== void 0)
37
+ return r;
38
+ var n = be(t, K.bind(void 0, e));
39
+ return e.set(t, n), n;
40
+ }, z = function(e) {
41
+ return e.dataset;
42
+ }, pe = function(e) {
43
+ return e.tagName === "BUTTON";
44
+ }, $ = function(e) {
45
+ return e.tagName === "INPUT";
46
+ }, j = function(e) {
47
+ return $(e) && e.type === "radio";
48
+ }, he = function(e) {
49
+ return !(($(e) || pe(e)) && (e.type === "hidden" || e.disabled));
50
+ }, ge = function(e) {
51
+ var t = e.getAttribute(de);
52
+ return ![!0, "true", ""].includes(t);
53
+ }, T = function(e) {
54
+ var t;
55
+ return !!(e && (!((t = z(e)) === null || t === void 0) && t.focusGuard));
56
+ }, g = function(e) {
57
+ return !T(e);
58
+ }, Oe = function(e) {
59
+ return !!e;
60
+ }, Ee = function(e, t) {
61
+ var r = e.tabIndex - t.tabIndex, n = e.index - t.index;
62
+ if (r) {
63
+ if (!e.tabIndex)
64
+ return 1;
65
+ if (!t.tabIndex)
66
+ return -1;
67
+ }
68
+ return r || n;
69
+ }, Z = function(e, t, r) {
70
+ return b(e).map(function(n, o) {
71
+ return {
72
+ node: n,
73
+ index: o,
74
+ tabIndex: r && n.tabIndex === -1 ? (n.dataset || {}).focusGuard ? 0 : -1 : n.tabIndex
75
+ };
76
+ }).filter(function(n) {
77
+ return !t || n.tabIndex >= 0;
78
+ }).sort(Ee);
79
+ }, Ae = [
80
+ "button:enabled",
81
+ "select:enabled",
82
+ "textarea:enabled",
83
+ "input:enabled",
84
+ // elements with explicit roles will also use explicit tabindex
85
+ // '[role="button"]',
86
+ "a[href]",
87
+ "area[href]",
88
+ "summary",
89
+ "iframe",
90
+ "object",
91
+ "embed",
92
+ "audio[controls]",
93
+ "video[controls]",
94
+ "[tabindex]",
95
+ "[contenteditable]",
96
+ "[autofocus]"
97
+ ], C = Ae.join(","), Ne = "".concat(C, ", [data-focus-guard]"), Y = function(e, t) {
98
+ var r;
99
+ return b(((r = e.shadowRoot) === null || r === void 0 ? void 0 : r.children) || e.children).reduce(function(n, o) {
100
+ return n.concat(o.matches(t ? Ne : C) ? [o] : [], Y(o));
101
+ }, []);
102
+ }, P = function(e, t) {
103
+ return e.reduce(function(r, n) {
104
+ return r.concat(
105
+ // add all tabbables inside and within shadow DOMs in DOM order
106
+ Y(n, t),
107
+ // add if node is tabbable itself
108
+ n.parentNode ? b(n.parentNode.querySelectorAll(C)).filter(function(o) {
109
+ return o === n;
110
+ }) : []
111
+ );
112
+ }, []);
113
+ }, xe = function(e) {
114
+ var t = e.querySelectorAll("[".concat(le, "]"));
115
+ return b(t).map(function(r) {
116
+ return P([r]);
117
+ }).reduce(function(r, n) {
118
+ return r.concat(n);
119
+ }, []);
120
+ }, S = function(e, t) {
121
+ return b(e).filter(function(r) {
122
+ return q(t, r);
123
+ }).filter(function(r) {
124
+ return he(r);
125
+ });
126
+ }, U = function(e, t) {
127
+ return t === void 0 && (t = /* @__PURE__ */ new Map()), b(e).filter(function(r) {
128
+ return K(t, r);
129
+ });
130
+ }, F = function(e, t, r) {
131
+ return Z(S(P(e, r), t), !0, r);
132
+ }, B = function(e, t) {
133
+ return Z(S(P(e), t), !1);
134
+ }, ye = function(e, t) {
135
+ return S(xe(e), t);
136
+ }, p = function(e, t) {
137
+ return (e.shadowRoot ? p(e.shadowRoot, t) : e.contains(t)) || Array.from(e.children).some(function(r) {
138
+ return p(r, t);
139
+ });
140
+ }, we = function(e) {
141
+ for (var t = /* @__PURE__ */ new Set(), r = e.length, n = 0; n < r; n += 1)
142
+ for (var o = n + 1; o < r; o += 1) {
143
+ var i = e[n].compareDocumentPosition(e[o]);
144
+ (i & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0 && t.add(o), (i & Node.DOCUMENT_POSITION_CONTAINS) > 0 && t.add(n);
145
+ }
146
+ return e.filter(function(a, u) {
147
+ return !t.has(u);
148
+ });
149
+ }, J = function(e) {
150
+ return e.parentNode ? J(e.parentNode) : e;
151
+ }, D = function(e) {
152
+ var t = I(e);
153
+ return t.filter(Boolean).reduce(function(r, n) {
154
+ var o = n.getAttribute(R);
155
+ return r.push.apply(r, o ? we(b(J(n).querySelectorAll("[".concat(R, '="').concat(o, '"]:not([').concat(ce, '="disabled"])')))) : [n]), r;
156
+ }, []);
157
+ }, Q = function(e) {
158
+ return e.activeElement ? e.activeElement.shadowRoot ? Q(e.activeElement.shadowRoot) : e.activeElement : void 0;
159
+ }, L = function() {
160
+ return document.activeElement ? document.activeElement.shadowRoot ? Q(document.activeElement.shadowRoot) : document.activeElement : void 0;
161
+ }, Ie = function(e) {
162
+ return e === document.activeElement;
163
+ }, Fe = function(e) {
164
+ return !!b(e.querySelectorAll("iframe")).some(function(t) {
165
+ return Ie(t);
166
+ });
167
+ }, _e = function(e) {
168
+ var t = document && L();
169
+ return !t || t.dataset && t.dataset.focusGuard ? !1 : D(e).some(function(r) {
170
+ return p(r, t) || Fe(r);
171
+ });
172
+ }, Te = function() {
173
+ var e = document && L();
174
+ return e ? b(document.querySelectorAll("[".concat(fe, "]"))).some(function(t) {
175
+ return p(t, e);
176
+ }) : !1;
177
+ }, Ce = function(e, t) {
178
+ return t.filter(j).filter(function(r) {
179
+ return r.name === e.name;
180
+ }).filter(function(r) {
181
+ return r.checked;
182
+ })[0] || e;
183
+ }, k = function(e, t) {
184
+ return j(e) && e.name ? Ce(e, t) : e;
185
+ }, Pe = function(e) {
186
+ var t = /* @__PURE__ */ new Set();
187
+ return e.forEach(function(r) {
188
+ return t.add(k(r, e));
189
+ }), e.filter(function(r) {
190
+ return t.has(r);
191
+ });
192
+ }, M = function(e) {
193
+ return e[0] && e.length > 1 ? k(e[0], e) : e[0];
194
+ }, H = function(e, t) {
195
+ return e.length > 1 ? e.indexOf(k(e[t], e)) : t;
196
+ }, X = "NEW_FOCUS", Se = function(e, t, r, n) {
197
+ var o = e.length, i = e[0], a = e[o - 1], u = T(r);
198
+ if (!(r && e.indexOf(r) >= 0)) {
199
+ var s = r !== void 0 ? t.indexOf(r) : -1, f = n ? t.indexOf(n) : s, l = n ? e.indexOf(n) : -1, c = s - f, m = t.indexOf(i), d = t.indexOf(a), v = Pe(t), O = r !== void 0 ? v.indexOf(r) : -1, E = O - (n ? v.indexOf(n) : s), A = H(e, 0), N = H(e, o - 1);
200
+ if (s === -1 || l === -1)
201
+ return X;
202
+ if (!c && l >= 0)
203
+ return l;
204
+ if (s <= m && u && Math.abs(c) > 1)
205
+ return N;
206
+ if (s >= d && u && Math.abs(c) > 1)
207
+ return A;
208
+ if (c && Math.abs(E) > 1)
209
+ return l;
210
+ if (s <= m)
211
+ return N;
212
+ if (s > d)
213
+ return A;
214
+ if (c)
215
+ return Math.abs(c) > 1 ? l : (o + l + c) % o;
216
+ }
217
+ }, _ = function(e, t) {
218
+ return t === void 0 && (t = []), t.push(e), e.parentNode && _(e.parentNode.host || e.parentNode, t), t;
219
+ }, x = function(e, t) {
220
+ for (var r = _(e), n = _(t), o = 0; o < r.length; o += 1) {
221
+ var i = r[o];
222
+ if (n.indexOf(i) >= 0)
223
+ return i;
224
+ }
225
+ return !1;
226
+ }, ee = function(e, t, r) {
227
+ var n = I(e), o = I(t), i = n[0], a = !1;
228
+ return o.filter(Boolean).forEach(function(u) {
229
+ a = x(a || u, u) || a, r.filter(Boolean).forEach(function(s) {
230
+ var f = x(i, s);
231
+ f && (!a || p(f, a) ? a = f : a = x(f, a));
232
+ });
233
+ }), a;
234
+ }, De = function(e, t) {
235
+ return e.reduce(function(r, n) {
236
+ return r.concat(ye(n, t));
237
+ }, []);
238
+ }, Le = function(e) {
239
+ return function(t) {
240
+ var r;
241
+ return t.autofocus || !!(!((r = z(t)) === null || r === void 0) && r.autofocus) || e.indexOf(t) >= 0;
242
+ };
243
+ }, ke = function(e, t) {
244
+ var r = /* @__PURE__ */ new Map();
245
+ return t.forEach(function(n) {
246
+ return r.set(n.node, n);
247
+ }), e.map(function(n) {
248
+ return r.get(n);
249
+ }).filter(Oe);
250
+ }, Re = function(e, t) {
251
+ var r = document && L(), n = D(e).filter(g), o = ee(r || e, e, n), i = /* @__PURE__ */ new Map(), a = B(n, i), u = F(n, i).filter(function(d) {
252
+ var v = d.node;
253
+ return g(v);
254
+ });
255
+ if (!(!u[0] && (u = a, !u[0]))) {
256
+ var s = B([o], i).map(function(d) {
257
+ var v = d.node;
258
+ return v;
259
+ }), f = ke(s, u), l = f.map(function(d) {
260
+ var v = d.node;
261
+ return v;
262
+ }), c = Se(l, s, r, t);
263
+ if (c === X) {
264
+ var m = U(a.map(function(d) {
265
+ var v = d.node;
266
+ return v;
267
+ })).filter(Le(De(n, i)));
268
+ return {
269
+ node: m && m.length ? M(m) : M(U(l))
270
+ };
271
+ }
272
+ return c === void 0 ? c : f[c];
273
+ }
274
+ }, Ue = function(e) {
275
+ var t = D(e).filter(g), r = ee(e, e, t), n = /* @__PURE__ */ new Map(), o = F([r], n, !0), i = F(t, n).filter(function(a) {
276
+ var u = a.node;
277
+ return g(u);
278
+ }).map(function(a) {
279
+ var u = a.node;
280
+ return u;
281
+ });
282
+ return o.map(function(a) {
283
+ var u = a.node, s = a.index;
284
+ return {
285
+ node: u,
286
+ index: s,
287
+ lockItem: i.indexOf(u) >= 0,
288
+ guard: T(u)
289
+ };
290
+ });
291
+ }, Be = Ue, Me = function(e, t) {
292
+ "focus" in e && e.focus(t), "contentWindow" in e && e.contentWindow && e.contentWindow.focus();
293
+ }, y = 0, w = !1, He = function(e, t, r) {
294
+ r === void 0 && (r = {});
295
+ var n = Re(e, t);
296
+ if (!w && n) {
297
+ if (y > 2) {
298
+ console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"), w = !0, setTimeout(function() {
299
+ w = !1;
300
+ }, 1);
301
+ return;
302
+ }
303
+ y++, Me(n.node, r.focusOptions), y--;
304
+ }
305
+ }, h = /* @__PURE__ */ ((e) => (e.VERTICAL = "vertical", e.HORIZONTAL = "horizontal", e))(h || {}), te = /* @__PURE__ */ ((e) => (e.ARROW_UP = "arrowup", e.ARROW_DOWN = "arrowdown", e))(te || {}), re = /* @__PURE__ */ ((e) => (e.ARROW_LEFT = "arrowleft", e.ARROW_RIGHT = "arrowright", e))(re || {});
306
+ const We = (e) => requestAnimationFrame(e), Ve = (e, t) => {
307
+ const r = t.findIndex((n) => n.node === e);
308
+ return r === -1 ? 0 : r;
309
+ }, Ge = (e, t) => {
310
+ var i;
311
+ const r = document.activeElement, n = Be(t), o = Ve(r, n) + e;
312
+ return ((i = n[o]) == null ? void 0 : i.node) || r;
313
+ }, qe = (e, t) => {
314
+ const r = e.key.toLowerCase();
315
+ return {
316
+ isArrowNext: r === t[0],
317
+ isArrowPrev: r === t[1]
318
+ };
319
+ }, Ke = {
320
+ behavior: "smooth",
321
+ block: "center",
322
+ inline: "center"
323
+ }, ze = (e) => {
324
+ const t = W(null), { stop: r } = ue(
325
+ e,
326
+ (o) => {
327
+ let i = !1;
328
+ for (const a of o)
329
+ if (a.type === "childList" && a.addedNodes.length) {
330
+ const u = Array.from(a.addedNodes).find((s) => s instanceof HTMLElement ? s.getAttribute("aria-expanded") === "true" : !1);
331
+ u && (t.value = u, i = !0);
332
+ break;
333
+ } else if (a.type === "attributes" && a.oldValue === "false") {
334
+ t.value = o[0].target, i = !0;
335
+ break;
336
+ }
337
+ i !== !0 && setTimeout(() => t.value = null);
338
+ },
339
+ {
340
+ attributeFilter: ["aria-expanded"],
341
+ attributeOldValue: !0,
342
+ childList: !0,
343
+ // check for added/removed nodes i.e. teleport
344
+ subtree: !0
345
+ // check all descendents
346
+ }
347
+ ), n = (o) => {
348
+ const i = ["listbox", "tooltip", "menu"], a = ["combobox"], u = [
349
+ // input with autocomplete should only close the autocomplete dropdown when ESCAPE is pressed
350
+ // some autocomplete picks up "name=username" without the autocomplete attribute
351
+ "INPUT"
352
+ ];
353
+ for (const s of o.composedPath()) {
354
+ if (!(s instanceof HTMLElement))
355
+ return;
356
+ const f = s, l = f.tagName, c = f.getAttribute("role"), m = l === "DIALOG", d = i.includes(c), v = a.includes(c), O = u.includes(l), E = oe(e) ? e.value === f : e === f;
357
+ if (m || E)
358
+ return;
359
+ if (v && t.value || (d || O) || !m && c === "dialog") {
360
+ o.stopPropagation(), o.preventDefault();
361
+ return;
362
+ }
363
+ }
364
+ };
365
+ return ne(() => {
366
+ r();
367
+ }), { handleKeydownEscape: n };
368
+ }, $e = ae({
369
+ name: "bento-focus-trap",
370
+ props: {
371
+ /**
372
+ * Enables / Disables arrow navigation as well can determine the type of arrow navigation.
373
+ * The types of arrow navigation are horizontal and vertical.
374
+ */
375
+ arrowNavigation: {
376
+ type: String,
377
+ default: void 0,
378
+ validator: (e) => Object.values(h).includes(
379
+ e
380
+ )
381
+ },
382
+ /**
383
+ * Enables / disables the focus trap.
384
+ */
385
+ disabled: {
386
+ type: Boolean,
387
+ default: !1
388
+ }
389
+ },
390
+ data: () => ({
391
+ lastFocusedElement: null
392
+ }),
393
+ computed: {
394
+ isHorizontalArrowNavigation() {
395
+ return this.arrowNavigation === h.HORIZONTAL;
396
+ },
397
+ isVerticalArrowNavigation() {
398
+ return this.arrowNavigation === h.VERTICAL;
399
+ },
400
+ arrowOrder() {
401
+ return this.isVerticalArrowNavigation ? Object.values(te) : Object.values(re);
402
+ }
403
+ },
404
+ watch: {
405
+ /**
406
+ * If the disabled prop changes, then enable / disable the focus trap.
407
+ */
408
+ disabled() {
409
+ this.disabled ? this.disable() : this.setFocusInside();
410
+ }
411
+ },
412
+ mounted() {
413
+ this.disabled || this.setFocusInside();
414
+ },
415
+ beforeUnmount() {
416
+ this.disabled || this.disable();
417
+ },
418
+ methods: {
419
+ /**
420
+ * Set focus back inside the element area, giving the last focus element
421
+ * `focus-lock` can determine the next interable element to focus on.
422
+ */
423
+ async setFocusInside() {
424
+ (document.activeElement === document.body || Te() || !this.lastFocusedElement) && (_e(this.$refs.root) || He(this.$refs.root, this.lastFocusedElement, {
425
+ focusOptions: { preventScroll: !0 }
426
+ }), this.lastFocusedElement = document.activeElement);
427
+ },
428
+ /**
429
+ * On blur, trap the focus inside!
430
+ */
431
+ onBlur() {
432
+ this.disabled || We(this.setFocusInside);
433
+ },
434
+ /**
435
+ * If the no arrow navigation is enabled
436
+ * or if the currently focus element is a textarea or an input then prevent navigation.
437
+ */
438
+ shouldPreventNavigation() {
439
+ if (!this.isVerticalArrowNavigation && !this.isHorizontalArrowNavigation)
440
+ return !1;
441
+ const e = document.activeElement.tagName.toLowerCase();
442
+ return (this.isVerticalArrowNavigation ? ["textarea", "select"] : ["input", "textarea"]).includes(e);
443
+ },
444
+ /**
445
+ * When an arrow key is pressed then navigate to the next focusable element.
446
+ * If trap is disabled or is content editable then prevent arrow navigation.
447
+ *
448
+ * @param event on keyboard press event
449
+ */
450
+ onKeyDown(e) {
451
+ if (this.disabled || document.activeElement.isContentEditable || this.shouldPreventNavigation())
452
+ return;
453
+ const { isArrowNext: t, isArrowPrev: r } = qe(e, this.arrowOrder);
454
+ if (r || t) {
455
+ e.preventDefault(), e.stopPropagation();
456
+ const n = Ge(r ? 1 : -1, this.$el);
457
+ if (n.focus(), "scrollIntoView" in n) {
458
+ const o = "scrollBehavior" in document.documentElement.style ? Ke : !1;
459
+ n.scrollIntoView(o);
460
+ }
461
+ }
462
+ },
463
+ /**
464
+ * If focus trap is disabled then return focus to last focus element, parent node or simply the document body.
465
+ */
466
+ disable() {
467
+ const e = this.lastFocusedElement || this.$el.parentNode || document.body;
468
+ e && e.focus();
469
+ },
470
+ useHasSlot: ie
471
+ },
472
+ setup() {
473
+ const e = W(null), { handleKeydownEscape: t } = ze(e);
474
+ return { root: e, handleKeydownEscape: t };
475
+ }
476
+ });
477
+ var je = function() {
478
+ var t = this, r = t._self._c;
479
+ return t._self._setupProxy, t.useHasSlot(t.$slots)("default") ? r("div", t._g({ ref: "root", staticClass: "b-focus-trap", attrs: { "data-testid": "focus-trap", tabindex: "-1" }, on: { focusout: t.onBlur, keydown: function(n) {
480
+ return !n.type.indexOf("key") && t._k(n.keyCode, "esc", 27, n.key, ["Esc", "Escape"]) ? null : t.handleKeydownEscape.apply(null, arguments);
481
+ } } }, t.arrowNavigation ? { keydown: t.onKeyDown } : {}), [t._t("default")], 2) : t._e();
482
+ }, Ze = [], Ye = /* @__PURE__ */ se(
483
+ $e,
484
+ je,
485
+ Ze,
486
+ !1,
487
+ null,
488
+ "a74437a0"
489
+ );
490
+ const rt = Ye.exports;
491
+ export {
492
+ rt as B,
493
+ Ge as g
494
+ };
495
+ //# sourceMappingURL=focus-trap.CGypVwG6.js.map