@adyen/bento-vue2 1.84.2 → 1.85.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 (339) hide show
  1. package/dist/@types/components.d.ts +4 -0
  2. package/dist/@types/index.d.ts +244 -130
  3. package/dist/action-bar.js +1 -1
  4. package/dist/ai-tag.js +5 -0
  5. package/dist/ai-tag.js.map +1 -0
  6. package/dist/assets/accordion-item.css +1 -1
  7. package/dist/assets/action-bar.css +1 -1
  8. package/dist/assets/ai-tag.css +1 -0
  9. package/dist/assets/base-modal.css +1 -1
  10. package/dist/assets/button-actions.css +1 -1
  11. package/dist/assets/card.css +1 -1
  12. package/dist/assets/checkbox.css +1 -1
  13. package/dist/assets/data-grid.css +1 -1
  14. package/dist/assets/date-range-picker.css +1 -1
  15. package/dist/assets/dialog-page.css +1 -1
  16. package/dist/assets/draggable-handle.css +1 -0
  17. package/dist/assets/file-uploader.css +1 -1
  18. package/dist/assets/filter-bar.css +1 -1
  19. package/dist/assets/form-layout-title.css +1 -1
  20. package/dist/assets/inspector.css +1 -1
  21. package/dist/assets/layout-row.css +1 -1
  22. package/dist/assets/modal-fullscreen.css +1 -1
  23. package/dist/assets/radio-group.css +1 -1
  24. package/dist/assets/sidepanel.css +1 -1
  25. package/dist/assets/use-cached-selected-values.css +1 -1
  26. package/dist/button.js +2 -2
  27. package/dist/card.js +1 -1
  28. package/dist/checkbox.js +2 -2
  29. package/dist/chunks/1-generic-use.CZhwP2Yc.js.map +1 -1
  30. package/dist/chunks/1-generic-use.R6x8PEGA.js.map +1 -1
  31. package/dist/chunks/2-generic-use.CNKjB4B7.js.map +1 -1
  32. package/dist/chunks/2-generic-use.w0fUhovx.js.map +1 -1
  33. package/dist/chunks/3-generic-use.BLEzR04g.js.map +1 -1
  34. package/dist/chunks/3-generic-use.D3NFHgI4.js.map +1 -1
  35. package/dist/chunks/4-generic-use.CULEpvgj.js.map +1 -1
  36. package/dist/chunks/4-generic-use.D82y3n39.js.map +1 -1
  37. package/dist/chunks/accordion-item.DeV8s0oW.js.map +1 -1
  38. package/dist/chunks/action-bar.rgLdy6Bu.js +163 -0
  39. package/dist/chunks/action-bar.rgLdy6Bu.js.map +1 -0
  40. package/dist/chunks/adding-payment-methods.BJZLPxtM.js.map +1 -1
  41. package/dist/chunks/adding-payment-methods.Dle8zt43.js.map +1 -1
  42. package/dist/chunks/adyen-giving.Ffw_DlJK.js.map +1 -1
  43. package/dist/chunks/adyen-giving.LiKHj_jY.js.map +1 -1
  44. package/dist/chunks/ai-button.ggEcDV08.js +50 -0
  45. package/dist/chunks/ai-button.ggEcDV08.js.map +1 -0
  46. package/dist/chunks/ai-tag.DKMGiQcJ.js +74 -0
  47. package/dist/chunks/ai-tag.DKMGiQcJ.js.map +1 -0
  48. package/dist/chunks/alert.B3Pdp02a.js.map +1 -1
  49. package/dist/chunks/aria-label.CaUURpnB.js.map +1 -1
  50. package/dist/chunks/arrow-left.CRREfabP.js +24 -0
  51. package/dist/chunks/arrow-left.CRREfabP.js.map +1 -0
  52. package/dist/chunks/arrow-right.Dn3AYpUP.js +24 -0
  53. package/dist/chunks/arrow-right.Dn3AYpUP.js.map +1 -0
  54. package/dist/chunks/artificial-intelligence-ai-filled.C6TMsiHK.js +24 -0
  55. package/dist/chunks/artificial-intelligence-ai-filled.C6TMsiHK.js.map +1 -0
  56. package/dist/chunks/avatar.CUCH3CTc.js.map +1 -1
  57. package/dist/chunks/base-button.IN4bpcds.js.map +1 -1
  58. package/dist/chunks/{base-modal.KYkLKswF.js → base-modal.QsjzGei_.js} +5 -5
  59. package/dist/chunks/{base-modal.KYkLKswF.js.map → base-modal.QsjzGei_.js.map} +1 -1
  60. package/dist/chunks/{button-actions-with-menu.B5mKwc-F.js → button-actions-with-menu.PL45aAcI.js} +3 -3
  61. package/dist/chunks/{button-actions-with-menu.B5mKwc-F.js.map → button-actions-with-menu.PL45aAcI.js.map} +1 -1
  62. package/dist/chunks/{button-actions.D9n7MxWe.js → button-actions.JRDi9PFT.js} +2 -2
  63. package/dist/chunks/{button-actions.D9n7MxWe.js.map → button-actions.JRDi9PFT.js.map} +1 -1
  64. package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
  65. package/dist/chunks/button.DIU6m9wD.js.map +1 -1
  66. package/dist/chunks/{calendar.C8DpZ4Sr.js → calendar.B0SmuooF.js} +95 -89
  67. package/dist/chunks/{calendar.C8DpZ4Sr.js.map → calendar.B0SmuooF.js.map} +1 -1
  68. package/dist/chunks/{card.CLX0RGG6.js → card.CVkEg8m1.js} +2 -2
  69. package/dist/chunks/{card.CLX0RGG6.js.map → card.CVkEg8m1.js.map} +1 -1
  70. package/dist/chunks/{checkbox-group.BCnhjQie.js → checkbox-group.DPZJjcdT.js} +4 -4
  71. package/dist/chunks/{checkbox-group.BCnhjQie.js.map → checkbox-group.DPZJjcdT.js.map} +1 -1
  72. package/dist/chunks/{checkbox.CU5ierOq.js → checkbox.D3D1I22O.js} +3 -3
  73. package/dist/chunks/{checkbox.CU5ierOq.js.map → checkbox.D3D1I22O.js.map} +1 -1
  74. package/dist/chunks/click-outside.C1Ud8AA2.js.map +1 -1
  75. package/dist/chunks/{code-snippet.9MwDHp50.js → code-snippet.BN5P-KQo.js} +4 -4
  76. package/dist/chunks/{code-snippet.9MwDHp50.js.map → code-snippet.BN5P-KQo.js.map} +1 -1
  77. package/dist/chunks/codemirror.Cy7iSLbd.js.map +1 -1
  78. package/dist/chunks/constructNow.B8T1ljs6.js +8 -0
  79. package/dist/chunks/{constructNow.DuaJst0D.js.map → constructNow.B8T1ljs6.js.map} +1 -1
  80. package/dist/chunks/{controls-group.D4eW9DtP.js → controls-group.BwXz0UYr.js} +2 -2
  81. package/dist/chunks/{controls-group.D4eW9DtP.js.map → controls-group.BwXz0UYr.js.map} +1 -1
  82. package/dist/chunks/{copy.C0q7xgXs.js → copy.BIh04KTY.js} +3 -3
  83. package/dist/chunks/{copy.C0q7xgXs.js.map → copy.BIh04KTY.js.map} +1 -1
  84. package/dist/chunks/country.types.DaVCMxk-.js.map +1 -1
  85. package/dist/chunks/currency.DYZr_RDk.js.map +1 -1
  86. package/dist/chunks/{dashboard-section.B83FdC0Z.js → dashboard-section.BvFMd9CQ.js} +3 -3
  87. package/dist/chunks/{dashboard-section.B83FdC0Z.js.map → dashboard-section.BvFMd9CQ.js.map} +1 -1
  88. package/dist/chunks/{dashed-underline.DQGVy5T2.js → dashed-underline.CXyMT-cF.js} +3 -3
  89. package/dist/chunks/{dashed-underline.DQGVy5T2.js.map → dashed-underline.CXyMT-cF.js.map} +1 -1
  90. package/dist/chunks/data-grid-template.keys.VezYtHtM.js.map +1 -1
  91. package/dist/chunks/{data-grid-template.BTEFoEwf.js → data-grid-template.wWWI3FE3.js} +3 -3
  92. package/dist/chunks/{data-grid-template.BTEFoEwf.js.map → data-grid-template.wWWI3FE3.js.map} +1 -1
  93. package/dist/chunks/{data-grid.Bk7_6Z0F.js → data-grid.Dcj_tU8q.js} +426 -419
  94. package/dist/chunks/data-grid.Dcj_tU8q.js.map +1 -0
  95. package/dist/chunks/date-input.BbZqj10S.js.map +1 -1
  96. package/dist/chunks/{date-picker.CnsC_UMG.js → date-picker.Dh3-TgPT.js} +4 -4
  97. package/dist/chunks/{date-picker.CnsC_UMG.js.map → date-picker.Dh3-TgPT.js.map} +1 -1
  98. package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
  99. package/dist/chunks/date-range-picker.BOn_Xjkr.js +897 -0
  100. package/dist/chunks/date-range-picker.BOn_Xjkr.js.map +1 -0
  101. package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
  102. package/dist/chunks/date.DBWzp0So.js.map +1 -1
  103. package/dist/chunks/de.DvtL0g75.js.map +1 -1
  104. package/dist/chunks/debounce.DUTu11PS.js.map +1 -1
  105. package/dist/chunks/delight.CDBAFnwC.js.map +1 -1
  106. package/dist/chunks/delight.xKDCvvaS.js.map +1 -1
  107. package/dist/chunks/dialog-page.BegXhP0L.js +118 -0
  108. package/dist/chunks/dialog-page.BegXhP0L.js.map +1 -0
  109. package/dist/chunks/{differenceInMonths.DcFDl4eH.js → differenceInMonths.BR4Z2HIa.js} +2 -2
  110. package/dist/chunks/{differenceInMonths.DcFDl4eH.js.map → differenceInMonths.BR4Z2HIa.js.map} +1 -1
  111. package/dist/chunks/directive.Cbdox5VL.js.map +1 -1
  112. package/dist/chunks/divider.DX5gwN7p.js.map +1 -1
  113. package/dist/chunks/dropdown-default-textbox.Cq68tN9F.js.map +1 -1
  114. package/dist/chunks/{dropdown-tag.HBM0wrEV.js → dropdown-tag.C7Buz72U.js} +3 -3
  115. package/dist/chunks/{dropdown-tag.HBM0wrEV.js.map → dropdown-tag.C7Buz72U.js.map} +1 -1
  116. package/dist/chunks/{dropdown.C2pXf8Li.js → dropdown.ByH2zHxF.js} +5 -5
  117. package/dist/chunks/{dropdown.C2pXf8Li.js.map → dropdown.ByH2zHxF.js.map} +1 -1
  118. package/dist/chunks/empty-state.DpBnqAxu.js.map +1 -1
  119. package/dist/chunks/en-GB.DCGuCmAv.js.map +1 -1
  120. package/dist/chunks/en-US.BZii9jNW.js.map +1 -1
  121. package/dist/chunks/es.bz0mzkMq.js.map +1 -1
  122. package/dist/chunks/es6.C1DXQV6f.js.map +1 -1
  123. package/dist/chunks/events.BQOQSSb7.js.map +1 -1
  124. package/dist/chunks/{field-label.CEkJnsiL.js → field-label.BKxm8ehO.js} +2 -2
  125. package/dist/chunks/{field-label.CEkJnsiL.js.map → field-label.BKxm8ehO.js.map} +1 -1
  126. package/dist/chunks/{file-uploader.CnOqfuI-.js → file-uploader.U7YUrGoM.js} +4 -4
  127. package/dist/chunks/file-uploader.U7YUrGoM.js.map +1 -0
  128. package/dist/chunks/filter-bar.BRE0djRy.js +3313 -0
  129. package/dist/chunks/filter-bar.BRE0djRy.js.map +1 -0
  130. package/dist/chunks/{focus-trap.CNIU5jOz.js → focus-trap.Ed8RY9cJ.js} +2 -2
  131. package/dist/chunks/{focus-trap.CNIU5jOz.js.map → focus-trap.Ed8RY9cJ.js.map} +1 -1
  132. package/dist/chunks/{footer-actions.BOiN47Xd.js → footer-actions.mS3IiJg7.js} +2 -2
  133. package/dist/chunks/{footer-actions.BOiN47Xd.js.map → footer-actions.mS3IiJg7.js.map} +1 -1
  134. package/dist/chunks/form-field.D_2g7vaP.js.map +1 -1
  135. package/dist/chunks/{form-layout-title.CdC1T4gs.js → form-layout-title.C3uKS3GA.js} +2 -2
  136. package/dist/chunks/{form-layout-title.CdC1T4gs.js.map → form-layout-title.C3uKS3GA.js.map} +1 -1
  137. package/dist/chunks/form-layout.types.bZW9iR6_.js.map +1 -1
  138. package/dist/chunks/fr-CA.B1aPU8fp.js.map +1 -1
  139. package/dist/chunks/fr.Dj7wEToe.js.map +1 -1
  140. package/dist/chunks/generate-uid.NJ8tVoha.js.map +1 -1
  141. package/dist/chunks/getRoundingMethod.C3eaeGLR.js.map +1 -1
  142. package/dist/chunks/{getTimezoneOffsetInMilliseconds.C-aIpRfB.js → getTimezoneOffsetInMilliseconds.Tu2wlbTR.js} +3 -3
  143. package/dist/chunks/{getTimezoneOffsetInMilliseconds.C-aIpRfB.js.map → getTimezoneOffsetInMilliseconds.Tu2wlbTR.js.map} +1 -1
  144. package/dist/chunks/grab.BxiVZ1RZ.js +24 -0
  145. package/dist/chunks/grab.BxiVZ1RZ.js.map +1 -0
  146. package/dist/chunks/grid-layout.1aIiz2N_.js.map +1 -1
  147. package/dist/chunks/{header-meta.D_oAu2S9.js → header-meta.CQTfyEJR.js} +8 -8
  148. package/dist/chunks/{header-meta.D_oAu2S9.js.map → header-meta.CQTfyEJR.js.map} +1 -1
  149. package/dist/chunks/{header-with-views.Dc9LUYNY.js → header-with-views.-PRI2W3p.js} +383 -400
  150. package/dist/chunks/header-with-views.-PRI2W3p.js.map +1 -0
  151. package/dist/chunks/{header.BmtlQmPs.js → header.DDwoZ8fF.js} +3 -3
  152. package/dist/chunks/{header.BmtlQmPs.js.map → header.DDwoZ8fF.js.map} +1 -1
  153. package/dist/chunks/image.C2D2hKat.js.map +1 -1
  154. package/dist/chunks/index.B6WW_F-J.js.map +1 -1
  155. package/dist/chunks/{index.BDK4hwK_.js → index.Zfd79j1_.js} +3 -3
  156. package/dist/chunks/{index.BDK4hwK_.js.map → index.Zfd79j1_.js.map} +1 -1
  157. package/dist/chunks/{info-icon.BEyxQgD6.js → info-icon.gUcRjEyG.js} +3 -3
  158. package/dist/chunks/{info-icon.BEyxQgD6.js.map → info-icon.gUcRjEyG.js.map} +1 -1
  159. package/dist/chunks/{input-field-password.D23H_RvO.js → input-field-password.BO3EMjVD.js} +6 -6
  160. package/dist/chunks/{input-field-password.D23H_RvO.js.map → input-field-password.BO3EMjVD.js.map} +1 -1
  161. package/dist/chunks/{input-field-phone-number.Bvk2Pvec.js → input-field-phone-number.DDQIkRdm.js} +3 -3
  162. package/dist/chunks/{input-field-phone-number.Bvk2Pvec.js.map → input-field-phone-number.DDQIkRdm.js.map} +1 -1
  163. package/dist/chunks/{input-field.hf0_ALq0.js → input-field.BRIDLPBn.js} +3 -3
  164. package/dist/chunks/{input-field.hf0_ALq0.js.map → input-field.BRIDLPBn.js.map} +1 -1
  165. package/dist/chunks/{inspector.C0iAxxoz.js → inspector.DCda4tku.js} +3 -3
  166. package/dist/chunks/{inspector.C0iAxxoz.js.map → inspector.DCda4tku.js.map} +1 -1
  167. package/dist/chunks/inspector.types.DyHwE18g.js.map +1 -1
  168. package/dist/chunks/internal-error.BLZodVBE.js.map +1 -1
  169. package/dist/chunks/internal-error.BmrwJFpR.js.map +1 -1
  170. package/dist/chunks/isSameWeek.5sjhTHiU.js +14 -0
  171. package/dist/chunks/{isSameWeek.CUD7czUN.js.map → isSameWeek.5sjhTHiU.js.map} +1 -1
  172. package/dist/chunks/{it.Oaj6BklL.js → it.DEniTaO2.js} +2 -2
  173. package/dist/chunks/{it.Oaj6BklL.js.map → it.DEniTaO2.js.map} +1 -1
  174. package/dist/chunks/ja.Cm9tJMi2.js.map +1 -1
  175. package/dist/chunks/keyboard-navigation.DWmhelVv.js.map +1 -1
  176. package/dist/chunks/ko.Ceaof6EP.js.map +1 -1
  177. package/dist/chunks/{layout-row.BPX00mio.js → layout-row.BtCzzLTz.js} +3 -3
  178. package/dist/chunks/layout-row.BtCzzLTz.js.map +1 -0
  179. package/dist/chunks/link.PsTSQjK3.js.map +1 -1
  180. package/dist/chunks/{listbox-option-tag.BlDz7oXK.js → listbox-option-tag.B63aT5Sq.js} +2 -2
  181. package/dist/chunks/{listbox-option-tag.BlDz7oXK.js.map → listbox-option-tag.B63aT5Sq.js.map} +1 -1
  182. package/dist/chunks/loading-indicator.PxbRzshH.js.map +1 -1
  183. package/dist/chunks/match.CMBZxEs9.js.map +1 -1
  184. package/dist/chunks/minus-small.DJacLGTw.js.map +1 -1
  185. package/dist/chunks/{modal-fullscreen.B1gltlxA.js → modal-fullscreen.CRLZX72M.js} +4 -4
  186. package/dist/chunks/{modal-fullscreen.B1gltlxA.js.map → modal-fullscreen.CRLZX72M.js.map} +1 -1
  187. package/dist/chunks/{modal.e3EQ6Kex.js → modal.BnAZ8Nj1.js} +4 -4
  188. package/dist/chunks/{modal.e3EQ6Kex.js.map → modal.BnAZ8Nj1.js.map} +1 -1
  189. package/dist/chunks/nl.B6vCf2B9.js.map +1 -1
  190. package/dist/chunks/no-results-found.Bg_ZcEid.js.map +1 -1
  191. package/dist/chunks/no-results-found.BqvYsBR6.js.map +1 -1
  192. package/dist/chunks/notifications-cleared.BMZk37uf.js.map +1 -1
  193. package/dist/chunks/notifications-cleared.C7W9ZXY7.js.map +1 -1
  194. package/dist/chunks/on-click-outside.D9aY9g8G.js.map +1 -1
  195. package/dist/chunks/page-not-found.COJLPVaU.js.map +1 -1
  196. package/dist/chunks/page-not-found.DWW6W-PZ.js.map +1 -1
  197. package/dist/chunks/{pagination.BcFt2FqK.js → pagination.spAA5CX0.js} +2 -2
  198. package/dist/chunks/{pagination.BcFt2FqK.js.map → pagination.spAA5CX0.js.map} +1 -1
  199. package/dist/chunks/payment-method.BKXLPDC9.js.map +1 -1
  200. package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
  201. package/dist/chunks/planned-maintenance.C61sWB9h.js.map +1 -1
  202. package/dist/chunks/planned-maintenance.jmWYTdet.js.map +1 -1
  203. package/dist/chunks/popover.types.Zm8nugBw.js +6 -0
  204. package/dist/chunks/{popover.types.WDh5ggr3.js.map → popover.types.Zm8nugBw.js.map} +1 -1
  205. package/dist/chunks/{popper-container.Cdokz_NE.js → popper-container.CXUG6v_U.js} +2 -2
  206. package/dist/chunks/{popper-container.Cdokz_NE.js.map → popper-container.CXUG6v_U.js.map} +1 -1
  207. package/dist/chunks/{promo-banner.yfBorKj7.js → promo-banner.BkLMZH66.js} +2 -2
  208. package/dist/chunks/{promo-banner.yfBorKj7.js.map → promo-banner.BkLMZH66.js.map} +1 -1
  209. package/dist/chunks/pt-BR.CiGdfP45.js.map +1 -1
  210. package/dist/chunks/{radio-group.CtTnfkYg.js → radio-group.B6-Fd_kH.js} +4 -4
  211. package/dist/chunks/{radio-group.CtTnfkYg.js.map → radio-group.B6-Fd_kH.js.map} +1 -1
  212. package/dist/chunks/radio-input.kzb4gxLW.js.map +1 -1
  213. package/dist/chunks/referrals.BvtT-kQS.js.map +1 -1
  214. package/dist/chunks/referrals.aX8WZigH.js.map +1 -1
  215. package/dist/chunks/resize.Bqks3WUm.js.map +1 -1
  216. package/dist/chunks/{rich-text-editor.Dq2CFGOu.js → rich-text-editor.DeywBxSb.js} +4 -4
  217. package/dist/chunks/{rich-text-editor.Dq2CFGOu.js.map → rich-text-editor.DeywBxSb.js.map} +1 -1
  218. package/dist/chunks/{search-bar.B0SdQBnY.js → search-bar.BKRppqyI.js} +3 -3
  219. package/dist/chunks/{search-bar.B0SdQBnY.js.map → search-bar.BKRppqyI.js.map} +1 -1
  220. package/dist/chunks/{secondary-nav.BPGpxd0p.js → secondary-nav.RQ5eRpPH.js} +3 -3
  221. package/dist/chunks/{secondary-nav.BPGpxd0p.js.map → secondary-nav.RQ5eRpPH.js.map} +1 -1
  222. package/dist/chunks/{segmented-control.BtWFda0P.js → segmented-control.BomURsCq.js} +2 -2
  223. package/dist/chunks/{segmented-control.BtWFda0P.js.map → segmented-control.BomURsCq.js.map} +1 -1
  224. package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
  225. package/dist/chunks/{selection-card-group.BryV14qP.js → selection-card-group.gh-fMA9T.js} +4 -4
  226. package/dist/chunks/{selection-card-group.BryV14qP.js.map → selection-card-group.gh-fMA9T.js.map} +1 -1
  227. package/dist/chunks/{sidepanel.NFyZGE57.js → sidepanel.B80Mujpk.js} +5 -5
  228. package/dist/chunks/{sidepanel.NFyZGE57.js.map → sidepanel.B80Mujpk.js.map} +1 -1
  229. package/dist/chunks/{startOfWeek.Dxw2MhGp.js → startOfWeek.CM1KIrNi.js} +2 -2
  230. package/dist/chunks/{startOfWeek.Dxw2MhGp.js.map → startOfWeek.CM1KIrNi.js.map} +1 -1
  231. package/dist/chunks/status.types.Cv5XN4zL.js.map +1 -1
  232. package/dist/chunks/step.BLFXvHL6.js.map +1 -1
  233. package/dist/chunks/{structured-list-item.CptOCpHP.js → structured-list-item.DCEKBtbT.js} +4 -4
  234. package/dist/chunks/{structured-list-item.CptOCpHP.js.map → structured-list-item.DCEKBtbT.js.map} +1 -1
  235. package/dist/chunks/success.DhioLvPD.js.map +1 -1
  236. package/dist/chunks/success.nNwxJRBS.js.map +1 -1
  237. package/dist/chunks/summary-grid.keys.Xx-W5a2w.js.map +1 -1
  238. package/dist/chunks/{summary-grid.types.B1T8_k1m.js → summary-grid.types.BV8FDXGv.js} +5 -5
  239. package/dist/chunks/{summary-grid.types.B1T8_k1m.js.map → summary-grid.types.BV8FDXGv.js.map} +1 -1
  240. package/dist/chunks/sv.f8EfZjMZ.js.map +1 -1
  241. package/dist/chunks/tab.FUMpPsBP.js.map +1 -1
  242. package/dist/chunks/tabs.keys.B4qGhjp2.js.map +1 -1
  243. package/dist/chunks/{tag.B1Ywhgvc.js → tag.CroNYKsL.js} +2 -2
  244. package/dist/chunks/{tag.B1Ywhgvc.js.map → tag.CroNYKsL.js.map} +1 -1
  245. package/dist/chunks/{textarea.riUt0BiI.js → textarea.CtTdhV_G.js} +2 -2
  246. package/dist/chunks/{textarea.riUt0BiI.js.map → textarea.CtTdhV_G.js.map} +1 -1
  247. package/dist/chunks/{timeline-item.CFfW1DoD.js → timeline-item.DCWllef8.js} +6 -6
  248. package/dist/chunks/{timeline-item.CFfW1DoD.js.map → timeline-item.DCWllef8.js.map} +1 -1
  249. package/dist/chunks/toggle.227XgEc7.js.map +1 -1
  250. package/dist/chunks/{tooltip.C6YCavPw.js → tooltip.DxJQHsuI.js} +2 -2
  251. package/dist/chunks/{tooltip.C6YCavPw.js.map → tooltip.DxJQHsuI.js.map} +1 -1
  252. package/dist/chunks/truncate.BfIl_-71.js.map +1 -1
  253. package/dist/chunks/{tutorial.D18LwXVy.js → tutorial.O_vT6Q2b.js} +7 -7
  254. package/dist/chunks/{tutorial.D18LwXVy.js.map → tutorial.O_vT6Q2b.js.map} +1 -1
  255. package/dist/chunks/typography.Bq-EGj9y.js.map +1 -1
  256. package/dist/chunks/upload-files.5wQwbfkp.js.map +1 -1
  257. package/dist/chunks/upload-files.jTQY6y2X.js.map +1 -1
  258. package/dist/chunks/use-bento-toast-controller.MmyZXtME.js.map +1 -1
  259. package/dist/chunks/{use-cached-selected-values.gDWGi5Nk.js → use-cached-selected-values.3YqO69wz.js} +14 -14
  260. package/dist/chunks/{use-cached-selected-values.gDWGi5Nk.js.map → use-cached-selected-values.3YqO69wz.js.map} +1 -1
  261. package/dist/chunks/use-country-items.ClS_So5N.js.map +1 -1
  262. package/dist/chunks/use-country-phon-code.Bui3zD6W.js.map +1 -1
  263. package/dist/chunks/use-default-slot-validator.BDn0wkYP.js.map +1 -1
  264. package/dist/chunks/use-expandable-content-height.GkjjbmPy.js.map +1 -1
  265. package/dist/chunks/use-form-layout-loading.CWbjZiwP.js.map +1 -1
  266. package/dist/chunks/wrong-environment.BOsyKdRI.js.map +1 -1
  267. package/dist/chunks/wrong-environment.BiHTPtbJ.js.map +1 -1
  268. package/dist/chunks/{zh-CN.BzH0fIXr.js → zh-CN.CgIooHto.js} +2 -2
  269. package/dist/chunks/{zh-CN.BzH0fIXr.js.map → zh-CN.CgIooHto.js.map} +1 -1
  270. package/dist/code-snippet.js +1 -1
  271. package/dist/dashboard-template.js +1 -1
  272. package/dist/dashed-underline.js +1 -1
  273. package/dist/data-grid-template.js +1 -1
  274. package/dist/data-grid.js +6 -5
  275. package/dist/date-picker.js +2 -2
  276. package/dist/date-range-picker.js +2 -2
  277. package/dist/draggable-handle.js +157 -0
  278. package/dist/draggable-handle.js.map +1 -0
  279. package/dist/dropdown.js +3 -3
  280. package/dist/file-uploader.js +1 -1
  281. package/dist/filter-bar.js +1 -1
  282. package/dist/focus-trap.js +1 -1
  283. package/dist/form-layout.js +1 -1
  284. package/dist/header-with-views.js +1 -1
  285. package/dist/header.js +1 -1
  286. package/dist/index.js +325 -321
  287. package/dist/index.js.map +1 -1
  288. package/dist/info-icon.js +1 -1
  289. package/dist/input-field-password.js +1 -1
  290. package/dist/input-field-phone-number.js +1 -1
  291. package/dist/input-field.js +1 -1
  292. package/dist/inspector.js +1 -1
  293. package/dist/internal.js +11 -11
  294. package/dist/layout.js +1 -1
  295. package/dist/menu.js +1 -1
  296. package/dist/modal-fullscreen.js +1 -1
  297. package/dist/modal.js +2 -2
  298. package/dist/pagination.js +1 -1
  299. package/dist/popover.js +2 -2
  300. package/dist/popper-container.js +1 -1
  301. package/dist/promo-banner.js +1 -1
  302. package/dist/radio-group.js +1 -1
  303. package/dist/rich-text-editor.js +1 -1
  304. package/dist/search-bar.js +2 -2
  305. package/dist/secondary-nav.js +1 -1
  306. package/dist/segmented-control.js +1 -1
  307. package/dist/selection-card.js +1 -1
  308. package/dist/sidepanel.js +1 -1
  309. package/dist/structured-list.js +1 -1
  310. package/dist/styles/bento-dark.css +5 -0
  311. package/dist/styles/bento-light.css +5 -0
  312. package/dist/styles/bento.css +5 -0
  313. package/dist/styles/legacy.css +5 -0
  314. package/dist/styles/styleguide.css +5 -0
  315. package/dist/summary-grid.js +1 -1
  316. package/dist/tag.js +1 -1
  317. package/dist/textarea.js +1 -1
  318. package/dist/timeline.js +1 -1
  319. package/dist/tutorial.js +1 -1
  320. package/dist/use-form-v4.js.map +1 -1
  321. package/dist/web-types.json +212 -6
  322. package/package.json +8 -8
  323. package/dist/chunks/action-bar.y4tcdk7R.js +0 -162
  324. package/dist/chunks/action-bar.y4tcdk7R.js.map +0 -1
  325. package/dist/chunks/ai-button.BEy4Gly-.js +0 -67
  326. package/dist/chunks/ai-button.BEy4Gly-.js.map +0 -1
  327. package/dist/chunks/constructNow.DuaJst0D.js +0 -8
  328. package/dist/chunks/data-grid.Bk7_6Z0F.js.map +0 -1
  329. package/dist/chunks/date-range-picker.B6GSRjjK.js +0 -1693
  330. package/dist/chunks/date-range-picker.B6GSRjjK.js.map +0 -1
  331. package/dist/chunks/dialog-page.QpRiNPyx.js +0 -137
  332. package/dist/chunks/dialog-page.QpRiNPyx.js.map +0 -1
  333. package/dist/chunks/file-uploader.CnOqfuI-.js.map +0 -1
  334. package/dist/chunks/filter-bar.CnJAxz9B.js +0 -2559
  335. package/dist/chunks/filter-bar.CnJAxz9B.js.map +0 -1
  336. package/dist/chunks/header-with-views.Dc9LUYNY.js.map +0 -1
  337. package/dist/chunks/isSameWeek.CUD7czUN.js +0 -14
  338. package/dist/chunks/layout-row.BPX00mio.js.map +0 -1
  339. package/dist/chunks/popover.types.WDh5ggr3.js +0 -6
