@adyen/bento-vue2 1.89.2 → 1.90.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 (255) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/index.d.ts +198 -80
  3. package/dist/accordion.js +1 -1
  4. package/dist/action-bar.js +1 -1
  5. package/dist/ai-tag.js +1 -1
  6. package/dist/alert.js +1 -1
  7. package/dist/anchor-scroller.js +1 -1
  8. package/dist/assets/accordion-item.css +1 -1
  9. package/dist/assets/action-bar.css +1 -1
  10. package/dist/assets/base-modal.css +1 -1
  11. package/dist/assets/button-actions.css +1 -1
  12. package/dist/assets/card.css +1 -1
  13. package/dist/assets/data-grid.css +1 -1
  14. package/dist/assets/date-range-picker.css +1 -1
  15. package/dist/assets/dialog-page.css +1 -1
  16. package/dist/assets/file-uploader.css +1 -1
  17. package/dist/assets/input-time.css +1 -0
  18. package/dist/assets/inspector.css +1 -1
  19. package/dist/assets/modal-fullscreen.css +1 -1
  20. package/dist/assets/secondary-nav.css +1 -1
  21. package/dist/assets/sidepanel.css +1 -1
  22. package/dist/button.js +3 -3
  23. package/dist/card.js +1 -1
  24. package/dist/checkbox.js +2 -2
  25. package/dist/chip.js +1 -1
  26. package/dist/chunks/accordion-item.D0WVCLec.js +145 -0
  27. package/dist/chunks/{accordion-item.BZDSJamR.js.map → accordion-item.D0WVCLec.js.map} +1 -1
  28. package/dist/chunks/action-bar.B63qIiiH.js +334 -0
  29. package/dist/chunks/{action-bar.CYGUYI0V.js.map → action-bar.B63qIiiH.js.map} +1 -1
  30. package/dist/chunks/{ai-button.CR_ePQRR.js → ai-button.7L9bANlk.js} +2 -2
  31. package/dist/chunks/{ai-button.CR_ePQRR.js.map → ai-button.7L9bANlk.js.map} +1 -1
  32. package/dist/chunks/ai-tag.CCJCOdXu.js +110 -0
  33. package/dist/chunks/{ai-tag.Cjf38mjR.js.map → ai-tag.CCJCOdXu.js.map} +1 -1
  34. package/dist/chunks/alert.CXRb-Smf.js +160 -0
  35. package/dist/chunks/{alert.QVQ6Zjbm.js.map → alert.CXRb-Smf.js.map} +1 -1
  36. package/dist/chunks/{anchor-scroller.CjJ26PJS.js → anchor-scroller.DWaykZQj.js} +66 -39
  37. package/dist/chunks/{anchor-scroller.CjJ26PJS.js.map → anchor-scroller.DWaykZQj.js.map} +1 -1
  38. package/dist/chunks/{base-modal.DmWkavtf.js → base-modal.DpmeDmq-.js} +103 -66
  39. package/dist/chunks/{base-modal.DmWkavtf.js.map → base-modal.DpmeDmq-.js.map} +1 -1
  40. package/dist/chunks/{button-actions-with-menu.Bi_HXopk.js → button-actions-with-menu.ChTUOsZl.js} +2 -2
  41. package/dist/chunks/{button-actions-with-menu.Bi_HXopk.js.map → button-actions-with-menu.ChTUOsZl.js.map} +1 -1
  42. package/dist/chunks/{button-actions.BLk114As.js → button-actions.BmU1DngD.js} +221 -147
  43. package/dist/chunks/{button-actions.BLk114As.js.map → button-actions.BmU1DngD.js.map} +1 -1
  44. package/dist/chunks/{button.DxhJNOtr.js → button.C9b2AC9w.js} +2 -2
  45. package/dist/chunks/{button.DxhJNOtr.js.map → button.C9b2AC9w.js.map} +1 -1
  46. package/dist/chunks/{calendar.CXKhBF2f.js → calendar.uvIGF_jU.js} +283 -209
  47. package/dist/chunks/{calendar.CXKhBF2f.js.map → calendar.uvIGF_jU.js.map} +1 -1
  48. package/dist/chunks/card.WWUfBkqf.js +165 -0
  49. package/dist/chunks/{card.GjhsXOT0.js.map → card.WWUfBkqf.js.map} +1 -1
  50. package/dist/chunks/{checkbox-group.B2BjU3ZN.js → checkbox-group.CI0xDnql.js} +4 -4
  51. package/dist/chunks/{checkbox-group.B2BjU3ZN.js.map → checkbox-group.CI0xDnql.js.map} +1 -1
  52. package/dist/chunks/{checkbox.CIv8WgGp.js → checkbox.TsWA6O3Z.js} +93 -56
  53. package/dist/chunks/{checkbox.CIv8WgGp.js.map → checkbox.TsWA6O3Z.js.map} +1 -1
  54. package/dist/chunks/chip.BFY_-VCz.js +84 -0
  55. package/dist/chunks/{chip.DTpENaGC.js.map → chip.BFY_-VCz.js.map} +1 -1
  56. package/dist/chunks/{code-snippet.YIm2oO_o.js → code-snippet.4DX9iUV8.js} +133 -76
  57. package/dist/chunks/{code-snippet.YIm2oO_o.js.map → code-snippet.4DX9iUV8.js.map} +1 -1
  58. package/dist/chunks/{controls-group.CqotnNEF.js → controls-group.D_KE99mg.js} +2 -2
  59. package/dist/chunks/{controls-group.CqotnNEF.js.map → controls-group.D_KE99mg.js.map} +1 -1
  60. package/dist/chunks/copy.qqGYFbKJ.js +133 -0
  61. package/dist/chunks/{copy.BVGQcf22.js.map → copy.qqGYFbKJ.js.map} +1 -1
  62. package/dist/chunks/{country.D20NCLLG.js → country.BEwW8TQo.js} +3 -3
  63. package/dist/chunks/{country.D20NCLLG.js.map → country.BEwW8TQo.js.map} +1 -1
  64. package/dist/chunks/country.types.jjXwaoMl.js +2537 -0
  65. package/dist/chunks/country.types.jjXwaoMl.js.map +1 -0
  66. package/dist/chunks/{dashboard-section.BubZyu8i.js → dashboard-section.TWlLdQHG.js} +3 -3
  67. package/dist/chunks/{dashboard-section.BubZyu8i.js.map → dashboard-section.TWlLdQHG.js.map} +1 -1
  68. package/dist/chunks/{dashed-underline.pjYTS0m1.js → dashed-underline.CpDuQ3Fo.js} +3 -3
  69. package/dist/chunks/{dashed-underline.pjYTS0m1.js.map → dashed-underline.CpDuQ3Fo.js.map} +1 -1
  70. package/dist/chunks/{data-grid-template.D8RhngPj.js → data-grid-template.DZaE-kOS.js} +4 -4
  71. package/dist/chunks/{data-grid-template.D8RhngPj.js.map → data-grid-template.DZaE-kOS.js.map} +1 -1
  72. package/dist/chunks/data-grid.x6cEW0az.js +4069 -0
  73. package/dist/chunks/data-grid.x6cEW0az.js.map +1 -0
  74. package/dist/chunks/date-picker.Dln8ocL4.js +222 -0
  75. package/dist/chunks/{date-picker.CnazYcSX.js.map → date-picker.Dln8ocL4.js.map} +1 -1
  76. package/dist/chunks/date-range-picker.DPGy2h-9.js +1068 -0
  77. package/dist/chunks/date-range-picker.DPGy2h-9.js.map +1 -0
  78. package/dist/chunks/dialog-page.EdejG53a.js +143 -0
  79. package/dist/chunks/{dialog-page.oyG153fC.js.map → dialog-page.EdejG53a.js.map} +1 -1
  80. package/dist/chunks/{dropdown-default-textbox.Dvzg0StF.js → dropdown-default-textbox.CjhLIxVq.js} +63 -36
  81. package/dist/chunks/{dropdown-default-textbox.Dvzg0StF.js.map → dropdown-default-textbox.CjhLIxVq.js.map} +1 -1
  82. package/dist/chunks/{dropdown-tag.BRB-emd1.js → dropdown-tag.t3FlJUSy.js} +5 -5
  83. package/dist/chunks/{dropdown-tag.BRB-emd1.js.map → dropdown-tag.t3FlJUSy.js.map} +1 -1
  84. package/dist/chunks/{dropdown.Ct7uhPr6.js → dropdown.CvNI2V33.js} +329 -235
  85. package/dist/chunks/{dropdown.Ct7uhPr6.js.map → dropdown.CvNI2V33.js.map} +1 -1
  86. package/dist/chunks/{empty-state.D_Ac-XXH.js → empty-state.DMV23IZy.js} +2 -2
  87. package/dist/chunks/{empty-state.D_Ac-XXH.js.map → empty-state.DMV23IZy.js.map} +1 -1
  88. package/dist/chunks/error-message.BUNKRa_w.js +160 -0
  89. package/dist/chunks/{error-message.RxdStT3S.js.map → error-message.BUNKRa_w.js.map} +1 -1
  90. package/dist/chunks/{file-uploader.D5Rjsx4k.js → file-uploader.Cig5gDXT.js} +749 -468
  91. package/dist/chunks/{file-uploader.D5Rjsx4k.js.map → file-uploader.Cig5gDXT.js.map} +1 -1
  92. package/dist/chunks/{filter-bar.zD_ctViU.js → filter-bar.x445KK3y.js} +1301 -761
  93. package/dist/chunks/{filter-bar.zD_ctViU.js.map → filter-bar.x445KK3y.js.map} +1 -1
  94. package/dist/chunks/fixed-scroller.DR2E_No4.js +148 -0
  95. package/dist/chunks/{fixed-scroller.MerESbd_.js.map → fixed-scroller.DR2E_No4.js.map} +1 -1
  96. package/dist/chunks/{footer-actions.CiPj7hZG.js → footer-actions.CIkul1OD.js} +3 -3
  97. package/dist/chunks/{footer-actions.CiPj7hZG.js.map → footer-actions.CIkul1OD.js.map} +1 -1
  98. package/dist/chunks/{form-layout-title.Bw7VgOO5.js → form-layout-title.DR5M7GP3.js} +77 -48
  99. package/dist/chunks/{form-layout-title.Bw7VgOO5.js.map → form-layout-title.DR5M7GP3.js.map} +1 -1
  100. package/dist/chunks/{header-meta.Dq6TlNPw.js → header-meta.BC5fdpD1.js} +127 -73
  101. package/dist/chunks/{header-meta.Dq6TlNPw.js.map → header-meta.BC5fdpD1.js.map} +1 -1
  102. package/dist/chunks/{header-with-views.DaEhkSS8.js → header-with-views.-cvdi9-L.js} +1120 -679
  103. package/dist/chunks/{header-with-views.DaEhkSS8.js.map → header-with-views.-cvdi9-L.js.map} +1 -1
  104. package/dist/chunks/{header.DkC-KKWa.js → header.DtmZjxiU.js} +3 -3
  105. package/dist/chunks/{header.DkC-KKWa.js.map → header.DtmZjxiU.js.map} +1 -1
  106. package/dist/chunks/{info-icon.BF8KxU-k.js → info-icon.DCR42Kvm.js} +2 -2
  107. package/dist/chunks/{info-icon.BF8KxU-k.js.map → info-icon.DCR42Kvm.js.map} +1 -1
  108. package/dist/chunks/input-field-password.Bdlw4dzr.js +381 -0
  109. package/dist/chunks/{input-field-password.BKT1mYUw.js.map → input-field-password.Bdlw4dzr.js.map} +1 -1
  110. package/dist/chunks/{input-field-phone-number.BjRKjQOQ.js → input-field-phone-number.DPuWxBBz.js} +98 -71
  111. package/dist/chunks/{input-field-phone-number.BjRKjQOQ.js.map → input-field-phone-number.DPuWxBBz.js.map} +1 -1
  112. package/dist/chunks/input-field.DH25CU_G.js +207 -0
  113. package/dist/chunks/{input-field.m1PMwa4C.js.map → input-field.DH25CU_G.js.map} +1 -1
  114. package/dist/chunks/input-time.6eJ4-QdU.js +92 -0
  115. package/dist/chunks/input-time.6eJ4-QdU.js.map +1 -0
  116. package/dist/chunks/inspector.BzBPlz-5.js +172 -0
  117. package/dist/chunks/{inspector.Bnm0hl_D.js.map → inspector.BzBPlz-5.js.map} +1 -1
  118. package/dist/chunks/{link.MhoM3zQj.js → link.DB5g6d48.js} +56 -29
  119. package/dist/chunks/{link.MhoM3zQj.js.map → link.DB5g6d48.js.map} +1 -1
  120. package/dist/chunks/{list-item.BnzU1LIu.js → list-item.DqTHh8-Z.js} +2 -2
  121. package/dist/chunks/{list-item.BnzU1LIu.js.map → list-item.DqTHh8-Z.js.map} +1 -1
  122. package/dist/chunks/{listbox-option-tag.BhPVuAjJ.js → listbox-option-tag.CvbE-EuG.js} +2 -2
  123. package/dist/chunks/{listbox-option-tag.BhPVuAjJ.js.map → listbox-option-tag.CvbE-EuG.js.map} +1 -1
  124. package/dist/chunks/{modal-fullscreen.CXOq6_Cv.js → modal-fullscreen.CaxuXW-H.js} +63 -36
  125. package/dist/chunks/{modal-fullscreen.CXOq6_Cv.js.map → modal-fullscreen.CaxuXW-H.js.map} +1 -1
  126. package/dist/chunks/{modal.o0KddMiG.js → modal.Brif0vAy.js} +63 -36
  127. package/dist/chunks/{modal.o0KddMiG.js.map → modal.Brif0vAy.js.map} +1 -1
  128. package/dist/chunks/{pagination.ZISqB4M_.js → pagination.BmrU_sn_.js} +221 -99
  129. package/dist/chunks/{pagination.ZISqB4M_.js.map → pagination.BmrU_sn_.js.map} +1 -1
  130. package/dist/chunks/promo-banner.Dc_kK1x9.js +91 -0
  131. package/dist/chunks/{promo-banner.Db2kh2qK.js.map → promo-banner.Dc_kK1x9.js.map} +1 -1
  132. package/dist/chunks/{radio-group.DnMy7brs.js → radio-group.5oS-AeYN.js} +4 -4
  133. package/dist/chunks/{radio-group.DnMy7brs.js.map → radio-group.5oS-AeYN.js.map} +1 -1
  134. package/dist/chunks/{rich-text-editor.Cbv1DxXn.js → rich-text-editor.DSGTe8Zt.js} +1781 -1731
  135. package/dist/chunks/{rich-text-editor.Cbv1DxXn.js.map → rich-text-editor.DSGTe8Zt.js.map} +1 -1
  136. package/dist/chunks/search-bar.CNfoeLLt.js +126 -0
  137. package/dist/chunks/{search-bar.DPjYDhja.js.map → search-bar.CNfoeLLt.js.map} +1 -1
  138. package/dist/chunks/secondary-nav.IF5CgeIP.js +226 -0
  139. package/dist/chunks/secondary-nav.IF5CgeIP.js.map +1 -0
  140. package/dist/chunks/{segmented-control.BqIiX9hv.js → segmented-control.DDtjX-V5.js} +2 -2
  141. package/dist/chunks/{segmented-control.BqIiX9hv.js.map → segmented-control.DDtjX-V5.js.map} +1 -1
  142. package/dist/chunks/{selection-card-group.IPiouuot.js → selection-card-group.DZjFeQKR.js} +10 -10
  143. package/dist/chunks/{selection-card-group.IPiouuot.js.map → selection-card-group.DZjFeQKR.js.map} +1 -1
  144. package/dist/chunks/{sidepanel.BGMjjB3F.js → sidepanel.DZDXuyzg.js} +66 -39
  145. package/dist/chunks/{sidepanel.BGMjjB3F.js.map → sidepanel.DZDXuyzg.js.map} +1 -1
  146. package/dist/chunks/{step.QFER3tSj.js → step.TDm_ts1S.js} +92 -63
  147. package/dist/chunks/{step.QFER3tSj.js.map → step.TDm_ts1S.js.map} +1 -1
  148. package/dist/chunks/{structured-list-item.BDJKRC_8.js → structured-list-item.BBBtie1s.js} +58 -31
  149. package/dist/chunks/{structured-list-item.BDJKRC_8.js.map → structured-list-item.BBBtie1s.js.map} +1 -1
  150. package/dist/chunks/{summary-grid.types.CIkArZf5.js → summary-grid.types.CrPNQbX0.js} +5 -5
  151. package/dist/chunks/{summary-grid.types.CIkArZf5.js.map → summary-grid.types.CrPNQbX0.js.map} +1 -1
  152. package/dist/chunks/{tab.CaXF0dho.js → tab.CNIZyfZt.js} +2 -2
  153. package/dist/chunks/{tab.CaXF0dho.js.map → tab.CNIZyfZt.js.map} +1 -1
  154. package/dist/chunks/{tag.CocLKztJ.js → tag.D2xagTJv.js} +2 -2
  155. package/dist/chunks/{tag.CocLKztJ.js.map → tag.D2xagTJv.js.map} +1 -1
  156. package/dist/chunks/textarea.Bi53QF5Q.js +218 -0
  157. package/dist/chunks/{textarea.D4X6Ss9q.js.map → textarea.Bi53QF5Q.js.map} +1 -1
  158. package/dist/chunks/timeline-item.C6Bi0eam.js +322 -0
  159. package/dist/chunks/{timeline-item.C8BxWdy1.js.map → timeline-item.C6Bi0eam.js.map} +1 -1
  160. package/dist/chunks/{toast.BRI3G7TL.js → toast.d8vg71CB.js} +81 -54
  161. package/dist/chunks/{toast.BRI3G7TL.js.map → toast.d8vg71CB.js.map} +1 -1
  162. package/dist/chunks/{tooltip.CbsNGnhw.js → tooltip.BxtnF3is.js} +38 -36
  163. package/dist/chunks/tooltip.BxtnF3is.js.map +1 -0
  164. package/dist/chunks/{tutorial.BzV6bHQJ.js → tutorial.BCiZMLJE.js} +190 -103
  165. package/dist/chunks/{tutorial.BzV6bHQJ.js.map → tutorial.BCiZMLJE.js.map} +1 -1
  166. package/dist/chunks/{use-cached-selected-values.DqX2qsMC.js → use-cached-selected-values.Bn3Y8Iuq.js} +490 -359
  167. package/dist/chunks/{use-cached-selected-values.DqX2qsMC.js.map → use-cached-selected-values.Bn3Y8Iuq.js.map} +1 -1
  168. package/dist/chunks/{use-country-items.CI8C7MLU.js → use-country-items.B4j8pAvW.js} +3 -3
  169. package/dist/chunks/{use-country-items.CI8C7MLU.js.map → use-country-items.B4j8pAvW.js.map} +1 -1
  170. package/dist/chunks/use-country-phon-code.ByqnuIni.js +6386 -0
  171. package/dist/chunks/use-country-phon-code.ByqnuIni.js.map +1 -0
  172. package/dist/chunks/{use-date-input-formatter.BYaTO3vz.js → use-date-input-formatter.DRMt9yR2.js} +2 -2
  173. package/dist/chunks/{use-date-input-formatter.BYaTO3vz.js.map → use-date-input-formatter.DRMt9yR2.js.map} +1 -1
  174. package/dist/code-snippet.js +1 -1
  175. package/dist/country.js +3 -3
  176. package/dist/dashboard-template.js +1 -1
  177. package/dist/dashed-underline.js +1 -1
  178. package/dist/data-grid-template.js +1 -1
  179. package/dist/data-grid.js +1 -1
  180. package/dist/date-picker.js +2 -2
  181. package/dist/date-range-picker.js +2 -2
  182. package/dist/draggable-handle.js +160 -73
  183. package/dist/draggable-handle.js.map +1 -1
  184. package/dist/dropdown.js +4 -4
  185. package/dist/empty-state.js +1 -1
  186. package/dist/file-uploader.js +1 -1
  187. package/dist/filter-bar.js +1 -1
  188. package/dist/form-layout.js +1 -1
  189. package/dist/header-with-views.js +1 -1
  190. package/dist/header.js +1 -1
  191. package/dist/index.js +215 -213
  192. package/dist/index.js.map +1 -1
  193. package/dist/info-icon.js +1 -1
  194. package/dist/input-field-password.js +1 -1
  195. package/dist/input-field-phone-number.js +1 -1
  196. package/dist/input-field.js +1 -1
  197. package/dist/input-time.js +5 -0
  198. package/dist/input-time.js.map +1 -0
  199. package/dist/inspector.js +1 -1
  200. package/dist/internal.js +12 -12
  201. package/dist/link.js +1 -1
  202. package/dist/list.js +1 -1
  203. package/dist/menu.js +1 -1
  204. package/dist/modal-fullscreen.js +1 -1
  205. package/dist/modal.js +2 -2
  206. package/dist/pagination.js +1 -1
  207. package/dist/popover.js +1 -1
  208. package/dist/promo-banner.js +1 -1
  209. package/dist/radio-group.js +1 -1
  210. package/dist/rich-text-editor.js +1 -1
  211. package/dist/search-bar.js +2 -2
  212. package/dist/secondary-nav.js +1 -1
  213. package/dist/segmented-control.js +1 -1
  214. package/dist/selection-card.js +1 -1
  215. package/dist/sidepanel.js +1 -1
  216. package/dist/stepper.js +1 -1
  217. package/dist/structured-list.js +1 -1
  218. package/dist/summary-grid.js +1 -1
  219. package/dist/tabs.js +1 -1
  220. package/dist/tag.js +1 -1
  221. package/dist/textarea.js +1 -1
  222. package/dist/timeline.js +1 -1
  223. package/dist/toast.js +1 -1
  224. package/dist/tutorial.js +1 -1
  225. package/dist/web-types.json +198 -1
  226. package/package.json +9 -9
  227. package/dist/chunks/accordion-item.BZDSJamR.js +0 -108
  228. package/dist/chunks/action-bar.CYGUYI0V.js +0 -207
  229. package/dist/chunks/ai-tag.Cjf38mjR.js +0 -73
  230. package/dist/chunks/alert.QVQ6Zjbm.js +0 -93
  231. package/dist/chunks/card.GjhsXOT0.js +0 -128
  232. package/dist/chunks/chip.DTpENaGC.js +0 -57
  233. package/dist/chunks/copy.BVGQcf22.js +0 -86
  234. package/dist/chunks/country.types.DxKjyd0S.js +0 -20
  235. package/dist/chunks/country.types.DxKjyd0S.js.map +0 -1
  236. package/dist/chunks/data-grid.DJG8Ty0A.js +0 -3194
  237. package/dist/chunks/data-grid.DJG8Ty0A.js.map +0 -1
  238. package/dist/chunks/date-picker.CnazYcSX.js +0 -155
  239. package/dist/chunks/date-range-picker.Bf9pRNL7.js +0 -811
  240. package/dist/chunks/date-range-picker.Bf9pRNL7.js.map +0 -1
  241. package/dist/chunks/dialog-page.oyG153fC.js +0 -116
  242. package/dist/chunks/error-message.RxdStT3S.js +0 -106
  243. package/dist/chunks/fixed-scroller.MerESbd_.js +0 -111
  244. package/dist/chunks/input-field-password.BKT1mYUw.js +0 -234
  245. package/dist/chunks/input-field.m1PMwa4C.js +0 -170
  246. package/dist/chunks/inspector.Bnm0hl_D.js +0 -105
  247. package/dist/chunks/promo-banner.Db2kh2qK.js +0 -64
  248. package/dist/chunks/search-bar.DPjYDhja.js +0 -89
  249. package/dist/chunks/secondary-nav.CwJjkJkj.js +0 -112
  250. package/dist/chunks/secondary-nav.CwJjkJkj.js.map +0 -1
  251. package/dist/chunks/textarea.D4X6Ss9q.js +0 -169
  252. package/dist/chunks/timeline-item.C8BxWdy1.js +0 -238
  253. package/dist/chunks/tooltip.CbsNGnhw.js.map +0 -1
  254. package/dist/chunks/use-country-phon-code.C6orQNnM.js +0 -291
  255. package/dist/chunks/use-country-phon-code.C6orQNnM.js.map +0 -1
