@adyen/bento-vue3 2.0.0-rc.6 → 2.0.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 (301) hide show
  1. package/dist/@types/index.d.ts +47 -89
  2. package/dist/accordion.js +1 -1
  3. package/dist/action-bar.js +1 -1
  4. package/dist/ai-tag.js +1 -1
  5. package/dist/alert.js +1 -1
  6. package/dist/anchor-scroller.js +1 -1
  7. package/dist/assets/accordion-item.css +1 -1
  8. package/dist/assets/action-bar.css +1 -1
  9. package/dist/assets/ai-tag.css +1 -1
  10. package/dist/assets/anchor-scroller.css +1 -1
  11. package/dist/assets/base-modal.css +1 -1
  12. package/dist/assets/button-actions.css +1 -1
  13. package/dist/assets/calendar.css +1 -1
  14. package/dist/assets/card.css +1 -1
  15. package/dist/assets/checkbox-group.css +1 -1
  16. package/dist/assets/checkbox.css +1 -1
  17. package/dist/assets/data-grid-template.css +1 -1
  18. package/dist/assets/data-grid.css +1 -1
  19. package/dist/assets/date-picker.css +1 -1
  20. package/dist/assets/date-range-picker.css +1 -1
  21. package/dist/assets/dialog-page.css +1 -1
  22. package/dist/assets/dropdown.css +1 -1
  23. package/dist/assets/file-uploader.css +1 -1
  24. package/dist/assets/filter-bar.css +1 -1
  25. package/dist/assets/header-with-views.css +1 -1
  26. package/dist/assets/info-icon-with-popover.css +1 -1
  27. package/dist/assets/input-field-password.css +1 -1
  28. package/dist/assets/input-field.css +1 -1
  29. package/dist/assets/inspector.css +1 -1
  30. package/dist/assets/link.css +1 -1
  31. package/dist/assets/modal-fullscreen.css +1 -1
  32. package/dist/assets/navigation-menu-group.css +1 -1
  33. package/dist/assets/pagination.css +1 -1
  34. package/dist/assets/progress-bar.css +1 -1
  35. package/dist/assets/promo-banner.css +1 -1
  36. package/dist/assets/radio-group.css +1 -1
  37. package/dist/assets/rich-text-editor.css +1 -1
  38. package/dist/assets/secondary-nav.css +1 -1
  39. package/dist/assets/segmented-control.css +1 -1
  40. package/dist/assets/selection-card-group.css +1 -1
  41. package/dist/assets/sidepanel.css +1 -1
  42. package/dist/assets/tab.css +1 -1
  43. package/dist/assets/table-of-contents.css +1 -1
  44. package/dist/assets/tag.css +1 -1
  45. package/dist/assets/textarea.css +1 -1
  46. package/dist/assets/timeline-item.css +1 -1
  47. package/dist/assets/toggle.css +1 -1
  48. package/dist/button.js +3 -3
  49. package/dist/card.js +1 -1
  50. package/dist/checkbox.js +2 -2
  51. package/dist/chip.js +1 -1
  52. package/dist/chunks/{accordion-item.CDqXAJ_o.js → accordion-item.l88yjGPT.js} +2 -2
  53. package/dist/chunks/accordion-item.l88yjGPT.js.map +1 -0
  54. package/dist/chunks/{action-bar.Y0-Y1Lxb.js → action-bar.CWjLoeOU.js} +166 -149
  55. package/dist/chunks/action-bar.CWjLoeOU.js.map +1 -0
  56. package/dist/chunks/{ai-button.HyFL1Urc.js → ai-button.CYaCMWFk.js} +2 -2
  57. package/dist/chunks/{ai-button.HyFL1Urc.js.map → ai-button.CYaCMWFk.js.map} +1 -1
  58. package/dist/chunks/{ai-tag.BQQA6de2.js → ai-tag.CjrOE5yl.js} +3 -3
  59. package/dist/chunks/ai-tag.CjrOE5yl.js.map +1 -0
  60. package/dist/chunks/{alert.DPb3_p0K.js → alert.C8Pe1-OO.js} +2 -2
  61. package/dist/chunks/{alert.DPb3_p0K.js.map → alert.C8Pe1-OO.js.map} +1 -1
  62. package/dist/chunks/{anchor-scroller.B2TgWdCo.js → anchor-scroller.C3zkcfPH.js} +13 -13
  63. package/dist/chunks/anchor-scroller.C3zkcfPH.js.map +1 -0
  64. package/dist/chunks/{base-button.C8hw-h9-.js → base-button.Bi5JR_6k.js} +2 -2
  65. package/dist/chunks/{base-button.C8hw-h9-.js.map → base-button.Bi5JR_6k.js.map} +1 -1
  66. package/dist/chunks/base-modal.Bn4ZXwv6.js +441 -0
  67. package/dist/chunks/base-modal.Bn4ZXwv6.js.map +1 -0
  68. package/dist/chunks/{button-actions-with-menu.LF1NNScj.js → button-actions-with-menu.CrbF2BSQ.js} +2 -2
  69. package/dist/chunks/{button-actions-with-menu.LF1NNScj.js.map → button-actions-with-menu.CrbF2BSQ.js.map} +1 -1
  70. package/dist/chunks/{button-actions.BjSTWgNC.js → button-actions.uIjzze43.js} +5 -5
  71. package/dist/chunks/{button-actions.BjSTWgNC.js.map → button-actions.uIjzze43.js.map} +1 -1
  72. package/dist/chunks/{button.D6d4P8nC.js → button.Ciflfide.js} +2 -2
  73. package/dist/chunks/{button.D6d4P8nC.js.map → button.Ciflfide.js.map} +1 -1
  74. package/dist/chunks/{calendar.Dndck6oT.js → calendar.Dtba7fcs.js} +5 -5
  75. package/dist/chunks/calendar.Dtba7fcs.js.map +1 -0
  76. package/dist/chunks/card.ID7LqObu.js +254 -0
  77. package/dist/chunks/card.ID7LqObu.js.map +1 -0
  78. package/dist/chunks/{checkbox-group.BqLVduAB.js → checkbox-group.BCzNXT1-.js} +8 -8
  79. package/dist/chunks/checkbox-group.BCzNXT1-.js.map +1 -0
  80. package/dist/chunks/{checkbox.OqIysGJA.js → checkbox.0RmIkniU.js} +15 -15
  81. package/dist/chunks/checkbox.0RmIkniU.js.map +1 -0
  82. package/dist/chunks/{chip.REcSE76u.js → chip.Bv6IGch0.js} +2 -2
  83. package/dist/chunks/{chip.REcSE76u.js.map → chip.Bv6IGch0.js.map} +1 -1
  84. package/dist/chunks/{code-snippet.B9poUCAs.js → code-snippet.BbswO6TU.js} +5 -5
  85. package/dist/chunks/{code-snippet.B9poUCAs.js.map → code-snippet.BbswO6TU.js.map} +1 -1
  86. package/dist/chunks/{copy.BqYryk37.js → copy.C92qFRaR.js} +2 -2
  87. package/dist/chunks/{copy.BqYryk37.js.map → copy.C92qFRaR.js.map} +1 -1
  88. package/dist/chunks/{cross-circle-fill-small.ganKvfe0.js → cross-circle-fill-small.C87G_8OX.js} +2 -2
  89. package/dist/chunks/cross-circle-fill-small.C87G_8OX.js.map +1 -0
  90. package/dist/chunks/{dashboard-section.D1GPmEU2.js → dashboard-section.Bv-SveGN.js} +3 -3
  91. package/dist/chunks/{dashboard-section.D1GPmEU2.js.map → dashboard-section.Bv-SveGN.js.map} +1 -1
  92. package/dist/chunks/{dashed-underline.E65uUWYF.js → dashed-underline.C3lSC1_R.js} +2 -2
  93. package/dist/chunks/{dashed-underline.E65uUWYF.js.map → dashed-underline.C3lSC1_R.js.map} +1 -1
  94. package/dist/chunks/{data-grid-template.DsZI-ISc.js → data-grid-template.DqZmPeze.js} +4 -4
  95. package/dist/chunks/{data-grid-template.DsZI-ISc.js.map → data-grid-template.DqZmPeze.js.map} +1 -1
  96. package/dist/chunks/{data-grid.oiH-QM7_.js → data-grid.Ca27H24r.js} +20 -20
  97. package/dist/chunks/data-grid.Ca27H24r.js.map +1 -0
  98. package/dist/chunks/{date-picker.94wdYFML.js → date-picker.Dnr2HuxA.js} +7 -7
  99. package/dist/chunks/date-picker.Dnr2HuxA.js.map +1 -0
  100. package/dist/chunks/{date-range-picker.D45JX1VD.js → date-range-picker.CuBygd3O.js} +10 -10
  101. package/dist/chunks/{date-range-picker.D45JX1VD.js.map → date-range-picker.CuBygd3O.js.map} +1 -1
  102. package/dist/chunks/{dialog-page.yakmJ6Bc.js → dialog-page.D60pjDsQ.js} +2 -2
  103. package/dist/chunks/{dialog-page.yakmJ6Bc.js.map → dialog-page.D60pjDsQ.js.map} +1 -1
  104. package/dist/chunks/{draggable-handle.DnvrxRxK.js → draggable-handle.Cvc8gHzx.js} +2 -2
  105. package/dist/chunks/{draggable-handle.DnvrxRxK.js.map → draggable-handle.Cvc8gHzx.js.map} +1 -1
  106. package/dist/chunks/{draggable.Cp2Qnooa.js → draggable.BZsgR26I.js} +2 -2
  107. package/dist/chunks/{draggable.Cp2Qnooa.js.map → draggable.BZsgR26I.js.map} +1 -1
  108. package/dist/chunks/{dropdown-tag.C3ybYQxd.js → dropdown-tag.Bn5FPeEL.js} +3 -3
  109. package/dist/chunks/{dropdown-tag.C3ybYQxd.js.map → dropdown-tag.Bn5FPeEL.js.map} +1 -1
  110. package/dist/chunks/{dropdown.DivEbn7p.js → dropdown.D_jkFrMd.js} +194 -194
  111. package/dist/chunks/dropdown.D_jkFrMd.js.map +1 -0
  112. package/dist/chunks/{empty-state.Bto2psKu.js → empty-state.DpUC-3wv.js} +3 -3
  113. package/dist/chunks/{empty-state.Bto2psKu.js.map → empty-state.DpUC-3wv.js.map} +1 -1
  114. package/dist/chunks/es6.yPcTMnSH.js.map +1 -1
  115. package/dist/chunks/{file-uploader.BuOQRa-V.js → file-uploader.BglImnqw.js} +6 -6
  116. package/dist/chunks/file-uploader.BglImnqw.js.map +1 -0
  117. package/dist/chunks/{filter-bar.B14faBNI.js → filter-bar.DG4GTi8L.js} +514 -533
  118. package/dist/chunks/filter-bar.DG4GTi8L.js.map +1 -0
  119. package/dist/chunks/{fixed-scroller.B3kEBipG.js → fixed-scroller.DoOR83iH.js} +2 -2
  120. package/dist/chunks/{fixed-scroller.B3kEBipG.js.map → fixed-scroller.DoOR83iH.js.map} +1 -1
  121. package/dist/chunks/{footer-actions.NpAByudT.js → footer-actions.Dl20Q1WX.js} +3 -3
  122. package/dist/chunks/{footer-actions.NpAByudT.js.map → footer-actions.Dl20Q1WX.js.map} +1 -1
  123. package/dist/chunks/{form-layout-title.Dh45kd1K.js → form-layout-title.BZFh_nGD.js} +2 -2
  124. package/dist/chunks/{form-layout-title.Dh45kd1K.js.map → form-layout-title.BZFh_nGD.js.map} +1 -1
  125. package/dist/chunks/generate-uid.DBWe4g6T.js.map +1 -1
  126. package/dist/chunks/{header-with-views.DufmtnZ2.js → header-with-views.WJlXgGI5.js} +875 -849
  127. package/dist/chunks/{header-with-views.DufmtnZ2.js.map → header-with-views.WJlXgGI5.js.map} +1 -1
  128. package/dist/chunks/{header.Jtie5-7g.js → header.Bi3MPZKE.js} +4 -4
  129. package/dist/chunks/{header.Jtie5-7g.js.map → header.Bi3MPZKE.js.map} +1 -1
  130. package/dist/chunks/{info-icon-with-popover.CLGZteKS.js → info-icon-with-popover.uSr6-jzR.js} +3 -3
  131. package/dist/chunks/info-icon-with-popover.uSr6-jzR.js.map +1 -0
  132. package/dist/chunks/{input-field-password.BPjmZ2vh.js → input-field-password.CJZxudne.js} +5 -5
  133. package/dist/chunks/input-field-password.CJZxudne.js.map +1 -0
  134. package/dist/chunks/{input-field-phone-number.BViae6Ex.js → input-field-phone-number.OJ4MG9Gf.js} +2 -2
  135. package/dist/chunks/{input-field-phone-number.BViae6Ex.js.map → input-field-phone-number.OJ4MG9Gf.js.map} +1 -1
  136. package/dist/chunks/{input-field.DgQG5TCW.js → input-field.IyNujUZt.js} +3 -3
  137. package/dist/chunks/input-field.IyNujUZt.js.map +1 -0
  138. package/dist/chunks/{input-time.DYbJUHP5.js → input-time.BJ6YqkFi.js} +3 -3
  139. package/dist/chunks/{input-time.DYbJUHP5.js.map → input-time.BJ6YqkFi.js.map} +1 -1
  140. package/dist/chunks/{inspector-page.BdfORbVT.js → inspector-page.D42_PXHM.js} +3 -3
  141. package/dist/chunks/{inspector-page.BdfORbVT.js.map → inspector-page.D42_PXHM.js.map} +1 -1
  142. package/dist/chunks/{inspector.CEiwH5Pt.js → inspector.BBgrupfO.js} +3 -3
  143. package/dist/chunks/inspector.BBgrupfO.js.map +1 -0
  144. package/dist/chunks/{link.DHhC2vrX.js → link.types.BGj7apK3.js} +36 -36
  145. package/dist/chunks/link.types.BGj7apK3.js.map +1 -0
  146. package/dist/chunks/{list-item.QB0YYGW9.js → list-item.CT7dyMQH.js} +3 -3
  147. package/dist/chunks/{list-item.QB0YYGW9.js.map → list-item.CT7dyMQH.js.map} +1 -1
  148. package/dist/chunks/{listbox-option-tag.DCuA8MoL.js → listbox-option-tag.CwrFdsY1.js} +2 -2
  149. package/dist/chunks/{listbox-option-tag.DCuA8MoL.js.map → listbox-option-tag.CwrFdsY1.js.map} +1 -1
  150. package/dist/chunks/{modal-fullscreen.DtG6vHhq.js → modal-fullscreen.I5bjqzfd.js} +6 -6
  151. package/dist/chunks/modal-fullscreen.I5bjqzfd.js.map +1 -0
  152. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.CKWzgLgL.js → modal.vue_vue_type_script_setup_true_lang.CrsIyU7A.js} +5 -5
  153. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.CKWzgLgL.js.map → modal.vue_vue_type_script_setup_true_lang.CrsIyU7A.js.map} +1 -1
  154. package/dist/chunks/{navigation-menu-group.E-24hOWI.js → navigation-menu-group.BSGdcUDN.js} +6 -6
  155. package/dist/chunks/navigation-menu-group.BSGdcUDN.js.map +1 -0
  156. package/dist/chunks/{pagination.B2Kgh-MF.js → pagination.C5gZxtZY.js} +5 -5
  157. package/dist/chunks/pagination.C5gZxtZY.js.map +1 -0
  158. package/dist/chunks/{promo-banner.DuottTum.js → promo-banner.kE1-WkzI.js} +9 -9
  159. package/dist/chunks/{promo-banner.DuottTum.js.map → promo-banner.kE1-WkzI.js.map} +1 -1
  160. package/dist/chunks/{radio-group.BANaG-Fa.js → radio-group.XmRPh03c.js} +4 -4
  161. package/dist/chunks/radio-group.XmRPh03c.js.map +1 -0
  162. package/dist/chunks/{rich-text-editor.Dbc9Y2YC.js → rich-text-editor.Cv_Vwt-6.js} +6 -6
  163. package/dist/chunks/{rich-text-editor.Dbc9Y2YC.js.map → rich-text-editor.Cv_Vwt-6.js.map} +1 -1
  164. package/dist/chunks/{search-bar.CAsAh02R.js → search-bar.5tObtLfW.js} +3 -3
  165. package/dist/chunks/{search-bar.CAsAh02R.js.map → search-bar.5tObtLfW.js.map} +1 -1
  166. package/dist/chunks/{secondary-nav.DOgZJUTd.js → secondary-nav.Bhn5bVYI.js} +5 -5
  167. package/dist/chunks/secondary-nav.Bhn5bVYI.js.map +1 -0
  168. package/dist/chunks/{segmented-control.6XApEjVS.js → segmented-control.CEt2dz4n.js} +2 -2
  169. package/dist/chunks/segmented-control.CEt2dz4n.js.map +1 -0
  170. package/dist/chunks/{selection-card-group.emQVruZd.js → selection-card-group.DHXtJpoB.js} +11 -11
  171. package/dist/chunks/selection-card-group.DHXtJpoB.js.map +1 -0
  172. package/dist/chunks/{sidepanel.DcrakBM9.js → sidepanel._30g8POM.js} +6 -6
  173. package/dist/chunks/sidepanel._30g8POM.js.map +1 -0
  174. package/dist/chunks/{step.Ch6oovwT.js → step.5_ZukVqJ.js} +2 -2
  175. package/dist/chunks/{step.Ch6oovwT.js.map → step.5_ZukVqJ.js.map} +1 -1
  176. package/dist/chunks/{structured-list-item.exe4zQXe.js → structured-list-item.CBzznwcF.js} +3 -3
  177. package/dist/chunks/{structured-list-item.exe4zQXe.js.map → structured-list-item.CBzznwcF.js.map} +1 -1
  178. package/dist/chunks/{summary-grid.types.BYqz5zdo.js → summary-grid.types.BR_EGvRg.js} +4 -4
  179. package/dist/chunks/{summary-grid.types.BYqz5zdo.js.map → summary-grid.types.BR_EGvRg.js.map} +1 -1
  180. package/dist/chunks/{tab.Bat55rEc.js → tab.D_k5AVHk.js} +4 -4
  181. package/dist/chunks/tab.D_k5AVHk.js.map +1 -0
  182. package/dist/chunks/{table-of-contents.DIDNJXqh.js → table-of-contents.CJ2yMbAG.js} +15 -15
  183. package/dist/chunks/table-of-contents.CJ2yMbAG.js.map +1 -0
  184. package/dist/chunks/tag.BE1j0Oid.js +69 -0
  185. package/dist/chunks/tag.BE1j0Oid.js.map +1 -0
  186. package/dist/chunks/{textarea.-owTWdhj.js → textarea.BYshPd98.js} +4 -4
  187. package/dist/chunks/textarea.BYshPd98.js.map +1 -0
  188. package/dist/chunks/{timeline-item.DvlhZ_-D.js → timeline-item.Sy_DSw6p.js} +9 -9
  189. package/dist/chunks/{timeline-item.DvlhZ_-D.js.map → timeline-item.Sy_DSw6p.js.map} +1 -1
  190. package/dist/chunks/title-details.C4ZvxPMu.js +144 -0
  191. package/dist/chunks/title-details.C4ZvxPMu.js.map +1 -0
  192. package/dist/chunks/{toast.N4m58lr8.js → toast.u5Y_CGe_.js} +2 -2
  193. package/dist/chunks/{toast.N4m58lr8.js.map → toast.u5Y_CGe_.js.map} +1 -1
  194. package/dist/chunks/{toggle.BqQ7NGMb.js → toggle.BW8ww0Ih.js} +2 -2
  195. package/dist/chunks/toggle.BW8ww0Ih.js.map +1 -0
  196. package/dist/chunks/tooltip.TFOGHOO0.js.map +1 -1
  197. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CMkHWnq2.js → tutorial.vue_vue_type_script_setup_true_lang.BIP-heAH.js} +2 -2
  198. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CMkHWnq2.js.map → tutorial.vue_vue_type_script_setup_true_lang.BIP-heAH.js.map} +1 -1
  199. package/dist/chunks/use-bento-toast-controller.BAoPbtq7.js.map +1 -1
  200. package/dist/chunks/{use-date-input-formatter.DTQ7YmPb.js → use-date-input-formatter._ik1DYYV.js} +2 -2
  201. package/dist/chunks/{use-date-input-formatter.DTQ7YmPb.js.map → use-date-input-formatter._ik1DYYV.js.map} +1 -1
  202. package/dist/chunks/use-dynamic-date-fns-locale.BMO9rsEh.js +39 -0
  203. package/dist/chunks/use-dynamic-date-fns-locale.BMO9rsEh.js.map +1 -0
  204. package/dist/code-snippet.js +1 -1
  205. package/dist/dashboard-template.js +1 -1
  206. package/dist/dashed-underline.js +1 -1
  207. package/dist/data-grid-template.js +1 -1
  208. package/dist/data-grid.js +1 -1
  209. package/dist/date-picker.js +2 -2
  210. package/dist/date-range-picker.js +2 -2
  211. package/dist/date-time-picker.js +4 -4
  212. package/dist/draggable.js +2 -2
  213. package/dist/dropdown.js +2 -2
  214. package/dist/empty-state.js +1 -1
  215. package/dist/file-uploader.js +1 -1
  216. package/dist/filter-bar.js +1 -1
  217. package/dist/form-layout.js +1 -1
  218. package/dist/header-with-views.js +1 -1
  219. package/dist/header.js +1 -1
  220. package/dist/index.js +62 -62
  221. package/dist/input-field-password.js +1 -1
  222. package/dist/input-field-phone-number.js +1 -1
  223. package/dist/input-field.js +1 -1
  224. package/dist/input-time.js +1 -1
  225. package/dist/inspector.js +2 -2
  226. package/dist/internal.js +10 -10
  227. package/dist/link.js +1 -1
  228. package/dist/list.js +1 -1
  229. package/dist/menu.js +1 -1
  230. package/dist/modal-fullscreen.js +1 -1
  231. package/dist/modal.js +2 -2
  232. package/dist/navigation-menu.js +1 -1
  233. package/dist/pagination.js +1 -1
  234. package/dist/popover.js +1 -1
  235. package/dist/progress-bar.js +6 -6
  236. package/dist/progress-bar.js.map +1 -1
  237. package/dist/promo-banner.js +1 -1
  238. package/dist/radio-group.js +1 -1
  239. package/dist/rich-text-editor.js +1 -1
  240. package/dist/search-bar.js +2 -2
  241. package/dist/secondary-nav.js +1 -1
  242. package/dist/segmented-control.js +1 -1
  243. package/dist/selection-card.js +1 -1
  244. package/dist/sidepanel.js +1 -1
  245. package/dist/stepper.js +1 -1
  246. package/dist/structured-list.js +1 -1
  247. package/dist/styles/bento-dark.css +3 -3
  248. package/dist/styles/bento-light.css +4 -4
  249. package/dist/styles/bento.css +4 -4
  250. package/dist/styles/legacy.css +4 -4
  251. package/dist/styles/styleguide.css +4 -4
  252. package/dist/styles/utility.css +4 -4
  253. package/dist/summary-grid.js +1 -1
  254. package/dist/table-of-contents.js +1 -1
  255. package/dist/tabs.js +1 -1
  256. package/dist/tag.js +1 -1
  257. package/dist/textarea.js +1 -1
  258. package/dist/timeline.js +1 -1
  259. package/dist/toast.js +1 -1
  260. package/dist/toggle.js +1 -1
  261. package/dist/tutorial.js +1 -1
  262. package/dist/web-types.json +2 -2
  263. package/package.json +6 -6
  264. package/dist/chunks/accordion-item.CDqXAJ_o.js.map +0 -1
  265. package/dist/chunks/action-bar.Y0-Y1Lxb.js.map +0 -1
  266. package/dist/chunks/ai-tag.BQQA6de2.js.map +0 -1
  267. package/dist/chunks/anchor-scroller.B2TgWdCo.js.map +0 -1
  268. package/dist/chunks/base-modal.CD51pnsZ.js +0 -433
  269. package/dist/chunks/base-modal.CD51pnsZ.js.map +0 -1
  270. package/dist/chunks/calendar.Dndck6oT.js.map +0 -1
  271. package/dist/chunks/card.DKvGbswE.js +0 -224
  272. package/dist/chunks/card.DKvGbswE.js.map +0 -1
  273. package/dist/chunks/checkbox-group.BqLVduAB.js.map +0 -1
  274. package/dist/chunks/checkbox.OqIysGJA.js.map +0 -1
  275. package/dist/chunks/cross-circle-fill-small.ganKvfe0.js.map +0 -1
  276. package/dist/chunks/data-grid.oiH-QM7_.js.map +0 -1
  277. package/dist/chunks/date-picker.94wdYFML.js.map +0 -1
  278. package/dist/chunks/dropdown.DivEbn7p.js.map +0 -1
  279. package/dist/chunks/file-uploader.BuOQRa-V.js.map +0 -1
  280. package/dist/chunks/filter-bar.B14faBNI.js.map +0 -1
  281. package/dist/chunks/info-icon-with-popover.CLGZteKS.js.map +0 -1
  282. package/dist/chunks/input-field-password.BPjmZ2vh.js.map +0 -1
  283. package/dist/chunks/input-field.DgQG5TCW.js.map +0 -1
  284. package/dist/chunks/inspector.CEiwH5Pt.js.map +0 -1
  285. package/dist/chunks/link.DHhC2vrX.js.map +0 -1
  286. package/dist/chunks/modal-fullscreen.DtG6vHhq.js.map +0 -1
  287. package/dist/chunks/navigation-menu-group.E-24hOWI.js.map +0 -1
  288. package/dist/chunks/pagination.B2Kgh-MF.js.map +0 -1
  289. package/dist/chunks/radio-group.BANaG-Fa.js.map +0 -1
  290. package/dist/chunks/secondary-nav.DOgZJUTd.js.map +0 -1
  291. package/dist/chunks/segmented-control.6XApEjVS.js.map +0 -1
  292. package/dist/chunks/selection-card-group.emQVruZd.js.map +0 -1
  293. package/dist/chunks/sidepanel.DcrakBM9.js.map +0 -1
  294. package/dist/chunks/tab.Bat55rEc.js.map +0 -1
  295. package/dist/chunks/table-of-contents.DIDNJXqh.js.map +0 -1
  296. package/dist/chunks/tag.DmGI_QZ-.js +0 -63
  297. package/dist/chunks/tag.DmGI_QZ-.js.map +0 -1
  298. package/dist/chunks/textarea.-owTWdhj.js.map +0 -1
  299. package/dist/chunks/title-details.DoGThvsa.js +0 -176
  300. package/dist/chunks/title-details.DoGThvsa.js.map +0 -1
  301. package/dist/chunks/toggle.BqQ7NGMb.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as I, provide as T, toRef as A, useAttrs as B, ref as p, watch as P, openBlock as N, createElementBlock as y, createVNode as n, mergeProps as F, unref as t, createSlots as g, withCtx as h, createElementVNode as U, withKeys as m } from "vue";
