@adyen/bento-vue2 1.26.0 → 1.28.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 (577) hide show
  1. package/dist/@types/components.d.ts +8 -0
  2. package/dist/@types/index.d.ts +967 -374
  3. package/dist/accordion.js +3 -101
  4. package/dist/accordion.js.map +1 -1
  5. package/dist/action-bar.js +2 -231
  6. package/dist/action-bar.js.map +1 -1
  7. package/dist/alert.js +5 -116
  8. package/dist/alert.js.map +1 -1
  9. package/dist/assets/{index2.css → accordion-item.css} +1 -1
  10. package/dist/assets/{index3.css → action-bar.css} +1 -1
  11. package/dist/assets/alert.css +1 -0
  12. package/dist/assets/base-modal.css +1 -1
  13. package/dist/assets/button-actions.css +1 -1
  14. package/dist/assets/button.css +1 -1
  15. package/dist/assets/{index7.css → card.css} +1 -1
  16. package/dist/assets/checkbox-input.css +1 -1
  17. package/dist/assets/{index9.css → code-snippet.css} +1 -1
  18. package/dist/assets/dashboard-section.css +1 -0
  19. package/dist/assets/dashed-underline.css +1 -0
  20. package/dist/assets/data-grid-template.css +1 -0
  21. package/dist/assets/data-grid.css +1 -0
  22. package/dist/assets/dialog-page.css +1 -1
  23. package/dist/assets/dropdown-default-textbox.css +1 -1
  24. package/dist/assets/dropdown.css +1 -1
  25. package/dist/assets/filter-bar.css +1 -0
  26. package/dist/assets/{index15.css → form-layout-title.css} +1 -1
  27. package/dist/assets/{index25.css → input-field.css} +1 -1
  28. package/dist/assets/listbox-option-tag.css +1 -1
  29. package/dist/assets/{index26.css → menu.css} +1 -1
  30. package/dist/assets/{index22.css → modal-fullscreen.css} +1 -1
  31. package/dist/assets/{index28.css → popover.css} +1 -1
  32. package/dist/assets/radio-input.css +1 -1
  33. package/dist/assets/segmented-control.css +1 -0
  34. package/dist/assets/selection-card-group.css +1 -0
  35. package/dist/assets/{index37.css → sidepanel.css} +1 -1
  36. package/dist/assets/status.css +1 -0
  37. package/dist/assets/structured-list-item.css +1 -0
  38. package/dist/assets/{index43.css → tabs.css} +1 -1
  39. package/dist/assets/toggle.css +1 -0
  40. package/dist/assets/tutorial.css +1 -0
  41. package/dist/assets/use-cached-selected-values.css +1 -1
  42. package/dist/avatar-image.js +1 -1
  43. package/dist/badge.js +22 -24
  44. package/dist/badge.js.map +1 -1
  45. package/dist/button.js +14 -94
  46. package/dist/button.js.map +1 -1
  47. package/dist/card.js +4 -114
  48. package/dist/card.js.map +1 -1
  49. package/dist/checkbox.js +8 -155
  50. package/dist/checkbox.js.map +1 -1
  51. package/dist/chunks/1-generic-use.CZhwP2Yc.js +5 -0
  52. package/dist/chunks/1-generic-use.CZhwP2Yc.js.map +1 -0
  53. package/dist/chunks/1-generic-use.R6x8PEGA.js +5 -0
  54. package/dist/chunks/1-generic-use.R6x8PEGA.js.map +1 -0
  55. package/dist/chunks/2-generic-use.CNKjB4B7.js +5 -0
  56. package/dist/chunks/2-generic-use.CNKjB4B7.js.map +1 -0
  57. package/dist/chunks/2-generic-use.w0fUhovx.js +5 -0
  58. package/dist/chunks/2-generic-use.w0fUhovx.js.map +1 -0
  59. package/dist/chunks/3-generic-use.BLEzR04g.js +5 -0
  60. package/dist/chunks/3-generic-use.BLEzR04g.js.map +1 -0
  61. package/dist/chunks/3-generic-use.D3NFHgI4.js +5 -0
  62. package/dist/chunks/3-generic-use.D3NFHgI4.js.map +1 -0
  63. package/dist/chunks/4-generic-use.CULEpvgj.js +5 -0
  64. package/dist/chunks/4-generic-use.CULEpvgj.js.map +1 -0
  65. package/dist/chunks/4-generic-use.D82y3n39.js +5 -0
  66. package/dist/chunks/4-generic-use.D82y3n39.js.map +1 -0
  67. package/dist/chunks/_plugin-vue2_normalizer.CeySl7Fu.js +11 -0
  68. package/dist/chunks/_plugin-vue2_normalizer.CeySl7Fu.js.map +1 -0
  69. package/dist/chunks/accordion-item.DmnrjNzw.js +100 -0
  70. package/dist/chunks/accordion-item.DmnrjNzw.js.map +1 -0
  71. package/dist/chunks/action-bar.Bebh6PHI.js +147 -0
  72. package/dist/chunks/action-bar.Bebh6PHI.js.map +1 -0
  73. package/dist/chunks/adding-payment-methods.BJZLPxtM.js +5 -0
  74. package/dist/chunks/adding-payment-methods.BJZLPxtM.js.map +1 -0
  75. package/dist/chunks/adding-payment-methods.Dle8zt43.js +5 -0
  76. package/dist/chunks/adding-payment-methods.Dle8zt43.js.map +1 -0
  77. package/dist/chunks/adyen-giving.Ffw_DlJK.js +5 -0
  78. package/dist/chunks/adyen-giving.Ffw_DlJK.js.map +1 -0
  79. package/dist/chunks/adyen-giving.LiKHj_jY.js +5 -0
  80. package/dist/chunks/adyen-giving.LiKHj_jY.js.map +1 -0
  81. package/dist/chunks/alert.CJyTM4Az.js +96 -0
  82. package/dist/chunks/alert.CJyTM4Az.js.map +1 -0
  83. package/dist/chunks/{aria-label.ac9651a5.js → aria-label.CaUURpnB.js} +1 -1
  84. package/dist/chunks/{aria-label.ac9651a5.js.map → aria-label.CaUURpnB.js.map} +1 -1
  85. package/dist/chunks/{index.7eefc59c.js → avatar-image.DhlR-7Yg.js} +22 -24
  86. package/dist/chunks/avatar-image.DhlR-7Yg.js.map +1 -0
  87. package/dist/chunks/base-button.DER7_IsF.js +86 -0
  88. package/dist/chunks/{base-button.ad74b6f8.js.map → base-button.DER7_IsF.js.map} +1 -1
  89. package/dist/chunks/{base-modal.1fff7abe.js → base-modal.C5I7bR0d.js} +42 -46
  90. package/dist/chunks/{base-modal.1fff7abe.js.map → base-modal.C5I7bR0d.js.map} +1 -1
  91. package/dist/chunks/{base-modal.keys.b08a6bdf.js → base-modal.keys.C2PQXcE2.js} +1 -1
  92. package/dist/chunks/{base-modal.keys.b08a6bdf.js.map → base-modal.keys.C2PQXcE2.js.map} +1 -1
  93. package/dist/chunks/{button-actions-with-menu.e845d77a.js → button-actions-with-menu.f3yuLK-L.js} +25 -27
  94. package/dist/chunks/{button-actions-with-menu.e845d77a.js.map → button-actions-with-menu.f3yuLK-L.js.map} +1 -1
  95. package/dist/chunks/button-actions.Bg9ey0p6.js +111 -0
  96. package/dist/chunks/button-actions.Bg9ey0p6.js.map +1 -0
  97. package/dist/chunks/button.DhAUh5JA.js +99 -0
  98. package/dist/chunks/button.DhAUh5JA.js.map +1 -0
  99. package/dist/chunks/{calendar.640b8d25.js → calendar.B69z8gjb.js} +287 -332
  100. package/dist/chunks/{calendar.640b8d25.js.map → calendar.B69z8gjb.js.map} +1 -1
  101. package/dist/chunks/card.70Xvba2C.js +115 -0
  102. package/dist/chunks/card.70Xvba2C.js.map +1 -0
  103. package/dist/chunks/checkbox-group.B-KdeRXC.js +152 -0
  104. package/dist/chunks/checkbox-group.B-KdeRXC.js.map +1 -0
  105. package/dist/chunks/{checkbox-input.1c3cc8ed.js → checkbox-input.DwDwI2BD.js} +27 -30
  106. package/dist/chunks/{checkbox-input.1c3cc8ed.js.map → checkbox-input.DwDwI2BD.js.map} +1 -1
  107. package/dist/chunks/{checkbox.bfed007c.js → checkbox.Bi2RDBEZ.js} +21 -23
  108. package/dist/chunks/{checkbox.bfed007c.js.map → checkbox.Bi2RDBEZ.js.map} +1 -1
  109. package/dist/chunks/checkmark-circle-fill.DVl6QSwm.js +24 -0
  110. package/dist/chunks/{checkmark-circle-fill.345311d2.js.map → checkmark-circle-fill.DVl6QSwm.js.map} +1 -1
  111. package/dist/chunks/{checkmark-small.520f01b1.js → checkmark-small.BtF8b2gE.js} +6 -8
  112. package/dist/chunks/{checkmark-small.520f01b1.js.map → checkmark-small.BtF8b2gE.js.map} +1 -1
  113. package/dist/chunks/{chevron-left.5edf02ac.js → chevron-left.CtnrsqUy.js} +13 -17
  114. package/dist/chunks/{chevron-left.5edf02ac.js.map → chevron-left.CtnrsqUy.js.map} +1 -1
  115. package/dist/chunks/{chevron-up.81185563.js → chevron-up.B2uWhZf7.js} +14 -18
  116. package/dist/chunks/{chevron-up.81185563.js.map → chevron-up.B2uWhZf7.js.map} +1 -1
  117. package/dist/chunks/click-outside.DABh6NLr.js +23 -0
  118. package/dist/chunks/click-outside.DABh6NLr.js.map +1 -0
  119. package/dist/chunks/code-snippet.C4IbjAhH.js +968 -0
  120. package/dist/chunks/code-snippet.C4IbjAhH.js.map +1 -0
  121. package/dist/chunks/{controls-group.4fb50009.js → controls-group.cSRFiEVO.js} +17 -19
  122. package/dist/chunks/{controls-group.4fb50009.js.map → controls-group.cSRFiEVO.js.map} +1 -1
  123. package/dist/chunks/{copy.f85700c6.js → copy.BtFWFG3q.js} +15 -19
  124. package/dist/chunks/{copy.f85700c6.js.map → copy.BtFWFG3q.js.map} +1 -1
  125. package/dist/chunks/country.KayLT0zy.js +93 -0
  126. package/dist/chunks/country.KayLT0zy.js.map +1 -0
  127. package/dist/chunks/{country.types.002caff2.js → country.types.Br0AjxGy.js} +5 -5
  128. package/dist/chunks/{country.types.002caff2.js.map → country.types.Br0AjxGy.js.map} +1 -1
  129. package/dist/chunks/{cross-circle-fill.27580c4b.js → cross-circle-fill.CnYH4R_h.js} +7 -9
  130. package/dist/chunks/{cross-circle-fill.27580c4b.js.map → cross-circle-fill.CnYH4R_h.js.map} +1 -1
  131. package/dist/chunks/{cross-small.e851e0de.js → cross-small.BLUwtRB-.js} +9 -11
  132. package/dist/chunks/{cross-small.e851e0de.js.map → cross-small.BLUwtRB-.js.map} +1 -1
  133. package/dist/chunks/{cross.04678d81.js → cross.CsUPDmaA.js} +9 -11
  134. package/dist/chunks/{cross.04678d81.js.map → cross.CsUPDmaA.js.map} +1 -1
  135. package/dist/chunks/currency.H7n7RQiX.js +113 -0
  136. package/dist/chunks/currency.H7n7RQiX.js.map +1 -0
  137. package/dist/chunks/dashboard-section.BcH-_en7.js +105 -0
  138. package/dist/chunks/dashboard-section.BcH-_en7.js.map +1 -0
  139. package/dist/chunks/dashed-underline.ChUlcFJR.js +59 -0
  140. package/dist/chunks/dashed-underline.ChUlcFJR.js.map +1 -0
  141. package/dist/chunks/data-grid-template.DqG5bNeD.js +66 -0
  142. package/dist/chunks/data-grid-template.DqG5bNeD.js.map +1 -0
  143. package/dist/chunks/{data-grid-template.keys.a819a991.js → data-grid-template.keys.2_AkxuNT.js} +1 -1
  144. package/dist/chunks/{data-grid-template.keys.a819a991.js.map → data-grid-template.keys.2_AkxuNT.js.map} +1 -1
  145. package/dist/chunks/data-grid.CvHAdmvs.js +2022 -0
  146. package/dist/chunks/data-grid.CvHAdmvs.js.map +1 -0
  147. package/dist/chunks/{date-input.9186a0bf.js → date-input.BqBdAO1E.js} +1 -1
  148. package/dist/chunks/{date-input.9186a0bf.js.map → date-input.BqBdAO1E.js.map} +1 -1
  149. package/dist/chunks/date-picker.ByP2Wpo0.js +196 -0
  150. package/dist/chunks/date-picker.ByP2Wpo0.js.map +1 -0
  151. package/dist/chunks/{index.8b8c3b16.js → date-range-picker.DrnklTJ-.js} +113 -117
  152. package/dist/chunks/date-range-picker.DrnklTJ-.js.map +1 -0
  153. package/dist/chunks/{index.b21197ca.js → date.DKjxxR6P.js} +44 -51
  154. package/dist/chunks/date.DKjxxR6P.js.map +1 -0
  155. package/dist/chunks/{debounce.b5ef6acf.js → debounce.DUTu11PS.js} +1 -1
  156. package/dist/chunks/{debounce.b5ef6acf.js.map → debounce.DUTu11PS.js.map} +1 -1
  157. package/dist/chunks/{dialog-page.73da22cf.js → dialog-page.DAh0M4mT.js} +20 -24
  158. package/dist/chunks/{dialog-page.73da22cf.js.map → dialog-page.DAh0M4mT.js.map} +1 -1
  159. package/dist/chunks/divider.BZfeYmB9.js +30 -0
  160. package/dist/chunks/divider.BZfeYmB9.js.map +1 -0
  161. package/dist/chunks/{dropdown-default-textbox.54ca1b18.js → dropdown-default-textbox.CKOkl_Qa.js} +30 -34
  162. package/dist/chunks/{dropdown-default-textbox.54ca1b18.js.map → dropdown-default-textbox.CKOkl_Qa.js.map} +1 -1
  163. package/dist/chunks/dropdown-tag.DCMKQy-E.js +214 -0
  164. package/dist/chunks/dropdown-tag.DCMKQy-E.js.map +1 -0
  165. package/dist/chunks/{dropdown.10c034aa.js → dropdown.yhhQCKve.js} +195 -214
  166. package/dist/chunks/dropdown.yhhQCKve.js.map +1 -0
  167. package/dist/chunks/empty-state.BqVOj4v1.js +151 -0
  168. package/dist/chunks/empty-state.BqVOj4v1.js.map +1 -0
  169. package/dist/chunks/error-message.BSxUoE3_.js +107 -0
  170. package/dist/chunks/{error-message.31ec12b7.js.map → error-message.BSxUoE3_.js.map} +1 -1
  171. package/dist/chunks/events.CMzGybJJ.js +47 -0
  172. package/dist/chunks/events.CMzGybJJ.js.map +1 -0
  173. package/dist/chunks/filter-bar.AhsOPMZ1.js +2119 -0
  174. package/dist/chunks/filter-bar.AhsOPMZ1.js.map +1 -0
  175. package/dist/chunks/{fixed-scroller.4eb9a9ac.js → fixed-scroller.Bq1AgPnw.js} +18 -20
  176. package/dist/chunks/{fixed-scroller.4eb9a9ac.js.map → fixed-scroller.Bq1AgPnw.js.map} +1 -1
  177. package/dist/chunks/{index.d553d3d1.js → focus-trap.DSkLNO_i.js} +35 -37
  178. package/dist/chunks/focus-trap.DSkLNO_i.js.map +1 -0
  179. package/dist/chunks/{footer-actions.a1e09b4f.js → footer-actions.DqMRmlV_.js} +11 -13
  180. package/dist/chunks/{footer-actions.a1e09b4f.js.map → footer-actions.DqMRmlV_.js.map} +1 -1
  181. package/dist/chunks/form-layout-title.BzNU0B72.js +187 -0
  182. package/dist/chunks/form-layout-title.BzNU0B72.js.map +1 -0
  183. package/dist/chunks/{form-layout.types.a7a1438d.js → form-layout.types.D3EKzbE7.js} +1 -1
  184. package/dist/chunks/{form-layout.types.a7a1438d.js.map → form-layout.types.D3EKzbE7.js.map} +1 -1
  185. package/dist/chunks/{get-slot-text.99c3d860.js → get-slot-text.Cgn-E48s.js} +2 -2
  186. package/dist/chunks/{get-slot-text.99c3d860.js.map → get-slot-text.Cgn-E48s.js.map} +1 -1
  187. package/dist/chunks/{grid-layout.e0025286.js → grid-layout.HvTAa4to.js} +11 -13
  188. package/dist/chunks/{grid-layout.e0025286.js.map → grid-layout.HvTAa4to.js.map} +1 -1
  189. package/dist/chunks/header.DmKHCmXh.js +245 -0
  190. package/dist/chunks/header.DmKHCmXh.js.map +1 -0
  191. package/dist/chunks/{i18n.eb5b985b.js → i18n.BQkEbtPM.js} +2 -2
  192. package/dist/chunks/{i18n.eb5b985b.js.map → i18n.BQkEbtPM.js.map} +1 -1
  193. package/dist/chunks/image.B3uqhFjl.js +82 -0
  194. package/dist/chunks/image.B3uqhFjl.js.map +1 -0
  195. package/dist/chunks/{index.fdf12170.js → index.B_EJflcs.js} +2 -2
  196. package/dist/chunks/{index.fdf12170.js.map → index.B_EJflcs.js.map} +1 -1
  197. package/dist/chunks/{index.f55fdc32.js → index.B_UZQ6qF.js} +209 -243
  198. package/dist/chunks/{index.f55fdc32.js.map → index.B_UZQ6qF.js.map} +1 -1
  199. package/dist/chunks/{index.4c062058.js → index.Cl4_42j5.js} +1 -1
  200. package/dist/chunks/{index.4c062058.js.map → index.Cl4_42j5.js.map} +1 -1
  201. package/dist/chunks/index.OCPp3NST.js +126 -0
  202. package/dist/chunks/index.OCPp3NST.js.map +1 -0
  203. package/dist/chunks/{index.d80206ed.js → index.Z84QE0E2.js} +2 -2
  204. package/dist/chunks/{index.d80206ed.js.map → index.Z84QE0E2.js.map} +1 -1
  205. package/dist/chunks/{index.86453263.js → index.xqFSZOAb.js} +2 -2
  206. package/dist/chunks/{index.86453263.js.map → index.xqFSZOAb.js.map} +1 -1
  207. package/dist/chunks/info-icon.CLguYHRt.js +41 -0
  208. package/dist/chunks/info-icon.CLguYHRt.js.map +1 -0
  209. package/dist/chunks/{info.8b6328aa.js → info.CyeBsLgt.js} +9 -11
  210. package/dist/chunks/{info.8b6328aa.js.map → info.CyeBsLgt.js.map} +1 -1
  211. package/dist/chunks/input-field.BnlEPPYr.js +218 -0
  212. package/dist/chunks/input-field.BnlEPPYr.js.map +1 -0
  213. package/dist/chunks/internal-error.BLZodVBE.js +5 -0
  214. package/dist/chunks/internal-error.BLZodVBE.js.map +1 -0
  215. package/dist/chunks/internal-error.BmrwJFpR.js +5 -0
  216. package/dist/chunks/internal-error.BmrwJFpR.js.map +1 -0
  217. package/dist/chunks/{keyboard-navigation.ca47dfa8.js → keyboard-navigation.Clz1jOaA.js} +2 -2
  218. package/dist/chunks/{keyboard-navigation.ca47dfa8.js.map → keyboard-navigation.Clz1jOaA.js.map} +1 -1
  219. package/dist/chunks/{index.317fca12.js → link.DJ1A53gF.js} +20 -24
  220. package/dist/chunks/link.DJ1A53gF.js.map +1 -0
  221. package/dist/chunks/listbox-option-tag.BDjsYOE1.js +75 -0
  222. package/dist/chunks/listbox-option-tag.BDjsYOE1.js.map +1 -0
  223. package/dist/chunks/{loading-button.eafc9e1b.js → loading-button.CoF1IhEU.js} +32 -34
  224. package/dist/chunks/{loading-button.eafc9e1b.js.map → loading-button.CoF1IhEU.js.map} +1 -1
  225. package/dist/chunks/loading-indicator.DXc7I1Lm.js +48 -0
  226. package/dist/chunks/loading-indicator.DXc7I1Lm.js.map +1 -0
  227. package/dist/chunks/{index.1ea85d4a.js → menu.2TwUMlA9.js} +82 -94
  228. package/dist/chunks/menu.2TwUMlA9.js.map +1 -0
  229. package/dist/chunks/modal-fullscreen.BB_8EMNo.js +196 -0
  230. package/dist/chunks/modal-fullscreen.BB_8EMNo.js.map +1 -0
  231. package/dist/chunks/{modal-fullscreen.keys.b9f31632.js → modal-fullscreen.keys.CMba3hYp.js} +1 -1
  232. package/dist/chunks/{modal-fullscreen.keys.b9f31632.js.map → modal-fullscreen.keys.CMba3hYp.js.map} +1 -1
  233. package/dist/chunks/modal.DLwvcaRx.js +439 -0
  234. package/dist/chunks/modal.DLwvcaRx.js.map +1 -0
  235. package/dist/chunks/no-results-found.Bg_ZcEid.js +5 -0
  236. package/dist/chunks/no-results-found.Bg_ZcEid.js.map +1 -0
  237. package/dist/chunks/no-results-found.BqvYsBR6.js +5 -0
  238. package/dist/chunks/no-results-found.BqvYsBR6.js.map +1 -0
  239. package/dist/chunks/notifications-cleared.BMZk37uf.js +5 -0
  240. package/dist/chunks/notifications-cleared.BMZk37uf.js.map +1 -0
  241. package/dist/chunks/notifications-cleared.C7W9ZXY7.js +5 -0
  242. package/dist/chunks/notifications-cleared.C7W9ZXY7.js.map +1 -0
  243. package/dist/chunks/{on-click-outside.3e0c3e2a.js → on-click-outside.CcNG5w7_.js} +1 -1
  244. package/dist/chunks/{on-click-outside.3e0c3e2a.js.map → on-click-outside.CcNG5w7_.js.map} +1 -1
  245. package/dist/chunks/page-not-found.COJLPVaU.js +5 -0
  246. package/dist/chunks/page-not-found.COJLPVaU.js.map +1 -0
  247. package/dist/chunks/page-not-found.DWW6W-PZ.js +5 -0
  248. package/dist/chunks/page-not-found.DWW6W-PZ.js.map +1 -0
  249. package/dist/chunks/pagination.BXjbVe4Z.js +494 -0
  250. package/dist/chunks/pagination.BXjbVe4Z.js.map +1 -0
  251. package/dist/chunks/{payment-method.6c1ce07c.js → payment-method.D9Qx-s4V.js} +19 -21
  252. package/dist/chunks/{payment-method.6c1ce07c.js.map → payment-method.D9Qx-s4V.js.map} +1 -1
  253. package/dist/chunks/payment-method.types.CJKfZQN5.js +5 -0
  254. package/dist/chunks/payment-method.types.CJKfZQN5.js.map +1 -0
  255. package/dist/chunks/planned-maintenance.C61sWB9h.js +5 -0
  256. package/dist/chunks/planned-maintenance.C61sWB9h.js.map +1 -0
  257. package/dist/chunks/planned-maintenance.jmWYTdet.js +5 -0
  258. package/dist/chunks/planned-maintenance.jmWYTdet.js.map +1 -0
  259. package/dist/chunks/{index.15b088b9.js → popover.B8YH92W8.js} +31 -37
  260. package/dist/chunks/popover.B8YH92W8.js.map +1 -0
  261. package/dist/chunks/{index.671768a1.js → popper-container.Bt02N3o1.js} +12 -15
  262. package/dist/chunks/popper-container.Bt02N3o1.js.map +1 -0
  263. package/dist/chunks/radio-group.CPbBFTzB.js +211 -0
  264. package/dist/chunks/radio-group.CPbBFTzB.js.map +1 -0
  265. package/dist/chunks/{radio-input.c6550a9c.js → radio-input.BQcC0INR.js} +17 -19
  266. package/dist/chunks/radio-input.BQcC0INR.js.map +1 -0
  267. package/dist/chunks/referrals.BvtT-kQS.js +5 -0
  268. package/dist/chunks/referrals.BvtT-kQS.js.map +1 -0
  269. package/dist/chunks/referrals.aX8WZigH.js +5 -0
  270. package/dist/chunks/referrals.aX8WZigH.js.map +1 -0
  271. package/dist/chunks/{refresh.71a03998.js → refresh.BKI9WwKh.js} +7 -9
  272. package/dist/chunks/{refresh.71a03998.js.map → refresh.BKI9WwKh.js.map} +1 -1
  273. package/dist/chunks/{resize.a041304d.js → resize.Bqks3WUm.js} +1 -1
  274. package/dist/chunks/{resize.a041304d.js.map → resize.Bqks3WUm.js.map} +1 -1
  275. package/dist/chunks/search-bar.CsAgO-t5.js +89 -0
  276. package/dist/chunks/search-bar.CsAgO-t5.js.map +1 -0
  277. package/dist/chunks/{search.471270fe.js → search.CBKhp7zB.js} +10 -12
  278. package/dist/chunks/{search.471270fe.js.map → search.CBKhp7zB.js.map} +1 -1
  279. package/dist/chunks/secondary-nav.CNgpPxUU.js +97 -0
  280. package/dist/chunks/secondary-nav.CNgpPxUU.js.map +1 -0
  281. package/dist/chunks/segmented-control.DGjIC7Ab.js +111 -0
  282. package/dist/chunks/segmented-control.DGjIC7Ab.js.map +1 -0
  283. package/dist/chunks/segmented-control.types.BHRLV8KU.js +5 -0
  284. package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -0
  285. package/dist/chunks/selection-card-group.DlOs8BkR.js +247 -0
  286. package/dist/chunks/selection-card-group.DlOs8BkR.js.map +1 -0
  287. package/dist/chunks/sidepanel.BBjm2QvZ.js +187 -0
  288. package/dist/chunks/sidepanel.BBjm2QvZ.js.map +1 -0
  289. package/dist/chunks/{sidepanel.keys.1ed8a57c.js → sidepanel.keys.R0DKQuYx.js} +1 -1
  290. package/dist/chunks/{sidepanel.keys.1ed8a57c.js.map → sidepanel.keys.R0DKQuYx.js.map} +1 -1
  291. package/dist/chunks/status.types.BhbOYpZx.js +36 -0
  292. package/dist/chunks/status.types.BhbOYpZx.js.map +1 -0
  293. package/dist/chunks/step.DY8Txb6a.js +234 -0
  294. package/dist/chunks/step.DY8Txb6a.js.map +1 -0
  295. package/dist/chunks/structured-list-item.C9NTVDvT.js +81 -0
  296. package/dist/chunks/structured-list-item.C9NTVDvT.js.map +1 -0
  297. package/dist/chunks/success.DhioLvPD.js +5 -0
  298. package/dist/chunks/success.DhioLvPD.js.map +1 -0
  299. package/dist/chunks/success.nNwxJRBS.js +5 -0
  300. package/dist/chunks/success.nNwxJRBS.js.map +1 -0
  301. package/dist/chunks/summary-grid-item-custom.CJpDnoPw.js +573 -0
  302. package/dist/chunks/summary-grid-item-custom.CJpDnoPw.js.map +1 -0
  303. package/dist/chunks/{summary-grid.keys.1d1028c2.js → summary-grid.keys.BBbFrFGF.js} +1 -1
  304. package/dist/chunks/{summary-grid.keys.1d1028c2.js.map → summary-grid.keys.BBbFrFGF.js.map} +1 -1
  305. package/dist/chunks/tabs.CE65f3E_.js +140 -0
  306. package/dist/chunks/tabs.CE65f3E_.js.map +1 -0
  307. package/dist/chunks/{tabs.keys.358742f2.js → tabs.keys.Bc2pSKRw.js} +1 -1
  308. package/dist/chunks/{tabs.keys.358742f2.js.map → tabs.keys.Bc2pSKRw.js.map} +1 -1
  309. package/dist/chunks/tag.bhKrZHTU.js +64 -0
  310. package/dist/chunks/tag.bhKrZHTU.js.map +1 -0
  311. package/dist/chunks/{teleport.84b0f20b.js → teleport.CQKBJZU5.js} +14 -16
  312. package/dist/chunks/{teleport.84b0f20b.js.map → teleport.CQKBJZU5.js.map} +1 -1
  313. package/dist/chunks/textarea.CcKbtQBs.js +208 -0
  314. package/dist/chunks/textarea.CcKbtQBs.js.map +1 -0
  315. package/dist/chunks/timeline-item.ScTrUBKC.js +364 -0
  316. package/dist/chunks/timeline-item.ScTrUBKC.js.map +1 -0
  317. package/dist/chunks/toast.0EYDj8o-.js +165 -0
  318. package/dist/chunks/toast.0EYDj8o-.js.map +1 -0
  319. package/dist/chunks/toggle-button.2U-vbQhk.js +83 -0
  320. package/dist/chunks/toggle-button.2U-vbQhk.js.map +1 -0
  321. package/dist/chunks/toggle.CiOVTWlk.js +121 -0
  322. package/dist/chunks/toggle.CiOVTWlk.js.map +1 -0
  323. package/dist/chunks/{tooltip.58ef3f4a.js → tooltip.DR8rbIYw.js} +29 -32
  324. package/dist/chunks/tooltip.DR8rbIYw.js.map +1 -0
  325. package/dist/chunks/tutorial.DMm12L0S.js +335 -0
  326. package/dist/chunks/tutorial.DMm12L0S.js.map +1 -0
  327. package/dist/chunks/{index.dd30e538.js → typography.Bjtu3Gca.js} +30 -32
  328. package/dist/chunks/typography.Bjtu3Gca.js.map +1 -0
  329. package/dist/chunks/{unique-id.a2a2b458.js → unique-id.XFfoKuc2.js} +14 -20
  330. package/dist/chunks/{unique-id.a2a2b458.js.map → unique-id.XFfoKuc2.js.map} +1 -1
  331. package/dist/chunks/upload-files.5wQwbfkp.js +5 -0
  332. package/dist/chunks/upload-files.5wQwbfkp.js.map +1 -0
  333. package/dist/chunks/upload-files.jTQY6y2X.js +5 -0
  334. package/dist/chunks/upload-files.jTQY6y2X.js.map +1 -0
  335. package/dist/chunks/{use-bento-toast-controller.c3277f73.js → use-bento-toast-controller.BifdE4ak.js} +4 -4
  336. package/dist/chunks/{use-bento-toast-controller.c3277f73.js.map → use-bento-toast-controller.BifdE4ak.js.map} +1 -1
  337. package/dist/chunks/{use-cached-selected-values.69297473.js → use-cached-selected-values.CVLzxvTi.js} +345 -346
  338. package/dist/chunks/use-cached-selected-values.CVLzxvTi.js.map +1 -0
  339. package/dist/chunks/{use-click-outside.941d1600.js → use-click-outside.DbjR7Lh4.js} +2 -2
  340. package/dist/chunks/{use-click-outside.941d1600.js.map → use-click-outside.DbjR7Lh4.js.map} +1 -1
  341. package/dist/chunks/{use-country-items.6b7985bf.js → use-country-items.C25TI6tp.js} +4 -4
  342. package/dist/chunks/{use-country-items.6b7985bf.js.map → use-country-items.C25TI6tp.js.map} +1 -1
  343. package/dist/chunks/{use-default-slot-validator.b9bff4c6.js → use-default-slot-validator.BDn0wkYP.js} +2 -2
  344. package/dist/chunks/{use-default-slot-validator.b9bff4c6.js.map → use-default-slot-validator.BDn0wkYP.js.map} +1 -1
  345. package/dist/chunks/{use-expandable-content-height.62fc84e5.js → use-expandable-content-height.GkjjbmPy.js} +1 -1
  346. package/dist/chunks/{use-expandable-content-height.62fc84e5.js.map → use-expandable-content-height.GkjjbmPy.js.map} +1 -1
  347. package/dist/chunks/{use-form-layout-loading.d03e5d48.js → use-form-layout-loading.D3lALhtC.js} +2 -2
  348. package/dist/chunks/{use-form-layout-loading.d03e5d48.js.map → use-form-layout-loading.D3lALhtC.js.map} +1 -1
  349. package/dist/chunks/use-has-slot.C9lQZ6nz.js +6 -0
  350. package/dist/chunks/{use-has-slot.fbeb19ec.js.map → use-has-slot.C9lQZ6nz.js.map} +1 -1
  351. package/dist/chunks/warning-filled.CLKRzGMT.js +24 -0
  352. package/dist/chunks/warning-filled.CLKRzGMT.js.map +1 -0
  353. package/dist/chunks/wrong-environment.BOsyKdRI.js +5 -0
  354. package/dist/chunks/wrong-environment.BOsyKdRI.js.map +1 -0
  355. package/dist/chunks/wrong-environment.BiHTPtbJ.js +5 -0
  356. package/dist/chunks/wrong-environment.BiHTPtbJ.js.map +1 -0
  357. package/dist/click-outside.js +2 -20
  358. package/dist/click-outside.js.map +1 -1
  359. package/dist/code-snippet.js +5 -2050
  360. package/dist/code-snippet.js.map +1 -1
  361. package/dist/country.js +8 -97
  362. package/dist/country.js.map +1 -1
  363. package/dist/currency.js +3 -112
  364. package/dist/currency.js.map +1 -1
  365. package/dist/dashboard-template.js +6 -0
  366. package/dist/dashboard-template.js.map +1 -0
  367. package/dist/dashed-underline.js +5 -0
  368. package/dist/dashed-underline.js.map +1 -0
  369. package/dist/data-grid-template.js +2 -65
  370. package/dist/data-grid-template.js.map +1 -1
  371. package/dist/data-grid.js +8 -1978
  372. package/dist/data-grid.js.map +1 -1
  373. package/dist/date-picker.js +5 -197
  374. package/dist/date-picker.js.map +1 -1
  375. package/dist/date-range-picker.js +2 -2
  376. package/dist/date.js +1 -1
  377. package/dist/divider.js +1 -1
  378. package/dist/dropdown.js +12 -227
  379. package/dist/dropdown.js.map +1 -1
  380. package/dist/empty-state.js +5 -143
  381. package/dist/empty-state.js.map +1 -1
  382. package/dist/filter-bar.js +5 -2154
  383. package/dist/filter-bar.js.map +1 -1
  384. package/dist/focus-trap.js +1 -1
  385. package/dist/form-layout.js +5 -192
  386. package/dist/form-layout.js.map +1 -1
  387. package/dist/header.js +2 -246
  388. package/dist/header.js.map +1 -1
  389. package/dist/image.js +4 -81
  390. package/dist/image.js.map +1 -1
  391. package/dist/index.js +276 -269
  392. package/dist/index.js.map +1 -1
  393. package/dist/info-icon.js +2 -40
  394. package/dist/info-icon.js.map +1 -1
  395. package/dist/input-field.js +7 -217
  396. package/dist/input-field.js.map +1 -1
  397. package/dist/internal.js +15 -15
  398. package/dist/link.js +1 -1
  399. package/dist/loading-indicator.js +3 -47
  400. package/dist/loading-indicator.js.map +1 -1
  401. package/dist/menu.js +1 -1
  402. package/dist/modal-fullscreen.js +3 -197
  403. package/dist/modal-fullscreen.js.map +1 -1
  404. package/dist/modal.js +11 -451
  405. package/dist/modal.js.map +1 -1
  406. package/dist/pagination.js +2 -507
  407. package/dist/pagination.js.map +1 -1
  408. package/dist/payment-method.js +4 -4
  409. package/dist/payment-method.js.map +1 -1
  410. package/dist/popover.js +1 -1
  411. package/dist/popper-container.js +1 -1
  412. package/dist/radio-group.js +6 -213
  413. package/dist/radio-group.js.map +1 -1
  414. package/dist/search-bar.js +6 -90
  415. package/dist/search-bar.js.map +1 -1
  416. package/dist/secondary-nav.js +2 -100
  417. package/dist/secondary-nav.js.map +1 -1
  418. package/dist/segmented-control.js +4 -215
  419. package/dist/segmented-control.js.map +1 -1
  420. package/dist/selection-card.js +4 -248
  421. package/dist/selection-card.js.map +1 -1
  422. package/dist/sidepanel.js +4 -189
  423. package/dist/sidepanel.js.map +1 -1
  424. package/dist/status.js +3 -40
  425. package/dist/status.js.map +1 -1
  426. package/dist/stepper.js +5 -237
  427. package/dist/stepper.js.map +1 -1
  428. package/dist/structured-list.js +1 -1
  429. package/dist/summary-grid.js +9 -584
  430. package/dist/summary-grid.js.map +1 -1
  431. package/dist/tabs.js +3 -140
  432. package/dist/tabs.js.map +1 -1
  433. package/dist/tag.js +3 -63
  434. package/dist/tag.js.map +1 -1
  435. package/dist/textarea.js +2 -209
  436. package/dist/textarea.js.map +1 -1
  437. package/dist/timeline.js +7 -367
  438. package/dist/timeline.js.map +1 -1
  439. package/dist/toast.js +2 -168
  440. package/dist/toast.js.map +1 -1
  441. package/dist/toggle.js +4 -120
  442. package/dist/toggle.js.map +1 -1
  443. package/dist/tutorial.js +2 -325
  444. package/dist/tutorial.js.map +1 -1
  445. package/dist/typography.js +1 -1
  446. package/dist/web-types.json +482 -305
  447. package/package.json +11 -10
  448. package/dist/assets/index11.css +0 -1
  449. package/dist/assets/index18.css +0 -1
  450. package/dist/assets/index33.css +0 -1
  451. package/dist/assets/index34.css +0 -1
  452. package/dist/assets/index35.css +0 -1
  453. package/dist/assets/index38.css +0 -1
  454. package/dist/assets/index4.css +0 -1
  455. package/dist/assets/index40.css +0 -1
  456. package/dist/assets/index44.css +0 -1
  457. package/dist/assets/index46.css +0 -1
  458. package/dist/chunks/1-generic-use.3ea646cd.js +0 -5
  459. package/dist/chunks/1-generic-use.3ea646cd.js.map +0 -1
  460. package/dist/chunks/1-generic-use.ccca5813.js +0 -5
  461. package/dist/chunks/1-generic-use.ccca5813.js.map +0 -1
  462. package/dist/chunks/2-generic-use.443db127.js +0 -5
  463. package/dist/chunks/2-generic-use.443db127.js.map +0 -1
  464. package/dist/chunks/2-generic-use.d69d7c08.js +0 -5
  465. package/dist/chunks/2-generic-use.d69d7c08.js.map +0 -1
  466. package/dist/chunks/3-generic-use.9f74667f.js +0 -5
  467. package/dist/chunks/3-generic-use.9f74667f.js.map +0 -1
  468. package/dist/chunks/3-generic-use.fe7ae2ce.js +0 -5
  469. package/dist/chunks/3-generic-use.fe7ae2ce.js.map +0 -1
  470. package/dist/chunks/4-generic-use.0356f4a1.js +0 -5
  471. package/dist/chunks/4-generic-use.0356f4a1.js.map +0 -1
  472. package/dist/chunks/4-generic-use.cd04bad0.js +0 -5
  473. package/dist/chunks/4-generic-use.cd04bad0.js.map +0 -1
  474. package/dist/chunks/_plugin-vue2_normalizer.71e2aa87.js +0 -33
  475. package/dist/chunks/_plugin-vue2_normalizer.71e2aa87.js.map +0 -1
  476. package/dist/chunks/adding-payment-methods.d570e03e.js +0 -5
  477. package/dist/chunks/adding-payment-methods.d570e03e.js.map +0 -1
  478. package/dist/chunks/adding-payment-methods.e419d6c0.js +0 -5
  479. package/dist/chunks/adding-payment-methods.e419d6c0.js.map +0 -1
  480. package/dist/chunks/adyen-giving.480913b5.js +0 -5
  481. package/dist/chunks/adyen-giving.480913b5.js.map +0 -1
  482. package/dist/chunks/adyen-giving.54ed984c.js +0 -5
  483. package/dist/chunks/adyen-giving.54ed984c.js.map +0 -1
  484. package/dist/chunks/base-button.ad74b6f8.js +0 -88
  485. package/dist/chunks/button-actions.81db18e8.js +0 -111
  486. package/dist/chunks/button-actions.81db18e8.js.map +0 -1
  487. package/dist/chunks/button.9d6435ae.js +0 -100
  488. package/dist/chunks/button.9d6435ae.js.map +0 -1
  489. package/dist/chunks/checkmark-circle-fill.345311d2.js +0 -26
  490. package/dist/chunks/checkmark.a6ed8f47.js +0 -26
  491. package/dist/chunks/checkmark.a6ed8f47.js.map +0 -1
  492. package/dist/chunks/dropdown.10c034aa.js.map +0 -1
  493. package/dist/chunks/error-message.31ec12b7.js +0 -111
  494. package/dist/chunks/events.58c00e6d.js +0 -50
  495. package/dist/chunks/events.58c00e6d.js.map +0 -1
  496. package/dist/chunks/index.15b088b9.js.map +0 -1
  497. package/dist/chunks/index.1ea85d4a.js.map +0 -1
  498. package/dist/chunks/index.317fca12.js.map +0 -1
  499. package/dist/chunks/index.671768a1.js.map +0 -1
  500. package/dist/chunks/index.7eefc59c.js.map +0 -1
  501. package/dist/chunks/index.885d05a9.js +0 -32
  502. package/dist/chunks/index.885d05a9.js.map +0 -1
  503. package/dist/chunks/index.8b8c3b16.js.map +0 -1
  504. package/dist/chunks/index.aaf965f8.js +0 -147
  505. package/dist/chunks/index.aaf965f8.js.map +0 -1
  506. package/dist/chunks/index.b21197ca.js.map +0 -1
  507. package/dist/chunks/index.d553d3d1.js.map +0 -1
  508. package/dist/chunks/index.dd30e538.js.map +0 -1
  509. package/dist/chunks/internal-error.35cbb071.js +0 -5
  510. package/dist/chunks/internal-error.35cbb071.js.map +0 -1
  511. package/dist/chunks/internal-error.9a4823ed.js +0 -5
  512. package/dist/chunks/internal-error.9a4823ed.js.map +0 -1
  513. package/dist/chunks/listbox-option-tag.6bbb6bbe.js +0 -107
  514. package/dist/chunks/listbox-option-tag.6bbb6bbe.js.map +0 -1
  515. package/dist/chunks/no-results-found.58856d70.js +0 -5
  516. package/dist/chunks/no-results-found.58856d70.js.map +0 -1
  517. package/dist/chunks/no-results-found.cbb12f78.js +0 -5
  518. package/dist/chunks/no-results-found.cbb12f78.js.map +0 -1
  519. package/dist/chunks/notifications-cleared.71025c22.js +0 -5
  520. package/dist/chunks/notifications-cleared.71025c22.js.map +0 -1
  521. package/dist/chunks/notifications-cleared.c4f4bed4.js +0 -5
  522. package/dist/chunks/notifications-cleared.c4f4bed4.js.map +0 -1
  523. package/dist/chunks/page-not-found.a500440d.js +0 -5
  524. package/dist/chunks/page-not-found.a500440d.js.map +0 -1
  525. package/dist/chunks/page-not-found.d1a84ba7.js +0 -5
  526. package/dist/chunks/page-not-found.d1a84ba7.js.map +0 -1
  527. package/dist/chunks/planned-maintenance.7fa5ac16.js +0 -5
  528. package/dist/chunks/planned-maintenance.7fa5ac16.js.map +0 -1
  529. package/dist/chunks/planned-maintenance.cff01aed.js +0 -5
  530. package/dist/chunks/planned-maintenance.cff01aed.js.map +0 -1
  531. package/dist/chunks/radio-input.c6550a9c.js.map +0 -1
  532. package/dist/chunks/referrals.178ce0eb.js +0 -5
  533. package/dist/chunks/referrals.178ce0eb.js.map +0 -1
  534. package/dist/chunks/referrals.599047da.js +0 -5
  535. package/dist/chunks/referrals.599047da.js.map +0 -1
  536. package/dist/chunks/success.41981fe8.js +0 -5
  537. package/dist/chunks/success.41981fe8.js.map +0 -1
  538. package/dist/chunks/success.77fac78b.js +0 -5
  539. package/dist/chunks/success.77fac78b.js.map +0 -1
  540. package/dist/chunks/tooltip.58ef3f4a.js.map +0 -1
  541. package/dist/chunks/upload-files.2708eca7.js +0 -5
  542. package/dist/chunks/upload-files.2708eca7.js.map +0 -1
  543. package/dist/chunks/upload-files.b4cd9f8b.js +0 -5
  544. package/dist/chunks/upload-files.b4cd9f8b.js.map +0 -1
  545. package/dist/chunks/use-cached-selected-values.69297473.js.map +0 -1
  546. package/dist/chunks/use-has-slot.fbeb19ec.js +0 -6
  547. package/dist/chunks/wrong-environment.c73b0bc0.js +0 -5
  548. package/dist/chunks/wrong-environment.c73b0bc0.js.map +0 -1
  549. package/dist/chunks/wrong-environment.f890a237.js +0 -5
  550. package/dist/chunks/wrong-environment.f890a237.js.map +0 -1
  551. /package/dist/assets/{index5.css → avatar-image.css} +0 -0
  552. /package/dist/assets/{index.css → badge.css} +0 -0
  553. /package/dist/assets/{index8.css → checkbox-group.css} +0 -0
  554. /package/dist/assets/{index10.css → country.css} +0 -0
  555. /package/dist/assets/{index12.css → date-picker.css} +0 -0
  556. /package/dist/assets/{index13.css → date-range-picker.css} +0 -0
  557. /package/dist/assets/{index14.css → divider.css} +0 -0
  558. /package/dist/assets/{index16.css → dropdown-tag.css} +0 -0
  559. /package/dist/assets/{index17.css → empty-state.css} +0 -0
  560. /package/dist/assets/{index19.css → focus-trap.css} +0 -0
  561. /package/dist/assets/{index21.css → header.css} +0 -0
  562. /package/dist/assets/{index27.css → info-icon.css} +0 -0
  563. /package/dist/assets/{index42.css → link.css} +0 -0
  564. /package/dist/assets/{index23.css → loading-indicator.css} +0 -0
  565. /package/dist/assets/{index24.css → pagination.css} +0 -0
  566. /package/dist/assets/{index45.css → popper-container.css} +0 -0
  567. /package/dist/assets/{index20.css → radio-group.css} +0 -0
  568. /package/dist/assets/{index47.css → search-bar.css} +0 -0
  569. /package/dist/assets/{index48.css → secondary-nav.css} +0 -0
  570. /package/dist/assets/{index39.css → step.css} +0 -0
  571. /package/dist/assets/{index41.css → summary-grid-item-custom.css} +0 -0
  572. /package/dist/assets/{index36.css → tag.css} +0 -0
  573. /package/dist/assets/{index30.css → textarea.css} +0 -0
  574. /package/dist/assets/{index31.css → timeline-item.css} +0 -0
  575. /package/dist/assets/{index32.css → toast.css} +0 -0
  576. /package/dist/assets/{index6.css → toggle-button.css} +0 -0
  577. /package/dist/assets/{index29.css → typography.css} +0 -0