@@ -0,0 +1,172 @@
1
+ import { ref as p, watch as T, defineComponent as B, computed as v, nextTick as E } from "vue";
2
+ import { d as F, B as I } from "./typography.C8lPlsbD.js";
3
+ import { B as k } from "./button.C9b2AC9w.js";
4
+ import { B as D } from "./loading-indicator.PxbRzshH.js";
5
+ import { B as L, s as A, g as w, a as H, f as O } from "./focus-trap.DRqjHzt6.js";
6
+ import { E as P } from "./expand.Bbielaja.js";
7
+ import { C as R } from "./cross.CC_B-vG-.js";
8
+ import { g as z } from "./generate-uid.NJ8tVoha.js";
9
+ import { u as V } from "./index.B6WW_F-J.js";
10
+ import { a as N, b as G } from "./index.CwzYJHw2.js";
11
+ import { n as $ } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
12
+ import "../assets/inspector.css";
13
+ function Y(s) {
14
+ const e = p([]), t = N();
15
+ return T(t, (a) => {
16
+ !s.value || !a || !s.value.contains(a) || (e.value.unshift(a), e.value.length > 3 && e.value.pop());
17
+ }), {
18
+ findValidFocusFallback: () => {
19
+ for (const a of e.value)
20
+ if (a && document.body.contains(a))
21
+ return a;
22
+ return null;
23
+ }
24
+ };
25
+ }
26
+ const K = {
27
+ "de-DE": {
28
+ close: "Schließen",
29
+ expand: "Anzeigen",
30
+ inspector: "Inspektor",
31
+ returnToMainContent: "Zurück zum Hauptinhalt (Strg+Shift+S)",
32
+ returnToMainContentDescription: "Mit der Tastenkombination Strg + Umschalt + S können Sie zwischen dem Inspektor und den Seitenbereichen navigieren."
33
+ },
34
+ "en-GB": {
35
+ close: "Close",
36
+ expand: "Expand",
37
+ inspector: "Inspector",
38
+ returnToMainContent: "Return to main content (Ctrl+Shift+S)",
39
+ returnToMainContentDescription: "You can use Ctrl + Shift + S to navigate between the inspector and page sections."
40
+ },
41
+ "en-US": {
42
+ close: "Close",
43
+ expand: "Expand",
44
+ inspector: "Inspector",
45
+ returnToMainContent: "Return to main content (Ctrl+Shift+S)",
46
+ returnToMainContentDescription: "You can use Ctrl + Shift + S to navigate between the inspector and page sections."
47
+ },
48
+ "es-ES": {
49
+ close: "Cerrar",
50
+ expand: "Ampliar",
51
+ inspector: "Inspector",
52
+ returnToMainContent: "Volver al contenido principal (Ctrl+Shift+S)",
53
+ returnToMainContentDescription: "Puedes usar Ctrl + Shift + S para navegar entre las secciones del inspector y de la página."
54
+ },
55
+ "es-MX": {
56
+ close: "Cerrar",
57
+ expand: "Ampliar",
58
+ inspector: "Inspector",
59
+ returnToMainContent: "Volver al contenido principal (Ctrl+Shift+S)",
60
+ returnToMainContentDescription: "Puedes usar Ctrl + Shift + S para navegar entre las secciones del inspector y de la página."
61
+ },
62
+ "fr-FR": {
63
+ close: "Fermer",
64
+ expand: "Développer",
65
+ inspector: "Inspecteur",
66
+ returnToMainContent: "Retour au contenu principal (Ctrl+Maj+S)",
67
+ returnToMainContentDescription: "Vous pouvez utiliser Ctrl + Shift + S pour naviguer entre les sections de l'inspecteur et de la page."
68
+ },
69
+ "it-IT": {
70
+ close: "Chiudi",
71
+ expand: "Espandi",
72
+ inspector: "Ispettore",
73
+ returnToMainContent: "Torna al contenuto principale (Ctrl+Shift+S)",
74
+ returnToMainContentDescription: "Puoi usare Ctrl + Shift + S per navigare tra le sezioni ispettore e pagina."
75
+ },
76
+ "ja-JP": {
77
+ close: "閉じる",
78
+ expand: "展開",
79
+ inspector: "インスペクター",
80
+ returnToMainContent: "メインコンテンツに戻る(Ctrl+Shift+S)",
81
+ returnToMainContentDescription: "Ctrl + Shift + S を使用して、インスペクターとページセクション間を移動できます。"
82
+ },
83
+ "pt-BR": {
84
+ close: "Fechar",
85
+ expand: "Expandir",
86
+ inspector: "Inspetor",
87
+ returnToMainContent: "Voltar ao conteúdo principal (Ctrl+Shift+S)",
88
+ returnToMainContentDescription: "Você pode usar Ctrl + Shift + S para navegar entre as seções do inspetor e da página."
89
+ },
90
+ "zh-CN": {
91
+ close: "关闭",
92
+ expand: "展开",
93
+ inspector: "检查器",
94
+ returnToMainContent: "返回主内容(Ctrl+Shift+S)",
95
+ returnToMainContentDescription: "您可以使用 Ctrl + Shift + S 在检查器和页面分区之间导航。"
96
+ }
97
+ }, U = { i18n: { messages: K } }, X = /* @__PURE__ */ B({
98
+ ...U,
99
+ __name: "inspector",
100
+ props: {
101
+ activePage: { default: "" },
102
+ expandable: { type: Boolean, default: !1 },
103
+ isOpen: { type: Boolean, default: !1 },
104
+ loading: { type: Boolean, default: !1 },
105
+ size: { default: "small" },
106
+ title: null,
107
+ relativeLayout: { default: "push-content" },
108
+ pageFocusAnchor: { default: null }
109
+ },
110
+ emits: ["update:is-open", "update:active-page", "expand"],
111
+ setup(s, { emit: n }) {
112
+ const e = s, { t } = V(), r = z("returnToMainContentDescription"), a = p(null), l = p(null), S = p(null), u = p(null), { width: _ } = G(a), d = v(() => {
113
+ const m = e.size === "small" ? 740 : 915;
114
+ return _.value > 0 && _.value < m;
115
+ }), c = v(() => e.pageFocusAnchor), b = v(() => ({
116
+ [`b-inspector--${e.size}`]: !0,
117
+ [`b-inspector--${e.relativeLayout}`]: !0,
118
+ "b-inspector--is-compact": d.value
119
+ })), M = v(() => `${t("inspector")}, ${e.title}`), { findValidFocusFallback: f } = Y(S), g = async () => {
120
+ e.isOpen ? (await E(), A(l.value, c.value)) : i(c.value ?? f());
121
+ }, y = (o) => {
122
+ if (d.value)
123
+ return;
124
+ const C = o.shiftKey ? -1 : 1, m = w(C, l.value);
125
+ H() === m && (o.preventDefault(), u.value = document.activeElement, i(c.value ?? f()), n("update:active-page", void 0));
126
+ }, x = (o) => {
127
+ const C = o.shiftKey && o.ctrlKey && o.key === "S";
128
+ e.isOpen && !d.value && C && h();
129
+ }, h = () => {
130
+ O(l.value) ? (u.value = document.activeElement, i(c.value ?? f()), n("update:active-page", void 0)) : i(u.value);
131
+ }, i = (o) => {
132
+ o && (o == null || o.focus(), document.activeElement !== o && i(o.parentElement));
133
+ };
134
+ return T(
135
+ () => e.activePage,
136
+ () => {
137
+ e.activePage && g();
138
+ }
139
+ ), e.activePage || F(
140
+ 'BentoInspector "active-page" as optional',
141
+ `Make sure to set the "active-page" prop and keep it in sync with "update:active-page".
142
+ "active-page" prop will be required in the next version`,
143
+ "2.0.0"
144
+ ), { __sfc: !0, props: e, emit: n, t, returnToMainContentDescriptionId: r, wrapper: a, inspector: l, page: S, inspectorLastFocusedElement: u, wrapperWidth: _, isCompact: d, computedPageLastFocusedElement: c, conditionalClass: b, inspectorAriaLabel: M, findValidFocusFallback: f, setFocus: g, handleTabNavigation: y, handleSectionFocus: x, moveFocusBetweenSections: h, focusElement: i, BentoTypography: I, BentoButton: k, BentoLoadingIndicator: D, BentoFocusTrap: L, ExpandIcon: P, CrossIcon: R };
145
+ }
146
+ });
147
+ var j = function() {
148
+ var n = this, e = n._self._c, t = n._self._setupProxy;
149
+ return e("div", { ref: "wrapper", staticClass: "b-inspector", class: t.conditionalClass, on: { keydown: t.handleSectionFocus } }, [e("div", { ref: "page", staticClass: "b-inspector__page-wrapper" }, [e("div", { staticClass: "b-inspector__page" }, [n._t("page")], 2)]), e("Transition", { attrs: { name: "b-inspector__animation", mode: "out-in" }, on: { "before-enter": t.setFocus, "after-leave": t.setFocus } }, [n.isOpen ? e("aside", { ref: "inspector", staticClass: "b-inspector__container-wrapper", attrs: { "aria-label": t.inspectorAriaLabel }, on: { keydown: function(r) {
150
+ return !r.type.indexOf("key") && n._k(r.keyCode, "tab", 9, r.key, "Tab") ? null : t.handleTabNavigation.apply(null, arguments);
151
+ } } }, [e(t.BentoFocusTrap, { attrs: { disabled: !t.isCompact } }, [e("div", { staticClass: "b-inspector__container" }, [e("div", { staticClass: "b-inspector__header" }, [t.isCompact ? n._e() : [e(t.BentoButton, { staticClass: "b-inspector__return-content", attrs: { variant: "secondary", condensed: "", "aria-describedby": t.returnToMainContentDescriptionId }, on: { click: t.moveFocusBetweenSections } }, [n._v(" " + n._s(t.t("returnToMainContent")) + " ")]), e("span", { staticClass: "b-inspector__return-content-description", attrs: { id: t.returnToMainContentDescriptionId } }, [n._v(n._s(t.t("returnToMainContentDescription")))])], e(t.BentoTypography, { staticClass: "b-inspector__title", attrs: { el: "h2", variant: "title" } }, [n._v(" " + n._s(n.title) + " ")]), e("div", { staticClass: "b-inspector__icons" }, [n.expandable ? e(t.BentoButton, { attrs: { variant: "tertiary" }, on: { click: function(r) {
152
+ return t.emit("expand");
153
+ } }, scopedSlots: n._u([{ key: "iconLeft", fn: function() {
154
+ return [e(t.ExpandIcon, { attrs: { "svg-title": t.t("expand") } })];
155
+ }, proxy: !0 }], null, !1, 1210869445) }) : n._e(), e(t.BentoButton, { attrs: { variant: "tertiary" }, on: { click: function(r) {
156
+ return t.emit("update:is-open", !1);
157
+ } }, scopedSlots: n._u([{ key: "iconLeft", fn: function() {
158
+ return [e(t.CrossIcon, { attrs: { "svg-title": t.t("close") } })];
159
+ }, proxy: !0 }], null, !1, 858730413) })], 1)], 2), e("div", { staticClass: "b-inspector__content" }, [n.loading ? e(t.BentoLoadingIndicator, { staticClass: "b-inspector__loading-indicator", attrs: { large: "" } }) : n._t("content")], 2)])])], 1) : n._e()])], 1);
160
+ }, q = [], J = /* @__PURE__ */ $(
161
+ X,
162
+ j,
163
+ q,
164
+ !1,
165
+ null,
166
+ "62a28c4d"
167
+ );
168
+ const ce = J.exports;
169
+ export {
170
+ ce as B
171
+ };
172
+ //# sourceMappingURL=inspector.BzBPlz-5.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"inspector.Bnm0hl_D.js","sources":["../../src/components/inspector/composables/use-focus-history/use-focus-history.ts","../../src/components/inspector/inspector.vue"],"sourcesContent":["import { ref, type Ref } from 'vue';\nimport { useActiveElement } from '@vueuse/core';\nimport { watch } from 'vue';\n\n/**\n * A composable to track the focus history within a target element.\n * @param targetEl The stable parent element to monitor for focus changes.\n */\nexport function useFocusHistory(targetEl: Ref<HTMLElement | null>) {\n const MAX_HISTORY_LENGTH = 3;\n\n const focusHistory = ref<Array<Element>>([]);\n\n const currentActiveElement = useActiveElement();\n\n // Edge case 1:\n // While the inspector is opened, if user tabs through the data-grid to the inspector, and closes it,\n // it returns to the last element on the data grid regardless if it is a data-grid-cell.\n //\n // Edge case 2:\n // Buttons or actions teleported out of the data-grid may have the focus shifted into a different context.\n watch(currentActiveElement, newlyFocusedElement => {\n // Check if the newly focused element is a child of our target container.\n if (!targetEl.value || !newlyFocusedElement || !targetEl.value.contains(newlyFocusedElement)) {\n return;\n }\n\n // Add the focused element to the history\n focusHistory.value.unshift(newlyFocusedElement);\n\n if (focusHistory.value.length > MAX_HISTORY_LENGTH) {\n focusHistory.value.pop();\n }\n });\n\n /**\n * Iterates through the focus history to find the first valid element\n * that is still present in the DOM.\n * @returns The first valid historical element, or null if none are found.\n */\n const findValidFocusFallback = (): HTMLElement | null => {\n for (const el of focusHistory.value) {\n if (el && document.body.contains(el as Node)) {\n return el as HTMLElement;\n }\n }\n\n return null; // No valid fallback found\n };\n\n return {\n findValidFocusFallback,\n };\n}\n","<template>\n <div ref=\"wrapper\" class=\"b-inspector\" :class=\"conditionalClass\" @keydown=\"handleSectionFocus\">\n <div ref=\"page\" class=\"b-inspector__page-wrapper\">\n <div class=\"b-inspector__page\">\n <slot name=\"page\" />\n </div>\n </div>\n <Transition name=\"b-inspector__animation\" mode=\"out-in\" @before-enter=\"setFocus\" @after-leave=\"setFocus\">\n <aside\n v-if=\"isOpen\"\n ref=\"inspector\"\n class=\"b-inspector__container-wrapper\"\n :aria-label=\"inspectorAriaLabel\"\n @keydown.tab=\"handleTabNavigation\"\n >\n <bento-focus-trap :disabled=\"!isCompact\">\n <div class=\"b-inspector__container\">\n <div class=\"b-inspector__header\">\n <template v-if=\"!isCompact\">\n <bento-button\n class=\"b-inspector__return-content\"\n variant=\"secondary\"\n condensed\n :aria-describedby=\"returnToMainContentDescriptionId\"\n @click=\"moveFocusBetweenSections\"\n >\n {{ t('returnToMainContent') }}\n </bento-button>\n <span\n :id=\"returnToMainContentDescriptionId\"\n class=\"b-inspector__return-content-description\"\n >{{ t('returnToMainContentDescription') }}</span\n >\n </template>\n <bento-typography el=\"h2\" variant=\"title\" class=\"b-inspector__title\">\n {{ title }}\n </bento-typography>\n <div class=\"b-inspector__icons\">\n <bento-button v-if=\"expandable\" variant=\"tertiary\" @click=\"emit('expand')\">\n <template #iconLeft><expand-icon :svg-title=\"t('expand')\"></expand-icon></template>\n </bento-button>\n <bento-button variant=\"tertiary\" @click=\"emit('update:is-open', false)\">\n <template #iconLeft><cross-icon :svg-title=\"t('close')\"></cross-icon></template>\n </bento-button>\n </div>\n </div>\n <div class=\"b-inspector__content\">\n <bento-loading-indicator v-if=\"loading\" large class=\"b-inspector__loading-indicator\" />\n <slot v-else name=\"content\" />\n </div>\n </div>\n </bento-focus-trap>\n </aside>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, ref, watch } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoButton } from '@/components/button';\n import { BentoLoadingIndicator } from '@/components/loading-indicator';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import ExpandIcon from '@adyen/ui-assets-icons-16/vue/expand';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { deprecate } from '@/utils/ts/deprecate';\n import { getNextFocusableElement } from '@/utils/ts/focus-trap.utils';\n import { useElementSize } from '@vueuse/core';\n import moveFocusInside, { focusInside, getActiveElement } from 'focus-lock';\n\n import { type BentoInspectorProps } from './inspector.types';\n import { useFocusHistory } from './composables/use-focus-history/use-focus-history';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n activePage: { default: '' },\n expandable: { type: Boolean, default: false },\n isOpen: { type: Boolean, default: false },\n loading: { type: Boolean, default: false },\n size: { default: 'small' },\n title: null,\n relativeLayout: { default: 'push-content' },\n pageFocusAnchor: { default: null }\n});\n\n const emit = defineEmits([\"update:is-open\", \"update:active-page\", \"expand\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const returnToMainContentDescriptionId = generateUid('returnToMainContentDescription');\n const wrapper = ref<HTMLElement>(null);\n const inspector = ref<HTMLElement>(null);\n const page = ref<HTMLElement>(null);\n const inspectorLastFocusedElement = ref<HTMLElement>(null);\n\n const { width: wrapperWidth } = useElementSize(wrapper);\n\n const isCompact = computed(() => {\n const COMPACT_THRESHOLD_SMALL = 740;\n const COMPACT_THRESHOLD_LARGE = 915;\n\n // small inspector to occupy full screen if < 740px\n // large inspector to occupy full screen if < 915px\n const threshold = props.size === 'small' ? COMPACT_THRESHOLD_SMALL : COMPACT_THRESHOLD_LARGE;\n\n return wrapperWidth.value > 0 && wrapperWidth.value < threshold;\n });\n\n const computedPageLastFocusedElement = computed(() => props.pageFocusAnchor);\n\n const conditionalClass = computed(() => ({\n [`b-inspector--${props.size}`]: true,\n [`b-inspector--${props.relativeLayout}`]: true,\n [`b-inspector--is-compact`]: isCompact.value,\n }));\n\n const inspectorAriaLabel = computed(() => `${t('inspector')}, ${props.title}`);\n\n const { findValidFocusFallback } = useFocusHistory(page);\n\n const setFocus = async () => {\n if (props.isOpen) {\n await nextTick();\n moveFocusInside(inspector.value, computedPageLastFocusedElement.value);\n } else {\n // This doesn't work with data grid cell actions, as the button gets destroyed once is not being hovered.\n // To be reviewed after LevelAccess revision\n focusElement(computedPageLastFocusedElement.value ?? findValidFocusFallback());\n }\n };\n\n const handleTabNavigation = event => {\n if (isCompact.value) {\n return;\n }\n const direction = event.shiftKey ? -1 : 1;\n const focusableEl = getNextFocusableElement(direction, inspector.value);\n // If the nextfocusableEl is the same as the activeElement that means it's the last focusable element\n // inside the inspector, so the focus is moved back to the last focused element on the page\n if (getActiveElement() === focusableEl) {\n event.preventDefault();\n inspectorLastFocusedElement.value = document.activeElement as HTMLElement;\n focusElement(computedPageLastFocusedElement.value ?? findValidFocusFallback());\n // Set active-page as undefined when focus is not on page\n emit('update:active-page', undefined);\n }\n };\n\n const handleSectionFocus = event => {\n const sectionShortcut = event.shiftKey && event.ctrlKey && event.key === 'S';\n if (props.isOpen && !isCompact.value && sectionShortcut) {\n moveFocusBetweenSections();\n }\n };\n\n const moveFocusBetweenSections = () => {\n if (focusInside(inspector.value)) {\n inspectorLastFocusedElement.value = document.activeElement as HTMLElement;\n focusElement(computedPageLastFocusedElement.value ?? findValidFocusFallback());\n // Set active-page as undefined when focus is not on page\n emit('update:active-page', undefined);\n } else {\n focusElement(inspectorLastFocusedElement.value);\n }\n };\n\n const focusElement = (element: HTMLElement) => {\n if (!element) {\n return;\n }\n element?.focus();\n if (document.activeElement !== element) {\n focusElement(element.parentElement);\n }\n };\n\n watch(\n () => props.activePage,\n () => {\n if (props.activePage) {\n setFocus();\n }\n }\n );\n\n if (!props.activePage) {\n deprecate(\n 'BentoInspector \"active-page\" as optional',\n `Make sure to set the \"active-page\" prop and keep it in sync with \"update:active-page\".\n \"active-page\" prop will be required in the next version`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Inspector allows users to access additional information or details of an object/item. The inspector opens adjacent to the main content, pushing it aside to maintain visibility and accessibility to both the main content and inspector.\n *\n * @example\n * import { BentoInspector } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoInspector },\n * template: `\n * <bento-inspector\n * title=\"Inspector\"\n * size=\"large\"\n * :is-open=\"isOpen\"\n * :active-page=\"activePage\"\n * expandable\n * @update:is-open=\"isOpen = $event\"\n * @update:active-page=\"activePage = $event\"\n * >\n * <template #page>Content of the page</template>\n * <template #content>Content of the inspector</template>\n * </bento-inspector>\n * `\n * }\n */\n export default { i18n: { messages } };\n</script>\n\n<style lang=\"scss\" scoped src=\"./inspector.scss\" />\n"],"names":["useFocusHistory","targetEl","focusHistory","ref","currentActiveElement","useActiveElement","watch","newlyFocusedElement","el","__default__","messages","t","useI18n","returnToMainContentDescriptionId","generateUid","wrapper","inspector","page","inspectorLastFocusedElement","wrapperWidth","useElementSize","isCompact","computed","threshold","props","computedPageLastFocusedElement","conditionalClass","inspectorAriaLabel","findValidFocusFallback","setFocus$1","nextTick","setFocus","focusElement","handleTabNavigation","event","direction","focusableEl","getNextFocusableElement","getActiveElement","emit","handleSectionFocus","sectionShortcut","moveFocusBetweenSections","focusInside","element","deprecate"],"mappings":";;;;;;;;;;;;AAQO,SAAAA,EAAAC,GAAA;AAGH,QAAAC,IAAAC,EAAA,CAAA,CAAA,GAEAC,IAAAC,EAAA;AAQA,SAAAC,EAAAF,GAAA,CAAAG,MAAA;AAEI,IAAA,CAAAN,EAAA,SAAA,CAAAM,KAAA,CAAAN,EAAA,MAAA,SAAAM,CAAA,MAKAL,EAAA,MAAA,QAAAK,CAAA,GAEAL,EAAA,MAAA,SAAA,KACIA,EAAA,MAAA,IAAA;AAAA,EACJ,CAAA,GAkBJ;AAAA,IAAO,wBAVP,MAAA;AACI,iBAAAM,KAAAN,EAAA;AACI,YAAAM,KAAA,SAAA,KAAA,SAAAA,CAAA;AACI,iBAAAA;AAIR,aAAA;AAAA,IAAO;AAAA,EAIP;AAER;;;;;GC2KIC,IAAA,EAAA,MAAA,EAAA,UAAAC,EAAA,EAAA;;;;;;;;;;;;;;;iBApIA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GACAC,IAAAC,EAAA,gCAAA,GACAC,IAAAZ,EAAA,IAAA,GACAa,IAAAb,EAAA,IAAA,GACAc,IAAAd,EAAA,IAAA,GACAe,IAAAf,EAAA,IAAA,GAEA,EAAA,OAAAgB,EAAA,IAAAC,EAAAL,CAAA,GAEAM,IAAAC,EAAA,MAAA;AAMI,YAAAC,IAAAC,EAAA,SAAA,UAAA,MAAA;AAEA,aAAAL,EAAA,QAAA,KAAAA,EAAA,QAAAI;AAAA,IAAsD,CAAA,GAG1DE,IAAAH,EAAA,MAAAE,EAAA,eAAA,GAEAE,IAAAJ,EAAA,OAAA;AAAA,MAAyC,CAAA,gBAAAE,EAAA,IAAA,EAAA,GAAA;AAAA,MACL,CAAA,gBAAAA,EAAA,cAAA,EAAA,GAAA;AAAA,MACU,2BAAAH,EAAA;AAAA,IACH,EAAA,GAG3CM,IAAAL,EAAA,MAAA,GAAAX,EAAA,WAAA,CAAA,KAAAa,EAAA,KAAA,EAAA,GAEA,EAAA,wBAAAI,EAAA,IAAA5B,EAAAiB,CAAA,GAEAY,IAAA,YAAA;AACI,MAAAL,EAAA,UACI,MAAAM,EAAA,GACAC,EAAAf,EAAA,OAAAS,EAAA,KAAA,KAIAO,EAAAP,EAAA,SAAAG,EAAA,CAAA;AAAA,IACJ,GAGJK,IAAA,CAAAC,MAAA;AACI,UAAAb,EAAA;AACI;AAEJ,YAAAc,IAAAD,EAAA,WAAA,KAAA,GACAE,IAAAC,EAAAF,GAAAnB,EAAA,KAAA;AAGA,MAAAsB,EAAA,MAAAF,MACIF,EAAA,eAAA,GACAhB,EAAA,QAAA,SAAA,eACAc,EAAAP,EAAA,SAAAG,EAAA,CAAA,GAEAW,EAAA,sBAAA,MAAA;AAAA,IACJ,GAGJC,IAAA,CAAAN,MAAA;AACI,YAAAO,IAAAP,EAAA,YAAAA,EAAA,WAAAA,EAAA,QAAA;AACA,MAAAV,EAAA,UAAA,CAAAH,EAAA,SAAAoB,KACIC,EAAA;AAAA,IACJ,GAGJA,IAAA,MAAA;AACI,MAAAC,EAAA3B,EAAA,KAAA,KACIE,EAAA,QAAA,SAAA,eACAc,EAAAP,EAAA,SAAAG,EAAA,CAAA,GAEAW,EAAA,sBAAA,MAAA,KAEAP,EAAAd,EAAA,KAAA;AAAA,IACJ,GAGJc,IAAA,CAAAY,MAAA;AACI,MAAAA,MAGAA,KAAA,QAAAA,EAAA,SACA,SAAA,kBAAAA,KACIZ,EAAAY,EAAA,aAAA;AAAA,IACJ;AAGJ,WAAAtC;AAAA,MAAA,MAAAkB,EAAA;AAAA,MACgB,MAAA;AAER,QAAAA,EAAA,cACIK,EAAA;AAAA,MACJ;AAAA,IACJ,GAGJL,EAAA,cACIqB;AAAA,MAAA;AAAA,MACI;AAAA;AAAA,MACA;AAAA,IAEA;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"inspector.BzBPlz-5.js","sources":["../../src/components/inspector/composables/use-focus-history/use-focus-history.ts","../../src/components/inspector/inspector.vue"],"sourcesContent":["import { ref, type Ref } from 'vue';\nimport { useActiveElement } from '@vueuse/core';\nimport { watch } from 'vue';\n\n/**\n * A composable to track the focus history within a target element.\n * @param targetEl The stable parent element to monitor for focus changes.\n */\nexport function useFocusHistory(targetEl: Ref<HTMLElement | null>) {\n const MAX_HISTORY_LENGTH = 3;\n\n const focusHistory = ref<Array<Element>>([]);\n\n const currentActiveElement = useActiveElement();\n\n // Edge case 1:\n // While the inspector is opened, if user tabs through the data-grid to the inspector, and closes it,\n // it returns to the last element on the data grid regardless if it is a data-grid-cell.\n //\n // Edge case 2:\n // Buttons or actions teleported out of the data-grid may have the focus shifted into a different context.\n watch(currentActiveElement, newlyFocusedElement => {\n // Check if the newly focused element is a child of our target container.\n if (!targetEl.value || !newlyFocusedElement || !targetEl.value.contains(newlyFocusedElement)) {\n return;\n }\n\n // Add the focused element to the history\n focusHistory.value.unshift(newlyFocusedElement);\n\n if (focusHistory.value.length > MAX_HISTORY_LENGTH) {\n focusHistory.value.pop();\n }\n });\n\n /**\n * Iterates through the focus history to find the first valid element\n * that is still present in the DOM.\n * @returns The first valid historical element, or null if none are found.\n */\n const findValidFocusFallback = (): HTMLElement | null => {\n for (const el of focusHistory.value) {\n if (el && document.body.contains(el as Node)) {\n return el as HTMLElement;\n }\n }\n\n return null; // No valid fallback found\n };\n\n return {\n findValidFocusFallback,\n };\n}\n","<template>\n <div ref=\"wrapper\" class=\"b-inspector\" :class=\"conditionalClass\" @keydown=\"handleSectionFocus\">\n <div ref=\"page\" class=\"b-inspector__page-wrapper\">\n <div class=\"b-inspector__page\">\n <slot name=\"page\" />\n </div>\n </div>\n <Transition name=\"b-inspector__animation\" mode=\"out-in\" @before-enter=\"setFocus\" @after-leave=\"setFocus\">\n <aside\n v-if=\"isOpen\"\n ref=\"inspector\"\n class=\"b-inspector__container-wrapper\"\n :aria-label=\"inspectorAriaLabel\"\n @keydown.tab=\"handleTabNavigation\"\n >\n <bento-focus-trap :disabled=\"!isCompact\">\n <div class=\"b-inspector__container\">\n <div class=\"b-inspector__header\">\n <template v-if=\"!isCompact\">\n <bento-button\n class=\"b-inspector__return-content\"\n variant=\"secondary\"\n condensed\n :aria-describedby=\"returnToMainContentDescriptionId\"\n @click=\"moveFocusBetweenSections\"\n >\n {{ t('returnToMainContent') }}\n </bento-button>\n <span\n :id=\"returnToMainContentDescriptionId\"\n class=\"b-inspector__return-content-description\"\n >{{ t('returnToMainContentDescription') }}</span\n >\n </template>\n <bento-typography el=\"h2\" variant=\"title\" class=\"b-inspector__title\">\n {{ title }}\n </bento-typography>\n <div class=\"b-inspector__icons\">\n <bento-button v-if=\"expandable\" variant=\"tertiary\" @click=\"emit('expand')\">\n <template #iconLeft><expand-icon :svg-title=\"t('expand')\"></expand-icon></template>\n </bento-button>\n <bento-button variant=\"tertiary\" @click=\"emit('update:is-open', false)\">\n <template #iconLeft><cross-icon :svg-title=\"t('close')\"></cross-icon></template>\n </bento-button>\n </div>\n </div>\n <div class=\"b-inspector__content\">\n <bento-loading-indicator v-if=\"loading\" large class=\"b-inspector__loading-indicator\" />\n <slot v-else name=\"content\" />\n </div>\n </div>\n </bento-focus-trap>\n </aside>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, ref, watch } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoButton } from '@/components/button';\n import { BentoLoadingIndicator } from '@/components/loading-indicator';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import ExpandIcon from '@adyen/ui-assets-icons-16/vue/expand';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { deprecate } from '@/utils/ts/deprecate';\n import { getNextFocusableElement } from '@/utils/ts/focus-trap.utils';\n import { useElementSize } from '@vueuse/core';\n import moveFocusInside, { focusInside, getActiveElement } from 'focus-lock';\n\n import { type BentoInspectorProps } from './inspector.types';\n import { useFocusHistory } from './composables/use-focus-history/use-focus-history';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n activePage: { default: '' },\n expandable: { type: Boolean, default: false },\n isOpen: { type: Boolean, default: false },\n loading: { type: Boolean, default: false },\n size: { default: 'small' },\n title: null,\n relativeLayout: { default: 'push-content' },\n pageFocusAnchor: { default: null }\n});\n\n const emit = defineEmits([\"update:is-open\", \"update:active-page\", \"expand\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const returnToMainContentDescriptionId = generateUid('returnToMainContentDescription');\n const wrapper = ref<HTMLElement>(null);\n const inspector = ref<HTMLElement>(null);\n const page = ref<HTMLElement>(null);\n const inspectorLastFocusedElement = ref<HTMLElement>(null);\n\n const { width: wrapperWidth } = useElementSize(wrapper);\n\n const isCompact = computed(() => {\n const COMPACT_THRESHOLD_SMALL = 740;\n const COMPACT_THRESHOLD_LARGE = 915;\n\n // small inspector to occupy full screen if < 740px\n // large inspector to occupy full screen if < 915px\n const threshold = props.size === 'small' ? COMPACT_THRESHOLD_SMALL : COMPACT_THRESHOLD_LARGE;\n\n return wrapperWidth.value > 0 && wrapperWidth.value < threshold;\n });\n\n const computedPageLastFocusedElement = computed(() => props.pageFocusAnchor);\n\n const conditionalClass = computed(() => ({\n [`b-inspector--${props.size}`]: true,\n [`b-inspector--${props.relativeLayout}`]: true,\n [`b-inspector--is-compact`]: isCompact.value,\n }));\n\n const inspectorAriaLabel = computed(() => `${t('inspector')}, ${props.title}`);\n\n const { findValidFocusFallback } = useFocusHistory(page);\n\n const setFocus = async () => {\n if (props.isOpen) {\n await nextTick();\n moveFocusInside(inspector.value, computedPageLastFocusedElement.value);\n } else {\n // This doesn't work with data grid cell actions, as the button gets destroyed once is not being hovered.\n // To be reviewed after LevelAccess revision\n focusElement(computedPageLastFocusedElement.value ?? findValidFocusFallback());\n }\n };\n\n const handleTabNavigation = event => {\n if (isCompact.value) {\n return;\n }\n const direction = event.shiftKey ? -1 : 1;\n const focusableEl = getNextFocusableElement(direction, inspector.value);\n // If the nextfocusableEl is the same as the activeElement that means it's the last focusable element\n // inside the inspector, so the focus is moved back to the last focused element on the page\n if (getActiveElement() === focusableEl) {\n event.preventDefault();\n inspectorLastFocusedElement.value = document.activeElement as HTMLElement;\n focusElement(computedPageLastFocusedElement.value ?? findValidFocusFallback());\n // Set active-page as undefined when focus is not on page\n emit('update:active-page', undefined);\n }\n };\n\n const handleSectionFocus = event => {\n const sectionShortcut = event.shiftKey && event.ctrlKey && event.key === 'S';\n if (props.isOpen && !isCompact.value && sectionShortcut) {\n moveFocusBetweenSections();\n }\n };\n\n const moveFocusBetweenSections = () => {\n if (focusInside(inspector.value)) {\n inspectorLastFocusedElement.value = document.activeElement as HTMLElement;\n focusElement(computedPageLastFocusedElement.value ?? findValidFocusFallback());\n // Set active-page as undefined when focus is not on page\n emit('update:active-page', undefined);\n } else {\n focusElement(inspectorLastFocusedElement.value);\n }\n };\n\n const focusElement = (element: HTMLElement) => {\n if (!element) {\n return;\n }\n element?.focus();\n if (document.activeElement !== element) {\n focusElement(element.parentElement);\n }\n };\n\n watch(\n () => props.activePage,\n () => {\n if (props.activePage) {\n setFocus();\n }\n }\n );\n\n if (!props.activePage) {\n deprecate(\n 'BentoInspector \"active-page\" as optional',\n `Make sure to set the \"active-page\" prop and keep it in sync with \"update:active-page\".\n \"active-page\" prop will be required in the next version`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Inspector allows users to access additional information or details of an object/item. The inspector opens adjacent to the main content, pushing it aside to maintain visibility and accessibility to both the main content and inspector.\n *\n * @example\n * import { BentoInspector } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoInspector },\n * template: `\n * <bento-inspector\n * title=\"Inspector\"\n * size=\"large\"\n * :is-open=\"isOpen\"\n * :active-page=\"activePage\"\n * expandable\n * @update:is-open=\"isOpen = $event\"\n * @update:active-page=\"activePage = $event\"\n * >\n * <template #page>Content of the page</template>\n * <template #content>Content of the inspector</template>\n * </bento-inspector>\n * `\n * }\n */\n export default { i18n: { messages } };\n</script>\n\n<style lang=\"scss\" scoped src=\"./inspector.scss\" />\n"],"names":["useFocusHistory","targetEl","focusHistory","ref","currentActiveElement","useActiveElement","watch","newlyFocusedElement","el","__default__","messages","useI18n","returnToMainContentDescriptionId","generateUid","wrapper","inspector","page","inspectorLastFocusedElement","wrapperWidth","useElementSize","isCompact","computed","threshold","props","computedPageLastFocusedElement","conditionalClass","inspectorAriaLabel","findValidFocusFallback","setFocus$1","nextTick","setFocus","focusElement","handleTabNavigation","event","direction","focusableEl","getNextFocusableElement","getActiveElement","emit","handleSectionFocus","sectionShortcut","moveFocusBetweenSections","focusInside","element","deprecate"],"mappings":";;;;;;;;;;;;AAQO,SAAAA,EAAAC,GAAA;AAGH,QAAAC,IAAAC,EAAA,CAAA,CAAA,GAEAC,IAAAC,EAAA;AAQA,SAAAC,EAAAF,GAAA,CAAAG,MAAA;AAEI,IAAA,CAAAN,EAAA,SAAA,CAAAM,KAAA,CAAAN,EAAA,MAAA,SAAAM,CAAA,MAKAL,EAAA,MAAA,QAAAK,CAAA,GAEAL,EAAA,MAAA,SAAA,KACIA,EAAA,MAAA,IAAA;AAAA,EACJ,CAAA,GAkBJ;AAAA,IAAO,wBAVP,MAAA;AACI,iBAAAM,KAAAN,EAAA;AACI,YAAAM,KAAA,SAAA,KAAA,SAAAA,CAAA;AACI,iBAAAA;AAIR,aAAA;AAAA,IAAO;AAAA,EAIP;AAER;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GC2KIC,IAAA,EAAA,MAAA,EAAA,UAAAC,EAAA,EAAA;;;;;;;;;;;;;;;iBApIA,EAAA,EAAA,IAAAC,EAAA,GACAC,IAAAC,EAAA,gCAAA,GACAC,IAAAX,EAAA,IAAA,GACAY,IAAAZ,EAAA,IAAA,GACAa,IAAAb,EAAA,IAAA,GACAc,IAAAd,EAAA,IAAA,GAEA,EAAA,OAAAe,EAAA,IAAAC,EAAAL,CAAA,GAEAM,IAAAC,EAAA,MAAA;AAMI,YAAAC,IAAAC,EAAA,SAAA,UAAA,MAAA;AAEA,aAAAL,EAAA,QAAA,KAAAA,EAAA,QAAAI;AAAA,IAAsD,CAAA,GAG1DE,IAAAH,EAAA,MAAAE,EAAA,eAAA,GAEAE,IAAAJ,EAAA,OAAA;AAAA,MAAyC,CAAA,gBAAAE,EAAA,IAAA,EAAA,GAAA;AAAA,MACL,CAAA,gBAAAA,EAAA,cAAA,EAAA,GAAA;AAAA,MACU,2BAAAH,EAAA;AAAA,IACH,EAAA,GAG3CM,IAAAL,EAAA,MAAA,GAAA,EAAA,WAAA,CAAA,KAAAE,EAAA,KAAA,EAAA,GAEA,EAAA,wBAAAI,EAAA,IAAA3B,EAAAgB,CAAA,GAEAY,IAAA,YAAA;AACI,MAAAL,EAAA,UACI,MAAAM,EAAA,GACAC,EAAAf,EAAA,OAAAS,EAAA,KAAA,KAIAO,EAAAP,EAAA,SAAAG,EAAA,CAAA;AAAA,IACJ,GAGJK,IAAA,CAAAC,MAAA;AACI,UAAAb,EAAA;AACI;AAEJ,YAAAc,IAAAD,EAAA,WAAA,KAAA,GACAE,IAAAC,EAAAF,GAAAnB,EAAA,KAAA;AAGA,MAAAsB,EAAA,MAAAF,MACIF,EAAA,eAAA,GACAhB,EAAA,QAAA,SAAA,eACAc,EAAAP,EAAA,SAAAG,EAAA,CAAA,GAEAW,EAAA,sBAAA,MAAA;AAAA,IACJ,GAGJC,IAAA,CAAAN,MAAA;AACI,YAAAO,IAAAP,EAAA,YAAAA,EAAA,WAAAA,EAAA,QAAA;AACA,MAAAV,EAAA,UAAA,CAAAH,EAAA,SAAAoB,KACIC,EAAA;AAAA,IACJ,GAGJA,IAAA,MAAA;AACI,MAAAC,EAAA3B,EAAA,KAAA,KACIE,EAAA,QAAA,SAAA,eACAc,EAAAP,EAAA,SAAAG,EAAA,CAAA,GAEAW,EAAA,sBAAA,MAAA,KAEAP,EAAAd,EAAA,KAAA;AAAA,IACJ,GAGJc,IAAA,CAAAY,MAAA;AACI,MAAAA,MAGAA,KAAA,QAAAA,EAAA,SACA,SAAA,kBAAAA,KACIZ,EAAAY,EAAA,aAAA;AAAA,IACJ;AAGJ,WAAArC;AAAA,MAAA,MAAAiB,EAAA;AAAA,MACgB,MAAA;AAER,QAAAA,EAAA,cACIK,EAAA;AAAA,MACJ;AAAA,IACJ,GAGJL,EAAA,cACIqB;AAAA,MAAA;AAAA,MACI;AAAA;AAAA,MACA;AAAA,IAEA;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,39 +1,66 @@
1
- import { defineComponent as g, computed as r } from "vue";
2
- import { RouterLink as m } from "vue-router";
3
- import { g as b } from "./generate-uid.NJ8tVoha.js";
1
+ import { defineComponent as b, computed as r } from "vue";
2
+ import { RouterLink as g } from "vue-router";
3
+ import { g as m } from "./generate-uid.NJ8tVoha.js";
4
4
  import { B as y } from "./typography.C8lPlsbD.js";
