@adyen/bento-vue3 1.84.2 → 1.86.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 (471) hide show
  1. package/dist/@types/components.d.ts +6 -0
  2. package/dist/@types/index.d.ts +480 -268
  3. package/dist/accordion.js +1 -1
  4. package/dist/action-bar.js +1 -1
  5. package/dist/ai-tag.js +5 -0
  6. package/dist/ai-tag.js.map +1 -0
  7. package/dist/alert.js +1 -1
  8. package/dist/anchor-scroller.js +5 -0
  9. package/dist/anchor-scroller.js.map +1 -0
  10. package/dist/assets/accordion-item.css +1 -1
  11. package/dist/assets/action-bar.css +1 -1
  12. package/dist/assets/ai-tag.css +1 -0
  13. package/dist/assets/anchor-scroller.css +1 -0
  14. package/dist/assets/base-modal.css +1 -1
  15. package/dist/assets/button-actions.css +1 -1
  16. package/dist/assets/card.css +1 -1
  17. package/dist/assets/checkbox.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/draggable-handle.css +1 -0
  23. package/dist/assets/dropdown-default-textbox.css +1 -1
  24. package/dist/assets/dropdown.css +1 -1
  25. package/dist/assets/error-message.css +1 -0
  26. package/dist/assets/file-uploader.css +1 -1
  27. package/dist/assets/filter-bar.css +1 -1
  28. package/dist/assets/fixed-scroller.css +1 -1
  29. package/dist/assets/form-layout-title.css +1 -1
  30. package/dist/assets/inspector.css +1 -1
  31. package/dist/assets/layout-row.css +1 -1
  32. package/dist/assets/modal-fullscreen.css +1 -1
  33. package/dist/assets/radio-group.css +1 -1
  34. package/dist/assets/secondary-nav.css +1 -1
  35. package/dist/assets/sidepanel.css +1 -1
  36. package/dist/assets/use-cached-selected-values.css +1 -1
  37. package/dist/avatar.js +1 -1
  38. package/dist/button.js +3 -3
  39. package/dist/card.js +1 -1
  40. package/dist/checkbox.js +6 -6
  41. package/dist/chip.js +1 -1
  42. package/dist/chunks/1-generic-use.CZhwP2Yc.js.map +1 -1
  43. package/dist/chunks/1-generic-use.R6x8PEGA.js.map +1 -1
  44. package/dist/chunks/2-generic-use.CNKjB4B7.js.map +1 -1
  45. package/dist/chunks/2-generic-use.w0fUhovx.js.map +1 -1
  46. package/dist/chunks/3-generic-use.BLEzR04g.js.map +1 -1
  47. package/dist/chunks/3-generic-use.D3NFHgI4.js.map +1 -1
  48. package/dist/chunks/4-generic-use.CULEpvgj.js.map +1 -1
  49. package/dist/chunks/4-generic-use.D82y3n39.js.map +1 -1
  50. package/dist/chunks/{accordion-item.yRlQj4VF.js → accordion-item.QQ06tTjt.js} +8 -8
  51. package/dist/chunks/{accordion-item.yRlQj4VF.js.map → accordion-item.QQ06tTjt.js.map} +1 -1
  52. package/dist/chunks/action-bar.g7rM3wUc.js +209 -0
  53. package/dist/chunks/action-bar.g7rM3wUc.js.map +1 -0
  54. package/dist/chunks/adding-payment-methods.BJZLPxtM.js.map +1 -1
  55. package/dist/chunks/adding-payment-methods.Dle8zt43.js.map +1 -1
  56. package/dist/chunks/adyen-giving.Ffw_DlJK.js.map +1 -1
  57. package/dist/chunks/adyen-giving.LiKHj_jY.js.map +1 -1
  58. package/dist/chunks/ai-button.XfeGC4-Q.js +57 -0
  59. package/dist/chunks/ai-button.XfeGC4-Q.js.map +1 -0
  60. package/dist/chunks/ai-tag.UlRkq54l.js +139 -0
  61. package/dist/chunks/ai-tag.UlRkq54l.js.map +1 -0
  62. package/dist/chunks/{alert.BYcw-u3b.js → alert.CDWtu0Hu.js} +11 -11
  63. package/dist/chunks/{alert.BYcw-u3b.js.map → alert.CDWtu0Hu.js.map} +1 -1
  64. package/dist/chunks/anchor-scroller.CKIQu3NK.js +215 -0
  65. package/dist/chunks/anchor-scroller.CKIQu3NK.js.map +1 -0
  66. package/dist/chunks/aria-label.CaUURpnB.js.map +1 -1
  67. package/dist/chunks/arrow-left.C6UiqO-c.js +29 -0
  68. package/dist/chunks/arrow-left.C6UiqO-c.js.map +1 -0
  69. package/dist/chunks/arrow-right.fSdLV_ho.js +29 -0
  70. package/dist/chunks/arrow-right.fSdLV_ho.js.map +1 -0
  71. package/dist/chunks/artificial-intelligence-ai-filled.AhDHffzT.js +44 -0
  72. package/dist/chunks/artificial-intelligence-ai-filled.AhDHffzT.js.map +1 -0
  73. package/dist/chunks/{avatar.CNGMjwg3.js → avatar.Caeba-pw.js} +3 -3
  74. package/dist/chunks/{avatar.CNGMjwg3.js.map → avatar.Caeba-pw.js.map} +1 -1
  75. package/dist/chunks/{base-button.CUd03aA2.js → base-button.CRYAiuzn.js} +9 -9
  76. package/dist/chunks/{base-button.CUd03aA2.js.map → base-button.CRYAiuzn.js.map} +1 -1
  77. package/dist/chunks/{base-modal.D3GyeCFT.js → base-modal.D5HrjwL1.js} +23 -23
  78. package/dist/chunks/{base-modal.D3GyeCFT.js.map → base-modal.D5HrjwL1.js.map} +1 -1
  79. package/dist/chunks/{bin.DuHlEQBO.js → bin.Cude0fiB.js} +4 -4
  80. package/dist/chunks/{bin.DuHlEQBO.js.map → bin.Cude0fiB.js.map} +1 -1
  81. package/dist/chunks/{button-actions-with-menu.B8xFgt-p.js → button-actions-with-menu.DBqA3Ws5.js} +7 -7
  82. package/dist/chunks/{button-actions-with-menu.B8xFgt-p.js.map → button-actions-with-menu.DBqA3Ws5.js.map} +1 -1
  83. package/dist/chunks/{button-actions.Crj4QFAd.js → button-actions.BH-J7dux.js} +17 -17
  84. package/dist/chunks/{button-actions.Crj4QFAd.js.map → button-actions.BH-J7dux.js.map} +1 -1
  85. package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
  86. package/dist/chunks/{button.CSp48LJt.js → button.C6t9_lzm.js} +12 -12
  87. package/dist/chunks/{button.CSp48LJt.js.map → button.C6t9_lzm.js.map} +1 -1
  88. package/dist/chunks/{calendar.DKPx_cQU.js → calendar.DzeJoNc2.js} +113 -107
  89. package/dist/chunks/{calendar.DKPx_cQU.js.map → calendar.DzeJoNc2.js.map} +1 -1
  90. package/dist/chunks/{card.C_03IYJe.js → card.DcXXdxWL.js} +7 -7
  91. package/dist/chunks/{card.C_03IYJe.js.map → card.DcXXdxWL.js.map} +1 -1
  92. package/dist/chunks/{checkbox-group.DZrhxIHp.js → checkbox-group.Bh_aqKoA.js} +11 -11
  93. package/dist/chunks/{checkbox-group.DZrhxIHp.js.map → checkbox-group.Bh_aqKoA.js.map} +1 -1
  94. package/dist/chunks/{checkbox-input.Dk9iFQQe.js → checkbox-input.BZjSoCQW.js} +4 -4
  95. package/dist/chunks/{checkbox-input.Dk9iFQQe.js.map → checkbox-input.BZjSoCQW.js.map} +1 -1
  96. package/dist/chunks/{checkbox.BWgWtiLJ.js → checkbox.7kpOXm-b.js} +22 -22
  97. package/dist/chunks/{checkbox.BWgWtiLJ.js.map → checkbox.7kpOXm-b.js.map} +1 -1
  98. package/dist/chunks/{checkmark-circle-fill._6-d40ru.js → checkmark-circle-fill.DugX5fbG.js} +4 -4
  99. package/dist/chunks/{checkmark-circle-fill._6-d40ru.js.map → checkmark-circle-fill.DugX5fbG.js.map} +1 -1
  100. package/dist/chunks/{checkmark-small.x-gmK2Dt.js → checkmark-small.CRuZauJc.js} +5 -5
  101. package/dist/chunks/{checkmark-small.x-gmK2Dt.js.map → checkmark-small.CRuZauJc.js.map} +1 -1
  102. package/dist/chunks/{chevron-down.DCQ6ZLaq.js → chevron-down.XeE-LBV_.js} +5 -5
  103. package/dist/chunks/{chevron-down.DCQ6ZLaq.js.map → chevron-down.XeE-LBV_.js.map} +1 -1
  104. package/dist/chunks/{chevron-left.Cfn1uGLH.js → chevron-left.C_vPW7OR.js} +8 -8
  105. package/dist/chunks/{chevron-left.Cfn1uGLH.js.map → chevron-left.C_vPW7OR.js.map} +1 -1
  106. package/dist/chunks/{chevron-up.kfuLRpZb.js → chevron-up.Cmgl2a3x.js} +5 -5
  107. package/dist/chunks/{chevron-up.kfuLRpZb.js.map → chevron-up.Cmgl2a3x.js.map} +1 -1
  108. package/dist/chunks/{chip.eefnwpgE.js → chip.CyW1V8RU.js} +7 -7
  109. package/dist/chunks/{chip.eefnwpgE.js.map → chip.CyW1V8RU.js.map} +1 -1
  110. package/dist/chunks/{click-outside.C1Ud8AA2.js → click-outside.CDz_x8mN.js} +2 -2
  111. package/dist/chunks/{click-outside.C1Ud8AA2.js.map → click-outside.CDz_x8mN.js.map} +1 -1
  112. package/dist/chunks/{code-snippet.BX3Yeo0x.js → code-snippet.UIqVTv4U.js} +15 -15
  113. package/dist/chunks/{code-snippet.BX3Yeo0x.js.map → code-snippet.UIqVTv4U.js.map} +1 -1
  114. package/dist/chunks/{codemirror.Cy7iSLbd.js → codemirror.D2BAltnu.js} +3688 -3673
  115. package/dist/chunks/codemirror.D2BAltnu.js.map +1 -0
  116. package/dist/chunks/constructNow.B8T1ljs6.js +8 -0
  117. package/dist/chunks/{constructNow.DuaJst0D.js.map → constructNow.B8T1ljs6.js.map} +1 -1
  118. package/dist/chunks/{controls-group.DpFv8c4E.js → controls-group.Dip3WAKV.js} +10 -10
  119. package/dist/chunks/{controls-group.DpFv8c4E.js.map → controls-group.Dip3WAKV.js.map} +1 -1
  120. package/dist/chunks/{copy.xg9ElNxd.js → copy.ByyQlckP.js} +6 -6
  121. package/dist/chunks/{copy.xg9ElNxd.js.map → copy.ByyQlckP.js.map} +1 -1
  122. package/dist/chunks/{country.vSfTQW51.js → country.DJts6kCv.js} +5 -5
  123. package/dist/chunks/{country.vSfTQW51.js.map → country.DJts6kCv.js.map} +1 -1
  124. package/dist/chunks/{country.types.DaVCMxk-.js → country.types.BBQbWkTY.js} +3 -3
  125. package/dist/chunks/{country.types.DaVCMxk-.js.map → country.types.BBQbWkTY.js.map} +1 -1
  126. package/dist/chunks/{cross-circle-fill-small.Dv5-PxwF.js → cross-circle-fill-small.H1wH-vcZ.js} +5 -5
  127. package/dist/chunks/{cross-circle-fill-small.Dv5-PxwF.js.map → cross-circle-fill-small.H1wH-vcZ.js.map} +1 -1
  128. package/dist/chunks/{cross-circle-fill.CYLL7jfC.js → cross-circle-fill.BWCKKn0E.js} +4 -4
  129. package/dist/chunks/{cross-circle-fill.CYLL7jfC.js.map → cross-circle-fill.BWCKKn0E.js.map} +1 -1
  130. package/dist/chunks/{cross-small.n1UO5wNB.js → cross-small.Bjq2Gqvh.js} +5 -5
  131. package/dist/chunks/{cross-small.n1UO5wNB.js.map → cross-small.Bjq2Gqvh.js.map} +1 -1
  132. package/dist/chunks/{cross.B92GxFTY.js → cross.CCHdi6v3.js} +5 -5
  133. package/dist/chunks/{cross.B92GxFTY.js.map → cross.CCHdi6v3.js.map} +1 -1
  134. package/dist/chunks/{currency.DijmAkAB.js → currency.Afx8MVdY.js} +4 -4
  135. package/dist/chunks/{currency.DijmAkAB.js.map → currency.Afx8MVdY.js.map} +1 -1
  136. package/dist/chunks/{dashboard-section.D_k3_Z2T.js → dashboard-section.CIHtXoeW.js} +8 -8
  137. package/dist/chunks/{dashboard-section.D_k3_Z2T.js.map → dashboard-section.CIHtXoeW.js.map} +1 -1
  138. package/dist/chunks/{dashed-underline.B0z2ZZh7.js → dashed-underline.CLwPU-C2.js} +14 -14
  139. package/dist/chunks/{dashed-underline.B0z2ZZh7.js.map → dashed-underline.CLwPU-C2.js.map} +1 -1
  140. package/dist/chunks/{data-grid-template.DdIrvOXp.js → data-grid-template.BTpSfkQt.js} +8 -8
  141. package/dist/chunks/{data-grid-template.DdIrvOXp.js.map → data-grid-template.BTpSfkQt.js.map} +1 -1
  142. package/dist/chunks/data-grid-template.keys.VezYtHtM.js.map +1 -1
  143. package/dist/chunks/{data-grid.CqtJp9rE.js → data-grid.CXDdiHz8.js} +1239 -1236
  144. package/dist/chunks/data-grid.CXDdiHz8.js.map +1 -0
  145. package/dist/chunks/date-input.XSJuuCHe.js +20 -0
  146. package/dist/chunks/date-input.XSJuuCHe.js.map +1 -0
  147. package/dist/chunks/{date-picker.DGIwFh6T.js → date-picker.CvTSZhMI.js} +82 -81
  148. package/dist/chunks/date-picker.CvTSZhMI.js.map +1 -0
  149. package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
  150. package/dist/chunks/date-range-picker.BPCt7cwj.js +1100 -0
  151. package/dist/chunks/date-range-picker.BPCt7cwj.js.map +1 -0
  152. package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
  153. package/dist/chunks/{date.CL55prL0.js → date.BtB1HyWQ.js} +4 -4
  154. package/dist/chunks/{date.CL55prL0.js.map → date.BtB1HyWQ.js.map} +1 -1
  155. package/dist/chunks/de.DvtL0g75.js.map +1 -1
  156. package/dist/chunks/debounce.DUTu11PS.js.map +1 -1
  157. package/dist/chunks/delight.CDBAFnwC.js.map +1 -1
  158. package/dist/chunks/delight.xKDCvvaS.js.map +1 -1
  159. package/dist/chunks/dialog-page.B3ptLXXP.js +162 -0
  160. package/dist/chunks/dialog-page.B3ptLXXP.js.map +1 -0
  161. package/dist/chunks/{differenceInMonths.DcFDl4eH.js → differenceInMonths.BR4Z2HIa.js} +2 -2
  162. package/dist/chunks/{differenceInMonths.DcFDl4eH.js.map → differenceInMonths.BR4Z2HIa.js.map} +1 -1
  163. package/dist/chunks/{directive.Cbdox5VL.js → directive.rXUeDb8p.js} +2 -2
  164. package/dist/chunks/{directive.Cbdox5VL.js.map → directive.rXUeDb8p.js.map} +1 -1
  165. package/dist/chunks/{divider.Dho4_hQ7.js → divider.BIY84UH7.js} +5 -5
  166. package/dist/chunks/{divider.Dho4_hQ7.js.map → divider.BIY84UH7.js.map} +1 -1
  167. package/dist/chunks/{dot.ob6N-5Um.js → dot.DBmwmOUN.js} +5 -5
  168. package/dist/chunks/{dot.ob6N-5Um.js.map → dot.DBmwmOUN.js.map} +1 -1
  169. package/dist/chunks/{dropdown-default-textbox.DFtFMu5G.js → dropdown-default-textbox.B-_dTUVX.js} +107 -117
  170. package/dist/chunks/dropdown-default-textbox.B-_dTUVX.js.map +1 -0
  171. package/dist/chunks/{dropdown-tag.Bf6TiNZw.js → dropdown-tag.DDNOZhEG.js} +20 -20
  172. package/dist/chunks/{dropdown-tag.Bf6TiNZw.js.map → dropdown-tag.DDNOZhEG.js.map} +1 -1
  173. package/dist/chunks/dropdown.CU6nfq3V.js +836 -0
  174. package/dist/chunks/dropdown.CU6nfq3V.js.map +1 -0
  175. package/dist/chunks/{empty-state.D_ifpeU-.js → empty-state.DqdPzU-g.js} +15 -15
  176. package/dist/chunks/{empty-state.D_ifpeU-.js.map → empty-state.DqdPzU-g.js.map} +1 -1
  177. package/dist/chunks/en-GB.DCGuCmAv.js.map +1 -1
  178. package/dist/chunks/en-US.BZii9jNW.js.map +1 -1
  179. package/dist/chunks/{field-label.D7vU2Icm.js → error-message.BYA2_fPV.js} +67 -67
  180. package/dist/chunks/error-message.BYA2_fPV.js.map +1 -0
  181. package/dist/chunks/es.bz0mzkMq.js.map +1 -1
  182. package/dist/chunks/es6.C1DXQV6f.js.map +1 -1
  183. package/dist/chunks/events.BQOQSSb7.js.map +1 -1
  184. package/dist/chunks/{expand.C9IAqYYL.js → expand.BrywY9jl.js} +4 -4
  185. package/dist/chunks/{expand.C9IAqYYL.js.map → expand.BrywY9jl.js.map} +1 -1
  186. package/dist/chunks/{file-uploader.BmBKLzIx.js → file-uploader.Q2ufNRTY.js} +80 -80
  187. package/dist/chunks/file-uploader.Q2ufNRTY.js.map +1 -0
  188. package/dist/chunks/filter-bar.BVj9YVv-.js +4125 -0
  189. package/dist/chunks/filter-bar.BVj9YVv-.js.map +1 -0
  190. package/dist/chunks/fixed-scroller.i1tmEmst.js +161 -0
  191. package/dist/chunks/{fixed-scroller.e56yJp7Q.js.map → fixed-scroller.i1tmEmst.js.map} +1 -1
  192. package/dist/chunks/{focus-trap.BaHvK7aT.js → focus-trap.CBvh2H_m.js} +294 -277
  193. package/dist/chunks/focus-trap.CBvh2H_m.js.map +1 -0
  194. package/dist/chunks/{footer-actions.BqNvwVk7.js → footer-actions.DLzMOB7j.js} +8 -8
  195. package/dist/chunks/{footer-actions.BqNvwVk7.js.map → footer-actions.DLzMOB7j.js.map} +1 -1
  196. package/dist/chunks/form-field.D_2g7vaP.js.map +1 -1
  197. package/dist/chunks/{form-layout-title.CPsEzRzS.js → form-layout-title.DYmTc6M7.js} +7 -7
  198. package/dist/chunks/{form-layout-title.CPsEzRzS.js.map → form-layout-title.DYmTc6M7.js.map} +1 -1
  199. package/dist/chunks/form-layout.types.bZW9iR6_.js.map +1 -1
  200. package/dist/chunks/fr-CA.B1aPU8fp.js.map +1 -1
  201. package/dist/chunks/fr.Dj7wEToe.js.map +1 -1
  202. package/dist/chunks/generate-uid.NJ8tVoha.js.map +1 -1
  203. package/dist/chunks/getRoundingMethod.C3eaeGLR.js.map +1 -1
  204. package/dist/chunks/{getTimezoneOffsetInMilliseconds.C-aIpRfB.js → getTimezoneOffsetInMilliseconds.Tu2wlbTR.js} +3 -3
  205. package/dist/chunks/{getTimezoneOffsetInMilliseconds.C-aIpRfB.js.map → getTimezoneOffsetInMilliseconds.Tu2wlbTR.js.map} +1 -1
  206. package/dist/chunks/grab.DJYL4kBq.js +26 -0
  207. package/dist/chunks/grab.DJYL4kBq.js.map +1 -0
  208. package/dist/chunks/{grid-layout.DDaRNz4-.js → grid-layout.Vhv1_zFs.js} +21 -21
  209. package/dist/chunks/{grid-layout.DDaRNz4-.js.map → grid-layout.Vhv1_zFs.js.map} +1 -1
  210. package/dist/chunks/{header-meta.PysBmkSU.js → header-meta.Bw8ZGwJW.js} +15 -15
  211. package/dist/chunks/{header-meta.PysBmkSU.js.map → header-meta.Bw8ZGwJW.js.map} +1 -1
  212. package/dist/chunks/{header-with-views.XzJCg2Ln.js → header-with-views.CJDoE4hw.js} +617 -635
  213. package/dist/chunks/header-with-views.CJDoE4hw.js.map +1 -0
  214. package/dist/chunks/{header.yMTOq8MR.js → header.BeH8KH_l.js} +14 -14
  215. package/dist/chunks/{header.yMTOq8MR.js.map → header.BeH8KH_l.js.map} +1 -1
  216. package/dist/chunks/{image.vue_vue_type_script_setup_true_lang.DQT2oNEF.js → image.vue_vue_type_script_setup_true_lang.BMoSMeM-.js} +3 -3
  217. package/dist/chunks/{image.vue_vue_type_script_setup_true_lang.DQT2oNEF.js.map → image.vue_vue_type_script_setup_true_lang.BMoSMeM-.js.map} +1 -1
  218. package/dist/chunks/{index.pdBj0KQU.js → index.B875RXHM.js} +3 -3
  219. package/dist/chunks/{index.pdBj0KQU.js.map → index.B875RXHM.js.map} +1 -1
  220. package/dist/chunks/index.CbxHJr39.js +691 -0
  221. package/dist/chunks/{index.E60QniEu.js.map → index.CbxHJr39.js.map} +1 -1
  222. package/dist/chunks/{info-icon.BQDGteil.js → info-icon.BLtyJvY4.js} +9 -9
  223. package/dist/chunks/{info-icon.BQDGteil.js.map → info-icon.BLtyJvY4.js.map} +1 -1
  224. package/dist/chunks/{info.BKwey1HA.js → info.6Z6NxUst.js} +4 -4
  225. package/dist/chunks/{info.BKwey1HA.js.map → info.6Z6NxUst.js.map} +1 -1
  226. package/dist/chunks/{input-field-password.Drp3Gn3x.js → input-field-password.KeKQPIZv.js} +21 -21
  227. package/dist/chunks/{input-field-password.Drp3Gn3x.js.map → input-field-password.KeKQPIZv.js.map} +1 -1
  228. package/dist/chunks/{input-field-phone-number.CcCrGAZb.js → input-field-phone-number.eaU9p15A.js} +10 -10
  229. package/dist/chunks/{input-field-phone-number.CcCrGAZb.js.map → input-field-phone-number.eaU9p15A.js.map} +1 -1
  230. package/dist/chunks/{input-field.CBegTqdQ.js → input-field.CNdqlGw6.js} +9 -9
  231. package/dist/chunks/{input-field.CBegTqdQ.js.map → input-field.CNdqlGw6.js.map} +1 -1
  232. package/dist/chunks/{inspector.Dox76eqN.js → inspector.Bnf0g7QE.js} +16 -16
  233. package/dist/chunks/{inspector.Dox76eqN.js.map → inspector.Bnf0g7QE.js.map} +1 -1
  234. package/dist/chunks/inspector.types.DyHwE18g.js.map +1 -1
  235. package/dist/chunks/internal-error.BLZodVBE.js.map +1 -1
  236. package/dist/chunks/internal-error.BmrwJFpR.js.map +1 -1
  237. package/dist/chunks/isSameWeek.DjeUtLwI.js +14 -0
  238. package/dist/chunks/{isSameWeek.CUD7czUN.js.map → isSameWeek.DjeUtLwI.js.map} +1 -1
  239. package/dist/chunks/{it.Oaj6BklL.js → it.DIafuXtH.js} +2 -2
  240. package/dist/chunks/{it.Oaj6BklL.js.map → it.DIafuXtH.js.map} +1 -1
  241. package/dist/chunks/ja.Cm9tJMi2.js.map +1 -1
  242. package/dist/chunks/keyboard-navigation.DWmhelVv.js.map +1 -1
  243. package/dist/chunks/ko.Ceaof6EP.js.map +1 -1
  244. package/dist/chunks/{layout-row.CX8kV_w0.js → layout-row.Bz-mRqAq.js} +5 -5
  245. package/dist/chunks/layout-row.Bz-mRqAq.js.map +1 -0
  246. package/dist/chunks/{link.BLCQlEZU.js → link.DTCn2EtX.js} +11 -11
  247. package/dist/chunks/{link.BLCQlEZU.js.map → link.DTCn2EtX.js.map} +1 -1
  248. package/dist/chunks/{listbox-option-tag.BQZJF00q.js → listbox-option-tag.C3ihNg6_.js} +9 -9
  249. package/dist/chunks/{listbox-option-tag.BQZJF00q.js.map → listbox-option-tag.C3ihNg6_.js.map} +1 -1
  250. package/dist/chunks/{loading-indicator.Db794TT5.js → loading-indicator.BPol9I84.js} +3 -3
  251. package/dist/chunks/{loading-indicator.Db794TT5.js.map → loading-indicator.BPol9I84.js.map} +1 -1
  252. package/dist/chunks/match.CMBZxEs9.js.map +1 -1
  253. package/dist/chunks/{minus-small.DYIyF5XW.js → minus-small.CnYLTuSv.js} +5 -5
  254. package/dist/chunks/{minus-small.DYIyF5XW.js.map → minus-small.CnYLTuSv.js.map} +1 -1
  255. package/dist/chunks/{modal-fullscreen.BXjxVsAq.js → modal-fullscreen.B3AGUJgl.js} +100 -96
  256. package/dist/chunks/modal-fullscreen.B3AGUJgl.js.map +1 -0
  257. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.CRovU08l.js → modal.vue_vue_type_script_setup_true_lang.BAwez0nB.js} +13 -13
  258. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.CRovU08l.js.map → modal.vue_vue_type_script_setup_true_lang.BAwez0nB.js.map} +1 -1
  259. package/dist/chunks/nl.B6vCf2B9.js.map +1 -1
  260. package/dist/chunks/no-results-found.Bg_ZcEid.js.map +1 -1
  261. package/dist/chunks/no-results-found.BqvYsBR6.js.map +1 -1
  262. package/dist/chunks/notifications-cleared.BMZk37uf.js.map +1 -1
  263. package/dist/chunks/notifications-cleared.C7W9ZXY7.js.map +1 -1
  264. package/dist/chunks/on-click-outside.BW4rkhzG.js +91 -0
  265. package/dist/chunks/on-click-outside.BW4rkhzG.js.map +1 -0
  266. package/dist/chunks/page-not-found.COJLPVaU.js.map +1 -1
  267. package/dist/chunks/page-not-found.DWW6W-PZ.js.map +1 -1
  268. package/dist/chunks/{pagination.BofKoYTB.js → pagination.lu9nx8j8.js} +10 -10
  269. package/dist/chunks/{pagination.BofKoYTB.js.map → pagination.lu9nx8j8.js.map} +1 -1
  270. package/dist/chunks/{payment-method.BGEBaa4w.js → payment-method.AeKHZlAO.js} +3 -3
  271. package/dist/chunks/{payment-method.BGEBaa4w.js.map → payment-method.AeKHZlAO.js.map} +1 -1
  272. package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
  273. package/dist/chunks/planned-maintenance.C61sWB9h.js.map +1 -1
  274. package/dist/chunks/planned-maintenance.jmWYTdet.js.map +1 -1
  275. package/dist/chunks/popover.types.C_Z2JeVK.js +6 -0
  276. package/dist/chunks/{popover.types.DgfeurkF.js.map → popover.types.C_Z2JeVK.js.map} +1 -1
  277. package/dist/chunks/popper-container.BefZxTzP.js +1432 -0
  278. package/dist/chunks/popper-container.BefZxTzP.js.map +1 -0
  279. package/dist/chunks/{promo-banner.BIRH5sVX.js → promo-banner.BLie64oS.js} +11 -11
  280. package/dist/chunks/{promo-banner.BIRH5sVX.js.map → promo-banner.BLie64oS.js.map} +1 -1
  281. package/dist/chunks/pt-BR.CiGdfP45.js.map +1 -1
  282. package/dist/chunks/{radio-group.BqsQRDjs.js → radio-group.C6nQRQDB.js} +20 -20
  283. package/dist/chunks/{radio-group.BqsQRDjs.js.map → radio-group.C6nQRQDB.js.map} +1 -1
  284. package/dist/chunks/{radio-input.CBNE-AkM.js → radio-input.DektLjN4.js} +3 -3
  285. package/dist/chunks/{radio-input.CBNE-AkM.js.map → radio-input.DektLjN4.js.map} +1 -1
  286. package/dist/chunks/referrals.BvtT-kQS.js.map +1 -1
  287. package/dist/chunks/referrals.aX8WZigH.js.map +1 -1
  288. package/dist/chunks/{refresh.BB4ouvz_.js → refresh.C31KClfx.js} +5 -5
  289. package/dist/chunks/{refresh.BB4ouvz_.js.map → refresh.C31KClfx.js.map} +1 -1
  290. package/dist/chunks/resize.Bqks3WUm.js.map +1 -1
  291. package/dist/chunks/{rich-text-editor.Bafyvjc3.js → rich-text-editor.C39NKgl0.js} +11 -15
  292. package/dist/chunks/rich-text-editor.C39NKgl0.js.map +1 -0
  293. package/dist/chunks/{search-bar.DrkPxPDP.js → search-bar.CbTrg2Sk.js} +10 -10
  294. package/dist/chunks/{search-bar.DrkPxPDP.js.map → search-bar.CbTrg2Sk.js.map} +1 -1
  295. package/dist/chunks/{search.PczW-onY.js → search.ClLmZAgC.js} +4 -4
  296. package/dist/chunks/{search.PczW-onY.js.map → search.ClLmZAgC.js.map} +1 -1
  297. package/dist/chunks/{secondary-nav.C0_VfFa9.js → secondary-nav.DTOZQewf.js} +25 -25
  298. package/dist/chunks/secondary-nav.DTOZQewf.js.map +1 -0
  299. package/dist/chunks/{segmented-control.CFlHfj3N.js → segmented-control.D9rHBysM.js} +9 -9
  300. package/dist/chunks/{segmented-control.CFlHfj3N.js.map → segmented-control.D9rHBysM.js.map} +1 -1
  301. package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
  302. package/dist/chunks/{selection-card-group.DNPlEqEq.js → selection-card-group.KEsG0D5V.js} +9 -9
  303. package/dist/chunks/{selection-card-group.DNPlEqEq.js.map → selection-card-group.KEsG0D5V.js.map} +1 -1
  304. package/dist/chunks/{show.CT4Augxb.js → show.BreRPkgL.js} +6 -6
  305. package/dist/chunks/{show.CT4Augxb.js.map → show.BreRPkgL.js.map} +1 -1
  306. package/dist/chunks/{sidepanel.RJihFo_R.js → sidepanel.DJCagqzl.js} +73 -69
  307. package/dist/chunks/sidepanel.DJCagqzl.js.map +1 -0
  308. package/dist/chunks/{startOfWeek.Dxw2MhGp.js → startOfWeek.D8Yh4c0G.js} +3 -3
  309. package/dist/chunks/{startOfWeek.Dxw2MhGp.js.map → startOfWeek.D8Yh4c0G.js.map} +1 -1
  310. package/dist/chunks/{status.types.ChOI6XGU.js → status.types.D3v3k-Q8.js} +6 -6
  311. package/dist/chunks/{status.types.ChOI6XGU.js.map → status.types.D3v3k-Q8.js.map} +1 -1
  312. package/dist/chunks/{step.DpgnDx29.js → step.BV7MsrRF.js} +9 -9
  313. package/dist/chunks/{step.DpgnDx29.js.map → step.BV7MsrRF.js.map} +1 -1
  314. package/dist/chunks/{structured-list-item.B-hdp7rW.js → structured-list-item.f1tmHSEN.js} +9 -9
  315. package/dist/chunks/{structured-list-item.B-hdp7rW.js.map → structured-list-item.f1tmHSEN.js.map} +1 -1
  316. package/dist/chunks/success.DhioLvPD.js.map +1 -1
  317. package/dist/chunks/success.nNwxJRBS.js.map +1 -1
  318. package/dist/chunks/summary-grid.keys.Xx-W5a2w.js.map +1 -1
  319. package/dist/chunks/{summary-grid.types.BVLRSBAF.js → summary-grid.types.COcV-sOB.js} +13 -13
  320. package/dist/chunks/{summary-grid.types.BVLRSBAF.js.map → summary-grid.types.COcV-sOB.js.map} +1 -1
  321. package/dist/chunks/sv.f8EfZjMZ.js.map +1 -1
  322. package/dist/chunks/{tab.JPngc9oS.js → tab.DRrnMCxe.js} +6 -6
  323. package/dist/chunks/{tab.JPngc9oS.js.map → tab.DRrnMCxe.js.map} +1 -1
  324. package/dist/chunks/tabs.keys.B4qGhjp2.js.map +1 -1
  325. package/dist/chunks/{tag.DFJIvNLs.js → tag.Dr7MKe9q.js} +9 -9
  326. package/dist/chunks/{tag.DFJIvNLs.js.map → tag.Dr7MKe9q.js.map} +1 -1
  327. package/dist/chunks/{textarea.CEDkF8BB.js → textarea.CtgbUCjH.js} +7 -7
  328. package/dist/chunks/{textarea.CEDkF8BB.js.map → textarea.CtgbUCjH.js.map} +1 -1
  329. package/dist/chunks/{timeline-item.BxGaSGLf.js → timeline-item.D9nmCe6u.js} +41 -41
  330. package/dist/chunks/{timeline-item.BxGaSGLf.js.map → timeline-item.D9nmCe6u.js.map} +1 -1
  331. package/dist/chunks/{toast.DiIIrX7h.js → toast.Bbtq3Icj.js} +22 -22
  332. package/dist/chunks/{toast.DiIIrX7h.js.map → toast.Bbtq3Icj.js.map} +1 -1
  333. package/dist/chunks/{toggle.vl0ZwLhN.js → toggle.BupEBkIG.js} +6 -6
  334. package/dist/chunks/{toggle.vl0ZwLhN.js.map → toggle.BupEBkIG.js.map} +1 -1
  335. package/dist/chunks/{tooltip.Nn3o8_vO.js → tooltip.DYpJZ-99.js} +60 -60
  336. package/dist/chunks/tooltip.DYpJZ-99.js.map +1 -0
  337. package/dist/chunks/truncate.BfIl_-71.js.map +1 -1
  338. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CEfCLTsD.js → tutorial.vue_vue_type_script_setup_true_lang.B5hWgNSd.js} +32 -32
  339. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CEfCLTsD.js.map → tutorial.vue_vue_type_script_setup_true_lang.B5hWgNSd.js.map} +1 -1
  340. package/dist/chunks/{typography.6Oo5TOMP.js → typography.B3J6_tYk.js} +5 -5
  341. package/dist/chunks/{typography.6Oo5TOMP.js.map → typography.B3J6_tYk.js.map} +1 -1
  342. package/dist/chunks/upload-files.5wQwbfkp.js.map +1 -1
  343. package/dist/chunks/upload-files.jTQY6y2X.js.map +1 -1
  344. package/dist/chunks/{use-bento-toast-controller.V61h7XzI.js → use-bento-toast-controller.BFctDoMg.js} +2 -2
  345. package/dist/chunks/{use-bento-toast-controller.V61h7XzI.js.map → use-bento-toast-controller.BFctDoMg.js.map} +1 -1
  346. package/dist/chunks/{use-cached-selected-values.BZIa5TRx.js → use-cached-selected-values.BiSuG1eX.js} +28 -28
  347. package/dist/chunks/use-cached-selected-values.BiSuG1eX.js.map +1 -0
  348. package/dist/chunks/{use-country-items.JZCYNoW7.js → use-country-items.BTzByPdQ.js} +9 -9
  349. package/dist/chunks/{use-country-items.JZCYNoW7.js.map → use-country-items.BTzByPdQ.js.map} +1 -1
  350. package/dist/chunks/use-country-phon-code.Bui3zD6W.js.map +1 -1
  351. package/dist/chunks/use-default-slot-validator.O02rzsob.js.map +1 -1
  352. package/dist/chunks/use-expandable-content-height.GkjjbmPy.js.map +1 -1
  353. package/dist/chunks/use-form-layout-loading.CWbjZiwP.js.map +1 -1
  354. package/dist/chunks/use-has-slot.B7eQSabc.js.map +1 -1
  355. package/dist/chunks/utils.BzUwtTXc.js +21 -0
  356. package/dist/chunks/utils.BzUwtTXc.js.map +1 -0
  357. package/dist/chunks/{warning-filled.BMGD0G-_.js → warning-filled.BzyK_mMj.js} +5 -5
  358. package/dist/chunks/{warning-filled.BMGD0G-_.js.map → warning-filled.BzyK_mMj.js.map} +1 -1
  359. package/dist/chunks/wrong-environment.BOsyKdRI.js.map +1 -1
  360. package/dist/chunks/wrong-environment.BiHTPtbJ.js.map +1 -1
  361. package/dist/chunks/{zh-CN.BzH0fIXr.js → zh-CN.Bw_6j9Cd.js} +2 -2
  362. package/dist/chunks/{zh-CN.BzH0fIXr.js.map → zh-CN.Bw_6j9Cd.js.map} +1 -1
  363. package/dist/click-outside.js +1 -1
  364. package/dist/code-snippet.js +1 -1
  365. package/dist/country.js +2 -2
  366. package/dist/currency.js +1 -1
  367. package/dist/dashboard-template.js +1 -1
  368. package/dist/dashed-underline.js +1 -1
  369. package/dist/data-grid-template.js +1 -1
  370. package/dist/data-grid.js +6 -5
  371. package/dist/date-picker.js +2 -2
  372. package/dist/date-range-picker.js +2 -2
  373. package/dist/date.js +1 -1
  374. package/dist/divider.js +1 -1
  375. package/dist/draggable-handle.js +179 -0
  376. package/dist/draggable-handle.js.map +1 -0
  377. package/dist/dropdown.js +4 -4
  378. package/dist/empty-state.js +1 -1
  379. package/dist/file-uploader.js +1 -1
  380. package/dist/filter-bar.js +1 -1
  381. package/dist/focus-trap.js +1 -1
  382. package/dist/form-layout.js +1 -1
  383. package/dist/header-with-views.js +1 -1
  384. package/dist/header.js +1 -1
  385. package/dist/image.js +1 -1
  386. package/dist/index.js +341 -335
  387. package/dist/index.js.map +1 -1
  388. package/dist/info-icon.js +1 -1
  389. package/dist/input-field-password.js +1 -1
  390. package/dist/input-field-phone-number.js +1 -1
  391. package/dist/input-field.js +1 -1
  392. package/dist/inspector.js +1 -1
  393. package/dist/internal.js +42 -42
  394. package/dist/layout.js +1 -1
  395. package/dist/link.js +1 -1
  396. package/dist/loading-indicator.js +1 -1
  397. package/dist/menu.js +1 -1
  398. package/dist/modal-fullscreen.js +1 -1
  399. package/dist/modal.js +2 -2
  400. package/dist/pagination.js +1 -1
  401. package/dist/payment-method.js +1 -1
  402. package/dist/popover.js +2 -2
  403. package/dist/popper-container.js +1 -1
  404. package/dist/promo-banner.js +1 -1
  405. package/dist/radio-group.js +2 -2
  406. package/dist/rich-text-editor.js +1 -1
  407. package/dist/search-bar.js +2 -2
  408. package/dist/secondary-nav.js +1 -1
  409. package/dist/segmented-control.js +1 -1
  410. package/dist/selection-card.js +1 -1
  411. package/dist/sidepanel.js +1 -1
  412. package/dist/status.js +1 -1
  413. package/dist/stepper.js +1 -1
  414. package/dist/structured-list.js +1 -1
  415. package/dist/styles/bento-dark.css +5 -0
  416. package/dist/styles/bento-light.css +5 -0
  417. package/dist/styles/bento.css +5 -0
  418. package/dist/styles/legacy.css +5 -0
  419. package/dist/styles/styleguide.css +5 -0
  420. package/dist/summary-grid.js +1 -1
  421. package/dist/tabs.js +1 -1
  422. package/dist/tag.js +1 -1
  423. package/dist/textarea.js +1 -1
  424. package/dist/timeline.js +1 -1
  425. package/dist/toast.js +1 -1
  426. package/dist/toggle.js +1 -1
  427. package/dist/tutorial.js +1 -1
  428. package/dist/typography.js +1 -1
  429. package/dist/use-form-v4.js +756 -7787
  430. package/dist/use-form-v4.js.map +1 -1
  431. package/dist/web-types.json +1 -1
  432. package/package.json +6 -7
  433. package/dist/assets/field-label.css +0 -1
  434. package/dist/chunks/action-bar.CriH15oF.js +0 -204
  435. package/dist/chunks/action-bar.CriH15oF.js.map +0 -1
  436. package/dist/chunks/ai-button.CDRPf7IY.js +0 -93
  437. package/dist/chunks/ai-button.CDRPf7IY.js.map +0 -1
  438. package/dist/chunks/codemirror.Cy7iSLbd.js.map +0 -1
  439. package/dist/chunks/constructNow.DuaJst0D.js +0 -8
  440. package/dist/chunks/data-grid.CqtJp9rE.js.map +0 -1
  441. package/dist/chunks/date-input.BbZqj10S.js +0 -15
  442. package/dist/chunks/date-input.BbZqj10S.js.map +0 -1
  443. package/dist/chunks/date-picker.DGIwFh6T.js.map +0 -1
  444. package/dist/chunks/date-range-picker.Df9XyFMH.js +0 -1896
  445. package/dist/chunks/date-range-picker.Df9XyFMH.js.map +0 -1
  446. package/dist/chunks/dialog-page.DaZSlMzY.js +0 -181
  447. package/dist/chunks/dialog-page.DaZSlMzY.js.map +0 -1
  448. package/dist/chunks/dropdown-default-textbox.DFtFMu5G.js.map +0 -1
  449. package/dist/chunks/dropdown.Dct8gr_q.js +0 -837
  450. package/dist/chunks/dropdown.Dct8gr_q.js.map +0 -1
  451. package/dist/chunks/field-label.D7vU2Icm.js.map +0 -1
  452. package/dist/chunks/file-uploader.BmBKLzIx.js.map +0 -1
  453. package/dist/chunks/filter-bar.DHRuvmx9.js +0 -3363
  454. package/dist/chunks/filter-bar.DHRuvmx9.js.map +0 -1
  455. package/dist/chunks/fixed-scroller.e56yJp7Q.js +0 -155
  456. package/dist/chunks/focus-trap.BaHvK7aT.js.map +0 -1
  457. package/dist/chunks/header-with-views.XzJCg2Ln.js.map +0 -1
  458. package/dist/chunks/index.E60QniEu.js +0 -592
  459. package/dist/chunks/isSameWeek.CUD7czUN.js +0 -14
  460. package/dist/chunks/layout-row.CX8kV_w0.js.map +0 -1
  461. package/dist/chunks/modal-fullscreen.BXjxVsAq.js.map +0 -1
  462. package/dist/chunks/on-click-outside.D9aY9g8G.js +0 -101
  463. package/dist/chunks/on-click-outside.D9aY9g8G.js.map +0 -1
  464. package/dist/chunks/popover.types.DgfeurkF.js +0 -6
  465. package/dist/chunks/popper-container.I9gzp1NR.js +0 -1413
  466. package/dist/chunks/popper-container.I9gzp1NR.js.map +0 -1
  467. package/dist/chunks/rich-text-editor.Bafyvjc3.js.map +0 -1
  468. package/dist/chunks/secondary-nav.C0_VfFa9.js.map +0 -1
  469. package/dist/chunks/sidepanel.RJihFo_R.js.map +0 -1
  470. package/dist/chunks/tooltip.Nn3o8_vO.js.map +0 -1
  471. package/dist/chunks/use-cached-selected-values.BZIa5TRx.js.map +0 -1