2
- import { g as L } from "./dropdown.DivEbn7p.js";
2
+ import { g as L } from "./dropdown.D_jkFrMd.js";
3
3
  import { u as R } from "./index.B875RXHM.js";
4
- import { I as k, B as $ } from "./input-field.DgQG5TCW.js";
4
+ import { I as k, B as $ } from "./input-field.IyNujUZt.js";
5
5
  import { _ as D } from "./search.mr5Q3y2z.js";
6
6
  import { _ as K } from "./cross-circle-fill.DJbpTaVE.js";
7
7
  import { _ as q } from "./_plugin-vue_export-helper.CHgC5LLL.js";
@@ -111,4 +111,4 @@ export {
111
111
  w as a,
112
112
  f as b
113
113
  };
114
- //# sourceMappingURL=search-bar.CAsAh02R.js.map
114
+ //# sourceMappingURL=search-bar.5tObtLfW.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"search-bar.CAsAh02R.js","sources":["../../../vue2/src/components/search-bar/search-bar.types.ts","../../../vue2/src/components/search-bar/search-bar.vue"],"sourcesContent":["export enum BentoSearchBarInternalEvent {\n CLEAR = 'clear',\n ESCAPE = 'escape-pressed',\n INPUT = 'input',\n UPDATE = 'update:search-term',\n}\n\nexport enum BentoSearchBarEvent {\n CLEAR = 'search-clear',\n INPUT = 'search-input',\n UPDATE = 'update:search-term',\n}\n\nexport interface BentoSearchBarItem {\n label: string;\n items?: Array<BentoSearchBarItem>;\n}\n\nexport type BentoSearchBarData = Array<BentoSearchBarItem>;\n\nexport interface BentoSearchBarProps {\n /**\n * Text that labels an the search bar input element\n */\n inputFieldAriaLabel: string;\n\n /**\n * Reduces height of the search bar. Default: false\n */\n condensed?: boolean;\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime?: number;\n\n /**\n * Disables the text input.\n */\n disabled?: boolean;\n\n /**\n * Text displayed as a hint when the field is not empty\n */\n hint?: string;\n\n /**\n * Text displayed as the placeholder of the input-field\n */\n placeholder?: string;\n\n /**\n * Text displayed as the value being searched\n */\n value?: string;\n}\n","<template>\n <div class=\"b-search-bar\">\n <bento-input-field\n ref=\"bentoInputField\"\n v-bind=\"attrs\"\n :model-value=\"searchTerm\"\n type=\"search\"\n :condensed=\"condensed\"\n :aria-label=\"inputFieldAriaLabel\"\n :aria-hidden=\"false\"\n :disabled=\"disabled\"\n :placeholder=\"placeholder\"\n @update:model-value=\"onInputEvent\"\n @focus=\"emit('focus')\"\n @blur=\"emit('blur')\"\n @escape-pressed=\"emit(BentoSearchBarInternalEvent.ESCAPE)\"\n >\n <template #iconBefore>\n <search-icon :svg-title=\"t('search')\" aria-hidden=\"true\" />\n </template>\n\n <template v-if=\"searchTerm\" #iconAfter>\n <div\n class=\"b-search-bar__clear-search\"\n tabindex=\"0\"\n data-testid=\"b-search-bar-clear-search-button\"\n @click=\"onClearSearch\"\n @keypress.enter=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-icon :svg-title=\"t('clearSearch')\" />\n </div>\n </template>\n </bento-input-field>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { provide, ref, toRef, useAttrs, watch } from 'vue';\n import { debounce } from '@/utils/ts/debounce';\n import { BentoSearchBarInternalEvent, type BentoSearchBarProps } from './search-bar.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { INPUT_FIELD_HINT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n import BentoInputField from '@/components/input-field/input-field.vue';\n import SearchIcon from '@adyen/ui-assets-icons-16/vue/search';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = withDefaults(defineProps<BentoSearchBarProps>(), {\n condensed: false,\n debounceTime: 300,\n disabled: false,\n hint: '',\n placeholder: '',\n value: undefined,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the input value changes by typing a search. Debounced by the `debounceTime` property\n */\n (e: 'input', inputValue: string): void;\n\n /**\n * Emitted when the \"clear search\" button is clicked\n */\n (e: 'clear'): void;\n\n /**\n * Emitted when the \"ESC\" key is pressed inside the Search Bar input\n */\n (e: 'escape-pressed'): void;\n\n /**\n * Emitted when the element has lost focus\n */\n (e: 'blur'): void;\n\n /**\n * Emitted when the element has received focus\n */\n (e: 'focus'): void;\n }>();\n\n provide(INPUT_FIELD_HINT_INJECTION_KEY, toRef(props, 'hint'));\n\n const attrs = useAttrs();\n const searchTerm = ref(props.value);\n const bentoInputField = ref<InstanceType<typeof BentoInputField> | null>();\n\n watch(\n () => props.value,\n () => {\n searchTerm.value = props.value;\n },\n { immediate: true }\n );\n\n const onClearSearch = () => {\n searchTerm.value = '';\n emit('clear');\n emit('input', '');\n };\n\n const debouncedEmit = debounce(() => {\n emit('input', searchTerm.value);\n }, props.debounceTime);\n\n const onInputEvent = (value: string) => {\n searchTerm.value = value;\n debouncedEmit();\n };\n\n const focus = () => {\n // bentoInputField.value?.focusInput();\n bentoInputField.value.focusInput();\n };\n\n // Expose method so that it can be used to focus on the input from outside the component\n defineExpose({\n /**\n * Focus on the input field when called.\n */\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Search functionality to help users find the desired data quicker.\n * When a user starts typing, the data is dynamically filtered to\n * only show the relevant results.\n *\n * Clearing the search field displays the entire list again.\n *\n * @example\n * import {\n * BentoSearchBar,\n * BentoSearchBarData,\n * useSearchBarFilter\n * } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSearchBar },\n * template: `\n * <bento-search-bar\n * input-field-aria-label=\"Search bar\"\n * v-model=\"searchTerm\"\n * @input=\"onInput\"\n * @clear=\"onClearSearch\"\n * />\n * // Render the filtered data\n * {{ filteredData }}\n * `,\n * setup() {\n * const searchTerm = ref('');\n * const data = ref<BentoSearchBarData>([]);\n * const filteredData = useSearchBarFilter(searchTerm, data);\n *\n * consdt onInput = () => {}\n * consdt onClearSearch = () => {}\n *\n * return {\n * searchTerm,\n * filteredData,\n * onInput,\n * onClearSearch,\n * };\n * }\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./search-bar.scss\" />\n"],"names":["BentoSearchBarInternalEvent","BentoSearchBarInternalEvent2","BentoSearchBarEvent","BentoSearchBarEvent2","__default__","messages","t","useI18n","props","__props","emit","__emit","provide","INPUT_FIELD_HINT_INJECTION_KEY","toRef","attrs","useAttrs","searchTerm","ref","bentoInputField","watch","onClearSearch","debouncedEmit","debounce","onInputEvent","value","__expose"],"mappings":";;;;;;;;AAAO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,QAAA,SACAA,EAAA,SAAA,kBACAA,EAAA,QAAA,SACAA,EAAA,SAAA,sBAJQA,IAAAD,KAAA,CAAA,CAAA,GAOLE,IAAA,kBAAAC,OACHA,EAAA,QAAA,gBACAA,EAAA,QAAA,gBACAA,EAAA,SAAA,sBAHQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;;;kCCyKRE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;AA/HA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GAEAG,IAAAC,GASAC,IAAAC;AA2BA,IAAAC,EAAAC,GAAAC,EAAAN,GAAA,MAAA,CAAA;AAEA,UAAAO,IAAAC,EAAA,GACAC,IAAAC,EAAAV,EAAA,KAAA,GACAW,IAAAD,EAAA;AAEA,IAAAE;AAAA,MAAA,MAAAZ,EAAA;AAAA,MACgB,MAAA;AAER,QAAAS,EAAA,QAAAT,EAAA;AAAA,MAAyB;AAAA,MAC7B,EAAA,WAAA,GAAA;AAAA,IACkB;AAGtB,UAAAa,IAAA,MAAA;AACI,MAAAJ,EAAA,QAAA,IACAP,EAAA,OAAA,GACAA,EAAA,SAAA,EAAA;AAAA,IAAgB,GAGpBY,IAAAC,EAAA,MAAA;AACI,MAAAb,EAAA,SAAAO,EAAA,KAAA;AAAA,IAA8B,GAAAT,EAAA,YAAA,GAGlCgB,IAAA,CAAAC,MAAA;AACI,MAAAR,EAAA,QAAAQ,GACAH,EAAA;AAAA,IAAc;AASlB,WAAAI,EAAA;AAAA;AAAA;AAAA;AAAA,MAAa,OANb,MAAA;AAEI,QAAAP,EAAA,MAAA,WAAA;AAAA,MAAiC;AAAA,IAQjC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"search-bar.5tObtLfW.js","sources":["../../../vue2/src/components/search-bar/search-bar.types.ts","../../../vue2/src/components/search-bar/search-bar.vue"],"sourcesContent":["export enum BentoSearchBarInternalEvent {\n CLEAR = 'clear',\n ESCAPE = 'escape-pressed',\n INPUT = 'input',\n UPDATE = 'update:search-term',\n}\n\nexport enum BentoSearchBarEvent {\n CLEAR = 'search-clear',\n INPUT = 'search-input',\n UPDATE = 'update:search-term',\n}\n\nexport interface BentoSearchBarItem {\n label: string;\n items?: Array<BentoSearchBarItem>;\n}\n\nexport type BentoSearchBarData = Array<BentoSearchBarItem>;\n\nexport interface BentoSearchBarProps {\n /**\n * Text that labels an the search bar input element\n */\n inputFieldAriaLabel: string;\n\n /**\n * Reduces height of the search bar. Default: false\n */\n condensed?: boolean;\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime?: number;\n\n /**\n * Disables the text input.\n */\n disabled?: boolean;\n\n /**\n * Text displayed as a hint when the field is not empty\n */\n hint?: string;\n\n /**\n * Text displayed as the placeholder of the input-field\n */\n placeholder?: string;\n\n /**\n * Text displayed as the value being searched\n */\n value?: string;\n}\n","<template>\n <div class=\"b-search-bar\">\n <bento-input-field\n ref=\"bentoInputField\"\n v-bind=\"attrs\"\n :model-value=\"searchTerm\"\n type=\"search\"\n :condensed=\"condensed\"\n :aria-label=\"inputFieldAriaLabel\"\n :aria-hidden=\"false\"\n :disabled=\"disabled\"\n :placeholder=\"placeholder\"\n @update:model-value=\"onInputEvent\"\n @focus=\"emit('focus')\"\n @blur=\"emit('blur')\"\n @escape-pressed=\"emit(BentoSearchBarInternalEvent.ESCAPE)\"\n >\n <template #iconBefore>\n <search-icon :svg-title=\"t('search')\" aria-hidden=\"true\" />\n </template>\n\n <template v-if=\"searchTerm\" #iconAfter>\n <div\n class=\"b-search-bar__clear-search\"\n tabindex=\"0\"\n data-testid=\"b-search-bar-clear-search-button\"\n @click=\"onClearSearch\"\n @keypress.enter=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-icon :svg-title=\"t('clearSearch')\" />\n </div>\n </template>\n </bento-input-field>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { provide, ref, toRef, useAttrs, watch } from 'vue';\n import { debounce } from '@/utils/ts/debounce';\n import { BentoSearchBarInternalEvent, type BentoSearchBarProps } from './search-bar.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { INPUT_FIELD_HINT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n import BentoInputField from '@/components/input-field/input-field.vue';\n import SearchIcon from '@adyen/ui-assets-icons-16/vue/search';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = withDefaults(defineProps<BentoSearchBarProps>(), {\n condensed: false,\n debounceTime: 300,\n disabled: false,\n hint: '',\n placeholder: '',\n value: undefined,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the input value changes by typing a search. Debounced by the `debounceTime` property\n */\n (e: 'input', inputValue: string): void;\n\n /**\n * Emitted when the \"clear search\" button is clicked\n */\n (e: 'clear'): void;\n\n /**\n * Emitted when the \"ESC\" key is pressed inside the Search Bar input\n */\n (e: 'escape-pressed'): void;\n\n /**\n * Emitted when the element has lost focus\n */\n (e: 'blur'): void;\n\n /**\n * Emitted when the element has received focus\n */\n (e: 'focus'): void;\n }>();\n\n provide(INPUT_FIELD_HINT_INJECTION_KEY, toRef(props, 'hint'));\n\n const attrs = useAttrs();\n const searchTerm = ref(props.value);\n const bentoInputField = ref<InstanceType<typeof BentoInputField> | null>();\n\n watch(\n () => props.value,\n () => {\n searchTerm.value = props.value;\n },\n { immediate: true }\n );\n\n const onClearSearch = () => {\n searchTerm.value = '';\n emit('clear');\n emit('input', '');\n };\n\n const debouncedEmit = debounce(() => {\n emit('input', searchTerm.value);\n }, props.debounceTime);\n\n const onInputEvent = (value: string) => {\n searchTerm.value = value;\n debouncedEmit();\n };\n\n const focus = () => {\n // bentoInputField.value?.focusInput();\n bentoInputField.value.focusInput();\n };\n\n // Expose method so that it can be used to focus on the input from outside the component\n defineExpose({\n /**\n * Focus on the input field when called.\n */\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Search functionality to help users find the desired data quicker.\n * When a user starts typing, the data is dynamically filtered to\n * only show the relevant results.\n *\n * Clearing the search field displays the entire list again.\n *\n * @example\n * import {\n * BentoSearchBar,\n * BentoSearchBarData,\n * useSearchBarFilter\n * } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSearchBar },\n * template: `\n * <bento-search-bar\n * input-field-aria-label=\"Search bar\"\n * v-model=\"searchTerm\"\n * @input=\"onInput\"\n * @clear=\"onClearSearch\"\n * />\n * // Render the filtered data\n * {{ filteredData }}\n * `,\n * setup() {\n * const searchTerm = ref('');\n * const data = ref<BentoSearchBarData>([]);\n * const filteredData = useSearchBarFilter(searchTerm, data);\n *\n * consdt onInput = () => {}\n * consdt onClearSearch = () => {}\n *\n * return {\n * searchTerm,\n * filteredData,\n * onInput,\n * onClearSearch,\n * };\n * }\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./search-bar.scss\" />\n"],"names":["BentoSearchBarInternalEvent","BentoSearchBarInternalEvent2","BentoSearchBarEvent","BentoSearchBarEvent2","__default__","messages","t","useI18n","props","__props","emit","__emit","provide","INPUT_FIELD_HINT_INJECTION_KEY","toRef","attrs","useAttrs","searchTerm","ref","bentoInputField","watch","onClearSearch","debouncedEmit","debounce","onInputEvent","value","__expose"],"mappings":";;;;;;;;AAAO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,QAAA,SACAA,EAAA,SAAA,kBACAA,EAAA,QAAA,SACAA,EAAA,SAAA,sBAJQA,IAAAD,KAAA,CAAA,CAAA,GAOLE,IAAA,kBAAAC,OACHA,EAAA,QAAA,gBACAA,EAAA,QAAA,gBACAA,EAAA,SAAA,sBAHQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;;;kCCyKRE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;AA/HA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GAEAG,IAAAC,GASAC,IAAAC;AA2BA,IAAAC,EAAAC,GAAAC,EAAAN,GAAA,MAAA,CAAA;AAEA,UAAAO,IAAAC,EAAA,GACAC,IAAAC,EAAAV,EAAA,KAAA,GACAW,IAAAD,EAAA;AAEA,IAAAE;AAAA,MAAA,MAAAZ,EAAA;AAAA,MACgB,MAAA;AAER,QAAAS,EAAA,QAAAT,EAAA;AAAA,MAAyB;AAAA,MAC7B,EAAA,WAAA,GAAA;AAAA,IACkB;AAGtB,UAAAa,IAAA,MAAA;AACI,MAAAJ,EAAA,QAAA,IACAP,EAAA,OAAA,GACAA,EAAA,SAAA,EAAA;AAAA,IAAgB,GAGpBY,IAAAC,EAAA,MAAA;AACI,MAAAb,EAAA,SAAAO,EAAA,KAAA;AAAA,IAA8B,GAAAT,EAAA,YAAA,GAGlCgB,IAAA,CAAAC,MAAA;AACI,MAAAR,EAAA,QAAAQ,GACAH,EAAA;AAAA,IAAc;AASlB,WAAAI,EAAA;AAAA;AAAA;AAAA;AAAA,MAAa,OANb,MAAA;AAEI,QAAAP,EAAA,MAAA,WAAA;AAAA,MAAiC;AAAA,IAQjC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as R, inject as W, ref as F, computed as p, watch as H, resolveComponent as Z, openBlock as t, createElementBlock as u, createElementVNode as B, unref as o, normalizeClass as G, createVNode as b, withCtx as m, createTextVNode as M, toDisplayString as $, createBlock as _, createCommentVNode as E, withModifiers as ee, Transition as re, normalizeStyle as ae, Fragment as O, renderList as z, toRef as oe, readonly as te, provide as ne } from "vue";
2
- import { B as se } from "./dropdown.DivEbn7p.js";
2
+ import { B as se } from "./dropdown.D_jkFrMd.js";
3
3
  import { B as x } from "./typography.wIM07Hbl.js";