@@ -0,0 +1,118 @@
1
+ import { defineComponent as V, useSlots as U, ref as C, computed as n, inject as B, watch as m, nextTick as P, onUnmounted as H } from "vue";
2
+ import { B as J } from "./button.DIU6m9wD.js";
3
+ import { A as F } from "./arrow-left.CRREfabP.js";
4
+ import { u as K } from "./use-has-slot.C9lQZ6nz.js";
5
+ import { u as Y } from "./index.B6WW_F-J.js";
6
+ import { i as $ } from "./typography.Bq-EGj9y.js";
7
+ import { c as z } from "./index.Zfd79j1_.js";
8
+ import { n as q } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
9
+ import "../assets/dialog-page.css";
10
+ var h = /* @__PURE__ */ ((l) => (l.TRANSITION_LEVEL_DEEPER = "b-dialog-page__animation--level-deeper", l.TRANSITION_LEVEL_UPPER = "b-dialog-page__animation--level-upper", l))(h || {});
11
+ const M = /* @__PURE__ */ Symbol("dialog registerPage injection key"), Q = /* @__PURE__ */ Symbol("dialog page config data injection key"), W = {
12
+ "en-US": {
13
+ goToPreviousPage: "Go to previous page"
14
+ },
15
+ "ja-JP": {
16
+ goToPreviousPage: "前のページに移動"
17
+ },
18
+ "pt-BR": {
19
+ goToPreviousPage: "Ir para a página anterior"
20
+ }
21
+ }, X = {
22
+ i18n: { messages: W }
23
+ }, Z = /* @__PURE__ */ V({
24
+ ...X,
25
+ __name: "dialog-page",
26
+ props: {
27
+ /**
28
+ * Identifier of the page, used with activePage prop to handle navigation
29
+ */
30
+ pageId: {
31
+ type: String,
32
+ default: void 0
33
+ },
34
+ /**
35
+ * Show header and actions border
36
+ */
37
+ alwaysShowBorder: {
38
+ type: Boolean,
39
+ default: !1
40
+ },
41
+ /**
42
+ * Pass custom styling to the back button to position it correctly with the header slot
43
+ */
44
+ backButtonStyling: { type: Object, default: null },
45
+ /**
46
+ * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior
47
+ * Used when the back button should not take the user to the natural previous page
48
+ * Set to `null` to hide back button in the page
49
+ */
50
+ previousPage: {
51
+ type: String,
52
+ default: void 0
53
+ }
54
+ },
55
+ emits: ["animationend"],
56
+ setup(l, { emit: t }) {
57
+ const a = l, e = U(), S = K(e), { t: N } = Y(), r = C(null), v = C(!1), { arrivedState: u } = z(r), g = n(() => s.value ? s.value === a.pageId : !0), O = n(() => ({
58
+ "b-dialog-page__header--with-border": a.alwaysShowBorder || v.value && !u.top
59
+ })), L = n(() => ({
60
+ "b-dialog-page__footer--with-border": a.alwaysShowBorder || v.value && !u.bottom
61
+ })), R = n(() => !(u.bottom && u.top)), k = () => {
62
+ r.value;
63
+ }, d = async (i) => {
64
+ i && (await P(), v.value = r.value && r.value.scrollHeight > r.value.clientHeight);
65
+ }, { activePage: s, animation: _, isAnimationActive: c, isOpen: p, pages: b, previousPages: o, updatePage: E } = B(Q);
66
+ m(() => p.value, d, { immediate: !0 }), m(() => g.value, d, { immediate: !0 });
67
+ const G = n(() => a.previousPage ? !0 : a.previousPage === null ? !1 : I.value && g.value), x = () => {
68
+ _.value = h.TRANSITION_LEVEL_DEEPER, c && (c.value = !1), t("animationend");
69
+ }, D = () => {
70
+ c && (c.value = !0);
71
+ }, I = n(() => o.value.length > 1), f = n(() => o.value[o.value.length - 1]), y = n(() => b.value.some((i) => i === s.value)), j = async (i) => {
72
+ if (i) {
73
+ const A = o.value.indexOf(i);
74
+ A !== -1 ? o.value = o.value.slice(0, A + 1) : o.value = [i];
75
+ } else
76
+ o.value.pop();
77
+ _.value = h.TRANSITION_LEVEL_UPPER, await P(), E(f.value);
78
+ };
79
+ m(
80
+ () => s.value,
81
+ async () => {
82
+ if (await P(), !!p.value) {
83
+ if (s.value && !y.value && $) {
84
+ console.error(
85
+ `The activePage passed "${s.value}" does not match the id of any of the pages`
86
+ );
87
+ return;
88
+ }
89
+ s.value !== f.value && o.value.push(s.value);
90
+ }
91
+ },
92
+ { immediate: !0 }
93
+ );
94
+ const T = B(M), { unregisterPage: w } = T(a.pageId);
95
+ return H(() => w()), { __sfc: !0, props: a, emit: t, slots: e, hasSlot: S, t: N, contentElement: r, hasScroll: v, arrivedState: u, showPage: g, headerConditionalClasses: O, footerConditionalClasses: L, isScrollable: R, onScroll: k, calculateScroll: d, activePage: s, animation: _, isAnimationActive: c, isOpen: p, pages: b, previousPages: o, updatePage: E, showBackButton: G, updateAnimation: x, startAnimation: D, hasPreviousPages: I, lastPage: f, isActivePageValid: y, goToPreviousPage: j, registerPage: T, unregisterPage: w, BentoButton: J, ArrowLeftIcon: F };
96
+ }
97
+ });
98
+ var ee = function() {
99
+ var t = this, a = t._self._c, e = t._self._setupProxy;
100
+ return a("Transition", { attrs: { name: e.animation, mode: "out-in" }, on: { "after-leave": e.updateAnimation, leave: e.startAnimation } }, [e.isOpen && e.showPage ? a("div", { staticClass: "b-dialog-page" }, [e.hasSlot("header") ? a("div", { staticClass: "b-dialog-page__header", class: e.headerConditionalClasses }, [e.showBackButton ? a("div", { staticClass: "b-dialog-page__back-button", style: t.backButtonStyling, attrs: { "data-testid": "back-button" } }, [a(e.BentoButton, { attrs: { variant: "tertiary" }, on: { click: function(S) {
101
+ return e.goToPreviousPage(t.previousPage);
102
+ } } }, [a(e.ArrowLeftIcon, { attrs: { "svg-title": e.t("goToPreviousPage") } })], 1)], 1) : t._e(), t._t("header")], 2) : t._e(), e.hasSlot("content") ? a("div", { ref: "contentElement", staticClass: "b-dialog-page__content", attrs: { tabindex: e.isScrollable ? 0 : null }, on: { scroll: e.onScroll } }, [t._t("content")], 2) : t._e(), e.hasSlot("footer") ? a("div", { staticClass: "b-dialog-page__footer", class: e.footerConditionalClasses }, [t._t("footer")], 2) : t._e()]) : t._e()]);
103
+ }, ae = [], te = /* @__PURE__ */ q(
104
+ Z,
105
+ ee,
106
+ ae,
107
+ !1,
108
+ null,
109
+ "8bfb8442"
110
+ );
111
+ const ve = te.exports;
112
+ export {
113
+ h as B,
114
+ ve as D,
115
+ M as a,
116
+ Q as b
117
+ };
118
+ //# sourceMappingURL=dialog-page.BegXhP0L.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog-page.BegXhP0L.js","sources":["../../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":["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":["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":";;;;;;;;;AAEO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,0BAAA,0CACAA,EAAA,yBAAA,yCAFQA,IAAAD,KAAA,CAAA,CAAA;ACFL,MAAAE,IAAA,uBAAA,mCAAA,GACAC,IAAA,uBAAA,uCAAA;;;;;;;;;;GC4OHC,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBApJAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GACA,EAAA,GAAAI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,MAAA,SAAA,CAAA,GACAS,IAAAvB,EAAA,MAAAc,EAAA,MAAAA,EAAA,MAAA,SAAA,CAAA,CAAA,GACAU,IAAAxB,EAAA,MAAAa,EAAA,MAAA,KAAA,CAAAY,MAAAA,MAAAxB,EAAA,KAAA,CAAA,GAEAyB,IAAA,OAAAD,MAAA;AACI,UAAAA,GAAA;AACI,cAAAE,IAAAb,EAAA,MAAA,QAAAW,CAAA;AACA,QAAAE,MAAA,KACIb,EAAA,QAAAA,EAAA,MAAA,MAAA,GAAAa,IAAA,CAAA,IAEAb,EAAA,QAAA,CAAAW,CAAA;AAAA,MACJ;AAEA,QAAAX,EAAA,MAAA,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,CAAA,GACA,EAAA,gBAAA8C,EAAA,IAAAD,EAAA3B,EAAA,MAAA;AAGA,WAAA6B,EAAA,MAAAD,EAAA,CAAA;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { n as M, t as s, a as l } from "./getTimezoneOffsetInMilliseconds.C-aIpRfB.js";
1
+ import { n as M, t as s, a as l } from "./getTimezoneOffsetInMilliseconds.Tu2wlbTR.js";
2
2
  function g(r, t, e) {
3
3
  const [n, a] = M(
4
4
  e == null ? void 0 : e.in,
@@ -40,4 +40,4 @@ export {
40
40
  i as d,
41
41
  d as e
42
42
  };
43
- //# sourceMappingURL=differenceInMonths.DcFDl4eH.js.map
43
+ //# sourceMappingURL=differenceInMonths.BR4Z2HIa.js.map
@@ -1 +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,IAAKC,EAAa,SAAU;AAElE,SAAOE,IAAY,KAAKC;AAC1B;ACXO,SAASC,EAASC,GAAMP,GAAS;AACtC,QAAMQ,IAAQC,EAAOF,GAAMP,KAAA,gBAAAA,EAAS,EAAE;AACtC,SAAAQ,EAAM,SAAS,IAAI,IAAI,IAAI,GAAG,GACvBA;AACT;ACJO,SAASE,EAAWH,GAAMP,GAAS;AACxC,QAAMQ,IAAQC,EAAOF,GAAMP,KAAA,gBAAAA,EAAS,EAAE,GAChCW,IAAQH,EAAM,SAAU;AAC9B,SAAAA,EAAM,YAAYA,EAAM,YAAa,GAAEG,IAAQ,GAAG,CAAC,GACnDH,EAAM,SAAS,IAAI,IAAI,IAAI,GAAG,GACvBA;AACT;ACZO,SAASI,EAAiBL,GAAMP,GAAS;AAC9C,QAAMQ,IAAQC,EAAOF,GAAMP,KAAA,gBAAAA,EAAS,EAAE;AACtC,SAAO,CAACM,EAASE,GAAOR,CAAO,KAAM,CAACU,EAAWF,GAAOR,CAAO;AACjE;ACAO,SAASa,EAAmBf,GAAWC,GAAaC,GAAS;AAClE,QAAM,CAACC,GAAYa,GAAkBZ,CAAY,IAAIC;AAAA,IACnDH,KAAA,gBAAAA,EAAS;AAAA,IACTF;AAAA,IACAA;AAAA,IACAC;AAAA,EACD,GAEKgB,IAAOC,EAAWF,GAAkBZ,CAAY,GAChDe,IAAa,KAAK;AAAA,IACtBpB,EAA2BiB,GAAkBZ,CAAY;AAAA,EAC1D;AAED,MAAIe,IAAa,EAAG,QAAO;AAE3B,EAAIH,EAAiB,SAAU,MAAK,KAAKA,EAAiB,QAAO,IAAK,MACpEA,EAAiB,QAAQ,EAAE,GAE7BA,EAAiB,SAASA,EAAiB,SAAQ,IAAKC,IAAOE,CAAU;AAEzE,MAAIC,IAAqBF,EAAWF,GAAkBZ,CAAY,MAAM,CAACa;AAEzE,EACEH,EAAiBX,CAAU,KAC3BgB,MAAe,KACfD,EAAWf,GAAYC,CAAY,MAAM,MAEzCgB,IAAqB;AAGvB,QAAMC,IAASJ,KAAQE,IAAa,CAACC;AACrC,SAAOC,MAAW,IAAI,IAAIA;AAC5B;","x_google_ignoreList":[0,1,2,3,4]}
1
+ {"version":3,"file":"differenceInMonths.BR4Z2HIa.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,EACJ,GAEQK,IAAYH,EAAW,YAAW,IAAKC,EAAa,YAAW,GAC/DG,IAAaJ,EAAW,SAAQ,IAAKC,EAAa,SAAQ;AAEhE,SAAOE,IAAY,KAAKC;AAC1B;ACXO,SAASC,EAASC,GAAMP,GAAS;AACtC,QAAMQ,IAAQC,EAAOF,GAAMP,KAAA,gBAAAA,EAAS,EAAE;AACtC,SAAAQ,EAAM,SAAS,IAAI,IAAI,IAAI,GAAG,GACvBA;AACT;ACJO,SAASE,EAAWH,GAAMP,GAAS;AACxC,QAAMQ,IAAQC,EAAOF,GAAMP,KAAA,gBAAAA,EAAS,EAAE,GAChCW,IAAQH,EAAM,SAAQ;AAC5B,SAAAA,EAAM,YAAYA,EAAM,YAAW,GAAIG,IAAQ,GAAG,CAAC,GACnDH,EAAM,SAAS,IAAI,IAAI,IAAI,GAAG,GACvBA;AACT;ACZO,SAASI,EAAiBL,GAAMP,GAAS;AAC9C,QAAMQ,IAAQC,EAAOF,GAAMP,KAAA,gBAAAA,EAAS,EAAE;AACtC,SAAO,CAACM,EAASE,GAAOR,CAAO,KAAM,CAACU,EAAWF,GAAOR,CAAO;AACjE;ACAO,SAASa,EAAmBf,GAAWC,GAAaC,GAAS;AAClE,QAAM,CAACC,GAAYa,GAAkBZ,CAAY,IAAIC;AAAA,IACnDH,KAAA,gBAAAA,EAAS;AAAA,IACTF;AAAA,IACAA;AAAA,IACAC;AAAA,EACJ,GAEQgB,IAAOC,EAAWF,GAAkBZ,CAAY,GAChDe,IAAa,KAAK;AAAA,IACtBpB,EAA2BiB,GAAkBZ,CAAY;AAAA,EAC7D;AAEE,MAAIe,IAAa,EAAG,QAAO;AAE3B,EAAIH,EAAiB,SAAQ,MAAO,KAAKA,EAAiB,QAAO,IAAK,MACpEA,EAAiB,QAAQ,EAAE,GAE7BA,EAAiB,SAASA,EAAiB,SAAQ,IAAKC,IAAOE,CAAU;AAEzE,MAAIC,IAAqBF,EAAWF,GAAkBZ,CAAY,MAAM,CAACa;AAEzE,EACEH,EAAiBX,CAAU,KAC3BgB,MAAe,KACfD,EAAWf,GAAYC,CAAY,MAAM,MAEzCgB,IAAqB;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;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
+ {"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 +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":";;;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
+ {"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 +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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;AACI,MAAAb,EAAA,SAAAa,CAAA;AAAA,IAAsB,GAE1BC,IAAA,CAAAC,MAAA;AACI,MAAAf,EAAA,WAAAe,CAAA;AAAA,IAAiB,GAErBC,IAAA,CAAAD,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAf,EAAA,MAAA;AAAA,IAAW,GAEfkB,IAAA,CAAAH,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAf,EAAA,OAAA;AAAA,IAAY,GAEhBmB,IAAA,CAAAJ,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAf,EAAA,OAAA;AAAA,IAAY,GAGhBoB,IAAA;AAAA,MAAkB,CAAApD,EAAA,KAAA,GAAA4C;AAAA,MACoB,CAAA5C,EAAA,IAAA,GAAAgD;AAAA,MACD,CAAAhD,EAAA,KAAA,GAAAkD;AAAA,MACC,CAAAlD,EAAA,KAAA,GAAAmD;AAAA,MACA,CAAAnD,EAAA,OAAA,GAAA8C;AAAA,IACE,GAGxCP,IAAA,MAAA;AACI,MAAAG,EAAA,MAAA,MAAA;AAAA,IAAwB;AAG5B,WAAAF,EAAA;AAAA,MAAa,OAAAD;AAAA,IACT,CAAA;;;;;;;;;;;;;;;;;;;;;"}
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,IAAA,GACAC,IAAAC,EAAA,SAAA,GAEAC,IAAAC,EAAA,OAAA;AAAA,MAA2C,CAAA,4BAAApB,EAAA,QAAA,EAAA,GAAAqB,EAAA;AAAA,MACkC,CAAA,4BAAArB,EAAA,QAAA,EAAA,GAAAqB,EAAA;AAAA,MACA,CAAA,4BAAArB,EAAA,SAAA,EAAA,GAAA,CAAA,CAAAqB,EAAA;AAAA,IACG,EAAA,GAGhFC,IAAAF,EAAA,MAAAX,EAAA,QAAA,GAEAc,IAAAH,EAAA,OAAA;AAAA,MAAmD,qDAAAC,EAAA;AAAA,IACc,EAAA,GAGj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A,EAAA,YAAA,CAAAA,EAAA,QAAA,GAEAyB,IAAA,CAAAC,MAAA;AACI,MAAAb,EAAA,SAAAa,CAAA;AAAA,IAAsB,GAE1BC,IAAA,CAAAC,MAAA;AACI,MAAAf,EAAA,WAAAe,CAAA;AAAA,IAAiB,GAErBC,IAAA,CAAAD,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAf,EAAA,MAAA;AAAA,IAAW,GAEfkB,IAAA,CAAAH,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAf,EAAA,OAAA;AAAA,IAAY,GAEhBmB,IAAA,CAAAJ,MAAA;AACI,MAAAE,EAAAF,CAAA,GACAf,EAAA,OAAA;AAAA,IAAY,GAGhBoB,IAAA;AAAA,MAAkB,CAAApD,EAAA,KAAA,GAAA4C;AAAA,MACoB,CAAA5C,EAAA,IAAA,GAAAgD;AAAA,MACD,CAAAhD,EAAA,KAAA,GAAAkD;AAAA,MACC,CAAAlD,EAAA,KAAA,GAAAmD;AAAA,MACA,CAAAnD,EAAA,OAAA,GAAA8C;AAAA,IACE,GAGxCP,IAAA,MAAA;AACI,MAAAG,EAAA,MAAA,MAAA;AAAA,IAAwB;AAG5B,WAAAF,EAAA;AAAA,MAAa,OAAAD;AAAA,IACT,CAAA;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,12 +1,12 @@
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.C2pXf8Li.js";
3
+ import { B as p, u as C } from "./dropdown.ByH2zHxF.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
7
  import { u as M } from "./use-country-items.ClS_So5N.js";
8
8
  import { B as h } from "./country.types.DaVCMxk-.js";
9
- import { L as $ } from "./listbox-option-tag.BlDz7oXK.js";
9
+ import { L as $ } from "./listbox-option-tag.B63aT5Sq.js";
10
10
  import { B as T } from "./payment-method.BKXLPDC9.js";
11
11
  import "../assets/dropdown-tag.css";
12
12
  const U = u({
@@ -291,4 +291,4 @@ export {
291
291
  le as d,
292
292
  _e as e
293
293
  };
294
- //# sourceMappingURL=dropdown-tag.HBM0wrEV.js.map
294
+ //# sourceMappingURL=dropdown-tag.C7Buz72U.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-tag.HBM0wrEV.js","sources":["../../src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue","../../src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue","../../src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue","../../src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue","../../src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue"],"sourcesContent":["<template>\n <div>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n :items=\"dropdownItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-avatar :username=\"label\" :src=\"data\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { type BentoAvatarListboxOptions } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/components/avatar';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the avatar dropdown with.\n * It must be an array of {@see BentoAvatarListboxOptions }\n * @property {string} value.label - Text to be displayed in the option.\n * @property {string | number} value.value - Value of the option.\n * @property {string} value.src - Image source of the avatar image.\n */\n items: {\n type: Array as PropType<BentoAvatarListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const dropdownItems = computed(() => props.items.map(({ value, label, src }) => ({ value, label, data: src })));\n\n if (props.value) {\n deprecate(\n 'BentoDropdownAvatar \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownAvatar\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Avatar Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownAvatar } from '@adyen/bento-vue2';\n * import type { BentoAvatarListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownAvatar },\n * template: `\n * <bento-dropdown-avatar\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('user-id-1') // Default value\n * const options: BentoAvatarListboxOptions = [\n * { label: 'User 1', value: 'user-id-1' },\n * { label: 'User 2', value: 'user-id-2', src: 'image-source.jpeg' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-avatar',\n model: { prop: 'modelValue' },\n });\n</script>\n","<template>\n <div>\n <bento-dropdown\n v-slot=\"{ label }\"\n v-bind=\"$props\"\n :items=\"countryItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, toRefs } from 'vue';\n import { type BentoCountryListboxOptions } from './dropdown-country.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoTypography } from '@/components/typography';\n import { useCountryItems } from './composables/use-country-items';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoCountryVariant } from '@/components/country';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCountryListboxOptions }\n * * @deprecated {string} value.label - Use BentoDropdown instead of custom labels\n * * @property {BentoCountryCode | string} value.value - Country code of the option\n */\n items: {\n type: Array as PropType<BentoCountryListboxOptions>,\n default: () => [],\n },\n\n /**\n * Which label variant to display.\n * @values iso, name, phone_code, capital\n */\n variant: {\n type: String as PropType<BentoCountryVariant | `${BentoCountryVariant}`>,\n default: BentoCountryVariant.CUSTOM,\n validator: (value: BentoCountryVariant) => Object.values(BentoCountryVariant).includes(value),\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const { variant, items } = toRefs(props);\n const countryItems = useCountryItems(variant, items);\n\n if (variant.value === 'custom' || items.value.some(item => item.label)) {\n deprecate(\n 'BentoDropdownCountry \"custom\" variant and \"items\" prop \"label\" key',\n 'Use any of the other BentoDropdownCountry variants instead OR use BentoDropdown component for custom labels',\n '2.0.0'\n );\n }\n\n if (props.value) {\n deprecate(\n 'BentoDropdownCountry \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownCountry\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Country Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-country\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-country',\n model: { prop: 'modelValue' },\n });\n</script>\n","<template>\n <bento-dropdown\n v-slot=\"slotProps\"\n v-bind=\"$props\"\n :search=\"search\"\n :items=\"filteredItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, ref, watch } from 'vue';\n import type { BentoCurrencyListboxOptions } from './dropdown-currency.types';\n import type { BentoListboxSelectedValue } from '@/types/listbox';\n import { ListboxOptionTag } from '@/internal/listbox/';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useSearchBarFilter } from '@/components/search-bar/useSearchBarDataFilter';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the currency dropdown with.\n * It must be an array of {@see BentoCurrencyListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {BentoCurrencyISOCode} value.code - Currency ISO code of the option\n */\n items: {\n type: Array as PropType<BentoCurrencyListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const filteredItems = ref<BentoCurrencyListboxOptions>([]);\n\n watch(\n () => props.items,\n () => (filteredItems.value = props.items),\n { immediate: true }\n );\n\n const search = props.search\n ? props.search\n : {\n debounceTime: 500,\n searchEvent: async (searchTerm: string) => {\n // Combine value and label to be able to search by the currency code\n const searchableItems = props.items.map(item => ({\n ...item,\n label: `${item.value} ${item.label}`,\n }));\n\n const searchResults = useSearchBarFilter(\n ref(searchTerm),\n ref<BentoCurrencyListboxOptions>(searchableItems),\n props?.search?.searchEvent,\n ref(false)\n ).value;\n\n // Restore original labels by removing the prepended value\n const normalizedResults = searchResults?.map(result => ({\n ...result,\n label: result.label.substring(result.value.length + 1),\n }));\n\n filteredItems.value = normalizedResults;\n },\n };\n\n if (props.value) {\n deprecate(\n 'BentoDropdownCurrency \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownCurrency\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Currency Dropdown showing a selectable list of currencies.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-currency\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-currency',\n model: { prop: 'modelValue' },\n });\n</script>\n","<template>\n <div>\n <bento-dropdown\n class=\"b-dropdown-payment-method\"\n v-bind=\"$props\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <template #display-value=\"{ label, value }\">\n <bento-payment-method :type=\"value\" :label=\"label\" />\n </template>\n\n <template #default=\"{ value, label, description }\">\n <div class=\"b-dropdown-payment-method__item\">\n <bento-payment-method :type=\"value\" :label=\"description ? undefined : label\" />\n\n <div v-if=\"description\" class=\"b-dropdown-payment-method__text\">\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n <bento-typography el=\"span\" class=\"b-dropdown-payment-method__description\">{{\n description\n }}</bento-typography>\n </div>\n </div>\n </template>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType } from 'vue';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import { BentoTypography } from '@/components/typography';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { type BentoPaymentMethodListboxOptions } from './dropdown-payment-method.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the payment method dropdown with.\n * It must be an array of {@see BentoPaymentMethodListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {string} value.value - Payment type code that translates to a payment icon name {@see https://adyen-ui-assets.netlify.app/?path=/story/packages-ui-assets-payment-method-icons--icons}\n */\n items: {\n type: Array as PropType<BentoPaymentMethodListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n if (props.value) {\n deprecate(\n 'BentoDropdownPaymentMethod \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownPaymentMethod\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Payment method Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownPaymentMethod } from '@adyen/bento-vue2';\n * import type { BentoPaymentMethodListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownPaymentMethod },\n * template: `\n * <bento-dropdown-payment-method\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 'Visa'\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('ideal') // Default value\n * const options: BentoPaymentMethodListboxOptions = [\n * { label: 'Option 1', value: 'ideal' },\n * { label: 'Option 2', value: 'visa' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-payment-method',\n model: { prop: 'modelValue' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-payment-method.scss\" />\n","<template>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n class=\"b-dropdown-tag\"\n :items=\"tagItems\"\n show-slot-content-in-multiple\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <listbox-option-tag :option=\"{ value: label, data, label: '' }\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import type { BentoTagListboxOptions } from './dropdown-tag.types';\n import type { BentoListboxSelectedValue } from '@/types/listbox';\n import { ListboxOptionTag } from '../../../../internal';\n import BentoDropdown from '../../../dropdown.vue';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the tag dropdown with.\n * It must be an array of {@see BentoTagListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {string | number} value.value - Value of the option\n * @property {string} value.variant - The BentTag variant shown for the option.\n */\n items: {\n type: Array as PropType<BentoTagListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const tagItems = computed(() => props.items?.map(({ label, value, variant }) => ({ label, value, data: variant })));\n\n if (props.value) {\n deprecate(\n 'BentoDropdownTag \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownTag\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Tag Dropdown showing a selectable list of tags.\n *\n * @example\n * import { BentoDropdownTag } from '@adyen/bento-vue2';\n * import type { BentoTagListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownTag },\n * template: `\n * <bento-dropdown-tag\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('unique-id-1') // Default value\n * const options: BentoTagListboxOptions = [\n * { label: 'Offline', value: 'unique-id-1', variant: 'red' },\n * { label: 'Online', value: 'unique-id-2', variant: 'green' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-tag',\n model: { prop: 'modelValue' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-tag.scss\" />\n"],"names":["__default__$4","defineComponent","emitValue","useFormFieldEmits","emit","onUpdateModelValue","selectedValue","dropdownItems","computed","props","value","label","src","deprecate","__default__$3","variant","items","toRefs","countryItems","useCountryItems","item","__default__$2","filteredItems","ref","watch","search","searchTerm","searchableItems","searchResults","useSearchBarFilter","_a","normalizedResults","result","__default__$1","__default__","tagItems"],"mappings":";;;;;;;;;;;AAsFI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,OAAA,EAAA,MAAA,aAAA;AAEV,CAAA;;;;;;;;;;;;;;;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AAA,GAEA6B,IAAA3B,EAAA,MAAA;;AAAA,cAAAsB,IAAArB,EAAA,UAAA,gBAAAqB,EAAA,IAAA,CAAA,EAAA,OAAAnB,GAAA,OAAAD,GAAA,SAAAK,EAAA,OAAA,EAAA,OAAAJ,GAAA,OAAAD,GAAA,MAAAK,EAAA;AAAA,KAAA;AAEA,WAAAN,EAAA,SACII;AAAA,MAAA;AAAA,MACI;AAAA;AAAA,MACA;AAAA,IAEA;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dropdown-tag.C7Buz72U.js","sources":["../../src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue","../../src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue","../../src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue","../../src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue","../../src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue"],"sourcesContent":["<template>\n <div>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n :items=\"dropdownItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-avatar :username=\"label\" :src=\"data\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { type BentoAvatarListboxOptions } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/components/avatar';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the avatar dropdown with.\n * It must be an array of {@see BentoAvatarListboxOptions }\n * @property {string} value.label - Text to be displayed in the option.\n * @property {string | number} value.value - Value of the option.\n * @property {string} value.src - Image source of the avatar image.\n */\n items: {\n type: Array as PropType<BentoAvatarListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const dropdownItems = computed(() => props.items.map(({ value, label, src }) => ({ value, label, data: src })));\n\n if (props.value) {\n deprecate(\n 'BentoDropdownAvatar \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownAvatar\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Avatar Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownAvatar } from '@adyen/bento-vue2';\n * import type { BentoAvatarListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownAvatar },\n * template: `\n * <bento-dropdown-avatar\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('user-id-1') // Default value\n * const options: BentoAvatarListboxOptions = [\n * { label: 'User 1', value: 'user-id-1' },\n * { label: 'User 2', value: 'user-id-2', src: 'image-source.jpeg' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-avatar',\n model: { prop: 'modelValue' },\n });\n</script>\n","<template>\n <div>\n <bento-dropdown\n v-slot=\"{ label }\"\n v-bind=\"$props\"\n :items=\"countryItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, toRefs } from 'vue';\n import { type BentoCountryListboxOptions } from './dropdown-country.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoTypography } from '@/components/typography';\n import { useCountryItems } from './composables/use-country-items';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoCountryVariant } from '@/components/country';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCountryListboxOptions }\n * * @deprecated {string} value.label - Use BentoDropdown instead of custom labels\n * * @property {BentoCountryCode | string} value.value - Country code of the option\n */\n items: {\n type: Array as PropType<BentoCountryListboxOptions>,\n default: () => [],\n },\n\n /**\n * Which label variant to display.\n * @values iso, name, phone_code, capital\n */\n variant: {\n type: String as PropType<BentoCountryVariant | `${BentoCountryVariant}`>,\n default: BentoCountryVariant.CUSTOM,\n validator: (value: BentoCountryVariant) => Object.values(BentoCountryVariant).includes(value),\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const { variant, items } = toRefs(props);\n const countryItems = useCountryItems(variant, items);\n\n if (variant.value === 'custom' || items.value.some(item => item.label)) {\n deprecate(\n 'BentoDropdownCountry \"custom\" variant and \"items\" prop \"label\" key',\n 'Use any of the other BentoDropdownCountry variants instead OR use BentoDropdown component for custom labels',\n '2.0.0'\n );\n }\n\n if (props.value) {\n deprecate(\n 'BentoDropdownCountry \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownCountry\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Country Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-country\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-country',\n model: { prop: 'modelValue' },\n });\n</script>\n","<template>\n <bento-dropdown\n v-slot=\"slotProps\"\n v-bind=\"$props\"\n :search=\"search\"\n :items=\"filteredItems\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType, ref, watch } from 'vue';\n import type { BentoCurrencyListboxOptions } from './dropdown-currency.types';\n import type { BentoListboxSelectedValue } from '@/types/listbox';\n import { ListboxOptionTag } from '@/internal/listbox/';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { useSearchBarFilter } from '@/components/search-bar/useSearchBarDataFilter';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the currency dropdown with.\n * It must be an array of {@see BentoCurrencyListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {BentoCurrencyISOCode} value.code - Currency ISO code of the option\n */\n items: {\n type: Array as PropType<BentoCurrencyListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const filteredItems = ref<BentoCurrencyListboxOptions>([]);\n\n watch(\n () => props.items,\n () => (filteredItems.value = props.items),\n { immediate: true }\n );\n\n const search = props.search\n ? props.search\n : {\n debounceTime: 500,\n searchEvent: async (searchTerm: string) => {\n // Combine value and label to be able to search by the currency code\n const searchableItems = props.items.map(item => ({\n ...item,\n label: `${item.value} ${item.label}`,\n }));\n\n const searchResults = useSearchBarFilter(\n ref(searchTerm),\n ref<BentoCurrencyListboxOptions>(searchableItems),\n props?.search?.searchEvent,\n ref(false)\n ).value;\n\n // Restore original labels by removing the prepended value\n const normalizedResults = searchResults?.map(result => ({\n ...result,\n label: result.label.substring(result.value.length + 1),\n }));\n\n filteredItems.value = normalizedResults;\n },\n };\n\n if (props.value) {\n deprecate(\n 'BentoDropdownCurrency \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownCurrency\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Currency Dropdown showing a selectable list of currencies.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-currency\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-currency',\n model: { prop: 'modelValue' },\n });\n</script>\n","<template>\n <div>\n <bento-dropdown\n class=\"b-dropdown-payment-method\"\n v-bind=\"$props\"\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <template #display-value=\"{ label, value }\">\n <bento-payment-method :type=\"value\" :label=\"label\" />\n </template>\n\n <template #default=\"{ value, label, description }\">\n <div class=\"b-dropdown-payment-method__item\">\n <bento-payment-method :type=\"value\" :label=\"description ? undefined : label\" />\n\n <div v-if=\"description\" class=\"b-dropdown-payment-method__text\">\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n <bento-typography el=\"span\" class=\"b-dropdown-payment-method__description\">{{\n description\n }}</bento-typography>\n </div>\n </div>\n </template>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, type PropType } from 'vue';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import { BentoTypography } from '@/components/typography';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { type BentoPaymentMethodListboxOptions } from './dropdown-payment-method.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the payment method dropdown with.\n * It must be an array of {@see BentoPaymentMethodListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {string} value.value - Payment type code that translates to a payment icon name {@see https://adyen-ui-assets.netlify.app/?path=/story/packages-ui-assets-payment-method-icons--icons}\n */\n items: {\n type: Array as PropType<BentoPaymentMethodListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n if (props.value) {\n deprecate(\n 'BentoDropdownPaymentMethod \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownPaymentMethod\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Payment method Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownPaymentMethod } from '@adyen/bento-vue2';\n * import type { BentoPaymentMethodListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownPaymentMethod },\n * template: `\n * <bento-dropdown-payment-method\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 'Visa'\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('ideal') // Default value\n * const options: BentoPaymentMethodListboxOptions = [\n * { label: 'Option 1', value: 'ideal' },\n * { label: 'Option 2', value: 'visa' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-payment-method',\n model: { prop: 'modelValue' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-payment-method.scss\" />\n","<template>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n class=\"b-dropdown-tag\"\n :items=\"tagItems\"\n show-slot-content-in-multiple\n @update:model-value=\"onUpdateModelValue\"\n @show-more=\"emit('show-more')\"\n @open=\"emit('open')\"\n >\n <listbox-option-tag :option=\"{ value: label, data, label: '' }\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import type { BentoTagListboxOptions } from './dropdown-tag.types';\n import type { BentoListboxSelectedValue } from '@/types/listbox';\n import { ListboxOptionTag } from '../../../../internal';\n import BentoDropdown from '../../../dropdown.vue';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the tag dropdown with.\n * It must be an array of {@see BentoTagListboxOptions }\n * @property {string} value.label - Text to be displayed in the option\n * @property {string | number} value.value - Value of the option\n * @property {string} value.variant - The BentTag variant shown for the option.\n */\n items: {\n type: Array as PropType<BentoTagListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\", \"show-more\", \"open\"]);\n\n const { emitValue } = useFormFieldEmits<BentoListboxSelectedValue>(emit);\n\n const onUpdateModelValue = (selectedValue: BentoListboxSelectedValue) => emitValue(selectedValue);\n\n const tagItems = computed(() => props.items?.map(({ label, value, variant }) => ({ label, value, data: variant })));\n\n if (props.value) {\n deprecate(\n 'BentoDropdownTag \"value\" property',\n `The use of \"value\" prop in \"BentoDropdownTag\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Tag Dropdown showing a selectable list of tags.\n *\n * @example\n * import { BentoDropdownTag } from '@adyen/bento-vue2';\n * import type { BentoTagListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownTag },\n * template: `\n * <bento-dropdown-tag\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('unique-id-1') // Default value\n * const options: BentoTagListboxOptions = [\n * { label: 'Offline', value: 'unique-id-1', variant: 'red' },\n * { label: 'Online', value: 'unique-id-2', variant: 'green' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-tag',\n model: { prop: 'modelValue' },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-tag.scss\" />\n"],"names":["__default__$4","defineComponent","emitValue","useFormFieldEmits","emit","onUpdateModelValue","selectedValue","dropdownItems","computed","props","value","label","src","deprecate","__default__$3","variant","items","toRefs","countryItems","useCountryItems","item","__default__$2","filteredItems","ref","watch","search","searchTerm","searchableItems","searchResults","useSearchBarFilter","_a","normalizedResults","result","__default__$1","__default__","tagItems"],"mappings":";;;;;;;;;;;AAsFI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,OAAA,EAAA,MA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,GAEAC,IAAA,CAAAC,MAAAJ,EAAAI,CAAA,GAEA6B,IAAA3B,EAAA,MAAA;;AAAA,cAAAsB,IAAArB,EAAA,UAAA,gBAAAqB,EAAA,IAAA,CAAA,EAAA,OAAAnB,GAAA,OAAAD,GAAA,SAAAK,EAAA,OAAA,EAAA,OAAAJ,GAAA,OAAAD,GAAA,MAAAK,EAAA;AAAA,KAAA;AAEA,WAAAN,EAAA,SACII;AAAA,MAAA;AAAA,MACI;AAAA;AAAA,MACA;AAAA,IAEA;;;;;;;;;;;;;;;;;;;;;"}
@@ -8,14 +8,14 @@ import { g as k } from "./generate-uid.NJ8tVoha.js";
8
8
  import { u as Fe } from "./aria-label.CaUURpnB.js";
9
9
  import { u as te } from "./index.B6WW_F-J.js";
10
10
  import { u as Ke } from "./form-field.D_2g7vaP.js";
11
- import { a as p, b as G, B as be, c as ze, u as Ve, d as We } from "./use-cached-selected-values.gDWGi5Nk.js";
11
+ import { a as p, b as G, B as be, c as ze, u as Ve, d as We } from "./use-cached-selected-values.3YqO69wz.js";
12
12
  import { u as Ue } from "./use-form-layout-loading.CWbjZiwP.js";
13
13
  import { u as je } from "./use-has-slot.C9lQZ6nz.js";
14
14
  import { B as E, a as qe } from "./keyboard-navigation.DWmhelVv.js";
15
15
  import { B as He } from "./directive.Cbdox5VL.js";
16
- import { F as Je, E as Ye } from "./field-label.CEkJnsiL.js";
17
- import { P as ye } from "./popper-container.Cdokz_NE.js";
18
- import { h as Ze } from "./button-actions.D9n7MxWe.js";
16
+ import { F as Je, E as Ye } from "./field-label.BKxm8ehO.js";
17
+ import { P as ye } from "./popper-container.CXUG6v_U.js";
18
+ import { h as Ze } from "./button-actions.JRDi9PFT.js";
19
19
  import "../assets/dropdown.css";
20
20
  const Qe = {
21
21
  "en-US": {
@@ -715,4 +715,4 @@ export {
715
715
  Xt as b,
716
716
  St as u
717
717
  };
718
- //# sourceMappingURL=dropdown.C2pXf8Li.js.map
718
+ //# sourceMappingURL=dropdown.ByH2zHxF.js.map