@@ -0,0 +1,215 @@
1
+ import { defineComponent as V, ref as k, computed as h, watch as D, openBlock as g, createElementBlock as x, Fragment as K, renderList as L, createVNode as I, withKeys as C, withModifiers as T, normalizeClass as M, withCtx as w, createTextVNode as N, toDisplayString as R, watchEffect as H, toRef as O, createElementVNode as B, unref as b, renderSlot as W, createCommentVNode as j } from "vue";
2
+ import { f as z, d as U, u as J, g as Y, t as A, h as q, w as G } from "./index.CbxHJr39.js";
3
+ import { p as E, B as P } from "./typography.B3J6_tYk.js";
4
+ import { u as Q } from "./index.B875RXHM.js";
5
+ import { g as X } from "./generate-uid.NJ8tVoha.js";
6
+ import { u as y } from "./utils.BzUwtTXc.js";
7
+ import { F as Z } from "./fixed-scroller.i1tmEmst.js";
8
+ import { B as ee } from "./button.C6t9_lzm.js";
9
+ import { _ as $ } from "./_plugin-vue_export-helper.CHgC5LLL.js";
10
+ import "../assets/anchor-scroller.css";
11
+ const te = /* @__PURE__ */ V({
12
+ __name: "anchor-scroller-list",
13
+ props: {
14
+ activeIndex: { default: void 0 },
15
+ items: {},
16
+ scrollOffset: { default: void 0 }
17
+ },
18
+ setup(m) {
19
+ const s = m, c = k([]), r = h(
20
+ () => s.items.map((t, a) => ({ disabled: t.disabled, originalIndex: a })).filter(({ disabled: t }) => !t).map(({ originalIndex: t }) => t)
21
+ ), {
22
+ state: d,
23
+ next: f,
24
+ prev: u
25
+ } = z(r, {
26
+ initialValue: s.activeIndex ?? r.value[0]
27
+ });
28
+ D(d, async (t) => {
29
+ const a = c.value[t], n = y(a);
30
+ n && typeof n.focus == "function" && n.focus();
31
+ });
32
+ const l = (t, a) => {
33
+ if (a)
34
+ return;
35
+ const n = y(t);
36
+ if (!n) {
37
+ E("[bento-anchor-scroller] element ref not found");
38
+ return;
39
+ }
40
+ if (!n.style.scrollMarginTop && s.scrollOffset) {
41
+ const o = window.getComputedStyle(n).scrollMarginTop;
42
+ (o === "0px" || o === "") && (n.style.scrollMarginTop = `${s.scrollOffset}px`);
43
+ }
44
+ n.hasAttribute("tabindex") || n.setAttribute("tabindex", "-1"), n.scrollIntoView({
45
+ behavior: "smooth",
46
+ block: "start",
47
+ inline: "nearest"
48
+ }), n.focus({ preventScroll: !0 });
49
+ }, v = (t) => {
50
+ switch (t.key) {
51
+ case "ArrowRight":
52
+ t.preventDefault(), f();
53
+ break;
54
+ case "ArrowLeft":
55
+ t.preventDefault(), u();
56
+ break;
57
+ case "Home":
58
+ t.preventDefault(), d.value = 0;
59
+ break;
60
+ case "End":
61
+ t.preventDefault(), d.value = r.value.length - 1;
62
+ break;
63
+ }
64
+ };
65
+ return (t, a) => (g(), x("ul", {
66
+ class: "b-anchor-scroller-list",
67
+ onKeydown: v
68
+ }, [
69
+ (g(!0), x(K, null, L(t.items, ({ title: n, disabled: o, elementRef: p }, i) => (g(), x("li", {
70
+ key: i,
71
+ class: "b-anchor-scroller-list__item"
72
+ }, [
73
+ I(ee, {
74
+ ref_for: !0,
75
+ ref_key: "listItemRefs",
76
+ ref: c,
77
+ "aria-current": t.activeIndex === i ? "location" : null,
78
+ class: M(["b-anchor-scroller-list__item-button", {
79
+ "b-anchor-scroller-list__item-button--active": t.activeIndex === i,
80
+ "b-anchor-scroller-list__item-button--disabled": o
81
+ }]),
82
+ "aria-disabled": o,
83
+ tabindex: t.activeIndex === i ? null : "-1",
84
+ variant: "tertiary-with-background",
85
+ onClick: (e) => l(p, o),
86
+ onKeydown: [
87
+ C(T((e) => l(p, o), ["prevent"]), ["space", "native"]),
88
+ C(T((e) => l(p, o), ["prevent"]), ["enter", "native"])
89
+ ]
90
+ }, {
91
+ default: w(() => [
92
+ N(R(n), 1)
93
+ ]),
94
+ _: 2
95
+ }, 1032, ["aria-current", "class", "aria-disabled", "tabindex", "onClick", "onKeydown"])
96
+ ]))), 128))
97
+ ], 32));
98
+ }
99
+ }), ne = /* @__PURE__ */ $(te, [["__scopeId", "data-v-03d99bd8"]]), F = {
100
+ "en-US": {
101
+ jumpTo: "Jump to"
102
+ }
103
+ }, oe = (m, s) => {
104
+ var u;
105
+ const c = k(((u = s.default) == null ? void 0 : u.value) ?? -1), { y: r } = U(), { height: d } = J(), f = () => {
106
+ const l = A(m), v = d.value, t = v / 2;
107
+ let a = -1, n = 0;
108
+ for (let o = 0; o < l.length; o++) {
109
+ const i = l[o];
110
+ if (!i)
111
+ continue;
112
+ const e = i.getBoundingClientRect();
113
+ if (e.top > t)
114
+ continue;
115
+ const _ = Math.min(e.bottom, v) - Math.max(e.top, 0);
116
+ if (_ <= 0)
117
+ continue;
118
+ const S = _ / e.height;
119
+ S > n && (n = S, a = o);
120
+ }
121
+ a !== -1 && c.value !== a && (c.value = a);
122
+ };
123
+ return Y([r, d], f, { throttle: 100, trailing: !0 }), H(() => {
124
+ A(m).length && f();
125
+ }), {
126
+ activeIndex: c
127
+ };
128
+ }, ae = {
129
+ key: 0,
130
+ class: "b-anchor-scroller"
131
+ }, re = ["aria-labelledby"], ie = { class: "b-anchor-scroller__navigation-panel" }, le = {
132
+ i18n: { messages: F },
133
+ name: "bento-anchor-scroller"
134
+ }, se = /* @__PURE__ */ V({
135
+ ...le,
136
+ props: {
137
+ activeIndex: { default: void 0 },
138
+ items: {}
139
+ },
140
+ emits: ["update:active-index"],
141
+ setup(m, { emit: s }) {
142
+ const { t: c } = Q({ messages: F }), r = m, d = s, f = k(null), u = h(() => r.items.map((e) => ({ ...e }))), l = h(
143
+ () => r.items.map((e, _) => ({
144
+ element: y(e.elementRef),
145
+ originalIndex: _,
146
+ disabled: e.disabled
147
+ })).filter(
148
+ (e) => !e.disabled && !!e.element
149
+ )
150
+ ), v = h(() => l.value.map((e) => e.element)), t = h(() => ({
151
+ "b-anchor-scroller__navigation--pinned": o.value <= 1
152
+ })), a = h(() => {
153
+ const e = l.value[n.value];
154
+ return e ? e.originalIndex : 0;
155
+ }), { activeIndex: n } = oe(v, {
156
+ default: O(r, "activeIndex")
157
+ }), { top: o, bottom: p } = q(f);
158
+ G(
159
+ a,
160
+ (e) => {
161
+ Number.isFinite(e) && d("update:active-index", e);
162
+ },
163
+ {
164
+ debounce: 250
165
+ // ensure that if you are scrolling through multiple sections quickly, it fires only once.
166
+ }
167
+ ), D(
168
+ () => r.activeIndex,
169
+ (e) => {
170
+ Number.isFinite(e) && u.value[e].disabled && E("[bento-anchor-scroller] activeIndex should not be a disabled item");
171
+ }
172
+ );
173
+ const i = X("bento-anchor-scroller-label");
174
+ return (e, _) => u.value.length ? (g(), x("div", ae, [
175
+ B("nav", {
176
+ ref_key: "navigationRef",
177
+ ref: f,
178
+ class: M(["b-anchor-scroller__navigation", t.value]),
179
+ "aria-labelledby": b(i)
180
+ }, [
181
+ I(b(Z), {
182
+ condensed: "",
183
+ centered: ""
184
+ }, {
185
+ default: w(() => [
186
+ B("div", ie, [
187
+ I(P, {
188
+ id: b(i),
189
+ el: "span",
190
+ class: "b-anchor-scroller__navigation-panel-label",
191
+ stronger: ""
192
+ }, {
193
+ default: w(() => [
194
+ N(R(b(c)("jumpTo")), 1)
195
+ ]),
196
+ _: 1
197
+ }, 8, ["id"]),
198
+ I(b(ne), {
199
+ items: u.value,
200
+ "active-index": a.value,
201
+ "scroll-offset": b(p)
202
+ }, null, 8, ["items", "active-index", "scroll-offset"])
203
+ ])
204
+ ]),
205
+ _: 1
206
+ })
207
+ ], 10, re),
208
+ W(e.$slots, "default", {}, void 0, !0)
209
+ ])) : j("", !0);
210
+ }
211
+ }), _e = /* @__PURE__ */ $(se, [["__scopeId", "data-v-4628dbb5"]]);
212
+ export {
213
+ _e as a
214
+ };
215
+ //# sourceMappingURL=anchor-scroller.CKIQu3NK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anchor-scroller.CKIQu3NK.js","sources":["../../../vue2/src/components/anchor-scroller/components/anchor-scroller-list/anchor-scroller-list.vue","../../../vue2/src/components/anchor-scroller/composables/use-scroll-spy/use-scroll-spy.ts","../../../vue2/src/components/anchor-scroller/anchor-scroller.vue"],"sourcesContent":["<template>\n <ul class=\"b-anchor-scroller-list\" @keydown=\"onKeydownNavigation\">\n <li v-for=\"({ title, disabled, elementRef }, index) in items\" :key=\"index\" class=\"b-anchor-scroller-list__item\">\n <bento-button\n ref=\"listItemRefs\"\n :aria-current=\"activeIndex === index ? 'location' : null\"\n class=\"b-anchor-scroller-list__item-button\"\n :class=\"{\n 'b-anchor-scroller-list__item-button--active': activeIndex === index,\n 'b-anchor-scroller-list__item-button--disabled': disabled,\n }\"\n :aria-disabled=\"disabled\"\n :tabindex=\"activeIndex === index ? null : '-1'\"\n variant=\"tertiary-with-background\"\n @click=\"scrollToSection(elementRef, disabled)\"\n @keydown.space.native.prevent=\"scrollToSection(elementRef, disabled)\"\n @keydown.enter.native.prevent=\"scrollToSection(elementRef, disabled)\"\n >\n {{ title }}\n </bento-button>\n </li>\n </ul>\n</template>\n\n<script setup lang=\"ts\">\n import BentoButton from '@/components/button/button.vue';\n import { unrefElement } from '@/directives/click-outside/utils';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import { type BentoAnchorScrollerItem } from '../../anchor-scroller.types';\n import { type AnchorScrollerListProps } from './anchor-scroller-list.types';\n import { computed, ref, watch } from 'vue';\n import { useCycleList } from '@vueuse/core';\n\n const props = withDefaults(defineProps<AnchorScrollerListProps>(), {\n activeIndex: undefined,\n scrollOffset: undefined,\n });\n\n const listItemRefs = ref([]);\n const listIndices = computed(() =>\n props.items\n .map((item, index) => ({ disabled: item.disabled, originalIndex: index }))\n .filter(({ disabled }) => !disabled)\n .map(({ originalIndex }) => originalIndex)\n );\n\n const {\n state: focusedIndex,\n next,\n prev,\n } = useCycleList(listIndices, {\n initialValue: props.activeIndex ?? listIndices.value[0],\n });\n\n watch(focusedIndex, async newIndex => {\n const targetComponent = listItemRefs.value[newIndex];\n const el = unrefElement(targetComponent); // Handles Component or DOM node\n\n if (el && typeof el.focus === 'function') {\n el.focus();\n }\n });\n\n const scrollToSection = (elementRef: BentoAnchorScrollerItem['elementRef'], disabled?: boolean) => {\n if (disabled) {\n return;\n }\n\n const el = unrefElement(elementRef);\n\n if (!el) {\n printDevelopmentWarning(`[bento-anchor-scroller] element ref not found`);\n return;\n }\n\n if (!el.style.scrollMarginTop && props.scrollOffset) {\n const currentScrollMargin = window.getComputedStyle(el).scrollMarginTop;\n\n if (currentScrollMargin === '0px' || currentScrollMargin === '') {\n el.style.scrollMarginTop = `${props.scrollOffset}px`;\n }\n }\n\n if (!el.hasAttribute('tabindex')) {\n el.setAttribute('tabindex', '-1');\n }\n\n el.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n inline: 'nearest',\n });\n\n el.focus({ preventScroll: true });\n };\n\n const onKeydownNavigation = (e: KeyboardEvent) => {\n switch (e.key) {\n case 'ArrowRight':\n e.preventDefault();\n next();\n break;\n case 'ArrowLeft':\n e.preventDefault();\n prev();\n break;\n case 'Home':\n e.preventDefault();\n focusedIndex.value = 0;\n break;\n case 'End':\n e.preventDefault();\n focusedIndex.value = listIndices.value.length - 1;\n break;\n }\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./anchor-scroller-list.scss\" />\n","import { type Ref, ref, watchEffect } from 'vue';\nimport { type MaybeRef, toValue, useWindowScroll, useWindowSize, watchThrottled } from '@vueuse/core';\n\n/**\n * Options for the useScrollSpy composable.\n */\nexport interface useScrollSpyOptions {\n /**\n * The default active index to use when no item is active or initially.\n */\n default?: Ref<number>;\n}\n\n/**\n * Composable to spy on scroll position and determine the active item based on visibility.\n *\n * @param items - The list of elements to spy on.\n * @param options - Configuration options for the scroll spy.\n * @returns An object containing the active index.\n */\nexport const useScrollSpy = (items: MaybeRef<Array<Element>>, options: useScrollSpyOptions) => {\n const activeIndex = ref(options.default?.value ?? -1);\n\n const { y: scrollY } = useWindowScroll();\n const { height: windowHeight } = useWindowSize();\n\n // Logic to find the \"winner\" when there are multiple items on the same page\n const calculateActiveIndex = () => {\n const list = toValue(items);\n const viewportHeight = windowHeight.value;\n const midpoint = viewportHeight / 2;\n\n let winnerIndex = -1;\n let maxVisibleRatio = 0;\n\n for (let i = 0; i < list.length; i++) {\n const item = list[i];\n const el = item;\n\n if (!el) {\n continue;\n }\n\n const rect = el.getBoundingClientRect();\n\n // Constraint 1: Must pass midpoint\n if (rect.top > midpoint) {\n continue;\n }\n\n // Constraint 2: Must be visible\n const visibleHeight = Math.min(rect.bottom, viewportHeight) - Math.max(rect.top, 0);\n if (visibleHeight <= 0) {\n continue;\n }\n\n // Constraint 3: Highest visible % wins\n const ratio = visibleHeight / rect.height;\n\n if (ratio > maxVisibleRatio) {\n maxVisibleRatio = ratio;\n winnerIndex = i;\n }\n }\n\n // Only update if changed to avoid unnecessary patch triggers\n if (winnerIndex !== -1 && activeIndex.value !== winnerIndex) {\n activeIndex.value = winnerIndex;\n }\n };\n\n watchThrottled([scrollY, windowHeight], calculateActiveIndex, { throttle: 100, trailing: true });\n\n watchEffect(() => {\n if (toValue(items).length) {\n calculateActiveIndex();\n }\n });\n\n return {\n activeIndex,\n };\n};\n","<template>\n <div v-if=\"computedItems.length\" class=\"b-anchor-scroller\">\n <nav\n ref=\"navigationRef\"\n class=\"b-anchor-scroller__navigation\"\n :class=\"navigationConditionalClasses\"\n :aria-labelledby=\"navLabelId\"\n >\n <fixed-scroller condensed centered>\n <div class=\"b-anchor-scroller__navigation-panel\">\n <bento-typography\n :id=\"navLabelId\"\n el=\"span\"\n class=\"b-anchor-scroller__navigation-panel-label\"\n stronger\n >\n {{ t('jumpTo') }}\n </bento-typography>\n\n <anchor-scroller-list\n :items=\"computedItems\"\n :active-index=\"currentActiveIndex\"\n :scroll-offset=\"bottom\"\n />\n </div>\n </fixed-scroller>\n </nav>\n\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, toRef, watch } from 'vue';\n import { useElementBounding, watchDebounced } from '@vueuse/core';\n import BentoTypography from '@/components/typography/typography.vue';\n import { FixedScroller } from '@/internal';\n import { type BentoAnchorScrollerItem, type BentoAnchorScrollerProps } from './anchor-scroller.types';\n import { AnchorScrollerList } from './components/anchor-scroller-list';\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/core/utils/ts';\n import { unrefElement } from '@/directives/click-outside/utils';\n import messages from './messages.json';\n import { useScrollSpy } from './composables';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = withDefaults(defineProps<BentoAnchorScrollerProps>(), {\n activeIndex: undefined,\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when the active index is changed\n */\n (e: 'update:active-index', value: number): void;\n }>();\n\n const navigationRef = ref(null);\n\n const computedItems = computed<Array<BentoAnchorScrollerItem>>(() => props.items.map(item => ({ ...item })));\n\n // Skip and cache only items that are enabled\n const enabledItems = computed(() =>\n props.items\n .map((item, originalIndex) => ({\n element: unrefElement(item.elementRef),\n originalIndex,\n disabled: item.disabled,\n }))\n .filter(\n (item): item is { element: Element; originalIndex: number; disabled: boolean } =>\n !item.disabled && !!item.element\n )\n );\n\n // Extract strictly the elements for the ScrollSpy to watch\n const scrollToTargets = computed(() => enabledItems.value.map(c => c.element));\n\n const navigationConditionalClasses = computed(() => ({\n 'b-anchor-scroller__navigation--pinned': top.value <= 1,\n }));\n\n const currentActiveIndex = computed(() => {\n const candidate = enabledItems.value[relativeActiveIndex.value];\n\n return candidate ? candidate.originalIndex : 0;\n });\n\n const { activeIndex: relativeActiveIndex } = useScrollSpy(scrollToTargets, {\n default: toRef(props, 'activeIndex'),\n });\n\n const { top, bottom } = useElementBounding(navigationRef);\n\n watchDebounced(\n currentActiveIndex,\n val => {\n if (Number.isFinite(val)) {\n emit('update:active-index', val);\n }\n },\n {\n debounce: 250, // ensure that if you are scrolling through multiple sections quickly, it fires only once.\n }\n );\n\n watch(\n () => props.activeIndex,\n val => {\n if (Number.isFinite(val) && computedItems.value[val].disabled) {\n printDevelopmentWarning(`[bento-anchor-scroller] activeIndex should not be a disabled item`);\n }\n }\n );\n\n const navLabelId = generateUid('bento-anchor-scroller-label');\n</script>\n\n<script lang=\"ts\">\n /**\n * A navigation component that tracks page scroll and allows jumping to sections.\n *\n * @example\n * import { BentoAnchorScroller } from '@adyen/bento-vue2';\n * import { ref } from 'vue';\n *\n * export default {\n * components: { BentoAnchorScroller },\n * template: `\n * <bento-anchor-scroller :items=\"items\">\n * <section ref=\"section1\">Section 1</section>\n * <section ref=\"section2\">Section 2</section>\n * </bento-anchor-scroller>\n * `,\n * setup() {\n * const section1 = ref(null);\n * const section2 = ref(null);\n * const items = ref([\n * { title: 'Section 1', elementRef: section1 },\n * { title: 'Section 2', elementRef: section2 },\n * ]);\n * return {\n * items,\n * section1,\n * section2,\n * }\n * }\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-anchor-scroller',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./anchor-scroller.scss\" />\n"],"names":["props","__props","listItemRefs","ref","listIndices","computed","item","index","disabled","originalIndex","focusedIndex","next","prev","useCycleList","watch","newIndex","targetComponent","el","unrefElement","scrollToSection","elementRef","printDevelopmentWarning","currentScrollMargin","onKeydownNavigation","e","useScrollSpy","items","options","activeIndex","_a","scrollY","useWindowScroll","windowHeight","useWindowSize","calculateActiveIndex","list","toValue","viewportHeight","midpoint","winnerIndex","maxVisibleRatio","i","rect","visibleHeight","ratio","watchThrottled","watchEffect","__default__","messages","t","useI18n","emit","__emit","navigationRef","computedItems","enabledItems","scrollToTargets","c","navigationConditionalClasses","top","currentActiveIndex","candidate","relativeActiveIndex","toRef","bottom","useElementBounding","watchDebounced","val","navLabelId","generateUid"],"mappings":";;;;;;;;;;;;;;;;;;AAiCI,UAAAA,IAAAC,GAKAC,IAAAC,EAAA,CAAA,CAAA,GACAC,IAAAC;AAAA,MAAoB,MAAAL,EAAA,MAAA,IAAA,CAAAM,GAAAC,OAAA,EAAA,UAAAD,EAAA,UAAA,eAAAC,EAAA,EAAA,EAAA,OAAA,CAAA,EAAA,UAAAC,EAAA,MAAA,CAAAA,CAAA,EAAA,IAAA,CAAA,EAAA,eAAAC,EAAA,MAAAA,CAAA;AAAA,IAI6B,GAGjD;AAAA,MAAM,OAAAC;AAAA,MACK,MAAAC;AAAA,MACP,MAAAC;AAAA,IACA,IAAAC,EAAAT,GAAA;AAAA,MAC0B,cAAAJ,EAAA,eAAAI,EAAA,MAAA,CAAA;AAAA,IAC4B,CAAA;AAG1D,IAAAU,EAAAJ,GAAA,OAAAK,MAAA;AACI,YAAAC,IAAAd,EAAA,MAAAa,CAAA,GACAE,IAAAC,EAAAF,CAAA;AAEA,MAAAC,KAAA,OAAAA,EAAA,SAAA,cACIA,EAAA,MAAA;AAAA,IACJ,CAAA;AAGJ,UAAAE,IAAA,CAAAC,GAAAZ,MAAA;AACI,UAAAA;AACI;AAGJ,YAAAS,IAAAC,EAAAE,CAAA;AAEA,UAAA,CAAAH,GAAA;AACI,QAAAI,EAAA,+CAAA;AACA;AAAA,MAAA;AAGJ,UAAA,CAAAJ,EAAA,MAAA,mBAAAjB,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AAAA,IACK,EAAA,GAG1DC,IAAAvD,EAAA,MAAA;AACI,YAAAwD,IAAAN,EAAA,MAAAO,EAAA,KAAA;AAEA,aAAAD,IAAAA,EAAA,gBAAA;AAAA,IAA6C,CAAA,GAGjD,EAAA,aAAAC,EAAA,IAAArC,GAAA+B,GAAA;AAAA,MAA2E,SAAAO,EAAA/D,GAAA,aAAA;AAAA,IACpC,CAAA,GAGvC,EAAA,KAAA2D,GAAA,QAAAK,EAAA,IAAAC,EAAAZ,CAAA;AAEA,IAAAa;AAAA,MAAAN;AAAA,MACI,CAAAO,MAAA;AAEI,QAAA,OAAA,SAAAA,CAAA,KACIhB,EAAA,uBAAAgB,CAAA;AAAA,MACJ;AAAA,MACJ;AAAA,QACA,UAAA;AAAA;AAAA,MACc;AAAA,IACd,GAGJrD;AAAA,MAAA,MAAAd,EAAA;AAAA,MACgB,CAAAmE,MAAA;AAER,QAAA,OAAA,SAAAA,CAAA,KAAAb,EAAA,MAAAa,CAAA,EAAA,YACI9C,EAAA,mEAAA;AAAA,MACJ;AAAA,IACJ;AAGJ,UAAA+C,IAAAC,EAAA,6BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"aria-label.CaUURpnB.js","sources":["../../../vue2/src/utils/ts/aria-label.ts"],"sourcesContent":["import { computed, type ComputedRef, ref } from 'vue';\nimport { type MaybeRef } from '@/types/maybe-ref';\n\ninterface ariaLabelOptions {\n ariaLabel?: MaybeRef<string | null>;\n label?: MaybeRef<string | null>;\n defaultFallback?: MaybeRef<string | null>;\n}\n\n/**\n * Returns a valid aria-label for the element it's invoked for\n * @param ariaLabel - The aria label, which has to be set manually through the homonymous prop\n * @param label - Any other label provided, usually the component's main text\n * @param defaultFallback - The default fallback if no other value is provided\n * @returns {string | null} - A string corresponding to the aria label or null if no value is provided\n */\nexport const useAriaLabel = ({\n ariaLabel = null,\n label = null,\n defaultFallback = null,\n}: ariaLabelOptions): ComputedRef<string> => {\n const computedAriaLabel = ref(ariaLabel);\n const computedLabel = ref(label);\n const computedDefaultFallback = ref(defaultFallback);\n\n return computed(() => computedAriaLabel.value ?? computedLabel.value ?? computedDefaultFallback.value);\n};\n"],"names":["useAriaLabel","ariaLabel","label","defaultFallback","computedAriaLabel","ref","computedLabel","computedDefaultFallback","computed"],"mappings":";AAgBO,MAAMA,IAAe,CAAC;AAAA,EACzB,WAAAC,IAAY;AAAA,EACZ,OAAAC,IAAQ;AAAA,EACR,iBAAAC,IAAkB;AACtB,MAA6C;AACnC,QAAAC,IAAoBC,EAAIJ,CAAS,GACjCK,IAAgBD,EAAIH,CAAK,GACzBK,IAA0BF,EAAIF,CAAe;AAEnD,SAAOK,EAAS,MAAMJ,EAAkB,SAASE,EAAc,SAASC,EAAwB,KAAK;AACzG;"}
1
+ {"version":3,"file":"aria-label.CaUURpnB.js","sources":["../../../vue2/src/utils/ts/aria-label.ts"],"sourcesContent":["import { computed, type ComputedRef, ref } from 'vue';\nimport { type MaybeRef } from '@/types/maybe-ref';\n\ninterface ariaLabelOptions {\n ariaLabel?: MaybeRef<string | null>;\n label?: MaybeRef<string | null>;\n defaultFallback?: MaybeRef<string | null>;\n}\n\n/**\n * Returns a valid aria-label for the element it's invoked for\n * @param ariaLabel - The aria label, which has to be set manually through the homonymous prop\n * @param label - Any other label provided, usually the component's main text\n * @param defaultFallback - The default fallback if no other value is provided\n * @returns {string | null} - A string corresponding to the aria label or null if no value is provided\n */\nexport const useAriaLabel = ({\n ariaLabel = null,\n label = null,\n defaultFallback = null,\n}: ariaLabelOptions): ComputedRef<string> => {\n const computedAriaLabel = ref(ariaLabel);\n const computedLabel = ref(label);\n const computedDefaultFallback = ref(defaultFallback);\n\n return computed(() => computedAriaLabel.value ?? computedLabel.value ?? computedDefaultFallback.value);\n};\n"],"names":["useAriaLabel","ariaLabel","label","defaultFallback","computedAriaLabel","ref","computedLabel","computedDefaultFallback","computed"],"mappings":";AAgBO,MAAMA,IAAe,CAAC;AAAA,EACzB,WAAAC,IAAY;AAAA,EACZ,OAAAC,IAAQ;AAAA,EACR,iBAAAC,IAAkB;AACtB,MAA6C;AACzC,QAAMC,IAAoBC,EAAIJ,CAAS,GACjCK,IAAgBD,EAAIH,CAAK,GACzBK,IAA0BF,EAAIF,CAAe;AAEnD,SAAOK,EAAS,MAAMJ,EAAkB,SAASE,EAAc,SAASC,EAAwB,KAAK;AACzG;"}
@@ -0,0 +1,29 @@
1
+ /* empty css */
2
+ import { openBlock as o, createElementBlock as r, mergeProps as i, toDisplayString as n, createCommentVNode as l, createElementVNode as a } from "vue";
3
+ import { _ as p } from "./_plugin-vue_export-helper.CHgC5LLL.js";
4
+ let s = 0;
5
+ const m = {
6
+ beforeCreate() {
7
+ this.uuid = s.toString(), s += 1;
8
+ }
9
+ }, c = { key: 0 };
10
+ function d(t, e, f, g, u, L) {
11
+ return o(), r("svg", i({ role: "img" }, t.$attrs, {
12
+ class: "ui-assets-icons-16",
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ width: "16",
15
+ height: "16",
16
+ fill: "none"
17
+ }), [
18
+ t.$attrs["svg-title"] ? (o(), r("title", c, n(t.$attrs["svg-title"]), 1)) : l("", !0),
19
+ e[0] || (e[0] = a("path", {
20
+ fill: "#001222",
21
+ d: "M3.80655 7.25434L8.06077 3.00011L7.00011 1.93945L0.939453 8.00011L7.00011 14.0608L8.06077 13.0001L3.81499 8.75433L14.7508 8.74316L14.7492 7.24316L3.80655 7.25434Z"
22
+ }, null, -1))
23
+ ], 16);
24
+ }
25
+ const _ = /* @__PURE__ */ p(m, [["render", d]]);
26
+ export {
27
+ _ as A
28
+ };
29
+ //# sourceMappingURL=arrow-left.C6UiqO-c.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrow-left.C6UiqO-c.js","sources":["../../../ui-assets/icons-16/dist/vue/arrow-left.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M3.80655 7.25434L8.06077 3.00011L7.00011 1.93945L0.939453 8.00011L7.00011 14.0608L8.06077 13.0001L3.81499 8.75433L14.7508 8.74316L14.7492 7.24316L3.80655 7.25434Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n"],"names":["uuid","_sfc_main","_openBlock","_createElementBlock","_mergeProps","_ctx","_hoisted_1","_createCommentVNode","_createElementVNode"],"mappings":";;;AAOI,IAAIA,IAAO;AAEX,MAAKC,IAAU;AAAA,EACX,eAAe;AACX,SAAK,OAAOD,EAAK,SAAQ,GACzBA,KAAQ;AAAA,EACZ;SAbR,KAAA,EAAA;;AAEI,SAAAE,EAAA,GAAAC,EAAuY,OAAvYC,EAAuY,EAAlY,MAAK,MAAK,GAASC,EAAA,QAAM;AAAA,IAAE,OAAM;AAAA,IAAqB,OAAM;AAAA,IAA6B,OAAM;AAAA,IAAK,QAAO;AAAA,IAAK,MAAK;AAAA;IAAoBA,EAAA,OAAM,WAAA,UAAnBF,EAAmE,SAFxMG,KAE0KD,EAAA,OAAM,WAAA,CAAA,GAAA,CAAA,KAFhLE,EAAA,IAAA,EAAA;AAAA,oBAEwMC,EAA6L,QAAA;AAAA,MAAvL,MAAK;AAAA,MAAU,GAAE;AAAA;;;;"}
@@ -0,0 +1,29 @@
1
+ /* empty css */
2
+ import { openBlock as o, createElementBlock as r, mergeProps as i, toDisplayString as n, createCommentVNode as l, createElementVNode as a } from "vue";
3
+ import { _ as p } from "./_plugin-vue_export-helper.CHgC5LLL.js";
4
+ let s = 0;
5
+ const m = {
6
+ beforeCreate() {
7
+ this.uuid = s.toString(), s += 1;
8
+ }
9
+ }, c = { key: 0 };
10
+ function g(t, e, d, u, f, L) {
11
+ return o(), r("svg", i({ role: "img" }, t.$attrs, {
12
+ class: "ui-assets-icons-16",
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ width: "16",
15
+ height: "16",
16
+ fill: "none"
17
+ }), [
18
+ t.$attrs["svg-title"] ? (o(), r("title", c, n(t.$attrs["svg-title"]), 1)) : l("", !0),
19
+ e[0] || (e[0] = a("path", {
20
+ fill: "#001222",
21
+ d: "M12.1933 8.7454L7.93903 12.9996L8.99969 14.0603L15.0604 7.99963L8.99969 1.93896L7.93903 2.99963L12.1848 7.24541L1.24902 7.25658L1.25056 8.75658L12.1933 8.7454Z"
22
+ }, null, -1))
23
+ ], 16);
24
+ }
25
+ const _ = /* @__PURE__ */ p(m, [["render", g]]);
26
+ export {
27
+ _ as A
28
+ };
29
+ //# sourceMappingURL=arrow-right.fSdLV_ho.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrow-right.fSdLV_ho.js","sources":["../../../ui-assets/icons-16/dist/vue/arrow-right.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M12.1933 8.7454L7.93903 12.9996L8.99969 14.0603L15.0604 7.99963L8.99969 1.93896L7.93903 2.99963L12.1848 7.24541L1.24902 7.25658L1.25056 8.75658L12.1933 8.7454Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n"],"names":["uuid","_sfc_main","_openBlock","_createElementBlock","_mergeProps","_ctx","_hoisted_1","_createCommentVNode","_createElementVNode"],"mappings":";;;AAOI,IAAIA,IAAO;AAEX,MAAKC,IAAU;AAAA,EACX,eAAe;AACX,SAAK,OAAOD,EAAK,SAAQ,GACzBA,KAAQ;AAAA,EACZ;SAbR,KAAA,EAAA;;AAEI,SAAAE,EAAA,GAAAC,EAAoY,OAApYC,EAAoY,EAA/X,MAAK,MAAK,GAASC,EAAA,QAAM;AAAA,IAAE,OAAM;AAAA,IAAqB,OAAM;AAAA,IAA6B,OAAM;AAAA,IAAK,QAAO;AAAA,IAAK,MAAK;AAAA;IAAoBA,EAAA,OAAM,WAAA,UAAnBF,EAAmE,SAFxMG,KAE0KD,EAAA,OAAM,WAAA,CAAA,GAAA,CAAA,KAFhLE,EAAA,IAAA,EAAA;AAAA,oBAEwMC,EAA0L,QAAA;AAAA,MAApL,MAAK;AAAA,MAAU,GAAE;AAAA;;;;"}
@@ -0,0 +1,44 @@
1
+ /* empty css */
2
+ import { openBlock as s, createElementBlock as l, mergeProps as n, toDisplayString as r, createCommentVNode as a, createElementVNode as t } from "vue";
3
+ import { _ as u } from "./_plugin-vue_export-helper.CHgC5LLL.js";
4
+ let o = 0;
5
+ const d = {
6
+ beforeCreate() {
7
+ this.uuid = o.toString(), o += 1;
8
+ }
9
+ }, c = { key: 0 }, f = ["clip-path"], p = ["id"];
10
+ function _(i, e, g, m, h, V) {
11
+ return s(), l("svg", n({ role: "img" }, i.$attrs, {
12
+ class: "ui-assets-icons-16",
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ width: "16",
15
+ height: "16",
16
+ fill: "none"
17
+ }), [
18
+ i.$attrs["svg-title"] ? (s(), l("title", c, r(i.$attrs["svg-title"]), 1)) : a("", !0),
19
+ t("g", {
20
+ "clip-path": "url(#uia-ui-assets/icons-16-artificial_intelligence_ai_filled__a" + i.uuid + ")"
21
+ }, e[0] || (e[0] = [
22
+ t("path", {
23
+ fill: "#001222",
24
+ d: "M8.75 2.75C8.75 5.23579 10.7642 7.25 13.25 7.25H15.5V8.75H13.25C10.7642 8.75 8.75 10.7642 8.75 13.25V15.5H7.25V13.25C7.25 10.7642 5.23579 8.75 2.75 8.75H0.5V7.25H2.75C5.23579 7.25 7.25 5.23579 7.25 2.75V0.5H8.75V2.75Z"
25
+ }, null, -1)
26
+ ]), 8, f),
27
+ t("defs", null, [
28
+ t("clipPath", {
29
+ id: "uia-ui-assets/icons-16-artificial_intelligence_ai_filled__a" + i.uuid
30
+ }, e[1] || (e[1] = [
31
+ t("rect", {
32
+ width: "16",
33
+ height: "16",
34
+ fill: "#fff"
35
+ }, null, -1)
36
+ ]), 8, p)
37
+ ])
38
+ ], 16);
39
+ }
40
+ const H = /* @__PURE__ */ u(d, [["render", _]]);
41
+ export {
42
+ H as A
43
+ };
44
+ //# sourceMappingURL=artificial-intelligence-ai-filled.AhDHffzT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artificial-intelligence-ai-filled.AhDHffzT.js","sources":["../../../ui-assets/icons-16/dist/vue/artificial-intelligence-ai-filled.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><g :clip-path=\"'url(#uia-ui-assets/icons-16-artificial_intelligence_ai_filled__a' + uuid + ')'\"><path fill=\"#001222\" d=\"M8.75 2.75C8.75 5.23579 10.7642 7.25 13.25 7.25H15.5V8.75H13.25C10.7642 8.75 8.75 10.7642 8.75 13.25V15.5H7.25V13.25C7.25 10.7642 5.23579 8.75 2.75 8.75H0.5V7.25H2.75C5.23579 7.25 7.25 5.23579 7.25 2.75V0.5H8.75V2.75Z\"/></g><defs><clipPath :id=\"'uia-ui-assets/icons-16-artificial_intelligence_ai_filled__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n"],"names":["uuid","_sfc_main","_hoisted_2","_hoisted_3","_openBlock","_createElementBlock","_mergeProps","_ctx","_hoisted_1","_createCommentVNode","_createElementVNode"],"mappings":";;;AAOI,IAAIA,IAAO;AAEX,MAAKC,IAAU;AAAA,EACX,eAAe;AACX,SAAK,OAAOD,EAAK,SAAQ,GACzBA,KAAQ;AAAA,EACZ;SAbR,KAAA,EAAA,GAAAE,IAAA,CAAA,WAAA,GAAAC,IAAA,CAAA,IAAA;;AAEI,SAAAC,EAAA,GAAAC,EAAyrB,OAAzrBC,EAAyrB,EAAprB,MAAK,MAAK,GAASC,EAAA,QAAM;AAAA,IAAE,OAAM;AAAA,IAAqB,OAAM;AAAA,IAA6B,OAAM;AAAA,IAAK,QAAO;AAAA,IAAK,MAAK;AAAA;IAAoBA,EAAA,OAAM,WAAA,UAAnBF,EAAmE,SAFxMG,KAE0KD,EAAA,OAAM,WAAA,CAAA,GAAA,CAAA,KAFhLE,EAAA,IAAA,EAAA;AAAA,IAEwMC,EAAwV,KAAA;AAAA,MAApV,kFAAgFH,EAAA,OAAI;AAAA;MAAQG,EAAoP,QAAA;AAAA,QAA9O,MAAK;AAAA,QAAU,GAAE;AAAA;IAF/T,IAAA,GAAAR,CAAA;AAAA,IAEgiBQ,EAAuJ,QAAA,MAAA;AAAA,MAAjJA,EAA0I,YAAA;AAAA,QAA/H,oEAAoEH,EAAA;AAAA;QAAMG,EAA0C,QAAA;AAAA,UAApC,OAAM;AAAA,UAAK,QAAO;AAAA,UAAK,MAAK;AAAA;MAF7pB,IAAA,GAAAP,CAAA;AAAA;;;;"}
@@ -1,5 +1,5 @@
1
- import { ref as k, computed as r, defineComponent as _, toRefs as f, createElementBlock as d, openBlock as l, normalizeClass as R, createVNode as b, unref as n, withCtx as L, createTextVNode as y, toDisplayString as h, createBlock as B, createCommentVNode as S } from "vue";
2
- import { B as E } from "./typography.6Oo5TOMP.js";
1
+ import { ref as k, computed as r, defineComponent as _, toRefs as f, openBlock as l, createElementBlock as d, normalizeClass as R, createVNode as b, unref as n, withCtx as L, createTextVNode as y, toDisplayString as h, createBlock as B, createCommentVNode as S } from "vue";
2
+ import { B as E } from "./typography.B3J6_tYk.js";
3
3
  import { _ as g } from "./_plugin-vue_export-helper.CHgC5LLL.js";
