@adyen/bento-vue2 1.88.1 → 1.89.2

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 (228) hide show
  1. package/dist/@types/components.d.ts +4 -0
  2. package/dist/@types/index.d.ts +266 -70
  3. package/dist/accordion.js +1 -1
  4. package/dist/action-bar.js +1 -1
  5. package/dist/ai-tag.js +1 -1
  6. package/dist/alert.js +1 -1
  7. package/dist/anchor-scroller.js +1 -1
  8. package/dist/assets/accordion-item.css +1 -1
  9. package/dist/assets/action-bar.css +1 -1
  10. package/dist/assets/base-modal.css +1 -1
  11. package/dist/assets/button-actions.css +1 -1
  12. package/dist/assets/card.css +1 -1
  13. package/dist/assets/data-grid-template.css +1 -1
  14. package/dist/assets/data-grid.css +1 -1
  15. package/dist/assets/dialog-page.css +1 -1
  16. package/dist/assets/file-uploader.css +1 -1
  17. package/dist/assets/filter-bar.css +1 -1
  18. package/dist/assets/inspector.css +1 -1
  19. package/dist/assets/list-item.css +1 -0
  20. package/dist/assets/modal-fullscreen.css +1 -1
  21. package/dist/assets/sidepanel.css +1 -1
  22. package/dist/assets/timeline-item.css +1 -1
  23. package/dist/button.js +3 -3
  24. package/dist/card.js +1 -1
  25. package/dist/checkbox.js +2 -2
  26. package/dist/chip.js +1 -1
  27. package/dist/chunks/{accordion-item.Cv6kG2N3.js → accordion-item.BZDSJamR.js} +4 -13
  28. package/dist/chunks/{accordion-item.Cv6kG2N3.js.map → accordion-item.BZDSJamR.js.map} +1 -1
  29. package/dist/chunks/{action-bar.rHHYcsRV.js → action-bar.CYGUYI0V.js} +7 -33
  30. package/dist/chunks/{action-bar.rHHYcsRV.js.map → action-bar.CYGUYI0V.js.map} +1 -1
  31. package/dist/chunks/{ai-button.BTi18ipD.js → ai-button.CR_ePQRR.js} +2 -2
  32. package/dist/chunks/{ai-button.BTi18ipD.js.map → ai-button.CR_ePQRR.js.map} +1 -1
  33. package/dist/chunks/{ai-tag.D5fCswAm.js → ai-tag.Cjf38mjR.js} +5 -14
  34. package/dist/chunks/{ai-tag.D5fCswAm.js.map → ai-tag.Cjf38mjR.js.map} +1 -1
  35. package/dist/chunks/{alert.BESCd8iS.js → alert.QVQ6Zjbm.js} +5 -23
  36. package/dist/chunks/{alert.BESCd8iS.js.map → alert.QVQ6Zjbm.js.map} +1 -1
  37. package/dist/chunks/{anchor-scroller.Cb22EJiL.js → anchor-scroller.CjJ26PJS.js} +6 -12
  38. package/dist/chunks/{anchor-scroller.Cb22EJiL.js.map → anchor-scroller.CjJ26PJS.js.map} +1 -1
  39. package/dist/chunks/{base-modal.CUSvvYnk.js → base-modal.DmWkavtf.js} +8 -17
  40. package/dist/chunks/{base-modal.CUSvvYnk.js.map → base-modal.DmWkavtf.js.map} +1 -1
  41. package/dist/chunks/{button-actions-with-menu.D14S1pym.js → button-actions-with-menu.Bi_HXopk.js} +2 -2
  42. package/dist/chunks/{button-actions-with-menu.D14S1pym.js.map → button-actions-with-menu.Bi_HXopk.js.map} +1 -1
  43. package/dist/chunks/{button-actions.DyPS54Yi.js → button-actions.BLk114As.js} +8 -26
  44. package/dist/chunks/{button-actions.DyPS54Yi.js.map → button-actions.BLk114As.js.map} +1 -1
  45. package/dist/chunks/{button.Ctj3rkxw.js → button.DxhJNOtr.js} +2 -2
  46. package/dist/chunks/{button.Ctj3rkxw.js.map → button.DxhJNOtr.js.map} +1 -1
  47. package/dist/chunks/{calendar.BNg7mSj5.js → calendar.CXKhBF2f.js} +8 -26
  48. package/dist/chunks/{calendar.BNg7mSj5.js.map → calendar.CXKhBF2f.js.map} +1 -1
  49. package/dist/chunks/{card.9oGLUzev.js → card.GjhsXOT0.js} +5 -14
  50. package/dist/chunks/{card.9oGLUzev.js.map → card.GjhsXOT0.js.map} +1 -1
  51. package/dist/chunks/{checkbox-group.ntiYZadA.js → checkbox-group.B2BjU3ZN.js} +4 -4
  52. package/dist/chunks/{checkbox-group.ntiYZadA.js.map → checkbox-group.B2BjU3ZN.js.map} +1 -1
  53. package/dist/chunks/{checkbox.DfB3ZeA-.js → checkbox.CIv8WgGp.js} +21 -30
  54. package/dist/chunks/{checkbox.DfB3ZeA-.js.map → checkbox.CIv8WgGp.js.map} +1 -1
  55. package/dist/chunks/chevron-right-small.BKeb_dRX.js +24 -0
  56. package/dist/chunks/chevron-right-small.BKeb_dRX.js.map +1 -0
  57. package/dist/chunks/{chip.D_XQ8ReC.js → chip.DTpENaGC.js} +4 -10
  58. package/dist/chunks/{chip.D_XQ8ReC.js.map → chip.DTpENaGC.js.map} +1 -1
  59. package/dist/chunks/{code-snippet.D5ET8Yc1.js → code-snippet.YIm2oO_o.js} +8 -23
  60. package/dist/chunks/{code-snippet.D5ET8Yc1.js.map → code-snippet.YIm2oO_o.js.map} +1 -1
  61. package/dist/chunks/{controls-group.BCKGkHVl.js → controls-group.CqotnNEF.js} +2 -2
  62. package/dist/chunks/{controls-group.BCKGkHVl.js.map → controls-group.CqotnNEF.js.map} +1 -1
  63. package/dist/chunks/{copy.DSNuoLZf.js → copy.BVGQcf22.js} +5 -17
  64. package/dist/chunks/{copy.DSNuoLZf.js.map → copy.BVGQcf22.js.map} +1 -1
  65. package/dist/chunks/{country.BywHth0L.js → country.D20NCLLG.js} +3 -3
  66. package/dist/chunks/{country.BywHth0L.js.map → country.D20NCLLG.js.map} +1 -1
  67. package/dist/chunks/country.types.DxKjyd0S.js +20 -0
  68. package/dist/chunks/{country.types.BBQbWkTY.js.map → country.types.DxKjyd0S.js.map} +1 -1
  69. package/dist/chunks/{dashboard-section.DIesvnBa.js → dashboard-section.BubZyu8i.js} +3 -3
  70. package/dist/chunks/{dashboard-section.DIesvnBa.js.map → dashboard-section.BubZyu8i.js.map} +1 -1
  71. package/dist/chunks/{dashed-underline.DauOBhSD.js → dashed-underline.pjYTS0m1.js} +2 -2
  72. package/dist/chunks/{dashed-underline.DauOBhSD.js.map → dashed-underline.pjYTS0m1.js.map} +1 -1
  73. package/dist/chunks/{data-grid-template.T-6_zLby.js → data-grid-template.D8RhngPj.js} +4 -4
  74. package/dist/chunks/{data-grid-template.T-6_zLby.js.map → data-grid-template.D8RhngPj.js.map} +1 -1
  75. package/dist/chunks/{data-grid.u3f__x8_.js → data-grid.DJG8Ty0A.js} +48 -246
  76. package/dist/chunks/{data-grid.u3f__x8_.js.map → data-grid.DJG8Ty0A.js.map} +1 -1
  77. package/dist/chunks/{date-picker.BLOqU7Z9.js → date-picker.CnazYcSX.js} +9 -27
  78. package/dist/chunks/{date-picker.BLOqU7Z9.js.map → date-picker.CnazYcSX.js.map} +1 -1
  79. package/dist/chunks/{date-range-picker.B9XHHv9W.js → date-range-picker.Bf9pRNL7.js} +14 -83
  80. package/dist/chunks/{date-range-picker.B9XHHv9W.js.map → date-range-picker.Bf9pRNL7.js.map} +1 -1
  81. package/dist/chunks/{dialog-page.4deowaF2.js → dialog-page.oyG153fC.js} +5 -11
  82. package/dist/chunks/{dialog-page.4deowaF2.js.map → dialog-page.oyG153fC.js.map} +1 -1
  83. package/dist/chunks/{dropdown-default-textbox.CKnrDQ2z.js → dropdown-default-textbox.Dvzg0StF.js} +4 -10
  84. package/dist/chunks/{dropdown-default-textbox.CKnrDQ2z.js.map → dropdown-default-textbox.Dvzg0StF.js.map} +1 -1
  85. package/dist/chunks/{dropdown-tag.Dmq73cu9.js → dropdown-tag.BRB-emd1.js} +4 -4
  86. package/dist/chunks/{dropdown-tag.Dmq73cu9.js.map → dropdown-tag.BRB-emd1.js.map} +1 -1
  87. package/dist/chunks/{dropdown.Do5c4SST.js → dropdown.Ct7uhPr6.js} +11 -35
  88. package/dist/chunks/{dropdown.Do5c4SST.js.map → dropdown.Ct7uhPr6.js.map} +1 -1
  89. package/dist/chunks/{empty-state.IiG1LXa2.js → empty-state.D_Ac-XXH.js} +2 -2
  90. package/dist/chunks/{empty-state.IiG1LXa2.js.map → empty-state.D_Ac-XXH.js.map} +1 -1
  91. package/dist/chunks/{error-message.CYfT0Qsi.js → error-message.RxdStT3S.js} +7 -19
  92. package/dist/chunks/{error-message.CYfT0Qsi.js.map → error-message.RxdStT3S.js.map} +1 -1
  93. package/dist/chunks/{file-uploader.BSX-zpyP.js → file-uploader.D5Rjsx4k.js} +14 -90
  94. package/dist/chunks/{file-uploader.BSX-zpyP.js.map → file-uploader.D5Rjsx4k.js.map} +1 -1
  95. package/dist/chunks/filter-bar.zD_ctViU.js +3030 -0
  96. package/dist/chunks/{filter-bar.B_RHM9kR.js.map → filter-bar.zD_ctViU.js.map} +1 -1
  97. package/dist/chunks/{fixed-scroller.BueAsyGk.js → fixed-scroller.MerESbd_.js} +5 -14
  98. package/dist/chunks/{fixed-scroller.BueAsyGk.js.map → fixed-scroller.MerESbd_.js.map} +1 -1
  99. package/dist/chunks/{footer-actions.Dq82H1Oc.js → footer-actions.CiPj7hZG.js} +3 -3
  100. package/dist/chunks/{footer-actions.Dq82H1Oc.js.map → footer-actions.CiPj7hZG.js.map} +1 -1
  101. package/dist/chunks/{form-layout-title.vF9Bmbre.js → form-layout-title.Bw7VgOO5.js} +3 -5
  102. package/dist/chunks/{form-layout-title.vF9Bmbre.js.map → form-layout-title.Bw7VgOO5.js.map} +1 -1
  103. package/dist/chunks/{header-meta.ByA0tkZw.js → header-meta.Dq6TlNPw.js} +8 -20
  104. package/dist/chunks/{header-meta.ByA0tkZw.js.map → header-meta.Dq6TlNPw.js.map} +1 -1
  105. package/dist/chunks/{header-with-views.F1h5e4Wn.js → header-with-views.DaEhkSS8.js} +18 -144
  106. package/dist/chunks/{header-with-views.F1h5e4Wn.js.map → header-with-views.DaEhkSS8.js.map} +1 -1
  107. package/dist/chunks/{header.BG6XUNEs.js → header.DkC-KKWa.js} +3 -3
  108. package/dist/chunks/{header.BG6XUNEs.js.map → header.DkC-KKWa.js.map} +1 -1
  109. package/dist/chunks/{input-field-password.nYiBJRzJ.js → input-field-password.BKT1mYUw.js} +8 -50
  110. package/dist/chunks/{input-field-password.nYiBJRzJ.js.map → input-field-password.BKT1mYUw.js.map} +1 -1
  111. package/dist/chunks/{input-field-phone-number.BhLVrf55.js → input-field-phone-number.BjRKjQOQ.js} +7 -13
  112. package/dist/chunks/{input-field-phone-number.BhLVrf55.js.map → input-field-phone-number.BjRKjQOQ.js.map} +1 -1
  113. package/dist/chunks/{input-field.CFdpdjK5.js → input-field.m1PMwa4C.js} +6 -15
  114. package/dist/chunks/{input-field.CFdpdjK5.js.map → input-field.m1PMwa4C.js.map} +1 -1
  115. package/dist/chunks/{inspector.DgI3voTk.js → inspector.Bnm0hl_D.js} +5 -23
  116. package/dist/chunks/{inspector.DgI3voTk.js.map → inspector.Bnm0hl_D.js.map} +1 -1
  117. package/dist/chunks/{link.DKimL08z.js → link.MhoM3zQj.js} +4 -10
  118. package/dist/chunks/{link.DKimL08z.js.map → link.MhoM3zQj.js.map} +1 -1
  119. package/dist/chunks/list-item.BnzU1LIu.js +76 -0
  120. package/dist/chunks/list-item.BnzU1LIu.js.map +1 -0
  121. package/dist/chunks/{modal-fullscreen.DJtDO8TR.js → modal-fullscreen.CXOq6_Cv.js} +8 -14
  122. package/dist/chunks/{modal-fullscreen.DJtDO8TR.js.map → modal-fullscreen.CXOq6_Cv.js.map} +1 -1
  123. package/dist/chunks/{modal.BbsIM3qp.js → modal.o0KddMiG.js} +8 -14
  124. package/dist/chunks/{modal.BbsIM3qp.js.map → modal.o0KddMiG.js.map} +1 -1
  125. package/dist/chunks/pagination.ZISqB4M_.js +274 -0
  126. package/dist/chunks/pagination.ZISqB4M_.js.map +1 -0
  127. package/dist/chunks/{promo-banner.BQreywWK.js → promo-banner.Db2kh2qK.js} +5 -11
  128. package/dist/chunks/{promo-banner.BQreywWK.js.map → promo-banner.Db2kh2qK.js.map} +1 -1
  129. package/dist/chunks/{radio-group.DhDhTbZp.js → radio-group.DnMy7brs.js} +3 -3
  130. package/dist/chunks/{radio-group.DhDhTbZp.js.map → radio-group.DnMy7brs.js.map} +1 -1
  131. package/dist/chunks/{rich-text-editor.BjjQ0hue.js → rich-text-editor.Cbv1DxXn.js} +1355 -1357
  132. package/dist/chunks/{rich-text-editor.BjjQ0hue.js.map → rich-text-editor.Cbv1DxXn.js.map} +1 -1
  133. package/dist/chunks/{search-bar.k0tIoWcb.js → search-bar.DPjYDhja.js} +6 -15
  134. package/dist/chunks/{search-bar.k0tIoWcb.js.map → search-bar.DPjYDhja.js.map} +1 -1
  135. package/dist/chunks/{secondary-nav.CV6EiZPL.js → secondary-nav.CwJjkJkj.js} +5 -11
  136. package/dist/chunks/{secondary-nav.CV6EiZPL.js.map → secondary-nav.CwJjkJkj.js.map} +1 -1
  137. package/dist/chunks/{selection-card-group.CMTwk1iJ.js → selection-card-group.IPiouuot.js} +10 -10
  138. package/dist/chunks/{selection-card-group.CMTwk1iJ.js.map → selection-card-group.IPiouuot.js.map} +1 -1
  139. package/dist/chunks/{sidepanel.CSA5e8AF.js → sidepanel.BGMjjB3F.js} +8 -14
  140. package/dist/chunks/{sidepanel.CSA5e8AF.js.map → sidepanel.BGMjjB3F.js.map} +1 -1
  141. package/dist/chunks/status.CKb07vxI.js +34 -0
  142. package/dist/chunks/status.CKb07vxI.js.map +1 -0
  143. package/dist/chunks/status.types.Dx8MDhEH.js +5 -0
  144. package/dist/chunks/status.types.Dx8MDhEH.js.map +1 -0
  145. package/dist/chunks/{step.BEbWkprZ.js → step.QFER3tSj.js} +2 -4
  146. package/dist/chunks/{step.BEbWkprZ.js.map → step.QFER3tSj.js.map} +1 -1
  147. package/dist/chunks/{structured-list-item.C7W3zYcT.js → structured-list-item.BDJKRC_8.js} +6 -12
  148. package/dist/chunks/{structured-list-item.C7W3zYcT.js.map → structured-list-item.BDJKRC_8.js.map} +1 -1
  149. package/dist/chunks/{summary-grid.types.nrVagy9s.js → summary-grid.types.CIkArZf5.js} +3 -3
  150. package/dist/chunks/{summary-grid.types.nrVagy9s.js.map → summary-grid.types.CIkArZf5.js.map} +1 -1
  151. package/dist/chunks/{tab.BqSNoefU.js → tab.CaXF0dho.js} +2 -2
  152. package/dist/chunks/{tab.BqSNoefU.js.map → tab.CaXF0dho.js.map} +1 -1
  153. package/dist/chunks/{textarea.CpVhEv6I.js → textarea.D4X6Ss9q.js} +4 -8
  154. package/dist/chunks/{textarea.CpVhEv6I.js.map → textarea.D4X6Ss9q.js.map} +1 -1
  155. package/dist/chunks/{timeline-item.CSDdHboz.js → timeline-item.C8BxWdy1.js} +67 -83
  156. package/dist/chunks/timeline-item.C8BxWdy1.js.map +1 -0
  157. package/dist/chunks/{toast.Wuy6VuOT.js → toast.BRI3G7TL.js} +5 -11
  158. package/dist/chunks/{toast.Wuy6VuOT.js.map → toast.BRI3G7TL.js.map} +1 -1
  159. package/dist/chunks/{tutorial.3dTfBKtZ.js → tutorial.BzV6bHQJ.js} +5 -23
  160. package/dist/chunks/{tutorial.3dTfBKtZ.js.map → tutorial.BzV6bHQJ.js.map} +1 -1
  161. package/dist/chunks/{use-cached-selected-values.DiIjmiF_.js → use-cached-selected-values.DqX2qsMC.js} +13 -46
  162. package/dist/chunks/{use-cached-selected-values.DiIjmiF_.js.map → use-cached-selected-values.DqX2qsMC.js.map} +1 -1
  163. package/dist/chunks/{use-country-items.CQnldpqM.js → use-country-items.CI8C7MLU.js} +3 -3
  164. package/dist/chunks/{use-country-items.CQnldpqM.js.map → use-country-items.CI8C7MLU.js.map} +1 -1
  165. package/dist/chunks/use-country-phon-code.C6orQNnM.js +291 -0
  166. package/dist/chunks/use-country-phon-code.C6orQNnM.js.map +1 -0
  167. package/dist/chunks/{use-date-input-formatter.Dcjry8op.js → use-date-input-formatter.BYaTO3vz.js} +2 -2
  168. package/dist/chunks/{use-date-input-formatter.Dcjry8op.js.map → use-date-input-formatter.BYaTO3vz.js.map} +1 -1
  169. package/dist/code-snippet.js +1 -1
  170. package/dist/country.js +3 -3
  171. package/dist/dashboard-template.js +1 -1
  172. package/dist/dashed-underline.js +1 -1
  173. package/dist/data-grid-template.js +1 -1
  174. package/dist/data-grid.js +1 -1
  175. package/dist/date-picker.js +2 -2
  176. package/dist/date-range-picker.js +2 -2
  177. package/dist/draggable-handle.js +4 -28
  178. package/dist/draggable-handle.js.map +1 -1
  179. package/dist/dropdown.js +4 -4
  180. package/dist/empty-state.js +1 -1
  181. package/dist/file-uploader.js +1 -1
  182. package/dist/filter-bar.js +1 -1
  183. package/dist/form-layout.js +1 -1
  184. package/dist/header-with-views.js +1 -1
  185. package/dist/header.js +1 -1
  186. package/dist/index.js +210 -206
  187. package/dist/index.js.map +1 -1
  188. package/dist/input-field-password.js +1 -1
  189. package/dist/input-field-phone-number.js +1 -1
  190. package/dist/input-field.js +1 -1
  191. package/dist/inspector.js +1 -1
  192. package/dist/internal.js +10 -10
  193. package/dist/link.js +1 -1
  194. package/dist/list.js +6 -0
  195. package/dist/list.js.map +1 -0
  196. package/dist/menu.js +1 -1
  197. package/dist/modal-fullscreen.js +1 -1
  198. package/dist/modal.js +2 -2
  199. package/dist/pagination.js +1 -1
  200. package/dist/popover.js +1 -1
  201. package/dist/promo-banner.js +1 -1
  202. package/dist/radio-group.js +1 -1
  203. package/dist/rich-text-editor.js +1 -1
  204. package/dist/search-bar.js +2 -2
  205. package/dist/secondary-nav.js +1 -1
  206. package/dist/selection-card.js +1 -1
  207. package/dist/sidepanel.js +1 -1
  208. package/dist/status.js +4 -3
  209. package/dist/status.js.map +1 -1
  210. package/dist/stepper.js +1 -1
  211. package/dist/structured-list.js +1 -1
  212. package/dist/summary-grid.js +1 -1
  213. package/dist/tabs.js +1 -1
  214. package/dist/textarea.js +1 -1
  215. package/dist/timeline.js +1 -1
  216. package/dist/toast.js +1 -1
  217. package/dist/tutorial.js +1 -1
  218. package/dist/web-types.json +152 -2
  219. package/package.json +10 -10
  220. package/dist/chunks/country.types.BBQbWkTY.js +0 -773
  221. package/dist/chunks/filter-bar.B_RHM9kR.js +0 -3229
  222. package/dist/chunks/pagination.BKIqR6O6.js +0 -357
  223. package/dist/chunks/pagination.BKIqR6O6.js.map +0 -1
  224. package/dist/chunks/status.types.BTsaLHQ6.js +0 -36
  225. package/dist/chunks/status.types.BTsaLHQ6.js.map +0 -1
  226. package/dist/chunks/timeline-item.CSDdHboz.js.map +0 -1
  227. package/dist/chunks/use-country-phon-code.Bui3zD6W.js +0 -5621
  228. package/dist/chunks/use-country-phon-code.Bui3zD6W.js.map +0 -1