5
- import { u as k } from "./index.B6WW_F-J.js";
5
+ import { u as T } from "./index.B6WW_F-J.js";
6
6
  /* empty css */
7
- import { n as p } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
7
+ import { n as c } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
8
8
  import "../assets/link.css";
9
9
  var s = /* @__PURE__ */ ((a) => (a.DEFAULT = "default", a.QUIET = "quiet", a))(s || {});
10
- let c = 0;
11
- const x = {
10
+ let p = 0;
11
+ const k = {
12
12
  beforeCreate() {
13
- this.uuid = c.toString(), c += 1;
13
+ this.uuid = p.toString(), p += 1;
14
14
  }
15
15
  };
16
16
  var h = function() {
17
17
  var t = this, e = t._self._c;
18
18
  return e("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? e("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), e("path", { attrs: { fill: "#001222", d: "M2.93933 11.9999L10.1893 4.74989H5.24999V3.24989H12.75V10.7499H11.25V5.81055L3.99999 13.0605L2.93933 11.9999Z" } })]);
19
- }, T = [], B = /* @__PURE__ */ p(
20
- x,
19
+ }, x = [], I = /* @__PURE__ */ c(
20
+ k,
21
21
  h,
22
- T,
22
+ x,
23
23
  !1,
24
24
  null,
25
25
  null
26
26
  );