4
- import { B as J } from "./tag.DmGI_QZ-.js";
4
+ import { B as J } from "./tag.BE1j0Oid.js";
5
5
  import { _ as P } from "./cross-circle-fill.DJbpTaVE.js";
6
6
  import { d as le } from "./index.DCpihRYV.js";
7
7
  import { u as X } from "./index.B875RXHM.js";
8
8
  import { a as ie } from "./es6.yPcTMnSH.js";
9
- import { B as ue } from "./button.D6d4P8nC.js";
9
+ import { B as ue } from "./button.Ciflfide.js";
10
10
  import { _ as ce } from "./chevron-down.DDkuHzKj.js";
11
11
  import { _ as de } from "./chevron-up.CE9uVcoS.js";
12
12
  import { g as me } from "./generate-uid.DBWe4g6T.js";
@@ -144,7 +144,7 @@ const q = /* @__PURE__ */ Symbol("secondary nav state"), Q = {
144
144
  ]);
145
145
  };
146
146
  }
147
- }), Y = /* @__PURE__ */ U(ge, [["__scopeId", "data-v-d16eff34"]]), Ce = ["aria-label"], he = { class: "b-secondary-nav__list" }, Ie = {}, Ne = /* @__PURE__ */ R({
147
+ }), Y = /* @__PURE__ */ U(ge, [["__scopeId", "data-v-c78eb243"]]), Ce = ["aria-label"], he = { class: "b-secondary-nav__list" }, Ie = {}, Ne = /* @__PURE__ */ R({
148
148
  ...Ie,
149
149
  __name: "secondary-nav-category",
150
150
  props: {
@@ -310,4 +310,4 @@ const q = /* @__PURE__ */ Symbol("secondary nav state"), Q = {
310
310
  export {
311
311
  He as s
312
312
  };
313
- //# sourceMappingURL=secondary-nav.DOgZJUTd.js.map
313
+ //# sourceMappingURL=secondary-nav.Bhn5bVYI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secondary-nav.Bhn5bVYI.js","sources":["../../../vue2/src/components/secondary-nav/secondary-nav.keys.ts","../../../vue2/src/components/secondary-nav/components/secondary-nav-item/secondary-nav-item.vue","../../../vue2/src/components/secondary-nav/components/secondary-nav-category/secondary-nav-category.vue","../../../vue2/src/components/secondary-nav/secondary-nav.vue"],"sourcesContent":["import { type InjectionKey } from 'vue';\nimport { type BentoSecondaryNavState } from './secondary-nav.types';\n\nexport const SECONDARY_NAV_STATE = Symbol('secondary nav state') as InjectionKey<BentoSecondaryNavState>;\n","<template>\n <div class=\"b-secondary-nav-item\">\n <div class=\"b-secondary-nav-item__wrapper\">\n <button\n class=\"b-secondary-nav-item__option\"\n :class=\"conditionalClasses\"\n :aria-current=\"isItemSelected ? 'page' : undefined\"\n :aria-expanded=\"expandleItemIsToggleOnly ? `${isOpen}` : undefined\"\n :aria-controls=\"expandleItemIsToggleOnly ? subItemsId : undefined\"\n @click=\"expandleItemIsToggleOnly ? onToggleClick() : onClick($event)\"\n >\n <bento-typography class=\"b-secondary-nav-item__title\" variant=\"body\" stronger>\n {{ label }}\n </bento-typography>\n <bento-tag\n v-if=\"errorCounter\"\n class=\"b-secondary-nav-item__error-counter\"\n variant=\"red\"\n :label=\"errorCounter.toString()\"\n :aria-label=\"tc('errorCount', errorCounter)\"\n >\n <template #icon>\n <cross-circle-fill-icon aria-hidden=\"true\" />\n </template>\n </bento-tag>\n </button>\n <bento-button\n v-if=\"hasSubItems\"\n :aria-hidden=\"expandleItemIsToggleOnly\"\n :tabindex=\"expandleItemIsToggleOnly ? -1 : undefined\"\n class=\"b-secondary-nav-item__toggle\"\n variant=\"tertiary\"\n :aria-label=\"isOpen ? `Collapse ${label}` : `Expand ${label}`\"\n :aria-expanded=\"!expandleItemIsToggleOnly ? `${isOpen}` : undefined\"\n :aria-controls=\"!expandleItemIsToggleOnly ? subItemsId : undefined\"\n @click.stop=\"onToggleClick\"\n >\n <template #iconLeft>\n <chevron-up-icon v-if=\"isOpen\" class=\"b-secondary-nav-item__icon\" aria-hidden=\"true\" />\n <chevron-down-icon v-else class=\"b-secondary-nav-item__icon\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n <Transition :name=\"CONTENT_TRANSITION_NAME\">\n <div v-if=\"hasSubItems && isOpen\" :id=\"subItemsId\" :style=\"subItemsMaxHeight\">\n <ul ref=\"subItemsRef\" class=\"b-secondary-nav-item__sub-items\">\n <li v-for=\"item in items\" :key=\"item.value\">\n <secondary-nav-item\n :label=\"item.label\"\n :value=\"item.value\"\n :items=\"item.items\"\n :error-counter=\"item.errorCounter\"\n is-sub-item\n />\n </li>\n </ul>\n </div>\n </Transition>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { SECONDARY_NAV_STATE } from '../../secondary-nav.keys';\n import { BentoButton } from '@/components/button';\n import { BentoTag } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import { computed, inject, ref, watch } from 'vue';\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/utils/ts/generate-uid';\n import { type BentoSecondaryNavItemsItem } from '../../secondary-nav.types';\n import { useExpandableContentHeight } from '@/composables/use-expandable-content-height/use-expandable-content-height';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { tc } = useI18n<{ message: MessageSchema }>({ messages });\n const { activeItemValue, updateActiveItemValue, allowExpandableItemNavigation } = inject(SECONDARY_NAV_STATE);\n const CONTENT_TRANSITION_NAME = 'b-secondary-nav-item__animation--content';\n\n const props = defineProps<{\n /**\n * The display name of the navigation item\n */\n label: string;\n /**\n * The value of this item.\n */\n value: string;\n /**\n * Nested sub-items for this item.\n */\n items?: Array<BentoSecondaryNavItemsItem>;\n\n /**\n * Defines if the item is a subitem\n */\n isSubItem?: boolean;\n\n /**\n * Defines the number of errors pertaining to this item\n */\n errorCounter?: number;\n }>();\n\n const isOpen = ref(false);\n const subItemsId = generateUid('secondary-nav-sub-items');\n const subItemsRef = ref<HTMLUListElement>(null);\n const hasSubItems = computed(() => !!props.items?.length);\n const isItemSelected = computed(() => activeItemValue.value === props.value);\n const expandleItemIsToggleOnly = computed(() => hasSubItems.value && !allowExpandableItemNavigation.value);\n const { contentHeight } = useExpandableContentHeight(subItemsRef, isOpen);\n const subItemsMaxHeight = computed(() => (contentHeight.value ? { 'max-height': contentHeight.value } : {}));\n\n const conditionalClasses = computed(() => ({\n 'b-secondary-nav-item__option--active': isItemSelected.value,\n 'b-secondary-nav-item__option--expandable': hasSubItems.value,\n 'b-secondary-nav-item__option--sub-item': props.isSubItem,\n }));\n\n const emit = defineEmits<{\n /**\n * Event emitted when this element is clicked\n */\n (e: 'click', clickEvent: MouseEvent): void;\n }>();\n\n const onClick = (e: MouseEvent) => {\n emit('click', e);\n updateActiveItemValue(props.value);\n };\n\n const onToggleClick = () => {\n isOpen.value = !isOpen.value;\n };\n\n const hasActiveDescendant = (items: Array<BentoSecondaryNavItemsItem>, value: string): boolean => {\n return items.some(\n item => item.value === value || (item.items ? hasActiveDescendant(item.items, value) : false)\n );\n };\n\n const hasDescendantErrors = (items: Array<BentoSecondaryNavItemsItem>): boolean =>\n items.some(item => !!item.errorCounter || (item.items ? hasDescendantErrors(item.items) : false));\n\n watch(\n [activeItemValue, () => props.items],\n ([activeValue]) => {\n if (hasSubItems.value && props.items) {\n if (hasActiveDescendant(props.items, activeValue) || hasDescendantErrors(props.items)) {\n isOpen.value = true;\n }\n }\n },\n { immediate: true, deep: true }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * This component shouldn't be used directly. It is internally used by {@see BentoSecondaryNav}\n */\n export default { i18n: { messages } };\n</script>\n\n<style lang=\"scss\" scoped src=\"./secondary-nav-item.scss\" />\n","<template>\n <section class=\"b-secondary-nav-category\" :aria-label=\"label\">\n <bento-typography el=\"h1\" class=\"b-secondary-nav-category__label\" variant=\"caption\" stronger>{{\n label\n }}</bento-typography>\n <ul class=\"b-secondary-nav__list\">\n <li v-for=\"item in items\" :key=\"item.value\">\n <secondary-nav-item\n :label=\"item.label\"\n :value=\"item.value\"\n :items=\"item.items\"\n :error-counter=\"item.errorCounter\"\n />\n </li>\n </ul>\n </section>\n</template>\n\n<script lang=\"ts\" setup>\n import { BentoTypography } from '@/components/typography';\n import { SecondaryNavItem } from '../secondary-nav-item';\n import { type BentoSecondaryNavItemsItem } from '../../secondary-nav.types';\n\n defineProps<{\n /**\n * The display name of the category\n */\n label: string;\n /**\n * A list of {@see BentoSecondaryNavItemsItem} that belongs to this category\n */\n items: Array<BentoSecondaryNavItemsItem>;\n }>();\n</script>\n\n<script lang=\"ts\">\n /**\n * This component shouldn't be used directly. It is internally used by {@see BentoSecondaryNav}\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./secondary-nav-category.scss\" />\n","<template>\n <nav class=\"b-secondary-nav\">\n <bento-dropdown\n v-if=\"isMobile\"\n :aria-label=\"t('mobileDropdownAriaLabel')\"\n :items=\"mobileDropdownItems\"\n :static-categories=\"hasCategories\"\n :model-value=\"activeItemValue\"\n :is-option-disabled=\"isMobileOptionDisabled\"\n @update:model-value=\"updateActiveItemValue\"\n >\n <template #display-value=\"{ label }\">\n <bento-typography el=\"span\">\n {{ label }}\n </bento-typography>\n </template>\n <template #default=\"{ label, data }\">\n <bento-typography\n el=\"div\"\n :class=\"{ 'b-secondary-nav__option': true, 'b-secondary-nav__nested-option': !!data?.level }\"\n >\n {{ label }}\n <bento-tag\n v-if=\"data?.errorCounter\"\n class=\"b-secondary-nav__error-counter\"\n variant=\"red\"\n :label=\"data.errorCounter\"\n :aria-label=\"tc('errorCount', data.errorCounter)\"\n >\n <template #icon>\n <cross-circle-fill-icon aria-hidden=\"true\" />\n </template>\n </bento-tag>\n </bento-typography>\n </template>\n </bento-dropdown>\n <ul v-else class=\"b-secondary-nav__list\">\n <li v-for=\"item in items\" :key=\"item.label\">\n <secondary-nav-category\n v-if=\"'items' in item && !('value' in item)\"\n :label=\"item.label\"\n :items=\"item.items\"\n />\n <secondary-nav-item\n v-else\n :label=\"item.label\"\n :value=\"item.value\"\n :items=\"item.items\"\n :error-counter=\"item.errorCounter\"\n />\n </li>\n </ul>\n </nav>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, provide, readonly, ref, toRef, watch } from 'vue';\n import { SecondaryNavItem } from './components/secondary-nav-item';\n import { SecondaryNavCategory } from './components/secondary-nav-category';\n import { SECONDARY_NAV_STATE } from './secondary-nav.keys';\n import {\n type BentoSecondaryNavItems,\n type BentoSecondaryNavItemsCategory,\n type BentoSecondaryNavItemsItem,\n type BentoSecondaryNavState,\n } from './secondary-nav.types';\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoTypography } from '@/components/typography';\n import { BentoTag } from '@/components/tag';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import { useBreakpoints } from '@vueuse/core';\n import { useI18n } from '@/utils/ts/i18n';\n import { type BentoListboxOptionItem, type BentoListboxOptions } from '@/types/listbox';\n import { BMediaQuerySMax } from '@adyen/bento-design-tokens/dist/js/bento/es6';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t, tc } = useI18n<{ message: MessageSchema }>({ messages });\n\n const breakpoints = useBreakpoints({\n s: BMediaQuerySMax,\n });\n\n const isMobile = breakpoints.smallerOrEqual('s');\n const props = defineProps<{\n /**\n * An array containing all the items on the nav. The array can have either {@see BentoSecondaryNavItemsCategory },\n * which is used to group different items or {@see BentoSecondaryNavItemsItem } if you don't need to group them.\n */\n items: BentoSecondaryNavItems;\n /**\n * The value of the selected item.\n * If nothing is passed, it defaults to the first item value in items.\n */\n value?: string;\n /**\n * When true, items that contain subitems are also clickable and can be selected.\n * When false, those items only act as expand/collapse toggles.\n */\n allowExpandableItemNavigation?: boolean;\n }>();\n\n const emit = defineEmits<{\n /**\n * Emmited when the current selected item changes\n */\n (e: 'change', category: string): void;\n }>();\n\n const isCategory = (item: BentoSecondaryNavItems[number]): item is BentoSecondaryNavItemsCategory =>\n 'items' in item && !('value' in item);\n\n const mapNestedItems = (items: Array<BentoSecondaryNavItemsItem>, level = 0): BentoListboxOptions =>\n items.flatMap((item): BentoListboxOptions => {\n const currentItem: BentoListboxOptionItem = {\n label: item.label,\n value: item.value,\n data: { level, hasSubItems: !!item.items?.length, errorCounter: item.errorCounter },\n };\n\n if (item.items?.length) {\n return [currentItem, ...mapNestedItems(item.items, level + 1)];\n }\n\n return [currentItem];\n });\n\n const isMobileOptionDisabled = (option: BentoListboxOptionItem): boolean =>\n !props.allowExpandableItemNavigation && (option.data as { hasSubItems?: boolean })?.hasSubItems;\n\n const hasCategories = computed(() => props.items.some(item => isCategory(item)));\n const mobileDropdownItems = computed<BentoListboxOptions>(() => {\n return props.items.flatMap(item => {\n if (isCategory(item)) {\n return [\n {\n label: item.label,\n value: `category-${item.label}`,\n items: mapNestedItems(item.items),\n } satisfies BentoListboxOptionItem,\n ];\n }\n\n if (item.items?.length) {\n return mapNestedItems([item]);\n }\n\n return [\n {\n label: item.label,\n value: item.value,\n data: { level: 0, errorCounter: item.errorCounter },\n } satisfies BentoListboxOptionItem,\n ];\n });\n });\n\n const flattenNestedItems = (items: Array<BentoSecondaryNavItemsItem>): Array<BentoSecondaryNavItemsItem> =>\n items.flatMap(item => [item, ...(item.items?.length ? flattenNestedItems(item.items) : [])]);\n\n const findFirstSelectableNestedItemValue = (items: Array<BentoSecondaryNavItemsItem>): string =>\n flattenNestedItems(items).find(item => props.allowExpandableItemNavigation || !item.items?.length)?.value ?? '';\n\n const activeItemValueFallback = computed(() => {\n if (!props.items.length) {\n return '';\n }\n\n return findFirstSelectableNestedItemValue(\n props.items.flatMap(item =>\n isCategory(item) ? flattenNestedItems(item.items) : flattenNestedItems([item])\n )\n );\n });\n\n const activeItemValue = ref(props.value ?? activeItemValueFallback.value);\n const updateActiveItemValue = (value: string) => {\n activeItemValue.value = value;\n emit('change', value);\n };\n\n // The component's state is inject on `secondary-nav-item` to determine the\n // current active item and to change its value\n const state: BentoSecondaryNavState = {\n activeItemValue: readonly(activeItemValue),\n updateActiveItemValue,\n allowExpandableItemNavigation: toRef(props, 'allowExpandableItemNavigation'),\n };\n\n watch(\n () => props.value,\n value => {\n if (value !== undefined) {\n activeItemValue.value = value;\n }\n }\n );\n\n provide(SECONDARY_NAV_STATE, state);\n</script>\n\n<script lang=\"ts\">\n /**\n * Secondary Nav offers users a structured way to access information.\n * It also provides a clear hierarchy for users to understand and navigate through various information.\n *\n * @example\n * import { BentoSecondaryNav } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSecondaryNav },\n * template: `\n * <bento-secondary-nav :value=\"value\" :items=\"items\" />\n * `,\n * setup() {\n * const value = ref(2) // Active item value\n * const items: BentoSecondaryNavItemInfo[] = [\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * ];\n * return { items, value };\n * }\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./secondary-nav.scss\" />\n"],"names":["SECONDARY_NAV_STATE","__default__$2","messages$1","tc","useI18n","activeItemValue","updateActiveItemValue","allowExpandableItemNavigation","inject","CONTENT_TRANSITION_NAME","props","__props","isOpen","ref","subItemsId","generateUid","subItemsRef","hasSubItems","computed","isItemSelected","expandleItemIsToggleOnly","contentHeight","useExpandableContentHeight","subItemsMaxHeight","conditionalClasses","emit","__emit","onClick","e","onToggleClick","hasActiveDescendant","items","value","item","hasDescendantErrors","watch","activeValue","__default__$1","__default__","messages","t","isMobile","useBreakpoints","BMediaQuerySMax","isCategory","mapNestedItems","level","currentItem","isMobileOptionDisabled","option","hasCategories","mobileDropdownItems","flattenNestedItems","findFirstSelectableNestedItemValue","activeItemValueFallback","state","readonly","toRef","provide"],"mappings":";;;;;;;;;;;;;;;AAGO,MAAAA,IAAA,uBAAA,qBAAA;;;;;;;;;;;;kKCiKHC,KAAA,EAAA,MAAA,EAAA,UAAAC,EAAA,EAAA;;;;;;;;;;;;AAtFA,UAAA,EAAA,IAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GACA,EAAA,iBAAAG,GAAA,uBAAAC,GAAA,+BAAAC,EAAA,IAAAC,EAAAR,CAAA,GACAS,IAAA,4CAEAC,IAAAC,GAyBAC,IAAAC,EAAA,EAAA,GACAC,IAAAC,GAAA,yBAAA,GACAC,IAAAH,EAAA,IAAA,GACAI,IAAAC,EAAA,MAAA,CAAA,CAAAR,EAAA,OAAA,MAAA,GACAS,IAAAD,EAAA,MAAAb,EAAA,UAAAK,EAAA,KAAA,GACAU,IAAAF,EAAA,MAAAD,EAAA,SAAA,CAAAV,EAAA,KAAA,GACA,EAAA,eAAAc,EAAA,IAAAC,GAAAN,GAAAJ,CAAA,GACAW,IAAAL,EAAA,MAAAG,EAAA,QAAA,EAAA,cAAAA,EAAA,MAAA,IAAA,CAAA,CAAA,GAEAG,IAAAN,EAAA,OAAA;AAAA,MAA2C,wCAAAC,EAAA;AAAA,MACgB,4CAAAF,EAAA;AAAA,MACC,0CAAAP,EAAA;AAAA,IACR,EAAA,GAGpDe,IAAAC,GAOAC,IAAA,CAAAC,MAAA;AACI,MAAAH,EAAA,SAAAG,CAAA,GACAtB,EAAAI,EAAA,KAAA;AAAA,IAAiC,GAGrCmB,IAAA,MAAA;AACI,MAAAjB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EAAA,CAAAnB,CAAA,CAAA;AAAA,MACqE;AAAA,IACjF,IANA,EAOJ,GAGJ5B,IAAAQ,EAAAH,EAAA,SAAA4C,EAAA,KAAA,GACAhD,IAAA,CAAA0B,MAAA;AACI,MAAA3B,EAAA,QAAA2B,GACAP,EAAA,UAAAO,CAAA;AAAA,IAAoB,GAKxBuB,IAAA;AAAA,MAAsC,iBAAAC,GAAAnD,CAAA;AAAA,MACO,uBAAAC;AAAA,MACzC,+BAAAmD,GAAA/C,GAAA,+BAAA;AAAA,IAC2E;AAG/E,WAAAyB;AAAA,MAAA,MAAAzB,EAAA;AAAA,MACgB,CAAAsB,MAAA;AAER,QAAAA,MAAA,WACI3B,EAAA,QAAA2B;AAAA,MACJ;AAAA,IACJ,GAGJ0B,GAAA1D,GAAAuD,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -67,7 +67,7 @@ const j = ["id", "aria-checked", "aria-label", "checked", "disabled", "value"],
67
67
  ], 8, q)) : D("", !0)
68
68
  ], 2));
