@adyen/bento-vue2 1.44.0 → 1.46.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 (254) hide show
  1. package/dist/@types/index.d.ts +16661 -18847
  2. package/dist/action-bar.js +1 -1
  3. package/dist/alert.js +1 -1
  4. package/dist/assets/accordion-item.css +1 -1
  5. package/dist/assets/action-bar.css +1 -1
  6. package/dist/assets/base-button.css +1 -1
  7. package/dist/assets/base-modal.css +1 -1
  8. package/dist/assets/button.css +1 -1
  9. package/dist/assets/card.css +1 -1
  10. package/dist/assets/checkbox.css +1 -1
  11. package/dist/assets/data-grid.css +1 -1
  12. package/dist/assets/dialog-page.css +1 -1
  13. package/dist/assets/dropdown-default-textbox.css +1 -1
  14. package/dist/assets/dropdown.css +1 -1
  15. package/dist/assets/file-uploader.css +1 -1
  16. package/dist/assets/focus-trap.css +1 -1
  17. package/dist/assets/header.css +1 -1
  18. package/dist/assets/info-icon-with-popover.css +1 -0
  19. package/dist/assets/input-field.css +1 -1
  20. package/dist/assets/inspector.css +1 -1
  21. package/dist/assets/layout-row.css +1 -1
  22. package/dist/assets/link.css +1 -1
  23. package/dist/assets/menu.css +1 -1
  24. package/dist/assets/modal-fullscreen.css +1 -1
  25. package/dist/assets/popover.css +1 -1
  26. package/dist/assets/popper-container.css +1 -1
  27. package/dist/assets/radio-input.css +1 -1
  28. package/dist/assets/sidepanel.css +1 -1
  29. package/dist/assets/step.css +1 -1
  30. package/dist/assets/tabs.css +1 -1
  31. package/dist/assets/use-cached-selected-values.css +1 -1
  32. package/dist/button.js +3 -3
  33. package/dist/card.js +1 -1
  34. package/dist/checkbox.js +2 -2
  35. package/dist/chunks/{action-bar.Dx12xlEW.js → action-bar.e_2fmyN_.js} +6 -6
  36. package/dist/chunks/{action-bar.Dx12xlEW.js.map → action-bar.e_2fmyN_.js.map} +1 -1
  37. package/dist/chunks/{alert.D2Z_aiFC.js → alert.BcfhueIA.js} +2 -2
  38. package/dist/chunks/{alert.D2Z_aiFC.js.map → alert.BcfhueIA.js.map} +1 -1
  39. package/dist/chunks/{base-button.4UYC3kp2.js → base-button.BeMKxkgK.js} +2 -2
  40. package/dist/chunks/base-button.BeMKxkgK.js.map +1 -0
  41. package/dist/chunks/{base-modal.BrqNR-ah.js → base-modal.UPLi477L.js} +15 -15
  42. package/dist/chunks/{base-modal.BrqNR-ah.js.map → base-modal.UPLi477L.js.map} +1 -1
  43. package/dist/chunks/{button-actions-with-menu.ptKgeQEb.js → button-actions-with-menu.CyNvhDxN.js} +4 -4
  44. package/dist/chunks/{button-actions-with-menu.ptKgeQEb.js.map → button-actions-with-menu.CyNvhDxN.js.map} +1 -1
  45. package/dist/chunks/{button-actions.BIQ3qA8q.js → button-actions.BaypoF5i.js} +3 -3
  46. package/dist/chunks/{button-actions.BIQ3qA8q.js.map → button-actions.BaypoF5i.js.map} +1 -1
  47. package/dist/chunks/{button.CufUNBkv.js → button.Bx8WC-dy.js} +12 -12
  48. package/dist/chunks/button.Bx8WC-dy.js.map +1 -0
  49. package/dist/chunks/{calendar.B9WZ8ub3.js → calendar.LXRuFfcw.js} +2 -2
  50. package/dist/chunks/{calendar.B9WZ8ub3.js.map → calendar.LXRuFfcw.js.map} +1 -1
  51. package/dist/chunks/{card.D9g7fZDX.js → card.INSvvGNH.js} +2 -2
  52. package/dist/chunks/{card.D9g7fZDX.js.map → card.INSvvGNH.js.map} +1 -1
  53. package/dist/chunks/{checkbox-group.Bcqac3y8.js → checkbox-group.BNVnOYKH.js} +4 -4
  54. package/dist/chunks/{checkbox-group.Bcqac3y8.js.map → checkbox-group.BNVnOYKH.js.map} +1 -1
  55. package/dist/chunks/{checkbox.B1qjI4R_.js → checkbox.CcwY2CMn.js} +4 -4
  56. package/dist/chunks/checkbox.CcwY2CMn.js.map +1 -0
  57. package/dist/chunks/{code-snippet.rmKiWrIv.js → code-snippet.Bs7wIGi8.js} +113 -83
  58. package/dist/chunks/code-snippet.Bs7wIGi8.js.map +1 -0
  59. package/dist/chunks/{codemirror.BlV6WO5w.js → codemirror.OjJ-3ixa.js} +4645 -4333
  60. package/dist/chunks/codemirror.OjJ-3ixa.js.map +1 -0
  61. package/dist/chunks/{controls-group.J8shO_JL.js → controls-group.CIdhlTk3.js} +2 -2
  62. package/dist/chunks/{controls-group.J8shO_JL.js.map → controls-group.CIdhlTk3.js.map} +1 -1
  63. package/dist/chunks/{copy.DgzxvExj.js → copy.BakPR7GI.js} +4 -4
  64. package/dist/chunks/{copy.DgzxvExj.js.map → copy.BakPR7GI.js.map} +1 -1
  65. package/dist/chunks/{country.CM5oZOyZ.js → country.BegULkAC.js} +2 -2
  66. package/dist/chunks/{country.CM5oZOyZ.js.map → country.BegULkAC.js.map} +1 -1
  67. package/dist/chunks/{country.types.Br0AjxGy.js → country.types.pilf5B3F.js} +483 -480
  68. package/dist/chunks/{country.types.Br0AjxGy.js.map → country.types.pilf5B3F.js.map} +1 -1
  69. package/dist/chunks/{dashboard-section._KVy37B0.js → dashboard-section.DUN8FB74.js} +4 -4
  70. package/dist/chunks/{dashboard-section._KVy37B0.js.map → dashboard-section.DUN8FB74.js.map} +1 -1
  71. package/dist/chunks/{dashed-underline.DX5QlK14.js → dashed-underline.BDK3yEtw.js} +3 -3
  72. package/dist/chunks/{dashed-underline.DX5QlK14.js.map → dashed-underline.BDK3yEtw.js.map} +1 -1
  73. package/dist/chunks/{data-grid-template.BgTUIoak.js → data-grid-template.BO2v-T1n.js} +3 -3
  74. package/dist/chunks/{data-grid-template.BgTUIoak.js.map → data-grid-template.BO2v-T1n.js.map} +1 -1
  75. package/dist/chunks/{data-grid.sAbzCVND.js → data-grid.NkQC0etq.js} +21 -21
  76. package/dist/chunks/{data-grid.sAbzCVND.js.map → data-grid.NkQC0etq.js.map} +1 -1
  77. package/dist/chunks/{date-picker.DrSWxADA.js → date-picker.DFgjvQgX.js} +5 -5
  78. package/dist/chunks/{date-picker.DrSWxADA.js.map → date-picker.DFgjvQgX.js.map} +1 -1
  79. package/dist/chunks/{date-range-picker.CFIOD59O.js → date-range-picker.BBC3TGYw.js} +9 -9
  80. package/dist/chunks/{date-range-picker.CFIOD59O.js.map → date-range-picker.BBC3TGYw.js.map} +1 -1
  81. package/dist/chunks/{dialog-page.CplkzZGZ.js → dialog-page.Da2cxzZm.js} +3 -3
  82. package/dist/chunks/dialog-page.Da2cxzZm.js.map +1 -0
  83. package/dist/chunks/{dropdown-default-textbox.ZAFh7KqG.js → dropdown-default-textbox.CrylDCEX.js} +87 -75
  84. package/dist/chunks/dropdown-default-textbox.CrylDCEX.js.map +1 -0
  85. package/dist/chunks/{dropdown-tag.Ntdp7P7W.js → dropdown-tag.xVgcIWXL.js} +5 -5
  86. package/dist/chunks/{dropdown-tag.Ntdp7P7W.js.map → dropdown-tag.xVgcIWXL.js.map} +1 -1
  87. package/dist/chunks/{dropdown.DC9un4VJ.js → dropdown.BkLc07G8.js} +185 -181
  88. package/dist/chunks/dropdown.BkLc07G8.js.map +1 -0
  89. package/dist/chunks/{empty-state.B8ZeRgDi.js → empty-state.B6wjtgR0.js} +2 -2
  90. package/dist/chunks/{empty-state.B8ZeRgDi.js.map → empty-state.B6wjtgR0.js.map} +1 -1
  91. package/dist/chunks/{error-message.B7uoqQpq.js → error-message.Brg-AZjT.js} +2 -2
  92. package/dist/chunks/{error-message.B7uoqQpq.js.map → error-message.Brg-AZjT.js.map} +1 -1
  93. package/dist/chunks/{es6.C-HLzYPA.js → es6.D11bE5vq.js} +7 -7
  94. package/dist/chunks/{es6.C-HLzYPA.js.map → es6.D11bE5vq.js.map} +1 -1
  95. package/dist/chunks/file-uploader.BePx7fcJ.js +1879 -0
  96. package/dist/chunks/file-uploader.BePx7fcJ.js.map +1 -0
  97. package/dist/chunks/{filter-bar.Dowrph-Z.js → filter-bar.BbVGpEJx.js} +20 -20
  98. package/dist/chunks/{filter-bar.Dowrph-Z.js.map → filter-bar.BbVGpEJx.js.map} +1 -1
  99. package/dist/chunks/{fixed-scroller.B880PL1J.js → fixed-scroller.BE1hWLr6.js} +2 -2
  100. package/dist/chunks/{fixed-scroller.B880PL1J.js.map → fixed-scroller.BE1hWLr6.js.map} +1 -1
  101. package/dist/chunks/focus-trap.DA_1lCcM.js +495 -0
  102. package/dist/chunks/focus-trap.DA_1lCcM.js.map +1 -0
  103. package/dist/chunks/{footer-actions.B3GJ1wNP.js → footer-actions.O24MYRgM.js} +3 -3
  104. package/dist/chunks/{footer-actions.B3GJ1wNP.js.map → footer-actions.O24MYRgM.js.map} +1 -1
  105. package/dist/chunks/{form-layout-title.BarHgyjC.js → form-layout-title.DRuBsptB.js} +2 -2
  106. package/dist/chunks/{form-layout-title.BarHgyjC.js.map → form-layout-title.DRuBsptB.js.map} +1 -1
  107. package/dist/chunks/header.Bbwnv6Ei.js +205 -0
  108. package/dist/chunks/header.Bbwnv6Ei.js.map +1 -0
  109. package/dist/chunks/{index.Gcw_BUVh.js → index.B5Tq465X.js} +2 -1
  110. package/dist/chunks/{index.Gcw_BUVh.js.map → index.B5Tq465X.js.map} +1 -1
  111. package/dist/chunks/info-icon-with-popover.Cd3RQWUu.js +71 -0
  112. package/dist/chunks/info-icon-with-popover.Cd3RQWUu.js.map +1 -0
  113. package/dist/chunks/{info-icon.p-28zHUJ.js → info-icon.BnSZeQm8.js} +3 -3
  114. package/dist/chunks/{info-icon.p-28zHUJ.js.map → info-icon.BnSZeQm8.js.map} +1 -1
  115. package/dist/chunks/{input-field-password.CgxF9jhq.js → input-field-password.CvKC9xjJ.js} +6 -6
  116. package/dist/chunks/{input-field-password.CgxF9jhq.js.map → input-field-password.CvKC9xjJ.js.map} +1 -1
  117. package/dist/chunks/input-field.Dgop3JWW.js +231 -0
  118. package/dist/chunks/input-field.Dgop3JWW.js.map +1 -0
  119. package/dist/chunks/{inspector.types.DaY6OOzz.js → inspector.types.j1usQ6FN.js} +3 -3
  120. package/dist/chunks/{inspector.types.DaY6OOzz.js.map → inspector.types.j1usQ6FN.js.map} +1 -1
  121. package/dist/chunks/{layout-row.DzS_XyyF.js → layout-row.DAeZh7Rv.js} +4 -4
  122. package/dist/chunks/layout-row.DAeZh7Rv.js.map +1 -0
  123. package/dist/chunks/{link.v-y0fKjn.js → link.B2DE2ryp.js} +6 -6
  124. package/dist/chunks/{link.v-y0fKjn.js.map → link.B2DE2ryp.js.map} +1 -1
  125. package/dist/chunks/{listbox-option-tag.BnX0H4HE.js → listbox-option-tag.drC_50fU.js} +2 -2
  126. package/dist/chunks/{listbox-option-tag.BnX0H4HE.js.map → listbox-option-tag.drC_50fU.js.map} +1 -1
  127. package/dist/chunks/{menu.B78fzH_k.js → menu.DCRfI10M.js} +4 -4
  128. package/dist/chunks/{menu.B78fzH_k.js.map → menu.DCRfI10M.js.map} +1 -1
  129. package/dist/chunks/{modal-fullscreen.DgftXCJe.js → modal-fullscreen.DgDk6uxS.js} +5 -5
  130. package/dist/chunks/{modal-fullscreen.DgftXCJe.js.map → modal-fullscreen.DgDk6uxS.js.map} +1 -1
  131. package/dist/chunks/{modal.BA745pfv.js → modal.B7giFLek.js} +5 -5
  132. package/dist/chunks/{modal.BA745pfv.js.map → modal.B7giFLek.js.map} +1 -1
  133. package/dist/chunks/{pagination.CfwtuZ7R.js → pagination.Dc0VbxFL.js} +3 -3
  134. package/dist/chunks/{pagination.CfwtuZ7R.js.map → pagination.Dc0VbxFL.js.map} +1 -1
  135. package/dist/chunks/{popover.ZlmaSYms.js → popover.D8pR_dbl.js} +4 -4
  136. package/dist/chunks/{popover.ZlmaSYms.js.map → popover.D8pR_dbl.js.map} +1 -1
  137. package/dist/chunks/{popper-container.CnWphJTN.js → popper-container.B9qZTf2V.js} +4 -4
  138. package/dist/chunks/popper-container.B9qZTf2V.js.map +1 -0
  139. package/dist/chunks/{promo-banner.cTUF9seG.js → promo-banner.Dd-JQMUD.js} +3 -3
  140. package/dist/chunks/{promo-banner.cTUF9seG.js.map → promo-banner.Dd-JQMUD.js.map} +1 -1
  141. package/dist/chunks/{radio-group.EnMXbuly.js → radio-group.D5GEIgYv.js} +5 -5
  142. package/dist/chunks/{radio-group.EnMXbuly.js.map → radio-group.D5GEIgYv.js.map} +1 -1
  143. package/dist/chunks/{radio-input.q980f8Uf.js → radio-input.C1DZbkcT.js} +5 -5
  144. package/dist/chunks/radio-input.C1DZbkcT.js.map +1 -0
  145. package/dist/chunks/{search-bar.lYuXPzBX.js → search-bar.BN4grqVO.js} +3 -3
  146. package/dist/chunks/{search-bar.lYuXPzBX.js.map → search-bar.BN4grqVO.js.map} +1 -1
  147. package/dist/chunks/{secondary-nav.CF6WPYn4.js → secondary-nav.C8UE8xly.js} +7 -7
  148. package/dist/chunks/{secondary-nav.CF6WPYn4.js.map → secondary-nav.C8UE8xly.js.map} +1 -1
  149. package/dist/chunks/{segmented-control.CVeUROYR.js → segmented-control.C6HPgkVm.js} +2 -2
  150. package/dist/chunks/{segmented-control.CVeUROYR.js.map → segmented-control.C6HPgkVm.js.map} +1 -1
  151. package/dist/chunks/{selection-card-group.CjuBQ2UA.js → selection-card-group.BT7FOlbF.js} +6 -6
  152. package/dist/chunks/{selection-card-group.CjuBQ2UA.js.map → selection-card-group.BT7FOlbF.js.map} +1 -1
  153. package/dist/chunks/{sidepanel.NUx7L5f1.js → sidepanel.PEMSN4Hj.js} +10 -10
  154. package/dist/chunks/{sidepanel.NUx7L5f1.js.map → sidepanel.PEMSN4Hj.js.map} +1 -1
  155. package/dist/chunks/{step.5g9BIi15.js → step.Dq4w23dP.js} +2 -2
  156. package/dist/chunks/{step.5g9BIi15.js.map → step.Dq4w23dP.js.map} +1 -1
  157. package/dist/chunks/{structured-list-item.BEhWyaVP.js → structured-list-item.-ch3UkPz.js} +5 -5
  158. package/dist/chunks/{structured-list-item.BEhWyaVP.js.map → structured-list-item.-ch3UkPz.js.map} +1 -1
  159. package/dist/chunks/{summary-grid-item-custom.CSXo4NjY.js → summary-grid-item-custom.CLVYmhnp.js} +4 -4
  160. package/dist/chunks/{summary-grid-item-custom.CSXo4NjY.js.map → summary-grid-item-custom.CLVYmhnp.js.map} +1 -1
  161. package/dist/chunks/{tabs.Casntai-.js → tabs.B0f1qiMR.js} +3 -3
  162. package/dist/chunks/{tabs.Casntai-.js.map → tabs.B0f1qiMR.js.map} +1 -1
  163. package/dist/chunks/{tag.wTXg-O7i.js → tag.d36UYSWd.js} +2 -2
  164. package/dist/chunks/{tag.wTXg-O7i.js.map → tag.d36UYSWd.js.map} +1 -1
  165. package/dist/chunks/{textarea.F-JyRtIw.js → textarea.DORWuAZn.js} +3 -3
  166. package/dist/chunks/{textarea.F-JyRtIw.js.map → textarea.DORWuAZn.js.map} +1 -1
  167. package/dist/chunks/{timeline-item.BJyB8-Wv.js → timeline-item.CUm_n51y.js} +7 -7
  168. package/dist/chunks/timeline-item.CUm_n51y.js.map +1 -0
  169. package/dist/chunks/{toast.BEipTIrz.js → toast.DCaWC_wv.js} +2 -2
  170. package/dist/chunks/{toast.BEipTIrz.js.map → toast.DCaWC_wv.js.map} +1 -1
  171. package/dist/chunks/{toggle-button.CYplDIO-.js → toggle-button.DJqs599a.js} +2 -2
  172. package/dist/chunks/{toggle-button.CYplDIO-.js.map → toggle-button.DJqs599a.js.map} +1 -1
  173. package/dist/chunks/{tooltip.DH8TqpYV.js → tooltip.CQGwmwt9.js} +2 -2
  174. package/dist/chunks/{tooltip.DH8TqpYV.js.map → tooltip.CQGwmwt9.js.map} +1 -1
  175. package/dist/chunks/{tutorial.DFvMZAN5.js → tutorial.B_8XNKvM.js} +5 -5
  176. package/dist/chunks/{tutorial.DFvMZAN5.js.map → tutorial.B_8XNKvM.js.map} +1 -1
  177. package/dist/chunks/{use-cached-selected-values.BiqVX5O7.js → use-cached-selected-values.DJl7FKT5.js} +8 -8
  178. package/dist/chunks/use-cached-selected-values.DJl7FKT5.js.map +1 -0
  179. package/dist/chunks/{use-country-items.C25TI6tp.js → use-country-items.DPBbl1KK.js} +2 -2
  180. package/dist/chunks/{use-country-items.C25TI6tp.js.map → use-country-items.DPBbl1KK.js.map} +1 -1
  181. package/dist/code-snippet.js +1 -1
  182. package/dist/country.js +2 -2
  183. package/dist/dashboard-template.js +1 -1
  184. package/dist/dashed-underline.js +1 -1
  185. package/dist/data-grid-template.js +1 -1
  186. package/dist/data-grid.js +1 -1
  187. package/dist/date-picker.js +2 -2
  188. package/dist/date-range-picker.js +2 -2
  189. package/dist/dropdown.js +4 -4
  190. package/dist/empty-state.js +1 -1
  191. package/dist/file-uploader.js +1 -1
  192. package/dist/filter-bar.js +1 -1
  193. package/dist/focus-trap.js +1 -1
  194. package/dist/form-layout.js +1 -1
  195. package/dist/header.js +1 -1
  196. package/dist/index.js +57 -57
  197. package/dist/info-icon.js +1 -1
  198. package/dist/input-field-password.js +1 -1
  199. package/dist/input-field.js +1 -1
  200. package/dist/inspector.js +1 -1
  201. package/dist/internal.js +27 -25
  202. package/dist/internal.js.map +1 -1
  203. package/dist/layout.js +1 -1
  204. package/dist/link.js +1 -1
  205. package/dist/menu.js +1 -1
  206. package/dist/modal-fullscreen.js +1 -1
  207. package/dist/modal.js +2 -2
  208. package/dist/pagination.js +1 -1
  209. package/dist/popover.js +1 -1
  210. package/dist/popper-container.js +1 -1
  211. package/dist/promo-banner.js +1 -1
  212. package/dist/radio-group.js +2 -2
  213. package/dist/search-bar.js +2 -2
  214. package/dist/secondary-nav.js +1 -1
  215. package/dist/segmented-control.js +1 -1
  216. package/dist/selection-card.js +1 -1
  217. package/dist/sidepanel.js +1 -1
  218. package/dist/stepper.js +1 -1
  219. package/dist/structured-list.js +1 -1
  220. package/dist/styles/bento-dark.css +1 -0
  221. package/dist/styles/bento-light.css +1 -0
  222. package/dist/styles/bento.css +1 -0
  223. package/dist/styles/legacy.css +6 -5
  224. package/dist/styles/styleguide.css +1 -0
  225. package/dist/summary-grid.js +1 -1
  226. package/dist/tabs.js +1 -1
  227. package/dist/tag.js +1 -1
  228. package/dist/textarea.js +1 -1
  229. package/dist/timeline.js +1 -1
  230. package/dist/toast.js +1 -1
  231. package/dist/tutorial.js +1 -1
  232. package/dist/web-types.json +4 -4
  233. package/package.json +13 -8
  234. package/dist/chunks/base-button.4UYC3kp2.js.map +0 -1
  235. package/dist/chunks/button.CufUNBkv.js.map +0 -1
  236. package/dist/chunks/checkbox.B1qjI4R_.js.map +0 -1
  237. package/dist/chunks/code-snippet.rmKiWrIv.js.map +0 -1
  238. package/dist/chunks/codemirror.BlV6WO5w.js.map +0 -1
  239. package/dist/chunks/dialog-page.CplkzZGZ.js.map +0 -1
  240. package/dist/chunks/dropdown-default-textbox.ZAFh7KqG.js.map +0 -1
  241. package/dist/chunks/dropdown.DC9un4VJ.js.map +0 -1
  242. package/dist/chunks/file-uploader.ItCr8Ezn.js +0 -729
  243. package/dist/chunks/file-uploader.ItCr8Ezn.js.map +0 -1
  244. package/dist/chunks/focus-trap.DSkLNO_i.js +0 -443
  245. package/dist/chunks/focus-trap.DSkLNO_i.js.map +0 -1
  246. package/dist/chunks/header.BLjdXtYJ.js +0 -266
  247. package/dist/chunks/header.BLjdXtYJ.js.map +0 -1
  248. package/dist/chunks/input-field.CcjqGkLs.js +0 -228
  249. package/dist/chunks/input-field.CcjqGkLs.js.map +0 -1
  250. package/dist/chunks/layout-row.DzS_XyyF.js.map +0 -1
  251. package/dist/chunks/popper-container.CnWphJTN.js.map +0 -1
  252. package/dist/chunks/radio-input.q980f8Uf.js.map +0 -1
  253. package/dist/chunks/timeline-item.BJyB8-Wv.js.map +0 -1
  254. package/dist/chunks/use-cached-selected-values.BiqVX5O7.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-uploader.ItCr8Ezn.js","sources":["../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/upload.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/bin.vue","../../src/components/file-uploader/components/file-uploader-file-card/composables/use-truncated-file-name.ts","../../src/components/file-uploader/utils/format-file-size/format-file-size.ts","../../src/components/file-uploader/file-uploader.types.ts","../../src/components/file-uploader/utils/get-file-type/get-file-type.ts","../../src/components/file-uploader/utils/read-file/read-file.ts","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/attachment.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/collection.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/document-1.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/document-lines.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/folder.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/image.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/play-circle.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/sound.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/table.vue","../../src/components/file-uploader/components/file-uploader-file-card/utils/get-file-icon/get-file-icon.ts","../../src/components/file-uploader/components/file-uploader-file-card/utils/get-file-icon-color/get-file-icon-color.ts","../../src/components/file-uploader/components/file-uploader-file-card/file-uploader-file-card.vue","../../src/components/file-uploader/components/file-uploader-restrictions/file-uploader-restrictions.vue","../../src/components/file-uploader/composables/use-file-type-list/use-file-type-list.ts","../../src/components/file-uploader/file-uploader.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M8.00011 0.939453L12.0608 5.00011L11.0001 6.06077L8.75 3.81066V11.75H7.25V3.81089L5.00011 6.06077L3.93945 5.00011L8.00011 0.939453Z\"/><path fill=\"#00112C\" d=\"M2.75 12.5V10.25H1.25V12.5C1.25 13.0967 1.48705 13.669 1.90901 14.091C2.33097 14.5129 2.90326 14.75 3.5 14.75H12.5C13.0967 14.75 13.669 14.5129 14.091 14.091C14.5129 13.669 14.75 13.0967 14.75 12.5V10.25H13.25V12.5C13.25 12.6989 13.171 12.8897 13.0303 13.0303C12.8897 13.171 12.6989 13.25 12.5 13.25H3.5C3.30109 13.25 3.11032 13.171 2.96967 13.0303C2.82902 12.8897 2.75 12.6989 2.75 12.5Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M7.25 6.25H5.75V12.75H7.25V6.25Z\"/><path fill=\"#00112C\" d=\"M8.75 6.25H10.25V12.75H8.75V6.25Z\"/><path fill=\"#00112C\" d=\"M14.75 3.24999H12.54L12.05 1.74999C11.9 1.29999 11.61 0.92999 11.22 0.64999C10.83 0.37999 10.34 0.24999 9.92 0.23999H6.09C5.64 0.23999 5.17 0.37999 4.78 0.64999C4.39 0.91999 4.11 1.29999 3.95 1.75999L3.46 3.23999H1.25V4.73999H2.32L3.14 13.7C3.19 14.26 3.45 14.78 3.86 15.16C4.27 15.54 4.81 15.75 5.37 15.75H10.64C11.2 15.75 11.74 15.54 12.15 15.16C12.57 14.78 12.82 14.26 12.87 13.7L13.69 4.73999H14.76V3.23999L14.75 3.24999ZM5.37 2.24999C5.42 2.09999 5.52 1.97999 5.64 1.88999C5.77 1.79999 5.92 1.74999 6.08 1.75999H9.93C10.08 1.75999 10.23 1.80999 10.35 1.88999C10.48 1.97999 10.57 2.09999 10.62 2.23999L10.95 3.25999H5.02L5.35 2.25999L5.37 2.24999ZM11.37 13.58C11.35 13.77 11.27 13.94 11.13 14.06C10.99 14.19 10.81 14.25 10.63 14.25H5.36C5.17 14.25 5 14.18 4.86 14.06C4.72 13.93 4.64 13.76 4.62 13.57L3.81 4.74999H12.17L11.36 13.57L11.37 13.58Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","import { VueInstance } from '@/types';\nimport { onMounted, onUnmounted, ref, Ref } from 'vue';\n\n/**\n * Verifies if the content defined is being truncated when it is overflowing the container.\n *\n * @param target Element that contains the text to be truncated\n * @param container Scrollable container that defines the boundaries\n * @returns Boolean indicating whether or not the content will be truncated\n */\nexport function useTruncatedFileName(target: Ref<VueInstance>, container: Ref<HTMLElement>) {\n const isContainerTruncating = ref<boolean>(false);\n let observer: IntersectionObserver;\n\n function disconnectObserver() {\n if (observer) {\n observer.disconnect();\n }\n }\n\n onUnmounted(() => {\n disconnectObserver();\n });\n\n onMounted(() => {\n disconnectObserver();\n\n observer = new IntersectionObserver(\n entries => {\n isContainerTruncating.value = !entries[0].isIntersecting;\n },\n {\n root: container.value,\n threshold: 1.0,\n }\n );\n\n observer.observe(target.value.$el);\n });\n\n return isContainerTruncating;\n}\n","const UNITS = ['byte', 'kilobyte', 'megabyte', 'gigabyte', 'terabyte', 'petabyte'];\n\n/**\n * Converts size in bytes to a human readable format.\n * For example, it transforms \"1000\" to \"1kB\"\n *\n * @param locale App's set locale (e.g. en, es, pt-BR)\n * @param size Size of file\n * @returns Size of file using metrics\n */\nexport function formatFileSize(locale: string, size: number) {\n let unitIndex = 0;\n let bytes = size;\n\n while (bytes >= 1000 && unitIndex < UNITS.length - 1) {\n bytes /= 1000;\n unitIndex++;\n }\n\n return new Intl.NumberFormat(locale, {\n style: 'unit',\n unit: UNITS[unitIndex],\n unitDisplay: 'short', // Displays as \"kB\" instead of \"kilobytes\"\n maximumFractionDigits: 2, // Limits to 2 decimal places\n }).format(bytes);\n}\n","export type BentoFileUploaderValue = string | Array<string> | File | Array<File>;\nexport interface BentoFileUploaderProps {\n /**\n * A string that defines the file types the file input should accept.\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept\n */\n accept?: HTMLInputElement['accept'];\n\n /**\n * Reduces the size of the uploader area.\n */\n condensed?: boolean;\n\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description?: string;\n\n /**\n * Disable the radio button (optional).\n */\n disabled?: boolean;\n\n /**\n * Renders file-uploader with an error state and the error message beneath the input box\n */\n errorMessage?: string;\n\n /**\n * The label of the component.\n */\n label: string;\n\n /**\n * Sets a maximum file count. Allows for uploading multiple files.\n */\n maxCount?: number;\n\n /**\n * Sets a maximum image size (for image file types only).\n */\n maxDimensions?: { width?: number; height?: number };\n\n /**\n * Sets a maximum file size in Bytes\n */\n maxSize?: number;\n\n /**\n * Used to support `v-model`. Doesn't actually set the value of the file uploader.\n */\n modelValue?: BentoFileUploaderValue;\n\n /**\n * Sets the field as optional.\n */\n optional?: boolean;\n\n /**\n * Sets the field as required.\n */\n required?: boolean;\n\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText?: string;\n}\n\n/**\n * Private types\n */\nexport enum FileState {\n LOADING = 'loading',\n SUCCESS = 'success',\n ERROR = 'error',\n}\n\nexport enum FileErrorType {\n ERROR_SIZE = 'error-size',\n ERROR_LOAD = 'error-load',\n ERROR_DIMENSIONS = 'error-dimensions',\n ERROR_TYPE = 'error-type',\n}\n\nexport enum FileUploaderState {\n DISABLED = 'disabled',\n DRAG_OVER = 'drag-over',\n ERROR = 'error',\n READONLY = 'readonly',\n}\n\nexport enum FileType {\n TABLE = 'table',\n IMAGE = 'image',\n VIDEO = 'video',\n AUDIO = 'audio',\n TEXT = 'text',\n PDF = 'pdf',\n SLIDES = 'slides',\n COMPRESSED = 'compressed',\n GENERIC = 'generic',\n}\n\nexport interface FileObject {\n id: string;\n data: File;\n state: FileState;\n errors: Array<FileErrorType>;\n type: FileType;\n progress: number | null;\n dimensions?: { width: number; height: number };\n}\n\nexport type SupportedFileTypes = string;\n","import { FileType } from '@/components/file-uploader/file-uploader.types';\n\nconst textFileExtraTypes = [\n 'application/msword', // .doc\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', // .docx\n 'application/rtf', // .rtf\n];\n\nconst tableFileTypes = [\n 'application/vnd.ms-excel', // .xls\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', // .xlsx\n 'application/vnd.oasis.opendocument.spreadsheet', //.ods\n 'application/vnd.apple.numbers', // .numbers\n 'application/x-iwork-numbers-sffnumbers', // .numbers\n 'text/csv', // .csv\n];\n\nconst slidesFileTypes = [\n 'application/vnd.ms-powerpoint', // .ppt\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation', // .pptx\n 'application/vnd.oasis.opendocument.presentation', // .odp\n];\n\nconst compressedFileTypes = [\n 'application/zip', // .zip\n 'application/vnd.rar', // .rar\n 'application/x-7z-compressed', // .7z\n 'application/gzip', // .gz, .tar.gz, .tgz\n 'application/x-tar', // .tar\n 'application/x-bzip2', // .bz2\n 'application/x-xz', // .xz\n 'application/x-lzma', // .lzma\n 'application/x-compress', // .Z\n 'application/vnd.ms-cab-compressed', // .cab\n];\n\n/**\n * Categorizes the type of a file. Maps all types of text, image, video,\n * audio and documents to an specific category such as \"text/*\" or \"image/*\" respectively\n * @param file File to be typed\n * @returns Type category of the file being uploaded\n */\nexport function getFileType(file: File) {\n if (tableFileTypes.includes(file.type)) {\n return FileType.TABLE;\n }\n\n if (file.type.startsWith('text/') || textFileExtraTypes.includes(file.type)) {\n return FileType.TEXT;\n }\n\n if (file.type.startsWith('image/')) {\n return FileType.IMAGE;\n }\n\n if (file.type.startsWith('video/')) {\n return FileType.VIDEO;\n }\n\n if (file.type.startsWith('audio/')) {\n return FileType.AUDIO;\n }\n\n if (file.type === 'application/pdf') {\n return FileType.PDF;\n }\n\n if (slidesFileTypes.includes(file.type)) {\n return FileType.SLIDES;\n }\n\n if (compressedFileTypes.includes(file.type)) {\n return FileType.COMPRESSED;\n }\n\n return FileType.GENERIC;\n}\n","import { FileErrorType, type FileObject, FileState, FileType } from '@/components/file-uploader/file-uploader.types';\n\n/**\n * Validates if a File has the correct type accepted for the current instance of\n * BentoFileUploader.\n *\n * @param file File being processed\n * @param accept HTML MIME types valid for the file to be processed\n * @returns Whether or not the file has the right type\n */\nfunction isFileTypeAccepted(file: File, accept?: string) {\n if (!accept) {\n return true;\n }\n\n // Split accept attribute into individual rules (e.g., 'image/*', '.png')\n const acceptPatterns = accept.split(',').map(type => type.trim());\n\n for (const pattern of acceptPatterns) {\n if (pattern.startsWith('.')) {\n // Check for file extension\n if (file.name.endsWith(pattern)) {\n return true;\n }\n } else if (pattern.endsWith('/*')) {\n // Check for type category (e.g., 'image/*')\n const category = pattern.split('/')[0];\n if (file.type.startsWith(category)) {\n return true;\n }\n } else {\n // Check for exact MIME type match\n if (file.type === pattern) {\n return true;\n }\n }\n }\n\n return false; // No matches found\n}\n\n/**\n * Process a file to verify if it fulfills the accepted type restrictions defined in \"accept\",\n * the dimensions for \"image/*\" types defined by \"maxDimensions\". The state of the \"fileObject\" will\n * be updated according to the restrictions or if it was successfully uploaded.\n *\n * @param fileObject File to be processed\n * @param accept HTML MIME types valid for the file to be processed\n * @param maxDimensions Width and height restrictions for \"image/*\" files\n */\nexport function readFile(\n fileObject: FileObject,\n accept?: string,\n maxDimensions?: { width?: number; height?: number }\n): void {\n const reader = new FileReader();\n // Can't be cloned because the events are async\n const file = fileObject; // avoid ESLint no-param-reassign\n\n // Verify file type - skip the rest if invalid\n if (!isFileTypeAccepted(file.data, accept)) {\n file.state = FileState.ERROR;\n file.errors.push(FileErrorType.ERROR_TYPE);\n return;\n }\n\n reader.onload = event => {\n if (maxDimensions && file.type === FileType.IMAGE) {\n const blob = new Blob([event.target.result], { type: file.data.type });\n const url = URL.createObjectURL(blob);\n const img = new Image();\n\n img.onload = function () {\n if (img.width > maxDimensions.width || img.height > maxDimensions.height) {\n file.state = FileState.ERROR;\n file.errors.push(FileErrorType.ERROR_DIMENSIONS);\n }\n URL.revokeObjectURL(url);\n };\n\n img.onerror = function () {\n URL.revokeObjectURL(url);\n };\n\n img.src = url;\n }\n };\n\n reader.onprogress = event => {\n if (event.lengthComputable) {\n file.progress = (event.loaded / event.total) * 100;\n }\n };\n\n reader.onloadend = () => {\n if (file.state !== FileState.ERROR) {\n file.state = FileState.SUCCESS;\n }\n\n file.progress = null;\n };\n\n reader.onerror = () => {\n file.state = FileState.ERROR;\n file.errors.push(FileErrorType.ERROR_LOAD);\n file.progress = null;\n };\n\n reader.readAsArrayBuffer(file.data);\n}\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><g :clip-path=\"'url(#uia-icons-16-attachment__a' + uuid + ')'\"><path fill=\"#00112C\" d=\"M12.866 4.09026C11.5689 2.79315 9.4638 2.79315 8.1667 4.09026L2.7267 9.53026C1.95959 10.2974 1.95959 11.5425 2.7267 12.3096C3.49381 13.0767 4.73893 13.0767 5.50604 12.3096L10.946 6.8696C11.1831 6.63249 11.1831 6.24737 10.946 6.01026C10.7089 5.77316 10.3238 5.77316 10.0867 6.01026L4.75637 11.3406L3.69571 10.2799L9.02604 4.9496C9.84893 4.12671 11.1838 4.12671 12.0067 4.9496C12.8296 5.7725 12.8296 7.10737 12.0067 7.93026L6.5667 13.3703C5.2138 14.7232 3.01893 14.7232 1.66604 13.3703C0.313144 12.0174 0.313144 9.82249 1.66604 8.4696L7.10604 3.0296C8.98893 1.14671 12.0438 1.14671 13.9267 3.0296C15.8096 4.91249 15.8096 7.96737 13.9267 9.85026L11.1564 12.6206L10.0957 11.5599L12.866 8.7896C14.1631 7.49249 14.1631 5.38737 12.866 4.09026Z\"/></g><defs><clipPath :id=\"'uia-icons-16-attachment__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M13.75 9.58159C14.3412 9.30073 14.75 8.6981 14.75 8V2C14.75 1.0335 13.9665 0.25 13 0.25H3C2.0335 0.25 1.25 1.0335 1.25 2V8C1.25 8.6981 1.65876 9.30073 2.25 9.58159V11C2.25 11.4641 2.43438 11.9092 2.76256 12.2374C2.90555 12.3804 3.07072 12.4961 3.25 12.5811V14C3.25 14.4641 3.43438 14.9092 3.76256 15.2374C4.09075 15.5656 4.53587 15.75 5 15.75H11C11.4641 15.75 11.9092 15.5656 12.2374 15.2374C12.5656 14.9092 12.75 14.4641 12.75 14V12.5811C12.9293 12.4961 13.0945 12.3804 13.2374 12.2374C13.5656 11.9092 13.75 11.4641 13.75 11V9.58159ZM3 1.75H13C13.1381 1.75 13.25 1.86193 13.25 2V8C13.25 8.13807 13.1381 8.25 13 8.25H3C2.86193 8.25 2.75 8.13807 2.75 8V2C2.75 1.86193 2.86193 1.75 3 1.75ZM12.25 9.75V11C12.25 11.0663 12.2237 11.1299 12.1768 11.1768C12.1299 11.2237 12.0663 11.25 12 11.25H4C3.9337 11.25 3.87011 11.2237 3.82322 11.1768C3.77634 11.1299 3.75 11.0663 3.75 11V9.75H12.25ZM11.25 12.75V14C11.25 14.0663 11.2237 14.1299 11.1768 14.1768C11.1299 14.2237 11.0663 14.25 11 14.25H5C4.9337 14.25 4.87011 14.2237 4.82322 14.1768C4.77634 14.1299 4.75 14.0663 4.75 14V12.75H11.25Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M13.75 13.5C13.75 14.7442 12.7442 15.75 11.5 15.75H4.5C3.25579 15.75 2.25 14.7442 2.25 13.5V2.5C2.25 1.25579 3.25579 0.25 4.5 0.25H9.31055L13.75 4.68728V13.5ZM3.75 2.5V13.5C3.75 13.9158 4.08421 14.25 4.5 14.25H11.5C11.9158 14.25 12.25 13.9158 12.25 13.5V6.75H9.5C8.25736 6.75 7.25 5.74264 7.25 4.5V1.75H4.5C4.08421 1.75 3.75 2.08421 3.75 2.5ZM8.75 1.81052V4.5C8.75 4.91421 9.08579 5.25 9.5 5.25H12.1912L8.75 1.81052Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M10.7461 8.25V9.75H5.24609V8.25H10.7461Z\"/><path fill=\"#00112C\" d=\"M5.24609 11.25H10.7461V12.75H5.24609V11.25Z\"/><path fill=\"#00112C\" d=\"M13.7461 13.5C13.7461 14.7442 12.7403 15.75 11.4961 15.75H4.49609C3.25188 15.75 2.24609 14.7442 2.24609 13.5V2.5C2.24609 1.25579 3.25188 0.25 4.49609 0.25H9.30665L13.7461 4.68728V13.5ZM3.74609 2.5V13.5C3.74609 13.9158 4.08031 14.25 4.49609 14.25H11.4961C11.9119 14.25 12.2461 13.9158 12.2461 13.5V6.75H9.49609C8.25345 6.75 7.24609 5.74264 7.24609 4.5V1.75H4.49609C4.08031 1.75 3.74609 2.08421 3.74609 2.5ZM8.74609 1.81052V4.5C8.74609 4.91421 9.08188 5.25 9.49609 5.25H12.1873L8.74609 1.81052Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M1.24609 4.5C1.24609 3.25579 2.25188 2.25 3.49609 2.25H6.37609C6.97727 2.25 7.54738 2.49062 7.96642 2.90967L10.0864 5.02967C10.2274 5.17062 10.4173 5.25 10.6161 5.25H12.4961C13.7403 5.25 14.7461 6.25579 14.7461 7.5V12.5C14.7461 13.7442 13.7403 14.75 12.4961 14.75H3.49609C2.25188 14.75 1.24609 13.7442 1.24609 12.5V4.5ZM3.49609 3.75C3.08031 3.75 2.74609 4.08421 2.74609 4.5V12.5C2.74609 12.9158 3.08031 13.25 3.49609 13.25H12.4961C12.9119 13.25 13.2461 12.9158 13.2461 12.5V7.5C13.2461 7.08421 12.9119 6.75 12.4961 6.75H10.6161C10.0149 6.75 9.44481 6.50938 9.02576 6.09033L6.90576 3.97033C6.76481 3.82938 6.57492 3.75 6.37609 3.75H3.49609Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M9.99609 3.24805C8.47731 3.24805 7.24609 4.47926 7.24609 5.99805C7.24609 7.51683 8.47731 8.74805 9.99609 8.74805C11.5149 8.74805 12.7461 7.51683 12.7461 5.99805C12.7461 4.47926 11.5149 3.24805 9.99609 3.24805ZM8.74609 5.99805C8.74609 5.30769 9.30574 4.74805 9.99609 4.74805C10.6865 4.74805 11.2461 5.30769 11.2461 5.99805C11.2461 6.6884 10.6865 7.24805 9.99609 7.24805C9.30574 7.24805 8.74609 6.6884 8.74609 5.99805Z\"/><path fill=\"#00112C\" d=\"M1.24609 3.49805C1.24609 2.25541 2.25345 1.24805 3.49609 1.24805H12.4961C13.7387 1.24805 14.7461 2.25541 14.7461 3.49805V12.498C14.7461 13.7407 13.7387 14.748 12.4961 14.748H3.49609C2.25345 14.748 1.24609 13.7407 1.24609 12.498V3.49805ZM3.49609 2.74805C3.08188 2.74805 2.74609 3.08383 2.74609 3.49805V6.68756L3.99615 5.4375L11.8067 13.248H12.4961C12.9103 13.248 13.2461 12.9123 13.2461 12.498V3.49805C13.2461 3.08383 12.9103 2.74805 12.4961 2.74805H3.49609ZM2.74609 12.498C2.74609 12.9123 3.08188 13.248 3.49609 13.248H9.68538L3.99615 7.55882L2.74609 8.80888V12.498Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><g fill=\"#00112C\" :clip-path=\"'url(#uia-icons-16-play_circle__a' + uuid + ')'\"><path d=\"M10.9722 8.00002L6.62012 5.09863V10.9014L10.9722 8.00002Z\"/><path d=\"M5.0342 0.839937C6.45033 0.253358 8.0086 0.0998821 9.51195 0.398918C11.0153 0.697953 12.3962 1.43607 13.4801 2.51993C14.5639 3.60378 15.3021 4.9847 15.6011 6.48805C15.9001 7.99141 15.7466 9.54967 15.1601 10.9658C14.5735 12.3819 13.5801 13.5923 12.3057 14.4439C11.0312 15.2955 9.53281 15.75 8 15.75C5.94457 15.75 3.97333 14.9335 2.51992 13.4801C1.06652 12.0267 0.25 10.0554 0.25 8C0.25 6.4672 0.704529 4.96881 1.55611 3.69433C2.40769 2.41985 3.61808 1.42652 5.0342 0.839937ZM9.21931 1.8701C8.00693 1.62894 6.75027 1.75271 5.60823 2.22576C4.46619 2.6988 3.49007 3.49988 2.80331 4.52769C2.11656 5.5555 1.75 6.76387 1.75 8C1.75 9.65761 2.40848 11.2473 3.58058 12.4194C4.75268 13.5915 6.3424 14.25 8 14.25C9.23613 14.25 10.4445 13.8834 11.4723 13.1967C12.5001 12.5099 13.3012 11.5338 13.7742 10.3918C14.2473 9.24974 14.3711 7.99307 14.1299 6.78069C13.8887 5.56831 13.2935 4.45466 12.4194 3.58059C11.5453 2.70651 10.4317 2.11125 9.21931 1.8701Z\"/></g><defs><clipPath :id=\"'uia-icons-16-play_circle__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M5.68934 2.25H8.75V13.75H5.68934L2.68934 10.75H0.25V5.25H2.68934L5.68934 2.25ZM6.31066 3.75L3.31066 6.75H1.75V9.25H3.31066L6.31066 12.25H7.25V3.75H6.31066Z\"/><path fill=\"#00112C\" d=\"M13.0111 4.99174C12.2099 4.19982 11.1294 3.75 10 3.75V2.25C11.53 2.25 12.9888 2.85964 14.0675 3.92684L14.0703 3.92966C15.1527 5.01199 15.75 6.47347 15.75 8C15.75 9.52995 15.1404 10.9888 14.0732 12.0675L14.0703 12.0703C12.988 13.1527 11.5265 13.75 10 13.75V12.25C11.1328 12.25 12.2107 11.8079 13.0082 11.0111C13.8002 10.21 14.25 9.1294 14.25 8C14.25 6.8672 13.8079 5.78927 13.0111 4.99174Z\"/><path fill=\"#00112C\" d=\"M10 6.75V5.25C10.7257 5.25 11.4295 5.53694 11.9438 6.06319C12.4593 6.58041 12.75 7.26849 12.75 8C12.75 8.72573 12.4631 9.42951 11.9368 9.94383C11.4196 10.4593 10.7315 10.75 10 10.75V9.25C10.3268 9.25 10.6373 9.12206 10.8797 8.87967L10.8868 8.87265C11.1182 8.64727 11.25 8.33261 11.25 8C11.25 7.67317 11.1221 7.36272 10.8797 7.12033L10.8726 7.11321C10.6473 6.88175 10.3326 6.75 10 6.75Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M3.5 1.25L3.49505 1.25002C2.90084 1.25394 2.33208 1.49173 1.91191 1.91191C1.49173 2.33208 1.25392 2.90084 1.25 3.49505V12.5C1.25 13.0967 1.48705 13.669 1.90901 14.091C2.33097 14.5129 2.90326 14.75 3.5 14.75H12.5C13.0967 14.75 13.669 14.5129 14.091 14.091C14.5129 13.669 14.75 13.0967 14.75 12.5V3.5C14.75 2.90326 14.5129 2.33097 14.091 1.90901C13.669 1.48705 13.0967 1.25 12.5 1.25H3.5ZM5.25 2.75V5.25H2.75V3.5029C2.75185 3.30382 2.83175 3.11338 2.97257 2.97257C3.11338 2.83175 3.30382 2.75185 3.5029 2.75H5.25ZM5.25 6.75V9.25H2.75V6.75H5.25ZM6.75 9.25V6.75H13.25V9.25H6.75ZM5.25 10.75V13.25H3.5C3.30109 13.25 3.11032 13.171 2.96967 13.0303C2.82902 12.8897 2.75 12.6989 2.75 12.5V10.75H5.25ZM6.75 13.25V10.75H13.25V12.5C13.25 12.6989 13.171 12.8897 13.0303 13.0303C12.8897 13.171 12.6989 13.25 12.5 13.25H6.75ZM6.75 5.25V2.75H12.5C12.6989 2.75 12.8897 2.82902 13.0303 2.96967C13.171 3.11032 13.25 3.30109 13.25 3.5V5.25H6.75Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","import { VueNodeElement } from '@/types';\nimport { type FileObject, FileType } from '@/components/file-uploader/file-uploader.types';\n\nimport AttachmentIcon from '@adyen/ui-assets-icons-16/vue/attachment';\nimport CollectionIcon from '@adyen/ui-assets-icons-16/vue/collection';\nimport DocumentIcon from '@adyen/ui-assets-icons-16/vue/document-1';\nimport DocumentLinesIcon from '@adyen/ui-assets-icons-16/vue/document-lines';\nimport FolderIcon from '@adyen/ui-assets-icons-16/vue/folder';\nimport ImageIcon from '@adyen/ui-assets-icons-16/vue/image';\nimport PlayCircleIcon from '@adyen/ui-assets-icons-16/vue/play-circle';\nimport SoundIcon from '@adyen/ui-assets-icons-16/vue/sound';\nimport TableIcon from '@adyen/ui-assets-icons-16/vue/table';\n\nconst FILE_TYPE_ICON_MAP: Record<FileType, VueNodeElement> = {\n [FileType.AUDIO]: SoundIcon,\n [FileType.COMPRESSED]: FolderIcon,\n [FileType.GENERIC]: AttachmentIcon,\n [FileType.IMAGE]: ImageIcon,\n [FileType.PDF]: DocumentIcon,\n [FileType.SLIDES]: CollectionIcon,\n [FileType.TABLE]: TableIcon,\n [FileType.TEXT]: DocumentLinesIcon,\n [FileType.VIDEO]: PlayCircleIcon,\n};\n\n/**\n * Return an icon Vue component that can be used with a given File type @see FileType\n * @param file File object containing a type\n * @returns Icon for the respective type\n */\nexport function getFileIcon(file: FileObject) {\n return FILE_TYPE_ICON_MAP[file.type];\n}\n","import { type FileObject, FileType } from '@/components/file-uploader/file-uploader.types';\n\n/**\n * Returns the color to be used for the icon of a given type.\n *\n * @param file File with a given type\n * @returns Color to be used with their respective file type\n */\nexport function getFileIconColor(file: FileObject) {\n switch (file.type) {\n case FileType.COMPRESSED:\n case FileType.GENERIC:\n return 'grey';\n case FileType.PDF:\n case FileType.SLIDES:\n return 'orange';\n case FileType.TEXT:\n return 'blue';\n default:\n return 'green';\n }\n}\n","<template>\n <div class=\"b-file-uploader-file-card\" :class=\"conditionalClasses\">\n <div class=\"b-file-uploader-file-card__details\">\n <div class=\"b-file-uploader-file-card__info\">\n <file-uploader-file-card-animation\n :name=\"\n isVue2 ? 'b-file-uploader-file-card__animation' : 'b-file-uploader-file-card__animation--vue3'\n \"\n :show-file-icon=\"showFileIcon\"\n >\n <component\n :is=\"fileUploaderIcon\"\n :key=\"JSON.stringify(fileUploaderIcon)\"\n small\n class=\"b-file-uploader-file-card__icon\"\n :class=\"conditionalIconClasses\"\n data-testid=\"file-uploader-item-icon\"\n />\n </file-uploader-file-card-animation>\n\n <div ref=\"fileNameContainerRef\" class=\"b-file-uploader-file-card__file-name\">\n <bento-link\n :download=\"file.data.name\"\n :to=\"downloadUrl\"\n disable-typography\n is-not-routing\n variant=\"quiet\"\n >\n <bento-typography\n ref=\"fileNameRef\"\n v-bento-tooltip-directive=\"isFileNameTruncated ? file.data.name : null\"\n stronger\n el=\"span\"\n >\n {{ file.data.name }}\n </bento-typography>\n </bento-link>\n </div>\n\n <bento-typography v-if=\"file.progress\" el=\"span\">{{ progressLabel }}</bento-typography>\n <bento-typography v-else-if=\"file.data.size\" class=\"b-file-uploader-file-card__file-size\" el=\"span\">{{\n sizeLabel\n }}</bento-typography>\n </div>\n\n <bento-typography v-if=\"hasSizeError\" class=\"b-file-uploader-file-card__error-message\">\n {{ t('fileExceedsSizeLimit') }}\n </bento-typography>\n <bento-typography v-if=\"hasDimensionsError\" class=\"b-file-uploader-file-card__error-message\">\n {{ t('imageDimensionsExceedLimits') }}\n </bento-typography>\n <bento-typography\n v-if=\"hasTypeError && supportedFileTypes\"\n class=\"b-file-uploader-file-card__error-message\"\n >\n {{ t('fileTypeMustBe', { list: supportedFileTypes }) }}\n </bento-typography>\n </div>\n\n <div class=\"b-file-uploader-file-card__actions\">\n <bento-button v-if=\"hasLoadError\" variant=\"tertiary\" @click=\"emit('retry')\">\n <template #iconLeft>\n <refresh-icon :svg-title=\"t('retry')\" />\n </template>\n {{ t('retry') }}\n </bento-button>\n <bento-button v-if=\"isLoading || hasError\" variant=\"tertiary\" @click=\"emit('cancel')\">\n <template #iconLeft>\n <cross-icon :svg-title=\"t('cancel')\" />\n </template>\n </bento-button>\n <bento-button v-else variant=\"tertiary\" @click=\"emit('remove')\">\n <template #iconLeft>\n <bin-icon :svg-title=\"t('remove')\" />\n </template>\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, watch } from 'vue';\n import { isVue2 } from 'vue-demi';\n import { FileUploaderFileCardAnimation } from './components';\n import BinIcon from '@adyen/ui-assets-icons-16/vue/bin';\n import CheckmarkCircleFilledIcon from '@adyen/ui-assets-icons-16/vue/checkmark-circle-fill';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n import RefreshIcon from '@adyen/ui-assets-icons-16/vue/refresh';\n import WarningFilledIcon from '@adyen/ui-assets-icons-16/vue/warning-filled';\n\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives';\n import { BentoButton } from '@/components/button';\n import { BentoLink } from '@/components/link';\n import { BentoLoadingIndicator } from '@/components/loading-indicator';\n import { BentoTypography } from '@/components/typography';\n import { useTruncatedFileName } from './composables/use-truncated-file-name';\n\n import { useI18n } from '@/utils/ts/i18n';\n import { formatFileSize } from '../../utils';\n import { getFileIcon, getFileIconColor } from './utils';\n import { FileErrorType, FileState } from '@/components/file-uploader/file-uploader.types';\n import type { FileUploaderFileCardProps } from './file-uploader-file-card.types';\n import type { VueInstance } from '@/types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const ICON_TIMER = 1200;\n\n const props = defineProps({\n file: null,\n supportedFileTypes: { default: null }\n});\n\n const emit = defineEmits([\"cancel\", \"remove\", \"retry\"]);\n\n const { t, locale } = useI18n<{ message: MessageSchema }>({ messages });\n\n // If initial state is success, immediately show file icon\n const showFileIcon = ref(props.file.state === FileState.SUCCESS);\n\n const downloadUrl = computed(() => URL.createObjectURL(props.file.data));\n const hasError = computed(() => props.file.state === FileState.ERROR);\n const hasLoadError = computed(() => props.file.errors.includes(FileErrorType.ERROR_LOAD));\n const hasSizeError = computed(() => props.file.errors.includes(FileErrorType.ERROR_SIZE));\n const hasDimensionsError = computed(() => props.file.errors.includes(FileErrorType.ERROR_DIMENSIONS));\n const hasTypeError = computed(() => props.file.errors.includes(FileErrorType.ERROR_TYPE));\n const isLoading = computed(() => props.file.state === FileState.LOADING);\n const progressLabel = computed(() => props.file.progress && `(${props.file.progress.toFixed(0)}%)`);\n const sizeLabel = computed(() => formatFileSize(locale.value, props.file.data.size));\n\n // Truncation tooltip\n const fileNameRef = ref<VueInstance>();\n const fileNameContainerRef = ref<HTMLDivElement>();\n const isFileNameTruncated = useTruncatedFileName(fileNameRef, fileNameContainerRef);\n\n const conditionalClasses = computed(() => ({\n 'b-file-uploader-file-card--error': hasError.value,\n }));\n\n const conditionalIconClasses = computed(() => ({\n [`b-file-uploader-file-card__icon--${getFileIconColor(props.file)}`]: showFileIcon.value,\n 'b-file-uploader-file-card__icon--error': hasError.value,\n }));\n\n // Compute the icon to be displayed\n const fileUploaderIcon = computed(() => {\n if (isLoading.value) {\n return BentoLoadingIndicator;\n }\n if (hasError.value) {\n return WarningFilledIcon;\n }\n return showFileIcon.value ? getFileIcon(props.file) : CheckmarkCircleFilledIcon;\n });\n\n // Animation when success icon turns to file icon.\n watch(\n () => props.file.state,\n value => {\n if (value === FileState.SUCCESS && !showFileIcon.value) {\n const changeTimer = setTimeout(() => {\n showFileIcon.value = true;\n clearTimeout(changeTimer);\n }, ICON_TIMER);\n }\n }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n *\n * Individual file items that are listed inside \"bento-file-uploader\" that can\n * be retried, removed or cancelled as they are being uploaded.\n *\n * @example\n * import { FileUploaderFileCard, FileObject } from './';\n *\n * export default {\n * components: { FileUploaderFileCard },\n * template: `\n * <file-uploader-file-card\n * :file=\"file\"\n * supportedFileTypes=\"video files, image files\"\n * @retry=\"retryFile(file)\"\n * @cancel=\"removeFile(file)\"\n * @remove=\"removeFile(file)\"\n * />\n * `,\n * setup() {\n * const file = ref<FileObject>({\n * id: 'stub-file',\n * type: FileType.AUDIO,\n * data: new File(['blob'], 'File name'),\n * state: FileState.SUCCESS,\n * progress: 99,\n * });\n * }\n * }\n */\n export default {\n name: 'file-uploader-file-card',\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./file-uploader-file-card.scss\" />\n","<template>\n <div class=\"b-file-uploader-restrictions\" :class=\"conditionalClasses\">\n <bento-typography v-if=\"supportedFileTypes\" :class=\"setRestrictionErrorClass(supportedFileTypes.error)\">\n {{ t('supportedFileTypes', { list: supportedFileTypes.value }) }}\n </bento-typography>\n <bento-typography v-if=\"maxSize\" :class=\"setRestrictionErrorClass(maxSize.error)\">\n {{ t('maxFileSize', { size: formatFileSize(locale, maxSize.value) }) }}\n </bento-typography>\n <bento-typography v-if=\"maxDimensions\" :class=\"setRestrictionErrorClass(maxDimensions.error)\">\n {{ maxDimensionsLabel }}\n </bento-typography>\n <bento-typography v-if=\"maxCount\" :class=\"setRestrictionErrorClass(maxCount.error)\">\n {{ tc('maxUpload', maxCount.value) }}\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { useI18n } from '@/utils/ts/i18n';\n import { formatFileSize } from '../../utils';\n import type { FileUploaderRestrictionsProps } from './file-uploader-restrictions.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n condensed: { default: null },\n disabled: { default: null },\n maxCount: { default: null },\n maxDimensions: { default: null },\n maxSize: { default: null },\n supportedFileTypes: { default: null }\n});\n\n const { t, tc, locale } = useI18n<{ message: MessageSchema }>({ messages });\n\n const conditionalClasses = computed(() => ({\n ['b-file-uploader-restrictions--condensed']: props.condensed,\n ['b-file-uploader-restrictions--disabled']: props.disabled,\n }));\n\n /**\n * Returns the error class to be set if a restriction has an error\n * @param error Indicates if the restriction has errored\n * @returns Conditional error class\n */\n function setRestrictionErrorClass(error: boolean) {\n return {\n 'b-file-uploader-restrictions--error': error,\n };\n }\n\n const maxDimensionsLabel = computed(() => {\n if (!props.maxDimensions) {\n return null;\n }\n\n const {\n value: { width, height },\n } = props.maxDimensions;\n\n if (width && height) {\n return t('maxImageDimensions', { width, height });\n }\n if (width) {\n return t('maxImageWidth', { width });\n }\n if (height) {\n return t('maxImageHeight', { height });\n }\n return null;\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * List of restrictions defined for \"bento-file-uploader\".\n *\n * @example\n * import { FileUploaderRestrictions } from './';\n *\n * export default {\n * components: { FileUploaderRestrictions },\n * template: `\n * <file-uploader-restrictions\n * :maxCount=\"1\"\n * :maxSize=\"5000\"\n * :maxDimensions=\"{ width: 100, height: 200 }\"\n * supportedFileTypes=\"audio/*,.pdf,.jpg\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./file-uploader-restrictions.scss\" />\n","import { computed, Ref } from 'vue';\nimport { useI18n } from '@/utils/ts/i18n';\n\n/**\n * Transforms a list of accepted file types @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept}\n * into a human readable list of accepted types\n *\n * @param accept String containing a list of unique file type specifiers.\n * @returns String with types transformed to human readable text\n */\nexport function useFileTypeList(accept?: Ref<string>) {\n const { locale, t } = useI18n();\n\n const supportedFileTypeList = computed<string>(() => {\n const formatter = new Intl.ListFormat(locale.value, { style: 'short', type: 'unit' });\n\n return accept?.value\n ? formatter.format(\n accept.value.split(',').map(type => {\n const value = type.trim();\n switch (value) {\n case 'audio/*':\n return t('audioFiles');\n case 'image/*':\n return t('imageFiles');\n case 'video/*':\n return t('videoFiles');\n default:\n return value.toUpperCase();\n }\n })\n )\n : null;\n });\n\n return { supportedFileTypeList };\n}\n","<template>\n <div class=\"b-file-uploader\" :class=\"conditionalClasses\">\n <field-label\n :condensed=\"condensed\"\n :for=\"inputFieldId\"\n :label=\"label\"\n :optional=\"optional\"\n :required=\"required\"\n :tooltip-text=\"tooltipText\"\n class=\"b-file-uploader__label\"\n />\n\n <input\n :id=\"inputFieldId\"\n ref=\"input\"\n type=\"file\"\n tabindex=\"-1\"\n data-testid=\"input\"\n class=\"b-file-uploader__input\"\n :accept=\"accept\"\n :disabled=\"disabled\"\n :multiple=\"isMultiple\"\n @change=\"onInputChange\"\n />\n\n <div\n v-if=\"!hideArea\"\n class=\"b-file-uploader__area\"\n :aria-label=\"t('dropArea')\"\n :tabindex=\"disabled ? -1 : 0\"\n @click=\"input.click()\"\n @dragenter.stop.prevent=\"onDragEnter\"\n @dragleave.stop.prevent=\"onDragLeave\"\n @drop.stop.prevent=\"onDrop\"\n @dragover=\"onDragOver\"\n @keydown.enter.prevent.capture=\"input.click()\"\n @keydown.space.prevent.capture=\"input.click()\"\n >\n <div class=\"b-file-uploader__icon\">\n <warning-filled-icon v-if=\"hasError\" :svg-title=\"t('warning')\" />\n <upload-icon v-else :svg-title=\"t('upload')\" />\n </div>\n\n <template v-if=\"!condensed\">\n <bento-typography el=\"span\" strongest class=\"b-file-uploader__title\">\n {{ tc('dropFiles', +!isMultiple) }}\n </bento-typography>\n\n <bento-typography v-if=\"description\" el=\"span\" class=\"b-file-uploader__description\">\n {{ description }}\n </bento-typography>\n\n <file-uploader-restrictions v-bind=\"fileUploadRestrictionsProps\" />\n </template>\n\n <bento-button\n :disabled=\"disabled\"\n :variant=\"condensed ? 'tertiary' : 'secondary'\"\n condensed\n tabindex=\"-1\"\n class=\"b-file-uploader__button\"\n >\n {{ t('browseFiles') }}\n </bento-button>\n </div>\n\n <error-message\n v-if=\"hasError && errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-file-uploader__error-message\"\n />\n\n <bento-typography\n v-if=\"condensed && description\"\n el=\"span\"\n class=\"b-file-uploader__description b-file-uploader__description--condensed\"\n >\n {{ description }}\n </bento-typography>\n\n <file-uploader-restrictions v-if=\"condensed\" v-bind=\"fileUploadRestrictionsProps\" />\n\n <bento-alert v-if=\"maxFileError\" type=\"critical\" class=\"b-file-uploader__alert\">\n {{ t('tooManyFiles') }}\n <template #description>\n {{ t('youHaveExceededTheMaximum', { count: props.maxCount }) }}\n </template>\n </bento-alert>\n\n <div v-show=\"files?.length\" class=\"b-file-uploader__files\">\n <file-uploader-file-card\n v-for=\"file in files\"\n :key=\"file.id\"\n :file=\"file\"\n :supported-file-types=\"supportedFileTypeList\"\n @cancel=\"removeFile(file)\"\n @remove=\"removeFile(file)\"\n />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, reactive, ref, toRef, watch } from 'vue';\n import UploadIcon from '@adyen/ui-assets-icons-16/vue/upload';\n import WarningFilledIcon from '@adyen/ui-assets-icons-16/vue/warning-filled';\n\n import { BentoAlert } from '@/components/alert';\n import { BentoButton } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage, FieldLabel } from '@/internal';\n import { FileUploaderFileCard } from './components/file-uploader-file-card';\n import { FileUploaderRestrictions } from './components/file-uploader-restrictions';\n\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/core/utils/ts';\n import { getFileType, readFile } from './utils';\n import { useFileTypeList } from './composables';\n\n import {\n type BentoFileUploaderProps,\n FileErrorType,\n FileObject,\n FileState,\n FileUploaderState,\n } from './file-uploader.types';\n import type { FileUploaderRestrictionsProps } from '@/components/file-uploader/components/file-uploader-restrictions/file-uploader-restrictions.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n accept: { default: null },\n condensed: { type: Boolean },\n description: { default: null },\n disabled: { type: Boolean },\n errorMessage: { default: null },\n label: null,\n maxCount: { default: 1 },\n maxDimensions: { default: null },\n maxSize: { default: null },\n modelValue: { default: null },\n optional: { type: Boolean },\n required: { type: Boolean },\n tooltipText: { default: null }\n});\n\n const emit = defineEmits([\"change\", \"update:modelValue\"]);\n\n const { t, tc } = useI18n<{ message: MessageSchema }>({ messages });\n\n const inputFieldId = generateUid('input');\n const errorId = generateUid('input-error');\n const input = ref<HTMLInputElement>(null);\n\n // Prevents trigerring \"dragleave\" events on children elements\n const enterTarget = ref<EventTarget>();\n\n const dragState = reactive({\n dragging: false,\n error: false,\n });\n\n const files = ref<Array<FileObject>>(null);\n const { supportedFileTypeList } = useFileTypeList(toRef(props, 'accept'));\n\n const maxFileError = ref(false);\n\n const hasError = computed(() => !!props.errorMessage || dragState.error);\n const isMultiple = computed(() => props.maxCount > 1);\n\n const conditionalClasses = computed(() => ({\n [`b-file-uploader--${FileUploaderState.DISABLED}`]: props.disabled,\n [`b-file-uploader--${FileUploaderState.DRAG_OVER}`]: dragState.dragging,\n [`b-file-uploader--${FileUploaderState.ERROR}`]: hasError.value,\n [`b-file-uploader--condensed`]: props.condensed,\n }));\n\n const hideArea = computed(() => {\n return props.maxCount && files.value?.length >= props.maxCount;\n });\n\n const fileUploadRestrictionsProps = computed<FileUploaderRestrictionsProps>(() => ({\n condensed: props.condensed,\n disabled: props.disabled,\n maxCount: isMultiple.value\n ? {\n value: props.maxCount,\n error: maxFileError.value,\n }\n : null,\n maxDimensions: props.maxDimensions\n ? {\n value: props.maxDimensions,\n error: files.value?.some(file => file.errors.includes(FileErrorType.ERROR_DIMENSIONS)),\n }\n : null,\n maxSize: props.maxSize\n ? {\n value: props.maxSize,\n error: files.value?.some(file => file.errors.includes(FileErrorType.ERROR_SIZE)),\n }\n : null,\n supportedFileTypes: supportedFileTypeList.value\n ? {\n value: supportedFileTypeList.value,\n error: files.value?.some(file => file.errors.includes(FileErrorType.ERROR_TYPE)),\n }\n : null,\n }));\n\n function verifyFileCount(fileList: Array<FileObject>) {\n const isValid = props.maxCount && fileList.length <= props.maxCount;\n maxFileError.value = !isValid;\n }\n\n function verifyFileSize(fileList: Array<FileObject>) {\n if (props.maxSize) {\n fileList.forEach(file => {\n const item = file; // Prevent eslint no-param-reassign\n if (item.data.size > props.maxSize) {\n item.state = FileState.ERROR;\n item.errors.push(FileErrorType.ERROR_SIZE);\n }\n });\n }\n }\n\n function onDragOver(event: DragEvent) {\n event.preventDefault();\n\n // Disable drag n drop and change the cursor if disabled\n if (props.disabled) {\n // eslint-disable-next-line no-param-reassign\n event.dataTransfer.dropEffect = 'none';\n }\n }\n\n /**\n * Creates a FileObject from a native File and tracks its client-load progress.\n * @param file The native File object.\n * @returns A FileObject.\n */\n function processFile(file: File) {\n const fileObject = reactive<FileObject>({\n id: generateUid('file'),\n data: file,\n errors: [],\n state: FileState.LOADING,\n type: getFileType(file),\n progress: null,\n });\n readFile(fileObject, props.accept, props.maxDimensions);\n return fileObject;\n }\n\n function onFileInput(fileList: FileList | Array<File>) {\n // if (props.multiple) {\n if (isMultiple.value) {\n // Add the new files to the file selection.\n // Removing files should be done by interacting with the file list below the area.\n files.value = [...(files.value || []), ...Array.from(fileList).map(file => processFile(file))];\n } else {\n files.value = [processFile(fileList[0])];\n }\n }\n\n function onInputChange() {\n // Prevent adding many files if maxCount is 1\n if (props.maxCount === 1 && input.value.files?.length > props.maxCount) {\n resetDragState();\n return;\n }\n\n if (input.value.files?.length) {\n onFileInput(input.value.files);\n }\n\n // Reset input value\n input.value.value = '';\n }\n\n function resetDragState() {\n // Reset enter target when drop and dragleave are called\n enterTarget.value = null;\n\n // Prevent changing state if disabled\n if (props.disabled) {\n return;\n }\n\n dragState.dragging = false;\n dragState.error = false;\n }\n\n function onDragEnter(event: DragEvent) {\n // Set the \"dragarea\" as target\n enterTarget.value = event.target;\n\n // Prevent changing state if disabled\n if (props.disabled) {\n return;\n }\n\n dragState.dragging = true;\n\n if (!event.dataTransfer.types.includes('Files') || event.dataTransfer.items?.length > props.maxCount) {\n dragState.error = true;\n }\n }\n\n function onDragLeave(event: DragEvent) {\n // If target enter and leave are the same it means the drag has left the \"dragarea\"\n if (enterTarget.value === event.target) {\n resetDragState();\n }\n }\n\n function onDrop(event: DragEvent) {\n // Prevent events when the input is disabled\n if (props.disabled) {\n return;\n }\n\n // Prevent adding many files if maxCount is 1\n if (props.maxCount === 1 && event.dataTransfer.files?.length > props.maxCount) {\n resetDragState();\n return;\n }\n\n if (event.dataTransfer.files?.length) {\n onFileInput(event.dataTransfer.files);\n }\n resetDragState();\n }\n\n function removeFile(file: FileObject) {\n files.value = files.value.filter(({ id }) => id !== file.id);\n }\n\n function convertToFileList(fileList: Array<FileObject>) {\n // Filter out files with errors\n const validFiles = fileList.filter(\n ({ errors }) => !errors.includes(FileErrorType.ERROR_LOAD) && !errors.includes(FileErrorType.ERROR_SIZE)\n );\n\n if (validFiles.length) {\n const dataTransfer = new DataTransfer();\n validFiles.forEach(({ data }) => dataTransfer.items.add(data));\n return dataTransfer.files;\n }\n return undefined;\n }\n\n watch(files, newList => {\n if (newList) {\n verifyFileCount(newList);\n verifyFileSize(newList);\n\n const value = convertToFileList(newList);\n\n emit('change', value);\n emit('update:modelValue', value);\n } else {\n emit('change');\n emit('update:modelValue');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * The file uploader component enables users to upload one or multiple files from their device to our system.\n *\n * @example\n * import { BentoFileUploader, type BentoFileValue } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFileUploader },\n * template: `\n * <bento-file-uploader\n * accept=\"image/*,video/*,.pdf,.png\"\n * condensed\n * description=\"Custom supporting text\"\n * disabled\n * errorMessage=\"Custom error message\"\n * label=\"Bento file uploader\"\n * :maxCount=\"1\"\n * :maxDimensions=\"{ width: 200, height: 100 }\"\n * :maxSize=\"1000\"\n * v-model=\"files\"\n * multiple\n * :optional=\"false\"\n * required\n * tooltipText=\"Useful information\"\n * />\n * `,\n * setup() {\n * const files = ref<BentoFileValue>()\n * }\n * }\n */\n export default {\n model: { prop: 'modelValue' },\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./file-uploader.scss\" />\n"],"names":["uuid$a","_sfc_main$e","uuid$9","_sfc_main$c","useTruncatedFileName","target","container","isContainerTruncating","ref","observer","disconnectObserver","onUnmounted","onMounted","entries","UNITS","formatFileSize","locale","size","unitIndex","bytes","FileState","FileState2","FileErrorType","FileErrorType2","FileUploaderState","FileUploaderState2","FileType","FileType2","textFileExtraTypes","tableFileTypes","slidesFileTypes","compressedFileTypes","getFileType","file","isFileTypeAccepted","accept","acceptPatterns","type","pattern","category","readFile","fileObject","maxDimensions","reader","event","blob","url","img","uuid$8","_sfc_main$b","uuid$7","_sfc_main$a","uuid$6","_sfc_main$9","uuid$5","_sfc_main$8","uuid$4","_sfc_main$7","uuid$3","_sfc_main$6","uuid$2","_sfc_main$5","uuid$1","_sfc_main$4","uuid","_sfc_main$3","FILE_TYPE_ICON_MAP","SoundIcon","FolderIcon","AttachmentIcon","ImageIcon","DocumentIcon","CollectionIcon","TableIcon","DocumentLinesIcon","PlayCircleIcon","getFileIcon","getFileIconColor","__default__$2","messages$2","ICON_TIMER","t","useI18n","showFileIcon","props","downloadUrl","computed","hasError","hasLoadError","hasSizeError","hasDimensionsError","hasTypeError","isLoading","progressLabel","sizeLabel","fileNameRef","fileNameContainerRef","isFileNameTruncated","conditionalClasses","conditionalIconClasses","fileUploaderIcon","BentoLoadingIndicator","WarningFilledIcon","CheckmarkCircleFillIcon","watch","value","changeTimer","__default__$1","messages$1","tc","setRestrictionErrorClass","error","maxDimensionsLabel","width","height","useFileTypeList","formatter","__default__","messages","inputFieldId","generateUid","errorId","input","enterTarget","dragState","reactive","files","supportedFileTypeList","toRef","maxFileError","isMultiple","hideArea","_a","fileUploadRestrictionsProps","_b","_c","verifyFileCount","fileList","isValid","verifyFileSize","item","onDragOver","processFile","onFileInput","onInputChange","resetDragState","onDragEnter","onDragLeave","onDrop","removeFile","id","convertToFileList","validFiles","errors","dataTransfer","data","newList","emit"],"mappings":";;;;;;;;;;;;;;;;;AAKA,IAAAA,IAAA;AAEA,MAAAC,KAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPA,IAAAE,IAAA;AAEA,MAAAC,KAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;ACFgB,SAAAE,GAAAC,GAAAC,GAAA;AACZ,QAAAC,IAAAC,EAAA,EA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gD,IAAAxF,EAAA,aAAA,UAAA,gBAAAwF,EAAA,UAAAhD,EAAA,UAAA;AACI,UAAA6D,EAAA;AACA;AAAA,QAAA;AAGJ,SAAAX,IAAA1F,EAAA,aAAA,UAAA,QAAA0F,EAAA,UACIS,EAAAnG,EAAA,aAAA,KAAA,GAEJqG,EAAA;AAAA;AAAA,IAAe;AAGnB,aAAAI,GAAApH,GAAA;AACI,MAAA6F,EAAA,QAAAA,EAAA,MAAA,OAAA,CAAA,EAAA,IAAAwB,EAAA,MAAAA,MAAArH,EAAA,EAAA;AAAA,IAA2D;AAG/D,aAAAsH,EAAAd,GAAA;AAEI,YAAAe,IAAAf,EAAA;AAAA,QAA4B,CAAA,EAAA,QAAAgB,EAAA,MAAA,CAAAA,EAAA,SAAAnI,EAAA,UAAA,KAAA,CAAAmI,EAAA,SAAAnI,EAAA,UAAA;AAAA,MAC+E;AAG3G,UAAAkI,EAAA,QAAA;AACI,cAAAE,IAAA,IAAA,aAAA;AACA,eAAAF,EAAA,QAAA,CAAA,EAAA,MAAAG,EAAA,MAAAD,EAAA,MAAA,IAAAC,CAAA,CAAA,GACAD,EAAA;AAAA,MAAoB;AAAA,IAEjB;AAGX,WAAAlD,GAAAsB,GAAA,CAAA8B,MAAA;AACI,UAAAA,GAAA;AACI,QAAApB,EAAAoB,CAAA,GACAjB,EAAAiB,CAAA;AAEA,cAAAnD,IAAA8C,EAAAK,CAAA;AAEA,QAAAC,EAAA,UAAApD,CAAA,GACAoD,EAAA,qBAAApD,CAAA;AAAA,MAA+B;AAE/B,QAAAoD,EAAA,QAAA,GACAA,EAAA,mBAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,7,8,9,10,11,12,13,14,15]}
