@adyen/bento-vue2 1.91.0 → 1.92.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 (218) hide show
  1. package/dist/@types/index.d.ts +118 -127
  2. package/dist/action-bar.js +1 -1
  3. package/dist/ai-tag.js +1 -1
  4. package/dist/alert.js +1 -1
  5. package/dist/assets/accordion-item.css +1 -1
  6. package/dist/assets/action-bar.css +1 -1
  7. package/dist/assets/base-modal.css +1 -1
  8. package/dist/assets/button-actions.css +1 -1
  9. package/dist/assets/card.css +1 -1
  10. package/dist/assets/checkbox-group.css +1 -1
  11. package/dist/assets/checkbox.css +1 -1
  12. package/dist/assets/data-grid.css +1 -1
  13. package/dist/assets/date-range-picker.css +1 -1
  14. package/dist/assets/dialog-page.css +1 -1
  15. package/dist/assets/dropdown.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/input-field.css +1 -1
  19. package/dist/assets/inspector.css +1 -1
  20. package/dist/assets/modal-fullscreen.css +1 -1
  21. package/dist/assets/secondary-nav.css +1 -1
  22. package/dist/assets/sidepanel.css +1 -1
  23. package/dist/assets/toggle.css +1 -1
  24. package/dist/assets/use-cached-selected-values.css +1 -1
  25. package/dist/button.js +1 -1
  26. package/dist/card.js +1 -1
  27. package/dist/checkbox.js +2 -2
  28. package/dist/chunks/{action-bar.Dj830k6L.js → action-bar.ChuPTyQG.js} +3 -3
  29. package/dist/chunks/{action-bar.Dj830k6L.js.map → action-bar.ChuPTyQG.js.map} +1 -1
  30. package/dist/chunks/{ai-tag.AyG2UWCB.js → ai-tag.Dt8nijLW.js} +2 -2
  31. package/dist/chunks/{ai-tag.AyG2UWCB.js.map → ai-tag.Dt8nijLW.js.map} +1 -1
  32. package/dist/chunks/{alert.CXRb-Smf.js → alert.CLqcPN0Q.js} +73 -55
  33. package/dist/chunks/alert.CLqcPN0Q.js.map +1 -0
  34. package/dist/chunks/{base-modal.C52VMtnd.js → base-modal.DMdzcBrq.js} +3 -3
  35. package/dist/chunks/base-modal.DMdzcBrq.js.map +1 -0
  36. package/dist/chunks/{button-actions-with-menu.OsPQ-POD.js → button-actions-with-menu.CXFziNUr.js} +2 -2
  37. package/dist/chunks/{button-actions-with-menu.OsPQ-POD.js.map → button-actions-with-menu.CXFziNUr.js.map} +1 -1
  38. package/dist/chunks/{button-actions.Bdbu0bvt.js → button-actions.CXD6_9qN.js} +4 -4
  39. package/dist/chunks/button-actions.CXD6_9qN.js.map +1 -0
  40. package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
  41. package/dist/chunks/button.C9b2AC9w.js.map +1 -1
  42. package/dist/chunks/{calendar.CqsfThnC.js → calendar.rZsIZPxm.js} +526 -466
  43. package/dist/chunks/calendar.rZsIZPxm.js.map +1 -0
  44. package/dist/chunks/{card.8z7UQeVK.js → card.Brma5kdb.js} +2 -2
  45. package/dist/chunks/card.Brma5kdb.js.map +1 -0
  46. package/dist/chunks/{checkbox-group.Dur2Edtw.js → checkbox-group.DWZvFkjz.js} +4 -4
  47. package/dist/chunks/checkbox-group.DWZvFkjz.js.map +1 -0
  48. package/dist/chunks/{checkbox.vNjt6QDJ.js → checkbox.BZP0wtnE.js} +3 -5
  49. package/dist/chunks/checkbox.BZP0wtnE.js.map +1 -0
  50. package/dist/chunks/{code-snippet.BVpFBhKq.js → code-snippet.DHAymIXp.js} +3 -3
  51. package/dist/chunks/code-snippet.DHAymIXp.js.map +1 -0
  52. package/dist/chunks/constructNow.CK0ryPil.js +8 -0
  53. package/dist/chunks/{constructNow.CIc7d13I.js.map → constructNow.CK0ryPil.js.map} +1 -1
  54. package/dist/chunks/country.types.jjXwaoMl.js.map +1 -1
  55. package/dist/chunks/{dashboard-section.DNxNVV44.js → dashboard-section.D9rS8myE.js} +2 -2
  56. package/dist/chunks/{dashboard-section.DNxNVV44.js.map → dashboard-section.D9rS8myE.js.map} +1 -1
  57. package/dist/chunks/{dashed-underline.DL2_sik5.js → dashed-underline.D_FhFRXM.js} +2 -2
  58. package/dist/chunks/{dashed-underline.DL2_sik5.js.map → dashed-underline.D_FhFRXM.js.map} +1 -1
  59. package/dist/chunks/{data-grid-template.BFv1zr6g.js → data-grid-template.CRijG20n.js} +2 -2
  60. package/dist/chunks/{data-grid-template.BFv1zr6g.js.map → data-grid-template.CRijG20n.js.map} +1 -1
  61. package/dist/chunks/{data-grid.ZHY5EzP3.js → data-grid.hMM9F36T.js} +363 -363
  62. package/dist/chunks/data-grid.hMM9F36T.js.map +1 -0
  63. package/dist/chunks/{date-picker.kl6aFlr1.js → date-picker.BSo6Cvum.js} +7 -7
  64. package/dist/chunks/{date-picker.kl6aFlr1.js.map → date-picker.BSo6Cvum.js.map} +1 -1
  65. package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
  66. package/dist/chunks/{date-range-picker.LCWVAa5R.js → date-range-picker.D90k5b8p.js} +419 -411
  67. package/dist/chunks/date-range-picker.D90k5b8p.js.map +1 -0
  68. package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
  69. package/dist/chunks/{de.BJvo6njq.js → de.pvjpUJ1o.js} +2 -2
  70. package/dist/chunks/{de.BJvo6njq.js.map → de.pvjpUJ1o.js.map} +1 -1
  71. package/dist/chunks/{differenceInMonths.CIYECBxK.js → differenceInMonths.CpwVtHZX.js} +3 -2
  72. package/dist/chunks/{differenceInMonths.CIYECBxK.js.map → differenceInMonths.CpwVtHZX.js.map} +1 -1
  73. package/dist/chunks/{draggable-handle.Ba28eM8o.js → draggable-handle.BR_aQH5N.js} +2 -2
  74. package/dist/chunks/{draggable-handle.Ba28eM8o.js.map → draggable-handle.BR_aQH5N.js.map} +1 -1
  75. package/dist/chunks/{dropdown-tag.B61hPq5n.js → dropdown-tag.z3rsxbpW.js} +4 -4
  76. package/dist/chunks/dropdown-tag.z3rsxbpW.js.map +1 -0
  77. package/dist/chunks/{dropdown.Ca-f8tdX.js → dropdown.BYJwx-JD.js} +313 -305
  78. package/dist/chunks/dropdown.BYJwx-JD.js.map +1 -0
  79. package/dist/chunks/{en-GB.C3-QUpva.js → en-GB.-Q7Oq-nY.js} +2 -2
  80. package/dist/chunks/{en-GB.C3-QUpva.js.map → en-GB.-Q7Oq-nY.js.map} +1 -1
  81. package/dist/chunks/{en-US.YeSsZuOc.js → en-US.BK5uiAND.js} +5 -5
  82. package/dist/chunks/{en-US.YeSsZuOc.js.map → en-US.BK5uiAND.js.map} +1 -1
  83. package/dist/chunks/{es.DyUjjSL8.js → es.2H4LvTyV.js} +2 -2
  84. package/dist/chunks/{es.DyUjjSL8.js.map → es.2H4LvTyV.js.map} +1 -1
  85. package/dist/chunks/{file-uploader.DeWmLpfp.js → file-uploader.Djl0xaDN.js} +4 -5
  86. package/dist/chunks/{file-uploader.DeWmLpfp.js.map → file-uploader.Djl0xaDN.js.map} +1 -1
  87. package/dist/chunks/{filter-bar.Bd4ghW_B.js → filter-bar.C9rWMIWO.js} +50 -50
  88. package/dist/chunks/filter-bar.C9rWMIWO.js.map +1 -0
  89. package/dist/chunks/{footer-actions.CvUaoMzj.js → footer-actions.D9mHwk5l.js} +2 -2
  90. package/dist/chunks/{footer-actions.CvUaoMzj.js.map → footer-actions.D9mHwk5l.js.map} +1 -1
  91. package/dist/chunks/{form-layout-title.DzGajv4U.js → form-layout-title.zZVLCyqe.js} +2 -2
  92. package/dist/chunks/{form-layout-title.DzGajv4U.js.map → form-layout-title.zZVLCyqe.js.map} +1 -1
  93. package/dist/chunks/{fr.JD_4GwS8.js → fr.Cu0IIfBP.js} +2 -2
  94. package/dist/chunks/{fr.JD_4GwS8.js.map → fr.Cu0IIfBP.js.map} +1 -1
  95. package/dist/chunks/{header-meta.AXUGoqDd.js → header-meta.BSPnWWmi.js} +14 -14
  96. package/dist/chunks/{header-meta.AXUGoqDd.js.map → header-meta.BSPnWWmi.js.map} +1 -1
  97. package/dist/chunks/{header-with-views.Ba4dswJF.js → header-with-views.g6J7x6l2.js} +8 -8
  98. package/dist/chunks/{header-with-views.Ba4dswJF.js.map → header-with-views.g6J7x6l2.js.map} +1 -1
  99. package/dist/chunks/{header.C7B7RBib.js → header.DyZG7qWe.js} +3 -3
  100. package/dist/chunks/header.DyZG7qWe.js.map +1 -0
  101. package/dist/chunks/{input-field-password.BNAtIn_D.js → input-field-password.CiDdI6A_.js} +4 -4
  102. package/dist/chunks/input-field-password.CiDdI6A_.js.map +1 -0
  103. package/dist/chunks/{input-field-phone-number.CEYx1s4b.js → input-field-phone-number.DFS58acU.js} +3 -3
  104. package/dist/chunks/{input-field-phone-number.CEYx1s4b.js.map → input-field-phone-number.DFS58acU.js.map} +1 -1
  105. package/dist/chunks/input-field.CGLjYab8.js +222 -0
  106. package/dist/chunks/input-field.CGLjYab8.js.map +1 -0
  107. package/dist/chunks/{input-time.BLuMfakv.js → input-time.BhAUyKZM.js} +4 -4
  108. package/dist/chunks/{input-time.BLuMfakv.js.map → input-time.BhAUyKZM.js.map} +1 -1
  109. package/dist/chunks/isSameWeek.TrpUOIn5.js +14 -0
  110. package/dist/chunks/{isSameWeek.CzBCmu7d.js.map → isSameWeek.TrpUOIn5.js.map} +1 -1
  111. package/dist/chunks/{it.BlUnV-yA.js → it.B65snrJA.js} +3 -3
  112. package/dist/chunks/{it.BlUnV-yA.js.map → it.B65snrJA.js.map} +1 -1
  113. package/dist/chunks/{ja.nUwDmVf2.js → ja.xGVfFSzL.js} +2 -2
  114. package/dist/chunks/{ja.nUwDmVf2.js.map → ja.xGVfFSzL.js.map} +1 -1
  115. package/dist/chunks/link.DB5g6d48.js.map +1 -1
  116. package/dist/chunks/{modal-fullscreen.DTvg2NLk.js → modal-fullscreen.De6mevyD.js} +2 -2
  117. package/dist/chunks/{modal-fullscreen.DTvg2NLk.js.map → modal-fullscreen.De6mevyD.js.map} +1 -1
  118. package/dist/chunks/{modal.D_TcWTkf.js → modal.BXxwn9H4.js} +93 -91
  119. package/dist/chunks/{modal.D_TcWTkf.js.map → modal.BXxwn9H4.js.map} +1 -1
  120. package/dist/chunks/{pagination.D6BxMw5L.js → pagination.BzsKZFnw.js} +2 -2
  121. package/dist/chunks/{pagination.D6BxMw5L.js.map → pagination.BzsKZFnw.js.map} +1 -1
  122. package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
  123. package/dist/chunks/popover.types.hA13DZPg.js.map +1 -1
  124. package/dist/chunks/popper-container.C_n9Ds1W.js.map +1 -1
  125. package/dist/chunks/promo-banner.Dc_kK1x9.js.map +1 -1
  126. package/dist/chunks/{pt-BR.BCU2Hj36.js → pt-BR.D9FuAQZm.js} +2 -2
  127. package/dist/chunks/{pt-BR.BCU2Hj36.js.map → pt-BR.D9FuAQZm.js.map} +1 -1
  128. package/dist/chunks/radio-group.Bb-L-0io.js.map +1 -1
  129. package/dist/chunks/{rich-text-editor.Dtdfh-0V.js → rich-text-editor.DPpIzYid.js} +3 -3
  130. package/dist/chunks/{rich-text-editor.Dtdfh-0V.js.map → rich-text-editor.DPpIzYid.js.map} +1 -1
  131. package/dist/chunks/{search-bar.MVJS9-Mh.js → search-bar.BEOieKeA.js} +4 -4
  132. package/dist/chunks/{search-bar.MVJS9-Mh.js.map → search-bar.BEOieKeA.js.map} +1 -1
  133. package/dist/chunks/{secondary-nav.C-nPZR-2.js → secondary-nav.BBL5zZPK.js} +2 -2
  134. package/dist/chunks/{secondary-nav.C-nPZR-2.js.map → secondary-nav.BBL5zZPK.js.map} +1 -1
  135. package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
  136. package/dist/chunks/{sidepanel.BTRfwGiS.js → sidepanel.nW0Bhk_u.js} +3 -3
  137. package/dist/chunks/{sidepanel.BTRfwGiS.js.map → sidepanel.nW0Bhk_u.js.map} +1 -1
  138. package/dist/chunks/{startOfWeek.CXhhX-R7.js → startOfWeek.Br5KM4z_.js} +2 -2
  139. package/dist/chunks/{startOfWeek.CXhhX-R7.js.map → startOfWeek.Br5KM4z_.js.map} +1 -1
  140. package/dist/chunks/status.types.Dx8MDhEH.js.map +1 -1
  141. package/dist/chunks/{summary-grid.types.DUIqCmwg.js → summary-grid.types.Dp_efYVN.js} +2 -2
  142. package/dist/chunks/{summary-grid.types.DUIqCmwg.js.map → summary-grid.types.Dp_efYVN.js.map} +1 -1
  143. package/dist/chunks/tag.D2xagTJv.js.map +1 -1
  144. package/dist/chunks/textarea.CJS-1I41.js.map +1 -1
  145. package/dist/chunks/{timeline-item.BOUWkLi1.js → timeline-item.CF9jbIRr.js} +4 -4
  146. package/dist/chunks/timeline-item.CF9jbIRr.js.map +1 -0
  147. package/dist/chunks/{toggle.B1z1YPe_.js → toggle.Ca-MM3dt.js} +3 -5
  148. package/dist/chunks/toggle.Ca-MM3dt.js.map +1 -0
  149. package/dist/chunks/tooltip.BxtnF3is.js.map +1 -1
  150. package/dist/chunks/{tutorial.CZt_mcuT.js → tutorial.CoWDVs7_.js} +2 -2
  151. package/dist/chunks/{tutorial.CZt_mcuT.js.map → tutorial.CoWDVs7_.js.map} +1 -1
  152. package/dist/chunks/typography.C8lPlsbD.js.map +1 -1
  153. package/dist/chunks/{use-cached-selected-values.BJbWbkEQ.js → use-cached-selected-values.Du8-wWR2.js} +616 -551
  154. package/dist/chunks/use-cached-selected-values.Du8-wWR2.js.map +1 -0
  155. package/dist/chunks/{use-date-input-formatter.Djf8AoLr.js → use-date-input-formatter.ibZeLD_V.js} +4 -4
  156. package/dist/chunks/{use-date-input-formatter.Djf8AoLr.js.map → use-date-input-formatter.ibZeLD_V.js.map} +1 -1
  157. package/dist/chunks/{zh-CN.ChYkuQAR.js → zh-CN.Be4pa3-g.js} +3 -3
  158. package/dist/chunks/{zh-CN.ChYkuQAR.js.map → zh-CN.Be4pa3-g.js.map} +1 -1
  159. package/dist/code-snippet.js +1 -1
  160. package/dist/dashboard-template.js +1 -1
  161. package/dist/dashed-underline.js +1 -1
  162. package/dist/data-grid-template.js +1 -1
  163. package/dist/data-grid.js +1 -1
  164. package/dist/date-picker.js +2 -2
  165. package/dist/date-range-picker.js +2 -2
  166. package/dist/draggable.js +1 -1
  167. package/dist/dropdown.js +3 -3
  168. package/dist/file-uploader.js +1 -1
  169. package/dist/filter-bar.js +1 -1
  170. package/dist/form-layout.js +1 -1
  171. package/dist/header-with-views.js +1 -1
  172. package/dist/header.js +1 -1
  173. package/dist/index.js +40 -40
  174. package/dist/index.js.map +1 -1
  175. package/dist/input-field-password.js +1 -1
  176. package/dist/input-field-phone-number.js +1 -1
  177. package/dist/input-field.js +1 -1
  178. package/dist/input-time.js +1 -1
  179. package/dist/internal.js +5 -5
  180. package/dist/menu.js +1 -1
  181. package/dist/modal-fullscreen.js +1 -1
  182. package/dist/modal.js +2 -2
  183. package/dist/pagination.js +1 -1
  184. package/dist/popover.js +1 -1
  185. package/dist/rich-text-editor.js +1 -1
  186. package/dist/search-bar.js +2 -2
  187. package/dist/secondary-nav.js +1 -1
  188. package/dist/sidepanel.js +1 -1
  189. package/dist/summary-grid.js +1 -1
  190. package/dist/timeline.js +1 -1
  191. package/dist/toggle.js +1 -1
  192. package/dist/tutorial.js +1 -1
  193. package/dist/web-types.json +45 -4
  194. package/package.json +5 -5
  195. package/dist/chunks/alert.CXRb-Smf.js.map +0 -1
  196. package/dist/chunks/base-modal.C52VMtnd.js.map +0 -1
  197. package/dist/chunks/button-actions.Bdbu0bvt.js.map +0 -1
  198. package/dist/chunks/calendar.CqsfThnC.js.map +0 -1
  199. package/dist/chunks/card.8z7UQeVK.js.map +0 -1
  200. package/dist/chunks/checkbox-group.Dur2Edtw.js.map +0 -1
  201. package/dist/chunks/checkbox.vNjt6QDJ.js.map +0 -1
  202. package/dist/chunks/code-snippet.BVpFBhKq.js.map +0 -1
  203. package/dist/chunks/constructNow.CIc7d13I.js +0 -8
  204. package/dist/chunks/data-grid.ZHY5EzP3.js.map +0 -1
  205. package/dist/chunks/date-range-picker.LCWVAa5R.js.map +0 -1
  206. package/dist/chunks/dropdown-tag.B61hPq5n.js.map +0 -1
  207. package/dist/chunks/dropdown.Ca-f8tdX.js.map +0 -1
  208. package/dist/chunks/filter-bar.Bd4ghW_B.js.map +0 -1
  209. package/dist/chunks/header.C7B7RBib.js.map +0 -1
  210. package/dist/chunks/input-field-password.BNAtIn_D.js.map +0 -1
  211. package/dist/chunks/input-field.Dh5W0Az-.js +0 -211
  212. package/dist/chunks/input-field.Dh5W0Az-.js.map +0 -1
  213. package/dist/chunks/isSameWeek.CzBCmu7d.js +0 -14
  214. package/dist/chunks/timeline-item.BOUWkLi1.js.map +0 -1
  215. package/dist/chunks/toggle.B1z1YPe_.js.map +0 -1
  216. package/dist/chunks/use-cached-selected-values.BJbWbkEQ.js.map +0 -1
  217. package/dist/chunks/warning-filled.CbJ1pcB2.js +0 -24
  218. package/dist/chunks/warning-filled.CbJ1pcB2.js.map +0 -1