69
69
  }
70
- }), H = /* @__PURE__ */ C(G, [["__scopeId", "data-v-ea9ff9b7"]]), J = {
70
+ }), H = /* @__PURE__ */ C(G, [["__scopeId", "data-v-24ce4a5f"]]), J = {
71
71
  name: "bento-segmented-control",
72
72
  model: { prop: "modelValue" }
73
73
  }, K = /* @__PURE__ */ _({
@@ -137,4 +137,4 @@ const j = ["id", "aria-checked", "aria-label", "checked", "disabled", "value"],
137
137
  export {
138
138
  te as B
139
139
  };
140
- //# sourceMappingURL=segmented-control.6XApEjVS.js.map
140
+ //# sourceMappingURL=segmented-control.CEt2dz4n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segmented-control.CEt2dz4n.js","sources":["../../../vue2/src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue","../../../vue2/src/components/segmented-control/segmented-control.vue"],"sourcesContent":["<template>\n <div class=\"b-segmented-control-button\" :class=\"conditionalClasses\">\n <input\n :id=\"segmentedControlButtonId\"\n v-bento-tooltip-directive=\"tooltipText\"\n :aria-checked=\"isChecked\"\n :aria-label=\"label\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :value=\"value\"\n type=\"radio\"\n class=\"b-segmented-control-button__input\"\n role=\"radio\"\n @change=\"onClick\"\n />\n <label v-if=\"label\" :for=\"segmentedControlButtonId\" class=\"b-segmented-control-button__label-container\">\n <bento-typography\n ref=\"segmentedControlButtonLabel\"\n class=\"b-segmented-control-button__label\"\n el=\"span\"\n variant=\"body\"\n stronger\n >\n {{ label }}\n </bento-typography>\n </label>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type ComputedRef, ref } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { generateUid } from '@/utils/ts/generate-uid';\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives';\n\n const props = withDefaults(\n defineProps<{\n /**\n * Disable the radio button (optional)\n */\n disabled?: boolean;\n\n /**\n * Renders the button with a 100% width\n */\n fullWidth?: boolean;\n\n /**\n * The string the button will showcase\n */\n label: string;\n\n /**\n * This property should not be used directly.\n * It will be used by v-model directive on the segmented control component\n */\n modelValue?: string | number;\n\n /**\n * Renders tooltip text if provided\n */\n tooltipText?: string;\n\n /**\n * Renders the button with a truncated text if the space is not enough to render the whole content\n */\n truncate?: boolean;\n\n /**\n * Indicates the value of the input that will be returned when it's selected\n */\n value: string | number;\n\n /**\n * Renders the button with centered text in case the text has to wrap multiple lines\n */\n wrap?: boolean;\n }>(),\n {\n disabled: false,\n fullWidth: false,\n modelValue: null,\n truncate: false,\n wrap: false,\n tooltipText: undefined,\n }\n );\n\n const emit = defineEmits<{\n /**\n * Emitted every time the segmented control internal value is changed\n */\n (e: 'update:model-value', value: string | number);\n }>();\n\n const segmentedControlButtonLabel = ref();\n const segmentedControlButtonId = generateUid('segmented-control-button');\n const isChecked: ComputedRef<boolean> = computed(() => props.value === props.modelValue);\n const conditionalClasses = computed(() => ({\n 'b-segmented-control-button--hug-content': !props.fullWidth,\n 'b-segmented-control-button--full-width': props.fullWidth,\n 'b-segmented-control-button--truncate': props.truncate,\n 'b-segmented-control-button--wrap': props.wrap && !props.truncate,\n }));\n const onClick = () => {\n if (!props.disabled) {\n emit('update:model-value', props.value);\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component to be used within the BentoSegmentedControl component only\n */\n export default {\n name: 'bento-segmented-control-button',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./segmented-control-button.scss\" />\n","<template>\n <div ref=\"segmentedControlRef\" role=\"group\" class=\"b-segmented-control\" :class=\"conditionalClasses\">\n <segmented-control-button\n v-for=\"(item, index) in computedItems\"\n ref=\"segmentedControlButtonRef\"\n :key=\"`segmented-control-item-${index}-${item.label}`\"\n class=\"b-segmented-control__item\"\n :label=\"item.label\"\n :value=\"item.value\"\n :disabled=\"item.disabled\"\n :truncate=\"truncate\"\n :wrap=\"wrap\"\n :full-width=\"fullWidth\"\n :model-value=\"inputValue\"\n :tooltip-text=\"item.tooltipText\"\n @update:model-value=\"onInput\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, ref, toRef, watch } from 'vue';\n import SegmentedControlButton from './components/segmented-control-button/segmented-control-button.vue';\n import { type BentoSegmentedControlProps, type BentoSegmentedControlValue } from './segmented-control.types';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n\n const emit = defineEmits<{\n /**\n * Emitted every time the segmented control internal value is changed for Vue3\n */\n (e: 'update:model-value', value: any);\n\n /**\n * Emitted every time the segmented control internal value is changed for Vue2\n *\n */\n (e: 'input', value: BentoSegmentedControlValue): void;\n }>();\n\n const props = withDefaults(defineProps<BentoSegmentedControlProps>(), {\n fullWidth: false,\n wrap: false,\n modelValue: null,\n });\n\n const inputValue = toRef(props, 'modelValue');\n\n const segmentedControlRef = ref();\n const segmentedControlButtonRef = ref();\n const hasEllipsis = ref();\n\n const truncate = computed(() => !props.wrap);\n\n watch(\n () => props.items,\n () => {\n if (props.items.length > 5) {\n printDevelopmentWarning(\n 'Do not use when you need to provide more than 5 segments at a time. If you need to provide more options, use a dropdown component.'\n );\n }\n },\n { immediate: true }\n );\n\n onMounted(() => {\n observeSizeOfElement(segmentedControlRef.value, () => {\n if (segmentedControlRef.value) {\n hasEllipsis.value = segmentedControlButtonRef?.value?.map(\n el =>\n el.$refs.segmentedControlButtonLabel.$el.offsetWidth <\n el.$refs.segmentedControlButtonLabel.$el.scrollWidth\n );\n }\n });\n });\n\n const computedItems = computed(() =>\n props.items.map((el, index) => ({\n ...el,\n tooltipText: truncate.value && hasEllipsis?.value?.[index] ? el.label : undefined,\n }))\n );\n\n const onInput = value => {\n emit('update:model-value', value);\n emit('input', value);\n };\n\n const conditionalClasses = computed(() => ({\n 'b-segmented-control--hug': !props.fullWidth,\n 'b-segmented-control--full-width': props.fullWidth,\n 'b-segmented-control--truncate': truncate.value,\n 'b-segmented-control--wrap': props.wrap,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * @example\n * import { BentoSegmentedControl } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSegmentedControl },\n * template: `\n * <bento-segmented-control\n * :items=\"[{ label: 'Segment 1', value: 1 }, { label: 'Segment 2', value: 2 }, { label: 'Segment 3', value: 3, disabled: true }]\"\n * :model-value=\"1\"\n * @update:model-value=\"yourUpdateHandler\"\n * />\n * `\n * }\n */\n export default {\n name: 'bento-segmented-control',\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./segmented-control.scss\" />\n"],"names":["__default__$1","props","__props","emit","__emit","segmentedControlButtonLabel","ref","segmentedControlButtonId","generateUid","isChecked","computed","conditionalClasses","onClick","__default__","inputValue","toRef","segmentedControlRef","segmentedControlButtonRef","hasEllipsis","truncate","watch","printDevelopmentWarning","onMounted","observeSizeOfElement","el","computedItems","index","onInput","value"],"mappings":";;;;;;;6FAmHIA,IA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AA,QACc,GAAAF;AAAA,QACzB,aAAAL,EAAA,SAAAD,GAAA,QAAAQ,CAAA,IAAAF,EAAA,QAAA;AAAA,MACqE,EAAA;AAAA,IAC1E,GAGNG,IAAA,CAAAC,MAAA;AACI,MAAAzB,EAAA,sBAAAyB,CAAA,GACAzB,EAAA,SAAAyB,CAAA;AAAA,IAAmB,GAGvBjB,IAAAD,EAAA,OAAA;AAAA,MAA2C,4BAAA,CAAAT,EAAA;AAAA,MACJ,mCAAAA,EAAA;AAAA,MACM,iCAAAkB,EAAA;AAAA,MACC,6BAAAlB,EAAA;AAAA,IACP,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,11 +2,11 @@ import { defineComponent as J, useSlots as K, computed as r, inject as ee, ref a
2
2
  import { h as ne } from "./index.DCpihRYV.js";
3
3
  import { a as ie, B as se } from "./es6.yPcTMnSH.js";
4
4
  import { B as I } from "./typography.wIM07Hbl.js";
5
- import { C as de } from "./checkbox-input.Bv_GjPU8.js";
6
- import { u as ue } from "./aria-label.CaUURpnB.js";
5
+ import { u as de } from "./aria-label.CaUURpnB.js";
7
6
  import { g as Q } from "./generate-uid.DBWe4g6T.js";
8
- import { u as ce } from "./use-has-slot.CyMiImRQ.js";
9
- import { a as fe } from "./radio-input.FC4PVCHr.js";
7
+ import { u as ue } from "./use-has-slot.CyMiImRQ.js";
8
+ import { a as ce } from "./radio-input.FC4PVCHr.js";
9
+ import { C as fe } from "./checkbox-input.Bv_GjPU8.js";
10
10
  import { _ as X } from "./_plugin-vue_export-helper.CHgC5LLL.js";
11
11
  import { u as me } from "./form-field.B60VsF8d.js";
12
12
  import { C as ve } from "./controls-group.KarFHKUT.js";
@@ -84,7 +84,7 @@ const Z = /* @__PURE__ */ Symbol("selection card radio input injection key"), be
84
84
  },
85
85
  emits: ["input", "update:model-value"],
86
86
  setup(l, { emit: x }) {
87
- const e = l, S = x, z = K(), k = ce(z), u = Q("selection-card-input-id"), M = Q("selection-card-description"), g = r(
87
+ const e = l, S = x, z = K(), k = ue(z), u = Q("selection-card-input-id"), M = Q("selection-card-description"), g = r(
88
88
  () => e.modelValue
89
89
  ), L = r(
90
90
  () => e.modelValue
@@ -102,7 +102,7 @@ const Z = /* @__PURE__ */ Symbol("selection card radio input injection key"), be
102
102
  "b-selection-card__checkbox-container-text--center-aligned": B.value
103
103
  })), O = r(() => ({
104
104
  "b-selection-card__slot--with-icon": k("icon")
105
- })), $ = ue({
105
+ })), $ = de({
106
106
  ariaLabel: e.title,
107
107
  label: e.value
108
108
  }), c = r(() => Array.isArray(e.modelValue)), P = r(() => b.value ? e.value === e.modelValue : c.value ? e.modelValue.some((o) => o === e.value) : e.modelValue), b = ee(Z, _(!1)), B = r(() => !e.subtitle && !e.description), f = _(null), E = _(null), a = _(null), p = (o) => {
@@ -180,7 +180,7 @@ const Z = /* @__PURE__ */ Symbol("selection card radio input injection key"), be
180
180
  })) : R("", !0)