4
4
  import "../assets/avatar.css";
5
5
  const O = (e) => {
@@ -92,4 +92,4 @@ const N = ["src"], U = {
92
92
  export {
93
93
  j as B
94
94
  };
95
- //# sourceMappingURL=avatar.CNGMjwg3.js.map
95
+ //# sourceMappingURL=avatar.Caeba-pw.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.CNGMjwg3.js","sources":["../../../vue2/src/composables/initials.ts","../../../vue2/src/components/avatar/components/avatar-image/avatar-image.types.ts","../../../vue2/src/components/avatar/components/avatar-image/avatar-image.vue","../../../vue2/src/components/avatar/avatar.vue"],"sourcesContent":["import { computed, type ComputedRef, ref } from 'vue';\nimport { type MaybeRef } from '@/types/refs';\n\n/** Extracts the first letter of a username\n * @param username - The name to return the initials of\n * Common patterns:\n * 1. John => J\n * 2. John Smith => J\n * John Smith Doe Holly => J\n */\nexport const useInitials = (username: MaybeRef<string | null>): ComputedRef<string | null> => {\n const computedUsername = ref(username);\n return computed(() => (computedUsername.value ? computedUsername.value.trim().charAt(0).toUpperCase() : null));\n};\n","export enum BentoAvatarImageVariant {\n LARGE = 'large',\n SMALL = 'small',\n}\n\nexport enum BentoAvatarImageColor {\n BLUE = 'blue',\n GREEN = 'green',\n RED = 'red',\n YELLOW = 'yellow',\n}\n","<template>\n <div class=\"b-avatar-image\" :class=\"conditionalClasses\" aria-hidden=\"true\" data-testid=\"avatar\">\n <img v-if=\"src\" :src=\"src\" class=\"b-avatar-image__image\" alt=\"\" data-testid=\"avatar-content\" />\n <div v-else class=\"b-avatar-image__default\" data-testid=\"avatar-content\">\n <bento-typography el=\"span\" variant=\"body\" strongest>\n {{ initials }}\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, toRefs } from 'vue';\n import { BentoAvatarImageColor, BentoAvatarImageVariant } from './avatar-image.types';\n import { BentoTypography } from '@/components/typography';\n import { useInitials } from '@/composables';\n\n const props = withDefaults(\n defineProps<{\n /**\n * Avatar color. Defaults to yellow.\n */\n color?: BentoAvatarImageColor;\n\n /**\n * Image src to load the profile picture.\n */\n src?: string;\n\n /**\n * Name of the user that will be used to extract initials to display default value.\n * John => J\n * John Smith => JS\n * John Smith Doe => JD\n * John Smith Doe Holly => JH\n */\n username?: string;\n\n /**\n * Variants supported for small and large.\n * Default - large\n */\n variant?: BentoAvatarImageVariant;\n }>(),\n {\n color: BentoAvatarImageColor.YELLOW,\n src: null,\n username: null,\n variant: BentoAvatarImageVariant.LARGE,\n }\n );\n\n const { username } = toRefs(props);\n const initials = useInitials(username);\n\n const conditionalClasses = computed(() => ({\n [`b-avatar-image--${BentoAvatarImageVariant.SMALL}`]: props.variant === BentoAvatarImageVariant.SMALL,\n [`b-avatar-image--${props.color}`]: props.color,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Image used as user profile inside bento-avatar.\n *\n * @example\n * import { AvatarImage } from './components/avatar-image';\n *\n * export default {\n * components: { AvatarImage },\n * template: `<avatar-image :src=\"userAvatarSrc\" username=\"Jane\" />`\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./avatar-image.scss\" />\n","<template>\n <div class=\"b-avatar\" :role=\"iconOnly ? 'img' : null\" :aria-label=\"computedAriaLabel\">\n <avatar-image\n :src=\"src\"\n :username=\"computedUsername\"\n :variant=\"BentoAvatarImageVariant.SMALL\"\n :color=\"avatarColor\"\n />\n <bento-typography v-if=\"!iconOnly\" class=\"b-avatar__label\" el=\"span\" variant=\"body\">\n {{ username }}\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, toRefs } from 'vue';\n import { AvatarImage, BentoAvatarImageColor, BentoAvatarImageVariant } from './components/avatar-image';\n import { BentoTypography } from '@/components/typography';\n import { useInitials } from '@/composables';\n\n const props = withDefaults(\n defineProps<{\n /**\n * Displays the user profile without the label.\n */\n iconOnly?: boolean;\n\n /**\n * Image src to load the profile picture.\n */\n src?: string;\n\n /**\n * Name of the user that will be used both in the label and to extract initials to display default value.\n * John => J\n * John Smith => JS\n * John Smith Doe => JD\n * John Smith Doe Holly => JH\n */\n username: string;\n }>(),\n {\n iconOnly: false,\n src: null,\n }\n );\n\n const { username } = toRefs(props);\n\n const computedAriaLabel = computed(() => (props.iconOnly ? props.username : null));\n const computedUsername = computed(() => (!props.src ? props.username : null));\n const initials = useInitials(username);\n\n // Returns the UTF-16 char code\n const charCode = computed(() => (initials.value ? initials.value.charCodeAt(0) - 65 : null));\n\n // Returns a computed color based on the letter passed\n const avatarColor = computed(() => {\n const numberOfAlphabetLetters = 26;\n const numberOfColors = Object.keys(BentoAvatarImageColor).length;\n const rangeStep = numberOfAlphabetLetters / numberOfColors;\n\n if (charCode.value <= rangeStep) {\n return BentoAvatarImageColor.YELLOW;\n }\n if (charCode.value <= rangeStep * 2) {\n return BentoAvatarImageColor.BLUE;\n }\n if (charCode.value <= rangeStep * 3) {\n return BentoAvatarImageColor.GREEN;\n }\n return BentoAvatarImageColor.RED;\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Displays an user profile including an avatar and optionally a label.\n *\n * @example\n * import { BentoAvatar } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAvatar },\n * template: `<bento-avatar :src=\"userAvatarSrc\" username=\"Jane\" />`\n * }\n */\n export default {\n name: 'bento-avatar',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./avatar.scss\" />\n"],"names":["useInitials","username","computedUsername","ref","computed","BentoAvatarImageVariant","BentoAvatarImageVariant2","BentoAvatarImageColor","BentoAvatarImageColor2","__default__$1","props","__props","toRefs","initials","conditionalClasses","__default__","computedAriaLabel","charCode","avatarColor","rangeStep"],"mappings":";;;;AAUa,MAAAA,IAAA,CAAAC,MAAA;AACT,QAAAC,IAAAC,EAAAF,CAAA;AACA,SAAAG,EAAA,MAAAF,EAAA,QAAAA,EAAA,MAAA,KAAA,EAAA,OA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pw.js","sources":["../../../vue2/src/composables/initials.ts","../../../vue2/src/components/avatar/components/avatar-image/avatar-image.types.ts","../../../vue2/src/components/avatar/components/avatar-image/avatar-image.vue","../../../vue2/src/components/avatar/avatar.vue"],"sourcesContent":["import { computed, type ComputedRef, ref } from 'vue';\nimport { type MaybeRef } from '@/types/refs';\n\n/** Extracts the first letter of a username\n * @param username - The name to return the initials of\n * Common patterns:\n * 1. John => J\n * 2. John Smith => J\n * John Smith Doe Holly => J\n */\nexport const useInitials = (username: MaybeRef<string | null>): ComputedRef<string | null> => {\n const computedUsername = ref(username);\n return computed(() => (computedUsername.value ? computedUsername.value.trim().charAt(0).toUpperCase() : null));\n};\n","export enum BentoAvatarImageVariant {\n LARGE = 'large',\n SMALL = 'small',\n}\n\nexport enum BentoAvatarImageColor {\n BLUE = 'blue',\n GREEN = 'green',\n RED = 'red',\n YELLOW = 'yellow',\n}\n","<template>\n <div class=\"b-avatar-image\" :class=\"conditionalClasses\" aria-hidden=\"true\" data-testid=\"avatar\">\n <img v-if=\"src\" :src=\"src\" class=\"b-avatar-image__image\" alt=\"\" data-testid=\"avatar-content\" />\n <div v-else class=\"b-avatar-image__default\" data-testid=\"avatar-content\">\n <bento-typography el=\"span\" variant=\"body\" strongest>\n {{ initials }}\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, toRefs } from 'vue';\n import { BentoAvatarImageColor, BentoAvatarImageVariant } from './avatar-image.types';\n import { BentoTypography } from '@/components/typography';\n import { useInitials } from '@/composables';\n\n const props = withDefaults(\n defineProps<{\n /**\n * Avatar color. Defaults to yellow.\n */\n color?: BentoAvatarImageColor;\n\n /**\n * Image src to load the profile picture.\n */\n src?: string;\n\n /**\n * Name of the user that will be used to extract initials to display default value.\n * John => J\n * John Smith => JS\n * John Smith Doe => JD\n * John Smith Doe Holly => JH\n */\n username?: string;\n\n /**\n * Variants supported for small and large.\n * Default - large\n */\n variant?: BentoAvatarImageVariant;\n }>(),\n {\n color: BentoAvatarImageColor.YELLOW,\n src: null,\n username: null,\n variant: BentoAvatarImageVariant.LARGE,\n }\n );\n\n const { username } = toRefs(props);\n const initials = useInitials(username);\n\n const conditionalClasses = computed(() => ({\n [`b-avatar-image--${BentoAvatarImageVariant.SMALL}`]: props.variant === BentoAvatarImageVariant.SMALL,\n [`b-avatar-image--${props.color}`]: props.color,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Image used as user profile inside bento-avatar.\n *\n * @example\n * import { AvatarImage } from './components/avatar-image';\n *\n * export default {\n * components: { AvatarImage },\n * template: `<avatar-image :src=\"userAvatarSrc\" username=\"Jane\" />`\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./avatar-image.scss\" />\n","<template>\n <div class=\"b-avatar\" :role=\"iconOnly ? 'img' : null\" :aria-label=\"computedAriaLabel\">\n <avatar-image\n :src=\"src\"\n :username=\"computedUsername\"\n :variant=\"BentoAvatarImageVariant.SMALL\"\n :color=\"avatarColor\"\n />\n <bento-typography v-if=\"!iconOnly\" class=\"b-avatar__label\" el=\"span\" variant=\"body\">\n {{ username }}\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, toRefs } from 'vue';\n import { AvatarImage, BentoAvatarImageColor, BentoAvatarImageVariant } from './components/avatar-image';\n import { BentoTypography } from '@/components/typography';\n import { useInitials } from '@/composables';\n\n const props = withDefaults(\n defineProps<{\n /**\n * Displays the user profile without the label.\n */\n iconOnly?: boolean;\n\n /**\n * Image src to load the profile picture.\n */\n src?: string;\n\n /**\n * Name of the user that will be used both in the label and to extract initials to display default value.\n * John => J\n * John Smith => JS\n * John Smith Doe => JD\n * John Smith Doe Holly => JH\n */\n username: string;\n }>(),\n {\n iconOnly: false,\n src: null,\n }\n );\n\n const { username } = toRefs(props);\n\n const computedAriaLabel = computed(() => (props.iconOnly ? props.username : null));\n const computedUsername = computed(() => (!props.src ? props.username : null));\n const initials = useInitials(username);\n\n // Returns the UTF-16 char code\n const charCode = computed(() => (initials.value ? initials.value.charCodeAt(0) - 65 : null));\n\n // Returns a computed color based on the letter passed\n const avatarColor = computed(() => {\n const numberOfAlphabetLetters = 26;\n const numberOfColors = Object.keys(BentoAvatarImageColor).length;\n const rangeStep = numberOfAlphabetLetters / numberOfColors;\n\n if (charCode.value <= rangeStep) {\n return BentoAvatarImageColor.YELLOW;\n }\n if (charCode.value <= rangeStep * 2) {\n return BentoAvatarImageColor.BLUE;\n }\n if (charCode.value <= rangeStep * 3) {\n return BentoAvatarImageColor.GREEN;\n }\n return BentoAvatarImageColor.RED;\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Displays an user profile including an avatar and optionally a label.\n *\n * @example\n * import { BentoAvatar } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAvatar },\n * template: `<bento-avatar :src=\"userAvatarSrc\" username=\"Jane\" />`\n * }\n */\n export default {\n name: 'bento-avatar',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./avatar.scss\" />\n"],"names":["useInitials","username","computedUsername","ref","computed","BentoAvatarImageVariant","BentoAvatarImageVariant2","BentoAvatarImageColor","BentoAvatarImageColor2","__default__$1","props","__props","toRefs","initials","conditionalClasses","__default__","computedAriaLabel","charCode","avatarColor","rangeStep"],"mappings":";;;;AAUO,MAAAA,IAAA,CAAAC,MAAA;AACH,QAAAC,IAAAC,EAAAF,CAAA;AACA,SAAAG,EAAA,MAAAF,EAAA,QAAAA,EAAA,MAAA,KAAA,EAAA,OAAA,CAAA,EAAA,YAAA,IAAA,IAAA;AACJ;ACbO,IAAAG,IAAA,kBAAAC,OACHA,EAAA,QAAA,SACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA,GAKLE,IAAA,kBAAAC,OACHA,EAAA,OAAA,QACAA,EAAA,QAAA,SACAA,EAAA,MAAA,OACAA,EAAA,SAAA,UAJQA,IAAAD,KAAA,CAAA,CAAA;;;;;GCoERE,IAAA,CAAA;;;;;;;;;;AAxDA,UAAAC,IAAAC,GAmCA,EAAA,UAAAV,EAAA,IAAAW,EAAAF,CAAA,GACAG,IAAAb,EAAAC,CAAA,GAEAa,IAAAV,EAAA,OAAA;AAAA,MAA2C,CAAA,mBAAAC,EAAA,KAAA,EAAA,GAAAK,EAAA,YAAAL,EAAA;AAAA,MACyD,CAAA,mBAAAK,EAAA,KAAA,EAAA,GAAAA,EAAA;AAAA,IACtD,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;8FC8B9CK,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;AArEA,UAAAL,IAAAC,GA2BA,EAAA,UAAAV,EAAA,IAAAW,EAAAF,CAAA,GAEAM,IAAAZ,EAAA,MAAAM,EAAA,WAAAA,EAAA,WAAA,IAAA,GACAR,IAAAE,EAAA,MAAAM,EAAA,MAAA,OAAAA,EAAA,QAAA,GACAG,IAAAb,EAAAC,CAAA,GAGAgB,IAAAb,EAAA,MAAAS,EAAA,QAAAA,EAAA,MAAA,WAAA,CAAA,IAAA,KAAA,IAAA,GAGAK,IAAAd,EAAA,MAAA;AAGI,YAAAe,IAAA,KADA,OAAA,KAAAZ,CAAA,EAAA;AAGA,aAAAU,EAAA,SAAAE,IACIZ,EAAA,SAEJU,EAAA,SAAAE,IAAA,IACIZ,EAAA,OAEJU,EAAA,SAAAE,IAAA,IACIZ,EAAA,QAEJA,EAAA;AAAA,IAA6B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
- import { defineComponent as B, computed as C, ref as m, resolveComponent as y, createElementBlock as l, openBlock as r, mergeProps as S, createCommentVNode as u, createBlock as k, renderSlot as d, withCtx as g } from "vue";
2
- import { B as h } from "./typography.6Oo5TOMP.js";
1
+ import { defineComponent as B, computed as C, ref as m, resolveComponent as y, openBlock as r, createElementBlock as l, mergeProps as S, renderSlot as u, createCommentVNode as d, createBlock as k, withCtx as g } from "vue";
2
+ import { B as h } from "./typography.B3J6_tYk.js";
3
3
  import { u as L } from "./use-has-slot.B7eQSabc.js";
4
4
  import { _ as $ } from "./_plugin-vue_export-helper.CHgC5LLL.js";
5
5
  import "../assets/base-button.css";
@@ -87,8 +87,8 @@ function U(t, e, s, b, c, f) {
87
87
  onBlur: e[2] || (e[2] = (...a) => t.onBlurButton && t.onBlurButton(...a))
88
88
  }), [
89
89
  t.hasSlot("iconLeft") ? (r(), l("span", F, [
90
- d(t.$slots, "iconLeft", {}, void 0, !0)
91
- ])) : u("", !0),
90
+ u(t.$slots, "iconLeft", {}, void 0, !0)
91
+ ])) : d("", !0),
92
92
  t.hasSlot("default") ? (r(), k(i, {
93
93
  key: 1,
94
94
  el: "span",
@@ -97,13 +97,13 @@ function U(t, e, s, b, c, f) {
97
97
  class: "b-base-button__label"
98
98
  }, {
99
99
  default: g(() => [
100
- d(t.$slots, "default", {}, void 0, !0)
100
+ u(t.$slots, "default", {}, void 0, !0)
101
101
  ]),
102
102
  _: 3
103
- })) : u("", !0),
103
+ })) : d("", !0),
104
104
  t.hasSlot("iconRight") ? (r(), l("span", I, [
105
- d(t.$slots, "iconRight", {}, void 0, !0)
106
- ])) : u("", !0)
105
+ u(t.$slots, "iconRight", {}, void 0, !0)
106
+ ])) : d("", !0)
107
107
  ], 16, R);
