@adyen/bento-vue2 1.83.0 → 1.84.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 (408) hide show
  1. package/README.md +5 -5
  2. package/dist/@types/index.d.ts +1299 -1235
  3. package/dist/action-bar.js +1 -1
  4. package/dist/alert.js +1 -1
  5. package/dist/assets/accordion-item.css +1 -1
  6. package/dist/assets/action-bar.css +1 -1
  7. package/dist/assets/ai-button.css +1 -1
  8. package/dist/assets/alert.css +1 -1
  9. package/dist/assets/avatar.css +1 -1
  10. package/dist/assets/base-modal.css +1 -1
  11. package/dist/assets/button-actions-with-menu.css +1 -1
  12. package/dist/assets/button-actions.css +1 -1
  13. package/dist/assets/button.css +1 -1
  14. package/dist/assets/calendar.css +1 -1
  15. package/dist/assets/card.css +1 -1
  16. package/dist/assets/checkbox-group.css +1 -1
  17. package/dist/assets/checkbox-input.css +1 -1
  18. package/dist/assets/checkbox.css +1 -1
  19. package/dist/assets/chip.css +1 -1
  20. package/dist/assets/code-snippet.css +1 -1
  21. package/dist/assets/controls-group.css +1 -1
  22. package/dist/assets/country.css +1 -1
  23. package/dist/assets/currency.css +1 -1
  24. package/dist/assets/dashboard-section.css +1 -1
  25. package/dist/assets/dashed-underline.css +1 -1
  26. package/dist/assets/data-grid-template.css +1 -1
  27. package/dist/assets/data-grid.css +1 -1
  28. package/dist/assets/date-picker.css +1 -1
  29. package/dist/assets/date-range-picker.css +1 -1
  30. package/dist/assets/date.css +1 -1
  31. package/dist/assets/dialog-page.css +1 -1
  32. package/dist/assets/divider.css +1 -1
  33. package/dist/assets/dropdown-default-textbox.css +1 -1
  34. package/dist/assets/dropdown-tag.css +1 -1
  35. package/dist/assets/dropdown.css +1 -1
  36. package/dist/assets/empty-state.css +1 -1
  37. package/dist/assets/field-label.css +1 -1
  38. package/dist/assets/file-uploader.css +1 -1
  39. package/dist/assets/filter-bar.css +1 -1
  40. package/dist/assets/fixed-scroller.css +1 -1
  41. package/dist/assets/footer-actions.css +1 -1
  42. package/dist/assets/form-layout-title.css +1 -1
  43. package/dist/assets/grid-layout.css +1 -1
  44. package/dist/assets/header-meta.css +1 -1
  45. package/dist/assets/header-with-views.css +1 -1
  46. package/dist/assets/header.css +1 -1
  47. package/dist/assets/index.css +1 -1
  48. package/dist/assets/info-icon.css +1 -1
  49. package/dist/assets/input-field-password.css +1 -1
  50. package/dist/assets/input-field.css +1 -1
  51. package/dist/assets/inspector.css +1 -1
  52. package/dist/assets/layout-row.css +1 -1
  53. package/dist/assets/link.css +1 -1
  54. package/dist/assets/listbox-option-tag.css +1 -1
  55. package/dist/assets/loading-indicator.css +1 -1
  56. package/dist/assets/modal-fullscreen.css +1 -1
  57. package/dist/assets/pagination.css +1 -1
  58. package/dist/assets/payment-method.css +1 -1
  59. package/dist/assets/popper-container.css +1 -1
  60. package/dist/assets/promo-banner.css +1 -1
  61. package/dist/assets/radio-group.css +1 -1
  62. package/dist/assets/radio-input.css +1 -1
  63. package/dist/assets/rich-text-editor.css +1 -1
  64. package/dist/assets/secondary-nav.css +1 -1
  65. package/dist/assets/segmented-control.css +1 -1
  66. package/dist/assets/selection-card-group.css +1 -1
  67. package/dist/assets/sidepanel.css +1 -1
  68. package/dist/assets/status.css +1 -1
  69. package/dist/assets/step.css +1 -1
  70. package/dist/assets/structured-list-item.css +1 -1
  71. package/dist/assets/summary-grid.css +1 -1
  72. package/dist/assets/tab.css +1 -1
  73. package/dist/assets/tag.css +1 -1
  74. package/dist/assets/textarea.css +1 -1
  75. package/dist/assets/timeline-item.css +1 -1
  76. package/dist/assets/toast.css +1 -1
  77. package/dist/assets/toggle.css +1 -1
  78. package/dist/assets/tooltip.css +1 -1
  79. package/dist/assets/tutorial.css +1 -1
  80. package/dist/assets/use-cached-selected-values.css +1 -1
  81. package/dist/button.js +3 -3
  82. package/dist/card.js +1 -1
  83. package/dist/checkbox.js +2 -2
  84. package/dist/chunks/1-generic-use.CZhwP2Yc.js.map +1 -1
  85. package/dist/chunks/1-generic-use.R6x8PEGA.js.map +1 -1
  86. package/dist/chunks/2-generic-use.CNKjB4B7.js.map +1 -1
  87. package/dist/chunks/2-generic-use.w0fUhovx.js.map +1 -1
  88. package/dist/chunks/3-generic-use.BLEzR04g.js.map +1 -1
  89. package/dist/chunks/3-generic-use.D3NFHgI4.js.map +1 -1
  90. package/dist/chunks/4-generic-use.CULEpvgj.js.map +1 -1
  91. package/dist/chunks/4-generic-use.D82y3n39.js.map +1 -1
  92. package/dist/chunks/accordion-item.DeV8s0oW.js.map +1 -1
  93. package/dist/chunks/{action-bar.C2GnRugW.js → action-bar.y4tcdk7R.js} +8 -6
  94. package/dist/chunks/{action-bar.C2GnRugW.js.map → action-bar.y4tcdk7R.js.map} +1 -1
  95. package/dist/chunks/adding-payment-methods.BJZLPxtM.js.map +1 -1
  96. package/dist/chunks/adding-payment-methods.Dle8zt43.js.map +1 -1
  97. package/dist/chunks/adyen-giving.Ffw_DlJK.js.map +1 -1
  98. package/dist/chunks/adyen-giving.LiKHj_jY.js.map +1 -1
  99. package/dist/chunks/{ai-button.C9Uc6vBY.js → ai-button.BEy4Gly-.js} +2 -2
  100. package/dist/chunks/{ai-button.C9Uc6vBY.js.map → ai-button.BEy4Gly-.js.map} +1 -1
  101. package/dist/chunks/{alert.BlJBrD8c.js → alert.B3Pdp02a.js} +29 -21
  102. package/dist/chunks/{alert.BlJBrD8c.js.map → alert.B3Pdp02a.js.map} +1 -1
  103. package/dist/chunks/aria-label.CaUURpnB.js.map +1 -1
  104. package/dist/chunks/avatar.CUCH3CTc.js.map +1 -1
  105. package/dist/chunks/base-button.IN4bpcds.js.map +1 -1
  106. package/dist/chunks/{base-modal.L39wmqVD.js → base-modal.KYkLKswF.js} +20 -18
  107. package/dist/chunks/{base-modal.L39wmqVD.js.map → base-modal.KYkLKswF.js.map} +1 -1
  108. package/dist/chunks/{button-actions-with-menu.CQlsQa_f.js → button-actions-with-menu.B5mKwc-F.js} +2 -2
  109. package/dist/chunks/{button-actions-with-menu.CQlsQa_f.js.map → button-actions-with-menu.B5mKwc-F.js.map} +1 -1
  110. package/dist/chunks/{button-actions.BWVq6OZQ.js → button-actions.D9n7MxWe.js} +270 -239
  111. package/dist/chunks/{button-actions.BWVq6OZQ.js.map → button-actions.D9n7MxWe.js.map} +1 -1
  112. package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
  113. package/dist/chunks/{button.C5GvPqe5.js → button.DIU6m9wD.js} +2 -2
  114. package/dist/chunks/{button.C5GvPqe5.js.map → button.DIU6m9wD.js.map} +1 -1
  115. package/dist/chunks/calendar.C8DpZ4Sr.js +1101 -0
  116. package/dist/chunks/calendar.C8DpZ4Sr.js.map +1 -0
  117. package/dist/chunks/{card.CktheSva.js → card.CLX0RGG6.js} +2 -2
  118. package/dist/chunks/{card.CktheSva.js.map → card.CLX0RGG6.js.map} +1 -1
  119. package/dist/chunks/{checkbox-group.DKkaWwMI.js → checkbox-group.BCnhjQie.js} +4 -4
  120. package/dist/chunks/{checkbox-group.DKkaWwMI.js.map → checkbox-group.BCnhjQie.js.map} +1 -1
  121. package/dist/chunks/{checkbox-input.B0NsfSNR.js → checkbox-input.08E9BNeF.js} +45 -40
  122. package/dist/chunks/checkbox-input.08E9BNeF.js.map +1 -0
  123. package/dist/chunks/{checkbox.B_W1TGP2.js → checkbox.CU5ierOq.js} +16 -16
  124. package/dist/chunks/{checkbox.B_W1TGP2.js.map → checkbox.CU5ierOq.js.map} +1 -1
  125. package/dist/chunks/click-outside.C1Ud8AA2.js.map +1 -1
  126. package/dist/chunks/{code-snippet.1_edHDaZ.js → code-snippet.9MwDHp50.js} +62 -60
  127. package/dist/chunks/code-snippet.9MwDHp50.js.map +1 -0
  128. package/dist/chunks/codemirror.Cy7iSLbd.js.map +1 -1
  129. package/dist/chunks/constructNow.DuaJst0D.js +8 -0
  130. package/dist/chunks/{constructNow.BhymNmy5.js.map → constructNow.DuaJst0D.js.map} +1 -1
  131. package/dist/chunks/{controls-group.BqPxnEl3.js → controls-group.D4eW9DtP.js} +2 -2
  132. package/dist/chunks/{controls-group.BqPxnEl3.js.map → controls-group.D4eW9DtP.js.map} +1 -1
  133. package/dist/chunks/{copy.I2GvwCvt.js → copy.C0q7xgXs.js} +19 -17
  134. package/dist/chunks/{copy.I2GvwCvt.js.map → copy.C0q7xgXs.js.map} +1 -1
  135. package/dist/chunks/{country.BPrh4fXO.js → country.DyrDj95W.js} +2 -2
  136. package/dist/chunks/{country.BPrh4fXO.js.map → country.DyrDj95W.js.map} +1 -1
  137. package/dist/chunks/country.types.DaVCMxk-.js +773 -0
  138. package/dist/chunks/{country.types.C0Q_hhgJ.js.map → country.types.DaVCMxk-.js.map} +1 -1
  139. package/dist/chunks/currency.DYZr_RDk.js.map +1 -1
  140. package/dist/chunks/{dashboard-section.B4bHrFIl.js → dashboard-section.B83FdC0Z.js} +3 -3
  141. package/dist/chunks/{dashboard-section.B4bHrFIl.js.map → dashboard-section.B83FdC0Z.js.map} +1 -1
  142. package/dist/chunks/{dashed-underline.ByK3QxFJ.js → dashed-underline.DQGVy5T2.js} +2 -2
  143. package/dist/chunks/{dashed-underline.ByK3QxFJ.js.map → dashed-underline.DQGVy5T2.js.map} +1 -1
  144. package/dist/chunks/{data-grid-template.CvZbOkih.js → data-grid-template.BTEFoEwf.js} +4 -4
  145. package/dist/chunks/{data-grid-template.CvZbOkih.js.map → data-grid-template.BTEFoEwf.js.map} +1 -1
  146. package/dist/chunks/data-grid-template.keys.VezYtHtM.js.map +1 -1
  147. package/dist/chunks/{data-grid.CVjZ1tKw.js → data-grid.BPG1GPIl.js} +922 -838
  148. package/dist/chunks/{data-grid.CVjZ1tKw.js.map → data-grid.BPG1GPIl.js.map} +1 -1
  149. package/dist/chunks/date-input.BbZqj10S.js +15 -0
  150. package/dist/chunks/date-input.BbZqj10S.js.map +1 -0
  151. package/dist/chunks/{date-picker.-a_TXwjx.js → date-picker.CnsC_UMG.js} +78 -74
  152. package/dist/chunks/date-picker.CnsC_UMG.js.map +1 -0
  153. package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
  154. package/dist/chunks/date-range-picker.B6GSRjjK.js +1693 -0
  155. package/dist/chunks/date-range-picker.B6GSRjjK.js.map +1 -0
  156. package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
  157. package/dist/chunks/date.DBWzp0So.js.map +1 -1
  158. package/dist/chunks/de.DvtL0g75.js +478 -0
  159. package/dist/chunks/de.DvtL0g75.js.map +1 -0
  160. package/dist/chunks/debounce.DUTu11PS.js.map +1 -1
  161. package/dist/chunks/delight.CDBAFnwC.js.map +1 -1
  162. package/dist/chunks/delight.xKDCvvaS.js.map +1 -1
  163. package/dist/chunks/{dialog-page.Dn-WbcxU.js → dialog-page.QpRiNPyx.js} +29 -23
  164. package/dist/chunks/{dialog-page.Dn-WbcxU.js.map → dialog-page.QpRiNPyx.js.map} +1 -1
  165. package/dist/chunks/differenceInMonths.DcFDl4eH.js +43 -0
  166. package/dist/chunks/differenceInMonths.DcFDl4eH.js.map +1 -0
  167. package/dist/chunks/directive.Cbdox5VL.js.map +1 -1
  168. package/dist/chunks/divider.DX5gwN7p.js.map +1 -1
  169. package/dist/chunks/dropdown-default-textbox.Cq68tN9F.js.map +1 -1
  170. package/dist/chunks/{dropdown-tag.AYIB0ec5.js → dropdown-tag.HBM0wrEV.js} +4 -4
  171. package/dist/chunks/{dropdown-tag.AYIB0ec5.js.map → dropdown-tag.HBM0wrEV.js.map} +1 -1
  172. package/dist/chunks/{dropdown.Dt0_ZUBn.js → dropdown.C2pXf8Li.js} +85 -81
  173. package/dist/chunks/{dropdown.Dt0_ZUBn.js.map → dropdown.C2pXf8Li.js.map} +1 -1
  174. package/dist/chunks/{empty-state.jVTWhJW7.js → empty-state.DpBnqAxu.js} +2 -2
  175. package/dist/chunks/{empty-state.jVTWhJW7.js.map → empty-state.DpBnqAxu.js.map} +1 -1
  176. package/dist/chunks/en-GB.DCGuCmAv.js +46 -0
  177. package/dist/chunks/en-GB.DCGuCmAv.js.map +1 -0
  178. package/dist/chunks/{getTimezoneOffsetInMilliseconds.B7sxiukN.js → en-US.BZii9jNW.js} +160 -196
  179. package/dist/chunks/en-US.BZii9jNW.js.map +1 -0
  180. package/dist/chunks/es.bz0mzkMq.js +374 -0
  181. package/dist/chunks/es.bz0mzkMq.js.map +1 -0
  182. package/dist/chunks/es6.C1DXQV6f.js +12 -0
  183. package/dist/chunks/es6.C1DXQV6f.js.map +1 -0
  184. package/dist/chunks/events.BQOQSSb7.js.map +1 -1
  185. package/dist/chunks/{field-label.BpeaR4Qc.js → field-label.CEkJnsiL.js} +5 -5
  186. package/dist/chunks/{field-label.BpeaR4Qc.js.map → field-label.CEkJnsiL.js.map} +1 -1
  187. package/dist/chunks/{file-uploader.G6mr6RuA.js → file-uploader.CnOqfuI-.js} +299 -253
  188. package/dist/chunks/{file-uploader.G6mr6RuA.js.map → file-uploader.CnOqfuI-.js.map} +1 -1
  189. package/dist/chunks/filter-bar.CnJAxz9B.js +2559 -0
  190. package/dist/chunks/filter-bar.CnJAxz9B.js.map +1 -0
  191. package/dist/chunks/fixed-scroller.Bp4-iO80.js +114 -0
  192. package/dist/chunks/{fixed-scroller.Ca1ujamx.js.map → fixed-scroller.Bp4-iO80.js.map} +1 -1
  193. package/dist/chunks/focus-trap.CNIU5jOz.js.map +1 -1
  194. package/dist/chunks/{footer-actions.3JdT8b0p.js → footer-actions.BOiN47Xd.js} +3 -3
  195. package/dist/chunks/{footer-actions.3JdT8b0p.js.map → footer-actions.BOiN47Xd.js.map} +1 -1
  196. package/dist/chunks/form-field.D_2g7vaP.js.map +1 -1
  197. package/dist/chunks/{form-layout-title.D9GJQfF9.js → form-layout-title.CdC1T4gs.js} +2 -2
  198. package/dist/chunks/{form-layout-title.D9GJQfF9.js.map → form-layout-title.CdC1T4gs.js.map} +1 -1
  199. package/dist/chunks/form-layout.types.bZW9iR6_.js.map +1 -1
  200. package/dist/chunks/fr-CA.B1aPU8fp.js +48 -0
  201. package/dist/chunks/fr-CA.B1aPU8fp.js.map +1 -0
  202. package/dist/chunks/fr.Dj7wEToe.js +47 -0
  203. package/dist/chunks/fr.Dj7wEToe.js.map +1 -0
  204. package/dist/chunks/generate-uid.NJ8tVoha.js.map +1 -1
  205. package/dist/chunks/getRoundingMethod.C3eaeGLR.js.map +1 -1
  206. package/dist/chunks/getTimezoneOffsetInMilliseconds.C-aIpRfB.js +51 -0
  207. package/dist/chunks/getTimezoneOffsetInMilliseconds.C-aIpRfB.js.map +1 -0
  208. package/dist/chunks/grid-layout.1aIiz2N_.js.map +1 -1
  209. package/dist/chunks/header-meta.D_oAu2S9.js +212 -0
  210. package/dist/chunks/header-meta.D_oAu2S9.js.map +1 -0
  211. package/dist/chunks/{header-with-views.3fF_V6F9.js → header-with-views.Dc9LUYNY.js} +379 -315
  212. package/dist/chunks/{header-with-views.3fF_V6F9.js.map → header-with-views.Dc9LUYNY.js.map} +1 -1
  213. package/dist/chunks/{header.D76MKCdS.js → header.BmtlQmPs.js} +3 -3
  214. package/dist/chunks/{header.D76MKCdS.js.map → header.BmtlQmPs.js.map} +1 -1
  215. package/dist/chunks/image.C2D2hKat.js.map +1 -1
  216. package/dist/chunks/index.B6WW_F-J.js.map +1 -1
  217. package/dist/chunks/index.BDK4hwK_.js.map +1 -1
  218. package/dist/chunks/{input-field-password.C7zjyp7f.js → input-field-password.D23H_RvO.js} +48 -42
  219. package/dist/chunks/{input-field-password.C7zjyp7f.js.map → input-field-password.D23H_RvO.js.map} +1 -1
  220. package/dist/chunks/{input-field-phone-number.DwuTziSU.js → input-field-phone-number.Bvk2Pvec.js} +9 -3
  221. package/dist/chunks/{input-field-phone-number.DwuTziSU.js.map → input-field-phone-number.Bvk2Pvec.js.map} +1 -1
  222. package/dist/chunks/{input-field.DsT4AWXC.js → input-field.hf0_ALq0.js} +37 -29
  223. package/dist/chunks/{input-field.DsT4AWXC.js.map → input-field.hf0_ALq0.js.map} +1 -1
  224. package/dist/chunks/{inspector.2A5vWUou.js → inspector.C0iAxxoz.js} +40 -34
  225. package/dist/chunks/{inspector.2A5vWUou.js.map → inspector.C0iAxxoz.js.map} +1 -1
  226. package/dist/chunks/inspector.types.DyHwE18g.js.map +1 -1
  227. package/dist/chunks/internal-error.BLZodVBE.js.map +1 -1
  228. package/dist/chunks/internal-error.BmrwJFpR.js.map +1 -1
  229. package/dist/chunks/isSameWeek.CUD7czUN.js +14 -0
  230. package/dist/chunks/isSameWeek.CUD7czUN.js.map +1 -0
  231. package/dist/chunks/it.Oaj6BklL.js +392 -0
  232. package/dist/chunks/it.Oaj6BklL.js.map +1 -0
  233. package/dist/chunks/ja.Cm9tJMi2.js +367 -0
  234. package/dist/chunks/ja.Cm9tJMi2.js.map +1 -0
  235. package/dist/chunks/keyboard-navigation.DWmhelVv.js.map +1 -1
  236. package/dist/chunks/ko.Ceaof6EP.js +348 -0
  237. package/dist/chunks/ko.Ceaof6EP.js.map +1 -0
  238. package/dist/chunks/layout-row.BPX00mio.js.map +1 -1
  239. package/dist/chunks/{link.BoDUCYmM.js → link.PsTSQjK3.js} +27 -21
  240. package/dist/chunks/{link.BoDUCYmM.js.map → link.PsTSQjK3.js.map} +1 -1
  241. package/dist/chunks/loading-indicator.PxbRzshH.js.map +1 -1
  242. package/dist/chunks/match.CMBZxEs9.js +302 -0
  243. package/dist/chunks/match.CMBZxEs9.js.map +1 -0
  244. package/dist/chunks/minus-small.DJacLGTw.js.map +1 -1
  245. package/dist/chunks/{modal-fullscreen.CcvZBUoF.js → modal-fullscreen.B1gltlxA.js} +5 -5
  246. package/dist/chunks/{modal-fullscreen.CcvZBUoF.js.map → modal-fullscreen.B1gltlxA.js.map} +1 -1
  247. package/dist/chunks/{modal.6hFEbnZM.js → modal.e3EQ6Kex.js} +5 -5
  248. package/dist/chunks/{modal.6hFEbnZM.js.map → modal.e3EQ6Kex.js.map} +1 -1
  249. package/dist/chunks/nl.B6vCf2B9.js +327 -0
  250. package/dist/chunks/nl.B6vCf2B9.js.map +1 -0
  251. package/dist/chunks/no-results-found.Bg_ZcEid.js.map +1 -1
  252. package/dist/chunks/no-results-found.BqvYsBR6.js.map +1 -1
  253. package/dist/chunks/notifications-cleared.BMZk37uf.js.map +1 -1
  254. package/dist/chunks/notifications-cleared.C7W9ZXY7.js.map +1 -1
  255. package/dist/chunks/on-click-outside.D9aY9g8G.js.map +1 -1
  256. package/dist/chunks/page-not-found.COJLPVaU.js.map +1 -1
  257. package/dist/chunks/page-not-found.DWW6W-PZ.js.map +1 -1
  258. package/dist/chunks/{pagination.BSyshRGH.js → pagination.BcFt2FqK.js} +6 -6
  259. package/dist/chunks/{pagination.BSyshRGH.js.map → pagination.BcFt2FqK.js.map} +1 -1
  260. package/dist/chunks/payment-method.BKXLPDC9.js.map +1 -1
  261. package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
  262. package/dist/chunks/planned-maintenance.C61sWB9h.js.map +1 -1
  263. package/dist/chunks/planned-maintenance.jmWYTdet.js.map +1 -1
  264. package/dist/chunks/popover.types.WDh5ggr3.js.map +1 -1
  265. package/dist/chunks/popper-container.Cdokz_NE.js.map +1 -1
  266. package/dist/chunks/{promo-banner.D3aG5wnp.js → promo-banner.yfBorKj7.js} +2 -2
  267. package/dist/chunks/{promo-banner.D3aG5wnp.js.map → promo-banner.yfBorKj7.js.map} +1 -1
  268. package/dist/chunks/pt-BR.CiGdfP45.js +380 -0
  269. package/dist/chunks/pt-BR.CiGdfP45.js.map +1 -0
  270. package/dist/chunks/{radio-group.DTZwsfwW.js → radio-group.CtTnfkYg.js} +3 -3
  271. package/dist/chunks/{radio-group.DTZwsfwW.js.map → radio-group.CtTnfkYg.js.map} +1 -1
  272. package/dist/chunks/radio-input.kzb4gxLW.js.map +1 -1
  273. package/dist/chunks/referrals.BvtT-kQS.js.map +1 -1
  274. package/dist/chunks/referrals.aX8WZigH.js.map +1 -1
  275. package/dist/chunks/resize.Bqks3WUm.js.map +1 -1
  276. package/dist/chunks/{rich-text-editor.BbvfrqHl.js → rich-text-editor.Dq2CFGOu.js} +5 -5
  277. package/dist/chunks/{rich-text-editor.BbvfrqHl.js.map → rich-text-editor.Dq2CFGOu.js.map} +1 -1
  278. package/dist/chunks/{search-bar.Bpk-PuYT.js → search-bar.B0SdQBnY.js} +3 -3
  279. package/dist/chunks/{search-bar.Bpk-PuYT.js.map → search-bar.B0SdQBnY.js.map} +1 -1
  280. package/dist/chunks/{secondary-nav.BGOYJrsB.js → secondary-nav.BPGpxd0p.js} +35 -29
  281. package/dist/chunks/{secondary-nav.BGOYJrsB.js.map → secondary-nav.BPGpxd0p.js.map} +1 -1
  282. package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
  283. package/dist/chunks/{selection-card-group.BWLjFcea.js → selection-card-group.BryV14qP.js} +13 -13
  284. package/dist/chunks/{selection-card-group.BWLjFcea.js.map → selection-card-group.BryV14qP.js.map} +1 -1
  285. package/dist/chunks/{sidepanel.C5SvJNMR.js → sidepanel.NFyZGE57.js} +5 -5
  286. package/dist/chunks/{sidepanel.C5SvJNMR.js.map → sidepanel.NFyZGE57.js.map} +1 -1
  287. package/dist/chunks/startOfWeek.Dxw2MhGp.js +10 -0
  288. package/dist/chunks/startOfWeek.Dxw2MhGp.js.map +1 -0
  289. package/dist/chunks/status.types.Cv5XN4zL.js.map +1 -1
  290. package/dist/chunks/step.BLFXvHL6.js +223 -0
  291. package/dist/chunks/step.BLFXvHL6.js.map +1 -0
  292. package/dist/chunks/{structured-list-item.CbXDKwsF.js → structured-list-item.CptOCpHP.js} +3 -3
  293. package/dist/chunks/{structured-list-item.CbXDKwsF.js.map → structured-list-item.CptOCpHP.js.map} +1 -1
  294. package/dist/chunks/success.DhioLvPD.js.map +1 -1
  295. package/dist/chunks/success.nNwxJRBS.js.map +1 -1
  296. package/dist/chunks/summary-grid.keys.Xx-W5a2w.js.map +1 -1
  297. package/dist/chunks/{summary-grid.types.haWi7oaf.js → summary-grid.types.B1T8_k1m.js} +3 -3
  298. package/dist/chunks/{summary-grid.types.haWi7oaf.js.map → summary-grid.types.B1T8_k1m.js.map} +1 -1
  299. package/dist/chunks/sv.f8EfZjMZ.js +377 -0
  300. package/dist/chunks/sv.f8EfZjMZ.js.map +1 -0
  301. package/dist/chunks/{tab.ZQfGp_FP.js → tab.FUMpPsBP.js} +2 -2
  302. package/dist/chunks/{tab.ZQfGp_FP.js.map → tab.FUMpPsBP.js.map} +1 -1
  303. package/dist/chunks/tabs.keys.B4qGhjp2.js.map +1 -1
  304. package/dist/chunks/tag.B1Ywhgvc.js.map +1 -1
  305. package/dist/chunks/{textarea.DfR2o1lz.js → textarea.riUt0BiI.js} +31 -31
  306. package/dist/chunks/textarea.riUt0BiI.js.map +1 -0
  307. package/dist/chunks/{timeline-item.rLqeBsyz.js → timeline-item.CFfW1DoD.js} +16 -15
  308. package/dist/chunks/{timeline-item.rLqeBsyz.js.map → timeline-item.CFfW1DoD.js.map} +1 -1
  309. package/dist/chunks/{toast.C7lu_NsX.js → toast.Csv6tMyT.js} +2 -2
  310. package/dist/chunks/{toast.C7lu_NsX.js.map → toast.Csv6tMyT.js.map} +1 -1
  311. package/dist/chunks/toggle.227XgEc7.js.map +1 -1
  312. package/dist/chunks/tooltip.C6YCavPw.js.map +1 -1
  313. package/dist/chunks/truncate.BfIl_-71.js.map +1 -1
  314. package/dist/chunks/{tutorial.DdRGxTC5.js → tutorial.D18LwXVy.js} +5 -5
  315. package/dist/chunks/{tutorial.DdRGxTC5.js.map → tutorial.D18LwXVy.js.map} +1 -1
  316. package/dist/chunks/typography.Bq-EGj9y.js.map +1 -1
  317. package/dist/chunks/upload-files.5wQwbfkp.js.map +1 -1
  318. package/dist/chunks/upload-files.jTQY6y2X.js.map +1 -1
  319. package/dist/chunks/use-bento-toast-controller.MmyZXtME.js.map +1 -1
  320. package/dist/chunks/{use-cached-selected-values.DIKJ8yNE.js → use-cached-selected-values.gDWGi5Nk.js} +240 -231
  321. package/dist/chunks/{use-cached-selected-values.DIKJ8yNE.js.map → use-cached-selected-values.gDWGi5Nk.js.map} +1 -1
  322. package/dist/chunks/{use-country-items.B3Cd3Tdo.js → use-country-items.ClS_So5N.js} +2 -2
  323. package/dist/chunks/{use-country-items.B3Cd3Tdo.js.map → use-country-items.ClS_So5N.js.map} +1 -1
  324. package/dist/chunks/use-country-phon-code.Bui3zD6W.js.map +1 -1
  325. package/dist/chunks/use-default-slot-validator.BDn0wkYP.js.map +1 -1
  326. package/dist/chunks/use-expandable-content-height.GkjjbmPy.js.map +1 -1
  327. package/dist/chunks/use-form-layout-loading.CWbjZiwP.js.map +1 -1
  328. package/dist/chunks/wrong-environment.BOsyKdRI.js.map +1 -1
  329. package/dist/chunks/wrong-environment.BiHTPtbJ.js.map +1 -1
  330. package/dist/chunks/zh-CN.BzH0fIXr.js +389 -0
  331. package/dist/chunks/zh-CN.BzH0fIXr.js.map +1 -0
  332. package/dist/code-snippet.js +1 -1
  333. package/dist/country.js +2 -2
  334. package/dist/dashboard-template.js +1 -1
  335. package/dist/dashed-underline.js +1 -1
  336. package/dist/data-grid-template.js +1 -1
  337. package/dist/data-grid.js +1 -1
  338. package/dist/date-picker.js +2 -2
  339. package/dist/date-range-picker.js +2 -2
  340. package/dist/dropdown.js +3 -3
  341. package/dist/empty-state.js +1 -1
  342. package/dist/file-uploader.js +1 -1
  343. package/dist/filter-bar.js +1 -1
  344. package/dist/form-layout.js +1 -1
  345. package/dist/header-with-views.js +1 -1
  346. package/dist/header.js +1 -1
  347. package/dist/index.js +250 -251
  348. package/dist/index.js.map +1 -1
  349. package/dist/input-field-password.js +1 -1
  350. package/dist/input-field-phone-number.js +1 -1
  351. package/dist/input-field.js +1 -1
  352. package/dist/inspector.js +1 -1
  353. package/dist/internal.js +10 -10
  354. package/dist/link.js +1 -1
  355. package/dist/menu.js +1 -1
  356. package/dist/modal-fullscreen.js +1 -1
  357. package/dist/modal.js +2 -2
  358. package/dist/pagination.js +1 -1
  359. package/dist/popover.js +1 -1
  360. package/dist/promo-banner.js +1 -1
  361. package/dist/radio-group.js +1 -1
  362. package/dist/rich-text-editor.js +1 -1
  363. package/dist/search-bar.js +2 -2
  364. package/dist/secondary-nav.js +1 -1
  365. package/dist/selection-card.js +1 -1
  366. package/dist/sidepanel.js +1 -1
  367. package/dist/stepper.js +1 -1
  368. package/dist/structured-list.js +1 -1
  369. package/dist/styles/bento-dark.css +0 -1829
  370. package/dist/styles/bento-light.css +0 -1829
  371. package/dist/styles/bento.css +0 -1829
  372. package/dist/styles/legacy.css +0 -1829
  373. package/dist/styles/styleguide.css +0 -1829
  374. package/dist/summary-grid.js +1 -1
  375. package/dist/tabs.js +1 -1
  376. package/dist/textarea.js +1 -1
  377. package/dist/timeline.js +1 -1
  378. package/dist/toast.js +1 -1
  379. package/dist/tutorial.js +1 -1
  380. package/dist/use-form-v4.js.map +1 -1
  381. package/package.json +15 -26
  382. package/dist/@types/components.d.ts +0 -196
  383. package/dist/@types/use-form-v4.d.ts +0 -86
  384. package/dist/chunks/calendar.DCLyThOl.js +0 -1832
  385. package/dist/chunks/calendar.DCLyThOl.js.map +0 -1
  386. package/dist/chunks/checkbox-input.B0NsfSNR.js.map +0 -1
  387. package/dist/chunks/code-snippet.1_edHDaZ.js.map +0 -1
  388. package/dist/chunks/constructNow.BhymNmy5.js +0 -8
  389. package/dist/chunks/country.types.C0Q_hhgJ.js +0 -269
  390. package/dist/chunks/date-format.B8RU7D42.js +0 -17
  391. package/dist/chunks/date-format.B8RU7D42.js.map +0 -1
  392. package/dist/chunks/date-picker.-a_TXwjx.js.map +0 -1
  393. package/dist/chunks/date-range-picker.Bw1yPTu-.js +0 -906
  394. package/dist/chunks/date-range-picker.Bw1yPTu-.js.map +0 -1
  395. package/dist/chunks/differenceInMonths.Cab3nOsb.js +0 -1590
  396. package/dist/chunks/differenceInMonths.Cab3nOsb.js.map +0 -1
  397. package/dist/chunks/es6.MoTTyETW.js +0 -12
  398. package/dist/chunks/es6.MoTTyETW.js.map +0 -1
  399. package/dist/chunks/filter-bar.CgJA4tIt.js +0 -2472
  400. package/dist/chunks/filter-bar.CgJA4tIt.js.map +0 -1
  401. package/dist/chunks/fixed-scroller.Ca1ujamx.js +0 -106
  402. package/dist/chunks/getTimezoneOffsetInMilliseconds.B7sxiukN.js.map +0 -1
  403. package/dist/chunks/header-meta.C8_W0j_p.js +0 -170
  404. package/dist/chunks/header-meta.C8_W0j_p.js.map +0 -1
  405. package/dist/chunks/step.mqn8E6dm.js +0 -217
  406. package/dist/chunks/step.mqn8E6dm.js.map +0 -1
  407. package/dist/chunks/textarea.DfR2o1lz.js.map +0 -1
  408. package/dist/web-types.json +0 -17280