@@ -1,9 +1,9 @@
1
- import { ref as r, onMounted as R, computed as f, defineComponent as x } from "vue";
2
- import { a as L } from "./button.9d6435ae.js";
3
- import { u as y } from "./i18n.eb5b985b.js";
4
- import { C, a as b } from "./chevron-left.5edf02ac.js";
5
- import { o as m } from "./resize.a041304d.js";
6
- import { n as W } from "./_plugin-vue2_normalizer.71e2aa87.js";
1
+ import { ref as n, onMounted as R, computed as f, defineComponent as L } from "vue";
2
+ import { B as x } from "./button.DhAUh5JA.js";
3
+ import { u as C } from "./i18n.BQkEbtPM.js";
4
+ import { C as b, a as y } from "./chevron-left.CtnrsqUy.js";
5
+ import { o as m } from "./resize.Bqks3WUm.js";
6
+ import { n as W } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
7
7
  import "../assets/fixed-scroller.css";
8
8
  const w = 1, g = 40, F = ({
9
9
  contentRef: d,
@@ -11,10 +11,10 @@ const w = 1, g = 40, F = ({
11
11
  leftButtonRef: o,
12
12
  rightButtonRef: t
13
13
  }) => {
14
- const n = r(0), l = r(0), u = r(0), a = r(0);
14
+ const r = n(0), l = n(0), u = n(0), a = n(0);
15
15
  R(() => {
16
16
  m(e.value, () => {
17
- e.value && (a.value = e.value.offsetWidth, l.value = 0, n.value = 0);
17
+ e.value && (a.value = e.value.offsetWidth, l.value = 0, r.value = 0);
18
18
  }), m(d.value, () => {
19
19
  var s;
20
20
  u.value = (s = d.value) == null ? void 0 : s.scrollWidth;
@@ -37,18 +37,18 @@ const w = 1, g = 40, F = ({
37
37
  s[c] = -(a.value + Math.abs(h) - _.value);
38
38
  }), s;
39
39
  }), S = f(() => l.value !== 0), B = f(
40
- () => n.value >= -(u.value - a.value - 1)
40
+ () => r.value >= -(u.value - a.value - 1)
41
41
  );
42
42
  return {
43
- offset: n,
43
+ offset: r,
44
44
  shouldShowLeftButton: S,
45
45
  shouldShowRightButton: B,
46
46
  // Methods
47
47
  scrollLeft: () => {
48
- l.value !== 0 && (l.value -= 1, n.value = v.value[l.value]);
48
+ l.value !== 0 && (l.value -= 1, r.value = v.value[l.value]);
49
49
  },
50
50
  scrollRight: () => {
51
- l.value !== i.value - 1 && (l.value += 1, n.value = v.value[l.value]);
51
+ l.value !== i.value - 1 && (l.value += 1, r.value = v.value[l.value]);
52
52
  }
53
53
  };
54
54
  }, I = {
@@ -58,7 +58,7 @@ const w = 1, g = 40, F = ({
58
58
  }
59
59
  }, O = {
60
60
  i18n: { messages: I }
61
- }, k = /* @__PURE__ */ x({
61
+ }, k = /* @__PURE__ */ L({
62
62
  ...O,
63
63
  __name: "fixed-scroller",
64
64
  props: {
@@ -72,13 +72,13 @@ const w = 1, g = 40, F = ({
72
72
  extraPaddingTop: { type: Number, default: 0 }
73
73
  },
74
74
  setup(d) {
75
- const { t: e } = y(), o = r(null), t = r(null), n = r(null), l = r(null), { offset: u, shouldShowLeftButton: a, shouldShowRightButton: _, scrollLeft: i, scrollRight: v } = F({
75
+ const { t: e } = C(), o = n(null), t = n(null), r = n(null), l = n(null), { offset: u, shouldShowLeftButton: a, shouldShowRightButton: _, scrollLeft: i, scrollRight: v } = F({
76
76
  contentRef: o,
77
77
  containerRef: t,
78
- leftButtonRef: n,
78
+ leftButtonRef: r,
79
79
  rightButtonRef: l
80
80
  });
81
- return { __sfc: !0, t: e, contentRef: o, fixedScrollerRef: t, leftButtonRef: n, rightButtonRef: l, offset: u, shouldShowLeftButton: a, shouldShowRightButton: _, scrollLeft: i, scrollRight: v, BentoButton: L, ChevronLeftIcon: C, ChevronRightIcon: b };
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 };
82
82
  }
83
83
  });
84
84
  var E = function() {
@@ -97,12 +97,10 @@ var E = function() {
97
97
  T,
98
98
  !1,
99
99
  null,
100
- "0a2c2ec6",
101
- null,
102
- null
100
+ "0a2c2ec6"
103
101
  );
104
102
  const U = P.exports;
105
103
  export {
106
104
  U as F
107
105
  };
108
- //# sourceMappingURL=fixed-scroller.4eb9a9ac.js.map
106
+ //# sourceMappingURL=fixed-scroller.Bq1AgPnw.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fixed-scroller.4eb9a9ac.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 } 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<HTMLElement | undefined>;\n containerRef?: Ref<HTMLElement | undefined>;\n leftButtonRef?: Ref<HTMLElement | undefined>;\n rightButtonRef?: Ref<HTMLElement | 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 {useFixedScrollerProps} props - All the necessary references to calculate the scroll\n * @param {Ref<HTMLElement | undefined>} props.containerRef - Reference to the container, this defines the visible space width\n * @param {Ref<HTMLElement | undefined>} props.contentRef - Reference to the content itself, this defines the total content width\n * @param {Ref<HTMLElement | undefined>} props.leftButtonRef - Reference to the left button, used to calculate total space in which the content will be rendered\n * @param {Ref<HTMLElement | undefined>} props.rightButtonRef - Reference to the right button, used to calculate total space in which the content will be rendered\n * @returns {Object} response - Values used in the view to show the buttons and to change the view right or left\n * @returns {Ref<number>} response.offset - Offset value by which the view will move on the x axis. To be used in `styles`.\n * @returns {ComputedRef<boolean>} response.shouldShowLeftButton - Indicates if the button on the left should be shown\n * @returns {ComputedRef<boolean>} 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,gBAAA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AAA,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.Bq1AgPnw.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 } 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<HTMLElement | undefined>;\n containerRef?: Ref<HTMLElement | undefined>;\n leftButtonRef?: Ref<HTMLElement | undefined>;\n rightButtonRef?: Ref<HTMLElement | 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 {useFixedScrollerProps} props - All the necessary references to calculate the scroll\n * @param {Ref<HTMLElement | undefined>} props.containerRef - Reference to the container, this defines the visible space width\n * @param {Ref<HTMLElement | undefined>} props.contentRef - Reference to the content itself, this defines the total content width\n * @param {Ref<HTMLElement | undefined>} props.leftButtonRef - Reference to the left button, used to calculate total space in which the content will be rendered\n * @param {Ref<HTMLElement | undefined>} props.rightButtonRef - Reference to the right button, used to calculate total space in which the content will be rendered\n * @returns {Object} response - Values used in the view to show the buttons and to change the view right or left\n * @returns {Ref<number>} response.offset - Offset value by which the view will move on the x axis. To be used in `styles`.\n * @returns {ComputedRef<boolean>} response.shouldShowLeftButton - Indicates if the button on the left should be shown\n * @returns {ComputedRef<boolean>} 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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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,7 +1,7 @@
1
1
  import { defineComponent as re } from "vue";
2
- import { u as ne } from "./use-has-slot.fbeb19ec.js";
3
- import { n as ae } from "./_plugin-vue2_normalizer.71e2aa87.js";
4
- import "../assets/index19.css";
2
+ import { u as ne } from "./use-has-slot.C9lQZ6nz.js";
3
+ import { n as ae } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
4
+ import "../assets/focus-trap.css";
5
5
  var R = "data-focus-lock", oe = "data-focus-lock-disabled", ue = "data-no-focus-lock", ie = "data-autofocus-inside", ce = "data-no-autofocus", m = function(e) {
6
6
  for (var t = Array(e.length), r = 0; r < e.length; ++r)
7
7
  t[r] = e[r];
@@ -49,11 +49,11 @@ var R = "data-focus-lock", oe = "data-focus-lock-disabled", ue = "data-no-focus-
49
49
  }, me = function(e) {
50
50
  var t = e.getAttribute(ce);
51
51
  return ![!0, "true", ""].includes(t);
52
- }, x = function(e) {
52
+ }, w = function(e) {
53
53
  var t;
54
54
  return !!(e && (!((t = G(e)) === null || t === void 0) && t.focusGuard));
55
55
  }, O = function(e) {
56
- return !x(e);
56
+ return !w(e);
57
57
  }, be = function(e) {
58
58
  return !!e;
59
59
  }, he = function(e, t) {
@@ -93,18 +93,18 @@ var R = "data-focus-lock", oe = "data-focus-lock-disabled", ue = "data-no-focus-
93
93
  "[tabindex]",
94
94
  "[contenteditable]",
95
95
  "[autofocus]"
96
- ], w = pe.join(","), Oe = "".concat(w, ", [data-focus-guard]"), z = function(e, t) {
96
+ ], y = pe.join(","), Oe = "".concat(y, ", [data-focus-guard]"), z = function(e, t) {
97
97
  var r;
98
98
  return m(((r = e.shadowRoot) === null || r === void 0 ? void 0 : r.children) || e.children).reduce(function(n, a) {
99
- return n.concat(a.matches(t ? Oe : w) ? [a] : [], z(a));
99
+ return n.concat(a.matches(t ? Oe : y) ? [a] : [], z(a));
100
100
  }, []);
101
- }, y = function(e, t) {
101
+ }, F = function(e, t) {
102
102
  return e.reduce(function(r, n) {
103
103
  return r.concat(
104
104
  // add all tabbables inside and within shadow DOMs in DOM order
105
105
  z(n, t),
106
106
  // add if node is tabbable itself
107
- n.parentNode ? m(n.parentNode.querySelectorAll(w)).filter(function(a) {
107
+ n.parentNode ? m(n.parentNode.querySelectorAll(y)).filter(function(a) {
108
108
  return a === n;
109
109
  }) : []
110
110
  );
@@ -112,11 +112,11 @@ var R = "data-focus-lock", oe = "data-focus-lock-disabled", ue = "data-no-focus-
112
112
  }, ge = function(e) {
113
113
  var t = e.querySelectorAll("[".concat(ie, "]"));
114
114
  return m(t).map(function(r) {
115
- return y([r]);
115
+ return F([r]);
116
116
  }).reduce(function(r, n) {
117
117
  return r.concat(n);
118
118
  }, []);
119
- }, F = function(e, t) {
119
+ }, _ = function(e, t) {
120
120
  return m(e).filter(function(r) {
121
121
  return W(t, r);
122
122
  }).filter(function(r) {
@@ -126,12 +126,12 @@ var R = "data-focus-lock", oe = "data-focus-lock-disabled", ue = "data-no-focus-
126
126
  return t === void 0 && (t = /* @__PURE__ */ new Map()), m(e).filter(function(r) {
127
127
  return H(t, r);
128
128
  });
129
- }, _ = function(e, t, r) {
130
- return K(F(y(e, r), t), !0, r);
129
+ }, I = function(e, t, r) {
130
+ return K(_(F(e, r), t), !0, r);
131
131
  }, B = function(e, t) {
132
- return K(F(y(e), t), !1);
132
+ return K(_(F(e), t), !1);
133
133
  }, Ae = function(e, t) {
134
- return F(ge(e), t);
134
+ return _(ge(e), t);
135
135
  }, h = function(e, t) {
136
136
  return (e.shadowRoot ? h(e.shadowRoot, t) : e.contains(t)) || Array.from(e.children).some(function(r) {
137
137
  return h(r, t);
@@ -159,29 +159,29 @@ var R = "data-focus-lock", oe = "data-focus-lock-disabled", ue = "data-no-focus-
159
159
  return document.activeElement ? document.activeElement.shadowRoot ? Z(document.activeElement.shadowRoot) : document.activeElement : void 0;
160
160
  }, Ee = function(e) {
161
161
  return e === document.activeElement;
162
- }, _e = function(e) {
162
+ }, Ie = function(e) {
163
163
  return !!m(e.querySelectorAll("iframe")).some(function(t) {
164
164
  return Ee(t);
165
165
  });
166
- }, Ie = function(e) {
166
+ }, xe = function(e) {
167
167
  var t = document && S();
168
168
  return !t || t.dataset && t.dataset.focusGuard ? !1 : T(e).some(function(r) {
169
- return h(r, t) || _e(r);
169
+ return h(r, t) || Ie(r);
170
170
  });
171
- }, xe = function() {
171
+ }, we = function() {
172
172
  var e = document && S();
173
173
  return e ? m(document.querySelectorAll("[".concat(ue, "]"))).some(function(t) {
174
174
  return h(t, e);
175
175
  }) : !1;
176
- }, we = function(e, t) {
176
+ }, ye = function(e, t) {
177
177
  return t.filter($).filter(function(r) {
178
178
  return r.name === e.name;
179
179
  }).filter(function(r) {
180
180
  return r.checked;
181
181
  })[0] || e;
182
182
  }, C = function(e, t) {
183
- return $(e) && e.name ? we(e, t) : e;
184
- }, ye = function(e) {
183
+ return $(e) && e.name ? ye(e, t) : e;
184
+ }, Fe = function(e) {
185
185
  var t = /* @__PURE__ */ new Set();
186
186
  return e.forEach(function(r) {
187
187
  return t.add(C(r, e));
@@ -192,10 +192,10 @@ var R = "data-focus-lock", oe = "data-focus-lock-disabled", ue = "data-no-focus-
192
192
  return e[0] && e.length > 1 ? C(e[0], e) : e[0];
193
193
  }, M = function(e, t) {
194
194
  return e.length > 1 ? e.indexOf(C(e[t], e)) : t;
195
- }, Y = "NEW_FOCUS", Fe = function(e, t, r, n) {
196
- var a = e.length, i = e[0], o = e[a - 1], u = x(r);
195
+ }, Y = "NEW_FOCUS", _e = function(e, t, r, n) {
196
+ var a = e.length, i = e[0], o = e[a - 1], u = w(r);
197
197
  if (!(r && e.indexOf(r) >= 0)) {
198
- var c = r !== void 0 ? t.indexOf(r) : -1, l = n ? t.indexOf(n) : c, v = n ? e.indexOf(n) : -1, s = c - l, b = t.indexOf(i), f = t.indexOf(o), d = ye(t), ee = r !== void 0 ? d.indexOf(r) : -1, te = ee - (n ? d.indexOf(n) : c), P = M(e, 0), D = M(e, a - 1);
198
+ var c = r !== void 0 ? t.indexOf(r) : -1, l = n ? t.indexOf(n) : c, v = n ? e.indexOf(n) : -1, s = c - l, b = t.indexOf(i), f = t.indexOf(o), d = Fe(t), ee = r !== void 0 ? d.indexOf(r) : -1, te = ee - (n ? d.indexOf(n) : c), P = M(e, 0), D = M(e, a - 1);
199
199
  if (c === -1 || v === -1)
200
200
  return Y;
201
201
  if (!s && v >= 0)
@@ -213,10 +213,10 @@ var R = "data-focus-lock", oe = "data-focus-lock-disabled", ue = "data-no-focus-
213
213
  if (s)
214
214
  return Math.abs(s) > 1 ? v : (a + v + s) % a;
215
215
  }
216
- }, I = function(e, t) {
217
- return t === void 0 && (t = []), t.push(e), e.parentNode && I(e.parentNode.host || e.parentNode, t), t;
216
+ }, x = function(e, t) {
217
+ return t === void 0 && (t = []), t.push(e), e.parentNode && x(e.parentNode.host || e.parentNode, t), t;
218
218
  }, g = function(e, t) {
219
- for (var r = I(e), n = I(t), a = 0; a < r.length; a += 1) {
219
+ for (var r = x(e), n = x(t), a = 0; a < r.length; a += 1) {
220
220
  var i = r[a];
221
221
  if (n.indexOf(i) >= 0)
222
222
  return i;
@@ -247,7 +247,7 @@ var R = "data-focus-lock", oe = "data-focus-lock-disabled", ue = "data-no-focus-
247
247
  return r.get(n);
248
248
  }).filter(be);
249
249
  }, Pe = function(e, t) {
250
- var r = document && S(), n = T(e).filter(O), a = J(r || e, e, n), i = /* @__PURE__ */ new Map(), o = B(n, i), u = _(n, i).filter(function(f) {
250
+ var r = document && S(), n = T(e).filter(O), a = J(r || e, e, n), i = /* @__PURE__ */ new Map(), o = B(n, i), u = I(n, i).filter(function(f) {
251
251
  var d = f.node;
252
252
  return O(d);
253
253
  });
@@ -258,7 +258,7 @@ var R = "data-focus-lock", oe = "data-focus-lock-disabled", ue = "data-no-focus-
258
258
  }), l = Ce(c, u), v = l.map(function(f) {
259
259
  var d = f.node;
260
260
  return d;
261
- }), s = Fe(v, c, r, t);
261
+ }), s = _e(v, c, r, t);
262
262
  if (s === Y) {
263
263
  var b = U(o.map(function(f) {
264
264
  var d = f.node;
@@ -271,7 +271,7 @@ var R = "data-focus-lock", oe = "data-focus-lock-disabled", ue = "data-no-focus-
271
271
  return s === void 0 ? s : l[s];
272
272
  }
273
273
  }, De = function(e) {
274
- var t = T(e).filter(O), r = J(e, e, t), n = /* @__PURE__ */ new Map(), a = _([r], n, !0), i = _(t, n).filter(function(o) {
274
+ var t = T(e).filter(O), r = J(e, e, t), n = /* @__PURE__ */ new Map(), a = I([r], n, !0), i = I(t, n).filter(function(o) {
275
275
  var u = o.node;
276
276
  return O(u);
277
277
  }).map(function(o) {
@@ -284,7 +284,7 @@ var R = "data-focus-lock", oe = "data-focus-lock-disabled", ue = "data-no-focus-
284
284
  node: u,
285
285
  index: c,
286
286
  lockItem: i.indexOf(u) >= 0,
287
- guard: x(u)
287
+ guard: w(u)
288
288
  };
289
289
  });
290
290
  }, Re = De, Ue = function(e, t) {
@@ -375,7 +375,7 @@ const Le = (e) => requestAnimationFrame(e), Me = (e, t) => {
375
375
  * `focus-lock` can determine the next interable element to focus on.
376
376
  */
377
377
  async setFocusInside() {
378
- (document.activeElement === document.body || xe() || !this.lastFocusedElement) && (Ie(this.$refs.root) || Be(this.$refs.root, this.lastFocusedElement, {
378
+ (document.activeElement === document.body || we() || !this.lastFocusedElement) && (xe(this.$refs.root) || Be(this.$refs.root, this.lastFocusedElement, {
379
379
  focusOptions: { preventScroll: !0 }
380
380
  }), this.lastFocusedElement = document.activeElement);
381
381
  },
@@ -433,13 +433,11 @@ var Ge = function() {
433
433
  qe,
434
434
  !1,
435
435
  null,
436
- "c1b3538c",
437
- null,
438
- null
436
+ "c1b3538c"
439
437
  );
440
438
  const Ze = $e.exports;
441
439
  export {
442
440
  Ze as B,
443
441
  ke as g
444
442
  };
445
- //# sourceMappingURL=index.d553d3d1.js.map
443
+ //# sourceMappingURL=focus-trap.DSkLNO_i.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-trap.DSkLNO_i.js","sources":["../../../../node_modules/focus-lock/dist/es2015/constants.js","../../../../node_modules/focus-lock/dist/es2015/utils/array.js","../../../../node_modules/focus-lock/dist/es2015/utils/is.js","../../../../node_modules/focus-lock/dist/es2015/utils/tabOrder.js","../../../../node_modules/focus-lock/dist/es2015/utils/tabbables.js","../../../../node_modules/focus-lock/dist/es2015/utils/tabUtils.js","../../../../node_modules/focus-lock/dist/es2015/utils/DOMutils.js","../../../../node_modules/focus-lock/dist/es2015/utils/all-affected.js","../../../../node_modules/focus-lock/dist/es2015/utils/getActiveElement.js","../../../../node_modules/focus-lock/dist/es2015/focusInside.js","../../../../node_modules/focus-lock/dist/es2015/focusIsHidden.js","../../../../node_modules/focus-lock/dist/es2015/utils/correctFocus.js","../../../../node_modules/focus-lock/dist/es2015/utils/firstFocus.js","../../../../node_modules/focus-lock/dist/es2015/solver.js","../../../../node_modules/focus-lock/dist/es2015/utils/parenting.js","../../../../node_modules/focus-lock/dist/es2015/focusMerge.js","../../../../node_modules/focus-lock/dist/es2015/focusables.js","../../../../node_modules/focus-lock/dist/es2015/setFocus.js","../../src/components/focus-trap/focus-trap.types.ts","../../src/utils/ts/focus-trap.utils.ts","../../src/components/focus-trap/focus-trap.vue"],"sourcesContent":["/**\n * defines a focus group\n */\nexport var FOCUS_GROUP = 'data-focus-lock';\n/**\n * disables element discovery inside a group marked by key\n */\nexport var FOCUS_DISABLED = 'data-focus-lock-disabled';\n/**\n * allows uncontrolled focus within the marked area, effectively disabling focus lock for it's content\n */\nexport var FOCUS_ALLOW = 'data-no-focus-lock';\n/**\n * instructs autofocus engine to pick default autofocus inside a given node\n * can be set on the element or container\n */\nexport var FOCUS_AUTO = 'data-autofocus-inside';\n/**\n * instructs autofocus to ignore elements within a given node\n * can be set on the element or container\n */\nexport var FOCUS_NO_AUTOFOCUS = 'data-no-autofocus';\n","/*\nIE11 support\n */\nexport var toArray = function (a) {\n var ret = Array(a.length);\n for (var i = 0; i < a.length; ++i) {\n ret[i] = a[i];\n }\n return ret;\n};\nexport var asArray = function (a) { return (Array.isArray(a) ? a : [a]); };\n","import { FOCUS_NO_AUTOFOCUS } from '../constants';\nvar isElementHidden = function (node) {\n // we can measure only \"elements\"\n // consider others as \"visible\"\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n var computedStyle = window.getComputedStyle(node, null);\n if (!computedStyle || !computedStyle.getPropertyValue) {\n return false;\n }\n return (computedStyle.getPropertyValue('display') === 'none' || computedStyle.getPropertyValue('visibility') === 'hidden');\n};\nvar getParentNode = function (node) {\n // DOCUMENT_FRAGMENT_NODE can also point on ShadowRoot. In this case .host will point on the next node\n return node.parentNode && node.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node.parentNode.host\n : node.parentNode;\n};\nvar isTopNode = function (node) {\n // @ts-ignore\n return node === document || (node && node.nodeType === Node.DOCUMENT_NODE);\n};\nvar isVisibleUncached = function (node, checkParent) {\n return !node || isTopNode(node) || (!isElementHidden(node) && checkParent(getParentNode(node)));\n};\nexport var isVisibleCached = function (visibilityCache, node) {\n var cached = visibilityCache.get(node);\n if (cached !== undefined) {\n return cached;\n }\n var result = isVisibleUncached(node, isVisibleCached.bind(undefined, visibilityCache));\n visibilityCache.set(node, result);\n return result;\n};\nvar isAutoFocusAllowedUncached = function (node, checkParent) {\n return node && !isTopNode(node) ? (isAutoFocusAllowed(node) ? checkParent(getParentNode(node)) : false) : true;\n};\nexport var isAutoFocusAllowedCached = function (cache, node) {\n var cached = cache.get(node);\n if (cached !== undefined) {\n return cached;\n }\n var result = isAutoFocusAllowedUncached(node, isAutoFocusAllowedCached.bind(undefined, cache));\n cache.set(node, result);\n return result;\n};\nexport var getDataset = function (node) {\n // @ts-ignore\n return node.dataset;\n};\nexport var isHTMLButtonElement = function (node) { return node.tagName === 'BUTTON'; };\nexport var isHTMLInputElement = function (node) { return node.tagName === 'INPUT'; };\nexport var isRadioElement = function (node) {\n return isHTMLInputElement(node) && node.type === 'radio';\n};\nexport var notHiddenInput = function (node) {\n return !((isHTMLInputElement(node) || isHTMLButtonElement(node)) && (node.type === 'hidden' || node.disabled));\n};\nexport var isAutoFocusAllowed = function (node) {\n var attribute = node.getAttribute(FOCUS_NO_AUTOFOCUS);\n return ![true, 'true', ''].includes(attribute);\n};\nexport var isGuard = function (node) { var _a; return Boolean(node && ((_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.focusGuard)); };\nexport var isNotAGuard = function (node) { return !isGuard(node); };\nexport var isDefined = function (x) { return Boolean(x); };\n","import { toArray } from './array';\nexport var tabSort = function (a, b) {\n var tabDiff = a.tabIndex - b.tabIndex;\n var indexDiff = a.index - b.index;\n if (tabDiff) {\n if (!a.tabIndex) {\n return 1;\n }\n if (!b.tabIndex) {\n return -1;\n }\n }\n return tabDiff || indexDiff;\n};\nexport var orderByTabIndex = function (nodes, filterNegative, keepGuards) {\n return toArray(nodes)\n .map(function (node, index) { return ({\n node: node,\n index: index,\n tabIndex: keepGuards && node.tabIndex === -1 ? ((node.dataset || {}).focusGuard ? 0 : -1) : node.tabIndex,\n }); })\n .filter(function (data) { return !filterNegative || data.tabIndex >= 0; })\n .sort(tabSort);\n};\n","/**\n * list of the object to be considered as focusable\n */\nexport var tabbables = [\n 'button:enabled',\n 'select:enabled',\n 'textarea:enabled',\n 'input:enabled',\n // elements with explicit roles will also use explicit tabindex\n // '[role=\"button\"]',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[tabindex]',\n '[contenteditable]',\n '[autofocus]',\n];\n","import { FOCUS_AUTO } from '../constants';\nimport { toArray } from './array';\nimport { tabbables } from './tabbables';\nvar queryTabbables = tabbables.join(',');\nvar queryGuardTabbables = \"\".concat(queryTabbables, \", [data-focus-guard]\");\nvar getFocusablesWithShadowDom = function (parent, withGuards) {\n var _a;\n return toArray(((_a = parent.shadowRoot) === null || _a === void 0 ? void 0 : _a.children) || parent.children).reduce(function (acc, child) {\n return acc.concat(child.matches(withGuards ? queryGuardTabbables : queryTabbables) ? [child] : [], getFocusablesWithShadowDom(child));\n }, []);\n};\nexport var getFocusables = function (parents, withGuards) {\n return parents.reduce(function (acc, parent) {\n return acc.concat(\n // add all tabbables inside and within shadow DOMs in DOM order\n getFocusablesWithShadowDom(parent, withGuards), \n // add if node is tabbable itself\n parent.parentNode\n ? toArray(parent.parentNode.querySelectorAll(queryTabbables)).filter(function (node) { return node === parent; })\n : []);\n }, []);\n};\n/**\n * return a list of focusable nodes within an area marked as \"auto-focusable\"\n * @param parent\n */\nexport var getParentAutofocusables = function (parent) {\n var parentFocus = parent.querySelectorAll(\"[\".concat(FOCUS_AUTO, \"]\"));\n return toArray(parentFocus)\n .map(function (node) { return getFocusables([node]); })\n .reduce(function (acc, nodes) { return acc.concat(nodes); }, []);\n};\n","import { toArray } from './array';\nimport { isAutoFocusAllowedCached, isVisibleCached, notHiddenInput } from './is';\nimport { orderByTabIndex } from './tabOrder';\nimport { getFocusables, getParentAutofocusables } from './tabUtils';\n/**\n * given list of focusable elements keeps the ones user can interact with\n * @param nodes\n * @param visibilityCache\n */\nexport var filterFocusable = function (nodes, visibilityCache) {\n return toArray(nodes)\n .filter(function (node) { return isVisibleCached(visibilityCache, node); })\n .filter(function (node) { return notHiddenInput(node); });\n};\nexport var filterAutoFocusable = function (nodes, cache) {\n if (cache === void 0) { cache = new Map(); }\n return toArray(nodes).filter(function (node) { return isAutoFocusAllowedCached(cache, node); });\n};\n/**\n * only tabbable ones\n * (but with guards which would be ignored)\n */\nexport var getTabbableNodes = function (topNodes, visibilityCache, withGuards) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);\n};\n/**\n * actually anything \"focusable\", not only tabbable\n * (without guards, as long as they are not expected to be focused)\n */\nexport var getAllTabbableNodes = function (topNodes, visibilityCache) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);\n};\n/**\n * return list of nodes which are expected to be auto-focused\n * @param topNode\n * @param visibilityCache\n */\nexport var parentAutofocusables = function (topNode, visibilityCache) {\n return filterFocusable(getParentAutofocusables(topNode), visibilityCache);\n};\n/*\n * Determines if element is contained in scope, including nested shadow DOMs\n */\nexport var contains = function (scope, element) {\n return ((scope.shadowRoot\n ? contains(scope.shadowRoot, element)\n : scope.contains(element)) || Array.from(scope.children).some(function (child) { return contains(child, element); }));\n};\n","import { FOCUS_DISABLED, FOCUS_GROUP } from '../constants';\nimport { asArray, toArray } from './array';\n/**\n * in case of multiple nodes nested inside each other\n * keeps only top ones\n * this is O(nlogn)\n * @param nodes\n * @returns {*}\n */\nvar filterNested = function (nodes) {\n var contained = new Set();\n var l = nodes.length;\n for (var i = 0; i < l; i += 1) {\n for (var j = i + 1; j < l; j += 1) {\n var position = nodes[i].compareDocumentPosition(nodes[j]);\n /* eslint-disable no-bitwise */\n if ((position & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0) {\n contained.add(j);\n }\n if ((position & Node.DOCUMENT_POSITION_CONTAINS) > 0) {\n contained.add(i);\n }\n /* eslint-enable */\n }\n }\n return nodes.filter(function (_, index) { return !contained.has(index); });\n};\n/**\n * finds top most parent for a node\n * @param node\n * @returns {*}\n */\nvar getTopParent = function (node) {\n return node.parentNode ? getTopParent(node.parentNode) : node;\n};\n/**\n * returns all \"focus containers\" inside a given node\n * @param node\n * @returns {T}\n */\nexport var getAllAffectedNodes = function (node) {\n var nodes = asArray(node);\n return nodes.filter(Boolean).reduce(function (acc, currentNode) {\n var group = currentNode.getAttribute(FOCUS_GROUP);\n acc.push.apply(acc, (group\n ? filterNested(toArray(getTopParent(currentNode).querySelectorAll(\"[\".concat(FOCUS_GROUP, \"=\\\"\").concat(group, \"\\\"]:not([\").concat(FOCUS_DISABLED, \"=\\\"disabled\\\"])\"))))\n : [currentNode]));\n return acc;\n }, []);\n};\n","var getNestedShadowActiveElement = function (shadowRoot) {\n return shadowRoot.activeElement\n ? shadowRoot.activeElement.shadowRoot\n ? getNestedShadowActiveElement(shadowRoot.activeElement.shadowRoot)\n : shadowRoot.activeElement\n : undefined;\n};\n/**\n * returns active element from document or from nested shadowdoms\n */\nexport var getActiveElement = function () {\n return (document.activeElement\n ? document.activeElement.shadowRoot\n ? getNestedShadowActiveElement(document.activeElement.shadowRoot)\n : document.activeElement\n : undefined); // eslint-disable-next-line @typescript-eslint/no-explicit-any\n};\n","import { contains } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\nvar focusInFrame = function (frame) { return frame === document.activeElement; };\nvar focusInsideIframe = function (topNode) {\n return Boolean(toArray(topNode.querySelectorAll('iframe')).some(function (node) { return focusInFrame(node); }));\n};\n/**\n * @returns {Boolean} true, if the current focus is inside given node or nodes\n */\nexport var focusInside = function (topNode) {\n var activeElement = document && getActiveElement();\n if (!activeElement || (activeElement.dataset && activeElement.dataset.focusGuard)) {\n return false;\n }\n return getAllAffectedNodes(topNode).some(function (node) { return contains(node, activeElement) || focusInsideIframe(node); });\n};\n","import { FOCUS_ALLOW } from './constants';\nimport { contains } from './utils/DOMutils';\nimport { toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\n/**\n * focus is hidden FROM the focus-lock\n * ie contained inside a node focus-lock shall ignore\n * @returns {boolean} focus is currently is in \"allow\" area\n */\nexport var focusIsHidden = function () {\n var activeElement = document && getActiveElement();\n if (!activeElement) {\n return false;\n }\n // this does not support setting FOCUS_ALLOW within shadow dom\n return toArray(document.querySelectorAll(\"[\".concat(FOCUS_ALLOW, \"]\"))).some(function (node) { return contains(node, activeElement); });\n};\n","import { isRadioElement } from './is';\nvar findSelectedRadio = function (node, nodes) {\n return nodes\n .filter(isRadioElement)\n .filter(function (el) { return el.name === node.name; })\n .filter(function (el) { return el.checked; })[0] || node;\n};\nexport var correctNode = function (node, nodes) {\n if (isRadioElement(node) && node.name) {\n return findSelectedRadio(node, nodes);\n }\n return node;\n};\n/**\n * giving a set of radio inputs keeps only selected (tabbable) ones\n * @param nodes\n */\nexport var correctNodes = function (nodes) {\n // IE11 has no Set(array) constructor\n var resultSet = new Set();\n nodes.forEach(function (node) { return resultSet.add(correctNode(node, nodes)); });\n // using filter to support IE11\n return nodes.filter(function (node) { return resultSet.has(node); });\n};\n","import { correctNode } from './correctFocus';\nexport var pickFirstFocus = function (nodes) {\n if (nodes[0] && nodes.length > 1) {\n return correctNode(nodes[0], nodes);\n }\n return nodes[0];\n};\nexport var pickFocusable = function (nodes, index) {\n if (nodes.length > 1) {\n return nodes.indexOf(correctNode(nodes[index], nodes));\n }\n return index;\n};\n","import { correctNodes } from './utils/correctFocus';\nimport { pickFocusable } from './utils/firstFocus';\nimport { isGuard } from './utils/is';\nexport var NEW_FOCUS = 'NEW_FOCUS';\n/**\n * Main solver for the \"find next focus\" question\n * @param innerNodes\n * @param outerNodes\n * @param activeElement\n * @param lastNode\n * @returns {number|string|undefined|*}\n */\nexport var newFocus = function (innerNodes, outerNodes, activeElement, lastNode) {\n var cnt = innerNodes.length;\n var firstFocus = innerNodes[0];\n var lastFocus = innerNodes[cnt - 1];\n var isOnGuard = isGuard(activeElement);\n // focus is inside\n if (activeElement && innerNodes.indexOf(activeElement) >= 0) {\n return undefined;\n }\n var activeIndex = activeElement !== undefined ? outerNodes.indexOf(activeElement) : -1;\n var lastIndex = lastNode ? outerNodes.indexOf(lastNode) : activeIndex;\n var lastNodeInside = lastNode ? innerNodes.indexOf(lastNode) : -1;\n var indexDiff = activeIndex - lastIndex;\n var firstNodeIndex = outerNodes.indexOf(firstFocus);\n var lastNodeIndex = outerNodes.indexOf(lastFocus);\n var correctedNodes = correctNodes(outerNodes);\n var correctedIndex = activeElement !== undefined ? correctedNodes.indexOf(activeElement) : -1;\n var correctedIndexDiff = correctedIndex - (lastNode ? correctedNodes.indexOf(lastNode) : activeIndex);\n var returnFirstNode = pickFocusable(innerNodes, 0);\n var returnLastNode = pickFocusable(innerNodes, cnt - 1);\n // new focus\n if (activeIndex === -1 || lastNodeInside === -1) {\n return NEW_FOCUS;\n }\n // old focus\n if (!indexDiff && lastNodeInside >= 0) {\n return lastNodeInside;\n }\n // first element\n if (activeIndex <= firstNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnLastNode;\n }\n // last element\n if (activeIndex >= lastNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnFirstNode;\n }\n // jump out, but not on the guard\n if (indexDiff && Math.abs(correctedIndexDiff) > 1) {\n return lastNodeInside;\n }\n // focus above lock\n if (activeIndex <= firstNodeIndex) {\n return returnLastNode;\n }\n // focus below lock\n if (activeIndex > lastNodeIndex) {\n return returnFirstNode;\n }\n // index is inside tab order, but outside Lock\n if (indexDiff) {\n if (Math.abs(indexDiff) > 1) {\n return lastNodeInside;\n }\n return (cnt + lastNodeInside + indexDiff) % cnt;\n }\n // do nothing\n return undefined;\n};\n","import { parentAutofocusables } from './DOMutils';\nimport { contains } from './DOMutils';\nimport { asArray } from './array';\nvar getParents = function (node, parents) {\n if (parents === void 0) { parents = []; }\n parents.push(node);\n if (node.parentNode) {\n getParents(node.parentNode.host || node.parentNode, parents);\n }\n return parents;\n};\n/**\n * finds a parent for both nodeA and nodeB\n * @param nodeA\n * @param nodeB\n * @returns {boolean|*}\n */\nexport var getCommonParent = function (nodeA, nodeB) {\n var parentsA = getParents(nodeA);\n var parentsB = getParents(nodeB);\n // tslint:disable-next-line:prefer-for-of\n for (var i = 0; i < parentsA.length; i += 1) {\n var currentParent = parentsA[i];\n if (parentsB.indexOf(currentParent) >= 0) {\n return currentParent;\n }\n }\n return false;\n};\nexport var getTopCommonParent = function (baseActiveElement, leftEntry, rightEntries) {\n var activeElements = asArray(baseActiveElement);\n var leftEntries = asArray(leftEntry);\n var activeElement = activeElements[0];\n var topCommon = false;\n leftEntries.filter(Boolean).forEach(function (entry) {\n topCommon = getCommonParent(topCommon || entry, entry) || topCommon;\n rightEntries.filter(Boolean).forEach(function (subEntry) {\n var common = getCommonParent(activeElement, subEntry);\n if (common) {\n if (!topCommon || contains(common, topCommon)) {\n topCommon = common;\n }\n else {\n topCommon = getCommonParent(common, topCommon);\n }\n }\n });\n });\n // TODO: add assert here?\n return topCommon;\n};\n/**\n * return list of nodes which are expected to be autofocused inside a given top nodes\n * @param entries\n * @param visibilityCache\n */\nexport var allParentAutofocusables = function (entries, visibilityCache) {\n return entries.reduce(function (acc, node) { return acc.concat(parentAutofocusables(node, visibilityCache)); }, []);\n};\n","import { NEW_FOCUS, newFocus } from './solver';\nimport { filterAutoFocusable, getAllTabbableNodes, getTabbableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { pickFirstFocus } from './utils/firstFocus';\nimport { getActiveElement } from './utils/getActiveElement';\nimport { getDataset, isDefined, isNotAGuard } from './utils/is';\nimport { allParentAutofocusables, getTopCommonParent } from './utils/parenting';\nvar findAutoFocused = function (autoFocusables) {\n return function (node) { var _a; \n // @ts-expect-error\n return node.autofocus || !!((_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.autofocus) || autoFocusables.indexOf(node) >= 0; };\n};\nvar reorderNodes = function (srcNodes, dstNodes) {\n var remap = new Map();\n // no Set(dstNodes) for IE11 :(\n dstNodes.forEach(function (entity) { return remap.set(entity.node, entity); });\n // remap to dstNodes\n return srcNodes.map(function (node) { return remap.get(node); }).filter(isDefined);\n};\n/**\n * given top node(s) and the last active element return the element to be focused next\n * @param topNode\n * @param lastNode\n */\nexport var getFocusMerge = function (topNode, lastNode) {\n var activeElement = document && getActiveElement();\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);\n var visibilityCache = new Map();\n var anyFocusable = getAllTabbableNodes(entries, visibilityCache);\n var innerElements = getTabbableNodes(entries, visibilityCache).filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n });\n if (!innerElements[0]) {\n innerElements = anyFocusable;\n if (!innerElements[0]) {\n return undefined;\n }\n }\n var outerNodes = getAllTabbableNodes([commonParent], visibilityCache).map(function (_a) {\n var node = _a.node;\n return node;\n });\n var orderedInnerElements = reorderNodes(outerNodes, innerElements);\n var innerNodes = orderedInnerElements.map(function (_a) {\n var node = _a.node;\n return node;\n });\n var newId = newFocus(innerNodes, outerNodes, activeElement, lastNode);\n if (newId === NEW_FOCUS) {\n var autoFocusable = filterAutoFocusable(anyFocusable.map(function (_a) {\n var node = _a.node;\n return node;\n })).filter(findAutoFocused(allParentAutofocusables(entries, visibilityCache)));\n return {\n node: autoFocusable && autoFocusable.length\n ? pickFirstFocus(autoFocusable)\n : pickFirstFocus(filterAutoFocusable(innerNodes)),\n };\n }\n if (newId === undefined) {\n return newId;\n }\n return orderedInnerElements[newId];\n};\n","import { getTabbableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { isGuard, isNotAGuard } from './utils/is';\nimport { getTopCommonParent } from './utils/parenting';\n/**\n * return list of focusable elements inside a given top node\n * @deprecated use {@link getFocusableIn}. Yep, there is typo in the function name\n */\nexport var getFocusabledIn = function (topNode) {\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(topNode, topNode, entries);\n var visibilityCache = new Map();\n var outerNodes = getTabbableNodes([commonParent], visibilityCache, true);\n var innerElements = getTabbableNodes(entries, visibilityCache)\n .filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n })\n .map(function (_a) {\n var node = _a.node;\n return node;\n });\n return outerNodes.map(function (_a) {\n var node = _a.node, index = _a.index;\n return ({\n node: node,\n index: index,\n lockItem: innerElements.indexOf(node) >= 0,\n guard: isGuard(node),\n });\n });\n};\n/**\n * return list of focusable elements inside a given top node\n */\nexport var getFocusableIn = getFocusabledIn;\n","import { getFocusMerge } from './focusMerge';\nexport var focusOn = function (target, focusOptions) {\n if ('focus' in target) {\n target.focus(focusOptions);\n }\n if ('contentWindow' in target && target.contentWindow) {\n target.contentWindow.focus();\n }\n};\nvar guardCount = 0;\nvar lockDisabled = false;\n/**\n * Sets focus at a given node. The last focused element will help to determine which element(first or last) should be focused.\n * HTML markers (see {@link import('./constants').FOCUS_AUTO} constants) can control autofocus\n * @param topNode\n * @param lastNode\n * @param options\n */\nexport var setFocus = function (topNode, lastNode, options) {\n if (options === void 0) { options = {}; }\n var focusable = getFocusMerge(topNode, lastNode);\n if (lockDisabled) {\n return;\n }\n if (focusable) {\n if (guardCount > 2) {\n // tslint:disable-next-line:no-console\n console.error('FocusLock: focus-fighting detected. Only one focus management system could be active. ' +\n 'See https://github.com/theKashey/focus-lock/#focus-fighting');\n lockDisabled = true;\n setTimeout(function () {\n lockDisabled = false;\n }, 1);\n return;\n }\n guardCount++;\n focusOn(focusable.node, options.focusOptions);\n guardCount--;\n }\n};\n","export enum BentoFocusTrapArrowNavigationDirection {\n VERTICAL = 'vertical',\n HORIZONTAL = 'horizontal',\n}\n\nexport enum BentoFocusTrapVerticalNavigationEvent {\n ARROW_UP = 'arrowup',\n ARROW_DOWN = 'arrowdown',\n}\n\nexport enum BentoFocusTrapHorizontalNavigationEvent {\n ARROW_LEFT = 'arrowleft',\n ARROW_RIGHT = 'arrowright',\n}\n\nexport interface BentoFocusTrapFocusableIn {\n node: HTMLElement;\n /**\n * tab index\n */\n index: number;\n /**\n * true, if this node belongs to a Lock\n */\n lockItem: boolean;\n /**\n * true, if this node is a focus-guard (system node)\n */\n guard: boolean;\n}\n","import { getFocusableIn } from 'focus-lock';\nimport {\n BentoFocusTrapFocusableIn,\n BentoFocusTrapHorizontalNavigationEvent,\n BentoFocusTrapVerticalNavigationEvent,\n} from '@/components/focus-trap/focus-trap.types';\n\n/**\n * Perform callback before next re-paint frame of browser.\n *\n * @param action\n * @returns\n */\nexport const deferAction = (callback: FrameRequestCallback) => requestAnimationFrame(callback);\n\n/**\n * Get's the index number of the current node inside an array of focusable elements.\n *\n * @param node an HTMLElement node\n * @param nodes an array of focusable elements\n * @returns\n */\nconst getNodeIndex = (node: Element, nodes: BentoFocusTrapFocusableIn[]) => {\n const index = nodes.findIndex(item => item.node === node);\n return index === -1 ? 0 : index;\n};\n\n/**\n * Retrieves the next focusable element using a factor to either choose\n * the next or previous focusable element.\n *\n * @param factor a number +1 or -1\n * @param element the element to checks for focusable elements inside of\n * @returns\n */\nexport const getNextFocusableElement = (factor, element): HTMLElement => {\n const currentFocusedEl = document.activeElement;\n const focusableElements = getFocusableIn(element);\n const nextIndex = getNodeIndex(currentFocusedEl, focusableElements) + factor;\n return focusableElements[nextIndex]?.node || (currentFocusedEl as HTMLElement);\n};\n\n/**\n * Returns an object is if keyboard event key is an arrow previous or next key.\n * this changes depending on if the arrow navigation is horizontal or vertical.\n *\n * @param event\n * @param arrowOrder\n * @returns { isArrowNext: boolean, isArrowPrev: boolean }\n */\nexport const getArrowType = (\n event: KeyboardEvent,\n arrowOrder: BentoFocusTrapVerticalNavigationEvent[] | BentoFocusTrapHorizontalNavigationEvent[]\n) => {\n const eventKey = event.key.toLowerCase();\n return {\n isArrowNext: eventKey === arrowOrder[0],\n isArrowPrev: eventKey === arrowOrder[1],\n };\n};\n\n/**\n * Default scrolling into view options\n */\nexport const SCROLL_INTO_VIEW_OPTIONS: ScrollIntoViewOptions = {\n behavior: 'smooth',\n block: 'center',\n inline: 'center',\n};\n","<template>\n <div\n v-if=\"useHasSlot($slots)('default')\"\n ref=\"root\"\n class=\"b-focus-trap\"\n data-testid=\"focus-trap\"\n tabindex=\"-1\"\n v-on=\"arrowNavigation ? { keydown: onKeyDown } : {}\"\n @focusout=\"onBlur\"\n >\n <slot></slot>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import moveFocusInside, { focusInside, focusIsHidden } from 'focus-lock';\n import {\n BentoFocusTrapArrowNavigationDirection,\n BentoFocusTrapHorizontalNavigationEvent,\n BentoFocusTrapVerticalNavigationEvent,\n } from './focus-trap.types';\n import {\n deferAction,\n getArrowType,\n getNextFocusableElement,\n SCROLL_INTO_VIEW_OPTIONS,\n } from '@/utils/ts/focus-trap.utils';\n import { useHasSlot } from '@/composables';\n\n /**\n * Locks the focus inside an element for a11y navigation.\n * Useful for things like modals, popovers, etc...\n *\n * @example\n * import { BentoFocusTrap, BentoButton } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFocusTrap, BentoButton },\n * template: `\n * <div id=\"import-choice\">\n * <bento-focus-trap>\n * Make a choice to proceed further!\n * <bento-button>Yes</bento-button>\n * <bento-button>No</bento-button>\n * </bento-focus-trap>\n * </div>\n * `\n * };\n */\n export default defineComponent({\n name: 'bento-focus-trap',\n props: {\n /**\n * Enables / Disables arrow navigation as well can determine the type of arrow navigation.\n * The types of arrow navigation are horizontal and vertical.\n */\n arrowNavigation: {\n type: String as PropType<BentoFocusTrapArrowNavigationDirection>,\n default: undefined,\n validator: value =>\n Object.values(BentoFocusTrapArrowNavigationDirection).includes(\n value as BentoFocusTrapArrowNavigationDirection\n ),\n },\n /**\n * Enables / disables the focus trap.\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n data: () => ({\n lastFocusedElement: null,\n }),\n computed: {\n isHorizontalArrowNavigation(): boolean {\n return this.arrowNavigation === BentoFocusTrapArrowNavigationDirection.HORIZONTAL;\n },\n isVerticalArrowNavigation(): boolean {\n return this.arrowNavigation === BentoFocusTrapArrowNavigationDirection.VERTICAL;\n },\n arrowOrder() {\n return this.isVerticalArrowNavigation\n ? Object.values(BentoFocusTrapVerticalNavigationEvent)\n : Object.values(BentoFocusTrapHorizontalNavigationEvent);\n },\n },\n watch: {\n /**\n * If the disabled prop changes, then enable / disable the focus trap.\n */\n disabled() {\n if (this.disabled) {\n this.disable();\n } else {\n this.setFocusInside();\n }\n },\n },\n mounted() {\n if (this.disabled) {\n return;\n }\n this.setFocusInside();\n },\n beforeUnmount() {\n if (this.disabled) {\n return;\n }\n this.disable();\n },\n methods: {\n /**\n * Set focus back inside the element area, giving the last focus element\n * `focus-lock` can determine the next interable element to focus on.\n */\n async setFocusInside() {\n const isFocusOnBody = document.activeElement === document.body;\n if (isFocusOnBody || focusIsHidden() || !this.lastFocusedElement) {\n if (!focusInside(this.$refs.root as HTMLElement)) {\n moveFocusInside(this.$refs.root as HTMLElement, this.lastFocusedElement, {\n focusOptions: { preventScroll: true },\n });\n }\n this.lastFocusedElement = document.activeElement;\n }\n },\n /**\n * On blur, trap the focus inside!\n */\n onBlur() {\n if (this.disabled) {\n return;\n }\n deferAction(this.setFocusInside);\n },\n /**\n * If the no arrow navigation is enabled\n * or if the currently focus element is a textarea or an input then prevent navigation.\n */\n shouldPreventNavigation() {\n if (!this.isVerticalArrowNavigation && !this.isHorizontalArrowNavigation) {\n return false;\n }\n\n const currentTag = document.activeElement.tagName.toLowerCase();\n const possibleFormControls = this.isVerticalArrowNavigation\n ? ['textarea', 'select']\n : ['input', 'textarea'];\n return possibleFormControls.includes(currentTag);\n },\n /**\n * When an arrow key is pressed then navigate to the next focusable element.\n * If trap is disabled or is content editable then prevent arrow navigation.\n *\n * @param event on keyboard press event\n */\n onKeyDown(event: KeyboardEvent) {\n if (\n this.disabled ||\n (document.activeElement as HTMLElement).isContentEditable ||\n this.shouldPreventNavigation()\n ) {\n return;\n }\n\n const { isArrowNext, isArrowPrev } = getArrowType(event, this.arrowOrder);\n if (isArrowPrev || isArrowNext) {\n event.preventDefault();\n event.stopPropagation();\n const focusableEl = getNextFocusableElement(isArrowPrev ? 1 : -1, this.$el);\n focusableEl.focus();\n if ('scrollIntoView' in focusableEl) {\n const options =\n 'scrollBehavior' in document.documentElement.style ? SCROLL_INTO_VIEW_OPTIONS : false;\n focusableEl.scrollIntoView(options);\n }\n }\n },\n /**\n * If focus trap is disabled then return focus to last focus element, parent node or simply the document body.\n */\n disable() {\n const focusOnDestroyEl = this.lastFocusedElement || this.$el.parentNode || document.body;\n if (focusOnDestroyEl) {\n focusOnDestroyEl.focus();\n }\n },\n useHasSlot,\n },\n });\n</script>\n\n<style lang=\"scss\" scoped>\n .b-focus-trap {\n outline: none;\n }\n</style>\n"],"names":["FOCUS_GROUP","FOCUS_DISABLED","FOCUS_ALLOW","FOCUS_AUTO","FOCUS_NO_AUTOFOCUS","toArray","a","ret","i","asArray","isElementHidden","node","computedStyle","getParentNode","isTopNode","isVisibleUncached","checkParent","isVisibleCached","visibilityCache","cached","result","isAutoFocusAllowedUncached","isAutoFocusAllowed","isAutoFocusAllowedCached","cache","getDataset","isHTMLButtonElement","isHTMLInputElement","isRadioElement","notHiddenInput","attribute","isGuard","_a","isNotAGuard","isDefined","x","tabSort","b","tabDiff","indexDiff","orderByTabIndex","nodes","filterNegative","keepGuards","index","data","tabbables","queryTabbables","queryGuardTabbables","getFocusablesWithShadowDom","parent","withGuards","acc","child","getFocusables","parents","getParentAutofocusables","parentFocus","filterFocusable","filterAutoFocusable","getTabbableNodes","topNodes","getAllTabbableNodes","parentAutofocusables","topNode","contains","scope","element","filterNested","contained","l","j","position","_","getTopParent","getAllAffectedNodes","currentNode","group","getNestedShadowActiveElement","shadowRoot","getActiveElement","focusInFrame","frame","focusInsideIframe","focusInside","activeElement","focusIsHidden","findSelectedRadio","el","correctNode","correctNodes","resultSet","pickFirstFocus","pickFocusable","NEW_FOCUS","newFocus","innerNodes","outerNodes","lastNode","cnt","firstFocus","lastFocus","isOnGuard","activeIndex","lastIndex","lastNodeInside","firstNodeIndex","lastNodeIndex","correctedNodes","correctedIndex","correctedIndexDiff","returnFirstNode","returnLastNode","getParents","getCommonParent","nodeA","nodeB","parentsA","parentsB","currentParent","getTopCommonParent","baseActiveElement","leftEntry","rightEntries","activeElements","leftEntries","topCommon","entry","subEntry","common","allParentAutofocusables","entries","findAutoFocused","autoFocusables","reorderNodes","srcNodes","dstNodes","remap","entity","getFocusMerge","commonParent","anyFocusable","innerElements","orderedInnerElements","newId","autoFocusable","getFocusabledIn","getFocusableIn","focusOn","target","focusOptions","guardCount","lockDisabled","setFocus","options","focusable","BentoFocusTrapArrowNavigationDirection","BentoFocusTrapArrowNavigationDirection2","BentoFocusTrapVerticalNavigationEvent","BentoFocusTrapVerticalNavigationEvent2","BentoFocusTrapHorizontalNavigationEvent","BentoFocusTrapHorizontalNavigationEvent2","deferAction","callback","getNodeIndex","item","getNextFocusableElement","factor","currentFocusedEl","focusableElements","nextIndex","getArrowType","event","arrowOrder","eventKey","SCROLL_INTO_VIEW_OPTIONS","_sfc_main","defineComponent","value","currentTag","isArrowNext","isArrowPrev","focusableEl","focusOnDestroyEl","useHasSlot"],"mappings":";;;;AAGO,IAAAA,IAAA,mBAIAC,KAAA,4BAIAC,KAAA,sBAKAC,KAAA,yBAKAC,KAAA,qBClBAC,IAAA,SAAAC,GAAA;AAEP,WADAC,IAAA,MAAAD,EAAA,MAAA,GACAE,IAAA,GAAAA,IAAAF,EAAA,QAAA,EAAAE;AACA,IAAAD,EAAAC,CAAA,IAAAF,EAAAE,CAAA;AAEA,SAAAD;AACA,GACOE,IAAA,SAAAH,GAAA;AAAA,SAAA,MAAA,QAAAA,CAAA,IAAAA,IAAA,CAAAA,CAAA;AAAA,GCTPI,KAAA,SAAAC,GAAA;AAGA,MAAAA,EAAA,aAAA,KAAA;AACA,WAAA;AAEA,MAAAC,IAAA,OAAA,iBAAAD,GAAA,IAAA;AACA,SAAA,CAAAC,KAAA,CAAAA,EAAA,mBACA,KAEAA,EAAA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,cAHA,KAAA,4BAAA,CAAA,YAAA,QAAA,IAAA,CAAA,SAAA,UAAA,GAGA,SAAAA,CAAA;AAAA,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,UAAAP,GAAA;AAQA,UAAA,KAAA,YAAA,SAAA,cAAA,qBAAA,KAAA,wBAAA;AAKA;AAGA,YAAA,EAAA,aAAAQ,GAAA,aAAAC,EAAA,IAAAV,GAAAC,GAAA,KAAA,UAAA;AACA,UAAAS,KAAAD,GAAA;AACA,QAAAR,EAAA,eAAA,GACAA,EAAA,gBAAA;AACA,cAAAU,IAAAhB,GAAAe,IAAA,IAAA,IAAA,KAAA,GAAA;AAEA,YADAC,EAAA,MAAA,GACA,oBAAAA,GAAA;AACA,gBAAA5B,IAAA,oBAAA,SAAA,gBAAA,QAAAqB,KAAA;AAEA,UAAAO,EAAA,eAAA5B,CAAA;AAAA,QAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,UAAA;AAKA,YAAA6B,IAAA,KAAA,sBAAA,KAAA,IAAA,cAAA,SAAA;AACA,MAAAA,KACAA,EAAA,MAAA;AAAA,IACA;AAAA,IACA,YAAAC;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]}
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as i, toRefs as r, computed as l, onMounted as c } from "vue";
2
- import { B as _ } from "./index.dd30e538.js";
3
- import { B as u } from "./button.9d6435ae.js";
4
- import { B as d } from "./button-actions.81db18e8.js";
5
- import { n as p } from "./_plugin-vue2_normalizer.71e2aa87.js";
2
+ import { B as u } from "./typography.Bjtu3Gca.js";
3
+ import { a as _ } from "./button.DhAUh5JA.js";
4
+ import { B as d } from "./button-actions.Bg9ey0p6.js";
5
+ import { n as f } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
6
6
  import "../assets/footer-actions.css";
7
- const f = {}, g = /* @__PURE__ */ i({
8
- ...f,
7
+ const p = {}, g = /* @__PURE__ */ i({
8
+ ...p,
9
9
  __name: "footer-actions",
10
10
  props: {
11
11
  /**
@@ -62,7 +62,7 @@ const f = {}, g = /* @__PURE__ */ i({
62
62
  leftAligned: o.value.length === 3 ? [
63
63
  {
64
64
  ...o.value[o.value.length - 1],
65
- variant: u.SECONDARY
65
+ variant: _.SECONDARY
66
66
  }
67
67
  ] : null,
68
68
  rightAligned: [...n]
@@ -75,24 +75,22 @@ const f = {}, g = /* @__PURE__ */ i({
75
75
  throw new Error(
76
76
  "Not more than 2 action buttons may be provided with actions label to Bento Modal default variant"
77
77
  );
78
- }), { __sfc: !0, props: t, actions: o, destructiveActions: e, alignedActions: s, BentoTypography: _, BentoButtonActions: d };
78
+ }), { __sfc: !0, props: t, actions: o, destructiveActions: e, alignedActions: s, BentoTypography: u, BentoButtonActions: d };
79
79
  }
80
80
  });
81
81
  var v = function() {
82
82
  var t = this, o = t._self._c, e = t._self._setupProxy;
83
83
  return o("div", { staticClass: "b-footer-actions" }, [o("div", { staticClass: "b-footer-actions__wrapper" }, [t.actionsLabel ? o(e.BentoTypography, { staticClass: "b-footer-actions__label", attrs: { el: "span", variant: "body", stronger: "" } }, [t._v(" " + t._s(t.actionsLabel) + " ")]) : t._e(), e.alignedActions.leftAligned ? o(e.BentoButtonActions, { staticClass: "b-footer-actions__left-group", attrs: { actions: e.alignedActions.leftAligned, layout: "buttons-start" } }) : t._e(), o(e.BentoButtonActions, { staticClass: "b-footer-actions__right-group", attrs: { actions: e.alignedActions.rightAligned, layout: "buttons-end" } })], 1)]);
84
- }, m = [], b = /* @__PURE__ */ p(
84
+ }, m = [], b = /* @__PURE__ */ f(
85
85
  g,
86
86
  v,
87
87
  m,
88
88
  !1,
89
89
  null,
90
- "97d2cb3e",
91
- null,
92
- null
90
+ "97d2cb3e"
93
91
  );
94
92
  const w = b.exports;
95
93
  export {
96
94
  w as F
97
95
  };
98
- //# sourceMappingURL=footer-actions.a1e09b4f.js.map
96
+ //# sourceMappingURL=footer-actions.DqMRmlV_.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"footer-actions.a1e09b4f.js","sources":["../../src/components/internal/footer-actions/footer-actions.vue"],"sourcesContent":["<template>\n <div class=\"b-footer-actions\">\n <div class=\"b-footer-actions__wrapper\">\n <bento-typography v-if=\"actionsLabel\" class=\"b-footer-actions__label\" el=\"span\" variant=\"body\" stronger>\n {{ actionsLabel }}\n </bento-typography>\n\n <bento-button-actions\n v-if=\"alignedActions.leftAligned\"\n class=\"b-footer-actions__left-group\"\n :actions=\"alignedActions.leftAligned\"\n layout=\"buttons-start\"\n ></bento-button-actions>\n\n <bento-button-actions\n class=\"b-footer-actions__right-group\"\n :actions=\"alignedActions.rightAligned\"\n layout=\"buttons-end\"\n ></bento-button-actions>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import { computed, onMounted, PropType, toRefs } from 'vue';\n import { BentoButtonActions, BentoButtonActionsList, BentoButtonVariant } from '@/components/button';\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n required: true,\n },\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n });\n\n const { actions, destructiveActions } = toRefs(props);\n\n const alignedActions = computed(() => {\n const rightAlignedButtons =\n actions.value.length < 3 ? actions.value : actions.value.slice(0, actions.value.length - 1);\n\n // Add red color to the 1-st Action button\n rightAlignedButtons[0].critical = destructiveActions.value || rightAlignedButtons[0].critical;\n\n return {\n leftAligned:\n actions.value.length === 3\n ? [\n {\n ...actions.value[actions.value.length - 1],\n variant: BentoButtonVariant.SECONDARY,\n },\n ]\n : null,\n rightAligned: [...rightAlignedButtons],\n };\n });\n\n onMounted(() => {\n if (props.actions && props.actions.length > 3) {\n throw new Error('Not more than 3 action buttons may be provided to Bento Modal default variant');\n }\n\n if (props.actionsLabel && props.actions && props.actions.length > 2) {\n throw new Error(\n 'Not more than 2 action buttons may be provided with actions label to Bento Modal default variant'\n );\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component to handle the logic of displaying actions in default Modal and Sidepanel\n\n * @example\n * import { FooterActions } from '@/components/internal/footer-actions';\n *\n * export default {\n * components: { FooterActions },\n * template: `\n * <footer-actions :actions=\"BentoButtonActionsList\" actions-label=\"Label\" :destructive-actions=\"true\" />\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./footer-actions.scss\" />\n"],"names":["__default__","actions","destructiveActions","toRefs","props","alignedActions","computed","rightAlignedButtons","BentoButtonVariant","onMounted"],"mappings":";;;;;;AA+HI,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAlDA,EAAA,SAAAC,GAAA,oBAAAC,EAAA,IAAAC,EAAAC,CAAA,GAEAC,IAAAC,EAAA,MAAA;AACI,YAAAC,IAAAN,EAAA,MAAA,SAAA,IAAAA,EAAA,QAAAA,EAAA,MAAA,MAAA,GAAAA,EAAA,MAAA,SAAA,CAAA;AAIA,aAAAM,EAAA,CAAA,EAAA,WAAAL,EAAA,SAAAK,EAAA,CAAA,EAAA,UAEA;AAAA,QAAO,aAAAN,EAAA,MAAA,WAAA,IAAA;AAAA,UAGO;AAAA,YACI,GAAAA,EAAA,MAAAA,EAAA,MAAA,SAAA,CAAA;AAAA,YAC6C,SAAAO,EAAA;AAAA,UACb;AAAA,QAChC,IAAA;AAAA,QAEJ,cAAA,CAAA,GAAAD,CAAA;AAAA,MAC2B;AAAA,IACzC,CAAA;AAGJ,WAAAE,EAAA,MAAA;AACI,UAAAL,EAAA,WAAAA,EAAA,QAAA,SAAA;AACI,cAAA,IAAA,MAAA,+EAAA;AAGJ,UAAAA,EAAA,gBAAAA,EAAA,WAAAA,EAAA,QAAA,SAAA;AACI,cAAA,IAAA;AAAA,UAAU;AAAA,QACN;AAAA,IAER,CAAA;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"footer-actions.DqMRmlV_.js","sources":["../../src/components/internal/footer-actions/footer-actions.vue"],"sourcesContent":["<template>\n <div class=\"b-footer-actions\">\n <div class=\"b-footer-actions__wrapper\">\n <bento-typography v-if=\"actionsLabel\" class=\"b-footer-actions__label\" el=\"span\" variant=\"body\" stronger>\n {{ actionsLabel }}\n </bento-typography>\n\n <bento-button-actions\n v-if=\"alignedActions.leftAligned\"\n class=\"b-footer-actions__left-group\"\n :actions=\"alignedActions.leftAligned\"\n layout=\"buttons-start\"\n ></bento-button-actions>\n\n <bento-button-actions\n class=\"b-footer-actions__right-group\"\n :actions=\"alignedActions.rightAligned\"\n layout=\"buttons-end\"\n ></bento-button-actions>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import { computed, onMounted, PropType, toRefs } from 'vue';\n import { BentoButtonActions, BentoButtonActionsList, BentoButtonVariant } from '@/components/button';\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n required: true,\n },\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n });\n\n const { actions, destructiveActions } = toRefs(props);\n\n const alignedActions = computed(() => {\n const rightAlignedButtons =\n actions.value.length < 3 ? actions.value : actions.value.slice(0, actions.value.length - 1);\n\n // Add red color to the 1-st Action button\n rightAlignedButtons[0].critical = destructiveActions.value || rightAlignedButtons[0].critical;\n\n return {\n leftAligned:\n actions.value.length === 3\n ? [\n {\n ...actions.value[actions.value.length - 1],\n variant: BentoButtonVariant.SECONDARY,\n },\n ]\n : null,\n rightAligned: [...rightAlignedButtons],\n };\n });\n\n onMounted(() => {\n if (props.actions && props.actions.length > 3) {\n throw new Error('Not more than 3 action buttons may be provided to Bento Modal default variant');\n }\n\n if (props.actionsLabel && props.actions && props.actions.length > 2) {\n throw new Error(\n 'Not more than 2 action buttons may be provided with actions label to Bento Modal default variant'\n );\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component to handle the logic of displaying actions in default Modal and Sidepanel\n\n * @example\n * import { FooterActions } from '@/components/internal/footer-actions';\n *\n * export default {\n * components: { FooterActions },\n * template: `\n * <footer-actions :actions=\"BentoButtonActionsList\" actions-label=\"Label\" :destructive-actions=\"true\" />\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./footer-actions.scss\" />\n"],"names":["__default__","actions","destructiveActions","toRefs","props","alignedActions","computed","rightAlignedButtons","BentoButtonVariant","onMounted"],"mappings":";;;;;;AA+HI,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAlDA,EAAA,SAAAC,GAAA,oBAAAC,EAAA,IAAAC,EAAAC,CAAA,GAEAC,IAAAC,EAAA,MAAA;AACI,YAAAC,IAAAN,EAAA,MAAA,SAAA,IAAAA,EAAA,QAAAA,EAAA,MAAA,MAAA,GAAAA,EAAA,MAAA,SAAA,CAAA;AAIA,aAAAM,EAAA,CAAA,EAAA,WAAAL,EAAA,SAAAK,EAAA,CAAA,EAAA,UAEA;AAAA,QAAO,aAAAN,EAAA,MAAA,WAAA,IAAA;AAAA,UAGO;AAAA,YACI,GAAAA,EAAA,MAAAA,EAAA,MAAA,SAAA,CAAA;AAAA,YAC6C,SAAAO,EAAA;AAAA,UACb;AAAA,QAChC,IAAA;AAAA,QAEJ,cAAA,CAAA,GAAAD,CAAA;AAAA,MAC2B;AAAA,IACzC,CAAA;AAGJ,WAAAE,EAAA,MAAA;AACI,UAAAL,EAAA,WAAAA,EAAA,QAAA,SAAA;AACI,cAAA,IAAA,MAAA,+EAAA;AAGJ,UAAAA,EAAA,gBAAAA,EAAA,WAAAA,EAAA,QAAA,SAAA;AACI,cAAA,IAAA;AAAA,UAAU;AAAA,QACN;AAAA,IAER,CAAA;;;;;;;;;;;;;;;"}