108
108
  }
109
109
  const T = /* @__PURE__ */ $(O, [["render", U], ["__scopeId", "data-v-cf942c5c"]]);
@@ -111,4 +111,4 @@ export {
111
111
  T as B,
112
112
  n as a
113
113
  };
114
- //# sourceMappingURL=base-button.CUd03aA2.js.map
114
+ //# sourceMappingURL=base-button.CRYAiuzn.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-button.CUd03aA2.js","sources":["../../../vue2/src/components/internal/base-button/base-button.types.ts","../../../vue2/src/components/internal/base-button/base-button.vue"],"sourcesContent":["export enum BentoBaseButtonPropClass {\n DESTRUCTIVE = 'critical',\n ICON_ONLY = 'icon-only',\n}\n\nexport enum BentoBaseButtonEvent {\n BLUR = 'blur',\n CLICK = 'click',\n FOCUS = 'focus',\n KEYDOWN_ESC = 'keydown.esc',\n}\n\nexport enum BaseButtonType {\n BUTTON = 'button',\n RESET = 'reset',\n SUBMIT = 'submit',\n}\n","<template>\n <button\n ref=\"bentoBaseButtonRef\"\n v-bind=\"$attrs\"\n class=\"b-base-button\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n :type=\"type\"\n :aria-expanded=\"ariaAttributes['aria-expanded']\"\n @click=\"onClickButton\"\n @focus=\"onFocusButton\"\n @blur=\"onBlurButton\"\n >\n <span v-if=\"hasSlot('iconLeft')\" class=\"b-base-button__icon-left\" data-testid=\"icon-button-left\">\n <slot name=\"iconLeft\" />\n </span>\n <bento-typography v-if=\"hasSlot('default')\" el=\"span\" variant=\"body\" stronger class=\"b-base-button__label\">\n <slot />\n </bento-typography>\n <span v-if=\"hasSlot('iconRight')\" class=\"b-base-button__icon-right\" data-testid=\"icon-button-right\">\n <slot name=\"iconRight\" />\n </span>\n </button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, ref } from 'vue';\n import { BentoBaseButtonEvent, BentoBaseButtonPropClass } from './base-button.types';\n import type { ButtonHTMLAttributes } from 'vue/types/jsx.d.ts';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import { type Booleanish } from '@/types/prop-types';\n\n /**\n * Base button component to use as a base for all the various types of bento buttons. For internal use only.\n *\n * * @example\n * import { BaseButton, BaseButtonEvent } from '@/components/internal/base-button';\n * import YourImportedIcon from @adyen/ui-assets-icons-16/example-icon';\n *\n * export default {\n * components: { BaseButton, YourImportedIcon },\n * props: {\n * text:\n * },\n * template: `\n * <base-button class=\"your-custom-button-styles\" @click=\"onClick\">\n * <template #iconLeft><your-imported-icon></template>\n * Button text\n * <template #iconRight><your-imported-icon></template>\n * </base-button>\n * `,\n * emits: [BentoButtonEvent.CLICK],\n * setup: (prps, { emit }) => {\n * const onClick = value => emit(BaseButtonEvent.CLICK, value);\n *\n * return {\n * onClick,\n * };\n * }\n * }\n */\n export default defineComponent({\n name: 'base-button',\n components: { BentoTypography },\n props: {\n /**\n * Disables button functionality\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays button as critical\n */\n critical: {\n type: Boolean,\n default: false,\n },\n /**\n * The default behavior of the button.\n * Possible values are: 'button', 'reset', 'submit'\n */\n type: {\n type: String as PropType<ButtonHTMLAttributes['type']>,\n default: 'button',\n },\n },\n emits: [\n BentoBaseButtonEvent.CLICK,\n BentoBaseButtonEvent.FOCUS,\n BentoBaseButtonEvent.BLUR,\n BentoBaseButtonEvent.KEYDOWN_ESC,\n ],\n setup(props, { slots, emit, attrs }) {\n const ariaAttributes = computed(() => ({\n 'aria-expanded': attrs['aria-expanded']?.toString() as Booleanish,\n }));\n\n const bentoBaseButtonRef = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-base-button--${BentoBaseButtonPropClass.DESTRUCTIVE}`]: props.critical,\n [`b-base-button--${BentoBaseButtonPropClass.ICON_ONLY}`]: !slots.default,\n }));\n\n const onClickButton = (e: MouseEvent) => {\n if (!props.disabled) {\n emit(BentoBaseButtonEvent.CLICK, e);\n } else {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n const onFocusButton = (e: FocusEvent) => {\n emit(BentoBaseButtonEvent.FOCUS, e);\n };\n\n const onBlurButton = (e: FocusEvent) => {\n emit(BentoBaseButtonEvent.BLUR, e);\n };\n\n return {\n // Values\n ariaAttributes,\n conditionalClasses,\n\n // Methods\n onClickButton,\n onFocusButton,\n onBlurButton,\n hasSlot: useHasSlot(slots),\n\n // Refs\n bentoBaseButtonRef,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./base-button.scss\" />\n"],"names":["BentoBaseButtonPropClass","BentoBaseButtonPropClass2","BentoBaseButtonEvent","BentoBaseButtonEvent2","_sfc_main","defineComponent","BentoTypography","props","slots","emit","attrs","ariaAttributes","computed","_a","bentoBaseButtonRef","ref","conditionalClasses","e","useHasSlot","_hoisted_1","openBlock","createElementBlock","mergeProps","_ctx","_cache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AAA;AAAA,IAAA,GAAA;AAAA;QAAAH,EAAAH,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,MAAA,CAAA;AAAA,MAAA,GAAA;AAAA,IAAA,CAAA,KAAAI,EAAA,IAAA,EAAA;AAAA,IAmBQJ,EAAA,QAAA,WAAA,KAAAH,EAAA,GAAAC,EAAA,QAAAS,GAAA;AAAA,MAnBRJ,EAAAH,EAAA,QAAA,aAAA,CAAA,GAAA,QAAA,EAAA;AAAA,IAAA,CAAA,KAAAI,EAAA,IAAA,EAAA;AAAA;;;"}
1
+ {"version":3,"file":"base-button.CRYAiuzn.js","sources":["../../../vue2/src/components/internal/base-button/base-button.types.ts","../../../vue2/src/components/internal/base-button/base-button.vue"],"sourcesContent":["export enum BentoBaseButtonPropClass {\n DESTRUCTIVE = 'critical',\n ICON_ONLY = 'icon-only',\n}\n\nexport enum BentoBaseButtonEvent {\n BLUR = 'blur',\n CLICK = 'click',\n FOCUS = 'focus',\n KEYDOWN_ESC = 'keydown.esc',\n}\n\nexport enum BaseButtonType {\n BUTTON = 'button',\n RESET = 'reset',\n SUBMIT = 'submit',\n}\n","<template>\n <button\n ref=\"bentoBaseButtonRef\"\n v-bind=\"$attrs\"\n class=\"b-base-button\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n :type=\"type\"\n :aria-expanded=\"ariaAttributes['aria-expanded']\"\n @click=\"onClickButton\"\n @focus=\"onFocusButton\"\n @blur=\"onBlurButton\"\n >\n <span v-if=\"hasSlot('iconLeft')\" class=\"b-base-button__icon-left\" data-testid=\"icon-button-left\">\n <slot name=\"iconLeft\" />\n </span>\n <bento-typography v-if=\"hasSlot('default')\" el=\"span\" variant=\"body\" stronger class=\"b-base-button__label\">\n <slot />\n </bento-typography>\n <span v-if=\"hasSlot('iconRight')\" class=\"b-base-button__icon-right\" data-testid=\"icon-button-right\">\n <slot name=\"iconRight\" />\n </span>\n </button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, ref } from 'vue';\n import { BentoBaseButtonEvent, BentoBaseButtonPropClass } from './base-button.types';\n import type { ButtonHTMLAttributes } from 'vue/types/jsx.d.ts';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import { type Booleanish } from '@/types/prop-types';\n\n /**\n * Base button component to use as a base for all the various types of bento buttons. For internal use only.\n *\n * * @example\n * import { BaseButton, BaseButtonEvent } from '@/components/internal/base-button';\n * import YourImportedIcon from @adyen/ui-assets-icons-16/example-icon';\n *\n * export default {\n * components: { BaseButton, YourImportedIcon },\n * props: {\n * text:\n * },\n * template: `\n * <base-button class=\"your-custom-button-styles\" @click=\"onClick\">\n * <template #iconLeft><your-imported-icon></template>\n * Button text\n * <template #iconRight><your-imported-icon></template>\n * </base-button>\n * `,\n * emits: [BentoButtonEvent.CLICK],\n * setup: (prps, { emit }) => {\n * const onClick = value => emit(BaseButtonEvent.CLICK, value);\n *\n * return {\n * onClick,\n * };\n * }\n * }\n */\n export default defineComponent({\n name: 'base-button',\n components: { BentoTypography },\n props: {\n /**\n * Disables button functionality\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays button as critical\n */\n critical: {\n type: Boolean,\n default: false,\n },\n /**\n * The default behavior of the button.\n * Possible values are: 'button', 'reset', 'submit'\n */\n type: {\n type: String as PropType<ButtonHTMLAttributes['type']>,\n default: 'button',\n },\n },\n emits: [\n BentoBaseButtonEvent.CLICK,\n BentoBaseButtonEvent.FOCUS,\n BentoBaseButtonEvent.BLUR,\n BentoBaseButtonEvent.KEYDOWN_ESC,\n ],\n setup(props, { slots, emit, attrs }) {\n const ariaAttributes = computed(() => ({\n 'aria-expanded': attrs['aria-expanded']?.toString() as Booleanish,\n }));\n\n const bentoBaseButtonRef = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-base-button--${BentoBaseButtonPropClass.DESTRUCTIVE}`]: props.critical,\n [`b-base-button--${BentoBaseButtonPropClass.ICON_ONLY}`]: !slots.default,\n }));\n\n const onClickButton = (e: MouseEvent) => {\n if (!props.disabled) {\n emit(BentoBaseButtonEvent.CLICK, e);\n } else {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n const onFocusButton = (e: FocusEvent) => {\n emit(BentoBaseButtonEvent.FOCUS, e);\n };\n\n const onBlurButton = (e: FocusEvent) => {\n emit(BentoBaseButtonEvent.BLUR, e);\n };\n\n return {\n // Values\n ariaAttributes,\n conditionalClasses,\n\n // Methods\n onClickButton,\n onFocusButton,\n onBlurButton,\n hasSlot: useHasSlot(slots),\n\n // Refs\n bentoBaseButtonRef,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./base-button.scss\" />\n"],"names":["BentoBaseButtonPropClass","BentoBaseButtonPropClass2","BentoBaseButtonEvent","BentoBaseButtonEvent2","_sfc_main","defineComponent","BentoTypography","props","slots","emit","attrs","ariaAttributes","computed","_a","bentoBaseButtonRef","ref","conditionalClasses","e","useHasSlot","_hoisted_1","openBlock","createElementBlock","mergeProps","_ctx","_cache","args","renderSlot","createCommentVNode","createBlock","_component_bento_typography","_hoisted_3"],"mappings":";;;;;AAAO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,cAAA,YACAA,EAAA,YAAA,aAFQA,IAAAD,KAAA,CAAA,CAAA,GAKLE,IAAA,kBAAAC,OACHA,EAAA,OAAA,QACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SACAA,EAAA,cAAA,eAJQA,IAAAD,KAAA,CAAA,CAAA;ACyDR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACwB,OAAA;AAAA;AAAA;AAAA;AAAA,IACvB,UAAA;AAAA,MAIO,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,UAAA;AAAA,MAIU,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA;AAAA,IACb,MAAA;AAAA,MAKM,MAAA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AA,CAAA,iBAAAA,EAAA,kBAAA;AAAA,IACR,UAAAA,EAAA;AAAA,IACG,MAAAA,EAAA;AAAA,IACR,iBAAAA,EAAA,eAAA,eAAA;AAAA,IACE,SAAAC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAAC,MAAAF,EAAA,iBAAAA,EAAA,cAAA,GAAAE,CAAA;AAAA,IACW,SAAAD,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAAC,MAAAF,EAAA,iBAAAA,EAAA,cAAA,GAAAE,CAAA;AAAA;EAEA,CAAA,GAAA;AAAA;MAb3BC,EAAAH,EAAA,QAAA,YAAA,CAAA,GAAA,QAAA,EAAA;AAAA,IAAA,CAAA,KAAAI,EAAA,IAAA,EAAA;AAAA,IAkB2BJ,EAAA,QAAA,SAAA,KAAAH,EAAA,GAAAQ,EAAAC,GAAA;AAAA,MAFkC,KAAA;AAAA,MAAC,IAAA;AAAA,MAAe,SAAA;AAAA,MAAe,UAAA;AAAA,MAhB5F,OAAA;AAAA,IAAA,GAAA;AAAA;QAAAH,EAAAH,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,MAAA,CAAA;AAAA,MAAA,GAAA;AAAA,IAAA,CAAA,KAAAI,EAAA,IAAA,EAAA;AAAA,IAmBQJ,EAAA,QAAA,WAAA,KAAAH,EAAA,GAAAC,EAAA,QAAAS,GAAA;AAAA,MAnBRJ,EAAAH,EAAA,QAAA,aAAA,CAAA,GAAA,QAAA,EAAA;AAAA,IAAA,CAAA,KAAAI,EAAA,IAAA,EAAA;AAAA;;;"}
@@ -1,17 +1,17 @@
1
- import { defineComponent as $, useSlots as ee, ref as g, computed as d, inject as ce, watch as Y, nextTick as re, onUnmounted as me, createBlock as P, openBlock as A, normalizeClass as J, createSlots as te, withCtx as l, createElementVNode as h, normalizeStyle as O, createCommentVNode as w, unref as t, renderSlot as c, createVNode as j, useAttrs as ge, toRefs as ve, onMounted as pe, provide as G, createElementBlock as fe, withKeys as _e, withDirectives as ye } from "vue";
2
- import { B as be } from "./button.CSp48LJt.js";
3
- import { B as Le } from "./focus-trap.BaHvK7aT.js";
1
+ import { defineComponent as $, useSlots as ee, ref as g, computed as d, inject as ce, watch as Y, nextTick as re, onUnmounted as me, openBlock as A, createBlock as P, normalizeClass as J, createSlots as te, withCtx as l, createElementVNode as h, normalizeStyle as O, unref as t, renderSlot as c, createCommentVNode as w, createVNode as j, useAttrs as ge, onMounted as ve, provide as G, toRefs as pe, createElementBlock as fe, withKeys as _e, withDirectives as ye } from "vue";
2
+ import { B as be } from "./button.C6t9_lzm.js";
3
+ import { B as Le } from "./focus-trap.CBvh2H_m.js";
4
4
  import { u as ae } from "./use-has-slot.B7eQSabc.js";
