@adyen/bento-vue3 1.86.0 → 1.87.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 (277) hide show
  1. package/dist/@types/index.d.ts +12337 -12402
  2. package/dist/action-bar.js +1 -1
  3. package/dist/ai-tag.js +1 -1
  4. package/dist/anchor-scroller.js +1 -1
  5. package/dist/assets/accordion-item.css +1 -1
  6. package/dist/assets/action-bar.css +1 -1
  7. package/dist/assets/anchor-scroller.css +1 -1
  8. package/dist/assets/base-modal.css +1 -1
  9. package/dist/assets/button-actions.css +1 -1
  10. package/dist/assets/card.css +1 -1
  11. package/dist/assets/checkbox-group.css +1 -1
  12. package/dist/assets/checkbox.css +1 -1
  13. package/dist/assets/controls-group.css +1 -1
  14. package/dist/assets/data-grid.css +1 -1
  15. package/dist/assets/date-picker.css +1 -1
  16. package/dist/assets/date-range-picker.css +1 -1
  17. package/dist/assets/dialog-page.css +1 -1
  18. package/dist/assets/dropdown-default-textbox.css +1 -1
  19. package/dist/assets/dropdown.css +1 -1
  20. package/dist/assets/error-message.css +1 -1
  21. package/dist/assets/file-uploader.css +1 -1
  22. package/dist/assets/filter-bar.css +1 -1
  23. package/dist/assets/form-layout-title.css +1 -1
  24. package/dist/assets/input-field-phone-number.css +1 -1
  25. package/dist/assets/input-field.css +1 -1
  26. package/dist/assets/inspector.css +1 -1
  27. package/dist/assets/modal-fullscreen.css +1 -1
  28. package/dist/assets/pagination.css +1 -1
  29. package/dist/assets/radio-group.css +1 -1
  30. package/dist/assets/rich-text-editor.css +1 -1
  31. package/dist/assets/selection-card-group.css +1 -1
  32. package/dist/assets/sidepanel.css +1 -1
  33. package/dist/assets/textarea.css +1 -1
  34. package/dist/button.js +1 -1
  35. package/dist/card.js +1 -1
  36. package/dist/checkbox.js +2 -2
  37. package/dist/chunks/{action-bar.g7rM3wUc.js → action-bar.Ho_fXeXK.js} +4 -4
  38. package/dist/chunks/{action-bar.g7rM3wUc.js.map → action-bar.Ho_fXeXK.js.map} +1 -1
  39. package/dist/chunks/{ai-tag.UlRkq54l.js → ai-tag.DVCW-_vD.js} +2 -2
  40. package/dist/chunks/{ai-tag.UlRkq54l.js.map → ai-tag.DVCW-_vD.js.map} +1 -1
  41. package/dist/chunks/anchor-scroller.BctgW0se.js +214 -0
  42. package/dist/chunks/anchor-scroller.BctgW0se.js.map +1 -0
  43. package/dist/chunks/{base-modal.D5HrjwL1.js → base-modal.gZAtk-xP.js} +17 -17
  44. package/dist/chunks/{base-modal.D5HrjwL1.js.map → base-modal.gZAtk-xP.js.map} +1 -1
  45. package/dist/chunks/{button-actions-with-menu.DBqA3Ws5.js → button-actions-with-menu.Tba1ME79.js} +3 -3
  46. package/dist/chunks/{button-actions-with-menu.DBqA3Ws5.js.map → button-actions-with-menu.Tba1ME79.js.map} +1 -1
  47. package/dist/chunks/{button-actions.BH-J7dux.js → button-actions.BYBpjNqy.js} +182 -180
  48. package/dist/chunks/button-actions.BYBpjNqy.js.map +1 -0
  49. package/dist/chunks/{calendar.DzeJoNc2.js → calendar.vM3abC8y.js} +401 -410
  50. package/dist/chunks/calendar.vM3abC8y.js.map +1 -0
  51. package/dist/chunks/{card.DcXXdxWL.js → card.Cw63i7Ul.js} +2 -2
  52. package/dist/chunks/{card.DcXXdxWL.js.map → card.Cw63i7Ul.js.map} +1 -1
  53. package/dist/chunks/{checkbox-group.Bh_aqKoA.js → checkbox-group.ODQy-ICn.js} +42 -41
  54. package/dist/chunks/checkbox-group.ODQy-ICn.js.map +1 -0
  55. package/dist/chunks/{checkbox.7kpOXm-b.js → checkbox.C3Ewfygy.js} +79 -81
  56. package/dist/chunks/checkbox.C3Ewfygy.js.map +1 -0
  57. package/dist/chunks/{code-snippet.UIqVTv4U.js → code-snippet.Dl1MEedz.js} +4 -4
  58. package/dist/chunks/{code-snippet.UIqVTv4U.js.map → code-snippet.Dl1MEedz.js.map} +1 -1
  59. package/dist/chunks/constructNow.CIc7d13I.js +8 -0
  60. package/dist/chunks/{constructNow.B8T1ljs6.js.map → constructNow.CIc7d13I.js.map} +1 -1
  61. package/dist/chunks/{controls-group.Dip3WAKV.js → controls-group.Bu5lNTyH.js} +22 -28
  62. package/dist/chunks/controls-group.Bu5lNTyH.js.map +1 -0
  63. package/dist/chunks/{copy.ByyQlckP.js → copy.C_BCNHYQ.js} +3 -3
  64. package/dist/chunks/{copy.ByyQlckP.js.map → copy.C_BCNHYQ.js.map} +1 -1
  65. package/dist/chunks/{dashboard-section.CIHtXoeW.js → dashboard-section.CgoLquLP.js} +3 -3
  66. package/dist/chunks/{dashboard-section.CIHtXoeW.js.map → dashboard-section.CgoLquLP.js.map} +1 -1
  67. package/dist/chunks/{dashed-underline.CLwPU-C2.js → dashed-underline.wbRHATeE.js} +3 -3
  68. package/dist/chunks/{dashed-underline.CLwPU-C2.js.map → dashed-underline.wbRHATeE.js.map} +1 -1
  69. package/dist/chunks/{data-grid-template.BTpSfkQt.js → data-grid-template.D40V1cmi.js} +3 -3
  70. package/dist/chunks/{data-grid-template.BTpSfkQt.js.map → data-grid-template.D40V1cmi.js.map} +1 -1
  71. package/dist/chunks/{data-grid.CXDdiHz8.js → data-grid.KudN-TcY.js} +870 -867
  72. package/dist/chunks/{data-grid.CXDdiHz8.js.map → data-grid.KudN-TcY.js.map} +1 -1
  73. package/dist/chunks/date-picker.D5B_SECc.js +251 -0
  74. package/dist/chunks/date-picker.D5B_SECc.js.map +1 -0
  75. package/dist/chunks/date-range-picker.CDDw_xl_.js +1104 -0
  76. package/dist/chunks/date-range-picker.CDDw_xl_.js.map +1 -0
  77. package/dist/chunks/{de.DvtL0g75.js → de.BJvo6njq.js} +2 -2
  78. package/dist/chunks/{de.DvtL0g75.js.map → de.BJvo6njq.js.map} +1 -1
  79. package/dist/chunks/{dialog-page.B3ptLXXP.js → dialog-page.C1KUI51V.js} +2 -2
  80. package/dist/chunks/{dialog-page.B3ptLXXP.js.map → dialog-page.C1KUI51V.js.map} +1 -1
  81. package/dist/chunks/{differenceInMonths.BR4Z2HIa.js → differenceInMonths.CIYECBxK.js} +7 -7
  82. package/dist/chunks/{differenceInMonths.BR4Z2HIa.js.map → differenceInMonths.CIYECBxK.js.map} +1 -1
  83. package/dist/chunks/{dropdown-default-textbox.B-_dTUVX.js → dropdown-default-textbox.CskseEho.js} +62 -60
  84. package/dist/chunks/dropdown-default-textbox.CskseEho.js.map +1 -0
  85. package/dist/chunks/{dropdown-tag.DDNOZhEG.js → dropdown-tag.CwSzUwa7.js} +3 -3
  86. package/dist/chunks/{dropdown-tag.DDNOZhEG.js.map → dropdown-tag.CwSzUwa7.js.map} +1 -1
  87. package/dist/chunks/{dropdown.CU6nfq3V.js → dropdown.Bdw2B-Cw.js} +9 -9
  88. package/dist/chunks/{dropdown.CU6nfq3V.js.map → dropdown.Bdw2B-Cw.js.map} +1 -1
  89. package/dist/chunks/{en-GB.DCGuCmAv.js → en-GB.C3-QUpva.js} +2 -2
  90. package/dist/chunks/{en-GB.DCGuCmAv.js.map → en-GB.C3-QUpva.js.map} +1 -1
  91. package/dist/chunks/{en-US.BZii9jNW.js → en-US.YeSsZuOc.js} +150 -100
  92. package/dist/chunks/en-US.YeSsZuOc.js.map +1 -0
  93. package/dist/chunks/error-message.oGiefI2-.js +155 -0
  94. package/dist/chunks/error-message.oGiefI2-.js.map +1 -0
  95. package/dist/chunks/{es.bz0mzkMq.js → es.DyUjjSL8.js} +2 -2
  96. package/dist/chunks/{es.bz0mzkMq.js.map → es.DyUjjSL8.js.map} +1 -1
  97. package/dist/chunks/{file-uploader.Q2ufNRTY.js → file-uploader.BnmNI1O7.js} +573 -548
  98. package/dist/chunks/file-uploader.BnmNI1O7.js.map +1 -0
  99. package/dist/chunks/{filter-bar.BVj9YVv-.js → filter-bar.xwfVuZw4.js} +1973 -2062
  100. package/dist/chunks/filter-bar.xwfVuZw4.js.map +1 -0
  101. package/dist/chunks/{focus-trap.CBvh2H_m.js → focus-trap.BxCwzLqN.js} +2 -2
  102. package/dist/chunks/{focus-trap.CBvh2H_m.js.map → focus-trap.BxCwzLqN.js.map} +1 -1
  103. package/dist/chunks/{footer-actions.DLzMOB7j.js → footer-actions.Ck6UztD8.js} +2 -2
  104. package/dist/chunks/{footer-actions.DLzMOB7j.js.map → footer-actions.Ck6UztD8.js.map} +1 -1
  105. package/dist/chunks/form-layout-title.CQfeGyVw.js +232 -0
  106. package/dist/chunks/{form-layout-title.DYmTc6M7.js.map → form-layout-title.CQfeGyVw.js.map} +1 -1
  107. package/dist/chunks/{match.CMBZxEs9.js → fr.JD_4GwS8.js} +98 -61
  108. package/dist/chunks/fr.JD_4GwS8.js.map +1 -0
  109. package/dist/chunks/{header-meta.Bw8ZGwJW.js → header-meta.lGt3HsyH.js} +108 -114
  110. package/dist/chunks/header-meta.lGt3HsyH.js.map +1 -0
  111. package/dist/chunks/{header-with-views.CJDoE4hw.js → header-with-views.BT6lbAby.js} +9 -9
  112. package/dist/chunks/{header-with-views.CJDoE4hw.js.map → header-with-views.BT6lbAby.js.map} +1 -1
  113. package/dist/chunks/{header.BeH8KH_l.js → header.oXqwf2xN.js} +3 -3
  114. package/dist/chunks/{header.BeH8KH_l.js.map → header.oXqwf2xN.js.map} +1 -1
  115. package/dist/chunks/{index.CbxHJr39.js → index.Dppy4qHk.js} +204 -197
  116. package/dist/chunks/{index.CbxHJr39.js.map → index.Dppy4qHk.js.map} +1 -1
  117. package/dist/chunks/{info-icon.BLtyJvY4.js → info-icon.DyPOv7Pi.js} +3 -3
  118. package/dist/chunks/{info-icon.BLtyJvY4.js.map → info-icon.DyPOv7Pi.js.map} +1 -1
  119. package/dist/chunks/{input-field-password.KeKQPIZv.js → input-field-password.CKhqGBVB.js} +6 -6
  120. package/dist/chunks/{input-field-password.KeKQPIZv.js.map → input-field-password.CKhqGBVB.js.map} +1 -1
  121. package/dist/chunks/{input-field-phone-number.eaU9p15A.js → input-field-phone-number.Cailj_71.js} +49 -49
  122. package/dist/chunks/{input-field-phone-number.eaU9p15A.js.map → input-field-phone-number.Cailj_71.js.map} +1 -1
  123. package/dist/chunks/{input-field.CNdqlGw6.js → input-field.DqXVoKpy.js} +15 -14
  124. package/dist/chunks/input-field.DqXVoKpy.js.map +1 -0
  125. package/dist/chunks/{inspector.Bnf0g7QE.js → inspector.BjLhY3bE.js} +3 -3
  126. package/dist/chunks/{inspector.Bnf0g7QE.js.map → inspector.BjLhY3bE.js.map} +1 -1
  127. package/dist/chunks/isSameWeek.CzBCmu7d.js +14 -0
  128. package/dist/chunks/{isSameWeek.DjeUtLwI.js.map → isSameWeek.CzBCmu7d.js.map} +1 -1
  129. package/dist/chunks/{it.DIafuXtH.js → it.BlUnV-yA.js} +3 -3
  130. package/dist/chunks/{it.DIafuXtH.js.map → it.BlUnV-yA.js.map} +1 -1
  131. package/dist/chunks/{ja.Cm9tJMi2.js → ja.nUwDmVf2.js} +8 -8
  132. package/dist/chunks/{ja.Cm9tJMi2.js.map → ja.nUwDmVf2.js.map} +1 -1
  133. package/dist/chunks/{layout-row.Bz-mRqAq.js → layout-row.Da8nkm9z.js} +2 -2
  134. package/dist/chunks/{layout-row.Bz-mRqAq.js.map → layout-row.Da8nkm9z.js.map} +1 -1
  135. package/dist/chunks/{listbox-option-tag.C3ihNg6_.js → listbox-option-tag.CoBUYwFG.js} +2 -2
  136. package/dist/chunks/{listbox-option-tag.C3ihNg6_.js.map → listbox-option-tag.CoBUYwFG.js.map} +1 -1
  137. package/dist/chunks/modal-fullscreen.9ZDR_S29.js +301 -0
  138. package/dist/chunks/modal-fullscreen.9ZDR_S29.js.map +1 -0
  139. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BAwez0nB.js → modal.vue_vue_type_script_setup_true_lang.B0IdwV0R.js} +4 -4
  140. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BAwez0nB.js.map → modal.vue_vue_type_script_setup_true_lang.B0IdwV0R.js.map} +1 -1
  141. package/dist/chunks/pagination.CqCd5JCe.js +488 -0
  142. package/dist/chunks/pagination.CqCd5JCe.js.map +1 -0
  143. package/dist/chunks/popover.types.DhALnOLQ.js +6 -0
  144. package/dist/chunks/{popover.types.C_Z2JeVK.js.map → popover.types.DhALnOLQ.js.map} +1 -1
  145. package/dist/chunks/{popper-container.BefZxTzP.js → popper-container.DAK7c9uS.js} +2 -2
  146. package/dist/chunks/{popper-container.BefZxTzP.js.map → popper-container.DAK7c9uS.js.map} +1 -1
  147. package/dist/chunks/{promo-banner.BLie64oS.js → promo-banner.aNwH6uQx.js} +2 -2
  148. package/dist/chunks/{promo-banner.BLie64oS.js.map → promo-banner.aNwH6uQx.js.map} +1 -1
  149. package/dist/chunks/{pt-BR.CiGdfP45.js → pt-BR.BCU2Hj36.js} +2 -2
  150. package/dist/chunks/{pt-BR.CiGdfP45.js.map → pt-BR.BCU2Hj36.js.map} +1 -1
  151. package/dist/chunks/{radio-group.C6nQRQDB.js → radio-group.v8mDVZ-o.js} +24 -23
  152. package/dist/chunks/{radio-group.C6nQRQDB.js.map → radio-group.v8mDVZ-o.js.map} +1 -1
  153. package/dist/chunks/{rich-text-editor.C39NKgl0.js → rich-text-editor.DH1d5Zcp.js} +7 -6
  154. package/dist/chunks/{rich-text-editor.C39NKgl0.js.map → rich-text-editor.DH1d5Zcp.js.map} +1 -1
  155. package/dist/chunks/{search-bar.CbTrg2Sk.js → search-bar.DGpLNVng.js} +3 -3
  156. package/dist/chunks/{search-bar.CbTrg2Sk.js.map → search-bar.DGpLNVng.js.map} +1 -1
  157. package/dist/chunks/{secondary-nav.DTOZQewf.js → secondary-nav.l_60nnXA.js} +3 -3
  158. package/dist/chunks/{secondary-nav.DTOZQewf.js.map → secondary-nav.l_60nnXA.js.map} +1 -1
  159. package/dist/chunks/{segmented-control.D9rHBysM.js → segmented-control.Aqquod8g.js} +2 -2
  160. package/dist/chunks/{segmented-control.D9rHBysM.js.map → segmented-control.Aqquod8g.js.map} +1 -1
  161. package/dist/chunks/{selection-card-group.KEsG0D5V.js → selection-card-group.KBl4fVSH.js} +107 -106
  162. package/dist/chunks/selection-card-group.KBl4fVSH.js.map +1 -0
  163. package/dist/chunks/{sidepanel.DJCagqzl.js → sidepanel.DaXPcTHm.js} +5 -5
  164. package/dist/chunks/{sidepanel.DJCagqzl.js.map → sidepanel.DaXPcTHm.js.map} +1 -1
  165. package/dist/chunks/{startOfWeek.D8Yh4c0G.js → startOfWeek.CXhhX-R7.js} +2 -2
  166. package/dist/chunks/{startOfWeek.D8Yh4c0G.js.map → startOfWeek.CXhhX-R7.js.map} +1 -1
  167. package/dist/chunks/{structured-list-item.f1tmHSEN.js → structured-list-item.DAIaUMCY.js} +4 -4
  168. package/dist/chunks/{structured-list-item.f1tmHSEN.js.map → structured-list-item.DAIaUMCY.js.map} +1 -1
  169. package/dist/chunks/{summary-grid.types.COcV-sOB.js → summary-grid.types.BZcZS_dW.js} +5 -5
  170. package/dist/chunks/{summary-grid.types.COcV-sOB.js.map → summary-grid.types.BZcZS_dW.js.map} +1 -1
  171. package/dist/chunks/{tag.Dr7MKe9q.js → tag.CqWg6C3H.js} +2 -2
  172. package/dist/chunks/{tag.Dr7MKe9q.js.map → tag.CqWg6C3H.js.map} +1 -1
  173. package/dist/chunks/{textarea.CtgbUCjH.js → textarea.CvI2InIB.js} +18 -17
  174. package/dist/chunks/textarea.CvI2InIB.js.map +1 -0
  175. package/dist/chunks/{timeline-item.D9nmCe6u.js → timeline-item.BooD99hL.js} +93 -95
  176. package/dist/chunks/timeline-item.BooD99hL.js.map +1 -0
  177. package/dist/chunks/{tooltip.DYpJZ-99.js → tooltip.Lwtlhv3u.js} +2 -2
  178. package/dist/chunks/{tooltip.DYpJZ-99.js.map → tooltip.Lwtlhv3u.js.map} +1 -1
  179. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.B5hWgNSd.js → tutorial.vue_vue_type_script_setup_true_lang.BL2QTKmV.js} +4 -4
  180. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.B5hWgNSd.js.map → tutorial.vue_vue_type_script_setup_true_lang.BL2QTKmV.js.map} +1 -1
  181. package/dist/chunks/{use-cached-selected-values.BiSuG1eX.js → use-cached-selected-values.C4_X3vVj.js} +2 -2
  182. package/dist/chunks/{use-cached-selected-values.BiSuG1eX.js.map → use-cached-selected-values.C4_X3vVj.js.map} +1 -1
  183. package/dist/chunks/use-date-input-formatter.dtbK-CEy.js +1732 -0
  184. package/dist/chunks/use-date-input-formatter.dtbK-CEy.js.map +1 -0
  185. package/dist/chunks/{zh-CN.Bw_6j9Cd.js → zh-CN.ChYkuQAR.js} +3 -3
  186. package/dist/chunks/{zh-CN.Bw_6j9Cd.js.map → zh-CN.ChYkuQAR.js.map} +1 -1
  187. package/dist/code-snippet.js +1 -1
  188. package/dist/dashboard-template.js +1 -1
  189. package/dist/dashed-underline.js +1 -1
  190. package/dist/data-grid-template.js +1 -1
  191. package/dist/data-grid.js +1 -1
  192. package/dist/date-picker.js +2 -2
  193. package/dist/date-range-picker.js +2 -2
  194. package/dist/draggable-handle.js +1 -1
  195. package/dist/dropdown.js +4 -4
  196. package/dist/file-uploader.js +1 -1
  197. package/dist/filter-bar.js +1 -1
  198. package/dist/focus-trap.js +1 -1
  199. package/dist/form-layout.js +1 -1
  200. package/dist/header-with-views.js +1 -1
  201. package/dist/header.js +1 -1
  202. package/dist/index.js +50 -50
  203. package/dist/index.js.map +1 -1
  204. package/dist/info-icon.js +1 -1
  205. package/dist/input-field-password.js +1 -1
  206. package/dist/input-field-phone-number.js +1 -1
  207. package/dist/input-field.js +1 -1
  208. package/dist/inspector.js +1 -1
  209. package/dist/internal.js +11 -11
  210. package/dist/layout.js +1 -1
  211. package/dist/menu.js +1 -1
  212. package/dist/modal-fullscreen.js +1 -1
  213. package/dist/modal.js +2 -2
  214. package/dist/pagination.js +1 -1
  215. package/dist/popover.js +2 -2
  216. package/dist/popper-container.js +1 -1
  217. package/dist/promo-banner.js +1 -1
  218. package/dist/radio-group.js +1 -1
  219. package/dist/rich-text-editor.js +1 -1
  220. package/dist/search-bar.js +2 -2
  221. package/dist/secondary-nav.js +1 -1
  222. package/dist/segmented-control.js +1 -1
  223. package/dist/selection-card.js +1 -1
  224. package/dist/sidepanel.js +1 -1
  225. package/dist/structured-list.js +1 -1
  226. package/dist/summary-grid.js +1 -1
  227. package/dist/tag.js +1 -1
  228. package/dist/textarea.js +1 -1
  229. package/dist/timeline.js +1 -1
  230. package/dist/tutorial.js +1 -1
  231. package/dist/web-types.json +1 -1
  232. package/package.json +11 -16
  233. package/dist/chunks/anchor-scroller.CKIQu3NK.js +0 -215
  234. package/dist/chunks/anchor-scroller.CKIQu3NK.js.map +0 -1
  235. package/dist/chunks/button-actions.BH-J7dux.js.map +0 -1
  236. package/dist/chunks/calendar.DzeJoNc2.js.map +0 -1
  237. package/dist/chunks/checkbox-group.Bh_aqKoA.js.map +0 -1
  238. package/dist/chunks/checkbox.7kpOXm-b.js.map +0 -1
  239. package/dist/chunks/constructNow.B8T1ljs6.js +0 -8
  240. package/dist/chunks/controls-group.Dip3WAKV.js.map +0 -1
  241. package/dist/chunks/date-input.XSJuuCHe.js +0 -20
  242. package/dist/chunks/date-input.XSJuuCHe.js.map +0 -1
  243. package/dist/chunks/date-picker.CvTSZhMI.js +0 -250
  244. package/dist/chunks/date-picker.CvTSZhMI.js.map +0 -1
  245. package/dist/chunks/date-range-picker.BPCt7cwj.js +0 -1100
  246. package/dist/chunks/date-range-picker.BPCt7cwj.js.map +0 -1
  247. package/dist/chunks/dropdown-default-textbox.B-_dTUVX.js.map +0 -1
  248. package/dist/chunks/en-US.BZii9jNW.js.map +0 -1
  249. package/dist/chunks/error-message.BYA2_fPV.js +0 -158
  250. package/dist/chunks/error-message.BYA2_fPV.js.map +0 -1
  251. package/dist/chunks/file-uploader.Q2ufNRTY.js.map +0 -1
  252. package/dist/chunks/filter-bar.BVj9YVv-.js.map +0 -1
  253. package/dist/chunks/form-layout-title.DYmTc6M7.js +0 -214
  254. package/dist/chunks/fr-CA.B1aPU8fp.js +0 -48
  255. package/dist/chunks/fr-CA.B1aPU8fp.js.map +0 -1
  256. package/dist/chunks/fr.Dj7wEToe.js +0 -47
  257. package/dist/chunks/fr.Dj7wEToe.js.map +0 -1
  258. package/dist/chunks/getTimezoneOffsetInMilliseconds.Tu2wlbTR.js +0 -51
  259. package/dist/chunks/getTimezoneOffsetInMilliseconds.Tu2wlbTR.js.map +0 -1
  260. package/dist/chunks/header-meta.Bw8ZGwJW.js.map +0 -1
  261. package/dist/chunks/input-field.CNdqlGw6.js.map +0 -1
  262. package/dist/chunks/isSameWeek.DjeUtLwI.js +0 -14
  263. package/dist/chunks/ko.Ceaof6EP.js +0 -348
  264. package/dist/chunks/ko.Ceaof6EP.js.map +0 -1
  265. package/dist/chunks/match.CMBZxEs9.js.map +0 -1
  266. package/dist/chunks/modal-fullscreen.B3AGUJgl.js +0 -289
  267. package/dist/chunks/modal-fullscreen.B3AGUJgl.js.map +0 -1
  268. package/dist/chunks/nl.B6vCf2B9.js +0 -327
  269. package/dist/chunks/nl.B6vCf2B9.js.map +0 -1
  270. package/dist/chunks/pagination.lu9nx8j8.js +0 -461
  271. package/dist/chunks/pagination.lu9nx8j8.js.map +0 -1
  272. package/dist/chunks/popover.types.C_Z2JeVK.js +0 -6
  273. package/dist/chunks/selection-card-group.KEsG0D5V.js.map +0 -1
  274. package/dist/chunks/sv.f8EfZjMZ.js +0 -377
  275. package/dist/chunks/sv.f8EfZjMZ.js.map +0 -1
  276. package/dist/chunks/textarea.CtgbUCjH.js.map +0 -1
  277. package/dist/chunks/timeline-item.D9nmCe6u.js.map +0 -1
