@adyen/bento-vue2 1.89.2 → 1.91.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 (296) hide show
  1. package/dist/@types/components.d.ts +4 -0
  2. package/dist/@types/index.d.ts +381 -118
  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-picker.css +1 -1
  15. package/dist/assets/date-range-picker.css +1 -1
  16. package/dist/assets/dialog-page.css +1 -1
  17. package/dist/assets/draggable-handle.css +1 -1
  18. package/dist/assets/dropdown.css +1 -1
  19. package/dist/assets/error-message.css +1 -1
  20. package/dist/assets/field-label.css +1 -0
  21. package/dist/assets/file-uploader.css +1 -1
  22. package/dist/assets/filter-bar.css +1 -1
  23. package/dist/assets/form-layout-title.css +1 -1
  24. package/dist/assets/input-field.css +1 -1
  25. package/dist/assets/input-time.css +1 -0
  26. package/dist/assets/inspector.css +1 -1
  27. package/dist/assets/modal-fullscreen.css +1 -1
  28. package/dist/assets/secondary-nav.css +1 -1
  29. package/dist/assets/sidepanel.css +1 -1
  30. package/dist/assets/use-cached-selected-values.css +1 -1
  31. package/dist/button.js +3 -3
  32. package/dist/card.js +1 -1
  33. package/dist/checkbox.js +2 -2
  34. package/dist/chip.js +1 -1
  35. package/dist/chunks/accordion-item.D0WVCLec.js +145 -0
  36. package/dist/chunks/{accordion-item.BZDSJamR.js.map → accordion-item.D0WVCLec.js.map} +1 -1
  37. package/dist/chunks/action-bar.Dj830k6L.js +334 -0
  38. package/dist/chunks/{action-bar.CYGUYI0V.js.map → action-bar.Dj830k6L.js.map} +1 -1
  39. package/dist/chunks/{ai-button.CR_ePQRR.js → ai-button.7L9bANlk.js} +2 -2
  40. package/dist/chunks/{ai-button.CR_ePQRR.js.map → ai-button.7L9bANlk.js.map} +1 -1
  41. package/dist/chunks/ai-tag.AyG2UWCB.js +110 -0
  42. package/dist/chunks/{ai-tag.Cjf38mjR.js.map → ai-tag.AyG2UWCB.js.map} +1 -1
  43. package/dist/chunks/alert.CXRb-Smf.js +160 -0
  44. package/dist/chunks/{alert.QVQ6Zjbm.js.map → alert.CXRb-Smf.js.map} +1 -1
  45. package/dist/chunks/{anchor-scroller.CjJ26PJS.js → anchor-scroller.DWaykZQj.js} +66 -39
  46. package/dist/chunks/{anchor-scroller.CjJ26PJS.js.map → anchor-scroller.DWaykZQj.js.map} +1 -1
  47. package/dist/chunks/{base-modal.DmWkavtf.js → base-modal.C52VMtnd.js} +104 -67
  48. package/dist/chunks/{base-modal.DmWkavtf.js.map → base-modal.C52VMtnd.js.map} +1 -1
  49. package/dist/chunks/{button-actions-with-menu.Bi_HXopk.js → button-actions-with-menu.OsPQ-POD.js} +2 -2
  50. package/dist/chunks/{button-actions-with-menu.Bi_HXopk.js.map → button-actions-with-menu.OsPQ-POD.js.map} +1 -1
  51. package/dist/chunks/{button-actions.BLk114As.js → button-actions.Bdbu0bvt.js} +222 -148
  52. package/dist/chunks/{button-actions.BLk114As.js.map → button-actions.Bdbu0bvt.js.map} +1 -1
  53. package/dist/chunks/{button.DxhJNOtr.js → button.C9b2AC9w.js} +2 -2
  54. package/dist/chunks/{button.DxhJNOtr.js.map → button.C9b2AC9w.js.map} +1 -1
  55. package/dist/chunks/{calendar.CXKhBF2f.js → calendar.CqsfThnC.js} +438 -346
  56. package/dist/chunks/calendar.CqsfThnC.js.map +1 -0
  57. package/dist/chunks/card.8z7UQeVK.js +165 -0
  58. package/dist/chunks/{card.GjhsXOT0.js.map → card.8z7UQeVK.js.map} +1 -1
  59. package/dist/chunks/{checkbox-group.B2BjU3ZN.js → checkbox-group.Dur2Edtw.js} +4 -4
  60. package/dist/chunks/{checkbox-group.B2BjU3ZN.js.map → checkbox-group.Dur2Edtw.js.map} +1 -1
  61. package/dist/chunks/{checkbox.CIv8WgGp.js → checkbox.vNjt6QDJ.js} +93 -56
  62. package/dist/chunks/{checkbox.CIv8WgGp.js.map → checkbox.vNjt6QDJ.js.map} +1 -1
  63. package/dist/chunks/chip.BFY_-VCz.js +84 -0
  64. package/dist/chunks/{chip.DTpENaGC.js.map → chip.BFY_-VCz.js.map} +1 -1
  65. package/dist/chunks/{click-outside.CDz_x8mN.js → click-outside.BG01Sm0A.js} +2 -2
  66. package/dist/chunks/{click-outside.CDz_x8mN.js.map → click-outside.BG01Sm0A.js.map} +1 -1
  67. package/dist/chunks/{code-snippet.YIm2oO_o.js → code-snippet.BVpFBhKq.js} +133 -76
  68. package/dist/chunks/{code-snippet.YIm2oO_o.js.map → code-snippet.BVpFBhKq.js.map} +1 -1
  69. package/dist/chunks/{controls-group.CqotnNEF.js → controls-group.DSm2Ujwt.js} +2 -2
  70. package/dist/chunks/{controls-group.CqotnNEF.js.map → controls-group.DSm2Ujwt.js.map} +1 -1
  71. package/dist/chunks/copy.qqGYFbKJ.js +133 -0
  72. package/dist/chunks/{copy.BVGQcf22.js.map → copy.qqGYFbKJ.js.map} +1 -1
  73. package/dist/chunks/{country.D20NCLLG.js → country.BEwW8TQo.js} +3 -3
  74. package/dist/chunks/{country.D20NCLLG.js.map → country.BEwW8TQo.js.map} +1 -1
  75. package/dist/chunks/country.types.jjXwaoMl.js +2537 -0
  76. package/dist/chunks/country.types.jjXwaoMl.js.map +1 -0
  77. package/dist/chunks/{dashboard-section.BubZyu8i.js → dashboard-section.DNxNVV44.js} +3 -3
  78. package/dist/chunks/{dashboard-section.BubZyu8i.js.map → dashboard-section.DNxNVV44.js.map} +1 -1
  79. package/dist/chunks/{dashed-underline.pjYTS0m1.js → dashed-underline.DL2_sik5.js} +3 -3
  80. package/dist/chunks/{dashed-underline.pjYTS0m1.js.map → dashed-underline.DL2_sik5.js.map} +1 -1
  81. package/dist/chunks/{data-grid-template.D8RhngPj.js → data-grid-template.BFv1zr6g.js} +4 -4
  82. package/dist/chunks/{data-grid-template.D8RhngPj.js.map → data-grid-template.BFv1zr6g.js.map} +1 -1
  83. package/dist/chunks/data-grid.ZHY5EzP3.js +4071 -0
  84. package/dist/chunks/data-grid.ZHY5EzP3.js.map +1 -0
  85. package/dist/chunks/date-picker.kl6aFlr1.js +237 -0
  86. package/dist/chunks/date-picker.kl6aFlr1.js.map +1 -0
  87. package/dist/chunks/date-range-picker.LCWVAa5R.js +1089 -0
  88. package/dist/chunks/date-range-picker.LCWVAa5R.js.map +1 -0
  89. package/dist/chunks/dialog-page.EdejG53a.js +143 -0
  90. package/dist/chunks/{dialog-page.oyG153fC.js.map → dialog-page.EdejG53a.js.map} +1 -1
  91. package/dist/chunks/{directive.rXUeDb8p.js → directive.Bfr4fuOy.js} +2 -2
  92. package/dist/chunks/{directive.rXUeDb8p.js.map → directive.Bfr4fuOy.js.map} +1 -1
  93. package/dist/chunks/draggable-handle.Ba28eM8o.js +245 -0
  94. package/dist/chunks/draggable-handle.Ba28eM8o.js.map +1 -0
  95. package/dist/chunks/{dropdown-tag.BRB-emd1.js → dropdown-tag.B61hPq5n.js} +5 -5
  96. package/dist/chunks/{dropdown-tag.BRB-emd1.js.map → dropdown-tag.B61hPq5n.js.map} +1 -1
  97. package/dist/chunks/dropdown.Ca-f8tdX.js +1140 -0
  98. package/dist/chunks/dropdown.Ca-f8tdX.js.map +1 -0
  99. package/dist/chunks/{empty-state.D_Ac-XXH.js → empty-state.DMV23IZy.js} +2 -2
  100. package/dist/chunks/{empty-state.D_Ac-XXH.js.map → empty-state.DMV23IZy.js.map} +1 -1
  101. package/dist/chunks/error-message.CyERcfdt.js +72 -0
  102. package/dist/chunks/error-message.CyERcfdt.js.map +1 -0
  103. package/dist/chunks/field-label.DjjjkcO6.js +97 -0
  104. package/dist/chunks/field-label.DjjjkcO6.js.map +1 -0
  105. package/dist/chunks/{file-uploader.D5Rjsx4k.js → file-uploader.DeWmLpfp.js} +751 -469
  106. package/dist/chunks/{file-uploader.D5Rjsx4k.js.map → file-uploader.DeWmLpfp.js.map} +1 -1
  107. package/dist/chunks/{filter-bar.zD_ctViU.js → filter-bar.Bd4ghW_B.js} +1596 -1039
  108. package/dist/chunks/filter-bar.Bd4ghW_B.js.map +1 -0
  109. package/dist/chunks/fixed-scroller.DR2E_No4.js +148 -0
  110. package/dist/chunks/{fixed-scroller.MerESbd_.js.map → fixed-scroller.DR2E_No4.js.map} +1 -1
  111. package/dist/chunks/{footer-actions.CiPj7hZG.js → footer-actions.CvUaoMzj.js} +3 -3
  112. package/dist/chunks/{footer-actions.CiPj7hZG.js.map → footer-actions.CvUaoMzj.js.map} +1 -1
  113. package/dist/chunks/form-layout-title.DzGajv4U.js +248 -0
  114. package/dist/chunks/form-layout-title.DzGajv4U.js.map +1 -0
  115. package/dist/chunks/{header-meta.Dq6TlNPw.js → header-meta.AXUGoqDd.js} +127 -73
  116. package/dist/chunks/{header-meta.Dq6TlNPw.js.map → header-meta.AXUGoqDd.js.map} +1 -1
  117. package/dist/chunks/{header-with-views.DaEhkSS8.js → header-with-views.Ba4dswJF.js} +1121 -680
  118. package/dist/chunks/{header-with-views.DaEhkSS8.js.map → header-with-views.Ba4dswJF.js.map} +1 -1
  119. package/dist/chunks/{header.DkC-KKWa.js → header.C7B7RBib.js} +3 -3
  120. package/dist/chunks/{header.DkC-KKWa.js.map → header.C7B7RBib.js.map} +1 -1
  121. package/dist/chunks/{info-icon.BF8KxU-k.js → info-icon.DCR42Kvm.js} +2 -2
  122. package/dist/chunks/{info-icon.BF8KxU-k.js.map → info-icon.DCR42Kvm.js.map} +1 -1
  123. package/dist/chunks/input-field-password.BNAtIn_D.js +381 -0
  124. package/dist/chunks/{input-field-password.BKT1mYUw.js.map → input-field-password.BNAtIn_D.js.map} +1 -1
  125. package/dist/chunks/{input-field-phone-number.BjRKjQOQ.js → input-field-phone-number.CEYx1s4b.js} +98 -71
  126. package/dist/chunks/{input-field-phone-number.BjRKjQOQ.js.map → input-field-phone-number.CEYx1s4b.js.map} +1 -1
  127. package/dist/chunks/input-field.Dh5W0Az-.js +211 -0
  128. package/dist/chunks/input-field.Dh5W0Az-.js.map +1 -0
  129. package/dist/chunks/input-time.BLuMfakv.js +135 -0
  130. package/dist/chunks/input-time.BLuMfakv.js.map +1 -0
  131. package/dist/chunks/inspector.BzBPlz-5.js +172 -0
  132. package/dist/chunks/{inspector.Bnm0hl_D.js.map → inspector.BzBPlz-5.js.map} +1 -1
  133. package/dist/chunks/{link.MhoM3zQj.js → link.DB5g6d48.js} +56 -29
  134. package/dist/chunks/{link.MhoM3zQj.js.map → link.DB5g6d48.js.map} +1 -1
  135. package/dist/chunks/{list-item.BnzU1LIu.js → list-item.DqTHh8-Z.js} +2 -2
  136. package/dist/chunks/{list-item.BnzU1LIu.js.map → list-item.DqTHh8-Z.js.map} +1 -1
  137. package/dist/chunks/{listbox-option-tag.BhPVuAjJ.js → listbox-option-tag.CvbE-EuG.js} +2 -2
  138. package/dist/chunks/{listbox-option-tag.BhPVuAjJ.js.map → listbox-option-tag.CvbE-EuG.js.map} +1 -1
  139. package/dist/chunks/{modal-fullscreen.CXOq6_Cv.js → modal-fullscreen.DTvg2NLk.js} +63 -36
  140. package/dist/chunks/{modal-fullscreen.CXOq6_Cv.js.map → modal-fullscreen.DTvg2NLk.js.map} +1 -1
  141. package/dist/chunks/{modal.o0KddMiG.js → modal.D_TcWTkf.js} +63 -36
  142. package/dist/chunks/{modal.o0KddMiG.js.map → modal.D_TcWTkf.js.map} +1 -1
  143. package/dist/chunks/on-click-outside.Cy1eFULD.js +109 -0
  144. package/dist/chunks/on-click-outside.Cy1eFULD.js.map +1 -0
  145. package/dist/chunks/{pagination.ZISqB4M_.js → pagination.D6BxMw5L.js} +221 -99
  146. package/dist/chunks/{pagination.ZISqB4M_.js.map → pagination.D6BxMw5L.js.map} +1 -1
  147. package/dist/chunks/promo-banner.Dc_kK1x9.js +91 -0
  148. package/dist/chunks/{promo-banner.Db2kh2qK.js.map → promo-banner.Dc_kK1x9.js.map} +1 -1
  149. package/dist/chunks/{radio-group.DnMy7brs.js → radio-group.Bb-L-0io.js} +4 -4
  150. package/dist/chunks/{radio-group.DnMy7brs.js.map → radio-group.Bb-L-0io.js.map} +1 -1
  151. package/dist/chunks/{rich-text-editor.Cbv1DxXn.js → rich-text-editor.Dtdfh-0V.js} +1782 -1731
  152. package/dist/chunks/{rich-text-editor.Cbv1DxXn.js.map → rich-text-editor.Dtdfh-0V.js.map} +1 -1
  153. package/dist/chunks/search-bar.MVJS9-Mh.js +126 -0
  154. package/dist/chunks/{search-bar.DPjYDhja.js.map → search-bar.MVJS9-Mh.js.map} +1 -1
  155. package/dist/chunks/secondary-nav.C-nPZR-2.js +226 -0
  156. package/dist/chunks/secondary-nav.C-nPZR-2.js.map +1 -0
  157. package/dist/chunks/{segmented-control.BqIiX9hv.js → segmented-control.DDtjX-V5.js} +2 -2
  158. package/dist/chunks/{segmented-control.BqIiX9hv.js.map → segmented-control.DDtjX-V5.js.map} +1 -1
  159. package/dist/chunks/{selection-card-group.IPiouuot.js → selection-card-group.CLJPaknG.js} +3 -3
  160. package/dist/chunks/{selection-card-group.IPiouuot.js.map → selection-card-group.CLJPaknG.js.map} +1 -1
  161. package/dist/chunks/{sidepanel.BGMjjB3F.js → sidepanel.BTRfwGiS.js} +66 -39
  162. package/dist/chunks/{sidepanel.BGMjjB3F.js.map → sidepanel.BTRfwGiS.js.map} +1 -1
  163. package/dist/chunks/{step.QFER3tSj.js → step.TDm_ts1S.js} +92 -63
  164. package/dist/chunks/{step.QFER3tSj.js.map → step.TDm_ts1S.js.map} +1 -1
  165. package/dist/chunks/{structured-list-item.BDJKRC_8.js → structured-list-item.BBBtie1s.js} +58 -31
  166. package/dist/chunks/{structured-list-item.BDJKRC_8.js.map → structured-list-item.BBBtie1s.js.map} +1 -1
  167. package/dist/chunks/{summary-grid.types.CIkArZf5.js → summary-grid.types.DUIqCmwg.js} +5 -5
  168. package/dist/chunks/{summary-grid.types.CIkArZf5.js.map → summary-grid.types.DUIqCmwg.js.map} +1 -1
  169. package/dist/chunks/{tab.CaXF0dho.js → tab.CNIZyfZt.js} +2 -2
  170. package/dist/chunks/{tab.CaXF0dho.js.map → tab.CNIZyfZt.js.map} +1 -1
  171. package/dist/chunks/{tag.CocLKztJ.js → tag.D2xagTJv.js} +2 -2
  172. package/dist/chunks/{tag.CocLKztJ.js.map → tag.D2xagTJv.js.map} +1 -1
  173. package/dist/chunks/textarea.CJS-1I41.js +219 -0
  174. package/dist/chunks/{textarea.D4X6Ss9q.js.map → textarea.CJS-1I41.js.map} +1 -1
  175. package/dist/chunks/timeline-item.BOUWkLi1.js +322 -0
  176. package/dist/chunks/{timeline-item.C8BxWdy1.js.map → timeline-item.BOUWkLi1.js.map} +1 -1
  177. package/dist/chunks/{toast.BRI3G7TL.js → toast.d8vg71CB.js} +81 -54
  178. package/dist/chunks/{toast.BRI3G7TL.js.map → toast.d8vg71CB.js.map} +1 -1
  179. package/dist/chunks/{tooltip.CbsNGnhw.js → tooltip.BxtnF3is.js} +38 -36
  180. package/dist/chunks/tooltip.BxtnF3is.js.map +1 -0
  181. package/dist/chunks/{tutorial.BzV6bHQJ.js → tutorial.CZt_mcuT.js} +190 -103
  182. package/dist/chunks/{tutorial.BzV6bHQJ.js.map → tutorial.CZt_mcuT.js.map} +1 -1
  183. package/dist/chunks/{use-cached-selected-values.DqX2qsMC.js → use-cached-selected-values.BJbWbkEQ.js} +553 -417
  184. package/dist/chunks/use-cached-selected-values.BJbWbkEQ.js.map +1 -0
  185. package/dist/chunks/{use-country-items.CI8C7MLU.js → use-country-items.B4j8pAvW.js} +3 -3
  186. package/dist/chunks/{use-country-items.CI8C7MLU.js.map → use-country-items.B4j8pAvW.js.map} +1 -1
  187. package/dist/chunks/use-country-phon-code.ByqnuIni.js +6386 -0
  188. package/dist/chunks/use-country-phon-code.ByqnuIni.js.map +1 -0
  189. package/dist/chunks/{use-date-input-formatter.BYaTO3vz.js → use-date-input-formatter.Djf8AoLr.js} +2 -2
  190. package/dist/chunks/{use-date-input-formatter.BYaTO3vz.js.map → use-date-input-formatter.Djf8AoLr.js.map} +1 -1
  191. package/dist/chunks/use-touch-device.DTqFAbXh.js +11 -0
  192. package/dist/chunks/use-touch-device.DTqFAbXh.js.map +1 -0
  193. package/dist/click-outside.js +1 -1
  194. package/dist/code-snippet.js +1 -1
  195. package/dist/country.js +3 -3
  196. package/dist/dashboard-template.js +1 -1
  197. package/dist/dashed-underline.js +1 -1
  198. package/dist/data-grid-template.js +1 -1
  199. package/dist/data-grid.js +1 -1
  200. package/dist/date-picker.js +2 -2
  201. package/dist/date-range-picker.js +2 -2
  202. package/dist/draggable.js +1396 -0
  203. package/dist/draggable.js.map +1 -0
  204. package/dist/dropdown.js +11 -12
  205. package/dist/dropdown.js.map +1 -1
  206. package/dist/empty-state.js +1 -1
  207. package/dist/file-uploader.js +1 -1
  208. package/dist/filter-bar.js +1 -1
  209. package/dist/form-layout.js +1 -1
  210. package/dist/header-with-views.js +1 -1
  211. package/dist/header.js +1 -1
  212. package/dist/index.js +280 -275
  213. package/dist/index.js.map +1 -1
  214. package/dist/info-icon.js +1 -1
  215. package/dist/input-field-password.js +1 -1
  216. package/dist/input-field-phone-number.js +1 -1
  217. package/dist/input-field.js +1 -1
  218. package/dist/input-time.js +5 -0
  219. package/dist/input-time.js.map +1 -0
  220. package/dist/inspector.js +1 -1
  221. package/dist/internal.js +26 -25
  222. package/dist/internal.js.map +1 -1
  223. package/dist/link.js +1 -1
  224. package/dist/list.js +1 -1
  225. package/dist/menu.js +1 -1
  226. package/dist/modal-fullscreen.js +1 -1
  227. package/dist/modal.js +2 -2
  228. package/dist/pagination.js +1 -1
  229. package/dist/popover.js +1 -1
  230. package/dist/promo-banner.js +1 -1
  231. package/dist/radio-group.js +1 -1
  232. package/dist/rich-text-editor.js +1 -1
  233. package/dist/search-bar.js +2 -2
  234. package/dist/secondary-nav.js +1 -1
  235. package/dist/segmented-control.js +1 -1
  236. package/dist/selection-card.js +1 -1
  237. package/dist/sidepanel.js +1 -1
  238. package/dist/stepper.js +1 -1
  239. package/dist/structured-list.js +1 -1
  240. package/dist/summary-grid.js +1 -1
  241. package/dist/tabs.js +1 -1
  242. package/dist/tag.js +1 -1
  243. package/dist/textarea.js +1 -1
  244. package/dist/timeline.js +1 -1
  245. package/dist/toast.js +1 -1
  246. package/dist/tutorial.js +1 -1
  247. package/dist/web-types.json +297 -4
  248. package/package.json +10 -15
  249. package/dist/assets/dropdown-default-textbox.css +0 -1
  250. package/dist/chunks/accordion-item.BZDSJamR.js +0 -108
  251. package/dist/chunks/action-bar.CYGUYI0V.js +0 -207
  252. package/dist/chunks/ai-tag.Cjf38mjR.js +0 -73
  253. package/dist/chunks/alert.QVQ6Zjbm.js +0 -93
  254. package/dist/chunks/calendar.CXKhBF2f.js.map +0 -1
  255. package/dist/chunks/card.GjhsXOT0.js +0 -128
  256. package/dist/chunks/chip.DTpENaGC.js +0 -57
  257. package/dist/chunks/copy.BVGQcf22.js +0 -86
  258. package/dist/chunks/country.types.DxKjyd0S.js +0 -20
  259. package/dist/chunks/country.types.DxKjyd0S.js.map +0 -1
  260. package/dist/chunks/data-grid.DJG8Ty0A.js +0 -3194
  261. package/dist/chunks/data-grid.DJG8Ty0A.js.map +0 -1
  262. package/dist/chunks/date-picker.CnazYcSX.js +0 -155
  263. package/dist/chunks/date-picker.CnazYcSX.js.map +0 -1
  264. package/dist/chunks/date-range-picker.Bf9pRNL7.js +0 -811
  265. package/dist/chunks/date-range-picker.Bf9pRNL7.js.map +0 -1
  266. package/dist/chunks/debounce.DUTu11PS.js +0 -10
  267. package/dist/chunks/debounce.DUTu11PS.js.map +0 -1
  268. package/dist/chunks/dialog-page.oyG153fC.js +0 -116
  269. package/dist/chunks/dropdown-default-textbox.Dvzg0StF.js +0 -337
  270. package/dist/chunks/dropdown-default-textbox.Dvzg0StF.js.map +0 -1
  271. package/dist/chunks/dropdown.Ct7uhPr6.js +0 -696
  272. package/dist/chunks/dropdown.Ct7uhPr6.js.map +0 -1
  273. package/dist/chunks/error-message.RxdStT3S.js +0 -106
  274. package/dist/chunks/error-message.RxdStT3S.js.map +0 -1
  275. package/dist/chunks/filter-bar.zD_ctViU.js.map +0 -1
  276. package/dist/chunks/fixed-scroller.MerESbd_.js +0 -111
  277. package/dist/chunks/form-layout-title.Bw7VgOO5.js +0 -210
  278. package/dist/chunks/form-layout-title.Bw7VgOO5.js.map +0 -1
  279. package/dist/chunks/input-field-password.BKT1mYUw.js +0 -234
  280. package/dist/chunks/input-field.m1PMwa4C.js +0 -170
  281. package/dist/chunks/input-field.m1PMwa4C.js.map +0 -1
  282. package/dist/chunks/inspector.Bnm0hl_D.js +0 -105
  283. package/dist/chunks/on-click-outside.BW4rkhzG.js +0 -91
  284. package/dist/chunks/on-click-outside.BW4rkhzG.js.map +0 -1
  285. package/dist/chunks/promo-banner.Db2kh2qK.js +0 -64
  286. package/dist/chunks/search-bar.DPjYDhja.js +0 -89
  287. package/dist/chunks/secondary-nav.CwJjkJkj.js +0 -112
  288. package/dist/chunks/secondary-nav.CwJjkJkj.js.map +0 -1
  289. package/dist/chunks/textarea.D4X6Ss9q.js +0 -169
  290. package/dist/chunks/timeline-item.C8BxWdy1.js +0 -238
  291. package/dist/chunks/tooltip.CbsNGnhw.js.map +0 -1
  292. package/dist/chunks/use-cached-selected-values.DqX2qsMC.js.map +0 -1
  293. package/dist/chunks/use-country-phon-code.C6orQNnM.js +0 -291
  294. package/dist/chunks/use-country-phon-code.C6orQNnM.js.map +0 -1
  295. package/dist/draggable-handle.js +0 -149
  296. package/dist/draggable-handle.js.map +0 -1