181
181
  ], 8, he)
182
182
  ], 2),
183
- t(b) ? (n(), d(t(fe), {
183
+ t(b) ? (n(), d(t(ce), {
184
184
  key: 0,
185
185
  id: t(u),
186
186
  ref_key: "inputRef",
@@ -193,7 +193,7 @@ const Z = /* @__PURE__ */ Symbol("selection card radio input injection key"), be
193
193
  value: l.value,
194
194
  readonly: l.readonly,
195
195
  "model-value": g.value
196
- }, null, 8, ["id", "aria-label", "aria-describedby", "disabled", "has-error", "aria-readonly", "value", "readonly", "model-value"])) : (n(), d(t(de), {
196
+ }, null, 8, ["id", "aria-label", "aria-describedby", "disabled", "has-error", "aria-readonly", "value", "readonly", "model-value"])) : (n(), d(t(fe), {
197
197
  key: 1,
198
198
  id: t(u),
199
199
  ref_key: "inputRef",
@@ -235,7 +235,7 @@ const Z = /* @__PURE__ */ Symbol("selection card radio input injection key"), be
235
235
  ], 2)
236
236
  ], 2));
237
237
  }
238
- }), H = /* @__PURE__ */ X(ge, [["__scopeId", "data-v-986ff020"]]), Ce = {
238
+ }), H = /* @__PURE__ */ X(ge, [["__scopeId", "data-v-798d289a"]]), Ce = {
239
239
  model: { prop: "modelValue", event: "update:model-value" }
240
240
  }, Re = /* @__PURE__ */ J({
241
241
  ...Ce,
@@ -403,10 +403,10 @@ const Z = /* @__PURE__ */ Symbol("selection card radio input injection key"), be
403
403
  _: 3
404
404
  }, 8, ["aria-describedby", "aria-required", "label", "hide-label", "description", "disabled", "tooltip-text", "readonly", "required", "optional"]));