5
- import { u as he } from "./index.pdBj0KQU.js";
6
- import { j as Ae } from "./button-actions.Crj4QFAd.js";
5
+ import { u as he } from "./index.B875RXHM.js";
6
+ import { j as Ae } from "./button-actions.BH-J7dux.js";
7
7
  import { g as Ce } from "./generate-uid.NJ8tVoha.js";
8
- import { B as Ee } from "./directive.Cbdox5VL.js";
9
- import { C as Ie } from "./cross.B92GxFTY.js";
10
- import { D as Oe, B as Pe, b as Se, a as ke } from "./dialog-page.DaZSlMzY.js";
11
- import { B as x } from "./typography.6Oo5TOMP.js";
12
- import { F as De } from "./footer-actions.BqNvwVk7.js";
8
+ import { B as Ee } from "./directive.rXUeDb8p.js";
9
+ import { C as Ie } from "./cross.CCHdi6v3.js";
10
+ import { b as Oe, B as Pe, D as Se, a as ke } from "./dialog-page.B3ptLXXP.js";
11
+ import { B as x } from "./typography.B3J6_tYk.js";
12
+ import { F as De } from "./footer-actions.DLzMOB7j.js";
13
13
  import { o as Be } from "./resize.Bqks3WUm.js";
14
- import { G as Te, a as Ne } from "./grid-layout.DDaRNz4-.js";
14
+ import { G as Te, a as Ne } from "./grid-layout.Vhv1_zFs.js";
15
15
  import { _ as oe } from "./_plugin-vue_export-helper.CHgC5LLL.js";