27
- const C = B.exports, I = {
28
- "en-US": { opensInNewTab: "Opens in new tab" },
29
- "ja-JP": { opensInNewTab: "新しいタブで開きます" },
30
- "pt-BR": { opensInNewTab: "Abre em uma nova aba" }
31
- }, w = {
27
+ const w = I.exports, B = {
28
+ "de-DE": {
29
+ opensInNewTab: "Wird in neuem Tab geöffnet"
30
+ },
31
+ "en-GB": {
32
+ opensInNewTab: "Opens in new tab"
33
+ },
34
+ "en-US": {
35
+ opensInNewTab: "Opens in new tab"
36
+ },
37
+ "es-ES": {
38
+ opensInNewTab: "Se abre en una nueva pestaña"
39
+ },
40
+ "es-MX": {
41
+ opensInNewTab: "Se abre en una nueva pestaña"
42
+ },
43
+ "fr-FR": {
44
+ opensInNewTab: "S'ouvre dans un nouvel onglet"
45
+ },
46
+ "it-IT": {
47
+ opensInNewTab: "Si apre in una nuova scheda"
48
+ },
49
+ "ja-JP": {
50
+ opensInNewTab: "新しいタブで開きます"
51
+ },
52
+ "pt-BR": {
53
+ opensInNewTab: "Abre em uma nova aba"
54
+ },
55
+ "zh-CN": {
56
+ opensInNewTab: "在新标签页中打开"
57
+ }
58
+ }, C = {
32
59
  name: "bento-link",
33
60
  inheritAttrs: !1,
34
- i18n: { messages: I }
35
- }, L = /* @__PURE__ */ g({
36
- ...w,
61
+ i18n: { messages: B }
62
+ }, N = /* @__PURE__ */ b({
63
+ ...C,
37
64
  props: {
38
65
  to: null,
39
66
  replace: { type: Boolean },
@@ -56,40 +83,40 @@ const C = B.exports, I = {
56
83
  },
57
84
  emits: ["click"],
58
85
  setup(a, { emit: t }) {
59
- const e = a, { t: n } = k(), i = {
86
+ const e = a, { t: n } = T(), i = {
60
87
  variant: void 0,
61
88
  isButton: void 0,
62
89
  truncate: void 0,
63
90
  disableTypography: void 0,
64
91
  external: void 0,
65
92
  isNotRouting: void 0
66
- }, u = b("external-link"), _ = (o) => o, d = r(() => ({
93
+ }, u = m("external-link"), _ = (o) => o, d = r(() => ({
67
94
  "b-link": !e.isButton,
68
95
  [`b-link--${s.QUIET}`]: e.variant === s.QUIET,
69
96
  "b-link--truncate": e.truncate
70
97
  })), f = r(() => e.external ? e.target ?? "_blank" : e.target), v = r(() => !(e.isButton || e.isNotRouting));
71
98
  return { __sfc: !0, t: n, props: e, nonForwardedProps: i, externalLinkId: u, getAttributeTitle: _, conditionalClasses: d, computedTarget: f, showExternalLinkIcon: v, emit: t, onClick: (o, l) => {
72
99
  t("click", o), l && l();
73
- }, RouterLink: m, BentoTypography: y, ExternalLinkIcon: C };
100
+ }, RouterLink: g, BentoTypography: y, ExternalLinkIcon: w };
74
101
  }
75
102
  });
76
- var $ = function() {
103
+ var L = function() {
77
104
  var t = this, e = t._self._c, n = t._self._setupProxy;
78
105
  return t.external || t.isNotRouting ? e("a", t._b({ class: n.conditionalClasses, attrs: { "aria-describedby": n.externalLinkId, href: t.$props.to.toString(), title: n.getAttributeTitle(t.$attrs.title), target: n.computedTarget }, on: { click: n.onClick } }, "a", t.$attrs, !1), [t.disableTypography ? t._t("default") : e(n.BentoTypography, { staticClass: "b-link__text", attrs: { el: "span", variant: "body" } }, [t._t("default")], 2), n.showExternalLinkIcon ? e("span", { staticClass: "b-link__external-link-icon", attrs: { "aria-hidden": "true" } }, [e(n.ExternalLinkIcon)], 1) : t._e(), t.external ? e("span", { staticClass: "b-link--visually-hidden", attrs: { id: n.externalLinkId } }, [t._v(t._s(n.t("opensInNewTab")))]) : t._e()], 2) : e(n.RouterLink, t._b({ class: n.conditionalClasses, attrs: { target: t.target, to: n.props.to, custom: "" }, nativeOn: { click: function(i) {
79
106
  return n.onClick.apply(null, arguments);
80
107
  } } }, "router-link", { ...t.$attrs, ...t.$props, ...n.nonForwardedProps }, !1), [t.disableTypography ? t._t("default") : e(n.BentoTypography, { staticClass: "b-link__text", attrs: { el: "span", variant: "body" } }, [t._t("default")], 2)], 2);
81
- }, E = [], R = /* @__PURE__ */ p(
108
+ }, $ = [], E = /* @__PURE__ */ c(
109
+ N,
82
110
  L,
83
111
  $,
84
- E,
85
112
  !1,
86
113
  null,
87
114
  "7930653c"
88
115
  );
89
- const V = R.exports;
116
+ const O = E.exports;
90
117
  export {
91
- V as B,
92
- C as E,
118
+ O as B,
119
+ w as E,
93
120
  s as a
94
121
  };
95
- //# sourceMappingURL=link.MhoM3zQj.js.map
122
+ //# sourceMappingURL=link.DB5g6d48.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"link.MhoM3zQj.js","sources":["../../src/components/link/link.types.ts","../../../ui-assets/icons-16/dist/vue/external-link.vue","../../src/components/link/link.vue"],"sourcesContent":["import type { Location } from 'vue-router/types/router.d.ts';\n// TODO: revert to import once fully migrated to Vue 3\n// import type { RouterLinkProps } from 'vue-router/types/router.d.ts';\n\n/**\n * Manually defined RouterLinkProps to ensure compatibility\n * with Vue Macros and Vue 2.7 / 3 monorepos.\n */\nexport interface RouterLinkProps {\n /**\n * Denotes the target route of the link. When clicked, the value of the `to` prop will be passed to\n * `router.push()` internally, so the value can be either a string or a location descriptor object.\n */\n to: string | Location;\n /**\n * Setting `replace` prop will call `router.replace()` instead of `router.push()` when clicked, so the navigation will\n * not create a new history record.\n *\n * @default false\n */\n replace?: boolean;\n /**\n * Setting `append` prop always appends the relative path to the current path. For example, assuming we are navigating\n * from `/a` to a relative link `b`, without `append` we will end up at `/b`, but with append we will end up at\n * `/a/b`.\n *\n * @default false\n */\n append?: boolean;\n /**\n * Sometimes we want <RouterLink> to render as another tag, e.g <li>. Then we can use tag prop to specify which tag to\n * render to, and it will still listen to click events for navigation.\n *\n * @default \"a\"\n */\n tag?: string;\n /**\n * Configure the active CSS class applied when the link is active. Note the default value can also be configured\n * globally via the `linkActiveClass` router constructor option.\n *\n * @default \"router-link-active\"\n */\n activeClass?: string;\n /**\n * The default active class matching behavior is **inclusive match**. For example, `<RouterLink to=\"/a\">` will get\n * this class applied as long as the current path starts with `/a/` or is `/a`.\n *\n * @default false\n */\n exact?: boolean;\n /**\n * Allows matching only using the `path` section of the url, effectively ignoring the `query` and the `hash` sections.\n *\n * @default false\n */\n exactPath?: boolean;\n /**\n * Configure the active CSS class applied when the link is active with exact path match. Note the default value can\n * also be configured globally via the `linkExactPathActiveClass` router constructor option.\n *\n * @default \"router-link-exact-path-active\"\n */\n exactPathActiveClass?: string;\n\n /**\n * Specify the event(s) that can trigger the link navigation.\n *\n * @default 'click'\n */\n event?: string | ReadonlyArray<string>;\n /**\n * Configure the active CSS class applied when the link is active with exact match. Note the default value can also be\n * configured globally via the `linkExactActiveClass` router constructor option.\n *\n * @default \"router-link-exact-active\"\n */\n exactActiveClass?: string;\n /**\n * Configure the value of `aria-current` when the link is active with exact match. It must be one of the allowed\n * values for [aria-current](https://www.w3.org/TR/wai-aria-1.2/#aria-current) in the ARIA spec. In most cases, the\n * default of page should be the best fit.\n *\n * @default \"page\"\n */\n ariaCurrentValue?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoLinkVariant {\n DEFAULT = 'default',\n QUIET = 'quiet',\n}\n\nexport type BentoLinkProps = RouterLinkProps & {\n /**\n * Disable the default typography for the component. Only use this when the component is inside another typography component.\n */\n disableTypography?: boolean;\n\n /**\n * Set the rendered link to a regular external anchor link and renders an external link icon.\n */\n external?: boolean;\n\n /**\n * Set to true if used inside a `BentoButton` component.\n */\n isButton?: boolean;\n\n /**\n * Set the rendered link to a regular external anchor link.\n */\n isNotRouting?: boolean;\n\n /**\n * Sets the target of the rendered link.\n */\n target?: string;\n\n /**\n * Set to true to truncate link. Doesn't work with disableTypography.\n */\n truncate?: boolean;\n\n /**\n * Link variant type affecting visual style.\n * @values default, quiet\n */\n variant?: BentoLinkVariant | `${BentoLinkVariant}`;\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><path fill=\"#001222\" d=\"M2.93933 11.9999L10.1893 4.74989H5.24999V3.24989H12.75V10.7499H11.25V5.81055L3.99999 13.0605L2.93933 11.9999Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <a\n v-if=\"external || isNotRouting\"\n :class=\"conditionalClasses\"\n v-bind=\"$attrs\"\n :aria-describedby=\"externalLinkId\"\n :href=\"$props.to.toString()\"\n :title=\"getAttributeTitle($attrs.title)\"\n :target=\"computedTarget\"\n @click=\"onClick\"\n >\n <bento-typography v-if=\"!disableTypography\" class=\"b-link__text\" el=\"span\" variant=\"body\">\n <slot />\n </bento-typography>\n <slot v-else />\n <span v-if=\"showExternalLinkIcon\" aria-hidden=\"true\" class=\"b-link__external-link-icon\">\n <external-link-icon />\n </span>\n <span v-if=\"external\" :id=\"externalLinkId\" class=\"b-link--visually-hidden\">{{ t('opensInNewTab') }}</span>\n </a>\n <router-link\n v-else\n v-bind=\"{ ...$attrs, ...$props, ...nonForwardedProps }\"\n :class=\"conditionalClasses\"\n :target=\"target\"\n :to=\"props.to\"\n custom\n @click.native=\"onClick\"\n >\n <bento-typography v-if=\"!disableTypography\" class=\"b-link__text\" el=\"span\" variant=\"body\">\n <slot />\n </bento-typography>\n <slot v-else />\n </router-link>\n</template>\n\n<script setup lang=\"ts\">\n import { RouterLink } from 'vue-router';\n import { computed } from 'vue';\n import { generateUid } from '@/core/utils/ts';\n import { BentoTypography } from '@/components/typography';\n import { type BentoLinkProps, BentoLinkVariant } from './link.types';\n import { useI18n } from '@/utils/ts/i18n';\n import type { RouterLinkSlotArgument } from 'vue-router/types/router.d.ts';\n import ExternalLinkIcon from '@adyen/ui-assets-icons-16/vue/external-link';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = defineProps({\n to: null,\n replace: { type: Boolean },\n append: { type: Boolean },\n tag: null,\n activeClass: null,\n exact: { type: Boolean },\n exactPath: { type: Boolean },\n exactPathActiveClass: null,\n event: null,\n exactActiveClass: null,\n ariaCurrentValue: null,\n disableTypography: { type: Boolean },\n external: { type: Boolean },\n isButton: { type: Boolean },\n isNotRouting: { type: Boolean },\n target: { default: null },\n truncate: { type: Boolean },\n variant: { default: BentoLinkVariant.DEFAULT }\n});\n\n // Props that should not be forwarded to the underlying anchor element\n const nonForwardedProps = {\n variant: undefined,\n isButton: undefined,\n truncate: undefined,\n disableTypography: undefined,\n external: undefined,\n isNotRouting: undefined,\n };\n\n const externalLinkId = generateUid('external-link');\n\n const getAttributeTitle = (attributesTitle: unknown) => attributesTitle as string;\n\n const conditionalClasses = computed(() => ({\n 'b-link': !props.isButton,\n [`b-link--${BentoLinkVariant.QUIET}`]: props.variant === BentoLinkVariant.QUIET,\n [`b-link--truncate`]: props.truncate,\n }));\n\n const computedTarget = computed(() => (props.external ? (props.target ?? '_blank') : props.target));\n const showExternalLinkIcon = computed(() => !(props.isButton || props.isNotRouting));\n\n const emit = defineEmits([\"click\"]);\n\n const onClick = (e: MouseEvent, navigateCallback?: RouterLinkSlotArgument['navigate']) => {\n emit('click', e);\n if (navigateCallback) {\n navigateCallback();\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Extends the `router-link` from the `vue-router` NPM package.\n *\n * @example\n * import { BentoLink } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoLink },\n * template: `\n * <bento-link to=\"/\">\n * link\n * </bento-link>\n * `\n * }\n */\n export default {\n name: 'bento-link',\n inheritAttrs: false,\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/link/link.scss\" />\n"],"names":["BentoLinkVariant","BentoLinkVariant2","uuid","_sfc_main$1","__default__","messages","t","useI18n","nonForwardedProps","externalLinkId","generateUid","getAttributeTitle","attributesTitle","conditionalClasses","computed","props","computedTarget","showExternalLinkIcon","e","navigateCallback","emit"],"mappings":";;;;;;;;AA0FO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,UAAA,WACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;ACnFZ,IAAAE,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;GC2GIE,IAAA;AAAA,EAAe,MAAA;AAAA,EACL,cAAA;AAAA,EACQ,MAAA,EAAA,UAAAC,EAAA;AAElB;;;;;;;;;;;;;;;;;;;;;;;;iBA5EA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAwBAC,IAAA;AAAA,MAA0B,SAAA;AAAA,MACb,UAAA;AAAA,MACC,UAAA;AAAA,MACA,mBAAA;AAAA,MACS,UAAA;AAAA,MACT,cAAA;AAAA,IACI,GAGlBC,IAAAC,EAAA,eAAA,GAEAC,IAAA,CAAAC,MAAAA,GAEAC,IAAAC,EAAA,OAAA;AAAA,MAA2C,UAAA,CAAAC,EAAA;AAAA,MACtB,CAAA,WAAAf,EAAA,KAAA,EAAA,GAAAe,EAAA,YAAAf,EAAA;AAAA,MACyD,oBAAAe,EAAA;AAAA,IAC9C,EAAA,GAGhCC,IAAAF,EAAA,MAAAC,EAAA,WAAAA,EAAA,UAAA,WAAAA,EAAA,MAAA,GACAE,IAAAH,EAAA,MAAA,EAAAC,EAAA,YAAAA,EAAA,aAAA;4LAIA,CAAAG,GAAAC,MAAA;AACI,MAAAC,EAAA,SAAAF,CAAA,GACAC,KACIA,EAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"link.DB5g6d48.js","sources":["../../src/components/link/link.types.ts","../../../ui-assets/icons-16/dist/vue/external-link.vue","../../src/components/link/link.vue"],"sourcesContent":["import type { Location } from 'vue-router/types/router.d.ts';\n// TODO: revert to import once fully migrated to Vue 3\n// import type { RouterLinkProps } from 'vue-router/types/router.d.ts';\n\n/**\n * Manually defined RouterLinkProps to ensure compatibility\n * with Vue Macros and Vue 2.7 / 3 monorepos.\n */\nexport interface RouterLinkProps {\n /**\n * Denotes the target route of the link. When clicked, the value of the `to` prop will be passed to\n * `router.push()` internally, so the value can be either a string or a location descriptor object.\n */\n to: string | Location;\n /**\n * Setting `replace` prop will call `router.replace()` instead of `router.push()` when clicked, so the navigation will\n * not create a new history record.\n *\n * @default false\n */\n replace?: boolean;\n /**\n * Setting `append` prop always appends the relative path to the current path. For example, assuming we are navigating\n * from `/a` to a relative link `b`, without `append` we will end up at `/b`, but with append we will end up at\n * `/a/b`.\n *\n * @default false\n */\n append?: boolean;\n /**\n * Sometimes we want <RouterLink> to render as another tag, e.g <li>. Then we can use tag prop to specify which tag to\n * render to, and it will still listen to click events for navigation.\n *\n * @default \"a\"\n */\n tag?: string;\n /**\n * Configure the active CSS class applied when the link is active. Note the default value can also be configured\n * globally via the `linkActiveClass` router constructor option.\n *\n * @default \"router-link-active\"\n */\n activeClass?: string;\n /**\n * The default active class matching behavior is **inclusive match**. For example, `<RouterLink to=\"/a\">` will get\n * this class applied as long as the current path starts with `/a/` or is `/a`.\n *\n * @default false\n */\n exact?: boolean;\n /**\n * Allows matching only using the `path` section of the url, effectively ignoring the `query` and the `hash` sections.\n *\n * @default false\n */\n exactPath?: boolean;\n /**\n * Configure the active CSS class applied when the link is active with exact path match. Note the default value can\n * also be configured globally via the `linkExactPathActiveClass` router constructor option.\n *\n * @default \"router-link-exact-path-active\"\n */\n exactPathActiveClass?: string;\n\n /**\n * Specify the event(s) that can trigger the link navigation.\n *\n * @default 'click'\n */\n event?: string | ReadonlyArray<string>;\n /**\n * Configure the active CSS class applied when the link is active with exact match. Note the default value can also be\n * configured globally via the `linkExactActiveClass` router constructor option.\n *\n * @default \"router-link-exact-active\"\n */\n exactActiveClass?: string;\n /**\n * Configure the value of `aria-current` when the link is active with exact match. It must be one of the allowed\n * values for [aria-current](https://www.w3.org/TR/wai-aria-1.2/#aria-current) in the ARIA spec. In most cases, the\n * default of page should be the best fit.\n *\n * @default \"page\"\n */\n ariaCurrentValue?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoLinkVariant {\n DEFAULT = 'default',\n QUIET = 'quiet',\n}\n\nexport type BentoLinkProps = RouterLinkProps & {\n /**\n * Disable the default typography for the component. Only use this when the component is inside another typography component.\n */\n disableTypography?: boolean;\n\n /**\n * Set the rendered link to a regular external anchor link and renders an external link icon.\n */\n external?: boolean;\n\n /**\n * Set to true if used inside a `BentoButton` component.\n */\n isButton?: boolean;\n\n /**\n * Set the rendered link to a regular external anchor link.\n */\n isNotRouting?: boolean;\n\n /**\n * Sets the target of the rendered link.\n */\n target?: string;\n\n /**\n * Set to true to truncate link. Doesn't work with disableTypography.\n */\n truncate?: boolean;\n\n /**\n * Link variant type affecting visual style.\n * @values default, quiet\n */\n variant?: BentoLinkVariant | `${BentoLinkVariant}`;\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><path fill=\"#001222\" d=\"M2.93933 11.9999L10.1893 4.74989H5.24999V3.24989H12.75V10.7499H11.25V5.81055L3.99999 13.0605L2.93933 11.9999Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <a\n v-if=\"external || isNotRouting\"\n :class=\"conditionalClasses\"\n v-bind=\"$attrs\"\n :aria-describedby=\"externalLinkId\"\n :href=\"$props.to.toString()\"\n :title=\"getAttributeTitle($attrs.title)\"\n :target=\"computedTarget\"\n @click=\"onClick\"\n >\n <bento-typography v-if=\"!disableTypography\" class=\"b-link__text\" el=\"span\" variant=\"body\">\n <slot />\n </bento-typography>\n <slot v-else />\n <span v-if=\"showExternalLinkIcon\" aria-hidden=\"true\" class=\"b-link__external-link-icon\">\n <external-link-icon />\n </span>\n <span v-if=\"external\" :id=\"externalLinkId\" class=\"b-link--visually-hidden\">{{ t('opensInNewTab') }}</span>\n </a>\n <router-link\n v-else\n v-bind=\"{ ...$attrs, ...$props, ...nonForwardedProps }\"\n :class=\"conditionalClasses\"\n :target=\"target\"\n :to=\"props.to\"\n custom\n @click.native=\"onClick\"\n >\n <bento-typography v-if=\"!disableTypography\" class=\"b-link__text\" el=\"span\" variant=\"body\">\n <slot />\n </bento-typography>\n <slot v-else />\n </router-link>\n</template>\n\n<script setup lang=\"ts\">\n import { RouterLink } from 'vue-router';\n import { computed } from 'vue';\n import { generateUid } from '@/core/utils/ts';\n import { BentoTypography } from '@/components/typography';\n import { type BentoLinkProps, BentoLinkVariant } from './link.types';\n import { useI18n } from '@/utils/ts/i18n';\n import type { RouterLinkSlotArgument } from 'vue-router/types/router.d.ts';\n import ExternalLinkIcon from '@adyen/ui-assets-icons-16/vue/external-link';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = defineProps({\n to: null,\n replace: { type: Boolean },\n append: { type: Boolean },\n tag: null,\n activeClass: null,\n exact: { type: Boolean },\n exactPath: { type: Boolean },\n exactPathActiveClass: null,\n event: null,\n exactActiveClass: null,\n ariaCurrentValue: null,\n disableTypography: { type: Boolean },\n external: { type: Boolean },\n isButton: { type: Boolean },\n isNotRouting: { type: Boolean },\n target: { default: null },\n truncate: { type: Boolean },\n variant: { default: BentoLinkVariant.DEFAULT }\n});\n\n // Props that should not be forwarded to the underlying anchor element\n const nonForwardedProps = {\n variant: undefined,\n isButton: undefined,\n truncate: undefined,\n disableTypography: undefined,\n external: undefined,\n isNotRouting: undefined,\n };\n\n const externalLinkId = generateUid('external-link');\n\n const getAttributeTitle = (attributesTitle: unknown) => attributesTitle as string;\n\n const conditionalClasses = computed(() => ({\n 'b-link': !props.isButton,\n [`b-link--${BentoLinkVariant.QUIET}`]: props.variant === BentoLinkVariant.QUIET,\n [`b-link--truncate`]: props.truncate,\n }));\n\n const computedTarget = computed(() => (props.external ? (props.target ?? '_blank') : props.target));\n const showExternalLinkIcon = computed(() => !(props.isButton || props.isNotRouting));\n\n const emit = defineEmits([\"click\"]);\n\n const onClick = (e: MouseEvent, navigateCallback?: RouterLinkSlotArgument['navigate']) => {\n emit('click', e);\n if (navigateCallback) {\n navigateCallback();\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Extends the `router-link` from the `vue-router` NPM package.\n *\n * @example\n * import { BentoLink } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoLink },\n * template: `\n * <bento-link to=\"/\">\n * link\n * </bento-link>\n * `\n * }\n */\n export default {\n name: 'bento-link',\n inheritAttrs: false,\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/link/link.scss\" />\n"],"names":["BentoLinkVariant","BentoLinkVariant2","uuid","_sfc_main$1","__default__","messages","t","useI18n","nonForwardedProps","externalLinkId","generateUid","getAttributeTitle","attributesTitle","conditionalClasses","computed","props","computedTarget","showExternalLinkIcon","e","navigateCallback","emit"],"mappings":";;;;;;;;AA0FO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,UAAA,WACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;ACnFZ,IAAAE,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GC2GIE,IAAA;AAAA,EAAe,MAAA;AAAA,EACL,cAAA;AAAA,EACQ,MAAA,EAAA,UAAAC,EAAA;AAElB;;;;;;;;;;;;;;;;;;;;;;;;iBA5EA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAwBAC,IAAA;AAAA,MAA0B,SAAA;AAAA,MACb,UAAA;AAAA,MACC,UAAA;AAAA,MACA,mBAAA;AAAA,MACS,UAAA;AAAA,MACT,cAAA;AAAA,IACI,GAGlBC,IAAAC,EAAA,eAAA,GAEAC,IAAA,CAAAC,MAAAA,GAEAC,IAAAC,EAAA,OAAA;AAAA,MAA2C,UAAA,CAAAC,EAAA;AAAA,MACtB,CAAA,WAAAf,EAAA,KAAA,EAAA,GAAAe,EAAA,YAAAf,EAAA;AAAA,MACyD,oBAAAe,EAAA;AAAA,IAC9C,EAAA,GAGhCC,IAAAF,EAAA,MAAAC,EAAA,WAAAA,EAAA,UAAA,WAAAA,EAAA,MAAA,GACAE,IAAAH,EAAA,MAAA,EAAAC,EAAA,YAAAA,EAAA,aAAA;4LAIA,CAAAG,GAAAC,MAAA;AACI,MAAAC,EAAA,SAAAF,CAAA,GACAC,KACIA,EAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ import { defineComponent as a, computed as n, useSlots as d } from "vue";
2
2
  import { n as r } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
3
3
  import { C as m } from "./chevron-right-small.BKeb_dRX.js";
4
4
  import { B as u } from "./status.CKb07vxI.js";
5
- import { B as f } from "./tag.CocLKztJ.js";
5
+ import { B as f } from "./tag.D2xagTJv.js";
6
6
  import { B as h } from "./typography.C8lPlsbD.js";
7
7
  import { u as v } from "./use-has-slot.C9lQZ6nz.js";
8
8
  import "../assets/list-item.css";
@@ -73,4 +73,4 @@ export {
73
73
  z as a,
74
74
  P as l
75
75
  };
76
- //# sourceMappingURL=list-item.BnzU1LIu.js.map
76
+ //# sourceMappingURL=list-item.DqTHh8-Z.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-item.BnzU1LIu.js","sources":["../../src/components/list/list.vue","../../src/components/list/components/list-item/list-item.vue"],"sourcesContent":["<template>\n <component :is=\"listElement\" class=\"b-list\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import type { BentoListProps } from './list.types';\n\n const props = defineProps({\n type: { default: 'unordered' }\n});\n\n const listElement = computed(() => (props.type === 'ordered' ? 'ol' : 'ul'));\n</script>\n\n<script lang=\"ts\">\n /**\n * `BentoList` renders an ordered or unordered list container for `BentoListItem` rows.\n *\n * @example\n * import { BentoList, BentoListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoList, BentoListItem },\n * template: `\n * <bento-list>\n * <bento-list-item\n * label=\"Payment details\"\n * description=\"Updated 2 hours ago\"\n * :tag=\"{ label: 'Live', variant: 'green' }\"\n * show-bottom-divider\n * />\n * <bento-list-item\n * label=\"Risk configuration\"\n * description=\"Updated yesterday\"\n * :tag=\"{ label: 'Review', variant: 'orange' }\"\n * />\n * </bento-list>\n * `\n * }\n */\n export default {\n name: 'bento-list',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./list.scss\" />\n","<template>\n <li class=\"b-list-item\" @click=\"onItemClick\" @keydown=\"onItemKeydown\">\n <bento-typography\n class=\"b-list-item__inner\"\n :class=\"conditionalClasses\"\n el=\"div\"\n :role=\"props.withChevron ? 'button' : undefined\"\n :tabindex=\"props.withChevron ? 0 : undefined\"\n >\n <div v-if=\"hasSlot('image')\" class=\"b-list-item__image\">\n <slot name=\"image\" />\n </div>\n\n <div v-if=\"hasSlot('start')\" class=\"b-list-item__start\">\n <slot name=\"start\" />\n </div>\n\n <div class=\"b-list-item__content\">\n <div v-if=\"hasSlot('content')\" class=\"b-list-item__label\">\n <slot name=\"content\" />\n </div>\n\n <template v-else>\n <div class=\"b-list-item__header\">\n <bento-typography v-if=\"props.label\" class=\"b-list-item__label\" el=\"span\" stronger>\n {{ props.label }}\n </bento-typography>\n <bento-status\n v-if=\"props.showStatus\"\n class=\"b-list-item__status\"\n :variant=\"props.statusColor\"\n aria-hidden=\"true\"\n />\n <bento-tag v-if=\"props.tag\" v-bind=\"props.tag\" class=\"b-list-item__tag\" />\n </div>\n <span v-if=\"props.description\" class=\"b-list-item__description\">\n {{ props.description }}\n </span>\n </template>\n </div>\n\n <div v-if=\"hasSlot('end')\" class=\"b-list-item__end\">\n <slot name=\"end\" />\n </div>\n\n <chevron-right-icon v-if=\"props.withChevron\" class=\"b-list-item__chevron\" aria-hidden=\"true\" />\n </bento-typography>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useSlots } from 'vue';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right-small';\n import { BentoStatus } from '@/components/status';\n import { BentoTag } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import type { BentoListItemProps } from './list-item.types';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const props = defineProps({\n label: null,\n description: null,\n showStatus: { type: Boolean, default: false },\n statusColor: { default: 'blue' },\n tag: { default: undefined },\n withChevron: { type: Boolean, default: false },\n showTopDivider: { type: Boolean, default: false },\n showBottomDivider: { type: Boolean, default: false }\n});\n\n const emit = defineEmits([\"click\"]);\n\n const onItemClick = (): void => {\n if (!props.withChevron) {\n return;\n }\n emit('click');\n };\n\n const onItemKeydown = (event: KeyboardEvent): void => {\n if (!props.withChevron) {\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n emit('click');\n }\n };\n\n const conditionalClasses = computed(() => ({\n 'b-list-item__inner--clickable': props.withChevron,\n 'b-list-item__inner--top-divider': props.showTopDivider,\n 'b-list-item__inner--bottom-divider': props.showBottomDivider,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * `BentoListItem` renders an item to be used inside `BentoList`.\n *\n * @example\n * import { BentoList, BentoListItem, BentoButton, BentoToggle } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoList, BentoListItem, BentoButton, BentoToggle },\n * template: `\n * <bento-list>\n * <bento-list-item\n * label=\"Payment details\"\n * description=\"Updated 2 hours ago\"\n * :tag=\"{ label: 'Live', variant: 'green' }\"\n * show-bottom-divider\n * >\n * <template #start>\n * <bento-toggle />\n * </template>\n * <template #end>\n * <bento-button variant=\"secondary\">Edit</bento-button>\n * </template>\n * </bento-list-item>\n * </bento-list>\n * `\n * }\n */\n\n export default {\n name: 'bento-list-item',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./list-item.scss\" />\n"],"names":["__default__$1","listElement","computed","props","__default__","slots","useSlots","hasSlot","useHasSlot","onItemClick","emit","onItemKeydown","event","conditionalClasses"],"mappings":";;;;;;;;AA2CI,MAAAA,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;iBA/BAC,IAAAC,EAAA,MAAAC,EAAA,SAAA,YAAA,OAAA,IAAA;;;;;;;;;;;;;;;qBCkHAC,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;;;;;;;iBAvEAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAeAI,IAAA,MAAA;AACI,MAAAN,EAAA,eAGAO,EAAA,OAAA;AAAA,IAAY,GAGhBC,IAAA,CAAAC,MAAA;AACI,MAAAT,EAAA,gBAGAS,EAAA,QAAA,WAAAA,EAAA,QAAA,SACIA,EAAA,eAAA,GACAF,EAAA,OAAA;AAAA,IACJ,GAGJG,IAAAX,EAAA,OAAA;AAAA,MAA2C,iCAAAC,EAAA;AAAA,MACA,mCAAAA,EAAA;AAAA,MACE,sCAAAA,EAAA;AAAA,IACG,EAAA;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"list-item.DqTHh8-Z.js","sources":["../../src/components/list/list.vue","../../src/components/list/components/list-item/list-item.vue"],"sourcesContent":["<template>\n <component :is=\"listElement\" class=\"b-list\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import type { BentoListProps } from './list.types';\n\n const props = defineProps({\n type: { default: 'unordered' }\n});\n\n const listElement = computed(() => (props.type === 'ordered' ? 'ol' : 'ul'));\n</script>\n\n<script lang=\"ts\">\n /**\n * `BentoList` renders an ordered or unordered list container for `BentoListItem` rows.\n *\n * @example\n * import { BentoList, BentoListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoList, BentoListItem },\n * template: `\n * <bento-list>\n * <bento-list-item\n * label=\"Payment details\"\n * description=\"Updated 2 hours ago\"\n * :tag=\"{ label: 'Live', variant: 'green' }\"\n * show-bottom-divider\n * />\n * <bento-list-item\n * label=\"Risk configuration\"\n * description=\"Updated yesterday\"\n * :tag=\"{ label: 'Review', variant: 'orange' }\"\n * />\n * </bento-list>\n * `\n * }\n */\n export default {\n name: 'bento-list',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./list.scss\" />\n","<template>\n <li class=\"b-list-item\" @click=\"onItemClick\" @keydown=\"onItemKeydown\">\n <bento-typography\n class=\"b-list-item__inner\"\n :class=\"conditionalClasses\"\n el=\"div\"\n :role=\"props.withChevron ? 'button' : undefined\"\n :tabindex=\"props.withChevron ? 0 : undefined\"\n >\n <div v-if=\"hasSlot('image')\" class=\"b-list-item__image\">\n <slot name=\"image\" />\n </div>\n\n <div v-if=\"hasSlot('start')\" class=\"b-list-item__start\">\n <slot name=\"start\" />\n </div>\n\n <div class=\"b-list-item__content\">\n <div v-if=\"hasSlot('content')\" class=\"b-list-item__label\">\n <slot name=\"content\" />\n </div>\n\n <template v-else>\n <div class=\"b-list-item__header\">\n <bento-typography v-if=\"props.label\" class=\"b-list-item__label\" el=\"span\" stronger>\n {{ props.label }}\n </bento-typography>\n <bento-status\n v-if=\"props.showStatus\"\n class=\"b-list-item__status\"\n :variant=\"props.statusColor\"\n aria-hidden=\"true\"\n />\n <bento-tag v-if=\"props.tag\" v-bind=\"props.tag\" class=\"b-list-item__tag\" />\n </div>\n <span v-if=\"props.description\" class=\"b-list-item__description\">\n {{ props.description }}\n </span>\n </template>\n </div>\n\n <div v-if=\"hasSlot('end')\" class=\"b-list-item__end\">\n <slot name=\"end\" />\n </div>\n\n <chevron-right-icon v-if=\"props.withChevron\" class=\"b-list-item__chevron\" aria-hidden=\"true\" />\n </bento-typography>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useSlots } from 'vue';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right-small';\n import { BentoStatus } from '@/components/status';\n import { BentoTag } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import type { BentoListItemProps } from './list-item.types';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const props = defineProps({\n label: null,\n description: null,\n showStatus: { type: Boolean, default: false },\n statusColor: { default: 'blue' },\n tag: { default: undefined },\n withChevron: { type: Boolean, default: false },\n showTopDivider: { type: Boolean, default: false },\n showBottomDivider: { type: Boolean, default: false }\n});\n\n const emit = defineEmits([\"click\"]);\n\n const onItemClick = (): void => {\n if (!props.withChevron) {\n return;\n }\n emit('click');\n };\n\n const onItemKeydown = (event: KeyboardEvent): void => {\n if (!props.withChevron) {\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n emit('click');\n }\n };\n\n const conditionalClasses = computed(() => ({\n 'b-list-item__inner--clickable': props.withChevron,\n 'b-list-item__inner--top-divider': props.showTopDivider,\n 'b-list-item__inner--bottom-divider': props.showBottomDivider,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * `BentoListItem` renders an item to be used inside `BentoList`.\n *\n * @example\n * import { BentoList, BentoListItem, BentoButton, BentoToggle } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoList, BentoListItem, BentoButton, BentoToggle },\n * template: `\n * <bento-list>\n * <bento-list-item\n * label=\"Payment details\"\n * description=\"Updated 2 hours ago\"\n * :tag=\"{ label: 'Live', variant: 'green' }\"\n * show-bottom-divider\n * >\n * <template #start>\n * <bento-toggle />\n * </template>\n * <template #end>\n * <bento-button variant=\"secondary\">Edit</bento-button>\n * </template>\n * </bento-list-item>\n * </bento-list>\n * `\n * }\n */\n\n export default {\n name: 'bento-list-item',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./list-item.scss\" />\n"],"names":["__default__$1","listElement","computed","props","__default__","slots","useSlots","hasSlot","useHasSlot","onItemClick","emit","onItemKeydown","event","conditionalClasses"],"mappings":";;;;;;;;AA2CI,MAAAA,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;iBA/BAC,IAAAC,EAAA,MAAAC,EAAA,SAAA,YAAA,OAAA,IAAA;;;;;;;;;;;;;;;qBCkHAC,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;;;;;;;iBAvEAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAeAI,IAAA,MAAA;AACI,MAAAN,EAAA,eAGAO,EAAA,OAAA;AAAA,IAAY,GAGhBC,IAAA,CAAAC,MAAA;AACI,MAAAT,EAAA,gBAGAS,EAAA,QAAA,WAAAA,EAAA,QAAA,SACIA,EAAA,eAAA,GACAF,EAAA,OAAA;AAAA,IACJ,GAGJG,IAAAX,EAAA,OAAA;AAAA,MAA2C,iCAAAC,EAAA;AAAA,MACA,mCAAAA,EAAA;AAAA,MACE,sCAAAA,EAAA;AAAA,IACG,EAAA;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as n, computed as e } from "vue";
2
- import { B as s } from "./tag.CocLKztJ.js";
2
+ import { B as s } from "./tag.D2xagTJv.js";
3
3
  import { B as r } from "./typography.C8lPlsbD.js";
4
4
  import { n as i } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
5
5
  import "../assets/listbox-option-tag.css";
@@ -41,4 +41,4 @@ const v = m.exports;
41
41
  export {
42
42
  v as L
43
43
  };
44
- //# sourceMappingURL=listbox-option-tag.BhPVuAjJ.js.map
44
+ //# sourceMappingURL=listbox-option-tag.CvbE-EuG.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"listbox-option-tag.BhPVuAjJ.js","sources":["../../src/components/internal/listbox/components/listbox-option-tag/listbox-option-tag.vue"],"sourcesContent":["<template>\n <span class=\"b-listbox-tag-option\">\n <span :aria-hidden=\"!!option.label\">\n <bento-tag class=\"b-listbox-tag-option__tag\" :label=\"option.value.toString()\" :variant=\"variant\" />\n </span>\n <bento-typography v-if=\"option.label\" el=\"span\" class=\"b-listbox-tag-option__label\">\n {{ option.label }}\n </bento-typography>\n </span>\n</template>\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import type { BentoListboxOptionItem } from '@/types/listbox';\n import { BentoTag, type BentoTagVariant } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n\n /**\n * A Tag Dropdown option item used in the Dropdown and Filter components.\n */\n export default defineComponent({\n name: 'listbox-tag-option',\n components: {\n BentoTag,\n BentoTypography,\n },\n props: {\n /**\n * The option item that contains all the option item's data.\n * @type {BentoListboxOptionItem}\n */\n option: {\n type: Object as PropType<BentoListboxOptionItem>,\n required: true,\n },\n },\n setup(props) {\n const variant = computed(() => props.option.data as BentoTagVariant);\n\n return {\n // Values\n variant,\n };\n },\n });\n</script>\n<style lang=\"scss\" scoped src=\"./listbox-option-tag.scss\" />\n"],"names":["_sfc_main","defineComponent","BentoTag","BentoTypography","props","computed"],"mappings":";;;;;AAmBA,MAAAA,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,EACA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,QAAA;AAAA,MAKA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,MAAAC,GAAA;AAIA,WAAA;AAAA;AAAA,MAAA,SAFAC,EAAA,MAAAD,EAAA,OAAA,IAAA;AAAA,IAIA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"listbox-option-tag.CvbE-EuG.js","sources":["../../src/components/internal/listbox/components/listbox-option-tag/listbox-option-tag.vue"],"sourcesContent":["<template>\n <span class=\"b-listbox-tag-option\">\n <span :aria-hidden=\"!!option.label\">\n <bento-tag class=\"b-listbox-tag-option__tag\" :label=\"option.value.toString()\" :variant=\"variant\" />\n </span>\n <bento-typography v-if=\"option.label\" el=\"span\" class=\"b-listbox-tag-option__label\">\n {{ option.label }}\n </bento-typography>\n </span>\n</template>\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import type { BentoListboxOptionItem } from '@/types/listbox';\n import { BentoTag, type BentoTagVariant } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n\n /**\n * A Tag Dropdown option item used in the Dropdown and Filter components.\n */\n export default defineComponent({\n name: 'listbox-tag-option',\n components: {\n BentoTag,\n BentoTypography,\n },\n props: {\n /**\n * The option item that contains all the option item's data.\n * @type {BentoListboxOptionItem}\n */\n option: {\n type: Object as PropType<BentoListboxOptionItem>,\n required: true,\n },\n },\n setup(props) {\n const variant = computed(() => props.option.data as BentoTagVariant);\n\n return {\n // Values\n variant,\n };\n },\n });\n</script>\n<style lang=\"scss\" scoped src=\"./listbox-option-tag.scss\" />\n"],"names":["_sfc_main","defineComponent","BentoTag","BentoTypography","props","computed"],"mappings":";;;;;AAmBA,MAAAA,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,EACA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,QAAA;AAAA,MAKA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,MAAAC,GAAA;AAIA,WAAA;AAAA;AAAA,MAAA,SAFAC,EAAA,MAAAD,EAAA,OAAA,IAAA;AAAA,IAIA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;"}