405
405
  }
406
- }), qe = /* @__PURE__ */ X(Re, [["__scopeId", "data-v-927667ab"]]);
406
+ }), qe = /* @__PURE__ */ X(Re, [["__scopeId", "data-v-a7792b89"]]);
407
407
  export {
408
408
  H as B,
409
409
  G as a,
410
410
  qe as s
411
411
  };
412
- //# sourceMappingURL=selection-card-group.emQVruZd.js.map
412
+ //# sourceMappingURL=selection-card-group.DHXtJpoB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection-card-group.DHXtJpoB.js","sources":["../../../vue2/src/components/selection-card/selection-card.types.ts","../../../vue2/src/components/selection-card/selection-card.keys.ts","../../../vue2/src/components/selection-card/selection-card.vue","../../../vue2/src/components/selection-card/components/selection-card-group/selection-card-group.vue"],"sourcesContent":["import { type RadioInputValue } from '@/components/internal/radio-input';\nimport { type BentoCheckboxType } from '@/types/checkbox';\nimport { type VueNodeElement } from '@/types/elements';\n\nexport enum BentoSelectionCardState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n}\n\nexport type BentoSelectionCardValue = string | number;\n\nexport type BentoSelectionCardModelValue = BentoCheckboxType | RadioInputValue;\n\nexport interface BentoSelectionCardItem {\n content?: string | object;\n description?: string;\n disabled?: boolean;\n dynamicContent?: string | object;\n fullyClickable?: boolean;\n hasError?: boolean;\n icon?: VueNodeElement;\n readonly?: boolean;\n subtitle?: string;\n title: string;\n value: BentoSelectionCardValue;\n}\n","export const SELECTION_CARD_RADIO_INPUT_INJECTION_KEY = Symbol('selection card radio input injection key');\n","<template>\n <div class=\"b-selection-card\" :class=\"conditionalClasses\" @click=\"handleCardClick\">\n <div class=\"b-selection-card__container\" :class=\"containerConditionalClasses\">\n <div class=\"b-selection-card__checkbox-container\" :class=\"checkboxContainerConditionalClasses\">\n <div class=\"b-selection-card__checkbox-container-text\" :class=\"checkboxContainerTextConditionalClasses\">\n <div v-if=\"hasSlot('icon')\" class=\"b-selection-card__icon\" role=\"presentation\" aria-hidden=\"true\">\n <slot name=\"icon\" />\n </div>\n <label :for=\"inputId\" class=\"b-selection-card__text\" @click.stop.prevent=\"handleCardClick\">\n <bento-typography\n v-if=\"subtitle\"\n class=\"b-selection-card__description\"\n el=\"span\"\n variant=\"caption\"\n >\n {{ subtitle }}\n </bento-typography>\n <bento-typography el=\"span\" variant=\"title\">{{ title }}</bento-typography>\n <bento-typography\n v-if=\"description\"\n id=\"descriptionId\"\n class=\"b-selection-card__description\"\n el=\"span\"\n variant=\"body\"\n >\n {{ description }}\n </bento-typography>\n </label>\n </div>\n <radio-input\n v-if=\"isRadioInput\"\n :id=\"inputId\"\n ref=\"inputRef\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"description ? descriptionId : undefined\"\n :disabled=\"disabled\"\n :has-error=\"hasError\"\n :aria-readonly=\"readonly ?? undefined\"\n :value=\"value\"\n :readonly=\"readonly\"\n :model-value=\"computedRadioInputModelValue\"\n />\n <checkbox-input\n v-else\n :id=\"inputId\"\n ref=\"inputRef\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"description ? descriptionId : undefined\"\n :disabled=\"disabled\"\n :has-error=\"hasError\"\n :aria-readonly=\"readonly ?? undefined\"\n :value=\"value\"\n :readonly=\"readonly\"\n :model-value=\"computedCheckboxInputModelValue\"\n />\n </div>\n <bento-typography\n v-if=\"hasSlot('content')\"\n ref=\"slotRef\"\n el=\"div\"\n class=\"b-selection-card__slot\"\n :class=\"slotConditionalClasses\"\n >\n <slot name=\"content\" />\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('dynamicContent') && isChecked\"\n ref=\"dynamicSlotRef\"\n el=\"div\"\n class=\"b-selection-card__slot\"\n :class=\"slotConditionalClasses\"\n >\n <slot name=\"dynamicContent\" />\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import { CheckboxInput } from '../internal/checkbox-input';\n import { RadioInput, type RadioInputValue } from '../internal/radio-input';\n import { type BentoCheckboxType, type BentoMultiCheckboxType } from '@/types/checkbox';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { generateUid } from '@/utils/ts/generate-uid';\n import { computed, type ComputedRef, inject, type PropType, type Ref, ref, useSlots } from 'vue';\n import { useHasSlot } from '@/composables';\n import type { BentoSelectionCardModelValue, BentoSelectionCardValue } from './selection-card.types';\n import { BentoSelectionCardState } from './selection-card.types';\n import { SELECTION_CARD_RADIO_INPUT_INJECTION_KEY } from './selection-card.keys';\n\n const props = defineProps({\n /**\n * The description of the selection card\n */\n description: {\n type: String,\n default: undefined,\n },\n\n /**\n * Disables the selection card\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Makes the entire selection card clickable. Clicking over interactive elements inside the card with this prop enabled will not be possible.\n */\n fullyClickable: { type: Boolean, default: false },\n\n /**\n * Shows the selection card in error state\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * This property should not be used directly.\n * It will be used by v-model directive on selection card component.\n *\n * When handling a single input, use a string or a number.\n *\n * When handling multiple inputs, use an array of keys.\n * These keys exist as a set \"value\" prop for each input.\n */\n modelValue: {\n type: [Boolean, String, Array] as PropType<BentoSelectionCardModelValue>,\n default: null,\n },\n\n /**\n * Sets the selection card to readonly\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The subtitle of the selection card\n */\n subtitle: {\n type: String,\n default: undefined,\n },\n\n /**\n * The title of the selection card\n */\n title: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates the value of the input that will be returned when it's checked.\n */\n value: {\n type: [String, Number] as PropType<BentoSelectionCardValue>,\n required: true,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the selection card is clicked. Enables Vue2 \"v-model\"\n */\n (e: 'input', value: BentoSelectionCardValue);\n /**\n * Emitted when the selection card is clicked. Enables Vue3 \"v-model\"\n */\n (e: 'update:model-value', value: BentoSelectionCardValue);\n }>();\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const inputId = generateUid('selection-card-input-id');\n const descriptionId = generateUid('selection-card-description');\n\n const computedRadioInputModelValue: ComputedRef<RadioInputValue> = computed(\n () => props.modelValue as RadioInputValue\n );\n const computedCheckboxInputModelValue: ComputedRef<BentoCheckboxType> = computed(\n () => props.modelValue as BentoCheckboxType\n );\n\n const conditionalClasses = computed(() => ({\n 'b-selection-card--checked': isChecked.value,\n 'b-selection-card--fully-clickable': props.fullyClickable,\n }));\n\n const containerConditionalClasses = computed(() => ({\n [`b-selection-card--${BentoSelectionCardState.DISABLED}`]: props.disabled,\n [`b-selection-card--${BentoSelectionCardState.ERROR}`]: props.hasError,\n [`b-selection-card--${BentoSelectionCardState.READONLY}`]: props.readonly,\n 'b-selection-card--center-aligned': isTitleOnly.value,\n }));\n\n const checkboxContainerConditionalClasses = computed(() => ({\n 'b-selection-card__checkbox-container--center-aligned': isTitleOnly.value,\n }));\n\n const checkboxContainerTextConditionalClasses = computed(() => ({\n 'b-selection-card__checkbox-container-text--center-aligned': isTitleOnly.value,\n }));\n\n const slotConditionalClasses = computed(() => ({\n 'b-selection-card__slot--with-icon': hasSlot('icon'),\n }));\n\n const ariaLabel = useAriaLabel({\n ariaLabel: props.title,\n label: props.value as string,\n });\n\n const isCheckboxGroup = computed(() => Array.isArray(props.modelValue));\n\n const isChecked: ComputedRef<boolean> = computed(() => {\n if (isRadioInput.value) {\n return props.value === props.modelValue;\n }\n if (!isCheckboxGroup.value) {\n return props.modelValue as boolean;\n }\n\n return (props.modelValue as BentoMultiCheckboxType).some(item => item === props.value);\n });\n\n const isRadioInput: Ref<boolean> = inject(SELECTION_CARD_RADIO_INPUT_INJECTION_KEY, ref(false));\n\n const isTitleOnly = computed(() => !props.subtitle && !props.description);\n\n const inputRef = ref<InstanceType<typeof RadioInput> | InstanceType<typeof CheckboxInput>>(null);\n const slotRef = ref(null);\n const dynamicSlotRef = ref(null);\n\n // Handle click on the whole card area\n const handleCardClick = (event: Event) => {\n if (inputRef.value.$refs.inputRef === event.target) {\n const newValue = toggleInput();\n onChange(newValue);\n return;\n }\n\n // Do nothing if disabled or readonly\n if (props.disabled && props.readonly) {\n return;\n }\n\n // If it's not fully clickable prevent selecting the card if the click\n // originated in a slot\n if (!props.fullyClickable) {\n // Check if the click originated from the slot - in that case, do nothng\n if (slotRef.value && slotRef.value?.$el?.contains(event.target)) {\n return;\n }\n // Check if the click originated from the dynamic slot - in that case, do nothng\n if (dynamicSlotRef.value && dynamicSlotRef.value?.$el?.contains(event.target)) {\n return;\n }\n // Check if the click originated from the input - in that case do nothing, as the input will emit the event already\n if (inputRef.value && inputRef.value?.$el?.contains(event.target as Node)) {\n return;\n }\n }\n\n // If the click originated outside of these two areas, emit the change event\n const newValue = toggleInput();\n\n onChange(newValue);\n };\n\n const toggleInput = (): BentoSelectionCardModelValue => {\n const currentValue: boolean = (inputRef.value?.$refs.inputRef as HTMLInputElement).checked;\n\n if (isCheckboxGroup.value) {\n const newCheckedList = [...(props.modelValue as BentoMultiCheckboxType)];\n const index = newCheckedList.indexOf(props.value);\n\n if (index === -1) {\n newCheckedList.push(props.value);\n } else {\n newCheckedList.splice(index, 1);\n }\n return newCheckedList;\n }\n\n if (isRadioInput.value) {\n return props.value;\n }\n return currentValue;\n };\n\n const onChange = newValue => {\n if (!props.disabled && !props.readonly) {\n emit('update:model-value', newValue);\n emit('input', newValue);\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Selection card component. If used standalone, only the checkbox variant can be used. If the checkbox variant is needed, please use the bento-selection-card-group component.\n *\n * @example\n * import { BentoSelectionCard } from '@adyen/bento-vue2';\n * import EmoticonHappyIcon from '@adyen/ui-assets-icons-16/vue/emoticon-happy';\n *\n * export default {\n * components: { BentoSelectionCard, EmoticonHappyIcon },\n * template: `\n * <bento-selection-card title=\"Card title\" :model-value.sync=\"yourModelValue\">\n * <template #icon>\n * <emoticon-happy-icon />\n * </template>\n * </bento-selection-card>\n * `\n * }\n */\n export default {\n name: 'bento-selection-card',\n };\n</script>\n<style lang=\"scss\" scoped src=\"./selection-card.scss\" />\n","<template>\n <controls-group\n ref=\"containerRef\"\n :aria-describedby=\"shouldShowGroupError ? errorMessageId : null\"\n :aria-required=\"required\"\n :label=\"label\"\n :hide-label=\"hideLabel\"\n :description=\"description\"\n :disabled=\"disabled\"\n :tooltip-text=\"tooltipText\"\n :readonly=\"readonly\"\n :required=\"required\"\n :optional=\"optional\"\n class=\"b-selection-card-group\"\n component-name=\"selection-card-group\"\n >\n <div\n v-if=\"!itemsPerRow || layout === 'vertical'\"\n class=\"b-selection-card-group__items\"\n :class=\"conditionalItemsClasses\"\n >\n <bento-selection-card\n v-for=\"item in items\"\n :key=\"`selection-card-${item.value}`\"\n class=\"b-selection-card-group__item\"\n v-bind=\"item\"\n :model-value=\"inputValue\"\n :readonly=\"readonly || item.readonly\"\n :has-error=\"shouldShowGroupError\"\n :disabled=\"disabled || item.disabled\"\n @update:model-value=\"onInput\"\n >\n <template v-if=\"hasSlot('icon') && item.icon\" #icon>\n <slot name=\"icon\" v-bind=\"item\"></slot>\n </template>\n <template v-if=\"hasSlot('content') && item.content\" #content>\n <slot name=\"content\" v-bind=\"item\"></slot>\n </template>\n <template v-if=\"hasSlot('dynamicContent') && item.dynamicContent\" #dynamicContent>\n <slot name=\"dynamicContent\" v-bind=\"item\"></slot>\n </template>\n </bento-selection-card>\n </div>\n <template v-else>\n <div :key=\"`selection-card-group-layout-breakpoint-${currentBreakpoint}`\">\n <grid-layout\n v-for=\"(row, rowIndex) in computedRows\"\n :key=\"`selection-card-group-row-${rowIndex}-cols-${computedItemsPerRow}`\"\n class=\"b-selection-card-group__items--wrap\"\n :column-width=\"computedColumnWidth\"\n >\n <template v-for=\"(item, columnIndex) in row\" #[`col-${Number(columnIndex)+1}`]>\n <bento-selection-card\n :key=\"`selection-card-${item.value}`\"\n class=\"b-selection-card-group__item b-selection-card-group__item--full-height\"\n v-bind=\"item\"\n :model-value=\"inputValue\"\n :readonly=\"readonly || item.readonly\"\n :has-error=\"shouldShowGroupError\"\n :disabled=\"disabled || item.disabled\"\n @update:model-value=\"onInput\"\n >\n <template v-if=\"hasSlot('icon') && item.icon\" #icon>\n <slot name=\"icon\" v-bind=\"item\"></slot>\n </template>\n <template v-if=\"hasSlot('content') && item.content\" #content>\n <slot name=\"content\" v-bind=\"item\"></slot>\n </template>\n <template v-if=\"hasSlot('dynamicContent') && item.dynamicContent\" #dynamicContent>\n <slot name=\"dynamicContent\" v-bind=\"item\"></slot>\n </template>\n </bento-selection-card>\n </template>\n </grid-layout>\n </div>\n </template>\n <error-message\n v-if=\"shouldShowGroupError\"\n :id=\"errorMessageId\"\n :error-message=\"errorMessage\"\n class=\"b-selection-card-group__error-message\"\n />\n </controls-group>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, provide, ref, useSlots, watch } from 'vue';\n import { useElementSize } from '@vueuse/core';\n import { BMediaQueryMMax, BMediaQuerySMax } from '@adyen/bento-design-tokens/dist/js/bento/es6';\n import { type BentoSelectionCardGroupEmits, type BentoSelectionCardGroupProps } from './selection-card-group.types';\n import BentoSelectionCard from '../../selection-card.vue';\n import { ControlsGroup, ErrorMessage, GridLayout } from '../../../internal';\n import { SELECTION_CARD_RADIO_INPUT_INJECTION_KEY } from '../../selection-card.keys';\n import { generateUid } from '@/utils/ts/generate-uid';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n const props = withDefaults(defineProps<BentoSelectionCardGroupProps>(), {\n description: null,\n disabled: false,\n errorMessage: null,\n formId: null,\n hideLabel: null,\n label: null,\n layout: 'vertical',\n itemsPerRow: undefined,\n modelValue: null,\n optional: false,\n required: false,\n tooltipText: null,\n readonly: false,\n variant: 'checkbox',\n });\n\n const emit = defineEmits<BentoSelectionCardGroupEmits>();\n\n const { emitValue } = useFormFieldEmits(emit);\n\n const slots = useSlots();\n // Slots logic\n // Temporary, use-has-slots composable doesn't currently work for vue3 named scoped slots\n // We do the same in bento-checkbox-group\n const hasSlot = name => !!slots[name];\n\n const conditionalItemsClasses = computed(() => ({\n 'b-selection-card-group__items--horizontal': props.layout === 'horizontal',\n }));\n\n const inputValue = ref(props.modelValue);\n watch(\n () => props.modelValue,\n () => {\n inputValue.value = props.modelValue;\n }\n );\n\n // Error message logic\n const errorMessageId = generateUid('error');\n const shouldShowGroupError = computed(() => !props.disabled && !props.readonly && !!props.errorMessage);\n\n // itemsPerRow logic\n const containerRef = ref<HTMLElement | null>(null);\n const { width } = useElementSize(containerRef);\n\n const smallBreakpoint = computed(() => BMediaQuerySMax.split('px')[0]);\n const mediumBreakpoint = computed(() => BMediaQueryMMax.split('px')[0]);\n\n const currentBreakpoint = computed(() => {\n if (width.value < smallBreakpoint.value) {\n return 'small';\n }\n if (width.value >= smallBreakpoint.value && width.value < mediumBreakpoint.value) {\n return 'medium';\n }\n return 'large';\n });\n\n const computedItemsPerRow = computed(() => {\n return (props.itemsPerRow?.[currentBreakpoint?.value] as number) || props.items.length;\n });\n\n const computedRows = computed(() => {\n if (!props.itemsPerRow) {\n return [];\n }\n const rows = [];\n for (let i = 0; i < props.items.length; i += computedItemsPerRow?.value) {\n rows.push(props.items.slice(i, i + computedItemsPerRow?.value));\n }\n return rows;\n });\n\n // We need to compute the column width on 12 because we're using a 12-column system for out grid-layout logic\n const itemColumnWidth = computed(() => 12 / computedItemsPerRow?.value);\n\n /**\n * Filling the columnWidth array with the same parameters per item to pass\n * to the `grid-layout` layout so the each card can have\n * the same width according to the screen size.\n */\n const computedColumnWidth = computed(() => {\n return computedItemsPerRow?.value\n ? new Array(computedItemsPerRow?.value).fill({\n // Instead of passing the actual screen sizes values, passing the same values per each screen size and recomputing it makes sure visually the change is smoother and not laggy\n small: itemColumnWidth.value,\n medium: itemColumnWidth.value,\n large: itemColumnWidth.value,\n })\n : [];\n });\n\n const onInput = value => {\n inputValue.value = value;\n emitValue(value);\n };\n\n const isRadioVariant = computed(() => props.variant === 'radio');\n\n provide(SELECTION_CARD_RADIO_INPUT_INJECTION_KEY, isRadioVariant);\n\n onMounted(() => {\n if (props.itemsPerRow) {\n Object.values(props.itemsPerRow).forEach(el => {\n if (el && (el < 2 || el > 6)) {\n throw new Error(\n 'itemsPerRow values must have a value between 2 and 6 items per row. Read the documentation for more information.'\n );\n }\n });\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Group of bento-selection-cards.\n *\n * @example\n * import { BentoSelectionCardGroup } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectionCardGroup },\n * template: `\n * <bento-selection-card-group\n * :items=\"[\n * {\n * title: 'Card 1',\n * value: 'card-1',\n * content: 'Slot content 1',\n * icon: RetailIcon,\n * },\n * {\n * title: 'Card 2',\n * value: 'card-2',\n * content: 'Slot content 2',\n * icon: LeafIcon,\n * },\n * ]\"\n * >\n * <template #icon=\"{ icon }\">\n * <component :is=\"icon\"/>\n * </template>\n * <template #content=\"{ content }\">\n * <div>{{ content }}</div>\n * </template>\n * </bento-selection-card-group>\n * `,\n * }\n */\n export default {\n model: { prop: 'modelValue', event: 'update:model-value' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./selection-card-group.scss\" />\n"],"names":["BentoSelectionCardState","BentoSelectionCardState2","SELECTION_CARD_RADIO_INPUT_INJECTION_KEY","__default__$1","props","__props","emit","__emit","slots","useSlots","hasSlot","useHasSlot","inputId","generateUid","descriptionId","computedRadioInputModelValue","computed","computedCheckboxInputModelValue","conditionalClasses","isChecked","containerConditionalClasses","isTitleOnly","checkboxContainerConditionalClasses","checkboxContainerTextConditionalClasses","slotConditionalClasses","ariaLabel","useAriaLabel","isCheckboxGroup","isRadioInput","item","inject","ref","inputRef","slotRef","dynamicSlotRef","handleCardClick","event","newValue2","toggleInput","onChange","newValue","currentValue","newCheckedList","index","__default__","emitValue","useFormFieldEmits","name","conditionalItemsClasses","inputValue","watch","errorMessageId","shouldShowGroupError","containerRef","width","useElementSize","smallBreakpoint","BMediaQuerySMax","mediumBreakpoint","BMediaQueryMMax","currentBreakpoint","computedItemsPerRow","computedRows","rows","i","itemColumnWidth","computedColumnWidth","onInput","value","isRadioVariant","provide","onMounted","el"],"mappings":";;;;;;;;;;;;;;;AAIO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA;ACJL,MAAAE,IAAA,uBAAA,0CAAA;;;;;iBC6THC,KAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AApOA,UAAAC,IAAAC,GAoEAC,IAAAC,GAWAC,IAAAC,EAAA,GACAC,IAAAC,GAAAH,CAAA,GAEAI,IAAAC,EAAA,yBAAA,GACAC,IAAAD,EAAA,4BAAA,GAEAE,IAAAC;AAAA,MAAmE,MAAAZ,EAAA;AAAA,IACnD,GAEhBa,IAAAD;AAAA,MAAwE,MAAAZ,EAAA;AAAA,IACxD,GAGhBc,IAAAF,EAAA,OAAA;AAAA,MAA2C,6BAAAG,EAAA;AAAA,MACA,qCAAAf,EAAA;AAAA,IACI,EAAA,GAG/CgB,IAAAJ,EAAA,OAAA;AAAA,MAAoD,CAAA,qBAAAhB,EAAA,QAAA,EAAA,GAAAI,EAAA;AAAA,MACiB,CAAA,qBAAAJ,EAAA,KAAA,EAAA,GAAAI,EAAA;AAAA,MACH,CAAA,qBAAAJ,EAAA,QAAA,EAAA,GAAAI,EAAA;AAAA,MACG,oCAAAiB,EAAA;AAAA,IACjB,EAAA,GAGpDC,IAAAN,EAAA,OAAA;AAAA,MAA4D,wDAAAK,EAAA;AAAA,IACY,EAAA,GAGxEE,IAAAP,EAAA,OAAA;AAAA,MAAgE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as y, openBlock as f, createBlock as S, unref as s, createSlots as V, withCtx as n, createElementVNode as h, createVNode as c, renderSlot as T, createTextVNode as x, toDisplayString as J, toRefs as Y, ref as o, computed as I, onMounted as z, onUnmounted as j, watch as H, provide as A, createElementBlock as D, withKeys as X, withModifiers as q, normalizeClass as Q, withDirectives as W, createCommentVNode as Z } from "vue";
2
2
  import { B as b, d as ee } from "./typography.wIM07Hbl.js";