@@ -1,20 +1,20 @@
1
- import { defineComponent as ae, useSlots as le, computed as r, inject as ne, ref as $, openBlock as i, createElementBlock as E, normalizeClass as g, createElementVNode as x, unref as t, renderSlot as v, createCommentVNode as R, withModifiers as ie, createBlock as u, withCtx as d, createTextVNode as F, toDisplayString as Y, createVNode as se, watch as de, provide as ue, onMounted as ce, Fragment as Z, renderList as Q, mergeProps as y, createSlots as W } from "vue";
2
- import { b as fe } from "./index.CbxHJr39.js";
1
+ import { defineComponent as ae, useSlots as le, computed as t, inject as ne, ref as $, openBlock as i, createElementBlock as E, normalizeClass as g, createElementVNode as x, unref as r, renderSlot as v, createCommentVNode as R, withModifiers as ie, createBlock as u, withCtx as d, createTextVNode as F, toDisplayString as Y, createVNode as se, watch as de, provide as ue, onMounted as ce, Fragment as Z, renderList as Q, mergeProps as y, createSlots as W } from "vue";
2
+ import { b as fe } from "./index.Dppy4qHk.js";
3
3
  import { a as ve, b as me } from "./es6.C1DXQV6f.js";
4
4
  import { B as I } from "./typography.B3J6_tYk.js";