@@ -1,41 +1,23 @@
1
1
  import { ref as c, computed as p, defineComponent as Q, toRef as F, watch as V, nextTick as X } from "vue";
2
- import { g as Z, s as Y, b as $ } from "./calendar.BNg7mSj5.js";
3
- import { h as ee } from "./button-actions.DyPS54Yi.js";
2
+ import { g as Z, s as Y, b as $ } from "./calendar.CXKhBF2f.js";
3
+ import { h as ee } from "./button-actions.BLk114As.js";
4
4
  import { d as ae, B as te } from "./typography.C8lPlsbD.js";
5
- import { D as re } from "./dropdown-default-textbox.CKnrDQ2z.js";
5
+ import { D as re } from "./dropdown-default-textbox.Dvzg0StF.js";
6
6
  import { d as le } from "./debounce.DUTu11PS.js";
7
7
  import { g as D } from "./generate-uid.NJ8tVoha.js";
8
8
  import { u as L } from "./index.B6WW_F-J.js";
9
9
  import { u as oe } from "./form-field.D_2g7vaP.js";
10
- import { u as N, a as ne } from "./use-date-input-formatter.Dcjry8op.js";
10
+ import { u as N, a as ne } from "./use-date-input-formatter.BYaTO3vz.js";
11
11
  import { u as ie } from "./use-form-layout-loading.CWbjZiwP.js";