3
- import { F as te } from "./footer-actions.NpAByudT.js";
4
- import { D as se } from "./dialog-page.yakmJ6Bc.js";
3
+ import { F as te } from "./footer-actions.Dl20Q1WX.js";
4
+ import { D as se } from "./dialog-page.D60pjDsQ.js";
5
5
  import { _ as N } from "./_plugin-vue_export-helper.CHgC5LLL.js";
6
- import { B as ae } from "./button.D6d4P8nC.js";
6
+ import { B as ae } from "./button.Ciflfide.js";
7
7
  import { B as ie } from "./focus-trap.Co-S6goa.js";
8
8
  import { _ as oe } from "./cross.Daa8LxjC.js";
9
- import { S as ne } from "./button-actions.BjSTWgNC.js";
9
+ import { S as ne } from "./button-actions.uIjzze43.js";
10
10
  import { B as le } from "./directive.D1-d-C2K.js";
11
11
  import { u as re } from "./index.B875RXHM.js";
12
12
  import { g as ce } from "./generate-uid.DBWe4g6T.js";
@@ -251,10 +251,10 @@ const O = {
251
251
  ])
252
252
  ], 34));
253
253
  }
254
- }), Fe = /* @__PURE__ */ N(Ae, [["__scopeId", "data-v-681d8947"]]);
254
+ }), Fe = /* @__PURE__ */ N(Ae, [["__scopeId", "data-v-d01ab99f"]]);
255
255
  export {
256
256
  m as B,
257
257
  Le as a,
258
258
  Fe as s
259
259
  };