5
- import { C as ye } from "./checkbox-input.BZjSoCQW.js";
6
- import { u as be } from "./aria-label.CaUURpnB.js";
5
+ import { u as ye } from "./aria-label.CaUURpnB.js";
7
6
  import { g as H } from "./generate-uid.NJ8tVoha.js";
8
- import { u as pe } from "./use-has-slot.B7eQSabc.js";
9
- import { a as he } from "./radio-input.DektLjN4.js";
7
+ import { u as be } from "./use-has-slot.B7eQSabc.js";
8
+ import { a as pe } from "./radio-input.DektLjN4.js";
9
+ import { C as he } from "./checkbox-input.BZjSoCQW.js";
10
10
  import { _ as oe } from "./_plugin-vue_export-helper.CHgC5LLL.js";
11
11
  import { u as ke } from "./form-field.D_2g7vaP.js";
12
- import { C as ge } from "./controls-group.Dip3WAKV.js";
12
+ import { C as ge } from "./controls-group.Bu5lNTyH.js";
13
13
  import { G as Ce } from "./grid-layout.Vhv1_zFs.js";
14
- import { E as _e } from "./error-message.BYA2_fPV.js";
14
+ import { E as _e } from "./error-message.oGiefI2-.js";
15
15
  import "../assets/selection-card-group.css";