@@ -1,14 +1,14 @@
1
1
  import { ref as v, computed as o, defineComponent as te, toRef as O, watch as V, nextTick as re } from "vue";
2
- import { g as le, s as L, b as oe, e as ne, f as ie, p as se } from "./calendar.CqsfThnC.js";
3
- import { h as de } from "./button-actions.Bdbu0bvt.js";
2
+ import { g as le, s as L, b as oe, e as ne, f as ie, p as se } from "./calendar.rZsIZPxm.js";
3
+ import { h as de } from "./button-actions.CXD6_9qN.js";
4
4
  import { d as ce, B as ue } from "./typography.C8lPlsbD.js";
5
- import { D as pe } from "./dropdown.Ca-f8tdX.js";
6
- import { B as fe } from "./input-field.Dh5W0Az-.js";
7
- import { d as De } from "./use-cached-selected-values.BJbWbkEQ.js";
5
+ import { D as pe } from "./dropdown.BYJwx-JD.js";
6
+ import { B as fe } from "./input-field.CGLjYab8.js";
7
+ import { d as De } from "./use-cached-selected-values.Du8-wWR2.js";
8
8
  import { g as k } from "./generate-uid.NJ8tVoha.js";
9
9
  import { u as z } from "./index.B6WW_F-J.js";