@@ -1,5 +1,5 @@
1
- import { defineComponent as U, useSlots as F, ref as A, computed as n, inject as T, watch as m, nextTick as h, onUnmounted as H } from "vue";
2
- import { B as J } from "./button.C5GvPqe5.js";
1
+ import { defineComponent as U, useSlots as F, ref as T, computed as n, inject as A, watch as m, nextTick as P, onUnmounted as H } from "vue";
2
+ import { B as J } from "./button.DIU6m9wD.js";
3
3
  /* empty css */
4
4
  import { n as N } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
5
5
  import { u as K } from "./use-has-slot.C9lQZ6nz.js";
@@ -25,10 +25,16 @@ var q = function() {
25
25
  null
26
26
  );
27
27
  const X = W.exports;
28
- var P = /* @__PURE__ */ ((i) => (i.TRANSITION_LEVEL_DEEPER = "b-dialog-page__animation--level-deeper", i.TRANSITION_LEVEL_UPPER = "b-dialog-page__animation--level-upper", i))(P || {});
28
+ var h = /* @__PURE__ */ ((i) => (i.TRANSITION_LEVEL_DEEPER = "b-dialog-page__animation--level-deeper", i.TRANSITION_LEVEL_UPPER = "b-dialog-page__animation--level-upper", i))(h || {});
29
29
  const ee = /* @__PURE__ */ Symbol("dialog registerPage injection key"), te = /* @__PURE__ */ Symbol("dialog page config data injection key"), ae = {
30
30
  "en-US": {
31
31
  goToPreviousPage: "Go to previous page"
32
+ },
33
+ "ja-JP": {
34
+ goToPreviousPage: "前のページに移動"
35
+ },
36
+ "pt-BR": {
37
+ goToPreviousPage: "Ir para a página anterior"
32
38
  }
33
39
  }, oe = {
34
40
  i18n: { messages: ae }
@@ -66,32 +72,32 @@ const ee = /* @__PURE__ */ Symbol("dialog registerPage injection key"), te = /*
66
72
  },
67
73
  emits: ["animationend"],
68
74
  setup(i, { emit: e }) {
69
- const t = i, a = F(), b = K(a), { t: O } = Y(), r = A(null), v = A(!1), { arrivedState: u } = M(r), _ = n(() => s.value ? s.value === t.pageId : !0), R = n(() => ({
75
+ const t = i, a = F(), b = K(a), { t: O } = Y(), l = T(null), v = T(!1), { arrivedState: u } = M(l), _ = n(() => s.value ? s.value === t.pageId : !0), R = n(() => ({
70
76
  "b-dialog-page__header--with-border": t.alwaysShowBorder || v.value && !u.top
71
77
  })), k = n(() => ({
72
78
  "b-dialog-page__footer--with-border": t.alwaysShowBorder || v.value && !u.bottom
73
79
  })), x = n(() => !(u.bottom && u.top)), $ = () => {
74
- r.value;
75
- }, d = async (l) => {
76
- l && (await h(), v.value = r.value && r.value.scrollHeight > r.value.clientHeight);
77
- }, { activePage: s, animation: g, isAnimationActive: c, isOpen: p, pages: S, previousPages: o, updatePage: E } = T(te);
78
- m(() => p.value, d, { immediate: !0 }), m(() => _.value, d, { immediate: !0 });
80
+ l.value;
81
+ }, g = async (r) => {
82
+ r && (await P(), v.value = l.value && l.value.scrollHeight > l.value.clientHeight);
83
+ }, { activePage: s, animation: d, isAnimationActive: c, isOpen: p, pages: S, previousPages: o, updatePage: E } = A(te);
84
+ m(() => p.value, g, { immediate: !0 }), m(() => _.value, g, { immediate: !0 });
79
85
  const G = n(() => t.previousPage ? !0 : t.previousPage === null ? !1 : w.value && _.value), D = () => {
80
- g.value = P.TRANSITION_LEVEL_DEEPER, c && (c.value = !1), e("animationend");
81
- }, V = () => {
86
+ d.value = h.TRANSITION_LEVEL_DEEPER, c && (c.value = !1), e("animationend");
87
+ }, j = () => {
82
88
  c && (c.value = !0);
83
- }, w = n(() => o.value.length > 1), f = n(() => o.value[o.value.length - 1]), I = n(() => S.value.some((l) => l === s.value)), j = async (l) => {
84
- if (l) {
85
- const C = o.value.indexOf(l);
86
- C !== -1 ? o.value = o.value.slice(0, C + 1) : o.value = [l];
89
+ }, w = n(() => o.value.length > 1), f = n(() => o.value[o.value.length - 1]), I = n(() => S.value.some((r) => r === s.value)), V = async (r) => {
90
+ if (r) {
91
+ const C = o.value.indexOf(r);
92
+ C !== -1 ? o.value = o.value.slice(0, C + 1) : o.value = [r];
87
93
  } else
88
94
  o.value.pop();
89
- g.value = P.TRANSITION_LEVEL_UPPER, await h(), E(f.value);
95
+ d.value = h.TRANSITION_LEVEL_UPPER, await P(), E(f.value);
90
96
  };
91
97
  m(
92
98
  () => s.value,
93
99
  async () => {
94
- if (await h(), !!p.value) {
100
+ if (await P(), !!p.value) {
95
101
  if (s.value && !I.value && z) {
96
102
  console.error(
97
103
  `The activePage passed "${s.value}" does not match the id of any of the pages`
@@ -103,8 +109,8 @@ const ee = /* @__PURE__ */ Symbol("dialog registerPage injection key"), te = /*
103
109
  },
104
110
  { immediate: !0 }
105
111
  );
106
- const L = T(ee), { unregisterPage: y } = L(t.pageId);
107
- return H(() => y()), { __sfc: !0, props: t, emit: e, slots: a, hasSlot: b, t: O, contentElement: r, hasScroll: v, arrivedState: u, showPage: _, headerConditionalClasses: R, footerConditionalClasses: k, isScrollable: x, onScroll: $, calculateScroll: d, activePage: s, animation: g, isAnimationActive: c, isOpen: p, pages: S, previousPages: o, updatePage: E, showBackButton: G, updateAnimation: D, startAnimation: V, hasPreviousPages: w, lastPage: f, isActivePageValid: I, goToPreviousPage: j, registerPage: L, unregisterPage: y, BentoButton: J, ArrowLeftIcon: X };
112
+ const L = A(ee), { unregisterPage: y } = L(t.pageId);
113
+ return H(() => y()), { __sfc: !0, props: t, emit: e, slots: a, hasSlot: b, t: O, contentElement: l, hasScroll: v, arrivedState: u, showPage: _, headerConditionalClasses: R, footerConditionalClasses: k, isScrollable: x, onScroll: $, calculateScroll: g, activePage: s, animation: d, isAnimationActive: c, isOpen: p, pages: S, previousPages: o, updatePage: E, showBackButton: G, updateAnimation: D, startAnimation: j, hasPreviousPages: w, lastPage: f, isActivePageValid: I, goToPreviousPage: V, registerPage: L, unregisterPage: y, BentoButton: J, ArrowLeftIcon: X };
108
114
  }
109
115
  });
110
116
  var ne = function() {
@@ -112,7 +118,7 @@ var ne = function() {
112
118
  return t("Transition", { attrs: { name: a.animation, mode: "out-in" }, on: { "after-leave": a.updateAnimation, leave: a.startAnimation } }, [a.isOpen && a.showPage ? t("div", { staticClass: "b-dialog-page" }, [a.hasSlot("header") ? t("div", { staticClass: "b-dialog-page__header", class: a.headerConditionalClasses }, [a.showBackButton ? t("div", { staticClass: "b-dialog-page__back-button", style: e.backButtonStyling, attrs: { "data-testid": "back-button" } }, [t(a.BentoButton, { attrs: { variant: "tertiary" }, on: { click: function(b) {
113
119
  return a.goToPreviousPage(e.previousPage);
114
120
  } } }, [t(a.ArrowLeftIcon, { attrs: { "svg-title": a.t("goToPreviousPage") } })], 1)], 1) : e._e(), e._t("header")], 2) : e._e(), a.hasSlot("content") ? t("div", { ref: "contentElement", staticClass: "b-dialog-page__content", attrs: { tabindex: a.isScrollable ? 0 : null }, on: { scroll: a.onScroll } }, [e._t("content")], 2) : e._e(), a.hasSlot("footer") ? t("div", { staticClass: "b-dialog-page__footer", class: a.footerConditionalClasses }, [e._t("footer")], 2) : e._e()]) : e._e()]);
115
- }, ie = [], le = /* @__PURE__ */ N(
121
+ }, ie = [], re = /* @__PURE__ */ N(
116
122
  se,
117
123
  ne,
118
124
  ie,
@@ -120,12 +126,12 @@ var ne = function() {
120
126
  null,
121
127
  "8bfb8442"
122
128
  );
123
- const fe = le.exports;
129
+ const fe = re.exports;
124
130
  export {
125
131
  X as A,
126
- P as B,
132
+ h as B,
127
133
  fe as D,
128
134
  ee as a,
129
135
  te as b
130
136
  };
131
- //# sourceMappingURL=dialog-page.Dn-WbcxU.js.map
137
+ //# sourceMappingURL=dialog-page.QpRiNPyx.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-page.Dn-WbcxU.js","sources":["../../../ui-assets/icons-16/dist/vue/arrow-left.vue","../../src/components/internal/dialog-page/dialog-page.types.ts","../../src/components/internal/dialog-page/dialog-page.keys.ts","../../src/components/internal/dialog-page/dialog-page.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","import { type Ref } from 'vue';\n\nexport enum BentoDialogPageAnimation {\n TRANSITION_LEVEL_DEEPER = 'b-dialog-page__animation--level-deeper',\n TRANSITION_LEVEL_UPPER = 'b-dialog-page__animation--level-upper',\n}\n\nexport interface BentoDialogPageConfigData {\n activePage: Ref<string>;\n animation: Ref<string>;\n isAnimationActive?: Ref<boolean>;\n isOpen: Ref<boolean>;\n pages: Ref<Array<string>>;\n previousPages: Ref<Array<string>>;\n updatePage: (page: string) => void;\n}\n\nexport type BentoDialogPageRegisterPage = (pageId: string) => { unregisterPage: () => void };\n","export const DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY = Symbol('dialog registerPage injection key');\nexport const DIALOG_PAGE_CONFIG_INJECTION_KEY = Symbol('dialog page config data injection key');\n","<template>\n <Transition :name=\"animation\" mode=\"out-in\" @after-leave=\"updateAnimation\" @leave=\"startAnimation\">\n <div v-if=\"isOpen && showPage\" class=\"b-dialog-page\">\n <div v-if=\"hasSlot('header')\" class=\"b-dialog-page__header\" :class=\"headerConditionalClasses\">\n <div\n v-if=\"showBackButton\"\n class=\"b-dialog-page__back-button\"\n :style=\"backButtonStyling\"\n data-testid=\"back-button\"\n >\n <bento-button variant=\"tertiary\" @click=\"goToPreviousPage(previousPage)\">\n <arrow-left-icon :svg-title=\"t('goToPreviousPage')\" />\n </bento-button>\n </div>\n <slot name=\"header\"></slot>\n </div>\n <div\n v-if=\"hasSlot('content')\"\n ref=\"contentElement\"\n class=\"b-dialog-page__content\"\n :tabindex=\"isScrollable ? 0 : null\"\n @scroll=\"onScroll\"\n >\n <slot name=\"content\" />\n </div>\n <div v-if=\"hasSlot('footer')\" class=\"b-dialog-page__footer\" :class=\"footerConditionalClasses\">\n <slot name=\"footer\" />\n </div>\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, nextTick, onUnmounted, type PropType, ref, useSlots, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import ArrowLeftIcon from '@adyen/ui-assets-icons-16/vue/arrow-left';\n\n import { useHasSlot } from '@/composables/use-has-slot/use-has-slot';\n import { useI18n } from '@/utils/ts/i18n';\n import { isDevelopmentEnviroment } from '@/utils/ts/dev-environment';\n\n import {\n BentoDialogPageAnimation,\n type BentoDialogPageConfigData,\n type BentoDialogPageRegisterPage,\n } from './dialog-page.types';\n import type { CSSProperties } from 'vue/types/jsx.d.ts';\n\n import { DIALOG_PAGE_CONFIG_INJECTION_KEY, DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY } from './dialog-page.keys';\n\n import messages from './messages.json';\n import { useScroll } from '@vueuse/core';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * Identifier of the page, used with activePage prop to handle navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Show header and actions border\n */\n alwaysShowBorder: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Pass custom styling to the back button to position it correctly with the header slot\n */\n backButtonStyling: { type: Object as PropType<CSSProperties>, default: null },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n });\n\n const emit = defineEmits([\"animationend\"]);\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n // Refs\n const contentElement = ref<HTMLDivElement>(null);\n const hasScroll = ref(false);\n\n const { arrivedState } = useScroll(contentElement);\n\n // Logic to choose which page is active/shown\n const showPage = computed(() => (activePage.value ? activePage.value === props.pageId : true));\n\n // Scrolling styling logic\n const headerConditionalClasses = computed(() => ({\n 'b-dialog-page__header--with-border': props.alwaysShowBorder || (hasScroll.value && !arrivedState.top),\n }));\n\n const footerConditionalClasses = computed(() => ({\n 'b-dialog-page__footer--with-border': props.alwaysShowBorder || (hasScroll.value && !arrivedState.bottom),\n }));\n\n const isScrollable = computed(() => !(arrivedState.bottom && arrivedState.top));\n\n const onScroll = () => {\n if (!contentElement.value) {\n return;\n }\n };\n\n const calculateScroll = async watchedValue => {\n if (!watchedValue) {\n return;\n }\n // Wait for content to be rendered to be able to calculate the height\n await nextTick();\n hasScroll.value = contentElement.value && contentElement.value.scrollHeight > contentElement.value.clientHeight;\n };\n\n const { activePage, animation, isAnimationActive, isOpen, pages, previousPages, updatePage } =\n inject<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY);\n\n watch(() => isOpen.value, calculateScroll, { immediate: true });\n watch(() => showPage.value, calculateScroll, { immediate: true });\n\n // Logic to determine whether the back button should be shown on the page\n const showBackButton = computed(() => {\n if (props.previousPage) {\n return true;\n }\n if (props.previousPage === null) {\n return false;\n }\n return hasPreviousPages.value && showPage.value;\n });\n\n // Animation\n const updateAnimation = () => {\n animation.value = BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER;\n if (isAnimationActive) {\n isAnimationActive.value = false;\n }\n\n emit('animationend');\n };\n\n const startAnimation = () => {\n if (isAnimationActive) {\n isAnimationActive.value = true;\n }\n };\n\n // Previous page logic\n const hasPreviousPages = computed(() => previousPages.value.length > 1);\n const lastPage = computed(() => previousPages.value[previousPages.value.length - 1]);\n const isActivePageValid = computed(() => pages.value.some(page => page === activePage.value));\n\n const goToPreviousPage = async (page: string) => {\n if (page) {\n const index = previousPages.value.indexOf(page);\n if (index !== -1) {\n previousPages.value = previousPages.value.slice(0, index + 1);\n } else {\n previousPages.value = [page];\n }\n } else {\n previousPages.value.pop();\n }\n\n animation.value = BentoDialogPageAnimation.TRANSITION_LEVEL_UPPER;\n await nextTick();\n updatePage(lastPage.value);\n };\n\n // Add new page to the previousPage array to keep track of user navigation\n watch(\n () => activePage.value,\n async () => {\n await nextTick();\n if (!isOpen.value) {\n return;\n }\n\n if (!!activePage.value && !isActivePageValid.value) {\n if (isDevelopmentEnviroment) {\n // eslint-disable-next-line no-console\n console.error(\n `The activePage passed \"${activePage.value}\" does not match the id of any of the pages`\n );\n return;\n }\n }\n\n if (activePage.value !== lastPage.value) {\n previousPages.value.push(activePage.value);\n }\n },\n { immediate: true }\n );\n\n // Register page to parent component and inject data from parent component\n const registerPage = inject<BentoDialogPageRegisterPage>(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY);\n const { unregisterPage } = registerPage(props.pageId);\n\n // Unregister page on unmounting the page\n onUnmounted(() => unregisterPage());\n</script>\n\n<script lang=\"ts\">\n /**\n * DialogPage is an internal component used to render different pages of dialog components (Modal, ModalFullscreen and Sidepanel)\n *\n * @example\n * import { DialogPage } from '@/internal';\n *\n * export default {\n * components: { DialogPage },\n * template: `\n * <dialog-page pageId='step1' always-show-border>\n * <template #header>Header</template>\n * <template #content>Content</template>\n * <template #footer>Footer</template>\n * </dialog-page>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./dialog-page.scss\" />\n"],"names":["uuid","_sfc_main$1","BentoDialogPageAnimation","BentoDialogPageAnimation2","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","DIALOG_PAGE_CONFIG_INJECTION_KEY","__default__","messages","slots","useSlots","hasSlot","useHasSlot","t","useI18n","contentElement","ref","hasScroll","arrivedState","useScroll","showPage","computed","activePage","props","headerConditionalClasses","footerConditionalClasses","isScrollable","onScroll","calculateScroll","watchedValue","nextTick","animation","isAnimationActive","isOpen","pages","previousPages","updatePage","inject","watch","showBackButton","hasPreviousPages","updateAnimation","emit","startAnimation","lastPage","isActivePageValid","page","goToPreviousPage","index","isDevelopmentEnviroment","registerPage","unregisterPage","onUnmounted"],"mappings":";;;;;;;;;AAOA,IAAAA,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;ACZO,IAAAE,IAAA,kBAAAC,OACHA,EAAA,0BAAA,0CACAA,EAAA,yBAAA,yCAFQA,IAAAD,KAAA,CAAA,CAAA;ACFL,MAAAE,KAAA,uBAAA,mCAAA,GACAC,KAAA,uBAAA,uCAAA;;;;GC4OHC,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,GAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBApJAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GACA,EAAA,GAAAI,EAAA,IAAAC,EAAA,GAGAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,EAAA,GAEA,EAAA,cAAAE,EAAA,IAAAC,EAAAJ,CAAA,GAGAK,IAAAC,EAAA,MAAAC,EAAA,QAAAA,EAAA,UAAAC,EAAA,SAAA,EAAA,GAGAC,IAAAH,EAAA,OAAA;AAAA,MAAiD,sCAAAE,EAAA,oBAAAN,EAAA,SAAA,CAAAC,EAAA;AAAA,IACqD,EAAA,GAGtGO,IAAAJ,EAAA,OAAA;AAAA,MAAiD,sCAAAE,EAAA,oBAAAN,EAAA,SAAA,CAAAC,EAAA;AAAA,IACqD,EAAA,GAGtG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IAAA;AAGJ,MAAAJ,EAAA,QAAA5B,EAAA,wBACA,MAAA2B,EAAA,GACAM,EAAAQ,EAAA,KAAA;AAAA,IAAyB;AAI7B,IAAAN;AAAA,MAAA,MAAAhB,EAAA;AAAA,MACqB,YAAA;AAGb,YADA,MAAAQ,EAAA,GACA,EAAAG,EAAA,OAIA;AAAA,cAAAX,EAAA,SAAA,CAAAuB,EAAA,SACII,GAAA;AAEI,oBAAA;AAAA,cAAQ,0BAAA3B,EAAA,KAAA;AAAA,YACsC;AAE9C;AAAA,UAAA;AAIR,UAAAA,EAAA,UAAAsB,EAAA,SACIT,EAAA,MAAA,KAAAb,EAAA,KAAA;AAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAItB,UAAA4B,IAAAb,EAAAhC,EAAA,GACA,EAAA,gBAAA8C,EAAA,IAAAD,EAAA3B,EAAA,MAAA;AAGA,WAAA6B,EAAA,MAAAD,EAAA,CAAA;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dialog-page.QpRiNPyx.js","sources":["../../../ui-assets/icons-16/dist/vue/arrow-left.vue","../../src/components/internal/dialog-page/dialog-page.types.ts","../../src/components/internal/dialog-page/dialog-page.keys.ts","../../src/components/internal/dialog-page/dialog-page.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","import { type Ref } from 'vue';\n\nexport enum BentoDialogPageAnimation {\n TRANSITION_LEVEL_DEEPER = 'b-dialog-page__animation--level-deeper',\n TRANSITION_LEVEL_UPPER = 'b-dialog-page__animation--level-upper',\n}\n\nexport interface BentoDialogPageConfigData {\n activePage: Ref<string>;\n animation: Ref<string>;\n isAnimationActive?: Ref<boolean>;\n isOpen: Ref<boolean>;\n pages: Ref<Array<string>>;\n previousPages: Ref<Array<string>>;\n updatePage: (page: string) => void;\n}\n\nexport type BentoDialogPageRegisterPage = (pageId: string) => { unregisterPage: () => void };\n","export const DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY = Symbol('dialog registerPage injection key');\nexport const DIALOG_PAGE_CONFIG_INJECTION_KEY = Symbol('dialog page config data injection key');\n","<template>\n <Transition :name=\"animation\" mode=\"out-in\" @after-leave=\"updateAnimation\" @leave=\"startAnimation\">\n <div v-if=\"isOpen && showPage\" class=\"b-dialog-page\">\n <div v-if=\"hasSlot('header')\" class=\"b-dialog-page__header\" :class=\"headerConditionalClasses\">\n <div\n v-if=\"showBackButton\"\n class=\"b-dialog-page__back-button\"\n :style=\"backButtonStyling\"\n data-testid=\"back-button\"\n >\n <bento-button variant=\"tertiary\" @click=\"goToPreviousPage(previousPage)\">\n <arrow-left-icon :svg-title=\"t('goToPreviousPage')\" />\n </bento-button>\n </div>\n <slot name=\"header\"></slot>\n </div>\n <div\n v-if=\"hasSlot('content')\"\n ref=\"contentElement\"\n class=\"b-dialog-page__content\"\n :tabindex=\"isScrollable ? 0 : null\"\n @scroll=\"onScroll\"\n >\n <slot name=\"content\" />\n </div>\n <div v-if=\"hasSlot('footer')\" class=\"b-dialog-page__footer\" :class=\"footerConditionalClasses\">\n <slot name=\"footer\" />\n </div>\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, nextTick, onUnmounted, type PropType, ref, useSlots, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import ArrowLeftIcon from '@adyen/ui-assets-icons-16/vue/arrow-left';\n\n import { useHasSlot } from '@/composables/use-has-slot/use-has-slot';\n import { useI18n } from '@/utils/ts/i18n';\n import { isDevelopmentEnviroment } from '@/utils/ts/dev-environment';\n\n import {\n BentoDialogPageAnimation,\n type BentoDialogPageConfigData,\n type BentoDialogPageRegisterPage,\n } from './dialog-page.types';\n import type { CSSProperties } from 'vue/types/jsx.d.ts';\n\n import { DIALOG_PAGE_CONFIG_INJECTION_KEY, DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY } from './dialog-page.keys';\n\n import messages from './messages.json';\n import { useScroll } from '@vueuse/core';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * Identifier of the page, used with activePage prop to handle navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Show header and actions border\n */\n alwaysShowBorder: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Pass custom styling to the back button to position it correctly with the header slot\n */\n backButtonStyling: { type: Object as PropType<CSSProperties>, default: null },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n });\n\n const emit = defineEmits([\"animationend\"]);\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n // Refs\n const contentElement = ref<HTMLDivElement>(null);\n const hasScroll = ref(false);\n\n const { arrivedState } = useScroll(contentElement);\n\n // Logic to choose which page is active/shown\n const showPage = computed(() => (activePage.value ? activePage.value === props.pageId : true));\n\n // Scrolling styling logic\n const headerConditionalClasses = computed(() => ({\n 'b-dialog-page__header--with-border': props.alwaysShowBorder || (hasScroll.value && !arrivedState.top),\n }));\n\n const footerConditionalClasses = computed(() => ({\n 'b-dialog-page__footer--with-border': props.alwaysShowBorder || (hasScroll.value && !arrivedState.bottom),\n }));\n\n const isScrollable = computed(() => !(arrivedState.bottom && arrivedState.top));\n\n const onScroll = () => {\n if (!contentElement.value) {\n return;\n }\n };\n\n const calculateScroll = async watchedValue => {\n if (!watchedValue) {\n return;\n }\n // Wait for content to be rendered to be able to calculate the height\n await nextTick();\n hasScroll.value = contentElement.value && contentElement.value.scrollHeight > contentElement.value.clientHeight;\n };\n\n const { activePage, animation, isAnimationActive, isOpen, pages, previousPages, updatePage } =\n inject<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY);\n\n watch(() => isOpen.value, calculateScroll, { immediate: true });\n watch(() => showPage.value, calculateScroll, { immediate: true });\n\n // Logic to determine whether the back button should be shown on the page\n const showBackButton = computed(() => {\n if (props.previousPage) {\n return true;\n }\n if (props.previousPage === null) {\n return false;\n }\n return hasPreviousPages.value && showPage.value;\n });\n\n // Animation\n const updateAnimation = () => {\n animation.value = BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER;\n if (isAnimationActive) {\n isAnimationActive.value = false;\n }\n\n emit('animationend');\n };\n\n const startAnimation = () => {\n if (isAnimationActive) {\n isAnimationActive.value = true;\n }\n };\n\n // Previous page logic\n const hasPreviousPages = computed(() => previousPages.value.length > 1);\n const lastPage = computed(() => previousPages.value[previousPages.value.length - 1]);\n const isActivePageValid = computed(() => pages.value.some(page => page === activePage.value));\n\n const goToPreviousPage = async (page: string) => {\n if (page) {\n const index = previousPages.value.indexOf(page);\n if (index !== -1) {\n previousPages.value = previousPages.value.slice(0, index + 1);\n } else {\n previousPages.value = [page];\n }\n } else {\n previousPages.value.pop();\n }\n\n animation.value = BentoDialogPageAnimation.TRANSITION_LEVEL_UPPER;\n await nextTick();\n updatePage(lastPage.value);\n };\n\n // Add new page to the previousPage array to keep track of user navigation\n watch(\n () => activePage.value,\n async () => {\n await nextTick();\n if (!isOpen.value) {\n return;\n }\n\n if (!!activePage.value && !isActivePageValid.value) {\n if (isDevelopmentEnviroment) {\n // eslint-disable-next-line no-console\n console.error(\n `The activePage passed \"${activePage.value}\" does not match the id of any of the pages`\n );\n return;\n }\n }\n\n if (activePage.value !== lastPage.value) {\n previousPages.value.push(activePage.value);\n }\n },\n { immediate: true }\n );\n\n // Register page to parent component and inject data from parent component\n const registerPage = inject<BentoDialogPageRegisterPage>(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY);\n const { unregisterPage } = registerPage(props.pageId);\n\n // Unregister page on unmounting the page\n onUnmounted(() => unregisterPage());\n</script>\n\n<script lang=\"ts\">\n /**\n * DialogPage is an internal component used to render different pages of dialog components (Modal, ModalFullscreen and Sidepanel)\n *\n * @example\n * import { DialogPage } from '@/internal';\n *\n * export default {\n * components: { DialogPage },\n * template: `\n * <dialog-page pageId='step1' always-show-border>\n * <template #header>Header</template>\n * <template #content>Content</template>\n * <template #footer>Footer</template>\n * </dialog-page>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./dialog-page.scss\" />\n"],"names":["uuid","_sfc_main$1","BentoDialogPageAnimation","BentoDialogPageAnimation2","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","DIALOG_PAGE_CONFIG_INJECTION_KEY","__default__","messages","slots","useSlots","hasSlot","useHasSlot","t","useI18n","contentElement","ref","hasScroll","arrivedState","useScroll","showPage","computed","activePage","props","headerConditionalClasses","footerConditionalClasses","isScrollable","onScroll","calculateScroll","watchedValue","nextTick","animation","isAnimationActive","isOpen","pages","previousPages","updatePage","inject","watch","showBackButton","hasPreviousPages","updateAnimation","emit","startAnimation","lastPage","isActivePageValid","page","goToPreviousPage","index","isDevelopmentEnviroment","registerPage","unregisterPage","onUnmounted"],"mappings":";;;;;;;;;AAOA,IAAAA,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;ACZY,IAAAE,IAAA,kBAAAC,OACRA,EAAA,0BAAA,0CACAA,EAAA,yBAAA,yCAFQA,IAAAD,KAAA,CAAA,CAAA;ACFC,MAAAE,KAAA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;;;;;;;;;;;;;"}
@@ -0,0 +1,43 @@
1
+ import { n as M, t as s, a as l } from "./getTimezoneOffsetInMilliseconds.C-aIpRfB.js";
2
+ function g(r, t, e) {
3
+ const [n, a] = M(
4
+ e == null ? void 0 : e.in,
5
+ r,
6
+ t
7
+ ), f = n.getFullYear() - a.getFullYear(), c = n.getMonth() - a.getMonth();
8
+ return f * 12 + c;
9
+ }
10
+ function d(r, t) {
11
+ const e = s(r, t == null ? void 0 : t.in);
12
+ return e.setHours(23, 59, 59, 999), e;
13
+ }
14
+ function _(r, t) {
15
+ const e = s(r, t == null ? void 0 : t.in), n = e.getMonth();
16
+ return e.setFullYear(e.getFullYear(), n + 1, 0), e.setHours(23, 59, 59, 999), e;
17
+ }
18
+ function m(r, t) {
19
+ const e = s(r, t == null ? void 0 : t.in);
20
+ return +d(e, t) == +_(e, t);
21
+ }
22
+ function i(r, t, e) {
23
+ const [n, a, f] = M(
24
+ e == null ? void 0 : e.in,
25
+ r,
26
+ r,
27
+ t
28
+ ), c = l(a, f), u = Math.abs(
29
+ g(a, f)
30
+ );
31
+ if (u < 1) return 0;
32
+ a.getMonth() === 1 && a.getDate() > 27 && a.setDate(30), a.setMonth(a.getMonth() - c * u);
33
+ let h = l(a, f) === -c;
34
+ m(n) && u === 1 && l(n, f) === 1 && (h = !1);
35
+ const D = c * (u - +h);
36
+ return D === 0 ? 0 : D;
37
+ }
38
+ export {
39
+ _ as a,
40
+ i as d,
41
+ d as e
42
+ };
43
+ //# sourceMappingURL=differenceInMonths.DcFDl4eH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"differenceInMonths.DcFDl4eH.js","sources":["../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInCalendarMonths.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/endOfDay.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/endOfMonth.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isLastDayOfMonth.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInMonths.js"],"sourcesContent":["import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link differenceInCalendarMonths} function options.\n */\n\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nexport function differenceInCalendarMonths(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();\n const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();\n\n return yearsDiff * 12 + monthsDiff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarMonths;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfDay} function options.\n */\n\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a day\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\nexport function endOfDay(date, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfDay;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfMonth} function options.\n */\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n","import { endOfDay } from \"./endOfDay.js\";\nimport { endOfMonth } from \"./endOfMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isLastDayOfMonth\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * @param date - The date to check\n * @param options - An object with options\n *\n * @returns The date is the last day of a month\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * const result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\nexport function isLastDayOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n return +endOfDay(_date, options) === +endOfMonth(_date, options);\n}\n\n// Fallback for modularized imports:\nexport default isLastDayOfMonth;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { compareAsc } from \"./compareAsc.js\";\nimport { differenceInCalendarMonths } from \"./differenceInCalendarMonths.js\";\nimport { isLastDayOfMonth } from \"./isLastDayOfMonth.js\";\n\n/**\n * The {@link differenceInMonths} function options.\n */\n\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of full months\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\nexport function differenceInMonths(laterDate, earlierDate, options) {\n const [laterDate_, workingLaterDate, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n laterDate,\n earlierDate,\n );\n\n const sign = compareAsc(workingLaterDate, earlierDate_);\n const difference = Math.abs(\n differenceInCalendarMonths(workingLaterDate, earlierDate_),\n );\n\n if (difference < 1) return 0;\n\n if (workingLaterDate.getMonth() === 1 && workingLaterDate.getDate() > 27)\n workingLaterDate.setDate(30);\n\n workingLaterDate.setMonth(workingLaterDate.getMonth() - sign * difference);\n\n let isLastMonthNotFull = compareAsc(workingLaterDate, earlierDate_) === -sign;\n\n if (\n isLastDayOfMonth(laterDate_) &&\n difference === 1 &&\n compareAsc(laterDate_, earlierDate_) === 1\n ) {\n isLastMonthNotFull = false;\n }\n\n const result = sign * (difference - +isLastMonthNotFull);\n return result === 0 ? 0 : result;\n}\n\n// Fallback for modularized imports:\nexport default differenceInMonths;\n"],"names":["differenceInCalendarMonths","laterDate","earlierDate","options","laterDate_","earlierDate_","normalizeDates","yearsDiff","monthsDiff","endOfDay","date","_date","toDate","endOfMonth","month","isLastDayOfMonth","differenceInMonths","workingLaterDate","sign","compareAsc","difference","isLastMonthNotFull","result"],"mappings":";AA4BO,SAASA,EAA2BC,GAAWC,GAAaC,GAAS;AAC1E,QAAM,CAACC,GAAYC,CAAY,IAAIC;AAAA,IACjCH,KAAA,gBAAAA,EAAS;AAAA,IACTF;AAAA,IACAC;AAAA,EACD,GAEKK,IAAYH,EAAW,YAAW,IAAKC,EAAa,YAAa,GACjEG,IAAaJ,EAAW,SAAQ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;AAGvB,QAAMC,IAASJ,KAAQE,IAAa,CAACC;AACrC,SAAOC,MAAW,IAAI,IAAIA;AAC5B;","x_google_ignoreList":[0,1,2,3,4]}
@@ -1 +1 @@
1
- {"version":3,"file":"directive.Cbdox5VL.js","sources":["../../src/directives/click-outside/directive.ts"],"sourcesContent":["import { onClickOutside } from './on-click-outside';\nimport type { DirectiveHook } from 'vue';\n\ntype Element = HTMLElement & { __onClickOutside_stop?: () => void };\n\n/**\n * Attaches the click outside listener to target element to register clicks outside the element.\n * @param targetElement Element to attach listener to.\n * @param binding\n */\nconst bindDirective: DirectiveHook<Element> = (targetElement, binding) => {\n const capture = !binding.modifiers.bubble;\n if (typeof binding.value === 'function') {\n // eslint-disable-next-line no-underscore-dangle, no-param-reassign\n targetElement.__onClickOutside_stop = onClickOutside(targetElement, binding.value, { capture });\n } else {\n const [handler, options] = binding.value;\n // eslint-disable-next-line no-underscore-dangle, no-param-reassign\n targetElement.__onClickOutside_stop = onClickOutside(targetElement, handler, { capture, ...options });\n }\n};\n\n/**\n * Removes click outside listener from the target element.\n * @param targetElement Element to detach listener from.\n */\nconst unbindDirective: DirectiveHook<Element> = targetElement => {\n // eslint-disable-next-line no-underscore-dangle\n targetElement.__onClickOutside_stop();\n};\n\nexport const BentoClickOutsideDirective = {\n // Vue 2 Directive hooks\n inserted: bindDirective,\n unbind: unbindDirective,\n\n // Vue 3 Directive hooks\n beforeMount: bindDirective,\n unmounted: unbindDirective,\n};\n"],"names":["bindDirective","targetElement","binding","capture","onClickOutside","handler","options","unbindDirective","BentoClickOutsideDirective"],"mappings":";AAUA,MAAMA,IAAwC,CAACC,GAAeC,MAAY;AACtE,QAAMC,IAAU,CAACD,EAAQ,UAAU;AACnC,MAAI,OAAOA,EAAQ,SAAU;AAEzB,IAAAD,EAAc,wBAAwBG,EAAeH,GAAeC,EAAQ,OAAO,EAAE,SAAAC,GAAS;AAAA,OAC3F;AACH,UAAM,CAACE,GAASC,CAAO,IAAIJ,EAAQ;AAEnC,IAAAD,EAAc,wBAAwBG,EAAeH,GAAeI,GAAS,EAAE,SAAAF,GAAS,GAAGG,GAAS;AAAA,EACxG;AACJ,GAMMC,IAA0C,CAAAN,MAAiB;AAE7D,EAAAA,EAAc,sBAAA;AAClB,GAEaO,IAA6B;AAAA;AAAA,EAEtC,UAAUR;AAAA,EACV,QAAQO;AAAA;AAAA,EAGR,aAAaP;AAAA,EACb,WAAWO;AACf;"}
1
+ {"version":3,"file":"directive.Cbdox5VL.js","sources":["../../src/directives/click-outside/directive.ts"],"sourcesContent":["import { onClickOutside } from './on-click-outside';\nimport type { DirectiveHook } from 'vue';\n\ntype Element = HTMLElement & { __onClickOutside_stop?: () => void };\n\n/**\n * Attaches the click outside listener to target element to register clicks outside the element.\n * @param targetElement Element to attach listener to.\n * @param binding\n */\nconst bindDirective: DirectiveHook<Element> = (targetElement, binding) => {\n const capture = !binding.modifiers.bubble;\n if (typeof binding.value === 'function') {\n // eslint-disable-next-line no-underscore-dangle, no-param-reassign\n targetElement.__onClickOutside_stop = onClickOutside(targetElement, binding.value, { capture });\n } else {\n const [handler, options] = binding.value;\n // eslint-disable-next-line no-underscore-dangle, no-param-reassign\n targetElement.__onClickOutside_stop = onClickOutside(targetElement, handler, { capture, ...options });\n }\n};\n\n/**\n * Removes click outside listener from the target element.\n * @param targetElement Element to detach listener from.\n */\nconst unbindDirective: DirectiveHook<Element> = targetElement => {\n // eslint-disable-next-line no-underscore-dangle\n targetElement.__onClickOutside_stop();\n};\n\nexport const BentoClickOutsideDirective = {\n // Vue 2 Directive hooks\n inserted: bindDirective,\n unbind: unbindDirective,\n\n // Vue 3 Directive hooks\n beforeMount: bindDirective,\n unmounted: unbindDirective,\n};\n"],"names":["bindDirective","targetElement","binding","capture","onClickOutside","handler","options","unbindDirective","BentoClickOutsideDirective"],"mappings":";AAUA,MAAMA,IAAwC,CAACC,GAAeC,MAAY;AAChE,QAAAC,IAAU,CAACD,EAAQ,UAAU;AAC/B,MAAA,OAAOA,EAAQ,SAAU;AAEzB,IAAAD,EAAc,wBAAwBG,EAAeH,GAAeC,EAAQ,OAAO,EAAE,SAAAC,GAAS;AAAA,OAC3F;AACH,UAAM,CAACE,GAASC,CAAO,IAAIJ,EAAQ;AAErB,IAAAD,EAAA,wBAAwBG,EAAeH,GAAeI,GAAS,EAAE,SAAAF,GAAS,GAAGG,GAAS;AAAA,EAAA;AAE5G,GAMMC,IAA0C,CAAiBN,MAAA;AAE7D,EAAAA,EAAc,sBAAsB;AACxC,GAEaO,IAA6B;AAAA;AAAA,EAEtC,UAAUR;AAAA,EACV,QAAQO;AAAA;AAAA,EAGR,aAAaP;AAAA,EACb,WAAWO;AACf;"}
@@ -1 +1 @@
1
- {"version":3,"file":"divider.DX5gwN7p.js","sources":["../../src/components/divider/divider.keys.ts","../../src/components/divider/divider.types.ts","../../src/components/divider/divider.vue"],"sourcesContent":["export const DIVIDER_INVERSE_INJECTION_KEY = Symbol('divider inverse style injection key');\n","/**\n * Private types\n */\nexport enum BentoDividerVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\n/**\n * Public types\n */\nexport interface BentoDividerProps {\n /**\n * Renders the divider in a horizontal or vertical variant\n */\n variant?: `${BentoDividerVariant}`;\n}\n","<template>\n <div class=\"b-divider\">\n <div\n v-if=\"isVerticalVariant\"\n role=\"separator\"\n aria-orientation=\"vertical\"\n class=\"b-divider__rule b-divider__rule--vertical\"\n :class=\"conditionalClasses\"\n ></div>\n <hr v-else class=\"b-divider__rule b-divider__rule--horizontal\" :class=\"conditionalClasses\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref } from 'vue';\n import { DIVIDER_INVERSE_INJECTION_KEY } from './divider.keys';\n import { type BentoDividerProps, BentoDividerVariant } from './divider.types';\n\n const props = defineProps({\n variant: { default: BentoDividerVariant.HORIZONTAL }\n});\n\n const isInverseColorSet = inject(DIVIDER_INVERSE_INJECTION_KEY, ref(false));\n\n const isVerticalVariant = computed(() => props.variant === BentoDividerVariant.VERTICAL);\n\n const conditionalClasses = computed(() => ({\n 'b-divider--inverse': isInverseColorSet.value,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Divider component is a thin line that helps separate content and group them visually into sections.\n *\n * @example\n * import { BentoDivider } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDivider },\n * template: `<bento-divider />`\n * }\n */\n\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./divider.scss\" />\n"],"names":["DIVIDER_INVERSE_INJECTION_KEY","BentoDividerVariant","BentoDividerVariant2","__default__","isInverseColorSet","inject","ref","isVerticalVariant","computed","props","conditionalClasses"],"mappings":";;;AAAO,MAAAA,IAAA,uBAAA,qCAAA;ACGA,IAAAC,IAAA,kBAAAC,OACHA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;ACyCR,MAAAE,IAAA,CAAA;;;;;;;iBAtBAC,IAAAC,EAAAL,GAAAM,EAAA,EAAA,CAAA,GAEAC,IAAAC,EAAA,MAAAC,EAAA,YAAAR,EAAA,QAAA,GAEAS,IAAAF,EAAA,OAAA;AAAA,MAA2C,sBAAAJ,EAAA;AAAA,IACC,EAAA;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"divider.DX5gwN7p.js","sources":["../../src/components/divider/divider.keys.ts","../../src/components/divider/divider.types.ts","../../src/components/divider/divider.vue"],"sourcesContent":["export const DIVIDER_INVERSE_INJECTION_KEY = Symbol('divider inverse style injection key');\n","/**\n * Private types\n */\nexport enum BentoDividerVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\n/**\n * Public types\n */\nexport interface BentoDividerProps {\n /**\n * Renders the divider in a horizontal or vertical variant\n */\n variant?: `${BentoDividerVariant}`;\n}\n","<template>\n <div class=\"b-divider\">\n <div\n v-if=\"isVerticalVariant\"\n role=\"separator\"\n aria-orientation=\"vertical\"\n class=\"b-divider__rule b-divider__rule--vertical\"\n :class=\"conditionalClasses\"\n ></div>\n <hr v-else class=\"b-divider__rule b-divider__rule--horizontal\" :class=\"conditionalClasses\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref } from 'vue';\n import { DIVIDER_INVERSE_INJECTION_KEY } from './divider.keys';\n import { type BentoDividerProps, BentoDividerVariant } from './divider.types';\n\n const props = defineProps({\n variant: { default: BentoDividerVariant.HORIZONTAL }\n});\n\n const isInverseColorSet = inject(DIVIDER_INVERSE_INJECTION_KEY, ref(false));\n\n const isVerticalVariant = computed(() => props.variant === BentoDividerVariant.VERTICAL);\n\n const conditionalClasses = computed(() => ({\n 'b-divider--inverse': isInverseColorSet.value,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Divider component is a thin line that helps separate content and group them visually into sections.\n *\n * @example\n * import { BentoDivider } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDivider },\n * template: `<bento-divider />`\n * }\n */\n\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./divider.scss\" />\n"],"names":["DIVIDER_INVERSE_INJECTION_KEY","BentoDividerVariant","BentoDividerVariant2","__default__","isInverseColorSet","inject","ref","isVerticalVariant","computed","props","conditionalClasses"],"mappings":";;;AAAa,MAAAA,IAAA,uBAAA,qCAAA;ACGD,IAAAC,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;ACyCR,MAAAE,IAAA,CAAA;;;;;;;iBAtBAC,IAAAC,EAAAL,GAAAM,EAAA,EAAA,CAAA,GAEAC,IAAAC,EAAA,MAAAC,EAAA,YAAAR,EAAA,QAAA,GAEAS,IAAAF,EAAA,OAAA;AAAA,MAA2C,sBAAAJ,EAAA;AAAA,IACC,EAAA;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-default-textbox.Cq68tN9F.js","sources":["../../src/components/dropdown/dropdown.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue"],"sourcesContent":["import type {\n BentoListboxEmptyStateProps as BentoDropdownEmptyStateProps,\n BentoListboxSearchOptions as BentoDropdownSearchOptions,\n BentoListboxVirtulisationOptions as BentoDropdownVirtulisationOptions,\n BentoListboxIsOptionDisabled,\n BentoListboxLazyLoadType,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n} from '../../types/listbox';\nimport { type FormField } from '../../types/form-field';\nexport type { BentoDropdownSearchOptions, BentoDropdownEmptyStateProps, BentoDropdownVirtulisationOptions };\nexport interface BentoDropdownProps extends FormField {\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n * Defines a string value that labels an interactive element.\n */\n ariaLabel?: string;\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed?: boolean;\n /**\n * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState?: BentoDropdownEmptyStateProps;\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering?: boolean;\n /**\n * Highlights the dropdown in an erroneous state.\n * @deprecated Use \"errorMessage\" prop instead\n */\n error?: boolean;\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems?: boolean;\n /**\n * Function that dertermines which options are disabled from interaction.\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled?: BentoListboxIsOptionDisabled;\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoListboxOptionItem }\n * @property value.label - Text to be displayed in the option\n * @property value.value - Value of the option\n */\n items?: BentoListboxOptions;\n /**\n * Indicates if new options are lazy loading.\n */\n loading?: boolean;\n /**\n * Indicates that dropdown items are loading\n */\n componentLoading?: boolean;\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType?: BentoListboxLazyLoadType | `${BentoListboxLazyLoadType}`;\n /**\n * If enabled, the user will be able to select multiple items.\n */\n multiple?: boolean;\n /**\n * Dropdown search options and events.\n * @see BentoDropdownSearchOptions\n */\n search?: BentoDropdownSearchOptions;\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple?: boolean;\n /**\n * @deprecated Do not use. Only 'default' size should be used.\n */\n size?: BentoDropdownSize | `${BentoDropdownSize}`;\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories?: boolean;\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n * @deprecated for usage with properties since version 2.0. Use `v-model` or `model-value` instead.\n */\n value?: BentoListboxSelectedValue;\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n */\n modelValue?: BentoListboxSelectedValue;\n /**\n * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll?: BentoDropdownVirtulisationOptions;\n /**\n * Enables value/label value handling. When `true`, the component expects and emits value/label\n * pair objects instead of primitive values.\n *\n * This affects both the `value` prop and the `input` event payload.\n *\n * - **Input (`value` prop):** Expects a `{ value: string | number, label: string }` object (or an array of them for multi-select).\n * - **Output (`input` event):** Emits a `{ value: string | number, label: string }` object (or an array of them) upon selection.\n *\n * This is particularly useful when a selected item's label is not available in the `items` prop,\n * allowing the component to display the correct label for values loaded from external sources.\n * @default false\n */\n enableValueLabelPair?: boolean;\n}\n\n/**\n * @deprecated Do not use. Only 'default' size should be used.\n */\nexport enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n\nexport {\n /**\n * @deprecated since version 2.0. Use the string literal instead.\n */\n BentoListboxLazyLoadType as BentoDropdownLazyLoadType,\n BentoListboxEvent as BentoDropdownEvent,\n} from '@/types/listbox';\n","import { type PropType } from 'vue';\nimport { type Booleanish } from '@/types/prop-types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'dropdown-base-open',\n KEYDOWN = 'dropdown-base-keydown',\n CLOSE = 'dropdown-base-close',\n INPUT = 'dropdown-base-input',\n CLEAR = 'dropdown-base-clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <input\n v-if=\"shouldShowInput\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n aria-autocomplete=\"list\"\n size=\"1\"\n :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n :required=\"isRequired\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onToggleDropdown\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n :class=\"comboboxConditionalClasses\"\n :aria-readonly=\"readonly ? 'true' : null\"\n role=\"combobox\"\n :tabindex=\"disabled ? -1 : 0\"\n >\n <template v-if=\"shouldShowSingleSelectSlot\">\n <slot v-if=\"hasSlot('display-value')\" v-bind=\"selectedValueItem\" name=\"display-value\"></slot>\n <slot v-else v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n </template>\n <template v-else-if=\"shouldShowMultipleSlot\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n :tabindex=\"disabled ? -1 : 0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-small-icon v-if=\"size === BentoDropdownSize.SMALL\" :svg-title=\"t('clearSearch')\" />\n <cross-circle-fill-icon v-else :svg-title=\"t('clearSearch')\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, nextTick, type PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { debounce } from '@/utils/ts/debounce';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * If the combobox DOM element should be an `input` element.\n */\n alwaysComboboxIsInput: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: { type: String, default: null },\n\n /**\n * Custom debounce time for the user type event.\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * Dropdown size\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: null,\n },\n });\n\n const emit = defineEmits([]);\n\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n }));\n\n const isRequired = computed(() => attrs['required'] as Booleanish);\n\n const comboboxConditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox__input--dynamic-filtering`]: props.dynamicFiltering,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value && props.open);\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n 'aria-required': shouldShowInput.value ? null : isRequired.value,\n }) as HTMLAttributes\n );\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as Array<BentoListboxOptionItem>) : []\n );\n\n const shouldShowInput = computed(() => props.dynamicFiltering && (props.open || props.alwaysComboboxIsInput));\n const shouldShowSingleSelectSlot = computed(() => props.selectedValueItem && !props.multiple);\n const shouldShowMultipleSlot = computed(\n () =>\n props.multiple &&\n props.selectedValueItem &&\n selectedValueItems.value.length > 0 &&\n props.showSlotContentInMultiple\n );\n\n watch(\n () => shouldShowInput.value,\n () => {\n if (shouldShowInput.value && !props.alwaysComboboxIsInput) {\n nextTick(() => {\n textbox.value.focus();\n });\n }\n }\n );\n\n const onOpenDropdown = async () => {\n if (!props.disabled && !props.readonly) {\n emit(DropdownBaseTextboxEvent.OPEN);\n // wait for popover to open before setting focus\n await nextTick();\n textbox.value.focus();\n }\n };\n\n const onCloseDropdown = () => {\n if (props.open) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent = props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n const onInputEvent = debounce<(event: Event) => void>((event: Event) => {\n if (!props.readonly && !props.disabled) {\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n }, props.debounceTime);\n\n const focus = () => {\n textbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'dropdown-base-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n ref=\"baseTextbox\"\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope ?? {}\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, defineComponent, type PropType, ref, useSlots } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import { stopEventPropagation } from '@/utils/ts/events';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n const emit = defineEmits([\"clear\", \"close\", \"input\", \"keydown\", \"open\"]);\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n });\n\n const baseTextbox = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n 'b-dropdown-default-textbox--condensed': props.condensed,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (newInput: string) => {\n emit('input', newInput);\n };\n const onKeyDown = (e: KeyboardEvent) => {\n emit('keydown', e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('open');\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('close');\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit('clear');\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n const focus = () => {\n baseTextbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n"],"names":["BentoDropdownSize","BentoDropdownSize2","DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","__default__$1","defineComponent","messages","t","useI18n","attrs","useAttrs","slots","useSlots","hasSlot","useHasSlot","textbox","ref","textboxId","generateUid","conditionalClasses","computed","props","isRequired","comboboxConditionalClasses","isFiltering","ariaAttributes","_a","shouldShowInput","selectedValueItems","shouldShowSingleSelectSlot","shouldShowMultipleSlot","watch","nextTick","onOpenDropdown","emit","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","focus","expose","__default__","baseTextbox","isDropdownOpen","onInput","newInput","onKeyDown","e","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":";;;;;;;;;;;;;AA8HO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,UAAA,wBACAA,EAAA,QAAA,sBAFQA,IAAAD,KAAA,CAAA,CAAA,GCpDLE,IAAA,kBAAAC,OACHA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQLE,IAAA,kBAAAC,OACHA,EAAA,OAAA,sBACAA,EAAA,UAAA,yBACAA,EAAA,QAAA,uBACAA,EAAA,QAAA,uBACAA,EAAA,QAAA,uBALQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;GCqPRE,IAAAC,EAAA;AAAA,EAA+B,MAAA,EAAA,UAAAC,EAAA;AAAA,EACV,MAAA;AAAA,EACX,cAAA;AAEV,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAtOA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAA,GACAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GA4GAI,IAAAC,EAAA,IAA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/components/dropdown/dropdown.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue"],"sourcesContent":["import type {\n BentoListboxEmptyStateProps as BentoDropdownEmptyStateProps,\n BentoListboxSearchOptions as BentoDropdownSearchOptions,\n BentoListboxVirtulisationOptions as BentoDropdownVirtulisationOptions,\n BentoListboxIsOptionDisabled,\n BentoListboxLazyLoadType,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n} from '../../types/listbox';\nimport { type FormField } from '../../types/form-field';\nexport type { BentoDropdownSearchOptions, BentoDropdownEmptyStateProps, BentoDropdownVirtulisationOptions };\nexport interface BentoDropdownProps extends FormField {\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n * Defines a string value that labels an interactive element.\n */\n ariaLabel?: string;\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed?: boolean;\n /**\n * Empty state props used with the inner empty state component which is displayed when no search results are found.\n */\n emptyState?: BentoDropdownEmptyStateProps;\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering?: boolean;\n /**\n * Highlights the dropdown in an erroneous state.\n * @deprecated Use \"errorMessage\" prop instead\n */\n error?: boolean;\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems?: boolean;\n /**\n * Function that dertermines which options are disabled from interaction.\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - Dropdown option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled?: BentoListboxIsOptionDisabled;\n /**\n * The option elements to populate the dropdown with.\n * It must be an array of {@see BentoListboxOptionItem }\n * @property value.label - Text to be displayed in the option\n * @property value.value - Value of the option\n */\n items?: BentoListboxOptions;\n /**\n * Indicates if new options are lazy loading.\n */\n loading?: boolean;\n /**\n * Indicates that dropdown items are loading\n */\n componentLoading?: boolean;\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType?: BentoListboxLazyLoadType | `${BentoListboxLazyLoadType}`;\n /**\n * If enabled, the user will be able to select multiple items.\n */\n multiple?: boolean;\n /**\n * Dropdown search options and events.\n * @see BentoDropdownSearchOptions\n */\n search?: BentoDropdownSearchOptions;\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple?: boolean;\n /**\n * @deprecated Do not use. Only 'default' size should be used.\n */\n size?: BentoDropdownSize | `${BentoDropdownSize}`;\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories?: boolean;\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n * @deprecated for usage with properties since version 2.0. Use `v-model` or `model-value` instead.\n */\n value?: BentoListboxSelectedValue;\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n */\n modelValue?: BentoListboxSelectedValue;\n /**\n * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll?: BentoDropdownVirtulisationOptions;\n /**\n * Enables value/label value handling. When `true`, the component expects and emits value/label\n * pair objects instead of primitive values.\n *\n * This affects both the `value` prop and the `input` event payload.\n *\n * - **Input (`value` prop):** Expects a `{ value: string | number, label: string }` object (or an array of them for multi-select).\n * - **Output (`input` event):** Emits a `{ value: string | number, label: string }` object (or an array of them) upon selection.\n *\n * This is particularly useful when a selected item's label is not available in the `items` prop,\n * allowing the component to display the correct label for values loaded from external sources.\n * @default false\n */\n enableValueLabelPair?: boolean;\n}\n\n/**\n * @deprecated Do not use. Only 'default' size should be used.\n */\nexport enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n\nexport {\n /**\n * @deprecated since version 2.0. Use the string literal instead.\n */\n BentoListboxLazyLoadType as BentoDropdownLazyLoadType,\n BentoListboxEvent as BentoDropdownEvent,\n} from '@/types/listbox';\n","import { type PropType } from 'vue';\nimport { type Booleanish } from '@/types/prop-types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'dropdown-base-open',\n KEYDOWN = 'dropdown-base-keydown',\n CLOSE = 'dropdown-base-close',\n INPUT = 'dropdown-base-input',\n CLEAR = 'dropdown-base-clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <input\n v-if=\"shouldShowInput\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n aria-autocomplete=\"list\"\n size=\"1\"\n :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n :required=\"isRequired\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onToggleDropdown\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n :class=\"comboboxConditionalClasses\"\n :aria-readonly=\"readonly ? 'true' : null\"\n role=\"combobox\"\n :tabindex=\"disabled ? -1 : 0\"\n >\n <template v-if=\"shouldShowSingleSelectSlot\">\n <slot v-if=\"hasSlot('display-value')\" v-bind=\"selectedValueItem\" name=\"display-value\"></slot>\n <slot v-else v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n </template>\n <template v-else-if=\"shouldShowMultipleSlot\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n :tabindex=\"disabled ? -1 : 0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-small-icon v-if=\"size === BentoDropdownSize.SMALL\" :svg-title=\"t('clearSearch')\" />\n <cross-circle-fill-icon v-else :svg-title=\"t('clearSearch')\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, nextTick, type PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { debounce } from '@/utils/ts/debounce';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * If the combobox DOM element should be an `input` element.\n */\n alwaysComboboxIsInput: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: { type: String, default: null },\n\n /**\n * Custom debounce time for the user type event.\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * Dropdown size\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: null,\n },\n });\n\n const emit = defineEmits([]);\n\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n }));\n\n const isRequired = computed(() => attrs['required'] as Booleanish);\n\n const comboboxConditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox__input--dynamic-filtering`]: props.dynamicFiltering,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value && props.open);\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n 'aria-required': shouldShowInput.value ? null : isRequired.value,\n }) as HTMLAttributes\n );\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as Array<BentoListboxOptionItem>) : []\n );\n\n const shouldShowInput = computed(() => props.dynamicFiltering && (props.open || props.alwaysComboboxIsInput));\n const shouldShowSingleSelectSlot = computed(() => props.selectedValueItem && !props.multiple);\n const shouldShowMultipleSlot = computed(\n () =>\n props.multiple &&\n props.selectedValueItem &&\n selectedValueItems.value.length > 0 &&\n props.showSlotContentInMultiple\n );\n\n watch(\n () => shouldShowInput.value,\n () => {\n if (shouldShowInput.value && !props.alwaysComboboxIsInput) {\n nextTick(() => {\n textbox.value.focus();\n });\n }\n }\n );\n\n const onOpenDropdown = async () => {\n if (!props.disabled && !props.readonly) {\n emit(DropdownBaseTextboxEvent.OPEN);\n // wait for popover to open before setting focus\n await nextTick();\n textbox.value.focus();\n }\n };\n\n const onCloseDropdown = () => {\n if (props.open) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent = props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n const onInputEvent = debounce<(event: Event) => void>((event: Event) => {\n if (!props.readonly && !props.disabled) {\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n }, props.debounceTime);\n\n const focus = () => {\n textbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'dropdown-base-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n ref=\"baseTextbox\"\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope ?? {}\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, defineComponent, type PropType, ref, useSlots } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { type Booleanish } from '@/types/prop-types';\n import { type BentoListboxOptionItem } from '@/types/listbox';\n import { stopEventPropagation } from '@/utils/ts/events';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n const emit = defineEmits([\"clear\", \"close\", \"input\", \"keydown\", \"open\"]);\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | Array<BentoListboxOptionItem>>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n });\n\n const baseTextbox = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n 'b-dropdown-default-textbox--condensed': props.condensed,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (newInput: string) => {\n emit('input', newInput);\n };\n const onKeyDown = (e: KeyboardEvent) => {\n emit('keydown', e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('open');\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('close');\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit('clear');\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n const focus = () => {\n baseTextbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n"],"names":["BentoDropdownSize","BentoDropdownSize2","DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","__default__$1","defineComponent","messages","t","useI18n","attrs","useAttrs","slots","useSlots","hasSlot","useHasSlot","textbox","ref","textboxId","generateUid","conditionalClasses","computed","props","isRequired","comboboxConditionalClasses","isFiltering","ariaAttributes","_a","shouldShowInput","selectedValueItems","shouldShowSingleSelectSlot","shouldShowMultipleSlot","watch","nextTick","onOpenDropdown","emit","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","focus","expose","__default__","baseTextbox","isDropdownOpen","onInput","newInput","onKeyDown","e","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":";;;;;;;;;;;;;AA8HY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,wBACAA,EAAA,QAAA,sBAFQA,IAAAD,KAAA,CAAA,CAAA,GCpDAE,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,sBACAA,EAAA,UAAA,yBACAA,EAAA,QAAA,uBACAA,EAAA,QAAA,uBACAA,EAAA,QAAA,uBALQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;GCqPRE,IAAAC,EAAA;AAAA,EAA+B,MAAA,EAAA,UAAAC,EAAA;AAAA,EACV,MAAA;AAAA,EACX,cAAA;AAEV,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAtOA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAA,GACAC,IAAA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;;;;"}
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as u, computed as w, toRefs as g, ref as v, watch as V } from "vue";
2
2
  import { B as D } from "./avatar.CUCH3CTc.js";
3
- import { B as p, u as C } from "./dropdown.Dt0_ZUBn.js";
3
+ import { B as p, u as C } from "./dropdown.C2pXf8Li.js";
4
4
  import { u as _ } from "./form-field.D_2g7vaP.js";
5
5
  import { d as i, B as b } from "./typography.Bq-EGj9y.js";
6
6
  import { n as f } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
7
- import { u as M } from "./use-country-items.B3Cd3Tdo.js";
8
- import { B as h } from "./country.types.C0Q_hhgJ.js";
7
+ import { u as M } from "./use-country-items.ClS_So5N.js";
8
+ import { B as h } from "./country.types.DaVCMxk-.js";
9
9
  import { L as $ } from "./listbox-option-tag.BlDz7oXK.js";
10
10
  import { B as T } from "./payment-method.BKXLPDC9.js";
11
11
  import "../assets/dropdown-tag.css";
@@ -291,4 +291,4 @@ export {
291
291
  le as d,
292
292
  _e as e
293
293
  };
294
- //# sourceMappingURL=dropdown-tag.AYIB0ec5.js.map
294
+ //# sourceMappingURL=dropdown-tag.HBM0wrEV.js.map