@@ -1,443 +0,0 @@
1
- import { defineComponent as re } from "vue";
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
- 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
- for (var t = Array(e.length), r = 0; r < e.length; ++r)
7
- t[r] = e[r];
8
- return t;
9
- }, E = function(e) {
10
- return Array.isArray(e) ? e : [e];
11
- }, se = function(e) {
12
- if (e.nodeType !== Node.ELEMENT_NODE)
13
- return !1;
14
- var t = window.getComputedStyle(e, null);
15
- return !t || !t.getPropertyValue ? !1 : t.getPropertyValue("display") === "none" || t.getPropertyValue("visibility") === "hidden";
16
- }, k = function(e) {
17
- return e.parentNode && e.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? (
18
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
- e.parentNode.host
20
- ) : e.parentNode;
21
- }, V = function(e) {
22
- return e === document || e && e.nodeType === Node.DOCUMENT_NODE;
23
- }, fe = function(e, t) {
24
- return !e || V(e) || !se(e) && t(k(e));
25
- }, W = function(e, t) {
26
- var r = e.get(t);
27
- if (r !== void 0)
28
- return r;
29
- var n = fe(t, W.bind(void 0, e));
30
- return e.set(t, n), n;
31
- }, de = function(e, t) {
32
- return e && !V(e) ? me(e) ? t(k(e)) : !1 : !0;
33
- }, H = function(e, t) {
34
- var r = e.get(t);
35
- if (r !== void 0)
36
- return r;
37
- var n = de(t, H.bind(void 0, e));
38
- return e.set(t, n), n;
39
- }, G = function(e) {
40
- return e.dataset;
41
- }, le = function(e) {
42
- return e.tagName === "BUTTON";
43
- }, q = function(e) {
44
- return e.tagName === "INPUT";
45
- }, $ = function(e) {
46
- return q(e) && e.type === "radio";
47
- }, ve = function(e) {
48
- return !((q(e) || le(e)) && (e.type === "hidden" || e.disabled));
49
- }, me = function(e) {
50
- var t = e.getAttribute(ce);
51
- return ![!0, "true", ""].includes(t);
52
- }, w = function(e) {
53
- var t;
54
- return !!(e && (!((t = G(e)) === null || t === void 0) && t.focusGuard));
55
- }, O = function(e) {
56
- return !w(e);
57
- }, be = function(e) {
58
- return !!e;
59
- }, he = function(e, t) {
60
- var r = e.tabIndex - t.tabIndex, n = e.index - t.index;
61
- if (r) {
62
- if (!e.tabIndex)
63
- return 1;
64
- if (!t.tabIndex)
65
- return -1;
66
- }
67
- return r || n;
68
- }, K = function(e, t, r) {
69
- return m(e).map(function(n, a) {
70
- return {
71
- node: n,
72
- index: a,
73
- tabIndex: r && n.tabIndex === -1 ? (n.dataset || {}).focusGuard ? 0 : -1 : n.tabIndex
74
- };
75
- }).filter(function(n) {
76
- return !t || n.tabIndex >= 0;
77
- }).sort(he);
78
- }, pe = [
79
- "button:enabled",
80
- "select:enabled",
81
- "textarea:enabled",
82
- "input:enabled",
83
- // elements with explicit roles will also use explicit tabindex
84
- // '[role="button"]',
85
- "a[href]",
86
- "area[href]",
87
- "summary",
88
- "iframe",
89
- "object",
90
- "embed",
91
- "audio[controls]",
92
- "video[controls]",
93
- "[tabindex]",
94
- "[contenteditable]",
95
- "[autofocus]"
96
- ], y = pe.join(","), Oe = "".concat(y, ", [data-focus-guard]"), z = function(e, t) {
97
- var r;
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 : y) ? [a] : [], z(a));
100
- }, []);
101
- }, F = function(e, t) {
102
- return e.reduce(function(r, n) {
103
- return r.concat(
104
- // add all tabbables inside and within shadow DOMs in DOM order
105
- z(n, t),
106
- // add if node is tabbable itself
107
- n.parentNode ? m(n.parentNode.querySelectorAll(y)).filter(function(a) {
108
- return a === n;
109
- }) : []
110
- );
111
- }, []);
112
- }, ge = function(e) {
113
- var t = e.querySelectorAll("[".concat(ie, "]"));
114
- return m(t).map(function(r) {
115
- return F([r]);
116
- }).reduce(function(r, n) {
117
- return r.concat(n);
118
- }, []);
119
- }, _ = function(e, t) {
120
- return m(e).filter(function(r) {
121
- return W(t, r);
122
- }).filter(function(r) {
123
- return ve(r);
124
- });
125
- }, U = function(e, t) {
126
- return t === void 0 && (t = /* @__PURE__ */ new Map()), m(e).filter(function(r) {
127
- return H(t, r);
128
- });
129
- }, I = function(e, t, r) {
130
- return K(_(F(e, r), t), !0, r);
131
- }, B = function(e, t) {
132
- return K(_(F(e), t), !1);
133
- }, Ae = function(e, t) {
134
- return _(ge(e), t);
135
- }, h = function(e, t) {
136
- return (e.shadowRoot ? h(e.shadowRoot, t) : e.contains(t)) || Array.from(e.children).some(function(r) {
137
- return h(r, t);
138
- });
139
- }, Ne = function(e) {
140
- for (var t = /* @__PURE__ */ new Set(), r = e.length, n = 0; n < r; n += 1)
141
- for (var a = n + 1; a < r; a += 1) {
142
- var i = e[n].compareDocumentPosition(e[a]);
143
- (i & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0 && t.add(a), (i & Node.DOCUMENT_POSITION_CONTAINS) > 0 && t.add(n);
144
- }
145
- return e.filter(function(o, u) {
146
- return !t.has(u);
147
- });
148
- }, j = function(e) {
149
- return e.parentNode ? j(e.parentNode) : e;
150
- }, T = function(e) {
151
- var t = E(e);
152
- return t.filter(Boolean).reduce(function(r, n) {
153
- var a = n.getAttribute(R);
154
- return r.push.apply(r, a ? Ne(m(j(n).querySelectorAll("[".concat(R, '="').concat(a, '"]:not([').concat(oe, '="disabled"])')))) : [n]), r;
155
- }, []);
156
- }, Z = function(e) {
157
- return e.activeElement ? e.activeElement.shadowRoot ? Z(e.activeElement.shadowRoot) : e.activeElement : void 0;
158
- }, S = function() {
159
- return document.activeElement ? document.activeElement.shadowRoot ? Z(document.activeElement.shadowRoot) : document.activeElement : void 0;
160
- }, Ee = function(e) {
161
- return e === document.activeElement;
162
- }, Ie = function(e) {
163
- return !!m(e.querySelectorAll("iframe")).some(function(t) {
164
- return Ee(t);
165
- });
166
- }, xe = function(e) {
167
- var t = document && S();
168
- return !t || t.dataset && t.dataset.focusGuard ? !1 : T(e).some(function(r) {
169
- return h(r, t) || Ie(r);
170
- });
171
- }, we = function() {
172
- var e = document && S();
173
- return e ? m(document.querySelectorAll("[".concat(ue, "]"))).some(function(t) {
174
- return h(t, e);
175
- }) : !1;
176
- }, ye = function(e, t) {
177
- return t.filter($).filter(function(r) {
178
- return r.name === e.name;
179
- }).filter(function(r) {
180
- return r.checked;
181
- })[0] || e;
182
- }, C = function(e, t) {
183
- return $(e) && e.name ? ye(e, t) : e;
184
- }, Fe = function(e) {
185
- var t = /* @__PURE__ */ new Set();
186
- return e.forEach(function(r) {
187
- return t.add(C(r, e));
188
- }), e.filter(function(r) {
189
- return t.has(r);
190
- });
191
- }, L = function(e) {
192
- return e[0] && e.length > 1 ? C(e[0], e) : e[0];
193
- }, M = function(e, t) {
194
- return e.length > 1 ? e.indexOf(C(e[t], e)) : t;
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
- 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 = 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
- if (c === -1 || v === -1)
200
- return Y;
201
- if (!s && v >= 0)
202
- return v;
203
- if (c <= b && u && Math.abs(s) > 1)
204
- return D;
205
- if (c >= f && u && Math.abs(s) > 1)
206
- return P;
207
- if (s && Math.abs(te) > 1)
208
- return v;
209
- if (c <= b)
210
- return D;
211
- if (c > f)
212
- return P;
213
- if (s)
214
- return Math.abs(s) > 1 ? v : (a + v + s) % a;
215
- }
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
- }, g = function(e, t) {
219
- for (var r = x(e), n = x(t), a = 0; a < r.length; a += 1) {
220
- var i = r[a];
221
- if (n.indexOf(i) >= 0)
222
- return i;
223
- }
224
- return !1;
225
- }, J = function(e, t, r) {
226
- var n = E(e), a = E(t), i = n[0], o = !1;
227
- return a.filter(Boolean).forEach(function(u) {
228
- o = g(o || u, u) || o, r.filter(Boolean).forEach(function(c) {
229
- var l = g(i, c);
230
- l && (!o || h(l, o) ? o = l : o = g(l, o));
231
- });
232
- }), o;
233
- }, Te = function(e, t) {
234
- return e.reduce(function(r, n) {
235
- return r.concat(Ae(n, t));
236
- }, []);
237
- }, Se = function(e) {
238
- return function(t) {
239
- var r;
240
- return t.autofocus || !!(!((r = G(t)) === null || r === void 0) && r.autofocus) || e.indexOf(t) >= 0;
241
- };
242
- }, Ce = function(e, t) {
243
- var r = /* @__PURE__ */ new Map();
244
- return t.forEach(function(n) {
245
- return r.set(n.node, n);
246
- }), e.map(function(n) {
247
- return r.get(n);
248
- }).filter(be);
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 = I(n, i).filter(function(f) {
251
- var d = f.node;
252
- return O(d);
253
- });
254
- if (!(!u[0] && (u = o, !u[0]))) {
255
- var c = B([a], i).map(function(f) {
256
- var d = f.node;
257
- return d;
258
- }), l = Ce(c, u), v = l.map(function(f) {
259
- var d = f.node;
260
- return d;
261
- }), s = _e(v, c, r, t);
262
- if (s === Y) {
263
- var b = U(o.map(function(f) {
264
- var d = f.node;
265
- return d;
266
- })).filter(Se(Te(n, i)));
267
- return {
268
- node: b && b.length ? L(b) : L(U(v))
269
- };
270
- }
271
- return s === void 0 ? s : l[s];
272
- }
273
- }, De = function(e) {
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
- var u = o.node;
276
- return O(u);
277
- }).map(function(o) {
278
- var u = o.node;
279
- return u;
280
- });
281
- return a.map(function(o) {
282
- var u = o.node, c = o.index;
283
- return {
284
- node: u,
285
- index: c,
286
- lockItem: i.indexOf(u) >= 0,
287
- guard: w(u)
288
- };
289
- });
290
- }, Re = De, Ue = function(e, t) {
291
- "focus" in e && e.focus(t), "contentWindow" in e && e.contentWindow && e.contentWindow.focus();
292
- }, A = 0, N = !1, Be = function(e, t, r) {
293
- r === void 0 && (r = {});
294
- var n = Pe(e, t);
295
- if (!N && n) {
296
- if (A > 2) {
297
- console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"), N = !0, setTimeout(function() {
298
- N = !1;
299
- }, 1);
300
- return;
301
- }
302
- A++, Ue(n.node, r.focusOptions), A--;
303
- }
304
- }, p = /* @__PURE__ */ ((e) => (e.VERTICAL = "vertical", e.HORIZONTAL = "horizontal", e))(p || {}), Q = /* @__PURE__ */ ((e) => (e.ARROW_UP = "arrowup", e.ARROW_DOWN = "arrowdown", e))(Q || {}), X = /* @__PURE__ */ ((e) => (e.ARROW_LEFT = "arrowleft", e.ARROW_RIGHT = "arrowright", e))(X || {});
305
- const Le = (e) => requestAnimationFrame(e), Me = (e, t) => {
306
- const r = t.findIndex((n) => n.node === e);
307
- return r === -1 ? 0 : r;
308
- }, ke = (e, t) => {
309
- var i;
310
- const r = document.activeElement, n = Re(t), a = Me(r, n) + e;
311
- return ((i = n[a]) == null ? void 0 : i.node) || r;
312
- }, Ve = (e, t) => {
313
- const r = e.key.toLowerCase();
314
- return {
315
- isArrowNext: r === t[0],
316
- isArrowPrev: r === t[1]
317
- };
318
- }, We = {
319
- behavior: "smooth",
320
- block: "center",
321
- inline: "center"
322
- }, He = re({
323
- name: "bento-focus-trap",
324
- props: {
325
- /**
326
- * Enables / Disables arrow navigation as well can determine the type of arrow navigation.
327
- * The types of arrow navigation are horizontal and vertical.
328
- */
329
- arrowNavigation: {
330
- type: String,
331
- default: void 0,
332
- validator: (e) => Object.values(p).includes(
333
- e
334
- )
335
- },
336
- /**
337
- * Enables / disables the focus trap.
338
- */
339
- disabled: {
340
- type: Boolean,
341
- default: !1
342
- }
343
- },
344
- data: () => ({
345
- lastFocusedElement: null
346
- }),
347
- computed: {
348
- isHorizontalArrowNavigation() {
349
- return this.arrowNavigation === p.HORIZONTAL;
350
- },
351
- isVerticalArrowNavigation() {
352
- return this.arrowNavigation === p.VERTICAL;
353
- },
354
- arrowOrder() {
355
- return this.isVerticalArrowNavigation ? Object.values(Q) : Object.values(X);
356
- }
357
- },
358
- watch: {
359
- /**
360
- * If the disabled prop changes, then enable / disable the focus trap.
361
- */
362
- disabled() {
363
- this.disabled ? this.disable() : this.setFocusInside();
364
- }
365
- },
366
- mounted() {
367
- this.disabled || this.setFocusInside();
368
- },
369
- beforeUnmount() {
370
- this.disabled || this.disable();
371
- },
372
- methods: {
373
- /**
374
- * Set focus back inside the element area, giving the last focus element
375
- * `focus-lock` can determine the next interable element to focus on.
376
- */
377
- async setFocusInside() {
378
- (document.activeElement === document.body || we() || !this.lastFocusedElement) && (xe(this.$refs.root) || Be(this.$refs.root, this.lastFocusedElement, {
379
- focusOptions: { preventScroll: !0 }
380
- }), this.lastFocusedElement = document.activeElement);
381
- },
382
- /**
383
- * On blur, trap the focus inside!
384
- */
385
- onBlur() {
386
- this.disabled || Le(this.setFocusInside);
387
- },
388
- /**
389
- * If the no arrow navigation is enabled
390
- * or if the currently focus element is a textarea or an input then prevent navigation.
391
- */
392
- shouldPreventNavigation() {
393
- if (!this.isVerticalArrowNavigation && !this.isHorizontalArrowNavigation)
394
- return !1;
395
- const e = document.activeElement.tagName.toLowerCase();
396
- return (this.isVerticalArrowNavigation ? ["textarea", "select"] : ["input", "textarea"]).includes(e);
397
- },
398
- /**
399
- * When an arrow key is pressed then navigate to the next focusable element.
400
- * If trap is disabled or is content editable then prevent arrow navigation.
401
- *
402
- * @param event on keyboard press event
403
- */
404
- onKeyDown(e) {
405
- if (this.disabled || document.activeElement.isContentEditable || this.shouldPreventNavigation())
406
- return;
407
- const { isArrowNext: t, isArrowPrev: r } = Ve(e, this.arrowOrder);
408
- if (r || t) {
409
- e.preventDefault(), e.stopPropagation();
410
- const n = ke(r ? 1 : -1, this.$el);
411
- if (n.focus(), "scrollIntoView" in n) {
412
- const a = "scrollBehavior" in document.documentElement.style ? We : !1;
413
- n.scrollIntoView(a);
414
- }
415
- }
416
- },
417
- /**
418
- * If focus trap is disabled then return focus to last focus element, parent node or simply the document body.
419
- */
420
- disable() {
421
- const e = this.lastFocusedElement || this.$el.parentNode || document.body;
422
- e && e.focus();
423
- },
424
- useHasSlot: ne
425
- }
426
- });
427
- var Ge = function() {
428
- var t = this, r = t._self._c;
429
- return t._self._setupProxy, t.useHasSlot(t.$slots)("default") ? r("div", t._g({ ref: "root", staticClass: "b-focus-trap", attrs: { "data-testid": "focus-trap", tabindex: "-1" }, on: { focusout: t.onBlur } }, t.arrowNavigation ? { keydown: t.onKeyDown } : {}), [t._t("default")], 2) : t._e();
430
- }, qe = [], $e = /* @__PURE__ */ ae(
431
- He,
432
- Ge,
433
- qe,
434
- !1,
435
- null,
436
- "c1b3538c"
437
- );
438
- const Ze = $e.exports;
439
- export {
440
- Ze as B,
441
- ke as g
442
- };
443
- //# sourceMappingURL=focus-trap.DSkLNO_i.js.map