10
10
  import { u as me } from "./form-field.D_2g7vaP.js";
11
- import { u as q, a as ve } from "./use-date-input-formatter.Djf8AoLr.js";
11
+ import { u as q, a as ve } from "./use-date-input-formatter.ibZeLD_V.js";
12
12
  import { u as be } from "./use-form-layout-loading.CWbjZiwP.js";
13
13
  import "./index.Cl4_42j5.js";
14
14
  import { u as ye } from "./use-touch-device.DTqFAbXh.js";
@@ -234,4 +234,4 @@ const Xe = xe.exports;
234
234
  export {
235
235
  Xe as B
236
236
  };
237
- //# sourceMappingURL=date-picker.kl6aFlr1.js.map
237
+ //# sourceMappingURL=date-picker.BSo6Cvum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.kl6aFlr1.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 <bento-input-field\n v-if=\"isTouchDevice\"\n ref=\"inputContainerRef\"\n :type=\"isMonthVariant ? 'month' : 'date'\"\n :aria-labelledby=\"label ? labelId : $attrs?.['aria-labelledby']\"\n :aria-label=\"label || $attrs?.['aria-labelledby'] ? null : popoverAriaLabel\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-required=\"required\"\n :disabled=\"disabled\"\n :error=\"!!errorMessage || !!dateErrorText\"\n :model-value=\"nativeValue\"\n :readonly=\"isReadOnly\"\n :min=\"formattedMin\"\n :max=\"formattedMax\"\n @update:model-value=\"onNativeDateInput\"\n />\n <dropdown-input-default\n v-else\n ref=\"inputContainerRef\"\n always-combobox-is-input\n :ariaControls=\"datePickerContainerId\"\n :ariaExpanded=\"isDatePickerOpen\"\n :aria-labelledby=\"label ? labelId : $attrs?.['aria-labelledby']\"\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 && !isTouchDevice\"\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 import { BentoInputField } from '@/components/input-field';\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 { dateToNativeDateString, dateToNativeMonthString, parseNativeMonthString } from '@/utils/ts/format-date';\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, useTouchDevice } 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 const { isTouchDevice } = useTouchDevice();\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 formatNativeDate = (date: Date): string => {\n if (!date) {\n return '';\n }\n return isMonthVariant.value ? dateToNativeMonthString(date) : dateToNativeDateString(date);\n };\n\n const nativeValue = computed(() => formatNativeDate(internalModelValue.value));\n\n const onNativeDateInput = (value: string) => {\n if (!value) {\n emitValue(null);\n return;\n }\n\n if (isMonthVariant.value) {\n emitValue(parseNativeMonthString(value));\n return;\n }\n\n const date = parseDate(value);\n if (date) {\n emitValue(date);\n }\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 formattedMin = computed(() => formatNativeDate(props.min));\n const formattedMax = computed(() => formatNativeDate(props.max));\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 // On touch devices with native input, we also want immediate feedback.\n if (isDatePickerOpen.value || isTouchDevice.value) {\n validateDate(textInputValue.value);\n } else {\n validateDateDebounced(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","isTouchDevice","useTouchDevice","computedTrapAllOptions","watch","disabled","newValue","newModelValue","deprecate","dateDisplayValue","formatTextInputDisplayValue","formatNativeDate","dateToNativeMonthString","dateToNativeDateString","nativeValue","onNativeDateInput","value","parseNativeMonthString","dateErrorText","descriptionConditionalClasses","ariaDescribedBy","formattedMin","formattedMax","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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EAAA,QAAA,IAEAwB,EAAA;AAAA,IAA4B,GAGhCgB,IAAA,CAAAC,MAAA;AAEI,MAAAvE,EAAA,QAAA,IAEAoE,EAAA,GACAhC,EAAAmC,CAAA;AAAA,IAAsB,GAG1BC,KAAA,YAAA;AACI,MAAAxE,EAAA,UACIA,EAAA,QAAA,IACAQ,EAAA,QAAA,OAEJ4B,EAAA,IAAA;AAAA,IAAc,GAGlBqC,KAAA,CAAAC,MAAA;AACI,MAAA/B,EAAA+B,CAAA;AAAA,IAAe,GAGnBC,IAAA,CAAAC,MAAA;AAEI,UAAAA,EAAA,SAAA;AACI;AAIJ,MADAnC,EAAAmC,CAAA,KAAAT,EAAAzB,EAAAkC,CAAA,CAAA,KAEI5E,EAAA,QAAA,IACAoC,EAAAM,EAAAkC,CAAA,CAAA,KAA+BA,MAG/B5E,EAAA,QAAA,IACAoC,EAAA,IAAA;AAAA,IACJ,GAGJyC,IAAAC,GAAAH,GAAAxD,CAAA;q5BAEA,CAAAyD,MAAA;AACI,MAAApE,EAAA,QAAAoC,EAAAgC,CAAA,GAGA9C,EAAA,SAAAe,EAAA,QACI8B,EAAAnE,EAAA,KAAA,IAEAqE,EAAArE,EAAA,KAAA;AAAA,IACJ,sBAUJ,OAAAkE,MAAA;;AACI,MAAA5C,EAAA,UAGA4C,EAAA,eAAA,GAEAL,EAAA,GAGA,MAAAU,GAAA,GAGA/C,EAAA,UAEIsB,EAAA,oBAAA,KAAA,CAAA,GACAlB,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
+ {"version":3,"file":"date-picker.BSo6Cvum.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 <bento-input-field\n v-if=\"isTouchDevice\"\n ref=\"inputContainerRef\"\n :type=\"isMonthVariant ? 'month' : 'date'\"\n :aria-labelledby=\"label ? labelId : $attrs?.['aria-labelledby']\"\n :aria-label=\"label || $attrs?.['aria-labelledby'] ? null : popoverAriaLabel\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-required=\"required\"\n :disabled=\"disabled\"\n :error=\"!!errorMessage || !!dateErrorText\"\n :model-value=\"nativeValue\"\n :readonly=\"isReadOnly\"\n :min=\"formattedMin\"\n :max=\"formattedMax\"\n @update:model-value=\"onNativeDateInput\"\n />\n <dropdown-input-default\n v-else\n ref=\"inputContainerRef\"\n always-combobox-is-input\n :ariaControls=\"datePickerContainerId\"\n :ariaExpanded=\"isDatePickerOpen\"\n :aria-labelledby=\"label ? labelId : $attrs?.['aria-labelledby']\"\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 && !isTouchDevice\"\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 import { BentoInputField } from '@/components/input-field';\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 { dateToNativeDateString, dateToNativeMonthString, parseNativeMonthString } from '@/utils/ts/format-date';\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, useTouchDevice } 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 const { isTouchDevice } = useTouchDevice();\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 formatNativeDate = (date: Date): string => {\n if (!date) {\n return '';\n }\n return isMonthVariant.value ? dateToNativeMonthString(date) : dateToNativeDateString(date);\n };\n\n const nativeValue = computed(() => formatNativeDate(internalModelValue.value));\n\n const onNativeDateInput = (value: string) => {\n if (!value) {\n emitValue(null);\n return;\n }\n\n if (isMonthVariant.value) {\n emitValue(parseNativeMonthString(value));\n return;\n }\n\n const date = parseDate(value);\n if (date) {\n emitValue(date);\n }\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 formattedMin = computed(() => formatNativeDate(props.min));\n const formattedMax = computed(() => formatNativeDate(props.max));\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 // On touch devices with native input, we also want immediate feedback.\n if (isDatePickerOpen.value || isTouchDevice.value) {\n validateDate(textInputValue.value);\n } else {\n validateDateDebounced(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","isTouchDevice","useTouchDevice","computedTrapAllOptions","watch","disabled","newValue","newModelValue","deprecate","dateDisplayValue","formatTextInputDisplayValue","formatNativeDate","dateToNativeMonthString","dateToNativeDateString","nativeValue","onNativeDateInput","value","parseNativeMonthString","dateErrorText","descriptionConditionalClasses","ariaDescribedBy","formattedMin","formattedMax","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,QA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AEI,UAAAA,EAAA,SAAA;AACI;AAIJ,MADAnC,EAAAmC,CAAA,KAAAT,EAAAzB,EAAAkC,CAAA,CAAA,KAEI5E,EAAA,QAAA,IACAoC,EAAAM,EAAAkC,CAAA,CAAA,KAA+BA,MAG/B5E,EAAA,QAAA,IACAoC,EAAA,IAAA;AAAA,IACJ,GAGJyC,IAAAC,GAAAH,GAAAxD,CAAA;q5BAEA,CAAAyD,MAAA;AACI,MAAApE,EAAA,QAAAoC,EAAAgC,CAAA,GAGA9C,EAAA,SAAAe,EAAA,QACI8B,EAAAnE,EAAA,KAAA,IAEAqE,EAAArE,EAAA,KAAA;AAAA,IACJ,sBAUJ,OAAAkE,MAAA;;AACI,MAAA5C,EAAA,UAGA4C,EAAA,eAAA,GAEAL,EAAA,GAGA,MAAAU,GAAA,GAGA/C,EAAA,UAEIsB,EAAA,oBAAA,KAAA,CAAA,GACAlB,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 +1 @@
1
- {"version":3,"file":"date-picker.types.Ckt7zxGy.js","sources":["../../src/components/date-picker/date-picker.types.ts"],"sourcesContent":["import type { FormField, FormFieldEmits } from '../../types/form-field';\nimport {\n CalendarFirstDayOfWeek as BentoDatePickerFirstDayOfWeek,\n type CalendarIsDateDisabled as BentoDatePickerIsDateDisabled,\n type CalendarSingleDateValue as BentoDatePickerValue,\n CalendarVariant as BentoDatePickerVariant,\n} from '@/internal';\n\nexport {\n BentoDatePickerFirstDayOfWeek,\n type BentoDatePickerIsDateDisabled,\n type BentoDatePickerValue,\n BentoDatePickerVariant,\n};\n\n/**\n * @deprecated since version 2.0. This enum is deprecated. Use the event name as a string literal instead.\n */\nexport enum BentoDatePickerEvent {\n INPUT = 'input',\n}\n\nexport type BentoDatePickerEmits = FormFieldEmits<BentoDatePickerValue>;\n\nexport interface BentoDatePickerProps extends FormField {\n /**\n * Default start date for the calendar pane.\n * Expected format: YYYY-MM-DD\n * @default null\n */\n defaultDisplayMonth?: string | null;\n\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n * @default undefined\n */\n firstDayOfWeek?: BentoDatePickerFirstDayOfWeek;\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled?: BentoDatePickerIsDateDisabled;\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n * @default null\n */\n min?: Date | null;\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n * @default null\n */\n max?: Date | null;\n\n /**\n * Selected date\n *\n * @default null\n */\n modelValue?: BentoDatePickerValue | null;\n\n /**\n * Selected date\n *\n * @deprecated for usage with properties since version 2.0. Use `v-model` or `model-value` instead.\n *\n * @default null\n */\n value?: BentoDatePickerValue | null;\n\n /**\n * The type of calendar to display. Defaults to showing days.\n */\n variant?: `${BentoDatePickerVariant}`;\n}\n"],"names":["BentoDatePickerEvent"],"mappings":"AAkBO,IAAKA,sBAAAA,OACRA,EAAA,QAAQ,SADAA,IAAAA,KAAA,CAAA,CAAA;"}
1
+ {"version":3,"file":"date-picker.types.Ckt7zxGy.js","sources":["../../src/components/date-picker/date-picker.types.ts"],"sourcesContent":["import type { FormField, FormFieldEmits } from '../../types/form-field';\nimport {\n CalendarFirstDayOfWeek as BentoDatePickerFirstDayOfWeek,\n type CalendarIsDateDisabled as BentoDatePickerIsDateDisabled,\n type CalendarSingleDateValue as BentoDatePickerValue,\n CalendarVariant as BentoDatePickerVariant,\n} from '@/internal';\n\nexport {\n BentoDatePickerFirstDayOfWeek,\n type BentoDatePickerIsDateDisabled,\n type BentoDatePickerValue,\n BentoDatePickerVariant,\n};\n\n/**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\nexport enum BentoDatePickerEvent {\n INPUT = 'input',\n}\n\nexport type BentoDatePickerEmits = FormFieldEmits<BentoDatePickerValue>;\n\nexport interface BentoDatePickerProps extends FormField {\n /**\n * Default start date for the calendar pane.\n * Expected format: YYYY-MM-DD\n * @default null\n */\n defaultDisplayMonth?: string | null;\n\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n * @default undefined\n */\n firstDayOfWeek?: BentoDatePickerFirstDayOfWeek;\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled?: BentoDatePickerIsDateDisabled;\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n * @default null\n */\n min?: Date | null;\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n * @default null\n */\n max?: Date | null;\n\n /**\n * Selected date\n *\n * @default null\n */\n modelValue?: BentoDatePickerValue | null;\n\n /**\n * Selected date\n *\n * @deprecated Since v2.0.0. Use `v-model` or `model-value` instead.\n *\n * @default null\n */\n value?: BentoDatePickerValue | null;\n\n /**\n * The type of calendar to display. Defaults to showing days.\n */\n variant?: `${BentoDatePickerVariant}`;\n}\n"],"names":["BentoDatePickerEvent"],"mappings":"AAkBO,IAAKA,sBAAAA,OACRA,EAAA,QAAQ,SADAA,IAAAA,KAAA,CAAA,CAAA;"}