260
- //# sourceMappingURL=sidepanel.DcrakBM9.js.map
260
+ //# sourceMappingURL=sidepanel._30g8POM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidepanel._30g8POM.js","sources":["../../../vue2/src/components/sidepanel/components/sidepanel-page.vue","../../../vue2/src/components/sidepanel/sidepanel.types.ts","../../../vue2/src/components/sidepanel/sidepanel.vue"],"sourcesContent":["<template>\n <dialog-page class=\"b-sidepanel-page\" :page-id=\"pageId\" :previous-page=\"previousPage\">\n <template #header>\n <div class=\"b-sidepanel-page__header\">\n <bento-typography class=\"b-sidepanel-page__title\" el=\"h2\" variant=\"title\">\n {{ title }}\n </bento-typography>\n </div>\n </template>\n <template #content>\n <div class=\"b-sidepanel-page__content\">\n <bento-typography el=\"div\" variant=\"body\">\n <slot />\n </bento-typography>\n </div>\n </template>\n <template v-if=\"actions && actions.length > 0\" #footer>\n <div class=\"b-sidepanel-page__actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </div>\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { type PropType } from 'vue';\n\n import { type BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { FooterActions } from '@/components/internal/footer-actions';\n import { DialogPage } from '@/internal';\n\n defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the sidepanel page\n */\n title: {\n type: String,\n default: null,\n },\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * SidepanelPage is used to render different pages of Sidepanel component\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./sidepanel-page.scss\" />\n","export enum BentoSidepanelEvent {\n UPDATE_ACTIVE_PAGE = 'update:active-page',\n UPDATE_IS_OPEN = 'update:is-open',\n}\n","<template>\n <dialog\n ref=\"sidepanel\"\n class=\"b-sidepanel\"\n :class=\"conditionalClasses\"\n @animationend=\"closeSidepanelAfterAnimation\"\n @keydown.esc.prevent=\"isDismissible && startCloseSidepanelAnimation\"\n >\n <bento-focus-trap :id=\"sidepanelId\" v-bento-click-outside-directive=\"closeSidepanelOnClickOutside\">\n <div v-if=\"!computedHideCloseButton\" class=\"b-sidepanel__close-button\">\n <bento-button variant=\"tertiary\" @click=\"startCloseSidepanelAnimation\">\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n <slot />\n </bento-focus-trap>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, onUnmounted, provide, ref, toRefs, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { BentoSidepanelEvent } from './sidepanel.types';\n import {\n BentoDialogPageAnimation,\n type BentoDialogPageConfigData,\n type BentoDialogPageRegisterPage,\n DIALOG_PAGE_CONFIG_INJECTION_KEY,\n DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,\n } from '@/internal';\n\n import { SIDEPANEL_DIALOG_ID_INJECTION_KEY } from './sidepanel.keys';\n\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives/click-outside';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n import { generateUid } from '@/utils/ts/generate-uid';\n import { deprecate } from '@/utils/ts/deprecate';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * The id of the current active page\n * Should be the same id as the BentoSidepanelPage to be displayed\n * If the component only has one page, it can be left null/undefined.\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * If set to true, it allows the sidepanel to be closed.\n * Shows close button when `true` and hides close button when `false`.\n *\n * _Note: This property will not set the visibility of the close button in v2.0.0_\n */\n isDismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls the sidepanel's state from the outside. Set it to true to open the sidepanel.\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Controls the visibility of close button on the sidepanel.\n * Defaults to `true` when `isDismissible=false`, and `true` when `isDimissible=true`.\n *\n * _Note: This property will be set to `false` by default, independent of `isDismissible` in v2.0.0_\n */\n hideCloseButton: {\n type: Boolean,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when page is changed internally\n */\n (e: BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page: string): void;\n /**\n * Emits close-sidepanel event when the sidepanel is closed\n */\n (e: BentoSidepanelEvent.UPDATE_IS_OPEN, isOpen: boolean): void;\n }>();\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const sidepanel = ref(null);\n const pages = ref<Array<string>>([]);\n const previousPages = ref([]);\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n const isClosing = ref(false);\n const sidepanelId = generateUid('sidepanel');\n const internalIsOpen = ref(false);\n const isAnimationActive = ref(false);\n const isMounted = ref(false);\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-sidepanel--hide': isClosing.value,\n 'b-sidepanel--animation': isAnimationActive.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeSidepanelAfterAnimation = () => {\n if (isClosing.value && sidepanel.value) {\n sidepanel.value.close();\n if (previousPages.value[0]) {\n emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n internalIsOpen.value = false;\n emit(BentoSidepanelEvent.UPDATE_IS_OPEN, false);\n }\n };\n\n const startCloseSidepanelAnimation = () => {\n if (!sidepanel.value || !sidepanel.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n const closeSidepanelOnClickOutside = () => {\n if (props.isDismissible) {\n startCloseSidepanelAnimation();\n }\n };\n\n // TODO: Remove in upcoming major. See properties `hideCloseButton` and `isDismissible`.\n const computedHideCloseButton = computed(() => {\n if (props.hideCloseButton !== null) {\n return props.hideCloseButton;\n }\n\n return !props.isDismissible;\n });\n\n onMounted(() => {\n isMounted.value = true;\n });\n\n onUnmounted(() => {\n isMounted.value = false;\n });\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n [() => isOpen.value, sidepanel],\n ([newIsOpen, newSidepanelValue]) => {\n if (!isMounted.value || !newSidepanelValue) {\n return;\n }\n\n if (newIsOpen) {\n internalIsOpen.value = true;\n if (!newSidepanelValue.open) {\n newSidepanelValue.showModal();\n }\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (newSidepanelValue.open) {\n startCloseSidepanelAnimation();\n }\n },\n { immediate: true, flush: 'post' }\n );\n\n // Pages\n const updatePage = page => emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page);\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(pageId => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoDialogPageRegisterPage = pageId => {\n pages.value.push(pageId);\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n isAnimationActive,\n isOpen: internalIsOpen,\n pages,\n previousPages,\n updatePage,\n });\n provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n\n // Let's Children components know they are inside a SidePanel (dialog element)\n provide(SIDEPANEL_DIALOG_ID_INJECTION_KEY, sidepanelId);\n\n if (!props.isDismissible && props.hideCloseButton === null) {\n deprecate(\n 'BentoSidepanel \"isDismissible\" property’s behavior',\n 'BentoSidepanel \"isDismissible\" will no longer hide the close button. Use \"hideCloseButton=true\" instead.',\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Sidepanel component is a slide-in panel that should be used for presenting actions, settings or features that are directly associated with a specific task or interaction on the main screen.\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n<style lang=\"scss\" scoped src=\"./sidepanel.scss\" />\n"],"names":["__default__$1","BentoSidepanelEvent","BentoSidepanelEvent2","__default__","messages","props","__props","emit","__emit","activePage","isOpen","toRefs","t","useI18n","sidepanel","ref","pages","previousPages","animation","BentoDialogPageAnimation","isClosing","sidepanelId","generateUid","internalIsOpen","isAnimationActive","isMounted","conditionalClasses","computed","closeSidepanelAfterAnimation","startCloseSidepanelAnimation","closeSidepanelOnClickOutside","computedHideCloseButton","onMounted","onUnmounted","watch","newIsOpen","newSidepanelValue","updatePage","page","unregisterPage","pageIdToRemove","pageId","registerPage","provide","DIALOG_PAGE_CONFIG_INJECTION_KEY","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","SIDEPANEL_DIALOG_ID_INJECTION_KEY","deprecate"],"mappings":";;;;;;;;;;;;;;4IA2IIA,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3IG,IAAAC,IAAA,kBAAAC,OACHA,EAAA,qBAAA,sBACAA,EAAA,iBAAA,kBAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;GCqQRE,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAxNA,UAAAC,IAAAC,GA0CAC,IAAAC,GAYA,EAAA,YAAAC,GAAA,QAAAC,EAAA,IAAAC,EAAAN,CAAA,GACA,EAAA,GAAAO,EAAA,IAAAC,GAAA,EAAA,UAAAT,EAAA,CAAA,GACAU,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,CAAA,CAAA,GACAE,IAAAF,EAAA,CAAA,CAAA,GACAG,IAAAH,EAAAI,GAAA,uBAAA,GACAC,IAAAL,EAAA,EAAA,GACAM,IAAAC,GAAA,WAAA,GACAC,IAAAR,EAAA,EAAA,GACAS,IAAAT,EAAA,EAAA,GACAU,IAAAV,EAAA,EAAA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,CAAAyB,MAAAA,MAAAD,CAAA;AAAA,IAAqE,GAIzEE,IAAA,CAAAD,OACIzB,EAAA,MAAA,KAAAyB,CAAA,GAEA,EAAA,gBAAAF,EAAAE,CAAA,EAAA;AAGJ,WAAAE,EAAAC,IAAA;AAAA,MAAqE,YAAAnC;AAAA,MACjE,WAAAS;AAAA,MACA,mBAAAM;AAAA,MACA,QAAAD;AAAA,MACQ,OAAAP;AAAA,MACR,eAAAC;AAAA,MACA,YAAAoB;AAAA,IACA,CAAA,GAEJM,EAAAE,IAAAH,CAAA,GAGAC,EAAAG,IAAAzB,CAAA,GAEA,CAAAhB,EAAA,iBAAAA,EAAA,oBAAA,QACI0C;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,7 +3,7 @@ import { B as H } from "./typography.wIM07Hbl.js";
3
3
  import { B, a as de } from "./keyboard-navigation.DWmhelVv.js";
4
4
  import { u as me } from "./index.B875RXHM.js";
5
5
  import { _ as X } from "./_plugin-vue_export-helper.CHgC5LLL.js";
6
- import { B as be } from "./base-button.C8hw-h9-.js";
6
+ import { B as be } from "./base-button.Bi5JR_6k.js";
7
7
  import { _ as Se } from "./checkmark-small.DJcd8Sd7.js";
8
8
  import { _ as fe } from "./dot.BPmlsJv1.js";
9
9
  import "../assets/step.css";
@@ -266,4 +266,4 @@ export {
266
266
  W as b,
267
267
  $e as s
268
268
  };
269
- //# sourceMappingURL=step.Ch6oovwT.js.map
269
+ //# sourceMappingURL=step.5_ZukVqJ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"step.Ch6oovwT.js","sources":["../../../vue2/src/components/stepper/composables/use-keyboard-navigation/use-keyboard-navigation.ts","../../../vue2/src/components/stepper/composables/use-step-register/use-step-register.ts","../../../vue2/src/components/stepper/stepper.keys.ts","../../../vue2/src/components/stepper/stepper.types.ts","../../../vue2/src/components/stepper/stepper.vue","../../../vue2/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<{\n /**\n * Event triggered when step is updated by the stepper\n */\n (e: 'update:index', index: number): void;\n }>();\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=\"caption\" 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<{\n /**\n * Event triggered when substep is updated by the parent step\n */\n (e: 'update:substep-index', index: number): void;\n }>();\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","focusOnPreviousStep","focusOnNextStep","BentoKeyboardNavigationKeyDownEvent","getStepPosition","stepState","listItemElement","listElement","useStepRegister","childrenSteps","position","step","STEPPER_STATE","BentoStepperTypeOption","BentoStepperTypeOption2","BentoStepperVariantOption","BentoStepperVariantOption2","__default__$1","messages","props","__props","emit","__emit","t","n","useI18n","ref","activeStepIndex","latestActiveStep","navigateToStep","index","currentStepContent","computed","stepsAmount","childrenStepsElements","buttonElement","isHorizontalVariant","allVisibleStepsElements","substeps","isStepActive","registerStep","removeStep","stepperState","conditionalClasses","watch","keyboardNavigationListeners","provide","readonly","__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,KAAA,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,KAIAJ,EAAA,MAAAI,IAAAF,CAAA,GAAA,MAAA;AAAA,IAA+C;AAAA,EACnD;AAGJ,QAAAG,IAAAJ,EAAA,EAAA,GACAK,IAAAL,EAAA,CAAA;AAEA,SAAA;AAAA,IAAO,CAAAM,EAAA,UAAA,GAAAD;AAAA,IAC+C,CAAAC,EAAA,WAAA,GAAAD;AAAA,IACC,CAAAC,EAAA,QAAA,GAAAF;AAAA,IACH,CAAAE,EAAA,UAAA,GAAAF;AAAA,EACE;AAE1D,GC1BAG,KAAA,CAAAC,MAAA;AAEI,QAAAC,IAAAD,EAAA,cAAA,MAAA,eACAE,IAAAD,EAAA;AACA,SAAA,MAAA,KAAAC,EAAA,QAAA,EAAA,QAAAD,CAAA;AACJ,GAOOE,IAAA,CAAAC,OA2BH,EAAA,cArBA,CAAAJ,MAAA;AACI,QAAAK,IAAAN,GAAAC,CAAA;AACA,EAAAI,EAAA,MAAA,OAAAC,GAAA,GAAA;AAAA,IAAwC,aAAAL,EAAA;AAAA,IACb,eAAAA,EAAA;AAAA,IACE,UAAAA,EAAA;AAAA,EACL,CAAA;AACvB,GAeL,YAPA,CAAAA,MAAA;AACI,EAAAI,EAAA,MAAA;AAAA,IAAoBA,EAAA,MAAA,UAAA,CAAA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AAAmC,EAAA,SAAAb,EAAA,MAAA,YAAAvC,EAAA,cAAA,CAAAkD,EAAA,SAAAf,EAAA;AAAA,IAKZ,GAEdmB,IAAArC,EAAA,MACIsB,GAAA,MAAA,SAAAzC,EAAA,aACIM,EAAA,YAGJmC,GAAA,MAAA,mBAAAxB,EAAA,KAA+C,GAEnDwC,IAAAtC;AAAA,MAAmB,MAAAsB,GAAA,MAAA,SAAAzC,EAAA,UAAAiB,EAAA,QAAAwB,GAAA,MAAA;AAAA,IAC6E,GAGhGzB,IAAA,MAAA;AACI,MAAAyC,EAAA,SAIAhB,EAAA,MAAA,eAAAxB,EAAA,KAAA;AAAA,IAAwC,GAI5CyC,IAAAvC,EAAA,MAAAmC,EAAA,QAAA,SAAA,OAAA,GACAK,IAAAxC,EAAA,MAAAsC,EAAA,MAAA,SAAA,CAAA,GACAG,IAAAzC,EAAA,MAAAkC,EAAA,SAAApC,EAAA,UAAA,KAAA,CAAAmC,EAAA,QAAA,MAAA,IAAA,GAEAtB,KAAAX,EAAA,OAAA;AAAA,MAA2C,kBAAAmC,EAAA;AAAA,MACZ,qBAAAE,EAAA;AAAA,MACM,mBAAAJ,EAAA;AAAA,IACJ,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"step.5_ZukVqJ.js","sources":["../../../vue2/src/components/stepper/composables/use-keyboard-navigation/use-keyboard-navigation.ts","../../../vue2/src/components/stepper/composables/use-step-register/use-step-register.ts","../../../vue2/src/components/stepper/stepper.keys.ts","../../../vue2/src/components/stepper/stepper.types.ts","../../../vue2/src/components/stepper/stepper.vue","../../../vue2/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<{\n /**\n * Event triggered when step is updated by the stepper\n */\n (e: 'update:index', index: number): void;\n }>();\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=\"caption\" 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<{\n /**\n * Event triggered when substep is updated by the parent step\n */\n (e: 'update:substep-index', index: number): void;\n }>();\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","focusOnPreviousStep","focusOnNextStep","BentoKeyboardNavigationKeyDownEvent","getStepPosition","stepState","listItemElement","listElement","useStepRegister","childrenSteps","position","step","STEPPER_STATE","BentoStepperTypeOption","BentoStepperTypeOption2","BentoStepperVariantOption","BentoStepperVariantOption2","__default__$1","messages","props","__props","emit","__emit","t","n","useI18n","ref","activeStepIndex","latestActiveStep","navigateToStep","index","currentStepContent","computed","stepsAmount","childrenStepsElements","buttonElement","isHorizontalVariant","allVisibleStepsElements","substeps","isStepActive","registerStep","removeStep","stepperState","conditionalClasses","watch","keyboardNavigationListeners","provide","readonly","__expose","__default__","slots","useSlots","buttonComponent","stepContent","stepper","inject","stepContentValue","substepsButtonElements","buttonElement2","activeSubStepIndex","latestActiveSubStepIndex","navigateToSubstep","value","onMounted","onBeforeUnmount","isSubstep","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