12
12
  import "./index.Cl4_42j5.js";
13
13
  import { B as se } from "./directive.rXUeDb8p.js";
14
- import { F as de, E as ue } from "./error-message.CYfT0Qsi.js";
14
+ import { F as de, E as ue } from "./error-message.RxdStT3S.js";
15
15
  import { n as ce } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
16
16
  import "../assets/date-picker.css";
17
17
  const pe = {
18
- "en-US": {
19
- datePicker: "Date picker",
20
- provideDateInAFormat: "Provide date in a YYYY-MM-DD format",
21
- selectDate: "Select a date",
22
- selectDateRange: "Select a date range",
23
- selectedDateIsNotAvailable: "Selected date is not available"
24
- },
25
- "ja-JP": {
26
- datePicker: "日付ピッカー",
27
- provideDateInAFormat: "YYYY-MM-DD形式で日付を入力してください",
28
- selectDate: "日付を選択",
29
- selectDateRange: "日付範囲を選択",
30
- selectedDateIsNotAvailable: "選択した日付は利用できません"
31
- },
32
- "pt-BR": {
33
- datePicker: "Seletor de datas",
34
- provideDateInAFormat: "Forneça a data no formato AAAA-MM-DD",
35
- selectDate: "Selecione uma data",
36
- selectDateRange: "Selecione um intervalo de datas",
37
- selectedDateIsNotAvailable: "A data selecionada não está disponível"
38
- }
18
+ "en-US": { datePicker: "Date picker", provideDateInAFormat: "Provide date in a YYYY-MM-DD format", selectDate: "Select a date", selectDateRange: "Select a date range", selectedDateIsNotAvailable: "Selected date is not available" },
19
+ "ja-JP": { datePicker: "日付ピッカー", provideDateInAFormat: "YYYY-MM-DD形式で日付を入力してください", selectDate: "日付を選択", selectDateRange: "日付範囲を選択", selectedDateIsNotAvailable: "選択した日付は利用できません" },
20
+ "pt-BR": { datePicker: "Seletor de datas", provideDateInAFormat: "Forneça a data no formato AAAA-MM-DD", selectDate: "Selecione uma data", selectDateRange: "Selecione um intervalo de datas", selectedDateIsNotAvailable: "A data selecionada não está disponível" }
39
21
  }, fe = ({
40
22
  datePickerValue: d,
41
23
  isDateIncorrect: t,
@@ -170,4 +152,4 @@ const he = be.exports;
170
152
  export {
171
153
  he as B
172
154
  };
173
- //# sourceMappingURL=date-picker.BLOqU7Z9.js.map
155
+ //# sourceMappingURL=date-picker.CnazYcSX.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.BLOqU7Z9.js","sources":["../../src/components/date-picker/composables/use-date-picker-single-calendar-text.ts","../../src/components/date-picker/date-picker.vue"],"sourcesContent":["import { computed, ref } from 'vue';\nimport { useI18n } from '@/utils/ts/i18n';\nimport { type UseDateDisplayText } from './use-date-picker-single-calendar-text.types';\nimport { startOfMonth } from 'date-fns/startOfMonth';\nimport { getDateTimeFormatter } from '@/utils/ts/format-date/format-date';\nimport { useDateInputFormatter } from '@/composables/use-date-input-formatter/use-date-input-formatter';\nimport messages from '../messages.json';\n\ntype MessageSchema = (typeof messages)['en-US'];\n\n/**\n * Composable that sets and formats the date to be displayed in the input box of a Single Date Picker\n * @param option.datePickerValue Ref to the datePickerValue set in the DatePicker component\n * @param option.isDateIncorrect Indicates if the date is correct or not\n * @param option.isMonthVariant Indicates if the date picker has variant \"month\"\n */\nexport const useDatePickerSingleCalendarText: UseDateDisplayText<Date> = ({\n datePickerValue,\n isDateIncorrect,\n isMonthVariant,\n placeholder,\n}) => {\n const { locale, t } = useI18n<{ message: MessageSchema }>({ messages });\n const { formatDate } = useDateInputFormatter();\n\n const textInputValue = ref(datePickerValue.value?.toDateString());\n\n const dateDisplayValue = computed(() => {\n // Display incorrect date when there's an error with the input\n if (isDateIncorrect.value) {\n return textInputValue.value;\n }\n\n // Display \"Select a date\" when there's no date selected or input\n if (!datePickerValue.value) {\n return placeholder?.value || (t('selectDate') as string);\n }\n\n // Display the date in format \"dd MMM, yyyy (25 Jun, 2023)\" or \"MMMM yyyy (June 2023)\"\n // if there's a valid date selected\n const dateFormatOptions: Intl.DateTimeFormatOptions = isMonthVariant?.value\n ? { month: 'long', year: 'numeric' }\n : { day: 'numeric', month: 'short', year: 'numeric' };\n\n return getDateTimeFormatter(locale.value, dateFormatOptions).format(datePickerValue.value);\n });\n\n /**\n * Formats the \"dateToFormat\" date value with the current format and sets it as \"formatTextInputDisplayValue\" value\n * @param dateToFormat - Date to be assigned and formatted\n */\n const formatTextInputDisplayValue = (dateToFormat: Date = datePickerValue.value) => {\n // If date is incorrect, leave the textInputValue intact\n if (isDateIncorrect.value) {\n return;\n }\n\n if (!dateToFormat) {\n textInputValue.value = '';\n return;\n }\n\n const date = isMonthVariant?.value ? startOfMonth(dateToFormat) : dateToFormat;\n textInputValue.value = formatDate(date);\n };\n\n return {\n // Values\n dateDisplayValue,\n textInputValue,\n\n // Methods\n formatTextInputDisplayValue,\n };\n};\n","<!-- TODO: Remove aria props as these are part of JSX elements /vue/types/jsx.d.ts -->\n<!-- eslint-disable vue/attribute-hyphenation -->\n<template>\n <div\n v-bento-click-outside-directive=\"closeDatePicker\"\n class=\"b-date-picker\"\n @keydown.space.capture=\"onSpaceBarOrEnter\"\n @keydown.enter.capture=\"onSpaceBarOrEnter\"\n >\n <!-- Label -->\n <field-label\n v-if=\"label\"\n :id=\"labelId\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n\n <!-- Input -->\n <div>\n <dropdown-input-default\n ref=\"inputContainerRef\"\n always-combobox-is-input\n :ariaControls=\"datePickerContainerId\"\n :ariaExpanded=\"isDatePickerOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-label=\"label ? null : popoverAriaLabel\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-required=\"required\"\n :disabled=\"disabled\"\n dynamic-filtering\n :is-invalid=\"!!errorMessage || !!dateErrorText\"\n :open=\"isDatePickerOpen\"\n :value=\"textInputValue\"\n :display-value=\"dateDisplayValue\"\n :debounce-time=\"0\"\n :readonly=\"isReadOnly\"\n @input=\"onDateInputChange\"\n @open=\"openDatePicker\"\n @keydown=\"onDateKeyDown\"\n @clear=\"clearDatePickerValue\"\n @close=\"closeDatePicker\"\n />\n </div>\n\n <!-- Error Messages -->\n <error-message\n v-if=\"dateErrorText\"\n :id=\"dateErrorId\"\n :error-message=\"dateErrorText\"\n class=\"b-date-picker__error-message\"\n />\n <error-message\n v-if=\"errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-date-picker__error-message\"\n />\n\n <!-- Description -->\n <bento-typography\n v-if=\"description\"\n class=\"b-date-picker__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n {{ description }}\n </bento-typography>\n\n <!-- Calendar container -->\n <bento-popover\n v-if=\"inputContainerRef\"\n :id=\"datePickerContainerId\"\n class=\"b-date-picker__container\"\n role=\"dialog\"\n :open=\"isDatePickerOpen\"\n :target-element=\"inputContainerRef\"\n :aria-label=\"popoverAriaLabel\"\n :aria-modal=\"true\"\n position=\"bottom-start\"\n fit-content\n trap-all\n :trap-all-options=\"computedTrapAllOptions\"\n @keydown.esc.native=\"closeDatePicker\"\n >\n <calendar\n ref=\"calendarContainerRef\"\n :default-display-month=\"defaultDisplayMonth\"\n :first-day-of-week=\"resolvedFirstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :number-of-months=\"1\"\n :value=\"internalModelValue\"\n :min=\"min\"\n :max=\"max\"\n :variant=\"variant\"\n @input=\"onDateSelected\"\n />\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, ref, toRef, watch } from 'vue';\n import { startOfMonth } from 'date-fns/startOfMonth';\n\n // Components\n import { BentoPopover } from '@/components/popover';\n import { BentoTypography } from '../typography';\n import { Calendar, type CalendarSingleDateValue, ErrorMessage, FieldLabel } from '@/internal';\n import { DropdownInputDefault } from '@/components/dropdown/components';\n\n // Utils\n import { debounce } from '@/utils/ts/debounce';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n // Composables\n import { useDatePickerSingleCalendarText } from './composables/use-date-picker-single-calendar-text';\n import { useDateInputFormatter, useFirstDayOfWeek, useFormLayoutFieldLoading } from '@/composables';\n\n // Directive\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives';\n\n // Types\n import { type BentoDatePickerEmits, type BentoDatePickerProps } from './date-picker.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const DEBOUNCE_TIME = 1000;\n\n const props = defineProps({\n description: { default: undefined },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: null },\n label: { default: undefined },\n optional: { type: Boolean, default: false },\n placeholder: { default: null },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n tooltipText: { default: null },\n defaultDisplayMonth: { default: null },\n firstDayOfWeek: { default: undefined },\n isDateDisabled: { default: undefined },\n min: { default: null },\n max: { default: null },\n modelValue: { default: null },\n value: { default: null },\n variant: { default: undefined }\n});\n\n const emit = defineEmits([\"update:model-value\", \"input\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const datePickerContainerId = generateUid('bento-date-picker-container');\n const labelId = generateUid('bento-date-picker-label');\n const descriptionId = generateUid('bento-date-picker-description');\n const errorId = generateUid('bento-date-picker-error');\n const dateErrorId = generateUid('bento-date-picker-date-error');\n const popoverAriaLabel = computed(() => props.label || t('datePicker', { name: datePickerContainerId }));\n\n // Refs\n const calendarContainerRef = ref(null);\n const inputContainerRef = ref(null);\n\n // Values\n const isDateIncorrect = ref(false);\n const isDatePickerOpen = ref(false);\n const initialFocusOnDatePickerOpen = ref(undefined);\n const internalModelValue = ref<CalendarSingleDateValue | null>(props.modelValue); // to be removed when `props.value` is removed\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const { emitValue } = useFormFieldEmits<CalendarSingleDateValue>(emit);\n const { resolvedFirstDayOfWeek } = useFirstDayOfWeek(toRef(props, 'firstDayOfWeek'));\n const { isFormatValid, parseDate, onKeyDown, autoFormat } = useDateInputFormatter();\n\n const computedTrapAllOptions = computed(() => ({\n initialFocus: initialFocusOnDatePickerOpen.value,\n additionalContainers: [inputContainerRef.value.$el],\n }));\n\n watch(\n () => props.disabled,\n disabled => {\n // Close date picker popover if it's opened when it's disabled\n if (disabled && isDatePickerOpen.value) {\n isDatePickerOpen.value = false;\n }\n }\n );\n\n watch(\n [() => props.value, () => props.modelValue],\n ([newValue, newModelValue]) => {\n if (newValue) {\n deprecate(\n 'BentoDatePicker \"value\" property',\n `The use of \"value\" prop in \"BentoDatePicker\" is no longer supported. Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n\n internalModelValue.value = newModelValue ?? newValue;\n },\n { immediate: true }\n );\n\n const isMonthVariant = computed(() => props.variant === 'month');\n\n const { dateDisplayValue, textInputValue, formatTextInputDisplayValue } = useDatePickerSingleCalendarText({\n datePickerValue: internalModelValue,\n isDateIncorrect,\n isMonthVariant,\n placeholder: toRef(props, 'placeholder'),\n });\n\n const dateErrorText = computed(() => {\n if (\n props.isDateDisabled &&\n textInputValue.value &&\n isFormatValid(textInputValue.value) &&\n props.isDateDisabled(parseDate(textInputValue.value)) &&\n !isDatePickerOpen.value\n ) {\n return t('selectedDateIsNotAvailable');\n }\n\n return isDateIncorrect.value ? t('provideDateInAFormat') : null;\n });\n\n const descriptionConditionalClasses = computed(() => ({\n 'b-date-picker__description--error': props.errorMessage || dateErrorText.value,\n }));\n\n const ariaDescribedBy = computed(\n () =>\n `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''} ${\n dateErrorText.value ? dateErrorId : ''\n }`.trim() || null\n );\n\n const isDateEnabled = (date: Date) => {\n // Check if date is between min/max bounds, if there are any\n if ((props.min && date <= props.min) || (props.max && date >= props.max)) {\n return false;\n }\n\n // Check if function is set, otherwise all dates are enabled\n if (props.isDateDisabled) {\n return !props.isDateDisabled(date);\n }\n\n return true;\n };\n\n const closeDatePicker = () => {\n isDatePickerOpen.value = false;\n };\n\n const openDatePicker = () => {\n isDatePickerOpen.value = true;\n\n formatTextInputDisplayValue();\n };\n\n const onDateSelected = (selectedDate: Date) => {\n // Reset the error state when a valid date is selected\n isDateIncorrect.value = false;\n\n closeDatePicker();\n emitValue(selectedDate);\n };\n\n const clearDatePickerValue = async () => {\n if (isDateIncorrect.value) {\n isDateIncorrect.value = false;\n textInputValue.value = null;\n }\n emitValue(null);\n };\n\n const onDateKeyDown = (event: KeyboardEvent) => {\n onKeyDown(event);\n };\n\n const validateDate = (stringDate: string) => {\n // Validate only if the date is complete\n if (stringDate.length < 10) {\n return;\n }\n\n const isValidDate = isFormatValid(stringDate) && isDateEnabled(parseDate(stringDate));\n if (isValidDate) {\n isDateIncorrect.value = false;\n emitValue(parseDate(stringDate));\n } else if (stringDate) {\n // Only set to true if the value exists (not null/undefined)\n isDateIncorrect.value = true;\n emitValue(null);\n }\n };\n\n const validateDateDebounced = debounce(validateDate, DEBOUNCE_TIME);\n\n const onDateInputChange = (stringDate: string) => {\n textInputValue.value = autoFormat(stringDate);\n // If we are closing the date picker, we should validate (and emit date inputs) immediately so the user doesn't have to wait for the debounce time.\n if (isDatePickerOpen.value) {\n validateDateDebounced(textInputValue.value);\n } else {\n validateDate(textInputValue.value);\n }\n };\n\n /**\n * Space bar and Enter keyDown event handler.\n *\n * * Opens the date picker dialog on the first keydown.\n * * Move focus to selected date, i.e., the date displayed in the date input text field. If no date has been selected, places focus on the current date.\n * @param {KeyboardEvent} event Event being triggered\n */\n const onSpaceBarOrEnter = async (event: KeyboardEvent) => {\n if (isDatePickerOpen.value) {\n return;\n }\n event.preventDefault();\n\n openDatePicker();\n\n // Wait for the date picker dialog to open\n await nextTick();\n\n // Set current date (today) if no date is selected\n if (!internalModelValue.value) {\n // Format the opened date picker date to YYYY-MM-DD\n formatTextInputDisplayValue(new Date());\n emitValue(new Date());\n }\n\n // Set initial focus\n initialFocusOnDatePickerOpen.value =\n calendarContainerRef.value?.$refs.calendarRef[0].focusOnDate(\n props.variant === 'month' ? startOfMonth(internalModelValue.value) : internalModelValue.value,\n true\n ) ?? undefined;\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Date picker selector.\n *\n * @example\n * import { BentoDatePicker } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDatePicker },\n * template: `\n * <bento-date-picker\n * label=\"Label\"\n * description=\"Supporting text\"\n * required\n * optional\n * disabled\n * @input=\"onDateChanged\"\n * v-model=\"selectedDate\"\n * />\n * `,\n * setup() {\n * const selectedDate = ref(new Date()); // reactive({ startDate: new Date(), endDate: new Date() })\n * return {\n * selectedDate,\n * }\n * }\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-date-picker',\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-picker.scss\" />\n"],"names":["useDatePickerSingleCalendarText","datePickerValue","isDateIncorrect","isMonthVariant","placeholder","locale","t","useI18n","formatDate","useDateInputFormatter","textInputValue","ref","_a","computed","dateFormatOptions","getDateTimeFormatter","dateToFormat","date","startOfMonth","__default__","messages","DEBOUNCE_TIME","datePickerContainerId","generateUid","labelId","descriptionId","errorId","dateErrorId","popoverAriaLabel","props","calendarContainerRef","inputContainerRef","isDatePickerOpen","initialFocusOnDatePickerOpen","internalModelValue","isReadOnly","useFormLayoutFieldLoading","toRef","emitValue","useFormFieldEmits","emit","resolvedFirstDayOfWeek","useFirstDayOfWeek","isFormatValid","parseDate","onKeyDown","autoFormat","computedTrapAllOptions","watch","disabled","newValue","newModelValue","deprecate","dateDisplayValue","formatTextInputDisplayValue","dateErrorText","descriptionConditionalClasses","ariaDescribedBy","isDateEnabled","closeDatePicker","openDatePicker","onDateSelected","selectedDate","clearDatePickerValue","onDateKeyDown","event","validateDate","stringDate","validateDateDebounced","debounce","nextTick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgBOA,KAAA,CAAA;AAAA,EAAmE,iBAAAC;AAAA,EACtE,iBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,aAAAC;AAEJ,MAAA;;AACI,QAAA,EAAA,QAAAC,GAAA,GAAAC,EAAA,IAAAC,EAAA,GACA,EAAA,YAAAC,EAAA,IAAAC,EAAA,GAEAC,IAAAC,GAAAC,IAAAX,EAAA,UAAA,gBAAAW,EAAA,cAAA;AAyCA,SAAA;AAAA;AAAA,IAAO,kBAvCPC,EAAA,MAAA;AAEI,UAAAX,EAAA;AACI,eAAAQ,EAAA;AAIJ,UAAA,CAAAT,EAAA;AACI,gBAAAG,KAAA,gBAAAA,EAAA,UAAAE,EAAA,YAAA;AAKJ,YAAAQ,IAAAX,KAAA,QAAAA,EAAA,QAAA,EAAA,OAAA,QAAA,MAAA,UAAA,IAAA,EAAA,KAAA,WAAA,OAAA,SAAA,MAAA,UAAA;AAIA,aAAAY,EA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AAA;AAAA,QACqDiB,EAAA,YAAA,UAAAX,EAAAgB,EAAA,KAAA,IAAAA,EAAA;AAAA,QAC2C;AAAA,YACxF;AAAA,IACC;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"date-picker.CnazYcSX.js","sources":["../../src/components/date-picker/composables/use-date-picker-single-calendar-text.ts","../../src/components/date-picker/date-picker.vue"],"sourcesContent":["import { computed, ref } from 'vue';\nimport { useI18n } from '@/utils/ts/i18n';\nimport { type UseDateDisplayText } from './use-date-picker-single-calendar-text.types';\nimport { startOfMonth } from 'date-fns/startOfMonth';\nimport { getDateTimeFormatter } from '@/utils/ts/format-date/format-date';\nimport { useDateInputFormatter } from '@/composables/use-date-input-formatter/use-date-input-formatter';\nimport messages from '../messages.json';\n\ntype MessageSchema = (typeof messages)['en-US'];\n\n/**\n * Composable that sets and formats the date to be displayed in the input box of a Single Date Picker\n * @param option.datePickerValue Ref to the datePickerValue set in the DatePicker component\n * @param option.isDateIncorrect Indicates if the date is correct or not\n * @param option.isMonthVariant Indicates if the date picker has variant \"month\"\n */\nexport const useDatePickerSingleCalendarText: UseDateDisplayText<Date> = ({\n datePickerValue,\n isDateIncorrect,\n isMonthVariant,\n placeholder,\n}) => {\n const { locale, t } = useI18n<{ message: MessageSchema }>({ messages });\n const { formatDate } = useDateInputFormatter();\n\n const textInputValue = ref(datePickerValue.value?.toDateString());\n\n const dateDisplayValue = computed(() => {\n // Display incorrect date when there's an error with the input\n if (isDateIncorrect.value) {\n return textInputValue.value;\n }\n\n // Display \"Select a date\" when there's no date selected or input\n if (!datePickerValue.value) {\n return placeholder?.value || (t('selectDate') as string);\n }\n\n // Display the date in format \"dd MMM, yyyy (25 Jun, 2023)\" or \"MMMM yyyy (June 2023)\"\n // if there's a valid date selected\n const dateFormatOptions: Intl.DateTimeFormatOptions = isMonthVariant?.value\n ? { month: 'long', year: 'numeric' }\n : { day: 'numeric', month: 'short', year: 'numeric' };\n\n return getDateTimeFormatter(locale.value, dateFormatOptions).format(datePickerValue.value);\n });\n\n /**\n * Formats the \"dateToFormat\" date value with the current format and sets it as \"formatTextInputDisplayValue\" value\n * @param dateToFormat - Date to be assigned and formatted\n */\n const formatTextInputDisplayValue = (dateToFormat: Date = datePickerValue.value) => {\n // If date is incorrect, leave the textInputValue intact\n if (isDateIncorrect.value) {\n return;\n }\n\n if (!dateToFormat) {\n textInputValue.value = '';\n return;\n }\n\n const date = isMonthVariant?.value ? startOfMonth(dateToFormat) : dateToFormat;\n textInputValue.value = formatDate(date);\n };\n\n return {\n // Values\n dateDisplayValue,\n textInputValue,\n\n // Methods\n formatTextInputDisplayValue,\n };\n};\n","<!-- TODO: Remove aria props as these are part of JSX elements /vue/types/jsx.d.ts -->\n<!-- eslint-disable vue/attribute-hyphenation -->\n<template>\n <div\n v-bento-click-outside-directive=\"closeDatePicker\"\n class=\"b-date-picker\"\n @keydown.space.capture=\"onSpaceBarOrEnter\"\n @keydown.enter.capture=\"onSpaceBarOrEnter\"\n >\n <!-- Label -->\n <field-label\n v-if=\"label\"\n :id=\"labelId\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n\n <!-- Input -->\n <div>\n <dropdown-input-default\n ref=\"inputContainerRef\"\n always-combobox-is-input\n :ariaControls=\"datePickerContainerId\"\n :ariaExpanded=\"isDatePickerOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-label=\"label ? null : popoverAriaLabel\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-required=\"required\"\n :disabled=\"disabled\"\n dynamic-filtering\n :is-invalid=\"!!errorMessage || !!dateErrorText\"\n :open=\"isDatePickerOpen\"\n :value=\"textInputValue\"\n :display-value=\"dateDisplayValue\"\n :debounce-time=\"0\"\n :readonly=\"isReadOnly\"\n @input=\"onDateInputChange\"\n @open=\"openDatePicker\"\n @keydown=\"onDateKeyDown\"\n @clear=\"clearDatePickerValue\"\n @close=\"closeDatePicker\"\n />\n </div>\n\n <!-- Error Messages -->\n <error-message\n v-if=\"dateErrorText\"\n :id=\"dateErrorId\"\n :error-message=\"dateErrorText\"\n class=\"b-date-picker__error-message\"\n />\n <error-message\n v-if=\"errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-date-picker__error-message\"\n />\n\n <!-- Description -->\n <bento-typography\n v-if=\"description\"\n class=\"b-date-picker__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n {{ description }}\n </bento-typography>\n\n <!-- Calendar container -->\n <bento-popover\n v-if=\"inputContainerRef\"\n :id=\"datePickerContainerId\"\n class=\"b-date-picker__container\"\n role=\"dialog\"\n :open=\"isDatePickerOpen\"\n :target-element=\"inputContainerRef\"\n :aria-label=\"popoverAriaLabel\"\n :aria-modal=\"true\"\n position=\"bottom-start\"\n fit-content\n trap-all\n :trap-all-options=\"computedTrapAllOptions\"\n @keydown.esc.native=\"closeDatePicker\"\n >\n <calendar\n ref=\"calendarContainerRef\"\n :default-display-month=\"defaultDisplayMonth\"\n :first-day-of-week=\"resolvedFirstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :number-of-months=\"1\"\n :value=\"internalModelValue\"\n :min=\"min\"\n :max=\"max\"\n :variant=\"variant\"\n @input=\"onDateSelected\"\n />\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, ref, toRef, watch } from 'vue';\n import { startOfMonth } from 'date-fns/startOfMonth';\n\n // Components\n import { BentoPopover } from '@/components/popover';\n import { BentoTypography } from '../typography';\n import { Calendar, type CalendarSingleDateValue, ErrorMessage, FieldLabel } from '@/internal';\n import { DropdownInputDefault } from '@/components/dropdown/components';\n\n // Utils\n import { debounce } from '@/utils/ts/debounce';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { deprecate } from '@/utils/ts/deprecate';\n\n // Composables\n import { useDatePickerSingleCalendarText } from './composables/use-date-picker-single-calendar-text';\n import { useDateInputFormatter, useFirstDayOfWeek, useFormLayoutFieldLoading } from '@/composables';\n\n // Directive\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives';\n\n // Types\n import { type BentoDatePickerEmits, type BentoDatePickerProps } from './date-picker.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const DEBOUNCE_TIME = 1000;\n\n const props = defineProps({\n description: { default: undefined },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: null },\n label: { default: undefined },\n optional: { type: Boolean, default: false },\n placeholder: { default: null },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n tooltipText: { default: null },\n defaultDisplayMonth: { default: null },\n firstDayOfWeek: { default: undefined },\n isDateDisabled: { default: undefined },\n min: { default: null },\n max: { default: null },\n modelValue: { default: null },\n value: { default: null },\n variant: { default: undefined }\n});\n\n const emit = defineEmits([\"update:model-value\", \"input\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const datePickerContainerId = generateUid('bento-date-picker-container');\n const labelId = generateUid('bento-date-picker-label');\n const descriptionId = generateUid('bento-date-picker-description');\n const errorId = generateUid('bento-date-picker-error');\n const dateErrorId = generateUid('bento-date-picker-date-error');\n const popoverAriaLabel = computed(() => props.label || t('datePicker', { name: datePickerContainerId }));\n\n // Refs\n const calendarContainerRef = ref(null);\n const inputContainerRef = ref(null);\n\n // Values\n const isDateIncorrect = ref(false);\n const isDatePickerOpen = ref(false);\n const initialFocusOnDatePickerOpen = ref(undefined);\n const internalModelValue = ref<CalendarSingleDateValue | null>(props.modelValue); // to be removed when `props.value` is removed\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const { emitValue } = useFormFieldEmits<CalendarSingleDateValue>(emit);\n const { resolvedFirstDayOfWeek } = useFirstDayOfWeek(toRef(props, 'firstDayOfWeek'));\n const { isFormatValid, parseDate, onKeyDown, autoFormat } = useDateInputFormatter();\n\n const computedTrapAllOptions = computed(() => ({\n initialFocus: initialFocusOnDatePickerOpen.value,\n additionalContainers: [inputContainerRef.value.$el],\n }));\n\n watch(\n () => props.disabled,\n disabled => {\n // Close date picker popover if it's opened when it's disabled\n if (disabled && isDatePickerOpen.value) {\n isDatePickerOpen.value = false;\n }\n }\n );\n\n watch(\n [() => props.value, () => props.modelValue],\n ([newValue, newModelValue]) => {\n if (newValue) {\n deprecate(\n 'BentoDatePicker \"value\" property',\n `The use of \"value\" prop in \"BentoDatePicker\" is no longer supported. Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n\n internalModelValue.value = newModelValue ?? newValue;\n },\n { immediate: true }\n );\n\n const isMonthVariant = computed(() => props.variant === 'month');\n\n const { dateDisplayValue, textInputValue, formatTextInputDisplayValue } = useDatePickerSingleCalendarText({\n datePickerValue: internalModelValue,\n isDateIncorrect,\n isMonthVariant,\n placeholder: toRef(props, 'placeholder'),\n });\n\n const dateErrorText = computed(() => {\n if (\n props.isDateDisabled &&\n textInputValue.value &&\n isFormatValid(textInputValue.value) &&\n props.isDateDisabled(parseDate(textInputValue.value)) &&\n !isDatePickerOpen.value\n ) {\n return t('selectedDateIsNotAvailable');\n }\n\n return isDateIncorrect.value ? t('provideDateInAFormat') : null;\n });\n\n const descriptionConditionalClasses = computed(() => ({\n 'b-date-picker__description--error': props.errorMessage || dateErrorText.value,\n }));\n\n const ariaDescribedBy = computed(\n () =>\n `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''} ${\n dateErrorText.value ? dateErrorId : ''\n }`.trim() || null\n );\n\n const isDateEnabled = (date: Date) => {\n // Check if date is between min/max bounds, if there are any\n if ((props.min && date <= props.min) || (props.max && date >= props.max)) {\n return false;\n }\n\n // Check if function is set, otherwise all dates are enabled\n if (props.isDateDisabled) {\n return !props.isDateDisabled(date);\n }\n\n return true;\n };\n\n const closeDatePicker = () => {\n isDatePickerOpen.value = false;\n };\n\n const openDatePicker = () => {\n isDatePickerOpen.value = true;\n\n formatTextInputDisplayValue();\n };\n\n const onDateSelected = (selectedDate: Date) => {\n // Reset the error state when a valid date is selected\n isDateIncorrect.value = false;\n\n closeDatePicker();\n emitValue(selectedDate);\n };\n\n const clearDatePickerValue = async () => {\n if (isDateIncorrect.value) {\n isDateIncorrect.value = false;\n textInputValue.value = null;\n }\n emitValue(null);\n };\n\n const onDateKeyDown = (event: KeyboardEvent) => {\n onKeyDown(event);\n };\n\n const validateDate = (stringDate: string) => {\n // Validate only if the date is complete\n if (stringDate.length < 10) {\n return;\n }\n\n const isValidDate = isFormatValid(stringDate) && isDateEnabled(parseDate(stringDate));\n if (isValidDate) {\n isDateIncorrect.value = false;\n emitValue(parseDate(stringDate));\n } else if (stringDate) {\n // Only set to true if the value exists (not null/undefined)\n isDateIncorrect.value = true;\n emitValue(null);\n }\n };\n\n const validateDateDebounced = debounce(validateDate, DEBOUNCE_TIME);\n\n const onDateInputChange = (stringDate: string) => {\n textInputValue.value = autoFormat(stringDate);\n // If we are closing the date picker, we should validate (and emit date inputs) immediately so the user doesn't have to wait for the debounce time.\n if (isDatePickerOpen.value) {\n validateDateDebounced(textInputValue.value);\n } else {\n validateDate(textInputValue.value);\n }\n };\n\n /**\n * Space bar and Enter keyDown event handler.\n *\n * * Opens the date picker dialog on the first keydown.\n * * Move focus to selected date, i.e., the date displayed in the date input text field. If no date has been selected, places focus on the current date.\n * @param {KeyboardEvent} event Event being triggered\n */\n const onSpaceBarOrEnter = async (event: KeyboardEvent) => {\n if (isDatePickerOpen.value) {\n return;\n }\n event.preventDefault();\n\n openDatePicker();\n\n // Wait for the date picker dialog to open\n await nextTick();\n\n // Set current date (today) if no date is selected\n if (!internalModelValue.value) {\n // Format the opened date picker date to YYYY-MM-DD\n formatTextInputDisplayValue(new Date());\n emitValue(new Date());\n }\n\n // Set initial focus\n initialFocusOnDatePickerOpen.value =\n calendarContainerRef.value?.$refs.calendarRef[0].focusOnDate(\n props.variant === 'month' ? startOfMonth(internalModelValue.value) : internalModelValue.value,\n true\n ) ?? undefined;\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Date picker selector.\n *\n * @example\n * import { BentoDatePicker } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDatePicker },\n * template: `\n * <bento-date-picker\n * label=\"Label\"\n * description=\"Supporting text\"\n * required\n * optional\n * disabled\n * @input=\"onDateChanged\"\n * v-model=\"selectedDate\"\n * />\n * `,\n * setup() {\n * const selectedDate = ref(new Date()); // reactive({ startDate: new Date(), endDate: new Date() })\n * return {\n * selectedDate,\n * }\n * }\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-date-picker',\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-picker.scss\" />\n"],"names":["useDatePickerSingleCalendarText","datePickerValue","isDateIncorrect","isMonthVariant","placeholder","locale","t","useI18n","formatDate","useDateInputFormatter","textInputValue","ref","_a","computed","dateFormatOptions","getDateTimeFormatter","dateToFormat","date","startOfMonth","__default__","messages","DEBOUNCE_TIME","datePickerContainerId","generateUid","labelId","descriptionId","errorId","dateErrorId","popoverAriaLabel","props","calendarContainerRef","inputContainerRef","isDatePickerOpen","initialFocusOnDatePickerOpen","internalModelValue","isReadOnly","useFormLayoutFieldLoading","toRef","emitValue","useFormFieldEmits","emit","resolvedFirstDayOfWeek","useFirstDayOfWeek","isFormatValid","parseDate","onKeyDown","autoFormat","computedTrapAllOptions","watch","disabled","newValue","newModelValue","deprecate","dateDisplayValue","formatTextInputDisplayValue","dateErrorText","descriptionConditionalClasses","ariaDescribedBy","isDateEnabled","closeDatePicker","openDatePicker","onDateSelected","selectedDate","clearDatePickerValue","onDateKeyDown","event","validateDate","stringDate","validateDateDebounced","debounce","nextTick"],"mappings":";;;;;;;;;;;;;;;;;;;;GAgBOA,KAAA,CAAA;AAAA,EAAmE,iBAAAC;AAAA,EACtE,iBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,aAAAC;AAEJ,MAAA;;AACI,QAAA,EAAA,QAAAC,GAAA,GA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J,GAGJ8B,IAAAC,GAAAH,GAAA7C,CAAA;oyBAEA,CAAA8C,MAAA;AACI,MAAAzD,EAAA,QAAAoC,EAAAqB,CAAA,GAEAnC,EAAA,QACIoC,EAAA1D,EAAA,KAAA,IAEAwD,EAAAxD,EAAA,KAAA;AAAA,IACJ,sBAUJ,OAAAuD,MAAA;;AACI,MAAAjC,EAAA,UAGAiC,EAAA,eAAA,GAEAL,EAAA,GAGA,MAAAU,EAAA,GAGApC,EAAA,UAEIoB,EAAA,oBAAA,KAAA,CAAA,GACAhB,EAAA,oBAAA,KAAA,CAAA,IAIJL,EAAA,UAAArB,IAAAkB,EAAA,UAAA,gBAAAlB,EAAA,MAAA,YAAA,GAAA;AAAA,QACqDiB,EAAA,YAAA,UAAAX,EAAAgB,EAAA,KAAA,IAAAA,EAAA;AAAA,QAC2C;AAAA,YACxF;AAAA,IACC;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,28 +1,28 @@
1
1
  import { reactive as fe, defineComponent as Qe, useSlots as ot, ref as S, computed as f, onMounted as We, toRaw as _e, watch as pe, useAttrs as lt, toRef as ye } from "vue";
2
2
  import { j as it } from "./index.CwzYJHw2.js";
3
3
  import { B as ut } from "./divider.DX5gwN7p.js";
4
- import { h as dt, B as ct } from "./button-actions.DyPS54Yi.js";
4
+ import { h as dt, B as ct } from "./button-actions.BLk114As.js";
5
5
  import { B as $e, d as Ce } from "./typography.C8lPlsbD.js";
6
- import { B as mt } from "./input-field.CFdpdjK5.js";
7
- import { B as Dt } from "./dropdown.Do5c4SST.js";
6
+ import { B as mt } from "./input-field.m1PMwa4C.js";
7
+ import { B as Dt } from "./dropdown.Ct7uhPr6.js";
8
8
  import { B as pt } from "./segmented-control.BqIiX9hv.js";
9
9
  import { u as be } from "./index.B6WW_F-J.js";
10
10
  import { d as De } from "./debounce.DUTu11PS.js";
11
11
  import { u as ft } from "./use-has-slot.C9lQZ6nz.js";
12
- import { u as Ie, a as vt } from "./use-date-input-formatter.Dcjry8op.js";
13
- import { e as Ge, f as se, i as w, h as I, j as yt, k as Be, l as gt, s as xe, m as Tt, n as Ae, b as P, u as _t, o as E, g as bt } from "./calendar.BNg7mSj5.js";
12
+ import { u as Ie, a as vt } from "./use-date-input-formatter.BYaTO3vz.js";
13
+ import { e as Ge, f as se, i as w, h as I, j as yt, k as Be, l as gt, s as xe, m as Tt, n as Ae, b as P, u as _t, o as E, g as bt } from "./calendar.CXKhBF2f.js";
14
14
  import { e as A, a as qe } from "./differenceInMonths.CIYECBxK.js";
15
15
  import { s as Ye } from "./startOfWeek.CXhhX-R7.js";
16
16
  import { t as N, n as It, c as Rt } from "./en-US.YeSsZuOc.js";
17
17
  import { c as ht } from "./constructNow.CIc7d13I.js";
18
18
  import { n as Ke } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
19
- import { D as kt } from "./dropdown-default-textbox.CKnrDQ2z.js";
19
+ import { D as kt } from "./dropdown-default-textbox.Dvzg0StF.js";
20
20
  import { g as re } from "./generate-uid.NJ8tVoha.js";
21
21
  import { u as Mt } from "./use-form-layout-loading.CWbjZiwP.js";
22
22
  import "./index.Cl4_42j5.js";
23
23
  import { u as St } from "./form-field.D_2g7vaP.js";
24
24
  import { B as Et } from "./directive.rXUeDb8p.js";
25
- import { F as Ft, E as Ot } from "./error-message.CYfT0Qsi.js";
25
+ import { F as Ft, E as Ot } from "./error-message.RxdStT3S.js";
26
26
  import { B as wt } from "./button-actions.types.BptAXjD8.js";
27
27
  import "../assets/date-range-picker.css";
28
28
  function He(r, t, e) {
@@ -159,51 +159,9 @@ const Lt = /[\d]/, Ut = /^\d{2}$/, jt = /^\d{2}:\d{2}$/, Qt = (r) => {
159
159
  const [e, a] = t.slice(-2);
160
160
  return [2, 5].includes(t.length) && a === ":" && (t = `${t.slice(0, t.length - 2)}0${e}`), (Ut.test(t) || jt.test(t)) && (t += ":"), t;
161
161
  }, Wt = {
162
- "en-US": {
163
- "DD-MM-YYYY": "DD-MM-YYYY",
164
- "MM-DD-YYYY": "MM-DD-YYYY",
165
- "YYYY-MM-DD": "YYYY-MM-DD",
166
- customRange: "Custom range",
167
- daily: "Daily",
168
- dateFrom: "Date from",
169
- dateTo: "Date to",
170
- lastMonth: "Last month",
171
- lastSevenDays: "Last 7 days",
172
- lastThreeMonths: "Last three months",
173
- monthly: "Monthly",
174
- quarterly: "Quarterly",
175
- timeFrom: "Time from",
176
- timeTo: "Time to",
177
- weekly: "Weekly"
178
- },
179
- "ja-JP": {
180
- customRange: "カスタム範囲",
181
- daily: "毎日",
182
- dateFrom: "開始日",
183
- dateTo: "日付まで",
184
- lastMonth: "先月",
185
- lastSevenDays: "過去7日間",
186
- lastThreeMonths: "過去3か月",
187
- monthly: "毎月",
188
- quarterly: "毎四半期",
189
- timeFrom: "開始時刻",
190
- timeTo: "終了時刻",
191
- weekly: "毎週"
192
- },
193
- "pt-BR": {
194
- customRange: "Intervalo personalizado",
195
- daily: "Diária",
196
- dateFrom: "Data a partir de",
197
- dateTo: "Data até",
198
- lastMonth: "Último mês",
199
- lastSevenDays: "Últimos 7 dias",
200
- lastThreeMonths: "Últimos 3 meses",
201
- monthly: "Mensal",
202
- quarterly: "Trimestral",
203
- timeFrom: "Horário a partir de",
204
- timeTo: "Hora de",
205
- weekly: "Semanal"
206
- }
162
+ "en-US": { "DD-MM-YYYY": "DD-MM-YYYY", "MM-DD-YYYY": "MM-DD-YYYY", "YYYY-MM-DD": "YYYY-MM-DD", customRange: "Custom range", daily: "Daily", dateFrom: "Date from", dateTo: "Date to", lastMonth: "Last month", lastSevenDays: "Last 7 days", lastThreeMonths: "Last three months", monthly: "Monthly", quarterly: "Quarterly", timeFrom: "Time from", timeTo: "Time to", weekly: "Weekly" },
163
+ "ja-JP": { customRange: "カスタム範囲", daily: "毎日", dateFrom: "開始日", dateTo: "日付まで", lastMonth: "先月", lastSevenDays: "過去7日間", lastThreeMonths: "過去3か月", monthly: "毎月", quarterly: "毎四半期", timeFrom: "開始時刻", timeTo: "終了時刻", weekly: "毎週" },
164
+ "pt-BR": { customRange: "Intervalo personalizado", daily: "Diária", dateFrom: "Data a partir de", dateTo: "Data até", lastMonth: "Último mês", lastSevenDays: "Últimos 7 dias", lastThreeMonths: "Últimos 3 meses", monthly: "Mensal", quarterly: "Trimestral", timeFrom: "Horário a partir de", timeTo: "Hora de", weekly: "Semanal" }
207
165
  }, $t = {
208
166
  name: "date-range-picker-calendar",
209
167
  i18n: { messages: Wt }
@@ -617,36 +575,9 @@ var Kt = function() {
617
575
  "8b3a8a9a"
618
576
  );
619
577
  const zt = Vt.exports, Jt = {
620
- "en-US": {
621
- apply: "Apply",
622
- cancel: "Cancel",
623
- dateRangePicker: "Date range picker {name}",
624
- provideDateInAFormat: "Provide date in a YYYY-MM-DD format",
625
- quarter: "Q{quarter} {year}",
626
- selectDate: "Select a date",
627
- selectDateRange: "Select a date range",
628
- selectedDateIsNotAvailable: "Selected date is not available"
629
- },
630
- "ja-JP": {
631
- apply: "適用",
632
- cancel: "キャンセル",
633
- dateRangePicker: "日付範囲ピッカー {name}",
634
- provideDateInAFormat: "YYYY-MM-DD形式で日付を入力してください",
635
- quarter: "{year}年第{quarter}四半期",
636
- selectDate: "日付を選択",
637
- selectDateRange: "日付範囲を選択",
638
- selectedDateIsNotAvailable: "選択した日付は利用できません"
639
- },
640
- "pt-BR": {
641
- apply: "Aplicar",
642
- cancel: "Cancelar",
643
- dateRangePicker: "Seletor de intervalo de datas {name}",
644
- provideDateInAFormat: "Forneça a data no formato AAAA-MM-DD",
645
- quarter: "{quarter}º trimestre de {year}",
646
- selectDate: "Selecione uma data",
647
- selectDateRange: "Selecione um intervalo de datas",
648
- selectedDateIsNotAvailable: "A data selecionada não está disponível"
649
- }
578
+ "en-US": { apply: "Apply", cancel: "Cancel", dateRangePicker: "Date range picker {name}", provideDateInAFormat: "Provide date in a YYYY-MM-DD format", quarter: "Q{quarter} {year}", selectDate: "Select a date", selectDateRange: "Select a date range", selectedDateIsNotAvailable: "Selected date is not available" },
579
+ "ja-JP": { apply: "適用", cancel: "キャンセル", dateRangePicker: "日付範囲ピッカー {name}", provideDateInAFormat: "YYYY-MM-DD形式で日付を入力してください", quarter: "{year}年第{quarter}四半期", selectDate: "日付を選択", selectDateRange: "日付範囲を選択", selectedDateIsNotAvailable: "選択した日付は利用できません" },
580
+ "pt-BR": { apply: "Aplicar", cancel: "Cancelar", dateRangePicker: "Seletor de intervalo de datas {name}", provideDateInAFormat: "Forneça a data no formato AAAA-MM-DD", quarter: "{quarter}º trimestre de {year}", selectDate: "Selecione uma data", selectDateRange: "Selecione um intervalo de datas", selectedDateIsNotAvailable: "A data selecionada não está disponível" }
650
581
  }, Xt = ({
651
582
  datePickerValue: r,
652
583
  isDateIncorrect: t,
@@ -877,4 +808,4 @@ export {
877
808
  Bt as a,
878
809
  ge as i
879
810
  };
880
- //# sourceMappingURL=date-range-picker.B9XHHv9W.js.map
811
+ //# sourceMappingURL=date-range-picker.Bf9pRNL7.js.map