16
16
  var z = /* @__PURE__ */ ((o) => (o.DISABLED = "disabled", o.READONLY = "readonly", o.ERROR = "error", o))(z || {});
17
- const te = /* @__PURE__ */ Symbol("selection card radio input injection key"), Ve = {
17
+ const re = /* @__PURE__ */ Symbol("selection card radio input injection key"), Ve = {
18
18
  key: 0,
19
19
  class: "b-selection-card__icon",
20
20
  role: "presentation",
@@ -84,35 +84,35 @@ const te = /* @__PURE__ */ Symbol("selection card radio input injection key"), V
84
84
  },
85
85
  emits: ["input", "update:model-value"],
86
86
  setup(o, { emit: U }) {
87
- const e = o, L = U, j = le(), C = pe(j), c = H("selection-card-input-id"), A = H("selection-card-description"), _ = r(
88
- () => e.modelValue
89
- ), N = r(
90
- () => e.modelValue
91
- ), V = r(() => ({
92
- "b-selection-card--checked": q.value,
93
- "b-selection-card--fully-clickable": e.fullyClickable
94
- })), O = r(() => ({
95
- [`b-selection-card--${z.DISABLED}`]: e.disabled,
96
- [`b-selection-card--${z.ERROR}`]: e.hasError,
97
- [`b-selection-card--${z.READONLY}`]: e.readonly,
87
+ const a = o, L = U, j = le(), C = be(j), c = H("selection-card-input-id"), N = H("selection-card-description"), _ = t(
88
+ () => a.modelValue
89
+ ), A = t(
90
+ () => a.modelValue
91
+ ), V = t(() => ({
92
+ "b-selection-card--checked": T.value,
93
+ "b-selection-card--fully-clickable": a.fullyClickable
94
+ })), O = t(() => ({
95
+ [`b-selection-card--${z.DISABLED}`]: a.disabled,
96
+ [`b-selection-card--${z.ERROR}`]: a.hasError,
97
+ [`b-selection-card--${z.READONLY}`]: a.readonly,
98
98
  "b-selection-card--center-aligned": S.value
99
- })), B = r(() => ({
99
+ })), B = t(() => ({
100
100
  "b-selection-card__checkbox-container--center-aligned": S.value
101
- })), D = r(() => ({
101
+ })), q = t(() => ({
102
102
  "b-selection-card__checkbox-container-text--center-aligned": S.value
103
- })), T = r(() => ({
103
+ })), D = t(() => ({
104
104
  "b-selection-card__slot--with-icon": C("icon")
105
- })), b = be({
106
- ariaLabel: e.title,
107
- label: e.value
108
- }), n = r(() => Array.isArray(e.modelValue)), q = r(() => p.value ? e.value === e.modelValue : n.value ? e.modelValue.some((l) => l === e.value) : e.modelValue), p = ne(te, $(!1)), S = r(() => !e.subtitle && !e.description), f = $(null), w = $(null), a = $(null), m = (l) => {
105
+ })), b = ye({
106
+ ariaLabel: a.title,
107
+ label: a.value
108
+ }), n = t(() => Array.isArray(a.modelValue)), T = t(() => p.value ? a.value === a.modelValue : n.value ? a.modelValue.some((l) => l === a.value) : a.modelValue), p = ne(re, $(!1)), S = t(() => !a.subtitle && !a.description), f = $(null), w = $(null), e = $(null), m = (l) => {
109
109
  var k, M, J, K, P, X;
110
110
  if (f.value.$refs.inputRef === l.target) {
111
- const re = s();
112
- G(re);
111
+ const te = s();
112
+ G(te);
113
113
  return;
114
114
  }
115
- if (e.disabled && e.readonly || !e.fullyClickable && (w.value && ((M = (k = w.value) == null ? void 0 : k.$el) != null && M.contains(l.target)) || a.value && ((K = (J = a.value) == null ? void 0 : J.$el) != null && K.contains(l.target)) || f.value && ((X = (P = f.value) == null ? void 0 : P.$el) != null && X.contains(l.target))))
115
+ if (a.disabled && a.readonly || !a.fullyClickable && (w.value && ((M = (k = w.value) == null ? void 0 : k.$el) != null && M.contains(l.target)) || e.value && ((K = (J = e.value) == null ? void 0 : J.$el) != null && K.contains(l.target)) || f.value && ((X = (P = f.value) == null ? void 0 : P.$el) != null && X.contains(l.target))))
116
116
  return;
117
117
  const h = s();
118
118
  G(h);
@@ -120,12 +120,12 @@ const te = /* @__PURE__ */ Symbol("selection card radio input injection key"), V
120
120
  var h;
121
121
  const l = ((h = f.value) == null ? void 0 : h.$refs.inputRef).checked;
122
122
  if (n.value) {
123
- const k = [...e.modelValue], M = k.indexOf(e.value);
124
- return M === -1 ? k.push(e.value) : k.splice(M, 1), k;
123
+ const k = [...a.modelValue], M = k.indexOf(a.value);
124
+ return M === -1 ? k.push(a.value) : k.splice(M, 1), k;
125
125
  }
126
- return p.value ? e.value : l;
126
+ return p.value ? a.value : l;
127
127
  }, G = (l) => {
128
- !e.disabled && !e.readonly && (L("update:model-value", l), L("input", l));
128
+ !a.disabled && !a.readonly && (L("update:model-value", l), L("input", l));
129
129
  };
130
130
  return (l, h) => (i(), E("div", {
131
131
  class: g(["b-selection-card", V.value]),
@@ -138,17 +138,17 @@ const te = /* @__PURE__ */ Symbol("selection card radio input injection key"), V
138
138
  class: g(["b-selection-card__checkbox-container", B.value])
139
139
  }, [
140
140
  x("div", {
141
- class: g(["b-selection-card__checkbox-container-text", D.value])
141
+ class: g(["b-selection-card__checkbox-container-text", q.value])
142
142
  }, [
143
- t(C)("icon") ? (i(), E("div", Ve, [
143
+ r(C)("icon") ? (i(), E("div", Ve, [
144
144
  v(l.$slots, "icon", {}, void 0, !0)
145
145
  ])) : R("", !0),
146
146
  x("label", {
147
- for: t(c),
147
+ for: r(c),
148
148
  class: "b-selection-card__text",
149
149
  onClick: ie(m, ["stop", "prevent"])
150
150
  }, [
151
- o.subtitle ? (i(), u(t(I), {
151
+ o.subtitle ? (i(), u(r(I), {
152
152
  key: 0,
153
153
  class: "b-selection-card__description",
154
154
  el: "span",
@@ -159,7 +159,7 @@ const te = /* @__PURE__ */ Symbol("selection card radio input injection key"), V
159
159
  ]),
160
160
  _: 1
161
161
  })) : R("", !0),
162
- se(t(I), {
162
+ se(r(I), {
163
163
  el: "span",
164
164
  variant: "title"
165
165
  }, {
@@ -168,7 +168,7 @@ const te = /* @__PURE__ */ Symbol("selection card radio input injection key"), V
168
168
  ]),
169
169
  _: 1
170
170
  }),
171
- o.description ? (i(), u(t(I), {
171
+ o.description ? (i(), u(r(I), {
172
172
  key: 1,
173
173
  id: "descriptionId",
174
174
  class: "b-selection-card__description",
@@ -182,52 +182,52 @@ const te = /* @__PURE__ */ Symbol("selection card radio input injection key"), V
182
182
  })) : R("", !0)
183
183
  ], 8, Re)
184
184
  ], 2),
185
- t(p) ? (i(), u(t(he), {
185
+ r(p) ? (i(), u(r(pe), {
186
186
  key: 0,
187
- id: t(c),
187
+ id: r(c),
188
188
  ref_key: "inputRef",
189
189
  ref: f,
190
- "aria-label": t(b),
191
- "aria-describedby": o.description ? t(A) : void 0,
190
+ "aria-label": r(b),
191
+ "aria-describedby": o.description ? r(N) : void 0,
192
192
  disabled: o.disabled,
193
193
  "has-error": o.hasError,
194
194
  "aria-readonly": o.readonly ?? void 0,
195
195
  value: o.value,
196
196
  readonly: o.readonly,
197
197
  "model-value": _.value
198
- }, null, 8, ["id", "aria-label", "aria-describedby", "disabled", "has-error", "aria-readonly", "value", "readonly", "model-value"])) : (i(), u(t(ye), {
198
+ }, null, 8, ["id", "aria-label", "aria-describedby", "disabled", "has-error", "aria-readonly", "value", "readonly", "model-value"])) : (i(), u(r(he), {
199
199
  key: 1,
200
- id: t(c),
200
+ id: r(c),
201
201
  ref_key: "inputRef",
202
202
  ref: f,
203
- "aria-label": t(b),
204
- "aria-describedby": o.description ? t(A) : void 0,
203
+ "aria-label": r(b),
204
+ "aria-describedby": o.description ? r(N) : void 0,
205
205
  disabled: o.disabled,
206
206
  "has-error": o.hasError,
207
207
  "aria-readonly": o.readonly ?? void 0,
208
208
  value: o.value,
209
209
  readonly: o.readonly,
210
- "model-value": N.value
210
+ "model-value": A.value
211
211
  }, null, 8, ["id", "aria-label", "aria-describedby", "disabled", "has-error", "aria-readonly", "value", "readonly", "model-value"]))
212
212
  ], 2),
213
- t(C)("content") ? (i(), u(t(I), {
213
+ r(C)("content") ? (i(), u(r(I), {
214
214
  key: 0,
215
215
  ref_key: "slotRef",
216
216
  ref: w,
217
217
  el: "div",
218
- class: g(["b-selection-card__slot", T.value])
218
+ class: g(["b-selection-card__slot", D.value])
219
219
  }, {
220
220
  default: d(() => [
221
221
  v(l.$slots, "content", {}, void 0, !0)
222
222
  ]),
223
223
  _: 3
224
224
  }, 8, ["class"])) : R("", !0),
225
- t(C)("dynamicContent") && q.value ? (i(), u(t(I), {
225
+ r(C)("dynamicContent") && T.value ? (i(), u(r(I), {
226
226
  key: 1,
227
227
  ref_key: "dynamicSlotRef",
228
- ref: a,
228
+ ref: e,
229
229
  el: "div",
230
- class: g(["b-selection-card__slot", T.value])
230
+ class: g(["b-selection-card__slot", D.value])
231
231
  }, {
232
232
  default: d(() => [
233
233
  v(l.$slots, "dynamicContent", {}, void 0, !0)
@@ -262,89 +262,90 @@ const te = /* @__PURE__ */ Symbol("selection card radio input injection key"), V
262
262
  },
263
263
  emits: ["update:model-value", "input"],
264
264
  setup(o, { emit: U }) {
265
- const e = o, L = U, { emitValue: j } = ke(L), C = le(), c = (a) => !!C[a], A = r(() => ({
266
- "b-selection-card-group__items--horizontal": e.layout === "horizontal"
267
- })), _ = $(e.modelValue);
265
+ const a = o, L = U, { emitValue: j } = ke(L), C = le(), c = (e) => !!C[e], N = t(() => ({
266
+ "b-selection-card-group__items--horizontal": a.layout === "horizontal"
267
+ })), _ = $(a.modelValue);
268
268
  de(
269
- () => e.modelValue,
269
+ () => a.modelValue,
270
270
  () => {
271
- _.value = e.modelValue;
271
+ _.value = a.modelValue;
272
272
  }
273
273
  );
274
- const N = H("error"), V = r(() => !e.disabled && !e.readonly && !!e.errorMessage), O = $(null), { width: B } = fe(O), D = r(() => ve.split("px")[0]), T = r(() => me.split("px")[0]), b = r(() => B.value < D.value ? "small" : B.value >= D.value && B.value < T.value ? "medium" : "large"), n = r(() => {
275
- var a;
276
- return ((a = e.itemsPerRow) == null ? void 0 : a[b == null ? void 0 : b.value]) || e.items.length;
277
- }), q = r(() => {
278
- if (!e.itemsPerRow)
274
+ const A = H("error"), V = t(() => !a.disabled && !a.readonly && !!a.errorMessage), O = $(null), { width: B } = fe(O), q = t(() => ve.split("px")[0]), D = t(() => me.split("px")[0]), b = t(() => B.value < q.value ? "small" : B.value >= q.value && B.value < D.value ? "medium" : "large"), n = t(() => {
275
+ var e;
276
+ return ((e = a.itemsPerRow) == null ? void 0 : e[b == null ? void 0 : b.value]) || a.items.length;
277
+ }), T = t(() => {
278
+ if (!a.itemsPerRow)
279
279
  return [];
280
- const a = [];
281
- for (let m = 0; m < e.items.length; m += n == null ? void 0 : n.value)
282
- a.push(e.items.slice(m, m + (n == null ? void 0 : n.value)));
283
- return a;
284
- }), p = r(() => 12 / (n == null ? void 0 : n.value)), S = r(() => n != null && n.value ? new Array(n == null ? void 0 : n.value).fill({
280
+ const e = [];
281
+ for (let m = 0; m < a.items.length; m += n == null ? void 0 : n.value)
282
+ e.push(a.items.slice(m, m + (n == null ? void 0 : n.value)));
283
+ return e;
284
+ }), p = t(() => 12 / (n == null ? void 0 : n.value)), S = t(() => n != null && n.value ? new Array(n == null ? void 0 : n.value).fill({
285
285
  // 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
286
286
  small: p.value,
287
287
  medium: p.value,
288
288
  large: p.value
289
- }) : []), f = (a) => {
290
- _.value = a, j(a);
291
- }, w = r(() => e.variant === "radio");
292
- return ue(te, w), ce(() => {
293
- e.itemsPerRow && Object.values(e.itemsPerRow).forEach((a) => {
294
- if (a && (a < 2 || a > 6))
289
+ }) : []), f = (e) => {
290
+ _.value = e, j(e);
291
+ }, w = t(() => a.variant === "radio");
292
+ return ue(re, w), ce(() => {
293
+ a.itemsPerRow && Object.values(a.itemsPerRow).forEach((e) => {
294
+ if (e && (e < 2 || e > 6))
295
295
  throw new Error(
296
296
  "itemsPerRow values must have a value between 2 and 6 items per row. Read the documentation for more information."
297
297
  );
298
298
  });
299
- }), (a, m) => (i(), u(t(ge), {
299
+ }), (e, m) => (i(), u(r(ge), {
300
300
  ref_key: "containerRef",
301
301
  ref: O,
302
- "aria-describedby": V.value ? t(N) : null,
303
- label: a.label,
304
- "hide-label": a.hideLabel,
305
- description: a.description,
306
- disabled: a.disabled,
307
- "tooltip-text": a.tooltipText,
308
- readonly: a.readonly,
309
- required: a.required,
310
- optional: a.optional,
302
+ "aria-describedby": V.value ? r(A) : null,
303
+ "aria-required": e.required,
304
+ label: e.label,
305
+ "hide-label": e.hideLabel,
306
+ description: e.description,
307
+ disabled: e.disabled,
308
+ "tooltip-text": e.tooltipText,
309
+ readonly: e.readonly,
310
+ required: e.required,
311
+ optional: e.optional,
311
312
  class: "b-selection-card-group",
312
313
  "component-name": "selection-card-group"
313
314
  }, {
314
315
  default: d(() => [
315
- !a.itemsPerRow || a.layout === "vertical" ? (i(), E("div", {
316
+ !e.itemsPerRow || e.layout === "vertical" ? (i(), E("div", {
316
317
  key: 0,
317
- class: g(["b-selection-card-group__items", A.value])
318
+ class: g(["b-selection-card-group__items", N.value])
318
319
  }, [
319
- (i(!0), E(Z, null, Q(a.items, (s) => (i(), u(ee, y({
320
+ (i(!0), E(Z, null, Q(e.items, (s) => (i(), u(ee, y({
320
321
  key: `selection-card-${s.value}`,
321
322
  class: "b-selection-card-group__item",
322
323
  ref_for: !0
323
324
  }, s, {
324
325
  "model-value": _.value,
325
- readonly: a.readonly || s.readonly,
326
+ readonly: e.readonly || s.readonly,
326
327
  "has-error": V.value,
327
- disabled: a.disabled || s.disabled,
328
+ disabled: e.disabled || s.disabled,
328
329
  "onUpdate:modelValue": f
329
330
  }), W({ _: 2 }, [
330
331
  c("icon") && s.icon ? {
331
332
  name: "icon",
332
333
  fn: d(() => [
333
- v(a.$slots, "icon", y({ ref_for: !0 }, s), void 0, !0)
334
+ v(e.$slots, "icon", y({ ref_for: !0 }, s), void 0, !0)
334
335
  ]),
335
336
  key: "0"
336
337
  } : void 0,
337
338
  c("content") && s.content ? {
338
339
  name: "content",
339
340
  fn: d(() => [
340
- v(a.$slots, "content", y({ ref_for: !0 }, s), void 0, !0)
341
+ v(e.$slots, "content", y({ ref_for: !0 }, s), void 0, !0)
341
342
  ]),
342
343
  key: "1"
343
344
  } : void 0,
344
345
  c("dynamicContent") && s.dynamicContent ? {
345
346
  name: "dynamicContent",
346
347
  fn: d(() => [
347
- v(a.$slots, "dynamicContent", y({ ref_for: !0 }, s), void 0, !0)
348
+ v(e.$slots, "dynamicContent", y({ ref_for: !0 }, s), void 0, !0)
348
349
  ]),
349
350
  key: "2"
350
351
  } : void 0
@@ -352,13 +353,13 @@ const te = /* @__PURE__ */ Symbol("selection card radio input injection key"), V
352
353
  ], 2)) : (i(), E("div", {
353
354
  key: `selection-card-group-layout-breakpoint-${b.value}`
354
355
  }, [
355
- (i(!0), E(Z, null, Q(q.value, (s, G) => (i(), u(t(Ce), {
356
+ (i(!0), E(Z, null, Q(T.value, (s, G) => (i(), u(r(Ce), {
356
357
  key: `selection-card-group-row-${G}-cols-${n.value}`,
357
358
  class: "b-selection-card-group__items--wrap",
358
359
  "column-width": S.value
359
360
  }, W({ _: 2 }, [
360
361
  Q(s, (l, h) => ({
361
- name: `col-${h + 1}`,
362
+ name: `col-${Number(h) + 1}`,
362
363
  fn: d(() => [
363
364
  (i(), u(ee, y({
364
365
  key: `selection-card-${l.value}`,
@@ -366,29 +367,29 @@ const te = /* @__PURE__ */ Symbol("selection card radio input injection key"), V
366
367
  ref_for: !0
367
368
  }, l, {
368
369
  "model-value": _.value,
369
- readonly: a.readonly || l.readonly,
370
+ readonly: e.readonly || l.readonly,
370
371
  "has-error": V.value,
371
- disabled: a.disabled || l.disabled,
372
+ disabled: e.disabled || l.disabled,
372
373
  "onUpdate:modelValue": f
373
374
  }), W({ _: 2 }, [
374
375
  c("icon") && l.icon ? {
375
376
  name: "icon",
376
377
  fn: d(() => [
377
- v(a.$slots, "icon", y({ ref_for: !0 }, l), void 0, !0)
378
+ v(e.$slots, "icon", y({ ref_for: !0 }, l), void 0, !0)
378
379
  ]),
379
380
  key: "0"
380
381
  } : void 0,
381
382
  c("content") && l.content ? {
382
383
  name: "content",
383
384
  fn: d(() => [
384
- v(a.$slots, "content", y({ ref_for: !0 }, l), void 0, !0)
385
+ v(e.$slots, "content", y({ ref_for: !0 }, l), void 0, !0)
385
386
  ]),
386
387
  key: "1"
387
388
  } : void 0,
388
389
  c("dynamicContent") && l.dynamicContent ? {
389
390
  name: "dynamicContent",
390
391
  fn: d(() => [
391
- v(a.$slots, "dynamicContent", y({ ref_for: !0 }, l), void 0, !0)
392
+ v(e.$slots, "dynamicContent", y({ ref_for: !0 }, l), void 0, !0)
392
393
  ]),
393
394
  key: "2"
394
395
  } : void 0
@@ -397,20 +398,20 @@ const te = /* @__PURE__ */ Symbol("selection card radio input injection key"), V
397
398
  }))
398
399
  ]), 1032, ["column-width"]))), 128))
399
400
  ])),
400
- V.value ? (i(), u(t(_e), {
401
+ V.value ? (i(), u(r(_e), {
401
402
  key: 2,
402
- id: t(N),
403
- "error-message": a.errorMessage,
403
+ id: r(A),
404
+ "error-message": e.errorMessage,
404
405
  class: "b-selection-card-group__error-message"
405
406
  }, null, 8, ["id", "error-message"])) : R("", !0)
406
407
  ]),
407
408
  _: 3
408
- }, 8, ["aria-describedby", "label", "hide-label", "description", "disabled", "tooltip-text", "readonly", "required", "optional"]));
409
+ }, 8, ["aria-describedby", "aria-required", "label", "hide-label", "description", "disabled", "tooltip-text", "readonly", "required", "optional"]));
409
410
  }
410
- }), je = /* @__PURE__ */ oe(Se, [["__scopeId", "data-v-30b4f6fa"]]);
411
+ }), je = /* @__PURE__ */ oe(Se, [["__scopeId", "data-v-c6cd7896"]]);
411
412
  export {
412
413
  ee as B,
413
414
  z as a,
414
415
  je as s
415
416
  };
416
- //# sourceMappingURL=selection-card-group.KEsG0D5V.js.map
417
+ //# sourceMappingURL=selection-card-group.KBl4fVSH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection-card-group.KBl4fVSH.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 '../checkbox/checkbox.types';\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 { type BentoCheckboxType, type BentoMultiCheckboxType, CheckboxInput } from '../internal/checkbox-input';\n import { RadioInput, type RadioInputValue } from '../internal/radio-input';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { generateUid } from '@/core/utils/ts';\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 '@/core/utils/ts';\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' },\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","_b","_a","_d","_c","_f","_e","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,KAAA,uBAAA,0CAAA;;;;;iBC4THC,KAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AApOA,UAAAC,IAAAC,GAoEAC,IAAAC,GAWAC,IAAAC,GAAA,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,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AA,OAAA;AAEA,WAAAwE,GAAA1E,IAAAyE,CAAA,GAEAE,GAAA,MAAA;AACI,MAAAzE,EAAA,eACI,OAAA,OAAAA,EAAA,WAAA,EAAA,QAAA,CAAA0E,MAAA;AACI,YAAAA,MAAAA,IAAA,KAAAA,IAAA;AACI,gBAAA,IAAA;AAAA,YAAU;AAAA,UACN;AAAA,MAER,CAAA;AAAA,IAER,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as O, openBlock as f, createBlock as T, unref as a, createSlots as J, withCtx as n, createElementVNode as A, createVNode as u, renderSlot as N, createTextVNode as M, toDisplayString as Y, toRefs as j, ref as o, computed as b, onMounted as z, onUnmounted as H, watch as q, provide as h, createElementBlock as D, withKeys as Q, withModifiers as W, normalizeClass as X, withDirectives as Z, createCommentVNode as ee } from "vue";
2
2
  import { B as y, d as te } from "./typography.B3J6_tYk.js";
3
- import { F as se } from "./footer-actions.DLzMOB7j.js";
4
- import { b as ae, B as ie, D as oe, a as ne } from "./dialog-page.B3ptLXXP.js";
3
+ import { F as se } from "./footer-actions.Ck6UztD8.js";
4
+ import { b as ae, B as ie, D as oe, a as ne } from "./dialog-page.C1KUI51V.js";
5
5
  import { _ as S } from "./_plugin-vue_export-helper.CHgC5LLL.js";
6
6
  import { B as le } from "./button.C6t9_lzm.js";
7
- import { B as re } from "./focus-trap.CBvh2H_m.js";
7
+ import { B as re } from "./focus-trap.BxCwzLqN.js";
8
8
  import { C as ue } from "./cross.CCHdi6v3.js";
9
- import { S as de } from "./button-actions.BH-J7dux.js";
9
+ import { S as de } from "./button-actions.BYBpjNqy.js";
10
10
  import { B as ce } from "./directive.rXUeDb8p.js";
11
11
  import { u as pe } from "./index.B875RXHM.js";
12
12
  import { g as fe } from "./generate-uid.NJ8tVoha.js";
@@ -255,4 +255,4 @@ export {
255
255
  Ue as a,
256
256
  Le as s
257
257
  };
258
- //# sourceMappingURL=sidepanel.DJCagqzl.js.map
258
+ //# sourceMappingURL=sidepanel.DaXPcTHm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sidepanel.DJCagqzl.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 '@/core/utils/ts';\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","_a","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,IAAA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A;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,IAAA,OAAA,OAAA;AAAA,IACiC;AAIrC,UAAAQ,IAAA,CAAAC,MAAA/B,EAAAN,EAAA,oBAAAqC,CAAA,GAGAC,IAAA,CAAAC,MAAA,MAAA;;AACI,MAAAxB,EAAA,SAAAyB,IAAAzB,EAAA,UAAA,gBAAAyB,EAAA,OAAA,CAAAC,MAAAA,MAAAF;AAAA,IAAqE,GAIzEG,IAAA,CAAAD,OACI1B,EAAA,MAAA,KAAA0B,CAAA,GAEA,EAAA,gBAAAH,EAAAG,CAAA,EAAA;AAGJ,WAAAE,EAAAC,IAAA;AAAA,MAAqE,YAAApC;AAAA,MACjE,WAAAS;AAAA,MACA,mBAAAM;AAAA,MACA,QAAAD;AAAA,MACQ,OAAAP;AAAA,MACR,eAAAC;AAAA,MACA,YAAAoB;AAAA,IACA,CAAA,GAEJO,EAAAE,IAAAH,CAAA,GAGAC,EAAAG,IAAA1B,CAAA,GAEA,CAAAhB,EAAA,iBAAAA,EAAA,oBAAA,QACI2C;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"sidepanel.DaXPcTHm.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 '@/core/utils/ts';\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","_a","pageId","registerPage","provide","DIALOG_PAGE_CONFIG_INJECTION_KEY","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","SIDEPANEL_DIALOG_ID_INJECTION_KEY","deprecate"],"mappings":";;;;;;;;;;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