@@ -1,14 +1,14 @@
1
- import { defineComponent as k, ref as c, computed as o, watch as h, provide as P, readonly as W, useSlots as z, inject as U, onMounted as Z, onBeforeUnmount as j } from "vue";
1
+ import { defineComponent as P, ref as c, computed as o, watch as h, provide as k, readonly as K, useSlots as W, inject as U, onMounted as Z, onBeforeUnmount as j } from "vue";
2
2
  import { B as $ } from "./typography.C8lPlsbD.js";
3
3
  import { u as G } from "./index.B6WW_F-J.js";
4
4
  import { B as R, a as M } from "./keyboard-navigation.DWmhelVv.js";
5
5
  import { n as w } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
6
- import { B as q } from "./base-button.BPRPrO0p.js";
7
- import { C as J } from "./checkmark-small.DVDtD4HQ.js";
8
- import { D as Q } from "./dot.BW9SneIk.js";
6
+ import { B as J } from "./base-button.BPRPrO0p.js";
7
+ import { C as X } from "./checkmark-small.DVDtD4HQ.js";
8
+ import { D as q } from "./dot.BW9SneIk.js";
9
9
  import "../assets/step.css";
10
- const X = (a) => {
11
- function s(u) {
10
+ const Q = (a) => {
11
+ function n(u) {
12
12
  return ({ detail: _ }) => {
13
13
  var t;
14
14
  _.preventDefault();
@@ -16,16 +16,16 @@ const X = (a) => {
16
16
  r < 0 || (t = a.value[r + u]) == null || t.focus();
17
17
  };
18
18
  }
19
- const n = s(-1), e = s(1);
19
+ const s = n(-1), e = n(1);
20
20
  return {
21
21
  [R.ARROW_DOWN]: e,
22
22
  [R.ARROW_RIGHT]: e,
23
- [R.ARROW_UP]: n,
24
- [R.ARROW_LEFT]: n
23
+ [R.ARROW_UP]: s,
24
+ [R.ARROW_LEFT]: s
25
25
  };
26
26
  }, Y = (a) => {
27
- const s = a.buttonElement.value.parentElement, n = s.parentElement;
28
- return Array.from(n.children).indexOf(s);
27
+ const n = a.buttonElement.value.parentElement, s = n.parentElement;
28
+ return Array.from(s.children).indexOf(n);
29
29
  }, F = (a) => ({ registerStep: (e) => {
30
30
  const u = Y(e);
31
31
  a.value.splice(u, 0, {
@@ -39,13 +39,42 @@ const X = (a) => {
39
39
  1
40
40
  );
41
41
  } }), O = /* @__PURE__ */ Symbol("stepper state");
42
- var V = /* @__PURE__ */ ((a) => (a.LINEAR = "linear", a.NON_LINEAR = "non-linear", a))(V || {}), L = /* @__PURE__ */ ((a) => (a.HORIZONTAL = "horizontal", a.VERTICAL = "vertical", a))(L || {});
42
+ var V = /* @__PURE__ */ ((a) => (a.LINEAR = "linear", a.NON_LINEAR = "non-linear", a))(V || {}), D = /* @__PURE__ */ ((a) => (a.HORIZONTAL = "horizontal", a.VERTICAL = "vertical", a))(D || {});
43
43
  const ee = {
44
- "en-US": { step: "Step {currentIndex}/{totalSteps} {content}" }
44
+ "de-DE": {
45
+ step: "Schritt {currentIndex}/{totalSteps} {content}"
46
+ },
47
+ "en-GB": {
48
+ step: "Step {currentIndex}/{totalSteps} {content}"
49
+ },
50
+ "en-US": {
51
+ step: "Step {currentIndex}/{totalSteps} {content}"
52
+ },
53
+ "es-ES": {
54
+ step: "Paso {currentIndex}/{totalSteps} {content}"
55
+ },
56
+ "es-MX": {
57
+ step: "Paso {currentIndex}/{totalSteps} {content}"
58
+ },
59
+ "fr-FR": {
60
+ step: "Étape {currentIndex}/{totalSteps} {content}"
61
+ },
62
+ "it-IT": {
63
+ step: "Passaggio {currentIndex}/{totalSteps} {content}"
64
+ },
65
+ "ja-JP": {
66
+ step: "Step {currentIndex}/{totalSteps} {content}"
67
+ },
68
+ "pt-BR": {
69
+ step: "Step {currentIndex}/{totalSteps} {content}"
70
+ },
71
+ "zh-CN": {
72
+ step: "步骤 {currentIndex}/{totalSteps} {content}"
73
+ }
45
74
  }, te = {
46
75
  i18n: { messages: ee },
47
76
  name: "stepper"
48
- }, se = /* @__PURE__ */ k({
77
+ }, ne = /* @__PURE__ */ P({
49
78
  ...te,
50
79
  props: {
51
80
  /**
@@ -73,56 +102,56 @@ const ee = {
73
102
  }
74
103
  },
75
104
  emits: ["update:index"],
76
- setup(a, { expose: s, emit: n }) {
105
+ setup(a, { expose: n, emit: s }) {
77
106
  const e = a, { t: u, n: _ } = G(), r = c([]), t = c(e.index), p = c(t.value), v = (i) => {
78
107
  i > p.value && (p.value = i), t.value = i;
79
- }, y = o(() => {
108
+ }, x = o(() => {
80
109
  var i;
81
110
  return (i = r.value[t.value]) == null ? void 0 : i.stepContent;
82
- }), E = o(() => r.value.length), d = o(() => r.value.map(({ buttonElement: i }) => i)), b = o(() => e.variant === L.HORIZONTAL), f = o(
83
- () => r.value.map(({ buttonElement: i, substeps: N }, I) => {
84
- const B = t.value === I;
111
+ }), E = o(() => r.value.length), d = o(() => r.value.map(({ buttonElement: i }) => i)), b = o(() => e.variant === D.HORIZONTAL), S = o(
112
+ () => r.value.map(({ buttonElement: i, substeps: N }, C) => {
113
+ const B = t.value === C;
85
114
  return !b.value && B ? [i].concat(N.map((T) => T.buttonElement)) : [i];
86
115
  }).flat()
87
- ), { registerStep: x, removeStep: C } = F(r), g = c({
116
+ ), { registerStep: y, removeStep: I } = F(r), g = c({
88
117
  activeStepIndex: t,
89
118
  latestActiveStep: p,
90
119
  steps: d,
91
120
  type: e.type,
92
121
  variant: e.variant,
93
122
  navigateToStep: v,
94
- registerStep: x,
95
- removeStep: C
96
- }), S = o(() => ({
123
+ registerStep: y,
124
+ removeStep: I
125
+ }), f = o(() => ({
97
126
  "b-stepper__list--horizontal": b.value
98
127
  }));
99
128
  h(() => e.index, v), h(t, (i) => {
100
- n("update:index", i);
129
+ s("update:index", i);
101
130
  });
102
- const A = X(f);
103
- P(O, W(g));
131
+ const A = Q(S);
132
+ k(O, K(g));
104
133
  const m = () => {
105
134
  t.value = 0, p.value = 0;
106
135
  };
107
- return s({
136
+ return n({
108
137
  reset: m
109
- }), { __sfc: !0, props: e, emit: n, t: u, n: _, childrenSteps: r, activeStepIndex: t, latestActiveStep: p, navigateToStep: v, currentStepContent: y, stepsAmount: E, childrenStepsElements: d, isHorizontalVariant: b, allVisibleStepsElements: f, registerStep: x, removeStep: C, stepperState: g, conditionalClasses: S, keyboardNavigationListeners: A, reset: m, BentoTypography: $, vBentoKeyboardNavigationDirective: M };
138
+ }), { __sfc: !0, props: e, emit: s, t: u, n: _, childrenSteps: r, activeStepIndex: t, latestActiveStep: p, navigateToStep: v, currentStepContent: x, stepsAmount: E, childrenStepsElements: d, isHorizontalVariant: b, allVisibleStepsElements: S, registerStep: y, removeStep: I, stepperState: g, conditionalClasses: f, keyboardNavigationListeners: A, reset: m, BentoTypography: $, vBentoKeyboardNavigationDirective: M };
110
139
  }
111
140
  });
112
- var ne = function() {
113
- var s = this, n = s._self._c, e = s._self._setupProxy;
114
- return n("nav", { staticClass: "b-stepper" }, [n("ol", s._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-stepper__list", class: e.conditionalClasses }, e.keyboardNavigationListeners), [s._t("default")], 2), n(e.BentoTypography, { staticClass: "b-stepper__text-stepper", attrs: { el: "span", variant: "body", stronger: "" } }, [s._v(s._s(e.t("step", { currentIndex: e.n(e.activeStepIndex + 1), totalSteps: e.n(e.stepsAmount), content: e.currentStepContent })) + " ")])], 1);
141
+ var se = function() {
142
+ var n = this, s = n._self._c, e = n._self._setupProxy;
143
+ return s("nav", { staticClass: "b-stepper" }, [s("ol", n._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-stepper__list", class: e.conditionalClasses }, e.keyboardNavigationListeners), [n._t("default")], 2), s(e.BentoTypography, { staticClass: "b-stepper__text-stepper", attrs: { el: "span", variant: "body", stronger: "" } }, [n._v(n._s(e.t("step", { currentIndex: e.n(e.activeStepIndex + 1), totalSteps: e.n(e.stepsAmount), content: e.currentStepContent })) + " ")])], 1);
115
144
  }, ae = [], oe = /* @__PURE__ */ w(
116
- se,
117
145
  ne,
146
+ se,
118
147
  ae,
119
148
  !1,
120
149
  null,
121
150
  "153b0c4d"
122
151
  );
123
- const ye = oe.exports, re = {
152
+ const xe = oe.exports, re = {
124
153
  name: "step"
125
- }, ie = /* @__PURE__ */ k({
154
+ }, ie = /* @__PURE__ */ P({
126
155
  ...re,
127
156
  props: {
128
157
  /**
@@ -141,28 +170,28 @@ const ye = oe.exports, re = {
141
170
  }
142
171
  },
143
172
  emits: ["update:substep-index"],
144
- setup(a, { emit: s }) {
145
- const n = a, e = z(), u = c(null), _ = c(null), r = c([]), t = U(O), p = o(() => {
173
+ setup(a, { emit: n }) {
174
+ const s = a, e = W(), u = c(null), _ = c(null), r = c([]), t = U(O), p = o(() => {
146
175
  var l;
147
176
  return (l = u.value) == null ? void 0 : l.$el;
148
- }), v = o(() => t == null ? void 0 : t.value.steps.indexOf(p.value)), y = o(() => {
177
+ }), v = o(() => t == null ? void 0 : t.value.steps.indexOf(p.value)), x = o(() => {
149
178
  var l;
150
179
  return (l = _.value) == null ? void 0 : l.$el.textContent;
151
- }), E = o(() => r.value.map(({ buttonElement: l }) => l)), d = c(n.substepIndex), b = c(d.value), f = (l) => {
180
+ }), E = o(() => r.value.map(({ buttonElement: l }) => l)), d = c(s.substepIndex), b = c(d.value), S = (l) => {
152
181
  l > b.value && (b.value = l), d.value = l;
153
- }, { registerStep: x, removeStep: C } = F(r), g = c({
182
+ }, { registerStep: y, removeStep: I } = F(r), g = c({
154
183
  activeStepIndex: d,
155
184
  latestActiveStep: b,
156
185
  type: t.value.type,
157
186
  variant: t.value.variant,
158
187
  steps: E,
159
188
  isParentStep: !0,
160
- navigateToStep: f,
161
- registerStep: x,
162
- removeStep: C
189
+ navigateToStep: S,
190
+ registerStep: y,
191
+ removeStep: I
163
192
  });
164
- P(O, g), h(() => n.substepIndex, f), h(d, (l) => {
165
- s("update:substep-index", l);
193
+ k(O, g), h(() => s.substepIndex, S), h(d, (l) => {
194
+ n("update:substep-index", l);
166
195
  }), Z(() => {
167
196
  if (!t)
168
197
  throw new Error(
@@ -170,39 +199,39 @@ const ye = oe.exports, re = {
170
199
  );
171
200
  t.value.registerStep({
172
201
  buttonElement: p,
173
- stepContent: y,
202
+ stepContent: x,
174
203
  substeps: r
175
204
  });
176
205
  }), j(() => {
177
206
  t.value.removeStep({
178
207
  buttonElement: p,
179
- stepContent: y,
208
+ stepContent: x,
180
209
  substeps: r
181
210
  });
182
211
  });
183
- const S = o(() => t.value.isParentStep), A = c(!1), m = o(() => (t == null ? void 0 : t.value.activeStepIndex) === v.value), i = o(
184
- () => m.value && t.value.variant !== L.HORIZONTAL && !S.value && e.substeps
185
- ), N = o(() => (t == null ? void 0 : t.value.type) === V.NON_LINEAR ? n.completed : (t == null ? void 0 : t.value.latestActiveStep) > v.value), I = o(
212
+ const f = o(() => t.value.isParentStep), A = c(!1), m = o(() => (t == null ? void 0 : t.value.activeStepIndex) === v.value), i = o(
213
+ () => m.value && t.value.variant !== D.HORIZONTAL && !f.value && e.substeps
214
+ ), N = o(() => (t == null ? void 0 : t.value.type) === V.NON_LINEAR ? s.completed : (t == null ? void 0 : t.value.latestActiveStep) > v.value), C = o(
186
215
  () => (t == null ? void 0 : t.value.type) === V.LINEAR && v.value > (t == null ? void 0 : t.value.latestActiveStep)
187
216
  ), B = () => {
188
- I.value || t.value.navigateToStep(v.value);
189
- }, D = o(() => m.value ? "step" : "false"), T = o(() => I.value.toString()), H = o(() => A.value || v.value === 0 && !S.value ? "0" : "-1"), K = o(() => ({
217
+ C.value || t.value.navigateToStep(v.value);
218
+ }, L = o(() => m.value ? "step" : "false"), T = o(() => C.value.toString()), z = o(() => A.value || v.value === 0 && !f.value ? "0" : "-1"), H = o(() => ({
190
219
  "b-step--active": m.value,
191
220
  "b-step--completed": N.value,
192
- "b-step--substep": S.value
221
+ "b-step--substep": f.value
193
222
  }));
194
- return { __sfc: !0, slots: e, props: n, emit: s, buttonComponent: u, stepContent: _, substeps: r, stepper: t, buttonElement: p, index: v, stepContentValue: y, substepsButtonElements: E, activeSubStepIndex: d, latestActiveSubStepIndex: b, navigateToSubstep: f, registerStep: x, removeStep: C, stepState: g, isSubstep: S, isFocused: A, isActive: m, isSubstepsVisible: i, isCompleted: N, isDisabled: I, navigateToStep: B, ariaCurrentValue: D, ariaDisabledValue: T, tabIndexValue: H, conditionalClasses: K, BaseButton: q, BentoTypography: $, CheckmarkSmallIcon: J, DotIcon: Q };
223
+ return { __sfc: !0, slots: e, props: s, emit: n, buttonComponent: u, stepContent: _, substeps: r, stepper: t, buttonElement: p, index: v, stepContentValue: x, substepsButtonElements: E, activeSubStepIndex: d, latestActiveSubStepIndex: b, navigateToSubstep: S, registerStep: y, removeStep: I, stepState: g, isSubstep: f, isFocused: A, isActive: m, isSubstepsVisible: i, isCompleted: N, isDisabled: C, navigateToStep: B, ariaCurrentValue: L, ariaDisabledValue: T, tabIndexValue: z, conditionalClasses: H, BaseButton: J, BentoTypography: $, CheckmarkSmallIcon: X, DotIcon: q };
195
224
  }
196
225
  });
197
226
  var le = function() {
198
- var s = this, n = s._self._c, e = s._self._setupProxy;
199
- return n("li", { staticClass: "b-step", class: e.conditionalClasses }, [n(e.BaseButton, { ref: "buttonComponent", staticClass: "b-step__button", attrs: { "aria-current": e.ariaCurrentValue, "aria-disabled": e.ariaDisabledValue, type: "button", tabindex: e.tabIndexValue, disabled: e.isDisabled }, on: { click: e.navigateToStep, focus: function(u) {
227
+ var n = this, s = n._self._c, e = n._self._setupProxy;
228
+ return s("li", { staticClass: "b-step", class: e.conditionalClasses }, [s(e.BaseButton, { ref: "buttonComponent", staticClass: "b-step__button", attrs: { "aria-current": e.ariaCurrentValue, "aria-disabled": e.ariaDisabledValue, type: "button", tabindex: e.tabIndexValue, disabled: e.isDisabled }, on: { click: e.navigateToStep, focus: function(u) {
200
229
  e.isFocused = !0;
201
230
  }, blur: function(u) {
202
231
  e.isFocused = !1;
203
- } }, scopedSlots: s._u([{ key: "iconLeft", fn: function() {
204
- return [n(e.BentoTypography, { staticClass: "b-step__index", attrs: { el: "span", variant: "body", stronger: "", "aria-hidden": "true" } }, [e.isCompleted ? n(e.CheckmarkSmallIcon) : e.isSubstep ? n(e.DotIcon) : [s._v(s._s(e.index + 1))]], 2)];
205
- }, proxy: !0 }]) }, [n(e.BentoTypography, { ref: "stepContent", staticClass: "b-step__content", attrs: { el: "span", variant: "body", stronger: e.isActive } }, [s._t("default")], 2)], 1), n("ul", { directives: [{ name: "show", rawName: "v-show", value: e.isSubstepsVisible, expression: "isSubstepsVisible" }], ref: "substepList", staticClass: "b-step__substep-list" }, [s._t("substeps")], 2)], 1);
232
+ } }, scopedSlots: n._u([{ key: "iconLeft", fn: function() {
233
+ return [s(e.BentoTypography, { staticClass: "b-step__index", attrs: { el: "span", variant: "body", stronger: "", "aria-hidden": "true" } }, [e.isCompleted ? s(e.CheckmarkSmallIcon) : e.isSubstep ? s(e.DotIcon) : [n._v(n._s(e.index + 1))]], 2)];
234
+ }, proxy: !0 }]) }, [s(e.BentoTypography, { ref: "stepContent", staticClass: "b-step__content", attrs: { el: "span", variant: "body", stronger: e.isActive } }, [n._t("default")], 2)], 1), s("ul", { directives: [{ name: "show", rawName: "v-show", value: e.isSubstepsVisible, expression: "isSubstepsVisible" }], ref: "substepList", staticClass: "b-step__substep-list" }, [n._t("substeps")], 2)], 1);
206
235
  }, ue = [], ce = /* @__PURE__ */ w(
207
236
  ie,
208
237
  le,
@@ -211,11 +240,11 @@ var le = function() {
211
240
  null,
212
241
  "ffe615bc"
213
242
  );
214
- const xe = ce.exports;
243
+ const ye = ce.exports;
215
244
  export {
216
245
  V as B,
217
- ye as a,
218
- L as b,
219
- xe as s
246
+ xe as a,
247
+ D as b,
248
+ ye as s
220
249
  };
221
- //# sourceMappingURL=step.QFER3tSj.js.map
250
+ //# sourceMappingURL=step.TDm_ts1S.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"step.QFER3tSj.js","sources":["../../src/components/stepper/composables/use-keyboard-navigation/use-keyboard-navigation.ts","../../src/components/stepper/composables/use-step-register/use-step-register.ts","../../src/components/stepper/stepper.keys.ts","../../src/components/stepper/stepper.types.ts","../../src/components/stepper/stepper.vue","../../src/components/stepper/components/step/step.vue"],"sourcesContent":["import { type Ref, type UnwrapRef } from 'vue';\n\nimport { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\n\n/**\n * Returns keyboard navigation's event handlers to navigate through the steps\n *\n * @param steps the list of bento-steps DOM elements to focus on the navigation\n * @returns\n */\nexport const useKeyboardNavigation = (steps: Ref<UnwrapRef<Array<HTMLButtonElement>>>) => {\n // Returns the event handler that moves the focus on a given step offset\n function focusOnStep(indexOffset: number) {\n return ({ detail: event }) => {\n event.preventDefault();\n\n const currentIndex = steps.value.indexOf(document.activeElement as HTMLButtonElement);\n if (currentIndex < 0) {\n return;\n }\n\n steps.value[currentIndex + indexOffset]?.focus();\n };\n }\n\n const focusOnPreviousStep = focusOnStep(-1);\n const focusOnNextStep = focusOnStep(1);\n\n return {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: focusOnNextStep,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_RIGHT]: focusOnNextStep,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: focusOnPreviousStep,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_LEFT]: focusOnPreviousStep,\n };\n};\n","import type { Ref, UnwrapRef } from 'vue';\nimport type { BentoStepperStepExposeState } from '../../stepper.types';\n\n/**\n * Gets the position of a `bento-step` element within its `bento-stepper` parent.\n * @param stepState The `bento-step` state.\n * @returns The index of the element.\n */\nconst getStepPosition = (stepState: BentoStepperStepExposeState) => {\n // Button is wrapped by <li> element\n const listItemElement = (stepState.buttonElement as Ref<UnwrapRef<HTMLButtonElement>>).value.parentElement;\n const listElement = listItemElement.parentElement;\n return Array.from(listElement.children).indexOf(listItemElement);\n};\n\n/**\n * Provides methods to register/unregister `bento-step` elements to/from the `bento-stepper` step state.\n * These methods allow for tracking the child step elements, including their position in the DOM tree.\n * @param childrenSteps The `bento-stepper` (or `bento-step` if substeps) step state.\n */\nexport const useStepRegister = (childrenSteps: Ref<Array<BentoStepperStepExposeState>>) => {\n /**\n * Registers a step's HTML element in the stepper state.\n * Should be called by a `bento-step` when it is mounted.\n * @param stepState The `bento-step` state.\n */\n const registerStep = (stepState: BentoStepperStepExposeState) => {\n const position = getStepPosition(stepState);\n childrenSteps.value.splice(position, 0, {\n stepContent: stepState.stepContent as string,\n buttonElement: stepState.buttonElement as HTMLButtonElement,\n substeps: stepState.substeps as Array<BentoStepperStepExposeState>,\n });\n };\n\n /**\n * Unregisters a step's HTML element in the stepper state.\n * Should be called by a `bento-step` before it is unmounted.\n * @param stepState The `bento-step` state.\n */\n const removeStep = (stepState: BentoStepperStepExposeState) => {\n childrenSteps.value.splice(\n childrenSteps.value.findIndex(step => step.buttonElement === stepState.buttonElement.value),\n 1\n );\n };\n\n return { registerStep, removeStep };\n};\n","export const STEPPER_STATE = Symbol('stepper state');\n","import type { ComputedRef, Ref, UnwrapRef } from 'vue';\n\nexport enum BentoStepperTypeOption {\n LINEAR = 'linear',\n NON_LINEAR = 'non-linear',\n}\n\nexport enum BentoStepperVariantOption {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\nexport interface BentoStepperStepExposeState {\n buttonElement: HTMLButtonElement | Ref<UnwrapRef<HTMLButtonElement>>;\n substeps: Array<BentoStepperStepExposeState> | Ref<Array<BentoStepperStepExposeState>>;\n stepContent: string | ComputedRef<string>;\n}\n\nexport type BentoStepperState = Ref<{\n activeStepIndex: number;\n latestActiveStep: number;\n type: `${BentoStepperTypeOption}`;\n variant: `${BentoStepperVariantOption}`;\n steps: Array<HTMLElement>;\n isParentStep?: boolean;\n navigateToStep: (index: number) => void;\n registerStep: (stepState: BentoStepperStepExposeState) => void;\n removeStep: (stepState: BentoStepperStepExposeState) => void;\n}>;\n","<template>\n <nav class=\"b-stepper\">\n <ol\n v-bento-keyboard-navigation-directive\n class=\"b-stepper__list\"\n :class=\"conditionalClasses\"\n v-on=\"keyboardNavigationListeners\"\n >\n <slot></slot>\n </ol>\n\n <bento-typography el=\"span\" variant=\"body\" stronger class=\"b-stepper__text-stepper\"\n >{{\n t('step', {\n currentIndex: n(activeStepIndex + 1),\n totalSteps: n(stepsAmount),\n content: currentStepContent,\n })\n }}\n </bento-typography>\n </nav>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n\n import { computed, type DeepReadonly, type PropType, provide, readonly, ref, watch } from 'vue';\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n\n import { useKeyboardNavigation, useStepRegister } from './composables';\n import { useI18n } from '@/utils/ts/i18n';\n\n import { STEPPER_STATE } from './stepper.keys';\n import {\n type BentoStepperState,\n type BentoStepperStepExposeState,\n type BentoStepperTypeOption,\n BentoStepperVariantOption,\n } from './stepper.types';\n\n import messages from './messages.json';\n\n const props = defineProps({\n /**\n * Type of stepper; defines how the stepper should behave. Default: linear\n * @values linear, non-linear\n */\n type: {\n type: String as PropType<`${BentoStepperTypeOption}`>,\n default: 'linear',\n },\n /**\n * Stepper variant; defines how the stepper should be displayed. Default: vertical\n * @values vertical, horizontal\n */\n variant: {\n type: String as PropType<`${BentoStepperVariantOption}`>,\n default: 'vertical',\n },\n /**\n * Active step index\n */\n index: {\n type: Number,\n default: 0,\n },\n });\n\n const emit = defineEmits([\"update:index\"]);\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n\n const childrenSteps = ref<Array<BentoStepperStepExposeState>>([]);\n const activeStepIndex = ref(props.index);\n const latestActiveStep = ref(activeStepIndex.value);\n\n const navigateToStep = (index: number) => {\n // Stores latest active step index so users can navigate backwards and forwards on linear stepper\n if (index > latestActiveStep.value) {\n latestActiveStep.value = index;\n }\n activeStepIndex.value = index;\n };\n\n const currentStepContent = computed(() => childrenSteps.value[activeStepIndex.value]?.stepContent);\n const stepsAmount = computed(() => childrenSteps.value.length);\n const childrenStepsElements = computed(() => childrenSteps.value.map(({ buttonElement }) => buttonElement));\n const isHorizontalVariant = computed(() => props.variant === BentoStepperVariantOption.HORIZONTAL);\n\n // List of all visible steps nested on the stepper, including the substeps of the children steps\n // Flattening the steps on a single list makes the keyboard navigation easier to be handled\n const allVisibleStepsElements = computed(() =>\n childrenSteps.value\n .map(({ buttonElement, substeps }, index) => {\n const isStepActive = activeStepIndex.value === index;\n const isSubstepsVisible = !isHorizontalVariant.value && isStepActive;\n\n if (!isSubstepsVisible) {\n return [buttonElement];\n }\n\n return [buttonElement].concat(substeps.map(step => step.buttonElement));\n })\n .flat()\n );\n\n const { registerStep, removeStep } = useStepRegister(childrenSteps);\n\n const stepperState: BentoStepperState = ref({\n activeStepIndex,\n latestActiveStep,\n steps: childrenStepsElements,\n type: props.type,\n variant: props.variant,\n navigateToStep,\n registerStep,\n removeStep,\n });\n\n const conditionalClasses = computed(() => ({\n 'b-stepper__list--horizontal': isHorizontalVariant.value,\n }));\n\n watch(() => props.index, navigateToStep);\n watch(activeStepIndex, index => {\n emit('update:index', index);\n });\n\n const keyboardNavigationListeners = useKeyboardNavigation(allVisibleStepsElements);\n\n // Provides stepper state to BentoStep children components\n provide<DeepReadonly<BentoStepperState>>(STEPPER_STATE, readonly(stepperState));\n\n const reset = () => {\n activeStepIndex.value = 0;\n latestActiveStep.value = 0;\n };\n\n defineExpose({\n reset,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Steppers break down complex processes into manageable steps to guide users through a sequential or multi-step process.\n *\n * @example\n * import { BentoStep, BentoStepper } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStep, BentoStepper },\n * template: `\n * <bento-stepper :index=\"1\">\n * <bento-step>Step 1</bento-step>\n * <bento-step>Step 2</bento-step>\n * <bento-step>Step 3</bento-step>\n * </bento-stepper>\n * `\n * }\n */\n\n export default {\n i18n: { messages },\n name: 'stepper',\n };\n</script>\n\n<style scoped src=\"./stepper.scss\" />\n","<template>\n <li :class=\"conditionalClasses\" class=\"b-step\">\n <base-button\n ref=\"buttonComponent\"\n :aria-current=\"ariaCurrentValue\"\n :aria-disabled=\"ariaDisabledValue\"\n class=\"b-step__button\"\n type=\"button\"\n :tabindex=\"tabIndexValue\"\n :disabled=\"isDisabled\"\n @click=\"navigateToStep\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n >\n <template #iconLeft>\n <bento-typography el=\"span\" variant=\"body\" stronger class=\"b-step__index\" aria-hidden=\"true\">\n <checkmark-small-icon v-if=\"isCompleted\" />\n <template v-else-if=\"!isSubstep\">{{ index + 1 }}</template>\n <dot-icon v-else />\n </bento-typography>\n </template>\n\n <bento-typography ref=\"stepContent\" el=\"span\" variant=\"body\" :stronger=\"isActive\" class=\"b-step__content\">\n <slot></slot>\n </bento-typography>\n </base-button>\n\n <ul v-show=\"isSubstepsVisible\" ref=\"substepList\" class=\"b-step__substep-list\">\n <slot name=\"substeps\"></slot>\n </ul>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, onBeforeUnmount, onMounted, provide, ref, useSlots, watch } from 'vue';\n import { BaseButton } from '@/components/internal/base-button';\n import { BentoTypography } from '@/components/typography';\n import CheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import DotIcon from '@adyen/ui-assets-icons-16/vue/dot';\n\n import { useStepRegister } from '../../composables';\n import { STEPPER_STATE } from '../../stepper.keys';\n import {\n type BentoStepperState,\n type BentoStepperStepExposeState,\n BentoStepperTypeOption,\n BentoStepperVariantOption,\n } from '../../stepper.types';\n import { type Booleanish } from '@/types/prop-types';\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * Completed status. Used on non-linear steppers to indicate if the step is completed.\n */\n completed: {\n type: Boolean,\n default: false,\n },\n /**\n * Active substep index\n */\n substepIndex: {\n type: Number,\n default: 0,\n },\n });\n\n const emit = defineEmits([\"update:substep-index\"]);\n\n // Element refs\n const buttonComponent = ref<InstanceType<typeof BaseButton> | null>(null);\n const stepContent = ref<InstanceType<typeof BentoTypography> | null>(null);\n const substeps = ref<Array<BentoStepperStepExposeState>>([]);\n\n // Injects parent BentoStepper state data\n const stepper = inject<BentoStepperState>(STEPPER_STATE);\n\n const buttonElement = computed(() => buttonComponent.value?.$el as HTMLButtonElement);\n const index = computed(() => stepper?.value.steps.indexOf(buttonElement.value));\n\n const stepContentValue = computed(() => stepContent.value?.$el.textContent);\n\n // Substep logic\n const substepsButtonElements = computed(() => substeps.value.map(({ buttonElement }) => buttonElement));\n\n const activeSubStepIndex = ref(props.substepIndex);\n const latestActiveSubStepIndex = ref(activeSubStepIndex.value);\n\n const navigateToSubstep = (value: number) => {\n if (value > latestActiveSubStepIndex.value) {\n latestActiveSubStepIndex.value = value;\n }\n\n activeSubStepIndex.value = value;\n };\n\n const { registerStep, removeStep } = useStepRegister(substeps);\n\n const stepState: BentoStepperState = ref({\n activeStepIndex: activeSubStepIndex,\n latestActiveStep: latestActiveSubStepIndex,\n type: stepper.value.type,\n variant: stepper.value.variant,\n steps: substepsButtonElements,\n isParentStep: true,\n navigateToStep: navigateToSubstep,\n registerStep,\n removeStep,\n });\n\n provide(STEPPER_STATE, stepState);\n\n watch(() => props.substepIndex, navigateToSubstep);\n watch(activeSubStepIndex, value => {\n emit('update:substep-index', value);\n });\n\n onMounted(() => {\n if (!stepper) {\n throw new Error(\n 'BentoStep components should only be used inside BentoStepper or other BentoStep components.'\n );\n }\n\n stepper.value.registerStep({\n buttonElement,\n stepContent: stepContentValue,\n substeps,\n });\n });\n\n onBeforeUnmount(() => {\n stepper.value.removeStep({\n buttonElement,\n stepContent: stepContentValue,\n substeps,\n });\n });\n\n // Step states\n const isSubstep = computed(() => stepper.value.isParentStep);\n const isFocused = ref(false);\n const isActive = computed(() => stepper?.value.activeStepIndex === index.value);\n const isSubstepsVisible = computed(\n () =>\n isActive.value &&\n stepper.value.variant !== BentoStepperVariantOption.HORIZONTAL &&\n !isSubstep.value &&\n slots.substeps\n );\n const isCompleted = computed(() => {\n if (stepper?.value.type === BentoStepperTypeOption.NON_LINEAR) {\n return props.completed;\n }\n\n return stepper?.value.latestActiveStep > index.value;\n });\n const isDisabled = computed(\n () => stepper?.value.type === BentoStepperTypeOption.LINEAR && index.value > stepper?.value.latestActiveStep\n );\n\n const navigateToStep = () => {\n if (isDisabled.value) {\n return;\n }\n\n stepper.value.navigateToStep(index.value);\n };\n\n // Styling and a11y\n const ariaCurrentValue = computed(() => (isActive.value ? 'step' : ('false' as Booleanish)));\n const ariaDisabledValue = computed(() => isDisabled.value.toString() as Booleanish);\n const tabIndexValue = computed(() => (isFocused.value || (index.value === 0 && !isSubstep.value) ? '0' : '-1'));\n\n const conditionalClasses = computed(() => ({\n 'b-step--active': isActive.value,\n 'b-step--completed': isCompleted.value,\n 'b-step--substep': isSubstep.value,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Steps are components placed inside BentoSteppers to break down complex processes\n *\n * @example\n * import { BentoStep } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStep },\n * template: `\n * <bento-stepper>\n * <bento-step>Step 1</bento-step>\n * <bento-step>\n * Step 2\n * <template #substeps>\n * <bento-step>Substep 1</bento-step>\n * <bento-step>Substep 2</bento-step>\n * </template>\n * </bento-step>\n * </bento-stepper>\n * `\n * }\n */\n\n export default {\n name: 'step',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./step.scss\" />\n"],"names":["useKeyboardNavigation","steps","focusOnStep","indexOffset","event","currentIndex","_a","focusOnPreviousStep","focusOnNextStep","BentoKeyboardNavigationKeyDownEvent","getStepPosition","stepState","listItemElement","listElement","useStepRegister","childrenSteps","position","step","STEPPER_STATE","BentoStepperTypeOption","BentoStepperTypeOption2","BentoStepperVariantOption","BentoStepperVariantOption2","__default__$1","messages","t","n","useI18n","ref","activeStepIndex","props","latestActiveStep","navigateToStep","index","currentStepContent","computed","stepsAmount","childrenStepsElements","buttonElement","isHorizontalVariant","allVisibleStepsElements","substeps","isStepActive","registerStep","removeStep","stepperState","conditionalClasses","watch","emit","keyboardNavigationListeners","provide","readonly","reset","expose","__default__","slots","useSlots","buttonComponent","stepContent","stepper","inject","stepContentValue","substepsButtonElements","buttonElement2","activeSubStepIndex","latestActiveSubStepIndex","navigateToSubstep","value","onMounted","onBeforeUnmount","isSubstep","isFocused","isActive","isSubstepsVisible","isCompleted","isDisabled","ariaCurrentValue","ariaDisabledValue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A,aAGJ6B,KAAA,gBAAAA,EAAA,MAAA,oBAAA1B,EAAA,KAA+C,GAEnD0C,IAAAxC;AAAA,MAAmB,OAAAwB,KAAA,gBAAAA,EAAA,MAAA,UAAAxC,EAAA,UAAAc,EAAA,SAAA0B,KAAA,gBAAAA,EAAA,MAAA;AAAA,IAC6E,GAGhG3B,IAAA,MAAA;AACI,MAAA2C,EAAA,SAIAhB,EAAA,MAAA,eAAA1B,EAAA,KAAA;AAAA,IAAwC,GAI5C2C,IAAAzC,EAAA,MAAAqC,EAAA,QAAA,SAAA,OAAA,GACAK,IAAA1C,EAAA,MAAAwC,EAAA,MAAA,SAAA,CAAA,GACAG,IAAA3C,EAAA,MAAAoC,EAAA,SAAAtC,EAAA,UAAA,KAAA,CAAAqC,EAAA,QAAA,MAAA,IAAA,GAEAxB,IAAAX,EAAA,OAAA;AAAA,MAA2C,kBAAAqC,EAAA;AAAA,MACZ,qBAAAE,EAAA;AAAA,MACM,mBAAAJ,EAAA;AAAA,IACJ,EAAA;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"step.TDm_ts1S.js","sources":["../../src/components/stepper/composables/use-keyboard-navigation/use-keyboard-navigation.ts","../../src/components/stepper/composables/use-step-register/use-step-register.ts","../../src/components/stepper/stepper.keys.ts","../../src/components/stepper/stepper.types.ts","../../src/components/stepper/stepper.vue","../../src/components/stepper/components/step/step.vue"],"sourcesContent":["import { type Ref, type UnwrapRef } from 'vue';\n\nimport { BentoKeyboardNavigationKeyDownEvent } from '@/types/keyboard-navigation';\n\n/**\n * Returns keyboard navigation's event handlers to navigate through the steps\n *\n * @param steps the list of bento-steps DOM elements to focus on the navigation\n * @returns\n */\nexport const useKeyboardNavigation = (steps: Ref<UnwrapRef<Array<HTMLButtonElement>>>) => {\n // Returns the event handler that moves the focus on a given step offset\n function focusOnStep(indexOffset: number) {\n return ({ detail: event }) => {\n event.preventDefault();\n\n const currentIndex = steps.value.indexOf(document.activeElement as HTMLButtonElement);\n if (currentIndex < 0) {\n return;\n }\n\n steps.value[currentIndex + indexOffset]?.focus();\n };\n }\n\n const focusOnPreviousStep = focusOnStep(-1);\n const focusOnNextStep = focusOnStep(1);\n\n return {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: focusOnNextStep,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_RIGHT]: focusOnNextStep,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: focusOnPreviousStep,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_LEFT]: focusOnPreviousStep,\n };\n};\n","import type { Ref, UnwrapRef } from 'vue';\nimport type { BentoStepperStepExposeState } from '../../stepper.types';\n\n/**\n * Gets the position of a `bento-step` element within its `bento-stepper` parent.\n * @param stepState The `bento-step` state.\n * @returns The index of the element.\n */\nconst getStepPosition = (stepState: BentoStepperStepExposeState) => {\n // Button is wrapped by <li> element\n const listItemElement = (stepState.buttonElement as Ref<UnwrapRef<HTMLButtonElement>>).value.parentElement;\n const listElement = listItemElement.parentElement;\n return Array.from(listElement.children).indexOf(listItemElement);\n};\n\n/**\n * Provides methods to register/unregister `bento-step` elements to/from the `bento-stepper` step state.\n * These methods allow for tracking the child step elements, including their position in the DOM tree.\n * @param childrenSteps The `bento-stepper` (or `bento-step` if substeps) step state.\n */\nexport const useStepRegister = (childrenSteps: Ref<Array<BentoStepperStepExposeState>>) => {\n /**\n * Registers a step's HTML element in the stepper state.\n * Should be called by a `bento-step` when it is mounted.\n * @param stepState The `bento-step` state.\n */\n const registerStep = (stepState: BentoStepperStepExposeState) => {\n const position = getStepPosition(stepState);\n childrenSteps.value.splice(position, 0, {\n stepContent: stepState.stepContent as string,\n buttonElement: stepState.buttonElement as HTMLButtonElement,\n substeps: stepState.substeps as Array<BentoStepperStepExposeState>,\n });\n };\n\n /**\n * Unregisters a step's HTML element in the stepper state.\n * Should be called by a `bento-step` before it is unmounted.\n * @param stepState The `bento-step` state.\n */\n const removeStep = (stepState: BentoStepperStepExposeState) => {\n childrenSteps.value.splice(\n childrenSteps.value.findIndex(step => step.buttonElement === stepState.buttonElement.value),\n 1\n );\n };\n\n return { registerStep, removeStep };\n};\n","export const STEPPER_STATE = Symbol('stepper state');\n","import type { ComputedRef, Ref, UnwrapRef } from 'vue';\n\nexport enum BentoStepperTypeOption {\n LINEAR = 'linear',\n NON_LINEAR = 'non-linear',\n}\n\nexport enum BentoStepperVariantOption {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\nexport interface BentoStepperStepExposeState {\n buttonElement: HTMLButtonElement | Ref<UnwrapRef<HTMLButtonElement>>;\n substeps: Array<BentoStepperStepExposeState> | Ref<Array<BentoStepperStepExposeState>>;\n stepContent: string | ComputedRef<string>;\n}\n\nexport type BentoStepperState = Ref<{\n activeStepIndex: number;\n latestActiveStep: number;\n type: `${BentoStepperTypeOption}`;\n variant: `${BentoStepperVariantOption}`;\n steps: Array<HTMLElement>;\n isParentStep?: boolean;\n navigateToStep: (index: number) => void;\n registerStep: (stepState: BentoStepperStepExposeState) => void;\n removeStep: (stepState: BentoStepperStepExposeState) => void;\n}>;\n","<template>\n <nav class=\"b-stepper\">\n <ol\n v-bento-keyboard-navigation-directive\n class=\"b-stepper__list\"\n :class=\"conditionalClasses\"\n v-on=\"keyboardNavigationListeners\"\n >\n <slot></slot>\n </ol>\n\n <bento-typography el=\"span\" variant=\"body\" stronger class=\"b-stepper__text-stepper\"\n >{{\n t('step', {\n currentIndex: n(activeStepIndex + 1),\n totalSteps: n(stepsAmount),\n content: currentStepContent,\n })\n }}\n </bento-typography>\n </nav>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n\n import { computed, type DeepReadonly, type PropType, provide, readonly, ref, watch } from 'vue';\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n\n import { useKeyboardNavigation, useStepRegister } from './composables';\n import { useI18n } from '@/utils/ts/i18n';\n\n import { STEPPER_STATE } from './stepper.keys';\n import {\n type BentoStepperState,\n type BentoStepperStepExposeState,\n type BentoStepperTypeOption,\n BentoStepperVariantOption,\n } from './stepper.types';\n\n import messages from './messages.json';\n\n const props = defineProps({\n /**\n * Type of stepper; defines how the stepper should behave. Default: linear\n * @values linear, non-linear\n */\n type: {\n type: String as PropType<`${BentoStepperTypeOption}`>,\n default: 'linear',\n },\n /**\n * Stepper variant; defines how the stepper should be displayed. Default: vertical\n * @values vertical, horizontal\n */\n variant: {\n type: String as PropType<`${BentoStepperVariantOption}`>,\n default: 'vertical',\n },\n /**\n * Active step index\n */\n index: {\n type: Number,\n default: 0,\n },\n });\n\n const emit = defineEmits([\"update:index\"]);\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n\n const childrenSteps = ref<Array<BentoStepperStepExposeState>>([]);\n const activeStepIndex = ref(props.index);\n const latestActiveStep = ref(activeStepIndex.value);\n\n const navigateToStep = (index: number) => {\n // Stores latest active step index so users can navigate backwards and forwards on linear stepper\n if (index > latestActiveStep.value) {\n latestActiveStep.value = index;\n }\n activeStepIndex.value = index;\n };\n\n const currentStepContent = computed(() => childrenSteps.value[activeStepIndex.value]?.stepContent);\n const stepsAmount = computed(() => childrenSteps.value.length);\n const childrenStepsElements = computed(() => childrenSteps.value.map(({ buttonElement }) => buttonElement));\n const isHorizontalVariant = computed(() => props.variant === BentoStepperVariantOption.HORIZONTAL);\n\n // List of all visible steps nested on the stepper, including the substeps of the children steps\n // Flattening the steps on a single list makes the keyboard navigation easier to be handled\n const allVisibleStepsElements = computed(() =>\n childrenSteps.value\n .map(({ buttonElement, substeps }, index) => {\n const isStepActive = activeStepIndex.value === index;\n const isSubstepsVisible = !isHorizontalVariant.value && isStepActive;\n\n if (!isSubstepsVisible) {\n return [buttonElement];\n }\n\n return [buttonElement].concat(substeps.map(step => step.buttonElement));\n })\n .flat()\n );\n\n const { registerStep, removeStep } = useStepRegister(childrenSteps);\n\n const stepperState: BentoStepperState = ref({\n activeStepIndex,\n latestActiveStep,\n steps: childrenStepsElements,\n type: props.type,\n variant: props.variant,\n navigateToStep,\n registerStep,\n removeStep,\n });\n\n const conditionalClasses = computed(() => ({\n 'b-stepper__list--horizontal': isHorizontalVariant.value,\n }));\n\n watch(() => props.index, navigateToStep);\n watch(activeStepIndex, index => {\n emit('update:index', index);\n });\n\n const keyboardNavigationListeners = useKeyboardNavigation(allVisibleStepsElements);\n\n // Provides stepper state to BentoStep children components\n provide<DeepReadonly<BentoStepperState>>(STEPPER_STATE, readonly(stepperState));\n\n const reset = () => {\n activeStepIndex.value = 0;\n latestActiveStep.value = 0;\n };\n\n defineExpose({\n reset,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Steppers break down complex processes into manageable steps to guide users through a sequential or multi-step process.\n *\n * @example\n * import { BentoStep, BentoStepper } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStep, BentoStepper },\n * template: `\n * <bento-stepper :index=\"1\">\n * <bento-step>Step 1</bento-step>\n * <bento-step>Step 2</bento-step>\n * <bento-step>Step 3</bento-step>\n * </bento-stepper>\n * `\n * }\n */\n\n export default {\n i18n: { messages },\n name: 'stepper',\n };\n</script>\n\n<style scoped src=\"./stepper.scss\" />\n","<template>\n <li :class=\"conditionalClasses\" class=\"b-step\">\n <base-button\n ref=\"buttonComponent\"\n :aria-current=\"ariaCurrentValue\"\n :aria-disabled=\"ariaDisabledValue\"\n class=\"b-step__button\"\n type=\"button\"\n :tabindex=\"tabIndexValue\"\n :disabled=\"isDisabled\"\n @click=\"navigateToStep\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n >\n <template #iconLeft>\n <bento-typography el=\"span\" variant=\"body\" stronger class=\"b-step__index\" aria-hidden=\"true\">\n <checkmark-small-icon v-if=\"isCompleted\" />\n <template v-else-if=\"!isSubstep\">{{ index + 1 }}</template>\n <dot-icon v-else />\n </bento-typography>\n </template>\n\n <bento-typography ref=\"stepContent\" el=\"span\" variant=\"body\" :stronger=\"isActive\" class=\"b-step__content\">\n <slot></slot>\n </bento-typography>\n </base-button>\n\n <ul v-show=\"isSubstepsVisible\" ref=\"substepList\" class=\"b-step__substep-list\">\n <slot name=\"substeps\"></slot>\n </ul>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, onBeforeUnmount, onMounted, provide, ref, useSlots, watch } from 'vue';\n import { BaseButton } from '@/components/internal/base-button';\n import { BentoTypography } from '@/components/typography';\n import CheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import DotIcon from '@adyen/ui-assets-icons-16/vue/dot';\n\n import { useStepRegister } from '../../composables';\n import { STEPPER_STATE } from '../../stepper.keys';\n import {\n type BentoStepperState,\n type BentoStepperStepExposeState,\n BentoStepperTypeOption,\n BentoStepperVariantOption,\n } from '../../stepper.types';\n import { type Booleanish } from '@/types/prop-types';\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * Completed status. Used on non-linear steppers to indicate if the step is completed.\n */\n completed: {\n type: Boolean,\n default: false,\n },\n /**\n * Active substep index\n */\n substepIndex: {\n type: Number,\n default: 0,\n },\n });\n\n const emit = defineEmits([\"update:substep-index\"]);\n\n // Element refs\n const buttonComponent = ref<InstanceType<typeof BaseButton> | null>(null);\n const stepContent = ref<InstanceType<typeof BentoTypography> | null>(null);\n const substeps = ref<Array<BentoStepperStepExposeState>>([]);\n\n // Injects parent BentoStepper state data\n const stepper = inject<BentoStepperState>(STEPPER_STATE);\n\n const buttonElement = computed(() => buttonComponent.value?.$el as HTMLButtonElement);\n const index = computed(() => stepper?.value.steps.indexOf(buttonElement.value));\n\n const stepContentValue = computed(() => stepContent.value?.$el.textContent);\n\n // Substep logic\n const substepsButtonElements = computed(() => substeps.value.map(({ buttonElement }) => buttonElement));\n\n const activeSubStepIndex = ref(props.substepIndex);\n const latestActiveSubStepIndex = ref(activeSubStepIndex.value);\n\n const navigateToSubstep = (value: number) => {\n if (value > latestActiveSubStepIndex.value) {\n latestActiveSubStepIndex.value = value;\n }\n\n activeSubStepIndex.value = value;\n };\n\n const { registerStep, removeStep } = useStepRegister(substeps);\n\n const stepState: BentoStepperState = ref({\n activeStepIndex: activeSubStepIndex,\n latestActiveStep: latestActiveSubStepIndex,\n type: stepper.value.type,\n variant: stepper.value.variant,\n steps: substepsButtonElements,\n isParentStep: true,\n navigateToStep: navigateToSubstep,\n registerStep,\n removeStep,\n });\n\n provide(STEPPER_STATE, stepState);\n\n watch(() => props.substepIndex, navigateToSubstep);\n watch(activeSubStepIndex, value => {\n emit('update:substep-index', value);\n });\n\n onMounted(() => {\n if (!stepper) {\n throw new Error(\n 'BentoStep components should only be used inside BentoStepper or other BentoStep components.'\n );\n }\n\n stepper.value.registerStep({\n buttonElement,\n stepContent: stepContentValue,\n substeps,\n });\n });\n\n onBeforeUnmount(() => {\n stepper.value.removeStep({\n buttonElement,\n stepContent: stepContentValue,\n substeps,\n });\n });\n\n // Step states\n const isSubstep = computed(() => stepper.value.isParentStep);\n const isFocused = ref(false);\n const isActive = computed(() => stepper?.value.activeStepIndex === index.value);\n const isSubstepsVisible = computed(\n () =>\n isActive.value &&\n stepper.value.variant !== BentoStepperVariantOption.HORIZONTAL &&\n !isSubstep.value &&\n slots.substeps\n );\n const isCompleted = computed(() => {\n if (stepper?.value.type === BentoStepperTypeOption.NON_LINEAR) {\n return props.completed;\n }\n\n return stepper?.value.latestActiveStep > index.value;\n });\n const isDisabled = computed(\n () => stepper?.value.type === BentoStepperTypeOption.LINEAR && index.value > stepper?.value.latestActiveStep\n );\n\n const navigateToStep = () => {\n if (isDisabled.value) {\n return;\n }\n\n stepper.value.navigateToStep(index.value);\n };\n\n // Styling and a11y\n const ariaCurrentValue = computed(() => (isActive.value ? 'step' : ('false' as Booleanish)));\n const ariaDisabledValue = computed(() => isDisabled.value.toString() as Booleanish);\n const tabIndexValue = computed(() => (isFocused.value || (index.value === 0 && !isSubstep.value) ? '0' : '-1'));\n\n const conditionalClasses = computed(() => ({\n 'b-step--active': isActive.value,\n 'b-step--completed': isCompleted.value,\n 'b-step--substep': isSubstep.value,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Steps are components placed inside BentoSteppers to break down complex processes\n *\n * @example\n * import { BentoStep } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStep },\n * template: `\n * <bento-stepper>\n * <bento-step>Step 1</bento-step>\n * <bento-step>\n * Step 2\n * <template #substeps>\n * <bento-step>Substep 1</bento-step>\n * <bento-step>Substep 2</bento-step>\n * </template>\n * </bento-step>\n * </bento-stepper>\n * `\n * }\n */\n\n export default {\n name: 'step',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./step.scss\" />\n"],"names":["useKeyboardNavigation","steps","focusOnStep","indexOffset","event","currentIndex","_a","focusOnPreviousStep","focusOnNextStep","BentoKeyboardNavigationKeyDownEvent","getStepPosition","stepState","listItemElement","listElement","useStepRegister","childrenSteps","position","step","STEPPER_STATE","BentoStepperTypeOption","BentoStepperTypeOption2","BentoStepperVariantOption","BentoStepperVariantOption2","__default__$1","messages","t","n","useI18n","ref","activeStepIndex","props","latestActiveStep","navigateToStep","index","currentStepContent","computed","stepsAmount","childrenStepsElements","buttonElement","isHorizontalVariant","allVisibleStepsElements","substeps","isStepActive","registerStep","removeStep","stepperState","conditionalClasses","watch","emit","keyboardNavigationListeners","provide","readonly","reset","expose","__default__","slots","useSlots","buttonComponent","stepContent","stepper","inject","stepContentValue","substepsButtonElements","buttonElement2","activeSubStepIndex","latestActiveSubStepIndex","navigateToSubstep","value","onMounted","onBeforeUnmount","isSubstep","isFocused","isActive","isSubstepsVisible","isCompleted","isDisabled","ariaCurrentValue","ariaDisabledValue","tabIndexValue"],"mappings":";;;;;;;;;AAUO,MAAAA,IAAA,CAAAC,MAAA;AAEH,WAAAC,EAAAC,GAAA;AACI,WAAA,CAAA,EAAA,QAAAC,EAAA,MAAA;;AACI,MAAAA,EAAA,eAAA;AAEA,YAAAC,IAAAJ,EAAA,MAAA,QAAA,SAAA,aAAA;AACA,MAAAI,IAAA,MAIAC,I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C6E,GAGhG3B,IAAA,MAAA;AACI,MAAA2C,EAAA,SAIAhB,EAAA,MAAA,eAAA1B,EAAA,KAAA;AAAA,IAAwC,GAI5C2C,IAAAzC,EAAA,MAAAqC,EAAA,QAAA,SAAA,OAAA,GACAK,IAAA1C,EAAA,MAAAwC,EAAA,MAAA,SAAA,CAAA,GACAG,IAAA3C,EAAA,MAAAoC,EAAA,SAAAtC,EAAA,UAAA,KAAA,CAAAqC,EAAA,QAAA,MAAA,IAAA,GAEAxB,IAAAX,EAAA,OAAA;AAAA,MAA2C,kBAAAqC,EAAA;AAAA,MACZ,qBAAAE,EAAA;AAAA,MACM,mBAAAJ,EAAA;AAAA,IACJ,EAAA;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,14 +1,14 @@
1
- import { defineComponent as i, inject as c, computed as o, provide as v, ref as h } from "vue";
1
+ import { defineComponent as i, inject as n, computed as o, provide as b, ref as v } from "vue";
2
2
  import { n as u } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
3
- import { B as C } from "./button.DxhJNOtr.js";
4
- import { B } from "./info-icon.BF8KxU-k.js";
5
- import { B as T } from "./typography.C8lPlsbD.js";
6
- import { C as S } from "./copy.BVGQcf22.js";
3
+ import { B as C } from "./button.C9b2AC9w.js";
4
+ import { B } from "./info-icon.DCR42Kvm.js";
5
+ import { B as S } from "./typography.C8lPlsbD.js";
6
+ import { C as T } from "./copy.qqGYFbKJ.js";
7
7
  import { S as I } from "./search.D53Ia3rC.js";
8
8
  import { u as L } from "./index.B6WW_F-J.js";
9
- import { b as x } from "./tooltip.CbsNGnhw.js";
9
+ import { b as E } from "./tooltip.BxtnF3is.js";
10
10
  import "../assets/structured-list-item.css";
11
- const _ = /* @__PURE__ */ Symbol("structured list condensed style injection key"), p = /* @__PURE__ */ Symbol("structured list labels width injection key"), E = ["25-75", "33-66", "42-58", "50-50", "75-25", "66-33", "58-42"], D = {}, $ = /* @__PURE__ */ i({
11
+ const _ = /* @__PURE__ */ Symbol("structured list condensed style injection key"), p = /* @__PURE__ */ Symbol("structured list labels width injection key"), x = ["25-75", "33-66", "42-58", "50-50", "75-25", "66-33", "58-42"], D = {}, R = /* @__PURE__ */ i({
12
12
  ...D,
13
13
  __name: "structured-list",
14
14
  props: {
@@ -16,27 +16,54 @@ const _ = /* @__PURE__ */ Symbol("structured list condensed style injection key"
16
16
  layout: { default: "33-66" }
17
17
  },
18
18
  setup(r) {
19
- const t = r, s = c(_, !1), e = o(
20
- () => E.includes(t.layout) ? t.layout : "33-66"
21
- ), n = o(() => s ? "130px" : t.labelsWidth ? `${t.labelsWidth}px` : `${e.value.split("-")[0]}%`);
22
- return v(p, n), { __sfc: !0, props: t, isCondensed: s, computedLayout: e, computedLabelsWidth: n };
19
+ const t = r, s = n(_, !1), e = o(
20
+ () => x.includes(t.layout) ? t.layout : "33-66"
21
+ ), a = o(() => s ? "130px" : t.labelsWidth ? `${t.labelsWidth}px` : `${e.value.split("-")[0]}%`);
22
+ return b(p, a), { __sfc: !0, props: t, isCondensed: s, computedLayout: e, computedLabelsWidth: a };
23
23
  }
24
24
  });
25
- var g = function() {
25
+ var N = function() {
26
26
  var t = this, s = t._self._c;
27
27
  return t._self._setupProxy, s("dl", { staticClass: "b-structured-list" }, [t._t("default")], 2);
28
- }, N = [], R = /* @__PURE__ */ u(
29
- $,
30
- g,
28
+ }, $ = [], g = /* @__PURE__ */ u(
29
+ R,
31
30
  N,
31
+ $,
32
32
  !1,
33
33
  null,
34
34
  "c7bef1d8"
35
35
  );
36
- const q = R.exports, W = {
37
- "en-US": { search: "Search" },
38
- "ja-JP": { search: "検索" },
39
- "pt-BR": { search: "Buscar" }
36
+ const G = g.exports, W = {
37
+ "de-DE": {
38
+ search: "Suche"
39
+ },
40
+ "en-GB": {
41
+ search: "Search"
42
+ },
43
+ "en-US": {
44
+ search: "Search"
45
+ },
46
+ "es-ES": {
47
+ search: "Buscar en"
48
+ },
49
+ "es-MX": {
50
+ search: "Buscar"
51
+ },
52
+ "fr-FR": {
53
+ search: "Rechercher"
54
+ },
55
+ "it-IT": {
56
+ search: "Cerca"
57
+ },
58
+ "ja-JP": {
59
+ search: "検索"
60
+ },
61
+ "pt-BR": {
62
+ search: "Buscar"
63
+ },
64
+ "zh-CN": {
65
+ search: "搜索"
66
+ }
40
67
  }, U = {
41
68
  i18n: { messages: W }
42
69
  }, k = /* @__PURE__ */ i({
@@ -52,33 +79,33 @@ const q = R.exports, W = {
52
79
  },
53
80
  emits: ["copy"],
54
81
  setup(r, { emit: t }) {
55
- const s = r, e = "33%", { t: n } = L(), a = c(_, !1), l = c(p, h(e)), d = o(() => `flex-basis:${l.value}`), m = o(() => ({
56
- "b-structured-list-item--condensed": a
82
+ const s = r, e = "33%", { t: a } = L(), c = n(_, !1), l = n(p, v(e)), d = o(() => `flex-basis:${l.value}`), m = o(() => ({
83
+ "b-structured-list-item--condensed": c
57
84
  })), f = o(() => ({
58
85
  "b-structured-list-item__value--truncate": s.truncate
59
- })), y = () => {
86
+ })), h = () => {
60
87
  t("copy", s.copy);
61
- }, b = o(() => a ? "caption" : "body");
62
- return { __sfc: !0, DEFAULT_LABELS_WIDTH: e, props: s, emit: t, t: n, isCondensed: a, labelsWidth: l, computedLabelStyle: d, conditionalClasses: m, valueConditionalClasses: f, emitCopy: y, labelTypographyVariant: b, BentoButton: C, BentoInfoIcon: B, BentoTypography: T, Copy: S, SearchIcon: I, vBentoTooltipDirective: x };
88
+ }, y = o(() => c ? "caption" : "body");
89
+ return { __sfc: !0, DEFAULT_LABELS_WIDTH: e, props: s, emit: t, t: a, isCondensed: c, labelsWidth: l, computedLabelStyle: d, conditionalClasses: m, valueConditionalClasses: f, emitCopy: h, labelTypographyVariant: y, BentoButton: C, BentoInfoIcon: B, BentoTypography: S, Copy: T, SearchIcon: I, vBentoTooltipDirective: E };
63
90
  }
64
91
  });
65
- var j = function() {
92
+ var F = function() {
66
93
  var t = this, s = t._self._c, e = t._self._setupProxy;
67
94
  return s("div", { staticClass: "b-structured-list-item", class: e.conditionalClasses }, [s("dt", { staticClass: "b-structured-list-item__label", style: e.computedLabelStyle }, [s(e.BentoTypography, { attrs: { variant: e.labelTypographyVariant } }, [t._v(t._s(t.label))]), t.labelInfo ? s(e.BentoInfoIcon, { staticClass: "b-structured-list-item__icon", attrs: { "tooltip-text": t.labelInfo } }) : t._e()], 1), s("dd", { staticClass: "b-structured-list-item__value", class: e.valueConditionalClasses }, [t._t("default"), t.copy ? s(e.Copy, { staticClass: "b-structured-list-item__icon", attrs: { text: t.copy }, on: { click: e.emitCopy } }) : t._e(), t.search ? s(e.BentoButton, { directives: [{ name: "bento-tooltip-directive", rawName: "v-bento-tooltip-directive:top", value: t.searchTooltip ? t.searchTooltip : e.t("search"), expression: "searchTooltip ? searchTooltip : t('search')", arg: "top" }], staticClass: "b-structured-list-item__icon", attrs: { variant: "tertiary" }, on: { click: t.search }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
68
95
  return [s(e.SearchIcon, { attrs: { "svg-title": e.t("search") } })];
69
96
  }, proxy: !0 }], null, !1, 674303813) }) : t._e()], 2)]);
70
- }, F = [], O = /* @__PURE__ */ u(
97
+ }, j = [], O = /* @__PURE__ */ u(
71
98
  k,
72
- j,
73
99
  F,
100
+ j,
74
101
  !1,
75
102
  null,
76
103
  "74b46211"
77
104
  );
78
- const G = O.exports;
105
+ const M = O.exports;
79
106
  export {
80
- q as B,
107
+ G as B,
81
108
  _ as S,
82
- G as a
109
+ M as a
83
110
  };
84
- //# sourceMappingURL=structured-list-item.BDJKRC_8.js.map
111
+ //# sourceMappingURL=structured-list-item.BBBtie1s.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"structured-list-item.BDJKRC_8.js","sources":["../../src/components/structured-list/structured-list.keys.ts","../../src/components/structured-list/structured-list.types.ts","../../src/components/structured-list/structured-list.vue","../../src/components/structured-list/components/structered-list-item/structured-list-item.vue"],"sourcesContent":["export const STRUCTURED_LIST_CONDENSED_INJECTION_KEY = Symbol('structured list condensed style injection key');\nexport const STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY = Symbol('structured list labels width injection key');\n","export type BentoStructuredListLayoutOptions = '25-75' | '33-66' | '42-58' | '50-50' | '75-25' | '66-33' | '58-42';\nexport const BentoStructuredListLayoutOptions = ['25-75', '33-66', '42-58', '50-50', '75-25', '66-33', '58-42'];\n","<template>\n <dl class=\"b-structured-list\">\n <slot />\n </dl>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, provide } from 'vue';\n import {\n STRUCTURED_LIST_CONDENSED_INJECTION_KEY,\n STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY,\n } from '@/components/structured-list/structured-list.keys';\n import { BentoStructuredListLayoutOptions } from './structured-list.types';\n\n const props = defineProps({\n labelsWidth: { default: null },\n layout: { default: '33-66' }\n});\n\n const isCondensed = inject(STRUCTURED_LIST_CONDENSED_INJECTION_KEY, false);\n\n const computedLayout = computed(() =>\n BentoStructuredListLayoutOptions.includes(props.layout) ? props.layout : '33-66'\n );\n\n const computedLabelsWidth = computed(() => {\n if (isCondensed) {\n return '130px';\n }\n\n if (props.labelsWidth) {\n return `${props.labelsWidth}px`;\n }\n\n return `${computedLayout.value.split('-')[0]}%`;\n });\n\n provide(STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY, computedLabelsWidth);\n</script>\n\n<script lang=\"ts\">\n /**\n * This is a list used to display pairs of information in a clear and organized manner.\n * `BentoStructureListItem` should be used to pass the label/value pairs to the list.\n *\n * @example\n * import { BentoStructuredListItem, BentoStructuredListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStructuredList, BentoStructuredListItem },\n * template: `\n * <bento-structured-list>\n * <bento-structured-list-item label=\"Payment\">\n * <bento-payment-method label=\"Klarna\" type=\"Klarna\" />\n * </bento-structured-list-item>\n * <bento-structured-list-item label=\"Amount\">\n * <bento-currency :currency=\"BentoCurrencyISOCode.USD\" :value=\"123456\" />\n * </bento-structured-list-item>\n * </bento-structured-list>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./structured-list.scss\" />\n","<template>\n <div class=\"b-structured-list-item\" :class=\"conditionalClasses\">\n <dt class=\"b-structured-list-item__label\" :style=\"computedLabelStyle\">\n <bento-typography :variant=\"labelTypographyVariant\">{{ label }}</bento-typography>\n <bento-info-icon v-if=\"labelInfo\" class=\"b-structured-list-item__icon\" :tooltip-text=\"labelInfo\" />\n </dt>\n <dd class=\"b-structured-list-item__value\" :class=\"valueConditionalClasses\">\n <slot />\n <copy v-if=\"copy\" class=\"b-structured-list-item__icon\" :text=\"copy\" @click=\"emitCopy\" />\n <bento-button\n v-if=\"search\"\n v-bento-tooltip-directive:top=\"searchTooltip ? searchTooltip : t('search')\"\n class=\"b-structured-list-item__icon\"\n variant=\"tertiary\"\n @click=\"search\"\n >\n <template #iconLeft>\n <search-icon :svg-title=\"t('search')\" />\n </template>\n </bento-button>\n </dd>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, type Ref } from 'vue';\n\n // Components\n import { BentoButton } from '@/components/button';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography } from '@/components/typography';\n import Copy from '@/components/internal/copy/copy.vue';\n import SearchIcon from '@adyen/ui-assets-icons-16/vue/search';\n\n // Utils\n import { useI18n } from '@/utils/ts/i18n';\n\n // Directives\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives';\n\n // Keys\n import {\n STRUCTURED_LIST_CONDENSED_INJECTION_KEY,\n STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY,\n } from '../../structured-list.keys';\n\n import messages from '../../messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const DEFAULT_LABELS_WIDTH = '33%';\n\n const props = defineProps({\n label: null,\n labelInfo: null,\n copy: null,\n search: { type: Function },\n searchTooltip: null,\n truncate: { type: Boolean }\n});\n\n const emit = defineEmits([\"copy\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const isCondensed = inject(STRUCTURED_LIST_CONDENSED_INJECTION_KEY, false);\n const labelsWidth = inject<Ref<string>>(STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY, ref(DEFAULT_LABELS_WIDTH));\n const computedLabelStyle = computed(() => `flex-basis:${labelsWidth.value}`);\n const conditionalClasses = computed(() => ({\n 'b-structured-list-item--condensed': isCondensed,\n }));\n\n const valueConditionalClasses = computed(() => ({\n 'b-structured-list-item__value--truncate': props.truncate,\n }));\n\n const emitCopy = () => {\n emit('copy', props.copy);\n };\n\n const labelTypographyVariant = computed(() => (isCondensed ? 'caption' : 'body'));\n</script>\n\n<script lang=\"ts\">\n /**\n * This is an item of the `BentoStructuredList` meant to be used only with that component.\n * It consists of a label/value pair, and also the optional copy and search modifiers.\n *\n * @example\n * import { BentoCurrencyISOCode, BentoStructuredListItem, BentoStructuredListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStructuredListItem, BentoStructuredListItem },\n * template: `\n * <bento-structured-list>\n * <bento-structured-list-item label=\"Shopper\" search='searchShopper' search-tooltip='Find shopper'>\n * <bento-typography>\n * 143442642\n * </bento-status>\n * </bento-structured-list-item>\n * <bento-structured-list-item label=\"Amount\" copy='123456'>\n * <bento-currency :currency=\"BentoCurrencyISOCode.USD\" :value=\"123456\" />\n * </bento-structured-list-item>\n * </bento-structured-list>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./structured-list-item.scss\" />\n"],"names":["STRUCTURED_LIST_CONDENSED_INJECTION_KEY","STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY","BentoStructuredListLayoutOptions","__default__$1","isCondensed","inject","computedLayout","computed","props","computedLabelsWidth","provide","__default__","messages","DEFAULT_LABELS_WIDTH","t","useI18n","labelsWidth","ref","computedLabelStyle","conditionalClasses","valueConditionalClasses","emitCopy","emit","labelTypographyVariant"],"mappings":";;;;;;;;;;AAAO,MAAAA,IAAA,uBAAA,+CAAA,GACAC,IAAA,uBAAA,4CAAA,GCAAC,IAAA,CAAA,SAAA,SAAA,SAAA,SAAA,SAAA,SAAA,OAAA,GC6DHC,IAAA,CAAA;;;;;;;;iBA3CAC,IAAAC,EAAAL,GAAA,EAAA,GAEAM,IAAAC;AAAA,MAAuB,MAAAL,EAAA,SAAAM,EAAA,MAAA,IAAAA,EAAA,SAAA;AAAA,IACsD,GAG7EC,IAAAF,EAAA,MACIH,IACI,UAGJI,EAAA,cACI,GAAAA,EAAA,WAAA,OAGJ,GAAAF,EAAA,MAAA,MAAA,GAAA,EAAA,CAAA,CAAA,GAA4C;AAGhD,WAAAI,EAAAT,GAAAQ,CAAA;;;;;;;;;;;;;;;;;;GCqEAE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;iBA1DAC,IAAA,OAaA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GACAX,IAAAC,EAAAL,GAAA,EAAA,GACAgB,IAAAX,EAAAJ,GAAAgB,EAAAJ,CAAA,CAAA,GACAK,IAAAX,EAAA,MAAA,cAAAS,EAAA,KAAA,EAAA,GACAG,IAAAZ,EAAA,OAAA;AAAA,MAA2C,qCAAAH;AAAA,IACF,EAAA,GAGzCgB,IAAAb,EAAA,OAAA;AAAA,MAAgD,2CAAAC,EAAA;AAAA,IACK,EAAA,GAGrDa,IAAA,MAAA;AACI,MAAAC,EAAA,QAAAd,EAAA,IAAA;AAAA,IAAuB,GAG3Be,IAAAhB,EAAA,MAAAH,IAAA,YAAA,MAAA;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"structured-list-item.BBBtie1s.js","sources":["../../src/components/structured-list/structured-list.keys.ts","../../src/components/structured-list/structured-list.types.ts","../../src/components/structured-list/structured-list.vue","../../src/components/structured-list/components/structered-list-item/structured-list-item.vue"],"sourcesContent":["export const STRUCTURED_LIST_CONDENSED_INJECTION_KEY = Symbol('structured list condensed style injection key');\nexport const STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY = Symbol('structured list labels width injection key');\n","export type BentoStructuredListLayoutOptions = '25-75' | '33-66' | '42-58' | '50-50' | '75-25' | '66-33' | '58-42';\nexport const BentoStructuredListLayoutOptions = ['25-75', '33-66', '42-58', '50-50', '75-25', '66-33', '58-42'];\n","<template>\n <dl class=\"b-structured-list\">\n <slot />\n </dl>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, provide } from 'vue';\n import {\n STRUCTURED_LIST_CONDENSED_INJECTION_KEY,\n STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY,\n } from '@/components/structured-list/structured-list.keys';\n import { BentoStructuredListLayoutOptions } from './structured-list.types';\n\n const props = defineProps({\n labelsWidth: { default: null },\n layout: { default: '33-66' }\n});\n\n const isCondensed = inject(STRUCTURED_LIST_CONDENSED_INJECTION_KEY, false);\n\n const computedLayout = computed(() =>\n BentoStructuredListLayoutOptions.includes(props.layout) ? props.layout : '33-66'\n );\n\n const computedLabelsWidth = computed(() => {\n if (isCondensed) {\n return '130px';\n }\n\n if (props.labelsWidth) {\n return `${props.labelsWidth}px`;\n }\n\n return `${computedLayout.value.split('-')[0]}%`;\n });\n\n provide(STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY, computedLabelsWidth);\n</script>\n\n<script lang=\"ts\">\n /**\n * This is a list used to display pairs of information in a clear and organized manner.\n * `BentoStructureListItem` should be used to pass the label/value pairs to the list.\n *\n * @example\n * import { BentoStructuredListItem, BentoStructuredListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStructuredList, BentoStructuredListItem },\n * template: `\n * <bento-structured-list>\n * <bento-structured-list-item label=\"Payment\">\n * <bento-payment-method label=\"Klarna\" type=\"Klarna\" />\n * </bento-structured-list-item>\n * <bento-structured-list-item label=\"Amount\">\n * <bento-currency :currency=\"BentoCurrencyISOCode.USD\" :value=\"123456\" />\n * </bento-structured-list-item>\n * </bento-structured-list>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./structured-list.scss\" />\n","<template>\n <div class=\"b-structured-list-item\" :class=\"conditionalClasses\">\n <dt class=\"b-structured-list-item__label\" :style=\"computedLabelStyle\">\n <bento-typography :variant=\"labelTypographyVariant\">{{ label }}</bento-typography>\n <bento-info-icon v-if=\"labelInfo\" class=\"b-structured-list-item__icon\" :tooltip-text=\"labelInfo\" />\n </dt>\n <dd class=\"b-structured-list-item__value\" :class=\"valueConditionalClasses\">\n <slot />\n <copy v-if=\"copy\" class=\"b-structured-list-item__icon\" :text=\"copy\" @click=\"emitCopy\" />\n <bento-button\n v-if=\"search\"\n v-bento-tooltip-directive:top=\"searchTooltip ? searchTooltip : t('search')\"\n class=\"b-structured-list-item__icon\"\n variant=\"tertiary\"\n @click=\"search\"\n >\n <template #iconLeft>\n <search-icon :svg-title=\"t('search')\" />\n </template>\n </bento-button>\n </dd>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, type Ref } from 'vue';\n\n // Components\n import { BentoButton } from '@/components/button';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography } from '@/components/typography';\n import Copy from '@/components/internal/copy/copy.vue';\n import SearchIcon from '@adyen/ui-assets-icons-16/vue/search';\n\n // Utils\n import { useI18n } from '@/utils/ts/i18n';\n\n // Directives\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives';\n\n // Keys\n import {\n STRUCTURED_LIST_CONDENSED_INJECTION_KEY,\n STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY,\n } from '../../structured-list.keys';\n\n import messages from '../../messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const DEFAULT_LABELS_WIDTH = '33%';\n\n const props = defineProps({\n label: null,\n labelInfo: null,\n copy: null,\n search: { type: Function },\n searchTooltip: null,\n truncate: { type: Boolean }\n});\n\n const emit = defineEmits([\"copy\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const isCondensed = inject(STRUCTURED_LIST_CONDENSED_INJECTION_KEY, false);\n const labelsWidth = inject<Ref<string>>(STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY, ref(DEFAULT_LABELS_WIDTH));\n const computedLabelStyle = computed(() => `flex-basis:${labelsWidth.value}`);\n const conditionalClasses = computed(() => ({\n 'b-structured-list-item--condensed': isCondensed,\n }));\n\n const valueConditionalClasses = computed(() => ({\n 'b-structured-list-item__value--truncate': props.truncate,\n }));\n\n const emitCopy = () => {\n emit('copy', props.copy);\n };\n\n const labelTypographyVariant = computed(() => (isCondensed ? 'caption' : 'body'));\n</script>\n\n<script lang=\"ts\">\n /**\n * This is an item of the `BentoStructuredList` meant to be used only with that component.\n * It consists of a label/value pair, and also the optional copy and search modifiers.\n *\n * @example\n * import { BentoCurrencyISOCode, BentoStructuredListItem, BentoStructuredListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStructuredListItem, BentoStructuredListItem },\n * template: `\n * <bento-structured-list>\n * <bento-structured-list-item label=\"Shopper\" search='searchShopper' search-tooltip='Find shopper'>\n * <bento-typography>\n * 143442642\n * </bento-status>\n * </bento-structured-list-item>\n * <bento-structured-list-item label=\"Amount\" copy='123456'>\n * <bento-currency :currency=\"BentoCurrencyISOCode.USD\" :value=\"123456\" />\n * </bento-structured-list-item>\n * </bento-structured-list>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./structured-list-item.scss\" />\n"],"names":["STRUCTURED_LIST_CONDENSED_INJECTION_KEY","STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY","BentoStructuredListLayoutOptions","__default__$1","isCondensed","inject","computedLayout","computed","props","computedLabelsWidth","provide","__default__","messages","DEFAULT_LABELS_WIDTH","t","useI18n","labelsWidth","ref","computedLabelStyle","conditionalClasses","valueConditionalClasses","emitCopy","emit","labelTypographyVariant"],"mappings":";;;;;;;;;;AAAO,MAAAA,IAAA,uBAAA,+CAAA,GACAC,IAAA,uBAAA,4CAAA,GCAAC,IAAA,CAAA,SAAA,SAAA,SAAA,SAAA,SAAA,SAAA,OAAA,GC6DHC,IAAA,CAAA;;;;;;;;iBA3CAC,IAAAC,EAAAL,GAAA,EAAA,GAEAM,IAAAC;AAAA,MAAuB,MAAAL,EAAA,SAAAM,EAAA,MAAA,IAAAA,EAAA,SAAA;AAAA,IACsD,GAG7EC,IAAAF,EAAA,MACIH,IACI,UAGJI,EAAA,cACI,GAAAA,EAAA,WAAA,OAGJ,GAAAF,EAAA,MAAA,MAAA,GAAA,EAAA,CAAA,CAAA,GAA4C;AAGhD,WAAAI,EAAAT,GAAAQ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCqEAE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;iBA1DAC,IAAA,OAaA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GACAX,IAAAC,EAAAL,GAAA,EAAA,GACAgB,IAAAX,EAAAJ,GAAAgB,EAAAJ,CAAA,CAAA,GACAK,IAAAX,EAAA,MAAA,cAAAS,EAAA,KAAA,EAAA,GACAG,IAAAZ,EAAA,OAAA;AAAA,MAA2C,qCAAAH;AAAA,IACF,EAAA,GAGzCgB,IAAAb,EAAA,OAAA;AAAA,MAAgD,2CAAAC,EAAA;AAAA,IACK,EAAA,GAGrDa,IAAA,MAAA;AACI,MAAAC,EAAA,QAAAd,EAAA,IAAA;AAAA,IAAuB,GAG3Be,IAAAhB,EAAA,MAAAH,IAAA,YAAA,MAAA;;;;;;;;;;;;;;;;;;"}
@@ -5,10 +5,10 @@ import { G as R } from "./grid-layout.1aIiz2N_.js";
5
5
  import { n as f } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
6
6
  import { B as g } from "./typography.C8lPlsbD.js";
7
7
  import { u as G } from "./index.B6WW_F-J.js";
8
- import { B as w } from "./dashed-underline.pjYTS0m1.js";
9
- import { B as L } from "./info-icon.BF8KxU-k.js";
10
- import { B as E } from "./tag.CocLKztJ.js";
11
- import { C as N } from "./copy.BVGQcf22.js";
8
+ import { B as w } from "./dashed-underline.DL2_sik5.js";
9
+ import { B as L } from "./info-icon.DCR42Kvm.js";
10
+ import { B as E } from "./tag.D2xagTJv.js";
11
+ import { C as N } from "./copy.qqGYFbKJ.js";
12
12
  import "../assets/summary-grid.css";
13
13
  const A = {}, F = /* @__PURE__ */ d({
14
14
  ...A,
@@ -334,4 +334,4 @@ export {
334
334
  ge as f,
335
335
  Re as s
336
336
  };
337
- //# sourceMappingURL=summary-grid.types.CIkArZf5.js.map
337
+ //# sourceMappingURL=summary-grid.types.DUIqCmwg.js.map