16
16
  import "../assets/base-modal.css";
17
17
  var Ge = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.DIALOG = "dialog", e))(Ge || {}), we = /* @__PURE__ */ ((e) => (e.DEFAULT = "BentoModalDefault", e.DIALOG = "BentoModalDialog", e))(we || {}), R = /* @__PURE__ */ ((e) => (e.SMALL = "small", e.MEDIUM = "medium", e.LARGE = "large", e))(R || {}), D = /* @__PURE__ */ ((e) => (e.SMALLER = "smaller", e.EQUAL = "equal", e.BIGGER = "bigger", e))(D || {}), q = /* @__PURE__ */ ((e) => (e.DIALOG = "dialog", e.ALERT_DIALOG = "alertdialog", e))(q || {}), Re = /* @__PURE__ */ ((e) => (e.CONFIRMATION = "confirmation", e.DESTRUCTIVE = "destructive", e.INFO = "info", e.ACKNOWLEDGEMENT = "acknowledgement", e))(Re || {}), $e = /* @__PURE__ */ ((e) => (e.CLOSE_MODAL = "close-modal", e))($e || {});
@@ -295,7 +295,7 @@ const ne = {
295
295
  }, a = () => {
296
296
  b("close-modal");
297
297
  }, r = () => {
298
- y.value && (i.value.close(), I.value[0] && b("update:active-page", I.value[0]), I.value = [], y.value = !1, a());
298
+ y.value && i.value && (i.value.close(), I.value[0] && b("update:active-page", I.value[0]), I.value = [], y.value = !1, a());
299
299
  }, m = () => {
300
300
  i.value.open && (y.value = !0);
301
301
  }, v = (o) => {
@@ -322,12 +322,12 @@ const ne = {
322
322
  ((p = (o = n.actions) == null ? void 0 : o[0]) == null ? void 0 : p.state) === "success" && setTimeout(m, 500);
323
323
  },
324
324
  { deep: !0 }
325
- ), pe(() => {
325
+ ), ve(() => {
326
326
  n.isOpen && i.value && L();
327
327
  }), W({
328
328
  internalModalActionClose: v
329
329
  }), G(Ae, B);
330
- const { activePage: E, isOpen: Q, size: V } = ve(n), le = g(Pe.TRANSITION_LEVEL_DEEPER), N = g([]), I = g([]), ie = (o) => b("update:active-page", o), ue = (o) => () => {
330
+ const { activePage: E, isOpen: Q, size: V } = pe(n), le = g(Pe.TRANSITION_LEVEL_DEEPER), N = g([]), I = g([]), ie = (o) => b("update:active-page", o), ue = (o) => () => {
331
331
  var p;
332
332
  N.value = (p = N.value) == null ? void 0 : p.filter((H) => H !== o);
333
333
  }, de = (o) => (o && N.value.push(o), { unregisterPage: ue(o) }), X = g(""), Z = g(!1);
@@ -428,16 +428,16 @@ const ne = {
428
428
  ], 46, Ye)
429
429
  ]));
430
430
  }
431
- }), dt = /* @__PURE__ */ oe(je, [["__scopeId", "data-v-05abca1c"]]);
431
+ }), dt = /* @__PURE__ */ oe(je, [["__scopeId", "data-v-8f2a75a1"]]);
432
432
  export {
433
- Ge as B,
434
- we as a,
435
- R as b,
436
- D as c,
433
+ D as B,
434
+ Re as a,
435
+ $e as b,
436
+ Ke as c,
437
437
  q as d,
438
- Re as e,
439
- $e as f,
440
- Ke as g,
438
+ R as e,
439
+ Ge as f,
440
+ we as g,
441
441
  dt as h
442
442
  };
443
- //# sourceMappingURL=base-modal.D3GyeCFT.js.map
443
+ //# sourceMappingURL=base-modal.D5HrjwL1.js.map